Lines Matching refs:stack

280 static zend_never_inline gc_stack* gc_stack_next(gc_stack *stack)  in gc_stack_next()  argument
282 if (UNEXPECTED(!stack->next)) { in gc_stack_next()
284 segment->prev = stack; in gc_stack_next()
286 stack->next = segment; in gc_stack_next()
288 return stack->next; in gc_stack_next()
291 static zend_always_inline void gc_stack_push(gc_stack **stack, size_t *top, zend_refcounted *ref) in gc_stack_push() argument
294 (*stack) = gc_stack_next(*stack); in gc_stack_push()
297 (*stack)->data[(*top)++] = ref; in gc_stack_push()
300 static zend_always_inline zend_refcounted* gc_stack_pop(gc_stack **stack, size_t *top) in gc_stack_pop() argument
303 if (!(*stack)->prev) { in gc_stack_pop()
306 (*stack) = (*stack)->prev; in gc_stack_pop()
308 return (*stack)->data[GC_STACK_SEGMENT_SIZE - 1]; in gc_stack_pop()
311 return (*stack)->data[--(*top)]; in gc_stack_pop()
315 static void gc_stack_free(gc_stack *stack) in gc_stack_free() argument
317 gc_stack *p = stack->next; in gc_stack_free()
320 stack = p->next; in gc_stack_free()
322 p = stack; in gc_stack_free()
691 static void gc_scan_black(zend_refcounted *ref, gc_stack *stack) in gc_scan_black() argument
696 GC_STACK_DCL(stack); in gc_scan_black()
810 static void gc_mark_grey(zend_refcounted *ref, gc_stack *stack) in gc_mark_grey() argument
815 GC_STACK_DCL(stack); in gc_mark_grey()
967 static void gc_mark_roots(gc_stack *stack) in gc_mark_roots() argument
979 gc_mark_grey(current->ref, stack); in gc_mark_roots()
986 static void gc_scan(zend_refcounted *ref, gc_stack *stack) in gc_scan() argument
991 GC_STACK_DCL(stack); in gc_scan()
1116 static void gc_scan_roots(gc_stack *stack) in gc_scan_roots() argument
1125 gc_scan(current->ref, stack); in gc_scan_roots()
1157 static int gc_collect_white(zend_refcounted *ref, uint32_t *flags, gc_stack *stack) in gc_collect_white() argument
1163 GC_STACK_DCL(stack); in gc_collect_white()
1291 static int gc_collect_roots(uint32_t *flags, gc_stack *stack) in gc_collect_roots() argument
1323 count += gc_collect_white(ref, flags, stack); in gc_collect_roots()
1331 … 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
1337 GC_STACK_DCL(stack); in gc_remove_nested_data_from_buffer()
1450 gc_stack stack; in zend_gc_collect_cycles() local
1452 stack.prev = NULL; in zend_gc_collect_cycles()
1453 stack.next = NULL; in zend_gc_collect_cycles()
1464 gc_mark_roots(&stack); in zend_gc_collect_cycles()
1466 gc_scan_roots(&stack); in zend_gc_collect_cycles()
1469 count = gc_collect_roots(&gc_flags, &stack); in zend_gc_collect_cycles()
1474 gc_stack_free(&stack); in zend_gc_collect_cycles()
1524 count -= gc_remove_nested_data_from_buffer(p, current, &stack); in zend_gc_collect_cycles()
1563 gc_stack_free(&stack); in zend_gc_collect_cycles()