Lines Matching refs:target
1785 ZEND_API void ZEND_FASTCALL zend_hash_copy(HashTable *target, HashTable *source, copy_ctor_func_t p… in zend_hash_copy() argument
1792 IS_CONSISTENT(target); in zend_hash_copy()
1793 HT_ASSERT_RC1(target); in zend_hash_copy()
1808 new_entry = zend_hash_update(target, p->key, data); in zend_hash_copy()
1810 new_entry = zend_hash_index_update(target, p->h, data); in zend_hash_copy()
1819 static zend_always_inline int zend_array_dup_element(HashTable *source, HashTable *target, uint32_t… in zend_array_dup_element() argument
1866 nIndex = q->h | target->nTableMask; in zend_array_dup_element()
1867 Z_NEXT(q->val) = HT_HASH(target, nIndex); in zend_array_dup_element()
1868 HT_HASH(target, nIndex) = HT_IDX_TO_HASH(idx); in zend_array_dup_element()
1873 static zend_always_inline void zend_array_dup_packed_elements(HashTable *source, HashTable *target,… in zend_array_dup_packed_elements() argument
1876 Bucket *q = target->arData; in zend_array_dup_packed_elements()
1880 if (!zend_array_dup_element(source, target, 0, p, q, 1, 1, with_holes)) { in zend_array_dup_packed_elements()
1889 static zend_always_inline uint32_t zend_array_dup_elements(HashTable *source, HashTable *target, in… in zend_array_dup_elements() argument
1893 Bucket *q = target->arData; in zend_array_dup_elements()
1897 if (!zend_array_dup_element(source, target, idx, p, q, 0, static_keys, with_holes)) { in zend_array_dup_elements()
1902 if (zend_array_dup_element(source, target, target_idx, p, q, 0, static_keys, with_holes)) { in zend_array_dup_elements()
1904 target->nInternalPointer = target_idx; in zend_array_dup_elements()
1920 HashTable *target; in zend_array_dup() local
1924 ALLOC_HASHTABLE(target); in zend_array_dup()
1925 GC_SET_REFCOUNT(target, 1); in zend_array_dup()
1926 GC_TYPE_INFO(target) = IS_ARRAY | (GC_COLLECTABLE << GC_FLAGS_SHIFT); in zend_array_dup()
1928 target->nTableSize = source->nTableSize; in zend_array_dup()
1929 target->pDestructor = ZVAL_PTR_DTOR; in zend_array_dup()
1933 HT_FLAGS(target) = (HT_FLAGS(source) & mask) | HASH_FLAG_STATIC_KEYS; in zend_array_dup()
1934 target->nTableMask = HT_MIN_MASK; in zend_array_dup()
1935 target->nNumUsed = 0; in zend_array_dup()
1936 target->nNumOfElements = 0; in zend_array_dup()
1937 target->nNextFreeElement = source->nNextFreeElement; in zend_array_dup()
1938 target->nInternalPointer = 0; in zend_array_dup()
1939 HT_SET_DATA_ADDR(target, &uninitialized_bucket); in zend_array_dup()
1941 HT_FLAGS(target) = HT_FLAGS(source) & HASH_FLAG_MASK; in zend_array_dup()
1942 target->nTableMask = source->nTableMask; in zend_array_dup()
1943 target->nNumUsed = source->nNumUsed; in zend_array_dup()
1944 target->nNumOfElements = source->nNumOfElements; in zend_array_dup()
1945 target->nNextFreeElement = source->nNextFreeElement; in zend_array_dup()
1946 HT_SET_DATA_ADDR(target, emalloc(HT_SIZE(target))); in zend_array_dup()
1947 target->nInternalPointer = source->nInternalPointer; in zend_array_dup()
1948 memcpy(HT_GET_DATA_ADDR(target), HT_GET_DATA_ADDR(source), HT_USED_SIZE(source)); in zend_array_dup()
1950 HT_FLAGS(target) = HT_FLAGS(source) & HASH_FLAG_MASK; in zend_array_dup()
1951 target->nTableMask = HT_MIN_MASK; in zend_array_dup()
1952 target->nNumUsed = source->nNumUsed; in zend_array_dup()
1953 target->nNumOfElements = source->nNumOfElements; in zend_array_dup()
1954 target->nNextFreeElement = source->nNextFreeElement; in zend_array_dup()
1955 HT_SET_DATA_ADDR(target, emalloc(HT_SIZE_EX(target->nTableSize, HT_MIN_MASK))); in zend_array_dup()
1956 target->nInternalPointer = in zend_array_dup()
1960 HT_HASH_RESET_PACKED(target); in zend_array_dup()
1962 if (HT_IS_WITHOUT_HOLES(target)) { in zend_array_dup()
1963 zend_array_dup_packed_elements(source, target, 0); in zend_array_dup()
1965 zend_array_dup_packed_elements(source, target, 1); in zend_array_dup()
1968 HT_FLAGS(target) = HT_FLAGS(source) & HASH_FLAG_MASK; in zend_array_dup()
1969 target->nTableMask = source->nTableMask; in zend_array_dup()
1970 target->nNextFreeElement = source->nNextFreeElement; in zend_array_dup()
1971 target->nInternalPointer = in zend_array_dup()
1975 HT_SET_DATA_ADDR(target, emalloc(HT_SIZE(target))); in zend_array_dup()
1976 HT_HASH_RESET(target); in zend_array_dup()
1978 if (HT_HAS_STATIC_KEYS_ONLY(target)) { in zend_array_dup()
1980 idx = zend_array_dup_elements(source, target, 1, 0); in zend_array_dup()
1982 idx = zend_array_dup_elements(source, target, 1, 1); in zend_array_dup()
1986 idx = zend_array_dup_elements(source, target, 0, 0); in zend_array_dup()
1988 idx = zend_array_dup_elements(source, target, 0, 1); in zend_array_dup()
1991 target->nNumUsed = idx; in zend_array_dup()
1992 target->nNumOfElements = idx; in zend_array_dup()
1994 return target; in zend_array_dup()
1998 ZEND_API void ZEND_FASTCALL zend_hash_merge(HashTable *target, HashTable *source, copy_ctor_func_t … in zend_hash_merge() argument
2005 IS_CONSISTENT(target); in zend_hash_merge()
2006 HT_ASSERT_RC1(target); in zend_hash_merge()
2019 t = _zend_hash_add_or_update_i(target, p->key, s, HASH_UPDATE | HASH_UPDATE_INDIRECT); in zend_hash_merge()
2024 t = zend_hash_index_update(target, p->h, s); in zend_hash_merge()
2041 t = _zend_hash_add_or_update_i(target, p->key, s, HASH_ADD | HASH_UPDATE_INDIRECT); in zend_hash_merge()
2046 t = zend_hash_index_add(target, p->h, s); in zend_hash_merge()
2056 static zend_bool ZEND_FASTCALL zend_hash_replace_checker_wrapper(HashTable *target, zval *source_da… in zend_hash_replace_checker_wrapper() argument
2062 return merge_checker_func(target, source_data, &hash_key, pParam); in zend_hash_replace_checker_wrapper()
2066 ZEND_API void ZEND_FASTCALL zend_hash_merge_ex(HashTable *target, HashTable *source, copy_ctor_func… in zend_hash_merge_ex() argument
2073 IS_CONSISTENT(target); in zend_hash_merge_ex()
2074 HT_ASSERT_RC1(target); in zend_hash_merge_ex()
2079 if (zend_hash_replace_checker_wrapper(target, &p->val, p, pParam, pMergeSource)) { in zend_hash_merge_ex()
2080 t = zend_hash_update(target, p->key, &p->val); in zend_hash_merge_ex()