The CEK evaluator's cek_run was recursive (calls itself via cek_step). Native OCaml handles deep recursion but wasm_of_ocaml compiles to JS which has ~10K frame stack limit. Complex expressions (bytecode compiler) exceeded this, causing "Maximum call stack size exceeded" in all WASM bytecode compilation. Replace recursive cek_run with iterative while loop — same semantics, zero stack growth. Fixes sx_build_bytecode and browser-side evaluation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
94 KiB
94 KiB