Commit 2287a75d by Arnaud Charlet

[multiple changes]

2010-06-17  Thomas Quinot  <quinot@adacore.com>

	* exp_imgv.adb, exp_ch7.ads: Minor reformatting.

2010-06-17  Robert Dewar  <dewar@adacore.com>

	* exp_ch9.adb, exp_disp.adb, exp_dist.adb: Use Make_Temporary.

2010-06-17  Thomas Quinot  <quinot@adacore.com>

	* sprint.adb (pg): Set Dump_Freeze_Null, to be consistent with -gnatdg.

From-SVN: r160895
parent c12beea0
2010-06-17 Thomas Quinot <quinot@adacore.com>
* exp_imgv.adb, exp_ch7.ads: Minor reformatting.
2010-06-17 Robert Dewar <dewar@adacore.com>
* exp_ch9.adb, exp_disp.adb, exp_dist.adb: Use Make_Temporary.
2010-06-17 Thomas Quinot <quinot@adacore.com>
* sprint.adb (pg): Set Dump_Freeze_Null, to be consistent with -gnatdg.
2010-06-17 Robert Dewar <dewar@adacore.com> 2010-06-17 Robert Dewar <dewar@adacore.com>
* exp_ch6.adb, exp_ch7.adb, exp_ch5.adb: Use Make_Temporary * exp_ch6.adb, exp_ch7.adb, exp_ch5.adb: Use Make_Temporary
......
...@@ -229,11 +229,11 @@ package Exp_Ch7 is ...@@ -229,11 +229,11 @@ package Exp_Ch7 is
procedure Store_Before_Actions_In_Scope (L : List_Id); procedure Store_Before_Actions_In_Scope (L : List_Id);
-- Append the list L of actions to the end of the before-actions store in -- Append the list L of actions to the end of the before-actions store in
-- the top of the scope stack -- the top of the scope stack.
procedure Store_After_Actions_In_Scope (L : List_Id); procedure Store_After_Actions_In_Scope (L : List_Id);
-- Append the list L of actions to the beginning of the after-actions store -- Append the list L of actions to the beginning of the after-actions store
-- in the top of the scope stack -- in the top of the scope stack.
procedure Wrap_Transient_Declaration (N : Node_Id); procedure Wrap_Transient_Declaration (N : Node_Id);
-- N is an object declaration. Expand the finalization calls after the -- N is an object declaration. Expand the finalization calls after the
......
...@@ -1157,8 +1157,7 @@ package body Exp_Disp is ...@@ -1157,8 +1157,7 @@ package body Exp_Disp is
New_Typ_Decl := New_Typ_Decl :=
Make_Full_Type_Declaration (Loc, Make_Full_Type_Declaration (Loc,
Defining_Identifier => Defining_Identifier => Make_Temporary (Loc, 'T'),
Make_Defining_Identifier (Loc, New_Internal_Name ('T')),
Type_Definition => Type_Definition =>
Make_Access_To_Object_Definition (Loc, Make_Access_To_Object_Definition (Loc,
All_Present => True, All_Present => True,
...@@ -1199,10 +1198,7 @@ package body Exp_Disp is ...@@ -1199,10 +1198,7 @@ package body Exp_Disp is
Else_Statements => Stats)); Else_Statements => Stats));
end if; end if;
Fent := Fent := Make_Temporary (Loc, 'F');
Make_Defining_Identifier (Loc,
New_Internal_Name ('F'));
Func := Func :=
Make_Subprogram_Body (Loc, Make_Subprogram_Body (Loc,
Specification => Specification =>
...@@ -1566,9 +1562,7 @@ package body Exp_Disp is ...@@ -1566,9 +1562,7 @@ package body Exp_Disp is
Decl_2 := Decl_2 :=
Make_Full_Type_Declaration (Loc, Make_Full_Type_Declaration (Loc,
Defining_Identifier => Defining_Identifier => Make_Temporary (Loc, 'T'),
Make_Defining_Identifier (Loc,
New_Internal_Name ('T')),
Type_Definition => Type_Definition =>
Make_Access_To_Object_Definition (Loc, Make_Access_To_Object_Definition (Loc,
All_Present => True, All_Present => True,
...@@ -1593,9 +1587,7 @@ package body Exp_Disp is ...@@ -1593,9 +1587,7 @@ package body Exp_Disp is
Decl_1 := Decl_1 :=
Make_Object_Declaration (Loc, Make_Object_Declaration (Loc,
Defining_Identifier => Defining_Identifier => Make_Temporary (Loc, 'S'),
Make_Defining_Identifier (Loc,
New_Internal_Name ('S')),
Constant_Present => True, Constant_Present => True,
Object_Definition => Object_Definition =>
New_Reference_To (RTE (RE_Storage_Offset), Loc), New_Reference_To (RTE (RE_Storage_Offset), Loc),
...@@ -1645,8 +1637,7 @@ package body Exp_Disp is ...@@ -1645,8 +1637,7 @@ package body Exp_Disp is
Decl_1 := Decl_1 :=
Make_Object_Declaration (Loc, Make_Object_Declaration (Loc,
Defining_Identifier => Defining_Identifier => Make_Temporary (Loc, 'S'),
Make_Defining_Identifier (Loc, New_Internal_Name ('S')),
Constant_Present => True, Constant_Present => True,
Object_Definition => Object_Definition =>
New_Reference_To (RTE (RE_Storage_Offset), Loc), New_Reference_To (RTE (RE_Storage_Offset), Loc),
...@@ -1665,10 +1656,10 @@ package body Exp_Disp is ...@@ -1665,10 +1656,10 @@ package body Exp_Disp is
Decl_2 := Decl_2 :=
Make_Object_Declaration (Loc, Make_Object_Declaration (Loc,
Defining_Identifier => Defining_Identifier => Make_Temporary (Loc, 'S'),
Make_Defining_Identifier (Loc, New_Internal_Name ('S')),
Constant_Present => True, Constant_Present => True,
Object_Definition => New_Reference_To (RTE (RE_Addr_Ptr), Loc), Object_Definition =>
New_Reference_To (RTE (RE_Addr_Ptr), Loc),
Expression => Expression =>
Unchecked_Convert_To Unchecked_Convert_To
(RTE (RE_Addr_Ptr), (RTE (RE_Addr_Ptr),
...@@ -1677,7 +1668,7 @@ package body Exp_Disp is ...@@ -1677,7 +1668,7 @@ package body Exp_Disp is
Append_To (Decl, Decl_1); Append_To (Decl, Decl_1);
Append_To (Decl, Decl_2); Append_To (Decl, Decl_2);
-- Reference the new actual. Generate: -- Reference the new actual, generate:
-- Target_Formal (S2.all) -- Target_Formal (S2.all)
Append_To (Actuals, Append_To (Actuals,
...@@ -1696,10 +1687,7 @@ package body Exp_Disp is ...@@ -1696,10 +1687,7 @@ package body Exp_Disp is
Next (Formal); Next (Formal);
end loop; end loop;
Thunk_Id := Thunk_Id := Make_Temporary (Loc, 'T');
Make_Defining_Identifier (Loc,
Chars => New_Internal_Name ('T'));
Set_Is_Thunk (Thunk_Id); Set_Is_Thunk (Thunk_Id);
-- Procedure case -- Procedure case
...@@ -1998,9 +1986,7 @@ package body Exp_Disp is ...@@ -1998,9 +1986,7 @@ package body Exp_Disp is
-- Generate: -- Generate:
-- Bnn : Communication_Block; -- Bnn : Communication_Block;
Com_Block := Com_Block := Make_Temporary (Loc, 'B');
Make_Defining_Identifier (Loc, New_Internal_Name ('B'));
Append_To (Decls, Append_To (Decls,
Make_Object_Declaration (Loc, Make_Object_Declaration (Loc,
Defining_Identifier => Defining_Identifier =>
...@@ -2351,8 +2337,7 @@ package body Exp_Disp is ...@@ -2351,8 +2337,7 @@ package body Exp_Disp is
-- where Bnn is the name of the communication block used in the -- where Bnn is the name of the communication block used in the
-- call to Protected_Entry_Call. -- call to Protected_Entry_Call.
Blk_Nam := Make_Defining_Identifier (Loc, New_Internal_Name ('B')); Blk_Nam := Make_Temporary (Loc, 'B');
Append_To (Decls, Append_To (Decls,
Make_Object_Declaration (Loc, Make_Object_Declaration (Loc,
Defining_Identifier => Defining_Identifier =>
...@@ -3597,13 +3582,8 @@ package body Exp_Disp is ...@@ -3597,13 +3582,8 @@ package body Exp_Disp is
Exporting_Table : constant Boolean := Exporting_Table : constant Boolean :=
Building_Static_DT (Typ) Building_Static_DT (Typ)
and then Suffix_Index > 0; and then Suffix_Index > 0;
Iface_DT : constant Entity_Id := Iface_DT : constant Entity_Id := Make_Temporary (Loc, 'T');
Make_Defining_Identifier (Loc, Predef_Prims : constant Entity_Id := Make_Temporary (Loc, 'R');
Chars => New_Internal_Name ('T'));
Name_Predef_Prims : constant Name_Id := New_Internal_Name ('R');
Predef_Prims : constant Entity_Id :=
Make_Defining_Identifier (Loc,
Chars => Name_Predef_Prims);
DT_Constr_List : List_Id; DT_Constr_List : List_Id;
DT_Aggr_List : List_Id; DT_Aggr_List : List_Id;
Empty_DT : Boolean := False; Empty_DT : Boolean := False;
...@@ -3752,9 +3732,7 @@ package body Exp_Disp is ...@@ -3752,9 +3732,7 @@ package body Exp_Disp is
Decl := Decl :=
Make_Subtype_Declaration (Loc, Make_Subtype_Declaration (Loc,
Defining_Identifier => Defining_Identifier => Make_Temporary (Loc, 'S'),
Make_Defining_Identifier (Loc,
New_Internal_Name ('S')),
Subtype_Indication => Subtype_Indication =>
New_Reference_To (RTE (RE_Address_Array), Loc)); New_Reference_To (RTE (RE_Address_Array), Loc));
...@@ -3916,7 +3894,7 @@ package body Exp_Disp is ...@@ -3916,7 +3894,7 @@ package body Exp_Disp is
pragma Assert (Count = Nb_Prim); pragma Assert (Count = Nb_Prim);
end; end;
OSD := Make_Defining_Identifier (Loc, New_Internal_Name ('I')); OSD := Make_Temporary (Loc, 'I');
Append_To (Result, Append_To (Result,
Make_Object_Declaration (Loc, Make_Object_Declaration (Loc,
...@@ -3929,7 +3907,9 @@ package body Exp_Disp is ...@@ -3929,7 +3907,9 @@ package body Exp_Disp is
Make_Index_Or_Discriminant_Constraint (Loc, Make_Index_Or_Discriminant_Constraint (Loc,
Constraints => New_List ( Constraints => New_List (
Make_Integer_Literal (Loc, Nb_Prim)))), Make_Integer_Literal (Loc, Nb_Prim)))),
Expression => Make_Aggregate (Loc,
Expression =>
Make_Aggregate (Loc,
Component_Associations => New_List ( Component_Associations => New_List (
Make_Component_Association (Loc, Make_Component_Association (Loc,
Choices => New_List ( Choices => New_List (
...@@ -5428,9 +5408,7 @@ package body Exp_Disp is ...@@ -5428,9 +5408,7 @@ package body Exp_Disp is
Decl := Decl :=
Make_Subtype_Declaration (Loc, Make_Subtype_Declaration (Loc,
Defining_Identifier => Defining_Identifier => Make_Temporary (Loc, 'S'),
Make_Defining_Identifier (Loc,
New_Internal_Name ('S')),
Subtype_Indication => Subtype_Indication =>
New_Reference_To (RTE (RE_Address_Array), Loc)); New_Reference_To (RTE (RE_Address_Array), Loc));
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2001-2008, Free Software Foundation, Inc. -- -- Copyright (C) 2001-2009, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -358,8 +358,8 @@ package body Exp_Imgv is ...@@ -358,8 +358,8 @@ package body Exp_Imgv is
if Discard_Names (First_Subtype (Ptyp)) if Discard_Names (First_Subtype (Ptyp))
or else No (Lit_Strings (Root_Type (Ptyp))) or else No (Lit_Strings (Root_Type (Ptyp)))
then then
-- When pragma Discard_Names applies to the first subtype, -- When pragma Discard_Names applies to the first subtype, build
-- then build (Pref'Pos)'Img. -- (Pref'Pos)'Img.
Rewrite (N, Rewrite (N,
Make_Attribute_Reference (Loc, Make_Attribute_Reference (Loc,
...@@ -380,8 +380,10 @@ package body Exp_Imgv is ...@@ -380,8 +380,10 @@ package body Exp_Imgv is
if Ttyp = Standard_Integer_8 then if Ttyp = Standard_Integer_8 then
Imid := RE_Image_Enumeration_8; Imid := RE_Image_Enumeration_8;
elsif Ttyp = Standard_Integer_16 then elsif Ttyp = Standard_Integer_16 then
Imid := RE_Image_Enumeration_16; Imid := RE_Image_Enumeration_16;
else else
Imid := RE_Image_Enumeration_32; Imid := RE_Image_Enumeration_32;
end if; end if;
......
...@@ -404,6 +404,7 @@ package body Sprint is ...@@ -404,6 +404,7 @@ package body Sprint is
begin begin
Dump_Generated_Only := True; Dump_Generated_Only := True;
Dump_Original_Only := False; Dump_Original_Only := False;
Dump_Freeze_Null := True;
Current_Source_File := No_Source_File; Current_Source_File := No_Source_File;
if Arg in List_Range then if Arg in List_Range then
......
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