Commit Graph

13 Commits

Author SHA1 Message Date
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