diff options
author | Ben Bridle <ben@derelict.engineering> | 2025-10-15 13:25:28 +1300 |
---|---|---|
committer | Ben Bridle <ben@derelict.engineering> | 2025-10-15 13:25:28 +1300 |
commit | a4c2b3ae304dc53e8e52cc952383b5171ce00b99 (patch) | |
tree | 9f893524673a4a028c9a744b84a624ca0d79ac89 /src/lib.rs | |
parent | c62da877b370392accfbd8a1087ad5673b6f55e4 (diff) | |
download | torque-asm-a4c2b3ae304dc53e8e52cc952383b5171ce00b99.zip |
Raise an error if recursion depth exceeds a maximum value
This is preferable to having the assembler crash with a stack overflow
error, because the user can now see which invocation caused the
overflow.
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -1,4 +1,5 @@ const MAX_ITERATIONS_TO_STABILISE: usize = 4; +const MAX_RECURSION_DEPTH: usize = 1024; mod stages; mod types; |