-- has been inserted at the flagged node. This is used to avoid the
-- generation of duplicate checks.
- -- Has_Local_Raise (Flag8-Sem)
- -- Present in exception handler nodes. Set if the handler can be entered
- -- via a local raise that gets transformed to a goto statement. This will
- -- always be set if Local_Raise_Statements is non-empty, but can also be
- -- set as a result of generation of N_Raise_xxx nodes, or flags set in
- -- nodes requiring generation of back end checks.
-
------------------------------------
-- Description of Semantic Fields --
------------------------------------
-- is used for translation of the at end handler into a normal exception
-- handler.
- -- Aspect_Cancel (Flag11-Sem)
- -- Processing of aspect specifications typically generates pragmas and
- -- attribute definition clauses that are inserted into the tree after
- -- the declaration node to get the desired aspect effect. In the case
- -- of Boolean aspects that use "=> False" to cancel the effect of an
- -- aspect (i.e. turn if off), the generated pragma has the Aspect_Cancel
- -- flag set to indicate that the pragma operates in the opposite sense.
-
-- Aspect_Rep_Item (Node2-Sem)
-- Present in N_Aspect_Specification nodes. Points to the corresponding
-- pragma/attribute definition node used to process the aspect.
-- declaration is treated as an implicit reference to the formal in the
-- ali file.
+ -- From_Dynamic_Predicate (Flag7-Sem)
+ -- Set for generated pragma Predicate node if this is generated by a
+ -- Dynamic_Predicate aspect.
+
+ -- From_Static_Predicate (Flag8-Sem)
+ -- Set for generated pragma Predicate node if this is generated by a
+ -- Static_Predicate aspect.
+
-- Generic_Parent (Node5-Sem)
-- Generic_Parent is defined on declaration nodes that are instances. The
-- value of Generic_Parent is the generic entity from which the instance
-- handler is deleted during optimization. For further details on why
-- this is required, see Exp_Ch11.Remove_Handler_Entries.
+ -- Has_Local_Raise (Flag8-Sem)
+ -- Present in exception handler nodes. Set if the handler can be entered
+ -- via a local raise that gets transformed to a goto statement. This will
+ -- always be set if Local_Raise_Statements is non-empty, but can also be
+ -- set as a result of generation of N_Raise_xxx nodes, or flags set in
+ -- nodes requiring generation of back end checks.
+
-- Has_No_Elaboration_Code (Flag17-Sem)
-- A flag that appears in the N_Compilation_Unit node to indicate whether
-- or not elaboration code is present for this unit. It is initially set
-- Is_Delayed_Aspect (Flag14-Sem)
-- Present in N_Pragma and N_Attribute_Definition_Clause nodes which
-- come from aspect specifications, where the evaluation of the aspect
- -- must be delayed to the freeze point.
+ -- must be delayed to the freeze point. This flag is also set True in
+ -- the corresponding N_Aspect_Specification node.
-- Is_Controlling_Actual (Flag16-Sem)
-- This flag is set on in an expression that is a controlling argument in
-- the body, so this flag is used to generate the proper message (see
-- Sem_Util.Check_Unused_Withs for details)
+ -- Used_Operations (Elist5-Sem)
+ -- Present in N_Use_Type_Clause nodes. Holds the list of operations that
+ -- are made potentially use-visible by the clause. Simplifies processing
+ -- on exit from the scope of the use_type_clause, in particular in the
+ -- case of Use_All_Type, when those operations several scopes.
+
-- Was_Originally_Stub (Flag13-Sem)
-- This flag is set in the node for a proper body that replaces stub.
-- During the analysis procedure, stubs in some situations get rewritten
-- From_Aspect_Specification (Flag13-Sem)
-- Is_Delayed_Aspect (Flag14-Sem)
-- Import_Interface_Present (Flag16-Sem)
- -- Aspect_Cancel (Flag11-Sem)
-- Split_PPC (Flag17) set if corresponding aspect had Split_PPC set
-- Class_Present (Flag6) set if from Aspect with 'Class
+ -- From_Dynamic_Predicate (Flag7-Sem) Set if Dynamic_Predicate aspect
+ -- From_Static_Predicate (Flag8-Sem) Set if Static_Predicate aspect
-- 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
-- Has_Relative_Deadline_Pragma (Flag9-Sem)
-- Has_Pragma_CPU (Flag14-Sem)
- ------------------------------
- -- Parameterized Expression --
- ------------------------------
+ -------------------------
+ -- Expression Function --
+ -------------------------
-- This is an Ada 2012 extension, we put it here for now, to be labeled
-- and put in its proper section when we know exactly where that is!
- -- PARAMETERIZED_EXPRESSION ::=
+ -- EXPRESSION_FUNCTION ::=
-- FUNCTION SPECIFICATION IS (EXPRESSION);
- -- N_Parameterized_Expression
+ -- N_Expression_Function
-- Sloc points to FUNCTION
-- Specification (Node1)
-- Expression (Node3)
------------------------------
-- PACKAGE_DECLARATION ::=
- -- PACKAGE_SPECIFICATION
- -- [ASPECT_SPECIFICATIONS];
+ -- PACKAGE_SPECIFICATION;
-- Note: the activation chain entity for a package spec is used for
-- all tasks declared in the package spec, or in the package body.
--------------------------------
-- PACKAGE_SPECIFICATION ::=
- -- package DEFINING_PROGRAM_UNIT_NAME is
+ -- package DEFINING_PROGRAM_UNIT_NAME
+ -- [ASPECT_SPECIFICATIONS]
+ -- is
-- {BASIC_DECLARATIVE_ITEM}
-- [private
-- {BASIC_DECLARATIVE_ITEM}]
-----------------------
-- PACKAGE_BODY ::=
- -- package body DEFINING_PROGRAM_UNIT_NAME is
+ -- package body DEFINING_PROGRAM_UNIT_NAME
+ -- [ASPECT_SPECIFICATIONS]
+ -- is
-- DECLARATIVE_PART
-- [begin
-- HANDLED_SEQUENCE_OF_STATEMENTS]
-- Subtype_Marks (List2)
-- Next_Use_Clause (Node3-Sem)
-- Hidden_By_Use_Clause (Elist4-Sem)
+ -- Used_Operations (Elist5-Sem)
-- All_Present (Flag15)
-------------------------------
-- TASK_TYPE_DECLARATION ::=
-- task type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
- -- [is [new INTERFACE_LIST with] TASK_DEFINITION]
- -- [ASPECT_SPECIFICATIONS];
+ -- [ASPECT_SPECIFICATIONS]
+ -- [is [new INTERFACE_LIST with] TASK_DEFINITION];
-- N_Task_Type_Declaration
-- Sloc points to TASK
-- SINGLE_TASK_DECLARATION ::=
-- task DEFINING_IDENTIFIER
- -- [is [new INTERFACE_LIST with] TASK_DEFINITION]
- -- [ASPECT_SPECIFICATIONS];
+ -- [ASPECT_SPECIFICATIONS]
+ -- [is [new INTERFACE_LIST with] TASK_DEFINITION];
-- N_Single_Task_Declaration
-- Sloc points to TASK
--------------------
-- TASK_BODY ::=
- -- task body task_DEFINING_IDENTIFIER is
+ -- task body task_DEFINING_IDENTIFIER
+ -- [ASPECT_SPECIFICATIONS]
+ -- is
-- DECLARATIVE_PART
-- begin
-- HANDLED_SEQUENCE_OF_STATEMENTS
-- PROTECTED_TYPE_DECLARATION ::=
-- protected type DEFINING_IDENTIFIER [KNOWN_DISCRIMINANT_PART]
- -- is [new INTERFACE_LIST with] PROTECTED_DEFINITION
- -- {ASPECT_SPECIFICATIONS];
+ -- [ASPECT_SPECIFICATIONS]
+ -- is [new INTERFACE_LIST with] PROTECTED_DEFINITION;
-- Note: protected type declarations are not permitted in Ada 83 mode
-- SINGLE_PROTECTED_DECLARATION ::=
-- protected DEFINING_IDENTIFIER
- -- is [new INTERFACE_LIST with] PROTECTED_DEFINITION
- -- [ASPECT_SPECIFICATIONS];
+ -- [ASPECT_SPECIFICATIONS]
+ -- is [new INTERFACE_LIST with] PROTECTED_DEFINITION;
-- Note: single protected declarations are not allowed in Ada 83 mode
-------------------------
-- PROTECTED_BODY ::=
- -- protected body DEFINING_IDENTIFIER is
+ -- protected body DEFINING_IDENTIFIER
+ -- [ASPECT_SPECIFICATIONS];
+ -- is
-- {PROTECTED_OPERATION_ITEM}
-- end [protected_IDENTIFIER];
-- Next_Rep_Item (Node5-Sem)
-- Split_PPC (Flag17) Set if split pre/post attribute
-- Is_Boolean_Aspect (Flag16-Sem)
+ -- Is_Delayed_Aspect (Flag14-Sem)
-- Note: Aspect_Specification is an Ada 2012 feature
+ -- Note: The Identifier serves to identify the aspect involved (it
+ -- is the aspect whose name corresponds to the Chars field). This
+ -- means that the other fields of this identifier are unused, and
+ -- in particular we use the Entity field of this identifier to save
+ -- a copy of the expression for visibility analysis, see spec of
+ -- Sem_Ch13 for full details of this usage.
+
-- Note: When a Pre or Post aspect specification is processed, it is
-- broken into AND THEN sections. The left most section has Split_PPC
-- set to False, indicating that it is the original specification (e.g.
-- This node is created by the analyzer/expander to handle some
-- expansion cases, notably short circuit forms where there are
- -- actions associated with the right hand operand.
+ -- actions associated with the right-hand side operand.
-- The N_Expression_With_Actions node represents an expression with
-- an associated set of actions (which are executable statements and
-- executing all the actions.
-- Note: if the actions contain declarations, then these declarations
- -- maybe referenced with in the expression. It is thus appropriate for
- -- the back end to create a scope that encompasses the construct (any
+ -- may be referenced within the expression. It is thus appropriate for
+ -- the back-end to create a scope that encompasses the construct (any
-- declarations within the actions will definitely not be referenced
-- once elaboration of the construct is completed).
N_Empty,
N_Pragma_Argument_Association,
- -- N_Has_Etype
+ -- N_Has_Etype, N_Has_Chars
+
+ -- Note: of course N_Error does not really have Etype or Chars fields,
+ -- and any attempt to access these fields in N_Error will cause an
+ -- error, but historically this always has been positioned so that an
+ -- "in N_Has_Chars" or "in N_Has_Etype" test yields true for N_Error.
+ -- Most likely this makes coding easier somewhere but still seems
+ -- undesirable. To be investigated some time ???
N_Error,
N_Component_Declaration,
N_Entry_Declaration,
+ N_Expression_Function,
N_Formal_Object_Declaration,
N_Formal_Type_Declaration,
N_Full_Type_Declaration,
N_Iterator_Specification,
N_Loop_Parameter_Specification,
N_Object_Declaration,
- N_Parameterized_Expression,
N_Protected_Type_Declaration,
N_Private_Extension_Declaration,
N_Private_Type_Declaration,
N_Code_Statement,
N_Conditional_Entry_Call,
- -- N_Statement_Other_Than_Procedure_Call. N_Delay_Statement
+ -- N_Statement_Other_Than_Procedure_Call, N_Delay_Statement
N_Delay_Relative_Statement,
N_Delay_Until_Statement,
function Array_Aggregate
(N : Node_Id) return Node_Id; -- Node3
- function Aspect_Cancel
- (N : Node_Id) return Boolean; -- Flag11
-
function Aspect_Rep_Item
(N : Node_Id) return Node_Id; -- Node2
function From_Default
(N : Node_Id) return Boolean; -- Flag6
+ function From_Dynamic_Predicate
+ (N : Node_Id) return Boolean; -- Flag7
+
+ function From_Static_Predicate
+ (N : Node_Id) return Boolean; -- Flag8
+
function Generic_Associations
(N : Node_Id) return List_Id; -- List3
function Visible_Declarations
(N : Node_Id) return List_Id; -- List2
+ function Used_Operations
+ (N : Node_Id) return Elist_Id; -- Elist5
+
function Was_Originally_Stub
(N : Node_Id) return Boolean; -- Flag13
procedure Set_Array_Aggregate
(N : Node_Id; Val : Node_Id); -- Node3
- procedure Set_Aspect_Cancel
- (N : Node_Id; Val : Boolean := True); -- Flag11
-
procedure Set_Aspect_Rep_Item
(N : Node_Id; Val : Node_Id); -- Node2
procedure Set_From_Default
(N : Node_Id; Val : Boolean := True); -- Flag6
+ procedure Set_From_Dynamic_Predicate
+ (N : Node_Id; Val : Boolean := True); -- Flag7
+
+ procedure Set_From_Static_Predicate
+ (N : Node_Id; Val : Boolean := True); -- Flag8
+
procedure Set_Generic_Associations
(N : Node_Id; Val : List_Id); -- List3
procedure Set_Visible_Declarations
(N : Node_Id; Val : List_Id); -- List2
+ procedure Set_Used_Operations
+ (N : Node_Id; Val : Elist_Id); -- Elist5
+
procedure Set_Was_Originally_Stub
(N : Node_Id; Val : Boolean := True); -- Flag13
4 => True, -- Handled_Statement_Sequence (Node4)
5 => False), -- Corresponding_Spec (Node5-Sem)
- N_Parameterized_Expression =>
+ N_Expression_Function =>
(1 => True, -- Specification (Node1)
2 => False, -- unused
3 => True, -- Expression (Node3)
pragma Inline (Alternatives);
pragma Inline (Ancestor_Part);
pragma Inline (Array_Aggregate);
- pragma Inline (Aspect_Cancel);
pragma Inline (Aspect_Rep_Item);
pragma Inline (Assignment_OK);
pragma Inline (Associated_Node);
pragma Inline (From_At_End);
pragma Inline (From_At_Mod);
pragma Inline (From_Default);
+ pragma Inline (From_Dynamic_Predicate);
+ pragma Inline (From_Static_Predicate);
pragma Inline (Generic_Associations);
pragma Inline (Generic_Formal_Declarations);
pragma Inline (Generic_Parent);
pragma Inline (Variant_Part);
pragma Inline (Variants);
pragma Inline (Visible_Declarations);
+ pragma Inline (Used_Operations);
pragma Inline (Was_Originally_Stub);
pragma Inline (Withed_Body);
pragma Inline (Zero_Cost_Handling);
pragma Inline (Set_Alternatives);
pragma Inline (Set_Ancestor_Part);
pragma Inline (Set_Array_Aggregate);
- pragma Inline (Set_Aspect_Cancel);
pragma Inline (Set_Aspect_Rep_Item);
pragma Inline (Set_Assignment_OK);
pragma Inline (Set_Associated_Node);
pragma Inline (Set_From_At_End);
pragma Inline (Set_From_At_Mod);
pragma Inline (Set_From_Default);
+ pragma Inline (Set_From_Dynamic_Predicate);
+ pragma Inline (Set_From_Static_Predicate);
pragma Inline (Set_Generic_Associations);
pragma Inline (Set_Generic_Formal_Declarations);
pragma Inline (Set_Generic_Parent);
pragma Inline (Set_Variant_Part);
pragma Inline (Set_Variants);
pragma Inline (Set_Visible_Declarations);
+ pragma Inline (Set_Used_Operations);
pragma Inline (Set_Was_Originally_Stub);
pragma Inline (Set_Withed_Body);
pragma Inline (Set_Zero_Cost_Handling);
+ --------------
+ -- Synonyms --
+ --------------
+
+ -- These synonyms are to aid in transition, they should eventually be
+ -- removed when all remaining references to the obsolete name are gone.
+
N_Simple_Return_Statement : constant Node_Kind := N_Return_Statement;
-- Rename N_Return_Statement to be N_Simple_Return_Statement. Clients
-- should refer to N_Simple_Return_Statement.
+ N_Parameterized_Expression : constant Node_Kind := N_Expression_Function;
+ -- Old name for expression functions (used during Ada 2012 transition)
+
end Sinfo;