mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-26 21:51:12 +08:00
einfo.ads: Minor comment addition: Etype of package is Standard_Void_Type.
2014-02-20 Robert Dewar <dewar@adacore.com> * einfo.ads: Minor comment addition: Etype of package is Standard_Void_Type. * checks.adb, exp_aggr.adb, exp_atag.adb, exp_attr.adb, exp_ch13.adb, exp_ch2.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb, exp_dbug.adb, exp_disp.adb, exp_imgv.adb, exp_intr.adb, exp_prag.adb, exp_sel.adb, exp_strm.adb, exp_util.adb, freeze.adb, rtsfind.adb, sem_aggr.adb, sem_attr.adb, sem_ch10.adb, sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_dim.adb, sem_prag.adb, sem_res.adb, sem_util.adb, tbuild.adb, tbuild.ads: Remove New_Reference_To. Replace all calls with calls to New_Occurrence_Of. 2014-02-20 Robert Dewar <dewar@adacore.com> * par-util.adb (Ignore, case of right paren): Make this a serious error. From-SVN: r207942
This commit is contained in:
parent
9576e7b112
commit
e449429213
@ -1,3 +1,22 @@
|
||||
2014-02-20 Robert Dewar <dewar@adacore.com>
|
||||
|
||||
* einfo.ads: Minor comment addition: Etype of package is
|
||||
Standard_Void_Type.
|
||||
* checks.adb, exp_aggr.adb, exp_atag.adb, exp_attr.adb, exp_ch13.adb,
|
||||
exp_ch2.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb,
|
||||
exp_ch7.adb, exp_ch9.adb, exp_dbug.adb, exp_disp.adb, exp_imgv.adb,
|
||||
exp_intr.adb, exp_prag.adb, exp_sel.adb, exp_strm.adb, exp_util.adb,
|
||||
freeze.adb, rtsfind.adb, sem_aggr.adb, sem_attr.adb, sem_ch10.adb,
|
||||
sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
|
||||
sem_ch6.adb, sem_ch8.adb, sem_dim.adb, sem_prag.adb, sem_res.adb,
|
||||
sem_util.adb, tbuild.adb, tbuild.ads: Remove New_Reference_To.
|
||||
Replace all calls with calls to New_Occurrence_Of.
|
||||
|
||||
2014-02-20 Robert Dewar <dewar@adacore.com>
|
||||
|
||||
* par-util.adb (Ignore, case of right paren): Make this a
|
||||
serious error.
|
||||
|
||||
2014-02-19 Robert Dewar <dewar@adacore.com>
|
||||
|
||||
* sem_ch5.adb, sem_prag.adb, sem_attr.adb: Minor reformatting.
|
||||
|
@ -1031,7 +1031,7 @@ package body Checks is
|
||||
Rewrite (N,
|
||||
OK_Convert_To (Typ,
|
||||
Make_Function_Call (Loc,
|
||||
Name => New_Reference_To (RTE (Cent), Loc),
|
||||
Name => New_Occurrence_Of (RTE (Cent), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
OK_Convert_To (RTE (RE_Integer_64), Left_Opnd (N)),
|
||||
OK_Convert_To (RTE (RE_Integer_64), Right_Opnd (N))))));
|
||||
@ -2258,7 +2258,7 @@ package body Checks is
|
||||
Then_Statements => New_List (
|
||||
Make_Raise_Statement (Loc,
|
||||
Name =>
|
||||
New_Reference_To (Standard_Program_Error, Loc),
|
||||
New_Occurrence_Of (Standard_Program_Error, Loc),
|
||||
Expression => Make_String_Literal (Loc, End_String)))));
|
||||
|
||||
-- Create a sequence of overlapping checks by and-ing them all
|
||||
@ -2388,7 +2388,7 @@ package body Checks is
|
||||
-- Step 1: Create the expression to verify the validity of the
|
||||
-- context.
|
||||
|
||||
Check := New_Reference_To (Context, Loc);
|
||||
Check := New_Occurrence_Of (Context, Loc);
|
||||
|
||||
-- When processing a function result, use 'Result. Generate
|
||||
-- Context'Result
|
||||
@ -5734,7 +5734,7 @@ package body Checks is
|
||||
Duplicate_Subexpr_Move_Checks (Sub)),
|
||||
Right_Opnd =>
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix => New_Reference_To (Etype (A), Loc),
|
||||
Prefix => New_Occurrence_Of (Etype (A), Loc),
|
||||
Attribute_Name => Name_Range)),
|
||||
Reason => CE_Index_Check_Failed));
|
||||
end if;
|
||||
@ -5788,7 +5788,7 @@ package body Checks is
|
||||
Range_N :=
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix =>
|
||||
New_Reference_To (Etype (A_Idx), Loc),
|
||||
New_Occurrence_Of (Etype (A_Idx), Loc),
|
||||
Attribute_Name => Name_Range);
|
||||
|
||||
-- For arrays with non-constant bounds we cannot generate
|
||||
@ -6936,7 +6936,7 @@ package body Checks is
|
||||
New_Occurrence_Of (RTE (RE_Mark_Id), Loc),
|
||||
Expression =>
|
||||
Make_Function_Call (Loc,
|
||||
Name => New_Reference_To (RTE (RE_SS_Mark), Loc)))),
|
||||
Name => New_Occurrence_Of (RTE (RE_SS_Mark), Loc)))),
|
||||
|
||||
Handled_Statement_Sequence =>
|
||||
Make_Handled_Sequence_Of_Statements (Loc,
|
||||
@ -6944,7 +6944,7 @@ package body Checks is
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name => New_Occurrence_Of (RTE (RE_SS_Release), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
New_Reference_To (M, Loc))))));
|
||||
New_Occurrence_Of (M, Loc))))));
|
||||
end Make_Bignum_Block;
|
||||
|
||||
----------------------------------
|
||||
|
@ -1121,7 +1121,8 @@ package Einfo is
|
||||
-- itself. For a subtype entity, Etype points to the base type. For
|
||||
-- a class wide type, points to the corresponding specific type. For a
|
||||
-- subprogram or subprogram type, Etype has the return type of a function
|
||||
-- or is set to Standard_Void_Type to represent a procedure.
|
||||
-- or is set to Standard_Void_Type to represent a procedure. The Etype
|
||||
-- field of a package is also set to Standard_Void_Type.
|
||||
--
|
||||
-- Note one obscure case: for pragma Default_Storage_Pool (null), the
|
||||
-- Etype of the N_Null node is Empty.
|
||||
|
@ -1236,12 +1236,12 @@ package body Exp_Aggr is
|
||||
Make_Selected_Component (Loc,
|
||||
Prefix => New_Copy_Tree (Indexed_Comp),
|
||||
Selector_Name =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(First_Tag_Component (Full_Typ), Loc)),
|
||||
|
||||
Expression =>
|
||||
Unchecked_Convert_To (RTE (RE_Tag),
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Node (First_Elmt (Access_Disp_Table (Full_Typ))),
|
||||
Loc)));
|
||||
|
||||
@ -1409,7 +1409,7 @@ package body Exp_Aggr is
|
||||
|
||||
-- Construct the statements to execute in the loop body
|
||||
|
||||
L_Body := Gen_Assign (New_Reference_To (L_J, Loc), Expr);
|
||||
L_Body := Gen_Assign (New_Occurrence_Of (L_J, Loc), Expr);
|
||||
|
||||
-- Construct the final loop
|
||||
|
||||
@ -1496,7 +1496,7 @@ package body Exp_Aggr is
|
||||
(Loc,
|
||||
Condition => Make_Op_Lt
|
||||
(Loc,
|
||||
Left_Opnd => New_Reference_To (W_J, Loc),
|
||||
Left_Opnd => New_Occurrence_Of (W_J, Loc),
|
||||
Right_Opnd => New_Copy_Tree (H)));
|
||||
|
||||
-- Construct the statements to execute in the loop body
|
||||
@ -1506,17 +1506,17 @@ package body Exp_Aggr is
|
||||
(Loc,
|
||||
Prefix => Index_Base_Name,
|
||||
Attribute_Name => Name_Succ,
|
||||
Expressions => New_List (New_Reference_To (W_J, Loc)));
|
||||
Expressions => New_List (New_Occurrence_Of (W_J, Loc)));
|
||||
|
||||
W_Increment :=
|
||||
Make_OK_Assignment_Statement
|
||||
(Loc,
|
||||
Name => New_Reference_To (W_J, Loc),
|
||||
Name => New_Occurrence_Of (W_J, Loc),
|
||||
Expression => W_Index_Succ);
|
||||
|
||||
Append_To (W_Body, W_Increment);
|
||||
Append_List_To (W_Body,
|
||||
Gen_Assign (New_Reference_To (W_J, Loc), Expr));
|
||||
Gen_Assign (New_Occurrence_Of (W_J, Loc), Expr));
|
||||
|
||||
-- Construct the final loop
|
||||
|
||||
@ -1535,7 +1535,7 @@ package body Exp_Aggr is
|
||||
|
||||
function Index_Base_Name return Node_Id is
|
||||
begin
|
||||
return New_Reference_To (Index_Base, Sloc (N));
|
||||
return New_Occurrence_Of (Index_Base, Sloc (N));
|
||||
end Index_Base_Name;
|
||||
|
||||
------------------------------------
|
||||
@ -2198,7 +2198,7 @@ package body Exp_Aggr is
|
||||
Append_To (L,
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Find_Prim_Op (Init_Typ, Name_Initialize), Loc),
|
||||
Parameter_Associations => New_List (New_Copy_Tree (Ref))));
|
||||
end if;
|
||||
@ -2490,12 +2490,12 @@ package body Exp_Aggr is
|
||||
Make_Selected_Component (Loc,
|
||||
Prefix => New_Copy_Tree (Target),
|
||||
Selector_Name =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(First_Tag_Component (Base_Type (Typ)), Loc)),
|
||||
|
||||
Expression =>
|
||||
Unchecked_Convert_To (RTE (RE_Tag),
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Node (First_Elmt
|
||||
(Access_Disp_Table (Base_Type (Typ)))),
|
||||
Loc)));
|
||||
@ -2628,7 +2628,7 @@ package body Exp_Aggr is
|
||||
if Present (CPP_Init_Proc (T)) then
|
||||
Append_To (L,
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
New_Reference_To (CPP_Init_Proc (T), Loc)));
|
||||
New_Occurrence_Of (CPP_Init_Proc (T), Loc)));
|
||||
end if;
|
||||
end Invoke_IC_Proc;
|
||||
|
||||
@ -2641,7 +2641,7 @@ package body Exp_Aggr is
|
||||
Append_To (L,
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Base_Init_Proc (CPP_Parent), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
Unchecked_Convert_To (CPP_Parent,
|
||||
@ -2798,7 +2798,7 @@ package body Exp_Aggr is
|
||||
Subtype_Indication =>
|
||||
Make_Subtype_Indication (Loc,
|
||||
Subtype_Mark =>
|
||||
New_Reference_To (Etype (Comp_Type), Loc),
|
||||
New_Occurrence_Of (Etype (Comp_Type), Loc),
|
||||
Constraint =>
|
||||
Make_Index_Or_Discriminant_Constraint
|
||||
(Loc,
|
||||
@ -2814,7 +2814,7 @@ package body Exp_Aggr is
|
||||
TmpD : constant Node_Id :=
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => TmpE,
|
||||
Object_Definition => New_Reference_To (SubE, Loc));
|
||||
Object_Definition => New_Occurrence_Of (SubE, Loc));
|
||||
|
||||
begin
|
||||
Set_No_Initialization (TmpD);
|
||||
@ -2825,14 +2825,14 @@ package body Exp_Aggr is
|
||||
|
||||
Append_List_To (L,
|
||||
Late_Expansion (Expr_Q, Comp_Type,
|
||||
New_Reference_To (TmpE, Loc)));
|
||||
New_Occurrence_Of (TmpE, Loc)));
|
||||
|
||||
-- Slide
|
||||
|
||||
Append_To (L,
|
||||
Make_Assignment_Statement (Loc,
|
||||
Name => New_Copy_Tree (Comp_Expr),
|
||||
Expression => New_Reference_To (TmpE, Loc)));
|
||||
Expression => New_Occurrence_Of (TmpE, Loc)));
|
||||
end;
|
||||
|
||||
-- Normal case (sliding not required)
|
||||
@ -2872,12 +2872,12 @@ package body Exp_Aggr is
|
||||
Make_Selected_Component (Loc,
|
||||
Prefix => New_Copy_Tree (Comp_Expr),
|
||||
Selector_Name =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(First_Tag_Component (Comp_Type), Loc)),
|
||||
|
||||
Expression =>
|
||||
Unchecked_Convert_To (RTE (RE_Tag),
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Node (First_Elmt (Access_Disp_Table (Comp_Type))),
|
||||
Loc)));
|
||||
|
||||
@ -2990,12 +2990,12 @@ package body Exp_Aggr is
|
||||
Make_Selected_Component (Loc,
|
||||
Prefix => New_Copy_Tree (Target),
|
||||
Selector_Name =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(First_Tag_Component (Base_Type (Typ)), Loc)),
|
||||
|
||||
Expression =>
|
||||
Unchecked_Convert_To (RTE (RE_Tag),
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Node (First_Elmt (Access_Disp_Table (Base_Type (Typ)))),
|
||||
Loc)));
|
||||
|
||||
@ -3073,7 +3073,7 @@ package body Exp_Aggr is
|
||||
|
||||
Occ : constant Node_Id :=
|
||||
Unchecked_Convert_To (Typ,
|
||||
Make_Explicit_Dereference (Loc, New_Reference_To (Temp, Loc)));
|
||||
Make_Explicit_Dereference (Loc, New_Occurrence_Of (Temp, Loc)));
|
||||
|
||||
begin
|
||||
if Is_Array_Type (Typ) then
|
||||
@ -4655,7 +4655,7 @@ package body Exp_Aggr is
|
||||
Make_Op_Add (Loc,
|
||||
Left_Opnd =>
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix => New_Reference_To (Ind_Typ, Loc),
|
||||
Prefix => New_Occurrence_Of (Ind_Typ, Loc),
|
||||
Attribute_Name => Name_Pos,
|
||||
Expressions =>
|
||||
New_List
|
||||
@ -4664,7 +4664,7 @@ package body Exp_Aggr is
|
||||
|
||||
Right_Opnd =>
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix => New_Reference_To (Ind_Typ, Loc),
|
||||
Prefix => New_Occurrence_Of (Ind_Typ, Loc),
|
||||
Attribute_Name => Name_Pos,
|
||||
Expressions => New_List (
|
||||
Duplicate_Subexpr_Move_Checks (Aggr_Hi))));
|
||||
@ -5214,7 +5214,7 @@ package body Exp_Aggr is
|
||||
|
||||
begin
|
||||
if Nkind (Tmp) = N_Defining_Identifier then
|
||||
Target := New_Reference_To (Tmp, Loc);
|
||||
Target := New_Occurrence_Of (Tmp, Loc);
|
||||
|
||||
else
|
||||
|
||||
@ -6579,7 +6579,7 @@ package body Exp_Aggr is
|
||||
-- Call init proc to set discriminants.
|
||||
-- There should eventually be a special procedure for this ???
|
||||
|
||||
Ref := New_Reference_To (Defining_Identifier (N), Loc);
|
||||
Ref := New_Occurrence_Of (Defining_Identifier (N), Loc);
|
||||
Insert_Actions_After (N,
|
||||
Build_Initialization_Call (Sloc (N), Ref, Typ));
|
||||
end if;
|
||||
|
@ -6,7 +6,7 @@
|
||||
-- --
|
||||
-- S p e c --
|
||||
-- --
|
||||
-- Copyright (C) 2006-2011, Free Software Foundation, Inc. --
|
||||
-- Copyright (C) 2006-2013, Free Software Foundation, Inc. --
|
||||
-- --
|
||||
-- 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- --
|
||||
@ -87,13 +87,13 @@ package body Exp_Atag is
|
||||
if Tagged_Type_Expansion then
|
||||
Tag_Node :=
|
||||
Unchecked_Convert_To (RTE (RE_Tag),
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Node (First_Elmt (Access_Disp_Table (Typ))), Loc));
|
||||
|
||||
else
|
||||
Tag_Node :=
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix => New_Reference_To (Typ, Loc),
|
||||
Prefix => New_Occurrence_Of (Typ, Loc),
|
||||
Attribute_Name => Name_Tag);
|
||||
end if;
|
||||
|
||||
@ -128,27 +128,27 @@ package body Exp_Atag is
|
||||
Make_Op_Eq (Loc,
|
||||
Left_Opnd => Make_Identifier (Loc, Name_uC),
|
||||
Right_Opnd =>
|
||||
New_Reference_To (RTE (RE_POK_Procedure), Loc)),
|
||||
New_Occurrence_Of (RTE (RE_POK_Procedure), Loc)),
|
||||
Right_Opnd =>
|
||||
Make_Or_Else (Loc,
|
||||
Left_Opnd =>
|
||||
Make_Op_Eq (Loc,
|
||||
Left_Opnd => Make_Identifier (Loc, Name_uC),
|
||||
Right_Opnd =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(RTE (RE_POK_Protected_Procedure), Loc)),
|
||||
Right_Opnd =>
|
||||
Make_Op_Eq (Loc,
|
||||
Left_Opnd => Make_Identifier (Loc, Name_uC),
|
||||
Right_Opnd =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(RTE (RE_POK_Task_Procedure), Loc)))),
|
||||
|
||||
Then_Statements =>
|
||||
New_List (
|
||||
Make_Assignment_Statement (Loc,
|
||||
Name => Make_Identifier (Loc, Name_uF),
|
||||
Expression => New_Reference_To (Standard_True, Loc)),
|
||||
Expression => New_Occurrence_Of (Standard_True, Loc)),
|
||||
Make_Simple_Return_Statement (Loc))));
|
||||
end Build_Common_Dispatching_Select_Statements;
|
||||
|
||||
@ -183,7 +183,7 @@ package body Exp_Atag is
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => Tag_Addr,
|
||||
Constant_Present => True,
|
||||
Object_Definition => New_Reference_To (RTE (RE_Address), Loc),
|
||||
Object_Definition => New_Occurrence_Of (RTE (RE_Address), Loc),
|
||||
Expression => Unchecked_Convert_To
|
||||
(RTE (RE_Address), Obj_Tag_Node)));
|
||||
|
||||
@ -196,15 +196,15 @@ package body Exp_Atag is
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => Obj_TSD,
|
||||
Constant_Present => True,
|
||||
Object_Definition => New_Reference_To
|
||||
Object_Definition => New_Occurrence_Of
|
||||
(RTE (RE_Type_Specific_Data_Ptr), Loc),
|
||||
Expression => Build_TSD (Loc, New_Reference_To (Tag_Addr, Loc))));
|
||||
Expression => Build_TSD (Loc, New_Occurrence_Of (Tag_Addr, Loc))));
|
||||
|
||||
Insert_Action (Related_Nod,
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => Typ_TSD,
|
||||
Constant_Present => True,
|
||||
Object_Definition => New_Reference_To
|
||||
Object_Definition => New_Occurrence_Of
|
||||
(RTE (RE_Type_Specific_Data_Ptr), Loc),
|
||||
Expression => Build_TSD (Loc,
|
||||
Unchecked_Convert_To (RTE (RE_Address),
|
||||
@ -219,16 +219,16 @@ package body Exp_Atag is
|
||||
Make_Op_Subtract (Loc,
|
||||
Left_Opnd =>
|
||||
Make_Selected_Component (Loc,
|
||||
Prefix => New_Reference_To (Obj_TSD, Loc),
|
||||
Prefix => New_Occurrence_Of (Obj_TSD, Loc),
|
||||
Selector_Name =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(RTE_Record_Component (RE_Idepth), Loc)),
|
||||
|
||||
Right_Opnd =>
|
||||
Make_Selected_Component (Loc,
|
||||
Prefix => New_Reference_To (Typ_TSD, Loc),
|
||||
Prefix => New_Occurrence_Of (Typ_TSD, Loc),
|
||||
Selector_Name =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(RTE_Record_Component (RE_Idepth), Loc)))));
|
||||
|
||||
New_Node :=
|
||||
@ -244,9 +244,9 @@ package body Exp_Atag is
|
||||
Make_Indexed_Component (Loc,
|
||||
Prefix =>
|
||||
Make_Selected_Component (Loc,
|
||||
Prefix => New_Reference_To (Obj_TSD, Loc),
|
||||
Prefix => New_Occurrence_Of (Obj_TSD, Loc),
|
||||
Selector_Name =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(RTE_Record_Component (RE_Tags_Table), Loc)),
|
||||
Expressions =>
|
||||
New_List (New_Occurrence_Of (Index, Loc))),
|
||||
@ -265,7 +265,7 @@ package body Exp_Atag is
|
||||
begin
|
||||
return
|
||||
Make_Function_Call (Loc,
|
||||
Name => New_Reference_To (RTE (RE_DT), Loc),
|
||||
Name => New_Occurrence_Of (RTE (RE_DT), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
Unchecked_Convert_To (RTE (RE_Tag), Tag_Node)));
|
||||
end Build_DT;
|
||||
@ -285,7 +285,7 @@ package body Exp_Atag is
|
||||
Build_TSD (Loc,
|
||||
Unchecked_Convert_To (RTE (RE_Address), Tag_Node)),
|
||||
Selector_Name =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(RTE_Record_Component (RE_Access_Level), Loc));
|
||||
end Build_Get_Access_Level;
|
||||
|
||||
@ -303,7 +303,7 @@ package body Exp_Atag is
|
||||
Prefix =>
|
||||
Build_TSD (Loc, Unchecked_Convert_To (RTE (RE_Address), Tag_Node)),
|
||||
Selector_Name =>
|
||||
New_Reference_To (RTE_Record_Component (RE_Alignment), Loc));
|
||||
New_Occurrence_Of (RTE_Record_Component (RE_Alignment), Loc));
|
||||
end Build_Get_Alignment;
|
||||
|
||||
------------------------------------------
|
||||
@ -344,13 +344,13 @@ package body Exp_Atag is
|
||||
Make_Expanded_Name (Loc,
|
||||
Chars => Name_Op_Subtract,
|
||||
Prefix =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(RTU_Entity (System_Storage_Elements), Loc),
|
||||
Selector_Name =>
|
||||
Make_Identifier (Loc, Name_Op_Subtract)),
|
||||
Parameter_Associations => New_List (
|
||||
Ctrl_Tag,
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(RTE (RE_DT_Predef_Prims_Offset), Loc)))))),
|
||||
Expressions =>
|
||||
New_List (Make_Integer_Literal (Loc, Position)));
|
||||
@ -421,14 +421,14 @@ package body Exp_Atag is
|
||||
Make_Explicit_Dereference (Loc,
|
||||
Unchecked_Convert_To
|
||||
(Node (Last_Elmt (Access_Disp_Table (Typ))),
|
||||
New_Reference_To (Typ_Tag, Loc))),
|
||||
New_Occurrence_Of (Typ_Tag, Loc))),
|
||||
Expressions =>
|
||||
New_List (Make_Integer_Literal (Loc, Prim_Pos))),
|
||||
|
||||
Expression =>
|
||||
Unchecked_Convert_To (RTE (RE_Prim_Ptr),
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix => New_Reference_To (E, Loc),
|
||||
Prefix => New_Occurrence_Of (E, Loc),
|
||||
Attribute_Name => Name_Unrestricted_Access))));
|
||||
end if;
|
||||
|
||||
@ -459,12 +459,12 @@ package body Exp_Atag is
|
||||
Make_Explicit_Dereference (Loc,
|
||||
Unchecked_Convert_To
|
||||
(Node (Last_Elmt (Access_Disp_Table (CPP_Typ))),
|
||||
New_Reference_To (Typ_Tag, Loc))),
|
||||
New_Occurrence_Of (Typ_Tag, Loc))),
|
||||
Expression =>
|
||||
Make_Explicit_Dereference (Loc,
|
||||
Unchecked_Convert_To
|
||||
(Node (Last_Elmt (Access_Disp_Table (CPP_Typ))),
|
||||
New_Reference_To (Parent_Tag, Loc)))));
|
||||
New_Occurrence_Of (Parent_Tag, Loc)))));
|
||||
exit;
|
||||
end if;
|
||||
end loop;
|
||||
@ -558,7 +558,7 @@ package body Exp_Atag is
|
||||
(Node
|
||||
(Last_Elmt
|
||||
(Access_Disp_Table (Iface))),
|
||||
New_Reference_To (Typ_Tag, Loc))),
|
||||
New_Occurrence_Of (Typ_Tag, Loc))),
|
||||
Expressions =>
|
||||
New_List
|
||||
(Make_Integer_Literal (Loc, Prim_Pos))),
|
||||
@ -566,7 +566,7 @@ package body Exp_Atag is
|
||||
Expression =>
|
||||
Unchecked_Convert_To (RTE (RE_Prim_Ptr),
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix => New_Reference_To (E, Loc),
|
||||
Prefix => New_Occurrence_Of (E, Loc),
|
||||
Attribute_Name =>
|
||||
Name_Unrestricted_Access))));
|
||||
end if;
|
||||
@ -588,12 +588,12 @@ package body Exp_Atag is
|
||||
Make_Explicit_Dereference (Loc,
|
||||
Unchecked_Convert_To
|
||||
(Node (Last_Elmt (Access_Disp_Table (Iface))),
|
||||
New_Reference_To (Typ_Tag, Loc))),
|
||||
New_Occurrence_Of (Typ_Tag, Loc))),
|
||||
Expression =>
|
||||
Make_Explicit_Dereference (Loc,
|
||||
Unchecked_Convert_To
|
||||
(Node (Last_Elmt (Access_Disp_Table (Iface))),
|
||||
New_Reference_To (Parent_Tag, Loc)))));
|
||||
New_Occurrence_Of (Parent_Tag, Loc)))));
|
||||
exit;
|
||||
end if;
|
||||
end loop;
|
||||
@ -630,7 +630,7 @@ package body Exp_Atag is
|
||||
Prefix =>
|
||||
Build_DT (Loc, New_Tag_Node),
|
||||
Selector_Name =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(RTE_Record_Component (RE_Prims_Ptr), Loc)),
|
||||
Discrete_Range =>
|
||||
Make_Range (Loc,
|
||||
@ -644,7 +644,7 @@ package body Exp_Atag is
|
||||
Prefix =>
|
||||
Build_DT (Loc, Old_Tag_Node),
|
||||
Selector_Name =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(RTE_Record_Component (RE_Prims_Ptr), Loc)),
|
||||
Discrete_Range =>
|
||||
Make_Range (Loc,
|
||||
@ -728,7 +728,7 @@ package body Exp_Atag is
|
||||
Build_TSD (Loc,
|
||||
Unchecked_Convert_To (RTE (RE_Address), Tag_Node)),
|
||||
Selector_Name =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(RTE_Record_Component (RE_Transportable), Loc));
|
||||
end Build_Get_Transportable;
|
||||
|
||||
@ -754,7 +754,7 @@ package body Exp_Atag is
|
||||
New_Tag_Node)))),
|
||||
Discrete_Range => Make_Range (Loc,
|
||||
Make_Integer_Literal (Loc, Uint_1),
|
||||
New_Reference_To (RTE (RE_Max_Predef_Prims), Loc))),
|
||||
New_Occurrence_Of (RTE (RE_Max_Predef_Prims), Loc))),
|
||||
|
||||
Expression =>
|
||||
Make_Slice (Loc,
|
||||
@ -767,7 +767,7 @@ package body Exp_Atag is
|
||||
Discrete_Range =>
|
||||
Make_Range (Loc,
|
||||
Make_Integer_Literal (Loc, 1),
|
||||
New_Reference_To (RTE (RE_Max_Predef_Prims), Loc))));
|
||||
New_Occurrence_Of (RTE (RE_Max_Predef_Prims), Loc))));
|
||||
end Build_Inherit_Predefined_Prims;
|
||||
|
||||
-------------------------
|
||||
@ -793,12 +793,12 @@ package body Exp_Atag is
|
||||
Make_Expanded_Name (Loc,
|
||||
Chars => Name_Op_Subtract,
|
||||
Prefix =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(RTU_Entity (System_Storage_Elements), Loc),
|
||||
Selector_Name => Make_Identifier (Loc, Name_Op_Subtract)),
|
||||
Parameter_Associations => New_List (
|
||||
Unchecked_Convert_To (RTE (RE_Address), Tag_Node),
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(RTE (RE_DT_Offset_To_Top_Offset), Loc)))));
|
||||
end Build_Offset_To_Top;
|
||||
|
||||
@ -869,12 +869,12 @@ package body Exp_Atag is
|
||||
Build_TSD (Loc,
|
||||
Unchecked_Convert_To (RTE (RE_Address), Tag_Node)),
|
||||
Selector_Name =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(RTE_Record_Component (RE_Size_Func), Loc)),
|
||||
Expression =>
|
||||
Unchecked_Convert_To (RTE (RE_Size_Ptr),
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix => New_Reference_To (Size_Func, Loc),
|
||||
Prefix => New_Occurrence_Of (Size_Func, Loc),
|
||||
Attribute_Name => Name_Unrestricted_Access)));
|
||||
end Build_Set_Size_Function;
|
||||
|
||||
@ -896,12 +896,12 @@ package body Exp_Atag is
|
||||
Make_Expanded_Name (Loc,
|
||||
Chars => Name_Op_Subtract,
|
||||
Prefix =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(RTU_Entity (System_Storage_Elements), Loc),
|
||||
Selector_Name => Make_Identifier (Loc, Name_Op_Subtract)),
|
||||
Parameter_Associations => New_List (
|
||||
Unchecked_Convert_To (RTE (RE_Address), Iface_Tag),
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(RTE (RE_DT_Offset_To_Top_Offset), Loc))))),
|
||||
Offset_Value);
|
||||
end Build_Set_Static_Offset_To_Top;
|
||||
@ -923,13 +923,13 @@ package body Exp_Atag is
|
||||
Make_Expanded_Name (Loc,
|
||||
Chars => Name_Op_Subtract,
|
||||
Prefix =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(RTU_Entity (System_Storage_Elements), Loc),
|
||||
Selector_Name => Make_Identifier (Loc, Name_Op_Subtract)),
|
||||
|
||||
Parameter_Associations => New_List (
|
||||
Tag_Node_Addr,
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(RTE (RE_DT_Typeinfo_Ptr_Size), Loc))))));
|
||||
end Build_TSD;
|
||||
|
||||
|
@ -272,7 +272,7 @@ package body Exp_Attr is
|
||||
Index :=
|
||||
Make_Defining_Identifier (Loc, New_External_Name ('J', N));
|
||||
|
||||
Append (New_Reference_To (Index, Loc), Index_List);
|
||||
Append (New_Occurrence_Of (Index, Loc), Index_List);
|
||||
|
||||
return New_List (
|
||||
Make_Implicit_Loop_Statement (Nod,
|
||||
@ -309,7 +309,7 @@ package body Exp_Attr is
|
||||
Defining_Identifier => Make_Defining_Identifier (Loc, Name_uA),
|
||||
In_Present => True,
|
||||
Out_Present => False,
|
||||
Parameter_Type => New_Reference_To (A_Type, Loc)));
|
||||
Parameter_Type => New_Occurrence_Of (A_Type, Loc)));
|
||||
|
||||
-- Build body
|
||||
|
||||
@ -575,7 +575,7 @@ package body Exp_Attr is
|
||||
|
||||
Fnm :=
|
||||
Make_Selected_Component (Loc,
|
||||
Prefix => New_Reference_To (RTE (Pkg), Loc),
|
||||
Prefix => New_Occurrence_Of (RTE (Pkg), Loc),
|
||||
Selector_Name => Make_Identifier (Loc, Nam));
|
||||
|
||||
-- The generated call is given the provided set of parameters, and then
|
||||
@ -912,7 +912,7 @@ package body Exp_Attr is
|
||||
Make_Op_Gt (Loc,
|
||||
Left_Opnd =>
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix => New_Reference_To (Array_Nam, Loc),
|
||||
Prefix => New_Occurrence_Of (Array_Nam, Loc),
|
||||
Attribute_Name => Name_Length,
|
||||
Expressions => New_List (
|
||||
Make_Integer_Literal (Loc, Dim))),
|
||||
@ -1000,13 +1000,13 @@ package body Exp_Attr is
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => Temp_Id,
|
||||
Constant_Present => True,
|
||||
Object_Definition => New_Reference_To (Typ, Loc),
|
||||
Object_Definition => New_Occurrence_Of (Typ, Loc),
|
||||
Expression => Relocate_Node (Pref));
|
||||
Append_To (Decls, Temp_Decl);
|
||||
|
||||
-- Step 4: Analyze all bits
|
||||
|
||||
Rewrite (N, New_Reference_To (Temp_Id, Loc));
|
||||
Rewrite (N, New_Occurrence_Of (Temp_Id, Loc));
|
||||
|
||||
Installed := Current_Scope = Scope (Loop_Id);
|
||||
|
||||
@ -1835,7 +1835,7 @@ package body Exp_Attr is
|
||||
then
|
||||
Rewrite (N,
|
||||
Make_Function_Call (Loc,
|
||||
Name => New_Reference_To (RTE (RE_Base_Address), Loc),
|
||||
Name => New_Occurrence_Of (RTE (RE_Base_Address), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
Relocate_Node (N))));
|
||||
Analyze (N);
|
||||
@ -1884,7 +1884,7 @@ package body Exp_Attr is
|
||||
else
|
||||
New_Node :=
|
||||
Make_Function_Call (Loc,
|
||||
Name => New_Reference_To (RTE (RE_Get_Alignment), Loc),
|
||||
Name => New_Occurrence_Of (RTE (RE_Get_Alignment), Loc),
|
||||
Parameter_Associations => New_List (New_Node));
|
||||
end if;
|
||||
|
||||
@ -2126,7 +2126,7 @@ package body Exp_Attr is
|
||||
|
||||
Rewrite (N,
|
||||
Make_Function_Call (Loc,
|
||||
Name => New_Reference_To (RTE (RE_Get_Version_String), Loc),
|
||||
Name => New_Occurrence_Of (RTE (RE_Get_Version_String), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
New_Occurrence_Of (E, Loc))));
|
||||
end if;
|
||||
@ -2164,11 +2164,11 @@ package body Exp_Attr is
|
||||
Rewrite (N,
|
||||
Make_Function_Call (Loc,
|
||||
Name =>
|
||||
New_Reference_To (RTE (RE_Callable), Loc),
|
||||
New_Occurrence_Of (RTE (RE_Callable), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
Make_Unchecked_Type_Conversion (Loc,
|
||||
Subtype_Mark =>
|
||||
New_Reference_To (RTE (RO_ST_Task_Id), Loc),
|
||||
New_Occurrence_Of (RTE (RO_ST_Task_Id), Loc),
|
||||
Expression =>
|
||||
Make_Selected_Component (Loc,
|
||||
Prefix =>
|
||||
@ -2206,12 +2206,12 @@ package body Exp_Attr is
|
||||
case Corresponding_Runtime_Package (Conctype) is
|
||||
when System_Tasking_Protected_Objects_Entries =>
|
||||
Name :=
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(RTE (RE_Protected_Entry_Caller), Loc);
|
||||
|
||||
when System_Tasking_Protected_Objects_Single_Entry =>
|
||||
Name :=
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(RTE (RE_Protected_Single_Entry_Caller), Loc);
|
||||
|
||||
when others =>
|
||||
@ -2223,7 +2223,7 @@ package body Exp_Attr is
|
||||
Make_Function_Call (Loc,
|
||||
Name => Name,
|
||||
Parameter_Associations => New_List (
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Find_Protection_Object (Current_Scope), Loc)))));
|
||||
|
||||
-- Task case
|
||||
@ -2255,7 +2255,7 @@ package body Exp_Attr is
|
||||
Unchecked_Convert_To (Id_Kind,
|
||||
Make_Function_Call (Loc,
|
||||
Name =>
|
||||
New_Reference_To (RTE (RE_Task_Entry_Caller), Loc),
|
||||
New_Occurrence_Of (RTE (RE_Task_Entry_Caller), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
Make_Integer_Literal (Loc,
|
||||
Intval => Int (Nest_Depth))))));
|
||||
@ -2421,7 +2421,7 @@ package body Exp_Attr is
|
||||
and then Is_Limited_Type (Ptyp));
|
||||
end if;
|
||||
|
||||
Rewrite (N, New_Reference_To (Boolean_Literals (Res), Loc));
|
||||
Rewrite (N, New_Occurrence_Of (Boolean_Literals (Res), Loc));
|
||||
end;
|
||||
|
||||
-- Prefix is not an entity name. These are also cases where we can
|
||||
@ -2433,7 +2433,7 @@ package body Exp_Attr is
|
||||
|
||||
else
|
||||
Rewrite (N,
|
||||
New_Reference_To (
|
||||
New_Occurrence_Of (
|
||||
Boolean_Literals (
|
||||
not Is_Variable (Pref)
|
||||
or else
|
||||
@ -2503,26 +2503,26 @@ package body Exp_Attr is
|
||||
if Is_Protected_Type (Conctyp) then
|
||||
case Corresponding_Runtime_Package (Conctyp) is
|
||||
when System_Tasking_Protected_Objects_Entries =>
|
||||
Name := New_Reference_To (RTE (RE_Protected_Count), Loc);
|
||||
Name := New_Occurrence_Of (RTE (RE_Protected_Count), Loc);
|
||||
|
||||
Call :=
|
||||
Make_Function_Call (Loc,
|
||||
Name => Name,
|
||||
Parameter_Associations => New_List (
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Find_Protection_Object (Current_Scope), Loc),
|
||||
Entry_Index_Expression
|
||||
(Loc, Entry_Id, Index, Scope (Entry_Id))));
|
||||
|
||||
when System_Tasking_Protected_Objects_Single_Entry =>
|
||||
Name :=
|
||||
New_Reference_To (RTE (RE_Protected_Count_Entry), Loc);
|
||||
New_Occurrence_Of (RTE (RE_Protected_Count_Entry), Loc);
|
||||
|
||||
Call :=
|
||||
Make_Function_Call (Loc,
|
||||
Name => Name,
|
||||
Parameter_Associations => New_List (
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Find_Protection_Object (Current_Scope), Loc)));
|
||||
|
||||
when others =>
|
||||
@ -2534,7 +2534,7 @@ package body Exp_Attr is
|
||||
else
|
||||
Call :=
|
||||
Make_Function_Call (Loc,
|
||||
Name => New_Reference_To (RTE (RE_Task_Count), Loc),
|
||||
Name => New_Occurrence_Of (RTE (RE_Task_Count), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
Entry_Index_Expression (Loc,
|
||||
Entry_Id, Index, Scope (Entry_Id))));
|
||||
@ -2802,7 +2802,7 @@ package body Exp_Attr is
|
||||
Left_Opnd =>
|
||||
Make_Function_Call (Loc,
|
||||
Name =>
|
||||
New_Reference_To (TSS (Btyp, TSS_Rep_To_Pos), Loc),
|
||||
New_Occurrence_Of (TSS (Btyp, TSS_Rep_To_Pos), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
Relocate_Node (Duplicate_Subexpr (Expr)),
|
||||
New_Occurrence_Of (Standard_False, Loc))),
|
||||
@ -2834,7 +2834,7 @@ package body Exp_Attr is
|
||||
begin
|
||||
Rewrite (N,
|
||||
Make_Function_Call (Loc,
|
||||
Name => New_Reference_To (RTE (RE_External_Tag), Loc),
|
||||
Name => New_Occurrence_Of (RTE (RE_External_Tag), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
Make_Attribute_Reference (Loc,
|
||||
Attribute_Name => Name_Tag,
|
||||
@ -2859,7 +2859,7 @@ package body Exp_Attr is
|
||||
Rewrite (N,
|
||||
Make_Attribute_Reference (Loc,
|
||||
Attribute_Name => Name_First,
|
||||
Prefix => New_Reference_To (Get_Index_Subtype (N), Loc)));
|
||||
Prefix => New_Occurrence_Of (Get_Index_Subtype (N), Loc)));
|
||||
Analyze_And_Resolve (N, Typ);
|
||||
|
||||
elsif Is_Access_Type (Ptyp) then
|
||||
@ -2970,17 +2970,17 @@ package body Exp_Attr is
|
||||
Rewrite (N,
|
||||
Convert_To (Typ,
|
||||
Make_Function_Call (Loc,
|
||||
Name => New_Reference_To (RTE (RE_Fore), Loc),
|
||||
Name => New_Occurrence_Of (RTE (RE_Fore), Loc),
|
||||
|
||||
Parameter_Associations => New_List (
|
||||
Convert_To (Universal_Real,
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix => New_Reference_To (Ptyp, Loc),
|
||||
Prefix => New_Occurrence_Of (Ptyp, Loc),
|
||||
Attribute_Name => Name_First)),
|
||||
|
||||
Convert_To (Universal_Real,
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix => New_Reference_To (Ptyp, Loc),
|
||||
Prefix => New_Occurrence_Of (Ptyp, Loc),
|
||||
Attribute_Name => Name_Last))))));
|
||||
|
||||
Analyze_And_Resolve (N, Typ);
|
||||
@ -3087,7 +3087,7 @@ package body Exp_Attr is
|
||||
begin
|
||||
Rewrite (N,
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix => New_Reference_To (Ptyp, Loc),
|
||||
Prefix => New_Occurrence_Of (Ptyp, Loc),
|
||||
Attribute_Name => Name_Image,
|
||||
Expressions => New_List (Relocate_Node (Pref))));
|
||||
|
||||
@ -3273,7 +3273,7 @@ package body Exp_Attr is
|
||||
Expressions => New_List (
|
||||
Relocate_Node (Duplicate_Subexpr (Strm)))),
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix => New_Reference_To (P_Type, Loc),
|
||||
Prefix => New_Occurrence_Of (P_Type, Loc),
|
||||
Attribute_Name => Name_Tag)));
|
||||
|
||||
Dnn := Make_Temporary (Loc, 'D', Expr);
|
||||
@ -3439,7 +3439,7 @@ package body Exp_Attr is
|
||||
Rewrite (N,
|
||||
Make_Attribute_Reference (Loc,
|
||||
Attribute_Name => Name_Last,
|
||||
Prefix => New_Reference_To (Get_Index_Subtype (N), Loc)));
|
||||
Prefix => New_Occurrence_Of (Get_Index_Subtype (N), Loc)));
|
||||
Analyze_And_Resolve (N, Typ);
|
||||
|
||||
elsif Is_Access_Type (Ptyp) then
|
||||
@ -3590,7 +3590,7 @@ package body Exp_Attr is
|
||||
Rewrite (N,
|
||||
Make_Attribute_Reference (Loc,
|
||||
Attribute_Name => Name_Range_Length,
|
||||
Prefix => New_Reference_To (Ityp, Loc)));
|
||||
Prefix => New_Occurrence_Of (Ityp, Loc)));
|
||||
Analyze_And_Resolve (N, Typ);
|
||||
end if;
|
||||
|
||||
@ -3810,13 +3810,13 @@ package body Exp_Attr is
|
||||
Convert_To (Universal_Integer,
|
||||
Make_Function_Call (Loc,
|
||||
Name =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(RTE (RE_Header_Size_With_Padding), Loc),
|
||||
|
||||
Parameter_Associations => New_List (
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix =>
|
||||
New_Reference_To (Ptyp, Loc),
|
||||
New_Occurrence_Of (Ptyp, Loc),
|
||||
Attribute_Name => Name_Alignment))))));
|
||||
|
||||
-- Add a conversion to the target type
|
||||
@ -3824,7 +3824,7 @@ package body Exp_Attr is
|
||||
if not Conversion_Added then
|
||||
Rewrite (Attr,
|
||||
Make_Type_Conversion (Loc,
|
||||
Subtype_Mark => New_Reference_To (Typ, Loc),
|
||||
Subtype_Mark => New_Occurrence_Of (Typ, Loc),
|
||||
Expression => Relocate_Node (Attr)));
|
||||
end if;
|
||||
|
||||
@ -4370,7 +4370,7 @@ package body Exp_Attr is
|
||||
Convert_To (Typ,
|
||||
Make_Function_Call (Loc,
|
||||
Name =>
|
||||
New_Reference_To (TSS (Etyp, TSS_Rep_To_Pos), Loc),
|
||||
New_Occurrence_Of (TSS (Etyp, TSS_Rep_To_Pos), Loc),
|
||||
Parameter_Associations => Exprs)));
|
||||
|
||||
Analyze_And_Resolve (N, Typ);
|
||||
@ -4472,7 +4472,7 @@ package body Exp_Attr is
|
||||
Right_Opnd =>
|
||||
Make_Function_Call (Loc,
|
||||
Name =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(TSS (Etyp, TSS_Rep_To_Pos), Loc),
|
||||
|
||||
Parameter_Associations =>
|
||||
@ -4495,14 +4495,14 @@ package body Exp_Attr is
|
||||
Rewrite (N,
|
||||
Make_Indexed_Component (Loc,
|
||||
Prefix =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Enum_Pos_To_Rep (Etyp), Loc),
|
||||
Expressions => New_List (
|
||||
Make_Op_Subtract (Loc,
|
||||
Left_Opnd =>
|
||||
Make_Function_Call (Loc,
|
||||
Name =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(TSS (Etyp, TSS_Rep_To_Pos), Loc),
|
||||
Parameter_Associations => Exprs),
|
||||
Right_Opnd => Make_Integer_Literal (Loc, 1)))));
|
||||
@ -4608,7 +4608,7 @@ package body Exp_Attr is
|
||||
Make_Selected_Component (Loc,
|
||||
Prefix =>
|
||||
Unchecked_Convert_To (New_Itype,
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(First_Entity
|
||||
(Protected_Body_Subprogram (Subprg)),
|
||||
Loc)),
|
||||
@ -4624,7 +4624,7 @@ package body Exp_Attr is
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix =>
|
||||
Make_Selected_Component (Loc,
|
||||
Prefix => New_Reference_To
|
||||
Prefix => New_Occurrence_Of
|
||||
(First_Entity
|
||||
(Protected_Body_Subprogram (Subprg)),
|
||||
Loc),
|
||||
@ -4636,10 +4636,10 @@ package body Exp_Attr is
|
||||
|
||||
if Number_Entries (Conctyp) = 0 then
|
||||
RT_Subprg_Name :=
|
||||
New_Reference_To (RTE (RE_Get_Ceiling), Loc);
|
||||
New_Occurrence_Of (RTE (RE_Get_Ceiling), Loc);
|
||||
else
|
||||
RT_Subprg_Name :=
|
||||
New_Reference_To (RTE (RO_PE_Get_Ceiling), Loc);
|
||||
New_Occurrence_Of (RTE (RO_PE_Get_Ceiling), Loc);
|
||||
end if;
|
||||
|
||||
Call :=
|
||||
@ -5044,8 +5044,8 @@ package body Exp_Attr is
|
||||
when Attribute_Simple_Storage_Pool =>
|
||||
Rewrite (N,
|
||||
Make_Type_Conversion (Loc,
|
||||
Subtype_Mark => New_Reference_To (Etype (N), Loc),
|
||||
Expression => New_Reference_To (Entity (N), Loc)));
|
||||
Subtype_Mark => New_Occurrence_Of (Etype (N), Loc),
|
||||
Expression => New_Occurrence_Of (Entity (N), Loc)));
|
||||
Analyze_And_Resolve (N, Typ);
|
||||
|
||||
----------
|
||||
@ -5151,7 +5151,7 @@ package body Exp_Attr is
|
||||
|
||||
New_Node :=
|
||||
Make_Function_Call (Loc,
|
||||
Name => New_Reference_To
|
||||
Name => New_Occurrence_Of
|
||||
(Find_Prim_Op (Ptyp, Name_uSize), Loc),
|
||||
Parameter_Associations => New_List (Pref));
|
||||
|
||||
@ -5298,8 +5298,8 @@ package body Exp_Attr is
|
||||
when Attribute_Storage_Pool =>
|
||||
Rewrite (N,
|
||||
Make_Type_Conversion (Loc,
|
||||
Subtype_Mark => New_Reference_To (Etype (N), Loc),
|
||||
Expression => New_Reference_To (Entity (N), Loc)));
|
||||
Subtype_Mark => New_Occurrence_Of (Etype (N), Loc),
|
||||
Expression => New_Occurrence_Of (Entity (N), Loc)));
|
||||
Analyze_And_Resolve (N, Typ);
|
||||
|
||||
------------------
|
||||
@ -5322,12 +5322,12 @@ package body Exp_Attr is
|
||||
if Present (Storage_Size_Variable (Root_Type (Ptyp))) then
|
||||
Rewrite (N,
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix => New_Reference_To (Typ, Loc),
|
||||
Prefix => New_Occurrence_Of (Typ, Loc),
|
||||
Attribute_Name => Name_Max,
|
||||
Expressions => New_List (
|
||||
Make_Integer_Literal (Loc, 0),
|
||||
Convert_To (Typ,
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Storage_Size_Variable (Root_Type (Ptyp)), Loc)))));
|
||||
|
||||
elsif Present (Associated_Storage_Pool (Root_Type (Ptyp))) then
|
||||
@ -5382,10 +5382,10 @@ package body Exp_Attr is
|
||||
OK_Convert_To (Typ,
|
||||
Make_Function_Call (Loc,
|
||||
Name =>
|
||||
New_Reference_To (Alloc_Op, Loc),
|
||||
New_Occurrence_Of (Alloc_Op, Loc),
|
||||
|
||||
Parameter_Associations => New_List (
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Associated_Storage_Pool
|
||||
(Root_Type (Ptyp)), Loc)))));
|
||||
end if;
|
||||
@ -5427,7 +5427,7 @@ package body Exp_Attr is
|
||||
New_List (
|
||||
Make_Function_Call (Loc,
|
||||
Name =>
|
||||
New_Reference_To (RTE (RE_Self), Loc))))));
|
||||
New_Occurrence_Of (RTE (RE_Self), Loc))))));
|
||||
|
||||
elsif not Is_Entity_Name (Pref)
|
||||
or else not Is_Type (Entity (Pref))
|
||||
@ -5461,7 +5461,7 @@ package body Exp_Attr is
|
||||
RTE (RE_Adjust_Storage_Size), Loc),
|
||||
Parameter_Associations =>
|
||||
New_List (
|
||||
New_Reference_To (
|
||||
New_Occurrence_Of (
|
||||
Storage_Size_Variable (Ptyp), Loc)))));
|
||||
else
|
||||
-- Get system default
|
||||
@ -5521,7 +5521,7 @@ package body Exp_Attr is
|
||||
Right_Opnd =>
|
||||
Make_Function_Call (Loc,
|
||||
Name =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(TSS (Etyp, TSS_Rep_To_Pos), Loc),
|
||||
|
||||
Parameter_Associations =>
|
||||
@ -5543,14 +5543,14 @@ package body Exp_Attr is
|
||||
Rewrite (N,
|
||||
Make_Indexed_Component (Loc,
|
||||
Prefix =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Enum_Pos_To_Rep (Etyp), Loc),
|
||||
Expressions => New_List (
|
||||
Make_Op_Add (Loc,
|
||||
Left_Opnd =>
|
||||
Make_Function_Call (Loc,
|
||||
Name =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(TSS (Etyp, TSS_Rep_To_Pos), Loc),
|
||||
Parameter_Associations => Exprs),
|
||||
Right_Opnd => Make_Integer_Literal (Loc, 1)))));
|
||||
@ -5621,7 +5621,7 @@ package body Exp_Attr is
|
||||
if Tagged_Type_Expansion then
|
||||
Rewrite (N,
|
||||
Unchecked_Convert_To (RTE (RE_Tag),
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Node (First_Elmt (Access_Disp_Table (Ttyp))), Loc)));
|
||||
Analyze_And_Resolve (N, RTE (RE_Tag));
|
||||
end if;
|
||||
@ -5658,7 +5658,7 @@ package body Exp_Attr is
|
||||
Make_Selected_Component (Loc,
|
||||
Prefix => Relocate_Node (Pref),
|
||||
Selector_Name =>
|
||||
New_Reference_To (First_Tag_Component (Ttyp), Loc)));
|
||||
New_Occurrence_Of (First_Tag_Component (Ttyp), Loc)));
|
||||
Analyze_And_Resolve (N, RTE (RE_Tag));
|
||||
end if;
|
||||
end Tag;
|
||||
@ -5683,11 +5683,11 @@ package body Exp_Attr is
|
||||
Rewrite (N,
|
||||
Make_Function_Call (Loc,
|
||||
Name =>
|
||||
New_Reference_To (RTE (RE_Terminated), Loc),
|
||||
New_Occurrence_Of (RTE (RE_Terminated), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
Make_Unchecked_Type_Conversion (Loc,
|
||||
Subtype_Mark =>
|
||||
New_Reference_To (RTE (RO_ST_Task_Id), Loc),
|
||||
New_Occurrence_Of (RTE (RO_ST_Task_Id), Loc),
|
||||
Expression =>
|
||||
Make_Selected_Component (Loc,
|
||||
Prefix =>
|
||||
@ -5871,7 +5871,7 @@ package body Exp_Attr is
|
||||
Right_Opnd =>
|
||||
Make_Function_Call (Loc,
|
||||
Name =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(TSS (Etyp, TSS_Rep_To_Pos), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
Rep_Node,
|
||||
@ -5881,7 +5881,7 @@ package body Exp_Attr is
|
||||
else
|
||||
Rewrite (N,
|
||||
Make_Indexed_Component (Loc,
|
||||
Prefix => New_Reference_To (Enum_Pos_To_Rep (Etyp), Loc),
|
||||
Prefix => New_Occurrence_Of (Enum_Pos_To_Rep (Etyp), Loc),
|
||||
Expressions => New_List (
|
||||
Convert_To (Standard_Integer,
|
||||
Relocate_Node (First (Exprs))))));
|
||||
@ -6081,7 +6081,7 @@ package body Exp_Attr is
|
||||
Left_Opnd =>
|
||||
Make_Function_Call (Loc,
|
||||
Name =>
|
||||
New_Reference_To (TSS (Btyp, TSS_Rep_To_Pos), Loc),
|
||||
New_Occurrence_Of (TSS (Btyp, TSS_Rep_To_Pos), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
Pref,
|
||||
New_Occurrence_Of (Standard_False, Loc))),
|
||||
@ -6379,7 +6379,7 @@ package body Exp_Attr is
|
||||
Expressions => New_List (
|
||||
Make_Function_Call (Loc,
|
||||
Name =>
|
||||
New_Reference_To (RTE (RE_Wide_String_To_String), Loc),
|
||||
New_Occurrence_Of (RTE (RE_Wide_String_To_String), Loc),
|
||||
|
||||
Parameter_Associations => New_List (
|
||||
Relocate_Node (First (Exprs)),
|
||||
@ -6417,7 +6417,8 @@ package body Exp_Attr is
|
||||
Expressions => New_List (
|
||||
Make_Function_Call (Loc,
|
||||
Name =>
|
||||
New_Reference_To (RTE (RE_Wide_Wide_String_To_String), Loc),
|
||||
New_Occurrence_Of
|
||||
(RTE (RE_Wide_Wide_String_To_String), Loc),
|
||||
|
||||
Parameter_Associations => New_List (
|
||||
Relocate_Node (First (Exprs)),
|
||||
@ -6734,7 +6735,7 @@ package body Exp_Attr is
|
||||
Right_Opnd =>
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix =>
|
||||
New_Reference_To (Base_Type (Etype (Prefix (N))), Loc),
|
||||
New_Occurrence_Of (Base_Type (Etype (Prefix (N))), Loc),
|
||||
Attribute_Name => Cnam)),
|
||||
Reason => CE_Overflow_Check_Failed));
|
||||
end if;
|
||||
@ -6809,7 +6810,7 @@ package body Exp_Attr is
|
||||
|
||||
LHS :=
|
||||
Make_Indexed_Component (Loc,
|
||||
Prefix => New_Reference_To (Temp, Loc),
|
||||
Prefix => New_Occurrence_Of (Temp, Loc),
|
||||
Expressions => Exprs);
|
||||
|
||||
-- A record component update appears in the following form:
|
||||
@ -6824,7 +6825,7 @@ package body Exp_Attr is
|
||||
else pragma Assert (Is_Record_Type (Typ));
|
||||
LHS :=
|
||||
Make_Selected_Component (Loc,
|
||||
Prefix => New_Reference_To (Temp, Loc),
|
||||
Prefix => New_Occurrence_Of (Temp, Loc),
|
||||
Selector_Name => Relocate_Node (Comp));
|
||||
end if;
|
||||
|
||||
@ -6876,9 +6877,10 @@ package body Exp_Attr is
|
||||
Make_Assignment_Statement (Loc,
|
||||
Name =>
|
||||
Make_Indexed_Component (Loc,
|
||||
Prefix => New_Reference_To (Temp, Loc),
|
||||
Prefix => New_Occurrence_Of (Temp, Loc),
|
||||
Expressions => New_List (
|
||||
Convert_To (Index_Typ, New_Reference_To (Index, Loc)))),
|
||||
Convert_To (Index_Typ,
|
||||
New_Occurrence_Of (Index, Loc)))),
|
||||
Expression => Relocate_Node (Expr))),
|
||||
|
||||
End_Label => Empty));
|
||||
@ -6908,7 +6910,7 @@ package body Exp_Attr is
|
||||
Insert_Action (N,
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => Temp,
|
||||
Object_Definition => New_Reference_To (Typ, Loc),
|
||||
Object_Definition => New_Occurrence_Of (Typ, Loc),
|
||||
Expression => Relocate_Node (Pref)));
|
||||
|
||||
-- Process the update aggregate
|
||||
@ -6932,7 +6934,7 @@ package body Exp_Attr is
|
||||
|
||||
-- The attribute is replaced by a reference to the anonymous object
|
||||
|
||||
Rewrite (N, New_Reference_To (Temp, Loc));
|
||||
Rewrite (N, New_Occurrence_Of (Temp, Loc));
|
||||
Analyze (N);
|
||||
end Expand_Update_Attribute;
|
||||
|
||||
|
@ -220,7 +220,7 @@ package body Exp_Ch13 is
|
||||
Assign :=
|
||||
Make_Assignment_Statement (Loc,
|
||||
Name =>
|
||||
New_Reference_To (Storage_Size_Variable (Ent), Loc),
|
||||
New_Occurrence_Of (Storage_Size_Variable (Ent), Loc),
|
||||
Expression =>
|
||||
Convert_To (RTE (RE_Size_Type), Expression (N)));
|
||||
|
||||
@ -260,7 +260,7 @@ package body Exp_Ch13 is
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => V,
|
||||
Object_Definition =>
|
||||
New_Reference_To (RTE (RE_Storage_Offset), Loc),
|
||||
New_Occurrence_Of (RTE (RE_Storage_Offset), Loc),
|
||||
Expression =>
|
||||
Convert_To (RTE (RE_Storage_Offset), Expression (N))));
|
||||
|
||||
@ -344,11 +344,11 @@ package body Exp_Ch13 is
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => Temp_Id,
|
||||
Object_Definition =>
|
||||
New_Reference_To (Expr_Typ, Loc),
|
||||
New_Occurrence_Of (Expr_Typ, Loc),
|
||||
Expression =>
|
||||
Relocate_Node (Expr)));
|
||||
|
||||
New_Expr := New_Reference_To (Temp_Id, Loc);
|
||||
New_Expr := New_Occurrence_Of (Temp_Id, Loc);
|
||||
Set_Etype (New_Expr, Expr_Typ);
|
||||
|
||||
Set_Expression (N, New_Expr);
|
||||
@ -668,7 +668,7 @@ package body Exp_Ch13 is
|
||||
|
||||
AtM_Nod :=
|
||||
Make_Attribute_Definition_Clause (Loc,
|
||||
Name => New_Reference_To (Base_Type (Rectype), Loc),
|
||||
Name => New_Occurrence_Of (Base_Type (Rectype), Loc),
|
||||
Chars => Name_Alignment,
|
||||
Expression => Make_Integer_Literal (Loc, Mod_Val));
|
||||
|
||||
|
@ -574,9 +574,9 @@ package body Exp_Ch2 is
|
||||
Prefix =>
|
||||
Make_Explicit_Dereference (Loc,
|
||||
Unchecked_Convert_To (Parm_Type,
|
||||
New_Reference_To (Addr_Ent, Loc))),
|
||||
New_Occurrence_Of (Addr_Ent, Loc))),
|
||||
Selector_Name =>
|
||||
New_Reference_To (Entry_Component (Ent_Formal), Loc));
|
||||
New_Occurrence_Of (Entry_Component (Ent_Formal), Loc));
|
||||
|
||||
-- For all types of parameters, the constructed parameter record object
|
||||
-- contains a pointer to the parameter. Thus we must dereference them to
|
||||
|
@ -629,7 +629,7 @@ package body Exp_Ch3 is
|
||||
Index :=
|
||||
Make_Defining_Identifier (Loc, New_External_Name ('J', N));
|
||||
|
||||
Append (New_Reference_To (Index, Loc), Index_List);
|
||||
Append (New_Occurrence_Of (Index, Loc), Index_List);
|
||||
|
||||
return New_List (
|
||||
Make_Implicit_Loop_Statement (Nod,
|
||||
@ -874,7 +874,7 @@ package body Exp_Ch3 is
|
||||
Index :=
|
||||
Make_Defining_Identifier (Loc, New_External_Name ('J', N));
|
||||
|
||||
Append (New_Reference_To (Index, Loc), Index_List);
|
||||
Append (New_Occurrence_Of (Index, Loc), Index_List);
|
||||
|
||||
return New_List (
|
||||
Make_Implicit_Loop_Statement (Nod,
|
||||
@ -1019,7 +1019,7 @@ package body Exp_Ch3 is
|
||||
Expression =>
|
||||
Make_Function_Call (Loc,
|
||||
Name =>
|
||||
New_Reference_To (Enclosing_Func_Id, Loc),
|
||||
New_Occurrence_Of (Enclosing_Func_Id, Loc),
|
||||
Parameter_Associations =>
|
||||
Actuals_List));
|
||||
|
||||
@ -1027,7 +1027,7 @@ package body Exp_Ch3 is
|
||||
Return_Node :=
|
||||
Make_Simple_Return_Statement (Loc,
|
||||
Expression =>
|
||||
New_Reference_To (Standard_False, Loc));
|
||||
New_Occurrence_Of (Standard_False, Loc));
|
||||
end if;
|
||||
|
||||
Set_Statements (Case_Alt_Node, New_List (Return_Node));
|
||||
@ -1041,7 +1041,7 @@ package body Exp_Ch3 is
|
||||
Return_Node :=
|
||||
Make_Simple_Return_Statement (Loc,
|
||||
Expression =>
|
||||
New_Reference_To (Standard_True, Loc));
|
||||
New_Occurrence_Of (Standard_True, Loc));
|
||||
|
||||
Set_Statements (Case_Alt_Node, New_List (Return_Node));
|
||||
Append (Case_Alt_Node, Alt_List);
|
||||
@ -1079,7 +1079,7 @@ package body Exp_Ch3 is
|
||||
|
||||
Set_Parameter_Specifications (Spec_Node, Parameter_List);
|
||||
Set_Result_Definition (Spec_Node,
|
||||
New_Reference_To (Standard_Boolean, Loc));
|
||||
New_Occurrence_Of (Standard_Boolean, Loc));
|
||||
Set_Specification (Body_Node, Spec_Node);
|
||||
Set_Declarations (Body_Node, New_List);
|
||||
|
||||
@ -1229,7 +1229,7 @@ package body Exp_Ch3 is
|
||||
Make_Parameter_Specification (Loc,
|
||||
Defining_Identifier => Formal,
|
||||
Parameter_Type =>
|
||||
New_Reference_To (Formal_Type, Loc));
|
||||
New_Occurrence_Of (Formal_Type, Loc));
|
||||
Append (Param_Spec_Node, Parameter_List);
|
||||
Next_Discriminant (D);
|
||||
end loop;
|
||||
@ -1622,7 +1622,7 @@ package body Exp_Ch3 is
|
||||
if Nkind (Arg) = N_Identifier
|
||||
and then Ekind (Entity (Arg)) = E_Discriminant
|
||||
then
|
||||
Arg := New_Reference_To (Discriminal (Entity (Arg)), Loc);
|
||||
Arg := New_Occurrence_Of (Discriminal (Entity (Arg)), Loc);
|
||||
|
||||
-- Otherwise make a copy of the default expression. Note that
|
||||
-- we use the current Sloc for this, because we do not want the
|
||||
@ -1872,11 +1872,11 @@ package body Exp_Ch3 is
|
||||
Prefix =>
|
||||
New_Copy_Tree (Lhs, New_Scope => Proc_Id),
|
||||
Selector_Name =>
|
||||
New_Reference_To (First_Tag_Component (Typ), N_Loc)),
|
||||
New_Occurrence_Of (First_Tag_Component (Typ), N_Loc)),
|
||||
|
||||
Expression =>
|
||||
Unchecked_Convert_To (RTE (RE_Tag),
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Node
|
||||
(First_Elmt
|
||||
(Access_Disp_Table (Underlying_Type (Typ)))),
|
||||
@ -1937,7 +1937,7 @@ package body Exp_Ch3 is
|
||||
D_Loc := Sloc (D);
|
||||
Append_List_To (Statement_List,
|
||||
Build_Assignment (D,
|
||||
New_Reference_To (Discriminal (D), D_Loc)));
|
||||
New_Occurrence_Of (Discriminal (D), D_Loc)));
|
||||
end if;
|
||||
|
||||
Next_Discriminant (D);
|
||||
@ -1973,7 +1973,8 @@ package body Exp_Ch3 is
|
||||
|
||||
First_Arg :=
|
||||
OK_Convert_To (Parent_Type,
|
||||
New_Reference_To (Defining_Identifier (First (Parameters)), Loc));
|
||||
New_Occurrence_Of
|
||||
(Defining_Identifier (First (Parameters)), Loc));
|
||||
|
||||
Set_Etype (First_Arg, Parent_Type);
|
||||
|
||||
@ -2044,7 +2045,7 @@ package body Exp_Ch3 is
|
||||
and then Ekind (Entity (Arg)) = E_Discriminant
|
||||
then
|
||||
Append_To (Args,
|
||||
New_Reference_To (Discriminal (Entity (Arg)), Loc));
|
||||
New_Occurrence_Of (Discriminal (Entity (Arg)), Loc));
|
||||
|
||||
-- Case of access discriminants. We replace the reference
|
||||
-- to the type by a reference to the actual object.
|
||||
@ -2109,9 +2110,9 @@ package body Exp_Ch3 is
|
||||
Make_Defining_Identifier (Loc, Name_uO),
|
||||
In_Present => True,
|
||||
Parameter_Type =>
|
||||
New_Reference_To (RTE (RE_Address), Loc))));
|
||||
New_Occurrence_Of (RTE (RE_Address), Loc))));
|
||||
Set_Result_Definition (Spec_Node,
|
||||
New_Reference_To (RTE (RE_Storage_Offset), Loc));
|
||||
New_Occurrence_Of (RTE (RE_Storage_Offset), Loc));
|
||||
|
||||
-- Generate
|
||||
-- function Fxx (O : in Rec_Typ) return Storage_Offset is
|
||||
@ -2132,7 +2133,7 @@ package body Exp_Ch3 is
|
||||
Null_Exclusion_Present => False,
|
||||
Constant_Present => False,
|
||||
Subtype_Indication =>
|
||||
New_Reference_To (Rec_Type, Loc)))));
|
||||
New_Occurrence_Of (Rec_Type, Loc)))));
|
||||
|
||||
Set_Handled_Statement_Sequence (Body_Node,
|
||||
Make_Handled_Sequence_Of_Statements (Loc,
|
||||
@ -2146,7 +2147,7 @@ package body Exp_Ch3 is
|
||||
Unchecked_Convert_To (Acc_Type,
|
||||
Make_Identifier (Loc, Name_uO)),
|
||||
Selector_Name =>
|
||||
New_Reference_To (Iface_Comp, Loc)),
|
||||
New_Occurrence_Of (Iface_Comp, Loc)),
|
||||
Attribute_Name => Name_Position)))));
|
||||
|
||||
Set_Ekind (Func_Id, E_Function);
|
||||
@ -2252,9 +2253,9 @@ package body Exp_Ch3 is
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => Flag_Id,
|
||||
Object_Definition =>
|
||||
New_Reference_To (Standard_Boolean, Loc),
|
||||
New_Occurrence_Of (Standard_Boolean, Loc),
|
||||
Expression =>
|
||||
New_Reference_To (Standard_True, Loc));
|
||||
New_Occurrence_Of (Standard_True, Loc));
|
||||
|
||||
Analyze (Flag_Decl);
|
||||
Append_Freeze_Action (Rec_Type, Flag_Decl);
|
||||
@ -2282,9 +2283,9 @@ package body Exp_Ch3 is
|
||||
Append_To (Init_Tags_List,
|
||||
Make_Assignment_Statement (Loc,
|
||||
Name =>
|
||||
New_Reference_To (Flag_Id, Loc),
|
||||
New_Occurrence_Of (Flag_Id, Loc),
|
||||
Expression =>
|
||||
New_Reference_To (Standard_False, Loc)));
|
||||
New_Occurrence_Of (Standard_False, Loc)));
|
||||
|
||||
Append_To (Body_Stmts,
|
||||
Make_If_Statement (Loc,
|
||||
@ -2435,10 +2436,10 @@ package body Exp_Ch3 is
|
||||
Make_Selected_Component (Loc,
|
||||
Prefix => Make_Identifier (Loc, Name_uInit),
|
||||
Selector_Name =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(First_Tag_Component (Rec_Type), Loc)),
|
||||
Expression =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Node
|
||||
(First_Elmt (Access_Disp_Table (Rec_Type))), Loc)));
|
||||
|
||||
@ -2490,10 +2491,10 @@ package body Exp_Ch3 is
|
||||
Make_Selected_Component (Loc,
|
||||
Prefix => Make_Identifier (Loc, Name_uInit),
|
||||
Selector_Name =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(First_Tag_Component (Rec_Type), Loc)),
|
||||
Expression =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Node
|
||||
(First_Elmt (Access_Disp_Table (Rec_Type))), Loc)));
|
||||
|
||||
@ -2550,7 +2551,7 @@ package body Exp_Ch3 is
|
||||
|
||||
New_Nod :=
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
New_Reference_To (Init_DT, Loc));
|
||||
New_Occurrence_Of (Init_DT, Loc));
|
||||
Insert_After (Ins_Nod, New_Nod);
|
||||
|
||||
-- Update location of init tag statements
|
||||
@ -2623,11 +2624,11 @@ package body Exp_Ch3 is
|
||||
Statements => New_List (
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name =>
|
||||
New_Reference_To (Local_DF_Id, Loc),
|
||||
New_Occurrence_Of (Local_DF_Id, Loc),
|
||||
|
||||
Parameter_Associations => New_List (
|
||||
Make_Identifier (Loc, Name_uInit),
|
||||
New_Reference_To (Standard_False, Loc))),
|
||||
New_Occurrence_Of (Standard_False, Loc))),
|
||||
|
||||
Make_Raise_Statement (Loc)))));
|
||||
end;
|
||||
@ -2700,10 +2701,10 @@ package body Exp_Ch3 is
|
||||
|
||||
Append_To (Stmts,
|
||||
Make_Assignment_Statement (Loc,
|
||||
Name => New_Reference_To (Counter_Id, Loc),
|
||||
Name => New_Occurrence_Of (Counter_Id, Loc),
|
||||
Expression =>
|
||||
Make_Op_Add (Loc,
|
||||
Left_Opnd => New_Reference_To (Counter_Id, Loc),
|
||||
Left_Opnd => New_Occurrence_Of (Counter_Id, Loc),
|
||||
Right_Opnd => Make_Integer_Literal (Loc, 1))));
|
||||
end Increment_Counter;
|
||||
|
||||
@ -2730,7 +2731,7 @@ package body Exp_Ch3 is
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => Counter_Id,
|
||||
Object_Definition =>
|
||||
New_Reference_To (Standard_Integer, Loc),
|
||||
New_Occurrence_Of (Standard_Integer, Loc),
|
||||
Expression =>
|
||||
Make_Integer_Literal (Loc, 0)));
|
||||
end Make_Counter;
|
||||
@ -3043,7 +3044,7 @@ package body Exp_Ch3 is
|
||||
Append_To (Stmts,
|
||||
Make_Procedure_Call_Statement (Decl_Loc,
|
||||
Name =>
|
||||
New_Reference_To (RTE (
|
||||
New_Occurrence_Of (RTE (
|
||||
RE_Bind_Interrupt_To_Entry), Decl_Loc),
|
||||
Parameter_Associations => New_List (
|
||||
Make_Selected_Component (Decl_Loc,
|
||||
@ -3149,7 +3150,7 @@ package body Exp_Ch3 is
|
||||
Append_To (Stmts,
|
||||
Make_Case_Statement (Var_Loc,
|
||||
Expression =>
|
||||
New_Reference_To (Discriminal (
|
||||
New_Occurrence_Of (Discriminal (
|
||||
Entity (Name (Variant_Part (Comp_List)))), Var_Loc),
|
||||
Alternatives => Variant_Alts));
|
||||
end;
|
||||
@ -4063,38 +4064,38 @@ package body Exp_Ch3 is
|
||||
Defining_Identifier => Larray,
|
||||
Out_Present => True,
|
||||
Parameter_Type =>
|
||||
New_Reference_To (Base_Type (Typ), Loc)),
|
||||
New_Occurrence_Of (Base_Type (Typ), Loc)),
|
||||
|
||||
Make_Parameter_Specification (Loc,
|
||||
Defining_Identifier => Rarray,
|
||||
Parameter_Type =>
|
||||
New_Reference_To (Base_Type (Typ), Loc)),
|
||||
New_Occurrence_Of (Base_Type (Typ), Loc)),
|
||||
|
||||
Make_Parameter_Specification (Loc,
|
||||
Defining_Identifier => Left_Lo,
|
||||
Parameter_Type =>
|
||||
New_Reference_To (Index, Loc)),
|
||||
New_Occurrence_Of (Index, Loc)),
|
||||
|
||||
Make_Parameter_Specification (Loc,
|
||||
Defining_Identifier => Left_Hi,
|
||||
Parameter_Type =>
|
||||
New_Reference_To (Index, Loc)),
|
||||
New_Occurrence_Of (Index, Loc)),
|
||||
|
||||
Make_Parameter_Specification (Loc,
|
||||
Defining_Identifier => Right_Lo,
|
||||
Parameter_Type =>
|
||||
New_Reference_To (Index, Loc)),
|
||||
New_Occurrence_Of (Index, Loc)),
|
||||
|
||||
Make_Parameter_Specification (Loc,
|
||||
Defining_Identifier => Right_Hi,
|
||||
Parameter_Type =>
|
||||
New_Reference_To (Index, Loc)));
|
||||
New_Occurrence_Of (Index, Loc)));
|
||||
|
||||
Append_To (Formals,
|
||||
Make_Parameter_Specification (Loc,
|
||||
Defining_Identifier => Rev,
|
||||
Parameter_Type =>
|
||||
New_Reference_To (Standard_Boolean, Loc)));
|
||||
New_Occurrence_Of (Standard_Boolean, Loc)));
|
||||
|
||||
Spec :=
|
||||
Make_Procedure_Specification (Loc,
|
||||
@ -4340,7 +4341,7 @@ package body Exp_Ch3 is
|
||||
Make_Function_Specification (Loc,
|
||||
Defining_Unit_Name => F,
|
||||
Parameter_Specifications => Pspecs,
|
||||
Result_Definition => New_Reference_To (Standard_Boolean, Loc)),
|
||||
Result_Definition => New_Occurrence_Of (Standard_Boolean, Loc)),
|
||||
Declarations => New_List,
|
||||
Handled_Statement_Sequence =>
|
||||
Make_Handled_Sequence_Of_Statements (Loc, Statements => Stmts)));
|
||||
@ -4348,12 +4349,12 @@ package body Exp_Ch3 is
|
||||
Append_To (Pspecs,
|
||||
Make_Parameter_Specification (Loc,
|
||||
Defining_Identifier => X,
|
||||
Parameter_Type => New_Reference_To (Typ, Loc)));
|
||||
Parameter_Type => New_Occurrence_Of (Typ, Loc)));
|
||||
|
||||
Append_To (Pspecs,
|
||||
Make_Parameter_Specification (Loc,
|
||||
Defining_Identifier => Y,
|
||||
Parameter_Type => New_Reference_To (Typ, Loc)));
|
||||
Parameter_Type => New_Occurrence_Of (Typ, Loc)));
|
||||
|
||||
-- Unchecked_Unions require additional machinery to support equality.
|
||||
-- Two extra parameters (A and B) are added to the equality function
|
||||
@ -4386,12 +4387,14 @@ package body Exp_Ch3 is
|
||||
Append_To (Pspecs,
|
||||
Make_Parameter_Specification (Loc,
|
||||
Defining_Identifier => A,
|
||||
Parameter_Type => New_Reference_To (Discr_Type, Loc)));
|
||||
Parameter_Type =>
|
||||
New_Occurrence_Of (Discr_Type, Loc)));
|
||||
|
||||
Append_To (Pspecs,
|
||||
Make_Parameter_Specification (Loc,
|
||||
Defining_Identifier => B,
|
||||
Parameter_Type => New_Reference_To (Discr_Type, Loc)));
|
||||
Parameter_Type =>
|
||||
New_Occurrence_Of (Discr_Type, Loc)));
|
||||
|
||||
Append_Elmt (A, New_Discrs);
|
||||
|
||||
@ -4406,8 +4409,8 @@ package body Exp_Ch3 is
|
||||
Make_If_Statement (Loc,
|
||||
Condition =>
|
||||
Make_Op_Ne (Loc,
|
||||
Left_Opnd => New_Reference_To (A, Loc),
|
||||
Right_Opnd => New_Reference_To (B, Loc)),
|
||||
Left_Opnd => New_Occurrence_Of (A, Loc),
|
||||
Right_Opnd => New_Occurrence_Of (B, Loc)),
|
||||
Then_Statements => New_List (
|
||||
Make_Simple_Return_Statement (Loc,
|
||||
Expression =>
|
||||
@ -4437,7 +4440,7 @@ package body Exp_Ch3 is
|
||||
|
||||
Append_To (Stmts,
|
||||
Make_Simple_Return_Statement (Loc,
|
||||
Expression => New_Reference_To (Standard_True, Loc)));
|
||||
Expression => New_Occurrence_Of (Standard_True, Loc)));
|
||||
|
||||
Set_TSS (Typ, F);
|
||||
Set_Is_Pure (F);
|
||||
@ -4580,7 +4583,7 @@ package body Exp_Ch3 is
|
||||
Par_Subtype :=
|
||||
Process_Subtype (
|
||||
Make_Subtype_Indication (Loc,
|
||||
Subtype_Mark => New_Reference_To (Entity (Indic), Loc),
|
||||
Subtype_Mark => New_Occurrence_Of (Entity (Indic), Loc),
|
||||
Constraint =>
|
||||
Make_Index_Or_Discriminant_Constraint (Loc,
|
||||
Constraints => List_Constr)),
|
||||
@ -4600,7 +4603,7 @@ package body Exp_Ch3 is
|
||||
Component_Definition =>
|
||||
Make_Component_Definition (Loc,
|
||||
Aliased_Present => False,
|
||||
Subtype_Indication => New_Reference_To (Par_Subtype, Loc)));
|
||||
Subtype_Indication => New_Occurrence_Of (Par_Subtype, Loc)));
|
||||
|
||||
if Null_Present (Rec_Ext_Part) then
|
||||
Set_Component_List (Rec_Ext_Part,
|
||||
@ -5176,7 +5179,7 @@ package body Exp_Ch3 is
|
||||
-- address clause is applied to the object, causing it to get
|
||||
-- delayed freezing).
|
||||
|
||||
Id_Ref := New_Reference_To (Def_Id, Loc);
|
||||
Id_Ref := New_Occurrence_Of (Def_Id, Loc);
|
||||
Set_Must_Not_Freeze (Id_Ref);
|
||||
Set_Assignment_OK (Id_Ref);
|
||||
|
||||
@ -5393,7 +5396,7 @@ package body Exp_Ch3 is
|
||||
Make_Selected_Component (Loc,
|
||||
Prefix => New_Occurrence_Of (Obj_Id, Loc),
|
||||
Selector_Name =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Find_Interface_Tag (Expr_Typ, Iface), Loc));
|
||||
|
||||
-- Replace
|
||||
@ -5464,12 +5467,12 @@ package body Exp_Ch3 is
|
||||
|
||||
Tag_Comp :=
|
||||
Make_Function_Call (Loc,
|
||||
Name => New_Reference_To (RTE (RE_Displace), Loc),
|
||||
Name => New_Occurrence_Of (RTE (RE_Displace), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix => New_Occurrence_Of (Obj_Id, Loc),
|
||||
Attribute_Name => Name_Address),
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Node (First_Elmt (Access_Disp_Table (Iface))),
|
||||
Loc)));
|
||||
end if;
|
||||
@ -5591,7 +5594,7 @@ package body Exp_Ch3 is
|
||||
then
|
||||
Insert_Action_After (Init_After,
|
||||
Make_Adjust_Call (
|
||||
Obj_Ref => New_Reference_To (Def_Id, Loc),
|
||||
Obj_Ref => New_Occurrence_Of (Def_Id, Loc),
|
||||
Typ => Base_Typ));
|
||||
end if;
|
||||
|
||||
@ -5624,7 +5627,7 @@ package body Exp_Ch3 is
|
||||
Make_Selected_Component (Loc,
|
||||
Prefix => New_Occurrence_Of (Def_Id, Loc),
|
||||
Selector_Name =>
|
||||
New_Reference_To (First_Tag_Component (Full_Typ),
|
||||
New_Occurrence_Of (First_Tag_Component (Full_Typ),
|
||||
Loc));
|
||||
Set_Assignment_OK (New_Ref);
|
||||
|
||||
@ -5633,7 +5636,7 @@ package body Exp_Ch3 is
|
||||
Name => New_Ref,
|
||||
Expression =>
|
||||
Unchecked_Convert_To (RTE (RE_Tag),
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Node (First_Elmt (Access_Disp_Table (Full_Typ))),
|
||||
Loc))));
|
||||
end;
|
||||
@ -5648,7 +5651,7 @@ package body Exp_Ch3 is
|
||||
-- The call to the initialization procedure does NOT freeze the
|
||||
-- object being initialized.
|
||||
|
||||
Id_Ref := New_Reference_To (Def_Id, Loc);
|
||||
Id_Ref := New_Occurrence_Of (Def_Id, Loc);
|
||||
Set_Must_Not_Freeze (Id_Ref);
|
||||
Set_Assignment_OK (Id_Ref);
|
||||
|
||||
@ -5714,7 +5717,7 @@ package body Exp_Ch3 is
|
||||
declare
|
||||
Stat : constant Node_Id :=
|
||||
Make_Assignment_Statement (Loc,
|
||||
Name => New_Reference_To (Def_Id, Loc),
|
||||
Name => New_Occurrence_Of (Def_Id, Loc),
|
||||
Expression => Relocate_Node (Expr));
|
||||
begin
|
||||
Set_Expression (N, Empty);
|
||||
@ -5936,7 +5939,7 @@ package body Exp_Ch3 is
|
||||
Component_Definition =>
|
||||
Make_Component_Definition (Sloc_N,
|
||||
Aliased_Present => False,
|
||||
Subtype_Indication => New_Reference_To (RTE (RE_Tag), Sloc_N)));
|
||||
Subtype_Indication => New_Occurrence_Of (RTE (RE_Tag), Sloc_N)));
|
||||
|
||||
if Null_Present (Comp_List)
|
||||
or else Is_Empty_List (Component_Items (Comp_List))
|
||||
@ -6211,7 +6214,7 @@ package body Exp_Ch3 is
|
||||
Set_Has_Contiguous_Rep (Typ);
|
||||
Ent := First_Literal (Typ);
|
||||
Num := 1;
|
||||
Lst := New_List (New_Reference_To (Ent, Sloc (Ent)));
|
||||
Lst := New_List (New_Occurrence_Of (Ent, Sloc (Ent)));
|
||||
|
||||
else
|
||||
-- Build list of literal references
|
||||
@ -6221,7 +6224,7 @@ package body Exp_Ch3 is
|
||||
|
||||
Ent := First_Literal (Typ);
|
||||
while Present (Ent) loop
|
||||
Append_To (Lst, New_Reference_To (Ent, Sloc (Ent)));
|
||||
Append_To (Lst, New_Occurrence_Of (Ent, Sloc (Ent)));
|
||||
Num := Num + 1;
|
||||
Next_Literal (Ent);
|
||||
end loop;
|
||||
@ -6249,7 +6252,7 @@ package body Exp_Ch3 is
|
||||
Make_Constrained_Array_Definition (Loc,
|
||||
Discrete_Subtype_Definitions => New_List (
|
||||
Make_Subtype_Indication (Loc,
|
||||
Subtype_Mark => New_Reference_To (Standard_Natural, Loc),
|
||||
Subtype_Mark => New_Occurrence_Of (Standard_Natural, Loc),
|
||||
Constraint =>
|
||||
Make_Range_Constraint (Loc,
|
||||
Range_Expression =>
|
||||
@ -6262,7 +6265,7 @@ package body Exp_Ch3 is
|
||||
Component_Definition =>
|
||||
Make_Component_Definition (Loc,
|
||||
Aliased_Present => False,
|
||||
Subtype_Indication => New_Reference_To (Typ, Loc))),
|
||||
Subtype_Indication => New_Occurrence_Of (Typ, Loc))),
|
||||
|
||||
Expression =>
|
||||
Make_Aggregate (Loc,
|
||||
@ -6431,13 +6434,14 @@ package body Exp_Ch3 is
|
||||
Make_Parameter_Specification (Loc,
|
||||
Defining_Identifier =>
|
||||
Make_Defining_Identifier (Loc, Name_uA),
|
||||
Parameter_Type => New_Reference_To (Typ, Loc)),
|
||||
Parameter_Type => New_Occurrence_Of (Typ, Loc)),
|
||||
Make_Parameter_Specification (Loc,
|
||||
Defining_Identifier =>
|
||||
Make_Defining_Identifier (Loc, Name_uF),
|
||||
Parameter_Type => New_Reference_To (Standard_Boolean, Loc))),
|
||||
Parameter_Type =>
|
||||
New_Occurrence_Of (Standard_Boolean, Loc))),
|
||||
|
||||
Result_Definition => New_Reference_To (Standard_Integer, Loc)),
|
||||
Result_Definition => New_Occurrence_Of (Standard_Integer, Loc)),
|
||||
|
||||
Declarations => Empty_List,
|
||||
|
||||
@ -7018,10 +7022,10 @@ package body Exp_Ch3 is
|
||||
Insert_Action (Ins_Node,
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(RTE (RE_Set_Is_Heterogeneous), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
New_Reference_To (Fin_Mas_Id, Loc))));
|
||||
New_Occurrence_Of (Fin_Mas_Id, Loc))));
|
||||
end if;
|
||||
end if;
|
||||
|
||||
@ -7204,12 +7208,12 @@ package body Exp_Ch3 is
|
||||
else
|
||||
DT_Size :=
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix => New_Reference_To (Desig_Type, Loc),
|
||||
Prefix => New_Occurrence_Of (Desig_Type, Loc),
|
||||
Attribute_Name => Name_Max_Size_In_Storage_Elements);
|
||||
|
||||
DT_Align :=
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix => New_Reference_To (Desig_Type, Loc),
|
||||
Prefix => New_Occurrence_Of (Desig_Type, Loc),
|
||||
Attribute_Name => Name_Alignment);
|
||||
end if;
|
||||
|
||||
@ -7246,7 +7250,7 @@ package body Exp_Ch3 is
|
||||
Object_Definition =>
|
||||
Make_Subtype_Indication (Loc,
|
||||
Subtype_Mark =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(RTE (RE_Stack_Bounded_Pool), Loc),
|
||||
|
||||
Constraint =>
|
||||
@ -7255,7 +7259,7 @@ package body Exp_Ch3 is
|
||||
|
||||
-- First discriminant is the Pool Size
|
||||
|
||||
New_Reference_To (
|
||||
New_Occurrence_Of (
|
||||
Storage_Size_Variable (Def_Id), Loc),
|
||||
|
||||
-- Second discriminant is the element size
|
||||
@ -7331,9 +7335,9 @@ package body Exp_Ch3 is
|
||||
Condition =>
|
||||
Make_In (Loc,
|
||||
Left_Opnd =>
|
||||
New_Reference_To (Pool, Loc),
|
||||
New_Occurrence_Of (Pool, Loc),
|
||||
Right_Opnd =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Class_Wide_Type (RSPWS), Loc)),
|
||||
|
||||
Then_Statements => New_List (
|
||||
@ -7853,7 +7857,7 @@ package body Exp_Ch3 is
|
||||
Name => New_Occurrence_Of (Proc_Id, Loc),
|
||||
Parameter_Associations =>
|
||||
New_List
|
||||
(New_Reference_To (First_Formal (Inv_Id), Loc)));
|
||||
(New_Occurrence_Of (First_Formal (Inv_Id), Loc)));
|
||||
|
||||
begin
|
||||
|
||||
@ -7953,7 +7957,7 @@ package body Exp_Ch3 is
|
||||
Make_Defining_Identifier (Loc, Name_uInit),
|
||||
In_Present => True,
|
||||
Out_Present => True,
|
||||
Parameter_Type => New_Reference_To (Typ, Loc)));
|
||||
Parameter_Type => New_Occurrence_Of (Typ, Loc)));
|
||||
|
||||
-- For task record value, or type that contains tasks, add two more
|
||||
-- formals, _Master : Master_Id and _Chain : in out Activation_Chain
|
||||
@ -7967,7 +7971,7 @@ package body Exp_Ch3 is
|
||||
Defining_Identifier =>
|
||||
Make_Defining_Identifier (Loc, Name_uMaster),
|
||||
Parameter_Type =>
|
||||
New_Reference_To (RTE (RE_Master_Id), Loc)));
|
||||
New_Occurrence_Of (RTE (RE_Master_Id), Loc)));
|
||||
|
||||
-- Add _Chain (not done for sequential elaboration policy, see
|
||||
-- comment for Create_Restricted_Task_Sequential in s-tarest.ads).
|
||||
@ -7980,7 +7984,7 @@ package body Exp_Ch3 is
|
||||
In_Present => True,
|
||||
Out_Present => True,
|
||||
Parameter_Type =>
|
||||
New_Reference_To (RTE (RE_Activation_Chain), Loc)));
|
||||
New_Occurrence_Of (RTE (RE_Activation_Chain), Loc)));
|
||||
end if;
|
||||
|
||||
Append_To (Formals,
|
||||
@ -7988,7 +7992,7 @@ package body Exp_Ch3 is
|
||||
Defining_Identifier =>
|
||||
Make_Defining_Identifier (Loc, Name_uTask_Name),
|
||||
In_Present => True,
|
||||
Parameter_Type => New_Reference_To (Standard_String, Loc)));
|
||||
Parameter_Type => New_Occurrence_Of (Standard_String, Loc)));
|
||||
end if;
|
||||
|
||||
return Formals;
|
||||
@ -8048,9 +8052,9 @@ package body Exp_Ch3 is
|
||||
Name =>
|
||||
Make_Selected_Component (Loc,
|
||||
Prefix => New_Copy_Tree (Target),
|
||||
Selector_Name => New_Reference_To (Tag_Comp, Loc)),
|
||||
Selector_Name => New_Occurrence_Of (Tag_Comp, Loc)),
|
||||
Expression =>
|
||||
New_Reference_To (Iface_Tag, Loc)));
|
||||
New_Occurrence_Of (Iface_Tag, Loc)));
|
||||
end if;
|
||||
|
||||
Comp_Typ := Scope (Tag_Comp);
|
||||
@ -8083,7 +8087,7 @@ package body Exp_Ch3 is
|
||||
|
||||
Append_To (Stmts_List,
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name => New_Reference_To
|
||||
Name => New_Occurrence_Of
|
||||
(RTE (RE_Set_Dynamic_Offset_To_Top), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
Make_Attribute_Reference (Loc,
|
||||
@ -8091,7 +8095,7 @@ package body Exp_Ch3 is
|
||||
Attribute_Name => Name_Address),
|
||||
|
||||
Unchecked_Convert_To (RTE (RE_Tag),
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Node (First_Elmt (Access_Disp_Table (Iface))),
|
||||
Loc)),
|
||||
|
||||
@ -8102,12 +8106,12 @@ package body Exp_Ch3 is
|
||||
Make_Selected_Component (Loc,
|
||||
Prefix => New_Copy_Tree (Target),
|
||||
Selector_Name =>
|
||||
New_Reference_To (Tag_Comp, Loc)),
|
||||
New_Occurrence_Of (Tag_Comp, Loc)),
|
||||
Attribute_Name => Name_Position)),
|
||||
|
||||
Unchecked_Convert_To (RTE (RE_Offset_To_Top_Function_Ptr),
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix => New_Reference_To
|
||||
Prefix => New_Occurrence_Of
|
||||
(DT_Offset_To_Top_Func (Tag_Comp), Loc),
|
||||
Attribute_Name => Name_Address)))));
|
||||
|
||||
@ -8122,14 +8126,14 @@ package body Exp_Ch3 is
|
||||
Name =>
|
||||
Make_Selected_Component (Loc,
|
||||
Prefix => New_Copy_Tree (Target),
|
||||
Selector_Name => New_Reference_To
|
||||
Selector_Name => New_Occurrence_Of
|
||||
(Offset_To_Top_Comp, Loc)),
|
||||
Expression =>
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix =>
|
||||
Make_Selected_Component (Loc,
|
||||
Prefix => New_Copy_Tree (Target),
|
||||
Selector_Name => New_Reference_To (Tag_Comp, Loc)),
|
||||
Selector_Name => New_Occurrence_Of (Tag_Comp, Loc)),
|
||||
Attribute_Name => Name_Position)));
|
||||
|
||||
-- Normal case: No discriminants in the parent type
|
||||
@ -8141,7 +8145,7 @@ package body Exp_Ch3 is
|
||||
if not Is_Ancestor (Iface, Typ, Use_Full_View => True) then
|
||||
Append_To (Stmts_List,
|
||||
Build_Set_Static_Offset_To_Top (Loc,
|
||||
Iface_Tag => New_Reference_To (Iface_Tag, Loc),
|
||||
Iface_Tag => New_Occurrence_Of (Iface_Tag, Loc),
|
||||
Offset_Value =>
|
||||
Unchecked_Convert_To (RTE (RE_Storage_Offset),
|
||||
Make_Attribute_Reference (Loc,
|
||||
@ -8149,7 +8153,7 @@ package body Exp_Ch3 is
|
||||
Make_Selected_Component (Loc,
|
||||
Prefix => New_Copy_Tree (Target),
|
||||
Selector_Name =>
|
||||
New_Reference_To (Tag_Comp, Loc)),
|
||||
New_Occurrence_Of (Tag_Comp, Loc)),
|
||||
Attribute_Name => Name_Position))));
|
||||
end if;
|
||||
|
||||
@ -8164,7 +8168,7 @@ package body Exp_Ch3 is
|
||||
if RTE_Available (RE_Register_Interface_Offset) then
|
||||
Append_To (Stmts_List,
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name => New_Reference_To
|
||||
Name => New_Occurrence_Of
|
||||
(RTE (RE_Register_Interface_Offset), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
Make_Attribute_Reference (Loc,
|
||||
@ -8172,7 +8176,7 @@ package body Exp_Ch3 is
|
||||
Attribute_Name => Name_Address),
|
||||
|
||||
Unchecked_Convert_To (RTE (RE_Tag),
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Node (First_Elmt (Access_Disp_Table (Iface))), Loc)),
|
||||
|
||||
New_Occurrence_Of (Standard_True, Loc),
|
||||
@ -8184,7 +8188,7 @@ package body Exp_Ch3 is
|
||||
Make_Selected_Component (Loc,
|
||||
Prefix => New_Copy_Tree (Target),
|
||||
Selector_Name =>
|
||||
New_Reference_To (Tag_Comp, Loc)),
|
||||
New_Occurrence_Of (Tag_Comp, Loc)),
|
||||
Attribute_Name => Name_Position)),
|
||||
|
||||
Make_Null (Loc))));
|
||||
@ -8295,9 +8299,9 @@ package body Exp_Ch3 is
|
||||
Make_Selected_Component (Loc,
|
||||
Prefix => New_Copy_Tree (Target),
|
||||
Selector_Name =>
|
||||
New_Reference_To (Node (Iface_Comp_Elmt), Loc)),
|
||||
New_Occurrence_Of (Node (Iface_Comp_Elmt), Loc)),
|
||||
Expression =>
|
||||
New_Reference_To (Node (Iface_Tag_Elmt), Loc)));
|
||||
New_Occurrence_Of (Node (Iface_Tag_Elmt), Loc)));
|
||||
end if;
|
||||
|
||||
-- Otherwise generate code to initialize the tag
|
||||
@ -8417,7 +8421,7 @@ package body Exp_Ch3 is
|
||||
Null_Exclusion_Present =>
|
||||
Null_Exclusion_Present (Parent (Formal)),
|
||||
Parameter_Type =>
|
||||
New_Reference_To (Etype (Formal), Loc),
|
||||
New_Occurrence_Of (Etype (Formal), Loc),
|
||||
Expression =>
|
||||
New_Copy_Tree (Expression (Parent (Formal)))),
|
||||
Formal_List);
|
||||
@ -8433,7 +8437,7 @@ package body Exp_Ch3 is
|
||||
Chars => Chars (Subp)),
|
||||
Parameter_Specifications => Formal_List,
|
||||
Result_Definition =>
|
||||
New_Reference_To (Etype (Subp), Loc));
|
||||
New_Occurrence_Of (Etype (Subp), Loc));
|
||||
|
||||
Func_Decl := Make_Subprogram_Declaration (Loc, Func_Spec);
|
||||
Append_To (Decl_List, Func_Decl);
|
||||
@ -8463,12 +8467,12 @@ package body Exp_Ch3 is
|
||||
Subtype_Mark =>
|
||||
New_Occurrence_Of (Etype (Par_Formal), Loc),
|
||||
Expression =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Defining_Identifier (Formal_Node), Loc)));
|
||||
else
|
||||
Append_To
|
||||
(Actual_List,
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Defining_Identifier (Formal_Node), Loc));
|
||||
end if;
|
||||
|
||||
@ -8483,7 +8487,7 @@ package body Exp_Ch3 is
|
||||
Make_Extension_Aggregate (Loc,
|
||||
Ancestor_Part =>
|
||||
Make_Function_Call (Loc,
|
||||
Name => New_Reference_To (Alias (Subp), Loc),
|
||||
Name => New_Occurrence_Of (Alias (Subp), Loc),
|
||||
Parameter_Associations => Actual_List),
|
||||
Null_Record_Present => True));
|
||||
|
||||
@ -8542,12 +8546,12 @@ package body Exp_Ch3 is
|
||||
Make_Parameter_Specification (Loc,
|
||||
Defining_Identifier =>
|
||||
Make_Defining_Identifier (Loc, Name_X),
|
||||
Parameter_Type => New_Reference_To (Typ, Loc)),
|
||||
Parameter_Type => New_Occurrence_Of (Typ, Loc)),
|
||||
|
||||
Make_Parameter_Specification (Loc,
|
||||
Defining_Identifier =>
|
||||
Make_Defining_Identifier (Loc, Name_Y),
|
||||
Parameter_Type => New_Reference_To (Typ, Loc))),
|
||||
Parameter_Type => New_Occurrence_Of (Typ, Loc))),
|
||||
|
||||
Ret_Type => Standard_Boolean,
|
||||
For_Body => True);
|
||||
@ -8571,7 +8575,7 @@ package body Exp_Ch3 is
|
||||
Append_List_To (Stmts, Make_Eq_Case (Typ, Comps));
|
||||
Append_To (Stmts,
|
||||
Make_Simple_Return_Statement (Loc,
|
||||
Expression => New_Reference_To (Standard_True, Loc)));
|
||||
Expression => New_Occurrence_Of (Standard_True, Loc)));
|
||||
|
||||
else
|
||||
Append_To (Stmts,
|
||||
@ -8689,7 +8693,7 @@ package body Exp_Ch3 is
|
||||
Append_To (Result,
|
||||
Make_Case_Statement (Loc,
|
||||
Expression =>
|
||||
New_Reference_To (Corresponding_Formal (CL), Loc),
|
||||
New_Occurrence_Of (Corresponding_Formal (CL), Loc),
|
||||
Alternatives => Alt_List));
|
||||
|
||||
else
|
||||
@ -8747,7 +8751,7 @@ package body Exp_Ch3 is
|
||||
-- abstract.
|
||||
|
||||
-- Note also that in the following, we use Make_Identifier for
|
||||
-- the component names. Use of New_Reference_To to identify the
|
||||
-- the component names. Use of New_Occurrence_Of to identify the
|
||||
-- components would be incorrect because the wrong entities for
|
||||
-- discriminants could be picked up in the private type case.
|
||||
|
||||
@ -8898,12 +8902,12 @@ package body Exp_Ch3 is
|
||||
Make_Parameter_Specification (Loc,
|
||||
Defining_Identifier =>
|
||||
Make_Defining_Identifier (Loc, Chars (Left_Op)),
|
||||
Parameter_Type => New_Reference_To (Tag_Typ, Loc)),
|
||||
Parameter_Type => New_Occurrence_Of (Tag_Typ, Loc)),
|
||||
|
||||
Make_Parameter_Specification (Loc,
|
||||
Defining_Identifier =>
|
||||
Make_Defining_Identifier (Loc, Chars (Right_Op)),
|
||||
Parameter_Type => New_Reference_To (Tag_Typ, Loc))),
|
||||
Parameter_Type => New_Occurrence_Of (Tag_Typ, Loc))),
|
||||
|
||||
Ret_Type => Standard_Boolean,
|
||||
For_Body => True);
|
||||
@ -8946,7 +8950,7 @@ package body Exp_Ch3 is
|
||||
Expression =>
|
||||
Make_Op_Not (Loc,
|
||||
Make_Function_Call (Loc,
|
||||
Name => New_Reference_To (Target, Loc),
|
||||
Name => New_Occurrence_Of (Target, Loc),
|
||||
Parameter_Associations => New_List (
|
||||
Make_Identifier (Loc, Chars (Left_Op)),
|
||||
Make_Identifier (Loc, Chars (Right_Op)))))));
|
||||
@ -9097,7 +9101,7 @@ package body Exp_Ch3 is
|
||||
Profile => New_List (
|
||||
Make_Parameter_Specification (Loc,
|
||||
Defining_Identifier => Make_Defining_Identifier (Loc, Name_X),
|
||||
Parameter_Type => New_Reference_To (Tag_Typ, Loc))),
|
||||
Parameter_Type => New_Occurrence_Of (Tag_Typ, Loc))),
|
||||
|
||||
Ret_Type => Standard_Long_Long_Integer));
|
||||
|
||||
@ -9205,11 +9209,11 @@ package body Exp_Ch3 is
|
||||
Make_Parameter_Specification (Loc,
|
||||
Defining_Identifier =>
|
||||
Make_Defining_Identifier (Loc, Name_X),
|
||||
Parameter_Type => New_Reference_To (Tag_Typ, Loc)),
|
||||
Parameter_Type => New_Occurrence_Of (Tag_Typ, Loc)),
|
||||
Make_Parameter_Specification (Loc,
|
||||
Defining_Identifier =>
|
||||
Make_Defining_Identifier (Loc, Name_Y),
|
||||
Parameter_Type => New_Reference_To (Tag_Typ, Loc))),
|
||||
Parameter_Type => New_Occurrence_Of (Tag_Typ, Loc))),
|
||||
Ret_Type => Standard_Boolean);
|
||||
Append_To (Res, Eq_Spec);
|
||||
|
||||
@ -9250,11 +9254,11 @@ package body Exp_Ch3 is
|
||||
Make_Parameter_Specification (Loc,
|
||||
Defining_Identifier => Make_Defining_Identifier (Loc, Name_X),
|
||||
Out_Present => True,
|
||||
Parameter_Type => New_Reference_To (Tag_Typ, Loc)),
|
||||
Parameter_Type => New_Occurrence_Of (Tag_Typ, Loc)),
|
||||
|
||||
Make_Parameter_Specification (Loc,
|
||||
Defining_Identifier => Make_Defining_Identifier (Loc, Name_Y),
|
||||
Parameter_Type => New_Reference_To (Tag_Typ, Loc)))));
|
||||
Parameter_Type => New_Occurrence_Of (Tag_Typ, Loc)))));
|
||||
end if;
|
||||
|
||||
-- Ada 2005: Generate declarations for the following primitive
|
||||
@ -9478,7 +9482,7 @@ package body Exp_Ch3 is
|
||||
Defining_Identifier => Make_Defining_Identifier (Loc, Name_V),
|
||||
In_Present => True,
|
||||
Out_Present => True,
|
||||
Parameter_Type => New_Reference_To (Tag_Typ, Loc)));
|
||||
Parameter_Type => New_Occurrence_Of (Tag_Typ, Loc)));
|
||||
|
||||
-- F : Boolean := True
|
||||
|
||||
@ -9488,8 +9492,8 @@ package body Exp_Ch3 is
|
||||
Append_To (Formals,
|
||||
Make_Parameter_Specification (Loc,
|
||||
Defining_Identifier => Make_Defining_Identifier (Loc, Name_F),
|
||||
Parameter_Type => New_Reference_To (Standard_Boolean, Loc),
|
||||
Expression => New_Reference_To (Standard_True, Loc)));
|
||||
Parameter_Type => New_Occurrence_Of (Standard_Boolean, Loc),
|
||||
Expression => New_Occurrence_Of (Standard_True, Loc)));
|
||||
end if;
|
||||
|
||||
return
|
||||
@ -9544,7 +9548,7 @@ package body Exp_Ch3 is
|
||||
Make_Function_Specification (Loc,
|
||||
Defining_Unit_Name => Id,
|
||||
Parameter_Specifications => Profile,
|
||||
Result_Definition => New_Reference_To (Ret_Type, Loc));
|
||||
Result_Definition => New_Occurrence_Of (Ret_Type, Loc));
|
||||
end if;
|
||||
|
||||
if Is_Interface (Tag_Typ) then
|
||||
@ -9689,7 +9693,7 @@ package body Exp_Ch3 is
|
||||
Profile => New_List (
|
||||
Make_Parameter_Specification (Loc,
|
||||
Defining_Identifier => Make_Defining_Identifier (Loc, Name_X),
|
||||
Parameter_Type => New_Reference_To (Tag_Typ, Loc))),
|
||||
Parameter_Type => New_Occurrence_Of (Tag_Typ, Loc))),
|
||||
|
||||
Ret_Type => Standard_Long_Long_Integer,
|
||||
For_Body => True);
|
||||
@ -9814,11 +9818,11 @@ package body Exp_Ch3 is
|
||||
Make_Parameter_Specification (Loc,
|
||||
Defining_Identifier => Make_Defining_Identifier (Loc, Name_X),
|
||||
Out_Present => True,
|
||||
Parameter_Type => New_Reference_To (Tag_Typ, Loc)),
|
||||
Parameter_Type => New_Occurrence_Of (Tag_Typ, Loc)),
|
||||
|
||||
Make_Parameter_Specification (Loc,
|
||||
Defining_Identifier => Make_Defining_Identifier (Loc, Name_Y),
|
||||
Parameter_Type => New_Reference_To (Tag_Typ, Loc))),
|
||||
Parameter_Type => New_Occurrence_Of (Tag_Typ, Loc))),
|
||||
For_Body => True);
|
||||
|
||||
Set_Handled_Statement_Sequence (Decl,
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -793,7 +793,7 @@ package body Exp_Ch5 is
|
||||
|
||||
Rewrite (N,
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name => New_Reference_To (Proc, Loc),
|
||||
Name => New_Occurrence_Of (Proc, Loc),
|
||||
Parameter_Associations => Actuals));
|
||||
end;
|
||||
|
||||
@ -859,7 +859,7 @@ package body Exp_Ch5 is
|
||||
Expressions => New_List (
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(L_Index_Typ, Loc),
|
||||
Attribute_Name => Name_First))),
|
||||
Attribute_Name => Name_Address)),
|
||||
@ -874,7 +874,7 @@ package body Exp_Ch5 is
|
||||
Expressions => New_List (
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(R_Index_Typ, Loc),
|
||||
Attribute_Name => Name_First))),
|
||||
Attribute_Name => Name_Address)));
|
||||
@ -942,7 +942,7 @@ package body Exp_Ch5 is
|
||||
|
||||
Rewrite (N,
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name => New_Reference_To (Proc, Loc),
|
||||
Name => New_Occurrence_Of (Proc, Loc),
|
||||
Parameter_Associations => Actuals));
|
||||
end;
|
||||
|
||||
@ -1172,7 +1172,7 @@ package body Exp_Ch5 is
|
||||
Defining_Identifier => Lnn (J),
|
||||
Reverse_Present => Rev,
|
||||
Discrete_Subtype_Definition =>
|
||||
New_Reference_To (L_Index_Type (J), Loc))),
|
||||
New_Occurrence_Of (L_Index_Type (J), Loc))),
|
||||
|
||||
Statements => New_List (Assign, Build_Step (J))))));
|
||||
end loop;
|
||||
@ -1629,10 +1629,10 @@ package body Exp_Ch5 is
|
||||
|
||||
if Number_Entries (Conctyp) = 0 then
|
||||
RT_Subprg_Name :=
|
||||
New_Reference_To (RTE (RE_Set_Ceiling), Loc);
|
||||
New_Occurrence_Of (RTE (RE_Set_Ceiling), Loc);
|
||||
else
|
||||
RT_Subprg_Name :=
|
||||
New_Reference_To (RTE (RO_PE_Set_Ceiling), Loc);
|
||||
New_Occurrence_Of (RTE (RO_PE_Set_Ceiling), Loc);
|
||||
end if;
|
||||
|
||||
Call :=
|
||||
@ -2177,7 +2177,7 @@ package body Exp_Ch5 is
|
||||
|
||||
Append_To (L,
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name => New_Reference_To (Op, Loc),
|
||||
Name => New_Occurrence_Of (Op, Loc),
|
||||
Parameter_Associations => New_List (
|
||||
Node1 => Left_N,
|
||||
Node2 => Right_N)));
|
||||
@ -2727,8 +2727,8 @@ package body Exp_Ch5 is
|
||||
New_Occurrence_Of (Has_Element_Op, Loc),
|
||||
Parameter_Associations =>
|
||||
New_List
|
||||
(New_Reference_To (Container, Loc),
|
||||
New_Reference_To (Cursor, Loc)))),
|
||||
(New_Occurrence_Of (Container, Loc),
|
||||
New_Occurrence_Of (Cursor, Loc)))),
|
||||
Statements => Stats,
|
||||
End_Label => Empty);
|
||||
Rewrite (N, New_Loop);
|
||||
@ -3204,7 +3204,7 @@ package body Exp_Ch5 is
|
||||
Make_Object_Renaming_Declaration (Loc,
|
||||
Defining_Identifier => Id,
|
||||
Subtype_Mark =>
|
||||
New_Reference_To (Element_Type, Loc),
|
||||
New_Occurrence_Of (Element_Type, Loc),
|
||||
Name =>
|
||||
Make_Indexed_Component (Loc,
|
||||
Prefix => Relocate_Node (Container_Arg),
|
||||
@ -3296,10 +3296,10 @@ package body Exp_Ch5 is
|
||||
Make_Function_Call (Loc,
|
||||
Name =>
|
||||
Make_Selected_Component (Loc,
|
||||
Prefix => New_Reference_To (Iterator, Loc),
|
||||
Prefix => New_Occurrence_Of (Iterator, Loc),
|
||||
Selector_Name => Make_Identifier (Loc, Name_Step)),
|
||||
Parameter_Associations => New_List (
|
||||
New_Reference_To (Cursor, Loc)));
|
||||
New_Occurrence_Of (Cursor, Loc)));
|
||||
|
||||
Append_To (Stats,
|
||||
Make_Assignment_Statement (Loc,
|
||||
@ -3324,7 +3324,7 @@ package body Exp_Ch5 is
|
||||
New_Occurrence_Of (
|
||||
Next_Entity (First_Entity (Pack)), Loc),
|
||||
Parameter_Associations =>
|
||||
New_List (New_Reference_To (Cursor, Loc)))),
|
||||
New_List (New_Occurrence_Of (Cursor, Loc)))),
|
||||
|
||||
Statements => Stats,
|
||||
End_Label => Empty);
|
||||
@ -3364,7 +3364,7 @@ package body Exp_Ch5 is
|
||||
New_Occurrence_Of (Etype (Cursor), Loc),
|
||||
Expression =>
|
||||
Make_Selected_Component (Loc,
|
||||
Prefix => New_Reference_To (Iterator, Loc),
|
||||
Prefix => New_Occurrence_Of (Iterator, Loc),
|
||||
Selector_Name =>
|
||||
Make_Identifier (Loc, Name_Init)));
|
||||
|
||||
@ -3426,13 +3426,13 @@ package body Exp_Ch5 is
|
||||
Ind_Comp :=
|
||||
Make_Indexed_Component (Loc,
|
||||
Prefix => Relocate_Node (Array_Node),
|
||||
Expressions => New_List (New_Reference_To (Iterator, Loc)));
|
||||
Expressions => New_List (New_Occurrence_Of (Iterator, Loc)));
|
||||
|
||||
Prepend_To (Stats,
|
||||
Make_Object_Renaming_Declaration (Loc,
|
||||
Defining_Identifier => Id,
|
||||
Subtype_Mark =>
|
||||
New_Reference_To (Component_Type (Array_Typ), Loc),
|
||||
New_Occurrence_Of (Component_Type (Array_Typ), Loc),
|
||||
Name => Ind_Comp));
|
||||
|
||||
-- Mark the loop variable as needing debug info, so that expansion
|
||||
@ -3508,7 +3508,7 @@ package body Exp_Ch5 is
|
||||
-- the new iterator.
|
||||
|
||||
Prepend_To (Expressions (Ind_Comp),
|
||||
New_Reference_To (Iterator, Loc));
|
||||
New_Occurrence_Of (Iterator, Loc));
|
||||
end loop;
|
||||
end if;
|
||||
|
||||
@ -3631,16 +3631,16 @@ package body Exp_Ch5 is
|
||||
Left_Opnd =>
|
||||
Make_Integer_Literal (Loc,
|
||||
Enumeration_Rep (First_Literal (Btype))),
|
||||
Right_Opnd => New_Reference_To (New_Id, Loc)));
|
||||
Right_Opnd => New_Occurrence_Of (New_Id, Loc)));
|
||||
else
|
||||
-- Use the constructed array Enum_Pos_To_Rep
|
||||
|
||||
Expr :=
|
||||
Make_Indexed_Component (Loc,
|
||||
Prefix =>
|
||||
New_Reference_To (Enum_Pos_To_Rep (Btype), Loc),
|
||||
New_Occurrence_Of (Enum_Pos_To_Rep (Btype), Loc),
|
||||
Expressions =>
|
||||
New_List (New_Reference_To (New_Id, Loc)));
|
||||
New_List (New_Occurrence_Of (New_Id, Loc)));
|
||||
end if;
|
||||
|
||||
-- Build declaration for loop identifier
|
||||
@ -3650,7 +3650,7 @@ package body Exp_Ch5 is
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => Loop_Id,
|
||||
Constant_Present => True,
|
||||
Object_Definition => New_Reference_To (Ltype, Loc),
|
||||
Object_Definition => New_Occurrence_Of (Ltype, Loc),
|
||||
Expression => Expr));
|
||||
|
||||
Rewrite (N,
|
||||
@ -3668,7 +3668,7 @@ package body Exp_Ch5 is
|
||||
Make_Subtype_Indication (Loc,
|
||||
|
||||
Subtype_Mark =>
|
||||
New_Reference_To (Standard_Natural, Loc),
|
||||
New_Occurrence_Of (Standard_Natural, Loc),
|
||||
|
||||
Constraint =>
|
||||
Make_Range_Constraint (Loc,
|
||||
@ -3678,7 +3678,7 @@ package body Exp_Ch5 is
|
||||
Low_Bound =>
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix =>
|
||||
New_Reference_To (Btype, Loc),
|
||||
New_Occurrence_Of (Btype, Loc),
|
||||
|
||||
Attribute_Name => Name_Pos,
|
||||
|
||||
@ -3689,7 +3689,7 @@ package body Exp_Ch5 is
|
||||
High_Bound =>
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix =>
|
||||
New_Reference_To (Btype, Loc),
|
||||
New_Occurrence_Of (Btype, Loc),
|
||||
|
||||
Attribute_Name => Name_Pos,
|
||||
|
||||
@ -4087,12 +4087,12 @@ package body Exp_Ch5 is
|
||||
Append_To (Res,
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => Tag_Id,
|
||||
Object_Definition => New_Reference_To (RTE (RE_Tag), Loc),
|
||||
Object_Definition => New_Occurrence_Of (RTE (RE_Tag), Loc),
|
||||
Expression =>
|
||||
Make_Selected_Component (Loc,
|
||||
Prefix => Duplicate_Subexpr_No_Checks (L),
|
||||
Selector_Name =>
|
||||
New_Reference_To (First_Tag_Component (T), Loc))));
|
||||
New_Occurrence_Of (First_Tag_Component (T), Loc))));
|
||||
|
||||
-- Otherwise Tag_Id is not used
|
||||
|
||||
@ -4116,7 +4116,7 @@ package body Exp_Ch5 is
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => Prev_Id,
|
||||
Object_Definition =>
|
||||
New_Reference_To (RTE (RE_Root_Controlled_Ptr), Loc),
|
||||
New_Occurrence_Of (RTE (RE_Root_Controlled_Ptr), Loc),
|
||||
Expression =>
|
||||
Make_Selected_Component (Loc,
|
||||
Prefix =>
|
||||
@ -4132,7 +4132,7 @@ package body Exp_Ch5 is
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => Next_Id,
|
||||
Object_Definition =>
|
||||
New_Reference_To (RTE (RE_Root_Controlled_Ptr), Loc),
|
||||
New_Occurrence_Of (RTE (RE_Root_Controlled_Ptr), Loc),
|
||||
Expression =>
|
||||
Make_Selected_Component (Loc,
|
||||
Prefix =>
|
||||
@ -4163,8 +4163,8 @@ package body Exp_Ch5 is
|
||||
Make_Selected_Component (Loc,
|
||||
Prefix => Duplicate_Subexpr_No_Checks (L),
|
||||
Selector_Name =>
|
||||
New_Reference_To (First_Tag_Component (T), Loc)),
|
||||
Expression => New_Reference_To (Tag_Id, Loc)));
|
||||
New_Occurrence_Of (First_Tag_Component (T), Loc)),
|
||||
Expression => New_Occurrence_Of (Tag_Id, Loc)));
|
||||
end if;
|
||||
|
||||
-- Restore the Prev and Next fields on .NET/JVM
|
||||
@ -4184,7 +4184,7 @@ package body Exp_Ch5 is
|
||||
(RTE (RE_Root_Controlled), New_Copy_Tree (L)),
|
||||
Selector_Name =>
|
||||
Make_Identifier (Loc, Name_Prev)),
|
||||
Expression => New_Reference_To (Prev_Id, Loc)));
|
||||
Expression => New_Occurrence_Of (Prev_Id, Loc)));
|
||||
|
||||
-- Generate:
|
||||
-- Root_Controlled (L).Next := Next_Id;
|
||||
@ -4197,7 +4197,7 @@ package body Exp_Ch5 is
|
||||
Unchecked_Convert_To
|
||||
(RTE (RE_Root_Controlled), New_Copy_Tree (L)),
|
||||
Selector_Name => Make_Identifier (Loc, Name_Next)),
|
||||
Expression => New_Reference_To (Next_Id, Loc)));
|
||||
Expression => New_Occurrence_Of (Next_Id, Loc)));
|
||||
end if;
|
||||
|
||||
-- Adjust the target after the assignment when controlled (not in the
|
||||
|
@ -408,7 +408,7 @@ package body Exp_Ch6 is
|
||||
Actual :=
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix =>
|
||||
New_Reference_To (Finalization_Master (Ptr_Typ), Loc),
|
||||
New_Occurrence_Of (Finalization_Master (Ptr_Typ), Loc),
|
||||
Attribute_Name => Name_Unrestricted_Access);
|
||||
|
||||
-- Tagged types
|
||||
@ -515,7 +515,7 @@ package body Exp_Ch6 is
|
||||
-- the actual is an entity and requires an explicit reference.
|
||||
|
||||
elsif Nkind (Actual) = N_Defining_Identifier then
|
||||
Actual := New_Reference_To (Actual, Loc);
|
||||
Actual := New_Occurrence_Of (Actual, Loc);
|
||||
end if;
|
||||
|
||||
-- Locate the implicit master parameter in the called function
|
||||
@ -1154,7 +1154,7 @@ package body Exp_Ch6 is
|
||||
-- For IN parameter, all we do is to replace the actual
|
||||
|
||||
if Ekind (Formal) = E_In_Parameter then
|
||||
Rewrite (Actual, New_Reference_To (Temp, Loc));
|
||||
Rewrite (Actual, New_Occurrence_Of (Temp, Loc));
|
||||
Analyze (Actual);
|
||||
|
||||
-- Processing for OUT or IN OUT parameter
|
||||
@ -1178,7 +1178,7 @@ package body Exp_Ch6 is
|
||||
Expr := New_Occurrence_Of (Temp, Loc);
|
||||
end if;
|
||||
|
||||
Rewrite (Actual, New_Reference_To (Temp, Loc));
|
||||
Rewrite (Actual, New_Occurrence_Of (Temp, Loc));
|
||||
Analyze (Actual);
|
||||
|
||||
-- If the actual is a conversion of a packed reference, it may
|
||||
@ -1809,7 +1809,7 @@ package body Exp_Ch6 is
|
||||
if In_Open_Scopes (Entity (Actual)) then
|
||||
Rewrite (Actual,
|
||||
(Make_Function_Call (Loc,
|
||||
Name => New_Reference_To (RTE (RE_Self), Loc))));
|
||||
Name => New_Occurrence_Of (RTE (RE_Self), Loc))));
|
||||
Analyze (Actual);
|
||||
|
||||
-- A task type cannot otherwise appear as an actual
|
||||
@ -2555,7 +2555,7 @@ package body Exp_Ch6 is
|
||||
Rewrite (N,
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name =>
|
||||
New_Reference_To (Deep_Fin, Loc),
|
||||
New_Occurrence_Of (Deep_Fin, Loc),
|
||||
Parameter_Associations =>
|
||||
New_Copy_List_Tree (Parameter_Associations (N))));
|
||||
|
||||
@ -3418,8 +3418,8 @@ package body Exp_Ch6 is
|
||||
Make_Selected_Component (Loc,
|
||||
Prefix => New_Value (Param),
|
||||
Selector_Name =>
|
||||
New_Reference_To (First_Tag_Component (Typ),
|
||||
Loc)),
|
||||
New_Occurrence_Of
|
||||
(First_Tag_Component (Typ), Loc)),
|
||||
|
||||
Right_Opnd =>
|
||||
Make_Selected_Component (Loc,
|
||||
@ -3427,7 +3427,7 @@ package body Exp_Ch6 is
|
||||
Unchecked_Convert_To (Typ,
|
||||
New_Value (Next_Actual (Param))),
|
||||
Selector_Name =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(First_Tag_Component (Typ), Loc))),
|
||||
Right_Opnd => Prev_Call);
|
||||
|
||||
@ -4248,7 +4248,7 @@ package body Exp_Ch6 is
|
||||
begin
|
||||
if No (Exit_Lab) then
|
||||
Lab_Ent := Make_Temporary (Loc, 'L');
|
||||
Lab_Id := New_Reference_To (Lab_Ent, Loc);
|
||||
Lab_Id := New_Occurrence_Of (Lab_Ent, Loc);
|
||||
Exit_Lab := Make_Label (Loc, Lab_Id);
|
||||
Lab_Decl :=
|
||||
Make_Implicit_Label_Declaration (Loc,
|
||||
@ -5172,7 +5172,7 @@ package body Exp_Ch6 is
|
||||
|
||||
Remove (First (Parameter_Associations (Blk_Call_Stmt)));
|
||||
Prepend_To (Parameter_Associations (Blk_Call_Stmt),
|
||||
New_Reference_To (Targ, Loc));
|
||||
New_Occurrence_Of (Targ, Loc));
|
||||
end;
|
||||
|
||||
-- Remove the return statement
|
||||
@ -5432,17 +5432,17 @@ package body Exp_Ch6 is
|
||||
Make_Object_Renaming_Declaration (Loc,
|
||||
Defining_Identifier => Pool_Id,
|
||||
Subtype_Mark =>
|
||||
New_Reference_To (RTE (RE_Root_Storage_Pool), Loc),
|
||||
New_Occurrence_Of (RTE (RE_Root_Storage_Pool), Loc),
|
||||
Name =>
|
||||
Make_Explicit_Dereference (Loc,
|
||||
Prefix =>
|
||||
Make_Function_Call (Loc,
|
||||
Name =>
|
||||
New_Reference_To (RTE (RE_Base_Pool), Loc),
|
||||
New_Occurrence_Of (RTE (RE_Base_Pool), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
Make_Explicit_Dereference (Loc,
|
||||
Prefix =>
|
||||
New_Reference_To (Fin_Mas_Id, Loc)))))));
|
||||
New_Occurrence_Of (Fin_Mas_Id, Loc)))))));
|
||||
|
||||
-- Create an access type which uses the storage pool of the
|
||||
-- caller's master. This additional type is necessary because
|
||||
@ -5472,7 +5472,7 @@ package body Exp_Ch6 is
|
||||
Type_Definition =>
|
||||
Make_Access_To_Object_Definition (Loc,
|
||||
Subtype_Indication =>
|
||||
New_Reference_To (Desig_Typ, Loc))));
|
||||
New_Occurrence_Of (Desig_Typ, Loc))));
|
||||
|
||||
-- Perform minor decoration in order to set the master and the
|
||||
-- storage pool attributes.
|
||||
@ -5490,14 +5490,14 @@ package body Exp_Ch6 is
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => Local_Id,
|
||||
Object_Definition =>
|
||||
New_Reference_To (Ptr_Typ, Loc)));
|
||||
New_Occurrence_Of (Ptr_Typ, Loc)));
|
||||
|
||||
-- Allocate the object, generate:
|
||||
-- Local_Id := <Alloc_Expr>;
|
||||
|
||||
Append_To (Stmts,
|
||||
Make_Assignment_Statement (Loc,
|
||||
Name => New_Reference_To (Local_Id, Loc),
|
||||
Name => New_Occurrence_Of (Local_Id, Loc),
|
||||
Expression => Alloc_Expr));
|
||||
|
||||
-- Generate:
|
||||
@ -5505,10 +5505,10 @@ package body Exp_Ch6 is
|
||||
|
||||
Append_To (Stmts,
|
||||
Make_Assignment_Statement (Loc,
|
||||
Name => New_Reference_To (Temp_Id, Loc),
|
||||
Name => New_Occurrence_Of (Temp_Id, Loc),
|
||||
Expression =>
|
||||
Unchecked_Convert_To (Temp_Typ,
|
||||
New_Reference_To (Local_Id, Loc))));
|
||||
New_Occurrence_Of (Local_Id, Loc))));
|
||||
|
||||
-- Wrap the allocation in a block. This is further conditioned
|
||||
-- by checking the caller finalization master at runtime. A
|
||||
@ -5528,7 +5528,7 @@ package body Exp_Ch6 is
|
||||
Make_If_Statement (Loc,
|
||||
Condition =>
|
||||
Make_Op_Ne (Loc,
|
||||
Left_Opnd => New_Reference_To (Fin_Mas_Id, Loc),
|
||||
Left_Opnd => New_Occurrence_Of (Fin_Mas_Id, Loc),
|
||||
Right_Opnd => Make_Null (Loc)),
|
||||
|
||||
Then_Statements => New_List (
|
||||
@ -5545,7 +5545,7 @@ package body Exp_Ch6 is
|
||||
else
|
||||
return
|
||||
Make_Assignment_Statement (Loc,
|
||||
Name => New_Reference_To (Temp_Id, Loc),
|
||||
Name => New_Occurrence_Of (Temp_Id, Loc),
|
||||
Expression => Alloc_Expr);
|
||||
end if;
|
||||
end Build_Heap_Allocator;
|
||||
@ -5559,7 +5559,7 @@ package body Exp_Ch6 is
|
||||
return
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name =>
|
||||
New_Reference_To (RTE (RE_Move_Activation_Chain), Loc),
|
||||
New_Occurrence_Of (RTE (RE_Move_Activation_Chain), Loc),
|
||||
|
||||
Parameter_Associations => New_List (
|
||||
|
||||
@ -5571,12 +5571,12 @@ package body Exp_Ch6 is
|
||||
|
||||
-- Destination chain
|
||||
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Build_In_Place_Formal (Par_Func, BIP_Activation_Chain), Loc),
|
||||
|
||||
-- New master
|
||||
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Build_In_Place_Formal (Par_Func, BIP_Task_Master), Loc)));
|
||||
end Move_Activation_Chain;
|
||||
|
||||
@ -5633,8 +5633,9 @@ package body Exp_Ch6 is
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => Flag_Id,
|
||||
Object_Definition =>
|
||||
New_Reference_To (Standard_Boolean, Loc),
|
||||
Expression => New_Reference_To (Standard_False, Loc));
|
||||
New_Occurrence_Of (Standard_Boolean, Loc),
|
||||
Expression =>
|
||||
New_Occurrence_Of (Standard_False, Loc));
|
||||
|
||||
Prepend_To (Declarations (Func_Bod), Flag_Decl);
|
||||
Analyze (Flag_Decl);
|
||||
@ -5710,8 +5711,8 @@ package body Exp_Ch6 is
|
||||
|
||||
Append_To (Stmts,
|
||||
Make_Assignment_Statement (Loc,
|
||||
Name => New_Reference_To (Flag_Id, Loc),
|
||||
Expression => New_Reference_To (Standard_True, Loc)));
|
||||
Name => New_Occurrence_Of (Flag_Id, Loc),
|
||||
Expression => New_Occurrence_Of (Standard_True, Loc)));
|
||||
end;
|
||||
end if;
|
||||
|
||||
@ -5829,7 +5830,7 @@ package body Exp_Ch6 is
|
||||
then
|
||||
Init_Assignment :=
|
||||
Make_Assignment_Statement (Loc,
|
||||
Name => New_Reference_To (Return_Obj_Id, Loc),
|
||||
Name => New_Occurrence_Of (Return_Obj_Id, Loc),
|
||||
Expression => Relocate_Node (Return_Obj_Expr));
|
||||
|
||||
Set_Etype (Name (Init_Assignment), Etype (Return_Obj_Id));
|
||||
@ -5924,7 +5925,7 @@ package body Exp_Ch6 is
|
||||
Make_Access_To_Object_Definition (Loc,
|
||||
All_Present => True,
|
||||
Subtype_Indication =>
|
||||
New_Reference_To (Return_Obj_Typ, Loc)));
|
||||
New_Occurrence_Of (Return_Obj_Typ, Loc)));
|
||||
|
||||
Insert_Before (Ret_Obj_Decl, Ptr_Type_Decl);
|
||||
|
||||
@ -5940,7 +5941,7 @@ package body Exp_Ch6 is
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => Alloc_Obj_Id,
|
||||
Object_Definition =>
|
||||
New_Reference_To (Ref_Type, Loc));
|
||||
New_Occurrence_Of (Ref_Type, Loc));
|
||||
|
||||
Insert_Before (Ret_Obj_Decl, Alloc_Obj_Decl);
|
||||
|
||||
@ -5964,7 +5965,7 @@ package body Exp_Ch6 is
|
||||
Expression =>
|
||||
Make_Qualified_Expression (Loc,
|
||||
Subtype_Mark =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Etype (Return_Obj_Expr), Loc),
|
||||
Expression =>
|
||||
New_Copy_Tree (Return_Obj_Expr)));
|
||||
@ -5979,13 +5980,13 @@ package body Exp_Ch6 is
|
||||
Heap_Allocator :=
|
||||
Make_Allocator (Loc,
|
||||
Expression =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Etype (Return_Obj_Expr), Loc));
|
||||
else
|
||||
Heap_Allocator :=
|
||||
Make_Allocator (Loc,
|
||||
Expression =>
|
||||
New_Reference_To (Return_Obj_Typ, Loc));
|
||||
New_Occurrence_Of (Return_Obj_Typ, Loc));
|
||||
end if;
|
||||
|
||||
-- If the object requires default initialization then
|
||||
@ -6013,11 +6014,11 @@ package body Exp_Ch6 is
|
||||
Make_Object_Renaming_Declaration (Loc,
|
||||
Defining_Identifier => Pool_Id,
|
||||
Subtype_Mark =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(RTE (RE_Root_Storage_Pool), Loc),
|
||||
Name =>
|
||||
Make_Explicit_Dereference (Loc,
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Build_In_Place_Formal
|
||||
(Par_Func, BIP_Storage_Pool), Loc)));
|
||||
Set_Storage_Pool (Pool_Allocator, Pool_Id);
|
||||
@ -6104,7 +6105,7 @@ package body Exp_Ch6 is
|
||||
Condition =>
|
||||
Make_Op_Eq (Loc,
|
||||
Left_Opnd =>
|
||||
New_Reference_To (Obj_Alloc_Formal, Loc),
|
||||
New_Occurrence_Of (Obj_Alloc_Formal, Loc),
|
||||
Right_Opnd =>
|
||||
Make_Integer_Literal (Loc,
|
||||
UI_From_Int (BIP_Allocation_Form'Pos
|
||||
@ -6113,20 +6114,20 @@ package body Exp_Ch6 is
|
||||
Then_Statements => New_List (
|
||||
Make_Assignment_Statement (Loc,
|
||||
Name =>
|
||||
New_Reference_To (Alloc_Obj_Id, Loc),
|
||||
New_Occurrence_Of (Alloc_Obj_Id, Loc),
|
||||
Expression =>
|
||||
Make_Unchecked_Type_Conversion (Loc,
|
||||
Subtype_Mark =>
|
||||
New_Reference_To (Ref_Type, Loc),
|
||||
New_Occurrence_Of (Ref_Type, Loc),
|
||||
Expression =>
|
||||
New_Reference_To (Object_Access, Loc)))),
|
||||
New_Occurrence_Of (Object_Access, Loc)))),
|
||||
|
||||
Elsif_Parts => New_List (
|
||||
Make_Elsif_Part (Loc,
|
||||
Condition =>
|
||||
Make_Op_Eq (Loc,
|
||||
Left_Opnd =>
|
||||
New_Reference_To (Obj_Alloc_Formal, Loc),
|
||||
New_Occurrence_Of (Obj_Alloc_Formal, Loc),
|
||||
Right_Opnd =>
|
||||
Make_Integer_Literal (Loc,
|
||||
UI_From_Int (BIP_Allocation_Form'Pos
|
||||
@ -6135,14 +6136,14 @@ package body Exp_Ch6 is
|
||||
Then_Statements => New_List (
|
||||
Make_Assignment_Statement (Loc,
|
||||
Name =>
|
||||
New_Reference_To (Alloc_Obj_Id, Loc),
|
||||
New_Occurrence_Of (Alloc_Obj_Id, Loc),
|
||||
Expression => SS_Allocator))),
|
||||
|
||||
Make_Elsif_Part (Loc,
|
||||
Condition =>
|
||||
Make_Op_Eq (Loc,
|
||||
Left_Opnd =>
|
||||
New_Reference_To (Obj_Alloc_Formal, Loc),
|
||||
New_Occurrence_Of (Obj_Alloc_Formal, Loc),
|
||||
Right_Opnd =>
|
||||
Make_Integer_Literal (Loc,
|
||||
UI_From_Int (BIP_Allocation_Form'Pos
|
||||
@ -6176,7 +6177,7 @@ package body Exp_Ch6 is
|
||||
if Present (Init_Assignment) then
|
||||
Rewrite (Name (Init_Assignment),
|
||||
Make_Explicit_Dereference (Loc,
|
||||
Prefix => New_Reference_To (Alloc_Obj_Id, Loc)));
|
||||
Prefix => New_Occurrence_Of (Alloc_Obj_Id, Loc)));
|
||||
|
||||
Set_Etype
|
||||
(Name (Init_Assignment), Etype (Return_Obj_Id));
|
||||
@ -6200,7 +6201,7 @@ package body Exp_Ch6 is
|
||||
|
||||
Obj_Acc_Deref :=
|
||||
Make_Explicit_Dereference (Loc,
|
||||
Prefix => New_Reference_To (Object_Access, Loc));
|
||||
Prefix => New_Occurrence_Of (Object_Access, Loc));
|
||||
|
||||
Rewrite (Ret_Obj_Decl,
|
||||
Make_Object_Renaming_Declaration (Loc,
|
||||
@ -6420,7 +6421,8 @@ package body Exp_Ch6 is
|
||||
Insert_Action (Rtn,
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name =>
|
||||
New_Reference_To (Postcondition_Proc (Spec_Id), Loc)));
|
||||
New_Occurrence_Of
|
||||
(Postcondition_Proc (Spec_Id), Loc)));
|
||||
end if;
|
||||
end;
|
||||
end if;
|
||||
@ -6882,7 +6884,7 @@ package body Exp_Ch6 is
|
||||
pragma Assert (Present (Postcondition_Proc (Scope_Id)));
|
||||
Insert_Action (N,
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name => New_Reference_To (Postcondition_Proc (Scope_Id), Loc)));
|
||||
Name => New_Occurrence_Of (Postcondition_Proc (Scope_Id), Loc)));
|
||||
end if;
|
||||
|
||||
-- If it is a return from a procedure do no extra steps
|
||||
@ -6924,7 +6926,7 @@ package body Exp_Ch6 is
|
||||
|
||||
Call :=
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name => New_Reference_To (RTE (RE_Complete_Rendezvous), Loc));
|
||||
Name => New_Occurrence_Of (RTE (RE_Complete_Rendezvous), Loc));
|
||||
Insert_Before (N, Call);
|
||||
-- why not insert actions here???
|
||||
Analyze (Call);
|
||||
@ -6953,11 +6955,11 @@ package body Exp_Ch6 is
|
||||
Call :=
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name =>
|
||||
New_Reference_To (RTE (RE_Complete_Entry_Body), Loc),
|
||||
New_Occurrence_Of (RTE (RE_Complete_Entry_Body), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Find_Protection_Object (Current_Scope), Loc),
|
||||
Attribute_Name => Name_Unchecked_Access)));
|
||||
|
||||
@ -7043,7 +7045,7 @@ package body Exp_Ch6 is
|
||||
Type_Definition =>
|
||||
Make_Access_To_Object_Definition (Loc,
|
||||
Subtype_Indication =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Corresponding_Record_Type (Scop), Loc))));
|
||||
|
||||
Insert_Actions (N, Decls);
|
||||
@ -7432,7 +7434,7 @@ package body Exp_Ch6 is
|
||||
Make_Allocator (Loc,
|
||||
Expression =>
|
||||
Make_Qualified_Expression (Loc,
|
||||
Subtype_Mark => New_Reference_To (Etype (Exp), Loc),
|
||||
Subtype_Mark => New_Occurrence_Of (Etype (Exp), Loc),
|
||||
Expression => Relocate_Node (Exp)));
|
||||
|
||||
-- We do not want discriminant checks on the declaration,
|
||||
@ -7451,12 +7453,12 @@ package body Exp_Ch6 is
|
||||
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => Temp,
|
||||
Object_Definition => New_Reference_To (Acc_Typ, Loc),
|
||||
Object_Definition => New_Occurrence_Of (Acc_Typ, Loc),
|
||||
Expression => Alloc_Node)));
|
||||
|
||||
Rewrite (Exp,
|
||||
Make_Explicit_Dereference (Loc,
|
||||
Prefix => New_Reference_To (Temp, Loc)));
|
||||
Prefix => New_Occurrence_Of (Temp, Loc)));
|
||||
|
||||
-- Ada 2005 (AI-251): If the type of the returned object is
|
||||
-- an interface then add an implicit type conversion to force
|
||||
@ -7532,12 +7534,12 @@ package body Exp_Ch6 is
|
||||
Result_Id : constant Entity_Id :=
|
||||
Make_Temporary (Loc, 'R', ExpR);
|
||||
Result_Exp : constant Node_Id :=
|
||||
New_Reference_To (Result_Id, Loc);
|
||||
New_Occurrence_Of (Result_Id, Loc);
|
||||
Result_Obj : constant Node_Id :=
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => Result_Id,
|
||||
Object_Definition =>
|
||||
New_Reference_To (R_Type, Loc),
|
||||
New_Occurrence_Of (R_Type, Loc),
|
||||
Constant_Present => True,
|
||||
Expression => ExpR);
|
||||
|
||||
@ -7597,7 +7599,7 @@ package body Exp_Ch6 is
|
||||
Unchecked_Convert_To (RTE (RE_Tag_Ptr),
|
||||
Make_Function_Call (Loc,
|
||||
Name =>
|
||||
New_Reference_To (RTE (RE_Base_Address), Loc),
|
||||
New_Occurrence_Of (RTE (RE_Base_Address), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
Unchecked_Convert_To (RTE (RE_Address),
|
||||
Duplicate_Subexpr (Prefix (Exp)))))));
|
||||
@ -8396,7 +8398,7 @@ package body Exp_Ch6 is
|
||||
Append_Enabled_Item
|
||||
(Item =>
|
||||
Make_Predicate_Check
|
||||
(Typ, New_Reference_To (Formal, Loc)),
|
||||
(Typ, New_Occurrence_Of (Formal, Loc)),
|
||||
List => Stmts);
|
||||
end if;
|
||||
end if;
|
||||
@ -8520,7 +8522,7 @@ package body Exp_Ch6 is
|
||||
Make_Parameter_Specification (Loc,
|
||||
Defining_Identifier => Result,
|
||||
Parameter_Type =>
|
||||
New_Reference_To (Etype (Result), Loc)));
|
||||
New_Occurrence_Of (Etype (Result), Loc)));
|
||||
end if;
|
||||
|
||||
-- Insert _Postconditions before the first source declaration of the
|
||||
@ -9268,24 +9270,24 @@ package body Exp_Ch6 is
|
||||
|
||||
Build_Set_Predefined_Prim_Op_Address (Loc,
|
||||
Tag_Node =>
|
||||
New_Reference_To (Node (Next_Elmt (Iface_DT_Ptr)), Loc),
|
||||
New_Occurrence_Of (Node (Next_Elmt (Iface_DT_Ptr)), Loc),
|
||||
Position => DT_Position (Prim),
|
||||
Address_Node =>
|
||||
Unchecked_Convert_To (RTE (RE_Prim_Ptr),
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix => New_Reference_To (Thunk_Id, Loc),
|
||||
Prefix => New_Occurrence_Of (Thunk_Id, Loc),
|
||||
Attribute_Name => Name_Unrestricted_Access))),
|
||||
|
||||
Build_Set_Predefined_Prim_Op_Address (Loc,
|
||||
Tag_Node =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Node (Next_Elmt (Next_Elmt (Next_Elmt (Iface_DT_Ptr)))),
|
||||
Loc),
|
||||
Position => DT_Position (Prim),
|
||||
Address_Node =>
|
||||
Unchecked_Convert_To (RTE (RE_Prim_Ptr),
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix => New_Reference_To (Prim, Loc),
|
||||
Prefix => New_Occurrence_Of (Prim, Loc),
|
||||
Attribute_Name => Name_Unrestricted_Access)))));
|
||||
end if;
|
||||
|
||||
@ -9542,7 +9544,7 @@ package body Exp_Ch6 is
|
||||
|
||||
New_Allocator :=
|
||||
Make_Allocator (Loc,
|
||||
Expression => New_Reference_To (Result_Subt, Loc));
|
||||
Expression => New_Occurrence_Of (Result_Subt, Loc));
|
||||
Set_No_Initialization (New_Allocator);
|
||||
|
||||
-- Copy attributes to new allocator. Note that the new allocator
|
||||
@ -9567,7 +9569,7 @@ package body Exp_Ch6 is
|
||||
Insert_Action (Allocator,
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => Return_Obj_Access,
|
||||
Object_Definition => New_Reference_To (Acc_Type, Loc),
|
||||
Object_Definition => New_Occurrence_Of (Acc_Type, Loc),
|
||||
Expression => Relocate_Node (Allocator)));
|
||||
|
||||
-- When the function has a controlling result, an allocation-form
|
||||
@ -9594,10 +9596,10 @@ package body Exp_Ch6 is
|
||||
(Func_Call,
|
||||
Function_Id,
|
||||
Make_Unchecked_Type_Conversion (Loc,
|
||||
Subtype_Mark => New_Reference_To (Result_Subt, Loc),
|
||||
Subtype_Mark => New_Occurrence_Of (Result_Subt, Loc),
|
||||
Expression =>
|
||||
Make_Explicit_Dereference (Loc,
|
||||
Prefix => New_Reference_To (Return_Obj_Access, Loc))));
|
||||
Prefix => New_Occurrence_Of (Return_Obj_Access, Loc))));
|
||||
|
||||
-- When the result subtype is unconstrained, the function itself must
|
||||
-- perform the allocation of the return object, so we pass parameters
|
||||
@ -9620,7 +9622,7 @@ package body Exp_Ch6 is
|
||||
Pool_Actual =>
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Associated_Storage_Pool (Acc_Type), Loc),
|
||||
Attribute_Name => Name_Unrestricted_Access));
|
||||
|
||||
@ -9768,13 +9770,13 @@ package body Exp_Ch6 is
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => Temp_Id,
|
||||
Object_Definition =>
|
||||
New_Reference_To (Result_Subt, Loc),
|
||||
New_Occurrence_Of (Result_Subt, Loc),
|
||||
Expression =>
|
||||
New_Copy_Tree (Function_Call));
|
||||
|
||||
Insert_Action (Function_Call, Temp_Decl);
|
||||
|
||||
Rewrite (Function_Call, New_Reference_To (Temp_Id, Loc));
|
||||
Rewrite (Function_Call, New_Occurrence_Of (Temp_Id, Loc));
|
||||
Analyze (Function_Call);
|
||||
end;
|
||||
|
||||
@ -9792,7 +9794,7 @@ package body Exp_Ch6 is
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => Return_Obj_Id,
|
||||
Aliased_Present => True,
|
||||
Object_Definition => New_Reference_To (Result_Subt, Loc));
|
||||
Object_Definition => New_Occurrence_Of (Result_Subt, Loc));
|
||||
|
||||
Set_No_Initialization (Return_Obj_Decl);
|
||||
|
||||
@ -9817,7 +9819,7 @@ package body Exp_Ch6 is
|
||||
-- to the caller's return object.
|
||||
|
||||
Add_Access_Actual_To_Build_In_Place_Call
|
||||
(Func_Call, Function_Id, New_Reference_To (Return_Obj_Id, Loc));
|
||||
(Func_Call, Function_Id, New_Occurrence_Of (Return_Obj_Id, Loc));
|
||||
|
||||
-- When the result subtype is unconstrained, the function must allocate
|
||||
-- the return object in the secondary stack, so appropriate implicit
|
||||
@ -9923,7 +9925,7 @@ package body Exp_Ch6 is
|
||||
(Func_Call,
|
||||
Func_Id,
|
||||
Make_Unchecked_Type_Conversion (Loc,
|
||||
Subtype_Mark => New_Reference_To (Result_Subt, Loc),
|
||||
Subtype_Mark => New_Occurrence_Of (Result_Subt, Loc),
|
||||
Expression => Relocate_Node (Lhs)));
|
||||
|
||||
-- Create an access type designating the function's result subtype
|
||||
@ -9937,7 +9939,7 @@ package body Exp_Ch6 is
|
||||
Make_Access_To_Object_Definition (Loc,
|
||||
All_Present => True,
|
||||
Subtype_Indication =>
|
||||
New_Reference_To (Result_Subt, Loc)));
|
||||
New_Occurrence_Of (Result_Subt, Loc)));
|
||||
Insert_After_And_Analyze (Assign, Ptr_Typ_Decl);
|
||||
|
||||
-- Finally, create an access object initialized to a reference to the
|
||||
@ -9953,7 +9955,7 @@ package body Exp_Ch6 is
|
||||
Obj_Decl :=
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => Obj_Id,
|
||||
Object_Definition => New_Reference_To (Ptr_Typ, Loc),
|
||||
Object_Definition => New_Occurrence_Of (Ptr_Typ, Loc),
|
||||
Expression => New_Expr);
|
||||
Insert_After_And_Analyze (Ptr_Typ_Decl, Obj_Decl);
|
||||
|
||||
@ -10065,7 +10067,7 @@ package body Exp_Ch6 is
|
||||
RTE_Available (RE_Root_Storage_Pool_Ptr)
|
||||
then
|
||||
Pool_Actual :=
|
||||
New_Reference_To (Build_In_Place_Formal
|
||||
New_Occurrence_Of (Build_In_Place_Formal
|
||||
(Enclosing_Func, BIP_Storage_Pool), Loc);
|
||||
|
||||
-- The build-in-place pool formal is not built on .NET/JVM
|
||||
@ -10078,7 +10080,7 @@ package body Exp_Ch6 is
|
||||
(Func_Call,
|
||||
Function_Id,
|
||||
Alloc_Form_Exp =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Build_In_Place_Formal (Enclosing_Func, BIP_Alloc_Form),
|
||||
Loc),
|
||||
Pool_Actual => Pool_Actual);
|
||||
@ -10093,7 +10095,7 @@ package body Exp_Ch6 is
|
||||
|
||||
if Needs_BIP_Finalization_Master (Enclosing_Func) then
|
||||
Fmaster_Actual :=
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Build_In_Place_Formal
|
||||
(Enclosing_Func, BIP_Finalization_Master), Loc);
|
||||
end if;
|
||||
@ -10104,12 +10106,12 @@ package body Exp_Ch6 is
|
||||
Caller_Object :=
|
||||
Make_Unchecked_Type_Conversion (Loc,
|
||||
Subtype_Mark =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Etype
|
||||
(Build_In_Place_Formal (Function_Id, BIP_Object_Access)),
|
||||
Loc),
|
||||
Expression =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Build_In_Place_Formal (Enclosing_Func, BIP_Object_Access),
|
||||
Loc));
|
||||
|
||||
@ -10121,8 +10123,8 @@ package body Exp_Ch6 is
|
||||
elsif Is_Constrained (Underlying_Type (Result_Subt)) then
|
||||
Caller_Object :=
|
||||
Make_Unchecked_Type_Conversion (Loc,
|
||||
Subtype_Mark => New_Reference_To (Result_Subt, Loc),
|
||||
Expression => New_Reference_To (Obj_Def_Id, Loc));
|
||||
Subtype_Mark => New_Occurrence_Of (Result_Subt, Loc),
|
||||
Expression => New_Occurrence_Of (Obj_Def_Id, Loc));
|
||||
|
||||
-- When the function has a controlling result, an allocation-form
|
||||
-- parameter must be passed indicating that the caller is allocating
|
||||
@ -10164,7 +10166,7 @@ package body Exp_Ch6 is
|
||||
Add_Task_Actuals_To_Build_In_Place_Call
|
||||
(Func_Call, Function_Id,
|
||||
Master_Actual =>
|
||||
New_Reference_To (Build_In_Place_Formal
|
||||
New_Occurrence_Of (Build_In_Place_Formal
|
||||
(Enclosing_Func, BIP_Task_Master), Loc));
|
||||
|
||||
else
|
||||
@ -10189,7 +10191,7 @@ package body Exp_Ch6 is
|
||||
Make_Access_To_Object_Definition (Loc,
|
||||
All_Present => True,
|
||||
Subtype_Indication =>
|
||||
New_Reference_To (Etype (Function_Call), Loc)));
|
||||
New_Occurrence_Of (Etype (Function_Call), Loc)));
|
||||
|
||||
-- The access type and its accompanying object must be inserted after
|
||||
-- the object declaration in the constrained case, so that the function
|
||||
@ -10220,7 +10222,7 @@ package body Exp_Ch6 is
|
||||
Res_Decl :=
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => Def_Id,
|
||||
Object_Definition => New_Reference_To (Ref_Type, Loc),
|
||||
Object_Definition => New_Occurrence_Of (Ref_Type, Loc),
|
||||
Expression => New_Expr);
|
||||
Insert_After_And_Analyze (Ptr_Typ_Decl, Res_Decl);
|
||||
|
||||
@ -10262,7 +10264,7 @@ package body Exp_Ch6 is
|
||||
else
|
||||
Call_Deref :=
|
||||
Make_Explicit_Dereference (Loc,
|
||||
Prefix => New_Reference_To (Def_Id, Loc));
|
||||
Prefix => New_Occurrence_Of (Def_Id, Loc));
|
||||
|
||||
Loc := Sloc (Object_Decl);
|
||||
Rewrite (Object_Decl,
|
||||
@ -10360,7 +10362,7 @@ package body Exp_Ch6 is
|
||||
|
||||
New_Allocator :=
|
||||
Make_Allocator (Loc,
|
||||
Expression => New_Reference_To (Result_Subt, Loc));
|
||||
Expression => New_Occurrence_Of (Result_Subt, Loc));
|
||||
Set_No_Initialization (New_Allocator);
|
||||
|
||||
-- Copy attributes to new allocator. Note that the new allocator
|
||||
@ -10390,7 +10392,7 @@ package body Exp_Ch6 is
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => Return_Obj_Access,
|
||||
Constant_Present => True,
|
||||
Object_Definition => New_Reference_To (Acc_Type, Loc),
|
||||
Object_Definition => New_Occurrence_Of (Acc_Type, Loc),
|
||||
Expression => Relocate_Node (Allocator));
|
||||
Insert_Action (Allocator, Tmp_Obj);
|
||||
|
||||
@ -10398,7 +10400,7 @@ package body Exp_Ch6 is
|
||||
Build_Initialization_Call (Loc,
|
||||
Id_Ref =>
|
||||
Make_Explicit_Dereference (Loc,
|
||||
Prefix => New_Reference_To (Return_Obj_Access, Loc)),
|
||||
Prefix => New_Occurrence_Of (Return_Obj_Access, Loc)),
|
||||
Typ => Etype (Function_Id),
|
||||
Constructor_Ref => Function_Call));
|
||||
|
||||
@ -10406,7 +10408,7 @@ package body Exp_Ch6 is
|
||||
-- the function call itself (which will effectively be an access to the
|
||||
-- object created by the allocator).
|
||||
|
||||
Rewrite (Allocator, New_Reference_To (Return_Obj_Access, Loc));
|
||||
Rewrite (Allocator, New_Occurrence_Of (Return_Obj_Access, Loc));
|
||||
|
||||
-- Ada 2005 (AI-251): If the type of the allocator is an interface then
|
||||
-- generate an implicit conversion to force displacement of the "this"
|
||||
|
@ -557,10 +557,10 @@ package body Exp_Ch7 is
|
||||
Append_To (Stmts,
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(RTE (RE_Expunge_Unactivated_Tasks), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
New_Reference_To (Activation_Chain_Entity (N), Loc))));
|
||||
New_Occurrence_Of (Activation_Chain_Entity (N), Loc))));
|
||||
|
||||
-- Attempt to cancel an asynchronous entry call whenever the block which
|
||||
-- contains the abortable part is exited.
|
||||
@ -586,17 +586,17 @@ package body Exp_Ch7 is
|
||||
Condition =>
|
||||
Make_Function_Call (Loc,
|
||||
Name =>
|
||||
New_Reference_To (RTE (RE_Enqueued), Loc),
|
||||
New_Occurrence_Of (RTE (RE_Enqueued), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
New_Reference_To (Cancel_Param, Loc))),
|
||||
New_Occurrence_Of (Cancel_Param, Loc))),
|
||||
|
||||
Then_Statements => New_List (
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(RTE (RE_Cancel_Protected_Entry_Call), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
New_Reference_To (Cancel_Param, Loc))))));
|
||||
New_Occurrence_Of (Cancel_Param, Loc))))));
|
||||
|
||||
-- Asynchronous delay, generate:
|
||||
-- Cancel_Async_Delay (Cancel_Param);
|
||||
@ -605,11 +605,11 @@ package body Exp_Ch7 is
|
||||
Append_To (Stmts,
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name =>
|
||||
New_Reference_To (RTE (RE_Cancel_Async_Delay), Loc),
|
||||
New_Occurrence_Of (RTE (RE_Cancel_Async_Delay), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix =>
|
||||
New_Reference_To (Cancel_Param, Loc),
|
||||
New_Occurrence_Of (Cancel_Param, Loc),
|
||||
Attribute_Name => Name_Unchecked_Access))));
|
||||
|
||||
-- Task entry call, generate:
|
||||
@ -619,9 +619,9 @@ package body Exp_Ch7 is
|
||||
Append_To (Stmts,
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name =>
|
||||
New_Reference_To (RTE (RE_Cancel_Task_Entry_Call), Loc),
|
||||
New_Occurrence_Of (RTE (RE_Cancel_Task_Entry_Call), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
New_Reference_To (Cancel_Param, Loc))));
|
||||
New_Occurrence_Of (Cancel_Param, Loc))));
|
||||
end if;
|
||||
end;
|
||||
end if;
|
||||
@ -672,7 +672,7 @@ package body Exp_Ch7 is
|
||||
Name =>
|
||||
Make_Explicit_Dereference (Data.Loc,
|
||||
Prefix =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(RTE (RE_Get_Current_Excep), Data.Loc)));
|
||||
|
||||
else
|
||||
@ -695,7 +695,7 @@ package body Exp_Ch7 is
|
||||
|
||||
Actuals :=
|
||||
New_List (
|
||||
New_Reference_To (Data.E_Id, Data.Loc),
|
||||
New_Occurrence_Of (Data.E_Id, Data.Loc),
|
||||
Make_Explicit_Dereference (Data.Loc, Except));
|
||||
end if;
|
||||
|
||||
@ -715,16 +715,16 @@ package body Exp_Ch7 is
|
||||
Make_If_Statement (Data.Loc,
|
||||
Condition =>
|
||||
Make_Op_Not (Data.Loc,
|
||||
Right_Opnd => New_Reference_To (Data.Raised_Id, Data.Loc)),
|
||||
Right_Opnd => New_Occurrence_Of (Data.Raised_Id, Data.Loc)),
|
||||
|
||||
Then_Statements => New_List (
|
||||
Make_Assignment_Statement (Data.Loc,
|
||||
Name => New_Reference_To (Data.Raised_Id, Data.Loc),
|
||||
Expression => New_Reference_To (Standard_True, Data.Loc)),
|
||||
Name => New_Occurrence_Of (Data.Raised_Id, Data.Loc),
|
||||
Expression => New_Occurrence_Of (Standard_True, Data.Loc)),
|
||||
|
||||
Make_Procedure_Call_Statement (Data.Loc,
|
||||
Name =>
|
||||
New_Reference_To (Proc_To_Call, Data.Loc),
|
||||
New_Occurrence_Of (Proc_To_Call, Data.Loc),
|
||||
Parameter_Associations => Actuals))));
|
||||
|
||||
else
|
||||
@ -734,8 +734,8 @@ package body Exp_Ch7 is
|
||||
|
||||
Stmts := New_List (
|
||||
Make_Assignment_Statement (Data.Loc,
|
||||
Name => New_Reference_To (Data.Raised_Id, Data.Loc),
|
||||
Expression => New_Reference_To (Standard_True, Data.Loc)));
|
||||
Name => New_Occurrence_Of (Data.Raised_Id, Data.Loc),
|
||||
Expression => New_Occurrence_Of (Standard_True, Data.Loc)));
|
||||
end if;
|
||||
|
||||
-- Generate:
|
||||
@ -907,7 +907,7 @@ package body Exp_Ch7 is
|
||||
Defining_Identifier => Fin_Mas_Id,
|
||||
Aliased_Present => True,
|
||||
Object_Definition =>
|
||||
New_Reference_To (RTE (RE_Finalization_Master), Loc)));
|
||||
New_Occurrence_Of (RTE (RE_Finalization_Master), Loc)));
|
||||
|
||||
-- Storage pool selection and attribute decoration of the generated
|
||||
-- master. Since .NET/JVM compilers do not support pools, this step
|
||||
@ -934,11 +934,11 @@ package body Exp_Ch7 is
|
||||
Append_To (Actions,
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name =>
|
||||
New_Reference_To (RTE (RE_Set_Base_Pool), Loc),
|
||||
New_Occurrence_Of (RTE (RE_Set_Base_Pool), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
New_Reference_To (Fin_Mas_Id, Loc),
|
||||
New_Occurrence_Of (Fin_Mas_Id, Loc),
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix => New_Reference_To (Pool_Id, Loc),
|
||||
Prefix => New_Occurrence_Of (Pool_Id, Loc),
|
||||
Attribute_Name => Name_Unrestricted_Access))));
|
||||
end if;
|
||||
|
||||
@ -1201,7 +1201,7 @@ package body Exp_Ch7 is
|
||||
Defining_Identifier => Counter_Typ,
|
||||
Subtype_Indication =>
|
||||
Make_Subtype_Indication (Loc,
|
||||
Subtype_Mark => New_Reference_To (Standard_Natural, Loc),
|
||||
Subtype_Mark => New_Occurrence_Of (Standard_Natural, Loc),
|
||||
Constraint =>
|
||||
Make_Range_Constraint (Loc,
|
||||
Range_Expression =>
|
||||
@ -1218,7 +1218,7 @@ package body Exp_Ch7 is
|
||||
Counter_Decl :=
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => Counter_Id,
|
||||
Object_Definition => New_Reference_To (Counter_Typ, Loc),
|
||||
Object_Definition => New_Occurrence_Of (Counter_Typ, Loc),
|
||||
Expression => Make_Integer_Literal (Loc, 0));
|
||||
|
||||
-- Set the type of the counter explicitly to prevent errors when
|
||||
@ -1421,7 +1421,7 @@ package body Exp_Ch7 is
|
||||
Discrete_Choices => New_List (Make_Others_Choice (Loc)),
|
||||
Statements => New_List (
|
||||
Make_Goto_Statement (Loc,
|
||||
Name => New_Reference_To (Entity (Label_Id), Loc)))));
|
||||
Name => New_Occurrence_Of (Entity (Label_Id), Loc)))));
|
||||
|
||||
-- Generate:
|
||||
-- <<L0>>
|
||||
@ -1472,9 +1472,9 @@ package body Exp_Ch7 is
|
||||
Append_To (Finalizer_Stmts,
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name =>
|
||||
New_Reference_To (RTE (RE_SS_Release), Loc),
|
||||
New_Occurrence_Of (RTE (RE_SS_Release), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
New_Reference_To (Mark_Id, Loc))));
|
||||
New_Occurrence_Of (Mark_Id, Loc))));
|
||||
end if;
|
||||
|
||||
-- Protect the statements with abort defer/undefer. This is only when
|
||||
@ -1487,11 +1487,11 @@ package body Exp_Ch7 is
|
||||
then
|
||||
Prepend_To (Finalizer_Stmts,
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name => New_Reference_To (RTE (RE_Abort_Defer), Loc)));
|
||||
Name => New_Occurrence_Of (RTE (RE_Abort_Defer), Loc)));
|
||||
|
||||
Append_To (Finalizer_Stmts,
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name => New_Reference_To (RTE (RE_Abort_Undefer), Loc)));
|
||||
Name => New_Occurrence_Of (RTE (RE_Abort_Undefer), Loc)));
|
||||
end if;
|
||||
|
||||
-- The local exception does not need to be reraised for library-level
|
||||
@ -2149,16 +2149,17 @@ package body Exp_Ch7 is
|
||||
Make_Object_Renaming_Declaration (Loc,
|
||||
Defining_Identifier => Pool_Id,
|
||||
Subtype_Mark =>
|
||||
New_Reference_To (RTE (RE_Root_Storage_Pool), Loc),
|
||||
New_Occurrence_Of (RTE (RE_Root_Storage_Pool), Loc),
|
||||
Name =>
|
||||
Make_Explicit_Dereference (Loc,
|
||||
Prefix =>
|
||||
Make_Function_Call (Loc,
|
||||
Name =>
|
||||
New_Reference_To (RTE (RE_Base_Pool), Loc),
|
||||
New_Occurrence_Of (RTE (RE_Base_Pool), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
Make_Explicit_Dereference (Loc,
|
||||
Prefix => New_Reference_To (Fin_Mas_Id, Loc)))))));
|
||||
Prefix =>
|
||||
New_Occurrence_Of (Fin_Mas_Id, Loc)))))));
|
||||
|
||||
-- Create an access type which uses the storage pool of the
|
||||
-- caller's finalization master.
|
||||
@ -2173,7 +2174,7 @@ package body Exp_Ch7 is
|
||||
Defining_Identifier => Ptr_Typ,
|
||||
Type_Definition =>
|
||||
Make_Access_To_Object_Definition (Loc,
|
||||
Subtype_Indication => New_Reference_To (Obj_Typ, Loc))));
|
||||
Subtype_Indication => New_Occurrence_Of (Obj_Typ, Loc))));
|
||||
|
||||
-- Perform minor decoration in order to set the master and the
|
||||
-- storage pool attributes.
|
||||
@ -2189,7 +2190,7 @@ package body Exp_Ch7 is
|
||||
Make_Free_Statement (Loc,
|
||||
Expression =>
|
||||
Unchecked_Convert_To (Ptr_Typ,
|
||||
New_Reference_To (Temp_Id, Loc)));
|
||||
New_Occurrence_Of (Temp_Id, Loc)));
|
||||
|
||||
Set_Storage_Pool (Free_Stmt, Pool_Id);
|
||||
|
||||
@ -2215,7 +2216,7 @@ package body Exp_Ch7 is
|
||||
|
||||
Cond :=
|
||||
Make_Op_Ne (Loc,
|
||||
Left_Opnd => New_Reference_To (Fin_Mas_Id, Loc),
|
||||
Left_Opnd => New_Occurrence_Of (Fin_Mas_Id, Loc),
|
||||
Right_Opnd => Make_Null (Loc));
|
||||
|
||||
-- For constrained or tagged results escalate the condition to
|
||||
@ -2236,7 +2237,7 @@ package body Exp_Ch7 is
|
||||
Make_And_Then (Loc,
|
||||
Left_Opnd =>
|
||||
Make_Op_Gt (Loc,
|
||||
Left_Opnd => New_Reference_To (Alloc, Loc),
|
||||
Left_Opnd => New_Occurrence_Of (Alloc, Loc),
|
||||
Right_Opnd =>
|
||||
Make_Integer_Literal (Loc,
|
||||
UI_From_Int
|
||||
@ -2431,7 +2432,7 @@ package body Exp_Ch7 is
|
||||
-- Start of processing for Process_Object_Declaration
|
||||
|
||||
begin
|
||||
Obj_Ref := New_Reference_To (Obj_Id, Loc);
|
||||
Obj_Ref := New_Occurrence_Of (Obj_Id, Loc);
|
||||
Obj_Typ := Base_Type (Etype (Obj_Id));
|
||||
|
||||
-- Handle access types
|
||||
@ -2450,7 +2451,7 @@ package body Exp_Ch7 is
|
||||
|
||||
Inc_Decl :=
|
||||
Make_Assignment_Statement (Loc,
|
||||
Name => New_Reference_To (Counter_Id, Loc),
|
||||
Name => New_Occurrence_Of (Counter_Id, Loc),
|
||||
Expression => Make_Integer_Literal (Loc, Counter_Val));
|
||||
|
||||
-- Insert the counter after all initialization has been done. The
|
||||
@ -2517,7 +2518,7 @@ package body Exp_Ch7 is
|
||||
Make_Integer_Literal (Loc, Counter_Val)),
|
||||
Statements => New_List (
|
||||
Make_Goto_Statement (Loc,
|
||||
Name => New_Reference_To (Entity (Label_Id), Loc)))));
|
||||
Name => New_Occurrence_Of (Entity (Label_Id), Loc)))));
|
||||
|
||||
-- Insert the jump destination, generate:
|
||||
--
|
||||
@ -2693,7 +2694,7 @@ package body Exp_Ch7 is
|
||||
Make_If_Statement (Loc,
|
||||
Condition =>
|
||||
Make_Op_Ne (Loc,
|
||||
Left_Opnd => New_Reference_To (Obj_Id, Loc),
|
||||
Left_Opnd => New_Occurrence_Of (Obj_Id, Loc),
|
||||
Right_Opnd => Make_Null (Loc)),
|
||||
Then_Statements => Fin_Stmts));
|
||||
|
||||
@ -2711,7 +2712,7 @@ package body Exp_Ch7 is
|
||||
Condition =>
|
||||
Make_Op_Not (Loc,
|
||||
Right_Opnd =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Status_Flag_Or_Transient_Decl (Obj_Id), Loc)),
|
||||
|
||||
Then_Statements => Fin_Stmts));
|
||||
@ -2743,9 +2744,9 @@ package body Exp_Ch7 is
|
||||
Append_To (Tagged_Type_Stmts,
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name =>
|
||||
New_Reference_To (RTE (RE_Unregister_Tag), Loc),
|
||||
New_Occurrence_Of (RTE (RE_Unregister_Tag), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
New_Reference_To (DT_Ptr, Loc))));
|
||||
New_Occurrence_Of (DT_Ptr, Loc))));
|
||||
end Process_Tagged_Type_Declaration;
|
||||
|
||||
-- Start of processing for Build_Finalizer
|
||||
@ -2971,7 +2972,7 @@ package body Exp_Ch7 is
|
||||
end;
|
||||
end if;
|
||||
|
||||
Set_At_End_Proc (HSS, New_Reference_To (Fin_Id, Loc));
|
||||
Set_At_End_Proc (HSS, New_Occurrence_Of (Fin_Id, Loc));
|
||||
|
||||
Analyze (At_End_Proc (HSS));
|
||||
Expand_At_End_Handler (HSS, Empty);
|
||||
@ -3043,7 +3044,7 @@ package body Exp_Ch7 is
|
||||
then
|
||||
Data.Abort_Id := Make_Temporary (Loc, 'A');
|
||||
|
||||
A_Expr := New_Reference_To (RTE (RE_Triggered_By_Abort), Loc);
|
||||
A_Expr := New_Occurrence_Of (RTE (RE_Triggered_By_Abort), Loc);
|
||||
|
||||
-- Generate:
|
||||
|
||||
@ -3053,7 +3054,7 @@ package body Exp_Ch7 is
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => Data.Abort_Id,
|
||||
Constant_Present => True,
|
||||
Object_Definition => New_Reference_To (Standard_Boolean, Loc),
|
||||
Object_Definition => New_Occurrence_Of (Standard_Boolean, Loc),
|
||||
Expression => A_Expr));
|
||||
|
||||
else
|
||||
@ -3073,7 +3074,7 @@ package body Exp_Ch7 is
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => Data.E_Id,
|
||||
Object_Definition =>
|
||||
New_Reference_To (RTE (RE_Exception_Occurrence), Loc));
|
||||
New_Occurrence_Of (RTE (RE_Exception_Occurrence), Loc));
|
||||
Set_No_Initialization (E_Decl);
|
||||
|
||||
Append_To (Decls, E_Decl);
|
||||
@ -3089,8 +3090,8 @@ package body Exp_Ch7 is
|
||||
Append_To (Decls,
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => Data.Raised_Id,
|
||||
Object_Definition => New_Reference_To (Standard_Boolean, Loc),
|
||||
Expression => New_Reference_To (Standard_False, Loc)));
|
||||
Object_Definition => New_Occurrence_Of (Standard_Boolean, Loc),
|
||||
Expression => New_Occurrence_Of (Standard_False, Loc)));
|
||||
end Build_Object_Declarations;
|
||||
|
||||
---------------------------
|
||||
@ -3113,10 +3114,10 @@ package body Exp_Ch7 is
|
||||
Stmt :=
|
||||
Make_Procedure_Call_Statement (Data.Loc,
|
||||
Name =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(RTE (RE_Raise_From_Controlled_Operation), Data.Loc),
|
||||
Parameter_Associations =>
|
||||
New_List (New_Reference_To (Data.E_Id, Data.Loc)));
|
||||
New_List (New_Occurrence_Of (Data.E_Id, Data.Loc)));
|
||||
|
||||
-- Restricted run-time: exception messages are not supported and hence
|
||||
-- Raise_From_Controlled_Operation is not supported. Raise Program_Error
|
||||
@ -3134,14 +3135,14 @@ package body Exp_Ch7 is
|
||||
-- <or>
|
||||
-- Raised_Id
|
||||
|
||||
Expr := New_Reference_To (Data.Raised_Id, Data.Loc);
|
||||
Expr := New_Occurrence_Of (Data.Raised_Id, Data.Loc);
|
||||
|
||||
if Present (Data.Abort_Id) then
|
||||
Expr := Make_And_Then (Data.Loc,
|
||||
Left_Opnd => Expr,
|
||||
Right_Opnd =>
|
||||
Make_Op_Not (Data.Loc,
|
||||
Right_Opnd => New_Reference_To (Data.Abort_Id, Data.Loc)));
|
||||
Right_Opnd => New_Occurrence_Of (Data.Abort_Id, Data.Loc)));
|
||||
end if;
|
||||
|
||||
-- Generate:
|
||||
@ -3270,7 +3271,7 @@ package body Exp_Ch7 is
|
||||
|
||||
else
|
||||
Index := Make_Temporary (Loc, 'J');
|
||||
Append (New_Reference_To (Index, Loc), Index_List);
|
||||
Append (New_Occurrence_Of (Index, Loc), Index_List);
|
||||
|
||||
return New_List (
|
||||
Make_Implicit_Loop_Statement (N,
|
||||
@ -3389,7 +3390,7 @@ package body Exp_Ch7 is
|
||||
return
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name =>
|
||||
New_Reference_To (RTE (RE_Finalize_Protection), Loc),
|
||||
New_Occurrence_Of (RTE (RE_Finalize_Protection), Loc),
|
||||
Parameter_Associations => New_List (Concurrent_Ref (Ref)));
|
||||
end if;
|
||||
end Cleanup_Protected_Object;
|
||||
@ -3416,7 +3417,7 @@ package body Exp_Ch7 is
|
||||
return
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name =>
|
||||
New_Reference_To (RTE (RE_Free_Task), Loc),
|
||||
New_Occurrence_Of (RTE (RE_Free_Task), Loc),
|
||||
Parameter_Associations => New_List (Concurrent_Ref (Ref)));
|
||||
end if;
|
||||
end Cleanup_Task;
|
||||
@ -3778,10 +3779,10 @@ package body Exp_Ch7 is
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => Mark,
|
||||
Object_Definition =>
|
||||
New_Reference_To (RTE (RE_Mark_Id), Loc),
|
||||
New_Occurrence_Of (RTE (RE_Mark_Id), Loc),
|
||||
Expression =>
|
||||
Make_Function_Call (Loc,
|
||||
Name => New_Reference_To (RTE (RE_SS_Mark), Loc))));
|
||||
Name => New_Occurrence_Of (RTE (RE_SS_Mark), Loc))));
|
||||
|
||||
Set_Uses_Sec_Stack (Scop, False);
|
||||
end if;
|
||||
@ -4601,7 +4602,7 @@ package body Exp_Ch7 is
|
||||
All_Present =>
|
||||
Ekind (Obj_Typ) = E_General_Access_Type,
|
||||
Subtype_Indication =>
|
||||
New_Reference_To (Desig_Typ, Loc))));
|
||||
New_Occurrence_Of (Desig_Typ, Loc))));
|
||||
|
||||
-- Step 2: Create a temporary which acts as a hook to the
|
||||
-- transient object. Generate:
|
||||
@ -4614,7 +4615,7 @@ package body Exp_Ch7 is
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => Temp_Id,
|
||||
Object_Definition =>
|
||||
New_Reference_To (Ptr_Id, Loc)));
|
||||
New_Occurrence_Of (Ptr_Id, Loc)));
|
||||
|
||||
-- Mark the temporary as a transient hook. This signals the
|
||||
-- machinery in Build_Finalizer to recognize this special
|
||||
@ -4626,11 +4627,11 @@ package body Exp_Ch7 is
|
||||
|
||||
if Is_Access_Type (Obj_Typ) then
|
||||
Expr :=
|
||||
Convert_To (Ptr_Id, New_Reference_To (Obj_Id, Loc));
|
||||
Convert_To (Ptr_Id, New_Occurrence_Of (Obj_Id, Loc));
|
||||
else
|
||||
Expr :=
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix => New_Reference_To (Obj_Id, Loc),
|
||||
Prefix => New_Occurrence_Of (Obj_Id, Loc),
|
||||
Attribute_Name => Name_Unrestricted_Access);
|
||||
end if;
|
||||
|
||||
@ -4657,7 +4658,7 @@ package body Exp_Ch7 is
|
||||
|
||||
Insert_After_And_Analyze (Temp_Ins,
|
||||
Make_Assignment_Statement (Loc,
|
||||
Name => New_Reference_To (Temp_Id, Loc),
|
||||
Name => New_Occurrence_Of (Temp_Id, Loc),
|
||||
Expression => Expr));
|
||||
end if;
|
||||
|
||||
@ -4673,14 +4674,14 @@ package body Exp_Ch7 is
|
||||
if Must_Hook then
|
||||
Append_To (Stmts,
|
||||
Make_Assignment_Statement (Loc,
|
||||
Name => New_Reference_To (Temp_Id, Loc),
|
||||
Name => New_Occurrence_Of (Temp_Id, Loc),
|
||||
Expression => Make_Null (Loc)));
|
||||
end if;
|
||||
|
||||
-- Generate:
|
||||
-- [Deep_]Finalize (Obj_Ref);
|
||||
|
||||
Obj_Ref := New_Reference_To (Obj_Id, Loc);
|
||||
Obj_Ref := New_Occurrence_Of (Obj_Id, Loc);
|
||||
|
||||
if Is_Access_Type (Obj_Typ) then
|
||||
Obj_Ref := Make_Explicit_Dereference (Loc, Obj_Ref);
|
||||
@ -4967,9 +4968,9 @@ package body Exp_Ch7 is
|
||||
return
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name =>
|
||||
New_Reference_To (RTE (RE_Attach), Loc),
|
||||
New_Occurrence_Of (RTE (RE_Attach), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
New_Reference_To (Finalization_Master (Ptr_Typ), Loc),
|
||||
New_Occurrence_Of (Finalization_Master (Ptr_Typ), Loc),
|
||||
Unchecked_Convert_To (RTE (RE_Root_Controlled_Ptr), Obj_Ref)));
|
||||
end Make_Attach_Call;
|
||||
|
||||
@ -4984,7 +4985,7 @@ package body Exp_Ch7 is
|
||||
return
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name =>
|
||||
New_Reference_To (RTE (RE_Detach), Loc),
|
||||
New_Occurrence_Of (RTE (RE_Detach), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
Unchecked_Convert_To (RTE (RE_Root_Controlled_Ptr), Obj_Ref)));
|
||||
end Make_Detach_Call;
|
||||
@ -5007,12 +5008,12 @@ package body Exp_Ch7 is
|
||||
-- the corresponding flag a False value.
|
||||
|
||||
if For_Parent then
|
||||
Append_To (Params, New_Reference_To (Standard_False, Loc));
|
||||
Append_To (Params, New_Occurrence_Of (Standard_False, Loc));
|
||||
end if;
|
||||
|
||||
return
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name => New_Reference_To (Proc_Id, Loc),
|
||||
Name => New_Occurrence_Of (Proc_Id, Loc),
|
||||
Parameter_Associations => Params);
|
||||
end Make_Call;
|
||||
|
||||
@ -5384,11 +5385,11 @@ package body Exp_Ch7 is
|
||||
|
||||
return
|
||||
Make_Assignment_Statement (Loc,
|
||||
Name => New_Reference_To (Counter_Id, Loc),
|
||||
Name => New_Occurrence_Of (Counter_Id, Loc),
|
||||
Expression =>
|
||||
Make_Op_Subtract (Loc,
|
||||
Left_Opnd => Expr,
|
||||
Right_Opnd => New_Reference_To (Counter_Id, Loc)));
|
||||
Right_Opnd => New_Occurrence_Of (Counter_Id, Loc)));
|
||||
end Build_Counter_Assignment;
|
||||
|
||||
-----------------------------
|
||||
@ -5495,15 +5496,15 @@ package body Exp_Ch7 is
|
||||
Make_If_Statement (Loc,
|
||||
Condition =>
|
||||
Make_Op_Gt (Loc,
|
||||
Left_Opnd => New_Reference_To (Counter_Id, Loc),
|
||||
Left_Opnd => New_Occurrence_Of (Counter_Id, Loc),
|
||||
Right_Opnd => Make_Integer_Literal (Loc, 0)),
|
||||
|
||||
Then_Statements => New_List (
|
||||
Make_Assignment_Statement (Loc,
|
||||
Name => New_Reference_To (Counter_Id, Loc),
|
||||
Name => New_Occurrence_Of (Counter_Id, Loc),
|
||||
Expression =>
|
||||
Make_Op_Subtract (Loc,
|
||||
Left_Opnd => New_Reference_To (Counter_Id, Loc),
|
||||
Left_Opnd => New_Occurrence_Of (Counter_Id, Loc),
|
||||
Right_Opnd => Make_Integer_Literal (Loc, 1)))),
|
||||
|
||||
Else_Statements => New_List (Fin_Stmt));
|
||||
@ -5611,10 +5612,10 @@ package body Exp_Ch7 is
|
||||
|
||||
Append_To (Statements (Handled_Statement_Sequence (Init_Loop)),
|
||||
Make_Assignment_Statement (Loc,
|
||||
Name => New_Reference_To (Counter_Id, Loc),
|
||||
Name => New_Occurrence_Of (Counter_Id, Loc),
|
||||
Expression =>
|
||||
Make_Op_Add (Loc,
|
||||
Left_Opnd => New_Reference_To (Counter_Id, Loc),
|
||||
Left_Opnd => New_Occurrence_Of (Counter_Id, Loc),
|
||||
Right_Opnd => Make_Integer_Literal (Loc, 1))));
|
||||
|
||||
-- Generate all initialization loops starting from the innermost
|
||||
@ -5667,7 +5668,7 @@ package body Exp_Ch7 is
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => Counter_Id,
|
||||
Object_Definition =>
|
||||
New_Reference_To (Standard_Integer, Loc),
|
||||
New_Occurrence_Of (Standard_Integer, Loc),
|
||||
Expression => Make_Integer_Literal (Loc, 0))),
|
||||
|
||||
Handled_Statement_Sequence =>
|
||||
@ -5689,7 +5690,7 @@ package body Exp_Ch7 is
|
||||
begin
|
||||
Id := First (L);
|
||||
while Present (Id) loop
|
||||
Append_To (Refs, New_Reference_To (Id, Loc));
|
||||
Append_To (Refs, New_Occurrence_Of (Id, Loc));
|
||||
Next (Id);
|
||||
end loop;
|
||||
|
||||
@ -5733,7 +5734,8 @@ package body Exp_Ch7 is
|
||||
Formals := New_List (
|
||||
Make_Parameter_Specification (Loc,
|
||||
Defining_Identifier => Make_Defining_Identifier (Loc, Name_V),
|
||||
Parameter_Type => New_Reference_To (RTE (RE_Address), Loc)));
|
||||
Parameter_Type =>
|
||||
New_Occurrence_Of (RTE (RE_Address), Loc)));
|
||||
|
||||
-- Default case
|
||||
|
||||
@ -5745,7 +5747,7 @@ package body Exp_Ch7 is
|
||||
Defining_Identifier => Make_Defining_Identifier (Loc, Name_V),
|
||||
In_Present => True,
|
||||
Out_Present => True,
|
||||
Parameter_Type => New_Reference_To (Typ, Loc)));
|
||||
Parameter_Type => New_Occurrence_Of (Typ, Loc)));
|
||||
|
||||
-- F : Boolean := True
|
||||
|
||||
@ -5756,9 +5758,9 @@ package body Exp_Ch7 is
|
||||
Make_Parameter_Specification (Loc,
|
||||
Defining_Identifier => Make_Defining_Identifier (Loc, Name_F),
|
||||
Parameter_Type =>
|
||||
New_Reference_To (Standard_Boolean, Loc),
|
||||
New_Occurrence_Of (Standard_Boolean, Loc),
|
||||
Expression =>
|
||||
New_Reference_To (Standard_True, Loc)));
|
||||
New_Occurrence_Of (Standard_True, Loc)));
|
||||
end if;
|
||||
end if;
|
||||
|
||||
@ -6296,7 +6298,7 @@ package body Exp_Ch7 is
|
||||
if Present (Proc) then
|
||||
Adj_Stmt :=
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name => New_Reference_To (Proc, Loc),
|
||||
Name => New_Occurrence_Of (Proc, Loc),
|
||||
Parameter_Associations => New_List (
|
||||
Make_Identifier (Loc, Name_V)));
|
||||
|
||||
@ -6462,7 +6464,7 @@ package body Exp_Ch7 is
|
||||
Statements => New_List (
|
||||
Make_Goto_Statement (Loc,
|
||||
Name =>
|
||||
New_Reference_To (Entity (Label_Id), Loc)))));
|
||||
New_Occurrence_Of (Entity (Label_Id), Loc)))));
|
||||
|
||||
-- Generate:
|
||||
-- <<LN>>
|
||||
@ -6708,7 +6710,7 @@ package body Exp_Ch7 is
|
||||
|
||||
Statements => New_List (
|
||||
Make_Goto_Statement (Loc,
|
||||
Name => New_Reference_To (Entity (Label_Id), Loc)))));
|
||||
Name => New_Occurrence_Of (Entity (Label_Id), Loc)))));
|
||||
|
||||
Append_To (Stmts, Label); -- statement
|
||||
|
||||
@ -6876,7 +6878,7 @@ package body Exp_Ch7 is
|
||||
if Present (Proc) then
|
||||
Fin_Stmt :=
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name => New_Reference_To (Proc, Loc),
|
||||
Name => New_Occurrence_Of (Proc, Loc),
|
||||
Parameter_Associations => New_List (
|
||||
Make_Identifier (Loc, Name_V)));
|
||||
|
||||
@ -7022,7 +7024,7 @@ package body Exp_Ch7 is
|
||||
return New_List (
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Find_Prim_Op (Typ, Name_Of (Prim)), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
Make_Identifier (Loc, Name_V))));
|
||||
@ -7277,7 +7279,7 @@ package body Exp_Ch7 is
|
||||
Defining_Identifier =>
|
||||
Make_Defining_Identifier (Loc, Name_V),
|
||||
Parameter_Type =>
|
||||
New_Reference_To (RTE (RE_Address), Loc)))),
|
||||
New_Occurrence_Of (RTE (RE_Address), Loc)))),
|
||||
|
||||
Declarations => No_List,
|
||||
|
||||
@ -7355,10 +7357,10 @@ package body Exp_Ch7 is
|
||||
Type_Definition =>
|
||||
Make_Access_To_Object_Definition (Loc,
|
||||
All_Present => True,
|
||||
Subtype_Indication => New_Reference_To (Desg_Typ, Loc))),
|
||||
Subtype_Indication => New_Occurrence_Of (Desg_Typ, Loc))),
|
||||
|
||||
Make_Attribute_Definition_Clause (Loc,
|
||||
Name => New_Reference_To (Ptr_Typ, Loc),
|
||||
Name => New_Occurrence_Of (Ptr_Typ, Loc),
|
||||
Chars => Name_Storage_Size,
|
||||
Expression => Make_Integer_Literal (Loc, 0)));
|
||||
|
||||
@ -7381,7 +7383,7 @@ package body Exp_Ch7 is
|
||||
|
||||
Append_To (Decls,
|
||||
Make_Attribute_Definition_Clause (Loc,
|
||||
Name => New_Reference_To (Ptr_Typ, Loc),
|
||||
Name => New_Occurrence_Of (Ptr_Typ, Loc),
|
||||
Chars => Name_Size,
|
||||
Expression =>
|
||||
Make_Integer_Literal (Loc, System_Address_Size)));
|
||||
@ -7397,12 +7399,12 @@ package body Exp_Ch7 is
|
||||
Defining_Identifier => Dope_Id,
|
||||
Constant_Present => True,
|
||||
Object_Definition =>
|
||||
New_Reference_To (RTE (RE_Storage_Offset), Loc),
|
||||
New_Occurrence_Of (RTE (RE_Storage_Offset), Loc),
|
||||
Expression =>
|
||||
Make_Op_Divide (Loc,
|
||||
Left_Opnd =>
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix => New_Reference_To (Desg_Typ, Loc),
|
||||
Prefix => New_Occurrence_Of (Desg_Typ, Loc),
|
||||
Attribute_Name => Name_Descriptor_Size),
|
||||
Right_Opnd =>
|
||||
Make_Integer_Literal (Loc, System_Storage_Unit))));
|
||||
@ -7418,10 +7420,10 @@ package body Exp_Ch7 is
|
||||
Obj_Expr :=
|
||||
Make_Function_Call (Loc,
|
||||
Name =>
|
||||
New_Reference_To (RTE (RE_Add_Offset_To_Address), Loc),
|
||||
New_Occurrence_Of (RTE (RE_Add_Offset_To_Address), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
Obj_Expr,
|
||||
New_Reference_To (Dope_Id, Loc)));
|
||||
New_Occurrence_Of (Dope_Id, Loc)));
|
||||
end;
|
||||
end if;
|
||||
|
||||
@ -7477,10 +7479,10 @@ package body Exp_Ch7 is
|
||||
Raise_Node :=
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(RTE (RE_Raise_From_Controlled_Operation), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
New_Reference_To (E_Occ, Loc)));
|
||||
New_Occurrence_Of (E_Occ, Loc)));
|
||||
|
||||
-- Restricted run-time: exception messages are not supported
|
||||
|
||||
@ -7582,7 +7584,7 @@ package body Exp_Ch7 is
|
||||
return
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name =>
|
||||
New_Reference_To (Proc, Loc),
|
||||
New_Occurrence_Of (Proc, Loc),
|
||||
Parameter_Associations => New_List (Ref));
|
||||
end Make_Init_Call;
|
||||
|
||||
@ -7606,14 +7608,14 @@ package body Exp_Ch7 is
|
||||
Defining_Identifier => Make_Defining_Identifier (Loc, Name_V),
|
||||
In_Present => True,
|
||||
Out_Present => True,
|
||||
Parameter_Type => New_Reference_To (Typ, Loc)),
|
||||
Parameter_Type => New_Occurrence_Of (Typ, Loc)),
|
||||
|
||||
-- F : Boolean := True
|
||||
|
||||
Make_Parameter_Specification (Loc,
|
||||
Defining_Identifier => Make_Defining_Identifier (Loc, Name_F),
|
||||
Parameter_Type => New_Reference_To (Standard_Boolean, Loc),
|
||||
Expression => New_Reference_To (Standard_True, Loc)));
|
||||
Parameter_Type => New_Occurrence_Of (Standard_Boolean, Loc),
|
||||
Expression => New_Occurrence_Of (Standard_True, Loc)));
|
||||
|
||||
-- Add the necessary number of counters to represent the initialization
|
||||
-- state of an object.
|
||||
@ -7711,12 +7713,12 @@ package body Exp_Ch7 is
|
||||
return
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name =>
|
||||
New_Reference_To (RTE (RE_Set_Finalize_Address), Loc),
|
||||
New_Occurrence_Of (RTE (RE_Set_Finalize_Address), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
Fin_Mas_Ref,
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix =>
|
||||
New_Reference_To (TSS (Utyp, TSS_Finalize_Address), Loc),
|
||||
New_Occurrence_Of (TSS (Utyp, TSS_Finalize_Address), Loc),
|
||||
Attribute_Name => Name_Unrestricted_Access)));
|
||||
end Make_Set_Finalize_Address_Call;
|
||||
|
||||
@ -7796,7 +7798,7 @@ package body Exp_Ch7 is
|
||||
|
||||
Block :=
|
||||
Make_Block_Statement (Loc,
|
||||
Identifier => New_Reference_To (Current_Scope, Loc),
|
||||
Identifier => New_Occurrence_Of (Current_Scope, Loc),
|
||||
Declarations => Decls,
|
||||
Handled_Statement_Sequence =>
|
||||
Make_Handled_Sequence_Of_Statements (Loc, Statements => Instrs),
|
||||
@ -8002,16 +8004,16 @@ package body Exp_Ch7 is
|
||||
Insert_Actions (N, New_List (
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => Temp,
|
||||
Object_Definition => New_Reference_To (Typ, Loc)),
|
||||
Object_Definition => New_Occurrence_Of (Typ, Loc)),
|
||||
|
||||
Make_Transient_Block (Loc,
|
||||
Action =>
|
||||
Make_Assignment_Statement (Loc,
|
||||
Name => New_Reference_To (Temp, Loc),
|
||||
Name => New_Occurrence_Of (Temp, Loc),
|
||||
Expression => Expr),
|
||||
Par => Parent (N))));
|
||||
|
||||
Rewrite (N, New_Reference_To (Temp, Loc));
|
||||
Rewrite (N, New_Occurrence_Of (Temp, Loc));
|
||||
Analyze_And_Resolve (N, Typ);
|
||||
end Wrap_Transient_Expression;
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -472,7 +472,7 @@ package body Exp_Dbug is
|
||||
Res :=
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => Obj,
|
||||
Object_Definition => New_Reference_To
|
||||
Object_Definition => New_Occurrence_Of
|
||||
(Standard_Debug_Renaming_Type, Loc));
|
||||
|
||||
Set_Debug_Renaming_Link (Obj, Entity (Ren));
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -458,7 +458,7 @@ package body Exp_Imgv is
|
||||
elsif Is_Floating_Point_Type (Rtyp) then
|
||||
Append_To (Arg_List,
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix => New_Reference_To (Ptyp, Loc),
|
||||
Prefix => New_Occurrence_Of (Ptyp, Loc),
|
||||
Attribute_Name => Name_Digits));
|
||||
|
||||
-- For ordinary fixed-point types, append Aft parameter
|
||||
@ -466,7 +466,7 @@ package body Exp_Imgv is
|
||||
elsif Is_Ordinary_Fixed_Point_Type (Rtyp) then
|
||||
Append_To (Arg_List,
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix => New_Reference_To (Ptyp, Loc),
|
||||
Prefix => New_Occurrence_Of (Ptyp, Loc),
|
||||
Attribute_Name => Name_Aft));
|
||||
|
||||
if Has_Decimal_Small (Rtyp) then
|
||||
@ -479,7 +479,7 @@ package body Exp_Imgv is
|
||||
elsif Is_Decimal_Fixed_Point_Type (Rtyp) then
|
||||
Append_To (Arg_List,
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix => New_Reference_To (Ptyp, Loc),
|
||||
Prefix => New_Occurrence_Of (Ptyp, Loc),
|
||||
Attribute_Name => Name_Scale));
|
||||
|
||||
Set_Conversion_OK (First (Arg_List));
|
||||
@ -489,14 +489,15 @@ package body Exp_Imgv is
|
||||
|
||||
elsif Rtyp = Standard_Wide_Character then
|
||||
Append_To (Arg_List,
|
||||
New_Reference_To (Boolean_Literals (Ada_Version >= Ada_2005), Loc));
|
||||
New_Occurrence_Of
|
||||
(Boolean_Literals (Ada_Version >= Ada_2005), Loc));
|
||||
end if;
|
||||
|
||||
-- Now append the procedure call to the insert list
|
||||
|
||||
Append_To (Ins_List,
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name => New_Reference_To (Proc_Ent, Loc),
|
||||
Name => New_Occurrence_Of (Proc_Ent, Loc),
|
||||
Parameter_Associations => Arg_List));
|
||||
|
||||
-- Insert declarations of Snn, Pnn, and the procedure call. We suppress
|
||||
@ -643,13 +644,13 @@ package body Exp_Imgv is
|
||||
|
||||
Append_To (Args,
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix => New_Reference_To (Typ, Loc),
|
||||
Prefix => New_Occurrence_Of (Typ, Loc),
|
||||
Attribute_Name => Name_Scale));
|
||||
|
||||
Rewrite (N,
|
||||
OK_Convert_To (Btyp,
|
||||
Make_Function_Call (Loc,
|
||||
Name => New_Reference_To (RTE (Vid), Loc),
|
||||
Name => New_Occurrence_Of (RTE (Vid), Loc),
|
||||
Parameter_Associations => Args)));
|
||||
|
||||
Set_Etype (N, Btyp);
|
||||
@ -672,7 +673,7 @@ package body Exp_Imgv is
|
||||
then
|
||||
Rewrite (N,
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix => New_Reference_To (Btyp, Loc),
|
||||
Prefix => New_Occurrence_Of (Btyp, Loc),
|
||||
Attribute_Name => Name_Val,
|
||||
Expressions => New_List (
|
||||
Make_Attribute_Reference (Loc,
|
||||
@ -718,12 +719,12 @@ package body Exp_Imgv is
|
||||
|
||||
Rewrite (N,
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix => New_Reference_To (Typ, Loc),
|
||||
Prefix => New_Occurrence_Of (Typ, Loc),
|
||||
Attribute_Name => Name_Val,
|
||||
Expressions => New_List (
|
||||
Make_Function_Call (Loc,
|
||||
Name =>
|
||||
New_Reference_To (RTE (Func), Loc),
|
||||
New_Occurrence_Of (RTE (Func), Loc),
|
||||
Parameter_Associations => Args))));
|
||||
|
||||
Analyze_And_Resolve (N, Btyp);
|
||||
@ -758,7 +759,7 @@ package body Exp_Imgv is
|
||||
Rewrite (N,
|
||||
Convert_To (Btyp,
|
||||
Make_Function_Call (Loc,
|
||||
Name => New_Reference_To (RTE (Vid), Loc),
|
||||
Name => New_Occurrence_Of (RTE (Vid), Loc),
|
||||
Parameter_Associations => Args)));
|
||||
end if;
|
||||
|
||||
@ -826,15 +827,15 @@ package body Exp_Imgv is
|
||||
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name =>
|
||||
New_Reference_To (RTE (RE_String_To_Wide_String), Loc),
|
||||
New_Occurrence_Of (RTE (RE_String_To_Wide_String), Loc),
|
||||
|
||||
Parameter_Associations => New_List (
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix => Prefix (N),
|
||||
Attribute_Name => Name_Image,
|
||||
Expressions => Expressions (N)),
|
||||
New_Reference_To (Rnn, Loc),
|
||||
New_Reference_To (Lnn, Loc),
|
||||
New_Occurrence_Of (Rnn, Loc),
|
||||
New_Occurrence_Of (Lnn, Loc),
|
||||
Make_Integer_Literal (Loc,
|
||||
Intval => Int (Wide_Character_Encoding_Method))))),
|
||||
|
||||
@ -918,15 +919,15 @@ package body Exp_Imgv is
|
||||
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name =>
|
||||
New_Reference_To (RTE (RE_String_To_Wide_Wide_String), Loc),
|
||||
New_Occurrence_Of (RTE (RE_String_To_Wide_Wide_String), Loc),
|
||||
|
||||
Parameter_Associations => New_List (
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix => Prefix (N),
|
||||
Attribute_Name => Name_Image,
|
||||
Expressions => Expressions (N)),
|
||||
New_Reference_To (Rnn, Loc),
|
||||
New_Reference_To (Lnn, Loc),
|
||||
New_Occurrence_Of (Rnn, Loc),
|
||||
New_Occurrence_Of (Lnn, Loc),
|
||||
Make_Integer_Literal (Loc,
|
||||
Intval => Int (Wide_Character_Encoding_Method))))),
|
||||
|
||||
@ -1141,18 +1142,18 @@ package body Exp_Imgv is
|
||||
Make_Op_Gt (Loc,
|
||||
Left_Opnd =>
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix => New_Reference_To (Ptyp, Loc),
|
||||
Prefix => New_Occurrence_Of (Ptyp, Loc),
|
||||
Attribute_Name => Name_First),
|
||||
|
||||
Right_Opnd =>
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix => New_Reference_To (Ptyp, Loc),
|
||||
Prefix => New_Occurrence_Of (Ptyp, Loc),
|
||||
Attribute_Name => Name_Last)),
|
||||
|
||||
Make_Integer_Literal (Loc, 0),
|
||||
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix => New_Reference_To (Base_Type (Ptyp), Loc),
|
||||
Prefix => New_Occurrence_Of (Base_Type (Ptyp), Loc),
|
||||
Attribute_Name => Name_Width))));
|
||||
|
||||
Analyze_And_Resolve (N, Typ);
|
||||
@ -1311,27 +1312,27 @@ package body Exp_Imgv is
|
||||
Attribute_Name => Name_Address),
|
||||
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix => New_Reference_To (Ptyp, Loc),
|
||||
Prefix => New_Occurrence_Of (Ptyp, Loc),
|
||||
Attribute_Name => Name_Pos,
|
||||
|
||||
Expressions => New_List (
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix => New_Reference_To (Ptyp, Loc),
|
||||
Prefix => New_Occurrence_Of (Ptyp, Loc),
|
||||
Attribute_Name => Name_First))),
|
||||
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix => New_Reference_To (Ptyp, Loc),
|
||||
Prefix => New_Occurrence_Of (Ptyp, Loc),
|
||||
Attribute_Name => Name_Pos,
|
||||
|
||||
Expressions => New_List (
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix => New_Reference_To (Ptyp, Loc),
|
||||
Prefix => New_Occurrence_Of (Ptyp, Loc),
|
||||
Attribute_Name => Name_Last))));
|
||||
|
||||
Rewrite (N,
|
||||
Convert_To (Typ,
|
||||
Make_Function_Call (Loc,
|
||||
Name => New_Reference_To (RTE (XX), Loc),
|
||||
Name => New_Occurrence_Of (RTE (XX), Loc),
|
||||
Parameter_Associations => Arglist)));
|
||||
|
||||
Analyze_And_Resolve (N, Typ);
|
||||
@ -1343,18 +1344,18 @@ package body Exp_Imgv is
|
||||
Arglist := New_List (
|
||||
Convert_To (YY,
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix => New_Reference_To (Ptyp, Loc),
|
||||
Prefix => New_Occurrence_Of (Ptyp, Loc),
|
||||
Attribute_Name => Name_First)),
|
||||
|
||||
Convert_To (YY,
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix => New_Reference_To (Ptyp, Loc),
|
||||
Prefix => New_Occurrence_Of (Ptyp, Loc),
|
||||
Attribute_Name => Name_Last)));
|
||||
|
||||
Rewrite (N,
|
||||
Convert_To (Typ,
|
||||
Make_Function_Call (Loc,
|
||||
Name => New_Reference_To (RTE (XX), Loc),
|
||||
Name => New_Occurrence_Of (RTE (XX), Loc),
|
||||
Parameter_Associations => Arglist)));
|
||||
|
||||
Analyze_And_Resolve (N, Typ);
|
||||
|
@ -247,7 +247,7 @@ package body Exp_Intr is
|
||||
|
||||
declare
|
||||
Fname : constant Node_Id :=
|
||||
New_Reference_To (RTE (RE_Secondary_Tag), Loc);
|
||||
New_Occurrence_Of (RTE (RE_Secondary_Tag), Loc);
|
||||
|
||||
begin
|
||||
pragma Assert (not Is_Interface (Etype (Tag_Arg)));
|
||||
@ -256,13 +256,13 @@ package body Exp_Intr is
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => Make_Temporary (Loc, 'V'),
|
||||
Object_Definition =>
|
||||
New_Reference_To (RTE (RE_Tag), Loc),
|
||||
New_Occurrence_Of (RTE (RE_Tag), Loc),
|
||||
Expression =>
|
||||
Make_Function_Call (Loc,
|
||||
Name => Fname,
|
||||
Parameter_Associations => New_List (
|
||||
Relocate_Node (Tag_Arg),
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Node (First_Elmt (Access_Disp_Table
|
||||
(Etype (Etype (Act_Constr))))),
|
||||
Loc))));
|
||||
@ -324,7 +324,7 @@ package body Exp_Intr is
|
||||
Build_CW_Membership (Loc,
|
||||
Obj_Tag_Node => Obj_Tag_Node,
|
||||
Typ_Tag_Node =>
|
||||
New_Reference_To (
|
||||
New_Occurrence_Of (
|
||||
Node (First_Elmt (Access_Disp_Table (
|
||||
Root_Type (Result_Typ)))), Loc),
|
||||
Related_Nod => N,
|
||||
@ -354,7 +354,7 @@ package body Exp_Intr is
|
||||
Prefix => New_Copy_Tree (Tag_Arg),
|
||||
Attribute_Name => Name_Address),
|
||||
|
||||
New_Reference_To (
|
||||
New_Occurrence_Of (
|
||||
Node (First_Elmt (Access_Disp_Table (
|
||||
Root_Type (Result_Typ)))), Loc)))),
|
||||
Then_Statements =>
|
||||
@ -1193,7 +1193,7 @@ package body Exp_Intr is
|
||||
Set_Expression (Free_Node,
|
||||
Unchecked_Convert_To (Typ,
|
||||
Make_Function_Call (Loc,
|
||||
Name => New_Reference_To (RTE (RE_Base_Address), Loc),
|
||||
Name => New_Occurrence_Of (RTE (RE_Base_Address), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
Unchecked_Convert_To (RTE (RE_Address), Free_Arg)))));
|
||||
|
||||
|
@ -319,17 +319,17 @@ package body Exp_Prag is
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => New_Msg,
|
||||
Constant_Present => True,
|
||||
Object_Definition => New_Reference_To (Standard_String, Loc),
|
||||
Object_Definition => New_Occurrence_Of (Standard_String, Loc),
|
||||
Expression =>
|
||||
Make_If_Expression (Loc,
|
||||
Expressions => New_List (
|
||||
New_Reference_To (Flag, Loc),
|
||||
New_Occurrence_Of (Flag, Loc),
|
||||
|
||||
Make_Op_Concat (Loc,
|
||||
Left_Opnd => New_Reference_To (Msg, Loc),
|
||||
Left_Opnd => New_Occurrence_Of (Msg, Loc),
|
||||
Right_Opnd => Make_String_Literal (Loc, End_String)),
|
||||
|
||||
New_Reference_To (Msg, Loc)))));
|
||||
New_Occurrence_Of (Msg, Loc)))));
|
||||
|
||||
Msg := New_Msg;
|
||||
end Case_Guard_Error;
|
||||
@ -352,7 +352,7 @@ package body Exp_Prag is
|
||||
|
||||
Cond :=
|
||||
Make_And_Then (Loc,
|
||||
Left_Opnd => New_Reference_To (Flag, Loc),
|
||||
Left_Opnd => New_Occurrence_Of (Flag, Loc),
|
||||
Right_Opnd =>
|
||||
Make_Op_Not (Loc,
|
||||
Right_Opnd => Relocate_Node (Conseq)));
|
||||
@ -368,7 +368,7 @@ package body Exp_Prag is
|
||||
Error :=
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name =>
|
||||
New_Reference_To (RTE (RE_Raise_Assert_Failure), Loc),
|
||||
New_Occurrence_Of (RTE (RE_Raise_Assert_Failure), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
Make_String_Literal (Loc, End_String)));
|
||||
|
||||
@ -399,8 +399,8 @@ package body Exp_Prag is
|
||||
return
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => Id,
|
||||
Object_Definition => New_Reference_To (Standard_Boolean, Loc),
|
||||
Expression => New_Reference_To (Standard_False, Loc));
|
||||
Object_Definition => New_Occurrence_Of (Standard_Boolean, Loc),
|
||||
Expression => New_Occurrence_Of (Standard_False, Loc));
|
||||
end Declaration_Of;
|
||||
|
||||
-------------------------------
|
||||
@ -444,7 +444,7 @@ package body Exp_Prag is
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => Temp,
|
||||
Object_Definition =>
|
||||
New_Reference_To (Etype (Pref), Loc));
|
||||
New_Occurrence_Of (Etype (Pref), Loc));
|
||||
Set_No_Initialization (Decl);
|
||||
|
||||
Append_To (Decls, Decl);
|
||||
@ -458,7 +458,7 @@ package body Exp_Prag is
|
||||
|
||||
Append_To (Eval_Stmts,
|
||||
Make_Assignment_Statement (Loc,
|
||||
Name => New_Reference_To (Temp, Loc),
|
||||
Name => New_Occurrence_Of (Temp, Loc),
|
||||
Expression => Pref));
|
||||
|
||||
-- Ensure that the prefix is valid
|
||||
@ -470,7 +470,7 @@ package body Exp_Prag is
|
||||
-- Replace the original attribute 'Old by a reference to the
|
||||
-- generated temporary.
|
||||
|
||||
Rewrite (N, New_Reference_To (Temp, Loc));
|
||||
Rewrite (N, New_Occurrence_Of (Temp, Loc));
|
||||
end if;
|
||||
|
||||
return OK;
|
||||
@ -497,7 +497,7 @@ package body Exp_Prag is
|
||||
if No (Evals) then
|
||||
Evals :=
|
||||
Make_Implicit_If_Statement (CCs,
|
||||
Condition => New_Reference_To (Flag, Loc),
|
||||
Condition => New_Occurrence_Of (Flag, Loc),
|
||||
Then_Statements => Eval_Stmts);
|
||||
|
||||
-- Otherwise generate:
|
||||
@ -512,7 +512,7 @@ package body Exp_Prag is
|
||||
|
||||
Append_To (Elsif_Parts (Evals),
|
||||
Make_Elsif_Part (Loc,
|
||||
Condition => New_Reference_To (Flag, Loc),
|
||||
Condition => New_Occurrence_Of (Flag, Loc),
|
||||
Then_Statements => Eval_Stmts));
|
||||
end if;
|
||||
end Expand_Old_In_Consequence;
|
||||
@ -525,10 +525,10 @@ package body Exp_Prag is
|
||||
begin
|
||||
return
|
||||
Make_Assignment_Statement (Loc,
|
||||
Name => New_Reference_To (Id, Loc),
|
||||
Name => New_Occurrence_Of (Id, Loc),
|
||||
Expression =>
|
||||
Make_Op_Add (Loc,
|
||||
Left_Opnd => New_Reference_To (Id, Loc),
|
||||
Left_Opnd => New_Occurrence_Of (Id, Loc),
|
||||
Right_Opnd => Make_Integer_Literal (Loc, 1)));
|
||||
end Increment;
|
||||
|
||||
@ -540,8 +540,8 @@ package body Exp_Prag is
|
||||
begin
|
||||
return
|
||||
Make_Assignment_Statement (Loc,
|
||||
Name => New_Reference_To (Id, Loc),
|
||||
Expression => New_Reference_To (Standard_True, Loc));
|
||||
Name => New_Occurrence_Of (Id, Loc),
|
||||
Expression => New_Occurrence_Of (Standard_True, Loc));
|
||||
end Set;
|
||||
|
||||
-- Local variables
|
||||
@ -590,7 +590,7 @@ package body Exp_Prag is
|
||||
Prepend_To (Decls,
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => Count,
|
||||
Object_Definition => New_Reference_To (Standard_Natural, Loc),
|
||||
Object_Definition => New_Occurrence_Of (Standard_Natural, Loc),
|
||||
Expression => Make_Integer_Literal (Loc, 0)));
|
||||
|
||||
-- Create the base error message for multiple overlapping case guards
|
||||
@ -609,7 +609,7 @@ package body Exp_Prag is
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => Msg_Str,
|
||||
Constant_Present => True,
|
||||
Object_Definition => New_Reference_To (Standard_String, Loc),
|
||||
Object_Definition => New_Occurrence_Of (Standard_String, Loc),
|
||||
Expression => Make_String_Literal (Loc, End_String)));
|
||||
end if;
|
||||
|
||||
@ -726,7 +726,7 @@ package body Exp_Prag is
|
||||
CG_Stmts := New_List (
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name =>
|
||||
New_Reference_To (RTE (RE_Raise_Assert_Failure), Loc),
|
||||
New_Occurrence_Of (RTE (RE_Raise_Assert_Failure), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
Make_String_Literal (Loc, End_String))));
|
||||
end if;
|
||||
@ -735,7 +735,7 @@ package body Exp_Prag is
|
||||
Make_Implicit_If_Statement (CCs,
|
||||
Condition =>
|
||||
Make_Op_Eq (Loc,
|
||||
Left_Opnd => New_Reference_To (Count, Loc),
|
||||
Left_Opnd => New_Occurrence_Of (Count, Loc),
|
||||
Right_Opnd => Make_Integer_Literal (Loc, 0)),
|
||||
Then_Statements => CG_Stmts);
|
||||
|
||||
@ -755,7 +755,7 @@ package body Exp_Prag is
|
||||
Make_Elsif_Part (Loc,
|
||||
Condition =>
|
||||
Make_Op_Gt (Loc,
|
||||
Left_Opnd => New_Reference_To (Count, Loc),
|
||||
Left_Opnd => New_Occurrence_Of (Count, Loc),
|
||||
Right_Opnd => Make_Integer_Literal (Loc, 1)),
|
||||
|
||||
Then_Statements => New_List (
|
||||
@ -766,10 +766,10 @@ package body Exp_Prag is
|
||||
Statements => New_List (
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(RTE (RE_Raise_Assert_Failure), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
New_Reference_To (Msg_Str, Loc))))))))));
|
||||
New_Occurrence_Of (Msg_Str, Loc))))))))));
|
||||
end if;
|
||||
|
||||
Append_To (Decls, CG_Checks);
|
||||
@ -996,7 +996,7 @@ package body Exp_Prag is
|
||||
Then_Statements => New_List (
|
||||
Make_Raise_Statement (Loc,
|
||||
Name =>
|
||||
New_Reference_To (RTE (RE_Assert_Failure), Loc)))));
|
||||
New_Occurrence_Of (RTE (RE_Assert_Failure), Loc)))));
|
||||
|
||||
-- Case where we call the procedure
|
||||
|
||||
@ -1083,7 +1083,7 @@ package body Exp_Prag is
|
||||
Then_Statements => New_List (
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name =>
|
||||
New_Reference_To (RTE (RE_Raise_Assert_Failure), Loc),
|
||||
New_Occurrence_Of (RTE (RE_Raise_Assert_Failure), Loc),
|
||||
Parameter_Associations => New_List (Relocate_Node (Msg))))));
|
||||
end if;
|
||||
|
||||
@ -1376,7 +1376,7 @@ package body Exp_Prag is
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => Excep_Internal,
|
||||
Object_Definition =>
|
||||
New_Reference_To (RTE (RE_Address), Loc));
|
||||
New_Occurrence_Of (RTE (RE_Address), Loc));
|
||||
|
||||
Insert_Action (N, Excep_Object);
|
||||
Analyze (Excep_Object);
|
||||
@ -1396,7 +1396,7 @@ package body Exp_Prag is
|
||||
Pragma_Argument_Associations => New_List (
|
||||
Make_Pragma_Argument_Association (Loc,
|
||||
Expression =>
|
||||
New_Reference_To (Excep_Internal, Loc)),
|
||||
New_Occurrence_Of (Excep_Internal, Loc)),
|
||||
|
||||
Make_Pragma_Argument_Association (Loc,
|
||||
Expression =>
|
||||
@ -1417,7 +1417,7 @@ package body Exp_Prag is
|
||||
|
||||
Make_Pragma_Argument_Association (Loc,
|
||||
Expression =>
|
||||
New_Reference_To (Excep_Internal, Loc)),
|
||||
New_Occurrence_Of (Excep_Internal, Loc)),
|
||||
|
||||
Make_Pragma_Argument_Association (Loc,
|
||||
Expression =>
|
||||
@ -1434,7 +1434,7 @@ package body Exp_Prag is
|
||||
Code :=
|
||||
Make_Function_Call (Loc,
|
||||
Name =>
|
||||
New_Reference_To (RTE (RE_Import_Address), Loc),
|
||||
New_Occurrence_Of (RTE (RE_Import_Address), Loc),
|
||||
Parameter_Associations => New_List
|
||||
(Make_String_Literal (Loc,
|
||||
Strval => Excep_Image)));
|
||||
@ -1444,7 +1444,7 @@ package body Exp_Prag is
|
||||
|
||||
Rewrite (Call,
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name => New_Reference_To
|
||||
Name => New_Occurrence_Of
|
||||
(RTE (RE_Register_VMS_Exception), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
Code,
|
||||
@ -1675,9 +1675,9 @@ package body Exp_Prag is
|
||||
Make_Object_Declaration (Loop_Loc,
|
||||
Defining_Identifier => Flag_Id,
|
||||
Object_Definition =>
|
||||
New_Reference_To (Standard_Boolean, Loop_Loc),
|
||||
New_Occurrence_Of (Standard_Boolean, Loop_Loc),
|
||||
Expression =>
|
||||
New_Reference_To (Standard_False, Loop_Loc)));
|
||||
New_Occurrence_Of (Standard_False, Loop_Loc)));
|
||||
|
||||
-- Prevent an unwanted optimization where the Current_Value of
|
||||
-- the flag eliminates the if statement which stores the variant
|
||||
@ -1706,7 +1706,7 @@ package body Exp_Prag is
|
||||
Insert_Action (Loop_Stmt,
|
||||
Make_Object_Declaration (Loop_Loc,
|
||||
Defining_Identifier => Curr_Id,
|
||||
Object_Definition => New_Reference_To (Expr_Typ, Loop_Loc)));
|
||||
Object_Definition => New_Occurrence_Of (Expr_Typ, Loop_Loc)));
|
||||
|
||||
-- Generate:
|
||||
-- Old : <type of Expr>;
|
||||
@ -1716,7 +1716,7 @@ package body Exp_Prag is
|
||||
Insert_Action (Loop_Stmt,
|
||||
Make_Object_Declaration (Loop_Loc,
|
||||
Defining_Identifier => Old_Id,
|
||||
Object_Definition => New_Reference_To (Expr_Typ, Loop_Loc)));
|
||||
Object_Definition => New_Occurrence_Of (Expr_Typ, Loop_Loc)));
|
||||
|
||||
-- Restore original scope after all temporaries have been analyzed
|
||||
|
||||
@ -1733,8 +1733,8 @@ package body Exp_Prag is
|
||||
|
||||
Append_To (Old_Assign,
|
||||
Make_Assignment_Statement (Loc,
|
||||
Name => New_Reference_To (Old_Id, Loc),
|
||||
Expression => New_Reference_To (Curr_Id, Loc)));
|
||||
Name => New_Occurrence_Of (Old_Id, Loc),
|
||||
Expression => New_Occurrence_Of (Curr_Id, Loc)));
|
||||
|
||||
-- Step 4: Store the current value of the expression
|
||||
|
||||
@ -1747,7 +1747,7 @@ package body Exp_Prag is
|
||||
|
||||
Append_To (Curr_Assign,
|
||||
Make_Assignment_Statement (Loc,
|
||||
Name => New_Reference_To (Curr_Id, Loc),
|
||||
Name => New_Occurrence_Of (Curr_Id, Loc),
|
||||
Expression => Relocate_Node (Expr)));
|
||||
|
||||
-- Step 5: Create corresponding assertion to verify change of value
|
||||
@ -1764,8 +1764,8 @@ package body Exp_Prag is
|
||||
Make_Pragma_Argument_Association (Loc,
|
||||
Expression =>
|
||||
Make_Op (Loc,
|
||||
Curr_Val => New_Reference_To (Curr_Id, Loc),
|
||||
Old_Val => New_Reference_To (Old_Id, Loc)))));
|
||||
Curr_Val => New_Occurrence_Of (Curr_Id, Loc),
|
||||
Old_Val => New_Occurrence_Of (Old_Id, Loc)))));
|
||||
|
||||
-- Generate:
|
||||
-- if Curr /= Old then
|
||||
@ -1783,8 +1783,8 @@ package body Exp_Prag is
|
||||
Make_If_Statement (Loc,
|
||||
Condition =>
|
||||
Make_Op_Ne (Loc,
|
||||
Left_Opnd => New_Reference_To (Curr_Id, Loc),
|
||||
Right_Opnd => New_Reference_To (Old_Id, Loc)),
|
||||
Left_Opnd => New_Occurrence_Of (Curr_Id, Loc),
|
||||
Right_Opnd => New_Occurrence_Of (Old_Id, Loc)),
|
||||
Then_Statements => New_List (Prag));
|
||||
end if;
|
||||
|
||||
@ -1809,8 +1809,8 @@ package body Exp_Prag is
|
||||
Make_Elsif_Part (Loc,
|
||||
Condition =>
|
||||
Make_Op_Ne (Loc,
|
||||
Left_Opnd => New_Reference_To (Curr_Id, Loc),
|
||||
Right_Opnd => New_Reference_To (Old_Id, Loc)),
|
||||
Left_Opnd => New_Occurrence_Of (Curr_Id, Loc),
|
||||
Right_Opnd => New_Occurrence_Of (Old_Id, Loc)),
|
||||
Then_Statements => New_List (Prag)));
|
||||
end if;
|
||||
end Process_Variant;
|
||||
@ -1861,7 +1861,7 @@ package body Exp_Prag is
|
||||
|
||||
Insert_Action (N,
|
||||
Make_If_Statement (Loc,
|
||||
Condition => New_Reference_To (Flag_Id, Loc),
|
||||
Condition => New_Occurrence_Of (Flag_Id, Loc),
|
||||
Then_Statements => Old_Assign));
|
||||
|
||||
-- Update the values of all expressions
|
||||
@ -1878,12 +1878,12 @@ package body Exp_Prag is
|
||||
|
||||
Insert_Action (N,
|
||||
Make_If_Statement (Loc,
|
||||
Condition => New_Reference_To (Flag_Id, Loc),
|
||||
Condition => New_Occurrence_Of (Flag_Id, Loc),
|
||||
Then_Statements => New_List (If_Stmt),
|
||||
Else_Statements => New_List (
|
||||
Make_Assignment_Statement (Loc,
|
||||
Name => New_Reference_To (Flag_Id, Loc),
|
||||
Expression => New_Reference_To (Standard_True, Loc)))));
|
||||
Name => New_Occurrence_Of (Flag_Id, Loc),
|
||||
Expression => New_Occurrence_Of (Standard_True, Loc)))));
|
||||
|
||||
-- Note: the pragma has been completely transformed into a sequence of
|
||||
-- corresponding declarations and statements. We leave it in the tree
|
||||
@ -1919,15 +1919,15 @@ package body Exp_Prag is
|
||||
Rewrite
|
||||
(N,
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name => New_Reference_To (RTE (RE_Set_Deadline), Loc),
|
||||
Name => New_Occurrence_Of (RTE (RE_Set_Deadline), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
Unchecked_Convert_To (RTE (RO_RT_Time),
|
||||
Make_Op_Add (Loc,
|
||||
Left_Opnd =>
|
||||
Make_Function_Call (Loc,
|
||||
New_Reference_To (RTE (RO_RT_To_Duration), Loc),
|
||||
New_Occurrence_Of (RTE (RO_RT_To_Duration), Loc),
|
||||
New_List (Make_Function_Call (Loc,
|
||||
New_Reference_To (RTE (RE_Clock), Loc)))),
|
||||
New_Occurrence_Of (RTE (RE_Clock), Loc)))),
|
||||
Right_Opnd =>
|
||||
Unchecked_Convert_To (Standard_Duration, Arg1 (N)))))));
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
-- --
|
||||
-- B o d y --
|
||||
-- --
|
||||
-- Copyright (C) 1992-2011, Free Software Foundation, Inc. --
|
||||
-- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
|
||||
-- --
|
||||
-- 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- --
|
||||
@ -48,7 +48,7 @@ package body Exp_Sel is
|
||||
begin
|
||||
return
|
||||
Make_Block_Statement (Loc,
|
||||
Identifier => New_Reference_To (Abr_Blk_Ent, Loc),
|
||||
Identifier => New_Occurrence_Of (Abr_Blk_Ent, Loc),
|
||||
|
||||
Declarations => No_List,
|
||||
|
||||
@ -84,13 +84,13 @@ package body Exp_Sel is
|
||||
|
||||
Stmt :=
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name => New_Reference_To (RTE (RE_Abort_Undefer), Loc),
|
||||
Name => New_Occurrence_Of (RTE (RE_Abort_Undefer), Loc),
|
||||
Parameter_Associations => No_List);
|
||||
end if;
|
||||
|
||||
return Make_Implicit_Exception_Handler (Loc,
|
||||
Exception_Choices =>
|
||||
New_List (New_Reference_To (Stand.Abort_Signal, Loc)),
|
||||
New_List (New_Occurrence_Of (Stand.Abort_Signal, Loc)),
|
||||
Statements => New_List (Stmt));
|
||||
end Build_Abort_Block_Handler;
|
||||
|
||||
@ -107,8 +107,8 @@ package body Exp_Sel is
|
||||
Append_To (Decls,
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => B,
|
||||
Object_Definition => New_Reference_To (Standard_Boolean, Loc),
|
||||
Expression => New_Reference_To (Standard_False, Loc)));
|
||||
Object_Definition => New_Occurrence_Of (Standard_Boolean, Loc),
|
||||
Expression => New_Occurrence_Of (Standard_False, Loc)));
|
||||
return B;
|
||||
end Build_B;
|
||||
|
||||
@ -125,7 +125,8 @@ package body Exp_Sel is
|
||||
Append_To (Decls,
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => C,
|
||||
Object_Definition => New_Reference_To (RTE (RE_Prim_Op_Kind), Loc)));
|
||||
Object_Definition =>
|
||||
New_Occurrence_Of (RTE (RE_Prim_Op_Kind), Loc)));
|
||||
return C;
|
||||
end Build_C;
|
||||
|
||||
@ -142,7 +143,7 @@ package body Exp_Sel is
|
||||
Cleanup_Block : constant Node_Id :=
|
||||
Make_Block_Statement (Loc,
|
||||
Identifier =>
|
||||
New_Reference_To (Blk_Ent, Loc),
|
||||
New_Occurrence_Of (Blk_Ent, Loc),
|
||||
Declarations => No_List,
|
||||
Handled_Statement_Sequence =>
|
||||
Make_Handled_Sequence_Of_Statements (Loc,
|
||||
@ -181,10 +182,10 @@ package body Exp_Sel is
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => K,
|
||||
Object_Definition =>
|
||||
New_Reference_To (RTE (RE_Tagged_Kind), Loc),
|
||||
New_Occurrence_Of (RTE (RE_Tagged_Kind), Loc),
|
||||
Expression =>
|
||||
Make_Function_Call (Loc,
|
||||
Name => New_Reference_To (RTE (RE_Get_Tagged_Kind), Loc),
|
||||
Name => New_Occurrence_Of (RTE (RE_Get_Tagged_Kind), Loc),
|
||||
Parameter_Associations => New_List (Tag_Node))));
|
||||
return K;
|
||||
end Build_K;
|
||||
@ -202,7 +203,7 @@ package body Exp_Sel is
|
||||
Append_To (Decls,
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => S,
|
||||
Object_Definition => New_Reference_To (Standard_Integer, Loc)));
|
||||
Object_Definition => New_Occurrence_Of (Standard_Integer, Loc)));
|
||||
return S;
|
||||
end Build_S;
|
||||
|
||||
@ -222,10 +223,10 @@ package body Exp_Sel is
|
||||
if Tagged_Type_Expansion then
|
||||
return
|
||||
Make_Assignment_Statement (Loc,
|
||||
Name => New_Reference_To (S, Loc),
|
||||
Name => New_Occurrence_Of (S, Loc),
|
||||
Expression =>
|
||||
Make_Function_Call (Loc,
|
||||
Name => New_Reference_To (RTE (RE_Get_Offset_Index), Loc),
|
||||
Name => New_Occurrence_Of (RTE (RE_Get_Offset_Index), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
Unchecked_Convert_To (RTE (RE_Tag), Obj),
|
||||
Make_Integer_Literal (Loc, DT_Position (Call_Ent)))));
|
||||
@ -235,10 +236,10 @@ package body Exp_Sel is
|
||||
else
|
||||
return
|
||||
Make_Assignment_Statement (Loc,
|
||||
Name => New_Reference_To (S, Loc),
|
||||
Name => New_Occurrence_Of (S, Loc),
|
||||
Expression =>
|
||||
Make_Function_Call (Loc,
|
||||
Name => New_Reference_To (RTE (RE_Get_Offset_Index), Loc),
|
||||
Name => New_Occurrence_Of (RTE (RE_Get_Offset_Index), Loc),
|
||||
|
||||
Parameter_Associations => New_List (
|
||||
|
||||
@ -251,7 +252,7 @@ package body Exp_Sel is
|
||||
-- Iface_Typ
|
||||
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix => New_Reference_To (Typ, Loc),
|
||||
Prefix => New_Occurrence_Of (Typ, Loc),
|
||||
Attribute_Name => Name_Tag),
|
||||
|
||||
-- Position
|
||||
|
@ -6,7 +6,7 @@
|
||||
-- --
|
||||
-- B o d y --
|
||||
-- --
|
||||
-- Copyright (C) 1992-2011, Free Software Foundation, Inc. --
|
||||
-- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
|
||||
-- --
|
||||
-- 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- --
|
||||
@ -1171,7 +1171,7 @@ package body Exp_Strm is
|
||||
Make_Raise_Constraint_Error (Loc,
|
||||
Condition => Make_Op_Ne (Loc,
|
||||
Left_Opnd =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Defining_Identifier (Decl), Loc),
|
||||
Right_Opnd =>
|
||||
New_Copy_Tree (Node (Discr_Elmt))),
|
||||
@ -1600,7 +1600,7 @@ package body Exp_Strm is
|
||||
Parameter_Type =>
|
||||
Make_Access_Definition (Loc,
|
||||
Null_Exclusion_Present => True,
|
||||
Subtype_Mark => New_Reference_To (
|
||||
Subtype_Mark => New_Occurrence_Of (
|
||||
Class_Wide_Type (RTE (RE_Root_Stream_Type)), Loc))));
|
||||
|
||||
if Nam /= TSS_Stream_Input then
|
||||
@ -1608,7 +1608,7 @@ package body Exp_Strm is
|
||||
Make_Parameter_Specification (Loc,
|
||||
Defining_Identifier => Make_Defining_Identifier (Loc, Name_V),
|
||||
Out_Present => (Nam = TSS_Stream_Read),
|
||||
Parameter_Type => New_Reference_To (Typ, Loc)));
|
||||
Parameter_Type => New_Occurrence_Of (Typ, Loc)));
|
||||
end if;
|
||||
|
||||
return Profile;
|
||||
@ -1644,7 +1644,7 @@ package body Exp_Strm is
|
||||
Parameter_Type =>
|
||||
Make_Access_Definition (Loc,
|
||||
Null_Exclusion_Present => True,
|
||||
Subtype_Mark => New_Reference_To (
|
||||
Subtype_Mark => New_Occurrence_Of (
|
||||
Class_Wide_Type (RTE (RE_Root_Stream_Type)), Loc)))),
|
||||
|
||||
Result_Definition => New_Occurrence_Of (Typ, Loc));
|
||||
@ -1688,7 +1688,7 @@ package body Exp_Strm is
|
||||
Parameter_Type =>
|
||||
Make_Access_Definition (Loc,
|
||||
Null_Exclusion_Present => True,
|
||||
Subtype_Mark => New_Reference_To (
|
||||
Subtype_Mark => New_Occurrence_Of (
|
||||
Class_Wide_Type (RTE (RE_Root_Stream_Type)), Loc))),
|
||||
|
||||
Make_Parameter_Specification (Loc,
|
||||
|
@ -718,7 +718,7 @@ package body Exp_Util is
|
||||
|
||||
-- a) Storage pool
|
||||
|
||||
Actuals := New_List (New_Reference_To (Pool_Id, Loc));
|
||||
Actuals := New_List (New_Occurrence_Of (Pool_Id, Loc));
|
||||
|
||||
if Is_Allocate then
|
||||
|
||||
@ -741,7 +741,7 @@ package body Exp_Util is
|
||||
|
||||
if Needs_Finalization (Desig_Typ) then
|
||||
Fin_Mas_Id := Finalization_Master (Ptr_Typ);
|
||||
Fin_Mas_Act := New_Reference_To (Fin_Mas_Id, Loc);
|
||||
Fin_Mas_Act := New_Occurrence_Of (Fin_Mas_Id, Loc);
|
||||
|
||||
-- Handle the case where the master is actually a pointer to a
|
||||
-- master. This case arises in build-in-place functions.
|
||||
@ -769,7 +769,7 @@ package body Exp_Util is
|
||||
|
||||
Append_To (Actuals,
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix => New_Reference_To (Fin_Addr_Id, Loc),
|
||||
Prefix => New_Occurrence_Of (Fin_Addr_Id, Loc),
|
||||
Attribute_Name => Name_Unrestricted_Access));
|
||||
else
|
||||
Append_To (Actuals, Make_Null (Loc));
|
||||
@ -780,11 +780,11 @@ package body Exp_Util is
|
||||
-- f) Storage_Size
|
||||
-- g) Alignment
|
||||
|
||||
Append_To (Actuals, New_Reference_To (Addr_Id, Loc));
|
||||
Append_To (Actuals, New_Reference_To (Size_Id, Loc));
|
||||
Append_To (Actuals, New_Occurrence_Of (Addr_Id, Loc));
|
||||
Append_To (Actuals, New_Occurrence_Of (Size_Id, Loc));
|
||||
|
||||
if Is_Allocate or else not Is_Class_Wide_Type (Desig_Typ) then
|
||||
Append_To (Actuals, New_Reference_To (Alig_Id, Loc));
|
||||
Append_To (Actuals, New_Occurrence_Of (Alig_Id, Loc));
|
||||
|
||||
-- For deallocation of class wide types we obtain the value of
|
||||
-- alignment from the Type Specific Record of the deallocated object.
|
||||
@ -831,7 +831,7 @@ package body Exp_Util is
|
||||
and then Is_Type (Entity (Temp))
|
||||
then
|
||||
Flag_Expr :=
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Boolean_Literals
|
||||
(Needs_Finalization (Entity (Temp))), Loc);
|
||||
|
||||
@ -875,21 +875,21 @@ package body Exp_Util is
|
||||
Flag_Expr :=
|
||||
Make_Function_Call (Loc,
|
||||
Name =>
|
||||
New_Reference_To (RTE (RE_Needs_Finalization), Loc),
|
||||
New_Occurrence_Of (RTE (RE_Needs_Finalization), Loc),
|
||||
Parameter_Associations => New_List (Param));
|
||||
|
||||
-- Processing for generic actuals
|
||||
|
||||
elsif Is_Generic_Actual_Type (Desig_Typ) then
|
||||
Flag_Expr :=
|
||||
New_Reference_To (Boolean_Literals
|
||||
New_Occurrence_Of (Boolean_Literals
|
||||
(Needs_Finalization (Base_Type (Desig_Typ))), Loc);
|
||||
|
||||
-- The object does not require any specialized checks, it is
|
||||
-- known to be controlled.
|
||||
|
||||
else
|
||||
Flag_Expr := New_Reference_To (Standard_True, Loc);
|
||||
Flag_Expr := New_Occurrence_Of (Standard_True, Loc);
|
||||
end if;
|
||||
|
||||
-- Create the temporary which represents the finalization state
|
||||
@ -902,23 +902,23 @@ package body Exp_Util is
|
||||
Defining_Identifier => Flag_Id,
|
||||
Constant_Present => True,
|
||||
Object_Definition =>
|
||||
New_Reference_To (Standard_Boolean, Loc),
|
||||
New_Occurrence_Of (Standard_Boolean, Loc),
|
||||
Expression => Flag_Expr));
|
||||
|
||||
Append_To (Actuals, New_Reference_To (Flag_Id, Loc));
|
||||
Append_To (Actuals, New_Occurrence_Of (Flag_Id, Loc));
|
||||
end;
|
||||
|
||||
-- The object is not controlled
|
||||
|
||||
else
|
||||
Append_To (Actuals, New_Reference_To (Standard_False, Loc));
|
||||
Append_To (Actuals, New_Occurrence_Of (Standard_False, Loc));
|
||||
end if;
|
||||
|
||||
-- i) On_Subpool
|
||||
|
||||
if Is_Allocate then
|
||||
Append_To (Actuals,
|
||||
New_Reference_To (Boolean_Literals (Present (Subpool)), Loc));
|
||||
New_Occurrence_Of (Boolean_Literals (Present (Subpool)), Loc));
|
||||
end if;
|
||||
|
||||
-- Step 2: Build a wrapper Allocate / Deallocate which internally
|
||||
@ -950,7 +950,7 @@ package body Exp_Util is
|
||||
Make_Parameter_Specification (Loc,
|
||||
Defining_Identifier => Make_Temporary (Loc, 'P'),
|
||||
Parameter_Type =>
|
||||
New_Reference_To (RTE (RE_Root_Storage_Pool), Loc)),
|
||||
New_Occurrence_Of (RTE (RE_Root_Storage_Pool), Loc)),
|
||||
|
||||
-- A : [out] Address
|
||||
|
||||
@ -958,21 +958,21 @@ package body Exp_Util is
|
||||
Defining_Identifier => Addr_Id,
|
||||
Out_Present => Is_Allocate,
|
||||
Parameter_Type =>
|
||||
New_Reference_To (RTE (RE_Address), Loc)),
|
||||
New_Occurrence_Of (RTE (RE_Address), Loc)),
|
||||
|
||||
-- S : Storage_Count
|
||||
|
||||
Make_Parameter_Specification (Loc,
|
||||
Defining_Identifier => Size_Id,
|
||||
Parameter_Type =>
|
||||
New_Reference_To (RTE (RE_Storage_Count), Loc)),
|
||||
New_Occurrence_Of (RTE (RE_Storage_Count), Loc)),
|
||||
|
||||
-- L : Storage_Count
|
||||
|
||||
Make_Parameter_Specification (Loc,
|
||||
Defining_Identifier => Alig_Id,
|
||||
Parameter_Type =>
|
||||
New_Reference_To (RTE (RE_Storage_Count), Loc)))),
|
||||
New_Occurrence_Of (RTE (RE_Storage_Count), Loc)))),
|
||||
|
||||
Declarations => No_List,
|
||||
|
||||
@ -980,7 +980,7 @@ package body Exp_Util is
|
||||
Make_Handled_Sequence_Of_Statements (Loc,
|
||||
Statements => New_List (
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name => New_Reference_To (Proc_To_Call, Loc),
|
||||
Name => New_Occurrence_Of (Proc_To_Call, Loc),
|
||||
Parameter_Associations => Actuals)))));
|
||||
|
||||
-- The newly generated Allocate / Deallocate becomes the default
|
||||
@ -1009,7 +1009,7 @@ package body Exp_Util is
|
||||
else
|
||||
return
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name => New_Reference_To (RTE (RE), Loc));
|
||||
Name => New_Occurrence_Of (RTE (RE), Loc));
|
||||
end if;
|
||||
end Build_Runtime_Call;
|
||||
|
||||
@ -2097,11 +2097,11 @@ package body Exp_Util is
|
||||
begin
|
||||
Rewrite (Subtype_Indic,
|
||||
Make_Subtype_Indication (Loc,
|
||||
Subtype_Mark => New_Reference_To (Unc_Type, Loc),
|
||||
Subtype_Mark => New_Occurrence_Of (Unc_Type, Loc),
|
||||
Constraint =>
|
||||
Make_Index_Or_Discriminant_Constraint (Loc,
|
||||
Constraints => New_List
|
||||
(New_Reference_To (Slice_Type, Loc)))));
|
||||
(New_Occurrence_Of (Slice_Type, Loc)))));
|
||||
|
||||
-- This subtype indication may be used later for constraint checks
|
||||
-- we better make sure that if a variable was used as a bound of
|
||||
@ -2113,7 +2113,7 @@ package body Exp_Util is
|
||||
elsif Ekind (Exp_Typ) = E_String_Literal_Subtype then
|
||||
Rewrite (Subtype_Indic,
|
||||
Make_Subtype_Indication (Loc,
|
||||
Subtype_Mark => New_Reference_To (Unc_Type, Loc),
|
||||
Subtype_Mark => New_Occurrence_Of (Unc_Type, Loc),
|
||||
Constraint =>
|
||||
Make_Index_Or_Discriminant_Constraint (Loc,
|
||||
Constraints => New_List (
|
||||
@ -2169,7 +2169,7 @@ package body Exp_Util is
|
||||
Insert_Action (N,
|
||||
Make_Subtype_Declaration (Loc,
|
||||
Defining_Identifier => T,
|
||||
Subtype_Indication => New_Reference_To (Exp_Typ, Loc)));
|
||||
Subtype_Indication => New_Occurrence_Of (Exp_Typ, Loc)));
|
||||
|
||||
-- This type is marked as an itype even though it has an explicit
|
||||
-- declaration since otherwise Is_Generic_Actual_Type can get
|
||||
@ -2180,7 +2180,7 @@ package body Exp_Util is
|
||||
Set_Associated_Node_For_Itype (T, Exp);
|
||||
end if;
|
||||
|
||||
Rewrite (Subtype_Indic, New_Reference_To (T, Loc));
|
||||
Rewrite (Subtype_Indic, New_Occurrence_Of (T, Loc));
|
||||
|
||||
-- Nothing needs to be done for private types with unknown discriminants
|
||||
-- if the underlying type is not an unconstrained composite type or it
|
||||
@ -5532,7 +5532,7 @@ package body Exp_Util is
|
||||
Attribute_Name => Name_Size),
|
||||
Right_Opnd =>
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix => New_Reference_To (Constr_Root, Loc),
|
||||
Prefix => New_Occurrence_Of (Constr_Root, Loc),
|
||||
Attribute_Name => Name_Object_Size));
|
||||
else
|
||||
-- subtype rg__xx is
|
||||
@ -5552,7 +5552,7 @@ package body Exp_Util is
|
||||
Defining_Identifier => Range_Type,
|
||||
Subtype_Indication =>
|
||||
Make_Subtype_Indication (Loc,
|
||||
Subtype_Mark => New_Reference_To (RTE (RE_Storage_Offset), Loc),
|
||||
Subtype_Mark => New_Occurrence_Of (RTE (RE_Storage_Offset), Loc),
|
||||
Constraint => Make_Range_Constraint (Loc,
|
||||
Range_Expression =>
|
||||
Make_Range (Loc,
|
||||
@ -5571,11 +5571,11 @@ package body Exp_Util is
|
||||
Defining_Identifier => Str_Type,
|
||||
Subtype_Indication =>
|
||||
Make_Subtype_Indication (Loc,
|
||||
Subtype_Mark => New_Reference_To (RTE (RE_Storage_Array), Loc),
|
||||
Subtype_Mark => New_Occurrence_Of (RTE (RE_Storage_Array), Loc),
|
||||
Constraint =>
|
||||
Make_Index_Or_Discriminant_Constraint (Loc,
|
||||
Constraints =>
|
||||
New_List (New_Reference_To (Range_Type, Loc))))));
|
||||
New_List (New_Occurrence_Of (Range_Type, Loc))))));
|
||||
|
||||
-- type Equiv_T is record
|
||||
-- [ _parent : Tnn; ]
|
||||
@ -5602,7 +5602,7 @@ package body Exp_Util is
|
||||
Component_Definition =>
|
||||
Make_Component_Definition (Loc,
|
||||
Aliased_Present => False,
|
||||
Subtype_Indication => New_Reference_To (Constr_Root, Loc))));
|
||||
Subtype_Indication => New_Occurrence_Of (Constr_Root, Loc))));
|
||||
end if;
|
||||
|
||||
Append_To (Comp_List,
|
||||
@ -5611,7 +5611,7 @@ package body Exp_Util is
|
||||
Component_Definition =>
|
||||
Make_Component_Definition (Loc,
|
||||
Aliased_Present => False,
|
||||
Subtype_Indication => New_Reference_To (Str_Type, Loc))));
|
||||
Subtype_Indication => New_Occurrence_Of (Str_Type, Loc))));
|
||||
|
||||
Append_To (List_Def,
|
||||
Make_Full_Type_Declaration (Loc,
|
||||
@ -5882,7 +5882,7 @@ package body Exp_Util is
|
||||
|
||||
Set_Full_View (Priv_Subtyp, Full_Subtyp);
|
||||
|
||||
return New_Reference_To (Priv_Subtyp, Loc);
|
||||
return New_Occurrence_Of (Priv_Subtyp, Loc);
|
||||
|
||||
elsif Is_Array_Type (Unc_Typ) then
|
||||
for J in 1 .. Number_Dimensions (Unc_Typ) loop
|
||||
@ -5947,7 +5947,7 @@ package body Exp_Util is
|
||||
Append_To (List_Constr,
|
||||
Make_Selected_Component (Loc,
|
||||
Prefix => Duplicate_Subexpr_No_Checks (E),
|
||||
Selector_Name => New_Reference_To (D, Loc)));
|
||||
Selector_Name => New_Occurrence_Of (D, Loc)));
|
||||
|
||||
Next_Discriminant (D);
|
||||
end loop;
|
||||
@ -5955,7 +5955,7 @@ package body Exp_Util is
|
||||
|
||||
return
|
||||
Make_Subtype_Indication (Loc,
|
||||
Subtype_Mark => New_Reference_To (Unc_Typ, Loc),
|
||||
Subtype_Mark => New_Occurrence_Of (Unc_Typ, Loc),
|
||||
Constraint =>
|
||||
Make_Index_Or_Discriminant_Constraint (Loc,
|
||||
Constraints => List_Constr));
|
||||
@ -6696,7 +6696,7 @@ package body Exp_Util is
|
||||
then
|
||||
Def_Id := Make_Temporary (Loc, 'R', Exp);
|
||||
Set_Etype (Def_Id, Exp_Type);
|
||||
Res := New_Reference_To (Def_Id, Loc);
|
||||
Res := New_Occurrence_Of (Def_Id, Loc);
|
||||
|
||||
-- If the expression is a packed reference, it must be reanalyzed and
|
||||
-- expanded, depending on context. This is the case for actuals where
|
||||
@ -6713,7 +6713,7 @@ package body Exp_Util is
|
||||
E :=
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => Def_Id,
|
||||
Object_Definition => New_Reference_To (Exp_Type, Loc),
|
||||
Object_Definition => New_Occurrence_Of (Exp_Type, Loc),
|
||||
Constant_Present => True,
|
||||
Expression => Relocate_Node (Exp));
|
||||
|
||||
@ -6726,13 +6726,13 @@ package body Exp_Util is
|
||||
elsif Nkind (Exp) = N_Explicit_Dereference then
|
||||
Def_Id := Make_Temporary (Loc, 'R', Exp);
|
||||
Res :=
|
||||
Make_Explicit_Dereference (Loc, New_Reference_To (Def_Id, Loc));
|
||||
Make_Explicit_Dereference (Loc, New_Occurrence_Of (Def_Id, Loc));
|
||||
|
||||
Insert_Action (Exp,
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => Def_Id,
|
||||
Object_Definition =>
|
||||
New_Reference_To (Etype (Prefix (Exp)), Loc),
|
||||
New_Occurrence_Of (Etype (Prefix (Exp)), Loc),
|
||||
Constant_Present => True,
|
||||
Expression => Relocate_Node (Prefix (Exp))));
|
||||
|
||||
@ -6767,23 +6767,23 @@ package body Exp_Util is
|
||||
-- a controlled temporary.
|
||||
|
||||
Def_Id := Make_Temporary (Loc, 'R', Exp);
|
||||
Res := New_Reference_To (Def_Id, Loc);
|
||||
Res := New_Occurrence_Of (Def_Id, Loc);
|
||||
|
||||
Insert_Action (Exp,
|
||||
Make_Object_Renaming_Declaration (Loc,
|
||||
Defining_Identifier => Def_Id,
|
||||
Subtype_Mark => New_Reference_To (Exp_Type, Loc),
|
||||
Subtype_Mark => New_Occurrence_Of (Exp_Type, Loc),
|
||||
Name => Relocate_Node (Exp)));
|
||||
|
||||
else
|
||||
Def_Id := Make_Temporary (Loc, 'R', Exp);
|
||||
Set_Etype (Def_Id, Exp_Type);
|
||||
Res := New_Reference_To (Def_Id, Loc);
|
||||
Res := New_Occurrence_Of (Def_Id, Loc);
|
||||
|
||||
E :=
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => Def_Id,
|
||||
Object_Definition => New_Reference_To (Exp_Type, Loc),
|
||||
Object_Definition => New_Occurrence_Of (Exp_Type, Loc),
|
||||
Constant_Present => not Is_Variable (Exp),
|
||||
Expression => Relocate_Node (Exp));
|
||||
|
||||
@ -6828,16 +6828,16 @@ package body Exp_Util is
|
||||
Make_Object_Renaming_Declaration (Loc,
|
||||
Defining_Identifier => Def_Id,
|
||||
Subtype_Mark =>
|
||||
New_Reference_To (Base_Type (Etype (Prefix (Exp))), Loc),
|
||||
New_Occurrence_Of (Base_Type (Etype (Prefix (Exp))), Loc),
|
||||
Name => Relocate_Node (Prefix (Exp))));
|
||||
|
||||
else
|
||||
Res := New_Reference_To (Def_Id, Loc);
|
||||
Res := New_Occurrence_Of (Def_Id, Loc);
|
||||
|
||||
Insert_Action (Exp,
|
||||
Make_Object_Renaming_Declaration (Loc,
|
||||
Defining_Identifier => Def_Id,
|
||||
Subtype_Mark => New_Reference_To (Exp_Type, Loc),
|
||||
Subtype_Mark => New_Occurrence_Of (Exp_Type, Loc),
|
||||
Name => Relocate_Node (Exp)));
|
||||
end if;
|
||||
|
||||
@ -6910,7 +6910,7 @@ package body Exp_Util is
|
||||
-- and "copies" the returned object.
|
||||
|
||||
if GNATprove_Mode then
|
||||
Res := New_Reference_To (Def_Id, Loc);
|
||||
Res := New_Occurrence_Of (Def_Id, Loc);
|
||||
Ref_Type := Exp_Type;
|
||||
|
||||
-- Regular expansion utilizing an access type and 'reference
|
||||
@ -6918,7 +6918,7 @@ package body Exp_Util is
|
||||
else
|
||||
Res :=
|
||||
Make_Explicit_Dereference (Loc,
|
||||
Prefix => New_Reference_To (Def_Id, Loc));
|
||||
Prefix => New_Occurrence_Of (Def_Id, Loc));
|
||||
|
||||
-- Generate:
|
||||
-- type Ann is access all <Exp_Type>;
|
||||
@ -6932,7 +6932,7 @@ package body Exp_Util is
|
||||
Make_Access_To_Object_Definition (Loc,
|
||||
All_Present => True,
|
||||
Subtype_Indication =>
|
||||
New_Reference_To (Exp_Type, Loc)));
|
||||
New_Occurrence_Of (Exp_Type, Loc)));
|
||||
|
||||
Insert_Action (Exp, Ptr_Typ_Decl);
|
||||
end if;
|
||||
@ -6981,7 +6981,7 @@ package body Exp_Util is
|
||||
Insert_Action (Exp,
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => Def_Id,
|
||||
Object_Definition => New_Reference_To (Ref_Type, Loc),
|
||||
Object_Definition => New_Occurrence_Of (Ref_Type, Loc),
|
||||
Constant_Present => True,
|
||||
Expression => New_Exp));
|
||||
end if;
|
||||
|
@ -350,7 +350,7 @@ package body Freeze is
|
||||
then
|
||||
Call_Name := New_Copy (Name (N));
|
||||
else
|
||||
Call_Name := New_Reference_To (Old_S, Loc);
|
||||
Call_Name := New_Occurrence_Of (Old_S, Loc);
|
||||
end if;
|
||||
|
||||
else
|
||||
@ -432,7 +432,7 @@ package body Freeze is
|
||||
|
||||
if Present (Formal) then
|
||||
while Present (Formal) loop
|
||||
Append (New_Reference_To (Formal, Loc), Actuals);
|
||||
Append (New_Occurrence_Of (Formal, Loc), Actuals);
|
||||
Next_Formal (Formal);
|
||||
end loop;
|
||||
end if;
|
||||
|
@ -429,9 +429,23 @@ package body Util is
|
||||
Error_Msg_SC -- CODEFIX
|
||||
("|extra ""("" ignored");
|
||||
|
||||
-- Note: the following error used to be labeled as a non-serious
|
||||
-- error like the other similar messages here (with a | at the start
|
||||
-- of the message). But this caused some annoying cascaded errors
|
||||
-- that were confusing, as shown by this example:
|
||||
|
||||
-- A : array (1 .. 9) of Integer :=
|
||||
-- ((1 .. 2) => 0,
|
||||
-- 1 2 3
|
||||
-- >>> positional aggregate cannot have one component
|
||||
-- >>> named association cannot follow positional association
|
||||
-- >>> extra ")" ignored
|
||||
|
||||
-- So we decided to label it as serious after all
|
||||
|
||||
elsif T = Tok_Right_Paren then
|
||||
Error_Msg_SC -- CODEFIX
|
||||
("|extra "")"" ignored");
|
||||
("extra "")"" ignored");
|
||||
|
||||
elsif T = Tok_Semicolon then
|
||||
Error_Msg_SC -- CODEFIX
|
||||
|
@ -806,7 +806,7 @@ package body Rtsfind is
|
||||
Scop : Entity_Id;
|
||||
|
||||
begin
|
||||
Nam := New_Reference_To (U.Entity, Standard_Location);
|
||||
Nam := New_Occurrence_Of (U.Entity, Standard_Location);
|
||||
Scop := Scope (U.Entity);
|
||||
|
||||
if Nkind (N) = N_Defining_Program_Unit_Name then
|
||||
@ -814,7 +814,7 @@ package body Rtsfind is
|
||||
Nam :=
|
||||
Make_Expanded_Name (Standard_Location,
|
||||
Chars => Chars (U.Entity),
|
||||
Prefix => New_Reference_To (Scop, Standard_Location),
|
||||
Prefix => New_Occurrence_Of (Scop, Standard_Location),
|
||||
Selector_Name => Nam);
|
||||
Set_Entity (Nam, U.Entity);
|
||||
|
||||
|
@ -1377,7 +1377,7 @@ package body Sem_Aggr is
|
||||
Expr :=
|
||||
Make_Attribute_Reference
|
||||
(Loc,
|
||||
Prefix => New_Reference_To (Index_Typ, Loc),
|
||||
Prefix => New_Occurrence_Of (Index_Typ, Loc),
|
||||
Attribute_Name => Name_Val,
|
||||
Expressions => New_List (Expr_Pos));
|
||||
end if;
|
||||
@ -1400,7 +1400,7 @@ package body Sem_Aggr is
|
||||
To_Pos :=
|
||||
Make_Attribute_Reference
|
||||
(Loc,
|
||||
Prefix => New_Reference_To (Index_Typ, Loc),
|
||||
Prefix => New_Occurrence_Of (Index_Typ, Loc),
|
||||
Attribute_Name => Name_Pos,
|
||||
Expressions => New_List (Duplicate_Subexpr (To)));
|
||||
|
||||
@ -1412,7 +1412,7 @@ package body Sem_Aggr is
|
||||
Expr :=
|
||||
Make_Attribute_Reference
|
||||
(Loc,
|
||||
Prefix => New_Reference_To (Index_Typ, Loc),
|
||||
Prefix => New_Occurrence_Of (Index_Typ, Loc),
|
||||
Attribute_Name => Name_Val,
|
||||
Expressions => New_List (Expr_Pos));
|
||||
|
||||
@ -1432,11 +1432,12 @@ package body Sem_Aggr is
|
||||
Insert_Action (N,
|
||||
Make_Object_Declaration (Loc,
|
||||
Defining_Identifier => Def_Id,
|
||||
Object_Definition => New_Reference_To (Index_Typ, Loc),
|
||||
Object_Definition =>
|
||||
New_Occurrence_Of (Index_Typ, Loc),
|
||||
Constant_Present => True,
|
||||
Expression => Relocate_Node (Expr)));
|
||||
|
||||
Expr := New_Reference_To (Def_Id, Loc);
|
||||
Expr := New_Occurrence_Of (Def_Id, Loc);
|
||||
end;
|
||||
end if;
|
||||
end if;
|
||||
|
@ -2507,7 +2507,7 @@ package body Sem_Attr is
|
||||
|
||||
when Attribute_Abort_Signal =>
|
||||
Check_Standard_Prefix;
|
||||
Rewrite (N, New_Reference_To (Stand.Abort_Signal, Loc));
|
||||
Rewrite (N, New_Occurrence_Of (Stand.Abort_Signal, Loc));
|
||||
Analyze (N);
|
||||
|
||||
------------
|
||||
@ -2776,7 +2776,7 @@ package body Sem_Attr is
|
||||
|
||||
Set_Etype (N, Base_Type (Entity (P)));
|
||||
Set_Entity (N, Base_Type (Entity (P)));
|
||||
Rewrite (N, New_Reference_To (Entity (N), Loc));
|
||||
Rewrite (N, New_Occurrence_Of (Entity (N), Loc));
|
||||
Analyze (N);
|
||||
end Base;
|
||||
|
||||
@ -7783,7 +7783,7 @@ package body Sem_Attr is
|
||||
elsif Is_VAX_Float (P_Type)
|
||||
and then Nkind (Lo_Bound) = N_Identifier
|
||||
then
|
||||
Rewrite (N, New_Reference_To (Entity (Lo_Bound), Sloc (N)));
|
||||
Rewrite (N, New_Occurrence_Of (Entity (Lo_Bound), Sloc (N)));
|
||||
Analyze (N);
|
||||
|
||||
else
|
||||
@ -8027,7 +8027,7 @@ package body Sem_Attr is
|
||||
elsif Is_VAX_Float (P_Type)
|
||||
and then Nkind (Hi_Bound) = N_Identifier
|
||||
then
|
||||
Rewrite (N, New_Reference_To (Entity (Hi_Bound), Sloc (N)));
|
||||
Rewrite (N, New_Occurrence_Of (Entity (Hi_Bound), Sloc (N)));
|
||||
Analyze (N);
|
||||
|
||||
else
|
||||
|
@ -2379,7 +2379,7 @@ package body Sem_Ch10 is
|
||||
Name =>
|
||||
Make_Identifier (Loc,
|
||||
Chars => New_External_Name (Chars (Etype (Nam)), 'E')),
|
||||
Expression => New_Reference_To (Standard_True, Loc)));
|
||||
Expression => New_Occurrence_Of (Standard_True, Loc)));
|
||||
end if;
|
||||
end if;
|
||||
end Analyze_Task_Body_Stub;
|
||||
@ -3170,7 +3170,7 @@ package body Sem_Ch10 is
|
||||
|
||||
function Build_Ancestor_Name (P : Node_Id) return Node_Id is
|
||||
P_Ref : constant Node_Id :=
|
||||
New_Reference_To (Defining_Entity (P), Loc);
|
||||
New_Occurrence_Of (Defining_Entity (P), Loc);
|
||||
P_Spec : Node_Id := P;
|
||||
|
||||
begin
|
||||
@ -3202,14 +3202,14 @@ package body Sem_Ch10 is
|
||||
|
||||
begin
|
||||
if No (Parent_Spec (P_Unit)) then
|
||||
return New_Reference_To (P_Name, Loc);
|
||||
return New_Occurrence_Of (P_Name, Loc);
|
||||
|
||||
else
|
||||
Result :=
|
||||
Make_Expanded_Name (Loc,
|
||||
Chars => Chars (P_Name),
|
||||
Prefix => Build_Ancestor_Name (Unit (Parent_Spec (P_Unit))),
|
||||
Selector_Name => New_Reference_To (P_Name, Loc));
|
||||
Selector_Name => New_Occurrence_Of (P_Name, Loc));
|
||||
Set_Entity (Result, P_Name);
|
||||
return Result;
|
||||
end if;
|
||||
@ -3945,7 +3945,7 @@ package body Sem_Ch10 is
|
||||
-- a parent unit that has limited with-clauses.
|
||||
|
||||
Set_Subtype_Indication (Decl,
|
||||
New_Reference_To (Non_Lim_View, Sloc (Def_Id)));
|
||||
New_Occurrence_Of (Non_Lim_View, Sloc (Def_Id)));
|
||||
Set_Etype (Def_Id, Non_Lim_View);
|
||||
Set_Ekind (Def_Id, Subtype_Kind (Ekind (Non_Lim_View)));
|
||||
Set_Analyzed (Decl, False);
|
||||
|
@ -1931,13 +1931,13 @@ package body Sem_Ch12 is
|
||||
Lo :=
|
||||
Make_Attribute_Reference (Loc,
|
||||
Attribute_Name => Name_First,
|
||||
Prefix => New_Reference_To (T, Loc));
|
||||
Prefix => New_Occurrence_Of (T, Loc));
|
||||
Set_Etype (Lo, T);
|
||||
|
||||
Hi :=
|
||||
Make_Attribute_Reference (Loc,
|
||||
Attribute_Name => Name_Last,
|
||||
Prefix => New_Reference_To (T, Loc));
|
||||
Prefix => New_Occurrence_Of (T, Loc));
|
||||
Set_Etype (Hi, T);
|
||||
|
||||
Set_Scalar_Range (T,
|
||||
@ -2143,7 +2143,7 @@ package body Sem_Ch12 is
|
||||
then
|
||||
declare
|
||||
Non_Freezing_Ref : constant Node_Id :=
|
||||
New_Reference_To (Id, Sloc (Id));
|
||||
New_Occurrence_Of (Id, Sloc (Id));
|
||||
Decl : Node_Id;
|
||||
|
||||
begin
|
||||
@ -3598,7 +3598,7 @@ package body Sem_Ch12 is
|
||||
Make_Package_Renaming_Declaration (Loc,
|
||||
Defining_Unit_Name =>
|
||||
Make_Defining_Identifier (Loc, Chars (Gen_Unit)),
|
||||
Name => New_Reference_To (Act_Decl_Id, Loc));
|
||||
Name => New_Occurrence_Of (Act_Decl_Id, Loc));
|
||||
|
||||
Append (Unit_Renaming, Renaming_List);
|
||||
|
||||
@ -9048,7 +9048,7 @@ package body Sem_Ch12 is
|
||||
Nod :=
|
||||
Make_Package_Renaming_Declaration (Loc,
|
||||
Defining_Unit_Name => New_Copy (Defining_Identifier (Formal)),
|
||||
Name => New_Reference_To (Actual_Pack, Loc));
|
||||
Name => New_Occurrence_Of (Actual_Pack, Loc));
|
||||
|
||||
Set_Associated_Formal_Package (Defining_Unit_Name (Nod),
|
||||
Defining_Identifier (Formal));
|
||||
@ -11743,7 +11743,7 @@ package body Sem_Ch12 is
|
||||
Decl_Node :=
|
||||
Make_Subtype_Declaration (Loc,
|
||||
Defining_Identifier => Subt,
|
||||
Subtype_Indication => New_Reference_To (Act_T, Loc));
|
||||
Subtype_Indication => New_Occurrence_Of (Act_T, Loc));
|
||||
|
||||
if Is_Private_Type (Act_T) then
|
||||
Set_Has_Private_View (Subtype_Indication (Decl_Node));
|
||||
@ -11806,7 +11806,7 @@ package body Sem_Ch12 is
|
||||
Make_Subtype_Declaration (Loc,
|
||||
Defining_Identifier => New_Corr,
|
||||
Subtype_Indication =>
|
||||
New_Reference_To (Corr_Rec, Loc));
|
||||
New_Occurrence_Of (Corr_Rec, Loc));
|
||||
Append_To (Decl_Nodes, Corr_Decl);
|
||||
|
||||
if Ekind (Act_T) = E_Task_Type then
|
||||
|
@ -5610,7 +5610,7 @@ package body Sem_Ch13 is
|
||||
if Operating_Mode = Check_Semantics and then ASIS_Mode then
|
||||
AtM_Nod :=
|
||||
Make_Attribute_Definition_Clause (Loc,
|
||||
Name => New_Reference_To (Base_Type (Rectype), Loc),
|
||||
Name => New_Occurrence_Of (Base_Type (Rectype), Loc),
|
||||
Chars => Name_Alignment,
|
||||
Expression => Relocate_Node (Expression (M)));
|
||||
|
||||
@ -6861,14 +6861,14 @@ package body Sem_Ch13 is
|
||||
Defining_Identifier => BTemp,
|
||||
Constant_Present => True,
|
||||
Object_Definition =>
|
||||
New_Reference_To (Standard_Boolean, Loc),
|
||||
New_Occurrence_Of (Standard_Boolean, Loc),
|
||||
Expression => Expr_M)),
|
||||
|
||||
Handled_Statement_Sequence =>
|
||||
Make_Handled_Sequence_Of_Statements (Loc,
|
||||
Statements => New_List (
|
||||
Make_Simple_Return_Statement (Loc,
|
||||
Expression => New_Reference_To (BTemp, Loc)))));
|
||||
Expression => New_Occurrence_Of (BTemp, Loc)))));
|
||||
|
||||
-- Insert declaration before freeze node and body after
|
||||
|
||||
@ -10266,7 +10266,7 @@ package body Sem_Ch13 is
|
||||
Out_P : constant Boolean := (Nam = TSS_Stream_Read);
|
||||
Formals : List_Id;
|
||||
Spec : Node_Id;
|
||||
T_Ref : constant Node_Id := New_Reference_To (Etyp, Loc);
|
||||
T_Ref : constant Node_Id := New_Occurrence_Of (Etyp, Loc);
|
||||
|
||||
begin
|
||||
Subp_Id := Make_Defining_Identifier (Loc, Sname);
|
||||
@ -10280,7 +10280,7 @@ package body Sem_Ch13 is
|
||||
Parameter_Type =>
|
||||
Make_Access_Definition (Loc,
|
||||
Subtype_Mark =>
|
||||
New_Reference_To (
|
||||
New_Occurrence_Of (
|
||||
Designated_Type (Etype (F)), Loc))));
|
||||
|
||||
if Nam = TSS_Stream_Input then
|
||||
@ -10350,7 +10350,7 @@ package body Sem_Ch13 is
|
||||
Subp_Decl :=
|
||||
Make_Subprogram_Renaming_Declaration (Loc,
|
||||
Specification => Build_Spec,
|
||||
Name => New_Reference_To (Subp, Loc));
|
||||
Name => New_Occurrence_Of (Subp, Loc));
|
||||
|
||||
if Defer_Declaration then
|
||||
Set_TSS (Base_Type (Ent), Subp_Id);
|
||||
|
@ -5651,7 +5651,7 @@ package body Sem_Ch3 is
|
||||
Defining_Identifier => Derived_Type,
|
||||
Subtype_Indication =>
|
||||
Make_Subtype_Indication (Loc,
|
||||
Subtype_Mark => New_Reference_To (Implicit_Base, Loc),
|
||||
Subtype_Mark => New_Occurrence_Of (Implicit_Base, Loc),
|
||||
Constraint => Constraint (Indic)));
|
||||
|
||||
Rewrite (N, New_Indic);
|
||||
@ -6026,13 +6026,13 @@ package body Sem_Ch3 is
|
||||
Lo :=
|
||||
Make_Attribute_Reference (Loc,
|
||||
Attribute_Name => Name_First,
|
||||
Prefix => New_Reference_To (Derived_Type, Loc));
|
||||
Prefix => New_Occurrence_Of (Derived_Type, Loc));
|
||||
Set_Etype (Lo, Derived_Type);
|
||||
|
||||
Hi :=
|
||||
Make_Attribute_Reference (Loc,
|
||||
Attribute_Name => Name_Last,
|
||||
Prefix => New_Reference_To (Derived_Type, Loc));
|
||||
Prefix => New_Occurrence_Of (Derived_Type, Loc));
|
||||
Set_Etype (Hi, Derived_Type);
|
||||
|
||||
Set_Scalar_Range (Derived_Type,
|
||||
@ -9276,7 +9276,7 @@ package body Sem_Ch3 is
|
||||
Defining_Identifier => Subt,
|
||||
Subtype_Indication =>
|
||||
Make_Subtype_Indication (Loc,
|
||||
Subtype_Mark => New_Reference_To (Par, Loc),
|
||||
Subtype_Mark => New_Occurrence_Of (Par, Loc),
|
||||
Constraint => New_Copy_Tree (Constr)));
|
||||
|
||||
-- If this is a component subtype for an outer itype, it is not
|
||||
@ -9468,7 +9468,7 @@ package body Sem_Ch3 is
|
||||
Chars => Name_Implemented,
|
||||
Pragma_Argument_Associations => New_List (
|
||||
Make_Pragma_Argument_Association (Loc,
|
||||
Expression => New_Reference_To (Subp, Loc)),
|
||||
Expression => New_Occurrence_Of (Subp, Loc)),
|
||||
|
||||
Make_Pragma_Argument_Association (Loc,
|
||||
Expression => Make_Identifier (Loc, Iface_Kind))));
|
||||
@ -16664,7 +16664,7 @@ package body Sem_Ch3 is
|
||||
then
|
||||
D := First_Discriminant (Derived_Base);
|
||||
while Present (D) loop
|
||||
Append_Elmt (New_Reference_To (D, Loc), Discs);
|
||||
Append_Elmt (New_Occurrence_Of (D, Loc), Discs);
|
||||
Next_Discriminant (D);
|
||||
end loop;
|
||||
end if;
|
||||
@ -18877,7 +18877,7 @@ package body Sem_Ch3 is
|
||||
|
||||
elsif Ekind (Priv_Dep) = E_Incomplete_Subtype then
|
||||
Set_Subtype_Indication
|
||||
(Parent (Priv_Dep), New_Reference_To (Full_T, Sloc (Priv_Dep)));
|
||||
(Parent (Priv_Dep), New_Occurrence_Of (Full_T, Sloc (Priv_Dep)));
|
||||
Set_Etype (Priv_Dep, Full_T);
|
||||
Set_Ekind (Priv_Dep, Subtype_Kind (Ekind (Full_T)));
|
||||
Set_Analyzed (Parent (Priv_Dep), False);
|
||||
@ -18996,7 +18996,7 @@ package body Sem_Ch3 is
|
||||
Rewrite (Lo,
|
||||
Make_Attribute_Reference (Sloc (Lo),
|
||||
Attribute_Name => Name_First,
|
||||
Prefix => New_Reference_To (T, Sloc (Lo))));
|
||||
Prefix => New_Occurrence_Of (T, Sloc (Lo))));
|
||||
Analyze_And_Resolve (Lo);
|
||||
end if;
|
||||
|
||||
@ -19004,7 +19004,7 @@ package body Sem_Ch3 is
|
||||
Rewrite (Hi,
|
||||
Make_Attribute_Reference (Sloc (Hi),
|
||||
Attribute_Name => Name_First,
|
||||
Prefix => New_Reference_To (T, Sloc (Hi))));
|
||||
Prefix => New_Occurrence_Of (T, Sloc (Hi))));
|
||||
Analyze_And_Resolve (Hi);
|
||||
end if;
|
||||
|
||||
|
@ -6644,7 +6644,7 @@ package body Sem_Ch4 is
|
||||
-- can never assign to its prefix). The Comes_From_Source attribute
|
||||
-- needs to be propagated for accurate warnings.
|
||||
|
||||
Ref := New_Reference_To (E, Sloc (P));
|
||||
Ref := New_Occurrence_Of (E, Sloc (P));
|
||||
Set_Comes_From_Source (Ref, Comes_From_Source (P));
|
||||
Generate_Reference (E, Ref);
|
||||
end if;
|
||||
@ -7728,7 +7728,7 @@ package body Sem_Ch4 is
|
||||
Success := False;
|
||||
|
||||
if No (Matching_Op) then
|
||||
Hom_Ref := New_Reference_To (Hom, Sloc (Subprog));
|
||||
Hom_Ref := New_Occurrence_Of (Hom, Sloc (Subprog));
|
||||
Set_Etype (Call_Node, Any_Type);
|
||||
Set_Parent (Call_Node, Parent (Node_To_Replace));
|
||||
|
||||
@ -8188,7 +8188,7 @@ package body Sem_Ch4 is
|
||||
Set_Is_Overloaded (Call_Node, False);
|
||||
|
||||
if No (Matching_Op) then
|
||||
Prim_Op_Ref := New_Reference_To (Prim_Op, Sloc (Subprog));
|
||||
Prim_Op_Ref := New_Occurrence_Of (Prim_Op, Sloc (Subprog));
|
||||
Candidate := Prim_Op;
|
||||
|
||||
Set_Parent (Call_Node, Parent (Node_To_Replace));
|
||||
|
@ -2039,7 +2039,7 @@ package body Sem_Ch5 is
|
||||
Defining_Identifier => Subt,
|
||||
Subtype_Indication =>
|
||||
Make_Subtype_Indication (Loc,
|
||||
Subtype_Mark => New_Reference_To (Indx, Loc),
|
||||
Subtype_Mark => New_Occurrence_Of (Indx, Loc),
|
||||
Constraint =>
|
||||
Make_Range_Constraint (Loc, Relocate_Node (DS))));
|
||||
Insert_Before (Loop_Nod, Decl);
|
||||
@ -2047,7 +2047,7 @@ package body Sem_Ch5 is
|
||||
|
||||
Rewrite (DS,
|
||||
Make_Attribute_Reference (Loc,
|
||||
Prefix => New_Reference_To (Subt, Loc),
|
||||
Prefix => New_Occurrence_Of (Subt, Loc),
|
||||
Attribute_Name => Attribute_Name (DS)));
|
||||
|
||||
Analyze (DS);
|
||||
|
@ -2187,10 +2187,10 @@ package body Sem_Ch6 is
|
||||
Make_Defining_Identifier (Loc, Name_uMaster),
|
||||
Constant_Present => True,
|
||||
Object_Definition =>
|
||||
New_Reference_To (RTE (RE_Master_Id), Loc),
|
||||
New_Occurrence_Of (RTE (RE_Master_Id), Loc),
|
||||
Expression =>
|
||||
Make_Explicit_Dereference (Loc,
|
||||
New_Reference_To (RTE (RE_Current_Master), Loc)));
|
||||
New_Occurrence_Of (RTE (RE_Current_Master), Loc)));
|
||||
|
||||
if Present (Declarations (N)) then
|
||||
Prepend (Decl, Declarations (N));
|
||||
@ -5588,7 +5588,7 @@ package body Sem_Ch6 is
|
||||
Null_Exclusion_Present =>
|
||||
Null_Exclusion_Present (Parent (Formal)),
|
||||
Parameter_Type =>
|
||||
New_Reference_To (Etype (Formal), Loc),
|
||||
New_Occurrence_Of (Etype (Formal), Loc),
|
||||
Expression =>
|
||||
Copy_Separate_Tree (Expression (Parent (Formal)))));
|
||||
|
||||
@ -5682,11 +5682,11 @@ package body Sem_Ch6 is
|
||||
|
||||
begin
|
||||
Append_To (Actual_List,
|
||||
New_Reference_To (Defining_Identifier (New_Obj), Loc));
|
||||
New_Occurrence_Of (Defining_Identifier (New_Obj), Loc));
|
||||
|
||||
Formal := First_Formal (Spec_Id);
|
||||
while Present (Formal) loop
|
||||
Append_To (Actual_List, New_Reference_To (Formal, Loc));
|
||||
Append_To (Actual_List, New_Occurrence_Of (Formal, Loc));
|
||||
|
||||
-- Avoid spurious warning on unreferenced formals
|
||||
|
||||
@ -5696,7 +5696,7 @@ package body Sem_Ch6 is
|
||||
|
||||
Proc_Call :=
|
||||
Make_Procedure_Call_Statement (Loc,
|
||||
Name => New_Reference_To (Proc_Id, Loc),
|
||||
Name => New_Occurrence_Of (Proc_Id, Loc),
|
||||
Parameter_Associations => Actual_List);
|
||||
end;
|
||||
|
||||
@ -5720,7 +5720,7 @@ package body Sem_Ch6 is
|
||||
|
||||
Make_Simple_Return_Statement (Loc,
|
||||
Expression =>
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Defining_Identifier (New_Obj), Loc)))));
|
||||
|
||||
Rewrite (Ret_Node, Blk_Stmt);
|
||||
@ -9693,13 +9693,13 @@ package body Sem_Ch6 is
|
||||
Make_Parameter_Specification (Loc,
|
||||
Defining_Identifier => A,
|
||||
Parameter_Type =>
|
||||
New_Reference_To (Etype (First_Formal (S)),
|
||||
New_Occurrence_Of (Etype (First_Formal (S)),
|
||||
Sloc (Etype (First_Formal (S))))),
|
||||
|
||||
Make_Parameter_Specification (Loc,
|
||||
Defining_Identifier => B,
|
||||
Parameter_Type =>
|
||||
New_Reference_To (Etype (Next_Formal (First_Formal (S))),
|
||||
New_Occurrence_Of (Etype (Next_Formal (First_Formal (S))),
|
||||
Sloc (Etype (Next_Formal (First_Formal (S)))))));
|
||||
|
||||
Decl :=
|
||||
@ -9709,7 +9709,7 @@ package body Sem_Ch6 is
|
||||
Defining_Unit_Name => Op_Name,
|
||||
Parameter_Specifications => Formals,
|
||||
Result_Definition =>
|
||||
New_Reference_To (Standard_Boolean, Loc)));
|
||||
New_Occurrence_Of (Standard_Boolean, Loc)));
|
||||
|
||||
-- Insert inequality right after equality if it is explicit or after
|
||||
-- the derived type when implicit. These entities are created only
|
||||
|
@ -3368,7 +3368,7 @@ package body Sem_Ch8 is
|
||||
-- there are no subtypes involved.
|
||||
|
||||
Rewrite (Parameter_Type (Param_Spec),
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Base_Type (Entity (Parameter_Type (Param_Spec))), Loc));
|
||||
end if;
|
||||
|
||||
@ -3470,7 +3470,7 @@ package body Sem_Ch8 is
|
||||
|
||||
Find_Type (Result_Definition (Spec));
|
||||
Rewrite (Result_Definition (Spec),
|
||||
New_Reference_To
|
||||
New_Occurrence_Of
|
||||
(Base_Type (Entity (Result_Definition (Spec))), Loc));
|
||||
|
||||
Body_Node :=
|
||||
@ -6625,10 +6625,10 @@ package body Sem_Ch8 is
|
||||
Make_Expanded_Name (Sloc (N),
|
||||
Chars => Chars (T),
|
||||
Prefix => New_Copy (Prefix (Prefix (N))),
|
||||
Selector_Name => New_Reference_To (T, Sloc (N))));
|
||||
Selector_Name => New_Occurrence_Of (T, Sloc (N))));
|
||||
|
||||
else
|
||||
Rewrite (N, New_Reference_To (T, Sloc (N)));
|
||||
Rewrite (N, New_Occurrence_Of (T, Sloc (N)));
|
||||
end if;
|
||||
|
||||
Set_Entity (N, T);
|
||||
@ -7836,8 +7836,8 @@ package body Sem_Ch8 is
|
||||
Name =>
|
||||
Make_Expanded_Name (Loc,
|
||||
Chars => Chars (System_Aux_Id),
|
||||
Prefix => New_Reference_To (Scope (System_Aux_Id), Loc),
|
||||
Selector_Name => New_Reference_To (System_Aux_Id, Loc)));
|
||||
Prefix => New_Occurrence_Of (Scope (System_Aux_Id), Loc),
|
||||
Selector_Name => New_Occurrence_Of (System_Aux_Id, Loc)));
|
||||
|
||||
Set_Entity (Name (Withn), System_Aux_Id);
|
||||
|
||||
|
@ -2590,7 +2590,7 @@ package body Sem_Dim is
|
||||
|
||||
Actual_1 :=
|
||||
Make_Type_Conversion (Loc,
|
||||
Subtype_Mark => New_Reference_To (Standard_Long_Long_Float, Loc),
|
||||
Subtype_Mark => New_Occurrence_Of (Standard_Long_Long_Float, Loc),
|
||||
Expression => Relocate_Node (L));
|
||||
|
||||
Actual_2 :=
|
||||
@ -2606,10 +2606,10 @@ package body Sem_Dim is
|
||||
|
||||
New_N :=
|
||||
Make_Type_Conversion (Loc,
|
||||
Subtype_Mark => New_Reference_To (New_Id, Loc),
|
||||
Subtype_Mark => New_Occurrence_Of (New_Id, Loc),
|
||||
Expression =>
|
||||
Make_Function_Call (Loc,
|
||||
Name => New_Reference_To (RTE (RE_Expon_LLF), Loc),
|
||||
Name => New_Occurrence_Of (RTE (RE_Expon_LLF), Loc),
|
||||
Parameter_Associations => New_List (
|
||||
Actual_1, Actual_2)));
|
||||
|
||||
|
@ -871,7 +871,7 @@ package body Sem_Prag is
|
||||
|
||||
if Present (Renamed_Object (Entity (Item))) then
|
||||
Rewrite (Item,
|
||||
New_Reference_To (Item_Id, Sloc (Item)));
|
||||
New_Occurrence_Of (Item_Id, Sloc (Item)));
|
||||
Analyze (Item);
|
||||
end if;
|
||||
|
||||
@ -2014,7 +2014,7 @@ package body Sem_Prag is
|
||||
-- with a reference to the object.
|
||||
|
||||
if Present (Renamed_Object (Entity (Item))) then
|
||||
Rewrite (Item, New_Reference_To (Item_Id, Sloc (Item)));
|
||||
Rewrite (Item, New_Occurrence_Of (Item_Id, Sloc (Item)));
|
||||
Analyze (Item);
|
||||
end if;
|
||||
|
||||
|
@ -9842,7 +9842,7 @@ package body Sem_Res is
|
||||
|
||||
Rewrite (N,
|
||||
Make_Qualified_Expression (Loc,
|
||||
Subtype_Mark => New_Reference_To (Typ, Loc),
|
||||
Subtype_Mark => New_Occurrence_Of (Typ, Loc),
|
||||
Expression =>
|
||||
Make_Aggregate (Loc, Expressions => Lits)));
|
||||
|
||||
|
@ -710,7 +710,7 @@ package body Sem_Util is
|
||||
Loc := Sloc (N);
|
||||
|
||||
if Nkind (N) = N_Defining_Identifier then
|
||||
Obj := New_Reference_To (N, Loc);
|
||||
Obj := New_Occurrence_Of (N, Loc);
|
||||
|
||||
-- If this is a formal parameter of a subprogram declaration, and
|
||||
-- we are compiling the body, we want the declaration for the
|
||||
@ -808,7 +808,7 @@ package body Sem_Util is
|
||||
Defining_Identifier => Subt,
|
||||
Subtype_Indication =>
|
||||
Make_Subtype_Indication (Loc,
|
||||
Subtype_Mark => New_Reference_To (T, Loc),
|
||||
Subtype_Mark => New_Occurrence_Of (T, Loc),
|
||||
Constraint =>
|
||||
Make_Index_Or_Discriminant_Constraint (Loc,
|
||||
Constraints => Constraints)));
|
||||
@ -1038,7 +1038,7 @@ package body Sem_Util is
|
||||
Defining_Identifier => Subt,
|
||||
Subtype_Indication =>
|
||||
Make_Subtype_Indication (Loc,
|
||||
Subtype_Mark => New_Reference_To (Base_Type (T), Loc),
|
||||
Subtype_Mark => New_Occurrence_Of (Base_Type (T), Loc),
|
||||
Constraint =>
|
||||
Make_Index_Or_Discriminant_Constraint (Loc,
|
||||
Constraints => C)));
|
||||
@ -3874,7 +3874,7 @@ package body Sem_Util is
|
||||
In_Present => In_Present (Parent (Formal)),
|
||||
Out_Present => Out_Present (Parent (Formal)),
|
||||
Parameter_Type =>
|
||||
New_Reference_To (Etype (Formal), Loc),
|
||||
New_Occurrence_Of (Etype (Formal), Loc),
|
||||
Expression =>
|
||||
New_Copy_Tree (Expression (Parent (Formal)))),
|
||||
Plist);
|
||||
|
@ -203,7 +203,7 @@ package body Tbuild is
|
||||
Make_Selected_Component (Loc,
|
||||
Prefix => New_Copy (Rec),
|
||||
Selector_Name =>
|
||||
New_Reference_To (First_Tag_Component (Full_Type), Loc)));
|
||||
New_Occurrence_Of (First_Tag_Component (Full_Type), Loc)));
|
||||
end Make_DT_Access;
|
||||
|
||||
------------------------
|
||||
@ -718,23 +718,6 @@ package body Tbuild is
|
||||
return Nod;
|
||||
end New_Op_Node;
|
||||
|
||||
----------------------
|
||||
-- New_Reference_To --
|
||||
----------------------
|
||||
|
||||
function New_Reference_To
|
||||
(Def_Id : Entity_Id;
|
||||
Loc : Source_Ptr) return Node_Id
|
||||
is
|
||||
pragma Assert (Present (Def_Id) and then Nkind (Def_Id) in N_Entity);
|
||||
Occurrence : Node_Id;
|
||||
begin
|
||||
Occurrence := New_Node (N_Identifier, Loc);
|
||||
Set_Chars (Occurrence, Chars (Def_Id));
|
||||
Set_Entity (Occurrence, Def_Id);
|
||||
return Occurrence;
|
||||
end New_Reference_To;
|
||||
|
||||
-----------------------
|
||||
-- New_Suffixed_Name --
|
||||
-----------------------
|
||||
|
@ -6,7 +6,7 @@
|
||||
-- --
|
||||
-- S p e c --
|
||||
-- --
|
||||
-- Copyright (C) 1992-2012, Free Software Foundation, Inc. --
|
||||
-- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
|
||||
-- --
|
||||
-- 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- --
|
||||
@ -304,13 +304,6 @@ package Tbuild is
|
||||
-- follows: Entity is simply a copy of Def_Id. Etype is a copy of Def_Id
|
||||
-- for types, and a copy of the Etype of Def_Id for other entities.
|
||||
|
||||
function New_Reference_To
|
||||
(Def_Id : Entity_Id;
|
||||
Loc : Source_Ptr) return Node_Id;
|
||||
-- This is like New_Occurrence_Of, but it does not set the Etype field. It
|
||||
-- is used from the expander, where Etype fields are generally not set,
|
||||
-- since they are set when the expanded tree is reanalyzed.
|
||||
|
||||
function New_Suffixed_Name
|
||||
(Related_Id : Name_Id;
|
||||
Suffix : String) return Name_Id;
|
||||
|
Loading…
x
Reference in New Issue
Block a user