mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 11:30:18 +00:00
some refactor
This commit is contained in:
parent
fd12deeec3
commit
beec29d0c3
@ -166,18 +166,9 @@ public:
|
|||||||
VM(bool enable_os=true);
|
VM(bool enable_os=true);
|
||||||
|
|
||||||
void set_main_argv(int argc, char** argv);
|
void set_main_argv(int argc, char** argv);
|
||||||
|
|
||||||
void __breakpoint();
|
void __breakpoint();
|
||||||
|
void __pop_frame();
|
||||||
void __pop_frame(){
|
|
||||||
s_data.reset(callstack.top()._sp_base);
|
|
||||||
callstack.pop();
|
|
||||||
|
|
||||||
#if PK_ENABLE_PROFILER
|
|
||||||
if(!_next_breakpoint.empty() && callstack.size()<_next_breakpoint.callstack_size){
|
|
||||||
_next_breakpoint = NextBreakpoint();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
PyObject* py_str(PyObject* obj);
|
PyObject* py_str(PyObject* obj);
|
||||||
PyObject* py_repr(PyObject* obj);
|
PyObject* py_repr(PyObject* obj);
|
||||||
|
11
src/vm.cpp
11
src/vm.cpp
@ -1513,6 +1513,17 @@ void NextBreakpoint::_step(VM* vm){
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void VM::__pop_frame(){
|
||||||
|
s_data.reset(callstack.top()._sp_base);
|
||||||
|
callstack.pop();
|
||||||
|
|
||||||
|
#if PK_ENABLE_PROFILER
|
||||||
|
if(!_next_breakpoint.empty() && callstack.size()<_next_breakpoint.callstack_size){
|
||||||
|
_next_breakpoint = NextBreakpoint();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
void VM::__breakpoint(){
|
void VM::__breakpoint(){
|
||||||
#if PK_ENABLE_PROFILER
|
#if PK_ENABLE_PROFILER
|
||||||
_next_breakpoint = NextBreakpoint();
|
_next_breakpoint = NextBreakpoint();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user