VM global_env sync + isomorphic nav store primitives
Reverse hook syncs VM GLOBAL_SET mutations back to global_env so CEK reads see JIT-written values. Isomorphic nav: store primitives, event-bridge, client? predicate. Browser JS and bytecode rebuilt. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -223,6 +223,13 @@ let () =
|
||||
if env == global_env then
|
||||
Hashtbl.replace _vm_globals name v)
|
||||
|
||||
(* Reverse hook: sync VM GLOBAL_SET mutations back to global_env.
|
||||
Without this, set! inside JIT-compiled functions writes to _vm_globals
|
||||
but leaves global_env stale — CEK reads then see the old value. *)
|
||||
let () =
|
||||
Sx_types._vm_global_set_hook := Some (fun name v ->
|
||||
Hashtbl.replace global_env.bindings (Sx_types.intern name) v)
|
||||
|
||||
(* ================================================================== *)
|
||||
(* Core API *)
|
||||
(* ================================================================== *)
|
||||
|
||||
Reference in New Issue
Block a user