-- GNATprove mode. As a special case, the front end does not insert a
-- Do_Division_Check flag on float exponentiation expressions, for the case
-- where the value is 0.0 and the exponent is negative, although this case
- -- does lead to a division check failure.
+ -- does lead to a division check failure. As another special case,
+ -- the front end does not insert a Do_Range_Check on an allocator where
+ -- the designated type is scalar, and the designated type is more
+ -- constrained than the type of the initialized allocator value or the type
+ -- of the default value for an uninitialized allocator.
- -- Note: the expander always takes care of the Do_Range check case,
- -- so this flag will never be set in the expanded tree passed to the
- -- back end code generator.
+ -- Note that the expander always takes care of the Do_Range_Check case, so
+ -- this flag will never be set in the expanded tree passed to the back end.
+ -- For the other two flags, the check can be generated either by the back
+ -- end or by the front end, depending on the setting of a target parameter.
-- Note that this accounts for all nodes that trigger the corresponding
-- checks, except for range checks on subtype_indications, which may be
-- conversion nodes (and set if the conversion requires a check).
-- Do_Division_Check (Flag13-Sem)
- -- This flag is set on a division operator (/ mod rem) to indicate
- -- that a zero divide check is required. The actual check is dealt
- -- with by the backend (all the front end does is to set the flag).
+ -- This flag is set on a division operator (/ mod rem) to indicate that
+ -- a zero divide check is required. The actual check is either dealt with
+ -- by the back end if Backend_Divide_Checks is set to true, or by the
+ -- front end itself if it is set to false.
-- Do_Length_Check (Flag4-Sem)
-- This flag is set in an N_Assignment_Statement, N_Op_And, N_Op_Or,
-- Do_Overflow_Check (Flag17-Sem)
-- This flag is set on an operator where an overflow check is required on
- -- the operation. The actual check is dealt with by the backend (all the
- -- front end does is to set the flag). The other cases where this flag is
- -- used is on a Type_Conversion node and for attribute reference nodes.
+ -- the operation. The actual check is either dealt with by the back end
+ -- if Backend_Overflow_Checks is set to true, or by the front end itself
+ -- if it is set to false. The other cases where this flag is used is on a
+ -- Type_Conversion node as well on if and case expression nodes.
-- For a type conversion, it means that the conversion is from one base
-- type to another, and the value may not fit in the target base type.
- -- See also the description of Do_Range_Check for this case. The only
- -- attribute references which use this flag are Pred and Succ, where it
- -- means that the result should be checked for going outside the base
- -- range. Note that this flag is not set for modular types. This flag is
+ -- See also the description of Do_Range_Check for this case. This flag is
-- also set on if and case expression nodes if we are operating in either
-- MINIMIZED or ELIMINATED overflow checking mode (to make sure that we
-- properly process overflow checking for dependent expressions).
-- range check is required. The target type is clear from the context.
-- The contexts in which this flag can appear are the following:
- -- Right side of an assignment. In this case the target type is
- -- taken from the left side of the assignment, which is referenced
- -- by the Name of the N_Assignment_Statement node.
+ -- Right side of an assignment. In this case the target type is taken
+ -- from the left side of the assignment, which is referenced by the
+ -- Name of the N_Assignment_Statement node.
-- Subscript expressions in an indexed component. In this case the
-- target type is determined from the type of the array, which is
-- listed above (e.g. in a return statement), an additional type
-- conversion node is introduced to represent the required check.
- -- A special case arises for the arguments of the Pred/Succ attributes.
- -- Here the range check needed is against First + 1 .. Last (Pred) or
- -- First .. Last - 1 (Succ) of the corresponding base type. Essentially
- -- these checks are what would be performed within the implicit body of
- -- the functions that correspond to these attributes. In these cases,
- -- the Do_Range check flag is set on the argument to the attribute
- -- function, and the back end must special case the appropriate range
- -- to check against.
-
-- Do_Storage_Check (Flag17-Sem)
-- This flag is set in an N_Allocator node to indicate that a storage
-- check is required for the allocation, or in an N_Subprogram_Body node
-- procedure call statement
-- procedure instantiation
-- requeue statement
+ -- variable reference marker
--
-- Set when the node appears within a context which allows the generation
-- of run-time ABE checks. This flag detemines whether the ABE Processing
-- attribute reference
-- call marker
-- entry call statement
+ -- expanded name
-- function call
-- function instantiation
+ -- identifier
-- package instantiation
-- procedure call statement
-- procedure instantiation
-- requeue statement
+ -- variable reference marker
--
-- Set when the node appears within a context where elaboration warnings
-- are enabled. This flag determines whether the ABE processing phase
-- the resolution of accidental overloading of binary or unary operators
-- which may occur in instances.
- -- Is_Read (Flag1-Sem)
+ -- Is_Read (Flag4-Sem)
-- Present in variable reference markers. Set when the original variable
-- reference constitues a read of the variable.
-- source.
-- Is_SPARK_Mode_On_Node (Flag2-Sem)
- -- Present in nodes which represent an elaboration scenario. Those are
- -- assignment statement, attribute reference, call marker, entry call
- -- statement, expanded name, function call, identifier, instantiation,
- -- procedure call statement, and requeue statement nodes. Set when the
- -- node appears within a context subject to SPARK_Mode On. This flag
- -- determines when the SPARK model of elaboration be activated by the
- -- ABE Processing phase.
+ -- Present in the following nodes:
+ --
+ -- assignment statement
+ -- attribute reference
+ -- call marker
+ -- entry call statement
+ -- expanded name
+ -- function call
+ -- function instantiation
+ -- identifier
+ -- package instantiation
+ -- procedure call statement
+ -- procedure instantiation
+ -- requeue statement
+ -- variable reference marker
+ --
+ -- Set when the node appears within a context subject to SPARK_Mode On.
+ -- This flag determines when the SPARK model of elaboration be activated
+ -- by the ABE Processing phase.
-- Is_Static_Coextension (Flag14-Sem)
-- Present in N_Allocator nodes. Set if the allocator is a coextension
-- indicate that the construct is a task master (i.e. has declared tasks
-- or declares an access to a task type).
- -- Is_Write (Flag2-Sem)
+ -- Is_Write (Flag5-Sem)
-- Present in variable reference markers. Set when the original variable
-- reference constitues a write of the variable.
-- 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.
+ -- because Analyze wants to insert extra actions on this list, before the
+ -- N_Object_Declaration, which always remains last on the list.
-- Rounded_Result (Flag18-Sem)
-- Present in N_Type_Conversion, N_Op_Divide, and N_Op_Multiply nodes.
-- are the result of expansion of rounded fixed-point divide, conversion
-- and multiplication operations.
+ -- Save_Invocation_Graph_Of_Body (Flag1-Sem)
+ -- Present in compilation unit nodes. Set when the elaboration mechanism
+ -- must record all invocation constructs and invocation relations within
+ -- the body of the compilation unit.
+ --
-- SCIL_Entity (Node4-Sem)
-- Present in SCIL nodes. References the specific tagged type associated
-- with the SCIL node (for an N_SCIL_Dispatching_Call node, this is
-- Original_Discriminant (Node2-Sem)
-- Is_Elaboration_Checks_OK_Node (Flag1-Sem)
-- Is_SPARK_Mode_On_Node (Flag2-Sem)
+ -- Is_Elaboration_Warnings_OK_Node (Flag3-Sem)
-- Has_Private_View (Flag11-Sem) (set in generic units)
-- Redundant_Use (Flag13-Sem)
-- Atomic_Sync_Required (Flag14-Sem)
-- Einfo.
-- Note: N_Defining_Identifier is an extended node whose fields are
- -- deliberately layed out to match the layout of fields in an ordinary
+ -- deliberately laid out to match the layout of fields in an ordinary
-- N_Identifier node allowing for easy alteration of an identifier
-- node into a defining identifier node. For details, see procedure
-- Sinfo.CN.Change_Identifier_To_Defining_Identifier.
-- in package Einfo.
-- Note: N_Defining_Character_Literal is an extended node whose fields
- -- are deliberate layed out to match the layout of fields in an ordinary
- -- N_Character_Literal node allowing for easy alteration of a character
+ -- are deliberately laid out to match layout of fields in an ordinary
+ -- N_Character_Literal node, allowing for easy alteration of a character
-- literal node into a defining character literal node. For details, see
-- Sinfo.CN.Change_Character_Literal_To_Defining_Character_Literal.
-- in package Einfo.
-- Note: N_Defining_Operator_Symbol is an extended node whose fields
- -- are deliberately layed out to match the layout of fields in an
+ -- are deliberately laid out to match the layout of fields in an
-- ordinary N_Operator_Symbol node allowing for easy alteration of
-- an operator symbol node into a defining operator symbol node.
-- See Sinfo.CN.Change_Operator_Symbol_To_Defining_Operator_Symbol
-- N_Compilation_Unit
-- Sloc points to first token of defining unit name
- -- Library_Unit (Node4-Sem) corresponding/parent spec/body
-- Context_Items (List1) context items and pragmas preceding unit
-- Private_Present (Flag15) set if library unit has private keyword
-- Unit (Node2) library item or subunit
-- Aux_Decls_Node (Node5) points to the N_Compilation_Unit_Aux node
- -- Has_No_Elaboration_Code (Flag17-Sem)
- -- Body_Required (Flag13-Sem) set for spec if body is required
- -- Acts_As_Spec (Flag4-Sem) flag for subprogram body with no spec
- -- Context_Pending (Flag16-Sem)
-- First_Inlined_Subprogram (Node3-Sem)
+ -- Library_Unit (Node4-Sem) corresponding/parent spec/body
+ -- Save_Invocation_Graph_Of_Body (Flag1-Sem)
+ -- Acts_As_Spec (Flag4-Sem) flag for subprogram body with no spec
+ -- Body_Required (Flag13-Sem) set for spec if body is required
-- Has_Pragma_Suppress_All (Flag14-Sem)
+ -- Context_Pending (Flag16-Sem)
+ -- Has_No_Elaboration_Code (Flag17-Sem)
-- N_Compilation_Unit_Aux
-- Sloc is a copy of the Sloc from the N_Compilation_Unit node
-- of this node, leaving the N_Selected_Component node used only when
-- the prefix is a record or protected type.
- -- The fields of the N_Expanded_Name node are layed out identically
+ -- The fields of the N_Expanded_Name node are laid out identically
-- to those of the N_Selected_Component node, allowing conversion of
-- an expanded name node to a selected component node to be done
-- easily, see Sinfo.CN.Change_Selected_Component_To_Expanded_Name.
-- Associated_Node (Node4-Sem)
-- Is_Elaboration_Checks_OK_Node (Flag1-Sem)
-- Is_SPARK_Mode_On_Node (Flag2-Sem)
+ -- Is_Elaboration_Warnings_OK_Node (Flag3-Sem)
-- Has_Private_View (Flag11-Sem) set in generic units
-- Redundant_Use (Flag13-Sem)
-- Atomic_Sync_Required (Flag14-Sem)
-- N_Variable_Reference_Marker
-- Sloc points to Sloc of original variable reference
-- Target (Node1-Sem)
- -- Is_Read (Flag1-Sem)
- -- Is_Write (Flag2-Sem)
+ -- Is_Elaboration_Checks_OK_Node (Flag1-Sem)
+ -- Is_SPARK_Mode_On_Node (Flag2-Sem)
+ -- Is_Elaboration_Warnings_OK_Node (Flag3-Sem)
+ -- Is_Read (Flag4-Sem)
+ -- Is_Write (Flag5-Sem)
-----------
-- Empty --
(N : Node_Id) return Boolean; -- Flag4
function Is_Read
- (N : Node_Id) return Boolean; -- Flag1
+ (N : Node_Id) return Boolean; -- Flag4
function Is_Source_Call
(N : Node_Id) return Boolean; -- Flag4
(N : Node_Id) return Boolean; -- Flag5
function Is_Write
- (N : Node_Id) return Boolean; -- Flag2
+ (N : Node_Id) return Boolean; -- Flag5
function Iteration_Scheme
(N : Node_Id) return Node_Id; -- Node2
function Rounded_Result
(N : Node_Id) return Boolean; -- Flag18
+ function Save_Invocation_Graph_Of_Body
+ (N : Node_Id) return Boolean; -- Flag1
+
function SCIL_Controlling_Tag
(N : Node_Id) return Node_Id; -- Node5
(N : Node_Id; Val : Boolean := True); -- Flag4
procedure Set_Is_Read
- (N : Node_Id; Val : Boolean := True); -- Flag1
+ (N : Node_Id; Val : Boolean := True); -- Flag4
procedure Set_Is_Source_Call
(N : Node_Id; Val : Boolean := True); -- Flag4
(N : Node_Id; Val : Boolean := True); -- Flag5
procedure Set_Is_Write
- (N : Node_Id; Val : Boolean := True); -- Flag2
+ (N : Node_Id; Val : Boolean := True); -- Flag5
procedure Set_Iteration_Scheme
(N : Node_Id; Val : Node_Id); -- Node2
procedure Set_Rounded_Result
(N : Node_Id; Val : Boolean := True); -- Flag18
+ procedure Set_Save_Invocation_Graph_Of_Body
+ (N : Node_Id; Val : Boolean := True); -- Flag1
+
procedure Set_SCIL_Controlling_Tag
(N : Node_Id; Val : Node_Id); -- Node5
N_Iterated_Component_Association =>
(1 => True, -- Defining_Identifier (Node1)
- 2 => False, -- unused
+ 2 => True, -- Loop_Actions (List2-Sem)
3 => True, -- Expression (Node3)
4 => True, -- Discrete_Choices (List4)
5 => False), -- unused
pragma Inline (Reverse_Present);
pragma Inline (Right_Opnd);
pragma Inline (Rounded_Result);
+ pragma Inline (Save_Invocation_Graph_Of_Body);
pragma Inline (SCIL_Controlling_Tag);
pragma Inline (SCIL_Entity);
pragma Inline (SCIL_Tag_Value);
pragma Inline (Set_Reverse_Present);
pragma Inline (Set_Right_Opnd);
pragma Inline (Set_Rounded_Result);
+ pragma Inline (Set_Save_Invocation_Graph_Of_Body);
pragma Inline (Set_SCIL_Controlling_Tag);
pragma Inline (Set_SCIL_Entity);
pragma Inline (Set_SCIL_Tag_Value);