vm: modify make_vm to take globals directly instead of constructing an empty global table

This commit is contained in:
2026-05-17 19:56:33 +03:00
parent f3da8751a4
commit b05c3ae5f7
+2 -2
View File
@@ -84,8 +84,8 @@ and interpret state =
interpret state)
| NOOP -> interpret state)
let make_vm instrs constants global_count =
let globals = Array.init global_count (fun x -> if x < (Array.length Native.table) then Native x else Nil) in
let make_vm instrs constants globals =
(*let globals = Array.init global_count (fun x -> if x < (Array.length Native.table) then Native x else Nil) in*)
{
i = 0;
instrs = instrs;