Lines Matching defs:stack
873 * When we check for recursive dependencies we use a stack to save
875 * The entries are located on the call stack so no need to free memory.
876 * Note inser() remove() must always match to properly clear the stack.
885 static void dep_stack_insert(struct dep_stack *stack, struct symbol *sym)
887 memset(stack, 0, sizeof(*stack));
889 check_top->next = stack;
890 stack->prev = check_top;
891 stack->sym = sym;
892 check_top = stack;
905 * the ->prev pointer to locate the bottom of the stack.
909 struct dep_stack *stack;
920 for (stack = check_top; stack != NULL; stack = stack->prev)
921 if (stack->sym == last_sym)
923 if (!stack) {
928 for (; stack; stack = stack->next) {
929 sym = stack->sym;
930 next_sym = stack->next ? stack->next->sym : last_sym;
931 prop = stack->prop;
933 prop = stack->sym->prop;
943 if (stack->sym == last_sym)
946 if (stack->expr) {
952 } else if (stack->prop) {
1014 struct dep_stack stack;
1016 dep_stack_insert(&stack, sym);
1025 stack.prop = prop;
1031 stack.expr = prop->expr;
1035 stack.expr = NULL;
1049 struct dep_stack stack;
1051 dep_stack_insert(&stack, choice);
1094 struct dep_stack stack;
1097 dep_stack_insert(&stack, sym);