From ea3e64ec8c493f13b25d3b8c33febbdcd15839b1 Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Sun, 19 May 2024 17:06:37 +0800 Subject: [PATCH] some fix --- include/pocketpy/vm.h | 1 - src/ceval.cpp | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/pocketpy/vm.h b/include/pocketpy/vm.h index a13931ce..ed6d6d52 100644 --- a/include/pocketpy/vm.h +++ b/include/pocketpy/vm.h @@ -157,7 +157,6 @@ public: std::map __cached_codes; std::map __cached_op_funcs; FuncDecl_ __dynamic_func_decl; - InternalException __internal_exception; PyVar __vectorcall_buffer[PK_MAX_CO_VARNAMES]; #if PK_ENABLE_PROFILER diff --git a/src/ceval.cpp b/src/ceval.cpp index a730226c..7cbedd92 100644 --- a/src/ceval.cpp +++ b/src/ceval.cpp @@ -100,6 +100,7 @@ bool VM::py_ge(PyVar _0, PyVar _1){ PyVar VM::__run_top_frame(){ Frame* frame = &callstack.top(); const Frame* base_frame = frame; + InternalException __internal_exception; while(true){ try{ @@ -1023,7 +1024,7 @@ __NEXT_STEP: /**********************************************************************/ PK_UNREACHABLE(); }catch(InternalException internal){ - this->__internal_exception = internal; + __internal_exception = internal; if(internal.type == InternalExceptionType::Unhandled){ PyVar e_obj = POPX(); Exception& _e = PK_OBJ_GET(Exception, e_obj);