Lines Matching refs:pz

184 			newRoot->u.pz = zv;  in gc_zval_possible_root()
269 static void zval_scan_black(zval *pz TSRMLS_DC) in zval_scan_black()
275 GC_ZVAL_SET_BLACK(pz); in zval_scan_black()
277 if (Z_TYPE_P(pz) == IS_OBJECT && EG(objects_store).object_buckets) { in zval_scan_black()
279 struct _store_object *obj = &EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].bucket.obj; in zval_scan_black()
284 if (EXPECTED(EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].valid && in zval_scan_black()
285 (get_gc = Z_OBJ_HANDLER_P(pz, get_gc)) != NULL)) { in zval_scan_black()
288 HashTable *props = get_gc(pz, &table, &n TSRMLS_CC); in zval_scan_black()
293 pz = table[i]; in zval_scan_black()
294 if (Z_TYPE_P(pz) != IS_ARRAY || Z_ARRVAL_P(pz) != &EG(symbol_table)) { in zval_scan_black()
295 pz->refcount__gc++; in zval_scan_black()
297 if (GC_ZVAL_GET_COLOR(pz) != GC_BLACK) { in zval_scan_black()
301 zval_scan_black(pz TSRMLS_CC); in zval_scan_black()
312 } else if (Z_TYPE_P(pz) == IS_ARRAY) { in zval_scan_black()
313 if (Z_ARRVAL_P(pz) != &EG(symbol_table)) { in zval_scan_black()
314 p = Z_ARRVAL_P(pz)->pListHead; in zval_scan_black()
318 pz = *(zval**)p->pData; in zval_scan_black()
319 if (Z_TYPE_P(pz) != IS_ARRAY || Z_ARRVAL_P(pz) != &EG(symbol_table)) { in zval_scan_black()
320 pz->refcount__gc++; in zval_scan_black()
322 if (GC_ZVAL_GET_COLOR(pz) != GC_BLACK) { in zval_scan_black()
326 zval_scan_black(pz TSRMLS_CC); in zval_scan_black()
333 static void zobj_scan_black(struct _store_object *obj, zval *pz TSRMLS_DC) in zobj_scan_black()
339 if (EXPECTED(EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].valid && in zobj_scan_black()
340 (get_gc = Z_OBJ_HANDLER_P(pz, get_gc)) != NULL)) { in zobj_scan_black()
343 HashTable *props = get_gc(pz, &table, &n TSRMLS_CC); in zobj_scan_black()
347 pz = table[i]; in zobj_scan_black()
348 if (Z_TYPE_P(pz) != IS_ARRAY || Z_ARRVAL_P(pz) != &EG(symbol_table)) { in zobj_scan_black()
349 pz->refcount__gc++; in zobj_scan_black()
351 if (GC_ZVAL_GET_COLOR(pz) != GC_BLACK) { in zobj_scan_black()
352 zval_scan_black(pz TSRMLS_CC); in zobj_scan_black()
361 pz = *(zval**)p->pData; in zobj_scan_black()
362 if (Z_TYPE_P(pz) != IS_ARRAY || Z_ARRVAL_P(pz) != &EG(symbol_table)) { in zobj_scan_black()
363 pz->refcount__gc++; in zobj_scan_black()
365 if (GC_ZVAL_GET_COLOR(pz) != GC_BLACK) { in zobj_scan_black()
366 zval_scan_black(pz TSRMLS_CC); in zobj_scan_black()
373 static void zval_mark_grey(zval *pz TSRMLS_DC) in zval_mark_grey()
378 if (GC_ZVAL_GET_COLOR(pz) != GC_GREY) { in zval_mark_grey()
381 GC_ZVAL_SET_COLOR(pz, GC_GREY); in zval_mark_grey()
383 if (Z_TYPE_P(pz) == IS_OBJECT && EG(objects_store).object_buckets) { in zval_mark_grey()
385 struct _store_object *obj = &EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].bucket.obj; in zval_mark_grey()
391 if (EXPECTED(EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].valid && in zval_mark_grey()
392 (get_gc = Z_OBJ_HANDLER_P(pz, get_gc)) != NULL)) { in zval_mark_grey()
395 HashTable *props = get_gc(pz, &table, &n TSRMLS_CC); in zval_mark_grey()
400 pz = table[i]; in zval_mark_grey()
401 if (Z_TYPE_P(pz) != IS_ARRAY || Z_ARRVAL_P(pz) != &EG(symbol_table)) { in zval_mark_grey()
402 pz->refcount__gc--; in zval_mark_grey()
407 zval_mark_grey(pz TSRMLS_CC); in zval_mark_grey()
417 } else if (Z_TYPE_P(pz) == IS_ARRAY) { in zval_mark_grey()
418 if (Z_ARRVAL_P(pz) == &EG(symbol_table)) { in zval_mark_grey()
419 GC_ZVAL_SET_BLACK(pz); in zval_mark_grey()
421 p = Z_ARRVAL_P(pz)->pListHead; in zval_mark_grey()
425 pz = *(zval**)p->pData; in zval_mark_grey()
426 if (Z_TYPE_P(pz) != IS_ARRAY || Z_ARRVAL_P(pz) != &EG(symbol_table)) { in zval_mark_grey()
427 pz->refcount__gc--; in zval_mark_grey()
432 zval_mark_grey(pz TSRMLS_CC); in zval_mark_grey()
439 static void zobj_mark_grey(struct _store_object *obj, zval *pz TSRMLS_DC) in zobj_mark_grey()
447 if (EXPECTED(EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].valid && in zobj_mark_grey()
448 (get_gc = Z_OBJ_HANDLER_P(pz, get_gc)) != NULL)) { in zobj_mark_grey()
451 HashTable *props = get_gc(pz, &table, &n TSRMLS_CC); in zobj_mark_grey()
455 pz = table[i]; in zobj_mark_grey()
456 if (Z_TYPE_P(pz) != IS_ARRAY || Z_ARRVAL_P(pz) != &EG(symbol_table)) { in zobj_mark_grey()
457 pz->refcount__gc--; in zobj_mark_grey()
459 zval_mark_grey(pz TSRMLS_CC); in zobj_mark_grey()
467 pz = *(zval**)p->pData; in zobj_mark_grey()
468 if (Z_TYPE_P(pz) != IS_ARRAY || Z_ARRVAL_P(pz) != &EG(symbol_table)) { in zobj_mark_grey()
469 pz->refcount__gc--; in zobj_mark_grey()
471 zval_mark_grey(pz TSRMLS_CC); in zobj_mark_grey()
500 if (GC_ZVAL_GET_COLOR(current->u.pz) == GC_PURPLE) { in gc_mark_roots()
501 zval_mark_grey(current->u.pz TSRMLS_CC); in gc_mark_roots()
503 GC_ZVAL_SET_ADDRESS(current->u.pz, NULL); in gc_mark_roots()
511 static void zval_scan(zval *pz TSRMLS_DC) in zval_scan()
516 if (GC_ZVAL_GET_COLOR(pz) == GC_GREY) { in zval_scan()
518 if (pz->refcount__gc > 0) { in zval_scan()
519 zval_scan_black(pz TSRMLS_CC); in zval_scan()
521 GC_ZVAL_SET_COLOR(pz, GC_WHITE); in zval_scan()
522 if (Z_TYPE_P(pz) == IS_OBJECT && EG(objects_store).object_buckets) { in zval_scan()
524 struct _store_object *obj = &EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].bucket.obj; in zval_scan()
528 zobj_scan_black(obj, pz TSRMLS_CC); in zval_scan()
531 if (EXPECTED(EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].valid && in zval_scan()
532 (get_gc = Z_OBJ_HANDLER_P(pz, get_gc)) != NULL)) { in zval_scan()
535 HashTable *props = get_gc(pz, &table, &n TSRMLS_CC); in zval_scan()
540 pz = table[i]; in zval_scan()
544 zval_scan(pz TSRMLS_CC); in zval_scan()
555 } else if (Z_TYPE_P(pz) == IS_ARRAY) { in zval_scan()
556 if (Z_ARRVAL_P(pz) == &EG(symbol_table)) { in zval_scan()
557 GC_ZVAL_SET_BLACK(pz); in zval_scan()
559 p = Z_ARRVAL_P(pz)->pListHead; in zval_scan()
565 pz = *(zval**)p->pData; in zval_scan()
575 static void zobj_scan(zval *pz TSRMLS_DC) in zobj_scan()
581 struct _store_object *obj = &EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].bucket.obj; in zobj_scan()
585 zobj_scan_black(obj, pz TSRMLS_CC); in zobj_scan()
588 if (EXPECTED(EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].valid && in zobj_scan()
589 (get_gc = Z_OBJ_HANDLER_P(pz, get_gc)) != NULL)) { in zobj_scan()
592 HashTable *props = get_gc(pz, &table, &n TSRMLS_CC); in zobj_scan()
596 pz = table[i]; in zobj_scan()
597 zval_scan(pz TSRMLS_CC); in zobj_scan()
627 zval_scan(current->u.pz TSRMLS_CC); in gc_scan_roots()
633 static void zval_collect_white(zval *pz TSRMLS_DC) in zval_collect_white()
638 if (((zval_gc_info*)(pz))->u.buffered == (gc_root_buffer*)GC_WHITE) { in zval_collect_white()
640 GC_ZVAL_SET_BLACK(pz); in zval_collect_white()
642 if (Z_TYPE_P(pz) == IS_OBJECT && EG(objects_store).object_buckets) { in zval_collect_white()
644 struct _store_object *obj = &EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].bucket.obj; in zval_collect_white()
650 if (EXPECTED(EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].valid && in zval_collect_white()
651 (get_gc = Z_OBJ_HANDLER_P(pz, get_gc)) != NULL)) { in zval_collect_white()
654 HashTable *props = get_gc(pz, &table, &n TSRMLS_CC); in zval_collect_white()
658 pz->refcount__gc++; in zval_collect_white()
659 ((zval_gc_info*)pz)->u.next = GC_G(zval_to_free); in zval_collect_white()
660 GC_G(zval_to_free) = (zval_gc_info*)pz; in zval_collect_white()
671 pz = zv; in zval_collect_white()
685 if (Z_TYPE_P(pz) == IS_ARRAY) { in zval_collect_white()
686 p = Z_ARRVAL_P(pz)->pListHead; in zval_collect_white()
691 pz->refcount__gc++; in zval_collect_white()
692 ((zval_gc_info*)pz)->u.next = GC_G(zval_to_free); in zval_collect_white()
693 GC_G(zval_to_free) = (zval_gc_info*)pz; in zval_collect_white()
696 pz = *(zval**)p->pData; in zval_collect_white()
697 if (Z_TYPE_P(pz) != IS_ARRAY || Z_ARRVAL_P(pz) != &EG(symbol_table)) { in zval_collect_white()
698 pz->refcount__gc++; in zval_collect_white()
703 zval_collect_white(pz TSRMLS_CC); in zval_collect_white()
710 static void zobj_collect_white(zval *pz TSRMLS_DC) in zobj_collect_white()
716 struct _store_object *obj = &EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].bucket.obj; in zobj_collect_white()
722 if (EXPECTED(EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].valid && in zobj_collect_white()
723 (get_gc = Z_OBJ_HANDLER_P(pz, get_gc)) != NULL)) { in zobj_collect_white()
726 HashTable *props = get_gc(pz, &table, &n TSRMLS_CC); in zobj_collect_white()
730 pz = table[i]; in zobj_collect_white()
731 if (Z_TYPE_P(pz) != IS_ARRAY || Z_ARRVAL_P(pz) != &EG(symbol_table)) { in zobj_collect_white()
732 pz->refcount__gc++; in zobj_collect_white()
734 zval_collect_white(pz TSRMLS_CC); in zobj_collect_white()
742 pz = *(zval**)p->pData; in zobj_collect_white()
743 if (Z_TYPE_P(pz) != IS_ARRAY || Z_ARRVAL_P(pz) != &EG(symbol_table)) { in zobj_collect_white()
744 pz->refcount__gc++; in zobj_collect_white()
746 zval_collect_white(pz TSRMLS_CC); in zobj_collect_white()
771 GC_ZVAL_SET_ADDRESS(current->u.pz, NULL); in gc_collect_roots()
772 zval_collect_white(current->u.pz TSRMLS_CC); in gc_collect_roots()