GC_BENCH_INC(zval_possible_root);
if (GC_ZVAL_GET_COLOR(zv) != GC_PURPLE) {
- GC_ZVAL_SET_PURPLE(zv);
-
if (!GC_ZVAL_ADDRESS(zv)) {
gc_root_buffer *newRoot = GC_G(unused);
GC_G(first_unused)++;
} else {
if (!GC_G(gc_enabled)) {
- GC_ZVAL_SET_BLACK(zv);
return;
}
zv->refcount__gc++;
if (!newRoot) {
return;
}
- GC_ZVAL_SET_PURPLE(zv);
GC_G(unused) = newRoot->prev;
}
+ GC_ZVAL_SET_PURPLE(zv);
newRoot->next = GC_G(roots).next;
newRoot->prev = &GC_G(roots);
GC_G(roots).next->prev = newRoot;
obj = &EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(zv)].bucket.obj;
if (GC_GET_COLOR(obj->buffered) != GC_PURPLE) {
- GC_SET_PURPLE(obj->buffered);
if (!GC_ADDRESS(obj->buffered)) {
gc_root_buffer *newRoot = GC_G(unused);
GC_G(first_unused)++;
} else {
if (!GC_G(gc_enabled)) {
- GC_ZVAL_SET_BLACK(zv);
return;
}
zv->refcount__gc++;
return;
}
obj = &EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(zv)].bucket.obj;
- GC_SET_PURPLE(obj->buffered);
GC_G(unused) = newRoot->prev;
}
+ GC_SET_PURPLE(obj->buffered);
newRoot->next = GC_G(roots).next;
newRoot->prev = &GC_G(roots);
GC_G(roots).next->prev = newRoot;