summaryrefslogtreecommitdiff
path: root/gcc/ada/atree.ads
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2010-10-11 12:43:04 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2010-10-11 12:43:04 +0200
commitc159409f3a8d7e53a499187ba7a2fc3aa2da3d04 (patch)
tree8193b0facbe2ccdb239a536cc0e48b413a954d64 /gcc/ada/atree.ads
parent0f1a6a0b83ac281cb77b7432154626b4e78b8171 (diff)
downloadgcc-c159409f3a8d7e53a499187ba7a2fc3aa2da3d04.tar.gz
[multiple changes]
2010-10-11 Robert Dewar <dewar@adacore.com> * g-htable.ads (Get_First): New procedural version for Simple_HTable (Get_Next): New procedural version for Simple_HTable * s-htable.adb (Get_First): New procedural version for Simple_HTable (Get_Next): New procedural version for Simple_HTable * s-htable.ads (Get_First): New procedural version for Simple_HTable (Get_Next): New procedural version for Simple_HTable 2010-10-11 Ed Schonberg <schonberg@adacore.com> * sem_aggr.adb (Propagate_Discriminants): To gather the components of a variant part, use the association list of the subaggregate, which already includes the values of the needed discriminants. 2010-10-11 Robert Dewar <dewar@adacore.com> * aspects.ads, aspects.adb: Changes to accomodate aspect delay (Tree_Write): New procedure. * atree.ads, atree.adb: Flag3 is now Has_Aspects and applies to all nodes. * atree.h: Flag3 is now Has_Aspects and applies to all nodes * debug.adb: Add debug flag gnatd.A * einfo.adb (Has_Delayed_Aspects): New flag (Get_Rep_Item_For_Entity): New function * einfo.ads (Has_Delayed_Aspects): New flag (Get_Rep_Item_For_Entity): New function * exp_ch13.adb (Expand_N_Freeze_Entity): Insert delayed aspects into tree. * exp_ch3.adb, exp_ch6.adb, exp_ch9.adb, exp_disp.adb: New calling sequence for Freeze_Entity. * freeze.ads, freeze.adb (Freeze_Entity): Takes node rather than source ptr. All calls are changed to this new interface. (Freeze_And_Append): Same change (Freeze_Entity): Evaluate deferred aspects * sem_attr.adb: New calling sequence for Freeze_Entity (Eval_Attribute): Don't try to evaluate attributes of unfrozen types when we are in spec expression preanalysis mode. * sem_ch10.adb: New calling sequence for Freeze_Entity * sem_ch11.adb: Simplify analysis of aspect specifications now that the flag Has_Aspects applies to all nodes (no need to save aspects). * sem_ch12.adb: Simplify analysis of aspect specifications now that the flag Has_Aspects applies to all nodes (no need to save aspects). * sem_ch13.adb (Analyze_Aspect_Specifications): Major rewrite to accomodate delaying aspect evaluation to the freeze point. (Duplicate_Clause): Simplify using Get_Rep_Item_For_Entity, and also accomodate delayed aspects. (Rep_Item_Too_Late): Deal with delayed aspects case * sem_ch13.ads (Rep_Item_Too_Late): Document handling of delayed aspects * sem_ch3.adb (Analyze_Subtype_Declaration): Make sure that generic actual types are properly frozen (this is needed because of the new check in Eval_Attribute that declines to evaluate attributes for unfrozen types). Simplify analysis of aspect specifications now that the flag Has_Aspects applies to all nodes (no need to save aspects). * sem_ch3.ads (Preanalyze_Spec_Expression): Note use for delayed aspects * sem_ch5.adb: Simplify analysis of aspect specifications now that the flag Has_Aspects applies to all nodes (no need to save aspects). New calling sequence for Freeze_Entity. * sem_ch9.adb, sem_ch7.adb, sem_ch6.adb: Simplify analysis of aspect specifications now that the flag Has_Aspects applies to all nodes (no need to save aspects). New calling sequence for Freeze_Entity * sem_prag.adb (Check_Duplicate_Pragma): Simplify using Get_Rep_Item_For_Entity (Get_Pragma_Arg): Moved to Sinfo * sinfo.ads, sinfo.adb (Aspect_Rep_Item_: New field (Is_Delayed_Aspect): New flag (Next_Rep_Item): Document use for aspects (Get_Pragma_Arg): Moved here from Sem_Prag * sprint.adb (Sprint_Aspect_Specifications): Now called after semicolon is output and removes semicolon (simplifies interface). (Sprint_Node_Actual): Simplify handling of aspects now that Has_Aspects applies to any node. * tree_gen.adb: Write contents of Aspect_Specifications hash table * tree_in.adb: Read and initialize Aspect_Specifications hash table * treepr.adb (Print_Node): Print Has_Aspects flag (Print_Node): Print Aspect_Specifications in Has_Aspects set * xtreeprs.adb: Remove obsolete references to Flag1,2,3 From-SVN: r165300
Diffstat (limited to 'gcc/ada/atree.ads')
-rw-r--r--gcc/ada/atree.ads74
1 files changed, 37 insertions, 37 deletions
diff --git a/gcc/ada/atree.ads b/gcc/ada/atree.ads
index 9e29a57a59e..8b81ade2454 100644
--- a/gcc/ada/atree.ads
+++ b/gcc/ada/atree.ads
@@ -151,7 +151,6 @@ package Atree is
-- it is useful to be able to do untyped traversals, and an internal
-- package in Atree allows for direct untyped accesses in such cases.
- -- Flag3
-- Flag4 Sixteen Boolean flags (use depends on Nkind and
-- Flag5 Ekind, as described for FieldN). Again the access
-- Flag6 is usually via subprograms in Sinfo and Einfo which
@@ -293,7 +292,7 @@ package Atree is
-------------------------------------
-- A subpackage Atree.Unchecked_Access provides routines for reading and
- -- writing the fields defined above (Field1-27, Node1-27, Flag3-254 etc).
+ -- writing the fields defined above (Field1-27, Node1-27, Flag4-254 etc).
-- These unchecked access routines can be used for untyped traversals.
-- In addition they are used in the implementations of the Sinfo and
-- Einfo packages. These packages both provide logical synonyms for
@@ -518,6 +517,9 @@ package Atree is
function Analyzed (N : Node_Id) return Boolean;
pragma Inline (Analyzed);
+ function Has_Aspects (N : Node_Id) return Boolean;
+ pragma Inline (Has_Aspects);
+
function Comes_From_Source (N : Node_Id) return Boolean;
pragma Inline (Comes_From_Source);
@@ -750,6 +752,9 @@ package Atree is
-- unusual cases, the value needs to be reset (e.g. when a source
-- node is copied, and the copy must not have Comes_From_Source set.
+ procedure Set_Has_Aspects (N : Node_Id; Val : Boolean := True);
+ pragma Inline (Set_Has_Aspects);
+
------------------------------
-- Entity Update Procedures --
------------------------------
@@ -1196,9 +1201,6 @@ package Atree is
function Ureal21 (N : Node_Id) return Ureal;
pragma Inline (Ureal21);
- function Flag3 (N : Node_Id) return Boolean;
- pragma Inline (Flag3);
-
function Flag4 (N : Node_Id) return Boolean;
pragma Inline (Flag4);
@@ -2254,9 +2256,6 @@ package Atree is
procedure Set_Ureal21 (N : Node_Id; Val : Ureal);
pragma Inline (Set_Ureal21);
- procedure Set_Flag3 (N : Node_Id; Val : Boolean);
- pragma Inline (Set_Flag3);
-
procedure Set_Flag4 (N : Node_Id; Val : Boolean);
pragma Inline (Set_Flag4);
@@ -3091,7 +3090,9 @@ package Atree is
-- Flag used to indicate if node is a member of a list.
-- This field is considered private to the Atree package.
- Flag3 : Boolean;
+ Has_Aspects : Boolean;
+ -- Flag used to indicate that a node has aspect specifications that
+ -- are associated with the node. See Aspects package for details.
Rewrite_Ins : Boolean;
-- Flag set by Mark_Rewrite_Insertion procedure.
@@ -3126,32 +3127,31 @@ package Atree is
-- The eighteen flags for a normal node
-- The above fields are used as follows in components 2-5 of
- -- an extended node entry. These fields are not currently
- -- used in component 5 (where we still have lots of room!)
-
- -- In_List used as Flag19, Flag40, Flag129, Flag216
- -- Flag3 used as Flag20, Flag41, Flag130, Flag217
- -- Rewrite_Ins used as Flag21, Flag42, Flag131, Flag218
- -- Analyzed used as Flag22, Flag43, Flag132, Flag219
- -- Comes_From_Source used as Flag23, Flag44, Flag133, Flag220
- -- Error_Posted used as Flag24, Flag45, Flag134, Flag221
- -- Flag4 used as Flag25, Flag46, Flag135, Flag222
- -- Flag5 used as Flag26, Flag47, Flag136, Flag223
- -- Flag6 used as Flag27, Flag48, Flag137, Flag224
- -- Flag7 used as Flag28, Flag49, Flag138, Flag225
- -- Flag8 used as Flag29, Flag50, Flag139, Flag226
- -- Flag9 used as Flag30, Flag51, Flag140, Flag227
- -- Flag10 used as Flag31, Flag52, Flag141, Flag228
- -- Flag11 used as Flag32, Flag53, Flag142, Flag229
- -- Flag12 used as Flag33, Flag54, Flag143, Flag230
- -- Flag13 used as Flag34, Flag55, Flag144, Flag231
- -- Flag14 used as Flag35, Flag56, Flag145, Flag232
- -- Flag15 used as Flag36, Flag57, Flag146, Flag233
- -- Flag16 used as Flag37, Flag58, Flag147, Flag234
- -- Flag17 used as Flag38, Flag59, Flag148, Flag235
- -- Flag18 used as Flag39, Flag60, Flag149, Flag236
- -- Pflag1 used as Flag61, Flag62, Flag150, Flag237
- -- Pflag2 used as Flag63, Flag64, Flag151, Flag238
+ -- an extended node entry.
+
+ -- In_List used as Flag19, Flag40, Flag129, Flag216
+ -- Has_Aspects used as Flag20, Flag41, Flag130, Flag217
+ -- Rewrite_Ins used as Flag21, Flag42, Flag131, Flag218
+ -- Analyzed used as Flag22, Flag43, Flag132, Flag219
+ -- Comes_From_Source used as Flag23, Flag44, Flag133, Flag220
+ -- Error_Posted used as Flag24, Flag45, Flag134, Flag221
+ -- Flag4 used as Flag25, Flag46, Flag135, Flag222
+ -- Flag5 used as Flag26, Flag47, Flag136, Flag223
+ -- Flag6 used as Flag27, Flag48, Flag137, Flag224
+ -- Flag7 used as Flag28, Flag49, Flag138, Flag225
+ -- Flag8 used as Flag29, Flag50, Flag139, Flag226
+ -- Flag9 used as Flag30, Flag51, Flag140, Flag227
+ -- Flag10 used as Flag31, Flag52, Flag141, Flag228
+ -- Flag11 used as Flag32, Flag53, Flag142, Flag229
+ -- Flag12 used as Flag33, Flag54, Flag143, Flag230
+ -- Flag13 used as Flag34, Flag55, Flag144, Flag231
+ -- Flag14 used as Flag35, Flag56, Flag145, Flag232
+ -- Flag15 used as Flag36, Flag57, Flag146, Flag233
+ -- Flag16 used as Flag37, Flag58, Flag147, Flag234
+ -- Flag17 used as Flag38, Flag59, Flag148, Flag235
+ -- Flag18 used as Flag39, Flag60, Flag149, Flag236
+ -- Pflag1 used as Flag61, Flag62, Flag150, Flag237
+ -- Pflag2 used as Flag63, Flag64, Flag151, Flag238
Nkind : Node_Kind;
-- For a non-extended node, or the initial section of an extended
@@ -3245,7 +3245,7 @@ package Atree is
Pflag1 => False,
Pflag2 => False,
In_List => False,
- Flag3 => False,
+ Has_Aspects => False,
Rewrite_Ins => False,
Analyzed => False,
Comes_From_Source => False,
@@ -3290,7 +3290,7 @@ package Atree is
Pflag1 => False,
Pflag2 => False,
In_List => False,
- Flag3 => False,
+ Has_Aspects => False,
Rewrite_Ins => False,
Analyzed => False,
Comes_From_Source => False,