This removes 5 more unused fields from entities, as well as 1 flag.
gcc/ada/ChangeLog:
* einfo.ads (Default_Expr_Function): Delete.
(Dependent_Instances): Likewise.
(Handler_Records): Likewise.
(Needs_Activation_Record): Likewise.
(Original_Access_Type): Likewise.
(Register_Exception_Call): Likewise.
* sinfo.ads (Accept_Handler_Records): Likewise.
* gen_il-fields.ads (Opt_Field_Enum): Remove Accept_Handler_Records,
Default_Expr_Function, Dependent_Instances, Handler_Records,
Needs_Activation_Record, Original_Access_Type and
Register_Exception_Call.
* gen_il-gen-gen_entities.adb: Adjust accordingly.
* gen_il-gen-gen_nodes.adb: Likewise.
* exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Remove call
to Set_Original_Access_Type.
(Expand_N_Selective_Accept): Remove call to Set_Handler_Records.
* exp_ch11.adb (Expand_N_Exception_Declaration): Remove call to
Set_Register_Exception_Call.
* sem_ch3.adb (Access_Subprogram_Declaration): Remove call to
Set_Needs_Activation_Record.
* sem_ch12.adb (Instantiate_Package_Body): Remove call to
Set_Handler_Records.
-- Default_Value aspect specification for the type, or inherited
-- on derivation.
--- Default_Expr_Function
--- Defined in parameters. It holds the entity of the parameterless
--- function that is built to evaluate the default expression if it is
--- more complex than a simple identifier or literal. For the latter
--- simple cases or if there is no default value, this field is Empty.
-
-- Default_Expressions_Processed
-- A flag in subprograms (functions, operators, procedures) and in
-- entries and entry families used to indicate that default expressions
-- that holds value of delta for the type, as given in the declaration
-- or as inherited by a subtype or derived type.
--- Dependent_Instances
--- Defined in packages that are instances. Holds list of instances
--- of inner generics. Used to place freeze nodes for those instances
--- after that of the current one, i.e. after the corresponding generic
--- bodies.
-
-- Depends_On_Private
-- Defined in all type entities. Set if the type is private or if it
-- depends on a private type.
-- associates generic parameters with the corresponding instances, in
-- those cases where the instance is an entity.
--- Handler_Records
--- Defined in subprogram and package entities. Points to a list of
--- identifiers referencing the handler record entities for the
--- corresponding unit.
-
-- Has_Aliased_Components [implementation base type only]
-- Defined in array type entities. Indicates that the component type
-- of the array is aliased. Should this also be set for records to
-- preelaborable initialization at freeze time (this has to be deferred
-- to the freeze point because of the rule about overriding Initialize).
--- Needs_Activation_Record
--- Defined on generated subprogram types. Indicates that a call through
--- a named or anonymous access to subprogram requires an activation
--- record when compiling with unnesting for C or LLVM.
-
-- Needs_Debug_Info
-- Defined in all entities. Set if the entity requires normal debugging
-- information to be generated. This is true of all entities that have
-- Optimize_Alignment (Off) mode applies to the type/object, then neither
-- of the flags Optimize_Alignment_Space/Optimize_Alignment_Time is set.
--- Original_Access_Type
--- Defined in E_Access_Subprogram_Type entities. Set only if the access
--- type was generated by the expander as part of processing an access-
--- to-protected-subprogram type. Points to the access-to-protected-
--- subprogram type.
-
-- Original_Array_Type
-- Defined in modular types and array types and subtypes. Set only if
-- the Is_Packed_Array_Impl_Type flag is set, indicating that the type
-- refine the state, in other words, all the hidden states that appear in
-- the constituent_list of aspect/pragma Refined_State.
--- Register_Exception_Call
--- Defined in exception entities. When an exception is declared,
--- a call is expanded to Register_Exception. This field points to
--- the expanded N_Procedure_Call_Statement node for this call. It
--- is used for Import/Export_Exception processing to modify the
--- register call to make appropriate entries in the special tables
--- used for handling these pragmas at run time.
-
-- Related_Array_Object
-- Defined in array types and subtypes. Used only for the base type
-- and subtype created for an anonymous array object. Set to point
-- Equivalent_Type (remote types only)
-- Directly_Designated_Type
-- Needs_No_Actuals
- -- Original_Access_Type
-- Can_Use_Internal_Rep
- -- Needs_Activation_Record
-- Associated_Storage_Pool $$$
-- Interface_Name $$$
-- (plus type attributes)
-- Directly_Designated_Type
-- Storage_Size_Variable is this needed ???
-- Can_Use_Internal_Rep
- -- Needs_Activation_Record
-- (plus type attributes)
-- E_Anonymous_Access_Type
-- Esize
-- Alignment
-- Renamed_Entity
- -- Register_Exception_Call
-- Interface_Name
-- Activation_Record_Component
-- Discard_Names
-- E_Function
-- E_Generic_Function
-- Mechanism (Mechanism_Type)
- -- Handler_Records (non-generic case only)
-- Protected_Body_Subprogram
-- Next_Inlined_Subprogram
-- Elaboration_Entity (not implicit /=)
-- Renamed_Object
-- Spec_Entity
-- Default_Value
- -- Default_Expr_Function
-- Protected_Formal
-- Extra_Constrained
-- Minimum_Accessibility
-- E_Package
-- E_Generic_Package
- -- Dependent_Instances (for an instance)
- -- Handler_Records (non-generic case only)
-- Generic_Homonym (generic case only)
-- Associated_Formal_Package
-- Elaboration_Entity
-- Scope_Depth (synth)
-- E_Package_Body
- -- Handler_Records (non-generic case only)
-- Related_Instance (non-generic case only)
-- First_Entity
-- Spec_Entity
-- E_Procedure
-- E_Generic_Procedure
-- Associated_Node_For_Itype $$$ E_Procedure
- -- Handler_Records (non-generic case only)
-- Protected_Body_Subprogram
-- Next_Inlined_Subprogram
-- Elaboration_Entity
-- Entry_Formal $$$
-- Esize $$$
-- First_Entity $$$
- -- Handler_Records $$$
-- Interface_Name $$$
-- Last_Entity $$$
-- Renamed_Entity $$$
Prefix => New_Occurrence_Of (Id, Loc),
Attribute_Name => Name_Unrestricted_Access)))));
- Set_Register_Exception_Call (Id, First (L));
-
if not Is_Library_Level_Entity (Id) then
Flag_Id :=
Make_Defining_Identifier (Loc,
Insert_Before_And_Analyze (N, Decl1);
- -- Associate the access to subprogram with its original access to
- -- protected subprogram type. Needed by the backend to know that this
- -- type corresponds with an access to protected subprogram type.
-
- Set_Original_Access_Type (D_T2, T);
-
-- Create Equivalent_Type, a record with two components for an access to
-- object and an access to subprogram.
Build_Accept_Body (Accept_Statement (Alt)));
Reset_Scopes_To (Proc_Body, PB_Ent);
-
- -- During the analysis of the body of the accept statement, any
- -- zero cost exception handler records were collected in the
- -- Accept_Handler_Records field of the N_Accept_Alternative node.
- -- This is where we move them to where they belong, namely the
- -- newly created procedure.
-
- Set_Handler_Records (PB_Ent, Accept_Handler_Records (Alt));
Append (Proc_Body, Body_List);
else
Abort_Present,
Abortable_Part,
Abstract_Present,
- Accept_Handler_Records,
Accept_Statement,
Access_Definition,
Access_To_Subprogram_Definition,
Debug_Renaming_Link,
Default_Aspect_Component_Value,
Default_Aspect_Value,
- Default_Expr_Function,
Default_Expressions_Processed,
Default_Value,
Delay_Cleanups,
Delta_Value,
- Dependent_Instances,
Depends_On_Private,
Derived_Type_Link,
Digits_Value,
Full_View,
Generic_Homonym,
Generic_Renamings,
- Handler_Records,
Has_Aliased_Components,
Has_Alignment_Clause,
Has_All_Calls_Remote,
Modulus,
Must_Be_On_Byte_Boundary,
Must_Have_Preelab_Init,
- Needs_Activation_Record,
Needs_Debug_Info,
Needs_No_Actuals,
Never_Set_In_Source,
OK_To_Rename,
Optimize_Alignment_Space,
Optimize_Alignment_Time,
- Original_Access_Type,
Original_Array_Type,
Original_Protected_Subprogram,
Original_Record_Component,
Referenced_As_LHS,
Referenced_As_Out_Parameter,
Refinement_Constituents,
- Register_Exception_Call,
Related_Array_Object,
Related_Expression,
Related_Instance,
Sm (Low_Bound_Tested, Flag),
Sm (Materialize_Entity, Flag),
Sm (May_Inherit_Delayed_Rep_Aspects, Flag),
- Sm (Needs_Activation_Record, Flag),
Sm (Needs_Debug_Info, Flag),
Sm (Never_Set_In_Source, Flag),
Sm (Overlays_Constant, Flag),
Sm (Extra_Formal, Node_Id),
Sm (Generic_Homonym, Node_Id),
Sm (Generic_Renamings, Elist_Id),
- Sm (Handler_Records, List_Id),
Sm (Has_Static_Discriminants, Flag),
Sm (Inner_Instances, Elist_Id),
Sm (Interface_Name, Node_Id),
(Sm (Activation_Record_Component, Node_Id),
Sm (Actual_Subtype, Node_Id),
Sm (Alignment, Unat),
- Sm (Default_Expr_Function, Node_Id),
Sm (Default_Value, Node_Id),
Sm (Entry_Component, Node_Id),
Sm (Extra_Accessibility, Node_Id),
Cc (E_Access_Subprogram_Type, Access_Subprogram_Kind,
-- An access-to-subprogram type, created by an access-to-subprogram
-- declaration.
- (Sm (Equivalent_Type, Node_Id),
- Sm (Original_Access_Type, Node_Id)));
+ (Sm (Equivalent_Type, Node_Id)));
Ab (Access_Protected_Kind, Access_Subprogram_Kind,
(Sm (Equivalent_Type, Node_Id)));
Sm (DTC_Entity, Node_Id),
Sm (Extra_Accessibility_Of_Result, Node_Id),
Sm (Generic_Renamings, Elist_Id),
- Sm (Handler_Records, List_Id),
Sm (Has_Missing_Return, Flag),
Sm (Inner_Instances, Elist_Id),
Sm (Is_Called, Flag),
Sm (DTC_Entity, Node_Id),
Sm (Entry_Parameters_Type, Node_Id),
Sm (Generic_Renamings, Elist_Id),
- Sm (Handler_Records, List_Id),
Sm (Inner_Instances, Elist_Id),
Sm (Is_Asynchronous, Flag),
Sm (Is_Called, Flag),
(Sm (Alignment, Unat),
Sm (Interface_Name, Node_Id),
Sm (Is_Raised, Flag),
- Sm (Register_Exception_Call, Node_Id),
Sm (Renamed_Or_Alias, Node_Id)));
Ab (Generic_Unit_Kind, Entity_Kind,
Sm (Body_Needed_For_SAL, Flag),
Sm (Contract, Node_Id),
Sm (Current_Use_Clause, Node_Id),
- Sm (Dependent_Instances, Elist_Id,
- Pre => "Is_Generic_Instance (N)"),
Sm (Elaborate_Body_Desirable, Flag),
Sm (Elaboration_Entity, Node_Id),
Sm (Elaboration_Entity_Required, Flag),
Sm (First_Entity, Node_Id),
Sm (First_Private_Entity, Node_Id),
Sm (Generic_Renamings, Elist_Id),
- Sm (Handler_Records, List_Id),
Sm (Has_RACW, Flag),
Sm (Hidden_In_Formal_Instance, Elist_Id),
Sm (Ignore_SPARK_Mode_Pragmas, Flag),
(Sm (Contract, Node_Id),
Sm (Finalizer, Node_Id),
Sm (First_Entity, Node_Id),
- Sm (Handler_Records, List_Id),
Sm (Ignore_SPARK_Mode_Pragmas, Flag),
Sm (Last_Entity, Node_Id),
Sm (Related_Instance, Node_Id),
(Sy (Accept_Statement, Node_Id),
Sy (Condition, Node_Id, Default_Empty),
Sy (Statements, List_Id, Default_Empty_List),
- Sy (Pragmas_Before, List_Id, Default_No_List),
- Sm (Accept_Handler_Records, List_Id)));
+ Sy (Pragmas_Before, List_Id, Default_No_List)));
Cc (N_Delay_Alternative, Node_Kind,
(Sy (Delay_Statement, Node_Id),
Make_Defining_Identifier (Sloc (Act_Decl_Id), Chars (Act_Decl_Id));
Preserve_Comes_From_Source (Act_Body_Id, Act_Decl_Id);
- -- Some attributes of spec entity are not inherited by body entity
-
- Set_Handler_Records (Act_Body_Id, No_List);
-
if Nkind (Defining_Unit_Name (Act_Spec)) =
N_Defining_Program_Unit_Name
then
Reinit_Size_Align (T_Name);
Set_Directly_Designated_Type (T_Name, Desig_Type);
- -- If the access_to_subprogram is not declared at the library level,
- -- it can only point to subprograms that are at the same or deeper
- -- accessibility level. The corresponding subprogram type might
- -- require an activation record when compiling for C.
-
- Set_Needs_Activation_Record (Desig_Type,
- not Is_Library_Level_Entity (T_Name));
-
Generate_Reference_To_Formals (T_Name);
-- Ada 2005 (AI-231): Propagate the null-excluding attribute
-- section describes the usage of the semantic fields, which are used to
-- contain additional information determined during semantic analysis.
- -- Accept_Handler_Records
- -- This field is present only in an N_Accept_Alternative node. It is used
- -- to temporarily hold the exception handler records from an accept
- -- statement in a selective accept. These exception handlers will
- -- eventually be placed in the Handler_Records list of the procedure
- -- built for this accept (see Expand_N_Selective_Accept procedure in
- -- Exp_Ch9 for further details).
-
-- Access_Types_To_Process
-- Present in N_Freeze_Entity nodes for Incomplete or private types.
-- Contains the list of access types which may require specific treatment
-- Condition from the guard (set to Empty if no guard present)
-- Statements (set to Empty_List if no statements)
-- Pragmas_Before pragmas before alt (set to No_List if none)
- -- Accept_Handler_Records
------------------------------
-- 9.7.1 Delay Alternative --