compile-quasiquote, compile-defcomp, compile-defmacro were hardcoding CALL_PRIM for runtime functions (qq-expand-runtime, eval-defcomp, eval-defmacro) that aren't in the primitives table. Changed to GLOBAL_GET + CALL so the VM resolves them from env.bindings at runtime. The compile-call function already checks (primitive? name) before emitting CALL_PRIM — only the three special-case compilers were wrong. Also: register scope-push!/pop! as primitives, add scope-peek/emit! to OCaml transpiler name mapping, fix sx_runtime.ml scope wrappers to route through prim_call "scope-push!" etc. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
25 KiB
25 KiB