From: Bob Duff Date: Tue, 21 Aug 2018 14:47:44 +0000 (+0000) Subject: [Ada] Einfo: remove obsolete code X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=09825f923fadac7b79a894c4e7f6e0839c2837ac;p=gcc.git [Ada] Einfo: remove obsolete code 2018-08-21 Bob Duff gcc/ada * einfo.ads, einfo.adb (Private_View, Shadow_Entities): Remove obsolete code. From-SVN: r263728 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index f34ebbd963f..a89911a9b42 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2018-08-21 Bob Duff + + * einfo.ads, einfo.adb (Private_View, Shadow_Entities): Remove + obsolete code. + 2018-08-21 Maroua Maalej * sem_spark.adb (Check_Call_Statement): Check global and formal diff --git a/gcc/ada/einfo.adb b/gcc/ada/einfo.adb index c9cdfc202f1..52a9435fdeb 100644 --- a/gcc/ada/einfo.adb +++ b/gcc/ada/einfo.adb @@ -118,7 +118,6 @@ package body Einfo is -- Alignment Uint14 -- Normalized_Position Uint14 -- Postconditions_Proc Node14 - -- Shadow_Entities List14 -- Discriminant_Number Uint15 -- DT_Position Uint15 @@ -199,7 +198,6 @@ package body Einfo is -- Corresponding_Remote_Type Node22 -- Enumeration_Rep_Expr Node22 -- Original_Record_Component Node22 - -- Private_View Node22 -- Protected_Formal Node22 -- Scope_Depth_Value Uint22 -- Shared_Var_Procs_Instance Node22 @@ -3126,12 +3124,6 @@ package body Einfo is return Elist18 (Id); end Private_Dependents; - function Private_View (Id : E) return N is - begin - pragma Assert (Is_Private_Type (Id)); - return Node22 (Id); - end Private_View; - function Protected_Body_Subprogram (Id : E) return E is begin pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id)); @@ -3314,12 +3306,6 @@ package body Einfo is return Flag167 (Id); end Sec_Stack_Needed_For_Return; - function Shadow_Entities (Id : E) return S is - begin - pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)); - return List14 (Id); - end Shadow_Entities; - function Shared_Var_Procs_Instance (Id : E) return E is begin pragma Assert (Ekind (Id) = E_Variable); @@ -6376,12 +6362,6 @@ package body Einfo is Set_Elist18 (Id, V); end Set_Private_Dependents; - procedure Set_Private_View (Id : E; V : N) is - begin - pragma Assert (Is_Private_Type (Id)); - Set_Node22 (Id, V); - end Set_Private_View; - procedure Set_Prev_Entity (Id : E; V : E) is begin Set_Node36 (Id, V); @@ -6573,12 +6553,6 @@ package body Einfo is Set_Flag167 (Id, V); end Set_Sec_Stack_Needed_For_Return; - procedure Set_Shadow_Entities (Id : E; V : S) is - begin - pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)); - Set_List14 (Id, V); - end Set_Shadow_Entities; - procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is begin pragma Assert (Ekind (Id) = E_Variable); @@ -10405,11 +10379,6 @@ package body Einfo is => Write_Str ("Postconditions_Proc"); - when E_Generic_Package - | E_Package - => - Write_Str ("Shadow_Entities"); - when others => Write_Str ("Field14??"); end case; @@ -10845,15 +10814,6 @@ package body Einfo is when E_Enumeration_Literal => Write_Str ("Enumeration_Rep_Expr"); - when E_Limited_Private_Subtype - | E_Limited_Private_Type - | E_Private_Subtype - | E_Private_Type - | E_Record_Subtype_With_Private - | E_Record_Type_With_Private - => - Write_Str ("Private_View"); - when Formal_Kind => Write_Str ("Protected_Formal"); diff --git a/gcc/ada/einfo.ads b/gcc/ada/einfo.ads index dbe1ad6d533..018684d7b2f 100644 --- a/gcc/ada/einfo.ads +++ b/gcc/ada/einfo.ads @@ -4005,17 +4005,6 @@ package Einfo is -- declaration of the type is seen. Subprograms that have such an -- access parameter are also placed in the list of private_dependents. --- Private_View (Node22) --- For each private type, three entities are allocated, the private view, --- the full view, and the shadow entity. The shadow entity contains a --- copy of the private view and is used for restoring the proper private --- view after a region in which the full view is visible (and is copied --- into the entity normally used for the private view during this period --- of visibility). The Private_View field is self-referential when the --- private view lives in its normal entity, but in the copy that is made --- in the shadow entity, it points to the proper location in which to --- restore the private view saved in the shadow. - -- Protected_Body_Subprogram (Node11) -- Defined in protected operations. References the entity for the -- subprogram which implements the body of the operation. @@ -4264,18 +4253,6 @@ package Einfo is -- returned value of a function and thus should not be released on scope -- exit. --- Shadow_Entities (List14) --- Defined in package and generic package entities. Points to a list --- of entities that correspond to private types. For each private type --- a shadow entity is created that holds a copy of the private view. --- In regions of the program where the full views of these private --- entities are visible, the full view is copied into the entity that --- is normally used to hold the private view, but the shadow entity --- copy is unchanged. The shadow entities are then used to restore the --- original private views at the end of the region. This list is a --- standard format list (i.e. First (Shadow_Entities) is the first --- entry and subsequent entries are obtained using Next. - -- Shared_Var_Procs_Instance (Node22) -- Defined in variables. Set non-Empty only if Is_Shared_Passive is -- set, in which case this is the entity for the associated instance of @@ -6323,7 +6300,6 @@ package Einfo is -- Underlying_Full_View (Node19) -- Last_Entity (Node20) -- Discriminant_Constraint (Elist21) - -- Private_View (Node22) -- Stored_Constraint (Elist23) -- Has_Completion (Flag26) -- (plus type attributes) @@ -6402,7 +6378,6 @@ package Einfo is -- Generic_Homonym (Node11) (generic case only) -- Associated_Formal_Package (Node12) -- Elaboration_Entity (Node13) - -- Shadow_Entities (List14) -- Related_Instance (Node15) (non-generic case only) -- First_Private_Entity (Node16) -- First_Entity (Node17) @@ -6480,7 +6455,6 @@ package Einfo is -- Underlying_Full_View (Node19) -- Last_Entity (Node20) -- Discriminant_Constraint (Elist21) - -- Private_View (Node22) -- Stored_Constraint (Elist23) -- Has_Completion (Flag26) -- Is_Controlled_Active (Flag42) (base type only) @@ -6661,7 +6635,6 @@ package Einfo is -- Underlying_Full_View (Node19) -- Last_Entity (Node20) -- Discriminant_Constraint (Elist21) - -- Private_View (Node22) -- Stored_Constraint (Elist23) -- Interfaces (Elist25) -- Predicated_Parent (Node38) (subtype only) @@ -7476,7 +7449,6 @@ package Einfo is function Prival (Id : E) return E; function Prival_Link (Id : E) return E; function Private_Dependents (Id : E) return L; - function Private_View (Id : E) return N; function Protected_Body_Subprogram (Id : E) return E; function Protected_Formal (Id : E) return E; function Protected_Subprogram (Id : E) return N; @@ -7509,7 +7481,6 @@ package Einfo is function Scale_Value (Id : E) return U; function Scope_Depth_Value (Id : E) return U; function Sec_Stack_Needed_For_Return (Id : E) return B; - function Shadow_Entities (Id : E) return S; function Shared_Var_Procs_Instance (Id : E) return E; function Size_Check_Code (Id : E) return N; function Size_Depends_On_Discriminant (Id : E) return B; @@ -8182,7 +8153,6 @@ package Einfo is procedure Set_Prival (Id : E; V : E); procedure Set_Prival_Link (Id : E; V : E); procedure Set_Private_Dependents (Id : E; V : L); - procedure Set_Private_View (Id : E; V : N); procedure Set_Protected_Body_Subprogram (Id : E; V : E); procedure Set_Protected_Formal (Id : E; V : E); procedure Set_Protected_Subprogram (Id : E; V : N); @@ -8215,7 +8185,6 @@ package Einfo is procedure Set_Scale_Value (Id : E; V : U); procedure Set_Scope_Depth_Value (Id : E; V : U); procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True); - procedure Set_Shadow_Entities (Id : E; V : S); procedure Set_Shared_Var_Procs_Instance (Id : E; V : E); procedure Set_Size_Check_Code (Id : E; V : N); procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True); @@ -9059,7 +9028,6 @@ package Einfo is pragma Inline (Prival); pragma Inline (Prival_Link); pragma Inline (Private_Dependents); - pragma Inline (Private_View); pragma Inline (Protected_Body_Subprogram); pragma Inline (Protected_Formal); pragma Inline (Protected_Subprogram); @@ -9093,7 +9061,6 @@ package Einfo is pragma Inline (Scale_Value); pragma Inline (Scope_Depth_Value); pragma Inline (Sec_Stack_Needed_For_Return); - pragma Inline (Shadow_Entities); pragma Inline (Shared_Var_Procs_Instance); pragma Inline (Size_Check_Code); pragma Inline (Size_Depends_On_Discriminant); @@ -9552,7 +9519,6 @@ package Einfo is pragma Inline (Set_Prival); pragma Inline (Set_Prival_Link); pragma Inline (Set_Private_Dependents); - pragma Inline (Set_Private_View); pragma Inline (Set_Protected_Body_Subprogram); pragma Inline (Set_Protected_Formal); pragma Inline (Set_Protected_Subprogram); @@ -9585,7 +9551,6 @@ package Einfo is pragma Inline (Set_Scale_Value); pragma Inline (Set_Scope_Depth_Value); pragma Inline (Set_Sec_Stack_Needed_For_Return); - pragma Inline (Set_Shadow_Entities); pragma Inline (Set_Shared_Var_Procs_Instance); pragma Inline (Set_Size_Check_Code); pragma Inline (Set_Size_Depends_On_Discriminant);