Lines Matching refs:p

330 	Bucket *p, *end, *arData;  in zend_hash_discard()  local
334 p = arData + ht->nNumUsed; in zend_hash_discard()
337 while (p != end) { in zend_hash_discard()
338 p--; in zend_hash_discard()
339 if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) continue; in zend_hash_discard()
342 nIndex = p->h | ht->nTableMask; in zend_hash_discard()
343 HT_HASH_EX(arData, nIndex) = Z_NEXT(p->val); in zend_hash_discard()
565 Bucket *p, *arData; in zend_hash_find_bucket() local
579 p = HT_HASH_TO_BUCKET_EX(arData, idx); in zend_hash_find_bucket()
580 if (EXPECTED(p->key == key)) { /* check for the same interned string */ in zend_hash_find_bucket()
581 return p; in zend_hash_find_bucket()
585 if (p->h == ZSTR_H(key) && in zend_hash_find_bucket()
586 EXPECTED(p->key) && in zend_hash_find_bucket()
587 zend_string_equal_content(p->key, key)) { in zend_hash_find_bucket()
588 return p; in zend_hash_find_bucket()
590 idx = Z_NEXT(p->val); in zend_hash_find_bucket()
594 p = HT_HASH_TO_BUCKET_EX(arData, idx); in zend_hash_find_bucket()
595 if (p->key == key) { /* check for the same interned string */ in zend_hash_find_bucket()
596 return p; in zend_hash_find_bucket()
605 Bucket *p, *arData; in zend_hash_str_find_bucket() local
612 p = HT_HASH_TO_BUCKET_EX(arData, idx); in zend_hash_str_find_bucket()
613 if ((p->h == h) in zend_hash_str_find_bucket()
614 && p->key in zend_hash_str_find_bucket()
615 && (ZSTR_LEN(p->key) == len) in zend_hash_str_find_bucket()
616 && !memcmp(ZSTR_VAL(p->key), str, len)) { in zend_hash_str_find_bucket()
617 return p; in zend_hash_str_find_bucket()
619 idx = Z_NEXT(p->val); in zend_hash_str_find_bucket()
628 Bucket *p, *arData; in zend_hash_index_find_bucket() local
635 p = HT_HASH_TO_BUCKET_EX(arData, idx); in zend_hash_index_find_bucket()
636 if (p->h == h && !p->key) { in zend_hash_index_find_bucket()
637 return p; in zend_hash_index_find_bucket()
639 idx = Z_NEXT(p->val); in zend_hash_index_find_bucket()
649 Bucket *p, *arData; in _zend_hash_add_or_update_i() local
670 p = zend_hash_find_bucket(ht, key, 0); in _zend_hash_add_or_update_i()
672 if (p) { in _zend_hash_add_or_update_i()
679 ZEND_ASSERT(&p->val != pData); in _zend_hash_add_or_update_i()
680 data = &p->val; in _zend_hash_add_or_update_i()
690 ZEND_ASSERT(&p->val != pData); in _zend_hash_add_or_update_i()
691 data = &p->val; in _zend_hash_add_or_update_i()
718 p = arData + idx; in _zend_hash_add_or_update_i()
719 p->key = key; in _zend_hash_add_or_update_i()
720 p->h = h = ZSTR_H(key); in _zend_hash_add_or_update_i()
722 Z_NEXT(p->val) = HT_HASH_EX(arData, nIndex); in _zend_hash_add_or_update_i()
724 ZVAL_COPY_VALUE(&p->val, pData); in _zend_hash_add_or_update_i()
726 return &p->val; in _zend_hash_add_or_update_i()
734 Bucket *p; in _zend_hash_str_add_or_update_i() local
745 p = zend_hash_str_find_bucket(ht, str, len, h); in _zend_hash_str_add_or_update_i()
747 if (p) { in _zend_hash_str_add_or_update_i()
754 ZEND_ASSERT(&p->val != pData); in _zend_hash_str_add_or_update_i()
755 data = &p->val; in _zend_hash_str_add_or_update_i()
765 ZEND_ASSERT(&p->val != pData); in _zend_hash_str_add_or_update_i()
766 data = &p->val; in _zend_hash_str_add_or_update_i()
784 p = ht->arData + idx; in _zend_hash_str_add_or_update_i()
785 p->key = key = zend_string_init(str, len, GC_FLAGS(ht) & IS_ARRAY_PERSISTENT); in _zend_hash_str_add_or_update_i()
786 p->h = ZSTR_H(key) = h; in _zend_hash_str_add_or_update_i()
788 ZVAL_COPY_VALUE(&p->val, pData); in _zend_hash_str_add_or_update_i()
790 Z_NEXT(p->val) = HT_HASH(ht, nIndex); in _zend_hash_str_add_or_update_i()
793 return &p->val; in _zend_hash_str_add_or_update_i()
900 Bucket *p; in _zend_hash_index_add_or_update_i() local
907 p = ht->arData + h; in _zend_hash_index_add_or_update_i()
908 if (Z_TYPE(p->val) != IS_UNDEF) { in _zend_hash_index_add_or_update_i()
914 ht->pDestructor(&p->val); in _zend_hash_index_add_or_update_i()
916 ZVAL_COPY_VALUE(&p->val, pData); in _zend_hash_index_add_or_update_i()
917 return &p->val; in _zend_hash_index_add_or_update_i()
923 p = ht->arData + h; in _zend_hash_index_add_or_update_i()
928 while (q != p) { in _zend_hash_index_add_or_update_i()
955 p = zend_hash_index_find_bucket(ht, h); in _zend_hash_index_add_or_update_i()
956 if (p) { in _zend_hash_index_add_or_update_i()
965 p = ht->arData + idx; in _zend_hash_index_add_or_update_i()
966 Z_NEXT(p->val) = HT_HASH(ht, nIndex); in _zend_hash_index_add_or_update_i()
973 p->h = h; in _zend_hash_index_add_or_update_i()
974 p->key = NULL; in _zend_hash_index_add_or_update_i()
975 ZVAL_COPY_VALUE(&p->val, pData); in _zend_hash_index_add_or_update_i()
977 return &p->val; in _zend_hash_index_add_or_update_i()
1050 Bucket *p; in zend_hash_rehash() local
1065 p = ht->arData; in zend_hash_rehash()
1068 nIndex = p->h | ht->nTableMask; in zend_hash_rehash()
1069 Z_NEXT(p->val) = HT_HASH(ht, nIndex); in zend_hash_rehash()
1071 p++; in zend_hash_rehash()
1076 if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) { in zend_hash_rehash()
1078 Bucket *q = p; in zend_hash_rehash()
1082 p++; in zend_hash_rehash()
1083 if (EXPECTED(Z_TYPE_INFO(p->val) != IS_UNDEF)) { in zend_hash_rehash()
1084 ZVAL_COPY_VALUE(&q->val, &p->val); in zend_hash_rehash()
1085 q->h = p->h; in zend_hash_rehash()
1087 q->key = p->key; in zend_hash_rehash()
1101 p++; in zend_hash_rehash()
1102 if (EXPECTED(Z_TYPE_INFO(p->val) != IS_UNDEF)) { in zend_hash_rehash()
1103 ZVAL_COPY_VALUE(&q->val, &p->val); in zend_hash_rehash()
1104 q->h = p->h; in zend_hash_rehash()
1106 q->key = p->key; in zend_hash_rehash()
1126 nIndex = p->h | ht->nTableMask; in zend_hash_rehash()
1127 Z_NEXT(p->val) = HT_HASH(ht, nIndex); in zend_hash_rehash()
1129 p++; in zend_hash_rehash()
1141 static zend_always_inline void _zend_hash_del_el_ex(HashTable *ht, uint32_t idx, Bucket *p, Bucket … in _zend_hash_del_el_ex() argument
1145 Z_NEXT(prev->val) = Z_NEXT(p->val); in _zend_hash_del_el_ex()
1147 HT_HASH(ht, p->h | ht->nTableMask) = Z_NEXT(p->val); in _zend_hash_del_el_ex()
1175 if (p->key) { in _zend_hash_del_el_ex()
1176 zend_string_release(p->key); in _zend_hash_del_el_ex()
1180 ZVAL_COPY_VALUE(&tmp, &p->val); in _zend_hash_del_el_ex()
1181 ZVAL_UNDEF(&p->val); in _zend_hash_del_el_ex()
1184 ZVAL_UNDEF(&p->val); in _zend_hash_del_el_ex()
1188 static zend_always_inline void _zend_hash_del_el(HashTable *ht, uint32_t idx, Bucket *p) in _zend_hash_del_el() argument
1193 uint32_t nIndex = p->h | ht->nTableMask; in _zend_hash_del_el()
1205 _zend_hash_del_el_ex(ht, idx, p, prev); in _zend_hash_del_el()
1208 ZEND_API void ZEND_FASTCALL zend_hash_del_bucket(HashTable *ht, Bucket *p) in zend_hash_del_bucket() argument
1212 _zend_hash_del_el(ht, HT_IDX_TO_HASH(p - ht->arData), p); in zend_hash_del_bucket()
1220 Bucket *p; in zend_hash_del() local
1231 p = HT_HASH_TO_BUCKET(ht, idx); in zend_hash_del()
1232 if ((p->key == key) || in zend_hash_del()
1233 (p->h == h && in zend_hash_del()
1234 p->key && in zend_hash_del()
1235 zend_string_equal_content(p->key, key))) { in zend_hash_del()
1236 _zend_hash_del_el_ex(ht, idx, p, prev); in zend_hash_del()
1239 prev = p; in zend_hash_del()
1240 idx = Z_NEXT(p->val); in zend_hash_del()
1250 Bucket *p; in zend_hash_del_ind() local
1261 p = HT_HASH_TO_BUCKET(ht, idx); in zend_hash_del_ind()
1262 if ((p->key == key) || in zend_hash_del_ind()
1263 (p->h == h && in zend_hash_del_ind()
1264 p->key && in zend_hash_del_ind()
1265 zend_string_equal_content(p->key, key))) { in zend_hash_del_ind()
1266 if (Z_TYPE(p->val) == IS_INDIRECT) { in zend_hash_del_ind()
1267 zval *data = Z_INDIRECT(p->val); in zend_hash_del_ind()
1283 _zend_hash_del_el_ex(ht, idx, p, prev); in zend_hash_del_ind()
1287 prev = p; in zend_hash_del_ind()
1288 idx = Z_NEXT(p->val); in zend_hash_del_ind()
1298 Bucket *p; in zend_hash_str_del_ind() local
1309 p = HT_HASH_TO_BUCKET(ht, idx); in zend_hash_str_del_ind()
1310 if ((p->h == h) in zend_hash_str_del_ind()
1311 && p->key in zend_hash_str_del_ind()
1312 && (ZSTR_LEN(p->key) == len) in zend_hash_str_del_ind()
1313 && !memcmp(ZSTR_VAL(p->key), str, len)) { in zend_hash_str_del_ind()
1314 if (Z_TYPE(p->val) == IS_INDIRECT) { in zend_hash_str_del_ind()
1315 zval *data = Z_INDIRECT(p->val); in zend_hash_str_del_ind()
1327 _zend_hash_del_el_ex(ht, idx, p, prev); in zend_hash_str_del_ind()
1331 prev = p; in zend_hash_str_del_ind()
1332 idx = Z_NEXT(p->val); in zend_hash_str_del_ind()
1342 Bucket *p; in zend_hash_str_del() local
1353 p = HT_HASH_TO_BUCKET(ht, idx); in zend_hash_str_del()
1354 if ((p->h == h) in zend_hash_str_del()
1355 && p->key in zend_hash_str_del()
1356 && (ZSTR_LEN(p->key) == len) in zend_hash_str_del()
1357 && !memcmp(ZSTR_VAL(p->key), str, len)) { in zend_hash_str_del()
1358 _zend_hash_del_el_ex(ht, idx, p, prev); in zend_hash_str_del()
1361 prev = p; in zend_hash_str_del()
1362 idx = Z_NEXT(p->val); in zend_hash_str_del()
1371 Bucket *p; in zend_hash_index_del() local
1379 p = ht->arData + h; in zend_hash_index_del()
1380 if (Z_TYPE(p->val) != IS_UNDEF) { in zend_hash_index_del()
1381 _zend_hash_del_el_ex(ht, HT_IDX_TO_HASH(h), p, NULL); in zend_hash_index_del()
1391 p = HT_HASH_TO_BUCKET(ht, idx); in zend_hash_index_del()
1392 if ((p->h == h) && (p->key == NULL)) { in zend_hash_index_del()
1393 _zend_hash_del_el_ex(ht, idx, p, prev); in zend_hash_index_del()
1396 prev = p; in zend_hash_index_del()
1397 idx = Z_NEXT(p->val); in zend_hash_index_del()
1404 Bucket *p, *end; in zend_hash_destroy() local
1410 p = ht->arData; in zend_hash_destroy()
1411 end = p + ht->nNumUsed; in zend_hash_destroy()
1418 ht->pDestructor(&p->val); in zend_hash_destroy()
1419 } while (++p != end); in zend_hash_destroy()
1422 if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF)) { in zend_hash_destroy()
1423 ht->pDestructor(&p->val); in zend_hash_destroy()
1425 } while (++p != end); in zend_hash_destroy()
1429 ht->pDestructor(&p->val); in zend_hash_destroy()
1430 if (EXPECTED(p->key)) { in zend_hash_destroy()
1431 zend_string_release(p->key); in zend_hash_destroy()
1433 } while (++p != end); in zend_hash_destroy()
1436 if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF)) { in zend_hash_destroy()
1437 ht->pDestructor(&p->val); in zend_hash_destroy()
1438 if (EXPECTED(p->key)) { in zend_hash_destroy()
1439 zend_string_release(p->key); in zend_hash_destroy()
1442 } while (++p != end); in zend_hash_destroy()
1449 if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF)) { in zend_hash_destroy()
1450 if (EXPECTED(p->key)) { in zend_hash_destroy()
1451 zend_string_release(p->key); in zend_hash_destroy()
1454 } while (++p != end); in zend_hash_destroy()
1466 Bucket *p, *end; in zend_array_destroy() local
1482 p = ht->arData; in zend_array_destroy()
1483 end = p + ht->nNumUsed; in zend_array_destroy()
1488 i_zval_ptr_dtor(&p->val ZEND_FILE_LINE_CC); in zend_array_destroy()
1489 } while (++p != end); in zend_array_destroy()
1492 i_zval_ptr_dtor(&p->val ZEND_FILE_LINE_CC); in zend_array_destroy()
1493 if (EXPECTED(p->key)) { in zend_array_destroy()
1494 zend_string_release_ex(p->key, 0); in zend_array_destroy()
1496 } while (++p != end); in zend_array_destroy()
1499 if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF)) { in zend_array_destroy()
1500 i_zval_ptr_dtor(&p->val ZEND_FILE_LINE_CC); in zend_array_destroy()
1501 if (EXPECTED(p->key)) { in zend_array_destroy()
1502 zend_string_release_ex(p->key, 0); in zend_array_destroy()
1505 } while (++p != end); in zend_array_destroy()
1519 Bucket *p, *end; in zend_hash_clean() local
1525 p = ht->arData; in zend_hash_clean()
1526 end = p + ht->nNumUsed; in zend_hash_clean()
1531 ht->pDestructor(&p->val); in zend_hash_clean()
1532 } while (++p != end); in zend_hash_clean()
1535 if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF)) { in zend_hash_clean()
1536 ht->pDestructor(&p->val); in zend_hash_clean()
1538 } while (++p != end); in zend_hash_clean()
1542 ht->pDestructor(&p->val); in zend_hash_clean()
1543 if (EXPECTED(p->key)) { in zend_hash_clean()
1544 zend_string_release(p->key); in zend_hash_clean()
1546 } while (++p != end); in zend_hash_clean()
1549 if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF)) { in zend_hash_clean()
1550 ht->pDestructor(&p->val); in zend_hash_clean()
1551 if (EXPECTED(p->key)) { in zend_hash_clean()
1552 zend_string_release(p->key); in zend_hash_clean()
1555 } while (++p != end); in zend_hash_clean()
1561 if (EXPECTED(p->key)) { in zend_hash_clean()
1562 zend_string_release(p->key); in zend_hash_clean()
1564 } while (++p != end); in zend_hash_clean()
1567 if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF)) { in zend_hash_clean()
1568 if (EXPECTED(p->key)) { in zend_hash_clean()
1569 zend_string_release(p->key); in zend_hash_clean()
1572 } while (++p != end); in zend_hash_clean()
1588 Bucket *p, *end; in zend_symtable_clean() local
1594 p = ht->arData; in zend_symtable_clean()
1595 end = p + ht->nNumUsed; in zend_symtable_clean()
1598 i_zval_ptr_dtor(&p->val ZEND_FILE_LINE_CC); in zend_symtable_clean()
1599 } while (++p != end); in zend_symtable_clean()
1602 i_zval_ptr_dtor(&p->val ZEND_FILE_LINE_CC); in zend_symtable_clean()
1603 if (EXPECTED(p->key)) { in zend_symtable_clean()
1604 zend_string_release(p->key); in zend_symtable_clean()
1606 } while (++p != end); in zend_symtable_clean()
1609 if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF)) { in zend_symtable_clean()
1610 i_zval_ptr_dtor(&p->val ZEND_FILE_LINE_CC); in zend_symtable_clean()
1611 if (EXPECTED(p->key)) { in zend_symtable_clean()
1612 zend_string_release(p->key); in zend_symtable_clean()
1615 } while (++p != end); in zend_symtable_clean()
1628 Bucket *p; in zend_hash_graceful_destroy() local
1633 p = ht->arData; in zend_hash_graceful_destroy()
1634 for (idx = 0; idx < ht->nNumUsed; idx++, p++) { in zend_hash_graceful_destroy()
1635 if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) continue; in zend_hash_graceful_destroy()
1636 _zend_hash_del_el(ht, HT_IDX_TO_HASH(idx), p); in zend_hash_graceful_destroy()
1648 Bucket *p; in zend_hash_graceful_reverse_destroy() local
1654 p = ht->arData + ht->nNumUsed; in zend_hash_graceful_reverse_destroy()
1657 p--; in zend_hash_graceful_reverse_destroy()
1658 if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) continue; in zend_hash_graceful_reverse_destroy()
1659 _zend_hash_del_el(ht, HT_IDX_TO_HASH(idx), p); in zend_hash_graceful_reverse_destroy()
1681 Bucket *p; in zend_hash_apply() local
1687 p = ht->arData + idx; in zend_hash_apply()
1688 if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) continue; in zend_hash_apply()
1689 result = apply_func(&p->val); in zend_hash_apply()
1693 _zend_hash_del_el(ht, HT_IDX_TO_HASH(idx), p); in zend_hash_apply()
1705 Bucket *p; in zend_hash_apply_with_argument() local
1711 p = ht->arData + idx; in zend_hash_apply_with_argument()
1712 if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) continue; in zend_hash_apply_with_argument()
1713 result = apply_func(&p->val, argument); in zend_hash_apply_with_argument()
1717 _zend_hash_del_el(ht, HT_IDX_TO_HASH(idx), p); in zend_hash_apply_with_argument()
1729 Bucket *p; in zend_hash_apply_with_arguments() local
1737 p = ht->arData + idx; in zend_hash_apply_with_arguments()
1738 if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) continue; in zend_hash_apply_with_arguments()
1740 hash_key.h = p->h; in zend_hash_apply_with_arguments()
1741 hash_key.key = p->key; in zend_hash_apply_with_arguments()
1743 result = apply_func(&p->val, num_args, args, &hash_key); in zend_hash_apply_with_arguments()
1747 _zend_hash_del_el(ht, HT_IDX_TO_HASH(idx), p); in zend_hash_apply_with_arguments()
1761 Bucket *p; in zend_hash_reverse_apply() local
1769 p = ht->arData + idx; in zend_hash_reverse_apply()
1770 if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) continue; in zend_hash_reverse_apply()
1772 result = apply_func(&p->val); in zend_hash_reverse_apply()
1776 _zend_hash_del_el(ht, HT_IDX_TO_HASH(idx), p); in zend_hash_reverse_apply()
1788 Bucket *p; in zend_hash_copy() local
1796 p = source->arData + idx; in zend_hash_copy()
1797 if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) continue; in zend_hash_copy()
1800 data = &p->val; in zend_hash_copy()
1807 if (p->key) { in zend_hash_copy()
1808 new_entry = zend_hash_update(target, p->key, data); in zend_hash_copy()
1810 new_entry = zend_hash_index_update(target, p->h, data); in zend_hash_copy()
1819 …ray_dup_element(HashTable *source, HashTable *target, uint32_t idx, Bucket *p, Bucket *q, int pack… in zend_array_dup_element() argument
1821 zval *data = &p->val; in zend_array_dup_element()
1855 q->h = p->h; in zend_array_dup_element()
1861 q->key = p->key; in zend_array_dup_element()
1875 Bucket *p = source->arData; in zend_array_dup_packed_elements() local
1877 Bucket *end = p + source->nNumUsed; in zend_array_dup_packed_elements()
1880 if (!zend_array_dup_element(source, target, 0, p, q, 1, 1, with_holes)) { in zend_array_dup_packed_elements()
1885 p++; q++; in zend_array_dup_packed_elements()
1886 } while (p != end); in zend_array_dup_packed_elements()
1892 Bucket *p = source->arData; in zend_array_dup_elements() local
1894 Bucket *end = p + source->nNumUsed; in zend_array_dup_elements()
1897 if (!zend_array_dup_element(source, target, idx, p, q, 0, static_keys, with_holes)) { in zend_array_dup_elements()
1900 idx++; p++; in zend_array_dup_elements()
1901 while (p != end) { in zend_array_dup_elements()
1902 if (zend_array_dup_element(source, target, target_idx, p, q, 0, static_keys, with_holes)) { in zend_array_dup_elements()
1908 idx++; p++; in zend_array_dup_elements()
1912 idx++; p++; q++; in zend_array_dup_elements()
1913 } while (p != end); in zend_array_dup_elements()
2001 Bucket *p; in zend_hash_merge() local
2010 p = source->arData + idx; in zend_hash_merge()
2011 s = &p->val; in zend_hash_merge()
2018 if (p->key) { in zend_hash_merge()
2019 t = _zend_hash_add_or_update_i(target, p->key, s, HASH_UPDATE | HASH_UPDATE_INDIRECT); in zend_hash_merge()
2024 t = zend_hash_index_update(target, p->h, s); in zend_hash_merge()
2032 p = source->arData + idx; in zend_hash_merge()
2033 s = &p->val; in zend_hash_merge()
2040 if (p->key) { in zend_hash_merge()
2041 t = _zend_hash_add_or_update_i(target, p->key, s, HASH_ADD | HASH_UPDATE_INDIRECT); in zend_hash_merge()
2046 t = zend_hash_index_add(target, p->h, s); in zend_hash_merge()
2056 …_hash_replace_checker_wrapper(HashTable *target, zval *source_data, Bucket *p, void *pParam, merge… in zend_hash_replace_checker_wrapper() argument
2060 hash_key.h = p->h; in zend_hash_replace_checker_wrapper()
2061 hash_key.key = p->key; in zend_hash_replace_checker_wrapper()
2069 Bucket *p; in zend_hash_merge_ex() local
2077 p = source->arData + idx; in zend_hash_merge_ex()
2078 if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) continue; in zend_hash_merge_ex()
2079 if (zend_hash_replace_checker_wrapper(target, &p->val, p, pParam, pMergeSource)) { in zend_hash_merge_ex()
2080 t = zend_hash_update(target, p->key, &p->val); in zend_hash_merge_ex()
2092 Bucket *p; in zend_hash_find() local
2096 p = zend_hash_find_bucket(ht, key, 0); in zend_hash_find()
2097 return p ? &p->val : NULL; in zend_hash_find()
2102 Bucket *p; in _zend_hash_find_known_hash() local
2106 p = zend_hash_find_bucket(ht, key, 1); in _zend_hash_find_known_hash()
2107 return p ? &p->val : NULL; in _zend_hash_find_known_hash()
2113 Bucket *p; in zend_hash_str_find() local
2118 p = zend_hash_str_find_bucket(ht, str, len, h); in zend_hash_str_find()
2119 return p ? &p->val : NULL; in zend_hash_str_find()
2124 Bucket *p; in zend_hash_exists() local
2128 p = zend_hash_find_bucket(ht, key, 0); in zend_hash_exists()
2129 return p ? 1 : 0; in zend_hash_exists()
2135 Bucket *p; in zend_hash_str_exists() local
2140 p = zend_hash_str_find_bucket(ht, str, len, h); in zend_hash_str_exists()
2141 return p ? 1 : 0; in zend_hash_str_exists()
2146 Bucket *p; in zend_hash_index_find() local
2152 p = ht->arData + h; in zend_hash_index_find()
2153 if (Z_TYPE(p->val) != IS_UNDEF) { in zend_hash_index_find()
2154 return &p->val; in zend_hash_index_find()
2160 p = zend_hash_index_find_bucket(ht, h); in zend_hash_index_find()
2161 return p ? &p->val : NULL; in zend_hash_index_find()
2166 Bucket *p; in _zend_hash_index_find() local
2170 p = zend_hash_index_find_bucket(ht, h); in _zend_hash_index_find()
2171 return p ? &p->val : NULL; in _zend_hash_index_find()
2176 Bucket *p; in zend_hash_index_exists() local
2189 p = zend_hash_index_find_bucket(ht, h); in zend_hash_index_exists()
2190 return p ? 1 : 0; in zend_hash_index_exists()
2276 Bucket *p; in zend_hash_get_current_key_ex() local
2281 p = ht->arData + idx; in zend_hash_get_current_key_ex()
2282 if (p->key) { in zend_hash_get_current_key_ex()
2283 *str_index = p->key; in zend_hash_get_current_key_ex()
2286 *num_index = p->h; in zend_hash_get_current_key_ex()
2296 Bucket *p; in zend_hash_get_current_key_zval_ex() local
2303 p = ht->arData + idx; in zend_hash_get_current_key_zval_ex()
2304 if (p->key) { in zend_hash_get_current_key_zval_ex()
2305 ZVAL_STR_COPY(key, p->key); in zend_hash_get_current_key_zval_ex()
2307 ZVAL_LONG(key, p->h); in zend_hash_get_current_key_zval_ex()
2315 Bucket *p; in zend_hash_get_current_key_type_ex() local
2320 p = ht->arData + idx; in zend_hash_get_current_key_type_ex()
2321 if (p->key) { in zend_hash_get_current_key_type_ex()
2334 Bucket *p; in zend_hash_get_current_data_ex() local
2339 p = ht->arData + idx; in zend_hash_get_current_data_ex()
2340 return &p->val; in zend_hash_get_current_data_ex()
2346 ZEND_API void zend_hash_bucket_swap(Bucket *p, Bucket *q) in zend_hash_bucket_swap() argument
2352 ZVAL_COPY_VALUE(&val, &p->val); in zend_hash_bucket_swap()
2353 h = p->h; in zend_hash_bucket_swap()
2354 key = p->key; in zend_hash_bucket_swap()
2356 ZVAL_COPY_VALUE(&p->val, &q->val); in zend_hash_bucket_swap()
2357 p->h = q->h; in zend_hash_bucket_swap()
2358 p->key = q->key; in zend_hash_bucket_swap()
2365 ZEND_API void zend_hash_bucket_renum_swap(Bucket *p, Bucket *q) in zend_hash_bucket_renum_swap() argument
2369 ZVAL_COPY_VALUE(&val, &p->val); in zend_hash_bucket_renum_swap()
2370 ZVAL_COPY_VALUE(&p->val, &q->val); in zend_hash_bucket_renum_swap()
2374 ZEND_API void zend_hash_bucket_packed_swap(Bucket *p, Bucket *q) in zend_hash_bucket_packed_swap() argument
2379 ZVAL_COPY_VALUE(&val, &p->val); in zend_hash_bucket_packed_swap()
2380 h = p->h; in zend_hash_bucket_packed_swap()
2382 ZVAL_COPY_VALUE(&p->val, &q->val); in zend_hash_bucket_packed_swap()
2383 p->h = q->h; in zend_hash_bucket_packed_swap()
2391 Bucket *p; in zend_hash_sort_ex() local
2405 p = ht->arData + j; in zend_hash_sort_ex()
2406 if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) continue; in zend_hash_sort_ex()
2408 ht->arData[i] = *p; in zend_hash_sort_ex()
2423 p = ht->arData + j; in zend_hash_sort_ex()
2424 p->h = j; in zend_hash_sort_ex()
2425 if (p->key) { in zend_hash_sort_ex()
2426 zend_string_release(p->key); in zend_hash_sort_ex()
2427 p->key = NULL; in zend_hash_sort_ex()
2568 Bucket *p, *res; in zend_hash_minmax() local
2586 p = ht->arData + idx; in zend_hash_minmax()
2587 if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) continue; in zend_hash_minmax()
2590 if (compar(res, p) < 0) { /* max */ in zend_hash_minmax()
2591 res = p; in zend_hash_minmax()
2594 if (compar(res, p) > 0) { /* min */ in zend_hash_minmax()
2595 res = p; in zend_hash_minmax()