end record;
type Case_Table_Type is array (Nat range <>) of Case_Bounds;
- -- Table type used by Check_Case_Choices procedure
+ -- Table type used by Sort_Case_Table procedure
function Get_Base_Object (N : Node_Id) return Entity_Id;
-- Return the base object, i.e. the outermost prefix object, that N refers
-- Comp_Typ of aggregate N. Init_Expr denotes the initialization
-- expression of the component. All generated code is added to Stmts.
+ function In_Place_Assign_OK
+ (N : Node_Id;
+ Target_Object : Entity_Id := Empty) return Boolean;
+ -- Predicate to determine whether an aggregate assignment can be done in
+ -- place, because none of the new values can depend on the components of
+ -- the target of the assignment.
+
+ function Is_Build_In_Place_Aggregate_Return (N : Node_Id) return Boolean;
+ -- Return True if N is a simple return whose expression needs to be built
+ -- in place in the return object, assuming the expression is an aggregate.
+
function Is_Static_Dispatch_Table_Aggregate (N : Node_Id) return Boolean;
-- Returns true if N is an aggregate used to initialize the components
-- of a statically allocated dispatch table.
-- Local subprograms for Record Aggregate Expansion --
------------------------------------------------------
- function Is_Build_In_Place_Aggregate_Return (N : Node_Id) return Boolean;
- -- Return True if N is a simple return whose expression needs to be built
- -- in place in the return object, assuming the expression is an aggregate,
- -- possibly qualified or a dependent expression of a conditional expression
- -- (and possibly recursively). Such qualified and conditional expressions
- -- are transparent for this purpose since an enclosing return is propagated
- -- resp. distributed into these expressions by the expander.
-
function Build_Record_Aggr_Code
(N : Node_Id;
Typ : Entity_Id;
-- defaults. An aggregate for a type with mutable components must be
-- expanded into individual assignments.
- function In_Place_Assign_OK
- (N : Node_Id;
- Target_Object : Entity_Id := Empty) return Boolean;
- -- Predicate to determine whether an aggregate assignment can be done in
- -- place, because none of the new values can depend on the components of
- -- the target of the assignment.
-
procedure Initialize_Discriminants (N : Node_Id; Typ : Entity_Id);
-- If the type of the aggregate is a type extension with renamed discrimi-
-- nants, we must initialize the hidden discriminants of the parent.
-- these are cases we handle in there.
procedure Expand_Array_Aggregate (N : Node_Id);
- -- This is the top-level routine for array aggregate expansion.
- -- N is the N_Aggregate node to be expanded.
+ -- This is the top-level routine for array aggregate expansion
procedure Expand_Delta_Array_Aggregate (N : Node_Id; Deltas : List_Id);
-- This is the top-level routine for delta array aggregate expansion
-- Aggr_Assignment_OK_For_Backend --
------------------------------------
- -- Back-end processing by Gigi/gcc is possible only if all the following
- -- conditions are met:
+ -- Back-end processing is possible only if all the following conditions
+ -- are met:
-- 1. N consists of a single OTHERS choice, possibly recursively, or
-- of a single choice, possibly recursively, if it is surrounded by
-- Backend_Processing_Possible --
---------------------------------
- -- Backend processing by Gigi/gcc is possible only if all the following
- -- conditions are met:
+ -- Back-end processing is possible only if all the following conditions
+ -- are met:
-- 1. N is fully positional
then
return;
+ -- Aggregates that require a two-pass expansion are handled separately
+
elsif Is_Two_Pass_Aggregate (N) then
Two_Pass_Aggregate_Expansion (N);
return;