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:
2026-03-28 15:20:12 +00:00
parent 153f02c672
commit 90918fb2b1
10 changed files with 47 additions and 447 deletions

View File

@@ -303,7 +303,11 @@ and run vm =
in find_env env
| None -> false
in
if not written then Hashtbl.replace vm.globals name (peek vm)
if not written then begin
let v = peek vm in
Hashtbl.replace vm.globals name v;
(match !Sx_types._vm_global_set_hook with Some f -> f name v | None -> ())
end
(* ---- Control flow ---- *)
| 32 (* OP_JUMP *) ->