X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=blobdiff_plain;f=gcc%2Fada%2Feinfo.ads;h=0dd6bdd702722e48b888e5dc644a866636b3fc50;hp=c2657dc32643bf901283f27701791b6b47f28d4b;hb=7b9b2f05a09e0a5e6085ffdde39e0eb6d5f7d4cf;hpb=4c1612fbf55a42f1ea8476091b8bc482092ab05b diff --git a/gcc/ada/einfo.ads b/gcc/ada/einfo.ads index c2657dc3264..0dd6bdd7027 100644 --- a/gcc/ada/einfo.ads +++ b/gcc/ada/einfo.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2011, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2012, 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- -- @@ -442,6 +442,11 @@ package Einfo is -- declaration, the associated_node_for_itype is the discriminant -- specification. For an access parameter it is the enclosing subprogram -- declaration. +-- +-- Itypes have no explicit declaration, and therefore are not attached to +-- the tree: their Parent field is always empty. The Associated_Node_For_ +-- Itype is the only way to determine the construct that leads to the +-- creation of a given itype entity. -- Associated_Storage_Pool (Node22) [root type only] -- Present in simple and general access type entities. References the @@ -743,6 +748,14 @@ package Einfo is -- default expressions (see Freeze.Process_Default_Expressions), which -- would not only waste time, but also generate false error messages. +-- Default_Aspect_Value (Node19) +-- Present in scalar types. Holds the static value specified in a +-- default_value aspect specification for the type. + +-- Default_Aspect_Component_Value (Node19) +-- Present in array types. Holds the static value specified in a +-- default_component_value aspect specification for the array type. + -- Default_Value (Node20) -- Present in formal parameters. Points to the node representing the -- expression for the default value for the parameter. Empty if the @@ -812,10 +825,11 @@ package Einfo is -- Present in access types. This field points to the type that is -- directly designated by the access type. In the case of an access -- type to an incomplete type, this field references the incomplete --- type. Note that in the semantic processing, what is useful in --- nearly all cases is the full type designated by the access type. --- The function Designated_Type obtains this full type in the case of --- access to an incomplete type. +-- type. Directly_Designated_Type is typically used in implementing the +-- static semantics of the language; in implementing dynamic semantics, +-- we typically want the full view of the designated type. The function +-- Designated_Type obtains this full type in the case of access to an +-- incomplete type. -- Discard_Names (Flag88) -- Present in types and exception entities. Set if pragma Discard_Names @@ -1115,9 +1129,9 @@ package Einfo is -- or entry. Returns Empty if there are no extra formals. -- Extra_Accessibility (Node13) --- Present in formal parameters in the non-generic case if expansion is --- active. Normally Empty, but if a parameter is one for which a dynamic --- accessibility check is required, then an extra formal of type +-- Present in formal parameters in the non-generic case. Normally Empty, +-- but if expansion is active, and a parameter is one for which a +-- dynamic accessibility check is required, then an extra formal of type -- Natural is created (see description of field Extra_Formal), and the -- Extra_Accessibility field of the formal parameter points to the entity -- for this extra formal. Also present in variables when compiling @@ -1126,9 +1140,18 @@ package Einfo is -- must be retrieved through the entity designed by this field instead of -- being computed. +-- Extra_Accessibility_Of_Result (Node19) +-- Present in (non-generic) Function, Operator, and Subprogram_Type +-- entities. Normally Empty, but if expansion is active, and a function +-- is one for which "the accessibility level of the result ... determined +-- by the point of call" (AI05-0234) is needed, then an extra formal of +-- subtype Natural is created (see description of field Extra_Formal), +-- and the Extra_Accessibility_Of_Result field of the function points to +-- the entity for this extra formal. + -- Extra_Constrained (Node23) --- Present in formal parameters in the non-generic case if expansion is --- active. Normally Empty, but if a parameter is one for which a dynamic +-- Present in formal parameters in the non-generic case. Normally Empty, +-- but if expansion is active and a parameter is one for which a dynamic -- indication of its constrained status is required, then an extra formal -- of type Boolean is created (see description of field Extra_Formal), -- and the Extra_Constrained field of the formal parameter points to the @@ -1405,6 +1428,11 @@ package Einfo is -- type has no discriminants and the full view has discriminants with -- defaults. In Ada 2005 heap-allocated objects of such types are not -- constrained, and can change their discriminants with full assignment. +-- Sem_Aux.Effectively_Has_Constrained_Partial_View should be always +-- used by callers, rather than reading this attribute directly because, +-- according to RM 3.10.2 (27/2), untagged generic formal private types +-- and subtypes are also considered to have a constrained partial view +-- [when in a generic body]. -- Has_Contiguous_Rep (Flag181) -- Present in enumeration types. True if the type as a representation @@ -2252,7 +2280,7 @@ package Einfo is -- Is_Generic_Type (Flag13) -- 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. +-- the Ekind cannot be used to identify generic formal types. -- Is_Generic_Unit (synthesized) -- Applies to all entities. Yields True for a generic unit (generic @@ -2278,6 +2306,12 @@ package Einfo is -- Present in all entities. Set if entity is immediately visible, i.e. -- is defined in some currently open scope (RM 8.3(4)). +-- Is_Implementation_Defined (Flag254) +-- Present in all entities. Set if a pragma Implementation_Defined is +-- applied to the pragma. Used to mark all implementation defined +-- identifiers in standard library packages, and to implement the +-- restriction No_Implementation_Identifiers. + -- Is_Imported (Flag24) -- Present in all entities. Set if the entity is imported. For now we -- only allow the import of exceptions, functions, procedures, packages. @@ -2454,11 +2488,11 @@ package Einfo is -- Is_Local_Anonymous_Access (Flag194) -- Present in access types. Set for an anonymous access type to indicate -- that the type is created for a record component with an access --- definition, an array component, or (pre-Ada2012) a stand-alone object. +-- definition, an array component, or (pre-Ada 2012) a standalone object. -- Such anonymous types have an accessibility level equal to that of the -- declaration in which they appear, unlike the anonymous access types -- that are created for access parameters, access discriminants, and --- (as of Ada2012) stand-alone objects. +-- (as of Ada 2012) stand-alone objects. -- Is_Machine_Code_Subprogram (Flag137) -- Present in subprogram entities. Set to indicate that the subprogram @@ -2695,6 +2729,8 @@ package Einfo is -- Present in all entities. Set in E_Package and E_Generic_Package -- entities to which a pragma Remote_Types is applied, and also on -- entities declared in the visible part of the spec of such a package. +-- Also set for types which are generic formal types to which the +-- pragma Remote_Access_Type applies. -- Is_Renaming_Of_Object (Flag112) -- Present in all entities, set only for a variable or constant for @@ -2839,11 +2875,10 @@ package Einfo is -- visible by selected notation, or not. -- Is_Visible_Formal (Flag206) --- Present in all entities. Set for instances of the formals of a formal --- package. Indicates that the entity must be made visible in the body --- of the instance, to reproduce the visibility of the generic. This --- simplifies visibility settings in instance bodies. --- ??? confusion in above comments between being present and being set +-- Present in all entities. Set True for instances of the formals of a +-- formal package. Indicates that the entity must be made visible in the +-- body of the instance, to reproduce the visibility of the generic. +-- This simplifies visibility settings in instance bodies. -- Is_VMS_Exception (Flag133) -- Present in all entities. Set only for exception entities where the @@ -3422,7 +3457,7 @@ package Einfo is -- register call to make appropriate entries in the special tables -- used for handling these pragmas at runtime. --- Related_Array_Object (Node19) +-- Related_Array_Object (Node25) -- Present in array types and subtypes. Used only for the base type -- and subtype created for an anonymous array object. Set to point -- to the entity of the corresponding array object. Currently used @@ -4791,6 +4826,7 @@ package Einfo is -- Is_Hidden (Flag57) -- Is_Hidden_Open_Scope (Flag171) -- Is_Immediately_Visible (Flag7) + -- Is_Implementation_Defined (Flag254) -- Is_Imported (Flag24) -- Is_Inlined (Flag11) -- Is_Internal (Flag17) @@ -4988,11 +5024,12 @@ package Einfo is -- E_Array_Type -- E_Array_Subtype -- First_Index (Node17) - -- Related_Array_Object (Node19) + -- Default_Aspect_Component_Value (Node19) -- Component_Type (Node20) (base type only) -- Original_Array_Type (Node21) -- Component_Size (Uint22) (base type only) -- Packed_Array_Type (Node23) + -- Related_Array_Object (Node25) -- Component_Alignment (special) (base type only) -- Has_Component_Size_Clause (Flag68) (base type only) -- Has_Pragma_Pack (Flag121) (impl base type only) @@ -5167,6 +5204,7 @@ package Einfo is -- Lit_Indexes (Node15) (root type only) -- Lit_Strings (Node16) (root type only) -- First_Literal (Node17) + -- Default_Aspect_Value (Node19) -- Scalar_Range (Node20) -- Enum_Pos_To_Rep (Node23) (type only) -- Static_Predicate (List25) @@ -5198,6 +5236,7 @@ package Einfo is -- E_Floating_Point_Subtype -- Digits_Value (Uint17) -- Float_Rep (Uint10) (Float_Rep_Kind) + -- Default_Aspect_Value (Node19) -- Scalar_Range (Node20) -- Machine_Emax_Value (synth) -- Machine_Emin_Value (synth) @@ -5230,6 +5269,7 @@ package Einfo is -- First_Entity (Node17) -- Alias (Node18) (non-generic case only) -- Renamed_Entity (Node18) (generic case only) + -- Extra_Accessibility_Of_Result (Node19) (non-generic case only) -- Last_Entity (Node20) -- Interface_Name (Node21) -- Scope_Depth_Value (Uint22) @@ -5368,6 +5408,7 @@ package Einfo is -- E_Modular_Integer_Type -- E_Modular_Integer_Subtype -- Modulus (Uint17) (base type only) + -- Default_Aspect_Value (Node19) -- Original_Array_Type (Node21) -- Scalar_Range (Node20) -- Static_Predicate (List25) @@ -5384,6 +5425,7 @@ package Einfo is -- E_Operator -- First_Entity (Node17) -- Alias (Node18) + -- Extra_Accessibility_Of_Result (Node19) -- Last_Entity (Node20) -- Overridden_Operation (Node26) -- Subprograms_For_Type (Node29) @@ -5401,6 +5443,7 @@ package Einfo is -- E_Ordinary_Fixed_Point_Type -- E_Ordinary_Fixed_Point_Subtype -- Delta_Value (Ureal18) + -- Default_Aspect_Value (Node19) -- Scalar_Range (Node20) -- Small_Value (Ureal21) -- Has_Small_Clause (Flag67) @@ -5642,6 +5685,7 @@ package Einfo is -- E_Signed_Integer_Type -- E_Signed_Integer_Subtype + -- Default_Aspect_Value (Node19) -- Scalar_Range (Node20) -- Static_Predicate (List25) -- Has_Biased_Representation (Flag139) @@ -5675,6 +5719,7 @@ package Einfo is -- Scope_Depth (synth) -- E_Subprogram_Type + -- Extra_Accessibility_Of_Result (Node19) -- Directly_Designated_Type (Node20) -- Extra_Formals (Node28) -- First_Formal (synth) @@ -6027,6 +6072,8 @@ package Einfo is function DT_Position (Id : E) return U; function Default_Expr_Function (Id : E) return E; function Default_Expressions_Processed (Id : E) return B; + function Default_Aspect_Value (Id : E) return N; + function Default_Aspect_Component_Value (Id : E) return N; function Default_Value (Id : E) return N; function Delay_Cleanups (Id : E) return B; function Delay_Subprogram_Descriptors (Id : E) return B; @@ -6063,6 +6110,7 @@ package Einfo is function Esize (Id : E) return U; function Exception_Code (Id : E) return U; function Extra_Accessibility (Id : E) return E; + function Extra_Accessibility_Of_Result (Id : E) return E; function Extra_Constrained (Id : E) return E; function Extra_Formal (Id : E) return E; function Extra_Formals (Id : E) return E; @@ -6209,6 +6257,7 @@ package Einfo is function Is_Hidden (Id : E) return B; function Is_Hidden_Open_Scope (Id : E) return B; function Is_Immediately_Visible (Id : E) return B; + function Is_Implementation_Defined (Id : E) return B; function Is_Imported (Id : E) return B; function Is_Inlined (Id : E) return B; function Is_Interface (Id : E) return B; @@ -6616,6 +6665,8 @@ package Einfo is procedure Set_DT_Position (Id : E; V : U); procedure Set_Default_Expr_Function (Id : E; V : E); procedure Set_Default_Expressions_Processed (Id : E; V : B := True); + procedure Set_Default_Aspect_Value (Id : E; V : N); + procedure Set_Default_Aspect_Component_Value (Id : E; V : N); procedure Set_Default_Value (Id : E; V : N); procedure Set_Delay_Cleanups (Id : E; V : B := True); procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True); @@ -6651,6 +6702,7 @@ package Einfo is procedure Set_Esize (Id : E; V : U); procedure Set_Exception_Code (Id : E; V : U); procedure Set_Extra_Accessibility (Id : E; V : E); + procedure Set_Extra_Accessibility_Of_Result (Id : E; V : E); procedure Set_Extra_Constrained (Id : E; V : E); procedure Set_Extra_Formal (Id : E; V : E); procedure Set_Extra_Formals (Id : E; V : E); @@ -6802,6 +6854,7 @@ package Einfo is procedure Set_Is_Hidden (Id : E; V : B := True); procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True); procedure Set_Is_Immediately_Visible (Id : E; V : B := True); + procedure Set_Is_Implementation_Defined (Id : E; V : B := True); procedure Set_Is_Imported (Id : E; V : B := True); procedure Set_Is_Inlined (Id : E; V : B := True); procedure Set_Is_Interface (Id : E; V : B := True); @@ -7319,6 +7372,8 @@ package Einfo is pragma Inline (Default_Expr_Function); pragma Inline (Default_Expressions_Processed); pragma Inline (Default_Value); + pragma Inline (Default_Aspect_Value); + pragma Inline (Default_Aspect_Component_Value); pragma Inline (Delay_Cleanups); pragma Inline (Delay_Subprogram_Descriptors); pragma Inline (Delta_Value); @@ -7354,6 +7409,7 @@ package Einfo is pragma Inline (Esize); pragma Inline (Exception_Code); pragma Inline (Extra_Accessibility); + pragma Inline (Extra_Accessibility_Of_Result); pragma Inline (Extra_Constrained); pragma Inline (Extra_Formal); pragma Inline (Extra_Formals); @@ -7526,6 +7582,7 @@ package Einfo is pragma Inline (Is_Hidden); pragma Inline (Is_Hidden_Open_Scope); pragma Inline (Is_Immediately_Visible); + pragma Inline (Is_Implementation_Defined); pragma Inline (Is_Imported); pragma Inline (Is_Incomplete_Or_Private_Type); pragma Inline (Is_Incomplete_Type); @@ -7798,6 +7855,7 @@ package Einfo is pragma Inline (Set_Esize); pragma Inline (Set_Exception_Code); pragma Inline (Set_Extra_Accessibility); + pragma Inline (Set_Extra_Accessibility_Of_Result); pragma Inline (Set_Extra_Constrained); pragma Inline (Set_Extra_Formal); pragma Inline (Set_Extra_Formals); @@ -7947,6 +8005,7 @@ package Einfo is pragma Inline (Set_Is_Hidden); pragma Inline (Set_Is_Hidden_Open_Scope); pragma Inline (Set_Is_Immediately_Visible); + pragma Inline (Set_Is_Implementation_Defined); pragma Inline (Set_Is_Imported); pragma Inline (Set_Is_Inlined); pragma Inline (Set_Is_Interface);