mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-22 04:20:17 +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)
|
||||
: _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++;
|
||||
PK_DEBUG_ASSERT(_ip >= 0 && _ip < co->codes.size());
|
||||
return co->codes[_ip];
|
||||
return _ip;
|
||||
}
|
||||
|
||||
PyVar* actual_sp_base() const { return _locals.a; }
|
||||
|
@ -111,10 +111,11 @@ PyVar VM::__run_top_frame(){
|
||||
|
||||
__NEXT_FRAME:
|
||||
const CodeObject* co = frame->co;
|
||||
const Bytecode* co_codes = co->codes.data();
|
||||
Bytecode byte;
|
||||
|
||||
__NEXT_STEP:;
|
||||
byte = frame->next_bytecode();
|
||||
byte = co_codes[frame->next_bytecode()];
|
||||
CEVAL_STEP_CALLBACK();
|
||||
|
||||
#if PK_DEBUG_CEVAL_STEP
|
||||
|
Loading…
x
Reference in New Issue
Block a user