Lines Matching refs:p
285 Bucket *p; in zend_new_pair() local
291 p = ht->arData; in zend_new_pair()
292 ZVAL_COPY_VALUE(&p->val, val1); in zend_new_pair()
293 p->h = 0; in zend_new_pair()
294 p->key = NULL; in zend_new_pair()
296 p++; in zend_new_pair()
297 ZVAL_COPY_VALUE(&p->val, val2); in zend_new_pair()
298 p->h = 1; in zend_new_pair()
299 p->key = NULL; in zend_new_pair()
404 Bucket *p, *end, *arData; in zend_hash_discard() local
408 p = arData + ht->nNumUsed; in zend_hash_discard()
411 while (p != end) { in zend_hash_discard()
412 p--; in zend_hash_discard()
413 if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) continue; in zend_hash_discard()
417 if (!(Z_NEXT(p->val) == HT_INVALID_IDX || HT_HASH_TO_BUCKET_EX(arData, Z_NEXT(p->val)) < p)) { in zend_hash_discard()
421 nIndex = p->h | ht->nTableMask; in zend_hash_discard()
422 HT_HASH_EX(arData, nIndex) = Z_NEXT(p->val); in zend_hash_discard()
644 Bucket *p, *arData; in zend_hash_find_bucket() local
658 p = HT_HASH_TO_BUCKET_EX(arData, idx); in zend_hash_find_bucket()
659 if (EXPECTED(p->key == key)) { /* check for the same interned string */ in zend_hash_find_bucket()
660 return p; in zend_hash_find_bucket()
664 if (p->h == ZSTR_H(key) && in zend_hash_find_bucket()
665 EXPECTED(p->key) && in zend_hash_find_bucket()
666 zend_string_equal_content(p->key, key)) { in zend_hash_find_bucket()
667 return p; in zend_hash_find_bucket()
669 idx = Z_NEXT(p->val); in zend_hash_find_bucket()
673 p = HT_HASH_TO_BUCKET_EX(arData, idx); in zend_hash_find_bucket()
674 if (p->key == key) { /* check for the same interned string */ in zend_hash_find_bucket()
675 return p; in zend_hash_find_bucket()
684 Bucket *p, *arData; in zend_hash_str_find_bucket() local
691 p = HT_HASH_TO_BUCKET_EX(arData, idx); in zend_hash_str_find_bucket()
692 if ((p->h == h) in zend_hash_str_find_bucket()
693 && p->key in zend_hash_str_find_bucket()
694 && (ZSTR_LEN(p->key) == len) in zend_hash_str_find_bucket()
695 && !memcmp(ZSTR_VAL(p->key), str, len)) { in zend_hash_str_find_bucket()
696 return p; in zend_hash_str_find_bucket()
698 idx = Z_NEXT(p->val); in zend_hash_str_find_bucket()
707 Bucket *p, *arData; in zend_hash_index_find_bucket() local
714 p = HT_HASH_TO_BUCKET_EX(arData, idx); in zend_hash_index_find_bucket()
715 if (p->h == h && !p->key) { in zend_hash_index_find_bucket()
716 return p; in zend_hash_index_find_bucket()
718 idx = Z_NEXT(p->val); in zend_hash_index_find_bucket()
728 Bucket *p, *arData; in _zend_hash_add_or_update_i() local
751 p = zend_hash_find_bucket(ht, key, 0); in _zend_hash_add_or_update_i()
753 if (p) { in _zend_hash_add_or_update_i()
761 ZEND_ASSERT(&p->val != pData); in _zend_hash_add_or_update_i()
762 data = &p->val; in _zend_hash_add_or_update_i()
772 ZEND_ASSERT(&p->val != pData); in _zend_hash_add_or_update_i()
773 data = &p->val; in _zend_hash_add_or_update_i()
800 p = arData + idx; in _zend_hash_add_or_update_i()
801 p->key = key; in _zend_hash_add_or_update_i()
802 p->h = h = ZSTR_H(key); in _zend_hash_add_or_update_i()
804 Z_NEXT(p->val) = HT_HASH_EX(arData, nIndex); in _zend_hash_add_or_update_i()
806 ZVAL_COPY_VALUE(&p->val, pData); in _zend_hash_add_or_update_i()
808 return &p->val; in _zend_hash_add_or_update_i()
816 Bucket *p; in _zend_hash_str_add_or_update_i() local
829 p = zend_hash_str_find_bucket(ht, str, len, h); in _zend_hash_str_add_or_update_i()
831 if (p) { in _zend_hash_str_add_or_update_i()
838 ZEND_ASSERT(&p->val != pData); in _zend_hash_str_add_or_update_i()
839 data = &p->val; in _zend_hash_str_add_or_update_i()
849 ZEND_ASSERT(&p->val != pData); in _zend_hash_str_add_or_update_i()
850 data = &p->val; in _zend_hash_str_add_or_update_i()
868 p = ht->arData + idx; in _zend_hash_str_add_or_update_i()
869 p->key = key = zend_string_init(str, len, GC_FLAGS(ht) & IS_ARRAY_PERSISTENT); in _zend_hash_str_add_or_update_i()
870 p->h = ZSTR_H(key) = h; in _zend_hash_str_add_or_update_i()
872 ZVAL_COPY_VALUE(&p->val, pData); in _zend_hash_str_add_or_update_i()
874 Z_NEXT(p->val) = HT_HASH(ht, nIndex); in _zend_hash_str_add_or_update_i()
877 return &p->val; in _zend_hash_str_add_or_update_i()
984 Bucket *p; in _zend_hash_index_add_or_update_i() local
995 p = ht->arData + h; in _zend_hash_index_add_or_update_i()
996 if (Z_TYPE(p->val) != IS_UNDEF) { in _zend_hash_index_add_or_update_i()
1002 ht->pDestructor(&p->val); in _zend_hash_index_add_or_update_i()
1004 ZVAL_COPY_VALUE(&p->val, pData); in _zend_hash_index_add_or_update_i()
1005 return &p->val; in _zend_hash_index_add_or_update_i()
1011 p = ht->arData + h; in _zend_hash_index_add_or_update_i()
1016 while (q != p) { in _zend_hash_index_add_or_update_i()
1043 p = zend_hash_index_find_bucket(ht, h); in _zend_hash_index_add_or_update_i()
1044 if (p) { in _zend_hash_index_add_or_update_i()
1054 p = ht->arData + idx; in _zend_hash_index_add_or_update_i()
1055 Z_NEXT(p->val) = HT_HASH(ht, nIndex); in _zend_hash_index_add_or_update_i()
1062 p->h = h; in _zend_hash_index_add_or_update_i()
1063 p->key = NULL; in _zend_hash_index_add_or_update_i()
1064 ZVAL_COPY_VALUE(&p->val, pData); in _zend_hash_index_add_or_update_i()
1066 return &p->val; in _zend_hash_index_add_or_update_i()
1116 Bucket *p, *arData; in zend_hash_set_bucket_key() local
1122 p = zend_hash_find_bucket(ht, key, 0); in zend_hash_set_bucket_key()
1123 if (UNEXPECTED(p)) { in zend_hash_set_bucket_key()
1124 return (p == b) ? &p->val : NULL; in zend_hash_set_bucket_key()
1141 p = HT_HASH_TO_BUCKET_EX(arData, i); in zend_hash_set_bucket_key()
1142 while (Z_NEXT(p->val) != idx) { in zend_hash_set_bucket_key()
1143 i = Z_NEXT(p->val); in zend_hash_set_bucket_key()
1144 p = HT_HASH_TO_BUCKET_EX(arData, i); in zend_hash_set_bucket_key()
1146 Z_NEXT(p->val) = Z_NEXT(b->val); in zend_hash_set_bucket_key()
1161 p = HT_HASH_TO_BUCKET_EX(arData, i); in zend_hash_set_bucket_key()
1162 while (Z_NEXT(p->val) != HT_INVALID_IDX && Z_NEXT(p->val) > idx) { in zend_hash_set_bucket_key()
1163 i = Z_NEXT(p->val); in zend_hash_set_bucket_key()
1164 p = HT_HASH_TO_BUCKET_EX(arData, i); in zend_hash_set_bucket_key()
1166 Z_NEXT(b->val) = Z_NEXT(p->val); in zend_hash_set_bucket_key()
1167 Z_NEXT(p->val) = idx; in zend_hash_set_bucket_key()
1199 Bucket *p; in zend_hash_rehash() local
1214 p = ht->arData; in zend_hash_rehash()
1217 nIndex = p->h | ht->nTableMask; in zend_hash_rehash()
1218 Z_NEXT(p->val) = HT_HASH(ht, nIndex); in zend_hash_rehash()
1220 p++; in zend_hash_rehash()
1225 if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) { in zend_hash_rehash()
1227 Bucket *q = p; in zend_hash_rehash()
1231 p++; in zend_hash_rehash()
1232 if (EXPECTED(Z_TYPE_INFO(p->val) != IS_UNDEF)) { in zend_hash_rehash()
1233 ZVAL_COPY_VALUE(&q->val, &p->val); in zend_hash_rehash()
1234 q->h = p->h; in zend_hash_rehash()
1236 q->key = p->key; in zend_hash_rehash()
1250 p++; in zend_hash_rehash()
1251 if (EXPECTED(Z_TYPE_INFO(p->val) != IS_UNDEF)) { in zend_hash_rehash()
1252 ZVAL_COPY_VALUE(&q->val, &p->val); in zend_hash_rehash()
1253 q->h = p->h; in zend_hash_rehash()
1255 q->key = p->key; in zend_hash_rehash()
1275 nIndex = p->h | ht->nTableMask; in zend_hash_rehash()
1276 Z_NEXT(p->val) = HT_HASH(ht, nIndex); in zend_hash_rehash()
1278 p++; in zend_hash_rehash()
1289 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
1293 Z_NEXT(prev->val) = Z_NEXT(p->val); in _zend_hash_del_el_ex()
1295 HT_HASH(ht, p->h | ht->nTableMask) = Z_NEXT(p->val); in _zend_hash_del_el_ex()
1323 if (p->key) { in _zend_hash_del_el_ex()
1324 zend_string_release(p->key); in _zend_hash_del_el_ex()
1328 ZVAL_COPY_VALUE(&tmp, &p->val); in _zend_hash_del_el_ex()
1329 ZVAL_UNDEF(&p->val); in _zend_hash_del_el_ex()
1332 ZVAL_UNDEF(&p->val); in _zend_hash_del_el_ex()
1336 static zend_always_inline void _zend_hash_del_el(HashTable *ht, uint32_t idx, Bucket *p) in _zend_hash_del_el() argument
1341 uint32_t nIndex = p->h | ht->nTableMask; in _zend_hash_del_el()
1353 _zend_hash_del_el_ex(ht, idx, p, prev); in _zend_hash_del_el()
1356 ZEND_API void ZEND_FASTCALL zend_hash_del_bucket(HashTable *ht, Bucket *p) in zend_hash_del_bucket() argument
1360 _zend_hash_del_el(ht, HT_IDX_TO_HASH(p - ht->arData), p); in zend_hash_del_bucket()
1368 Bucket *p; in zend_hash_del() local
1379 p = HT_HASH_TO_BUCKET(ht, idx); in zend_hash_del()
1380 if ((p->key == key) || in zend_hash_del()
1381 (p->h == h && in zend_hash_del()
1382 p->key && in zend_hash_del()
1383 zend_string_equal_content(p->key, key))) { in zend_hash_del()
1384 _zend_hash_del_el_ex(ht, idx, p, prev); in zend_hash_del()
1387 prev = p; in zend_hash_del()
1388 idx = Z_NEXT(p->val); in zend_hash_del()
1398 Bucket *p; in zend_hash_del_ind() local
1409 p = HT_HASH_TO_BUCKET(ht, idx); in zend_hash_del_ind()
1410 if ((p->key == key) || in zend_hash_del_ind()
1411 (p->h == h && in zend_hash_del_ind()
1412 p->key && in zend_hash_del_ind()
1413 zend_string_equal_content(p->key, key))) { in zend_hash_del_ind()
1414 if (Z_TYPE(p->val) == IS_INDIRECT) { in zend_hash_del_ind()
1415 zval *data = Z_INDIRECT(p->val); in zend_hash_del_ind()
1431 _zend_hash_del_el_ex(ht, idx, p, prev); in zend_hash_del_ind()
1435 prev = p; in zend_hash_del_ind()
1436 idx = Z_NEXT(p->val); in zend_hash_del_ind()
1446 Bucket *p; in zend_hash_str_del_ind() local
1457 p = HT_HASH_TO_BUCKET(ht, idx); in zend_hash_str_del_ind()
1458 if ((p->h == h) in zend_hash_str_del_ind()
1459 && p->key in zend_hash_str_del_ind()
1460 && (ZSTR_LEN(p->key) == len) in zend_hash_str_del_ind()
1461 && !memcmp(ZSTR_VAL(p->key), str, len)) { in zend_hash_str_del_ind()
1462 if (Z_TYPE(p->val) == IS_INDIRECT) { in zend_hash_str_del_ind()
1463 zval *data = Z_INDIRECT(p->val); in zend_hash_str_del_ind()
1475 _zend_hash_del_el_ex(ht, idx, p, prev); in zend_hash_str_del_ind()
1479 prev = p; in zend_hash_str_del_ind()
1480 idx = Z_NEXT(p->val); in zend_hash_str_del_ind()
1490 Bucket *p; in zend_hash_str_del() local
1501 p = HT_HASH_TO_BUCKET(ht, idx); in zend_hash_str_del()
1502 if ((p->h == h) in zend_hash_str_del()
1503 && p->key in zend_hash_str_del()
1504 && (ZSTR_LEN(p->key) == len) in zend_hash_str_del()
1505 && !memcmp(ZSTR_VAL(p->key), str, len)) { in zend_hash_str_del()
1506 _zend_hash_del_el_ex(ht, idx, p, prev); in zend_hash_str_del()
1509 prev = p; in zend_hash_str_del()
1510 idx = Z_NEXT(p->val); in zend_hash_str_del()
1519 Bucket *p; in zend_hash_index_del() local
1527 p = ht->arData + h; in zend_hash_index_del()
1528 if (Z_TYPE(p->val) != IS_UNDEF) { in zend_hash_index_del()
1529 _zend_hash_del_el_ex(ht, HT_IDX_TO_HASH(h), p, NULL); in zend_hash_index_del()
1539 p = HT_HASH_TO_BUCKET(ht, idx); in zend_hash_index_del()
1540 if ((p->h == h) && (p->key == NULL)) { in zend_hash_index_del()
1541 _zend_hash_del_el_ex(ht, idx, p, prev); in zend_hash_index_del()
1544 prev = p; in zend_hash_index_del()
1545 idx = Z_NEXT(p->val); in zend_hash_index_del()
1552 Bucket *p, *end; in zend_hash_destroy() local
1558 p = ht->arData; in zend_hash_destroy()
1559 end = p + ht->nNumUsed; in zend_hash_destroy()
1566 ht->pDestructor(&p->val); in zend_hash_destroy()
1567 } while (++p != end); in zend_hash_destroy()
1570 if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF)) { in zend_hash_destroy()
1571 ht->pDestructor(&p->val); in zend_hash_destroy()
1573 } while (++p != end); in zend_hash_destroy()
1577 ht->pDestructor(&p->val); in zend_hash_destroy()
1578 if (EXPECTED(p->key)) { in zend_hash_destroy()
1579 zend_string_release(p->key); in zend_hash_destroy()
1581 } while (++p != end); in zend_hash_destroy()
1584 if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF)) { in zend_hash_destroy()
1585 ht->pDestructor(&p->val); in zend_hash_destroy()
1586 if (EXPECTED(p->key)) { in zend_hash_destroy()
1587 zend_string_release(p->key); in zend_hash_destroy()
1590 } while (++p != end); in zend_hash_destroy()
1597 if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF)) { in zend_hash_destroy()
1598 if (EXPECTED(p->key)) { in zend_hash_destroy()
1599 zend_string_release(p->key); in zend_hash_destroy()
1602 } while (++p != end); in zend_hash_destroy()
1614 Bucket *p, *end; in zend_array_destroy() local
1630 p = ht->arData; in zend_array_destroy()
1631 end = p + ht->nNumUsed; in zend_array_destroy()
1636 i_zval_ptr_dtor(&p->val); in zend_array_destroy()
1637 } while (++p != end); in zend_array_destroy()
1640 i_zval_ptr_dtor(&p->val); in zend_array_destroy()
1641 if (EXPECTED(p->key)) { in zend_array_destroy()
1642 zend_string_release_ex(p->key, 0); in zend_array_destroy()
1644 } while (++p != end); in zend_array_destroy()
1647 if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF)) { in zend_array_destroy()
1648 i_zval_ptr_dtor(&p->val); in zend_array_destroy()
1649 if (EXPECTED(p->key)) { in zend_array_destroy()
1650 zend_string_release_ex(p->key, 0); in zend_array_destroy()
1653 } while (++p != end); in zend_array_destroy()
1667 Bucket *p, *end; in zend_hash_clean() local
1673 p = ht->arData; in zend_hash_clean()
1674 end = p + ht->nNumUsed; in zend_hash_clean()
1679 ht->pDestructor(&p->val); in zend_hash_clean()
1680 } while (++p != end); in zend_hash_clean()
1683 if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF)) { in zend_hash_clean()
1684 ht->pDestructor(&p->val); in zend_hash_clean()
1686 } while (++p != end); in zend_hash_clean()
1690 ht->pDestructor(&p->val); in zend_hash_clean()
1691 if (EXPECTED(p->key)) { in zend_hash_clean()
1692 zend_string_release(p->key); in zend_hash_clean()
1694 } while (++p != end); in zend_hash_clean()
1697 if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF)) { in zend_hash_clean()
1698 ht->pDestructor(&p->val); in zend_hash_clean()
1699 if (EXPECTED(p->key)) { in zend_hash_clean()
1700 zend_string_release(p->key); in zend_hash_clean()
1703 } while (++p != end); in zend_hash_clean()
1709 if (EXPECTED(p->key)) { in zend_hash_clean()
1710 zend_string_release(p->key); in zend_hash_clean()
1712 } while (++p != end); in zend_hash_clean()
1715 if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF)) { in zend_hash_clean()
1716 if (EXPECTED(p->key)) { in zend_hash_clean()
1717 zend_string_release(p->key); in zend_hash_clean()
1720 } while (++p != end); in zend_hash_clean()
1736 Bucket *p, *end; in zend_symtable_clean() local
1742 p = ht->arData; in zend_symtable_clean()
1743 end = p + ht->nNumUsed; in zend_symtable_clean()
1746 i_zval_ptr_dtor(&p->val); in zend_symtable_clean()
1747 } while (++p != end); in zend_symtable_clean()
1750 i_zval_ptr_dtor(&p->val); in zend_symtable_clean()
1751 if (EXPECTED(p->key)) { in zend_symtable_clean()
1752 zend_string_release(p->key); in zend_symtable_clean()
1754 } while (++p != end); in zend_symtable_clean()
1757 if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF)) { in zend_symtable_clean()
1758 i_zval_ptr_dtor(&p->val); in zend_symtable_clean()
1759 if (EXPECTED(p->key)) { in zend_symtable_clean()
1760 zend_string_release(p->key); in zend_symtable_clean()
1763 } while (++p != end); in zend_symtable_clean()
1776 Bucket *p; in zend_hash_graceful_destroy() local
1781 p = ht->arData; in zend_hash_graceful_destroy()
1782 for (idx = 0; idx < ht->nNumUsed; idx++, p++) { in zend_hash_graceful_destroy()
1783 if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) continue; in zend_hash_graceful_destroy()
1784 _zend_hash_del_el(ht, HT_IDX_TO_HASH(idx), p); in zend_hash_graceful_destroy()
1796 Bucket *p; in zend_hash_graceful_reverse_destroy() local
1802 p = ht->arData + ht->nNumUsed; in zend_hash_graceful_reverse_destroy()
1805 p--; in zend_hash_graceful_reverse_destroy()
1806 if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) continue; in zend_hash_graceful_reverse_destroy()
1807 _zend_hash_del_el(ht, HT_IDX_TO_HASH(idx), p); in zend_hash_graceful_reverse_destroy()
1829 Bucket *p; in zend_hash_apply() local
1835 p = ht->arData + idx; in zend_hash_apply()
1836 if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) continue; in zend_hash_apply()
1837 result = apply_func(&p->val); in zend_hash_apply()
1841 _zend_hash_del_el(ht, HT_IDX_TO_HASH(idx), p); in zend_hash_apply()
1853 Bucket *p; in zend_hash_apply_with_argument() local
1859 p = ht->arData + idx; in zend_hash_apply_with_argument()
1860 if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) continue; in zend_hash_apply_with_argument()
1861 result = apply_func(&p->val, argument); in zend_hash_apply_with_argument()
1865 _zend_hash_del_el(ht, HT_IDX_TO_HASH(idx), p); in zend_hash_apply_with_argument()
1877 Bucket *p; in zend_hash_apply_with_arguments() local
1885 p = ht->arData + idx; in zend_hash_apply_with_arguments()
1886 if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) continue; in zend_hash_apply_with_arguments()
1888 hash_key.h = p->h; in zend_hash_apply_with_arguments()
1889 hash_key.key = p->key; in zend_hash_apply_with_arguments()
1891 result = apply_func(&p->val, num_args, args, &hash_key); in zend_hash_apply_with_arguments()
1895 _zend_hash_del_el(ht, HT_IDX_TO_HASH(idx), p); in zend_hash_apply_with_arguments()
1909 Bucket *p; in zend_hash_reverse_apply() local
1917 p = ht->arData + idx; in zend_hash_reverse_apply()
1918 if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) continue; in zend_hash_reverse_apply()
1920 result = apply_func(&p->val); in zend_hash_reverse_apply()
1924 _zend_hash_del_el(ht, HT_IDX_TO_HASH(idx), p); in zend_hash_reverse_apply()
1936 Bucket *p; in zend_hash_copy() local
1944 p = source->arData + idx; in zend_hash_copy()
1945 if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) continue; in zend_hash_copy()
1948 data = &p->val; in zend_hash_copy()
1955 if (p->key) { in zend_hash_copy()
1956 new_entry = zend_hash_update(target, p->key, data); in zend_hash_copy()
1958 new_entry = zend_hash_index_update(target, p->h, data); in zend_hash_copy()
1967 …ray_dup_element(HashTable *source, HashTable *target, uint32_t idx, Bucket *p, Bucket *q, bool pac… in zend_array_dup_element() argument
1969 zval *data = &p->val; in zend_array_dup_element()
2003 q->h = p->h; in zend_array_dup_element()
2009 q->key = p->key; in zend_array_dup_element()
2023 Bucket *p = source->arData; in zend_array_dup_packed_elements() local
2025 Bucket *end = p + source->nNumUsed; in zend_array_dup_packed_elements()
2028 if (!zend_array_dup_element(source, target, 0, p, q, 1, 1, with_holes)) { in zend_array_dup_packed_elements()
2033 p++; q++; in zend_array_dup_packed_elements()
2034 } while (p != end); in zend_array_dup_packed_elements()
2040 Bucket *p = source->arData; in zend_array_dup_elements() local
2042 Bucket *end = p + source->nNumUsed; in zend_array_dup_elements()
2045 if (!zend_array_dup_element(source, target, idx, p, q, 0, static_keys, with_holes)) { in zend_array_dup_elements()
2048 idx++; p++; in zend_array_dup_elements()
2049 while (p != end) { in zend_array_dup_elements()
2050 if (zend_array_dup_element(source, target, target_idx, p, q, 0, static_keys, with_holes)) { in zend_array_dup_elements()
2056 idx++; p++; in zend_array_dup_elements()
2060 idx++; p++; q++; in zend_array_dup_elements()
2061 } while (p != end); in zend_array_dup_elements()
2151 Bucket *p; in zend_hash_merge() local
2160 p = source->arData + idx; in zend_hash_merge()
2161 s = &p->val; in zend_hash_merge()
2168 if (p->key) { in zend_hash_merge()
2169 t = _zend_hash_add_or_update_i(target, p->key, s, HASH_UPDATE | HASH_UPDATE_INDIRECT); in zend_hash_merge()
2174 t = zend_hash_index_update(target, p->h, s); in zend_hash_merge()
2182 p = source->arData + idx; in zend_hash_merge()
2183 s = &p->val; in zend_hash_merge()
2190 if (p->key) { in zend_hash_merge()
2191 t = _zend_hash_add_or_update_i(target, p->key, s, HASH_ADD | HASH_UPDATE_INDIRECT); in zend_hash_merge()
2196 t = zend_hash_index_add(target, p->h, s); in zend_hash_merge()
2206 …_hash_replace_checker_wrapper(HashTable *target, zval *source_data, Bucket *p, void *pParam, merge… in zend_hash_replace_checker_wrapper() argument
2210 hash_key.h = p->h; in zend_hash_replace_checker_wrapper()
2211 hash_key.key = p->key; in zend_hash_replace_checker_wrapper()
2219 Bucket *p; in zend_hash_merge_ex() local
2227 p = source->arData + idx; in zend_hash_merge_ex()
2228 if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) continue; in zend_hash_merge_ex()
2229 if (zend_hash_replace_checker_wrapper(target, &p->val, p, pParam, pMergeSource)) { in zend_hash_merge_ex()
2230 t = zend_hash_update(target, p->key, &p->val); in zend_hash_merge_ex()
2242 Bucket *p; in zend_hash_find() local
2246 p = zend_hash_find_bucket(ht, key, 0); in zend_hash_find()
2247 return p ? &p->val : NULL; in zend_hash_find()
2252 Bucket *p; in _zend_hash_find_known_hash() local
2256 p = zend_hash_find_bucket(ht, key, 1); in _zend_hash_find_known_hash()
2257 return p ? &p->val : NULL; in _zend_hash_find_known_hash()
2263 Bucket *p; in zend_hash_str_find() local
2268 p = zend_hash_str_find_bucket(ht, str, len, h); in zend_hash_str_find()
2269 return p ? &p->val : NULL; in zend_hash_str_find()
2274 Bucket *p; in zend_hash_index_find() local
2280 p = ht->arData + h; in zend_hash_index_find()
2281 if (Z_TYPE(p->val) != IS_UNDEF) { in zend_hash_index_find()
2282 return &p->val; in zend_hash_index_find()
2288 p = zend_hash_index_find_bucket(ht, h); in zend_hash_index_find()
2289 return p ? &p->val : NULL; in zend_hash_index_find()
2294 Bucket *p; in _zend_hash_index_find() local
2298 p = zend_hash_index_find_bucket(ht, h); in _zend_hash_index_find()
2299 return p ? &p->val : NULL; in _zend_hash_index_find()
2384 Bucket *p; in zend_hash_get_current_key_ex() local
2389 p = ht->arData + idx; in zend_hash_get_current_key_ex()
2390 if (p->key) { in zend_hash_get_current_key_ex()
2391 *str_index = p->key; in zend_hash_get_current_key_ex()
2394 *num_index = p->h; in zend_hash_get_current_key_ex()
2404 Bucket *p; in zend_hash_get_current_key_zval_ex() local
2411 p = ht->arData + idx; in zend_hash_get_current_key_zval_ex()
2412 if (p->key) { in zend_hash_get_current_key_zval_ex()
2413 ZVAL_STR_COPY(key, p->key); in zend_hash_get_current_key_zval_ex()
2415 ZVAL_LONG(key, p->h); in zend_hash_get_current_key_zval_ex()
2423 Bucket *p; in zend_hash_get_current_key_type_ex() local
2428 p = ht->arData + idx; in zend_hash_get_current_key_type_ex()
2429 if (p->key) { in zend_hash_get_current_key_type_ex()
2442 Bucket *p; in zend_hash_get_current_data_ex() local
2447 p = ht->arData + idx; in zend_hash_get_current_data_ex()
2448 return &p->val; in zend_hash_get_current_data_ex()
2454 ZEND_API void zend_hash_bucket_swap(Bucket *p, Bucket *q) in zend_hash_bucket_swap() argument
2460 val = p->val; in zend_hash_bucket_swap()
2461 h = p->h; in zend_hash_bucket_swap()
2462 key = p->key; in zend_hash_bucket_swap()
2464 p->val = q->val; in zend_hash_bucket_swap()
2465 p->h = q->h; in zend_hash_bucket_swap()
2466 p->key = q->key; in zend_hash_bucket_swap()
2473 ZEND_API void zend_hash_bucket_renum_swap(Bucket *p, Bucket *q) in zend_hash_bucket_renum_swap() argument
2477 val = p->val; in zend_hash_bucket_renum_swap()
2478 p->val = q->val; in zend_hash_bucket_renum_swap()
2482 ZEND_API void zend_hash_bucket_packed_swap(Bucket *p, Bucket *q) in zend_hash_bucket_packed_swap() argument
2487 val = p->val; in zend_hash_bucket_packed_swap()
2488 h = p->h; in zend_hash_bucket_packed_swap()
2490 p->val = q->val; in zend_hash_bucket_packed_swap()
2491 p->h = q->h; in zend_hash_bucket_packed_swap()
2499 Bucket *p; in zend_hash_sort_ex() local
2518 p = ht->arData + j; in zend_hash_sort_ex()
2519 if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) continue; in zend_hash_sort_ex()
2521 ht->arData[i] = *p; in zend_hash_sort_ex()
2537 p = ht->arData + j; in zend_hash_sort_ex()
2538 p->h = j; in zend_hash_sort_ex()
2539 if (p->key) { in zend_hash_sort_ex()
2540 zend_string_release(p->key); in zend_hash_sort_ex()
2541 p->key = NULL; in zend_hash_sort_ex()
2676 Bucket *p, *res; in zend_hash_minmax() local
2694 p = ht->arData + idx; in zend_hash_minmax()
2695 if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) continue; in zend_hash_minmax()
2698 if (compar(res, p) < 0) { /* max */ in zend_hash_minmax()
2699 res = p; in zend_hash_minmax()
2702 if (compar(res, p) > 0) { /* min */ in zend_hash_minmax()
2703 res = p; in zend_hash_minmax()