+2009-07-10 Thomas Quinot <quinot@adacore.com>
+
+ * sem_aggr.adb: Minor comments editing
+
+ * exp_tss.adb, exp_ch3.adb: Minor reformatting
+
2009-07-10 Robert Dewar <dewar@adacore.com>
* exp_util.adb: Minor code reorganization (use N_Short_Circuit)
Stmts :=
Build_Initialization_Call
(Loc,
- Make_Selected_Component (Loc,
- Prefix => Make_Identifier (Loc, Name_uInit),
- Selector_Name => New_Occurrence_Of (Id, Loc)),
- Typ,
- In_Init_Proc => True,
- Enclos_Type => Rec_Type,
- Discr_Map => Discr_Map,
+ Id_Ref =>
+ Make_Selected_Component (Loc,
+ Prefix =>
+ Make_Identifier (Loc, Name_uInit),
+ Selector_Name => New_Occurrence_Of (Id, Loc)),
+ Typ => Typ,
+ In_Init_Proc => True,
+ Enclos_Type => Rec_Type,
+ Discr_Map => Discr_Map,
Constructor_Ref => Expression (Decl));
else
Stmts := Build_Assignment (Id, Expression (Decl));
Stmts :=
Build_Initialization_Call
(Loc,
- Make_Selected_Component (Loc,
- Prefix => Make_Identifier (Loc, Name_uInit),
- Selector_Name => New_Occurrence_Of (Id, Loc)),
- Typ,
+ Id_Ref =>
+ Make_Selected_Component (Loc,
+ Prefix => Make_Identifier (Loc, Name_uInit),
+ Selector_Name => New_Occurrence_Of (Id, Loc)),
+ Typ => Typ,
In_Init_Proc => True,
- Enclos_Type => Rec_Type,
- Discr_Map => Discr_Map);
+ Enclos_Type => Rec_Type,
+ Discr_Map => Discr_Map);
Clean_Task_Names (Typ, Proc_Id);
-- Handle constructors of non-tagged CPP_Class types
- if not Is_Tagged_Type (Def_Id)
- and then Is_CPP_Class (Def_Id)
- then
+ if not Is_Tagged_Type (Def_Id) and then Is_CPP_Class (Def_Id) then
Set_CPP_Constructors (Def_Id);
end if;
if not Is_CPP_Class (Typ) then
return Node (Elmt);
- -- In case of CPP classes we are searching here for the
- -- default constructor and hence we must skip non-default
- -- constructors (if any)
+ -- For CPP classes, we are looking for the default constructor,
+ -- and so we must skip any non-default constructor.
elsif
No (Next
Next_Elmt (Elmt);
end loop;
- -- Non-default constructors are currently supported only in the
- -- context of interfacing with C++
+ -- Non-default constructors are currently supported only in the context
+ -- of interfacing with C++.
else pragma Assert (Is_CPP_Class (Typ));
- -- Use the referenced function to locate the IP procedure that
- -- corresponds with the C++ constructor
+ -- Use the referenced function to locate the init_proc matching
+ -- the C++ constructor.
Elmt := First_Elmt (TSS_Elist (FN));
while Present (Elmt) loop
-- Builds a new N_Component_Association node which associates
-- Component to expression Expr and adds it to the association
-- list being built, either New_Assoc_List, or the association
- -- being build for an inner aggregate.
+ -- being built for an inner aggregate.
function Discr_Present (Discr : Entity_Id) return Boolean;
-- If aggregate N is a regular aggregate this routine will return True.
Assoc_List : List_Id;
Comp : Entity_Id);
-- Nested components may themselves be discriminated
- -- types constrained by outer discriminants. Their
+ -- types constrained by outer discriminants, whose
-- values must be captured before the aggregate is
-- expanded into assignments.
-- have been collected in the aggregate earlier, and
-- they may appear as constraints of subcomponents.
-- Similarly if this component has discriminants, they
- -- might it turn be propagated to their components.
+ -- might in turn be propagated to their components.
if Has_Discriminants (Typ) then
Add_Discriminant_Values (Expr, New_Assoc_List);
begin
-- If the type has additional components, create
- -- an others box association for them.
+ -- an OTHERS box association for them.
Comp := First_Component (Ctyp);
while Present (Comp) loop