This commit is contained in:
2026-05-08 20:36:21 -05:00
parent 04b9821662
commit 27164aaac3

View File

@@ -249,6 +249,7 @@ do
@x1: @x1:
pushi 1 pushi 1
bnz @x2 bnz @x2
pushi 1
bz @x3 bz @x3
@x2: @x2:
pushi 6 pushi 6
@@ -263,22 +264,6 @@ end
do do
TEST "VM: jumps (bz)" TEST "VM: jumps (bz)"
pprint(assemble [[
.func 0
jmp @x1
pushi 5
@x1:
pushi 0
bnz @x2
pushi 0
bz @x3
@x2:
pushi 6
ret
@x3:
pushi 7
ret
]])
local vm = VM.new():set_debug(true):load(assemble [[ local vm = VM.new():set_debug(true):load(assemble [[
.func 0 .func 0
jmp @x1 jmp @x1
@@ -286,6 +271,7 @@ do
@x1: @x1:
pushi 0 pushi 0
bnz @x2 bnz @x2
pushi 0
bz @x3 bz @x3
@x2: @x2:
pushi 6 pushi 6