Lines Matching refs:p
487 Bucket *p, *arData; in zend_hash_find_bucket() local
494 p = HT_HASH_TO_BUCKET_EX(arData, idx); in zend_hash_find_bucket()
495 if (EXPECTED(p->key == key)) { /* check for the same interned string */ in zend_hash_find_bucket()
496 return p; in zend_hash_find_bucket()
497 } else if (EXPECTED(p->h == h) && in zend_hash_find_bucket()
498 EXPECTED(p->key) && in zend_hash_find_bucket()
499 EXPECTED(ZSTR_LEN(p->key) == ZSTR_LEN(key)) && in zend_hash_find_bucket()
500 EXPECTED(memcmp(ZSTR_VAL(p->key), ZSTR_VAL(key), ZSTR_LEN(key)) == 0)) { in zend_hash_find_bucket()
501 return p; in zend_hash_find_bucket()
503 idx = Z_NEXT(p->val); in zend_hash_find_bucket()
512 Bucket *p, *arData; in zend_hash_str_find_bucket() local
519 p = HT_HASH_TO_BUCKET_EX(arData, idx); in zend_hash_str_find_bucket()
520 if ((p->h == h) in zend_hash_str_find_bucket()
521 && p->key in zend_hash_str_find_bucket()
522 && (ZSTR_LEN(p->key) == len) in zend_hash_str_find_bucket()
523 && !memcmp(ZSTR_VAL(p->key), str, len)) { in zend_hash_str_find_bucket()
524 return p; in zend_hash_str_find_bucket()
526 idx = Z_NEXT(p->val); in zend_hash_str_find_bucket()
535 Bucket *p, *arData; in zend_hash_index_find_bucket() local
542 p = HT_HASH_TO_BUCKET_EX(arData, idx); in zend_hash_index_find_bucket()
543 if (p->h == h && !p->key) { in zend_hash_index_find_bucket()
544 return p; in zend_hash_index_find_bucket()
546 idx = Z_NEXT(p->val); in zend_hash_index_find_bucket()
556 Bucket *p; in _zend_hash_add_or_update_i() local
567 p = zend_hash_find_bucket(ht, key); in _zend_hash_add_or_update_i()
569 if (p) { in _zend_hash_add_or_update_i()
576 ZEND_ASSERT(&p->val != pData); in _zend_hash_add_or_update_i()
577 data = &p->val; in _zend_hash_add_or_update_i()
587 ZEND_ASSERT(&p->val != pData); in _zend_hash_add_or_update_i()
588 data = &p->val; in _zend_hash_add_or_update_i()
613 p = ht->arData + idx; in _zend_hash_add_or_update_i()
614 p->key = key; in _zend_hash_add_or_update_i()
620 p->h = h = ZSTR_H(key); in _zend_hash_add_or_update_i()
621 ZVAL_COPY_VALUE(&p->val, pData); in _zend_hash_add_or_update_i()
623 Z_NEXT(p->val) = HT_HASH(ht, nIndex); in _zend_hash_add_or_update_i()
627 return &p->val; in _zend_hash_add_or_update_i()
723 Bucket *p; in _zend_hash_index_add_or_update_i() local
731 p = ht->arData + h; in _zend_hash_index_add_or_update_i()
737 p = ht->arData + h; in _zend_hash_index_add_or_update_i()
738 if (Z_TYPE(p->val) != IS_UNDEF) { in _zend_hash_index_add_or_update_i()
743 ht->pDestructor(&p->val); in _zend_hash_index_add_or_update_i()
745 ZVAL_COPY_VALUE(&p->val, pData); in _zend_hash_index_add_or_update_i()
749 return &p->val; in _zend_hash_index_add_or_update_i()
754 p = ht->arData + h; in _zend_hash_index_add_or_update_i()
758 p = ht->arData + h; in _zend_hash_index_add_or_update_i()
771 while (q != p) { in _zend_hash_index_add_or_update_i()
786 p->h = h; in _zend_hash_index_add_or_update_i()
787 p->key = NULL; in _zend_hash_index_add_or_update_i()
788 ZVAL_COPY_VALUE(&p->val, pData); in _zend_hash_index_add_or_update_i()
792 return &p->val; in _zend_hash_index_add_or_update_i()
797 p = zend_hash_index_find_bucket(ht, h); in _zend_hash_index_add_or_update_i()
798 if (p) { in _zend_hash_index_add_or_update_i()
802 ZEND_ASSERT(&p->val != pData); in _zend_hash_index_add_or_update_i()
805 ht->pDestructor(&p->val); in _zend_hash_index_add_or_update_i()
807 ZVAL_COPY_VALUE(&p->val, pData); in _zend_hash_index_add_or_update_i()
812 return &p->val; in _zend_hash_index_add_or_update_i()
829 p = ht->arData + idx; in _zend_hash_index_add_or_update_i()
830 p->h = h; in _zend_hash_index_add_or_update_i()
831 p->key = NULL; in _zend_hash_index_add_or_update_i()
833 ZVAL_COPY_VALUE(&p->val, pData); in _zend_hash_index_add_or_update_i()
834 Z_NEXT(p->val) = HT_HASH(ht, nIndex); in _zend_hash_index_add_or_update_i()
838 return &p->val; in _zend_hash_index_add_or_update_i()
902 Bucket *p; in zend_hash_rehash() local
917 p = ht->arData; in zend_hash_rehash()
920 nIndex = p->h | ht->nTableMask; in zend_hash_rehash()
921 Z_NEXT(p->val) = HT_HASH(ht, nIndex); in zend_hash_rehash()
923 p++; in zend_hash_rehash()
927 if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) { in zend_hash_rehash()
929 Bucket *q = p; in zend_hash_rehash()
933 p++; in zend_hash_rehash()
934 if (EXPECTED(Z_TYPE_INFO(p->val) != IS_UNDEF)) { in zend_hash_rehash()
935 ZVAL_COPY_VALUE(&q->val, &p->val); in zend_hash_rehash()
936 q->h = p->h; in zend_hash_rehash()
938 q->key = p->key; in zend_hash_rehash()
952 p++; in zend_hash_rehash()
953 if (EXPECTED(Z_TYPE_INFO(p->val) != IS_UNDEF)) { in zend_hash_rehash()
954 ZVAL_COPY_VALUE(&q->val, &p->val); in zend_hash_rehash()
955 q->h = p->h; in zend_hash_rehash()
957 q->key = p->key; in zend_hash_rehash()
975 nIndex = p->h | ht->nTableMask; in zend_hash_rehash()
976 Z_NEXT(p->val) = HT_HASH(ht, nIndex); in zend_hash_rehash()
978 p++; in zend_hash_rehash()
984 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
989 Z_NEXT(prev->val) = Z_NEXT(p->val); in _zend_hash_del_el_ex()
991 HT_HASH(ht, p->h | ht->nTableMask) = Z_NEXT(p->val); in _zend_hash_del_el_ex()
1018 if (p->key) { in _zend_hash_del_el_ex()
1019 zend_string_release(p->key); in _zend_hash_del_el_ex()
1023 ZVAL_COPY_VALUE(&tmp, &p->val); in _zend_hash_del_el_ex()
1024 ZVAL_UNDEF(&p->val); in _zend_hash_del_el_ex()
1027 ZVAL_UNDEF(&p->val); in _zend_hash_del_el_ex()
1032 static zend_always_inline void _zend_hash_del_el(HashTable *ht, uint32_t idx, Bucket *p) in _zend_hash_del_el() argument
1037 uint32_t nIndex = p->h | ht->nTableMask; in _zend_hash_del_el()
1049 _zend_hash_del_el_ex(ht, idx, p, prev); in _zend_hash_del_el()
1052 ZEND_API void ZEND_FASTCALL zend_hash_del_bucket(HashTable *ht, Bucket *p) in zend_hash_del_bucket() argument
1056 _zend_hash_del_el(ht, HT_IDX_TO_HASH(p - ht->arData), p); in zend_hash_del_bucket()
1064 Bucket *p; in zend_hash_del() local
1075 p = HT_HASH_TO_BUCKET(ht, idx); in zend_hash_del()
1076 if ((p->key == key) || in zend_hash_del()
1077 (p->h == h && in zend_hash_del()
1078 p->key && in zend_hash_del()
1079 ZSTR_LEN(p->key) == ZSTR_LEN(key) && in zend_hash_del()
1080 memcmp(ZSTR_VAL(p->key), ZSTR_VAL(key), ZSTR_LEN(key)) == 0)) { in zend_hash_del()
1081 _zend_hash_del_el_ex(ht, idx, p, prev); in zend_hash_del()
1084 prev = p; in zend_hash_del()
1085 idx = Z_NEXT(p->val); in zend_hash_del()
1095 Bucket *p; in zend_hash_del_ind() local
1106 p = HT_HASH_TO_BUCKET(ht, idx); in zend_hash_del_ind()
1107 if ((p->key == key) || in zend_hash_del_ind()
1108 (p->h == h && in zend_hash_del_ind()
1109 p->key && in zend_hash_del_ind()
1110 ZSTR_LEN(p->key) == ZSTR_LEN(key) && in zend_hash_del_ind()
1111 memcmp(ZSTR_VAL(p->key), ZSTR_VAL(key), ZSTR_LEN(key)) == 0)) { in zend_hash_del_ind()
1112 if (Z_TYPE(p->val) == IS_INDIRECT) { in zend_hash_del_ind()
1113 zval *data = Z_INDIRECT(p->val); in zend_hash_del_ind()
1129 _zend_hash_del_el_ex(ht, idx, p, prev); in zend_hash_del_ind()
1133 prev = p; in zend_hash_del_ind()
1134 idx = Z_NEXT(p->val); in zend_hash_del_ind()
1144 Bucket *p; in zend_hash_str_del_ind() local
1155 p = HT_HASH_TO_BUCKET(ht, idx); in zend_hash_str_del_ind()
1156 if ((p->h == h) in zend_hash_str_del_ind()
1157 && p->key in zend_hash_str_del_ind()
1158 && (ZSTR_LEN(p->key) == len) in zend_hash_str_del_ind()
1159 && !memcmp(ZSTR_VAL(p->key), str, len)) { in zend_hash_str_del_ind()
1160 if (Z_TYPE(p->val) == IS_INDIRECT) { in zend_hash_str_del_ind()
1161 zval *data = Z_INDIRECT(p->val); in zend_hash_str_del_ind()
1173 _zend_hash_del_el_ex(ht, idx, p, prev); in zend_hash_str_del_ind()
1177 prev = p; in zend_hash_str_del_ind()
1178 idx = Z_NEXT(p->val); in zend_hash_str_del_ind()
1188 Bucket *p; in zend_hash_str_del() local
1199 p = HT_HASH_TO_BUCKET(ht, idx); in zend_hash_str_del()
1200 if ((p->h == h) in zend_hash_str_del()
1201 && p->key in zend_hash_str_del()
1202 && (ZSTR_LEN(p->key) == len) in zend_hash_str_del()
1203 && !memcmp(ZSTR_VAL(p->key), str, len)) { in zend_hash_str_del()
1204 _zend_hash_del_el_ex(ht, idx, p, prev); in zend_hash_str_del()
1207 prev = p; in zend_hash_str_del()
1208 idx = Z_NEXT(p->val); in zend_hash_str_del()
1217 Bucket *p; in zend_hash_index_del() local
1225 p = ht->arData + h; in zend_hash_index_del()
1226 if (Z_TYPE(p->val) != IS_UNDEF) { in zend_hash_index_del()
1227 _zend_hash_del_el_ex(ht, HT_IDX_TO_HASH(h), p, NULL); in zend_hash_index_del()
1237 p = HT_HASH_TO_BUCKET(ht, idx); in zend_hash_index_del()
1238 if ((p->h == h) && (p->key == NULL)) { in zend_hash_index_del()
1239 _zend_hash_del_el_ex(ht, idx, p, prev); in zend_hash_index_del()
1242 prev = p; in zend_hash_index_del()
1243 idx = Z_NEXT(p->val); in zend_hash_index_del()
1250 Bucket *p, *end; in zend_hash_destroy() local
1256 p = ht->arData; in zend_hash_destroy()
1257 end = p + ht->nNumUsed; in zend_hash_destroy()
1264 ht->pDestructor(&p->val); in zend_hash_destroy()
1265 } while (++p != end); in zend_hash_destroy()
1268 if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF)) { in zend_hash_destroy()
1269 ht->pDestructor(&p->val); in zend_hash_destroy()
1271 } while (++p != end); in zend_hash_destroy()
1275 ht->pDestructor(&p->val); in zend_hash_destroy()
1276 if (EXPECTED(p->key)) { in zend_hash_destroy()
1277 zend_string_release(p->key); in zend_hash_destroy()
1279 } while (++p != end); in zend_hash_destroy()
1282 if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF)) { in zend_hash_destroy()
1283 ht->pDestructor(&p->val); in zend_hash_destroy()
1284 if (EXPECTED(p->key)) { in zend_hash_destroy()
1285 zend_string_release(p->key); in zend_hash_destroy()
1288 } while (++p != end); in zend_hash_destroy()
1295 if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF)) { in zend_hash_destroy()
1296 if (EXPECTED(p->key)) { in zend_hash_destroy()
1297 zend_string_release(p->key); in zend_hash_destroy()
1300 } while (++p != end); in zend_hash_destroy()
1312 Bucket *p, *end; in zend_array_destroy() local
1328 p = ht->arData; in zend_array_destroy()
1329 end = p + ht->nNumUsed; in zend_array_destroy()
1334 i_zval_ptr_dtor(&p->val ZEND_FILE_LINE_CC); in zend_array_destroy()
1335 } while (++p != end); in zend_array_destroy()
1338 i_zval_ptr_dtor(&p->val ZEND_FILE_LINE_CC); in zend_array_destroy()
1339 if (EXPECTED(p->key)) { in zend_array_destroy()
1340 zend_string_release(p->key); in zend_array_destroy()
1342 } while (++p != end); in zend_array_destroy()
1345 if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF)) { in zend_array_destroy()
1346 i_zval_ptr_dtor(&p->val ZEND_FILE_LINE_CC); in zend_array_destroy()
1347 if (EXPECTED(p->key)) { in zend_array_destroy()
1348 zend_string_release(p->key); in zend_array_destroy()
1351 } while (++p != end); in zend_array_destroy()
1365 Bucket *p, *end; in zend_hash_clean() local
1371 p = ht->arData; in zend_hash_clean()
1372 end = p + ht->nNumUsed; in zend_hash_clean()
1377 ht->pDestructor(&p->val); in zend_hash_clean()
1378 } while (++p != end); in zend_hash_clean()
1381 if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF)) { in zend_hash_clean()
1382 ht->pDestructor(&p->val); in zend_hash_clean()
1384 } while (++p != end); in zend_hash_clean()
1388 ht->pDestructor(&p->val); in zend_hash_clean()
1389 if (EXPECTED(p->key)) { in zend_hash_clean()
1390 zend_string_release(p->key); in zend_hash_clean()
1392 } while (++p != end); in zend_hash_clean()
1395 if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF)) { in zend_hash_clean()
1396 ht->pDestructor(&p->val); in zend_hash_clean()
1397 if (EXPECTED(p->key)) { in zend_hash_clean()
1398 zend_string_release(p->key); in zend_hash_clean()
1401 } while (++p != end); in zend_hash_clean()
1407 if (EXPECTED(p->key)) { in zend_hash_clean()
1408 zend_string_release(p->key); in zend_hash_clean()
1410 } while (++p != end); in zend_hash_clean()
1413 if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF)) { in zend_hash_clean()
1414 if (EXPECTED(p->key)) { in zend_hash_clean()
1415 zend_string_release(p->key); in zend_hash_clean()
1418 } while (++p != end); in zend_hash_clean()
1434 Bucket *p, *end; in zend_symtable_clean() local
1440 p = ht->arData; in zend_symtable_clean()
1441 end = p + ht->nNumUsed; in zend_symtable_clean()
1444 i_zval_ptr_dtor(&p->val ZEND_FILE_LINE_CC); in zend_symtable_clean()
1445 } while (++p != end); in zend_symtable_clean()
1448 i_zval_ptr_dtor(&p->val ZEND_FILE_LINE_CC); in zend_symtable_clean()
1449 if (EXPECTED(p->key)) { in zend_symtable_clean()
1450 zend_string_release(p->key); in zend_symtable_clean()
1452 } while (++p != end); in zend_symtable_clean()
1455 if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF)) { in zend_symtable_clean()
1456 i_zval_ptr_dtor(&p->val ZEND_FILE_LINE_CC); in zend_symtable_clean()
1457 if (EXPECTED(p->key)) { in zend_symtable_clean()
1458 zend_string_release(p->key); in zend_symtable_clean()
1461 } while (++p != end); in zend_symtable_clean()
1474 Bucket *p; in zend_hash_graceful_destroy() local
1479 p = ht->arData; in zend_hash_graceful_destroy()
1480 for (idx = 0; idx < ht->nNumUsed; idx++, p++) { in zend_hash_graceful_destroy()
1481 if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) continue; in zend_hash_graceful_destroy()
1482 _zend_hash_del_el(ht, HT_IDX_TO_HASH(idx), p); in zend_hash_graceful_destroy()
1494 Bucket *p; in zend_hash_graceful_reverse_destroy() local
1500 p = ht->arData + ht->nNumUsed; in zend_hash_graceful_reverse_destroy()
1503 p--; in zend_hash_graceful_reverse_destroy()
1504 if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) continue; in zend_hash_graceful_reverse_destroy()
1505 _zend_hash_del_el(ht, HT_IDX_TO_HASH(idx), p); in zend_hash_graceful_reverse_destroy()
1527 Bucket *p; in zend_hash_apply() local
1535 p = ht->arData + idx; in zend_hash_apply()
1536 if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) continue; in zend_hash_apply()
1537 result = apply_func(&p->val); in zend_hash_apply()
1540 _zend_hash_del_el(ht, HT_IDX_TO_HASH(idx), p); in zend_hash_apply()
1553 Bucket *p; in zend_hash_apply_with_argument() local
1561 p = ht->arData + idx; in zend_hash_apply_with_argument()
1562 if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) continue; in zend_hash_apply_with_argument()
1563 result = apply_func(&p->val, argument); in zend_hash_apply_with_argument()
1566 _zend_hash_del_el(ht, HT_IDX_TO_HASH(idx), p); in zend_hash_apply_with_argument()
1579 Bucket *p; in zend_hash_apply_with_arguments() local
1590 p = ht->arData + idx; in zend_hash_apply_with_arguments()
1591 if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) continue; in zend_hash_apply_with_arguments()
1593 hash_key.h = p->h; in zend_hash_apply_with_arguments()
1594 hash_key.key = p->key; in zend_hash_apply_with_arguments()
1596 result = apply_func(&p->val, num_args, args, &hash_key); in zend_hash_apply_with_arguments()
1599 _zend_hash_del_el(ht, HT_IDX_TO_HASH(idx), p); in zend_hash_apply_with_arguments()
1615 Bucket *p; in zend_hash_reverse_apply() local
1625 p = ht->arData + idx; in zend_hash_reverse_apply()
1626 if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) continue; in zend_hash_reverse_apply()
1628 result = apply_func(&p->val); in zend_hash_reverse_apply()
1631 _zend_hash_del_el(ht, HT_IDX_TO_HASH(idx), p); in zend_hash_reverse_apply()
1644 Bucket *p; in zend_hash_copy() local
1654 p = source->arData + idx; in zend_hash_copy()
1655 if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) continue; in zend_hash_copy()
1661 data = &p->val; in zend_hash_copy()
1668 if (p->key) { in zend_hash_copy()
1669 new_entry = zend_hash_update(target, p->key, data); in zend_hash_copy()
1671 new_entry = zend_hash_index_update(target, p->h, data); in zend_hash_copy()
1687 …ray_dup_element(HashTable *source, HashTable *target, uint32_t idx, Bucket *p, Bucket *q, int pack… in zend_array_dup_element() argument
1689 zval *data = &p->val; in zend_array_dup_element()
1723 q->h = p->h; in zend_array_dup_element()
1729 q->key = p->key; in zend_array_dup_element()
1743 Bucket *p = source->arData; in zend_array_dup_packed_elements() local
1745 Bucket *end = p + source->nNumUsed; in zend_array_dup_packed_elements()
1748 if (!zend_array_dup_element(source, target, 0, p, q, 1, 1, with_holes)) { in zend_array_dup_packed_elements()
1753 p++; q++; in zend_array_dup_packed_elements()
1754 } while (p != end); in zend_array_dup_packed_elements()
1760 Bucket *p = source->arData; in zend_array_dup_elements() local
1762 Bucket *end = p + source->nNumUsed; in zend_array_dup_elements()
1765 if (!zend_array_dup_element(source, target, idx, p, q, 0, static_keys, with_holes)) { in zend_array_dup_elements()
1768 idx++; p++; in zend_array_dup_elements()
1769 while (p != end) { in zend_array_dup_elements()
1770 if (zend_array_dup_element(source, target, target_idx, p, q, 0, static_keys, with_holes)) { in zend_array_dup_elements()
1776 idx++; p++; in zend_array_dup_elements()
1780 idx++; p++; q++; in zend_array_dup_elements()
1781 } while (p != end); in zend_array_dup_elements()
1882 Bucket *p; in _zend_hash_merge() local
1891 p = source->arData + idx; in _zend_hash_merge()
1892 if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) continue; in _zend_hash_merge()
1893 if (UNEXPECTED(Z_TYPE(p->val) == IS_INDIRECT) && in _zend_hash_merge()
1894 UNEXPECTED(Z_TYPE_P(Z_INDIRECT(p->val)) == IS_UNDEF)) { in _zend_hash_merge()
1897 if (p->key) { in _zend_hash_merge()
1898 …t = _zend_hash_add_or_update_i(target, p->key, &p->val, HASH_UPDATE | HASH_UPDATE_INDIRECT ZEND_FI… in _zend_hash_merge()
1903 t = zend_hash_index_update(target, p->h, &p->val); in _zend_hash_merge()
1911 p = source->arData + idx; in _zend_hash_merge()
1912 if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) continue; in _zend_hash_merge()
1913 if (UNEXPECTED(Z_TYPE(p->val) == IS_INDIRECT) && in _zend_hash_merge()
1914 UNEXPECTED(Z_TYPE_P(Z_INDIRECT(p->val)) == IS_UNDEF)) { in _zend_hash_merge()
1917 if (p->key) { in _zend_hash_merge()
1918 …t = _zend_hash_add_or_update_i(target, p->key, &p->val, HASH_ADD | HASH_UPDATE_INDIRECT ZEND_FILE_… in _zend_hash_merge()
1923 t = zend_hash_index_add(target, p->h, &p->val); in _zend_hash_merge()
1940 …_hash_replace_checker_wrapper(HashTable *target, zval *source_data, Bucket *p, void *pParam, merge… in zend_hash_replace_checker_wrapper() argument
1944 hash_key.h = p->h; in zend_hash_replace_checker_wrapper()
1945 hash_key.key = p->key; in zend_hash_replace_checker_wrapper()
1953 Bucket *p; in zend_hash_merge_ex() local
1961 p = source->arData + idx; in zend_hash_merge_ex()
1962 if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) continue; in zend_hash_merge_ex()
1963 if (zend_hash_replace_checker_wrapper(target, &p->val, p, pParam, pMergeSource)) { in zend_hash_merge_ex()
1964 t = zend_hash_update(target, p->key, &p->val); in zend_hash_merge_ex()
1983 Bucket *p; in zend_hash_find() local
1987 p = zend_hash_find_bucket(ht, key); in zend_hash_find()
1988 return p ? &p->val : NULL; in zend_hash_find()
1994 Bucket *p; in zend_hash_str_find() local
1999 p = zend_hash_str_find_bucket(ht, str, len, h); in zend_hash_str_find()
2000 return p ? &p->val : NULL; in zend_hash_str_find()
2005 Bucket *p; in zend_hash_exists() local
2009 p = zend_hash_find_bucket(ht, key); in zend_hash_exists()
2010 return p ? 1 : 0; in zend_hash_exists()
2016 Bucket *p; in zend_hash_str_exists() local
2021 p = zend_hash_str_find_bucket(ht, str, len, h); in zend_hash_str_exists()
2022 return p ? 1 : 0; in zend_hash_str_exists()
2027 Bucket *p; in zend_hash_index_find() local
2033 p = ht->arData + h; in zend_hash_index_find()
2034 if (Z_TYPE(p->val) != IS_UNDEF) { in zend_hash_index_find()
2035 return &p->val; in zend_hash_index_find()
2041 p = zend_hash_index_find_bucket(ht, h); in zend_hash_index_find()
2042 return p ? &p->val : NULL; in zend_hash_index_find()
2048 Bucket *p; in zend_hash_index_exists() local
2061 p = zend_hash_index_find_bucket(ht, h); in zend_hash_index_exists()
2062 return p ? 1 : 0; in zend_hash_index_exists()
2156 Bucket *p; in zend_hash_get_current_key_ex() local
2160 p = ht->arData + idx; in zend_hash_get_current_key_ex()
2161 if (p->key) { in zend_hash_get_current_key_ex()
2162 *str_index = p->key; in zend_hash_get_current_key_ex()
2165 *num_index = p->h; in zend_hash_get_current_key_ex()
2175 Bucket *p; in zend_hash_get_current_key_zval_ex() local
2181 p = ht->arData + idx; in zend_hash_get_current_key_zval_ex()
2182 if (p->key) { in zend_hash_get_current_key_zval_ex()
2183 ZVAL_STR_COPY(key, p->key); in zend_hash_get_current_key_zval_ex()
2185 ZVAL_LONG(key, p->h); in zend_hash_get_current_key_zval_ex()
2193 Bucket *p; in zend_hash_get_current_key_type_ex() local
2197 p = ht->arData + idx; in zend_hash_get_current_key_type_ex()
2198 if (p->key) { in zend_hash_get_current_key_type_ex()
2211 Bucket *p; in zend_hash_get_current_data_ex() local
2215 p = ht->arData + idx; in zend_hash_get_current_data_ex()
2216 return &p->val; in zend_hash_get_current_data_ex()
2222 ZEND_API void zend_hash_bucket_swap(Bucket *p, Bucket *q) in zend_hash_bucket_swap() argument
2228 ZVAL_COPY_VALUE(&val, &p->val); in zend_hash_bucket_swap()
2229 h = p->h; in zend_hash_bucket_swap()
2230 key = p->key; in zend_hash_bucket_swap()
2232 ZVAL_COPY_VALUE(&p->val, &q->val); in zend_hash_bucket_swap()
2233 p->h = q->h; in zend_hash_bucket_swap()
2234 p->key = q->key; in zend_hash_bucket_swap()
2241 ZEND_API void zend_hash_bucket_renum_swap(Bucket *p, Bucket *q) in zend_hash_bucket_renum_swap() argument
2245 ZVAL_COPY_VALUE(&val, &p->val); in zend_hash_bucket_renum_swap()
2246 ZVAL_COPY_VALUE(&p->val, &q->val); in zend_hash_bucket_renum_swap()
2250 ZEND_API void zend_hash_bucket_packed_swap(Bucket *p, Bucket *q) in zend_hash_bucket_packed_swap() argument
2255 ZVAL_COPY_VALUE(&val, &p->val); in zend_hash_bucket_packed_swap()
2256 h = p->h; in zend_hash_bucket_packed_swap()
2258 ZVAL_COPY_VALUE(&p->val, &q->val); in zend_hash_bucket_packed_swap()
2259 p->h = q->h; in zend_hash_bucket_packed_swap()
2267 Bucket *p; in zend_hash_sort_ex() local
2281 p = ht->arData + j; in zend_hash_sort_ex()
2282 if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) continue; in zend_hash_sort_ex()
2284 ht->arData[i] = *p; in zend_hash_sort_ex()
2300 p = ht->arData + j; in zend_hash_sort_ex()
2301 p->h = j; in zend_hash_sort_ex()
2302 if (p->key) { in zend_hash_sort_ex()
2303 zend_string_release(p->key); in zend_hash_sort_ex()
2304 p->key = NULL; in zend_hash_sort_ex()
2433 Bucket *p, *res; in zend_hash_minmax() local
2451 p = ht->arData + idx; in zend_hash_minmax()
2452 if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) continue; in zend_hash_minmax()
2455 if (compar(res, p) < 0) { /* max */ in zend_hash_minmax()
2456 res = p; in zend_hash_minmax()
2459 if (compar(res, p) > 0) { /* min */ in zend_hash_minmax()
2460 res = p; in zend_hash_minmax()