Commit Graph

20 Commits

Author SHA1 Message Date
Tom Tromey
e8c33fa16a Introduce ada_unop_ind_operation
This adds class ada_unop_ind_operation, which implements UNOP_IND for
Ada.

gdb/ChangeLog
2021-03-08  Tom Tromey  <tom@tromey.com>

	* ada-lang.c (ada_unop_ind_operation::evaluate): New method.
	* ada-exp.h (class ada_unop_ind_operation): New.
2021-03-08 07:28:35 -07:00
Tom Tromey
065ec8268d Introduce ada_binop_exp_operation
This adds class ada_binop_exp_operation, which implements BINOP_EXP
for Ada.

gdb/ChangeLog
2021-03-08  Tom Tromey  <tom@tromey.com>

	* ada-lang.c (ada_binop_exp): No longer static.
	* ada-exp.h (ada_binop_exp_operation): New typedef.
2021-03-08 07:28:35 -07:00
Tom Tromey
9e99f48f27 Introduce ada_atr_val_operation
This adds class ada_atr_val_operation, which implements OP_ATR_VAL.

gdb/ChangeLog
2021-03-08  Tom Tromey  <tom@tromey.com>

	* ada-lang.c (ada_val_atr): No longer static.
	(ada_atr_val_operation::evaluate): New method.
	* ada-exp.h (class ada_atr_val_operation): New.
2021-03-08 07:28:35 -07:00
Tom Tromey
7631cf6cc8 Introduce ada_pos_operation
This adds class ada_pos_operation, a new typedef that implements
OP_ATR_POS.

gdb/ChangeLog
2021-03-08  Tom Tromey  <tom@tromey.com>

	* ada-lang.c (ada_pos_atr): No longer static.
	* ada-exp.h (ada_pos_operation): New typedef.
2021-03-08 07:28:35 -07:00
Tom Tromey
6ad3b8bf3b Implement Ada min and max operations
This implement the Ada min and max operations using an existing
template class.

gdb/ChangeLog
2021-03-08  Tom Tromey  <tom@tromey.com>

	* ada-lang.c (ada_binop_minmax): No longer static.
	* ada-exp.h (ada_binop_min_operation, ada_binop_max_operation):
	New typedefs.
2021-03-08 07:28:34 -07:00
Tom Tromey
3f4a0053d9 Introduce ada_var_msym_value_operation
This adds class ada_var_msym_value_operation, which implements
OP_VAR_MSYM_VALUE for Ada.

gdb/ChangeLog
2021-03-08  Tom Tromey  <tom@tromey.com>

	* ada-lang.c (ada_var_msym_value_operation::evaluate_for_cast):
	New method.
	* ada-exp.h (class ada_var_msym_value_operation): New.
2021-03-08 07:28:34 -07:00
Tom Tromey
99a3b1e77b Introduce ada_var_value_operation
This adds class ada_var_value_operation, which implements OP_VAR_VALUE
for Ada.

gdb/ChangeLog
2021-03-08  Tom Tromey  <tom@tromey.com>

	* ada-lang.c (ada_var_value_operation::evaluate_for_cast)
	(ada_var_value_operation::evaluate): New methods.
	* ada-exp.h (class ada_var_value_operation): New.
2021-03-08 07:28:34 -07:00
Tom Tromey
60fa02ca6f Implement some Ada OP_ATR_ operations
This implements a few Ada OP_ATR_ operations.

gdb/ChangeLog
2021-03-08  Tom Tromey  <tom@tromey.com>

	* ada-lang.c (ada_unop_atr_operation::evaluate): New method.
	* ada-exp.h (class ada_unop_atr_operation): New.
2021-03-08 07:28:33 -07:00
Tom Tromey
82c3886e24 Introduce ada_binop_in_bounds
This adds class ada_binop_in_bounds, which implements BINOP_IN_BOUNDS.

gdb/ChangeLog
2021-03-08  Tom Tromey  <tom@tromey.com>

	* ada-lang.c (ada_binop_in_bounds): No longer static.
	* ada-exp.h (class ada_binop_in_bounds_operation): New.
2021-03-08 07:28:33 -07:00
Tom Tromey
1b1ebfab47 Introduce ada_ternop_slice
This adds class ada_ternop_slice, which implements TERNOP_SLICE for
Ada.

gdb/ChangeLog
2021-03-08  Tom Tromey  <tom@tromey.com>

	* ada-lang.c (ada_ternop_slice): No longer static.
	* ada-exp.h (class ada_ternop_slice_operation): New.
