Commit 0984258e by Eric Botcazou Committed by Pierre-Marie de Rodat

[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
parent f056076f
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
......
......@@ -4209,7 +4209,6 @@ package body Inline is
procedure Initialize is
begin
Pending_Descriptor.Init;
Pending_Instantiations.Init;
Inlined_Bodies.Init;
Successors.Init;
......
......@@ -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 --
-----------------
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment