Skip to content

Commit aa68219

Browse files
committed
# Conflicts: # Assets/Patterns/10. Bytecode/Scripts/VM.cs
2 parents 99a687a + 16fa33b commit aa68219

File tree

1 file changed

+7
-0
lines changed
  • Assets/Patterns/10. Bytecode/Scripts

1 file changed

+7
-0
lines changed

Assets/Patterns/10. Bytecode/Scripts/VM.cs

+7
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,13 @@ public void Interpret(int[] bytecode)
4747
}
4848
case Instruction.INST_LITERAL:
4949
{
50+
////Important that this i++ is not inside bytecode[i++] or it will not jump to next i
51+
//i++;
52+
//int value = bytecode[i];
53+
//Push(value);
54+
55+
//this can be a oneliner
56+
//in this case bytecode will use i+1 bytecode element
5057
Push(bytecode[++i]);
5158

5259
break;

0 commit comments

Comments
 (0)