pub const MAX_CALL_DEPTH: usize = 2_500;Expand description
Maximum LOGOS call depth, enforced identically by every engine: recursion past this is a catchable runtime error, not a host crash. Set to 2500 (up from the old 1000) so naive deep recursion like ackermann(3,8) — depth ~2045 — runs in the interpreter, closer to Node/V8’s recursion headroom. The VM is heap-stacked (depth-safe); the native-recursion engines stay within their stacks at this depth (JIT ~2500 frames is a couple MB; the tree-walker’s depth tests run on a big-stack thread).