Lines Matching refs:intern

398 	spl_heap_object *intern = spl_heap_from_obj(object);  in spl_heap_object_free_storage()  local
400 zend_object_std_dtor(&intern->std); in spl_heap_object_free_storage()
402 spl_ptr_heap_destroy(intern->heap); in spl_heap_object_free_storage()
408 spl_heap_object *intern; in spl_heap_object_new_ex() local
412 intern = zend_object_alloc(sizeof(spl_heap_object), parent); in spl_heap_object_new_ex()
414 zend_object_std_init(&intern->std, class_type); in spl_heap_object_new_ex()
415 object_properties_init(&intern->std, class_type); in spl_heap_object_new_ex()
419 intern->std.handlers = other->std.handlers; in spl_heap_object_new_ex()
422 intern->heap = spl_ptr_heap_clone(other->heap); in spl_heap_object_new_ex()
424 intern->heap = other->heap; in spl_heap_object_new_ex()
427 intern->flags = other->flags; in spl_heap_object_new_ex()
428 intern->fptr_cmp = other->fptr_cmp; in spl_heap_object_new_ex()
429 intern->fptr_count = other->fptr_count; in spl_heap_object_new_ex()
430 return &intern->std; in spl_heap_object_new_ex()
435intern->heap = spl_ptr_heap_init(spl_ptr_pqueue_elem_cmp, spl_ptr_heap_pqueue_elem_ctor, spl_ptr_h… in spl_heap_object_new_ex()
436 intern->flags = SPL_PQUEUE_EXTR_DATA; in spl_heap_object_new_ex()
442 intern->heap = spl_ptr_heap_init( in spl_heap_object_new_ex()
455intern->fptr_cmp = zend_hash_str_find_ptr(&class_type->function_table, "compare", sizeof("compare"… in spl_heap_object_new_ex()
456 if (intern->fptr_cmp->common.scope == parent) { in spl_heap_object_new_ex()
457 intern->fptr_cmp = NULL; in spl_heap_object_new_ex()
460 intern->fptr_count = zend_hash_find_ptr(&class_type->function_table, ZSTR_KNOWN(ZEND_STR_COUNT)); in spl_heap_object_new_ex()
461 if (intern->fptr_count->common.scope == parent) { in spl_heap_object_new_ex()
462 intern->fptr_count = NULL; in spl_heap_object_new_ex()
466 return &intern->std; in spl_heap_object_new_ex()
488 spl_heap_object *intern = spl_heap_from_obj(object); in spl_heap_object_count_elements() local
490 if (intern->fptr_count) { in spl_heap_object_count_elements()
492 zend_call_method_with_0_params(object, intern->std.ce, &intern->fptr_count, "count", &rv); in spl_heap_object_count_elements()
502 *count = spl_ptr_heap_count(intern->heap); in spl_heap_object_count_elements()
509 spl_heap_object *intern = spl_heap_from_obj(obj); in spl_heap_object_get_debug_info() local
515 if (!intern->std.properties) { in spl_heap_object_get_debug_info()
516 rebuild_object_properties(&intern->std); in spl_heap_object_get_debug_info()
519 debug_info = zend_new_array(zend_hash_num_elements(intern->std.properties) + 1); in spl_heap_object_get_debug_info()
520 zend_hash_copy(debug_info, intern->std.properties, (copy_ctor_func_t) zval_add_ref); in spl_heap_object_get_debug_info()
523 ZVAL_LONG(&tmp, intern->flags); in spl_heap_object_get_debug_info()
528 ZVAL_BOOL(&tmp, intern->heap->flags&SPL_HEAP_CORRUPTED); in spl_heap_object_get_debug_info()
534 for (i = 0; i < intern->heap->count; ++i) { in spl_heap_object_get_debug_info()
536 spl_pqueue_elem *pq_elem = spl_heap_elem(intern->heap, i); in spl_heap_object_get_debug_info()
541 zval *elem = spl_heap_elem(intern->heap, i); in spl_heap_object_get_debug_info()
557 spl_heap_object *intern = spl_heap_from_obj(obj); in spl_heap_object_get_gc() local
558 *gc_data = (zval *) intern->heap->elements; in spl_heap_object_get_gc()
559 *gc_data_count = intern->heap->count; in spl_heap_object_get_gc()
567 spl_heap_object *intern = spl_heap_from_obj(obj); in spl_pqueue_object_get_gc() local
568 *gc_data = (zval *) intern->heap->elements; in spl_pqueue_object_get_gc()
570 *gc_data_count = 2 * intern->heap->count; in spl_pqueue_object_get_gc()
580 spl_heap_object *intern = Z_SPLHEAP_P(ZEND_THIS); in PHP_METHOD() local
586 count = spl_ptr_heap_count(intern->heap); in PHP_METHOD()
594 spl_heap_object *intern = Z_SPLHEAP_P(ZEND_THIS); in PHP_METHOD() local
600 RETURN_BOOL(spl_ptr_heap_count(intern->heap) == 0); in PHP_METHOD()
608 spl_heap_object *intern; in PHP_METHOD() local
614 intern = Z_SPLHEAP_P(ZEND_THIS); in PHP_METHOD()
616 if (intern->heap->flags & SPL_HEAP_CORRUPTED) { in PHP_METHOD()
622 spl_ptr_heap_insert(intern->heap, value, ZEND_THIS); in PHP_METHOD()
631 spl_heap_object *intern; in PHP_METHOD() local
637 intern = Z_SPLHEAP_P(ZEND_THIS); in PHP_METHOD()
639 if (intern->heap->flags & SPL_HEAP_CORRUPTED) { in PHP_METHOD()
644 if (spl_ptr_heap_delete_top(intern->heap, return_value, ZEND_THIS) == FAILURE) { in PHP_METHOD()
655 spl_heap_object *intern; in PHP_METHOD() local
663 intern = Z_SPLHEAP_P(ZEND_THIS); in PHP_METHOD()
665 if (intern->heap->flags & SPL_HEAP_CORRUPTED) { in PHP_METHOD()
675 if (!intern->fptr_cmp) { in PHP_METHOD()
681 if (intern->heap->count == 0) { /* Specialize empty queue */ in PHP_METHOD()
682 intern->heap->cmp = new_cmp; in PHP_METHOD()
683 } else if (new_cmp != intern->heap->cmp) { /* Despecialize on type conflict. */ in PHP_METHOD()
684 intern->heap->cmp = spl_ptr_pqueue_elem_cmp; in PHP_METHOD()
688 spl_ptr_heap_insert(intern->heap, &elem, ZEND_THIS); in PHP_METHOD()
698 spl_heap_object *intern; in PHP_METHOD() local
704 intern = Z_SPLHEAP_P(ZEND_THIS); in PHP_METHOD()
706 if (intern->heap->flags & SPL_HEAP_CORRUPTED) { in PHP_METHOD()
711 if (spl_ptr_heap_delete_top(intern->heap, &elem, ZEND_THIS) == FAILURE) { in PHP_METHOD()
716 spl_pqueue_extract_helper(return_value, &elem, intern->flags); in PHP_METHOD()
724 spl_heap_object *intern; in PHP_METHOD() local
731 intern = Z_SPLHEAP_P(ZEND_THIS); in PHP_METHOD()
733 if (intern->heap->flags & SPL_HEAP_CORRUPTED) { in PHP_METHOD()
738 elem = spl_ptr_heap_top(intern->heap); in PHP_METHOD()
745 spl_pqueue_extract_helper(return_value, elem, intern->flags); in PHP_METHOD()
754 spl_heap_object *intern; in PHP_METHOD() local
766 intern = Z_SPLHEAP_P(ZEND_THIS); in PHP_METHOD()
767 intern->flags = value; in PHP_METHOD()
768 RETURN_LONG(intern->flags); in PHP_METHOD()
775 spl_heap_object *intern; in PHP_METHOD() local
781 intern = Z_SPLHEAP_P(ZEND_THIS); in PHP_METHOD()
783 RETURN_LONG(intern->flags); in PHP_METHOD()
790 spl_heap_object *intern; in PHP_METHOD() local
796 intern = Z_SPLHEAP_P(ZEND_THIS); in PHP_METHOD()
798 intern->heap->flags = intern->heap->flags & ~SPL_HEAP_CORRUPTED; in PHP_METHOD()
807 spl_heap_object *intern; in PHP_METHOD() local
813 intern = Z_SPLHEAP_P(ZEND_THIS); in PHP_METHOD()
815 RETURN_BOOL(intern->heap->flags & SPL_HEAP_CORRUPTED); in PHP_METHOD()
836 spl_heap_object *intern; in PHP_METHOD() local
842 intern = Z_SPLHEAP_P(ZEND_THIS); in PHP_METHOD()
844 if (intern->heap->flags & SPL_HEAP_CORRUPTED) { in PHP_METHOD()
849 value = spl_ptr_heap_top(intern->heap); in PHP_METHOD()
969 spl_heap_object *intern = Z_SPLHEAP_P(ZEND_THIS); in PHP_METHOD() local
975 RETURN_LONG(intern->heap->count - 1); in PHP_METHOD()
982 spl_heap_object *intern = Z_SPLHEAP_P(ZEND_THIS); in PHP_METHOD() local
988 spl_ptr_heap_delete_top(intern->heap, NULL, ZEND_THIS); in PHP_METHOD()
995 spl_heap_object *intern = Z_SPLHEAP_P(ZEND_THIS); in PHP_METHOD() local
1001 RETURN_BOOL(intern->heap->count != 0); in PHP_METHOD()
1018 spl_heap_object *intern = Z_SPLHEAP_P(ZEND_THIS); in PHP_METHOD() local
1024 if (!intern->heap->count) { in PHP_METHOD()
1027 zval *element = spl_heap_elem(intern->heap, 0); in PHP_METHOD()
1036 spl_heap_object *intern = Z_SPLHEAP_P(ZEND_THIS); in PHP_METHOD() local
1042 if (!intern->heap->count) { in PHP_METHOD()
1045 spl_pqueue_elem *elem = spl_heap_elem(intern->heap, 0); in PHP_METHOD()
1046 spl_pqueue_extract_helper(return_value, elem, intern->flags); in PHP_METHOD()