This commit is contained in:
blueloveTH 2024-05-18 22:13:14 +08:00
parent 41aae44f21
commit 39dd1a8e21
2 changed files with 8 additions and 7 deletions

View File

@ -1,5 +1,5 @@
SRC=$(find src/ -name "*.cpp")
FLAGS="-std=c++17 -O0 -stdlib=libc++ -Iinclude -frtti -Wfatal-errors -g"
FLAGS="-std=c++17 -O2 -stdlib=libc++ -Iinclude -frtti -Wfatal-errors -g"
clang++ $FLAGS -o main src2/main.cpp $SRC

View File

@ -107,15 +107,16 @@ PyVar VM::__run_top_frame(){
if(_ceval_on_step) _ceval_on_step(this, frame, byte);
#endif
__NEXT_FRAME:
// cache
const CodeObject* co = frame->co;
Bytecode byte = frame->next_bytecode();
CEVAL_STEP_CALLBACK();
#define DISPATCH() goto __NEXT_STEP;
#define DISPATCH() { byte = frame->next_bytecode(); CEVAL_STEP_CALLBACK(); goto __NEXT_STEP; }
__NEXT_FRAME:
const CodeObject* co = frame->co;
Bytecode byte;
__NEXT_STEP:;
byte = frame->next_bytecode();
CEVAL_STEP_CALLBACK();
#if PK_DEBUG_CEVAL_STEP
__log_s_data();
#endif