mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 19:40: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;
|
goto __ERROR;
|
||||||
}
|
}
|
||||||
case OP_LOAD_ATTR: {
|
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);
|
AttributeError(TOP(), byte.arg);
|
||||||
goto __ERROR;
|
goto __ERROR;
|
||||||
}
|
}
|
||||||
@ -320,8 +322,7 @@ pk_FrameResult pk_VM__run_top_frame(pk_VM* self) {
|
|||||||
DISPATCH();
|
DISPATCH();
|
||||||
}
|
}
|
||||||
case OP_STORE_ATTR: {
|
case OP_STORE_ATTR: {
|
||||||
int err = py_setattr(TOP(), byte.arg, SECOND());
|
if(!py_setattr(TOP(), byte.arg, SECOND())) goto __ERROR;
|
||||||
if(err) goto __ERROR;
|
|
||||||
STACK_SHRINK(2);
|
STACK_SHRINK(2);
|
||||||
DISPATCH();
|
DISPATCH();
|
||||||
}
|
}
|
||||||
|
@ -517,12 +517,8 @@ static void mark_object(PyObject* obj) {
|
|||||||
|
|
||||||
if(obj->type == tp_list) {
|
if(obj->type == tp_list) {
|
||||||
pk_list__mark(PyObject__userdata(obj), mark_value);
|
pk_list__mark(PyObject__userdata(obj), mark_value);
|
||||||
return;
|
} else if(obj->type == tp_dict) {
|
||||||
}
|
|
||||||
|
|
||||||
if(obj->type == tp_dict) {
|
|
||||||
pk_dict__mark(PyObject__userdata(obj), mark_value);
|
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) {
|
void pk_print_stack(pk_VM* self, Frame* frame, Bytecode byte) {
|
||||||
return;
|
// return;
|
||||||
|
|
||||||
py_TValue* sp = self->stack.sp;
|
py_TValue* sp = self->stack.sp;
|
||||||
c11_sbuf buf;
|
c11_sbuf buf;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user