mirror of
https://github.com/pocketpy/pocketpy
synced 2026-05-08 11:13:37 +00:00
Update ceval.c
This commit is contained in:
parent
811755f924
commit
fbc157a41c
@ -539,11 +539,15 @@ __NEXT_STEP:
|
|||||||
DISPATCH();
|
DISPATCH();
|
||||||
}
|
}
|
||||||
case OP_BUILD_TUPLE: {
|
case OP_BUILD_TUPLE: {
|
||||||
|
bool need_track = false;
|
||||||
py_TValue tmp;
|
py_TValue tmp;
|
||||||
py_Ref p = py_newtuple(&tmp, byte.arg);
|
py_Ref p = py_newtuple(&tmp, byte.arg);
|
||||||
py_TValue* begin = SP() - byte.arg;
|
py_TValue* begin = SP() - byte.arg;
|
||||||
for(int i = 0; i < byte.arg; i++)
|
for(int i = 0; i < byte.arg; i++) {
|
||||||
p[i] = begin[i];
|
p[i] = begin[i];
|
||||||
|
if(p[i].is_ptr) need_track = true;
|
||||||
|
}
|
||||||
|
if(!need_track) tmp._obj->gc_marked |= 0b10;
|
||||||
SP() = begin;
|
SP() = begin;
|
||||||
PUSH(&tmp);
|
PUSH(&tmp);
|
||||||
DISPATCH();
|
DISPATCH();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user