floor(0)=-1 bug fixed + 12/12 adapter compiles + primitives
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -246,7 +246,12 @@ let rec run vm =
|
||||
let args = List.init argc (fun _ -> pop vm) |> List.rev in
|
||||
let result =
|
||||
try
|
||||
(match Sx_primitives.get_primitive name with
|
||||
(* Check globals first (has env bindings like set-render-active!),
|
||||
then fall back to registered primitives *)
|
||||
let fn_val = try Hashtbl.find vm.globals name with Not_found ->
|
||||
Sx_primitives.get_primitive name
|
||||
in
|
||||
(match fn_val with
|
||||
| NativeFn (_, fn) -> fn args
|
||||
| _ -> Nil)
|
||||
with Eval_error msg ->
|
||||
|
||||
Reference in New Issue
Block a user