Lines Matching refs:idx

481 	uint32_t idx;  in zend_hash_iterator_add()  local
490 idx = iter - EG(ht_iterators); in zend_hash_iterator_add()
491 if (idx + 1 > EG(ht_iterators_used)) { in zend_hash_iterator_add()
492 EG(ht_iterators_used) = idx + 1; in zend_hash_iterator_add()
494 return idx; in zend_hash_iterator_add()
509 idx = iter - EG(ht_iterators); in zend_hash_iterator_add()
510 EG(ht_iterators_used) = idx + 1; in zend_hash_iterator_add()
511 return idx; in zend_hash_iterator_add()
514 ZEND_API HashPosition ZEND_FASTCALL zend_hash_iterator_pos(uint32_t idx, HashTable *ht) in zend_hash_iterator_pos() argument
516 HashTableIterator *iter = EG(ht_iterators) + idx; in zend_hash_iterator_pos()
518 ZEND_ASSERT(idx != (uint32_t)-1); in zend_hash_iterator_pos()
533 ZEND_API HashPosition ZEND_FASTCALL zend_hash_iterator_pos_ex(uint32_t idx, zval *array) in zend_hash_iterator_pos_ex() argument
536 HashTableIterator *iter = EG(ht_iterators) + idx; in zend_hash_iterator_pos_ex()
538 ZEND_ASSERT(idx != (uint32_t)-1); in zend_hash_iterator_pos_ex()
555 ZEND_API void ZEND_FASTCALL zend_hash_iterator_del(uint32_t idx) in zend_hash_iterator_del() argument
557 HashTableIterator *iter = EG(ht_iterators) + idx; in zend_hash_iterator_del()
559 ZEND_ASSERT(idx != (uint32_t)-1); in zend_hash_iterator_del()
568 if (idx == EG(ht_iterators_used) - 1) { in zend_hash_iterator_del()
569 while (idx > 0 && EG(ht_iterators)[idx - 1].ht == NULL) { in zend_hash_iterator_del()
570 idx--; in zend_hash_iterator_del()
572 EG(ht_iterators_used) = idx; in zend_hash_iterator_del()
643 uint32_t idx; in zend_hash_find_bucket() local
653 idx = HT_HASH_EX(arData, nIndex); in zend_hash_find_bucket()
655 if (UNEXPECTED(idx == HT_INVALID_IDX)) { in zend_hash_find_bucket()
658 p = HT_HASH_TO_BUCKET_EX(arData, idx); in zend_hash_find_bucket()
669 idx = Z_NEXT(p->val); in zend_hash_find_bucket()
670 if (idx == HT_INVALID_IDX) { in zend_hash_find_bucket()
673 p = HT_HASH_TO_BUCKET_EX(arData, idx); in zend_hash_find_bucket()
683 uint32_t idx; in zend_hash_str_find_bucket() local
688 idx = HT_HASH_EX(arData, nIndex); in zend_hash_str_find_bucket()
689 while (idx != HT_INVALID_IDX) { in zend_hash_str_find_bucket()
690 ZEND_ASSERT(idx < HT_IDX_TO_HASH(ht->nTableSize)); in zend_hash_str_find_bucket()
691 p = HT_HASH_TO_BUCKET_EX(arData, idx); in zend_hash_str_find_bucket()
698 idx = Z_NEXT(p->val); in zend_hash_str_find_bucket()
706 uint32_t idx; in zend_hash_index_find_bucket() local
711 idx = HT_HASH_EX(arData, nIndex); in zend_hash_index_find_bucket()
712 while (idx != HT_INVALID_IDX) { in zend_hash_index_find_bucket()
713 ZEND_ASSERT(idx < HT_IDX_TO_HASH(ht->nTableSize)); in zend_hash_index_find_bucket()
714 p = HT_HASH_TO_BUCKET_EX(arData, idx); in zend_hash_index_find_bucket()
718 idx = Z_NEXT(p->val); in zend_hash_index_find_bucket()
727 uint32_t idx; in _zend_hash_add_or_update_i() local
797 idx = ht->nNumUsed++; in _zend_hash_add_or_update_i()
800 p = arData + idx; in _zend_hash_add_or_update_i()
805 HT_HASH_EX(arData, nIndex) = HT_IDX_TO_HASH(idx); in _zend_hash_add_or_update_i()
815 uint32_t idx; in _zend_hash_str_add_or_update_i() local
866 idx = ht->nNumUsed++; in _zend_hash_str_add_or_update_i()
868 p = ht->arData + idx; in _zend_hash_str_add_or_update_i()
875 HT_HASH(ht, nIndex) = HT_IDX_TO_HASH(idx); in _zend_hash_str_add_or_update_i()
983 uint32_t idx; in _zend_hash_index_add_or_update_i() local
1052 idx = ht->nNumUsed++; in _zend_hash_index_add_or_update_i()
1054 p = ht->arData + idx; in _zend_hash_index_add_or_update_i()
1056 HT_HASH(ht, nIndex) = HT_IDX_TO_HASH(idx); in _zend_hash_index_add_or_update_i()
1115 uint32_t idx, i; in zend_hash_set_bucket_key() local
1135 idx = HT_IDX_TO_HASH(b - arData); in zend_hash_set_bucket_key()
1138 if (i == idx) { in zend_hash_set_bucket_key()
1142 while (Z_NEXT(p->val) != idx) { in zend_hash_set_bucket_key()
1151 idx = b - arData; in zend_hash_set_bucket_key()
1155 idx = HT_IDX_TO_HASH(idx); in zend_hash_set_bucket_key()
1157 if (i == HT_INVALID_IDX || i < idx) { in zend_hash_set_bucket_key()
1159 HT_HASH_EX(arData, nIndex) = idx; 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()
1167 Z_NEXT(p->val) = idx; in zend_hash_set_bucket_key()
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
1298 idx = HT_HASH_TO_IDX(idx); in _zend_hash_del_el_ex()
1300 if (ht->nInternalPointer == idx || UNEXPECTED(HT_HAS_ITERATORS(ht))) { in _zend_hash_del_el_ex()
1303 new_idx = idx; in _zend_hash_del_el_ex()
1312 if (ht->nInternalPointer == idx) { in _zend_hash_del_el_ex()
1315 zend_hash_iterators_update(ht, idx, new_idx); in _zend_hash_del_el_ex()
1317 if (ht->nNumUsed - 1 == idx) { 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
1344 if (i != idx) { in _zend_hash_del_el()
1346 while (Z_NEXT(prev->val) != idx) { in _zend_hash_del_el()
1353 _zend_hash_del_el_ex(ht, idx, p, prev); in _zend_hash_del_el()
1367 uint32_t idx; in zend_hash_del() local
1377 idx = HT_HASH(ht, nIndex); in zend_hash_del()
1378 while (idx != HT_INVALID_IDX) { in zend_hash_del()
1379 p = HT_HASH_TO_BUCKET(ht, idx); in zend_hash_del()
1384 _zend_hash_del_el_ex(ht, idx, p, prev); in zend_hash_del()
1388 idx = Z_NEXT(p->val); in zend_hash_del()
1397 uint32_t idx; in zend_hash_del_ind() local
1407 idx = HT_HASH(ht, nIndex); in zend_hash_del_ind()
1408 while (idx != HT_INVALID_IDX) { in zend_hash_del_ind()
1409 p = HT_HASH_TO_BUCKET(ht, idx); in zend_hash_del_ind()
1431 _zend_hash_del_el_ex(ht, idx, p, prev); in zend_hash_del_ind()
1436 idx = Z_NEXT(p->val); in zend_hash_del_ind()
1445 uint32_t idx; in zend_hash_str_del_ind() local
1455 idx = HT_HASH(ht, nIndex); in zend_hash_str_del_ind()
1456 while (idx != HT_INVALID_IDX) { in zend_hash_str_del_ind()
1457 p = HT_HASH_TO_BUCKET(ht, idx); in zend_hash_str_del_ind()
1475 _zend_hash_del_el_ex(ht, idx, p, prev); in zend_hash_str_del_ind()
1480 idx = Z_NEXT(p->val); in zend_hash_str_del_ind()
1489 uint32_t idx; in zend_hash_str_del() local
1499 idx = HT_HASH(ht, nIndex); in zend_hash_str_del()
1500 while (idx != HT_INVALID_IDX) { in zend_hash_str_del()
1501 p = HT_HASH_TO_BUCKET(ht, idx); in zend_hash_str_del()
1506 _zend_hash_del_el_ex(ht, idx, p, prev); in zend_hash_str_del()
1510 idx = Z_NEXT(p->val); in zend_hash_str_del()
1518 uint32_t idx; in zend_hash_index_del() local
1537 idx = HT_HASH(ht, nIndex); in zend_hash_index_del()
1538 while (idx != HT_INVALID_IDX) { in zend_hash_index_del()
1539 p = HT_HASH_TO_BUCKET(ht, idx); in zend_hash_index_del()
1541 _zend_hash_del_el_ex(ht, idx, p, prev); in zend_hash_index_del()
1545 idx = Z_NEXT(p->val); in zend_hash_index_del()
1775 uint32_t idx; in zend_hash_graceful_destroy() local
1782 for (idx = 0; idx < ht->nNumUsed; idx++, p++) { in zend_hash_graceful_destroy()
1784 _zend_hash_del_el(ht, HT_IDX_TO_HASH(idx), p); in zend_hash_graceful_destroy()
1795 uint32_t idx; in zend_hash_graceful_reverse_destroy() local
1801 idx = ht->nNumUsed; in zend_hash_graceful_reverse_destroy()
1803 while (idx > 0) { in zend_hash_graceful_reverse_destroy()
1804 idx--; in zend_hash_graceful_reverse_destroy()
1807 _zend_hash_del_el(ht, HT_IDX_TO_HASH(idx), p); in zend_hash_graceful_reverse_destroy()
1828 uint32_t idx; in zend_hash_apply() local
1834 for (idx = 0; idx < ht->nNumUsed; idx++) { in zend_hash_apply()
1835 p = ht->arData + idx; in zend_hash_apply()
1841 _zend_hash_del_el(ht, HT_IDX_TO_HASH(idx), p); in zend_hash_apply()
1852 uint32_t idx; in zend_hash_apply_with_argument() local
1858 for (idx = 0; idx < ht->nNumUsed; idx++) { in zend_hash_apply_with_argument()
1859 p = ht->arData + idx; in zend_hash_apply_with_argument()
1865 _zend_hash_del_el(ht, HT_IDX_TO_HASH(idx), p); in zend_hash_apply_with_argument()
1876 uint32_t idx; in zend_hash_apply_with_arguments() local
1884 for (idx = 0; idx < ht->nNumUsed; idx++) { in zend_hash_apply_with_arguments()
1885 p = ht->arData + idx; in zend_hash_apply_with_arguments()
1895 _zend_hash_del_el(ht, HT_IDX_TO_HASH(idx), p); in zend_hash_apply_with_arguments()
1908 uint32_t idx; in zend_hash_reverse_apply() local
1914 idx = ht->nNumUsed; in zend_hash_reverse_apply()
1915 while (idx > 0) { in zend_hash_reverse_apply()
1916 idx--; in zend_hash_reverse_apply()
1917 p = ht->arData + idx; in zend_hash_reverse_apply()
1924 _zend_hash_del_el(ht, HT_IDX_TO_HASH(idx), p); in zend_hash_reverse_apply()
1935 uint32_t idx; in zend_hash_copy() local
1943 for (idx = 0; idx < source->nNumUsed; idx++) { in zend_hash_copy()
1944 p = source->arData + idx; in zend_hash_copy()
1967 …bool zend_array_dup_element(HashTable *source, HashTable *target, uint32_t idx, Bucket *p, Bucket … in zend_array_dup_element() argument
2016 HT_HASH(target, nIndex) = HT_IDX_TO_HASH(idx); in zend_array_dup_element()
2039 uint32_t idx = 0; in zend_array_dup_elements() local
2045 if (!zend_array_dup_element(source, target, idx, p, q, 0, static_keys, with_holes)) { in zend_array_dup_elements()
2046 uint32_t target_idx = idx; in zend_array_dup_elements()
2048 idx++; p++; in zend_array_dup_elements()
2051 if (source->nInternalPointer == idx) { in zend_array_dup_elements()
2056 idx++; p++; in zend_array_dup_elements()
2060 idx++; p++; q++; in zend_array_dup_elements()
2062 return idx; in zend_array_dup_elements()
2067 uint32_t idx; in zend_array_dup() local
2130 idx = zend_array_dup_elements(source, target, 1, 0); in zend_array_dup()
2132 idx = zend_array_dup_elements(source, target, 1, 1); in zend_array_dup()
2136 idx = zend_array_dup_elements(source, target, 0, 0); in zend_array_dup()
2138 idx = zend_array_dup_elements(source, target, 0, 1); in zend_array_dup()
2141 target->nNumUsed = idx; in zend_array_dup()
2142 target->nNumOfElements = idx; in zend_array_dup()
2150 uint32_t idx; in zend_hash_merge() local
2159 for (idx = 0; idx < source->nNumUsed; idx++) { in zend_hash_merge()
2160 p = source->arData + idx; in zend_hash_merge()
2181 for (idx = 0; idx < source->nNumUsed; idx++) { in zend_hash_merge()
2182 p = source->arData + idx; in zend_hash_merge()
2218 uint32_t idx; in zend_hash_merge_ex() local
2226 for (idx = 0; idx < source->nNumUsed; idx++) { in zend_hash_merge_ex()
2227 p = source->arData + idx; in zend_hash_merge_ex()
2315 uint32_t idx; in zend_hash_internal_pointer_end_ex() local
2320 idx = ht->nNumUsed; in zend_hash_internal_pointer_end_ex()
2321 while (idx > 0) { in zend_hash_internal_pointer_end_ex()
2322 idx--; in zend_hash_internal_pointer_end_ex()
2323 if (Z_TYPE(ht->arData[idx].val) != IS_UNDEF) { in zend_hash_internal_pointer_end_ex()
2324 *pos = idx; in zend_hash_internal_pointer_end_ex()
2334 uint32_t idx; in zend_hash_move_forward_ex() local
2339 idx = _zend_hash_get_valid_pos(ht, *pos); in zend_hash_move_forward_ex()
2340 if (idx < ht->nNumUsed) { in zend_hash_move_forward_ex()
2342 idx++; in zend_hash_move_forward_ex()
2343 if (idx >= ht->nNumUsed) { in zend_hash_move_forward_ex()
2347 if (Z_TYPE(ht->arData[idx].val) != IS_UNDEF) { in zend_hash_move_forward_ex()
2348 *pos = idx; in zend_hash_move_forward_ex()
2359 uint32_t idx = *pos; in zend_hash_move_backwards_ex() local
2364 if (idx < ht->nNumUsed) { in zend_hash_move_backwards_ex()
2365 while (idx > 0) { in zend_hash_move_backwards_ex()
2366 idx--; in zend_hash_move_backwards_ex()
2367 if (Z_TYPE(ht->arData[idx].val) != IS_UNDEF) { in zend_hash_move_backwards_ex()
2368 *pos = idx; in zend_hash_move_backwards_ex()
2383 uint32_t idx; in zend_hash_get_current_key_ex() local
2387 idx = _zend_hash_get_valid_pos(ht, *pos); in zend_hash_get_current_key_ex()
2388 if (idx < ht->nNumUsed) { in zend_hash_get_current_key_ex()
2389 p = ht->arData + idx; in zend_hash_get_current_key_ex()
2403 uint32_t idx; in zend_hash_get_current_key_zval_ex() local
2407 idx = _zend_hash_get_valid_pos(ht, *pos); in zend_hash_get_current_key_zval_ex()
2408 if (idx >= ht->nNumUsed) { in zend_hash_get_current_key_zval_ex()
2411 p = ht->arData + idx; in zend_hash_get_current_key_zval_ex()
2422 uint32_t idx; in zend_hash_get_current_key_type_ex() local
2426 idx = _zend_hash_get_valid_pos(ht, *pos); in zend_hash_get_current_key_type_ex()
2427 if (idx < ht->nNumUsed) { in zend_hash_get_current_key_type_ex()
2428 p = ht->arData + idx; in zend_hash_get_current_key_type_ex()
2441 uint32_t idx; in zend_hash_get_current_data_ex() local
2445 idx = _zend_hash_get_valid_pos(ht, *pos); in zend_hash_get_current_data_ex()
2446 if (idx < ht->nNumUsed) { in zend_hash_get_current_data_ex()
2447 p = ht->arData + idx; in zend_hash_get_current_data_ex()
2675 uint32_t idx; in zend_hash_minmax() local
2684 idx = 0; in zend_hash_minmax()
2686 if (idx == ht->nNumUsed) { in zend_hash_minmax()
2689 if (Z_TYPE(ht->arData[idx].val) != IS_UNDEF) break; in zend_hash_minmax()
2690 idx++; in zend_hash_minmax()
2692 res = ht->arData + idx; in zend_hash_minmax()
2693 for (; idx < ht->nNumUsed; idx++) { in zend_hash_minmax()
2694 p = ht->arData + idx; in zend_hash_minmax()
2710 …API bool ZEND_FASTCALL _zend_handle_numeric_str_ex(const char *key, size_t length, zend_ulong *idx) in _zend_handle_numeric_str_ex() argument
2727 *idx = (*tmp - '0'); in _zend_handle_numeric_str_ex()
2732 if (*idx-1 > ZEND_LONG_MAX) { /* overflow */ in _zend_handle_numeric_str_ex()
2735 *idx = 0 - *idx; in _zend_handle_numeric_str_ex()
2736 } else if (*idx > ZEND_LONG_MAX) { /* overflow */ in _zend_handle_numeric_str_ex()
2742 *idx = (*idx * 10) + (*tmp - '0'); in _zend_handle_numeric_str_ex()