Lines Matching refs:ht
30 HashTable ht; member
85 HashTable *ht = ptr; in zend_weakref_unref() local
86 ZEND_HASH_MAP_FOREACH_PTR(ht, tagged_ptr) { in zend_weakref_unref()
90 zend_hash_destroy(ht); in zend_weakref_unref()
91 FREE_HASHTABLE(ht); in zend_weakref_unref()
109 HashTable *ht = ZEND_WEAKREF_GET_PTR(tagged_ptr); in zend_weakref_register() local
110 zend_hash_index_add_new_ptr(ht, (zend_ulong) payload, payload); in zend_weakref_register()
115 HashTable *ht = emalloc(sizeof(HashTable)); in zend_weakref_register() local
116 zend_hash_init(ht, 0, NULL, NULL, 0); in zend_weakref_register()
117 zend_hash_index_add_new_ptr(ht, (zend_ulong) tagged_ptr, tagged_ptr); in zend_weakref_register()
118 zend_hash_index_add_new_ptr(ht, (zend_ulong) payload, payload); in zend_weakref_register()
120 ZVAL_PTR(zv, ZEND_WEAKREF_ENCODE(ht, ZEND_WEAKREF_TAG_HT)); in zend_weakref_register()
145 HashTable *ht = ptr; in zend_weakref_unregister() local
147 void *old_payload = zend_hash_index_find_ptr(ht, (zend_ulong) payload); in zend_weakref_unregister()
151 zend_hash_index_del(ht, (zend_ulong) payload); in zend_weakref_unregister()
152 if (zend_hash_num_elements(ht) == 0) { in zend_weakref_unregister()
154 zend_hash_destroy(ht); in zend_weakref_unregister()
155 FREE_HASHTABLE(ht); in zend_weakref_unregister()
169 ZEND_API zval *zend_weakrefs_hash_add(HashTable *ht, zend_object *key, zval *pData) { in zend_weakrefs_hash_add() argument
170 zval *zv = zend_hash_index_add(ht, zend_object_to_weakref_key(key), pData); in zend_weakrefs_hash_add()
172 zend_weakref_register(key, ZEND_WEAKREF_ENCODE(ht, ZEND_WEAKREF_TAG_MAP)); in zend_weakrefs_hash_add()
177 ZEND_API zend_result zend_weakrefs_hash_del(HashTable *ht, zend_object *key) { in zend_weakrefs_hash_del() argument
178 zval *zv = zend_hash_index_find(ht, zend_object_to_weakref_key(key)); in zend_weakrefs_hash_del()
180 zend_weakref_unregister(key, ZEND_WEAKREF_ENCODE(ht, ZEND_WEAKREF_TAG_MAP), 1); in zend_weakrefs_hash_del()
186 ZEND_API void zend_weakrefs_hash_clean(HashTable *ht) { in zend_weakrefs_hash_clean() argument
188 ZEND_HASH_FOREACH_NUM_KEY(ht, obj_key) { in zend_weakrefs_hash_clean()
189 zend_weakrefs_hash_del(ht, zend_weakref_key_to_object(obj_key)); in zend_weakrefs_hash_clean()
285 HashTable *ht = zend_new_array(1); in zend_weakref_get_debug_info() local
295 zend_hash_update(ht, ZSTR_KNOWN(ZEND_STR_OBJECT), &value); in zend_weakref_get_debug_info()
297 return ht; in zend_weakref_get_debug_info()
332 zend_hash_init(&wm->ht, 0, NULL, ZVAL_PTR_DTOR, 0); in zend_weakmap_create_object()
340 ZEND_HASH_MAP_FOREACH_NUM_KEY(&wm->ht, obj_key) { in zend_weakmap_free_obj()
345 zend_weakref_key_to_object(obj_key), ZEND_WEAKREF_ENCODE(&wm->ht, ZEND_WEAKREF_TAG_MAP), 0); in zend_weakmap_free_obj()
347 zend_hash_destroy(&wm->ht); in zend_weakmap_free_obj()
366 zval *zv = zend_hash_index_find(&wm->ht, zend_object_to_weakref_key(obj_addr)); in zend_weakmap_read_dimension()
400 zval *zv = zend_hash_index_find(&wm->ht, obj_key); in zend_weakmap_write_dimension()
411 zend_weakref_register(obj_addr, ZEND_WEAKREF_ENCODE(&wm->ht, ZEND_WEAKREF_TAG_MAP)); in zend_weakmap_write_dimension()
412 zend_hash_index_add_new(&wm->ht, obj_key, value); in zend_weakmap_write_dimension()
426 zval *zv = zend_hash_index_find(&wm->ht, zend_object_to_weakref_key(Z_OBJ_P(offset))); in zend_weakmap_has_dimension()
447 if (!zend_hash_index_exists(&wm->ht, zend_object_to_weakref_key(obj_addr))) { in zend_weakmap_unset_dimension()
452 zend_weakref_unregister(obj_addr, ZEND_WEAKREF_ENCODE(&wm->ht, ZEND_WEAKREF_TAG_MAP), 1); in zend_weakmap_unset_dimension()
458 *count = zend_hash_num_elements(&wm->ht); in zend_weakmap_count_elements()
469 HashTable *ht; in zend_weakmap_get_properties_for() local
470 ALLOC_HASHTABLE(ht); in zend_weakmap_get_properties_for()
471 zend_hash_init(ht, zend_hash_num_elements(&wm->ht), NULL, ZVAL_PTR_DTOR, 0); in zend_weakmap_get_properties_for()
475 ZEND_HASH_MAP_FOREACH_NUM_KEY_VAL(&wm->ht, obj_key, val) { in zend_weakmap_get_properties_for()
485 zend_hash_next_index_insert_new(ht, &pair); in zend_weakmap_get_properties_for()
488 return ht; in zend_weakmap_get_properties_for()
496 ZEND_HASH_MAP_FOREACH_VAL(&wm->ht, val) { in zend_weakmap_get_gc()
509 ZEND_HASH_MAP_FOREACH_NUM_KEY_VAL(&wm->ht, h, val) { in zend_weakmap_get_key_entry_gc()
523 ZEND_HASH_MAP_FOREACH_VAL(&wm->ht, val) { in zend_weakmap_get_entry_gc()
542 HashTable *ht = ptr; in zend_weakmap_get_object_key_entry_gc() local
543 ZEND_HASH_MAP_FOREACH_PTR(ht, tagged_ptr) { in zend_weakmap_get_object_key_entry_gc()
546 zval *zv = zend_hash_index_find(&wm->ht, obj_key); in zend_weakmap_get_object_key_entry_gc()
554 zval *zv = zend_hash_index_find(&wm->ht, obj_key); in zend_weakmap_get_object_key_entry_gc()
577 HashTable *ht = ptr; in zend_weakmap_get_object_entry_gc() local
578 ZEND_HASH_MAP_FOREACH_PTR(ht, tagged_ptr) { in zend_weakmap_get_object_entry_gc()
581 zval *zv = zend_hash_index_find(&wm->ht, obj_key); in zend_weakmap_get_object_entry_gc()
588 zval *zv = zend_hash_index_find(&wm->ht, obj_key); in zend_weakmap_get_object_entry_gc()
603 zend_hash_copy(&new_wm->ht, &old_wm->ht, NULL); in zend_weakmap_clone_obj()
607 ZEND_HASH_MAP_FOREACH_NUM_KEY_VAL(&new_wm->ht, obj_key, val) { in zend_weakmap_clone_obj()
632 return zend_hash_has_more_elements_ex(&wm->ht, pos); in zend_weakmap_iterator_valid()
640 return zend_hash_get_current_data_ex(&wm->ht, pos); in zend_weakmap_iterator_get_current_data()
651 int key_type = zend_hash_get_current_key_ex(&wm->ht, &string_key, &num_key, pos); in zend_weakmap_iterator_get_current_key()
668 zend_hash_move_forward_ex(&wm->ht, pos); in zend_weakmap_iterator_move_forward()
676 zend_hash_internal_pointer_reset_ex(&wm->ht, pos); in zend_weakmap_iterator_rewind()
699 iter->ht_iter = zend_hash_iterator_add(&wm->ht, 0); in zend_weakmap_get_iterator()