Lines Matching refs:target
1933 ZEND_API void ZEND_FASTCALL zend_hash_copy(HashTable *target, HashTable *source, copy_ctor_func_t p… in zend_hash_copy() argument
1940 IS_CONSISTENT(target); in zend_hash_copy()
1941 HT_ASSERT_RC1(target); 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 static zend_always_inline bool zend_array_dup_element(HashTable *source, HashTable *target, uint32_… in zend_array_dup_element() argument
2014 nIndex = q->h | target->nTableMask; in zend_array_dup_element()
2015 Z_NEXT(q->val) = HT_HASH(target, nIndex); in zend_array_dup_element()
2016 HT_HASH(target, nIndex) = HT_IDX_TO_HASH(idx); in zend_array_dup_element()
2021 static zend_always_inline void zend_array_dup_packed_elements(HashTable *source, HashTable *target,… in zend_array_dup_packed_elements() argument
2024 Bucket *q = target->arData; 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()
2037 static zend_always_inline uint32_t zend_array_dup_elements(HashTable *source, HashTable *target, bo… in zend_array_dup_elements() argument
2041 Bucket *q = target->arData; 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()
2050 if (zend_array_dup_element(source, target, target_idx, p, q, 0, static_keys, with_holes)) { in zend_array_dup_elements()
2052 target->nInternalPointer = target_idx; in zend_array_dup_elements()
2068 HashTable *target; in zend_array_dup() local
2072 ALLOC_HASHTABLE(target); in zend_array_dup()
2073 GC_SET_REFCOUNT(target, 1); in zend_array_dup()
2074 GC_TYPE_INFO(target) = GC_ARRAY; in zend_array_dup()
2076 target->pDestructor = ZVAL_PTR_DTOR; in zend_array_dup()
2079 HT_FLAGS(target) = HASH_FLAG_UNINITIALIZED; in zend_array_dup()
2080 target->nTableMask = HT_MIN_MASK; in zend_array_dup()
2081 target->nNumUsed = 0; in zend_array_dup()
2082 target->nNumOfElements = 0; in zend_array_dup()
2083 target->nNextFreeElement = source->nNextFreeElement; in zend_array_dup()
2084 target->nInternalPointer = 0; in zend_array_dup()
2085 target->nTableSize = HT_MIN_SIZE; in zend_array_dup()
2086 HT_SET_DATA_ADDR(target, &uninitialized_bucket); in zend_array_dup()
2088 HT_FLAGS(target) = HT_FLAGS(source) & HASH_FLAG_MASK; in zend_array_dup()
2089 target->nTableMask = source->nTableMask; in zend_array_dup()
2090 target->nNumUsed = source->nNumUsed; in zend_array_dup()
2091 target->nNumOfElements = source->nNumOfElements; in zend_array_dup()
2092 target->nNextFreeElement = source->nNextFreeElement; in zend_array_dup()
2093 target->nTableSize = source->nTableSize; in zend_array_dup()
2094 HT_SET_DATA_ADDR(target, emalloc(HT_SIZE(target))); in zend_array_dup()
2095 target->nInternalPointer = source->nInternalPointer; in zend_array_dup()
2096 memcpy(HT_GET_DATA_ADDR(target), HT_GET_DATA_ADDR(source), HT_USED_SIZE(source)); in zend_array_dup()
2098 HT_FLAGS(target) = HT_FLAGS(source) & HASH_FLAG_MASK; in zend_array_dup()
2099 target->nTableMask = HT_MIN_MASK; in zend_array_dup()
2100 target->nNumUsed = source->nNumUsed; in zend_array_dup()
2101 target->nNumOfElements = source->nNumOfElements; in zend_array_dup()
2102 target->nNextFreeElement = source->nNextFreeElement; in zend_array_dup()
2103 target->nTableSize = source->nTableSize; in zend_array_dup()
2104 HT_SET_DATA_ADDR(target, emalloc(HT_SIZE_EX(target->nTableSize, HT_MIN_MASK))); in zend_array_dup()
2105 target->nInternalPointer = in zend_array_dup()
2109 HT_HASH_RESET_PACKED(target); in zend_array_dup()
2111 if (HT_IS_WITHOUT_HOLES(target)) { in zend_array_dup()
2112 zend_array_dup_packed_elements(source, target, 0); in zend_array_dup()
2114 zend_array_dup_packed_elements(source, target, 1); in zend_array_dup()
2117 HT_FLAGS(target) = HT_FLAGS(source) & HASH_FLAG_MASK; in zend_array_dup()
2118 target->nTableMask = source->nTableMask; in zend_array_dup()
2119 target->nNextFreeElement = source->nNextFreeElement; in zend_array_dup()
2120 target->nInternalPointer = in zend_array_dup()
2124 target->nTableSize = source->nTableSize; in zend_array_dup()
2125 HT_SET_DATA_ADDR(target, emalloc(HT_SIZE(target))); in zend_array_dup()
2126 HT_HASH_RESET(target); in zend_array_dup()
2128 if (HT_HAS_STATIC_KEYS_ONLY(target)) { in zend_array_dup()
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()
2144 return target; in zend_array_dup()
2148 ZEND_API void ZEND_FASTCALL zend_hash_merge(HashTable *target, HashTable *source, copy_ctor_func_t … in zend_hash_merge() argument
2155 IS_CONSISTENT(target); in zend_hash_merge()
2156 HT_ASSERT_RC1(target); 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()
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 static zend_bool ZEND_FASTCALL zend_hash_replace_checker_wrapper(HashTable *target, zval *source_da… in zend_hash_replace_checker_wrapper() argument
2212 return merge_checker_func(target, source_data, &hash_key, pParam); in zend_hash_replace_checker_wrapper()
2216 ZEND_API void ZEND_FASTCALL zend_hash_merge_ex(HashTable *target, HashTable *source, copy_ctor_func… in zend_hash_merge_ex() argument
2223 IS_CONSISTENT(target); in zend_hash_merge_ex()
2224 HT_ASSERT_RC1(target); 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()