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
......
...@@ -1168,8 +1168,7 @@ package body Exp_Ch9 is ...@@ -1168,8 +1168,7 @@ package body Exp_Ch9 is
procedure Build_Entry_Family_Name (Id : Entity_Id) is procedure Build_Entry_Family_Name (Id : Entity_Id) is
Def : constant Node_Id := Def : constant Node_Id :=
Discrete_Subtype_Definition (Parent (Id)); Discrete_Subtype_Definition (Parent (Id));
L_Id : constant Entity_Id := L_Id : constant Entity_Id := Make_Temporary (Loc, 'L');
Make_Defining_Identifier (Loc, New_Internal_Name ('L'));
L_Stmts : constant List_Id := New_List; L_Stmts : constant List_Id := New_List;
Val : Node_Id; Val : Node_Id;
...@@ -1265,9 +1264,8 @@ package body Exp_Ch9 is ...@@ -1265,9 +1264,8 @@ package body Exp_Ch9 is
Make_Iteration_Scheme (Loc, Make_Iteration_Scheme (Loc,
Loop_Parameter_Specification => Loop_Parameter_Specification =>
Make_Loop_Parameter_Specification (Loc, Make_Loop_Parameter_Specification (Loc,
Defining_Identifier => L_Id, Defining_Identifier => L_Id,
Discrete_Subtype_Definition => Discrete_Subtype_Definition => Build_Range (Def))),
Build_Range (Def))),
Statements => L_Stmts, Statements => L_Stmts,
End_Label => Empty)); End_Label => Empty));
end Build_Entry_Family_Name; end Build_Entry_Family_Name;
...@@ -1411,7 +1409,7 @@ package body Exp_Ch9 is ...@@ -1411,7 +1409,7 @@ package body Exp_Ch9 is
return Empty; return Empty;
end if; end if;
Index := Make_Defining_Identifier (Loc, New_Internal_Name ('I')); Index := Make_Temporary (Loc, 'I');
-- Step 1: Generate the declaration of the index variable: -- Step 1: Generate the declaration of the index variable:
-- Inn : Protected_Entry_Index := 0; -- Inn : Protected_Entry_Index := 0;
...@@ -1428,10 +1426,8 @@ package body Exp_Ch9 is ...@@ -1428,10 +1426,8 @@ package body Exp_Ch9 is
Append_To (B_Decls, Append_To (B_Decls,
Make_Object_Declaration (Loc, Make_Object_Declaration (Loc,
Defining_Identifier => Index, Defining_Identifier => Index,
Object_Definition => Object_Definition => New_Reference_To (RTE (Index_Typ), Loc),
New_Reference_To (RTE (Index_Typ), Loc), Expression => Make_Integer_Literal (Loc, 0)));
Expression =>
Make_Integer_Literal (Loc, 0)));
B_Stmts := New_List; B_Stmts := New_List;
...@@ -1488,19 +1484,15 @@ package body Exp_Ch9 is ...@@ -1488,19 +1484,15 @@ package body Exp_Ch9 is
-- Generate: -- Generate:
-- type Ann is access all <actual-type> -- type Ann is access all <actual-type>
Comp_Nam := Comp_Nam := Make_Temporary (Loc, 'A');
Make_Defining_Identifier (Loc, New_Internal_Name ('A'));
Append_To (Decls, Append_To (Decls,
Make_Full_Type_Declaration (Loc, Make_Full_Type_Declaration (Loc,
Defining_Identifier => Defining_Identifier => Comp_Nam,
Comp_Nam, Type_Definition =>
Type_Definition =>
Make_Access_To_Object_Definition (Loc, Make_Access_To_Object_Definition (Loc,
All_Present => All_Present => True,
True, Constant_Present => Ekind (Formal) = E_In_Parameter,
Constant_Present =>
Ekind (Formal) = E_In_Parameter,
Subtype_Indication => Subtype_Indication =>
New_Reference_To (Etype (Actual), Loc)))); New_Reference_To (Etype (Actual), Loc))));
...@@ -1525,8 +1517,7 @@ package body Exp_Ch9 is ...@@ -1525,8 +1517,7 @@ package body Exp_Ch9 is
Next_Formal_With_Extras (Formal); Next_Formal_With_Extras (Formal);
end loop; end loop;
Rec_Nam := Rec_Nam := Make_Temporary (Loc, 'P');
Make_Defining_Identifier (Loc, New_Internal_Name ('P'));
if Has_Comp then if Has_Comp then
...@@ -3104,7 +3095,7 @@ package body Exp_Ch9 is ...@@ -3104,7 +3095,7 @@ package body Exp_Ch9 is
if Nkind (Op_Spec) = N_Function_Specification then if Nkind (Op_Spec) = N_Function_Specification then
if Exc_Safe then if Exc_Safe then
R := Make_Defining_Identifier (Loc, New_Internal_Name ('R')); R := Make_Temporary (Loc, 'R');
Unprot_Call := Unprot_Call :=
Make_Object_Declaration (Loc, Make_Object_Declaration (Loc,
Defining_Identifier => R, Defining_Identifier => R,
...@@ -3115,8 +3106,10 @@ package body Exp_Ch9 is ...@@ -3115,8 +3106,10 @@ package body Exp_Ch9 is
Name => Make_Identifier (Loc, Name => Make_Identifier (Loc,
Chars (Defining_Unit_Name (N_Op_Spec))), Chars (Defining_Unit_Name (N_Op_Spec))),
Parameter_Associations => Uactuals)); Parameter_Associations => Uactuals));
Return_Stmt := Make_Simple_Return_Statement (Loc,
Expression => New_Reference_To (R, Loc)); Return_Stmt :=
Make_Simple_Return_Statement (Loc,
Expression => New_Reference_To (R, Loc));
else else
Unprot_Call := Make_Simple_Return_Statement (Loc, Unprot_Call := Make_Simple_Return_Statement (Loc,
...@@ -3489,8 +3482,8 @@ package body Exp_Ch9 is ...@@ -3489,8 +3482,8 @@ package body Exp_Ch9 is
and then Ada_Version >= Ada_05 and then Ada_Version >= Ada_05
then then
declare declare
Obj : constant Entity_Id := ExpR : constant Node_Id := Relocate_Node (Concval);
Make_Defining_Identifier (Loc, New_Internal_Name ('F')); Obj : constant Entity_Id := Make_Temporary (Loc, 'F', ExpR);
Decl : Node_Id; Decl : Node_Id;
begin begin
...@@ -3498,7 +3491,7 @@ package body Exp_Ch9 is ...@@ -3498,7 +3491,7 @@ package body Exp_Ch9 is
Make_Object_Declaration (Loc, Make_Object_Declaration (Loc,
Defining_Identifier => Obj, Defining_Identifier => Obj,
Object_Definition => New_Occurrence_Of (Conctyp, Loc), Object_Definition => New_Occurrence_Of (Conctyp, Loc),
Expression => Relocate_Node (Concval)); Expression => ExpR);
Set_Etype (Obj, Conctyp); Set_Etype (Obj, Conctyp);
Decls := New_List (Decl); Decls := New_List (Decl);
Rewrite (Concval, New_Occurrence_Of (Obj, Loc)); Rewrite (Concval, New_Occurrence_Of (Obj, Loc));
...@@ -3568,11 +3561,9 @@ package body Exp_Ch9 is ...@@ -3568,11 +3561,9 @@ package body Exp_Ch9 is
if Is_By_Copy_Type (Etype (Actual)) then if Is_By_Copy_Type (Etype (Actual)) then
N_Node := N_Node :=
Make_Object_Declaration (Loc, Make_Object_Declaration (Loc,
Defining_Identifier => Defining_Identifier => Make_Temporary (Loc, 'J'),
Make_Defining_Identifier (Loc, Aliased_Present => True,
Chars => New_Internal_Name ('J')), Object_Definition =>
Aliased_Present => True,
Object_Definition =>
New_Reference_To (Etype (Formal), Loc)); New_Reference_To (Etype (Formal), Loc));
-- Mark the object as not needing initialization since the -- Mark the object as not needing initialization since the
...@@ -3683,13 +3674,12 @@ package body Exp_Ch9 is ...@@ -3683,13 +3674,12 @@ package body Exp_Ch9 is
-- Bnn : Communications_Block; -- Bnn : Communications_Block;
Comm_Name := Comm_Name := 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 => Comm_Name, Defining_Identifier => Comm_Name,
Object_Definition => Object_Definition =>
New_Reference_To (RTE (RE_Communication_Block), Loc))); New_Reference_To (RTE (RE_Communication_Block), Loc)));
-- Some additional statements for protected entry calls -- Some additional statements for protected entry calls
...@@ -3941,16 +3931,13 @@ package body Exp_Ch9 is ...@@ -3941,16 +3931,13 @@ package body Exp_Ch9 is
Loc : constant Source_Ptr := Sloc (N); Loc : constant Source_Ptr := Sloc (N);
Chain : constant Entity_Id := Chain : constant Entity_Id :=
Make_Defining_Identifier (Loc, Name_uChain); Make_Defining_Identifier (Loc, Name_uChain);
Blkent : constant Entity_Id := Make_Temporary (Loc, 'A');
Blkent : Entity_Id;
Block : Node_Id; Block : Node_Id;
begin begin
Blkent := Make_Defining_Identifier (Loc, New_Internal_Name ('A'));
Block := Block :=
Make_Block_Statement (Loc, Make_Block_Statement (Loc,
Identifier => New_Reference_To (Blkent, Loc), Identifier => New_Reference_To (Blkent, Loc),
Declarations => New_List ( Declarations => New_List (
-- _Chain : Activation_Chain; -- _Chain : Activation_Chain;
...@@ -4006,12 +3993,10 @@ package body Exp_Ch9 is ...@@ -4006,12 +3993,10 @@ package body Exp_Ch9 is
Loc : constant Source_Ptr := Sloc (N); Loc : constant Source_Ptr := Sloc (N);
Chain : constant Entity_Id := Chain : constant Entity_Id :=
Make_Defining_Identifier (Loc, Name_uChain); Make_Defining_Identifier (Loc, Name_uChain);
Blkent : Entity_Id; Blkent : constant Entity_Id := Make_Temporary (Loc, 'A');
Block : Node_Id; Block : Node_Id;
begin begin
Blkent := Make_Defining_Identifier (Loc, New_Internal_Name ('A'));
Append_To (Init_Stmts, Append_To (Init_Stmts,
Make_Procedure_Call_Statement (Loc, Make_Procedure_Call_Statement (Loc,
Name => New_Reference_To (RTE (RE_Activate_Tasks), Loc), Name => New_Reference_To (RTE (RE_Activate_Tasks), Loc),
...@@ -4141,9 +4126,7 @@ package body Exp_Ch9 is ...@@ -4141,9 +4126,7 @@ package body Exp_Ch9 is
Efam := First_Entity (Conctyp); Efam := First_Entity (Conctyp);
while Present (Efam) loop while Present (Efam) loop
if Ekind (Efam) = E_Entry_Family then if Ekind (Efam) = E_Entry_Family then
Efam_Type := Efam_Type := Make_Temporary (Loc, 'F');
Make_Defining_Identifier (Loc,
Chars => New_Internal_Name ('F'));
declare declare
Bas : Entity_Id := Bas : Entity_Id :=
...@@ -4158,9 +4141,7 @@ package body Exp_Ch9 is ...@@ -4158,9 +4141,7 @@ package body Exp_Ch9 is
(Discrete_Subtype_Definition (Parent (Efam)), Lo, Hi); (Discrete_Subtype_Definition (Parent (Efam)), Lo, Hi);
if Is_Potentially_Large_Family (Bas, Conctyp, Lo, Hi) then if Is_Potentially_Large_Family (Bas, Conctyp, Lo, Hi) then
Bas := Bas := Make_Temporary (Loc, 'B');
Make_Defining_Identifier (Loc,
Chars => New_Internal_Name ('B'));
Bas_Decl := Bas_Decl :=
Make_Subtype_Declaration (Loc, Make_Subtype_Declaration (Loc,
...@@ -4397,20 +4378,19 @@ package body Exp_Ch9 is ...@@ -4397,20 +4378,19 @@ package body Exp_Ch9 is
else else
declare declare
Decl : Node_Id; Decl : Node_Id;
T_Self : constant Entity_Id := T_Self : constant Entity_Id := Make_Temporary (Loc, 'T');
Make_Defining_Identifier (Loc,
Chars => New_Internal_Name ('T'));
T_Body : constant Node_Id := T_Body : constant Node_Id :=
Parent (Corresponding_Body (Parent (Entity (N)))); Parent (Corresponding_Body (Parent (Entity (N))));
begin begin
Decl := Make_Object_Declaration (Loc, Decl :=
Defining_Identifier => T_Self, Make_Object_Declaration (Loc,
Object_Definition => Defining_Identifier => T_Self,
New_Occurrence_Of (RTE (RO_ST_Task_Id), Loc), Object_Definition =>
Expression => New_Occurrence_Of (RTE (RO_ST_Task_Id), Loc),
Make_Function_Call (Loc, Expression =>
Name => New_Reference_To (RTE (RE_Self), Loc))); Make_Function_Call (Loc,
Name => New_Reference_To (RTE (RE_Self), Loc)));
Prepend (Decl, Declarations (T_Body)); Prepend (Decl, Declarations (T_Body));
Analyze (Decl); Analyze (Decl);
Set_Scope (T_Self, Entity (N)); Set_Scope (T_Self, Entity (N));
...@@ -4707,25 +4687,28 @@ package body Exp_Ch9 is ...@@ -4707,25 +4687,28 @@ package body Exp_Ch9 is
-- completes in the middle of the accept body. -- completes in the middle of the accept body.
if Present (Handled_Statement_Sequence (N)) then if Present (Handled_Statement_Sequence (N)) then
Lab_Id := Make_Identifier (Loc, New_Internal_Name ('L')); declare
Set_Entity (Lab_Id, Ent : Entity_Id;
Make_Defining_Identifier (Loc, Chars (Lab_Id)));
Lab := Make_Label (Loc, Lab_Id); begin
Ldecl := Ent := Make_Temporary (Loc, 'L');
Make_Implicit_Label_Declaration (Loc, Lab_Id := New_Reference_To (Ent, Loc);
Defining_Identifier => Entity (Lab_Id), Lab := Make_Label (Loc, Lab_Id);
Label_Construct => Lab); Ldecl :=
Append (Lab, Statements (Handled_Statement_Sequence (N))); Make_Implicit_Label_Declaration (Loc,
Defining_Identifier => Ent,
Lab_Id := Make_Identifier (Loc, New_Internal_Name ('L')); Label_Construct => Lab);
Set_Entity (Lab_Id, Append (Lab, Statements (Handled_Statement_Sequence (N)));
Make_Defining_Identifier (Loc, Chars (Lab_Id)));
Lab := Make_Label (Loc, Lab_Id); Ent := Make_Temporary (Loc, 'L');
Ldecl2 := Lab_Id := New_Reference_To (Ent, Loc);
Make_Implicit_Label_Declaration (Loc, Lab := Make_Label (Loc, Lab_Id);
Defining_Identifier => Entity (Lab_Id), Ldecl2 :=
Label_Construct => Lab); Make_Implicit_Label_Declaration (Loc,
Append (Lab, Statements (Handled_Statement_Sequence (N))); Defining_Identifier => Ent,
Label_Construct => Lab);
Append (Lab, Statements (Handled_Statement_Sequence (N)));
end;
else else
Ldecl := Empty; Ldecl := Empty;
...@@ -4737,9 +4720,7 @@ package body Exp_Ch9 is ...@@ -4737,9 +4720,7 @@ package body Exp_Ch9 is
if Is_List_Member (N) then if Is_List_Member (N) then
if Present (Handled_Statement_Sequence (N)) then if Present (Handled_Statement_Sequence (N)) then
Ann := Ann := Make_Temporary (Loc, 'A');
Make_Defining_Identifier (Loc,
Chars => New_Internal_Name ('A'));
Adecl := Adecl :=
Make_Object_Declaration (Loc, Make_Object_Declaration (Loc,
...@@ -4796,9 +4777,7 @@ package body Exp_Ch9 is ...@@ -4796,9 +4777,7 @@ package body Exp_Ch9 is
-- label for requeue expansion must be declared. -- label for requeue expansion must be declared.
if N = Accept_Statement (Alt) then if N = Accept_Statement (Alt) then
Ann := Ann := Make_Temporary (Loc, 'A');
Make_Defining_Identifier (Loc, New_Internal_Name ('A'));
Adecl := Adecl :=
Make_Object_Declaration (Loc, Make_Object_Declaration (Loc,
Defining_Identifier => Ann, Defining_Identifier => Ann,
...@@ -4911,10 +4890,8 @@ package body Exp_Ch9 is ...@@ -4911,10 +4890,8 @@ package body Exp_Ch9 is
Comps : List_Id; Comps : List_Id;
T : constant Entity_Id := Defining_Identifier (N); T : constant Entity_Id := Defining_Identifier (N);
D_T : constant Entity_Id := Designated_Type (T); D_T : constant Entity_Id := Designated_Type (T);
D_T2 : constant Entity_Id := Make_Defining_Identifier (Loc, D_T2 : constant Entity_Id := Make_Temporary (Loc, 'D');
Chars => New_Internal_Name ('D')); E_T : constant Entity_Id := Make_Temporary (Loc, 'E');
E_T : constant Entity_Id := Make_Defining_Identifier (Loc,
Chars => New_Internal_Name ('E'));
P_List : constant List_Id := Build_Protected_Spec P_List : constant List_Id := Build_Protected_Spec
(N, RTE (RE_Address), D_T, False); (N, RTE (RE_Address), D_T, False);
Decl1 : Node_Id; Decl1 : Node_Id;
...@@ -4950,8 +4927,7 @@ package body Exp_Ch9 is ...@@ -4950,8 +4927,7 @@ package body Exp_Ch9 is
Comps := New_List ( Comps := New_List (
Make_Component_Declaration (Loc, Make_Component_Declaration (Loc,
Defining_Identifier => Defining_Identifier => Make_Temporary (Loc, 'P'),
Make_Defining_Identifier (Loc, New_Internal_Name ('P')),
Component_Definition => Component_Definition =>
Make_Component_Definition (Loc, Make_Component_Definition (Loc,
Aliased_Present => False, Aliased_Present => False,
...@@ -4959,11 +4935,10 @@ package body Exp_Ch9 is ...@@ -4959,11 +4935,10 @@ package body Exp_Ch9 is
New_Occurrence_Of (RTE (RE_Address), Loc))), New_Occurrence_Of (RTE (RE_Address), Loc))),
Make_Component_Declaration (Loc, Make_Component_Declaration (Loc,
Defining_Identifier => Defining_Identifier => Make_Temporary (Loc, 'S'),
Make_Defining_Identifier (Loc, New_Internal_Name ('S')),
Component_Definition => Component_Definition =>
Make_Component_Definition (Loc, Make_Component_Definition (Loc,
Aliased_Present => False, Aliased_Present => False,
Subtype_Indication => New_Occurrence_Of (D_T2, Loc)))); Subtype_Indication => New_Occurrence_Of (D_T2, Loc))));
Decl2 := Decl2 :=
...@@ -5291,7 +5266,7 @@ package body Exp_Ch9 is ...@@ -5291,7 +5266,7 @@ package body Exp_Ch9 is
-- Construct the block, using the declarations from the accept -- Construct the block, using the declarations from the accept
-- statement if any to initialize the declarations of the block. -- statement if any to initialize the declarations of the block.
Blkent := Make_Defining_Identifier (Loc, New_Internal_Name ('A')); Blkent := Make_Temporary (Loc, 'A');
Set_Ekind (Blkent, E_Block); Set_Ekind (Blkent, E_Block);
Set_Etype (Blkent, Standard_Void_Type); Set_Etype (Blkent, Standard_Void_Type);
Set_Scope (Blkent, Current_Scope); Set_Scope (Blkent, Current_Scope);
...@@ -5676,7 +5651,7 @@ package body Exp_Ch9 is ...@@ -5676,7 +5651,7 @@ package body Exp_Ch9 is
T : Entity_Id; -- Additional status flag T : Entity_Id; -- Additional status flag
begin begin
Blk_Ent := Make_Defining_Identifier (Loc, New_Internal_Name ('A')); Blk_Ent := Make_Temporary (Loc, 'A');
Ecall := Triggering_Statement (Trig); Ecall := Triggering_Statement (Trig);
-- The arguments in the call may require dynamic allocation, and the -- The arguments in the call may require dynamic allocation, and the
...@@ -5717,13 +5692,11 @@ package body Exp_Ch9 is ...@@ -5717,13 +5692,11 @@ package body Exp_Ch9 is
-- Communication block processing, generate: -- Communication block processing, generate:
-- Bnn : Communication_Block; -- Bnn : Communication_Block;
Bnn := Make_Defining_Identifier (Loc, New_Internal_Name ('B')); Bnn := Make_Temporary (Loc, 'B');
Append_To (Decls, Append_To (Decls,
Make_Object_Declaration (Loc, Make_Object_Declaration (Loc,
Defining_Identifier => Defining_Identifier => Bnn,
Bnn, Object_Definition =>
Object_Definition =>
New_Reference_To (RTE (RE_Communication_Block), Loc))); New_Reference_To (RTE (RE_Communication_Block), Loc)));
-- Call kind processing, generate: -- Call kind processing, generate:
...@@ -5761,14 +5734,13 @@ package body Exp_Ch9 is ...@@ -5761,14 +5734,13 @@ package body Exp_Ch9 is
S := Build_S (Loc, Decls); S := Build_S (Loc, Decls);
-- Additional status flag processing, generate: -- Additional status flag processing, generate:
-- Tnn : Boolean;
T := Make_Defining_Identifier (Loc, New_Internal_Name ('T')); T := Make_Temporary (Loc, 'T');
Append_To (Decls, Append_To (Decls,
Make_Object_Declaration (Loc, Make_Object_Declaration (Loc,
Defining_Identifier => Defining_Identifier => T,
T, Object_Definition =>
Object_Definition =>
New_Reference_To (Standard_Boolean, Loc))); New_Reference_To (Standard_Boolean, Loc)));
------------------------------ ------------------------------
...@@ -5853,9 +5825,7 @@ package body Exp_Ch9 is ...@@ -5853,9 +5825,7 @@ package body Exp_Ch9 is
-- _clean; -- _clean;
-- end; -- end;
Cleanup_Block_Ent := Cleanup_Block_Ent := Make_Temporary (Loc, 'C');
Make_Defining_Identifier (Loc, New_Internal_Name ('C'));
Cleanup_Block := Cleanup_Block :=
Build_Cleanup_Block (Loc, Cleanup_Block_Ent, Cleanup_Stmts, Bnn); Build_Cleanup_Block (Loc, Cleanup_Block_Ent, Cleanup_Stmts, Bnn);
...@@ -5868,9 +5838,7 @@ package body Exp_Ch9 is ...@@ -5868,9 +5838,7 @@ package body Exp_Ch9 is
-- when Abort_Signal => Abort_Undefer; -- when Abort_Signal => Abort_Undefer;
-- end; -- end;
Abort_Block_Ent := Abort_Block_Ent := Make_Temporary (Loc, 'A');
Make_Defining_Identifier (Loc, New_Internal_Name ('A'));
ProtE_Stmts := ProtE_Stmts :=
New_List ( New_List (
Make_Implicit_Label_Declaration (Loc, Make_Implicit_Label_Declaration (Loc,
...@@ -5985,9 +5953,7 @@ package body Exp_Ch9 is ...@@ -5985,9 +5953,7 @@ package body Exp_Ch9 is
-- _clean; -- _clean;
-- end; -- end;
Cleanup_Block_Ent := Cleanup_Block_Ent := Make_Temporary (Loc, 'C');
Make_Defining_Identifier (Loc, New_Internal_Name ('C'));
Cleanup_Block := Cleanup_Block :=
Build_Cleanup_Block (Loc, Cleanup_Block_Ent, Cleanup_Stmts, T); Build_Cleanup_Block (Loc, Cleanup_Block_Ent, Cleanup_Stmts, T);
...@@ -6000,13 +5966,11 @@ package body Exp_Ch9 is ...@@ -6000,13 +5966,11 @@ package body Exp_Ch9 is
-- when Abort_Signal => Abort_Undefer; -- when Abort_Signal => Abort_Undefer;
-- end; -- end;
Abort_Block_Ent := Abort_Block_Ent := Make_Temporary (Loc, 'A');
Make_Defining_Identifier (Loc, New_Internal_Name ('A'));
Append_To (TaskE_Stmts, Append_To (TaskE_Stmts,
Make_Implicit_Label_Declaration (Loc, Make_Implicit_Label_Declaration (Loc,
Defining_Identifier => Defining_Identifier => Abort_Block_Ent));
Abort_Block_Ent));
Append_To (TaskE_Stmts, Append_To (TaskE_Stmts,
Build_Abort_Block Build_Abort_Block
...@@ -6143,8 +6107,7 @@ package body Exp_Ch9 is ...@@ -6143,8 +6107,7 @@ package body Exp_Ch9 is
-- Add a Delay_Block object to the parameter list of the delay -- Add a Delay_Block object to the parameter list of the delay
-- procedure to form the parameter list of the Wait entry call. -- procedure to form the parameter list of the Wait entry call.
Dblock_Ent := Dblock_Ent := Make_Temporary (Loc, 'D');
Make_Defining_Identifier (Loc, New_Internal_Name ('D'));
Pdef := Entity (Name (Ecall)); Pdef := Entity (Name (Ecall));
...@@ -7092,8 +7055,7 @@ package body Exp_Ch9 is ...@@ -7092,8 +7055,7 @@ package body Exp_Ch9 is
-- Declare new access type and then append -- Declare new access type and then append
Ctype := Ctype := Make_Temporary (Loc, 'A');
Make_Defining_Identifier (Loc, New_Internal_Name ('A'));
Decl := Decl :=
Make_Full_Type_Declaration (Loc, Make_Full_Type_Declaration (Loc,
...@@ -7120,8 +7082,7 @@ package body Exp_Ch9 is ...@@ -7120,8 +7082,7 @@ package body Exp_Ch9 is
-- Create the Entry_Parameter_Record declaration -- Create the Entry_Parameter_Record declaration
Rec_Ent := Rec_Ent := Make_Temporary (Loc, 'P');
Make_Defining_Identifier (Loc, New_Internal_Name ('P'));
Decl := Decl :=
Make_Full_Type_Declaration (Loc, Make_Full_Type_Declaration (Loc,
...@@ -7137,8 +7098,7 @@ package body Exp_Ch9 is ...@@ -7137,8 +7098,7 @@ package body Exp_Ch9 is
-- Construct and link in the corresponding access type -- Construct and link in the corresponding access type
Acc_Ent := Acc_Ent := Make_Temporary (Loc, 'A');
Make_Defining_Identifier (Loc, New_Internal_Name ('A'));
Set_Entry_Parameters_Type (Entry_Ent, Acc_Ent); Set_Entry_Parameters_Type (Entry_Ent, Acc_Ent);
...@@ -8751,8 +8711,7 @@ package body Exp_Ch9 is ...@@ -8751,8 +8711,7 @@ package body Exp_Ch9 is
function Accept_Or_Raise return List_Id is function Accept_Or_Raise return List_Id is
Cond : Node_Id; Cond : Node_Id;
Stats : List_Id; Stats : List_Id;
J : constant Entity_Id := Make_Defining_Identifier (Loc, J : constant Entity_Id := Make_Temporary (Loc, 'J');
New_Internal_Name ('J'));
begin begin
-- We generate the following: -- We generate the following:
...@@ -9344,8 +9303,8 @@ package body Exp_Ch9 is ...@@ -9344,8 +9303,8 @@ package body Exp_Ch9 is
-- Create Duration and Delay_Mode objects used for passing a delay -- Create Duration and Delay_Mode objects used for passing a delay
-- value to RTS -- value to RTS
D := Make_Defining_Identifier (Loc, New_Internal_Name ('D')); D := Make_Temporary (Loc, 'D');
M := Make_Defining_Identifier (Loc, New_Internal_Name ('M')); M := Make_Temporary (Loc, 'M');
declare declare
Discr : Entity_Id; Discr : Entity_Id;
...@@ -10579,7 +10538,7 @@ package body Exp_Ch9 is ...@@ -10579,7 +10538,7 @@ package body Exp_Ch9 is
New_List (New_Copy (Expression (D_Stat)))); New_List (New_Copy (Expression (D_Stat))));
end if; end if;
D := Make_Defining_Identifier (Loc, New_Internal_Name ('D')); D := Make_Temporary (Loc, 'D');
-- Generate: -- Generate:
-- D : Duration; -- D : Duration;
...@@ -10591,7 +10550,7 @@ package body Exp_Ch9 is ...@@ -10591,7 +10550,7 @@ package body Exp_Ch9 is
Object_Definition => Object_Definition =>
New_Reference_To (Standard_Duration, Loc))); New_Reference_To (Standard_Duration, Loc)));
M := Make_Defining_Identifier (Loc, New_Internal_Name ('M')); M := Make_Temporary (Loc, 'M');
-- Generate: -- Generate:
-- M : Integer := (0 | 1 | 2); -- M : Integer := (0 | 1 | 2);
...@@ -11370,9 +11329,7 @@ package body Exp_Ch9 is ...@@ -11370,9 +11329,7 @@ package body Exp_Ch9 is
if Is_Protected then if Is_Protected then
declare declare
Prot_Ent : constant Entity_Id := Prot_Ent : constant Entity_Id := Make_Temporary (Loc, 'R');
Make_Defining_Identifier (Loc,
New_Internal_Name ('R'));
Prot_Typ : RE_Id; Prot_Typ : RE_Id;
begin begin
...@@ -11561,8 +11518,7 @@ package body Exp_Ch9 is ...@@ -11561,8 +11518,7 @@ package body Exp_Ch9 is
High := Replace_Bound (High); High := Replace_Bound (High);
Low := Replace_Bound (Low); Low := Replace_Bound (Low);
Index_Typ := Index_Typ := Make_Temporary (Loc, 'J');
Make_Defining_Identifier (Loc, New_Internal_Name ('J'));
-- Generate: -- Generate:
-- subtype Jnn is <Etype of Index> range Low .. High; -- subtype Jnn is <Etype of Index> range Low .. High;
...@@ -11790,9 +11746,7 @@ package body Exp_Ch9 is ...@@ -11790,9 +11746,7 @@ package body Exp_Ch9 is
-- Interrupt_Priority). -- Interrupt_Priority).
else else
Temp := Temp := Make_Temporary (Loc, 'R', Prio);
Make_Defining_Identifier (Loc, New_Internal_Name ('R'));
Append_To (L, Append_To (L,
Make_Object_Declaration (Loc, Make_Object_Declaration (Loc,
Defining_Identifier => Temp, Defining_Identifier => Temp,
...@@ -11800,7 +11754,7 @@ package body Exp_Ch9 is ...@@ -11800,7 +11754,7 @@ package body Exp_Ch9 is
New_Occurrence_Of (RTE (RE_Any_Priority), Loc), New_Occurrence_Of (RTE (RE_Any_Priority), Loc),
Expression => Relocate_Node (Prio))); Expression => Relocate_Node (Prio)));
Append_To (Args, New_Occurrence_Of (Temp, Loc)); Append_To (Args, New_Occurrence_Of (Temp, Loc));
end if; end if;
end; end;
...@@ -12380,8 +12334,7 @@ package body Exp_Ch9 is ...@@ -12380,8 +12334,7 @@ package body Exp_Ch9 is
-- Generate: -- Generate:
-- Jnn : aliased <formal-type> -- Jnn : aliased <formal-type>
Temp_Nam := Temp_Nam := Make_Temporary (Loc, 'J');
Make_Defining_Identifier (Loc, New_Internal_Name ('J'));
Append_To (Decls, Append_To (Decls,
Make_Object_Declaration (Loc, Make_Object_Declaration (Loc,
...@@ -12447,7 +12400,7 @@ package body Exp_Ch9 is ...@@ -12447,7 +12400,7 @@ package body Exp_Ch9 is
-- <actual2>'reference; -- <actual2>'reference;
-- ...); -- ...);
P := Make_Defining_Identifier (Loc, New_Internal_Name ('P')); P := Make_Temporary (Loc, 'P');
Append_To (Decls, Append_To (Decls,
Make_Object_Declaration (Loc, Make_Object_Declaration (Loc,
......
...@@ -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,11 +1656,11 @@ package body Exp_Disp is ...@@ -1665,11 +1656,11 @@ 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 =>
Object_Definition => New_Reference_To (RTE (RE_Addr_Ptr), Loc), New_Reference_To (RTE (RE_Addr_Ptr), Loc),
Expression => Expression =>
Unchecked_Convert_To Unchecked_Convert_To
(RTE (RE_Addr_Ptr), (RTE (RE_Addr_Ptr),
New_Reference_To (Defining_Identifier (Decl_1), Loc))); New_Reference_To (Defining_Identifier (Decl_1), Loc)));
...@@ -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,10 +3732,8 @@ package body Exp_Disp is ...@@ -3752,10 +3732,8 @@ 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, Subtype_Indication =>
New_Internal_Name ('S')),
Subtype_Indication =>
New_Reference_To (RTE (RE_Address_Array), Loc)); New_Reference_To (RTE (RE_Address_Array), Loc));
Append_To (Result, Decl); Append_To (Result, Decl);
...@@ -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,21 +3907,23 @@ package body Exp_Disp is ...@@ -3929,21 +3907,23 @@ 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,
Component_Associations => New_List (
Make_Component_Association (Loc,
Choices => New_List (
New_Occurrence_Of
(RTE_Record_Component (RE_OSD_Num_Prims), Loc)),
Expression =>
Make_Integer_Literal (Loc, Nb_Prim)),
Make_Component_Association (Loc, Expression =>
Choices => New_List ( Make_Aggregate (Loc,
New_Occurrence_Of Component_Associations => New_List (
(RTE_Record_Component (RE_OSD_Table), Loc)), Make_Component_Association (Loc,
Expression => Make_Aggregate (Loc, Choices => New_List (
Component_Associations => OSD_Aggr_List)))))); New_Occurrence_Of
(RTE_Record_Component (RE_OSD_Num_Prims), Loc)),
Expression =>
Make_Integer_Literal (Loc, Nb_Prim)),
Make_Component_Association (Loc,
Choices => New_List (
New_Occurrence_Of
(RTE_Record_Component (RE_OSD_Table), Loc)),
Expression => Make_Aggregate (Loc,
Component_Associations => OSD_Aggr_List))))));
Append_To (Result, Append_To (Result,
Make_Attribute_Definition_Clause (Loc, Make_Attribute_Definition_Clause (Loc,
...@@ -5428,10 +5408,8 @@ package body Exp_Disp is ...@@ -5428,10 +5408,8 @@ 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, Subtype_Indication =>
New_Internal_Name ('S')),
Subtype_Indication =>
New_Reference_To (RTE (RE_Address_Array), Loc)); New_Reference_To (RTE (RE_Address_Array), Loc));
Append_To (Result, Decl); Append_To (Result, Decl);
......
...@@ -975,10 +975,10 @@ package body Exp_Dist is ...@@ -975,10 +975,10 @@ package body Exp_Dist is
Defining_Unit_Name (Specification (Current_Declaration))), Defining_Unit_Name (Specification (Current_Declaration))),
Asynchronous => Asynchronous =>
Nkind (Specification (Current_Declaration)) = Nkind (Specification (Current_Declaration)) =
N_Procedure_Specification N_Procedure_Specification
and then and then
Is_Asynchronous (Defining_Unit_Name (Specification Is_Asynchronous (Defining_Unit_Name (Specification
(Current_Declaration)))); (Current_Declaration))));
Append_To (Decls, Subp_Stubs); Append_To (Decls, Subp_Stubs);
Analyze (Subp_Stubs); Analyze (Subp_Stubs);
...@@ -1293,9 +1293,7 @@ package body Exp_Dist is ...@@ -1293,9 +1293,7 @@ package body Exp_Dist is
end if; end if;
if not Is_RAS then if not Is_RAS then
RPC_Receiver := RPC_Receiver := Make_Temporary (Loc, 'P');
Make_Defining_Identifier (Loc,
Chars => New_Internal_Name ('P'));
Specific_Build_RPC_Receiver_Body Specific_Build_RPC_Receiver_Body
(RPC_Receiver => RPC_Receiver, (RPC_Receiver => RPC_Receiver,
...@@ -1529,9 +1527,7 @@ package body Exp_Dist is ...@@ -1529,9 +1527,7 @@ package body Exp_Dist is
Param_Assoc : constant List_Id := New_List; Param_Assoc : constant List_Id := New_List;
Stmts : constant List_Id := New_List; Stmts : constant List_Id := New_List;
RAS_Parameter : constant Entity_Id := RAS_Parameter : constant Entity_Id := Make_Temporary (Loc, 'P');
Make_Defining_Identifier (Loc,
Chars => New_Internal_Name ('P'));
Is_Function : constant Boolean := Is_Function : constant Boolean :=
Nkind (Type_Def) = N_Access_Function_Definition; Nkind (Type_Def) = N_Access_Function_Definition;
...@@ -1897,8 +1893,7 @@ package body Exp_Dist is ...@@ -1897,8 +1893,7 @@ package body Exp_Dist is
end if; end if;
Existing := False; Existing := False;
Stub_Type := Stub_Type := Make_Temporary (Loc, 'S');
Make_Defining_Identifier (Loc, Chars => New_Internal_Name ('S'));
Set_Ekind (Stub_Type, E_Record_Type); Set_Ekind (Stub_Type, E_Record_Type);
Set_Is_RACW_Stub_Type (Stub_Type); Set_Is_RACW_Stub_Type (Stub_Type);
Stub_Type_Access := Stub_Type_Access :=
...@@ -2058,8 +2053,8 @@ package body Exp_Dist is ...@@ -2058,8 +2053,8 @@ package body Exp_Dist is
declare declare
Constant_Object : constant Entity_Id := Constant_Object : constant Entity_Id :=
Make_Defining_Identifier (Loc, Make_Temporary (Loc, 'P');
New_Internal_Name ('P'));
begin begin
Set_Defining_Identifier Set_Defining_Identifier
(Last (Decls), Constant_Object); (Last (Decls), Constant_Object);
...@@ -2429,9 +2424,10 @@ package body Exp_Dist is ...@@ -2429,9 +2424,10 @@ package body Exp_Dist is
-- Start of processing for Build_Subprogram_Calling_Stubs -- Start of processing for Build_Subprogram_Calling_Stubs
begin begin
Subp_Spec := Copy_Specification (Loc, Subp_Spec :=
Spec => Specification (Vis_Decl), Copy_Specification (Loc,
New_Name => New_Name); Spec => Specification (Vis_Decl),
New_Name => New_Name);
if Locator = Empty then if Locator = Empty then
RCI_Locator := RCI_Cache; RCI_Locator := RCI_Cache;
...@@ -3019,9 +3015,7 @@ package body Exp_Dist is ...@@ -3019,9 +3015,7 @@ package body Exp_Dist is
Remote_Statements : List_Id; Remote_Statements : List_Id;
-- Various parts of the procedure -- Various parts of the procedure
Pnam : constant Entity_Id := Pnam : constant Entity_Id := Make_Temporary (Loc, 'R');
Make_Defining_Identifier
(Loc, New_Internal_Name ('R'));
Asynchronous_Flag : constant Entity_Id := Asynchronous_Flag : constant Entity_Id :=
Asynchronous_Flags_Table.Get (RACW_Type); Asynchronous_Flags_Table.Get (RACW_Type);
pragma Assert (Present (Asynchronous_Flag)); pragma Assert (Present (Asynchronous_Flag));
...@@ -3063,16 +3057,11 @@ package body Exp_Dist is ...@@ -3063,16 +3057,11 @@ package body Exp_Dist is
-- Prepare local identifiers -- Prepare local identifiers
Source_Partition := Source_Partition := Make_Temporary (Loc, 'P');
Make_Defining_Identifier (Loc, New_Internal_Name ('P')); Source_Receiver := Make_Temporary (Loc, 'S');
Source_Receiver := Source_Address := Make_Temporary (Loc, 'P');
Make_Defining_Identifier (Loc, New_Internal_Name ('S')); Local_Stub := Make_Temporary (Loc, 'L');
Source_Address := Stubbed_Result := Make_Temporary (Loc, 'S');
Make_Defining_Identifier (Loc, New_Internal_Name ('P'));
Local_Stub :=
Make_Defining_Identifier (Loc, New_Internal_Name ('L'));
Stubbed_Result :=
Make_Defining_Identifier (Loc, New_Internal_Name ('S'));
-- Generate object declarations -- Generate object declarations
...@@ -3274,8 +3263,7 @@ package body Exp_Dist is ...@@ -3274,8 +3263,7 @@ package body Exp_Dist is
Remote_Statements : List_Id; Remote_Statements : List_Id;
Null_Statements : List_Id; Null_Statements : List_Id;
Pnam : constant Entity_Id := Pnam : constant Entity_Id := Make_Temporary (Loc, 'R');
Make_Defining_Identifier (Loc, New_Internal_Name ('R'));
begin begin
Build_Stream_Procedure Build_Stream_Procedure
...@@ -3455,25 +3443,16 @@ package body Exp_Dist is ...@@ -3455,25 +3443,16 @@ package body Exp_Dist is
Proc_Decls : List_Id; Proc_Decls : List_Id;
Proc_Statements : List_Id; Proc_Statements : List_Id;
Origin : constant Entity_Id := Origin : constant Entity_Id := Make_Temporary (Loc, 'P');
Make_Defining_Identifier (Loc,
Chars => New_Internal_Name ('P'));
-- Additional local variables for the local case -- Additional local variables for the local case
Proxy_Addr : constant Entity_Id := Proxy_Addr : constant Entity_Id := Make_Temporary (Loc, 'P');
Make_Defining_Identifier (Loc,
Chars => New_Internal_Name ('P'));
-- Additional local variables for the remote case -- Additional local variables for the remote case
Local_Stub : constant Entity_Id := Local_Stub : constant Entity_Id := Make_Temporary (Loc, 'L');
Make_Defining_Identifier (Loc, Stub_Ptr : constant Entity_Id := Make_Temporary (Loc, 'S');
Chars => New_Internal_Name ('L'));
Stub_Ptr : constant Entity_Id :=
Make_Defining_Identifier (Loc,
Chars => New_Internal_Name ('S'));
function Set_Field function Set_Field
(Field_Name : Name_Id; (Field_Name : Name_Id;
...@@ -3699,18 +3678,15 @@ package body Exp_Dist is ...@@ -3699,18 +3678,15 @@ package body Exp_Dist is
Request_Parameter : Node_Id; Request_Parameter : Node_Id;
Pkg_RPC_Receiver : constant Entity_Id := Pkg_RPC_Receiver : constant Entity_Id :=
Make_Defining_Identifier (Loc, Make_Temporary (Loc, 'H');
New_Internal_Name ('H'));
Pkg_RPC_Receiver_Statements : List_Id; Pkg_RPC_Receiver_Statements : List_Id;
Pkg_RPC_Receiver_Cases : constant List_Id := New_List; Pkg_RPC_Receiver_Cases : constant List_Id := New_List;
Pkg_RPC_Receiver_Body : Node_Id; Pkg_RPC_Receiver_Body : Node_Id;
-- A Pkg_RPC_Receiver is built to decode the request -- A Pkg_RPC_Receiver is built to decode the request
Lookup_RAS_Info : constant Entity_Id := Lookup_RAS_Info : constant Entity_Id := Make_Temporary (Loc, 'R');
Make_Defining_Identifier (Loc, -- A remote subprogram is created to allow peers to look up RAS
Chars => New_Internal_Name ('R')); -- information using subprogram ids.
-- A remote subprogram is created to allow peers to look up
-- RAS information using subprogram ids.
Subp_Id : Entity_Id; Subp_Id : Entity_Id;
Subp_Index : Entity_Id; Subp_Index : Entity_Id;
...@@ -3720,11 +3696,8 @@ package body Exp_Dist is ...@@ -3720,11 +3696,8 @@ package body Exp_Dist is
Current_Subprogram_Number : Int := First_RCI_Subprogram_Id; Current_Subprogram_Number : Int := First_RCI_Subprogram_Id;
Current_Stubs : Node_Id; Current_Stubs : Node_Id;
Subp_Info_Array : constant Entity_Id := Subp_Info_Array : constant Entity_Id := Make_Temporary (Loc, 'I');
Make_Defining_Identifier (Loc, Subp_Info_List : constant List_Id := New_List;
Chars => New_Internal_Name ('I'));
Subp_Info_List : constant List_Id := New_List;
Register_Pkg_Actuals : constant List_Id := New_List; Register_Pkg_Actuals : constant List_Id := New_List;
...@@ -4165,8 +4138,7 @@ package body Exp_Dist is ...@@ -4165,8 +4138,7 @@ package body Exp_Dist is
-- well as the declaration of Result. For a function call, 'Input is -- well as the declaration of Result. For a function call, 'Input is
-- always used to read the result even if it is constrained. -- always used to read the result even if it is constrained.
Stream_Parameter := Stream_Parameter := Make_Temporary (Loc, 'S');
Make_Defining_Identifier (Loc, New_Internal_Name ('S'));
Append_To (Decls, Append_To (Decls,
Make_Object_Declaration (Loc, Make_Object_Declaration (Loc,
...@@ -4182,8 +4154,7 @@ package body Exp_Dist is ...@@ -4182,8 +4154,7 @@ package body Exp_Dist is
New_List (Make_Integer_Literal (Loc, 0)))))); New_List (Make_Integer_Literal (Loc, 0))))));
if not Is_Known_Asynchronous then if not Is_Known_Asynchronous then
Result_Parameter := Result_Parameter := Make_Temporary (Loc, 'R');
Make_Defining_Identifier (Loc, New_Internal_Name ('R'));
Append_To (Decls, Append_To (Decls,
Make_Object_Declaration (Loc, Make_Object_Declaration (Loc,
...@@ -4198,8 +4169,7 @@ package body Exp_Dist is ...@@ -4198,8 +4169,7 @@ package body Exp_Dist is
Constraints => Constraints =>
New_List (Make_Integer_Literal (Loc, 0)))))); New_List (Make_Integer_Literal (Loc, 0))))));
Exception_Return_Parameter := Exception_Return_Parameter := Make_Temporary (Loc, 'E');
Make_Defining_Identifier (Loc, New_Internal_Name ('E'));
Append_To (Decls, Append_To (Decls,
Make_Object_Declaration (Loc, Make_Object_Declaration (Loc,
...@@ -4318,8 +4288,7 @@ package body Exp_Dist is ...@@ -4318,8 +4288,7 @@ package body Exp_Dist is
-- type and push it in the stream after the regular -- type and push it in the stream after the regular
-- parameters. -- parameters.
Extra_Parameter := Make_Defining_Identifier Extra_Parameter := Make_Temporary (Loc, 'P');
(Loc, New_Internal_Name ('P'));
Append_To (Decls, Append_To (Decls,
Make_Object_Declaration (Loc, Make_Object_Declaration (Loc,
...@@ -4556,7 +4525,7 @@ package body Exp_Dist is ...@@ -4556,7 +4525,7 @@ package body Exp_Dist is
(RPC_Receiver => RPC_Receiver, (RPC_Receiver => RPC_Receiver,
Request_Parameter => Request); Request_Parameter => Request);
Subp_Id := Make_Defining_Identifier (Loc, New_Internal_Name ('P')); Subp_Id := Make_Temporary (Loc, 'P');
Subp_Index := Subp_Id; Subp_Index := Subp_Id;
-- Subp_Id may not be a constant, because in the case of the RPC -- Subp_Id may not be a constant, because in the case of the RPC
...@@ -4600,9 +4569,10 @@ package body Exp_Dist is ...@@ -4600,9 +4569,10 @@ package body Exp_Dist is
Controlling_Parameter : Entity_Id) return RPC_Target Controlling_Parameter : Entity_Id) return RPC_Target
is is
Target_Info : RPC_Target (PCS_Kind => Name_GARLIC_DSA); Target_Info : RPC_Target (PCS_Kind => Name_GARLIC_DSA);
begin begin
Target_Info.Partition := Target_Info.Partition := Make_Temporary (Loc, 'P');
Make_Defining_Identifier (Loc, New_Internal_Name ('P'));
if Present (Controlling_Parameter) then if Present (Controlling_Parameter) then
Append_To (Decls, Append_To (Decls,
Make_Object_Declaration (Loc, Make_Object_Declaration (Loc,
...@@ -4707,10 +4677,9 @@ package body Exp_Dist is ...@@ -4707,10 +4677,9 @@ package body Exp_Dist is
begin begin
RPC_Receiver_Decl := RPC_Receiver_Decl :=
Make_Subprogram_Declaration (Loc, Make_Subprogram_Declaration (Loc,
Build_RPC_Receiver_Specification ( Build_RPC_Receiver_Specification
RPC_Receiver => Make_Defining_Identifier (Loc, (RPC_Receiver => Make_Temporary (Loc, 'R'),
New_Internal_Name ('R')), Request_Parameter => RPC_Receiver_Request));
Request_Parameter => RPC_Receiver_Request));
end; end;
end if; end if;
end Build_Stub_Type; end Build_Stub_Type;
...@@ -4729,9 +4698,7 @@ package body Exp_Dist is ...@@ -4729,9 +4698,7 @@ package body Exp_Dist is
is is
Loc : constant Source_Ptr := Sloc (Vis_Decl); Loc : constant Source_Ptr := Sloc (Vis_Decl);
Request_Parameter : constant Entity_Id := Request_Parameter : constant Entity_Id := Make_Temporary (Loc, 'R');
Make_Defining_Identifier (Loc,
New_Internal_Name ('R'));
-- Formal parameter for receiving stubs: a descriptor for an incoming -- Formal parameter for receiving stubs: a descriptor for an incoming
-- request. -- request.
...@@ -4784,8 +4751,7 @@ package body Exp_Dist is ...@@ -4784,8 +4751,7 @@ package body Exp_Dist is
end if; end if;
if Dynamically_Asynchronous then if Dynamically_Asynchronous then
Dynamic_Async := Dynamic_Async := Make_Temporary (Loc, 'S');
Make_Defining_Identifier (Loc, New_Internal_Name ('S'));
else else
Dynamic_Async := Empty; Dynamic_Async := Empty;
end if; end if;
...@@ -4830,9 +4796,7 @@ package body Exp_Dist is ...@@ -4830,9 +4796,7 @@ package body Exp_Dist is
Need_Extra_Constrained : Boolean; Need_Extra_Constrained : Boolean;
-- True when an Extra_Constrained actual is required -- True when an Extra_Constrained actual is required
Object : constant Entity_Id := Object : constant Entity_Id := Make_Temporary (Loc, 'P');
Make_Defining_Identifier (Loc,
New_Internal_Name ('P'));
Expr : Node_Id := Empty; Expr : Node_Id := Empty;
...@@ -5051,9 +5015,8 @@ package body Exp_Dist is ...@@ -5051,9 +5015,8 @@ package body Exp_Dist is
declare declare
Etyp : constant Entity_Id := Etyp : constant Entity_Id :=
Etype (Result_Definition (Specification (Vis_Decl))); Etype (Result_Definition (Specification (Vis_Decl)));
Result : constant Node_Id := Result : constant Node_Id := Make_Temporary (Loc, 'R');
Make_Defining_Identifier (Loc,
New_Internal_Name ('R'));
begin begin
Inner_Decls := New_List ( Inner_Decls := New_List (
Make_Object_Declaration (Loc, Make_Object_Declaration (Loc,
...@@ -5139,8 +5102,7 @@ package body Exp_Dist is ...@@ -5139,8 +5102,7 @@ package body Exp_Dist is
-- exception occurrence is copied into the output stream and -- exception occurrence is copied into the output stream and
-- no other output parameter is written. -- no other output parameter is written.
Excep_Choice := Excep_Choice := Make_Temporary (Loc, 'E');
Make_Defining_Identifier (Loc, New_Internal_Name ('E'));
Excep_Code := New_List ( Excep_Code := New_List (
Make_Attribute_Reference (Loc, Make_Attribute_Reference (Loc,
...@@ -5171,8 +5133,7 @@ package body Exp_Dist is ...@@ -5171,8 +5133,7 @@ package body Exp_Dist is
Subp_Spec := Subp_Spec :=
Make_Procedure_Specification (Loc, Make_Procedure_Specification (Loc,
Defining_Unit_Name => Defining_Unit_Name => Make_Temporary (Loc, 'F'),
Make_Defining_Identifier (Loc, New_Internal_Name ('F')),
Parameter_Specifications => New_List ( Parameter_Specifications => New_List (
Make_Parameter_Specification (Loc, Make_Parameter_Specification (Loc,
...@@ -5308,10 +5269,10 @@ package body Exp_Dist is ...@@ -5308,10 +5269,10 @@ package body Exp_Dist is
begin begin
return return
Make_Subprogram_Body (Loc, Make_Subprogram_Body (Loc,
Specification => Make_Function_Specification (Loc, Specification =>
Defining_Unit_Name => Make_Function_Specification (Loc,
Make_Defining_Identifier (Loc, New_Internal_Name ('S')), Defining_Unit_Name => Make_Temporary (Loc, 'S'),
Result_Definition => New_Occurrence_Of (Var_Type, Loc)), Result_Definition => New_Occurrence_Of (Var_Type, Loc)),
Declarations => No_List, Declarations => No_List,
Handled_Statement_Sequence => Handled_Statement_Sequence =>
Make_Handled_Sequence_Of_Statements (Loc, New_List ( Make_Handled_Sequence_Of_Statements (Loc, New_List (
...@@ -5394,8 +5355,7 @@ package body Exp_Dist is ...@@ -5394,8 +5355,7 @@ package body Exp_Dist is
-------------------- --------------------
function Make_Tag_Check (Loc : Source_Ptr; N : Node_Id) return Node_Id is function Make_Tag_Check (Loc : Source_Ptr; N : Node_Id) return Node_Id is
Occ : constant Entity_Id := Occ : constant Entity_Id := Make_Temporary (Loc, 'E');
Make_Defining_Identifier (Loc, New_Internal_Name ('E'));
begin begin
return Make_Block_Statement (Loc, return Make_Block_Statement (Loc,
...@@ -5762,8 +5722,7 @@ package body Exp_Dist is ...@@ -5762,8 +5722,7 @@ package body Exp_Dist is
Make_Defining_Identifier (Loc, Name_R); Make_Defining_Identifier (Loc, Name_R);
-- Various parts of the procedure -- Various parts of the procedure
Pnam : constant Entity_Id := Make_Defining_Identifier (Loc, Pnam : constant Entity_Id := Make_Temporary (Loc, 'R');
New_Internal_Name ('R'));
Is_RAS : constant Boolean := not Comes_From_Source (RACW_Type); Is_RAS : constant Boolean := not Comes_From_Source (RACW_Type);
...@@ -5882,10 +5841,8 @@ package body Exp_Dist is ...@@ -5882,10 +5841,8 @@ package body Exp_Dist is
RACW_Parameter : constant Entity_Id := RACW_Parameter : constant Entity_Id :=
Make_Defining_Identifier (Loc, Name_R); Make_Defining_Identifier (Loc, Name_R);
Reference : constant Entity_Id := Reference : constant Entity_Id := Make_Temporary (Loc, 'R');
Make_Defining_Identifier (Loc, New_Internal_Name ('R')); Any : constant Entity_Id := Make_Temporary (Loc, 'A');
Any : constant Entity_Id :=
Make_Defining_Identifier (Loc, New_Internal_Name ('A'));
begin begin
Func_Spec := Func_Spec :=
...@@ -6074,8 +6031,7 @@ package body Exp_Dist is ...@@ -6074,8 +6031,7 @@ package body Exp_Dist is
Attr_Decl : Node_Id; Attr_Decl : Node_Id;
Statements : constant List_Id := New_List; Statements : constant List_Id := New_List;
Pnam : constant Entity_Id := Pnam : constant Entity_Id := Make_Temporary (Loc, 'R');
Make_Defining_Identifier (Loc, New_Internal_Name ('R'));
function Stream_Parameter return Node_Id; function Stream_Parameter return Node_Id;
function Object return Node_Id; function Object return Node_Id;
...@@ -6233,16 +6189,10 @@ package body Exp_Dist is ...@@ -6233,16 +6189,10 @@ package body Exp_Dist is
Make_Defining_Identifier (Loc, Name_A); Make_Defining_Identifier (Loc, Name_A);
-- For the call to Get_Local_Address -- For the call to Get_Local_Address
Local_Stub : constant Entity_Id := Make_Temporary (Loc, 'L');
Stub_Ptr : constant Entity_Id := Make_Temporary (Loc, 'S');
-- Additional local variables for the remote case -- Additional local variables for the remote case
Local_Stub : constant Entity_Id :=
Make_Defining_Identifier (Loc,
Chars => New_Internal_Name ('L'));
Stub_Ptr : constant Entity_Id :=
Make_Defining_Identifier (Loc,
Chars => New_Internal_Name ('S'));
function Set_Field function Set_Field
(Field_Name : Name_Id; (Field_Name : Name_Id;
Value : Node_Id) return Node_Id; Value : Node_Id) return Node_Id;
...@@ -6554,12 +6504,8 @@ package body Exp_Dist is ...@@ -6554,12 +6504,8 @@ package body Exp_Dist is
Func_Spec : Node_Id; Func_Spec : Node_Id;
Any : constant Entity_Id := Any : constant Entity_Id := Make_Temporary (Loc, 'A');
Make_Defining_Identifier (Loc, RAS_Parameter : constant Entity_Id := Make_Temporary (Loc, 'R');
Chars => New_Internal_Name ('A'));
RAS_Parameter : constant Entity_Id :=
Make_Defining_Identifier (Loc,
Chars => New_Internal_Name ('R'));
RACW_Parameter : constant Node_Id := RACW_Parameter : constant Node_Id :=
Make_Selected_Component (Loc, Make_Selected_Component (Loc,
Prefix => RAS_Parameter, Prefix => RAS_Parameter,
...@@ -6675,8 +6621,7 @@ package body Exp_Dist is ...@@ -6675,8 +6621,7 @@ package body Exp_Dist is
Loc : constant Source_Ptr := Sloc (Pkg_Spec); Loc : constant Source_Ptr := Sloc (Pkg_Spec);
Pkg_RPC_Receiver : constant Entity_Id := Pkg_RPC_Receiver : constant Entity_Id :=
Make_Defining_Identifier (Loc, Make_Temporary (Loc, 'H');
New_Internal_Name ('H'));
Pkg_RPC_Receiver_Object : Node_Id; Pkg_RPC_Receiver_Object : Node_Id;
Pkg_RPC_Receiver_Body : Node_Id; Pkg_RPC_Receiver_Body : Node_Id;
Pkg_RPC_Receiver_Decls : List_Id; Pkg_RPC_Receiver_Decls : List_Id;
...@@ -6697,13 +6642,9 @@ package body Exp_Dist is ...@@ -6697,13 +6642,9 @@ package body Exp_Dist is
-- from the request structure, or the local subprogram address (in -- from the request structure, or the local subprogram address (in
-- case of a RAS). -- case of a RAS).
Is_Local : constant Entity_Id := Is_Local : constant Entity_Id := Make_Temporary (Loc, 'L');
Make_Defining_Identifier (Loc,
Chars => New_Internal_Name ('L'));
Local_Address : constant Entity_Id := Local_Address : constant Entity_Id := Make_Temporary (Loc, 'A');
Make_Defining_Identifier (Loc,
Chars => New_Internal_Name ('A'));
-- Address of a local subprogram designated by a reference -- Address of a local subprogram designated by a reference
-- corresponding to a RAS. -- corresponding to a RAS.
...@@ -6714,9 +6655,7 @@ package body Exp_Dist is ...@@ -6714,9 +6655,7 @@ package body Exp_Dist is
Current_Stubs : Node_Id; Current_Stubs : Node_Id;
Current_Subprogram_Number : Int := First_RCI_Subprogram_Id; Current_Subprogram_Number : Int := First_RCI_Subprogram_Id;
Subp_Info_Array : constant Entity_Id := Subp_Info_Array : constant Entity_Id := Make_Temporary (Loc, 'I');
Make_Defining_Identifier (Loc,
Chars => New_Internal_Name ('I'));
Subp_Info_List : constant List_Id := New_List; Subp_Info_List : constant List_Id := New_List;
...@@ -7073,8 +7012,7 @@ package body Exp_Dist is ...@@ -7073,8 +7012,7 @@ package body Exp_Dist is
Pkg_RPC_Receiver_Object := Pkg_RPC_Receiver_Object :=
Make_Object_Declaration (Loc, Make_Object_Declaration (Loc,
Defining_Identifier => Defining_Identifier => Make_Temporary (Loc, 'R'),
Make_Defining_Identifier (Loc, New_Internal_Name ('R')),
Aliased_Present => True, Aliased_Present => True,
Object_Definition => New_Occurrence_Of (RTE (RE_Servant), Loc)); Object_Definition => New_Occurrence_Of (RTE (RE_Servant), Loc));
Append_To (Decls, Pkg_RPC_Receiver_Object); Append_To (Decls, Pkg_RPC_Receiver_Object);
...@@ -7163,8 +7101,7 @@ package body Exp_Dist is ...@@ -7163,8 +7101,7 @@ package body Exp_Dist is
is is
Loc : constant Source_Ptr := Sloc (Nod); Loc : constant Source_Ptr := Sloc (Nod);
Request : constant Entity_Id := Request : constant Entity_Id := Make_Temporary (Loc, 'R');
Make_Defining_Identifier (Loc, New_Internal_Name ('R'));
-- The request object constructed by these stubs -- The request object constructed by these stubs
-- Could we use Name_R instead??? (see GLADE client stubs) -- Could we use Name_R instead??? (see GLADE client stubs)
...@@ -7247,9 +7184,7 @@ package body Exp_Dist is ...@@ -7247,9 +7184,7 @@ package body Exp_Dist is
Object_Definition => Object_Definition =>
New_Occurrence_Of (RTE (RE_Request_Access), Loc))); New_Occurrence_Of (RTE (RE_Request_Access), Loc)));
Result := Result := Make_Temporary (Loc, 'R');
Make_Defining_Identifier (Loc,
Chars => New_Internal_Name ('R'));
if Is_Function then if Is_Function then
Result_TC := Result_TC :=
...@@ -7285,8 +7220,7 @@ package body Exp_Dist is ...@@ -7285,8 +7220,7 @@ package body Exp_Dist is
Expression => Make_Integer_Literal (Loc, 0)))))); Expression => Make_Integer_Literal (Loc, 0))))));
if not Is_Known_Asynchronous then if not Is_Known_Asynchronous then
Exception_Return_Parameter := Exception_Return_Parameter := Make_Temporary (Loc, 'E');
Make_Defining_Identifier (Loc, New_Internal_Name ('E'));
Append_To (Decls, Append_To (Decls,
Make_Object_Declaration (Loc, Make_Object_Declaration (Loc,
...@@ -7300,8 +7234,7 @@ package body Exp_Dist is ...@@ -7300,8 +7234,7 @@ package body Exp_Dist is
-- Initialize and fill in arguments list -- Initialize and fill in arguments list
Arguments := Arguments := Make_Temporary (Loc, 'A');
Make_Defining_Identifier (Loc, New_Internal_Name ('A'));
Declare_Create_NVList (Loc, Arguments, Decls, Statements); Declare_Create_NVList (Loc, Arguments, Decls, Statements);
Current_Parameter := First (Ordered_Parameters_List); Current_Parameter := First (Ordered_Parameters_List);
...@@ -7336,9 +7269,7 @@ package body Exp_Dist is ...@@ -7336,9 +7269,7 @@ package body Exp_Dist is
Is_Constrained (Etyp) Is_Constrained (Etyp)
or else Is_Elementary_Type (Etyp); or else Is_Elementary_Type (Etyp);
Any : constant Entity_Id := Any : constant Entity_Id := Make_Temporary (Loc, 'A');
Make_Defining_Identifier (Loc,
New_Internal_Name ('A'));
Actual_Parameter : Node_Id := Actual_Parameter : Node_Id :=
New_Occurrence_Of ( New_Occurrence_Of (
...@@ -7447,8 +7378,7 @@ package body Exp_Dist is ...@@ -7447,8 +7378,7 @@ package body Exp_Dist is
declare declare
Extra_Any_Parameter : constant Entity_Id := Extra_Any_Parameter : constant Entity_Id :=
Make_Defining_Identifier Make_Temporary (Loc, 'P');
(Loc, New_Internal_Name ('P'));
Parameter_Exp : constant Node_Id := Parameter_Exp : constant Node_Id :=
Make_Attribute_Reference (Loc, Make_Attribute_Reference (Loc,
...@@ -7595,9 +7525,8 @@ package body Exp_Dist is ...@@ -7595,9 +7525,8 @@ package body Exp_Dist is
Controlling_Parameter : Entity_Id) return RPC_Target Controlling_Parameter : Entity_Id) return RPC_Target
is is
Target_Info : RPC_Target (PCS_Kind => Name_PolyORB_DSA); Target_Info : RPC_Target (PCS_Kind => Name_PolyORB_DSA);
Target_Reference : constant Entity_Id := Target_Reference : constant Entity_Id := Make_Temporary (Loc, 'T');
Make_Defining_Identifier (Loc,
New_Internal_Name ('T'));
begin begin
if Present (Controlling_Parameter) then if Present (Controlling_Parameter) then
Append_To (Decls, Append_To (Decls,
...@@ -7666,8 +7595,7 @@ package body Exp_Dist is ...@@ -7666,8 +7595,7 @@ package body Exp_Dist is
RPC_Receiver_Decl := RPC_Receiver_Decl :=
Make_Object_Declaration (Loc, Make_Object_Declaration (Loc,
Defining_Identifier => Make_Defining_Identifier (Loc, Defining_Identifier => Make_Temporary (Loc, 'R'),
New_Internal_Name ('R')),
Aliased_Present => True, Aliased_Present => True,
Object_Definition => Object_Definition =>
New_Occurrence_Of (RTE (RE_Servant), Loc)); New_Occurrence_Of (RTE (RE_Servant), Loc));
...@@ -7747,9 +7675,7 @@ package body Exp_Dist is ...@@ -7747,9 +7675,7 @@ package body Exp_Dist is
is is
Loc : constant Source_Ptr := Sloc (Vis_Decl); Loc : constant Source_Ptr := Sloc (Vis_Decl);
Request_Parameter : constant Entity_Id := Request_Parameter : constant Entity_Id := Make_Temporary (Loc, 'R');
Make_Defining_Identifier (Loc,
New_Internal_Name ('R'));
-- Formal parameter for receiving stubs: a descriptor for an incoming -- Formal parameter for receiving stubs: a descriptor for an incoming
-- request. -- request.
...@@ -7793,9 +7719,7 @@ package body Exp_Dist is ...@@ -7793,9 +7719,7 @@ package body Exp_Dist is
Build_Ordered_Parameters_List Build_Ordered_Parameters_List
(Specification (Vis_Decl)); (Specification (Vis_Decl));
Arguments : constant Entity_Id := Arguments : constant Entity_Id := Make_Temporary (Loc, 'A');
Make_Defining_Identifier (Loc,
New_Internal_Name ('A'));
-- Name of the named values list used to retrieve parameters -- Name of the named values list used to retrieve parameters
Subp_Spec : Node_Id; Subp_Spec : Node_Id;
...@@ -7825,11 +7749,9 @@ package body Exp_Dist is ...@@ -7825,11 +7749,9 @@ package body Exp_Dist is
declare declare
Etyp : Entity_Id; Etyp : Entity_Id;
Constrained : Boolean; Constrained : Boolean;
Any : Entity_Id := Empty; Any : Entity_Id := Empty;
Object : constant Entity_Id := Object : constant Entity_Id := Make_Temporary (Loc, 'P');
Make_Defining_Identifier (Loc, Expr : Node_Id := Empty;
Chars => New_Internal_Name ('P'));
Expr : Node_Id := Empty;
Is_Controlling_Formal : constant Boolean := Is_Controlling_Formal : constant Boolean :=
Is_RACW_Controlling_Formal Is_RACW_Controlling_Formal
...@@ -7865,9 +7787,7 @@ package body Exp_Dist is ...@@ -7865,9 +7787,7 @@ package body Exp_Dist is
Is_Constrained (Etyp) or else Is_Elementary_Type (Etyp); Is_Constrained (Etyp) or else Is_Elementary_Type (Etyp);
if not Is_First_Controlling_Formal then if not Is_First_Controlling_Formal then
Any := Any := Make_Temporary (Loc, 'A');
Make_Defining_Identifier (Loc,
Chars => New_Internal_Name ('A'));
Append_To (Outer_Decls, Append_To (Outer_Decls,
Make_Object_Declaration (Loc, Make_Object_Declaration (Loc,
...@@ -7891,13 +7811,10 @@ package body Exp_Dist is ...@@ -7891,13 +7811,10 @@ package body Exp_Dist is
if Is_First_Controlling_Formal then if Is_First_Controlling_Formal then
declare declare
Addr : constant Entity_Id := Addr : constant Entity_Id := Make_Temporary (Loc, 'A');
Make_Defining_Identifier (Loc,
Chars => New_Internal_Name ('A'));
Is_Local : constant Entity_Id := Is_Local : constant Entity_Id :=
Make_Defining_Identifier (Loc, Make_Temporary (Loc, 'L');
Chars => New_Internal_Name ('L'));
begin begin
-- Special case: obtain the first controlling formal -- Special case: obtain the first controlling formal
...@@ -8067,8 +7984,7 @@ package body Exp_Dist is ...@@ -8067,8 +7984,7 @@ package body Exp_Dist is
(Current_Parameter)); (Current_Parameter));
Extra_Any : constant Entity_Id := Extra_Any : constant Entity_Id :=
Make_Defining_Identifier (Loc, Make_Temporary (Loc, 'A');
Chars => New_Internal_Name ('A'));
Formal_Entity : constant Entity_Id := Formal_Entity : constant Entity_Id :=
Make_Defining_Identifier (Loc, Make_Defining_Identifier (Loc,
...@@ -8139,9 +8055,7 @@ package body Exp_Dist is ...@@ -8139,9 +8055,7 @@ package body Exp_Dist is
declare declare
Etyp : constant Entity_Id := Etyp : constant Entity_Id :=
Etype (Result_Definition (Specification (Vis_Decl))); Etype (Result_Definition (Specification (Vis_Decl)));
Result : constant Node_Id := Result : constant Node_Id := Make_Temporary (Loc, 'R');
Make_Defining_Identifier (Loc,
Chars => New_Internal_Name ('R'));
begin begin
Inner_Decls := New_List ( Inner_Decls := New_List (
...@@ -8209,8 +8123,7 @@ package body Exp_Dist is ...@@ -8209,8 +8123,7 @@ package body Exp_Dist is
Subp_Spec := Subp_Spec :=
Make_Procedure_Specification (Loc, Make_Procedure_Specification (Loc,
Defining_Unit_Name => Defining_Unit_Name => Make_Temporary (Loc, 'F'),
Make_Defining_Identifier (Loc, New_Internal_Name ('F')),
Parameter_Specifications => New_List ( Parameter_Specifications => New_List (
Make_Parameter_Specification (Loc, Make_Parameter_Specification (Loc,
...@@ -8396,9 +8309,7 @@ package body Exp_Dist is ...@@ -8396,9 +8309,7 @@ package body Exp_Dist is
N : Node_Id; N : Node_Id;
Target : Entity_Id) Target : Entity_Id)
is is
Strm : constant Entity_Id := Strm : constant Entity_Id := Make_Temporary (Loc, 'S');
Make_Defining_Identifier (Loc,
Chars => New_Internal_Name ('S'));
Expr : Node_Id; Expr : Node_Id;
Read_Call_List : List_Id; Read_Call_List : List_Id;
...@@ -8456,9 +8367,7 @@ package body Exp_Dist is ...@@ -8456,9 +8367,7 @@ package body Exp_Dist is
else else
declare declare
Temp : constant Entity_Id := Temp : constant Entity_Id := Make_Temporary (Loc, 'R');
Make_Defining_Identifier
(Loc, New_Internal_Name ('R'));
begin begin
Read_Call_List := New_List; Read_Call_List := New_List;
...@@ -8659,9 +8568,7 @@ package body Exp_Dist is ...@@ -8659,9 +8568,7 @@ package body Exp_Dist is
Decls : constant List_Id := New_List; Decls : constant List_Id := New_List;
Stms : constant List_Id := New_List; Stms : constant List_Id := New_List;
Any_Parameter : constant Entity_Id := Any_Parameter : constant Entity_Id := Make_Temporary (Loc, 'A');
Make_Defining_Identifier (Loc,
New_Internal_Name ('A'));
Use_Opaque_Representation : Boolean; Use_Opaque_Representation : Boolean;
...@@ -8744,9 +8651,7 @@ package body Exp_Dist is ...@@ -8744,9 +8651,7 @@ package body Exp_Dist is
-- The returned object -- The returned object
Res : constant Entity_Id := Res : constant Entity_Id := Make_Temporary (Loc, 'R');
Make_Defining_Identifier (Loc,
New_Internal_Name ('R'));
Res_Definition : Node_Id := New_Occurrence_Of (Typ, Loc); Res_Definition : Node_Id := New_Occurrence_Of (Typ, Loc);
...@@ -8813,8 +8718,7 @@ package body Exp_Dist is ...@@ -8813,8 +8718,7 @@ package body Exp_Dist is
Choice_List : List_Id; Choice_List : List_Id;
Struct_Any : constant Entity_Id := Struct_Any : constant Entity_Id :=
Make_Defining_Identifier (Loc, Make_Temporary (Loc, 'S');
New_Internal_Name ('S'));
begin begin
Append_To (Decls, Append_To (Decls,
...@@ -9641,12 +9545,10 @@ package body Exp_Dist is ...@@ -9641,12 +9545,10 @@ package body Exp_Dist is
Choice_List : List_Id; Choice_List : List_Id;
Union_Any : constant Entity_Id := Union_Any : constant Entity_Id :=
Make_Defining_Identifier (Loc, Make_Temporary (Loc, 'V');
New_Internal_Name ('V'));
Struct_Any : constant Entity_Id := Struct_Any : constant Entity_Id :=
Make_Defining_Identifier (Loc, Make_Temporary (Loc, 'S');
New_Internal_Name ('S'));
function Make_Discriminant_Reference function Make_Discriminant_Reference
return Node_Id; return Node_Id;
...@@ -9865,8 +9767,7 @@ package body Exp_Dist is ...@@ -9865,8 +9767,7 @@ package body Exp_Dist is
declare declare
Dummy_Any : constant Entity_Id := Dummy_Any : constant Entity_Id :=
Make_Defining_Identifier (Loc, Make_Temporary (Loc, 'A');
Chars => New_Internal_Name ('A'));
begin begin
Append_To (Decls, Append_To (Decls,
...@@ -10016,9 +9917,7 @@ package body Exp_Dist is ...@@ -10016,9 +9917,7 @@ package body Exp_Dist is
if Use_Opaque_Representation then if Use_Opaque_Representation then
declare declare
Strm : constant Entity_Id := Strm : constant Entity_Id := Make_Temporary (Loc, 'S');
Make_Defining_Identifier (Loc,
Chars => New_Internal_Name ('S'));
-- Stream used to store data representation produced by -- Stream used to store data representation produced by
-- stream attribute. -- stream attribute.
...@@ -11192,9 +11091,7 @@ package body Exp_Dist is ...@@ -11192,9 +11091,7 @@ package body Exp_Dist is
Pkg_Name := String_From_Name_Buffer; Pkg_Name := String_From_Name_Buffer;
Inst := Inst :=
Make_Package_Instantiation (Loc, Make_Package_Instantiation (Loc,
Defining_Unit_Name => Defining_Unit_Name => Make_Temporary (Loc, 'R'),
Make_Defining_Identifier (Loc,
Chars => New_Internal_Name ('R')),
Name => Name =>
New_Occurrence_Of (RTE (RE_RCI_Locator), Loc), New_Occurrence_Of (RTE (RE_RCI_Locator), 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;
...@@ -459,13 +461,13 @@ package body Exp_Imgv is ...@@ -459,13 +461,13 @@ package body Exp_Imgv is
elsif Is_Decimal_Fixed_Point_Type (Rtyp) then elsif Is_Decimal_Fixed_Point_Type (Rtyp) then
Append_To (Arg_List, Append_To (Arg_List,
Make_Attribute_Reference (Loc, Make_Attribute_Reference (Loc,
Prefix => New_Reference_To (Ptyp, Loc), Prefix => New_Reference_To (Ptyp, Loc),
Attribute_Name => Name_Scale)); Attribute_Name => Name_Scale));
Set_Conversion_OK (First (Arg_List)); Set_Conversion_OK (First (Arg_List));
Set_Etype (First (Arg_List), Tent); Set_Etype (First (Arg_List), Tent);
-- For Wide_Character, append Ada 2005 indication -- For Wide_Character, append Ada 2005 indication
elsif Rtyp = Standard_Wide_Character then elsif Rtyp = Standard_Wide_Character then
Append_To (Arg_List, Append_To (Arg_List,
......
...@@ -403,7 +403,8 @@ package body Sprint is ...@@ -403,7 +403,8 @@ package body Sprint is
procedure pg (Arg : Union_Id) is procedure pg (Arg : Union_Id) 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