Commit Graph

8 Commits

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