Lines Matching refs:idx

493 	uint32_t idx;  in zend_hash_iterator_add()  local
502 idx = iter - EG(ht_iterators); in zend_hash_iterator_add()
503 if (idx + 1 > EG(ht_iterators_used)) { in zend_hash_iterator_add()
504 EG(ht_iterators_used) = idx + 1; in zend_hash_iterator_add()
506 return idx; in zend_hash_iterator_add()
521 idx = iter - EG(ht_iterators); in zend_hash_iterator_add()
522 EG(ht_iterators_used) = idx + 1; in zend_hash_iterator_add()
523 return idx; in zend_hash_iterator_add()
526 ZEND_API HashPosition ZEND_FASTCALL zend_hash_iterator_pos(uint32_t idx, HashTable *ht) in zend_hash_iterator_pos() argument
528 HashTableIterator *iter = EG(ht_iterators) + idx; in zend_hash_iterator_pos()
530 ZEND_ASSERT(idx != (uint32_t)-1); in zend_hash_iterator_pos()
545 ZEND_API HashPosition ZEND_FASTCALL zend_hash_iterator_pos_ex(uint32_t idx, zval *array) in zend_hash_iterator_pos_ex() argument
548 HashTableIterator *iter = EG(ht_iterators) + idx; in zend_hash_iterator_pos_ex()
550 ZEND_ASSERT(idx != (uint32_t)-1); in zend_hash_iterator_pos_ex()
567 ZEND_API void ZEND_FASTCALL zend_hash_iterator_del(uint32_t idx) in zend_hash_iterator_del() argument
569 HashTableIterator *iter = EG(ht_iterators) + idx; in zend_hash_iterator_del()
571 ZEND_ASSERT(idx != (uint32_t)-1); in zend_hash_iterator_del()
580 if (idx == EG(ht_iterators_used) - 1) { in zend_hash_iterator_del()
581 while (idx > 0 && EG(ht_iterators)[idx - 1].ht == NULL) { in zend_hash_iterator_del()
582 idx--; in zend_hash_iterator_del()
584 EG(ht_iterators_used) = idx; in zend_hash_iterator_del()
655 uint32_t idx; in zend_hash_find_bucket() local
666 idx = HT_HASH_EX(arData, nIndex); in zend_hash_find_bucket()
668 if (UNEXPECTED(idx == HT_INVALID_IDX)) { in zend_hash_find_bucket()
671 p = HT_HASH_TO_BUCKET_EX(arData, idx); in zend_hash_find_bucket()
682 idx = Z_NEXT(p->val); in zend_hash_find_bucket()
683 if (idx == HT_INVALID_IDX) { in zend_hash_find_bucket()
686 p = HT_HASH_TO_BUCKET_EX(arData, idx); in zend_hash_find_bucket()
696 uint32_t idx; in zend_hash_str_find_bucket() local
701 idx = HT_HASH_EX(arData, nIndex); in zend_hash_str_find_bucket()
702 while (idx != HT_INVALID_IDX) { in zend_hash_str_find_bucket()
703 ZEND_ASSERT(idx < HT_IDX_TO_HASH(ht->nTableSize)); in zend_hash_str_find_bucket()
704 p = HT_HASH_TO_BUCKET_EX(arData, idx); in zend_hash_str_find_bucket()
711 idx = Z_NEXT(p->val); in zend_hash_str_find_bucket()
719 uint32_t idx; in zend_hash_index_find_bucket() local
724 idx = HT_HASH_EX(arData, nIndex); in zend_hash_index_find_bucket()
725 while (idx != HT_INVALID_IDX) { in zend_hash_index_find_bucket()
726 ZEND_ASSERT(idx < HT_IDX_TO_HASH(ht->nTableSize)); in zend_hash_index_find_bucket()
727 p = HT_HASH_TO_BUCKET_EX(arData, idx); in zend_hash_index_find_bucket()
731 idx = Z_NEXT(p->val); in zend_hash_index_find_bucket()
740 uint32_t idx; in _zend_hash_add_or_update_i() local
802 idx = ht->nNumUsed++; in _zend_hash_add_or_update_i()
805 p = arData + idx; in _zend_hash_add_or_update_i()
810 HT_HASH_EX(arData, nIndex) = HT_IDX_TO_HASH(idx); in _zend_hash_add_or_update_i()
824 uint32_t idx; in _zend_hash_str_add_or_update_i() local
877 idx = ht->nNumUsed++; in _zend_hash_str_add_or_update_i()
879 p = ht->arData + idx; in _zend_hash_str_add_or_update_i()
895 HT_HASH(ht, nIndex) = HT_IDX_TO_HASH(idx); in _zend_hash_str_add_or_update_i()
1008 uint32_t idx; in _zend_hash_index_add_or_update_i() local
1084 idx = ht->nNumUsed++; in _zend_hash_index_add_or_update_i()
1086 p = ht->arData + idx; in _zend_hash_index_add_or_update_i()
1088 HT_HASH(ht, nIndex) = HT_IDX_TO_HASH(idx); in _zend_hash_index_add_or_update_i()
1156 uint32_t idx, i; in zend_hash_set_bucket_key() local
1176 idx = HT_IDX_TO_HASH(b - arData); in zend_hash_set_bucket_key()
1179 if (i == idx) { in zend_hash_set_bucket_key()
1183 while (Z_NEXT(p->val) != idx) { in zend_hash_set_bucket_key()
1192 idx = b - arData; in zend_hash_set_bucket_key()
1196 idx = HT_IDX_TO_HASH(idx); in zend_hash_set_bucket_key()
1198 if (i == HT_INVALID_IDX || i < idx) { in zend_hash_set_bucket_key()
1200 HT_HASH_EX(arData, nIndex) = idx; in zend_hash_set_bucket_key()
1203 while (Z_NEXT(p->val) != HT_INVALID_IDX && Z_NEXT(p->val) > idx) { in zend_hash_set_bucket_key()
1208 Z_NEXT(p->val) = idx; in zend_hash_set_bucket_key()
1332 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
1341 idx = HT_HASH_TO_IDX(idx); in _zend_hash_del_el_ex()
1343 if (ht->nInternalPointer == idx || UNEXPECTED(HT_HAS_ITERATORS(ht))) { in _zend_hash_del_el_ex()
1346 new_idx = idx; in _zend_hash_del_el_ex()
1355 if (ht->nInternalPointer == idx) { in _zend_hash_del_el_ex()
1358 zend_hash_iterators_update(ht, idx, new_idx); in _zend_hash_del_el_ex()
1360 if (ht->nNumUsed - 1 == idx) { in _zend_hash_del_el_ex()
1379 static zend_always_inline void _zend_hash_del_el(HashTable *ht, uint32_t idx, Bucket *p) in _zend_hash_del_el() argument
1387 if (i != idx) { in _zend_hash_del_el()
1389 while (Z_NEXT(prev->val) != idx) { in _zend_hash_del_el()
1396 _zend_hash_del_el_ex(ht, idx, p, prev); in _zend_hash_del_el()
1410 uint32_t idx; in zend_hash_del() local
1420 idx = HT_HASH(ht, nIndex); in zend_hash_del()
1421 while (idx != HT_INVALID_IDX) { in zend_hash_del()
1422 p = HT_HASH_TO_BUCKET(ht, idx); in zend_hash_del()
1427 _zend_hash_del_el_ex(ht, idx, p, prev); in zend_hash_del()
1431 idx = Z_NEXT(p->val); in zend_hash_del()
1440 uint32_t idx; in zend_hash_del_ind() local
1450 idx = HT_HASH(ht, nIndex); in zend_hash_del_ind()
1451 while (idx != HT_INVALID_IDX) { in zend_hash_del_ind()
1452 p = HT_HASH_TO_BUCKET(ht, idx); in zend_hash_del_ind()
1474 _zend_hash_del_el_ex(ht, idx, p, prev); in zend_hash_del_ind()
1479 idx = Z_NEXT(p->val); in zend_hash_del_ind()
1488 uint32_t idx; in zend_hash_str_del_ind() local
1498 idx = HT_HASH(ht, nIndex); in zend_hash_str_del_ind()
1499 while (idx != HT_INVALID_IDX) { in zend_hash_str_del_ind()
1500 p = HT_HASH_TO_BUCKET(ht, idx); in zend_hash_str_del_ind()
1518 _zend_hash_del_el_ex(ht, idx, p, prev); in zend_hash_str_del_ind()
1523 idx = Z_NEXT(p->val); in zend_hash_str_del_ind()
1532 uint32_t idx; in zend_hash_str_del() local
1542 idx = HT_HASH(ht, nIndex); in zend_hash_str_del()
1543 while (idx != HT_INVALID_IDX) { in zend_hash_str_del()
1544 p = HT_HASH_TO_BUCKET(ht, idx); in zend_hash_str_del()
1549 _zend_hash_del_el_ex(ht, idx, p, prev); in zend_hash_str_del()
1553 idx = Z_NEXT(p->val); in zend_hash_str_del()
1561 uint32_t idx; in zend_hash_index_del() local
1580 idx = HT_HASH(ht, nIndex); in zend_hash_index_del()
1581 while (idx != HT_INVALID_IDX) { in zend_hash_index_del()
1582 p = HT_HASH_TO_BUCKET(ht, idx); in zend_hash_index_del()
1584 _zend_hash_del_el_ex(ht, idx, p, prev); in zend_hash_index_del()
1588 idx = Z_NEXT(p->val); in zend_hash_index_del()
1818 uint32_t idx; in zend_hash_graceful_destroy() local
1825 for (idx = 0; idx < ht->nNumUsed; idx++, p++) { in zend_hash_graceful_destroy()
1827 _zend_hash_del_el(ht, HT_IDX_TO_HASH(idx), p); in zend_hash_graceful_destroy()
1838 uint32_t idx; in zend_hash_graceful_reverse_destroy() local
1844 idx = ht->nNumUsed; in zend_hash_graceful_reverse_destroy()
1846 while (idx > 0) { in zend_hash_graceful_reverse_destroy()
1847 idx--; in zend_hash_graceful_reverse_destroy()
1850 _zend_hash_del_el(ht, HT_IDX_TO_HASH(idx), p); in zend_hash_graceful_reverse_destroy()
1871 uint32_t idx; in zend_hash_apply() local
1877 for (idx = 0; idx < ht->nNumUsed; idx++) { in zend_hash_apply()
1878 p = ht->arData + idx; in zend_hash_apply()
1884 _zend_hash_del_el(ht, HT_IDX_TO_HASH(idx), p); in zend_hash_apply()
1895 uint32_t idx; in zend_hash_apply_with_argument() local
1901 for (idx = 0; idx < ht->nNumUsed; idx++) { in zend_hash_apply_with_argument()
1902 p = ht->arData + idx; in zend_hash_apply_with_argument()
1908 _zend_hash_del_el(ht, HT_IDX_TO_HASH(idx), p); in zend_hash_apply_with_argument()
1919 uint32_t idx; in zend_hash_apply_with_arguments() local
1927 for (idx = 0; idx < ht->nNumUsed; idx++) { in zend_hash_apply_with_arguments()
1928 p = ht->arData + idx; in zend_hash_apply_with_arguments()
1938 _zend_hash_del_el(ht, HT_IDX_TO_HASH(idx), p); in zend_hash_apply_with_arguments()
1951 uint32_t idx; in zend_hash_reverse_apply() local
1957 idx = ht->nNumUsed; in zend_hash_reverse_apply()
1958 while (idx > 0) { in zend_hash_reverse_apply()
1959 idx--; in zend_hash_reverse_apply()
1960 p = ht->arData + idx; in zend_hash_reverse_apply()
1967 _zend_hash_del_el(ht, HT_IDX_TO_HASH(idx), p); in zend_hash_reverse_apply()
1978 uint32_t idx; in zend_hash_copy() local
1986 for (idx = 0; idx < source->nNumUsed; idx++) { in zend_hash_copy()
1987 p = source->arData + idx; in zend_hash_copy()
2010 …bool zend_array_dup_element(HashTable *source, HashTable *target, uint32_t idx, Bucket *p, Bucket … in zend_array_dup_element() argument
2059 HT_HASH(target, nIndex) = HT_IDX_TO_HASH(idx); in zend_array_dup_element()
2082 uint32_t idx = 0; in zend_array_dup_elements() local
2088 if (!zend_array_dup_element(source, target, idx, p, q, 0, static_keys, with_holes)) { in zend_array_dup_elements()
2089 uint32_t target_idx = idx; in zend_array_dup_elements()
2091 idx++; p++; in zend_array_dup_elements()
2094 if (source->nInternalPointer == idx) { in zend_array_dup_elements()
2099 idx++; p++; in zend_array_dup_elements()
2103 idx++; p++; q++; in zend_array_dup_elements()
2105 return idx; in zend_array_dup_elements()
2110 uint32_t idx; in zend_array_dup() local
2173 idx = zend_array_dup_elements(source, target, 1, 0); in zend_array_dup()
2175 idx = zend_array_dup_elements(source, target, 1, 1); in zend_array_dup()
2179 idx = zend_array_dup_elements(source, target, 0, 0); in zend_array_dup()
2181 idx = zend_array_dup_elements(source, target, 0, 1); in zend_array_dup()
2184 target->nNumUsed = idx; in zend_array_dup()
2185 target->nNumOfElements = idx; in zend_array_dup()
2193 uint32_t idx; in zend_hash_merge() local
2202 for (idx = 0; idx < source->nNumUsed; idx++) { in zend_hash_merge()
2203 p = source->arData + idx; in zend_hash_merge()
2224 for (idx = 0; idx < source->nNumUsed; idx++) { in zend_hash_merge()
2225 p = source->arData + idx; in zend_hash_merge()
2261 uint32_t idx; in zend_hash_merge_ex() local
2269 for (idx = 0; idx < source->nNumUsed; idx++) { in zend_hash_merge_ex()
2270 p = source->arData + idx; in zend_hash_merge_ex()
2358 uint32_t idx; in zend_hash_internal_pointer_end_ex() local
2363 idx = ht->nNumUsed; in zend_hash_internal_pointer_end_ex()
2364 while (idx > 0) { in zend_hash_internal_pointer_end_ex()
2365 idx--; in zend_hash_internal_pointer_end_ex()
2366 if (Z_TYPE(ht->arData[idx].val) != IS_UNDEF) { in zend_hash_internal_pointer_end_ex()
2367 *pos = idx; in zend_hash_internal_pointer_end_ex()
2377 uint32_t idx; in zend_hash_move_forward_ex() local
2382 idx = _zend_hash_get_valid_pos(ht, *pos); in zend_hash_move_forward_ex()
2383 if (idx < ht->nNumUsed) { in zend_hash_move_forward_ex()
2385 idx++; in zend_hash_move_forward_ex()
2386 if (idx >= ht->nNumUsed) { in zend_hash_move_forward_ex()
2390 if (Z_TYPE(ht->arData[idx].val) != IS_UNDEF) { in zend_hash_move_forward_ex()
2391 *pos = idx; in zend_hash_move_forward_ex()
2402 uint32_t idx = *pos; in zend_hash_move_backwards_ex() local
2407 if (idx < ht->nNumUsed) { in zend_hash_move_backwards_ex()
2408 while (idx > 0) { in zend_hash_move_backwards_ex()
2409 idx--; in zend_hash_move_backwards_ex()
2410 if (Z_TYPE(ht->arData[idx].val) != IS_UNDEF) { in zend_hash_move_backwards_ex()
2411 *pos = idx; in zend_hash_move_backwards_ex()
2426 uint32_t idx; in zend_hash_get_current_key_ex() local
2430 idx = _zend_hash_get_valid_pos(ht, *pos); in zend_hash_get_current_key_ex()
2431 if (idx < ht->nNumUsed) { in zend_hash_get_current_key_ex()
2432 p = ht->arData + idx; in zend_hash_get_current_key_ex()
2446 uint32_t idx; in zend_hash_get_current_key_zval_ex() local
2450 idx = _zend_hash_get_valid_pos(ht, *pos); in zend_hash_get_current_key_zval_ex()
2451 if (idx >= ht->nNumUsed) { in zend_hash_get_current_key_zval_ex()
2454 p = ht->arData + idx; in zend_hash_get_current_key_zval_ex()
2465 uint32_t idx; in zend_hash_get_current_key_type_ex() local
2469 idx = _zend_hash_get_valid_pos(ht, *pos); in zend_hash_get_current_key_type_ex()
2470 if (idx < ht->nNumUsed) { in zend_hash_get_current_key_type_ex()
2471 p = ht->arData + idx; in zend_hash_get_current_key_type_ex()
2484 uint32_t idx; in zend_hash_get_current_data_ex() local
2488 idx = _zend_hash_get_valid_pos(ht, *pos); in zend_hash_get_current_data_ex()
2489 if (idx < ht->nNumUsed) { in zend_hash_get_current_data_ex()
2490 p = ht->arData + idx; in zend_hash_get_current_data_ex()
2728 uint32_t idx; in zend_hash_minmax() local
2737 idx = 0; in zend_hash_minmax()
2739 if (idx == ht->nNumUsed) { in zend_hash_minmax()
2742 if (Z_TYPE(ht->arData[idx].val) != IS_UNDEF) break; in zend_hash_minmax()
2743 idx++; in zend_hash_minmax()
2745 res = ht->arData + idx; in zend_hash_minmax()
2746 for (; idx < ht->nNumUsed; idx++) { in zend_hash_minmax()
2747 p = ht->arData + idx; in zend_hash_minmax()
2763 …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
2780 *idx = (*tmp - '0'); in _zend_handle_numeric_str_ex()
2785 if (*idx-1 > ZEND_LONG_MAX) { /* overflow */ in _zend_handle_numeric_str_ex()
2788 *idx = 0 - *idx; in _zend_handle_numeric_str_ex()
2789 } else if (*idx > ZEND_LONG_MAX) { /* overflow */ in _zend_handle_numeric_str_ex()
2795 *idx = (*idx * 10) + (*tmp - '0'); in _zend_handle_numeric_str_ex()