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