Fix get nil-safety in sx_runtime.ml + reduce VM failure log noise
The second get implementation in sx_runtime.ml (used by transpiled code) was still raising on type mismatches. Now returns nil like sx_primitives. Remove per-call [vm-call-closure] FAIL logging — the jit-hook already logs failures at the right level. Reduces 70K log lines to ~5. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -381,13 +381,7 @@ and call_closure cl args globals =
|
||||
List.iter (fun a -> push vm a) args;
|
||||
for _ = List.length args to cl.vm_code.vc_locals - 1 do push vm Nil done;
|
||||
vm.frames <- [frame];
|
||||
(try run vm
|
||||
with e ->
|
||||
Printf.eprintf "[vm-call-closure] FAIL in %s: %s (bc_len=%d args=%d sp=%d)\n%!"
|
||||
(match cl.vm_name with Some n -> n | None -> "?")
|
||||
(Printexc.to_string e)
|
||||
(Array.length cl.vm_code.vc_bytecode) (List.length args) vm.sp;
|
||||
raise e);
|
||||
(try run vm with e -> raise e);
|
||||
pop vm
|
||||
|
||||
(** Execute a compiled module (top-level bytecode). *)
|
||||
|
||||
Reference in New Issue
Block a user