From b1183af95f45ba0162a91f7a308a4846418f03be Mon Sep 17 00:00:00 2001 From: Ben Winston Date: Sun, 21 May 2023 13:57:41 -0400 Subject: move to using 2 stacks --- dbg.d | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'dbg.d') diff --git a/dbg.d b/dbg.d index 18526db..89ae8c1 100644 --- a/dbg.d +++ b/dbg.d @@ -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: -- cgit v1.2.3