1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
11 -- Copyright (C) 1992-2001 Free Software Foundation, Inc. --
13 -- GNAT is free software; you can redistribute it and/or modify it under --
14 -- terms of the GNU General Public License as published by the Free Soft- --
15 -- ware Foundation; either version 2, or (at your option) any later ver- --
16 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
17 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
18 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
19 -- for more details. You should have received a copy of the GNU General --
20 -- Public License distributed with GNAT; see file COPYING. If not, write --
21 -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
22 -- MA 02111-1307, USA. --
24 -- As a special exception, if other files instantiate generics from this --
25 -- unit, or you link this unit with other files to produce an executable, --
26 -- this unit does not by itself cause the resulting executable to be --
27 -- covered by the GNU General Public License. This exception does not --
28 -- however invalidate any other reasons why the executable file might be --
29 -- covered by the GNU Public License. --
31 -- GNAT was originally developed by the GNAT team at New York University. --
32 -- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). --
34 ------------------------------------------------------------------------------
36 with Types; use Types;
37 with Uintp; use Uintp;
38 with Urealp; use Urealp;
42 -- This package defines the annotations to the abstract syntax tree that
43 -- are needed to support semantic processing of an Ada compilation.
45 -- These annotations are for the most part attributes of declared entities,
46 -- and they correspond to conventional symbol table information. Other
47 -- attributes include sets of meanings for overloaded names, possible
48 -- types for overloaded expressions, flags to indicate deferred constants,
49 -- incomplete types, etc. These attributes are stored in available fields
50 -- in tree nodes (i.e. fields not used by the parser, as defined by the
51 -- Sinfo package specification), and accessed by means of a set of
52 -- subprograms which define an abstract interface.
54 -- There are two kinds of semantic information
56 -- First, the tree nodes with the following Nkind values:
58 -- N_Defining_Identifier
59 -- N_Defining_Character_Literal
60 -- N_Defining_Operator_Symbol
62 -- are called Entities, and constitute the information that would often
63 -- be stored separately in a symbol table. These nodes are all extended
64 -- to provide extra space, and contain fields which depend on the entity
65 -- kind, as defined by the contents of the Ekind field. The use of the
66 -- Ekind field, and the associated fields in the entity, are defined
67 -- in this package, as are the access functions to these fields.
69 -- Second, in some cases semantic information is stored directly in other
70 -- kinds of nodes, e.g. the Etype field, used to indicate the type of an
71 -- expression. The access functions to these fields are defined in the
72 -- Sinfo package, but their full documentation is to be found in
73 -- the Einfo package specification.
75 -- Declaration processing places information in the nodes of their defining
76 -- identifiers. Name resolution places in all other occurrences of an
77 -- identifier a pointer to the corresponding defining occurrence.
79 --------------------------------
80 -- The XEINFO Utility Program --
81 --------------------------------
83 -- XEINFO is a utility program which automatically produces a C header file,
84 -- a-xeinfo.h from the spec and body of package Einfo. It reads the input
85 -- files einfo.ads and einfo.adb and produces the output file a-xeinfo.h.
87 -- In order for this utility program to operate correctly, the form of the
88 -- einfo.ads and einfo.adb files must meet certain requirements and be laid
89 -- out in a specific manner.
91 -- The general form of einfo.ads is as follows:
93 -- type declaration for type Entity_Kind
94 -- subtype declarations declaring subranges of Entity_Kind
95 -- subtype declarations declaring synonyms for some standard types
96 -- function specs for attributes
98 -- pragma Inline declarations
100 -- This order must be observed. There are no restrictions on the procedures,
101 -- since the C header file only includes functions (Gigi is not allowed to
102 -- modify the generated tree). However, functions are required to have headers
103 -- that fit on a single line.
105 -- XEINFO reads and processes the function specs and the pragma Inlines. For
106 -- functions that are declared as inlined, XEINFO reads the corresponding body
107 -- from xeinfo.adb, and processes it into C code. This results in some strict
108 -- restrictions on which functions can be inlined:
110 -- The function spec must be on a single line
112 -- There can only be a single statement, contained on a single line,
113 -- not counting any pragma Assert statements.
115 -- This single statement must either by a function call with simple,
116 -- single token arguments, or it must be a membership test of the form
117 -- a in b, where a and b are single tokens.
119 -- For functions that are not inlined, there is no restriction on the body,
120 -- and XEINFO generates a direct reference in the C header file which allows
121 -- the C code in Gigi to directly call the corresponding Ada body.
123 ----------------------------------
124 -- Handling of Type'Size Values --
125 ----------------------------------
127 -- The Ada 95 RM contains some rather peculiar (to us!) rules on the value
128 -- of type'Size (see RM 13.3(55)). We have found that attempting to use
129 -- these RM Size values generally, and in particular for determining the
130 -- default size of objects, creates chaos, and major incompatibilies in
133 -- We proceed as follows, for discrete and fixed-point subtypes, we have
134 -- two separate sizes for each subtype:
136 -- The Object_Size, which is used for determining the default size of
137 -- objects and components. This size value can be referred to using the
138 -- Object_Size attribute. The phrase "is used" here means that it is
139 -- the basis of the determination of the size. The backend is free to
140 -- pad this up if necessary for efficiency, e.g. an 8-bit stand-alone
141 -- character might be stored in 32 bits on a machine with no efficient
142 -- byte access instructions such as the Alpha.
144 -- The default rules for the value of Object_Size for fixed-point and
145 -- discrete types are as follows:
147 -- The Object_Size for base subtypes reflect the natural hardware
148 -- size in bits (see Ttypes and Cstand for integer types). For
149 -- enumeration and fixed-point base subtypes have 8. 16. 32 or 64
150 -- bits for this size, depending on the range of values to be stored.
152 -- The Object_Size of a subtype is the same as the Object_Size of
153 -- the subtype from which it is obtained.
155 -- The Object_Size of a derived base type is copied from the parent
156 -- base type, and the Object_Size of a derived first subtype is copied
157 -- from the parent first subtype.
159 -- The Value_Size which is the number of bits required to store a value
160 -- of the type. This size can be referred to using the Value_Size
161 -- attribute. This value is used to determine how tightly to pack
162 -- records or arrays with components of this type, and also affects
163 -- the semantics of unchecked conversion (unchecked conversions where
164 -- the Value_Size values differ generate a warning, and are potentially
165 -- target dependent).
167 -- The default rule for the value of Value_Size are as follows:
169 -- The Value_Size for a base subtype is the minimum number of bits
170 -- required to store all values of the type (including the sign bit
171 -- only if negative values are possible).
173 -- If a subtype statically matches the first subtype, then it has
174 -- by default the same Value_Size as the first subtype. This is a
175 -- consequence of RM 13.1(14) ("if two subtypes statically match,
176 -- then their subtype-specific aspects are the same".)
178 -- All other subtypes have a Value_Size corresponding to the minimum
179 -- number of bits required to store all values of the subtype. For
180 -- dynamic bounds, it is assumed that the value can range down or up
181 -- to the corresponding bound of the ancestor
183 -- The RM defined attribute Size corresponds to the Value_Size attribute.
185 -- The Size attribute may be defined for a first-named subtype. This sets
186 -- the Value_Size of the first-named subtype to the given value, and the
187 -- Object_Size of this first-named subtype to the given value padded up
188 -- to an appropriate boundary. It is a consequence of the default rules
189 -- above that this Object_Size will apply to all further subtypes. On the
190 -- otyher hand, Value_Size is affected only for the first subtype, any
191 -- dynamic subtypes obtained from it directly, and any statically matching
192 -- subtypes. The Value_Size of any other static subtypes is not affected.
194 -- Value_Size and Object_Size may be explicitly set for any subtype using
195 -- an attribute definition clause. Note that the use of these attributes
196 -- can cause the RM 13.1(14) rule to be violated. If two access types
197 -- reference aliased objects whose subtypes have differing Object_Size
198 -- values as a result of explicit attribute definition clauses, then it
199 -- is erroneous to convert from one access subtype to the other.
201 -- At the implementation level, Esize stores the Object_Size and the
202 -- RM_Size field stores the Value_Size (and hence the value of the
203 -- Size attribute, which, as noted above, is equivalent to Value_Size).
205 -- To get a feel for the difference, consider the following examples (note
206 -- that in each case the base is short_short_integer with a size of 8):
208 -- Object_Size Value_Size
210 -- type x1 is range 0..5; 8 3
212 -- type x2 is range 0..5;
213 -- for x2'size use 12; 12 12
215 -- subtype x3 is x2 range 0 .. 3; 12 2
217 -- subtype x4 is x2'base range 0 .. 10; 8 4
219 -- subtype x5 is x2 range 0 .. dynamic; 12 (7)
221 -- subtype x6 is x2'base range 0 .. dynamic; 8 (7)
223 -- Note: the entries marked (7) are not actually specified by the Ada 95 RM,
224 -- but it seems in the spirit of the RM rules to allocate the minimum number
225 -- of bits known to be large enough to hold the given range of values.
227 -- So far, so good, but GNAT has to obey the RM rules, so the question is
228 -- under what conditions must the RM Size be used. The following is a list
229 -- of the occasions on which the RM Size must be used:
231 -- Component size for packed arrays or records
232 -- Value of the attribute Size for a type
233 -- Warning about sizes not matching for unchecked conversion
235 -- The RM_Size field keeps track of the RM Size as needed in these
238 -- For types other than discrete and fixed-point types, the Object_Size
239 -- and Value_Size are the same (and equivalent to the RM attribute Size).
240 -- Only Size may be specified for such types.
242 -----------------------
243 -- Entity Attributes --
244 -----------------------
246 -- This section contains a complete list of the attributes that are defined
247 -- on entities. Some attributes apply to all entities, others only to certain
248 -- kinds of entities. In the latter case the attribute should only be set or
249 -- accessed if the Ekind field indicates an appropriate entity.
251 -- There are two kinds of attributes that apply to entities, stored and
252 -- synthesized. Stored attributes correspond to a field or flag in the entity
253 -- itself. Such attributes are identified in the table below by giving the
254 -- field or flag in the attribute that is used to hold the attribute value.
255 -- Synthesized attributes are not stored directly, but are rather computed as
256 -- needed from other attributes, or from information in the tree. These are
257 -- marked "synthesized" in the table below. The stored attributes have both
258 -- access functions and set procedures to set the corresponding values, while
259 -- synthesized attributes have only access functions.
261 -- Note: in the case of Node, Uint, or Elist fields, there are cases where
262 -- the same physical field is used for different purposes in different
263 -- entities, so these access functions should only be referenced for the
264 -- class of entities in which they are defined as being present. Flags are
265 -- not overlapped in this way, but nevertheless as a matter of style and
266 -- abstraction (which may or may not be checked by assertions in the body),
267 -- this restriction should be observed for flag fields as well.
269 -- Note: certain of the attributes on types apply only to base types, and
270 -- are so noted by the notation [base type only]. These are cases where the
271 -- attribute of any subtype is the same as the attribute of the base type.
272 -- The attribute can be referenced on a subtype (and automatically retrieves
273 -- the value from the base type), and if an attempt is made to set them on
274 -- other than a subtype, they will instead be set on the corresponding base
277 -- Other attributes are noted as applying the implementation base type only.
278 -- These are representation attributes which must always apply to a full
279 -- non-private type, and where the attributes are always on the full type.
280 -- The attribute can be referenced on a subtype (and automatically retries
281 -- the value from the implementation base type), and if an attempt is made
282 -- to set them on other than a subtype, they will instead be set on the
283 -- corresponding implementation base type.
285 -- Accept_Address (Elist21)
286 -- Present in entries. If an accept has a statement sequence, then an
287 -- address variable is created, which is used to hold the address of the
288 -- parameters, as passed by the runtime. Accept_Address holds an element
289 -- list which represents a stack of entities for these address variables.
290 -- The current entry is the top of the stack, which is the last element
291 -- on the list. A stack is required to handle the case of nested select
292 -- statements referencing the same entry.
294 -- Actual_Subtype (Node17)
295 -- Present in variables, constants, and formal parameters. This is the
296 -- subtype imposed by the value of the object, as opposed to its nominal
297 -- subtype, which is imposed by the declaration. The actual subtype
298 -- differs from the nominal one when the latter is indefinite (as in the
299 -- case of an unconstrained formal parameter, or a variable declared
300 -- with an unconstrained type and an initial value). The nominal subtype
301 -- is the Etype entry for the entity. The Actual_Subtype field is set
302 -- only if the actual subtype differs from the nominal subtype. If the
303 -- actual and nominal subtypes are the same, then the Actual_Subtype
304 -- field is Empty, and Etype indicates both types.
305 -- For objects, the Actual_Subtype is set only if this is a discriminated
306 -- type. For arrays, the bounds of the expression are obtained and the
307 -- Etype of the object is directly the constrained subtype. This is
308 -- rather irregular, and the semantic checks that depend on the nominal
309 -- subtype being unconstrained use flag Is_Constr_Subt_For_U_Nominal(qv).
311 -- Access_Disp_Table (Node16) [base type only]
312 -- Present in record type entities. For a tagged type, points to the
313 -- dispatch table associated with the tagged type. For a non-tagged
314 -- record, contains Empty.
316 -- Address_Clause (synthesized)
317 -- Applies to entries, objects and subprograms. Set if an address clause
318 -- is present which references the object or subprogram and points to
319 -- the N_Attribute_Definition_Clause node. Empty if no Address clause.
320 -- The expression in the address clause is always a constant that is
321 -- defined before the entity to which the address clause applies.
322 -- Note: Gigi references this field in E_Task_Type entities???
324 -- Address_Taken (Flag104)
325 -- Present in all entities. Set if the Address or Unrestricted_Access
326 -- attribute is applied directly to the entity, i.e. the entity is the
327 -- entity of the prefix of the attribute reference. Used by Gigi to
328 -- make sure that the address can be meaningfully taken.
331 -- Present in overloaded entities (literals, subprograms, entries).
332 -- Points to parent subprogram of a derived subprogram. Also used for
333 -- a subprogram renaming, where it points to the renamed subprogram.
334 -- Always empty for entries.
336 -- Alignment (Uint14)
337 -- Present in all entities for types and objects. This indicates the
338 -- desired alignment for a type, or the actual alignment for an object.
339 -- A value of zero (Uint_0) indicates that the alignment is not yet set.
340 -- The alignment can be set by an explicit alignment clause, or set by
341 -- the front-end in package Layout, or set by the back-end.
343 -- Alignment_Clause (synthesized)
344 -- Appllies to all entities for types and objects. If an alignment
345 -- attribute definition clause is present for the entity, then this
346 -- function returns the N_Attribute_Definition clause that specifies the
347 -- alignment. If no alignment clause applies to the type, then the call
348 -- to this function returns Empty. Note that the call can return a
349 -- non-Empty value even if Has_Alignment_Clause is not set (happens with
350 -- subtype and derived type declarations). Note also that a record
351 -- definition clause with an (obsolescent) mod clause is converted
352 -- into an attribute definition clause for this purpose.
354 -- Ancestor_Subtype (synthesized)
355 -- Applies to all type and subtype entities. If the argument is a
356 -- subtype then it returns the subtype or type from which the subtype
357 -- was obtained, otherwise it returns Empty.
359 -- Associated_Formal_Package (Node12)
360 -- Present in packages that are the actuals of formal_packages. Points
361 -- to the entity in the declaration for the formal package.
363 -- Associated_Node_For_Itype (Node8)
364 -- Present in all type and subtype entities. Set non-Empty only for
365 -- Itypes. Set to point to the associated node for the Itype, i.e.
366 -- the node whose elaboration generated the Itype. This is used for
367 -- copying trees, to determine whether or not to copy an Itype.
369 -- Associated_Storage_Pool (Node22)
370 -- Present in simple and general access type entities. References the
371 -- storage pool to be used for the corresponding collection. A value of
372 -- Empty means that the default pool is to be used.
374 -- Associated_Final_Chain (Node23)
375 -- Present in simple and general access type entities. References the
376 -- List_Controller object that holds the finalization chain on which
377 -- are attached dynamically allocated objects referenced by the access
378 -- type. Empty when the access type cannot reference a controlled object.
380 -- Barrier_Function (Node12)
381 -- Present in protected entries and entry families. This is the
382 -- subprogram declaration for the body of the function that returns
383 -- the value of the entry barrier.
385 -- Base_Type (synthesized)
386 -- Applies to all type entities. Returns the base type of a type or
387 -- subtype. The base type of a type is the type itself. The base type
388 -- of a subtype is the type that it constrains (which is always a type
389 -- entity, not some other subtype). Note that in the case of a subtype
390 -- of a private type, it is possible for the base type attribute to
391 -- return a private type, even if the subtype to which it applies is
392 -- non-private. See also Implementation_Base_Type. Note: it is allowed
393 -- to apply Base_Type to other than a type, in which case it simply
394 -- returns the entity unchanged.
396 -- Block_Node (Node11)
397 -- Present in block entities. Points to the Block_Statement itself.
399 -- Body_Entity (Node19)
400 -- Present in package entities, points to the corresponding package
401 -- body entity if one is present.
403 -- C_Pass_By_Copy (Flag125) [implementation base type only]
404 -- Present in record types. Set if a pragma Convention for the record
405 -- type specifies convention C_Pass_By_Copy. This convention name is
406 -- treated as identical in all respects to convention C, except that
407 -- if it is specified for a record type, then the C_Pass_By_Copy flag
408 -- is set, and if a foreign convention subprogram has a formal of the
409 -- corresponding type, then the parameter passing mechanism will be
410 -- set to By_Copy (unless specifically overridden by an Import or
414 -- Present in all entities. This field contains an entry into the names
415 -- table that has the character string of the identifier, character
416 -- literal or operator symbol. See Namet for further details. Note that
417 -- throughout the processing of the front end, this name is the simple
418 -- unqualified name. However, just before gigi is called, a call is made
419 -- to Qualify_All_Entity_Names. This causes entity names to be qualified
420 -- using the encoding described in exp_dbug.ads, and from that point on
421 -- (including post gigi steps such as cross-reference generation), the
422 -- entities will contain the encoded qualified names.
424 -- Class_Wide_Type (Node9)
425 -- Present in all type entities. For a tagged type or subtype, returns
426 -- the corresponding implicitly declared class-wide type. Set to Empty
427 -- for non-tagged types.
429 -- Cloned_Subtype (Node16)
430 -- Present in E_Record_Subtype and E_Class_Wide_Subtype entities.
431 -- Each such entity can either have a Discriminant_Constraint, in
432 -- which case it represents a distinct type from the base type (and
433 -- will have a list of components and discrimants in the list headed by
434 -- First_Entity) or else no such constraint, in which case it will be a
435 -- copy of the base type.
437 -- o Each element of the list in First_Entity is copied from the base
438 -- type; in that case, this field is Empty.
440 -- o The list in First_Entity is shared with the base type; in that
441 -- case, this field points to that entity.
443 -- A record or classwide subtype may also be a copy of some other
444 -- subtype and share the entities in the First_Entity with that subtype.
445 -- In that case, this field points to that subtype.
447 -- For E_Class_Wide_Subtype, the presence of Equivalent_Type overrides
448 -- this field. Note that this field ONLY appears in subtype entries, not
449 -- in type entries, it is not present, and it is an error to reference
450 -- Cloned_Subtype in an E_Record_Type or E_Class_Wide_Type entity.
453 -- This flag appears on all nodes, including entities, and indicates
454 -- that the node was created by the scanner or parser from the original
455 -- source. Thus for entities, it indicates that the entity is defined
456 -- in the original source program.
458 -- Component_Alignment (special field) [base type only]
459 -- Present in array and record entities. Contains a value of type
460 -- Component_Alignment_Kind indicating the alignment of components.
461 -- Set to Calign_Default normally, but can be overridden by use of
462 -- the Component_Alignment pragma. Note: this field is currently
463 -- stored in a non-standard way, see body for details.
465 -- Component_Bit_Offset (Uint11)
466 -- Present in record components (E_Component, E_Discriminant) if a
467 -- component clause applies to the component. First bit position of
468 -- given component, computed from the first bit and position values
469 -- given in the component clause. A value of No_Uint means that the
470 -- value is not yet known. The value can be set by the appearence of
471 -- an explicit component clause in a record representation clause,
472 -- or it can be set by the front-end in package Layout, or it can be
473 -- set by the backend. By the time backend processing is completed,
474 -- this field is always set. A negative value is used to represent
475 -- a value which is not known at compile time, and must be computed
476 -- at run-time (this happens if fields of a record have variable
477 -- lengths). See package Layout for details of these values.
479 -- Note: this field is obsolescent, to be eventually replaced entirely
480 -- by Normalized_First_Bit and Normalized_Position, but for the moment,
481 -- gigi is still using (and back annotating) this field, and gigi does
482 -- not know about the new fields. For the front end layout case, the
483 -- Component_Bit_Offset field is only set if it is static, and otherwise
484 -- the new Normalized_First_Bit and Normalized_Position fields are used.
486 -- Component_Clause (Node13)
487 -- Present in record components and discriminants. If a record
488 -- representation clause is present for the corresponding record
489 -- type a that specifies a position for the component, then the
490 -- Component_Clause field of the E_Component entity points to the
491 -- N_Component_Claue node. Set to Empty if no record representation
492 -- clause was present, or if there was no specification for this
495 -- Component_Size (Uint22) [implementation base type only]
496 -- Present in array types. It contains the component size value for
497 -- the array. A value of zero means that the value is not yet set.
498 -- The value can be set by the use of a component size clause, or
499 -- by the front end in package Layout, or by the backend. A negative
500 -- value is used to represent a value which is not known at compile
501 -- time, and must be computed at run-time (this happens if the type
502 -- of the component has a variable length size). See package Layout
503 -- for details of these values.
505 -- Component_Type (Node20) [implementation base type only]
506 -- Present in array types and subtypes, and also in the special
507 -- enumeration table type created for enumeration type. References
508 -- the entity for the component type.
510 -- Constant_Value (synthesized)
511 -- Applies to constants, named integers, and named reals. Obtains
512 -- the initialization expression for the entity. Will return Empty for
513 -- for a deferred constant whose full view is not available or in some
514 -- other cases of internal entities, which cannot be treated as
515 -- constants from the point of view of constant folding.
517 -- Corresponding_Concurrent_Type (Node18)
518 -- Present in record types that are constructed by the expander to
519 -- represent task and protected types (Is_Concurrent_Record_Type flag
520 -- set True). Points to the entity for the corresponding task type or
523 -- Corresponding_Discriminant (Node19)
524 -- Present in discriminants of a derived type, when the discriminant is
525 -- used to constrain a discriminant of the parent type. Points to the
526 -- corresponding discriminant in the parent type. Otherwise it is Empty.
528 -- Corresponding_Equality (Node13)
529 -- Present in function entities for implicit inequality operators.
530 -- Denotes the explicit or derived equality operation that creates
531 -- the implicit inequality. Note that this field is not present in
532 -- other function entities, only in implicit inequality routines,
533 -- where Comes_From_Source is always False.
535 -- Corresponding_Record_Type (Node18)
536 -- Present in protected and task types and subtypes. References the
537 -- entity for the corresponding record type constructed by the expander
538 -- (see Exp_Ch9). This type is used to represent values of the task type.
540 -- Corresponding_Remote_Type (Node22)
541 -- Present in record types that describe the fat pointer structure for
542 -- Remote_Access_To_Subrogram types. References the original access type.
544 -- CR_Discriminant (Node23)
545 -- Present in discriminants of concurrent types. Denotes the homologous
546 -- discriminant of the corresponding record type. The CR_Discriminant is
547 -- created at the same time as the discriminal, and used to replace
548 -- occurrences of the discriminant within the type declaration.
550 -- Debug_Info_Off (Flag166)
551 -- Present in all entities. Set if a pragma Suppress_Debug_Info applies
552 -- to the entity, or if internal processing in the compiler determines
553 -- that suppression of debug information is desirable.
555 -- Debug_Renaming_Link (Node13)
556 -- Used to link the enumeration literal of a debug renaming declaration
557 -- to the renamed entity. See Exp_Dbug.Debug_Renaming_Declaration for
558 -- details of the use of this field.
560 -- Declaration_Node (synthesized)
561 -- Applies to all entities. Returns the tree node for the declaration
562 -- that declared the entity. Normally this is just the Parent of the
563 -- entity. One exception arises with child units, where the parent of
564 -- the entity is a selected component or a defining program unit name.
565 -- Another exception is that if the entity is an incomplete type that
566 -- has been completed, then we obtain the declaration node denoted by
567 -- the full type, i.e. the full type declaration node.
569 -- Default_Expr_Function (Node21)
570 -- Present in parameters. It holds the entity of the parameterless
571 -- function that is built to evaluate the default expression if it is
572 -- more complex than a simple identifier or literal. For the latter
573 -- simple cases or if there is no default value, this field is Empty.
575 -- Default_Expressions_Processed (Flag108)
576 -- A flag in subprograms (functions, operators, procedures) and in
577 -- entries and entry families used to indicate that default expressions
578 -- have been processed and to avoid multiple calls to process the
579 -- default expressions (see Freeze.Process_Default_Expressions), which
580 -- would not only waste time, but also generate false error messages.
582 -- Default_Value (Node20)
583 -- Present in formal parameters. Points to the node representing the
584 -- expression for the default value for the parameter. Empty if the
585 -- parameter has no default value (which is always the case for OUT
586 -- and IN OUT parameters in the absence of errors).
588 -- Delay_Cleanups (Flag114)
589 -- Present in entities that have finalization lists (subprograms
590 -- blocks, and tasks). Set if there are pending generic body
591 -- instantiations for the corresponding entity. If this flag is
592 -- set, then generation of cleanup actions for the corresponding
593 -- entity must be delayed, since the insertion of the generic body
594 -- may affect cleanup generation (see Inline for further details).
596 -- Delay_Subprogram_Descriptors (Flag50)
597 -- Present in entities for which exception subprogram descriptors
598 -- are generated (subprograms, package declarations and package
599 -- bodies). Present if there are pending generic body instantiations
600 -- for the corresponding entity. If this flag is set, then generation
601 -- of the subprogram descriptor for the corresponding enities must
602 -- be delayed, since the insertion of the generic body may add entries
603 -- to the list of handlers.
605 -- Note: for subprograms, Delay_Subprogram_Descriptors is set if and
606 -- only if Delay_Cleanups is set. But Delay_Cleanups can be set for a
607 -- a block (in which case Delay_Subprogram_Descriptors is set for the
608 -- containing subprogram). In addition Delay_Subprogram_Descriptors is
609 -- set for a library level package declaration or body which contains
610 -- delayed instantiations (in this case the descriptor refers to the
611 -- enclosing elaboration procedure).
613 -- Delta_Value (Ureal18)
614 -- Present in fixed and decimal types. Points to a universal real
615 -- that holds value of delta for the type, as given in the declaration
616 -- or as inherited by a subtype or derived type.
618 -- Dependent_Instances (Elist8)
619 -- Present in packages that are instances. Holds list of instances
620 -- of inner generics. Used to place freeze nodes for those instances
621 -- after that of the current one, i.e. after the corresponding generic
624 -- Depends_On_Private (Flag14)
625 -- Present in all type entities. Set if the type is private or if it
626 -- depends on a private type.
628 -- Designated_Type (synthesized)
629 -- Applies to access types. Returns the designated type. Differs
630 -- from Directly_Designated_Type in that if the access type refers
631 -- to an incomplete type, and the full type is available, then this
632 -- full type is returned instead of the incomplete type.
634 -- Digits_Value (Uint17)
635 -- Present in floating point types and subtypes and decimal types and
636 -- subtypes. Contains the Digits value specified in the declaration.
638 -- Directly_Designated_Type (Node20)
639 -- Present in access types. This field points to the type that is
640 -- directly designated by the access type. In the case of an access
641 -- type to an incomplete type, this field references the incomplete
642 -- type. Note that in the semantic processing, what is useful in
643 -- nearly all cases is the full type designated by the access type.
644 -- The function Designated_Type obtains this full type in the case of
645 -- access to an incomplete type.
647 -- Discard_Names (Flag88)
648 -- Present in types and exception entities. Set if pragma Discard_Names
649 -- applies to the entity. It is also set for declarative regions and
650 -- package specs for which a Discard_Names pragma with zero arguments
651 -- has been encountered. The purpose of setting this flag is to be able
652 -- to set the Discard_Names attribute on enumeration types declared
653 -- after the pragma within the same declarative region.
655 -- Discriminal (Node17)
656 -- Present in discriminants (Discriminant formal: GNAT's first
657 -- coinage). The entity used as a formal parameter that corresponds
658 -- to a discriminant. See section "Use of Discriminants" for details.
660 -- Discriminal_Link (Node10)
661 -- Present in discriminals (which have an Ekind of E_In_Parameter,
662 -- or E_Constant), points back to corresponding discriminant.
664 -- Discriminant_Checking_Func (Node20)
665 -- Present in components. Points to the defining identifier of the
666 -- function built by the expander returns a Boolean indicating whether
667 -- the given record component exists for the current discriminant
670 -- Discriminant_Constraint (Elist21)
671 -- Present in entities whose Has_Discriminants flag is set (concurrent
672 -- types, subtypes, record types and subtypes, private types and
673 -- subtypes, limited private types and subtypes and incomplete types).
674 -- It is an error to reference the Discriminant_Constraint field if
675 -- Has_Disciminants is False.
677 -- If the Is_Constrained flag is set, Discriminant_Constraint points
678 -- to an element list containing the discriminant constraints in the
679 -- same order in which the discriminants are declared.
681 -- If the Is_Constrained flag is not set but the discriminants of the
682 -- unconstrained type have default initial values then this field
683 -- points to an element list giving these default initial values in
684 -- the same order in which the discriminants are declared. Note that
685 -- in this case the entity cannot be a tagged record type, because
686 -- discriminants in this case cannot have defaults.
688 -- If the entity is a tagged record implicit type, then this field is
689 -- inherited from the first subtype (so that the itype is subtype
690 -- conformant with its first subtype, which is needed when the first
691 -- subtype overrides primitive operations inherited by the implicit
694 -- In all other cases Discriminant_Constraint contains the empty
695 -- Elist (ie it is initialized with a call to New_Elmt_List).
697 -- Discriminant_Default_Value (Node20)
698 -- Present in discriminants. Points to the node representing the
699 -- expression for the default value of the discriminant. Set to
700 -- Empty if the discriminant has no default value.
702 -- Discriminant_Number (Uint15)
703 -- Present in discriminants. Gives the ranking of a discriminant in
704 -- the list of discriminants of the type, i.e. a sequential integer
705 -- index starting at 1 and ranging up to Number_Discriminants.
707 -- DTC_Entity (Node16)
708 -- Present in function and procedure entities. Set to Empty unless
709 -- the subprogram is dispatching in which case it references the
710 -- Dispatch Table pointer Component. That is to say the component _tag
711 -- for regular Ada tagged types, for CPP_Class types and their
712 -- descendants this field points to the component entity in the record
713 -- that is the Vtable pointer for the Vtable containing the entry that
714 -- references the subprogram.
716 -- DT_Entry_Count (Uint15)
717 -- Present in E_Component entities. Only used for component marked
718 -- Is_Tag. Store the number of entries in the Vtable (or Dispatch Table)
720 -- DT_Position (Uint15)
721 -- Present in function and procedure entities which are dispatching
722 -- (should not be referenced without first checking that flag
723 -- Is_Dispatching_Operation is True). Contains the offset into
724 -- the Vtable for the entry that references the subprogram.
727 -- Present in all entities. Contains a value of the enumeration type
728 -- Entity_Kind declared in a subsequent section in this spec.
730 -- Elaborate_All_Desirable (Flag146)
731 -- Present in package and subprogram entities, and in generic package
732 -- and subprogram entities. Set if internal analysis of a client that
733 -- with's this unit determines that Elaborate_All is desirable, i.e.
734 -- that there is a possibility that Program_Error may be raised if
735 -- Elaborate_All conditions cannot be met.
737 -- Elaboration_Entity (Node13)
738 -- Present in generic and non-generic package and subprogram
739 -- entities. This is a boolean entity associated with the unit that
740 -- is initiallly set to False, and is set True when the unit is
741 -- elaborated. This is used for two purposes. First, it is used to
742 -- implement required access before elaboration checks (the flag
743 -- must be true to call a subprogram at elaboration time). Second,
744 -- it is used to guard against repeated execution of the generated
747 -- Note that we always allocate this flag, and set this field, but
748 -- we do not always actually use it. It is only used if it is needed
749 -- for access-before-elaboration use (see Elaboration_Entity_Required
750 -- flag) or if either the spec or the body has elaboration code. If
751 -- neither of these two conditions holds, then the entity is still
752 -- allocated (since we don't know early enough whether or not there
753 -- is elaboration code), but is simply not used for any purpose.
755 -- Elaboration_Entity_Required (Flag174)
756 -- Present in generics and non-generic package and subprogram
757 -- entities. Set only if Elaboration_Entity is non-Empty to indicate
758 -- that the boolean is required to be set even if there is no other
759 -- elaboration code. This occurs when the Elaboration_Entity flag
760 -- is used for required access-before-elaboration checking. If the
761 -- flag is only for preventing multiple execution of the elaboration
762 -- code, then if there is no other elaboration code, obviously there
763 -- is no need to set the flag.
765 -- Enclosing_Dynamic_Scope (synthesized)
766 -- Appliesa to all entities. Returns the closest dynamic scope in which
767 -- the entity is declared or Standard_Standard for library-level entities
769 -- Enclosing_Scope (Node18)
770 -- Present in labels. Denotes the innermost enclosing construct that
771 -- contains the label. Identical to the scope of the label, except for
772 -- labels declared in the body of an accept statement, in which case the
773 -- entry_name is the Enclosing_Scope. Used to validate goto's within
774 -- accept statements.
776 -- Entry_Accepted (Flag152)
777 -- Present in E_Entry and E_Entry_Family entities. Set if there is
778 -- at least one accept for this entry in the task body. Used to
779 -- generate warnings for missing accepts.
781 -- Entry_Bodies_Array (Node15)
782 -- Present in protected types for which Has_Entries is true.
783 -- This is the defining identifier for the array of entry body
784 -- action procedures and barrier functions used by the runtime to
785 -- execute the user code associated with each entry.
787 -- Entry_Cancel_Parameter (Node23)
788 -- Present in blocks. This only applies to a block statement for
789 -- which the Is_Asynchronous_Call_Block flag is set. It
790 -- contains the defining identifier of an object that must be
791 -- passed to the Cancel_Task_Entry_Call or Cancel_Protected_Entry_Call
792 -- call in the cleanup handler added to the block by
793 -- Exp_Ch7.Expand_Cleanup_Actions. This parameter is a Boolean
794 -- object for task entry calls and a Communications_Block object
795 -- in the case of protected entry calls. In both cases the objects
796 -- are declared in outer scopes to this block.
798 -- Entry_Component (Node11)
799 -- Present in formal parameters (in, in out and out parameters). Used
800 -- only for formals of entries. References the corresponding component
801 -- of the entry parameter record for the entry.
803 -- Entry_Formal (Node16)
804 -- Present in components of the record built to correspond to entry
805 -- parameters. This field points from the component to the formal. It
806 -- is the back pointer corresponding to Entry_Component.
808 -- Entry_Index_Constant (Node18)
809 -- Present in an entry index parameter. This is an identifier that
810 -- eventually becomes the name of a constant representing the index
811 -- of the entry family member whose entry body is being executed. Used
812 -- to expand references to the entry index specification identifier.
814 -- Entry_Index_Type (synthesized)
815 -- Applies to an entry family. Denotes Etype of the subtype indication
816 -- in the entry declaration. Used to resolve the index expression in an
817 -- accept statement for a member of the family, and in the prefix of
818 -- 'COUNT when it applies to a family member.
820 -- Entry_Parameters_Type (Node15)
821 -- Present in entries. Points to the access-to-record type that is
822 -- constructed by the expander to hold a reference to the parameter
823 -- values. This reference is manipulated (as an address) by the
824 -- tasking runtime. The designated record represents a packaging
825 -- up of the entry parameters (see Exp_Ch9.Expand_N_Entry_Declaration
826 -- for further details). Entry_Parameters_Type is Empty if the entry
827 -- has no parameters.
829 -- Enumeration_Pos (Uint11)
830 -- Present in enumeration literals. Contains the position number
831 -- corresponding to the value of the enumeration literal.
833 -- Enumeration_Rep (Uint12)
834 -- Present in enumeration literals. Contains the representation that
835 -- corresponds to the value of the enumeration literal. Note that
836 -- this is normally the same as Enumeration_Pos except in the presence
837 -- of representation clauses, where Pos will still represent the
838 -- position of the literal within the type and Rep will have be the
839 -- value given in the representation clause.
841 -- Enumeration_Rep_Expr (Node22)
842 -- Present in enumeration literals. Points to the expression in an
843 -- associated enumeration rep clause that provides the representation
844 -- value for this literal. Empty if no enumeration rep clause for this
845 -- literal (or if rep clause does not have an entry for this literal,
846 -- an error situation). This is also used to catch duplicate entries
847 -- for the same literal.
849 -- Enum_Pos_To_Rep (Node23)
850 -- Present in enumeration types (but not enumeration subtypes). Set to
851 -- Empty unless the enumeration type has a non-standard representation
852 -- (i.e. at least one literal has a representation value different from
853 -- its pos value). In this case, Enum_Pos_To_Rep is the entity for an
854 -- array constructed when the type is frozen that maps Pos values to
855 -- corresponding Rep values. The index type of this array is Natural,
856 -- and the component type is a suitable integer type that holds the
857 -- full range of representation values.
859 -- Equivalent_Type (Node18)
860 -- Present in class wide types and subtypes, access to protected
861 -- subprogram types, and in exception_types. For a classwide type, it
862 -- is always Empty. For a class wide subtype, it points to an entity
863 -- created by the expander which gives Gigi an easily understandable
864 -- equivalent of the class subtype with a known size (given by an
865 -- initial value). See Exp_Util.Expand_Class_Wide_Subtype for further
866 -- details. For E_exception_type, this points to the record containing
867 -- the data necessary to represent exceptions (for further details, see
868 -- System.Standard_Library. For access_to_protected subprograms, it
869 -- denotes a record that holds pointers to the operation and to the
870 -- protected object. For remote Access_To_Subprogram types, it denotes
871 -- the record that is the fat pointer representation of an RAST.
874 -- Present in all types and subtypes, an also for components, constants,
875 -- and variables. Contains the Object_Size of the type or of the object.
876 -- A value of zero indicates that the value is not yet known.
878 -- For the case of components where a component clause is present, the
879 -- value is the value from the component clause, which must be non-
880 -- negative (but may be zero, which is acceptable for the case of
881 -- a type with only one possible value). It is also possible for Esize
882 -- of a component to be set without a component clause present, which
883 -- means that the component size is specified, but not the position.
884 -- See also RM_Size and the section on "Handling of Type'Size Values".
885 -- During gigi processing, the value is back annotated for all zero
886 -- values, so that after the call to gigi, the value is properly set.
889 -- Present in all entities. Represents the type of the entity, which
890 -- is itself another entity. For a type entity, points to the parent
891 -- type for a derived type, or if the type is not derived, points to
892 -- itself. For a subtype entity, Etype points to the base type.
894 -- Exception_Code (Uint22)
895 -- Present in exception entitites. Set to zero unless either an
896 -- Import_Exception or Export_Exception pragma applies to the
897 -- pragma and specifies a Code value. See description of these
898 -- pragmas for details. Note that this field is relevant only if
899 -- Is_VMS_Exception is set.
901 -- Extra_Formal (Node15)
902 -- Present in formal parameters in the non-generic case. Certain
903 -- parameters require extra implicit information to be passed
904 -- (e.g. the flag indicating if an unconstrained variant record
905 -- argument is constrained, and the accessibility level for
906 -- access parameters. See description of Extra_Constrained,
907 -- Extra_Accessibility fields for further details. Extra formal
908 -- parameters are constructed to represent these values, and
909 -- chained to the end of the list of formals using the
910 -- Extra_Formal field (i.e. the Extra_Formal field of the last
911 -- "real" formal points to the first extra formal, and the
912 -- Extra_Formal field of each extra formal points to the next
913 -- one, with Empty indicating the end of the list of extra
916 -- Extra_Accessibility (Node13)
917 -- Present in formal parameters in the non-generic case if
918 -- expansion is active. Normally Empty, but if a parameter is
919 -- one for which a dynamic accessibility check is required, then
920 -- an extra formal of type Natural is created (see description
921 -- of field Extra_Formal), and the Extra_Accessibility field of
922 -- the formal parameter points to the entity for this extra
923 -- formal. Also present in variables when compiling receiving
924 -- stubs. In this case, a non Empty value means that this
925 -- variable's accessibility depth has been transmitted by the
926 -- caller and must be retrieved through the entity designed by
927 -- this field instead of being computed.
929 -- Extra_Constrained (Node23)
930 -- Present in formal parameters in the non-generic case if
931 -- expansion is active. Normally Empty, but if a parameter is
932 -- one for which a dynamic indication of its constrained status
933 -- is required, then an extra formal of type Boolean is created
934 -- (see description of field Extra_Formal), and the
935 -- Extra_Constrained field of the formal parameter points to the
936 -- entity for this extra formal. Also present in variables when
937 -- compiling receiving stubs. In this case, a non empty value
938 -- means that this variable's constrained status has been
939 -- transmitted by the caller and must be retrieved through the
940 -- entity designed by this field instead of being computed.
942 -- Finalization_Chain_Entity (Node19)
943 -- Present in scopes which can have finalizable entities (blocks,
944 -- functions, procedures, tasks, entries). When this field is empty it
945 -- means that there are no finalization actions to perform on exit of the
946 -- scope. When this field contains 'Error', it means that no
947 -- finalization actions should happen at this level and the
948 -- finalization chain of a parent scope shall be used (??? this is
949 -- an improper use of 'Error' and should be changed). otherwise it
950 -- contains an entity of type Finalizable_Ptr that is the head of the
951 -- list of objects to finalize on exit. See "Finalization Management"
952 -- section in exp_ch7.adb for more details.
954 -- Finalize_Storage_Only (Flag158) [base type only]
955 -- Present in all types. Set on direct controlled types to which a
956 -- valid Finalize_Storage_Only pragma applies. This flag is also set on
957 -- composite types when they have at least one controlled component and
958 -- all their controlled components are Finalize_Storage_Only. It is also
959 -- inherited by type derivation except for direct controlled types where
960 -- the Finalize_Storage_Only pragma is required at each level of
963 -- First_Component (synthesized)
964 -- Applies to record types. Returns the first component by following
965 -- the chain of declared entities for the record until a component
966 -- is found (one with an Ekind of E_Component). The discriminants are
967 -- skipped. If the record is null, then Empty is returned.
969 -- First_Discriminant (synthesized)
970 -- Applies to types with discriminants. The discriminants are the
971 -- first entities declared in the type, so normally this is equivalent
972 -- to First_Entity. The exception arises for tagged types, where the
973 -- tag itself is prepended to the front of the entity chain, so the
974 -- First_Discriminant function steps past the tag if it is present.
976 -- First_Girder_Discriminant (synthesized)
977 -- Applies to types with discriminants. For tagged types, and untagged
978 -- types which are root types or derived types but which do not rename
979 -- discriminants in their root type, this is the same as
980 -- First_Discriminant.
982 -- For derived non-tagged types that rename discriminants in the root
983 -- type this is the first of the discriminants that occurr in the
984 -- root type. To be precise, in this case girder discriminants are
985 -- entities attached to the entity chain of the derived type which
986 -- are a copy of the discriminants of the root type. Furthermore their
987 -- Is_Completely_Hidden flag is set.
989 -- For derived untagged types, girder discriminants are the real
990 -- discriminants from Gigi's standpoint, ie those that will be stored in
991 -- actual objects of the type.
993 -- First_Entity (Node17)
994 -- Present in all entities which act as scopes to which a list of
995 -- associated entities is attached (blocks, class subtypes and types,
996 -- entries, functions, loops, packages, procedures, protected objects,
997 -- record types and subtypes, private types, task types and subtypes).
998 -- Points to a list of associated entities using the Next_Entity field
999 -- as a chain pointer with Empty marking the end of the list.
1001 -- First_Formal (synthesized)
1002 -- Applies to subprograms and subprogram types, and also in entries
1003 -- and entry families. Returns first formal of the subprogram or entry.
1004 -- The formals are the first entities declared in a subprogram or in
1005 -- a subprogram type (the designated type of an Access_To_Subprogram
1006 -- definition) or in an entry.
1008 -- First_Index (Node17)
1009 -- Present in array types and subtypes and in string types and subtypes.
1010 -- By introducing implicit subtypes for the index constraints, we have
1011 -- the same structure for constrained and unconstrained arrays, subtype
1012 -- marks and discrete ranges are both represented by a subtype. This
1013 -- function returns the tree node corresponding to an occurrence of the
1014 -- first index (NOT the entity for the type). Subsequent indexes are
1015 -- obtained using Next_Index. Note that this field is present for the
1016 -- case of string literal subtypes, but is always Empty.
1018 -- First_Literal (Node17)
1019 -- Present in all enumeration types, including character and boolean
1020 -- types. This field points to the first enumeration literal entity
1021 -- for the type (i.e. it is set to First (Literals (N)) where N is
1022 -- the enumeration type definition node. A special case occurs with
1023 -- standard character and wide character types, where this field is
1024 -- Empty, since there are no enumeration literal lists in these cases.
1026 -- First_Optional_Parameter (Node14)
1027 -- Present in (non-generic) function and procedure entities. Set to a
1028 -- non-null value only if a pragma Import_Function, Import_Procedure
1029 -- or Import_Valued_Procedure specifies a First_Optional_Parameter
1030 -- argument, in which case this field points to the parameter entity
1031 -- corresponding to the specified parameter.
1033 -- First_Private_Entity (Node16)
1034 -- Present in all entities containing private parts (packages,
1035 -- protected types and subtypes, task types and subtypes). The
1036 -- entities on the entity chain are in order of declaration, so the
1037 -- entries for private entities are at the end of the chain. This
1038 -- field points to the first entity for the private part. It is
1039 -- Empty if there are no entities declared in the private part or
1040 -- if there is no private part.
1042 -- First_Rep_Item (Node6)
1043 -- Present in all entities. If non-empty, points to a linked list of
1044 -- representation pragmas nodes and representation clause nodes that
1045 -- apply to the entity, linked using Next_Rep_Item, with Empty marking
1046 -- the end of the list. In the case of derived types and subtypes, the
1047 -- new entity inherits the chain at the point of declaration. This
1048 -- means that it is possible to have multiple instances of the same
1049 -- kind of rep item on the chain, in which case it is the first one
1050 -- that applies to the entity.
1052 -- For most representation items, the representation information is
1053 -- reflected in other fields and flags in the entity. For example if
1054 -- a record representation clause is present, the component entities
1055 -- reflect the specified information. However, there are some items
1056 -- that are only reflected in the chain. These include:
1058 -- Alignment attribute definition clause
1059 -- Machine_Attribute pragma
1060 -- Link_Alias pragma
1061 -- Link-Section pragma
1062 -- Weak_External pragma
1064 -- If any of these items are present, then the flag Has_Gigi_Rep_Item
1065 -- is set, indicating that Gigi should search the chain.
1067 -- Other representation items are included in the chain so that error
1068 -- messages can easily locate the relevant nodes for posting errors.
1069 -- Note in particular that size clauses are present only for this
1070 -- purpose, and should only be accessed if Has_Size_Clause is set.
1072 -- First_Subtype (synthesized)
1073 -- Applies to all types and subtypes. For types, yields the first
1074 -- subtype of the type. For subtypes, yields the first subtype of
1075 -- the base type of the subtype.
1077 -- Freeze_Node (Node7)
1078 -- Present in all entities. If there is an associated freeze node for
1079 -- the entity, this field references this freeze node. If no freeze
1080 -- node is associated with the entity, then this field is Empty. See
1081 -- package Freeze for further details.
1083 -- From_With_Type (Flag159)
1084 -- Present in package and type entities. Indicates that the entity
1085 -- appears in a With_Type clause in the context of some other unit,
1086 -- either as the prefix (which must be a package), or as a type name.
1087 -- The package can only be used to retrieve such a type, and the type
1088 -- can be used only in component declarations and access definitions.
1089 -- The With_Type clause is used to construct mutually recursive
1090 -- types, i.e. record types (Java classes) that hold pointers to each
1091 -- other. If such a type is an access type, it has no explicit freeze
1092 -- node, so that the back-end does not attempt to elaborate it.
1094 -- Full_View (Node11)
1095 -- Present in all type and subtype entities and in deferred constants.
1096 -- References the entity for the corresponding full type declaration.
1097 -- For all types other than private and incomplete types, this field
1098 -- always contains Empty. See also Underlying_Type.
1100 -- Function_Returns_With_DSP (Flag169)
1101 -- Present in all subprogram entities, and type entities for access
1102 -- to subprogram values. Set True if the function (or referenced
1103 -- function in the case of an access value) returns with using the
1104 -- DSP (depressed stack pointer) approach. This can only be set
1105 -- True if Targparm.Functions_Return_By_DSP_On_Target is True and
1106 -- the function returns a value of a type whose size is not known
1109 -- Generic_Renamings (Elist23)
1110 -- Present in package and subprogram instances. Holds mapping that
1111 -- associates generic parameters with the corresponding instances, in
1112 -- those cases where the instance is an entity.
1114 -- Girder_Constraint (Elist23)
1115 -- Present in entities that can have discriminants (concurrent types
1116 -- subtypes, record types and subtypes, private types and subtypes,
1117 -- limited private types and subtypes and incomplete types). Points
1118 -- to an element list containing the expressions for each of the
1119 -- girder discriminants for the record (sub)type.
1121 -- Handler_Records (List10)
1122 -- Present in subprogram and package entities. Points to a list of
1123 -- identifiers referencing the handler record entities for the
1124 -- corresponding unit.
1126 -- Has_Aliased_Components (Flag135) [implementation base type only]
1127 -- Present in array type entities. Indicates that the component type
1128 -- of the array is aliased.
1130 -- Has_Alignment_Clause (Flag46)
1131 -- Present in all type entities and objects. Indicates if an alignment
1132 -- clause has been given for the entity. If set, then Alignment_Clause
1133 -- returns the N_Attribute_Definition node for the alignment attribute
1134 -- definition clause. Note that it is possible for this flag to be False
1135 -- even when Alignment_Clause returns non_Empty (this happens in the case
1136 -- of derived type declarations).
1138 -- Has_All_Calls_Remote (Flag79)
1139 -- Present in all library unit entities. Set true if the library unit
1140 -- has an All_Calls_Remote pragma. Note that such entities must also
1141 -- be RCI entities, so the flag Is_Remote_Call_Interface will always
1142 -- be set if this flag is set.
1144 -- Has_Atomic_Components (Flag86) [implementation base type only]
1145 -- Present in all types and objects. Set only for an array type or
1146 -- an array object if a valid pragma Atomic_Components applies to the
1147 -- type or object. Note that in the case of an object, this flag is
1148 -- only set on the object if there was an explicit pragma for the
1149 -- object. In other words, the proper test for whether an object has
1150 -- atomic components is to see if either the object or its base type
1151 -- has this flag set. Note that in the case of a type, the pragma will
1152 -- be chained to the rep item chain of the first subtype in the usual
1155 -- Has_Attach_Handler (synthesized)
1156 -- Applies to record types that are constructed by the expander to
1157 -- represent protected types. Returns True if there is at least one
1158 -- Attach_Handler pragma in the corresponding specification.
1160 -- Has_Biased_Representation (Flag139)
1161 -- Present in discrete types (where it applies to the type'size value),
1162 -- and to objects (both stand-alone and components), where it applies to
1163 -- the size of the object from a size or record component clause. In
1164 -- all cases it indicates that the size in question is smaller than
1165 -- would normally be required, but that the size requirement can be
1166 -- satisfied by using a biased representation, in which stored values
1167 -- have the low bound (Expr_Value (Type_Low_Bound (T)) subtracted to
1168 -- reduce the required size. For example, a type with a range of 1..2
1169 -- takes one bit, using 0 to represent 1 and 1 to represent 2.
1171 -- Note that in the object and component cases, the flag is only set
1172 -- if the type is unbiased, but the object specifies a smaller size
1173 -- than the size of the type, forcing biased representation for the
1174 -- object, but the subtype is still an unbiased type.
1176 -- Has_Completion (Flag26)
1177 -- Present in all entities that require a completion (functions,
1178 -- procedures, private types, limited private types, incomplete types,
1179 -- and packages that require a body). Set if the completion has been
1180 -- encountered and analyzed.
1182 -- Has_Completion_In_Body (Flag71)
1183 -- Present in "Taft amendment types" that is to say incomplete types
1184 -- whose full declaration appears in the package body.
1186 -- Has_Complex_Representation (Flag140) [implementation base type only]
1187 -- Present in all type entities. Set only for a record base type to
1188 -- which a valid pragma Complex_Representation applies.
1190 -- Has_Component_Size_Clause (Flag68) [implementation base type only]
1191 -- Present in all type entities. Set if a component size clause is
1192 -- present for the given type. Note that this flag can be False even
1193 -- if Component_Size is non-zero (happens in the case of derived types).
1195 -- Has_Controlling_Result (Flag98)
1196 -- Present in E_Function entities. True if The function is a primitive
1197 -- function of a tagged type which can dispatch on result
1199 -- Has_Controlled_Component (Flag43) [base type only]
1200 -- Present in composite type entities. Indicates that the type has a
1201 -- component that either is a controlled type, or itself contains a
1202 -- controlled component (i.e. either Has_Controlled_Component or
1203 -- Is_Controlled is set for at least one component).
1205 -- Has_Convention_Pragma (Flag119)
1206 -- Present in an entity for which a Convention, Import, or Export
1207 -- pragma has been given. Used to prevent more than one such pragma
1208 -- appearing for a given entity (RM B.1(45)).
1210 -- Has_Delayed_Freeze (Flag18)
1211 -- Present in all entities. Set to indicate that an explicit freeze
1212 -- node must be generated for the entity at its freezing point. See
1213 -- separate section ("Delayed Freezing and Elaboration") for details.
1215 -- Has_Discriminants (Flag5)
1216 -- Present in all types and subtypes. For types that are allowed to have
1217 -- discriminants (record types and subtypes, task types and subtypes,
1218 -- protected types and subtypes, private types, limited private types,
1219 -- and incomplete types), indicates if the corresponding type or subtype
1220 -- has a known discriminant part. Always false for all other types.
1222 -- Has_Entries (synthesized)
1223 -- Applies to concurrent types. True if any entries are declared
1224 -- within the task or protected definition for the type.
1226 -- Has_Enumeration_Rep_Clause (Flag66)
1227 -- Present in enumeration types. Set if an enumeration representation
1228 -- clause has been given for this enumeration type. Used to prevent more
1229 -- than one enumeration representation clause for a given type. Note
1230 -- that this does not imply a representation with holes, since the rep
1231 -- clause may merely confirm the default 0..N representation.
1233 -- Has_External_Tag_Rep_Clause (Flag110)
1234 -- Present in tagged types. Set if an external_tag rep. clause has been
1235 -- given for this type. Use to avoid the generation of the default
1238 -- Has_Exit (Flag47)
1239 -- Present in loop entities. Set if the loop contains an exit statement.
1241 -- Has_Foreign_Convention (synthesized)
1242 -- Applies to all entities. Determines if the Convention for the
1243 -- entity is a foreign convention (i.e. is other than Convention_Ada,
1244 -- Convention_Intrinsic, Convention_Entry or Convention_Protected).
1246 -- Has_Forward_Instantiation (Flag175)
1247 -- Present in package entities. Set true for packages that contain
1248 -- instantiations of local generic entities, before the corresponding
1249 -- generic body has been seen. If a package has a forward instantiation,
1250 -- we cannot inline subprograms appearing in the same package because
1251 -- the placement requirements of the instance will conflict with the
1252 -- linear elaboration of front-end inlining.
1254 -- Has_Fully_Qualified_Name (Flag173)
1255 -- Present in all entities. Set True if the name in the Chars field
1256 -- has been replaced by the fully qualified name, as used for debug
1257 -- output. See Exp_Dbug for a full description of the use of this
1258 -- flag and also the related flag Has_Qualified_Name.
1260 -- Has_Gigi_Rep_Item (Flag82)
1261 -- This flag is set if the rep item chain (referenced by First_Rep_Item
1262 -- and linked through the Next_Rep_Item chain contains a representation
1263 -- item that needs to be specially processed by Gigi, i.e. one of the
1266 -- Machine_Attribute pragma
1267 -- Linker_Alias pragma
1268 -- Linker_Section pragma
1269 -- Weak_External pragma
1271 -- If this flag is set, then Gigi should scan the rep item chain to
1272 -- process any of these items that appear. At least one such item will
1275 -- Has_Homonym (Flag56)
1276 -- Present in all entities. Set if an entity has a homonym in the same
1277 -- scope. Used by Gigi to generate unique names for such entities.
1279 -- Has_Interrupt_Handler (synthesized)
1280 -- Applies to all protected types entities. Set if the protected type
1281 -- definition contains at least one procedure to which a pragma
1282 -- Interrupt_Handler applies.
1284 -- Has_Machine_Radix_Clause (Flag83)
1285 -- Present in decimal types and subtypes, set if a Machine_Radix
1286 -- representation clause is present. This flag is used to detect
1287 -- the error of multiple machine radix clauses for a single type.
1289 -- Has_Master_Entity (Flag21)
1290 -- Present in entities that can appear in the scope stack (see spec
1291 -- of Sem). It is set if a task master entity (_master) has been
1292 -- declared and initialized in the corresponding scope.
1294 -- Has_Missing_Return (Flag142)
1295 -- Present in functions and generic functions. Set if there is one or
1296 -- more missing return statements in the function. This is used to
1297 -- control wrapping of the body in Exp_Ch6 to ensure that the program
1298 -- error exeption is correctly raised in this case at runtime.
1300 -- Has_Nested_Block_With_Handler (Flag101)
1301 -- Present in scope entities. Set if there is a nested block within the
1302 -- scope that has an exception handler and the two scopes are in the
1303 -- same procedure. This is used by the backend for controlling certain
1304 -- optimizations to ensure that they are consistent with exceptions.
1305 -- See documentation in Gigi for further details.
1307 -- Has_Non_Standard_Rep (Flag75) [implementation base type only]
1308 -- Present in all type entities. Set when some representation clause
1309 -- or pragma causes the representation of the item to be significantly
1310 -- modified. In this category are changes of small or radix for a
1311 -- fixed-point type, change of component size for an array, and record
1312 -- or enumeration representation clauses, as well as packed pragmas.
1313 -- All other representation clauses (e.g. Size and Alignment clauses)
1314 -- are not considered to be significant since they do not affect
1315 -- stored bit patterns.
1317 -- Has_Object_Size_Clause (Flag172)
1318 -- Present in entities for types and subtypes. Set if an Object_Size
1319 -- clause has been processed for the type Used to prevent multiple
1320 -- Object_Size clauses for a given entity.
1322 -- Has_Per_Object_Constraint (Flag154)
1323 -- Present in E_Component entities, true if the subtype of the
1324 -- component has a per object constraint, i.e. an actual discriminant
1325 -- value of the form T'Access, where T is the enclosing type.
1327 -- Has_Pragma_Controlled (Flag27) [implementation base type only]
1328 -- Present in access type entities. It is set if a pragma Controlled
1329 -- applies to the access type.
1331 -- Has_Pragma_Elaborate_Body (Flag150)
1332 -- Present in all entities. Set in compilation unit entities if a
1333 -- pragma Elaborate_Body applies to the compilation unit.
1335 -- Has_Pragma_Inline (Flag157)
1336 -- Present in all entities. Set for functions and procedures for which
1337 -- a pragma Inline or Inline_Always applies to the subprogram. Note
1338 -- subprogram. Note that this flag can be set even if Is_Inlined is
1339 -- not set. This happens for pragma Inline (if Inline_Active is False)
1340 -- In other words, the flag Has_Pragma_Inline represents the formal
1341 -- semantic status, and is used for checking semantic correctness.
1342 -- The flag Is_Inlined indicates whether inlining is actually active
1345 -- Has_Pragma_Pack (Flag121) [implementation base type only]
1346 -- Present in all entities. It indicates that a valid pragma Pack was
1347 -- was given for the type. Note that this flag is not inherited by a
1348 -- derived type. See also the Is_Packed flag.
1350 -- Has_Primitive_Operations (Flag120) [base type only]
1351 -- Present in all type entities. Set if at least one primitive operation
1352 -- is defined on the type. This flag is not yet properly set ???
1354 -- Has_Private_Ancestor (synthesized)
1355 -- Applies to all type and subtype entities. Returns True if at least
1356 -- one ancestor is private, and otherwise False if there are no private
1359 -- Has_Private_Declaration (Flag155)
1360 -- Present in all entities. Returns True if it is the defining entity
1361 -- of a private type declaration or its corresponding full declaration.
1362 -- This flag is thus preserved when the full and the partial views are
1363 -- exchanged, to indicate if a full type declaration is a completion.
1364 -- Used for semantic checks in E.4 (18), and elsewhere.
1366 -- Has_Qualified_Name (Flag161)
1367 -- Present in all entities. Set True if the name in the Chars field
1368 -- has been replaced by its qualified name, as used for debug output.
1369 -- See Exp_Dbug for a full description of qualification requirements.
1370 -- For some entities, the name is the fully qualified name, but there
1371 -- are exceptions. In particular, for local variables in procedures,
1372 -- we do not include the procedure itself or higher scopes. See also
1373 -- the flag Has_Fully_Qualified_Name, which is set if the name does
1374 -- indeed include the fully qualified name.
1376 -- Has_Record_Rep_Clause (Flag65)
1377 -- Present in record types. Set if a record representation clause has
1378 -- been given for this record type. Used to prevent more than one such
1379 -- clause for a given record type. Note that this is initially cleared
1380 -- for a derived type, even though the representation is inherited. See
1381 -- also the flag Has_Specified_Layout.
1383 -- Has_Recursive_Call (Flag143)
1384 -- Present in procedures. Set if a direct parameterless recursive call
1385 -- is detected while analyzing the body. Used to activate some error
1386 -- checks for infinite recursion.
1388 -- Has_Size_Clause (Flag29)
1389 -- Present in entities for types and objects. Set if a size clause is
1390 -- present for the entity. Used to prevent multiple Size clauses for a
1391 -- given entity. Note that it is always initially cleared for a derived
1392 -- type, even though the Size for such a type is inherited from a Size
1393 -- clause given for the parent type.
1395 -- Has_Small_Clause (Flag67)
1396 -- Present in ordinary fixed point types (but not subtypes). Indicates
1397 -- that a small clause has been given for the entity. Used to prevent
1398 -- multiple Small clauses for a given entity. Note that it is always
1399 -- initially cleared for a derived type, even though the Small for such
1400 -- a type is inherited from a Small clause given for the parent type.
1402 -- Has_Specified_Layout (Flag100)
1403 -- Present in all type entities. Set for a record type or subtype if
1404 -- the record layout has been specified by a record representation
1405 -- clause. Note that this differs from the flag Has_Record_Rep_Clause
1406 -- in that it is inherited by a derived type. Has_Record_Rep_Clause is
1407 -- used to indicate that the type is mentioned explicitly in a record
1408 -- representation clause, and thus is not inherited by a derived type.
1409 -- This flag is always False for non-record types.
1411 -- Has_Storage_Size_Clause (Flag23) [implementation base type only]
1412 -- Present in task types and access types. It is set if a Storage_Size
1413 -- clause is present for the type. Used to prevent multiple clauses for
1414 -- one type. Note that this flag is initially cleared for a derived type
1415 -- even though the Storage_Size for such a type is inherited from a
1416 -- Storage_Size clause given for the parent type. Note that in the case
1417 -- of access types, this flag is present only in the root type, since a
1418 -- storage size clause cannot be given to a derived type.
1420 -- Has_Subprogram_Descriptor (Flag93)
1421 -- This flag is set on entities for which zero-cost exception subprogram
1422 -- descriptors can be generated (subprograms and library level package
1423 -- declarations and bodies). It indicates that a subprogram descriptor
1424 -- has been generated, and is used to suppress generation of multiple
1425 -- descriptors (e.g. when instantiating generic bodies).
1427 -- Has_Task (Flag30) [base type only]
1428 -- Present in all type entities. Set on task types themselves, and also
1429 -- (recursively) on any composite type which has a component for which
1430 -- Has_Task is set. The meaning is that an allocator of such an object
1431 -- must create the required tasks. Note that the flag is not set on
1432 -- access types, even if they designate an object that Has_Task.
1434 -- Has_Unchecked_Union (Flag123) [base type only]
1435 -- Present in all type entities. Set on unchecked unions themselves
1436 -- and (recursively) on any composite type which has a component for
1437 -- which Has_Unchecked_Union is set. The meaning is that a comparison
1438 -- operation for the type is not permitted. Note that the flag is not
1439 -- set on access types, even if they designate an object that has
1440 -- the flag Has_Unchecked_Union set.
1442 -- Has_Unknown_Discriminants (Flag72)
1443 -- Present in all type entities. Types can have unknown discriminants
1444 -- either from their declaration or through type derivation. The use
1445 -- of this flag exactly meets the spec in RM 3.7(26). Note that all
1446 -- class-wide types are considered to have unknown discriminants.
1448 -- Has_Volatile_Components (Flag87) [implementation base type only]
1449 -- Present in all types and objects. Set only for an array type or
1450 -- array object if a valid pragma Volatile_Components or a valid
1451 -- pragma Atomic_Components applies to the type or object. Note that
1452 -- in the case of an object, this flag is only set on the object if
1453 -- there was an explicit pragma for the object. In other words, the
1454 -- proper test for whether an object has volatile components is to
1455 -- see if either the object or its base type has this flag set. Note
1456 -- that in the case of a type the pragma will be chained to the rep
1457 -- item chain of the first subtype in the usual manner.
1459 -- Hiding_Loop_Variable (Node8)
1460 -- Present in variables. Set only if a variable of a discrete type is
1461 -- hidden by a loop variable in the same local scope, in which case
1462 -- the Hiding_Loop_Variable field of the hidden variable points to
1463 -- the E_Loop_Variable entity doing the hiding. Used in processing
1464 -- warning messages if the hidden variable turns out to be unused
1465 -- or is referenced without being set.
1468 -- Present in all entities. Link for list of entities that have the
1469 -- same source name and that are declared in the same or enclosing
1470 -- scopes. Homonyms in the same scope are overloaded. Used for name
1471 -- resolution and for the generation of debugging information.
1473 -- Implementation_Base_Type (synthesized)
1474 -- Applies to all types. Similar to Base_Type, but never returns a
1475 -- private type when applied to a non-private type. Instead in this
1476 -- case, it always returns the Representation_Type of the base type
1477 -- in this case, so that we still have a concrete type. Note: it is
1478 -- allowed to apply Implementation_Base_Type to other than a type,
1479 -- in which case it simply returns the entity unchanged.
1481 -- In_Package_Body (Flag48)
1482 -- Set on the entity that denotes the package (the defining occurrence
1483 -- of the package declaration) while analyzing and expanding the package
1484 -- body. Reset on completion of analysis/expansion.
1486 -- In_Private_Part (Flag45)
1487 -- Present in package entities. Flag is set to indicate that the
1488 -- private part is being analyzed. The flag is reset at the end of the
1489 -- package declaration.
1491 -- Inner_Instances (Elist23)
1492 -- Present in generic units. Contains element list of units that are
1493 -- instantiated within the given generic. Used to diagnose circular
1496 -- Interface_Name (Node21)
1497 -- Present in exceptions, functions, procedures, variables, constants,
1498 -- and packages. Set to Empty unless an export, import, or interface
1499 -- name pragma has explicitly specified an external name, in which
1500 -- case it references an N_String_Literal node for the specified
1501 -- exteral name. In the case of exceptions, the field is set by
1502 -- Import_Exception/Export_Exception (which can be used in OpenVMS
1503 -- versions only). Note that if this field is Empty, and Is_Imported
1504 -- or Is_Exported is set, then the default interface name is the name
1505 -- of the entity, cased in a manner that is appropriate to the system
1506 -- in use. Note that Interface_Name is ignored if an address clause
1507 -- is present (since it is meaningless in this case).
1509 -- An additional special case usage of this field is in JGNAT for
1510 -- E_Component and E_Discriminant. JGNAT allows these entities to
1511 -- be imported by specifying pragma Import within a component's
1512 -- containing record definition. This supports interfacing to
1513 -- object fields defined within Java classes, and such pragmas
1514 -- are generated by the jvm2ada binding generator tool whenever
1515 -- it processes classes with public object fields. A pragma Import
1516 -- for a component can define the External_Name of the imported
1517 -- Java field (which is generally needed, because Java names are
1521 -- Present in packages and types. Set when analyzing a use clause for
1522 -- the corresponding entity. Reset at end of corresponding declarative
1523 -- part. The flag on a type is also used to determine the visibility of
1524 -- the primitive operators of the type.
1526 -- Is_Abstract (Flag19)
1527 -- Present in all types, and also for functions and procedures. Set
1528 -- for abstract types and abstract subprograms.
1530 -- Is_Access_Constant (Flag69)
1531 -- Present in access types and subtypes. Indicates that the keyword
1532 -- constant was present in the access type definition.
1534 -- Is_Access_Type (synthesized)
1535 -- Applies to all entities, true for access types and subtypes
1537 -- Is_Aliased (Flag15)
1538 -- Present in objects whose declarations carry the keyword aliased,
1539 -- and on record components that have the keyword.
1541 -- Is_Always_Inlined (synthesized)
1542 -- Present in subprograms. True if there is a pragma Inline_Always for
1545 -- Is_AST_Entry (Flag132)
1546 -- Present in entry entities. Set if a valid pragma AST_Entry applies
1547 -- to the entry. This flag can only be set in OpenVMS versions of GNAT.
1548 -- Note: we also allow the flag to appear in entry families, but given
1549 -- the current implementation of the pragma AST_Entry, this flag will
1550 -- always be False in entry families.
1552 -- Is_Atomic (Flag85)
1553 -- Present in all type entities, and also in constants, components and
1554 -- variables. Set if a pragma Atomic or Shared applies to the entity.
1555 -- In the case of private and incomplete types, this flag is set in
1556 -- both the partial view and the full view.
1558 -- Is_Array_Type (synthesized)
1559 -- Applies to all entities, true for array types and subtypes
1561 -- Is_Asynchronous (Flag81)
1562 -- Present in all type entities and in procedure entities. Set
1563 -- if a pragma Asynchronous applies to the entity.
1565 -- Is_Bit_Packed_Array (Flag122)
1566 -- Present in all entities. This flag is set for a packed array
1567 -- type that is bit packed (i.e. the component size is known by the
1568 -- front end and is in the range 1-7, 9-15, or 17-31). Is_Packed is
1569 -- always set if Is_Bit_Packed_Array is set, but it is possible for
1570 -- Is_Packed to be set without Is_Bit_Packed_Array or the case of an
1571 -- array having one or more index types that are enumeration types
1572 -- with non-standard enumeration representations.
1574 -- Is_Boolean_Type (synthesized)
1575 -- Applies to all entities, true for boolean types and subtypes,
1576 -- i.e. Standard.Boolean and all types ultimately derived from it.
1578 -- Is_By_Copy_Type (synthesized)
1579 -- Applies to all type entities. Returns true if the entity is
1580 -- a by copy type (RM 6.2(3)).
1582 -- Is_By_Reference_Type (synthesized)
1583 -- Applies to all type entities. True if the type is required to
1584 -- be passed by reference, as defined in (RM 6.2(4-9)).
1586 -- Is_Called (Flag102)
1587 -- Present in subprograms. Returns true if the subprogram is called
1588 -- in the unit being compiled or in a unit in the context. Used for
1591 -- Is_Character_Type (Flag63)
1592 -- Present in all entities, true for character types and subtypes,
1593 -- i.e. enumeration types that have at least one character literal.
1595 -- Is_Child_Unit (Flag73)
1596 -- Present in all entities. Set only for defining entities of program
1597 -- units that are child units (but False for subunits).
1599 -- Is_Class_Wide_Type (synthesized)
1600 -- Applies to all entities, true for class wide types and subtypes
1602 -- Is_Compilation_Unit (Flag149)
1603 -- Present in all entities. Set if the entity is a package or subprogram
1604 -- entity for a compilation unit other than a subunit (since we treat
1605 -- subunits as part of the same compilation operation as the ultimate
1606 -- parent, we do not consider them to be separate units for this flag).
1608 -- Is_Completely_Hidden (Flag103)
1609 -- A flag set on an E_Discriminant entity. This flag can be set only
1610 -- for girder discriminants of untagged types. When set, the entity
1611 -- is a girder discriminant of a derived untagged type which is not
1612 -- directly visible in the derived type because the derived type or
1613 -- one of its ancestors have renamed the discriminants in the root
1614 -- type. Note that there are girder discriminants which are not
1615 -- Completely_Hidden (eg the discriminants of a root type).
1617 -- Is_Composite_Type (synthesized)
1618 -- Applies to all entities, true for all composite types and
1619 -- subtypes. Either Is_Composite_Type or Is_Elementary_Type (but
1620 -- not both) is true of any type.
1622 -- Is_Concurrent_Record_Type (Flag20)
1623 -- Present in record types and subtypes. Set if the type was created
1624 -- by the expander to represent a task or protected type. For every
1625 -- concurrent type, such as record type is constructed, and task and
1626 -- protected objects are instances of this record type at runtime
1627 -- (Gigi will replace declarations of the concurrent type using the
1628 -- declarations of the corresponding record type). See package Exp_Ch9
1629 -- for further details.
1631 -- Is_Concurrent_Type (synthesized)
1632 -- Applies to all entities, true for task types and subtypes and
1633 -- for protected types and subtypes.
1635 -- Is_Constrained (Flag12)
1636 -- Present in types or subtypes which may have index, discriminant
1637 -- or range constraint (i.e. array types and subtypes, record types
1638 -- and subtypes, string types and subtypes, and all numeric types).
1639 -- Set if the type or subtype is constrained.
1641 -- Is_Constr_Subt_For_U_Nominal (Flag80)
1642 -- Present in all types and subtypes. Set true only for the constructed
1643 -- subtype of an object whose nominal subtype is unconstrained. Note
1644 -- that the constructed subtype itself will be constrained.
1646 -- Is_Constr_Subt_For_UN_Aliased (Flag141)
1647 -- This flag can only be set if Is_Constr_Subt_For_U_Nominal is set. It
1648 -- indicates that in addition the object concerned is aliased. This flag
1649 -- is used by Gigi to determine whether a template must be constructed.
1651 -- Is_Constructor (Flag76)
1652 -- Present in function and procedure entities. Set if a pragma
1653 -- CPP_Constructor applies to the subprogram.
1655 -- Is_Controlled (Flag42) [base type only]
1656 -- Present in all type entities. Indicates that the type is controlled,
1657 -- i.e. is either a descendant of Ada.Finalization.Controlled or of
1658 -- Ada.Finalization.Limited_Controlled.
1660 -- Is_Controlling_Formal (Flag97)
1661 -- Present in all Formal_Kind entity. Marks the controlling parameters
1662 -- of dispatching operations.
1664 -- Is_CPP_Class (Flag74)
1665 -- Present in all type entities, set only for tagged and untagged
1666 -- record types to which the pragma CPP_Class has been applied.
1668 -- Is_Decimal_Fixed_Point_Type (synthesized)
1669 -- Applies to all type entities, true for decimal fixed point
1670 -- types and subtypes.
1672 -- Is_Derived_Type (synthesized)
1673 -- Applies to all type entities. Determine if given entity is a
1676 -- Is_Destructor (Flag77)
1677 -- Present in function and procedure entities. Set if a pragma
1678 -- CPP_Destructor applies to the subprogram.
1680 -- Is_Discrete_Type (synthesized)
1681 -- Applies to all entities, true for all discrete types and subtypes
1683 -- Is_Discrete__Or_Fixed_Point_Type (synthesized)
1684 -- Applies to all entities, true for all discrete types and subtypes
1685 -- and all fixed-point types and subtypes.
1687 -- Is_Discrim_SO_Function (Flag176)
1688 -- Present in all entities, set only in E_Function entities that Layout
1689 -- creates to compute discriminant-dependent dynamic size/offset values.
1691 -- Is_Dispatching_Operation (Flag6)
1692 -- Present in all entities. Set true for procedures, functions,
1693 -- generic procedures and generic functions if the corresponding
1694 -- operation is dispatching.
1696 -- Is_Dynamic_Scope (synthesized)
1697 -- Applies to all Entities. Returns True if the entity is a dynamic
1698 -- scope (i.e. a block, a subprogram a task_type or an entry).
1700 -- Is_Elementary_Type (synthesized)
1701 -- Applies to all entities, true for all elementary types and
1702 -- subtypes. Either Is_Composite_Type or Is_Elementary_Type (but
1703 -- not both) is true of any type.
1705 -- Is_Eliminated (Flag124)
1706 -- Present in type entities, subprogram entities, and object entities.
1707 -- Indicates that the corresponding entity has been eliminated by use
1708 -- of pragma Eliminate.
1710 -- Is_Enumeration_Type (synthesized)
1711 -- Present in all entities, true for enumeration types and subtypes
1713 -- Is_Entry (synthesized)
1714 -- Applies to all entities, True only for entry and entry family
1715 -- entities and False for all other entity kinds.
1717 -- Is_Entry_Formal (Flag52)
1718 -- Present in all entities. Set only for entry formals (which can
1719 -- only be in, in-out or out parameters). This flag is used to speed
1720 -- up the test for the need to replace references in Exp_Ch2.
1722 -- Is_Exported (Flag99)
1723 -- Present in all entities. Set if the entity is exported. For now we
1724 -- only allow the export of constants, exceptions, functions, procedures
1725 -- and variables, but that may well change later on. Exceptions can only
1726 -- be exported in the OpenVMS and Java VM implementations of GNAT.
1728 -- Is_First_Subtype (Flag70)
1729 -- Present in all entities. True for first subtypes (RM 3.2.1(6)),
1730 -- i.e. the entity in the type declaration that introduced the type.
1731 -- This may be the base type itself (e.g. for record declarations and
1732 -- enumeration type declarations), or it may be the first subtype of
1733 -- an anonymous base type (e.g. for integer type declarations or
1734 -- constrained array declarations).
1736 -- Is_Fixed_Point_Type (synthesized)
1737 -- Applies to all entities, true for decimal and ordinary fixed
1738 -- point types and subtypes
1740 -- Is_Floating_Point_Type (synthesized)
1741 -- Applies to all entities, true for float types and subtypes
1743 -- Is_Formal (synthesized)
1744 -- Applies to all entities, true for IN, IN OUT and OUT parameters
1746 -- Is_Formal_Subprogram (Flag111)
1747 -- Defined on all entities, true for generic formal subprograms.
1749 -- Is_For_Access_Subtype (Flag118)
1750 -- Present in E_Private_Subtype and E_Record_Subtype entities.
1751 -- Means the sole purpose of the type is to be designated by an
1752 -- Access_Subtype and hence should not be expanded into components
1753 -- because the type may not have been found or frozen yet.
1755 -- Is_Frozen (Flag4)
1756 -- Present in all type entities. Set if the type has been frozen.
1758 -- Is_Generic_Actual_Type (Flag94)
1759 -- Present in the subtype declaration that renames the generic formal
1760 -- as a subtype of the actual. Guarantees that the subtype is not static
1761 -- within the instance.
1763 -- Is_Generic_Instance (Flag130)
1764 -- Present in all entities. Set to indicate that the entity is an
1765 -- instance of a generic unit.
1767 -- Is_Generic_Type (Flag13)
1768 -- Present in types which are generic formal types. Such types have an
1769 -- Ekind that corresponds to their classification, so the Ekind cannot
1770 -- be used to identify generic types.
1772 -- Is_Generic_Unit (synthesized)
1773 -- Applies to all entities. Yields True for a generic unit (generic
1774 -- package, generic function, generic procedure), and False for all
1777 -- Is_Hidden (Flag57)
1778 -- Present in all entities. Set true for all entities declared in the
1779 -- private part or body of a package. Also marks generic formals of a
1780 -- formal package declared without a box. For library level entities,
1781 -- this flag is set if the entity is not publicly visible.
1783 -- Is_Hidden_Open_Scope (Flag171)
1784 -- Present in all entities. Set true for a scope that contains the
1785 -- instantiation of a child unit, and whose entities are not visible
1786 -- during analysis of the instance.
1788 -- Is_Immediately_Visible (Flag7)
1789 -- Present in all entities. Set if entity is immediately visible, i.e.
1790 -- is defined in some currently open scope (RM 8.3(4)).
1792 -- Is_Imported (Flag24)
1793 -- Present in all entities. Set if the entity is imported. For now we
1794 -- only allow the import of exceptions, functions, procedures, packages.
1795 -- and variables. Exceptions can only be imported in the OpenVMS and
1796 -- Java VM implementations of GNAT. Packages and types can only be
1797 -- imported in the Java VM implementation.
1799 -- Is_Incomplete_Or_Private_Type (synthesized)
1800 -- Applies to all entities, true for private and incomplete types
1802 -- Is_Indefinite_Subtype (synthesized)
1803 -- Applies to all entities for types and subtypes. Determines if given
1804 -- entity is an unconstrained array type or subtype, a discriminated
1805 -- record type or subtype with no initial discriminant values or a
1806 -- class wide type or subtype.
1808 -- Is_Inlined (Flag11)
1809 -- Present in all entities. Set for functions and procedures which are
1810 -- to be inlined. For subprograms created during expansion, this flag
1811 -- may be set directly by the expander to request inlining. Also set
1812 -- for packages that contain inlined subprograms, whose bodies must be
1813 -- be compiled. Is_Inlined is also set on generic subprograms and is
1814 -- inherited by their instances. It is also set on the body entities
1815 -- of inlined subprograms. See also Has_Pragma_Inline.
1817 -- Is_Instantiated (Flag126)
1818 -- Present in generic packages and generic subprograms. Set if the unit
1819 -- is instantiated from somewhere in the extended main source unit. This
1820 -- flag is used to control warnings about the unit being uninstantiated.
1821 -- Also set in a package that is used as an actual for a generic package
1822 -- formal in an instantiation. Also set on a parent instance, in the
1823 -- instantiation of a child, which is implicitly declared in the parent.
1825 -- Is_Integer_Type (synthesized)
1826 -- Applies to all entities, true for integer types and subtypes
1828 -- Is_Internal (Flag17)
1829 -- Present in all entities. Set to indicate an entity created during
1830 -- semantic processing (e.g. an implicit type). Need more documentation
1833 -- Is_Interrupt_Handler (Flag89)
1834 -- Present in protected procedures. Set if a pragma Interrupt_Handler
1835 -- applies to the procedure (which must be parameterless).
1837 -- Is_Intrinsic_Subprogram (Flag64)
1838 -- Present in functions and procedures. It is set if a valid pragma
1839 -- Interface or Import is present for this subprogram specifying pragma
1840 -- Intrinsic. Valid means that the name and profile of the subprogram
1841 -- match the requirements of one of the recognized intrinsic subprograms
1842 -- (see package Sem_Intr for details). Note: the value of Convention for
1843 -- such an entity will be set to Convention_Intrinsic, but it is the
1844 -- setting of Is_Intrinsic_Subprogram, NOT simply having convention set
1845 -- to intrinsic, which causes intrinsic code to be generated.
1847 -- Is_Itype (Flag91)
1848 -- Present in all entities, set for Itypes. If it is set, then the
1849 -- declaration for the type does not appear explicitly in the tree.
1850 -- Instead gigi will elaborate the type when it is first used.
1851 -- Has_Delayed_Freeze can be set for Itypes, and the meaning is that
1852 -- the first use (the one which causes the type to be defined) will
1853 -- be the freeze node. Note that an important restriction on Itypes
1854 -- is that the first use of such a type (the one that causes it to be
1855 -- defined) must be in the same scope as the type.
1857 -- Is_Known_Valid (Flag170)
1858 -- Present in all entities. Relevant for types (and subtype) and
1859 -- for objects (and enumeration literals) of a discrete type.
1861 -- The purpose of this flag is to implement the requirement stated
1862 -- in (RM 13.9.1(9-11)) which require that the use of possibly invalid
1863 -- values may not cause programs to become erroneous. See the function
1864 -- Exp_Util.Expr_Known_Valid for further details. Note that the setting
1865 -- is conservative, in the sense that if the flag is set, it must be
1866 -- right. If the flag is not set, nothing is known about the validity.
1868 -- For enumeration literals, the flag is always set, since clearly
1869 -- an enumeration literal represents a valid value. Range checks
1870 -- where necessary will ensure that this valid value is appropriate.
1872 -- For objects, the flag indicates the state of knowledge about the
1873 -- current value of the object. This may be modified during expansion,
1874 -- and thus the final value is not relevant to gigi.
1876 -- For types and subtypes, the flag is set if all possible bit patterns
1877 -- of length Object_Size (i.e. Esize of the type) represent valid values
1878 -- of the type. In general for such tytpes, all values are valid, the
1879 -- only exception being the case where an object of the type has an
1880 -- explicit size that is greater than Object_Size.
1882 -- For non-discrete objects, the setting of the Is_Known_Valid flag is
1883 -- not defined, and is not relevant, since the considerations of the
1884 -- requirement in (RM 13.9.1(9-11)) do not apply.
1886 -- Is_Limited_Composite (Flag106)
1887 -- Present in all entities. True for composite types that have a
1888 -- limited component. Used to enforce the rule that operations on
1889 -- the composite type that depend on the full view of the component
1890 -- do not become visible until the immediate scope of the composite
1891 -- type itself (RM 7.3.1 (5)).
1893 -- Is_Limited_Record (Flag25)
1894 -- Present in all entities. Set to true for record (sub)types if the
1895 -- record is declared to be limited. Note that this flag is not set
1896 -- simply because some components of the record are limited.
1898 -- Is_Limited_Type (synthesized)
1899 -- Applies to all entities. True if entity is a limited type (limited
1900 -- private type, task type, protected type, composite containing a
1901 -- limited component, or a subtype of any of these types).
1903 -- Is_Machine_Code_Subprogram (Flag137)
1904 -- Present in subprogram entities. Set to indicate that the subprogram
1905 -- is a machine code subprogram (i.e. its body includes at least one
1906 -- code statement). Also indicates that all necessary semantic checks
1907 -- as required by RM 13.8 have been performed.
1909 -- Is_Non_Static_Subtype (Flag109)
1910 -- This flag is present in all type and subtype entities. It is set in
1911 -- some (but not all) cases in which a subtype is known to be non-static.
1912 -- Before this flag was added, the computation of whether a subtype was
1913 -- static was entirely synthesized, by looking at the bounds, and the
1914 -- immediate subtype parent. However, this method does not work for some
1915 -- Itypes that have no parent set (and the only way to find the immediate
1916 -- subtype parent is to go through the tree). For now, this flay is set
1917 -- conservatively, i.e. if it is set then for sure the subtype is non-
1918 -- static, but if it is not set, then the type may or may not be static.
1919 -- Thus the test for a static subtype is that this flag is clear AND
1920 -- that the bounds are static AND that the parent subtype (if available
1921 -- to be tested) is static. Eventually we should make sure this flag
1922 -- is always set right, at which point, these comments can be removed,
1923 -- and the tests for static subtypes greatly simplified.
1925 -- Is_Null_Init_Proc (Flag178)
1926 -- Present in procedure entities. Set for generated init_proc procedures
1927 -- (used to initialize composite types), if the code for the procedure
1928 -- is null (i.e. is a return and nothing else). Such null initialization
1929 -- procedures are generated in case some client is compiled using the
1930 -- Initialize_Scalars pragma, generating a call to this null procedure,
1931 -- but there is no need to call such procedures within a compilation
1932 -- unit, and this flag is used to suppress such calls.
1934 -- Is_Numeric_Type (synthesized)
1935 -- Applies to all entities, true for all numeric types and subtypes
1936 -- (integer, fixed, float).
1938 -- Is_Object (synthesized)
1939 -- Applies to all entities, true for entities representing objects,
1940 -- including generic formal parameters.
1942 -- Is_Optional_Parameter (Flag134)
1943 -- Present in parameter entities. Set if the parameter is specified as
1944 -- optional by use of a First_Optional_Parameter argument to one of the
1945 -- extended Import pragmas. Can only be set for OpenVMS versions of GNAT.
1947 -- Is_Ordinary_Fixed_Point_Type (synthesized)
1948 -- Applies to all entities, true for ordinary fixed point types
1951 -- Is_Package (synthesized)
1952 -- Applies to all entities. True for packages and generic packages.
1953 -- False for all other entities.
1955 -- Is_Package_Body_Entity (Flag160)
1956 -- Present in all entities. Set for entities defined at the top level
1957 -- of a package body. Used to control externally generated names.
1959 -- Is_Packed (Flag51) [implementation base type only]
1960 -- Present in all type entities. This flag is set only for record and
1961 -- array types which have a packed representation. There are three
1962 -- cases which cause packing:
1964 -- 1. Explicit use of pragma Pack for an array of package components
1965 -- 2. Explicit use of pragma Pack to pack a record
1966 -- 4. Setting Component_Size of an array to a bit-packable value
1967 -- 3. Indexing an array with a non-standard enumeration type.
1969 -- For records, Is_Packed is always set if Has_Pack_Pragma is set,
1970 -- and can also be set on its own in a derived type which inherited
1971 -- its packed status.
1973 -- For arrays, Is_Packed is set if an array is bit packed (i.e. the
1974 -- component size is known at compile time and is 1-7, 9-15 or 17-31),
1975 -- or if the array has one or more index types that are enumeration
1976 -- types with non-standard representations (in GNAT, we store such
1977 -- arrays compactly, using the Pos of the enumeration type value).
1979 -- As for the case of records, Is_Packed can be set on its own for a
1980 -- derived type, with the same dual before/after freeze meaning.
1981 -- Is_Packed can also be set as the result of an explicit component
1982 -- size clause that specifies an appropriate component size.
1984 -- In the bit packed array case, Is_Bit_Packed_Array will be set in
1985 -- the bit packed case once the array type is frozen.
1987 -- Before an array type is frozen, Is_Packed will always be set if
1988 -- Has_Pack_Pragma is set. Before the freeze point, it is not possible
1989 -- to know the component size, since the component type is not frozen
1990 -- until the array type is frozen. Thus Is_Packed for an array type
1991 -- before it is frozen means that packed is required. Then if it turns
1992 -- out that the component size is not suitable for bit packing, the
1993 -- Is_Packed flag gets turned off.
1995 -- Is_Packed_Array_Type (Flag138)
1996 -- Present in all entities. This flag is set on the entity for the type
1997 -- used to implement a packed array (either a modular type, or a subtype
1998 -- of Packed_Bytes{1,2,4} as appropriate). The flag is set if and only
1999 -- if the type appears in the Packed_Array_Type field of some other type
2000 -- entity. It is used by Gigi to activate the special processing for such
2001 -- types (unchecked conversions that would not otherwise be allowed are
2002 -- allowed for such types).
2004 -- Is_Potentially_Use_Visible (Flag9)
2005 -- Present in all entities. Set if entity is potentially use visible,
2006 -- i.e. it is defined in a package that appears in a currently active
2007 -- use clause (RM 8.4(8)). Note that potentially use visible entities
2008 -- are not necessarily use visible (RM 8.4(9-11)).
2010 -- Is_Preelaborated (Flag59)
2011 -- Present in all entities, set in E_Package and E_Generic_Package
2012 -- entities to which a pragma Preelaborate is applied, and also in
2013 -- all entities within such packages. Note that the fact that this
2014 -- flag is set does not necesarily mean that no elaboration code is
2015 -- generated for the package.
2017 -- Is_Private_Composite (Flag107)
2018 -- Present in composite types that have a private component. Used to
2019 -- enforce the rule that operations on the composite type that depend
2020 -- on the fulll view of the component, do not become visible until the
2021 -- immediate scope of the composite type itself (7.3.1 (5)). Both this
2022 -- flag and Is_Limited_Composite are needed.
2024 -- Is_Private_Descendant (Flag53)
2025 -- Present in entities that can represent library units (packages,
2026 -- functions, procedures). Set if the library unit is itself a private
2027 -- child unit, or if it is the descendent of a private child unit.
2029 -- Is_Private_Type (synthesized)
2030 -- Applies to all entities, true for private types and subtypes,
2031 -- as well as for record with private types as subtypes
2033 -- Is_Protected_Type (synthesized)
2034 -- Applies to all entities, true for protected types and subtypes
2036 -- Is_Psected (Flag153)
2037 -- Present in entities for objects, true if a valid Psect_Object
2038 -- pragma applies to the object. Used to detect duplicate pragmas.
2040 -- Is_Public (Flag10)
2041 -- Present in all entities. Set to indicate that an entity defined in
2042 -- one compilation unit can be referenced from other compilation units.
2043 -- If this reference causes a reference in the generated variable, for
2044 -- example in the case of a variable name, then Gigi will generate an
2045 -- appropriate external name for use by the linker.
2047 -- Is_Protected_Private (synthesized)
2048 -- Applies to a record component. Returns true if this component
2049 -- is used to represent a private declaration of a protected type.
2051 -- Is_Protected_Record_Type (synthesized)
2052 -- Applies to all entities, true if Is_Concurrent_Record_Type
2053 -- Corresponding_Concurrent_Type is a protected type.
2056 -- Present in all entities. Set in all entities of a unit to which a
2057 -- pragma Pure is applied, and also set for the entity of the unit
2058 -- itself. In addition, this flag may be set for any other functions
2059 -- or procedures that are known to be side effect free, so in the case
2060 -- of subprograms, the Is_Pure flag may be used by the optimizer to
2061 -- imply that it can assume freedom from side effects (other than those
2062 -- resulting from assignment to out parameters, or to objects designated
2063 -- by access parameters).
2065 -- Is_Real_Type (synthesized)
2066 -- Applies to all entities, true for real types and subtypes
2068 -- Is_Record_Type (synthesized)
2069 -- Applies to all entities, true for record types and subtypes,
2070 -- includes class-wide types and subtypes (which are also records)
2072 -- Is_Remote_Call_Interface (Flag62)
2073 -- Present in all entities, set in E_Package and E_Generic_Package
2074 -- entities to which a pragma Remote_Call_Interace is applied, and
2075 -- also in all entities within such packages.
2077 -- Is_Remote_Types (Flag61)
2078 -- Present in all entities, set in E_Package and E_Generic_Package
2079 -- entities to which a pragma Remote_Types is applied, and also in
2080 -- all entities within such packages.
2082 -- Is_Renaming_Of_Object (Flag112)
2083 -- Present in all entities, set only for a variable or constant for
2084 -- which the Renamed_Object field is non-empty and for which the
2085 -- renaming is handled by the front end, by macro substitution of
2086 -- a copy of the (evaluated) name tree whereever the variable is used.
2088 -- Is_Return_By_Reference_Type (synthesized)
2089 -- Applies to all type entities. True if the type is required to
2090 -- be returned by reference, as defined in 6.5(11-16).
2092 -- Is_Scalar_Type (synthesized)
2093 -- Applies to all entities, true for scalar types and subtypes
2095 -- Is_Shared_Passive (Flag60)
2096 -- Present in all entities, set in E_Package and E_Generic_Package
2097 -- entities to which a pragma Shared_Passive is applied, and also in
2098 -- all entities within such packages.
2100 -- Is_Statically_Allocated (Flag28)
2101 -- Present in all entities. This can only be set True for exception,
2102 -- variable, constant, and type/subtype entities. If the flag is set,
2103 -- then the variable or constant must be allocated statically rather
2104 -- than on the local stack frame. For exceptions, the meaning is that
2105 -- the exception data should be allocated statically (and indeed this
2106 -- flag is always set for exceptions, since exceptions do not have
2107 -- local scope). For a type, the meaning is that the type must be
2108 -- elaborated at the global level rather than locally. No type marked
2109 -- with this flag may depend on a local variable, or on any other type
2110 -- which does not also have this flag set to True. For a variable or
2111 -- or constant, if the flag is set, then the type of the object must
2112 -- either be declared at the library level, or it must also have the
2113 -- flag set (since to allocate the oject statically, its type must
2114 -- also be elaborated globally).
2116 -- Is_Subprogram (synthesized)
2117 -- Applies to all entities, true for bodies of functions, procedures
2120 -- Is_String_Type (synthesized)
2121 -- Applies to all type entities. Determines if the given type is a
2122 -- string type, i.e. it is directly a string type or string subtype,
2123 -- or a string slice type, or an array type with one dimension and a
2124 -- component type that is a character type.
2127 -- Present in E_Component. For regular tagged type this flag is set on
2128 -- the tag component (whose name is Name_uTag) and for CPP_Class tagged
2129 -- types, this flag marks the pointer to the main vtable (i.e. the one
2130 -- to be extended by derivation)
2132 -- Is_Tagged_Type (Flag55)
2133 -- Present in all entities, true for an entity for a tagged type.
2135 -- Is_Task_Record_Type (synthesized)
2136 -- Applies to all entities, true if Is_Concurrent_Record_Type
2137 -- Corresponding_Concurrent_Type is a task type.
2139 -- Is_Task_Type (synthesized)
2140 -- Applies to all entities, true for task types and subtypes
2142 -- Is_True_Constant (Flag163)
2143 -- This flag is set in constants and variables which have an initial
2144 -- value specified but which are never assigned, partially or in the
2145 -- whole. For variables, it means that the variable was initialized
2146 -- but never modified, and hence can be treated as a constant by the
2147 -- code generator. For a constant, it means that the constant was not
2148 -- modified by generated code (e.g. to set a discriminant in an init
2149 -- proc). Assignments by user or generated code will reset this flag.
2151 -- Is_Type (synthesized)
2152 -- Applies to all entities, true for a type entity
2154 -- Is_Unchecked_Union (Flag117)
2155 -- Present in all entities. Set only in record types to which the
2156 -- pragma Unchecked_Union has been validly applied.
2158 -- Is_Unsigned_Type (Flag144)
2159 -- Present in all types, but can be set only for discrete and fixed-point
2160 -- type and subtype entities. This flag is only valid if the entity is
2161 -- frozen. If set it indicates that the representation is known to be
2162 -- unsigned (i.e. that no negative values appear in the range). This is
2163 -- normally just a reflection of the lower bound of the subtype or base
2164 -- type, but there is one case in which the setting is non-obvious,
2165 -- namely the case of an unsigned subtype of a signed type from which
2166 -- a further subtype is obtained using variable bounds. This further
2167 -- subtype is still unsigned, but this cannot be determined by looking
2168 -- at its bounds or the bounds of the corresponding base type.
2170 -- Is_Valued_Procedure (Flag127)
2171 -- Present in procedure entities. Set if an Import_Valued_Procedure
2172 -- or Export_Valued_Procedure pragma applies to the procedure entity.
2174 -- Is_Visible_Child_Unit (Flag116)
2175 -- Present in compilation units that are child units. Once compiled,
2176 -- child units remain chained to the entities in the parent unit, and
2177 -- a separate flag must be used to indicate whether the names are
2178 -- visible by selected notation, or not.
2180 -- Is_VMS_Exception (Flag133)
2181 -- Present in all entities. Set only for exception entities where the
2182 -- exception was specified in an Import_Exception or Export_Exception
2183 -- pragma with the VMS option for Form. See description of these pragmas
2184 -- for details. This flag can only be set in OpenVMS versions of GNAT.
2186 -- Is_Volatile (Flag16)
2187 -- Present in all type entities, and also in constants, components and
2188 -- variables. Set if a pragma Volatile applies to the entity. Also set
2189 -- if pragma Shared or pragma Atomic applies to entity. In the case of
2190 -- private or incomplete types, this flag is set in both the private
2193 -- Is_Wrapper_Package (synthesized)
2194 -- Present in package entities. Indicates that the package has been
2195 -- created as a wrapper for a subprogram instantiation.
2197 -- Last_Entity (Node20)
2198 -- Present in all entities which act as scopes to which a list of
2199 -- associated entities is attached (blocks, class subtypes and types,
2200 -- entries, functions, loops, packages, procedures, protected objects,
2201 -- record types and subtypes, private types, task types and subtypes).
2202 -- Points to a the last entry in the list of associated entities chained
2203 -- through the Next_Entity field. Empty if no entities are chained.
2205 -- Lit_Indexes (Node15)
2206 -- Present in enumeration types and subtypes. Non-empty only for the
2207 -- case of an enumeration root type, where it contains the entity for
2208 -- the generated indexes entity. See unit Exp_Imgv for full details of
2209 -- the nature and use of this entity for implkementing the Image and
2210 -- Value attributes for the enumeration type in question.
2212 -- Lit_Strings (Node16)
2213 -- Present in enumeration types and subtypes. Non-empty only for the
2214 -- case of an enumeration root type, where it contains the entity for
2215 -- the literals string entity. See unit Exp_Imgv for full details of
2216 -- the nature and use of this entity for implementing the Image and
2217 -- Value attributes for the enumeration type in question.
2219 -- Machine_Radix_10 (Flag84)
2220 -- Present in decimal types and subtypes, set if the Machine_Radix
2221 -- is 10, as the result of the specification of a machine radix
2222 -- representation clause. Note that it is possible for this flag
2223 -- to be set without having Has_Machine_Radix_Clause True. This
2224 -- happens when a type is derived from a type with a clause present.
2226 -- Master_Id (Node17)
2227 -- Present in access types and subtypes. Empty unless Has_Task is
2228 -- set for the designated type, in which case it points to the entity
2229 -- for the Master_Id for the access type master.
2231 -- Materialize_Entity (Flag168)
2232 -- Present in all entities. Set only for constant or renamed entities
2233 -- which should be materialized for debugging purposes. In the case of
2234 -- a constant, a memory location should be allocated containing the
2235 -- value. In the case of a renaming, a memory location containing the
2236 -- renamed address should be allocated.
2238 -- Mechanism (Uint8) (returned as Mechanism_Type)
2239 -- Present in functions and non-generic formal parameters. Indicates
2240 -- the mechanism to be used for the function return or for the formal
2241 -- parameter. See separate section on passing mechanisms.
2243 -- Modulus (Uint17) [base type only]
2244 -- Present in modular types. Contains the modulus. For the binary
2245 -- case, this will be a power of 2, but if Non_Binary_Modulus is
2246 -- set, then it will not be a power of 2.
2248 -- Needs_Debug_Info (Flag147)
2249 -- Present in all entities. Set if the entity requires debugging
2250 -- information to be generated. This is true of all entities that
2251 -- have Comes_From_Source set, and also transitively for entities
2252 -- associated with such components (e.g. their types). It is true
2253 -- for all entities in Debug_Generated_Code mode (-gnatD switch).
2255 -- Needs_No_Actuals (Flag22)
2256 -- Present in callable entities (subprograms, entries, access to
2257 -- subprograms) which can be called without actuals because all of
2258 -- their formals (if any) have default values. This flag simplifies the
2259 -- resolution of the syntactic ambiguity involving a call to these
2260 -- entities when the return type is an array type, and a call can be
2261 -- interpreted as an indexing of the result of the call. It is also
2262 -- used to resolve various cases of entry calls.
2264 -- Not_Source_Assigned (Flag115)
2265 -- Present in all entities, but relevant only for variables and
2266 -- parameters. This flag is set if the object is never assigned a
2267 -- value in user code and was not fully initialized at declaration
2268 -- time. Note however, that an access variable is not considered
2269 -- fully initialized in this sense.
2271 -- This flag is only for the purposes of issuing warnings, it must not
2272 -- be used by the code generator to indicate that the variable is in
2273 -- fact a constant, since some assignments in generated code do not
2274 -- count (for example, the call to an init_proc to assign some but
2275 -- not all of the fields in a patially initialized record). The code
2276 -- generator should instead use the flag Is_True_Constant.
2278 -- In variables and out parameters, if this flag is set after full
2279 -- processing of the corresponding declarative unit, it indicates that
2280 -- the variable or parameter was never set, and a warning message can
2283 -- Note: this flag is initially set, and then cleared on encountering
2284 -- any construct that might conceivably legitimately set the value.
2285 -- Thus during the analysis of a declarative region and its associated
2286 -- statement sequence, the meaning of the flag is "not assigned yet",
2287 -- and once this analysis is complete the flag means "never assigned".
2289 -- Note: for variables appearing in package declarations, this flag
2290 -- is never set. That is because there is no way to tell if some
2291 -- client modifies the variable (or in the case of variables in the
2292 -- private part, if some child unit modifies the variables).
2294 -- Note: in the case of renamed objects, the flag must be set in the
2295 -- ultimate renamed object. Clients noting a possible modification
2296 -- should use the Note_Possible_Modification procedure in Sem_Util
2297 -- rather than Set_Not_Source_Assigned precisely to deal properly with
2298 -- the renaming possibility.
2300 -- Next_Component (synthesized)
2301 -- Applies to record components. Returns the next component by
2302 -- following the chain of declared entities until one is found which
2303 -- corresponds to a component (Ekind is E_Component). Any internal types
2304 -- generated from the subtype indications of the record components are
2305 -- skipped. Returns Empty if no more components.
2307 -- Next_Discriminant (synthesized)
2308 -- Applies to discriminants returned by First/Next_Discriminant.
2309 -- Returns the next language-defined (ie: perhaps non-girder)
2310 -- discriminant by following the chain of declared entities as long as
2311 -- the kind of the entity corresponds to a discriminant. Note that the
2312 -- discriminants might be the only components of the record.
2313 -- Returns Empty if there are no more.
2315 -- Next_Entity (Node2)
2316 -- Present in all entities. The entities of a scope are chained, with
2317 -- the head of the list being in the First_Entity field of the scope
2318 -- entity. All entities use the Next_Entity field as a forward pointer
2319 -- for this list, with Empty indicating the end of the list. Since this
2320 -- field is in the base part of the entity, the access routines for this
2321 -- field are in Sinfo.
2323 -- Next_Formal (synthesized)
2324 -- Applies to the entity for a formal parameter. Returns the next
2325 -- formal parameter of the subprogram or subprogram type. Returns
2326 -- Empty if there are no more formals.
2328 -- Next_Formal_With_Extras (synthesized)
2329 -- Applies to the entity for a formal parameter. Returns the next
2330 -- formal parameter of the subprogram or subprogram type. Returns
2331 -- Empty if there are no more formals. The list returned includes
2332 -- all the extra formals (see description of Extra_Formal field)
2334 -- Next_Girder_Discriminant (synthesized)
2335 -- Applies to discriminants. Set only for a discriminant returned by
2336 -- a call to First/Next_Girder_Discriminant. Returns next girder
2337 -- discriminant, if there are more (see complete description in
2338 -- First_Girder_Discriminant), or Empty if there are no more.
2340 -- Next_Index (synthesized)
2341 -- Applies to array types and subtypes and to string types and
2342 -- subtypes. Yields the next index. The first index is obtained by
2343 -- using the First_Index attribute, and then subsequent indexes are
2344 -- obtained by applying Next_Index to the previous index. Empty is
2345 -- returned to indicate that there are no more indexes. Note that
2346 -- unlike most attributes in this package, Next_Index applies to
2347 -- nodes for the indexes, not to entities.
2349 -- Next_Inlined_Subprogram (Node12)
2350 -- Present in subprograms. Used to chain inlined subprograms used in
2351 -- the current compilation, in the order in which they must be compiled
2352 -- by Gigi to insure that all inlinings are performed.
2354 -- Next_Literal (synthesized)
2355 -- Applies to enumeration literals, returns the next literal, or
2356 -- Empty if applied to the last literal. This is actually a synonym
2357 -- for Next, but its use is preferred in this context.
2359 -- Non_Binary_Modulus (Flag58) [base type only]
2360 -- Present in modular integer types. Set if the modulus for the type
2361 -- is other than a power of 2.
2363 -- Nonzero_Is_True (Flag162) [base type only]
2364 -- Present in enumeration types. True if any non-zero value is to be
2365 -- interpreted as true. Currently this is set true for derived Boolean
2366 -- types which have a convention of C, C++ or Fortran.
2368 -- No_Pool_Assigned (Flag131) [root type only]
2369 -- Present in access types. Set if a storage size clause applies to
2370 -- the variable with a compile time known value of zero. This flag is
2371 -- used to generate warnings if any attempt is made to allocate an
2372 -- instance of such an access type.
2374 -- No_Return (Flag113)
2375 -- Present in procedure and generic procedure entries. Indicates that
2376 -- a pragma No_Return applies to the procedure.
2378 -- Normalized_First_Bit (Uint8)
2379 -- Present in components and discriminants. Indicates the normalized
2380 -- value of First_Bit for the component, i.e. the offset within the
2381 -- lowest addressed storage unit containing part or all of the field.
2383 -- Normalized_Position (Uint9)
2384 -- Present in components and discriminants. Indicates the normalized
2385 -- value of Position for the component, i.e. the offset in storage
2386 -- units from the start of the record to the lowest addressed storage
2387 -- unit containing part or all of the field.
2389 -- Normalized_Position_Max (Uint10)
2390 -- Present in components and discriminants. For almost all cases, this
2391 -- is the same as Normalized_Position. The one exception is for the case
2392 -- of a discriminated record containing one or more arrays whose length
2393 -- depends on discriminants. In this case, the Normalized_Position_Max
2394 -- field represents the maximum possible value of Normalized_Position
2395 -- assuming min/max values for discriminant subscripts in all fields.
2396 -- This is used by Layout in front end layout mode to properly computed
2397 -- the maximum size such records (needed for allocation purposes when
2398 -- there are default discriminants, and also for the 'Size value).
2400 -- Number_Dimensions (synthesized)
2401 -- Applies to array types and subtypes. Returns the number of dimensions
2402 -- of the array type or subtype as a value of type Pos.
2404 -- Number_Discriminants (synthesized)
2405 -- Applies to all types with discriminants. Yields the number of
2406 -- discriminants as a value of type Pos.
2408 -- Number_Entries (synthesized)
2409 -- Applies to concurrent types. Returns the number of entries that are
2410 -- declared within the task or protected definition for the type.
2412 -- Number_Formals (synthesized)
2413 -- Applies to subprograms and subprogram types. Yields the number of
2414 -- formals as a value of type Pos.
2416 -- Object_Ref (Node17)
2417 -- Present in protected bodies. This is an implicit prival for the
2418 -- Protection object associated with a protected object. See Prival
2419 -- for further details on the use of privals.
2421 -- Original_Record_Component (Node22)
2422 -- Present in components, including discriminants. The usage depends
2423 -- on whether the record is a base type and whether it is tagged.
2425 -- In base tagged types:
2426 -- When the component is inherited in a record extension, it points
2427 -- to the original component (the entity of the ancestor component
2428 -- which is not itself inherited) otherwise it points to itself.
2429 -- Gigi uses this attribute to implement the automatic dereference in
2430 -- the extension and to apply the transformation:
2432 -- Rec_Ext.Comp -> Rec_Ext.Parent. ... .Parent.Comp
2434 -- In base non-tagged types:
2435 -- Always points to itself except for non-girder discriminants, where
2436 -- it points to the girder discriminant it renames.
2438 -- In subtypes (tagged and untagged):
2439 -- Points to the component in the base type.
2441 -- Packed_Array_Type (Node23)
2442 -- Present in array types and subtypes, including the string literal
2443 -- subtype case, if the corresponding type is packed (either bit packed
2444 -- or packed to eliminate holes in non-contiguous enumeration type
2445 -- index types). References the type used to represent the packed array,
2446 -- which is either a modular type for short static arrays, or an
2447 -- array of System.Unsigned. Note that in some situations (internal
2448 -- types, and references to fields of variant records), it is not
2449 -- always possible to construct this type in advance of its use. If
2450 -- Packed_Array_Type is empty, then the necessary type is declared
2451 -- on the fly for each reference to the array.
2453 -- Parameter_Mode (synthesized)
2454 -- Applies to formal parameter entities. This is a synonym for Ekind,
2455 -- used when obtaining the formal kind of a formal parameter (the result
2456 -- is one of E_[In/Out/In_Out]_Paramter)
2458 -- Parent_Subtype (Node19)
2459 -- Present in E_Record_Type. Points to the subtype to use for a
2460 -- field that references the parent record. This is used by Gigi to
2461 -- construct such a field.
2463 -- Primitive_Operations (Elist15)
2464 -- Present in tagged record types and subtypes and in tagged private
2465 -- types. Points to an element list of entities for primitive operations
2466 -- for the tagged type. Not present (and not set) in untagged types (it
2467 -- is an error to reference the primitive operations field of a type
2468 -- that is not tagged).
2470 -- Private_Dependents (Elist18)
2471 -- Present in private (sub)types. Records the subtypes of the
2472 -- private type, derivations from it, and records and arrays
2473 -- with components dependent on the type.
2475 -- The subtypes are traversed when installing and deinstalling
2476 -- (the full view of) a private type in order to ensure correct
2477 -- view of the subtypes.
2479 -- Used in similar fashion for incomplete types: holds list of subtypes
2480 -- of these incomplete types that have discriminant constraints. The
2481 -- full views of these subtypes are constructed when the full view of
2482 -- the incomplete type is processed.
2484 -- In addition, if the incomplete type is the designated type in an
2485 -- access definition for an access parameter, the operation may be
2486 -- a dispatching primitive operation, which is only known when the full
2487 -- declaration of the type is seen. Subprograms that have such an
2488 -- access parameter are also placed in the list of private_dependents.
2491 -- Present in components. Used for representing private declarations
2492 -- of protected objects (private formal: by analogy to Discriminal_Link).
2493 -- Empty unless the synthesized Is_Protected_Private attribute is
2494 -- true. The entity used as a formal parameter that corresponds to
2495 -- the to the private declaration in protected operations. See
2496 -- "Private data in protected objects" for details.
2498 -- Privals_Chain (Elist23)
2499 -- Present in protected operations (subprograms and entries). Links
2500 -- all occurrences of the Privals in the body of the operation, in
2501 -- order to patch their types at the end of their expansion. See
2502 -- "Private data in protected objects" for details.
2504 -- Private_View (Node22)
2505 -- For each private type, three entities are allocated, the private view,
2506 -- the full view, and the shadow entity. The shadow entity contains a
2507 -- copy of the private view and is used for restoring the proper private
2508 -- view after a region in which the full view is visible (and is copied
2509 -- into the entity normally used for the private view during this period
2510 -- of visibility). The Private_View field is self-referential when the
2511 -- private view lives in its normal entity, but in the copy that is made
2512 -- in the shadow entity, it points to the proper location in which to
2513 -- restore the private view saved in the shadow.
2515 -- Protected_Formal (Node22)
2516 -- Present in formal parameters (in, in out and out parameters). Used
2517 -- only for formals of protected operations. References corresponding
2518 -- formal parameter in the unprotected version of the operation that
2519 -- is created during expansion.
2521 -- Protected_Body_Subprogram (Node11)
2522 -- Present in protected operations. References the entity for the
2523 -- subprogram which implements the body of the operation.
2525 -- Protected_Operation (Node23)
2526 -- Present in components. Used for representing private declarations
2527 -- of protected objects. Empty unless the synthesized attribute
2528 -- Is_Protected_Private is True. This is the entity corresponding
2529 -- to the body of the protected operation currently being analyzed,
2530 -- and which will eventually use the current Prival associated with
2531 -- this component to refer to the renaming of a private object
2532 -- component. As soon as the expander generates this renaming, this
2533 -- attribute is changed to refer to the next protected subprogram.
2534 -- See "Private data in protected objects" for details.
2536 -- Reachable (Flag49)
2537 -- Present in labels. The flag is set over the range of statements in
2538 -- which a goto to that label is legal.
2540 -- Referenced (Flag156)
2541 -- Present in all entities, set if the entity is referenced.
2543 -- Referenced_Object (Node10)
2544 -- Present in all type entities. Set non-Empty only for type entities
2545 -- constructed for unconstrained objects, or objects that depend on
2546 -- discriminants. Points to the expression from which the actual
2547 -- subtype of the object can be evaluated.
2549 -- Register_Exception_Call (Node20)
2550 -- Present in exception entities. When an exception is declared,
2551 -- a call is expanded to Register_Exception. This field points to
2552 -- the expanded N_Procedure_Call_Statement node for this call. It
2553 -- is used for Import/Export_Exception processing to modify the
2554 -- register call to make appropriate entries in the special tables
2555 -- used for handling these pragmas at runtime.
2557 -- Related_Array_Object (Node19)
2558 -- Present in array types and subtypes. Used only for the base type
2559 -- and subtype created for an anonymous array object. Set to point
2560 -- to the entity of the corresponding array object. Currently used
2561 -- only for type-related error messages.
2563 -- Related_Instance (Node15)
2564 -- Present in the wrapper packages created for subprogram instances.
2565 -- The internal subprogram that implements the instance is inside the
2566 -- wrapper package, but for debugging purposes its external symbol
2567 -- must correspond to the name and scope of the related instance.
2569 -- Renamed_Entity (Node18)
2570 -- Present in exceptions, packages and generic units that are defined
2571 -- by a renaming declaration. Denotes the renamed entity, or transit-
2572 -- itively the ultimate renamed entity if there is a chain of renaming
2575 -- Renamed_Object (Node18)
2576 -- Present in all objects (constants, variables, components, formal
2577 -- parameters, generic formal parameters, and loop parameters. Set
2578 -- non-Empty if the object was declared by a renaming declaration, in
2579 -- which case it references the tree node for the name of the renamed
2580 -- object. This is only possible for the variable and constant cases.
2581 -- For formal parameters, this field is used in the course of inline
2582 -- expansion, to map the formals of a subprogram into the corresponding
2583 -- actuals. The field is Empty otherwise.
2585 -- Renaming_Map (Uint9)
2586 -- Present in generic subprograms, generic packages, and their
2587 -- instances. Also present in the instances of the corresponding
2588 -- bodies. Denotes the renaming map (generic entities => instance
2589 -- entities) used to construct the instance by givin an index into
2590 -- the tables used to represent these maps. See Sem_Ch12 for further
2591 -- details. The maps for package instances are also used when the
2592 -- instance is the actual corresponding to a formal package.
2594 -- Return_Present (Flag54)
2595 -- Present in function and generic function entities. Set if the
2596 -- function contains a return statement (used for error checking).
2597 -- This flag can also be set in procedure and generic procedure
2598 -- entities (for convenience in setting it), but is only tested
2599 -- for the function case.
2601 -- Returns_By_Ref (Flag90)
2602 -- Present in function entities, to indicate that the function
2603 -- returns the result by reference, either because its return typ is a
2604 -- by-reference-type or because it uses explicitly the secondary stack.
2606 -- Reverse_Bit_Order (Flag164)
2607 -- Present in all record type entities. Set if a valid pragma an
2608 -- attribute represention clause for Bit_Order has reversed the order
2609 -- of bits from the default value. When this flag is set, a component
2610 -- clause must specify a set of bits entirely contained in a single
2614 -- Present in all type and subtype entities. Contains the value of
2615 -- type'Size as defined in the RM. See also the Esize field and
2616 -- and the description on "Handling of Type'Size Values". A value
2617 -- of zero for in this field for a non-discrete type means that
2618 -- the front end has not yet determined the size value. For the
2619 -- case of a discrete type, this field is always set by the front
2620 -- end and zero is a legitimate value for a type with one value.
2622 -- Root_Type (synthesized)
2623 -- Applies to all type entities. For class-wide types, return the root
2624 -- type of the class covered by the CW type, otherwise returns the
2625 -- ultimate derivation ancestor of the given type. This function
2626 -- preserves the view, i.e. the Root_Type of a partial view is the
2627 -- partial view of the ulimate ancestor, the Root_Type of a full view
2628 -- is the full view of the ultimate ancestor. Note that this function
2629 -- does not correspond exactly to the use of root type in the RM, since
2630 -- in the RM root type applies to a class of types, not to a type.
2632 -- Scalar_Range (Node20)
2633 -- Present in all scalar types (including modular types, where the
2634 -- bounds are 0 .. modulus - 1). References a node in the tree that
2635 -- contains the bounds for the range. Note that this information
2636 -- could be obtained by rummaging around the tree, but it is more
2637 -- convenient to have it immediately at hand in the entity. The
2638 -- contents of Scalar_Range can either be an N_Subtype_Indication
2639 -- node (with a constraint), or a Range node, but not a simple
2640 -- subtype reference (a subtype is converted into a range).
2642 -- Scale_Value (Uint15)
2643 -- Present in decimal fixed-point types and subtypes. Contains the scale
2644 -- for the type (i.e. the value of type'Scale = the number of decimal
2645 -- digits after the decimal point).
2648 -- Present in all entities. Points to the entity for the scope (block,
2649 -- loop, subprogram, package etc.) in which the entity is declared.
2650 -- Since this field is in the base part of the entity node, the access
2651 -- routines for this field are in Sinfo.
2653 -- Scope_Depth (synth)
2654 -- Applies to program units, blocks, concurrent types and entries,
2655 -- and also to record types, i.e. to any entity that can appear on
2656 -- the scope stack. Yields the scope depth value, which for those
2657 -- entities other than records is simply the scope depth value,
2658 -- for record entities, it is the Scope_Depth of the record scope.
2660 -- Scope_Depth_Value (Uint22)
2661 -- Present in program units, blocks, concurrent types and entries.
2662 -- Indicates the number of scopes that statically enclose the
2663 -- declaration of the unit or type. Library units have a depth of zero.
2664 -- Note that record types can act as scopes but do NOT have this field
2665 -- set (see Scope_Depth above)
2667 -- Scope_Depth_Set (synthesized)
2668 -- Applies to a special predicate function that returns a Boolean value
2669 -- indicating whether or not the Scope_Depth field has been set. It
2670 -- is needed, since returns an invalid value in this case!
2672 -- Sec_Stack_Needed_For_Return (Flag167)
2673 -- Present in scope entities (blocks,functions, procedures, tasks,
2674 -- entries). Set to True when secondary stack is used to hold
2675 -- the returned value of a function and thus should not be
2676 -- released on scope exit.
2678 -- Shadow_Entities (List14)
2679 -- Present in package and generic package entities. Points to a list
2680 -- of entities that correspond to private types. For each private type
2681 -- a shadow entity is created that holds a copy of the private view.
2682 -- In regions of the program where the full views of these private
2683 -- entities are visible, the full view is copied into the entity that
2684 -- is normally used to hold the private view, but the shadow entity
2685 -- copy is unchanged. The shadow entities are then used to restore the
2686 -- original private views at the end of the region. This list is a
2687 -- standard format list (i.e. First (Shadow_Entities) is the first
2688 -- entry and subsequent entries are obtained using Next.
2690 -- Shared_Var_Assign_Proc (Node22)
2691 -- Present in variables. Set non-Empty only if Is_Shared_Passive is
2692 -- set, in which case this is the entity for the shared memory assign
2693 -- routine. See Exp_Smem for full details.
2695 -- Shared_Var_Read_Proc (Node15)
2696 -- Present in variables. Set non-Empty only if Is_Shared_Passive is
2697 -- set, in which case this is the entity for the shared memory read
2698 -- routine. See Exp_Smem for full details.
2700 -- Size_Check_Code (Node9)
2701 -- Present in constants and variables. Normally Empty. Set if code is
2702 -- generated to check the size of the variable. This field is used to
2703 -- suppress this code if a subsequent address clause is encountered.
2705 -- Size_Clause (synthesized)
2706 -- Applies to all entities. If a size clause is present in the rep
2707 -- item chain for an entity then the attribute definition clause node
2708 -- for the size clause is returned. Otherwise Size_Clause returns Empty
2709 -- if no item is present. Usually this is only meaningful if the flag
2710 -- Has_Size_Clause is set. This is because when the representation item
2711 -- chain is copied for a derived type, it can inherit a size clause that
2712 -- is not applicable to the entity.
2714 -- Size_Depends_On_Discriminant (Flag177)
2715 -- Present in all entities for types and subtypes. Indicates that the
2716 -- size of the type depends on the value of one or more discriminants.
2717 -- Currently, this flag is only set in front end layout mode for arrays
2718 -- which have one or more bounds depending on a discriminant value.
2720 -- Size_Known_At_Compile_Time (Flag92)
2721 -- Present in all entities for types and subtypes. Indicates that the
2722 -- size of objects of the type is known at compile time. This flag is
2723 -- used to optimize some generated code sequences, and also to enable
2724 -- some error checks (e.g. disallowing component clauses on variable
2725 -- length objects. It is set conservatively (i.e. if it is True, the
2726 -- size is certainly known at compile time, if it is False, then the
2727 -- size may or may not be known at compile time, but the code will
2728 -- assume that it is not known).
2730 -- Small_Value (Ureal21)
2731 -- Present in fixed point types. Points to the universal real for the
2732 -- Small of the type, either as given in a representation clause, or
2733 -- as computed (as a power of two) by the compiler.
2735 -- Spec_Entity (Node19)
2736 -- Present in package body entities. Points to corresponding package
2737 -- spec entity. Also present in subprogram body parameters in the
2738 -- case where there is a separate spec, where this field references
2739 -- the corresponding parameter entities in the spec.
2741 -- Storage_Size_Variable (Node15) [implementation base type only]
2742 -- Present in access types and task type entities. This flag is set
2743 -- if a valid and effective pragma Storage_Size applies to the base
2744 -- type. Points to the entity for a variable that is created to
2745 -- hold the value given in a Storage_Size pragma for an access
2746 -- collection or a task type. Note that in the access type case,
2747 -- this field is present only in the root type (since derived types
2748 -- share the same storage pool).
2750 -- Strict_Alignment (Flag145) [implementation base type only]
2751 -- Present in all type entities. Indicates that some containing part
2752 -- is either aliased or tagged. This prohibits packing the object
2753 -- tighter than its natural size and alignment.
2755 -- String_Literal_Length (Uint16)
2756 -- Present in string literal subtypes (which are created to correspond
2757 -- to string literals in the program). Contains the length of the string
2760 -- String_Literal_Low_Bound (Node15)
2761 -- Present in string literal subtypes (which are created to correspond
2762 -- to string literals in the program). Contains an expression whose
2763 -- value represents the low bound of the literal. This is a copy of
2764 -- the low bound of the applicable index constraint if there is one,
2765 -- or a copy of the low bound of the index base type if not.
2767 -- Suppress_Access_Checks (Flag31)
2768 -- Present in all entities. Set if access checks associated with this
2769 -- entity are to be suppressed (see separate section on "Handling of
2770 -- Check Suppression")
2772 -- Suppress_Accessibility_Checks (Flag32)
2773 -- Present in all entities. Set if accessibility checks associated with
2774 -- this entity are to be suppressed (see separate section on "Handling
2775 -- of Check Suppression")
2777 -- Suppress_Discriminant_Checks (Flag33)
2778 -- Present in all entities. Set if discriminant checks associated with
2779 -- this entity are to be suppressed (see separate section on "Handling
2780 -- of Check Suppression")
2782 -- Suppress_Division_Checks (Flag34)
2783 -- Present in all entities. Set if division checks associated with
2784 -- this entity are to be suppressed (see separate section on "Handling
2785 -- of Check Suppression")
2787 -- Suppress_Elaboration_Checks (Flag35)
2788 -- Present in all entities. Set if elaboration checks associated with
2789 -- this entity are to be suppressed (see separate section on "Handling
2790 -- of Check Suppression")
2792 -- Suppress_Elaboration_Warnings (Flag148)
2793 -- Present in all entities. Set if a pragma Suppress Elaboration_Checks
2794 -- is applied specifically to the entity. If set on a subprogram, all
2795 -- elaboration warnings for calls to the subprogram are suppressed. If
2796 -- set on a package, then all elaboration warnings for calls to any
2797 -- subprograms in the package are suppressed.
2799 -- Suppress_Index_Checks (Flag36)
2800 -- Present in all entities. Set if index checks associated with this
2801 -- entity are to be suppressed (see separate section on "Handling of
2802 -- Check Suppression")
2804 -- Suppress_Init_Proc (Flag105) [base type only]
2805 -- Present in all type entities. Set to suppress the generation of
2806 -- initialization procedures where they are known to be not needed.
2807 -- For example, the enumeration image table entity uses this flag.
2809 -- Suppress_Length_Checks (Flag37)
2810 -- Present in all entities. Set if length checks associated with this
2811 -- entity are to be suppressed (see separate section on "Handling of
2812 -- Check Suppression")
2814 -- Suppress_Overflow_Checks (Flag38)
2815 -- Present in all entities. Set if overflow checks associated with
2816 -- this entity are to be suppressed (see separate section on "Handling
2817 -- of Check Suppression")
2819 -- Suppress_Range_Checks (Flag39)
2820 -- Present in all entities. Set if range checks associated with this
2821 -- entity are to be suppressed (see separate section on "Handling of
2822 -- Check Suppression")
2824 -- Suppress_Storage_Checks (Flag40)
2825 -- Present in all entities. Set if storage checks associated with
2826 -- this entity are to be suppressed (see separate section on "Handling
2827 -- of Check Suppression")
2829 -- Suppress_Style_Checks (Flag165)
2830 -- Present in all entities. Suppresses any style checks specifically
2831 -- associated with the given entity if set.
2833 -- Suppress_Tag_Checks (Flag41)
2834 -- Present in all entities. Set if tag checks associated with this
2835 -- entity are to be suppressed (see separate section on "Handling of
2836 -- Check Suppression")
2838 -- Tag_Component (synthesized)
2839 -- Applies to tagged record types, returns the entity for the _Tag
2840 -- field in this record, which must be present.
2842 -- Type_High_Bound (synthesized)
2843 -- Applies to scalar types. Returns the tree node (Node_Id) that
2844 -- contains the high bound of a scalar type. The returned value is a
2845 -- literal for a base type, but may be an expression in the case of a
2846 -- scalar type with dynamic bounds. Note that in the case of a fixed
2847 -- point type, the high bound is in units of small, and is an integer.
2849 -- Type_Low_Bound (synthesized)
2850 -- Applies to scalar types. Returns the tree node (Node_Id) that
2851 -- contains the low bound of a scalar type. The returned value is a
2852 -- literal for a base type, but may be an expression in the case of a
2853 -- scalar type with dynamic bounds. Note that in the case of a fixed
2854 -- point type, the low bound is in units of small, and is an integer.
2856 -- Underlying_Full_View (Node19)
2857 -- Present in private subtypes that are the completion of other private
2858 -- types, or in private types that are derived from private subtypes.
2859 -- If the full view of a private type T is derived from another
2860 -- private type with discriminants Td, the full view of T is also
2861 -- private, and there is no way to attach to it a further full view that
2862 -- would convey the structure of T to the back end. The Underlying_Full_
2863 -- View is an attribute of the full view that is a subtype of Td with
2864 -- the same constraint as the declaration for T. The declaration for this
2865 -- subtype is built at the point of the declaration of T, either as a
2866 -- completion, or as a subtype declaration where the base type is private
2867 -- and has a private completion. If Td is already constrained, then its
2868 -- full view can serve directly as the full view of T.
2870 -- Underlying_Type (synthesized)
2871 -- Applies to all entities. This is the identity function except in
2872 -- the case where it is applied to an incomplete or private type,
2873 -- in which case it is the underlying type of the type declared by
2874 -- the completion, or Empty if the completion has not yet been
2875 -- encountered and analyzed.
2877 -- Note: the reason this attribute applies to all entities, and not
2878 -- just types, is to legitimize code where Underlying_Type is applied
2879 -- to an entity which may or may not be a type, with the intent that
2880 -- if it is a type, its underlying type is taken.
2882 -- Unset_Reference (Node16)
2883 -- Present in variables and out parameters. This is normally Empty.
2884 -- It is set to point to an identifier that represents a reference
2885 -- to the entity before any value has been set. Only the first such
2886 -- reference is identified. This field is used to generate a warning
2887 -- message if necessary (see Sem_Warn.Check_Unset_Reference).
2889 -- Uses_Sec_Stack (Flag95)
2890 -- Present in scope entities (blocks,functions, procedures, tasks,
2891 -- entries). Set to True when secondary stack is used in this scope and
2892 -- must be released on exit unless Sec_Stack_Needed_For_Return is set.
2894 -- Vax_Float (Flag151) [base type only]
2895 -- Present in all type entities. Set only on the base type of float
2896 -- types with Vax format. The particular format is determined by the
2897 -- Digits_Value value which is 6,9,15 for F_Float, D_Float, G_Float.
2899 -- Warnings_Off (Flag96)
2900 -- Present in all entities. Set if a pragma Warnings (Off, entity-name)
2901 -- is used to suppress warnings for a given entity. It is also used by
2902 -- the compiler in some situations to kill spurious warnings.
2908 -- The following three entity kinds are introduced by the corresponding
2909 -- type definitions:
2911 -- E_Access_Type, E_General_Access_Type, E_Anonymous_Access_Type.
2913 -- In addition, we define the kind E_Allocator_Type to label
2914 -- allocators. This is because special resolution rules apply to this
2915 -- construct. Eventually the constructs are labeled with the access
2916 -- type imposed by the context. Gigi should never see the type
2919 -- Similarly, the type E_Access_Attribute_Type is used as the initial
2920 -- kind associated with an access attribute. After resolution a specific
2921 -- access type will be established as determined by the context.
2923 -- Finally, the type Any_Access is used to label -null- during type
2924 -- resolution. Any_Access is also replaced by the context type after
2927 --------------------------------
2928 -- Classification of Entities --
2929 --------------------------------
2931 -- The classification of program entities which follows is a refinement of
2932 -- the list given in RM 3.1(1). E.g., separate entities denote subtypes of
2933 -- different type classes. Ada 95 entities include class wide types,
2934 -- protected types, subprogram types, generalized access types, generic
2935 -- formal derived types and generic formal packages.
2937 -- The order chosen for these kinds allows us to classify related entities
2938 -- so that they are contiguous. As a result, they do not appear in the
2939 -- exact same order as their order of first appearance in the LRM (For
2940 -- example, private types are listed before packages). The contiguity
2941 -- allows us to define useful subtypes (see below) such as type entities,
2942 -- overloaded entities, etc.
2944 -- Each entity (explicitly or implicitly declared) has a kind, which is
2945 -- a value of the following type:
2947 type Entity_Kind is (
2950 -- The initial Ekind value for a newly created entity. Also used as
2951 -- the Ekind for Standard_Void_Type, a type entity in Standard used
2952 -- as a dummy type for the return type of a procedure (the reason we
2953 -- create this type is to share the circuits for performing overload
2954 -- resolution on calls).
2961 -- Variables created by an object declaration with no constant keyword
2964 -- Components of a record declaration, private declarations of
2965 -- protected objects.
2968 -- Constants created by an object declaration with a constant keyword
2971 -- A discriminant, created by the use of a discriminant in a type
2975 -- A loop parameter created by a for loop
2977 ------------------------
2978 -- Parameter Entities --
2979 ------------------------
2981 -- Parameters are also objects
2984 -- An in parameter of a subprogram or entry
2987 -- An out parameter of a subprogram or entry
2990 -- An in-out parameter of a subprogram or entry
2992 --------------------------------
2993 -- Generic Parameter Entities --
2994 --------------------------------
2996 -- Generic parameters are also objects
2998 E_Generic_In_Out_Parameter,
2999 -- A generic in out parameter, created by the use of a generic in out
3000 -- parameter in a generic declaration.
3002 E_Generic_In_Parameter,
3003 -- A generic in parameter, created by the use of a generic in
3004 -- parameter in a generic declaration.
3011 -- Named numbers created by a number declaration with an integer value
3014 -- Named numbers created by a number declaration with a real value
3016 -----------------------
3017 -- Enumeration Types --
3018 -----------------------
3021 -- Enumeration types, created by an enumeration type declaration
3023 E_Enumeration_Subtype,
3024 -- Enumeration subtypes, created by an explicit or implicit subtype
3025 -- declaration applied to an enumeration type or subtype.
3031 E_Signed_Integer_Type,
3032 -- Signed integer type, used for the anonymous base type of the
3033 -- integer subtype created by an integer type declaration.
3035 E_Signed_Integer_Subtype,
3036 -- Signed integer subtype, created by either an integer subtype or
3037 -- integer type declaration (in the latter case an integer type is
3038 -- created for the base type, and this is the first named subtype).
3040 E_Modular_Integer_Type,
3041 -- Modular integer type, used for the anonymous base type of the
3042 -- integer subtype created by a modular integer type declaration.
3044 E_Modular_Integer_Subtype,
3045 -- Modular integer subtype, created by either an modular subtype
3046 -- or modular type declaration (in the latter case a modular type
3047 -- is created for the base type, and this is the first named subtype).
3049 E_Ordinary_Fixed_Point_Type,
3050 -- Ordinary fixed type, used for the anonymous base type of the
3051 -- fixed subtype created by an ordinary fixed point type declaration.
3053 E_Ordinary_Fixed_Point_Subtype,
3054 -- Ordinary fixed point subtype, created by either an ordinary fixed
3055 -- point subtype or ordinary fixed point type declaration (in the
3056 -- latter case a fixed point type is created for the base type, and
3057 -- this is the first named subtype).
3059 E_Decimal_Fixed_Point_Type,
3060 -- Decimal fixed type, used for the anonymous base type of the decimal
3061 -- fixed subtype created by an ordinary fixed point type declaration.
3063 E_Decimal_Fixed_Point_Subtype,
3064 -- Decimal fixed point subtype, created by either a decimal fixed point
3065 -- subtype or decimal fixed point type declaration (in the latter case
3066 -- a fixed point type is created for the base type, and this is the
3067 -- first named subtype).
3069 E_Floating_Point_Type,
3070 -- Floating point type, used for the anonymous base type of the
3071 -- floating point subtype created by a floating point type declaration.
3073 E_Floating_Point_Subtype,
3074 -- Floating point subtype, created by either a floating point subtype
3075 -- or floating point type declaration (in the latter case a floating
3076 -- point type is created for the base type, and this is the first
3084 -- An access type created by an access type declaration with no all
3085 -- keyword present. Note that the predefined type Any_Access, which
3086 -- has E_Access_Type Ekind, is used to label NULL in the upwards pass
3087 -- of type analysis, to be replaced by the true access type in the
3088 -- downwards resolution pass.
3091 -- An access subtype created by a subtype declaration for any access
3092 -- type (whether or not it is a general access type).
3094 E_Access_Attribute_Type,
3095 -- An access type created for an access attribute (such as 'Access,
3096 -- 'Unrestricted_Access and Unchecked_Access)
3099 -- A special internal type used to label allocators and attribute
3100 -- references using 'Access. This is needed because special resolution
3101 -- rules apply to these constructs. On the resolution pass, this type
3102 -- is always replaced by the actual access type, so Gigi should never
3103 -- see types with this Ekind.
3105 E_General_Access_Type,
3106 -- An access type created by an access type declaration with the all
3109 E_Access_Subprogram_Type,
3110 -- An access to subprogram type, created by an access to subprogram
3113 E_Access_Protected_Subprogram_Type,
3114 -- An access to a protected subprogram, created by the corresponding
3115 -- declaration. Values of such a type denote both a protected object
3116 -- and a protected operation within, and have different compile-time
3117 -- and run-time properties than other access to subprograms.
3119 E_Anonymous_Access_Type,
3120 -- An anonymous access type created by an access parameter or access
3123 ---------------------
3124 -- Composite Types --
3125 ---------------------
3128 -- An array type created by an array type declaration. Includes all
3129 -- cases of arrays, except for string types.
3132 -- An array subtype, created by an explicit array subtype declaration,
3133 -- or the use of an anonymous array subtype.
3136 -- A string type, i.e. an array type whose component type is a character
3137 -- type, and for which string literals can thus be written.
3140 -- A string subtype, created by an explicit subtype declaration for a
3141 -- string type, or the use of an anonymous subtype of a string type,
3143 E_String_Literal_Subtype,
3144 -- A special string subtype, used only to describe the type of a string
3145 -- literal (will always be one dimensional, with literal bounds).
3148 -- A class wide type, created by any tagged type declaration (i.e. if
3149 -- a tagged type is declared, the corresponding class type is always
3150 -- created, using this Ekind value).
3152 E_Class_Wide_Subtype,
3153 -- A subtype of a class wide type, created by a subtype declaration
3154 -- used to declare a subtype of a class type.
3157 -- A record type, created by a record type declaration
3160 -- A record subtype, created by a record subtype declaration.
3162 E_Record_Type_With_Private,
3163 -- Used for types defined by a private extension declaration. Includes
3164 -- the fields for both private types and for record types (with the
3165 -- sole exception of Corresponding_Concurrent_Type which is obviously
3166 -- not needed). This entity is considered to be both a record type and
3169 E_Record_Subtype_With_Private,
3170 -- A subtype of a type defined by a private extension declaration.
3173 -- A private type, created by a private type declaration that does
3174 -- not have the keyword limited.
3177 -- A subtype of a private type, created by a subtype declaration used
3178 -- to declare a subtype of a private type.
3180 E_Limited_Private_Type,
3181 -- A limited private type, created by a private type declaration that
3182 -- has the keyword limited.
3184 E_Limited_Private_Subtype,
3185 -- A subtype of a limited private type, created by a subtype declaration
3186 -- used to declare a subtype of a limited private type.
3189 -- An incomplete type, created by an incomplete type declaration
3192 -- A task type, created by a task type declaration. An entity with this
3193 -- Ekind is also created to describe the anonymous type of a task that
3194 -- is created by a single task declaration.
3197 -- A subtype of a task type, created by a subtype declaration used to
3198 -- declare a subtype of a task type.
3201 -- A protected type, created by a protected type declaration. An entity
3202 -- with this Ekind is also created to describe the anonymous type of
3203 -- a protected object created by a single protected declaration.
3205 E_Protected_Subtype,
3206 -- A subtype of a protected type, created by a subtype declaration used
3207 -- to declare a subtype of a protected type.
3214 -- The type of an exception created by an exception declaration
3217 -- This is the designated type of an Access_To_Subprogram. Has type
3218 -- and signature like a subprogram entity, so can appear in calls,
3219 -- which are resolved like regular calls, except that such an entity
3220 -- is not overloadable.
3222 ---------------------------
3223 -- Overloadable Entities --
3224 ---------------------------
3226 E_Enumeration_Literal,
3227 -- An enumeration literal, created by the use of the literal in an
3228 -- enumeration type definition.
3231 -- A function, created by a function declaration or a function body
3232 -- that acts as its own declaration.
3235 -- A predefined operator, appearing in Standard, or an implicitly
3236 -- defined concatenation operator created whenever an array is
3237 -- declared. We do not make normal derived operators explicit in
3238 -- the tree, but the concatenation operators are made explicit.
3241 -- A procedure, created by a procedure declaration or a procedure
3242 -- body that acts as its own declaration.
3245 -- An entry, created by an entry declaration in a task or protected
3248 --------------------
3249 -- Other Entities --
3250 --------------------
3253 -- An entry family, created by an entry family declaration in a
3254 -- task or protected type definition.
3257 -- A block identifier, created by an explicit or implicit label on
3258 -- a block or declare statement.
3260 E_Entry_Index_Parameter,
3261 -- An entry index parameter created by an entry index specification
3262 -- for the body of a protected entry family.
3265 -- An exception created by an exception declaration. The exception
3266 -- itself uses E_Exception for the Ekind, the implicit type that is
3267 -- created to represent its type uses the Ekind E_Exception_Type.
3270 -- A generic function. This is the entity for a generic function
3271 -- created by a generic subprogram declaration.
3274 -- A generic package, this is the entity for a generic package created
3275 -- by a generic package declaration.
3277 E_Generic_Procedure,
3278 -- A generic function. This is the entity for a generic procedure
3279 -- created by a generic subprogram declaration.
3282 -- The defining entity for a label. Note that this is created by the
3283 -- implicit label declaration, not the occurrence of the label itself,
3284 -- which is simply a direct name referring to the label.
3287 -- A loop identifier, created by an explicit or implicit label on a
3291 -- A package, created by a package declaration
3294 -- A package body. This entity serves only limited functions, since
3295 -- most semantic analysis uses the package entity (E_Package). However
3296 -- there are some attributes that are significant for the body entity.
3297 -- For example, collection of exception handlers.
3300 -- A protected object, created by an object declaration that declares
3301 -- an object of a protected type.
3304 -- A protected body. This entity serves almost no function, since all
3305 -- semantic analysis uses the protected entity (E_Protected_Type)
3308 -- A task body. This entity serves almost no function, since all
3309 -- semantic analysis uses the protected entity (E_Task_Type).
3312 -- A subprogram body. Used when a subprogram has a separate declaration
3313 -- to represent the entity for the body. This entity serves almost no
3314 -- function, since all semantic analysis uses the subprogram entity
3315 -- for the declaration (E_Function or E_Procedure).
3318 for Entity_Kind'Size use 8;
3319 -- The data structures in Atree assume this!
3321 --------------------------
3322 -- Subtype Declarations --
3323 --------------------------
3325 -- The above entities are arranged so that they can be conveniently
3326 -- grouped into subtype ranges. Note that for each of the xxx_KInd
3327 -- ranges defined below, there is a corresponding Is_xxx.. predicate
3328 -- which is to be used in preference to direct range tests using the
3329 -- subtype name. However, the subtype names are available for direct
3330 -- use, e.g. as choices in case statements.
3332 subtype Access_Kind is Entity_Kind range
3335 -- E_Access_Attribute_Type
3337 -- E_General_Access_Type
3338 -- E_Access_Subprogram_Type
3339 -- E_Access_Protected_Subprogram_Type
3340 E_Anonymous_Access_Type;
3342 subtype Array_Kind is Entity_Kind range
3347 E_String_Literal_Subtype;
3349 subtype Class_Wide_Kind is Entity_Kind range
3350 E_Class_Wide_Type ..
3351 E_Class_Wide_Subtype;
3353 subtype Composite_Kind is Entity_Kind range
3358 -- E_String_Literal_Subtype
3359 -- E_Class_Wide_Type
3360 -- E_Class_Wide_Subtype
3363 -- E_Record_Type_With_Private
3364 -- E_Record_Subtype_With_Private
3366 -- E_Private_Subtype
3367 -- E_Limited_Private_Type
3368 -- E_Limited_Private_Subtype
3369 -- E_Incomplete_Type
3372 -- E_Protected_Type,
3373 E_Protected_Subtype;
3375 subtype Concurrent_Kind is Entity_Kind range
3378 -- E_Protected_Type,
3379 E_Protected_Subtype;
3381 subtype Concurrent_Body_Kind is Entity_Kind range
3385 subtype Decimal_Fixed_Point_Kind is Entity_Kind range
3386 E_Decimal_Fixed_Point_Type ..
3387 E_Decimal_Fixed_Point_Subtype;
3389 subtype Digits_Kind is Entity_Kind range
3390 E_Decimal_Fixed_Point_Type ..
3391 -- E_Decimal_Fixed_Point_Subtype
3392 -- E_Floating_Point_Type
3393 E_Floating_Point_Subtype;
3395 subtype Discrete_Kind is Entity_Kind range
3396 E_Enumeration_Type ..
3397 -- E_Enumeration_Subtype
3398 -- E_Signed_Integer_Type
3399 -- E_Signed_Integer_Subtype
3400 -- E_Modular_Integer_Type
3401 E_Modular_Integer_Subtype;
3403 subtype Discrete_Or_Fixed_Point_Kind is Entity_Kind range
3404 E_Enumeration_Type ..
3405 -- E_Enumeration_Subtype
3406 -- E_Signed_Integer_Type
3407 -- E_Signed_Integer_Subtype
3408 -- E_Modular_Integer_Type
3409 -- E_Modular_Integer_Subtype
3410 -- E_Ordinary_Fixed_Point_Type
3411 -- E_Ordinary_Fixed_Point_Subtype
3412 -- E_Decimal_Fixed_Point_Type
3413 E_Decimal_Fixed_Point_Subtype;
3415 subtype Elementary_Kind is Entity_Kind range
3416 E_Enumeration_Type ..
3417 -- E_Enumeration_Subtype
3418 -- E_Signed_Integer_Type
3419 -- E_Signed_Integer_Subtype
3420 -- E_Modular_Integer_Type
3421 -- E_Modular_Integer_Subtype
3422 -- E_Ordinary_Fixed_Point_Type
3423 -- E_Ordinary_Fixed_Point_Subtype
3424 -- E_Decimal_Fixed_Point_Type
3425 -- E_Decimal_Fixed_Point_Subtype
3426 -- E_Floating_Point_Type
3427 -- E_Floating_Point_Subtype
3430 -- E_Access_Attribute_Type
3432 -- E_General_Access_Type
3433 -- E_Access_Subprogram_Type
3434 -- E_Access_Protected_Subprogram_Type
3435 E_Anonymous_Access_Type;
3437 subtype Enumeration_Kind is Entity_Kind range
3438 E_Enumeration_Type ..
3439 E_Enumeration_Subtype;
3441 subtype Entry_Kind is Entity_Kind range
3445 subtype Fixed_Point_Kind is Entity_Kind range
3446 E_Ordinary_Fixed_Point_Type ..
3447 -- E_Ordinary_Fixed_Point_Subtype
3448 -- E_Decimal_Fixed_Point_Type
3449 E_Decimal_Fixed_Point_Subtype;
3451 subtype Float_Kind is Entity_Kind range
3452 E_Floating_Point_Type ..
3453 E_Floating_Point_Subtype;
3455 subtype Formal_Kind is Entity_Kind range
3460 subtype Generic_Unit_Kind is Entity_Kind range
3461 E_Generic_Function ..
3462 -- E_Generic_Package,
3463 E_Generic_Procedure;
3465 subtype Incomplete_Or_Private_Kind is Entity_Kind range
3466 E_Record_Type_With_Private ..
3467 -- E_Record_Subtype_With_Private
3469 -- E_Private_Subtype
3470 -- E_Limited_Private_Type
3471 -- E_Limited_Private_Subtype
3474 subtype Integer_Kind is Entity_Kind range
3475 E_Signed_Integer_Type ..
3476 -- E_Signed_Integer_Subtype
3477 -- E_Modular_Integer_Type
3478 E_Modular_Integer_Subtype;
3480 subtype Modular_Integer_Kind is Entity_Kind range
3481 E_Modular_Integer_Type ..
3482 E_Modular_Integer_Subtype;
3484 subtype Named_Kind is Entity_Kind range
3488 subtype Numeric_Kind is Entity_Kind range
3489 E_Signed_Integer_Type ..
3490 -- E_Signed_Integer_Subtype
3491 -- E_Modular_Integer_Type
3492 -- E_Modular_Integer_Subtype
3493 -- E_Ordinary_Fixed_Point_Type
3494 -- E_Ordinary_Fixed_Point_Subtype
3495 -- E_Decimal_Fixed_Point_Type
3496 -- E_Decimal_Fixed_Point_Subtype
3497 -- E_Floating_Point_Type
3498 E_Floating_Point_Subtype;
3500 subtype Object_Kind is Entity_Kind range
3508 -- E_In_Out_Parameter
3509 -- E_Generic_In_Out_Parameter
3510 E_Generic_In_Parameter;
3512 subtype Ordinary_Fixed_Point_Kind is Entity_Kind range
3513 E_Ordinary_Fixed_Point_Type ..
3514 E_Ordinary_Fixed_Point_Subtype;
3516 subtype Overloadable_Kind is Entity_Kind range
3517 E_Enumeration_Literal ..
3523 subtype Private_Kind is Entity_Kind range
3524 E_Record_Type_With_Private ..
3525 -- E_Record_Subtype_With_Private
3527 -- E_Private_Subtype
3528 -- E_Limited_Private_Type
3529 E_Limited_Private_Subtype;
3531 subtype Protected_Kind is Entity_Kind range
3533 E_Protected_Subtype;
3535 subtype Real_Kind is Entity_Kind range
3536 E_Ordinary_Fixed_Point_Type ..
3537 -- E_Ordinary_Fixed_Point_Subtype
3538 -- E_Decimal_Fixed_Point_Type
3539 -- E_Decimal_Fixed_Point_Subtype
3540 -- E_Floating_Point_Type
3541 E_Floating_Point_Subtype;
3543 subtype Record_Kind is Entity_Kind range
3544 E_Class_Wide_Type ..
3545 -- E_Class_Wide_Subtype
3548 -- E_Record_Type_With_Private
3549 E_Record_Subtype_With_Private;
3551 subtype Scalar_Kind is Entity_Kind range
3552 E_Enumeration_Type ..
3553 -- E_Enumeration_Subtype
3554 -- E_Signed_Integer_Type
3555 -- E_Signed_Integer_Subtype
3556 -- E_Modular_Integer_Type
3557 -- E_Modular_Integer_Subtype
3558 -- E_Ordinary_Fixed_Point_Type
3559 -- E_Ordinary_Fixed_Point_Subtype
3560 -- E_Decimal_Fixed_Point_Type
3561 -- E_Decimal_Fixed_Point_Subtype
3562 -- E_Floating_Point_Type
3563 E_Floating_Point_Subtype;
3565 subtype String_Kind is Entity_Kind range
3568 E_String_Literal_Subtype;
3570 subtype Subprogram_Kind is Entity_Kind range
3575 subtype Signed_Integer_Kind is Entity_Kind range
3576 E_Signed_Integer_Type ..
3577 E_Signed_Integer_Subtype;
3579 subtype Task_Kind is Entity_Kind range
3583 subtype Type_Kind is Entity_Kind range
3584 E_Enumeration_Type ..
3585 -- E_Enumeration_Subtype
3586 -- E_Signed_Integer_Type
3587 -- E_Signed_Integer_Subtype
3588 -- E_Modular_Integer_Type
3589 -- E_Modular_Integer_Subtype
3590 -- E_Ordinary_Fixed_Point_Type
3591 -- E_Ordinary_Fixed_Point_Subtype
3592 -- E_Decimal_Fixed_Point_Type
3593 -- E_Decimal_Fixed_Point_Subtype
3594 -- E_Floating_Point_Type
3595 -- E_Floating_Point_Subtype
3598 -- E_Access_Attribute_Type
3599 -- E_Allocator_Type,
3600 -- E_General_Access_Type
3601 -- E_Access_Subprogram_Type,
3602 -- E_Access_Protected_Subprogram_Type
3603 -- E_Anonymous_Access_Type
3608 -- E_String_Literal_Subtype
3609 -- E_Class_Wide_Subtype
3610 -- E_Class_Wide_Type
3613 -- E_Record_Type_With_Private
3614 -- E_Record_Subtype_With_Private
3616 -- E_Private_Subtype
3617 -- E_Limited_Private_Type
3618 -- E_Limited_Private_Subtype
3619 -- E_Incomplete_Type
3623 -- E_Protected_Subtype
3627 --------------------------------------------------------
3628 -- Description of Defined Attributes for Entity_Kinds --
3629 --------------------------------------------------------
3631 -- For each enumeration value defined in Entity_Kind we list all the
3632 -- attributes defined in Einfo which can legally be applied to an entity
3633 -- of that kind. The implementation of the attribute functions (and for
3634 -- non-synthesized attributes, or the corresponding set procedures) are
3635 -- in the Einfo body.
3637 -- The following attributes apply to all entities
3642 -- Next_Entity (Node2)
3646 -- First_Rep_Item (Node6)
3647 -- Freeze_Node (Node7)
3649 -- Address_Taken (Flag104)
3650 -- Debug_Info_Off (Flag166)
3651 -- Has_Convention_Pragma (Flag119)
3652 -- Has_Delayed_Freeze (Flag18)
3653 -- Has_Fully_Qualified_Name (Flag173)
3654 -- Has_Gigi_Rep_Item (Flag82)
3655 -- Has_Homonym (Flag56)
3656 -- Has_Pragma_Elaborate_Body (Flag150)
3657 -- Has_Pragma_Inline (Flag157)
3658 -- Has_Private_Declaration (Flag155)
3659 -- Has_Qualified_Name (Flag161)
3660 -- Has_Unknown_Discriminants (Flag72)
3661 -- Is_Bit_Packed_Array (Flag122)
3662 -- Is_Child_Unit (Flag73)
3663 -- Is_Compilation_Unit (Flag149)
3664 -- Is_Completely_Hidden (Flag103)
3665 -- Is_Discrim_SO_Function (Flag176)
3666 -- Is_Dispatching_Operation (Flag6)
3667 -- Is_Exported (Flag99)
3668 -- Is_First_Subtype (Flag70)
3669 -- Is_Formal_Subprogram (Flag111)
3670 -- Is_Generic_Instance (Flag130)
3671 -- Is_Hidden (Flag57)
3672 -- Is_Hidden_Open_Scope (Flag171)
3673 -- Is_Immediately_Visible (Flag7)
3674 -- Is_Imported (Flag24)
3675 -- Is_Inlined (Flag11)
3676 -- Is_Internal (Flag17)
3677 -- Is_Itype (Flag91)
3678 -- Is_Known_Valid (Flag170)
3679 -- Is_Limited_Composite (Flag106)
3680 -- Is_Limited_Record (Flag25)
3681 -- Is_Package_Body_Entity (Flag160)
3682 -- Is_Packed_Array_Type (Flag138)
3683 -- Is_Potentially_Use_Visible (Flag9)
3684 -- Is_Preelaborated (Flag59)
3685 -- Is_Public (Flag10)
3687 -- Is_Remote_Call_Interface (Flag62)
3688 -- Is_Remote_Types (Flag61)
3689 -- Is_Shared_Passive (Flag60)
3690 -- Is_Statically_Allocated (Flag28)
3691 -- Is_Unchecked_Union (Flag117)
3692 -- Is_VMS_Exception (Flag133)
3693 -- Materialize_Entity (Flag168)
3694 -- Needs_Debug_Info (Flag147)
3695 -- Referenced (Flag156)
3696 -- Suppress_Access_Checks (Flag31)
3697 -- Suppress_Accessibility_Checks (Flag32)
3698 -- Suppress_Discriminant_Checks (Flag33)
3699 -- Suppress_Division_Checks (Flag34)
3700 -- Suppress_Elaboration_Checks (Flag35)
3701 -- Suppress_Elaboration_Warnings (Flag148)
3702 -- Suppress_Index_Checks (Flag36)
3703 -- Suppress_Length_Checks (Flag37)
3704 -- Suppress_Overflow_Checks (Flag38)
3705 -- Suppress_Range_Checks (Flag39)
3706 -- Suppress_Storage_Checks (Flag40)
3707 -- Suppress_Style_Checks (Flag165)
3708 -- Suppress_Tag_Checks (Flag41)
3710 -- Declaration_Node (synth)
3711 -- Enclosing_Dynamic_Scope (synth)
3712 -- Has_Foreign_Convention (synth)
3713 -- Is_Dynamic_Scope (synth)
3714 -- Is_Generic_Unit (synth)
3715 -- Is_Limited_Type (synth)
3716 -- Underlying_Type (synth)
3717 -- all classification attributes (synth)
3719 -- The following list of access functions applies to all entities for
3720 -- types and subtypes. References to this list appear subsequently as
3721 -- as "(plus type attributes)" for each appropriate Entity_Kind.
3723 -- Associated_Node_For_Itype (Node8)
3724 -- Class_Wide_Type (Node9)
3725 -- Referenced_Object (Node10)
3726 -- Full_View (Node11)
3729 -- Alignment (Uint14)
3731 -- Depends_On_Private (Flag14)
3732 -- Discard_Names (Flag88)
3733 -- Finalize_Storage_Only (Flag158) (base type only)
3734 -- From_With_Type (Flag159)
3735 -- Has_Aliased_Components (Flag135)
3736 -- Has_Alignment_Clause (Flag46)
3737 -- Has_Atomic_Components (Flag86) (base type only)
3738 -- Has_Complex_Representation (Flag140) (base type only)
3739 -- Has_Discriminants (Flag5)
3740 -- Has_Non_Standard_Rep (Flag75)
3741 -- Has_Object_Size_Clause (Flag172)
3742 -- Has_Primitive_Operations (Flag120) (base type only)
3743 -- Has_Size_Clause (Flag29)
3744 -- Has_Specified_Layout (Flag100) (base type only)
3745 -- Has_Task (Flag30) (base type only)
3746 -- Has_Unchecked_Union (Flag123) (base type only)
3747 -- Has_Volatile_Components (Flag87) (base type only)
3749 -- Is_Abstract (Flag19)
3750 -- Is_Asynchronous (Flag81)
3751 -- Is_Atomic (Flag85)
3752 -- Is_Constr_Subt_For_U_Nominal (Flag80)
3753 -- Is_Constr_Subt_For_UN_Aliased (Flag141)
3754 -- Is_Controlled (Flag42) (base type only)
3755 -- Is_Eliminated (Flag124)
3756 -- Is_Frozen (Flag4)
3757 -- Is_Generic_Actual_Type (Flag94)
3758 -- Is_Generic_Type (Flag13)
3759 -- Is_Non_Static_Subtype (Flag109)
3760 -- Is_Packed (Flag51) (base type only)
3761 -- Is_Private_Composite (Flag107)
3762 -- Is_Renaming_Of_Object (Flag112)
3763 -- Is_Tagged_Type (Flag55)
3764 -- Is_Unsigned_Type (Flag144)
3765 -- Is_Volatile (Flag16)
3766 -- Size_Depends_On_Discriminant (Flag177)
3767 -- Size_Known_At_Compile_Time (Flag92)
3768 -- Strict_Alignment (Flag145)
3769 -- Suppress_Init_Proc (Flag105) (base type only)
3771 -- Alignment_Clause (synth)
3772 -- Ancestor_Subtype (synth)
3773 -- Base_Type (synth)
3774 -- First_Subtype (synth)
3775 -- Has_Private_Ancestor (synth)
3776 -- Implementation_Base_Type (synth)
3777 -- Is_By_Copy_Type (synth)
3778 -- Is_By_Reference_Type (synth)
3779 -- Is_Return_By_Reference_Type (synth)
3780 -- Root_Type (synth)
3781 -- Size_Clause (synth)
3783 ------------------------------------------
3784 -- Applicable attributes by entity kind --
3785 ------------------------------------------
3787 -- E_Access_Protected_Subprogram_Type
3788 -- Equivalent_Type (Node18)
3789 -- Directly_Designated_Type (Node20)
3790 -- Needs_No_Actuals (Flag22)
3791 -- (plus type attributes)
3793 -- E_Access_Subprogram_Type
3794 -- Equivalent_Type (Node18) (remote types only)
3795 -- Directly_Designated_Type (Node20)
3796 -- Needs_No_Actuals (Flag22)
3797 -- (plus type attributes)
3801 -- Storage_Size_Variable (Node15) (root type only)
3802 -- Master_Id (Node17)
3803 -- Directly_Designated_Type (Node20)
3804 -- Associated_Storage_Pool (Node22)
3805 -- Associated_Final_Chain (Node23)
3806 -- Has_Pragma_Controlled (Flag27) (base type only)
3807 -- Has_Storage_Size_Clause (Flag23) (root type only)
3808 -- Is_Access_Constant (Flag69)
3809 -- No_Pool_Assigned (Flag131) (root type only)
3810 -- (plus type attributes)
3812 -- E_Access_Attribute_Type
3813 -- Directly_Designated_Type (Node20)
3814 -- (plus type attributes)
3817 -- Directly_Designated_Type (Node20)
3818 -- (plus type attributes)
3820 -- E_Anonymous_Access_Type
3821 -- Storage_Size_Variable (Node15) ??? is this needed ???
3822 -- Directly_Designated_Type (Node20)
3823 -- (plus type attributes)
3827 -- First_Index (Node17)
3828 -- Related_Array_Object (Node19)
3829 -- Component_Type (Node20) (base type only)
3830 -- Component_Size (Uint22) (base type only)
3831 -- Packed_Array_Type (Node23)
3832 -- Component_Alignment (special) (base type only)
3833 -- Has_Component_Size_Clause (Flag68) (base type only)
3834 -- Has_Controlled_Component (Flag43) (base type only)
3835 -- Has_Pragma_Pack (Flag121) (base type only)
3836 -- Is_Aliased (Flag15)
3837 -- Is_Constrained (Flag12)
3838 -- Next_Index (synth)
3839 -- Number_Dimensions (synth)
3840 -- (plus type attributes)
3843 -- Block_Node (Node11)
3844 -- First_Entity (Node17)
3845 -- Last_Entity (Node20)
3846 -- Delay_Cleanups (Flag114)
3847 -- Discard_Names (Flag88)
3848 -- Finalization_Chain_Entity (Node19)
3849 -- Scope_Depth_Value (Uint22)
3850 -- Scope_Depth (synth)
3851 -- Entry_Cancel_Parameter (Node23)
3852 -- Has_Master_Entity (Flag21)
3853 -- Has_Nested_Block_With_Handler (Flag101)
3854 -- Sec_Stack_Needed_For_Return (Flag167)
3855 -- Uses_Sec_Stack (Flag95)
3857 -- E_Class_Wide_Type
3858 -- E_Class_Wide_Subtype
3859 -- Cloned_Subtype (Node16) (subtype case only)
3860 -- First_Entity (Node17)
3861 -- Equivalent_Type (Node18) (always Empty in type case)
3862 -- Last_Entity (Node20)
3863 -- Has_Controlled_Component (Flag43) (base type only)
3864 -- First_Component (synth)
3865 -- (plus type attributes)
3868 -- Normalized_First_Bit (Uint8)
3869 -- Normalized_Position (Uint9)
3870 -- Normalized_Position_Max (Uint10)
3871 -- Component_Bit_Offset (Uint11)
3873 -- Component_Clause (Node13)
3874 -- DT_Entry_Count (Uint15)
3875 -- Entry_Formal (Node16)
3877 -- Renamed_Object (Node18) (always Empty)
3878 -- Discriminant_Checking_Func (Node20)
3879 -- Interface_Name (Node21) (JGNAT usage only)
3880 -- Original_Record_Component (Node22)
3881 -- Protected_Operation (Node23)
3882 -- Has_Biased_Representation (Flag139)
3883 -- Has_Per_Object_Constraint (Flag154)
3884 -- Is_Atomic (Flag85)
3886 -- Is_Volatile (Flag16)
3887 -- Next_Component (synth)
3888 -- Is_Protected_Private (synth)
3892 -- Size_Check_Code (Node9)
3893 -- Discriminal_Link (Node10) (discriminals only)
3894 -- Full_View (Node11)
3896 -- Alignment (Uint14)
3897 -- Actual_Subtype (Node17)
3898 -- Renamed_Object (Node18)
3899 -- Interface_Name (Node21)
3900 -- Has_Alignment_Clause (Flag46)
3901 -- Has_Atomic_Components (Flag86)
3902 -- Has_Biased_Representation (Flag139)
3903 -- Has_Size_Clause (Flag29)
3904 -- Has_Volatile_Components (Flag87)
3905 -- Is_Atomic (Flag85)
3906 -- Is_Eliminated (Flag124)
3907 -- Is_Psected (Flag153)
3908 -- Is_True_Constant (Flag163)
3909 -- Is_Volatile (Flag16)
3910 -- Not_Source_Assigned (Flag115)
3911 -- Address_Clause (synth)
3912 -- Alignment_Clause (synth)
3913 -- Constant_Value (synth)
3914 -- Size_Clause (synth)
3916 -- E_Decimal_Fixed_Point_Type
3917 -- E_Decimal_Fixed_Subtype
3918 -- Scale_Value (Uint15)
3919 -- Digits_Value (Uint17)
3920 -- Scalar_Range (Node20)
3921 -- Delta_Value (Ureal18)
3922 -- Small_Value (Ureal21)
3923 -- Has_Machine_Radix_Clause (Flag83)
3924 -- Machine_Radix_10 (Flag84)
3925 -- Type_Low_Bound (synth)
3926 -- Type_High_Bound (synth)
3927 -- (plus type attributes)
3930 -- Normalized_First_Bit (Uint8)
3931 -- Normalized_Position (Uint9)
3932 -- Normalized_Position_Max (Uint10)
3933 -- Component_Bit_Offset (Uint11)
3935 -- Component_Clause (Node13)
3936 -- Discriminant_Number (Uint15)
3937 -- Discriminal (Node17)
3938 -- Renamed_Object (Node18) (always Empty)
3939 -- Corresponding_Discriminant (Node19)
3940 -- Discriminant_Default_Value (Node20)
3941 -- Interface_Name (Node21) (JGNAT usage only)
3942 -- Original_Record_Component (Node22)
3943 -- CR_Discriminant (Node23)
3944 -- Next_Discriminant (synth)
3945 -- Next_Girder_Discriminant (synth)
3949 -- Protected_Body_Subprogram (Node11)
3950 -- Barrier_Function (Node12)
3951 -- Entry_Parameters_Type (Node15)
3952 -- First_Entity (Node17)
3953 -- Alias (Node18) (Entry only. Always empty)
3954 -- Finalization_Chain_Entity (Node19)
3955 -- Last_Entity (Node20)
3956 -- Accept_Address (Elist21)
3957 -- Scope_Depth_Value (Uint22)
3958 -- Scope_Depth (synth)
3959 -- Privals_Chain (Elist23) (for a protected entry)
3960 -- Default_Expressions_Processed (Flag108)
3961 -- Entry_Accepted (Flag152)
3962 -- Is_AST_Entry (Flag132) (for entry only)
3963 -- Needs_No_Actuals (Flag22)
3964 -- Sec_Stack_Needed_For_Return (Flag167)
3965 -- Uses_Sec_Stack (Flag95)
3966 -- Address_Clause (synth)
3967 -- First_Formal (synth)
3968 -- Entry_Index_Type (synth)
3969 -- Number_Formals (synth)
3971 -- E_Entry_Index_Parameter
3972 -- Entry_Index_Constant (Node18)
3974 -- E_Enumeration_Literal
3975 -- Enumeration_Pos (Uint11)
3976 -- Enumeration_Rep (Uint12)
3977 -- Debug_Renaming_Link (Node13)
3979 -- Enumeration_Rep_Expr (Node22)
3980 -- Next_Literal (synth)
3982 -- E_Enumeration_Type
3983 -- E_Enumeration_Subtype
3984 -- Lit_Indexes (Node15) (root type only)
3985 -- Lit_Strings (Node16) (root type only)
3986 -- First_Literal (Node17)
3987 -- Scalar_Range (Node20)
3988 -- Enum_Pos_To_Rep (Node23) (type only, not subtype)
3989 -- Has_Biased_Representation (Flag139)
3990 -- Has_Enumeration_Rep_Clause (Flag66)
3991 -- Nonzero_Is_True (Flag162) (base type only)
3992 -- Type_Low_Bound (synth)
3993 -- Type_High_Bound (synth)
3994 -- (plus type attributes)
3997 -- Renamed_Entity (Node18)
3998 -- Register_Exception_Call (Node20)
3999 -- Interface_Name (Node21)
4000 -- Exception_Code (Uint22)
4001 -- Discard_Names (Flag88)
4002 -- Is_VMS_Exception (Flag133)
4005 -- Equivalent_Type (Node18)
4006 -- (plus type attributes)
4008 -- E_Floating_Point_Type
4009 -- E_Floating_Point_Subtype
4010 -- Digits_Value (Uint17)
4011 -- Type_Low_Bound (synth)
4012 -- Scalar_Range (Node20)
4013 -- Type_High_Bound (synth)
4014 -- (plus type attributes)
4017 -- E_Generic_Function
4018 -- Mechanism (Uint8) (returns Mechanism_Type)
4019 -- Renaming_Map (Uint9)
4020 -- Handler_Records (List10) (non-generic case only)
4021 -- Protected_Body_Subprogram (Node11)
4022 -- Next_Inlined_Subprogram (Node12)
4023 -- Corresponding_Equality (Node13) (implicit /= only)
4024 -- Elaboration_Entity (Node13) (all other cases)
4025 -- First_Optional_Parameter (Node14) (non-generic case only)
4026 -- DT_Position (Uint15)
4027 -- DTC_Entity (Node16)
4028 -- First_Entity (Node17)
4029 -- Alias (Node18) (non-generic case only)
4030 -- Renamed_Entity (Node18) (generic case only)
4031 -- Finalization_Chain_Entity (Node19)
4032 -- Last_Entity (Node20)
4033 -- Interface_Name (Node21)
4034 -- Scope_Depth_Value (Uint22)
4035 -- Scope_Depth (synth)
4036 -- Generic_Renamings (Elist23) (for an instance)
4037 -- Inner_Instances (Elist23) (for a generic function)
4038 -- Privals_Chain (Elist23) (for a protected function)
4039 -- Elaboration_Entity_Required (Flag174)
4040 -- Function_Returns_With_DSP (Flag169)
4041 -- Default_Expressions_Processed (Flag108)
4042 -- Delay_Cleanups (Flag114)
4043 -- Delay_Subprogram_Descriptors (Flag50)
4044 -- Discard_Names (Flag88)
4045 -- Elaborate_All_Desirable (Flag146)
4046 -- Has_Completion (Flag26)
4047 -- Has_Controlling_Result (Flag98)
4048 -- Has_Master_Entity (Flag21)
4049 -- Has_Missing_Return (Flag142)
4050 -- Has_Nested_Block_With_Handler (Flag101)
4051 -- Has_Recursive_Call (Flag143)
4052 -- Has_Subprogram_Descriptor (Flag93)
4053 -- Is_Abstract (Flag19)
4054 -- Is_Called (Flag102) (non-generic case only)
4055 -- Is_Constructor (Flag76)
4056 -- Is_Destructor (Flag77)
4057 -- Is_Discrim_SO_Function (Flag176)
4058 -- Is_Eliminated (Flag124)
4059 -- Is_Instantiated (Flag126) (generic case only)
4060 -- Is_Intrinsic_Subprogram (Flag64)
4061 -- Is_Machine_Code_Subprogram (Flag137) (non-generic case only)
4062 -- Is_Private_Descendant (Flag53)
4064 -- Is_Visible_Child_Unit (Flag116)
4065 -- Needs_No_Actuals (Flag22)
4066 -- Return_Present (Flag54)
4067 -- Returns_By_Ref (Flag90)
4068 -- Sec_Stack_Needed_For_Return (Flag167)
4069 -- Uses_Sec_Stack (Flag95)
4070 -- Address_Clause (synth)
4071 -- First_Formal (synth)
4072 -- Number_Formals (synth)
4074 -- E_General_Access_Type
4075 -- Storage_Size_Variable (Node15) (base type only)
4076 -- Master_Id (Node17)
4077 -- Directly_Designated_Type (Node20)
4078 -- Associated_Storage_Pool (Node22)
4079 -- Associated_Final_Chain (Node23)
4080 -- (plus type attributes)
4082 -- E_Generic_In_Parameter
4083 -- E_Generic_In_Out_Parameter
4084 -- Entry_Component (Node11)
4085 -- Actual_Subtype (Node17)
4086 -- Renamed_Object (Node18) (always Empty)
4087 -- Default_Value (Node20)
4088 -- Protected_Formal (Node22)
4089 -- Is_Controlling_Formal (Flag97)
4090 -- Is_Entry_Formal (Flag52)
4091 -- Parameter_Mode (synth)
4093 -- E_Incomplete_Type
4094 -- Private_Dependents (Elist18)
4095 -- Discriminant_Constraint (Elist21)
4096 -- Girder_Constraint (Elist23)
4097 -- First_Discriminant (synth)
4098 -- First_Girder_Discriminant (synth)
4099 -- (plus type attributes)
4102 -- E_In_Out_Parameter
4104 -- Mechanism (Uint8) (returns Mechanism_Type)
4105 -- Discriminal_Link (Node10) (discriminals only)
4106 -- Entry_Component (Node11)
4108 -- Extra_Accessibility (Node13)
4109 -- Alignment (Uint14)
4110 -- Extra_Formal (Node15)
4111 -- Unset_Reference (Node16)
4112 -- Actual_Subtype (Node17)
4113 -- Renamed_Object (Node18)
4114 -- Spec_Entity (Node19)
4115 -- Default_Value (Node20)
4116 -- Default_Expr_Function (Node21)
4117 -- Protected_Formal (Node22)
4118 -- Extra_Constrained (Node23)
4119 -- Is_Controlling_Formal (Flag97)
4120 -- Is_Entry_Formal (Flag52)
4121 -- Is_Optional_Parameter (Flag134)
4122 -- Not_Source_Assigned (Flag115)
4123 -- Parameter_Mode (synth)
4126 -- Enclosing_Scope (Node18)
4127 -- Reachable (Flag49)
4129 -- E_Limited_Private_Type
4130 -- E_Limited_Private_Subtype
4131 -- First_Entity (Node17)
4132 -- Private_Dependents (Elist18)
4133 -- Underlying_Full_View (Node19)
4134 -- Last_Entity (Node20)
4135 -- Discriminant_Constraint (Elist21)
4136 -- Private_View (Node22)
4137 -- Girder_Constraint (Elist23)
4138 -- Has_Completion (Flag26)
4139 -- Has_Completion_In_Body (Flag71)
4140 -- First_Discriminant (synth)
4141 -- First_Girder_Discriminant (synth)
4142 -- (plus type attributes)
4145 -- Has_Exit (Flag47)
4146 -- Has_Master_Entity (Flag21)
4147 -- Has_Nested_Block_With_Handler (Flag101)
4149 -- E_Modular_Integer_Type
4150 -- E_Modular_Integer_Subtype
4151 -- Modulus (Uint17) (base type only)
4152 -- Scalar_Range (Node20)
4153 -- Non_Binary_Modulus (Flag58) (base type only)
4154 -- Has_Biased_Representation (Flag139)
4155 -- Type_Low_Bound (synth)
4156 -- Type_High_Bound (synth)
4157 -- (plus type attributes)
4160 -- Constant_Value (synth)
4163 -- Constant_Value (synth)
4166 -- First_Entity (Node17)
4168 -- Last_Entity (Node20)
4169 -- Is_Machine_Code_Subprogram (Flag137)
4171 -- Is_Intrinsic_Subprogram (Flag64)
4172 -- Default_Expressions_Processed (Flag108)
4174 -- E_Ordinary_Fixed_Point_Type
4175 -- E_Ordinary_Fixed_Point_Subtype
4176 -- Delta_Value (Ureal18)
4177 -- Scalar_Range (Node20)
4178 -- Small_Value (Ureal21)
4179 -- Has_Small_Clause (Flag67)
4180 -- Type_Low_Bound (synth)
4181 -- Type_High_Bound (synth)
4182 -- (plus type attributes)
4185 -- E_Generic_Package
4186 -- Dependent_Instances (Elist8) (for an instance)
4187 -- Renaming_Map (Uint9)
4188 -- Handler_Records (List10) (non-generic case only)
4189 -- Associated_Formal_Package (Node12)
4190 -- Elaboration_Entity (Node13)
4191 -- Shadow_Entities (List14)
4192 -- Related_Instance (Node15) (non-generic case only)
4193 -- First_Private_Entity (Node16)
4194 -- First_Entity (Node17)
4195 -- Renamed_Entity (Node18)
4196 -- Body_Entity (Node19)
4197 -- Last_Entity (Node20)
4198 -- Interface_Name (Node21)
4199 -- Scope_Depth_Value (Uint22)
4200 -- Scope_Depth (synth)
4201 -- Generic_Renamings (Elist23) (for an instance)
4202 -- Inner_Instances (Elist23) (generic case only)
4203 -- Delay_Subprogram_Descriptors (Flag50)
4204 -- Discard_Names (Flag88)
4205 -- Elaborate_All_Desirable (Flag146)
4206 -- Elaboration_Entity_Required (Flag174)
4207 -- From_With_Type (Flag159)
4208 -- Has_All_Calls_Remote (Flag79)
4209 -- Has_Completion (Flag26)
4210 -- Has_Forward_Instantiation (Flag175)
4211 -- Has_Master_Entity (Flag21)
4212 -- Has_Subprogram_Descriptor (Flag93)
4213 -- In_Package_Body (Flag48)
4214 -- In_Private_Part (Flag45)
4216 -- Is_Instantiated (Flag126)
4217 -- Is_Private_Descendant (Flag53)
4218 -- Is_Visible_Child_Unit (Flag116)
4219 -- Is_Wrapper_Package (synth) (non-generic case only)
4222 -- Handler_Records (List10) (non-generic case only)
4223 -- First_Entity (Node17)
4224 -- Spec_Entity (Node19)
4225 -- Last_Entity (Node20)
4226 -- Scope_Depth_Value (Uint22)
4227 -- Scope_Depth (synth)
4228 -- Delay_Subprogram_Descriptors (Flag50)
4229 -- Has_Subprogram_Descriptor (Flag93)
4232 -- E_Private_Subtype
4233 -- Primitive_Operations (Elist15)
4234 -- First_Entity (Node17)
4235 -- Private_Dependents (Elist18)
4236 -- Underlying_Full_View (Node19)
4237 -- Last_Entity (Node20)
4238 -- Discriminant_Constraint (Elist21)
4239 -- Private_View (Node22)
4240 -- Girder_Constraint (Elist23)
4241 -- Has_Completion (Flag26)
4242 -- Has_Completion_In_Body (Flag71)
4243 -- Is_Controlled (Flag42) (base type only)
4244 -- Is_For_Access_Subtype (Flag118) (subtype only)
4245 -- First_Discriminant (synth)
4246 -- First_Girder_Discriminant (synth)
4247 -- (plus type attributes)
4250 -- E_Generic_Procedure
4251 -- Renaming_Map (Uint9)
4252 -- Handler_Records (List10) (non-generic case only)
4253 -- Protected_Body_Subprogram (Node11)
4254 -- Next_Inlined_Subprogram (Node12)
4255 -- Elaboration_Entity (Node13)
4256 -- First_Optional_Parameter (Node14) (non-generic case only)
4257 -- DT_Position (Uint15)
4258 -- DTC_Entity (Node16)
4259 -- First_Entity (Node17)
4260 -- Alias (Node18) (non-generic case only)
4261 -- Renamed_Entity (Node18) (generic case only)
4262 -- Finalization_Chain_Entity (Node19)
4263 -- Last_Entity (Node20)
4264 -- Interface_Name (Node21)
4265 -- Scope_Depth_Value (Uint22)
4266 -- Scope_Depth (synth)
4267 -- Generic_Renamings (Elist23) (for an instance)
4268 -- Inner_Instances (Elist23) (for a generic procedure)
4269 -- Privals_Chain (Elist23) (for a protected procedure)
4270 -- Elaboration_Entity_Required (Flag174)
4271 -- Function_Returns_With_DSP (Flag169) (always False for procedure)
4272 -- Default_Expressions_Processed (Flag108)
4273 -- Delay_Cleanups (Flag114)
4274 -- Delay_Subprogram_Descriptors (Flag50)
4275 -- Discard_Names (Flag88)
4276 -- Elaborate_All_Desirable (Flag146)
4277 -- Has_Completion (Flag26)
4278 -- Has_Master_Entity (Flag21)
4279 -- Has_Nested_Block_With_Handler (Flag101)
4280 -- Has_Subprogram_Descriptor (Flag93)
4281 -- Is_Visible_Child_Unit (Flag116)
4282 -- Is_Abstract (Flag19)
4283 -- Is_Asynchronous (Flag81)
4284 -- Is_Called (Flag102) (non-generic subprogram)
4285 -- Is_Constructor (Flag76)
4286 -- Is_Destructor (Flag77)
4287 -- Is_Eliminated (Flag124)
4288 -- Is_Instantiated (Flag126) (generic case only)
4289 -- Is_Interrupt_Handler (Flag89)
4290 -- Is_Intrinsic_Subprogram (Flag64)
4291 -- Is_Machine_Code_Subprogram (Flag137) (non-generic case only)
4292 -- Is_Null_Init_Proc (Flag178)
4293 -- Is_Private_Descendant (Flag53)
4295 -- Is_Valued_Procedure (Flag127)
4296 -- Is_Visible_Child_Unit (Flag116)
4297 -- Needs_No_Actuals (Flag22)
4298 -- No_Return (Flag113)
4299 -- Sec_Stack_Needed_For_Return (Flag167)
4300 -- Address_Clause (synth)
4301 -- First_Formal (synth)
4302 -- Number_Formals (synth)
4305 -- Object_Ref (Node17)
4306 -- (any others??? First/Last Entity, Scope_Depth???)
4308 -- E_Protected_Object
4311 -- E_Protected_Subtype
4312 -- Entry_Bodies_Array (Node15)
4313 -- First_Private_Entity (Node16)
4314 -- First_Entity (Node17)
4315 -- Corresponding_Record_Type (Node18)
4316 -- Finalization_Chain_Entity (Node19)
4317 -- Last_Entity (Node20)
4318 -- Discriminant_Constraint (Elist21)
4319 -- Scope_Depth_Value (Uint22)
4320 -- Scope_Depth (synth)
4321 -- Girder_Constraint (Elist23)
4322 -- Has_Controlled_Component (Flag43) (base type only)
4323 -- Has_Interrupt_Handler (synth)
4324 -- Sec_Stack_Needed_For_Return (Flag167) ???
4325 -- Uses_Sec_Stack (Flag95) ???
4326 -- Has_Entries (synth)
4327 -- Number_Entries (synth)
4331 -- Primitive_Operations (Elist15)
4332 -- Access_Disp_Table (Node16) (base type only)
4333 -- Cloned_Subtype (Node16) (subtype case only)
4334 -- First_Entity (Node17)
4335 -- Corresponding_Concurrent_Type (Node18)
4336 -- Parent_Subtype (Node19)
4337 -- Last_Entity (Node20)
4338 -- Discriminant_Constraint (Elist21)
4339 -- Corresponding_Remote_Type (Node22) (base type only)
4340 -- Girder_Constraint (Elist23)
4341 -- Component_Alignment (special) (base type only)
4342 -- C_Pass_By_Copy (Flag125) (base type only)
4343 -- Has_Controlled_Component (Flag43) (base type only)
4344 -- Has_External_Tag_Rep_Clause (Flag110)
4345 -- Has_Record_Rep_Clause (Flag65)
4346 -- Is_Concurrent_Record_Type (Flag20)
4347 -- Is_Constrained (Flag12)
4348 -- Is_Controlled (Flag42) (base type only)
4349 -- Reverse_Bit_Order (Flag164) (base type only)
4350 -- First_Component (synth)
4351 -- First_Discriminant (synth)
4352 -- First_Girder_Discriminant (synth)
4353 -- Tag_Component (synth)
4354 -- (plus type attributes)
4356 -- E_Record_Type_With_Private
4357 -- E_Record_Subtype_With_Private
4358 -- Primitive_Operations (Elist15)
4359 -- Access_Disp_Table (Node16) (base type only)
4360 -- First_Entity (Node17)
4361 -- Private_Dependents (Elist18)
4362 -- Underlying_Full_View (Node19)
4363 -- Last_Entity (Node20)
4364 -- Discriminant_Constraint (Elist21)
4365 -- Private_View (Node22)
4366 -- Girder_Constraint (Elist23)
4367 -- Has_Completion (Flag26)
4368 -- Has_Completion_In_Body (Flag71)
4369 -- Has_Controlled_Component (Flag43) (base type only)
4370 -- Has_Record_Rep_Clause (Flag65)
4371 -- Has_External_Tag_Rep_Clause (Flag110)
4372 -- Is_Concurrent_Record_Type (Flag20)
4373 -- Is_Constrained (Flag12)
4374 -- Is_Controlled (Flag42) (base type only)
4375 -- Reverse_Bit_Order (Flag164) (base type only)
4376 -- First_Component (synth)
4377 -- First_Discriminant (synth)
4378 -- First_Girder_Discriminant (synth)
4379 -- Tag_Component (synth)
4380 -- (plus type attributes)
4382 -- E_Signed_Integer_Type
4383 -- E_Signed_Integer_Subtype
4384 -- Scalar_Range (Node20)
4385 -- Has_Biased_Representation (Flag139)
4386 -- Type_Low_Bound (synth)
4387 -- Type_High_Bound (synth)
4388 -- (plus type attributes)
4392 -- First_Index (Node17)
4393 -- Component_Type (Node20) (base type only)
4394 -- Is_Constrained (Flag12)
4395 -- Next_Index (synth)
4396 -- Number_Dimensions (synth)
4397 -- (plus type attributes)
4399 -- E_String_Literal_Subtype
4400 -- String_Literal_Low_Bound (Node15)
4401 -- String_Literal_Length (Uint16)
4402 -- First_Index (Node17) (always Empty)
4403 -- Component_Type (Node20) (base type only)
4404 -- Packed_Array_Type (Node23)
4405 -- (plus type attributes)
4407 -- E_Subprogram_Body
4408 -- First_Entity (Node17)
4409 -- Last_Entity (Node20)
4410 -- Scope_Depth_Value (Uint22)
4411 -- Scope_Depth (synth)
4413 -- E_Subprogram_Type
4414 -- Directly_Designated_Type (Node20)
4415 -- First_Formal (synth)
4416 -- Number_Formals (synth)
4417 -- Function_Returns_With_DSP (Flag169)
4418 -- (plus type attributes)
4421 -- (any others??? First/Last Entity, Scope_Depth???)
4425 -- Storage_Size_Variable (Node15) (base type only)
4426 -- First_Private_Entity (Node16)
4427 -- First_Entity (Node17)
4428 -- Corresponding_Record_Type (Node18)
4429 -- Finalization_Chain_Entity (Node19)
4430 -- Last_Entity (Node20)
4431 -- Discriminant_Constraint (Elist21)
4432 -- Scope_Depth_Value (Uint22)
4433 -- Scope_Depth (synth)
4434 -- Girder_Constraint (Elist23)
4435 -- Delay_Cleanups (Flag114)
4436 -- Has_Master_Entity (Flag21)
4437 -- Has_Storage_Size_Clause (Flag23) (base type only)
4438 -- Uses_Sec_Stack (Flag95) ???
4439 -- Sec_Stack_Needed_For_Return (Flag167) ???
4440 -- Has_Entries (synth)
4441 -- Number_Entries (synth)
4442 -- (plus type attributes)
4445 -- Hiding_Loop_Variable (Node8)
4446 -- Size_Check_Code (Node9)
4448 -- Extra_Accessibility (Node13)
4449 -- Alignment (Uint14)
4450 -- Shared_Var_Read_Proc (Node15)
4451 -- Unset_Reference (Node16)
4452 -- Actual_Subtype (Node17)
4453 -- Renamed_Object (Node18)
4454 -- Interface_Name (Node21)
4455 -- Shared_Var_Assign_Proc (Node22)
4456 -- Extra_Constrained (Node23)
4457 -- Has_Alignment_Clause (Flag46)
4458 -- Has_Atomic_Components (Flag86)
4459 -- Has_Biased_Representation (Flag139)
4460 -- Has_Size_Clause (Flag29)
4461 -- Has_Volatile_Components (Flag87)
4462 -- Is_Atomic (Flag85)
4463 -- Is_Eliminated (Flag124)
4464 -- Is_Psected (Flag153)
4465 -- Is_Shared_Passive (Flag60)
4466 -- Is_True_Constant (Flag163)
4467 -- Is_Volatile (Flag16)
4468 -- Not_Source_Assigned (Flag115)
4469 -- Address_Clause (synth)
4470 -- Alignment_Clause (synth)
4471 -- Size_Clause (synth)
4474 -- Since E_Void is the initial Ekind value of an entity when it is first
4475 -- created, one might expect that no attributes would be defined on such
4476 -- an entity until its Ekind field is set. However, in practice, there
4477 -- are many instances in which fields of an E_Void entity are set in the
4478 -- code prior to setting the Ekind field. This is not well documented or
4479 -- well controlled, and needs cleaning up later. Meanwhile, the access
4480 -- procedures in the body of Einfo permit many, but not all, attributes
4481 -- to be applied to an E_Void entity, precisely so that this kind of
4482 -- pre-setting of attributes works. This is really a hole in the dynamic
4483 -- type checking, since there is no assurance that the eventual Ekind
4484 -- value will be appropriate for the attributes set, and the consequence
4485 -- is that the dynamic type checking in the Einfo body is unnecessarily
4486 -- weak. To be looked at systematically some time ???
4488 ---------------------------------
4489 -- Component_Alignment Control --
4490 ---------------------------------
4492 -- There are four types of alignment possible for array and record
4493 -- types, and a field in the type entities contains a value of the
4494 -- following type indicating which alignment choice applies. For full
4495 -- details of the meaning of these aligment types, see description
4496 -- of the Component_Alignment pragma
4498 type Component_Alignment_Kind is (
4499 Calign_Default, -- default alignment
4500 Calign_Component_Size, -- natural alignment for component size
4501 Calign_Component_Size_4, -- natural for size <= 4, 4 for size >= 4
4502 Calign_Storage_Unit); -- all components byte aligned
4508 -- In addition to attributes that are stored as plain data, other
4509 -- attributes are procedural, and require some small amount of
4510 -- computation. Of course, from the point of view of a user of this
4511 -- package, the distinction is not visible (even the field information
4512 -- provided below should be disregarded, as it is subject to change
4513 -- without notice!). A number of attributes appear as lists: lists of
4514 -- formals, lists of actuals, of discriminants, etc. For these, pairs
4515 -- of functions are defined, which take the form:
4517 -- function First_Thing (E : Enclosing_Construct) return Thing;
4518 -- function Next_Thing (T : Thing) return Thing;
4520 -- The end of iteration is always signaled by a value of Empty, so that
4521 -- loops over these chains invariably have the form:
4525 -- This := First_Thing (E);
4527 -- while Present (This) loop
4528 -- Do_Something_With (This);
4530 -- This := Next_Thing (This);
4533 -----------------------------------
4534 -- Handling of Check Suppression --
4535 -----------------------------------
4537 -- There are three ways that checks can be suppressed:
4539 -- 1. At the command line level. Package Opt contains global Boolean
4540 -- flags with names Suppress_Options.xxx_Checks, where xxx is the
4541 -- name of one of the checks that can be suppressed (excluding
4542 -- All_Checks, which is simply reflected by setting all the
4543 -- individual flags)
4545 -- 2. At the scope level. The body of Sem contains flags with names
4546 -- Suppress.xxx_Checks which are set to indicate that the given
4547 -- check is suppressed for the current scope. These flags are
4548 -- saved in the scope stack on entry to a scope and restored on
4549 -- exit from the scope.
4551 -- 3. At the entity level. Each entity contains a set of flags named
4552 -- Suppress_xxx_Checks which suppress the given check for that
4553 -- particularly entity (of course not all flags are meaningful for
4556 -------------------------------
4557 -- Handling of Discriminants --
4558 -------------------------------
4560 -- During semantic processing, discriminants are separate entities which
4561 -- reflect the semantic properties and allowed usage of discriminants in
4564 -- In the case of discriminants used as bounds, the references are handled
4565 -- directly, since special processing is needed in any case. However, there
4566 -- are two circumstances in which discriminants are referenced in a quite
4567 -- general manner, like any other variables:
4569 -- In initialization expressions for records. Note that the expressions
4570 -- used in Priority, Storage_Size, and Task_Info pragmas are effectively
4571 -- in this category, since these pragmas are converted to initialized
4572 -- record fields in the Corresponding_Record_Type.
4574 -- In task and protected bodies, where the discriminant values may be
4575 -- referenced freely within these bodies. Discriminants can also appear
4576 -- in bounds of entry families and in defaults of operations.
4578 -- In both these cases, the discriminants must be treated essentially as
4579 -- objects. The following approach is used to simplify and minimize the
4580 -- special processing that is required.
4582 -- When a record type with discriminants is processed, the semantic
4583 -- processing creates the entities for the discriminants. It also creates
4584 -- an additional set of entities, called discriminals, one for each of
4585 -- the discriminants, and the Discriminal field of the discriminant entity
4586 -- points to this additional entity, which is initially created as an
4587 -- uninitialized (E_Void) entity.
4589 -- During expansion of expressions, any discriminant reference is replaced
4590 -- by a reference to the corresponding discriminal. When the initialization
4591 -- procedure for the record is created (there will always be one, since
4592 -- discriminants are present, see Exp_Ch3 for further details), the
4593 -- discriminals are used as the entities for the formal parameters of
4594 -- this initialization procedure. The references to these discriminants
4595 -- have already been replaced by references to these discriminals, which
4596 -- are now the formal parameters corresponding to the required objects.
4598 -- In the case of a task or protected body, the semantics similarly
4599 -- creates a set of discriminals for the discriminants of the task or
4600 -- protected type. When the procedure is created for the task body,
4601 -- the parameter passed in is a reference to the task value type, which
4602 -- contains the required discriminant values. The expander creates a
4603 -- set of declarations of the form:
4605 -- discriminal : constant dtype renames _Task.discriminant;
4607 -- where discriminal is the discriminal entity referenced by the task
4608 -- discriminant, and _Task is the task value passed in as the parameter.
4609 -- Again, any references to discriminants in the task body have been
4610 -- replaced by the discriminal reference, which is now an object that
4611 -- contains the required value.
4613 -- This approach for tasks means that two sets of discriminals are needed
4614 -- for a task type, one for the initialization procedure, and one for the
4615 -- task body. This works out nicely, since the semantics allocates one set
4616 -- for the task itself, and one set for the corresponding record.
4618 -- The one bit of trickiness arises in making sure that the right set of
4619 -- discriminals is used at the right time. First the task definition is
4620 -- processed. Any references to discriminants here are replaced by the
4621 -- the corresponding *task* discriminals (the record type doesn't even
4622 -- exist yet, since it is constructed as part of the expansion of the
4623 -- task declaration, which happens after the semantic processing of the
4624 -- task definition). The discriminants to be used for the corresponding
4625 -- record are created at the same time as the other discriminals, and
4626 -- held in the CR_Discriminant field of the discriminant. A use of the
4627 -- discriminant in a bound for an entry family is replaced with the CR_
4628 -- discriminant because it controls the bound of the entry queue array
4629 -- which is a component of the corresponding record.
4631 -- Just before the record initialization routine is constructed, the
4632 -- expander exchanges the task and record discriminals. This has two
4633 -- effects. First the generation of the record initialization routine
4634 -- uses the discriminals that are now on the record, which is the set
4635 -- that used to be on the task, which is what we want.
4637 -- Second, a new set of (so far unused) discriminals is now on the task
4638 -- discriminants, and it is this set that will be used for expanding the
4639 -- task body, and also for the discriminal declarations at the start of
4642 ---------------------------------------
4643 -- Private data in protected objects --
4644 ---------------------------------------
4646 -- Private object declarations in protected types pose problems
4647 -- similar to those of discriminants. They are expanded to components
4648 -- of a record which is passed as the parameter "_object" to expanded
4649 -- forms of all protected operations. As with discriminants, timing
4650 -- of this expansion is a problem. The sequence of statements for a
4651 -- protected operation is expanded before the operation itself, so the
4652 -- formal parameter for the record object containing the private data
4653 -- does not exist when the references to that data are expanded.
4655 -- For this reason, private data is handled in the same way as
4656 -- discriminants, expanding references to private data in protected
4657 -- operations (which appear as components) to placeholders which will
4658 -- eventually become renamings of the private selected components
4659 -- of the "_object" formal parameter. These placeholders are called
4660 -- "privals", by analogy to the "discriminals" used to implement
4661 -- discriminants. They are attached to the component declaration nodes
4662 -- representing the private object declarations of the protected type.
4664 -- As with discriminals, each protected subprogram needs a unique set
4665 -- of privals, since they must refer to renamings of components of a
4666 -- formal parameter of that operation. Entry bodies need another set,
4667 -- which they all share and which is associated with renamings in the
4668 -- Service_Entries procedure for the protected type (this is not yet
4669 -- implemented???). This means that we must associate a new set of
4670 -- privals (and discriminals) with the private declarations after
4671 -- the body of a protected subprogram is processed.
4673 -- The last complication is the presence of discriminants and discriminated
4674 -- components. In the corresponding record, the components are constrained
4675 -- by the discriminants of the record, but within each protected operation
4676 -- they are constrained by the discriminants of the actual. The actual
4677 -- subtypes of those components are constructed as for other unconstrained
4678 -- formals, but the privals are created before the formal object is added
4679 -- to the parameter list of the protected operation, so they carry the
4680 -- nominal subtype of the original component. After the protected operation
4681 -- is actually created (in the expansion of the protected body) we must
4682 -- patch the types of each prival occurrence with the proper actual subtype
4683 -- which is by now set. The Privals_Chain is used for this patching.
4689 -- The following type synonyms are used to tidy up the function and
4690 -- procedure declarations that follow, and also to make it possible
4691 -- to meet the requirement for the XEINFO utility that all function
4692 -- specs must fit on a single source line.
4694 subtype B is Boolean;
4695 subtype C is Component_Alignment_Kind;
4696 subtype E is Entity_Id;
4697 subtype M is Mechanism_Type;
4698 subtype N is Node_Id;
4701 subtype L is Elist_Id;
4702 subtype S is List_Id;
4704 ---------------------------------
4705 -- Attribute Access Functions --
4706 ---------------------------------
4708 -- All attributes are manipulated through a procedural interface. This
4709 -- section contains the functions used to obtain attribute values which
4710 -- correspond to values in fields or flags in the entity itself.
4712 function Accept_Address (Id : E) return L;
4713 function Access_Disp_Table (Id : E) return E;
4714 function Actual_Subtype (Id : E) return E;
4715 function Address_Taken (Id : E) return B;
4716 function Alias (Id : E) return E;
4717 function Alignment (Id : E) return U;
4718 function Associated_Final_Chain (Id : E) return E;
4719 function Associated_Formal_Package (Id : E) return E;
4720 function Associated_Node_For_Itype (Id : E) return N;
4721 function Associated_Storage_Pool (Id : E) return E;
4722 function Barrier_Function (Id : E) return N;
4723 function Block_Node (Id : E) return N;
4724 function Body_Entity (Id : E) return E;
4725 function CR_Discriminant (Id : E) return E;
4726 function C_Pass_By_Copy (Id : E) return B;
4727 function Class_Wide_Type (Id : E) return E;
4728 function Cloned_Subtype (Id : E) return E;
4729 function Component_Alignment (Id : E) return C;
4730 function Component_Clause (Id : E) return N;
4731 function Component_Bit_Offset (Id : E) return U;
4732 function Component_Size (Id : E) return U;
4733 function Component_Type (Id : E) return E;
4734 function Corresponding_Concurrent_Type (Id : E) return E;
4735 function Corresponding_Discriminant (Id : E) return E;
4736 function Corresponding_Equality (Id : E) return E;
4737 function Corresponding_Record_Type (Id : E) return E;
4738 function Corresponding_Remote_Type (Id : E) return E;
4739 function Debug_Info_Off (Id : E) return B;
4740 function Debug_Renaming_Link (Id : E) return E;
4741 function DTC_Entity (Id : E) return E;
4742 function DT_Entry_Count (Id : E) return U;
4743 function DT_Position (Id : E) return U;
4744 function Default_Expr_Function (Id : E) return E;
4745 function Default_Expressions_Processed (Id : E) return B;
4746 function Default_Value (Id : E) return N;
4747 function Delay_Cleanups (Id : E) return B;
4748 function Delay_Subprogram_Descriptors (Id : E) return B;
4749 function Delta_Value (Id : E) return R;
4750 function Dependent_Instances (Id : E) return L;
4751 function Depends_On_Private (Id : E) return B;
4752 function Digits_Value (Id : E) return U;
4753 function Directly_Designated_Type (Id : E) return E;
4754 function Discard_Names (Id : E) return B;
4755 function Discriminal (Id : E) return E;
4756 function Discriminal_Link (Id : E) return E;
4757 function Discriminant_Checking_Func (Id : E) return E;
4758 function Discriminant_Constraint (Id : E) return L;
4759 function Discriminant_Default_Value (Id : E) return N;
4760 function Discriminant_Number (Id : E) return U;
4761 function Elaborate_All_Desirable (Id : E) return B;
4762 function Elaboration_Entity (Id : E) return E;
4763 function Elaboration_Entity_Required (Id : E) return B;
4764 function Enclosing_Scope (Id : E) return E;
4765 function Entry_Accepted (Id : E) return B;
4766 function Entry_Bodies_Array (Id : E) return E;
4767 function Entry_Cancel_Parameter (Id : E) return E;
4768 function Entry_Component (Id : E) return E;
4769 function Entry_Formal (Id : E) return E;
4770 function Entry_Index_Constant (Id : E) return E;
4771 function Entry_Index_Type (Id : E) return E;
4772 function Entry_Parameters_Type (Id : E) return E;
4773 function Enum_Pos_To_Rep (Id : E) return E;
4774 function Enumeration_Pos (Id : E) return U;
4775 function Enumeration_Rep (Id : E) return U;
4776 function Enumeration_Rep_Expr (Id : E) return N;
4777 function Equivalent_Type (Id : E) return E;
4778 function Esize (Id : E) return U;
4779 function Exception_Code (Id : E) return U;
4780 function Extra_Accessibility (Id : E) return E;
4781 function Extra_Constrained (Id : E) return E;
4782 function Extra_Formal (Id : E) return E;
4783 function Finalization_Chain_Entity (Id : E) return E;
4784 function Finalize_Storage_Only (Id : E) return B;
4785 function First_Entity (Id : E) return E;
4786 function First_Index (Id : E) return N;
4787 function First_Literal (Id : E) return E;
4788 function First_Optional_Parameter (Id : E) return E;
4789 function First_Private_Entity (Id : E) return E;
4790 function First_Rep_Item (Id : E) return N;
4791 function Freeze_Node (Id : E) return N;
4792 function From_With_Type (Id : E) return B;
4793 function Full_View (Id : E) return E;
4794 function Function_Returns_With_DSP (Id : E) return B;
4795 function Generic_Renamings (Id : E) return L;
4796 function Girder_Constraint (Id : E) return L;
4797 function Handler_Records (Id : E) return S;
4798 function Has_Aliased_Components (Id : E) return B;
4799 function Has_Alignment_Clause (Id : E) return B;
4800 function Has_All_Calls_Remote (Id : E) return B;
4801 function Has_Atomic_Components (Id : E) return B;
4802 function Has_Biased_Representation (Id : E) return B;
4803 function Has_Completion (Id : E) return B;
4804 function Has_Completion_In_Body (Id : E) return B;
4805 function Has_Complex_Representation (Id : E) return B;
4806 function Has_Component_Size_Clause (Id : E) return B;
4807 function Has_Controlled_Component (Id : E) return B;
4808 function Has_Controlling_Result (Id : E) return B;
4809 function Has_Convention_Pragma (Id : E) return B;
4810 function Has_Delayed_Freeze (Id : E) return B;
4811 function Has_Discriminants (Id : E) return B;
4812 function Has_Enumeration_Rep_Clause (Id : E) return B;
4813 function Has_Exit (Id : E) return B;
4814 function Has_External_Tag_Rep_Clause (Id : E) return B;
4815 function Has_Fully_Qualified_Name (Id : E) return B;
4816 function Has_Gigi_Rep_Item (Id : E) return B;
4817 function Has_Homonym (Id : E) return B;
4818 function Has_Interrupt_Handler (Id : E) return B;
4819 function Has_Machine_Radix_Clause (Id : E) return B;
4820 function Has_Master_Entity (Id : E) return B;
4821 function Has_Missing_Return (Id : E) return B;
4822 function Has_Nested_Block_With_Handler (Id : E) return B;
4823 function Has_Forward_Instantiation (Id : E) return B;
4824 function Has_Non_Standard_Rep (Id : E) return B;
4825 function Has_Object_Size_Clause (Id : E) return B;
4826 function Has_Per_Object_Constraint (Id : E) return B;
4827 function Has_Pragma_Controlled (Id : E) return B;
4828 function Has_Pragma_Elaborate_Body (Id : E) return B;
4829 function Has_Pragma_Inline (Id : E) return B;
4830 function Has_Pragma_Pack (Id : E) return B;
4831 function Has_Primitive_Operations (Id : E) return B;
4832 function Has_Qualified_Name (Id : E) return B;
4833 function Has_Record_Rep_Clause (Id : E) return B;
4834 function Has_Recursive_Call (Id : E) return B;
4835 function Has_Size_Clause (Id : E) return B;
4836 function Has_Small_Clause (Id : E) return B;
4837 function Has_Specified_Layout (Id : E) return B;
4838 function Has_Storage_Size_Clause (Id : E) return B;
4839 function Has_Subprogram_Descriptor (Id : E) return B;
4840 function Has_Task (Id : E) return B;
4841 function Has_Unchecked_Union (Id : E) return B;
4842 function Has_Unknown_Discriminants (Id : E) return B;
4843 function Has_Volatile_Components (Id : E) return B;
4844 function Homonym (Id : E) return E;
4845 function Hiding_Loop_Variable (Id : E) return E;
4846 function In_Package_Body (Id : E) return B;
4847 function In_Private_Part (Id : E) return B;
4848 function In_Use (Id : E) return B;
4849 function Inner_Instances (Id : E) return L;
4850 function Interface_Name (Id : E) return N;
4851 function Is_AST_Entry (Id : E) return B;
4852 function Is_Abstract (Id : E) return B;
4853 function Is_Access_Constant (Id : E) return B;
4854 function Is_Aliased (Id : E) return B;
4855 function Is_Asynchronous (Id : E) return B;
4856 function Is_Atomic (Id : E) return B;
4857 function Is_Bit_Packed_Array (Id : E) return B;
4858 function Is_CPP_Class (Id : E) return B;
4859 function Is_Called (Id : E) return B;
4860 function Is_Character_Type (Id : E) return B;
4861 function Is_Child_Unit (Id : E) return B;
4862 function Is_Compilation_Unit (Id : E) return B;
4863 function Is_Completely_Hidden (Id : E) return B;
4864 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B;
4865 function Is_Constr_Subt_For_U_Nominal (Id : E) return B;
4866 function Is_Constrained (Id : E) return B;
4867 function Is_Constructor (Id : E) return B;
4868 function Is_Controlled (Id : E) return B;
4869 function Is_Controlling_Formal (Id : E) return B;
4870 function Is_Destructor (Id : E) return B;
4871 function Is_Discrim_SO_Function (Id : E) return B;
4872 function Is_Dispatching_Operation (Id : E) return B;
4873 function Is_Eliminated (Id : E) return B;
4874 function Is_Entry_Formal (Id : E) return B;
4875 function Is_Exported (Id : E) return B;
4876 function Is_First_Subtype (Id : E) return B;
4877 function Is_For_Access_Subtype (Id : E) return B;
4878 function Is_Frozen (Id : E) return B;
4879 function Is_Generic_Instance (Id : E) return B;
4880 function Is_Hidden (Id : E) return B;
4881 function Is_Hidden_Open_Scope (Id : E) return B;
4882 function Is_Immediately_Visible (Id : E) return B;
4883 function Is_Imported (Id : E) return B;
4884 function Is_Inlined (Id : E) return B;
4885 function Is_Instantiated (Id : E) return B;
4886 function Is_Internal (Id : E) return B;
4887 function Is_Interrupt_Handler (Id : E) return B;
4888 function Is_Intrinsic_Subprogram (Id : E) return B;
4889 function Is_Itype (Id : E) return B;
4890 function Is_Known_Valid (Id : E) return B;
4891 function Is_Limited_Composite (Id : E) return B;
4892 function Is_Machine_Code_Subprogram (Id : E) return B;
4893 function Is_Non_Static_Subtype (Id : E) return B;
4894 function Is_Null_Init_Proc (Id : E) return B;
4895 function Is_Optional_Parameter (Id : E) return B;
4896 function Is_Package_Body_Entity (Id : E) return B;
4897 function Is_Packed (Id : E) return B;
4898 function Is_Packed_Array_Type (Id : E) return B;
4899 function Is_Potentially_Use_Visible (Id : E) return B;
4900 function Is_Preelaborated (Id : E) return B;
4901 function Is_Private_Composite (Id : E) return B;
4902 function Is_Private_Descendant (Id : E) return B;
4903 function Is_Psected (Id : E) return B;
4904 function Is_Public (Id : E) return B;
4905 function Is_Pure (Id : E) return B;
4906 function Is_Remote_Call_Interface (Id : E) return B;
4907 function Is_Remote_Types (Id : E) return B;
4908 function Is_Renaming_Of_Object (Id : E) return B;
4909 function Is_Shared_Passive (Id : E) return B;
4910 function Is_Statically_Allocated (Id : E) return B;
4911 function Is_Tag (Id : E) return B;
4912 function Is_Tagged_Type (Id : E) return B;
4913 function Is_True_Constant (Id : E) return B;
4914 function Is_Unchecked_Union (Id : E) return B;
4915 function Is_Unsigned_Type (Id : E) return B;
4916 function Is_VMS_Exception (Id : E) return B;
4917 function Is_Valued_Procedure (Id : E) return B;
4918 function Is_Visible_Child_Unit (Id : E) return B;
4919 function Is_Volatile (Id : E) return B;
4920 function Is_Wrapper_Package (Id : E) return B;
4921 function Last_Entity (Id : E) return E;
4922 function Lit_Indexes (Id : E) return E;
4923 function Lit_Strings (Id : E) return E;
4924 function Machine_Radix_10 (Id : E) return B;
4925 function Master_Id (Id : E) return E;
4926 function Materialize_Entity (Id : E) return B;
4927 function Mechanism (Id : E) return M;
4928 function Modulus (Id : E) return U;
4929 function Needs_Debug_Info (Id : E) return B;
4930 function Needs_No_Actuals (Id : E) return B;
4931 function Next_Inlined_Subprogram (Id : E) return E;
4932 function No_Pool_Assigned (Id : E) return B;
4933 function No_Return (Id : E) return B;
4934 function Non_Binary_Modulus (Id : E) return B;
4935 function Nonzero_Is_True (Id : E) return B;
4936 function Normalized_First_Bit (Id : E) return U;
4937 function Normalized_Position (Id : E) return U;
4938 function Normalized_Position_Max (Id : E) return U;
4939 function Not_Source_Assigned (Id : E) return B;
4940 function Object_Ref (Id : E) return E;
4941 function Original_Record_Component (Id : E) return E;
4942 function Packed_Array_Type (Id : E) return E;
4943 function Parent_Subtype (Id : E) return E;
4944 function Primitive_Operations (Id : E) return L;
4945 function Prival (Id : E) return E;
4946 function Privals_Chain (Id : E) return L;
4947 function Private_Dependents (Id : E) return L;
4948 function Private_View (Id : E) return N;
4949 function Protected_Body_Subprogram (Id : E) return E;
4950 function Protected_Formal (Id : E) return E;
4951 function Protected_Operation (Id : E) return E;
4952 function RM_Size (Id : E) return U;
4953 function Reachable (Id : E) return B;
4954 function Referenced (Id : E) return B;
4955 function Referenced_Object (Id : E) return N;
4956 function Register_Exception_Call (Id : E) return N;
4957 function Related_Array_Object (Id : E) return E;
4958 function Related_Instance (Id : E) return E;
4959 function Renamed_Entity (Id : E) return N;
4960 function Renamed_Object (Id : E) return N;
4961 function Renaming_Map (Id : E) return U;
4962 function Return_Present (Id : E) return B;
4963 function Returns_By_Ref (Id : E) return B;
4964 function Reverse_Bit_Order (Id : E) return B;
4965 function Scalar_Range (Id : E) return N;
4966 function Scale_Value (Id : E) return U;
4967 function Scope_Depth_Value (Id : E) return U;
4968 function Sec_Stack_Needed_For_Return (Id : E) return B;
4969 function Shadow_Entities (Id : E) return S;
4970 function Shared_Var_Assign_Proc (Id : E) return E;
4971 function Shared_Var_Read_Proc (Id : E) return E;
4972 function Size_Check_Code (Id : E) return N;
4973 function Size_Known_At_Compile_Time (Id : E) return B;
4974 function Size_Depends_On_Discriminant (Id : E) return B;
4975 function Small_Value (Id : E) return R;
4976 function Spec_Entity (Id : E) return E;
4977 function Storage_Size_Variable (Id : E) return E;
4978 function Strict_Alignment (Id : E) return B;
4979 function String_Literal_Length (Id : E) return U;
4980 function String_Literal_Low_Bound (Id : E) return N;
4981 function Suppress_Access_Checks (Id : E) return B;
4982 function Suppress_Accessibility_Checks (Id : E) return B;
4983 function Suppress_Discriminant_Checks (Id : E) return B;
4984 function Suppress_Division_Checks (Id : E) return B;
4985 function Suppress_Elaboration_Checks (Id : E) return B;
4986 function Suppress_Elaboration_Warnings (Id : E) return B;
4987 function Suppress_Index_Checks (Id : E) return B;
4988 function Suppress_Init_Proc (Id : E) return B;
4989 function Suppress_Length_Checks (Id : E) return B;
4990 function Suppress_Overflow_Checks (Id : E) return B;
4991 function Suppress_Range_Checks (Id : E) return B;
4992 function Suppress_Storage_Checks (Id : E) return B;
4993 function Suppress_Style_Checks (Id : E) return B;
4994 function Suppress_Tag_Checks (Id : E) return B;
4995 function Underlying_Full_View (Id : E) return E;
4996 function Unset_Reference (Id : E) return N;
4997 function Uses_Sec_Stack (Id : E) return B;
4998 function Vax_Float (Id : E) return B;
4999 function Warnings_Off (Id : E) return B;
5001 -------------------------------
5002 -- Classification Attributes --
5003 -------------------------------
5005 -- These functions provide a convenient functional notation for testing
5006 -- whether an Ekind value belongs to a specified kind, for example the
5007 -- function Is_Elementary_Type tests if its argument is in Elementary_Kind.
5008 -- In some cases, the test is of an entity attribute (e.g. in the case of
5009 -- Is_Generic_Type where the Ekind does not provide the needed information)
5011 function Is_Access_Type (Id : E) return B;
5012 function Is_Array_Type (Id : E) return B;
5013 function Is_Class_Wide_Type (Id : E) return B;
5014 function Is_Composite_Type (Id : E) return B;
5015 function Is_Concurrent_Body (Id : E) return B;
5016 function Is_Concurrent_Record_Type (Id : E) return B;
5017 function Is_Concurrent_Type (Id : E) return B;
5018 function Is_Decimal_Fixed_Point_Type (Id : E) return B;
5019 function Is_Digits_Type (Id : E) return B;
5020 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B;
5021 function Is_Discrete_Type (Id : E) return B;
5022 function Is_Elementary_Type (Id : E) return B;
5023 function Is_Entry (Id : E) return B;
5024 function Is_Enumeration_Type (Id : E) return B;
5025 function Is_Fixed_Point_Type (Id : E) return B;
5026 function Is_Floating_Point_Type (Id : E) return B;
5027 function Is_Formal (Id : E) return B;
5028 function Is_Formal_Subprogram (Id : E) return B;
5029 function Is_Generic_Actual_Type (Id : E) return B;
5030 function Is_Generic_Type (Id : E) return B;
5031 function Is_Generic_Unit (Id : E) return B;
5032 function Is_Incomplete_Or_Private_Type (Id : E) return B;
5033 function Is_Integer_Type (Id : E) return B;
5034 function Is_Limited_Record (Id : E) return B;
5035 function Is_Modular_Integer_Type (Id : E) return B;
5036 function Is_Named_Number (Id : E) return B;
5037 function Is_Numeric_Type (Id : E) return B;
5038 function Is_Object (Id : E) return B;
5039 function Is_Ordinary_Fixed_Point_Type (Id : E) return B;
5040 function Is_Overloadable (Id : E) return B;
5041 function Is_Private_Type (Id : E) return B;
5042 function Is_Protected_Type (Id : E) return B;
5043 function Is_Real_Type (Id : E) return B;
5044 function Is_Record_Type (Id : E) return B;
5045 function Is_Scalar_Type (Id : E) return B;
5046 function Is_Signed_Integer_Type (Id : E) return B;
5047 function Is_Subprogram (Id : E) return B;
5048 function Is_Task_Type (Id : E) return B;
5049 function Is_Type (Id : E) return B;
5051 -------------------------------------
5052 -- Synthesized Attribute Functions --
5053 -------------------------------------
5055 -- The functions in this section synthesize attributes from the tree,
5056 -- so they do not correspond to defined fields in the entity itself.
5058 function Address_Clause (Id : E) return N;
5059 function Alignment_Clause (Id : E) return N;
5060 function Ancestor_Subtype (Id : E) return E;
5061 function Base_Type (Id : E) return E;
5062 function Constant_Value (Id : E) return N;
5063 function Declaration_Node (Id : E) return N;
5064 function Designated_Type (Id : E) return E;
5065 function Enclosing_Dynamic_Scope (Id : E) return E;
5066 function First_Component (Id : E) return E;
5067 function First_Discriminant (Id : E) return E;
5068 function First_Formal (Id : E) return E;
5069 function First_Girder_Discriminant (Id : E) return E;
5070 function First_Subtype (Id : E) return E;
5071 function Has_Attach_Handler (Id : E) return B;
5072 function Has_Entries (Id : E) return B;
5073 function Has_Foreign_Convention (Id : E) return B;
5074 function Has_Private_Ancestor (Id : E) return B;
5075 function Has_Private_Declaration (Id : E) return B;
5076 function Implementation_Base_Type (Id : E) return E;
5077 function Is_Always_Inlined (Id : E) return B;
5078 function Is_Boolean_Type (Id : E) return B;
5079 function Is_By_Copy_Type (Id : E) return B;
5080 function Is_By_Reference_Type (Id : E) return B;
5081 function Is_Derived_Type (Id : E) return B;
5082 function Is_Dynamic_Scope (Id : E) return B;
5083 function Is_Indefinite_Subtype (Id : E) return B;
5084 function Is_Limited_Type (Id : E) return B;
5085 function Is_Package (Id : E) return B;
5086 function Is_Protected_Private (Id : E) return B;
5087 function Is_Protected_Record_Type (Id : E) return B;
5088 function Is_Return_By_Reference_Type (Id : E) return B;
5089 function Is_String_Type (Id : E) return B;
5090 function Is_Task_Record_Type (Id : E) return B;
5091 function Next_Component (Id : E) return E;
5092 function Next_Discriminant (Id : E) return E;
5093 function Next_Formal (Id : E) return E;
5094 function Next_Formal_With_Extras (Id : E) return E;
5095 function Next_Girder_Discriminant (Id : E) return E;
5096 function Next_Literal (Id : E) return E;
5097 function Number_Dimensions (Id : E) return Pos;
5098 function Number_Discriminants (Id : E) return Pos;
5099 function Number_Entries (Id : E) return Nat;
5100 function Number_Formals (Id : E) return Pos;
5101 function Parameter_Mode (Id : E) return Formal_Kind;
5102 function Root_Type (Id : E) return E;
5103 function Scope_Depth_Set (Id : E) return B;
5104 function Size_Clause (Id : E) return N;
5105 function Tag_Component (Id : E) return E;
5106 function Type_High_Bound (Id : E) return N;
5107 function Type_Low_Bound (Id : E) return N;
5108 function Underlying_Type (Id : E) return E;
5110 ----------------------------------------------
5111 -- Type Representation Attribute Predicates --
5112 ----------------------------------------------
5114 -- These predicates test the setting of the indicated attribute. If
5115 -- the value has been set, then Known is True, and Unknown is False.
5116 -- If no value is set, then Known is False and Unknown is True. The
5117 -- Known_Static predicate is true only if the value is set (Known)
5118 -- and is set to a compile time known value. Note that in the case
5119 -- of Alignment and Normalized_First_Bit, dynamic values are not
5120 -- possible, so we do not need a separate Known_Static calls in
5121 -- these cases. The not set (unknown values are as follows:
5124 -- Component_Size Uint_0
5125 -- Component_Bit_Offset No_Uint
5126 -- Digits_Value Uint_0
5128 -- Normalized_First_Bit No_Uint
5129 -- Normalized_Position No_Uint
5130 -- Normalized_Position_Max No_Uint
5133 -- It would be cleaner to use No_Uint in all these cases, but historically
5134 -- we chose to use Uint_0 at first, and the change over will take time ???
5135 -- This is particularly true for the RM_Size field, where a value of zero
5136 -- is legitimate. We deal with this by a nasty kludge that knows that the
5137 -- value is always known static for discrete types (and no other types can
5138 -- have an RM_Size value of zero).
5140 function Known_Alignment (E : Entity_Id) return B;
5141 function Known_Component_Bit_Offset (E : Entity_Id) return B;
5142 function Known_Component_Size (E : Entity_Id) return B;
5143 function Known_Esize (E : Entity_Id) return B;
5144 function Known_Normalized_First_Bit (E : Entity_Id) return B;
5145 function Known_Normalized_Position (E : Entity_Id) return B;
5146 function Known_Normalized_Position_Max (E : Entity_Id) return B;
5147 function Known_RM_Size (E : Entity_Id) return B;
5149 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B;
5150 function Known_Static_Component_Size (E : Entity_Id) return B;
5151 function Known_Static_Esize (E : Entity_Id) return B;
5152 function Known_Static_Normalized_Position (E : Entity_Id) return B;
5153 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B;
5154 function Known_Static_RM_Size (E : Entity_Id) return B;
5156 function Unknown_Alignment (E : Entity_Id) return B;
5157 function Unknown_Component_Bit_Offset (E : Entity_Id) return B;
5158 function Unknown_Component_Size (E : Entity_Id) return B;
5159 function Unknown_Esize (E : Entity_Id) return B;
5160 function Unknown_Normalized_First_Bit (E : Entity_Id) return B;
5161 function Unknown_Normalized_Position (E : Entity_Id) return B;
5162 function Unknown_Normalized_Position_Max (E : Entity_Id) return B;
5163 function Unknown_RM_Size (E : Entity_Id) return B;
5165 ------------------------------
5166 -- Attribute Set Procedures --
5167 ------------------------------
5169 procedure Set_Accept_Address (Id : E; V : L);
5170 procedure Set_Access_Disp_Table (Id : E; V : E);
5171 procedure Set_Actual_Subtype (Id : E; V : E);
5172 procedure Set_Address_Taken (Id : E; V : B := True);
5173 procedure Set_Alias (Id : E; V : E);
5174 procedure Set_Alignment (Id : E; V : U);
5175 procedure Set_Associated_Final_Chain (Id : E; V : E);
5176 procedure Set_Associated_Formal_Package (Id : E; V : E);
5177 procedure Set_Associated_Node_For_Itype (Id : E; V : N);
5178 procedure Set_Associated_Storage_Pool (Id : E; V : E);
5179 procedure Set_Barrier_Function (Id : E; V : N);
5180 procedure Set_Block_Node (Id : E; V : N);
5181 procedure Set_Body_Entity (Id : E; V : E);
5182 procedure Set_CR_Discriminant (Id : E; V : E);
5183 procedure Set_C_Pass_By_Copy (Id : E; V : B := True);
5184 procedure Set_Class_Wide_Type (Id : E; V : E);
5185 procedure Set_Cloned_Subtype (Id : E; V : E);
5186 procedure Set_Component_Alignment (Id : E; V : C);
5187 procedure Set_Component_Bit_Offset (Id : E; V : U);
5188 procedure Set_Component_Clause (Id : E; V : N);
5189 procedure Set_Component_Size (Id : E; V : U);
5190 procedure Set_Component_Type (Id : E; V : E);
5191 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E);
5192 procedure Set_Corresponding_Discriminant (Id : E; V : E);
5193 procedure Set_Corresponding_Equality (Id : E; V : E);
5194 procedure Set_Corresponding_Record_Type (Id : E; V : E);
5195 procedure Set_Corresponding_Remote_Type (Id : E; V : E);
5196 procedure Set_Debug_Info_Off (Id : E; V : B := True);
5197 procedure Set_Debug_Renaming_Link (Id : E; V : E);
5198 procedure Set_DTC_Entity (Id : E; V : E);
5199 procedure Set_DT_Entry_Count (Id : E; V : U);
5200 procedure Set_DT_Position (Id : E; V : U);
5201 procedure Set_Default_Expr_Function (Id : E; V : E);
5202 procedure Set_Default_Expressions_Processed (Id : E; V : B := True);
5203 procedure Set_Default_Value (Id : E; V : N);
5204 procedure Set_Delay_Cleanups (Id : E; V : B := True);
5205 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True);
5206 procedure Set_Delta_Value (Id : E; V : R);
5207 procedure Set_Dependent_Instances (Id : E; V : L);
5208 procedure Set_Depends_On_Private (Id : E; V : B := True);
5209 procedure Set_Digits_Value (Id : E; V : U);
5210 procedure Set_Directly_Designated_Type (Id : E; V : E);
5211 procedure Set_Discard_Names (Id : E; V : B := True);
5212 procedure Set_Discriminal (Id : E; V : E);
5213 procedure Set_Discriminal_Link (Id : E; V : E);
5214 procedure Set_Discriminant_Checking_Func (Id : E; V : E);
5215 procedure Set_Discriminant_Constraint (Id : E; V : L);
5216 procedure Set_Discriminant_Default_Value (Id : E; V : N);
5217 procedure Set_Discriminant_Number (Id : E; V : U);
5218 procedure Set_Elaborate_All_Desirable (Id : E; V : B := True);
5219 procedure Set_Elaboration_Entity (Id : E; V : E);
5220 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True);
5221 procedure Set_Enclosing_Scope (Id : E; V : E);
5222 procedure Set_Entry_Accepted (Id : E; V : B := True);
5223 procedure Set_Entry_Bodies_Array (Id : E; V : E);
5224 procedure Set_Entry_Cancel_Parameter (Id : E; V : E);
5225 procedure Set_Entry_Component (Id : E; V : E);
5226 procedure Set_Entry_Formal (Id : E; V : E);
5227 procedure Set_Entry_Index_Constant (Id : E; V : E);
5228 procedure Set_Entry_Parameters_Type (Id : E; V : E);
5229 procedure Set_Enum_Pos_To_Rep (Id : E; V : E);
5230 procedure Set_Enumeration_Pos (Id : E; V : U);
5231 procedure Set_Enumeration_Rep (Id : E; V : U);
5232 procedure Set_Enumeration_Rep_Expr (Id : E; V : N);
5233 procedure Set_Equivalent_Type (Id : E; V : E);
5234 procedure Set_Esize (Id : E; V : U);
5235 procedure Set_Exception_Code (Id : E; V : U);
5236 procedure Set_Extra_Accessibility (Id : E; V : E);
5237 procedure Set_Extra_Constrained (Id : E; V : E);
5238 procedure Set_Extra_Formal (Id : E; V : E);
5239 procedure Set_Finalization_Chain_Entity (Id : E; V : E);
5240 procedure Set_Finalize_Storage_Only (Id : E; V : B := True);
5241 procedure Set_First_Entity (Id : E; V : E);
5242 procedure Set_First_Index (Id : E; V : N);
5243 procedure Set_First_Literal (Id : E; V : E);
5244 procedure Set_First_Optional_Parameter (Id : E; V : E);
5245 procedure Set_First_Private_Entity (Id : E; V : E);
5246 procedure Set_First_Rep_Item (Id : E; V : N);
5247 procedure Set_Freeze_Node (Id : E; V : N);
5248 procedure Set_From_With_Type (Id : E; V : B := True);
5249 procedure Set_Full_View (Id : E; V : E);
5250 procedure Set_Function_Returns_With_DSP (Id : E; V : B := True);
5251 procedure Set_Generic_Renamings (Id : E; V : L);
5252 procedure Set_Girder_Constraint (Id : E; V : L);
5253 procedure Set_Handler_Records (Id : E; V : S);
5254 procedure Set_Has_Aliased_Components (Id : E; V : B := True);
5255 procedure Set_Has_Alignment_Clause (Id : E; V : B := True);
5256 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True);
5257 procedure Set_Has_Atomic_Components (Id : E; V : B := True);
5258 procedure Set_Has_Biased_Representation (Id : E; V : B := True);
5259 procedure Set_Has_Completion (Id : E; V : B := True);
5260 procedure Set_Has_Completion_In_Body (Id : E; V : B := True);
5261 procedure Set_Has_Complex_Representation (Id : E; V : B := True);
5262 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True);
5263 procedure Set_Has_Controlled_Component (Id : E; V : B := True);
5264 procedure Set_Has_Controlling_Result (Id : E; V : B := True);
5265 procedure Set_Has_Convention_Pragma (Id : E; V : B := True);
5266 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True);
5267 procedure Set_Has_Discriminants (Id : E; V : B := True);
5268 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True);
5269 procedure Set_Has_Exit (Id : E; V : B := True);
5270 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True);
5271 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True);
5272 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True);
5273 procedure Set_Has_Homonym (Id : E; V : B := True);
5274 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True);
5275 procedure Set_Has_Master_Entity (Id : E; V : B := True);
5276 procedure Set_Has_Missing_Return (Id : E; V : B := True);
5277 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True);
5278 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True);
5279 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True);
5280 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True);
5281 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True);
5282 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True);
5283 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True);
5284 procedure Set_Has_Pragma_Inline (Id : E; V : B := True);
5285 procedure Set_Has_Pragma_Pack (Id : E; V : B := True);
5286 procedure Set_Has_Primitive_Operations (Id : E; V : B := True);
5287 procedure Set_Has_Private_Declaration (Id : E; V : B := True);
5288 procedure Set_Has_Qualified_Name (Id : E; V : B := True);
5289 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True);
5290 procedure Set_Has_Recursive_Call (Id : E; V : B := True);
5291 procedure Set_Has_Size_Clause (Id : E; V : B := True);
5292 procedure Set_Has_Small_Clause (Id : E; V : B := True);
5293 procedure Set_Has_Specified_Layout (Id : E; V : B := True);
5294 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True);
5295 procedure Set_Has_Subprogram_Descriptor (Id : E; V : B := True);
5296 procedure Set_Has_Task (Id : E; V : B := True);
5297 procedure Set_Has_Unchecked_Union (Id : E; V : B := True);
5298 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True);
5299 procedure Set_Has_Volatile_Components (Id : E; V : B := True);
5300 procedure Set_Hiding_Loop_Variable (Id : E; V : E);
5301 procedure Set_Homonym (Id : E; V : E);
5302 procedure Set_In_Package_Body (Id : E; V : B := True);
5303 procedure Set_In_Private_Part (Id : E; V : B := True);
5304 procedure Set_In_Use (Id : E; V : B := True);
5305 procedure Set_Inner_Instances (Id : E; V : L);
5306 procedure Set_Interface_Name (Id : E; V : N);
5307 procedure Set_Is_AST_Entry (Id : E; V : B := True);
5308 procedure Set_Is_Abstract (Id : E; V : B := True);
5309 procedure Set_Is_Access_Constant (Id : E; V : B := True);
5310 procedure Set_Is_Aliased (Id : E; V : B := True);
5311 procedure Set_Is_Asynchronous (Id : E; V : B := True);
5312 procedure Set_Is_Atomic (Id : E; V : B := True);
5313 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True);
5314 procedure Set_Is_CPP_Class (Id : E; V : B := True);
5315 procedure Set_Is_Called (Id : E; V : B := True);
5316 procedure Set_Is_Character_Type (Id : E; V : B := True);
5317 procedure Set_Is_Child_Unit (Id : E; V : B := True);
5318 procedure Set_Is_Compilation_Unit (Id : E; V : B := True);
5319 procedure Set_Is_Completely_Hidden (Id : E; V : B := True);
5320 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True);
5321 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True);
5322 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True);
5323 procedure Set_Is_Constrained (Id : E; V : B := True);
5324 procedure Set_Is_Constructor (Id : E; V : B := True);
5325 procedure Set_Is_Controlled (Id : E; V : B := True);
5326 procedure Set_Is_Controlling_Formal (Id : E; V : B := True);
5327 procedure Set_Is_Destructor (Id : E; V : B := True);
5328 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True);
5329 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True);
5330 procedure Set_Is_Eliminated (Id : E; V : B := True);
5331 procedure Set_Is_Entry_Formal (Id : E; V : B := True);
5332 procedure Set_Is_Exported (Id : E; V : B := True);
5333 procedure Set_Is_First_Subtype (Id : E; V : B := True);
5334 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True);
5335 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True);
5336 procedure Set_Is_Frozen (Id : E; V : B := True);
5337 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True);
5338 procedure Set_Is_Generic_Instance (Id : E; V : B := True);
5339 procedure Set_Is_Generic_Type (Id : E; V : B := True);
5340 procedure Set_Is_Hidden (Id : E; V : B := True);
5341 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True);
5342 procedure Set_Is_Immediately_Visible (Id : E; V : B := True);
5343 procedure Set_Is_Imported (Id : E; V : B := True);
5344 procedure Set_Is_Inlined (Id : E; V : B := True);
5345 procedure Set_Is_Instantiated (Id : E; V : B := True);
5346 procedure Set_Is_Internal (Id : E; V : B := True);
5347 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True);
5348 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True);
5349 procedure Set_Is_Itype (Id : E; V : B := True);
5350 procedure Set_Is_Known_Valid (Id : E; V : B := True);
5351 procedure Set_Is_Limited_Composite (Id : E; V : B := True);
5352 procedure Set_Is_Limited_Record (Id : E; V : B := True);
5353 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True);
5354 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True);
5355 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True);
5356 procedure Set_Is_Optional_Parameter (Id : E; V : B := True);
5357 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True);
5358 procedure Set_Is_Packed (Id : E; V : B := True);
5359 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True);
5360 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True);
5361 procedure Set_Is_Preelaborated (Id : E; V : B := True);
5362 procedure Set_Is_Private_Composite (Id : E; V : B := True);
5363 procedure Set_Is_Private_Descendant (Id : E; V : B := True);
5364 procedure Set_Is_Psected (Id : E; V : B := True);
5365 procedure Set_Is_Public (Id : E; V : B := True);
5366 procedure Set_Is_Pure (Id : E; V : B := True);
5367 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True);
5368 procedure Set_Is_Remote_Types (Id : E; V : B := True);
5369 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True);
5370 procedure Set_Is_Shared_Passive (Id : E; V : B := True);
5371 procedure Set_Is_Statically_Allocated (Id : E; V : B := True);
5372 procedure Set_Is_Tag (Id : E; V : B := True);
5373 procedure Set_Is_Tagged_Type (Id : E; V : B := True);
5374 procedure Set_Is_True_Constant (Id : E; V : B := True);
5375 procedure Set_Is_Unchecked_Union (Id : E; V : B := True);
5376 procedure Set_Is_Unsigned_Type (Id : E; V : B := True);
5377 procedure Set_Is_VMS_Exception (Id : E; V : B := True);
5378 procedure Set_Is_Valued_Procedure (Id : E; V : B := True);
5379 procedure Set_Is_Visible_Child_Unit (Id : E; V : B := True);
5380 procedure Set_Is_Volatile (Id : E; V : B := True);
5381 procedure Set_Last_Entity (Id : E; V : E);
5382 procedure Set_Lit_Indexes (Id : E; V : E);
5383 procedure Set_Lit_Strings (Id : E; V : E);
5384 procedure Set_Machine_Radix_10 (Id : E; V : B := True);
5385 procedure Set_Master_Id (Id : E; V : E);
5386 procedure Set_Materialize_Entity (Id : E; V : B := True);
5387 procedure Set_Mechanism (Id : E; V : M);
5388 procedure Set_Modulus (Id : E; V : U);
5389 procedure Set_Needs_Debug_Info (Id : E; V : B := True);
5390 procedure Set_Needs_No_Actuals (Id : E; V : B := True);
5391 procedure Set_Next_Inlined_Subprogram (Id : E; V : E);
5392 procedure Set_No_Pool_Assigned (Id : E; V : B := True);
5393 procedure Set_No_Return (Id : E; V : B := True);
5394 procedure Set_Non_Binary_Modulus (Id : E; V : B := True);
5395 procedure Set_Nonzero_Is_True (Id : E; V : B := True);
5396 procedure Set_Normalized_First_Bit (Id : E; V : U);
5397 procedure Set_Normalized_Position (Id : E; V : U);
5398 procedure Set_Normalized_Position_Max (Id : E; V : U);
5399 procedure Set_Not_Source_Assigned (Id : E; V : B := True);
5400 procedure Set_Object_Ref (Id : E; V : E);
5401 procedure Set_Original_Record_Component (Id : E; V : E);
5402 procedure Set_Packed_Array_Type (Id : E; V : E);
5403 procedure Set_Parent_Subtype (Id : E; V : E);
5404 procedure Set_Primitive_Operations (Id : E; V : L);
5405 procedure Set_Prival (Id : E; V : E);
5406 procedure Set_Privals_Chain (Id : E; V : L);
5407 procedure Set_Private_Dependents (Id : E; V : L);
5408 procedure Set_Private_View (Id : E; V : N);
5409 procedure Set_Protected_Body_Subprogram (Id : E; V : E);
5410 procedure Set_Protected_Formal (Id : E; V : E);
5411 procedure Set_Protected_Operation (Id : E; V : N);
5412 procedure Set_RM_Size (Id : E; V : U);
5413 procedure Set_Reachable (Id : E; V : B := True);
5414 procedure Set_Referenced (Id : E; V : B := True);
5415 procedure Set_Referenced_Object (Id : E; V : N);
5416 procedure Set_Register_Exception_Call (Id : E; V : N);
5417 procedure Set_Related_Array_Object (Id : E; V : E);
5418 procedure Set_Related_Instance (Id : E; V : E);
5419 procedure Set_Renamed_Entity (Id : E; V : N);
5420 procedure Set_Renamed_Object (Id : E; V : N);
5421 procedure Set_Renaming_Map (Id : E; V : U);
5422 procedure Set_Return_Present (Id : E; V : B := True);
5423 procedure Set_Returns_By_Ref (Id : E; V : B := True);
5424 procedure Set_Reverse_Bit_Order (Id : E; V : B := True);
5425 procedure Set_Scalar_Range (Id : E; V : N);
5426 procedure Set_Scale_Value (Id : E; V : U);
5427 procedure Set_Scope_Depth_Value (Id : E; V : U);
5428 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True);
5429 procedure Set_Shadow_Entities (Id : E; V : S);
5430 procedure Set_Shared_Var_Assign_Proc (Id : E; V : E);
5431 procedure Set_Shared_Var_Read_Proc (Id : E; V : E);
5432 procedure Set_Size_Check_Code (Id : E; V : N);
5433 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True);
5434 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True);
5435 procedure Set_Small_Value (Id : E; V : R);
5436 procedure Set_Spec_Entity (Id : E; V : E);
5437 procedure Set_Storage_Size_Variable (Id : E; V : E);
5438 procedure Set_Strict_Alignment (Id : E; V : B := True);
5439 procedure Set_String_Literal_Length (Id : E; V : U);
5440 procedure Set_String_Literal_Low_Bound (Id : E; V : N);
5441 procedure Set_Suppress_Access_Checks (Id : E; V : B := True);
5442 procedure Set_Suppress_Accessibility_Checks (Id : E; V : B := True);
5443 procedure Set_Suppress_Discriminant_Checks (Id : E; V : B := True);
5444 procedure Set_Suppress_Division_Checks (Id : E; V : B := True);
5445 procedure Set_Suppress_Elaboration_Checks (Id : E; V : B := True);
5446 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True);
5447 procedure Set_Suppress_Index_Checks (Id : E; V : B := True);
5448 procedure Set_Suppress_Init_Proc (Id : E; V : B := True);
5449 procedure Set_Suppress_Length_Checks (Id : E; V : B := True);
5450 procedure Set_Suppress_Overflow_Checks (Id : E; V : B := True);
5451 procedure Set_Suppress_Range_Checks (Id : E; V : B := True);
5452 procedure Set_Suppress_Storage_Checks (Id : E; V : B := True);
5453 procedure Set_Suppress_Style_Checks (Id : E; V : B := True);
5454 procedure Set_Suppress_Tag_Checks (Id : E; V : B := True);
5455 procedure Set_Underlying_Full_View (Id : E; V : E);
5456 procedure Set_Unset_Reference (Id : E; V : N);
5457 procedure Set_Uses_Sec_Stack (Id : E; V : B := True);
5458 procedure Set_Vax_Float (Id : E; V : B := True);
5459 procedure Set_Warnings_Off (Id : E; V : B := True);
5461 -----------------------------------
5462 -- Field Initialization Routines --
5463 -----------------------------------
5465 -- These routines are overloadings of some of the above Set procedures
5466 -- where the argument is normally a Uint. The overloadings take an Int
5467 -- parameter instead, and appropriately convert it. There are also
5468 -- versions that implicitly initialize to the appropriate "not set"
5469 -- value. The not set (unknown) values are as follows:
5472 -- Component_Size Uint_0
5473 -- Component_Bit_Offset No_Uint
5474 -- Digits_Value Uint_0
5476 -- Normalized_First_Bit No_Uint
5477 -- Normalized_Position No_Uint
5478 -- Normalized_Position_Max No_Uint
5481 -- It would be cleaner to use No_Uint in all these cases, but historically
5482 -- we chose to use Uint_0 at first, and the change over will take time ???
5483 -- This is particularly true for the RM_Size field, where a value of zero
5484 -- is legitimate and causes some kludges around the code.
5486 procedure Init_Alignment (Id : E; V : Int);
5487 procedure Init_Component_Size (Id : E; V : Int);
5488 procedure Init_Component_Bit_Offset (Id : E; V : Int);
5489 procedure Init_Digits_Value (Id : E; V : Int);
5490 procedure Init_Esize (Id : E; V : Int);
5491 procedure Init_Normalized_First_Bit (Id : E; V : Int);
5492 procedure Init_Normalized_Position (Id : E; V : Int);
5493 procedure Init_Normalized_Position_Max (Id : E; V : Int);
5494 procedure Init_RM_Size (Id : E; V : Int);
5496 procedure Init_Alignment (Id : E);
5497 procedure Init_Component_Size (Id : E);
5498 procedure Init_Component_Bit_Offset (Id : E);
5499 procedure Init_Digits_Value (Id : E);
5500 procedure Init_Esize (Id : E);
5501 procedure Init_Normalized_First_Bit (Id : E);
5502 procedure Init_Normalized_Position (Id : E);
5503 procedure Init_Normalized_Position_Max (Id : E);
5504 procedure Init_RM_Size (Id : E);
5506 procedure Init_Size_Align (Id : E);
5507 -- This procedure initializes both size fields and the alignment
5508 -- field to all be Unknown.
5510 procedure Init_Size (Id : E; V : Int);
5511 -- Initialize both the Esize and RM_Size fields of E to V
5513 procedure Init_Component_Location (Id : E);
5514 -- Initializes all fields describing the location of a component
5515 -- (Normalized_Position, Component_Bit_Offset, Normalized_First_Bit,
5516 -- Normalized_Position_Max, Esize) to all be Unknown.
5522 -- The call to Next_xxx (obj) is equivalent to obj := Next_xxx (obj)
5523 -- We define the set of Proc_Next_xxx routines simply for the purposes
5524 -- of inlining them without necessarily inlining the function.
5526 procedure Proc_Next_Component (N : in out Node_Id);
5527 procedure Proc_Next_Discriminant (N : in out Node_Id);
5528 procedure Proc_Next_Formal (N : in out Node_Id);
5529 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id);
5530 procedure Proc_Next_Girder_Discriminant (N : in out Node_Id);
5531 procedure Proc_Next_Index (N : in out Node_Id);
5532 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id);
5533 procedure Proc_Next_Literal (N : in out Node_Id);
5535 pragma Inline (Proc_Next_Component);
5536 pragma Inline (Proc_Next_Discriminant);
5537 pragma Inline (Proc_Next_Formal);
5538 pragma Inline (Proc_Next_Formal_With_Extras);
5539 pragma Inline (Proc_Next_Girder_Discriminant);
5540 pragma Inline (Proc_Next_Index);
5541 pragma Inline (Proc_Next_Inlined_Subprogram);
5542 pragma Inline (Proc_Next_Literal);
5544 procedure Next_Component (N : in out Node_Id)
5545 renames Proc_Next_Component;
5547 procedure Next_Discriminant (N : in out Node_Id)
5548 renames Proc_Next_Discriminant;
5550 procedure Next_Formal (N : in out Node_Id)
5551 renames Proc_Next_Formal;
5553 procedure Next_Formal_With_Extras (N : in out Node_Id)
5554 renames Proc_Next_Formal_With_Extras;
5556 procedure Next_Girder_Discriminant (N : in out Node_Id)
5557 renames Proc_Next_Girder_Discriminant;
5559 procedure Next_Index (N : in out Node_Id)
5560 renames Proc_Next_Index;
5562 procedure Next_Inlined_Subprogram (N : in out Node_Id)
5563 renames Proc_Next_Inlined_Subprogram;
5565 procedure Next_Literal (N : in out Node_Id)
5566 renames Proc_Next_Literal;
5568 -------------------------------
5569 -- Miscellaneous Subprograms --
5570 -------------------------------
5572 procedure Append_Entity (Id : Entity_Id; V : Entity_Id);
5573 -- Add an entity to the list of entities declared in the scope V
5575 function Is_Entity_Name (N : Node_Id) return Boolean;
5576 -- Test if the node N is the name of an entity (i.e. is an identifier,
5577 -- expanded name, or an attribute reference that returns an entity).
5579 function Next_Index (Id : Node_Id) return Node_Id;
5580 -- Given an index from a previous call to First_Index or Next_Index,
5581 -- returns a node representing the occurrence of the next index subtype,
5582 -- or Empty if there are no more index subtypes.
5584 function Scope_Depth (Id : Entity_Id) return Uint;
5585 -- Returns the scope depth value of the Id, unless the Id is a record
5586 -- type, in which case it returns the scope depth of the record scope.
5588 function Subtype_Kind (K : Entity_Kind) return Entity_Kind;
5589 -- Given an entity_kind K this function returns the entity_kind
5590 -- corresponding to subtype kind of the type represented by K. For
5591 -- example if K is E_Signed_Integer_Type then E_Signed_Integer_Subtype
5592 -- is returned. If K is already a subtype kind it itself is returned. An
5593 -- internal error is generated if no such correspondence exists for K.
5595 ----------------------------------
5596 -- Debugging Output Subprograms --
5597 ----------------------------------
5599 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String);
5600 -- Writes a series of entries giving a line for each flag that is
5601 -- set to True. Each line is prefixed by the given string
5603 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String);
5604 -- A debugging procedure to write out information about an entity
5606 procedure Write_Field6_Name (Id : Entity_Id);
5607 procedure Write_Field7_Name (Id : Entity_Id);
5608 procedure Write_Field8_Name (Id : Entity_Id);
5609 procedure Write_Field9_Name (Id : Entity_Id);
5610 procedure Write_Field10_Name (Id : Entity_Id);
5611 procedure Write_Field11_Name (Id : Entity_Id);
5612 procedure Write_Field12_Name (Id : Entity_Id);
5613 procedure Write_Field13_Name (Id : Entity_Id);
5614 procedure Write_Field14_Name (Id : Entity_Id);
5615 procedure Write_Field15_Name (Id : Entity_Id);
5616 procedure Write_Field16_Name (Id : Entity_Id);
5617 procedure Write_Field17_Name (Id : Entity_Id);
5618 procedure Write_Field18_Name (Id : Entity_Id);
5619 procedure Write_Field19_Name (Id : Entity_Id);
5620 procedure Write_Field20_Name (Id : Entity_Id);
5621 procedure Write_Field21_Name (Id : Entity_Id);
5622 procedure Write_Field22_Name (Id : Entity_Id);
5623 procedure Write_Field23_Name (Id : Entity_Id);
5624 -- These routines are used to output a nice symbolic name for the given
5625 -- field, depending on the Ekind. No blanks or end of lines are output,
5626 -- just the characters of the field name.
5628 --------------------
5629 -- Inline Pragmas --
5630 --------------------
5632 -- Note that these inline pragmas are referenced by the XEINFO utility
5633 -- program in preparing the corresponding C header, and only those
5634 -- subprograms meeting the requirements documented in the section on
5635 -- XEINFO may be referenced in this section.
5637 pragma Inline (Accept_Address);
5638 pragma Inline (Access_Disp_Table);
5639 pragma Inline (Actual_Subtype);
5640 pragma Inline (Address_Taken);
5641 pragma Inline (Alias);
5642 pragma Inline (Alignment);
5643 pragma Inline (Associated_Final_Chain);
5644 pragma Inline (Associated_Formal_Package);
5645 pragma Inline (Associated_Node_For_Itype);
5646 pragma Inline (Associated_Storage_Pool);
5647 pragma Inline (Barrier_Function);
5648 pragma Inline (Block_Node);
5649 pragma Inline (Body_Entity);
5650 pragma Inline (CR_Discriminant);
5651 pragma Inline (C_Pass_By_Copy);
5652 pragma Inline (Class_Wide_Type);
5653 pragma Inline (Cloned_Subtype);
5654 pragma Inline (Component_Bit_Offset);
5655 pragma Inline (Component_Clause);
5656 pragma Inline (Component_Size);
5657 pragma Inline (Component_Type);
5658 pragma Inline (Corresponding_Concurrent_Type);
5659 pragma Inline (Corresponding_Discriminant);
5660 pragma Inline (Corresponding_Equality);
5661 pragma Inline (Corresponding_Record_Type);
5662 pragma Inline (Corresponding_Remote_Type);
5663 pragma Inline (Debug_Info_Off);
5664 pragma Inline (Debug_Renaming_Link);
5665 pragma Inline (DTC_Entity);
5666 pragma Inline (DT_Entry_Count);
5667 pragma Inline (DT_Position);
5668 pragma Inline (Default_Expr_Function);
5669 pragma Inline (Default_Expressions_Processed);
5670 pragma Inline (Default_Value);
5671 pragma Inline (Delay_Cleanups);
5672 pragma Inline (Delay_Subprogram_Descriptors);
5673 pragma Inline (Delta_Value);
5674 pragma Inline (Dependent_Instances);
5675 pragma Inline (Depends_On_Private);
5676 pragma Inline (Digits_Value);
5677 pragma Inline (Directly_Designated_Type);
5678 pragma Inline (Discard_Names);
5679 pragma Inline (Discriminal);
5680 pragma Inline (Discriminal_Link);
5681 pragma Inline (Discriminant_Checking_Func);
5682 pragma Inline (Discriminant_Constraint);
5683 pragma Inline (Discriminant_Default_Value);
5684 pragma Inline (Discriminant_Number);
5685 pragma Inline (Elaborate_All_Desirable);
5686 pragma Inline (Elaboration_Entity);
5687 pragma Inline (Elaboration_Entity_Required);
5688 pragma Inline (Enclosing_Scope);
5689 pragma Inline (Entry_Accepted);
5690 pragma Inline (Entry_Bodies_Array);
5691 pragma Inline (Entry_Cancel_Parameter);
5692 pragma Inline (Entry_Component);
5693 pragma Inline (Entry_Formal);
5694 pragma Inline (Entry_Index_Constant);
5695 pragma Inline (Entry_Index_Type);
5696 pragma Inline (Entry_Parameters_Type);
5697 pragma Inline (Enum_Pos_To_Rep);
5698 pragma Inline (Enumeration_Pos);
5699 pragma Inline (Enumeration_Rep);
5700 pragma Inline (Enumeration_Rep_Expr);
5701 pragma Inline (Equivalent_Type);
5702 pragma Inline (Esize);
5703 pragma Inline (Exception_Code);
5704 pragma Inline (Extra_Accessibility);
5705 pragma Inline (Extra_Constrained);
5706 pragma Inline (Extra_Formal);
5707 pragma Inline (Finalization_Chain_Entity);
5708 pragma Inline (First_Entity);
5709 pragma Inline (First_Index);
5710 pragma Inline (First_Literal);
5711 pragma Inline (First_Optional_Parameter);
5712 pragma Inline (First_Private_Entity);
5713 pragma Inline (First_Rep_Item);
5714 pragma Inline (Freeze_Node);
5715 pragma Inline (From_With_Type);
5716 pragma Inline (Full_View);
5717 pragma Inline (Function_Returns_With_DSP);
5718 pragma Inline (Generic_Renamings);
5719 pragma Inline (Girder_Constraint);
5720 pragma Inline (Handler_Records);
5721 pragma Inline (Has_Aliased_Components);
5722 pragma Inline (Has_Alignment_Clause);
5723 pragma Inline (Has_All_Calls_Remote);
5724 pragma Inline (Has_Atomic_Components);
5725 pragma Inline (Has_Biased_Representation);
5726 pragma Inline (Has_Completion);
5727 pragma Inline (Has_Completion_In_Body);
5728 pragma Inline (Has_Complex_Representation);
5729 pragma Inline (Has_Component_Size_Clause);
5730 pragma Inline (Has_Controlled_Component);
5731 pragma Inline (Has_Controlling_Result);
5732 pragma Inline (Has_Convention_Pragma);
5733 pragma Inline (Has_Delayed_Freeze);
5734 pragma Inline (Has_Discriminants);
5735 pragma Inline (Has_Enumeration_Rep_Clause);
5736 pragma Inline (Has_Exit);
5737 pragma Inline (Has_External_Tag_Rep_Clause);
5738 pragma Inline (Has_Fully_Qualified_Name);
5739 pragma Inline (Has_Gigi_Rep_Item);
5740 pragma Inline (Has_Homonym);
5741 pragma Inline (Has_Machine_Radix_Clause);
5742 pragma Inline (Has_Master_Entity);
5743 pragma Inline (Has_Missing_Return);
5744 pragma Inline (Has_Nested_Block_With_Handler);
5745 pragma Inline (Has_Forward_Instantiation);
5746 pragma Inline (Has_Non_Standard_Rep);
5747 pragma Inline (Has_Object_Size_Clause);
5748 pragma Inline (Has_Per_Object_Constraint);
5749 pragma Inline (Has_Pragma_Controlled);
5750 pragma Inline (Has_Pragma_Elaborate_Body);
5751 pragma Inline (Has_Pragma_Inline);
5752 pragma Inline (Has_Pragma_Pack);
5753 pragma Inline (Has_Primitive_Operations);
5754 pragma Inline (Has_Private_Declaration);
5755 pragma Inline (Has_Qualified_Name);
5756 pragma Inline (Has_Record_Rep_Clause);
5757 pragma Inline (Has_Recursive_Call);
5758 pragma Inline (Has_Size_Clause);
5759 pragma Inline (Has_Small_Clause);
5760 pragma Inline (Has_Specified_Layout);
5761 pragma Inline (Has_Storage_Size_Clause);
5762 pragma Inline (Has_Subprogram_Descriptor);
5763 pragma Inline (Has_Task);
5764 pragma Inline (Has_Unchecked_Union);
5765 pragma Inline (Has_Unknown_Discriminants);
5766 pragma Inline (Has_Volatile_Components);
5767 pragma Inline (Hiding_Loop_Variable);
5768 pragma Inline (Homonym);
5769 pragma Inline (In_Package_Body);
5770 pragma Inline (In_Private_Part);
5771 pragma Inline (In_Use);
5772 pragma Inline (Inner_Instances);
5773 pragma Inline (Interface_Name);
5774 pragma Inline (Is_AST_Entry);
5775 pragma Inline (Is_Abstract);
5776 pragma Inline (Is_Access_Constant);
5777 pragma Inline (Is_Access_Type);
5778 pragma Inline (Is_Aliased);
5779 pragma Inline (Is_Array_Type);
5780 pragma Inline (Is_Asynchronous);
5781 pragma Inline (Is_Atomic);
5782 pragma Inline (Is_Bit_Packed_Array);
5783 pragma Inline (Is_CPP_Class);
5784 pragma Inline (Is_Called);
5785 pragma Inline (Is_Character_Type);
5786 pragma Inline (Is_Child_Unit);
5787 pragma Inline (Is_Class_Wide_Type);
5788 pragma Inline (Is_Compilation_Unit);
5789 pragma Inline (Is_Completely_Hidden);
5790 pragma Inline (Is_Composite_Type);
5791 pragma Inline (Is_Concurrent_Body);
5792 pragma Inline (Is_Concurrent_Record_Type);
5793 pragma Inline (Is_Concurrent_Type);
5794 pragma Inline (Is_Constr_Subt_For_UN_Aliased);
5795 pragma Inline (Is_Constr_Subt_For_U_Nominal);
5796 pragma Inline (Is_Constrained);
5797 pragma Inline (Is_Constructor);
5798 pragma Inline (Is_Controlled);
5799 pragma Inline (Is_Controlling_Formal);
5800 pragma Inline (Is_Decimal_Fixed_Point_Type);
5801 pragma Inline (Is_Destructor);
5802 pragma Inline (Is_Discrim_SO_Function);
5803 pragma Inline (Is_Digits_Type);
5804 pragma Inline (Is_Discrete_Or_Fixed_Point_Type);
5805 pragma Inline (Is_Discrete_Type);
5806 pragma Inline (Is_Dispatching_Operation);
5807 pragma Inline (Is_Elementary_Type);
5808 pragma Inline (Is_Eliminated);
5809 pragma Inline (Is_Entry);
5810 pragma Inline (Is_Entry_Formal);
5811 pragma Inline (Is_Enumeration_Type);
5812 pragma Inline (Is_Exported);
5813 pragma Inline (Is_First_Subtype);
5814 pragma Inline (Is_Fixed_Point_Type);
5815 pragma Inline (Is_Floating_Point_Type);
5816 pragma Inline (Is_For_Access_Subtype);
5817 pragma Inline (Is_Formal);
5818 pragma Inline (Is_Formal_Subprogram);
5819 pragma Inline (Is_Frozen);
5820 pragma Inline (Is_Generic_Actual_Type);
5821 pragma Inline (Is_Generic_Instance);
5822 pragma Inline (Is_Generic_Type);
5823 pragma Inline (Is_Generic_Unit);
5824 pragma Inline (Is_Hidden);
5825 pragma Inline (Is_Hidden_Open_Scope);
5826 pragma Inline (Is_Immediately_Visible);
5827 pragma Inline (Is_Imported);
5828 pragma Inline (Is_Incomplete_Or_Private_Type);
5829 pragma Inline (Is_Inlined);
5830 pragma Inline (Is_Instantiated);
5831 pragma Inline (Is_Integer_Type);
5832 pragma Inline (Is_Internal);
5833 pragma Inline (Is_Interrupt_Handler);
5834 pragma Inline (Is_Intrinsic_Subprogram);
5835 pragma Inline (Is_Itype);
5836 pragma Inline (Is_Known_Valid);
5837 pragma Inline (Is_Limited_Composite);
5838 pragma Inline (Is_Limited_Record);
5839 pragma Inline (Is_Machine_Code_Subprogram);
5840 pragma Inline (Is_Modular_Integer_Type);
5841 pragma Inline (Is_Named_Number);
5842 pragma Inline (Is_Non_Static_Subtype);
5843 pragma Inline (Is_Null_Init_Proc);
5844 pragma Inline (Is_Numeric_Type);
5845 pragma Inline (Is_Object);
5846 pragma Inline (Is_Optional_Parameter);
5847 pragma Inline (Is_Package_Body_Entity);
5848 pragma Inline (Is_Ordinary_Fixed_Point_Type);
5849 pragma Inline (Is_Overloadable);
5850 pragma Inline (Is_Packed);
5851 pragma Inline (Is_Packed_Array_Type);
5852 pragma Inline (Is_Potentially_Use_Visible);
5853 pragma Inline (Is_Preelaborated);
5854 pragma Inline (Is_Private_Composite);
5855 pragma Inline (Is_Private_Descendant);
5856 pragma Inline (Is_Private_Type);
5857 pragma Inline (Is_Protected_Type);
5858 pragma Inline (Is_Psected);
5859 pragma Inline (Is_Public);
5860 pragma Inline (Is_Pure);
5861 pragma Inline (Is_Real_Type);
5862 pragma Inline (Is_Record_Type);
5863 pragma Inline (Is_Remote_Call_Interface);
5864 pragma Inline (Is_Remote_Types);
5865 pragma Inline (Is_Renaming_Of_Object);
5866 pragma Inline (Is_Scalar_Type);
5867 pragma Inline (Is_Shared_Passive);
5868 pragma Inline (Is_Signed_Integer_Type);
5869 pragma Inline (Is_Statically_Allocated);
5870 pragma Inline (Is_Subprogram);
5871 pragma Inline (Is_Tag);
5872 pragma Inline (Is_Tagged_Type);
5873 pragma Inline (Is_True_Constant);
5874 pragma Inline (Is_Task_Type);
5875 pragma Inline (Is_Type);
5876 pragma Inline (Is_Unchecked_Union);
5877 pragma Inline (Is_Unsigned_Type);
5878 pragma Inline (Is_VMS_Exception);
5879 pragma Inline (Is_Valued_Procedure);
5880 pragma Inline (Is_Visible_Child_Unit);
5881 pragma Inline (Is_Volatile);
5882 pragma Inline (Last_Entity);
5883 pragma Inline (Lit_Indexes);
5884 pragma Inline (Lit_Strings);
5885 pragma Inline (Machine_Radix_10);
5886 pragma Inline (Master_Id);
5887 pragma Inline (Materialize_Entity);
5888 pragma Inline (Mechanism);
5889 pragma Inline (Modulus);
5890 pragma Inline (Needs_Debug_Info);
5891 pragma Inline (Needs_No_Actuals);
5892 pragma Inline (Next_Index);
5893 pragma Inline (Next_Inlined_Subprogram);
5894 pragma Inline (Next_Literal);
5895 pragma Inline (No_Pool_Assigned);
5896 pragma Inline (No_Return);
5897 pragma Inline (Non_Binary_Modulus);
5898 pragma Inline (Nonzero_Is_True);
5899 pragma Inline (Normalized_First_Bit);
5900 pragma Inline (Normalized_Position);
5901 pragma Inline (Normalized_Position_Max);
5902 pragma Inline (Not_Source_Assigned);
5903 pragma Inline (Object_Ref);
5904 pragma Inline (Original_Record_Component);
5905 pragma Inline (Packed_Array_Type);
5906 pragma Inline (Parameter_Mode);
5907 pragma Inline (Parent_Subtype);
5908 pragma Inline (Primitive_Operations);
5909 pragma Inline (Prival);
5910 pragma Inline (Privals_Chain);
5911 pragma Inline (Private_Dependents);
5912 pragma Inline (Private_View);
5913 pragma Inline (Protected_Body_Subprogram);
5914 pragma Inline (Protected_Formal);
5915 pragma Inline (Protected_Operation);
5916 pragma Inline (RM_Size);
5917 pragma Inline (Reachable);
5918 pragma Inline (Referenced);
5919 pragma Inline (Referenced_Object);
5920 pragma Inline (Register_Exception_Call);
5921 pragma Inline (Related_Array_Object);
5922 pragma Inline (Related_Instance);
5923 pragma Inline (Renamed_Entity);
5924 pragma Inline (Renamed_Object);
5925 pragma Inline (Renaming_Map);
5926 pragma Inline (Return_Present);
5927 pragma Inline (Returns_By_Ref);
5928 pragma Inline (Reverse_Bit_Order);
5929 pragma Inline (Scalar_Range);
5930 pragma Inline (Scale_Value);
5931 pragma Inline (Scope_Depth_Value);
5932 pragma Inline (Sec_Stack_Needed_For_Return);
5933 pragma Inline (Shadow_Entities);
5934 pragma Inline (Shared_Var_Assign_Proc);
5935 pragma Inline (Shared_Var_Read_Proc);
5936 pragma Inline (Size_Check_Code);
5937 pragma Inline (Size_Depends_On_Discriminant);
5938 pragma Inline (Size_Known_At_Compile_Time);
5939 pragma Inline (Small_Value);
5940 pragma Inline (Spec_Entity);
5941 pragma Inline (Storage_Size_Variable);
5942 pragma Inline (Strict_Alignment);
5943 pragma Inline (String_Literal_Length);
5944 pragma Inline (String_Literal_Low_Bound);
5945 pragma Inline (Suppress_Access_Checks);
5946 pragma Inline (Suppress_Accessibility_Checks);
5947 pragma Inline (Suppress_Discriminant_Checks);
5948 pragma Inline (Suppress_Division_Checks);
5949 pragma Inline (Suppress_Elaboration_Checks);
5950 pragma Inline (Suppress_Elaboration_Warnings);
5951 pragma Inline (Suppress_Index_Checks);
5952 pragma Inline (Suppress_Init_Proc);
5953 pragma Inline (Suppress_Length_Checks);
5954 pragma Inline (Suppress_Overflow_Checks);
5955 pragma Inline (Suppress_Range_Checks);
5956 pragma Inline (Suppress_Storage_Checks);
5957 pragma Inline (Suppress_Style_Checks);
5958 pragma Inline (Suppress_Tag_Checks);
5959 pragma Inline (Underlying_Full_View);
5960 pragma Inline (Unset_Reference);
5961 pragma Inline (Uses_Sec_Stack);
5962 pragma Inline (Vax_Float);
5963 pragma Inline (Warnings_Off);
5965 pragma Inline (Init_Alignment);
5966 pragma Inline (Init_Component_Bit_Offset);
5967 pragma Inline (Init_Component_Size);
5968 pragma Inline (Init_Digits_Value);
5969 pragma Inline (Init_Esize);
5970 pragma Inline (Init_RM_Size);
5972 pragma Inline (Known_Alignment);
5973 pragma Inline (Known_Component_Bit_Offset);
5974 pragma Inline (Known_Component_Size);
5975 pragma Inline (Known_Esize);
5977 pragma Inline (Known_Static_Component_Size);
5978 pragma Inline (Known_Static_Esize);
5980 pragma Inline (Unknown_Alignment);
5981 pragma Inline (Unknown_Component_Bit_Offset);
5982 pragma Inline (Unknown_Component_Size);
5983 pragma Inline (Unknown_Esize);
5985 pragma Inline (Set_Accept_Address);
5986 pragma Inline (Set_Access_Disp_Table);
5987 pragma Inline (Set_Actual_Subtype);
5988 pragma Inline (Set_Address_Taken);
5989 pragma Inline (Set_Alias);
5990 pragma Inline (Set_Alignment);
5991 pragma Inline (Set_Associated_Final_Chain);
5992 pragma Inline (Set_Associated_Formal_Package);
5993 pragma Inline (Set_Associated_Node_For_Itype);
5994 pragma Inline (Set_Associated_Storage_Pool);
5995 pragma Inline (Set_Barrier_Function);
5996 pragma Inline (Set_Block_Node);
5997 pragma Inline (Set_Body_Entity);
5998 pragma Inline (Set_CR_Discriminant);
5999 pragma Inline (Set_C_Pass_By_Copy);
6000 pragma Inline (Set_Class_Wide_Type);
6001 pragma Inline (Set_Cloned_Subtype);
6002 pragma Inline (Set_Component_Bit_Offset);
6003 pragma Inline (Set_Component_Clause);
6004 pragma Inline (Set_Component_Size);
6005 pragma Inline (Set_Component_Type);
6006 pragma Inline (Set_Corresponding_Concurrent_Type);
6007 pragma Inline (Set_Corresponding_Discriminant);
6008 pragma Inline (Set_Corresponding_Equality);
6009 pragma Inline (Set_Corresponding_Record_Type);
6010 pragma Inline (Set_Corresponding_Remote_Type);
6011 pragma Inline (Set_Debug_Info_Off);
6012 pragma Inline (Set_Debug_Renaming_Link);
6013 pragma Inline (Set_DTC_Entity);
6014 pragma Inline (Set_DT_Position);
6015 pragma Inline (Set_Default_Expr_Function);
6016 pragma Inline (Set_Default_Expressions_Processed);
6017 pragma Inline (Set_Default_Value);
6018 pragma Inline (Set_Delay_Cleanups);
6019 pragma Inline (Set_Delay_Subprogram_Descriptors);
6020 pragma Inline (Set_Delta_Value);
6021 pragma Inline (Set_Dependent_Instances);
6022 pragma Inline (Set_Depends_On_Private);
6023 pragma Inline (Set_Digits_Value);
6024 pragma Inline (Set_Directly_Designated_Type);
6025 pragma Inline (Set_Discard_Names);
6026 pragma Inline (Set_Discriminal);
6027 pragma Inline (Set_Discriminal_Link);
6028 pragma Inline (Set_Discriminant_Checking_Func);
6029 pragma Inline (Set_Discriminant_Constraint);
6030 pragma Inline (Set_Discriminant_Default_Value);
6031 pragma Inline (Set_Discriminant_Number);
6032 pragma Inline (Set_Elaborate_All_Desirable);
6033 pragma Inline (Set_Elaboration_Entity);
6034 pragma Inline (Set_Elaboration_Entity_Required);
6035 pragma Inline (Set_Enclosing_Scope);
6036 pragma Inline (Set_Entry_Accepted);
6037 pragma Inline (Set_Entry_Bodies_Array);
6038 pragma Inline (Set_Entry_Cancel_Parameter);
6039 pragma Inline (Set_Entry_Component);
6040 pragma Inline (Set_Entry_Formal);
6041 pragma Inline (Set_Entry_Parameters_Type);
6042 pragma Inline (Set_Enum_Pos_To_Rep);
6043 pragma Inline (Set_Enumeration_Pos);
6044 pragma Inline (Set_Enumeration_Rep);
6045 pragma Inline (Set_Enumeration_Rep_Expr);
6046 pragma Inline (Set_Equivalent_Type);
6047 pragma Inline (Set_Esize);
6048 pragma Inline (Set_Exception_Code);
6049 pragma Inline (Set_Extra_Accessibility);
6050 pragma Inline (Set_Extra_Constrained);
6051 pragma Inline (Set_Extra_Formal);
6052 pragma Inline (Set_Finalization_Chain_Entity);
6053 pragma Inline (Set_First_Entity);
6054 pragma Inline (Set_First_Index);
6055 pragma Inline (Set_First_Literal);
6056 pragma Inline (Set_First_Optional_Parameter);
6057 pragma Inline (Set_First_Private_Entity);
6058 pragma Inline (Set_First_Rep_Item);
6059 pragma Inline (Set_Freeze_Node);
6060 pragma Inline (Set_From_With_Type);
6061 pragma Inline (Set_Full_View);
6062 pragma Inline (Set_Function_Returns_With_DSP);
6063 pragma Inline (Set_Generic_Renamings);
6064 pragma Inline (Set_Girder_Constraint);
6065 pragma Inline (Set_Handler_Records);
6066 pragma Inline (Set_Has_Aliased_Components);
6067 pragma Inline (Set_Has_Alignment_Clause);
6068 pragma Inline (Set_Has_All_Calls_Remote);
6069 pragma Inline (Set_Has_Atomic_Components);
6070 pragma Inline (Set_Has_Biased_Representation);
6071 pragma Inline (Set_Has_Completion);
6072 pragma Inline (Set_Has_Completion_In_Body);
6073 pragma Inline (Set_Has_Complex_Representation);
6074 pragma Inline (Set_Has_Component_Size_Clause);
6075 pragma Inline (Set_Has_Controlled_Component);
6076 pragma Inline (Set_Has_Controlling_Result);
6077 pragma Inline (Set_Has_Convention_Pragma);
6078 pragma Inline (Set_Has_Delayed_Freeze);
6079 pragma Inline (Set_Has_Discriminants);
6080 pragma Inline (Set_Has_Enumeration_Rep_Clause);
6081 pragma Inline (Set_Has_Exit);
6082 pragma Inline (Set_Has_External_Tag_Rep_Clause);
6083 pragma Inline (Set_Has_Fully_Qualified_Name);
6084 pragma Inline (Set_Has_Gigi_Rep_Item);
6085 pragma Inline (Set_Has_Homonym);
6086 pragma Inline (Set_Has_Machine_Radix_Clause);
6087 pragma Inline (Set_Has_Master_Entity);
6088 pragma Inline (Set_Has_Missing_Return);
6089 pragma Inline (Set_Has_Nested_Block_With_Handler);
6090 pragma Inline (Set_Has_Forward_Instantiation);
6091 pragma Inline (Set_Has_Non_Standard_Rep);
6092 pragma Inline (Set_Has_Object_Size_Clause);
6093 pragma Inline (Set_Has_Per_Object_Constraint);
6094 pragma Inline (Set_Has_Pragma_Controlled);
6095 pragma Inline (Set_Has_Pragma_Elaborate_Body);
6096 pragma Inline (Set_Has_Pragma_Inline);
6097 pragma Inline (Set_Has_Pragma_Pack);
6098 pragma Inline (Set_Has_Primitive_Operations);
6099 pragma Inline (Set_Has_Private_Declaration);
6100 pragma Inline (Set_Has_Qualified_Name);
6101 pragma Inline (Set_Has_Record_Rep_Clause);
6102 pragma Inline (Set_Has_Recursive_Call);
6103 pragma Inline (Set_Has_Size_Clause);
6104 pragma Inline (Set_Has_Small_Clause);
6105 pragma Inline (Set_Has_Specified_Layout);
6106 pragma Inline (Set_Has_Storage_Size_Clause);
6107 pragma Inline (Set_Has_Subprogram_Descriptor);
6108 pragma Inline (Set_Has_Task);
6109 pragma Inline (Set_Has_Unchecked_Union);
6110 pragma Inline (Set_Has_Unknown_Discriminants);
6111 pragma Inline (Set_Has_Volatile_Components);
6112 pragma Inline (Set_Hiding_Loop_Variable);
6113 pragma Inline (Set_Homonym);
6114 pragma Inline (Set_In_Package_Body);
6115 pragma Inline (Set_In_Private_Part);
6116 pragma Inline (Set_In_Use);
6117 pragma Inline (Set_Inner_Instances);
6118 pragma Inline (Set_Interface_Name);
6119 pragma Inline (Set_Is_AST_Entry);
6120 pragma Inline (Set_Is_Abstract);
6121 pragma Inline (Set_Is_Access_Constant);
6122 pragma Inline (Set_Is_Aliased);
6123 pragma Inline (Set_Is_Asynchronous);
6124 pragma Inline (Set_Is_Atomic);
6125 pragma Inline (Set_Is_Bit_Packed_Array);
6126 pragma Inline (Set_Is_CPP_Class);
6127 pragma Inline (Set_Is_Called);
6128 pragma Inline (Set_Is_Character_Type);
6129 pragma Inline (Set_Is_Child_Unit);
6130 pragma Inline (Set_Is_Compilation_Unit);
6131 pragma Inline (Set_Is_Completely_Hidden);
6132 pragma Inline (Set_Is_Concurrent_Record_Type);
6133 pragma Inline (Set_Is_Constr_Subt_For_U_Nominal);
6134 pragma Inline (Set_Is_Constr_Subt_For_UN_Aliased);
6135 pragma Inline (Set_Is_Constrained);
6136 pragma Inline (Set_Is_Constructor);
6137 pragma Inline (Set_Is_Controlled);
6138 pragma Inline (Set_Is_Controlling_Formal);
6139 pragma Inline (Set_Is_Destructor);
6140 pragma Inline (Set_Is_Discrim_SO_Function);
6141 pragma Inline (Set_Is_Dispatching_Operation);
6142 pragma Inline (Set_Is_Eliminated);
6143 pragma Inline (Set_Is_Entry_Formal);
6144 pragma Inline (Set_Is_Exported);
6145 pragma Inline (Set_Is_First_Subtype);
6146 pragma Inline (Set_Is_For_Access_Subtype);
6147 pragma Inline (Set_Is_Formal_Subprogram);
6148 pragma Inline (Set_Is_Frozen);
6149 pragma Inline (Set_Is_Generic_Actual_Type);
6150 pragma Inline (Set_Is_Generic_Instance);
6151 pragma Inline (Set_Is_Generic_Type);
6152 pragma Inline (Set_Is_Hidden);
6153 pragma Inline (Set_Is_Hidden_Open_Scope);
6154 pragma Inline (Set_Is_Immediately_Visible);
6155 pragma Inline (Set_Is_Imported);
6156 pragma Inline (Set_Is_Inlined);
6157 pragma Inline (Set_Is_Instantiated);
6158 pragma Inline (Set_Is_Internal);
6159 pragma Inline (Set_Is_Interrupt_Handler);
6160 pragma Inline (Set_Is_Intrinsic_Subprogram);
6161 pragma Inline (Set_Is_Itype);
6162 pragma Inline (Set_Is_Known_Valid);
6163 pragma Inline (Set_Is_Limited_Composite);
6164 pragma Inline (Set_Is_Limited_Record);
6165 pragma Inline (Set_Is_Machine_Code_Subprogram);
6166 pragma Inline (Set_Is_Non_Static_Subtype);
6167 pragma Inline (Set_Is_Null_Init_Proc);
6168 pragma Inline (Set_Is_Optional_Parameter);
6169 pragma Inline (Set_Is_Package_Body_Entity);
6170 pragma Inline (Set_Is_Packed);
6171 pragma Inline (Set_Is_Packed_Array_Type);
6172 pragma Inline (Set_Is_Potentially_Use_Visible);
6173 pragma Inline (Set_Is_Preelaborated);
6174 pragma Inline (Set_Is_Private_Composite);
6175 pragma Inline (Set_Is_Private_Descendant);
6176 pragma Inline (Set_Is_Psected);
6177 pragma Inline (Set_Is_Public);
6178 pragma Inline (Set_Is_Pure);
6179 pragma Inline (Set_Is_Remote_Call_Interface);
6180 pragma Inline (Set_Is_Remote_Types);
6181 pragma Inline (Set_Is_Renaming_Of_Object);
6182 pragma Inline (Set_Is_Shared_Passive);
6183 pragma Inline (Set_Is_Statically_Allocated);
6184 pragma Inline (Set_Is_Tag);
6185 pragma Inline (Set_Is_Tagged_Type);
6186 pragma Inline (Set_Is_True_Constant);
6187 pragma Inline (Set_Is_Unchecked_Union);
6188 pragma Inline (Set_Is_Unsigned_Type);
6189 pragma Inline (Set_Is_VMS_Exception);
6190 pragma Inline (Set_Is_Valued_Procedure);
6191 pragma Inline (Set_Is_Visible_Child_Unit);
6192 pragma Inline (Set_Is_Volatile);
6193 pragma Inline (Set_Last_Entity);
6194 pragma Inline (Set_Lit_Indexes);
6195 pragma Inline (Set_Lit_Strings);
6196 pragma Inline (Set_Machine_Radix_10);
6197 pragma Inline (Set_Master_Id);
6198 pragma Inline (Set_Materialize_Entity);
6199 pragma Inline (Set_Mechanism);
6200 pragma Inline (Set_Modulus);
6201 pragma Inline (Set_Needs_Debug_Info);
6202 pragma Inline (Set_Needs_No_Actuals);
6203 pragma Inline (Set_Next_Inlined_Subprogram);
6204 pragma Inline (Set_No_Pool_Assigned);
6205 pragma Inline (Set_No_Return);
6206 pragma Inline (Set_Non_Binary_Modulus);
6207 pragma Inline (Set_Nonzero_Is_True);
6208 pragma Inline (Set_Normalized_First_Bit);
6209 pragma Inline (Set_Normalized_Position);
6210 pragma Inline (Set_Normalized_Position_Max);
6211 pragma Inline (Set_Not_Source_Assigned);
6212 pragma Inline (Set_Object_Ref);
6213 pragma Inline (Set_Original_Record_Component);
6214 pragma Inline (Set_Packed_Array_Type);
6215 pragma Inline (Set_Parent_Subtype);
6216 pragma Inline (Set_Primitive_Operations);
6217 pragma Inline (Set_Prival);
6218 pragma Inline (Set_Privals_Chain);
6219 pragma Inline (Set_Private_Dependents);
6220 pragma Inline (Set_Private_View);
6221 pragma Inline (Set_Protected_Body_Subprogram);
6222 pragma Inline (Set_Protected_Formal);
6223 pragma Inline (Set_Protected_Operation);
6224 pragma Inline (Set_RM_Size);
6225 pragma Inline (Set_Reachable);
6226 pragma Inline (Set_Referenced);
6227 pragma Inline (Set_Referenced_Object);
6228 pragma Inline (Set_Register_Exception_Call);
6229 pragma Inline (Set_Related_Array_Object);
6230 pragma Inline (Set_Related_Instance);
6231 pragma Inline (Set_Renamed_Entity);
6232 pragma Inline (Set_Renamed_Object);
6233 pragma Inline (Set_Renaming_Map);
6234 pragma Inline (Set_Return_Present);
6235 pragma Inline (Set_Returns_By_Ref);
6236 pragma Inline (Set_Reverse_Bit_Order);
6237 pragma Inline (Set_Scalar_Range);
6238 pragma Inline (Set_Scale_Value);
6239 pragma Inline (Set_Scope_Depth_Value);
6240 pragma Inline (Set_Sec_Stack_Needed_For_Return);
6241 pragma Inline (Set_Shadow_Entities);
6242 pragma Inline (Set_Shared_Var_Assign_Proc);
6243 pragma Inline (Set_Shared_Var_Read_Proc);
6244 pragma Inline (Set_Size_Check_Code);
6245 pragma Inline (Set_Size_Depends_On_Discriminant);
6246 pragma Inline (Set_Size_Known_At_Compile_Time);
6247 pragma Inline (Set_Small_Value);
6248 pragma Inline (Set_Spec_Entity);
6249 pragma Inline (Set_Storage_Size_Variable);
6250 pragma Inline (Set_Strict_Alignment);
6251 pragma Inline (Set_String_Literal_Length);
6252 pragma Inline (Set_String_Literal_Low_Bound);
6253 pragma Inline (Set_Suppress_Access_Checks);
6254 pragma Inline (Set_Suppress_Accessibility_Checks);
6255 pragma Inline (Set_Suppress_Discriminant_Checks);
6256 pragma Inline (Set_Suppress_Division_Checks);
6257 pragma Inline (Set_Suppress_Elaboration_Checks);
6258 pragma Inline (Set_Suppress_Elaboration_Warnings);
6259 pragma Inline (Set_Suppress_Index_Checks);
6260 pragma Inline (Set_Suppress_Init_Proc);
6261 pragma Inline (Set_Suppress_Length_Checks);
6262 pragma Inline (Set_Suppress_Overflow_Checks);
6263 pragma Inline (Set_Suppress_Range_Checks);
6264 pragma Inline (Set_Suppress_Storage_Checks);
6265 pragma Inline (Set_Suppress_Style_Checks);
6266 pragma Inline (Set_Suppress_Tag_Checks);
6267 pragma Inline (Set_Underlying_Full_View);
6268 pragma Inline (Set_Unset_Reference);
6269 pragma Inline (Set_Uses_Sec_Stack);
6270 pragma Inline (Set_Vax_Float);
6271 pragma Inline (Set_Warnings_Off);
6273 -- END XEINFO INLINES
6275 -- The following Inline pragmas are *not* read by xeinfo when building
6276 -- the C version of this interface automatically (so the C version will
6277 -- end up making out of line calls). The pragma scan in xeinfo will be
6278 -- terminated on encountering the END XEINFO INLINES line. We inline
6279 -- things here which are small, but not of the canonical attribute
6280 -- access/set format that can be handled by xeinfo.
6282 pragma Inline (Is_Package);
6283 pragma Inline (Is_Wrapper_Package);
6284 pragma Inline (Known_RM_Size);
6285 pragma Inline (Known_Static_Component_Bit_Offset);
6286 pragma Inline (Known_Static_RM_Size);
6287 pragma Inline (Scope_Depth);
6288 pragma Inline (Scope_Depth_Set);
6289 pragma Inline (Unknown_RM_Size);