Commit fa57ac97 by Ed Schonberg Committed by Arnaud Charlet

exp_aggr.ads, [...] (Convert_Aggr_In_Allocator): Use Insert_Actions to place…

exp_aggr.ads, [...] (Convert_Aggr_In_Allocator): Use Insert_Actions to place expanded aggregate code before allocator...

2007-08-14  Ed Schonberg  <schonberg@adacore.com>
	    Gary Dismukes  <dismukes@adacore.com>

	* exp_aggr.ads, 
	exp_aggr.adb (Convert_Aggr_In_Allocator): Use Insert_Actions to place
	expanded aggregate code before allocator, and ahead of declaration for
	temporary, to prevent access before elaboration when the allocator is
	an actual for an access parameter.
	(Is_Static_Dispatch_Table_Aggregate): Handle aggregates initializing
	the TSD and the table of interfaces.
	(Convert_To_Assignments): Augment the test for delaying aggregate
	expansion for limited return statements to include the case of extended
	returns, to prevent creation of an unwanted transient scope.
	(Is_Static_Dispatch_Table_Aggregate): New subprogram.
	(Expand_Array_Aggregate): Handle aggregates associated with
	statically allocated dispatch tables.
	(Expand_Record_Aggregate): Handle aggregates associated with
	statically allocated dispatch tables.
	(Gen_Ctrl_Actions_For_Aggr): Generate a finalization list for allocators
	of anonymous access type.

From-SVN: r127429
parent dc096132
......@@ -40,11 +40,15 @@ package Exp_Aggr is
-- an N_Aggregate or N_Extension_Aggregate with Expansion_Delayed
-- This procedure performs in-place aggregate assignment.
procedure Convert_Aggr_In_Allocator (Decl, Aggr : Node_Id);
-- Decl is an access N_Object_Declaration (produced during
-- allocator expansion), Aggr is the initial expression aggregate
-- of an allocator. This procedure perform in-place aggregate
-- assignment in the newly allocated object.
procedure Convert_Aggr_In_Allocator
(Alloc : Node_Id;
Decl : Node_Id;
Aggr : Node_Id);
-- Alloc is the allocator whose expression is the aggregate Aggr.
-- Decl is an N_Object_Declaration created during allocator expansion.
-- This procedure perform in-place aggregate assignment into the
-- temporary declared in Decl, and the allocator becomes an access to
-- that temporary.
procedure Convert_Aggr_In_Assignment (N : Node_Id);
-- If the right-hand side of an assignment is an aggregate, expand the
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment