[Ada] Misc cleanup related to finalization
authorBob Duff <duff@adacore.com>
Mon, 6 Jun 2022 17:22:39 +0000 (13:22 -0400)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 5 Jul 2022 08:28:19 +0000 (08:28 +0000)
commitdba077902daf195da0e5bbac33a1f34bc6b20367
tree89a38c8a2d3df5e67746b459d5c94405150d8f7b
parent824211e18b96dc56d3a530b31aa16cded2c941eb
[Ada] Misc cleanup related to finalization

This patch cleans up some code issues found while working on
finalization, and adds some debugging aids.

gcc/ada/

* exp_ch7.adb: Change two constants Is_Protected_Body and
Is_Prot_Body to be Is_Protected_Subp_Body; these are not true
for protected bodies, but for protected subprogram bodies.
(Expand_Cleanup_Actions): No need to search for
Activation_Chain_Entity; just use Activation_Chain_Entity.
* sem_ch8.adb (Find_Direct_Name): Use Entyp constant.
* atree.adb, atree.ads, atree.h, nlists.adb, nlists.ads
(Parent): Provide nonoverloaded versions of Parent, so that they
can be easily found in the debugger.
* debug_a.adb, debug_a.ads: Clarify that we're talking about the
-gnatda switch; switches are case sensitive.  Print out the
Chars field if appropriate, which makes it easier to find things
in the output.
(Debug_Output_Astring): Simplify. Also fix an off-by-one
bug ("for I in Vbars'Length .." should have been "for I in
Vbars'Length + 1 ..").  Before, it was printing Debug_A_Depth +
1 '|' characters if Debug_A_Depth > Vbars'Length.
gcc/ada/atree.adb
gcc/ada/atree.ads
gcc/ada/atree.h
gcc/ada/debug_a.adb
gcc/ada/debug_a.ads
gcc/ada/exp_ch7.adb
gcc/ada/nlists.adb
gcc/ada/nlists.ads
gcc/ada/sem_ch8.adb