• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/contrib/gcclibs/libcpp/

Lines Matching refs:top

680 than the operator on the top of the stack, we reduce the stack by one
751 The stack base is op_stack, and the current stack pointer is 'top'.
753 recently pushed operator is 'top->op'. An operand (value) is
759 struct op *top = pfile->op_stack;
771 top->op = CPP_EOF;
793 top->value = eval_token (pfile, op.token);
826 if (op.op == CPP_CLOSE_PAREN && top->op == CPP_OPEN_PAREN)
829 if (op.op == CPP_EOF && top->op == CPP_EOF)
832 if (top->op != CPP_EOF && top->op != CPP_OPEN_PAREN)
834 cpp_token_as_text (pfile, top->token));
842 top = reduce (pfile, top, op.op);
843 if (!top)
854 if (!num_zerop (top->value))
859 if (num_zerop (top->value))
863 if (top->op != CPP_QUERY)
865 if (!num_zerop (top[-1].value)) /* Was '?' condition true? */
876 if (++top == pfile->op_limit)
877 top = _cpp_expand_op_stack (pfile);
879 top->op = op.op;
880 top->token = op.token;
885 checks that we are at top-of-file. */
889 if (top != pfile->op_stack)
896 return !num_zerop (top->value);
900 pushing operator OP. Returns NULL on error, otherwise the top of
903 reduce (cpp_reader *pfile, struct op *top, enum cpp_ttype op)
907 if (top->op <= CPP_EQ || top->op > CPP_LAST_CPP_OP + 2)
910 cpp_error (pfile, CPP_DL_ICE, "impossible operator '%u'", top->op);
915 return top;
920 while (prio < optab[top->op].prio)
923 && optab[top->op].flags & CHECK_PROMOTION)
924 check_promotion (pfile, top);
926 switch (top->op)
932 top[-1].value = num_unary_op (pfile, top->value, top->op);
940 top[-1].value = num_binary_op (pfile, top[-1].value,
941 top->value, top->op);
948 top[-1].value
949 = num_inequality_op (pfile, top[-1].value, top->value, top->op);
954 top[-1].value
955 = num_equality_op (pfile, top[-1].value, top->value, top->op);
961 top[-1].value
962 = num_bitwise_op (pfile, top[-1].value, top->value, top->op);
966 top[-1].value = num_mul (pfile, top[-1].value, top->value);
971 top[-1].value = num_div_op (pfile, top[-1].value,
972 top->value, top->op);
976 top--;
977 if (!num_zerop (top->value))
979 top->value.low = (!num_zerop (top->value)
980 || !num_zerop (top[1].value));
981 top->value.high = 0;
982 top->value.unsignedp = false;
983 top->value.overflow = false;
987 top--;
988 if (num_zerop (top->value))
990 top->value.low = (!num_zerop (top->value)
991 && !num_zerop (top[1].value));
992 top->value.high = 0;
993 top->value.unsignedp = false;
994 top->value.overflow = false;
1003 top--;
1004 top->value = top[1].value;
1005 return top;
1008 top -= 2;
1009 if (!num_zerop (top->value))
1012 top->value = top[1].value;
1015 top->value = top[2].value;
1016 top->value.unsignedp = (top[1].value.unsignedp
1017 || top[2].value.unsignedp);
1028 top--;
1029 if (top->value.overflow && !pfile->state.skip_eval)
1040 return top;
1043 /* Returns the position of the old top of stack after expansion. */