aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2019-08-14 09:51:48 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2019-08-14 09:51:48 +0000
commit0984258e474b6f071a995579fe5896d13fe2d58a (patch)
tree348d8b61194179479a134c1ba462e95dacab5b6c
parentf056076f5fe77fe8b13050eb3affc4c8ac700722 (diff)
downloadgcc-0984258e474b6f071a995579fe5896d13fe2d58a.zip
gcc-0984258e474b6f071a995579fe5896d13fe2d58a.tar.gz
gcc-0984258e474b6f071a995579fe5896d13fe2d58a.tar.bz2
[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 <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
-rw-r--r--gcc/ada/ChangeLog9
-rw-r--r--gcc/ada/inline.adb1
-rw-r--r--gcc/ada/inline.ads14
-rw-r--r--gcc/ada/sem_ch12.adb23
4 files changed, 13 insertions, 34 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 785d9d8..8f981a8 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -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
diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb
index aa8f7dd..862f047 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 e822ddc..5af42f9 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 5f290ac..06afd2a 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -3846,9 +3846,6 @@ 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,
@@ -3856,18 +3853,6 @@ package body Sem_Ch12 is
-- 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;