mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-21 03:50:16 +00:00
Update ceval.h
This commit is contained in:
parent
518a796847
commit
205fedd053
@ -30,6 +30,7 @@ inline PyObject* VM::_run_top_frame(){
|
|||||||
const CodeObject* co = frame->co;
|
const CodeObject* co = frame->co;
|
||||||
const std::vector<StrName>& co_names = co->names;
|
const std::vector<StrName>& co_names = co->names;
|
||||||
const List& co_consts = co->consts;
|
const List& co_consts = co->consts;
|
||||||
|
const std::vector<CodeBlock>& co_blocks = co->blocks;
|
||||||
|
|
||||||
#if PK_ENABLE_COMPUTED_GOTO
|
#if PK_ENABLE_COMPUTED_GOTO
|
||||||
static void* OP_LABELS[] = {
|
static void* OP_LABELS[] = {
|
||||||
@ -305,11 +306,11 @@ __NEXT_STEP:;
|
|||||||
else frame->pop();
|
else frame->pop();
|
||||||
DISPATCH();
|
DISPATCH();
|
||||||
TARGET(LOOP_CONTINUE) {
|
TARGET(LOOP_CONTINUE) {
|
||||||
int target = co->blocks[byte.block].start;
|
int target = co_blocks[byte.block].start;
|
||||||
frame->jump_abs(target);
|
frame->jump_abs(target);
|
||||||
} DISPATCH();
|
} DISPATCH();
|
||||||
TARGET(LOOP_BREAK) {
|
TARGET(LOOP_BREAK) {
|
||||||
int target = co->blocks[byte.block].end;
|
int target = co_blocks[byte.block].end;
|
||||||
frame->jump_abs_break(target);
|
frame->jump_abs_break(target);
|
||||||
} DISPATCH();
|
} DISPATCH();
|
||||||
TARGET(GOTO) {
|
TARGET(GOTO) {
|
||||||
@ -388,7 +389,7 @@ __NEXT_STEP:;
|
|||||||
if(obj != nullptr){
|
if(obj != nullptr){
|
||||||
frame->push(obj);
|
frame->push(obj);
|
||||||
}else{
|
}else{
|
||||||
int target = co->blocks[byte.block].end;
|
int target = co_blocks[byte.block].end;
|
||||||
frame->jump_abs_break(target);
|
frame->jump_abs_break(target);
|
||||||
}
|
}
|
||||||
} DISPATCH();
|
} DISPATCH();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user