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,
- struct value *low_bound_val,
- struct value *high_bound_val);
extern struct value *ada_binop_in_bounds (struct expression *exp,
enum noside noside,
struct value *arg1,
value *evaluate (struct type *expect_type,
struct expression *exp,
- enum noside noside) override
- {
- value *array = std::get<0> (m_storage)->evaluate (nullptr, exp, noside);
- value *low = std::get<1> (m_storage)->evaluate (nullptr, exp, noside);
- value *high = std::get<2> (m_storage)->evaluate (nullptr, exp, noside);
- return ada_ternop_slice (exp, noside, array, low, high);
- }
+ enum noside noside) override;
enum exp_opcode opcode () const override
{ return TERNOP_SLICE; }
return value_from_longest (type, tem);
}
-} /* namespace expr */
-
-/* A helper function for TERNOP_SLICE. */
+/* Implement TERNOP_SLICE. */
value *
-ada_ternop_slice (struct expression *exp,
- enum noside noside,
- struct value *array, struct value *low_bound_val,
- struct value *high_bound_val)
+ada_ternop_slice_operation::evaluate (struct type *expect_type,
+ struct expression *exp,
+ enum noside noside)
{
+ value *array = std::get<0> (m_storage)->evaluate (nullptr, exp, noside);
+ value *low_bound_val
+ = std::get<1> (m_storage)->evaluate (nullptr, exp, noside);
+ value *high_bound_val
+ = std::get<2> (m_storage)->evaluate (nullptr, exp, noside);
+
LONGEST low_bound;
LONGEST high_bound;
longest_to_int (high_bound));
}
+} /* namespace expr */
+
/* A helper function for BINOP_IN_BOUNDS. */
value *