exp_aggr.adb
203 KB
-
exp_aggr.adb (Build_Record_Aggr_Code): For extension aggregates... · c5ee5ad2
2006-10-31 Bob Duff <duff@adacore.com> Ed Schonberg <schonberg@adacore.com> * exp_aggr.adb (Build_Record_Aggr_Code): For extension aggregates, if the parent part is a build-in-place function call, generate assignments. (Expand_Record_Aggregate): Call Convert_To_Assignments if any components are build-in-place function calls. (Replace_Self_Reference): New subsidiary of Make_OK_Assignment_Statement, to replace an access attribute that is a self-reference into an access to the appropriate component of the target object. Generalizes previous mechanism to handle self-references nested at any level. (Is_Self_Referential_Init): Remove, not needed. (Is_Self_Referential_Init): New predicate to simplify handling of self referential components in record aggregates. (Has_Default_Init_Comps, Make_OK_Assignment_Statement): Add guard to check for presence of entity before checking for self-reference. (Has_Default_Init_Comps): Return True if a component association is a self-reference to the enclosing type, which can only come from a default initialization. (Make_OK_Assignment_Statement): If the expression is of the form Typ'Acc, where Acc is an access attribute, the expression comes from a default initialized self-referential component. (Build_Record_Aggr_Code): If the type of the aggregate is a tagged type that has been derived from several abstract interfaces we must also initialize the tags of the secondary dispatch tables. From-SVN: r118253
Bob Duff committed