i386: Adjust rtx cost for imulq and imulw [PR115749]
[official-gcc.git] / gcc / ada / gen_il-gen-gen_entities.adb
blobbdc812026455db0b441420ede8b606f00227ba23
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- G E N _ I L . G E N . G E N _ E N T I T I E S --
6 -- --
7 -- B o d y --
8 -- --
9 -- Copyright (C) 2020-2024, 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 ------------------------------------------------------------------------------
26 procedure Gen_IL.Gen.Gen_Entities is
28 procedure Ab -- Short for "Abstract"
29 (T : Abstract_Entity; Parent : Abstract_Type;
30 Fields : Field_Sequence := No_Fields)
31 renames Create_Abstract_Entity_Type;
32 procedure Cc -- Short for "ConCrete"
33 (T : Concrete_Entity; Parent : Abstract_Type;
34 Fields : Field_Sequence := No_Fields)
35 renames Create_Concrete_Entity_Type;
37 -- No Sy (Syntactic) fields in entities
38 function Sm -- Short for "Semantic"
39 (Field : Field_Enum; Field_Type : Type_Enum;
40 Type_Only : Type_Only_Enum := No_Type_Only;
41 Pre, Pre_Get, Pre_Set : String := "") return Field_Desc
42 renames Create_Semantic_Field;
44 procedure Union (T : Abstract_Entity; Children : Type_Array)
45 renames Create_Entity_Union_Type;
47 begin -- Gen_IL.Gen.Gen_Entities
48 pragma Style_Checks ("M200");
50 Create_Root_Entity_Type (Entity_Kind,
51 (Sm (Ekind, Entity_Kind_Type),
52 Sm (Basic_Convention, Convention_Id),
53 Sm (Address_Taken, Flag),
54 Sm (Associated_Entity, Node_Id),
55 Sm (Can_Never_Be_Null, Flag),
56 Sm (Checks_May_Be_Suppressed, Flag),
57 Sm (Debug_Info_Off, Flag),
58 Sm (Default_Expressions_Processed, Flag),
59 Sm (Delay_Cleanups, Flag),
60 Sm (Depends_On_Private, Flag),
61 Sm (Disable_Controlled, Flag, Base_Type_Only),
62 Sm (Discard_Names, Flag),
63 Sm (First_Rep_Item, Node_Id),
64 Sm (Freeze_Node, Node_Id),
65 Sm (From_Limited_With, Flag),
66 Sm (Has_Aliased_Components, Flag, Impl_Base_Type_Only),
67 Sm (Has_Alignment_Clause, Flag),
68 Sm (Has_All_Calls_Remote, Flag),
69 Sm (Has_Atomic_Components, Flag, Impl_Base_Type_Only),
70 Sm (Has_Biased_Representation, Flag),
71 Sm (Has_Completion, Flag),
72 Sm (Has_Contiguous_Rep, Flag),
73 Sm (Has_Controlled_Component, Flag, Base_Type_Only),
74 Sm (Has_Controlling_Result, Flag),
75 Sm (Has_Convention_Pragma, Flag),
76 Sm (Has_Default_Aspect, Flag, Base_Type_Only),
77 Sm (Has_Delayed_Aspects, Flag),
78 Sm (Has_Delayed_Freeze, Flag),
79 Sm (Has_Delayed_Rep_Aspects, Flag),
80 Sm (Has_Exit, Flag),
81 Sm (Has_Forward_Instantiation, Flag),
82 Sm (Has_Fully_Qualified_Name, Flag),
83 Sm (Has_Gigi_Rep_Item, Flag),
84 Sm (Has_Homonym, Flag),
85 Sm (Has_Implicit_Dereference, Flag),
86 Sm (Has_Independent_Components, Flag, Impl_Base_Type_Only),
87 Sm (Has_Master_Entity, Flag),
88 Sm (Has_Nested_Block_With_Handler, Flag),
89 Sm (Has_Non_Standard_Rep, Flag, Impl_Base_Type_Only),
90 Sm (Has_Per_Object_Constraint, Flag),
91 Sm (Has_Pragma_Elaborate_Body, Flag),
92 Sm (Has_Pragma_Inline, Flag),
93 Sm (Has_Pragma_Inline_Always, Flag),
94 Sm (Has_Pragma_No_Inline, Flag),
95 Sm (Has_Pragma_Preelab_Init, Flag),
96 Sm (Has_Pragma_Pure, Flag),
97 Sm (Has_Pragma_Pure_Function, Flag),
98 Sm (Has_Pragma_Thread_Local_Storage, Flag),
99 Sm (Has_Pragma_Unmodified, Flag),
100 Sm (Has_Pragma_Unreferenced, Flag),
101 Sm (Has_Pragma_Unused, Flag),
102 Sm (Has_Private_Ancestor, Flag),
103 Sm (Has_Private_Declaration, Flag),
104 Sm (Has_Protected, Flag, Base_Type_Only),
105 Sm (Has_Qualified_Name, Flag),
106 Sm (Has_Relaxed_Finalization, Flag, Base_Type_Only),
107 Sm (Has_Size_Clause, Flag),
108 Sm (Has_Stream_Size_Clause, Flag),
109 Sm (Has_Task, Flag, Base_Type_Only),
110 Sm (Has_Timing_Event, Flag, Base_Type_Only),
111 Sm (Has_Thunks, Flag),
112 Sm (Has_Unchecked_Union, Flag, Base_Type_Only),
113 Sm (Has_Volatile_Components, Flag, Impl_Base_Type_Only),
114 Sm (Has_Xref_Entry, Flag),
115 Sm (Has_Yield_Aspect, Flag),
116 Sm (Homonym, Node_Id),
117 Sm (In_Package_Body, Flag),
118 Sm (In_Private_Part, Flag),
119 Sm (In_Use, Flag),
120 Sm (Is_Ada_2005_Only, Flag),
121 Sm (Is_Ada_2012_Only, Flag),
122 Sm (Is_Ada_2022_Only, Flag),
123 Sm (Is_Aliased, Flag),
124 Sm (Is_Atomic, Flag),
125 Sm (Is_Bit_Packed_Array, Flag, Impl_Base_Type_Only),
126 Sm (Is_Character_Type, Flag),
127 Sm (Is_Checked_Ghost_Entity, Flag),
128 Sm (Is_Child_Unit, Flag),
129 Sm (Is_Class_Wide_Wrapper, Flag),
130 Sm (Is_Class_Wide_Equivalent_Type, Flag),
131 Sm (Is_Compilation_Unit, Flag),
132 Sm (Is_Concurrent_Record_Type, Flag),
133 Sm (Is_Constr_Array_Subt_With_Bounds, Flag),
134 Sm (Is_Constr_Subt_For_U_Nominal, Flag),
135 Sm (Is_Constrained, Flag),
136 Sm (Is_Constructor, Flag),
137 Sm (Is_Controlled_Active, Flag, Base_Type_Only),
138 Sm (Is_CPP_Class, Flag),
139 Sm (Is_Descendant_Of_Address, Flag),
140 Sm (Is_Discrim_SO_Function, Flag),
141 Sm (Is_Discriminant_Check_Function, Flag),
142 Sm (Is_Dispatch_Table_Entity, Flag),
143 Sm (Is_Dispatch_Table_Wrapper, Flag),
144 Sm (Is_Dispatching_Operation, Flag),
145 Sm (Is_Eliminated, Flag),
146 Sm (Is_Entry_Formal, Flag),
147 Sm (Is_Entry_Wrapper, Flag),
148 Sm (Is_Exported, Flag),
149 Sm (Is_First_Subtype, Flag),
150 Sm (Is_Formal_Subprogram, Flag),
151 Sm (Is_Frozen, Flag),
152 Sm (Is_Generic_Instance, Flag),
153 Sm (Is_Generic_Type, Flag),
154 Sm (Is_Hidden, Flag),
155 Sm (Is_Hidden_Non_Overridden_Subpgm, Flag),
156 Sm (Is_Hidden_Open_Scope, Flag),
157 Sm (Is_Ignored_Ghost_Entity, Flag),
158 Sm (Is_Immediately_Visible, Flag),
159 Sm (Is_Implementation_Defined, Flag),
160 Sm (Is_Imported, Flag),
161 Sm (Is_Independent, Flag),
162 Sm (Is_Inlined, Flag),
163 Sm (Is_Instantiated, Flag),
164 Sm (Is_Interface, Flag),
165 Sm (Is_Internal, Flag),
166 Sm (Is_Interrupt_Handler, Flag),
167 Sm (Is_Intrinsic_Subprogram, Flag),
168 Sm (Is_Itype, Flag),
169 Sm (Is_Known_Non_Null, Flag),
170 Sm (Is_Known_Null, Flag),
171 Sm (Is_Known_Valid, Flag),
172 Sm (Is_Limited_Composite, Flag),
173 Sm (Is_Limited_Interface, Flag),
174 Sm (Is_Limited_Record, Flag),
175 Sm (Is_Loop_Parameter, Flag),
176 Sm (Is_Obsolescent, Flag),
177 Sm (Is_Package_Body_Entity, Flag),
178 Sm (Is_Packed, Flag, Impl_Base_Type_Only),
179 Sm (Is_Packed_Array_Impl_Type, Flag),
180 Sm (Is_Not_Self_Hidden, Flag),
181 Sm (Is_Potentially_Use_Visible, Flag),
182 Sm (Is_Preelaborated, Flag),
183 Sm (Is_Private_Descendant, Flag),
184 Sm (Is_Public, Flag),
185 Sm (Is_Pure, Flag),
186 Sm (Is_Remote_Call_Interface, Flag),
187 Sm (Is_Remote_Types, Flag),
188 Sm (Is_Renaming_Of_Object, Flag),
189 Sm (Is_Return_Object, Flag),
190 Sm (Is_Safe_To_Reevaluate, Flag),
191 Sm (Is_Shared_Passive, Flag),
192 Sm (Is_Static_Type, Flag),
193 Sm (Is_Statically_Allocated, Flag),
194 Sm (Is_Tag, Flag),
195 Sm (Is_Tagged_Type, Flag),
196 Sm (Is_Thunk, Flag),
197 Sm (Is_Trivial_Subprogram, Flag),
198 Sm (Is_True_Constant, Flag),
199 Sm (Is_Unchecked_Union, Flag, Impl_Base_Type_Only),
200 Sm (Is_Underlying_Full_View, Flag),
201 Sm (Is_Underlying_Record_View, Flag, Base_Type_Only),
202 Sm (Is_Unimplemented, Flag),
203 Sm (Is_Uplevel_Referenced_Entity, Flag),
204 Sm (Is_Visible_Formal, Flag),
205 Sm (Is_Visible_Lib_Unit, Flag),
206 Sm (Is_Volatile_Type, Flag),
207 Sm (Is_Volatile_Object, Flag),
208 Sm (Is_Volatile_Full_Access, Flag),
209 Sm (Is_Wrapper, Flag),
210 Sm (Kill_Elaboration_Checks, Flag),
211 Sm (Kill_Range_Checks, Flag),
212 Sm (Low_Bound_Tested, Flag),
213 Sm (Materialize_Entity, Flag),
214 Sm (May_Inherit_Delayed_Rep_Aspects, Flag),
215 Sm (Needs_Activation_Record, Flag),
216 Sm (Needs_Debug_Info, Flag),
217 Sm (Never_Set_In_Source, Flag),
218 Sm (No_Return, Flag),
219 Sm (Overlays_Constant, Flag),
220 Sm (Prev_Entity, Node_Id),
221 Sm (Referenced, Flag),
222 Sm (Referenced_As_LHS, Flag),
223 Sm (Referenced_As_Out_Parameter, Flag),
224 Sm (Return_Present, Flag),
225 Sm (Returns_By_Ref, Flag),
226 Sm (Sec_Stack_Needed_For_Return, Flag),
227 Sm (Size_Depends_On_Discriminant, Flag),
228 Sm (Size_Known_At_Compile_Time, Flag),
229 Sm (Stores_Attribute_Old_Prefix, Flag),
230 Sm (Strict_Alignment, Flag, Impl_Base_Type_Only),
231 Sm (Suppress_Elaboration_Warnings, Flag),
232 Sm (Suppress_Style_Checks, Flag),
233 Sm (Suppress_Value_Tracking_On_Call, Flag),
234 Sm (Treat_As_Volatile, Flag),
235 Sm (Used_As_Generic_Actual, Flag),
236 Sm (Uses_Sec_Stack, Flag),
237 Sm (Warnings_Off, Flag),
238 Sm (Warnings_Off_Used, Flag),
239 Sm (Warnings_Off_Used_Unmodified, Flag),
240 Sm (Warnings_Off_Used_Unreferenced, Flag),
241 Sm (Was_Hidden, Flag)));
243 Ab (Void_Or_Type_Kind, Entity_Kind);
245 Cc (E_Void, Void_Or_Type_Kind,
246 -- The initial Ekind value for a newly created entity. Also used as the
247 -- Ekind for Standard_Void_Type, a type entity in Standard used as a
248 -- dummy type for the return type of a procedure (the reason we create
249 -- this type is to share the circuits for performing overload
250 -- resolution on calls).
251 (Sm (Alignment, Unat),
252 Sm (Contract, Node_Id),
253 Sm (First_Entity, Node_Id),
254 Sm (Last_Entity, Node_Id),
255 Sm (Is_Elaboration_Warnings_OK_Id, Flag),
256 Sm (Original_Record_Component, Node_Id),
257 Sm (Scope_Depth_Value, Unat),
258 Sm (SPARK_Pragma, Node_Id),
259 Sm (SPARK_Pragma_Inherited, Flag),
260 Sm (Current_Value, Node_Id), -- setter only
261 Sm (Has_Predicates, Flag), -- setter only
262 Sm (Initialization_Statements, Node_Id), -- setter only
263 Sm (Is_Param_Block_Component_Type, Flag, Base_Type_Only),
264 -- setter only
266 Sm (Package_Instantiation, Node_Id), -- setter only
267 Sm (Related_Expression, Node_Id), -- setter only
269 -- If we set the Ekind field properly before setting the following
270 -- fields, then these would not be needed in E_Void.
271 Sm (Accept_Address, Elist_Id),
272 Sm (Associated_Formal_Package, Node_Id),
273 Sm (Associated_Node_For_Itype, Node_Id),
274 Sm (Corresponding_Remote_Type, Node_Id),
275 Sm (CR_Discriminant, Node_Id),
276 Sm (Debug_Renaming_Link, Node_Id),
277 Sm (Discriminal_Link, Node_Id),
278 Sm (Discriminant_Default_Value, Node_Id),
279 Sm (Discriminant_Number, Upos),
280 Sm (Enclosing_Scope, Node_Id),
281 Sm (Entry_Bodies_Array, Node_Id,
282 Pre => "Has_Entries (N)"),
283 Sm (Entry_Cancel_Parameter, Node_Id),
284 Sm (Entry_Component, Node_Id),
285 Sm (Entry_Formal, Node_Id),
286 Sm (Entry_Parameters_Type, Node_Id),
287 Sm (Esize, Uint),
288 Sm (RM_Size, Uint),
289 Sm (Extra_Formal, Node_Id),
290 Sm (Generic_Homonym, Node_Id),
291 Sm (Generic_Renamings, Elist_Id),
292 Sm (Handler_Records, List_Id),
293 Sm (Has_Static_Discriminants, Flag),
294 Sm (Inner_Instances, Elist_Id),
295 Sm (Interface_Name, Node_Id),
296 Sm (Next_Inlined_Subprogram, Node_Id),
297 Sm (Renamed_Or_Alias, Node_Id), -- See Einfo.Utils
298 Sm (Return_Applies_To, Node_Id),
299 Sm (Scalar_Range, Node_Id),
300 Sm (Scale_Value, Uint),
301 Sm (Unset_Reference, Node_Id)));
302 -- For the above "setter only" fields, the setters are called for E_Void,
303 -- but not getters; the Ekind is modified before any such getters are
304 -- called.
306 Ab (Exception_Or_Object_Kind, Entity_Kind);
308 Ab (Object_Kind, Exception_Or_Object_Kind,
309 (Sm (Current_Value, Node_Id),
310 Sm (Renamed_Or_Alias, Node_Id)));
312 Ab (Record_Field_Kind, Object_Kind,
313 (Sm (Component_Bit_Offset, Uint),
314 Sm (Component_Clause, Node_Id),
315 Sm (Corresponding_Record_Component, Node_Id),
316 Sm (Entry_Formal, Node_Id),
317 Sm (Esize, Uint),
318 Sm (Interface_Name, Node_Id),
319 Sm (Normalized_First_Bit, Uint),
320 Sm (Normalized_Position, Uint),
321 Sm (Original_Record_Component, Node_Id)));
323 Cc (E_Component, Record_Field_Kind,
324 -- Components (other than discriminants) of a record declaration,
325 -- private declarations of protected objects.
326 (Sm (Discriminant_Checking_Func, Node_Id),
327 Sm (DT_Entry_Count, Uint,
328 Pre => "Is_Tag (N)"),
329 Sm (DT_Offset_To_Top_Func, Node_Id,
330 Pre => "Is_Tag (N)"),
331 Sm (Prival, Node_Id,
332 Pre => "Is_Protected_Component (N)"),
333 Sm (Related_Type, Node_Id)));
335 Ab (Allocatable_Kind, Object_Kind,
336 (Sm (Activation_Record_Component, Node_Id),
337 Sm (Alignment, Unat),
338 Sm (Esize, Uint),
339 Sm (Finalization_Master_Node, Node_Id),
340 Sm (Interface_Name, Node_Id),
341 Sm (Is_Finalized_Transient, Flag),
342 Sm (Is_Ignored_For_Finalization, Flag),
343 Sm (Linker_Section_Pragma, Node_Id),
344 Sm (Related_Expression, Node_Id)));
346 Ab (Constant_Or_Variable_Kind, Allocatable_Kind,
347 (Sm (Actual_Subtype, Node_Id),
348 Sm (BIP_Initialization_Call, Node_Id),
349 Sm (Contract, Node_Id),
350 Sm (Discriminal_Link, Node_Id),
351 Sm (Encapsulating_State, Node_Id),
352 Sm (Extra_Accessibility, Node_Id),
353 Sm (Initialization_Statements, Node_Id),
354 Sm (Is_Elaboration_Checks_OK_Id, Flag),
355 Sm (Is_Elaboration_Warnings_OK_Id, Flag),
356 Sm (Last_Aggregate_Assignment, Node_Id),
357 Sm (Optimize_Alignment_Space, Flag),
358 Sm (Optimize_Alignment_Time, Flag),
359 Sm (Prival_Link, Node_Id),
360 Sm (Related_Type, Node_Id),
361 Sm (Return_Statement, Node_Id),
362 Sm (Size_Check_Code, Node_Id),
363 Sm (SPARK_Pragma, Node_Id),
364 Sm (SPARK_Pragma_Inherited, Flag)));
366 Cc (E_Constant, Constant_Or_Variable_Kind,
367 -- Constants created by an object declaration with a constant keyword
368 (Sm (Full_View, Node_Id)));
370 Cc (E_Discriminant, Record_Field_Kind,
371 -- A discriminant, created by the use of a discriminant in a type
372 -- declaration.
373 (Sm (Corresponding_Discriminant, Node_Id),
374 Sm (CR_Discriminant, Node_Id),
375 Sm (Discriminal, Node_Id),
376 Sm (Discriminant_Default_Value, Node_Id),
377 Sm (Discriminant_Number, Upos),
378 Sm (Is_Completely_Hidden, Flag)));
380 Cc (E_Loop_Parameter, Allocatable_Kind);
381 -- A loop parameter created by a for loop
383 Cc (E_Variable, Constant_Or_Variable_Kind,
384 -- Variables created by an object declaration with no constant keyword
385 (Sm (Anonymous_Designated_Type, Node_Id),
386 Sm (Debug_Renaming_Link, Node_Id),
387 Sm (Extra_Constrained, Node_Id),
388 Sm (Has_Initial_Value, Flag),
389 Sm (Hiding_Loop_Variable, Node_Id),
390 Sm (Last_Assignment, Node_Id),
391 Sm (OK_To_Rename, Flag),
392 Sm (Part_Of_Constituents, Elist_Id),
393 Sm (Part_Of_References, Elist_Id),
394 Sm (Shared_Var_Procs_Instance, Node_Id),
395 Sm (Suppress_Initialization, Flag),
396 Sm (Unset_Reference, Node_Id),
397 Sm (Validated_Object, Node_Id)));
399 Ab (Formal_Kind, Object_Kind,
400 -- Formal parameters are also objects
401 (Sm (Activation_Record_Component, Node_Id),
402 Sm (Actual_Subtype, Node_Id),
403 Sm (Alignment, Unat),
404 Sm (Default_Expr_Function, Node_Id),
405 Sm (Default_Value, Node_Id),
406 Sm (Entry_Component, Node_Id),
407 Sm (Esize, Uint),
408 Sm (Extra_Accessibility, Node_Id),
409 Sm (Extra_Constrained, Node_Id),
410 Sm (Extra_Formal, Node_Id),
411 Sm (Has_Initial_Value, Flag),
412 Sm (Is_Controlling_Formal, Flag),
413 Sm (Is_Only_Out_Parameter, Flag),
414 Sm (Linker_Section_Pragma, Node_Id),
415 Sm (Mechanism, Mechanism_Type),
416 Sm (Minimum_Accessibility, Node_Id),
417 Sm (Protected_Formal, Node_Id),
418 Sm (Spec_Entity, Node_Id),
419 Sm (Unset_Reference, Node_Id)));
421 Cc (E_Out_Parameter, Formal_Kind,
422 -- An out parameter of a subprogram or entry
423 (Sm (Last_Assignment, Node_Id)));
425 Cc (E_In_Out_Parameter, Formal_Kind,
426 -- An in-out parameter of a subprogram or entry
427 (Sm (Last_Assignment, Node_Id)));
429 Cc (E_In_Parameter, Formal_Kind,
430 -- An in parameter of a subprogram or entry
431 (Sm (Discriminal_Link, Node_Id),
432 Sm (Discriminant_Default_Value, Node_Id),
433 Sm (Is_Activation_Record, Flag)));
435 Ab (Formal_Object_Kind, Object_Kind,
436 -- Generic formal objects are also objects
437 (Sm (Entry_Component, Node_Id),
438 Sm (Esize, Uint)));
440 Cc (E_Generic_In_Out_Parameter, Formal_Object_Kind,
441 -- A generic in out parameter, created by the use of a generic in out
442 -- parameter in a generic declaration.
443 (Sm (Actual_Subtype, Node_Id)));
445 Cc (E_Generic_In_Parameter, Formal_Object_Kind);
446 -- A generic in parameter, created by the use of a generic in
447 -- parameter in a generic declaration.
449 Ab (Named_Kind, Entity_Kind,
450 (Sm (Renamed_Or_Alias, Node_Id)));
452 Cc (E_Named_Integer, Named_Kind);
453 -- Named numbers created by a number declaration with an integer value
455 Cc (E_Named_Real, Named_Kind);
456 -- Named numbers created by a number declaration with a real value
458 Ab (Type_Kind, Void_Or_Type_Kind,
459 (Sm (Alignment, Unat),
460 Sm (Associated_Node_For_Itype, Node_Id),
461 Sm (Can_Use_Internal_Rep, Flag, Base_Type_Only,
462 Pre => "Ekind (Base_Type (N)) in Access_Subprogram_Kind"),
463 Sm (Class_Wide_Equivalent_Type, Node_Id),
464 Sm (Class_Wide_Type, Node_Id),
465 Sm (Contract, Node_Id),
466 Sm (Current_Use_Clause, Node_Id),
467 Sm (Derived_Type_Link, Node_Id),
468 Sm (Direct_Primitive_Operations, Elist_Id),
469 Sm (Predicates_Ignored, Flag),
470 Sm (Esize, Uint),
471 Sm (Finalize_Storage_Only, Flag, Base_Type_Only),
472 Sm (First_Entity, Node_Id),
473 Sm (Last_Entity, Node_Id),
474 Sm (Full_View, Node_Id),
475 Sm (Has_Completion_In_Body, Flag),
476 Sm (Has_Constrained_Partial_View, Flag, Base_Type_Only),
477 Sm (Has_Discriminants, Flag),
478 Sm (Has_Dispatch_Table, Flag,
479 Pre => "Is_Tagged_Type (N)"),
480 Sm (Has_Dynamic_Predicate_Aspect, Flag),
481 Sm (Has_Ghost_Predicate_Aspect, Flag),
482 Sm (Has_Inheritable_Invariants, Flag, Base_Type_Only),
483 Sm (Has_Inherited_DIC, Flag, Base_Type_Only),
484 Sm (Has_Inherited_Invariants, Flag, Base_Type_Only),
485 Sm (Has_Object_Size_Clause, Flag),
486 Sm (Has_Own_DIC, Flag, Base_Type_Only),
487 Sm (Has_Own_Invariants, Flag, Base_Type_Only),
488 Sm (Has_Pragma_Unreferenced_Objects, Flag),
489 Sm (Has_Predicates, Flag),
490 Sm (Has_Primitive_Operations, Flag, Base_Type_Only),
491 Sm (Has_Private_Extension, Flag,
492 Pre => "Is_Tagged_Type (N)"),
493 Sm (Has_Specified_Layout, Flag, Impl_Base_Type_Only),
494 Sm (Has_Specified_Stream_Input, Flag),
495 Sm (Has_Specified_Stream_Output, Flag),
496 Sm (Has_Specified_Stream_Read, Flag),
497 Sm (Has_Specified_Stream_Write, Flag),
498 Sm (Has_Static_Discriminants, Flag),
499 Sm (Has_Static_Predicate, Flag),
500 Sm (Has_Static_Predicate_Aspect, Flag),
501 Sm (Has_Unknown_Discriminants, Flag),
502 Sm (Interface_Name, Node_Id),
503 Sm (Is_Abstract_Type, Flag),
504 Sm (Is_Actual_Subtype, Flag),
505 Sm (Is_Asynchronous, Flag),
506 Sm (Is_Fixed_Lower_Bound_Array_Subtype, Flag),
507 Sm (Is_Fixed_Lower_Bound_Index_Subtype, Flag),
508 Sm (Is_Generic_Actual_Type, Flag),
509 Sm (Is_Mutably_Tagged_Type, Flag),
510 Sm (Is_Non_Static_Subtype, Flag),
511 Sm (Is_Private_Composite, Flag),
512 Sm (Is_RACW_Stub_Type, Flag),
513 Sm (Is_Unsigned_Type, Flag),
514 Sm (Itype_Printed, Flag,
515 Pre => "Is_Itype (N)"),
516 Sm (Known_To_Have_Preelab_Init, Flag),
517 Sm (Linker_Section_Pragma, Node_Id),
518 Sm (Must_Be_On_Byte_Boundary, Flag),
519 Sm (Must_Have_Preelab_Init, Flag),
520 Sm (No_Tagged_Streams_Pragma, Node_Id,
521 Pre => "Is_Tagged_Type (N)"),
522 Sm (Non_Binary_Modulus, Flag, Base_Type_Only),
523 Sm (Optimize_Alignment_Space, Flag),
524 Sm (Optimize_Alignment_Time, Flag),
525 Sm (Partial_View_Has_Unknown_Discr, Flag),
526 Sm (Related_Expression, Node_Id),
527 Sm (RM_Size, Uint),
528 Sm (SPARK_Pragma, Node_Id),
529 Sm (SPARK_Pragma_Inherited, Flag),
530 Sm (Subprograms_For_Type, Elist_Id),
531 Sm (Suppress_Initialization, Flag),
532 Sm (Universal_Aliasing, Flag, Impl_Base_Type_Only),
533 Sm (Renamed_Or_Alias, Node_Id),
534 Sm (Stored_Constraint, Elist_Id)));
536 Ab (Elementary_Kind, Type_Kind);
538 Ab (Scalar_Kind, Elementary_Kind,
539 (Sm (Default_Aspect_Value, Node_Id, Base_Type_Only),
540 Sm (Scalar_Range, Node_Id)));
542 Ab (Discrete_Kind, Scalar_Kind,
543 (Sm (No_Dynamic_Predicate_On_Actual, Flag),
544 Sm (No_Predicate_On_Actual, Flag),
545 Sm (Static_Discrete_Predicate, List_Id)));
547 Ab (Enumeration_Kind, Discrete_Kind,
548 (Sm (First_Literal, Node_Id),
549 Sm (Has_Enumeration_Rep_Clause, Flag),
550 Sm (Has_Pragma_Ordered, Flag, Impl_Base_Type_Only),
551 Sm (Lit_Indexes, Node_Id),
552 Sm (Lit_Strings, Node_Id),
553 Sm (Nonzero_Is_True, Flag, Base_Type_Only,
554 Pre => "Root_Type (N) = Standard_Boolean"),
555 Sm (Lit_Hash, Node_Id, Root_Type_Only)));
557 Cc (E_Enumeration_Type, Enumeration_Kind,
558 -- Enumeration types, created by an enumeration type declaration
559 (Sm (Enum_Pos_To_Rep, Node_Id)));
561 Cc (E_Enumeration_Subtype, Enumeration_Kind);
562 -- Enumeration subtypes, created by an explicit or implicit subtype
563 -- declaration applied to an enumeration type or subtype.
565 Ab (Integer_Kind, Discrete_Kind,
566 (Sm (Has_Shift_Operator, Flag, Base_Type_Only)));
568 Ab (Signed_Integer_Kind, Integer_Kind);
570 Cc (E_Signed_Integer_Type, Signed_Integer_Kind);
571 -- Signed integer type, used for the anonymous base type of the
572 -- integer subtype created by an integer type declaration.
574 Cc (E_Signed_Integer_Subtype, Signed_Integer_Kind);
575 -- Signed integer subtype, created by either an integer subtype or
576 -- integer type declaration (in the latter case an integer type is
577 -- created for the base type, and this is the first named subtype).
579 Ab (Modular_Integer_Kind, Integer_Kind,
580 (Sm (Modulus, Uint, Base_Type_Only),
581 Sm (Original_Array_Type, Node_Id)));
583 Cc (E_Modular_Integer_Type, Modular_Integer_Kind);
584 -- Modular integer type, used for the anonymous base type of the
585 -- integer subtype created by a modular integer type declaration.
587 Cc (E_Modular_Integer_Subtype, Modular_Integer_Kind);
588 -- Modular integer subtype, created by either an modular subtype
589 -- or modular type declaration (in the latter case a modular type
590 -- is created for the base type, and this is the first named subtype).
592 Ab (Real_Kind, Scalar_Kind,
593 (Sm (Static_Real_Or_String_Predicate, Node_Id)));
595 Ab (Fixed_Point_Kind, Real_Kind,
596 (Sm (Delta_Value, Ureal),
597 Sm (Small_Value, Ureal)));
599 Ab (Ordinary_Fixed_Point_Kind, Fixed_Point_Kind,
600 (Sm (Has_Small_Clause, Flag)));
602 Cc (E_Ordinary_Fixed_Point_Type, Ordinary_Fixed_Point_Kind);
603 -- Ordinary fixed type, used for the anonymous base type of the fixed
604 -- subtype created by an ordinary fixed point type declaration.
606 Cc (E_Ordinary_Fixed_Point_Subtype, Ordinary_Fixed_Point_Kind);
607 -- Ordinary fixed point subtype, created by either an ordinary fixed
608 -- point subtype or ordinary fixed point type declaration (in the
609 -- latter case a fixed point type is created for the base type, and
610 -- this is the first named subtype).
612 Ab (Decimal_Fixed_Point_Kind, Fixed_Point_Kind,
613 (Sm (Digits_Value, Upos),
614 Sm (Has_Machine_Radix_Clause, Flag),
615 Sm (Machine_Radix_10, Flag),
616 Sm (Scale_Value, Uint)));
618 Cc (E_Decimal_Fixed_Point_Type, Decimal_Fixed_Point_Kind);
619 -- Decimal fixed type, used for the anonymous base type of the decimal
620 -- fixed subtype created by an ordinary fixed point type declaration.
622 Cc (E_Decimal_Fixed_Point_Subtype, Decimal_Fixed_Point_Kind);
623 -- Decimal fixed point subtype, created by either a decimal fixed point
624 -- subtype or decimal fixed point type declaration (in the latter case
625 -- a fixed point type is created for the base type, and this is the
626 -- first named subtype).
628 Ab (Float_Kind, Real_Kind,
629 (Sm (Digits_Value, Upos)));
631 Cc (E_Floating_Point_Type, Float_Kind);
632 -- Floating point type, used for the anonymous base type of the
633 -- floating point subtype created by a floating point type declaration.
635 Cc (E_Floating_Point_Subtype, Float_Kind);
636 -- Floating point subtype, created by either a floating point subtype
637 -- or floating point type declaration (in the latter case a floating
638 -- point type is created for the base type, and this is the first
639 -- named subtype).
641 Ab (Access_Kind, Elementary_Kind,
642 (Sm (Associated_Storage_Pool, Node_Id, Root_Type_Only),
643 Sm (Directly_Designated_Type, Node_Id),
644 Sm (Finalization_Collection, Node_Id, Root_Type_Only),
645 Sm (Has_Pragma_Controlled, Flag, Impl_Base_Type_Only),
646 Sm (Has_Storage_Size_Clause, Flag, Impl_Base_Type_Only),
647 Sm (Is_Access_Constant, Flag),
648 Sm (Is_Local_Anonymous_Access, Flag),
649 Sm (Is_Param_Block_Component_Type, Flag, Base_Type_Only),
650 Sm (Is_Pure_Unit_Access_Type, Flag),
651 Sm (Master_Id, Node_Id),
652 Sm (No_Pool_Assigned, Flag, Root_Type_Only),
653 Sm (No_Strict_Aliasing, Flag, Base_Type_Only),
654 Sm (Storage_Size_Variable, Node_Id, Impl_Base_Type_Only)));
656 Cc (E_Access_Type, Access_Kind);
657 -- An access type created by an access type declaration with no all
658 -- keyword present.
660 Cc (E_Access_Subtype, Access_Kind);
661 -- An access subtype created by a subtype declaration for any access
662 -- type (whether or not it is a general access type).
664 Cc (E_Access_Attribute_Type, Access_Kind);
665 -- An access type created for an access attribute (one of 'Access,
666 -- 'Unrestricted_Access, or Unchecked_Access).
668 Cc (E_Allocator_Type, Access_Kind);
669 -- A special internal type used to label allocators and references to
670 -- objects using 'Reference. This is needed because special resolution
671 -- rules apply to these constructs. On the resolution pass, this type
672 -- is almost always replaced by the actual access type, but if the
673 -- context does not provide one, the backend will see Allocator_Type
674 -- itself (which will already have been frozen).
676 Cc (E_General_Access_Type, Access_Kind);
677 -- An access type created by an access type declaration with the all
678 -- keyword present.
680 Ab (Access_Subprogram_Kind, Access_Kind);
682 Cc (E_Access_Subprogram_Type, Access_Subprogram_Kind,
683 -- An access-to-subprogram type, created by an access-to-subprogram
684 -- declaration.
685 (Sm (Equivalent_Type, Node_Id),
686 Sm (Original_Access_Type, Node_Id)));
688 Ab (Access_Protected_Kind, Access_Subprogram_Kind,
689 (Sm (Equivalent_Type, Node_Id)));
691 Cc (E_Access_Protected_Subprogram_Type, Access_Protected_Kind);
692 -- An access to a protected subprogram, created by the corresponding
693 -- declaration. Values of such a type denote both a protected object
694 -- and a protected operation within, and have different compile-time
695 -- and run-time properties than other access-to-subprogram values.
697 Cc (E_Anonymous_Access_Protected_Subprogram_Type, Access_Protected_Kind);
698 -- An anonymous access-to-protected-subprogram type, created by an
699 -- access-to-subprogram declaration.
701 Cc (E_Anonymous_Access_Subprogram_Type, Access_Subprogram_Kind);
702 -- An anonymous access-to-subprogram type, created by an access-to-
703 -- subprogram declaration, or generated for a current instance of
704 -- a type name appearing within a component definition that has an
705 -- anonymous access-to-subprogram type.
707 Cc (E_Anonymous_Access_Type, Access_Kind);
708 -- An anonymous access-to-object type
710 Ab (Composite_Kind, Type_Kind,
711 (Sm (Discriminant_Constraint, Elist_Id,
712 Pre_Get => "Has_Discriminants (N) or else Is_Constrained (N)")));
714 Ab (Aggregate_Kind, Composite_Kind,
715 (Sm (Component_Alignment, Component_Alignment_Kind, Base_Type_Only),
716 Sm (Has_Pragma_Pack, Flag, Impl_Base_Type_Only),
717 Sm (Reverse_Storage_Order, Flag, Base_Type_Only),
718 Sm (SSO_Set_High_By_Default, Flag, Base_Type_Only),
719 Sm (SSO_Set_Low_By_Default, Flag, Base_Type_Only)));
721 Ab (Array_Kind, Aggregate_Kind,
722 (Sm (Component_Size, Uint, Impl_Base_Type_Only),
723 Sm (Component_Type, Node_Id, Impl_Base_Type_Only),
724 Sm (Default_Aspect_Component_Value, Node_Id, Base_Type_Only),
725 Sm (First_Index, Node_Id),
726 Sm (Has_Component_Size_Clause, Flag, Impl_Base_Type_Only),
727 Sm (Original_Array_Type, Node_Id),
728 Sm (Packed_Array_Impl_Type, Node_Id),
729 Sm (Related_Array_Object, Node_Id)));
731 Cc (E_Array_Type, Array_Kind,
732 -- An array type created by an array type declaration. Includes all
733 -- cases of arrays, except for string types.
734 (Sm (Static_Real_Or_String_Predicate, Node_Id)));
736 Cc (E_Array_Subtype, Array_Kind,
737 -- An array subtype, created by an explicit array subtype declaration,
738 -- or the use of an anonymous array subtype.
739 (Sm (Predicated_Parent, Node_Id),
740 Sm (Static_Real_Or_String_Predicate, Node_Id)));
742 Cc (E_String_Literal_Subtype, Array_Kind,
743 -- A special string subtype, used only to describe the type of a string
744 -- literal (will always be one dimensional, with literal bounds).
745 (Sm (String_Literal_Length, Unat),
746 Sm (String_Literal_Low_Bound, Node_Id)));
748 Ab (Class_Wide_Kind, Aggregate_Kind,
749 (Sm (C_Pass_By_Copy, Flag, Impl_Base_Type_Only),
750 Sm (Equivalent_Type, Node_Id),
751 Sm (Has_Complex_Representation, Flag, Impl_Base_Type_Only),
752 Sm (Has_Record_Rep_Clause, Flag, Impl_Base_Type_Only),
753 Sm (Interfaces, Elist_Id),
754 Sm (No_Reordering, Flag, Impl_Base_Type_Only),
755 Sm (Non_Limited_View, Node_Id),
756 Sm (Parent_Subtype, Node_Id, Base_Type_Only),
757 Sm (Reverse_Bit_Order, Flag, Base_Type_Only)));
759 Cc (E_Class_Wide_Type, Class_Wide_Kind,
760 -- A class wide type, created by any tagged type declaration (i.e. if
761 -- a tagged type is declared, the corresponding class type is always
762 -- created, using this Ekind value).
763 (Sm (Corresponding_Remote_Type, Node_Id),
764 Sm (Scalar_Range, Node_Id)));
766 Cc (E_Class_Wide_Subtype, Class_Wide_Kind,
767 -- A subtype of a class wide type, created by a subtype declaration
768 -- used to declare a subtype of a class type.
769 (Sm (Cloned_Subtype, Node_Id)));
771 Cc (E_Record_Type, Aggregate_Kind,
772 -- A record type, created by a record type declaration
773 (Sm (Access_Disp_Table, Elist_Id, Impl_Base_Type_Only),
774 Sm (Access_Disp_Table_Elab_Flag, Node_Id, Impl_Base_Type_Only),
775 Sm (C_Pass_By_Copy, Flag, Impl_Base_Type_Only),
776 Sm (Corresponding_Concurrent_Type, Node_Id),
777 Sm (Corresponding_Remote_Type, Node_Id),
778 Sm (Dispatch_Table_Wrappers, Elist_Id, Impl_Base_Type_Only),
779 Sm (Has_Complex_Representation, Flag, Impl_Base_Type_Only),
780 Sm (Has_Record_Rep_Clause, Flag, Impl_Base_Type_Only),
781 Sm (Interfaces, Elist_Id),
782 Sm (No_Reordering, Flag, Impl_Base_Type_Only),
783 Sm (Parent_Subtype, Node_Id, Base_Type_Only),
784 Sm (Reverse_Bit_Order, Flag, Base_Type_Only),
785 Sm (Underlying_Record_View, Node_Id)));
787 Cc (E_Record_Subtype, Aggregate_Kind,
788 -- A record subtype, created by a record subtype declaration
789 (Sm (Access_Disp_Table, Elist_Id, Impl_Base_Type_Only),
790 Sm (Access_Disp_Table_Elab_Flag, Node_Id, Impl_Base_Type_Only),
791 Sm (C_Pass_By_Copy, Flag, Impl_Base_Type_Only),
792 Sm (Cloned_Subtype, Node_Id),
793 Sm (Corresponding_Remote_Type, Node_Id),
794 Sm (Predicated_Parent, Node_Id),
795 Sm (Dispatch_Table_Wrappers, Elist_Id, Impl_Base_Type_Only),
796 Sm (Has_Complex_Representation, Flag, Impl_Base_Type_Only),
797 Sm (Has_Record_Rep_Clause, Flag, Impl_Base_Type_Only),
798 Sm (Interfaces, Elist_Id),
799 Sm (No_Reordering, Flag, Impl_Base_Type_Only),
800 Sm (Parent_Subtype, Node_Id, Base_Type_Only),
801 Sm (Reverse_Bit_Order, Flag, Base_Type_Only),
802 Sm (Underlying_Record_View, Node_Id)));
804 Ab (Incomplete_Or_Private_Kind, Composite_Kind,
805 (Sm (Private_Dependents, Elist_Id)));
807 Ab (Private_Kind, Incomplete_Or_Private_Kind,
808 (Sm (Underlying_Full_View, Node_Id)));
810 Cc (E_Record_Type_With_Private, Private_Kind,
811 -- Used for types defined by a private extension declaration,
812 -- and for tagged private types. Includes the fields for both
813 -- private types and for record types (with the sole exception of
814 -- Corresponding_Concurrent_Type which is obviously not needed). This
815 -- entity is considered to be both a record type and a private type.
816 (Sm (Access_Disp_Table, Elist_Id, Impl_Base_Type_Only),
817 Sm (Access_Disp_Table_Elab_Flag, Node_Id, Impl_Base_Type_Only),
818 Sm (C_Pass_By_Copy, Flag, Impl_Base_Type_Only),
819 Sm (Component_Alignment, Component_Alignment_Kind, Base_Type_Only),
820 Sm (Corresponding_Remote_Type, Node_Id),
821 Sm (Has_Complex_Representation, Flag, Impl_Base_Type_Only),
822 Sm (Has_Pragma_Pack, Flag, Impl_Base_Type_Only),
823 Sm (Has_Record_Rep_Clause, Flag, Impl_Base_Type_Only),
824 Sm (Interfaces, Elist_Id),
825 Sm (No_Reordering, Flag, Impl_Base_Type_Only),
826 Sm (Parent_Subtype, Node_Id, Base_Type_Only),
827 Sm (Reverse_Bit_Order, Flag, Base_Type_Only),
828 Sm (Reverse_Storage_Order, Flag, Base_Type_Only),
829 Sm (SSO_Set_High_By_Default, Flag, Base_Type_Only),
830 Sm (SSO_Set_Low_By_Default, Flag, Base_Type_Only),
831 Sm (Underlying_Record_View, Node_Id)));
833 Cc (E_Record_Subtype_With_Private, Private_Kind,
834 -- A subtype of a type defined by a private extension declaration
835 (Sm (C_Pass_By_Copy, Flag, Impl_Base_Type_Only),
836 Sm (Component_Alignment, Component_Alignment_Kind, Base_Type_Only),
837 Sm (Corresponding_Remote_Type, Node_Id),
838 Sm (Predicated_Parent, Node_Id),
839 Sm (Has_Complex_Representation, Flag, Impl_Base_Type_Only),
840 Sm (Has_Pragma_Pack, Flag, Impl_Base_Type_Only),
841 Sm (Has_Record_Rep_Clause, Flag, Impl_Base_Type_Only),
842 Sm (Interfaces, Elist_Id),
843 Sm (No_Reordering, Flag, Impl_Base_Type_Only),
844 Sm (Parent_Subtype, Node_Id, Base_Type_Only),
845 Sm (Reverse_Bit_Order, Flag, Base_Type_Only),
846 Sm (Reverse_Storage_Order, Flag, Base_Type_Only),
847 Sm (SSO_Set_High_By_Default, Flag, Base_Type_Only),
848 Sm (SSO_Set_Low_By_Default, Flag, Base_Type_Only)));
850 Cc (E_Private_Type, Private_Kind,
851 -- A private type, created by a private type declaration that has
852 -- neither the keyword limited nor the keyword tagged.
853 (Sm (Scalar_Range, Node_Id),
854 Sm (Scope_Depth_Value, Unat)));
856 Cc (E_Private_Subtype, Private_Kind,
857 -- A subtype of a private type, created by a subtype declaration used
858 -- to declare a subtype of a private type.
859 (Sm (Scope_Depth_Value, Unat)));
861 Cc (E_Limited_Private_Type, Private_Kind,
862 -- A limited private type, created by a private type declaration that
863 -- has the keyword limited, but not the keyword tagged.
864 (Sm (Scalar_Range, Node_Id),
865 Sm (Scope_Depth_Value, Unat)));
867 Cc (E_Limited_Private_Subtype, Private_Kind,
868 -- A subtype of a limited private type, created by a subtype declaration
869 -- used to declare a subtype of a limited private type.
870 (Sm (Scope_Depth_Value, Unat)));
872 Ab (Incomplete_Kind, Incomplete_Or_Private_Kind,
873 (Sm (Non_Limited_View, Node_Id)));
875 Cc (E_Incomplete_Type, Incomplete_Kind,
876 -- An incomplete type, created by an incomplete type declaration
877 (Sm (Scalar_Range, Node_Id)));
879 Cc (E_Incomplete_Subtype, Incomplete_Kind);
880 -- An incomplete subtype, created by a subtype declaration where the
881 -- subtype mark denotes an incomplete type.
883 Ab (Concurrent_Kind, Composite_Kind,
884 (Sm (Corresponding_Record_Type, Node_Id),
885 Sm (First_Private_Entity, Node_Id),
886 Sm (Scope_Depth_Value, Unat)));
888 Ab (Task_Kind, Concurrent_Kind,
889 (Sm (Has_Storage_Size_Clause, Flag, Impl_Base_Type_Only),
890 Sm (Is_Elaboration_Checks_OK_Id, Flag),
891 Sm (Is_Elaboration_Warnings_OK_Id, Flag),
892 Sm (Relative_Deadline_Variable, Node_Id, Impl_Base_Type_Only),
893 Sm (Storage_Size_Variable, Node_Id, Impl_Base_Type_Only),
894 Sm (Task_Body_Procedure, Node_Id)));
896 Cc (E_Task_Type, Task_Kind,
897 -- A task type, created by a task type declaration. An entity with this
898 -- Ekind is also created to describe the anonymous type of a task that
899 -- is created by a single task declaration.
900 (Sm (Anonymous_Object, Node_Id),
901 Sm (Ignore_SPARK_Mode_Pragmas, Flag),
902 Sm (SPARK_Aux_Pragma, Node_Id),
903 Sm (SPARK_Aux_Pragma_Inherited, Flag)));
905 Cc (E_Task_Subtype, Task_Kind);
906 -- A subtype of a task type, created by a subtype declaration used to
907 -- declare a subtype of a task type.
909 Ab (Protected_Kind, Concurrent_Kind,
910 (Sm (Entry_Bodies_Array, Node_Id,
911 Pre => "Has_Entries (N)"),
912 Sm (Uses_Lock_Free, Flag)));
914 Cc (E_Protected_Type, Protected_Kind,
915 -- A protected type, created by a protected type declaration. An entity
916 -- with this Ekind is also created to describe the anonymous type of
917 -- a protected object created by a single protected declaration.
918 (Sm (Anonymous_Object, Node_Id),
919 Sm (Entry_Max_Queue_Lengths_Array, Node_Id),
920 Sm (Ignore_SPARK_Mode_Pragmas, Flag),
921 Sm (SPARK_Aux_Pragma, Node_Id),
922 Sm (SPARK_Aux_Pragma_Inherited, Flag)));
924 Cc (E_Protected_Subtype, Protected_Kind);
925 -- A subtype of a protected type, created by a subtype declaration used
926 -- to declare a subtype of a protected type.
928 Cc (E_Exception_Type, Type_Kind,
929 -- The type of an exception created by an exception declaration
930 (Sm (Equivalent_Type, Node_Id)));
932 Cc (E_Subprogram_Type, Type_Kind,
933 -- This is the designated type of an Access_To_Subprogram. Has type and
934 -- signature like a subprogram entity, so can appear in calls, which
935 -- are resolved like regular calls, except that such an entity is not
936 -- overloadable.
937 (Sm (Access_Subprogram_Wrapper, Node_Id),
938 Sm (Extra_Accessibility_Of_Result, Node_Id),
939 Sm (Extra_Formals, Node_Id),
940 Sm (Needs_No_Actuals, Flag)));
942 Ab (Overloadable_Kind, Entity_Kind,
943 (Sm (Renamed_Or_Alias, Node_Id),
944 Sm (Extra_Formals, Node_Id),
945 Sm (Is_Abstract_Subprogram, Flag),
946 Sm (Is_Primitive, Flag),
947 Sm (Needs_No_Actuals, Flag),
948 Sm (Requires_Overriding, Flag)));
950 Cc (E_Enumeration_Literal, Overloadable_Kind,
951 -- An enumeration literal, created by the use of the literal in an
952 -- enumeration type definition.
953 (Sm (Enumeration_Pos, Unat),
954 Sm (Enumeration_Rep, Valid_Uint),
955 Sm (Enumeration_Rep_Expr, Node_Id),
956 Sm (Esize, Uint),
957 Sm (Alignment, Unat),
958 Sm (Interface_Name, Node_Id)));
960 Ab (Subprogram_Kind, Overloadable_Kind,
961 (Sm (Body_Needed_For_SAL, Flag),
962 Sm (Class_Postconditions, Node_Id),
963 Sm (Class_Preconditions, Node_Id),
964 Sm (Class_Preconditions_Subprogram, Node_Id),
965 Sm (Contract, Node_Id),
966 Sm (Dynamic_Call_Helper, Node_Id),
967 Sm (Elaboration_Entity, Node_Id),
968 Sm (Elaboration_Entity_Required, Flag),
969 Sm (First_Entity, Node_Id),
970 Sm (Has_Expanded_Contract, Flag),
971 Sm (Has_Nested_Subprogram, Flag),
972 Sm (Has_Out_Or_In_Out_Parameter, Flag),
973 Sm (Has_Recursive_Call, Flag),
974 Sm (Ignored_Class_Postconditions, Node_Id),
975 Sm (Ignored_Class_Preconditions, Node_Id),
976 Sm (Ignore_SPARK_Mode_Pragmas, Flag),
977 Sm (Import_Pragma, Node_Id),
978 Sm (Indirect_Call_Wrapper, Node_Id),
979 Sm (Interface_Alias, Node_Id),
980 Sm (Interface_Name, Node_Id),
981 Sm (Is_Elaboration_Checks_OK_Id, Flag),
982 Sm (Is_Elaboration_Warnings_OK_Id, Flag),
983 Sm (Is_Machine_Code_Subprogram, Flag),
984 Sm (Last_Entity, Node_Id),
985 Sm (Linker_Section_Pragma, Node_Id),
986 Sm (Overridden_Operation, Node_Id),
987 Sm (Protected_Body_Subprogram, Node_Id),
988 Sm (Scope_Depth_Value, Unat),
989 Sm (Static_Call_Helper, Node_Id),
990 Sm (SPARK_Pragma, Node_Id),
991 Sm (SPARK_Pragma_Inherited, Flag),
992 Sm (Subps_Index, Unat)));
994 Cc (E_Function, Subprogram_Kind,
995 -- A function, created by a function declaration or a function body
996 -- that acts as its own declaration.
997 (Sm (Anonymous_Collections, Elist_Id),
998 Sm (Corresponding_Equality, Node_Id,
999 Pre => "not Comes_From_Source (N) and then Chars (N) = Name_Op_Ne"),
1000 Sm (Corresponding_Procedure, Node_Id),
1001 Sm (DT_Position, Uint,
1002 Pre_Get => "Present (DTC_Entity (N))"),
1003 Sm (DTC_Entity, Node_Id),
1004 Sm (Extra_Accessibility_Of_Result, Node_Id),
1005 Sm (Generic_Renamings, Elist_Id),
1006 Sm (Handler_Records, List_Id),
1007 Sm (Has_Missing_Return, Flag),
1008 Sm (Inner_Instances, Elist_Id),
1009 Sm (Is_Called, Flag),
1010 Sm (Is_CUDA_Kernel, Flag),
1011 Sm (Is_DIC_Procedure, Flag),
1012 Sm (Is_Generic_Actual_Subprogram, Flag),
1013 Sm (Is_Initial_Condition_Procedure, Flag),
1014 Sm (Is_Inlined_Always, Flag),
1015 Sm (Is_Invariant_Procedure, Flag),
1016 Sm (Is_Partial_Invariant_Procedure, Flag),
1017 Sm (Is_Predicate_Function, Flag),
1018 Sm (Is_Primitive_Wrapper, Flag),
1019 Sm (Is_Private_Primitive, Flag),
1020 Sm (LSP_Subprogram, Node_Id),
1021 Sm (Mechanism, Mechanism_Type),
1022 Sm (Next_Inlined_Subprogram, Node_Id),
1023 Sm (Original_Protected_Subprogram, Node_Id),
1024 Sm (Predicate_Expression, Node_Id),
1025 Sm (Protected_Subprogram, Node_Id),
1026 Sm (Protection_Object, Node_Id),
1027 Sm (Related_Expression, Node_Id),
1028 Sm (Rewritten_For_C, Flag),
1029 Sm (Thunk_Entity, Node_Id,
1030 Pre => "Is_Thunk (N)"),
1031 Sm (Wrapped_Entity, Node_Id,
1032 Pre => "Is_Primitive_Wrapper (N)"),
1033 Sm (Wrapped_Statements, Node_Id)));
1035 Cc (E_Operator, Subprogram_Kind,
1036 -- A predefined operator, appearing in Standard, or an implicitly
1037 -- defined concatenation operator created whenever an array is declared.
1038 -- We do not make normal derived operators explicit in the tree, but the
1039 -- concatenation operators are made explicit.
1040 (Sm (Extra_Accessibility_Of_Result, Node_Id),
1041 Sm (LSP_Subprogram, Node_Id)));
1043 Cc (E_Procedure, Subprogram_Kind,
1044 -- A procedure, created by a procedure declaration or a procedure
1045 -- body that acts as its own declaration.
1046 (Sm (Anonymous_Collections, Elist_Id),
1047 Sm (Associated_Node_For_Itype, Node_Id),
1048 Sm (Corresponding_Function, Node_Id),
1049 Sm (DT_Position, Uint,
1050 Pre_Get => "Present (DTC_Entity (N))"),
1051 Sm (DTC_Entity, Node_Id),
1052 Sm (Entry_Parameters_Type, Node_Id),
1053 Sm (Generic_Renamings, Elist_Id),
1054 Sm (Handler_Records, List_Id),
1055 Sm (Inner_Instances, Elist_Id),
1056 Sm (Is_Asynchronous, Flag),
1057 Sm (Is_Called, Flag),
1058 Sm (Is_CUDA_Kernel, Flag),
1059 Sm (Is_DIC_Procedure, Flag),
1060 Sm (Is_Generic_Actual_Subprogram, Flag),
1061 Sm (Is_Initial_Condition_Procedure, Flag),
1062 Sm (Is_Inlined_Always, Flag),
1063 Sm (Is_Invariant_Procedure, Flag),
1064 Sm (Is_Null_Init_Proc, Flag),
1065 Sm (Is_Partial_Invariant_Procedure, Flag),
1066 Sm (Is_Predicate_Function, Flag),
1067 Sm (Is_Primitive_Wrapper, Flag),
1068 Sm (Is_Private_Primitive, Flag),
1069 Sm (Is_Valued_Procedure, Flag),
1070 Sm (LSP_Subprogram, Node_Id),
1071 Sm (Next_Inlined_Subprogram, Node_Id),
1072 Sm (Original_Protected_Subprogram, Node_Id),
1073 Sm (Protected_Subprogram, Node_Id),
1074 Sm (Protection_Object, Node_Id),
1075 Sm (Receiving_Entry, Node_Id),
1076 Sm (Static_Initialization, Node_Id,
1077 Pre => "not Is_Dispatching_Operation (N)"),
1078 Sm (Thunk_Entity, Node_Id,
1079 Pre => "Is_Thunk (N)"),
1080 Sm (Wrapped_Entity, Node_Id,
1081 Pre => "Is_Primitive_Wrapper (N)"),
1082 Sm (Wrapped_Statements, Node_Id)));
1084 Cc (E_Abstract_State, Overloadable_Kind,
1085 -- A state abstraction. Used to designate entities introduced by aspect
1086 -- or pragma Abstract_State. The entity carries the various properties
1087 -- of the state.
1088 (Sm (Body_References, Elist_Id),
1089 Sm (Encapsulating_State, Node_Id),
1090 Sm (First_Entity, Node_Id),
1091 Sm (Has_Partial_Visible_Refinement, Flag),
1092 Sm (Has_Visible_Refinement, Flag),
1093 Sm (Non_Limited_View, Node_Id),
1094 Sm (Part_Of_Constituents, Elist_Id),
1095 Sm (Refinement_Constituents, Elist_Id),
1096 Sm (SPARK_Pragma, Node_Id),
1097 Sm (SPARK_Pragma_Inherited, Flag)));
1099 Cc (E_Entry, Overloadable_Kind,
1100 -- An entry, created by an entry declaration in a task or protected
1101 -- object.
1102 (Sm (Accept_Address, Elist_Id),
1103 Sm (Barrier_Function, Node_Id),
1104 Sm (Contract, Node_Id),
1105 Sm (Contract_Wrapper, Node_Id),
1106 Sm (Elaboration_Entity, Node_Id),
1107 Sm (Elaboration_Entity_Required, Flag),
1108 Sm (Entry_Accepted, Flag),
1109 Sm (Entry_Parameters_Type, Node_Id),
1110 Sm (First_Entity, Node_Id),
1111 Sm (Has_Out_Or_In_Out_Parameter, Flag),
1112 Sm (Ignore_SPARK_Mode_Pragmas, Flag),
1113 Sm (Is_Elaboration_Checks_OK_Id, Flag),
1114 Sm (Is_Elaboration_Warnings_OK_Id, Flag),
1115 Sm (Last_Entity, Node_Id),
1116 Sm (Protected_Body_Subprogram, Node_Id),
1117 Sm (Protection_Object, Node_Id),
1118 Sm (Scope_Depth_Value, Unat),
1119 Sm (SPARK_Pragma, Node_Id),
1120 Sm (SPARK_Pragma_Inherited, Flag),
1121 Sm (Wrapped_Statements, Node_Id)));
1123 Cc (E_Entry_Family, Entity_Kind,
1124 -- An entry family, created by an entry family declaration in a
1125 -- task or protected type definition.
1126 (Sm (Accept_Address, Elist_Id),
1127 Sm (Barrier_Function, Node_Id),
1128 Sm (Contract, Node_Id),
1129 Sm (Contract_Wrapper, Node_Id),
1130 Sm (Elaboration_Entity, Node_Id),
1131 Sm (Elaboration_Entity_Required, Flag),
1132 Sm (Entry_Accepted, Flag),
1133 Sm (Entry_Parameters_Type, Node_Id),
1134 Sm (Extra_Formals, Node_Id),
1135 Sm (First_Entity, Node_Id),
1136 Sm (Has_Out_Or_In_Out_Parameter, Flag),
1137 Sm (Ignore_SPARK_Mode_Pragmas, Flag),
1138 Sm (Is_Elaboration_Checks_OK_Id, Flag),
1139 Sm (Is_Elaboration_Warnings_OK_Id, Flag),
1140 Sm (Last_Entity, Node_Id),
1141 Sm (Needs_No_Actuals, Flag),
1142 Sm (Protected_Body_Subprogram, Node_Id),
1143 Sm (Protection_Object, Node_Id),
1144 Sm (Renamed_Or_Alias, Node_Id),
1145 Sm (Scope_Depth_Value, Unat),
1146 Sm (SPARK_Pragma, Node_Id),
1147 Sm (SPARK_Pragma_Inherited, Flag),
1148 Sm (Wrapped_Statements, Node_Id)));
1150 Cc (E_Block, Entity_Kind,
1151 -- A block identifier, created by an explicit or implicit label on
1152 -- a block or declare statement.
1153 (Sm (Block_Node, Node_Id),
1154 Sm (Entry_Cancel_Parameter, Node_Id),
1155 Sm (First_Entity, Node_Id),
1156 Sm (Is_Exception_Handler, Flag),
1157 Sm (Last_Entity, Node_Id),
1158 Sm (Renamed_Or_Alias, Node_Id),
1159 Sm (Return_Applies_To, Node_Id),
1160 Sm (Scope_Depth_Value, Unat)));
1162 Cc (E_Entry_Index_Parameter, Entity_Kind,
1163 -- An entry index parameter created by an entry index specification
1164 -- for the body of a protected entry family.
1165 (Sm (Entry_Index_Constant, Node_Id)));
1167 Cc (E_Exception, Exception_Or_Object_Kind,
1168 -- An exception created by an exception declaration. The exception
1169 -- itself uses E_Exception for the Ekind, the implicit type that is
1170 -- created to represent its type uses the Ekind E_Exception_Type.
1171 (Sm (Alignment, Unat),
1172 Sm (Esize, Uint),
1173 Sm (Interface_Name, Node_Id),
1174 Sm (Is_Raised, Flag),
1175 Sm (Register_Exception_Call, Node_Id),
1176 Sm (Renamed_Or_Alias, Node_Id)));
1178 Ab (Generic_Unit_Kind, Entity_Kind,
1179 (Sm (Body_Needed_For_SAL, Flag),
1180 Sm (Contract, Node_Id),
1181 Sm (Elaboration_Entity, Node_Id),
1182 Sm (Elaboration_Entity_Required, Flag),
1183 Sm (First_Entity, Node_Id),
1184 Sm (Ignore_SPARK_Mode_Pragmas, Flag),
1185 Sm (Inner_Instances, Elist_Id),
1186 Sm (Interface_Name, Node_Id),
1187 Sm (Is_Elaboration_Checks_OK_Id, Flag),
1188 Sm (Is_Elaboration_Warnings_OK_Id, Flag),
1189 Sm (Last_Entity, Node_Id),
1190 Sm (Renamed_Or_Alias, Node_Id),
1191 Sm (Scope_Depth_Value, Unat),
1192 Sm (SPARK_Pragma, Node_Id),
1193 Sm (SPARK_Pragma_Inherited, Flag)));
1195 Ab (Generic_Subprogram_Kind, Generic_Unit_Kind,
1196 (Sm (Has_Out_Or_In_Out_Parameter, Flag),
1197 Sm (Is_Primitive, Flag),
1198 Sm (Next_Inlined_Subprogram, Node_Id),
1199 Sm (Overridden_Operation, Node_Id)));
1201 Cc (E_Generic_Function, Generic_Subprogram_Kind,
1202 -- A generic function. This is the entity for a generic function
1203 -- created by a generic subprogram declaration.
1204 (Sm (Has_Missing_Return, Flag)));
1206 Cc (E_Generic_Procedure, Generic_Subprogram_Kind);
1207 -- A generic function. This is the entity for a generic procedure
1208 -- created by a generic subprogram declaration.
1210 Cc (E_Generic_Package, Generic_Unit_Kind,
1211 -- A generic package, this is the entity for a generic package created
1212 -- by a generic package declaration.
1213 (Sm (Abstract_States, Elist_Id),
1214 Sm (Body_Entity, Node_Id),
1215 Sm (First_Private_Entity, Node_Id),
1216 Sm (Generic_Homonym, Node_Id),
1217 Sm (Package_Instantiation, Node_Id),
1218 Sm (SPARK_Aux_Pragma, Node_Id),
1219 Sm (SPARK_Aux_Pragma_Inherited, Flag)));
1221 Cc (E_Label, Entity_Kind,
1222 -- The defining entity for a label. Note that this is created by the
1223 -- implicit label declaration, not the occurrence of the label itself,
1224 -- which is simply a direct name referring to the label.
1225 (Sm (Enclosing_Scope, Node_Id),
1226 Sm (Entry_Cancel_Parameter, Node_Id),
1227 Sm (Reachable, Flag),
1228 Sm (Renamed_Or_Alias, Node_Id)));
1230 Cc (E_Loop, Entity_Kind,
1231 -- A loop identifier, created by an explicit or implicit label on a
1232 -- loop statement.
1233 (Sm (First_Entity, Node_Id),
1234 Sm (First_Exit_Statement, Node_Id),
1235 Sm (Has_Loop_Entry_Attributes, Flag),
1236 Sm (Last_Entity, Node_Id),
1237 Sm (Renamed_Or_Alias, Node_Id),
1238 Sm (Scope_Depth_Value, Unat)));
1240 Cc (E_Return_Statement, Entity_Kind,
1241 -- A dummy entity created for each return statement. Used to hold
1242 -- information about the return statement (what it applies to) and in
1243 -- rules checking. For example, a simple_return_statement that applies
1244 -- to an extended_return_statement cannot have an expression; this
1245 -- requires putting the E_Return_Statement entity for the
1246 -- extended_return_statement on the scope stack.
1247 (Sm (First_Entity, Node_Id),
1248 Sm (Last_Entity, Node_Id),
1249 Sm (Return_Applies_To, Node_Id),
1250 Sm (Scope_Depth_Value, Unat)));
1252 Cc (E_Package, Entity_Kind,
1253 -- A package, created by a package declaration
1254 (Sm (Abstract_States, Elist_Id),
1255 Sm (Anonymous_Collections, Elist_Id),
1256 Sm (Associated_Formal_Package, Node_Id),
1257 Sm (Body_Entity, Node_Id),
1258 Sm (Body_Needed_For_Inlining, Flag),
1259 Sm (Body_Needed_For_SAL, Flag),
1260 Sm (Contract, Node_Id),
1261 Sm (Current_Use_Clause, Node_Id),
1262 Sm (Dependent_Instances, Elist_Id,
1263 Pre => "Is_Generic_Instance (N)"),
1264 Sm (Elaborate_Body_Desirable, Flag),
1265 Sm (Elaboration_Entity, Node_Id),
1266 Sm (Elaboration_Entity_Required, Flag),
1267 Sm (Finalizer, Node_Id),
1268 Sm (First_Entity, Node_Id),
1269 Sm (First_Private_Entity, Node_Id),
1270 Sm (Generic_Renamings, Elist_Id),
1271 Sm (Handler_Records, List_Id),
1272 Sm (Has_RACW, Flag),
1273 Sm (Hidden_In_Formal_Instance, Elist_Id),
1274 Sm (Ignore_SPARK_Mode_Pragmas, Flag),
1275 Sm (Incomplete_Actuals, Elist_Id),
1276 Sm (Inner_Instances, Elist_Id),
1277 Sm (Interface_Name, Node_Id),
1278 Sm (Is_Called, Flag),
1279 Sm (Is_Elaboration_Checks_OK_Id, Flag),
1280 Sm (Is_Elaboration_Warnings_OK_Id, Flag),
1281 Sm (Last_Entity, Node_Id),
1282 Sm (Limited_View, Node_Id),
1283 Sm (Package_Instantiation, Node_Id),
1284 Sm (Related_Instance, Node_Id),
1285 Sm (Renamed_In_Spec, Flag),
1286 Sm (Renamed_Or_Alias, Node_Id),
1287 Sm (Scope_Depth_Value, Unat),
1288 Sm (SPARK_Aux_Pragma, Node_Id),
1289 Sm (SPARK_Aux_Pragma_Inherited, Flag),
1290 Sm (SPARK_Pragma, Node_Id),
1291 Sm (SPARK_Pragma_Inherited, Flag),
1292 Sm (Static_Elaboration_Desired, Flag)));
1294 Cc (E_Package_Body, Entity_Kind,
1295 -- A package body. This entity serves only limited functions, since
1296 -- most semantic analysis uses the package entity (E_Package). However
1297 -- there are some attributes that are significant for the body entity.
1298 -- For example, collection of exception handlers.
1299 (Sm (Contract, Node_Id),
1300 Sm (Finalizer, Node_Id),
1301 Sm (First_Entity, Node_Id),
1302 Sm (Handler_Records, List_Id),
1303 Sm (Ignore_SPARK_Mode_Pragmas, Flag),
1304 Sm (Last_Entity, Node_Id),
1305 Sm (Related_Instance, Node_Id),
1306 Sm (Renamed_Or_Alias, Node_Id),
1307 Sm (Scope_Depth_Value, Unat),
1308 Sm (SPARK_Aux_Pragma, Node_Id),
1309 Sm (SPARK_Aux_Pragma_Inherited, Flag),
1310 Sm (SPARK_Pragma, Node_Id),
1311 Sm (SPARK_Pragma_Inherited, Flag),
1312 Sm (Spec_Entity, Node_Id)));
1314 Ab (Concurrent_Body_Kind, Entity_Kind,
1315 (Sm (Ignore_SPARK_Mode_Pragmas, Flag),
1316 Sm (SPARK_Pragma, Node_Id),
1317 Sm (SPARK_Pragma_Inherited, Flag)));
1319 Cc (E_Protected_Body, Concurrent_Body_Kind);
1320 -- A protected body. This entity serves almost no function, since all
1321 -- semantic analysis uses the protected entity (E_Protected_Type).
1323 Cc (E_Task_Body, Concurrent_Body_Kind,
1324 -- A task body. This entity serves almost no function, since all
1325 -- semantic analysis uses the protected entity (E_Task_Type).
1326 (Sm (Contract, Node_Id),
1327 Sm (First_Entity, Node_Id)));
1329 Cc (E_Subprogram_Body, Entity_Kind,
1330 -- A subprogram body. Used when a subprogram has a separate declaration
1331 -- to represent the entity for the body. This entity serves almost no
1332 -- function, since all semantic analysis uses the subprogram entity
1333 -- for the declaration (E_Function or E_Procedure).
1334 (Sm (Anonymous_Collections, Elist_Id),
1335 Sm (Contract, Node_Id),
1336 Sm (Extra_Formals, Node_Id),
1337 Sm (First_Entity, Node_Id),
1338 Sm (Ignore_SPARK_Mode_Pragmas, Flag),
1339 Sm (Interface_Name, Node_Id),
1340 Sm (Last_Entity, Node_Id),
1341 Sm (Renamed_Or_Alias, Node_Id),
1342 Sm (Scope_Depth_Value, Unat),
1343 Sm (SPARK_Pragma, Node_Id),
1344 Sm (SPARK_Pragma_Inherited, Flag)));
1346 -- Union types. These don't fit into the normal parent/child hierarchy
1347 -- above.
1349 Union (Anonymous_Access_Kind,
1350 Children =>
1351 (E_Anonymous_Access_Protected_Subprogram_Type,
1352 E_Anonymous_Access_Subprogram_Type,
1353 E_Anonymous_Access_Type));
1355 Union (Assignable_Kind,
1356 Children =>
1357 (E_Variable,
1358 E_Out_Parameter,
1359 E_In_Out_Parameter));
1361 Union (Digits_Kind,
1362 Children =>
1363 (Decimal_Fixed_Point_Kind,
1364 Float_Kind));
1366 Union (Discrete_Or_Fixed_Point_Kind,
1367 Children =>
1368 (Discrete_Kind,
1369 Fixed_Point_Kind));
1371 Union (Entry_Kind,
1372 Children =>
1373 (E_Entry,
1374 E_Entry_Family));
1376 Union (Evaluable_Kind,
1377 Children =>
1378 (Exception_Or_Object_Kind,
1379 E_Enumeration_Literal,
1380 E_Label,
1381 Subprogram_Kind));
1382 -- Kinds that represent values that can be evaluated
1384 Union (Global_Name_Kind,
1385 Children =>
1386 (Constant_Or_Variable_Kind,
1387 E_Exception,
1388 E_Package,
1389 Subprogram_Kind));
1390 -- Kinds that can have an Interface_Name that corresponds to a global
1391 -- (linker) name.
1393 Union (Named_Access_Kind,
1394 Children =>
1395 (E_Access_Type,
1396 E_Access_Subtype,
1397 E_Access_Attribute_Type,
1398 E_Allocator_Type,
1399 E_General_Access_Type,
1400 E_Access_Subprogram_Type,
1401 E_Access_Protected_Subprogram_Type));
1403 Union (Numeric_Kind,
1404 Children =>
1405 (Integer_Kind,
1406 Fixed_Point_Kind,
1407 Float_Kind));
1409 Union (Record_Kind,
1410 Children =>
1411 (E_Class_Wide_Type,
1412 E_Class_Wide_Subtype,
1413 E_Record_Type,
1414 E_Record_Subtype,
1415 E_Record_Type_With_Private,
1416 E_Record_Subtype_With_Private));
1418 Union (Subprogram_Type_Or_Kind,
1419 Children =>
1420 (Subprogram_Kind,
1421 E_Subprogram_Body,
1422 E_Subprogram_Type));
1424 -- Entities that represent scopes. These can be on the scope stack,
1425 -- and Scope_Depth can be queried. These are the kinds that have
1426 -- the Scope_Depth_Value attribute, plus Record_Kind, which has
1427 -- a synthesized Scope_Depth.
1429 Union (Scope_Kind,
1430 Children =>
1431 (E_Void,
1432 E_Private_Type,
1433 E_Private_Subtype,
1434 E_Limited_Private_Type,
1435 E_Limited_Private_Subtype,
1436 Concurrent_Kind,
1437 Subprogram_Kind,
1438 E_Entry,
1439 E_Entry_Family,
1440 E_Block,
1441 Generic_Unit_Kind,
1442 E_Loop,
1443 E_Return_Statement,
1444 E_Package,
1445 E_Package_Body,
1446 E_Subprogram_Body,
1447 Record_Kind,
1448 E_Incomplete_Type,
1449 E_Subprogram_Type));
1451 end Gen_IL.Gen.Gen_Entities;