Lines Matching refs:target

2178 ZEND_API void ZEND_FASTCALL zend_hash_copy(HashTable *target, HashTable *source, copy_ctor_func_t p…  in zend_hash_copy()  argument
2184 IS_CONSISTENT(target); in zend_hash_copy()
2185 HT_ASSERT_RC1(target); in zend_hash_copy()
2192 new_entry = zend_hash_index_update(target, idx, zv); in zend_hash_copy()
2214 new_entry = zend_hash_update(target, p->key, data); in zend_hash_copy()
2216 new_entry = zend_hash_index_update(target, p->h, data); in zend_hash_copy()
2225 static zend_always_inline bool zend_array_dup_value(HashTable *source, HashTable *target, zval *dat… in zend_array_dup_value() argument
2262 static zend_always_inline bool zend_array_dup_element(HashTable *source, HashTable *target, uint32_… in zend_array_dup_element() argument
2264 if (!zend_array_dup_value(source, target, &p->val, &q->val, packed, with_holes)) { in zend_array_dup_element()
2277 nIndex = q->h | target->nTableMask; in zend_array_dup_element()
2278 Z_NEXT(q->val) = HT_HASH(target, nIndex); in zend_array_dup_element()
2279 HT_HASH(target, nIndex) = HT_IDX_TO_HASH(idx); in zend_array_dup_element()
2284 static zend_always_inline void zend_array_dup_packed_elements(HashTable *source, HashTable *target,… in zend_array_dup_packed_elements() argument
2287 zval *q = target->arPacked; in zend_array_dup_packed_elements()
2291 if (!zend_array_dup_value(source, target, p, q, 1, with_holes)) { in zend_array_dup_packed_elements()
2300 static zend_always_inline uint32_t zend_array_dup_elements(HashTable *source, HashTable *target, bo… in zend_array_dup_elements() argument
2304 Bucket *q = target->arData; in zend_array_dup_elements()
2308 if (!zend_array_dup_element(source, target, idx, p, q, 0, static_keys, with_holes)) { in zend_array_dup_elements()
2313 if (zend_array_dup_element(source, target, target_idx, p, q, 0, static_keys, with_holes)) { in zend_array_dup_elements()
2315 target->nInternalPointer = target_idx; in zend_array_dup_elements()
2331 HashTable *target; in zend_array_dup() local
2335 ALLOC_HASHTABLE(target); in zend_array_dup()
2336 GC_SET_REFCOUNT(target, 1); in zend_array_dup()
2337 GC_TYPE_INFO(target) = GC_ARRAY; in zend_array_dup()
2339 target->pDestructor = ZVAL_PTR_DTOR; in zend_array_dup()
2342 HT_FLAGS(target) = HASH_FLAG_UNINITIALIZED; in zend_array_dup()
2343 target->nTableMask = HT_MIN_MASK; in zend_array_dup()
2344 target->nNumUsed = 0; in zend_array_dup()
2345 target->nNumOfElements = 0; in zend_array_dup()
2346 target->nNextFreeElement = source->nNextFreeElement; in zend_array_dup()
2347 target->nInternalPointer = 0; in zend_array_dup()
2348 target->nTableSize = HT_MIN_SIZE; in zend_array_dup()
2349 HT_SET_DATA_ADDR(target, &uninitialized_bucket); in zend_array_dup()
2351 HT_FLAGS(target) = HT_FLAGS(source) & HASH_FLAG_MASK; in zend_array_dup()
2352 target->nTableMask = source->nTableMask; in zend_array_dup()
2353 target->nNumUsed = source->nNumUsed; in zend_array_dup()
2354 target->nNumOfElements = source->nNumOfElements; in zend_array_dup()
2355 target->nNextFreeElement = source->nNextFreeElement; in zend_array_dup()
2356 target->nTableSize = source->nTableSize; in zend_array_dup()
2358 HT_SET_DATA_ADDR(target, emalloc(HT_PACKED_SIZE(target))); in zend_array_dup()
2359 target->nInternalPointer = source->nInternalPointer; in zend_array_dup()
2360 memcpy(HT_GET_DATA_ADDR(target), HT_GET_DATA_ADDR(source), HT_PACKED_USED_SIZE(source)); in zend_array_dup()
2362 HT_SET_DATA_ADDR(target, emalloc(HT_SIZE(target))); in zend_array_dup()
2363 target->nInternalPointer = source->nInternalPointer; in zend_array_dup()
2364 memcpy(HT_GET_DATA_ADDR(target), HT_GET_DATA_ADDR(source), HT_USED_SIZE(source)); in zend_array_dup()
2367 HT_FLAGS(target) = HT_FLAGS(source) & HASH_FLAG_MASK; in zend_array_dup()
2368 target->nTableMask = HT_MIN_MASK; in zend_array_dup()
2369 target->nNumUsed = source->nNumUsed; in zend_array_dup()
2370 target->nNumOfElements = source->nNumOfElements; in zend_array_dup()
2371 target->nNextFreeElement = source->nNextFreeElement; in zend_array_dup()
2372 target->nTableSize = source->nTableSize; in zend_array_dup()
2373 HT_SET_DATA_ADDR(target, emalloc(HT_PACKED_SIZE_EX(target->nTableSize, HT_MIN_MASK))); in zend_array_dup()
2374 target->nInternalPointer = in zend_array_dup()
2378 HT_HASH_RESET_PACKED(target); in zend_array_dup()
2380 if (HT_IS_WITHOUT_HOLES(target)) { in zend_array_dup()
2381 zend_array_dup_packed_elements(source, target, 0); in zend_array_dup()
2383 zend_array_dup_packed_elements(source, target, 1); in zend_array_dup()
2386 HT_FLAGS(target) = HT_FLAGS(source) & HASH_FLAG_MASK; in zend_array_dup()
2387 target->nTableMask = source->nTableMask; in zend_array_dup()
2388 target->nNextFreeElement = source->nNextFreeElement; in zend_array_dup()
2389 target->nInternalPointer = in zend_array_dup()
2393 target->nTableSize = source->nTableSize; in zend_array_dup()
2394 HT_SET_DATA_ADDR(target, emalloc(HT_SIZE(target))); in zend_array_dup()
2395 HT_HASH_RESET(target); in zend_array_dup()
2397 if (HT_HAS_STATIC_KEYS_ONLY(target)) { in zend_array_dup()
2399 idx = zend_array_dup_elements(source, target, 1, 0); in zend_array_dup()
2401 idx = zend_array_dup_elements(source, target, 1, 1); in zend_array_dup()
2405 idx = zend_array_dup_elements(source, target, 0, 0); in zend_array_dup()
2407 idx = zend_array_dup_elements(source, target, 0, 1); in zend_array_dup()
2410 target->nNumUsed = idx; in zend_array_dup()
2411 target->nNumOfElements = idx; in zend_array_dup()
2413 return target; in zend_array_dup()
2437 ZEND_API void ZEND_FASTCALL zend_hash_merge(HashTable *target, HashTable *source, copy_ctor_func_t … in zend_hash_merge() argument
2444 IS_CONSISTENT(target); in zend_hash_merge()
2445 HT_ASSERT_RC1(target); in zend_hash_merge()
2454 t = zend_hash_index_update(target, idx, s); in zend_hash_merge()
2472 t = _zend_hash_add_or_update_i(target, p->key, s, HASH_UPDATE | HASH_UPDATE_INDIRECT); in zend_hash_merge()
2477 t = zend_hash_index_update(target, p->h, s); in zend_hash_merge()
2490 t = zend_hash_index_add(target, idx, s); in zend_hash_merge()
2508 t = _zend_hash_add_or_update_i(target, p->key, s, HASH_ADD | HASH_UPDATE_INDIRECT); in zend_hash_merge()
2513 t = zend_hash_index_add(target, p->h, s); in zend_hash_merge()
2523 static bool ZEND_FASTCALL zend_hash_replace_checker_wrapper(HashTable *target, zval *source_data, z… in zend_hash_replace_checker_wrapper() argument
2529 return merge_checker_func(target, source_data, &hash_key, pParam); in zend_hash_replace_checker_wrapper()
2533 ZEND_API void ZEND_FASTCALL zend_hash_merge_ex(HashTable *target, HashTable *source, copy_ctor_func… in zend_hash_merge_ex() argument
2540 IS_CONSISTENT(target); in zend_hash_merge_ex()
2541 HT_ASSERT_RC1(target); in zend_hash_merge_ex()
2547 if (zend_hash_replace_checker_wrapper(target, &p->val, p->h, p->key, pParam, pMergeSource)) { in zend_hash_merge_ex()
2548 t = zend_hash_update(target, p->key, &p->val); in zend_hash_merge_ex()