Removed instruction OP_JUMP_REGISTER

Not necessary when you can just push the relevant word onto the stack
then just do OP_JUMP_STACK.
This commit is contained in:
2023-11-02 20:41:36 +00:00
parent 99b0ebdfa6
commit 114fb82990
5 changed files with 9 additions and 35 deletions

View File

@@ -145,7 +145,6 @@ typedef enum
// Program control flow
OP_JUMP_ABS,
OP_JUMP_STACK,
OP_JUMP_REGISTER,
OP_JUMP_IF_BYTE,
OP_JUMP_IF_HWORD,
OP_JUMP_IF_WORD,
@@ -230,8 +229,6 @@ inst_t *insts_read_bytecode_file(FILE *, size_t *);
#define INST_JUMP_ABS(OP) \
((inst_t){.opcode = OP_JUMP_ABS, .operand = DWORD(OP)})
#define INST_JUMP_STACK ((inst_t){.opcode = OP_JUMP_STACK})
#define INST_JUMP_REGISTER(OP) \
((inst_t){.opcode = OP_JUMP_REGISTER, .operand = DWORD(OP)})
#define INST_JUMP_IF(TYPE, OP) \
((inst_t){.opcode = OP_JUMP_IF_##TYPE, .operand = DWORD(OP)})