OSDN Git Service

2001-12-11 David O'Brien <obrien@FreeBSD.org>
[pf3gnuchains/gcc-fork.git] / gcc / ada / atree.ads
1 ------------------------------------------------------------------------------
2 --                                                                          --
3 --                         GNAT COMPILER COMPONENTS                         --
4 --                                                                          --
5 --                                A T R E E                                 --
6 --                                                                          --
7 --                                 S p e c                                  --
8 --                                                                          --
9 --                            $Revision: 1.155 $
10 --                                                                          --
11 --          Copyright (C) 1992-2001, Free Software Foundation, Inc.         --
12 --                                                                          --
13 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
14 -- terms of the  GNU General Public License as published  by the Free Soft- --
15 -- ware  Foundation;  either version 2,  or (at your option) any later ver- --
16 -- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
17 -- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
18 -- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
19 -- for  more details.  You should have  received  a copy of the GNU General --
20 -- Public License  distributed with GNAT;  see file COPYING.  If not, write --
21 -- to  the Free Software Foundation,  59 Temple Place - Suite 330,  Boston, --
22 -- MA 02111-1307, USA.                                                      --
23 --                                                                          --
24 -- As a special exception,  if other files  instantiate  generics from this --
25 -- unit, or you link  this unit with other files  to produce an executable, --
26 -- this  unit  does not  by itself cause  the resulting  executable  to  be --
27 -- covered  by the  GNU  General  Public  License.  This exception does not --
28 -- however invalidate  any other reasons why  the executable file  might be --
29 -- covered by the  GNU Public License.                                      --
30 --                                                                          --
31 -- GNAT was originally developed  by the GNAT team at  New York University. --
32 -- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). --
33 --                                                                          --
34 ------------------------------------------------------------------------------
35
36 with Alloc;
37 with Sinfo;  use Sinfo;
38 with Einfo;  use Einfo;
39 with Types;  use Types;
40 with Snames; use Snames;
41 with System; use System;
42 with Table;
43 with Uintp;  use Uintp;
44 with Urealp; use Urealp;
45 with Unchecked_Conversion;
46
47 package Atree is
48
49 --  This package defines the format of the tree used to represent the Ada
50 --  program internally. Syntactic and semantic information is combined in
51 --  this tree. There is no separate symbol table structure.
52
53 --  WARNING: There is a C version of this package. Any changes to this
54 --  source file must be properly reflected in the C header file tree.h
55
56 --  Package Atree defines the basic structure of the tree and its nodes and
57 --  provides the basic abstract interface for manipulating the tree. Two
58 --  other packages use this interface to define the representation of Ada
59 --  programs using this tree format. The package Sinfo defines the basic
60 --  representation of the syntactic structure of the program, as output
61 --  by the parser. The package Entity_Info defines the semantic information
62 --  which is added to the tree nodes that represent declared entities (i.e.
63 --  the information which might typically be described in a separate symbol
64 --  table structure.
65
66 --  The front end of the compiler first parses the program and generates a
67 --  tree that is simply a syntactic representation of the program in abstract
68 --  syntax tree format. Subsequent processing in the front end traverses the
69 --  tree, transforming it in various ways and adding semantic information.
70
71    ----------------------------------------
72    -- Definitions of Fields in Tree Node --
73    ----------------------------------------
74
75    --  The representation of the tree is completely hidden, using a functional
76    --  interface for accessing and modifying the contents of nodes. Logically
77    --  a node contains a number of fields, much as though the nodes were
78    --  defined as a record type. The fields in a node are as follows:
79
80    --   Nkind            Indicates the kind of the node. This field is present
81    --                    in all nodes. The type is Node_Kind, which is declared
82    --                    in the package Sinfo.
83
84    --   Sloc             Location (Source_Ptr) of the corresponding token
85    --                    in the Source buffer. The individual node definitions
86    --                    show which token is referenced by this pointer.
87
88    --   In_List          A flag used to indicate if the node is a member
89    --                    of a node list.
90
91    --   Rewrite_Sub      A flag set if the node has been rewritten using
92    --                    the Rewrite procedure. The original value of the
93    --                    node is retrievable with Original_Node.
94
95    --   Rewrite_Ins      A flag set if a node is marked as a rewrite inserted
96    --                    node as a result of a call to Mark_Rewrite_Insertion.
97
98    --   Paren_Count      A 2-bit count used on expression nodes to indicate
99    --                    the level of parentheses. Up to 3 levels can be
100    --                    accomodated. Anything more than 3 levels is treated
101    --                    as 3 levels (conformance tests that complain about
102    --                    this are hereby deemed pathological!) Set to zero
103    --                    for non-subexpression nodes.
104
105    --   Comes_From_Source
106    --                    This flag is present in all nodes. It is set if the
107    --                    node is built by the scanner or parser, and clear if
108    --                    the node is built by the analyzer or expander. It
109    --                    indicates that the node corresponds to a construct
110    --                    that appears in the original source program.
111
112    --   Analyzed         This flag is present in all nodes. It is set when
113    --                    a node is analyzed, and is used to avoid analyzing
114    --                    the same node twice. Analysis includes expansion if
115    --                    expansion is active, so in this case if the flag is
116    --                    set it means the node has been analyzed and expanded.
117
118    --   Error_Posted     This flag is present in all nodes. It is set when
119    --                    an error message is posted which is associated with
120    --                    the flagged node. This is used to avoid posting more
121    --                    than one message on the same node.
122
123    --   Field1
124    --   Field2
125    --   Field3
126    --   Field4
127    --   Field5           Five fields holding Union_Id values
128
129    --   Char_CodeN       Synonym for FieldN typed as Char_Code
130    --   ElistN           Synonym for FieldN typed as Elist_Id
131    --   ListN            Synonym for FieldN typed as List_Id
132    --   NameN            Synonym for FieldN typed as Name_Id
133    --   NodeN            Synonym for FieldN typed as Node_Id
134    --   StrN             Synonym for FieldN typed as String_Id
135    --   UintN            Synonym for FieldN typed as Uint (Empty = Uint_0)
136    --   UrealN           Synonym for FieldN typed as Ureal
137
138    --   Note: the actual usage of FieldN (i.e. whether it contains a Char_Code,
139    --   Elist_Id, List_Id, Name_Id, Node_Id, String_Id, Uint or Ureal), depends
140    --   on the value in Nkind. Generally the access to this field is always via
141    --   the functional interface, so the field names Char_CodeN, ElistN, ListN,
142    --   NameN, NodeN, StrN, UintN and UrealN are used only in the bodies of the
143    --   access functions (i.e. in the bodies of Sinfo and Einfo). These access
144    --   functions contain debugging code that checks that the use is consistent
145    --   with Nkind and Ekind values.
146
147    --   However, in specialized circumstances (examples are the circuit in
148    --   generic instantiation to copy trees, and in the tree dump routine),
149    --   it is useful to be able to do untyped traversals, and an internal
150    --   package in Atree allows for direct untyped accesses in such cases.
151
152    --   Flag4            Fifteen Boolean flags (use depends on Nkind and
153    --   Flag5            Ekind, as described for Fieldn). Again the access
154    --   Flag6            is usually via subprograms in Sinfo and Einfo which
155    --   Flag7            provide high-level synonyms for these flags, and
156    --   Flag8            contain debugging code that checks that the values
157    --   Flag9            in Nkind and Ekind are appropriate for the access.
158    --   Flag10
159    --   Flag11           Note that Flag1-3 are missing from this list. The
160    --   Flag12           first three flag positions are reserved for the
161    --   Flag13           standard flags (Comes_From_Source, Error_Posted,
162    --   Flag14           and Analyzed)
163    --   Flag15
164    --   Flag16
165    --   Flag17
166    --   Flag18
167
168    --   Link             For a node, points to the Parent. For a list, points
169    --                    to the list header. Note that in the latter case, a
170    --                    client cannot modify the link field. This field is
171    --                    private to the Atree package (but is also modified
172    --                    by the Nlists package).
173
174    --  The following additional fields are present in extended nodes used
175    --  for entities (Nkind in N_Entity).
176
177    --   Ekind            Entity type. This field indicates the type of the
178    --                    entity, it is of type Entity_Kind which is defined
179    --                    in package Einfo.
180
181    --   Flag19           133 additional flags
182    --   ...
183    --   Flag151
184
185    --   Convention       Entity convention (Convention_Id value)
186
187    --   Field6           Additional Union_Id value stored in tree
188
189    --   Node6            Synonym for Field6 typed as Node_Id
190    --   Elist6           Synonym for Field6 typed as Elist_Id
191    --   Uint6            Synonym for Field6 typed as Uint (Empty = Uint_0)
192
193    --   Similar definitions for Field7 to Field23 (and Node7-Node23,
194    --   Elist7-Elist23, Uint7-Uint23, Ureal7-Ureal23). Note that not all
195    --   these functions are defined, only the ones that are actually used.
196
197    type Paren_Count_Type is mod 4;
198    for Paren_Count_Type'Size use 2;
199    --  Type used for Paren_Count field
200
201    function Last_Node_Id return Node_Id;
202    pragma Inline (Last_Node_Id);
203    --  Returns Id of last allocated node Id
204
205    function Nodes_Address return System.Address;
206    --  Return address of Nodes table (used in Back_End for Gigi call)
207
208    function Num_Nodes return Nat;
209    --  Total number of nodes allocated, where an entity counts as a single
210    --  node. This count is incremented every time a node or entity is
211    --  allocated, and decremented every time a node or entity is deleted.
212    --  This value is used by Xref and by Treepr to allocate hash tables of
213    --  suitable size for hashing Node_Id values.
214
215    -----------------------
216    -- Use of Empty Node --
217    -----------------------
218
219    --  The special Node_Id Empty is used to mark missing fields. Whenever the
220    --  syntax has an optional component, then the corresponding field will be
221    --  set to Empty if the component is missing.
222
223    --  Note: Empty is not used to describe an empty list. Instead in this
224    --  case the node field contains a list which is empty, and these cases
225    --  should be distinguished (essentially from a type point of view, Empty
226    --  is a Node, and is thus not a list).
227
228    --  Note: Empty does in fact correspond to an allocated node. Only the
229    --  Nkind field of this node may be referenced. It contains N_Empty, which
230    --  uniquely identifies the empty case. This allows the Nkind field to be
231    --  dereferenced before the check for Empty which is sometimes useful.
232
233    -----------------------
234    -- Use of Error Node --
235    -----------------------
236
237    --  The Error node is used during syntactic and semantic analysis to
238    --  indicate that the corresponding piece of syntactic structure or
239    --  semantic meaning cannot properly be represented in the tree because
240    --  of an illegality in the program.
241
242    --  If an Error node is encountered, then you know that a previous
243    --  illegality has been detected. The proper reaction should be to
244    --  avoid posting related cascaded error messages, and to propagate
245    --  the error node if necessary.
246
247    -----------------------
248    -- Current_Error_Node --
249    -----------------------
250
251    --  The current error node is a global location indicating the current
252    --  node that is being processed for the purposes of placing a compiler
253    --  abort message. This is not necessarily perfectly accurate, it is
254    --  just a reasonably accurate best guess. It is used to output the
255    --  source location in the abort message by Comperr, and also to
256    --  implement the d3 debugging flag. This is also used by Rtsfind
257    --  to generate error messages for No_Run_Time mode.
258
259    Current_Error_Node : Node_Id;
260    --  Node to place error messages
261
262    -------------------------------
263    -- Default Setting of Fields --
264    -------------------------------
265
266    --  Nkind is set to N_Unused_At_Start
267
268    --  Ekind is set to E_Void
269
270    --  Sloc is always set, there is no default value
271
272    --  Field1-5 fields are set to Empty
273
274    --  Field6-22 fields in extended nodes are set to Empty
275
276    --  Parent is set to Empty
277
278    --  All Boolean flag fields are set to False
279
280    --  Note: the value Empty is used in Field1-Field17 to indicate a null node.
281    --  The usage varies. The common uses are to indicate absence of an
282    --  optional clause or a completely unused Field1-17 field.
283
284    -------------------------------------
285    -- Use of Synonyms for Node Fields --
286    -------------------------------------
287
288    --  A subpackage Atree.Unchecked_Access provides routines for reading and
289    --  writing the fields defined above (Field1-17, Node1-17, Flag1-88 etc).
290    --  These unchecked access routines can be used for untyped traversals. In
291    --  In addition they are used in the implementations of the Sinfo and
292    --  Einfo packages. These packages both provide logical synonyms for
293    --  the generic fields, together with an appropriate set of access routines.
294    --  Normally access to information within tree nodes uses these synonyms,
295    --  providing a high level typed interface to the tree information.
296
297    --------------------------------------------------
298    -- Node Allocation and Modification Subprograms --
299    --------------------------------------------------
300
301    --  Generally the parser builds the tree and then it is further decorated
302    --  (e.g. by setting the entity fields), but not fundamentally modified.
303    --  However, there are cases in which the tree must be restructured by
304    --  adding and rearranging nodes, as a result of disambiguating cases
305    --  which the parser could not parse correctly, and adding additional
306    --  semantic information (e.g. making constraint checks explicit). The
307    --  following subprograms are used for constructing the tree in the first
308    --  place, and then for subsequent modifications as required
309
310    procedure Initialize;
311    --  Called at the start of compilation to initialize the allocation of
312    --  the node and list tables and make the standard entries for Empty,
313    --  Error and Error_List. Note that Initialize must not be called if
314    --  Tree_Read is used.
315
316    procedure Lock;
317    --  Called before the backend is invoked to lock the nodes table
318
319    procedure Tree_Read;
320    --  Initializes internal tables from current tree file using Tree_Read.
321    --  Note that Initialize should not be called if Tree_Read is used.
322    --  Tree_Read includes all necessary initialization.
323
324    procedure Tree_Write;
325    --  Writes out internal tables to current tree file using Tree_Write
326
327    function New_Node
328      (New_Node_Kind : Node_Kind;
329       New_Sloc      : Source_Ptr)
330       return          Node_Id;
331    --  Allocates a completely new node with the given node type and source
332    --  location values. All other fields are set to their standard defaults:
333    --
334    --    Empty for all Fieldn fields
335    --    False for all Flagn fields
336    --
337    --  The usual approach is to build a new node using this function and
338    --  then, using the value returned, use the Set_xxx functions to set
339    --  fields of the node as required. New_Node can only be used for
340    --  non-entity nodes, i.e. it never generates an extended node.
341
342    function New_Entity
343      (New_Node_Kind : Node_Kind;
344       New_Sloc      : Source_Ptr)
345       return          Entity_Id;
346    --  Similar to New_Node, except that it is used only for entity nodes
347    --  and returns an extended node.
348
349    procedure Set_Comes_From_Source_Default (Default : Boolean);
350    --  Sets value of Comes_From_Source flag to be used in all subsequent
351    --  New_Node and New_Entity calls until another call to this procedure
352    --  changes the default.
353
354    function Get_Comes_From_Source_Default return Boolean;
355    pragma Inline (Get_Comes_From_Source_Default);
356    --  Gets the current value of the Comes_From_Source flag
357
358    procedure Preserve_Comes_From_Source (NewN, OldN : Node_Id);
359    pragma Inline (Preserve_Comes_From_Source);
360    --  When a node is rewritten, it is sometimes appropriate to preserve the
361    --  original comes from source indication. This is true when the rewrite
362    --  essentially corresponds to a transformation corresponding exactly to
363    --  semantics in the reference manual. This procedure copies the setting
364    --  of Comes_From_Source from OldN to NewN.
365
366    function Has_Extension (N : Node_Id) return Boolean;
367    pragma Inline (Has_Extension);
368    --  Returns True if the given node has an extension (i.e. was created by
369    --  a call to New_Entity rather than New_Node, and Nkind is in N_Entity)
370
371    procedure Change_Node (N : Node_Id; New_Node_Kind : Node_Kind);
372    --  This procedure replaces the given node by setting its Nkind field to
373    --  the indicated value and resetting all other fields to their default
374    --  values except for Sloc, which is unchanged, and the Parent pointer
375    --  and list links, which are also unchanged. All other information in
376    --  the original node is lost. The new node has an extension if the
377    --  original node had an extension.
378
379    procedure Copy_Node (Source : Node_Id; Destination : Node_Id);
380    --  Copy the entire contents of the source node to the destination node.
381    --  The contents of the source node is not affected. If the source node
382    --  has an extension, then the destination must have an extension also.
383    --  The parent pointer of the destination and its list link, if any, are
384    --  not affected by the copy. Note that parent pointers of descendents
385    --  are not adjusted, so the descendents of the destination node after
386    --  the Copy_Node is completed have dubious parent pointers.
387
388    function New_Copy (Source : Node_Id) return Node_Id;
389    --  This function allocates a completely new node, and then initializes
390    --  it by copying the contents of the source node into it. The contents
391    --  of the source node is not affected. The target node is always marked
392    --  as not being in a list (even if the source is a list member). The
393    --  new node will have an extension if the source has an extension.
394    --  New_Copy (Empty) returns Empty and New_Copy (Error) returns Error.
395    --  Note that, unlike New_Copy_Tree, New_Copy does not recursively copy any
396    --  descendents, so in general parent pointers are not set correctly for
397    --  the descendents of the copied node. Both normal and extended nodes
398    --  (entities) may be copied using New_Copy.
399
400    function Relocate_Node (Source : Node_Id) return Node_Id;
401    --  Source is a non-entity node that is to be relocated. A new node is
402    --  allocated and the contents of Source are copied to this node using
403    --  Copy_Node. The parent pointers of descendents of the node are then
404    --  adjusted to point to the relocated copy. The original node is not
405    --  modified, but the parent pointers of its descendents are no longer
406    --  valid. This routine is used in conjunction with the tree rewrite
407    --  routines (see descriptions of Replace/Rewrite).
408    --
409    --  Note that the resulting node has the same parent as the source
410    --  node, and is thus still attached to the tree. It is valid for
411    --  Source to be Empty, in which case Relocate_Node simply returns
412    --  Empty as the result.
413
414    function New_Copy_Tree
415      (Source    : Node_Id;
416       Map       : Elist_Id := No_Elist;
417       New_Sloc  : Source_Ptr := No_Location;
418       New_Scope : Entity_Id := Empty)
419       return      Node_Id;
420    --  Given a node that is the root of a subtree, Copy_Tree copies the entire
421    --  syntactic subtree, including recursively any descendents whose parent
422    --  field references a copied node (descendents not linked to a copied node
423    --  by the parent field are not copied, instead the copied tree references
424    --  the same descendent as the original in this case, which is appropriate
425    --  for non-syntactic fields such as Etype). The parent pointers in the
426    --  copy are properly set. Copy_Tree (Empty/Error) returns Empty/Error.
427    --  The one exception to the rule of not copying semantic fields is that
428    --  any implicit types attached to the subtree are duplicated, so that
429    --  the copy contains a distinct set of implicit type entities. The Map
430    --  argument, if set to a non-empty Elist, specifies a set of mappings
431    --  to be applied to entities in the tree. The map has the form:
432    --
433    --     old entity 1
434    --     new entity to replace references to entity 1
435    --     old entity 2
436    --     new entity to replace references to entity 2
437    --     ...
438    --
439    --  The call destroys the contents of Map in this case
440    --
441    --  The parameter New_Sloc, if set to a value other than No_Location, is
442    --  used as the Sloc value for all nodes in the new copy. If New_Sloc is
443    --  set to its default value No_Location, then the Sloc values of the
444    --  nodes in the copy are simply copied from the corresponding original.
445    --
446    --  The Comes_From_Source indication is unchanged if New_Sloc is set to
447    --  the default No_Location value, but is reset if New_Sloc is given, since
448    --  in this case the result clearly is neither a source node or an exact
449    --  copy of a source node.
450    --
451    --  The parameter New_Scope, if set to a value other than Empty, is the
452    --  value to use as the Scope for any Itypes that are copied. The most
453    --  typical value for this parameter, if given, is Current_Scope.
454
455    function Copy_Separate_Tree (Source : Node_Id) return Node_Id;
456    --  Given a node that is the root of a subtree, Copy_Separate_Tree copies
457    --  the entire syntactic subtree, including recursively any descendants
458    --  whose parent field references a copied node (descendants not linked to
459    --  a copied node by the parent field are also copied.) The parent pointers
460    --  in the copy are properly set. Copy_Separate_Tree (Empty/Error) returns
461    --  Empty/Error. The semantic fields are not copied and the new subtree
462    --  does not share any entity with source subtree.
463    --  But the code *does* copy semantic fields, and the description above
464    --  is in any case unclear on this point ??? (RBKD)
465
466    procedure Exchange_Entities (E1 : Entity_Id; E2 : Entity_Id);
467    --  Exchange the contents of two entities. The parent pointers are switched
468    --  as well as the Defining_Identifier fields in the parents, so that the
469    --  entities point correctly to their original parents. The effect is thus
470    --  to leave the tree completely unchanged in structure, except that the
471    --  entity ID values of the two entities are interchanged. Neither of the
472    --  two entities may be list members.
473
474    procedure Delete_Node (Node : Node_Id);
475    --  The node, which must not be a list member, is deleted from the tree and
476    --  its type is set to N_Unused_At_End. It is an error (not necessarily
477    --  detected) to reference this node after it has been deleted. The
478    --  implementation of the body of Atree is free to reuse the node to
479    --  satisfy future node allocation requests, but is not required to do so.
480
481    procedure Delete_Tree (Node : Node_Id);
482    --  The entire syntactic subtree referenced by Node (i.e. the given node
483    --  and all its syntactic descendents) are deleted as described above for
484    --  Delete_Node.
485
486    function Extend_Node (Node : Node_Id) return Entity_Id;
487    --  This function returns a copy of its input node with an extension
488    --  added. The fields of the extension are set to Empty. Due to the way
489    --  extensions are handled (as two consecutive array elements), it may
490    --  be necessary to reallocate the node, so that the returned value is
491    --  not the same as the input value, but where possible the returned
492    --  value will be the same as the input value (i.e. the extension will
493    --  occur in place). It is the caller's responsibility to ensure that
494    --  any pointers to the original node are appropriately updated. This
495    --  function is used only by Sinfo.CN to change nodes into their
496    --  corresponding entities.
497
498    type Traverse_Result is (OK, Skip, Abandon);
499    --  This is the type of the result returned by the Process function passed
500    --  to Traverse_Func and Traverse_Proc and also the type of the result of
501    --  Traverse_Func itself. See descriptions below for details.
502
503    generic
504      with function Process (N : Node_Id) return Traverse_Result is <>;
505    function Traverse_Func (Node : Node_Id) return Traverse_Result;
506    --  This is a generic function that, given the parent node for a subtree,
507    --  traverses all syntactic nodes of this tree, calling the given function
508    --  Process on each one. The traversal is controlled as follows by the
509    --  result returned by Process:
510
511    --    OK       The traversal continues normally with the children of
512    --             the node just processed.
513
514    --    Skip     The children of the node just processed are skipped and
515    --             excluded from the traversal, but otherwise processing
516    --             continues elsewhere in the tree.
517
518    --    Abandon  The entire traversal is immediately abandoned, and the
519    --             original call to Traverse returns Abandon.
520
521    --  The result returned by Traverse is Abandon if processing was terminated
522    --  by a call to Process returning Abandon, otherwise it is OK (meaning that
523    --  all calls to process returned either OK or Skip).
524
525    generic
526      with function Process (N : Node_Id) return Traverse_Result is <>;
527    procedure Traverse_Proc (Node : Node_Id);
528    pragma Inline (Traverse_Proc);
529    --  This is similar to Traverse_Func except that no result is returned,
530    --  i.e. Traverse_Func is called and the result is simply discarded.
531
532    ---------------------------
533    -- Node Access Functions --
534    ---------------------------
535
536    --  The following functions return the contents of the indicated field of
537    --  the node referenced by the argument, which is a Node_Id.
538
539    function Nkind             (N : Node_Id) return Node_Kind;
540    pragma Inline (Nkind);
541
542    function Analyzed          (N : Node_Id) return Boolean;
543    pragma Inline (Analyzed);
544
545    function Comes_From_Source (N : Node_Id) return Boolean;
546    pragma Inline (Comes_From_Source);
547
548    function Error_Posted      (N : Node_Id) return Boolean;
549    pragma Inline (Error_Posted);
550
551    function Sloc              (N : Node_Id) return Source_Ptr;
552    pragma Inline (Sloc);
553
554    function Paren_Count       (N : Node_Id) return Paren_Count_Type;
555    pragma Inline (Paren_Count);
556
557    function Parent            (N : Node_Id) return Node_Id;
558    pragma Inline (Parent);
559    --  Returns the parent of a node if the node is not a list member, or
560    --  else the parent of the list containing the node if the node is a
561    --  list member.
562
563    function No                (N : Node_Id) return Boolean;
564    pragma Inline (No);
565    --  Tests given Id for equality with the Empty node. This allows notations
566    --  like "if No (Variant_Part)" as opposed to "if Variant_Part = Empty".
567
568    function Present           (N : Node_Id) return Boolean;
569    pragma Inline (Present);
570    --  Tests given Id for inequality with the Empty node. This allows notations
571    --  like "if Present (Statement)" as opposed to "if Statement /= Empty".
572
573    -----------------------------
574    -- Entity Access Functions --
575    -----------------------------
576
577    --  The following functions apply only to Entity_Id values, i.e.
578    --  to extended nodes.
579
580    function Ekind (E : Entity_Id) return Entity_Kind;
581    pragma Inline (Ekind);
582
583    function Convention (E : Entity_Id) return Convention_Id;
584    pragma Inline (Convention);
585
586    ----------------------------
587    -- Node Update Procedures --
588    ----------------------------
589
590    --  The following functions set a specified field in the node whose Id is
591    --  passed as the first argument. The second parameter is the new value
592    --  to be set in the specified field. Note that Set_Nkind is in the next
593    --  section, since its use is restricted.
594
595    procedure Set_Sloc         (N : Node_Id; Val : Source_Ptr);
596    pragma Inline (Set_Sloc);
597
598    procedure Set_Paren_Count  (N : Node_Id; Val : Paren_Count_Type);
599    pragma Inline (Set_Paren_Count);
600
601    procedure Set_Parent       (N : Node_Id; Val : Node_Id);
602    pragma Inline (Set_Parent);
603
604    procedure Set_Analyzed     (N : Node_Id; Val : Boolean := True);
605    pragma Inline (Set_Analyzed);
606
607    procedure Set_Error_Posted (N : Node_Id; Val : Boolean := True);
608    pragma Inline (Set_Error_Posted);
609
610    procedure Set_Comes_From_Source (N : Node_Id; Val : Boolean);
611    pragma Inline (Set_Comes_From_Source);
612    --  Note that this routine is very rarely used, since usually the
613    --  default mechanism provided sets the right value, but in some
614    --  unusual cases, the value needs to be reset (e.g. when a source
615    --  node is copied, and the copy must not have Comes_From_Source set.
616
617    ------------------------------
618    -- Entity Update Procedures --
619    ------------------------------
620
621    --  The following procedures apply only to Entity_Id values, i.e.
622    --  to extended nodes.
623
624    procedure Set_Ekind (E : Entity_Id; Val : Entity_Kind);
625    pragma Inline (Set_Ekind);
626
627    procedure Set_Convention (E : Entity_Id; Val : Convention_Id);
628    pragma Inline (Set_Convention);
629
630    ---------------------------
631    -- Tree Rewrite Routines --
632    ---------------------------
633
634    --  During the compilation process it is necessary in a number of situations
635    --  to rewrite the tree. In some cases, such rewrites do not affect the
636    --  structure of the tree, for example, when an indexed component node is
637    --  replaced by the corresponding call node (the parser cannot distinguish
638    --  between these two cases).
639
640    --  In other situations, the rewrite does affect the structure of the
641    --  tree. Examples are the replacement of a generic instantiation by the
642    --  instantiated spec and body, and the static evaluation of expressions.
643
644    --  If such structural modifications are done by the expander, there are
645    --  no difficulties, since the form of the tree after the expander has no
646    --  special significance, except as input to the backend of the compiler.
647    --  However, if these modifications are done by the semantic phase, then
648    --  it is important that they be done in a manner which allows the original
649    --  tree to be preserved. This is because tools like pretty printers need
650    --  to have this original tree structure available.
651
652    --  The subprograms in this section allow rewriting of the tree by either
653    --  insertion of new nodes in an existing list, or complete replacement of
654    --  a subtree. The resulting tree for most purposes looks as though it has
655    --  been really changed, and there is no trace of the original. However,
656    --  special subprograms, also defined in this section, allow the original
657    --  tree to be reconstructed if necessary.
658
659    --  For tree modifications done in the expander, it is permissible to
660    --  destroy the original tree, although it is also allowable to use the
661    --  tree rewrite routines where it is convenient to do so.
662
663    procedure Mark_Rewrite_Insertion (New_Node : Node_Id);
664    pragma Inline (Mark_Rewrite_Insertion);
665    --  This procedure marks the given node as an insertion made during a tree
666    --  rewriting operation. Only the root needs to be marked. The call does
667    --  not do the actual insertion, which must be done using one of the normal
668    --  list insertion routines. The node is treated normally in all respects
669    --  except for its response to Is_Rewrite_Insertion. The function of these
670    --  calls is to be able to get an accurate original tree. This helps the
671    --  accuracy of Sprint.Sprint_Node, and in particular, when stubs are being
672    --  generated, it is essential that the original tree be accurate.
673
674    function Is_Rewrite_Insertion (Node : Node_Id) return Boolean;
675    pragma Inline (Is_Rewrite_Insertion);
676    --  Tests whether the given node was marked using Set_Rewrite_Insert. This
677    --  is used in reconstructing the original tree (where such nodes are to
678    --  be eliminated from the reconstructed tree).
679
680    procedure Rewrite (Old_Node, New_Node : Node_Id);
681    --  This is used when a complete subtree is to be replaced. Old_Node is the
682    --  root of the old subtree to be replaced, and New_Node is the root of the
683    --  newly constructed replacement subtree. The actual mechanism is to swap
684    --  the contents of these two nodes fixing up the parent pointers of the
685    --  replaced node (we do not attempt to preserve parent pointers for the
686    --  original node). Neither Old_Node nor New_Node can be extended nodes.
687    --
688    --  Note: New_Node may not contain references to Old_Node, for example as
689    --  descendents, since the rewrite would make such references invalid. If
690    --  New_Node does need to reference Old_Node, then these references should
691    --  be to a relocated copy of Old_Node (see Relocate_Node procedure).
692    --
693    --  Note: The Original_Node function applied to Old_Node (which has now
694    --  been replaced by the contents of New_Node), can be used to obtain the
695    --  original node, i.e. the old contents of Old_Node.
696
697    procedure Replace (Old_Node, New_Node : Node_Id);
698    --  This is similar to Rewrite, except that the old value of Old_Node is
699    --  not saved, and the New_Node is deleted after the replace, since it
700    --  is assumed that it can no longer be legitimately needed. The flag
701    --  Is_Rewrite_Susbtitute will be False for the resulting node, unless
702    --  it was already true on entry, and Original_Node will not return the
703    --  original contents of the Old_Node, but rather the New_Node value (unless
704    --  Old_Node had already been rewritten using Rewrite). Replace also
705    --  preserves the setting of Comes_From_Source.
706    --
707    --  Note, New_Node may not contain references to Old_Node, for example as
708    --  descendents, since the rewrite would make such references invalid. If
709    --  New_Node does need to reference Old_Node, then these references should
710    --  be to a relocated copy of Old_Node (see Relocate_Node procedure).
711    --
712    --  Replace is used in certain circumstances where it is desirable to
713    --  suppress any history of the rewriting operation. Notably, it is used
714    --  when the parser has mis-classified a node (e.g. a task entry call
715    --  that the parser has parsed as a procedure call).
716
717    function Is_Rewrite_Substitution (Node : Node_Id) return Boolean;
718    pragma Inline (Is_Rewrite_Substitution);
719    --  Return True iff Node has been rewritten (i.e. if Node is the root
720    --  of a subtree which was installed using Rewrite).
721
722    function Original_Node (Node : Node_Id) return Node_Id;
723    pragma Inline (Original_Node);
724    --  If Node has not been rewritten, then returns its input argument
725    --  unchanged, else returns the Node for the original subtree.
726    --
727    --  Note: Parents are not preserved in original tree nodes that are
728    --  retrieved in this way (i.e. their children may have children whose
729    --  pointers which reference some other node).
730
731    --  Note: there is no direct mechanism for deleting an original node (in
732    --  a manner that can be reversed later). One possible approach is to use
733    --  Rewrite to substitute a null statement for the node to be deleted.
734
735    -----------------------------------
736    -- Generic Field Access Routines --
737    -----------------------------------
738
739    --  This subpackage provides the functions for accessing and procedures
740    --  for setting fields that are normally referenced by their logical
741    --  synonyms defined in packages Sinfo and Einfo. As previously
742    --  described the implementations of these packages use the package
743    --  Atree.Unchecked_Access.
744
745    package Unchecked_Access is
746
747       --  Functions to allow interpretation of Union_Id values as Uint
748       --  and Ureal values
749
750       function To_Union is new Unchecked_Conversion (Uint,  Union_Id);
751       function To_Union is new Unchecked_Conversion (Ureal, Union_Id);
752
753       function From_Union is new Unchecked_Conversion (Union_Id, Uint);
754       function From_Union is new Unchecked_Conversion (Union_Id, Ureal);
755
756       --  Functions to fetch contents of indicated field. It is an error
757       --  to attempt to read the value of a field which is not present.
758
759       function Field1 (N : Node_Id) return Union_Id;
760       pragma Inline (Field1);
761
762       function Field2 (N : Node_Id) return Union_Id;
763       pragma Inline (Field2);
764
765       function Field3 (N : Node_Id) return Union_Id;
766       pragma Inline (Field3);
767
768       function Field4 (N : Node_Id) return Union_Id;
769       pragma Inline (Field4);
770
771       function Field5 (N : Node_Id) return Union_Id;
772       pragma Inline (Field5);
773
774       function Field6 (N : Node_Id) return Union_Id;
775       pragma Inline (Field6);
776
777       function Field7 (N : Node_Id) return Union_Id;
778       pragma Inline (Field7);
779
780       function Field8 (N : Node_Id) return Union_Id;
781       pragma Inline (Field8);
782
783       function Field9 (N : Node_Id) return Union_Id;
784       pragma Inline (Field9);
785
786       function Field10 (N : Node_Id) return Union_Id;
787       pragma Inline (Field10);
788
789       function Field11 (N : Node_Id) return Union_Id;
790       pragma Inline (Field11);
791
792       function Field12 (N : Node_Id) return Union_Id;
793       pragma Inline (Field12);
794
795       function Field13 (N : Node_Id) return Union_Id;
796       pragma Inline (Field13);
797
798       function Field14 (N : Node_Id) return Union_Id;
799       pragma Inline (Field14);
800
801       function Field15 (N : Node_Id) return Union_Id;
802       pragma Inline (Field15);
803
804       function Field16 (N : Node_Id) return Union_Id;
805       pragma Inline (Field16);
806
807       function Field17 (N : Node_Id) return Union_Id;
808       pragma Inline (Field17);
809
810       function Field18 (N : Node_Id) return Union_Id;
811       pragma Inline (Field18);
812
813       function Field19 (N : Node_Id) return Union_Id;
814       pragma Inline (Field19);
815
816       function Field20 (N : Node_Id) return Union_Id;
817       pragma Inline (Field20);
818
819       function Field21 (N : Node_Id) return Union_Id;
820       pragma Inline (Field21);
821
822       function Field22 (N : Node_Id) return Union_Id;
823       pragma Inline (Field22);
824
825       function Field23 (N : Node_Id) return Union_Id;
826       pragma Inline (Field23);
827
828       function Node1 (N : Node_Id) return Node_Id;
829       pragma Inline (Node1);
830
831       function Node2 (N : Node_Id) return Node_Id;
832       pragma Inline (Node2);
833
834       function Node3 (N : Node_Id) return Node_Id;
835       pragma Inline (Node3);
836
837       function Node4 (N : Node_Id) return Node_Id;
838       pragma Inline (Node4);
839
840       function Node5 (N : Node_Id) return Node_Id;
841       pragma Inline (Node5);
842
843       function Node6 (N : Node_Id) return Node_Id;
844       pragma Inline (Node6);
845
846       function Node7 (N : Node_Id) return Node_Id;
847       pragma Inline (Node7);
848
849       function Node8 (N : Node_Id) return Node_Id;
850       pragma Inline (Node8);
851
852       function Node9 (N : Node_Id) return Node_Id;
853       pragma Inline (Node9);
854
855       function Node10 (N : Node_Id) return Node_Id;
856       pragma Inline (Node10);
857
858       function Node11 (N : Node_Id) return Node_Id;
859       pragma Inline (Node11);
860
861       function Node12 (N : Node_Id) return Node_Id;
862       pragma Inline (Node12);
863
864       function Node13 (N : Node_Id) return Node_Id;
865       pragma Inline (Node13);
866
867       function Node14 (N : Node_Id) return Node_Id;
868       pragma Inline (Node14);
869
870       function Node15 (N : Node_Id) return Node_Id;
871       pragma Inline (Node15);
872
873       function Node16 (N : Node_Id) return Node_Id;
874       pragma Inline (Node16);
875
876       function Node17 (N : Node_Id) return Node_Id;
877       pragma Inline (Node17);
878
879       function Node18 (N : Node_Id) return Node_Id;
880       pragma Inline (Node18);
881
882       function Node19 (N : Node_Id) return Node_Id;
883       pragma Inline (Node19);
884
885       function Node20 (N : Node_Id) return Node_Id;
886       pragma Inline (Node20);
887
888       function Node21 (N : Node_Id) return Node_Id;
889       pragma Inline (Node21);
890
891       function Node22 (N : Node_Id) return Node_Id;
892       pragma Inline (Node22);
893
894       function Node23 (N : Node_Id) return Node_Id;
895       pragma Inline (Node23);
896
897       function List1 (N : Node_Id) return List_Id;
898       pragma Inline (List1);
899
900       function List2 (N : Node_Id) return List_Id;
901       pragma Inline (List2);
902
903       function List3 (N : Node_Id) return List_Id;
904       pragma Inline (List3);
905
906       function List4 (N : Node_Id) return List_Id;
907       pragma Inline (List4);
908
909       function List5 (N : Node_Id) return List_Id;
910       pragma Inline (List5);
911
912       function List10 (N : Node_Id) return List_Id;
913       pragma Inline (List10);
914
915       function List14 (N : Node_Id) return List_Id;
916       pragma Inline (List14);
917
918       function Elist2 (N : Node_Id) return Elist_Id;
919       pragma Inline (Elist2);
920
921       function Elist3 (N : Node_Id) return Elist_Id;
922       pragma Inline (Elist3);
923
924       function Elist4 (N : Node_Id) return Elist_Id;
925       pragma Inline (Elist4);
926
927       function Elist8 (N : Node_Id) return Elist_Id;
928       pragma Inline (Elist8);
929
930       function Elist13 (N : Node_Id) return Elist_Id;
931       pragma Inline (Elist13);
932
933       function Elist15 (N : Node_Id) return Elist_Id;
934       pragma Inline (Elist15);
935
936       function Elist16 (N : Node_Id) return Elist_Id;
937       pragma Inline (Elist16);
938
939       function Elist18 (N : Node_Id) return Elist_Id;
940       pragma Inline (Elist18);
941
942       function Elist21 (N : Node_Id) return Elist_Id;
943       pragma Inline (Elist21);
944
945       function Elist23 (N : Node_Id) return Elist_Id;
946       pragma Inline (Elist23);
947
948       function Name1 (N : Node_Id) return Name_Id;
949       pragma Inline (Name1);
950
951       function Name2 (N : Node_Id) return Name_Id;
952       pragma Inline (Name2);
953
954       function Char_Code2 (N : Node_Id) return Char_Code;
955       pragma Inline (Char_Code2);
956
957       function Str3 (N : Node_Id) return String_Id;
958       pragma Inline (Str3);
959
960       --  Note: the following Uintnn functions have a special test for
961       --  the Field value being Empty. If an Empty value is found then
962       --  Uint_0 is returned. This avoids the rather tricky requirement
963       --  of initializing all Uint fields in nodes and entities.
964
965       function Uint3 (N : Node_Id) return Uint;
966       pragma Inline (Uint3);
967
968       function Uint4 (N : Node_Id) return Uint;
969       pragma Inline (Uint4);
970
971       function Uint5 (N : Node_Id) return Uint;
972       pragma Inline (Uint5);
973
974       function Uint8 (N : Node_Id) return Uint;
975       pragma Inline (Uint8);
976
977       function Uint9 (N : Node_Id) return Uint;
978       pragma Inline (Uint9);
979
980       function Uint10 (N : Node_Id) return Uint;
981       pragma Inline (Uint10);
982
983       function Uint11 (N : Node_Id) return Uint;
984       pragma Inline (Uint11);
985
986       function Uint12 (N : Node_Id) return Uint;
987       pragma Inline (Uint12);
988
989       function Uint13 (N : Node_Id) return Uint;
990       pragma Inline (Uint13);
991
992       function Uint14 (N : Node_Id) return Uint;
993       pragma Inline (Uint14);
994
995       function Uint15 (N : Node_Id) return Uint;
996       pragma Inline (Uint15);
997
998       function Uint16 (N : Node_Id) return Uint;
999       pragma Inline (Uint16);
1000
1001       function Uint17 (N : Node_Id) return Uint;
1002       pragma Inline (Uint17);
1003
1004       function Uint22 (N : Node_Id) return Uint;
1005       pragma Inline (Uint22);
1006
1007       function Ureal3 (N : Node_Id) return Ureal;
1008       pragma Inline (Ureal3);
1009
1010       function Ureal18 (N : Node_Id) return Ureal;
1011       pragma Inline (Ureal18);
1012
1013       function Ureal21 (N : Node_Id) return Ureal;
1014       pragma Inline (Ureal21);
1015
1016       function Flag4 (N : Node_Id) return Boolean;
1017       pragma Inline (Flag4);
1018
1019       function Flag5 (N : Node_Id) return Boolean;
1020       pragma Inline (Flag5);
1021
1022       function Flag6 (N : Node_Id) return Boolean;
1023       pragma Inline (Flag6);
1024
1025       function Flag7 (N : Node_Id) return Boolean;
1026       pragma Inline (Flag7);
1027
1028       function Flag8 (N : Node_Id) return Boolean;
1029       pragma Inline (Flag8);
1030
1031       function Flag9 (N : Node_Id) return Boolean;
1032       pragma Inline (Flag9);
1033
1034       function Flag10 (N : Node_Id) return Boolean;
1035       pragma Inline (Flag10);
1036
1037       function Flag11 (N : Node_Id) return Boolean;
1038       pragma Inline (Flag11);
1039
1040       function Flag12 (N : Node_Id) return Boolean;
1041       pragma Inline (Flag12);
1042
1043       function Flag13 (N : Node_Id) return Boolean;
1044       pragma Inline (Flag13);
1045
1046       function Flag14 (N : Node_Id) return Boolean;
1047       pragma Inline (Flag14);
1048
1049       function Flag15 (N : Node_Id) return Boolean;
1050       pragma Inline (Flag15);
1051
1052       function Flag16 (N : Node_Id) return Boolean;
1053       pragma Inline (Flag16);
1054
1055       function Flag17 (N : Node_Id) return Boolean;
1056       pragma Inline (Flag17);
1057
1058       function Flag18 (N : Node_Id) return Boolean;
1059       pragma Inline (Flag18);
1060
1061       function Flag19 (N : Node_Id) return Boolean;
1062       pragma Inline (Flag19);
1063
1064       function Flag20 (N : Node_Id) return Boolean;
1065       pragma Inline (Flag20);
1066
1067       function Flag21 (N : Node_Id) return Boolean;
1068       pragma Inline (Flag21);
1069
1070       function Flag22 (N : Node_Id) return Boolean;
1071       pragma Inline (Flag22);
1072
1073       function Flag23 (N : Node_Id) return Boolean;
1074       pragma Inline (Flag23);
1075
1076       function Flag24 (N : Node_Id) return Boolean;
1077       pragma Inline (Flag24);
1078
1079       function Flag25 (N : Node_Id) return Boolean;
1080       pragma Inline (Flag25);
1081
1082       function Flag26 (N : Node_Id) return Boolean;
1083       pragma Inline (Flag26);
1084
1085       function Flag27 (N : Node_Id) return Boolean;
1086       pragma Inline (Flag27);
1087
1088       function Flag28 (N : Node_Id) return Boolean;
1089       pragma Inline (Flag28);
1090
1091       function Flag29 (N : Node_Id) return Boolean;
1092       pragma Inline (Flag29);
1093
1094       function Flag30 (N : Node_Id) return Boolean;
1095       pragma Inline (Flag30);
1096
1097       function Flag31 (N : Node_Id) return Boolean;
1098       pragma Inline (Flag31);
1099
1100       function Flag32 (N : Node_Id) return Boolean;
1101       pragma Inline (Flag32);
1102
1103       function Flag33 (N : Node_Id) return Boolean;
1104       pragma Inline (Flag33);
1105
1106       function Flag34 (N : Node_Id) return Boolean;
1107       pragma Inline (Flag34);
1108
1109       function Flag35 (N : Node_Id) return Boolean;
1110       pragma Inline (Flag35);
1111
1112       function Flag36 (N : Node_Id) return Boolean;
1113       pragma Inline (Flag36);
1114
1115       function Flag37 (N : Node_Id) return Boolean;
1116       pragma Inline (Flag37);
1117
1118       function Flag38 (N : Node_Id) return Boolean;
1119       pragma Inline (Flag38);
1120
1121       function Flag39 (N : Node_Id) return Boolean;
1122       pragma Inline (Flag39);
1123
1124       function Flag40 (N : Node_Id) return Boolean;
1125       pragma Inline (Flag40);
1126
1127       function Flag41 (N : Node_Id) return Boolean;
1128       pragma Inline (Flag41);
1129
1130       function Flag42 (N : Node_Id) return Boolean;
1131       pragma Inline (Flag42);
1132
1133       function Flag43 (N : Node_Id) return Boolean;
1134       pragma Inline (Flag43);
1135
1136       function Flag44 (N : Node_Id) return Boolean;
1137       pragma Inline (Flag44);
1138
1139       function Flag45 (N : Node_Id) return Boolean;
1140       pragma Inline (Flag45);
1141
1142       function Flag46 (N : Node_Id) return Boolean;
1143       pragma Inline (Flag46);
1144
1145       function Flag47 (N : Node_Id) return Boolean;
1146       pragma Inline (Flag47);
1147
1148       function Flag48 (N : Node_Id) return Boolean;
1149       pragma Inline (Flag48);
1150
1151       function Flag49 (N : Node_Id) return Boolean;
1152       pragma Inline (Flag49);
1153
1154       function Flag50 (N : Node_Id) return Boolean;
1155       pragma Inline (Flag50);
1156
1157       function Flag51 (N : Node_Id) return Boolean;
1158       pragma Inline (Flag51);
1159
1160       function Flag52 (N : Node_Id) return Boolean;
1161       pragma Inline (Flag52);
1162
1163       function Flag53 (N : Node_Id) return Boolean;
1164       pragma Inline (Flag53);
1165
1166       function Flag54 (N : Node_Id) return Boolean;
1167       pragma Inline (Flag54);
1168
1169       function Flag55 (N : Node_Id) return Boolean;
1170       pragma Inline (Flag55);
1171
1172       function Flag56 (N : Node_Id) return Boolean;
1173       pragma Inline (Flag56);
1174
1175       function Flag57 (N : Node_Id) return Boolean;
1176       pragma Inline (Flag57);
1177
1178       function Flag58 (N : Node_Id) return Boolean;
1179       pragma Inline (Flag58);
1180
1181       function Flag59 (N : Node_Id) return Boolean;
1182       pragma Inline (Flag59);
1183
1184       function Flag60 (N : Node_Id) return Boolean;
1185       pragma Inline (Flag60);
1186
1187       function Flag61 (N : Node_Id) return Boolean;
1188       pragma Inline (Flag61);
1189
1190       function Flag62 (N : Node_Id) return Boolean;
1191       pragma Inline (Flag62);
1192
1193       function Flag63 (N : Node_Id) return Boolean;
1194       pragma Inline (Flag63);
1195
1196       function Flag64 (N : Node_Id) return Boolean;
1197       pragma Inline (Flag64);
1198
1199       function Flag65 (N : Node_Id) return Boolean;
1200       pragma Inline (Flag65);
1201
1202       function Flag66 (N : Node_Id) return Boolean;
1203       pragma Inline (Flag66);
1204
1205       function Flag67 (N : Node_Id) return Boolean;
1206       pragma Inline (Flag67);
1207
1208       function Flag68 (N : Node_Id) return Boolean;
1209       pragma Inline (Flag68);
1210
1211       function Flag69 (N : Node_Id) return Boolean;
1212       pragma Inline (Flag69);
1213
1214       function Flag70 (N : Node_Id) return Boolean;
1215       pragma Inline (Flag70);
1216
1217       function Flag71 (N : Node_Id) return Boolean;
1218       pragma Inline (Flag71);
1219
1220       function Flag72 (N : Node_Id) return Boolean;
1221       pragma Inline (Flag72);
1222
1223       function Flag73 (N : Node_Id) return Boolean;
1224       pragma Inline (Flag73);
1225
1226       function Flag74 (N : Node_Id) return Boolean;
1227       pragma Inline (Flag74);
1228
1229       function Flag75 (N : Node_Id) return Boolean;
1230       pragma Inline (Flag75);
1231
1232       function Flag76 (N : Node_Id) return Boolean;
1233       pragma Inline (Flag76);
1234
1235       function Flag77 (N : Node_Id) return Boolean;
1236       pragma Inline (Flag77);
1237
1238       function Flag78 (N : Node_Id) return Boolean;
1239       pragma Inline (Flag78);
1240
1241       function Flag79 (N : Node_Id) return Boolean;
1242       pragma Inline (Flag79);
1243
1244       function Flag80 (N : Node_Id) return Boolean;
1245       pragma Inline (Flag80);
1246
1247       function Flag81 (N : Node_Id) return Boolean;
1248       pragma Inline (Flag81);
1249
1250       function Flag82 (N : Node_Id) return Boolean;
1251       pragma Inline (Flag82);
1252
1253       function Flag83 (N : Node_Id) return Boolean;
1254       pragma Inline (Flag83);
1255
1256       function Flag84 (N : Node_Id) return Boolean;
1257       pragma Inline (Flag84);
1258
1259       function Flag85 (N : Node_Id) return Boolean;
1260       pragma Inline (Flag85);
1261
1262       function Flag86 (N : Node_Id) return Boolean;
1263       pragma Inline (Flag86);
1264
1265       function Flag87 (N : Node_Id) return Boolean;
1266       pragma Inline (Flag87);
1267
1268       function Flag88 (N : Node_Id) return Boolean;
1269       pragma Inline (Flag88);
1270
1271       function Flag89 (N : Node_Id) return Boolean;
1272       pragma Inline (Flag89);
1273
1274       function Flag90 (N : Node_Id) return Boolean;
1275       pragma Inline (Flag90);
1276
1277       function Flag91 (N : Node_Id) return Boolean;
1278       pragma Inline (Flag91);
1279
1280       function Flag92 (N : Node_Id) return Boolean;
1281       pragma Inline (Flag92);
1282
1283       function Flag93 (N : Node_Id) return Boolean;
1284       pragma Inline (Flag93);
1285
1286       function Flag94 (N : Node_Id) return Boolean;
1287       pragma Inline (Flag94);
1288
1289       function Flag95 (N : Node_Id) return Boolean;
1290       pragma Inline (Flag95);
1291
1292       function Flag96 (N : Node_Id) return Boolean;
1293       pragma Inline (Flag96);
1294
1295       function Flag97 (N : Node_Id) return Boolean;
1296       pragma Inline (Flag97);
1297
1298       function Flag98 (N : Node_Id) return Boolean;
1299       pragma Inline (Flag98);
1300
1301       function Flag99 (N : Node_Id) return Boolean;
1302       pragma Inline (Flag99);
1303
1304       function Flag100 (N : Node_Id) return Boolean;
1305       pragma Inline (Flag100);
1306
1307       function Flag101 (N : Node_Id) return Boolean;
1308       pragma Inline (Flag101);
1309
1310       function Flag102 (N : Node_Id) return Boolean;
1311       pragma Inline (Flag102);
1312
1313       function Flag103 (N : Node_Id) return Boolean;
1314       pragma Inline (Flag103);
1315
1316       function Flag104 (N : Node_Id) return Boolean;
1317       pragma Inline (Flag104);
1318
1319       function Flag105 (N : Node_Id) return Boolean;
1320       pragma Inline (Flag105);
1321
1322       function Flag106 (N : Node_Id) return Boolean;
1323       pragma Inline (Flag106);
1324
1325       function Flag107 (N : Node_Id) return Boolean;
1326       pragma Inline (Flag107);
1327
1328       function Flag108 (N : Node_Id) return Boolean;
1329       pragma Inline (Flag108);
1330
1331       function Flag109 (N : Node_Id) return Boolean;
1332       pragma Inline (Flag109);
1333
1334       function Flag110 (N : Node_Id) return Boolean;
1335       pragma Inline (Flag110);
1336
1337       function Flag111 (N : Node_Id) return Boolean;
1338       pragma Inline (Flag111);
1339
1340       function Flag112 (N : Node_Id) return Boolean;
1341       pragma Inline (Flag112);
1342
1343       function Flag113 (N : Node_Id) return Boolean;
1344       pragma Inline (Flag113);
1345
1346       function Flag114 (N : Node_Id) return Boolean;
1347       pragma Inline (Flag114);
1348
1349       function Flag115 (N : Node_Id) return Boolean;
1350       pragma Inline (Flag115);
1351
1352       function Flag116 (N : Node_Id) return Boolean;
1353       pragma Inline (Flag116);
1354
1355       function Flag117 (N : Node_Id) return Boolean;
1356       pragma Inline (Flag117);
1357
1358       function Flag118 (N : Node_Id) return Boolean;
1359       pragma Inline (Flag118);
1360
1361       function Flag119 (N : Node_Id) return Boolean;
1362       pragma Inline (Flag119);
1363
1364       function Flag120 (N : Node_Id) return Boolean;
1365       pragma Inline (Flag120);
1366
1367       function Flag121 (N : Node_Id) return Boolean;
1368       pragma Inline (Flag121);
1369
1370       function Flag122 (N : Node_Id) return Boolean;
1371       pragma Inline (Flag122);
1372
1373       function Flag123 (N : Node_Id) return Boolean;
1374       pragma Inline (Flag123);
1375
1376       function Flag124 (N : Node_Id) return Boolean;
1377       pragma Inline (Flag124);
1378
1379       function Flag125 (N : Node_Id) return Boolean;
1380       pragma Inline (Flag125);
1381
1382       function Flag126 (N : Node_Id) return Boolean;
1383       pragma Inline (Flag126);
1384
1385       function Flag127 (N : Node_Id) return Boolean;
1386       pragma Inline (Flag127);
1387
1388       function Flag128 (N : Node_Id) return Boolean;
1389       pragma Inline (Flag128);
1390
1391       function Flag129 (N : Node_Id) return Boolean;
1392       pragma Inline (Flag129);
1393
1394       function Flag130 (N : Node_Id) return Boolean;
1395       pragma Inline (Flag130);
1396
1397       function Flag131 (N : Node_Id) return Boolean;
1398       pragma Inline (Flag131);
1399
1400       function Flag132 (N : Node_Id) return Boolean;
1401       pragma Inline (Flag132);
1402
1403       function Flag133 (N : Node_Id) return Boolean;
1404       pragma Inline (Flag133);
1405
1406       function Flag134 (N : Node_Id) return Boolean;
1407       pragma Inline (Flag134);
1408
1409       function Flag135 (N : Node_Id) return Boolean;
1410       pragma Inline (Flag135);
1411
1412       function Flag136 (N : Node_Id) return Boolean;
1413       pragma Inline (Flag136);
1414
1415       function Flag137 (N : Node_Id) return Boolean;
1416       pragma Inline (Flag137);
1417
1418       function Flag138 (N : Node_Id) return Boolean;
1419       pragma Inline (Flag138);
1420
1421       function Flag139 (N : Node_Id) return Boolean;
1422       pragma Inline (Flag139);
1423
1424       function Flag140 (N : Node_Id) return Boolean;
1425       pragma Inline (Flag140);
1426
1427       function Flag141 (N : Node_Id) return Boolean;
1428       pragma Inline (Flag141);
1429
1430       function Flag142 (N : Node_Id) return Boolean;
1431       pragma Inline (Flag142);
1432
1433       function Flag143 (N : Node_Id) return Boolean;
1434       pragma Inline (Flag143);
1435
1436       function Flag144 (N : Node_Id) return Boolean;
1437       pragma Inline (Flag144);
1438
1439       function Flag145 (N : Node_Id) return Boolean;
1440       pragma Inline (Flag145);
1441
1442       function Flag146 (N : Node_Id) return Boolean;
1443       pragma Inline (Flag146);
1444
1445       function Flag147 (N : Node_Id) return Boolean;
1446       pragma Inline (Flag147);
1447
1448       function Flag148 (N : Node_Id) return Boolean;
1449       pragma Inline (Flag148);
1450
1451       function Flag149 (N : Node_Id) return Boolean;
1452       pragma Inline (Flag149);
1453
1454       function Flag150 (N : Node_Id) return Boolean;
1455       pragma Inline (Flag150);
1456
1457       function Flag151 (N : Node_Id) return Boolean;
1458       pragma Inline (Flag151);
1459
1460       function Flag152 (N : Node_Id) return Boolean;
1461       pragma Inline (Flag151);
1462
1463       function Flag153 (N : Node_Id) return Boolean;
1464       pragma Inline (Flag151);
1465
1466       function Flag154 (N : Node_Id) return Boolean;
1467       pragma Inline (Flag151);
1468
1469       function Flag155 (N : Node_Id) return Boolean;
1470       pragma Inline (Flag151);
1471
1472       function Flag156 (N : Node_Id) return Boolean;
1473       pragma Inline (Flag151);
1474
1475       function Flag157 (N : Node_Id) return Boolean;
1476       pragma Inline (Flag151);
1477
1478       function Flag158 (N : Node_Id) return Boolean;
1479       pragma Inline (Flag151);
1480
1481       function Flag159 (N : Node_Id) return Boolean;
1482       pragma Inline (Flag159);
1483
1484       function Flag160 (N : Node_Id) return Boolean;
1485       pragma Inline (Flag160);
1486
1487       function Flag161 (N : Node_Id) return Boolean;
1488       pragma Inline (Flag161);
1489
1490       function Flag162 (N : Node_Id) return Boolean;
1491       pragma Inline (Flag162);
1492
1493       function Flag163 (N : Node_Id) return Boolean;
1494       pragma Inline (Flag163);
1495
1496       function Flag164 (N : Node_Id) return Boolean;
1497       pragma Inline (Flag164);
1498
1499       function Flag165 (N : Node_Id) return Boolean;
1500       pragma Inline (Flag165);
1501
1502       function Flag166 (N : Node_Id) return Boolean;
1503       pragma Inline (Flag166);
1504
1505       function Flag167 (N : Node_Id) return Boolean;
1506       pragma Inline (Flag167);
1507
1508       function Flag168 (N : Node_Id) return Boolean;
1509       pragma Inline (Flag168);
1510
1511       function Flag169 (N : Node_Id) return Boolean;
1512       pragma Inline (Flag169);
1513
1514       function Flag170 (N : Node_Id) return Boolean;
1515       pragma Inline (Flag170);
1516
1517       function Flag171 (N : Node_Id) return Boolean;
1518       pragma Inline (Flag171);
1519
1520       function Flag172 (N : Node_Id) return Boolean;
1521       pragma Inline (Flag172);
1522
1523       function Flag173 (N : Node_Id) return Boolean;
1524       pragma Inline (Flag173);
1525
1526       function Flag174 (N : Node_Id) return Boolean;
1527       pragma Inline (Flag174);
1528
1529       function Flag175 (N : Node_Id) return Boolean;
1530       pragma Inline (Flag175);
1531
1532       function Flag176 (N : Node_Id) return Boolean;
1533       pragma Inline (Flag176);
1534
1535       function Flag177 (N : Node_Id) return Boolean;
1536       pragma Inline (Flag177);
1537
1538       function Flag178 (N : Node_Id) return Boolean;
1539       pragma Inline (Flag178);
1540
1541       function Flag179 (N : Node_Id) return Boolean;
1542       pragma Inline (Flag179);
1543
1544       function Flag180 (N : Node_Id) return Boolean;
1545       pragma Inline (Flag180);
1546
1547       function Flag181 (N : Node_Id) return Boolean;
1548       pragma Inline (Flag181);
1549
1550       function Flag182 (N : Node_Id) return Boolean;
1551       pragma Inline (Flag182);
1552
1553       function Flag183 (N : Node_Id) return Boolean;
1554       pragma Inline (Flag183);
1555
1556       --  Procedures to set value of indicated field
1557
1558       procedure Set_Nkind (N : Node_Id; Val : Node_Kind);
1559       pragma Inline (Set_Nkind);
1560
1561       procedure Set_Field1 (N : Node_Id; Val : Union_Id);
1562       pragma Inline (Set_Field1);
1563
1564       procedure Set_Field2 (N : Node_Id; Val : Union_Id);
1565       pragma Inline (Set_Field2);
1566
1567       procedure Set_Field3 (N : Node_Id; Val : Union_Id);
1568       pragma Inline (Set_Field3);
1569
1570       procedure Set_Field4 (N : Node_Id; Val : Union_Id);
1571       pragma Inline (Set_Field4);
1572
1573       procedure Set_Field5 (N : Node_Id; Val : Union_Id);
1574       pragma Inline (Set_Field5);
1575
1576       procedure Set_Field6 (N : Node_Id; Val : Union_Id);
1577       pragma Inline (Set_Field6);
1578
1579       procedure Set_Field7 (N : Node_Id; Val : Union_Id);
1580       pragma Inline (Set_Field7);
1581
1582       procedure Set_Field8 (N : Node_Id; Val : Union_Id);
1583       pragma Inline (Set_Field8);
1584
1585       procedure Set_Field9 (N : Node_Id; Val : Union_Id);
1586       pragma Inline (Set_Field9);
1587
1588       procedure Set_Field10 (N : Node_Id; Val : Union_Id);
1589       pragma Inline (Set_Field10);
1590
1591       procedure Set_Field11 (N : Node_Id; Val : Union_Id);
1592       pragma Inline (Set_Field11);
1593
1594       procedure Set_Field12 (N : Node_Id; Val : Union_Id);
1595       pragma Inline (Set_Field12);
1596
1597       procedure Set_Field13 (N : Node_Id; Val : Union_Id);
1598       pragma Inline (Set_Field13);
1599
1600       procedure Set_Field14 (N : Node_Id; Val : Union_Id);
1601       pragma Inline (Set_Field14);
1602
1603       procedure Set_Field15 (N : Node_Id; Val : Union_Id);
1604       pragma Inline (Set_Field15);
1605
1606       procedure Set_Field16 (N : Node_Id; Val : Union_Id);
1607       pragma Inline (Set_Field16);
1608
1609       procedure Set_Field17 (N : Node_Id; Val : Union_Id);
1610       pragma Inline (Set_Field17);
1611
1612       procedure Set_Field18 (N : Node_Id; Val : Union_Id);
1613       pragma Inline (Set_Field18);
1614
1615       procedure Set_Field19 (N : Node_Id; Val : Union_Id);
1616       pragma Inline (Set_Field19);
1617
1618       procedure Set_Field20 (N : Node_Id; Val : Union_Id);
1619       pragma Inline (Set_Field20);
1620
1621       procedure Set_Field21 (N : Node_Id; Val : Union_Id);
1622       pragma Inline (Set_Field21);
1623
1624       procedure Set_Field22 (N : Node_Id; Val : Union_Id);
1625       pragma Inline (Set_Field22);
1626
1627       procedure Set_Field23 (N : Node_Id; Val : Union_Id);
1628       pragma Inline (Set_Field23);
1629
1630       procedure Set_Node1 (N : Node_Id; Val : Node_Id);
1631       pragma Inline (Set_Node1);
1632
1633       procedure Set_Node2 (N : Node_Id; Val : Node_Id);
1634       pragma Inline (Set_Node2);
1635
1636       procedure Set_Node3 (N : Node_Id; Val : Node_Id);
1637       pragma Inline (Set_Node3);
1638
1639       procedure Set_Node4 (N : Node_Id; Val : Node_Id);
1640       pragma Inline (Set_Node4);
1641
1642       procedure Set_Node5 (N : Node_Id; Val : Node_Id);
1643       pragma Inline (Set_Node5);
1644
1645       procedure Set_Node6 (N : Node_Id; Val : Node_Id);
1646       pragma Inline (Set_Node6);
1647
1648       procedure Set_Node7 (N : Node_Id; Val : Node_Id);
1649       pragma Inline (Set_Node7);
1650
1651       procedure Set_Node8 (N : Node_Id; Val : Node_Id);
1652       pragma Inline (Set_Node8);
1653
1654       procedure Set_Node9 (N : Node_Id; Val : Node_Id);
1655       pragma Inline (Set_Node9);
1656
1657       procedure Set_Node10 (N : Node_Id; Val : Node_Id);
1658       pragma Inline (Set_Node10);
1659
1660       procedure Set_Node11 (N : Node_Id; Val : Node_Id);
1661       pragma Inline (Set_Node11);
1662
1663       procedure Set_Node12 (N : Node_Id; Val : Node_Id);
1664       pragma Inline (Set_Node12);
1665
1666       procedure Set_Node13 (N : Node_Id; Val : Node_Id);
1667       pragma Inline (Set_Node13);
1668
1669       procedure Set_Node14 (N : Node_Id; Val : Node_Id);
1670       pragma Inline (Set_Node14);
1671
1672       procedure Set_Node15 (N : Node_Id; Val : Node_Id);
1673       pragma Inline (Set_Node15);
1674
1675       procedure Set_Node16 (N : Node_Id; Val : Node_Id);
1676       pragma Inline (Set_Node16);
1677
1678       procedure Set_Node17 (N : Node_Id; Val : Node_Id);
1679       pragma Inline (Set_Node17);
1680
1681       procedure Set_Node18 (N : Node_Id; Val : Node_Id);
1682       pragma Inline (Set_Node18);
1683
1684       procedure Set_Node19 (N : Node_Id; Val : Node_Id);
1685       pragma Inline (Set_Node19);
1686
1687       procedure Set_Node20 (N : Node_Id; Val : Node_Id);
1688       pragma Inline (Set_Node20);
1689
1690       procedure Set_Node21 (N : Node_Id; Val : Node_Id);
1691       pragma Inline (Set_Node21);
1692
1693       procedure Set_Node22 (N : Node_Id; Val : Node_Id);
1694       pragma Inline (Set_Node22);
1695
1696       procedure Set_Node23 (N : Node_Id; Val : Node_Id);
1697       pragma Inline (Set_Node23);
1698
1699       procedure Set_List1 (N : Node_Id; Val : List_Id);
1700       pragma Inline (Set_List1);
1701
1702       procedure Set_List2 (N : Node_Id; Val : List_Id);
1703       pragma Inline (Set_List2);
1704
1705       procedure Set_List3 (N : Node_Id; Val : List_Id);
1706       pragma Inline (Set_List3);
1707
1708       procedure Set_List4 (N : Node_Id; Val : List_Id);
1709       pragma Inline (Set_List4);
1710
1711       procedure Set_List5 (N : Node_Id; Val : List_Id);
1712       pragma Inline (Set_List5);
1713
1714       procedure Set_List10 (N : Node_Id; Val : List_Id);
1715       pragma Inline (Set_List10);
1716
1717       procedure Set_List14 (N : Node_Id; Val : List_Id);
1718       pragma Inline (Set_List14);
1719
1720       procedure Set_Elist2 (N : Node_Id; Val : Elist_Id);
1721       pragma Inline (Set_Elist2);
1722
1723       procedure Set_Elist3 (N : Node_Id; Val : Elist_Id);
1724       pragma Inline (Set_Elist3);
1725
1726       procedure Set_Elist4 (N : Node_Id; Val : Elist_Id);
1727       pragma Inline (Set_Elist4);
1728
1729       procedure Set_Elist8 (N : Node_Id; Val : Elist_Id);
1730       pragma Inline (Set_Elist8);
1731
1732       procedure Set_Elist13 (N : Node_Id; Val : Elist_Id);
1733       pragma Inline (Set_Elist13);
1734
1735       procedure Set_Elist15 (N : Node_Id; Val : Elist_Id);
1736       pragma Inline (Set_Elist15);
1737
1738       procedure Set_Elist16 (N : Node_Id; Val : Elist_Id);
1739       pragma Inline (Set_Elist16);
1740
1741       procedure Set_Elist18 (N : Node_Id; Val : Elist_Id);
1742       pragma Inline (Set_Elist18);
1743
1744       procedure Set_Elist21 (N : Node_Id; Val : Elist_Id);
1745       pragma Inline (Set_Elist21);
1746
1747       procedure Set_Elist23 (N : Node_Id; Val : Elist_Id);
1748       pragma Inline (Set_Elist23);
1749
1750       procedure Set_Name1 (N : Node_Id; Val : Name_Id);
1751       pragma Inline (Set_Name1);
1752
1753       procedure Set_Name2 (N : Node_Id; Val : Name_Id);
1754       pragma Inline (Set_Name2);
1755
1756       procedure Set_Char_Code2 (N : Node_Id; Val : Char_Code);
1757       pragma Inline (Set_Char_Code2);
1758
1759       procedure Set_Str3 (N : Node_Id; Val : String_Id);
1760       pragma Inline (Set_Str3);
1761
1762       procedure Set_Uint3 (N : Node_Id; Val : Uint);
1763       pragma Inline (Set_Uint3);
1764
1765       procedure Set_Uint4 (N : Node_Id; Val : Uint);
1766       pragma Inline (Set_Uint4);
1767
1768       procedure Set_Uint5 (N : Node_Id; Val : Uint);
1769       pragma Inline (Set_Uint5);
1770
1771       procedure Set_Uint8 (N : Node_Id; Val : Uint);
1772       pragma Inline (Set_Uint8);
1773
1774       procedure Set_Uint9 (N : Node_Id; Val : Uint);
1775       pragma Inline (Set_Uint9);
1776
1777       procedure Set_Uint10 (N : Node_Id; Val : Uint);
1778       pragma Inline (Set_Uint10);
1779
1780       procedure Set_Uint11 (N : Node_Id; Val : Uint);
1781       pragma Inline (Set_Uint11);
1782
1783       procedure Set_Uint12 (N : Node_Id; Val : Uint);
1784       pragma Inline (Set_Uint12);
1785
1786       procedure Set_Uint13 (N : Node_Id; Val : Uint);
1787       pragma Inline (Set_Uint13);
1788
1789       procedure Set_Uint14 (N : Node_Id; Val : Uint);
1790       pragma Inline (Set_Uint14);
1791
1792       procedure Set_Uint15 (N : Node_Id; Val : Uint);
1793       pragma Inline (Set_Uint15);
1794
1795       procedure Set_Uint16 (N : Node_Id; Val : Uint);
1796       pragma Inline (Set_Uint16);
1797
1798       procedure Set_Uint17 (N : Node_Id; Val : Uint);
1799       pragma Inline (Set_Uint17);
1800
1801       procedure Set_Uint22 (N : Node_Id; Val : Uint);
1802       pragma Inline (Set_Uint22);
1803
1804       procedure Set_Ureal3 (N : Node_Id; Val : Ureal);
1805       pragma Inline (Set_Ureal3);
1806
1807       procedure Set_Ureal18 (N : Node_Id; Val : Ureal);
1808       pragma Inline (Set_Ureal18);
1809
1810       procedure Set_Ureal21 (N : Node_Id; Val : Ureal);
1811       pragma Inline (Set_Ureal21);
1812
1813       procedure Set_Flag4 (N : Node_Id; Val : Boolean);
1814       pragma Inline (Set_Flag4);
1815
1816       procedure Set_Flag5 (N : Node_Id; Val : Boolean);
1817       pragma Inline (Set_Flag5);
1818
1819       procedure Set_Flag6 (N : Node_Id; Val : Boolean);
1820       pragma Inline (Set_Flag6);
1821
1822       procedure Set_Flag7 (N : Node_Id; Val : Boolean);
1823       pragma Inline (Set_Flag7);
1824
1825       procedure Set_Flag8 (N : Node_Id; Val : Boolean);
1826       pragma Inline (Set_Flag8);
1827
1828       procedure Set_Flag9 (N : Node_Id; Val : Boolean);
1829       pragma Inline (Set_Flag9);
1830
1831       procedure Set_Flag10 (N : Node_Id; Val : Boolean);
1832       pragma Inline (Set_Flag10);
1833
1834       procedure Set_Flag11 (N : Node_Id; Val : Boolean);
1835       pragma Inline (Set_Flag11);
1836
1837       procedure Set_Flag12 (N : Node_Id; Val : Boolean);
1838       pragma Inline (Set_Flag12);
1839
1840       procedure Set_Flag13 (N : Node_Id; Val : Boolean);
1841       pragma Inline (Set_Flag13);
1842
1843       procedure Set_Flag14 (N : Node_Id; Val : Boolean);
1844       pragma Inline (Set_Flag14);
1845
1846       procedure Set_Flag15 (N : Node_Id; Val : Boolean);
1847       pragma Inline (Set_Flag15);
1848
1849       procedure Set_Flag16 (N : Node_Id; Val : Boolean);
1850       pragma Inline (Set_Flag16);
1851
1852       procedure Set_Flag17 (N : Node_Id; Val : Boolean);
1853       pragma Inline (Set_Flag17);
1854
1855       procedure Set_Flag18 (N : Node_Id; Val : Boolean);
1856       pragma Inline (Set_Flag18);
1857
1858       procedure Set_Flag19 (N : Node_Id; Val : Boolean);
1859       pragma Inline (Set_Flag19);
1860
1861       procedure Set_Flag20 (N : Node_Id; Val : Boolean);
1862       pragma Inline (Set_Flag20);
1863
1864       procedure Set_Flag21 (N : Node_Id; Val : Boolean);
1865       pragma Inline (Set_Flag21);
1866
1867       procedure Set_Flag22 (N : Node_Id; Val : Boolean);
1868       pragma Inline (Set_Flag22);
1869
1870       procedure Set_Flag23 (N : Node_Id; Val : Boolean);
1871       pragma Inline (Set_Flag23);
1872
1873       procedure Set_Flag24 (N : Node_Id; Val : Boolean);
1874       pragma Inline (Set_Flag24);
1875
1876       procedure Set_Flag25 (N : Node_Id; Val : Boolean);
1877       pragma Inline (Set_Flag25);
1878
1879       procedure Set_Flag26 (N : Node_Id; Val : Boolean);
1880       pragma Inline (Set_Flag26);
1881
1882       procedure Set_Flag27 (N : Node_Id; Val : Boolean);
1883       pragma Inline (Set_Flag27);
1884
1885       procedure Set_Flag28 (N : Node_Id; Val : Boolean);
1886       pragma Inline (Set_Flag28);
1887
1888       procedure Set_Flag29 (N : Node_Id; Val : Boolean);
1889       pragma Inline (Set_Flag29);
1890
1891       procedure Set_Flag30 (N : Node_Id; Val : Boolean);
1892       pragma Inline (Set_Flag30);
1893
1894       procedure Set_Flag31 (N : Node_Id; Val : Boolean);
1895       pragma Inline (Set_Flag31);
1896
1897       procedure Set_Flag32 (N : Node_Id; Val : Boolean);
1898       pragma Inline (Set_Flag32);
1899
1900       procedure Set_Flag33 (N : Node_Id; Val : Boolean);
1901       pragma Inline (Set_Flag33);
1902
1903       procedure Set_Flag34 (N : Node_Id; Val : Boolean);
1904       pragma Inline (Set_Flag34);
1905
1906       procedure Set_Flag35 (N : Node_Id; Val : Boolean);
1907       pragma Inline (Set_Flag35);
1908
1909       procedure Set_Flag36 (N : Node_Id; Val : Boolean);
1910       pragma Inline (Set_Flag36);
1911
1912       procedure Set_Flag37 (N : Node_Id; Val : Boolean);
1913       pragma Inline (Set_Flag37);
1914
1915       procedure Set_Flag38 (N : Node_Id; Val : Boolean);
1916       pragma Inline (Set_Flag38);
1917
1918       procedure Set_Flag39 (N : Node_Id; Val : Boolean);
1919       pragma Inline (Set_Flag39);
1920
1921       procedure Set_Flag40 (N : Node_Id; Val : Boolean);
1922       pragma Inline (Set_Flag40);
1923
1924       procedure Set_Flag41 (N : Node_Id; Val : Boolean);
1925       pragma Inline (Set_Flag41);
1926
1927       procedure Set_Flag42 (N : Node_Id; Val : Boolean);
1928       pragma Inline (Set_Flag42);
1929
1930       procedure Set_Flag43 (N : Node_Id; Val : Boolean);
1931       pragma Inline (Set_Flag43);
1932
1933       procedure Set_Flag44 (N : Node_Id; Val : Boolean);
1934       pragma Inline (Set_Flag44);
1935
1936       procedure Set_Flag45 (N : Node_Id; Val : Boolean);
1937       pragma Inline (Set_Flag45);
1938
1939       procedure Set_Flag46 (N : Node_Id; Val : Boolean);
1940       pragma Inline (Set_Flag46);
1941
1942       procedure Set_Flag47 (N : Node_Id; Val : Boolean);
1943       pragma Inline (Set_Flag47);
1944
1945       procedure Set_Flag48 (N : Node_Id; Val : Boolean);
1946       pragma Inline (Set_Flag48);
1947
1948       procedure Set_Flag49 (N : Node_Id; Val : Boolean);
1949       pragma Inline (Set_Flag49);
1950
1951       procedure Set_Flag50 (N : Node_Id; Val : Boolean);
1952       pragma Inline (Set_Flag50);
1953
1954       procedure Set_Flag51 (N : Node_Id; Val : Boolean);
1955       pragma Inline (Set_Flag51);
1956
1957       procedure Set_Flag52 (N : Node_Id; Val : Boolean);
1958       pragma Inline (Set_Flag52);
1959
1960       procedure Set_Flag53 (N : Node_Id; Val : Boolean);
1961       pragma Inline (Set_Flag53);
1962
1963       procedure Set_Flag54 (N : Node_Id; Val : Boolean);
1964       pragma Inline (Set_Flag54);
1965
1966       procedure Set_Flag55 (N : Node_Id; Val : Boolean);
1967       pragma Inline (Set_Flag55);
1968
1969       procedure Set_Flag56 (N : Node_Id; Val : Boolean);
1970       pragma Inline (Set_Flag56);
1971
1972       procedure Set_Flag57 (N : Node_Id; Val : Boolean);
1973       pragma Inline (Set_Flag57);
1974
1975       procedure Set_Flag58 (N : Node_Id; Val : Boolean);
1976       pragma Inline (Set_Flag58);
1977
1978       procedure Set_Flag59 (N : Node_Id; Val : Boolean);
1979       pragma Inline (Set_Flag59);
1980
1981       procedure Set_Flag60 (N : Node_Id; Val : Boolean);
1982       pragma Inline (Set_Flag60);
1983
1984       procedure Set_Flag61 (N : Node_Id; Val : Boolean);
1985       pragma Inline (Set_Flag61);
1986
1987       procedure Set_Flag62 (N : Node_Id; Val : Boolean);
1988       pragma Inline (Set_Flag62);
1989
1990       procedure Set_Flag63 (N : Node_Id; Val : Boolean);
1991       pragma Inline (Set_Flag63);
1992
1993       procedure Set_Flag64 (N : Node_Id; Val : Boolean);
1994       pragma Inline (Set_Flag64);
1995
1996       procedure Set_Flag65 (N : Node_Id; Val : Boolean);
1997       pragma Inline (Set_Flag65);
1998
1999       procedure Set_Flag66 (N : Node_Id; Val : Boolean);
2000       pragma Inline (Set_Flag66);
2001
2002       procedure Set_Flag67 (N : Node_Id; Val : Boolean);
2003       pragma Inline (Set_Flag67);
2004
2005       procedure Set_Flag68 (N : Node_Id; Val : Boolean);
2006       pragma Inline (Set_Flag68);
2007
2008       procedure Set_Flag69 (N : Node_Id; Val : Boolean);
2009       pragma Inline (Set_Flag69);
2010
2011       procedure Set_Flag70 (N : Node_Id; Val : Boolean);
2012       pragma Inline (Set_Flag70);
2013
2014       procedure Set_Flag71 (N : Node_Id; Val : Boolean);
2015       pragma Inline (Set_Flag71);
2016
2017       procedure Set_Flag72 (N : Node_Id; Val : Boolean);
2018       pragma Inline (Set_Flag72);
2019
2020       procedure Set_Flag73 (N : Node_Id; Val : Boolean);
2021       pragma Inline (Set_Flag73);
2022
2023       procedure Set_Flag74 (N : Node_Id; Val : Boolean);
2024       pragma Inline (Set_Flag74);
2025
2026       procedure Set_Flag75 (N : Node_Id; Val : Boolean);
2027       pragma Inline (Set_Flag75);
2028
2029       procedure Set_Flag76 (N : Node_Id; Val : Boolean);
2030       pragma Inline (Set_Flag76);
2031
2032       procedure Set_Flag77 (N : Node_Id; Val : Boolean);
2033       pragma Inline (Set_Flag77);
2034
2035       procedure Set_Flag78 (N : Node_Id; Val : Boolean);
2036       pragma Inline (Set_Flag78);
2037
2038       procedure Set_Flag79 (N : Node_Id; Val : Boolean);
2039       pragma Inline (Set_Flag79);
2040
2041       procedure Set_Flag80 (N : Node_Id; Val : Boolean);
2042       pragma Inline (Set_Flag80);
2043
2044       procedure Set_Flag81 (N : Node_Id; Val : Boolean);
2045       pragma Inline (Set_Flag81);
2046
2047       procedure Set_Flag82 (N : Node_Id; Val : Boolean);
2048       pragma Inline (Set_Flag82);
2049
2050       procedure Set_Flag83 (N : Node_Id; Val : Boolean);
2051       pragma Inline (Set_Flag83);
2052
2053       procedure Set_Flag84 (N : Node_Id; Val : Boolean);
2054       pragma Inline (Set_Flag84);
2055
2056       procedure Set_Flag85 (N : Node_Id; Val : Boolean);
2057       pragma Inline (Set_Flag85);
2058
2059       procedure Set_Flag86 (N : Node_Id; Val : Boolean);
2060       pragma Inline (Set_Flag86);
2061
2062       procedure Set_Flag87 (N : Node_Id; Val : Boolean);
2063       pragma Inline (Set_Flag87);
2064
2065       procedure Set_Flag88 (N : Node_Id; Val : Boolean);
2066       pragma Inline (Set_Flag88);
2067
2068       procedure Set_Flag89 (N : Node_Id; Val : Boolean);
2069       pragma Inline (Set_Flag89);
2070
2071       procedure Set_Flag90 (N : Node_Id; Val : Boolean);
2072       pragma Inline (Set_Flag90);
2073
2074       procedure Set_Flag91 (N : Node_Id; Val : Boolean);
2075       pragma Inline (Set_Flag91);
2076
2077       procedure Set_Flag92 (N : Node_Id; Val : Boolean);
2078       pragma Inline (Set_Flag92);
2079
2080       procedure Set_Flag93 (N : Node_Id; Val : Boolean);
2081       pragma Inline (Set_Flag93);
2082
2083       procedure Set_Flag94 (N : Node_Id; Val : Boolean);
2084       pragma Inline (Set_Flag94);
2085
2086       procedure Set_Flag95 (N : Node_Id; Val : Boolean);
2087       pragma Inline (Set_Flag95);
2088
2089       procedure Set_Flag96 (N : Node_Id; Val : Boolean);
2090       pragma Inline (Set_Flag96);
2091
2092       procedure Set_Flag97 (N : Node_Id; Val : Boolean);
2093       pragma Inline (Set_Flag97);
2094
2095       procedure Set_Flag98 (N : Node_Id; Val : Boolean);
2096       pragma Inline (Set_Flag98);
2097
2098       procedure Set_Flag99 (N : Node_Id; Val : Boolean);
2099       pragma Inline (Set_Flag99);
2100
2101       procedure Set_Flag100 (N : Node_Id; Val : Boolean);
2102       pragma Inline (Set_Flag100);
2103
2104       procedure Set_Flag101 (N : Node_Id; Val : Boolean);
2105       pragma Inline (Set_Flag101);
2106
2107       procedure Set_Flag102 (N : Node_Id; Val : Boolean);
2108       pragma Inline (Set_Flag102);
2109
2110       procedure Set_Flag103 (N : Node_Id; Val : Boolean);
2111       pragma Inline (Set_Flag103);
2112
2113       procedure Set_Flag104 (N : Node_Id; Val : Boolean);
2114       pragma Inline (Set_Flag104);
2115
2116       procedure Set_Flag105 (N : Node_Id; Val : Boolean);
2117       pragma Inline (Set_Flag105);
2118
2119       procedure Set_Flag106 (N : Node_Id; Val : Boolean);
2120       pragma Inline (Set_Flag106);
2121
2122       procedure Set_Flag107 (N : Node_Id; Val : Boolean);
2123       pragma Inline (Set_Flag107);
2124
2125       procedure Set_Flag108 (N : Node_Id; Val : Boolean);
2126       pragma Inline (Set_Flag108);
2127
2128       procedure Set_Flag109 (N : Node_Id; Val : Boolean);
2129       pragma Inline (Set_Flag109);
2130
2131       procedure Set_Flag110 (N : Node_Id; Val : Boolean);
2132       pragma Inline (Set_Flag110);
2133
2134       procedure Set_Flag111 (N : Node_Id; Val : Boolean);
2135       pragma Inline (Set_Flag111);
2136
2137       procedure Set_Flag112 (N : Node_Id; Val : Boolean);
2138       pragma Inline (Set_Flag112);
2139
2140       procedure Set_Flag113 (N : Node_Id; Val : Boolean);
2141       pragma Inline (Set_Flag113);
2142
2143       procedure Set_Flag114 (N : Node_Id; Val : Boolean);
2144       pragma Inline (Set_Flag114);
2145
2146       procedure Set_Flag115 (N : Node_Id; Val : Boolean);
2147       pragma Inline (Set_Flag115);
2148
2149       procedure Set_Flag116 (N : Node_Id; Val : Boolean);
2150       pragma Inline (Set_Flag116);
2151
2152       procedure Set_Flag117 (N : Node_Id; Val : Boolean);
2153       pragma Inline (Set_Flag117);
2154
2155       procedure Set_Flag118 (N : Node_Id; Val : Boolean);
2156       pragma Inline (Set_Flag118);
2157
2158       procedure Set_Flag119 (N : Node_Id; Val : Boolean);
2159       pragma Inline (Set_Flag119);
2160
2161       procedure Set_Flag120 (N : Node_Id; Val : Boolean);
2162       pragma Inline (Set_Flag120);
2163
2164       procedure Set_Flag121 (N : Node_Id; Val : Boolean);
2165       pragma Inline (Set_Flag121);
2166
2167       procedure Set_Flag122 (N : Node_Id; Val : Boolean);
2168       pragma Inline (Set_Flag122);
2169
2170       procedure Set_Flag123 (N : Node_Id; Val : Boolean);
2171       pragma Inline (Set_Flag123);
2172
2173       procedure Set_Flag124 (N : Node_Id; Val : Boolean);
2174       pragma Inline (Set_Flag124);
2175
2176       procedure Set_Flag125 (N : Node_Id; Val : Boolean);
2177       pragma Inline (Set_Flag125);
2178
2179       procedure Set_Flag126 (N : Node_Id; Val : Boolean);
2180       pragma Inline (Set_Flag126);
2181
2182       procedure Set_Flag127 (N : Node_Id; Val : Boolean);
2183       pragma Inline (Set_Flag127);
2184
2185       procedure Set_Flag128 (N : Node_Id; Val : Boolean);
2186       pragma Inline (Set_Flag128);
2187
2188       procedure Set_Flag129 (N : Node_Id; Val : Boolean);
2189       pragma Inline (Set_Flag129);
2190
2191       procedure Set_Flag130 (N : Node_Id; Val : Boolean);
2192       pragma Inline (Set_Flag130);
2193
2194       procedure Set_Flag131 (N : Node_Id; Val : Boolean);
2195       pragma Inline (Set_Flag131);
2196
2197       procedure Set_Flag132 (N : Node_Id; Val : Boolean);
2198       pragma Inline (Set_Flag132);
2199
2200       procedure Set_Flag133 (N : Node_Id; Val : Boolean);
2201       pragma Inline (Set_Flag133);
2202
2203       procedure Set_Flag134 (N : Node_Id; Val : Boolean);
2204       pragma Inline (Set_Flag134);
2205
2206       procedure Set_Flag135 (N : Node_Id; Val : Boolean);
2207       pragma Inline (Set_Flag135);
2208
2209       procedure Set_Flag136 (N : Node_Id; Val : Boolean);
2210       pragma Inline (Set_Flag136);
2211
2212       procedure Set_Flag137 (N : Node_Id; Val : Boolean);
2213       pragma Inline (Set_Flag137);
2214
2215       procedure Set_Flag138 (N : Node_Id; Val : Boolean);
2216       pragma Inline (Set_Flag138);
2217
2218       procedure Set_Flag139 (N : Node_Id; Val : Boolean);
2219       pragma Inline (Set_Flag139);
2220
2221       procedure Set_Flag140 (N : Node_Id; Val : Boolean);
2222       pragma Inline (Set_Flag140);
2223
2224       procedure Set_Flag141 (N : Node_Id; Val : Boolean);
2225       pragma Inline (Set_Flag141);
2226
2227       procedure Set_Flag142 (N : Node_Id; Val : Boolean);
2228       pragma Inline (Set_Flag142);
2229
2230       procedure Set_Flag143 (N : Node_Id; Val : Boolean);
2231       pragma Inline (Set_Flag143);
2232
2233       procedure Set_Flag144 (N : Node_Id; Val : Boolean);
2234       pragma Inline (Set_Flag144);
2235
2236       procedure Set_Flag145 (N : Node_Id; Val : Boolean);
2237       pragma Inline (Set_Flag145);
2238
2239       procedure Set_Flag146 (N : Node_Id; Val : Boolean);
2240       pragma Inline (Set_Flag146);
2241
2242       procedure Set_Flag147 (N : Node_Id; Val : Boolean);
2243       pragma Inline (Set_Flag147);
2244
2245       procedure Set_Flag148 (N : Node_Id; Val : Boolean);
2246       pragma Inline (Set_Flag148);
2247
2248       procedure Set_Flag149 (N : Node_Id; Val : Boolean);
2249       pragma Inline (Set_Flag149);
2250
2251       procedure Set_Flag150 (N : Node_Id; Val : Boolean);
2252       pragma Inline (Set_Flag150);
2253
2254       procedure Set_Flag151 (N : Node_Id; Val : Boolean);
2255       pragma Inline (Set_Flag151);
2256
2257       procedure Set_Flag152 (N : Node_Id; Val : Boolean);
2258       pragma Inline (Set_Flag152);
2259
2260       procedure Set_Flag153 (N : Node_Id; Val : Boolean);
2261       pragma Inline (Set_Flag153);
2262
2263       procedure Set_Flag154 (N : Node_Id; Val : Boolean);
2264       pragma Inline (Set_Flag154);
2265
2266       procedure Set_Flag155 (N : Node_Id; Val : Boolean);
2267       pragma Inline (Set_Flag155);
2268
2269       procedure Set_Flag156 (N : Node_Id; Val : Boolean);
2270       pragma Inline (Set_Flag156);
2271
2272       procedure Set_Flag157 (N : Node_Id; Val : Boolean);
2273       pragma Inline (Set_Flag157);
2274
2275       procedure Set_Flag158 (N : Node_Id; Val : Boolean);
2276       pragma Inline (Set_Flag158);
2277
2278       procedure Set_Flag159 (N : Node_Id; Val : Boolean);
2279       pragma Inline (Set_Flag159);
2280
2281       procedure Set_Flag160 (N : Node_Id; Val : Boolean);
2282       pragma Inline (Set_Flag160);
2283
2284       procedure Set_Flag161 (N : Node_Id; Val : Boolean);
2285       pragma Inline (Set_Flag161);
2286
2287       procedure Set_Flag162 (N : Node_Id; Val : Boolean);
2288       pragma Inline (Set_Flag162);
2289
2290       procedure Set_Flag163 (N : Node_Id; Val : Boolean);
2291       pragma Inline (Set_Flag163);
2292
2293       procedure Set_Flag164 (N : Node_Id; Val : Boolean);
2294       pragma Inline (Set_Flag164);
2295
2296       procedure Set_Flag165 (N : Node_Id; Val : Boolean);
2297       pragma Inline (Set_Flag165);
2298
2299       procedure Set_Flag166 (N : Node_Id; Val : Boolean);
2300       pragma Inline (Set_Flag166);
2301
2302       procedure Set_Flag167 (N : Node_Id; Val : Boolean);
2303       pragma Inline (Set_Flag167);
2304
2305       procedure Set_Flag168 (N : Node_Id; Val : Boolean);
2306       pragma Inline (Set_Flag168);
2307
2308       procedure Set_Flag169 (N : Node_Id; Val : Boolean);
2309       pragma Inline (Set_Flag169);
2310
2311       procedure Set_Flag170 (N : Node_Id; Val : Boolean);
2312       pragma Inline (Set_Flag170);
2313
2314       procedure Set_Flag171 (N : Node_Id; Val : Boolean);
2315       pragma Inline (Set_Flag171);
2316
2317       procedure Set_Flag172 (N : Node_Id; Val : Boolean);
2318       pragma Inline (Set_Flag172);
2319
2320       procedure Set_Flag173 (N : Node_Id; Val : Boolean);
2321       pragma Inline (Set_Flag173);
2322
2323       procedure Set_Flag174 (N : Node_Id; Val : Boolean);
2324       pragma Inline (Set_Flag174);
2325
2326       procedure Set_Flag175 (N : Node_Id; Val : Boolean);
2327       pragma Inline (Set_Flag175);
2328
2329       procedure Set_Flag176 (N : Node_Id; Val : Boolean);
2330       pragma Inline (Set_Flag176);
2331
2332       procedure Set_Flag177 (N : Node_Id; Val : Boolean);
2333       pragma Inline (Set_Flag177);
2334
2335       procedure Set_Flag178 (N : Node_Id; Val : Boolean);
2336       pragma Inline (Set_Flag178);
2337
2338       procedure Set_Flag179 (N : Node_Id; Val : Boolean);
2339       pragma Inline (Set_Flag179);
2340
2341       procedure Set_Flag180 (N : Node_Id; Val : Boolean);
2342       pragma Inline (Set_Flag180);
2343
2344       procedure Set_Flag181 (N : Node_Id; Val : Boolean);
2345       pragma Inline (Set_Flag181);
2346
2347       procedure Set_Flag182 (N : Node_Id; Val : Boolean);
2348       pragma Inline (Set_Flag182);
2349
2350       procedure Set_Flag183 (N : Node_Id; Val : Boolean);
2351       pragma Inline (Set_Flag183);
2352
2353       --  The following versions of Set_Noden also set the parent
2354       --  pointer of the referenced node if it is non_Empty
2355
2356       procedure Set_Node1_With_Parent (N : Node_Id; Val : Node_Id);
2357       pragma Inline (Set_Node1_With_Parent);
2358
2359       procedure Set_Node2_With_Parent (N : Node_Id; Val : Node_Id);
2360       pragma Inline (Set_Node2_With_Parent);
2361
2362       procedure Set_Node3_With_Parent (N : Node_Id; Val : Node_Id);
2363       pragma Inline (Set_Node3_With_Parent);
2364
2365       procedure Set_Node4_With_Parent (N : Node_Id; Val : Node_Id);
2366       pragma Inline (Set_Node4_With_Parent);
2367
2368       procedure Set_Node5_With_Parent (N : Node_Id; Val : Node_Id);
2369       pragma Inline (Set_Node5_With_Parent);
2370
2371       --  The following versions of Set_Listn also set the parent pointer of
2372       --  the referenced node if it is non_Empty. The procedures for List6
2373       --  to List12 can only be applied to nodes which have an extension.
2374
2375       procedure Set_List1_With_Parent (N : Node_Id; Val : List_Id);
2376       pragma Inline (Set_List1_With_Parent);
2377
2378       procedure Set_List2_With_Parent (N : Node_Id; Val : List_Id);
2379       pragma Inline (Set_List2_With_Parent);
2380
2381       procedure Set_List3_With_Parent (N : Node_Id; Val : List_Id);
2382       pragma Inline (Set_List3_With_Parent);
2383
2384       procedure Set_List4_With_Parent (N : Node_Id; Val : List_Id);
2385       pragma Inline (Set_List4_With_Parent);
2386
2387       procedure Set_List5_With_Parent (N : Node_Id; Val : List_Id);
2388       pragma Inline (Set_List5_With_Parent);
2389
2390    end Unchecked_Access;
2391
2392    -----------------------------
2393    -- Private Part Subpackage --
2394    -----------------------------
2395
2396    --  The following package contains the definition of the data structure
2397    --  used by the implementation of the Atree package. Logically it really
2398    --  corresponds to the private part, hence the name. The reason that it
2399    --  is defined as a sub-package is to allow special access from clients
2400    --  that need to see the internals of the data structures.
2401
2402    package Atree_Private_Part is
2403
2404       -------------------------
2405       -- Tree Representation --
2406       -------------------------
2407
2408       --  The nodes of the tree are stored in a table (i.e. an array). In the
2409       --  case of extended nodes four consecutive components in the array are
2410       --  used. There are thus two formats for array components. One is used
2411       --  for non-extended nodes, and for the first component of extended
2412       --  nodes. The other is used for the extension parts (second, third and
2413       --  fourth components) of an extended node. A variant record structure
2414       --  is used to distinguish the two formats.
2415
2416       type Node_Record (Is_Extension : Boolean := False) is record
2417
2418          --  Logically, the only field in the common part is the above
2419          --  Is_Extension discriminant (a single bit). However, Gigi cannot
2420          --  yet handle such a structure, so we fill out the common part of
2421          --  the record with fields that are used in different ways for
2422          --  normal nodes and node extensions.
2423
2424          Pflag1, Pflag2 : Boolean;
2425          --  The Paren_Count field is represented using two boolean flags,
2426          --  where Pflag1 is worth 1, and Pflag2 is worth 2. This is done
2427          --  because we need to be easily able to reuse this field for
2428          --  extra flags in the extended node case.
2429
2430          In_List : Boolean;
2431          --  Flag used to indicate if node is a member of a list.
2432          --  This field is considered private to the Atree package.
2433
2434          Unused_1 : Boolean;
2435          --  Currently unused flag
2436
2437          Rewrite_Ins : Boolean;
2438          --  Flag set by Mark_Rewrite_Insertion procedure.
2439          --  This field is considered private to the Atree package.
2440
2441          Analyzed : Boolean;
2442          --  Flag to indicate the node has been analyzed (and expanded)
2443
2444          Comes_From_Source : Boolean;
2445          --  Flag to indicate that node comes from the source program (i.e.
2446          --  was built by the parser or scanner, not the analyzer or expander).
2447
2448          Error_Posted : Boolean;
2449          --  Flag to indicate that an error message has been posted on the
2450          --  node (to avoid duplicate flags on the same node)
2451
2452          Flag4  : Boolean;
2453          Flag5  : Boolean;
2454          Flag6  : Boolean;
2455          Flag7  : Boolean;
2456          Flag8  : Boolean;
2457          Flag9  : Boolean;
2458          Flag10 : Boolean;
2459          Flag11 : Boolean;
2460          Flag12 : Boolean;
2461          Flag13 : Boolean;
2462          Flag14 : Boolean;
2463          Flag15 : Boolean;
2464          Flag16 : Boolean;
2465          Flag17 : Boolean;
2466          Flag18 : Boolean;
2467          --  The eighteen flags for a normal node
2468
2469          --  The above fields are used as follows in components 2-4 of
2470          --  an extended node entry.
2471
2472          --    In_List            used as  Flag19, Flag40, Flag129
2473          --    Unused_1           used as  Flag20, Flag41, Flag130
2474          --    Rewrite_Ins        used as  Flag21, Flag42, Flag131
2475          --    Analyzed           used as  Flag22, Flag43, Flag132
2476          --    Comes_From_Source  used as  Flag23, Flag44, Flag133
2477          --    Error_Posted       used as  Flag24, Flag45, Flag134
2478          --    Flag4              used as  Flag25, Flag46, Flag135
2479          --    Flag5              used as  Flag26, Flag47, Flag136
2480          --    Flag6              used as  Flag27, Flag48, Flag137
2481          --    Flag7              used as  Flag28, Flag49, Flag138
2482          --    Flag8              used as  Flag29, Flag50, Flag139
2483          --    Flag9              used as  Flag30, Flag51, Flag140
2484          --    Flag10             used as  Flag31, Flag52, Flag141
2485          --    Flag11             used as  Flag32, Flag53, Flag142
2486          --    Flag12             used as  Flag33, Flag54, Flag143
2487          --    Flag13             used as  Flag34, Flag55, Flag144
2488          --    Flag14             used as  Flag35, Flag56, Flag145
2489          --    Flag15             used as  Flag36, Flag57, Flag146
2490          --    Flag16             used as  Flag37, Flag58, Flag147
2491          --    Flag17             used as  Flag38, Flag59, Flag148
2492          --    Flag18             used as  Flag39, Flag60, Flag149
2493          --    Pflag1             used as  Flag61, Flag62, Flag150
2494          --    Pflag2             used as  Flag63, Flag64, Flag151
2495
2496          Nkind : Node_Kind;
2497          --  For a non-extended node, or the initial section of an extended
2498          --  node, this field holds the Node_Kind value. For an extended node,
2499          --  The Nkind field is used as follows:
2500          --
2501          --     Second entry: holds the Ekind field of the entity
2502          --     Third entry:  holds 8 additional flags (Flag65-Flag72)
2503          --     Fourth entry: not currently used
2504
2505          --  Now finally (on an 32-bit boundary!) comes the variant part
2506
2507          case Is_Extension is
2508
2509             --  Non-extended node, or first component of extended node
2510
2511             when False =>
2512
2513                Sloc : Source_Ptr;
2514                --  Source location for this node
2515
2516                Link : Union_Id;
2517                --  This field is used either as the Parent pointer (if In_List
2518                --  is False), or to point to the list header (if In_List is
2519                --  True). This field is considered private and can be modified
2520                --  only by Atree or by Nlists.
2521
2522                Field1 : Union_Id;
2523                Field2 : Union_Id;
2524                Field3 : Union_Id;
2525                Field4 : Union_Id;
2526                Field5 : Union_Id;
2527                --  Five general use fields, which can contain Node_Id, List_Id,
2528                --  Elist_Id, String_Id, Name_Id, or Char_Code values depending
2529                --  on the values in Nkind and (for extended nodes), in Ekind.
2530                --  See packages Sinfo and Einfo for details of their use.
2531
2532             --  Extension (second component) of extended node
2533
2534             when True =>
2535                Field6  : Union_Id;
2536                Field7  : Union_Id;
2537                Field8  : Union_Id;
2538                Field9  : Union_Id;
2539                Field10 : Union_Id;
2540                Field11 : Union_Id;
2541                Field12 : Union_Id;
2542                --  Seven additional general fields available only for entities
2543                --  See package Einfo for details of their use (which depends
2544                --  on the value in the Ekind field).
2545
2546             --  In the third component, the extension format as described
2547             --  above is used to hold additional general fields and flags
2548             --  as follows:
2549
2550             --    Field6-11      Holds Field13-Field18
2551             --    Field12        Holds Flag73-Flag96 and Convention
2552
2553             --  In the fourth component, the extension format as described
2554             --  above is used to hold additional general fields and flags
2555             --  as follows:
2556
2557             --    Field6-10      Holds Field19-Field23
2558             --    Field11        Holds Flag152-Flag167 (16 bits unused)
2559             --    Field12        Holds Flag97-Flag128
2560
2561          end case;
2562       end record;
2563
2564       pragma Pack (Node_Record);
2565       for Node_Record'Size use 8*32;
2566       for Node_Record'Alignment use 4;
2567
2568       --  The following defines the extendible array used for the nodes table
2569       --  Nodes with extensions use two consecutive entries in the array
2570
2571       package Nodes is new Table.Table (
2572         Table_Component_Type => Node_Record,
2573         Table_Index_Type     => Node_Id,
2574         Table_Low_Bound      => First_Node_Id,
2575         Table_Initial        => Alloc.Nodes_Initial,
2576         Table_Increment      => Alloc.Nodes_Increment,
2577         Table_Name           => "Nodes");
2578
2579    end Atree_Private_Part;
2580
2581 end Atree;