diff --git a/hosts/ocaml/lib/sx_vm.ml b/hosts/ocaml/lib/sx_vm.ml index ef0344af..bfe523f7 100644 --- a/hosts/ocaml/lib/sx_vm.ml +++ b/hosts/ocaml/lib/sx_vm.ml @@ -575,13 +575,7 @@ let jit_compile_lambda (l : lambda) globals = let param_syms = List (List.map (fun s -> Symbol s) l.l_params) in let fn_expr = List [Symbol "fn"; param_syms; l.l_body] in let quoted = List [Symbol "quote"; fn_expr] in - let result = match compile_fn with - | VmClosure cl -> - (* Compiler loaded as bytecode — call through VM directly *) - call_closure cl [quoted] globals - | _ -> - (* Compiler loaded from source — call through CEK *) - Sx_ref.eval_expr (List [compile_fn; quoted]) (Env (make_env ())) in + let result = Sx_ref.eval_expr (List [compile_fn; quoted]) (Env (make_env ())) in (* Inject closure bindings into globals so GLOBAL_GET can find them. Only injects values not already present in globals (preserves existing defines). Mutable closure vars get stale snapshots here