diff --git a/include/pocketpy/vm.h b/include/pocketpy/vm.h index ff357d72..76fb6a3c 100644 --- a/include/pocketpy/vm.h +++ b/include/pocketpy/vm.h @@ -166,7 +166,7 @@ public: VM(bool enable_os=true); void set_main_argv(int argc, char** argv); - + void __breakpoint(); void __pop_frame(); @@ -300,7 +300,7 @@ public: PyObject* __minmax_reduce(bool (VM::*op)(PyObject*, PyObject*), PyObject* args, PyObject* key); /***** Error Reporter *****/ - void __raise(bool re_raise=false); + void __raise_exc(bool re_raise=false); void _builtin_error(StrName type); void _builtin_error(StrName type, PyObject* arg); diff --git a/src/ceval.cpp b/src/ceval.cpp index 48e1022b..e99601d4 100644 --- a/src/ceval.cpp +++ b/src/ceval.cpp @@ -87,7 +87,7 @@ PyObject* VM::__run_top_frame(){ while(true){ try{ - if(need_raise){ need_raise = false; __raise(); } + if(need_raise){ need_raise = false; __raise_exc(); } /**********************************************************************/ /* NOTE: * Be aware of accidental gc! @@ -939,7 +939,7 @@ __NEXT_STEP:; _builtin_error("AssertionError"); } DISPATCH(); - case OP_RE_RAISE: __raise(true); DISPATCH(); + case OP_RE_RAISE: __raise_exc(true); DISPATCH(); case OP_POP_EXCEPTION: __last_exception = POPX(); DISPATCH(); /*****************************************/ case OP_FORMAT_STRING: { diff --git a/src/vm.cpp b/src/vm.cpp index a9e9db81..452dc80c 100644 --- a/src/vm.cpp +++ b/src/vm.cpp @@ -1294,10 +1294,10 @@ void VM::_error(PyObject* e_obj){ throw e; } PUSH(e_obj); - __raise(); + __raise_exc(); } -void VM::__raise(bool re_raise){ +void VM::__raise_exc(bool re_raise){ Frame* frame = &callstack.top(); Exception& e = PK_OBJ_GET(Exception, s_data.top()); if(!re_raise){