Debian Codegraph @

gcc/ada/gen_il-gen-gen_entities.adb

raw
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-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 procedure Gen_IL.Gen.Gen_Entities is
27
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;
36
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;
43
44 procedure Union (T : Abstract_Entity; Children : Type_Array)
45 renames Create_Entity_Union_Type;
46
47 begin -- Gen_IL.Gen.Gen_Entities
48 pragma Style_Checks ("M200");
49
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_Finalizer, Flag),
150 Sm (Is_First_Subtype, Flag),
151 Sm (Is_Formal_Subprogram, Flag),
152 Sm (Is_Frozen, Flag),
153 Sm (Is_Generic_Instance, Flag),
154 Sm (Is_Generic_Type, Flag),
155 Sm (Is_Hidden, Flag),
156 Sm (Is_Hidden_Non_Overridden_Subpgm, Flag),
157 Sm (Is_Hidden_Open_Scope, Flag),
158 Sm (Is_Ignored_Ghost_Entity, Flag),
159 Sm (Is_Immediately_Visible, Flag),
160 Sm (Is_Implementation_Defined, Flag),
161 Sm (Is_Imported, Flag),
162 Sm (Is_Independent, Flag),
163 Sm (Is_Inlined, Flag),
164 Sm (Is_Instantiated, Flag),
165 Sm (Is_Interface, Flag),
166 Sm (Is_Internal, Flag),
167 Sm (Is_Interrupt_Handler, Flag),
168 Sm (Is_Intrinsic_Subprogram, Flag),
169 Sm (Is_Itype, Flag),
170 Sm (Is_Known_Non_Null, Flag),
171 Sm (Is_Known_Null, Flag),
172 Sm (Is_Known_Valid, Flag),
173 Sm (Is_Limited_Composite, Flag),
174 Sm (Is_Limited_Interface, Flag),
175 Sm (Is_Limited_Record, Flag),
176 Sm (Is_Loop_Parameter, Flag),
177 Sm (Is_Obsolescent, Flag),
178 Sm (Is_Package_Body_Entity, Flag),
179 Sm (Is_Packed, Flag, Impl_Base_Type_Only),
180 Sm (Is_Packed_Array_Impl_Type, Flag),
181 Sm (Is_Not_Self_Hidden, Flag),
182 Sm (Is_Potentially_Use_Visible, Flag),
183 Sm (Is_Preelaborated, Flag),
184 Sm (Is_Private_Descendant, Flag),
185 Sm (Is_Public, Flag),
186 Sm (Is_Pure, Flag),
187 Sm (Is_Remote_Call_Interface, Flag),
188 Sm (Is_Remote_Types, Flag),
189 Sm (Is_Renaming_Of_Object, Flag),
190 Sm (Is_Return_Object, Flag),
191 Sm (Is_Safe_To_Reevaluate, Flag),
192 Sm (Is_Shared_Passive, Flag),
193 Sm (Is_Static_Type, Flag),
194 Sm (Is_Statically_Allocated, Flag),
195 Sm (Is_Tag, Flag),
196 Sm (Is_Tagged_Type, Flag),
197 Sm (Is_Thunk, Flag),
198 Sm (Is_Trivial_Subprogram, Flag),
199 Sm (Is_True_Constant, Flag),
200 Sm (Is_Unchecked_Union, Flag, Impl_Base_Type_Only),
201 Sm (Is_Underlying_Full_View, Flag),
202 Sm (Is_Underlying_Record_View, Flag, Base_Type_Only),
203 Sm (Is_Unimplemented, Flag),
204 Sm (Is_Uplevel_Referenced_Entity, Flag),
205 Sm (Is_Visible_Formal, Flag),
206 Sm (Is_Visible_Lib_Unit, Flag),
207 Sm (Is_Volatile_Type, Flag),
208 Sm (Is_Volatile_Object, Flag),
209 Sm (Is_Volatile_Full_Access, Flag),
210 Sm (Is_Wrapper, Flag),
211 Sm (Kill_Elaboration_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 (Overlays_Constant, Flag),
219 Sm (Prev_Entity, Node_Id),
220 Sm (Referenced, Flag),
221 Sm (Referenced_As_LHS, Flag),
222 Sm (Referenced_As_Out_Parameter, Flag),
223 Sm (Return_Present, Flag),
224 Sm (Returns_By_Ref, Flag),
225 Sm (Sec_Stack_Needed_For_Return, Flag),
226 Sm (Size_Depends_On_Discriminant, Flag),
227 Sm (Size_Known_At_Compile_Time, Flag),
228 Sm (Stores_Attribute_Old_Prefix, Flag),
229 Sm (Strict_Alignment, Flag, Impl_Base_Type_Only),
230 Sm (Suppress_Elaboration_Warnings, Flag),
231 Sm (Suppress_Style_Checks, Flag),
232 Sm (Suppress_Value_Tracking_On_Call, Flag),
233 Sm (Treat_As_Volatile, Flag),
234 Sm (Used_As_Generic_Actual, Flag),
235 Sm (Uses_Sec_Stack, Flag),
236 Sm (Warnings_Off, Flag),
237 Sm (Warnings_Off_Used, Flag),
238 Sm (Warnings_Off_Used_Unmodified, Flag),
239 Sm (Warnings_Off_Used_Unreferenced, Flag),
240 Sm (Was_Hidden, Flag)));
241
242 Ab (Void_Or_Type_Kind, Entity_Kind);
243
244 Cc (E_Void, Void_Or_Type_Kind,
245 -- The initial Ekind value for a newly created entity. Also used as the
246 -- Ekind for Standard_Void_Type, a type entity in Standard used as a
247 -- dummy type for the return type of a procedure (the reason we create
248 -- this type is to share the circuits for performing overload
249 -- resolution on calls).
250 (Sm (Alignment, Unat),
251 Sm (Contract, Node_Id),
252 Sm (First_Entity, Node_Id),
253 Sm (Last_Entity, Node_Id),
254 Sm (Is_Elaboration_Warnings_OK_Id, Flag),
255 Sm (Original_Record_Component, Node_Id),
256 Sm (Scope_Depth_Value, Unat),
257 Sm (SPARK_Pragma, Node_Id),
258 Sm (SPARK_Pragma_Inherited, Flag),
259 Sm (Current_Value, Node_Id), -- setter only
260 Sm (Has_Predicates, Flag), -- setter only
261 Sm (Initialization_Statements, Node_Id), -- setter only
262 Sm (Is_Param_Block_Component_Type, Flag, Base_Type_Only),
263 -- setter only
264
265 Sm (Package_Instantiation, Node_Id), -- setter only
266 Sm (Related_Expression, Node_Id), -- setter only
267
268 -- If we set the Ekind field properly before setting the following
269 -- fields, then these would not be needed in E_Void.
270 Sm (Accept_Address, Elist_Id),
271 Sm (Associated_Formal_Package, Node_Id),
272 Sm (Associated_Node_For_Itype, Node_Id),
273 Sm (Corresponding_Remote_Type, Node_Id),
274 Sm (CR_Discriminant, Node_Id),
275 Sm (Debug_Renaming_Link, Node_Id),
276 Sm (Discriminal_Link, Node_Id),
277 Sm (Discriminant_Default_Value, Node_Id),
278 Sm (Discriminant_Number, Upos),
279 Sm (Enclosing_Scope, Node_Id),
280 Sm (Entry_Bodies_Array, Node_Id,
281 Pre => "Has_Entries (N)"),
282 Sm (Entry_Cancel_Parameter, Node_Id),
283 Sm (Entry_Component, Node_Id),
284 Sm (Entry_Formal, Node_Id),
285 Sm (Entry_Parameters_Type, Node_Id),
286 Sm (Esize, Uint),
287 Sm (RM_Size, Uint),
288 Sm (Extra_Formal, Node_Id),
289 Sm (Generic_Homonym, Node_Id),
290 Sm (Generic_Renamings, Elist_Id),
291 Sm (Handler_Records, List_Id),
292 Sm (Has_Static_Discriminants, Flag),
293 Sm (Inner_Instances, Elist_Id),
294 Sm (Interface_Name, Node_Id),
295 Sm (Next_Inlined_Subprogram, Node_Id),
296 Sm (Renamed_Or_Alias, Node_Id), -- See Einfo.Utils
297 Sm (Return_Applies_To, Node_Id),
298 Sm (Scalar_Range, Node_Id),
299 Sm (Scale_Value, Uint),
300 Sm (Unset_Reference, Node_Id)));
301 -- For the above "setter only" fields, the setters are called for E_Void,
302 -- but not getters; the Ekind is modified before any such getters are
303 -- called.
304
305 Ab (Exception_Or_Object_Kind, Entity_Kind,
306 (Sm (Esize, Uint)));
307
308 Ab (Object_Kind, Exception_Or_Object_Kind,
309 (Sm (Current_Value, Node_Id),
310 Sm (Renamed_Or_Alias, Node_Id)));
311
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 (Interface_Name, Node_Id),
318 Sm (Normalized_First_Bit, Uint),
319 Sm (Normalized_Position, Uint),
320 Sm (Original_Record_Component, Node_Id)));
321
322 Cc (E_Component, Record_Field_Kind,
323 -- Components (other than discriminants) of a record declaration,
324 -- private declarations of protected objects.
325 (Sm (Discriminant_Checking_Func, Node_Id),
326 Sm (DT_Entry_Count, Uint,
327 Pre => "Is_Tag (N)"),
328 Sm (DT_Offset_To_Top_Func, Node_Id,
329 Pre => "Is_Tag (N)"),
330 Sm (Prival, Node_Id,
331 Pre => "Is_Protected_Component (N)"),
332 Sm (Related_Type, Node_Id)));
333
334 Ab (Allocatable_Kind, Object_Kind,
335 (Sm (Activation_Record_Component, Node_Id),
336 Sm (Alignment, Unat),
337 Sm (Finalization_Master_Node, Node_Id),
338 Sm (Interface_Name, Node_Id),
339 Sm (Is_Finalized_Transient, Flag),
340 Sm (Is_Ignored_For_Finalization, Flag),
341 Sm (Linker_Section_Pragma, Node_Id),
342 Sm (Related_Expression, Node_Id)));
343
344 Ab (Constant_Or_Variable_Kind, Allocatable_Kind,
345 (Sm (Actual_Subtype, Node_Id),
346 Sm (BIP_Initialization_Call, Node_Id),
347 Sm (Contract, Node_Id),
348 Sm (Discriminal_Link, Node_Id),
349 Sm (Encapsulating_State, Node_Id),
350 Sm (Extra_Accessibility, Node_Id),
351 Sm (Initialization_Statements, Node_Id),
352 Sm (Is_Elaboration_Checks_OK_Id, Flag),
353 Sm (Is_Elaboration_Warnings_OK_Id, Flag),
354 Sm (Last_Aggregate_Assignment, Node_Id),
355 Sm (Optimize_Alignment_Space, Flag),
356 Sm (Optimize_Alignment_Time, Flag),
357 Sm (Prival_Link, Node_Id),
358 Sm (Related_Type, Node_Id),
359 Sm (Return_Statement, Node_Id),
360 Sm (Size_Check_Code, Node_Id),
361 Sm (SPARK_Pragma, Node_Id),
362 Sm (SPARK_Pragma_Inherited, Flag)));
363
364 Cc (E_Constant, Constant_Or_Variable_Kind,
365 -- Constants created by an object declaration with a constant keyword
366 (Sm (Full_View, Node_Id)));
367
368 Cc (E_Discriminant, Record_Field_Kind,
369 -- A discriminant, created by the use of a discriminant in a type
370 -- declaration.
371 (Sm (Corresponding_Discriminant, Node_Id),
372 Sm (CR_Discriminant, Node_Id),
373 Sm (Discriminal, Node_Id),
374 Sm (Discriminant_Default_Value, Node_Id),
375 Sm (Discriminant_Number, Upos),
376 Sm (Is_Completely_Hidden, Flag)));
377
378 Cc (E_Loop_Parameter, Allocatable_Kind);
379 -- A loop parameter created by a for loop
380
381 Cc (E_Variable, Constant_Or_Variable_Kind,
382 -- Variables created by an object declaration with no constant keyword
383 (Sm (Anonymous_Designated_Type, Node_Id),
384 Sm (Debug_Renaming_Link, Node_Id),
385 Sm (Extra_Constrained, Node_Id),
386 Sm (Has_Initial_Value, Flag),
387 Sm (Hiding_Loop_Variable, Node_Id),
388 Sm (Last_Assignment, Node_Id),
389 Sm (OK_To_Rename, Flag),
390 Sm (Part_Of_Constituents, Elist_Id),
391 Sm (Part_Of_References, Elist_Id),
392 Sm (Shared_Var_Procs_Instance, Node_Id),
393 Sm (Suppress_Initialization, Flag),
394 Sm (Unset_Reference, Node_Id),
395 Sm (Validated_Object, Node_Id)));
396
397 Ab (Formal_Kind, Object_Kind,
398 -- Formal parameters are also objects
399 (Sm (Activation_Record_Component, Node_Id),
400 Sm (Actual_Subtype, Node_Id),
401 Sm (Alignment, Unat),
402 Sm (Default_Expr_Function, Node_Id),
403 Sm (Default_Value, Node_Id),
404 Sm (Entry_Component, Node_Id),
405 Sm (Extra_Accessibility, Node_Id),
406 Sm (Extra_Constrained, Node_Id),
407 Sm (Extra_Formal, Node_Id),
408 Sm (Has_Initial_Value, Flag),
409 Sm (Is_Controlling_Formal, Flag),
410 Sm (Is_Only_Out_Parameter, Flag),
411 Sm (Linker_Section_Pragma, Node_Id),
412 Sm (Mechanism, Mechanism_Type),
413 Sm (Minimum_Accessibility, Node_Id),
414 Sm (Protected_Formal, Node_Id),
415 Sm (Spec_Entity, Node_Id),
416 Sm (Unset_Reference, Node_Id)));
417
418 Cc (E_Out_Parameter, Formal_Kind,
419 -- An out parameter of a subprogram or entry
420 (Sm (Last_Assignment, Node_Id)));
421
422 Cc (E_In_Out_Parameter, Formal_Kind,
423 -- An in-out parameter of a subprogram or entry
424 (Sm (Last_Assignment, Node_Id)));
425
426 Cc (E_In_Parameter, Formal_Kind,
427 -- An in parameter of a subprogram or entry
428 (Sm (Discriminal_Link, Node_Id),
429 Sm (Discriminant_Default_Value, Node_Id),
430 Sm (Is_Activation_Record, Flag)));
431
432 Ab (Formal_Object_Kind, Object_Kind,
433 -- Generic formal objects are also objects
434 (Sm (Entry_Component, Node_Id)));
435
436 Cc (E_Generic_In_Out_Parameter, Formal_Object_Kind,
437 -- A generic in out parameter, created by the use of a generic in out
438 -- parameter in a generic declaration.
439 (Sm (Actual_Subtype, Node_Id)));
440
441 Cc (E_Generic_In_Parameter, Formal_Object_Kind);
442 -- A generic in parameter, created by the use of a generic in
443 -- parameter in a generic declaration.
444
445 Ab (Named_Kind, Entity_Kind,
446 (Sm (Renamed_Or_Alias, Node_Id)));
447
448 Cc (E_Named_Integer, Named_Kind);
449 -- Named numbers created by a number declaration with an integer value
450
451 Cc (E_Named_Real, Named_Kind);
452 -- Named numbers created by a number declaration with a real value
453
454 Ab (Type_Kind, Void_Or_Type_Kind,
455 (Sm (Alignment, Unat),
456 Sm (Associated_Node_For_Itype, Node_Id),
457 Sm (Can_Use_Internal_Rep, Flag, Base_Type_Only,
458 Pre => "Ekind (Base_Type (N)) in Access_Subprogram_Kind"),
459 Sm (Class_Wide_Equivalent_Type, Node_Id),
460 Sm (Class_Wide_Type, Node_Id),
461 Sm (Contract, Node_Id),
462 Sm (Current_Use_Clause, Node_Id),
463 Sm (Derived_Type_Link, Node_Id),
464 Sm (Direct_Primitive_Operations, Elist_Id),
465 Sm (Predicates_Ignored, Flag),
466 Sm (Esize, Uint),
467 Sm (Finalize_Storage_Only, Flag, Base_Type_Only),
468 Sm (First_Entity, Node_Id),
469 Sm (Last_Entity, Node_Id),
470 Sm (Full_View, Node_Id),
471 Sm (Has_Completion_In_Body, Flag),
472 Sm (Has_Constrained_Partial_View, Flag, Base_Type_Only),
473 Sm (Has_Discriminants, Flag),
474 Sm (Has_Dispatch_Table, Flag,
475 Pre => "Is_Tagged_Type (N)"),
476 Sm (Has_Dynamic_Predicate_Aspect, Flag),
477 Sm (Has_First_Controlling_Parameter_Aspect, Flag,
478 Pre => "Is_Tagged_Type (N) or else Is_Concurrent_Type (N)"
479 & " or else Is_Concurrent_Record_Type (N)"),
480 Sm (Has_Ghost_Predicate_Aspect, Flag),
481 Sm (Has_Inheritable_Invariants, Flag, Base_Type_Only),
482 Sm (Has_Inherited_DIC, Flag, Base_Type_Only),
483 Sm (Has_Inherited_Invariants, Flag, Base_Type_Only),
484 Sm (Has_Object_Size_Clause, Flag),
485 Sm (Has_Own_DIC, Flag, Base_Type_Only),
486 Sm (Has_Own_Invariants, Flag, Base_Type_Only),
487 Sm (Has_Pragma_Unreferenced_Objects, Flag),
488 Sm (Has_Predicates, Flag),
489 Sm (Has_Primitive_Operations, Flag, Base_Type_Only),
490 Sm (Has_Private_Extension, Flag,
491 Pre => "Is_Tagged_Type (N)"),
492 Sm (Has_Specified_Layout, Flag, Impl_Base_Type_Only),
493 Sm (Has_Specified_Stream_Input, Flag),
494 Sm (Has_Specified_Stream_Output, Flag),
495 Sm (Has_Specified_Stream_Read, Flag),
496 Sm (Has_Specified_Stream_Write, Flag),
497 Sm (Has_Static_Discriminants, Flag),
498 Sm (Has_Static_Predicate, Flag),
499 Sm (Has_Static_Predicate_Aspect, Flag),
500 Sm (Has_Unknown_Discriminants, Flag),
501 Sm (Interface_Name, Node_Id),
502 Sm (Is_Abstract_Type, Flag),
503 Sm (Is_Actual_Subtype, Flag),
504 Sm (Is_Asynchronous, Flag),
505 Sm (Is_Fixed_Lower_Bound_Array_Subtype, Flag),
506 Sm (Is_Fixed_Lower_Bound_Index_Subtype, Flag),
507 Sm (Is_Generic_Actual_Type, Flag),
508 Sm (Is_Implicit_Full_View, 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)));
535
536 Ab (Elementary_Kind, Type_Kind);
537
538 Ab (Scalar_Kind, Elementary_Kind,
539 (Sm (Default_Aspect_Value, Node_Id, Base_Type_Only),
540 Sm (Scalar_Range, Node_Id)));
541
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)));
546
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_Hash, Node_Id, Root_Type_Only),
552 Sm (Lit_Indexes, Node_Id, Root_Type_Only),
553 Sm (Lit_Strings, Node_Id, Root_Type_Only),
554 Sm (Nonzero_Is_True, Flag, Base_Type_Only,
555 Pre => "Root_Type (N) = Standard_Boolean")));
556
557 Cc (E_Enumeration_Type, Enumeration_Kind,
558 -- Enumeration types, created by an enumeration type declaration
559 (Sm (Enum_Pos_To_Rep, Node_Id)));
560
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.
564
565 Ab (Integer_Kind, Discrete_Kind,
566 (Sm (Has_Shift_Operator, Flag, Base_Type_Only)));
567
568 Ab (Signed_Integer_Kind, Integer_Kind);
569
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.
573
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).
578
579 Ab (Modular_Integer_Kind, Integer_Kind,
580 (Sm (Modulus, Uint, Base_Type_Only),
581 Sm (Original_Array_Type, Node_Id)));
582
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.
586
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).
591
592 Ab (Real_Kind, Scalar_Kind,
593 (Sm (Static_Real_Or_String_Predicate, Node_Id)));
594
595 Ab (Fixed_Point_Kind, Real_Kind,
596 (Sm (Delta_Value, Ureal),
597 Sm (Small_Value, Ureal)));
598
599 Ab (Ordinary_Fixed_Point_Kind, Fixed_Point_Kind,
600 (Sm (Has_Small_Clause, Flag)));
601
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.
605
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).
611
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)));
617
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.
621
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).
627
628 Ab (Float_Kind, Real_Kind,
629 (Sm (Digits_Value, Upos)));
630
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.
634
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).
640
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)));
655
656 Cc (E_Access_Type, Access_Kind);
657 -- An access type created by an access type declaration with no all
658 -- keyword present.
659
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).
663
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).
667
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).
675
676 Cc (E_General_Access_Type, Access_Kind);
677 -- An access type created by an access type declaration with the all
678 -- keyword present.
679
680 Ab (Access_Subprogram_Kind, Access_Kind);
681
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)));
687
688 Ab (Access_Protected_Kind, Access_Subprogram_Kind,
689 (Sm (Equivalent_Type, Node_Id)));
690
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.
696
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.
700
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.
706
707 Cc (E_Anonymous_Access_Type, Access_Kind);
708 -- An anonymous access-to-object type
709
710 Ab (Composite_Kind, Type_Kind,
711 (Sm (Discriminant_Constraint, Elist_Id,
712 Pre_Get => "Has_Discriminants (N) or else Is_Constrained (N)")));
713
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)));
720
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)));
730
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)));
735
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)));
741
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)));
747
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)));
758
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)));
765
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)));
770
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)));
786
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)));
803
804 Ab (Incomplete_Or_Private_Kind, Composite_Kind,
805 (Sm (Private_Dependents, Elist_Id)));
806
807 Ab (Private_Kind, Incomplete_Or_Private_Kind,
808 (Sm (Underlying_Full_View, Node_Id)));
809
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)));
832
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)));
849
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)));
855
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)));
860
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)));
866
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)));
871
872 Ab (Incomplete_Kind, Incomplete_Or_Private_Kind,
873 (Sm (Non_Limited_View, Node_Id)));
874
875 Cc (E_Incomplete_Type, Incomplete_Kind,
876 -- An incomplete type, created by an incomplete type declaration
877 (Sm (Scalar_Range, Node_Id)));
878
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.
882
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)));
887
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)));
895
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)));
904
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.
908
909 Ab (Protected_Kind, Concurrent_Kind,
910 (Sm (Entry_Bodies_Array, Node_Id,
911 Pre => "Has_Entries (N)"),
912 Sm (Uses_Lock_Free, Flag)));
913
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)));
923
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.
927
928 Cc (E_Exception_Type, Type_Kind,
929 -- The type of an exception created by an exception declaration
930 (Sm (Equivalent_Type, Node_Id)));
931
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)));
941
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)));
949
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)));
959
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 (No_Raise, Flag),
989 Sm (No_Return, Flag),
990 Sm (Scope_Depth_Value, Unat),
991 Sm (Static_Call_Helper, Node_Id),
992 Sm (SPARK_Pragma, Node_Id),
993 Sm (SPARK_Pragma_Inherited, Flag),
994 Sm (Subps_Index, Unat),
995 Sm (LSP_Subprogram, Node_Id)));
996
997 Cc (E_Function, Subprogram_Kind,
998 -- A function, created by a function declaration or a function body
999 -- that acts as its own declaration.
1000 (Sm (Anonymous_Collections, Elist_Id),
1001 Sm (Corresponding_Equality, Node_Id,
1002 Pre => "not Comes_From_Source (N) and then Chars (N) = Name_Op_Ne"),
1003 Sm (DT_Position, Uint,
1004 Pre_Get => "Present (DTC_Entity (N))"),
1005 Sm (DTC_Entity, Node_Id),
1006 Sm (Extra_Accessibility_Of_Result, Node_Id),
1007 Sm (Generic_Renamings, Elist_Id),
1008 Sm (Handler_Records, List_Id),
1009 Sm (Has_Missing_Return, Flag),
1010 Sm (Inner_Instances, Elist_Id),
1011 Sm (Is_Called, Flag),
1012 Sm (Is_CUDA_Kernel, Flag),
1013 Sm (Is_DIC_Procedure, Flag),
1014 Sm (Is_Generic_Actual_Subprogram, Flag),
1015 Sm (Is_Initial_Condition_Procedure, Flag),
1016 Sm (Is_Inlined_Always, Flag),
1017 Sm (Is_Invariant_Procedure, Flag),
1018 Sm (Is_Partial_Invariant_Procedure, Flag),
1019 Sm (Is_Predicate_Function, Flag),
1020 Sm (Is_Primitive_Wrapper, Flag),
1021 Sm (Is_Private_Primitive, Flag),
1022 Sm (Mechanism, Mechanism_Type),
1023 Sm (Next_Inlined_Subprogram, Node_Id),
1024 Sm (Original_Protected_Subprogram, Node_Id),
1025 Sm (Predicate_Expression, Node_Id),
1026 Sm (Protected_Subprogram, Node_Id),
1027 Sm (Protection_Object, Node_Id),
1028 Sm (Related_Expression, Node_Id),
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)));
1034
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
1042 Cc (E_Procedure, Subprogram_Kind,
1043 -- A procedure, created by a procedure declaration or a procedure
1044 -- body that acts as its own declaration.
1045 (Sm (Anonymous_Collections, Elist_Id),
1046 Sm (Associated_Node_For_Itype, Node_Id),
1047 Sm (DT_Position, Uint,
1048 Pre_Get => "Present (DTC_Entity (N))"),
1049 Sm (DTC_Entity, Node_Id),
1050 Sm (Entry_Parameters_Type, Node_Id),
1051 Sm (Generic_Renamings, Elist_Id),
1052 Sm (Handler_Records, List_Id),
1053 Sm (Inner_Instances, Elist_Id),
1054 Sm (Is_Asynchronous, Flag),
1055 Sm (Is_Called, Flag),
1056 Sm (Is_CUDA_Kernel, Flag),
1057 Sm (Is_DIC_Procedure, Flag),
1058 Sm (Is_Generic_Actual_Subprogram, Flag),
1059 Sm (Is_Initial_Condition_Procedure, Flag),
1060 Sm (Is_Inlined_Always, Flag),
1061 Sm (Is_Invariant_Procedure, Flag),
1062 Sm (Is_Null_Init_Proc, Flag),
1063 Sm (Is_Partial_Invariant_Procedure, Flag),
1064 Sm (Is_Predicate_Function, Flag),
1065 Sm (Is_Primitive_Wrapper, Flag),
1066 Sm (Is_Private_Primitive, Flag),
1067 Sm (Is_Valued_Procedure, Flag),
1068 Sm (Next_Inlined_Subprogram, Node_Id),
1069 Sm (Original_Protected_Subprogram, Node_Id),
1070 Sm (Protected_Subprogram, Node_Id),
1071 Sm (Protection_Object, Node_Id),
1072 Sm (Receiving_Entry, Node_Id),
1073 Sm (Static_Initialization, Node_Id,
1074 Pre => "not Is_Dispatching_Operation (N)"),
1075 Sm (Thunk_Entity, Node_Id,
1076 Pre => "Is_Thunk (N)"),
1077 Sm (Wrapped_Entity, Node_Id,
1078 Pre => "Is_Primitive_Wrapper (N)"),
1079 Sm (Wrapped_Statements, Node_Id)));
1080
1081 Cc (E_Abstract_State, Overloadable_Kind,
1082 -- A state abstraction. Used to designate entities introduced by aspect
1083 -- or pragma Abstract_State. The entity carries the various properties
1084 -- of the state.
1085 (Sm (Body_References, Elist_Id),
1086 Sm (Encapsulating_State, Node_Id),
1087 Sm (First_Entity, Node_Id),
1088 Sm (Has_Partial_Visible_Refinement, Flag),
1089 Sm (Has_Visible_Refinement, Flag),
1090 Sm (Non_Limited_View, Node_Id),
1091 Sm (Part_Of_Constituents, Elist_Id),
1092 Sm (Refinement_Constituents, Elist_Id),
1093 Sm (SPARK_Pragma, Node_Id),
1094 Sm (SPARK_Pragma_Inherited, Flag)));
1095
1096 Cc (E_Entry, Overloadable_Kind,
1097 -- An entry, created by an entry declaration in a task or protected
1098 -- object.
1099 (Sm (Accept_Address, Elist_Id),
1100 Sm (Barrier_Function, Node_Id),
1101 Sm (Contract, Node_Id),
1102 Sm (Contract_Wrapper, Node_Id),
1103 Sm (Elaboration_Entity, Node_Id),
1104 Sm (Elaboration_Entity_Required, Flag),
1105 Sm (Entry_Accepted, Flag),
1106 Sm (Entry_Parameters_Type, Node_Id),
1107 Sm (First_Entity, Node_Id),
1108 Sm (Has_Out_Or_In_Out_Parameter, Flag),
1109 Sm (Ignore_SPARK_Mode_Pragmas, Flag),
1110 Sm (Is_Elaboration_Checks_OK_Id, Flag),
1111 Sm (Is_Elaboration_Warnings_OK_Id, Flag),
1112 Sm (Last_Entity, Node_Id),
1113 Sm (Protected_Body_Subprogram, Node_Id),
1114 Sm (Protection_Object, Node_Id),
1115 Sm (Scope_Depth_Value, Unat),
1116 Sm (SPARK_Pragma, Node_Id),
1117 Sm (SPARK_Pragma_Inherited, Flag),
1118 Sm (Wrapped_Statements, Node_Id)));
1119
1120 Cc (E_Entry_Family, Entity_Kind,
1121 -- An entry family, created by an entry family declaration in a
1122 -- task or protected type definition.
1123 (Sm (Accept_Address, Elist_Id),
1124 Sm (Barrier_Function, Node_Id),
1125 Sm (Contract, Node_Id),
1126 Sm (Contract_Wrapper, Node_Id),
1127 Sm (Elaboration_Entity, Node_Id),
1128 Sm (Elaboration_Entity_Required, Flag),
1129 Sm (Entry_Accepted, Flag),
1130 Sm (Entry_Parameters_Type, Node_Id),
1131 Sm (Extra_Formals, Node_Id),
1132 Sm (First_Entity, Node_Id),
1133 Sm (Has_Out_Or_In_Out_Parameter, Flag),
1134 Sm (Ignore_SPARK_Mode_Pragmas, Flag),
1135 Sm (Is_Elaboration_Checks_OK_Id, Flag),
1136 Sm (Is_Elaboration_Warnings_OK_Id, Flag),
1137 Sm (Last_Entity, Node_Id),
1138 Sm (Needs_No_Actuals, Flag),
1139 Sm (Protected_Body_Subprogram, Node_Id),
1140 Sm (Protection_Object, Node_Id),
1141 Sm (Renamed_Or_Alias, Node_Id),
1142 Sm (Scope_Depth_Value, Unat),
1143 Sm (SPARK_Pragma, Node_Id),
1144 Sm (SPARK_Pragma_Inherited, Flag),
1145 Sm (Wrapped_Statements, Node_Id)));
1146
1147 Cc (E_Block, Entity_Kind,
1148 -- A block identifier, created by an explicit or implicit label on
1149 -- a block or declare statement.
1150 (Sm (Block_Node, Node_Id),
1151 Sm (Entry_Cancel_Parameter, Node_Id),
1152 Sm (First_Entity, Node_Id),
1153 Sm (Is_Exception_Handler, Flag),
1154 Sm (Last_Entity, Node_Id),
1155 Sm (Renamed_Or_Alias, Node_Id),
1156 Sm (Return_Applies_To, Node_Id),
1157 Sm (Scope_Depth_Value, Unat)));
1158
1159 Cc (E_Entry_Index_Parameter, Entity_Kind,
1160 -- An entry index parameter created by an entry index specification
1161 -- for the body of a protected entry family.
1162 (Sm (Entry_Index_Constant, Node_Id)));
1163
1164 Cc (E_Exception, Exception_Or_Object_Kind,
1165 -- An exception created by an exception declaration. The exception
1166 -- itself uses E_Exception for the Ekind, the implicit type that is
1167 -- created to represent its type uses the Ekind E_Exception_Type.
1168 (Sm (Alignment, Unat),
1169 Sm (Interface_Name, Node_Id),
1170 Sm (Is_Raised, Flag),
1171 Sm (Register_Exception_Call, Node_Id),
1172 Sm (Renamed_Or_Alias, Node_Id)));
1173
1174 Ab (Generic_Unit_Kind, Entity_Kind,
1175 (Sm (Body_Needed_For_SAL, Flag),
1176 Sm (Contract, Node_Id),
1177 Sm (Elaboration_Entity, Node_Id),
1178 Sm (Elaboration_Entity_Required, Flag),
1179 Sm (First_Entity, Node_Id),
1180 Sm (Ignore_SPARK_Mode_Pragmas, Flag),
1181 Sm (Inner_Instances, Elist_Id),
1182 Sm (Interface_Name, Node_Id),
1183 Sm (Is_Elaboration_Checks_OK_Id, Flag),
1184 Sm (Is_Elaboration_Warnings_OK_Id, Flag),
1185 Sm (Last_Entity, Node_Id),
1186 Sm (Renamed_Or_Alias, Node_Id),
1187 Sm (Scope_Depth_Value, Unat),
1188 Sm (SPARK_Pragma, Node_Id),
1189 Sm (SPARK_Pragma_Inherited, Flag)));
1190
1191 Ab (Generic_Subprogram_Kind, Generic_Unit_Kind,
1192 (Sm (Has_Out_Or_In_Out_Parameter, Flag),
1193 Sm (Is_Primitive, Flag),
1194 Sm (Next_Inlined_Subprogram, Node_Id),
1195 Sm (No_Raise, Flag),
1196 Sm (No_Return, Flag),
1197 Sm (Overridden_Operation, Node_Id)));
1198
1199 Cc (E_Generic_Function, Generic_Subprogram_Kind,
1200 -- A generic function. This is the entity for a generic function
1201 -- created by a generic subprogram declaration.
1202 (Sm (Has_Missing_Return, Flag)));
1203
1204 Cc (E_Generic_Procedure, Generic_Subprogram_Kind);
1205 -- A generic function. This is the entity for a generic procedure
1206 -- created by a generic subprogram declaration.
1207
1208 Cc (E_Generic_Package, Generic_Unit_Kind,
1209 -- A generic package, this is the entity for a generic package created
1210 -- by a generic package declaration.
1211 (Sm (Abstract_States, Elist_Id),
1212 Sm (Body_Entity, Node_Id),
1213 Sm (First_Private_Entity, Node_Id),
1214 Sm (Generic_Homonym, Node_Id),
1215 Sm (Package_Instantiation, Node_Id),
1216 Sm (SPARK_Aux_Pragma, Node_Id),
1217 Sm (SPARK_Aux_Pragma_Inherited, Flag)));
1218
1219 Cc (E_Label, Entity_Kind,
1220 -- The defining entity for a label. Note that this is created by the
1221 -- implicit label declaration, not the occurrence of the label itself,
1222 -- which is simply a direct name referring to the label.
1223 (Sm (Enclosing_Scope, Node_Id),
1224 Sm (Entry_Cancel_Parameter, Node_Id),
1225 Sm (Reachable, Flag),
1226 Sm (Renamed_Or_Alias, Node_Id)));
1227
1228 Cc (E_Loop, Entity_Kind,
1229 -- A loop identifier, created by an explicit or implicit label on a
1230 -- loop statement.
1231 (Sm (First_Entity, Node_Id),
1232 Sm (First_Exit_Statement, Node_Id),
1233 Sm (Has_Loop_Entry_Attributes, Flag),
1234 Sm (Last_Entity, Node_Id),
1235 Sm (Renamed_Or_Alias, Node_Id),
1236 Sm (Scope_Depth_Value, Unat)));
1237
1238 Cc (E_Return_Statement, Entity_Kind,
1239 -- A dummy entity created for each return statement. Used to hold
1240 -- information about the return statement (what it applies to) and in
1241 -- rules checking. For example, a simple_return_statement that applies
1242 -- to an extended_return_statement cannot have an expression; this
1243 -- requires putting the E_Return_Statement entity for the
1244 -- extended_return_statement on the scope stack.
1245 (Sm (First_Entity, Node_Id),
1246 Sm (Last_Entity, Node_Id),
1247 Sm (Return_Applies_To, Node_Id),
1248 Sm (Scope_Depth_Value, Unat)));
1249
1250 Cc (E_Package, Entity_Kind,
1251 -- A package, created by a package declaration
1252 (Sm (Abstract_States, Elist_Id),
1253 Sm (Anonymous_Collections, Elist_Id),
1254 Sm (Associated_Formal_Package, Node_Id),
1255 Sm (Body_Entity, Node_Id),
1256 Sm (Body_Needed_For_Inlining, Flag),
1257 Sm (Body_Needed_For_SAL, Flag),
1258 Sm (Contract, Node_Id),
1259 Sm (Current_Use_Clause, Node_Id),
1260 Sm (Dependent_Instances, Elist_Id,
1261 Pre => "Is_Generic_Instance (N)"),
1262 Sm (Elaborate_Body_Desirable, Flag),
1263 Sm (Elaboration_Entity, Node_Id),
1264 Sm (Elaboration_Entity_Required, Flag),
1265 Sm (Finalizer, Node_Id),
1266 Sm (First_Entity, Node_Id),
1267 Sm (First_Private_Entity, Node_Id),
1268 Sm (Generic_Renamings, Elist_Id),
1269 Sm (Handler_Records, List_Id),
1270 Sm (Has_RACW, Flag),
1271 Sm (Hidden_In_Formal_Instance, Elist_Id),
1272 Sm (Ignore_SPARK_Mode_Pragmas, Flag),
1273 Sm (Incomplete_Actuals, Elist_Id),
1274 Sm (Inner_Instances, Elist_Id),
1275 Sm (Interface_Name, Node_Id),
1276 Sm (Is_Called, Flag),
1277 Sm (Is_Elaboration_Checks_OK_Id, Flag),
1278 Sm (Is_Elaboration_Warnings_OK_Id, Flag),
1279 Sm (Last_Entity, Node_Id),
1280 Sm (Limited_View, Node_Id),
1281 Sm (Package_Instantiation, Node_Id),
1282 Sm (Related_Instance, Node_Id),
1283 Sm (Renamed_In_Spec, Flag),
1284 Sm (Renamed_Or_Alias, Node_Id),
1285 Sm (Renames_Limited_View, Flag),
1286 Sm (Scope_Depth_Value, Unat),
1287 Sm (SPARK_Aux_Pragma, Node_Id),
1288 Sm (SPARK_Aux_Pragma_Inherited, Flag),
1289 Sm (SPARK_Pragma, Node_Id),
1290 Sm (SPARK_Pragma_Inherited, Flag),
1291 Sm (Static_Elaboration_Desired, Flag)));
1292
1293 Cc (E_Package_Body, Entity_Kind,
1294 -- A package body. This entity serves only limited functions, since
1295 -- most semantic analysis uses the package entity (E_Package). However
1296 -- there are some attributes that are significant for the body entity.
1297 -- For example, collection of exception handlers.
1298 (Sm (Contract, Node_Id),
1299 Sm (Finalizer, Node_Id),
1300 Sm (First_Entity, Node_Id),
1301 Sm (Handler_Records, List_Id),
1302 Sm (Ignore_SPARK_Mode_Pragmas, Flag),
1303 Sm (Last_Entity, Node_Id),
1304 Sm (Related_Instance, Node_Id),
1305 Sm (Renamed_Or_Alias, Node_Id),
1306 Sm (Scope_Depth_Value, Unat),
1307 Sm (SPARK_Aux_Pragma, Node_Id),
1308 Sm (SPARK_Aux_Pragma_Inherited, Flag),
1309 Sm (SPARK_Pragma, Node_Id),
1310 Sm (SPARK_Pragma_Inherited, Flag),
1311 Sm (Spec_Entity, Node_Id)));
1312
1313 Ab (Concurrent_Body_Kind, Entity_Kind,
1314 (Sm (Ignore_SPARK_Mode_Pragmas, Flag),
1315 Sm (SPARK_Pragma, Node_Id),
1316 Sm (SPARK_Pragma_Inherited, Flag)));
1317
1318 Cc (E_Protected_Body, Concurrent_Body_Kind);
1319 -- A protected body. This entity serves almost no function, since all
1320 -- semantic analysis uses the protected entity (E_Protected_Type).
1321
1322 Cc (E_Task_Body, Concurrent_Body_Kind,
1323 -- A task body. This entity serves almost no function, since all
1324 -- semantic analysis uses the protected entity (E_Task_Type).
1325 (Sm (Contract, Node_Id),
1326 Sm (First_Entity, Node_Id)));
1327
1328 Cc (E_Subprogram_Body, Entity_Kind,
1329 -- A subprogram body. Used when a subprogram has a separate declaration
1330 -- to represent the entity for the body. This entity serves almost no
1331 -- function, since all semantic analysis uses the subprogram entity
1332 -- for the declaration (E_Function or E_Procedure).
1333 (Sm (Anonymous_Collections, Elist_Id),
1334 Sm (Contract, Node_Id),
1335 Sm (Extra_Formals, Node_Id),
1336 Sm (First_Entity, Node_Id),
1337 Sm (Ignore_SPARK_Mode_Pragmas, Flag),
1338 Sm (Interface_Name, Node_Id),
1339 Sm (Last_Entity, Node_Id),
1340 Sm (Renamed_Or_Alias, Node_Id),
1341 Sm (Scope_Depth_Value, Unat),
1342 Sm (SPARK_Pragma, Node_Id),
1343 Sm (SPARK_Pragma_Inherited, Flag)));
1344
1345 -- Union types. These don't fit into the normal parent/child hierarchy
1346 -- above.
1347
1348 Union (Anonymous_Access_Kind,
1349 Children =>
1350 (E_Anonymous_Access_Protected_Subprogram_Type,
1351 E_Anonymous_Access_Subprogram_Type,
1352 E_Anonymous_Access_Type));
1353
1354 Union (Assignable_Kind,
1355 Children =>
1356 (E_Variable,
1357 E_Out_Parameter,
1358 E_In_Out_Parameter));
1359
1360 Union (Digits_Kind,
1361 Children =>
1362 (Decimal_Fixed_Point_Kind,
1363 Float_Kind));
1364
1365 Union (Discrete_Or_Fixed_Point_Kind,
1366 Children =>
1367 (Discrete_Kind,
1368 Fixed_Point_Kind));
1369
1370 Union (Entry_Kind,
1371 Children =>
1372 (E_Entry,
1373 E_Entry_Family));
1374
1375 Union (Evaluable_Kind,
1376 Children =>
1377 (Exception_Or_Object_Kind,
1378 E_Enumeration_Literal,
1379 E_Label,
1380 Subprogram_Kind));
1381 -- Kinds that represent values that can be evaluated
1382
1383 Union (Global_Name_Kind,
1384 Children =>
1385 (Constant_Or_Variable_Kind,
1386 E_Exception,
1387 E_Package,
1388 Subprogram_Kind));
1389 -- Kinds that can have an Interface_Name that corresponds to a global
1390 -- (linker) name.
1391
1392 Union (Named_Access_Kind,
1393 Children =>
1394 (E_Access_Type,
1395 E_Access_Subtype,
1396 E_Access_Attribute_Type,
1397 E_Allocator_Type,
1398 E_General_Access_Type,
1399 E_Access_Subprogram_Type,
1400 E_Access_Protected_Subprogram_Type));
1401
1402 Union (Numeric_Kind,
1403 Children =>
1404 (Integer_Kind,
1405 Fixed_Point_Kind,
1406 Float_Kind));
1407
1408 Union (Record_Kind,
1409 Children =>
1410 (E_Class_Wide_Type,
1411 E_Class_Wide_Subtype,
1412 E_Record_Type,
1413 E_Record_Subtype,
1414 E_Record_Type_With_Private,
1415 E_Record_Subtype_With_Private));
1416
1417 Union (Subprogram_Type_Or_Kind,
1418 Children =>
1419 (Subprogram_Kind,
1420 E_Subprogram_Body,
1421 E_Subprogram_Type));
1422
1423 -- Entities that represent scopes. These can be on the scope stack,
1424 -- and Scope_Depth can be queried. These are the kinds that have
1425 -- the Scope_Depth_Value attribute, plus Record_Kind, which has
1426 -- a synthesized Scope_Depth.
1427
1428 Union (Scope_Kind,
1429 Children =>
1430 (E_Void,
1431 E_Private_Type,
1432 E_Private_Subtype,
1433 E_Limited_Private_Type,
1434 E_Limited_Private_Subtype,
1435 Concurrent_Kind,
1436 Subprogram_Kind,
1437 E_Entry,
1438 E_Entry_Family,
1439 E_Block,
1440 Generic_Unit_Kind,
1441 E_Loop,
1442 E_Return_Statement,
1443 E_Package,
1444 E_Package_Body,
1445 E_Subprogram_Body,
1446 Record_Kind,
1447 E_Incomplete_Type,
1448 E_Subprogram_Type));
1449
1450 end Gen_IL.Gen.Gen_Entities;