]> gcc.gnu.org Git - gcc.git/blob - gcc/ada/einfo.ads
[Ada] Fix references to old variables that have been refactored
[gcc.git] / gcc / ada / einfo.ads
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- E I N F O --
6 -- --
7 -- S p e c --
8 -- --
9 -- Copyright (C) 1992-2022, Free Software Foundation, Inc. --
10 -- --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
17 -- for more details. You should have received a copy of the GNU General --
18 -- Public License distributed with GNAT; see file COPYING3. If not, go to --
19 -- http://www.gnu.org/licenses for a complete copy of the license. --
20 -- --
21 -- GNAT was originally developed by the GNAT team at New York University. --
22 -- Extensive contributions were provided by Ada Core Technologies Inc. --
23 -- --
24 ------------------------------------------------------------------------------
25
26 pragma Warnings (Off); -- with/use clauses for children
27 with Namet; use Namet;
28 with Snames; use Snames;
29 with Stand; use Stand;
30 with Types; use Types;
31 with Uintp; use Uintp;
32 with Urealp; use Urealp;
33 pragma Warnings (On);
34
35 package Einfo is
36
37 -- This package documents the annotations to the abstract syntax tree that are
38 -- needed to support semantic processing of an Ada compilation.
39
40 -- See the spec of Gen_IL.Gen for instructions on making changes to this file.
41 -- Note that the official definition of what entities have what fields is in
42 -- Gen_IL.Gen.Gen_Entities; if there is a discrepancy between that and the
43 -- comments here, Gen_IL.Gen.Gen_Entities wins.
44
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 fields in
50 -- tree nodes.
51
52 -- There are two kinds of semantic information
53
54 -- First, the tree nodes with the following Nkind values:
55
56 -- N_Defining_Identifier
57 -- N_Defining_Character_Literal
58 -- N_Defining_Operator_Symbol
59
60 -- are called Entities, and constitute the information that would often
61 -- be stored separately in a symbol table. These nodes are all extended
62 -- to provide extra space, and contain fields which depend on the entity
63 -- kind, as defined by the contents of the Ekind field. The use of the
64 -- Ekind field, and the associated fields in the entity, are defined
65 -- in this package, as are the access functions to these fields.
66
67 -- Second, in some cases semantic information is stored directly in other
68 -- kinds of nodes, e.g. the Etype field, used to indicate the type of an
69 -- expression. These fields are defined in the Sinfo package, but their
70 -- full documentation is in the Einfo package specification.
71
72 -- Declaration processing places information in the nodes of their defining
73 -- identifiers. Name resolution places in all other occurrences of an
74 -- identifier a pointer to the corresponding defining occurrence.
75
76 ----------------------------------
77 -- Handling of Type'Size Values --
78 ----------------------------------
79
80 -- The Ada 95 RM contains some rather peculiar (to us) rules on the value
81 -- of type'Size (see RM 13.3(55)). We have found that attempting to use
82 -- these RM Size values generally, and in particular for determining the
83 -- default size of objects, creates chaos, and major incompatibilities in
84 -- existing code.
85
86 -- The Ada 2022 RM acknowledges it and adopts GNAT's Object_Size attribute
87 -- for determining the default size of objects, but stops short of applying
88 -- it universally like GNAT. Indeed the notable exceptions are nonaliased
89 -- stand-alone objects, which are not covered by Object_Size in Ada 2022.
90
91 -- We proceed as follows, for discrete and fixed-point subtypes, we have
92 -- two separate sizes for each subtype:
93
94 -- The Object_Size, which is used for determining the default size of
95 -- objects and components. This size value can be referred to using the
96 -- Object_Size attribute. The phrase "is used" here means that it is
97 -- the basis of the determination of the size. The back end is free to
98 -- pad this up if necessary for efficiency, e.g. an 8-bit stand-alone
99 -- character might be stored in 32 bits on a machine with no efficient
100 -- byte access instructions such as the Alpha.
101
102 -- The default rules for the value of Object_Size are as follows:
103
104 -- The Object_Size for base subtypes reflect the natural hardware
105 -- size in bits (see Ttypes and Cstand for integer types). For
106 -- enumeration and fixed-point base subtypes have 8, 16, 32, or 64
107 -- bits for this size, depending on the range of values to be stored.
108
109 -- The Object_Size of a subtype is the same as the Object_Size of
110 -- the subtype from which it is obtained.
111
112 -- The Object_Size of a derived base type is copied from the parent
113 -- base type, and the Object_Size of a derived first subtype is copied
114 -- from the parent first subtype.
115
116 -- The Ada 2022 RM defined attribute Object_Size uses this implementation.
117
118 -- The Value_Size, which is the number of bits required to store a value
119 -- of the type. This size can be referred to using the Value_Size
120 -- attribute. This value is used for determining how tightly to pack
121 -- records or arrays with components of this type, and also affects
122 -- the semantics of unchecked conversion (unchecked conversions where
123 -- the Value_Size values differ generate a warning, and are potentially
124 -- target dependent).
125
126 -- The default rules for the value of Value_Size are as follows:
127
128 -- The Value_Size for a base subtype is the minimum number of bits
129 -- required to store all values of the type (including the sign bit
130 -- only if negative values are possible).
131
132 -- If a subtype statically matches the first subtype, then it has
133 -- by default the same Value_Size as the first subtype. This is a
134 -- consequence of RM 13.1(14) ("if two subtypes statically match,
135 -- then their subtype-specific aspects are the same".)
136
137 -- All other subtypes have a Value_Size corresponding to the minimum
138 -- number of bits required to store all values of the subtype. For
139 -- dynamic bounds, it is assumed that the value can range down or up
140 -- to the corresponding bound of the ancestor.
141
142 -- The Ada 95 RM defined attribute Size is identified with Value_Size.
143
144 -- The Size attribute may be defined for a first-named subtype. This sets
145 -- the Value_Size of the first-named subtype to the given value, and the
146 -- Object_Size of this first-named subtype to the given value padded up
147 -- to an appropriate boundary. It is a consequence of the default rules
148 -- above that this Object_Size will apply to all further subtypes. On the
149 -- other hand, Value_Size is affected only for the first subtype, any
150 -- dynamic subtypes obtained from it directly, and any statically matching
151 -- subtypes. The Value_Size of any other static subtypes is not affected.
152
153 -- Value_Size and Object_Size may be explicitly set for any subtype using
154 -- an attribute definition clause. Note that the use of such a clause can
155 -- cause the RM 13.1(14) rule to be violated, in Ada 95 and 2022 for the
156 -- Value_Size attribute, but only in Ada 95 for the Object_Size attribute.
157 -- If access types reference aliased objects whose subtypes have differing
158 -- Object_Size values as a result of explicit attribute definition clauses,
159 -- then it is erroneous to convert from one access subtype to the other.
160
161 -- At the implementation level, the Esize field stores the Object_Size
162 -- and the RM_Size field stores the Value_Size (hence the value of the
163 -- Size attribute, which, as noted above, is equivalent to Value_Size).
164
165 -- To get a feel for the difference, consider the following examples (note
166 -- that in each case the base is short_short_integer with a size of 8):
167
168 -- Object_Size Value_Size
169
170 -- type x1 is range 0..5; 8 3
171
172 -- type x2 is range 0..5;
173 -- for x2'size use 12; 16 12
174
175 -- subtype x3 is x2 range 0 .. 3; 16 2
176
177 -- subtype x4 is x2'base range 0 .. 10; 8 4
178
179 -- dynamic : x2'Base range -64 .. +63;
180
181 -- subtype x5 is x2 range 0 .. dynamic; 16 3*
182
183 -- subtype x6 is x2'base range 0 .. dynamic; 8 7*
184
185 -- Note: the entries marked * are not actually specified by the Ada 95 RM,
186 -- but it seems in the spirit of the RM rules to allocate the minimum number
187 -- of bits known to be large enough to hold the given range of values.
188
189 -- So far, so good, but GNAT has to obey the RM rules, so the question is
190 -- under what conditions must the RM Size be used. The following is a list
191 -- of the occasions on which the RM Size must be used:
192
193 -- Component size for packed arrays or records
194 -- Value of the attribute Size for a type
195 -- Warning about sizes not matching for unchecked conversion
196
197 -- The RM_Size field keeps track of the RM Size as needed in these
198 -- three situations.
199
200 -- For elementary types other than discrete and fixed-point types, the
201 -- Object_Size and Value_Size are the same (and equivalent to the RM
202 -- attribute Size). Only Size may be specified for such types.
203
204 -- For composite types, Object_Size and Value_Size are computed from their
205 -- respective value for the type of each element as well as the layout.
206
207 -- All size attributes are stored as Uint values. Negative values are used to
208 -- reference GCC expressions for the case of non-static sizes, as explained
209 -- in Repinfo.
210
211 --------------------------------------
212 -- Delayed Freezing and Elaboration --
213 --------------------------------------
214
215 -- The flag Has_Delayed_Freeze indicates that an entity carries an explicit
216 -- freeze node, which appears later in the expanded tree.
217
218 -- a) The flag is used by the front end to trigger expansion activities which
219 -- include the generation of that freeze node. Typically this happens at the
220 -- end of the current compilation unit, or before the first subprogram body is
221 -- encountered in the current unit. See units Freeze and Exp_Ch13 for details
222 -- on the actions triggered by a freeze node, which include the construction
223 -- of initialization procedures and dispatch tables.
224
225 -- b) The presence of a freeze node on an entity is used by the back end to
226 -- defer elaboration of the entity until its freeze node is seen. In the
227 -- absence of an explicit freeze node, an entity is frozen (and elaborated)
228 -- at the point of declaration.
229
230 -- For object declarations, the flag is set when an address clause for the
231 -- object is encountered. Legality checks on the address expression only take
232 -- place at the freeze point of the object. In Ada 2012, the flag is also set
233 -- when an address aspect for the object is encountered.
234
235 -- Most types have an explicit freeze node, because they cannot be elaborated
236 -- until all representation and operational items that apply to them have been
237 -- analyzed. Private types and incomplete types have the flag set as well, as
238 -- do task and protected types.
239
240 -- Implicit base types created for type derivations, as well as class-wide
241 -- types created for all tagged types, have the flag set.
242
243 -- If a subprogram has an access parameter whose designated type is incomplete
244 -- the subprogram has the flag set.
245
246 -----------------------
247 -- Entity Attributes --
248 -----------------------
249
250 -- This section contains a complete list of the attributes that are defined
251 -- on entities. Some attributes apply to all entities, others only to certain
252 -- kinds of entities. In the latter case the attribute should only be set or
253 -- accessed if the Ekind field indicates an appropriate entity.
254
255 -- There are two kinds of attributes that apply to entities, stored and
256 -- synthesized. Stored attributes correspond to a field or flag in the entity
257 -- itself. Such attributes are identified in the table below by giving the
258 -- field or flag in the attribute that is used to hold the attribute value.
259 -- Synthesized attributes are not stored directly, but are rather computed as
260 -- needed from other attributes, or from information in the tree. These are
261 -- marked "synthesized" in the table below. The stored attributes have both
262 -- access functions and set procedures to set the corresponding values, while
263 -- synthesized attributes have only access functions.
264
265 -- Note: in the case of Node, Uint, or Elist fields, there are cases where the
266 -- same physical field is used for different purposes in different entities,
267 -- so these access functions should only be referenced for the class of
268 -- entities in which they are defined as being present. Flags are not
269 -- overlapped in this way, but nevertheless as a matter of style and
270 -- abstraction (which may or may not be checked by assertions in the
271 -- body), this restriction should be observed for flag fields as well.
272
273 -- Note: certain of the attributes on types apply only to base types, and
274 -- are so noted by the notation [base type only]. These are cases where the
275 -- attribute of any subtype is the same as the attribute of the base type.
276 -- The attribute can be referenced on a subtype (and automatically retrieves
277 -- the value from the base type). However, it is an error to try to set the
278 -- attribute on other than the base type, and if assertions are enabled,
279 -- an attempt to set the attribute on a subtype will raise an assert error.
280
281 -- Other attributes are noted as applying to the [implementation base type
282 -- only]. These are representation attributes which must always apply to a
283 -- full non-private type, and where the attributes are always on the full
284 -- type. The attribute can be referenced on a subtype (and automatically
285 -- retrieves the value from the implementation base type). However, it is an
286 -- error to try to set the attribute on other than the implementation base
287 -- type.
288
289 -- Other attributes are noted as applying to the [root type only]. The
290 -- attribute can be referenced on a subtype (and automatically retrieves the
291 -- value from the root type). However, it is an error to try to set the
292 -- attribute on other than the root type.
293
294 -- The definitive definition of what is [... type only] is in Gen_Entities.
295 -- See calls to Sm passing Base_Type_Only, Impl_Base_Type_Only, or
296 -- Root_Type_Only.
297
298 -- Abstract_States
299 -- Defined for E_Package entities. Contains a list of all the abstract
300 -- states declared by the related package.
301
302 -- Accept_Address
303 -- Defined in entries. If an accept has a statement sequence, then an
304 -- address variable is created, which is used to hold the address of the
305 -- parameters, as passed by the runtime. Accept_Address holds an element
306 -- list which represents a stack of entities for these address variables.
307 -- The current entry is the top of the stack, which is the last element
308 -- on the list. A stack is required to handle the case of nested select
309 -- statements referencing the same entry.
310
311 -- Access_Disp_Table [implementation base type only]
312 -- Defined in E_Record_Type and E_Record_Subtype entities. Set in tagged
313 -- types to point to their dispatch tables. The first two entities are
314 -- associated with the primary dispatch table: 1) primary dispatch table
315 -- with user-defined primitives 2) primary dispatch table with predefined
316 -- primitives. For each interface type covered by the tagged type we also
317 -- have: 3) secondary dispatch table with thunks of primitives covering
318 -- user-defined interface primitives, 4) secondary dispatch table with
319 -- thunks of predefined primitives, 5) secondary dispatch table with user
320 -- defined primitives, and 6) secondary dispatch table with predefined
321 -- primitives. The last entity of this list is an access type declaration
322 -- used to expand dispatching calls through the primary dispatch table.
323 -- For an untagged record, contains No_Elist.
324
325 -- Access_Disp_Table_Elab_Flag [implementation base type only]
326 -- Defined in E_Record_Type and E_Record_Subtype entities. Set in tagged
327 -- types whose dispatch table elaboration must be completed at run time
328 -- by the IP routine to point to its pending elaboration flag entity.
329 -- This flag is needed when the elaboration of the dispatch table relies
330 -- on attribute 'Position applied to an object of the type; it is used by
331 -- the IP routine to avoid performing this elaboration twice.
332
333 -- Access_Subprogram_Wrapper
334 -- Entity created for access_to_subprogram types that have pre/post
335 -- conditions. Wrapper subprogram is created when analyzing corresponding
336 -- aspect, and inherits said aspects. Body of subprogram includes code
337 -- to check contracts, and a direct call to the designated subprogram.
338 -- The body is part of the freeze actions for the type.
339 -- The Subprogram_Type created for the Access_To_Subprogram carries the
340 -- Access_Subprogram_Wrapper for use in the expansion of indirect calls.
341
342 -- Activation_Record_Component
343 -- Defined for E_Variable, E_Constant, E_Loop_Parameter, and formal
344 -- parameter entities. Used in Opt.Unnest_Subprogram_Mode, in which case
345 -- a reference to an uplevel entity produces a corresponding component
346 -- in the generated ARECnT activation record (Exp_Unst for details).
347
348 -- Actual_Subtype
349 -- Defined in variables, constants, and formal parameters. This is the
350 -- subtype imposed by the value of the object, as opposed to its nominal
351 -- subtype, which is imposed by the declaration. The actual subtype
352 -- differs from the nominal one when the latter is indefinite (as in the
353 -- case of an unconstrained formal parameter, or a variable declared
354 -- with an unconstrained type and an initial value). The nominal subtype
355 -- is the Etype entry for the entity. The Actual_Subtype field is set
356 -- only if the actual subtype differs from the nominal subtype. If the
357 -- actual and nominal subtypes are the same, then the Actual_Subtype
358 -- field is Empty, and Etype indicates both types.
359 --
360 -- For objects, the Actual_Subtype is set only if this is a discriminated
361 -- type. For arrays, the bounds of the expression are obtained and the
362 -- Etype of the object is directly the constrained subtype. This is
363 -- rather irregular, and the semantic checks that depend on the nominal
364 -- subtype being unconstrained use flag Is_Constr_Subt_For_U_Nominal(qv).
365
366 -- Address_Clause (synthesized)
367 -- Applies to entries, objects and subprograms. Set if an address clause
368 -- is present which references the object or subprogram and points to
369 -- the N_Attribute_Definition_Clause node. Empty if no Address clause.
370 -- The expression in the address clause is always a constant that is
371 -- defined before the entity to which the address clause applies.
372 -- Note: The backend references this field in E_Task_Type entities???
373
374 -- Address_Taken
375 -- Defined in all entities. Set if the Address or Unrestricted_Access
376 -- attribute is applied directly to the entity, i.e. the entity is the
377 -- entity of the prefix of the attribute reference. Also set if the
378 -- entity is the second argument of an Asm_Input or Asm_Output attribute,
379 -- as the construct may entail taking its address. And also set if the
380 -- entity is a subprogram and the Access or Unchecked_Access attribute is
381 -- applied. Used by the backend to make sure that the address can be
382 -- meaningfully taken, and also in the case of subprograms to control
383 -- output of certain warnings.
384
385 -- Aft_Value (synthesized)
386 -- Applies to fixed-point types and subtypes. This yields the value of
387 -- the Aft attribute for the type, i.e. the number of decimal digits
388 -- needed after the decimal point to accommodate the delta of the type,
389 -- unless the delta is greater than 0.1, in which case it is 1.
390
391 -- Alias
392 -- Defined in overloadable entities (literals, subprograms, entries) and
393 -- subprograms that cover a primitive operation of an abstract interface
394 -- (that is, subprograms with the Interface_Alias attribute). In case of
395 -- overloaded entities it points to the parent subprogram of a derived
396 -- subprogram. In case of abstract interface subprograms it points to the
397 -- subprogram that covers the abstract interface primitive. Also used for
398 -- a subprogram renaming, where it points to the renamed subprogram. For
399 -- an inherited operation (of a type extension) that is overridden in a
400 -- private part, the Alias is the overriding operation. In this fashion a
401 -- call from outside the package ends up executing the new body even if
402 -- non-dispatching, and a call from inside calls the overriding operation
403 -- because it hides the implicit one. Alias is always empty for entries.
404
405 -- Alignment
406 -- Defined in entities for types and also in constants, variables
407 -- (including exceptions where it refers to the static data allocated for
408 -- an exception), loop parameters, and formal parameters. This indicates
409 -- the desired alignment for a type, or the actual alignment for an
410 -- object. A value of zero (Uint_0) indicates that the alignment has not
411 -- been set yet. The alignment can be set by an explicit alignment
412 -- clause, or set by the front-end in package Layout, or set by the
413 -- back-end as part of the back-end back-annotation process. The
414 -- alignment field is also defined in E_Exception entities, but there it
415 -- is used only by the back-end for back annotation.
416
417 -- Alignment_Clause (synthesized)
418 -- Applies to all entities for types and objects. If an alignment
419 -- attribute definition clause is present for the entity, then this
420 -- function returns the N_Attribute_Definition clause that specifies the
421 -- alignment. If no alignment clause applies to the type, then the call
422 -- to this function returns Empty. Note that the call can return a
423 -- non-Empty value even if Has_Alignment_Clause is not set (happens with
424 -- subtype and derived type declarations). Note also that a record
425 -- definition clause with an (obsolescent) mod clause is converted
426 -- into an attribute definition clause for this purpose.
427
428 -- Anonymous_Designated_Type
429 -- Defined in variables which represent anonymous finalization masters.
430 -- Contains the designated type which is being serviced by the master.
431
432 -- Anonymous_Masters
433 -- Defined in packages, subprograms, and subprogram bodies. Contains a
434 -- list of anonymous finalization masters declared within the related
435 -- unit. The list acts as a mapping between a master and a designated
436 -- type.
437
438 -- Anonymous_Object
439 -- Present in protected and task type entities. Contains the entity of
440 -- the anonymous object created for a single protected or task type.
441
442 -- Associated_Entity
443 -- Defined in all entities. This field is similar to Associated_Node, but
444 -- applied to entities. The attribute links an entity from the generic
445 -- template with its corresponding entity in the analyzed generic copy.
446 -- The global references mechanism relies on the Associated_Entity to
447 -- infer the context.
448
449 -- Associated_Formal_Package
450 -- Defined in packages that are the actuals of formal_packages. Points
451 -- to the entity in the declaration for the formal package.
452
453 -- Associated_Node_For_Itype
454 -- Defined in all type and subtype entities. Set non-Empty only for
455 -- Itypes. Set to point to the associated node for the Itype, i.e.
456 -- the node whose elaboration generated the Itype. This is used for
457 -- copying trees, to determine whether or not to copy an Itype, and
458 -- also for accessibility checks on anonymous access types. This
459 -- node is typically an object declaration, component declaration,
460 -- type or subtype declaration.
461
462 -- For an access discriminant in a type declaration, the associated_
463 -- node_for_itype is the corresponding discriminant specification.
464
465 -- For an access parameter it is the enclosing subprogram declaration.
466
467 -- For an access_to_protected_subprogram parameter it is the declaration
468 -- of the corresponding formal parameter.
469 --
470 -- Itypes have no explicit declaration, and therefore are not attached to
471 -- the tree: their Parent field is always empty. The Associated_Node_For_
472 -- Itype is the only way to determine the construct that leads to the
473 -- creation of a given itype entity.
474
475 -- Associated_Storage_Pool [root type only]
476 -- Defined in simple and general access type entities. References the
477 -- storage pool to be used for the corresponding collection. A value of
478 -- Empty means that the default pool is to be used. This is defined
479 -- only in the root type, since derived types must have the same pool
480 -- as the parent type.
481
482 -- Barrier_Function
483 -- Defined in protected entries and entry families. This is the
484 -- subprogram declaration for the body of the function that returns
485 -- the value of the entry barrier.
486
487 -- Base_Type (synthesized)
488 -- Applies to all type and subtype entities. Returns the base type of a
489 -- type or subtype. The base type of a type is the type itself. The base
490 -- type of a subtype is the type that it constrains (which is always
491 -- a type entity, not some other subtype). Note that in the case of a
492 -- subtype of a private type, it is possible for the base type attribute
493 -- to return a private type, even if the subtype to which it applies is
494 -- non-private. See also Implementation_Base_Type. Note: it is allowed to
495 -- apply Base_Type to other than a type, in which case it simply returns
496 -- the entity unchanged.
497
498 -- Block_Node
499 -- Defined in block entities. Points to the identifier in the
500 -- Block_Statement itself. Used when retrieving the block construct
501 -- for finalization purposes, the block entity has an implicit label
502 -- declaration in the enclosing declarative part, and has otherwise
503 -- no direct connection in the tree with the block statement. The
504 -- link is to the identifier (which is an occurrence of the entity)
505 -- and not to the block_statement itself, because the statement may
506 -- be rewritten, e.g. in the process of removing dead code.
507
508 -- Body_Entity
509 -- Defined in package and generic package entities, points to the
510 -- corresponding package body entity if one is present.
511
512 -- Body_Needed_For_SAL
513 -- Defined in package and subprogram entities that are compilation
514 -- units. Indicates that the source for the body must be included
515 -- when the unit is part of a standalone library.
516
517 -- Body_Needed_For_Inlining
518 -- Defined in package entities that are compilation units. Used to
519 -- determine whether the body unit needs to be compiled when the
520 -- package declaration appears in the list of units to inline. A body
521 -- is needed for inline processing if the unit declaration contains
522 -- functions that carry pragma Inline or Inline_Always, or if it
523 -- contains a generic unit that requires a body.
524 --
525 -- Body_References
526 -- Defined in abstract state entities. Contains an element list of
527 -- references (identifiers) that appear in a package body whose spec
528 -- defines the related state. If the body refines the said state, all
529 -- references on this list are illegal due to the visible refinement.
530
531 -- BIP_Initialization_Call
532 -- Defined in constants and variables whose corresponding declaration
533 -- is wrapped in a transient block and the inital value is provided by
534 -- a build-in-place function call. Contains the relocated build-in-place
535 -- call after the expansion has decoupled the call from the object. This
536 -- attribute is used by the finalization machinery to insert cleanup code
537 -- for all additional transient objects found in the transient block.
538
539 -- C_Pass_By_Copy [implementation base type only]
540 -- Defined in record types. Set if a pragma Convention for the record
541 -- type specifies convention C_Pass_By_Copy. This convention name is
542 -- treated as identical in all respects to convention C, except that
543 -- if it is specified for a record type, then the C_Pass_By_Copy flag
544 -- is set, and if a foreign convention subprogram has a formal of the
545 -- corresponding type, then the parameter passing mechanism will be
546 -- set to By_Copy (unless specifically overridden by an Import or
547 -- Export pragma).
548
549 -- Can_Never_Be_Null
550 -- This flag is defined in all entities. It is set in an object which can
551 -- never have a null value. Set for constant access values initialized to
552 -- a non-null value. This is also set for all access parameters in Ada 83
553 -- and Ada 95 modes, and for access parameters that explicitly exclude
554 -- null in Ada 2005 mode.
555 --
556 -- This is used to avoid unnecessary resetting of the Is_Known_Non_Null
557 -- flag for such entities. In Ada 2005 mode, this is also used when
558 -- determining subtype conformance of subprogram profiles to ensure
559 -- that two formals have the same null-exclusion status.
560 --
561 -- This is also set on some access types, e.g. the Etype of the anonymous
562 -- access type of a controlling formal.
563
564 -- Can_Use_Internal_Rep [base type only]
565 -- Defined in Access_Subprogram_Kind nodes. This flag is set by the
566 -- front end and used by the backend. False means that the backend
567 -- must represent the type in the same way as Convention-C types (and
568 -- other foreign-convention types). On many targets, this means that
569 -- the backend will use dynamically generated trampolines for nested
570 -- subprograms. True means that the backend can represent the type in
571 -- some internal way. On the aforementioned targets, this means that the
572 -- backend will not use dynamically generated trampolines. This flag
573 -- must be False if Has_Foreign_Convention is True; otherwise, the front
574 -- end is free to set the policy.
575 --
576 -- Setting this False in all cases corresponds to the traditional back
577 -- end strategy, where all access-to-subprogram types are represented the
578 -- same way, independent of the Convention. For further details, see also
579 -- Always_Compatible_Rep in Targparm.
580 --
581 -- Efficiency note: On targets that use dynamically generated
582 -- trampolines, False generally favors efficiency of top-level
583 -- subprograms, whereas True generally favors efficiency of nested
584 -- ones. On other targets, this flag has little or no effect on
585 -- efficiency. The front end should take this into account. In
586 -- particular, pragma Favor_Top_Level gives a hint that the flag
587 -- should be False.
588 --
589 -- Note: We considered using Convention-C for this purpose, but we need
590 -- this separate flag, because Convention-C implies that in the case of
591 -- P'[Unrestricted_]Access, P also have convention C. Sometimes we want
592 -- to have Can_Use_Internal_Rep False for an access type, but allow P to
593 -- have convention Ada.
594
595 -- Chars
596 -- Defined in all entities. This field contains an entry into the names
597 -- table that has the character string of the identifier, character
598 -- literal or operator symbol. See Namet for further details. Note that
599 -- throughout the processing of the front end, this name is the simple
600 -- unqualified name. However, just before the backend is called, a call
601 -- is made to Qualify_All_Entity_Names. This causes entity names to be
602 -- qualified using the encoding described in exp_dbug.ads, and from that
603 -- point (including post backend steps, e.g. cross-reference generation),
604 -- the entities will contain the encoded qualified names.
605
606 -- Checks_May_Be_Suppressed
607 -- Defined in all entities. Set if a pragma Suppress or Unsuppress
608 -- mentions the entity specifically in the second argument. If this flag
609 -- is set the global and local suppress stacks must be consulted to
610 -- determine if there actually is an active Suppress or Unsuppress pragma
611 -- that applies to the entity.
612
613 -- Class_Postconditions
614 -- Defined on subprogram entities. Set if the subprogram has class-wide
615 -- postconditions. Denotes the (and-then) expression built by merging
616 -- inherited class-wide postconditions with its own class-wide
617 -- postconditions.
618
619 -- Class_Preconditions
620 -- Defined on subprogram entities. Set if the subprogram has class-wide
621 -- preconditions. Denotes the (or-else) expression built by merging
622 -- inherited class-wide preconditions with its own class-wide
623 -- preconditions.
624
625 -- Class_Preconditions_Subprogram
626 -- Defined on subprogram entities. Set on subprogram helpers and also on
627 -- the indirect-call wrapper internally built for subprograms that have
628 -- class-wide preconditions. References the subprogram that has the
629 -- class-wide preconditions.
630
631 -- Class_Wide_Type
632 -- Defined in all type entities. For a tagged type or subtype, returns
633 -- the corresponding implicitly declared class-wide type. For a
634 -- class-wide type, returns itself. Set to Empty for untagged types.
635
636 -- Cloned_Subtype
637 -- Defined in E_Record_Subtype and E_Class_Wide_Subtype entities.
638 -- Each such entity can either have a Discriminant_Constraint, in
639 -- which case it represents a distinct type from the base type (and
640 -- will have a list of components and discriminants in the list headed by
641 -- First_Entity) or else no such constraint, in which case it will be a
642 -- copy of the base type.
643 --
644 -- o Each element of the list in First_Entity is copied from the base
645 -- type; in that case, this field is Empty.
646 --
647 -- o The list in First_Entity is shared with the base type; in that
648 -- case, this field points to that entity.
649 --
650 -- A record or classwide subtype may also be a copy of some other
651 -- subtype and share the entities in the First_Entity with that subtype.
652 -- In that case, this field points to that subtype.
653 --
654 -- For E_Class_Wide_Subtype, the presence of Equivalent_Type overrides
655 -- this field. Note that this field ONLY appears in subtype entities, not
656 -- in type entities, it is not defined, and it is an error to reference
657 -- Cloned_Subtype in an E_Record_Type or E_Class_Wide_Type entity.
658
659 -- Comes_From_Source
660 -- This flag appears on all nodes, including entities, and indicates
661 -- that the node was created by the scanner or parser from the original
662 -- source. Thus for entities, it indicates that the entity is defined
663 -- in the original source program.
664
665 -- Component_Alignment (special field) [base type only]
666 -- Defined in array and record entities. Contains a value of type
667 -- Component_Alignment_Kind indicating the alignment of components.
668 -- Set to Calign_Default normally, but can be overridden by use of
669 -- the Component_Alignment pragma. Note: this field is currently
670 -- stored in a non-standard way, see body for details.
671
672 -- Component_Bit_Offset
673 -- Defined in record components (E_Component, E_Discriminant). First
674 -- bit position of given component, computed from the first bit and
675 -- position values given in the component clause. A value of No_Uint
676 -- means that the value is not yet known. The value can be set by the
677 -- appearance of an explicit component clause in a record representation
678 -- clause, or it can be set by the front-end in package Layout, or it can
679 -- be set by the backend. By the time backend processing is completed,
680 -- this field is always set. A negative value is used to represent
681 -- a value which is not known at compile time, and must be computed
682 -- at run-time (this happens if fields of a record have variable
683 -- lengths). See package Repinfo for details of these values.
684 --
685 -- Note: Component_Bit_Offset is redundant with respect to the fields
686 -- Normalized_First_Bit and Normalized_Position, and could in principle
687 -- be eliminated, but it is convenient in several situations, including
688 -- use in the backend, to have this redundant field.
689
690 -- Component_Clause
691 -- Defined in record components and discriminants. If a record
692 -- representation clause is present for the corresponding record type a
693 -- that specifies a position for the component, then the Component_Clause
694 -- field of the E_Component entity points to the N_Component_Clause node.
695 -- Set to Empty if no record representation clause was present, or if
696 -- there was no specification for this component.
697
698 -- Component_Size [implementation base type only]
699 -- Defined in array types. It contains the component size value for
700 -- the array. A value of No_Uint means that the value is not yet set.
701 -- The value can be set by the use of a component size clause, or
702 -- by the front end in package Layout, or by the backend. A negative
703 -- value is used to represent a value which is not known at compile
704 -- time, and must be computed at run-time (this happens if the type
705 -- of the component has a variable length size). See package Repinfo
706 -- for details of these values. Component_Size can also be negative in
707 -- an illegal program that says e.g. "for T'Component_Size use -8;".
708
709 -- Component_Type [implementation base type only]
710 -- Defined in array types and string types. References component type.
711
712 -- Contains_Ignored_Ghost_Code
713 -- Defined in blocks, packages and their bodies, subprograms and their
714 -- bodies. Set if the entity contains any ignored Ghost code in the form
715 -- of declaration, procedure call, assignment statement or pragma.
716
717 -- Contract
718 -- Defined in constant, entry, entry family, operator, [generic] package,
719 -- package body, protected unit, [generic] subprogram, subprogram body,
720 -- variable, task unit, and type entities. Points to the contract of the
721 -- entity, holding various assertion items and data classifiers.
722
723 -- Contract_Wrapper
724 -- Defined in entry and entry family entities. Set only when the entry
725 -- [family] has contract cases, preconditions, and/or postconditions.
726 -- Contains the entity of a wrapper procedure which encapsulates the
727 -- original entry and implements precondition/postcondition semantics.
728
729 -- Corresponding_Concurrent_Type
730 -- Defined in record types that are constructed by the expander to
731 -- represent task and protected types (Is_Concurrent_Record_Type flag
732 -- set). Points to the entity for the corresponding task type or the
733 -- protected type.
734
735 -- Corresponding_Discriminant
736 -- Defined in discriminants of a derived type, when the discriminant is
737 -- used to constrain a discriminant of the parent type. Points to the
738 -- corresponding discriminant in the parent type. Otherwise it is Empty.
739
740 -- Corresponding_Equality
741 -- Defined in function entities for implicit inequality operators.
742 -- Denotes the explicit or derived equality operation that creates
743 -- the implicit inequality. Note that this field is not present in
744 -- other function entities, only in implicit inequality routines,
745 -- where Comes_From_Source is always False.
746
747 -- Corresponding_Function
748 -- Defined on procedures internally built with an extra out parameter
749 -- to return a constrained array type, when Modify_Tree_For_C is set.
750 -- Denotes the function that returns the constrained array type for
751 -- which this procedure was built.
752
753 -- Corresponding_Procedure
754 -- Defined on functions that return a constrained array type, when
755 -- Modify_Tree_For_C is set. Denotes the internally built procedure
756 -- with an extra out parameter created for it.
757
758 -- Corresponding_Record_Component
759 -- Defined in components of a derived untagged record type, including
760 -- discriminants. For a regular component or a stored discriminant,
761 -- points to the corresponding component in the parent type. Set to
762 -- Empty for a non-stored discriminant. It is used by the back end to
763 -- ensure the layout of the derived type matches that of the parent
764 -- type when there is no representation clause on the derived type.
765
766 -- Corresponding_Record_Type
767 -- Defined in protected and task types and subtypes. References the
768 -- entity for the corresponding record type constructed by the expander
769 -- (see Exp_Ch9). This type is used to represent values of the task type.
770
771 -- Corresponding_Remote_Type
772 -- Defined in record types that describe the fat pointer structure for
773 -- Remote_Access_To_Subprogram types. References the original access
774 -- to subprogram type.
775
776 -- CR_Discriminant
777 -- Defined in discriminants of concurrent types. Denotes the homologous
778 -- discriminant of the corresponding record type. The CR_Discriminant is
779 -- created at the same time as the discriminal, and used to replace
780 -- occurrences of the discriminant within the type declaration.
781
782 -- Current_Use_Clause
783 -- Defined in packages and in types. For packages, denotes the use
784 -- package clause currently in scope that makes the package use_visible.
785 -- For types, it denotes the use_type clause that makes the operators of
786 -- the type visible. Used for more precise warning messages on redundant
787 -- use clauses.
788
789 -- Current_Value
790 -- Defined in all object entities. Set in E_Variable, E_Constant, formal
791 -- parameters and E_Loop_Parameter entities if we have trackable current
792 -- values. Set non-Empty if the (constant) current value of the variable
793 -- is known. This value is valid only for references from the same
794 -- sequential scope as the entity. The sequential scope of an entity
795 -- includes the immediate scope and any contained scopes that are package
796 -- specs, package bodies, blocks (at any nesting level) or statement
797 -- sequences in IF or loop statements.
798 --
799 -- Another related use of this field is to record information about the
800 -- value obtained from an IF or WHILE statement condition. If the IF or
801 -- ELSIF or WHILE condition has the form "NOT {,NOT] OBJ RELOP VAL ",
802 -- or OBJ [AND [THEN]] expr, where OBJ refers to an entity with a
803 -- Current_Value field, RELOP is one of the six relational operators, and
804 -- VAL is a compile-time known value then the Current_Value field of OBJ
805 -- points to the N_If_Statement, N_Elsif_Part, or N_Iteration_Scheme node
806 -- of the relevant construct, and the Condition field of this can be
807 -- consulted to give information about the value of OBJ. For more details
808 -- on this usage, see the procedure Exp_Util.Get_Current_Value_Condition.
809
810 -- Debug_Info_Off
811 -- Defined in all entities. Set if a pragma Suppress_Debug_Info applies
812 -- to the entity, or if internal processing in the compiler determines
813 -- that suppression of debug information is desirable. Note that this
814 -- flag is only for use by the front end as part of the processing for
815 -- determining if Needs_Debug_Info should be set. The backend should
816 -- always test Needs_Debug_Info, it should never test Debug_Info_Off.
817
818 -- Debug_Renaming_Link
819 -- Used to link the variable associated with a debug renaming declaration
820 -- to the renamed entity. See Exp_Dbug.Debug_Renaming_Declaration for
821 -- details of the use of this field.
822
823 -- Declaration_Node (synthesized)
824 -- Applies to all entities. Returns the tree node for the construct that
825 -- declared the entity. Normally this is just the Parent of the entity.
826 -- One exception arises with child units, where the parent of the entity
827 -- is a selected component/defining program unit name. Another exception
828 -- is that if the entity is an incomplete type that has been completed or
829 -- a private type, then we obtain the declaration node denoted by the
830 -- full type, i.e. the full type declaration node. Also note that for
831 -- subprograms, this returns the {function,procedure}_specification, not
832 -- the subprogram_declaration. If the parent of an Itype is a type or
833 -- subtype declaration, we return the declaration node as for any other
834 -- type. For other Itypes, we return Empty.
835
836 -- Default_Aspect_Component_Value [base type only]
837 -- Defined in array types. Holds the static value specified in a
838 -- Default_Component_Value aspect specification for the array type,
839 -- or inherited on derivation.
840
841 -- Default_Aspect_Value [base type only]
842 -- Defined in scalar types. Holds the static value specified in a
843 -- Default_Value aspect specification for the type, or inherited
844 -- on derivation.
845
846 -- Default_Expr_Function
847 -- Defined in parameters. It holds the entity of the parameterless
848 -- function that is built to evaluate the default expression if it is
849 -- more complex than a simple identifier or literal. For the latter
850 -- simple cases or if there is no default value, this field is Empty.
851
852 -- Default_Expressions_Processed
853 -- A flag in subprograms (functions, operators, procedures) and in
854 -- entries and entry families used to indicate that default expressions
855 -- have been processed and to avoid multiple calls to process the
856 -- default expressions (see Freeze.Process_Default_Expressions), which
857 -- would not only waste time, but also generate false error messages.
858
859 -- Default_Value
860 -- Defined in formal parameters. Points to the node representing the
861 -- expression for the default value for the parameter. Empty if the
862 -- parameter has no default value (which is always the case for OUT
863 -- and IN OUT parameters in the absence of errors).
864
865 -- Delay_Cleanups
866 -- Defined in entities that have finalization lists (subprograms
867 -- blocks, and tasks). Set if there are pending generic body
868 -- instantiations for the corresponding entity. If this flag is
869 -- set, then generation of cleanup actions for the corresponding
870 -- entity must be delayed, since the insertion of the generic body
871 -- may affect cleanup generation (see Inline for further details).
872
873 -- Delay_Subprogram_Descriptors
874 -- Defined in entities for which exception subprogram descriptors
875 -- are generated (subprograms, package declarations and package
876 -- bodies). Defined if there are pending generic body instantiations
877 -- for the corresponding entity. If this flag is set, then generation
878 -- of the subprogram descriptor for the corresponding enities must
879 -- be delayed, since the insertion of the generic body may add entries
880 -- to the list of handlers.
881 --
882 -- Note: for subprograms, Delay_Subprogram_Descriptors is set if and
883 -- only if Delay_Cleanups is set. But Delay_Cleanups can be set for a
884 -- a block (in which case Delay_Subprogram_Descriptors is set for the
885 -- containing subprogram). In addition Delay_Subprogram_Descriptors is
886 -- set for a library level package declaration or body which contains
887 -- delayed instantiations (in this case the descriptor refers to the
888 -- enclosing elaboration procedure).
889
890 -- Delta_Value
891 -- Defined in fixed and decimal types. Points to a universal real
892 -- that holds value of delta for the type, as given in the declaration
893 -- or as inherited by a subtype or derived type.
894
895 -- Dependent_Instances
896 -- Defined in packages that are instances. Holds list of instances
897 -- of inner generics. Used to place freeze nodes for those instances
898 -- after that of the current one, i.e. after the corresponding generic
899 -- bodies.
900
901 -- Depends_On_Private
902 -- Defined in all type entities. Set if the type is private or if it
903 -- depends on a private type.
904
905 -- Derived_Type_Link
906 -- Defined in all type and subtype entities. Set in a base type if
907 -- a derived type declaration is encountered which derives from
908 -- this base type or one of its subtypes, and there are already
909 -- primitive operations declared. In this case, it references the
910 -- entity for the type declared by the derived type declaration.
911 -- For example:
912 --
913 -- type R is ...
914 -- subtype RS is R ...
915 -- ...
916 -- type G is new RS ...
917 --
918 -- In this case, if primitive operations have been declared for R, at
919 -- the point of declaration of G, then the Derived_Type_Link of R is set
920 -- to point to the entity for G. This is used to generate warnings and
921 -- errors for rep clauses that appear later on for R, which might result
922 -- in an unexpected (or illegal) implicit conversion operation.
923 --
924 -- Note: if there is more than one such derived type, the link will point
925 -- to the last one.
926
927 -- Designated_Type (synthesized)
928 -- Applies to access types. Returns the designated type. Differs from
929 -- Directly_Designated_Type in that if the access type refers to an
930 -- incomplete type, and the full type is available, then this full type
931 -- is returned instead of the incomplete type.
932
933 -- DIC_Procedure (synthesized)
934 -- Defined in all type entities. Set for a private type and its full view
935 -- when the type is subject to pragma Default_Initial_Condition (DIC), or
936 -- when the type inherits a DIC pragma from a parent type. Points to the
937 -- entity of a procedure which takes a single argument of the given type
938 -- and verifies the assertion expression of the DIC pragma at run time.
939
940 -- Note: the reason this is marked as a synthesized attribute is that the
941 -- way this is stored is as an element of the Subprograms_For_Type field.
942
943 -- Digits_Value
944 -- Defined in floating point types and subtypes and decimal types and
945 -- subtypes. Contains the Digits value specified in the declaration.
946
947 -- Direct_Primitive_Operations
948 -- Defined in tagged types and subtypes (including synchronized types),
949 -- in tagged private types, and in tagged incomplete types. Moreover, it
950 -- is also defined for untagged types, both when Extensions_Allowed is
951 -- True (-gnatX) to support the extension feature of prefixed calls for
952 -- untagged types, and when Extensions_Allowed is False to get better
953 -- error messages. This field is an element list of entities for
954 -- primitive operations of the type. For incomplete types the list is
955 -- always empty. In order to follow the C++ ABI, entities of primitives
956 -- that come from source must be stored in this list in the order of
957 -- their occurrence in the sources. When expansion is disabled, the
958 -- corresponding record type of a synchronized type is not constructed.
959 -- In that case, such types carry this attribute directly.
960
961 -- Directly_Designated_Type
962 -- Defined in access types. This field points to the type that is
963 -- directly designated by the access type. In the case of an access
964 -- type to an incomplete type, this field references the incomplete
965 -- type. Directly_Designated_Type is typically used in implementing the
966 -- static semantics of the language; in implementing dynamic semantics,
967 -- we typically want the full view of the designated type. The function
968 -- Designated_Type obtains this full type in the case of access to an
969 -- incomplete type.
970
971 -- Disable_Controlled [base type only]
972 -- Present in all entities. Set for a controlled type subject to aspect
973 -- Disable_Controlled which evaluates to True. This flag is taken into
974 -- account in synthesized attribute Is_Controlled.
975
976 -- Discard_Names
977 -- Defined in types and exception entities. Set if pragma Discard_Names
978 -- applies to the entity. It is also set for declarative regions and
979 -- package specs for which a Discard_Names pragma with zero arguments
980 -- has been encountered. The purpose of setting this flag is to be able
981 -- to set the Discard_Names attribute on enumeration types declared
982 -- after the pragma within the same declarative region. This flag is
983 -- set to False if a Keep_Names pragma appears for an enumeration type.
984
985 -- Discriminal
986 -- Defined in discriminants (Discriminant formal: GNAT's first
987 -- coinage). The entity used as a formal parameter that corresponds
988 -- to a discriminant. See section "Handling of Discriminants" for
989 -- full details of the use of discriminals.
990
991 -- Discriminal_Link
992 -- Defined in E_In_Parameter or E_Constant entities. For discriminals,
993 -- points back to corresponding discriminant. For other entities, must
994 -- remain Empty.
995
996 -- Discriminant_Checking_Func
997 -- Defined in components. Points to the defining identifier of the
998 -- function built by the expander returns a Boolean indicating whether
999 -- the given record component exists for the current discriminant
1000 -- values.
1001
1002 -- Discriminant_Constraint
1003 -- Defined in entities whose Has_Discriminants flag is set (concurrent
1004 -- types, subtypes, record types and subtypes, private types and
1005 -- subtypes, limited private types and subtypes and incomplete types).
1006 -- It is an error to reference the Discriminant_Constraint field if
1007 -- Has_Discriminants is False.
1008 --
1009 -- If the Is_Constrained flag is set, Discriminant_Constraint points
1010 -- to an element list containing the discriminant constraints in the
1011 -- same order in which the discriminants are declared.
1012 --
1013 -- If the Is_Constrained flag is not set but the discriminants of the
1014 -- unconstrained type have default initial values then this field
1015 -- points to an element list giving these default initial values in
1016 -- the same order in which the discriminants are declared. Note that
1017 -- in this case the entity cannot be a tagged record type, because
1018 -- discriminants in this case cannot have defaults.
1019 --
1020 -- If the entity is a tagged record implicit type, then this field is
1021 -- inherited from the first subtype (so that the itype is subtype
1022 -- conformant with its first subtype, which is needed when the first
1023 -- subtype overrides primitive operations inherited by the implicit
1024 -- base type).
1025 --
1026 -- In all other cases Discriminant_Constraint contains the empty
1027 -- Elist (i.e. it is initialized with a call to New_Elmt_List).
1028
1029 -- Discriminant_Default_Value
1030 -- Defined in discriminants. Points to the node representing the
1031 -- expression for the default value of the discriminant. Set to
1032 -- Empty if the discriminant has no default value.
1033
1034 -- Discriminant_Number
1035 -- Defined in discriminants. Gives the ranking of a discriminant in
1036 -- the list of discriminants of the type, i.e. a sequential integer
1037 -- index starting at 1 and ranging up to number of discriminants.
1038
1039 -- Dispatch_Table_Wrappers [implementation base type only]
1040 -- Defined in E_Record_Type and E_Record_Subtype entities. Set in library
1041 -- level tagged type entities if we are generating statically allocated
1042 -- dispatch tables. Points to the list of dispatch table wrappers
1043 -- associated with the tagged type. For an untagged record, contains
1044 -- No_Elist.
1045
1046 -- Dynamic_Call_Helper
1047 -- Defined on subprogram entities. Set if the subprogram has class-wide
1048 -- preconditions. Denotes the helper that evaluates at run time the
1049 -- class-wide preconditions performing dispatching calls.
1050
1051 -- DTC_Entity
1052 -- Defined in function and procedure entities. Set to Empty unless
1053 -- the subprogram is dispatching in which case it references the
1054 -- Dispatch Table pointer Component. For regular Ada tagged this, this
1055 -- is the _Tag component. For CPP_Class types and their descendants,
1056 -- this points to the component entity in the record that holds the
1057 -- Vtable pointer for the Vtable containing the entry referencing the
1058 -- subprogram.
1059
1060 -- DT_Entry_Count
1061 -- Defined in E_Component entities. Only used for component marked
1062 -- Is_Tag. Store the number of entries in the Vtable (or Dispatch Table)
1063
1064 -- DT_Offset_To_Top_Func
1065 -- Defined in E_Component entities. Only used for component marked
1066 -- Is_Tag. If present it stores the Offset_To_Top function used to
1067 -- provide this value in tagged types whose ancestor has discriminants.
1068
1069 -- DT_Position
1070 -- Defined in function and procedure entities which are dispatching
1071 -- (should not be referenced without first checking that flag
1072 -- Is_Dispatching_Operation is True). Contains the offset into
1073 -- the Vtable for the entry that references the subprogram.
1074
1075 -- Ekind (Ekind)
1076 -- Defined in all entities. Contains a value of the enumeration type
1077 -- Entity_Kind declared in a subsequent section in this spec.
1078
1079 -- Elaborate_Body_Desirable
1080 -- Defined in package entities. Set if the elaboration circuitry detects
1081 -- a case where there is a package body that modifies one or more visible
1082 -- entities in the package spec and there is no explicit Elaborate_Body
1083 -- pragma for the package. This information is passed on to the binder,
1084 -- which attempts, but does not promise, to elaborate the body as close
1085 -- to the spec as possible.
1086
1087 -- Elaboration_Entity
1088 -- Defined in entry, entry family, [generic] package, and subprogram
1089 -- entities. This is a counter associated with the unit that is initially
1090 -- set to zero, is incremented when an elaboration request for the unit
1091 -- is made, and is decremented when a finalization request for the unit
1092 -- is made. This is used for three purposes. First, it is used to
1093 -- implement access before elaboration checks (the counter must be
1094 -- non-zero to call a subprogram at elaboration time). Second, it is
1095 -- used to guard against repeated execution of the elaboration code.
1096 -- Third, it is used to ensure that the finalization code is executed
1097 -- only after all clients have requested it.
1098 --
1099 -- Note that we always allocate this counter, and set this field, but
1100 -- we do not always actually use it. It is only used if it is needed
1101 -- for access before elaboration use (see Elaboration_Entity_Required
1102 -- flag) or if either the spec or the body has elaboration code. If
1103 -- neither of these two conditions holds, then the entity is still
1104 -- allocated (since we don't know early enough whether or not there
1105 -- is elaboration code), but is simply not used for any purpose.
1106
1107 -- Elaboration_Entity_Required
1108 -- Defined in entry, entry family, [generic] package, and subprogram
1109 -- entities. Set only if Elaboration_Entity is non-Empty to indicate that
1110 -- the counter is required to be non-zero even if there is no other
1111 -- elaboration code. This occurs when the Elaboration_Entity counter
1112 -- is used for access before elaboration checks. If the counter is
1113 -- only used to prevent multiple execution of the elaboration code,
1114 -- then if there is no other elaboration code, obviously there is no
1115 -- need to set the flag.
1116
1117 -- Encapsulating_State
1118 -- Defined in abstract state, constant and variable entities. Contains
1119 -- the entity of an ancestor state or a single concurrent type whose
1120 -- refinement utilizes this item as a constituent.
1121
1122 -- Enclosing_Scope
1123 -- Defined in labels. Denotes the innermost enclosing construct that
1124 -- contains the label. Identical to the scope of the label, except for
1125 -- labels declared in the body of an accept statement, in which case the
1126 -- entry_name is the Enclosing_Scope. Used to validate goto's within
1127 -- accept statements.
1128
1129 -- Entry_Accepted
1130 -- Defined in E_Entry and E_Entry_Family entities. Set if there is
1131 -- at least one accept for this entry in the task body. Used to
1132 -- generate warnings for missing accepts.
1133
1134 -- Entry_Bodies_Array
1135 -- Defined in protected types for which Has_Entries is true.
1136 -- This is the defining identifier for the array of entry body
1137 -- action procedures and barrier functions used by the runtime to
1138 -- execute the user code associated with each entry.
1139
1140 -- Entry_Cancel_Parameter
1141 -- Defined in blocks. This only applies to a block statement for
1142 -- which the Is_Asynchronous_Call_Block flag is set. It
1143 -- contains the defining identifier of an object that must be
1144 -- passed to the Cancel_Task_Entry_Call or Cancel_Protected_Entry_Call
1145 -- call in the cleanup handler added to the block by
1146 -- Exp_Ch7.Expand_Cleanup_Actions. This parameter is a Boolean
1147 -- object for task entry calls and a Communications_Block object
1148 -- in the case of protected entry calls. In both cases the objects
1149 -- are declared in outer scopes to this block.
1150
1151 -- Entry_Component
1152 -- Defined in formal parameters (in, in out and out parameters). Used
1153 -- only for formals of entries. References the corresponding component
1154 -- of the entry parameter record for the entry.
1155
1156 -- Entry_Formal
1157 -- Defined in components of the record built to correspond to entry
1158 -- parameters. This field points from the component to the formal. It
1159 -- is the back pointer corresponding to Entry_Component.
1160
1161 -- Entry_Index_Constant
1162 -- Defined in an entry index parameter. This is an identifier that
1163 -- eventually becomes the name of a constant representing the index
1164 -- of the entry family member whose entry body is being executed. Used
1165 -- to expand references to the entry index specification identifier.
1166
1167 -- Entry_Index_Type (synthesized)
1168 -- Applies to an entry family. Denotes Etype of the subtype indication
1169 -- in the entry declaration. Used to resolve the index expression in an
1170 -- accept statement for a member of the family, and in the prefix of
1171 -- 'COUNT when it applies to a family member.
1172
1173 -- Entry_Max_Queue_Lengths_Array
1174 -- Defined in protected types for which Has_Entries is true. Contains the
1175 -- defining identifier for the array of naturals used by the runtime to
1176 -- limit the queue size of each entry individually.
1177
1178 -- Entry_Parameters_Type
1179 -- Defined in entries. Points to the access-to-record type that is
1180 -- constructed by the expander to hold a reference to the parameter
1181 -- values. This reference is manipulated (as an address) by the
1182 -- tasking runtime. The designated record represents a packaging
1183 -- up of the entry parameters (see Exp_Ch9.Expand_N_Entry_Declaration
1184 -- for further details). Entry_Parameters_Type is Empty if the entry
1185 -- has no parameters.
1186
1187 -- Enumeration_Pos
1188 -- Defined in enumeration literals. Contains the position number
1189 -- corresponding to the value of the enumeration literal.
1190
1191 -- Enumeration_Rep
1192 -- Defined in enumeration literals. Contains the representation that
1193 -- corresponds to the value of the enumeration literal. Note that
1194 -- this is normally the same as Enumeration_Pos except in the presence
1195 -- of representation clauses, where Pos will still represent the
1196 -- position of the literal within the type and Rep will have be the
1197 -- value given in the representation clause.
1198
1199 -- Enumeration_Rep_Expr
1200 -- Defined in enumeration literals. Points to the expression in an
1201 -- associated enumeration rep clause that provides the representation
1202 -- value for this literal. Empty if no enumeration rep clause for this
1203 -- literal (or if rep clause does not have an entry for this literal,
1204 -- an error situation). This is also used to catch duplicate entries
1205 -- for the same literal.
1206
1207 -- Enum_Pos_To_Rep
1208 -- Defined in enumeration types, but not enumeration subtypes. Set to
1209 -- Empty unless the enumeration type has a non-standard representation,
1210 -- i.e. at least one literal has a representation value different from
1211 -- its position value. In this case, the alternative is the following:
1212 -- if the representation is not contiguous, then Enum_Pos_To_Rep is the
1213 -- entity for an array constant built when the type is frozen that maps
1214 -- Pos values to corresponding Rep values, whose index type is Natural
1215 -- and whose component type is the enumeration type itself; or else, if
1216 -- the representation is contiguous, then Enum_Pos_To_Rep is the entity
1217 -- of the index type defined above.
1218
1219 -- Equivalent_Type
1220 -- Defined in class wide types and subtypes, access to protected
1221 -- subprogram types, and in exception types. For a classwide type, it
1222 -- is always Empty. For a class wide subtype, it points to an entity
1223 -- created by the expander which gives the backend an understandable
1224 -- equivalent of the class subtype with a known size (given by an
1225 -- initial value). See Exp_Util.Expand_Class_Wide_Subtype for further
1226 -- details. For E_Exception_Type, this points to the record containing
1227 -- the data necessary to represent exceptions (for further details, see
1228 -- System.Standard_Library). For access to protected subprograms, it
1229 -- denotes a record that holds pointers to the operation and to the
1230 -- protected object. For remote Access_To_Subprogram types, it denotes
1231 -- the record that is the fat pointer representation of an RAST.
1232
1233 -- Esize
1234 -- Defined in all types and subtypes, and also for components, constants,
1235 -- and variables, including exceptions where it refers to the static data
1236 -- allocated for an exception. Contains the Object_Size of the type or of
1237 -- the object. A value of zero indicates that the value is not yet known.
1238 --
1239 -- For the case of components where a component clause is present, the
1240 -- value is the value from the component clause, which must be non-
1241 -- negative (but may be zero, which is acceptable for the case of
1242 -- a type with only one possible value). It is also possible for Esize
1243 -- of a component to be set without a component clause defined, which
1244 -- means that the component size is specified, but not the position.
1245 -- See also RM_Size and the section on "Handling of Type'Size Values".
1246 -- During backend processing, the value is back annotated for all zero
1247 -- values, so that after the call to the backend, the value is set.
1248
1249 -- Etype
1250 -- Defined in all entities. Represents the type of the entity, which
1251 -- is itself another entity. For a type entity, points to the parent
1252 -- type for a derived type, or if the type is not derived, points to
1253 -- itself. For a subtype entity, Etype points to the base type. For
1254 -- a class wide type, points to the corresponding specific type. For a
1255 -- subprogram or subprogram type, Etype has the return type of a function
1256 -- or is set to Standard_Void_Type to represent a procedure. The Etype
1257 -- field of a package is also set to Standard_Void_Type.
1258 --
1259 -- Note one obscure case: for pragma Default_Storage_Pool (null), the
1260 -- Etype of the N_Null node is Empty.
1261
1262 -- Extra_Accessibility
1263 -- Defined in formal parameters in the non-generic case. Normally Empty,
1264 -- but if expansion is active, and a parameter is one for which a
1265 -- dynamic accessibility check is required, then an extra formal of type
1266 -- Natural is created (see description of field Extra_Formal), and the
1267 -- Extra_Accessibility field of the formal parameter points to the entity
1268 -- for this extra formal. Also defined in variables when compiling
1269 -- receiving stubs. In this case, a non Empty value means that this
1270 -- variable's accessibility depth has been transmitted by the caller and
1271 -- must be retrieved through the entity designed by this field instead of
1272 -- being computed.
1273
1274 -- Extra_Accessibility_Of_Result
1275 -- Defined in (non-generic) Function, Operator, and Subprogram_Type
1276 -- entities. Normally Empty, but if expansion is active, and a function
1277 -- is one for which "the accessibility level of the result ... determined
1278 -- by the point of call" (AI05-0234) is needed, then an extra formal of
1279 -- subtype Natural is created (see description of field Extra_Formal),
1280 -- and the Extra_Accessibility_Of_Result field of the function points to
1281 -- the entity for this extra formal.
1282
1283 -- Extra_Constrained
1284 -- Defined in formal parameters in the non-generic case. Normally Empty,
1285 -- but if expansion is active and a parameter is one for which a dynamic
1286 -- indication of its constrained status is required, then an extra formal
1287 -- of type Boolean is created (see description of field Extra_Formal),
1288 -- and the Extra_Constrained field of the formal parameter points to the
1289 -- entity for this extra formal. Also defined in variables when compiling
1290 -- receiving stubs. In this case, a non empty value means that this
1291 -- variable's constrained status has been transmitted by the caller and
1292 -- must be retrieved through the entity designed by this field instead of
1293 -- being computed.
1294
1295 -- Extra_Formal
1296 -- Defined in formal parameters in the non-generic case. Certain
1297 -- parameters require extra implicit information to be passed (e.g. the
1298 -- flag indicating if an unconstrained variant record argument is
1299 -- constrained, and the accessibility level for access parameters). See
1300 -- description of Extra_Constrained, Extra_Accessibility fields for
1301 -- further details. Extra formal parameters are constructed to represent
1302 -- these values, and chained to the end of the list of formals using the
1303 -- Extra_Formal field (i.e. the Extra_Formal field of the last "real"
1304 -- formal points to the first extra formal, and the Extra_Formal field of
1305 -- each extra formal points to the next one, with Empty indicating the
1306 -- end of the list of extra formals). Another case of Extra_Formal arises
1307 -- in connection with unnesting of subprograms, where the ARECnF formal
1308 -- that represents an activation record pointer is an extra formal.
1309
1310 -- Extra_Formals
1311 -- Applies to subprograms, subprogram types, entries, and entry
1312 -- families. Returns first extra formal of the subprogram or entry.
1313 -- Returns Empty if there are no extra formals.
1314
1315 -- Finalization_Master [root type only]
1316 -- Defined in access-to-controlled or access-to-class-wide types. The
1317 -- field contains the entity of the finalization master which handles
1318 -- dynamically allocated controlled objects referenced by the access
1319 -- type. Empty for access-to-subprogram types. Empty for access types
1320 -- whose designated type does not need finalization actions.
1321
1322 -- Finalize_Storage_Only [base type only]
1323 -- Defined in all types. Set on direct controlled types to which a
1324 -- valid Finalize_Storage_Only pragma applies. This flag is also set on
1325 -- composite types when they have at least one controlled component and
1326 -- all their controlled components are Finalize_Storage_Only. It is also
1327 -- inherited by type derivation except for direct controlled types where
1328 -- the Finalize_Storage_Only pragma is required at each level of
1329 -- derivation.
1330
1331 -- Finalizer
1332 -- Applies to package declarations and bodies. Contains the entity of the
1333 -- library-level program which finalizes all package-level controlled
1334 -- objects.
1335
1336 -- First_Component (synthesized)
1337 -- Applies to incomplete, private, protected, record and task types.
1338 -- Returns the first component by following the chain of declared
1339 -- entities for the type a component is found (one with an Ekind of
1340 -- E_Component). The discriminants are skipped. If the record is null,
1341 -- then Empty is returned.
1342
1343 -- First_Component_Or_Discriminant (synthesized)
1344 -- Similar to First_Component, but discriminants are not skipped, so will
1345 -- find the first discriminant if discriminants are present.
1346
1347 -- First_Entity
1348 -- Defined in all entities which act as scopes to which a list of
1349 -- associated entities is attached (blocks, class subtypes and types,
1350 -- entries, functions, loops, packages, procedures, protected objects,
1351 -- record types and subtypes, private types, task types and subtypes).
1352 -- Points to a list of associated entities using the Next_Entity field
1353 -- as a chain pointer with Empty marking the end of the list.
1354
1355 -- First_Exit_Statement
1356 -- Defined in E_Loop entity. The exit statements for a loop are chained
1357 -- (in reverse order of appearance) using this field to point to the
1358 -- first entry in the chain (last exit statement in the loop). The
1359 -- entries are chained through the Next_Exit_Statement field of the
1360 -- N_Exit_Statement node with Empty marking the end of the list.
1361
1362 -- First_Formal (synthesized)
1363 -- Applies to subprograms and subprogram types, and also to entries
1364 -- and entry families. Returns first formal of the subprogram or entry.
1365 -- The formals are the first entities declared in a subprogram or in
1366 -- a subprogram type (the designated type of an Access_To_Subprogram
1367 -- definition) or in an entry.
1368
1369 -- First_Formal_With_Extras (synthesized)
1370 -- Applies to subprograms and subprogram types, and also in entries
1371 -- and entry families. Returns first formal of the subprogram or entry.
1372 -- Returns Empty if there are no formals. The list returned includes
1373 -- all the extra formals (see description of Extra_Formals field).
1374
1375 -- First_Index
1376 -- Defined in array types and subtypes. By introducing implicit subtypes
1377 -- for the index constraints, we have the same structure for constrained
1378 -- and unconstrained arrays, subtype marks and discrete ranges are
1379 -- both represented by a subtype. This function returns the tree node
1380 -- corresponding to an occurrence of the first index (NOT the entity for
1381 -- the type). Subsequent indices are obtained using Next_Index. Note that
1382 -- this field is defined for the case of string literal subtypes, but is
1383 -- always Empty.
1384
1385 -- First_Literal
1386 -- Defined in all enumeration types, including character and boolean
1387 -- types. This field points to the first enumeration literal entity
1388 -- for the type (i.e. it is set to First (Literals (N)) where N is
1389 -- the enumeration type definition node. A special case occurs with
1390 -- standard character and wide character types, where this field is
1391 -- Empty, since there are no enumeration literal lists in these cases.
1392 -- Note that this field is set in enumeration subtypes, but it still
1393 -- points to the first literal of the base type in this case.
1394
1395 -- First_Private_Entity
1396 -- Defined in all entities containing private parts (packages, protected
1397 -- types and subtypes, task types and subtypes). The entities on the
1398 -- entity chain are in order of declaration, so the entries for private
1399 -- entities are at the end of the chain. This field points to the first
1400 -- entity for the private part. It is Empty if there are no entities
1401 -- declared in the private part or if there is no private part.
1402
1403 -- First_Rep_Item
1404 -- Defined in all entities. If non-empty, points to a linked list of
1405 -- representation pragmas nodes and representation clause nodes that
1406 -- apply to the entity, linked using Next_Rep_Item, with Empty marking
1407 -- the end of the list. In the case of derived types and subtypes, the
1408 -- new entity inherits the chain at the point of declaration. This means
1409 -- that it is possible to have multiple instances of the same kind of rep
1410 -- item on the chain, in which case it is the first one that applies to
1411 -- the entity.
1412 --
1413 -- Note: pragmas that can apply to more than one overloadable entity,
1414 -- (Convention, Interface, Inline, Inline_Always, Import, Export,
1415 -- External) are never present on this chain when they apply to
1416 -- overloadable entities, since it is impossible for a given pragma
1417 -- to be on more than one chain at a time.
1418 --
1419 -- For most representation items, the representation information is
1420 -- reflected in other fields and flags in the entity. For example if a
1421 -- record representation clause is present, the component entities
1422 -- reflect the specified information. However, there are some items that
1423 -- are only reflected in the chain. These include:
1424 --
1425 -- Machine_Attribute pragma
1426 -- Link_Alias pragma
1427 -- Linker_Constructor pragma
1428 -- Linker_Destructor pragma
1429 -- Weak_External pragma
1430 -- Thread_Local_Storage pragma
1431 --
1432 -- If any of these items are present, then the flag Has_Gigi_Rep_Item is
1433 -- set, indicating that the backend should search the chain.
1434 --
1435 -- Other representation items are included in the chain so that error
1436 -- messages can easily locate the relevant nodes for posting errors.
1437 -- Note in particular that size clauses are defined only for this
1438 -- purpose, and should only be accessed if Has_Size_Clause is set.
1439
1440 -- Float_Rep [base type only]
1441 -- Defined in floating-point entities. Contains a value of type
1442 -- Float_Rep_Kind. Together with the Digits_Value uniquely defines
1443 -- the floating-point representation to be used.
1444
1445 -- Freeze_Node
1446 -- Defined in all entities. If there is an associated freeze node for the
1447 -- entity, this field references this freeze node. If no freeze node is
1448 -- associated with the entity, then this field is Empty. See package
1449 -- Freeze for further details.
1450
1451 -- From_Limited_With
1452 -- Defined in abtract states, package and type entities. Set to True when
1453 -- the related entity is generated by the expansion of a limited with
1454 -- clause. Such an entity is said to be a "shadow" - it acts as the
1455 -- abstract view of a state or variable or as the incomplete view of a
1456 -- type by inheriting relevant attributes from the said entity.
1457
1458 -- Full_View
1459 -- Defined in all type and subtype entities and in deferred constants.
1460 -- References the entity for the corresponding full type or constant
1461 -- declaration. For all types other than private and incomplete types,
1462 -- this field always contains Empty. If an incomplete type E1 is
1463 -- completed by a private type E2 whose full type declaration entity is
1464 -- E3 then the full view of E1 is E2, and the full view of E2 is E3. See
1465 -- also Underlying_Type.
1466
1467 -- Generic_Homonym
1468 -- Defined in generic packages. The generic homonym is the entity of
1469 -- a renaming declaration inserted in every generic unit. It is used
1470 -- to resolve the name of a local entity that is given by a qualified
1471 -- name, when the generic entity itself is hidden by a local name.
1472
1473 -- Generic_Renamings
1474 -- Defined in package and subprogram instances. Holds mapping that
1475 -- associates generic parameters with the corresponding instances, in
1476 -- those cases where the instance is an entity.
1477
1478 -- Handler_Records
1479 -- Defined in subprogram and package entities. Points to a list of
1480 -- identifiers referencing the handler record entities for the
1481 -- corresponding unit.
1482
1483 -- Has_Aliased_Components [implementation base type only]
1484 -- Defined in array type entities. Indicates that the component type
1485 -- of the array is aliased. Should this also be set for records to
1486 -- indicate that at least one component is aliased (see processing in
1487 -- Sem_Prag.Process_Atomic_Independent_Shared_Volatile???)
1488
1489 -- Has_Alignment_Clause
1490 -- Defined in all type entities and objects. Indicates if an alignment
1491 -- clause has been given for the entity. If set, then Alignment_Clause
1492 -- returns the N_Attribute_Definition node for the alignment attribute
1493 -- definition clause. Note that it is possible for this flag to be False
1494 -- even when Alignment_Clause returns non_Empty (this happens in the case
1495 -- of derived type declarations).
1496
1497 -- Has_All_Calls_Remote
1498 -- Defined in all library unit entities. Set if the library unit has an
1499 -- All_Calls_Remote pragma. Note that such entities must also be RCI
1500 -- entities, so the flag Is_Remote_Call_Interface will always be set if
1501 -- this flag is set.
1502
1503 -- Has_Atomic_Components [implementation base type only]
1504 -- Defined in all types and objects. Set only for an array type or
1505 -- an array object if a valid pragma Atomic_Components applies to the
1506 -- type or object. Note that in the case of an object, this flag is
1507 -- only set on the object if there was an explicit pragma for the
1508 -- object. In other words, the proper test for whether an object has
1509 -- atomic components is to see if either the object or its base type
1510 -- has this flag set. Note that in the case of a type, the pragma will
1511 -- be chained to the rep item chain of the first subtype in the usual
1512 -- manner.
1513
1514 -- Has_Attach_Handler (synthesized)
1515 -- Applies to record types that are constructed by the expander to
1516 -- represent protected types. Returns True if there is at least one
1517 -- Attach_Handler pragma in the corresponding specification.
1518
1519 -- Has_Biased_Representation
1520 -- Defined in discrete types (where it applies to the type'size value),
1521 -- and to objects (both stand-alone and components), where it applies to
1522 -- the size of the object from a size or record component clause. In
1523 -- all cases it indicates that the size in question is smaller than
1524 -- would normally be required, but that the size requirement can be
1525 -- satisfied by using a biased representation, in which stored values
1526 -- have the low bound (Expr_Value (Type_Low_Bound (T)) subtracted to
1527 -- reduce the required size. For example, a type with a range of 1..2
1528 -- takes one bit, using 0 to represent 1 and 1 to represent 2.
1529 --
1530 -- Note that in the object and component cases, the flag is only set if
1531 -- the type is unbiased, but the object specifies a smaller size than the
1532 -- size of the type, forcing biased representation for the object, but
1533 -- the subtype is still an unbiased type.
1534
1535 -- Has_Completion
1536 -- Defined in all entities that require a completion (functions,
1537 -- procedures, private types, limited private types, incomplete types,
1538 -- constants and packages that require a body). The flag is set if the
1539 -- completion has been encountered and analyzed.
1540
1541 -- Has_Completion_In_Body
1542 -- Defined in all entities for types and subtypes. Set only in "Taft
1543 -- amendment types" (incomplete types whose full declaration appears in
1544 -- the package body).
1545
1546 -- Has_Complex_Representation [implementation base type only]
1547 -- Defined in record types. Set only for a base type to which a valid
1548 -- pragma Complex_Representation applies.
1549
1550 -- Has_Component_Size_Clause [implementation base type only]
1551 -- Defined in all type entities. Set if a component size clause is
1552 -- Defined for the given type. Note that this flag can be False even
1553 -- if Component_Size is non-zero (happens in the case of derived types).
1554
1555 -- Has_Constrained_Partial_View [base type only]
1556 -- Defined in private type and their completions, when the private
1557 -- type has no discriminants and the full view has discriminants with
1558 -- defaults. In Ada 2005 heap-allocated objects of such types are not
1559 -- constrained, and can change their discriminants with full assignment.
1560 --
1561 -- Ada 2012 has an additional rule (3.3. (23/10.3)) concerning objects
1562 -- declared in a generic package body. Objects whose type is an untagged
1563 -- generic formal private type are considered to have a constrained
1564 -- partial view. The predicate Object_Type_Has_Constrained_Partial_View
1565 -- in sem_aux is used to test for this case.
1566
1567 -- Has_Contiguous_Rep
1568 -- Defined in enumeration types. Set if the type has a representation
1569 -- clause whose entries are successive integers.
1570
1571 -- Has_Controlled_Component [base type only]
1572 -- Defined in all type and subtype entities. Set only for composite type
1573 -- entities which contain a component that either is a controlled type,
1574 -- or itself contains controlled component (i.e. either Is_Controlled or
1575 -- Has_Controlled_Component is set for at least one component).
1576
1577 -- Has_Controlling_Result
1578 -- Defined in E_Function entities. Set if the function is a primitive
1579 -- function of a tagged type which can dispatch on result.
1580
1581 -- Has_Convention_Pragma
1582 -- Defined in all entities. Set for an entity for which a valid pragma
1583 -- Convention, Import, or Export has been given. Used to prevent more
1584 -- than one such pragma appearing for a given entity (RM B.1(45)).
1585
1586 -- Has_Default_Aspect [base type only]
1587 -- Defined in entities for types and subtypes, set for scalar types with
1588 -- a Default_Value aspect and array types with a Default_Component_Value
1589 -- aspect. If this flag is set, then a corresponding aspect specification
1590 -- node will be present on the rep item chain for the entity. For a
1591 -- derived type that inherits a default from its ancestor, the default
1592 -- value is set, but it may be overridden by an aspect declaration on
1593 -- type derivation.
1594
1595 -- Has_Delayed_Aspects
1596 -- Defined in all entities. Set if the Rep_Item chain for the entity has
1597 -- one or more N_Aspect_Definition nodes chained which are not to be
1598 -- evaluated till the freeze point. The aspect definition expression
1599 -- clause has been preanalyzed to get visibility at the point of use,
1600 -- but no other action has been taken.
1601
1602 -- Has_Delayed_Freeze
1603 -- Defined in all entities. Set to indicate that an explicit freeze
1604 -- node must be generated for the entity at its freezing point. See
1605 -- separate section ("Delayed Freezing and Elaboration") for details.
1606
1607 -- Has_Delayed_Rep_Aspects
1608 -- Defined in all types and subtypes. This flag is set if there is at
1609 -- least one aspect for a representation characteristic that has to be
1610 -- delayed and is one of the characteristics that may be inherited by
1611 -- types derived from this type if not overridden. If this flag is set,
1612 -- then types derived from this type have May_Inherit_Delayed_Rep_Aspects
1613 -- set, signalling that Freeze.Inherit_Delayed_Rep_Aspects must be called
1614 -- at the freeze point of the derived type.
1615
1616 -- Has_DIC (synthesized)
1617 -- Defined in all type entities. Set for a private type and its full view
1618 -- when the type is subject to pragma Default_Initial_Condition (DIC), or
1619 -- when the type inherits a DIC pragma from a parent type.
1620
1621 -- Has_Discriminants
1622 -- Defined in all types and subtypes. For types that are allowed to have
1623 -- discriminants (record types and subtypes, task types and subtypes,
1624 -- protected types and subtypes, private types, limited private types,
1625 -- and incomplete types), indicates if the corresponding type or subtype
1626 -- has a known discriminant part. Always false for all other types.
1627
1628 -- Has_Dispatch_Table
1629 -- Defined in E_Record_Types that are tagged. Set to indicate that the
1630 -- corresponding dispatch table is already built. This flag is used to
1631 -- avoid duplicate construction of library level dispatch tables (because
1632 -- the declaration of library level objects cause premature construction
1633 -- of the table); otherwise the code that builds the table is added at
1634 -- the end of the list of declarations of the package.
1635
1636 -- Has_Dynamic_Predicate_Aspect
1637 -- Defined in all types and subtypes. Set if a Dynamic_Predicate aspect
1638 -- was explicitly applied to the type. Generally we treat predicates as
1639 -- static if possible, regardless of whether they are specified using
1640 -- Predicate, Static_Predicate, or Dynamic_Predicate. And if a predicate
1641 -- can be treated as static (i.e. its expression is predicate-static),
1642 -- then the flag Has_Static_Predicate will be set True. But there are
1643 -- cases where legality is affected by the presence of an explicit
1644 -- Dynamic_Predicate aspect. For example, even if a predicate looks
1645 -- static, you can't use it in a case statement if there is an explicit
1646 -- Dynamic_Predicate aspect specified. So test Has_Static_Predicate if
1647 -- you just want to know if the predicate can be evaluated statically,
1648 -- but test Has_Dynamic_Predicate_Aspect to enforce legality rules about
1649 -- the use of dynamic predicates.
1650
1651 -- Has_Entries (synthesized)
1652 -- Applies to concurrent types. True if any entries are declared
1653 -- within the task or protected definition for the type.
1654
1655 -- Has_Enumeration_Rep_Clause
1656 -- Defined in enumeration types. Set if an enumeration representation
1657 -- clause has been given for this enumeration type. Used to prevent more
1658 -- than one enumeration representation clause for a given type. Note
1659 -- that this does not imply a representation with holes, since the rep
1660 -- clause may merely confirm the default 0..N representation.
1661
1662 -- Has_Exit
1663 -- Defined in loop entities. Set if the loop contains an exit statement.
1664
1665 -- Has_Expanded_Contract
1666 -- Defined in functions, procedures, entries, and entry families. Set
1667 -- when a subprogram has a N_Contract node that has been expanded. The
1668 -- flag prevents double expansion of a contract when a construct is
1669 -- rewritten into something else and subsequently reanalyzed/expanded.
1670
1671 -- Has_Foreign_Convention (synthesized)
1672 -- Applies to all entities. Determines if the Convention for the entity
1673 -- is a foreign convention, i.e. non-native: other than Convention_Ada,
1674 -- Convention_Intrinsic, Convention_Entry, Convention_Protected,
1675 -- Convention_Stubbed and Convention_Ada_Pass_By_(Copy,Reference).
1676
1677 -- Has_Forward_Instantiation
1678 -- Defined in package entities. Set for packages that instantiate local
1679 -- generic entities before the corresponding generic body has been seen.
1680 -- If a package has a forward instantiation, we cannot inline subprograms
1681 -- appearing in the same package because the placement requirements of
1682 -- the instance will conflict with the linear elaboration of front-end
1683 -- inlining.
1684
1685 -- Has_Fully_Qualified_Name
1686 -- Defined in all entities. Set if the name in the Chars field has been
1687 -- replaced by the fully qualified name, as used for debug output. See
1688 -- Exp_Dbug for a full description of the use of this flag and also the
1689 -- related flag Has_Qualified_Name.
1690
1691 -- Has_Gigi_Rep_Item
1692 -- Defined in all entities. Set if the rep item chain (referenced by
1693 -- First_Rep_Item and linked through the Next_Rep_Item chain) contains a
1694 -- representation item that needs to be specially processed by the back
1695 -- end, i.e. one of the following items:
1696 --
1697 -- Machine_Attribute pragma
1698 -- Linker_Alias pragma
1699 -- Linker_Constructor pragma
1700 -- Linker_Destructor pragma
1701 -- Weak_External pragma
1702 -- Thread_Local_Storage pragma
1703 --
1704 -- If this flag is set, then the backend should scan the rep item chain
1705 -- to process any of these items that appear. At least one such item will
1706 -- be present.
1707 --
1708 -- Has_Homonym
1709 -- Defined in all entities. Set if an entity has a homonym in the same
1710 -- scope. Used by the backend to generate unique names for all entities.
1711
1712 -- Has_Implicit_Dereference
1713 -- Defined in types and discriminants. Set if the type has an aspect
1714 -- Implicit_Dereference. Set also on the discriminant named in the aspect
1715 -- clause, to simplify type resolution.
1716
1717 -- Has_Independent_Components [implementation base type only]
1718 -- Defined in all types and objects. Set only for a record type or an
1719 -- array type or array object if a valid pragma Independent_Components
1720 -- applies to the type or object. Note that in the case of an object,
1721 -- this flag is only set on the object if there was an explicit pragma
1722 -- for the object. In other words, the proper test for whether an object
1723 -- has independent components is to see if either the object or its base
1724 -- type has this flag set. Note that in the case of a type, the pragma
1725 -- will be chained to the rep item chain of the first subtype in the
1726 -- usual manner. Also set if a pragma Has_Atomic_Components or pragma
1727 -- Has_Aliased_Components applies to the type or object.
1728
1729 -- Has_Inheritable_Invariants [base type only]
1730 -- Defined in all type entities. Set on private types and interface types
1731 -- which define at least one class-wide invariant. Such invariants must
1732 -- be inherited by derived types. The flag is also set on the full view
1733 -- of a private type for completeness.
1734
1735 -- Has_Inherited_DIC [base type only]
1736 -- Defined in all type entities. Set for a derived type which inherits
1737 -- pragma Default_Initial_Condition from a parent type.
1738
1739 -- Has_Inherited_Invariants [base type only]
1740 -- Defined in all type entities. Set on private extensions and derived
1741 -- types which inherit at least one class-wide invariant from a parent or
1742 -- an interface type. The flag is also set on the full view of a private
1743 -- extension for completeness.
1744
1745 -- Has_Initial_Value
1746 -- Defined in entities for variables and out parameters. Set if there
1747 -- is an explicit initial value expression in the declaration of the
1748 -- variable. Note that this is set only if this initial value is
1749 -- explicit, it is not set for the case of implicit initialization
1750 -- of access types or controlled types. Always set to False for out
1751 -- parameters. Also defined in entities for in and in-out parameters,
1752 -- but always false in these cases.
1753
1754 -- Has_Interrupt_Handler (synthesized)
1755 -- Applies to all protected type entities. Set if the protected type
1756 -- definition contains at least one procedure to which a pragma
1757 -- Interrupt_Handler applies.
1758
1759 -- Has_Invariants (synthesized)
1760 -- Defined in all type entities. True if the type defines at least one
1761 -- invariant of its own or inherits at least one class-wide invariant
1762 -- from a parent type or an interface.
1763
1764 -- Has_Limited_View (synth)
1765 -- Defined in all entities. True for non-generic package entities that
1766 -- are non-instances and their Limited_View attribute is present.
1767
1768 -- Has_Loop_Entry_Attributes
1769 -- Defined in E_Loop entities. Set when the loop is subject to at least
1770 -- one attribute 'Loop_Entry. The flag also implies that the loop has
1771 -- already been transformed. See Expand_Loop_Entry_Attribute for details.
1772
1773 -- Has_Machine_Radix_Clause
1774 -- Defined in decimal types and subtypes, set if a Machine_Radix
1775 -- representation clause is present. This flag is used to detect
1776 -- the error of multiple machine radix clauses for a single type.
1777
1778 -- Has_Master_Entity
1779 -- Defined in entities that can appear in the scope stack (see spec
1780 -- of Sem). It is set if a task master entity (_master) has been
1781 -- declared and initialized in the corresponding scope.
1782
1783 -- Has_Missing_Return
1784 -- Defined in functions and generic functions. Set if there is one or
1785 -- more missing return statements in the function. This is used to
1786 -- control wrapping of the body in Exp_Ch6 to ensure that the program
1787 -- error exception is correctly raised in this case at run time.
1788
1789 -- Has_Nested_Block_With_Handler
1790 -- Defined in scope entities. Set if there is a nested block within the
1791 -- scope that has an exception handler and the two scopes are in the
1792 -- same procedure. This is used by the backend for controlling certain
1793 -- optimizations to ensure that they are consistent with exceptions.
1794 -- See documentation in backend for further details.
1795
1796 -- Has_Nested_Subprogram
1797 -- Defined in subprogram entities. Set for a subprogram which contains at
1798 -- least one nested subprogram.
1799
1800 -- Has_Non_Limited_View (synth)
1801 -- Defined in E_Incomplete_Type, E_Incomplete_Subtype, E_Class_Wide_Type,
1802 -- E_Abstract_State entities. True if their Non_Limited_View attribute
1803 -- is present.
1804
1805 -- Has_Non_Null_Abstract_State (synth)
1806 -- Defined in package entities. True if the package is subject to a non-
1807 -- null Abstract_State aspect/pragma.
1808
1809 -- Has_Non_Null_Visible_Refinement (synth)
1810 -- Defined in E_Abstract_State entities. True if the state has a visible
1811 -- refinement of at least one variable or state constituent as expressed
1812 -- in aspect/pragma Refined_State.
1813
1814 -- Has_Non_Standard_Rep [implementation base type only]
1815 -- Defined in all type entities. Set when some representation clause
1816 -- or pragma causes the representation of the item to be significantly
1817 -- modified. In this category are changes of small or radix for a
1818 -- fixed-point type, change of component size for an array, and record
1819 -- or enumeration representation clauses, as well as packed pragmas.
1820 -- All other representation clauses (e.g. Size and Alignment clauses)
1821 -- are not considered to be significant since they do not affect
1822 -- stored bit patterns.
1823
1824 -- Has_Null_Abstract_State (synth)
1825 -- Defined in package entities. True if the package is subject to a null
1826 -- Abstract_State aspect/pragma.
1827
1828 -- Has_Null_Visible_Refinement (synth)
1829 -- Defined in E_Abstract_State entities. True if the state has a visible
1830 -- null refinement as expressed in aspect/pragma Refined_State.
1831
1832 -- Has_Object_Size_Clause
1833 -- Defined in entities for types and subtypes. Set if an Object_Size
1834 -- clause has been processed for the type. Used to prevent multiple
1835 -- Object_Size clauses for a given entity.
1836
1837 -- Has_Out_Or_In_Out_Parameter
1838 -- Present in subprograms, generic subprograms, entries, and entry
1839 -- families. Set if they have at least one OUT or IN OUT parameter
1840 -- (allowed for functions only in Ada 2012).
1841
1842 -- Has_Own_DIC [base type only]
1843 -- Defined in all type entities. Set for a private type and its full view
1844 -- (and its underlying full view, if the full view is itself private)
1845 -- when the type is subject to pragma Default_Initial_Condition.
1846
1847 -- Has_Own_Invariants [base type only]
1848 -- Defined in all type entities. Set on any type that defines at least
1849 -- one invariant of its own.
1850
1851 -- Note: this flag is set on both partial and full view of types to which
1852 -- an Invariant pragma or aspect applies, and on the underlying full view
1853 -- if the full view is private.
1854
1855 -- Has_Partial_Visible_Refinement
1856 -- Defined in E_Abstract_State entities. Set when a state has at least
1857 -- one refinement constituent subject to indicator Part_Of, and analysis
1858 -- is in the region between the declaration of the first constituent for
1859 -- this abstract state (in the private part of the package) and the end
1860 -- of the package spec or body with visibility over this private part
1861 -- (which includes the package itself and its child packages).
1862
1863 -- Has_Per_Object_Constraint
1864 -- Defined in E_Component entities. Set if the subtype of the component
1865 -- has a per object constraint. Per object constraints result from the
1866 -- following situations :
1867 --
1868 -- 1. N_Attribute_Reference - when the prefix is the enclosing type and
1869 -- the attribute is Access.
1870 -- 2. N_Discriminant_Association - when the expression uses the
1871 -- discriminant of the enclosing type.
1872 -- 3. N_Index_Or_Discriminant_Constraint - when at least one of the
1873 -- individual constraints is a per object constraint.
1874 -- 4. N_Range - when the lower or upper bound uses the discriminant of
1875 -- the enclosing type.
1876 -- 5. N_Range_Constraint - when the range expression uses the
1877 -- discriminant of the enclosing type.
1878
1879 -- Has_Pragma_Controlled [implementation base type only]
1880 -- Defined in access type entities. It is set if a pragma Controlled
1881 -- applies to the access type.
1882
1883 -- Has_Pragma_Elaborate_Body
1884 -- Defined in all entities. Set in compilation unit entities if a
1885 -- pragma Elaborate_Body applies to the compilation unit.
1886
1887 -- Has_Pragma_Inline
1888 -- Defined in all entities. Set for functions and procedures for which a
1889 -- pragma Inline or Inline_Always applies to the subprogram. Note that
1890 -- this flag can be set even if Is_Inlined is not set. This happens for
1891 -- pragma Inline (if Inline_Active is False). In other words, the flag
1892 -- Has_Pragma_Inline represents the formal semantic status, and is used
1893 -- for checking semantic correctness. The flag Is_Inlined indicates
1894 -- whether inlining is actually active for the entity.
1895
1896 -- Has_Pragma_Inline_Always
1897 -- Defined in all entities. Set for functions and procedures for which a
1898 -- pragma Inline_Always applies. Note that if this flag is set, the flag
1899 -- Has_Pragma_Inline is also set.
1900
1901 -- Has_Pragma_No_Inline
1902 -- Defined in all entities. Set for functions and procedures for which a
1903 -- pragma No_Inline applies. Note that if this flag is set, the flag
1904 -- Has_Pragma_Inline_Always cannot be set.
1905
1906 -- Has_Pragma_Ordered [implementation base type only]
1907 -- Defined in entities for enumeration types. If set indicates that a
1908 -- valid pragma Ordered was given for the type. This flag is inherited
1909 -- by derived enumeration types. We don't need to distinguish the derived
1910 -- case since we allow multiple occurrences of this pragma anyway.
1911
1912 -- Has_Pragma_Pack [implementation base type only]
1913 -- Defined in array and record type entities. If set, indicates that a
1914 -- valid pragma Pack was given for the type. Note that this flag is not
1915 -- inherited by derived type. See also the Is_Packed flag.
1916
1917 -- Has_Pragma_Preelab_Init
1918 -- Defined in type and subtype entities. If set indicates that a valid
1919 -- pragma Preelaborable_Initialization applies to the type.
1920
1921 -- Has_Pragma_Pure
1922 -- Defined in all entities. If set, indicates that a valid pragma Pure
1923 -- was given for the entity. In some cases, we need to test whether
1924 -- Is_Pure was explicitly set using this pragma.
1925
1926 -- Has_Pragma_Pure_Function
1927 -- Defined in all entities. If set, indicates that a valid pragma
1928 -- Pure_Function was given for the entity. In some cases, we need to test
1929 -- whether Is_Pure was explicitly set using this pragma. We also set
1930 -- this flag for some internal entities that we know should be treated
1931 -- as pure for optimization purposes.
1932
1933 -- Has_Pragma_Thread_Local_Storage
1934 -- Defined in all entities. If set, indicates that a valid pragma
1935 -- Thread_Local_Storage was given for the entity.
1936
1937 -- Has_Pragma_Unmodified
1938 -- Defined in all entities. Can only be set for variables (E_Variable,
1939 -- E_Out_Parameter, E_In_Out_Parameter). Set if a valid pragma Unmodified
1940 -- applies to the variable, indicating that no warning should be given
1941 -- if the entity is never modified. Note that clients should generally
1942 -- not test this flag directly, but instead use function Has_Unmodified.
1943
1944 -- Has_Pragma_Unreferenced
1945 -- Defined in all entities. Set if a valid pragma Unreferenced applies
1946 -- to the entity, indicating that no warning should be given if the
1947 -- entity has no references, but a warning should be given if it is
1948 -- in fact referenced. For private types, this flag is set in both the
1949 -- private entity and full entity if the pragma applies to either. Note
1950 -- that clients should generally not test this flag directly, but instead
1951 -- use function Has_Unreferenced.
1952
1953 -- Has_Pragma_Unreferenced_Objects
1954 -- Defined in all entities. Set if a valid pragma Unused applies to an
1955 -- entity, indicating that warnings should be given if the entity is
1956 -- modified or referenced. This pragma is equivalent to a pair of
1957 -- Unmodified and Unreferenced pragmas.
1958
1959 -- Has_Pragma_Unused
1960 -- Defined in all entities. Set if a valid pragma Unused applies to a
1961 -- variable or entity, indicating that warnings should not be given if
1962 -- it is never modified or referenced. Note: This pragma is exactly
1963 -- equivalent Unmodified and Unreference combined.
1964
1965 -- Has_Predicates
1966 -- Defined in type and subtype entities. Set if a pragma Predicate or
1967 -- Predicate aspect applies to the type or subtype, or if it inherits a
1968 -- Predicate aspect from its parent or progenitor types.
1969 --
1970 -- Note: this flag is set on both partial and full view of types to which
1971 -- a Predicate pragma or aspect applies, and on the underlying full view
1972 -- if the full view is private.
1973
1974 -- Has_Primitive_Operations [base type only]
1975 -- Defined in all type entities. Set if at least one primitive operation
1976 -- is defined for the type.
1977
1978 -- Has_Private_Ancestor
1979 -- Applies to type extensions. True if some ancestor is derived from a
1980 -- private type, making some components invisible and aggregates illegal.
1981 -- This flag is set at the point of derivation. The legality of the
1982 -- aggregate must be rechecked because it also depends on the visibility
1983 -- at the point the aggregate is resolved. See sem_aggr.adb. This is part
1984 -- of AI05-0115.
1985
1986 -- Has_Private_Declaration
1987 -- Defined in all entities. Set if it is the defining entity of a private
1988 -- type declaration or its corresponding full declaration. This flag is
1989 -- thus preserved when the full and the partial views are exchanged, to
1990 -- indicate if a full type declaration is a completion. Used for semantic
1991 -- checks in E.4(18) and elsewhere.
1992
1993 -- Has_Private_Extension
1994 -- Defined in tagged types. Set to indicate that the tagged type has some
1995 -- private extension. Used to report a warning on public primitives added
1996 -- after defining its private extensions.
1997
1998 -- Has_Protected [base type only]
1999 -- Defined in all type entities. Set on protected types themselves, and
2000 -- also (recursively) on any composite type which has a component for
2001 -- which Has_Protected is set, unless the protected type is declared in
2002 -- the private part of an internal unit. The meaning is that restrictions
2003 -- for protected types apply to this type. Note: the flag is not set on
2004 -- access types, even if they designate an object that Has_Protected.
2005
2006 -- Has_Qualified_Name
2007 -- Defined in all entities. Set if the name in the Chars field has
2008 -- been replaced by its qualified name, as used for debug output. See
2009 -- Exp_Dbug for a full description of qualification requirements. For
2010 -- some entities, the name is the fully qualified name, but there are
2011 -- exceptions. In particular, for local variables in procedures, we
2012 -- do not include the procedure itself or higher scopes. See also the
2013 -- flag Has_Fully_Qualified_Name, which is set if the name does indeed
2014 -- include the fully qualified name.
2015
2016 -- Has_RACW
2017 -- Defined in package spec entities. Set if the spec contains the
2018 -- declaration of a remote access-to-classwide type.
2019
2020 -- Has_Record_Rep_Clause [implementation base type only]
2021 -- Defined in record types. Set if a record representation clause has
2022 -- been given for this record type. Used to prevent more than one such
2023 -- clause for a given record type. Note that this is initially cleared
2024 -- for a derived type, even though the representation is inherited. See
2025 -- also the flag Has_Specified_Layout.
2026
2027 -- Has_Recursive_Call
2028 -- Defined in procedures. Set if a direct parameterless recursive call
2029 -- is detected while analyzing the body. Used to activate some error
2030 -- checks for infinite recursion.
2031
2032 -- Has_Shift_Operator [base type only]
2033 -- Defined in integer types. Set in the base type of an integer type for
2034 -- which at least one of the shift operators is defined.
2035
2036 -- Has_Size_Clause
2037 -- Defined in entities for types and objects. Set if a size or value size
2038 -- clause is defined for the entity. Used to prevent multiple clauses
2039 -- for a given entity. Note that it is always initially cleared for a
2040 -- derived type, even though the Size or Value_Size clause for such a
2041 -- type might be inherited from an ancestor type.
2042
2043 -- Has_Small_Clause
2044 -- Defined in ordinary fixed point types (but not subtypes). Indicates
2045 -- that a small clause has been given for the entity. Used to prevent
2046 -- multiple Small clauses for a given entity. Note that it is always
2047 -- initially cleared for a derived type, even though the Small for such
2048 -- a type is inherited from a Small clause given for the parent type.
2049
2050 -- Has_Specified_Layout [implementation base type only]
2051 -- Defined in all type entities. Set for a record type or subtype if
2052 -- the record layout has been specified by a record representation
2053 -- clause. Note that this differs from the flag Has_Record_Rep_Clause
2054 -- in that it is inherited by a derived type. Has_Record_Rep_Clause is
2055 -- used to indicate that the type is mentioned explicitly in a record
2056 -- representation clause, and thus is not inherited by a derived type.
2057 -- This flag is always False for non-record types.
2058
2059 -- Has_Specified_Stream_Input
2060 -- Has_Specified_Stream_Output
2061 -- Has_Specified_Stream_Read
2062 -- Has_Specified_Stream_Write
2063 -- Defined in all type and subtype entities. Set for a given view if the
2064 -- corresponding stream-oriented attribute has been defined by an
2065 -- attribute definition clause. When such a clause occurs, a TSS is set
2066 -- on the underlying full view; the flags are used to track visibility of
2067 -- the attribute definition clause for partial or incomplete views.
2068
2069 -- Has_Static_Discriminants
2070 -- Defined in record subtypes constrained by discriminant values. Set if
2071 -- all the discriminant values have static values, meaning that in the
2072 -- case of a variant record, the component list can be trimmed down to
2073 -- include only the components corresponding to these discriminants.
2074
2075 -- Has_Static_Predicate
2076 -- Defined in all types and subtypes. Set if the type (which must be a
2077 -- scalar type) has a predicate whose expression is predicate-static.
2078 -- This can result from the use of any Predicate, Static_Predicate, or
2079 -- Dynamic_Predicate aspect. We can distinguish these cases by testing
2080 -- Has_Static_Predicate_Aspect and Has_Dynamic_Predicate_Aspect. See
2081 -- description of the latter flag for further information on dynamic
2082 -- predicates which are also static.
2083
2084 -- Has_Static_Predicate_Aspect
2085 -- Defined in all types and subtypes. Set if a Static_Predicate aspect
2086 -- applies to the type. Note that we can tell if a static predicate is
2087 -- present by looking at Has_Static_Predicate, but this could have come
2088 -- from a Predicate aspect or pragma or even from a Dynamic_Predicate
2089 -- aspect. When we need to know the difference (e.g. to know what set of
2090 -- check policies apply, use this flag and Has_Dynamic_Predicate_Aspect
2091 -- to determine which case we have).
2092
2093 -- Has_Storage_Size_Clause [implementation base type only]
2094 -- Defined in task types and access types. It is set if a Storage_Size
2095 -- clause is present for the type. Used to prevent multiple clauses for
2096 -- one type. Note that this flag is initially cleared for a derived type
2097 -- even though the Storage_Size for such a type is inherited from a
2098 -- Storage_Size clause given for the parent type. Note that in the case
2099 -- of access types, this flag is defined only in the root type, since a
2100 -- storage size clause cannot be given to a derived type.
2101
2102 -- Has_Stream_Size_Clause
2103 -- Defined in all entities. It is set for types which have a Stream_Size
2104 -- clause attribute. Used to prevent multiple Stream_Size clauses for a
2105 -- given entity, and also whether it is necessary to check for a stream
2106 -- size clause.
2107
2108 -- Has_Task [base type only]
2109 -- Defined in all type entities. Set on task types themselves, and also
2110 -- (recursively) on any composite type which has a component for which
2111 -- Has_Task is set. The meaning is that an allocator or declaration of
2112 -- such an object must create the required tasks. Note: the flag is not
2113 -- set on access types, even if they designate an object that Has_Task.
2114
2115 -- Has_Timing_Event [base type only]
2116 -- Defined in all type entities. Set on language defined type
2117 -- Ada.Real_Time.Timing_Events.Timing_Event, and also (recursively) on
2118 -- any composite type which has a component for which Has_Timing_Event
2119 -- is set. Used for the No_Local_Timing_Event restriction.
2120
2121 -- Has_Thunks
2122 -- Applies to E_Constant entities marked Is_Tag. True for secondary tag
2123 -- referencing a dispatch table whose contents are pointers to thunks.
2124
2125 -- Has_Unchecked_Union [base type only]
2126 -- Defined in all type entities. Set on unchecked unions themselves
2127 -- and (recursively) on any composite type which has a component for
2128 -- which Has_Unchecked_Union is set. The meaning is that a comparison
2129 -- operation or 'Valid_Scalars reference for the type is not permitted.
2130 -- Note that the flag is not set on access types, even if they designate
2131 -- an object that has the flag Has_Unchecked_Union set.
2132
2133 -- Has_Unknown_Discriminants
2134 -- Defined in all entities. Set for types with unknown discriminants.
2135 -- Types can have unknown discriminants either from their declaration or
2136 -- through type derivation. The use of this flag exactly meets the spec
2137 -- in RM 3.7(26). Note that all class-wide types are considered to have
2138 -- unknown discriminants. Note that both flags Has_Discriminants and
2139 -- Has_Unknown_Discriminants may be true for a type. Class-wide types and
2140 -- their subtypes have unknown discriminants and can have declared ones
2141 -- as well. Private types declared with unknown discriminants may have a
2142 -- full view that has explicit discriminants, and both flag will be set
2143 -- on the partial view, to ensure that discriminants are properly
2144 -- inherited in certain contexts.
2145
2146 -- Has_Visible_Refinement
2147 -- Defined in E_Abstract_State entities. Set when a state has at least
2148 -- one refinement constituent and analysis is in the region between
2149 -- pragma Refined_State and the end of the package body declarations.
2150
2151 -- Has_Volatile_Components [implementation base type only]
2152 -- Defined in all types and objects. Set only for an array type or array
2153 -- object if a valid pragma Volatile_Components or a valid pragma
2154 -- Atomic_Components applies to the type or object. Note that in the case
2155 -- of an object, this flag is only set on the object if there was an
2156 -- explicit pragma for the object. In other words, the proper test for
2157 -- whether an object has volatile components is to see if either the
2158 -- object or its base type has this flag set. Note that in the case of a
2159 -- type the pragma will be chained to the rep item chain of the first
2160 -- subtype in the usual manner.
2161
2162 -- Has_Xref_Entry
2163 -- Defined in all entities. Set if an entity has an entry in the Xref
2164 -- information generated in ali files. This is true for all source
2165 -- entities in the extended main source file. It is also true of entities
2166 -- in other packages that are referenced directly or indirectly from the
2167 -- main source file (indirect reference occurs when the main source file
2168 -- references an entity with a type reference. See package Lib.Xref for
2169 -- further details).
2170
2171 -- Has_Yield_Aspect
2172 -- Defined in subprograms, generic subprograms, entries, entry families.
2173 -- Set if the entity has aspect Yield.
2174
2175 -- Hiding_Loop_Variable
2176 -- Defined in variables. Set only if a variable of a discrete type is
2177 -- hidden by a loop variable in the same local scope, in which case
2178 -- the Hiding_Loop_Variable field of the hidden variable points to
2179 -- the E_Loop_Parameter entity doing the hiding. Used in processing
2180 -- warning messages if the hidden variable turns out to be unused
2181 -- or is referenced without being set.
2182
2183 -- Hidden_In_Formal_Instance
2184 -- Defined on actuals for formal packages. Entities on the list are
2185 -- formals that are hidden outside of the formal package when this
2186 -- package is not declared with a box, or the formal itself is not
2187 -- defaulted (see RM 12.7 (10)). Their visibility is restored on exit
2188 -- from the current generic, because the actual for the formal package
2189 -- may be used subsequently in the current unit.
2190
2191 -- Homonym
2192 -- Defined in all entities. Link for list of entities that have the
2193 -- same source name and that are declared in the same or enclosing
2194 -- scopes. Homonyms in the same scope are overloaded. Used for name
2195 -- resolution and for the generation of debugging information.
2196
2197 -- Ignore_SPARK_Mode_Pragmas
2198 -- Present in concurrent type, entry, operator, [generic] package,
2199 -- package body, [generic] subprogram, and subprogram body entities.
2200 -- Set when the entity appears in an instance subject to SPARK_Mode
2201 -- "off" and indicates that all SPARK_Mode pragmas found within must
2202 -- be ignored.
2203
2204 -- Ignored_Class_Postconditions
2205 -- Defined on subprogram entities. Set if the subprogram has class-wide
2206 -- postconditions. Denotes the (and-then) expression built by merging
2207 -- inherited ignored class-wide postconditions with its own ignored
2208 -- class-wide postconditions.
2209
2210 -- Ignored_Class_Preconditions
2211 -- Defined on subprogram entities. Set if the subprogram has class-wide
2212 -- preconditions. Denotes the (or-else) expression built by merging
2213 -- inherited ignored class-wide preconditions with its own ignored
2214 -- class-wide preconditions.
2215
2216 -- Implementation_Base_Type (synthesized)
2217 -- Applies to all entities. For types, similar to Base_Type, but never
2218 -- returns a private type when applied to a non-private type. Instead in
2219 -- this case, it always returns the Underlying_Type of the base type, so
2220 -- that we still have a concrete type. For entities other than types,
2221 -- returns the entity unchanged.
2222
2223 -- Import_Pragma
2224 -- Defined in subprogram entities. Set if a valid pragma Import or pragma
2225 -- Import_Function or pragma Import_Procedure applies to the subprogram,
2226 -- in which case this field points to the pragma (we can't use the normal
2227 -- Rep_Item chain mechanism, because a single pragma Import can apply
2228 -- to multiple subprogram entities).
2229
2230 -- In_Package_Body
2231 -- Defined in package entities. Set on the entity that denotes the
2232 -- package (the defining occurrence of the package declaration) while
2233 -- analyzing and expanding the package body. Reset on completion of
2234 -- analysis/expansion.
2235
2236 -- In_Private_Part
2237 -- Defined in all entities. Can be set only in package entities and
2238 -- objects. For package entities, this flag is set to indicate that the
2239 -- private part of the package is being analyzed. The flag is reset at
2240 -- the end of the package declaration. For objects it indicates that the
2241 -- declaration of the object occurs in the private part of a package.
2242
2243 -- Incomplete_Actuals
2244 -- Defined on package entities that are instances. Indicates the actuals
2245 -- types in the instantiation that are limited views. If this list is
2246 -- not empty, the instantiation, which appears in a package declaration,
2247 -- is relocated to the corresponding package body, which must have a
2248 -- corresponding nonlimited with_clause.
2249
2250 -- Indirect_Call_Wrapper
2251 -- Defined on subprogram entities. Set if the subprogram has class-wide
2252 -- preconditions. Denotes the internal wrapper that checks preconditions
2253 -- and invokes the subprogram body. Subp'Access points to the indirect
2254 -- call wrapper if available.
2255
2256 -- Initialization_Statements
2257 -- Defined in constants and variables. For a composite object initialized
2258 -- with an aggregate that has been converted to a sequence of
2259 -- assignments, points to a compound statement containing the
2260 -- assignments.
2261
2262 -- Inner_Instances
2263 -- Defined in generic units. Contains element list of units that are
2264 -- instantiated within the given generic. Used to diagnose circular
2265 -- instantiations.
2266
2267 -- Interface_Alias
2268 -- Defined in subprograms that cover a primitive operation of an abstract
2269 -- interface type. Can be set only if the Is_Hidden flag is also set,
2270 -- since such entities are always hidden. Points to its associated
2271 -- interface subprogram. It is used to register the subprogram in
2272 -- secondary dispatch table of the interface (Ada 2005: AI-251).
2273
2274 -- Interface_Name
2275 -- Defined in constants, variables, exceptions, functions, procedures,
2276 -- and packages. Set to Empty unless an export, import, or interface name
2277 -- pragma has explicitly specified an external name, in which case it
2278 -- references an N_String_Literal node for the specified external name.
2279 -- Note that if this field is Empty, and Is_Imported or Is_Exported is
2280 -- set, then the default interface name is the name of the entity, cased
2281 -- in a manner that is appropriate to the system in use. Note that
2282 -- Interface_Name is ignored if an address clause is present (since it
2283 -- is meaningless in this case).
2284
2285 -- Interfaces
2286 -- Defined in record types and subtypes. List of abstract interfaces
2287 -- implemented by a tagged type that are not already implemented by the
2288 -- ancestors (Ada 2005: AI-251).
2289
2290 -- Invariant_Procedure (synthesized)
2291 -- Defined in types and subtypes. Set for private types and their full
2292 -- views if one or more [class-wide] invariants apply to the type, or
2293 -- when the type inherits class-wide invariants from a parent type or
2294 -- an interface, or when the type is an array and its component type is
2295 -- subject to an invariant, or when the type is record and contains a
2296 -- component subject to an invariant (property is recursive). Points to
2297 -- to the entity for a procedure which checks all these invariants. The
2298 -- invariant procedure takes a single argument of the given type, and
2299 -- returns if the invariant holds, or raises exception Assertion_Error
2300 -- with an appropriate message if it does not hold. This attribute is
2301 -- defined but always Empty for private subtypes.
2302
2303 -- Note: the reason this is marked as a synthesized attribute is that the
2304 -- way this is stored is as an element of the Subprograms_For_Type field.
2305
2306 -- In_Use
2307 -- Defined in packages and types. Set when analyzing a use clause for
2308 -- the corresponding entity. Reset at end of corresponding declarative
2309 -- part. The flag on a type is also used to determine the visibility of
2310 -- the primitive operators of the type.
2311
2312 -- Is_Abstract_Subprogram
2313 -- Defined in all subprograms and entries. Set for abstract subprograms.
2314 -- Always False for enumeration literals and entries. See also
2315 -- Requires_Overriding.
2316
2317 -- Is_Abstract_Type
2318 -- Defined in all types. Set for abstract types.
2319
2320 -- Is_Access_Constant
2321 -- Defined in access types and subtypes. Indicates that the keyword
2322 -- constant was present in the access type definition.
2323
2324 -- Is_Access_Protected_Subprogram_Type (synthesized)
2325 -- Applies to all types, true for named and anonymous access to
2326 -- protected subprograms.
2327
2328 -- Is_Access_Type (synthesized)
2329 -- Applies to all entities, true for access types and subtypes
2330
2331 -- Is_Access_Object_Type (synthesized)
2332 -- Applies to all entities, true for access-to-object types and subtypes
2333
2334 -- Is_Activation_Record
2335 -- Applies to E_In_Parameters generated in Exp_Unst for nested
2336 -- subprograms, to mark the added formal that carries the activation
2337 -- record created in the enclosing subprogram.
2338
2339 -- Is_Actual_Subtype
2340 -- Defined on all types, true for the generated constrained subtypes
2341 -- that are built for unconstrained composite actuals.
2342
2343 -- Is_Ada_2005_Only
2344 -- Defined in all entities, true if a valid pragma Ada_05 or Ada_2005
2345 -- applies to the entity which specifically names the entity, indicating
2346 -- that the entity is Ada 2005 only. Note that this flag is not set if
2347 -- the entity is part of a unit compiled with the normal no-argument form
2348 -- of pragma Ada_05 or Ada_2005.
2349
2350 -- Is_Ada_2012_Only
2351 -- Defined in all entities, true if a valid pragma Ada_12 or Ada_2012
2352 -- applies to the entity which specifically names the entity, indicating
2353 -- that the entity is Ada 2012 only. Note that this flag is not set if
2354 -- the entity is part of a unit compiled with the normal no-argument form
2355 -- of pragma Ada_12 or Ada_2012.
2356
2357 -- Is_Ada_2022_Only
2358 -- Defined in all entities, true if a valid pragma Ada_2022 applies to
2359 -- the entity which specifically names the entity, indicating that the
2360 -- entity is Ada 2022 only. Note that this flag is not set if the entity
2361 -- is part of a unit compiled with the normal no-argument form of pragma
2362 -- Ada_2022.
2363
2364 -- Is_Aliased
2365 -- Defined in all entities. Set for objects and types whose declarations
2366 -- carry the keyword aliased, and on record components that have the
2367 -- keyword. For Ada 2012, also applies to formal parameters.
2368
2369 -- Is_Array_Type (synthesized)
2370 -- Applies to all entities, true for array types and subtypes
2371
2372 -- Is_Asynchronous
2373 -- Defined in all type entities and in procedure entities. Set
2374 -- if a pragma Asynchronous applies to the entity.
2375
2376 -- Is_Atomic
2377 -- Defined in all type entities, and also in constants, components, and
2378 -- variables. Set if a pragma Atomic or Shared applies to the entity.
2379 -- In the case of private and incomplete types, this flag is set in
2380 -- both the partial view and the full view.
2381
2382 -- Is_Full_Access (synth)
2383 -- Defined in all type entities, and also in constants, components and
2384 -- variables. Set if an aspect/pragma Atomic/Shared, or an aspect/pragma
2385 -- Volatile_Full_Access or an Ada 2022 aspect Full_Access_Only applies
2386 -- to the entity. In the case of private and incomplete types, the flag
2387 -- applies to both the partial view and the full view.
2388
2389 -- Is_Base_Type (synthesized)
2390 -- Applies to type and subtype entities. True if entity is a base type.
2391
2392 -- Is_Bit_Packed_Array [implementation base type only]
2393 -- Defined in all entities. This flag is set for a packed array type that
2394 -- is bit-packed (i.e. the component size is known by the front end and
2395 -- is in the range 1-63 but not a multiple of 8). Is_Packed is always set
2396 -- if Is_Bit_Packed_Array is set, but it is possible for Is_Packed to be
2397 -- set without Is_Bit_Packed_Array if the component size is not known by
2398 -- the front-end or for the case of an array having one or more index
2399 -- types that are enumeration types with non-standard representation.
2400
2401 -- Is_Boolean_Type (synthesized)
2402 -- Applies to all entities, true for boolean types and subtypes,
2403 -- i.e. Standard.Boolean and all types ultimately derived from it.
2404
2405 -- Is_Called
2406 -- Defined in subprograms and packages. Set if a subprogram is called
2407 -- from the unit being compiled or a unit in the closure. Also set for
2408 -- a package that contains called subprograms. Used only for inlining.
2409
2410 -- Is_Character_Type
2411 -- Defined in all entities. Set for character types and subtypes,
2412 -- i.e. enumeration types that have at least one character literal.
2413
2414 -- Is_Checked_Ghost_Entity
2415 -- Applies to all entities. Set for abstract states, [generic] packages,
2416 -- [generic] subprograms, components, discriminants, formal parameters,
2417 -- objects, package bodies, subprogram bodies, and [sub]types subject to
2418 -- pragma Ghost or inherit "ghostness" from an enclosing construct, and
2419 -- subject to Assertion_Policy Ghost => Check.
2420
2421 -- Is_Child_Unit
2422 -- Defined in all entities. Set only for defining entities of program
2423 -- units that are child units (but False for subunits).
2424
2425 -- Is_Class_Wide_Equivalent_Type
2426 -- Defined in record types and subtypes. Set to True, if the type acts
2427 -- as a class-wide equivalent type, i.e. the Equivalent_Type field of
2428 -- some class-wide subtype entity references this record type.
2429
2430 -- Is_Class_Wide_Type (synthesized)
2431 -- Applies to all entities, true for class wide types and subtypes
2432
2433 -- Is_Class_Wide_Wrapper
2434 -- Defined in subprogram entities. Indicates that it has been created as
2435 -- a wrapper in a generic/instance scenario involving a formal type and
2436 -- a generic primitive operation when the actual is a class-wide type.
2437
2438 -- Is_Compilation_Unit
2439 -- Defined in all entities. Set if the entity is a package or subprogram
2440 -- entity for a compilation unit other than a subunit (since we treat
2441 -- subunits as part of the same compilation operation as the ultimate
2442 -- parent, we do not consider them to be separate units for this flag).
2443
2444 -- Is_Completely_Hidden
2445 -- Defined on discriminants. Only set on stored discriminants of
2446 -- untagged types. When set, the entity is a stored discriminant of a
2447 -- derived untagged type which is not directly visible in the derived
2448 -- type because the derived type or one of its ancestors have renamed the
2449 -- discriminants in the root type. Note: there are stored discriminants
2450 -- which are not Completely_Hidden (e.g. discriminants of a root type).
2451
2452 -- Is_Composite_Type (synthesized)
2453 -- Applies to all entities, true for all composite types and subtypes.
2454 -- Either Is_Composite_Type or Is_Elementary_Type (but not both) is true
2455 -- of any type.
2456
2457 -- Is_Concurrent_Record_Type
2458 -- Defined in record types and subtypes. Set if the type was created
2459 -- by the expander to represent a task or protected type. For every
2460 -- concurrent type, such as record type is constructed, and task and
2461 -- protected objects are instances of this record type at run time
2462 -- (The backend will replace declarations of the concurrent type using
2463 -- the declarations of the corresponding record type). See Exp_Ch9 for
2464 -- further details.
2465
2466 -- Is_Concurrent_Type (synthesized)
2467 -- Applies to all entities, true for task types and subtypes and for
2468 -- protected types and subtypes.
2469
2470 -- Is_Constant_Object (synthesized)
2471 -- Applies to all entities, true for E_Constant, E_Loop_Parameter, and
2472 -- E_In_Parameter entities.
2473
2474 -- Is_Constrained
2475 -- Defined in types or subtypes which may have index, discriminant
2476 -- or range constraint (i.e. array types and subtypes, record types
2477 -- and subtypes, string types and subtypes, and all numeric types).
2478 -- Set if the type or subtype is constrained.
2479
2480 -- Is_Constr_Subt_For_U_Nominal
2481 -- Defined in all types and subtypes. Set only for the constructed
2482 -- subtype of an object whose nominal subtype is unconstrained. Note
2483 -- that the constructed subtype itself will be constrained.
2484
2485 -- Is_Constr_Subt_For_UN_Aliased
2486 -- Defined in all types and subtypes. This flag can be set only if
2487 -- Is_Constr_Subt_For_U_Nominal is also set. It indicates that in
2488 -- addition the object concerned is aliased. This flag is used by
2489 -- the backend to determine whether a template must be constructed.
2490
2491 -- Is_Constructor
2492 -- Defined in function and procedure entities. Set if a pragma
2493 -- CPP_Constructor applies to the subprogram.
2494
2495 -- Is_Controlled_Active [base type only]
2496 -- Defined in all type entities. Indicates that the type is controlled,
2497 -- i.e. is either a descendant of Ada.Finalization.Controlled or of
2498 -- Ada.Finalization.Limited_Controlled.
2499
2500 -- Is_Controlled (synth) [base type only]
2501 -- Defined in all type entities. Set if Is_Controlled_Active is set for
2502 -- the type, and Disable_Controlled is not set.
2503
2504 -- Is_Controlling_Formal
2505 -- Defined in all Formal_Kind entities. Marks the controlling parameters
2506 -- of dispatching operations.
2507
2508 -- Is_CPP_Class
2509 -- Defined in all type entities, set only for tagged types to which a
2510 -- valid pragma Import (CPP, ...) or pragma CPP_Class has been applied.
2511
2512 -- Is_CUDA_Kernel
2513 -- Defined in function and procedure entities. Set if the subprogram is a
2514 -- CUDA kernel.
2515
2516 -- Is_Decimal_Fixed_Point_Type (synthesized)
2517 -- Applies to all type entities, true for decimal fixed point
2518 -- types and subtypes.
2519
2520 -- Is_Descendant_Of_Address
2521 -- Defined in all entities. True if the entity is type System.Address,
2522 -- or (recursively) a subtype or derived type of System.Address.
2523
2524 -- Is_DIC_Procedure
2525 -- Defined in functions and procedures. Set for a generated procedure
2526 -- which verifies the assumption of pragma Default_Initial_Condition at
2527 -- run time.
2528
2529 -- Is_Discrete_Or_Fixed_Point_Type (synthesized)
2530 -- Applies to all entities, true for all discrete types and subtypes
2531 -- and all fixed-point types and subtypes.
2532
2533 -- Is_Discrete_Type (synthesized)
2534 -- Applies to all entities, true for all discrete types and subtypes
2535
2536 -- Is_Discrim_SO_Function
2537 -- Defined in all entities. Set only in E_Function entities that Layout
2538 -- creates to compute discriminant-dependent dynamic size/offset values.
2539
2540 -- Is_Discriminant_Check_Function
2541 -- Defined in all entities. Set only in E_Function entities for functions
2542 -- created to do discriminant checks.
2543
2544 -- Is_Discriminal (synthesized)
2545 -- Applies to all entities, true for renamings of discriminants. Such
2546 -- entities appear as constants or IN parameters.
2547
2548 -- Is_Dispatch_Table_Entity
2549 -- Applies to all entities. Set to indicate to the backend that this
2550 -- entity is associated with a dispatch table.
2551
2552 -- Is_Dispatch_Table_Wrapper
2553 -- Applies to all entities. Set on wrappers built when the subprogram has
2554 -- class-wide preconditions or class-wide postconditions affected by
2555 -- overriding (AI12-0195).
2556
2557 -- Is_Dispatching_Operation
2558 -- Defined in all entities. Set for procedures, functions, generic
2559 -- procedures, and generic functions if the corresponding operation
2560 -- is dispatching.
2561
2562 -- Is_Dynamic_Scope (synthesized)
2563 -- Applies to all Entities. Returns True if the entity is a dynamic
2564 -- scope (i.e. a block, subprogram, task_type, entry or extended return
2565 -- statement).
2566
2567 -- Is_Elaboration_Checks_OK_Id
2568 -- Defined in elaboration targets (see terminology in Sem_Elab). Set when
2569 -- the target appears in a region which is subject to elabled elaboration
2570 -- checks. Such targets are allowed to generate run-time conditional ABE
2571 -- checks or guaranteed ABE failures.
2572
2573 -- Is_Elaboration_Target (synthesized)
2574 -- Applies to all entities, True only for elaboration targets (see the
2575 -- terminology in Sem_Elab).
2576
2577 -- Is_Elaboration_Warnings_OK_Id
2578 -- Defined in elaboration targets (see terminology in Sem_Elab). Set when
2579 -- the target appears in a region with elaboration warnings enabled.
2580
2581 -- Is_Elementary_Type (synthesized)
2582 -- Applies to all entities, True for all elementary types and subtypes.
2583 -- Either Is_Composite_Type or Is_Elementary_Type (but not both) is true
2584 -- of any type.
2585
2586 -- Is_Eliminated
2587 -- Defined in type entities, subprogram entities, and object entities.
2588 -- Indicates that the corresponding entity has been eliminated by use
2589 -- of pragma Eliminate. Also used to mark subprogram entities whose
2590 -- declaration and body are within unreachable code that is removed.
2591
2592 -- Is_Entry (synthesized)
2593 -- Applies to all entities, True only for entry and entry family
2594 -- entities and False for all other entity kinds.
2595
2596 -- Is_Entry_Formal
2597 -- Defined in all entities. Set only for entry formals (which can only
2598 -- be in, in-out or out parameters). This flag is used to speed up the
2599 -- test for the need to replace references in Exp_Ch2.
2600
2601 -- Is_Entry_Wrapper
2602 -- Defined on wrappers created for entries that have precondition or
2603 -- postcondition aspects.
2604
2605 -- Is_Enumeration_Type (synthesized)
2606 -- Defined in all entities, true for enumeration types and subtypes
2607
2608 -- Is_Exception_Handler
2609 -- Defined in blocks. Set if the block serves only as a scope of an
2610 -- exception handler with a choice parameter. Such a block does not
2611 -- physically appear in the tree.
2612
2613 -- Is_Exported
2614 -- Defined in all entities. Set if the entity is exported. For now we
2615 -- only allow the export of constants, exceptions, functions, procedures
2616 -- and variables, but that may well change later on. Exceptions can only
2617 -- be exported in the Java VM implementation of GNAT, which is retired.
2618
2619 -- Is_External_State (synthesized)
2620 -- Applies to all entities, true for abstract states that are subject to
2621 -- option External or Synchronous.
2622
2623 -- Is_Finalized_Transient
2624 -- Defined in constants, loop parameters of generalized iterators, and
2625 -- variables. Set when a transient object has been finalized by one of
2626 -- the transient finalization mechanisms. The flag prevents the double
2627 -- finalization of the object.
2628
2629 -- Is_Finalizer (synthesized)
2630 -- Applies to all entities, true for procedures containing finalization
2631 -- code to process local or library level objects.
2632
2633 -- Is_First_Subtype
2634 -- Defined in all entities. True for first subtypes (RM 3.2.1(6)),
2635 -- i.e. the entity in the type declaration that introduced the type.
2636 -- This may be the base type itself (e.g. for record declarations and
2637 -- enumeration type declarations), or it may be the first subtype of
2638 -- an anonymous base type (e.g. for integer type declarations or
2639 -- constrained array declarations).
2640
2641 -- Is_Fixed_Lower_Bound_Array_Subtype
2642 -- Defined in type entities. True for unconstrained array types and
2643 -- subtypes where at least one index has a range specified with a fixed
2644 -- lower bound (range syntax is "<expression> .. <>").
2645
2646 -- Is_Fixed_Lower_Bound_Index_Subtype
2647 -- Defined in type entities. True for an index of an unconstrained array
2648 -- type or subtype whose range is specified with a fixed lower bound
2649 -- (range syntax is "<expression> .. <>").
2650
2651 -- Is_Fixed_Point_Type (synthesized)
2652 -- Applies to all entities, true for decimal and ordinary fixed
2653 -- point types and subtypes.
2654
2655 -- Is_Floating_Point_Type (synthesized)
2656 -- Applies to all entities, true for float types and subtypes
2657
2658 -- Is_Formal (synthesized)
2659 -- Applies to all entities, true for IN, IN OUT and OUT parameters
2660
2661 -- Is_Formal_Object (synthesized)
2662 -- Applies to all entities, true for generic IN and IN OUT parameters
2663
2664 -- Is_Formal_Subprogram
2665 -- Defined in all entities. Set for generic formal subprograms.
2666
2667 -- Is_Frozen
2668 -- Defined in all type and subtype entities. Set if type or subtype has
2669 -- been frozen.
2670
2671 -- Is_Generic_Actual_Subprogram
2672 -- Defined on functions and procedures. Set on the entity of the renaming
2673 -- declaration created within an instance for an actual subprogram.
2674 -- Used to generate constraint checks on calls to these subprograms, even
2675 -- within an instance of a predefined run-time unit, in which checks
2676 -- are otherwise suppressed.
2677
2678 -- Is_Generic_Actual_Type
2679 -- Defined in all type and subtype entities. Set in the subtype
2680 -- declaration that renames the generic formal as a subtype of the
2681 -- actual. Guarantees that the subtype is not static within the instance.
2682 -- Also used during analysis of an instance, to simplify resolution of
2683 -- accidental overloading that occurs when different formal types get the
2684 -- same actual.
2685
2686 -- Is_Generic_Instance
2687 -- Defined in all entities. Set to indicate that the entity is an
2688 -- instance of a generic unit, or a formal package (which is an instance
2689 -- of the template).
2690
2691 -- Is_Generic_Subprogram (synthesized)
2692 -- Applies to all entities. Yields True for a generic subprogram
2693 -- (generic function, generic subprogram), False for all other entities.
2694
2695 -- Is_Generic_Type
2696 -- Defined in all entities. Set for types which are generic formal types.
2697 -- Such types have an Ekind that corresponds to their classification, so
2698 -- the Ekind cannot be used to identify generic formal types.
2699
2700 -- Is_Generic_Unit (synthesized)
2701 -- Applies to all entities. Yields True for a generic unit (generic
2702 -- package, generic function, generic procedure), and False for all
2703 -- other entities.
2704
2705 -- Is_Ghost_Entity (synthesized)
2706 -- Applies to all entities. Yields True for abstract states, [generic]
2707 -- packages, [generic] subprograms, components, discriminants, formal
2708 -- parameters, objects, package bodies, subprogram bodies, and [sub]types
2709 -- subject to pragma Ghost or those that inherit the Ghost property from
2710 -- an enclosing construct.
2711
2712 -- Is_Hidden
2713 -- Defined in all entities. Set for all entities declared in the
2714 -- private part or body of a package. Also marks generic formals of a
2715 -- formal package declared without a box. For library level entities,
2716 -- this flag is set if the entity is not publicly visible. This flag
2717 -- is reset when compiling the body of the package where the entity
2718 -- is declared, when compiling the private part or body of a public
2719 -- child unit, and when compiling a private child unit (see Install_
2720 -- Private_Declaration in sem_ch7).
2721
2722 -- Is_Hidden_Non_Overridden_Subpgm
2723 -- Defined in all entities. Set for implicitly declared subprograms
2724 -- that require overriding or are null procedures, and are hidden by
2725 -- a non-fully conformant homograph with the same characteristics
2726 -- (Ada RM 8.3 12.3/2).
2727
2728 -- Is_Hidden_Open_Scope
2729 -- Defined in all entities. Set for a scope that contains the
2730 -- instantiation of a child unit, and whose entities are not visible
2731 -- during analysis of the instance.
2732
2733 -- Is_Ignored_Ghost_Entity
2734 -- Applies to all entities. Set for abstract states, [generic] packages,
2735 -- [generic] subprograms, components, discriminants, formal parameters,
2736 -- objects, package bodies, subprogram bodies, and [sub]types subject to
2737 -- pragma Ghost or inherit "ghostness" from an enclosing construct, and
2738 -- subject to Assertion_Policy Ghost => Ignore.
2739
2740 -- Is_Ignored_Transient
2741 -- Defined in constants, loop parameters of generalized iterators, and
2742 -- variables. Set when a transient object must be processed by one of
2743 -- the transient finalization mechanisms. Once marked, a transient is
2744 -- intentionally ignored by the general finalization mechanism because
2745 -- its clean up actions are context specific.
2746
2747 -- Is_Immediately_Visible
2748 -- Defined in all entities. Set if entity is immediately visible, i.e.
2749 -- is defined in some currently open scope (RM 8.3(4)).
2750
2751 -- Is_Implementation_Defined
2752 -- Defined in all entities. Set if a pragma Implementation_Defined is
2753 -- applied to the pragma. Used to mark all implementation defined
2754 -- identifiers in standard library packages, and to implement the
2755 -- restriction No_Implementation_Identifiers.
2756
2757 -- Is_Imported
2758 -- Defined in all entities. Set if the entity is imported. For now we
2759 -- only allow the import of exceptions, functions, procedures, packages,
2760 -- constants, and variables. Exceptions, packages, and types can only be
2761 -- imported in the Java VM implementation, which is retired.
2762
2763 -- Is_Incomplete_Or_Private_Type (synthesized)
2764 -- Applies to all entities, true for private and incomplete types
2765
2766 -- Is_Incomplete_Type (synthesized)
2767 -- Applies to all entities, true for incomplete types and subtypes
2768
2769 -- Is_Independent
2770 -- Defined in all types and objects. Set if a valid pragma or aspect
2771 -- Independent applies to the entity, or for a component if a valid
2772 -- pragma or aspect Independent_Components applies to the enclosing
2773 -- record type. Also set if a pragma Shared or pragma Atomic applies to
2774 -- the entity, or if the declaration of the entity carries the Aliased
2775 -- keyword. For Ada 2012, also applies to formal parameters. In the
2776 -- case of private and incomplete types, this flag is set in both the
2777 -- partial view and the full view.
2778
2779 -- Is_Initial_Condition_Procedure
2780 -- Defined in functions and procedures. Set for a generated procedure
2781 -- which verifies the assumption of pragma Initial_Condition at run time.
2782
2783 -- Is_Inlined
2784 -- Defined in all entities. Set for functions and procedures which are
2785 -- to be inlined. For subprograms created during expansion, this flag
2786 -- may be set directly by the expander to request inlining. Also set
2787 -- for packages that contain inlined subprograms, whose bodies must be
2788 -- be compiled. Is_Inlined is also set on generic subprograms and is
2789 -- inherited by their instances. It is also set on the body entities
2790 -- of inlined subprograms. See also Has_Pragma_Inline.
2791
2792 -- Is_Inlined_Always
2793 -- Defined in subprograms. Set for functions and procedures which are
2794 -- always inlined in GNATprove mode. GNATprove uses this flag to know
2795 -- when a body does not need to be analyzed. The value of this flag is
2796 -- only meaningful if Body_To_Inline is not Empty for the subprogram.
2797
2798 -- Is_Instantiated
2799 -- Defined in generic packages and generic subprograms. Set if the unit
2800 -- is instantiated from somewhere in the extended main source unit. This
2801 -- flag is used to control warnings about the unit being uninstantiated.
2802 -- Also set in a package that is used as an actual for a generic package
2803 -- formal in an instantiation. Also set on a parent instance, in the
2804 -- instantiation of a child, which is implicitly declared in the parent.
2805
2806 -- Is_Integer_Type (synthesized)
2807 -- Applies to all entities, true for integer types and subtypes
2808
2809 -- Is_Interface
2810 -- Defined in record types and subtypes. Set to indicate that the current
2811 -- entity corresponds to an abstract interface. Because abstract
2812 -- interfaces are conceptually a special kind of abstract tagged type
2813 -- we represent them by means of tagged record types and subtypes
2814 -- marked with this attribute. This allows us to reuse most of the
2815 -- compiler support for abstract tagged types to implement interfaces
2816 -- (Ada 2005: AI-251).
2817
2818 -- Is_Internal
2819 -- Defined in all entities. Set to indicate an entity created during
2820 -- semantic processing (e.g. an implicit type, or a temporary). The
2821 -- current uses of this flag are:
2822 --
2823 -- 1) Internal entities (such as temporaries generated for the result
2824 -- of an inlined function call or dummy variables generated for the
2825 -- debugger). Set to indicate that they need not be initialized, even
2826 -- when scalars are initialized or normalized.
2827 --
2828 -- 2) Predefined primitives of tagged types. Set to mark that they
2829 -- have specific properties: first they are primitives even if they
2830 -- are not defined in the type scope (the freezing point is not
2831 -- necessarily in the same scope), and second the predefined equality
2832 -- can be overridden by a user-defined equality, no body will be
2833 -- generated in this case.
2834 --
2835 -- 3) Object declarations generated by the expander that are implicitly
2836 -- imported or exported so that they can be marked in Sprint output.
2837 --
2838 -- 4) Internal entities in the list of primitives of tagged types that
2839 -- are used to handle secondary dispatch tables. These entities have
2840 -- also the attribute Interface_Alias.
2841
2842 -- Is_Interrupt_Handler
2843 -- Defined in procedures. Set if a pragma Interrupt_Handler applies
2844 -- to the procedure. The procedure must be a parameterless protected
2845 -- procedure.
2846
2847 -- Is_Intrinsic_Subprogram
2848 -- Defined in functions and procedures. It is set if a valid pragma
2849 -- Interface or Import is present for this subprogram specifying
2850 -- convention Intrinsic. Valid means that the name and profile of the
2851 -- subprogram match the requirements of one of the recognized intrinsic
2852 -- subprograms (see package Sem_Intr for details). Note: the value of
2853 -- Convention for such an entity will be set to Convention_Intrinsic,
2854 -- but it is the setting of Is_Intrinsic_Subprogram, NOT simply having
2855 -- convention set to intrinsic, which causes intrinsic code to be
2856 -- generated.
2857
2858 -- Is_Invariant_Procedure
2859 -- Defined in functions and procedures. Set for a generated invariant
2860 -- procedure which verifies the invariants of both the partial and full
2861 -- views of a private type or private extension as well as any inherited
2862 -- class-wide invariants from parent types or interfaces.
2863
2864 -- Is_Itype
2865 -- Defined in all entities. Set to indicate that a type is an Itype,
2866 -- which means that the declaration for the type does not appear
2867 -- explicitly in the tree. Instead the backend will elaborate the type
2868 -- when it is first used. Has_Delayed_Freeze can be set for Itypes, and
2869 -- the meaning is that the first use (the one which causes the type to be
2870 -- defined) will be the freeze node. Note that an important restriction
2871 -- on Itypes is that the first use of such a type (the one that causes it
2872 -- to be defined) must be in the same scope as the type.
2873
2874 -- Is_Known_Non_Null
2875 -- Defined in all entities. Relevant (and can be set) only for
2876 -- objects of an access type. It is set if the object is currently
2877 -- known to have a non-null value (meaning that no access checks
2878 -- are needed). The indication can for example come from assignment
2879 -- of an access parameter or an allocator whose value is known non-null.
2880 --
2881 -- Note: this flag is set according to the sequential flow of the
2882 -- program, watching the current value of the variable. However, this
2883 -- processing can miss cases of changing the value of an aliased or
2884 -- constant object, so even if this flag is set, it should not be
2885 -- believed if the variable is aliased or volatile. It would be a
2886 -- little neater to avoid the flag being set in the first place in
2887 -- such cases, but that's trickier, and there is only one place that
2888 -- tests the value anyway.
2889 --
2890 -- The flag is dynamically set and reset as semantic analysis and
2891 -- expansion proceeds. Its value is meaningless once the tree is
2892 -- fully constructed, since it simply indicates the last state.
2893 -- Thus this flag has no meaning to the backend.
2894
2895 -- Is_Known_Null
2896 -- Defined in all entities. Relevant (and can be set ) only for
2897 -- objects of an access type. It is set if the object is currently known
2898 -- to have a null value (meaning that a dereference will surely raise
2899 -- constraint error exception). The indication can come from an
2900 -- assignment or object declaration.
2901 --
2902 -- The comments above about sequential flow and aliased and volatile for
2903 -- the Is_Known_Non_Null flag apply equally to the Is_Known_Null flag.
2904
2905 -- Is_Known_Valid
2906 -- Defined in all entities. Relevant for types (and subtype) and
2907 -- for objects (and enumeration literals) of a discrete type.
2908 --
2909 -- The purpose of this flag is to implement the requirement stated
2910 -- in (RM 13.9.1(9-11)) which require that the use of possibly invalid
2911 -- values may not cause programs to become erroneous. See the function
2912 -- Checks.Expr_Known_Valid for further details. Note that the setting
2913 -- is conservative, in the sense that if the flag is set, it must be
2914 -- right. If the flag is not set, nothing is known about the validity.
2915 --
2916 -- For enumeration literals, the flag is always set, since clearly
2917 -- an enumeration literal represents a valid value. Range checks
2918 -- where necessary will ensure that this valid value is appropriate.
2919 --
2920 -- For objects, the flag indicates the state of knowledge about the
2921 -- current value of the object. This may be modified during expansion,
2922 -- and thus the final value is not relevant to the backend.
2923 --
2924 -- For types and subtypes, the flag is set if all possible bit patterns
2925 -- of length Object_Size (i.e. Esize of the type) represent valid values
2926 -- of the type. In general for such types, all values are valid, the
2927 -- only exception being the case where an object of the type has an
2928 -- explicit size that is greater than Object_Size.
2929 --
2930 -- For non-discrete objects, the setting of the Is_Known_Valid flag is
2931 -- not defined, and is not relevant, since the considerations of the
2932 -- requirement in (RM 13.9.1(9-11)) do not apply.
2933 --
2934 -- The flag is dynamically set and reset as semantic analysis and
2935 -- expansion proceeds. Its value is meaningless once the tree is
2936 -- fully constructed, since it simply indicates the last state.
2937 -- Thus this flag has no meaning to the backend.
2938
2939 -- Is_Limited_Composite
2940 -- Defined in all entities. Set for composite types that have a limited
2941 -- component. Used to enforce the rule that operations on the composite
2942 -- type that depend on the full view of the component do not become
2943 -- visible until the immediate scope of the composite type itself
2944 -- (RM 7.3.1 (5)).
2945
2946 -- Is_Limited_Interface
2947 -- Defined in record types and subtypes. True for interface types, if
2948 -- interface is declared limited, task, protected, or synchronized, or
2949 -- is derived from a limited interface.
2950
2951 -- Is_Limited_Record
2952 -- Defined in all entities. Set to true for record (sub)types if the
2953 -- record is declared to be limited. Note that this flag is not set
2954 -- simply because some components of the record are limited.
2955
2956 -- Is_Local_Anonymous_Access
2957 -- Defined in access types. Set for an anonymous access type to indicate
2958 -- that the type is created for a record component with an access
2959 -- definition, an array component, or (pre-Ada 2012) a standalone object.
2960 -- Such anonymous types have an accessibility level equal to that of the
2961 -- declaration in which they appear, unlike the anonymous access types
2962 -- that are created for access parameters, access discriminants, and
2963 -- (as of Ada 2012) stand-alone objects.
2964
2965 -- Is_Loop_Parameter
2966 -- Applies to all entities. Certain loops, in particular "for ... of"
2967 -- loops, get transformed so that the loop parameter is declared by a
2968 -- variable declaration, so the entity is an E_Variable. This is True for
2969 -- such E_Variables; False otherwise.
2970
2971 -- Is_Machine_Code_Subprogram
2972 -- Defined in subprogram entities. Set to indicate that the subprogram
2973 -- is a machine code subprogram (i.e. its body includes at least one
2974 -- code statement). Also indicates that all necessary semantic checks
2975 -- as required by RM 13.8(3) have been performed.
2976
2977 -- Is_Modular_Integer_Type (synthesized)
2978 -- Applies to all entities. True if entity is a modular integer type
2979
2980 -- Is_Non_Static_Subtype
2981 -- Defined in all type and subtype entities. It is set in some (but not
2982 -- all) cases in which a subtype is known to be non-static. Before this
2983 -- flag was added, the computation of whether a subtype was static was
2984 -- entirely synthesized, by looking at the bounds, and the immediate
2985 -- subtype parent. However, this method does not work for some Itypes
2986 -- that have no parent set (and the only way to find the immediate
2987 -- subtype parent is to go through the tree). For now, this flag is set
2988 -- conservatively, i.e. if it is set then for sure the subtype is non-
2989 -- static, but if it is not set, then the type may or may not be static.
2990 -- Thus the test for a static subtype is that this flag is clear AND that
2991 -- the bounds are static AND that the parent subtype (if available to be
2992 -- tested) is static. Eventually we should make sure this flag is always
2993 -- set right, at which point, these comments can be removed, and the
2994 -- tests for static subtypes greatly simplified.
2995
2996 -- Is_Null_Init_Proc
2997 -- Defined in procedure entities. Set for generated init proc procedures
2998 -- (used to initialize composite types), if the code for the procedure
2999 -- is null (i.e. is a return and nothing else). Such null initialization
3000 -- procedures are generated in case some client is compiled using the
3001 -- Initialize_Scalars pragma, generating a call to this null procedure,
3002 -- but there is no need to call such procedures within a compilation
3003 -- unit, and this flag is used to suppress such calls.
3004
3005 -- Is_Null_State (synthesized)
3006 -- Applies to all entities, true for an abstract state declared with
3007 -- keyword null.
3008
3009 -- Is_Numeric_Type (synthesized)
3010 -- Applies to all entities, true for all numeric types and subtypes
3011 -- (integer, fixed, float).
3012
3013 -- Is_Object (synthesized)
3014 -- Applies to all entities, true for entities representing objects,
3015 -- including generic formal parameters.
3016
3017 -- Is_Obsolescent
3018 -- Defined in all entities. Set for any entity to which a valid pragma
3019 -- or aspect Obsolescent applies.
3020
3021 -- Is_Only_Out_Parameter
3022 -- Defined in formal parameter entities. Set if this parameter is the
3023 -- only OUT parameter for this formal part. If there is more than one
3024 -- out parameter, or if there is some other IN OUT parameter then this
3025 -- flag is not set in any of them. Used in generation of warnings.
3026
3027 -- Is_Ordinary_Fixed_Point_Type (synthesized)
3028 -- Applies to all entities, true for ordinary fixed point types and
3029 -- subtypes.
3030
3031 -- Is_Package_Body_Entity
3032 -- Defined in all entities. Set for entities defined at the top level
3033 -- of a package body. Used to control externally generated names.
3034
3035 -- Is_Package_Or_Generic_Package (synthesized)
3036 -- Applies to all entities. True for packages and generic packages.
3037 -- False for all other entities.
3038
3039 -- Is_Packed [implementation base type only]
3040 -- Defined in all type entities. This flag is set only for record and
3041 -- array types which have a packed representation. There are four cases
3042 -- which cause packing:
3043 --
3044 -- 1. Explicit use of pragma Pack to pack a record.
3045 -- 2. Explicit use of pragma Pack to pack an array.
3046 -- 3. Setting Component_Size of an array to a packable value.
3047 -- 4. Indexing an array with a non-standard enumeration type.
3048 --
3049 -- For records, Is_Packed is always set if Has_Pragma_Pack is set, and
3050 -- can also be set on its own in a derived type which inherited its
3051 -- packed status.
3052 --
3053 -- For arrays, Is_Packed is set if either Has_Pragma_Pack is set and the
3054 -- component size is either not known at compile time or known but not
3055 -- 8/16/32/64 bits, or a Component_Size clause exists and the specified
3056 -- value is smaller than 64 bits but not 8/16/32, or if the array has one
3057 -- or more index types that are enumeration types with a non-standard
3058 -- representation (in GNAT, we store such arrays compactly, using the Pos
3059 -- of the enumeration type value). As for the case of records, Is_Packed
3060 -- can be set on its own for a derived type.
3061
3062 -- Before an array type is frozen, Is_Packed will always be set if
3063 -- Has_Pragma_Pack is set. Before the freeze point, it is not possible
3064 -- to know the component size, since the component type is not frozen
3065 -- until the array type is frozen. Thus Is_Packed for an array type
3066 -- before it is frozen means that packed is required. Then if it turns
3067 -- out that the component size doesn't require packing, the Is_Packed
3068 -- flag gets turned off.
3069
3070 -- In the bit-packed array case (i.e. the component size is known by the
3071 -- front end and is in the range 1-63 but not a multiple of 8), then the
3072 -- Is_Bit_Packed_Array flag will be set once the array type is frozen.
3073 --
3074 -- Is_Packed_Array (synth)
3075 -- Applies to all entities, true if entity is for a packed array.
3076
3077 -- Is_Packed_Array_Impl_Type
3078 -- Defined in all entities. This flag is set on the entity for the type
3079 -- used to implement a packed array (either a modular type or a subtype
3080 -- of Packed_Bytes{1,2,4} in the bit-packed array case, a regular array
3081 -- in the non-standard enumeration index case). It is set if and only
3082 -- if the type appears in the Packed_Array_Impl_Type field of some other
3083 -- entity. It is used by the back end to activate the special processing
3084 -- for such types (unchecked conversions that would not otherwise be
3085 -- allowed are allowed for such types). If Is_Packed_Array_Impl_Type is
3086 -- set in an entity, then the Original_Array_Type field of this entity
3087 -- points to the array type for which this is the Packed_Array_Impl_Type.
3088
3089 -- Is_Param_Block_Component_Type [base type only]
3090 -- Defined in access types. Set to indicate that a type is the type of a
3091 -- component of the parameter block record type generated by the compiler
3092 -- for an entry or a select statement. Read by CodePeer.
3093
3094 -- Is_Partial_Invariant_Procedure
3095 -- Defined in functions and procedures. Set for a generated invariant
3096 -- procedure which verifies the invariants of the partial view of a
3097 -- private type or private extension.
3098
3099 -- Is_Potentially_Use_Visible
3100 -- Defined in all entities. Set if entity is potentially use visible,
3101 -- i.e. it is defined in a package that appears in a currently active
3102 -- use clause (RM 8.4(8)). Note that potentially use visible entities
3103 -- are not necessarily use visible (RM 8.4(9-11)).
3104
3105 -- Is_Predicate_Function
3106 -- Present in functions and procedures. Set for generated predicate
3107 -- functions.
3108
3109 -- Is_Preelaborated
3110 -- Defined in all entities, set in E_Package and E_Generic_Package
3111 -- entities to which a pragma Preelaborate is applied, and also in
3112 -- all entities within such packages. Note that the fact that this
3113 -- flag is set does not necesarily mean that no elaboration code is
3114 -- generated for the package.
3115
3116 -- Is_Primitive
3117 -- Defined in overloadable entities and in generic subprograms. Set to
3118 -- indicate that this is a primitive operation of some type, which may
3119 -- be a tagged type or an untagged type. Used to verify overriding
3120 -- indicators in bodies.
3121
3122 -- Is_Primitive_Wrapper
3123 -- Defined in functions and procedures created by the expander to serve
3124 -- as an indirection mechanism to overriding primitives of concurrent
3125 -- types, entries and protected procedures.
3126
3127 -- Is_Prival (synthesized)
3128 -- Applies to all entities, true for renamings of private protected
3129 -- components. Such entities appear as constants or variables.
3130
3131 -- Is_Private_Composite
3132 -- Defined in composite types that have a private component. Used to
3133 -- enforce the rule that operations on the composite type that depend
3134 -- on the full view of the component, do not become visible until the
3135 -- immediate scope of the composite type itself (7.3.1 (5)). Both this
3136 -- flag and Is_Limited_Composite are needed.
3137
3138 -- Is_Private_Descendant
3139 -- Defined in entities that can represent library units (packages,
3140 -- functions, procedures). Set if the library unit is itself a private
3141 -- child unit, or if it is the descendant of a private child unit.
3142
3143 -- Is_Private_Primitive
3144 -- Defined in subprograms. Set if the operation is a primitive of a
3145 -- tagged type (procedure or function dispatching on result) whose
3146 -- full view has not been seen. Used in particular for primitive
3147 -- subprograms of a synchronized type declared between the two views
3148 -- of the type, so that the wrapper built for such a subprogram can
3149 -- be given the proper signature.
3150
3151 -- Is_Private_Type (synthesized)
3152 -- Applies to all entities, true for private types and subtypes,
3153 -- as well as for record with private types as subtypes.
3154
3155 -- Is_Protected_Component (synthesized)
3156 -- Applicable to all entities, true if the entity denotes a private
3157 -- component of a protected type.
3158
3159 -- Is_Protected_Interface (synthesized)
3160 -- Defined in types that are interfaces. True if interface is declared
3161 -- protected, or is derived from protected interfaces.
3162
3163 -- Is_Protected_Record_Type (synthesized)
3164 -- Applies to all entities, true if Is_Concurrent_Record_Type is true and
3165 -- Corresponding_Concurrent_Type is a protected type.
3166
3167 -- Is_Protected_Type (synthesized)
3168 -- Applies to all entities, true for protected types and subtypes
3169
3170 -- Is_Public
3171 -- Defined in all entities. Set to indicate that an entity defined in
3172 -- one compilation unit can be referenced from other compilation units.
3173 -- If this reference causes a reference in the generated code, for
3174 -- example in the case of a variable name, then the backend will generate
3175 -- an appropriate external name for use by the linker.
3176
3177 -- Is_Pure
3178 -- Defined in all entities. Set in all entities of a unit to which a
3179 -- pragma Pure is applied except for non-intrinsic imported subprograms,
3180 -- and also set for the entity of the unit itself. In addition, this
3181 -- flag may be set for any other functions or procedures that are known
3182 -- to be side effect free, so in the case of subprograms, the Is_Pure
3183 -- flag may be used by the optimizer to imply that it can assume freedom
3184 -- from side effects (other than those resulting from assignment to Out
3185 -- or In Out parameters, or to objects designated by access parameters).
3186
3187 -- Is_Pure_Unit_Access_Type
3188 -- Defined in access type and subtype entities. Set if the type or
3189 -- subtype appears in a pure unit. Used to give an error message at
3190 -- freeze time if the access type has a storage pool.
3191
3192 -- Is_RACW_Stub_Type
3193 -- Defined in all types, true for the stub types generated for remote
3194 -- access-to-class-wide types.
3195
3196 -- Is_Raised
3197 -- Defined in exception entities. Set if the entity is referenced by a
3198 -- a raise statement.
3199
3200 -- Is_Real_Type (synthesized)
3201 -- Applies to all entities, true for real types and subtypes
3202
3203 -- Is_Record_Type (synthesized)
3204 -- Applies to all entities, true for record types and subtypes,
3205 -- includes class-wide types and subtypes (which are also records).
3206
3207 -- Is_Relaxed_Initialization_State (synthesized)
3208 -- Applies to all entities, true for abstract states that are subject to
3209 -- option Relaxed_Initialization.
3210
3211 -- Is_Remote_Call_Interface
3212 -- Defined in all entities. Set in E_Package and E_Generic_Package
3213 -- entities to which a pragma Remote_Call_Interface is applied, and
3214 -- also on entities declared in the visible part of such a package.
3215
3216 -- Is_Remote_Types
3217 -- Defined in all entities. Set in E_Package and E_Generic_Package
3218 -- entities to which a pragma Remote_Types is applied, and also on
3219 -- entities declared in the visible part of the spec of such a package.
3220 -- Also set for types which are generic formal types to which the
3221 -- pragma Remote_Access_Type applies.
3222
3223 -- Is_Renaming_Of_Object
3224 -- Defined in all entities, set only for a variable or constant for
3225 -- which the Renamed_Object field is non-empty and for which the
3226 -- renaming is handled by the front end, by macro substitution of
3227 -- a copy of the (evaluated) name tree whereever the variable is used.
3228
3229 -- Is_Return_Object
3230 -- Defined in all object entities. True if the object is the return
3231 -- object of an extended_return_statement; False otherwise.
3232
3233 -- Is_Safe_To_Reevaluate
3234 -- Defined in all entities. Set in variables that are initialized by
3235 -- means of an assignment statement. When initialized their contents
3236 -- never change and hence they can be seen by the backend as constants.
3237 -- See also Is_True_Constant.
3238
3239 -- Is_Scalar_Type (synthesized)
3240 -- Applies to all entities, true for scalar types and subtypes
3241
3242 -- Is_Shared_Passive
3243 -- Defined in all entities. Set in E_Package and E_Generic_Package
3244 -- entities to which a pragma Shared_Passive is applied, and also in
3245 -- all entities within such packages.
3246
3247 -- Is_Standard_Character_Type (synthesized)
3248 -- Applies to all entities, true for types and subtypes whose root type
3249 -- is one of the standard character types (Character, Wide_Character, or
3250 -- Wide_Wide_Character).
3251
3252 -- Is_Standard_String_Type (synthesized)
3253 -- Applies to all entities, true for types and subtypes whose root
3254 -- type is one of the standard string types (String, Wide_String, or
3255 -- Wide_Wide_String).
3256
3257 -- Is_Static_Type
3258 -- Defined in entities. Only set for (sub)types. If set, indicates that
3259 -- the type is known to be a static type (defined as a discrete type with
3260 -- static bounds, a record all of whose component types are static types,
3261 -- or an array, all of whose bounds are of a static type, and also have
3262 -- a component type that is a static type). See Set_Uplevel_Type for more
3263 -- information on how this flag is used.
3264
3265 -- Is_Statically_Allocated
3266 -- Defined in all entities. This can only be set for exception,
3267 -- variable, constant, and type/subtype entities. If the flag is set,
3268 -- then the variable or constant must be allocated statically rather
3269 -- than on the local stack frame. For exceptions, the meaning is that
3270 -- the exception data should be allocated statically (and indeed this
3271 -- flag is always set for exceptions, since exceptions do not have
3272 -- local scope). For a type, the meaning is that the type must be
3273 -- elaborated at the global level rather than locally. No type marked
3274 -- with this flag may depend on a local variable, or on any other type
3275 -- which does not also have this flag set to True. For a variable or
3276 -- or constant, if the flag is set, then the type of the object must
3277 -- either be declared at the library level, or it must also have the
3278 -- flag set (since to allocate the object statically, its type must
3279 -- also be elaborated globally).
3280
3281 -- Is_String_Type (synthesized)
3282 -- Applies to all type entities. Determines if the given type is a
3283 -- string type, i.e. it is directly a string type or string subtype,
3284 -- or a string slice type, or an array type with one dimension and a
3285 -- component type that is a character type.
3286
3287 -- Is_Subprogram (synthesized)
3288 -- Applies to all entities, true for function, procedure and operator
3289 -- entities.
3290
3291 -- Is_Subprogram_Or_Generic_Subprogram
3292 -- Applies to all entities, true for function procedure and operator
3293 -- entities, and also for the corresponding generic entities.
3294
3295 -- Is_Synchronized_Interface (synthesized)
3296 -- Defined in types that are interfaces. True if interface is declared
3297 -- synchronized, task, or protected, or is derived from a synchronized
3298 -- interface.
3299
3300 -- Is_Synchronized_State (synthesized)
3301 -- Applies to all entities, true for abstract states that are subject to
3302 -- option Synchronous.
3303
3304 -- Is_Tag
3305 -- Defined in E_Component and E_Constant entities. For regular tagged
3306 -- type this flag is set on the tag component (whose name is Name_uTag).
3307 -- For CPP_Class tagged types, this flag marks the pointer to the main
3308 -- vtable (i.e. the one to be extended by derivation).
3309
3310 -- Is_Tagged_Type
3311 -- Defined in all entities, set for an entity that is a tagged type
3312
3313 -- Is_Task_Interface (synthesized)
3314 -- Defined in types that are interfaces. True if interface is declared as
3315 -- a task interface, or if it is derived from task interfaces.
3316
3317 -- Is_Task_Record_Type (synthesized)
3318 -- Applies to all entities, true if Is_Concurrent_Record_Type is true and
3319 -- Corresponding_Concurrent_Type is a task type.
3320
3321 -- Is_Task_Type (synthesized)
3322 -- Applies to all entities. True for task types and subtypes
3323
3324 -- Is_Thunk
3325 -- Defined in all entities. True for subprograms that are thunks: that is
3326 -- small subprograms built by the expander for tagged types that cover
3327 -- interface types. As part of the runtime call to an interface, thunks
3328 -- displace the pointer to the object (pointer named "this" in the C++
3329 -- terminology) from a secondary dispatch table to the primary dispatch
3330 -- table associated with a given tagged type; if the thunk is a function
3331 -- that returns an object which covers an interface type then the thunk
3332 -- displaces the pointer to the object from the primary dispatch table to
3333 -- the secondary dispatch table associated with the interface type. Set
3334 -- by Expand_Interface_Thunk and used by Expand_Call to handle extra
3335 -- actuals associated with accessibility level.
3336
3337 -- Is_Trivial_Subprogram
3338 -- Defined in all entities. Set in subprograms where either the body
3339 -- consists of a single null statement, or the first or only statement
3340 -- of the body raises an exception. This is used for suppressing certain
3341 -- warnings, see Sem_Ch6.Analyze_Subprogram_Body discussion for details.
3342
3343 -- Is_True_Constant
3344 -- Defined in all entities for constants and variables. Set in constants
3345 -- and variables which have an initial value specified but which are
3346 -- never assigned, partially or in the whole. For variables, it means
3347 -- that the variable was initialized but never modified, and hence can be
3348 -- treated as a constant by the code generator. For a constant, it means
3349 -- that the constant was not modified by generated code (e.g. to set a
3350 -- discriminant in an init proc). Assignments by user or generated code
3351 -- will reset this flag. See also Is_Safe_To_Reevaluate.
3352
3353 -- Is_Type (synthesized)
3354 -- Applies to all entities, true for a type entity
3355
3356 -- Is_Unchecked_Union [implementation base type only]
3357 -- Defined in all entities. Set only in record types to which the
3358 -- pragma Unchecked_Union has been validly applied.
3359
3360 -- Is_Underlying_Full_View
3361 -- Defined in all entities. Set for types which represent the true full
3362 -- view of a private type completed by another private type. For further
3363 -- details, see attribute Underlying_Full_View.
3364
3365 -- Is_Underlying_Record_View [base type only]
3366 -- Defined in all entities. Set only in record types that represent the
3367 -- underlying record view. This view is built for derivations of types
3368 -- with unknown discriminants; it is a record with the same structure
3369 -- as its corresponding record type, but whose parent is the full view
3370 -- of the parent in the original type extension.
3371
3372 -- Is_Unimplemented
3373 -- Defined in all entities. Set for any entity to which a valid pragma
3374 -- or aspect Unimplemented applies.
3375
3376 -- Is_Unsigned_Type
3377 -- Defined in all types, but can be set only for discrete and fixed-point
3378 -- type and subtype entities. This flag is only valid if the entity is
3379 -- frozen. If set it indicates that the representation is known to be
3380 -- unsigned (i.e. that no negative values appear in the range). This is
3381 -- normally just a reflection of the lower bound of the subtype or base
3382 -- type, but there is one case in which the setting is not obvious,
3383 -- namely the case of an unsigned subtype of a signed type from which
3384 -- a further subtype is obtained using variable bounds. This further
3385 -- subtype is still unsigned, but this cannot be determined by looking
3386 -- at its bounds or the bounds of the corresponding base type.
3387 -- For a subtype indication whose range is statically a null range,
3388 -- the flag is set if the lower bound is non-negative, but the flag
3389 -- cannot be used to determine the comparison operator to emit in the
3390 -- generated code: use the base type.
3391
3392 -- Is_Uplevel_Referenced_Entity
3393 -- Defined in all entities. Used when unnesting subprograms to indicate
3394 -- that an entity is locally defined within a subprogram P, and there is
3395 -- a reference to the entity within a subprogram nested within P (at any
3396 -- depth). Set for uplevel referenced objects (variables, constants,
3397 -- discriminants and loop parameters), and also for upreferenced dynamic
3398 -- types, including the cases where the reference is implicit (e.g. the
3399 -- type of an array used for computing the location of an element in an
3400 -- array. This is used internally in Exp_Unst, see this package for
3401 -- further details.
3402
3403 -- Is_Valued_Procedure
3404 -- Defined in procedure entities. Set if an Import_Valued_Procedure
3405 -- or Export_Valued_Procedure pragma applies to the procedure entity.
3406
3407 -- Is_Visible_Formal
3408 -- Defined in all entities. Set for instances of the formals of a
3409 -- formal package. Indicates that the entity must be made visible in the
3410 -- body of the instance, to reproduce the visibility of the generic.
3411 -- This simplifies visibility settings in instance bodies.
3412
3413 -- Is_Visible_Lib_Unit
3414 -- Defined in all (root or child) library unit entities. Once compiled,
3415 -- library units remain chained to the entities in the parent scope, and
3416 -- a separate flag must be used to indicate whether the names are visible
3417 -- by selected notation, or not.
3418
3419 -- Is_Volatile
3420 -- Defined in all type entities, and also in constants, components and
3421 -- variables. Set if a pragma Volatile applies to the entity. Also set
3422 -- if pragma Shared or pragma Atomic applies to entity. In the case of
3423 -- private or incomplete types, this flag is set in both the private
3424 -- and full view. The flag is not set reliably on private subtypes,
3425 -- and is always retrieved from the base type (but this is not a base-
3426 -- type-only attribute because it applies to other entities). Note that
3427 -- the backend should use Treat_As_Volatile, rather than Is_Volatile
3428 -- to indicate code generation requirements for volatile variables.
3429 -- Similarly, any front end test which is concerned with suppressing
3430 -- optimizations on volatile objects should test Treat_As_Volatile
3431 -- rather than testing this flag.
3432 -- This is a synthesized attribute in Einfo.Utils, based on
3433 -- Is_Volatile_Type and Is_Volatile_Object. The latter two should be
3434 -- used in preference to Is_Volatile when we know that we have a type
3435 -- or an object.
3436
3437 -- Is_Volatile_Full_Access
3438 -- Defined in all type entities, and also in constants, components, and
3439 -- variables. Set if an aspect/pragma Volatile_Full_Access or an Ada 2022
3440 -- aspect Full_Access_Only applies to the entity. In the case of private
3441 -- and incomplete types, this flag is set in both the partial view and
3442 -- the full view.
3443
3444 -- Is_Wrapper_Package (synthesized)
3445 -- Defined in package entities. Indicates that the package has been
3446 -- created as a wrapper for a subprogram instantiation.
3447
3448 -- Is_Wrapper
3449 -- Defined in subprogram entities. Indicates that it has been created as
3450 -- a wrapper to handle inherited class-wide pre/post conditions that call
3451 -- overridden primitives or as a wrapper of a controlling function.
3452
3453 -- Itype_Printed
3454 -- Defined in all type and subtype entities. Set in Itypes if the Itype
3455 -- has been printed by Sprint. This is used to avoid printing an Itype
3456 -- more than once.
3457
3458 -- Kill_Elaboration_Checks
3459 -- Defined in all entities. Set by the expander to kill elaboration
3460 -- checks which are known not to be needed. Equivalent in effect to
3461 -- the use of pragma Suppress (Elaboration_Checks) for that entity
3462 -- except that the effect is permanent and cannot be undone by a
3463 -- subsequent pragma Unsuppress.
3464
3465 -- Kill_Range_Checks
3466 -- Defined in all entities. Equivalent in effect to the use of pragma
3467 -- Suppress (Range_Checks) for that entity except that the result is
3468 -- permanent and cannot be undone by a subsequent pragma Unsuppress.
3469 -- This is currently only used in one odd situation in Sem_Ch3 for
3470 -- record types, and it would be good to get rid of it???
3471
3472 -- Known_To_Have_Preelab_Init
3473 -- Defined in all type and subtype entities. If set, then the type is
3474 -- known to have preelaborable initialization. In the case of a partial
3475 -- view of a private type, it is only possible for this to be set if a
3476 -- pragma Preelaborable_Initialization is given for the type. For other
3477 -- types, it is never set if the type does not have preelaborable
3478 -- initialization, it may or may not be set if the type does have
3479 -- preelaborable initialization.
3480
3481 -- Last_Aggregate_Assignment
3482 -- Applies to controlled constants and variables initialized by an
3483 -- aggregate. Points to the last statement associated with the expansion
3484 -- of the aggregate. The attribute is used by the finalization machinery
3485 -- when marking an object as successfully initialized.
3486
3487 -- Last_Assignment
3488 -- Defined in entities for variables, and OUT or IN OUT formals. Set for
3489 -- a local variable or formal to point to the left side of an assignment
3490 -- statement assigning a value to the variable. Cleared if the value of
3491 -- the entity is referenced. Used to warn about dubious assignment
3492 -- statements whose value is not used.
3493
3494 -- Last_Entity
3495 -- Defined in all entities which act as scopes to which a list of
3496 -- associated entities is attached (blocks, class subtypes and types,
3497 -- entries, functions, loops, packages, procedures, protected objects,
3498 -- record types and subtypes, private types, task types and subtypes).
3499 -- Points to the last entry in the list of associated entities chained
3500 -- through the Next_Entity field. Empty if no entities are chained.
3501
3502 -- Last_Formal (synthesized)
3503 -- Applies to subprograms and subprogram types, and also in entries
3504 -- and entry families. Returns last formal of the subprogram or entry.
3505 -- The formals are the first entities declared in a subprogram or in
3506 -- a subprogram type (the designated type of an Access_To_Subprogram
3507 -- definition) or in an entry.
3508
3509 -- Limited_View
3510 -- Defined in non-generic package entities that are not instances. Bona
3511 -- fide package with the limited-view list through the first_entity and
3512 -- first_private attributes. The elements of this list are the shadow
3513 -- entities created for the types and local packages that are declared
3514 -- in a package appearing in a limited_with clause (Ada 2005: AI-50217).
3515
3516 -- Linker_Section_Pragma
3517 -- Present in constant, variable, type and subprogram entities. Points
3518 -- to a linker section pragma that applies to the entity, or is Empty if
3519 -- no such pragma applies. Note that for constants and variables, this
3520 -- field may be set as a result of a linker section pragma applied to the
3521 -- type of the object.
3522
3523 -- Lit_Hash
3524 -- Defined in enumeration types and subtypes. Non-empty only for the
3525 -- case of an enumeration root type, where it contains the entity for
3526 -- the generated hash function. See unit Exp_Imgv for full details of
3527 -- the nature and use of this entity for implementing the Value
3528 -- attribute for the enumeration type in question.
3529
3530 -- Lit_Indexes
3531 -- Defined in enumeration types and subtypes. Non-empty only for the
3532 -- case of an enumeration root type, where it contains the entity for
3533 -- the generated indexes entity. See unit Exp_Imgv for full details of
3534 -- the nature and use of this entity for implementing the Image and
3535 -- Value attributes for the enumeration type in question.
3536
3537 -- Lit_Strings
3538 -- Defined in enumeration types and subtypes. Non-empty only for the
3539 -- case of an enumeration root type, where it contains the entity for
3540 -- the literals string entity. See unit Exp_Imgv for full details of
3541 -- the nature and use of this entity for implementing the Image and
3542 -- Value attributes for the enumeration type in question.
3543
3544 -- Low_Bound_Tested
3545 -- Defined in all entities. Currently this can only be set for formal
3546 -- parameter entries of a standard unconstrained one-dimensional array
3547 -- or string type. Indicates that an explicit test of the low bound of
3548 -- the formal appeared in the code, e.g. in a pragma Assert. If this
3549 -- flag is set, warnings about assuming the index low bound to be one
3550 -- are suppressed.
3551
3552 -- Machine_Radix_10
3553 -- Defined in decimal types and subtypes, set if the Machine_Radix is 10,
3554 -- as the result of the specification of a machine radix representation
3555 -- clause. Note that it is possible for this flag to be set without
3556 -- having Has_Machine_Radix_Clause True. This happens when a type is
3557 -- derived from a type with a clause present.
3558
3559 -- Master_Id
3560 -- Defined in access types and subtypes. Empty unless Has_Task is set for
3561 -- the designated type, in which case it points to the entity for the
3562 -- Master_Id for the access type master. Also set for access-to-limited-
3563 -- class-wide types whose root may be extended with task components, and
3564 -- for access-to-limited-interfaces because they can be used to reference
3565 -- tasks implementing such interface.
3566
3567 -- Materialize_Entity
3568 -- Defined in all entities. Set only for renamed obects which should be
3569 -- materialized for debugging purposes. This means that a memory location
3570 -- containing the renamed address should be allocated. This is needed so
3571 -- that the debugger can find the entity.
3572
3573 -- May_Inherit_Delayed_Rep_Aspects
3574 -- Defined in all entities for types and subtypes. Set if the type is
3575 -- derived from a type which has delayed rep aspects (marked by the flag
3576 -- Has_Delayed_Rep_Aspects being set). In this case, at the freeze point
3577 -- for the derived type we know that the parent type is frozen, and if
3578 -- a given attribute has not been set for the derived type, we copy the
3579 -- value from the parent type. See Freeze.Inherit_Delayed_Rep_Aspects.
3580
3581 -- Mechanism (returned as Mechanism_Type)
3582 -- Defined in functions and non-generic formal parameters. Indicates
3583 -- the mechanism to be used for the function return or for the formal
3584 -- parameter. See full description in the spec of Sem_Mech. This field
3585 -- is also set (to the default value of zero = Default_Mechanism) in a
3586 -- subprogram body entity but not used in this context.
3587
3588 -- Minimum_Accessibility
3589 -- Defined in formal parameters in the non-generic case. Normally Empty,
3590 -- but if expansion is active, and a parameter exists for which a
3591 -- dynamic accessibility check is required, then an object is generated
3592 -- within such a subprogram representing the accessibility level of the
3593 -- subprogram or the formal's Extra_Accessibility - whichever one is
3594 -- lesser. The Minimum_Accessibility field then points to this object.
3595
3596 -- Modulus [base type only]
3597 -- Defined in modular types. Contains the modulus. For the binary case,
3598 -- this will be a power of 2, but if Non_Binary_Modulus is set, then it
3599 -- will not be a power of 2.
3600
3601 -- Must_Be_On_Byte_Boundary
3602 -- Defined in entities for types and subtypes. Set if objects of the type
3603 -- must always be allocated on a byte boundary (more accurately a storage
3604 -- unit boundary). The front end checks that component clauses respect
3605 -- this rule, and the backend ensures that record packing does not
3606 -- violate this rule. Currently the flag is set only for packed arrays
3607 -- longer than 64 bits where the component size is not a power of 2.
3608
3609 -- Must_Have_Preelab_Init
3610 -- Defined in entities for types and subtypes. Set in the full type of a
3611 -- private type or subtype if a pragma Has_Preelaborable_Initialization
3612 -- is present for the private type. Used to check that the full type has
3613 -- preelaborable initialization at freeze time (this has to be deferred
3614 -- to the freeze point because of the rule about overriding Initialize).
3615
3616 -- Needs_Activation_Record
3617 -- Defined on generated subprogram types. Indicates that a call through
3618 -- a named or anonymous access to subprogram requires an activation
3619 -- record when compiling with unnesting for C or LLVM.
3620
3621 -- Needs_Debug_Info
3622 -- Defined in all entities. Set if the entity requires normal debugging
3623 -- information to be generated. This is true of all entities that have
3624 -- Comes_From_Source set, and also transitively for entities associated
3625 -- with such components (e.g. their types). It is true for all entities
3626 -- in Debug_Generated_Code mode (-gnatD switch). This is the flag that
3627 -- the backend should check to determine whether or not to generate
3628 -- debugging information for an entity. Note that callers should always
3629 -- use Sem_Util.Set_Debug_Info_Needed, rather than Set_Needs_Debug_Info,
3630 -- so that the flag is set properly on subsidiary entities.
3631
3632 -- Needs_No_Actuals
3633 -- Defined in callable entities (subprograms, entries, access to
3634 -- subprograms) which can be called without actuals because all of
3635 -- their formals (if any) have default values. This flag simplifies the
3636 -- resolution of the syntactic ambiguity involving a call to these
3637 -- entities when the return type is an array type, and a call can be
3638 -- interpreted as an indexing of the result of the call. It is also
3639 -- used to resolve various cases of entry calls.
3640
3641 -- Never_Set_In_Source
3642 -- Defined in all entities, but can be set only for variables and
3643 -- parameters. This flag is set if the object is never assigned a value
3644 -- in user source code, either by assignment or by being used as an out
3645 -- or in out parameter. Note that this flag is not reset from using an
3646 -- initial value, so if you want to test for this case as well, test the
3647 -- Has_Initial_Value flag also.
3648 --
3649 -- This flag is only for the purposes of issuing warnings, it must not
3650 -- be used by the code generator to indicate that the variable is in
3651 -- fact a constant, since some assignments in generated code do not
3652 -- count (for example, the call to an init proc to assign some but
3653 -- not all of the fields in a partially initialized record). The code
3654 -- generator should instead use the flag Is_True_Constant.
3655 --
3656 -- For the purposes of this warning, the default assignment of access
3657 -- variables to null is not considered the assignment of a value (so
3658 -- the warning can be given for code that relies on this initial null
3659 -- value when no other value is ever set).
3660 --
3661 -- In variables and out parameters, if this flag is set after full
3662 -- processing of the corresponding declarative unit, it indicates that
3663 -- the variable or parameter was never set, and a warning message can
3664 -- be issued.
3665 --
3666 -- Note: this flag is initially set, and then cleared on encountering
3667 -- any construct that might conceivably legitimately set the value.
3668 -- Thus during the analysis of a declarative region and its associated
3669 -- statement sequence, the meaning of the flag is "not set yet", and
3670 -- once this analysis is complete the flag means "never assigned".
3671
3672 -- Note: for variables appearing in package declarations, this flag is
3673 -- never set. That is because there is no way to tell if some client
3674 -- modifies the variable (or, in the case of variables in the private
3675 -- part, if some child unit modifies the variables).
3676
3677 -- Note: in the case of renamed objects, the flag must be set in the
3678 -- ultimate renamed object. Clients noting a possible modification
3679 -- should use the Note_Possible_Modification procedure in Sem_Util
3680 -- rather than Set_Never_Set_In_Source precisely to deal properly with
3681 -- the renaming possibility.
3682
3683 -- Next_Component (synthesized)
3684 -- Applies to record components. Returns the next component by following
3685 -- the chain of declared entities until one is found which corresponds to
3686 -- a component (Ekind is E_Component). Any internal types generated from
3687 -- the subtype indications of the record components are skipped. Returns
3688 -- Empty if no more components.
3689
3690 -- Next_Component_Or_Discriminant (synthesized)
3691 -- Similar to Next_Component, but includes components and discriminants
3692 -- so the input can have either E_Component or E_Discriminant, and the
3693 -- same is true for the result. Returns Empty if no more components or
3694 -- discriminants in the record.
3695
3696 -- Next_Discriminant (synthesized)
3697 -- Applies to discriminants returned by First/Next_Discriminant. Returns
3698 -- the next language-defined (i.e. perhaps non-stored) discriminant by
3699 -- following the chain of declared entities as long as the kind of the
3700 -- entity corresponds to a discriminant. Note that the discriminants
3701 -- might be the only components of the record. Returns Empty if there
3702 -- are no more discriminants.
3703
3704 -- Next_Entity
3705 -- Defined in all entities. The entities of a scope are chained, with
3706 -- the head of the list being in the First_Entity field of the scope
3707 -- entity. All entities use the Next_Entity field as a forward pointer
3708 -- for this list, with Empty indicating the end of the list. Since this
3709 -- field is in the base part of the entity, the access routines for this
3710 -- field are in Sinfo.
3711
3712 -- Next_Formal (synthesized)
3713 -- Applies to the entity for a formal parameter. Returns the next formal
3714 -- parameter of the subprogram or subprogram type. Returns Empty if there
3715 -- are no more formals.
3716
3717 -- Next_Formal_With_Extras (synthesized)
3718 -- Applies to the entity for a formal parameter. Returns the next
3719 -- formal parameter of the subprogram or subprogram type. Returns
3720 -- Empty if there are no more formals. The list returned includes
3721 -- all the extra formals (see description of Extra_Formal field)
3722
3723 -- Next_Index (synthesized)
3724 -- Applies to array types and subtypes and to string types and
3725 -- subtypes. Yields the next index. The first index is obtained by
3726 -- using the First_Index attribute, and then subsequent indexes are
3727 -- obtained by applying Next_Index to the previous index. Empty is
3728 -- returned to indicate that there are no more indexes. Note that
3729 -- unlike most attributes in this package, Next_Index applies to
3730 -- nodes for the indexes, not to entities.
3731
3732 -- Next_Inlined_Subprogram
3733 -- Defined in subprograms. Used to chain inlined subprograms used in
3734 -- the current compilation, in the order in which they must be compiled
3735 -- by the backend to ensure that all inlinings are performed.
3736
3737 -- Next_Literal (synthesized)
3738 -- Applies to enumeration literals, returns the next literal, or
3739 -- Empty if applied to the last literal. This is actually a synonym
3740 -- for Next, but its use is preferred in this context.
3741
3742 -- No_Dynamic_Predicate_On_Actual
3743 -- Defined in discrete types. Set for generic formal types that are used
3744 -- in loops and quantified expressions. The corresponding actual cannot
3745 -- have dynamic predicates.
3746
3747 -- No_Pool_Assigned [root type only]
3748 -- Defined in access types. Set if a storage size clause applies to the
3749 -- variable with a static expression value of zero. This flag is used to
3750 -- generate errors if any attempt is made to allocate or free an instance
3751 -- of such an access type. This is set only in the root type, since
3752 -- derived types must have the same pool.
3753
3754 -- No_Predicate_On_Actual
3755 -- Defined in discrete types. Set for generic formal types that are used
3756 -- in the spec of a generic package, in constructs that forbid discrete
3757 -- types with predicates.
3758
3759 -- No_Reordering [implementation base type only]
3760 -- Defined in record types. Set only for a base type to which a valid
3761 -- pragma No_Component_Reordering applies.
3762
3763 -- No_Return
3764 -- Defined in all entities. Set for subprograms and generic subprograms
3765 -- to which a valid aspect or pragma No_Return applies.
3766
3767 -- No_Strict_Aliasing [base type only]
3768 -- Defined in access types. Set to direct the backend to avoid any
3769 -- optimizations based on an assumption about the aliasing status of
3770 -- objects designated by the access type. For the case of the gcc
3771 -- backend, the effect is as though all references to objects of
3772 -- the type were compiled with -fno-strict-aliasing. This flag is
3773 -- set if an unchecked conversion with the access type as a target
3774 -- type occurs in the same source unit as the declaration of the
3775 -- access type, or if an explicit pragma No_Strict_Aliasing applies.
3776
3777 -- No_Tagged_Streams_Pragma
3778 -- Present in all subtype and type entities. Set for tagged types and
3779 -- subtypes (i.e. entities with Is_Tagged_Type set True) if a valid
3780 -- pragma/aspect applies to the type.
3781
3782 -- Non_Binary_Modulus [base type only]
3783 -- Defined in all subtype and type entities. Set for modular integer
3784 -- types if the modulus value is other than a power of 2.
3785
3786 -- Non_Limited_View
3787 -- Defined in abstract states and incomplete types that act as shadow
3788 -- entities created when analysing a limited with clause (Ada 2005:
3789 -- AI-50217). Points to the defining entity of the original declaration.
3790
3791 -- Nonzero_Is_True [base type only]
3792 -- Defined in enumeration types. Set if any non-zero value is to be
3793 -- interpreted as true. Currently this is set for derived Boolean
3794 -- types which have a convention of C, C++ or Fortran.
3795
3796 -- Normalized_First_Bit
3797 -- Defined in components and discriminants. Indicates the normalized
3798 -- value of First_Bit for the component, i.e. the offset within the
3799 -- lowest addressed storage unit containing part or all of the field.
3800 -- Set to No_Uint if no first bit position is assigned yet.
3801
3802 -- Normalized_Position
3803 -- Defined in components and discriminants. Indicates the normalized
3804 -- value of Position for the component, i.e. the offset in storage
3805 -- units from the start of the record to the lowest addressed storage
3806 -- unit containing part or all of the field.
3807
3808 -- Number_Dimensions (synthesized)
3809 -- Applies to array types and subtypes. Returns the number of dimensions
3810 -- of the array type or subtype as a value of type Pos.
3811
3812 -- Number_Entries (synthesized)
3813 -- Applies to concurrent types. Returns the number of entries that are
3814 -- declared within the task or protected definition for the type.
3815
3816 -- Number_Formals (synthesized)
3817 -- Applies to subprograms and subprogram types. Yields the number of
3818 -- formals as a value of type Pos.
3819
3820 -- Object_Size_Clause (synthesized)
3821 -- Applies to entities for types and subtypes. If an object size clause
3822 -- is present in the rep item chain for an entity then the attribute
3823 -- definition clause node is returned. Otherwise Object_Size_Clause
3824 -- returns Empty if no item is present. Usually this is only meaningful
3825 -- if the flag Has_Object_Size_Clause is set. This is because when the
3826 -- representation item chain is copied for a derived type, it can inherit
3827 -- an object size clause that is not applicable to the entity.
3828
3829 -- OK_To_Rename
3830 -- Defined only in entities for variables. If this flag is set, it
3831 -- means that if the entity is used as the initial value of an object
3832 -- declaration, the object declaration can be safely converted into a
3833 -- renaming to avoid an extra copy. This is set for variables which are
3834 -- generated by the expander to hold the result of evaluating some
3835 -- expression. Most notably, the local variables used to store the result
3836 -- of concatenations are so marked (see Exp_Ch4.Expand_Concatenate). It
3837 -- is only worth setting this flag for composites, since for primitive
3838 -- types, it is cheaper to do the copy.
3839
3840 -- Optimize_Alignment_Space
3841 -- Defined in type, subtype, variable, and constant entities. This
3842 -- flag records that the type or object is to be laid out in a manner
3843 -- consistent with Optimize_Alignment (Space) mode. The compiler and
3844 -- binder ensure a consistent view of any given type or object. If pragma
3845 -- Optimize_Alignment (Off) mode applies to the type/object, then neither
3846 -- of the flags Optimize_Alignment_Space/Optimize_Alignment_Time is set.
3847
3848 -- Optimize_Alignment_Time
3849 -- Defined in type, subtype, variable, and constant entities. This
3850 -- flag records that the type or object is to be laid out in a manner
3851 -- consistent with Optimize_Alignment (Time) mode. The compiler and
3852 -- binder ensure a consistent view of any given type or object. If pragma
3853 -- Optimize_Alignment (Off) mode applies to the type/object, then neither
3854 -- of the flags Optimize_Alignment_Space/Optimize_Alignment_Time is set.
3855
3856 -- Original_Access_Type
3857 -- Defined in E_Access_Subprogram_Type entities. Set only if the access
3858 -- type was generated by the expander as part of processing an access-
3859 -- to-protected-subprogram type. Points to the access-to-protected-
3860 -- subprogram type.
3861
3862 -- Original_Array_Type
3863 -- Defined in modular types and array types and subtypes. Set only if
3864 -- the Is_Packed_Array_Impl_Type flag is set, indicating that the type
3865 -- is the implementation type for a packed array, and in this case it
3866 -- points to the original array type for which this is the packed
3867 -- array implementation type.
3868
3869 -- Original_Protected_Subprogram
3870 -- Defined in functions and procedures. Set only on internally built
3871 -- dispatching subprograms of protected types to reference their original
3872 -- non-dispatching protected subprogram since their names differ.
3873
3874 -- Original_Record_Component
3875 -- Defined in components, including discriminants. The usage depends
3876 -- on whether the record is a base type and whether it is tagged.
3877 --
3878 -- In base tagged types:
3879 -- When the component is inherited in a record extension, it points
3880 -- to the original component (the entity of the ancestor component
3881 -- which is not itself inherited) otherwise it points to itself. The
3882 -- backend uses this attribute to implement the automatic dereference
3883 -- in the extension and to apply the transformation:
3884 --
3885 -- Rec_Ext.Comp -> Rec_Ext.Parent. ... .Parent.Comp
3886 --
3887 -- In base untagged types:
3888 -- Always points to itself except for non-stored discriminants, where
3889 -- it points to the stored discriminant it renames.
3890 --
3891 -- In subtypes (tagged and untagged):
3892 -- Points to the component in the base type.
3893
3894 -- Overlays_Constant
3895 -- Defined in all entities. Set only for E_Constant or E_Variable for
3896 -- which there is an address clause that causes the entity to overlay
3897 -- a constant object.
3898
3899 -- Overridden_Operation
3900 -- Defined in subprograms. For overriding operations, points to the
3901 -- user-defined parent subprogram that is being overridden. Note: this
3902 -- attribute uses the same field as Static_Initialization. The latter
3903 -- is only defined for internal initialization procedures, for which
3904 -- Overridden_Operation is irrelevant. Thus this attribute must not be
3905 -- set for init_procs.
3906
3907 -- Package_Instantiation
3908 -- Defined in packages and generic packages. When defined, this field
3909 -- references an N_Generic_Instantiation node associated with an
3910 -- instantiated package. In the case where the referenced node has
3911 -- been rewritten to an N_Package_Specification, the instantiation
3912 -- node is available from the Original_Node field of the package spec
3913 -- node. This is currently not guaranteed to be set in all cases, but
3914 -- when set, the field is used in Get_Unit_Instantiation_Node as
3915 -- one of the means of obtaining the instantiation node. Eventually
3916 -- it should be set in all cases, including package entities associated
3917 -- with formal packages. ???
3918
3919 -- Packed_Array_Impl_Type
3920 -- Defined in array types and subtypes, except for the string literal
3921 -- subtype case, if the corresponding type is packed and implemented
3922 -- specially (either bit-packed or packed to eliminate holes in the
3923 -- non-contiguous enumeration index types). References the type used to
3924 -- represent the packed array, which is either a modular type for short
3925 -- static arrays or an array of System.Unsigned in the bit-packed case,
3926 -- or a regular array in the non-standard enumeration index case. Note
3927 -- that in some situations (internal types and references to fields of
3928 -- variant records), it is not always possible to construct this type in
3929 -- advance of its use. If this field is empty, then the necessary type
3930 -- is declared on the fly for each reference to the array.
3931
3932 -- Parameter_Mode (synthesized)
3933 -- Applies to formal parameter entities. This is a synonym for Ekind,
3934 -- used when obtaining the formal kind of a formal parameter (the result
3935 -- is one of E_[In/Out/In_Out]_Parameter).
3936
3937 -- Parent_Subtype [base type only]
3938 -- Defined in E_Record_Type. Set only for derived tagged types, in which
3939 -- case it points to the subtype of the parent type. This is the type
3940 -- that is used as the Etype of the _parent field.
3941
3942 -- Part_Of_Constituents
3943 -- Present in abstract state and variable entities. Contains all
3944 -- constituents that are subject to indicator Part_Of (both aspect and
3945 -- option variants).
3946
3947 -- Part_Of_References
3948 -- Present in variable entities. Contains all references to the variable
3949 -- when it is subject to pragma Part_Of. If the variable is a constituent
3950 -- of a single protected/task type, the references are examined as they
3951 -- must appear only within the type defintion and the corresponding body.
3952
3953 -- Partial_DIC_Procedure (synthesized)
3954 -- Defined in type entities. Set for a private type and its full view
3955 -- when the type is subject to pragma Default_Initial_Condition (DIC), or
3956 -- when the type inherits a DIC pragma from a parent type. Points to the
3957 -- entity of a procedure that takes a single argument of the given type
3958 -- and verifies the assertion expression of the DIC pragma at run time.
3959 -- When present, the Partial_DIC_Procedure of a type only checks DICs
3960 -- associated with the partial (private) view of the type, and is invoked
3961 -- by the full DIC_Procedure (which may check additional DICs associated
3962 -- with the full view).
3963
3964 -- Note: the reason this is marked as a synthesized attribute is that the
3965 -- way this is stored is as an element of the Subprograms_For_Type field.
3966
3967 -- Partial_Invariant_Procedure (synthesized)
3968 -- Defined in types and subtypes. Set for private types when one or more
3969 -- [class-wide] type invariants apply to them. Points to the entity for a
3970 -- procedure which checks the invariant. This invariant procedure takes a
3971 -- single argument of the given type, and returns if the invariant holds,
3972 -- or raises exception Assertion_Error with an appropriate message if it
3973 -- does not hold. This attribute is defined but always Empty for private
3974 -- subtypes. This attribute is also set for the corresponding full type.
3975 --
3976 -- Note: the reason this is marked as a synthesized attribute is that the
3977 -- way this is stored is as an element of the Subprograms_For_Type field.
3978
3979 -- Partial_Refinement_Constituents (synthesized)
3980 -- Defined in abstract state entities. Returns the constituents that
3981 -- refine the state in the current scope, which are allowed in a global
3982 -- refinement in this scope. These consist of those constituents that are
3983 -- abstract states with no or only partial refinement visible, and those
3984 -- that are not themselves abstract states.
3985
3986 -- Partial_View_Has_Unknown_Discr
3987 -- Present in all types. Set to Indicate that the partial view of a type
3988 -- has unknown discriminants. A default initialization of an object of
3989 -- the type does not require an invariant check (AI12-0133).
3990
3991 -- Pending_Access_Types
3992 -- Defined in all types. Set for incomplete, private, Taft-amendment
3993 -- types, and their corresponding full views. This list contains all
3994 -- access types, both named and anonymous, declared between the partial
3995 -- and the full view. The list is used by the finalization machinery to
3996 -- ensure that the finalization masters of all pending access types are
3997 -- fully initialized when the full view is frozen.
3998
3999 -- Postconditions_Proc
4000 -- Defined in functions, procedures, entries, and entry families. Refers
4001 -- to the entity of the _Postconditions procedure used to check contract
4002 -- assertions on exit from a subprogram.
4003
4004 -- Predicate_Function (synthesized)
4005 -- Defined in all types. Set for types for which (Has_Predicates is True)
4006 -- and for which a predicate procedure has been built that tests that the
4007 -- specified predicates are True. Contains the entity for the function
4008 -- which takes a single argument of the given type (and sometimes an
4009 -- additional Boolean parameter), and returns True if the predicate
4010 -- holds and False if it does not.
4011 --
4012 -- Note: flag Has_Predicate does not imply that Predicate_Function is set
4013 -- to a non-empty entity; this happens, for example, for itypes created
4014 -- when instantiating generic units with private types with predicates.
4015 -- However, if an explicit pragma Predicate or Predicate aspect is given
4016 -- either for private or full type declaration then both Has_Predicates
4017 -- and a non-empty Predicate_Function will be set on both the partial and
4018 -- full views of the type.
4019 --
4020 -- Note: the reason this is marked as a synthesized attribute is that the
4021 -- way this is stored is as an element of the Subprograms_For_Type field.
4022
4023 -- Predicate_Expression
4024 -- Defined on functions. For the defining identifier of the subprogram
4025 -- declaration (not of the subprogram body) of a predicate function,
4026 -- yields the expression for the noninherited portion of the given
4027 -- predicate (except in the case where the inherited portion is
4028 -- non-empty and the non-inherited portion is empty, in which case the
4029 -- expression for the inherited portion is returned). Otherwise yields
4030 -- empty.
4031
4032 -- Predicated_Parent
4033 -- Defined on itypes created by subtype indications, when the parent
4034 -- subtype has predicates. The itype shares the Predicate_Function
4035 -- of the predicated parent, but this function may not have been built
4036 -- at the point the Itype is constructed, so this attribute allows its
4037 -- retrieval at the point a predicate check needs to be generated.
4038 -- The utility Predicate_Function takes this link into account.
4039
4040 -- Predicates_Ignored
4041 -- Defined on all types. Indicates whether the subtype declaration is in
4042 -- a context where Assertion_Policy is Ignore, in which case no checks
4043 -- (static or dynamic) must be generated for objects of the type.
4044
4045 -- Prev_Entity
4046 -- Defined in all entities. The entities of a scope are chained, and this
4047 -- field is used as a backward pointer for this entity list - effectivly
4048 -- making the entity chain doubly-linked.
4049
4050 -- Primitive_Operations (synthesized)
4051 -- Defined in concurrent types, tagged record types and subtypes, tagged
4052 -- private types and tagged incomplete types. For concurrent types whose
4053 -- Corresponding_Record_Type (CRT) is available, returns the list of
4054 -- Direct_Primitive_Operations of its CRT; otherwise returns No_Elist.
4055 -- For all the other types returns the Direct_Primitive_Operations.
4056
4057 -- Prival
4058 -- Defined in private components of protected types. Refers to the entity
4059 -- of the component renaming declaration generated inside protected
4060 -- subprograms, entries or barrier functions.
4061
4062 -- Prival_Link
4063 -- Defined in constants and variables which rename private components of
4064 -- protected types. Set to the original private component.
4065
4066 -- Private_Dependents
4067 -- Defined in private (sub)types. Records the subtypes of the private
4068 -- type, derivations from it, and records and arrays with components
4069 -- dependent on the type.
4070 --
4071 -- The subtypes are traversed when installing and deinstalling (the full
4072 -- view of) a private type in order to ensure correct view of the
4073 -- subtypes.
4074 --
4075 -- Used in similar fashion for incomplete types: holds list of subtypes
4076 -- of these incomplete types that have discriminant constraints. The
4077 -- full views of these subtypes are constructed when the full view of
4078 -- the incomplete type is processed.
4079
4080 -- In addition, if the incomplete type is the designated type in an
4081 -- access definition for an access parameter, the operation may be
4082 -- a dispatching primitive operation, which is only known when the full
4083 -- declaration of the type is seen. Subprograms that have such an
4084 -- access parameter are also placed in the list of private_dependents.
4085
4086 -- Protected_Body_Subprogram
4087 -- Defined in protected operations. References the entity for the
4088 -- subprogram which implements the body of the operation.
4089
4090 -- Protected_Formal
4091 -- Defined in formal parameters (in, in out and out parameters). Used
4092 -- only for formals of protected operations. References corresponding
4093 -- formal parameter in the unprotected version of the operation that
4094 -- is created during expansion.
4095
4096 -- Protected_Subprogram
4097 -- Defined in functions and procedures. Set for the pair of subprograms
4098 -- which emulate the runtime semantics of a protected subprogram. Denotes
4099 -- the entity of the origial protected subprogram.
4100
4101 -- Protection_Object
4102 -- Applies to protected entries, entry families and subprograms. Denotes
4103 -- the entity which is used to rename the _object component of protected
4104 -- types.
4105
4106 -- Reachable
4107 -- Defined in labels. The flag is set over the range of statements in
4108 -- which a goto to that label is legal.
4109
4110 -- Receiving_Entry
4111 -- Defined in procedures. Set for an internally generated procedure which
4112 -- wraps the original statements of an accept alternative. Designates the
4113 -- entity of the task entry being accepted.
4114
4115 -- Referenced
4116 -- Defined in all entities. Set if the entity is referenced, except for
4117 -- the case of an appearance of a simple variable that is not a renaming
4118 -- as the left side of an assignment in which case Referenced_As_LHS is
4119 -- set instead, or a similar appearance as an out parameter actual, in
4120 -- which case Referenced_As_Out_Parameter is set.
4121
4122 -- Referenced_As_LHS :
4123 -- Defined in all entities. This flag is set instead of Referenced if a
4124 -- simple variable that is not a renaming appears as the left side of an
4125 -- assignment. The reason we distinguish this kind of reference is that
4126 -- we have a separate warning for variables that are only assigned and
4127 -- never read.
4128
4129 -- Referenced_As_Out_Parameter :
4130 -- Defined in all entities. This flag is set instead of Referenced if a
4131 -- simple variable that is not a renaming appears as an actual for an out
4132 -- formal. The reason we distinguish this kind of reference is that
4133 -- we have a separate warning for variables that are only assigned and
4134 -- never read, and out parameters are a special case.
4135
4136 -- Refinement_Constituents
4137 -- Present in abstract state entities. Contains all the constituents that
4138 -- refine the state, in other words, all the hidden states that appear in
4139 -- the constituent_list of aspect/pragma Refined_State.
4140
4141 -- Register_Exception_Call
4142 -- Defined in exception entities. When an exception is declared,
4143 -- a call is expanded to Register_Exception. This field points to
4144 -- the expanded N_Procedure_Call_Statement node for this call. It
4145 -- is used for Import/Export_Exception processing to modify the
4146 -- register call to make appropriate entries in the special tables
4147 -- used for handling these pragmas at run time.
4148
4149 -- Related_Array_Object
4150 -- Defined in array types and subtypes. Used only for the base type
4151 -- and subtype created for an anonymous array object. Set to point
4152 -- to the entity of the corresponding array object. Currently used
4153 -- only for type-related error messages.
4154
4155 -- Related_Expression
4156 -- Defined in variables, types and functions. When Set for internally
4157 -- generated entities, it may be used to denote the source expression
4158 -- whose elaboration created the variable declaration. If set, it is used
4159 -- for generating clearer messages from CodePeer. It is used on source
4160 -- entities that are variables in iterator specifications, to provide
4161 -- a link to the container that is the domain of iteration. This allows
4162 -- for better cross-reference information when the loop modifies elements
4163 -- of the container, and suppresses spurious warnings.
4164 -- Finally this node is used on functions specified via the Real_Literal
4165 -- aspect, to denote the 2-parameter overloading, if found.
4166 --
4167 -- Shouldn't it also be used for the same purpose in errout? It seems
4168 -- odd to have two mechanisms here???
4169
4170 -- Related_Instance
4171 -- Defined in the wrapper packages created for subprogram instances.
4172 -- The internal subprogram that implements the instance is inside the
4173 -- wrapper package, but for debugging purposes its external symbol
4174 -- must correspond to the name and scope of the related instance.
4175
4176 -- Related_Type
4177 -- Defined in components, constants and variables. Set when there is an
4178 -- associated dispatch table to point to entities containing primary or
4179 -- secondary tags. Not set in the _tag component of record types.
4180
4181 -- Relative_Deadline_Variable [implementation base type only]
4182 -- Defined in task type entities. This flag is set if a valid and
4183 -- effective pragma Relative_Deadline applies to the base type. Points
4184 -- to the entity for a variable that is created to hold the value given
4185 -- in a Relative_Deadline pragma for a task type.
4186
4187 -- Renamed_Entity
4188 -- Defined in exception, generic unit, package, and subprogram entities.
4189 -- Set when the entity is defined by a renaming declaration. Denotes the
4190 -- renamed entity, or transitively the ultimate renamed entity if there
4191 -- is a chain of renaming declarations. Empty if no renaming.
4192
4193 -- Renamed_In_Spec
4194 -- Defined in package entities. If a package renaming occurs within
4195 -- a package spec, then this flag is set on the renamed package. The
4196 -- purpose is to prevent a warning about unused entities in the renamed
4197 -- package. Such a warning would be inappropriate since clients of the
4198 -- package can see the entities in the package via the renaming.
4199
4200 -- Renamed_Object
4201 -- Defined in components, constants, discriminants, formal parameters,
4202 -- generic formals, loop parameters, and variables. Set to non-Empty if
4203 -- the object was declared by a renaming declaration. For constants and
4204 -- variables, the attribute references the tree node for the name of the
4205 -- renamed object. For formal parameters, the field is used in inlining
4206 -- and maps the entities of all formal parameters of a subprogram to the
4207 -- entities of the corresponding actuals. For formals of a task entry,
4208 -- the attribute denotes the local renaming that replaces the actual
4209 -- within an accept statement. For all remaining cases (discriminants,
4210 -- loop parameters) the field is Empty.
4211
4212 -- Requires_Overriding
4213 -- Defined in all subprograms and entries. Set for subprograms that
4214 -- require overriding as defined by RM-2005-3.9.3(6/2). Note that this
4215 -- is True only for implicitly declared subprograms; it is not set on the
4216 -- parent type's subprogram. See also Is_Abstract_Subprogram.
4217
4218 -- Return_Applies_To
4219 -- Defined in E_Return_Statement. Points to the entity representing
4220 -- the construct to which the return statement applies, as defined in
4221 -- RM-6.5(4/2). Note that a (simple) return statement within an
4222 -- extended_return_statement applies to the extended_return_statement,
4223 -- even though it causes the whole function to return.
4224 -- Also defined in special E_Block entities built as E_Return_Statement
4225 -- for extended return statements and attached to the block statement
4226 -- by Expand_N_Extended_Return_Statement before being turned into an
4227 -- E_Block by semantic analysis.
4228
4229 -- Return_Present
4230 -- Defined in function and generic function entities. Set if the
4231 -- function contains a return statement (used for error checking).
4232 -- This flag can also be set in procedure and generic procedure
4233 -- entities (for convenience in setting it), but is only tested
4234 -- for the function case.
4235
4236 -- Return_Statement
4237 -- Defined in E_Variable. Set when Is_Return_Object is set, in which
4238 -- case it points to the N_Simple_Return_Statement made from the
4239 -- extended return statement.
4240
4241 -- Returns_By_Ref
4242 -- Defined in subprogram type entities and functions. Set if a function
4243 -- (or an access-to-function type) returns a result by reference, either
4244 -- because its return type is a by-reference-type or because the function
4245 -- explicitly uses the secondary stack.
4246
4247 -- Reverse_Bit_Order [base type only]
4248 -- Defined in all record type entities. Set if entity has a Bit_Order
4249 -- aspect (set by an aspect clause or attribute definition clause) that
4250 -- has reversed the order of bits from the default value. When this flag
4251 -- is set, a component clause must specify a set of bits entirely within
4252 -- a single storage unit (Ada 95) or within a single machine scalar (see
4253 -- Ada 2005 AI-133), or must occupy an integral number of storage units.
4254
4255 -- Reverse_Storage_Order [base type only]
4256 -- Defined in all record and array type entities. Set if entity has a
4257 -- Scalar_Storage_Order aspect (set by an aspect clause or attribute
4258 -- definition clause) that has reversed the order of storage elements
4259 -- from the default value. When this flag is set for a record type,
4260 -- the Bit_Order aspect must be set to the same value (either explicitly
4261 -- or as the target default value).
4262
4263 -- Rewritten_For_C
4264 -- Defined on functions that return a constrained array type, when
4265 -- Modify_Tree_For_C is set. Indicates that a procedure with an extra
4266 -- out parameter has been created for it, and calls must be rewritten as
4267 -- calls to the new procedure.
4268
4269 -- RM_Size
4270 -- Defined in all type and subtype entities. Contains the value of
4271 -- type'Size as defined in the RM. See also the Esize field and
4272 -- and the description on "Handling of Type'Size Values". A value
4273 -- of zero in this field for a non-discrete type means that
4274 -- the front end has not yet determined the size value. For the
4275 -- case of a discrete type, this field is always set by the front
4276 -- end and zero is a legitimate value for a type with one value.
4277
4278 -- Root_Type (synthesized)
4279 -- Applies to all type entities. For class-wide types, returns the root
4280 -- type of the class covered by the CW type, otherwise returns the
4281 -- ultimate derivation ancestor of the given type. This function
4282 -- preserves the view, i.e. the Root_Type of a partial view is the
4283 -- partial view of the ultimate ancestor, the Root_Type of a full view
4284 -- is the full view of the ultimate ancestor. Note that this function
4285 -- does not correspond exactly to the use of root type in the RM, since
4286 -- in the RM root type applies to a class of types, not to a type.
4287
4288 -- Scalar_Range
4289 -- Defined in all scalar types (including modular types, where the
4290 -- bounds are 0 .. modulus - 1). References a node in the tree that
4291 -- contains the bounds for the range. Note that this information
4292 -- could be obtained by rummaging around the tree, but it is more
4293 -- convenient to have it immediately at hand in the entity. The
4294 -- contents of Scalar_Range can either be an N_Subtype_Indication
4295 -- node (with a constraint), a Range node, or an Integer_Type_Definition,
4296 -- but not a simple subtype reference (a subtype is converted into a
4297 -- explicit range).
4298
4299 -- Scale_Value
4300 -- Defined in decimal fixed-point types and subtypes. This holds the
4301 -- value of the Scale attribute for the type, i.e. the scale of the type
4302 -- defined as the integer N such that the delta is equal to 10.0**(-N).
4303 -- Note that, if Scale_Value is positive, then it is equal to Aft_Value.
4304
4305 -- Scope
4306 -- Defined in all entities. Points to the entity for the scope (block,
4307 -- loop, subprogram, package etc.) in which the entity is declared.
4308 -- Since this field is in the base part of the entity node, the access
4309 -- routines for this field are in Sinfo. Note that for a child unit,
4310 -- the Scope will be the parent package, and for a root library unit,
4311 -- the Scope will be Standard.
4312
4313 -- Scope_Depth (synthesized)
4314 -- Applies to program units, blocks, loops, return statements,
4315 -- concurrent types, private types and entries, and also to record types,
4316 -- i.e. to any entity that can appear on the scope stack. Yields the
4317 -- scope depth value, which for those entities other than records is
4318 -- simply the scope depth value, for record entities, it is the
4319 -- Scope_Depth of the record scope.
4320
4321 -- Scope_Depth_Value
4322 -- Defined in program units, blocks, loops, return statements,
4323 -- concurrent types, private types and entries.
4324 -- Indicates the number of scopes that statically enclose the declaration
4325 -- of the unit or type. Library units have a depth of zero. Note that
4326 -- record types can act as scopes but do NOT have this field set (see
4327 -- Scope_Depth above). Queries should normally be via Scope_Depth,
4328 -- and not call Scope_Depth_Value directly.
4329
4330 -- Scope_Depth_Set (synthesized)
4331 -- Applies to a special predicate function that returns a Boolean value
4332 -- indicating whether or not the Scope_Depth field has been set. It is
4333 -- needed, since returns an invalid value in this case.
4334
4335 -- Sec_Stack_Needed_For_Return
4336 -- Defined in scope entities (blocks, entries, entry families, functions,
4337 -- and procedures). Set to True when secondary stack is used to hold the
4338 -- returned value of a function and thus should not be released on scope
4339 -- exit.
4340
4341 -- Shared_Var_Procs_Instance
4342 -- Defined in variables. Set non-Empty only if Is_Shared_Passive is
4343 -- set, in which case this is the entity for the associated instance of
4344 -- System.Shared_Storage.Shared_Var_Procs. See Exp_Smem for full details.
4345
4346 -- Size_Check_Code
4347 -- Defined in constants and variables. Normally Empty. Set if code is
4348 -- generated to check the size of the object. This field is used to
4349 -- suppress this code if a subsequent address clause is encountered.
4350
4351 -- Size_Clause (synthesized)
4352 -- Applies to all entities. If a size or value size clause is present in
4353 -- the rep item chain for an entity then that attribute definition clause
4354 -- is returned. Otherwise Size_Clause returns Empty. Usually this is only
4355 -- meaningful if the flag Has_Size_Clause is set. This is because when
4356 -- the representation item chain is copied for a derived type, it can
4357 -- inherit a size clause that is not applicable to the entity.
4358
4359 -- Size_Depends_On_Discriminant
4360 -- Defined in all entities for types and subtypes. Indicates that the
4361 -- size of the type depends on the value of one or more discriminants.
4362 -- Currently, this flag is only set for arrays which have one or more
4363 -- bounds depending on a discriminant value.
4364
4365 -- Size_Known_At_Compile_Time
4366 -- Defined in all entities for types and subtypes. Indicates that the
4367 -- size of objects of the type is known at compile time. This flag is
4368 -- used to optimize some generated code sequences, and also to enable
4369 -- some error checks (e.g. disallowing component clauses on variable
4370 -- length objects). It is set conservatively (i.e. if it is True, the
4371 -- size is certainly known at compile time, if it is False, then the
4372 -- size may or may not be known at compile time, but the code will
4373 -- assume that it is not known). Note that the value may be known only
4374 -- to the back end, so the fact that this flag is set does not mean that
4375 -- the front end can access the value.
4376
4377 -- Small_Value
4378 -- Defined in fixed point types. Points to the universal real for the
4379 -- Small of the type, either as given in a representation clause, or
4380 -- as computed (as a power of two) by the compiler.
4381
4382 -- SPARK_Aux_Pragma
4383 -- Present in concurrent type, [generic] package spec and package body
4384 -- entities. For concurrent types and package specs it refers to the
4385 -- SPARK mode setting for the private part. This field points to the
4386 -- N_Pragma node that either appears in the private part or is inherited
4387 -- from the enclosing context. For package bodies, it refers to the SPARK
4388 -- mode of the elaboration sequence after the BEGIN. The fields points to
4389 -- the N_Pragma node that either appears in the statement sequence or is
4390 -- inherited from the enclosing context. In all cases, if the pragma is
4391 -- inherited, then the SPARK_Aux_Pragma_Inherited flag is set.
4392
4393 -- SPARK_Aux_Pragma_Inherited
4394 -- Present in concurrent type, [generic] package spec and package body
4395 -- entities. Set if the SPARK_Aux_Pragma field points to a pragma that is
4396 -- inherited, rather than a local one.
4397
4398 -- SPARK_Pragma
4399 -- Present in the following entities:
4400 --
4401 -- abstract states
4402 -- constants
4403 -- entries
4404 -- operators
4405 -- [generic] packages
4406 -- package bodies
4407 -- [generic] subprograms
4408 -- subprogram bodies
4409 -- variables
4410 -- types
4411 --
4412 -- Points to the N_Pragma node that applies to the initial declaration or
4413 -- body. This is either set by a local SPARK_Mode pragma or is inherited
4414 -- from the context (from an outer scope for the spec case or from the
4415 -- spec for the body case). In the case where the attribute is inherited,
4416 -- flag SPARK_Pragma_Inherited is set. Empty if no SPARK_Mode pragma is
4417 -- applicable.
4418
4419 -- SPARK_Pragma_Inherited
4420 -- Present in the following entities:
4421 --
4422 -- abstract states
4423 -- constants
4424 -- entries
4425 -- operators
4426 -- [generic] packages
4427 -- package bodies
4428 -- [generic] subprograms
4429 -- subprogram bodies
4430 -- variables
4431 -- types
4432 --
4433 -- Set if the SPARK_Pragma attribute points to an inherited pragma rather
4434 -- than a local one.
4435
4436 -- Spec_Entity
4437 -- Defined in package body entities. Points to corresponding package
4438 -- spec entity. Also defined in subprogram body parameters in the
4439 -- case where there is a separate spec, where this field references
4440 -- the corresponding parameter entities in the spec.
4441
4442 -- SSO_Set_High_By_Default [base type only]
4443 -- Defined for record and array types. Set in the base type if a pragma
4444 -- Default_Scalar_Storage_Order (High_Order_First) was active at the time
4445 -- the record or array was declared and therefore applies to it.
4446
4447 -- SSO_Set_Low_By_Default [base type only]
4448 -- Defined for record and array types. Set in the base type if a pragma
4449 -- Default_Scalar_Storage_Order (High_Order_First) was active at the time
4450 -- the record or array was declared and therefore applies to it.
4451
4452 -- Static_Call_Helper
4453 -- Defined on subprogram entities. Set if the subprogram has class-wide
4454 -- preconditions. Denotes the helper that evaluates at runtime the
4455 -- class-wide preconditions performing static calls.
4456
4457 -- Static_Discrete_Predicate
4458 -- Defined in discrete types/subtypes with static predicates (with the
4459 -- two flags Has_Predicates and Has_Static_Predicate set). Set if the
4460 -- type/subtype has a static predicate. Points to a list of expression
4461 -- and N_Range nodes that represent the predicate in canonical form. The
4462 -- canonical form has entries sorted in ascending order, with duplicates
4463 -- eliminated, and adjacent ranges coalesced, so that there is always a
4464 -- gap in the values between successive entries. The entries in this list
4465 -- are fully analyzed and typed with the base type of the subtype. Note
4466 -- that all entries are static and have values within the subtype range.
4467
4468 -- Static_Elaboration_Desired
4469 -- Defined in library-level packages. Set by the pragma of the same
4470 -- name, to indicate that static initialization must be attempted for
4471 -- all types declared in the package, and that a warning must be emitted
4472 -- for those types to which static initialization is not available.
4473
4474 -- Static_Initialization
4475 -- Defined in initialization procedures for types whose objects can be
4476 -- initialized statically. The value of this attribute is a positional
4477 -- aggregate whose components are compile-time static values. Used
4478 -- when available in object declarations to eliminate the call to the
4479 -- initialization procedure, and to minimize elaboration code. Note:
4480 -- This attribute uses the same field as Overridden_Operation, which is
4481 -- irrelevant in init_procs.
4482
4483 -- Static_Real_Or_String_Predicate
4484 -- Defined in real types/subtypes with static predicates (with the two
4485 -- flags Has_Predicates and Has_Static_Predicate set). Set if the type
4486 -- or subtype has a static predicate. Points to the return expression
4487 -- of the predicate function. This is the original expression given as
4488 -- the predicate except that occurrences of the type are replaced by
4489 -- occurrences of the formal parameter of the predicate function (note
4490 -- that the spec of this function including this formal parameter name
4491 -- is available from the Subprograms_For_Type field; it can be accessed
4492 -- as Predicate_Function (typ)). Also, in the case where a predicate is
4493 -- inherited, the expression is of the form:
4494 --
4495 -- xxxPredicate (typ2 (ent)) AND THEN expression
4496 --
4497 -- where typ2 is the type from which the predicate is inherited, ent is
4498 -- the entity for the current predicate function, and xxxPredicate is the
4499 -- inherited predicate (from typ2). Finally for a predicate that inherits
4500 -- from another predicate but does not add a predicate of its own, the
4501 -- expression may consist of the above xxxPredicate call on its own.
4502
4503 -- Status_Flag_Or_Transient_Decl
4504 -- Defined in constant, loop, and variable entities. Applies to objects
4505 -- that require special treatment by the finalization machinery, such as
4506 -- extended return results, IF and CASE expression results, and objects
4507 -- inside N_Expression_With_Actions nodes. The attribute contains the
4508 -- entity of a flag which specifies particular behavior over a region of
4509 -- code or the declaration of a "hook" object.
4510 -- In which case is it a flag, or a hook object???
4511
4512 -- Storage_Size_Variable [implementation base type only]
4513 -- Defined in access types and task type entities. This flag is set
4514 -- if a valid and effective pragma Storage_Size applies to the base
4515 -- type. Points to the entity for a variable that is created to
4516 -- hold the value given in a Storage_Size pragma for an access
4517 -- collection or a task type. Note that in the access type case,
4518 -- this field is defined only in the root type (since derived types
4519 -- share the same storage pool).
4520
4521 -- Stored_Constraint
4522 -- Defined in entities that can have discriminants (concurrent types
4523 -- subtypes, record types and subtypes, private types and subtypes,
4524 -- limited private types and subtypes and incomplete types). Points
4525 -- to an element list containing the expressions for each of the
4526 -- stored discriminants for the record (sub)type.
4527
4528 -- Stores_Attribute_Old_Prefix
4529 -- Defined in constants, variables, and types which are created during
4530 -- expansion in order to save the value of attribute 'Old's prefix.
4531
4532 -- Strict_Alignment [implementation base type only]
4533 -- Defined in all type entities. Indicates that the type is by-reference
4534 -- or contains an aliased part. This forbids packing a component of this
4535 -- type tighter than the alignment and size of the type, as specified by
4536 -- RM 13.2(7) modified by AI12-001 as a Binding Interpretation.
4537
4538 -- String_Literal_Length
4539 -- Defined in string literal subtypes (which are created to correspond
4540 -- to string literals in the program). Contains the length of the string
4541 -- literal.
4542
4543 -- String_Literal_Low_Bound
4544 -- Defined in string literal subtypes (which are created to correspond
4545 -- to string literals in the program). Contains an expression whose
4546 -- value represents the low bound of the literal. This is a copy of
4547 -- the low bound of the applicable index constraint if there is one,
4548 -- or a copy of the low bound of the index base type if not.
4549
4550 -- Subprograms_For_Type
4551 -- Defined in all types. The list may contain the entities of the default
4552 -- initial condition procedure, invariant procedure, and the two versions
4553 -- of the predicate function.
4554 --
4555 -- Historical note: This attribute used to be a direct linked list of
4556 -- entities rather than an Elist. The Elist allows greater flexibility
4557 -- in inheritance of subprograms between views of the same type.
4558
4559 -- Subps_Index
4560 -- Present in subprogram entities. Set if the subprogram contains nested
4561 -- subprograms, or is a subprogram nested within such a subprogram. Holds
4562 -- the index in the Exp_Unst.Subps table for the subprogram. Note that
4563 -- for the outer level subprogram, this is the starting index in the Subp
4564 -- table for the entries for this subprogram.
4565
4566 -- Suppress_Elaboration_Warnings
4567 -- NOTE: this flag is relevant only for the legacy ABE mechanism and
4568 -- should not be used outside of that context.
4569 --
4570 -- Defined in all entities, can be set only for subprogram entities and
4571 -- for variables. If this flag is set then Sem_Elab will not generate
4572 -- elaboration warnings for the subprogram or variable. Suppression of
4573 -- such warnings is automatic for subprograms for which elaboration
4574 -- checks are suppressed (without the need to set this flag), but the
4575 -- flag is also set for various internal entities (such as init procs)
4576 -- which are known not to generate any possible access before elaboration
4577 -- and it is set on variables when a warning is given to avoid multiple
4578 -- elaboration warnings for the same variable.
4579
4580 -- Suppress_Initialization
4581 -- Defined in all variable, type and subtype entities. If set for a base
4582 -- type, then the generation of initialization procedures is suppressed
4583 -- for the type. Any other implicit initialization (e.g. from the use of
4584 -- pragma Initialize_Scalars) is also suppressed if this flag is set for
4585 -- either the subtype in question, or for the base type. For variables,
4586 -- this flag suppresses all implicit initialization for the object, even
4587 -- if the type would normally require initialization. Set by use of
4588 -- pragma Suppress_Initialization and also for internal entities where
4589 -- we know that no initialization is required. For example, enumeration
4590 -- image table entities set it.
4591
4592 -- Suppress_Style_Checks
4593 -- Defined in all entities. Suppresses any style checks specifically
4594 -- associated with the given entity if set.
4595
4596 -- Suppress_Value_Tracking_On_Call
4597 -- Defined in all entities. Set in a scope entity if value tracking is to
4598 -- be suppressed on any call within the scope. Used when an access to a
4599 -- local subprogram is computed, to deal with the possibility that this
4600 -- value may be passed around, and if used, may clobber a local variable.
4601
4602 -- Task_Body_Procedure
4603 -- Defined in task types and subtypes. Points to the entity for the task
4604 -- task body procedure (as further described in Exp_Ch9, task bodies are
4605 -- expanded into procedures). A convenient function to retrieve this
4606 -- field is Sem_Util.Get_Task_Body_Procedure.
4607 --
4608 -- The last sentence is odd??? Why not have Task_Body_Procedure go to the
4609 -- Underlying_Type of the Root_Type???
4610
4611 -- Thunk_Entity
4612 -- Defined in functions and procedures which have been classified as
4613 -- Is_Thunk. Set to the target entity called by the thunk.
4614
4615 -- Treat_As_Volatile
4616 -- Defined in all type entities, and also in constants, components and
4617 -- variables. Set if this entity is to be treated as volatile for code
4618 -- generation purposes. Always set if Is_Volatile is set, but can also
4619 -- be set as a result of situations (such as address overlays) where
4620 -- the front end wishes to force volatile handling to inhibit aliasing
4621 -- optimization which might be legally ok, but is undesirable. Note
4622 -- that the backend always tests this flag rather than Is_Volatile.
4623 -- The front end tests Is_Volatile if it is concerned with legality
4624 -- checks associated with declared volatile variables, but if the test
4625 -- is for the purposes of suppressing optimizations, then the front
4626 -- end should test Treat_As_Volatile rather than Is_Volatile.
4627 --
4628 -- Note: before testing Treat_As_Volatile, consider whether it would
4629 -- be more appropriate to use Exp_Util.Is_Volatile_Reference instead,
4630 -- which catches more cases of volatile references.
4631
4632 -- Type_High_Bound (synthesized)
4633 -- Applies to scalar types. Returns the tree node (Node_Id) that contains
4634 -- the high bound of a scalar type. The returned value is literal for a
4635 -- base type, but may be an expression in the case of scalar type with
4636 -- dynamic bounds.
4637
4638 -- Type_Low_Bound (synthesized)
4639 -- Applies to scalar types. Returns the tree node (Node_Id) that contains
4640 -- the low bound of a scalar type. The returned value is literal for a
4641 -- base type, but may be an expression in the case of scalar type with
4642 -- dynamic bounds.
4643
4644 -- Underlying_Full_View
4645 -- Defined in private subtypes that are the completion of other private
4646 -- types, or in private types that are derived from private subtypes. If
4647 -- the full view of a private type T is derived from another private type
4648 -- with discriminants Td, the full view of T is also private, and there
4649 -- is no way to attach to it a further full view that would convey the
4650 -- structure of T to the backend. The Underlying_Full_View is an
4651 -- attribute of the full view that is a subtype of Td with the same
4652 -- constraint as the declaration for T. The declaration for this subtype
4653 -- is built at the point of the declaration of T, either as completion,
4654 -- or as a subtype declaration where the base type is private and has a
4655 -- private completion. If Td is already constrained, then its full view
4656 -- can serve directly as the full view of T.
4657
4658 -- Underlying_Record_View
4659 -- Defined in record types. Set for record types that are extensions of
4660 -- types with unknown discriminants, and also set for internally built
4661 -- underlying record views to reference its original record type. Record
4662 -- types that are extensions of types with unknown discriminants do not
4663 -- have a completion, but they cannot be used without having some
4664 -- discriminated view at hand. This view is a record type with the same
4665 -- structure, whose parent type is the full view of the parent in the
4666 -- original type extension.
4667
4668 -- Underlying_Type (synthesized)
4669 -- Applies to all entities. This is the identity function except in the
4670 -- case where it is applied to an incomplete or private type, in which
4671 -- case it is the underlying type of the type declared by the completion,
4672 -- or Empty if the completion has not yet been encountered and analyzed.
4673 --
4674 -- Note: the reason this attribute applies to all entities, and not just
4675 -- types, is to legitimize code where Underlying_Type is applied to an
4676 -- entity which may or may not be a type, with the intent that if it is a
4677 -- type, its underlying type is taken.
4678 --
4679 -- Note also that the value of this attribute is interesting only after
4680 -- the full view of the parent type has been processed. If the parent
4681 -- type is declared in an enclosing package, the attribute will be non-
4682 -- trivial only after the full view of the type has been analyzed.
4683
4684 -- Universal_Aliasing [implementation base type only]
4685 -- Defined in all type entities. Set to direct the back-end to avoid
4686 -- any optimizations based on type-based alias analysis for this type.
4687 -- Indicates that objects of this type can alias objects of any other
4688 -- types, which guarantees that any objects can be referenced through
4689 -- access types designating this type safely, whatever the actual type
4690 -- of these objects. In other words, the effect is as though access
4691 -- types designating this type were subject to No_Strict_Aliasing.
4692
4693 -- Unset_Reference
4694 -- Defined in variables and out parameters. This is normally Empty. It
4695 -- is set to point to an identifier that represents a reference to the
4696 -- entity before any value has been set. Only the first such reference
4697 -- is identified. This field is used to generate a warning message if
4698 -- necessary (see Sem_Warn.Check_Unset_Reference).
4699
4700 -- Used_As_Generic_Actual
4701 -- Defined in all entities, set if the entity is used as an argument to
4702 -- a generic instantiation. Used to tune certain warning messages, and
4703 -- in checking type conformance within an instantiation that involves
4704 -- incomplete formal and actual types.
4705
4706 -- Uses_Lock_Free
4707 -- Defined in protected type entities. Set to True when the Lock Free
4708 -- implementation is used for the protected type. This implementation is
4709 -- based on atomic transactions and doesn't require anymore the use of
4710 -- Protection object (see System.Tasking.Protected_Objects).
4711
4712 -- Uses_Sec_Stack
4713 -- Defined in scope entities (blocks, entries, entry families, functions,
4714 -- loops, and procedures). Set to True when the secondary stack is used
4715 -- in this scope and must be released on exit unless flag
4716 -- Sec_Stack_Needed_For_Return is set.
4717
4718 -- Validated_Object
4719 -- Defined in variables. Contains the object whose value is captured by
4720 -- the variable for validity check purposes.
4721
4722 -- Warnings_Off
4723 -- Defined in all entities. Set if a pragma Warnings (Off, entity-name)
4724 -- is used to suppress warnings for a given entity. It is also used by
4725 -- the compiler in some situations to kill spurious warnings. Note that
4726 -- clients should generally not test this flag directly, but instead
4727 -- use function Has_Warnings_Off.
4728
4729 -- Warnings_Off_Used
4730 -- Defined in all entities. Can only be set if Warnings_Off is set. If
4731 -- set indicates that a warning was suppressed by the Warnings_Off flag,
4732 -- and Unmodified/Unreferenced would not have suppressed the warning.
4733
4734 -- Warnings_Off_Used_Unmodified
4735 -- Defined in all entities. Can only be set if Warnings_Off is set and
4736 -- Has_Pragma_Unmodified is not set. If set indicates that a warning was
4737 -- suppressed by the Warnings_Off status but that pragma Unmodified
4738 -- would also have suppressed the warning.
4739
4740 -- Warnings_Off_Used_Unreferenced
4741 -- Defined in all entities. Can only be set if Warnings_Off is set and
4742 -- Has_Pragma_Unreferenced is not set. If set indicates that a warning
4743 -- was suppressed by the Warnings_Off status but that pragma Unreferenced
4744 -- would also have suppressed the warning.
4745
4746 -- Was_Hidden
4747 -- Defined in all entities. Used to save the value of the Is_Hidden
4748 -- attribute when the limited-view is installed (Ada 2005: AI-217).
4749
4750 -- Wrapped_Entity
4751 -- Defined in functions and procedures which have been classified as
4752 -- Is_Primitive_Wrapper. Set to the entity being wrapper.
4753
4754 -- LSP_Subprogram
4755 -- Defined in subprogram entities. Set on wrappers created to handle
4756 -- inherited class-wide pre/post conditions that call overridden
4757 -- primitives. It references the parent primitive that has the
4758 -- class-wide pre/post conditions.
4759
4760 ---------------------------
4761 -- Renaming and Aliasing --
4762 ---------------------------
4763
4764 -- Several entity attributes relate to renaming constructs, and to the use of
4765 -- different names to refer to the same entity. The following is a summary of
4766 -- these constructs and their preferred uses.
4767
4768 -- There are three related attributes:
4769
4770 -- Renamed_Entity
4771 -- Renamed_Object
4772 -- Alias
4773
4774 -- These are implemented in Einfo.Utils as renamings of the Renamed_Or_Alias
4775 -- field. They are semantically related, and have the following intended uses:
4776
4777 -- a) Renamed_Entity applies to entities in renaming declarations that rename
4778 -- an entity, so the value of the attribute IS an entity. This applies to
4779 -- generic renamings, package renamings, exception renamings, and subprogram
4780 -- renamings that rename a subprogram (rather than an attribute, an entry, a
4781 -- protected operation, etc).
4782
4783 -- b) Alias applies to overloadable entities, and the value is an overloadable
4784 -- entity. So this is a subset of the previous one. We use the term Alias to
4785 -- cover both renamings and inherited operations, because both cases are
4786 -- handled in the same way when expanding a call. Namely the Alias of a given
4787 -- subprogram is the subprogram that will actually be called.
4788
4789 -- Both a) and b) are set transitively, so that in fact it is not necessary to
4790 -- traverse chains of renamings when looking for the original entity: it's
4791 -- there in one step (this is done when analyzing renaming declarations other
4792 -- than object renamings in sem_ch8).
4793
4794 -- c) Renamed_Object applies to constants and variables. Given that the name
4795 -- in an object renaming declaration is not necessarily an entity name, the
4796 -- value of the attribute is the tree for that name, eg AR (1).Comp. The case
4797 -- when that name is in fact an entity is not handled specially. This is why
4798 -- in a few cases we need to use a loop to trace a chain of object renamings
4799 -- where all of them happen to be entities. So:
4800
4801 -- X : Integer;
4802 -- Y : Integer renames X; -- renamed object is the identifier X
4803 -- Z : Integer renames Y; -- renamed object is the identifier Y
4804
4805 -- The front-end does not store explicitly the fact that Z renames X.
4806
4807 --------------------------------------
4808 -- Delayed Freezing and Elaboration --
4809 --------------------------------------
4810
4811 -- The flag Has_Delayed_Freeze indicates that an entity carries an explicit
4812 -- freeze node, which appears later in the expanded tree.
4813
4814 -- a) The flag is used by the front-end to trigger expansion actions
4815 -- which include the generation of that freeze node. Typically this happens at
4816 -- the end of the current compilation unit, or before the first subprogram
4817 -- body is encountered in the current unit. See files freeze and exp_ch13 for
4818 -- details on the actions triggered by a freeze node, which include the
4819 -- construction of initialization procedures and dispatch tables.
4820
4821 -- b) The flag is used by the backend to defer elaboration of the entity until
4822 -- its freeze node is seen. In the absence of an explicit freeze node, an
4823 -- entity is frozen (and elaborated) at the point of declaration.
4824
4825 -- For object declarations, the flag is set when an address clause for the
4826 -- object is encountered. Legality checks on the address expression only
4827 -- take place at the freeze point of the object.
4828
4829 -- Most types have an explicit freeze node, because they cannot be elaborated
4830 -- until all representation and operational items that apply to them have been
4831 -- analyzed. Private types and incomplete types have the flag set as well, as
4832 -- do task and protected types.
4833
4834 -- Implicit base types created for type derivations, as well as classwide
4835 -- types created for all tagged types, have the flag set.
4836
4837 -- If a subprogram has an access parameter whose designated type is incomplete
4838 -- the subprogram has the flag set.
4839
4840 ------------------
4841 -- Access Kinds --
4842 ------------------
4843
4844 -- The following entity kinds are introduced by the corresponding type
4845 -- definitions:
4846
4847 -- E_Access_Type,
4848 -- E_General_Access_Type,
4849 -- E_Anonymous_Access_Type
4850
4851 -- E_Access_Subprogram_Type,
4852 -- E_Anonymous_Access_Subprogram_Type,
4853
4854 -- E_Access_Protected_Subprogram_Type,
4855 -- E_Anonymous_Access_Protected_Subprogram_Type
4856
4857 -- E_Access_Subtype is for an access subtype created by a subtype declaration
4858
4859 -- In addition, we define the kind E_Allocator_Type to label allocators.
4860 -- This is because special resolution rules apply to this construct.
4861 -- Eventually the constructs are labeled with the access type imposed by
4862 -- the context. The backend should never see types with this Ekind.
4863
4864 -- Similarly, we define the kind E_Access_Attribute_Type as the initial
4865 -- kind associated with an access attribute whose prefix is an object.
4866 -- After resolution, a specific access type will be established instead
4867 -- as determined by the context. Note that, for the case of an access
4868 -- attribute whose prefix is a subprogram, we build a corresponding type
4869 -- with E_Access_Subprogram_Type or E_Access_Protected_Subprogram_Type kind
4870 -- but whose designated type is the subprogram itself, instead of a regular
4871 -- E_Subprogram_Type entity.
4872
4873 --------------------------------------------------------
4874 -- Description of Defined Attributes for Entity_Kinds --
4875 --------------------------------------------------------
4876
4877 -- For each enumeration value defined in Entity_Kind we list all the
4878 -- attributes defined in Einfo which can legally be applied to an entity
4879 -- of that kind. The implementation of the attribute functions (and for
4880 -- non-synthesized attributes, of the corresponding set procedures) are
4881 -- in the Einfo body.
4882
4883 -- The following attributes are defined in all entities
4884
4885 -- Ekind (Ekind)
4886
4887 -- Chars
4888 -- Next_Entity
4889 -- Scope
4890 -- Homonym
4891 -- Etype
4892 -- First_Rep_Item
4893 -- Freeze_Node
4894 -- Prev_Entity
4895 -- Associated_Entity
4896
4897 -- Address_Taken
4898 -- Can_Never_Be_Null
4899 -- Checks_May_Be_Suppressed
4900 -- Debug_Info_Off
4901 -- Has_Convention_Pragma
4902 -- Has_Delayed_Aspects
4903 -- Has_Delayed_Freeze
4904 -- Has_Fully_Qualified_Name
4905 -- Has_Gigi_Rep_Item
4906 -- Has_Homonym
4907 -- Has_Pragma_Elaborate_Body
4908 -- Has_Pragma_Inline
4909 -- Has_Pragma_Inline_Always
4910 -- Has_Pragma_No_Inline
4911 -- Has_Pragma_Pure
4912 -- Has_Pragma_Pure_Function
4913 -- Has_Pragma_Thread_Local_Storage
4914 -- Has_Pragma_Unmodified
4915 -- Has_Pragma_Unreferenced
4916 -- Has_Pragma_Unused
4917 -- Has_Private_Declaration
4918 -- Has_Qualified_Name
4919 -- Has_Stream_Size_Clause
4920 -- Has_Unknown_Discriminants
4921 -- Has_Xref_Entry
4922 -- In_Private_Part
4923 -- Is_Ada_2005_Only
4924 -- Is_Ada_2012_Only
4925 -- Is_Ada_2022_Only
4926 -- Is_Bit_Packed_Array (base type only)
4927 -- Is_Aliased
4928 -- Is_Character_Type
4929 -- Is_Checked_Ghost_Entity
4930 -- Is_Child_Unit
4931 -- Is_Compilation_Unit
4932 -- Is_Descendant_Of_Address
4933 -- Is_Discrim_SO_Function
4934 -- Is_Discriminant_Check_Function
4935 -- Is_Dispatch_Table_Entity
4936 -- Is_Dispatch_Table_Wrapper
4937 -- Is_Dispatching_Operation
4938 -- Is_Entry_Formal
4939 -- Is_Exported
4940 -- Is_First_Subtype
4941 -- Is_Formal_Subprogram
4942 -- Is_Generic_Instance
4943 -- Is_Generic_Type
4944 -- Is_Hidden
4945 -- Is_Hidden_Open_Scope
4946 -- Is_Ignored_Ghost_Entity
4947 -- Is_Immediately_Visible
4948 -- Is_Implementation_Defined
4949 -- Is_Imported
4950 -- Is_Inlined
4951 -- Is_Internal
4952 -- Is_Itype
4953 -- Is_Known_Non_Null
4954 -- Is_Known_Null
4955 -- Is_Known_Valid
4956 -- Is_Limited_Composite
4957 -- Is_Limited_Record
4958 -- Is_Loop_Parameter
4959 -- Is_Obsolescent
4960 -- Is_Package_Body_Entity
4961 -- Is_Packed_Array_Impl_Type
4962 -- Is_Potentially_Use_Visible
4963 -- Is_Preelaborated
4964 -- Is_Primitive_Wrapper
4965 -- Is_Public
4966 -- Is_Pure
4967 -- Is_Remote_Call_Interface
4968 -- Is_Remote_Types
4969 -- Is_Renaming_Of_Object
4970 -- Is_Shared_Passive
4971 -- Is_Statically_Allocated
4972 -- Is_Static_Type
4973 -- Is_Tagged_Type
4974 -- Is_Thunk
4975 -- Is_Trivial_Subprogram
4976 -- Is_Unchecked_Union
4977 -- Is_Unimplemented
4978 -- Is_Visible_Formal
4979 -- Kill_Elaboration_Checks
4980 -- Kill_Range_Checks
4981 -- Low_Bound_Tested
4982 -- Materialize_Entity
4983 -- Needs_Debug_Info
4984 -- Never_Set_In_Source
4985 -- No_Return
4986 -- Overlays_Constant
4987 -- Referenced
4988 -- Referenced_As_LHS
4989 -- Referenced_As_Out_Parameter
4990 -- Suppress_Elaboration_Warnings
4991 -- Suppress_Style_Checks
4992 -- Suppress_Value_Tracking_On_Call
4993 -- Used_As_Generic_Actual
4994 -- Warnings_Off
4995 -- Warnings_Off_Used
4996 -- Warnings_Off_Used_Unmodified
4997 -- Warnings_Off_Used_Unreferenced
4998 -- Was_Hidden
4999
5000 -- Declaration_Node (synth)
5001 -- Has_Foreign_Convention (synth)
5002 -- Is_Dynamic_Scope (synth)
5003 -- Is_Ghost_Entity (synth)
5004 -- Is_Standard_Character_Type (synth)
5005 -- Is_Standard_String_Type (synth)
5006 -- Underlying_Type (synth)
5007 -- all classification attributes (synth)
5008
5009 -- The following list of access functions applies to all entities for
5010 -- types and subtypes. References to this list appear subsequently as
5011 -- "(plus type attributes)" for each appropriate Entity_Kind.
5012
5013 -- Associated_Node_For_Itype
5014 -- Class_Wide_Type
5015 -- Full_View
5016 -- Esize
5017 -- RM_Size
5018 -- Alignment
5019 -- Pending_Access_Types
5020 -- Related_Expression
5021 -- Current_Use_Clause
5022 -- Subprograms_For_Type
5023 -- Derived_Type_Link
5024 -- No_Tagged_Streams_Pragma
5025 -- Linker_Section_Pragma
5026 -- SPARK_Pragma
5027
5028 -- Depends_On_Private
5029 -- Disable_Controlled
5030 -- Discard_Names
5031 -- Finalize_Storage_Only (base type only)
5032 -- From_Limited_With
5033 -- Has_Aliased_Components (base type only)
5034 -- Has_Alignment_Clause
5035 -- Has_Atomic_Components (base type only)
5036 -- Has_Completion_In_Body
5037 -- Has_Complex_Representation (base type only)
5038 -- Has_Constrained_Partial_View
5039 -- Has_Controlled_Component (base type only)
5040 -- Has_Default_Aspect (base type only)
5041 -- Has_Delayed_Rep_Aspects
5042 -- Has_Discriminants
5043 -- Has_Dynamic_Predicate_Aspect
5044 -- Has_Independent_Components (base type only)
5045 -- Has_Inheritable_Invariants (base type only)
5046 -- Has_Inherited_DIC (base type only)
5047 -- Has_Inherited_Invariants (base type only)
5048 -- Has_Non_Standard_Rep (base type only)
5049 -- Has_Object_Size_Clause
5050 -- Has_Own_DIC (base type only)
5051 -- Has_Own_Invariants (base type only)
5052 -- Has_Pragma_Preelab_Init
5053 -- Has_Pragma_Unreferenced_Objects
5054 -- Has_Predicates
5055 -- Has_Primitive_Operations (base type only)
5056 -- Has_Protected (base type only)
5057 -- Has_Size_Clause
5058 -- Has_Specified_Layout (base type only)
5059 -- Has_Specified_Stream_Input
5060 -- Has_Specified_Stream_Output
5061 -- Has_Specified_Stream_Read
5062 -- Has_Specified_Stream_Write
5063 -- Has_Static_Predicate
5064 -- Has_Static_Predicate_Aspect
5065 -- Has_Task (base type only)
5066 -- Has_Timing_Event (base type only)
5067 -- Has_Unchecked_Union (base type only)
5068 -- Has_Volatile_Components (base type only)
5069 -- In_Use
5070 -- Is_Abstract_Type
5071 -- Is_Asynchronous
5072 -- Is_Atomic
5073 -- Is_Constr_Subt_For_U_Nominal
5074 -- Is_Constr_Subt_For_UN_Aliased
5075 -- Is_Controlled_Active (base type only)
5076 -- Is_Eliminated
5077 -- Is_Frozen
5078 -- Is_Generic_Actual_Type
5079 -- Is_Independent
5080 -- Is_Non_Static_Subtype
5081 -- Is_Packed (base type only)
5082 -- Is_Private_Composite
5083 -- Is_RACW_Stub_Type
5084 -- Is_Unsigned_Type
5085 -- Is_Volatile
5086 -- Is_Volatile_Full_Access
5087 -- Itype_Printed (itypes only)
5088 -- Known_To_Have_Preelab_Init
5089 -- May_Inherit_Delayed_Rep_Aspects
5090 -- Must_Be_On_Byte_Boundary
5091 -- Must_Have_Preelab_Init
5092 -- Optimize_Alignment_Space
5093 -- Optimize_Alignment_Time
5094 -- Partial_View_Has_Unknown_Discr
5095 -- Size_Depends_On_Discriminant
5096 -- Size_Known_At_Compile_Time
5097 -- SPARK_Pragma_Inherited
5098 -- Strict_Alignment (base type only)
5099 -- Suppress_Initialization
5100 -- Treat_As_Volatile
5101 -- Universal_Aliasing (impl base type only)
5102
5103 -- Alignment_Clause (synth)
5104 -- Base_Type (synth)
5105 -- DIC_Procedure (synth)
5106 -- Has_DIC (synth)
5107 -- Has_Invariants (synth)
5108 -- Implementation_Base_Type (synth)
5109 -- Invariant_Procedure (synth)
5110 -- Is_Access_Protected_Subprogram_Type (synth)
5111 -- Is_Full_Access (synth)
5112 -- Is_Controlled (synth)
5113 -- Object_Size_Clause (synth)
5114 -- Partial_DIC_Procedure (synth)
5115 -- Partial_Invariant_Procedure (synth)
5116 -- Predicate_Function (synth)
5117 -- Root_Type (synth)
5118 -- Size_Clause (synth)
5119
5120 ------------------------------------------
5121 -- Applicable attributes by entity kind --
5122 ------------------------------------------
5123
5124 -- In the conversion to variable-sized nodes and entities, a number of
5125 -- discrepancies were noticed. They are documented in comments, and marked
5126 -- with "$$$".
5127
5128 -- E_Abstract_State
5129 -- Refinement_Constituents
5130 -- Part_Of_Constituents
5131 -- Body_References
5132 -- Non_Limited_View
5133 -- Encapsulating_State
5134 -- SPARK_Pragma
5135 -- From_Limited_With
5136 -- Has_Partial_Visible_Refinement
5137 -- Has_Visible_Refinement
5138 -- SPARK_Pragma_Inherited
5139 -- First_Entity $$$
5140 -- Has_Non_Limited_View (synth)
5141 -- Has_Non_Null_Visible_Refinement (synth)
5142 -- Has_Null_Visible_Refinement (synth)
5143 -- Is_External_State (synth)
5144 -- Is_Null_State (synth)
5145 -- Is_Relaxed_Initialization_State (synth)
5146 -- Is_Synchronized_State (synth)
5147 -- Partial_Refinement_Constituents (synth)
5148
5149 -- E_Access_Protected_Subprogram_Type
5150 -- Equivalent_Type
5151 -- Directly_Designated_Type
5152 -- Needs_No_Actuals
5153 -- Can_Use_Internal_Rep
5154 -- (plus type attributes)
5155
5156 -- E_Access_Subprogram_Type
5157 -- Equivalent_Type (remote types only)
5158 -- Directly_Designated_Type
5159 -- Needs_No_Actuals
5160 -- Original_Access_Type
5161 -- Can_Use_Internal_Rep
5162 -- Needs_Activation_Record
5163 -- Associated_Storage_Pool $$$
5164 -- Interface_Name $$$
5165 -- (plus type attributes)
5166
5167 -- E_Access_Type
5168 -- E_Access_Subtype
5169 -- Direct_Primitive_Operations $$$ type
5170 -- Master_Id
5171 -- Directly_Designated_Type
5172 -- Associated_Storage_Pool (base type only)
5173 -- Finalization_Master (base type only)
5174 -- Storage_Size_Variable (base type only)
5175 -- Has_Pragma_Controlled (base type only)
5176 -- Has_Storage_Size_Clause (base type only)
5177 -- Is_Access_Constant
5178 -- Is_Local_Anonymous_Access
5179 -- Is_Pure_Unit_Access_Type
5180 -- No_Pool_Assigned (base type only)
5181 -- No_Strict_Aliasing (base type only)
5182 -- Is_Param_Block_Component_Type (base type only)
5183 -- (plus type attributes)
5184
5185 -- E_Access_Attribute_Type
5186 -- Renamed_Entity $$$
5187 -- Directly_Designated_Type
5188 -- (plus type attributes)
5189
5190 -- E_Allocator_Type
5191 -- Directly_Designated_Type
5192 -- Associated_Storage_Pool $$$
5193 -- (plus type attributes)
5194
5195 -- E_Anonymous_Access_Subprogram_Type
5196 -- E_Anonymous_Access_Protected_Subprogram_Type
5197 -- Interface_Name $$$ E_Anonymous_Access_Subprogram_Type
5198 -- Directly_Designated_Type
5199 -- Storage_Size_Variable is this needed ???
5200 -- Can_Use_Internal_Rep
5201 -- Needs_Activation_Record
5202 -- (plus type attributes)
5203
5204 -- E_Anonymous_Access_Type
5205 -- Directly_Designated_Type
5206 -- Finalization_Master
5207 -- Storage_Size_Variable is this needed ???
5208 -- Associated_Storage_Pool $$$
5209 -- (plus type attributes)
5210
5211 -- E_Array_Type
5212 -- E_Array_Subtype
5213 -- First_Entity $$$
5214 -- Direct_Primitive_Operations $$$ subtype
5215 -- Renamed_Object $$$ E_Array_Subtype
5216 -- First_Index
5217 -- Default_Aspect_Component_Value (base type only)
5218 -- Component_Type (base type only)
5219 -- Original_Array_Type
5220 -- Component_Size (base type only)
5221 -- Packed_Array_Impl_Type
5222 -- Related_Array_Object
5223 -- Predicated_Parent (subtype only)
5224 -- Component_Alignment (special) (base type only)
5225 -- Has_Component_Size_Clause (base type only)
5226 -- Has_Pragma_Pack (impl base type only)
5227 -- Is_Constrained
5228 -- Reverse_Storage_Order (base type only)
5229 -- SSO_Set_High_By_Default (base type only)
5230 -- SSO_Set_Low_By_Default (base type only)
5231 -- Next_Index (synth)
5232 -- Number_Dimensions (synth)
5233 -- (plus type attributes)
5234
5235 -- E_Block
5236 -- Renamed_Entity $$$
5237 -- Renamed_Object $$$
5238 -- Return_Applies_To
5239 -- Block_Node
5240 -- First_Entity
5241 -- Last_Entity
5242 -- Scope_Depth_Value
5243 -- Entry_Cancel_Parameter
5244 -- Contains_Ignored_Ghost_Code
5245 -- Delay_Cleanups
5246 -- Discard_Names
5247 -- Has_Master_Entity
5248 -- Has_Nested_Block_With_Handler
5249 -- Is_Exception_Handler
5250 -- Sec_Stack_Needed_For_Return
5251 -- Uses_Sec_Stack
5252 -- Scope_Depth (synth)
5253
5254 -- E_Class_Wide_Type
5255 -- E_Class_Wide_Subtype
5256 -- Direct_Primitive_Operations
5257 -- Cloned_Subtype (subtype case only)
5258 -- First_Entity
5259 -- Equivalent_Type (always Empty for type)
5260 -- Non_Limited_View
5261 -- Last_Entity
5262 -- SSO_Set_High_By_Default (base type only)
5263 -- SSO_Set_Low_By_Default (base type only)
5264 -- Corresponding_Remote_Type $$$ type
5265 -- Renamed_Entity $$$ type
5266 -- First_Component (synth)
5267 -- First_Component_Or_Discriminant (synth)
5268 -- Has_Non_Limited_View (synth)
5269 -- (plus type attributes)
5270
5271 -- E_Component
5272 -- Linker_Section_Pragma $$$
5273 -- Normalized_First_Bit
5274 -- Current_Value (always Empty)
5275 -- Component_Bit_Offset
5276 -- Esize
5277 -- Component_Clause
5278 -- Normalized_Position
5279 -- DT_Entry_Count
5280 -- Entry_Formal
5281 -- Prival
5282 -- Renamed_Object (always Empty)
5283 -- Discriminant_Checking_Func
5284 -- Corresponding_Record_Component
5285 -- Original_Record_Component
5286 -- DT_Offset_To_Top_Func
5287 -- Related_Type
5288 -- Has_Biased_Representation
5289 -- Has_Per_Object_Constraint
5290 -- Is_Atomic
5291 -- Is_Independent
5292 -- Is_Return_Object
5293 -- Is_Tag
5294 -- Is_Volatile
5295 -- Is_Volatile_Full_Access
5296 -- Treat_As_Volatile
5297 -- Is_Full_Access (synth)
5298 -- Next_Component (synth)
5299 -- Next_Component_Or_Discriminant (synth)
5300
5301 -- E_Constant
5302 -- E_Loop_Parameter
5303 -- Current_Value (always Empty)
5304 -- Discriminal_Link
5305 -- Full_View
5306 -- Esize
5307 -- Extra_Accessibility (constants only)
5308 -- Alignment
5309 -- Status_Flag_Or_Transient_Decl
5310 -- Actual_Subtype
5311 -- Renamed_Object
5312 -- Renamed_Entity $$$
5313 -- Size_Check_Code (constants only)
5314 -- Prival_Link (privals only)
5315 -- Interface_Name (constants only)
5316 -- Related_Type (constants only)
5317 -- Initialization_Statements
5318 -- BIP_Initialization_Call
5319 -- Last_Aggregate_Assignment
5320 -- Activation_Record_Component
5321 -- Encapsulating_State (constants only)
5322 -- Linker_Section_Pragma
5323 -- Contract (constants only)
5324 -- SPARK_Pragma (constants only)
5325 -- Has_Alignment_Clause
5326 -- Has_Atomic_Components
5327 -- Has_Biased_Representation
5328 -- Has_Completion (constants only)
5329 -- Has_Independent_Components
5330 -- Has_Size_Clause
5331 -- Has_Thunks (constants only)
5332 -- Has_Volatile_Components
5333 -- Is_Atomic
5334 -- Is_Elaboration_Checks_OK_Id (constants only)
5335 -- Is_Elaboration_Warnings_OK_Id (constants only)
5336 -- Is_Eliminated
5337 -- Is_Finalized_Transient
5338 -- Is_Ignored_Transient
5339 -- Is_Independent
5340 -- Is_Return_Object
5341 -- Is_True_Constant
5342 -- Is_Uplevel_Referenced_Entity
5343 -- Is_Volatile
5344 -- Is_Volatile_Full_Access
5345 -- Optimize_Alignment_Space (constants only)
5346 -- Optimize_Alignment_Time (constants only)
5347 -- SPARK_Pragma_Inherited (constants only)
5348 -- Stores_Attribute_Old_Prefix (constants only)
5349 -- Treat_As_Volatile
5350 -- Address_Clause (synth)
5351 -- Alignment_Clause (synth)
5352 -- Is_Elaboration_Target (synth)
5353 -- Is_Full_Access (synth)
5354 -- Size_Clause (synth)
5355
5356 -- E_Decimal_Fixed_Point_Type
5357 -- E_Decimal_Fixed_Point_Subtype
5358 -- Scale_Value
5359 -- Digits_Value
5360 -- Scalar_Range
5361 -- Delta_Value
5362 -- Small_Value
5363 -- Static_Real_Or_String_Predicate
5364 -- Has_Machine_Radix_Clause
5365 -- Machine_Radix_10
5366 -- Aft_Value (synth)
5367 -- Type_Low_Bound (synth)
5368 -- Type_High_Bound (synth)
5369 -- (plus type attributes)
5370
5371 -- E_Discriminant
5372 -- Normalized_First_Bit
5373 -- Current_Value (always Empty)
5374 -- Component_Bit_Offset
5375 -- Esize
5376 -- Component_Clause
5377 -- Normalized_Position
5378 -- Discriminant_Number
5379 -- Discriminal
5380 -- Renamed_Object (always Empty)
5381 -- Corresponding_Discriminant
5382 -- Discriminant_Default_Value
5383 -- Corresponding_Record_Component
5384 -- Original_Record_Component
5385 -- CR_Discriminant
5386 -- Is_Completely_Hidden
5387 -- Is_Return_Object
5388 -- Entry_Formal $$$
5389 -- Linker_Section_Pragma $$$
5390 -- Next_Component_Or_Discriminant (synth)
5391 -- Next_Discriminant (synth)
5392 -- Next_Stored_Discriminant (synth)
5393
5394 -- E_Entry
5395 -- E_Entry_Family
5396 -- Protected_Body_Subprogram
5397 -- Barrier_Function
5398 -- Elaboration_Entity
5399 -- Postconditions_Proc
5400 -- Entry_Parameters_Type
5401 -- First_Entity
5402 -- Alias (for entry only. Empty)
5403 -- Last_Entity
5404 -- Accept_Address
5405 -- Scope_Depth_Value
5406 -- Protection_Object (protected kind)
5407 -- Contract_Wrapper
5408 -- Extra_Formals
5409 -- Contract
5410 -- SPARK_Pragma (protected kind)
5411 -- Default_Expressions_Processed
5412 -- Entry_Accepted
5413 -- Has_Yield_Aspect
5414 -- Has_Expanded_Contract
5415 -- Ignore_SPARK_Mode_Pragmas
5416 -- Is_Elaboration_Checks_OK_Id
5417 -- Is_Elaboration_Warnings_OK_Id
5418 -- Is_Entry_Wrapper
5419 -- Needs_No_Actuals
5420 -- Sec_Stack_Needed_For_Return
5421 -- SPARK_Pragma_Inherited (protected kind)
5422 -- Uses_Sec_Stack
5423 -- Renamed_Entity $$$
5424 -- Address_Clause (synth)
5425 -- Entry_Index_Type (synth)
5426 -- First_Formal (synth)
5427 -- First_Formal_With_Extras (synth)
5428 -- Is_Elaboration_Target (synth)
5429 -- Last_Formal (synth)
5430 -- Number_Formals (synth)
5431 -- Scope_Depth (synth)
5432
5433 -- E_Entry_Index_Parameter
5434 -- Entry_Index_Constant
5435
5436 -- E_Enumeration_Literal
5437 -- Enumeration_Pos
5438 -- Enumeration_Rep
5439 -- Alias
5440 -- Enumeration_Rep_Expr
5441 -- Interface_Name $$$
5442 -- Renamed_Object $$$
5443 -- Esize $$$
5444 -- Renamed_Entity $$$
5445 -- Next_Literal (synth)
5446
5447 -- E_Enumeration_Type
5448 -- E_Enumeration_Subtype
5449 -- First_Entity $$$ type
5450 -- Renamed_Object $$$
5451 -- Lit_Strings (root type only)
5452 -- First_Literal
5453 -- Lit_Indexes (root type only)
5454 -- Default_Aspect_Value (base type only)
5455 -- Scalar_Range
5456 -- Lit_Hash (root type only)
5457 -- Enum_Pos_To_Rep (type only)
5458 -- Static_Discrete_Predicate
5459 -- Has_Biased_Representation
5460 -- Has_Contiguous_Rep
5461 -- Has_Enumeration_Rep_Clause
5462 -- Has_Pragma_Ordered (base type only)
5463 -- Nonzero_Is_True (base type only)
5464 -- No_Predicate_On_Actual
5465 -- No_Dynamic_Predicate_On_Actual
5466 -- Type_Low_Bound (synth)
5467 -- Type_High_Bound (synth)
5468 -- (plus type attributes)
5469
5470 -- E_Exception
5471 -- Esize
5472 -- Alignment
5473 -- Renamed_Entity
5474 -- Register_Exception_Call
5475 -- Interface_Name
5476 -- Activation_Record_Component
5477 -- Discard_Names
5478 -- Is_Raised
5479 -- Renamed_Object $$$
5480
5481 -- E_Exception_Type
5482 -- Equivalent_Type
5483 -- (plus type attributes)
5484
5485 -- E_Floating_Point_Type
5486 -- E_Floating_Point_Subtype
5487 -- Digits_Value
5488 -- Float_Rep (Float_Rep_Kind)
5489 -- Default_Aspect_Value (base type only)
5490 -- Scalar_Range
5491 -- Static_Real_Or_String_Predicate
5492 -- Machine_Emax_Value (synth)
5493 -- Machine_Emin_Value (synth)
5494 -- Machine_Mantissa_Value (synth)
5495 -- Machine_Radix_Value (synth)
5496 -- Model_Emin_Value (synth)
5497 -- Model_Epsilon_Value (synth)
5498 -- Model_Mantissa_Value (synth)
5499 -- Model_Small_Value (synth)
5500 -- Safe_Emax_Value (synth)
5501 -- Safe_First_Value (synth)
5502 -- Safe_Last_Value (synth)
5503 -- Type_Low_Bound (synth)
5504 -- Type_High_Bound (synth)
5505 -- (plus type attributes)
5506
5507 -- E_Function
5508 -- E_Generic_Function
5509 -- Mechanism (Mechanism_Type)
5510 -- Handler_Records (non-generic case only)
5511 -- Protected_Body_Subprogram
5512 -- Next_Inlined_Subprogram
5513 -- Elaboration_Entity (not implicit /=)
5514 -- Postconditions_Proc (non-generic case only)
5515 -- DT_Position
5516 -- DTC_Entity
5517 -- First_Entity
5518 -- Alias (non-generic case only)
5519 -- Renamed_Entity
5520 -- Renamed_Object $$$
5521 -- Extra_Accessibility_Of_Result (non-generic case only)
5522 -- Last_Entity
5523 -- Interface_Name
5524 -- Scope_Depth_Value
5525 -- Generic_Renamings (for an instance)
5526 -- Inner_Instances (generic case only)
5527 -- Inner_Instances $$$ also E_Function
5528 -- Protection_Object (for concurrent kind)
5529 -- Subps_Index (non-generic case only)
5530 -- Interface_Alias
5531 -- LSP_Subprogram (non-generic case only)
5532 -- Overridden_Operation
5533 -- Wrapped_Entity (non-generic case only)
5534 -- Extra_Formals
5535 -- Anonymous_Masters (non-generic case only)
5536 -- Corresponding_Equality (implicit /= only)
5537 -- Thunk_Entity (thunk case only)
5538 -- Corresponding_Procedure (generate C code only)
5539 -- Linker_Section_Pragma
5540 -- Contract
5541 -- Import_Pragma (non-generic case only)
5542 -- Class_Postconditions
5543 -- Class_Preconditions
5544 -- Class_Preconditions_Subprogram
5545 -- Dynamic_Call_Helper
5546 -- Ignored_Class_Preconditions
5547 -- Ignored_Class_Postconditions
5548 -- Indirect_Call_Wrapper
5549 -- Static_Call_Helper
5550 -- Protected_Subprogram (non-generic case only)
5551 -- SPARK_Pragma
5552 -- Original_Protected_Subprogram
5553 -- Body_Needed_For_SAL
5554 -- Contains_Ignored_Ghost_Code
5555 -- Default_Expressions_Processed
5556 -- Delay_Cleanups
5557 -- Delay_Subprogram_Descriptors
5558 -- Discard_Names
5559 -- Elaboration_Entity_Required
5560 -- Has_Completion
5561 -- Has_Controlling_Result
5562 -- Has_Expanded_Contract (non-generic case only)
5563 -- Has_Master_Entity
5564 -- Has_Missing_Return
5565 -- Has_Nested_Block_With_Handler
5566 -- Has_Nested_Subprogram
5567 -- Has_Out_Or_In_Out_Parameter
5568 -- Has_Recursive_Call
5569 -- Has_Yield_Aspect
5570 -- Ignore_SPARK_Mode_Pragmas
5571 -- Is_Abstract_Subprogram (non-generic case only)
5572 -- Is_Called (non-generic case only)
5573 -- Is_Class_Wide_Wrapper
5574 -- Is_Constructor
5575 -- Is_CUDA_Kernel (non-generic case only)
5576 -- Is_DIC_Procedure (non-generic case only)
5577 -- Is_Discrim_SO_Function
5578 -- Is_Discriminant_Check_Function
5579 -- Is_Elaboration_Checks_OK_Id
5580 -- Is_Elaboration_Warnings_OK_Id
5581 -- Is_Eliminated
5582 -- Is_Generic_Actual_Subprogram (non-generic case only)
5583 -- Is_Hidden_Non_Overridden_Subpgm (non-generic case only)
5584 -- Is_Initial_Condition_Procedure (non-generic case only)
5585 -- Is_Inlined_Always (non-generic case only)
5586 -- Is_Instantiated (generic case only)
5587 -- Is_Intrinsic_Subprogram
5588 -- Is_Invariant_Procedure (non-generic case only)
5589 -- Is_Machine_Code_Subprogram (non-generic case only)
5590 -- Is_Partial_Invariant_Procedure (non-generic case only)
5591 -- Is_Predicate_Function (non-generic case only)
5592 -- Is_Primitive
5593 -- Is_Primitive_Wrapper (non-generic case only)
5594 -- Is_Private_Descendant
5595 -- Is_Private_Primitive (non-generic case only)
5596 -- Is_Pure
5597 -- Is_Visible_Lib_Unit
5598 -- Is_Wrapper
5599 -- Needs_No_Actuals
5600 -- Requires_Overriding (non-generic case only)
5601 -- Return_Present
5602 -- Returns_By_Ref
5603 -- Rewritten_For_C (generate C code only)
5604 -- Sec_Stack_Needed_For_Return
5605 -- SPARK_Pragma_Inherited
5606 -- Uses_Sec_Stack
5607 -- Address_Clause (synth)
5608 -- First_Formal (synth)
5609 -- First_Formal_With_Extras (synth)
5610 -- Is_Elaboration_Target (synth)
5611 -- Last_Formal (synth)
5612 -- Number_Formals (synth)
5613 -- Scope_Depth (synth)
5614
5615 -- E_General_Access_Type
5616 -- First_Entity $$$
5617 -- Renamed_Entity $$$
5618 -- Master_Id
5619 -- Directly_Designated_Type
5620 -- Associated_Storage_Pool (root type only)
5621 -- Finalization_Master (root type only)
5622 -- Storage_Size_Variable (base type only)
5623 -- (plus type attributes)
5624
5625 -- E_Generic_In_Parameter
5626 -- E_Generic_In_Out_Parameter
5627 -- Current_Value (always Empty)
5628 -- Entry_Component
5629 -- Actual_Subtype
5630 -- Renamed_Object (always Empty)
5631 -- Default_Value
5632 -- Protected_Formal
5633 -- Is_Controlling_Formal
5634 -- Is_Return_Object
5635 -- Parameter_Mode (synth)
5636
5637 -- E_Incomplete_Type
5638 -- E_Incomplete_Subtype
5639 -- Direct_Primitive_Operations
5640 -- Non_Limited_View
5641 -- Private_Dependents
5642 -- Discriminant_Constraint
5643 -- Stored_Constraint
5644 -- First_Entity $$$
5645 -- Last_Entity $$$
5646 -- Has_Non_Limited_View (synth)
5647 -- (plus type attributes)
5648
5649 -- E_In_Parameter
5650 -- E_In_Out_Parameter
5651 -- E_Out_Parameter
5652 -- Linker_Section_Pragma $$$
5653 -- Mechanism (Mechanism_Type)
5654 -- Current_Value
5655 -- Discriminal_Link (discriminals only)
5656 -- Entry_Component
5657 -- Esize
5658 -- Extra_Accessibility
5659 -- Alignment
5660 -- Extra_Formal
5661 -- Unset_Reference
5662 -- Actual_Subtype
5663 -- Renamed_Object
5664 -- Spec_Entity
5665 -- Default_Value
5666 -- Default_Expr_Function
5667 -- Protected_Formal
5668 -- Extra_Constrained
5669 -- Minimum_Accessibility
5670 -- Last_Assignment (OUT, IN-OUT only)
5671 -- Activation_Record_Component
5672 -- Has_Initial_Value
5673 -- Is_Controlling_Formal
5674 -- Is_Only_Out_Parameter
5675 -- Low_Bound_Tested
5676 -- Is_Return_Object
5677 -- Is_Activation_Record
5678 -- Parameter_Mode (synth)
5679
5680 -- E_Label
5681 -- Renamed_Object $$$
5682 -- Renamed_Entity $$$
5683 -- Enclosing_Scope
5684 -- Reachable
5685
5686 -- E_Limited_Private_Type
5687 -- E_Limited_Private_Subtype
5688 -- Scalar_Range $$$ type
5689 -- First_Entity
5690 -- Private_Dependents
5691 -- Underlying_Full_View
5692 -- Last_Entity
5693 -- Discriminant_Constraint
5694 -- Stored_Constraint
5695 -- Has_Completion
5696 -- (plus type attributes)
5697
5698 -- E_Loop
5699 -- First_Exit_Statement
5700 -- Has_Exit
5701 -- Has_Loop_Entry_Attributes
5702 -- Has_Master_Entity
5703 -- Has_Nested_Block_With_Handler
5704 -- Uses_Sec_Stack
5705 -- First_Entity $$$
5706 -- Last_Entity $$$
5707 -- Renamed_Object $$$
5708
5709 -- E_Modular_Integer_Type
5710 -- E_Modular_Integer_Subtype
5711 -- Modulus (base type only)
5712 -- Default_Aspect_Value (base type only)
5713 -- Original_Array_Type
5714 -- Scalar_Range
5715 -- Static_Discrete_Predicate
5716 -- Non_Binary_Modulus (base type only)
5717 -- Has_Biased_Representation
5718 -- Has_Shift_Operator (base type only)
5719 -- No_Predicate_On_Actual
5720 -- No_Dynamic_Predicate_On_Actual
5721 -- Type_Low_Bound (synth)
5722 -- Type_High_Bound (synth)
5723 -- (plus type attributes)
5724
5725 -- E_Named_Integer
5726 -- Renamed_Object $$$
5727
5728 -- E_Named_Real
5729
5730 -- E_Operator
5731 -- First_Entity
5732 -- Alias
5733 -- Extra_Accessibility_Of_Result
5734 -- Last_Entity
5735 -- Subps_Index
5736 -- Overridden_Operation
5737 -- Linker_Section_Pragma
5738 -- Contract
5739 -- Import_Pragma
5740 -- LSP_Subprogram
5741 -- SPARK_Pragma
5742 -- Default_Expressions_Processed
5743 -- Has_Nested_Subprogram
5744 -- Ignore_SPARK_Mode_Pragmas
5745 -- Is_Class_Wide_Wrapper
5746 -- Is_Elaboration_Checks_OK_Id
5747 -- Is_Elaboration_Warnings_OK_Id
5748 -- Is_Intrinsic_Subprogram
5749 -- Is_Machine_Code_Subprogram
5750 -- Is_Primitive
5751 -- Is_Pure
5752 -- Is_Wrapper
5753 -- SPARK_Pragma_Inherited
5754 -- Interface_Name $$$
5755 -- Renamed_Entity $$$
5756 -- Renamed_Object $$$
5757 -- Is_Elaboration_Target (synth)
5758 -- Aren't there more flags and fields? seems like this list should be
5759 -- more similar to the E_Function list, which is much longer ???
5760
5761 -- E_Ordinary_Fixed_Point_Type
5762 -- E_Ordinary_Fixed_Point_Subtype
5763 -- Delta_Value
5764 -- Default_Aspect_Value (base type only)
5765 -- Scalar_Range
5766 -- Static_Real_Or_String_Predicate
5767 -- Small_Value
5768 -- Has_Small_Clause
5769 -- Aft_Value (synth)
5770 -- Type_Low_Bound (synth)
5771 -- Type_High_Bound (synth)
5772 -- (plus type attributes)
5773
5774 -- E_Package
5775 -- E_Generic_Package
5776 -- Dependent_Instances (for an instance)
5777 -- Handler_Records (non-generic case only)
5778 -- Generic_Homonym (generic case only)
5779 -- Associated_Formal_Package
5780 -- Elaboration_Entity
5781 -- Related_Instance (non-generic case only)
5782 -- First_Private_Entity
5783 -- First_Entity
5784 -- Renamed_Entity
5785 -- Renamed_Object $$$
5786 -- Body_Entity
5787 -- Last_Entity
5788 -- Interface_Name
5789 -- Scope_Depth_Value
5790 -- Generic_Renamings (for an instance)
5791 -- Inner_Instances (generic case only)
5792 -- Inner_Instances $$$ also E_Package
5793 -- Limited_View (non-generic/instance)
5794 -- Incomplete_Actuals (for an instance)
5795 -- Abstract_States
5796 -- Package_Instantiation
5797 -- Current_Use_Clause
5798 -- Finalizer (non-generic case only)
5799 -- Anonymous_Masters (non-generic case only)
5800 -- Contract
5801 -- SPARK_Pragma
5802 -- SPARK_Aux_Pragma
5803 -- Body_Needed_For_Inlining
5804 -- Body_Needed_For_SAL
5805 -- Contains_Ignored_Ghost_Code
5806 -- Delay_Subprogram_Descriptors
5807 -- Discard_Names
5808 -- Elaborate_Body_Desirable (non-generic case only)
5809 -- Elaboration_Entity_Required
5810 -- From_Limited_With
5811 -- Has_All_Calls_Remote
5812 -- Has_Completion
5813 -- Has_Forward_Instantiation
5814 -- Has_Master_Entity
5815 -- Has_RACW (non-generic case only)
5816 -- Ignore_SPARK_Mode_Pragmas
5817 -- Is_Called (non-generic case only)
5818 -- Is_Elaboration_Checks_OK_Id
5819 -- Is_Elaboration_Warnings_OK_Id
5820 -- Is_Instantiated
5821 -- In_Package_Body
5822 -- Is_Private_Descendant
5823 -- In_Use
5824 -- Is_Visible_Lib_Unit
5825 -- Renamed_In_Spec (non-generic case only)
5826 -- SPARK_Aux_Pragma_Inherited
5827 -- SPARK_Pragma_Inherited
5828 -- Static_Elaboration_Desired (non-generic case only)
5829 -- Renamed_Object $$$
5830 -- Has_Non_Null_Abstract_State (synth)
5831 -- Has_Null_Abstract_State (synth)
5832 -- Is_Elaboration_Target (synth)
5833 -- Is_Wrapper_Package (synth) (non-generic case only)
5834 -- Has_Limited_View (synth) (non-generic case only)
5835 -- Scope_Depth (synth)
5836
5837 -- E_Package_Body
5838 -- Handler_Records (non-generic case only)
5839 -- Related_Instance (non-generic case only)
5840 -- First_Entity
5841 -- Spec_Entity
5842 -- Last_Entity
5843 -- Scope_Depth_Value
5844 -- Finalizer (non-generic case only)
5845 -- Contract
5846 -- SPARK_Pragma
5847 -- SPARK_Aux_Pragma
5848 -- Contains_Ignored_Ghost_Code
5849 -- Delay_Subprogram_Descriptors
5850 -- Ignore_SPARK_Mode_Pragmas
5851 -- SPARK_Aux_Pragma_Inherited
5852 -- SPARK_Pragma_Inherited
5853 -- Renamed_Entity $$$
5854 -- Scope_Depth (synth)
5855
5856 -- E_Private_Type
5857 -- E_Private_Subtype
5858 -- Scalar_Range $$$ type
5859 -- Direct_Primitive_Operations
5860 -- First_Entity
5861 -- Private_Dependents
5862 -- Underlying_Full_View
5863 -- Last_Entity
5864 -- Discriminant_Constraint
5865 -- Stored_Constraint
5866 -- Has_Completion
5867 -- Is_Controlled_Active (base type only)
5868 -- $$$above in (plus type attributes)
5869 -- (plus type attributes)
5870
5871 -- E_Procedure
5872 -- E_Generic_Procedure
5873 -- Associated_Node_For_Itype $$$ E_Procedure
5874 -- Handler_Records (non-generic case only)
5875 -- Protected_Body_Subprogram
5876 -- Next_Inlined_Subprogram
5877 -- Elaboration_Entity
5878 -- Postconditions_Proc (non-generic case only)
5879 -- DT_Position
5880 -- DTC_Entity
5881 -- First_Entity
5882 -- Alias (non-generic case only)
5883 -- Renamed_Entity
5884 -- Renamed_Object $$$
5885 -- Receiving_Entry (non-generic case only)
5886 -- Last_Entity
5887 -- Interface_Name
5888 -- Scope_Depth_Value
5889 -- Generic_Renamings (for an instance)
5890 -- Inner_Instances (generic case only)
5891 -- Inner_Instances $$$ also E_Procedure
5892 -- Protection_Object (for concurrent kind)
5893 -- Subps_Index (non-generic case only)
5894 -- Interface_Alias
5895 -- LSP_Subprogram (non-generic case only)
5896 -- Overridden_Operation (never for init proc)
5897 -- Wrapped_Entity (non-generic case only)
5898 -- Extra_Formals
5899 -- Anonymous_Masters (non-generic case only)
5900 -- Static_Initialization (init_proc only)
5901 -- Thunk_Entity (thunk case only)
5902 -- Corresponding_Function (generate C code only)
5903 -- Linker_Section_Pragma
5904 -- Contract
5905 -- Import_Pragma (non-generic case only)
5906 -- Class_Postconditions
5907 -- Class_Preconditions
5908 -- Class_Preconditions_Subprogram
5909 -- Dynamic_Call_Helper
5910 -- Ignored_Class_Preconditions
5911 -- Ignored_Class_Postconditions
5912 -- Indirect_Call_Wrapper
5913 -- Static_Call_Helper
5914 -- Protected_Subprogram (non-generic case only)
5915 -- SPARK_Pragma
5916 -- Original_Protected_Subprogram
5917 -- Body_Needed_For_SAL
5918 -- Contains_Ignored_Ghost_Code
5919 -- Delay_Cleanups $$$Dup below
5920 -- Discard_Names $$$Dup below
5921 -- Elaboration_Entity_Required
5922 -- Default_Expressions_Processed
5923 -- Delay_Cleanups
5924 -- Delay_Subprogram_Descriptors
5925 -- Discard_Names
5926 -- Has_Completion
5927 -- Has_Expanded_Contract (non-generic case only)
5928 -- Has_Master_Entity
5929 -- Has_Nested_Block_With_Handler
5930 -- Has_Nested_Subprogram
5931 -- Has_Yield_Aspect
5932 -- Ignore_SPARK_Mode_Pragmas
5933 -- Is_Abstract_Subprogram (non-generic case only)
5934 -- Is_Asynchronous
5935 -- Is_Called (non-generic case only)
5936 -- Is_Class_Wide_Wrapper
5937 -- Is_Constructor
5938 -- Is_CUDA_Kernel
5939 -- Is_DIC_Procedure (non-generic case only)
5940 -- Is_Elaboration_Checks_OK_Id
5941 -- Is_Elaboration_Warnings_OK_Id
5942 -- Is_Eliminated
5943 -- Is_Generic_Actual_Subprogram (non-generic case only)
5944 -- Is_Hidden_Non_Overridden_Subpgm (non-generic case only)
5945 -- Is_Initial_Condition_Procedure (non-generic case only)
5946 -- Is_Inlined_Always (non-generic case only)
5947 -- Is_Instantiated (generic case only)
5948 -- Is_Interrupt_Handler
5949 -- Is_Intrinsic_Subprogram
5950 -- Is_Invariant_Procedure (non-generic case only)
5951 -- Is_Machine_Code_Subprogram (non-generic case only)
5952 -- Is_Null_Init_Proc
5953 -- Is_Partial_DIC_Procedure (synth) (non-generic case only)
5954 -- Is_Partial_Invariant_Procedure (non-generic case only)
5955 -- Is_Predicate_Function (non-generic case only)
5956 -- Is_Primitive
5957 -- Is_Primitive_Wrapper (non-generic case only)
5958 -- Is_Private_Descendant
5959 -- Is_Private_Primitive (non-generic case only)
5960 -- Is_Pure
5961 -- Is_Wrapper
5962 -- Is_Valued_Procedure
5963 -- Is_Visible_Lib_Unit
5964 -- Needs_No_Actuals
5965 -- No_Return
5966 -- Requires_Overriding (non-generic case only)
5967 -- Sec_Stack_Needed_For_Return
5968 -- SPARK_Pragma_Inherited
5969 -- Entry_Parameters_Type $$$
5970 -- Address_Clause (synth)
5971 -- First_Formal (synth)
5972 -- First_Formal_With_Extras (synth)
5973 -- Is_Elaboration_Target (synth)
5974 -- Is_Finalizer (synth)
5975 -- Last_Formal (synth)
5976 -- Number_Formals (synth)
5977
5978 -- E_Protected_Body
5979 -- SPARK_Pragma
5980 -- Ignore_SPARK_Mode_Pragmas
5981 -- SPARK_Pragma_Inherited
5982 -- (any others??? First/Last Entity, Scope_Depth???)
5983
5984 -- E_Protected_Object$$$No such thing
5985
5986 -- E_Protected_Type
5987 -- E_Protected_Subtype
5988 -- Direct_Primitive_Operations
5989 -- First_Private_Entity
5990 -- First_Entity
5991 -- Corresponding_Record_Type
5992 -- Entry_Bodies_Array
5993 -- Last_Entity
5994 -- Discriminant_Constraint
5995 -- Scope_Depth_Value
5996 -- Stored_Constraint
5997 -- Anonymous_Object
5998 -- Contract
5999 -- Entry_Max_Queue_Lengths_Array
6000 -- SPARK_Aux_Pragma
6001 -- Ignore_SPARK_Mode_Pragmas
6002 -- SPARK_Aux_Pragma_Inherited
6003 -- Uses_Lock_Free
6004 -- First_Component (synth)
6005 -- First_Component_Or_Discriminant (synth)
6006 -- Has_Entries (synth)
6007 -- Has_Interrupt_Handler (synth)
6008 -- Number_Entries (synth)
6009 -- Scope_Depth (synth)
6010 -- (plus type attributes)
6011
6012 -- E_Record_Type
6013 -- E_Record_Subtype
6014 -- Renamed_Entity $$$ type
6015 -- Interface_Name $$$ type
6016 -- Direct_Primitive_Operations
6017 -- Access_Disp_Table (base type only)
6018 -- Cloned_Subtype (subtype case only)
6019 -- First_Entity
6020 -- Corresponding_Concurrent_Type
6021 -- Parent_Subtype (base type only)
6022 -- Last_Entity
6023 -- Discriminant_Constraint
6024 -- Corresponding_Remote_Type
6025 -- Stored_Constraint
6026 -- Interfaces
6027 -- Dispatch_Table_Wrappers (base type only)
6028 -- Underlying_Record_View (base type only)
6029 -- Access_Disp_Table_Elab_Flag (base type only)
6030 -- Predicated_Parent (subtype only)
6031 -- Component_Alignment (special) (base type only)
6032 -- C_Pass_By_Copy (base type only)
6033 -- Has_Dispatch_Table (base tagged type only)
6034 -- Has_Pragma_Pack (impl base type only)
6035 -- Has_Private_Ancestor
6036 -- Has_Private_Extension
6037 -- Has_Record_Rep_Clause (base type only)
6038 -- Has_Static_Discriminants (subtype only)
6039 -- Is_Class_Wide_Equivalent_Type
6040 -- Is_Concurrent_Record_Type
6041 -- Is_Constrained
6042 -- Is_Controlled_Active (base type only)
6043 -- $$$above in (plus type attributes)
6044 -- Is_Interface
6045 -- Is_Limited_Interface
6046 -- No_Reordering (base type only)
6047 -- Reverse_Bit_Order (base type only)
6048 -- Reverse_Storage_Order (base type only)
6049 -- SSO_Set_High_By_Default (base type only)
6050 -- SSO_Set_Low_By_Default (base type only)
6051 -- First_Component (synth)
6052 -- First_Component_Or_Discriminant (synth)
6053 -- (plus type attributes)
6054
6055 -- E_Record_Type_With_Private
6056 -- E_Record_Subtype_With_Private
6057 -- Corresponding_Remote_Type $$$ E_Record_Subtype_With_Private
6058 -- Direct_Primitive_Operations
6059 -- First_Entity
6060 -- Private_Dependents
6061 -- Underlying_Full_View
6062 -- Last_Entity
6063 -- Discriminant_Constraint
6064 -- Stored_Constraint
6065 -- Interfaces
6066 -- Underlying_Record_View $$$ (base type only)
6067 -- Predicated_Parent (subtype only)
6068 -- Has_Completion
6069 -- Has_Private_Ancestor
6070 -- Has_Private_Extension
6071 -- Has_Record_Rep_Clause (base type only)
6072 -- Is_Concurrent_Record_Type
6073 -- Is_Constrained
6074 -- Is_Controlled_Active (base type only)
6075 -- $$$above in (plus type attributes)
6076 -- Is_Interface
6077 -- Is_Limited_Interface
6078 -- No_Reordering (base type only)
6079 -- Reverse_Bit_Order (base type only)
6080 -- Reverse_Storage_Order (base type only)
6081 -- SSO_Set_High_By_Default (base type only)
6082 -- SSO_Set_Low_By_Default (base type only)
6083 -- Corresponding_Remote_Type $$$ type
6084 -- First_Component (synth)
6085 -- First_Component_Or_Discriminant (synth)
6086 -- (plus type attributes)
6087
6088 -- E_Return_Statement
6089 -- Return_Applies_To
6090 -- First_Entity $$$
6091 -- Last_Entity $$$
6092
6093 -- E_Signed_Integer_Type
6094 -- E_Signed_Integer_Subtype
6095 -- Renamed_Object $$$ subtype
6096 -- Interface_Name $$$ subtype
6097 -- Direct_Primitive_Operations $$$ type
6098 -- First_Entity $$$
6099 -- Default_Aspect_Value (base type only)
6100 -- Scalar_Range
6101 -- Static_Discrete_Predicate
6102 -- Has_Biased_Representation
6103 -- Has_Shift_Operator (base type only)
6104 -- No_Predicate_On_Actual
6105 -- No_Dynamic_Predicate_On_Actual
6106 -- Type_Low_Bound (synth)
6107 -- Type_High_Bound (synth)
6108 -- (plus type attributes)
6109
6110 -- E_String_Literal_Subtype
6111 -- String_Literal_Length
6112 -- First_Index (always Empty)
6113 -- String_Literal_Low_Bound
6114 -- Packed_Array_Impl_Type
6115 -- (plus type attributes)
6116
6117 -- E_Subprogram_Body
6118 -- Mechanism
6119 -- First_Entity
6120 -- Corresponding_Protected_Entry
6121 -- Last_Entity
6122 -- Scope_Depth_Value
6123 -- Extra_Formals
6124 -- Anonymous_Masters
6125 -- Contract
6126 -- SPARK_Pragma
6127 -- Contains_Ignored_Ghost_Code
6128 -- SPARK_Pragma_Inherited
6129 -- Interface_Name $$$
6130 -- Renamed_Entity $$$
6131 -- Scope_Depth (synth)
6132
6133 -- E_Subprogram_Type
6134 -- Extra_Accessibility_Of_Result
6135 -- Directly_Designated_Type
6136 -- Extra_Formals
6137 -- Access_Subprogram_Wrapper
6138 -- First_Formal (synth)
6139 -- First_Formal_With_Extras (synth)
6140 -- Last_Formal (synth)
6141 -- Number_Formals (synth)
6142 -- Returns_By_Ref
6143 -- First_Entity $$$
6144 -- Last_Entity $$$
6145 -- Interface_Name $$$
6146 -- (plus type attributes)
6147
6148 -- E_Task_Body
6149 -- Contract
6150 -- SPARK_Pragma
6151 -- Ignore_SPARK_Mode_Pragmas
6152 -- SPARK_Pragma_Inherited
6153 -- First_Entity $$$
6154 -- (any others??? First/Last Entity, Scope_Depth???)
6155
6156 -- E_Task_Type
6157 -- E_Task_Subtype
6158 -- Direct_Primitive_Operations
6159 -- First_Private_Entity
6160 -- First_Entity
6161 -- Corresponding_Record_Type
6162 -- Last_Entity
6163 -- Discriminant_Constraint
6164 -- Scope_Depth_Value
6165 -- Stored_Constraint
6166 -- Task_Body_Procedure
6167 -- Storage_Size_Variable (base type only)
6168 -- Relative_Deadline_Variable (base type only)
6169 -- Anonymous_Object
6170 -- Contract
6171 -- SPARK_Aux_Pragma
6172 -- Delay_Cleanups
6173 -- Has_Master_Entity
6174 -- Has_Storage_Size_Clause (base type only)
6175 -- Ignore_SPARK_Mode_Pragmas
6176 -- Is_Elaboration_Checks_OK_Id
6177 -- Is_Elaboration_Warnings_OK_Id
6178 -- SPARK_Aux_Pragma_Inherited
6179 -- First_Component (synth)
6180 -- First_Component_Or_Discriminant (synth)
6181 -- Has_Entries (synth)
6182 -- Is_Elaboration_Target (synth)
6183 -- Number_Entries (synth)
6184 -- Scope_Depth (synth)
6185 -- (plus type attributes)
6186
6187 -- E_Variable
6188 -- Hiding_Loop_Variable
6189 -- Current_Value
6190 -- Part_Of_Constituents
6191 -- Part_Of_References
6192 -- Esize
6193 -- Extra_Accessibility
6194 -- Alignment
6195 -- Status_Flag_Or_Transient_Decl (transient object only)
6196 -- Unset_Reference
6197 -- Actual_Subtype
6198 -- Renamed_Object
6199 -- Renamed_Entity $$$
6200 -- Discriminal_Link $$$
6201 -- Size_Check_Code
6202 -- Prival_Link
6203 -- Interface_Name
6204 -- Shared_Var_Procs_Instance
6205 -- Extra_Constrained
6206 -- Related_Expression
6207 -- Debug_Renaming_Link
6208 -- Last_Assignment
6209 -- Related_Type
6210 -- Initialization_Statements
6211 -- BIP_Initialization_Call
6212 -- Last_Aggregate_Assignment
6213 -- Activation_Record_Component
6214 -- Encapsulating_State
6215 -- Linker_Section_Pragma
6216 -- Contract
6217 -- Anonymous_Designated_Type
6218 -- Validated_Object
6219 -- SPARK_Pragma
6220 -- Has_Alignment_Clause
6221 -- Has_Atomic_Components
6222 -- Has_Biased_Representation
6223 -- Has_Independent_Components
6224 -- Has_Initial_Value
6225 -- Has_Size_Clause
6226 -- Has_Volatile_Components
6227 -- Is_Atomic
6228 -- Is_Elaboration_Checks_OK_Id
6229 -- Is_Elaboration_Warnings_OK_Id
6230 -- Is_Eliminated
6231 -- Is_Finalized_Transient
6232 -- Is_Ignored_Transient
6233 -- Is_Independent
6234 -- Is_Return_Object
6235 -- Is_Safe_To_Reevaluate
6236 -- Is_Shared_Passive
6237 -- Is_True_Constant
6238 -- Is_Uplevel_Referenced_Entity
6239 -- Is_Volatile
6240 -- Is_Volatile_Full_Access
6241 -- OK_To_Rename
6242 -- Optimize_Alignment_Space
6243 -- Optimize_Alignment_Time
6244 -- SPARK_Pragma_Inherited
6245 -- Suppress_Initialization
6246 -- Treat_As_Volatile
6247 -- Address_Clause (synth)
6248 -- Alignment_Clause (synth)
6249 -- Is_Elaboration_Target (synth)
6250 -- Is_Full_Access (synth)
6251 -- Size_Clause (synth)
6252
6253 -- E_Void
6254 -- Since E_Void is the initial Ekind value of an entity when it is first
6255 -- created, one might expect that no attributes would be defined on such
6256 -- an entity until its Ekind field is set. However, in practice, there
6257 -- are many instances in which fields of an E_Void entity are set in the
6258 -- code prior to setting the Ekind field. This is not well documented or
6259 -- well controlled, and needs cleaning up later. Meanwhile, the access
6260 -- procedures in the body of Einfo permit many, but not all, attributes
6261 -- to be applied to an E_Void entity, precisely so that this kind of
6262 -- pre-setting of attributes works. This is really a hole in the dynamic
6263 -- type checking, since there is no assurance that the eventual Ekind
6264 -- value will be appropriate for the attributes set, and the consequence
6265 -- is that the dynamic type checking in the Einfo body is unnecessarily
6266 -- weak.
6267 --
6268 -- The following are examples of getters and setters called with E_Void:
6269 -- Entry_Formal $$$
6270 -- Esize $$$
6271 -- First_Entity $$$
6272 -- Handler_Records $$$
6273 -- Interface_Name $$$
6274 -- Last_Entity $$$
6275 -- Renamed_Entity $$$
6276 -- Renamed_Object $$$
6277 -- Scalar_Range $$$
6278 -- Set_Associated_Node_For_Itype $$$
6279 -- Set_Debug_Renaming_Link $$$
6280 -- Set_Entry_Cancel_Parameter $$$
6281 -- Set_First_Entity $$$
6282 -- Set_Inner_Instances $$$
6283 -- Set_Last_Entity $$$
6284 -- Set_Scalar_Range $$$
6285 -- Set_Entry_Cancel_Parameter $$$
6286
6287 ---------------
6288 -- Iterators --
6289 ---------------
6290
6291 -- In addition to attributes that are stored as plain data, other
6292 -- attributes are procedural, and require some small amount of
6293 -- computation. Of course, from the point of view of a user of this
6294 -- package, the distinction is not visible (even the field information
6295 -- provided below should be disregarded, as it is subject to change
6296 -- without notice). A number of attributes appear as lists: lists of
6297 -- formals, lists of actuals, of discriminants, etc. For these, pairs
6298 -- of functions are defined, which take the form:
6299
6300 -- function First_Thing (E : Enclosing_Construct) return Thing;
6301 -- function Next_Thing (T : Thing) return Thing;
6302
6303 -- The end of iteration is always signaled by a value of Empty, so that
6304 -- loops over these chains invariably have the form:
6305
6306 -- This : Thing;
6307 -- ...
6308 -- This := First_Thing (E);
6309
6310 -- while Present (This) loop
6311 -- Do_Something_With (This);
6312 -- ...
6313 -- This := Next_Thing (This);
6314 -- end loop;
6315
6316 -----------------------------------
6317 -- Handling of Check Suppression --
6318 -----------------------------------
6319
6320 -- There are three ways that checks can be suppressed:
6321
6322 -- 1. At the command line level
6323 -- 2. At the scope level.
6324 -- 3. At the entity level.
6325
6326 -- See spec of Sem in sem.ads for details of the data structures used
6327 -- to keep track of these various methods for suppressing checks.
6328
6329 -------------------------------
6330 -- Handling of Discriminants --
6331 -------------------------------
6332
6333 -- During semantic processing, discriminants are separate entities which
6334 -- reflect the semantic properties and allowed usage of discriminants in
6335 -- the language.
6336
6337 -- In the case of discriminants used as bounds, the references are handled
6338 -- directly, since special processing is needed in any case. However, there
6339 -- are two circumstances in which discriminants are referenced in a quite
6340 -- general manner, like any other variables:
6341
6342 -- In initialization expressions for records. Note that the expressions
6343 -- used in Priority, Storage_Size, Task_Info and Relative_Deadline
6344 -- pragmas are effectively in this category, since these pragmas are
6345 -- converted to initialized record fields in the Corresponding_Record_
6346 -- Type.
6347
6348 -- In task and protected bodies, where the discriminant values may be
6349 -- referenced freely within these bodies. Discriminants can also appear
6350 -- in bounds of entry families and in defaults of operations.
6351
6352 -- In both these cases, the discriminants must be treated essentially as
6353 -- objects. The following approach is used to simplify and minimize the
6354 -- special processing that is required.
6355
6356 -- When a record type with discriminants is analyzed, semantic processing
6357 -- creates the entities for the discriminants. It also creates additional
6358 -- sets of entities called discriminals, one for each of the discriminants,
6359 -- and the Discriminal field of the discriminant entity points to this
6360 -- additional entity, which is initially created as an uninitialized
6361 -- (E_Void) entity.
6362
6363 -- During expansion of expressions, any discriminant reference is replaced
6364 -- by a reference to the corresponding discriminal. When the initialization
6365 -- procedure for the record is created (there will always be one, since
6366 -- discriminants are present, see Exp_Ch3 for further details), the
6367 -- discriminals are used as the entities for the formal parameters of
6368 -- this initialization procedure. The references to these discriminants
6369 -- have already been replaced by references to these discriminals, which
6370 -- are now the formal parameters corresponding to the required objects.
6371
6372 -- In the case of a task or protected body, the semantics similarly creates
6373 -- a set of discriminals for the discriminants of the task or protected
6374 -- type. When the procedure is created for the task body, the parameter
6375 -- passed in is a reference to the task value type, which contains the
6376 -- required discriminant values. The expander creates a set of declarations
6377 -- of the form:
6378
6379 -- discr_nameD : constant discr_type renames _task.discr_name;
6380
6381 -- where discr_nameD is the discriminal entity referenced by the task
6382 -- discriminant, and _task is the task value passed in as the parameter.
6383 -- Again, any references to discriminants in the task body have been
6384 -- replaced by the discriminal reference, which is now an object that
6385 -- contains the required value.
6386
6387 -- This approach for tasks means that two sets of discriminals are needed
6388 -- for a task type, one for the initialization procedure, and one for the
6389 -- task body. This works out nicely, since the semantics allocates one set
6390 -- for the task itself, and one set for the corresponding record.
6391
6392 -- The one bit of trickiness arises in making sure that the right set of
6393 -- discriminals is used at the right time. First the task definition is
6394 -- processed. Any references to discriminants here are replaced by the
6395 -- corresponding *task* discriminals (the record type doesn't even exist
6396 -- yet, since it is constructed as part of the expansion of the task
6397 -- declaration, which happens after the semantic processing of the task
6398 -- definition). The discriminants to be used for the corresponding record
6399 -- are created at the same time as the other discriminals, and held in the
6400 -- CR_Discriminant field of the discriminant. A use of the discriminant in
6401 -- a bound for an entry family is replaced with the CR_Discriminant because
6402 -- it controls the bound of the entry queue array which is a component of
6403 -- the corresponding record.
6404
6405 -- Just before the record initialization routine is constructed, the
6406 -- expander exchanges the task and record discriminals. This has two
6407 -- effects. First the generation of the record initialization routine
6408 -- uses the discriminals that are now on the record, which is the set
6409 -- that used to be on the task, which is what we want.
6410
6411 -- Second, a new set of (so far unused) discriminals is now on the task
6412 -- discriminants, and it is this set that will be used for expanding the
6413 -- task body, and also for the discriminal declarations at the start of
6414 -- the task body.
6415
6416 ---------------------------------------------------
6417 -- Handling of private data in protected objects --
6418 ---------------------------------------------------
6419
6420 -- Private components in protected types pose problems similar to those
6421 -- of discriminants. Private data is visible and can be directly referenced
6422 -- from protected bodies. However, when protected entries and subprograms
6423 -- are expanded into corresponding bodies and barrier functions, private
6424 -- components lose their original context and visibility.
6425
6426 -- To remedy this side effect of expansion, private components are expanded
6427 -- into renamings called "privals", by analogy with "discriminals".
6428
6429 -- private_comp : comp_type renames _object.private_comp;
6430
6431 -- Prival declarations are inserted during the analysis of subprogram and
6432 -- entry bodies to ensure proper visibility for any subsequent expansion.
6433 -- _Object is the formal parameter of the generated corresponding body or
6434 -- a local renaming which denotes the protected object obtained from entry
6435 -- parameter _O. Privals receive minimal decoration upon creation and are
6436 -- categorized as either E_Variable for the general case or E_Constant when
6437 -- they appear in functions.
6438
6439 -- Along with the local declarations, each private component carries a
6440 -- placeholder which references the prival entity in the current body. This
6441 -- form of indirection is used to resolve name clashes of privals and other
6442 -- locally visible entities such as parameters, local objects, entry family
6443 -- indexes or identifiers used in the barrier condition.
6444
6445 -- When analyzing the statements of a protected subprogram or entry, any
6446 -- reference to a private component must resolve to the locally declared
6447 -- prival through normal visibility. In case of name conflicts (the cases
6448 -- above), the prival is marked as hidden and acts as a weakly declared
6449 -- entity. As a result, the reference points to the correct entity. When a
6450 -- private component is denoted by an expanded name (prot_type.comp for
6451 -- example), the expansion mechanism uses the placeholder of the component
6452 -- to correct the Entity and Etype of the reference.
6453
6454 end Einfo;
This page took 0.335697 seconds and 5 git commands to generate.