diff options
| author | Ben Winston | 2023-05-21 13:57:41 -0400 |
|---|---|---|
| committer | Ben Winston | 2023-05-21 13:57:41 -0400 |
| commit | b1183af95f45ba0162a91f7a308a4846418f03be (patch) | |
| tree | 0b01bbb21d733014b01ff8afc99f986c478822a7 /dbg.d | |
| parent | 2ad2be250a68e907b308b120b934edcbfc99ae6e (diff) | |
move to using 2 stacks
Diffstat (limited to 'dbg.d')
| -rw-r--r-- | dbg.d | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -107,6 +107,8 @@ int disassemble(Chunk chunk, int offset) { ubyte inst = chunk.code[offset]; switch (inst) { + case OpCode.OP_DEF_LOCAL: + return byteInstruction("OP_DEF_LOCAL", chunk, offset); case OpCode.OP_GET_LOCAL: return byteInstruction("OP_GET_LOCAL", chunk, offset); case OpCode.OP_SET_LOCAL: @@ -119,12 +121,14 @@ int disassemble(Chunk chunk, int offset) { return simpleInstruction("OP_SUBTRACT", offset); case OpCode.OP_CONSTANT: return constantInstruction("OP_CONSTANT", chunk, offset); - case OpCode.OP_DEFINE_GLOBAL: - return constantInstruction("OP_DEFINE_GLOBAL", chunk, offset); + case OpCode.OP_DEF_GLOBAL: + return constantInstruction("OP_DEF_GLOBAL", chunk, offset); case OpCode.OP_NEGATE: return simpleInstruction("OP_NEGATE", offset); case OpCode.OP_POP: return simpleInstruction("OP_POP", offset); + case OpCode.OP_POPB: + return simpleInstruction("OP_POPB", offset); case OpCode.OP_POP_SCOPE: return simpleInstruction("OP_POP_SCOPE", offset); case OpCode.OP_RETURN: |
