* ada-lang.c (ada_evaluate_subexp): Break two large expressions
using temporary variables.
This commit is contained in:
parent
f652e42f28
commit
000d512403
|
@ -1,3 +1,8 @@
|
||||||
|
2007-12-28 Joel Brobecker <brobecker@adacore.com>
|
||||||
|
|
||||||
|
* ada-lang.c (ada_evaluate_subexp): Break two large expressions
|
||||||
|
using temporary variables.
|
||||||
|
|
||||||
2007-12-27 Joel Brobecker <brobecker@adacore.com>
|
2007-12-27 Joel Brobecker <brobecker@adacore.com>
|
||||||
|
|
||||||
* ada-lang.c (ada_value_cast): New function, extracted out from
|
* ada-lang.c (ada_value_cast): New function, extracted out from
|
||||||
|
|
|
@ -8163,20 +8163,26 @@ ada_evaluate_subexp (struct type *expect_type, struct expression *exp,
|
||||||
case BINOP_LOGICAL_AND:
|
case BINOP_LOGICAL_AND:
|
||||||
case BINOP_LOGICAL_OR:
|
case BINOP_LOGICAL_OR:
|
||||||
case UNOP_LOGICAL_NOT:
|
case UNOP_LOGICAL_NOT:
|
||||||
*pos -= 1;
|
{
|
||||||
return value_cast (LA_BOOL_TYPE,
|
struct value *val;
|
||||||
evaluate_subexp_standard (expect_type, exp,
|
|
||||||
pos, noside));
|
*pos -= 1;
|
||||||
|
val = evaluate_subexp_standard (expect_type, exp, pos, noside);
|
||||||
|
return value_cast (LA_BOOL_TYPE, val);
|
||||||
|
}
|
||||||
|
|
||||||
case BINOP_BITWISE_AND:
|
case BINOP_BITWISE_AND:
|
||||||
case BINOP_BITWISE_IOR:
|
case BINOP_BITWISE_IOR:
|
||||||
case BINOP_BITWISE_XOR:
|
case BINOP_BITWISE_XOR:
|
||||||
arg1 = evaluate_subexp (NULL_TYPE, exp, pos, EVAL_AVOID_SIDE_EFFECTS);
|
{
|
||||||
*pos = pc;
|
struct value *val;
|
||||||
return value_cast (value_type (arg1),
|
|
||||||
evaluate_subexp_standard (expect_type, exp,
|
arg1 = evaluate_subexp (NULL_TYPE, exp, pos, EVAL_AVOID_SIDE_EFFECTS);
|
||||||
pos, noside));
|
*pos = pc;
|
||||||
|
val = evaluate_subexp_standard (expect_type, exp, pos, noside);
|
||||||
|
|
||||||
|
return value_cast (value_type (arg1), val);
|
||||||
|
}
|
||||||
|
|
||||||
case OP_VAR_VALUE:
|
case OP_VAR_VALUE:
|
||||||
*pos -= 1;
|
*pos -= 1;
|
||||||
|
|
Loading…
Reference in New Issue