Lines Matching refs:expression

43 #include "expression.h"
48 static int expand_expression(struct expression *);
52 // and don't mark the expression as erroneous but leave it as-is.
53 // This allows testing some characteristics of the expression
57 static int expand_symbol_expression(struct expression *expr)
77 /* The cost of a symbol expression is lower for on-stack symbols */
81 static long long get_longlong(struct expression *expr)
97 void cast_value(struct expression *expr, struct symbol *newtype,
98 struct expression *old, struct symbol *oldtype)
174 static bool check_shift_count(struct expression *expr, struct expression *right)
191 static int simplify_int_binop(struct expression *expr, struct symbol *ctype)
193 struct expression *left = expr->left, *right = expr->right;
307 static int simplify_cmp_binop(struct expression *expr, struct symbol *ctype)
309 struct expression *left = expr->left, *right = expr->right;
339 static int simplify_float_binop(struct expression *expr)
341 struct expression *left = expr->left, *right = expr->right;
388 static int simplify_float_cmp(struct expression *expr, struct symbol *ctype)
390 struct expression *left = expr->left, *right = expr->right;
411 static int expand_binop(struct expression *expr)
424 static int expand_logical(struct expression *expr)
426 struct expression *left = expr->left;
427 struct expression *right;
476 static int expand_comma(struct expression *expr)
517 static int expand_compare(struct expression *expr)
519 struct expression *left = expr->left, *right = expr->right;
542 static int expand_conditional(struct expression *expr)
544 struct expression *cond = expr->conditional;
545 struct expression *valt = expr->cond_true;
546 struct expression *valf = expr->cond_false;
575 static void check_assignment(struct expression *expr)
577 struct expression *right;
591 static int expand_assignment(struct expression *expr)
601 static int expand_addressof(struct expression *expr)
633 static struct expression *default_initializer(struct symbol *sym, int offset)
635 static struct expression value;
671 static struct expression *constant_symbol_value(struct symbol *sym, int offset)
673 struct expression *value;
681 struct expression *entry;
700 static int expand_dereference(struct expression *expr)
702 struct expression *unop = expr->unop;
716 warning(unop->pos, "dereference of noderef expression");
723 struct expression *right = unop->right;
733 struct expression *value = constant_symbol_value(sym, offset);
764 static int simplify_preop(struct expression *expr)
766 struct expression *op = expr->unop;
797 static int simplify_float_preop(struct expression *expr)
799 struct expression *op = expr->unop;
818 static int expand_postop(struct expression *expr)
824 static int expand_preop(struct expression *expr)
858 struct expression *expr;
866 static int expand_cast(struct expression *expr)
869 struct expression *target = expr->cast_expression;
882 * expand a call expression with a symbol. This
885 static int expand_symbol_call(struct expression *expr, int cost)
887 struct expression *fn = expr->fn;
923 static int expand_call(struct expression *expr)
927 struct expression *fn = expr->fn;
944 struct expression *expr;
954 * this is a simple (single) positional expression.
956 static int expand_pos_expression(struct expression *expr)
958 struct expression *nested = expr->init_expr;
972 struct expression *reuse = nested, *entry;
1006 static unsigned long bit_offset(const struct expression *expr)
1018 static unsigned long bit_range(const struct expression *expr)
1034 const struct expression *a = _a;
1035 const struct expression *b = _b;
1047 static void verify_nonoverlapping(struct expression_list **list, struct expression *expr)
1049 struct expression *a = NULL;
1052 struct expression *b;
1084 static int expand_expression(struct expression *expr)
1140 if (stmt->type == STMT_EXPRESSION && stmt->expression)
1141 *expr = *stmt->expression;
1176 static void expand_const_expression(struct expression *expr, const char *where)
1181 expression_error(expr, "Expected constant expression in %s", where);
1211 expand_expression(stmt->expression);
1216 struct expression *expr = stmt->if_conditional;
1313 return expand_expression(stmt->expression);
1354 expand_expression(stmt->expression);
1365 static inline int bad_integer_constant_expression(struct expression *expr)
1374 static long long __get_expression_value(struct expression *expr, int strict)
1383 expression_error(expr, "bad constant expression type");
1389 expression_error(expr, "bad constant expression");
1393 expression_error(expr, "bad integer constant expression");
1409 long long get_expression_value(struct expression *expr)
1414 long long const_expression_value(struct expression *expr)
1419 long long get_expression_value_silent(struct expression *expr)
1425 int expr_truth_value(struct expression *expr)
1455 int is_zero_constant(struct expression *expr)