From 205fedd053b4d317f33eef1c4b7046f3312bd3b6 Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Tue, 11 Apr 2023 12:50:44 +0800 Subject: [PATCH] Update ceval.h --- src/ceval.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ceval.h b/src/ceval.h index d7260f58..2785b164 100644 --- a/src/ceval.h +++ b/src/ceval.h @@ -30,6 +30,7 @@ inline PyObject* VM::_run_top_frame(){ const CodeObject* co = frame->co; const std::vector& co_names = co->names; const List& co_consts = co->consts; + const std::vector& co_blocks = co->blocks; #if PK_ENABLE_COMPUTED_GOTO static void* OP_LABELS[] = { @@ -305,11 +306,11 @@ __NEXT_STEP:; else frame->pop(); DISPATCH(); TARGET(LOOP_CONTINUE) { - int target = co->blocks[byte.block].start; + int target = co_blocks[byte.block].start; frame->jump_abs(target); } DISPATCH(); TARGET(LOOP_BREAK) { - int target = co->blocks[byte.block].end; + int target = co_blocks[byte.block].end; frame->jump_abs_break(target); } DISPATCH(); TARGET(GOTO) { @@ -388,7 +389,7 @@ __NEXT_STEP:; if(obj != nullptr){ frame->push(obj); }else{ - int target = co->blocks[byte.block].end; + int target = co_blocks[byte.block].end; frame->jump_abs_break(target); } } DISPATCH();