mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-15 17:02:53 +08:00
ready to support static jmp
This commit is contained in:
parent
6ac37003d3
commit
2aec277fc3
27
src/PikaVM.c
27
src/PikaVM.c
@ -827,22 +827,19 @@ nextLine:
|
||||
if (-999 == vs->jmp) {
|
||||
return -99999;
|
||||
}
|
||||
// /* break or continue */
|
||||
// if ((-998 == vs->jmp) || (-997 == vs->jmp)) {
|
||||
// int32_t loop_end_addr = __getAddrOffsetOfJUM(vs->pc);
|
||||
// /* break */
|
||||
// if (-998 == vs->jmp) {
|
||||
// loop_end_addr += __gotoNextLine(vs->pc + loop_end_addr);
|
||||
// return lineAddr + loop_end_addr;
|
||||
// }
|
||||
// if (-997 == vs->jmp) {
|
||||
// loop_end_addr += __gotoLastLine(pikaAsm, vs.pc + loop_end_addr);
|
||||
// return lineAddr + loop_end_addr;
|
||||
// }
|
||||
// }
|
||||
// if (vs.jmp != 0) {
|
||||
// return lineAddr + VMState_getAddrOffsetFromJmp(pikaAsm, vs.pc, vs.jmp);
|
||||
/* break */
|
||||
if (-998 == vs->jmp) {
|
||||
return vs->pc_i + VMState_getAddrOffsetOfBreak(vs);
|
||||
}
|
||||
/* continue */
|
||||
if (-997 == vs->jmp) {
|
||||
return vs->pc_i + VMState_getAddrOffsetOfContinue(vs);
|
||||
}
|
||||
// /* static jmp */
|
||||
// if (vs->jmp != 0) {
|
||||
// return vs->pc_i + VMState_getAddrOffsetFromJmp(vs);
|
||||
// }
|
||||
/* not jmp */
|
||||
return vs->pc_i + sizeof(InstructUnit);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user