2021-03-08 07:28:33 -07:00
Tom Tromey
039e4b76be Introduce ada_bitwise_operation
This adds class ada_bitwise_operation, which is used to implement the
Ada bitwise operators.

gdb/ChangeLog
2021-03-08  Tom Tromey  <tom@tromey.com>

	* ada-exp.h (ada_bitwise_operation): New template class.
	(ada_bitwise_and_operation, ada_bitwise_ior_operation)
	(ada_bitwise_xor_operation): New typedefs.
2021-03-08 07:28:33 -07:00
Tom Tromey
6e8fb7b723 Implement Ada equality operators
This implements the Ada equal and not-equal operators.

gdb/ChangeLog
2021-03-08  Tom Tromey  <tom@tromey.com>

	* ada-lang.c (ada_equal_binop): No longer static.
	* ada-exp.h (class ada_binop_equal_operation): New.
2021-03-08 07:28:32 -07:00
Tom Tromey
d9e7db065e Implement Ada multiplicative operators
This implements the Ada multiplicative operators, using an existing
template class.

gdb/ChangeLog
2021-03-08  Tom Tromey  <tom@tromey.com>

	* ada-lang.c (ada_mult_binop): No longer static.
	* ada-exp.h (ada_binop_mul_operation ada_binop_div_operation)
	(ada_binop_rem_operation, ada_binop_mod_operation): New typedefs.
2021-03-08 07:28:32 -07:00
Tom Tromey
73796c7326 Introduce ada_binop_addsub_operation
This adds class ada_binop_addsub_operation, which implements the Ada +
and - operators.

gdb/ChangeLog
2021-03-08  Tom Tromey  <tom@tromey.com>

	* ada-lang.c (ada_binop_addsub_operation::evaluate): New method.
	* ada-exp.h (class ada_binop_addsub_operation): New.
2021-03-08 07:28:32 -07:00
Tom Tromey
95d49dfbba Introduce ada_unop_range_operation
This adds class ada_unop_range_operation, which implements
UNOP_IN_RANGE.

gdb/ChangeLog
2021-03-08  Tom Tromey  <tom@tromey.com>

	* ada-lang.c (ada_unop_in_range): No longer static.
	* ada-exp.h (class ada_unop_range_operation): New.
2021-03-08 07:28:28 -07:00
Tom Tromey
7c15d377de Implement some Ada unary operations
This implements a few Ada unary operations, using the existing
unop_operation template class.

gdb/ChangeLog
2021-03-08  Tom Tromey  <tom@tromey.com>

	* ada-lang.c (ada_unop_neg, ada_atr_tag, ada_atr_size, ada_abs):
	No longer static.
	* ada-exp.h (ada_neg_operation, ada_atr_tag_operation)
	(ada_atr_size_operation, ada_abs_operation): New typedefs.
2021-03-08 07:28:28 -07:00
Tom Tromey
fc715eb288 Introduce ada_ternop_range_operation
This adds class ada_ternop_range_operation, which implements
TERNOP_IN_RANGE.

gdb/ChangeLog
2021-03-08  Tom Tromey  <tom@tromey.com>

	* ada-lang.c (ada_ternop_range_operation::evaluate): New method.
	* ada-exp.h (class ada_ternop_range_operation): New.
2021-03-08 07:28:26 -07:00
Tom Tromey
cc6bd32eea Introduce ada_qual_operation
This adds class ada_qual_operation, which implements UNOP_QUAL.

gdb/ChangeLog
2021-03-08  Tom Tromey  <tom@tromey.com>

	* ada-lang.c (ada_qual_operation::evaluate): New method.
	* ada-exp.h (class ada_qual_operation): New.
2021-03-08 07:28:26 -07:00
Tom Tromey
42fecb6183 Introduce ada_string_operation
This adds class ada_string_operation, which implements string
constants for Ada.

gdb/ChangeLog
2021-03-08  Tom Tromey  <tom@tromey.com>

	* ada-lang.c (ada_string_operation::evaluate): New method.
	* ada-exp.h (class ada_string_operation): New.
2021-03-08 07:28:25 -07:00
Tom Tromey
03070ee9c7 Introduce ada_wrapped_operation
This adds class ada_wrapped_operation, which is used to wrap some
generic operations with a bit of Ada-specific handling.  This
corresponds to the old "default" case in ada_evaluate_subexp.

gdb/ChangeLog
2021-03-08  Tom Tromey  <tom@tromey.com>

	* ada-lang.c (ada_wrapped_operation::evaluate): New method.
	* ada-exp.h: New file.
2021-03-08 07:28:25 -07:00