22 JIT closure scoping tests covering: - Basic closure var in map callback + context switch - Signal + letrec + map (stepper pattern) - Nested closures (inner lambda sees outer let var) - Mutual recursion in letrec (is-even/is-odd) - set! mutation of closure var after JIT compilation - defisland with signal + letrec + map - Deep nesting (for-each inside map inside letrec inside let) All test the critical invariant: JIT-compiled lambdas must use their closure's vm_env_ref, not the caller's globals. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
31 KiB
31 KiB