-- has unknown discriminants. A default initialization of an object of
-- the type does not require an invariant check (AI12-0133).
--- Pending_Access_Types
--- Defined in all types. Set for incomplete, private, Taft-amendment
--- types, and their corresponding full views. This list contains all
--- access types, both named and anonymous, declared between the partial
--- and the full view. The list is used by the finalization machinery to
--- ensure that the finalization masters of all pending access types are
--- fully initialized when the full view is frozen.
-
-- Predicate_Function (synthesized)
-- Defined in all types. Set for types for which (Has_Predicates is True)
-- and for which a predicate procedure has been built that tests that the
-- Esize
-- RM_Size
-- Alignment
- -- Pending_Access_Types
-- Related_Expression
-- Current_Use_Clause
-- Subprograms_For_Type
-- Validate and generate stubs for all RACW types associated with type
-- Typ.
- procedure Process_Pending_Access_Types (Typ : Entity_Id);
- -- Associate type Typ's Finalize_Address primitive with the finalization
- -- masters of pending access-to-Typ types.
-
------------------------
-- Process_RACW_Types --
------------------------
end if;
end Process_RACW_Types;
- ----------------------------------
- -- Process_Pending_Access_Types --
- ----------------------------------
-
- procedure Process_Pending_Access_Types (Typ : Entity_Id) is
- E : Elmt_Id;
-
- begin
- -- Finalize_Address is not generated in CodePeer mode because the
- -- body contains address arithmetic. This processing is disabled.
-
- if CodePeer_Mode then
- null;
-
- -- Certain itypes are generated for contexts that cannot allocate
- -- objects and should not set primitive Finalize_Address.
-
- elsif Is_Itype (Typ)
- and then Nkind (Associated_Node_For_Itype (Typ)) =
- N_Explicit_Dereference
- then
- null;
-
- -- When an access type is declared after the incomplete view of a
- -- Taft-amendment type, the access type is considered pending in
- -- case the full view of the Taft-amendment type is controlled. If
- -- this is indeed the case, associate the Finalize_Address routine
- -- of the full view with the finalization masters of all pending
- -- access types. This scenario applies to anonymous access types as
- -- well. But the Finalize_Address routine is missing if the type is
- -- class-wide and we are under restriction No_Dispatching_Calls, see
- -- Expand_Freeze_Class_Wide_Type above for the rationale.
-
- elsif Needs_Finalization (Typ)
- and then (not Is_Class_Wide_Type (Typ)
- or else not Restriction_Active (No_Dispatching_Calls))
- and then Present (Pending_Access_Types (Typ))
- then
- E := First_Elmt (Pending_Access_Types (Typ));
- while Present (E) loop
-
- -- Generate:
- -- Set_Finalize_Address
- -- (Ptr_Typ, <Typ>FD'Unrestricted_Access);
-
- Append_Freeze_Action (Typ,
- Make_Set_Finalize_Address_Call
- (Loc => Sloc (N),
- Ptr_Typ => Node (E)));
-
- Next_Elmt (E);
- end loop;
- end if;
- end Process_Pending_Access_Types;
-
-- Local variables
Def_Id : constant Entity_Id := Entity (N);
end if;
- -- Complete the initialization of all pending access types' finalization
- -- masters now that the designated type has been is frozen and primitive
- -- Finalize_Address generated.
-
- Process_Pending_Access_Types (Def_Id);
Freeze_Stream_Operations (N, Def_Id);
-- Generate the [spec and] body of the invariant procedure tasked with
Context_Scope : Entity_Id := Empty;
Insertion_Node : Node_Id := Empty)
is
- procedure Add_Pending_Access_Type
- (Typ : Entity_Id;
- Ptr_Typ : Entity_Id);
- -- Add access type Ptr_Typ to the pending access type list for type Typ
-
- -----------------------------
- -- Add_Pending_Access_Type --
- -----------------------------
-
- procedure Add_Pending_Access_Type
- (Typ : Entity_Id;
- Ptr_Typ : Entity_Id)
- is
- List : Elist_Id;
-
- begin
- if Present (Pending_Access_Types (Typ)) then
- List := Pending_Access_Types (Typ);
- else
- List := New_Elmt_List;
- Set_Pending_Access_Types (Typ, List);
- end if;
-
- Prepend_Elmt (Ptr_Typ, List);
- end Add_Pending_Access_Type;
-
- -- Local variables
-
- Desig_Typ : constant Entity_Id := Designated_Type (Typ);
-
Ptr_Typ : constant Entity_Id := Root_Type_Of_Full_View (Base_Type (Typ));
-- A finalization master created for a named access type is associated
-- with the full view (if applicable) as a consequence of freezing. The
Prefix => New_Occurrence_Of (Pool_Id, Loc),
Attribute_Name => Name_Unrestricted_Access))));
- -- Finalize_Address is not generated in CodePeer mode because the
- -- body contains address arithmetic. Skip this step.
-
- if CodePeer_Mode then
- null;
-
- -- Associate the Finalize_Address primitive of the designated type
- -- with the finalization master of the access type. The designated
- -- type must be frozen, as Finalize_Address is generated when the
- -- freeze node is expanded.
-
- elsif Is_Frozen (Desig_Typ)
- and then Present (Finalize_Address (Desig_Typ))
-
- -- The Finalize_Address procedure for a class-wide type may exist
- -- at this point (as created by Expand_Freeze_Record_Type), but
- -- may not have been analyzed yet, so the Set_Finalize_Address call
- -- generation must be deferred (to Freeze_Type) in that case.
-
- and then Analyzed (Finalize_Address (Desig_Typ))
-
- -- The finalization master of an anonymous access type may need
- -- to be inserted in a specific place in the tree. For instance:
-
- -- type Comp_Typ;
-
- -- <finalization master of "access Comp_Typ">
-
- -- type Rec_Typ is record
- -- Comp : access Comp_Typ;
- -- end record;
-
- -- <freeze node for Comp_Typ>
- -- <freeze node for Rec_Typ>
-
- -- Due to this oddity, the anonymous access type is stored for
- -- later processing (see below).
-
- and then Ekind (Ptr_Typ) /= E_Anonymous_Access_Type
- then
- -- Generate:
- -- Set_Finalize_Address
- -- (<Ptr_Typ>FM, <Desig_Typ>FD'Unrestricted_Access);
-
- Append_To (Actions,
- Make_Set_Finalize_Address_Call
- (Loc => Loc,
- Ptr_Typ => Ptr_Typ));
-
- -- Otherwise the designated type is either anonymous access or a
- -- Taft-amendment type and has not been frozen. Store the access
- -- type for later processing (see Freeze_Type).
-
- else
- Add_Pending_Access_Type (Desig_Typ, Ptr_Typ);
- end if;
-
-- A finalization master created for an access designating a type
-- with private components is inserted before a context-dependent
-- node.
New_Occurrence_Of (RTE (RE_Master_Node), Loc));
end Make_Master_Node_Declaration;
- ------------------------------------
- -- Make_Set_Finalize_Address_Call --
- ------------------------------------
-
- function Make_Set_Finalize_Address_Call
- (Loc : Source_Ptr;
- Ptr_Typ : Entity_Id) return Node_Id
- is
- -- It is possible for Ptr_Typ to be a partial view, if the access type
- -- is a full view declared in the private part of a nested package, and
- -- the finalization actions take place when completing analysis of the
- -- enclosing unit. For this reason use Underlying_Type twice below.
-
- Desig_Typ : constant Entity_Id :=
- Available_View
- (Designated_Type (Underlying_Type (Ptr_Typ)));
- Fin_Addr : constant Entity_Id := Finalize_Address (Desig_Typ);
- Fin_Mas : constant Entity_Id :=
- Finalization_Master (Underlying_Type (Ptr_Typ));
-
- begin
- -- Both the finalization master and primitive Finalize_Address must be
- -- available.
-
- pragma Assert (Present (Fin_Addr) and Present (Fin_Mas));
-
- -- Generate:
- -- Set_Finalize_Address
- -- (<Ptr_Typ>FM, <Desig_Typ>FD'Unrestricted_Access);
-
- return
- Make_Procedure_Call_Statement (Loc,
- Name =>
- New_Occurrence_Of (RTE (RE_Set_Finalize_Address), Loc),
- Parameter_Associations => New_List (
- New_Occurrence_Of (Fin_Mas, Loc),
-
- Make_Attribute_Reference (Loc,
- Prefix => New_Occurrence_Of (Fin_Addr, Loc),
- Attribute_Name => Name_Unrestricted_Access)));
- end Make_Set_Finalize_Address_Call;
-
----------------------------------------
-- Make_Suppress_Object_Finalize_Call --
----------------------------------------
Obj : Entity_Id) return Node_Id;
-- Build the declaration of the Master_Node for the object Obj
- function Make_Set_Finalize_Address_Call
- (Loc : Source_Ptr;
- Ptr_Typ : Entity_Id) return Node_Id;
- -- Associate the Finalize_Address primitive of the designated type with the
- -- finalization master of access type Ptr_Typ. The returned call is:
- --
- -- Set_Finalize_Address
- -- (<Ptr_Typ>FM, <Desig_Typ>FD'Unrestricted_Access);
-
function Make_Suppress_Object_Finalize_Call
(Loc : Source_Ptr;
Obj : Entity_Id) return Node_Id;
Part_Of_Constituents,
Part_Of_References,
Partial_View_Has_Unknown_Discr,
- Pending_Access_Types,
Predicate_Expression,
Prev_Entity,
Prival,
Sm (Optimize_Alignment_Space, Flag),
Sm (Optimize_Alignment_Time, Flag),
Sm (Partial_View_Has_Unknown_Discr, Flag),
- Sm (Pending_Access_Types, Elist_Id),
Sm (Related_Expression, Node_Id),
Sm (RM_Size, Uint),
Sm (SPARK_Pragma, Node_Id),
with Ada.Exceptions; use Ada.Exceptions;
with System.Address_Image;
-with System.HTable; use System.HTable;
with System.IO; use System.IO;
with System.Soft_Links; use System.Soft_Links;
with System.Storage_Elements; use System.Storage_Elements;
package body System.Finalization_Masters is
- -- Finalize_Address hash table types. In general, masters are homogeneous
- -- collections of controlled objects. Rare cases such as allocations on a
- -- subpool require heterogeneous masters. The following table provides a
- -- relation between object address and its Finalize_Address routine.
-
- type Header_Num is range 0 .. 127;
-
- function Hash (Key : System.Address) return Header_Num;
-
- -- Address --> Finalize_Address_Ptr
-
- package Finalize_Address_Table is new Simple_HTable
- (Header_Num => Header_Num,
- Element => Finalize_Address_Ptr,
- No_Element => null,
- Key => System.Address,
- Hash => Hash,
- Equal => "=");
-
---------------------------
-- Add_Offset_To_Address --
---------------------------
------------------------
procedure Attach_Unprotected
- (N : not null FM_Node_Ptr;
- L : not null FM_Node_Ptr)
+ (N : not null FM_Node_Ptr;
+ Finalize_Address : not null Finalize_Address_Ptr;
+ L : not null FM_Node_Ptr)
is
begin
+ N.Finalize_Address := Finalize_Address;
+ N.Prev := L;
+ N.Next := L.Next;
+
L.Next.Prev := N;
- N.Next := L.Next;
- L.Next := N;
- N.Prev := L;
+ L.Next := N;
end Attach_Unprotected;
---------------
return Master.Base_Pool;
end Base_Pool;
- -----------------------------------------
- -- Delete_Finalize_Address_Unprotected --
- -----------------------------------------
-
- procedure Delete_Finalize_Address_Unprotected (Obj : System.Address) is
- begin
- Finalize_Address_Table.Remove (Obj);
- end Delete_Finalize_Address_Unprotected;
-
------------------------
-- Detach_Unprotected --
------------------------
--------------
overriding procedure Finalize (Master : in out Finalization_Master) is
- Cleanup : Finalize_Address_Ptr;
Curr_Ptr : FM_Node_Ptr;
Ex_Occur : Exception_Occurrence;
Obj_Addr : Address;
Obj_Addr := Curr_Ptr.all'Address + Header_Size;
- -- Retrieve TSS primitive Finalize_Address depending on the master's
- -- mode of operation.
-
- -- Synchronization:
- -- Read - allocation, finalization
- -- Write - outside
-
- if Master.Is_Homogeneous then
-
- -- Synchronization:
- -- Read - finalization
- -- Write - allocation, outside
-
- Cleanup := Master.Finalize_Address;
-
- else
- -- Synchronization:
- -- Read - finalization
- -- Write - allocation, deallocation
-
- Cleanup := Finalize_Address_Unprotected (Obj_Addr);
- end if;
-
begin
- Cleanup (Obj_Addr);
+ Curr_Ptr.Finalize_Address (Obj_Addr);
exception
when Fin_Occur : others =>
if not Raised then
Save_Occurrence (Ex_Occur, Fin_Occur);
end if;
end;
-
- -- When the master is a heterogeneous collection, destroy the object
- -- - Finalize_Address pair since it is no longer needed.
-
- -- Synchronization:
- -- Read - finalization
- -- Write - outside
-
- if not Master.Is_Homogeneous then
-
- -- Synchronization:
- -- Read - finalization
- -- Write - allocation, deallocation, finalization
-
- Delete_Finalize_Address_Unprotected (Obj_Addr);
- end if;
end loop;
Unlock_Task.all;
end if;
end Finalize;
- ----------------------
- -- Finalize_Address --
- ----------------------
-
- function Finalize_Address
- (Master : Finalization_Master) return Finalize_Address_Ptr
- is
- begin
- return Master.Finalize_Address;
- end Finalize_Address;
-
- ----------------------------------
- -- Finalize_Address_Unprotected --
- ----------------------------------
-
- function Finalize_Address_Unprotected
- (Obj : System.Address) return Finalize_Address_Ptr
- is
- begin
- return Finalize_Address_Table.Get (Obj);
- end Finalize_Address_Unprotected;
-
--------------------------
-- Finalization_Started --
--------------------------
return Master.Finalization_Started;
end Finalization_Started;
- ----------
- -- Hash --
- ----------
-
- function Hash (Key : System.Address) return Header_Num is
- begin
- return
- Header_Num
- (To_Integer (Key) mod Integer_Address (Header_Num'Range_Length));
- end Hash;
-
-----------------
-- Header_Size --
-----------------
Master.Objects.Prev := Master.Objects'Unchecked_Access;
end Initialize;
- --------------------
- -- Is_Homogeneous --
- --------------------
-
- function Is_Homogeneous (Master : Finalization_Master) return Boolean is
- begin
- return Master.Is_Homogeneous;
- end Is_Homogeneous;
-
-------------
-- Objects --
-------------
-- Output the basic contents of a master
-- Master : 0x123456789
- -- Is_Hmgen : TURE <or> FALSE
-- Base_Pool: null <or> 0x123456789
- -- Fin_Addr : null <or> 0x123456789
-- Fin_Start: TRUE <or> FALSE
Put ("Master : ");
Put_Line (Address_Image (Master'Address));
- Put ("Is_Hmgen : ");
- Put_Line (Master.Is_Homogeneous'Img);
-
Put ("Base_Pool: ");
if Master.Base_Pool = null then
Put_Line ("null");
Put_Line (Address_Image (Master.Base_Pool'Address));
end if;
- Put ("Fin_Addr : ");
- if Master.Finalize_Address = null then
- Put_Line ("null");
- else
- Put_Line (Address_Image (Master.Finalize_Address'Address));
- end if;
-
Put ("Fin_Start: ");
Put_Line (Master.Finalization_Started'Img);
-- ^ <or> ? <or> null
-- |Header: 0x123456789 (dummy head)
- -- | Prev: 0x123456789
- -- | Next: 0x123456789
+ -- | Fin_Addr: 0x0001F2580
+ -- | Prev : 0x123456789
+ -- | Next : 0x123456789
-- V
-- ^ - the current element points back to the correct element
-- n - the current element points back to null
-- Header - the address of the list header
- -- Prev - the address of the list header which the current element
- -- points back to
- -- Next - the address of the list header which the current element
- -- points to
+ -- Fin_Addr - the Finalize_Address routine
+ -- Prev - the address of the list header which the current element
+ -- points back to
+ -- Next - the address of the list header which the current element
+ -- points to
-- (dummy head) - present if dummy head
N_Ptr := Head;
Put_Line ("");
end if;
- Put ("| Prev: ");
+ Put ("| Fin_Addr: ");
+ if N_Ptr.Finalize_Address = null then
+ Put_Line ("null");
+ else
+ Put_Line (Address_Image (N_Ptr.Finalize_Address'Address));
+ end if;
+
+ Put ("| Prev : ");
if N_Ptr.Prev = null then
Put_Line ("null");
Put_Line (Address_Image (N_Ptr.Prev.all'Address));
end if;
- Put ("| Next: ");
+ Put ("| Next : ");
if N_Ptr.Next = null then
Put_Line ("null");
Master.Base_Pool := Pool_Ptr;
end Set_Base_Pool;
- --------------------------
- -- Set_Finalize_Address --
- --------------------------
-
- procedure Set_Finalize_Address
- (Master : in out Finalization_Master;
- Fin_Addr_Ptr : Finalize_Address_Ptr)
- is
- begin
- -- Synchronization:
- -- Read - finalization
- -- Write - allocation, outside
-
- Lock_Task.all;
- Set_Finalize_Address_Unprotected (Master, Fin_Addr_Ptr);
- Unlock_Task.all;
- end Set_Finalize_Address;
-
- --------------------------------------
- -- Set_Finalize_Address_Unprotected --
- --------------------------------------
-
- procedure Set_Finalize_Address_Unprotected
- (Master : in out Finalization_Master;
- Fin_Addr_Ptr : Finalize_Address_Ptr)
- is
- begin
- if Master.Finalize_Address = null then
- Master.Finalize_Address := Fin_Addr_Ptr;
- end if;
- end Set_Finalize_Address_Unprotected;
-
- ----------------------------------------------------
- -- Set_Heterogeneous_Finalize_Address_Unprotected --
- ----------------------------------------------------
-
- procedure Set_Heterogeneous_Finalize_Address_Unprotected
- (Obj : System.Address;
- Fin_Addr_Ptr : Finalize_Address_Ptr)
- is
- begin
- Finalize_Address_Table.Set (Obj, Fin_Addr_Ptr);
- end Set_Heterogeneous_Finalize_Address_Unprotected;
-
- --------------------------
- -- Set_Is_Heterogeneous --
- --------------------------
-
- procedure Set_Is_Heterogeneous (Master : in out Finalization_Master) is
- begin
- -- Synchronization:
- -- Read - finalization
- -- Write - outside
-
- Lock_Task.all;
- Master.Is_Homogeneous := False;
- Unlock_Task.all;
- end Set_Is_Heterogeneous;
-
end System.Finalization_Masters;
for Finalization_Master_Ptr'Storage_Size use 0;
procedure Attach_Unprotected
- (N : not null FM_Node_Ptr;
- L : not null FM_Node_Ptr);
+ (N : not null FM_Node_Ptr;
+ Finalize_Address : not null Finalize_Address_Ptr;
+ L : not null FM_Node_Ptr);
-- Prepend a node to a specific finalization master
- procedure Delete_Finalize_Address_Unprotected (Obj : System.Address);
- -- Destroy the relation pair object - Finalize_Address from the internal
- -- hash table.
-
procedure Detach_Unprotected (N : not null FM_Node_Ptr);
-- Remove a node from an arbitrary finalization master
-- the list of allocated controlled objects, finalizing each one by calling
-- its specific Finalize_Address. In the end, deallocate the dummy head.
- function Finalize_Address
- (Master : Finalization_Master) return Finalize_Address_Ptr;
- -- Return a reference to the TSS primitive Finalize_Address associated with
- -- a master.
-
- function Finalize_Address_Unprotected
- (Obj : System.Address) return Finalize_Address_Ptr;
- -- Retrieve the Finalize_Address primitive associated with a particular
- -- object.
-
function Finalization_Started (Master : Finalization_Master) return Boolean;
-- Return the finalization status of a master
function Header_Size return System.Storage_Elements.Storage_Count;
-- Return the size of type FM_Node as Storage_Count
- function Is_Homogeneous (Master : Finalization_Master) return Boolean;
- -- Return the behavior flag of a master
-
function Objects (Master : Finalization_Master) return FM_Node_Ptr;
-- Return the header of the doubly-linked list of controlled objects
procedure Print_Master (Master : Finalization_Master);
-- Debug routine, outputs the contents of a master
- procedure Set_Finalize_Address
- (Master : in out Finalization_Master;
- Fin_Addr_Ptr : Finalize_Address_Ptr);
- -- Compiler interface, do not call from within the run-time. Set the clean
- -- up routine of a finalization master
-
- procedure Set_Finalize_Address_Unprotected
- (Master : in out Finalization_Master;
- Fin_Addr_Ptr : Finalize_Address_Ptr);
- -- Set the clean up routine of a finalization master
-
- procedure Set_Heterogeneous_Finalize_Address_Unprotected
- (Obj : System.Address;
- Fin_Addr_Ptr : Finalize_Address_Ptr);
- -- Add a relation pair object - Finalize_Address to the internal hash
- -- table. This is done in the context of allocation on a heterogeneous
- -- finalization master where a single master services multiple anonymous
- -- access-to-controlled types.
-
- procedure Set_Is_Heterogeneous (Master : in out Finalization_Master);
- -- Mark the master as being a heterogeneous collection of objects
-
private
-- Heterogeneous collection type structure
type FM_Node is record
+ Finalize_Address : Finalize_Address_Ptr := null;
+
Prev : FM_Node_Ptr := null;
Next : FM_Node_Ptr := null;
end record;
type Finalization_Master is
new Ada.Finalization.Limited_Controlled with
record
- Is_Homogeneous : Boolean := True;
- -- A flag which controls the behavior of the master. A value of False
- -- denotes a heterogeneous collection.
-
Base_Pool : Any_Storage_Pool_Ptr := null;
-- A reference to the pool which this finalization master services. This
-- field is used in conjunction with the build-in-place machinery.
-- A doubly linked list which contains the headers of all controlled
-- objects allocated in a [sub]pool.
- Finalize_Address : Finalize_Address_Ptr := null;
- -- A reference to the routine reponsible for object finalization. This
- -- is used only when the master is in homogeneous mode.
-
Finalization_Started : Boolean := False;
-- A flag used to detect allocations which occur during the finalization
-- of a master. The allocations must raise Program_Error. This scenario
package body System.Storage_Pools.Subpools is
- Finalize_Address_Table_In_Use : Boolean := False;
- -- This flag should be set only when a successful allocation on a subpool
- -- has been performed and the associated Finalize_Address has been added to
- -- the hash table in System.Finalization_Masters.
-
function Address_To_FM_Node_Ptr is
new Ada.Unchecked_Conversion (Address, FM_Node_Ptr);
-- Synchronization:
-- Write - allocation, deallocation, finalization
- Attach_Unprotected (N_Ptr, Objects (Master.all));
+ Attach_Unprotected (N_Ptr, Fin_Address, Objects (Master.all));
-- Move the address from the hidden list header to the start of the
-- object. This operation effectively hides the list header.
Addr := N_Addr + Header_And_Padding;
- -- Homogeneous masters service the following:
-
- -- 1) Allocations on / Deallocations from regular pools
- -- 2) Named access types
- -- 3) Most cases of anonymous access types usage
-
- -- Synchronization:
- -- Read - allocation, finalization
- -- Write - outside
-
- if Master.Is_Homogeneous then
-
- -- Synchronization:
- -- Read - finalization
- -- Write - allocation, outside
-
- Set_Finalize_Address_Unprotected (Master.all, Fin_Address);
-
- -- Heterogeneous masters service the following:
-
- -- 1) Allocations on / Deallocations from subpools
- -- 2) Certain cases of anonymous access types usage
-
- else
- -- Synchronization:
- -- Read - finalization
- -- Write - allocation, deallocation
-
- Set_Heterogeneous_Finalize_Address_Unprotected (Addr, Fin_Address);
- Finalize_Address_Table_In_Use := True;
- end if;
-
Unlock_Task.all;
Lock_Taken := False;
Lock_Task.all;
begin
- -- Destroy the relation pair object - Finalize_Address since it is
- -- no longer needed.
-
- if Finalize_Address_Table_In_Use then
-
- -- Synchronization:
- -- Read - finalization
- -- Write - allocation, deallocation
-
- Delete_Finalize_Address_Unprotected (Addr);
- end if;
-
-- Account for possible padding space before the header due to a
-- larger alignment.
Subpool.Node := N_Ptr;
Attach (N_Ptr, To.Subpools'Unchecked_Access);
-
- -- Mark the subpool's master as being a heterogeneous collection of
- -- controlled objects.
-
- Set_Is_Heterogeneous (Subpool.Master);
end Set_Pool_Of_Subpool;
end System.Storage_Pools.Subpools;
RE_Finalization_Master, -- System.Finalization_Masters
RE_Finalization_Master_Ptr, -- System.Finalization_Masters
RE_Set_Base_Pool, -- System.Finalization_Masters
- RE_Set_Finalize_Address, -- System.Finalization_Masters
RE_Attach_Object_To_Master, -- System.Finalization_Primitives
RE_Attach_Object_To_Node, -- System.Finalization_Primitives
RE_Finalization_Master => System_Finalization_Masters,
RE_Finalization_Master_Ptr => System_Finalization_Masters,
RE_Set_Base_Pool => System_Finalization_Masters,
- RE_Set_Finalize_Address => System_Finalization_Masters,
RE_Attach_Object_To_Master => System_Finalization_Primitives,
RE_Attach_Object_To_Node => System_Finalization_Primitives,
Generate_Definition (Def_Id);
end if;
- -- Propagate any pending access types whose finalization masters need to
- -- be fully initialized from the partial to the full view. Guard against
- -- an illegal full view that remains unanalyzed.
-
- if Is_Type (Def_Id) and then Is_Incomplete_Or_Private_Type (Prev) then
- Set_Pending_Access_Types (Def_Id, Pending_Access_Types (Prev));
- end if;
-
if Chars (Scope (Def_Id)) = Name_System
and then Chars (Def_Id) = Name_Address
and then In_Predefined_Unit (N)