修复双次打印bug

This commit is contained in:
Luke 2025-05-11 00:17:13 +08:00
parent 07c040b40d
commit 50fbc40039
2 changed files with 5 additions and 6 deletions

View File

@ -118,8 +118,7 @@ public class VirtualMachineEngine {
rootLvs.compact(); // trim leading / trailing null slots
}
printStack();
printLocalVariables();
}
/* ---------- Helper: ensure root frame ---------- */

8
test
View File

@ -6,9 +6,9 @@ module: CommonTasks
return_type:int
body:
num1 = 10
num2=1
return num1 + CommonTasks.test(2)
num1 = 1
num2=2
return num1 + CommonTasks.test(3)
end body
end function
@ -18,7 +18,7 @@ module: CommonTasks
return_type:int
body:
declare result : int
declare num2: int =1
declare num2: int =4
result = num2 + num1
return result
end body