diff options
author | Bob Duff <duff@adacore.com> | 2023-01-13 14:48:46 -0500 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2023-05-15 11:36:43 +0200 |
commit | d41df0366e6dfbdc3a5a50577462a9b6689ebbfb (patch) | |
tree | b5926ac57eda5319d83d36786d3ffc79fe55bf52 | |
parent | 0ec72fa3db193354264d8c092da21f29fd473d88 (diff) | |
download | gcc-d41df0366e6dfbdc3a5a50577462a9b6689ebbfb.zip gcc-d41df0366e6dfbdc3a5a50577462a9b6689ebbfb.tar.gz gcc-d41df0366e6dfbdc3a5a50577462a9b6689ebbfb.tar.bz2 |
ada: Use Inline aspect instead of pragma in Einfo.Utils
This package was using the Ada 83 renaming idiom for inlining
Next_Component and other Next_... procedures without inlining the
same-named functions. Using the Inline aspect avoids that sort
of horsing around.
We change all the other pragmas Inline in this package to aspects
as well, which is a more-minor improvement. Fix too-long lines
without wrapping lines.
gcc/ada/
* einfo-utils.ads, einfo-utils.adb: Get rid of the Proc_Next_...
procedures. Use Inline aspect instead of pragma Inline.
Is_Discrete_Or_Fixed_Point_Type did not have pragma Inline, but
now has the aspect; this was probably an oversight
(which illustrates why aspects are better).
-rw-r--r-- | gcc/ada/einfo-utils.adb | 43 | ||||
-rw-r--r-- | gcc/ada/einfo-utils.ads | 432 |
2 files changed, 176 insertions, 299 deletions
diff --git a/gcc/ada/einfo-utils.adb b/gcc/ada/einfo-utils.adb index a8220e2..febc80a 100644 --- a/gcc/ada/einfo-utils.adb +++ b/gcc/ada/einfo-utils.adb @@ -1505,11 +1505,10 @@ package body Einfo.Utils is Kind : constant Node_Kind := Nkind (N); begin - -- Identifiers, operator symbols, expanded names are entity names + -- Identifiers, operator symbols, expanded names are entity names. + -- (But not N_Character_Literal.) - return Kind = N_Identifier - or else Kind = N_Operator_Symbol - or else Kind = N_Expanded_Name + return Kind in N_Identifier | N_Operator_Symbol | N_Expanded_Name -- Attribute references are entity names if they refer to an entity. -- Note that we don't do this by testing for the presence of the @@ -3212,49 +3211,49 @@ package body Einfo.Utils is -- Iterator Procedures -- ------------------------- - procedure Proc_Next_Component (N : in out Node_Id) is + procedure Next_Component (N : in out Node_Id) is begin N := Next_Component (N); - end Proc_Next_Component; + end Next_Component; - procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is + procedure Next_Component_Or_Discriminant (N : in out Node_Id) is begin N := Next_Component_Or_Discriminant (N); - end Proc_Next_Component_Or_Discriminant; + end Next_Component_Or_Discriminant; - procedure Proc_Next_Discriminant (N : in out Node_Id) is + procedure Next_Discriminant (N : in out Node_Id) is begin N := Next_Discriminant (N); - end Proc_Next_Discriminant; + end Next_Discriminant; - procedure Proc_Next_Formal (N : in out Node_Id) is + procedure Next_Formal (N : in out Node_Id) is begin N := Next_Formal (N); - end Proc_Next_Formal; + end Next_Formal; - procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is + procedure Next_Formal_With_Extras (N : in out Node_Id) is begin N := Next_Formal_With_Extras (N); - end Proc_Next_Formal_With_Extras; + end Next_Formal_With_Extras; - procedure Proc_Next_Index (N : in out Node_Id) is + procedure Next_Index (N : in out Node_Id) is begin N := Next_Index (N); - end Proc_Next_Index; + end Next_Index; - procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is + procedure Next_Inlined_Subprogram (N : in out Node_Id) is begin N := Next_Inlined_Subprogram (N); - end Proc_Next_Inlined_Subprogram; + end Next_Inlined_Subprogram; - procedure Proc_Next_Literal (N : in out Node_Id) is + procedure Next_Literal (N : in out Node_Id) is begin N := Next_Literal (N); - end Proc_Next_Literal; + end Next_Literal; - procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is + procedure Next_Stored_Discriminant (N : in out Node_Id) is begin N := Next_Stored_Discriminant (N); - end Proc_Next_Stored_Discriminant; + end Next_Stored_Discriminant; end Einfo.Utils; diff --git a/gcc/ada/einfo-utils.ads b/gcc/ada/einfo-utils.ads index 896d8f0..0286654 100644 --- a/gcc/ada/einfo-utils.ads +++ b/gcc/ada/einfo-utils.ads @@ -43,32 +43,24 @@ package Einfo.Utils is -- expressions, but those use different mechanisms; the fields here are not -- used. - function Alias (N : Entity_Id) return Entity_Id; - procedure Set_Alias (N : Entity_Id; Val : Entity_Id); - function Renamed_Entity (N : Entity_Id) return Entity_Id; - procedure Set_Renamed_Entity (N : Entity_Id; Val : Entity_Id); - function Renamed_Object (N : Entity_Id) return Node_Id; - procedure Set_Renamed_Object (N : Entity_Id; Val : Node_Id); - - function Renamed_Entity_Or_Object (N : Entity_Id) return Node_Id; + function Alias (N : Entity_Id) return Entity_Id with Inline; + procedure Set_Alias (N : Entity_Id; Val : Entity_Id) with Inline; + function Renamed_Entity (N : Entity_Id) return Entity_Id with Inline; + procedure Set_Renamed_Entity (N : Entity_Id; Val : Entity_Id) with Inline; + function Renamed_Object (N : Entity_Id) return Node_Id with Inline; + procedure Set_Renamed_Object (N : Entity_Id; Val : Node_Id) with Inline; + + function Renamed_Entity_Or_Object (N : Entity_Id) return Node_Id + with Inline; -- This getter is used when we don't know statically whether we want to -- call Renamed_Entity or Renamed_Object. procedure Set_Renamed_Object_Of_Possibly_Void - (N : Entity_Id; Val : Node_Id); + (N : Entity_Id; Val : Node_Id) with Inline; -- Set_Renamed_Object doesn't allow Void; this is used in the rare cases -- where we set the field of an entity that might be Void. It might be a -- good idea to get rid of calls to this. - pragma Inline (Alias); - pragma Inline (Set_Alias); - pragma Inline (Renamed_Entity); - pragma Inline (Set_Renamed_Entity); - pragma Inline (Renamed_Object); - pragma Inline (Set_Renamed_Object); - pragma Inline (Renamed_Entity_Or_Object); - pragma Inline (Set_Renamed_Object_Of_Possibly_Void); - ------------------- -- Type Synonyms -- ------------------- @@ -100,100 +92,53 @@ package Einfo.Utils is -- Is_Generic_Type where the Ekind does not provide the needed -- information). - function Is_Access_Object_Type (Id : E) return B; - function Is_Access_Type (Id : E) return B; - function Is_Access_Protected_Subprogram_Type (Id : E) return B; - function Is_Access_Subprogram_Type (Id : E) return B; - function Is_Aggregate_Type (Id : E) return B; - function Is_Anonymous_Access_Type (Id : E) return B; - function Is_Array_Type (Id : E) return B; - function Is_Assignable (Id : E) return B; - function Is_Class_Wide_Type (Id : E) return B; - function Is_Composite_Type (Id : E) return B; - function Is_Concurrent_Body (Id : E) return B; - function Is_Concurrent_Type (Id : E) return B; - function Is_Decimal_Fixed_Point_Type (Id : E) return B; - function Is_Digits_Type (Id : E) return B; - function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B; - function Is_Discrete_Type (Id : E) return B; - function Is_Elementary_Type (Id : E) return B; - function Is_Entry (Id : E) return B; - function Is_Enumeration_Type (Id : E) return B; - function Is_Fixed_Point_Type (Id : E) return B; - function Is_Floating_Point_Type (Id : E) return B; - function Is_Formal (Id : E) return B; - function Is_Formal_Object (Id : E) return B; - function Is_Generic_Subprogram (Id : E) return B; - function Is_Generic_Unit (Id : E) return B; - function Is_Ghost_Entity (Id : E) return B; - function Is_Incomplete_Or_Private_Type (Id : E) return B; - function Is_Incomplete_Type (Id : E) return B; - function Is_Integer_Type (Id : E) return B; - function Is_Modular_Integer_Type (Id : E) return B; - function Is_Named_Access_Type (Id : E) return B; - function Is_Named_Number (Id : E) return B; - function Is_Numeric_Type (Id : E) return B; - function Is_Object (Id : E) return B; - function Is_Ordinary_Fixed_Point_Type (Id : E) return B; - function Is_Overloadable (Id : E) return B; - function Is_Private_Type (Id : E) return B; - function Is_Protected_Type (Id : E) return B; - function Is_Real_Type (Id : E) return B; - function Is_Record_Type (Id : E) return B; - function Is_Scalar_Type (Id : E) return B; - function Is_Signed_Integer_Type (Id : E) return B; - function Is_Subprogram (Id : E) return B; - function Is_Subprogram_Or_Entry (Id : E) return B; - function Is_Subprogram_Or_Generic_Subprogram (Id : E) return B; - function Is_Task_Type (Id : E) return B; - function Is_Type (Id : E) return B; - - pragma Inline (Is_Access_Object_Type); - pragma Inline (Is_Access_Type); - pragma Inline (Is_Access_Protected_Subprogram_Type); - pragma Inline (Is_Access_Subprogram_Type); - pragma Inline (Is_Aggregate_Type); - pragma Inline (Is_Anonymous_Access_Type); - pragma Inline (Is_Array_Type); - pragma Inline (Is_Assignable); - pragma Inline (Is_Class_Wide_Type); - pragma Inline (Is_Composite_Type); - pragma Inline (Is_Concurrent_Body); - pragma Inline (Is_Concurrent_Type); - pragma Inline (Is_Decimal_Fixed_Point_Type); - pragma Inline (Is_Digits_Type); - pragma Inline (Is_Discrete_Type); - pragma Inline (Is_Elementary_Type); - pragma Inline (Is_Entry); - pragma Inline (Is_Enumeration_Type); - pragma Inline (Is_Fixed_Point_Type); - pragma Inline (Is_Floating_Point_Type); - pragma Inline (Is_Formal); - pragma Inline (Is_Formal_Object); - pragma Inline (Is_Generic_Subprogram); - pragma Inline (Is_Generic_Unit); - pragma Inline (Is_Ghost_Entity); - pragma Inline (Is_Incomplete_Or_Private_Type); - pragma Inline (Is_Incomplete_Type); - pragma Inline (Is_Integer_Type); - pragma Inline (Is_Modular_Integer_Type); - pragma Inline (Is_Named_Access_Type); - pragma Inline (Is_Named_Number); - pragma Inline (Is_Numeric_Type); - pragma Inline (Is_Object); - pragma Inline (Is_Ordinary_Fixed_Point_Type); - pragma Inline (Is_Overloadable); - pragma Inline (Is_Private_Type); - pragma Inline (Is_Protected_Type); - pragma Inline (Is_Real_Type); - pragma Inline (Is_Record_Type); - pragma Inline (Is_Scalar_Type); - pragma Inline (Is_Signed_Integer_Type); - pragma Inline (Is_Subprogram); - pragma Inline (Is_Subprogram_Or_Entry); - pragma Inline (Is_Subprogram_Or_Generic_Subprogram); - pragma Inline (Is_Task_Type); - pragma Inline (Is_Type); + function Is_Access_Object_Type (Id : E) return B with Inline; + function Is_Access_Type (Id : E) return B with Inline; + function Is_Access_Protected_Subprogram_Type (Id : E) return B with Inline; + function Is_Access_Subprogram_Type (Id : E) return B with Inline; + function Is_Aggregate_Type (Id : E) return B with Inline; + function Is_Anonymous_Access_Type (Id : E) return B with Inline; + function Is_Array_Type (Id : E) return B with Inline; + function Is_Assignable (Id : E) return B with Inline; + function Is_Class_Wide_Type (Id : E) return B with Inline; + function Is_Composite_Type (Id : E) return B with Inline; + function Is_Concurrent_Body (Id : E) return B with Inline; + function Is_Concurrent_Type (Id : E) return B with Inline; + function Is_Decimal_Fixed_Point_Type (Id : E) return B with Inline; + function Is_Digits_Type (Id : E) return B with Inline; + function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B with Inline; + function Is_Discrete_Type (Id : E) return B with Inline; + function Is_Elementary_Type (Id : E) return B with Inline; + function Is_Entry (Id : E) return B with Inline; + function Is_Enumeration_Type (Id : E) return B with Inline; + function Is_Fixed_Point_Type (Id : E) return B with Inline; + function Is_Floating_Point_Type (Id : E) return B with Inline; + function Is_Formal (Id : E) return B with Inline; + function Is_Formal_Object (Id : E) return B with Inline; + function Is_Generic_Subprogram (Id : E) return B with Inline; + function Is_Generic_Unit (Id : E) return B with Inline; + function Is_Ghost_Entity (Id : E) return B with Inline; + function Is_Incomplete_Or_Private_Type (Id : E) return B with Inline; + function Is_Incomplete_Type (Id : E) return B with Inline; + function Is_Integer_Type (Id : E) return B with Inline; + function Is_Modular_Integer_Type (Id : E) return B with Inline; + function Is_Named_Access_Type (Id : E) return B with Inline; + function Is_Named_Number (Id : E) return B with Inline; + function Is_Numeric_Type (Id : E) return B with Inline; + function Is_Object (Id : E) return B with Inline; + function Is_Ordinary_Fixed_Point_Type (Id : E) return B with Inline; + function Is_Overloadable (Id : E) return B with Inline; + function Is_Private_Type (Id : E) return B with Inline; + function Is_Protected_Type (Id : E) return B with Inline; + function Is_Real_Type (Id : E) return B with Inline; + function Is_Record_Type (Id : E) return B with Inline; + function Is_Scalar_Type (Id : E) return B with Inline; + function Is_Signed_Integer_Type (Id : E) return B with Inline; + function Is_Subprogram (Id : E) return B with Inline; + function Is_Subprogram_Or_Entry (Id : E) return B with Inline; + function Is_Subprogram_Or_Generic_Subprogram (Id : E) return B with Inline; + function Is_Task_Type (Id : E) return B with Inline; + function Is_Type (Id : E) return B with Inline; ------------------------------------- -- Synthesized Attribute Functions -- @@ -202,17 +147,17 @@ package Einfo.Utils is -- The functions in this section synthesize attributes from the tree, -- so they do not correspond to defined fields in the entity itself. - function Address_Clause (Id : E) return Node_Id; - function Aft_Value (Id : E) return U; - function Alignment_Clause (Id : E) return Node_Id; - function Base_Type (Id : E) return E; - function Declaration_Node (Id : E) return Node_Id; - function Designated_Type (Id : E) return E; - function Entry_Index_Type (Id : E) return E; - function First_Component (Id : E) return Entity_Id; - function First_Component_Or_Discriminant (Id : E) return Entity_Id; - function First_Formal (Id : E) return Entity_Id; - function First_Formal_With_Extras (Id : E) return Entity_Id; + function Address_Clause (Id : E) return Node_Id with Inline; + function Aft_Value (Id : E) return U; + function Alignment_Clause (Id : E) return Node_Id with Inline; + function Base_Type (Id : E) return E with Inline; + function Declaration_Node (Id : E) return Node_Id; + function Designated_Type (Id : E) return E; + function Entry_Index_Type (Id : E) return E; + function First_Component (Id : E) return Entity_Id; + function First_Component_Or_Discriminant (Id : E) return Entity_Id; + function First_Formal (Id : E) return Entity_Id; + function First_Formal_With_Extras (Id : E) return Entity_Id; function Float_Rep (N : Entity_Id) return F with Inline, Pre => @@ -223,117 +168,89 @@ package Einfo.Utils is Ignore_N in E_Void_Id | Float_Kind_Id; - function Has_Attach_Handler (Id : E) return B; - function Has_DIC (Id : E) return B; - function Has_Entries (Id : E) return B; - function Has_Foreign_Convention (Id : E) return B; - function Has_Interrupt_Handler (Id : E) return B; - function Has_Invariants (Id : E) return B; - function Has_Limited_View (Id : E) return B; - function Has_Non_Limited_View (Id : E) return B; - function Has_Non_Null_Abstract_State (Id : E) return B; - function Has_Non_Null_Visible_Refinement (Id : E) return B; - function Has_Null_Abstract_State (Id : E) return B; - function Has_Null_Visible_Refinement (Id : E) return B; - function Implementation_Base_Type (Id : E) return E; - function Is_Base_Type (Id : E) return B; + function Has_Attach_Handler (Id : E) return B; + function Has_DIC (Id : E) return B; + function Has_Entries (Id : E) return B; + function Has_Foreign_Convention (Id : E) return B with Inline; + function Has_Interrupt_Handler (Id : E) return B; + function Has_Invariants (Id : E) return B; + function Has_Limited_View (Id : E) return B; + function Has_Non_Limited_View (Id : E) return B with Inline; + function Has_Non_Null_Abstract_State (Id : E) return B; + function Has_Non_Null_Visible_Refinement (Id : E) return B; + function Has_Null_Abstract_State (Id : E) return B; + function Has_Null_Visible_Refinement (Id : E) return B; + function Implementation_Base_Type (Id : E) return E; + function Is_Base_Type (Id : E) return B with Inline; -- Note that Is_Base_Type returns True for nontypes - function Is_Boolean_Type (Id : E) return B; - function Is_Constant_Object (Id : E) return B; - function Is_Controlled (Id : E) return B; - function Is_Discriminal (Id : E) return B; - function Is_Dynamic_Scope (Id : E) return B; - function Is_Elaboration_Target (Id : E) return B; - function Is_External_State (Id : E) return B; - function Is_Finalizer (Id : E) return B; - function Is_Full_Access (Id : E) return B; - function Is_Null_State (Id : E) return B; - function Is_Package_Or_Generic_Package (Id : E) return B; - function Is_Packed_Array (Id : E) return B; - function Is_Prival (Id : E) return B; - function Is_Protected_Component (Id : E) return B; - function Is_Protected_Interface (Id : E) return B; - function Is_Protected_Record_Type (Id : E) return B; - function Is_Relaxed_Initialization_State (Id : E) return B; - function Is_Standard_Character_Type (Id : E) return B; - function Is_Standard_String_Type (Id : E) return B; - function Is_String_Type (Id : E) return B; - function Is_Synchronized_Interface (Id : E) return B; - function Is_Synchronized_State (Id : E) return B; - function Is_Task_Interface (Id : E) return B; - function Is_Task_Record_Type (Id : E) return B; - function Is_Wrapper_Package (Id : E) return B; - function Last_Formal (Id : E) return Entity_Id; - function Machine_Emax_Value (Id : E) return U; - function Machine_Emin_Value (Id : E) return U; - function Machine_Mantissa_Value (Id : E) return U; - function Machine_Radix_Value (Id : E) return U; - function Model_Emin_Value (Id : E) return U; - function Model_Epsilon_Value (Id : E) return R; - function Model_Mantissa_Value (Id : E) return U; - function Model_Small_Value (Id : E) return R; - function Next_Component (Id : E) return Entity_Id; - function Next_Component_Or_Discriminant (Id : E) return Entity_Id; - function Next_Discriminant (Id : E) return Entity_Id; - function Next_Formal (Id : E) return Entity_Id; - function Next_Formal_With_Extras (Id : E) return Entity_Id; - function Next_Index (Id : N) return Node_Id; - function Next_Literal (Id : E) return Entity_Id; - function Next_Stored_Discriminant (Id : E) return Entity_Id; - function Number_Dimensions (Id : E) return Pos; - function Number_Entries (Id : E) return Nat; - function Number_Formals (Id : E) return Pos; - function Object_Size_Clause (Id : E) return Node_Id; - function Parameter_Mode (Id : E) return Formal_Kind; - function Partial_Refinement_Constituents (Id : E) return L; - function Primitive_Operations (Id : E) return L; - function Root_Type (Id : E) return E; - function Safe_Emax_Value (Id : E) return U; - function Safe_First_Value (Id : E) return R; - function Safe_Last_Value (Id : E) return R; - function Size_Clause (Id : E) return Node_Id; - function Stream_Size_Clause (Id : E) return N; - function Type_High_Bound (Id : E) return N; - function Type_Low_Bound (Id : E) return N; - function Underlying_Type (Id : E) return Entity_Id; - - function Scope_Depth (Id : E) return U; - function Scope_Depth_Set (Id : E) return B; - - function Scope_Depth_Default_0 (Id : E) return U; + function Is_Boolean_Type (Id : E) return B with Inline; + function Is_Constant_Object (Id : E) return B with Inline; + function Is_Controlled (Id : E) return B with Inline; + function Is_Discriminal (Id : E) return B with Inline; + function Is_Dynamic_Scope (Id : E) return B; + function Is_Elaboration_Target (Id : E) return B; + function Is_External_State (Id : E) return B; + function Is_Finalizer (Id : E) return B with Inline; + function Is_Full_Access (Id : E) return B with Inline; + function Is_Null_State (Id : E) return B; + function Is_Package_Or_Generic_Package (Id : E) return B with Inline; + function Is_Packed_Array (Id : E) return B with Inline; + function Is_Prival (Id : E) return B with Inline; + function Is_Protected_Component (Id : E) return B with Inline; + function Is_Protected_Interface (Id : E) return B; + function Is_Protected_Record_Type (Id : E) return B with Inline; + function Is_Relaxed_Initialization_State (Id : E) return B; + function Is_Standard_Character_Type (Id : E) return B; + function Is_Standard_String_Type (Id : E) return B; + function Is_String_Type (Id : E) return B with Inline; + function Is_Synchronized_Interface (Id : E) return B; + function Is_Synchronized_State (Id : E) return B; + function Is_Task_Interface (Id : E) return B; + function Is_Task_Record_Type (Id : E) return B with Inline; + function Is_Wrapper_Package (Id : E) return B with Inline; + function Last_Formal (Id : E) return Entity_Id; + function Machine_Emax_Value (Id : E) return U; + function Machine_Emin_Value (Id : E) return U; + function Machine_Mantissa_Value (Id : E) return U; + function Machine_Radix_Value (Id : E) return U; + function Model_Emin_Value (Id : E) return U; + function Model_Epsilon_Value (Id : E) return R; + function Model_Mantissa_Value (Id : E) return U; + function Model_Small_Value (Id : E) return R; + function Next_Component (Id : E) return Entity_Id; + function Next_Component_Or_Discriminant (Id : E) return Entity_Id; + function Next_Discriminant (Id : E) return Entity_Id; + function Next_Formal (Id : E) return Entity_Id; + function Next_Formal_With_Extras (Id : E) return Entity_Id; + function Next_Index (Id : N) return Node_Id; + function Next_Literal (Id : E) return Entity_Id; + function Next_Stored_Discriminant (Id : E) return Entity_Id; + function Number_Dimensions (Id : E) return Pos; + function Number_Entries (Id : E) return Nat; + function Number_Formals (Id : E) return Pos; + function Object_Size_Clause (Id : E) return Node_Id; + function Parameter_Mode (Id : E) return Formal_Kind; + function Partial_Refinement_Constituents (Id : E) return L; + function Primitive_Operations (Id : E) return L; + function Root_Type (Id : E) return E; + function Safe_Emax_Value (Id : E) return U; + function Safe_First_Value (Id : E) return R; + function Safe_Last_Value (Id : E) return R; + function Size_Clause (Id : E) return Node_Id with Inline; + function Stream_Size_Clause (Id : E) return N with Inline; + function Type_High_Bound (Id : E) return N with Inline; + function Type_Low_Bound (Id : E) return N with Inline; + function Underlying_Type (Id : E) return Entity_Id; + + function Scope_Depth (Id : E) return U with Inline; + function Scope_Depth_Set (Id : E) return B with Inline; + + function Scope_Depth_Default_0 (Id : E) return U; -- In rare cases, the Scope_Depth_Value (queried by Scope_Depth) is -- not correctly set before querying it; this may be used instead of -- Scope_Depth in such cases. It returns Uint_0 if the Scope_Depth_Value -- has not been set. See documentation in Einfo. - pragma Inline (Address_Clause); - pragma Inline (Alignment_Clause); - pragma Inline (Base_Type); - pragma Inline (Has_Foreign_Convention); - pragma Inline (Has_Non_Limited_View); - pragma Inline (Is_Base_Type); - pragma Inline (Is_Boolean_Type); - pragma Inline (Is_Constant_Object); - pragma Inline (Is_Controlled); - pragma Inline (Is_Discriminal); - pragma Inline (Is_Finalizer); - pragma Inline (Is_Full_Access); - pragma Inline (Is_Null_State); - pragma Inline (Is_Package_Or_Generic_Package); - pragma Inline (Is_Packed_Array); - pragma Inline (Is_Prival); - pragma Inline (Is_Protected_Component); - pragma Inline (Is_Protected_Record_Type); - pragma Inline (Is_String_Type); - pragma Inline (Is_Task_Record_Type); - pragma Inline (Is_Wrapper_Package); - pragma Inline (Scope_Depth); - pragma Inline (Scope_Depth_Set); - pragma Inline (Size_Clause); - pragma Inline (Stream_Size_Clause); - pragma Inline (Type_High_Bound); - pragma Inline (Type_Low_Bound); - ------------------------------------------ -- Type Representation Attribute Fields -- ------------------------------------------ @@ -455,52 +372,15 @@ package Einfo.Utils is -- We define the set of Proc_Next_xxx routines simply for the purposes -- of inlining them without necessarily inlining the function. - procedure Proc_Next_Component (N : in out Node_Id); - procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id); - procedure Proc_Next_Discriminant (N : in out Node_Id); - procedure Proc_Next_Formal (N : in out Node_Id); - procedure Proc_Next_Formal_With_Extras (N : in out Node_Id); - procedure Proc_Next_Index (N : in out Node_Id); - procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id); - procedure Proc_Next_Literal (N : in out Node_Id); - procedure Proc_Next_Stored_Discriminant (N : in out Node_Id); - - pragma Inline (Proc_Next_Component); - pragma Inline (Proc_Next_Component_Or_Discriminant); - pragma Inline (Proc_Next_Discriminant); - pragma Inline (Proc_Next_Formal); - pragma Inline (Proc_Next_Formal_With_Extras); - pragma Inline (Proc_Next_Index); - pragma Inline (Proc_Next_Inlined_Subprogram); - pragma Inline (Proc_Next_Literal); - pragma Inline (Proc_Next_Stored_Discriminant); - - procedure Next_Component (N : in out Node_Id) - renames Proc_Next_Component; - - procedure Next_Component_Or_Discriminant (N : in out Node_Id) - renames Proc_Next_Component_Or_Discriminant; - - procedure Next_Discriminant (N : in out Node_Id) - renames Proc_Next_Discriminant; - - procedure Next_Formal (N : in out Node_Id) - renames Proc_Next_Formal; - - procedure Next_Formal_With_Extras (N : in out Node_Id) - renames Proc_Next_Formal_With_Extras; - - procedure Next_Index (N : in out Node_Id) - renames Proc_Next_Index; - - procedure Next_Inlined_Subprogram (N : in out Node_Id) - renames Proc_Next_Inlined_Subprogram; - - procedure Next_Literal (N : in out Node_Id) - renames Proc_Next_Literal; - - procedure Next_Stored_Discriminant (N : in out Node_Id) - renames Proc_Next_Stored_Discriminant; + procedure Next_Component (N : in out Node_Id) with Inline; + procedure Next_Component_Or_Discriminant (N : in out Node_Id) with Inline; + procedure Next_Discriminant (N : in out Node_Id) with Inline; + procedure Next_Formal (N : in out Node_Id) with Inline; + procedure Next_Formal_With_Extras (N : in out Node_Id) with Inline; + procedure Next_Index (N : in out Node_Id) with Inline; + procedure Next_Inlined_Subprogram (N : in out Node_Id) with Inline; + procedure Next_Literal (N : in out Node_Id) with Inline; + procedure Next_Stored_Discriminant (N : in out Node_Id) with Inline; --------------------------- -- Testing Warning Flags -- @@ -622,7 +502,7 @@ package Einfo.Utils is -- is the name of a class_wide type whose root is incomplete, return the -- corresponding full declaration, else return T itself. - function Is_Entity_Name (N : Node_Id) return Boolean; + function Is_Entity_Name (N : Node_Id) return Boolean with Inline; -- Test if the node N is the name of an entity (i.e. is an identifier, -- expanded name, or an attribute reference that returns an entity). @@ -661,8 +541,6 @@ package Einfo.Utils is -- Also, if the Etype of E is set and is an anonymous access type with -- no convention set, this anonymous type inherits the convention of E. - pragma Inline (Is_Entity_Name); - ---------------------------------- -- Debugging Output Subprograms -- ---------------------------------- |