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