Index: sinfo.ads =================================================================== --- sinfo.ads (revision 118179) +++ sinfo.ads (working copy) @@ -35,8 +35,7 @@ -- package provides a basic tree structure. Sinfo describes how this structure -- is used to represent the syntax of an Ada program. --- Note: the grammar used here is taken from Version 5.95 of the RM, dated --- November 1994. The grammar in the RM is followed very closely in the tree +-- The grammar in the RM is followed very closely in the tree -- design, and is repeated as part of this source file. -- The tree contains not only the full syntactic representation of the @@ -46,9 +45,8 @@ -- would normally be regarded as the symbol table information. In addition a -- number of the tree nodes contain semantic information. --- WARNING: There is a C version of this package. Any changes to this source --- file must be properly reflected in this C header file sinfo.h which is --- created automatically from sinfo.ads using xsinfo.adb. +-- WARNING: Several files are automatically generated from this package. +-- See below for details. with Types; use Types; with Uintp; use Uintp; @@ -77,7 +75,7 @@ package Sinfo is -- fields. -- In addition, if any of the standard expression fields is changed, then - -- the utiliy program which creates the Treeprs spec (in file treeprs.ads) + -- the utility program which creates the Treeprs spec (in file treeprs.ads) -- must be updated appropriately, since it special cases expression fields. -- If a new tree node is added, then the following changes are made @@ -104,8 +102,8 @@ package Sinfo is -- utility reads sinfo.ads and sinfo.adb and generates a report to -- standard output. - -- Run XSinfo to create a-sinfo.h, the corresponding C header. This - -- utility reads sinfo.ads and generates a-sinfo.h. Note that it does + -- Run XSinfo to create sinfo.h, the corresponding C header. This + -- utility reads sinfo.ads and generates sinfo.h. Note that it does -- not need to read sinfo.adb, since the contents of the body are -- algorithmically determinable from the spec. @@ -119,6 +117,9 @@ package Sinfo is -- spec of the Nmake package which contains functions for constructing -- nodes. + -- All of the above steps except CSinfo are done automatically by the + -- build scripts when you do a full bootstrap. + -- Note: sometime we could write a utility that actually generated the body -- of sinfo from the spec instead of simply checking it, since, as noted -- above, the contents of the body can be determined from the spec. @@ -539,7 +540,7 @@ package Sinfo is -- unit node at the library level for such a subprogram (see further -- description in spec of Lib package). - -- Actual_Designated_Subtype (Node2-Sem) + -- Actual_Designated_Subtype (Node4-Sem) -- Present in N_Free_Statement and N_Explicit_Dereference nodes. If gigi -- needs to known the dynamic constrained subtype of the designated -- object, this attribute is set to that type. This is done for @@ -626,10 +627,11 @@ package Sinfo is -- permitted (in Ada 83 or Ada 95). -- By_Ref (Flag5-Sem) - -- A flag present in the N_Return_Statement_Node. It is set when the - -- returned expression is already allocated on the secondary stack and - -- thus the result is passed by reference rather than copied another - -- time. + -- A flag present in N_Return_Statement and + -- N_Extended_Return_Statement. + -- It is set when the returned expression is already allocated on the + -- secondary stack and thus the result is passed by reference rather + -- than copied another time. -- Check_Address_Alignment (Flag11-Sem) -- A flag present in N_Attribute_Definition clause for a 'Address @@ -640,6 +642,11 @@ package Sinfo is -- attribute definition clause is given, rather than testing this at the -- freeze point. + -- Comes_From_Extended_Return_Statement (Flag18-Sem) + -- Present in N_Return_Statement nodes. True if this node was + -- constructed as part of the expansion of an + -- N_Extended_Return_Statement. + -- Compile_Time_Known_Aggregate (Flag18-Sem) -- Present in N_Aggregate nodes. Set for aggregates which can be fully -- evaluated at compile time without raising constraint error. Such @@ -686,11 +693,11 @@ package Sinfo is -- node for the body itself). -- Corresponding_Formal_Spec (Node3-Sem) - -- This field is set in subprogram renaming declarations, where it points - -- to the defining entity for a formal subprogram in the case where the - -- renaming corresponds to a generic formal subprogram association in an - -- instantiation. The field is Empty if the renaming does not correspond - -- to such a formal association. + -- This field is set in subprogram renaming declarations, where it points + -- to the defining entity for a formal subprogram in the case where the + -- renaming corresponds to a generic formal subprogram association in an + -- instantiation. The field is Empty if the renaming does not correspond + -- to such a formal association. -- Corresponding_Generic_Association (Node5-Sem) -- This field is defined for object declarations and object renaming @@ -838,7 +845,8 @@ package Sinfo is -- Do_Tag_Check (Flag13-Sem) -- This flag is set on an N_Assignment_Statement, N_Function_Call, - -- N_Procedure_Call_Statement, N_Type_Conversion or N_Return_Statememt + -- N_Procedure_Call_Statement, N_Type_Conversion, + -- N_Return_Statement, or N_Extended_Return_Statement -- node to indicate that the tag check can be suppressed. It is not -- yet decided how this flag is used (TBD ???). @@ -899,7 +907,13 @@ package Sinfo is -- which is used during generic processing (see Sem_Ch12 for details). -- Note also that in generic templates, this means that the Entity field -- does not always point to an Entity. Since the back end is expected to - -- ignore generic templates, this is harmless. + -- ignore generic templates, this is harmless. Note that this field also + -- appears in N_Attribute_Definition_Clause nodes. It is used only for + -- stream attributes definition clauses. In this case, it denotes a + -- (possibly dummy) subprogram entity that is conceptually declared at + -- the point of the clause. Thus the visibility of the attribute + -- definition clause (in the sense of 8.3(23) as amended by AI-195) can + -- be checked by testing the visibility of that subprogram. -- Entity_Or_Associated_Node (Node4-Sem) -- A synonym for both Entity and Associated_Node. Used by convention in @@ -1002,7 +1016,7 @@ package Sinfo is -- ali file. -- Generic_Parent (Node5-Sem) - -- Generic_parent is defined on declaration nodes that are instances. The + -- Generic_Parent is defined on declaration nodes that are instances. The -- value of Generic_Parent is the generic entity from which the instance -- is obtained. Generic_Parent is also defined for the renaming -- declarations and object declarations created for the actuals in an @@ -1048,6 +1062,12 @@ package Sinfo is -- declarations if the visibility at instantiation is different from the -- visibility at generic definition. + -- Has_Self_Reference (Flag13-Sem) + -- Present in N_Aggregate and N_Extension_Aggregate. Indicates that one + -- of the expressions contains an access attribute reference to the + -- enclosing type. Such a self-reference can only appear in default- + -- initialized aggregate for a record type. + -- Has_Storage_Size_Pragma (Flag5-Sem) -- A flag present in an N_Task_Definition node to flag the presence of a -- Storage_Size pragma. @@ -1107,6 +1127,11 @@ package Sinfo is -- a dispatching call. It is off in all other cases. See Sem_Disp for -- details of its use. + -- Is_Entry_Barrier_Function (Flag8-Sem) + -- This flag is set in an N_Subprogram_Body node which is the expansion + -- of an entry barrier from a protected entry body. It is used for the + -- circuitry checking for incorrect use of Current_Task. + -- Is_In_Discriminant_Check (Flag11-Sem) -- This flag is present in a selected component, and is used to indicate -- that the reference occurs within a discriminant check. The @@ -1270,7 +1295,7 @@ package Sinfo is -- points to the explicit actual parameter itself, not to the -- N_Parameter_Association node (its parent). - -- Next_Rep_Item (Node4-Sem) + -- Next_Rep_Item (Node5-Sem) -- Present in pragma nodes and attribute definition nodes. Used to link -- representation items that apply to an entity. See description of -- First_Rep_Item field in Einfo for full details. @@ -1389,11 +1414,12 @@ package Sinfo is -- legality or semantics of program, only on the displayed output. This -- is used to clarify output from the packed array cases. - -- Procedure_To_Call (Node4-Sem) - -- Present in N_Allocator, N_Free_Statement, and N_Return_Statement - -- nodes. References the entity for the declaration of the procedure to - -- be called to accomplish the required operation (i.e. for the Allocate - -- procedure in the case of N_Allocator and N_Return_Statement (for + -- Procedure_To_Call (Node2-Sem) + -- Present in N_Allocator, N_Free_Statement, N_Return_Statement, + -- and N_Extended_Return_Statement nodes. References the entity for the + -- declaration of the procedure to be called to accomplish the required + -- operation (i.e. for the Allocate procedure in the case of N_Allocator + -- and N_Return_Statement and N_Extended_Return_Statement (for -- allocating the return value), and for the Deallocate procedure in the -- case of N_Free_Statement. @@ -1415,10 +1441,16 @@ package Sinfo is -- to indicate that a use is redundant (and therefore need not be undone -- on scope exit). - -- Return_Type (Node2-Sem) - -- Present in N_Return_Statement node. For a procedure, this is set to - -- Standard_Void_Type. For a function it references the entity for the - -- returned type. + -- Return_Statement_Entity (Node5-Sem) + -- Present in N_Return_Statement and N_Extended_Return_Statement. + -- Points to an E_Return_Statement representing the return statement. + + -- Return_Object_Declarations (List3) + -- Present in N_Extended_Return_Statement. + -- Points to a list initially containing a single + -- N_Object_Declaration representing the return object. + -- We use a list (instead of just a pointer to the object decl) + -- because Analyze wants to insert extra actions on this list. -- Rounded_Result (Flag18-Sem) -- Present in N_Type_Conversion, N_Op_Divide and N_Op_Multiply nodes. @@ -1460,7 +1492,8 @@ package Sinfo is -- Static_Processing_OK flag set. -- Storage_Pool (Node1-Sem) - -- Present in N_Allocator, N_Free_Statement and N_Return_Statement nodes. + -- Present in N_Allocator, N_Free_Statement, N_Return_Statement, + -- and N_Extended_Return_Statement nodes. -- References the entity for the storage pool to be used for the allocate -- or free call or for the allocation of the returned value from a -- function. Empty indicates that the global default default pool is to @@ -1769,7 +1802,7 @@ package Sinfo is -- Chars (Name1) identifier name from pragma identifier -- Pragma_Argument_Associations (List2) (set to No_List if none) -- Debug_Statement (Node3) (set to Empty if not Debug, Assert) - -- Next_Rep_Item (Node4-Sem) + -- Next_Rep_Item (Node5-Sem) -- Note: we should have a section on what pragmas are passed on to -- the back end to be processed. This section should note that pragma @@ -2060,8 +2093,8 @@ package Sinfo is -- [abstract] [limited] new [NULL_EXCLUSION] parent_SUBTYPE_INDICATION -- [[and INTERFACE_LIST] RECORD_EXTENSION_PART] - -- Note: ABSTRACT, LIMITED and record extension part are not permitted - -- in Ada 83 mode + -- Note: ABSTRACT, LIMITED and record extension part are not permitted + -- in Ada 83 mode -- Note: a record extension part is required if ABSTRACT is present @@ -2078,9 +2111,9 @@ package Sinfo is -- Interface_List (List2) (set to No_List if none) -- Interface_Present (Flag16) set in abstract interfaces - -- Note: Task_Present, Protected_Present, Synchronized_Present, - -- Interface_List, and Interface_Present are used for abstract - -- interfaces (see comments for INTERFACE_TYPE_DEFINITION). + -- Note: Task_Present, Protected_Present, Synchronized_Present, + -- Interface_List, and Interface_Present are used for abstract + -- interfaces (see comments for INTERFACE_TYPE_DEFINITION). --------------------------- -- 3.5 Range Constraint -- @@ -2847,7 +2880,7 @@ package Sinfo is -- N_Explicit_Dereference -- Sloc points to ALL -- Prefix (Node3) - -- Actual_Designated_Subtype (Node2-Sem) + -- Actual_Designated_Subtype (Node4-Sem) -- plus fields for expression ------------------------------- @@ -3057,6 +3090,7 @@ package Sinfo is -- Static_Processing_OK (Flag4-Sem) -- Compile_Time_Known_Aggregate (Flag18-Sem) -- Expansion_Delayed (Flag11-Sem) + -- Has_Self_Reference (Flag13-Sem) -- plus fields for expression -- Note: this structure is used for both record and array aggregates @@ -3067,12 +3101,15 @@ package Sinfo is -- syntax. In particular, for a record aggregate, the expressions -- field will be set if there are positional associations. + -- Note: N_Aggregate is not used for all aggregates; in particular, + -- there is a separate node kind for extension aggregates. + -- Note: gigi/gcc can handle array aggregates correctly providing that -- they are entirely positional, and the array subtype involved has a -- known at compile time length and is not bit packed, or a convention -- Fortran array with more than one dimension. If these conditions -- are not met, then the front end must translate the aggregate into - -- an appropriate set of assignments into a temporary. + -- an appropriate set of assignments into a temporary. -- Note: for the record aggregate case, gigi/gcc can handle all cases -- of record aggregates, including those for packed, and rep-claused @@ -3143,6 +3180,7 @@ package Sinfo is -- Component_Associations (List2) (set to No_List if none) -- Null_Record_Present (Flag17) -- Expansion_Delayed (Flag11-Sem) + -- Has_Self_Reference (Flag13-Sem) -- plus fields for expression -------------------------- @@ -3563,7 +3601,7 @@ package Sinfo is -- Expression (Node3) subtype indication or qualified expression -- Null_Exclusion_Present (Flag11) -- Storage_Pool (Node1-Sem) - -- Procedure_To_Call (Node4-Sem) + -- Procedure_To_Call (Node2-Sem) -- No_Initialization (Flag13-Sem) -- Do_Storage_Check (Flag17-Sem) -- plus fields for expression @@ -3598,12 +3636,12 @@ package Sinfo is -- 5.1 Simple Statement -- --------------------------- - -- SIMPLE_STATEMENT ::= NULL_STATEMENT - -- | ASSIGNMENT_STATEMENT | EXIT_STATEMENT - -- | GOTO_STATEMENT | PROCEDURE_CALL_STATEMENT - -- | RETURN_STATEMENT | ENTRY_CALL_STATEMENT - -- | REQUEUE_STATEMENT | DELAY_STATEMENT - -- | ABORT_STATEMENT | RAISE_STATEMENT + -- SIMPLE_STATEMENT ::= NULL_STATEMENT + -- | ASSIGNMENT_STATEMENT | EXIT_STATEMENT + -- | GOTO_STATEMENT | PROCEDURE_CALL_STATEMENT + -- | SIMPLE_RETURN_STATEMENT | ENTRY_CALL_STATEMENT + -- | REQUEUE_STATEMENT | DELAY_STATEMENT + -- | ABORT_STATEMENT | RAISE_STATEMENT -- | CODE_STATEMENT ----------------------------- @@ -3611,9 +3649,10 @@ package Sinfo is ----------------------------- -- COMPOUND_STATEMENT ::= - -- IF_STATEMENT | CASE_STATEMENT - -- | LOOP_STATEMENT | BLOCK_STATEMENT - -- | ACCEPT_STATEMENT | SELECT_STATEMENT + -- IF_STATEMENT | CASE_STATEMENT + -- | LOOP_STATEMENT | BLOCK_STATEMENT + -- | EXTENDED_RETURN_STATEMENT + -- | ACCEPT_STATEMENT | SELECT_STATEMENT ------------------------- -- 5.1 Null Statement -- @@ -4129,6 +4168,7 @@ package Sinfo is -- Do_Storage_Check (Flag17-Sem) -- Has_Priority_Pragma (Flag6-Sem) -- Is_Protected_Subprogram_Body (Flag7-Sem) + -- Is_Entry_Barrier_Function (Flag8-Sem) -- Is_Task_Master (Flag5-Sem) -- Was_Originally_Stub (Flag13-Sem) @@ -4210,8 +4250,7 @@ package Sinfo is -- N_Parameter_Association -- Sloc points to formal parameter - -- Selector_Name (Node2) (always non-Empty, since this node is - -- only used if a formal parameter selector name is present) + -- Selector_Name (Node2) (always non-Empty) -- Explicit_Actual_Parameter (Node3) -- Next_Named_Actual (Node4-Sem) @@ -4225,19 +4264,65 @@ package Sinfo is -- 6.5 Return Statement -- --------------------------- - -- RETURN_STATEMENT ::= return [EXPRESSION]; + -- RETURN_STATEMENT ::= return [EXPRESSION]; -- Ada 95 + + -- In Ada 2005, we have: + + -- SIMPLE_RETURN_STATEMENT ::= return [EXPRESSION]; + + -- EXTENDED_RETURN_STATEMENT ::= + -- return DEFINING_IDENTIFIER : [aliased] RETURN_SUBTYPE_INDICATION + -- [:= EXPRESSION] [do + -- HANDLED_SEQUENCE_OF_STATEMENTS + -- end return]; + + -- RETURN_SUBTYPE_INDICATION ::= SUBTYPE_INDICATION | ACCESS_DEFINITION + + -- So in Ada 2005, RETURN_STATEMENT is no longer a nonterminal -- N_Return_Statement -- Sloc points to RETURN + -- Return_Statement_Entity (Node5-Sem) -- Expression (Node3) (set to Empty if no expression present) -- Storage_Pool (Node1-Sem) - -- Procedure_To_Call (Node4-Sem) + -- Procedure_To_Call (Node2-Sem) + -- Do_Tag_Check (Flag13-Sem) + -- By_Ref (Flag5-Sem) + -- Comes_From_Extended_Return_Statement (Flag18-Sem) + + -- ???N_Return_Statement represents a simple_return_statement, + -- and should be renamed to N_Simple_Return_Statement. + + -- Note: Return_Statement_Entity points to an E_Return_Statement + + -- If a range check is required, then Do_Range_Check is set on the + -- Expression. The check is against the return subtype of the function. + + -- N_Extended_Return_Statement + -- Sloc points to RETURN + -- Return_Statement_Entity (Node5-Sem) + -- Return_Object_Declarations (List3) + -- Handled_Statement_Sequence (Node4) (set to Empty if not present) + -- Storage_Pool (Node1-Sem) + -- Procedure_To_Call (Node2-Sem) -- Do_Tag_Check (Flag13-Sem) - -- Return_Type (Node2-Sem) -- By_Ref (Flag5-Sem) - -- Note: if a range check is required, then Do_Range_Check is set - -- on the Expression. The range check is against Return_Type. + -- Note: Return_Statement_Entity points to an E_Return_Statement. + -- Note that Return_Object_Declarations is a list containing the + -- N_Object_Declaration -- see comment on this field above. + -- The declared object will have Is_Return_Object = True. + -- There is no such syntactic category as return_object_declaration + -- in the RM. Return_Object_Declarations represents this portion of + -- the syntax for EXTENDED_RETURN_STATEMENT: + -- DEFINING_IDENTIFIER : [aliased] RETURN_SUBTYPE_INDICATION + -- [:= EXPRESSION] + + -- There are two entities associated with an extended_return_statement: + -- the Return_Statement_Entity represents the statement itself, and the + -- Defining_Identifier of the Object_Declaration in + -- Return_Object_Declarations represents the object being + -- returned. N_Return_Statement has only the former. ------------------------------ -- 7.1 Package Declaration -- @@ -4327,11 +4412,12 @@ package Sinfo is -- PRIVATE_EXTENSION_DECLARATION ::= -- type DEFINING_IDENTIFIER [DISCRIMINANT_PART] is - -- [abstract] [limited] new ancestor_SUBTYPE_INDICATION - -- [and INTERFACE_LIST] with private; + -- [abstract] [limited | synchronized] + -- new ancestor_SUBTYPE_INDICATION [and INTERFACE_LIST] + -- with private; - -- Note: LIMITED, and private extension declarations are not allowed - -- in Ada 83 mode. + -- Note: LIMITED, and private extension declarations are not allowed + -- in Ada 83 mode. -- N_Private_Extension_Declaration -- Sloc points to TYPE @@ -4341,6 +4427,7 @@ package Sinfo is -- Unknown_Discriminants_Present (Flag13) set if (<>) discriminant -- Abstract_Present (Flag4) -- Limited_Present (Flag17) + -- Synchronized_Present (Flag7) -- Subtype_Indication (Node5) -- Interface_List (List2) (set to No_List if none) @@ -4392,8 +4479,10 @@ package Sinfo is -------------------------------------- -- OBJECT_RENAMING_DECLARATION ::= - -- DEFINING_IDENTIFIER : SUBTYPE_MARK renames object_NAME; - -- | DEFINING_IDENTIFIER : ACCESS_DEFINITION renames object_NAME; + -- DEFINING_IDENTIFIER : + -- [NULL_EXCLUSION] SUBTYPE_MARK renames object_NAME; + -- | DEFINING_IDENTIFIER : + -- ACCESS_DEFINITION renames object_NAME; -- Note: Access_Definition is an optional field that gives support to -- Ada 2005 (AI-230). The parser generates nodes that have either the @@ -4402,6 +4491,7 @@ package Sinfo is -- N_Object_Renaming_Declaration -- Sloc points to first identifier -- Defining_Identifier (Node1) + -- Null_Exclusion_Present (Flag11) (set to False if not present) -- Subtype_Mark (Node4) (set to Empty if not present) -- Access_Definition (Node3) (set to Empty if not present) -- Name (Node2) @@ -5589,18 +5679,23 @@ package Sinfo is -- GENERIC_ASSOCIATION ::= -- [generic_formal_parameter_SELECTOR_NAME =>] - -- EXPLICIT_GENERIC_ACTUAL_PARAMETER -- Note: unlike the procedure call case, a generic association node -- is generated for every association, even if no formal is present. -- In this case the parser will leave the Selector_Name field set -- to Empty, to be filled in later by the semantic pass. + -- In Ada 2005, a formal may be associated with a box, if the + -- association is part of the list of actuals for a formal package. + -- If the association is given by OTHERS => <>, the association is + -- an N_Others_Choice. + -- N_Generic_Association -- Sloc points to first token of generic association -- Selector_Name (Node2) (set to Empty if no formal -- parameter selector name) - -- Explicit_Generic_Actual_Parameter (Node1) + -- Explicit_Generic_Actual_Parameter (Node1) (Empty if box present) + -- Box_Present (Flag15) (for formal_package associations with a box) --------------------------------------------- -- 12.3 Explicit Generic Actual Parameter -- @@ -5616,7 +5711,9 @@ package Sinfo is -- FORMAL_OBJECT_DECLARATION ::= -- DEFINING_IDENTIFIER_LIST : - -- MODE SUBTYPE_MARK [:= DEFAULT_EXPRESSION]; + -- MODE [NULL_EXCLUSION] SUBTYPE_MARK [:= DEFAULT_EXPRESSION]; + -- | DEFINING_IDENTIFIER_LIST : + -- MODE ACCESS_DEFINITION [:= DEFAULT_EXPRESSION]; -- Although the syntax allows multiple identifiers in the list, the -- semantics is as though successive declarations were given with @@ -5631,8 +5728,10 @@ package Sinfo is -- Defining_Identifier (Node1) -- In_Present (Flag15) -- Out_Present (Flag17) - -- Subtype_Mark (Node4) - -- Expression (Node3) (set to Empty if no default expression) + -- Null_Exclusion_Present (Flag11) (set to False if not present) + -- Subtype_Mark (Node4) (set to Empty if not present) + -- Access_Definition (Node3) (set to Empty if not present) + -- Default_Expression (Node5) (set to Empty if no default expression) -- More_Ids (Flag5) (set to False if no more identifiers in list) -- Prev_Ids (Flag6) (set to False if no previous identifiers in list) @@ -5689,7 +5788,7 @@ package Sinfo is -------------------------------------------- -- FORMAL_DERIVED_TYPE_DEFINITION ::= - -- [abstract] [limited] + -- [abstract] [limited | synchronized] -- new SUBTYPE_MARK [[and INTERFACE_LIST] with private] -- Note: this construct is not allowed in Ada 83 mode @@ -5699,6 +5798,7 @@ package Sinfo is -- Private_Present (Flag15) -- Abstract_Present (Flag4) -- Limited_Present (Flag17) + -- Synchronized_Present (Flag7) -- Interface_List (List2) (set to No_List if none) --------------------------------------------- @@ -5857,11 +5957,21 @@ package Sinfo is -------------------------------------- -- FORMAL_PACKAGE_ACTUAL_PART ::= - -- (<>) | [GENERIC_ACTUAL_PART] - - -- There is no explicit node in the tree for a formal package - -- actual part. Instead the information appears in the parent node - -- (i.e. the formal package declaration node itself). + -- ([OTHERS] => <>) + -- | [GENERIC_ACTUAL_PART] + -- (FORMAL_PACKAGE_ASSOCIATION {. FORMAL_PACKAGE_ASSOCIATION} + + -- FORMAL_PACKAGE_ASSOCIATION ::= + -- GENERIC_ASSOCIATION + -- | GENERIC_FORMAL_PARAMETER_SELECTOR_NAME => <> + + -- There is no explicit node in the tree for a formal package actual + -- part. Instead the information appears in the parent node (i.e. the + -- formal package declaration node itself). + + -- There is no explicit node for a formal package association. All of + -- them are represented either by a generic association, possibly with + -- Box_Present, or by an N_Others_Choice. --------------------------------- -- 13.1 Representation clause -- @@ -5924,7 +6034,8 @@ package Sinfo is -- Name (Node2) the local name -- Chars (Name1) the identifier name from the attribute designator -- Expression (Node3) the expression or name - -- Next_Rep_Item (Node4-Sem) + -- Entity (Node4-Sem) + -- Next_Rep_Item (Node5-Sem) -- From_At_Mod (Flag4-Sem) -- Check_Address_Alignment (Flag11-Sem) @@ -5941,7 +6052,7 @@ package Sinfo is -- Sloc points to FOR -- Identifier (Node1) direct name -- Array_Aggregate (Node3) - -- Next_Rep_Item (Node4-Sem) + -- Next_Rep_Item (Node5-Sem) --------------------------------- -- 13.4 Enumeration aggregate -- @@ -5969,7 +6080,7 @@ package Sinfo is -- Identifier (Node1) direct name -- Mod_Clause (Node2) (set to Empty if no mod clause present) -- Component_Clauses (List3) - -- Next_Rep_Item (Node4-Sem) + -- Next_Rep_Item (Node5-Sem) ------------------------------ -- 13.5.1 Component clause -- @@ -6014,15 +6125,11 @@ package Sinfo is -- Asm_Insn'(Asm (...)); - -- or - - -- Asm_Insn'(Asm_Volatile (...)) - - -- See package System.Machine_Code in file s-maccod.ads for details - -- on the allowed parameters to Asm[_Volatile]. There are two ways - -- this node can arise, as a code statement, in which case the - -- expression is the qualified expression, or as a result of the - -- expansion of an intrinsic call to the Asm or Asm_Input procedure. + -- See package System.Machine_Code in file s-maccod.ads for details on + -- the allowed parameters to Asm. There are two ways this node can + -- arise, as a code statement, in which case the expression is the + -- qualified expression, or as a result of the expansion of an intrinsic + -- call to the Asm or Asm_Input procedure. -- N_Code_Statement -- Sloc points to first token of the expression @@ -6241,8 +6348,8 @@ package Sinfo is -- Sloc is copied from the unchecked deallocation call -- Expression (Node3) argument to unchecked deallocation call -- Storage_Pool (Node1-Sem) - -- Procedure_To_Call (Node4-Sem) - -- Actual_Designated_Subtype (Node2-Sem) + -- Procedure_To_Call (Node2-Sem) + -- Actual_Designated_Subtype (Node4-Sem) -- Note: in the case where a debug source file is generated, the Sloc -- for this node points to the FREE keyword in the Sprint file output. @@ -6640,7 +6747,7 @@ package Sinfo is N_Op_Subtract, -- N_Binary_Op, N_Op, N_Subexpr, N_Has_Treat_Fixed_As_Integer - -- N_Has_Etype, N_Has_Chars, N_Has_Entity + -- N_Has_Etype, N_Has_Chars, N_Has_Entity, N_Multiplying_Operator N_Op_Divide, N_Op_Mod, @@ -6689,16 +6796,21 @@ package Sinfo is N_Attribute_Reference, + -- N_Subexpr, N_Has_Etype, N_Membership_Test + + N_In, + N_Not_In, + -- N_Subexpr, N_Has_Etype N_And_Then, N_Conditional_Expression, N_Explicit_Dereference, N_Function_Call, - N_In, + N_Indexed_Component, N_Integer_Literal, - N_Not_In, + N_Null, N_Or_Else, N_Procedure_Call_Statement, @@ -6843,6 +6955,7 @@ package Sinfo is N_Raise_Statement, N_Requeue_Statement, N_Return_Statement, + N_Extended_Return_Statement, N_Selective_Accept, N_Timed_Entry_Call, @@ -7006,6 +7119,10 @@ package Sinfo is N_Op_Divide .. N_Op_Rem; + subtype N_Multiplying_Operator is Node_Kind range + N_Op_Divide .. + N_Op_Rem; + subtype N_Later_Decl_Item is Node_Kind range N_Task_Type_Declaration .. N_Generic_Subprogram_Declaration; @@ -7018,6 +7135,10 @@ package Sinfo is -- N_Protected_Body, which is a bit peculiar, but harmless since -- this cannot appear in Ada 83 mode anyway. + subtype N_Membership_Test is Node_Kind range + N_In .. + N_Not_In; + subtype N_Op is Node_Kind range N_Op_Add .. N_Op_Plus; @@ -7135,7 +7256,7 @@ package Sinfo is (N : Node_Id) return Boolean; -- Flag4 function Actual_Designated_Subtype - (N : Node_Id) return Node_Id; -- Node2 + (N : Node_Id) return Node_Id; -- Node4 function Aggregate_Bounds (N : Node_Id) return Node_Id; -- Node3 @@ -7206,6 +7327,9 @@ package Sinfo is function Choices (N : Node_Id) return List_Id; -- List1 + function Comes_From_Extended_Return_Statement + (N : Node_Id) return Boolean; -- Flag18 + function Compile_Time_Known_Aggregate (N : Node_Id) return Boolean; -- Flag18 @@ -7509,6 +7633,9 @@ package Sinfo is function Has_Private_View (N : Node_Id) return Boolean; -- Flag11 + function Has_Self_Reference + (N : Node_Id) return Boolean; -- Flag13 + function Has_Storage_Size_Pragma (N : Node_Id) return Boolean; -- Flag5 @@ -7563,6 +7690,9 @@ package Sinfo is function Is_Controlling_Actual (N : Node_Id) return Boolean; -- Flag16 + function Is_Entry_Barrier_Function + (N : Node_Id) return Boolean; -- Flag8 + function Is_In_Discriminant_Check (N : Node_Id) return Boolean; -- Flag11 @@ -7666,7 +7796,7 @@ package Sinfo is (N : Node_Id) return Node_Id; -- Node4 function Next_Rep_Item - (N : Node_Id) return Node_Id; -- Node4 + (N : Node_Id) return Node_Id; -- Node5 function Next_Use_Clause (N : Node_Id) return Node_Id; -- Node3 @@ -7756,7 +7886,7 @@ package Sinfo is (N : Node_Id) return Boolean; -- Flag15 function Procedure_To_Call - (N : Node_Id) return Node_Id; -- Node4 + (N : Node_Id) return Node_Id; -- Node2 function Proper_Body (N : Node_Id) return Node_Id; -- Node1 @@ -7794,8 +7924,11 @@ package Sinfo is function Result_Definition (N : Node_Id) return Node_Id; -- Node4 - function Return_Type - (N : Node_Id) return Node_Id; -- Node2 + function Return_Object_Declarations + (N : Node_Id) return List_Id; -- List3 + + function Return_Statement_Entity + (N : Node_Id) return Node_Id; -- Node5 function Reverse_Present (N : Node_Id) return Boolean; -- Flag15 @@ -7957,7 +8090,7 @@ package Sinfo is (N : Node_Id; Val : Boolean := True); -- Flag4 procedure Set_Actual_Designated_Subtype - (N : Node_Id; Val : Node_Id); -- Node2 + (N : Node_Id; Val : Node_Id); -- Node4 procedure Set_Aggregate_Bounds (N : Node_Id; Val : Node_Id); -- Node3 @@ -8028,6 +8161,9 @@ package Sinfo is procedure Set_Choices (N : Node_Id; Val : List_Id); -- List1 + procedure Set_Comes_From_Extended_Return_Statement + (N : Node_Id; Val : Boolean := True); -- Flag18 + procedure Set_Compile_Time_Known_Aggregate (N : Node_Id; Val : Boolean := True); -- Flag18 @@ -8328,6 +8464,9 @@ package Sinfo is procedure Set_Has_Private_View (N : Node_Id; Val : Boolean := True); -- Flag11 + procedure Set_Has_Self_Reference + (N : Node_Id; Val : Boolean := True); -- Flag13 + procedure Set_Has_Storage_Size_Pragma (N : Node_Id; Val : Boolean := True); -- Flag5 @@ -8382,6 +8521,9 @@ package Sinfo is procedure Set_Is_Controlling_Actual (N : Node_Id; Val : Boolean := True); -- Flag16 + procedure Set_Is_Entry_Barrier_Function + (N : Node_Id; Val : Boolean := True); -- Flag8 + procedure Set_Is_In_Discriminant_Check (N : Node_Id; Val : Boolean := True); -- Flag11 @@ -8485,7 +8627,7 @@ package Sinfo is (N : Node_Id; Val : Node_Id); -- Node4 procedure Set_Next_Rep_Item - (N : Node_Id; Val : Node_Id); -- Node4 + (N : Node_Id; Val : Node_Id); -- Node5 procedure Set_Next_Use_Clause (N : Node_Id; Val : Node_Id); -- Node3 @@ -8575,7 +8717,7 @@ package Sinfo is (N : Node_Id; Val : Boolean := True); -- Flag15 procedure Set_Procedure_To_Call - (N : Node_Id; Val : Node_Id); -- Node4 + (N : Node_Id; Val : Node_Id); -- Node2 procedure Set_Proper_Body (N : Node_Id; Val : Node_Id); -- Node1 @@ -8613,8 +8755,11 @@ package Sinfo is procedure Set_Result_Definition (N : Node_Id; Val : Node_Id); -- Node4 - procedure Set_Return_Type - (N : Node_Id; Val : Node_Id); -- Node2 + procedure Set_Return_Object_Declarations + (N : Node_Id; Val : List_Id); -- List3 + + procedure Set_Return_Statement_Entity + (N : Node_Id; Val : Node_Id); -- Node5 procedure Set_Reverse_Present (N : Node_Id; Val : Boolean := True); -- Flag15 @@ -8753,6 +8898,1511 @@ package Sinfo is -- other words, End_Span is set to the difference between S and -- Sloc (N), the starting location. + ----------------------------- + -- Syntactic Parent Tables -- + ----------------------------- + + -- These tables show for each node, and for each of the five fields, + -- whether the corresponding field is syntactic (True) or semantic (False). + -- Unused entries are also set to False. + + subtype Field_Num is Natural range 1 .. 5; + + Is_Syntactic_Field : constant array (Node_Kind, Field_Num) of Boolean := ( + + -- Following entries can be built automatically from the sinfo sources + -- using the makeisf utility (currently this program is in spitbol). + + N_Identifier => + (1 => True, -- Chars (Name1) + 2 => False, -- Original_Discriminant (Node2-Sem) + 3 => False, -- unused + 4 => False, -- Entity (Node4-Sem) + 5 => False), -- Etype (Node5-Sem) + + N_Integer_Literal => + (1 => False, -- unused + 2 => False, -- Original_Entity (Node2-Sem) + 3 => True, -- Intval (Uint3) + 4 => False, -- unused + 5 => False), -- Etype (Node5-Sem) + + N_Real_Literal => + (1 => False, -- unused + 2 => False, -- Original_Entity (Node2-Sem) + 3 => True, -- Realval (Ureal3) + 4 => False, -- Corresponding_Integer_Value (Uint4-Sem) + 5 => False), -- Etype (Node5-Sem) + + N_Character_Literal => + (1 => True, -- Chars (Name1) + 2 => True, -- Char_Literal_Value (Uint2) + 3 => False, -- unused + 4 => False, -- Entity (Node4-Sem) + 5 => False), -- Etype (Node5-Sem) + + N_String_Literal => + (1 => False, -- unused + 2 => False, -- unused + 3 => True, -- Strval (Str3) + 4 => False, -- unused + 5 => False), -- Etype (Node5-Sem) + + N_Pragma => + (1 => True, -- Chars (Name1) + 2 => True, -- Pragma_Argument_Associations (List2) + 3 => True, -- Debug_Statement (Node3) + 4 => False, -- Entity (Node4-Sem) + 5 => False), -- Next_Rep_Item (Node5-Sem) + + N_Pragma_Argument_Association => + (1 => True, -- Chars (Name1) + 2 => False, -- unused + 3 => True, -- Expression (Node3) + 4 => False, -- unused + 5 => False), -- unused + + N_Defining_Identifier => + (1 => True, -- Chars (Name1) + 2 => False, -- Next_Entity (Node2-Sem) + 3 => False, -- Scope (Node3-Sem) + 4 => False, -- unused + 5 => False), -- Etype (Node5-Sem) + + N_Full_Type_Declaration => + (1 => True, -- Defining_Identifier (Node1) + 2 => False, -- unused + 3 => True, -- Type_Definition (Node3) + 4 => True, -- Discriminant_Specifications (List4) + 5 => False), -- unused + + N_Subtype_Declaration => + (1 => True, -- Defining_Identifier (Node1) + 2 => False, -- unused + 3 => False, -- unused + 4 => False, -- Generic_Parent_Type (Node4-Sem) + 5 => True), -- Subtype_Indication (Node5) + + N_Subtype_Indication => + (1 => False, -- unused + 2 => False, -- unused + 3 => True, -- Constraint (Node3) + 4 => True, -- Subtype_Mark (Node4) + 5 => False), -- Etype (Node5-Sem) + + N_Object_Declaration => + (1 => True, -- Defining_Identifier (Node1) + 2 => False, -- Handler_List_Entry (Node2-Sem) + 3 => True, -- Expression (Node3) + 4 => True, -- Object_Definition (Node4) + 5 => False), -- Corresponding_Generic_Association (Node5-Sem) + + N_Number_Declaration => + (1 => True, -- Defining_Identifier (Node1) + 2 => False, -- unused + 3 => True, -- Expression (Node3) + 4 => False, -- unused + 5 => False), -- unused + + N_Derived_Type_Definition => + (1 => False, -- unused + 2 => True, -- Interface_List (List2) + 3 => True, -- Record_Extension_Part (Node3) + 4 => False, -- unused + 5 => True), -- Subtype_Indication (Node5) + + N_Range_Constraint => + (1 => False, -- unused + 2 => False, -- unused + 3 => False, -- unused + 4 => True, -- Range_Expression (Node4) + 5 => False), -- unused + + N_Range => + (1 => True, -- Low_Bound (Node1) + 2 => True, -- High_Bound (Node2) + 3 => False, -- unused + 4 => False, -- unused + 5 => False), -- Etype (Node5-Sem) + + N_Enumeration_Type_Definition => + (1 => True, -- Literals (List1) + 2 => False, -- unused + 3 => False, -- unused + 4 => True, -- End_Label (Node4) + 5 => False), -- unused + + N_Defining_Character_Literal => + (1 => True, -- Chars (Name1) + 2 => False, -- Next_Entity (Node2-Sem) + 3 => False, -- Scope (Node3-Sem) + 4 => False, -- unused + 5 => False), -- Etype (Node5-Sem) + + N_Signed_Integer_Type_Definition => + (1 => True, -- Low_Bound (Node1) + 2 => True, -- High_Bound (Node2) + 3 => False, -- unused + 4 => False, -- unused + 5 => False), -- unused + + N_Modular_Type_Definition => + (1 => False, -- unused + 2 => False, -- unused + 3 => True, -- Expression (Node3) + 4 => False, -- unused + 5 => False), -- unused + + N_Floating_Point_Definition => + (1 => False, -- unused + 2 => True, -- Digits_Expression (Node2) + 3 => False, -- unused + 4 => True, -- Real_Range_Specification (Node4) + 5 => False), -- unused + + N_Real_Range_Specification => + (1 => True, -- Low_Bound (Node1) + 2 => True, -- High_Bound (Node2) + 3 => False, -- unused + 4 => False, -- unused + 5 => False), -- unused + + N_Ordinary_Fixed_Point_Definition => + (1 => False, -- unused + 2 => False, -- unused + 3 => True, -- Delta_Expression (Node3) + 4 => True, -- Real_Range_Specification (Node4) + 5 => False), -- unused + + N_Decimal_Fixed_Point_Definition => + (1 => False, -- unused + 2 => True, -- Digits_Expression (Node2) + 3 => True, -- Delta_Expression (Node3) + 4 => True, -- Real_Range_Specification (Node4) + 5 => False), -- unused + + N_Digits_Constraint => + (1 => False, -- unused + 2 => True, -- Digits_Expression (Node2) + 3 => False, -- unused + 4 => True, -- Range_Constraint (Node4) + 5 => False), -- unused + + N_Unconstrained_Array_Definition => + (1 => False, -- unused + 2 => True, -- Subtype_Marks (List2) + 3 => False, -- unused + 4 => True, -- Component_Definition (Node4) + 5 => False), -- unused + + N_Constrained_Array_Definition => + (1 => False, -- unused + 2 => True, -- Discrete_Subtype_Definitions (List2) + 3 => False, -- unused + 4 => True, -- Component_Definition (Node4) + 5 => False), -- unused + + N_Component_Definition => + (1 => False, -- unused + 2 => False, -- unused + 3 => True, -- Access_Definition (Node3) + 4 => False, -- unused + 5 => True), -- Subtype_Indication (Node5) + + N_Discriminant_Specification => + (1 => True, -- Defining_Identifier (Node1) + 2 => False, -- unused + 3 => True, -- Expression (Node3) + 4 => False, -- unused + 5 => True), -- Discriminant_Type (Node5) + + N_Index_Or_Discriminant_Constraint => + (1 => True, -- Constraints (List1) + 2 => False, -- unused + 3 => False, -- unused + 4 => False, -- unused + 5 => False), -- unused + + N_Discriminant_Association => + (1 => True, -- Selector_Names (List1) + 2 => False, -- unused + 3 => True, -- Expression (Node3) + 4 => False, -- unused + 5 => False), -- unused + + N_Record_Definition => + (1 => True, -- Component_List (Node1) + 2 => True, -- Interface_List (List2) + 3 => False, -- unused + 4 => True, -- End_Label (Node4) + 5 => False), -- unused + + N_Component_List => + (1 => False, -- unused + 2 => False, -- unused + 3 => True, -- Component_Items (List3) + 4 => True, -- Variant_Part (Node4) + 5 => False), -- unused + + N_Component_Declaration => + (1 => True, -- Defining_Identifier (Node1) + 2 => False, -- unused + 3 => True, -- Expression (Node3) + 4 => True, -- Component_Definition (Node4) + 5 => False), -- unused + + N_Variant_Part => + (1 => True, -- Variants (List1) + 2 => True, -- Name (Node2) + 3 => False, -- unused + 4 => False, -- unused + 5 => False), -- unused + + N_Variant => + (1 => True, -- Component_List (Node1) + 2 => False, -- Enclosing_Variant (Node2-Sem) + 3 => False, -- Present_Expr (Uint3-Sem) + 4 => True, -- Discrete_Choices (List4) + 5 => False), -- Dcheck_Function (Node5-Sem) + + N_Others_Choice => + (1 => False, -- Others_Discrete_Choices (List1-Sem) + 2 => False, -- unused + 3 => False, -- unused + 4 => False, -- unused + 5 => False), -- unused + + N_Access_To_Object_Definition => + (1 => False, -- unused + 2 => False, -- unused + 3 => False, -- unused + 4 => False, -- unused + 5 => True), -- Subtype_Indication (Node5) + + N_Access_Function_Definition => + (1 => False, -- unused + 2 => False, -- unused + 3 => True, -- Parameter_Specifications (List3) + 4 => True, -- Result_Definition (Node4) + 5 => False), -- unused + + N_Access_Procedure_Definition => + (1 => False, -- unused + 2 => False, -- unused + 3 => True, -- Parameter_Specifications (List3) + 4 => False, -- unused + 5 => False), -- unused + + N_Access_Definition => + (1 => False, -- unused + 2 => False, -- unused + 3 => True, -- Access_To_Subprogram_Definition (Node3) + 4 => True, -- Subtype_Mark (Node4) + 5 => False), -- unused + + N_Incomplete_Type_Declaration => + (1 => True, -- Defining_Identifier (Node1) + 2 => False, -- unused + 3 => False, -- unused + 4 => True, -- Discriminant_Specifications (List4) + 5 => False), -- unused + + N_Explicit_Dereference => + (1 => False, -- unused + 2 => False, -- unused + 3 => True, -- Prefix (Node3) + 4 => False, -- Actual_Designated_Subtype (Node4-Sem) + 5 => False), -- Etype (Node5-Sem) + + N_Indexed_Component => + (1 => True, -- Expressions (List1) + 2 => False, -- unused + 3 => True, -- Prefix (Node3) + 4 => False, -- unused + 5 => False), -- Etype (Node5-Sem) + + N_Slice => + (1 => False, -- unused + 2 => False, -- unused + 3 => True, -- Prefix (Node3) + 4 => True, -- Discrete_Range (Node4) + 5 => False), -- Etype (Node5-Sem) + + N_Selected_Component => + (1 => False, -- unused + 2 => True, -- Selector_Name (Node2) + 3 => True, -- Prefix (Node3) + 4 => False, -- unused + 5 => False), -- Etype (Node5-Sem) + + N_Attribute_Reference => + (1 => True, -- Expressions (List1) + 2 => True, -- Attribute_Name (Name2) + 3 => True, -- Prefix (Node3) + 4 => False, -- Entity (Node4-Sem) + 5 => False), -- Etype (Node5-Sem) + + N_Aggregate => + (1 => True, -- Expressions (List1) + 2 => True, -- Component_Associations (List2) + 3 => False, -- Aggregate_Bounds (Node3-Sem) + 4 => False, -- unused + 5 => False), -- Etype (Node5-Sem) + + N_Component_Association => + (1 => True, -- Choices (List1) + 2 => False, -- Loop_Actions (List2-Sem) + 3 => True, -- Expression (Node3) + 4 => False, -- unused + 5 => False), -- unused + + N_Extension_Aggregate => + (1 => True, -- Expressions (List1) + 2 => True, -- Component_Associations (List2) + 3 => True, -- Ancestor_Part (Node3) + 4 => False, -- unused + 5 => False), -- Etype (Node5-Sem) + + N_Null => + (1 => False, -- unused + 2 => False, -- unused + 3 => False, -- unused + 4 => False, -- unused + 5 => False), -- Etype (Node5-Sem) + + N_And_Then => + (1 => False, -- Actions (List1-Sem) + 2 => True, -- Left_Opnd (Node2) + 3 => True, -- Right_Opnd (Node3) + 4 => False, -- unused + 5 => False), -- Etype (Node5-Sem) + + N_Or_Else => + (1 => False, -- Actions (List1-Sem) + 2 => True, -- Left_Opnd (Node2) + 3 => True, -- Right_Opnd (Node3) + 4 => False, -- unused + 5 => False), -- Etype (Node5-Sem) + + N_In => + (1 => False, -- unused + 2 => True, -- Left_Opnd (Node2) + 3 => True, -- Right_Opnd (Node3) + 4 => False, -- unused + 5 => False), -- Etype (Node5-Sem) + + N_Not_In => + (1 => False, -- unused + 2 => True, -- Left_Opnd (Node2) + 3 => True, -- Right_Opnd (Node3) + 4 => False, -- unused + 5 => False), -- Etype (Node5-Sem) + + N_Op_And => + (1 => True, -- Chars (Name1) + 2 => True, -- Left_Opnd (Node2) + 3 => True, -- Right_Opnd (Node3) + 4 => False, -- Entity (Node4-Sem) + 5 => False), -- Etype (Node5-Sem) + + N_Op_Or => + (1 => True, -- Chars (Name1) + 2 => True, -- Left_Opnd (Node2) + 3 => True, -- Right_Opnd (Node3) + 4 => False, -- Entity (Node4-Sem) + 5 => False), -- Etype (Node5-Sem) + + N_Op_Xor => + (1 => True, -- Chars (Name1) + 2 => True, -- Left_Opnd (Node2) + 3 => True, -- Right_Opnd (Node3) + 4 => False, -- Entity (Node4-Sem) + 5 => False), -- Etype (Node5-Sem) + + N_Op_Eq => + (1 => True, -- Chars (Name1) + 2 => True, -- Left_Opnd (Node2) + 3 => True, -- Right_Opnd (Node3) + 4 => False, -- Entity (Node4-Sem) + 5 => False), -- Etype (Node5-Sem) + + N_Op_Ne => + (1 => True, -- Chars (Name1) + 2 => True, -- Left_Opnd (Node2) + 3 => True, -- Right_Opnd (Node3) + 4 => False, -- Entity (Node4-Sem) + 5 => False), -- Etype (Node5-Sem) + + N_Op_Lt => + (1 => True, -- Chars (Name1) + 2 => True, -- Left_Opnd (Node2) + 3 => True, -- Right_Opnd (Node3) + 4 => False, -- Entity (Node4-Sem) + 5 => False), -- Etype (Node5-Sem) + + N_Op_Le => + (1 => True, -- Chars (Name1) + 2 => True, -- Left_Opnd (Node2) + 3 => True, -- Right_Opnd (Node3) + 4 => False, -- Entity (Node4-Sem) + 5 => False), -- Etype (Node5-Sem) + + N_Op_Gt => + (1 => True, -- Chars (Name1) + 2 => True, -- Left_Opnd (Node2) + 3 => True, -- Right_Opnd (Node3) + 4 => False, -- Entity (Node4-Sem) + 5 => False), -- Etype (Node5-Sem) + + N_Op_Ge => + (1 => True, -- Chars (Name1) + 2 => True, -- Left_Opnd (Node2) + 3 => True, -- Right_Opnd (Node3) + 4 => False, -- Entity (Node4-Sem) + 5 => False), -- Etype (Node5-Sem) + + N_Op_Add => + (1 => True, -- Chars (Name1) + 2 => True, -- Left_Opnd (Node2) + 3 => True, -- Right_Opnd (Node3) + 4 => False, -- Entity (Node4-Sem) + 5 => False), -- Etype (Node5-Sem) + + N_Op_Subtract => + (1 => True, -- Chars (Name1) + 2 => True, -- Left_Opnd (Node2) + 3 => True, -- Right_Opnd (Node3) + 4 => False, -- Entity (Node4-Sem) + 5 => False), -- Etype (Node5-Sem) + + N_Op_Concat => + (1 => True, -- Chars (Name1) + 2 => True, -- Left_Opnd (Node2) + 3 => True, -- Right_Opnd (Node3) + 4 => False, -- Entity (Node4-Sem) + 5 => False), -- Etype (Node5-Sem) + + N_Op_Multiply => + (1 => True, -- Chars (Name1) + 2 => True, -- Left_Opnd (Node2) + 3 => True, -- Right_Opnd (Node3) + 4 => False, -- Entity (Node4-Sem) + 5 => False), -- Etype (Node5-Sem) + + N_Op_Divide => + (1 => True, -- Chars (Name1) + 2 => True, -- Left_Opnd (Node2) + 3 => True, -- Right_Opnd (Node3) + 4 => False, -- Entity (Node4-Sem) + 5 => False), -- Etype (Node5-Sem) + + N_Op_Mod => + (1 => True, -- Chars (Name1) + 2 => True, -- Left_Opnd (Node2) + 3 => True, -- Right_Opnd (Node3) + 4 => False, -- Entity (Node4-Sem) + 5 => False), -- Etype (Node5-Sem) + + N_Op_Rem => + (1 => True, -- Chars (Name1) + 2 => True, -- Left_Opnd (Node2) + 3 => True, -- Right_Opnd (Node3) + 4 => False, -- Entity (Node4-Sem) + 5 => False), -- Etype (Node5-Sem) + + N_Op_Expon => + (1 => True, -- Chars (Name1) + 2 => True, -- Left_Opnd (Node2) + 3 => True, -- Right_Opnd (Node3) + 4 => False, -- Entity (Node4-Sem) + 5 => False), -- Etype (Node5-Sem) + + N_Op_Plus => + (1 => True, -- Chars (Name1) + 2 => False, -- unused + 3 => True, -- Right_Opnd (Node3) + 4 => False, -- Entity (Node4-Sem) + 5 => False), -- Etype (Node5-Sem) + + N_Op_Minus => + (1 => True, -- Chars (Name1) + 2 => False, -- unused + 3 => True, -- Right_Opnd (Node3) + 4 => False, -- Entity (Node4-Sem) + 5 => False), -- Etype (Node5-Sem) + + N_Op_Abs => + (1 => True, -- Chars (Name1) + 2 => False, -- unused + 3 => True, -- Right_Opnd (Node3) + 4 => False, -- Entity (Node4-Sem) + 5 => False), -- Etype (Node5-Sem) + + N_Op_Not => + (1 => True, -- Chars (Name1) + 2 => False, -- unused + 3 => True, -- Right_Opnd (Node3) + 4 => False, -- Entity (Node4-Sem) + 5 => False), -- Etype (Node5-Sem) + + N_Type_Conversion => + (1 => False, -- unused + 2 => False, -- unused + 3 => True, -- Expression (Node3) + 4 => True, -- Subtype_Mark (Node4) + 5 => False), -- Etype (Node5-Sem) + + N_Qualified_Expression => + (1 => False, -- unused + 2 => False, -- unused + 3 => True, -- Expression (Node3) + 4 => True, -- Subtype_Mark (Node4) + 5 => False), -- Etype (Node5-Sem) + + N_Allocator => + (1 => False, -- Storage_Pool (Node1-Sem) + 2 => False, -- Procedure_To_Call (Node2-Sem) + 3 => True, -- Expression (Node3) + 4 => False, -- unused + 5 => False), -- Etype (Node5-Sem) + + N_Null_Statement => + (1 => False, -- unused + 2 => False, -- unused + 3 => False, -- unused + 4 => False, -- unused + 5 => False), -- unused + + N_Label => + (1 => True, -- Identifier (Node1) + 2 => False, -- unused + 3 => False, -- unused + 4 => False, -- unused + 5 => False), -- unused + + N_Assignment_Statement => + (1 => False, -- unused + 2 => True, -- Name (Node2) + 3 => True, -- Expression (Node3) + 4 => False, -- unused + 5 => False), -- unused + + N_If_Statement => + (1 => True, -- Condition (Node1) + 2 => True, -- Then_Statements (List2) + 3 => True, -- Elsif_Parts (List3) + 4 => True, -- Else_Statements (List4) + 5 => True), -- End_Span (Uint5) + + N_Elsif_Part => + (1 => True, -- Condition (Node1) + 2 => True, -- Then_Statements (List2) + 3 => False, -- Condition_Actions (List3-Sem) + 4 => False, -- unused + 5 => False), -- unused + + N_Case_Statement => + (1 => False, -- unused + 2 => False, -- unused + 3 => True, -- Expression (Node3) + 4 => True, -- Alternatives (List4) + 5 => True), -- End_Span (Uint5) + + N_Case_Statement_Alternative => + (1 => False, -- unused + 2 => False, -- unused + 3 => True, -- Statements (List3) + 4 => True, -- Discrete_Choices (List4) + 5 => False), -- unused + + N_Loop_Statement => + (1 => True, -- Identifier (Node1) + 2 => True, -- Iteration_Scheme (Node2) + 3 => True, -- Statements (List3) + 4 => True, -- End_Label (Node4) + 5 => False), -- unused + + N_Iteration_Scheme => + (1 => True, -- Condition (Node1) + 2 => False, -- unused + 3 => False, -- Condition_Actions (List3-Sem) + 4 => True, -- Loop_Parameter_Specification (Node4) + 5 => False), -- unused + + N_Loop_Parameter_Specification => + (1 => True, -- Defining_Identifier (Node1) + 2 => False, -- unused + 3 => False, -- unused + 4 => True, -- Discrete_Subtype_Definition (Node4) + 5 => False), -- unused + + N_Block_Statement => + (1 => True, -- Identifier (Node1) + 2 => True, -- Declarations (List2) + 3 => False, -- Activation_Chain_Entity (Node3-Sem) + 4 => True, -- Handled_Statement_Sequence (Node4) + 5 => False), -- unused + + N_Exit_Statement => + (1 => True, -- Condition (Node1) + 2 => True, -- Name (Node2) + 3 => False, -- unused + 4 => False, -- unused + 5 => False), -- unused + + N_Goto_Statement => + (1 => False, -- unused + 2 => True, -- Name (Node2) + 3 => False, -- unused + 4 => False, -- unused + 5 => False), -- unused + + N_Subprogram_Declaration => + (1 => True, -- Specification (Node1) + 2 => False, -- unused + 3 => False, -- Body_To_Inline (Node3-Sem) + 4 => False, -- Parent_Spec (Node4-Sem) + 5 => False), -- Corresponding_Body (Node5-Sem) + + N_Abstract_Subprogram_Declaration => + (1 => True, -- Specification (Node1) + 2 => False, -- unused + 3 => False, -- unused + 4 => False, -- unused + 5 => False), -- unused + + N_Function_Specification => + (1 => True, -- Defining_Unit_Name (Node1) + 2 => False, -- Elaboration_Boolean (Node2-Sem) + 3 => True, -- Parameter_Specifications (List3) + 4 => True, -- Result_Definition (Node4) + 5 => False), -- Generic_Parent (Node5-Sem) + + N_Procedure_Specification => + (1 => True, -- Defining_Unit_Name (Node1) + 2 => False, -- Elaboration_Boolean (Node2-Sem) + 3 => True, -- Parameter_Specifications (List3) + 4 => False, -- unused + 5 => False), -- Generic_Parent (Node5-Sem) + + N_Designator => + (1 => True, -- Identifier (Node1) + 2 => True, -- Name (Node2) + 3 => False, -- unused + 4 => False, -- unused + 5 => False), -- unused + + N_Defining_Program_Unit_Name => + (1 => True, -- Defining_Identifier (Node1) + 2 => True, -- Name (Node2) + 3 => False, -- unused + 4 => False, -- unused + 5 => False), -- unused + + N_Operator_Symbol => + (1 => True, -- Chars (Name1) + 2 => False, -- unused + 3 => True, -- Strval (Str3) + 4 => False, -- Entity (Node4-Sem) + 5 => False), -- Etype (Node5-Sem) + + N_Defining_Operator_Symbol => + (1 => True, -- Chars (Name1) + 2 => False, -- Next_Entity (Node2-Sem) + 3 => False, -- Scope (Node3-Sem) + 4 => False, -- unused + 5 => False), -- Etype (Node5-Sem) + + N_Parameter_Specification => + (1 => True, -- Defining_Identifier (Node1) + 2 => True, -- Parameter_Type (Node2) + 3 => True, -- Expression (Node3) + 4 => False, -- unused + 5 => False), -- Default_Expression (Node5-Sem) + + N_Subprogram_Body => + (1 => True, -- Specification (Node1) + 2 => True, -- Declarations (List2) + 3 => False, -- Activation_Chain_Entity (Node3-Sem) + 4 => True, -- Handled_Statement_Sequence (Node4) + 5 => False), -- Corresponding_Spec (Node5-Sem) + + N_Procedure_Call_Statement => + (1 => False, -- Controlling_Argument (Node1-Sem) + 2 => True, -- Name (Node2) + 3 => True, -- Parameter_Associations (List3) + 4 => False, -- First_Named_Actual (Node4-Sem) + 5 => False), -- Etype (Node5-Sem) + + N_Function_Call => + (1 => False, -- Controlling_Argument (Node1-Sem) + 2 => True, -- Name (Node2) + 3 => True, -- Parameter_Associations (List3) + 4 => False, -- First_Named_Actual (Node4-Sem) + 5 => False), -- Etype (Node5-Sem) + + N_Parameter_Association => + (1 => False, -- unused + 2 => True, -- Selector_Name (Node2) + 3 => True, -- Explicit_Actual_Parameter (Node3) + 4 => False, -- Next_Named_Actual (Node4-Sem) + 5 => False), -- unused + + N_Return_Statement => + (1 => False, -- Storage_Pool (Node1-Sem) + 2 => False, -- Procedure_To_Call (Node2-Sem) + 3 => True, -- Expression (Node3) + 4 => False, -- unused + 5 => False), -- Return_Statement_Entity (Node5-Sem) + + N_Extended_Return_Statement => + (1 => False, -- Storage_Pool (Node1-Sem) + 2 => False, -- Procedure_To_Call (Node2-Sem) + 3 => True, -- Return_Object_Declarations (List3) + 4 => True, -- Handled_Statement_Sequence (Node4) + 5 => False), -- Return_Statement_Entity (Node5-Sem) + + N_Package_Declaration => + (1 => True, -- Specification (Node1) + 2 => False, -- unused + 3 => False, -- Activation_Chain_Entity (Node3-Sem) + 4 => False, -- Parent_Spec (Node4-Sem) + 5 => False), -- Corresponding_Body (Node5-Sem) + + N_Package_Specification => + (1 => True, -- Defining_Unit_Name (Node1) + 2 => True, -- Visible_Declarations (List2) + 3 => True, -- Private_Declarations (List3) + 4 => True, -- End_Label (Node4) + 5 => False), -- Generic_Parent (Node5-Sem) + + N_Package_Body => + (1 => True, -- Defining_Unit_Name (Node1) + 2 => True, -- Declarations (List2) + 3 => False, -- unused + 4 => True, -- Handled_Statement_Sequence (Node4) + 5 => False), -- Corresponding_Spec (Node5-Sem) + + N_Private_Type_Declaration => + (1 => True, -- Defining_Identifier (Node1) + 2 => False, -- unused + 3 => False, -- unused + 4 => True, -- Discriminant_Specifications (List4) + 5 => False), -- unused + + N_Private_Extension_Declaration => + (1 => True, -- Defining_Identifier (Node1) + 2 => True, -- Interface_List (List2) + 3 => False, -- unused + 4 => True, -- Discriminant_Specifications (List4) + 5 => True), -- Subtype_Indication (Node5) + + N_Use_Package_Clause => + (1 => False, -- unused + 2 => True, -- Names (List2) + 3 => False, -- Next_Use_Clause (Node3-Sem) + 4 => False, -- Hidden_By_Use_Clause (Elist4-Sem) + 5 => False), -- unused + + N_Use_Type_Clause => + (1 => False, -- unused + 2 => True, -- Subtype_Marks (List2) + 3 => False, -- Next_Use_Clause (Node3-Sem) + 4 => False, -- Hidden_By_Use_Clause (Elist4-Sem) + 5 => False), -- unused + + N_Object_Renaming_Declaration => + (1 => True, -- Defining_Identifier (Node1) + 2 => True, -- Name (Node2) + 3 => True, -- Access_Definition (Node3) + 4 => True, -- Subtype_Mark (Node4) + 5 => False), -- Corresponding_Generic_Association (Node5-Sem) + + N_Exception_Renaming_Declaration => + (1 => True, -- Defining_Identifier (Node1) + 2 => True, -- Name (Node2) + 3 => False, -- unused + 4 => False, -- unused + 5 => False), -- unused + + N_Package_Renaming_Declaration => + (1 => True, -- Defining_Unit_Name (Node1) + 2 => True, -- Name (Node2) + 3 => False, -- unused + 4 => False, -- Parent_Spec (Node4-Sem) + 5 => False), -- unused + + N_Subprogram_Renaming_Declaration => + (1 => True, -- Specification (Node1) + 2 => True, -- Name (Node2) + 3 => False, -- Corresponding_Formal_Spec (Node3-Sem) + 4 => False, -- Parent_Spec (Node4-Sem) + 5 => False), -- Corresponding_Spec (Node5-Sem) + + N_Generic_Package_Renaming_Declaration => + (1 => True, -- Defining_Unit_Name (Node1) + 2 => True, -- Name (Node2) + 3 => False, -- unused + 4 => False, -- Parent_Spec (Node4-Sem) + 5 => False), -- unused + + N_Generic_Procedure_Renaming_Declaration => + (1 => True, -- Defining_Unit_Name (Node1) + 2 => True, -- Name (Node2) + 3 => False, -- unused + 4 => False, -- Parent_Spec (Node4-Sem) + 5 => False), -- unused + + N_Generic_Function_Renaming_Declaration => + (1 => True, -- Defining_Unit_Name (Node1) + 2 => True, -- Name (Node2) + 3 => False, -- unused + 4 => False, -- Parent_Spec (Node4-Sem) + 5 => False), -- unused + + N_Task_Type_Declaration => + (1 => True, -- Defining_Identifier (Node1) + 2 => True, -- Interface_List (List2) + 3 => True, -- Task_Definition (Node3) + 4 => True, -- Discriminant_Specifications (List4) + 5 => False), -- Corresponding_Body (Node5-Sem) + + N_Single_Task_Declaration => + (1 => True, -- Defining_Identifier (Node1) + 2 => True, -- Interface_List (List2) + 3 => True, -- Task_Definition (Node3) + 4 => False, -- unused + 5 => False), -- unused + + N_Task_Definition => + (1 => False, -- unused + 2 => True, -- Visible_Declarations (List2) + 3 => True, -- Private_Declarations (List3) + 4 => True, -- End_Label (Node4) + 5 => False), -- unused + + N_Task_Body => + (1 => True, -- Defining_Identifier (Node1) + 2 => True, -- Declarations (List2) + 3 => False, -- Activation_Chain_Entity (Node3-Sem) + 4 => True, -- Handled_Statement_Sequence (Node4) + 5 => False), -- Corresponding_Spec (Node5-Sem) + + N_Protected_Type_Declaration => + (1 => True, -- Defining_Identifier (Node1) + 2 => True, -- Interface_List (List2) + 3 => True, -- Protected_Definition (Node3) + 4 => True, -- Discriminant_Specifications (List4) + 5 => False), -- Corresponding_Body (Node5-Sem) + + N_Single_Protected_Declaration => + (1 => True, -- Defining_Identifier (Node1) + 2 => True, -- Interface_List (List2) + 3 => True, -- Protected_Definition (Node3) + 4 => False, -- unused + 5 => False), -- unused + + N_Protected_Definition => + (1 => False, -- unused + 2 => True, -- Visible_Declarations (List2) + 3 => True, -- Private_Declarations (List3) + 4 => True, -- End_Label (Node4) + 5 => False), -- unused + + N_Protected_Body => + (1 => True, -- Defining_Identifier (Node1) + 2 => True, -- Declarations (List2) + 3 => False, -- unused + 4 => True, -- End_Label (Node4) + 5 => False), -- Corresponding_Spec (Node5-Sem) + + N_Entry_Declaration => + (1 => True, -- Defining_Identifier (Node1) + 2 => False, -- unused + 3 => True, -- Parameter_Specifications (List3) + 4 => True, -- Discrete_Subtype_Definition (Node4) + 5 => False), -- Corresponding_Body (Node5-Sem) + + N_Accept_Statement => + (1 => True, -- Entry_Direct_Name (Node1) + 2 => True, -- Declarations (List2) + 3 => True, -- Parameter_Specifications (List3) + 4 => True, -- Handled_Statement_Sequence (Node4) + 5 => True), -- Entry_Index (Node5) + + N_Entry_Body => + (1 => True, -- Defining_Identifier (Node1) + 2 => True, -- Declarations (List2) + 3 => False, -- Activation_Chain_Entity (Node3-Sem) + 4 => True, -- Handled_Statement_Sequence (Node4) + 5 => True), -- Entry_Body_Formal_Part (Node5) + + N_Entry_Body_Formal_Part => + (1 => True, -- Condition (Node1) + 2 => False, -- unused + 3 => True, -- Parameter_Specifications (List3) + 4 => True, -- Entry_Index_Specification (Node4) + 5 => False), -- unused + + N_Entry_Index_Specification => + (1 => True, -- Defining_Identifier (Node1) + 2 => False, -- unused + 3 => False, -- unused + 4 => True, -- Discrete_Subtype_Definition (Node4) + 5 => False), -- unused + + N_Entry_Call_Statement => + (1 => False, -- unused + 2 => True, -- Name (Node2) + 3 => True, -- Parameter_Associations (List3) + 4 => False, -- First_Named_Actual (Node4-Sem) + 5 => False), -- unused + + N_Requeue_Statement => + (1 => False, -- unused + 2 => True, -- Name (Node2) + 3 => False, -- unused + 4 => False, -- unused + 5 => False), -- unused + + N_Delay_Until_Statement => + (1 => False, -- unused + 2 => False, -- unused + 3 => True, -- Expression (Node3) + 4 => False, -- unused + 5 => False), -- unused + + N_Delay_Relative_Statement => + (1 => False, -- unused + 2 => False, -- unused + 3 => True, -- Expression (Node3) + 4 => False, -- unused + 5 => False), -- unused + + N_Selective_Accept => + (1 => True, -- Select_Alternatives (List1) + 2 => False, -- unused + 3 => False, -- unused + 4 => True, -- Else_Statements (List4) + 5 => False), -- unused + + N_Accept_Alternative => + (1 => True, -- Condition (Node1) + 2 => True, -- Accept_Statement (Node2) + 3 => True, -- Statements (List3) + 4 => True, -- Pragmas_Before (List4) + 5 => False), -- Accept_Handler_Records (List5-Sem) + + N_Delay_Alternative => + (1 => True, -- Condition (Node1) + 2 => True, -- Delay_Statement (Node2) + 3 => True, -- Statements (List3) + 4 => True, -- Pragmas_Before (List4) + 5 => False), -- unused + + N_Terminate_Alternative => + (1 => True, -- Condition (Node1) + 2 => False, -- unused + 3 => False, -- unused + 4 => True, -- Pragmas_Before (List4) + 5 => True), -- Pragmas_After (List5) + + N_Timed_Entry_Call => + (1 => True, -- Entry_Call_Alternative (Node1) + 2 => False, -- unused + 3 => False, -- unused + 4 => True, -- Delay_Alternative (Node4) + 5 => False), -- unused + + N_Entry_Call_Alternative => + (1 => True, -- Entry_Call_Statement (Node1) + 2 => False, -- unused + 3 => True, -- Statements (List3) + 4 => True, -- Pragmas_Before (List4) + 5 => False), -- unused + + N_Conditional_Entry_Call => + (1 => True, -- Entry_Call_Alternative (Node1) + 2 => False, -- unused + 3 => False, -- unused + 4 => True, -- Else_Statements (List4) + 5 => False), -- unused + + N_Asynchronous_Select => + (1 => True, -- Triggering_Alternative (Node1) + 2 => True, -- Abortable_Part (Node2) + 3 => False, -- unused + 4 => False, -- unused + 5 => False), -- unused + + N_Triggering_Alternative => + (1 => True, -- Triggering_Statement (Node1) + 2 => False, -- unused + 3 => True, -- Statements (List3) + 4 => True, -- Pragmas_Before (List4) + 5 => False), -- unused + + N_Abortable_Part => + (1 => False, -- unused + 2 => False, -- unused + 3 => True, -- Statements (List3) + 4 => False, -- unused + 5 => False), -- unused + + N_Abort_Statement => + (1 => False, -- unused + 2 => True, -- Names (List2) + 3 => False, -- unused + 4 => False, -- unused + 5 => False), -- unused + + N_Compilation_Unit => + (1 => True, -- Context_Items (List1) + 2 => True, -- Unit (Node2) + 3 => False, -- First_Inlined_Subprogram (Node3-Sem) + 4 => False, -- Library_Unit (Node4-Sem) + 5 => True), -- Aux_Decls_Node (Node5) + + N_Compilation_Unit_Aux => + (1 => True, -- Actions (List1) + 2 => True, -- Declarations (List2) + 3 => False, -- unused + 4 => True, -- Config_Pragmas (List4) + 5 => True), -- Pragmas_After (List5) + + N_With_Clause => + (1 => False, -- unused + 2 => True, -- Name (Node2) + 3 => False, -- unused + 4 => False, -- Library_Unit (Node4-Sem) + 5 => False), -- Corresponding_Spec (Node5-Sem) + + N_With_Type_Clause => + (1 => False, -- unused + 2 => True, -- Name (Node2) + 3 => False, -- unused + 4 => False, -- unused + 5 => False), -- unused + + N_Subprogram_Body_Stub => + (1 => True, -- Specification (Node1) + 2 => False, -- unused + 3 => False, -- unused + 4 => False, -- Library_Unit (Node4-Sem) + 5 => False), -- Corresponding_Body (Node5-Sem) + + N_Package_Body_Stub => + (1 => True, -- Defining_Identifier (Node1) + 2 => False, -- unused + 3 => False, -- unused + 4 => False, -- Library_Unit (Node4-Sem) + 5 => False), -- Corresponding_Body (Node5-Sem) + + N_Task_Body_Stub => + (1 => True, -- Defining_Identifier (Node1) + 2 => False, -- unused + 3 => False, -- unused + 4 => False, -- Library_Unit (Node4-Sem) + 5 => False), -- Corresponding_Body (Node5-Sem) + + N_Protected_Body_Stub => + (1 => True, -- Defining_Identifier (Node1) + 2 => False, -- unused + 3 => False, -- unused + 4 => False, -- Library_Unit (Node4-Sem) + 5 => False), -- Corresponding_Body (Node5-Sem) + + N_Subunit => + (1 => True, -- Proper_Body (Node1) + 2 => True, -- Name (Node2) + 3 => False, -- Corresponding_Stub (Node3-Sem) + 4 => False, -- unused + 5 => False), -- unused + + N_Exception_Declaration => + (1 => True, -- Defining_Identifier (Node1) + 2 => False, -- unused + 3 => False, -- Expression (Node3-Sem) + 4 => False, -- unused + 5 => False), -- unused + + N_Handled_Sequence_Of_Statements => + (1 => True, -- At_End_Proc (Node1) + 2 => False, -- First_Real_Statement (Node2-Sem) + 3 => True, -- Statements (List3) + 4 => True, -- End_Label (Node4) + 5 => True), -- Exception_Handlers (List5) + + N_Exception_Handler => + (1 => False, -- unused + 2 => True, -- Choice_Parameter (Node2) + 3 => True, -- Statements (List3) + 4 => True, -- Exception_Choices (List4) + 5 => False), -- unused + + N_Raise_Statement => + (1 => False, -- unused + 2 => True, -- Name (Node2) + 3 => True, -- Expression (Node3) + 4 => False, -- unused + 5 => False), -- unused + + N_Generic_Subprogram_Declaration => + (1 => True, -- Specification (Node1) + 2 => True, -- Generic_Formal_Declarations (List2) + 3 => False, -- unused + 4 => False, -- Parent_Spec (Node4-Sem) + 5 => False), -- Corresponding_Body (Node5-Sem) + + N_Generic_Package_Declaration => + (1 => True, -- Specification (Node1) + 2 => True, -- Generic_Formal_Declarations (List2) + 3 => False, -- Activation_Chain_Entity (Node3-Sem) + 4 => False, -- Parent_Spec (Node4-Sem) + 5 => False), -- Corresponding_Body (Node5-Sem) + + N_Package_Instantiation => + (1 => True, -- Defining_Unit_Name (Node1) + 2 => True, -- Name (Node2) + 3 => True, -- Generic_Associations (List3) + 4 => False, -- Parent_Spec (Node4-Sem) + 5 => False), -- Instance_Spec (Node5-Sem) + + N_Procedure_Instantiation => + (1 => True, -- Defining_Unit_Name (Node1) + 2 => True, -- Name (Node2) + 3 => True, -- Generic_Associations (List3) + 4 => False, -- Parent_Spec (Node4-Sem) + 5 => False), -- Instance_Spec (Node5-Sem) + + N_Function_Instantiation => + (1 => True, -- Defining_Unit_Name (Node1) + 2 => True, -- Name (Node2) + 3 => True, -- Generic_Associations (List3) + 4 => False, -- Parent_Spec (Node4-Sem) + 5 => False), -- Instance_Spec (Node5-Sem) + + N_Generic_Association => + (1 => True, -- Explicit_Generic_Actual_Parameter (Node1) + 2 => True, -- Selector_Name (Node2) + 3 => False, -- unused + 4 => False, -- unused + 5 => False), -- unused + + N_Formal_Object_Declaration => + (1 => True, -- Defining_Identifier (Node1) + 2 => False, -- unused + 3 => True, -- Access_Definition (Node3) + 4 => True, -- Subtype_Mark (Node4) + 5 => True), -- Default_Expression (Node5) + + N_Formal_Type_Declaration => + (1 => True, -- Defining_Identifier (Node1) + 2 => False, -- unused + 3 => True, -- Formal_Type_Definition (Node3) + 4 => True, -- Discriminant_Specifications (List4) + 5 => False), -- unused + + N_Formal_Private_Type_Definition => + (1 => False, -- unused + 2 => False, -- unused + 3 => False, -- unused + 4 => False, -- unused + 5 => False), -- unused + + N_Formal_Derived_Type_Definition => + (1 => False, -- unused + 2 => True, -- Interface_List (List2) + 3 => False, -- unused + 4 => True, -- Subtype_Mark (Node4) + 5 => False), -- unused + + N_Formal_Discrete_Type_Definition => + (1 => False, -- unused + 2 => False, -- unused + 3 => False, -- unused + 4 => False, -- unused + 5 => False), -- unused + + N_Formal_Signed_Integer_Type_Definition => + (1 => False, -- unused + 2 => False, -- unused + 3 => False, -- unused + 4 => False, -- unused + 5 => False), -- unused + + N_Formal_Modular_Type_Definition => + (1 => False, -- unused + 2 => False, -- unused + 3 => False, -- unused + 4 => False, -- unused + 5 => False), -- unused + + N_Formal_Floating_Point_Definition => + (1 => False, -- unused + 2 => False, -- unused + 3 => False, -- unused + 4 => False, -- unused + 5 => False), -- unused + + N_Formal_Ordinary_Fixed_Point_Definition => + (1 => False, -- unused + 2 => False, -- unused + 3 => False, -- unused + 4 => False, -- unused + 5 => False), -- unused + + N_Formal_Decimal_Fixed_Point_Definition => + (1 => False, -- unused + 2 => False, -- unused + 3 => False, -- unused + 4 => False, -- unused + 5 => False), -- unused + + N_Formal_Concrete_Subprogram_Declaration => + (1 => True, -- Specification (Node1) + 2 => True, -- Default_Name (Node2) + 3 => False, -- unused + 4 => False, -- unused + 5 => False), -- unused + + N_Formal_Abstract_Subprogram_Declaration => + (1 => True, -- Specification (Node1) + 2 => True, -- Default_Name (Node2) + 3 => False, -- unused + 4 => False, -- unused + 5 => False), -- unused + + N_Formal_Package_Declaration => + (1 => True, -- Defining_Identifier (Node1) + 2 => True, -- Name (Node2) + 3 => True, -- Generic_Associations (List3) + 4 => False, -- unused + 5 => False), -- Instance_Spec (Node5-Sem) + + N_Attribute_Definition_Clause => + (1 => True, -- Chars (Name1) + 2 => True, -- Name (Node2) + 3 => True, -- Expression (Node3) + 4 => False, -- unused + 5 => False), -- Next_Rep_Item (Node5-Sem) + + N_Enumeration_Representation_Clause => + (1 => True, -- Identifier (Node1) + 2 => False, -- unused + 3 => True, -- Array_Aggregate (Node3) + 4 => False, -- unused + 5 => False), -- Next_Rep_Item (Node5-Sem) + + N_Record_Representation_Clause => + (1 => True, -- Identifier (Node1) + 2 => True, -- Mod_Clause (Node2) + 3 => True, -- Component_Clauses (List3) + 4 => False, -- unused + 5 => False), -- Next_Rep_Item (Node5-Sem) + + N_Component_Clause => + (1 => True, -- Component_Name (Node1) + 2 => True, -- Position (Node2) + 3 => True, -- First_Bit (Node3) + 4 => True, -- Last_Bit (Node4) + 5 => False), -- unused + + N_Code_Statement => + (1 => False, -- unused + 2 => False, -- unused + 3 => True, -- Expression (Node3) + 4 => False, -- unused + 5 => False), -- unused + + N_Op_Rotate_Left => + (1 => True, -- Chars (Name1) + 2 => True, -- Left_Opnd (Node2) + 3 => True, -- Right_Opnd (Node3) + 4 => False, -- Entity (Node4-Sem) + 5 => False), -- Etype (Node5-Sem) + + N_Op_Rotate_Right => + (1 => True, -- Chars (Name1) + 2 => True, -- Left_Opnd (Node2) + 3 => True, -- Right_Opnd (Node3) + 4 => False, -- Entity (Node4-Sem) + 5 => False), -- Etype (Node5-Sem) + + N_Op_Shift_Left => + (1 => True, -- Chars (Name1) + 2 => True, -- Left_Opnd (Node2) + 3 => True, -- Right_Opnd (Node3) + 4 => False, -- Entity (Node4-Sem) + 5 => False), -- Etype (Node5-Sem) + + N_Op_Shift_Right_Arithmetic => + (1 => True, -- Chars (Name1) + 2 => True, -- Left_Opnd (Node2) + 3 => True, -- Right_Opnd (Node3) + 4 => False, -- Entity (Node4-Sem) + 5 => False), -- Etype (Node5-Sem) + + N_Op_Shift_Right => + (1 => True, -- Chars (Name1) + 2 => True, -- Left_Opnd (Node2) + 3 => True, -- Right_Opnd (Node3) + 4 => False, -- Entity (Node4-Sem) + 5 => False), -- Etype (Node5-Sem) + + N_Delta_Constraint => + (1 => False, -- unused + 2 => False, -- unused + 3 => True, -- Delta_Expression (Node3) + 4 => True, -- Range_Constraint (Node4) + 5 => False), -- unused + + N_At_Clause => + (1 => True, -- Identifier (Node1) + 2 => False, -- unused + 3 => True, -- Expression (Node3) + 4 => False, -- unused + 5 => False), -- unused + + N_Mod_Clause => + (1 => False, -- unused + 2 => False, -- unused + 3 => True, -- Expression (Node3) + 4 => True, -- Pragmas_Before (List4) + 5 => False), -- unused + + N_Conditional_Expression => + (1 => True, -- Expressions (List1) + 2 => False, -- Then_Actions (List2-Sem) + 3 => False, -- Else_Actions (List3-Sem) + 4 => False, -- unused + 5 => False), -- Etype (Node5-Sem) + + N_Expanded_Name => + (1 => True, -- Chars (Name1) + 2 => True, -- Selector_Name (Node2) + 3 => True, -- Prefix (Node3) + 4 => False, -- Entity (Node4-Sem) + 5 => False), -- Etype (Node5-Sem) + + N_Free_Statement => + (1 => False, -- Storage_Pool (Node1-Sem) + 2 => False, -- Procedure_To_Call (Node2-Sem) + 3 => True, -- Expression (Node3) + 4 => False, -- Actual_Designated_Subtype (Node4-Sem) + 5 => False), -- unused + + N_Freeze_Entity => + (1 => True, -- Actions (List1) + 2 => False, -- Access_Types_To_Process (Elist2-Sem) + 3 => False, -- TSS_Elist (Elist3-Sem) + 4 => False, -- Entity (Node4-Sem) + 5 => False), -- First_Subtype_Link (Node5-Sem) + + N_Implicit_Label_Declaration => + (1 => True, -- Defining_Identifier (Node1) + 2 => False, -- Label_Construct (Node2-Sem) + 3 => False, -- unused + 4 => False, -- unused + 5 => False), -- unused + + N_Itype_Reference => + (1 => False, -- Itype (Node1-Sem) + 2 => False, -- unused + 3 => False, -- unused + 4 => False, -- unused + 5 => False), -- unused + + N_Raise_Constraint_Error => + (1 => True, -- Condition (Node1) + 2 => False, -- unused + 3 => True, -- Reason (Uint3) + 4 => False, -- unused + 5 => False), -- Etype (Node5-Sem) + + N_Raise_Program_Error => + (1 => True, -- Condition (Node1) + 2 => False, -- unused + 3 => True, -- Reason (Uint3) + 4 => False, -- unused + 5 => False), -- Etype (Node5-Sem) + + N_Raise_Storage_Error => + (1 => True, -- Condition (Node1) + 2 => False, -- unused + 3 => True, -- Reason (Uint3) + 4 => False, -- unused + 5 => False), -- Etype (Node5-Sem) + + N_Reference => + (1 => False, -- unused + 2 => False, -- unused + 3 => True, -- Prefix (Node3) + 4 => False, -- unused + 5 => False), -- Etype (Node5-Sem) + + N_Subprogram_Info => + (1 => True, -- Identifier (Node1) + 2 => False, -- unused + 3 => False, -- unused + 4 => False, -- unused + 5 => False), -- Etype (Node5-Sem) + + N_Unchecked_Expression => + (1 => False, -- unused + 2 => False, -- unused + 3 => True, -- Expression (Node3) + 4 => False, -- unused + 5 => False), -- Etype (Node5-Sem) + + N_Unchecked_Type_Conversion => + (1 => False, -- unused + 2 => False, -- unused + 3 => True, -- Expression (Node3) + 4 => True, -- Subtype_Mark (Node4) + 5 => False), -- Etype (Node5-Sem) + + N_Validate_Unchecked_Conversion => + (1 => False, -- Source_Type (Node1-Sem) + 2 => False, -- Target_Type (Node2-Sem) + 3 => False, -- unused + 4 => False, -- unused + 5 => False), -- unused + + -- End of inserted output from makeisf program + + -- Entries for Empty, Error and Unused. Even thought these have a Chars + -- field for debugging purposes, they are not really syntactic fields, so + -- we mark all fields as unused. + + N_Empty => + (1 => False, -- unused + 2 => False, -- unused + 3 => False, -- unused + 4 => False, -- unused + 5 => False), -- unused + + N_Error => + (1 => False, -- unused + 2 => False, -- unused + 3 => False, -- unused + 4 => False, -- unused + 5 => False), -- unused + + N_Unused_At_Start => + (1 => False, -- unused + 2 => False, -- unused + 3 => False, -- unused + 4 => False, -- unused + 5 => False), -- unused + + N_Unused_At_End => + (1 => False, -- unused + 2 => False, -- unused + 3 => False, -- unused + 4 => False, -- unused + 5 => False)); -- unused + -------------------- -- Inline Pragmas -- -------------------- @@ -8793,6 +10443,7 @@ package Sinfo is pragma Inline (Check_Address_Alignment); pragma Inline (Choice_Parameter); pragma Inline (Choices); + pragma Inline (Comes_From_Extended_Return_Statement); pragma Inline (Compile_Time_Known_Aggregate); pragma Inline (Component_Associations); pragma Inline (Component_Clauses); @@ -8912,12 +10563,14 @@ package Sinfo is pragma Inline (Is_Component_Left_Opnd); pragma Inline (Is_Component_Right_Opnd); pragma Inline (Is_Controlling_Actual); + pragma Inline (Is_Entry_Barrier_Function); pragma Inline (Is_In_Discriminant_Check); pragma Inline (Is_Machine_Number); pragma Inline (Is_Null_Loop); pragma Inline (Is_Overloaded); pragma Inline (Is_Power_Of_2_For_Shift); pragma Inline (Is_Protected_Subprogram_Body); + pragma Inline (Has_Self_Reference); pragma Inline (Is_Static_Expression); pragma Inline (Is_Subprogram_Descriptor); pragma Inline (Is_Task_Allocation_Block); @@ -8989,7 +10642,8 @@ package Sinfo is pragma Inline (Record_Extension_Part); pragma Inline (Redundant_Use); pragma Inline (Result_Definition); - pragma Inline (Return_Type); + pragma Inline (Return_Object_Declarations); + pragma Inline (Return_Statement_Entity); pragma Inline (Reverse_Present); pragma Inline (Right_Opnd); pragma Inline (Rounded_Result); @@ -9064,6 +10718,7 @@ package Sinfo is pragma Inline (Set_Check_Address_Alignment); pragma Inline (Set_Choice_Parameter); pragma Inline (Set_Choices); + pragma Inline (Set_Comes_From_Extended_Return_Statement); pragma Inline (Set_Compile_Time_Known_Aggregate); pragma Inline (Set_Component_Associations); pragma Inline (Set_Component_Clauses); @@ -9182,12 +10837,14 @@ package Sinfo is pragma Inline (Set_Is_Component_Left_Opnd); pragma Inline (Set_Is_Component_Right_Opnd); pragma Inline (Set_Is_Controlling_Actual); + pragma Inline (Set_Is_Entry_Barrier_Function); pragma Inline (Set_Is_In_Discriminant_Check); pragma Inline (Set_Is_Machine_Number); pragma Inline (Set_Is_Null_Loop); pragma Inline (Set_Is_Overloaded); pragma Inline (Set_Is_Power_Of_2_For_Shift); pragma Inline (Set_Is_Protected_Subprogram_Body); + pragma Inline (Set_Has_Self_Reference); pragma Inline (Set_Is_Static_Expression); pragma Inline (Set_Is_Subprogram_Descriptor); pragma Inline (Set_Is_Task_Allocation_Block); @@ -9258,7 +10915,7 @@ package Sinfo is pragma Inline (Set_Record_Extension_Part); pragma Inline (Set_Redundant_Use); pragma Inline (Set_Result_Definition); - pragma Inline (Set_Return_Type); + pragma Inline (Set_Return_Object_Declarations); pragma Inline (Set_Reverse_Present); pragma Inline (Set_Right_Opnd); pragma Inline (Set_Rounded_Result); Index: sinfo.adb =================================================================== --- sinfo.adb (revision 118179) +++ sinfo.adb (working copy) @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2005, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2006, 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- -- @@ -122,6 +122,7 @@ package body Sinfo is begin pragma Assert (False or else NT (N).Nkind = N_Component_Definition + or else NT (N).Nkind = N_Formal_Object_Declaration or else NT (N).Nkind = N_Object_Renaming_Declaration); return Node3 (N); end Access_Definition; @@ -181,7 +182,7 @@ package body Sinfo is pragma Assert (False or else NT (N).Nkind = N_Explicit_Dereference or else NT (N).Nkind = N_Free_Statement); - return Node2 (N); + return Node4 (N); end Actual_Designated_Subtype; function Aggregate_Bounds @@ -325,7 +326,8 @@ package body Sinfo is or else NT (N).Nkind = N_Component_Association or else NT (N).Nkind = N_Formal_Abstract_Subprogram_Declaration or else NT (N).Nkind = N_Formal_Concrete_Subprogram_Declaration - or else NT (N).Nkind = N_Formal_Package_Declaration); + or else NT (N).Nkind = N_Formal_Package_Declaration + or else NT (N).Nkind = N_Generic_Association); return Flag15 (N); end Box_Present; @@ -333,6 +335,7 @@ package body Sinfo is (N : Node_Id) return Boolean is begin pragma Assert (False + or else NT (N).Nkind = N_Extended_Return_Statement or else NT (N).Nkind = N_Return_Statement); return Flag5 (N); end By_Ref; @@ -377,6 +380,14 @@ package body Sinfo is return List1 (N); end Choices; + function Comes_From_Extended_Return_Statement + (N : Node_Id) return Boolean is + begin + pragma Assert (False + or else NT (N).Nkind = N_Return_Statement); + return Flag18 (N); + end Comes_From_Extended_Return_Statement; + function Compile_Time_Known_Aggregate (N : Node_Id) return Boolean is begin @@ -630,6 +641,7 @@ package body Sinfo is (N : Node_Id) return Node_Id is begin pragma Assert (False + or else NT (N).Nkind = N_Formal_Object_Declaration or else NT (N).Nkind = N_Parameter_Specification); return Node5 (N); end Default_Expression; @@ -878,6 +890,7 @@ package body Sinfo is begin pragma Assert (False or else NT (N).Nkind = N_Assignment_Statement + or else NT (N).Nkind = N_Extended_Return_Statement or else NT (N).Nkind = N_Function_Call or else NT (N).Nkind = N_Procedure_Call_Statement or else NT (N).Nkind = N_Return_Statement @@ -989,7 +1002,8 @@ package body Sinfo is begin pragma Assert (False or else NT (N).Nkind in N_Has_Entity - or else NT (N).Nkind = N_Freeze_Entity); + or else NT (N).Nkind = N_Freeze_Entity + or else NT (N).Nkind = N_Attribute_Definition_Clause); return Node4 (N); end Entity; @@ -1128,7 +1142,6 @@ package body Sinfo is or else NT (N).Nkind = N_Discriminant_Association or else NT (N).Nkind = N_Discriminant_Specification or else NT (N).Nkind = N_Exception_Declaration - or else NT (N).Nkind = N_Formal_Object_Declaration or else NT (N).Nkind = N_Free_Statement or else NT (N).Nkind = N_Mod_Clause or else NT (N).Nkind = N_Modular_Type_Definition @@ -1292,6 +1305,7 @@ package body Sinfo is or else NT (N).Nkind = N_Accept_Statement or else NT (N).Nkind = N_Block_Statement or else NT (N).Nkind = N_Entry_Body + or else NT (N).Nkind = N_Extended_Return_Statement or else NT (N).Nkind = N_Package_Body or else NT (N).Nkind = N_Subprogram_Body or else NT (N).Nkind = N_Task_Body); @@ -1357,6 +1371,15 @@ package body Sinfo is return Flag11 (N); end Has_Private_View; + function Has_Self_Reference + (N : Node_Id) return Boolean is + begin + pragma Assert (False + or else NT (N).Nkind = N_Aggregate + or else NT (N).Nkind = N_Extension_Aggregate); + return Flag13 (N); + end Has_Self_Reference; + function Has_Storage_Size_Pragma (N : Node_Id) return Boolean is begin @@ -1523,6 +1546,14 @@ package body Sinfo is return Flag16 (N); end Is_Controlling_Actual; + function Is_Entry_Barrier_Function + (N : Node_Id) return Boolean is + begin + pragma Assert (False + or else NT (N).Nkind = N_Subprogram_Body); + return Flag8 (N); + end Is_Entry_Barrier_Function; + function Is_In_Discriminant_Check (N : Node_Id) return Boolean is begin @@ -1866,7 +1897,7 @@ package body Sinfo is or else NT (N).Nkind = N_Enumeration_Representation_Clause or else NT (N).Nkind = N_Pragma or else NT (N).Nkind = N_Record_Representation_Clause); - return Node4 (N); + return Node5 (N); end Next_Rep_Item; function Next_Use_Clause @@ -1942,8 +1973,10 @@ package body Sinfo is or else NT (N).Nkind = N_Component_Definition or else NT (N).Nkind = N_Derived_Type_Definition or else NT (N).Nkind = N_Discriminant_Specification + or else NT (N).Nkind = N_Formal_Object_Declaration or else NT (N).Nkind = N_Function_Specification or else NT (N).Nkind = N_Object_Declaration + or else NT (N).Nkind = N_Object_Renaming_Declaration or else NT (N).Nkind = N_Parameter_Specification or else NT (N).Nkind = N_Subtype_Declaration); return Flag11 (N); @@ -2167,9 +2200,10 @@ package body Sinfo is begin pragma Assert (False or else NT (N).Nkind = N_Allocator + or else NT (N).Nkind = N_Extended_Return_Statement or else NT (N).Nkind = N_Free_Statement or else NT (N).Nkind = N_Return_Statement); - return Node4 (N); + return Node2 (N); end Procedure_To_Call; function Proper_Body @@ -2280,13 +2314,22 @@ package body Sinfo is return Node4 (N); end Result_Definition; - function Return_Type - (N : Node_Id) return Node_Id is + function Return_Object_Declarations + (N : Node_Id) return List_Id is + begin + pragma Assert (False + or else NT (N).Nkind = N_Extended_Return_Statement); + return List3 (N); + end Return_Object_Declarations; + + function Return_Statement_Entity + (N : Node_Id) return Node_Id is begin pragma Assert (False + or else NT (N).Nkind = N_Extended_Return_Statement or else NT (N).Nkind = N_Return_Statement); - return Node2 (N); - end Return_Type; + return Node5 (N); + end Return_Statement_Entity; function Reverse_Present (N : Node_Id) return Boolean is @@ -2421,6 +2464,7 @@ package body Sinfo is begin pragma Assert (False or else NT (N).Nkind = N_Allocator + or else NT (N).Nkind = N_Extended_Return_Statement or else NT (N).Nkind = N_Free_Statement or else NT (N).Nkind = N_Return_Statement); return Node1 (N); @@ -2476,6 +2520,8 @@ package body Sinfo is begin pragma Assert (False or else NT (N).Nkind = N_Derived_Type_Definition + or else NT (N).Nkind = N_Formal_Derived_Type_Definition + or else NT (N).Nkind = N_Private_Extension_Declaration or else NT (N).Nkind = N_Record_Definition); return Flag7 (N); end Synchronized_Present; @@ -2718,6 +2764,7 @@ package body Sinfo is begin pragma Assert (False or else NT (N).Nkind = N_Component_Definition + or else NT (N).Nkind = N_Formal_Object_Declaration or else NT (N).Nkind = N_Object_Renaming_Declaration); Set_Node3_With_Parent (N, Val); end Set_Access_Definition; @@ -2777,7 +2824,7 @@ package body Sinfo is pragma Assert (False or else NT (N).Nkind = N_Explicit_Dereference or else NT (N).Nkind = N_Free_Statement); - Set_Node2 (N, Val); + Set_Node4 (N, Val); end Set_Actual_Designated_Subtype; procedure Set_Aggregate_Bounds @@ -2921,7 +2968,8 @@ package body Sinfo is or else NT (N).Nkind = N_Component_Association or else NT (N).Nkind = N_Formal_Abstract_Subprogram_Declaration or else NT (N).Nkind = N_Formal_Concrete_Subprogram_Declaration - or else NT (N).Nkind = N_Formal_Package_Declaration); + or else NT (N).Nkind = N_Formal_Package_Declaration + or else NT (N).Nkind = N_Generic_Association); Set_Flag15 (N, Val); end Set_Box_Present; @@ -2929,6 +2977,7 @@ package body Sinfo is (N : Node_Id; Val : Boolean := True) is begin pragma Assert (False + or else NT (N).Nkind = N_Extended_Return_Statement or else NT (N).Nkind = N_Return_Statement); Set_Flag5 (N, Val); end Set_By_Ref; @@ -2973,6 +3022,14 @@ package body Sinfo is Set_List1_With_Parent (N, Val); end Set_Choices; + procedure Set_Comes_From_Extended_Return_Statement + (N : Node_Id; Val : Boolean := True) is + begin + pragma Assert (False + or else NT (N).Nkind = N_Return_Statement); + Set_Flag18 (N, Val); + end Set_Comes_From_Extended_Return_Statement; + procedure Set_Compile_Time_Known_Aggregate (N : Node_Id; Val : Boolean := True) is begin @@ -3226,6 +3283,7 @@ package body Sinfo is (N : Node_Id; Val : Node_Id) is begin pragma Assert (False + or else NT (N).Nkind = N_Formal_Object_Declaration or else NT (N).Nkind = N_Parameter_Specification); Set_Node5 (N, Val); -- semantic field, no parent set end Set_Default_Expression; @@ -3474,6 +3532,7 @@ package body Sinfo is begin pragma Assert (False or else NT (N).Nkind = N_Assignment_Statement + or else NT (N).Nkind = N_Extended_Return_Statement or else NT (N).Nkind = N_Function_Call or else NT (N).Nkind = N_Procedure_Call_Statement or else NT (N).Nkind = N_Return_Statement @@ -3585,7 +3644,8 @@ package body Sinfo is begin pragma Assert (False or else NT (N).Nkind in N_Has_Entity - or else NT (N).Nkind = N_Freeze_Entity); + or else NT (N).Nkind = N_Freeze_Entity + or else NT (N).Nkind = N_Attribute_Definition_Clause); Set_Node4 (N, Val); -- semantic field, no parent set end Set_Entity; @@ -3715,7 +3775,6 @@ package body Sinfo is or else NT (N).Nkind = N_Discriminant_Association or else NT (N).Nkind = N_Discriminant_Specification or else NT (N).Nkind = N_Exception_Declaration - or else NT (N).Nkind = N_Formal_Object_Declaration or else NT (N).Nkind = N_Free_Statement or else NT (N).Nkind = N_Mod_Clause or else NT (N).Nkind = N_Modular_Type_Definition @@ -3879,6 +3938,7 @@ package body Sinfo is or else NT (N).Nkind = N_Accept_Statement or else NT (N).Nkind = N_Block_Statement or else NT (N).Nkind = N_Entry_Body + or else NT (N).Nkind = N_Extended_Return_Statement or else NT (N).Nkind = N_Package_Body or else NT (N).Nkind = N_Subprogram_Body or else NT (N).Nkind = N_Task_Body); @@ -3944,6 +4004,15 @@ package body Sinfo is Set_Flag11 (N, Val); end Set_Has_Private_View; + procedure Set_Has_Self_Reference + (N : Node_Id; Val : Boolean := True) is + begin + pragma Assert (False + or else NT (N).Nkind = N_Aggregate + or else NT (N).Nkind = N_Extension_Aggregate); + Set_Flag13 (N, Val); + end Set_Has_Self_Reference; + procedure Set_Has_Storage_Size_Pragma (N : Node_Id; Val : Boolean := True) is begin @@ -4110,6 +4179,14 @@ package body Sinfo is Set_Flag16 (N, Val); end Set_Is_Controlling_Actual; + procedure Set_Is_Entry_Barrier_Function + (N : Node_Id; Val : Boolean := True) is + begin + pragma Assert (False + or else NT (N).Nkind = N_Subprogram_Body); + Set_Flag8 (N, Val); + end Set_Is_Entry_Barrier_Function; + procedure Set_Is_In_Discriminant_Check (N : Node_Id; Val : Boolean := True) is begin @@ -4453,7 +4530,7 @@ package body Sinfo is or else NT (N).Nkind = N_Enumeration_Representation_Clause or else NT (N).Nkind = N_Pragma or else NT (N).Nkind = N_Record_Representation_Clause); - Set_Node4 (N, Val); -- semantic field, no parent set + Set_Node5 (N, Val); -- semantic field, no parent set end Set_Next_Rep_Item; procedure Set_Next_Use_Clause @@ -4529,8 +4606,10 @@ package body Sinfo is or else NT (N).Nkind = N_Component_Definition or else NT (N).Nkind = N_Derived_Type_Definition or else NT (N).Nkind = N_Discriminant_Specification + or else NT (N).Nkind = N_Formal_Object_Declaration or else NT (N).Nkind = N_Function_Specification or else NT (N).Nkind = N_Object_Declaration + or else NT (N).Nkind = N_Object_Renaming_Declaration or else NT (N).Nkind = N_Parameter_Specification or else NT (N).Nkind = N_Subtype_Declaration); Set_Flag11 (N, Val); @@ -4754,9 +4833,10 @@ package body Sinfo is begin pragma Assert (False or else NT (N).Nkind = N_Allocator + or else NT (N).Nkind = N_Extended_Return_Statement or else NT (N).Nkind = N_Free_Statement or else NT (N).Nkind = N_Return_Statement); - Set_Node4 (N, Val); -- semantic field, no parent set + Set_Node2 (N, Val); -- semantic field, no parent set end Set_Procedure_To_Call; procedure Set_Proper_Body @@ -4867,13 +4947,22 @@ package body Sinfo is Set_Node4_With_Parent (N, Val); end Set_Result_Definition; - procedure Set_Return_Type - (N : Node_Id; Val : Node_Id) is + procedure Set_Return_Object_Declarations + (N : Node_Id; Val : List_Id) is + begin + pragma Assert (False + or else NT (N).Nkind = N_Extended_Return_Statement); + Set_List3_With_Parent (N, Val); + end Set_Return_Object_Declarations; + + procedure Set_Return_Statement_Entity + (N : Node_Id; Val : Node_Id) is begin pragma Assert (False + or else NT (N).Nkind = N_Extended_Return_Statement or else NT (N).Nkind = N_Return_Statement); - Set_Node2 (N, Val); -- semantic field, no parent set - end Set_Return_Type; + Set_Node5 (N, Val); -- semantic field, no parent set + end Set_Return_Statement_Entity; procedure Set_Reverse_Present (N : Node_Id; Val : Boolean := True) is @@ -5008,6 +5097,7 @@ package body Sinfo is begin pragma Assert (False or else NT (N).Nkind = N_Allocator + or else NT (N).Nkind = N_Extended_Return_Statement or else NT (N).Nkind = N_Free_Statement or else NT (N).Nkind = N_Return_Statement); Set_Node1 (N, Val); -- semantic field, no parent set @@ -5063,6 +5153,8 @@ package body Sinfo is begin pragma Assert (False or else NT (N).Nkind = N_Derived_Type_Definition + or else NT (N).Nkind = N_Formal_Derived_Type_Definition + or else NT (N).Nkind = N_Private_Extension_Declaration or else NT (N).Nkind = N_Record_Definition); Set_Flag7 (N, Val); end Set_Synchronized_Present; @@ -5268,7 +5360,6 @@ package body Sinfo is function End_Location (N : Node_Id) return Source_Ptr is L : constant Uint := End_Span (N); - begin if L = No_Uint then return No_Location; Index: snames.h =================================================================== --- snames.h (revision 118179) +++ snames.h (working copy) @@ -115,72 +115,74 @@ extern unsigned char Get_Attribute_Id (i #define Attr_Pool_Address 67 #define Attr_Pos 68 #define Attr_Position 69 -#define Attr_Range 70 -#define Attr_Range_Length 71 -#define Attr_Round 72 -#define Attr_Safe_Emax 73 -#define Attr_Safe_First 74 -#define Attr_Safe_Large 75 -#define Attr_Safe_Last 76 -#define Attr_Safe_Small 77 -#define Attr_Scale 78 -#define Attr_Scaling 79 -#define Attr_Signed_Zeros 80 -#define Attr_Size 81 -#define Attr_Small 82 -#define Attr_Storage_Size 83 -#define Attr_Storage_Unit 84 -#define Attr_Stream_Size 85 -#define Attr_Tag 86 -#define Attr_Target_Name 87 -#define Attr_Terminated 88 -#define Attr_To_Address 89 -#define Attr_Type_Class 90 -#define Attr_UET_Address 91 -#define Attr_Unbiased_Rounding 92 -#define Attr_Unchecked_Access 93 -#define Attr_Unconstrained_Array 94 -#define Attr_Universal_Literal_String 95 -#define Attr_Unrestricted_Access 96 -#define Attr_VADS_Size 97 -#define Attr_Val 98 -#define Attr_Valid 99 -#define Attr_Value_Size 100 -#define Attr_Version 101 -#define Attr_Wchar_T_Size 102 -#define Attr_Wide_Wide_Width 103 -#define Attr_Wide_Width 104 -#define Attr_Width 105 -#define Attr_Word_Size 106 -#define Attr_Adjacent 107 -#define Attr_Ceiling 108 -#define Attr_Copy_Sign 109 -#define Attr_Floor 110 -#define Attr_Fraction 111 -#define Attr_Image 112 -#define Attr_Input 113 -#define Attr_Machine 114 -#define Attr_Max 115 -#define Attr_Min 116 -#define Attr_Model 117 -#define Attr_Pred 118 -#define Attr_Remainder 119 -#define Attr_Rounding 120 -#define Attr_Succ 121 -#define Attr_Truncation 122 -#define Attr_Value 123 -#define Attr_Wide_Image 124 -#define Attr_Wide_Wide_Image 125 -#define Attr_Wide_Value 126 -#define Attr_Wide_Wide_Value 127 -#define Attr_Output 128 -#define Attr_Read 129 -#define Attr_Write 130 -#define Attr_Elab_Body 131 -#define Attr_Elab_Spec 132 -#define Attr_Storage_Pool 133 -#define Attr_Base 134 -#define Attr_Class 135 +#define Attr_Priority 70 +#define Attr_Range 71 +#define Attr_Range_Length 72 +#define Attr_Round 73 +#define Attr_Safe_Emax 74 +#define Attr_Safe_First 75 +#define Attr_Safe_Large 76 +#define Attr_Safe_Last 77 +#define Attr_Safe_Small 78 +#define Attr_Scale 79 +#define Attr_Scaling 80 +#define Attr_Signed_Zeros 81 +#define Attr_Size 82 +#define Attr_Small 83 +#define Attr_Storage_Size 84 +#define Attr_Storage_Unit 85 +#define Attr_Stream_Size 86 +#define Attr_Tag 87 +#define Attr_Target_Name 88 +#define Attr_Terminated 89 +#define Attr_To_Address 90 +#define Attr_Type_Class 91 +#define Attr_UET_Address 92 +#define Attr_Unbiased_Rounding 93 +#define Attr_Unchecked_Access 94 +#define Attr_Unconstrained_Array 95 +#define Attr_Universal_Literal_String 96 +#define Attr_Unrestricted_Access 97 +#define Attr_VADS_Size 98 +#define Attr_Val 99 +#define Attr_Valid 100 +#define Attr_Value_Size 101 +#define Attr_Version 102 +#define Attr_Wchar_T_Size 103 +#define Attr_Wide_Wide_Width 104 +#define Attr_Wide_Width 105 +#define Attr_Width 106 +#define Attr_Word_Size 107 +#define Attr_Adjacent 108 +#define Attr_Ceiling 109 +#define Attr_Copy_Sign 110 +#define Attr_Floor 111 +#define Attr_Fraction 112 +#define Attr_Image 113 +#define Attr_Input 114 +#define Attr_Machine 115 +#define Attr_Max 116 +#define Attr_Min 117 +#define Attr_Model 118 +#define Attr_Pred 119 +#define Attr_Remainder 120 +#define Attr_Rounding 121 +#define Attr_Succ 122 +#define Attr_Truncation 123 +#define Attr_Value 124 +#define Attr_Wide_Image 125 +#define Attr_Wide_Wide_Image 126 +#define Attr_Wide_Value 127 +#define Attr_Wide_Wide_Value 128 +#define Attr_Output 129 +#define Attr_Read 130 +#define Attr_Write 131 +#define Attr_Elab_Body 132 +#define Attr_Elab_Spec 133 +#define Attr_Storage_Pool 134 +#define Attr_Base 135 +#define Attr_Class 136 +#define Attr_Stub_Type 137 /* Define the numeric values for the conventions. */ @@ -241,127 +243,130 @@ extern unsigned char Get_Pragma_Id (int) #define Pragma_Normalize_Scalars 26 #define Pragma_Polling 27 #define Pragma_Persistent_BSS 28 -#define Pragma_Profile 29 -#define Pragma_Profile_Warnings 30 -#define Pragma_Propagate_Exceptions 31 -#define Pragma_Queuing_Policy 32 -#define Pragma_Ravenscar 33 -#define Pragma_Restricted_Run_Time 34 -#define Pragma_Restrictions 35 -#define Pragma_Restriction_Warnings 36 -#define Pragma_Reviewable 37 -#define Pragma_Source_File_Name 38 -#define Pragma_Source_File_Name_Project 39 -#define Pragma_Style_Checks 40 -#define Pragma_Suppress 41 -#define Pragma_Suppress_Exception_Locations 42 -#define Pragma_Task_Dispatching_Policy 43 -#define Pragma_Universal_Data 44 -#define Pragma_Unsuppress 45 -#define Pragma_Use_VADS_Size 46 -#define Pragma_Validity_Checks 47 -#define Pragma_Warnings 48 -#define Pragma_Abort_Defer 49 -#define Pragma_All_Calls_Remote 50 -#define Pragma_Annotate 51 -#define Pragma_Assert 52 -#define Pragma_Asynchronous 53 -#define Pragma_Atomic 54 -#define Pragma_Atomic_Components 55 -#define Pragma_Attach_Handler 56 -#define Pragma_Comment 57 -#define Pragma_Common_Object 58 -#define Pragma_Complete_Representation 59 -#define Pragma_Complex_Representation 60 -#define Pragma_Controlled 61 -#define Pragma_Convention 62 -#define Pragma_CPP_Class 63 -#define Pragma_CPP_Constructor 64 -#define Pragma_CPP_Virtual 65 -#define Pragma_CPP_Vtable 66 -#define Pragma_Debug 67 -#define Pragma_Elaborate 68 -#define Pragma_Elaborate_All 69 -#define Pragma_Elaborate_Body 70 -#define Pragma_Export 71 -#define Pragma_Export_Exception 72 -#define Pragma_Export_Function 73 -#define Pragma_Export_Object 74 -#define Pragma_Export_Procedure 75 -#define Pragma_Export_Value 76 -#define Pragma_Export_Valued_Procedure 77 -#define Pragma_External 78 -#define Pragma_Finalize_Storage_Only 79 -#define Pragma_Ident 80 -#define Pragma_Import 81 -#define Pragma_Import_Exception 82 -#define Pragma_Import_Function 83 -#define Pragma_Import_Object 84 -#define Pragma_Import_Procedure 85 -#define Pragma_Import_Valued_Procedure 86 -#define Pragma_Inline 87 -#define Pragma_Inline_Always 88 -#define Pragma_Inline_Generic 89 -#define Pragma_Inspection_Point 90 -#define Pragma_Interface_Name 91 -#define Pragma_Interrupt_Handler 92 -#define Pragma_Interrupt_Priority 93 -#define Pragma_Java_Constructor 94 -#define Pragma_Java_Interface 95 -#define Pragma_Keep_Names 96 -#define Pragma_Link_With 97 -#define Pragma_Linker_Alias 98 -#define Pragma_Linker_Constructor 99 -#define Pragma_Linker_Destructor 100 -#define Pragma_Linker_Options 101 -#define Pragma_Linker_Section 102 -#define Pragma_List 103 -#define Pragma_Machine_Attribute 104 -#define Pragma_Main 105 -#define Pragma_Main_Storage 106 -#define Pragma_Memory_Size 107 -#define Pragma_No_Return 108 -#define Pragma_Obsolescent 109 -#define Pragma_Optimize 110 -#define Pragma_Optional_Overriding 111 -#define Pragma_Pack 112 -#define Pragma_Page 113 -#define Pragma_Passive 114 -#define Pragma_Preelaborate 115 -#define Pragma_Preelaborate_05 116 -#define Pragma_Priority 117 -#define Pragma_Psect_Object 118 -#define Pragma_Pure 119 -#define Pragma_Pure_05 120 -#define Pragma_Pure_Function 121 -#define Pragma_Remote_Call_Interface 122 -#define Pragma_Remote_Types 123 -#define Pragma_Share_Generic 124 -#define Pragma_Shared 125 -#define Pragma_Shared_Passive 126 -#define Pragma_Source_Reference 127 -#define Pragma_Stream_Convert 128 -#define Pragma_Subtitle 129 -#define Pragma_Suppress_All 130 -#define Pragma_Suppress_Debug_Info 131 -#define Pragma_Suppress_Initialization 132 -#define Pragma_System_Name 133 -#define Pragma_Task_Info 134 -#define Pragma_Task_Name 135 -#define Pragma_Task_Storage 136 -#define Pragma_Thread_Body 137 -#define Pragma_Time_Slice 138 -#define Pragma_Title 139 -#define Pragma_Unchecked_Union 140 -#define Pragma_Unimplemented_Unit 141 -#define Pragma_Unreferenced 142 -#define Pragma_Unreserve_All_Interrupts 143 -#define Pragma_Volatile 144 -#define Pragma_Volatile_Components 145 -#define Pragma_Weak_External 146 -#define Pragma_AST_Entry 147 -#define Pragma_Interface 148 -#define Pragma_Storage_Size 149 -#define Pragma_Storage_Unit 150 +#define Pragma_Priority_Specific_Dispatching 29 +#define Pragma_Profile 30 +#define Pragma_Profile_Warnings 31 +#define Pragma_Propagate_Exceptions 32 +#define Pragma_Queuing_Policy 33 +#define Pragma_Ravenscar 34 +#define Pragma_Restricted_Run_Time 35 +#define Pragma_Restrictions 36 +#define Pragma_Restriction_Warnings 37 +#define Pragma_Reviewable 38 +#define Pragma_Source_File_Name 39 +#define Pragma_Source_File_Name_Project 40 +#define Pragma_Style_Checks 41 +#define Pragma_Suppress 42 +#define Pragma_Suppress_Exception_Locations 43 +#define Pragma_Task_Dispatching_Policy 44 +#define Pragma_Universal_Data 45 +#define Pragma_Unsuppress 46 +#define Pragma_Use_VADS_Size 47 +#define Pragma_Validity_Checks 48 +#define Pragma_Warnings 49 +#define Pragma_Wide_Character_Encoding 50 +#define Pragma_Abort_Defer 51 +#define Pragma_All_Calls_Remote 52 +#define Pragma_Annotate 53 +#define Pragma_Assert 54 +#define Pragma_Asynchronous 55 +#define Pragma_Atomic 56 +#define Pragma_Atomic_Components 57 +#define Pragma_Attach_Handler 58 +#define Pragma_Comment 59 +#define Pragma_Common_Object 60 +#define Pragma_Complete_Representation 61 +#define Pragma_Complex_Representation 62 +#define Pragma_Controlled 63 +#define Pragma_Convention 64 +#define Pragma_CPP_Class 65 +#define Pragma_CPP_Constructor 66 +#define Pragma_CPP_Virtual 67 +#define Pragma_CPP_Vtable 68 +#define Pragma_Debug 69 +#define Pragma_Elaborate 70 +#define Pragma_Elaborate_All 71 +#define Pragma_Elaborate_Body 72 +#define Pragma_Export 73 +#define Pragma_Export_Exception 74 +#define Pragma_Export_Function 75 +#define Pragma_Export_Object 76 +#define Pragma_Export_Procedure 77 +#define Pragma_Export_Value 78 +#define Pragma_Export_Valued_Procedure 79 +#define Pragma_External 80 +#define Pragma_Finalize_Storage_Only 81 +#define Pragma_Ident 82 +#define Pragma_Import 83 +#define Pragma_Import_Exception 84 +#define Pragma_Import_Function 85 +#define Pragma_Import_Object 86 +#define Pragma_Import_Procedure 87 +#define Pragma_Import_Valued_Procedure 88 +#define Pragma_Inline 89 +#define Pragma_Inline_Always 90 +#define Pragma_Inline_Generic 91 +#define Pragma_Inspection_Point 92 +#define Pragma_Interface_Name 93 +#define Pragma_Interrupt_Handler 94 +#define Pragma_Interrupt_Priority 95 +#define Pragma_Java_Constructor 96 +#define Pragma_Java_Interface 97 +#define Pragma_Keep_Names 98 +#define Pragma_Link_With 99 +#define Pragma_Linker_Alias 100 +#define Pragma_Linker_Constructor 101 +#define Pragma_Linker_Destructor 102 +#define Pragma_Linker_Options 103 +#define Pragma_Linker_Section 104 +#define Pragma_List 105 +#define Pragma_Machine_Attribute 106 +#define Pragma_Main 107 +#define Pragma_Main_Storage 108 +#define Pragma_Memory_Size 109 +#define Pragma_No_Return 110 +#define Pragma_Obsolescent 111 +#define Pragma_Optimize 112 +#define Pragma_Optional_Overriding 113 +#define Pragma_Pack 114 +#define Pragma_Page 115 +#define Pragma_Passive 116 +#define Pragma_Preelaborable_Initialization 117 +#define Pragma_Preelaborate 118 +#define Pragma_Preelaborate_05 119 +#define Pragma_Psect_Object 120 +#define Pragma_Pure 121 +#define Pragma_Pure_05 122 +#define Pragma_Pure_Function 123 +#define Pragma_Remote_Call_Interface 124 +#define Pragma_Remote_Types 125 +#define Pragma_Share_Generic 126 +#define Pragma_Shared 127 +#define Pragma_Shared_Passive 128 +#define Pragma_Source_Reference 129 +#define Pragma_Stream_Convert 130 +#define Pragma_Subtitle 131 +#define Pragma_Suppress_All 132 +#define Pragma_Suppress_Debug_Info 133 +#define Pragma_Suppress_Initialization 134 +#define Pragma_System_Name 135 +#define Pragma_Task_Info 136 +#define Pragma_Task_Name 137 +#define Pragma_Task_Storage 138 +#define Pragma_Thread_Body 139 +#define Pragma_Time_Slice 140 +#define Pragma_Title 141 +#define Pragma_Unchecked_Union 142 +#define Pragma_Unimplemented_Unit 143 +#define Pragma_Unreferenced 144 +#define Pragma_Unreserve_All_Interrupts 145 +#define Pragma_Volatile 146 +#define Pragma_Volatile_Components 147 +#define Pragma_Weak_External 148 +#define Pragma_AST_Entry 149 +#define Pragma_Interface 150 +#define Pragma_Priority 151 +#define Pragma_Storage_Size 152 +#define Pragma_Storage_Unit 153 /* End of snames.h (C version of Snames package spec) */ Index: snames.ads =================================================================== --- snames.ads (revision 118179) +++ snames.ads (working copy) @@ -362,115 +362,124 @@ package Snames is Name_Normalize_Scalars : constant Name_Id := N + 140; Name_Polling : constant Name_Id := N + 141; -- GNAT Name_Persistent_BSS : constant Name_Id := N + 142; -- GNAT - Name_Profile : constant Name_Id := N + 143; -- Ada 05 - Name_Profile_Warnings : constant Name_Id := N + 144; -- GNAT - Name_Propagate_Exceptions : constant Name_Id := N + 145; -- GNAT - Name_Queuing_Policy : constant Name_Id := N + 146; - Name_Ravenscar : constant Name_Id := N + 147; -- Ada 05 - Name_Restricted_Run_Time : constant Name_Id := N + 148; -- GNAT - Name_Restrictions : constant Name_Id := N + 149; - Name_Restriction_Warnings : constant Name_Id := N + 150; -- GNAT - Name_Reviewable : constant Name_Id := N + 151; - Name_Source_File_Name : constant Name_Id := N + 152; -- GNAT - Name_Source_File_Name_Project : constant Name_Id := N + 153; -- GNAT - Name_Style_Checks : constant Name_Id := N + 154; -- GNAT - Name_Suppress : constant Name_Id := N + 155; - Name_Suppress_Exception_Locations : constant Name_Id := N + 156; -- GNAT - Name_Task_Dispatching_Policy : constant Name_Id := N + 157; - Name_Universal_Data : constant Name_Id := N + 158; -- AAMP - Name_Unsuppress : constant Name_Id := N + 159; -- GNAT - Name_Use_VADS_Size : constant Name_Id := N + 160; -- GNAT - Name_Validity_Checks : constant Name_Id := N + 161; -- GNAT - Name_Warnings : constant Name_Id := N + 162; -- GNAT - Last_Configuration_Pragma_Name : constant Name_Id := N +