Skip to content

Commit 30f0860

Browse files
committed
Fix build error: remove undeclared OP_UNKNOWN and restore OP_END_ACTIVATE
1 parent 90ee4a8 commit 30f0860

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

src/runtime/vm.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,8 @@ static bool resolveContextualMethod(VM* pvm, ObjString* name, Value* result) {
242242

243243
// Helper functions moved to vm_helpers.c to avoid duplication
244244

245-
static InterpretResult run(VM* vm) {
245+
static InterpretResult run(VM* pvm) {
246+
#define vm pvm
246247
CallFrame* frame = &vm->frames[vm->frameCount - 1];
247248

248249
#define READ_BYTE() (*frame->ip++)
@@ -1053,19 +1054,16 @@ static bool resolveContextualMethod(VM* pvm, ObjString* name, Value* result) {
10531054
if (vm->activeContextCount > 0) vm->activeContextCount--;
10541055
DISPATCH();
10551056
}
1056-
1057-
CASE_OP(OP_UNKNOWN) {
1058-
runtimeError(vm, "Unknown opcode %d.", frame->ip[-1]);
1059-
return INTERPRET_RUNTIME_ERROR;
1060-
}
10611057

1058+
// End of opcodes
10621059
#ifndef __GNUC__
10631060
default:
1064-
runtimeError(vm, "Unknown opcode %d.", instruction);
1061+
runtimeError(pvm, "Unknown opcode %d.", instruction);
10651062
return INTERPRET_RUNTIME_ERROR;
10661063
}
10671064
}
10681065
#endif
1066+
#undef vm
10691067

10701068
#undef READ_BYTE
10711069
#undef READ_SHORT

0 commit comments

Comments
 (0)