vm: added noop instruction, various other improvements

This commit is contained in:
2026-04-25 20:43:55 +03:00
parent 2822774931
commit fe3ad80826
2 changed files with 3 additions and 1 deletions
+1
View File
@@ -25,6 +25,7 @@ type instr =
| Jump of int
| JumpF of int (* jump if false. *)
| End
| NOOP
type vm_state = {
mutable i : int;
+2 -1
View File
@@ -57,5 +57,6 @@ and interpret state =
(match (pop_one state) with
| Nil -> state.i <- target
| _ -> ()); interpret state
| End -> ())
| End -> ()
| NOOP -> interpret state)