[Ada] Remove obsolete Pending_Descriptor table and related bits
authorEric Botcazou <ebotcazou@adacore.com>
Wed, 14 Aug 2019 09:51:48 +0000 (09:51 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Wed, 14 Aug 2019 09:51:48 +0000 (09:51 +0000)
The table has been unused for a while.  No functional changes.

2019-08-14  Eric Botcazou  <ebotcazou@adacore.com>

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

gcc/ada/ChangeLog
gcc/ada/inline.adb
gcc/ada/inline.ads
gcc/ada/sem_ch12.adb

index 785d9d88f1e58b2aa5ff054bac0786c023f96f6c..8f981a84d7a6de8fa2aa1b301edd07f1bc20c9cb 100644 (file)
@@ -1,3 +1,12 @@
+2019-08-14  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * 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  <duff@adacore.com>
 
        * exp_aggr.adb (Init_Hidden_Discriminants): Avoid processing the
index aa8f7ddf40d8d517c30561746fa2c8fefaa7f5ec..862f047707d5291ab493b181be530b3dcf89fd81 100644 (file)
@@ -4209,7 +4209,6 @@ package body Inline is
 
    procedure Initialize is
    begin
-      Pending_Descriptor.Init;
       Pending_Instantiations.Init;
       Inlined_Bodies.Init;
       Successors.Init;
index e822ddceba2db73443c34b7b42924ded48061ec8..5af42f958c6797d3d6e0d4f1025d4f6a50f2614f 100644 (file)
@@ -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 --
    -----------------
index 5f290acbe32f610baf1cd2cd4fef50864fa7af88..06afd2aa62cc1305f4ba8d792fc11f0a56d12710 100644 (file)
@@ -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;