(Prim : Entity_Id;
Ancestor_Iface_Prim : Entity_Id := Empty)
is
+ E : Entity_Id;
Prim_Typ : Entity_Id;
Prim_Op : Entity_Id;
Iface_Typ : Entity_Id;
if No (Ancestor_Iface_Prim) then
Prim_Typ := Scope (DTC_Entity (Alias (Prim)));
- Iface_Typ := Scope (DTC_Entity (Abstract_Interface_Alias (Prim)));
+
+ -- Look for the abstract interface subprogram
+
+ E := Abstract_Interface_Alias (Prim);
+ while Present (E)
+ and then Is_Abstract (E)
+ and then not Is_Interface (Scope (DTC_Entity (E)))
+ loop
+ E := Alias (E);
+ end loop;
+
+ Iface_Typ := Scope (DTC_Entity (E));
-- Generate the code of the thunk only when this primitive
-- operation is associated with a secondary dispatch table.
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2006, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
Act_ST := Underlying_Type (Etype (Aexp));
Create_Packed_Array_Type (Act_ST);
- -- Just replace the eEype with the packed array type. This works
- -- because the expression will not be further analyzed, and Gigi
- -- considers the two types equivalent in any case.
+ -- Just replace the etype with the packed array type. This works because
+ -- the expression will not be further analyzed, and Gigi considers the
+ -- two types equivalent in any case.
-- This is not strictly the case ??? If the reference is an actual in
-- call, the expansion of the prefix is delayed, and must be reanalyzed,
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2006, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
procedure Expand (N : Node_Id) is
begin
-- If we were analyzing a default expression the Full_Analysis flag
- -- must have be off. If we are in expansion mode then we must be
+ -- must be off. If we are in expansion mode then we must be
-- performing a full analysis. If we are analyzing a generic then
-- Expansion must be off.
function Index_Of (Idx : Natural) return Table_Index_Type is
J : constant Integer'Base :=
Table_Index_Type'Pos (First) + Idx - 1;
-
begin
return Table_Index_Type'Val (J);
end Index_Of;