The following fields are not used in GNAT nor in any of its clients.
Neither the setters nor the getters are called.
Node fields:
Do_Storage_Check
Enclosing_Variant
Handler_List_Entry
Is_Subprogram_Descriptor
Renaming_Exception
Default_Expression
Entity fields:
Is_Unimplemented
This patch removes all of them.
gcc/ada/ChangeLog:
* einfo.ads: Remove unused fields.
* gen_il-fields.ads: Likewise.
* gen_il-gen-gen_entities.adb: Likewise.
* gen_il-gen-gen_nodes.adb: Likewise.
* sinfo.ads: Likewise.
* gen_il-gen.adb (Compile): Remove obsolete comment.
-- as its corresponding record type, but whose parent is the full view
-- of the parent in the original type extension.
--- Is_Unimplemented
--- Defined in all entities. Set for any entity to which a valid pragma
--- or aspect Unimplemented applies.
-
-- Is_Unsigned_Type
-- Defined in all types, but can be set only for discrete and fixed-point
-- type and subtype entities. This flag is only valid if the entity is
-- Is_Thunk
-- Is_Trivial_Subprogram
-- Is_Unchecked_Union
- -- Is_Unimplemented
-- Is_Visible_Formal
-- Kill_Elaboration_Checks
-- Low_Bound_Tested
Corresponding_Stub,
Dcheck_Function,
Declarations,
- Default_Expression,
Default_Storage_Pool,
Default_Name,
Default_Subtype_Mark,
Do_Length_Check,
Do_Overflow_Check,
Do_Range_Check,
- Do_Storage_Check,
Elaborate_All_Desirable,
Elaborate_All_Present,
Elaborate_Desirable,
Else_Actions,
Else_Statements,
Elsif_Parts,
- Enclosing_Variant,
End_Label,
End_Span,
Entity_Or_Associated_Node,
Generic_Parent,
Generic_Parent_Type,
Handled_Statement_Sequence,
- Handler_List_Entry,
Has_Created_Identifier,
Has_Dereference_Action,
Has_Dynamic_Length_Check,
Is_Static_Coextension,
Is_Static_Expression,
Is_Structural,
- Is_Subprogram_Descriptor,
Is_Task_Allocation_Block,
Is_Task_Body_Procedure,
Is_Task_Master,
Reason,
Record_Extension_Part,
Redundant_Use,
- Renaming_Exception,
Result_Definition,
Return_Object_Declarations,
Return_Statement_Entity,
Is_Unchecked_Union,
Is_Underlying_Full_View,
Is_Underlying_Record_View,
- Is_Unimplemented,
Is_Unsigned_Type,
Is_Uplevel_Referenced_Entity,
Is_Valued_Procedure,
Sm (Is_Unchecked_Union, Flag, Impl_Base_Type_Only),
Sm (Is_Underlying_Full_View, Flag),
Sm (Is_Underlying_Record_View, Flag, Base_Type_Only),
- Sm (Is_Unimplemented, Flag),
Sm (Is_Uplevel_Referenced_Entity, Flag),
Sm (Is_Visible_Formal, Flag),
Sm (Is_Visible_Lib_Unit, Flag),
Sy (Null_Exclusion_Present, Flag, Default_False),
Sy (Expression, Node_Id, Default_Empty),
Sm (For_Special_Return_Object, Flag),
- Sm (Do_Storage_Check, Flag),
Sm (Is_Dynamic_Coextension, Flag),
Sm (Is_Static_Coextension, Flag),
Sm (No_Initialization, Flag),
Sm (Assignment_OK, Flag),
Sm (Corresponding_Generic_Association, Node_Id),
Sm (Exception_Junk, Flag),
- Sm (Handler_List_Entry, Node_Id),
- Sm (Is_Subprogram_Descriptor, Flag),
Sm (More_Ids, Flag),
Sm (No_Initialization, Flag),
Sm (Prev_Ids, Flag),
Sm (Activation_Chain_Entity, Node_Id),
Sm (Acts_As_Spec, Flag),
Sm (Corresponding_Entry_Body, Node_Id),
- Sm (Do_Storage_Check, Flag),
Sm (Has_Relative_Deadline_Pragma, Flag),
Sm (Is_Entry_Barrier_Function, Flag),
Sm (Is_Protected_Subprogram_Body, Flag),
Sy (Aspect_Specifications, List_Id, Default_No_List),
Sm (Expression, Node_Id),
Sm (More_Ids, Flag),
- Sm (Prev_Ids, Flag),
- Sm (Renaming_Exception, Node_Id)));
+ Sm (Prev_Ids, Flag)));
Cc (N_Exception_Handler, Node_Kind,
(Sy (Choice_Parameter, Node_Id, Default_Empty),
Sy (Parameter_Type, Node_Id),
Sy (Expression, Node_Id, Default_Empty),
Sy (Aspect_Specifications, List_Id, Default_No_List),
- Sm (Default_Expression, Node_Id),
Sm (More_Ids, Flag),
Sm (Prev_Ids, Flag)));
(Sy (Discrete_Choices, List_Id),
Sy (Component_List, Node_Id),
Sm (Dcheck_Function, Node_Id),
- Sm (Enclosing_Variant, Node_Id),
Sm (Has_SP_Choice, Flag),
Sm (Present_Expr, Uint)));
-- Set of fields where the setter should set the Parent. True for
-- syntactic fields of type Node_Id and List_Id, but with some
-- exceptions. Expression is syntactic AND semantic, and the Parent
- -- is needed. Default_Expression is also both, but the Parent is not
- -- needed. Then_Actions and Else_Actions are not syntactic, but the
+ -- is needed. Then_Actions and Else_Actions are not syntactic, but the
-- Parent is needed.
--
-- Computed in Check_For_Syntactic_Field_Mismatch.
-- Do_Discriminant_Check
-- Do_Length_Check
- -- Do_Storage_Check
-- These flags are used in some specific cases by the front end, either
-- during semantic analysis or during expansion, and cannot be expected
-- This field is present in an N_Variant node, It references the entity
-- for the discriminant checking function for the variant.
- -- Default_Expression
- -- This field is Empty if there is no default expression. If there is a
- -- simple default expression (one with no side effects), then this field
- -- simply contains a copy of the Expression field (both point to the tree
- -- for the default expression). Default_Expression is used for
- -- conformance checking.
-
-- Default_Storage_Pool
-- This field is present in N_Compilation_Unit_Aux nodes. It is set to a
-- copy of Opt.Default_Pool at the end of the compilation unit. See
-- listed above (e.g. in a return statement), an additional type
-- conversion node is introduced to represent the required check.
- -- Do_Storage_Check
- -- 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
- -- to indicate that a stack check is required in the subprogram prologue.
- -- The N_Allocator case is handled by the routine that expands the call
- -- to the runtime routine. The N_Subprogram_Body case is handled by the
- -- backend, and all the semantics does is set the flag.
-
-- Elaborate_Present
-- This flag is set in the N_With_Clause node to indicate that pragma
-- Elaborate pragma appears for the with'ed units.
-- need for this field, so in the tree passed to Gigi, this field is
-- always set to No_List.
- -- Enclosing_Variant
- -- This field is present in the N_Variant node and identifies the Node_Id
- -- corresponding to the immediately enclosing variant when the variant is
- -- nested, and N_Empty otherwise. Set during semantic processing of the
- -- variant part of a record type.
-
-- Entity
-- Appears in all direct names (identifiers, character literals, and
-- operator symbols), as well as expanded names, and attributes that
-- Generic_Parent_Type is also used in an instance to determine whether a
-- private operation overrides an inherited one.
- -- Handler_List_Entry
- -- This field is present in N_Object_Declaration nodes. It is set only
- -- for the Handler_Record entry generated for an exception in zero cost
- -- exception handling mode. It references the corresponding item in the
- -- handler list, and is used to delete this entry if the corresponding
- -- handler is deleted during optimization. For further details on why
- -- this is required, see Exp_Ch11.Remove_Handler_Entries.
-
-- Has_Dereference_Action
-- This flag is present in N_Explicit_Dereference nodes. It is set to
-- indicate that the expansion has aready produced a call to primitive
-- the generic unit on the actual parameters done in the outermost scope
-- where it would be legal to declare an identical named instantiation.
- -- Is_Subprogram_Descriptor
- -- Present in N_Object_Declaration, and set only for the object
- -- declaration generated for a subprogram descriptor in fast exception
- -- mode. See Exp_Ch11 for details of use.
-
-- Is_Task_Allocation_Block
-- A flag set in a Block_Statement node to indicate that it is the
-- expansion of a task allocator, or the allocator of an object
-- to indicate that a use is redundant (and therefore need not be undone
-- on scope exit).
- -- Renaming_Exception
- -- Present in N_Exception_Declaration node. Used to point back to the
- -- exception renaming for an exception declared within a subprogram.
- -- What happens is that an exception declared in a subprogram is moved
- -- to the library level with a unique name, and the original exception
- -- becomes a renaming. This link from the library level exception to the
- -- renaming declaration allows registering of the proper exception name.
-
-- Return_Statement_Entity
-- Present in N_Simple_Return_Statement and N_Extended_Return_Statement.
-- Points to an E_Return_Statement representing the return statement.
-- Null_Exclusion_Present
-- Object_Definition subtype indic./array type def./access def.
-- Expression (set to Empty if not present)
- -- Handler_List_Entry
-- Corresponding_Generic_Association
-- More_Ids (set to False if no more identifiers in list)
-- Prev_Ids (set to False if no previous identifiers in list)
-- No_Initialization
-- Assignment_OK
-- Exception_Junk
- -- Is_Subprogram_Descriptor
-- Has_Init_Expression
-- Suppress_Assignment_Checks
-- Sloc points to WHEN
-- Discrete_Choices
-- Component_List
- -- Enclosing_Variant
-- Present_Expr
-- Dcheck_Function
-- Has_SP_Choice
-- Null_Exclusion_Present
-- No_Initialization
-- Is_Static_Coextension
- -- Do_Storage_Check
-- Is_Dynamic_Coextension
-- plus fields for expression
-- Expression (set to Empty if no default expression)
-- More_Ids (set to False if no more identifiers in list)
-- Prev_Ids (set to False if no previous identifiers in list)
- -- Default_Expression
---------------
-- 6.1 Mode --
-- At_End_Proc (set to Empty if no clean up procedure)
-- Acts_As_Spec
-- Bad_Is_Detected used only by parser
- -- Do_Storage_Check
-- Has_Relative_Deadline_Pragma
-- Is_Entry_Barrier_Function
-- Is_Protected_Subprogram_Body
-- Sloc points to EXCEPTION
-- Defining_Identifier
-- Expression
- -- Renaming_Exception
-- More_Ids (set to False if no more identifiers in list)
-- Prev_Ids (set to False if no previous identifiers in list)