Add RET and ARG instruct for VM

This commit is contained in:
lyon1998 2021-10-29 10:05:33 +08:00
parent 85bfc2c9d8
commit 5b2b2c987b

View File

@ -149,6 +149,12 @@ Arg* pikaVM_runAsmInstruct(PikaObj* self,
}
if (instruct == JMP) {
*jmp = fast_atoi(data);
return NULL;
}
if (instruct == RET) {
*jmp = -999;
Arg* returnArg = arg_copy(queue_popArg(invokeQuene0));
return returnArg;
}
if (instruct == JEZ) {
Arg* assertArg = arg_copy(queue_popArg(invokeQuene0));