]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/ChangeLog
Implement Ada resolution
authorTom Tromey <tom@tromey.com>
Mon, 8 Mar 2021 14:27:57 +0000 (07:27 -0700)
committerTom Tromey <tom@tromey.com>
Mon, 8 Mar 2021 14:28:36 +0000 (07:28 -0700)
commitd8a4ed8ad1b5d93b78efbd635d41f706902e2379
treebba8f223a7390235a5cfe7abdad40deb36219f0e
parentefe3af2f9a6da088a00961d579318213eeb266d4
Implement Ada resolution

Ada has a parser post-pass that implements "resolution".  This process
replaces some opcodes with function calls.  For example, a "+"
operation might be replaced with a call to the appropriate overloaded
function.

This differs from the approach taken for the same problem in C++.
However, in this series I chose not to try to make changes outside of
rewrite the expression data structure.  So, resolution remains.

The new approach to resolution is to introduce an interface class,
that some concrete operations implement.  Then, the Ada code will use
this to resolve the expression tree.  Because new-style expressions
are built as ordinary objects, and don't require rewriting the data
structure in place, in the new code this processing will be done in
the parser.  By the end of the series, some special cases in this area
that exist only for Ada will be removed.

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

* ada-lang.c (ada_var_value_operation::resolve)
(ada_funcall_operation::resolve)
(ada_ternop_slice_operation::resolve): New methods.
* ada-exp.h (struct ada_resolvable): New.
(class ada_var_value_operation): Derive from ada_resolvable.
<get_block, resolve>: New methods.
(class ada_funcall_operation): Derive from ada_resolvable.
<resolve>: New method.
(class ada_ternop_slice_operation): Derive from ada_resolvable.
<resolve>: New method.
gdb/ChangeLog
gdb/ada-exp.h
gdb/ada-lang.c