From: Eric Botcazou Date: Wed, 14 Aug 2019 09:51:48 +0000 (+0000) Subject: [Ada] Remove obsolete Pending_Descriptor table and related bits X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0984258e474b6f071a995579fe5896d13fe2d58a;p=gcc.git [Ada] Remove obsolete Pending_Descriptor table and related bits The table has been unused for a while. No functional changes. 2019-08-14 Eric Botcazou gcc/ada/ * inline.ads (Pending_Descriptor): Delete. * inline.adb (Initialize): Do not initialize it. * sem_ch12.adb (Delay_Descriptors): Delete. (Analyze_Package_Instantiation): Call Set_Delay_Subprogram_Descriptors instead of Delay_Descriptors throughout. From-SVN: r274459 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 785d9d88f1e..8f981a84d7a 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,12 @@ +2019-08-14 Eric Botcazou + + * inline.ads (Pending_Descriptor): Delete. + * inline.adb (Initialize): Do not initialize it. + * sem_ch12.adb (Delay_Descriptors): Delete. + (Analyze_Package_Instantiation): Call + Set_Delay_Subprogram_Descriptors instead of Delay_Descriptors + throughout. + 2019-08-14 Bob Duff * exp_aggr.adb (Init_Hidden_Discriminants): Avoid processing the diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb index aa8f7ddf40d..862f047707d 100644 --- a/gcc/ada/inline.adb +++ b/gcc/ada/inline.adb @@ -4209,7 +4209,6 @@ package body Inline is procedure Initialize is begin - Pending_Descriptor.Init; Pending_Instantiations.Init; Inlined_Bodies.Init; Successors.Init; diff --git a/gcc/ada/inline.ads b/gcc/ada/inline.ads index e822ddceba2..5af42f958c6 100644 --- a/gcc/ada/inline.ads +++ b/gcc/ada/inline.ads @@ -108,20 +108,6 @@ package Inline is Table_Increment => Alloc.Pending_Instantiations_Increment, Table_Name => "Pending_Instantiations"); - -- The following table records subprograms and packages for which - -- generation of subprogram descriptors must be delayed. - - package Pending_Descriptor is new Table.Table ( - Table_Component_Type => Entity_Id, - Table_Index_Type => Int, - Table_Low_Bound => 0, - Table_Initial => Alloc.Pending_Instantiations_Initial, - Table_Increment => Alloc.Pending_Instantiations_Increment, - Table_Name => "Pending_Descriptor"); - - -- The following should be initialized in an init call in Frontend, we - -- have thoughts of making the frontend reusable in future ??? - ----------------- -- Subprograms -- ----------------- diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb index 5f290acbe32..06afd2aa62c 100644 --- a/gcc/ada/sem_ch12.adb +++ b/gcc/ada/sem_ch12.adb @@ -3846,27 +3846,12 @@ package body Sem_Ch12 is procedure Analyze_Package_Instantiation (N : Node_Id) is Has_Inline_Always : Boolean := False; - procedure Delay_Descriptors (E : Entity_Id); - -- Delay generation of subprogram descriptors for given entity - function Might_Inline_Subp (Gen_Unit : Entity_Id) return Boolean; -- If inlining is active and the generic contains inlined subprograms, -- we instantiate the body. This may cause superfluous instantiations, -- but it is simpler than detecting the need for the body at the point -- of inlining, when the context of the instance is not available. - ----------------------- - -- Delay_Descriptors -- - ----------------------- - - procedure Delay_Descriptors (E : Entity_Id) is - begin - if not Delay_Subprogram_Descriptors (E) then - Set_Delay_Subprogram_Descriptors (E); - Pending_Descriptor.Append (E); - end if; - end Delay_Descriptors; - ----------------------- -- Might_Inline_Subp -- ----------------------- @@ -4468,10 +4453,10 @@ package body Sem_Ch12 is if Ekind (Enclosing_Master) = E_Package then if Is_Compilation_Unit (Enclosing_Master) then if In_Package_Body (Enclosing_Master) then - Delay_Descriptors + Set_Delay_Subprogram_Descriptors (Body_Entity (Enclosing_Master)); else - Delay_Descriptors + Set_Delay_Subprogram_Descriptors (Enclosing_Master); end if; @@ -4511,7 +4496,7 @@ package body Sem_Ch12 is end loop; if Is_Subprogram (Enclosing_Master) then - Delay_Descriptors (Enclosing_Master); + Set_Delay_Subprogram_Descriptors (Enclosing_Master); elsif Is_Task_Type (Enclosing_Master) then declare @@ -4520,7 +4505,7 @@ package body Sem_Ch12 is (Enclosing_Master); begin if Present (TBP) then - Delay_Descriptors (TBP); + Set_Delay_Subprogram_Descriptors (TBP); Set_Delay_Cleanups (TBP); end if; end;