summaryrefslogtreecommitdiff
path: root/gcc/ada/einfo.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2015-03-02 11:20:29 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2015-03-02 11:20:29 +0000
commitd6edfc835ba3069a1e34fc95e98ffe2ed10cdfbc (patch)
treea95495c02cb514ca0b3c56effe563a65532db7f4 /gcc/ada/einfo.adb
parentad274a73b77a6288e15f68299c8ef4179e195fde (diff)
downloadgcc-d6edfc835ba3069a1e34fc95e98ffe2ed10cdfbc.tar.gz
2015-03-02 Robert Dewar <dewar@adacore.com>
* atree.ads, atree.adb (Uint24): New function (Set_Uint24): New procedure. * atree.h (Uint24): New macro for field access. * back_end.adb (Call_Back_End): For now, don't call back end if unnesting subprogs. * einfo.adb (Activation_Record_Component): New field (Subps_Index): New field. * einfo.ads (Activation_Record_Component): New field (Subps_Index): New field Minor reordering of comments into alpha order. * exp_unst.ads, exp_unst.adb: Continued development. 2015-03-02 Gary Dismukes <dismukes@adacore.com> * exp_disp.ads: Minor reformatting. 2015-03-02 Ed Schonberg <schonberg@adacore.com> * sem_ch8.adb (Chain_Use_Clause): Do not chain use clause from ancestor to list of use clauses active in descendant unit if we are within the private part of an intervening parent, to prevent circularities in use clause list. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@221114 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/einfo.adb')
-rw-r--r--gcc/ada/einfo.adb50
1 files changed, 49 insertions, 1 deletions
diff --git a/gcc/ada/einfo.adb b/gcc/ada/einfo.adb
index c3067b825b0..9ad146c37ab 100644
--- a/gcc/ada/einfo.adb
+++ b/gcc/ada/einfo.adb
@@ -214,6 +214,7 @@ package body Einfo is
-- Related_Expression Node24
-- Uplevel_References Elist24
+ -- Subps_Index Uint24
-- Interface_Alias Node25
-- Interfaces Elist25
@@ -251,6 +252,7 @@ package body Einfo is
-- Derived_Type_Link Node31
-- Thunk_Entity Node31
+ -- Activation_Record_Component Node31
-- SPARK_Pragma Node32
-- No_Tagged_Streams_Pragma Node32
@@ -689,6 +691,17 @@ package body Einfo is
return Elist16 (Implementation_Base_Type (Id));
end Access_Disp_Table;
+ function Activation_Record_Component (Id : E) return E is
+ begin
+ pragma Assert (Ekind_In (Id, E_Constant,
+ E_In_Parameter,
+ E_In_Out_Parameter,
+ E_Loop_Parameter,
+ E_Out_Parameter,
+ E_Variable));
+ return Node31 (Id);
+ end Activation_Record_Component;
+
function Actual_Subtype (Id : E) return E is
begin
pragma Assert
@@ -3139,6 +3152,12 @@ package body Einfo is
return Node29 (Id);
end Subprograms_For_Type;
+ function Subps_Index (Id : E) return U is
+ begin
+ pragma Assert (Is_Subprogram (Id));
+ return Uint24 (Id);
+ end Subps_Index;
+
function Suppress_Elaboration_Warnings (Id : E) return B is
begin
return Flag148 (Id);
@@ -3533,6 +3552,17 @@ package body Einfo is
Set_Node22 (Id, V);
end Set_Associated_Storage_Pool;
+ procedure Set_Activation_Record_Component (Id : E; V : E) is
+ begin
+ pragma Assert (Ekind_In (Id, E_Constant,
+ E_In_Parameter,
+ E_In_Out_Parameter,
+ E_Loop_Parameter,
+ E_Out_Parameter,
+ E_Variable));
+ Set_Node31 (Id, V);
+ end Set_Activation_Record_Component;
+
procedure Set_Actual_Subtype (Id : E; V : E) is
begin
pragma Assert
@@ -6091,6 +6121,12 @@ package body Einfo is
Set_Node29 (Id, V);
end Set_Subprograms_For_Type;
+ procedure Set_Subps_Index (Id : E; V : U) is
+ begin
+ pragma Assert (Is_Subprogram (Id));
+ Set_Uint24 (Id, V);
+ end Set_Subps_Index;
+
procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
begin
Set_Flag148 (Id, V);
@@ -9689,7 +9725,11 @@ package body Einfo is
when E_Function |
E_Operator |
E_Procedure =>
- Write_Str ("Uplevel_References");
+ if Field24 (Id) in Uint_Range then
+ Write_Str ("Subps_Index");
+ else
+ Write_Str ("Uplevel_References");
+ end if;
when others =>
Write_Str ("Field24???");
@@ -9899,6 +9939,14 @@ package body Einfo is
when Type_Kind =>
Write_Str ("Derived_Type_Link");
+ when E_Constant |
+ E_In_Parameter |
+ E_In_Out_Parameter |
+ E_Loop_Parameter |
+ E_Out_Parameter |
+ E_Variable =>
+ Write_Str ("Activation_Record_Component");
+
when others =>
Write_Str ("Field31??");
end case;