[Ada] Remove End_Interp_List from the overloaded resolution API

gcc/ada/

	* sem_ch4.adb (Analyze_Call): Remove call to End_Interp_List.
	(Process_Overloaded_Indexed_Component): Remove call to
	End_Interp_List.
	* sem_util.adb (Insert_Explicit_Dereference): Remove call to
	End_Interp_List.
	* sem_type.ads (End_Interp_List): Remove.
	* sem_type.adb (Add_Entry): The guard against duplicate entries
	is now checked before other conditions, so that EXIT statements
	do not bypass this guard.
	(End_Interp_List): Remove.
This commit is contained in:
Piotr Trojanek 2021-01-29 19:34:39 +01:00 committed by Pierre-Marie de Rodat
parent 4b0ba35687
commit bfdc95943e
4 changed files with 8 additions and 27 deletions

View file

@ -1461,8 +1461,6 @@ package body Sem_Ch4 is
else
Remove_Abstract_Operations (N);
end if;
End_Interp_List;
end if;
-- Check the accessibility level for actuals for explicitly aliased
@ -2790,8 +2788,6 @@ package body Sem_Ch4 is
Error_Msg_N ("no legal interpretation for indexed component", N);
Set_Is_Overloaded (N, False);
end if;
End_Interp_List;
end Process_Overloaded_Indexed_Component;
-- Start of processing for Analyze_Indexed_Component_Form

View file

@ -239,6 +239,13 @@ package body Sem_Type is
Get_First_Interp (N, I, It);
while Present (It.Nam) loop
-- Avoid making duplicate entries in overloads
if Name = It.Nam
and then Base_Type (It.Typ) = Base_Type (T)
then
return;
-- A user-defined subprogram hides another declared at an outer
-- level, or one that is use-visible. So return if previous
-- definition hides new one (which is either in an outer
@ -248,7 +255,7 @@ package body Sem_Type is
-- If this is a universal operation, retain the operator in case
-- preference rule applies.
if (((Ekind (Name) = E_Function or else Ekind (Name) = E_Procedure)
elsif ((Ekind (Name) in E_Function | E_Procedure
and then Ekind (Name) = Ekind (It.Nam))
or else (Ekind (Name) = E_Operator
and then Ekind (It.Nam) = E_Function))
@ -292,13 +299,6 @@ package body Sem_Type is
return;
end if;
-- Avoid making duplicate entries in overloads
elsif Name = It.Nam
and then Base_Type (It.Typ) = Base_Type (T)
then
return;
-- Otherwise keep going
else
@ -2227,16 +2227,6 @@ package body Sem_Type is
end if;
end Disambiguate;
---------------------
-- End_Interp_List --
---------------------
procedure End_Interp_List is
begin
All_Interp.Table (All_Interp.Last) := No_Interp;
All_Interp.Increment_Last;
end End_Interp_List;
-------------------------
-- Entity_Matches_Spec --
-------------------------

View file

@ -130,9 +130,6 @@ package Sem_Type is
-- always Boolean, and we use Opnd_Type, which is a candidate type for one
-- of the operands of N, to check visibility.
procedure End_Interp_List;
-- End the list of interpretations of current node
procedure Get_First_Interp
(N : Node_Id;
I : out Interp_Index;

View file

@ -15044,8 +15044,6 @@ package body Sem_Util is
Get_Next_Interp (I, It);
end loop;
End_Interp_List;
else
-- Prefix is unambiguous: mark the original prefix (which might
-- Come_From_Source) as a reference, since the new (relocated) one