Lines Matching refs:stack

281 static zend_never_inline gc_stack* gc_stack_next(gc_stack *stack)  in gc_stack_next()  argument
283 if (UNEXPECTED(!stack->next)) { in gc_stack_next()
285 segment->prev = stack; in gc_stack_next()
287 stack->next = segment; in gc_stack_next()
289 return stack->next; in gc_stack_next()
292 static zend_always_inline void gc_stack_push(gc_stack **stack, size_t *top, zend_refcounted *ref) in gc_stack_push() argument
295 (*stack) = gc_stack_next(*stack); in gc_stack_push()
298 (*stack)->data[(*top)++] = ref; in gc_stack_push()
301 static zend_always_inline zend_refcounted* gc_stack_pop(gc_stack **stack, size_t *top) in gc_stack_pop() argument
304 if (!(*stack)->prev) { in gc_stack_pop()
307 (*stack) = (*stack)->prev; in gc_stack_pop()
309 return (*stack)->data[GC_STACK_SEGMENT_SIZE - 1]; in gc_stack_pop()
312 return (*stack)->data[--(*top)]; in gc_stack_pop()
316 static void gc_stack_free(gc_stack *stack) in gc_stack_free() argument
318 gc_stack *p = stack->next; in gc_stack_free()
321 stack = p->next; in gc_stack_free()
323 p = stack; in gc_stack_free()
692 static void gc_scan_black(zend_refcounted *ref, gc_stack *stack) in gc_scan_black() argument
697 GC_STACK_DCL(stack); in gc_scan_black()
814 static void gc_mark_grey(zend_refcounted *ref, gc_stack *stack) in gc_mark_grey() argument
819 GC_STACK_DCL(stack); in gc_mark_grey()
973 static void gc_mark_roots(gc_stack *stack) in gc_mark_roots() argument
985 gc_mark_grey(current->ref, stack); in gc_mark_roots()
992 static void gc_scan(zend_refcounted *ref, gc_stack *stack) in gc_scan() argument
996 GC_STACK_DCL(stack); in gc_scan()
1108 static void gc_scan_roots(gc_stack *stack) in gc_scan_roots() argument
1117 gc_scan(current->ref, stack); in gc_scan_roots()
1149 static int gc_collect_white(zend_refcounted *ref, uint32_t *flags, gc_stack *stack) in gc_collect_white() argument
1155 GC_STACK_DCL(stack); in gc_collect_white()
1289 static int gc_collect_roots(uint32_t *flags, gc_stack *stack) in gc_collect_roots() argument
1321 count += gc_collect_white(ref, flags, stack); in gc_collect_roots()
1329 … int gc_remove_nested_data_from_buffer(zend_refcounted *ref, gc_root_buffer *root, gc_stack *stack) in gc_remove_nested_data_from_buffer() argument
1335 GC_STACK_DCL(stack); in gc_remove_nested_data_from_buffer()
1453 gc_stack stack; in zend_gc_collect_cycles() local
1455 stack.prev = NULL; in zend_gc_collect_cycles()
1456 stack.next = NULL; in zend_gc_collect_cycles()
1467 gc_mark_roots(&stack); in zend_gc_collect_cycles()
1469 gc_scan_roots(&stack); in zend_gc_collect_cycles()
1472 count = gc_collect_roots(&gc_flags, &stack); in zend_gc_collect_cycles()
1477 gc_stack_free(&stack); in zend_gc_collect_cycles()
1528 count -= gc_remove_nested_data_from_buffer(p, current, &stack); in zend_gc_collect_cycles()
1568 gc_stack_free(&stack); in zend_gc_collect_cycles()