aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch12.ads
diff options
context:
space:
mode:
authorGary Dismukes <dismukes@adacore.com>2005-11-15 15:02:22 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2005-11-15 15:02:22 +0100
commit04814daddf1ff25af29ca2bf11e3e0dbbfc9e780 (patch)
tree593d96e0c814df29aaec701b54d749207520d285 /gcc/ada/sem_ch12.ads
parent81d435f35b1ff34978cb764672faf6733ced9607 (diff)
downloadgcc-04814daddf1ff25af29ca2bf11e3e0dbbfc9e780.zip
gcc-04814daddf1ff25af29ca2bf11e3e0dbbfc9e780.tar.gz
gcc-04814daddf1ff25af29ca2bf11e3e0dbbfc9e780.tar.bz2
sem_ch12.ads, [...] (Map_Entities): Exclude entities whose names are internal...
2005-11-14 Gary Dismukes <dismukes@adacore.com> Ed Schonberg <schonberg@adacore.com> Gary Dismukes <dismukes@adacore.com> Thomas Quinot <quinot@adacore.com> * sem_ch12.ads, sem_ch12.adb (Map_Entities): Exclude entities whose names are internal, because they will not have a corresponding partner in the actual package. (Analyze_Formal_Package): Move the setting of the formal package spec's Generic_Parent field so that it occurs prior to analyzing the package, to allow proper operation of Install_Parent_Private_Declarations. (Analyze_Package_Instantiation): Set the instantiated package entity's Package_Instantiation field. (Get_Package_Instantiation_Node): Move declaration to package spec. Retrieve the N_Package_Instantiation node when the Package_Instantiation field is present. (Check_Generic_Child_Unit): Within an inlined call, the only possible instantiation is Unchecked_Conversion, for which no parents are needed. (Inline_Instance_Body): Deinstall and record the use_clauses for all parent scopes of a scope being removed prior to inlining an instance body. (Analyze_Package_Instantiation): Do not perform front-end inlining when the current context is itself an instance within a non-instance child unit, to prevent scope stack errors. (Save_References): If the node is an aggregate that is an actual in a call, rewrite as a qualified expression to preserve some type information, to resolve possible ambiguities in the instance. (Instance_Parent_Unit): New global variable to record the ultimate parent unit associated with a generic child unit instance (associated with the existing Parent_Unit_Visible flag). (type Instance_Env): New component Instance_Parent_Unit for stacking parents recorded in the global Instance_Parent_Unit. (Init_Env): Save value of Instance_Parent_Unit in the Instance_Env stack. (Install_Spec): Save the parent unit entity in Instance_Parent_Unit when it's not a top-level unit, and only do this if Instance_Parent_Unit is not already set. Replace test of Is_Child_Unit with test of parent's scope against package Standard. Add comments and a ??? comment. (Remove_Parent): Revise condition for resetting Is_Immediately_Visible on a child instance parent to test that the parent equals Instance_Parent rather than simply checking that the unit is not a child unit. (Restore_Env): Restore value of Instance_Parent_Unit from Instance_Env. (Validate_Derived_Interface_Type_Instance): Verify that all ancestors of a formal interface are ancestors of the corresponding actual. (Validate_Formal_Interface_Type): Additional legality checks. (Analyze_Formal_Derived_Interface_Type): New procedure to handle formal interface types with ancestors. (Analyze_Formal_Package): If formal is a renaming, use renamed entity to diagnose attempts to use generic within its own declaration. From-SVN: r106999
Diffstat (limited to 'gcc/ada/sem_ch12.ads')
-rw-r--r--gcc/ada/sem_ch12.ads9
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/ada/sem_ch12.ads b/gcc/ada/sem_ch12.ads
index f1ea2f7..f9634bd 100644
--- a/gcc/ada/sem_ch12.ads
+++ b/gcc/ada/sem_ch12.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2003 Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2005, 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- --
@@ -39,7 +39,7 @@ package Sem_Ch12 is
procedure Analyze_Formal_Package (N : Node_Id);
procedure Start_Generic;
- -- Must be invoked before starting to process a generic spec or body.
+ -- Must be invoked before starting to process a generic spec or body
procedure End_Generic;
-- Must be invoked just at the end of the end of the processing of a
@@ -70,6 +70,11 @@ package Sem_Ch12 is
-- Retrieve actual associated with given generic parameter.
-- If A is uninstantiated or not a generic parameter, return A.
+ function Get_Package_Instantiation_Node (A : Entity_Id) return Node_Id;
+ -- Given the entity of a unit that is an instantiation, retrieve the
+ -- original instance node. This is used when loading the instantiations
+ -- of the ancestors of a child generic that is being instantiated.
+
procedure Instantiate_Package_Body
(Body_Info : Pending_Body_Info;
Inlined_Body : Boolean := False);