OSDN Git Service

2010-10-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / ada / atree.ads
index 8a1ae47..51921cd 100644 (file)
@@ -85,10 +85,6 @@ package Atree is
    --   In_List       A flag used to indicate if the node is a member
    --                 of a node list.
 
-   --   Rewrite_Sub   A flag set if the node has been rewritten using
-   --                 the Rewrite procedure. The original value of the
-   --                 node is retrievable with Original_Node.
-
    --   Rewrite_Ins   A flag set if a node is marked as a rewrite inserted
    --                 node as a result of a call to Mark_Rewrite_Insertion.
 
@@ -155,17 +151,17 @@ 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.
 
-   --   Flag4         Fifteen Boolean flags (use depends on Nkind and
+   --   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
    --   Flag7         provide high-level synonyms for these flags, and
    --   Flag8         contain debugging code that checks that the values
    --   Flag9         in Nkind and Ekind are appropriate for the access.
    --   Flag10
-   --   Flag11        Note that Flag1-3 are missing from this list. The
-   --   Flag12        first three flag positions are reserved for the
-   --   Flag13        standard flags (Comes_From_Source, Error_Posted,
-   --   Flag14        and Analyzed)
+   --   Flag11        Note that Flag1-2 are missing from this list. For
+   --   Flag12        historical reasons, these flag names are unused.
+   --   Flag13
+   --   Flag14
    --   Flag15
    --   Flag16
    --   Flag17
@@ -184,9 +180,9 @@ package Atree is
    --                 entity, it is of type Entity_Kind which is defined
    --                 in package Einfo.
 
-   --   Flag19        229 additional flags
+   --   Flag19        235 additional flags
    --   ...
-   --   Flag247
+   --   Flag254
 
    --   Convention    Entity convention (Convention_Id value)
 
@@ -197,8 +193,8 @@ package Atree is
    --   Uint6         Synonym for Field6 typed as Uint (Empty = Uint_0)
 
    --   Similar definitions for Field7 to Field28 (and Node7-Node28,
-   --   Elist7-Elist28, Uint7-Uint28, Ureal7-Ureal28). Note that not all
-   --   these functions are defined, only the ones that are actually used.
+   --   Elist7-Elist28, Uint7-Uint28, Ureal7-Ureal28). Note that not all these
+   --   functions are defined, only the ones that are actually used.
 
    function Last_Node_Id return Node_Id;
    pragma Inline (Last_Node_Id);
@@ -281,7 +277,7 @@ package Atree is
 
    --  Field1-5 fields are set to Empty
 
-   --  Field6-22 fields in extended nodes are set to Empty
+   --  Field6-29 fields in extended nodes are set to Empty
 
    --  Parent is set to Empty
 
@@ -296,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, Flag1-247 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
@@ -402,7 +398,10 @@ package Atree is
    --  The parent pointer of the destination and its list link, if any, are
    --  not affected by the copy. Note that parent pointers of descendents
    --  are not adjusted, so the descendents of the destination node after
-   --  the Copy_Node is completed have dubious parent pointers.
+   --  the Copy_Node is completed have dubious parent pointers. Note that
+   --  this routine does NOT copy aspect specifications, the Has_Aspects
+   --  flag in the returned node will always be False. The caller must deal
+   --  with copying aspect specifications where this is required.
 
    function New_Copy (Source : Node_Id) return Node_Id;
    --  This function allocates a completely new node, and then initializes
@@ -521,6 +520,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);
 
@@ -535,9 +537,8 @@ package Atree is
 
    function Parent            (N : Node_Id) return Node_Id;
    pragma Inline (Parent);
-   --  Returns the parent of a node if the node is not a list member, or
-   --  else the parent of the list containing the node if the node is a
-   --  list member.
+   --  Returns the parent of a node if the node is not a list member, or else
+   --  the parent of the list containing the node if the node is a list member.
 
    function No                (N : Node_Id) return Boolean;
    pragma Inline (No);
@@ -753,6 +754,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 --
    ------------------------------
@@ -1092,6 +1096,9 @@ package Atree is
       function List14 (N : Node_Id) return List_Id;
       pragma Inline (List14);
 
+      function List25 (N : Node_Id) return List_Id;
+      pragma Inline (List25);
+
       function Elist1 (N : Node_Id) return Elist_Id;
       pragma Inline (Elist1);
 
@@ -1107,6 +1114,9 @@ package Atree is
       function Elist8 (N : Node_Id) return Elist_Id;
       pragma Inline (Elist8);
 
+      function Elist10 (N : Node_Id) return Elist_Id;
+      pragma Inline (Elist10);
+
       function Elist13 (N : Node_Id) return Elist_Id;
       pragma Inline (Elist13);
 
@@ -2152,6 +2162,9 @@ package Atree is
       procedure Set_List14 (N : Node_Id; Val : List_Id);
       pragma Inline (Set_List14);
 
+      procedure Set_List25 (N : Node_Id; Val : List_Id);
+      pragma Inline (Set_List25);
+
       procedure Set_Elist1 (N : Node_Id; Val : Elist_Id);
       pragma Inline (Set_Elist1);
 
@@ -2167,6 +2180,9 @@ package Atree is
       procedure Set_Elist8 (N : Node_Id; Val : Elist_Id);
       pragma Inline (Set_Elist8);
 
+      procedure Set_Elist10 (N : Node_Id; Val : Elist_Id);
+      pragma Inline (Set_Elist10);
+
       procedure Set_Elist13 (N : Node_Id; Val : Elist_Id);
       pragma Inline (Set_Elist13);
 
@@ -3088,8 +3104,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.
 
-         Unused_1 : Boolean;
-         --  Currently unused flag
+         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.
@@ -3124,32 +3141,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
-         --    Unused_1           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
@@ -3243,7 +3259,7 @@ package Atree is
          Pflag1            => False,
          Pflag2            => False,
          In_List           => False,
-         Unused_1          => False,
+         Has_Aspects       => False,
          Rewrite_Ins       => False,
          Analyzed          => False,
          Comes_From_Source => False,
@@ -3288,7 +3304,7 @@ package Atree is
          Pflag1            => False,
          Pflag2            => False,
          In_List           => False,
-         Unused_1          => False,
+         Has_Aspects       => False,
          Rewrite_Ins       => False,
          Analyzed          => False,
          Comes_From_Source => False,