diff options
author | Bob Duff <duff@adacore.com> | 2022-06-06 13:22:39 -0400 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2022-07-05 08:28:19 +0000 |
commit | dba077902daf195da0e5bbac33a1f34bc6b20367 (patch) | |
tree | 89a38c8a2d3df5e67746b459d5c94405150d8f7b /gcc/ada/nlists.adb | |
parent | 824211e18b96dc56d3a530b31aa16cded2c941eb (diff) | |
download | gcc-dba077902daf195da0e5bbac33a1f34bc6b20367.zip gcc-dba077902daf195da0e5bbac33a1f34bc6b20367.tar.gz gcc-dba077902daf195da0e5bbac33a1f34bc6b20367.tar.bz2 |
[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.
Diffstat (limited to 'gcc/ada/nlists.adb')
-rw-r--r-- | gcc/ada/nlists.adb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/ada/nlists.adb b/gcc/ada/nlists.adb index 18702f3..a3bd95b 100644 --- a/gcc/ada/nlists.adb +++ b/gcc/ada/nlists.adb @@ -1013,12 +1013,12 @@ package body Nlists is -- Parent -- ------------ - function Parent (List : List_Id) return Node_Or_Entity_Id is + function List_Parent (List : List_Id) return Node_Or_Entity_Id is begin pragma Assert (Present (List)); pragma Assert (List <= Lists.Last); return Lists.Table (List).Parent; - end Parent; + end List_Parent; ---------- -- Pick -- @@ -1442,12 +1442,12 @@ package body Nlists is -- Set_Parent -- ---------------- - procedure Set_Parent (List : List_Id; Node : Node_Or_Entity_Id) is + procedure Set_List_Parent (List : List_Id; Node : Node_Or_Entity_Id) is begin pragma Assert (not Locked); pragma Assert (List <= Lists.Last); Lists.Table (List).Parent := Node; - end Set_Parent; + end Set_List_Parent; -------------- -- Set_Prev -- |