-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
--- --
+-- Copyright (C) 1992-2010, Free Software Foundation, Inc. --
+-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- type x1 is range 0..5; 8 3
-- type x2 is range 0..5;
--- for x2'size use 12; 12 12
+-- for x2'size use 12; 16 12
--- subtype x3 is x2 range 0 .. 3; 12 2
+-- subtype x3 is x2 range 0 .. 3; 16 2
-- subtype x4 is x2'base range 0 .. 10; 8 4
--- subtype x5 is x2 range 0 .. dynamic; 12 (7)
+-- subtype x5 is x2 range 0 .. dynamic; 16 (7)
-- subtype x6 is x2'base range 0 .. dynamic; 8 (7)
-- The RM_Size field keeps track of the RM Size as needed in these
-- three situations.
--- For types other than discrete and fixed-point types, the Object_Size
--- and Value_Size are the same (and equivalent to the RM attribute Size).
--- Only Size may be specified for such types.
+-- For elementary types other than discrete and fixed-point types, the
+-- Object_Size and Value_Size are the same (and equivalent to the RM
+-- attribute Size). Only Size may be specified for such types.
+
+-- For composite types, Object_Size and Value_Size are computed from their
+-- respective value for the type of each element as well as the layout.
-- All size attributes are stored as Uint values. Negative values are used to
-- reference GCC expressions for the case of non-static sizes, as explained
-- in Repinfo.
+--------------------------------------
+-- Delayed Freezing and Elaboration --
+--------------------------------------
+
+-- The flag Has_Delayed_Freeze indicates that an entity carries an explicit
+-- freeze node, which appears later in the expanded tree.
+
+-- a) The flag is used by the front-end to trigger expansion actions which
+-- include the generation of that freeze node. Typically this happens at the
+-- end of the current compilation unit, or before the first subprogram body is
+-- encountered in the current unit. See files freeze and exp_ch13 for details
+-- on the actions triggered by a freeze node, which include the construction
+-- of initialization procedures and dispatch tables.
+
+-- b) The presence of a freeze node on an entity is used by the backend to
+-- defer elaboration of the entity until its freeze node is seen. In the
+-- absence of an explicit freeze node, an entity is frozen (and elaborated)
+-- at the point of declaration.
+
+-- For object declarations, the flag is set when an address clause for the
+-- object is encountered. Legality checks on the address expression only take
+-- place at the freeze point of the object.
+
+-- Most types have an explicit freeze node, because they cannot be elaborated
+-- until all representation and operational items that apply to them have been
+-- analyzed. Private types and incomplete types have the flag set as well, as
+-- do task and protected types.
+
+-- Implicit base types created for type derivations, as well as classwide
+-- types created for all tagged types, have the flag set.
+
+-- If a subprogram has an access parameter whose designated type is incomplete
+-- the subprogram has the flag set.
+
-----------------------
-- Entity Attributes --
-----------------------
-- on the list. A stack is required to handle the case of nested select
-- statements referencing the same entry.
+-- Access_Disp_Table (Elist16) [implementation base type only]
+-- Present in record type entities. For a tagged type, points to the
+-- dispatch tables associated with the tagged type. The first two
+-- entities correspond with the primary dispatch table: 1) primary
+-- dispatch table with user-defined primitives, 2) primary dispatch table
+-- with predefined primitives. For each interface type covered by the
+-- tagged type we also have: 3) secondary dispatch table with thunks of
+-- primitives covering user-defined interface primitives, 4) secondary
+-- dispatch table with thunks of predefined primitives, 5) secondary
+-- dispatch table with user-defined primitives, and 6) secondary dispatch
+-- table with predefined primitives. The last entity of this list is an
+-- access type declaration used to expand dispatching calls through the
+-- primary dispatch table. For a non-tagged record, contains Empty.
+
-- Actual_Subtype (Node17)
-- Present in variables, constants, and formal parameters. This is the
-- subtype imposed by the value of the object, as opposed to its nominal
-- rather irregular, and the semantic checks that depend on the nominal
-- subtype being unconstrained use flag Is_Constr_Subt_For_U_Nominal(qv).
--- Access_Disp_Table (Elist16) [implementation base type only]
--- Present in record type entities. For a tagged type, points to the
--- dispatch tables associated with the tagged type. The first two
--- entities correspond with the primary dispatch table: 1) primary
--- dispatch table with user-defined primitives, 2) primary dispatch table
--- with predefined primitives. For each interface type covered by the
--- tagged type we also have: 3) secondary dispatch table with thunks of
--- primitives covering user-defined interface primitives, 4) secondary
--- dispatch table with thunks of predefined primitives, 5) secondary
--- dispatch table with user-defined primitives, and 6) secondary dispatch
--- table with predefined primitives. The last entity of this list is an
--- access type declaration used to expand dispatching calls through the
--- primary dispatch table. For a non-tagged record, contains Empty.
-
-- Address_Clause (synthesized)
-- Applies to entries, objects and subprograms. Set if an address clause
-- is present which references the object or subprogram and points to
-- make sure that the address can be meaningfully taken, and also in
-- the case of subprograms to control output of certain warnings.
+-- Aft_Value (synthesized)
+-- Applies to fixed and decimal types. Computes a universal integer
+-- that holds value of the Aft attribute for the type.
+
-- Alias (Node18)
-- Present in overloaded entities (literals, subprograms, entries) and
-- subprograms that cover a primitive operation of an abstract interface
-- overloaded entities it points to the parent subprogram of a derived
-- subprogram. In case of abstract interface subprograms it points to the
-- subprogram that covers the abstract interface primitive. Also used for
--- a subprogram renaming, where it points to the renamed subprogram.
--- Always empty for entries.
+-- a subprogram renaming, where it points to the renamed subprogram. For
+-- an inherited operation (of a type extension) that is overridden in a
+-- private part, the Alias is the overriding operation. In this fashion a
+-- call from outside the package ends up executing the new body even if
+-- non-dispatching, and a call from inside calls the overriding operation
+-- because it hides the implicit one. Alias is always empty for entries.
-- Alignment (Uint14)
-- Present in entities for types and also in constants, variables
-- which can never have a null value. This is set True for constant
-- access values initialized to a non-null value. This is also True for
-- all access parameters in Ada 83 and Ada 95 modes, and for access
--- parameters that explicily exlude null in Ada 2005.
+-- parameters that explicily exclude null in Ada 2005.
--
-- This is used to avoid unnecessary resetting of the Is_Known_Non_Null
-- flag for such entities. In Ada 2005 mode, this is also used when
-- Present in all entities. Set if a pragma Suppress or Unsuppress
-- mentions the entity specifically in the second argument. If this
-- flag is set the Global_Entity_Suppress and Local_Entity_Suppress
--- tables must be consulted to determine if the is actually an active
+-- tables must be consulted to determine if there actually is an active
-- Suppress or Unsuppress pragma that applies to the entity.
-- Class_Wide_Type (Node9)
-- at run-time (this happens if fields of a record have variable
-- lengths). See package Layout for details of these values.
--
--- Note: this field is obsolescent, to be eventually replaced entirely
--- by Normalized_First_Bit and Normalized_Position, but for the moment,
--- gigi is still using (and back annotating) this field, and gigi does
--- not know about the new fields. For the front end layout case, the
--- Component_Bit_Offset field is only set if it is static, and otherwise
--- the new Normalized_First_Bit and Normalized_Position fields are used.
+-- Note: Component_Bit_Offset is redundant with respect to the fields
+-- Normalized_First_Bit and Normalized_Position, and could in principle
+-- be eliminated, but it is convenient in several situations, including
+-- use in Gigi, to have this redundant field.
-- Component_Clause (Node13)
-- Present in record components and discriminants. If a record
--- representation clause is present for the corresponding record
--- type a that specifies a position for the component, then the
--- Component_Clause field of the E_Component entity points to the
--- N_Component_Clause node. Set to Empty if no record representation
--- clause was present, or if there was no specification for this
--- component.
+-- representation clause is present for the corresponding record type a
+-- that specifies a position for the component, then the Component_Clause
+-- field of the E_Component entity points to the N_Component_Clause node.
+-- Set to Empty if no record representation clause was present, or if
+-- there was no specification for this component.
-- Component_Size (Uint22) [implementation base type only]
-- Present in array types. It contains the component size value for
-- other function entities, only in implicit inequality routines,
-- where Comes_From_Source is always False.
+-- Corresponding_Protected_Entry (Node18)
+-- Present in subrogram bodies. Set for subprogram bodies that implement
+-- a protected type entry to point to the entity for the entry.
+
-- Corresponding_Record_Type (Node18)
-- Present in protected and task types and subtypes. References the
-- entity for the corresponding record type constructed by the expander
-- details of the use of this field.
-- Declaration_Node (synthesized)
--- Applies to all entities. Returns the tree node for the declaration
--- that declared the entity. Normally this is just the Parent of the
--- entity. One exception arises with child units, where the parent of
--- the entity is a selected component or a defining program unit name.
--- Another exception is that if the entity is an incomplete type that
--- has been completed, then we obtain the declaration node denoted by
--- the full type, i.e. the full type declaration node.
+-- Applies to all entities. Returns the tree node for the construct that
+-- declared the entity. Normally this is just the Parent of the entity.
+-- One exception arises with child units, where the parent of the entity
+-- is a selected component/defining program unit name. Another exception
+-- is that if the entity is an incomplete type that has been completed,
+-- then we obtain the declaration node denoted by the full type, i.e. the
+-- full type declaration node. Also note that for subprograms, this
+-- returns the {function,procedure}_specification, not the subprogram_
+-- declaration.
-- Default_Expr_Function (Node21)
-- Present in parameters. It holds the entity of the parameterless
-- Present in floating point types and subtypes and decimal types and
-- subtypes. Contains the Digits value specified in the declaration.
+-- Direct_Primitive_Operations (Elist10)
+-- Present in tagged types and subtypes (including synchronized types),
+-- in tagged private types and in tagged incomplete types. Element list
+-- of entities for primitive operations of the tagged type. Not present
+-- in untagged types. In order to follow the C++ ABI, entities of
+-- primitives that come from source must be stored in this list in the
+-- order of their occurrence in the sources. For incomplete types the
+-- list is always empty.
+
-- Directly_Designated_Type (Node20)
-- Present in access types. This field points to the type that is
-- directly designated by the access type. In the case of an access
-- index starting at 1 and ranging up to number of discriminants.
-- Dispatch_Table_Wrappers (Elist26) [implementation base type only]
--- Present in library level record type entities if we are generating
--- statically allocated dispatch tables. For a tagged type, points to
--- the list of dispatch table wrappers associated with the tagged type.
--- For a non-tagged record, contains No_Elist.
+-- Present in record type [with private] entities. Set in library level
+-- record type entities if we are generating statically allocated
+-- dispatch tables. For a tagged type, points to the list of dispatch
+-- table wrappers associated with the tagged type. For a non-tagged
+-- record, contains No_Elist.
-- DTC_Entity (Node16)
-- Present in function and procedure entities. Set to Empty unless
-- a class wide type, points to the parent type. For a subprogram or
-- subprogram type, Etype has the return type of a function or is set
-- to Standard_Void_Type to represent a procedure.
+--
+-- Note one obscure case: for pragma Default_Storage_Pool (null), the
+-- Etype of the N_Null node is Empty.
-- Exception_Code (Uint22)
-- Present in exception entitites. Set to zero unless either an
-- Points to a list of associated entities using the Next_Entity field
-- as a chain pointer with Empty marking the end of the list.
+-- First_Exit_Statement (Node8)
+-- Present in E_Loop entity. The exit statements for a loop are chained
+-- (in reverse order of appearence) using this field to point to the
+-- first entry in the chain (last exit statement in the loop). The
+-- entries are chained through the Next_Exit_Statement field of the
+-- N_Exit_Statement node with Empty marking the end of the list.
+
-- First_Formal (synthesized)
-- Applies to subprograms and subprogram types, and also in entries
-- and entry families. Returns first formal of the subprogram or entry.
-- Alignment attribute definition clause
-- Machine_Attribute pragma
-- Link_Alias pragma
--- Link-Section pragma
+-- Linker_Section pragma
-- Weak_External pragma
--
-- If any of these items are present, then the flag Has_Gigi_Rep_Item
-- Note in particular that size clauses are present only for this
-- purpose, and should only be accessed if Has_Size_Clause is set.
+-- Float_Rep (Uint8)
+-- Present in floating-point entities. Contains a value of type
+-- Float_Rep_Kind. Together with the Digits_Value uniquely defines
+-- the floating-point representation to be used.
+
-- Freeze_Node (Node7)
-- Present in all entities. If there is an associated freeze node for
-- the entity, this field references this freeze node. If no freeze
-- Present in all type and subtype entities and in deferred constants.
-- References the entity for the corresponding full type declaration.
-- For all types other than private and incomplete types, this field
--- always contains Empty. See also Underlying_Type.
+-- always contains Empty. If an incomplete type E1 is completed by a
+-- private type E2 whose full type declaration entity is E3 then the
+-- full view of E1 is E2, and the full view of E2 is E3. See also
+-- Underlying_Type.
-- Generic_Homonym (Node11)
-- Present in generic packages. The generic homonym is the entity of
-- Convention, Import, or Export pragma has been given. Used to prevent
-- more than one such pragma appearing for a given entity (RM B.1(45)).
+-- Has_Delayed_Aspects (Flag200) Present in all entities. Set true if the
+-- Rep_Item chain for the entity has one or more N_Aspect_Definition
+-- nodes chained which are not to be evaluated till the freeze point.
+-- The aspect definition expression clause has been preanalyzed to get
+-- visibility at the point of use, but no other action has been taken.
+
-- Has_Delayed_Freeze (Flag18)
-- Present in all entities. Set to indicate that an explicit freeze
-- node must be generated for the entity at its freezing point. See
-- definition contains at least one procedure to which a pragma
-- Interrupt_Handler applies.
+-- Has_Invariants (Flag232)
+-- Present in all type entities and in subprogram entities. Set True in
+-- private types if an Invariant or Invariant'Class aspect applies to the
+-- type, or if the type inherits one or more Invariant'Class aspects.
+-- Also set in the corresponding full type. Note: if this flag is set
+-- True, then usually the Invariant_Procedure attribute is set once the
+-- type is frozen, however this may not be true in some error situations.
+-- Note that it might be the full type which has inheritable invariants,
+-- and then the flag will also be set in the private type. Also set in
+-- the invariant procedure entity, to distinguish it among entries in the
+-- Subprograms_For_Type.
+
+-- Has_Inheritable_Invariants (Flag248)
+-- Present in all type entities. Set True in private types from which one
+-- or more Invariant'Class aspects will be inherited if a another type is
+-- derived from the type (i.e. those types which have an Invariant'Class
+-- aspect, or which inherit one or more Invariant'Class aspects). Also
+-- set in the corresponding full types. Note that it might be the full
+-- type which has inheritable invariants, and in this case the flag will
+-- also be set in the private type.
+
-- Has_Machine_Radix_Clause (Flag83)
-- Present in decimal types and subtypes, set if a Machine_Radix
-- representation clause is present. This flag is used to detect
-- pragma Inline_Always applies. Note that if this flag is set, the flag
-- Has_Pragma_Inline is also set.
+-- Has_Pragma_Ordered (Flag198) [implementation base type only]
+-- Present in entities for enumeration types. If set indicates that a
+-- valid pragma Ordered was given for the type. This flag is inherited
+-- by derived enumeration types. We don't need to distinguish the derived
+-- case since we allow multiple occurrences of this pragma anyway.
+
-- Has_Pragma_Pack (Flag121) [implementation base type only]
-- Present in all entities. If set, indicates that a valid pragma Pack
-- was given for the type. Note that this flag is not inherited by
-- (but unlike the case with pragma Unreferenced, it is ok to reference
-- such an object and no warning is generated.
+-- Has_Predicates (Flag250)
+-- Present in all entities. Set in type and subtype entities if a pragma
+-- Predicate or Predicate aspect applies to the type, or if it inherits a
+-- Predicate aspect from its parent or progenitor types. Also set in the
+-- predicate function entity, to distinguish it among entries in the
+-- Subprograms_For_Type.
+
-- Has_Primitive_Operations (Flag120) [base type only]
-- Present in all type entities. Set if at least one primitive operation
-- is defined for the type.
-- of a private type declaration or its corresponding full declaration.
-- This flag is thus preserved when the full and the partial views are
-- exchanged, to indicate if a full type declaration is a completion.
--- Used for semantic checks in E.4 (18), and elsewhere.
+-- Used for semantic checks in E.4(18) and elsewhere.
-- Has_Qualified_Name (Flag161)
-- Present in all entities. Set True if the name in the Chars field
-- that we still have a concrete type. For entities other than types,
-- returns the entity unchanged.
--- Implemented_By_Entry (Flag232)
--- Applies to functions and procedures. Set if pragma Implemented_By_
--- Entry is applied on the subprogram entity.
-
--- Interfaces (Elist25)
--- Present in record types and subtypes. List of abstract interfaces
--- implemented by a tagged type that are not already implemented by the
--- ancestors (Ada 2005: AI-251).
-
-- Interface_Alias (Node25)
-- Present in subprograms that cover a primitive operation of an abstract
-- interface type. Can be set only if the Is_Hidden flag is also set,
-- interface subprogram. It is used to register the subprogram in
-- secondary dispatch table of the interface (Ada 2005: AI-251).
+-- Interfaces (Elist25)
+-- Present in record types and subtypes. List of abstract interfaces
+-- implemented by a tagged type that are not already implemented by the
+-- ancestors (Ada 2005: AI-251).
+
-- In_Package_Body (Flag48)
-- Present in package entities. Set on the entity that denotes the
-- package (the defining occurrence of the package declaration) while
-- object fields. A pragma Import for a component can define the
-- External_Name of the imported Java field (which is generally needed,
-- because Java names are case sensitive).
+
+-- Invariant_Procedure (synthesized)
+-- Present in types and subtypes. Set for private types if one or more
+-- Invariant, or Invariant'Class, or inherited Invariant'Class aspects
+-- apply to the type. Points to the entity for a procedure which checks
+-- the invariant. This invariant procedure takes a single argument of the
+-- given type, and returns if the invariant holds, or raises exception
+-- Assertion_Error with an appropriate message if it does not hold. This
+-- attribute is present but always empty for private subtypes. This
+-- attribute is also set for the corresponding full type.
--
+-- Note: the reason this is marked as a synthesized attribute is that the
+-- way this is stored is as an element of the Subprograms_For_Type field.
+
-- In_Use (Flag8)
-- Present in packages and types. Set when analyzing a use clause for
-- the corresponding entity. Reset at end of corresponding declarative
-- Applies to all entities, true for access types and subtypes
-- Is_Ada_2005_Only (Flag185)
--- Present in all entities, true if a valid pragma Ada_05 applies to the
--- entity which specifically names the entity, indicating that the entity
--- is Ada 2005 only. Note that this flag is not set if the entity is part
--- of a unit compiled with the normal no-argument form of pragma Ada_05.
+-- Present in all entities, true if a valid pragma Ada_05 or Ada_2005
+-- applies to the entity which specifically names the entity, indicating
+-- that the entity is Ada 2005 only. Note that this flag is not set if
+-- the entity is part of a unit compiled with the normal no-argument form
+-- of pragma Ada_05 or Ada_2005.
+
+-- Is_Ada_2012_Only (Flag199)
+-- Present in all entities, true if a valid pragma Ada_12 or Ada_2012
+-- applies to the entity which specifically names the entity, indicating
+-- that the entity is Ada 2012 only. Note that this flag is not set if
+-- the entity is part of a unit compiled with the normal no-argument form
+-- of pragma Ada_12 or Ada_2012.
-- Is_Aliased (Flag15)
-- Present in objects whose declarations carry the keyword aliased,
-- Is_Discrete_Type (synthesized)
-- Applies to all entities, true for all discrete types and subtypes
--- Is_Discrete__Or_Fixed_Point_Type (synthesized)
+-- Is_Discrete_Or_Fixed_Point_Type (synthesized)
-- Applies to all entities, true for all discrete types and subtypes
-- and all fixed-point types and subtypes.
-- (generic function, generic subprogram), False for all other entities.
-- Is_Generic_Type (Flag13)
--- Present in all types and subtypes. Set for types which are generic
--- formal types. Such types have an Ekind that corresponds to their
--- classification, so the Ekind cannot be used to identify generic types.
+-- Present in all entities. Set for types which are generic formal types.
+-- Such types have an Ekind that corresponds to their classification, so
+-- the Ekind cannot be used to identify generic types.
-- Is_Generic_Unit (synthesized)
-- Applies to all entities. Yields True for a generic unit (generic
-- Present in all entities. Set true for all entities declared in the
-- private part or body of a package. Also marks generic formals of a
-- formal package declared without a box. For library level entities,
--- this flag is set if the entity is not publicly visible.
+-- this flag is set if the entity is not publicly visible. This flag
+-- is reset when compiling the body of the package where the entity
+-- is declared, when compiling the private part or body of a public
+-- child unit, and when compiling a private child unit (see Install_
+-- Private_Declaration in sem_ch7).
-- Is_Hidden_Open_Scope (Flag171)
-- Present in all entities. Set true for a scope that contains the
-- 4. Setting Component_Size of an array to a bit-packable value
-- 3. Indexing an array with a non-standard enumeration type.
--
--- For records, Is_Packed is always set if Has_Pack_Pragma is set,
+-- For records, Is_Packed is always set if Has_Pragma_Pack is set,
-- and can also be set on its own in a derived type which inherited
-- its packed status.
--
-- the bit packed case once the array type is frozen.
--
-- Before an array type is frozen, Is_Packed will always be set if
--- Has_Pack_Pragma is set. Before the freeze point, it is not possible
+-- Has_Pragma_Pack is set. Before the freeze point, it is not possible
-- to know the component size, since the component type is not frozen
-- until the array type is frozen. Thus Is_Packed for an array type
-- before it is frozen means that packed is required. Then if it turns
-- child unit, or if it is the descendent of a private child unit.
-- Is_Private_Primitive (Flag245)
--- Present in subprograms. Set if the first parameter of the subprogram
--- is of concurrent tagged type with a private view.
+-- Present in subprograms. Set if the operation is a primitive of a
+-- tagged type (procedure or function dispatching on result) whose
+-- full view has not been seen. Used in particular for primitive
+-- subprograms of a synchronized type declared between the two views
+-- of the type, so that the wrapper built for such a subprogram can
+-- be given the proper signature.
-- Is_Private_Type (synthesized)
-- Applies to all entities, true for private types and subtypes,
-- Applicable to all entities, true if the entity denotes a private
-- component of a protected type.
--- Is_Protected_Interface (Flag198)
+-- Is_Protected_Interface (synthesized)
-- Present in types that are interfaces. True if interface is declared
-- protected, or is derived from protected interfaces.
-- Applies to all entities, true for function, procedure and operator
-- entities.
--- Is_Synchronized_Interface (Flag199)
+-- Is_Synchronized_Interface (synthesized)
-- Present in types that are interfaces. True if interface is declared
-- synchronized, task, or protected, or is derived from a synchronized
-- interface.
-- Is_Tagged_Type (Flag55)
-- Present in all entities. Set for an entity for a tagged type.
--- Is_Task_Interface (Flag200)
+-- Is_Task_Interface (synthesized)
-- Present in types that are interfaces. True if interface is declared as
-- a task interface, or if it is derived from task interfaces.
-- that the constant was not modified by generated code (e.g. to set a
-- discriminant in an init proc). Assignments by user or generated code
-- will reset this flag.
---
--- Note: there is one situation in which the back end does not permit
--- this flag to be set, even if no assignments are generated. This is
--- the case of an object of a record or array type which is initialized
--- with an aggregate, and is itself used as the expression initializing
--- an atomic object, or the right hand side of an assignment to an atomic
--- object. In this case the object must not have Is_True_Constant set,
--- even though no assignments are generated (the reason for this is that
--- the back end must not optimize the object away, because that would
--- violate the restriction on aggregates in these positions).
-- Is_Type (synthesized)
-- Applies to all entities, true for a type entity
-- Present in all entities. Set only in record types to which the
-- pragma Unchecked_Union has been validly applied.
+-- Is_Underlying_Record_View (Flag246) [base type only]
+-- Present in all entities. Set only in record types that represent the
+-- underlying record view. This view is built for derivations of types
+-- with unknown discriminants; it is a record with the same structure
+-- as its corresponding record type, but whose parent is the full view
+-- of the parent in the original type extension.
+
-- Is_Unsigned_Type (Flag144)
-- Present in all types, but can be set only for discrete and fixed-point
-- type and subtype entities. This flag is only valid if the entity is
-- Points to the last entry in the list of associated entities chained
-- through the Next_Entity field. Empty if no entities are chained.
+-- Last_Formal (synthesized)
+-- Applies to subprograms and subprogram types, and also in entries
+-- and entry families. Returns last formal of the subprogram or entry.
+-- The formals are the first entities declared in a subprogram or in
+-- a subprogram type (the designated type of an Access_To_Subprogram
+-- definition) or in an entry.
+
-- Limited_View (Node23)
-- Present in non-generic package entities that are not instances. Bona
-- fide package with the limited-view list through the first_entity and
-- the nature and use of this entity for implementing the Image and
-- Value attributes for the enumeration type in question.
--- Low_Bound_Known (Flag205)
+-- Low_Bound_Tested (Flag205)
-- Present in all entities. Currently this can only be set True for
-- formal parameter entries of a standard unconstrained one-dimensional
--- array or string type, where the lower bound of the index type is zero
--- or one. Indicates that the low bound is known to be equal to the lower
--- bound of the index type (e.g. 1 for String, since the index type is
--- Positive). This flag can only be set by a pragma Assert which
--- specifies this. If this flag is set, warnings about assuming the index
--- low bound to be zero or one are suppressed.
+-- array or string type. Indicates that an explicit test of the low bound
+-- of the formal appeared in the code, e.g. in a pragma Assert. If this
+-- flag is set, warnings about assuming the index low bound to be one
+-- are suppressed.
-- Machine_Radix_10 (Flag84)
-- Present in decimal types and subtypes, set if the Machine_Radix
-- Empty if there are no more formals. The list returned includes
-- all the extra formals (see description of Extra_Formal field)
--- Next_Girder_Discriminant (synthesized)
--- Applies to discriminants. Set only for a discriminant returned by
--- a call to First/Next_Girder_Discriminant. Returns next girder
--- discriminant, if there are more (see complete description in
--- First_Girder_Discriminant), or Empty if there are no more.
-
-- Next_Index (synthesized)
-- Applies to array types and subtypes and to string types and
-- subtypes. Yields the next index. The first index is obtained by
-- interpreted as true. Currently this is set true for derived Boolean
-- types which have a convention of C, C++ or Fortran.
--- No_Pool_Assigned (Flag131) [root type only]
--- Present in access types. Set if a storage size clause applies to
--- the variable with a compile time known value of zero. This flag is
--- used to generate warnings if any attempt is made to allocate or free
--- an instance of such an access type. This is set only in the root
--- type, since derived types must have the same pool.
+-- No_Pool_Assigned (Flag131) [root type only] Present in access types.
+-- Set if a storage size clause applies to the variable with a static
+-- expression value of zero. This flag is used to generate errors if any
+-- attempt is made to allocate or free an instance of such an access
+-- type. This is set only in the root type, since derived types must
+-- have the same pool.
-- No_Return (Flag113)
-- Present in all entities. Always false except in the case of procedures
-- Applies to subprograms and subprogram types. Yields the number of
-- formals as a value of type Pos.
+-- OK_To_Reference (Flag249)
+-- Present in all entities for types and subtypes. If set it indicates
+-- that a naked reference to the type is permitted within an expression
+-- that is being analyzed or preanalyed (for example, a type name may
+-- be referenced within the Invariant aspect expression for the type).
+
+-- OK_To_Rename (Flag247)
+-- Present only in entities for variables. If this flag is set, it
+-- means that if the entity is used as the initial value of an object
+-- declaration, the object declaration can be safely converted into a
+-- renaming to avoid an extra copy. This is set for variables which are
+-- generated by the expander to hold the result of evaluating some
+-- expression. Most notably, the local variables used to store the result
+-- of concatenations are so marked (see Exp_Ch4.Expand_Concatenate). It
+-- is only worth setting this flag for composites, since for primitive
+-- types, it is cheaper to do the copy.
+
+-- OK_To_Reorder_Components (Flag239) [base type only]
+-- Present in record types. Set if the back end is permitted to reorder
+-- the components. If not set, the record must be layed out in the order
+-- in which the components are declared textually. Currently this flag
+-- can only be set by debug switches.
+
-- Optimize_Alignment_Space (Flag241)
-- A flag present in type, subtype, variable, and constant entities. This
-- flag records that the type or object is to be layed out in a manner
-- points to the original array type for which this is the packed
-- array implementation type.
--- OK_To_Reorder_Components (Flag239) [base type only]
--- Present in record types. Set if the back end is permitted to reorder
--- the components. If not set, the record must be layed out in the order
--- in which the components are declared textually. Currently this flag
--- can only be set by debug switches.
-
-- Original_Record_Component (Node22)
-- Present in components, including discriminants. The usage depends
-- on whether the record is a base type and whether it is tagged.
-- Packed_Array_Type (Node23)
-- Present in array types and subtypes, including the string literal
-- subtype case, if the corresponding type is packed (either bit packed
--- or packed to eliminate holes in non-contiguous enumeration type
--- index types). References the type used to represent the packed array,
--- which is either a modular type for short static arrays, or an
--- array of System.Unsigned. Note that in some situations (internal
--- types, and references to fields of variant records), it is not
--- always possible to construct this type in advance of its use. If
--- Packed_Array_Type is empty, then the necessary type is declared
--- on the fly for each reference to the array.
+-- or packed to eliminate holes in non-contiguous enumeration type index
+-- types). References the type used to represent the packed array, which
+-- is either a modular type for short static arrays, or an array of
+-- System.Unsigned. Note that in some situations (internal types, and
+-- references to fields of variant records), it is not always possible
+-- to construct this type in advance of its use. If Packed_Array_Type
+-- is empty, then the necessary type is declared on the fly for each
+-- reference to the array.
-- Parameter_Mode (synthesized)
-- Applies to formal parameter entities. This is a synonym for Ekind,
-- used when obtaining the formal kind of a formal parameter (the result
-- is one of E_[In/Out/In_Out]_Parameter)
--- Parent_Subtype (Node19)
--- Present in E_Record_Type. Points to the subtype to use for a
--- field that references the parent record.
-
--- Primitive_Operations (Elist15)
--- Present in tagged record types and subtypes and in tagged private
--- types. Points to an element list of entities for primitive operations
--- for the tagged type. Not present (and not set) in untagged types (it
--- is an error to reference the primitive operations field of a type
--- that is not tagged).
+-- Parent_Subtype (Node19) [base type only]
+-- Present in E_Record_Type. Set only for derived tagged types, in which
+-- case it points to the subtype of the parent type. This is the type
+-- that is used as the Etype of the _parent field.
+
+-- Postcondition_Proc (Node8)
+-- Present only in procedure entities, saves the entity of the generated
+-- postcondition proc if one is present, otherwise is set to Empty. Used
+-- to generate the call to this procedure in case the expander inserts
+-- implicit return statements.
+
+-- PPC_Wrapper (Node25)
+-- Present in entries and entry families. Set only if pre- or post-
+-- conditions are present. The precondition_wrapper body is the original
+-- entry call, decorated with the given precondition for the entry.
+
+-- Primitive_Operations (synthesized)
+-- Present in concurrent types, tagged record types and subtypes, tagged
+-- private types and tagged incomplete types. For concurrent types whose
+-- Corresponding_Record_Type (CRT) is available, returns the list of
+-- Direct_Primitive_Operations of its CRT; otherwise returns No_Elist.
+-- For all the other types returns the Direct_Primitive_Operations.
+
+-- Predicate_Function (synthesized)
+-- Present in all types. Set for types for which (Has_Predicates is True)
+-- and for which a predicate procedure has been built that tests that the
+-- specified predicates are True. Contains the entity for the function
+-- which takes a single argument of the given type, and returns True if
+-- the predicate holds and False if it does not.
+--
+-- Note: the reason this is marked as a synthesized attribute is that the
+-- way this is stored is as an element of the Subprograms_For_Type field.
-- Prival (Node17)
-- Present in private components of protected types. Refers to the entity
-- protected types. Set to the original private component.
-- Private_Dependents (Elist18)
--- Present in private (sub)types. Records the subtypes of the
--- private type, derivations from it, and records and arrays
--- with components dependent on the type.
+-- Present in private (sub)types. Records the subtypes of the private
+-- type, derivations from it, and records and arrays with components
+-- dependent on the type.
--
--- The subtypes are traversed when installing and deinstalling
--- (the full view of) a private type in order to ensure correct
--- view of the subtypes.
+-- The subtypes are traversed when installing and deinstalling (the full
+-- view of) a private type in order to ensure correct view of the
+-- subtypes.
--
-- Used in similar fashion for incomplete types: holds list of subtypes
-- of these incomplete types that have discriminant constraints. The
-- the case of an appearance of a simple variable that is not a renaming
-- as the left side of an assignment in which case Referenced_As_LHS is
-- set instead, or a similar appearance as an out parameter actual, in
--- which case As_Out_Parameter_Parameter is set.
+-- which case Referenced_As_Out_Parameter is set.
-- Referenced_As_LHS (Flag36):
-- Present in all entities. This flag is set instead of Referenced if a
-- we have a separate warning for variables that are only assigned and
-- never read, and out parameters are a special case.
--- Referenced_Object (Node10)
--- Present in all type entities. Set non-Empty only for type entities
--- constructed for unconstrained objects, or objects that depend on
--- discriminants. Points to the expression from which the actual
--- subtype of the object can be evaluated.
-
-- Register_Exception_Call (Node20)
-- Present in exception entities. When an exception is declared,
-- a call is expanded to Register_Exception. This field points to
-- to the entity of the corresponding array object. Currently used
-- only for type-related error messages.
+-- Related_Expression (Node24)
+-- Present in variables and types. Set only for internally generated
+-- entities, where it may be used to denote the source expression whose
+-- elaboration created the variable declaration. If set, it is used
+-- for generating clearer messages from CodePeer.
+--
+-- Shouldn't it also be used for the same purpose in errout? It seems
+-- odd to have two mechanisms here???
+
-- Related_Instance (Node15)
-- Present in the wrapper packages created for subprogram instances.
-- The internal subprogram that implements the instance is inside the
-- wrapper package, but for debugging purposes its external symbol
-- must correspond to the name and scope of the related instance.
--- Related_Type (Node26)
--- Present in components and constants associated with dispatch tables.
--- Set to point to the entity of the associated tagged type or interface
--- type.
+-- Related_Type (Node27)
+-- Present in components, constants and variables. Set when there is an
+-- associated dispatch table to point to entities containing primary or
+-- secondary tags. Not set in the _tag component of record types.
-- Relative_Deadline_Variable (Node26) [implementation base type only]
-- Present in task type entities. This flag is set if a valid and
-- the Scope will be Standard.
-- Scope_Depth (synthesized)
--- Applies to program units, blocks, concurrent types and entries,
--- and also to record types, i.e. to any entity that can appear on
--- the scope stack. Yields the scope depth value, which for those
--- entities other than records is simply the scope depth value,
--- for record entities, it is the Scope_Depth of the record scope.
+-- Applies to program units, blocks, concurrent types and entries, and
+-- also to record types, i.e. to any entity that can appear on the scope
+-- stack. Yields the scope depth value, which for those entities other
+-- than records is simply the scope depth value, for record entities, it
+-- is the Scope_Depth of the record scope.
-- Scope_Depth_Value (Uint22)
--- Present in program units, blocks, concurrent types and entries.
--- Indicates the number of scopes that statically enclose the
--- declaration of the unit or type. Library units have a depth of zero.
--- Note that record types can act as scopes but do NOT have this field
--- set (see Scope_Depth above)
+-- Present in program units, blocks, concurrent types, and entries.
+-- Indicates the number of scopes that statically enclose the declaration
+-- of the unit or type. Library units have a depth of zero. Note that
+-- record types can act as scopes but do NOT have this field set (see
+-- Scope_Depth above)
-- Scope_Depth_Set (synthesized)
-- Applies to a special predicate function that returns a Boolean value
--- indicating whether or not the Scope_Depth field has been set. It
--- is needed, since returns an invalid value in this case!
+-- indicating whether or not the Scope_Depth field has been set. It is
+-- needed, since returns an invalid value in this case!
-- Sec_Stack_Needed_For_Return (Flag167)
-- Present in scope entities (blocks, functions, procedures, tasks,
--- entries). Set to True when secondary stack is used to hold
--- the returned value of a function and thus should not be
--- released on scope exit.
+-- entries). Set to True when secondary stack is used to hold the
+-- returned value of a function and thus should not be released on
+-- scope exit.
-- Shadow_Entities (List14)
-- Present in package and generic package entities. Points to a list
-- the corresponding parameter entities in the spec.
-- Spec_PPC_List (Node24)
--- Present in subprogram and generic subprogram entities. Points to a
--- list of Precondition and Postcondition pragma nodes for preconditions
--- and postconditions declared in the spec. The last pragma encountered
--- is at the head of this list, so it is in reverse order of textual
--- appearance.
+-- Present in entries, and in subprogram and generic subprogram entities.
+-- Points to a list of Precondition and Postcondition pragma nodes for
+-- preconditions and postconditions declared in the spec. The last pragma
+-- encountered is at the head of this list, so it is in reverse order of
+-- textual appearance. Note that this includes precondition/postcondition
+-- pragmas generated to correspond to Pre/Post aspects.
-- Storage_Size_Variable (Node15) [implementation base type only]
-- Present in access types and task type entities. This flag is set
-- the low bound of the applicable index constraint if there is one,
-- or a copy of the low bound of the index base type if not.
+-- Subprograms_For_Type (Node29)
+-- Present in all type entities, and in subprogram entities. This is used
+-- to hold a list of subprogram entities for subprograms associated with
+-- the type, linked through the Suprogram_List field of the subprogram
+-- entity. Basically this is a way of multiplexing the single field to
+-- hold more than one entity (since we ran out of space in some type
+-- entities). This is currently used for Invariant_Procedure and also
+-- for Predicate_Function, and clients will always use the latter two
+-- names to access entries in this list.
+
-- Suppress_Elaboration_Warnings (Flag148)
-- Present in all entities, can be set only for subprogram entities and
-- for variables. If this flag is set then Sem_Elab will not generate
-- value may be passed around, and if used, may clobber a local variable.
-- Task_Body_Procedure (Node25)
--- Present in task types and subtypes. Points to the entity for
--- the task body procedure (as further described in Exp_Ch9, task
--- bodies are expanded into procedures). A convenient function to
--- retrieve this field is Sem_Util.Get_Task_Body_Procedure.
--- The last sentence is odd ??? Why not have Task_Body_Procedure
--- go to the Underlying_Type of the Root_Type???
+-- Present in task types and subtypes. Points to the entity for the task
+-- task body procedure (as further described in Exp_Ch9, task bodies are
+-- expanded into procedures). A convenient function to retrieve this
+-- field is Sem_Util.Get_Task_Body_Procedure.
+--
+-- The last sentence is odd??? Why not have Task_Body_Procedure go to the
+-- Underlying_Type of the Root_Type???
-- Treat_As_Volatile (Flag41)
-- Present in all type entities, and also in constants, components and
-- private completion. If Td is already constrained, then its full view
-- can serve directly as the full view of T.
+-- Underlying_Record_View (Node28)
+-- Present in record types. Set for record types that are extensions of
+-- types with unknown discriminants, and also set for internally built
+-- underlying record views to reference its original record type. Record
+-- types that are extensions of types with unknown discriminants do not
+-- have a completion, but they cannot be used without having some
+-- discriminated view at hand. This view is a record type with the same
+-- structure, whose parent type is the full view of the parent in the
+-- original type extension.
+
-- Underlying_Type (synthesized)
-- Applies to all entities. This is the identity function except in the
-- case where it is applied to an incomplete or private type, in which
-- entries). Set to True when secondary stack is used in this scope and
-- must be released on exit unless Sec_Stack_Needed_For_Return is set.
--- Vax_Float (Flag151) [base type only]
--- Present in all type and subtype entities. Set only on the base type of
--- float types with Vax format. The particular format is determined by
--- the Digits_Value value which is 6,9,15 for F_Float, D_Float, G_Float.
-
-- Warnings_Off (Flag96)
-- Present in all entities. Set if a pragma Warnings (Off, entity-name)
-- is used to suppress warnings for a given entity. It is also used by
-- Wrapped_Entity (Node27)
-- Present in functions and procedures which have been classified as
--- Is_Primitive_Wrapper. Set to the entity being wrapper.
+-- Is_Primitive_Wrapper. Set to the entity being wrapped.
------------------
-- Access Kinds --
-- E_Access_Subtype is for an access subtype created by a subtype
-- declaration.
- -- In addition, we define the kind E_Allocator_Type to label
- -- allocators. This is because special resolution rules apply to this
- -- construct. Eventually the constructs are labeled with the access
- -- type imposed by the context. Gigi should never see the type
- -- E_Allocator.
+ -- In addition, we define the kind E_Allocator_Type to label allocators.
+ -- This is because special resolution rules apply to this construct.
+ -- Eventually the constructs are labeled with the access type imposed by
+ -- the context. Gigi should never see the type E_Allocator.
- -- Similarly, the type E_Access_Attribute_Type is used as the initial
- -- kind associated with an access attribute. After resolution a specific
- -- access type will be established as determined by the context.
+ -- Similarly, the type E_Access_Attribute_Type is used as the initial kind
+ -- associated with an access attribute. After resolution a specific access
+ -- type will be established as determined by the context.
-- Finally, the type Any_Access is used to label -null- during type
-- resolution. Any_Access is also replaced by the context type after
type Entity_Kind is (
E_Void,
- -- The initial Ekind value for a newly created entity. Also used as
- -- the Ekind for Standard_Void_Type, a type entity in Standard used
- -- as a dummy type for the return type of a procedure (the reason we
- -- create this type is to share the circuits for performing overload
- -- resolution on calls).
+ -- The initial Ekind value for a newly created entity. Also used as the
+ -- Ekind for Standard_Void_Type, a type entity in Standard used as a
+ -- dummy type for the return type of a procedure (the reason we create
+ -- this type is to share the circuits for performing overload resolution
+ -- on calls).
-------------
-- Objects --
E_Access_Protected_Subprogram_Type ..
E_Anonymous_Access_Protected_Subprogram_Type;
+ subtype Aggregate_Kind is Entity_Kind range
+ E_Array_Type ..
+ -- E_Array_Subtype
+ -- E_String_Type
+ -- E_String_Subtype
+ -- E_String_Literal_Subtype
+ -- E_Class_Wide_Type
+ -- E_Class_Wide_Subtype
+ -- E_Record_Type
+ E_Record_Subtype;
+
subtype Array_Kind is Entity_Kind range
E_Array_Type ..
-- E_Array_Subtype
-- Has_Anon_Block_Suffix (Flag201)
-- Has_Controlled_Component (Flag43) (base type only)
-- Has_Convention_Pragma (Flag119)
+ -- Has_Delayed_Aspects (Flag200)
-- Has_Delayed_Freeze (Flag18)
-- Has_Fully_Qualified_Name (Flag173)
-- Has_Gigi_Rep_Item (Flag82)
-- Has_Pragma_Thread_Local_Storage (Flag169)
-- Has_Pragma_Unmodified (Flag233)
-- Has_Pragma_Unreferenced (Flag180)
+ -- Has_Predicates (Flag250)
-- Has_Private_Declaration (Flag155)
-- Has_Qualified_Name (Flag161)
-- Has_Stream_Size_Clause (Flag184)
-- Has_Xref_Entry (Flag182)
-- In_Private_Part (Flag45)
-- Is_Ada_2005_Only (Flag185)
+ -- Is_Ada_2012_Only (Flag199)
-- Is_Bit_Packed_Array (Flag122) (base type only)
-- Is_Character_Type (Flag63)
-- Is_Child_Unit (Flag73)
-- Is_First_Subtype (Flag70)
-- Is_Formal_Subprogram (Flag111)
-- Is_Generic_Instance (Flag130)
+ -- Is_Generic_Type (Flag13)
-- Is_Hidden (Flag57)
-- Is_Hidden_Open_Scope (Flag171)
-- Is_Immediately_Visible (Flag7)
-- Kill_Elaboration_Checks (Flag32)
-- Kill_Range_Checks (Flag33)
-- Kill_Tag_Checks (Flag34)
- -- Low_Bound_Known (Flag205)
+ -- Low_Bound_Tested (Flag205)
-- Materialize_Entity (Flag168)
-- Needs_Debug_Info (Flag147)
-- Never_Set_In_Source (Flag115)
-- Associated_Node_For_Itype (Node8)
-- Class_Wide_Type (Node9)
- -- Referenced_Object (Node10)
-- Full_View (Node11)
-- Esize (Uint12)
-- RM_Size (Uint13)
-- Alignment (Uint14)
+ -- Related_Expression (Node24)
+ -- Current_Use_Clause (Node27)
+ -- Subprograms_For_Type (Node29)
-- Depends_On_Private (Flag14)
-- Discard_Names (Flag88)
-- Has_Complex_Representation (Flag140) (base type only)
-- Has_Constrained_Partial_View (Flag187)
-- Has_Discriminants (Flag5)
+ -- Has_Inheritable_Invariants (Flag248)
+ -- Has_Invariants (Flag232)
-- Has_Non_Standard_Rep (Flag75) (base type only)
-- Has_Object_Size_Clause (Flag172)
-- Has_Pragma_Preelab_Init (Flag221)
-- Is_Eliminated (Flag124)
-- Is_Frozen (Flag4)
-- Is_Generic_Actual_Type (Flag94)
- -- Is_Generic_Type (Flag13)
- -- Is_Protected_Interface (Flag198)
-- Is_RACW_Stub_Type (Flag244)
- -- Is_Synchronized_Interface (Flag199)
- -- Is_Task_Interface (Flag200)
-- Is_Non_Static_Subtype (Flag109)
-- Is_Packed (Flag51) (base type only)
-- Is_Private_Composite (Flag107)
-- Known_To_Have_Preelab_Init (Flag207)
-- Must_Be_On_Byte_Boundary (Flag183)
-- Must_Have_Preelab_Init (Flag208)
+ -- OK_To_Reference (Flag249)
-- Optimize_Alignment_Space (Flag241)
-- Optimize_Alignment_Time (Flag242)
-- Size_Depends_On_Discriminant (Flag177)
-- Base_Type (synth)
-- Has_Private_Ancestor (synth)
-- Implementation_Base_Type (synth)
+ -- Invariant_Procedure (synth)
-- Is_Access_Protected_Subprogram_Type (synth)
+ -- Predicate_Function (synth)
-- Root_Type (synth)
-- Size_Clause (synth)
-- E_Class_Wide_Type
-- E_Class_Wide_Subtype
+ -- Direct_Primitive_Operations (Elist10)
-- Cloned_Subtype (Node16) (subtype case only)
-- First_Entity (Node17)
-- Equivalent_Type (Node18) (always Empty for type)
-- Interface_Name (Node21) (JGNAT usage only)
-- Original_Record_Component (Node22)
-- DT_Offset_To_Top_Func (Node25)
- -- Related_Type (Node26)
+ -- Related_Type (Node27)
-- Has_Biased_Representation (Flag139)
-- Has_Per_Object_Constraint (Flag154)
-- Is_Atomic (Flag85)
-- Size_Check_Code (Node19) (constants only)
-- Prival_Link (Node20) (privals only)
-- Interface_Name (Node21)
- -- Related_Type (Node26) (constants only)
+ -- Related_Type (Node27) (constants only)
-- Has_Alignment_Clause (Flag46)
-- Has_Atomic_Components (Flag86)
-- Has_Biased_Representation (Flag139)
-- Small_Value (Ureal21)
-- Has_Machine_Radix_Clause (Flag83)
-- Machine_Radix_10 (Flag84)
+ -- Aft_Value (synth)
-- Type_Low_Bound (synth)
-- Type_High_Bound (synth)
-- (plus type attributes)
-- Accept_Address (Elist21)
-- Scope_Depth_Value (Uint22)
-- Protection_Object (Node23) (protected kind)
+ -- Spec_PPC_List (Node24) (for entry only)
+ -- PPC_Wrapper (Node25)
-- Default_Expressions_Processed (Flag108)
-- Entry_Accepted (Flag152)
-- Is_AST_Entry (Flag132) (for entry only)
-- Sec_Stack_Needed_For_Return (Flag167)
-- Uses_Sec_Stack (Flag95)
-- Address_Clause (synth)
+ -- Entry_Index_Type (synth)
-- First_Formal (synth)
-- First_Formal_With_Extras (synth)
- -- Entry_Index_Type (synth)
+ -- Last_Formal (synth)
-- Number_Formals (synth)
-- Scope_Depth (synth)
-- Has_Biased_Representation (Flag139)
-- Has_Contiguous_Rep (Flag181)
-- Has_Enumeration_Rep_Clause (Flag66)
+ -- Has_Pragma_Ordered (Flag198) (base type only)
-- Nonzero_Is_True (Flag162) (base type only)
-- Type_Low_Bound (synth)
-- Type_High_Bound (synth)
-- E_Floating_Point_Type
-- E_Floating_Point_Subtype
-- Digits_Value (Uint17)
+ -- Float_Rep (Uint8) (Float_Rep_Kind)
+ -- Machine_Emax_Value (synth)
+ -- Machine_Emin_Value (synth)
+ -- Machine_Mantissa_Value (synth)
+ -- Machine_Radix_Value (synth)
+ -- Model_Emin_Value (synth)
+ -- Model_Epsilon_Value (synth)
+ -- Model_Mantissa_Value (synth)
+ -- Model_Small_Value (synth)
+ -- Safe_Emax_Value (synth)
+ -- Safe_First_Value (synth)
+ -- Safe_Last_Value (synth)
-- Scalar_Range (Node20)
-- Type_Low_Bound (synth)
-- Type_High_Bound (synth)
+ -- Vax_Float (synth)
-- (plus type attributes)
-- E_Function
-- Overridden_Operation (Node26)
-- Wrapped_Entity (Node27) (non-generic case only)
-- Extra_Formals (Node28)
+ -- Subprograms_For_Type (Node29)
-- Body_Needed_For_SAL (Flag40)
-- Elaboration_Entity_Required (Flag174)
-- Default_Expressions_Processed (Flag108)
-- Discard_Names (Flag88)
-- Has_Completion (Flag26)
-- Has_Controlling_Result (Flag98)
+ -- Has_Invariants (Flag232)
-- Has_Master_Entity (Flag21)
-- Has_Missing_Return (Flag142)
-- Has_Nested_Block_With_Handler (Flag101)
-- Has_Postconditions (Flag240)
-- Has_Recursive_Call (Flag143)
-- Has_Subprogram_Descriptor (Flag93)
- -- Implemented_By_Entry (Flag232) (non-generic case only)
-- Is_Abstract_Subprogram (Flag19) (non-generic case only)
-- Is_Called (Flag102) (non-generic case only)
-- Is_Constructor (Flag76)
-- Address_Clause (synth)
-- First_Formal (synth)
-- First_Formal_With_Extras (synth)
+ -- Last_Formal (synth)
-- Number_Formals (synth)
-- Scope_Depth (synth)
-- E_Incomplete_Type
-- E_Incomplete_Subtype
+ -- Direct_Primitive_Operations (Elist10)
-- Non_Limited_View (Node17)
-- Private_Dependents (Elist18)
-- Discriminant_Constraint (Elist21)
-- Is_Controlling_Formal (Flag97)
-- Is_Only_Out_Parameter (Flag226)
-- Is_Optional_Parameter (Flag134)
- -- Low_Bound_Known (Flag205)
+ -- Low_Bound_Tested (Flag205)
-- Is_Return_Object (Flag209)
-- Parameter_Mode (synth)
-- (plus type attributes)
-- E_Loop
+ -- First_Exit_Statement (Node8)
-- Has_Exit (Flag47)
-- Has_Master_Entity (Flag21)
-- Has_Nested_Block_With_Handler (Flag101)
-- First_Entity (Node17)
-- Alias (Node18)
-- Last_Entity (Node20)
+ -- Subprograms_For_Type (Node29)
+ -- Has_Invariants (Flag232)
-- Has_Postconditions (Flag240)
-- Is_Machine_Code_Subprogram (Flag137)
-- Is_Pure (Flag44)
-- Scalar_Range (Node20)
-- Small_Value (Ureal21)
-- Has_Small_Clause (Flag67)
+ -- Aft_Value (synth)
-- Type_Low_Bound (synth)
-- Type_High_Bound (synth)
-- (plus type attributes)
-- E_Private_Type
-- E_Private_Subtype
- -- Primitive_Operations (Elist15)
+ -- Direct_Primitive_Operations (Elist10)
-- First_Entity (Node17)
-- Private_Dependents (Elist18)
-- Underlying_Full_View (Node19)
-- E_Procedure
-- E_Generic_Procedure
+ -- Postcondition_Proc (Node8) (non-generic case only)
-- Renaming_Map (Uint9)
-- Handler_Records (List10) (non-generic case only)
-- Protected_Body_Subprogram (Node11)
-- Spec_PPC_List (Node24)
-- Interface_Alias (Node25)
-- Static_Initialization (Node26) (init_proc only)
- -- Overridden_Operation (Node26)
+ -- Overridden_Operation (Node26) (never for init proc)
-- Wrapped_Entity (Node27) (non-generic case only)
-- Extra_Formals (Node28)
-- Body_Needed_For_SAL (Flag40)
-- Delay_Subprogram_Descriptors (Flag50)
-- Discard_Names (Flag88)
-- Has_Completion (Flag26)
+ -- Has_Invariants (Flag232)
-- Has_Master_Entity (Flag21)
-- Has_Nested_Block_With_Handler (Flag101)
-- Has_Postconditions (Flag240)
-- Has_Subprogram_Descriptor (Flag93)
- -- Implemented_By_Entry (Flag232) (non-generic case only)
-- Is_Abstract_Subprogram (Flag19) (non-generic case only)
-- Is_Asynchronous (Flag81)
-- Is_Called (Flag102) (non-generic case only)
-- Address_Clause (synth)
-- First_Formal (synth)
-- First_Formal_With_Extras (synth)
+ -- Last_Formal (synth)
-- Number_Formals (synth)
-- E_Protected_Body
-- E_Protected_Type
-- E_Protected_Subtype
+ -- Direct_Primitive_Operations (Elist10)
-- Entry_Bodies_Array (Node15)
-- First_Private_Entity (Node16)
-- First_Entity (Node17)
-- E_Record_Type
-- E_Record_Subtype
- -- Primitive_Operations (Elist15)
+ -- Direct_Primitive_Operations (Elist10)
-- Access_Disp_Table (Elist16) (base type only)
- -- Dispatch_Table_Wrappers (Elist26) (base type only)
-- Cloned_Subtype (Node16) (subtype case only)
-- First_Entity (Node17)
-- Corresponding_Concurrent_Type (Node18)
- -- Parent_Subtype (Node19)
+ -- Parent_Subtype (Node19) (base type only)
-- Last_Entity (Node20)
-- Discriminant_Constraint (Elist21)
-- Corresponding_Remote_Type (Node22)
-- Stored_Constraint (Elist23)
-- Interfaces (Elist25)
+ -- Dispatch_Table_Wrappers (Elist26) (base type only)
+ -- Underlying_Record_View (Node28) (base type only)
-- Component_Alignment (special) (base type only)
-- C_Pass_By_Copy (Flag125) (base type only)
-- Has_Dispatch_Table (Flag220) (base tagged type only)
-- E_Record_Type_With_Private
-- E_Record_Subtype_With_Private
- -- Primitive_Operations (Elist15)
+ -- Direct_Primitive_Operations (Elist10)
-- Access_Disp_Table (Elist16) (base type only)
- -- Dispatch_Table_Wrappers (Elist26) (base type only)
-- First_Entity (Node17)
-- Private_Dependents (Elist18)
-- Underlying_Full_View (Node19)
-- Private_View (Node22)
-- Stored_Constraint (Elist23)
-- Interfaces (Elist25)
+ -- Dispatch_Table_Wrappers (Elist26) (base type only)
-- Has_Completion (Flag26)
-- Has_Record_Rep_Clause (Flag65) (base type only)
-- Has_External_Tag_Rep_Clause (Flag110)
-- E_Subprogram_Body
-- Mechanism (Uint8)
-- First_Entity (Node17)
+ -- Corresponding_Protected_Entry (Node18)
-- Last_Entity (Node20)
-- Scope_Depth_Value (Uint22)
-- Scope_Depth (synth)
-- Directly_Designated_Type (Node20)
-- First_Formal (synth)
-- First_Formal_With_Extras (synth)
+ -- Last_Formal (synth)
-- Number_Formals (synth)
-- (plus type attributes)
-- E_Task_Type
-- E_Task_Subtype
+ -- Direct_Primitive_Operations (Elist10)
-- Storage_Size_Variable (Node15) (base type only)
-- First_Private_Entity (Node16)
-- First_Entity (Node17)
-- Interface_Name (Node21)
-- Shared_Var_Procs_Instance (Node22)
-- Extra_Constrained (Node23)
+ -- Related_Expression (Node24)
-- Debug_Renaming_Link (Node25)
-- Last_Assignment (Node26)
+ -- Related_Type (Node27)
-- Has_Alignment_Clause (Flag46)
-- Has_Atomic_Components (Flag86)
-- Has_Biased_Representation (Flag139)
-- Is_True_Constant (Flag163)
-- Is_Volatile (Flag16)
-- Is_Return_Object (Flag209)
+ -- OK_To_Rename (Flag247)
-- Optimize_Alignment_Space (Flag241)
-- Optimize_Alignment_Time (Flag242)
-- Treat_As_Volatile (Flag41)
Calign_Component_Size_4, -- natural for size <= 4, 4 for size >= 4
Calign_Storage_Unit); -- all components byte aligned
+ ----------------------------------
+ -- Floating Point Repesentation --
+ ----------------------------------
+
+ type Float_Rep_Kind is (
+ IEEE_Binary, -- IEEE 754p conform binary format
+ VAX_Native, -- VAX D, F, G or H format
+ AAMP); -- AAMP format
+
---------------
-- Iterators --
---------------
subtype B is Boolean;
subtype C is Component_Alignment_Kind;
subtype E is Entity_Id;
+ subtype F is Float_Rep_Kind;
subtype M is Mechanism_Type;
subtype N is Node_Id;
subtype U is Uint;
function Corresponding_Concurrent_Type (Id : E) return E;
function Corresponding_Discriminant (Id : E) return E;
function Corresponding_Equality (Id : E) return E;
+ function Corresponding_Protected_Entry (Id : E) return E;
function Corresponding_Record_Type (Id : E) return E;
function Corresponding_Remote_Type (Id : E) return E;
function Current_Use_Clause (Id : E) return E;
function Finalization_Chain_Entity (Id : E) return E;
function Finalize_Storage_Only (Id : E) return B;
function First_Entity (Id : E) return E;
+ function First_Exit_Statement (Id : E) return N;
function First_Index (Id : E) return N;
function First_Literal (Id : E) return E;
function First_Optional_Parameter (Id : E) return E;
function First_Private_Entity (Id : E) return E;
function First_Rep_Item (Id : E) return N;
+ function Float_Rep (Id : E) return F;
function Freeze_Node (Id : E) return N;
function From_With_Type (Id : E) return B;
function Full_View (Id : E) return E;
function Has_Controlled_Component (Id : E) return B;
function Has_Controlling_Result (Id : E) return B;
function Has_Convention_Pragma (Id : E) return B;
+ function Has_Delayed_Aspects (Id : E) return B;
function Has_Delayed_Freeze (Id : E) return B;
function Has_Discriminants (Id : E) return B;
function Has_Dispatch_Table (Id : E) return B;
function Has_Fully_Qualified_Name (Id : E) return B;
function Has_Gigi_Rep_Item (Id : E) return B;
function Has_Homonym (Id : E) return B;
+ function Has_Inheritable_Invariants (Id : E) return B;
function Has_Initial_Value (Id : E) return B;
+ function Has_Invariants (Id : E) return B;
function Has_Interrupt_Handler (Id : E) return B;
function Has_Machine_Radix_Clause (Id : E) return B;
function Has_Master_Entity (Id : E) return B;
function Has_Pragma_Elaborate_Body (Id : E) return B;
function Has_Pragma_Inline (Id : E) return B;
function Has_Pragma_Inline_Always (Id : E) return B;
+ function Has_Pragma_Ordered (Id : E) return B;
function Has_Pragma_Pack (Id : E) return B;
function Has_Pragma_Preelab_Init (Id : E) return B;
function Has_Pragma_Pure (Id : E) return B;
function Has_Pragma_Unmodified (Id : E) return B;
function Has_Pragma_Unreferenced (Id : E) return B;
function Has_Pragma_Unreferenced_Objects (Id : E) return B;
+ function Has_Predicates (Id : E) return B;
function Has_Primitive_Operations (Id : E) return B;
function Has_Qualified_Name (Id : E) return B;
function Has_RACW (Id : E) return B;
function Has_Xref_Entry (Id : E) return B;
function Hiding_Loop_Variable (Id : E) return E;
function Homonym (Id : E) return E;
- function Implemented_By_Entry (Id : E) return B;
function In_Package_Body (Id : E) return B;
function In_Private_Part (Id : E) return B;
function In_Use (Id : E) return B;
function Inner_Instances (Id : E) return L;
- function Interfaces (Id : E) return L;
function Interface_Alias (Id : E) return E;
+ function Interfaces (Id : E) return L;
function Interface_Name (Id : E) return N;
function Is_AST_Entry (Id : E) return B;
function Is_Abstract_Subprogram (Id : E) return B;
function Is_Abstract_Type (Id : E) return B;
function Is_Access_Constant (Id : E) return B;
function Is_Ada_2005_Only (Id : E) return B;
+ function Is_Ada_2012_Only (Id : E) return B;
function Is_Aliased (Id : E) return B;
function Is_Asynchronous (Id : E) return B;
function Is_Atomic (Id : E) return B;
function Is_Private_Composite (Id : E) return B;
function Is_Private_Descendant (Id : E) return B;
function Is_Private_Primitive (Id : E) return B;
- function Is_Protected_Interface (Id : E) return B;
function Is_Public (Id : E) return B;
function Is_Pure (Id : E) return B;
function Is_Pure_Unit_Access_Type (Id : E) return B;
function Is_Return_Object (Id : E) return B;
function Is_Shared_Passive (Id : E) return B;
function Is_Statically_Allocated (Id : E) return B;
- function Is_Synchronized_Interface (Id : E) return B;
function Is_Tag (Id : E) return B;
function Is_Tagged_Type (Id : E) return B;
- function Is_Task_Interface (Id : E) return B;
function Is_Thunk (Id : E) return B;
function Is_Trivial_Subprogram (Id : E) return B;
function Is_True_Constant (Id : E) return B;
function Is_Unchecked_Union (Id : E) return B;
+ function Is_Underlying_Record_View (Id : E) return B;
function Is_Unsigned_Type (Id : E) return B;
function Is_VMS_Exception (Id : E) return B;
function Is_Valued_Procedure (Id : E) return B;
function Limited_View (Id : E) return E;
function Lit_Indexes (Id : E) return E;
function Lit_Strings (Id : E) return E;
- function Low_Bound_Known (Id : E) return B;
+ function Low_Bound_Tested (Id : E) return B;
function Machine_Radix_10 (Id : E) return B;
function Master_Id (Id : E) return E;
function Materialize_Entity (Id : E) return B;
function Normalized_First_Bit (Id : E) return U;
function Normalized_Position (Id : E) return U;
function Normalized_Position_Max (Id : E) return U;
+ function OK_To_Reference (Id : E) return B;
+ function OK_To_Rename (Id : E) return B;
function OK_To_Reorder_Components (Id : E) return B;
function Optimize_Alignment_Space (Id : E) return B;
function Optimize_Alignment_Time (Id : E) return B;
function Package_Instantiation (Id : E) return N;
function Packed_Array_Type (Id : E) return E;
function Parent_Subtype (Id : E) return E;
- function Primitive_Operations (Id : E) return L;
+ function Postcondition_Proc (Id : E) return E;
+ function PPC_Wrapper (Id : E) return E;
+ function Direct_Primitive_Operations (Id : E) return L;
function Prival (Id : E) return E;
function Prival_Link (Id : E) return E;
function Private_Dependents (Id : E) return L;
function Referenced (Id : E) return B;
function Referenced_As_LHS (Id : E) return B;
function Referenced_As_Out_Parameter (Id : E) return B;
- function Referenced_Object (Id : E) return N;
function Register_Exception_Call (Id : E) return N;
function Related_Array_Object (Id : E) return E;
+ function Related_Expression (Id : E) return N;
function Related_Instance (Id : E) return E;
function Related_Type (Id : E) return E;
function Relative_Deadline_Variable (Id : E) return E;
function Strict_Alignment (Id : E) return B;
function String_Literal_Length (Id : E) return U;
function String_Literal_Low_Bound (Id : E) return N;
+ function Subprograms_For_Type (Id : E) return E;
function Suppress_Elaboration_Warnings (Id : E) return B;
function Suppress_Init_Proc (Id : E) return B;
function Suppress_Style_Checks (Id : E) return B;
function Task_Body_Procedure (Id : E) return N;
function Treat_As_Volatile (Id : E) return B;
function Underlying_Full_View (Id : E) return E;
+ function Underlying_Record_View (Id : E) return E;
function Universal_Aliasing (Id : E) return B;
function Unset_Reference (Id : E) return N;
function Used_As_Generic_Actual (Id : E) return B;
function Is_Access_Type (Id : E) return B;
function Is_Access_Protected_Subprogram_Type (Id : E) return B;
function Is_Access_Subprogram_Type (Id : E) return B;
+ function Is_Aggregate_Type (Id : E) return B;
function Is_Array_Type (Id : E) return B;
function Is_Assignable (Id : E) return B;
function Is_Class_Wide_Type (Id : E) return B;
-- so they do not correspond to defined fields in the entity itself.
function Address_Clause (Id : E) return N;
+ function Aft_Value (Id : E) return U;
function Alignment_Clause (Id : E) return N;
function Base_Type (Id : E) return E;
function Declaration_Node (Id : E) return N;
function Is_Package_Or_Generic_Package (Id : E) return B;
function Is_Prival (Id : E) return B;
function Is_Protected_Component (Id : E) return B;
+ function Is_Protected_Interface (Id : E) return B;
function Is_Protected_Record_Type (Id : E) return B;
function Is_Standard_Character_Type (Id : E) return B;
function Is_String_Type (Id : E) return B;
+ function Is_Synchronized_Interface (Id : E) return B;
+ function Is_Task_Interface (Id : E) return B;
function Is_Task_Record_Type (Id : E) return B;
function Is_Wrapper_Package (Id : E) return B;
+ function Last_Formal (Id : E) return E;
+ function Machine_Emax_Value (Id : E) return U;
+ function Machine_Emin_Value (Id : E) return U;
+ function Machine_Mantissa_Value (Id : E) return U;
+ function Machine_Radix_Value (Id : E) return U;
+ function Model_Emin_Value (Id : E) return U;
+ function Model_Epsilon_Value (Id : E) return R;
+ function Model_Mantissa_Value (Id : E) return U;
+ function Model_Small_Value (Id : E) return R;
function Next_Component (Id : E) return E;
function Next_Component_Or_Discriminant (Id : E) return E;
function Next_Discriminant (Id : E) return E;
function Number_Dimensions (Id : E) return Pos;
function Number_Entries (Id : E) return Nat;
function Number_Formals (Id : E) return Pos;
- function Root_Type (Id : E) return E;
function Parameter_Mode (Id : E) return Formal_Kind;
+ function Primitive_Operations (Id : E) return L;
+ function Root_Type (Id : E) return E;
+ function Safe_Emax_Value (Id : E) return U;
+ function Safe_First_Value (Id : E) return R;
+ function Safe_Last_Value (Id : E) return R;
function Scope_Depth_Set (Id : E) return B;
function Size_Clause (Id : E) return N;
function Stream_Size_Clause (Id : E) return N;
-- predicate is true only if the value is set (Known) and is set to a
-- compile time known value. Note that in the case of Alignment and
-- Normalized_First_Bit, dynamic values are not possible, so we do not
- -- need a separate Known_Static calls in these cases. The not set (unknown
+ -- need a separate Known_Static calls in these cases. The not set (unknown)
-- values are as follows:
-- Alignment Uint_0 or No_Uint
-- value is always known static for discrete types (and no other types can
-- have an RM_Size value of zero).
+ -- In two cases, Known_Static_Esize and Known_Static_RM_Size, there is one
+ -- more consideration, which is that we always return False for generic
+ -- types. Within a template, the size can look known, because of the fake
+ -- size values we put in template types, but they are not really known and
+ -- anyone testing if they are known within the template should get False as
+ -- a result to prevent incorrect assumptions.
+
function Known_Alignment (E : Entity_Id) return B;
function Known_Component_Bit_Offset (E : Entity_Id) return B;
function Known_Component_Size (E : Entity_Id) return B;
procedure Set_Corresponding_Concurrent_Type (Id : E; V : E);
procedure Set_Corresponding_Discriminant (Id : E; V : E);
procedure Set_Corresponding_Equality (Id : E; V : E);
+ procedure Set_Corresponding_Protected_Entry (Id : E; V : E);
procedure Set_Corresponding_Record_Type (Id : E; V : E);
procedure Set_Corresponding_Remote_Type (Id : E; V : E);
procedure Set_Current_Use_Clause (Id : E; V : E);
procedure Set_Finalization_Chain_Entity (Id : E; V : E);
procedure Set_Finalize_Storage_Only (Id : E; V : B := True);
procedure Set_First_Entity (Id : E; V : E);
+ procedure Set_First_Exit_Statement (Id : E; V : N);
procedure Set_First_Index (Id : E; V : N);
procedure Set_First_Literal (Id : E; V : E);
procedure Set_First_Optional_Parameter (Id : E; V : E);
procedure Set_First_Private_Entity (Id : E; V : E);
procedure Set_First_Rep_Item (Id : E; V : N);
+ procedure Set_Float_Rep (Id : E; V : F);
procedure Set_Freeze_Node (Id : E; V : N);
procedure Set_From_With_Type (Id : E; V : B := True);
procedure Set_Full_View (Id : E; V : E);
procedure Set_Has_Controlled_Component (Id : E; V : B := True);
procedure Set_Has_Controlling_Result (Id : E; V : B := True);
procedure Set_Has_Convention_Pragma (Id : E; V : B := True);
+ procedure Set_Has_Delayed_Aspects (Id : E; V : B := True);
procedure Set_Has_Delayed_Freeze (Id : E; V : B := True);
procedure Set_Has_Discriminants (Id : E; V : B := True);
procedure Set_Has_Dispatch_Table (Id : E; V : B := True);
procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True);
procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True);
procedure Set_Has_Homonym (Id : E; V : B := True);
+ procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True);
procedure Set_Has_Initial_Value (Id : E; V : B := True);
+ procedure Set_Has_Invariants (Id : E; V : B := True);
procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True);
procedure Set_Has_Master_Entity (Id : E; V : B := True);
procedure Set_Has_Missing_Return (Id : E; V : B := True);
procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True);
procedure Set_Has_Pragma_Inline (Id : E; V : B := True);
procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True);
+ procedure Set_Has_Pragma_Ordered (Id : E; V : B := True);
procedure Set_Has_Pragma_Pack (Id : E; V : B := True);
procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True);
procedure Set_Has_Pragma_Pure (Id : E; V : B := True);
procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True);
procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True);
procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True);
+ procedure Set_Has_Predicates (Id : E; V : B := True);
procedure Set_Has_Primitive_Operations (Id : E; V : B := True);
procedure Set_Has_Private_Declaration (Id : E; V : B := True);
procedure Set_Has_Qualified_Name (Id : E; V : B := True);
procedure Set_Has_Xref_Entry (Id : E; V : B := True);
procedure Set_Hiding_Loop_Variable (Id : E; V : E);
procedure Set_Homonym (Id : E; V : E);
- procedure Set_Implemented_By_Entry (Id : E; V : B := True);
procedure Set_Interfaces (Id : E; V : L);
procedure Set_In_Package_Body (Id : E; V : B := True);
procedure Set_In_Private_Part (Id : E; V : B := True);
procedure Set_Is_Abstract_Type (Id : E; V : B := True);
procedure Set_Is_Access_Constant (Id : E; V : B := True);
procedure Set_Is_Ada_2005_Only (Id : E; V : B := True);
+ procedure Set_Is_Ada_2012_Only (Id : E; V : B := True);
procedure Set_Is_Aliased (Id : E; V : B := True);
procedure Set_Is_Asynchronous (Id : E; V : B := True);
procedure Set_Is_Atomic (Id : E; V : B := True);
procedure Set_Is_Private_Composite (Id : E; V : B := True);
procedure Set_Is_Private_Descendant (Id : E; V : B := True);
procedure Set_Is_Private_Primitive (Id : E; V : B := True);
- procedure Set_Is_Protected_Interface (Id : E; V : B := True);
procedure Set_Is_Public (Id : E; V : B := True);
procedure Set_Is_Pure (Id : E; V : B := True);
procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True);
procedure Set_Is_Return_Object (Id : E; V : B := True);
procedure Set_Is_Shared_Passive (Id : E; V : B := True);
procedure Set_Is_Statically_Allocated (Id : E; V : B := True);
- procedure Set_Is_Synchronized_Interface (Id : E; V : B := True);
procedure Set_Is_Tag (Id : E; V : B := True);
procedure Set_Is_Tagged_Type (Id : E; V : B := True);
- procedure Set_Is_Task_Interface (Id : E; V : B := True);
procedure Set_Is_Thunk (Id : E; V : B := True);
procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True);
procedure Set_Is_True_Constant (Id : E; V : B := True);
procedure Set_Is_Unchecked_Union (Id : E; V : B := True);
+ procedure Set_Is_Underlying_Record_View (Id : E; V : B := True);
procedure Set_Is_Unsigned_Type (Id : E; V : B := True);
procedure Set_Is_VMS_Exception (Id : E; V : B := True);
procedure Set_Is_Valued_Procedure (Id : E; V : B := True);
procedure Set_Limited_View (Id : E; V : E);
procedure Set_Lit_Indexes (Id : E; V : E);
procedure Set_Lit_Strings (Id : E; V : E);
- procedure Set_Low_Bound_Known (Id : E; V : B := True);
+ procedure Set_Low_Bound_Tested (Id : E; V : B := True);
procedure Set_Machine_Radix_10 (Id : E; V : B := True);
procedure Set_Master_Id (Id : E; V : E);
procedure Set_Materialize_Entity (Id : E; V : B := True);
procedure Set_Normalized_First_Bit (Id : E; V : U);
procedure Set_Normalized_Position (Id : E; V : U);
procedure Set_Normalized_Position_Max (Id : E; V : U);
+ procedure Set_OK_To_Reference (Id : E; V : B := True);
+ procedure Set_OK_To_Rename (Id : E; V : B := True);
procedure Set_OK_To_Reorder_Components (Id : E; V : B := True);
procedure Set_Optimize_Alignment_Space (Id : E; V : B := True);
procedure Set_Optimize_Alignment_Time (Id : E; V : B := True);
procedure Set_Package_Instantiation (Id : E; V : N);
procedure Set_Packed_Array_Type (Id : E; V : E);
procedure Set_Parent_Subtype (Id : E; V : E);
- procedure Set_Primitive_Operations (Id : E; V : L);
+ procedure Set_Postcondition_Proc (Id : E; V : E);
+ procedure Set_PPC_Wrapper (Id : E; V : E);
+ procedure Set_Direct_Primitive_Operations (Id : E; V : L);
procedure Set_Prival (Id : E; V : E);
procedure Set_Prival_Link (Id : E; V : E);
procedure Set_Private_Dependents (Id : E; V : L);
procedure Set_Referenced (Id : E; V : B := True);
procedure Set_Referenced_As_LHS (Id : E; V : B := True);
procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True);
- procedure Set_Referenced_Object (Id : E; V : N);
procedure Set_Register_Exception_Call (Id : E; V : N);
procedure Set_Related_Array_Object (Id : E; V : E);
+ procedure Set_Related_Expression (Id : E; V : N);
procedure Set_Related_Instance (Id : E; V : E);
procedure Set_Related_Type (Id : E; V : E);
procedure Set_Relative_Deadline_Variable (Id : E; V : E);
procedure Set_Strict_Alignment (Id : E; V : B := True);
procedure Set_String_Literal_Length (Id : E; V : U);
procedure Set_String_Literal_Low_Bound (Id : E; V : N);
+ procedure Set_Subprograms_For_Type (Id : E; V : E);
procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True);
procedure Set_Suppress_Init_Proc (Id : E; V : B := True);
procedure Set_Suppress_Style_Checks (Id : E; V : B := True);
procedure Set_Task_Body_Procedure (Id : E; V : N);
procedure Set_Treat_As_Volatile (Id : E; V : B := True);
procedure Set_Underlying_Full_View (Id : E; V : E);
+ procedure Set_Underlying_Record_View (Id : E; V : E);
procedure Set_Universal_Aliasing (Id : E; V : B := True);
procedure Set_Unset_Reference (Id : E; V : N);
procedure Set_Used_As_Generic_Actual (Id : E; V : B := True);
procedure Set_Uses_Sec_Stack (Id : E; V : B := True);
- procedure Set_Vax_Float (Id : E; V : B := True);
procedure Set_Warnings_Off (Id : E; V : B := True);
procedure Set_Warnings_Off_Used (Id : E; V : B := True);
procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True);
procedure Set_Was_Hidden (Id : E; V : B := True);
procedure Set_Wrapped_Entity (Id : E; V : E);
+ ---------------------------------------------------
+ -- Access to Subprograms in Subprograms_For_Type --
+ ---------------------------------------------------
+
+ function Invariant_Procedure (Id : E) return N;
+ function Predicate_Function (Id : E) return N;
+
+ procedure Set_Invariant_Procedure (Id : E; V : E);
+ procedure Set_Predicate_Function (Id : E; V : E);
+
-----------------------------------
-- Field Initialization Routines --
-----------------------------------
-- Subprograms for Accessing Rep Item Chain --
----------------------------------------------
- -- The First_Rep_Item field of every entity points to a linked list
- -- (linked through Next_Rep_Item) of representation pragmas and attribute
- -- definition clauses that apply to the item. Note that in the case of
- -- types, it is assumed that any such rep items for a base type also apply
- -- to all subtypes. This is implemented by having the chain for subtypes
- -- link onto the chain for the base type, so that any new entries for the
- -- subtype are added at the start of the chain.
+ -- The First_Rep_Item field of every entity points to a linked list (linked
+ -- through Next_Rep_Item) of representation pragmas, attribute definition
+ -- clauses, representation clauses, and aspect specifications that apply to
+ -- the item. Note that in the case of types, it is assumed that any such
+ -- rep items for a base type also apply to all subtypes. This is achieved
+ -- by having the chain for subtypes link onto the chain for the base type,
+ -- so that new entries for the subtype are added at the start of the chain.
+ --
+ -- Note: aspect specification nodes are linked only when evaluation of the
+ -- expression is deferred to the freeze point. For further details see
+ -- Sem_Ch13.Analyze_Aspect_Specifications.
function Get_Attribute_Definition_Clause
(E : Entity_Id;
-- value returned is the N_Attribute_Definition_Clause node, otherwise
-- Empty is returned.
+ function Get_Rep_Item_For_Entity
+ (E : Entity_Id;
+ Nam : Name_Id) return Node_Id;
+ -- Searches the Rep_Item chain for a given entity E, for an instance of a
+ -- rep item (pragma, attribute definition clause, or aspect specitication)
+ -- whose name matches the given name. If one is found, it is returned,
+ -- otherwise Empty is returned. Unlike the other Get routines for the
+ -- Rep_Item chain, this only returns items whose entity matches E (it
+ -- does not return items from the parent chain).
+
+ function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id;
+ -- Searches the Rep_Item chain for a given entity E, for a record
+ -- representation clause, and if found, returns it. Returns Empty
+ -- if no such clause is found.
+
function Get_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Node_Id;
-- Searches the Rep_Item chain for the given entity E, for an instance
-- a representation pragma with the given name Nam. If found then the
-- is returned, otherwise False indicates that no matching entry was found.
procedure Record_Rep_Item (E : Entity_Id; N : Node_Id);
- -- N is the node for either a representation pragma or an attribute
- -- definition clause that applies to entity E. This procedure links the
- -- node N onto the Rep_Item chain for entity E. Note that it is an error to
- -- call this procedure with E being overloadable, and N being a pragma that
- -- can apply to multiple overloadable entities (i.e. Convention, Interface,
- -- Inline, Inline_Always, Import, Export, External). This is not allowed
- -- even if in fact the entity is not overloaded, since we can't rely on
- -- it being present in the overloaded case, it is not useful to have it
- -- present in the non-overloaded case.
+ -- N is the node for a representation pragma, representation clause, an
+ -- attribute definition clause, or an aspect specification that applies to
+ -- entity E. This procedure links the node N onto the Rep_Item chain for
+ -- entity E. Note that it is an error to call this procedure with E being
+ -- overloadable, and N being a pragma that applies to multiple overloadable
+ -- entities (Convention, Interface, Inline, Inline_Always, Import, Export,
+ -- External). This is not allowed even in the case where the entity is not
+ -- overloaded, since we can't rely on it being present in the overloaded
+ -- case, it is not useful to have it present in the non-overloaded case.
-------------------------------
-- Miscellaneous Subprograms --
-- Add an entity to the list of entities declared in the scope V
function Get_Full_View (T : Entity_Id) return Entity_Id;
- -- If T is an incomplete type and the full declaration has been
- -- seen, or is the name of a class_wide type whose root is incomplete.
- -- return the corresponding full declaration.
+ -- If T is an incomplete type and the full declaration has been seen, or
+ -- is the name of a class_wide type whose root is incomplete, return the
+ -- corresponding full declaration, else return T itself.
function Is_Entity_Name (N : Node_Id) return Boolean;
-- Test if the node N is the name of an entity (i.e. is an identifier,
procedure Write_Field26_Name (Id : Entity_Id);
procedure Write_Field27_Name (Id : Entity_Id);
procedure Write_Field28_Name (Id : Entity_Id);
- -- These routines are used to output a nice symbolic name for the given
- -- field, depending on the Ekind. No blanks or end of lines are output,
- -- just the characters of the field name.
+ procedure Write_Field29_Name (Id : Entity_Id);
+ -- These routines are used in Treepr to output a nice symbolic name for
+ -- the given field, depending on the Ekind. No blanks or end of lines are
+ -- output, just the characters of the field name.
--------------------
-- Inline Pragmas --
pragma Inline (Corresponding_Concurrent_Type);
pragma Inline (Corresponding_Discriminant);
pragma Inline (Corresponding_Equality);
+ pragma Inline (Corresponding_Protected_Entry);
pragma Inline (Corresponding_Record_Type);
pragma Inline (Corresponding_Remote_Type);
pragma Inline (Current_Use_Clause);
pragma Inline (Dependent_Instances);
pragma Inline (Depends_On_Private);
pragma Inline (Digits_Value);
+ pragma Inline (Direct_Primitive_Operations);
pragma Inline (Directly_Designated_Type);
pragma Inline (Discard_Names);
pragma Inline (Discriminal);
pragma Inline (Can_Use_Internal_Rep);
pragma Inline (Finalization_Chain_Entity);
pragma Inline (First_Entity);
+ pragma Inline (First_Exit_Statement);
pragma Inline (First_Index);
pragma Inline (First_Literal);
pragma Inline (First_Optional_Parameter);
pragma Inline (Has_Controlled_Component);
pragma Inline (Has_Controlling_Result);
pragma Inline (Has_Convention_Pragma);
+ pragma Inline (Has_Delayed_Aspects);
pragma Inline (Has_Delayed_Freeze);
pragma Inline (Has_Discriminants);
pragma Inline (Has_Dispatch_Table);
pragma Inline (Has_Fully_Qualified_Name);
pragma Inline (Has_Gigi_Rep_Item);
pragma Inline (Has_Homonym);
+ pragma Inline (Has_Inheritable_Invariants);
pragma Inline (Has_Initial_Value);
+ pragma Inline (Has_Invariants);
pragma Inline (Has_Machine_Radix_Clause);
pragma Inline (Has_Master_Entity);
pragma Inline (Has_Missing_Return);
pragma Inline (Has_Pragma_Elaborate_Body);
pragma Inline (Has_Pragma_Inline);
pragma Inline (Has_Pragma_Inline_Always);
+ pragma Inline (Has_Pragma_Ordered);
pragma Inline (Has_Pragma_Pack);
pragma Inline (Has_Pragma_Preelab_Init);
pragma Inline (Has_Pragma_Pure);
pragma Inline (Has_Pragma_Unmodified);
pragma Inline (Has_Pragma_Unreferenced);
pragma Inline (Has_Pragma_Unreferenced_Objects);
+ pragma Inline (Has_Predicates);
pragma Inline (Has_Primitive_Operations);
pragma Inline (Has_Private_Declaration);
pragma Inline (Has_Qualified_Name);
pragma Inline (Has_Xref_Entry);
pragma Inline (Hiding_Loop_Variable);
pragma Inline (Homonym);
- pragma Inline (Implemented_By_Entry);
pragma Inline (Interfaces);
pragma Inline (In_Package_Body);
pragma Inline (In_Private_Part);
pragma Inline (Is_Abstract_Type);
pragma Inline (Is_Access_Constant);
pragma Inline (Is_Ada_2005_Only);
+ pragma Inline (Is_Ada_2012_Only);
pragma Inline (Is_Access_Type);
pragma Inline (Is_Access_Protected_Subprogram_Type);
pragma Inline (Is_Access_Subprogram_Type);
+ pragma Inline (Is_Aggregate_Type);
pragma Inline (Is_Aliased);
pragma Inline (Is_Array_Type);
pragma Inline (Is_Assignable);
pragma Inline (Is_Private_Descendant);
pragma Inline (Is_Private_Primitive);
pragma Inline (Is_Private_Type);
- pragma Inline (Is_Protected_Interface);
pragma Inline (Is_Protected_Type);
pragma Inline (Is_Public);
pragma Inline (Is_Pure);
pragma Inline (Is_Signed_Integer_Type);
pragma Inline (Is_Statically_Allocated);
pragma Inline (Is_Subprogram);
- pragma Inline (Is_Synchronized_Interface);
pragma Inline (Is_Tag);
pragma Inline (Is_Tagged_Type);
- pragma Inline (Is_Task_Interface);
pragma Inline (Is_True_Constant);
pragma Inline (Is_Task_Type);
pragma Inline (Is_Thunk);
pragma Inline (Is_Trivial_Subprogram);
pragma Inline (Is_Type);
pragma Inline (Is_Unchecked_Union);
+ pragma Inline (Is_Underlying_Record_View);
pragma Inline (Is_Unsigned_Type);
pragma Inline (Is_VMS_Exception);
pragma Inline (Is_Valued_Procedure);
pragma Inline (Limited_View);
pragma Inline (Lit_Indexes);
pragma Inline (Lit_Strings);
- pragma Inline (Low_Bound_Known);
+ pragma Inline (Low_Bound_Tested);
pragma Inline (Machine_Radix_10);
pragma Inline (Master_Id);
pragma Inline (Materialize_Entity);
pragma Inline (Normalized_First_Bit);
pragma Inline (Normalized_Position);
pragma Inline (Normalized_Position_Max);
+ pragma Inline (OK_To_Reference);
+ pragma Inline (OK_To_Rename);
pragma Inline (OK_To_Reorder_Components);
pragma Inline (Optimize_Alignment_Space);
pragma Inline (Optimize_Alignment_Time);
pragma Inline (Packed_Array_Type);
pragma Inline (Parameter_Mode);
pragma Inline (Parent_Subtype);
- pragma Inline (Primitive_Operations);
+ pragma Inline (Postcondition_Proc);
+ pragma Inline (PPC_Wrapper);
pragma Inline (Prival);
pragma Inline (Prival_Link);
pragma Inline (Private_Dependents);
pragma Inline (Referenced);
pragma Inline (Referenced_As_LHS);
pragma Inline (Referenced_As_Out_Parameter);
- pragma Inline (Referenced_Object);
pragma Inline (Register_Exception_Call);
pragma Inline (Related_Array_Object);
+ pragma Inline (Related_Expression);
pragma Inline (Related_Instance);
pragma Inline (Related_Type);
pragma Inline (Relative_Deadline_Variable);
pragma Inline (Strict_Alignment);
pragma Inline (String_Literal_Length);
pragma Inline (String_Literal_Low_Bound);
+ pragma Inline (Subprograms_For_Type);
pragma Inline (Suppress_Elaboration_Warnings);
pragma Inline (Suppress_Init_Proc);
pragma Inline (Suppress_Style_Checks);
pragma Inline (Task_Body_Procedure);
pragma Inline (Treat_As_Volatile);
pragma Inline (Underlying_Full_View);
+ pragma Inline (Underlying_Record_View);
pragma Inline (Universal_Aliasing);
pragma Inline (Unset_Reference);
pragma Inline (Used_As_Generic_Actual);
pragma Inline (Uses_Sec_Stack);
- pragma Inline (Vax_Float);
pragma Inline (Warnings_Off);
pragma Inline (Warnings_Off_Used);
pragma Inline (Warnings_Off_Used_Unmodified);
pragma Inline (Set_Corresponding_Concurrent_Type);
pragma Inline (Set_Corresponding_Discriminant);
pragma Inline (Set_Corresponding_Equality);
+ pragma Inline (Set_Corresponding_Protected_Entry);
pragma Inline (Set_Corresponding_Record_Type);
pragma Inline (Set_Corresponding_Remote_Type);
pragma Inline (Set_Current_Use_Clause);
pragma Inline (Set_Dependent_Instances);
pragma Inline (Set_Depends_On_Private);
pragma Inline (Set_Digits_Value);
+ pragma Inline (Set_Direct_Primitive_Operations);
pragma Inline (Set_Directly_Designated_Type);
pragma Inline (Set_Discard_Names);
pragma Inline (Set_Discriminal);
pragma Inline (Set_Can_Use_Internal_Rep);
pragma Inline (Set_Finalization_Chain_Entity);
pragma Inline (Set_First_Entity);
+ pragma Inline (Set_First_Exit_Statement);
pragma Inline (Set_First_Index);
pragma Inline (Set_First_Literal);
pragma Inline (Set_First_Optional_Parameter);
pragma Inline (Set_Has_Controlled_Component);
pragma Inline (Set_Has_Controlling_Result);
pragma Inline (Set_Has_Convention_Pragma);
+ pragma Inline (Set_Has_Delayed_Aspects);
pragma Inline (Set_Has_Delayed_Freeze);
pragma Inline (Set_Has_Discriminants);
pragma Inline (Set_Has_Dispatch_Table);
pragma Inline (Set_Has_Fully_Qualified_Name);
pragma Inline (Set_Has_Gigi_Rep_Item);
pragma Inline (Set_Has_Homonym);
+ pragma Inline (Set_Has_Inheritable_Invariants);
pragma Inline (Set_Has_Initial_Value);
+ pragma Inline (Set_Has_Invariants);
pragma Inline (Set_Has_Machine_Radix_Clause);
pragma Inline (Set_Has_Master_Entity);
pragma Inline (Set_Has_Missing_Return);
pragma Inline (Set_Has_Pragma_Elaborate_Body);
pragma Inline (Set_Has_Pragma_Inline);
pragma Inline (Set_Has_Pragma_Inline_Always);
+ pragma Inline (Set_Has_Pragma_Ordered);
pragma Inline (Set_Has_Pragma_Pack);
pragma Inline (Set_Has_Pragma_Preelab_Init);
pragma Inline (Set_Has_Pragma_Pure);
pragma Inline (Set_Has_Pragma_Unmodified);
pragma Inline (Set_Has_Pragma_Unreferenced);
pragma Inline (Set_Has_Pragma_Unreferenced_Objects);
+ pragma Inline (Set_Has_Predicates);
pragma Inline (Set_Has_Primitive_Operations);
pragma Inline (Set_Has_Private_Declaration);
pragma Inline (Set_Has_Qualified_Name);
pragma Inline (Set_Has_Xref_Entry);
pragma Inline (Set_Hiding_Loop_Variable);
pragma Inline (Set_Homonym);
- pragma Inline (Set_Implemented_By_Entry);
pragma Inline (Set_Interfaces);
pragma Inline (Set_In_Package_Body);
pragma Inline (Set_In_Private_Part);
pragma Inline (Set_Is_Abstract_Type);
pragma Inline (Set_Is_Access_Constant);
pragma Inline (Set_Is_Ada_2005_Only);
+ pragma Inline (Set_Is_Ada_2012_Only);
pragma Inline (Set_Is_Aliased);
pragma Inline (Set_Is_Asynchronous);
pragma Inline (Set_Is_Atomic);
pragma Inline (Set_Is_Private_Composite);
pragma Inline (Set_Is_Private_Descendant);
pragma Inline (Set_Is_Private_Primitive);
- pragma Inline (Set_Is_Protected_Interface);
pragma Inline (Set_Is_Public);
pragma Inline (Set_Is_Pure);
pragma Inline (Set_Is_Pure_Unit_Access_Type);
pragma Inline (Set_Is_Return_Object);
pragma Inline (Set_Is_Shared_Passive);
pragma Inline (Set_Is_Statically_Allocated);
- pragma Inline (Set_Is_Synchronized_Interface);
pragma Inline (Set_Is_Tag);
pragma Inline (Set_Is_Tagged_Type);
- pragma Inline (Set_Is_Task_Interface);
pragma Inline (Set_Is_Thunk);
pragma Inline (Set_Is_Trivial_Subprogram);
pragma Inline (Set_Is_True_Constant);
pragma Inline (Set_Is_Unchecked_Union);
+ pragma Inline (Set_Is_Underlying_Record_View);
pragma Inline (Set_Is_Unsigned_Type);
pragma Inline (Set_Is_VMS_Exception);
pragma Inline (Set_Is_Valued_Procedure);
pragma Inline (Set_Limited_View);
pragma Inline (Set_Lit_Indexes);
pragma Inline (Set_Lit_Strings);
- pragma Inline (Set_Low_Bound_Known);
+ pragma Inline (Set_Low_Bound_Tested);
pragma Inline (Set_Machine_Radix_10);
pragma Inline (Set_Master_Id);
pragma Inline (Set_Materialize_Entity);
pragma Inline (Set_Normalized_Position);
pragma Inline (Set_Normalized_Position_Max);
pragma Inline (Set_OK_To_Reorder_Components);
+ pragma Inline (Set_OK_To_Reference);
+ pragma Inline (Set_OK_To_Rename);
pragma Inline (Set_Optimize_Alignment_Space);
pragma Inline (Set_Optimize_Alignment_Time);
pragma Inline (Set_Original_Array_Type);
pragma Inline (Set_Package_Instantiation);
pragma Inline (Set_Packed_Array_Type);
pragma Inline (Set_Parent_Subtype);
- pragma Inline (Set_Primitive_Operations);
+ pragma Inline (Set_Postcondition_Proc);
+ pragma Inline (Set_PPC_Wrapper);
pragma Inline (Set_Prival);
pragma Inline (Set_Prival_Link);
pragma Inline (Set_Private_Dependents);
pragma Inline (Set_Referenced);
pragma Inline (Set_Referenced_As_LHS);
pragma Inline (Set_Referenced_As_Out_Parameter);
- pragma Inline (Set_Referenced_Object);
pragma Inline (Set_Register_Exception_Call);
pragma Inline (Set_Related_Array_Object);
+ pragma Inline (Set_Related_Expression);
pragma Inline (Set_Related_Instance);
pragma Inline (Set_Related_Type);
pragma Inline (Set_Renamed_Entity);
pragma Inline (Set_Strict_Alignment);
pragma Inline (Set_String_Literal_Length);
pragma Inline (Set_String_Literal_Low_Bound);
+ pragma Inline (Set_Subprograms_For_Type);
pragma Inline (Set_Suppress_Elaboration_Warnings);
pragma Inline (Set_Suppress_Init_Proc);
pragma Inline (Set_Suppress_Style_Checks);
pragma Inline (Set_Task_Body_Procedure);
pragma Inline (Set_Treat_As_Volatile);
pragma Inline (Set_Underlying_Full_View);
+ pragma Inline (Set_Underlying_Record_View);
pragma Inline (Set_Universal_Aliasing);
pragma Inline (Set_Unset_Reference);
pragma Inline (Set_Used_As_Generic_Actual);
pragma Inline (Set_Uses_Sec_Stack);
- pragma Inline (Set_Vax_Float);
pragma Inline (Set_Warnings_Off);
pragma Inline (Set_Warnings_Off_Used);
pragma Inline (Set_Warnings_Off_Used_Unmodified);