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:
@@ -50,7 +50,12 @@ let sx_call f args =
|
||||
Thunk (l.l_body, local)
|
||||
| Continuation (k, _) ->
|
||||
k (match args with x :: _ -> x | [] -> Nil)
|
||||
| _ -> raise (Eval_error ("Not callable: " ^ inspect f))
|
||||
| _ ->
|
||||
let nargs = List.length args in
|
||||
let args_preview = if nargs = 0 then "" else
|
||||
let s = String.concat ", " (List.map (fun a -> let s = inspect a in if String.length s > 40 then String.sub s 0 40 ^ ".." else s) args) in
|
||||
" with args=[" ^ s ^ "]" in
|
||||
raise (Eval_error ("Not callable: " ^ inspect f ^ args_preview))
|
||||
|
||||
(* Initialize forward ref so primitives can call SX functions *)
|
||||
let () = Sx_primitives._sx_call_fn := sx_call
|
||||
|
||||
Reference in New Issue
Block a user