diff options
author | Javier Miranda <miranda@adacore.com> | 2008-05-26 15:43:18 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2008-05-26 15:43:18 +0200 |
commit | ce2b6ba521252796f61a25ada77f3e55ea97b36d (patch) | |
tree | 79adfbe7ee2b0d0ba21e43d27188487c0ef9a3bb /gcc/ada/sem_ch4.adb | |
parent | e5f005e18cf7763078e93e3da1747cb3c964b0b3 (diff) | |
download | gcc-ce2b6ba521252796f61a25ada77f3e55ea97b36d.zip gcc-ce2b6ba521252796f61a25ada77f3e55ea97b36d.tar.gz gcc-ce2b6ba521252796f61a25ada77f3e55ea97b36d.tar.bz2 |
einfo.ads (Abstract_Interface_Alias): Renamed as Interface_Alias.
2008-05-26 Javier Miranda <miranda@adacore.com>
* einfo.ads (Abstract_Interface_Alias): Renamed as Interface_Alias.
(Set_Abstract_Interface_Alias): Renamed as Set_Interface_Alias.
(Is_Internal): Adding documentation on internal entities that have
attribute Interface_Alias (old attribute Abstract_Interface_Alias)
* einfo.adb (Abstract_Interface_Alias): Renamed as Interface_Alias.
(Set_Abstract_Interface_Alias): Renamed as Set_Interface_Alias.
Added assertion to force entities with this attribute to have
attribute Is_Internal set to True.
(Next_Tag_Component): Simplify assertion using attribute Is_Tag.
* sem_ch3.adb (Derive_Interface_Subprograms): This subprogram has been
renamed as Derive_Progenitor_Subprograms. In addition, its code is
a new implementation.
(Add_Interface_Tag_Components): Remove special management of
synchronized interfaces.
(Analyze_Interface_Declaration): Minor reformating
(Build_Derived_Record_Type): Minor reformating
(Check_Abstract_Overriding): Avoid reporting error in case of abstract
predefined primitive inherited from interface type because the body of
internally generated predefined primitives of tagged types are generated
later by Freeze_Type
(Derive_Subprogram): Avoid generating an internal name if the parent
subprogram overrides an interface primitive.
(Derive_Subprograms): New implementation that keeps separate the
management of tagged types not implementing interfaces, from tagged
types that implement interfaces.
(Is_Progenitor): New implementation.
(Process_Full_View): Add documentation
(Record_Type_Declaration): Replace call to Derive_Interface_Subprograms
by call to Derive_Progenitor_Subprograms.
* sem_ch6.ads (Is_Interface_Conformant): New subprogram.
(Check_Subtype_Conformant, Subtype_Conformant): Adding new argument
Skip_Controlling_Formals.
* sem_ch6.adb (Is_Interface_Conformant): New subprogram.
(Check_Conventions): New implementation. Remove local subprogram
Skip_Check. Remove formal Search_From of routine Check_Convention.
(Check_Subtype_Conformant, Subtype_Conformant): Adding new argument
Skip_Controlling_Formals.
(New_Overloaded_Entity): Enable addition of predefined dispatching
operations.
* sem_disp.ads
(Find_Primitive_Covering_Interface): New subprogram.
* sem_disp.adb (Check_Dispatching_Operation): Disable registering
the task body procedure as a primitive of the corresponding tagged
type.
(Check_Operation_From_Private_Type): Avoid adding twice an entity
to the list of primitives.
(Find_Primitive_Covering_Interface): New subprogram.
(Override_Dispatching_Operation): Add documentation.
* sem_type.adb (Covers): Minor reformatings
* sem_util.ads (Collect_Abstract_Interfaces): Renamed as
Collect_Interfaces.
Rename formal.
(Has_Abstract_Interfaces): Renamed as Has_Interfaces.
(Implements_Interface): New subprogram.
(Is_Parent): Removed.
(Primitive_Names_Match): New subprogram.
(Remove_Homonym): Moved here from Derive_Interface_Subprograms.
(Ultimate_Alias): New subprogram.
* sem_util.adb (Collect_Abstract_Interfaces): Renamed as
Collect_Interfaces.
Remove special management for synchronized types. Rename formal. Remove
internal subprograms Interface_Present_In_Parent and Add_Interface.
(Has_Abstract_Interfaces): Renamed as Has_Interfaces. Replace assertion
on non-record types by code to return false in such case.
(Implements_Interface): New subprogram.
(Is_Parent): Removed. No special management is now required for
synchronized types covering interfaces.
(Primitive_Names_Match): New subprogram.
(Remove_Homonym): Moved here from Derive_Interface_Subprograms.
(Ultimate_Alias): New subprogram.
* exp_ch3.adb (Add_Internal_Interface_Entities): New subprogram.
Add internal entities associated with secondary dispatch tables to
the list of tagged type primitives that are not interfaces.
(Freeze_Record_Type): Add new call to Add_Internal_Interface_Entities
(Make_Predefined_Primitive_Specs): Code reorganization to improve
the management of predefined equality operator. In addition, if
the type has an equality function corresponding with a primitive
defined in an interface type, the inherited equality is abstract
as well, and no body can be created for it.
* exp_disp.ads (Is_Predefined_Dispatching_Operation): Moved from
exp_util to exp_disp.
(Is_Predefined_Interface_Primitive): New subprogram. Returns True if
an entity corresponds with one of the predefined primitives required
to implement interfaces.
Update copyright notice.
* exp_disp.adb (Set_All_DT_Position): Add assertion. Exclude from the
final check on abstract subprograms all the primitives associated with
interface primitives because they must be visible in the public and
private part.
(Write_DT): Use Find_Dispatching_Type to locate the name of the
interface type. This allows the use of this routine, for debugging
purposes, when the tagged type is not fully decorated.
(Is_Predefined_Dispatching_Operation): Moved from exp_util to exp_disp.
Factorize code calling new subprogram Is_Predefined_Interface_Primitive.
(Is_Predefined_Interface_Primitive): New subprogram. Returns True if an
entity corresponds with one of the predefined primitives required to
implement interfaces.
* exp_util.adb (Find_Interface_ADT): New implementation
(Find_Interface): Removed.
* sprint.adb (Sprint_Node_Actual): Generate missing output for the
list of interfaces associated with nodes
N_Formal_Derived_Type_Definition and N_Private_Extension_Declaration.
From-SVN: r135923
Diffstat (limited to 'gcc/ada/sem_ch4.adb')
-rw-r--r-- | gcc/ada/sem_ch4.adb | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb index db5c112..b59cd4b 100644 --- a/gcc/ada/sem_ch4.adb +++ b/gcc/ada/sem_ch4.adb @@ -3525,7 +3525,6 @@ package body Sem_Ch4 is Error_Msg_NE ("no selector& for}", N, Sel); Check_Misspelled_Selector (Type_To_Use, Sel); - end if; Set_Entity (Sel, Any_Id); @@ -6443,14 +6442,14 @@ package body Sem_Ch4 is -- primitive is also in this list of primitive operations and -- will be used instead. - if (Present (Abstract_Interface_Alias (Prim_Op)) - and then Is_Ancestor (Find_Dispatching_Type - (Alias (Prim_Op)), Corr_Type)) + if (Present (Interface_Alias (Prim_Op)) + and then Is_Ancestor (Find_Dispatching_Type + (Alias (Prim_Op)), Corr_Type)) or else - -- Do not consider hidden primitives unless the type is in an - -- open scope or we are within an instance, where visibility - -- is known to be correct. + -- Do not consider hidden primitives unless the type is + -- in an open scope or we are within an instance, where + -- visibility is known to be correct. (Is_Hidden (Prim_Op) and then not Is_Immediately_Visible (Obj_Type) |