Lines Matching refs:idx
172 #define GC_IDX2PTR(idx) (GC_G(buf) + (idx)) argument
175 #define GC_IDX2LIST(idx) ((void*)(uintptr_t)(((idx) * sizeof(void*)) | GC_UNUSED)) argument
378 static zend_always_inline uint32_t gc_compress(uint32_t idx) in gc_compress() argument
380 if (EXPECTED(idx < GC_MAX_UNCOMPRESSED)) { in gc_compress()
381 return idx; in gc_compress()
383 return (idx % GC_MAX_UNCOMPRESSED) | GC_MAX_UNCOMPRESSED; in gc_compress()
386 static zend_always_inline gc_root_buffer* gc_decompress(zend_refcounted *ref, uint32_t idx) in gc_decompress() argument
388 gc_root_buffer *root = GC_IDX2PTR(idx); in gc_decompress()
395 idx += GC_MAX_UNCOMPRESSED; in gc_decompress()
396 ZEND_ASSERT(idx < GC_G(first_unused)); in gc_decompress()
397 root = GC_IDX2PTR(idx); in gc_decompress()
406 uint32_t idx; in gc_fetch_unused() local
410 idx = GC_G(unused); in gc_fetch_unused()
411 root = GC_IDX2PTR(idx); in gc_fetch_unused()
414 return idx; in gc_fetch_unused()
425 uint32_t idx; in gc_fetch_next_unused() local
428 idx = GC_G(first_unused); in gc_fetch_next_unused()
430 return idx; in gc_fetch_next_unused()
656 uint32_t idx; in gc_possible_root_when_full() local
674 idx = GC_FETCH_UNUSED(); in gc_possible_root_when_full()
676 idx = GC_FETCH_NEXT_UNUSED(); in gc_possible_root_when_full()
682 idx = GC_FETCH_NEXT_UNUSED(); in gc_possible_root_when_full()
685 newRoot = GC_IDX2PTR(idx); in gc_possible_root_when_full()
689 idx = gc_compress(idx); in gc_possible_root_when_full()
690 GC_REF_SET_INFO(ref, idx | GC_PURPLE); in gc_possible_root_when_full()
700 uint32_t idx; in gc_possible_root() local
710 idx = GC_FETCH_UNUSED(); in gc_possible_root()
712 idx = GC_FETCH_NEXT_UNUSED(); in gc_possible_root()
721 newRoot = GC_IDX2PTR(idx); in gc_possible_root()
725 idx = gc_compress(idx); in gc_possible_root()
726 GC_REF_SET_INFO(ref, idx | GC_PURPLE); in gc_possible_root()
736 uint32_t idx; in gc_extra_root() local
740 idx = GC_FETCH_UNUSED(); in gc_extra_root()
742 idx = GC_FETCH_NEXT_UNUSED(); in gc_extra_root()
749 idx = GC_FETCH_NEXT_UNUSED(); in gc_extra_root()
755 newRoot = GC_IDX2PTR(idx); in gc_extra_root()
758 idx = gc_compress(idx); in gc_extra_root()
759 GC_REF_SET_INFO(ref, idx | GC_REF_COLOR(ref)); in gc_extra_root()
767 static zend_never_inline void ZEND_FASTCALL gc_remove_compressed(zend_refcounted *ref, uint32_t idx) in gc_remove_compressed() argument
769 gc_root_buffer *root = gc_decompress(ref, idx); in gc_remove_compressed()
776 uint32_t idx = GC_REF_ADDRESS(ref); in gc_remove_from_buffer() local
787 gc_remove_compressed(ref, idx); in gc_remove_from_buffer()
791 ZEND_ASSERT(idx); in gc_remove_from_buffer()
792 root = GC_IDX2PTR(idx); in gc_remove_from_buffer()
1178 uint32_t idx; in gc_compact() local
1192 idx = gc_compress(GC_PTR2IDX(free)); in gc_compact()
1193 GC_REF_SET_INFO(p, idx | GC_REF_COLOR(p)); in gc_compact()
1381 uint32_t idx, end; in gc_scan_roots() local
1386 idx = GC_FIRST_ROOT; in gc_scan_roots()
1388 while (idx != end) { in gc_scan_roots()
1389 current = GC_IDX2PTR(idx); in gc_scan_roots()
1396 idx++; in gc_scan_roots()
1400 while (idx != GC_G(first_unused)) { in gc_scan_roots()
1401 current = GC_IDX2PTR(idx); in gc_scan_roots()
1408 idx++; in gc_scan_roots()
1414 uint32_t idx; in gc_add_garbage() local
1418 idx = GC_FETCH_UNUSED(); in gc_add_garbage()
1420 idx = GC_FETCH_NEXT_UNUSED(); in gc_add_garbage()
1426 idx = GC_FETCH_NEXT_UNUSED(); in gc_add_garbage()
1429 buf = GC_IDX2PTR(idx); in gc_add_garbage()
1432 idx = gc_compress(idx); in gc_add_garbage()
1433 GC_REF_SET_INFO(ref, idx | GC_BLACK); in gc_add_garbage()
1627 uint32_t idx, end; in gc_collect_roots() local
1648 idx = GC_FIRST_ROOT; in gc_collect_roots()
1650 while (idx != end) { in gc_collect_roots()
1651 current = GC_IDX2PTR(idx); in gc_collect_roots()
1659 idx++; in gc_collect_roots()
1811 static zend_always_inline zend_result gc_call_destructors(uint32_t idx, uint32_t end, zend_fiber *f… in gc_call_destructors() argument
1818 while (idx != end) { in gc_call_destructors()
1819 current = GC_IDX2PTR(idx); in gc_call_destructors()
1829 GC_G(dtor_idx) = idx; in gc_call_destructors()
1845 idx++; in gc_call_destructors()
1930 uint32_t idx, end; in zend_gc_collect_cycles() local
1977 idx = GC_FIRST_ROOT; in zend_gc_collect_cycles()
1979 while (idx != end) { in zend_gc_collect_cycles()
1994 idx++; in zend_gc_collect_cycles()
2000 idx = GC_FIRST_ROOT; in zend_gc_collect_cycles()
2002 while (idx != end) { in zend_gc_collect_cycles()
2008 idx++; in zend_gc_collect_cycles()
2033 idx = GC_FIRST_ROOT; in zend_gc_collect_cycles()
2034 while (idx != end) { in zend_gc_collect_cycles()
2035 current = GC_IDX2PTR(idx); in zend_gc_collect_cycles()
2067 idx++; in zend_gc_collect_cycles()
2241 uint32_t idx, end; in ZEND_FUNCTION() local
2250 idx = GC_G(dtor_idx); in ZEND_FUNCTION()
2252 if (UNEXPECTED(gc_call_destructors(idx, end, fiber) == FAILURE)) { in ZEND_FUNCTION()