compiler: modify the Emit module to actually produce a vm_state object directly executable by the VM
ci/woodpecker/push/debian Pipeline was successful
ci/woodpecker/push/fedora Pipeline was successful
ci/woodpecker/push/publish Pipeline was successful
ci/woodpecker/push/nix Pipeline was successful

This commit is contained in:
2026-04-25 21:04:49 +03:00
parent 2b02740e68
commit 4716c71b15
2 changed files with 21 additions and 1 deletions
+11
View File
@@ -36,4 +36,15 @@ type vm_state = {
mutable stack : value list
}
let make_vm instrs constants global_count =
{
i = 0;
instrs = instrs;
globals = Array.make global_count Nil;
constants = constants;
env = [];
stack = [];
}
(* TODO: add facilities to print the VM state in case of errors. *)