More performant OP_GETOBJECT & OP_SETOBJECT

constant indexes are now embedded in the instruction
This commit is contained in:
2021-01-07 17:19:17 -06:00
parent ea4654cb6e
commit c5bd0c2478
5 changed files with 26 additions and 24 deletions

View File

@@ -127,9 +127,9 @@ int disasmInstr(CChunk *chunk, int offset, int indent) {
case OP_NEWOBJECT:
return u16OperandInstruction("OP_NEWOBJECT", chunk, offset);
case OP_GETOBJECT:
return simpleInstruction("OP_GETOBJECT", offset);
return constInstruction("OP_GETOBJECT", chunk, offset);
case OP_SETOBJECT:
return simpleInstruction("OP_SETOBJECT", offset);
return constInstruction("OP_SETOBJECT", chunk, offset);
case OP_INVOKE:
return u8u8OperandInstruction("OP_INVOKE", chunk, offset);
case OP_ITER: