From 6d13384e64213e0c80bf0a768db061ef64cc9854 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Thu, 1 Feb 2024 15:30:28 +0100 Subject: ada: Rename finalization scope masters into finalization masters Now that what was previously called "finalization master" has been renamed into "finalization collection" in the front-end, we can also rename what was initially called "finalization scope master" into "finalization master". These entities indeed drive the finalization of all the objects that require it, directly for (statically) declared objects or indirectly for dynamically allocated objects (that is to say, through finalization collections). gcc/ada/ * exp_ch7.adb: Adjust the description of finalization management. (Build_Finalizer): Rename scope master into master throughout. * rtsfind.ads (RE_Id): Replace RE_Finalization_Scope_Master with RE_Finalization_Master. (RE_Unit_Table): Replace entry for RE_Finalization_Scope_Master with entry for RE_Finalization_Master. * libgnat/s-finpri.ads (Finalization_Scope_Master): Rename into... (Finalization_Master): ...this. (Attach_Object_To_Master): Adjust to above renaming. (Chain_Node_To_Master): Likewise. (Finalize_Master): Likewise. * libgnat/s-finpri.adb (Attach_Object_To_Master): Likewise. (Chain_Node_To_Master): Likewise. (Finalize_Master): Likewise. --- gcc/ada/libgnat/s-finpri.adb | 6 +++--- gcc/ada/libgnat/s-finpri.ads | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'gcc/ada/libgnat') diff --git a/gcc/ada/libgnat/s-finpri.adb b/gcc/ada/libgnat/s-finpri.adb index 731c913..1fbd391 100644 --- a/gcc/ada/libgnat/s-finpri.adb +++ b/gcc/ada/libgnat/s-finpri.adb @@ -75,7 +75,7 @@ package body System.Finalization_Primitives is (Object_Address : System.Address; Finalize_Address : not null Finalize_Address_Ptr; Node : not null Master_Node_Ptr; - Master : in out Finalization_Scope_Master) + Master : in out Finalization_Master) is begin Attach_Object_To_Node (Object_Address, Finalize_Address, Node.all); @@ -105,7 +105,7 @@ package body System.Finalization_Primitives is procedure Chain_Node_To_Master (Node : not null Master_Node_Ptr; - Master : in out Finalization_Scope_Master) + Master : in out Finalization_Master) is begin Node.Next := Master.Head; @@ -234,7 +234,7 @@ package body System.Finalization_Primitives is -- Finalize_Master -- --------------------- - procedure Finalize_Master (Master : in out Finalization_Scope_Master) is + procedure Finalize_Master (Master : in out Finalization_Master) is procedure Raise_From_Controlled_Operation (X : Exception_Occurrence); pragma Import (Ada, Raise_From_Controlled_Operation, "__gnat_raise_from_controlled_operation"); diff --git a/gcc/ada/libgnat/s-finpri.ads b/gcc/ada/libgnat/s-finpri.ads index 0632a72..9fe9ef4 100644 --- a/gcc/ada/libgnat/s-finpri.ads +++ b/gcc/ada/libgnat/s-finpri.ads @@ -60,7 +60,7 @@ package System.Finalization_Primitives with Preelaborate is -- level of the program or associated with the declarative part of a -- subprogram or other closed scopes (block statements, for example). - type Finalization_Scope_Master + type Finalization_Master (Exceptions_OK : Boolean; Extra_Info : Boolean; Library_Level : Boolean) is limited private; @@ -71,7 +71,7 @@ package System.Finalization_Primitives with Preelaborate is (Object_Address : System.Address; Finalize_Address : not null Finalize_Address_Ptr; Node : not null Master_Node_Ptr; - Master : in out Finalization_Scope_Master); + Master : in out Finalization_Master); -- Associates a controlled object and its master node with a given master. -- Finalize_Address denotes the operation to be called to finalize the -- object (which could be a user-declared Finalize procedure or a procedure @@ -89,12 +89,12 @@ package System.Finalization_Primitives with Preelaborate is procedure Chain_Node_To_Master (Node : not null Master_Node_Ptr; - Master : in out Finalization_Scope_Master); + Master : in out Finalization_Master); -- Chain a master node to the given master. This is used to chain the node -- to the master of the enclosing scope for the objects that need special -- processing mentioned for Attach_Object_To_Node. - procedure Finalize_Master (Master : in out Finalization_Scope_Master); + procedure Finalize_Master (Master : in out Finalization_Master); -- Finalizes each of the controlled objects associated with Master, in the -- reverse of the order in which they were attached. Calls to the procedure -- with a Master that has already been finalized have no effects. @@ -191,10 +191,10 @@ private Next : Master_Node_Ptr := null; end record; - -- Finalization scope master type structure. A unique master is associated + -- Finalization master type structure. A unique master is associated -- with each scope containing controlled objects. - type Finalization_Scope_Master + type Finalization_Master (Exceptions_OK : Boolean; Extra_Info : Boolean; Library_Level : Boolean) is limited -- cgit v1.1