mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 03:20:18 +00:00
...
This commit is contained in:
parent
51e2433404
commit
31d095e3cc
@ -231,7 +231,9 @@ pk_FrameResult pk_VM__run_top_frame(pk_VM* self) {
|
||||
goto __ERROR;
|
||||
}
|
||||
case OP_LOAD_ATTR: {
|
||||
if(!py_getattr(TOP(), byte.arg, TOP())) {
|
||||
int res = py_getattr(TOP(), byte.arg, TOP());
|
||||
if(res == -1) goto __ERROR;
|
||||
if(!res) {
|
||||
AttributeError(TOP(), byte.arg);
|
||||
goto __ERROR;
|
||||
}
|
||||
@ -320,8 +322,7 @@ pk_FrameResult pk_VM__run_top_frame(pk_VM* self) {
|
||||
DISPATCH();
|
||||
}
|
||||
case OP_STORE_ATTR: {
|
||||
int err = py_setattr(TOP(), byte.arg, SECOND());
|
||||
if(err) goto __ERROR;
|
||||
if(!py_setattr(TOP(), byte.arg, SECOND())) goto __ERROR;
|
||||
STACK_SHRINK(2);
|
||||
DISPATCH();
|
||||
}
|
||||
|
@ -517,12 +517,8 @@ static void mark_object(PyObject* obj) {
|
||||
|
||||
if(obj->type == tp_list) {
|
||||
pk_list__mark(PyObject__userdata(obj), mark_value);
|
||||
return;
|
||||
}
|
||||
|
||||
if(obj->type == tp_dict) {
|
||||
} else if(obj->type == tp_dict) {
|
||||
pk_dict__mark(PyObject__userdata(obj), mark_value);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@ -551,7 +547,7 @@ void pk_ManagedHeap__mark(pk_ManagedHeap* self) {
|
||||
}
|
||||
|
||||
void pk_print_stack(pk_VM* self, Frame* frame, Bytecode byte) {
|
||||
return;
|
||||
// return;
|
||||
|
||||
py_TValue* sp = self->stack.sp;
|
||||
c11_sbuf buf;
|
||||
|
Loading…
x
Reference in New Issue
Block a user