Lines Matching refs:idx
167 #define GC_IDX2PTR(idx) (GC_G(buf) + (idx)) argument
170 #define GC_IDX2LIST(idx) ((void*)(uintptr_t)(((idx) * sizeof(void*)) | GC_UNUSED)) argument
368 static zend_always_inline uint32_t gc_compress(uint32_t idx) in gc_compress() argument
370 if (EXPECTED(idx < GC_MAX_UNCOMPRESSED)) { in gc_compress()
371 return idx; in gc_compress()
373 return (idx % GC_MAX_UNCOMPRESSED) | GC_MAX_UNCOMPRESSED; in gc_compress()
376 static zend_always_inline gc_root_buffer* gc_decompress(zend_refcounted *ref, uint32_t idx) in gc_decompress() argument
378 gc_root_buffer *root = GC_IDX2PTR(idx); in gc_decompress()
385 idx += GC_MAX_UNCOMPRESSED; in gc_decompress()
386 ZEND_ASSERT(idx < GC_G(first_unused)); in gc_decompress()
387 root = GC_IDX2PTR(idx); in gc_decompress()
396 uint32_t idx; in gc_fetch_unused() local
400 idx = GC_G(unused); in gc_fetch_unused()
401 root = GC_IDX2PTR(idx); in gc_fetch_unused()
404 return idx; in gc_fetch_unused()
415 uint32_t idx; in gc_fetch_next_unused() local
418 idx = GC_G(first_unused); in gc_fetch_next_unused()
420 return idx; in gc_fetch_next_unused()
636 uint32_t idx; in gc_possible_root_when_full() local
654 idx = GC_FETCH_UNUSED(); in gc_possible_root_when_full()
656 idx = GC_FETCH_NEXT_UNUSED(); in gc_possible_root_when_full()
662 idx = GC_FETCH_NEXT_UNUSED(); in gc_possible_root_when_full()
665 newRoot = GC_IDX2PTR(idx); in gc_possible_root_when_full()
669 idx = gc_compress(idx); in gc_possible_root_when_full()
670 GC_REF_SET_INFO(ref, idx | GC_PURPLE); in gc_possible_root_when_full()
680 uint32_t idx; in gc_possible_root() local
690 idx = GC_FETCH_UNUSED(); in gc_possible_root()
692 idx = GC_FETCH_NEXT_UNUSED(); in gc_possible_root()
701 newRoot = GC_IDX2PTR(idx); in gc_possible_root()
705 idx = gc_compress(idx); in gc_possible_root()
706 GC_REF_SET_INFO(ref, idx | GC_PURPLE); in gc_possible_root()
716 uint32_t idx; in gc_extra_root() local
720 idx = GC_FETCH_UNUSED(); in gc_extra_root()
722 idx = GC_FETCH_NEXT_UNUSED(); in gc_extra_root()
729 idx = GC_FETCH_NEXT_UNUSED(); in gc_extra_root()
735 newRoot = GC_IDX2PTR(idx); in gc_extra_root()
738 idx = gc_compress(idx); in gc_extra_root()
739 GC_REF_SET_INFO(ref, idx | GC_REF_COLOR(ref)); in gc_extra_root()
747 static zend_never_inline void ZEND_FASTCALL gc_remove_compressed(zend_refcounted *ref, uint32_t idx) in gc_remove_compressed() argument
749 gc_root_buffer *root = gc_decompress(ref, idx); in gc_remove_compressed()
756 uint32_t idx = GC_REF_ADDRESS(ref); in gc_remove_from_buffer() local
767 gc_remove_compressed(ref, idx); in gc_remove_from_buffer()
771 ZEND_ASSERT(idx); in gc_remove_from_buffer()
772 root = GC_IDX2PTR(idx); in gc_remove_from_buffer()
1158 uint32_t idx; in gc_compact() local
1172 idx = gc_compress(GC_PTR2IDX(free)); in gc_compact()
1173 GC_REF_SET_INFO(p, idx | GC_REF_COLOR(p)); in gc_compact()
1361 uint32_t idx, end; in gc_scan_roots() local
1366 idx = GC_FIRST_ROOT; in gc_scan_roots()
1368 while (idx != end) { in gc_scan_roots()
1369 current = GC_IDX2PTR(idx); in gc_scan_roots()
1376 idx++; in gc_scan_roots()
1380 while (idx != GC_G(first_unused)) { in gc_scan_roots()
1381 current = GC_IDX2PTR(idx); in gc_scan_roots()
1388 idx++; in gc_scan_roots()
1394 uint32_t idx; in gc_add_garbage() local
1398 idx = GC_FETCH_UNUSED(); in gc_add_garbage()
1400 idx = GC_FETCH_NEXT_UNUSED(); in gc_add_garbage()
1406 idx = GC_FETCH_NEXT_UNUSED(); in gc_add_garbage()
1409 buf = GC_IDX2PTR(idx); in gc_add_garbage()
1412 idx = gc_compress(idx); in gc_add_garbage()
1413 GC_REF_SET_INFO(ref, idx | GC_BLACK); in gc_add_garbage()
1607 uint32_t idx, end; in gc_collect_roots() local
1628 idx = GC_FIRST_ROOT; in gc_collect_roots()
1630 while (idx != end) { in gc_collect_roots()
1631 current = GC_IDX2PTR(idx); in gc_collect_roots()
1639 idx++; in gc_collect_roots()
1796 uint32_t idx, end; in zend_gc_collect_cycles() local
1845 idx = GC_FIRST_ROOT; in zend_gc_collect_cycles()
1847 while (idx != end) { in zend_gc_collect_cycles()
1862 idx++; in zend_gc_collect_cycles()
1868 idx = GC_FIRST_ROOT; in zend_gc_collect_cycles()
1870 while (idx != end) { in zend_gc_collect_cycles()
1876 idx++; in zend_gc_collect_cycles()
1884 idx = GC_FIRST_ROOT; in zend_gc_collect_cycles()
1885 while (idx != end) { in zend_gc_collect_cycles()
1886 current = GC_IDX2PTR(idx); in zend_gc_collect_cycles()
1903 idx++; in zend_gc_collect_cycles()
1921 idx = GC_FIRST_ROOT; in zend_gc_collect_cycles()
1922 while (idx != end) { in zend_gc_collect_cycles()
1923 current = GC_IDX2PTR(idx); in zend_gc_collect_cycles()
1955 idx++; in zend_gc_collect_cycles()