| 1 |
------------------------------------------------------------------------------ |
| 2 |
-- -- |
| 3 |
-- GNAT COMPILER COMPONENTS -- |
| 4 |
-- -- |
| 5 |
-- G E N _ I L . U T I L S -- |
| 6 |
-- -- |
| 7 |
-- S p e c -- |
| 8 |
-- -- |
| 9 |
-- Copyright (C) 2020-2025, Free Software Foundation, Inc. -- |
| 10 |
-- -- |
| 11 |
-- GNAT is free software; you can redistribute it and/or modify it under -- |
| 12 |
-- terms of the GNU General Public License as published by the Free Soft- -- |
| 13 |
-- ware Foundation; either version 3, or (at your option) any later ver- -- |
| 14 |
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- |
| 15 |
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- |
| 16 |
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- |
| 17 |
-- for more details. You should have received a copy of the GNU General -- |
| 18 |
-- Public License distributed with GNAT; see file COPYING3. If not, go to -- |
| 19 |
-- http://www.gnu.org/licenses for a complete copy of the license. -- |
| 20 |
-- -- |
| 21 |
-- GNAT was originally developed by the GNAT team at New York University. -- |
| 22 |
-- Extensive contributions were provided by Ada Core Technologies Inc. -- |
| 23 |
-- -- |
| 24 |
------------------------------------------------------------------------------ |
| 25 |
|
| 26 |
with Ada.Containers.Vectors; use Ada.Containers; |
| 27 |
|
| 28 |
with GNAT.Strings; use GNAT.Strings; |
| 29 |
|
| 30 |
with Gen_IL.Types; use Gen_IL.Types; |
| 31 |
with Gen_IL.Fields; use Gen_IL.Fields; |
| 32 |
|
| 33 |
package Gen_IL.Internals is |
| 34 |
|
| 35 |
function Image (T : Opt_Type_Enum) return String; |
| 36 |
|
| 37 |
function Image_Sans_N (T : Opt_Type_Enum) return String; |
| 38 |
-- Returns the image without the leading "N_" |
| 39 |
|
| 40 |
---------------- |
| 41 |
|
| 42 |
type Type_Set is array (Type_Enum) of Boolean; |
| 43 |
|
| 44 |
type Type_Index is new Positive; |
| 45 |
subtype Type_Count is Type_Index'Base range 0 .. Type_Index'Last; |
| 46 |
package Type_Vectors is new Vectors (Type_Index, Type_Enum); |
| 47 |
use Type_Vectors; |
| 48 |
subtype Type_Vector is Type_Vectors.Vector; |
| 49 |
|
| 50 |
type Type_Array is array (Type_Index range <>) of Type_Enum; |
| 51 |
|
| 52 |
---------------- |
| 53 |
|
| 54 |
procedure Put_Types_With_Bars (S : in out Sink; U : Type_Vector); |
| 55 |
procedure Put_Type_Ids_With_Bars (S : in out Sink; U : Type_Vector); |
| 56 |
-- Put the types with vertical bars in between, as in |
| 57 |
-- N_This | N_That | N_Other |
| 58 |
-- or |
| 59 |
-- N_This_Id | N_That_Id | N_Other_Id |
| 60 |
|
| 61 |
function Id_Image (T : Type_Enum) return String; |
| 62 |
-- Image of the type for use with _Id types |
| 63 |
|
| 64 |
function Get_Set_Id_Image (T : Type_Enum) return String; |
| 65 |
-- Image of the type for use with getters and setters |
| 66 |
|
| 67 |
---------------- |
| 68 |
|
| 69 |
type Fields_Present_Array is array (Field_Enum) of Type_Set; |
| 70 |
|
| 71 |
type Field_Set is array (Field_Enum) of Boolean; |
| 72 |
type Fields_Per_Node_Type is array (Node_Or_Entity_Type) of Field_Set; |
| 73 |
|
| 74 |
type Field_Index is new Positive; |
| 75 |
package Field_Vectors is new Vectors (Field_Index, Field_Enum); |
| 76 |
subtype Field_Vector is Field_Vectors.Vector; |
| 77 |
|
| 78 |
type Bit_Offset is new Root_Nat range 0 .. 32_000 - 1; |
| 79 |
-- Offset in bits. The number 32_000 is chosen because there are fewer than |
| 80 |
-- 1000 fields, but offsets are in size units (1 bit for flags, 32 bits for |
| 81 |
-- most others, also 2, 4, and 8). |
| 82 |
|
| 83 |
type Field_Offset is new Bit_Offset; |
| 84 |
|
| 85 |
type Type_Info (Is_Union : Boolean) is record |
| 86 |
Parent : Opt_Abstract_Type; |
| 87 |
-- Parent of this type (single inheritance). No_Type for a root |
| 88 |
-- type (Node_Kind or Entity_Kind). For union types, this is |
| 89 |
-- a root type. |
| 90 |
|
| 91 |
Children : Type_Vector; |
| 92 |
-- Inverse of Parent |
| 93 |
|
| 94 |
Concrete_Descendants : Type_Vector; |
| 95 |
|
| 96 |
case Is_Union is |
| 97 |
when True => |
| 98 |
null; |
| 99 |
|
| 100 |
when False => |
| 101 |
First, Last : Concrete_Type; |
| 102 |
-- This type includes concrete types in the range First..Last. For |
| 103 |
-- a concrete type, First=Last. For an abstract type, First..Last |
| 104 |
-- includes two or more types. |
| 105 |
|
| 106 |
Imm_Fields, |
| 107 |
-- Fields declared immediately within a given node type |
| 108 |
Fields : |
| 109 |
-- Includes inherited fields and Imm_Fields |
| 110 |
Field_Vector; |
| 111 |
|
| 112 |
Nmake_Assert : String_Access; -- only for concrete node types |
| 113 |
end case; |
| 114 |
end record; |
| 115 |
|
| 116 |
type Type_Info_Ptr is access all Type_Info; |
| 117 |
|
| 118 |
Type_Table : array (Node_Or_Entity_Type) of Type_Info_Ptr; |
| 119 |
-- Table mapping from enumeration literals representing types to |
| 120 |
-- information about the type. |
| 121 |
|
| 122 |
procedure Verify_Type_Table; |
| 123 |
-- Check Type_Table for consistency |
| 124 |
|
| 125 |
function Num_Concrete_Descendants |
| 126 |
(T : Node_Or_Entity_Type) return Natural; |
| 127 |
-- Number of concrete descendants of T, including (if T is concrete) |
| 128 |
-- itself. |
| 129 |
|
| 130 |
type Field_Default_Value is |
| 131 |
(No_Default, |
| 132 |
Default_Empty, -- Node_Id |
| 133 |
Default_No_List, Default_Empty_List, -- List_Id |
| 134 |
Default_False, Default_True, -- Flag |
| 135 |
Default_No_Elist, -- Elist_Id |
| 136 |
Default_No_Name, -- Name_Id |
| 137 |
Default_Uint_0); -- Uint |
| 138 |
-- Default value for a field in the Nmake functions. No_Default if the |
| 139 |
-- field parameter has no default value. Otherwise this indicates the |
| 140 |
-- default value used, which must match the type of the field. |
| 141 |
|
| 142 |
function Image (Default : Field_Default_Value) return String; |
| 143 |
-- This will be something like "Default_Empty". |
| 144 |
function Value_Image (Default : Field_Default_Value) return String; |
| 145 |
-- This will be something like "Empty". |
| 146 |
|
| 147 |
type Type_Only_Enum is |
| 148 |
(No_Type_Only, Base_Type_Only, Impl_Base_Type_Only, Root_Type_Only); |
| 149 |
-- These correspond to the "[base type only]", "[implementation base type |
| 150 |
-- only]", and "[root type only]" annotations documented in einfo.ads. |
| 151 |
-- The default is No_Type_Only, indicating the field is not one of |
| 152 |
-- these special "[... only]" ones. |
| 153 |
|
| 154 |
function Image (Type_Only : Type_Only_Enum) return String is |
| 155 |
(Capitalize (Type_Only'Img)); |
| 156 |
|
| 157 |
Unknown_Offset : constant := -1; |
| 158 |
-- Initial value of Offset, so we can tell whether it has been set |
| 159 |
|
| 160 |
type Field_Info is record |
| 161 |
Have_This_Field : Type_Vector; |
| 162 |
-- Types that have this field |
| 163 |
|
| 164 |
Field_Type : Type_Enum; |
| 165 |
-- Type of the field. Currently, we use Node_Id for all node-valued |
| 166 |
-- fields, but we could narrow down to children of that. Similar for |
| 167 |
-- Entity_Id. |
| 168 |
|
| 169 |
Default_Value : Field_Default_Value; |
| 170 |
Type_Only : Type_Only_Enum; |
| 171 |
Pre, Pre_Get, Pre_Set : String_Access; |
| 172 |
-- Above record the information in the calls to Create_...Field. |
| 173 |
-- See Gen_IL.Gen for details. |
| 174 |
|
| 175 |
Offset : Field_Offset'Base range Unknown_Offset .. Field_Offset'Last; |
| 176 |
-- Offset of the field from the start of the node, in units of the field |
| 177 |
-- size. So if a field is 4 bits in size, it starts at bit number |
| 178 |
-- Offset*4 from the start of the node. |
| 179 |
end record; |
| 180 |
|
| 181 |
type Field_Info_Ptr is access all Field_Info; |
| 182 |
|
| 183 |
Field_Table : array (Field_Enum) of Field_Info_Ptr; |
| 184 |
-- Table mapping from enumeration literals representing fields to |
| 185 |
-- information about the field. |
| 186 |
|
| 187 |
-- Getters for fields of types Elist_Id and Uint need special treatment of |
| 188 |
-- defaults. In particular, if the field has its initial 0 value, getters |
| 189 |
-- need to return the appropriate default value. Note that these defaults |
| 190 |
-- have nothing to do with the defaults mentioned above for Nmake |
| 191 |
-- functions. |
| 192 |
|
| 193 |
function Field_Has_Special_Default |
| 194 |
(Field_Type : Type_Enum) return Boolean is |
| 195 |
(Field_Type in Elist_Id | Uint); |
| 196 |
-- These are the field types that have a default value that is not |
| 197 |
-- represented as zero. |
| 198 |
|
| 199 |
function Special_Default |
| 200 |
(Field_Type : Type_Enum) return String is |
| 201 |
(case Field_Type is |
| 202 |
when Elist_Id => "No_Elist", |
| 203 |
when Uint => "No_Uint", |
| 204 |
when others => "can't happen"); |
| 205 |
|
| 206 |
---------------- |
| 207 |
|
| 208 |
subtype Node_Field is |
| 209 |
Field_Enum range |
| 210 |
Field_Enum'First .. |
| 211 |
Field_Enum'Pred (Between_Node_And_Entity_Fields); |
| 212 |
|
| 213 |
subtype Entity_Field is |
| 214 |
Field_Enum range |
| 215 |
Field_Enum'Succ (Between_Node_And_Entity_Fields) .. |
| 216 |
Field_Enum'Last; |
| 217 |
|
| 218 |
function Image (F : Opt_Field_Enum) return String; |
| 219 |
|
| 220 |
function F_Image (F : Opt_Field_Enum) return String is |
| 221 |
("F_" & Image (F)); |
| 222 |
-- Prepends "F_" to Image (F). This is used for the enumeration literals in |
| 223 |
-- the generated Sinfo.Nodes.Node_Field and Einfo.Entities.Entity_Field |
| 224 |
-- types. If we used Image (F), these enumeration literals would overload |
| 225 |
-- the getter functions, which confuses gdb. |
| 226 |
|
| 227 |
procedure Nil (T : Node_Or_Entity_Type); |
| 228 |
-- Null procedure |
| 229 |
|
| 230 |
procedure Iterate_Types |
| 231 |
(Root : Node_Or_Entity_Type; |
| 232 |
Pre, Post : not null access procedure (T : Node_Or_Entity_Type) := |
| 233 |
Nil'Access); |
| 234 |
-- Iterate top-down on the type hierarchy. Call Pre and Post before and |
| 235 |
-- after walking child types. Note that this ignores union types, because |
| 236 |
-- they are nonhierarchical. The order in which concrete types are visited |
| 237 |
-- matches the order of the generated enumeration types Node_Kind and |
| 238 |
-- Entity_Kind, which is not the same as the order of the Type_Enum |
| 239 |
-- type in Gen_IL.Types. |
| 240 |
|
| 241 |
function Is_Descendant (Ancestor, Descendant : Node_Or_Entity_Type) |
| 242 |
return Boolean; |
| 243 |
-- True if Descendant is a descendant of Ancestor; that is, |
| 244 |
-- True if Ancestor is an ancestor of Descendant. True for |
| 245 |
-- a type itself. |
| 246 |
|
| 247 |
procedure Put_Type_Hierarchy (S : in out Sink; Root : Root_Type); |
| 248 |
|
| 249 |
---------------- |
| 250 |
|
| 251 |
type Field_Desc is record |
| 252 |
F : Field_Enum; |
| 253 |
Is_Syntactic : Boolean; |
| 254 |
-- The same field can be syntactic in some nodes but semantic in others |
| 255 |
end record; |
| 256 |
|
| 257 |
type Field_Sequence_Index is new Positive; |
| 258 |
type Field_Sequence is array (Field_Sequence_Index range <>) of Field_Desc; |
| 259 |
No_Fields : constant Field_Sequence := (1 .. 0 => <>); |
| 260 |
|
| 261 |
type Field_Array is array (Bit_Offset range <>) of Opt_Field_Enum; |
| 262 |
type Field_Array_Ptr is access all Field_Array; |
| 263 |
|
| 264 |
type Concrete_Type_Layout_Array is array (Concrete_Type) of Field_Array_Ptr; |
| 265 |
-- Mapping from types to mappings from offsets to fields. Each bit offset |
| 266 |
-- is mapped to the corresponding field for the given type. An n-bit field |
| 267 |
-- will have n bit offsets mapped to the same field. |
| 268 |
|
| 269 |
type Offset_To_Fields_Mapping is |
| 270 |
array (Bit_Offset range <>) of Field_Array_Ptr; |
| 271 |
-- Mapping from bit offsets to fields using that offset |
| 272 |
|
| 273 |
function First_Abstract (Root : Root_Type) return Abstract_Type; |
| 274 |
function Last_Abstract (Root : Root_Type) return Abstract_Type; |
| 275 |
-- First and Last abstract types descended from the Root. So for example if |
| 276 |
-- Root = Node_Kind, then First_Abstract = Abstract_Node'First. |
| 277 |
|
| 278 |
function First_Concrete (Root : Root_Type) return Concrete_Type; |
| 279 |
function Last_Concrete (Root : Root_Type) return Concrete_Type; |
| 280 |
-- First and Last concrete types descended from the Root |
| 281 |
|
| 282 |
function First_Field (Root : Root_Type) return Field_Enum; |
| 283 |
function Last_Field (Root : Root_Type) return Field_Enum; |
| 284 |
-- First and Last node or entity fields |
| 285 |
|
| 286 |
function Node_Or_Entity (Root : Root_Type) return String; |
| 287 |
-- Return "Node" or "Entity" depending on whether Root = Node_Kind or |
| 288 |
-- Entity_Kind. |
| 289 |
|
| 290 |
pragma Style_Checks (Off); |
| 291 |
-- We don't want warnings about wrong casing in the Type_Frequency table; |
| 292 |
-- this table is not intended to be particularly readable. |
| 293 |
|
| 294 |
-- The Type_Frequency table shows the frequency of nodes and entity kinds |
| 295 |
-- printed by -gnatd.A for a large example. It is used in the field offset |
| 296 |
-- computations for efficiency. Note that N_Defining_Identifier, |
| 297 |
-- N_Defining_Operator_Symbol, and N_Defining_Character_Literal are set to |
| 298 |
-- zero, because the Ekind is what matters for those. |
| 299 |
|
| 300 |
Type_Frequency : constant array (Concrete_Type) of Type_Count := |
| 301 |
(N_Identifier => 3496964, -- (0.354) 7 slots |
| 302 |
N_Defining_Identifier => 0, -- 1468484, -- (0.149) 8 slots |
| 303 |
N_Integer_Literal => 455415, -- (0.046) 6 slots |
| 304 |
E_In_Parameter => 391008, -- (0.040) 42 slots |
| 305 |
N_Attribute_Reference => 330825, -- (0.033) 9 slots |
| 306 |
N_Expanded_Name => 329509, -- (0.033) 8 slots |
| 307 |
N_Selected_Component => 328862, -- (0.033) 8 slots |
| 308 |
N_Parameter_Specification => 321313, -- (0.033) 7 slots |
| 309 |
E_Void => 173019, -- (0.018) 59 slots |
| 310 |
N_Explicit_Dereference => 155113, -- (0.016) 8 slots |
| 311 |
N_Procedure_Call_Statement => 125403, -- (0.013) 8 slots |
| 312 |
N_Object_Declaration => 115610, -- (0.012) 8 slots |
| 313 |
E_Component => 108208, -- (0.011) 49 slots |
| 314 |
N_Procedure_Specification => 106277, -- (0.011) 7 slots |
| 315 |
E_Procedure => 104063, -- (0.011) 62 slots |
| 316 |
N_Unchecked_Type_Conversion => 94477, -- (0.010) 7 slots |
| 317 |
N_Range => 91413, -- (0.009) 6 slots |
| 318 |
E_Function => 90035, -- (0.009) 62 slots |
| 319 |
N_Handled_Sequence_Of_Statements => 87930, -- (0.009) 8 slots |
| 320 |
N_Subprogram_Declaration => 85248, -- (0.009) 7 slots |
| 321 |
N_Parameter_Association => 81464, -- (0.008) 8 slots |
| 322 |
N_Indexed_Component => 80049, -- (0.008) 7 slots |
| 323 |
N_Freeze_Entity => 79904, -- (0.008) 8 slots |
| 324 |
N_Call_Marker => 79521, -- (0.008) 4 slots |
| 325 |
N_Assignment_Statement => 76554, -- (0.008) 8 slots |
| 326 |
N_Function_Specification => 76052, -- (0.008) 7 slots |
| 327 |
N_Function_Call => 75028, -- (0.008) 9 slots |
| 328 |
N_Op_Eq => 74874, -- (0.008) 8 slots |
| 329 |
E_Constant => 66667, -- (0.007) 47 slots |
| 330 |
N_If_Statement => 60066, -- (0.006) 8 slots |
| 331 |
N_Component_Association => 54642, -- (0.006) 7 slots |
| 332 |
N_Subprogram_Body => 53805, -- (0.005) 10 slots |
| 333 |
N_Type_Conversion => 53383, -- (0.005) 7 slots |
| 334 |
E_In_Out_Parameter => 52936, -- (0.005) 38 slots |
| 335 |
N_Simple_Return_Statement => 52436, -- (0.005) 7 slots |
| 336 |
N_Subtype_Indication => 49535, -- (0.005) 6 slots |
| 337 |
N_Raise_Constraint_Error => 49069, -- (0.005) 6 slots |
| 338 |
N_Null => 46850, -- (0.005) 5 slots |
| 339 |
N_Itype_Reference => 45422, -- (0.005) 4 slots |
| 340 |
E_Anonymous_Access_Type => 45149, -- (0.005) 44 slots |
| 341 |
N_And_Then => 44721, -- (0.005) 8 slots |
| 342 |
N_Block_Statement => 44328, -- (0.004) 10 slots |
| 343 |
N_Subtype_Declaration => 43149, -- (0.004) 6 slots |
| 344 |
N_Op_Not => 40531, -- (0.004) 7 slots |
| 345 |
E_Array_Subtype => 40051, -- (0.004) 50 slots |
| 346 |
N_Expression_With_Actions => 36726, -- (0.004) 7 slots |
| 347 |
E_Access_Subprogram_Type => 36700, -- (0.004) 45 slots |
| 348 |
E_Signed_Integer_Subtype => 36659, -- (0.004) 43 slots |
| 349 |
N_String_Literal => 34815, -- (0.004) 7 slots |
| 350 |
N_Aggregate => 33899, -- (0.003) 8 slots |
| 351 |
N_Index_Or_Discriminant_Constraint => 33546, -- (0.003) 4 slots |
| 352 |
E_Variable => 33102, -- (0.003) 55 slots |
| 353 |
E_Block => 32829, -- (0.003) 58 slots |
| 354 |
N_Op_Ne => 32127, -- (0.003) 8 slots |
| 355 |
N_Pragma_Argument_Association => 31504, -- (0.003) 7 slots |
| 356 |
N_Null_Statement => 30816, -- (0.003) 5 slots |
| 357 |
N_Aspect_Specification => 29667, -- (0.003) 9 slots |
| 358 |
N_Pragma => 28317, -- (0.003) 9 slots |
| 359 |
N_Generic_Association => 26297, -- (0.003) 8 slots |
| 360 |
N_Formal_Concrete_Subprogram_Declaration => 25843, -- (0.003) 6 slots |
| 361 |
N_Op_Lt => 25328, -- (0.003) 8 slots |
| 362 |
E_String_Literal_Subtype => 25272, -- (0.003) 48 slots |
| 363 |
N_Full_Type_Declaration => 25258, -- (0.003) 7 slots |
| 364 |
N_With_Clause => 24370, -- (0.002) 9 slots |
| 365 |
N_Op_Add => 23839, -- (0.002) 8 slots |
| 366 |
E_Subprogram_Body => 23790, -- (0.002) 42 slots |
| 367 |
E_Return_Statement => 23098, -- (0.002) 51 slots |
| 368 |
N_Or_Else => 22858, -- (0.002) 8 slots |
| 369 |
N_Implicit_Label_Declaration => 21687, -- (0.002) 5 slots |
| 370 |
N_Others_Choice => 21579, -- (0.002) 4 slots |
| 371 |
E_Out_Parameter => 21513, -- (0.002) 38 slots |
| 372 |
N_Op_Subtract => 21441, -- (0.002) 8 slots |
| 373 |
N_Op_Ge => 21116, -- (0.002) 8 slots |
| 374 |
N_Component_Definition => 21075, -- (0.002) 7 slots |
| 375 |
N_Case_Statement_Alternative => 19664, -- (0.002) 8 slots |
| 376 |
N_Loop_Statement => 19507, -- (0.002) 9 slots |
| 377 |
E_Package => 19029, -- (0.002) 53 slots |
| 378 |
N_Op_Gt => 18619, -- (0.002) 8 slots |
| 379 |
N_Op_Le => 16564, -- (0.002) 8 slots |
| 380 |
N_Formal_Object_Declaration => 16219, -- (0.002) 7 slots |
| 381 |
E_Discriminant => 16091, -- (0.002) 56 slots |
| 382 |
N_Component_Declaration => 15858, -- (0.002) 7 slots |
| 383 |
N_Iteration_Scheme => 15719, -- (0.002) 8 slots |
| 384 |
N_Access_To_Object_Definition => 14875, -- (0.002) 5 slots |
| 385 |
E_Record_Subtype => 14569, -- (0.001) 52 slots |
| 386 |
N_Generic_Subprogram_Declaration => 14320, -- (0.001) 7 slots |
| 387 |
N_Package_Specification => 13323, -- (0.001) 8 slots |
| 388 |
N_Exception_Handler => 12841, -- (0.001) 8 slots |
| 389 |
E_Enumeration_Literal => 11608, -- (0.001) 42 slots |
| 390 |
N_Subprogram_Renaming_Declaration => 10991, -- (0.001) 9 slots |
| 391 |
N_In => 10794, -- (0.001) 8 slots |
| 392 |
E_Allocator_Type => 10751, -- (0.001) 44 slots |
| 393 |
E_General_Access_Type => 10451, -- (0.001) 44 slots |
| 394 |
E_Generic_Procedure => 9837, -- (0.001) 41 slots |
| 395 |
N_Package_Renaming_Declaration => 9395, -- (0.001) 8 slots |
| 396 |
N_Access_Definition => 9388, -- (0.001) 6 slots |
| 397 |
N_Qualified_Expression => 9012, -- (0.001) 7 slots |
| 398 |
E_Enumeration_Subtype => 8560, -- (0.001) 46 slots |
| 399 |
N_Allocator => 8474, -- (0.001) 8 slots |
| 400 |
N_Package_Declaration => 8099, -- (0.001) 10 slots |
| 401 |
N_Formal_Type_Declaration => 7964, -- (0.001) 7 slots |
| 402 |
N_Exit_Statement => 7960, -- (0.001) 8 slots |
| 403 |
N_Component_List => 7829, -- (0.001) 5 slots |
| 404 |
N_Defining_Operator_Symbol => 0, -- 7525, -- (0.001) 8 slots |
| 405 |
N_Case_Statement => 7271, -- (0.001) 7 slots |
| 406 |
N_Expression_Function => 7242, -- (0.001) 9 slots |
| 407 |
N_Loop_Parameter_Specification => 7042, -- (0.001) 7 slots |
| 408 |
N_Character_Literal => 6842, -- (0.001) 7 slots |
| 409 |
N_Op_Concat => 6565, -- (0.001) 8 slots |
| 410 |
N_Not_In => 6341, -- (0.001) 8 slots |
| 411 |
N_Label => 6133, -- (0.001) 9 slots |
| 412 |
N_Goto_Statement => 6133, -- (0.001) 8 slots |
| 413 |
E_Label => 6133, -- (0.001) 57 slots |
| 414 |
E_Loop => 6008, -- (0.001) 41 slots |
| 415 |
N_Generic_Package_Declaration => 5808, -- (0.001) 10 slots |
| 416 |
N_If_Expression => 5800, -- (0.001) 7 slots |
| 417 |
N_Record_Definition => 5628, -- (0.001) 7 slots |
| 418 |
N_Slice => 5461, -- (0.001) 7 slots |
| 419 |
N_Reference => 5332, -- (0.001) 7 slots |
| 420 |
E_Generic_Package => 5268, -- (0.001) 59 slots |
| 421 |
E_Record_Type => 4838, -- (0.000) 51 slots |
| 422 |
N_Raise_Program_Error => 4675, -- (0.000) 6 slots |
| 423 |
N_Raise_Statement => 4628, -- (0.000) 8 slots |
| 424 |
N_Use_Type_Clause => 4487, -- (0.000) 9 slots |
| 425 |
E_Array_Type => 4325, -- (0.000) 48 slots |
| 426 |
E_Operator => 4308, -- (0.000) 55 slots |
| 427 |
N_Freeze_Generic_Entity => 4249, -- (0.000) 4 slots |
| 428 |
N_Constrained_Array_Definition => 4244, -- (0.000) 5 slots |
| 429 |
N_Object_Renaming_Declaration => 4067, -- (0.000) 8 slots |
| 430 |
N_Formal_Private_Type_Definition => 4018, -- (0.000) 8 slots |
| 431 |
E_Loop_Parameter => 3870, -- (0.000) 38 slots |
| 432 |
N_Real_Literal => 3759, -- (0.000) 7 slots |
| 433 |
N_Attribute_Definition_Clause => 3724, -- (0.000) 8 slots |
| 434 |
N_Exception_Renaming_Declaration => 3697, -- (0.000) 8 slots |
| 435 |
E_Class_Wide_Type => 3674, -- (0.000) 48 slots |
| 436 |
E_Exception => 3632, -- (0.000) 24 slots |
| 437 |
N_Range_Constraint => 3506, -- (0.000) 4 slots |
| 438 |
E_Access_Type => 3487, -- (0.000) 44 slots |
| 439 |
E_Subprogram_Type => 3248, -- (0.000) 47 slots |
| 440 |
N_Package_Instantiation => 3005, -- (0.000) 8 slots |
| 441 |
E_Access_Attribute_Type => 2959, -- (0.000) 44 slots |
| 442 |
N_Op_And => 2957, -- (0.000) 8 slots |
| 443 |
E_Generic_In_Parameter => 2704, -- (0.000) 31 slots |
| 444 |
N_Derived_Type_Definition => 2688, -- (0.000) 7 slots |
| 445 |
N_Variant => 2535, -- (0.000) 8 slots |
| 446 |
E_Record_Subtype_With_Private => 2327, -- (0.000) 50 slots |
| 447 |
N_Private_Type_Declaration => 2287, -- (0.000) 6 slots |
| 448 |
E_Private_Type => 1890, -- (0.000) 48 slots |
| 449 |
N_Discriminant_Specification => 1864, -- (0.000) 7 slots |
| 450 |
N_Procedure_Instantiation => 1659, -- (0.000) 8 slots |
| 451 |
N_Op_Multiply => 1634, -- (0.000) 8 slots |
| 452 |
E_Access_Subtype => 1606, -- (0.000) 44 slots |
| 453 |
N_Defining_Program_Unit_Name => 1463, -- (0.000) 8 slots |
| 454 |
N_Number_Declaration => 1461, -- (0.000) 7 slots |
| 455 |
E_Named_Integer => 1430, -- (0.000) 19 slots |
| 456 |
N_Use_Package_Clause => 1369, -- (0.000) 9 slots |
| 457 |
N_Compilation_Unit_Aux => 1341, -- (0.000) 8 slots |
| 458 |
N_Compilation_Unit => 1341, -- (0.000) 8 slots |
| 459 |
N_Elsif_Part => 1331, -- (0.000) 7 slots |
| 460 |
N_Operator_Symbol => 1305, -- (0.000) 7 slots |
| 461 |
E_Limited_Private_Type => 1299, -- (0.000) 48 slots |
| 462 |
E_Generic_Function => 1292, -- (0.000) 41 slots |
| 463 |
E_Enumeration_Type => 1186, -- (0.000) 47 slots |
| 464 |
N_Enumeration_Type_Definition => 1169, -- (0.000) 6 slots |
| 465 |
N_Op_Or => 1107, -- (0.000) 8 slots |
| 466 |
N_Designator => 1100, -- (0.000) 9 slots |
| 467 |
N_Formal_Discrete_Type_Definition => 1086, -- (0.000) 4 slots |
| 468 |
N_Variant_Part => 1072, -- (0.000) 8 slots |
| 469 |
N_Formal_Package_Declaration => 1047, -- (0.000) 8 slots |
| 470 |
N_Quantified_Expression => 1033, -- (0.000) 8 slots |
| 471 |
E_Record_Type_With_Private => 1017, -- (0.000) 51 slots |
| 472 |
N_Package_Body => 999, -- (0.000) 9 slots |
| 473 |
N_Unconstrained_Array_Definition => 973, -- (0.000) 5 slots |
| 474 |
E_Private_Subtype => 971, -- (0.000) 48 slots |
| 475 |
N_Incomplete_Type_Declaration => 863, -- (0.000) 6 slots |
| 476 |
E_Incomplete_Type => 863, -- (0.000) 48 slots |
| 477 |
N_Contract => 859, -- (0.000) 6 slots |
| 478 |
E_Package_Body => 852, -- (0.000) 46 slots |
| 479 |
N_Extended_Return_Statement => 801, -- (0.000) 8 slots |
| 480 |
N_Op_Divide => 724, -- (0.000) 8 slots |
| 481 |
N_Extension_Aggregate => 718, -- (0.000) 8 slots |
| 482 |
N_Function_Instantiation => 642, -- (0.000) 8 slots |
| 483 |
N_Exception_Declaration => 594, -- (0.000) 7 slots |
| 484 |
N_Discriminant_Association => 552, -- (0.000) 7 slots |
| 485 |
N_Iterator_Specification => 543, -- (0.000) 8 slots |
| 486 |
N_Private_Extension_Declaration => 540, -- (0.000) 8 slots |
| 487 |
N_Formal_Signed_Integer_Type_Definition => 512, -- (0.000) 4 slots |
| 488 |
E_Modular_Integer_Subtype => 490, -- (0.000) 44 slots |
| 489 |
N_Component_Clause => 468, -- (0.000) 7 slots |
| 490 |
E_Signed_Integer_Type => 399, -- (0.000) 43 slots |
| 491 |
N_Op_Minus => 356, -- (0.000) 7 slots |
| 492 |
N_Raise_Expression => 337, -- (0.000) 8 slots |
| 493 |
N_Case_Expression_Alternative => 336, -- (0.000) 8 slots |
| 494 |
N_Op_Expon => 280, -- (0.000) 8 slots |
| 495 |
N_Abstract_Subprogram_Declaration => 250, -- (0.000) 6 slots |
| 496 |
E_Modular_Integer_Type => 232, -- (0.000) 44 slots |
| 497 |
N_Modular_Type_Definition => 214, -- (0.000) 7 slots |
| 498 |
N_Compound_Statement => 212, -- (0.000) 6 slots |
| 499 |
N_Free_Statement => 209, -- (0.000) 8 slots |
| 500 |
N_Record_Representation_Clause => 197, -- (0.000) 9 slots |
| 501 |
N_Access_Procedure_Definition => 195, -- (0.000) 6 slots |
| 502 |
E_Limited_Private_Subtype => 178, -- (0.000) 48 slots |
| 503 |
N_Access_Function_Definition => 172, -- (0.000) 7 slots |
| 504 |
N_Op_Mod => 163, -- (0.000) 8 slots |
| 505 |
N_Validate_Unchecked_Conversion => 156, -- (0.000) 5 slots |
| 506 |
E_Anonymous_Access_Subprogram_Type => 155, -- (0.000) 44 slots |
| 507 |
N_Op_Rem => 147, -- (0.000) 8 slots |
| 508 |
N_Formal_Incomplete_Type_Definition => 140, -- (0.000) 4 slots |
| 509 |
N_Signed_Integer_Type_Definition => 137, -- (0.000) 6 slots |
| 510 |
N_Case_Expression => 132, -- (0.000) 7 slots |
| 511 |
N_Op_Plus => 129, -- (0.000) 7 slots |
| 512 |
E_Incomplete_Subtype => 129, -- (0.000) 48 slots |
| 513 |
N_Op_Abs => 119, -- (0.000) 7 slots |
| 514 |
N_Op_Shift_Right => 109, -- (0.000) 8 slots |
| 515 |
E_Floating_Point_Subtype => 94, -- (0.000) 43 slots |
| 516 |
N_Op_Shift_Left => 72, -- (0.000) 8 slots |
| 517 |
E_Floating_Point_Type => 59, -- (0.000) 43 slots |
| 518 |
N_Formal_Derived_Type_Definition => 53, -- (0.000) 7 slots |
| 519 |
N_Formal_Floating_Point_Definition => 40, -- (0.000) 4 slots |
| 520 |
N_Defining_Character_Literal => 0, -- 36, -- (0.000) 8 slots |
| 521 |
N_Formal_Modular_Type_Definition => 27, -- (0.000) 4 slots |
| 522 |
E_Ordinary_Fixed_Point_Subtype => 23, -- (0.000) 44 slots |
| 523 |
E_Abstract_State => 22, -- (0.000) 48 slots |
| 524 |
E_Named_Real => 20, -- (0.000) 19 slots |
| 525 |
N_Floating_Point_Definition => 19, -- (0.000) 6 slots |
| 526 |
N_Subunit => 17, -- (0.000) 8 slots |
| 527 |
N_Enumeration_Representation_Clause => 17, -- (0.000) 9 slots |
| 528 |
N_Entry_Declaration => 17, -- (0.000) 7 slots |
| 529 |
N_Subprogram_Body_Stub => 16, -- (0.000) 8 slots |
| 530 |
N_Unused_At_Start => 15, -- (0.000) 4 slots |
| 531 |
E_Entry => 14, -- (0.000) 42 slots |
| 532 |
N_Formal_Ordinary_Fixed_Point_Definition => 12, -- (0.000) 4 slots |
| 533 |
E_Class_Wide_Subtype => 9, -- (0.000) 52 slots |
| 534 |
E_Protected_Subtype => 8, -- (0.000) 48 slots |
| 535 |
E_Ordinary_Fixed_Point_Type => 8, -- (0.000) 44 slots |
| 536 |
N_Op_Xor => 7, -- (0.000) 8 slots |
| 537 |
E_Generic_In_Out_Parameter => 7, -- (0.000) 31 slots |
| 538 |
N_Protected_Type_Declaration => 6, -- (0.000) 8 slots |
| 539 |
N_Protected_Definition => 6, -- (0.000) 8 slots |
| 540 |
N_Task_Type_Declaration => 4, -- (0.000) 8 slots |
| 541 |
N_Task_Definition => 4, -- (0.000) 8 slots |
| 542 |
N_Protected_Body => 4, -- (0.000) 9 slots |
| 543 |
E_Task_Subtype => 4, -- (0.000) 50 slots |
| 544 |
E_Protected_Type => 4, -- (0.000) 49 slots |
| 545 |
E_Access_Protected_Subprogram_Type => 4, -- (0.000) 45 slots |
| 546 |
N_Entry_Call_Statement => 3, -- (0.000) 8 slots |
| 547 |
E_Task_Type => 3, -- (0.000) 50 slots |
| 548 |
N_Raise_Storage_Error => 2, -- (0.000) 6 slots |
| 549 |
N_Package_Body_Stub => 2, -- (0.000) 8 slots |
| 550 |
N_Generic_Procedure_Renaming_Declaration => 2, -- (0.000) 8 slots |
| 551 |
N_Task_Body => 1, -- (0.000) 10 slots |
| 552 |
N_Single_Protected_Declaration => 1, -- (0.000) 8 slots |
| 553 |
N_Real_Range_Specification => 1, -- (0.000) 6 slots |
| 554 |
N_Ordinary_Fixed_Point_Definition => 1, -- (0.000) 6 slots |
| 555 |
N_Error => 1, -- (0.000) 6 slots |
| 556 |
N_Entry_Body_Formal_Part => 1, -- (0.000) 6 slots |
| 557 |
N_Entry_Body => 1, -- (0.000) 10 slots |
| 558 |
N_Empty => 1, -- (0.000) 6 slots |
| 559 |
N_Delay_Relative_Statement => 1, -- (0.000) 7 slots |
| 560 |
E_Protected_Body => 1, -- (0.000) 35 slots |
| 561 |
|
| 562 |
Between_Concrete_Node_And_Concrete_Entity_Types => 0, |
| 563 |
|
| 564 |
-- The rest had frequency 0 (i.e. no such nodes were created in the |
| 565 |
-- example), but we set them to 1, so we won't lose information when |
| 566 |
-- multiplying. We use "others", so that if new node types are added, |
| 567 |
-- we don't have to modify the table; new node types are unlikely to |
| 568 |
-- be very common. |
| 569 |
|
| 570 |
others => 1 |
| 571 |
-- N_Variable_Reference_Marker => 0, (0.000) 4 slots |
| 572 |
-- N_Unused_At_End => 0, (0.000) 4 slots |
| 573 |
-- N_Triggering_Alternative => 0, (0.000) 6 slots |
| 574 |
-- N_Timed_Entry_Call => 0, (0.000) 5 slots |
| 575 |
-- N_Terminate_Alternative => 0, (0.000) 6 slots |
| 576 |
-- N_Task_Body_Stub => 0, (0.000) 8 slots |
| 577 |
-- N_Target_Name => 0, (0.000) 5 slots |
| 578 |
-- N_Single_Task_Declaration => 0, (0.000) 8 slots |
| 579 |
-- N_Selective_Accept => 0, (0.000) 5 slots |
| 580 |
-- N_Scil_Membership_Test => 0, (0.000) 5 slots |
| 581 |
-- N_Scil_Dispatch_Table_Tag_Init => 0, (0.000) 4 slots |
| 582 |
-- N_Scil_Dispatching_Call => 0, (0.000) 6 slots |
| 583 |
-- N_Return_When_Statement => 0, (0.000) 7 slots |
| 584 |
-- N_Requeue_Statement => 0, (0.000) 8 slots |
| 585 |
-- N_Raise_When_Statement => 0, (0.000) 8 slots |
| 586 |
-- N_Push_Storage_Error_Label => 0, (0.000) 4 slots |
| 587 |
-- N_Push_Program_Error_Label => 0, (0.000) 4 slots |
| 588 |
-- N_Push_Constraint_Error_Label => 0, (0.000) 4 slots |
| 589 |
-- N_Protected_Body_Stub => 0, (0.000) 8 slots |
| 590 |
-- N_Pop_Storage_Error_Label => 0, (0.000) 4 slots |
| 591 |
-- N_Pop_Program_Error_Label => 0, (0.000) 4 slots |
| 592 |
-- N_Pop_Constraint_Error_Label => 0, (0.000) 4 slots |
| 593 |
-- N_Op_Shift_Right_Arithmetic => 0, (0.000) 8 slots |
| 594 |
-- N_Op_Rotate_Right => 0, (0.000) 8 slots |
| 595 |
-- N_Op_Rotate_Left => 0, (0.000) 8 slots |
| 596 |
-- N_Mod_Clause => 0, (0.000) 7 slots |
| 597 |
-- N_Iterated_Element_Association => 0, (0.000) 8 slots |
| 598 |
-- N_Iterated_Component_Association => 0, (0.000) 8 slots |
| 599 |
-- N_Goto_When_Statement => 0, (0.000) 8 slots |
| 600 |
-- N_Generic_Package_Renaming_Declaration => 0, (0.000) 8 slots |
| 601 |
-- N_Generic_Function_Renaming_Declaration => 0, (0.000) 8 slots |
| 602 |
-- N_Formal_Decimal_Fixed_Point_Definition => 0, (0.000) 4 slots |
| 603 |
-- N_Formal_Abstract_Subprogram_Declaration => 0, (0.000) 6 slots |
| 604 |
-- N_Entry_Index_Specification => 0, (0.000) 7 slots |
| 605 |
-- N_Entry_Call_Alternative => 0, (0.000) 6 slots |
| 606 |
-- N_Digits_Constraint => 0, (0.000) 6 slots |
| 607 |
-- N_Delta_Constraint => 0, (0.000) 6 slots |
| 608 |
-- N_Delta_Aggregate => 0, (0.000) 8 slots |
| 609 |
-- N_Delay_Until_Statement => 0, (0.000) 7 slots |
| 610 |
-- N_Delay_Alternative => 0, (0.000) 7 slots |
| 611 |
-- N_Decimal_Fixed_Point_Definition => 0, (0.000) 6 slots |
| 612 |
-- N_Conditional_Entry_Call => 0, (0.000) 5 slots |
| 613 |
-- N_Code_Statement => 0, (0.000) 7 slots |
| 614 |
-- N_At_Clause => 0, (0.000) 9 slots |
| 615 |
-- N_Asynchronous_Select => 0, (0.000) 5 slots |
| 616 |
-- N_Accept_Statement => 0, (0.000) 8 slots |
| 617 |
-- N_Accept_Alternative => 0, (0.000) 8 slots |
| 618 |
-- N_Abort_Statement => 0, (0.000) 4 slots |
| 619 |
-- N_Abortable_Part => 0, (0.000) 5 slots |
| 620 |
-- E_Task_Body => 0, (0.000) 39 slots |
| 621 |
-- E_Exception_Type => 0, (0.000) 45 slots |
| 622 |
-- E_Entry_Index_Parameter => 0, (0.000) 19 slots |
| 623 |
-- E_Entry_Family => 0, (0.000) 42 slots |
| 624 |
-- E_Decimal_Fixed_Point_Type => 0, (0.000) 52 slots |
| 625 |
-- E_Decimal_Fixed_Point_Subtype => 0, (0.000) 52 slots |
| 626 |
-- E_Anonymous_Access_Protected_Subprogram_Type => 0, (0.000) 45 slots |
| 627 |
); -- Type_Frequency |
| 628 |
|
| 629 |
end Gen_IL.Internals; |