diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2024-06-24 14:46:21 +0200 |
---|---|---|
committer | Marc Poulhiès <dkm@gcc.gnu.org> | 2024-08-01 17:14:34 +0200 |
commit | f61d9979a75b171a917ffcd03da5e4e5f62bcc50 (patch) | |
tree | 7bffb0921f938a5fc984bf18834317c1070bfafe /gcc/ada/exp_ch7.ads | |
parent | 76d37f8612faa0bf89983869a90e773794eaa227 (diff) | |
download | gcc-f61d9979a75b171a917ffcd03da5e4e5f62bcc50.zip gcc-f61d9979a75b171a917ffcd03da5e4e5f62bcc50.tar.gz gcc-f61d9979a75b171a917ffcd03da5e4e5f62bcc50.tar.bz2 |
ada: Couple of cleanups in finalization machinery
This removes a parameter and a variable that are entirely determined by
another parameter and another variable respectively.
gcc/ada/
* exp_ch7.ads (Build_Finalizer): Remove Top_Decls parameter.
* exp_ch7.adb (Build_Finalizer): Likewise. Rename Counter_Val into
Count, replace Has_Ctrl_Objs local variable by expression
function, remove Spec_Decls local variable and do not reset
Finalizer_Decls.
(Expand_Cleanup_Actions): Adjust call to Build_Finalizer.
(Expand_N_Package_Body): Likewise.
(Expand_N_Package_Declaration): Likewise.
* inline.adb (Cleanup_Scopes): Likewise.
Diffstat (limited to 'gcc/ada/exp_ch7.ads')
-rw-r--r-- | gcc/ada/exp_ch7.ads | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/gcc/ada/exp_ch7.ads b/gcc/ada/exp_ch7.ads index 712671a..70b0a06 100644 --- a/gcc/ada/exp_ch7.ads +++ b/gcc/ada/exp_ch7.ads @@ -129,7 +129,6 @@ package Exp_Ch7 is (N : Node_Id; Clean_Stmts : List_Id; Mark_Id : Entity_Id; - Top_Decls : List_Id; Defer_Abort : Boolean; Fin_Id : out Entity_Id); -- N may denote an accept statement, block, entry body, package body, @@ -142,11 +141,9 @@ package Exp_Ch7 is -- Clean_Stmts may contain additional context-dependent code used to abort -- asynchronous calls or complete tasks (see Build_Cleanup_Statements). -- Mark_Id is the secondary stack used in the current context or Empty if - -- missing. Top_Decls is the list on which the declaration of the finalizer - -- is attached in the non-package case. Defer_Abort indicates that the - -- statements passed in perform actions that require abort to be deferred, - -- such as for task termination. Fin_Id is the finalizer declaration - -- entity. + -- missing. Defer_Abort indicates that the statements passed in perform + -- actions that require abort to be deferred, such as for task termination. + -- Fin_Id is the finalizer declaration entity. procedure Build_Late_Proc (Typ : Entity_Id; Nam : Name_Id); -- Build one controlling procedure when a late body overrides one of the |