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