diff options
Diffstat (limited to 'gcc/ada/exp_ch7.adb')
-rw-r--r-- | gcc/ada/exp_ch7.adb | 99 |
1 files changed, 38 insertions, 61 deletions
diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb index 426658564e2..a6567aa4cda 100644 --- a/gcc/ada/exp_ch7.adb +++ b/gcc/ada/exp_ch7.adb @@ -130,8 +130,7 @@ package body Exp_Ch7 is Is_Master : Boolean; Is_Protected_Subprogram : Boolean; Is_Task_Allocation_Block : Boolean; - Is_Asynchronous_Call_Block : Boolean) - return Node_Id; + Is_Asynchronous_Call_Block : Boolean) return Node_Id; -- Expand a the clean-up procedure for controlled and/or transient -- block, and/or task master or task body, or blocks used to -- implement task allocation or asynchronous entry calls, or @@ -153,8 +152,7 @@ package body Exp_Ch7 is function Make_Transient_Block (Loc : Source_Ptr; - Action : Node_Id) - return Node_Id; + Action : Node_Id) return Node_Id; -- Create a transient block whose name is Scope, which is also a -- controlled block if Flist is not empty and whose only code is -- Action (either a single statement or single declaration). @@ -184,8 +182,7 @@ package body Exp_Ch7 is function Make_Deep_Proc (Prim : Final_Primitives; Typ : Entity_Id; - Stmts : List_Id) - return Node_Id; + Stmts : List_Id) return Node_Id; -- This function generates the tree for Deep_Initialize, Deep_Adjust -- or Deep_Finalize procedures according to the first parameter, -- these procedures operate on the type Typ. The Stmts parameter @@ -193,8 +190,7 @@ package body Exp_Ch7 is function Make_Deep_Array_Body (Prim : Final_Primitives; - Typ : Entity_Id) - return List_Id; + Typ : Entity_Id) return List_Id; -- This function generates the list of statements for implementing -- Deep_Initialize, Deep_Adjust or Deep_Finalize procedures -- according to the first parameter, these procedures operate on the @@ -202,8 +198,7 @@ package body Exp_Ch7 is function Make_Deep_Record_Body (Prim : Final_Primitives; - Typ : Entity_Id) - return List_Id; + Typ : Entity_Id) return List_Id; -- This function generates the list of statements for implementing -- Deep_Initialize, Deep_Adjust or Deep_Finalize procedures -- according to the first parameter, these procedures operate on the @@ -230,8 +225,7 @@ package body Exp_Ch7 is function Convert_View (Proc : Entity_Id; Arg : Node_Id; - Ind : Pos := 1) - return Node_Id; + Ind : Pos := 1) return Node_Id; -- Proc is one of the Initialize/Adjust/Finalize operations, and -- Arg is the argument being passed to it. Ind indicates which -- formal of procedure Proc we are trying to match. This function @@ -503,8 +497,7 @@ package body Exp_Ch7 is function Cleanup_Array (N : Node_Id; Obj : Node_Id; - Typ : Entity_Id) - return List_Id + Typ : Entity_Id) return List_Id is Loc : constant Source_Ptr := Sloc (N); Index_List : constant List_Id := New_List; @@ -601,8 +594,7 @@ package body Exp_Ch7 is function Cleanup_Record (N : Node_Id; Obj : Node_Id; - Typ : Entity_Id) - return List_Id + Typ : Entity_Id) return List_Id is Loc : constant Source_Ptr := Sloc (N); Tsk : Node_Id; @@ -671,14 +663,13 @@ package body Exp_Ch7 is return Stmts; end Cleanup_Record; - ------------------------------- - -- Cleanup_Protected_Object -- - ------------------------------- + ------------------------------ + -- Cleanup_Protected_Object -- + ------------------------------ function Cleanup_Protected_Object - (N : Node_Id; - Ref : Node_Id) - return Node_Id + (N : Node_Id; + Ref : Node_Id) return Node_Id is Loc : constant Source_Ptr := Sloc (N); @@ -747,9 +738,8 @@ package body Exp_Ch7 is ------------------ function Cleanup_Task - (N : Node_Id; - Ref : Node_Id) - return Node_Id + (N : Node_Id; + Ref : Node_Id) return Node_Id is Loc : constant Source_Ptr := Sloc (N); begin @@ -852,12 +842,12 @@ package body Exp_Ch7 is -- If type is not frozen yet, check explicitly among its components, -- because flag is not necessarily set. - ------------------------------------ - -- Has_Some_Controlled_Component -- - ------------------------------------ + ----------------------------------- + -- Has_Some_Controlled_Component -- + ----------------------------------- - function Has_Some_Controlled_Component (Rec : Entity_Id) - return Boolean + function Has_Some_Controlled_Component + (Rec : Entity_Id) return Boolean is Comp : Entity_Id; @@ -966,8 +956,7 @@ package body Exp_Ch7 is function Convert_View (Proc : Entity_Id; Arg : Node_Id; - Ind : Pos := 1) - return Node_Id + Ind : Pos := 1) return Node_Id is Fent : Entity_Id := First_Entity (Proc); Ftyp : Entity_Id; @@ -1424,9 +1413,8 @@ package body Exp_Ch7 is Len_Ref : Node_Id := Empty; function Last_Array_Component - (Ref : Node_Id; - Typ : Entity_Id) - return Node_Id; + (Ref : Node_Id; + Typ : Entity_Id) return Node_Id; -- Creates a reference to the last component of the array object -- designated by Ref whose type is Typ. @@ -1435,9 +1423,8 @@ package body Exp_Ch7 is -------------------------- function Last_Array_Component - (Ref : Node_Id; - Typ : Entity_Id) - return Node_Id + (Ref : Node_Id; + Typ : Entity_Id) return Node_Id is Index_List : constant List_Id := New_List; @@ -1685,9 +1672,8 @@ package body Exp_Ch7 is --------------------- function Find_Final_List - (E : Entity_Id; - Ref : Node_Id := Empty) - return Node_Id + (E : Entity_Id; + Ref : Node_Id := Empty) return Node_Id is Loc : constant Source_Ptr := Sloc (Ref); S : Entity_Id; @@ -2020,8 +2006,7 @@ package body Exp_Ch7 is (Ref : Node_Id; Typ : Entity_Id; Flist_Ref : Node_Id; - With_Attach : Node_Id) - return List_Id + With_Attach : Node_Id) return List_Id is Loc : constant Source_Ptr := Sloc (Ref); Res : constant List_Id := New_List; @@ -2131,10 +2116,9 @@ package body Exp_Ch7 is -- System.FI.Attach_To_Final_List (Flist, Ref, Nb_Link) function Make_Attach_Call - (Obj_Ref : Node_Id; - Flist_Ref : Node_Id; - With_Attach : Node_Id) - return Node_Id + (Obj_Ref : Node_Id; + Flist_Ref : Node_Id; + With_Attach : Node_Id) return Node_Id is Loc : constant Source_Ptr := Sloc (Obj_Ref); @@ -2170,8 +2154,7 @@ package body Exp_Ch7 is Is_Master : Boolean; Is_Protected_Subprogram : Boolean; Is_Task_Allocation_Block : Boolean; - Is_Asynchronous_Call_Block : Boolean) - return Node_Id + Is_Asynchronous_Call_Block : Boolean) return Node_Id is Loc : constant Source_Ptr := Sloc (Clean); Stmt : constant List_Id := New_List; @@ -2477,8 +2460,7 @@ package body Exp_Ch7 is function Make_Deep_Array_Body (Prim : Final_Primitives; - Typ : Entity_Id) - return List_Id + Typ : Entity_Id) return List_Id is Loc : constant Source_Ptr := Sloc (Typ); @@ -2588,8 +2570,7 @@ package body Exp_Ch7 is function Make_Deep_Proc (Prim : Final_Primitives; Typ : Entity_Id; - Stmts : List_Id) - return Entity_Id + Stmts : List_Id) return Entity_Id is Loc : constant Source_Ptr := Sloc (Typ); Formals : List_Id; @@ -2664,8 +2645,7 @@ package body Exp_Ch7 is function Make_Deep_Record_Body (Prim : Final_Primitives; - Typ : Entity_Id) - return List_Id + Typ : Entity_Id) return List_Id is Loc : constant Source_Ptr := Sloc (Typ); Controller_Typ : Entity_Id; @@ -2767,8 +2747,7 @@ package body Exp_Ch7 is function Make_Final_Call (Ref : Node_Id; Typ : Entity_Id; - With_Detach : Node_Id) - return List_Id + With_Detach : Node_Id) return List_Id is Loc : constant Source_Ptr := Sloc (Ref); Res : constant List_Id := New_List; @@ -2893,8 +2872,7 @@ package body Exp_Ch7 is (Ref : Node_Id; Typ : Entity_Id; Flist_Ref : Node_Id; - With_Attach : Node_Id) - return List_Id + With_Attach : Node_Id) return List_Id is Loc : constant Source_Ptr := Sloc (Ref); Is_Conc : Boolean; @@ -3012,8 +2990,7 @@ package body Exp_Ch7 is function Make_Transient_Block (Loc : Source_Ptr; - Action : Node_Id) - return Node_Id + Action : Node_Id) return Node_Id is Flist : constant Entity_Id := Finalization_Chain_Entity (Current_Scope); Decls : constant List_Id := New_List; |