vm-global-get checked vm.globals before closure-env, while vm-global-set wrote to closure-env first. This asymmetry meant set! mutations to mutable closure variables (e.g. parser position counters) were invisible to sibling closures reading via JIT — they saw stale snapshots in the globals table. Reversed vm-global-get lookup order: closure env → globals → primitives, matching vm-global-set. Also enabled JIT in the MCP harness (compiler.sx loading, env_bind hook for live globals sync, jit_try_call hook) so sx_harness_eval exercises the same code path as the server. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
21 KiB
21 KiB