Lines Matching refs:objmap
35 static zend_always_inline void objmap_cache_release_cached_obj(dom_nnodemap_object *objmap) in objmap_cache_release_cached_obj() argument
37 if (objmap->cached_obj) { in objmap_cache_release_cached_obj()
39 if (GC_DELREF(&objmap->cached_obj->std) == 0) { in objmap_cache_release_cached_obj()
40 zend_objects_store_del(&objmap->cached_obj->std); in objmap_cache_release_cached_obj()
42 objmap->cached_obj = NULL; in objmap_cache_release_cached_obj()
43 objmap->cached_obj_index = 0; in objmap_cache_release_cached_obj()
47 static zend_always_inline void reset_objmap_cache(dom_nnodemap_object *objmap) in reset_objmap_cache() argument
49 objmap_cache_release_cached_obj(objmap); in reset_objmap_cache()
50 objmap->cached_length = -1; in reset_objmap_cache()
65 dom_nnodemap_object *objmap = (dom_nnodemap_object *) obj->ptr; in php_dom_get_nodelist_length() local
66 if (!objmap) { in php_dom_get_nodelist_length()
70 if (objmap->ht) { in php_dom_get_nodelist_length()
71 return xmlHashSize(objmap->ht); in php_dom_get_nodelist_length()
74 if (objmap->nodetype == DOM_NODESET) { in php_dom_get_nodelist_length()
75 HashTable *nodeht = HASH_OF(&objmap->baseobj_zv); in php_dom_get_nodelist_length()
79 xmlNodePtr nodep = dom_object_get_node(objmap->baseobj); in php_dom_get_nodelist_length()
84 if (!php_dom_is_cache_tag_stale_from_node(&objmap->cache_tag, nodep)) { in php_dom_get_nodelist_length()
85 if (objmap->cached_length >= 0) { in php_dom_get_nodelist_length()
86 return objmap->cached_length; in php_dom_get_nodelist_length()
91 php_dom_mark_cache_tag_up_to_date_from_node(&objmap->cache_tag, nodep); in php_dom_get_nodelist_length()
92 reset_objmap_cache(objmap); in php_dom_get_nodelist_length()
96 if (objmap->nodetype == XML_ATTRIBUTE_NODE || objmap->nodetype == XML_ELEMENT_NODE) { in php_dom_get_nodelist_length()
109 …basep, nodep, objmap->ns, objmap->local, objmap->local_lower, &count, INT_MAX - 1 /* because of <=… in php_dom_get_nodelist_length()
112 objmap->cached_length = count; in php_dom_get_nodelist_length()
138 void php_dom_nodelist_get_item_into_zval(dom_nnodemap_object *objmap, zend_long index, zval *return… in php_dom_nodelist_get_item_into_zval() argument
143 if (objmap != NULL) { in php_dom_nodelist_get_item_into_zval()
144 if (objmap->ht) { in php_dom_nodelist_get_item_into_zval()
145 itemnode = php_dom_libxml_hash_iter(objmap, index); in php_dom_nodelist_get_item_into_zval()
147 if (objmap->nodetype == DOM_NODESET) { in php_dom_nodelist_get_item_into_zval()
148 HashTable *nodeht = HASH_OF(&objmap->baseobj_zv); in php_dom_nodelist_get_item_into_zval()
154 } else if (objmap->baseobj) { in php_dom_nodelist_get_item_into_zval()
155 xmlNodePtr basep = dom_object_get_node(objmap->baseobj); in php_dom_nodelist_get_item_into_zval()
163 …if (index >= objmap->cached_obj_index && objmap->cached_obj && !php_dom_is_cache_tag_stale_from_no… in php_dom_nodelist_get_item_into_zval()
164 xmlNodePtr cached_obj_xml_node = dom_object_get_node(objmap->cached_obj); in php_dom_nodelist_get_item_into_zval()
173 reset_objmap_cache(objmap); in php_dom_nodelist_get_item_into_zval()
176 relative_index -= objmap->cached_obj_index; in php_dom_nodelist_get_item_into_zval()
181 if (objmap->nodetype == XML_ATTRIBUTE_NODE || objmap->nodetype == XML_ELEMENT_NODE) { in php_dom_nodelist_get_item_into_zval()
194 …temnode = dom_get_elements_by_tag_name_ns_raw(basep, nodep, objmap->ns, objmap->local, objmap->loc… in php_dom_nodelist_get_item_into_zval()
203 DOM_RET_OBJ(itemnode, objmap->baseobj); in php_dom_nodelist_get_item_into_zval()
214 if (php_dom_is_cache_tag_stale_from_node(&objmap->cache_tag, itemnode)) { in php_dom_nodelist_get_item_into_zval()
215 php_dom_mark_cache_tag_up_to_date_from_node(&objmap->cache_tag, itemnode); in php_dom_nodelist_get_item_into_zval()
216 reset_objmap_cache(objmap); in php_dom_nodelist_get_item_into_zval()
218 objmap_cache_release_cached_obj(objmap); in php_dom_nodelist_get_item_into_zval()
220 objmap->cached_obj_index = index; in php_dom_nodelist_get_item_into_zval()
221 objmap->cached_obj = cached_obj; in php_dom_nodelist_get_item_into_zval()
242 dom_nnodemap_object *objmap = intern->ptr; in PHP_METHOD() local
243 php_dom_nodelist_get_item_into_zval(objmap, index, return_value); in PHP_METHOD()