mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-22 20:40:18 +00:00
some fix
This commit is contained in:
parent
39dd1a8e21
commit
49379b177a
@ -94,10 +94,10 @@ struct Frame {
|
|||||||
Frame(PyVar* p0, const CodeObject_& co, PyVar _module)
|
Frame(PyVar* p0, const CodeObject_& co, PyVar _module)
|
||||||
: _ip(-1), _next_ip(0), _sp_base(p0), co(co.get()), _module(_module), _callable(nullptr), _locals(co.get(), p0) {}
|
: _ip(-1), _next_ip(0), _sp_base(p0), co(co.get()), _module(_module), _callable(nullptr), _locals(co.get(), p0) {}
|
||||||
|
|
||||||
Bytecode next_bytecode() {
|
int next_bytecode() {
|
||||||
_ip = _next_ip++;
|
_ip = _next_ip++;
|
||||||
PK_DEBUG_ASSERT(_ip >= 0 && _ip < co->codes.size());
|
PK_DEBUG_ASSERT(_ip >= 0 && _ip < co->codes.size());
|
||||||
return co->codes[_ip];
|
return _ip;
|
||||||
}
|
}
|
||||||
|
|
||||||
PyVar* actual_sp_base() const { return _locals.a; }
|
PyVar* actual_sp_base() const { return _locals.a; }
|
||||||
|
@ -111,10 +111,11 @@ PyVar VM::__run_top_frame(){
|
|||||||
|
|
||||||
__NEXT_FRAME:
|
__NEXT_FRAME:
|
||||||
const CodeObject* co = frame->co;
|
const CodeObject* co = frame->co;
|
||||||
|
const Bytecode* co_codes = co->codes.data();
|
||||||
Bytecode byte;
|
Bytecode byte;
|
||||||
|
|
||||||
__NEXT_STEP:;
|
__NEXT_STEP:;
|
||||||
byte = frame->next_bytecode();
|
byte = co_codes[frame->next_bytecode()];
|
||||||
CEVAL_STEP_CALLBACK();
|
CEVAL_STEP_CALLBACK();
|
||||||
|
|
||||||
#if PK_DEBUG_CEVAL_STEP
|
#if PK_DEBUG_CEVAL_STEP
|
||||||
|
Loading…
x
Reference in New Issue
Block a user