struct expression *exp,
enum noside noside, enum exp_opcode op,
struct value *arg1, struct value *arg2);
-extern struct value *ada_equal_binop (struct type *expect_type,
- struct expression *exp,
- enum noside noside, enum exp_opcode op,
- struct value *arg1, struct value *arg2);
extern struct value *ada_ternop_slice (struct expression *exp,
enum noside noside,
struct value *array,
value *evaluate (struct type *expect_type,
struct expression *exp,
- enum noside noside) override
- {
- value *arg1 = std::get<1> (m_storage)->evaluate (nullptr, exp, noside);
- value *arg2 = std::get<2> (m_storage)->evaluate (arg1->type (),
- exp, noside);
- return ada_equal_binop (expect_type, exp, noside, std::get<0> (m_storage),
- arg1, arg2);
- }
+ enum noside noside) override;
void do_generate_ax (struct expression *exp,
struct agent_expr *ax,
}
}
-/* A helper function for BINOP_EQUAL and BINOP_NOTEQUAL. */
+namespace expr
+{
+
+/* Implement BINOP_EQUAL and BINOP_NOTEQUAL. */
value *
-ada_equal_binop (struct type *expect_type,
- struct expression *exp,
- enum noside noside, enum exp_opcode op,
- struct value *arg1, struct value *arg2)
+ada_binop_equal_operation::evaluate (struct type *expect_type,
+ struct expression *exp,
+ enum noside noside)
{
+ enum exp_opcode op = std::get<0> (m_storage);
+ value *arg1 = std::get<1> (m_storage)->evaluate (nullptr, exp, noside);
+ value *arg2 = std::get<2> (m_storage)->evaluate (arg1->type (),
+ exp, noside);
+
int tem;
if (noside == EVAL_AVOID_SIDE_EFFECTS)
tem = 0;
return value_from_longest (type, tem);
}
+} /* namespace expr */
+
/* A helper function for TERNOP_SLICE. */
value *