Lines Matching refs:stack

273 static zend_never_inline gc_stack* gc_stack_next(gc_stack *stack)  in gc_stack_next()  argument
275 if (UNEXPECTED(!stack->next)) { in gc_stack_next()
277 segment->prev = stack; in gc_stack_next()
279 stack->next = segment; in gc_stack_next()
281 return stack->next; in gc_stack_next()
284 static zend_always_inline void gc_stack_push(gc_stack **stack, size_t *top, zend_refcounted *ref) in gc_stack_push() argument
287 (*stack) = gc_stack_next(*stack); in gc_stack_push()
290 (*stack)->data[(*top)++] = ref; in gc_stack_push()
293 static zend_always_inline zend_refcounted* gc_stack_pop(gc_stack **stack, size_t *top) in gc_stack_pop() argument
296 if (!(*stack)->prev) { in gc_stack_pop()
299 (*stack) = (*stack)->prev; in gc_stack_pop()
301 return (*stack)->data[GC_STACK_SEGMENT_SIZE - 1]; in gc_stack_pop()
304 return (*stack)->data[--(*top)]; in gc_stack_pop()
308 static void gc_stack_free(gc_stack *stack) in gc_stack_free() argument
310 gc_stack *p = stack->next; in gc_stack_free()
313 stack = p->next; in gc_stack_free()
315 p = stack; in gc_stack_free()
683 static void gc_scan_black(zend_refcounted *ref, gc_stack *stack) in gc_scan_black() argument
688 GC_STACK_DCL(stack); in gc_scan_black()
803 static void gc_mark_grey(zend_refcounted *ref, gc_stack *stack) in gc_mark_grey() argument
808 GC_STACK_DCL(stack); in gc_mark_grey()
966 static void gc_mark_roots(gc_stack *stack) in gc_mark_roots() argument
978 gc_mark_grey(current->ref, stack); in gc_mark_roots()
985 static void gc_scan(zend_refcounted *ref, gc_stack *stack) in gc_scan() argument
990 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()
1306 static int gc_collect_roots(uint32_t *flags, gc_stack *stack) in gc_collect_roots() argument
1338 count += gc_collect_white(ref, flags, stack); in gc_collect_roots()
1459 gc_stack stack; in zend_gc_collect_cycles() local
1461 stack.prev = NULL; in zend_gc_collect_cycles()
1462 stack.next = NULL; in zend_gc_collect_cycles()
1473 gc_mark_roots(&stack); in zend_gc_collect_cycles()
1475 gc_scan_roots(&stack); in zend_gc_collect_cycles()
1478 count = gc_collect_roots(&gc_flags, &stack); in zend_gc_collect_cycles()
1480 gc_stack_free(&stack); in zend_gc_collect_cycles()