2016-10-26 François Dumont <fdumont@gcc.gnu.org>
[official-gcc.git] / gcc / ada / einfo.adb
blob2cfb3325f46fe435178fa4309020374f0d7cca77
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- E I N F O --
6 -- --
7 -- B o d y --
8 -- --
9 -- Copyright (C) 1992-2016, 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. --
17 -- --
18 -- As a special exception under Section 7 of GPL version 3, you are granted --
19 -- additional permissions described in the GCC Runtime Library Exception, --
20 -- version 3.1, as published by the Free Software Foundation. --
21 -- --
22 -- You should have received a copy of the GNU General Public License and --
23 -- a copy of the GCC Runtime Library Exception along with this program; --
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
25 -- <http://www.gnu.org/licenses/>. --
26 -- --
27 -- GNAT was originally developed by the GNAT team at New York University. --
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
29 -- --
30 ------------------------------------------------------------------------------
32 pragma Style_Checks (All_Checks);
33 -- Turn off subprogram ordering, not used for this unit
35 with Atree; use Atree;
36 with Elists; use Elists;
37 with Namet; use Namet;
38 with Nlists; use Nlists;
39 with Output; use Output;
40 with Sinfo; use Sinfo;
41 with Stand; use Stand;
43 package body Einfo is
45 use Atree.Unchecked_Access;
46 -- This is one of the packages that is allowed direct untyped access to
47 -- the fields in a node, since it provides the next level abstraction
48 -- which incorporates appropriate checks.
50 ----------------------------------------------
51 -- Usage of Fields in Defining Entity Nodes --
52 ----------------------------------------------
54 -- Four of these fields are defined in Sinfo, since they in are the base
55 -- part of the node. The access routines for these four fields and the
56 -- corresponding set procedures are defined in Sinfo. These fields are
57 -- present in all entities. Note that Homonym is also in the base part of
58 -- the node, but has access routines that are more properly part of Einfo,
59 -- which is why they are defined here.
61 -- Chars Name1
62 -- Next_Entity Node2
63 -- Scope Node3
64 -- Etype Node5
66 -- Remaining fields are present only in extended nodes (i.e. entities).
68 -- The following fields are present in all entities
70 -- Homonym Node4
71 -- First_Rep_Item Node6
72 -- Freeze_Node Node7
73 -- Associated_Entity Node37
75 -- The usage of other fields (and the entity kinds to which it applies)
76 -- depends on the particular field (see Einfo spec for details).
78 -- Associated_Node_For_Itype Node8
79 -- Dependent_Instances Elist8
80 -- Hiding_Loop_Variable Node8
81 -- Mechanism Uint8 (but returns Mechanism_Type)
82 -- Normalized_First_Bit Uint8
83 -- Refinement_Constituents Elist8
84 -- Return_Applies_To Node8
85 -- First_Exit_Statement Node8
87 -- Class_Wide_Type Node9
88 -- Current_Value Node9
89 -- Renaming_Map Uint9
91 -- Direct_Primitive_Operations Elist10
92 -- Discriminal_Link Node10
93 -- Float_Rep Uint10 (but returns Float_Rep_Kind)
94 -- Handler_Records List10
95 -- Normalized_Position_Max Uint10
96 -- Part_Of_Constituents Elist10
98 -- Block_Node Node11
99 -- Component_Bit_Offset Uint11
100 -- Full_View Node11
101 -- Entry_Component Node11
102 -- Enumeration_Pos Uint11
103 -- Generic_Homonym Node11
104 -- Part_Of_References Elist11
105 -- Protected_Body_Subprogram Node11
107 -- Barrier_Function Node12
108 -- Enumeration_Rep Uint12
109 -- Esize Uint12
110 -- Next_Inlined_Subprogram Node12
112 -- Component_Clause Node13
113 -- Elaboration_Entity Node13
114 -- Extra_Accessibility Node13
115 -- RM_Size Uint13
117 -- Alignment Uint14
118 -- Normalized_Position Uint14
119 -- Postconditions_Proc Node14
120 -- Shadow_Entities List14
122 -- Discriminant_Number Uint15
123 -- DT_Position Uint15
124 -- DT_Entry_Count Uint15
125 -- Entry_Parameters_Type Node15
126 -- Extra_Formal Node15
127 -- Pending_Access_Types Elist15
128 -- Related_Instance Node15
129 -- Status_Flag_Or_Transient_Decl Node15
131 -- Access_Disp_Table Elist16
132 -- Body_References Elist16
133 -- Cloned_Subtype Node16
134 -- DTC_Entity Node16
135 -- Entry_Formal Node16
136 -- First_Private_Entity Node16
137 -- Lit_Strings Node16
138 -- Scale_Value Uint16
139 -- String_Literal_Length Uint16
140 -- Unset_Reference Node16
142 -- Actual_Subtype Node17
143 -- Digits_Value Uint17
144 -- Discriminal Node17
145 -- First_Entity Node17
146 -- First_Index Node17
147 -- First_Literal Node17
148 -- Master_Id Node17
149 -- Modulus Uint17
150 -- Prival Node17
152 -- Alias Node18
153 -- Corresponding_Concurrent_Type Node18
154 -- Corresponding_Protected_Entry Node18
155 -- Corresponding_Record_Type Node18
156 -- Delta_Value Ureal18
157 -- Enclosing_Scope Node18
158 -- Equivalent_Type Node18
159 -- Lit_Indexes Node18
160 -- Private_Dependents Elist18
161 -- Renamed_Entity Node18
162 -- Renamed_Object Node18
163 -- String_Literal_Low_Bound Node18
165 -- Body_Entity Node19
166 -- Corresponding_Discriminant Node19
167 -- Default_Aspect_Component_Value Node19
168 -- Default_Aspect_Value Node19
169 -- Entry_Bodies_Array Node19
170 -- Extra_Accessibility_Of_Result Node19
171 -- Non_Limited_View Node19
172 -- Parent_Subtype Node19
173 -- Size_Check_Code Node19
174 -- Spec_Entity Node19
175 -- Underlying_Full_View Node19
177 -- Component_Type Node20
178 -- Default_Value Node20
179 -- Directly_Designated_Type Node20
180 -- Discriminant_Checking_Func Node20
181 -- Discriminant_Default_Value Node20
182 -- Last_Entity Node20
183 -- Prival_Link Node20
184 -- Register_Exception_Call Node20
185 -- Scalar_Range Node20
187 -- Accept_Address Elist21
188 -- Default_Expr_Function Node21
189 -- Discriminant_Constraint Elist21
190 -- Interface_Name Node21
191 -- Original_Array_Type Node21
192 -- Small_Value Ureal21
194 -- Associated_Storage_Pool Node22
195 -- Component_Size Uint22
196 -- Corresponding_Remote_Type Node22
197 -- Enumeration_Rep_Expr Node22
198 -- Original_Record_Component Node22
199 -- Private_View Node22
200 -- Protected_Formal Node22
201 -- Scope_Depth_Value Uint22
202 -- Shared_Var_Procs_Instance Node22
204 -- CR_Discriminant Node23
205 -- Entry_Cancel_Parameter Node23
206 -- Enum_Pos_To_Rep Node23
207 -- Extra_Constrained Node23
208 -- Finalization_Master Node23
209 -- Generic_Renamings Elist23
210 -- Inner_Instances Elist23
211 -- Limited_View Node23
212 -- Packed_Array_Impl_Type Node23
213 -- Protection_Object Node23
214 -- Stored_Constraint Elist23
216 -- Incomplete_Actuals Elist24
217 -- Related_Expression Node24
218 -- Subps_Index Uint24
220 -- Contract_Wrapper Node25
221 -- Debug_Renaming_Link Node25
222 -- DT_Offset_To_Top_Func Node25
223 -- Interface_Alias Node25
224 -- Interfaces Elist25
225 -- Related_Array_Object Node25
226 -- Static_Discrete_Predicate List25
227 -- Static_Real_Or_String_Predicate Node25
228 -- Task_Body_Procedure Node25
230 -- Dispatch_Table_Wrappers Elist26
231 -- Last_Assignment Node26
232 -- Overridden_Operation Node26
233 -- Package_Instantiation Node26
234 -- Storage_Size_Variable Node26
236 -- Current_Use_Clause Node27
237 -- Related_Type Node27
238 -- Wrapped_Entity Node27
240 -- Extra_Formals Node28
241 -- Finalizer Node28
242 -- Initialization_Statements Node28
243 -- Original_Access_Type Node28
244 -- Relative_Deadline_Variable Node28
245 -- Underlying_Record_View Node28
247 -- Anonymous_Masters Elist29
248 -- BIP_Initialization_Call Node29
249 -- Subprograms_For_Type Elist29
251 -- Anonymous_Object Node30
252 -- Corresponding_Equality Node30
253 -- Last_Aggregate_Assignment Node30
254 -- Static_Initialization Node30
256 -- Derived_Type_Link Node31
257 -- Thunk_Entity Node31
258 -- Activation_Record_Component Node31
260 -- Corresponding_Function Node32
261 -- Corresponding_Procedure Node32
262 -- Encapsulating_State Node32
263 -- No_Tagged_Streams_Pragma Node32
265 -- Linker_Section_Pragma Node33
267 -- Contract Node34
269 -- Anonymous_Designated_Type Node35
270 -- Import_Pragma Node35
272 -- Class_Wide_Preconds List38
274 -- Class_Wide_Postconds List39
276 -- SPARK_Pragma Node40
278 -- Original_Protected_Subprogram Node41
279 -- SPARK_Aux_Pragma Node41
281 ---------------------------------------------
282 -- Usage of Flags in Defining Entity Nodes --
283 ---------------------------------------------
285 -- All flags are unique, there is no overlaying, so each flag is physically
286 -- present in every entity. However, for many of the flags, it only makes
287 -- sense for them to be set true for certain subsets of entity kinds. See
288 -- the spec of Einfo for further details.
290 -- Is_Inlined_Always Flag1
291 -- Is_Hidden_Non_Overridden_Subpgm Flag2
292 -- Has_Default_Init_Cond Flag3
293 -- Is_Frozen Flag4
294 -- Has_Discriminants Flag5
295 -- Is_Dispatching_Operation Flag6
296 -- Is_Immediately_Visible Flag7
297 -- In_Use Flag8
298 -- Is_Potentially_Use_Visible Flag9
299 -- Is_Public Flag10
301 -- Is_Inlined Flag11
302 -- Is_Constrained Flag12
303 -- Is_Generic_Type Flag13
304 -- Depends_On_Private Flag14
305 -- Is_Aliased Flag15
306 -- Is_Volatile Flag16
307 -- Is_Internal Flag17
308 -- Has_Delayed_Freeze Flag18
309 -- Is_Abstract_Subprogram Flag19
310 -- Is_Concurrent_Record_Type Flag20
312 -- Has_Master_Entity Flag21
313 -- Needs_No_Actuals Flag22
314 -- Has_Storage_Size_Clause Flag23
315 -- Is_Imported Flag24
316 -- Is_Limited_Record Flag25
317 -- Has_Completion Flag26
318 -- Has_Pragma_Controlled Flag27
319 -- Is_Statically_Allocated Flag28
320 -- Has_Size_Clause Flag29
321 -- Has_Task Flag30
323 -- Checks_May_Be_Suppressed Flag31
324 -- Kill_Elaboration_Checks Flag32
325 -- Kill_Range_Checks Flag33
326 -- Has_Independent_Components Flag34
327 -- Is_Class_Wide_Equivalent_Type Flag35
328 -- Referenced_As_LHS Flag36
329 -- Is_Known_Non_Null Flag37
330 -- Can_Never_Be_Null Flag38
331 -- Has_Default_Aspect Flag39
332 -- Body_Needed_For_SAL Flag40
334 -- Treat_As_Volatile Flag41
335 -- Is_Controlled Flag42
336 -- Has_Controlled_Component Flag43
337 -- Is_Pure Flag44
338 -- In_Private_Part Flag45
339 -- Has_Alignment_Clause Flag46
340 -- Has_Exit Flag47
341 -- In_Package_Body Flag48
342 -- Reachable Flag49
343 -- Delay_Subprogram_Descriptors Flag50
345 -- Is_Packed Flag51
346 -- Is_Entry_Formal Flag52
347 -- Is_Private_Descendant Flag53
348 -- Return_Present Flag54
349 -- Is_Tagged_Type Flag55
350 -- Has_Homonym Flag56
351 -- Is_Hidden Flag57
352 -- Non_Binary_Modulus Flag58
353 -- Is_Preelaborated Flag59
354 -- Is_Shared_Passive Flag60
356 -- Is_Remote_Types Flag61
357 -- Is_Remote_Call_Interface Flag62
358 -- Is_Character_Type Flag63
359 -- Is_Intrinsic_Subprogram Flag64
360 -- Has_Record_Rep_Clause Flag65
361 -- Has_Enumeration_Rep_Clause Flag66
362 -- Has_Small_Clause Flag67
363 -- Has_Component_Size_Clause Flag68
364 -- Is_Access_Constant Flag69
365 -- Is_First_Subtype Flag70
367 -- Has_Completion_In_Body Flag71
368 -- Has_Unknown_Discriminants Flag72
369 -- Is_Child_Unit Flag73
370 -- Is_CPP_Class Flag74
371 -- Has_Non_Standard_Rep Flag75
372 -- Is_Constructor Flag76
373 -- Static_Elaboration_Desired Flag77
374 -- Is_Tag Flag78
375 -- Has_All_Calls_Remote Flag79
376 -- Is_Constr_Subt_For_U_Nominal Flag80
378 -- Is_Asynchronous Flag81
379 -- Has_Gigi_Rep_Item Flag82
380 -- Has_Machine_Radix_Clause Flag83
381 -- Machine_Radix_10 Flag84
382 -- Is_Atomic Flag85
383 -- Has_Atomic_Components Flag86
384 -- Has_Volatile_Components Flag87
385 -- Discard_Names Flag88
386 -- Is_Interrupt_Handler Flag89
387 -- Returns_By_Ref Flag90
389 -- Is_Itype Flag91
390 -- Size_Known_At_Compile_Time Flag92
391 -- Reverse_Storage_Order Flag93
392 -- Is_Generic_Actual_Type Flag94
393 -- Uses_Sec_Stack Flag95
394 -- Warnings_Off Flag96
395 -- Is_Controlling_Formal Flag97
396 -- Has_Controlling_Result Flag98
397 -- Is_Exported Flag99
398 -- Has_Specified_Layout Flag100
400 -- Has_Nested_Block_With_Handler Flag101
401 -- Is_Called Flag102
402 -- Is_Completely_Hidden Flag103
403 -- Address_Taken Flag104
404 -- Suppress_Initialization Flag105
405 -- Is_Limited_Composite Flag106
406 -- Is_Private_Composite Flag107
407 -- Default_Expressions_Processed Flag108
408 -- Is_Non_Static_Subtype Flag109
409 -- Has_Out_Or_In_Out_Parameter Flag110
411 -- Is_Formal_Subprogram Flag111
412 -- Is_Renaming_Of_Object Flag112
413 -- No_Return Flag113
414 -- Delay_Cleanups Flag114
415 -- Never_Set_In_Source Flag115
416 -- Is_Visible_Lib_Unit Flag116
417 -- Is_Unchecked_Union Flag117
418 -- Is_For_Access_Subtype Flag118
419 -- Has_Convention_Pragma Flag119
420 -- Has_Primitive_Operations Flag120
422 -- Has_Pragma_Pack Flag121
423 -- Is_Bit_Packed_Array Flag122
424 -- Has_Unchecked_Union Flag123
425 -- Is_Eliminated Flag124
426 -- C_Pass_By_Copy Flag125
427 -- Is_Instantiated Flag126
428 -- Is_Valued_Procedure Flag127
429 -- (used for Component_Alignment) Flag128
430 -- (used for Component_Alignment) Flag129
431 -- Is_Generic_Instance Flag130
433 -- No_Pool_Assigned Flag131
434 -- Is_Default_Init_Cond_Procedure Flag132
435 -- Has_Inherited_Default_Init_Cond Flag133
436 -- Has_Aliased_Components Flag135
437 -- No_Strict_Aliasing Flag136
438 -- Is_Machine_Code_Subprogram Flag137
439 -- Is_Packed_Array_Impl_Type Flag138
440 -- Has_Biased_Representation Flag139
441 -- Has_Complex_Representation Flag140
443 -- Is_Constr_Subt_For_UN_Aliased Flag141
444 -- Has_Missing_Return Flag142
445 -- Has_Recursive_Call Flag143
446 -- Is_Unsigned_Type Flag144
447 -- Strict_Alignment Flag145
448 -- Is_Abstract_Type Flag146
449 -- Needs_Debug_Info Flag147
450 -- Suppress_Elaboration_Warnings Flag148
451 -- Is_Compilation_Unit Flag149
452 -- Has_Pragma_Elaborate_Body Flag150
454 -- Has_Private_Ancestor Flag151
455 -- Entry_Accepted Flag152
456 -- Is_Obsolescent Flag153
457 -- Has_Per_Object_Constraint Flag154
458 -- Has_Private_Declaration Flag155
459 -- Referenced Flag156
460 -- Has_Pragma_Inline Flag157
461 -- Finalize_Storage_Only Flag158
462 -- From_Limited_With Flag159
463 -- Is_Package_Body_Entity Flag160
465 -- Has_Qualified_Name Flag161
466 -- Nonzero_Is_True Flag162
467 -- Is_True_Constant Flag163
468 -- Reverse_Bit_Order Flag164
469 -- Suppress_Style_Checks Flag165
470 -- Debug_Info_Off Flag166
471 -- Sec_Stack_Needed_For_Return Flag167
472 -- Materialize_Entity Flag168
473 -- Has_Pragma_Thread_Local_Storage Flag169
474 -- Is_Known_Valid Flag170
476 -- Is_Hidden_Open_Scope Flag171
477 -- Has_Object_Size_Clause Flag172
478 -- Has_Fully_Qualified_Name Flag173
479 -- Elaboration_Entity_Required Flag174
480 -- Has_Forward_Instantiation Flag175
481 -- Is_Discrim_SO_Function Flag176
482 -- Size_Depends_On_Discriminant Flag177
483 -- Is_Null_Init_Proc Flag178
484 -- Has_Pragma_Pure_Function Flag179
485 -- Has_Pragma_Unreferenced Flag180
487 -- Has_Contiguous_Rep Flag181
488 -- Has_Xref_Entry Flag182
489 -- Must_Be_On_Byte_Boundary Flag183
490 -- Has_Stream_Size_Clause Flag184
491 -- Is_Ada_2005_Only Flag185
492 -- Is_Interface Flag186
493 -- Has_Constrained_Partial_View Flag187
494 -- Uses_Lock_Free Flag188
495 -- Is_Pure_Unit_Access_Type Flag189
496 -- Has_Specified_Stream_Input Flag190
498 -- Has_Specified_Stream_Output Flag191
499 -- Has_Specified_Stream_Read Flag192
500 -- Has_Specified_Stream_Write Flag193
501 -- Is_Local_Anonymous_Access Flag194
502 -- Is_Primitive_Wrapper Flag195
503 -- Was_Hidden Flag196
504 -- Is_Limited_Interface Flag197
505 -- Has_Pragma_Ordered Flag198
506 -- Is_Ada_2012_Only Flag199
508 -- Has_Delayed_Aspects Flag200
509 -- Has_Pragma_No_Inline Flag201
510 -- Itype_Printed Flag202
511 -- Has_Pragma_Pure Flag203
512 -- Is_Known_Null Flag204
513 -- Low_Bound_Tested Flag205
514 -- Is_Visible_Formal Flag206
515 -- Known_To_Have_Preelab_Init Flag207
516 -- Must_Have_Preelab_Init Flag208
517 -- Is_Return_Object Flag209
518 -- Elaborate_Body_Desirable Flag210
520 -- Has_Static_Discriminants Flag211
521 -- Has_Pragma_Unreferenced_Objects Flag212
522 -- Requires_Overriding Flag213
523 -- Has_RACW Flag214
524 -- Is_Param_Block_Component_Type Flag215
525 -- Universal_Aliasing Flag216
526 -- Suppress_Value_Tracking_On_Call Flag217
527 -- Is_Primitive Flag218
528 -- Has_Initial_Value Flag219
529 -- Has_Dispatch_Table Flag220
531 -- Has_Pragma_Preelab_Init Flag221
532 -- Used_As_Generic_Actual Flag222
533 -- Is_Descendant_Of_Address Flag223
534 -- Is_Raised Flag224
535 -- Is_Thunk Flag225
536 -- Is_Only_Out_Parameter Flag226
537 -- Referenced_As_Out_Parameter Flag227
538 -- Has_Thunks Flag228
539 -- Can_Use_Internal_Rep Flag229
540 -- Has_Pragma_Inline_Always Flag230
542 -- Renamed_In_Spec Flag231
543 -- Has_Own_Invariants Flag232
544 -- Has_Pragma_Unmodified Flag233
545 -- Is_Dispatch_Table_Entity Flag234
546 -- Is_Trivial_Subprogram Flag235
547 -- Warnings_Off_Used Flag236
548 -- Warnings_Off_Used_Unmodified Flag237
549 -- Warnings_Off_Used_Unreferenced Flag238
550 -- OK_To_Reorder_Components Flag239
551 -- Has_Expanded_Contract Flag240
553 -- Optimize_Alignment_Space Flag241
554 -- Optimize_Alignment_Time Flag242
555 -- Overlays_Constant Flag243
556 -- Is_RACW_Stub_Type Flag244
557 -- Is_Private_Primitive Flag245
558 -- Is_Underlying_Record_View Flag246
559 -- OK_To_Rename Flag247
560 -- Has_Inheritable_Invariants Flag248
561 -- Is_Safe_To_Reevaluate Flag249
562 -- Has_Predicates Flag250
564 -- Has_Implicit_Dereference Flag251
565 -- Is_Finalized_Transient Flag252
566 -- Disable_Controlled Flag253
567 -- Is_Implementation_Defined Flag254
568 -- Is_Predicate_Function Flag255
569 -- Is_Predicate_Function_M Flag256
570 -- Is_Invariant_Procedure Flag257
571 -- Has_Dynamic_Predicate_Aspect Flag258
572 -- Has_Static_Predicate_Aspect Flag259
573 -- Has_Loop_Entry_Attributes Flag260
575 -- Has_Delayed_Rep_Aspects Flag261
576 -- May_Inherit_Delayed_Rep_Aspects Flag262
577 -- Has_Visible_Refinement Flag263
578 -- Is_Discriminant_Check_Function Flag264
579 -- SPARK_Pragma_Inherited Flag265
580 -- SPARK_Aux_Pragma_Inherited Flag266
581 -- Has_Shift_Operator Flag267
582 -- Is_Independent Flag268
583 -- Has_Static_Predicate Flag269
584 -- Stores_Attribute_Old_Prefix Flag270
586 -- Has_Protected Flag271
587 -- SSO_Set_Low_By_Default Flag272
588 -- SSO_Set_High_By_Default Flag273
589 -- Is_Generic_Actual_Subprogram Flag274
590 -- No_Predicate_On_Actual Flag275
591 -- No_Dynamic_Predicate_On_Actual Flag276
592 -- Is_Checked_Ghost_Entity Flag277
593 -- Is_Ignored_Ghost_Entity Flag278
594 -- Contains_Ignored_Ghost_Code Flag279
595 -- Partial_View_Has_Unknown_Discr Flag280
597 -- Is_Static_Type Flag281
598 -- Has_Nested_Subprogram Flag282
599 -- Is_Uplevel_Referenced_Entity Flag283
600 -- Is_Unimplemented Flag284
601 -- Is_Volatile_Full_Access Flag285
602 -- Is_Exception_Handler Flag286
603 -- Rewritten_For_C Flag287
604 -- Predicates_Ignored Flag288
605 -- Has_Timing_Event Flag289
607 -- (unused) Flag290 -- ??? flag breaks einfo.h
609 -- Has_Inherited_Invariants Flag291
610 -- Is_Partial_Invariant_Procedure Flag292
611 -- Is_Actual_Subtype Flag293
612 -- Has_Pragma_Unused Flag294
613 -- Is_Ignored_Transient Flag295
614 -- Has_Partial_Visible_Refinement Flag296
616 -- (unused) Flag297
617 -- (unused) Flag298
618 -- (unused) Flag299
619 -- (unused) Flag300
621 -- (unused) Flag301
622 -- (unused) Flag302
623 -- (unused) Flag303
624 -- (unused) Flag304
625 -- (unused) Flag305
626 -- (unused) Flag306
627 -- (unused) Flag307
628 -- (unused) Flag308
629 -- (unused) Flag309
631 -- Note: Flag310-317 are defined in atree.ads/adb, but not yet in atree.h
633 -----------------------
634 -- Local subprograms --
635 -----------------------
637 function Has_Option
638 (State_Id : Entity_Id;
639 Option_Nam : Name_Id) return Boolean;
640 -- Determine whether abstract state State_Id has particular option denoted
641 -- by the name Option_Nam.
643 ---------------
644 -- Float_Rep --
645 ---------------
647 function Float_Rep (Id : E) return F is
648 pragma Assert (Is_Floating_Point_Type (Id));
649 begin
650 return F'Val (UI_To_Int (Uint10 (Base_Type (Id))));
651 end Float_Rep;
653 ----------------
654 -- Has_Option --
655 ----------------
657 function Has_Option
658 (State_Id : Entity_Id;
659 Option_Nam : Name_Id) return Boolean
661 Decl : constant Node_Id := Parent (State_Id);
662 Opt : Node_Id;
663 Opt_Nam : Node_Id;
665 begin
666 pragma Assert (Ekind (State_Id) = E_Abstract_State);
668 -- The declaration of abstract states with options appear as an
669 -- extension aggregate. If this is not the case, the option is not
670 -- available.
672 if Nkind (Decl) /= N_Extension_Aggregate then
673 return False;
674 end if;
676 -- Simple options
678 Opt := First (Expressions (Decl));
679 while Present (Opt) loop
680 if Nkind (Opt) = N_Identifier and then Chars (Opt) = Option_Nam then
681 return True;
682 end if;
684 Next (Opt);
685 end loop;
687 -- Complex options with various specifiers
689 Opt := First (Component_Associations (Decl));
690 while Present (Opt) loop
691 Opt_Nam := First (Choices (Opt));
693 if Nkind (Opt_Nam) = N_Identifier
694 and then Chars (Opt_Nam) = Option_Nam
695 then
696 return True;
697 end if;
699 Next (Opt);
700 end loop;
702 return False;
703 end Has_Option;
705 --------------------------------
706 -- Attribute Access Functions --
707 --------------------------------
709 function Abstract_States (Id : E) return L is
710 begin
711 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
712 return Elist25 (Id);
713 end Abstract_States;
715 function Accept_Address (Id : E) return L is
716 begin
717 return Elist21 (Id);
718 end Accept_Address;
720 function Access_Disp_Table (Id : E) return L is
721 begin
722 pragma Assert (Ekind_In (Id, E_Record_Type,
723 E_Record_Type_With_Private,
724 E_Record_Subtype));
725 return Elist16 (Implementation_Base_Type (Id));
726 end Access_Disp_Table;
728 function Activation_Record_Component (Id : E) return E is
729 begin
730 pragma Assert (Ekind_In (Id, E_Constant,
731 E_In_Parameter,
732 E_In_Out_Parameter,
733 E_Loop_Parameter,
734 E_Out_Parameter,
735 E_Variable));
736 return Node31 (Id);
737 end Activation_Record_Component;
739 function Actual_Subtype (Id : E) return E is
740 begin
741 pragma Assert
742 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
743 or else Is_Formal (Id));
744 return Node17 (Id);
745 end Actual_Subtype;
747 function Address_Taken (Id : E) return B is
748 begin
749 return Flag104 (Id);
750 end Address_Taken;
752 function Alias (Id : E) return E is
753 begin
754 pragma Assert
755 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
756 return Node18 (Id);
757 end Alias;
759 function Alignment (Id : E) return U is
760 begin
761 pragma Assert (Is_Type (Id)
762 or else Is_Formal (Id)
763 or else Ekind_In (Id, E_Loop_Parameter,
764 E_Constant,
765 E_Exception,
766 E_Variable));
767 return Uint14 (Id);
768 end Alignment;
770 function Anonymous_Designated_Type (Id : E) return E is
771 begin
772 pragma Assert (Ekind (Id) = E_Variable);
773 return Node35 (Id);
774 end Anonymous_Designated_Type;
776 function Anonymous_Masters (Id : E) return L is
777 begin
778 pragma Assert (Ekind_In (Id, E_Function,
779 E_Package,
780 E_Procedure,
781 E_Subprogram_Body));
782 return Elist29 (Id);
783 end Anonymous_Masters;
785 function Anonymous_Object (Id : E) return E is
786 begin
787 pragma Assert (Ekind_In (Id, E_Protected_Type, E_Task_Type));
788 return Node30 (Id);
789 end Anonymous_Object;
791 function Associated_Entity (Id : E) return E is
792 begin
793 return Node37 (Id);
794 end Associated_Entity;
796 function Associated_Formal_Package (Id : E) return E is
797 begin
798 pragma Assert (Ekind (Id) = E_Package);
799 return Node12 (Id);
800 end Associated_Formal_Package;
802 function Associated_Node_For_Itype (Id : E) return N is
803 begin
804 return Node8 (Id);
805 end Associated_Node_For_Itype;
807 function Associated_Storage_Pool (Id : E) return E is
808 begin
809 pragma Assert (Is_Access_Type (Id));
810 return Node22 (Root_Type (Id));
811 end Associated_Storage_Pool;
813 function Barrier_Function (Id : E) return N is
814 begin
815 pragma Assert (Is_Entry (Id));
816 return Node12 (Id);
817 end Barrier_Function;
819 function Block_Node (Id : E) return N is
820 begin
821 pragma Assert (Ekind (Id) = E_Block);
822 return Node11 (Id);
823 end Block_Node;
825 function Body_Entity (Id : E) return E is
826 begin
827 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
828 return Node19 (Id);
829 end Body_Entity;
831 function Body_Needed_For_SAL (Id : E) return B is
832 begin
833 pragma Assert
834 (Ekind (Id) = E_Package
835 or else Is_Subprogram (Id)
836 or else Is_Generic_Unit (Id));
837 return Flag40 (Id);
838 end Body_Needed_For_SAL;
840 function Body_References (Id : E) return L is
841 begin
842 pragma Assert (Ekind (Id) = E_Abstract_State);
843 return Elist16 (Id);
844 end Body_References;
846 function BIP_Initialization_Call (Id : E) return N is
847 begin
848 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
849 return Node29 (Id);
850 end BIP_Initialization_Call;
852 function C_Pass_By_Copy (Id : E) return B is
853 begin
854 pragma Assert (Is_Record_Type (Id));
855 return Flag125 (Implementation_Base_Type (Id));
856 end C_Pass_By_Copy;
858 function Can_Never_Be_Null (Id : E) return B is
859 begin
860 return Flag38 (Id);
861 end Can_Never_Be_Null;
863 function Checks_May_Be_Suppressed (Id : E) return B is
864 begin
865 return Flag31 (Id);
866 end Checks_May_Be_Suppressed;
868 function Class_Wide_Postconds (Id : E) return S is
869 begin
870 pragma Assert (Is_Subprogram (Id));
871 return List39 (Id);
872 end Class_Wide_Postconds;
874 function Class_Wide_Preconds (Id : E) return S is
875 begin
876 pragma Assert (Is_Subprogram (Id));
877 return List38 (Id);
878 end Class_Wide_Preconds;
880 function Class_Wide_Type (Id : E) return E is
881 begin
882 pragma Assert (Is_Type (Id));
883 return Node9 (Id);
884 end Class_Wide_Type;
886 function Cloned_Subtype (Id : E) return E is
887 begin
888 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
889 return Node16 (Id);
890 end Cloned_Subtype;
892 function Component_Bit_Offset (Id : E) return U is
893 begin
894 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
895 return Uint11 (Id);
896 end Component_Bit_Offset;
898 function Component_Clause (Id : E) return N is
899 begin
900 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
901 return Node13 (Id);
902 end Component_Clause;
904 function Component_Size (Id : E) return U is
905 begin
906 pragma Assert (Is_Array_Type (Id));
907 return Uint22 (Implementation_Base_Type (Id));
908 end Component_Size;
910 function Component_Type (Id : E) return E is
911 begin
912 pragma Assert (Is_Array_Type (Id));
913 return Node20 (Implementation_Base_Type (Id));
914 end Component_Type;
916 function Corresponding_Concurrent_Type (Id : E) return E is
917 begin
918 pragma Assert (Ekind (Id) = E_Record_Type);
919 return Node18 (Id);
920 end Corresponding_Concurrent_Type;
922 function Corresponding_Discriminant (Id : E) return E is
923 begin
924 pragma Assert (Ekind (Id) = E_Discriminant);
925 return Node19 (Id);
926 end Corresponding_Discriminant;
928 function Corresponding_Equality (Id : E) return E is
929 begin
930 pragma Assert
931 (Ekind (Id) = E_Function
932 and then not Comes_From_Source (Id)
933 and then Chars (Id) = Name_Op_Ne);
934 return Node30 (Id);
935 end Corresponding_Equality;
937 function Corresponding_Function (Id : E) return E is
938 begin
939 pragma Assert (Ekind (Id) = E_Procedure);
940 return Node32 (Id);
941 end Corresponding_Function;
943 function Corresponding_Procedure (Id : E) return E is
944 begin
945 pragma Assert (Ekind (Id) = E_Function);
946 return Node32 (Id);
947 end Corresponding_Procedure;
949 function Corresponding_Protected_Entry (Id : E) return E is
950 begin
951 pragma Assert (Ekind (Id) = E_Subprogram_Body);
952 return Node18 (Id);
953 end Corresponding_Protected_Entry;
955 function Corresponding_Record_Type (Id : E) return E is
956 begin
957 pragma Assert (Is_Concurrent_Type (Id));
958 return Node18 (Id);
959 end Corresponding_Record_Type;
961 function Corresponding_Remote_Type (Id : E) return E is
962 begin
963 return Node22 (Id);
964 end Corresponding_Remote_Type;
966 function Current_Use_Clause (Id : E) return E is
967 begin
968 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
969 return Node27 (Id);
970 end Current_Use_Clause;
972 function Current_Value (Id : E) return N is
973 begin
974 pragma Assert (Ekind (Id) in Object_Kind);
975 return Node9 (Id);
976 end Current_Value;
978 function CR_Discriminant (Id : E) return E is
979 begin
980 return Node23 (Id);
981 end CR_Discriminant;
983 function Debug_Info_Off (Id : E) return B is
984 begin
985 return Flag166 (Id);
986 end Debug_Info_Off;
988 function Debug_Renaming_Link (Id : E) return E is
989 begin
990 return Node25 (Id);
991 end Debug_Renaming_Link;
993 function Default_Aspect_Component_Value (Id : E) return N is
994 begin
995 pragma Assert (Is_Array_Type (Id));
996 return Node19 (Base_Type (Id));
997 end Default_Aspect_Component_Value;
999 function Default_Aspect_Value (Id : E) return N is
1000 begin
1001 pragma Assert (Is_Scalar_Type (Id));
1002 return Node19 (Base_Type (Id));
1003 end Default_Aspect_Value;
1005 function Default_Expr_Function (Id : E) return E is
1006 begin
1007 pragma Assert (Is_Formal (Id));
1008 return Node21 (Id);
1009 end Default_Expr_Function;
1011 function Default_Expressions_Processed (Id : E) return B is
1012 begin
1013 return Flag108 (Id);
1014 end Default_Expressions_Processed;
1016 function Default_Value (Id : E) return N is
1017 begin
1018 pragma Assert (Is_Formal (Id));
1019 return Node20 (Id);
1020 end Default_Value;
1022 function Delay_Cleanups (Id : E) return B is
1023 begin
1024 return Flag114 (Id);
1025 end Delay_Cleanups;
1027 function Delay_Subprogram_Descriptors (Id : E) return B is
1028 begin
1029 return Flag50 (Id);
1030 end Delay_Subprogram_Descriptors;
1032 function Delta_Value (Id : E) return R is
1033 begin
1034 pragma Assert (Is_Fixed_Point_Type (Id));
1035 return Ureal18 (Id);
1036 end Delta_Value;
1038 function Dependent_Instances (Id : E) return L is
1039 begin
1040 pragma Assert (Is_Generic_Instance (Id));
1041 return Elist8 (Id);
1042 end Dependent_Instances;
1044 function Depends_On_Private (Id : E) return B is
1045 begin
1046 pragma Assert (Nkind (Id) in N_Entity);
1047 return Flag14 (Id);
1048 end Depends_On_Private;
1050 function Derived_Type_Link (Id : E) return E is
1051 begin
1052 pragma Assert (Is_Type (Id));
1053 return Node31 (Base_Type (Id));
1054 end Derived_Type_Link;
1056 function Digits_Value (Id : E) return U is
1057 begin
1058 pragma Assert
1059 (Is_Floating_Point_Type (Id)
1060 or else Is_Decimal_Fixed_Point_Type (Id));
1061 return Uint17 (Id);
1062 end Digits_Value;
1064 function Direct_Primitive_Operations (Id : E) return L is
1065 begin
1066 pragma Assert (Is_Tagged_Type (Id));
1067 return Elist10 (Id);
1068 end Direct_Primitive_Operations;
1070 function Directly_Designated_Type (Id : E) return E is
1071 begin
1072 pragma Assert (Is_Access_Type (Id));
1073 return Node20 (Id);
1074 end Directly_Designated_Type;
1076 function Disable_Controlled (Id : E) return B is
1077 begin
1078 return Flag253 (Base_Type (Id));
1079 end Disable_Controlled;
1081 function Discard_Names (Id : E) return B is
1082 begin
1083 return Flag88 (Id);
1084 end Discard_Names;
1086 function Discriminal (Id : E) return E is
1087 begin
1088 pragma Assert (Ekind (Id) = E_Discriminant);
1089 return Node17 (Id);
1090 end Discriminal;
1092 function Discriminal_Link (Id : E) return N is
1093 begin
1094 return Node10 (Id);
1095 end Discriminal_Link;
1097 function Discriminant_Checking_Func (Id : E) return E is
1098 begin
1099 pragma Assert (Ekind (Id) = E_Component);
1100 return Node20 (Id);
1101 end Discriminant_Checking_Func;
1103 function Discriminant_Constraint (Id : E) return L is
1104 begin
1105 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
1106 return Elist21 (Id);
1107 end Discriminant_Constraint;
1109 function Discriminant_Default_Value (Id : E) return N is
1110 begin
1111 pragma Assert (Ekind (Id) = E_Discriminant);
1112 return Node20 (Id);
1113 end Discriminant_Default_Value;
1115 function Discriminant_Number (Id : E) return U is
1116 begin
1117 pragma Assert (Ekind (Id) = E_Discriminant);
1118 return Uint15 (Id);
1119 end Discriminant_Number;
1121 function Dispatch_Table_Wrappers (Id : E) return L is
1122 begin
1123 pragma Assert (Ekind_In (Id, E_Record_Type,
1124 E_Record_Subtype));
1125 return Elist26 (Implementation_Base_Type (Id));
1126 end Dispatch_Table_Wrappers;
1128 function DT_Entry_Count (Id : E) return U is
1129 begin
1130 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1131 return Uint15 (Id);
1132 end DT_Entry_Count;
1134 function DT_Offset_To_Top_Func (Id : E) return E is
1135 begin
1136 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1137 return Node25 (Id);
1138 end DT_Offset_To_Top_Func;
1140 function DT_Position (Id : E) return U is
1141 begin
1142 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
1143 and then Present (DTC_Entity (Id)));
1144 return Uint15 (Id);
1145 end DT_Position;
1147 function DTC_Entity (Id : E) return E is
1148 begin
1149 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1150 return Node16 (Id);
1151 end DTC_Entity;
1153 function Elaborate_Body_Desirable (Id : E) return B is
1154 begin
1155 pragma Assert (Ekind (Id) = E_Package);
1156 return Flag210 (Id);
1157 end Elaborate_Body_Desirable;
1159 function Elaboration_Entity (Id : E) return E is
1160 begin
1161 pragma Assert
1162 (Is_Subprogram (Id)
1163 or else
1164 Ekind (Id) = E_Package
1165 or else
1166 Is_Generic_Unit (Id));
1167 return Node13 (Id);
1168 end Elaboration_Entity;
1170 function Elaboration_Entity_Required (Id : E) return B is
1171 begin
1172 pragma Assert
1173 (Is_Subprogram (Id)
1174 or else
1175 Ekind (Id) = E_Package
1176 or else
1177 Is_Generic_Unit (Id));
1178 return Flag174 (Id);
1179 end Elaboration_Entity_Required;
1181 function Encapsulating_State (Id : E) return N is
1182 begin
1183 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Constant, E_Variable));
1184 return Node32 (Id);
1185 end Encapsulating_State;
1187 function Enclosing_Scope (Id : E) return E is
1188 begin
1189 return Node18 (Id);
1190 end Enclosing_Scope;
1192 function Entry_Accepted (Id : E) return B is
1193 begin
1194 pragma Assert (Is_Entry (Id));
1195 return Flag152 (Id);
1196 end Entry_Accepted;
1198 function Entry_Bodies_Array (Id : E) return E is
1199 begin
1200 return Node19 (Id);
1201 end Entry_Bodies_Array;
1203 function Entry_Cancel_Parameter (Id : E) return E is
1204 begin
1205 return Node23 (Id);
1206 end Entry_Cancel_Parameter;
1208 function Entry_Component (Id : E) return E is
1209 begin
1210 return Node11 (Id);
1211 end Entry_Component;
1213 function Entry_Formal (Id : E) return E is
1214 begin
1215 return Node16 (Id);
1216 end Entry_Formal;
1218 function Entry_Index_Constant (Id : E) return N is
1219 begin
1220 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
1221 return Node18 (Id);
1222 end Entry_Index_Constant;
1224 function Contains_Ignored_Ghost_Code (Id : E) return B is
1225 begin
1226 pragma Assert
1227 (Ekind_In (Id, E_Block,
1228 E_Function,
1229 E_Generic_Function,
1230 E_Generic_Package,
1231 E_Generic_Procedure,
1232 E_Package,
1233 E_Package_Body,
1234 E_Procedure,
1235 E_Subprogram_Body));
1236 return Flag279 (Id);
1237 end Contains_Ignored_Ghost_Code;
1239 function Contract (Id : E) return N is
1240 begin
1241 pragma Assert
1242 (Ekind_In (Id, E_Protected_Type, -- concurrent variants
1243 E_Task_Body,
1244 E_Task_Type)
1245 or else
1246 Ekind_In (Id, E_Constant, -- object variants
1247 E_Variable)
1248 or else
1249 Ekind_In (Id, E_Entry, -- overloadable variants
1250 E_Entry_Family,
1251 E_Function,
1252 E_Generic_Function,
1253 E_Generic_Procedure,
1254 E_Operator,
1255 E_Procedure,
1256 E_Subprogram_Body)
1257 or else
1258 Ekind_In (Id, E_Generic_Package, -- package variants
1259 E_Package,
1260 E_Package_Body)
1261 or else
1262 Ekind (Id) = E_Void); -- special purpose
1263 return Node34 (Id);
1264 end Contract;
1266 function Contract_Wrapper (Id : E) return E is
1267 begin
1268 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
1269 return Node25 (Id);
1270 end Contract_Wrapper;
1272 function Entry_Parameters_Type (Id : E) return E is
1273 begin
1274 return Node15 (Id);
1275 end Entry_Parameters_Type;
1277 function Enum_Pos_To_Rep (Id : E) return E is
1278 begin
1279 pragma Assert (Ekind (Id) = E_Enumeration_Type);
1280 return Node23 (Id);
1281 end Enum_Pos_To_Rep;
1283 function Enumeration_Pos (Id : E) return Uint is
1284 begin
1285 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1286 return Uint11 (Id);
1287 end Enumeration_Pos;
1289 function Enumeration_Rep (Id : E) return U is
1290 begin
1291 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1292 return Uint12 (Id);
1293 end Enumeration_Rep;
1295 function Enumeration_Rep_Expr (Id : E) return N is
1296 begin
1297 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1298 return Node22 (Id);
1299 end Enumeration_Rep_Expr;
1301 function Equivalent_Type (Id : E) return E is
1302 begin
1303 pragma Assert
1304 (Ekind_In (Id, E_Class_Wide_Type,
1305 E_Class_Wide_Subtype,
1306 E_Access_Subprogram_Type,
1307 E_Access_Protected_Subprogram_Type,
1308 E_Anonymous_Access_Protected_Subprogram_Type,
1309 E_Access_Subprogram_Type,
1310 E_Exception_Type));
1311 return Node18 (Id);
1312 end Equivalent_Type;
1314 function Esize (Id : E) return Uint is
1315 begin
1316 return Uint12 (Id);
1317 end Esize;
1319 function Extra_Accessibility (Id : E) return E is
1320 begin
1321 pragma Assert
1322 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
1323 return Node13 (Id);
1324 end Extra_Accessibility;
1326 function Extra_Accessibility_Of_Result (Id : E) return E is
1327 begin
1328 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
1329 return Node19 (Id);
1330 end Extra_Accessibility_Of_Result;
1332 function Extra_Constrained (Id : E) return E is
1333 begin
1334 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1335 return Node23 (Id);
1336 end Extra_Constrained;
1338 function Extra_Formal (Id : E) return E is
1339 begin
1340 return Node15 (Id);
1341 end Extra_Formal;
1343 function Extra_Formals (Id : E) return E is
1344 begin
1345 pragma Assert
1346 (Is_Overloadable (Id)
1347 or else Ekind_In (Id, E_Entry_Family,
1348 E_Subprogram_Body,
1349 E_Subprogram_Type));
1350 return Node28 (Id);
1351 end Extra_Formals;
1353 function Can_Use_Internal_Rep (Id : E) return B is
1354 begin
1355 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1356 return Flag229 (Base_Type (Id));
1357 end Can_Use_Internal_Rep;
1359 function Finalization_Master (Id : E) return E is
1360 begin
1361 pragma Assert (Is_Access_Type (Id));
1362 return Node23 (Root_Type (Id));
1363 end Finalization_Master;
1365 function Finalize_Storage_Only (Id : E) return B is
1366 begin
1367 pragma Assert (Is_Type (Id));
1368 return Flag158 (Base_Type (Id));
1369 end Finalize_Storage_Only;
1371 function Finalizer (Id : E) return E is
1372 begin
1373 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
1374 return Node28 (Id);
1375 end Finalizer;
1377 function First_Entity (Id : E) return E is
1378 begin
1379 return Node17 (Id);
1380 end First_Entity;
1382 function First_Exit_Statement (Id : E) return N is
1383 begin
1384 pragma Assert (Ekind (Id) = E_Loop);
1385 return Node8 (Id);
1386 end First_Exit_Statement;
1388 function First_Index (Id : E) return N is
1389 begin
1390 pragma Assert (Is_Array_Type (Id));
1391 return Node17 (Id);
1392 end First_Index;
1394 function First_Literal (Id : E) return E is
1395 begin
1396 pragma Assert (Is_Enumeration_Type (Id));
1397 return Node17 (Id);
1398 end First_Literal;
1400 function First_Private_Entity (Id : E) return E is
1401 begin
1402 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1403 or else Ekind (Id) in Concurrent_Kind);
1404 return Node16 (Id);
1405 end First_Private_Entity;
1407 function First_Rep_Item (Id : E) return E is
1408 begin
1409 return Node6 (Id);
1410 end First_Rep_Item;
1412 function Freeze_Node (Id : E) return N is
1413 begin
1414 return Node7 (Id);
1415 end Freeze_Node;
1417 function From_Limited_With (Id : E) return B is
1418 begin
1419 return Flag159 (Id);
1420 end From_Limited_With;
1422 function Full_View (Id : E) return E is
1423 begin
1424 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1425 return Node11 (Id);
1426 end Full_View;
1428 function Generic_Homonym (Id : E) return E is
1429 begin
1430 pragma Assert (Ekind (Id) = E_Generic_Package);
1431 return Node11 (Id);
1432 end Generic_Homonym;
1434 function Generic_Renamings (Id : E) return L is
1435 begin
1436 return Elist23 (Id);
1437 end Generic_Renamings;
1439 function Handler_Records (Id : E) return S is
1440 begin
1441 return List10 (Id);
1442 end Handler_Records;
1444 function Has_Aliased_Components (Id : E) return B is
1445 begin
1446 return Flag135 (Implementation_Base_Type (Id));
1447 end Has_Aliased_Components;
1449 function Has_Alignment_Clause (Id : E) return B is
1450 begin
1451 return Flag46 (Id);
1452 end Has_Alignment_Clause;
1454 function Has_All_Calls_Remote (Id : E) return B is
1455 begin
1456 return Flag79 (Id);
1457 end Has_All_Calls_Remote;
1459 function Has_Atomic_Components (Id : E) return B is
1460 begin
1461 return Flag86 (Implementation_Base_Type (Id));
1462 end Has_Atomic_Components;
1464 function Has_Biased_Representation (Id : E) return B is
1465 begin
1466 return Flag139 (Id);
1467 end Has_Biased_Representation;
1469 function Has_Completion (Id : E) return B is
1470 begin
1471 return Flag26 (Id);
1472 end Has_Completion;
1474 function Has_Completion_In_Body (Id : E) return B is
1475 begin
1476 pragma Assert (Is_Type (Id));
1477 return Flag71 (Id);
1478 end Has_Completion_In_Body;
1480 function Has_Complex_Representation (Id : E) return B is
1481 begin
1482 pragma Assert (Is_Type (Id));
1483 return Flag140 (Implementation_Base_Type (Id));
1484 end Has_Complex_Representation;
1486 function Has_Component_Size_Clause (Id : E) return B is
1487 begin
1488 pragma Assert (Is_Array_Type (Id));
1489 return Flag68 (Implementation_Base_Type (Id));
1490 end Has_Component_Size_Clause;
1492 function Has_Constrained_Partial_View (Id : E) return B is
1493 begin
1494 pragma Assert (Is_Type (Id));
1495 return Flag187 (Id);
1496 end Has_Constrained_Partial_View;
1498 function Has_Controlled_Component (Id : E) return B is
1499 begin
1500 return Flag43 (Base_Type (Id));
1501 end Has_Controlled_Component;
1503 function Has_Contiguous_Rep (Id : E) return B is
1504 begin
1505 return Flag181 (Id);
1506 end Has_Contiguous_Rep;
1508 function Has_Controlling_Result (Id : E) return B is
1509 begin
1510 return Flag98 (Id);
1511 end Has_Controlling_Result;
1513 function Has_Convention_Pragma (Id : E) return B is
1514 begin
1515 return Flag119 (Id);
1516 end Has_Convention_Pragma;
1518 function Has_Default_Aspect (Id : E) return B is
1519 begin
1520 return Flag39 (Base_Type (Id));
1521 end Has_Default_Aspect;
1523 function Has_Default_Init_Cond (Id : E) return B is
1524 begin
1525 pragma Assert (Is_Type (Id));
1526 return Flag3 (Base_Type (Id));
1527 end Has_Default_Init_Cond;
1529 function Has_Delayed_Aspects (Id : E) return B is
1530 begin
1531 pragma Assert (Nkind (Id) in N_Entity);
1532 return Flag200 (Id);
1533 end Has_Delayed_Aspects;
1535 function Has_Delayed_Freeze (Id : E) return B is
1536 begin
1537 pragma Assert (Nkind (Id) in N_Entity);
1538 return Flag18 (Id);
1539 end Has_Delayed_Freeze;
1541 function Has_Delayed_Rep_Aspects (Id : E) return B is
1542 begin
1543 pragma Assert (Nkind (Id) in N_Entity);
1544 return Flag261 (Id);
1545 end Has_Delayed_Rep_Aspects;
1547 function Has_Discriminants (Id : E) return B is
1548 begin
1549 pragma Assert (Nkind (Id) in N_Entity);
1550 return Flag5 (Id);
1551 end Has_Discriminants;
1553 function Has_Dispatch_Table (Id : E) return B is
1554 begin
1555 pragma Assert (Is_Tagged_Type (Id));
1556 return Flag220 (Id);
1557 end Has_Dispatch_Table;
1559 function Has_Dynamic_Predicate_Aspect (Id : E) return B is
1560 begin
1561 pragma Assert (Is_Type (Id));
1562 return Flag258 (Id);
1563 end Has_Dynamic_Predicate_Aspect;
1565 function Has_Enumeration_Rep_Clause (Id : E) return B is
1566 begin
1567 pragma Assert (Is_Enumeration_Type (Id));
1568 return Flag66 (Id);
1569 end Has_Enumeration_Rep_Clause;
1571 function Has_Exit (Id : E) return B is
1572 begin
1573 return Flag47 (Id);
1574 end Has_Exit;
1576 function Has_Expanded_Contract (Id : E) return B is
1577 begin
1578 pragma Assert (Is_Subprogram (Id));
1579 return Flag240 (Id);
1580 end Has_Expanded_Contract;
1582 function Has_Forward_Instantiation (Id : E) return B is
1583 begin
1584 return Flag175 (Id);
1585 end Has_Forward_Instantiation;
1587 function Has_Fully_Qualified_Name (Id : E) return B is
1588 begin
1589 return Flag173 (Id);
1590 end Has_Fully_Qualified_Name;
1592 function Has_Gigi_Rep_Item (Id : E) return B is
1593 begin
1594 return Flag82 (Id);
1595 end Has_Gigi_Rep_Item;
1597 function Has_Homonym (Id : E) return B is
1598 begin
1599 return Flag56 (Id);
1600 end Has_Homonym;
1602 function Has_Implicit_Dereference (Id : E) return B is
1603 begin
1604 return Flag251 (Id);
1605 end Has_Implicit_Dereference;
1607 function Has_Independent_Components (Id : E) return B is
1608 begin
1609 return Flag34 (Implementation_Base_Type (Id));
1610 end Has_Independent_Components;
1612 function Has_Inheritable_Invariants (Id : E) return B is
1613 begin
1614 pragma Assert (Is_Type (Id));
1615 return Flag248 (Id);
1616 end Has_Inheritable_Invariants;
1618 function Has_Inherited_Default_Init_Cond (Id : E) return B is
1619 begin
1620 pragma Assert (Is_Type (Id));
1621 return Flag133 (Base_Type (Id));
1622 end Has_Inherited_Default_Init_Cond;
1624 function Has_Inherited_Invariants (Id : E) return B is
1625 begin
1626 pragma Assert (Is_Type (Id));
1627 return Flag291 (Id);
1628 end Has_Inherited_Invariants;
1630 function Has_Initial_Value (Id : E) return B is
1631 begin
1632 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1633 return Flag219 (Id);
1634 end Has_Initial_Value;
1636 function Has_Loop_Entry_Attributes (Id : E) return B is
1637 begin
1638 pragma Assert (Ekind (Id) = E_Loop);
1639 return Flag260 (Id);
1640 end Has_Loop_Entry_Attributes;
1642 function Has_Machine_Radix_Clause (Id : E) return B is
1643 begin
1644 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1645 return Flag83 (Id);
1646 end Has_Machine_Radix_Clause;
1648 function Has_Master_Entity (Id : E) return B is
1649 begin
1650 return Flag21 (Id);
1651 end Has_Master_Entity;
1653 function Has_Missing_Return (Id : E) return B is
1654 begin
1655 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1656 return Flag142 (Id);
1657 end Has_Missing_Return;
1659 function Has_Nested_Block_With_Handler (Id : E) return B is
1660 begin
1661 return Flag101 (Id);
1662 end Has_Nested_Block_With_Handler;
1664 function Has_Nested_Subprogram (Id : E) return B is
1665 begin
1666 pragma Assert (Is_Subprogram (Id));
1667 return Flag282 (Id);
1668 end Has_Nested_Subprogram;
1670 function Has_Non_Standard_Rep (Id : E) return B is
1671 begin
1672 return Flag75 (Implementation_Base_Type (Id));
1673 end Has_Non_Standard_Rep;
1675 function Has_Object_Size_Clause (Id : E) return B is
1676 begin
1677 pragma Assert (Is_Type (Id));
1678 return Flag172 (Id);
1679 end Has_Object_Size_Clause;
1681 function Has_Out_Or_In_Out_Parameter (Id : E) return B is
1682 begin
1683 pragma Assert
1684 (Ekind_In (Id, E_Entry, E_Entry_Family)
1685 or else Is_Subprogram_Or_Generic_Subprogram (Id));
1686 return Flag110 (Id);
1687 end Has_Out_Or_In_Out_Parameter;
1689 function Has_Own_Invariants (Id : E) return B is
1690 begin
1691 pragma Assert (Is_Type (Id));
1692 return Flag232 (Id);
1693 end Has_Own_Invariants;
1695 function Has_Partial_Visible_Refinement (Id : E) return B is
1696 begin
1697 pragma Assert (Ekind (Id) = E_Abstract_State);
1698 return Flag296 (Id);
1699 end Has_Partial_Visible_Refinement;
1701 function Has_Per_Object_Constraint (Id : E) return B is
1702 begin
1703 return Flag154 (Id);
1704 end Has_Per_Object_Constraint;
1706 function Has_Pragma_Controlled (Id : E) return B is
1707 begin
1708 pragma Assert (Is_Access_Type (Id));
1709 return Flag27 (Implementation_Base_Type (Id));
1710 end Has_Pragma_Controlled;
1712 function Has_Pragma_Elaborate_Body (Id : E) return B is
1713 begin
1714 return Flag150 (Id);
1715 end Has_Pragma_Elaborate_Body;
1717 function Has_Pragma_Inline (Id : E) return B is
1718 begin
1719 return Flag157 (Id);
1720 end Has_Pragma_Inline;
1722 function Has_Pragma_Inline_Always (Id : E) return B is
1723 begin
1724 return Flag230 (Id);
1725 end Has_Pragma_Inline_Always;
1727 function Has_Pragma_No_Inline (Id : E) return B is
1728 begin
1729 return Flag201 (Id);
1730 end Has_Pragma_No_Inline;
1732 function Has_Pragma_Ordered (Id : E) return B is
1733 begin
1734 pragma Assert (Is_Enumeration_Type (Id));
1735 return Flag198 (Implementation_Base_Type (Id));
1736 end Has_Pragma_Ordered;
1738 function Has_Pragma_Pack (Id : E) return B is
1739 begin
1740 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1741 return Flag121 (Implementation_Base_Type (Id));
1742 end Has_Pragma_Pack;
1744 function Has_Pragma_Preelab_Init (Id : E) return B is
1745 begin
1746 return Flag221 (Id);
1747 end Has_Pragma_Preelab_Init;
1749 function Has_Pragma_Pure (Id : E) return B is
1750 begin
1751 return Flag203 (Id);
1752 end Has_Pragma_Pure;
1754 function Has_Pragma_Pure_Function (Id : E) return B is
1755 begin
1756 return Flag179 (Id);
1757 end Has_Pragma_Pure_Function;
1759 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1760 begin
1761 return Flag169 (Id);
1762 end Has_Pragma_Thread_Local_Storage;
1764 function Has_Pragma_Unmodified (Id : E) return B is
1765 begin
1766 return Flag233 (Id);
1767 end Has_Pragma_Unmodified;
1769 function Has_Pragma_Unreferenced (Id : E) return B is
1770 begin
1771 return Flag180 (Id);
1772 end Has_Pragma_Unreferenced;
1774 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1775 begin
1776 pragma Assert (Is_Type (Id));
1777 return Flag212 (Id);
1778 end Has_Pragma_Unreferenced_Objects;
1780 function Has_Pragma_Unused (Id : E) return B is
1781 begin
1782 return Flag294 (Id);
1783 end Has_Pragma_Unused;
1785 function Has_Predicates (Id : E) return B is
1786 begin
1787 pragma Assert (Is_Type (Id));
1788 return Flag250 (Id);
1789 end Has_Predicates;
1791 function Has_Primitive_Operations (Id : E) return B is
1792 begin
1793 pragma Assert (Is_Type (Id));
1794 return Flag120 (Base_Type (Id));
1795 end Has_Primitive_Operations;
1797 function Has_Private_Ancestor (Id : E) return B is
1798 begin
1799 return Flag151 (Id);
1800 end Has_Private_Ancestor;
1802 function Has_Private_Declaration (Id : E) return B is
1803 begin
1804 return Flag155 (Id);
1805 end Has_Private_Declaration;
1807 function Has_Protected (Id : E) return B is
1808 begin
1809 return Flag271 (Base_Type (Id));
1810 end Has_Protected;
1812 function Has_Qualified_Name (Id : E) return B is
1813 begin
1814 return Flag161 (Id);
1815 end Has_Qualified_Name;
1817 function Has_RACW (Id : E) return B is
1818 begin
1819 pragma Assert (Ekind (Id) = E_Package);
1820 return Flag214 (Id);
1821 end Has_RACW;
1823 function Has_Record_Rep_Clause (Id : E) return B is
1824 begin
1825 pragma Assert (Is_Record_Type (Id));
1826 return Flag65 (Implementation_Base_Type (Id));
1827 end Has_Record_Rep_Clause;
1829 function Has_Recursive_Call (Id : E) return B is
1830 begin
1831 pragma Assert (Is_Subprogram (Id));
1832 return Flag143 (Id);
1833 end Has_Recursive_Call;
1835 function Has_Shift_Operator (Id : E) return B is
1836 begin
1837 pragma Assert (Is_Integer_Type (Id));
1838 return Flag267 (Base_Type (Id));
1839 end Has_Shift_Operator;
1841 function Has_Size_Clause (Id : E) return B is
1842 begin
1843 return Flag29 (Id);
1844 end Has_Size_Clause;
1846 function Has_Small_Clause (Id : E) return B is
1847 begin
1848 pragma Assert (Is_Ordinary_Fixed_Point_Type (Id));
1849 return Flag67 (Id);
1850 end Has_Small_Clause;
1852 function Has_Specified_Layout (Id : E) return B is
1853 begin
1854 pragma Assert (Is_Type (Id));
1855 return Flag100 (Implementation_Base_Type (Id));
1856 end Has_Specified_Layout;
1858 function Has_Specified_Stream_Input (Id : E) return B is
1859 begin
1860 pragma Assert (Is_Type (Id));
1861 return Flag190 (Id);
1862 end Has_Specified_Stream_Input;
1864 function Has_Specified_Stream_Output (Id : E) return B is
1865 begin
1866 pragma Assert (Is_Type (Id));
1867 return Flag191 (Id);
1868 end Has_Specified_Stream_Output;
1870 function Has_Specified_Stream_Read (Id : E) return B is
1871 begin
1872 pragma Assert (Is_Type (Id));
1873 return Flag192 (Id);
1874 end Has_Specified_Stream_Read;
1876 function Has_Specified_Stream_Write (Id : E) return B is
1877 begin
1878 pragma Assert (Is_Type (Id));
1879 return Flag193 (Id);
1880 end Has_Specified_Stream_Write;
1882 function Has_Static_Discriminants (Id : E) return B is
1883 begin
1884 pragma Assert (Is_Type (Id));
1885 return Flag211 (Id);
1886 end Has_Static_Discriminants;
1888 function Has_Static_Predicate (Id : E) return B is
1889 begin
1890 pragma Assert (Is_Type (Id));
1891 return Flag269 (Id);
1892 end Has_Static_Predicate;
1894 function Has_Static_Predicate_Aspect (Id : E) return B is
1895 begin
1896 pragma Assert (Is_Type (Id));
1897 return Flag259 (Id);
1898 end Has_Static_Predicate_Aspect;
1900 function Has_Storage_Size_Clause (Id : E) return B is
1901 begin
1902 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1903 return Flag23 (Implementation_Base_Type (Id));
1904 end Has_Storage_Size_Clause;
1906 function Has_Stream_Size_Clause (Id : E) return B is
1907 begin
1908 return Flag184 (Id);
1909 end Has_Stream_Size_Clause;
1911 function Has_Task (Id : E) return B is
1912 begin
1913 return Flag30 (Base_Type (Id));
1914 end Has_Task;
1916 function Has_Thunks (Id : E) return B is
1917 begin
1918 return Flag228 (Id);
1919 end Has_Thunks;
1921 function Has_Timing_Event (Id : E) return B is
1922 begin
1923 return Flag289 (Base_Type (Id));
1924 end Has_Timing_Event;
1926 function Has_Unchecked_Union (Id : E) return B is
1927 begin
1928 return Flag123 (Base_Type (Id));
1929 end Has_Unchecked_Union;
1931 function Has_Unknown_Discriminants (Id : E) return B is
1932 begin
1933 pragma Assert (Is_Type (Id));
1934 return Flag72 (Id);
1935 end Has_Unknown_Discriminants;
1937 function Has_Visible_Refinement (Id : E) return B is
1938 begin
1939 pragma Assert (Ekind (Id) = E_Abstract_State);
1940 return Flag263 (Id);
1941 end Has_Visible_Refinement;
1943 function Has_Volatile_Components (Id : E) return B is
1944 begin
1945 return Flag87 (Implementation_Base_Type (Id));
1946 end Has_Volatile_Components;
1948 function Has_Xref_Entry (Id : E) return B is
1949 begin
1950 return Flag182 (Id);
1951 end Has_Xref_Entry;
1953 function Hiding_Loop_Variable (Id : E) return E is
1954 begin
1955 pragma Assert (Ekind (Id) = E_Variable);
1956 return Node8 (Id);
1957 end Hiding_Loop_Variable;
1959 function Homonym (Id : E) return E is
1960 begin
1961 return Node4 (Id);
1962 end Homonym;
1964 function Import_Pragma (Id : E) return E is
1965 begin
1966 pragma Assert (Is_Subprogram (Id));
1967 return Node35 (Id);
1968 end Import_Pragma;
1970 function Incomplete_Actuals (Id : E) return L is
1971 begin
1972 pragma Assert (Ekind (Id) = E_Package);
1973 return Elist24 (Id);
1974 end Incomplete_Actuals;
1976 function Interface_Alias (Id : E) return E is
1977 begin
1978 pragma Assert (Is_Subprogram (Id));
1979 return Node25 (Id);
1980 end Interface_Alias;
1982 function Interfaces (Id : E) return L is
1983 begin
1984 pragma Assert (Is_Record_Type (Id));
1985 return Elist25 (Id);
1986 end Interfaces;
1988 function In_Package_Body (Id : E) return B is
1989 begin
1990 return Flag48 (Id);
1991 end In_Package_Body;
1993 function In_Private_Part (Id : E) return B is
1994 begin
1995 return Flag45 (Id);
1996 end In_Private_Part;
1998 function In_Use (Id : E) return B is
1999 begin
2000 pragma Assert (Nkind (Id) in N_Entity);
2001 return Flag8 (Id);
2002 end In_Use;
2004 function Initialization_Statements (Id : E) return N is
2005 begin
2006 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2007 return Node28 (Id);
2008 end Initialization_Statements;
2010 function Inner_Instances (Id : E) return L is
2011 begin
2012 return Elist23 (Id);
2013 end Inner_Instances;
2015 function Interface_Name (Id : E) return N is
2016 begin
2017 return Node21 (Id);
2018 end Interface_Name;
2020 function Is_Abstract_Subprogram (Id : E) return B is
2021 begin
2022 pragma Assert (Is_Overloadable (Id));
2023 return Flag19 (Id);
2024 end Is_Abstract_Subprogram;
2026 function Is_Abstract_Type (Id : E) return B is
2027 begin
2028 pragma Assert (Is_Type (Id));
2029 return Flag146 (Id);
2030 end Is_Abstract_Type;
2032 function Is_Access_Constant (Id : E) return B is
2033 begin
2034 pragma Assert (Is_Access_Type (Id));
2035 return Flag69 (Id);
2036 end Is_Access_Constant;
2038 function Is_Actual_Subtype (Id : E) return B is
2039 begin
2040 pragma Assert (Is_Type (Id));
2041 return Flag293 (Id);
2042 end Is_Actual_Subtype;
2044 function Is_Ada_2005_Only (Id : E) return B is
2045 begin
2046 return Flag185 (Id);
2047 end Is_Ada_2005_Only;
2049 function Is_Ada_2012_Only (Id : E) return B is
2050 begin
2051 return Flag199 (Id);
2052 end Is_Ada_2012_Only;
2054 function Is_Aliased (Id : E) return B is
2055 begin
2056 pragma Assert (Nkind (Id) in N_Entity);
2057 return Flag15 (Id);
2058 end Is_Aliased;
2060 function Is_Asynchronous (Id : E) return B is
2061 begin
2062 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
2063 return Flag81 (Id);
2064 end Is_Asynchronous;
2066 function Is_Atomic (Id : E) return B is
2067 begin
2068 return Flag85 (Id);
2069 end Is_Atomic;
2071 function Is_Bit_Packed_Array (Id : E) return B is
2072 begin
2073 return Flag122 (Implementation_Base_Type (Id));
2074 end Is_Bit_Packed_Array;
2076 function Is_Called (Id : E) return B is
2077 begin
2078 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
2079 return Flag102 (Id);
2080 end Is_Called;
2082 function Is_Character_Type (Id : E) return B is
2083 begin
2084 return Flag63 (Id);
2085 end Is_Character_Type;
2087 function Is_Checked_Ghost_Entity (Id : E) return B is
2088 begin
2089 pragma Assert (Nkind (Id) in N_Entity);
2090 return Flag277 (Id);
2091 end Is_Checked_Ghost_Entity;
2093 function Is_Child_Unit (Id : E) return B is
2094 begin
2095 return Flag73 (Id);
2096 end Is_Child_Unit;
2098 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
2099 begin
2100 return Flag35 (Id);
2101 end Is_Class_Wide_Equivalent_Type;
2103 function Is_Compilation_Unit (Id : E) return B is
2104 begin
2105 return Flag149 (Id);
2106 end Is_Compilation_Unit;
2108 function Is_Completely_Hidden (Id : E) return B is
2109 begin
2110 pragma Assert (Ekind (Id) = E_Discriminant);
2111 return Flag103 (Id);
2112 end Is_Completely_Hidden;
2114 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
2115 begin
2116 return Flag80 (Id);
2117 end Is_Constr_Subt_For_U_Nominal;
2119 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
2120 begin
2121 return Flag141 (Id);
2122 end Is_Constr_Subt_For_UN_Aliased;
2124 function Is_Constrained (Id : E) return B is
2125 begin
2126 pragma Assert (Nkind (Id) in N_Entity);
2127 return Flag12 (Id);
2128 end Is_Constrained;
2130 function Is_Constructor (Id : E) return B is
2131 begin
2132 return Flag76 (Id);
2133 end Is_Constructor;
2135 function Is_Controlled (Id : E) return B is
2136 begin
2137 return Flag42 (Base_Type (Id));
2138 end Is_Controlled;
2140 function Is_Controlling_Formal (Id : E) return B is
2141 begin
2142 pragma Assert (Is_Formal (Id));
2143 return Flag97 (Id);
2144 end Is_Controlling_Formal;
2146 function Is_CPP_Class (Id : E) return B is
2147 begin
2148 return Flag74 (Id);
2149 end Is_CPP_Class;
2151 function Is_Default_Init_Cond_Procedure (Id : E) return B is
2152 begin
2153 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2154 return Flag132 (Id);
2155 end Is_Default_Init_Cond_Procedure;
2157 function Is_Descendant_Of_Address (Id : E) return B is
2158 begin
2159 return Flag223 (Id);
2160 end Is_Descendant_Of_Address;
2162 function Is_Discrim_SO_Function (Id : E) return B is
2163 begin
2164 return Flag176 (Id);
2165 end Is_Discrim_SO_Function;
2167 function Is_Discriminant_Check_Function (Id : E) return B is
2168 begin
2169 return Flag264 (Id);
2170 end Is_Discriminant_Check_Function;
2172 function Is_Dispatch_Table_Entity (Id : E) return B is
2173 begin
2174 return Flag234 (Id);
2175 end Is_Dispatch_Table_Entity;
2177 function Is_Dispatching_Operation (Id : E) return B is
2178 begin
2179 pragma Assert (Nkind (Id) in N_Entity);
2180 return Flag6 (Id);
2181 end Is_Dispatching_Operation;
2183 function Is_Eliminated (Id : E) return B is
2184 begin
2185 return Flag124 (Id);
2186 end Is_Eliminated;
2188 function Is_Entry_Formal (Id : E) return B is
2189 begin
2190 return Flag52 (Id);
2191 end Is_Entry_Formal;
2193 function Is_Exception_Handler (Id : E) return B is
2194 begin
2195 pragma Assert (Ekind (Id) = E_Block);
2196 return Flag286 (Id);
2197 end Is_Exception_Handler;
2199 function Is_Exported (Id : E) return B is
2200 begin
2201 return Flag99 (Id);
2202 end Is_Exported;
2204 function Is_Finalized_Transient (Id : E) return B is
2205 begin
2206 pragma Assert (Ekind_In (Id, E_Constant, E_Loop_Parameter, E_Variable));
2207 return Flag252 (Id);
2208 end Is_Finalized_Transient;
2210 function Is_First_Subtype (Id : E) return B is
2211 begin
2212 return Flag70 (Id);
2213 end Is_First_Subtype;
2215 function Is_For_Access_Subtype (Id : E) return B is
2216 begin
2217 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
2218 return Flag118 (Id);
2219 end Is_For_Access_Subtype;
2221 function Is_Formal_Subprogram (Id : E) return B is
2222 begin
2223 return Flag111 (Id);
2224 end Is_Formal_Subprogram;
2226 function Is_Frozen (Id : E) return B is
2227 begin
2228 return Flag4 (Id);
2229 end Is_Frozen;
2231 function Is_Generic_Actual_Subprogram (Id : E) return B is
2232 begin
2233 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2234 return Flag274 (Id);
2235 end Is_Generic_Actual_Subprogram;
2237 function Is_Generic_Actual_Type (Id : E) return B is
2238 begin
2239 pragma Assert (Is_Type (Id));
2240 return Flag94 (Id);
2241 end Is_Generic_Actual_Type;
2243 function Is_Generic_Instance (Id : E) return B is
2244 begin
2245 return Flag130 (Id);
2246 end Is_Generic_Instance;
2248 function Is_Generic_Type (Id : E) return B is
2249 begin
2250 pragma Assert (Nkind (Id) in N_Entity);
2251 return Flag13 (Id);
2252 end Is_Generic_Type;
2254 function Is_Hidden (Id : E) return B is
2255 begin
2256 return Flag57 (Id);
2257 end Is_Hidden;
2259 function Is_Hidden_Non_Overridden_Subpgm (Id : E) return B is
2260 begin
2261 return Flag2 (Id);
2262 end Is_Hidden_Non_Overridden_Subpgm;
2264 function Is_Hidden_Open_Scope (Id : E) return B is
2265 begin
2266 return Flag171 (Id);
2267 end Is_Hidden_Open_Scope;
2269 function Is_Ignored_Ghost_Entity (Id : E) return B is
2270 begin
2271 pragma Assert (Nkind (Id) in N_Entity);
2272 return Flag278 (Id);
2273 end Is_Ignored_Ghost_Entity;
2275 function Is_Ignored_Transient (Id : E) return B is
2276 begin
2277 pragma Assert (Ekind_In (Id, E_Constant, E_Loop_Parameter, E_Variable));
2278 return Flag295 (Id);
2279 end Is_Ignored_Transient;
2281 function Is_Immediately_Visible (Id : E) return B is
2282 begin
2283 pragma Assert (Nkind (Id) in N_Entity);
2284 return Flag7 (Id);
2285 end Is_Immediately_Visible;
2287 function Is_Implementation_Defined (Id : E) return B is
2288 begin
2289 return Flag254 (Id);
2290 end Is_Implementation_Defined;
2292 function Is_Imported (Id : E) return B is
2293 begin
2294 return Flag24 (Id);
2295 end Is_Imported;
2297 function Is_Independent (Id : E) return B is
2298 begin
2299 return Flag268 (Id);
2300 end Is_Independent;
2302 function Is_Inlined (Id : E) return B is
2303 begin
2304 return Flag11 (Id);
2305 end Is_Inlined;
2307 function Is_Inlined_Always (Id : E) return B is
2308 begin
2309 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2310 return Flag1 (Id);
2311 end Is_Inlined_Always;
2313 function Is_Interface (Id : E) return B is
2314 begin
2315 return Flag186 (Id);
2316 end Is_Interface;
2318 function Is_Instantiated (Id : E) return B is
2319 begin
2320 return Flag126 (Id);
2321 end Is_Instantiated;
2323 function Is_Internal (Id : E) return B is
2324 begin
2325 pragma Assert (Nkind (Id) in N_Entity);
2326 return Flag17 (Id);
2327 end Is_Internal;
2329 function Is_Interrupt_Handler (Id : E) return B is
2330 begin
2331 pragma Assert (Nkind (Id) in N_Entity);
2332 return Flag89 (Id);
2333 end Is_Interrupt_Handler;
2335 function Is_Intrinsic_Subprogram (Id : E) return B is
2336 begin
2337 return Flag64 (Id);
2338 end Is_Intrinsic_Subprogram;
2340 function Is_Invariant_Procedure (Id : E) return B is
2341 begin
2342 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2343 return Flag257 (Id);
2344 end Is_Invariant_Procedure;
2346 function Is_Itype (Id : E) return B is
2347 begin
2348 return Flag91 (Id);
2349 end Is_Itype;
2351 function Is_Known_Non_Null (Id : E) return B is
2352 begin
2353 return Flag37 (Id);
2354 end Is_Known_Non_Null;
2356 function Is_Known_Null (Id : E) return B is
2357 begin
2358 return Flag204 (Id);
2359 end Is_Known_Null;
2361 function Is_Known_Valid (Id : E) return B is
2362 begin
2363 return Flag170 (Id);
2364 end Is_Known_Valid;
2366 function Is_Limited_Composite (Id : E) return B is
2367 begin
2368 return Flag106 (Id);
2369 end Is_Limited_Composite;
2371 function Is_Limited_Interface (Id : E) return B is
2372 begin
2373 return Flag197 (Id);
2374 end Is_Limited_Interface;
2376 function Is_Limited_Record (Id : E) return B is
2377 begin
2378 return Flag25 (Id);
2379 end Is_Limited_Record;
2381 function Is_Local_Anonymous_Access (Id : E) return B is
2382 begin
2383 pragma Assert (Is_Access_Type (Id));
2384 return Flag194 (Id);
2385 end Is_Local_Anonymous_Access;
2387 function Is_Machine_Code_Subprogram (Id : E) return B is
2388 begin
2389 pragma Assert (Is_Subprogram (Id));
2390 return Flag137 (Id);
2391 end Is_Machine_Code_Subprogram;
2393 function Is_Non_Static_Subtype (Id : E) return B is
2394 begin
2395 pragma Assert (Is_Type (Id));
2396 return Flag109 (Id);
2397 end Is_Non_Static_Subtype;
2399 function Is_Null_Init_Proc (Id : E) return B is
2400 begin
2401 pragma Assert (Ekind (Id) = E_Procedure);
2402 return Flag178 (Id);
2403 end Is_Null_Init_Proc;
2405 function Is_Obsolescent (Id : E) return B is
2406 begin
2407 return Flag153 (Id);
2408 end Is_Obsolescent;
2410 function Is_Only_Out_Parameter (Id : E) return B is
2411 begin
2412 pragma Assert (Is_Formal (Id));
2413 return Flag226 (Id);
2414 end Is_Only_Out_Parameter;
2416 function Is_Package_Body_Entity (Id : E) return B is
2417 begin
2418 return Flag160 (Id);
2419 end Is_Package_Body_Entity;
2421 function Is_Packed (Id : E) return B is
2422 begin
2423 return Flag51 (Implementation_Base_Type (Id));
2424 end Is_Packed;
2426 function Is_Packed_Array_Impl_Type (Id : E) return B is
2427 begin
2428 return Flag138 (Id);
2429 end Is_Packed_Array_Impl_Type;
2431 function Is_Param_Block_Component_Type (Id : E) return B is
2432 begin
2433 pragma Assert (Is_Access_Type (Id));
2434 return Flag215 (Base_Type (Id));
2435 end Is_Param_Block_Component_Type;
2437 function Is_Partial_Invariant_Procedure (Id : E) return B is
2438 begin
2439 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2440 return Flag292 (Id);
2441 end Is_Partial_Invariant_Procedure;
2443 function Is_Potentially_Use_Visible (Id : E) return B is
2444 begin
2445 pragma Assert (Nkind (Id) in N_Entity);
2446 return Flag9 (Id);
2447 end Is_Potentially_Use_Visible;
2449 function Is_Predicate_Function (Id : E) return B is
2450 begin
2451 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2452 return Flag255 (Id);
2453 end Is_Predicate_Function;
2455 function Is_Predicate_Function_M (Id : E) return B is
2456 begin
2457 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2458 return Flag256 (Id);
2459 end Is_Predicate_Function_M;
2461 function Is_Preelaborated (Id : E) return B is
2462 begin
2463 return Flag59 (Id);
2464 end Is_Preelaborated;
2466 function Is_Primitive (Id : E) return B is
2467 begin
2468 pragma Assert
2469 (Is_Overloadable (Id)
2470 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
2471 return Flag218 (Id);
2472 end Is_Primitive;
2474 function Is_Primitive_Wrapper (Id : E) return B is
2475 begin
2476 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2477 return Flag195 (Id);
2478 end Is_Primitive_Wrapper;
2480 function Is_Private_Composite (Id : E) return B is
2481 begin
2482 pragma Assert (Is_Type (Id));
2483 return Flag107 (Id);
2484 end Is_Private_Composite;
2486 function Is_Private_Descendant (Id : E) return B is
2487 begin
2488 return Flag53 (Id);
2489 end Is_Private_Descendant;
2491 function Is_Private_Primitive (Id : E) return B is
2492 begin
2493 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2494 return Flag245 (Id);
2495 end Is_Private_Primitive;
2497 function Is_Public (Id : E) return B is
2498 begin
2499 pragma Assert (Nkind (Id) in N_Entity);
2500 return Flag10 (Id);
2501 end Is_Public;
2503 function Is_Pure (Id : E) return B is
2504 begin
2505 return Flag44 (Id);
2506 end Is_Pure;
2508 function Is_Pure_Unit_Access_Type (Id : E) return B is
2509 begin
2510 pragma Assert (Is_Access_Type (Id));
2511 return Flag189 (Id);
2512 end Is_Pure_Unit_Access_Type;
2514 function Is_RACW_Stub_Type (Id : E) return B is
2515 begin
2516 pragma Assert (Is_Type (Id));
2517 return Flag244 (Id);
2518 end Is_RACW_Stub_Type;
2520 function Is_Raised (Id : E) return B is
2521 begin
2522 pragma Assert (Ekind (Id) = E_Exception);
2523 return Flag224 (Id);
2524 end Is_Raised;
2526 function Is_Remote_Call_Interface (Id : E) return B is
2527 begin
2528 return Flag62 (Id);
2529 end Is_Remote_Call_Interface;
2531 function Is_Remote_Types (Id : E) return B is
2532 begin
2533 return Flag61 (Id);
2534 end Is_Remote_Types;
2536 function Is_Renaming_Of_Object (Id : E) return B is
2537 begin
2538 return Flag112 (Id);
2539 end Is_Renaming_Of_Object;
2541 function Is_Return_Object (Id : E) return B is
2542 begin
2543 return Flag209 (Id);
2544 end Is_Return_Object;
2546 function Is_Safe_To_Reevaluate (Id : E) return B is
2547 begin
2548 return Flag249 (Id);
2549 end Is_Safe_To_Reevaluate;
2551 function Is_Shared_Passive (Id : E) return B is
2552 begin
2553 return Flag60 (Id);
2554 end Is_Shared_Passive;
2556 function Is_Static_Type (Id : E) return B is
2557 begin
2558 return Flag281 (Id);
2559 end Is_Static_Type;
2561 function Is_Statically_Allocated (Id : E) return B is
2562 begin
2563 return Flag28 (Id);
2564 end Is_Statically_Allocated;
2566 function Is_Tag (Id : E) return B is
2567 begin
2568 pragma Assert (Nkind (Id) in N_Entity);
2569 return Flag78 (Id);
2570 end Is_Tag;
2572 function Is_Tagged_Type (Id : E) return B is
2573 begin
2574 return Flag55 (Id);
2575 end Is_Tagged_Type;
2577 function Is_Thunk (Id : E) return B is
2578 begin
2579 return Flag225 (Id);
2580 end Is_Thunk;
2582 function Is_Trivial_Subprogram (Id : E) return B is
2583 begin
2584 return Flag235 (Id);
2585 end Is_Trivial_Subprogram;
2587 function Is_True_Constant (Id : E) return B is
2588 begin
2589 return Flag163 (Id);
2590 end Is_True_Constant;
2592 function Is_Unchecked_Union (Id : E) return B is
2593 begin
2594 return Flag117 (Implementation_Base_Type (Id));
2595 end Is_Unchecked_Union;
2597 function Is_Underlying_Record_View (Id : E) return B is
2598 begin
2599 return Flag246 (Id);
2600 end Is_Underlying_Record_View;
2602 function Is_Unimplemented (Id : E) return B is
2603 begin
2604 return Flag284 (Id);
2605 end Is_Unimplemented;
2607 function Is_Unsigned_Type (Id : E) return B is
2608 begin
2609 pragma Assert (Is_Type (Id));
2610 return Flag144 (Id);
2611 end Is_Unsigned_Type;
2613 function Is_Uplevel_Referenced_Entity (Id : E) return B is
2614 begin
2615 return Flag283 (Id);
2616 end Is_Uplevel_Referenced_Entity;
2618 function Is_Valued_Procedure (Id : E) return B is
2619 begin
2620 pragma Assert (Ekind (Id) = E_Procedure);
2621 return Flag127 (Id);
2622 end Is_Valued_Procedure;
2624 function Is_Visible_Formal (Id : E) return B is
2625 begin
2626 return Flag206 (Id);
2627 end Is_Visible_Formal;
2629 function Is_Visible_Lib_Unit (Id : E) return B is
2630 begin
2631 return Flag116 (Id);
2632 end Is_Visible_Lib_Unit;
2634 function Is_Volatile (Id : E) return B is
2635 begin
2636 pragma Assert (Nkind (Id) in N_Entity);
2638 if Is_Type (Id) then
2639 return Flag16 (Base_Type (Id));
2640 else
2641 return Flag16 (Id);
2642 end if;
2643 end Is_Volatile;
2645 function Is_Volatile_Full_Access (Id : E) return B is
2646 begin
2647 return Flag285 (Id);
2648 end Is_Volatile_Full_Access;
2650 function Itype_Printed (Id : E) return B is
2651 begin
2652 pragma Assert (Is_Itype (Id));
2653 return Flag202 (Id);
2654 end Itype_Printed;
2656 function Kill_Elaboration_Checks (Id : E) return B is
2657 begin
2658 return Flag32 (Id);
2659 end Kill_Elaboration_Checks;
2661 function Kill_Range_Checks (Id : E) return B is
2662 begin
2663 return Flag33 (Id);
2664 end Kill_Range_Checks;
2666 function Known_To_Have_Preelab_Init (Id : E) return B is
2667 begin
2668 pragma Assert (Is_Type (Id));
2669 return Flag207 (Id);
2670 end Known_To_Have_Preelab_Init;
2672 function Last_Aggregate_Assignment (Id : E) return N is
2673 begin
2674 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2675 return Node30 (Id);
2676 end Last_Aggregate_Assignment;
2678 function Last_Assignment (Id : E) return N is
2679 begin
2680 pragma Assert (Is_Assignable (Id));
2681 return Node26 (Id);
2682 end Last_Assignment;
2684 function Last_Entity (Id : E) return E is
2685 begin
2686 return Node20 (Id);
2687 end Last_Entity;
2689 function Limited_View (Id : E) return E is
2690 begin
2691 pragma Assert (Ekind (Id) = E_Package);
2692 return Node23 (Id);
2693 end Limited_View;
2695 function Linker_Section_Pragma (Id : E) return N is
2696 begin
2697 pragma Assert
2698 (Is_Type (Id) or else Is_Object (Id) or else Is_Subprogram (Id));
2699 return Node33 (Id);
2700 end Linker_Section_Pragma;
2702 function Lit_Indexes (Id : E) return E is
2703 begin
2704 pragma Assert (Is_Enumeration_Type (Id));
2705 return Node18 (Id);
2706 end Lit_Indexes;
2708 function Lit_Strings (Id : E) return E is
2709 begin
2710 pragma Assert (Is_Enumeration_Type (Id));
2711 return Node16 (Id);
2712 end Lit_Strings;
2714 function Low_Bound_Tested (Id : E) return B is
2715 begin
2716 return Flag205 (Id);
2717 end Low_Bound_Tested;
2719 function Machine_Radix_10 (Id : E) return B is
2720 begin
2721 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2722 return Flag84 (Id);
2723 end Machine_Radix_10;
2725 function Master_Id (Id : E) return E is
2726 begin
2727 pragma Assert (Is_Access_Type (Id));
2728 return Node17 (Id);
2729 end Master_Id;
2731 function Materialize_Entity (Id : E) return B is
2732 begin
2733 return Flag168 (Id);
2734 end Materialize_Entity;
2736 function May_Inherit_Delayed_Rep_Aspects (Id : E) return B is
2737 begin
2738 return Flag262 (Id);
2739 end May_Inherit_Delayed_Rep_Aspects;
2741 function Mechanism (Id : E) return M is
2742 begin
2743 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2744 return UI_To_Int (Uint8 (Id));
2745 end Mechanism;
2747 function Modulus (Id : E) return Uint is
2748 begin
2749 pragma Assert (Is_Modular_Integer_Type (Id));
2750 return Uint17 (Base_Type (Id));
2751 end Modulus;
2753 function Must_Be_On_Byte_Boundary (Id : E) return B is
2754 begin
2755 pragma Assert (Is_Type (Id));
2756 return Flag183 (Id);
2757 end Must_Be_On_Byte_Boundary;
2759 function Must_Have_Preelab_Init (Id : E) return B is
2760 begin
2761 pragma Assert (Is_Type (Id));
2762 return Flag208 (Id);
2763 end Must_Have_Preelab_Init;
2765 function Needs_Debug_Info (Id : E) return B is
2766 begin
2767 return Flag147 (Id);
2768 end Needs_Debug_Info;
2770 function Needs_No_Actuals (Id : E) return B is
2771 begin
2772 pragma Assert
2773 (Is_Overloadable (Id)
2774 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2775 return Flag22 (Id);
2776 end Needs_No_Actuals;
2778 function Never_Set_In_Source (Id : E) return B is
2779 begin
2780 return Flag115 (Id);
2781 end Never_Set_In_Source;
2783 function Next_Inlined_Subprogram (Id : E) return E is
2784 begin
2785 return Node12 (Id);
2786 end Next_Inlined_Subprogram;
2788 function No_Dynamic_Predicate_On_Actual (Id : E) return Boolean is
2789 begin
2790 pragma Assert (Is_Discrete_Type (Id));
2791 return Flag276 (Id);
2792 end No_Dynamic_Predicate_On_Actual;
2794 function No_Pool_Assigned (Id : E) return B is
2795 begin
2796 pragma Assert (Is_Access_Type (Id));
2797 return Flag131 (Root_Type (Id));
2798 end No_Pool_Assigned;
2800 function No_Predicate_On_Actual (Id : E) return Boolean is
2801 begin
2802 pragma Assert (Is_Discrete_Type (Id));
2803 return Flag275 (Id);
2804 end No_Predicate_On_Actual;
2806 function No_Return (Id : E) return B is
2807 begin
2808 return Flag113 (Id);
2809 end No_Return;
2811 function No_Strict_Aliasing (Id : E) return B is
2812 begin
2813 pragma Assert (Is_Access_Type (Id));
2814 return Flag136 (Base_Type (Id));
2815 end No_Strict_Aliasing;
2817 function No_Tagged_Streams_Pragma (Id : E) return N is
2818 begin
2819 pragma Assert (Is_Tagged_Type (Id));
2820 return Node32 (Id);
2821 end No_Tagged_Streams_Pragma;
2823 function Non_Binary_Modulus (Id : E) return B is
2824 begin
2825 pragma Assert (Is_Type (Id));
2826 return Flag58 (Base_Type (Id));
2827 end Non_Binary_Modulus;
2829 function Non_Limited_View (Id : E) return E is
2830 begin
2831 pragma Assert
2832 (Ekind (Id) in Incomplete_Kind
2833 or else
2834 Ekind (Id) in Class_Wide_Kind
2835 or else
2836 Ekind (Id) = E_Abstract_State);
2837 return Node19 (Id);
2838 end Non_Limited_View;
2840 function Nonzero_Is_True (Id : E) return B is
2841 begin
2842 pragma Assert (Root_Type (Id) = Standard_Boolean);
2843 return Flag162 (Base_Type (Id));
2844 end Nonzero_Is_True;
2846 function Normalized_First_Bit (Id : E) return U is
2847 begin
2848 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2849 return Uint8 (Id);
2850 end Normalized_First_Bit;
2852 function Normalized_Position (Id : E) return U is
2853 begin
2854 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2855 return Uint14 (Id);
2856 end Normalized_Position;
2858 function Normalized_Position_Max (Id : E) return U is
2859 begin
2860 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2861 return Uint10 (Id);
2862 end Normalized_Position_Max;
2864 function OK_To_Rename (Id : E) return B is
2865 begin
2866 pragma Assert (Ekind (Id) = E_Variable);
2867 return Flag247 (Id);
2868 end OK_To_Rename;
2870 function OK_To_Reorder_Components (Id : E) return B is
2871 begin
2872 pragma Assert (Is_Record_Type (Id));
2873 return Flag239 (Base_Type (Id));
2874 end OK_To_Reorder_Components;
2876 function Optimize_Alignment_Space (Id : E) return B is
2877 begin
2878 pragma Assert
2879 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2880 return Flag241 (Id);
2881 end Optimize_Alignment_Space;
2883 function Optimize_Alignment_Time (Id : E) return B is
2884 begin
2885 pragma Assert
2886 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2887 return Flag242 (Id);
2888 end Optimize_Alignment_Time;
2890 function Original_Access_Type (Id : E) return E is
2891 begin
2892 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2893 return Node28 (Id);
2894 end Original_Access_Type;
2896 function Original_Array_Type (Id : E) return E is
2897 begin
2898 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2899 return Node21 (Id);
2900 end Original_Array_Type;
2902 function Original_Protected_Subprogram (Id : E) return N is
2903 begin
2904 return Node41 (Id);
2905 end Original_Protected_Subprogram;
2907 function Original_Record_Component (Id : E) return E is
2908 begin
2909 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2910 return Node22 (Id);
2911 end Original_Record_Component;
2913 function Overlays_Constant (Id : E) return B is
2914 begin
2915 return Flag243 (Id);
2916 end Overlays_Constant;
2918 function Overridden_Operation (Id : E) return E is
2919 begin
2920 pragma Assert (Is_Subprogram (Id) or else Is_Generic_Subprogram (Id));
2921 return Node26 (Id);
2922 end Overridden_Operation;
2924 function Package_Instantiation (Id : E) return N is
2925 begin
2926 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2927 return Node26 (Id);
2928 end Package_Instantiation;
2930 function Packed_Array_Impl_Type (Id : E) return E is
2931 begin
2932 pragma Assert (Is_Array_Type (Id));
2933 return Node23 (Id);
2934 end Packed_Array_Impl_Type;
2936 function Parent_Subtype (Id : E) return E is
2937 begin
2938 pragma Assert (Is_Record_Type (Id));
2939 return Node19 (Base_Type (Id));
2940 end Parent_Subtype;
2942 function Part_Of_Constituents (Id : E) return L is
2943 begin
2944 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
2945 return Elist10 (Id);
2946 end Part_Of_Constituents;
2948 function Part_Of_References (Id : E) return L is
2949 begin
2950 pragma Assert (Ekind (Id) = E_Variable);
2951 return Elist11 (Id);
2952 end Part_Of_References;
2954 function Partial_View_Has_Unknown_Discr (Id : E) return B is
2955 begin
2956 pragma Assert (Is_Type (Id));
2957 return Flag280 (Id);
2958 end Partial_View_Has_Unknown_Discr;
2960 function Pending_Access_Types (Id : E) return L is
2961 begin
2962 pragma Assert (Is_Type (Id));
2963 return Elist15 (Id);
2964 end Pending_Access_Types;
2966 function Postconditions_Proc (Id : E) return E is
2967 begin
2968 pragma Assert (Ekind_In (Id, E_Entry,
2969 E_Entry_Family,
2970 E_Function,
2971 E_Procedure));
2972 return Node14 (Id);
2973 end Postconditions_Proc;
2975 function Predicates_Ignored (Id : E) return B is
2976 begin
2977 pragma Assert (Is_Type (Id));
2978 return Flag288 (Id);
2979 end Predicates_Ignored;
2981 function Prival (Id : E) return E is
2982 begin
2983 pragma Assert (Is_Protected_Component (Id));
2984 return Node17 (Id);
2985 end Prival;
2987 function Prival_Link (Id : E) return E is
2988 begin
2989 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2990 return Node20 (Id);
2991 end Prival_Link;
2993 function Private_Dependents (Id : E) return L is
2994 begin
2995 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2996 return Elist18 (Id);
2997 end Private_Dependents;
2999 function Private_View (Id : E) return N is
3000 begin
3001 pragma Assert (Is_Private_Type (Id));
3002 return Node22 (Id);
3003 end Private_View;
3005 function Protected_Body_Subprogram (Id : E) return E is
3006 begin
3007 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
3008 return Node11 (Id);
3009 end Protected_Body_Subprogram;
3011 function Protected_Formal (Id : E) return E is
3012 begin
3013 pragma Assert (Is_Formal (Id));
3014 return Node22 (Id);
3015 end Protected_Formal;
3017 function Protection_Object (Id : E) return E is
3018 begin
3019 pragma Assert
3020 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
3021 return Node23 (Id);
3022 end Protection_Object;
3024 function Reachable (Id : E) return B is
3025 begin
3026 return Flag49 (Id);
3027 end Reachable;
3029 function Referenced (Id : E) return B is
3030 begin
3031 return Flag156 (Id);
3032 end Referenced;
3034 function Referenced_As_LHS (Id : E) return B is
3035 begin
3036 return Flag36 (Id);
3037 end Referenced_As_LHS;
3039 function Referenced_As_Out_Parameter (Id : E) return B is
3040 begin
3041 return Flag227 (Id);
3042 end Referenced_As_Out_Parameter;
3044 function Refinement_Constituents (Id : E) return L is
3045 begin
3046 pragma Assert (Ekind (Id) = E_Abstract_State);
3047 return Elist8 (Id);
3048 end Refinement_Constituents;
3050 function Register_Exception_Call (Id : E) return N is
3051 begin
3052 pragma Assert (Ekind (Id) = E_Exception);
3053 return Node20 (Id);
3054 end Register_Exception_Call;
3056 function Related_Array_Object (Id : E) return E is
3057 begin
3058 pragma Assert (Is_Array_Type (Id));
3059 return Node25 (Id);
3060 end Related_Array_Object;
3062 function Related_Expression (Id : E) return N is
3063 begin
3064 pragma Assert (Ekind (Id) in Type_Kind
3065 or else Ekind_In (Id, E_Constant, E_Variable));
3066 return Node24 (Id);
3067 end Related_Expression;
3069 function Related_Instance (Id : E) return E is
3070 begin
3071 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
3072 return Node15 (Id);
3073 end Related_Instance;
3075 function Related_Type (Id : E) return E is
3076 begin
3077 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
3078 return Node27 (Id);
3079 end Related_Type;
3081 function Relative_Deadline_Variable (Id : E) return E is
3082 begin
3083 pragma Assert (Is_Task_Type (Id));
3084 return Node28 (Implementation_Base_Type (Id));
3085 end Relative_Deadline_Variable;
3087 function Renamed_Entity (Id : E) return N is
3088 begin
3089 return Node18 (Id);
3090 end Renamed_Entity;
3092 function Renamed_In_Spec (Id : E) return B is
3093 begin
3094 pragma Assert (Ekind (Id) = E_Package);
3095 return Flag231 (Id);
3096 end Renamed_In_Spec;
3098 function Renamed_Object (Id : E) return N is
3099 begin
3100 return Node18 (Id);
3101 end Renamed_Object;
3103 function Renaming_Map (Id : E) return U is
3104 begin
3105 return Uint9 (Id);
3106 end Renaming_Map;
3108 function Requires_Overriding (Id : E) return B is
3109 begin
3110 pragma Assert (Is_Overloadable (Id));
3111 return Flag213 (Id);
3112 end Requires_Overriding;
3114 function Return_Present (Id : E) return B is
3115 begin
3116 return Flag54 (Id);
3117 end Return_Present;
3119 function Return_Applies_To (Id : E) return N is
3120 begin
3121 return Node8 (Id);
3122 end Return_Applies_To;
3124 function Returns_By_Ref (Id : E) return B is
3125 begin
3126 return Flag90 (Id);
3127 end Returns_By_Ref;
3129 function Reverse_Bit_Order (Id : E) return B is
3130 begin
3131 pragma Assert (Is_Record_Type (Id));
3132 return Flag164 (Base_Type (Id));
3133 end Reverse_Bit_Order;
3135 function Reverse_Storage_Order (Id : E) return B is
3136 begin
3137 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
3138 return Flag93 (Base_Type (Id));
3139 end Reverse_Storage_Order;
3141 function Rewritten_For_C (Id : E) return B is
3142 begin
3143 pragma Assert (Ekind (Id) = E_Function);
3144 return Flag287 (Id);
3145 end Rewritten_For_C;
3147 function RM_Size (Id : E) return U is
3148 begin
3149 pragma Assert (Is_Type (Id));
3150 return Uint13 (Id);
3151 end RM_Size;
3153 function Scalar_Range (Id : E) return N is
3154 begin
3155 return Node20 (Id);
3156 end Scalar_Range;
3158 function Scale_Value (Id : E) return U is
3159 begin
3160 return Uint16 (Id);
3161 end Scale_Value;
3163 function Scope_Depth_Value (Id : E) return U is
3164 begin
3165 return Uint22 (Id);
3166 end Scope_Depth_Value;
3168 function Sec_Stack_Needed_For_Return (Id : E) return B is
3169 begin
3170 return Flag167 (Id);
3171 end Sec_Stack_Needed_For_Return;
3173 function Shadow_Entities (Id : E) return S is
3174 begin
3175 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3176 return List14 (Id);
3177 end Shadow_Entities;
3179 function Shared_Var_Procs_Instance (Id : E) return E is
3180 begin
3181 pragma Assert (Ekind (Id) = E_Variable);
3182 return Node22 (Id);
3183 end Shared_Var_Procs_Instance;
3185 function Size_Check_Code (Id : E) return N is
3186 begin
3187 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3188 return Node19 (Id);
3189 end Size_Check_Code;
3191 function Size_Depends_On_Discriminant (Id : E) return B is
3192 begin
3193 return Flag177 (Id);
3194 end Size_Depends_On_Discriminant;
3196 function Size_Known_At_Compile_Time (Id : E) return B is
3197 begin
3198 return Flag92 (Id);
3199 end Size_Known_At_Compile_Time;
3201 function Small_Value (Id : E) return R is
3202 begin
3203 pragma Assert (Is_Fixed_Point_Type (Id));
3204 return Ureal21 (Id);
3205 end Small_Value;
3207 function SPARK_Aux_Pragma (Id : E) return N is
3208 begin
3209 pragma Assert
3210 (Ekind_In (Id, E_Protected_Type, -- concurrent variants
3211 E_Task_Type)
3212 or else
3213 Ekind_In (Id, E_Generic_Package, -- package variants
3214 E_Package,
3215 E_Package_Body));
3216 return Node41 (Id);
3217 end SPARK_Aux_Pragma;
3219 function SPARK_Aux_Pragma_Inherited (Id : E) return B is
3220 begin
3221 pragma Assert
3222 (Ekind_In (Id, E_Protected_Type, -- concurrent variants
3223 E_Task_Type)
3224 or else
3225 Ekind_In (Id, E_Generic_Package, -- package variants
3226 E_Package,
3227 E_Package_Body));
3228 return Flag266 (Id);
3229 end SPARK_Aux_Pragma_Inherited;
3231 function SPARK_Pragma (Id : E) return N is
3232 begin
3233 pragma Assert
3234 (Ekind_In (Id, E_Protected_Body, -- concurrent variants
3235 E_Protected_Type,
3236 E_Task_Body,
3237 E_Task_Type)
3238 or else
3239 Ekind_In (Id, E_Entry, -- overloadable variants
3240 E_Entry_Family,
3241 E_Function,
3242 E_Generic_Function,
3243 E_Generic_Procedure,
3244 E_Operator,
3245 E_Procedure,
3246 E_Subprogram_Body)
3247 or else
3248 Ekind_In (Id, E_Generic_Package, -- package variants
3249 E_Package,
3250 E_Package_Body)
3251 or else
3252 Ekind (Id) = E_Variable); -- variable
3253 return Node40 (Id);
3254 end SPARK_Pragma;
3256 function SPARK_Pragma_Inherited (Id : E) return B is
3257 begin
3258 pragma Assert
3259 (Ekind_In (Id, E_Protected_Body, -- concurrent variants
3260 E_Protected_Type,
3261 E_Task_Body,
3262 E_Task_Type)
3263 or else
3264 Ekind_In (Id, E_Entry, -- overloadable variants
3265 E_Entry_Family,
3266 E_Function,
3267 E_Generic_Function,
3268 E_Generic_Procedure,
3269 E_Operator,
3270 E_Procedure,
3271 E_Subprogram_Body)
3272 or else
3273 Ekind_In (Id, E_Generic_Package, -- package variants
3274 E_Package,
3275 E_Package_Body)
3276 or else
3277 Ekind (Id) = E_Variable); -- variable
3278 return Flag265 (Id);
3279 end SPARK_Pragma_Inherited;
3281 function Spec_Entity (Id : E) return E is
3282 begin
3283 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
3284 return Node19 (Id);
3285 end Spec_Entity;
3287 function SSO_Set_High_By_Default (Id : E) return B is
3288 begin
3289 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
3290 return Flag273 (Base_Type (Id));
3291 end SSO_Set_High_By_Default;
3293 function SSO_Set_Low_By_Default (Id : E) return B is
3294 begin
3295 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
3296 return Flag272 (Base_Type (Id));
3297 end SSO_Set_Low_By_Default;
3299 function Static_Discrete_Predicate (Id : E) return S is
3300 begin
3301 pragma Assert (Is_Discrete_Type (Id));
3302 return List25 (Id);
3303 end Static_Discrete_Predicate;
3305 function Static_Real_Or_String_Predicate (Id : E) return N is
3306 begin
3307 pragma Assert (Is_Real_Type (Id) or else Is_String_Type (Id));
3308 return Node25 (Id);
3309 end Static_Real_Or_String_Predicate;
3311 function Status_Flag_Or_Transient_Decl (Id : E) return N is
3312 begin
3313 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3314 return Node15 (Id);
3315 end Status_Flag_Or_Transient_Decl;
3317 function Storage_Size_Variable (Id : E) return E is
3318 begin
3319 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
3320 return Node26 (Implementation_Base_Type (Id));
3321 end Storage_Size_Variable;
3323 function Static_Elaboration_Desired (Id : E) return B is
3324 begin
3325 pragma Assert (Ekind (Id) = E_Package);
3326 return Flag77 (Id);
3327 end Static_Elaboration_Desired;
3329 function Static_Initialization (Id : E) return N is
3330 begin
3331 pragma Assert
3332 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
3333 return Node30 (Id);
3334 end Static_Initialization;
3336 function Stored_Constraint (Id : E) return L is
3337 begin
3338 pragma Assert
3339 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
3340 return Elist23 (Id);
3341 end Stored_Constraint;
3343 function Stores_Attribute_Old_Prefix (Id : E) return B is
3344 begin
3345 return Flag270 (Id);
3346 end Stores_Attribute_Old_Prefix;
3348 function Strict_Alignment (Id : E) return B is
3349 begin
3350 return Flag145 (Implementation_Base_Type (Id));
3351 end Strict_Alignment;
3353 function String_Literal_Length (Id : E) return U is
3354 begin
3355 return Uint16 (Id);
3356 end String_Literal_Length;
3358 function String_Literal_Low_Bound (Id : E) return N is
3359 begin
3360 return Node18 (Id);
3361 end String_Literal_Low_Bound;
3363 function Subprograms_For_Type (Id : E) return L is
3364 begin
3365 pragma Assert (Is_Type (Id));
3366 return Elist29 (Id);
3367 end Subprograms_For_Type;
3369 function Subps_Index (Id : E) return U is
3370 begin
3371 pragma Assert (Is_Subprogram (Id));
3372 return Uint24 (Id);
3373 end Subps_Index;
3375 function Suppress_Elaboration_Warnings (Id : E) return B is
3376 begin
3377 return Flag148 (Id);
3378 end Suppress_Elaboration_Warnings;
3380 function Suppress_Initialization (Id : E) return B is
3381 begin
3382 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Variable);
3383 return Flag105 (Id);
3384 end Suppress_Initialization;
3386 function Suppress_Style_Checks (Id : E) return B is
3387 begin
3388 return Flag165 (Id);
3389 end Suppress_Style_Checks;
3391 function Suppress_Value_Tracking_On_Call (Id : E) return B is
3392 begin
3393 return Flag217 (Id);
3394 end Suppress_Value_Tracking_On_Call;
3396 function Task_Body_Procedure (Id : E) return N is
3397 begin
3398 pragma Assert (Ekind (Id) in Task_Kind);
3399 return Node25 (Id);
3400 end Task_Body_Procedure;
3402 function Thunk_Entity (Id : E) return E is
3403 begin
3404 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3405 and then Is_Thunk (Id));
3406 return Node31 (Id);
3407 end Thunk_Entity;
3409 function Treat_As_Volatile (Id : E) return B is
3410 begin
3411 return Flag41 (Id);
3412 end Treat_As_Volatile;
3414 function Underlying_Full_View (Id : E) return E is
3415 begin
3416 pragma Assert (Ekind (Id) in Private_Kind);
3417 return Node19 (Id);
3418 end Underlying_Full_View;
3420 function Underlying_Record_View (Id : E) return E is
3421 begin
3422 return Node28 (Id);
3423 end Underlying_Record_View;
3425 function Universal_Aliasing (Id : E) return B is
3426 begin
3427 pragma Assert (Is_Type (Id));
3428 return Flag216 (Implementation_Base_Type (Id));
3429 end Universal_Aliasing;
3431 function Unset_Reference (Id : E) return N is
3432 begin
3433 return Node16 (Id);
3434 end Unset_Reference;
3436 function Used_As_Generic_Actual (Id : E) return B is
3437 begin
3438 return Flag222 (Id);
3439 end Used_As_Generic_Actual;
3441 function Uses_Lock_Free (Id : E) return B is
3442 begin
3443 pragma Assert (Is_Protected_Type (Id));
3444 return Flag188 (Id);
3445 end Uses_Lock_Free;
3447 function Uses_Sec_Stack (Id : E) return B is
3448 begin
3449 return Flag95 (Id);
3450 end Uses_Sec_Stack;
3452 function Warnings_Off (Id : E) return B is
3453 begin
3454 return Flag96 (Id);
3455 end Warnings_Off;
3457 function Warnings_Off_Used (Id : E) return B is
3458 begin
3459 return Flag236 (Id);
3460 end Warnings_Off_Used;
3462 function Warnings_Off_Used_Unmodified (Id : E) return B is
3463 begin
3464 return Flag237 (Id);
3465 end Warnings_Off_Used_Unmodified;
3467 function Warnings_Off_Used_Unreferenced (Id : E) return B is
3468 begin
3469 return Flag238 (Id);
3470 end Warnings_Off_Used_Unreferenced;
3472 function Wrapped_Entity (Id : E) return E is
3473 begin
3474 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3475 and then Is_Primitive_Wrapper (Id));
3476 return Node27 (Id);
3477 end Wrapped_Entity;
3479 function Was_Hidden (Id : E) return B is
3480 begin
3481 return Flag196 (Id);
3482 end Was_Hidden;
3484 ------------------------------
3485 -- Classification Functions --
3486 ------------------------------
3488 function Is_Access_Type (Id : E) return B is
3489 begin
3490 return Ekind (Id) in Access_Kind;
3491 end Is_Access_Type;
3493 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
3494 begin
3495 return Ekind (Id) in Access_Protected_Kind;
3496 end Is_Access_Protected_Subprogram_Type;
3498 function Is_Access_Subprogram_Type (Id : E) return B is
3499 begin
3500 return Ekind (Id) in Access_Subprogram_Kind;
3501 end Is_Access_Subprogram_Type;
3503 function Is_Aggregate_Type (Id : E) return B is
3504 begin
3505 return Ekind (Id) in Aggregate_Kind;
3506 end Is_Aggregate_Type;
3508 function Is_Array_Type (Id : E) return B is
3509 begin
3510 return Ekind (Id) in Array_Kind;
3511 end Is_Array_Type;
3513 function Is_Assignable (Id : E) return B is
3514 begin
3515 return Ekind (Id) in Assignable_Kind;
3516 end Is_Assignable;
3518 function Is_Class_Wide_Type (Id : E) return B is
3519 begin
3520 return Ekind (Id) in Class_Wide_Kind;
3521 end Is_Class_Wide_Type;
3523 function Is_Composite_Type (Id : E) return B is
3524 begin
3525 return Ekind (Id) in Composite_Kind;
3526 end Is_Composite_Type;
3528 function Is_Concurrent_Body (Id : E) return B is
3529 begin
3530 return Ekind (Id) in Concurrent_Body_Kind;
3531 end Is_Concurrent_Body;
3533 function Is_Concurrent_Record_Type (Id : E) return B is
3534 begin
3535 return Flag20 (Id);
3536 end Is_Concurrent_Record_Type;
3538 function Is_Concurrent_Type (Id : E) return B is
3539 begin
3540 return Ekind (Id) in Concurrent_Kind;
3541 end Is_Concurrent_Type;
3543 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
3544 begin
3545 return Ekind (Id) in Decimal_Fixed_Point_Kind;
3546 end Is_Decimal_Fixed_Point_Type;
3548 function Is_Digits_Type (Id : E) return B is
3549 begin
3550 return Ekind (Id) in Digits_Kind;
3551 end Is_Digits_Type;
3553 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
3554 begin
3555 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
3556 end Is_Discrete_Or_Fixed_Point_Type;
3558 function Is_Discrete_Type (Id : E) return B is
3559 begin
3560 return Ekind (Id) in Discrete_Kind;
3561 end Is_Discrete_Type;
3563 function Is_Elementary_Type (Id : E) return B is
3564 begin
3565 return Ekind (Id) in Elementary_Kind;
3566 end Is_Elementary_Type;
3568 function Is_Entry (Id : E) return B is
3569 begin
3570 return Ekind (Id) in Entry_Kind;
3571 end Is_Entry;
3573 function Is_Enumeration_Type (Id : E) return B is
3574 begin
3575 return Ekind (Id) in Enumeration_Kind;
3576 end Is_Enumeration_Type;
3578 function Is_Fixed_Point_Type (Id : E) return B is
3579 begin
3580 return Ekind (Id) in Fixed_Point_Kind;
3581 end Is_Fixed_Point_Type;
3583 function Is_Floating_Point_Type (Id : E) return B is
3584 begin
3585 return Ekind (Id) in Float_Kind;
3586 end Is_Floating_Point_Type;
3588 function Is_Formal (Id : E) return B is
3589 begin
3590 return Ekind (Id) in Formal_Kind;
3591 end Is_Formal;
3593 function Is_Formal_Object (Id : E) return B is
3594 begin
3595 return Ekind (Id) in Formal_Object_Kind;
3596 end Is_Formal_Object;
3598 function Is_Generic_Subprogram (Id : E) return B is
3599 begin
3600 return Ekind (Id) in Generic_Subprogram_Kind;
3601 end Is_Generic_Subprogram;
3603 function Is_Generic_Unit (Id : E) return B is
3604 begin
3605 return Ekind (Id) in Generic_Unit_Kind;
3606 end Is_Generic_Unit;
3608 function Is_Ghost_Entity (Id : Entity_Id) return Boolean is
3609 begin
3610 return Is_Checked_Ghost_Entity (Id) or else Is_Ignored_Ghost_Entity (Id);
3611 end Is_Ghost_Entity;
3613 function Is_Incomplete_Or_Private_Type (Id : E) return B is
3614 begin
3615 return Ekind (Id) in Incomplete_Or_Private_Kind;
3616 end Is_Incomplete_Or_Private_Type;
3618 function Is_Incomplete_Type (Id : E) return B is
3619 begin
3620 return Ekind (Id) in Incomplete_Kind;
3621 end Is_Incomplete_Type;
3623 function Is_Integer_Type (Id : E) return B is
3624 begin
3625 return Ekind (Id) in Integer_Kind;
3626 end Is_Integer_Type;
3628 function Is_Modular_Integer_Type (Id : E) return B is
3629 begin
3630 return Ekind (Id) in Modular_Integer_Kind;
3631 end Is_Modular_Integer_Type;
3633 function Is_Named_Number (Id : E) return B is
3634 begin
3635 return Ekind (Id) in Named_Kind;
3636 end Is_Named_Number;
3638 function Is_Numeric_Type (Id : E) return B is
3639 begin
3640 return Ekind (Id) in Numeric_Kind;
3641 end Is_Numeric_Type;
3643 function Is_Object (Id : E) return B is
3644 begin
3645 return Ekind (Id) in Object_Kind;
3646 end Is_Object;
3648 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
3649 begin
3650 return Ekind (Id) in Ordinary_Fixed_Point_Kind;
3651 end Is_Ordinary_Fixed_Point_Type;
3653 function Is_Overloadable (Id : E) return B is
3654 begin
3655 return Ekind (Id) in Overloadable_Kind;
3656 end Is_Overloadable;
3658 function Is_Private_Type (Id : E) return B is
3659 begin
3660 return Ekind (Id) in Private_Kind;
3661 end Is_Private_Type;
3663 function Is_Protected_Type (Id : E) return B is
3664 begin
3665 return Ekind (Id) in Protected_Kind;
3666 end Is_Protected_Type;
3668 function Is_Real_Type (Id : E) return B is
3669 begin
3670 return Ekind (Id) in Real_Kind;
3671 end Is_Real_Type;
3673 function Is_Record_Type (Id : E) return B is
3674 begin
3675 return Ekind (Id) in Record_Kind;
3676 end Is_Record_Type;
3678 function Is_Scalar_Type (Id : E) return B is
3679 begin
3680 return Ekind (Id) in Scalar_Kind;
3681 end Is_Scalar_Type;
3683 function Is_Signed_Integer_Type (Id : E) return B is
3684 begin
3685 return Ekind (Id) in Signed_Integer_Kind;
3686 end Is_Signed_Integer_Type;
3688 function Is_Subprogram (Id : E) return B is
3689 begin
3690 return Ekind (Id) in Subprogram_Kind;
3691 end Is_Subprogram;
3693 function Is_Subprogram_Or_Generic_Subprogram (Id : E) return B is
3694 begin
3695 return Ekind (Id) in Subprogram_Kind
3696 or else
3697 Ekind (Id) in Generic_Subprogram_Kind;
3698 end Is_Subprogram_Or_Generic_Subprogram;
3700 function Is_Task_Type (Id : E) return B is
3701 begin
3702 return Ekind (Id) in Task_Kind;
3703 end Is_Task_Type;
3705 function Is_Type (Id : E) return B is
3706 begin
3707 return Ekind (Id) in Type_Kind;
3708 end Is_Type;
3710 ------------------------------
3711 -- Attribute Set Procedures --
3712 ------------------------------
3714 -- Note: in many of these set procedures an "obvious" assertion is missing.
3715 -- The reason for this is that in many cases, a field is set before the
3716 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3717 -- it is possible to add assertions that specifically include the E_Void
3718 -- possibility, but in some cases, we just omit the assertions.
3720 procedure Set_Abstract_States (Id : E; V : L) is
3721 begin
3722 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
3723 Set_Elist25 (Id, V);
3724 end Set_Abstract_States;
3726 procedure Set_Accept_Address (Id : E; V : L) is
3727 begin
3728 Set_Elist21 (Id, V);
3729 end Set_Accept_Address;
3731 procedure Set_Access_Disp_Table (Id : E; V : L) is
3732 begin
3733 pragma Assert (Ekind (Id) = E_Record_Type
3734 and then Id = Implementation_Base_Type (Id));
3735 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3736 Set_Elist16 (Id, V);
3737 end Set_Access_Disp_Table;
3739 procedure Set_Anonymous_Designated_Type (Id : E; V : E) is
3740 begin
3741 pragma Assert (Ekind (Id) = E_Variable);
3742 Set_Node35 (Id, V);
3743 end Set_Anonymous_Designated_Type;
3745 procedure Set_Anonymous_Masters (Id : E; V : L) is
3746 begin
3747 pragma Assert (Ekind_In (Id, E_Function,
3748 E_Package,
3749 E_Procedure,
3750 E_Subprogram_Body));
3751 Set_Elist29 (Id, V);
3752 end Set_Anonymous_Masters;
3754 procedure Set_Anonymous_Object (Id : E; V : E) is
3755 begin
3756 pragma Assert (Ekind_In (Id, E_Protected_Type, E_Task_Type));
3757 Set_Node30 (Id, V);
3758 end Set_Anonymous_Object;
3760 procedure Set_Associated_Entity (Id : E; V : E) is
3761 begin
3762 Set_Node37 (Id, V);
3763 end Set_Associated_Entity;
3765 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3766 begin
3767 Set_Node12 (Id, V);
3768 end Set_Associated_Formal_Package;
3770 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3771 begin
3772 Set_Node8 (Id, V);
3773 end Set_Associated_Node_For_Itype;
3775 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3776 begin
3777 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3778 Set_Node22 (Id, V);
3779 end Set_Associated_Storage_Pool;
3781 procedure Set_Activation_Record_Component (Id : E; V : E) is
3782 begin
3783 pragma Assert (Ekind_In (Id, E_Constant,
3784 E_In_Parameter,
3785 E_In_Out_Parameter,
3786 E_Loop_Parameter,
3787 E_Out_Parameter,
3788 E_Variable));
3789 Set_Node31 (Id, V);
3790 end Set_Activation_Record_Component;
3792 procedure Set_Actual_Subtype (Id : E; V : E) is
3793 begin
3794 pragma Assert
3795 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3796 or else Is_Formal (Id));
3797 Set_Node17 (Id, V);
3798 end Set_Actual_Subtype;
3800 procedure Set_Address_Taken (Id : E; V : B := True) is
3801 begin
3802 Set_Flag104 (Id, V);
3803 end Set_Address_Taken;
3805 procedure Set_Alias (Id : E; V : E) is
3806 begin
3807 pragma Assert
3808 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3809 Set_Node18 (Id, V);
3810 end Set_Alias;
3812 procedure Set_Alignment (Id : E; V : U) is
3813 begin
3814 pragma Assert (Is_Type (Id)
3815 or else Is_Formal (Id)
3816 or else Ekind_In (Id, E_Loop_Parameter,
3817 E_Constant,
3818 E_Exception,
3819 E_Variable));
3820 Set_Uint14 (Id, V);
3821 end Set_Alignment;
3823 procedure Set_Barrier_Function (Id : E; V : N) is
3824 begin
3825 pragma Assert (Is_Entry (Id));
3826 Set_Node12 (Id, V);
3827 end Set_Barrier_Function;
3829 procedure Set_Block_Node (Id : E; V : N) is
3830 begin
3831 pragma Assert (Ekind (Id) = E_Block);
3832 Set_Node11 (Id, V);
3833 end Set_Block_Node;
3835 procedure Set_Body_Entity (Id : E; V : E) is
3836 begin
3837 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3838 Set_Node19 (Id, V);
3839 end Set_Body_Entity;
3841 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3842 begin
3843 pragma Assert
3844 (Ekind (Id) = E_Package
3845 or else Is_Subprogram (Id)
3846 or else Is_Generic_Unit (Id));
3847 Set_Flag40 (Id, V);
3848 end Set_Body_Needed_For_SAL;
3850 procedure Set_Body_References (Id : E; V : L) is
3851 begin
3852 pragma Assert (Ekind (Id) = E_Abstract_State);
3853 Set_Elist16 (Id, V);
3854 end Set_Body_References;
3856 procedure Set_BIP_Initialization_Call (Id : E; V : N) is
3857 begin
3858 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3859 Set_Node29 (Id, V);
3860 end Set_BIP_Initialization_Call;
3862 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3863 begin
3864 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3865 Set_Flag125 (Id, V);
3866 end Set_C_Pass_By_Copy;
3868 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3869 begin
3870 Set_Flag38 (Id, V);
3871 end Set_Can_Never_Be_Null;
3873 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3874 begin
3875 pragma Assert
3876 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3877 Set_Flag229 (Id, V);
3878 end Set_Can_Use_Internal_Rep;
3880 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3881 begin
3882 Set_Flag31 (Id, V);
3883 end Set_Checks_May_Be_Suppressed;
3885 procedure Set_Class_Wide_Preconds (Id : E; V : S) is
3886 begin
3887 pragma Assert (Is_Subprogram (Id));
3888 Set_List38 (Id, V);
3889 end Set_Class_Wide_Preconds;
3891 procedure Set_Class_Wide_Postconds (Id : E; V : S) is
3892 begin
3893 pragma Assert (Is_Subprogram (Id));
3894 Set_List39 (Id, V);
3895 end Set_Class_Wide_Postconds;
3897 procedure Set_Class_Wide_Type (Id : E; V : E) is
3898 begin
3899 pragma Assert (Is_Type (Id));
3900 Set_Node9 (Id, V);
3901 end Set_Class_Wide_Type;
3903 procedure Set_Cloned_Subtype (Id : E; V : E) is
3904 begin
3905 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3906 Set_Node16 (Id, V);
3907 end Set_Cloned_Subtype;
3909 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3910 begin
3911 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3912 Set_Uint11 (Id, V);
3913 end Set_Component_Bit_Offset;
3915 procedure Set_Component_Clause (Id : E; V : N) is
3916 begin
3917 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3918 Set_Node13 (Id, V);
3919 end Set_Component_Clause;
3921 procedure Set_Component_Size (Id : E; V : U) is
3922 begin
3923 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3924 Set_Uint22 (Id, V);
3925 end Set_Component_Size;
3927 procedure Set_Component_Type (Id : E; V : E) is
3928 begin
3929 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3930 Set_Node20 (Id, V);
3931 end Set_Component_Type;
3933 procedure Set_Contains_Ignored_Ghost_Code (Id : E; V : B := True) is
3934 begin
3935 pragma Assert
3936 (Ekind_In (Id, E_Block,
3937 E_Function,
3938 E_Generic_Function,
3939 E_Generic_Package,
3940 E_Generic_Procedure,
3941 E_Package,
3942 E_Package_Body,
3943 E_Procedure,
3944 E_Subprogram_Body));
3945 Set_Flag279 (Id, V);
3946 end Set_Contains_Ignored_Ghost_Code;
3948 procedure Set_Contract (Id : E; V : N) is
3949 begin
3950 pragma Assert
3951 (Ekind_In (Id, E_Protected_Type, -- concurrent variants
3952 E_Task_Body,
3953 E_Task_Type)
3954 or else
3955 Ekind_In (Id, E_Constant, -- object variants
3956 E_Variable)
3957 or else
3958 Ekind_In (Id, E_Entry, -- overloadable variants
3959 E_Entry_Family,
3960 E_Function,
3961 E_Generic_Function,
3962 E_Generic_Procedure,
3963 E_Operator,
3964 E_Procedure,
3965 E_Subprogram_Body)
3966 or else
3967 Ekind_In (Id, E_Generic_Package, -- package variants
3968 E_Package,
3969 E_Package_Body)
3970 or else
3971 Ekind (Id) = E_Void); -- special purpose
3972 Set_Node34 (Id, V);
3973 end Set_Contract;
3975 procedure Set_Contract_Wrapper (Id : E; V : E) is
3976 begin
3977 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
3978 Set_Node25 (Id, V);
3979 end Set_Contract_Wrapper;
3981 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3982 begin
3983 pragma Assert
3984 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3985 Set_Node18 (Id, V);
3986 end Set_Corresponding_Concurrent_Type;
3988 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3989 begin
3990 pragma Assert (Ekind (Id) = E_Discriminant);
3991 Set_Node19 (Id, V);
3992 end Set_Corresponding_Discriminant;
3994 procedure Set_Corresponding_Equality (Id : E; V : E) is
3995 begin
3996 pragma Assert
3997 (Ekind (Id) = E_Function
3998 and then not Comes_From_Source (Id)
3999 and then Chars (Id) = Name_Op_Ne);
4000 Set_Node30 (Id, V);
4001 end Set_Corresponding_Equality;
4003 procedure Set_Corresponding_Function (Id : E; V : E) is
4004 begin
4005 pragma Assert (Ekind (Id) = E_Procedure and then Rewritten_For_C (V));
4006 Set_Node32 (Id, V);
4007 end Set_Corresponding_Function;
4009 procedure Set_Corresponding_Procedure (Id : E; V : E) is
4010 begin
4011 pragma Assert (Ekind (Id) = E_Function and then Rewritten_For_C (Id));
4012 Set_Node32 (Id, V);
4013 end Set_Corresponding_Procedure;
4015 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
4016 begin
4017 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
4018 Set_Node18 (Id, V);
4019 end Set_Corresponding_Protected_Entry;
4021 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
4022 begin
4023 pragma Assert (Is_Concurrent_Type (Id));
4024 Set_Node18 (Id, V);
4025 end Set_Corresponding_Record_Type;
4027 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
4028 begin
4029 Set_Node22 (Id, V);
4030 end Set_Corresponding_Remote_Type;
4032 procedure Set_Current_Use_Clause (Id : E; V : E) is
4033 begin
4034 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
4035 Set_Node27 (Id, V);
4036 end Set_Current_Use_Clause;
4038 procedure Set_Current_Value (Id : E; V : N) is
4039 begin
4040 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
4041 Set_Node9 (Id, V);
4042 end Set_Current_Value;
4044 procedure Set_CR_Discriminant (Id : E; V : E) is
4045 begin
4046 Set_Node23 (Id, V);
4047 end Set_CR_Discriminant;
4049 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
4050 begin
4051 Set_Flag166 (Id, V);
4052 end Set_Debug_Info_Off;
4054 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
4055 begin
4056 Set_Node25 (Id, V);
4057 end Set_Debug_Renaming_Link;
4059 procedure Set_Default_Aspect_Component_Value (Id : E; V : E) is
4060 begin
4061 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
4062 Set_Node19 (Id, V);
4063 end Set_Default_Aspect_Component_Value;
4065 procedure Set_Default_Aspect_Value (Id : E; V : E) is
4066 begin
4067 pragma Assert (Is_Scalar_Type (Id) and then Is_Base_Type (Id));
4068 Set_Node19 (Id, V);
4069 end Set_Default_Aspect_Value;
4071 procedure Set_Default_Expr_Function (Id : E; V : E) is
4072 begin
4073 pragma Assert (Is_Formal (Id));
4074 Set_Node21 (Id, V);
4075 end Set_Default_Expr_Function;
4077 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
4078 begin
4079 Set_Flag108 (Id, V);
4080 end Set_Default_Expressions_Processed;
4082 procedure Set_Default_Value (Id : E; V : N) is
4083 begin
4084 pragma Assert (Is_Formal (Id));
4085 Set_Node20 (Id, V);
4086 end Set_Default_Value;
4088 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
4089 begin
4090 pragma Assert
4091 (Is_Subprogram (Id)
4092 or else Is_Task_Type (Id)
4093 or else Ekind (Id) = E_Block);
4094 Set_Flag114 (Id, V);
4095 end Set_Delay_Cleanups;
4097 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
4098 begin
4099 pragma Assert
4100 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
4102 Set_Flag50 (Id, V);
4103 end Set_Delay_Subprogram_Descriptors;
4105 procedure Set_Delta_Value (Id : E; V : R) is
4106 begin
4107 pragma Assert (Is_Fixed_Point_Type (Id));
4108 Set_Ureal18 (Id, V);
4109 end Set_Delta_Value;
4111 procedure Set_Dependent_Instances (Id : E; V : L) is
4112 begin
4113 pragma Assert (Is_Generic_Instance (Id));
4114 Set_Elist8 (Id, V);
4115 end Set_Dependent_Instances;
4117 procedure Set_Depends_On_Private (Id : E; V : B := True) is
4118 begin
4119 pragma Assert (Nkind (Id) in N_Entity);
4120 Set_Flag14 (Id, V);
4121 end Set_Depends_On_Private;
4123 procedure Set_Derived_Type_Link (Id : E; V : E) is
4124 begin
4125 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
4126 Set_Node31 (Id, V);
4127 end Set_Derived_Type_Link;
4129 procedure Set_Digits_Value (Id : E; V : U) is
4130 begin
4131 pragma Assert
4132 (Is_Floating_Point_Type (Id)
4133 or else Is_Decimal_Fixed_Point_Type (Id));
4134 Set_Uint17 (Id, V);
4135 end Set_Digits_Value;
4137 procedure Set_Directly_Designated_Type (Id : E; V : E) is
4138 begin
4139 Set_Node20 (Id, V);
4140 end Set_Directly_Designated_Type;
4142 procedure Set_Disable_Controlled (Id : E; V : B := True) is
4143 begin
4144 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
4145 Set_Flag253 (Id, V);
4146 end Set_Disable_Controlled;
4148 procedure Set_Discard_Names (Id : E; V : B := True) is
4149 begin
4150 Set_Flag88 (Id, V);
4151 end Set_Discard_Names;
4153 procedure Set_Discriminal (Id : E; V : E) is
4154 begin
4155 pragma Assert (Ekind (Id) = E_Discriminant);
4156 Set_Node17 (Id, V);
4157 end Set_Discriminal;
4159 procedure Set_Discriminal_Link (Id : E; V : E) is
4160 begin
4161 Set_Node10 (Id, V);
4162 end Set_Discriminal_Link;
4164 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
4165 begin
4166 pragma Assert (Ekind (Id) = E_Component);
4167 Set_Node20 (Id, V);
4168 end Set_Discriminant_Checking_Func;
4170 procedure Set_Discriminant_Constraint (Id : E; V : L) is
4171 begin
4172 pragma Assert (Nkind (Id) in N_Entity);
4173 Set_Elist21 (Id, V);
4174 end Set_Discriminant_Constraint;
4176 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
4177 begin
4178 Set_Node20 (Id, V);
4179 end Set_Discriminant_Default_Value;
4181 procedure Set_Discriminant_Number (Id : E; V : U) is
4182 begin
4183 Set_Uint15 (Id, V);
4184 end Set_Discriminant_Number;
4186 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
4187 begin
4188 pragma Assert (Ekind (Id) = E_Record_Type
4189 and then Id = Implementation_Base_Type (Id));
4190 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
4191 Set_Elist26 (Id, V);
4192 end Set_Dispatch_Table_Wrappers;
4194 procedure Set_DT_Entry_Count (Id : E; V : U) is
4195 begin
4196 pragma Assert (Ekind (Id) = E_Component);
4197 Set_Uint15 (Id, V);
4198 end Set_DT_Entry_Count;
4200 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
4201 begin
4202 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
4203 Set_Node25 (Id, V);
4204 end Set_DT_Offset_To_Top_Func;
4206 procedure Set_DT_Position (Id : E; V : U) is
4207 begin
4208 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4209 Set_Uint15 (Id, V);
4210 end Set_DT_Position;
4212 procedure Set_DTC_Entity (Id : E; V : E) is
4213 begin
4214 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4215 Set_Node16 (Id, V);
4216 end Set_DTC_Entity;
4218 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
4219 begin
4220 pragma Assert (Ekind (Id) = E_Package);
4221 Set_Flag210 (Id, V);
4222 end Set_Elaborate_Body_Desirable;
4224 procedure Set_Elaboration_Entity (Id : E; V : E) is
4225 begin
4226 pragma Assert
4227 (Is_Subprogram (Id)
4228 or else
4229 Ekind (Id) = E_Package
4230 or else
4231 Is_Generic_Unit (Id));
4232 Set_Node13 (Id, V);
4233 end Set_Elaboration_Entity;
4235 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
4236 begin
4237 pragma Assert
4238 (Is_Subprogram (Id)
4239 or else
4240 Ekind (Id) = E_Package
4241 or else
4242 Is_Generic_Unit (Id));
4243 Set_Flag174 (Id, V);
4244 end Set_Elaboration_Entity_Required;
4246 procedure Set_Encapsulating_State (Id : E; V : E) is
4247 begin
4248 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Constant, E_Variable));
4249 Set_Node32 (Id, V);
4250 end Set_Encapsulating_State;
4252 procedure Set_Enclosing_Scope (Id : E; V : E) is
4253 begin
4254 Set_Node18 (Id, V);
4255 end Set_Enclosing_Scope;
4257 procedure Set_Entry_Accepted (Id : E; V : B := True) is
4258 begin
4259 pragma Assert (Is_Entry (Id));
4260 Set_Flag152 (Id, V);
4261 end Set_Entry_Accepted;
4263 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
4264 begin
4265 Set_Node19 (Id, V);
4266 end Set_Entry_Bodies_Array;
4268 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
4269 begin
4270 Set_Node23 (Id, V);
4271 end Set_Entry_Cancel_Parameter;
4273 procedure Set_Entry_Component (Id : E; V : E) is
4274 begin
4275 Set_Node11 (Id, V);
4276 end Set_Entry_Component;
4278 procedure Set_Entry_Formal (Id : E; V : E) is
4279 begin
4280 Set_Node16 (Id, V);
4281 end Set_Entry_Formal;
4283 procedure Set_Entry_Index_Constant (Id : E; V : E) is
4284 begin
4285 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
4286 Set_Node18 (Id, V);
4287 end Set_Entry_Index_Constant;
4289 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
4290 begin
4291 Set_Node15 (Id, V);
4292 end Set_Entry_Parameters_Type;
4294 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
4295 begin
4296 pragma Assert (Ekind (Id) = E_Enumeration_Type);
4297 Set_Node23 (Id, V);
4298 end Set_Enum_Pos_To_Rep;
4300 procedure Set_Enumeration_Pos (Id : E; V : U) is
4301 begin
4302 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
4303 Set_Uint11 (Id, V);
4304 end Set_Enumeration_Pos;
4306 procedure Set_Enumeration_Rep (Id : E; V : U) is
4307 begin
4308 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
4309 Set_Uint12 (Id, V);
4310 end Set_Enumeration_Rep;
4312 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
4313 begin
4314 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
4315 Set_Node22 (Id, V);
4316 end Set_Enumeration_Rep_Expr;
4318 procedure Set_Equivalent_Type (Id : E; V : E) is
4319 begin
4320 pragma Assert
4321 (Ekind_In (Id, E_Class_Wide_Type,
4322 E_Class_Wide_Subtype,
4323 E_Access_Protected_Subprogram_Type,
4324 E_Anonymous_Access_Protected_Subprogram_Type,
4325 E_Access_Subprogram_Type,
4326 E_Exception_Type));
4327 Set_Node18 (Id, V);
4328 end Set_Equivalent_Type;
4330 procedure Set_Esize (Id : E; V : U) is
4331 begin
4332 Set_Uint12 (Id, V);
4333 end Set_Esize;
4335 procedure Set_Extra_Accessibility (Id : E; V : E) is
4336 begin
4337 pragma Assert
4338 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
4339 Set_Node13 (Id, V);
4340 end Set_Extra_Accessibility;
4342 procedure Set_Extra_Accessibility_Of_Result (Id : E; V : E) is
4343 begin
4344 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
4345 Set_Node19 (Id, V);
4346 end Set_Extra_Accessibility_Of_Result;
4348 procedure Set_Extra_Constrained (Id : E; V : E) is
4349 begin
4350 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
4351 Set_Node23 (Id, V);
4352 end Set_Extra_Constrained;
4354 procedure Set_Extra_Formal (Id : E; V : E) is
4355 begin
4356 Set_Node15 (Id, V);
4357 end Set_Extra_Formal;
4359 procedure Set_Extra_Formals (Id : E; V : E) is
4360 begin
4361 pragma Assert
4362 (Is_Overloadable (Id)
4363 or else Ekind_In (Id, E_Entry_Family,
4364 E_Subprogram_Body,
4365 E_Subprogram_Type));
4366 Set_Node28 (Id, V);
4367 end Set_Extra_Formals;
4369 procedure Set_Finalization_Master (Id : E; V : E) is
4370 begin
4371 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
4372 Set_Node23 (Id, V);
4373 end Set_Finalization_Master;
4375 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
4376 begin
4377 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
4378 Set_Flag158 (Id, V);
4379 end Set_Finalize_Storage_Only;
4381 procedure Set_Finalizer (Id : E; V : E) is
4382 begin
4383 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
4384 Set_Node28 (Id, V);
4385 end Set_Finalizer;
4387 procedure Set_First_Entity (Id : E; V : E) is
4388 begin
4389 Set_Node17 (Id, V);
4390 end Set_First_Entity;
4392 procedure Set_First_Exit_Statement (Id : E; V : N) is
4393 begin
4394 pragma Assert (Ekind (Id) = E_Loop);
4395 Set_Node8 (Id, V);
4396 end Set_First_Exit_Statement;
4398 procedure Set_First_Index (Id : E; V : N) is
4399 begin
4400 pragma Assert (Is_Array_Type (Id));
4401 Set_Node17 (Id, V);
4402 end Set_First_Index;
4404 procedure Set_First_Literal (Id : E; V : E) is
4405 begin
4406 pragma Assert (Is_Enumeration_Type (Id));
4407 Set_Node17 (Id, V);
4408 end Set_First_Literal;
4410 procedure Set_First_Private_Entity (Id : E; V : E) is
4411 begin
4412 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
4413 or else Ekind (Id) in Concurrent_Kind);
4414 Set_Node16 (Id, V);
4415 end Set_First_Private_Entity;
4417 procedure Set_First_Rep_Item (Id : E; V : N) is
4418 begin
4419 Set_Node6 (Id, V);
4420 end Set_First_Rep_Item;
4422 procedure Set_Float_Rep (Id : E; V : F) is
4423 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
4424 begin
4425 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
4426 end Set_Float_Rep;
4428 procedure Set_Freeze_Node (Id : E; V : N) is
4429 begin
4430 Set_Node7 (Id, V);
4431 end Set_Freeze_Node;
4433 procedure Set_From_Limited_With (Id : E; V : B := True) is
4434 begin
4435 pragma Assert
4436 (Is_Type (Id) or else Ekind_In (Id, E_Abstract_State, E_Package));
4437 Set_Flag159 (Id, V);
4438 end Set_From_Limited_With;
4440 procedure Set_Full_View (Id : E; V : E) is
4441 begin
4442 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
4443 Set_Node11 (Id, V);
4444 end Set_Full_View;
4446 procedure Set_Generic_Homonym (Id : E; V : E) is
4447 begin
4448 Set_Node11 (Id, V);
4449 end Set_Generic_Homonym;
4451 procedure Set_Generic_Renamings (Id : E; V : L) is
4452 begin
4453 Set_Elist23 (Id, V);
4454 end Set_Generic_Renamings;
4456 procedure Set_Handler_Records (Id : E; V : S) is
4457 begin
4458 Set_List10 (Id, V);
4459 end Set_Handler_Records;
4461 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
4462 begin
4463 pragma Assert (Id = Base_Type (Id));
4464 Set_Flag135 (Id, V);
4465 end Set_Has_Aliased_Components;
4467 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
4468 begin
4469 Set_Flag46 (Id, V);
4470 end Set_Has_Alignment_Clause;
4472 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
4473 begin
4474 Set_Flag79 (Id, V);
4475 end Set_Has_All_Calls_Remote;
4477 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
4478 begin
4479 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4480 Set_Flag86 (Id, V);
4481 end Set_Has_Atomic_Components;
4483 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
4484 begin
4485 pragma Assert
4486 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
4487 Set_Flag139 (Id, V);
4488 end Set_Has_Biased_Representation;
4490 procedure Set_Has_Completion (Id : E; V : B := True) is
4491 begin
4492 Set_Flag26 (Id, V);
4493 end Set_Has_Completion;
4495 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
4496 begin
4497 pragma Assert (Is_Type (Id));
4498 Set_Flag71 (Id, V);
4499 end Set_Has_Completion_In_Body;
4501 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
4502 begin
4503 pragma Assert (Ekind (Id) = E_Record_Type);
4504 Set_Flag140 (Id, V);
4505 end Set_Has_Complex_Representation;
4507 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
4508 begin
4509 pragma Assert (Ekind (Id) = E_Array_Type);
4510 Set_Flag68 (Id, V);
4511 end Set_Has_Component_Size_Clause;
4513 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
4514 begin
4515 pragma Assert (Is_Type (Id));
4516 Set_Flag187 (Id, V);
4517 end Set_Has_Constrained_Partial_View;
4519 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
4520 begin
4521 Set_Flag181 (Id, V);
4522 end Set_Has_Contiguous_Rep;
4524 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
4525 begin
4526 pragma Assert (Id = Base_Type (Id));
4527 Set_Flag43 (Id, V);
4528 end Set_Has_Controlled_Component;
4530 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
4531 begin
4532 Set_Flag98 (Id, V);
4533 end Set_Has_Controlling_Result;
4535 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
4536 begin
4537 Set_Flag119 (Id, V);
4538 end Set_Has_Convention_Pragma;
4540 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
4541 begin
4542 pragma Assert
4543 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
4544 and then Is_Base_Type (Id));
4545 Set_Flag39 (Id, V);
4546 end Set_Has_Default_Aspect;
4548 procedure Set_Has_Default_Init_Cond (Id : E; V : B := True) is
4549 begin
4550 pragma Assert (Is_Type (Id));
4551 Set_Flag3 (Base_Type (Id), V);
4552 end Set_Has_Default_Init_Cond;
4554 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
4555 begin
4556 pragma Assert (Nkind (Id) in N_Entity);
4557 Set_Flag200 (Id, V);
4558 end Set_Has_Delayed_Aspects;
4560 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
4561 begin
4562 pragma Assert (Nkind (Id) in N_Entity);
4563 Set_Flag18 (Id, V);
4564 end Set_Has_Delayed_Freeze;
4566 procedure Set_Has_Delayed_Rep_Aspects (Id : E; V : B := True) is
4567 begin
4568 pragma Assert (Nkind (Id) in N_Entity);
4569 Set_Flag261 (Id, V);
4570 end Set_Has_Delayed_Rep_Aspects;
4572 procedure Set_Has_Discriminants (Id : E; V : B := True) is
4573 begin
4574 pragma Assert (Nkind (Id) in N_Entity);
4575 Set_Flag5 (Id, V);
4576 end Set_Has_Discriminants;
4578 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
4579 begin
4580 pragma Assert (Ekind (Id) = E_Record_Type
4581 and then Is_Tagged_Type (Id));
4582 Set_Flag220 (Id, V);
4583 end Set_Has_Dispatch_Table;
4585 procedure Set_Has_Dynamic_Predicate_Aspect (Id : E; V : B := True) is
4586 begin
4587 pragma Assert (Is_Type (Id));
4588 Set_Flag258 (Id, V);
4589 end Set_Has_Dynamic_Predicate_Aspect;
4591 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
4592 begin
4593 pragma Assert (Is_Enumeration_Type (Id));
4594 Set_Flag66 (Id, V);
4595 end Set_Has_Enumeration_Rep_Clause;
4597 procedure Set_Has_Exit (Id : E; V : B := True) is
4598 begin
4599 Set_Flag47 (Id, V);
4600 end Set_Has_Exit;
4602 procedure Set_Has_Expanded_Contract (Id : E; V : B := True) is
4603 begin
4604 pragma Assert (Ekind_In (Id, E_Entry,
4605 E_Entry_Family,
4606 E_Function,
4607 E_Procedure));
4608 Set_Flag240 (Id, V);
4609 end Set_Has_Expanded_Contract;
4611 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
4612 begin
4613 Set_Flag175 (Id, V);
4614 end Set_Has_Forward_Instantiation;
4616 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
4617 begin
4618 Set_Flag173 (Id, V);
4619 end Set_Has_Fully_Qualified_Name;
4621 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
4622 begin
4623 Set_Flag82 (Id, V);
4624 end Set_Has_Gigi_Rep_Item;
4626 procedure Set_Has_Homonym (Id : E; V : B := True) is
4627 begin
4628 Set_Flag56 (Id, V);
4629 end Set_Has_Homonym;
4631 procedure Set_Has_Implicit_Dereference (Id : E; V : B := True) is
4632 begin
4633 Set_Flag251 (Id, V);
4634 end Set_Has_Implicit_Dereference;
4636 procedure Set_Has_Independent_Components (Id : E; V : B := True) is
4637 begin
4638 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4639 Set_Flag34 (Id, V);
4640 end Set_Has_Independent_Components;
4642 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
4643 begin
4644 pragma Assert (Is_Type (Id));
4645 Set_Flag248 (Id, V);
4646 end Set_Has_Inheritable_Invariants;
4648 procedure Set_Has_Inherited_Default_Init_Cond (Id : E; V : B := True) is
4649 begin
4650 pragma Assert (Is_Type (Id));
4651 Set_Flag133 (Base_Type (Id), V);
4652 end Set_Has_Inherited_Default_Init_Cond;
4654 procedure Set_Has_Inherited_Invariants (Id : E; V : B := True) is
4655 begin
4656 pragma Assert (Is_Type (Id));
4657 Set_Flag291 (Id, V);
4658 end Set_Has_Inherited_Invariants;
4660 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
4661 begin
4662 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
4663 Set_Flag219 (Id, V);
4664 end Set_Has_Initial_Value;
4666 procedure Set_Has_Loop_Entry_Attributes (Id : E; V : B := True) is
4667 begin
4668 pragma Assert (Ekind (Id) = E_Loop);
4669 Set_Flag260 (Id, V);
4670 end Set_Has_Loop_Entry_Attributes;
4672 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
4673 begin
4674 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4675 Set_Flag83 (Id, V);
4676 end Set_Has_Machine_Radix_Clause;
4678 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
4679 begin
4680 Set_Flag21 (Id, V);
4681 end Set_Has_Master_Entity;
4683 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
4684 begin
4685 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4686 Set_Flag142 (Id, V);
4687 end Set_Has_Missing_Return;
4689 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
4690 begin
4691 Set_Flag101 (Id, V);
4692 end Set_Has_Nested_Block_With_Handler;
4694 procedure Set_Has_Nested_Subprogram (Id : E; V : B := True) is
4695 begin
4696 pragma Assert (Is_Subprogram (Id));
4697 Set_Flag282 (Id, V);
4698 end Set_Has_Nested_Subprogram;
4700 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
4701 begin
4702 pragma Assert (Id = Base_Type (Id));
4703 Set_Flag75 (Id, V);
4704 end Set_Has_Non_Standard_Rep;
4706 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
4707 begin
4708 pragma Assert (Is_Type (Id));
4709 Set_Flag172 (Id, V);
4710 end Set_Has_Object_Size_Clause;
4712 procedure Set_Has_Out_Or_In_Out_Parameter (Id : E; V : B := True) is
4713 begin
4714 pragma Assert
4715 (Ekind_In (Id, E_Entry, E_Entry_Family)
4716 or else Is_Subprogram_Or_Generic_Subprogram (Id));
4717 Set_Flag110 (Id, V);
4718 end Set_Has_Out_Or_In_Out_Parameter;
4720 procedure Set_Has_Own_Invariants (Id : E; V : B := True) is
4721 begin
4722 pragma Assert (Is_Type (Id));
4723 Set_Flag232 (Id, V);
4724 end Set_Has_Own_Invariants;
4726 procedure Set_Has_Partial_Visible_Refinement (Id : E; V : B := True) is
4727 begin
4728 pragma Assert (Ekind (Id) = E_Abstract_State);
4729 Set_Flag296 (Id, V);
4730 end Set_Has_Partial_Visible_Refinement;
4732 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
4733 begin
4734 Set_Flag154 (Id, V);
4735 end Set_Has_Per_Object_Constraint;
4737 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
4738 begin
4739 pragma Assert (Is_Access_Type (Id));
4740 Set_Flag27 (Base_Type (Id), V);
4741 end Set_Has_Pragma_Controlled;
4743 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
4744 begin
4745 Set_Flag150 (Id, V);
4746 end Set_Has_Pragma_Elaborate_Body;
4748 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
4749 begin
4750 Set_Flag157 (Id, V);
4751 end Set_Has_Pragma_Inline;
4753 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
4754 begin
4755 Set_Flag230 (Id, V);
4756 end Set_Has_Pragma_Inline_Always;
4758 procedure Set_Has_Pragma_No_Inline (Id : E; V : B := True) is
4759 begin
4760 Set_Flag201 (Id, V);
4761 end Set_Has_Pragma_No_Inline;
4763 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
4764 begin
4765 pragma Assert (Is_Enumeration_Type (Id));
4766 pragma Assert (Id = Base_Type (Id));
4767 Set_Flag198 (Id, V);
4768 end Set_Has_Pragma_Ordered;
4770 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
4771 begin
4772 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
4773 pragma Assert (Id = Base_Type (Id));
4774 Set_Flag121 (Id, V);
4775 end Set_Has_Pragma_Pack;
4777 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
4778 begin
4779 Set_Flag221 (Id, V);
4780 end Set_Has_Pragma_Preelab_Init;
4782 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
4783 begin
4784 Set_Flag203 (Id, V);
4785 end Set_Has_Pragma_Pure;
4787 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
4788 begin
4789 Set_Flag179 (Id, V);
4790 end Set_Has_Pragma_Pure_Function;
4792 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
4793 begin
4794 Set_Flag169 (Id, V);
4795 end Set_Has_Pragma_Thread_Local_Storage;
4797 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
4798 begin
4799 Set_Flag233 (Id, V);
4800 end Set_Has_Pragma_Unmodified;
4802 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
4803 begin
4804 Set_Flag180 (Id, V);
4805 end Set_Has_Pragma_Unreferenced;
4807 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
4808 begin
4809 pragma Assert (Is_Type (Id));
4810 Set_Flag212 (Id, V);
4811 end Set_Has_Pragma_Unreferenced_Objects;
4813 procedure Set_Has_Pragma_Unused (Id : E; V : B := True) is
4814 begin
4815 Set_Flag294 (Id, V);
4816 end Set_Has_Pragma_Unused;
4818 procedure Set_Has_Predicates (Id : E; V : B := True) is
4819 begin
4820 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Void);
4821 Set_Flag250 (Id, V);
4822 end Set_Has_Predicates;
4824 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
4825 begin
4826 pragma Assert (Id = Base_Type (Id));
4827 Set_Flag120 (Id, V);
4828 end Set_Has_Primitive_Operations;
4830 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
4831 begin
4832 pragma Assert (Is_Type (Id));
4833 Set_Flag151 (Id, V);
4834 end Set_Has_Private_Ancestor;
4836 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
4837 begin
4838 Set_Flag155 (Id, V);
4839 end Set_Has_Private_Declaration;
4841 procedure Set_Has_Protected (Id : E; V : B := True) is
4842 begin
4843 Set_Flag271 (Id, V);
4844 end Set_Has_Protected;
4846 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
4847 begin
4848 Set_Flag161 (Id, V);
4849 end Set_Has_Qualified_Name;
4851 procedure Set_Has_RACW (Id : E; V : B := True) is
4852 begin
4853 pragma Assert (Ekind (Id) = E_Package);
4854 Set_Flag214 (Id, V);
4855 end Set_Has_RACW;
4857 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
4858 begin
4859 pragma Assert (Id = Base_Type (Id));
4860 Set_Flag65 (Id, V);
4861 end Set_Has_Record_Rep_Clause;
4863 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
4864 begin
4865 pragma Assert (Is_Subprogram (Id));
4866 Set_Flag143 (Id, V);
4867 end Set_Has_Recursive_Call;
4869 procedure Set_Has_Shift_Operator (Id : E; V : B := True) is
4870 begin
4871 pragma Assert (Is_Integer_Type (Id) and then Is_Base_Type (Id));
4872 Set_Flag267 (Id, V);
4873 end Set_Has_Shift_Operator;
4875 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
4876 begin
4877 Set_Flag29 (Id, V);
4878 end Set_Has_Size_Clause;
4880 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
4881 begin
4882 pragma Assert (Is_Ordinary_Fixed_Point_Type (Id));
4883 Set_Flag67 (Id, V);
4884 end Set_Has_Small_Clause;
4886 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
4887 begin
4888 pragma Assert (Id = Base_Type (Id));
4889 Set_Flag100 (Id, V);
4890 end Set_Has_Specified_Layout;
4892 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
4893 begin
4894 pragma Assert (Is_Type (Id));
4895 Set_Flag190 (Id, V);
4896 end Set_Has_Specified_Stream_Input;
4898 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
4899 begin
4900 pragma Assert (Is_Type (Id));
4901 Set_Flag191 (Id, V);
4902 end Set_Has_Specified_Stream_Output;
4904 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
4905 begin
4906 pragma Assert (Is_Type (Id));
4907 Set_Flag192 (Id, V);
4908 end Set_Has_Specified_Stream_Read;
4910 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
4911 begin
4912 pragma Assert (Is_Type (Id));
4913 Set_Flag193 (Id, V);
4914 end Set_Has_Specified_Stream_Write;
4916 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
4917 begin
4918 Set_Flag211 (Id, V);
4919 end Set_Has_Static_Discriminants;
4921 procedure Set_Has_Static_Predicate (Id : E; V : B := True) is
4922 begin
4923 pragma Assert (Is_Type (Id));
4924 Set_Flag269 (Id, V);
4925 end Set_Has_Static_Predicate;
4927 procedure Set_Has_Static_Predicate_Aspect (Id : E; V : B := True) is
4928 begin
4929 pragma Assert (Is_Type (Id));
4930 Set_Flag259 (Id, V);
4931 end Set_Has_Static_Predicate_Aspect;
4933 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
4934 begin
4935 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4936 pragma Assert (Id = Base_Type (Id));
4937 Set_Flag23 (Id, V);
4938 end Set_Has_Storage_Size_Clause;
4940 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4941 begin
4942 pragma Assert (Is_Elementary_Type (Id));
4943 Set_Flag184 (Id, V);
4944 end Set_Has_Stream_Size_Clause;
4946 procedure Set_Has_Task (Id : E; V : B := True) is
4947 begin
4948 pragma Assert (Id = Base_Type (Id));
4949 Set_Flag30 (Id, V);
4950 end Set_Has_Task;
4952 procedure Set_Has_Thunks (Id : E; V : B := True) is
4953 begin
4954 pragma Assert (Is_Tag (Id));
4955 Set_Flag228 (Id, V);
4956 end Set_Has_Thunks;
4958 procedure Set_Has_Timing_Event (Id : E; V : B := True) is
4959 begin
4960 pragma Assert (Id = Base_Type (Id));
4961 Set_Flag289 (Id, V);
4962 end Set_Has_Timing_Event;
4964 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4965 begin
4966 pragma Assert (Id = Base_Type (Id));
4967 Set_Flag123 (Id, V);
4968 end Set_Has_Unchecked_Union;
4970 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4971 begin
4972 pragma Assert (Is_Type (Id));
4973 Set_Flag72 (Id, V);
4974 end Set_Has_Unknown_Discriminants;
4976 procedure Set_Has_Visible_Refinement (Id : E; V : B := True) is
4977 begin
4978 pragma Assert (Ekind (Id) = E_Abstract_State);
4979 Set_Flag263 (Id, V);
4980 end Set_Has_Visible_Refinement;
4982 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4983 begin
4984 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4985 Set_Flag87 (Id, V);
4986 end Set_Has_Volatile_Components;
4988 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4989 begin
4990 Set_Flag182 (Id, V);
4991 end Set_Has_Xref_Entry;
4993 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4994 begin
4995 pragma Assert (Ekind (Id) = E_Variable);
4996 Set_Node8 (Id, V);
4997 end Set_Hiding_Loop_Variable;
4999 procedure Set_Homonym (Id : E; V : E) is
5000 begin
5001 pragma Assert (Id /= V);
5002 Set_Node4 (Id, V);
5003 end Set_Homonym;
5005 procedure Set_Incomplete_Actuals (Id : E; V : L) is
5006 begin
5007 pragma Assert (Ekind (Id) = E_Package);
5008 Set_Elist24 (Id, V);
5009 end Set_Incomplete_Actuals;
5011 procedure Set_Import_Pragma (Id : E; V : E) is
5012 begin
5013 pragma Assert (Is_Subprogram (Id));
5014 Set_Node35 (Id, V);
5015 end Set_Import_Pragma;
5017 procedure Set_Interface_Alias (Id : E; V : E) is
5018 begin
5019 pragma Assert
5020 (Is_Internal (Id)
5021 and then Is_Hidden (Id)
5022 and then (Ekind_In (Id, E_Procedure, E_Function)));
5023 Set_Node25 (Id, V);
5024 end Set_Interface_Alias;
5026 procedure Set_Interfaces (Id : E; V : L) is
5027 begin
5028 pragma Assert (Is_Record_Type (Id));
5029 Set_Elist25 (Id, V);
5030 end Set_Interfaces;
5032 procedure Set_In_Package_Body (Id : E; V : B := True) is
5033 begin
5034 Set_Flag48 (Id, V);
5035 end Set_In_Package_Body;
5037 procedure Set_In_Private_Part (Id : E; V : B := True) is
5038 begin
5039 Set_Flag45 (Id, V);
5040 end Set_In_Private_Part;
5042 procedure Set_In_Use (Id : E; V : B := True) is
5043 begin
5044 pragma Assert (Nkind (Id) in N_Entity);
5045 Set_Flag8 (Id, V);
5046 end Set_In_Use;
5048 procedure Set_Initialization_Statements (Id : E; V : N) is
5049 begin
5050 -- Tolerate an E_Void entity since this can be called while resolving
5051 -- an aggregate used as the initialization expression for an object
5052 -- declaration, and this occurs before the Ekind for the object is set.
5054 pragma Assert (Ekind_In (Id, E_Void, E_Constant, E_Variable));
5055 Set_Node28 (Id, V);
5056 end Set_Initialization_Statements;
5058 procedure Set_Inner_Instances (Id : E; V : L) is
5059 begin
5060 Set_Elist23 (Id, V);
5061 end Set_Inner_Instances;
5063 procedure Set_Interface_Name (Id : E; V : N) is
5064 begin
5065 Set_Node21 (Id, V);
5066 end Set_Interface_Name;
5068 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
5069 begin
5070 pragma Assert (Is_Overloadable (Id));
5071 Set_Flag19 (Id, V);
5072 end Set_Is_Abstract_Subprogram;
5074 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
5075 begin
5076 pragma Assert (Is_Type (Id));
5077 Set_Flag146 (Id, V);
5078 end Set_Is_Abstract_Type;
5080 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
5081 begin
5082 pragma Assert (Is_Access_Type (Id));
5083 Set_Flag194 (Id, V);
5084 end Set_Is_Local_Anonymous_Access;
5086 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
5087 begin
5088 pragma Assert (Is_Access_Type (Id));
5089 Set_Flag69 (Id, V);
5090 end Set_Is_Access_Constant;
5092 procedure Set_Is_Actual_Subtype (Id : E; V : B := True) is
5093 begin
5094 pragma Assert (Is_Type (Id));
5095 Set_Flag293 (Id, V);
5096 end Set_Is_Actual_Subtype;
5098 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
5099 begin
5100 Set_Flag185 (Id, V);
5101 end Set_Is_Ada_2005_Only;
5103 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
5104 begin
5105 Set_Flag199 (Id, V);
5106 end Set_Is_Ada_2012_Only;
5108 procedure Set_Is_Aliased (Id : E; V : B := True) is
5109 begin
5110 pragma Assert (Nkind (Id) in N_Entity);
5111 Set_Flag15 (Id, V);
5112 end Set_Is_Aliased;
5114 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
5115 begin
5116 pragma Assert
5117 (Ekind (Id) = E_Procedure or else Is_Type (Id));
5118 Set_Flag81 (Id, V);
5119 end Set_Is_Asynchronous;
5121 procedure Set_Is_Atomic (Id : E; V : B := True) is
5122 begin
5123 Set_Flag85 (Id, V);
5124 end Set_Is_Atomic;
5126 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
5127 begin
5128 pragma Assert ((not V)
5129 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
5130 Set_Flag122 (Id, V);
5131 end Set_Is_Bit_Packed_Array;
5133 procedure Set_Is_Called (Id : E; V : B := True) is
5134 begin
5135 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
5136 Set_Flag102 (Id, V);
5137 end Set_Is_Called;
5139 procedure Set_Is_Character_Type (Id : E; V : B := True) is
5140 begin
5141 Set_Flag63 (Id, V);
5142 end Set_Is_Character_Type;
5144 procedure Set_Is_Checked_Ghost_Entity (Id : E; V : B := True) is
5145 begin
5146 pragma Assert (Is_Formal (Id)
5147 or else Is_Object (Id)
5148 or else Is_Package_Or_Generic_Package (Id)
5149 or else Is_Subprogram_Or_Generic_Subprogram (Id)
5150 or else Is_Type (Id)
5151 or else Ekind (Id) = E_Abstract_State
5152 or else Ekind (Id) = E_Component
5153 or else Ekind (Id) = E_Discriminant
5154 or else Ekind (Id) = E_Exception
5155 or else Ekind (Id) = E_Package_Body
5156 or else Ekind (Id) = E_Subprogram_Body
5158 -- Allow this attribute to appear on non-analyzed entities
5160 or else Ekind (Id) = E_Void);
5161 Set_Flag277 (Id, V);
5162 end Set_Is_Checked_Ghost_Entity;
5164 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
5165 begin
5166 Set_Flag73 (Id, V);
5167 end Set_Is_Child_Unit;
5169 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
5170 begin
5171 Set_Flag35 (Id, V);
5172 end Set_Is_Class_Wide_Equivalent_Type;
5174 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
5175 begin
5176 Set_Flag149 (Id, V);
5177 end Set_Is_Compilation_Unit;
5179 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
5180 begin
5181 pragma Assert (Ekind (Id) = E_Discriminant);
5182 Set_Flag103 (Id, V);
5183 end Set_Is_Completely_Hidden;
5185 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
5186 begin
5187 Set_Flag20 (Id, V);
5188 end Set_Is_Concurrent_Record_Type;
5190 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
5191 begin
5192 Set_Flag80 (Id, V);
5193 end Set_Is_Constr_Subt_For_U_Nominal;
5195 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
5196 begin
5197 Set_Flag141 (Id, V);
5198 end Set_Is_Constr_Subt_For_UN_Aliased;
5200 procedure Set_Is_Constrained (Id : E; V : B := True) is
5201 begin
5202 pragma Assert (Nkind (Id) in N_Entity);
5203 Set_Flag12 (Id, V);
5204 end Set_Is_Constrained;
5206 procedure Set_Is_Constructor (Id : E; V : B := True) is
5207 begin
5208 Set_Flag76 (Id, V);
5209 end Set_Is_Constructor;
5211 procedure Set_Is_Controlled (Id : E; V : B := True) is
5212 begin
5213 pragma Assert (Id = Base_Type (Id));
5214 Set_Flag42 (Id, V);
5215 end Set_Is_Controlled;
5217 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
5218 begin
5219 pragma Assert (Is_Formal (Id));
5220 Set_Flag97 (Id, V);
5221 end Set_Is_Controlling_Formal;
5223 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
5224 begin
5225 Set_Flag74 (Id, V);
5226 end Set_Is_CPP_Class;
5228 procedure Set_Is_Default_Init_Cond_Procedure (Id : E; V : B := True) is
5229 begin
5230 pragma Assert (Ekind (Id) = E_Procedure);
5231 Set_Flag132 (Id, V);
5232 end Set_Is_Default_Init_Cond_Procedure;
5234 procedure Set_Is_Descendant_Of_Address (Id : E; V : B := True) is
5235 begin
5236 pragma Assert (Is_Type (Id));
5237 Set_Flag223 (Id, V);
5238 end Set_Is_Descendant_Of_Address;
5240 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
5241 begin
5242 Set_Flag176 (Id, V);
5243 end Set_Is_Discrim_SO_Function;
5245 procedure Set_Is_Discriminant_Check_Function (Id : E; V : B := True) is
5246 begin
5247 Set_Flag264 (Id, V);
5248 end Set_Is_Discriminant_Check_Function;
5250 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
5251 begin
5252 Set_Flag234 (Id, V);
5253 end Set_Is_Dispatch_Table_Entity;
5255 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
5256 begin
5257 pragma Assert
5258 (V = False
5259 or else
5260 Is_Overloadable (Id)
5261 or else
5262 Ekind (Id) = E_Subprogram_Type);
5264 Set_Flag6 (Id, V);
5265 end Set_Is_Dispatching_Operation;
5267 procedure Set_Is_Eliminated (Id : E; V : B := True) is
5268 begin
5269 Set_Flag124 (Id, V);
5270 end Set_Is_Eliminated;
5272 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
5273 begin
5274 Set_Flag52 (Id, V);
5275 end Set_Is_Entry_Formal;
5277 procedure Set_Is_Exception_Handler (Id : E; V : B := True) is
5278 begin
5279 pragma Assert (Ekind (Id) = E_Block);
5280 Set_Flag286 (Id, V);
5281 end Set_Is_Exception_Handler;
5283 procedure Set_Is_Exported (Id : E; V : B := True) is
5284 begin
5285 Set_Flag99 (Id, V);
5286 end Set_Is_Exported;
5288 procedure Set_Is_Finalized_Transient (Id : E; V : B := True) is
5289 begin
5290 pragma Assert (Ekind_In (Id, E_Constant, E_Loop_Parameter, E_Variable));
5291 Set_Flag252 (Id, V);
5292 end Set_Is_Finalized_Transient;
5294 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
5295 begin
5296 Set_Flag70 (Id, V);
5297 end Set_Is_First_Subtype;
5299 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
5300 begin
5301 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
5302 Set_Flag118 (Id, V);
5303 end Set_Is_For_Access_Subtype;
5305 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
5306 begin
5307 Set_Flag111 (Id, V);
5308 end Set_Is_Formal_Subprogram;
5310 procedure Set_Is_Frozen (Id : E; V : B := True) is
5311 begin
5312 pragma Assert (Nkind (Id) in N_Entity);
5313 Set_Flag4 (Id, V);
5314 end Set_Is_Frozen;
5316 procedure Set_Is_Generic_Actual_Subprogram (Id : E; V : B := True) is
5317 begin
5318 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5319 Set_Flag274 (Id, V);
5320 end Set_Is_Generic_Actual_Subprogram;
5322 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
5323 begin
5324 pragma Assert (Is_Type (Id));
5325 Set_Flag94 (Id, V);
5326 end Set_Is_Generic_Actual_Type;
5328 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
5329 begin
5330 Set_Flag130 (Id, V);
5331 end Set_Is_Generic_Instance;
5333 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
5334 begin
5335 pragma Assert (Nkind (Id) in N_Entity);
5336 Set_Flag13 (Id, V);
5337 end Set_Is_Generic_Type;
5339 procedure Set_Is_Hidden (Id : E; V : B := True) is
5340 begin
5341 Set_Flag57 (Id, V);
5342 end Set_Is_Hidden;
5344 procedure Set_Is_Hidden_Non_Overridden_Subpgm (Id : E; V : B := True) is
5345 begin
5346 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5347 Set_Flag2 (Id, V);
5348 end Set_Is_Hidden_Non_Overridden_Subpgm;
5350 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
5351 begin
5352 Set_Flag171 (Id, V);
5353 end Set_Is_Hidden_Open_Scope;
5355 procedure Set_Is_Ignored_Ghost_Entity (Id : E; V : B := True) is
5356 begin
5357 pragma Assert (Is_Formal (Id)
5358 or else Is_Object (Id)
5359 or else Is_Package_Or_Generic_Package (Id)
5360 or else Is_Subprogram_Or_Generic_Subprogram (Id)
5361 or else Is_Type (Id)
5362 or else Ekind (Id) = E_Abstract_State
5363 or else Ekind (Id) = E_Component
5364 or else Ekind (Id) = E_Discriminant
5365 or else Ekind (Id) = E_Exception
5366 or else Ekind (Id) = E_Package_Body
5367 or else Ekind (Id) = E_Subprogram_Body
5369 -- Allow this attribute to appear on non-analyzed entities
5371 or else Ekind (Id) = E_Void);
5372 Set_Flag278 (Id, V);
5373 end Set_Is_Ignored_Ghost_Entity;
5375 procedure Set_Is_Ignored_Transient (Id : E; V : B := True) is
5376 begin
5377 pragma Assert (Ekind_In (Id, E_Constant, E_Loop_Parameter, E_Variable));
5378 Set_Flag295 (Id, V);
5379 end Set_Is_Ignored_Transient;
5381 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
5382 begin
5383 pragma Assert (Nkind (Id) in N_Entity);
5384 Set_Flag7 (Id, V);
5385 end Set_Is_Immediately_Visible;
5387 procedure Set_Is_Implementation_Defined (Id : E; V : B := True) is
5388 begin
5389 Set_Flag254 (Id, V);
5390 end Set_Is_Implementation_Defined;
5392 procedure Set_Is_Imported (Id : E; V : B := True) is
5393 begin
5394 Set_Flag24 (Id, V);
5395 end Set_Is_Imported;
5397 procedure Set_Is_Independent (Id : E; V : B := True) is
5398 begin
5399 Set_Flag268 (Id, V);
5400 end Set_Is_Independent;
5402 procedure Set_Is_Inlined (Id : E; V : B := True) is
5403 begin
5404 Set_Flag11 (Id, V);
5405 end Set_Is_Inlined;
5407 procedure Set_Is_Inlined_Always (Id : E; V : B := True) is
5408 begin
5409 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
5410 Set_Flag1 (Id, V);
5411 end Set_Is_Inlined_Always;
5413 procedure Set_Is_Interface (Id : E; V : B := True) is
5414 begin
5415 pragma Assert (Is_Record_Type (Id));
5416 Set_Flag186 (Id, V);
5417 end Set_Is_Interface;
5419 procedure Set_Is_Instantiated (Id : E; V : B := True) is
5420 begin
5421 Set_Flag126 (Id, V);
5422 end Set_Is_Instantiated;
5424 procedure Set_Is_Internal (Id : E; V : B := True) is
5425 begin
5426 pragma Assert (Nkind (Id) in N_Entity);
5427 Set_Flag17 (Id, V);
5428 end Set_Is_Internal;
5430 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
5431 begin
5432 pragma Assert (Nkind (Id) in N_Entity);
5433 Set_Flag89 (Id, V);
5434 end Set_Is_Interrupt_Handler;
5436 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
5437 begin
5438 Set_Flag64 (Id, V);
5439 end Set_Is_Intrinsic_Subprogram;
5441 procedure Set_Is_Invariant_Procedure (Id : E; V : B := True) is
5442 begin
5443 pragma Assert (Ekind (Id) = E_Procedure);
5444 Set_Flag257 (Id, V);
5445 end Set_Is_Invariant_Procedure;
5447 procedure Set_Is_Itype (Id : E; V : B := True) is
5448 begin
5449 Set_Flag91 (Id, V);
5450 end Set_Is_Itype;
5452 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
5453 begin
5454 Set_Flag37 (Id, V);
5455 end Set_Is_Known_Non_Null;
5457 procedure Set_Is_Known_Null (Id : E; V : B := True) is
5458 begin
5459 Set_Flag204 (Id, V);
5460 end Set_Is_Known_Null;
5462 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
5463 begin
5464 Set_Flag170 (Id, V);
5465 end Set_Is_Known_Valid;
5467 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
5468 begin
5469 pragma Assert (Is_Type (Id));
5470 Set_Flag106 (Id, V);
5471 end Set_Is_Limited_Composite;
5473 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
5474 begin
5475 pragma Assert (Is_Interface (Id));
5476 Set_Flag197 (Id, V);
5477 end Set_Is_Limited_Interface;
5479 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
5480 begin
5481 Set_Flag25 (Id, V);
5482 end Set_Is_Limited_Record;
5484 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
5485 begin
5486 pragma Assert (Is_Subprogram (Id));
5487 Set_Flag137 (Id, V);
5488 end Set_Is_Machine_Code_Subprogram;
5490 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
5491 begin
5492 pragma Assert (Is_Type (Id));
5493 Set_Flag109 (Id, V);
5494 end Set_Is_Non_Static_Subtype;
5496 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
5497 begin
5498 pragma Assert (Ekind (Id) = E_Procedure);
5499 Set_Flag178 (Id, V);
5500 end Set_Is_Null_Init_Proc;
5502 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
5503 begin
5504 Set_Flag153 (Id, V);
5505 end Set_Is_Obsolescent;
5507 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
5508 begin
5509 pragma Assert (Ekind (Id) = E_Out_Parameter);
5510 Set_Flag226 (Id, V);
5511 end Set_Is_Only_Out_Parameter;
5513 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
5514 begin
5515 Set_Flag160 (Id, V);
5516 end Set_Is_Package_Body_Entity;
5518 procedure Set_Is_Packed (Id : E; V : B := True) is
5519 begin
5520 pragma Assert (Id = Base_Type (Id));
5521 Set_Flag51 (Id, V);
5522 end Set_Is_Packed;
5524 procedure Set_Is_Packed_Array_Impl_Type (Id : E; V : B := True) is
5525 begin
5526 Set_Flag138 (Id, V);
5527 end Set_Is_Packed_Array_Impl_Type;
5529 procedure Set_Is_Param_Block_Component_Type (Id : E; V : B := True) is
5530 begin
5531 pragma Assert (Ekind_In (Id, E_Void, E_General_Access_Type));
5532 Set_Flag215 (Id, V);
5533 end Set_Is_Param_Block_Component_Type;
5535 procedure Set_Is_Partial_Invariant_Procedure (Id : E; V : B := True) is
5536 begin
5537 pragma Assert (Ekind (Id) = E_Procedure);
5538 Set_Flag292 (Id, V);
5539 end Set_Is_Partial_Invariant_Procedure;
5541 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
5542 begin
5543 pragma Assert (Nkind (Id) in N_Entity);
5544 Set_Flag9 (Id, V);
5545 end Set_Is_Potentially_Use_Visible;
5547 procedure Set_Is_Predicate_Function (Id : E; V : B := True) is
5548 begin
5549 pragma Assert (Ekind (Id) = E_Function);
5550 Set_Flag255 (Id, V);
5551 end Set_Is_Predicate_Function;
5553 procedure Set_Is_Predicate_Function_M (Id : E; V : B := True) is
5554 begin
5555 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5556 Set_Flag256 (Id, V);
5557 end Set_Is_Predicate_Function_M;
5559 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
5560 begin
5561 Set_Flag59 (Id, V);
5562 end Set_Is_Preelaborated;
5564 procedure Set_Is_Primitive (Id : E; V : B := True) is
5565 begin
5566 pragma Assert
5567 (Is_Overloadable (Id)
5568 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
5569 Set_Flag218 (Id, V);
5570 end Set_Is_Primitive;
5572 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
5573 begin
5574 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5575 Set_Flag195 (Id, V);
5576 end Set_Is_Primitive_Wrapper;
5578 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
5579 begin
5580 pragma Assert (Is_Type (Id));
5581 Set_Flag107 (Id, V);
5582 end Set_Is_Private_Composite;
5584 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
5585 begin
5586 Set_Flag53 (Id, V);
5587 end Set_Is_Private_Descendant;
5589 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
5590 begin
5591 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5592 Set_Flag245 (Id, V);
5593 end Set_Is_Private_Primitive;
5595 procedure Set_Is_Public (Id : E; V : B := True) is
5596 begin
5597 pragma Assert (Nkind (Id) in N_Entity);
5598 Set_Flag10 (Id, V);
5599 end Set_Is_Public;
5601 procedure Set_Is_Pure (Id : E; V : B := True) is
5602 begin
5603 Set_Flag44 (Id, V);
5604 end Set_Is_Pure;
5606 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
5607 begin
5608 pragma Assert (Is_Access_Type (Id));
5609 Set_Flag189 (Id, V);
5610 end Set_Is_Pure_Unit_Access_Type;
5612 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
5613 begin
5614 pragma Assert (Is_Type (Id));
5615 Set_Flag244 (Id, V);
5616 end Set_Is_RACW_Stub_Type;
5618 procedure Set_Is_Raised (Id : E; V : B := True) is
5619 begin
5620 pragma Assert (Ekind (Id) = E_Exception);
5621 Set_Flag224 (Id, V);
5622 end Set_Is_Raised;
5624 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
5625 begin
5626 Set_Flag62 (Id, V);
5627 end Set_Is_Remote_Call_Interface;
5629 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
5630 begin
5631 Set_Flag61 (Id, V);
5632 end Set_Is_Remote_Types;
5634 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
5635 begin
5636 Set_Flag112 (Id, V);
5637 end Set_Is_Renaming_Of_Object;
5639 procedure Set_Is_Return_Object (Id : E; V : B := True) is
5640 begin
5641 Set_Flag209 (Id, V);
5642 end Set_Is_Return_Object;
5644 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
5645 begin
5646 pragma Assert (Ekind (Id) = E_Variable);
5647 Set_Flag249 (Id, V);
5648 end Set_Is_Safe_To_Reevaluate;
5650 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
5651 begin
5652 Set_Flag60 (Id, V);
5653 end Set_Is_Shared_Passive;
5655 procedure Set_Is_Static_Type (Id : E; V : B := True) is
5656 begin
5657 pragma Assert (Is_Type (Id));
5658 Set_Flag281 (Id, V);
5659 end Set_Is_Static_Type;
5661 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
5662 begin
5663 pragma Assert
5664 (Is_Type (Id)
5665 or else Ekind_In (Id, E_Exception,
5666 E_Variable,
5667 E_Constant,
5668 E_Void));
5669 Set_Flag28 (Id, V);
5670 end Set_Is_Statically_Allocated;
5672 procedure Set_Is_Tag (Id : E; V : B := True) is
5673 begin
5674 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5675 Set_Flag78 (Id, V);
5676 end Set_Is_Tag;
5678 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
5679 begin
5680 Set_Flag55 (Id, V);
5681 end Set_Is_Tagged_Type;
5683 procedure Set_Is_Thunk (Id : E; V : B := True) is
5684 begin
5685 pragma Assert (Is_Subprogram (Id));
5686 Set_Flag225 (Id, V);
5687 end Set_Is_Thunk;
5689 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
5690 begin
5691 Set_Flag235 (Id, V);
5692 end Set_Is_Trivial_Subprogram;
5694 procedure Set_Is_True_Constant (Id : E; V : B := True) is
5695 begin
5696 Set_Flag163 (Id, V);
5697 end Set_Is_True_Constant;
5699 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
5700 begin
5701 pragma Assert (Id = Base_Type (Id));
5702 Set_Flag117 (Id, V);
5703 end Set_Is_Unchecked_Union;
5705 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
5706 begin
5707 pragma Assert (Ekind (Id) = E_Record_Type);
5708 Set_Flag246 (Id, V);
5709 end Set_Is_Underlying_Record_View;
5711 procedure Set_Is_Unimplemented (Id : E; V : B := True) is
5712 begin
5713 Set_Flag284 (Id, V);
5714 end Set_Is_Unimplemented;
5716 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
5717 begin
5718 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
5719 Set_Flag144 (Id, V);
5720 end Set_Is_Unsigned_Type;
5722 procedure Set_Is_Uplevel_Referenced_Entity (Id : E; V : B := True) is
5723 begin
5724 pragma Assert
5725 (Ekind_In (Id, E_Constant, E_Variable)
5726 or else Is_Formal (Id)
5727 or else Is_Type (Id));
5728 Set_Flag283 (Id, V);
5729 end Set_Is_Uplevel_Referenced_Entity;
5731 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
5732 begin
5733 pragma Assert (Ekind (Id) = E_Procedure);
5734 Set_Flag127 (Id, V);
5735 end Set_Is_Valued_Procedure;
5737 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
5738 begin
5739 Set_Flag206 (Id, V);
5740 end Set_Is_Visible_Formal;
5742 procedure Set_Is_Visible_Lib_Unit (Id : E; V : B := True) is
5743 begin
5744 Set_Flag116 (Id, V);
5745 end Set_Is_Visible_Lib_Unit;
5747 procedure Set_Is_Volatile (Id : E; V : B := True) is
5748 begin
5749 pragma Assert (Nkind (Id) in N_Entity);
5750 Set_Flag16 (Id, V);
5751 end Set_Is_Volatile;
5753 procedure Set_Is_Volatile_Full_Access (Id : E; V : B := True) is
5754 begin
5755 Set_Flag285 (Id, V);
5756 end Set_Is_Volatile_Full_Access;
5758 procedure Set_Itype_Printed (Id : E; V : B := True) is
5759 begin
5760 pragma Assert (Is_Itype (Id));
5761 Set_Flag202 (Id, V);
5762 end Set_Itype_Printed;
5764 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
5765 begin
5766 Set_Flag32 (Id, V);
5767 end Set_Kill_Elaboration_Checks;
5769 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
5770 begin
5771 Set_Flag33 (Id, V);
5772 end Set_Kill_Range_Checks;
5774 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
5775 begin
5776 pragma Assert (Is_Type (Id));
5777 Set_Flag207 (Id, V);
5778 end Set_Known_To_Have_Preelab_Init;
5780 procedure Set_Last_Aggregate_Assignment (Id : E; V : N) is
5781 begin
5782 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5783 Set_Node30 (Id, V);
5784 end Set_Last_Aggregate_Assignment;
5786 procedure Set_Last_Assignment (Id : E; V : N) is
5787 begin
5788 pragma Assert (Is_Assignable (Id));
5789 Set_Node26 (Id, V);
5790 end Set_Last_Assignment;
5792 procedure Set_Last_Entity (Id : E; V : E) is
5793 begin
5794 Set_Node20 (Id, V);
5795 end Set_Last_Entity;
5797 procedure Set_Limited_View (Id : E; V : E) is
5798 begin
5799 pragma Assert (Ekind (Id) = E_Package);
5800 Set_Node23 (Id, V);
5801 end Set_Limited_View;
5803 procedure Set_Linker_Section_Pragma (Id : E; V : N) is
5804 begin
5805 pragma Assert (Is_Type (Id)
5806 or else Ekind_In (Id, E_Constant, E_Variable)
5807 or else Is_Subprogram (Id));
5808 Set_Node33 (Id, V);
5809 end Set_Linker_Section_Pragma;
5811 procedure Set_Lit_Indexes (Id : E; V : E) is
5812 begin
5813 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5814 Set_Node18 (Id, V);
5815 end Set_Lit_Indexes;
5817 procedure Set_Lit_Strings (Id : E; V : E) is
5818 begin
5819 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5820 Set_Node16 (Id, V);
5821 end Set_Lit_Strings;
5823 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
5824 begin
5825 pragma Assert (Is_Formal (Id));
5826 Set_Flag205 (Id, V);
5827 end Set_Low_Bound_Tested;
5829 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
5830 begin
5831 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
5832 Set_Flag84 (Id, V);
5833 end Set_Machine_Radix_10;
5835 procedure Set_Master_Id (Id : E; V : E) is
5836 begin
5837 pragma Assert (Is_Access_Type (Id));
5838 Set_Node17 (Id, V);
5839 end Set_Master_Id;
5841 procedure Set_Materialize_Entity (Id : E; V : B := True) is
5842 begin
5843 Set_Flag168 (Id, V);
5844 end Set_Materialize_Entity;
5846 procedure Set_May_Inherit_Delayed_Rep_Aspects (Id : E; V : B := True) is
5847 begin
5848 Set_Flag262 (Id, V);
5849 end Set_May_Inherit_Delayed_Rep_Aspects;
5851 procedure Set_Mechanism (Id : E; V : M) is
5852 begin
5853 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
5854 Set_Uint8 (Id, UI_From_Int (V));
5855 end Set_Mechanism;
5857 procedure Set_Modulus (Id : E; V : U) is
5858 begin
5859 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
5860 Set_Uint17 (Id, V);
5861 end Set_Modulus;
5863 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
5864 begin
5865 pragma Assert (Is_Type (Id));
5866 Set_Flag183 (Id, V);
5867 end Set_Must_Be_On_Byte_Boundary;
5869 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
5870 begin
5871 pragma Assert (Is_Type (Id));
5872 Set_Flag208 (Id, V);
5873 end Set_Must_Have_Preelab_Init;
5875 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
5876 begin
5877 Set_Flag147 (Id, V);
5878 end Set_Needs_Debug_Info;
5880 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
5881 begin
5882 pragma Assert
5883 (Is_Overloadable (Id)
5884 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
5885 Set_Flag22 (Id, V);
5886 end Set_Needs_No_Actuals;
5888 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
5889 begin
5890 Set_Flag115 (Id, V);
5891 end Set_Never_Set_In_Source;
5893 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
5894 begin
5895 Set_Node12 (Id, V);
5896 end Set_Next_Inlined_Subprogram;
5898 procedure Set_No_Dynamic_Predicate_On_Actual (Id : E; V : B := True) is
5899 begin
5900 pragma Assert (Is_Discrete_Type (Id));
5901 Set_Flag276 (Id, V);
5902 end Set_No_Dynamic_Predicate_On_Actual;
5904 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
5905 begin
5906 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5907 Set_Flag131 (Id, V);
5908 end Set_No_Pool_Assigned;
5910 procedure Set_No_Predicate_On_Actual (Id : E; V : B := True) is
5911 begin
5912 pragma Assert (Is_Discrete_Type (Id));
5913 Set_Flag275 (Id, V);
5914 end Set_No_Predicate_On_Actual;
5916 procedure Set_No_Return (Id : E; V : B := True) is
5917 begin
5918 pragma Assert
5919 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
5920 Set_Flag113 (Id, V);
5921 end Set_No_Return;
5923 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
5924 begin
5925 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5926 Set_Flag136 (Id, V);
5927 end Set_No_Strict_Aliasing;
5929 procedure Set_No_Tagged_Streams_Pragma (Id : E; V : E) is
5930 begin
5931 pragma Assert (Is_Tagged_Type (Id));
5932 Set_Node32 (Id, V);
5933 end Set_No_Tagged_Streams_Pragma;
5935 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
5936 begin
5937 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5938 Set_Flag58 (Id, V);
5939 end Set_Non_Binary_Modulus;
5941 procedure Set_Non_Limited_View (Id : E; V : E) is
5942 begin
5943 pragma Assert
5944 (Ekind (Id) in Incomplete_Kind
5945 or else Ekind_In (Id, E_Abstract_State, E_Class_Wide_Type));
5946 Set_Node19 (Id, V);
5947 end Set_Non_Limited_View;
5949 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
5950 begin
5951 pragma Assert
5952 (Root_Type (Id) = Standard_Boolean
5953 and then Ekind (Id) = E_Enumeration_Type);
5954 Set_Flag162 (Id, V);
5955 end Set_Nonzero_Is_True;
5957 procedure Set_Normalized_First_Bit (Id : E; V : U) is
5958 begin
5959 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5960 Set_Uint8 (Id, V);
5961 end Set_Normalized_First_Bit;
5963 procedure Set_Normalized_Position (Id : E; V : U) is
5964 begin
5965 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5966 Set_Uint14 (Id, V);
5967 end Set_Normalized_Position;
5969 procedure Set_Normalized_Position_Max (Id : E; V : U) is
5970 begin
5971 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5972 Set_Uint10 (Id, V);
5973 end Set_Normalized_Position_Max;
5975 procedure Set_OK_To_Rename (Id : E; V : B := True) is
5976 begin
5977 pragma Assert (Ekind (Id) = E_Variable);
5978 Set_Flag247 (Id, V);
5979 end Set_OK_To_Rename;
5981 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
5982 begin
5983 pragma Assert
5984 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5985 Set_Flag239 (Id, V);
5986 end Set_OK_To_Reorder_Components;
5988 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
5989 begin
5990 pragma Assert
5991 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5992 Set_Flag241 (Id, V);
5993 end Set_Optimize_Alignment_Space;
5995 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
5996 begin
5997 pragma Assert
5998 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5999 Set_Flag242 (Id, V);
6000 end Set_Optimize_Alignment_Time;
6002 procedure Set_Original_Access_Type (Id : E; V : E) is
6003 begin
6004 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
6005 Set_Node28 (Id, V);
6006 end Set_Original_Access_Type;
6008 procedure Set_Original_Array_Type (Id : E; V : E) is
6009 begin
6010 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
6011 Set_Node21 (Id, V);
6012 end Set_Original_Array_Type;
6014 procedure Set_Original_Protected_Subprogram (Id : E; V : N) is
6015 begin
6016 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
6017 Set_Node41 (Id, V);
6018 end Set_Original_Protected_Subprogram;
6020 procedure Set_Original_Record_Component (Id : E; V : E) is
6021 begin
6022 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
6023 Set_Node22 (Id, V);
6024 end Set_Original_Record_Component;
6026 procedure Set_Overlays_Constant (Id : E; V : B := True) is
6027 begin
6028 Set_Flag243 (Id, V);
6029 end Set_Overlays_Constant;
6031 procedure Set_Overridden_Operation (Id : E; V : E) is
6032 begin
6033 pragma Assert (Is_Subprogram (Id) or else Is_Generic_Subprogram (Id));
6034 Set_Node26 (Id, V);
6035 end Set_Overridden_Operation;
6037 procedure Set_Package_Instantiation (Id : E; V : N) is
6038 begin
6039 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
6040 Set_Node26 (Id, V);
6041 end Set_Package_Instantiation;
6043 procedure Set_Packed_Array_Impl_Type (Id : E; V : E) is
6044 begin
6045 pragma Assert (Is_Array_Type (Id));
6046 Set_Node23 (Id, V);
6047 end Set_Packed_Array_Impl_Type;
6049 procedure Set_Parent_Subtype (Id : E; V : E) is
6050 begin
6051 pragma Assert (Ekind (Id) = E_Record_Type);
6052 Set_Node19 (Id, V);
6053 end Set_Parent_Subtype;
6055 procedure Set_Part_Of_Constituents (Id : E; V : L) is
6056 begin
6057 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
6058 Set_Elist10 (Id, V);
6059 end Set_Part_Of_Constituents;
6061 procedure Set_Part_Of_References (Id : E; V : L) is
6062 begin
6063 pragma Assert (Ekind (Id) = E_Variable);
6064 Set_Elist11 (Id, V);
6065 end Set_Part_Of_References;
6067 procedure Set_Partial_View_Has_Unknown_Discr (Id : E; V : B := True) is
6068 begin
6069 pragma Assert (Is_Type (Id));
6070 Set_Flag280 (Id, V);
6071 end Set_Partial_View_Has_Unknown_Discr;
6073 procedure Set_Pending_Access_Types (Id : E; V : L) is
6074 begin
6075 pragma Assert (Is_Type (Id));
6076 Set_Elist15 (Id, V);
6077 end Set_Pending_Access_Types;
6079 procedure Set_Postconditions_Proc (Id : E; V : E) is
6080 begin
6081 pragma Assert (Ekind_In (Id, E_Entry,
6082 E_Entry_Family,
6083 E_Function,
6084 E_Procedure));
6085 Set_Node14 (Id, V);
6086 end Set_Postconditions_Proc;
6088 procedure Set_Predicates_Ignored (Id : E; V : B) is
6089 begin
6090 pragma Assert (Is_Type (Id));
6091 Set_Flag288 (Id, V);
6092 end Set_Predicates_Ignored;
6094 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
6095 begin
6096 pragma Assert (Is_Tagged_Type (Id));
6097 Set_Elist10 (Id, V);
6098 end Set_Direct_Primitive_Operations;
6100 procedure Set_Prival (Id : E; V : E) is
6101 begin
6102 pragma Assert (Is_Protected_Component (Id));
6103 Set_Node17 (Id, V);
6104 end Set_Prival;
6106 procedure Set_Prival_Link (Id : E; V : E) is
6107 begin
6108 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
6109 Set_Node20 (Id, V);
6110 end Set_Prival_Link;
6112 procedure Set_Private_Dependents (Id : E; V : L) is
6113 begin
6114 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
6115 Set_Elist18 (Id, V);
6116 end Set_Private_Dependents;
6118 procedure Set_Private_View (Id : E; V : N) is
6119 begin
6120 pragma Assert (Is_Private_Type (Id));
6121 Set_Node22 (Id, V);
6122 end Set_Private_View;
6124 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
6125 begin
6126 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
6127 Set_Node11 (Id, V);
6128 end Set_Protected_Body_Subprogram;
6130 procedure Set_Protected_Formal (Id : E; V : E) is
6131 begin
6132 pragma Assert (Is_Formal (Id));
6133 Set_Node22 (Id, V);
6134 end Set_Protected_Formal;
6136 procedure Set_Protection_Object (Id : E; V : E) is
6137 begin
6138 pragma Assert (Ekind_In (Id, E_Entry,
6139 E_Entry_Family,
6140 E_Function,
6141 E_Procedure));
6142 Set_Node23 (Id, V);
6143 end Set_Protection_Object;
6145 procedure Set_Reachable (Id : E; V : B := True) is
6146 begin
6147 Set_Flag49 (Id, V);
6148 end Set_Reachable;
6150 procedure Set_Referenced (Id : E; V : B := True) is
6151 begin
6152 Set_Flag156 (Id, V);
6153 end Set_Referenced;
6155 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
6156 begin
6157 Set_Flag36 (Id, V);
6158 end Set_Referenced_As_LHS;
6160 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
6161 begin
6162 Set_Flag227 (Id, V);
6163 end Set_Referenced_As_Out_Parameter;
6165 procedure Set_Refinement_Constituents (Id : E; V : L) is
6166 begin
6167 pragma Assert (Ekind (Id) = E_Abstract_State);
6168 Set_Elist8 (Id, V);
6169 end Set_Refinement_Constituents;
6171 procedure Set_Register_Exception_Call (Id : E; V : N) is
6172 begin
6173 pragma Assert (Ekind (Id) = E_Exception);
6174 Set_Node20 (Id, V);
6175 end Set_Register_Exception_Call;
6177 procedure Set_Related_Array_Object (Id : E; V : E) is
6178 begin
6179 pragma Assert (Is_Array_Type (Id));
6180 Set_Node25 (Id, V);
6181 end Set_Related_Array_Object;
6183 procedure Set_Related_Expression (Id : E; V : N) is
6184 begin
6185 pragma Assert (Ekind (Id) in Type_Kind
6186 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
6187 Set_Node24 (Id, V);
6188 end Set_Related_Expression;
6190 procedure Set_Related_Instance (Id : E; V : E) is
6191 begin
6192 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
6193 Set_Node15 (Id, V);
6194 end Set_Related_Instance;
6196 procedure Set_Related_Type (Id : E; V : E) is
6197 begin
6198 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
6199 Set_Node27 (Id, V);
6200 end Set_Related_Type;
6202 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
6203 begin
6204 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
6205 Set_Node28 (Id, V);
6206 end Set_Relative_Deadline_Variable;
6208 procedure Set_Renamed_Entity (Id : E; V : N) is
6209 begin
6210 Set_Node18 (Id, V);
6211 end Set_Renamed_Entity;
6213 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
6214 begin
6215 pragma Assert (Ekind (Id) = E_Package);
6216 Set_Flag231 (Id, V);
6217 end Set_Renamed_In_Spec;
6219 procedure Set_Renamed_Object (Id : E; V : N) is
6220 begin
6221 Set_Node18 (Id, V);
6222 end Set_Renamed_Object;
6224 procedure Set_Renaming_Map (Id : E; V : U) is
6225 begin
6226 Set_Uint9 (Id, V);
6227 end Set_Renaming_Map;
6229 procedure Set_Requires_Overriding (Id : E; V : B := True) is
6230 begin
6231 pragma Assert (Is_Overloadable (Id));
6232 Set_Flag213 (Id, V);
6233 end Set_Requires_Overriding;
6235 procedure Set_Return_Present (Id : E; V : B := True) is
6236 begin
6237 Set_Flag54 (Id, V);
6238 end Set_Return_Present;
6240 procedure Set_Return_Applies_To (Id : E; V : N) is
6241 begin
6242 Set_Node8 (Id, V);
6243 end Set_Return_Applies_To;
6245 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
6246 begin
6247 Set_Flag90 (Id, V);
6248 end Set_Returns_By_Ref;
6250 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
6251 begin
6252 pragma Assert
6253 (Is_Record_Type (Id) and then Is_Base_Type (Id));
6254 Set_Flag164 (Id, V);
6255 end Set_Reverse_Bit_Order;
6257 procedure Set_Reverse_Storage_Order (Id : E; V : B := True) is
6258 begin
6259 pragma Assert
6260 (Is_Base_Type (Id)
6261 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
6262 Set_Flag93 (Id, V);
6263 end Set_Reverse_Storage_Order;
6265 procedure Set_Rewritten_For_C (Id : E; V : B := True) is
6266 begin
6267 pragma Assert (Ekind (Id) = E_Function);
6268 Set_Flag287 (Id, V);
6269 end Set_Rewritten_For_C;
6271 procedure Set_RM_Size (Id : E; V : U) is
6272 begin
6273 pragma Assert (Is_Type (Id));
6274 Set_Uint13 (Id, V);
6275 end Set_RM_Size;
6277 procedure Set_Scalar_Range (Id : E; V : N) is
6278 begin
6279 Set_Node20 (Id, V);
6280 end Set_Scalar_Range;
6282 procedure Set_Scale_Value (Id : E; V : U) is
6283 begin
6284 Set_Uint16 (Id, V);
6285 end Set_Scale_Value;
6287 procedure Set_Scope_Depth_Value (Id : E; V : U) is
6288 begin
6289 pragma Assert (not Is_Record_Type (Id));
6290 Set_Uint22 (Id, V);
6291 end Set_Scope_Depth_Value;
6293 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
6294 begin
6295 Set_Flag167 (Id, V);
6296 end Set_Sec_Stack_Needed_For_Return;
6298 procedure Set_Shadow_Entities (Id : E; V : S) is
6299 begin
6300 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
6301 Set_List14 (Id, V);
6302 end Set_Shadow_Entities;
6304 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
6305 begin
6306 pragma Assert (Ekind (Id) = E_Variable);
6307 Set_Node22 (Id, V);
6308 end Set_Shared_Var_Procs_Instance;
6310 procedure Set_Size_Check_Code (Id : E; V : N) is
6311 begin
6312 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
6313 Set_Node19 (Id, V);
6314 end Set_Size_Check_Code;
6316 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
6317 begin
6318 Set_Flag177 (Id, V);
6319 end Set_Size_Depends_On_Discriminant;
6321 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
6322 begin
6323 Set_Flag92 (Id, V);
6324 end Set_Size_Known_At_Compile_Time;
6326 procedure Set_Small_Value (Id : E; V : R) is
6327 begin
6328 pragma Assert (Is_Fixed_Point_Type (Id));
6329 Set_Ureal21 (Id, V);
6330 end Set_Small_Value;
6332 procedure Set_SPARK_Aux_Pragma (Id : E; V : N) is
6333 begin
6334 pragma Assert
6335 (Ekind_In (Id, E_Protected_Type, -- concurrent variants
6336 E_Task_Type)
6337 or else
6338 Ekind_In (Id, E_Generic_Package, -- package variants
6339 E_Package,
6340 E_Package_Body));
6341 Set_Node41 (Id, V);
6342 end Set_SPARK_Aux_Pragma;
6344 procedure Set_SPARK_Aux_Pragma_Inherited (Id : E; V : B := True) is
6345 begin
6346 pragma Assert
6347 (Ekind_In (Id, E_Protected_Type, -- concurrent variants
6348 E_Task_Type)
6349 or else
6350 Ekind_In (Id, E_Generic_Package, -- package variants
6351 E_Package,
6352 E_Package_Body));
6353 Set_Flag266 (Id, V);
6354 end Set_SPARK_Aux_Pragma_Inherited;
6356 procedure Set_SPARK_Pragma (Id : E; V : N) is
6357 begin
6358 pragma Assert
6359 (Ekind_In (Id, E_Protected_Body, -- concurrent variants
6360 E_Protected_Type,
6361 E_Task_Body,
6362 E_Task_Type)
6363 or else
6364 Ekind_In (Id, E_Entry, -- overloadable variants
6365 E_Entry_Family,
6366 E_Function,
6367 E_Generic_Function,
6368 E_Generic_Procedure,
6369 E_Operator,
6370 E_Procedure,
6371 E_Subprogram_Body)
6372 or else
6373 Ekind_In (Id, E_Generic_Package, -- package variants
6374 E_Package,
6375 E_Package_Body)
6376 or else
6377 Ekind (Id) = E_Variable); -- variable
6378 Set_Node40 (Id, V);
6379 end Set_SPARK_Pragma;
6381 procedure Set_SPARK_Pragma_Inherited (Id : E; V : B := True) is
6382 begin
6383 pragma Assert
6384 (Ekind_In (Id, E_Protected_Body, -- concurrent variants
6385 E_Protected_Type,
6386 E_Task_Body,
6387 E_Task_Type)
6388 or else
6389 Ekind_In (Id, E_Entry, -- overloadable variants
6390 E_Entry_Family,
6391 E_Function,
6392 E_Generic_Function,
6393 E_Generic_Procedure,
6394 E_Operator,
6395 E_Procedure,
6396 E_Subprogram_Body)
6397 or else
6398 Ekind_In (Id, E_Generic_Package, -- package variants
6399 E_Package,
6400 E_Package_Body)
6401 or else
6402 Ekind (Id) = E_Variable); -- variable
6403 Set_Flag265 (Id, V);
6404 end Set_SPARK_Pragma_Inherited;
6406 procedure Set_Spec_Entity (Id : E; V : E) is
6407 begin
6408 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
6409 Set_Node19 (Id, V);
6410 end Set_Spec_Entity;
6412 procedure Set_SSO_Set_High_By_Default (Id : E; V : B := True) is
6413 begin
6414 pragma Assert
6415 (Is_Base_Type (Id)
6416 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
6417 Set_Flag273 (Id, V);
6418 end Set_SSO_Set_High_By_Default;
6420 procedure Set_SSO_Set_Low_By_Default (Id : E; V : B := True) is
6421 begin
6422 pragma Assert
6423 (Is_Base_Type (Id)
6424 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
6425 Set_Flag272 (Id, V);
6426 end Set_SSO_Set_Low_By_Default;
6428 procedure Set_Static_Discrete_Predicate (Id : E; V : S) is
6429 begin
6430 pragma Assert (Is_Discrete_Type (Id) and then Has_Predicates (Id));
6431 Set_List25 (Id, V);
6432 end Set_Static_Discrete_Predicate;
6434 procedure Set_Static_Real_Or_String_Predicate (Id : E; V : N) is
6435 begin
6436 pragma Assert ((Is_Real_Type (Id) or else Is_String_Type (Id))
6437 and then Has_Predicates (Id));
6438 Set_Node25 (Id, V);
6439 end Set_Static_Real_Or_String_Predicate;
6441 procedure Set_Status_Flag_Or_Transient_Decl (Id : E; V : E) is
6442 begin
6443 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
6444 Set_Node15 (Id, V);
6445 end Set_Status_Flag_Or_Transient_Decl;
6447 procedure Set_Storage_Size_Variable (Id : E; V : E) is
6448 begin
6449 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
6450 pragma Assert (Id = Base_Type (Id));
6451 Set_Node26 (Id, V);
6452 end Set_Storage_Size_Variable;
6454 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
6455 begin
6456 pragma Assert (Ekind (Id) = E_Package);
6457 Set_Flag77 (Id, V);
6458 end Set_Static_Elaboration_Desired;
6460 procedure Set_Static_Initialization (Id : E; V : N) is
6461 begin
6462 pragma Assert
6463 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
6464 Set_Node30 (Id, V);
6465 end Set_Static_Initialization;
6467 procedure Set_Stored_Constraint (Id : E; V : L) is
6468 begin
6469 pragma Assert (Nkind (Id) in N_Entity);
6470 Set_Elist23 (Id, V);
6471 end Set_Stored_Constraint;
6473 procedure Set_Stores_Attribute_Old_Prefix (Id : E; V : B := True) is
6474 begin
6475 pragma Assert (Ekind (Id) = E_Constant);
6476 Set_Flag270 (Id, V);
6477 end Set_Stores_Attribute_Old_Prefix;
6479 procedure Set_Strict_Alignment (Id : E; V : B := True) is
6480 begin
6481 pragma Assert (Id = Base_Type (Id));
6482 Set_Flag145 (Id, V);
6483 end Set_Strict_Alignment;
6485 procedure Set_String_Literal_Length (Id : E; V : U) is
6486 begin
6487 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
6488 Set_Uint16 (Id, V);
6489 end Set_String_Literal_Length;
6491 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
6492 begin
6493 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
6494 Set_Node18 (Id, V);
6495 end Set_String_Literal_Low_Bound;
6497 procedure Set_Subprograms_For_Type (Id : E; V : L) is
6498 begin
6499 pragma Assert (Is_Type (Id));
6500 Set_Elist29 (Id, V);
6501 end Set_Subprograms_For_Type;
6503 procedure Set_Subps_Index (Id : E; V : U) is
6504 begin
6505 pragma Assert (Is_Subprogram (Id));
6506 Set_Uint24 (Id, V);
6507 end Set_Subps_Index;
6509 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
6510 begin
6511 Set_Flag148 (Id, V);
6512 end Set_Suppress_Elaboration_Warnings;
6514 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
6515 begin
6516 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Variable);
6517 Set_Flag105 (Id, V);
6518 end Set_Suppress_Initialization;
6520 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
6521 begin
6522 Set_Flag165 (Id, V);
6523 end Set_Suppress_Style_Checks;
6525 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
6526 begin
6527 Set_Flag217 (Id, V);
6528 end Set_Suppress_Value_Tracking_On_Call;
6530 procedure Set_Task_Body_Procedure (Id : E; V : N) is
6531 begin
6532 pragma Assert (Ekind (Id) in Task_Kind);
6533 Set_Node25 (Id, V);
6534 end Set_Task_Body_Procedure;
6536 procedure Set_Thunk_Entity (Id : E; V : E) is
6537 begin
6538 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
6539 and then Is_Thunk (Id));
6540 Set_Node31 (Id, V);
6541 end Set_Thunk_Entity;
6543 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
6544 begin
6545 Set_Flag41 (Id, V);
6546 end Set_Treat_As_Volatile;
6548 procedure Set_Underlying_Full_View (Id : E; V : E) is
6549 begin
6550 pragma Assert (Ekind (Id) in Private_Kind);
6551 Set_Node19 (Id, V);
6552 end Set_Underlying_Full_View;
6554 procedure Set_Underlying_Record_View (Id : E; V : E) is
6555 begin
6556 pragma Assert (Ekind (Id) = E_Record_Type);
6557 Set_Node28 (Id, V);
6558 end Set_Underlying_Record_View;
6560 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
6561 begin
6562 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
6563 Set_Flag216 (Id, V);
6564 end Set_Universal_Aliasing;
6566 procedure Set_Unset_Reference (Id : E; V : N) is
6567 begin
6568 Set_Node16 (Id, V);
6569 end Set_Unset_Reference;
6571 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
6572 begin
6573 Set_Flag222 (Id, V);
6574 end Set_Used_As_Generic_Actual;
6576 procedure Set_Uses_Lock_Free (Id : E; V : B := True) is
6577 begin
6578 pragma Assert (Ekind (Id) = E_Protected_Type);
6579 Set_Flag188 (Id, V);
6580 end Set_Uses_Lock_Free;
6582 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
6583 begin
6584 Set_Flag95 (Id, V);
6585 end Set_Uses_Sec_Stack;
6587 procedure Set_Warnings_Off (Id : E; V : B := True) is
6588 begin
6589 Set_Flag96 (Id, V);
6590 end Set_Warnings_Off;
6592 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
6593 begin
6594 Set_Flag236 (Id, V);
6595 end Set_Warnings_Off_Used;
6597 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
6598 begin
6599 Set_Flag237 (Id, V);
6600 end Set_Warnings_Off_Used_Unmodified;
6602 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
6603 begin
6604 Set_Flag238 (Id, V);
6605 end Set_Warnings_Off_Used_Unreferenced;
6607 procedure Set_Was_Hidden (Id : E; V : B := True) is
6608 begin
6609 Set_Flag196 (Id, V);
6610 end Set_Was_Hidden;
6612 procedure Set_Wrapped_Entity (Id : E; V : E) is
6613 begin
6614 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
6615 and then Is_Primitive_Wrapper (Id));
6616 Set_Node27 (Id, V);
6617 end Set_Wrapped_Entity;
6619 -----------------------------------
6620 -- Field Initialization Routines --
6621 -----------------------------------
6623 procedure Init_Alignment (Id : E) is
6624 begin
6625 Set_Uint14 (Id, Uint_0);
6626 end Init_Alignment;
6628 procedure Init_Alignment (Id : E; V : Int) is
6629 begin
6630 Set_Uint14 (Id, UI_From_Int (V));
6631 end Init_Alignment;
6633 procedure Init_Component_Bit_Offset (Id : E) is
6634 begin
6635 Set_Uint11 (Id, No_Uint);
6636 end Init_Component_Bit_Offset;
6638 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
6639 begin
6640 Set_Uint11 (Id, UI_From_Int (V));
6641 end Init_Component_Bit_Offset;
6643 procedure Init_Component_Size (Id : E) is
6644 begin
6645 Set_Uint22 (Id, Uint_0);
6646 end Init_Component_Size;
6648 procedure Init_Component_Size (Id : E; V : Int) is
6649 begin
6650 Set_Uint22 (Id, UI_From_Int (V));
6651 end Init_Component_Size;
6653 procedure Init_Digits_Value (Id : E) is
6654 begin
6655 Set_Uint17 (Id, Uint_0);
6656 end Init_Digits_Value;
6658 procedure Init_Digits_Value (Id : E; V : Int) is
6659 begin
6660 Set_Uint17 (Id, UI_From_Int (V));
6661 end Init_Digits_Value;
6663 procedure Init_Esize (Id : E) is
6664 begin
6665 Set_Uint12 (Id, Uint_0);
6666 end Init_Esize;
6668 procedure Init_Esize (Id : E; V : Int) is
6669 begin
6670 Set_Uint12 (Id, UI_From_Int (V));
6671 end Init_Esize;
6673 procedure Init_Normalized_First_Bit (Id : E) is
6674 begin
6675 Set_Uint8 (Id, No_Uint);
6676 end Init_Normalized_First_Bit;
6678 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
6679 begin
6680 Set_Uint8 (Id, UI_From_Int (V));
6681 end Init_Normalized_First_Bit;
6683 procedure Init_Normalized_Position (Id : E) is
6684 begin
6685 Set_Uint14 (Id, No_Uint);
6686 end Init_Normalized_Position;
6688 procedure Init_Normalized_Position (Id : E; V : Int) is
6689 begin
6690 Set_Uint14 (Id, UI_From_Int (V));
6691 end Init_Normalized_Position;
6693 procedure Init_Normalized_Position_Max (Id : E) is
6694 begin
6695 Set_Uint10 (Id, No_Uint);
6696 end Init_Normalized_Position_Max;
6698 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
6699 begin
6700 Set_Uint10 (Id, UI_From_Int (V));
6701 end Init_Normalized_Position_Max;
6703 procedure Init_RM_Size (Id : E) is
6704 begin
6705 Set_Uint13 (Id, Uint_0);
6706 end Init_RM_Size;
6708 procedure Init_RM_Size (Id : E; V : Int) is
6709 begin
6710 Set_Uint13 (Id, UI_From_Int (V));
6711 end Init_RM_Size;
6713 -----------------------------
6714 -- Init_Component_Location --
6715 -----------------------------
6717 procedure Init_Component_Location (Id : E) is
6718 begin
6719 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
6720 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
6721 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
6722 Set_Uint12 (Id, Uint_0); -- Esize
6723 Set_Uint14 (Id, No_Uint); -- Normalized_Position
6724 end Init_Component_Location;
6726 ----------------------------
6727 -- Init_Object_Size_Align --
6728 ----------------------------
6730 procedure Init_Object_Size_Align (Id : E) is
6731 begin
6732 Set_Uint12 (Id, Uint_0); -- Esize
6733 Set_Uint14 (Id, Uint_0); -- Alignment
6734 end Init_Object_Size_Align;
6736 ---------------
6737 -- Init_Size --
6738 ---------------
6740 procedure Init_Size (Id : E; V : Int) is
6741 begin
6742 pragma Assert (not Is_Object (Id));
6743 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
6744 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
6745 end Init_Size;
6747 ---------------------
6748 -- Init_Size_Align --
6749 ---------------------
6751 procedure Init_Size_Align (Id : E) is
6752 begin
6753 pragma Assert (not Is_Object (Id));
6754 Set_Uint12 (Id, Uint_0); -- Esize
6755 Set_Uint13 (Id, Uint_0); -- RM_Size
6756 Set_Uint14 (Id, Uint_0); -- Alignment
6757 end Init_Size_Align;
6759 ----------------------------------------------
6760 -- Type Representation Attribute Predicates --
6761 ----------------------------------------------
6763 function Known_Alignment (E : Entity_Id) return B is
6764 begin
6765 return Uint14 (E) /= Uint_0
6766 and then Uint14 (E) /= No_Uint;
6767 end Known_Alignment;
6769 function Known_Component_Bit_Offset (E : Entity_Id) return B is
6770 begin
6771 return Uint11 (E) /= No_Uint;
6772 end Known_Component_Bit_Offset;
6774 function Known_Component_Size (E : Entity_Id) return B is
6775 begin
6776 return Uint22 (Base_Type (E)) /= Uint_0
6777 and then Uint22 (Base_Type (E)) /= No_Uint;
6778 end Known_Component_Size;
6780 function Known_Esize (E : Entity_Id) return B is
6781 begin
6782 return Uint12 (E) /= Uint_0
6783 and then Uint12 (E) /= No_Uint;
6784 end Known_Esize;
6786 function Known_Normalized_First_Bit (E : Entity_Id) return B is
6787 begin
6788 return Uint8 (E) /= No_Uint;
6789 end Known_Normalized_First_Bit;
6791 function Known_Normalized_Position (E : Entity_Id) return B is
6792 begin
6793 return Uint14 (E) /= No_Uint;
6794 end Known_Normalized_Position;
6796 function Known_Normalized_Position_Max (E : Entity_Id) return B is
6797 begin
6798 return Uint10 (E) /= No_Uint;
6799 end Known_Normalized_Position_Max;
6801 function Known_RM_Size (E : Entity_Id) return B is
6802 begin
6803 return Uint13 (E) /= No_Uint
6804 and then (Uint13 (E) /= Uint_0
6805 or else Is_Discrete_Type (E)
6806 or else Is_Fixed_Point_Type (E));
6807 end Known_RM_Size;
6809 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
6810 begin
6811 return Uint11 (E) /= No_Uint
6812 and then Uint11 (E) >= Uint_0;
6813 end Known_Static_Component_Bit_Offset;
6815 function Known_Static_Component_Size (E : Entity_Id) return B is
6816 begin
6817 return Uint22 (Base_Type (E)) > Uint_0;
6818 end Known_Static_Component_Size;
6820 function Known_Static_Esize (E : Entity_Id) return B is
6821 begin
6822 return Uint12 (E) > Uint_0
6823 and then not Is_Generic_Type (E);
6824 end Known_Static_Esize;
6826 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
6827 begin
6828 return Uint8 (E) /= No_Uint
6829 and then Uint8 (E) >= Uint_0;
6830 end Known_Static_Normalized_First_Bit;
6832 function Known_Static_Normalized_Position (E : Entity_Id) return B is
6833 begin
6834 return Uint14 (E) /= No_Uint
6835 and then Uint14 (E) >= Uint_0;
6836 end Known_Static_Normalized_Position;
6838 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
6839 begin
6840 return Uint10 (E) /= No_Uint
6841 and then Uint10 (E) >= Uint_0;
6842 end Known_Static_Normalized_Position_Max;
6844 function Known_Static_RM_Size (E : Entity_Id) return B is
6845 begin
6846 return (Uint13 (E) > Uint_0
6847 or else Is_Discrete_Type (E)
6848 or else Is_Fixed_Point_Type (E))
6849 and then not Is_Generic_Type (E);
6850 end Known_Static_RM_Size;
6852 function Unknown_Alignment (E : Entity_Id) return B is
6853 begin
6854 return Uint14 (E) = Uint_0
6855 or else Uint14 (E) = No_Uint;
6856 end Unknown_Alignment;
6858 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
6859 begin
6860 return Uint11 (E) = No_Uint;
6861 end Unknown_Component_Bit_Offset;
6863 function Unknown_Component_Size (E : Entity_Id) return B is
6864 begin
6865 return Uint22 (Base_Type (E)) = Uint_0
6866 or else
6867 Uint22 (Base_Type (E)) = No_Uint;
6868 end Unknown_Component_Size;
6870 function Unknown_Esize (E : Entity_Id) return B is
6871 begin
6872 return Uint12 (E) = No_Uint
6873 or else
6874 Uint12 (E) = Uint_0;
6875 end Unknown_Esize;
6877 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
6878 begin
6879 return Uint8 (E) = No_Uint;
6880 end Unknown_Normalized_First_Bit;
6882 function Unknown_Normalized_Position (E : Entity_Id) return B is
6883 begin
6884 return Uint14 (E) = No_Uint;
6885 end Unknown_Normalized_Position;
6887 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
6888 begin
6889 return Uint10 (E) = No_Uint;
6890 end Unknown_Normalized_Position_Max;
6892 function Unknown_RM_Size (E : Entity_Id) return B is
6893 begin
6894 return (Uint13 (E) = Uint_0
6895 and then not Is_Discrete_Type (E)
6896 and then not Is_Fixed_Point_Type (E))
6897 or else Uint13 (E) = No_Uint;
6898 end Unknown_RM_Size;
6900 --------------------
6901 -- Address_Clause --
6902 --------------------
6904 function Address_Clause (Id : E) return N is
6905 begin
6906 return Get_Attribute_Definition_Clause (Id, Attribute_Address);
6907 end Address_Clause;
6909 ---------------
6910 -- Aft_Value --
6911 ---------------
6913 function Aft_Value (Id : E) return U is
6914 Result : Nat := 1;
6915 Delta_Val : Ureal := Delta_Value (Id);
6916 begin
6917 while Delta_Val < Ureal_Tenth loop
6918 Delta_Val := Delta_Val * Ureal_10;
6919 Result := Result + 1;
6920 end loop;
6922 return UI_From_Int (Result);
6923 end Aft_Value;
6925 ----------------------
6926 -- Alignment_Clause --
6927 ----------------------
6929 function Alignment_Clause (Id : E) return N is
6930 begin
6931 return Get_Attribute_Definition_Clause (Id, Attribute_Alignment);
6932 end Alignment_Clause;
6934 -------------------
6935 -- Append_Entity --
6936 -------------------
6938 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
6939 begin
6940 if Last_Entity (V) = Empty then
6941 Set_First_Entity (Id => V, V => Id);
6942 else
6943 Set_Next_Entity (Last_Entity (V), Id);
6944 end if;
6946 Set_Next_Entity (Id, Empty);
6947 Set_Scope (Id, V);
6948 Set_Last_Entity (Id => V, V => Id);
6949 end Append_Entity;
6951 ---------------
6952 -- Base_Type --
6953 ---------------
6955 function Base_Type (Id : E) return E is
6956 begin
6957 if Is_Base_Type (Id) then
6958 return Id;
6959 else
6960 pragma Assert (Is_Type (Id));
6961 return Etype (Id);
6962 end if;
6963 end Base_Type;
6965 -------------------------
6966 -- Component_Alignment --
6967 -------------------------
6969 -- Component Alignment is encoded using two flags, Flag128/129 as
6970 -- follows. Note that both flags False = Align_Default, so that the
6971 -- default initialization of flags to False initializes component
6972 -- alignment to the default value as required.
6974 -- Flag128 Flag129 Value
6975 -- ------- ------- -----
6976 -- False False Calign_Default
6977 -- False True Calign_Component_Size
6978 -- True False Calign_Component_Size_4
6979 -- True True Calign_Storage_Unit
6981 function Component_Alignment (Id : E) return C is
6982 BT : constant Node_Id := Base_Type (Id);
6984 begin
6985 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
6987 if Flag128 (BT) then
6988 if Flag129 (BT) then
6989 return Calign_Storage_Unit;
6990 else
6991 return Calign_Component_Size_4;
6992 end if;
6994 else
6995 if Flag129 (BT) then
6996 return Calign_Component_Size;
6997 else
6998 return Calign_Default;
6999 end if;
7000 end if;
7001 end Component_Alignment;
7003 ----------------------
7004 -- Declaration_Node --
7005 ----------------------
7007 function Declaration_Node (Id : E) return N is
7008 P : Node_Id;
7010 begin
7011 if Ekind (Id) = E_Incomplete_Type
7012 and then Present (Full_View (Id))
7013 then
7014 P := Parent (Full_View (Id));
7015 else
7016 P := Parent (Id);
7017 end if;
7019 loop
7020 if Nkind (P) /= N_Selected_Component
7021 and then Nkind (P) /= N_Expanded_Name
7022 and then
7023 not (Nkind (P) = N_Defining_Program_Unit_Name
7024 and then Is_Child_Unit (Id))
7025 then
7026 return P;
7027 else
7028 P := Parent (P);
7029 end if;
7030 end loop;
7031 end Declaration_Node;
7033 ---------------------------------
7034 -- Default_Init_Cond_Procedure --
7035 ---------------------------------
7037 function Default_Init_Cond_Procedure (Id : E) return E is
7038 Subp_Elmt : Elmt_Id;
7039 Subp_Id : Entity_Id;
7040 Subps : Elist_Id;
7042 begin
7043 pragma Assert
7044 (Is_Type (Id)
7045 and then (Has_Default_Init_Cond (Id)
7046 or else Has_Inherited_Default_Init_Cond (Id)));
7048 Subps := Subprograms_For_Type (Base_Type (Id));
7050 if Present (Subps) then
7051 Subp_Elmt := First_Elmt (Subps);
7052 while Present (Subp_Elmt) loop
7053 Subp_Id := Node (Subp_Elmt);
7055 if Is_Default_Init_Cond_Procedure (Subp_Id) then
7056 return Subp_Id;
7057 end if;
7059 Next_Elmt (Subp_Elmt);
7060 end loop;
7061 end if;
7063 return Empty;
7064 end Default_Init_Cond_Procedure;
7066 ---------------------
7067 -- Designated_Type --
7068 ---------------------
7070 function Designated_Type (Id : E) return E is
7071 Desig_Type : E;
7073 begin
7074 Desig_Type := Directly_Designated_Type (Id);
7076 if Ekind (Desig_Type) = E_Incomplete_Type
7077 and then Present (Full_View (Desig_Type))
7078 then
7079 return Full_View (Desig_Type);
7081 elsif Is_Class_Wide_Type (Desig_Type)
7082 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
7083 and then Present (Full_View (Etype (Desig_Type)))
7084 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
7085 then
7086 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
7088 else
7089 return Desig_Type;
7090 end if;
7091 end Designated_Type;
7093 ----------------------
7094 -- Entry_Index_Type --
7095 ----------------------
7097 function Entry_Index_Type (Id : E) return N is
7098 begin
7099 pragma Assert (Ekind (Id) = E_Entry_Family);
7100 return Etype (Discrete_Subtype_Definition (Parent (Id)));
7101 end Entry_Index_Type;
7103 ---------------------
7104 -- First_Component --
7105 ---------------------
7107 function First_Component (Id : E) return E is
7108 Comp_Id : E;
7110 begin
7111 pragma Assert
7112 (Is_Concurrent_Type (Id)
7113 or else Is_Incomplete_Or_Private_Type (Id)
7114 or else Is_Record_Type (Id));
7116 Comp_Id := First_Entity (Id);
7117 while Present (Comp_Id) loop
7118 exit when Ekind (Comp_Id) = E_Component;
7119 Comp_Id := Next_Entity (Comp_Id);
7120 end loop;
7122 return Comp_Id;
7123 end First_Component;
7125 -------------------------------------
7126 -- First_Component_Or_Discriminant --
7127 -------------------------------------
7129 function First_Component_Or_Discriminant (Id : E) return E is
7130 Comp_Id : E;
7132 begin
7133 pragma Assert
7134 (Is_Concurrent_Type (Id)
7135 or else Is_Incomplete_Or_Private_Type (Id)
7136 or else Is_Record_Type (Id)
7137 or else Has_Discriminants (Id));
7139 Comp_Id := First_Entity (Id);
7140 while Present (Comp_Id) loop
7141 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
7142 Comp_Id := Next_Entity (Comp_Id);
7143 end loop;
7145 return Comp_Id;
7146 end First_Component_Or_Discriminant;
7148 ------------------
7149 -- First_Formal --
7150 ------------------
7152 function First_Formal (Id : E) return E is
7153 Formal : E;
7155 begin
7156 pragma Assert
7157 (Is_Generic_Subprogram (Id)
7158 or else Is_Overloadable (Id)
7159 or else Ekind_In (Id, E_Entry_Family,
7160 E_Subprogram_Body,
7161 E_Subprogram_Type));
7163 if Ekind (Id) = E_Enumeration_Literal then
7164 return Empty;
7166 else
7167 Formal := First_Entity (Id);
7169 -- Deal with the common, non-generic case first
7171 if No (Formal) or else Is_Formal (Formal) then
7172 return Formal;
7173 end if;
7175 -- The first/next entity chain of a generic subprogram contains all
7176 -- generic formal parameters, followed by the formal parameters.
7178 if Is_Generic_Subprogram (Id) then
7179 while Present (Formal) and then not Is_Formal (Formal) loop
7180 Next_Entity (Formal);
7181 end loop;
7182 return Formal;
7183 else
7184 return Empty;
7185 end if;
7186 end if;
7187 end First_Formal;
7189 ------------------------------
7190 -- First_Formal_With_Extras --
7191 ------------------------------
7193 function First_Formal_With_Extras (Id : E) return E is
7194 Formal : E;
7196 begin
7197 pragma Assert
7198 (Is_Generic_Subprogram (Id)
7199 or else Is_Overloadable (Id)
7200 or else Ekind_In (Id, E_Entry_Family,
7201 E_Subprogram_Body,
7202 E_Subprogram_Type));
7204 if Ekind (Id) = E_Enumeration_Literal then
7205 return Empty;
7207 else
7208 Formal := First_Entity (Id);
7210 -- The first/next entity chain of a generic subprogram contains all
7211 -- generic formal parameters, followed by the formal parameters. Go
7212 -- directly to the parameters by skipping the formal part.
7214 if Is_Generic_Subprogram (Id) then
7215 while Present (Formal) and then not Is_Formal (Formal) loop
7216 Next_Entity (Formal);
7217 end loop;
7218 end if;
7220 if Present (Formal) and then Is_Formal (Formal) then
7221 return Formal;
7222 else
7223 return Extra_Formals (Id); -- Empty if no extra formals
7224 end if;
7225 end if;
7226 end First_Formal_With_Extras;
7228 -------------------------------------
7229 -- Get_Attribute_Definition_Clause --
7230 -------------------------------------
7232 function Get_Attribute_Definition_Clause
7233 (E : Entity_Id;
7234 Id : Attribute_Id) return Node_Id
7236 N : Node_Id;
7238 begin
7239 N := First_Rep_Item (E);
7240 while Present (N) loop
7241 if Nkind (N) = N_Attribute_Definition_Clause
7242 and then Get_Attribute_Id (Chars (N)) = Id
7243 then
7244 return N;
7245 else
7246 Next_Rep_Item (N);
7247 end if;
7248 end loop;
7250 return Empty;
7251 end Get_Attribute_Definition_Clause;
7253 -------------------
7254 -- Get_Full_View --
7255 -------------------
7257 function Get_Full_View (T : Entity_Id) return Entity_Id is
7258 begin
7259 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
7260 return Full_View (T);
7262 elsif Is_Class_Wide_Type (T)
7263 and then Ekind (Root_Type (T)) = E_Incomplete_Type
7264 and then Present (Full_View (Root_Type (T)))
7265 then
7266 return Class_Wide_Type (Full_View (Root_Type (T)));
7268 else
7269 return T;
7270 end if;
7271 end Get_Full_View;
7273 ----------------
7274 -- Get_Pragma --
7275 ----------------
7277 function Get_Pragma (E : Entity_Id; Id : Pragma_Id) return Node_Id is
7279 -- Classification pragmas
7281 Is_CLS : constant Boolean :=
7282 Id = Pragma_Abstract_State or else
7283 Id = Pragma_Attach_Handler or else
7284 Id = Pragma_Async_Readers or else
7285 Id = Pragma_Async_Writers or else
7286 Id = Pragma_Constant_After_Elaboration or else
7287 Id = Pragma_Depends or else
7288 Id = Pragma_Effective_Reads or else
7289 Id = Pragma_Effective_Writes or else
7290 Id = Pragma_Extensions_Visible or else
7291 Id = Pragma_Global or else
7292 Id = Pragma_Initial_Condition or else
7293 Id = Pragma_Initializes or else
7294 Id = Pragma_Interrupt_Handler or else
7295 Id = Pragma_Part_Of or else
7296 Id = Pragma_Refined_Depends or else
7297 Id = Pragma_Refined_Global or else
7298 Id = Pragma_Refined_State or else
7299 Id = Pragma_Volatile_Function;
7301 -- Contract / test case pragmas
7303 Is_CTC : constant Boolean :=
7304 Id = Pragma_Contract_Cases or else
7305 Id = Pragma_Test_Case;
7307 -- Pre / postcondition pragmas
7309 Is_PPC : constant Boolean :=
7310 Id = Pragma_Precondition or else
7311 Id = Pragma_Postcondition or else
7312 Id = Pragma_Refined_Post;
7314 In_Contract : constant Boolean := Is_CLS or Is_CTC or Is_PPC;
7316 Item : Node_Id;
7317 Items : Node_Id;
7319 begin
7320 -- Handle pragmas that appear in N_Contract nodes. Those have to be
7321 -- extracted from their specialized list.
7323 if In_Contract then
7324 Items := Contract (E);
7326 if No (Items) then
7327 return Empty;
7329 elsif Is_CLS then
7330 Item := Classifications (Items);
7332 elsif Is_CTC then
7333 Item := Contract_Test_Cases (Items);
7335 else
7336 Item := Pre_Post_Conditions (Items);
7337 end if;
7339 -- Regular pragmas
7341 else
7342 Item := First_Rep_Item (E);
7343 end if;
7345 while Present (Item) loop
7346 if Nkind (Item) = N_Pragma
7347 and then Get_Pragma_Id (Pragma_Name (Item)) = Id
7348 then
7349 return Item;
7351 -- All nodes in N_Contract are chained using Next_Pragma
7353 elsif In_Contract then
7354 Item := Next_Pragma (Item);
7356 -- Regular pragmas
7358 else
7359 Next_Rep_Item (Item);
7360 end if;
7361 end loop;
7363 return Empty;
7364 end Get_Pragma;
7366 --------------------------------------
7367 -- Get_Record_Representation_Clause --
7368 --------------------------------------
7370 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
7371 N : Node_Id;
7373 begin
7374 N := First_Rep_Item (E);
7375 while Present (N) loop
7376 if Nkind (N) = N_Record_Representation_Clause then
7377 return N;
7378 end if;
7380 Next_Rep_Item (N);
7381 end loop;
7383 return Empty;
7384 end Get_Record_Representation_Clause;
7386 ------------------------
7387 -- Has_Attach_Handler --
7388 ------------------------
7390 function Has_Attach_Handler (Id : E) return B is
7391 Ritem : Node_Id;
7393 begin
7394 pragma Assert (Is_Protected_Type (Id));
7396 Ritem := First_Rep_Item (Id);
7397 while Present (Ritem) loop
7398 if Nkind (Ritem) = N_Pragma
7399 and then Pragma_Name (Ritem) = Name_Attach_Handler
7400 then
7401 return True;
7402 else
7403 Next_Rep_Item (Ritem);
7404 end if;
7405 end loop;
7407 return False;
7408 end Has_Attach_Handler;
7410 -----------------
7411 -- Has_Entries --
7412 -----------------
7414 function Has_Entries (Id : E) return B is
7415 Ent : Entity_Id;
7417 begin
7418 pragma Assert (Is_Concurrent_Type (Id));
7420 Ent := First_Entity (Id);
7421 while Present (Ent) loop
7422 if Is_Entry (Ent) then
7423 return True;
7424 end if;
7426 Ent := Next_Entity (Ent);
7427 end loop;
7429 return False;
7430 end Has_Entries;
7432 ----------------------------
7433 -- Has_Foreign_Convention --
7434 ----------------------------
7436 function Has_Foreign_Convention (Id : E) return B is
7437 begin
7438 -- While regular Intrinsics such as the Standard operators fit in the
7439 -- "Ada" convention, those with an Interface_Name materialize GCC
7440 -- builtin imports for which Ada special treatments shouldn't apply.
7442 return Convention (Id) in Foreign_Convention
7443 or else (Convention (Id) = Convention_Intrinsic
7444 and then Present (Interface_Name (Id)));
7445 end Has_Foreign_Convention;
7447 ---------------------------
7448 -- Has_Interrupt_Handler --
7449 ---------------------------
7451 function Has_Interrupt_Handler (Id : E) return B is
7452 Ritem : Node_Id;
7454 begin
7455 pragma Assert (Is_Protected_Type (Id));
7457 Ritem := First_Rep_Item (Id);
7458 while Present (Ritem) loop
7459 if Nkind (Ritem) = N_Pragma
7460 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
7461 then
7462 return True;
7463 else
7464 Next_Rep_Item (Ritem);
7465 end if;
7466 end loop;
7468 return False;
7469 end Has_Interrupt_Handler;
7471 --------------------
7472 -- Has_Invariants --
7473 --------------------
7475 function Has_Invariants (Id : E) return B is
7476 begin
7477 return Has_Own_Invariants (Id) or else Has_Inherited_Invariants (Id);
7478 end Has_Invariants;
7480 --------------------------
7481 -- Has_Non_Limited_View --
7482 --------------------------
7484 function Has_Non_Limited_View (Id : E) return B is
7485 begin
7486 return (Ekind (Id) in Incomplete_Kind
7487 or else Ekind (Id) in Class_Wide_Kind
7488 or else Ekind (Id) = E_Abstract_State)
7489 and then Present (Non_Limited_View (Id));
7490 end Has_Non_Limited_View;
7492 ---------------------------------
7493 -- Has_Non_Null_Abstract_State --
7494 ---------------------------------
7496 function Has_Non_Null_Abstract_State (Id : E) return B is
7497 begin
7498 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
7500 return
7501 Present (Abstract_States (Id))
7502 and then
7503 not Is_Null_State (Node (First_Elmt (Abstract_States (Id))));
7504 end Has_Non_Null_Abstract_State;
7506 -------------------------------------
7507 -- Has_Non_Null_Visible_Refinement --
7508 -------------------------------------
7510 function Has_Non_Null_Visible_Refinement (Id : E) return B is
7511 Constits : Elist_Id;
7513 begin
7514 -- "Refinement" is a concept applicable only to abstract states
7516 pragma Assert (Ekind (Id) = E_Abstract_State);
7517 Constits := Refinement_Constituents (Id);
7519 -- A partial refinement is always non-null. For a full refinement to be
7520 -- non-null, the first constituent must be anything other than null.
7522 return
7523 Has_Partial_Visible_Refinement (Id)
7524 or else (Has_Visible_Refinement (Id)
7525 and then Present (Constits)
7526 and then Nkind (Node (First_Elmt (Constits))) /= N_Null);
7527 end Has_Non_Null_Visible_Refinement;
7529 -----------------------------
7530 -- Has_Null_Abstract_State --
7531 -----------------------------
7533 function Has_Null_Abstract_State (Id : E) return B is
7534 begin
7535 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
7537 return
7538 Present (Abstract_States (Id))
7539 and then Is_Null_State (Node (First_Elmt (Abstract_States (Id))));
7540 end Has_Null_Abstract_State;
7542 ---------------------------------
7543 -- Has_Null_Visible_Refinement --
7544 ---------------------------------
7546 function Has_Null_Visible_Refinement (Id : E) return B is
7547 Constits : Elist_Id;
7549 begin
7550 -- "Refinement" is a concept applicable only to abstract states
7552 pragma Assert (Ekind (Id) = E_Abstract_State);
7553 Constits := Refinement_Constituents (Id);
7555 -- For a refinement to be null, the state's sole constituent must be a
7556 -- null.
7558 return
7559 Has_Visible_Refinement (Id)
7560 and then Present (Constits)
7561 and then Nkind (Node (First_Elmt (Constits))) = N_Null;
7562 end Has_Null_Visible_Refinement;
7564 --------------------
7565 -- Has_Unmodified --
7566 --------------------
7568 function Has_Unmodified (E : Entity_Id) return Boolean is
7569 begin
7570 if Has_Pragma_Unmodified (E) then
7571 return True;
7572 elsif Warnings_Off (E) then
7573 Set_Warnings_Off_Used_Unmodified (E);
7574 return True;
7575 else
7576 return False;
7577 end if;
7578 end Has_Unmodified;
7580 ---------------------
7581 -- Has_Unreferenced --
7582 ---------------------
7584 function Has_Unreferenced (E : Entity_Id) return Boolean is
7585 begin
7586 if Has_Pragma_Unreferenced (E) then
7587 return True;
7588 elsif Warnings_Off (E) then
7589 Set_Warnings_Off_Used_Unreferenced (E);
7590 return True;
7591 else
7592 return False;
7593 end if;
7594 end Has_Unreferenced;
7596 ----------------------
7597 -- Has_Warnings_Off --
7598 ----------------------
7600 function Has_Warnings_Off (E : Entity_Id) return Boolean is
7601 begin
7602 if Warnings_Off (E) then
7603 Set_Warnings_Off_Used (E);
7604 return True;
7605 else
7606 return False;
7607 end if;
7608 end Has_Warnings_Off;
7610 ------------------------------
7611 -- Implementation_Base_Type --
7612 ------------------------------
7614 function Implementation_Base_Type (Id : E) return E is
7615 Bastyp : Entity_Id;
7616 Imptyp : Entity_Id;
7618 begin
7619 Bastyp := Base_Type (Id);
7621 if Is_Incomplete_Or_Private_Type (Bastyp) then
7622 Imptyp := Underlying_Type (Bastyp);
7624 -- If we have an implementation type, then just return it,
7625 -- otherwise we return the Base_Type anyway. This can only
7626 -- happen in error situations and should avoid some error bombs.
7628 if Present (Imptyp) then
7629 return Base_Type (Imptyp);
7630 else
7631 return Bastyp;
7632 end if;
7634 else
7635 return Bastyp;
7636 end if;
7637 end Implementation_Base_Type;
7639 -------------------------
7640 -- Invariant_Procedure --
7641 -------------------------
7643 function Invariant_Procedure (Id : E) return E is
7644 Subp_Elmt : Elmt_Id;
7645 Subp_Id : Entity_Id;
7646 Subps : Elist_Id;
7648 begin
7649 pragma Assert (Is_Type (Id));
7651 Subps := Subprograms_For_Type (Id);
7653 if Present (Subps) then
7654 Subp_Elmt := First_Elmt (Subps);
7655 while Present (Subp_Elmt) loop
7656 Subp_Id := Node (Subp_Elmt);
7658 if Is_Invariant_Procedure (Subp_Id) then
7659 return Subp_Id;
7660 end if;
7662 Next_Elmt (Subp_Elmt);
7663 end loop;
7664 end if;
7666 return Empty;
7667 end Invariant_Procedure;
7669 ----------------------
7670 -- Is_Atomic_Or_VFA --
7671 ----------------------
7673 function Is_Atomic_Or_VFA (Id : E) return B is
7674 begin
7675 return Is_Atomic (Id) or else Is_Volatile_Full_Access (Id);
7676 end Is_Atomic_Or_VFA;
7678 ------------------
7679 -- Is_Base_Type --
7680 ------------------
7682 -- Global flag table allowing rapid computation of this function
7684 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
7685 (E_Enumeration_Subtype |
7686 E_Incomplete_Type |
7687 E_Signed_Integer_Subtype |
7688 E_Modular_Integer_Subtype |
7689 E_Floating_Point_Subtype |
7690 E_Ordinary_Fixed_Point_Subtype |
7691 E_Decimal_Fixed_Point_Subtype |
7692 E_Array_Subtype |
7693 E_Record_Subtype |
7694 E_Private_Subtype |
7695 E_Record_Subtype_With_Private |
7696 E_Limited_Private_Subtype |
7697 E_Access_Subtype |
7698 E_Protected_Subtype |
7699 E_Task_Subtype |
7700 E_String_Literal_Subtype |
7701 E_Class_Wide_Subtype => False,
7702 others => True);
7704 function Is_Base_Type (Id : E) return Boolean is
7705 begin
7706 return Entity_Is_Base_Type (Ekind (Id));
7707 end Is_Base_Type;
7709 ---------------------
7710 -- Is_Boolean_Type --
7711 ---------------------
7713 function Is_Boolean_Type (Id : E) return B is
7714 begin
7715 return Root_Type (Id) = Standard_Boolean;
7716 end Is_Boolean_Type;
7718 ------------------------
7719 -- Is_Constant_Object --
7720 ------------------------
7722 function Is_Constant_Object (Id : E) return B is
7723 K : constant Entity_Kind := Ekind (Id);
7724 begin
7725 return
7726 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
7727 end Is_Constant_Object;
7729 --------------------------
7730 -- Is_Controlled_Active --
7731 --------------------------
7733 function Is_Controlled_Active (Id : E) return B is
7734 begin
7735 return Is_Controlled (Id) and then not Disable_Controlled (Id);
7736 end Is_Controlled_Active;
7738 --------------------
7739 -- Is_Discriminal --
7740 --------------------
7742 function Is_Discriminal (Id : E) return B is
7743 begin
7744 return (Ekind_In (Id, E_Constant, E_In_Parameter)
7745 and then Present (Discriminal_Link (Id)));
7746 end Is_Discriminal;
7748 ----------------------
7749 -- Is_Dynamic_Scope --
7750 ----------------------
7752 function Is_Dynamic_Scope (Id : E) return B is
7753 begin
7754 return
7755 Ekind (Id) = E_Block
7756 or else
7757 Ekind (Id) = E_Function
7758 or else
7759 Ekind (Id) = E_Procedure
7760 or else
7761 Ekind (Id) = E_Subprogram_Body
7762 or else
7763 Ekind (Id) = E_Task_Type
7764 or else
7765 (Ekind (Id) = E_Limited_Private_Type
7766 and then Present (Full_View (Id))
7767 and then Ekind (Full_View (Id)) = E_Task_Type)
7768 or else
7769 Ekind (Id) = E_Entry
7770 or else
7771 Ekind (Id) = E_Entry_Family
7772 or else
7773 Ekind (Id) = E_Return_Statement;
7774 end Is_Dynamic_Scope;
7776 --------------------
7777 -- Is_Entity_Name --
7778 --------------------
7780 function Is_Entity_Name (N : Node_Id) return Boolean is
7781 Kind : constant Node_Kind := Nkind (N);
7783 begin
7784 -- Identifiers, operator symbols, expanded names are entity names
7786 return Kind = N_Identifier
7787 or else Kind = N_Operator_Symbol
7788 or else Kind = N_Expanded_Name
7790 -- Attribute references are entity names if they refer to an entity.
7791 -- Note that we don't do this by testing for the presence of the
7792 -- Entity field in the N_Attribute_Reference node, since it may not
7793 -- have been set yet.
7795 or else (Kind = N_Attribute_Reference
7796 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
7797 end Is_Entity_Name;
7799 -----------------------
7800 -- Is_External_State --
7801 -----------------------
7803 function Is_External_State (Id : E) return B is
7804 begin
7805 return
7806 Ekind (Id) = E_Abstract_State and then Has_Option (Id, Name_External);
7807 end Is_External_State;
7809 ------------------
7810 -- Is_Finalizer --
7811 ------------------
7813 function Is_Finalizer (Id : E) return B is
7814 begin
7815 return Ekind (Id) = E_Procedure and then Chars (Id) = Name_uFinalizer;
7816 end Is_Finalizer;
7818 -------------------
7819 -- Is_Null_State --
7820 -------------------
7822 function Is_Null_State (Id : E) return B is
7823 begin
7824 return
7825 Ekind (Id) = E_Abstract_State and then Nkind (Parent (Id)) = N_Null;
7826 end Is_Null_State;
7828 ---------------------
7829 -- Is_Packed_Array --
7830 ---------------------
7832 function Is_Packed_Array (Id : E) return B is
7833 begin
7834 return Is_Array_Type (Id) and then Is_Packed (Id);
7835 end Is_Packed_Array;
7837 -----------------------------------
7838 -- Is_Package_Or_Generic_Package --
7839 -----------------------------------
7841 function Is_Package_Or_Generic_Package (Id : E) return B is
7842 begin
7843 return Ekind_In (Id, E_Generic_Package, E_Package);
7844 end Is_Package_Or_Generic_Package;
7846 ---------------
7847 -- Is_Prival --
7848 ---------------
7850 function Is_Prival (Id : E) return B is
7851 begin
7852 return (Ekind_In (Id, E_Constant, E_Variable)
7853 and then Present (Prival_Link (Id)));
7854 end Is_Prival;
7856 ----------------------------
7857 -- Is_Protected_Component --
7858 ----------------------------
7860 function Is_Protected_Component (Id : E) return B is
7861 begin
7862 return Ekind (Id) = E_Component and then Is_Protected_Type (Scope (Id));
7863 end Is_Protected_Component;
7865 ----------------------------
7866 -- Is_Protected_Interface --
7867 ----------------------------
7869 function Is_Protected_Interface (Id : E) return B is
7870 Typ : constant Entity_Id := Base_Type (Id);
7871 begin
7872 if not Is_Interface (Typ) then
7873 return False;
7874 elsif Is_Class_Wide_Type (Typ) then
7875 return Is_Protected_Interface (Etype (Typ));
7876 else
7877 return Protected_Present (Type_Definition (Parent (Typ)));
7878 end if;
7879 end Is_Protected_Interface;
7881 ------------------------------
7882 -- Is_Protected_Record_Type --
7883 ------------------------------
7885 function Is_Protected_Record_Type (Id : E) return B is
7886 begin
7887 return
7888 Is_Concurrent_Record_Type (Id)
7889 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
7890 end Is_Protected_Record_Type;
7892 --------------------------------
7893 -- Is_Standard_Character_Type --
7894 --------------------------------
7896 function Is_Standard_Character_Type (Id : E) return B is
7897 begin
7898 if Is_Type (Id) then
7899 declare
7900 R : constant Entity_Id := Root_Type (Id);
7901 begin
7902 return
7903 R = Standard_Character
7904 or else
7905 R = Standard_Wide_Character
7906 or else
7907 R = Standard_Wide_Wide_Character;
7908 end;
7910 else
7911 return False;
7912 end if;
7913 end Is_Standard_Character_Type;
7915 -----------------------------
7916 -- Is_Standard_String_Type --
7917 -----------------------------
7919 function Is_Standard_String_Type (Id : E) return B is
7920 begin
7921 if Is_Type (Id) then
7922 declare
7923 R : constant Entity_Id := Root_Type (Id);
7924 begin
7925 return
7926 R = Standard_String
7927 or else
7928 R = Standard_Wide_String
7929 or else
7930 R = Standard_Wide_Wide_String;
7931 end;
7933 else
7934 return False;
7935 end if;
7936 end Is_Standard_String_Type;
7938 --------------------
7939 -- Is_String_Type --
7940 --------------------
7942 function Is_String_Type (Id : E) return B is
7943 begin
7944 return Is_Array_Type (Id)
7945 and then Id /= Any_Composite
7946 and then Number_Dimensions (Id) = 1
7947 and then Is_Character_Type (Component_Type (Id));
7948 end Is_String_Type;
7950 -------------------------------
7951 -- Is_Synchronized_Interface --
7952 -------------------------------
7954 function Is_Synchronized_Interface (Id : E) return B is
7955 Typ : constant Entity_Id := Base_Type (Id);
7957 begin
7958 if not Is_Interface (Typ) then
7959 return False;
7961 elsif Is_Class_Wide_Type (Typ) then
7962 return Is_Synchronized_Interface (Etype (Typ));
7964 else
7965 return Protected_Present (Type_Definition (Parent (Typ)))
7966 or else Synchronized_Present (Type_Definition (Parent (Typ)))
7967 or else Task_Present (Type_Definition (Parent (Typ)));
7968 end if;
7969 end Is_Synchronized_Interface;
7971 ---------------------------
7972 -- Is_Synchronized_State --
7973 ---------------------------
7975 function Is_Synchronized_State (Id : E) return B is
7976 begin
7977 return
7978 Ekind (Id) = E_Abstract_State
7979 and then Has_Option (Id, Name_Synchronous);
7980 end Is_Synchronized_State;
7982 -----------------------
7983 -- Is_Task_Interface --
7984 -----------------------
7986 function Is_Task_Interface (Id : E) return B is
7987 Typ : constant Entity_Id := Base_Type (Id);
7988 begin
7989 if not Is_Interface (Typ) then
7990 return False;
7991 elsif Is_Class_Wide_Type (Typ) then
7992 return Is_Task_Interface (Etype (Typ));
7993 else
7994 return Task_Present (Type_Definition (Parent (Typ)));
7995 end if;
7996 end Is_Task_Interface;
7998 -------------------------
7999 -- Is_Task_Record_Type --
8000 -------------------------
8002 function Is_Task_Record_Type (Id : E) return B is
8003 begin
8004 return
8005 Is_Concurrent_Record_Type (Id)
8006 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
8007 end Is_Task_Record_Type;
8009 ------------------------
8010 -- Is_Wrapper_Package --
8011 ------------------------
8013 function Is_Wrapper_Package (Id : E) return B is
8014 begin
8015 return (Ekind (Id) = E_Package and then Present (Related_Instance (Id)));
8016 end Is_Wrapper_Package;
8018 -----------------
8019 -- Last_Formal --
8020 -----------------
8022 function Last_Formal (Id : E) return E is
8023 Formal : E;
8025 begin
8026 pragma Assert
8027 (Is_Overloadable (Id)
8028 or else Ekind_In (Id, E_Entry_Family,
8029 E_Subprogram_Body,
8030 E_Subprogram_Type));
8032 if Ekind (Id) = E_Enumeration_Literal then
8033 return Empty;
8035 else
8036 Formal := First_Formal (Id);
8038 if Present (Formal) then
8039 while Present (Next_Formal (Formal)) loop
8040 Formal := Next_Formal (Formal);
8041 end loop;
8042 end if;
8044 return Formal;
8045 end if;
8046 end Last_Formal;
8048 function Model_Emin_Value (Id : E) return Uint is
8049 begin
8050 return Machine_Emin_Value (Id);
8051 end Model_Emin_Value;
8053 -------------------------
8054 -- Model_Epsilon_Value --
8055 -------------------------
8057 function Model_Epsilon_Value (Id : E) return Ureal is
8058 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
8059 begin
8060 return Radix ** (1 - Model_Mantissa_Value (Id));
8061 end Model_Epsilon_Value;
8063 --------------------------
8064 -- Model_Mantissa_Value --
8065 --------------------------
8067 function Model_Mantissa_Value (Id : E) return Uint is
8068 begin
8069 return Machine_Mantissa_Value (Id);
8070 end Model_Mantissa_Value;
8072 -----------------------
8073 -- Model_Small_Value --
8074 -----------------------
8076 function Model_Small_Value (Id : E) return Ureal is
8077 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
8078 begin
8079 return Radix ** (Model_Emin_Value (Id) - 1);
8080 end Model_Small_Value;
8082 ------------------------
8083 -- Machine_Emax_Value --
8084 ------------------------
8086 function Machine_Emax_Value (Id : E) return Uint is
8087 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
8089 begin
8090 case Float_Rep (Id) is
8091 when IEEE_Binary =>
8092 case Digs is
8093 when 1 .. 6 => return Uint_128;
8094 when 7 .. 15 => return 2**10;
8095 when 16 .. 33 => return 2**14;
8096 when others => return No_Uint;
8097 end case;
8099 when AAMP =>
8100 return Uint_2 ** Uint_7 - Uint_1;
8101 end case;
8102 end Machine_Emax_Value;
8104 ------------------------
8105 -- Machine_Emin_Value --
8106 ------------------------
8108 function Machine_Emin_Value (Id : E) return Uint is
8109 begin
8110 case Float_Rep (Id) is
8111 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
8112 when AAMP => return -Machine_Emax_Value (Id);
8113 end case;
8114 end Machine_Emin_Value;
8116 ----------------------------
8117 -- Machine_Mantissa_Value --
8118 ----------------------------
8120 function Machine_Mantissa_Value (Id : E) return Uint is
8121 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
8123 begin
8124 case Float_Rep (Id) is
8125 when IEEE_Binary =>
8126 case Digs is
8127 when 1 .. 6 => return Uint_24;
8128 when 7 .. 15 => return UI_From_Int (53);
8129 when 16 .. 18 => return Uint_64;
8130 when 19 .. 33 => return UI_From_Int (113);
8131 when others => return No_Uint;
8132 end case;
8134 when AAMP =>
8135 case Digs is
8136 when 1 .. 6 => return Uint_24;
8137 when 7 .. 9 => return UI_From_Int (40);
8138 when others => return No_Uint;
8139 end case;
8140 end case;
8141 end Machine_Mantissa_Value;
8143 -------------------------
8144 -- Machine_Radix_Value --
8145 -------------------------
8147 function Machine_Radix_Value (Id : E) return U is
8148 begin
8149 case Float_Rep (Id) is
8150 when IEEE_Binary | AAMP =>
8151 return Uint_2;
8152 end case;
8153 end Machine_Radix_Value;
8155 --------------------
8156 -- Next_Component --
8157 --------------------
8159 function Next_Component (Id : E) return E is
8160 Comp_Id : E;
8162 begin
8163 Comp_Id := Next_Entity (Id);
8164 while Present (Comp_Id) loop
8165 exit when Ekind (Comp_Id) = E_Component;
8166 Comp_Id := Next_Entity (Comp_Id);
8167 end loop;
8169 return Comp_Id;
8170 end Next_Component;
8172 ------------------------------------
8173 -- Next_Component_Or_Discriminant --
8174 ------------------------------------
8176 function Next_Component_Or_Discriminant (Id : E) return E is
8177 Comp_Id : E;
8179 begin
8180 Comp_Id := Next_Entity (Id);
8181 while Present (Comp_Id) loop
8182 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
8183 Comp_Id := Next_Entity (Comp_Id);
8184 end loop;
8186 return Comp_Id;
8187 end Next_Component_Or_Discriminant;
8189 -----------------------
8190 -- Next_Discriminant --
8191 -----------------------
8193 -- This function actually implements both Next_Discriminant and
8194 -- Next_Stored_Discriminant by making sure that the Discriminant
8195 -- returned is of the same variety as Id.
8197 function Next_Discriminant (Id : E) return E is
8199 -- Derived Tagged types with private extensions look like this...
8201 -- E_Discriminant d1
8202 -- E_Discriminant d2
8203 -- E_Component _tag
8204 -- E_Discriminant d1
8205 -- E_Discriminant d2
8206 -- ...
8208 -- so it is critical not to go past the leading discriminants
8210 D : E := Id;
8212 begin
8213 pragma Assert (Ekind (Id) = E_Discriminant);
8215 loop
8216 D := Next_Entity (D);
8217 if No (D)
8218 or else (Ekind (D) /= E_Discriminant
8219 and then not Is_Itype (D))
8220 then
8221 return Empty;
8222 end if;
8224 exit when Ekind (D) = E_Discriminant
8225 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
8226 end loop;
8228 return D;
8229 end Next_Discriminant;
8231 -----------------
8232 -- Next_Formal --
8233 -----------------
8235 function Next_Formal (Id : E) return E is
8236 P : E;
8238 begin
8239 -- Follow the chain of declared entities as long as the kind of the
8240 -- entity corresponds to a formal parameter. Skip internal entities
8241 -- that may have been created for implicit subtypes, in the process
8242 -- of analyzing default expressions.
8244 P := Id;
8245 loop
8246 Next_Entity (P);
8248 if No (P) or else Is_Formal (P) then
8249 return P;
8250 elsif not Is_Internal (P) then
8251 return Empty;
8252 end if;
8253 end loop;
8254 end Next_Formal;
8256 -----------------------------
8257 -- Next_Formal_With_Extras --
8258 -----------------------------
8260 function Next_Formal_With_Extras (Id : E) return E is
8261 begin
8262 if Present (Extra_Formal (Id)) then
8263 return Extra_Formal (Id);
8264 else
8265 return Next_Formal (Id);
8266 end if;
8267 end Next_Formal_With_Extras;
8269 ----------------
8270 -- Next_Index --
8271 ----------------
8273 function Next_Index (Id : Node_Id) return Node_Id is
8274 begin
8275 return Next (Id);
8276 end Next_Index;
8278 ------------------
8279 -- Next_Literal --
8280 ------------------
8282 function Next_Literal (Id : E) return E is
8283 begin
8284 pragma Assert (Nkind (Id) in N_Entity);
8285 return Next (Id);
8286 end Next_Literal;
8288 ------------------------------
8289 -- Next_Stored_Discriminant --
8290 ------------------------------
8292 function Next_Stored_Discriminant (Id : E) return E is
8293 begin
8294 -- See comment in Next_Discriminant
8296 return Next_Discriminant (Id);
8297 end Next_Stored_Discriminant;
8299 -----------------------
8300 -- Number_Dimensions --
8301 -----------------------
8303 function Number_Dimensions (Id : E) return Pos is
8304 N : Int;
8305 T : Node_Id;
8307 begin
8308 if Ekind (Id) = E_String_Literal_Subtype then
8309 return 1;
8311 else
8312 N := 0;
8313 T := First_Index (Id);
8314 while Present (T) loop
8315 N := N + 1;
8316 Next_Index (T);
8317 end loop;
8319 return N;
8320 end if;
8321 end Number_Dimensions;
8323 --------------------
8324 -- Number_Entries --
8325 --------------------
8327 function Number_Entries (Id : E) return Nat is
8328 N : Int;
8329 Ent : Entity_Id;
8331 begin
8332 pragma Assert (Is_Concurrent_Type (Id));
8334 N := 0;
8335 Ent := First_Entity (Id);
8336 while Present (Ent) loop
8337 if Is_Entry (Ent) then
8338 N := N + 1;
8339 end if;
8341 Ent := Next_Entity (Ent);
8342 end loop;
8344 return N;
8345 end Number_Entries;
8347 --------------------
8348 -- Number_Formals --
8349 --------------------
8351 function Number_Formals (Id : E) return Pos is
8352 N : Int;
8353 Formal : Entity_Id;
8355 begin
8356 N := 0;
8357 Formal := First_Formal (Id);
8358 while Present (Formal) loop
8359 N := N + 1;
8360 Formal := Next_Formal (Formal);
8361 end loop;
8363 return N;
8364 end Number_Formals;
8366 --------------------
8367 -- Parameter_Mode --
8368 --------------------
8370 function Parameter_Mode (Id : E) return Formal_Kind is
8371 begin
8372 return Ekind (Id);
8373 end Parameter_Mode;
8375 ---------------------------------
8376 -- Partial_Invariant_Procedure --
8377 ---------------------------------
8379 function Partial_Invariant_Procedure (Id : E) return E is
8380 Subp_Elmt : Elmt_Id;
8381 Subp_Id : Entity_Id;
8382 Subps : Elist_Id;
8384 begin
8385 pragma Assert (Is_Type (Id));
8387 Subps := Subprograms_For_Type (Id);
8389 if Present (Subps) then
8390 Subp_Elmt := First_Elmt (Subps);
8391 while Present (Subp_Elmt) loop
8392 Subp_Id := Node (Subp_Elmt);
8394 if Is_Partial_Invariant_Procedure (Subp_Id) then
8395 return Subp_Id;
8396 end if;
8398 Next_Elmt (Subp_Elmt);
8399 end loop;
8400 end if;
8402 return Empty;
8403 end Partial_Invariant_Procedure;
8405 -------------------------------------
8406 -- Partial_Refinement_Constituents --
8407 -------------------------------------
8409 function Partial_Refinement_Constituents (Id : E) return L is
8410 Constits : Elist_Id := No_Elist;
8412 procedure Add_Usable_Constituents (Item : E);
8413 -- Add global item Item and/or its constituents to list Constits when
8414 -- they can be used in a global refinement within the current scope. The
8415 -- criteria are:
8416 -- 1) If Item is an abstract state with full refinement visible, add
8417 -- its constituents.
8418 -- 2) If Item is an abstract state with only partial refinement
8419 -- visible, add both Item and its constituents.
8420 -- 3) If Item is an abstract state without a visible refinement, add
8421 -- it.
8422 -- 4) If Id is not an abstract state, add it.
8424 procedure Add_Usable_Constituents (List : Elist_Id);
8425 -- Apply Add_Usable_Constituents to every constituent in List
8427 -----------------------------
8428 -- Add_Usable_Constituents --
8429 -----------------------------
8431 procedure Add_Usable_Constituents (Item : E) is
8432 begin
8433 if Ekind (Item) = E_Abstract_State then
8434 if Has_Visible_Refinement (Item) then
8435 Add_Usable_Constituents (Refinement_Constituents (Item));
8437 elsif Has_Partial_Visible_Refinement (Item) then
8438 Append_New_Elmt (Item, Constits);
8439 Add_Usable_Constituents (Part_Of_Constituents (Item));
8441 else
8442 Append_New_Elmt (Item, Constits);
8443 end if;
8445 else
8446 Append_New_Elmt (Item, Constits);
8447 end if;
8448 end Add_Usable_Constituents;
8450 procedure Add_Usable_Constituents (List : Elist_Id) is
8451 Constit_Elmt : Elmt_Id;
8452 begin
8453 if Present (List) then
8454 Constit_Elmt := First_Elmt (List);
8455 while Present (Constit_Elmt) loop
8456 Add_Usable_Constituents (Node (Constit_Elmt));
8457 Next_Elmt (Constit_Elmt);
8458 end loop;
8459 end if;
8460 end Add_Usable_Constituents;
8462 -- Start of processing for Partial_Refinement_Constituents
8464 begin
8465 -- "Refinement" is a concept applicable only to abstract states
8467 pragma Assert (Ekind (Id) = E_Abstract_State);
8469 if Has_Visible_Refinement (Id) then
8470 Constits := Refinement_Constituents (Id);
8472 -- A refinement may be partially visible when objects declared in the
8473 -- private part of a package are subject to a Part_Of indicator.
8475 elsif Has_Partial_Visible_Refinement (Id) then
8476 Add_Usable_Constituents (Part_Of_Constituents (Id));
8478 -- Function should only be called when full or partial refinement is
8479 -- visible.
8481 else
8482 raise Program_Error;
8483 end if;
8485 return Constits;
8486 end Partial_Refinement_Constituents;
8488 ------------------------
8489 -- Predicate_Function --
8490 ------------------------
8492 function Predicate_Function (Id : E) return E is
8493 Subp_Elmt : Elmt_Id;
8494 Subp_Id : Entity_Id;
8495 Subps : Elist_Id;
8496 Typ : Entity_Id;
8498 begin
8499 pragma Assert (Is_Type (Id));
8501 -- If type is private and has a completion, predicate may be defined on
8502 -- the full view.
8504 if Is_Private_Type (Id)
8505 and then
8506 (not Has_Predicates (Id) or else No (Subprograms_For_Type (Id)))
8507 and then Present (Full_View (Id))
8508 then
8509 Typ := Full_View (Id);
8511 else
8512 Typ := Id;
8513 end if;
8515 Subps := Subprograms_For_Type (Typ);
8517 if Present (Subps) then
8518 Subp_Elmt := First_Elmt (Subps);
8519 while Present (Subp_Elmt) loop
8520 Subp_Id := Node (Subp_Elmt);
8522 if Ekind (Subp_Id) = E_Function
8523 and then Is_Predicate_Function (Subp_Id)
8524 then
8525 return Subp_Id;
8526 end if;
8528 Next_Elmt (Subp_Elmt);
8529 end loop;
8530 end if;
8532 return Empty;
8533 end Predicate_Function;
8535 --------------------------
8536 -- Predicate_Function_M --
8537 --------------------------
8539 function Predicate_Function_M (Id : E) return E is
8540 Subp_Elmt : Elmt_Id;
8541 Subp_Id : Entity_Id;
8542 Subps : Elist_Id;
8543 Typ : Entity_Id;
8545 begin
8546 pragma Assert (Is_Type (Id));
8548 -- If type is private and has a completion, predicate may be defined on
8549 -- the full view.
8551 if Is_Private_Type (Id)
8552 and then
8553 (not Has_Predicates (Id) or else No (Subprograms_For_Type (Id)))
8554 and then Present (Full_View (Id))
8555 then
8556 Typ := Full_View (Id);
8558 else
8559 Typ := Id;
8560 end if;
8562 Subps := Subprograms_For_Type (Typ);
8564 if Present (Subps) then
8565 Subp_Elmt := First_Elmt (Subps);
8566 while Present (Subp_Elmt) loop
8567 Subp_Id := Node (Subp_Elmt);
8569 if Ekind (Subp_Id) = E_Function
8570 and then Is_Predicate_Function_M (Subp_Id)
8571 then
8572 return Subp_Id;
8573 end if;
8575 Next_Elmt (Subp_Elmt);
8576 end loop;
8577 end if;
8579 return Empty;
8580 end Predicate_Function_M;
8582 -------------------------
8583 -- Present_In_Rep_Item --
8584 -------------------------
8586 function Present_In_Rep_Item (E : Entity_Id; N : Node_Id) return Boolean is
8587 Ritem : Node_Id;
8589 begin
8590 Ritem := First_Rep_Item (E);
8592 while Present (Ritem) loop
8593 if Ritem = N then
8594 return True;
8595 end if;
8597 Next_Rep_Item (Ritem);
8598 end loop;
8600 return False;
8601 end Present_In_Rep_Item;
8603 --------------------------
8604 -- Primitive_Operations --
8605 --------------------------
8607 function Primitive_Operations (Id : E) return L is
8608 begin
8609 if Is_Concurrent_Type (Id) then
8610 if Present (Corresponding_Record_Type (Id)) then
8611 return Direct_Primitive_Operations
8612 (Corresponding_Record_Type (Id));
8614 -- If expansion is disabled the corresponding record type is absent,
8615 -- but if the type has ancestors it may have primitive operations.
8617 elsif Is_Tagged_Type (Id) then
8618 return Direct_Primitive_Operations (Id);
8620 else
8621 return No_Elist;
8622 end if;
8623 else
8624 return Direct_Primitive_Operations (Id);
8625 end if;
8626 end Primitive_Operations;
8628 ---------------------
8629 -- Record_Rep_Item --
8630 ---------------------
8632 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
8633 begin
8634 Set_Next_Rep_Item (N, First_Rep_Item (E));
8635 Set_First_Rep_Item (E, N);
8636 end Record_Rep_Item;
8638 ---------------
8639 -- Root_Type --
8640 ---------------
8642 function Root_Type (Id : E) return E is
8643 T, Etyp : E;
8645 begin
8646 pragma Assert (Nkind (Id) in N_Entity);
8648 T := Base_Type (Id);
8650 if Ekind (T) = E_Class_Wide_Type then
8651 return Etype (T);
8653 -- Other cases
8655 else
8656 loop
8657 Etyp := Etype (T);
8659 if T = Etyp then
8660 return T;
8662 -- Following test catches some error cases resulting from
8663 -- previous errors.
8665 elsif No (Etyp) then
8666 Check_Error_Detected;
8667 return T;
8669 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
8670 return T;
8672 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
8673 return T;
8674 end if;
8676 T := Etyp;
8678 -- Return if there is a circularity in the inheritance chain. This
8679 -- happens in some error situations and we do not want to get
8680 -- stuck in this loop.
8682 if T = Base_Type (Id) then
8683 return T;
8684 end if;
8685 end loop;
8686 end if;
8687 end Root_Type;
8689 ---------------------
8690 -- Safe_Emax_Value --
8691 ---------------------
8693 function Safe_Emax_Value (Id : E) return Uint is
8694 begin
8695 return Machine_Emax_Value (Id);
8696 end Safe_Emax_Value;
8698 ----------------------
8699 -- Safe_First_Value --
8700 ----------------------
8702 function Safe_First_Value (Id : E) return Ureal is
8703 begin
8704 return -Safe_Last_Value (Id);
8705 end Safe_First_Value;
8707 ---------------------
8708 -- Safe_Last_Value --
8709 ---------------------
8711 function Safe_Last_Value (Id : E) return Ureal is
8712 Radix : constant Uint := Machine_Radix_Value (Id);
8713 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
8714 Emax : constant Uint := Safe_Emax_Value (Id);
8715 Significand : constant Uint := Radix ** Mantissa - 1;
8716 Exponent : constant Uint := Emax - Mantissa;
8718 begin
8719 if Radix = 2 then
8720 return
8721 UR_From_Components
8722 (Num => Significand * 2 ** (Exponent mod 4),
8723 Den => -Exponent / 4,
8724 Rbase => 16);
8725 else
8726 return
8727 UR_From_Components
8728 (Num => Significand,
8729 Den => -Exponent,
8730 Rbase => 16);
8731 end if;
8732 end Safe_Last_Value;
8734 -----------------
8735 -- Scope_Depth --
8736 -----------------
8738 function Scope_Depth (Id : E) return Uint is
8739 Scop : Entity_Id;
8741 begin
8742 Scop := Id;
8743 while Is_Record_Type (Scop) loop
8744 Scop := Scope (Scop);
8745 end loop;
8747 return Scope_Depth_Value (Scop);
8748 end Scope_Depth;
8750 ---------------------
8751 -- Scope_Depth_Set --
8752 ---------------------
8754 function Scope_Depth_Set (Id : E) return B is
8755 begin
8756 return not Is_Record_Type (Id)
8757 and then Field22 (Id) /= Union_Id (Empty);
8758 end Scope_Depth_Set;
8760 -----------------------------
8761 -- Set_Component_Alignment --
8762 -----------------------------
8764 -- Component Alignment is encoded using two flags, Flag128/129 as
8765 -- follows. Note that both flags False = Align_Default, so that the
8766 -- default initialization of flags to False initializes component
8767 -- alignment to the default value as required.
8769 -- Flag128 Flag129 Value
8770 -- ------- ------- -----
8771 -- False False Calign_Default
8772 -- False True Calign_Component_Size
8773 -- True False Calign_Component_Size_4
8774 -- True True Calign_Storage_Unit
8776 procedure Set_Component_Alignment (Id : E; V : C) is
8777 begin
8778 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
8779 and then Is_Base_Type (Id));
8781 case V is
8782 when Calign_Default =>
8783 Set_Flag128 (Id, False);
8784 Set_Flag129 (Id, False);
8786 when Calign_Component_Size =>
8787 Set_Flag128 (Id, False);
8788 Set_Flag129 (Id, True);
8790 when Calign_Component_Size_4 =>
8791 Set_Flag128 (Id, True);
8792 Set_Flag129 (Id, False);
8794 when Calign_Storage_Unit =>
8795 Set_Flag128 (Id, True);
8796 Set_Flag129 (Id, True);
8797 end case;
8798 end Set_Component_Alignment;
8800 -------------------------------------
8801 -- Set_Default_Init_Cond_Procedure --
8802 -------------------------------------
8804 procedure Set_Default_Init_Cond_Procedure (Id : E; V : E) is
8805 Base_Typ : Entity_Id;
8806 Subp_Elmt : Elmt_Id;
8807 Subp_Id : Entity_Id;
8808 Subps : Elist_Id;
8810 begin
8811 -- Once set, this attribute cannot be reset
8813 if No (V) then
8814 pragma Assert (No (Default_Init_Cond_Procedure (Id)));
8815 return;
8816 end if;
8818 pragma Assert
8819 (Is_Type (Id)
8820 and then (Has_Default_Init_Cond (Id)
8821 or else Has_Inherited_Default_Init_Cond (Id)));
8823 Base_Typ := Base_Type (Id);
8824 Subps := Subprograms_For_Type (Base_Typ);
8826 if No (Subps) then
8827 Subps := New_Elmt_List;
8828 Set_Subprograms_For_Type (Base_Typ, Subps);
8829 end if;
8831 Subp_Elmt := First_Elmt (Subps);
8832 Prepend_Elmt (V, Subps);
8834 -- Check for a duplicate default initial condition procedure
8836 while Present (Subp_Elmt) loop
8837 Subp_Id := Node (Subp_Elmt);
8839 if Is_Default_Init_Cond_Procedure (Subp_Id) then
8840 raise Program_Error;
8841 end if;
8843 Next_Elmt (Subp_Elmt);
8844 end loop;
8845 end Set_Default_Init_Cond_Procedure;
8847 -----------------------------
8848 -- Set_Invariant_Procedure --
8849 -----------------------------
8851 procedure Set_Invariant_Procedure (Id : E; V : E) is
8852 Subp_Elmt : Elmt_Id;
8853 Subp_Id : Entity_Id;
8854 Subps : Elist_Id;
8856 begin
8857 pragma Assert (Is_Type (Id));
8859 Subps := Subprograms_For_Type (Id);
8861 if No (Subps) then
8862 Subps := New_Elmt_List;
8863 Set_Subprograms_For_Type (Id, Subps);
8864 end if;
8866 Subp_Elmt := First_Elmt (Subps);
8867 Prepend_Elmt (V, Subps);
8869 -- Check for a duplicate invariant procedure
8871 while Present (Subp_Elmt) loop
8872 Subp_Id := Node (Subp_Elmt);
8874 if Is_Invariant_Procedure (Subp_Id) then
8875 raise Program_Error;
8876 end if;
8878 Next_Elmt (Subp_Elmt);
8879 end loop;
8880 end Set_Invariant_Procedure;
8882 -------------------------------------
8883 -- Set_Partial_Invariant_Procedure --
8884 -------------------------------------
8886 procedure Set_Partial_Invariant_Procedure (Id : E; V : E) is
8887 Subp_Elmt : Elmt_Id;
8888 Subp_Id : Entity_Id;
8889 Subps : Elist_Id;
8891 begin
8892 pragma Assert (Is_Type (Id));
8894 Subps := Subprograms_For_Type (Id);
8896 if No (Subps) then
8897 Subps := New_Elmt_List;
8898 Set_Subprograms_For_Type (Id, Subps);
8899 end if;
8901 Subp_Elmt := First_Elmt (Subps);
8902 Prepend_Elmt (V, Subps);
8904 -- Check for a duplicate partial invariant procedure
8906 while Present (Subp_Elmt) loop
8907 Subp_Id := Node (Subp_Elmt);
8909 if Is_Partial_Invariant_Procedure (Subp_Id) then
8910 raise Program_Error;
8911 end if;
8913 Next_Elmt (Subp_Elmt);
8914 end loop;
8915 end Set_Partial_Invariant_Procedure;
8917 ----------------------------
8918 -- Set_Predicate_Function --
8919 ----------------------------
8921 procedure Set_Predicate_Function (Id : E; V : E) is
8922 Subp_Elmt : Elmt_Id;
8923 Subp_Id : Entity_Id;
8924 Subps : Elist_Id;
8926 begin
8927 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
8929 Subps := Subprograms_For_Type (Id);
8931 if No (Subps) then
8932 Subps := New_Elmt_List;
8933 Set_Subprograms_For_Type (Id, Subps);
8934 end if;
8936 Subp_Elmt := First_Elmt (Subps);
8937 Prepend_Elmt (V, Subps);
8939 -- Check for a duplicate predication function
8941 while Present (Subp_Elmt) loop
8942 Subp_Id := Node (Subp_Elmt);
8944 if Ekind (Subp_Id) = E_Function
8945 and then Is_Predicate_Function (Subp_Id)
8946 then
8947 raise Program_Error;
8948 end if;
8950 Next_Elmt (Subp_Elmt);
8951 end loop;
8952 end Set_Predicate_Function;
8954 ------------------------------
8955 -- Set_Predicate_Function_M --
8956 ------------------------------
8958 procedure Set_Predicate_Function_M (Id : E; V : E) is
8959 Subp_Elmt : Elmt_Id;
8960 Subp_Id : Entity_Id;
8961 Subps : Elist_Id;
8963 begin
8964 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
8966 Subps := Subprograms_For_Type (Id);
8968 if No (Subps) then
8969 Subps := New_Elmt_List;
8970 Set_Subprograms_For_Type (Id, Subps);
8971 end if;
8973 Subp_Elmt := First_Elmt (Subps);
8974 Prepend_Elmt (V, Subps);
8976 -- Check for a duplicate predication function
8978 while Present (Subp_Elmt) loop
8979 Subp_Id := Node (Subp_Elmt);
8981 if Ekind (Subp_Id) = E_Function
8982 and then Is_Predicate_Function_M (Subp_Id)
8983 then
8984 raise Program_Error;
8985 end if;
8987 Next_Elmt (Subp_Elmt);
8988 end loop;
8989 end Set_Predicate_Function_M;
8991 -----------------
8992 -- Size_Clause --
8993 -----------------
8995 function Size_Clause (Id : E) return N is
8996 begin
8997 return Get_Attribute_Definition_Clause (Id, Attribute_Size);
8998 end Size_Clause;
9000 ------------------------
9001 -- Stream_Size_Clause --
9002 ------------------------
9004 function Stream_Size_Clause (Id : E) return N is
9005 begin
9006 return Get_Attribute_Definition_Clause (Id, Attribute_Stream_Size);
9007 end Stream_Size_Clause;
9009 ------------------
9010 -- Subtype_Kind --
9011 ------------------
9013 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
9014 Kind : Entity_Kind;
9016 begin
9017 case K is
9018 when Access_Kind =>
9019 Kind := E_Access_Subtype;
9021 when E_Array_Type |
9022 E_Array_Subtype =>
9023 Kind := E_Array_Subtype;
9025 when E_Class_Wide_Type |
9026 E_Class_Wide_Subtype =>
9027 Kind := E_Class_Wide_Subtype;
9029 when E_Decimal_Fixed_Point_Type |
9030 E_Decimal_Fixed_Point_Subtype =>
9031 Kind := E_Decimal_Fixed_Point_Subtype;
9033 when E_Ordinary_Fixed_Point_Type |
9034 E_Ordinary_Fixed_Point_Subtype =>
9035 Kind := E_Ordinary_Fixed_Point_Subtype;
9037 when E_Private_Type |
9038 E_Private_Subtype =>
9039 Kind := E_Private_Subtype;
9041 when E_Limited_Private_Type |
9042 E_Limited_Private_Subtype =>
9043 Kind := E_Limited_Private_Subtype;
9045 when E_Record_Type_With_Private |
9046 E_Record_Subtype_With_Private =>
9047 Kind := E_Record_Subtype_With_Private;
9049 when E_Record_Type |
9050 E_Record_Subtype =>
9051 Kind := E_Record_Subtype;
9053 when Enumeration_Kind =>
9054 Kind := E_Enumeration_Subtype;
9056 when Float_Kind =>
9057 Kind := E_Floating_Point_Subtype;
9059 when Signed_Integer_Kind =>
9060 Kind := E_Signed_Integer_Subtype;
9062 when Modular_Integer_Kind =>
9063 Kind := E_Modular_Integer_Subtype;
9065 when Protected_Kind =>
9066 Kind := E_Protected_Subtype;
9068 when Task_Kind =>
9069 Kind := E_Task_Subtype;
9071 when others =>
9072 Kind := E_Void;
9073 raise Program_Error;
9074 end case;
9076 return Kind;
9077 end Subtype_Kind;
9079 ---------------------
9080 -- Type_High_Bound --
9081 ---------------------
9083 function Type_High_Bound (Id : E) return Node_Id is
9084 Rng : constant Node_Id := Scalar_Range (Id);
9085 begin
9086 if Nkind (Rng) = N_Subtype_Indication then
9087 return High_Bound (Range_Expression (Constraint (Rng)));
9088 else
9089 return High_Bound (Rng);
9090 end if;
9091 end Type_High_Bound;
9093 --------------------
9094 -- Type_Low_Bound --
9095 --------------------
9097 function Type_Low_Bound (Id : E) return Node_Id is
9098 Rng : constant Node_Id := Scalar_Range (Id);
9099 begin
9100 if Nkind (Rng) = N_Subtype_Indication then
9101 return Low_Bound (Range_Expression (Constraint (Rng)));
9102 else
9103 return Low_Bound (Rng);
9104 end if;
9105 end Type_Low_Bound;
9107 ---------------------
9108 -- Underlying_Type --
9109 ---------------------
9111 function Underlying_Type (Id : E) return E is
9112 begin
9113 -- For record_with_private the underlying type is always the direct
9114 -- full view. Never try to take the full view of the parent it
9115 -- doesn't make sense.
9117 if Ekind (Id) = E_Record_Type_With_Private then
9118 return Full_View (Id);
9120 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
9122 -- If we have an incomplete or private type with a full view,
9123 -- then we return the Underlying_Type of this full view.
9125 if Present (Full_View (Id)) then
9126 if Id = Full_View (Id) then
9128 -- Previous error in declaration
9130 return Empty;
9132 else
9133 return Underlying_Type (Full_View (Id));
9134 end if;
9136 -- If we have a private type with an underlying full view, then we
9137 -- return the Underlying_Type of this underlying full view.
9139 elsif Ekind (Id) in Private_Kind
9140 and then Present (Underlying_Full_View (Id))
9141 then
9142 return Underlying_Type (Underlying_Full_View (Id));
9144 -- If we have an incomplete entity that comes from the limited
9145 -- view then we return the Underlying_Type of its non-limited
9146 -- view.
9148 elsif From_Limited_With (Id)
9149 and then Present (Non_Limited_View (Id))
9150 then
9151 return Underlying_Type (Non_Limited_View (Id));
9153 -- Otherwise check for the case where we have a derived type or
9154 -- subtype, and if so get the Underlying_Type of the parent type.
9156 elsif Etype (Id) /= Id then
9157 return Underlying_Type (Etype (Id));
9159 -- Otherwise we have an incomplete or private type that has
9160 -- no full view, which means that we have not encountered the
9161 -- completion, so return Empty to indicate the underlying type
9162 -- is not yet known.
9164 else
9165 return Empty;
9166 end if;
9168 -- For non-incomplete, non-private types, return the type itself Also
9169 -- for entities that are not types at all return the entity itself.
9171 else
9172 return Id;
9173 end if;
9174 end Underlying_Type;
9176 ------------------------
9177 -- Write_Entity_Flags --
9178 ------------------------
9180 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
9182 procedure W (Flag_Name : String; Flag : Boolean);
9183 -- Write out given flag if it is set
9185 -------
9186 -- W --
9187 -------
9189 procedure W (Flag_Name : String; Flag : Boolean) is
9190 begin
9191 if Flag then
9192 Write_Str (Prefix);
9193 Write_Str (Flag_Name);
9194 Write_Str (" = True");
9195 Write_Eol;
9196 end if;
9197 end W;
9199 -- Start of processing for Write_Entity_Flags
9201 begin
9202 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
9203 and then Is_Base_Type (Id)
9204 then
9205 Write_Str (Prefix);
9206 Write_Str ("Component_Alignment = ");
9208 case Component_Alignment (Id) is
9209 when Calign_Default =>
9210 Write_Str ("Calign_Default");
9212 when Calign_Component_Size =>
9213 Write_Str ("Calign_Component_Size");
9215 when Calign_Component_Size_4 =>
9216 Write_Str ("Calign_Component_Size_4");
9218 when Calign_Storage_Unit =>
9219 Write_Str ("Calign_Storage_Unit");
9220 end case;
9222 Write_Eol;
9223 end if;
9225 W ("Address_Taken", Flag104 (Id));
9226 W ("Body_Needed_For_SAL", Flag40 (Id));
9227 W ("C_Pass_By_Copy", Flag125 (Id));
9228 W ("Can_Never_Be_Null", Flag38 (Id));
9229 W ("Checks_May_Be_Suppressed", Flag31 (Id));
9230 W ("Contains_Ignored_Ghost_Code", Flag279 (Id));
9231 W ("Debug_Info_Off", Flag166 (Id));
9232 W ("Default_Expressions_Processed", Flag108 (Id));
9233 W ("Delay_Cleanups", Flag114 (Id));
9234 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
9235 W ("Depends_On_Private", Flag14 (Id));
9236 W ("Discard_Names", Flag88 (Id));
9237 W ("Elaboration_Entity_Required", Flag174 (Id));
9238 W ("Elaborate_Body_Desirable", Flag210 (Id));
9239 W ("Entry_Accepted", Flag152 (Id));
9240 W ("Can_Use_Internal_Rep", Flag229 (Id));
9241 W ("Finalize_Storage_Only", Flag158 (Id));
9242 W ("From_Limited_With", Flag159 (Id));
9243 W ("Has_Aliased_Components", Flag135 (Id));
9244 W ("Has_Alignment_Clause", Flag46 (Id));
9245 W ("Has_All_Calls_Remote", Flag79 (Id));
9246 W ("Has_Atomic_Components", Flag86 (Id));
9247 W ("Has_Biased_Representation", Flag139 (Id));
9248 W ("Has_Completion", Flag26 (Id));
9249 W ("Has_Completion_In_Body", Flag71 (Id));
9250 W ("Has_Complex_Representation", Flag140 (Id));
9251 W ("Has_Component_Size_Clause", Flag68 (Id));
9252 W ("Has_Contiguous_Rep", Flag181 (Id));
9253 W ("Has_Controlled_Component", Flag43 (Id));
9254 W ("Has_Controlling_Result", Flag98 (Id));
9255 W ("Has_Convention_Pragma", Flag119 (Id));
9256 W ("Has_Default_Aspect", Flag39 (Id));
9257 W ("Has_Default_Init_Cond", Flag3 (Id));
9258 W ("Has_Delayed_Aspects", Flag200 (Id));
9259 W ("Has_Delayed_Freeze", Flag18 (Id));
9260 W ("Has_Delayed_Rep_Aspects", Flag261 (Id));
9261 W ("Has_Discriminants", Flag5 (Id));
9262 W ("Has_Dispatch_Table", Flag220 (Id));
9263 W ("Has_Dynamic_Predicate_Aspect", Flag258 (Id));
9264 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
9265 W ("Has_Exit", Flag47 (Id));
9266 W ("Has_Expanded_Contract", Flag240 (Id));
9267 W ("Has_Forward_Instantiation", Flag175 (Id));
9268 W ("Has_Fully_Qualified_Name", Flag173 (Id));
9269 W ("Has_Gigi_Rep_Item", Flag82 (Id));
9270 W ("Has_Homonym", Flag56 (Id));
9271 W ("Has_Implicit_Dereference", Flag251 (Id));
9272 W ("Has_Independent_Components", Flag34 (Id));
9273 W ("Has_Inheritable_Invariants", Flag248 (Id));
9274 W ("Has_Inherited_Default_Init_Cond", Flag133 (Id));
9275 W ("Has_Inherited_Invariants", Flag291 (Id));
9276 W ("Has_Initial_Value", Flag219 (Id));
9277 W ("Has_Loop_Entry_Attributes", Flag260 (Id));
9278 W ("Has_Machine_Radix_Clause", Flag83 (Id));
9279 W ("Has_Master_Entity", Flag21 (Id));
9280 W ("Has_Missing_Return", Flag142 (Id));
9281 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
9282 W ("Has_Nested_Subprogram", Flag282 (Id));
9283 W ("Has_Non_Standard_Rep", Flag75 (Id));
9284 W ("Has_Out_Or_In_Out_Parameter", Flag110 (Id));
9285 W ("Has_Object_Size_Clause", Flag172 (Id));
9286 W ("Has_Own_Invariants", Flag232 (Id));
9287 W ("Has_Per_Object_Constraint", Flag154 (Id));
9288 W ("Has_Pragma_Controlled", Flag27 (Id));
9289 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
9290 W ("Has_Pragma_Inline", Flag157 (Id));
9291 W ("Has_Pragma_Inline_Always", Flag230 (Id));
9292 W ("Has_Pragma_No_Inline", Flag201 (Id));
9293 W ("Has_Pragma_Ordered", Flag198 (Id));
9294 W ("Has_Pragma_Pack", Flag121 (Id));
9295 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
9296 W ("Has_Pragma_Pure", Flag203 (Id));
9297 W ("Has_Pragma_Pure_Function", Flag179 (Id));
9298 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
9299 W ("Has_Pragma_Unmodified", Flag233 (Id));
9300 W ("Has_Pragma_Unreferenced", Flag180 (Id));
9301 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
9302 W ("Has_Pragma_Unused", Flag294 (Id));
9303 W ("Has_Predicates", Flag250 (Id));
9304 W ("Has_Primitive_Operations", Flag120 (Id));
9305 W ("Has_Private_Ancestor", Flag151 (Id));
9306 W ("Has_Private_Declaration", Flag155 (Id));
9307 W ("Has_Protected", Flag271 (Id));
9308 W ("Has_Qualified_Name", Flag161 (Id));
9309 W ("Has_RACW", Flag214 (Id));
9310 W ("Has_Record_Rep_Clause", Flag65 (Id));
9311 W ("Has_Recursive_Call", Flag143 (Id));
9312 W ("Has_Shift_Operator", Flag267 (Id));
9313 W ("Has_Size_Clause", Flag29 (Id));
9314 W ("Has_Small_Clause", Flag67 (Id));
9315 W ("Has_Specified_Layout", Flag100 (Id));
9316 W ("Has_Specified_Stream_Input", Flag190 (Id));
9317 W ("Has_Specified_Stream_Output", Flag191 (Id));
9318 W ("Has_Specified_Stream_Read", Flag192 (Id));
9319 W ("Has_Specified_Stream_Write", Flag193 (Id));
9320 W ("Has_Static_Discriminants", Flag211 (Id));
9321 W ("Has_Static_Predicate", Flag269 (Id));
9322 W ("Has_Static_Predicate_Aspect", Flag259 (Id));
9323 W ("Has_Storage_Size_Clause", Flag23 (Id));
9324 W ("Has_Stream_Size_Clause", Flag184 (Id));
9325 W ("Has_Task", Flag30 (Id));
9326 W ("Has_Timing_Event", Flag289 (Id));
9327 W ("Has_Thunks", Flag228 (Id));
9328 W ("Has_Unchecked_Union", Flag123 (Id));
9329 W ("Has_Unknown_Discriminants", Flag72 (Id));
9330 W ("Has_Visible_Refinement", Flag263 (Id));
9331 W ("Has_Volatile_Components", Flag87 (Id));
9332 W ("Has_Xref_Entry", Flag182 (Id));
9333 W ("In_Package_Body", Flag48 (Id));
9334 W ("In_Private_Part", Flag45 (Id));
9335 W ("In_Use", Flag8 (Id));
9336 W ("Is_Abstract_Subprogram", Flag19 (Id));
9337 W ("Is_Abstract_Type", Flag146 (Id));
9338 W ("Is_Access_Constant", Flag69 (Id));
9339 W ("Is_Actual_Subtype", Flag293 (Id));
9340 W ("Is_Ada_2005_Only", Flag185 (Id));
9341 W ("Is_Ada_2012_Only", Flag199 (Id));
9342 W ("Is_Aliased", Flag15 (Id));
9343 W ("Is_Asynchronous", Flag81 (Id));
9344 W ("Is_Atomic", Flag85 (Id));
9345 W ("Is_Bit_Packed_Array", Flag122 (Id));
9346 W ("Is_CPP_Class", Flag74 (Id));
9347 W ("Is_Called", Flag102 (Id));
9348 W ("Is_Character_Type", Flag63 (Id));
9349 W ("Is_Checked_Ghost_Entity", Flag277 (Id));
9350 W ("Is_Child_Unit", Flag73 (Id));
9351 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
9352 W ("Is_Compilation_Unit", Flag149 (Id));
9353 W ("Is_Completely_Hidden", Flag103 (Id));
9354 W ("Is_Concurrent_Record_Type", Flag20 (Id));
9355 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
9356 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
9357 W ("Is_Constrained", Flag12 (Id));
9358 W ("Is_Constructor", Flag76 (Id));
9359 W ("Is_Controlled", Flag42 (Id));
9360 W ("Is_Controlling_Formal", Flag97 (Id));
9361 W ("Is_Default_Init_Cond_Procedure", Flag132 (Id));
9362 W ("Is_Descendant_Of_Address", Flag223 (Id));
9363 W ("Is_Discrim_SO_Function", Flag176 (Id));
9364 W ("Is_Discriminant_Check_Function", Flag264 (Id));
9365 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
9366 W ("Is_Dispatching_Operation", Flag6 (Id));
9367 W ("Is_Eliminated", Flag124 (Id));
9368 W ("Is_Entry_Formal", Flag52 (Id));
9369 W ("Is_Exception_Handler", Flag286 (Id));
9370 W ("Is_Exported", Flag99 (Id));
9371 W ("Is_Finalized_Transient", Flag252 (Id));
9372 W ("Is_First_Subtype", Flag70 (Id));
9373 W ("Is_For_Access_Subtype", Flag118 (Id));
9374 W ("Is_Formal_Subprogram", Flag111 (Id));
9375 W ("Is_Frozen", Flag4 (Id));
9376 W ("Is_Generic_Actual_Subprogram", Flag274 (Id));
9377 W ("Is_Generic_Actual_Type", Flag94 (Id));
9378 W ("Is_Generic_Instance", Flag130 (Id));
9379 W ("Is_Generic_Type", Flag13 (Id));
9380 W ("Is_Hidden", Flag57 (Id));
9381 W ("Is_Hidden_Non_Overridden_Subpgm", Flag2 (Id));
9382 W ("Is_Hidden_Open_Scope", Flag171 (Id));
9383 W ("Is_Ignored_Ghost_Entity", Flag278 (Id));
9384 W ("Is_Ignored_Transient", Flag295 (Id));
9385 W ("Is_Immediately_Visible", Flag7 (Id));
9386 W ("Is_Implementation_Defined", Flag254 (Id));
9387 W ("Is_Imported", Flag24 (Id));
9388 W ("Is_Independent", Flag268 (Id));
9389 W ("Is_Inlined", Flag11 (Id));
9390 W ("Is_Inlined_Always", Flag1 (Id));
9391 W ("Is_Instantiated", Flag126 (Id));
9392 W ("Is_Interface", Flag186 (Id));
9393 W ("Is_Internal", Flag17 (Id));
9394 W ("Is_Interrupt_Handler", Flag89 (Id));
9395 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
9396 W ("Is_Invariant_Procedure", Flag257 (Id));
9397 W ("Is_Itype", Flag91 (Id));
9398 W ("Is_Known_Non_Null", Flag37 (Id));
9399 W ("Is_Known_Null", Flag204 (Id));
9400 W ("Is_Known_Valid", Flag170 (Id));
9401 W ("Is_Limited_Composite", Flag106 (Id));
9402 W ("Is_Limited_Interface", Flag197 (Id));
9403 W ("Is_Limited_Record", Flag25 (Id));
9404 W ("Is_Local_Anonymous_Access", Flag194 (Id));
9405 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
9406 W ("Is_Non_Static_Subtype", Flag109 (Id));
9407 W ("Is_Null_Init_Proc", Flag178 (Id));
9408 W ("Is_Obsolescent", Flag153 (Id));
9409 W ("Is_Only_Out_Parameter", Flag226 (Id));
9410 W ("Is_Package_Body_Entity", Flag160 (Id));
9411 W ("Is_Packed", Flag51 (Id));
9412 W ("Is_Packed_Array_Impl_Type", Flag138 (Id));
9413 W ("Is_Param_Block_Component_Type", Flag215 (Id));
9414 W ("Is_Partial_Invariant_Procedure", Flag292 (Id));
9415 W ("Is_Potentially_Use_Visible", Flag9 (Id));
9416 W ("Is_Predicate_Function", Flag255 (Id));
9417 W ("Is_Predicate_Function_M", Flag256 (Id));
9418 W ("Is_Preelaborated", Flag59 (Id));
9419 W ("Is_Primitive", Flag218 (Id));
9420 W ("Is_Primitive_Wrapper", Flag195 (Id));
9421 W ("Is_Private_Composite", Flag107 (Id));
9422 W ("Is_Private_Descendant", Flag53 (Id));
9423 W ("Is_Private_Primitive", Flag245 (Id));
9424 W ("Is_Public", Flag10 (Id));
9425 W ("Is_Pure", Flag44 (Id));
9426 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
9427 W ("Is_RACW_Stub_Type", Flag244 (Id));
9428 W ("Is_Raised", Flag224 (Id));
9429 W ("Is_Remote_Call_Interface", Flag62 (Id));
9430 W ("Is_Remote_Types", Flag61 (Id));
9431 W ("Is_Renaming_Of_Object", Flag112 (Id));
9432 W ("Is_Return_Object", Flag209 (Id));
9433 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
9434 W ("Is_Shared_Passive", Flag60 (Id));
9435 W ("Is_Static_Type", Flag281 (Id));
9436 W ("Is_Statically_Allocated", Flag28 (Id));
9437 W ("Is_Tag", Flag78 (Id));
9438 W ("Is_Tagged_Type", Flag55 (Id));
9439 W ("Is_Thunk", Flag225 (Id));
9440 W ("Is_Trivial_Subprogram", Flag235 (Id));
9441 W ("Is_True_Constant", Flag163 (Id));
9442 W ("Is_Unchecked_Union", Flag117 (Id));
9443 W ("Is_Underlying_Record_View", Flag246 (Id));
9444 W ("Is_Unimplemented", Flag284 (Id));
9445 W ("Is_Unsigned_Type", Flag144 (Id));
9446 W ("Is_Uplevel_Referenced_Entity", Flag283 (Id));
9447 W ("Is_Valued_Procedure", Flag127 (Id));
9448 W ("Is_Visible_Formal", Flag206 (Id));
9449 W ("Is_Visible_Lib_Unit", Flag116 (Id));
9450 W ("Is_Volatile", Flag16 (Id));
9451 W ("Is_Volatile_Full_Access", Flag285 (Id));
9452 W ("Itype_Printed", Flag202 (Id));
9453 W ("Kill_Elaboration_Checks", Flag32 (Id));
9454 W ("Kill_Range_Checks", Flag33 (Id));
9455 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
9456 W ("Low_Bound_Tested", Flag205 (Id));
9457 W ("Machine_Radix_10", Flag84 (Id));
9458 W ("Materialize_Entity", Flag168 (Id));
9459 W ("May_Inherit_Delayed_Rep_Aspects", Flag262 (Id));
9460 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
9461 W ("Must_Have_Preelab_Init", Flag208 (Id));
9462 W ("Needs_Debug_Info", Flag147 (Id));
9463 W ("Needs_No_Actuals", Flag22 (Id));
9464 W ("Never_Set_In_Source", Flag115 (Id));
9465 W ("No_Dynamic_Predicate_On_actual", Flag276 (Id));
9466 W ("No_Pool_Assigned", Flag131 (Id));
9467 W ("No_Predicate_On_actual", Flag275 (Id));
9468 W ("No_Return", Flag113 (Id));
9469 W ("No_Strict_Aliasing", Flag136 (Id));
9470 W ("Non_Binary_Modulus", Flag58 (Id));
9471 W ("Nonzero_Is_True", Flag162 (Id));
9472 W ("OK_To_Rename", Flag247 (Id));
9473 W ("OK_To_Reorder_Components", Flag239 (Id));
9474 W ("Optimize_Alignment_Space", Flag241 (Id));
9475 W ("Optimize_Alignment_Time", Flag242 (Id));
9476 W ("Overlays_Constant", Flag243 (Id));
9477 W ("Partial_View_Has_Unknown_Discr", Flag280 (Id));
9478 W ("Reachable", Flag49 (Id));
9479 W ("Referenced", Flag156 (Id));
9480 W ("Referenced_As_LHS", Flag36 (Id));
9481 W ("Referenced_As_Out_Parameter", Flag227 (Id));
9482 W ("Renamed_In_Spec", Flag231 (Id));
9483 W ("Requires_Overriding", Flag213 (Id));
9484 W ("Return_Present", Flag54 (Id));
9485 W ("Returns_By_Ref", Flag90 (Id));
9486 W ("Reverse_Bit_Order", Flag164 (Id));
9487 W ("Reverse_Storage_Order", Flag93 (Id));
9488 W ("Rewritten_For_C", Flag287 (Id));
9489 W ("Predicates_Ignored", Flag288 (Id));
9490 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
9491 W ("Size_Depends_On_Discriminant", Flag177 (Id));
9492 W ("Size_Known_At_Compile_Time", Flag92 (Id));
9493 W ("SPARK_Aux_Pragma_Inherited", Flag266 (Id));
9494 W ("SPARK_Pragma_Inherited", Flag265 (Id));
9495 W ("SSO_Set_High_By_Default", Flag273 (Id));
9496 W ("SSO_Set_Low_By_Default", Flag272 (Id));
9497 W ("Static_Elaboration_Desired", Flag77 (Id));
9498 W ("Stores_Attribute_Old_Prefix", Flag270 (Id));
9499 W ("Strict_Alignment", Flag145 (Id));
9500 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
9501 W ("Suppress_Initialization", Flag105 (Id));
9502 W ("Suppress_Style_Checks", Flag165 (Id));
9503 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
9504 W ("Treat_As_Volatile", Flag41 (Id));
9505 W ("Universal_Aliasing", Flag216 (Id));
9506 W ("Used_As_Generic_Actual", Flag222 (Id));
9507 W ("Uses_Sec_Stack", Flag95 (Id));
9508 W ("Warnings_Off", Flag96 (Id));
9509 W ("Warnings_Off_Used", Flag236 (Id));
9510 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
9511 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
9512 W ("Was_Hidden", Flag196 (Id));
9513 end Write_Entity_Flags;
9515 -----------------------
9516 -- Write_Entity_Info --
9517 -----------------------
9519 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
9521 procedure Write_Attribute (Which : String; Nam : E);
9522 -- Write attribute value with given string name
9524 procedure Write_Kind (Id : Entity_Id);
9525 -- Write Ekind field of entity
9527 ---------------------
9528 -- Write_Attribute --
9529 ---------------------
9531 procedure Write_Attribute (Which : String; Nam : E) is
9532 begin
9533 Write_Str (Prefix);
9534 Write_Str (Which);
9535 Write_Int (Int (Nam));
9536 Write_Str (" ");
9537 Write_Name (Chars (Nam));
9538 Write_Str (" ");
9539 end Write_Attribute;
9541 ----------------
9542 -- Write_Kind --
9543 ----------------
9545 procedure Write_Kind (Id : Entity_Id) is
9546 K : constant String := Entity_Kind'Image (Ekind (Id));
9548 begin
9549 Write_Str (Prefix);
9550 Write_Str (" Kind ");
9552 if Is_Type (Id) and then Is_Tagged_Type (Id) then
9553 Write_Str ("TAGGED ");
9554 end if;
9556 Write_Str (K (3 .. K'Length));
9557 Write_Str (" ");
9559 if Is_Type (Id) and then Depends_On_Private (Id) then
9560 Write_Str ("Depends_On_Private ");
9561 end if;
9562 end Write_Kind;
9564 -- Start of processing for Write_Entity_Info
9566 begin
9567 Write_Eol;
9568 Write_Attribute ("Name ", Id);
9569 Write_Int (Int (Id));
9570 Write_Eol;
9571 Write_Kind (Id);
9572 Write_Eol;
9573 Write_Attribute (" Type ", Etype (Id));
9574 Write_Eol;
9575 Write_Attribute (" Scope ", Scope (Id));
9576 Write_Eol;
9578 case Ekind (Id) is
9580 when Discrete_Kind =>
9581 Write_Str ("Bounds: Id = ");
9583 if Present (Scalar_Range (Id)) then
9584 Write_Int (Int (Type_Low_Bound (Id)));
9585 Write_Str (" .. Id = ");
9586 Write_Int (Int (Type_High_Bound (Id)));
9587 else
9588 Write_Str ("Empty");
9589 end if;
9591 Write_Eol;
9593 when Array_Kind =>
9594 declare
9595 Index : E;
9597 begin
9598 Write_Attribute
9599 (" Component Type ", Component_Type (Id));
9600 Write_Eol;
9601 Write_Str (Prefix);
9602 Write_Str (" Indexes ");
9604 Index := First_Index (Id);
9605 while Present (Index) loop
9606 Write_Attribute (" ", Etype (Index));
9607 Index := Next_Index (Index);
9608 end loop;
9610 Write_Eol;
9611 end;
9613 when Access_Kind =>
9614 Write_Attribute
9615 (" Directly Designated Type ",
9616 Directly_Designated_Type (Id));
9617 Write_Eol;
9619 when Overloadable_Kind =>
9620 if Present (Homonym (Id)) then
9621 Write_Str (" Homonym ");
9622 Write_Name (Chars (Homonym (Id)));
9623 Write_Str (" ");
9624 Write_Int (Int (Homonym (Id)));
9625 Write_Eol;
9626 end if;
9628 Write_Eol;
9630 when E_Component =>
9631 if Ekind (Scope (Id)) in Record_Kind then
9632 Write_Attribute (
9633 " Original_Record_Component ",
9634 Original_Record_Component (Id));
9635 Write_Int (Int (Original_Record_Component (Id)));
9636 Write_Eol;
9637 end if;
9639 when others => null;
9640 end case;
9641 end Write_Entity_Info;
9643 -----------------------
9644 -- Write_Field6_Name --
9645 -----------------------
9647 procedure Write_Field6_Name (Id : Entity_Id) is
9648 pragma Unreferenced (Id);
9649 begin
9650 Write_Str ("First_Rep_Item");
9651 end Write_Field6_Name;
9653 -----------------------
9654 -- Write_Field7_Name --
9655 -----------------------
9657 procedure Write_Field7_Name (Id : Entity_Id) is
9658 pragma Unreferenced (Id);
9659 begin
9660 Write_Str ("Freeze_Node");
9661 end Write_Field7_Name;
9663 -----------------------
9664 -- Write_Field8_Name --
9665 -----------------------
9667 procedure Write_Field8_Name (Id : Entity_Id) is
9668 begin
9669 case Ekind (Id) is
9670 when Type_Kind =>
9671 Write_Str ("Associated_Node_For_Itype");
9673 when E_Package =>
9674 Write_Str ("Dependent_Instances");
9676 when E_Loop =>
9677 Write_Str ("First_Exit_Statement");
9679 when E_Variable =>
9680 Write_Str ("Hiding_Loop_Variable");
9682 when Formal_Kind |
9683 E_Function |
9684 E_Subprogram_Body =>
9685 Write_Str ("Mechanism");
9687 when E_Component |
9688 E_Discriminant =>
9689 Write_Str ("Normalized_First_Bit");
9691 when E_Abstract_State =>
9692 Write_Str ("Refinement_Constituents");
9694 when E_Return_Statement =>
9695 Write_Str ("Return_Applies_To");
9697 when others =>
9698 Write_Str ("Field8??");
9699 end case;
9700 end Write_Field8_Name;
9702 -----------------------
9703 -- Write_Field9_Name --
9704 -----------------------
9706 procedure Write_Field9_Name (Id : Entity_Id) is
9707 begin
9708 case Ekind (Id) is
9709 when Type_Kind =>
9710 Write_Str ("Class_Wide_Type");
9712 when Object_Kind =>
9713 Write_Str ("Current_Value");
9715 when E_Function |
9716 E_Generic_Function |
9717 E_Generic_Package |
9718 E_Generic_Procedure |
9719 E_Package |
9720 E_Procedure =>
9721 Write_Str ("Renaming_Map");
9723 when others =>
9724 Write_Str ("Field9??");
9725 end case;
9726 end Write_Field9_Name;
9728 ------------------------
9729 -- Write_Field10_Name --
9730 ------------------------
9732 procedure Write_Field10_Name (Id : Entity_Id) is
9733 begin
9734 case Ekind (Id) is
9735 when Class_Wide_Kind |
9736 Incomplete_Kind |
9737 E_Record_Type |
9738 E_Record_Subtype |
9739 Private_Kind |
9740 Concurrent_Kind =>
9741 Write_Str ("Direct_Primitive_Operations");
9743 when E_In_Parameter |
9744 E_Constant =>
9745 Write_Str ("Discriminal_Link");
9747 when Float_Kind =>
9748 Write_Str ("Float_Rep");
9750 when E_Function |
9751 E_Package |
9752 E_Package_Body |
9753 E_Procedure =>
9754 Write_Str ("Handler_Records");
9756 when E_Component |
9757 E_Discriminant =>
9758 Write_Str ("Normalized_Position_Max");
9760 when E_Abstract_State |
9761 E_Variable =>
9762 Write_Str ("Part_Of_Constituents");
9764 when others =>
9765 Write_Str ("Field10??");
9766 end case;
9767 end Write_Field10_Name;
9769 ------------------------
9770 -- Write_Field11_Name --
9771 ------------------------
9773 procedure Write_Field11_Name (Id : Entity_Id) is
9774 begin
9775 case Ekind (Id) is
9776 when E_Block =>
9777 Write_Str ("Block_Node");
9779 when E_Component |
9780 E_Discriminant =>
9781 Write_Str ("Component_Bit_Offset");
9783 when Formal_Kind =>
9784 Write_Str ("Entry_Component");
9786 when E_Enumeration_Literal =>
9787 Write_Str ("Enumeration_Pos");
9789 when Type_Kind |
9790 E_Constant =>
9791 Write_Str ("Full_View");
9793 when E_Generic_Package =>
9794 Write_Str ("Generic_Homonym");
9796 when E_Variable =>
9797 Write_Str ("Part_Of_References");
9799 when E_Entry |
9800 E_Entry_Family |
9801 E_Function |
9802 E_Procedure =>
9803 Write_Str ("Protected_Body_Subprogram");
9805 when others =>
9806 Write_Str ("Field11??");
9807 end case;
9808 end Write_Field11_Name;
9810 ------------------------
9811 -- Write_Field12_Name --
9812 ------------------------
9814 procedure Write_Field12_Name (Id : Entity_Id) is
9815 begin
9816 case Ekind (Id) is
9817 when E_Package =>
9818 Write_Str ("Associated_Formal_Package");
9820 when Entry_Kind =>
9821 Write_Str ("Barrier_Function");
9823 when E_Enumeration_Literal =>
9824 Write_Str ("Enumeration_Rep");
9826 when Type_Kind |
9827 E_Component |
9828 E_Constant |
9829 E_Discriminant |
9830 E_Exception |
9831 E_In_Parameter |
9832 E_In_Out_Parameter |
9833 E_Out_Parameter |
9834 E_Loop_Parameter |
9835 E_Variable =>
9836 Write_Str ("Esize");
9838 when E_Function |
9839 E_Procedure =>
9840 Write_Str ("Next_Inlined_Subprogram");
9842 when others =>
9843 Write_Str ("Field12??");
9844 end case;
9845 end Write_Field12_Name;
9847 ------------------------
9848 -- Write_Field13_Name --
9849 ------------------------
9851 procedure Write_Field13_Name (Id : Entity_Id) is
9852 begin
9853 case Ekind (Id) is
9854 when E_Component |
9855 E_Discriminant =>
9856 Write_Str ("Component_Clause");
9858 when E_Function =>
9859 Write_Str ("Elaboration_Entity");
9861 when E_Procedure |
9862 E_Package |
9863 Generic_Unit_Kind =>
9864 Write_Str ("Elaboration_Entity");
9866 when Formal_Kind |
9867 E_Variable =>
9868 Write_Str ("Extra_Accessibility");
9870 when Type_Kind =>
9871 Write_Str ("RM_Size");
9873 when others =>
9874 Write_Str ("Field13??");
9875 end case;
9876 end Write_Field13_Name;
9878 -----------------------
9879 -- Write_Field14_Name --
9880 -----------------------
9882 procedure Write_Field14_Name (Id : Entity_Id) is
9883 begin
9884 case Ekind (Id) is
9885 when Type_Kind |
9886 Formal_Kind |
9887 E_Constant |
9888 E_Exception |
9889 E_Loop_Parameter |
9890 E_Variable =>
9891 Write_Str ("Alignment");
9893 when E_Component |
9894 E_Discriminant =>
9895 Write_Str ("Normalized_Position");
9897 when E_Entry |
9898 E_Entry_Family |
9899 E_Function |
9900 E_Procedure =>
9901 Write_Str ("Postconditions_Proc");
9903 when E_Generic_Package |
9904 E_Package =>
9905 Write_Str ("Shadow_Entities");
9907 when others =>
9908 Write_Str ("Field14??");
9909 end case;
9910 end Write_Field14_Name;
9912 ------------------------
9913 -- Write_Field15_Name --
9914 ------------------------
9916 procedure Write_Field15_Name (Id : Entity_Id) is
9917 begin
9918 case Ekind (Id) is
9919 when E_Discriminant =>
9920 Write_Str ("Discriminant_Number");
9922 when E_Component =>
9923 Write_Str ("DT_Entry_Count");
9925 when E_Function |
9926 E_Procedure =>
9927 Write_Str ("DT_Position");
9929 when Entry_Kind =>
9930 Write_Str ("Entry_Parameters_Type");
9932 when Formal_Kind =>
9933 Write_Str ("Extra_Formal");
9935 when Type_Kind =>
9936 Write_Str ("Pending_Access_Types");
9938 when E_Package |
9939 E_Package_Body =>
9940 Write_Str ("Related_Instance");
9942 when E_Constant |
9943 E_Variable =>
9944 Write_Str ("Status_Flag_Or_Transient_Decl");
9946 when others =>
9947 Write_Str ("Field15??");
9948 end case;
9949 end Write_Field15_Name;
9951 ------------------------
9952 -- Write_Field16_Name --
9953 ------------------------
9955 procedure Write_Field16_Name (Id : Entity_Id) is
9956 begin
9957 case Ekind (Id) is
9958 when E_Record_Type |
9959 E_Record_Type_With_Private =>
9960 Write_Str ("Access_Disp_Table");
9962 when E_Abstract_State =>
9963 Write_Str ("Body_References");
9965 when E_Record_Subtype |
9966 E_Class_Wide_Subtype =>
9967 Write_Str ("Cloned_Subtype");
9969 when E_Function |
9970 E_Procedure =>
9971 Write_Str ("DTC_Entity");
9973 when E_Component =>
9974 Write_Str ("Entry_Formal");
9976 when E_Package |
9977 E_Generic_Package |
9978 Concurrent_Kind =>
9979 Write_Str ("First_Private_Entity");
9981 when Enumeration_Kind =>
9982 Write_Str ("Lit_Strings");
9984 when Decimal_Fixed_Point_Kind =>
9985 Write_Str ("Scale_Value");
9987 when E_String_Literal_Subtype =>
9988 Write_Str ("String_Literal_Length");
9990 when E_Variable |
9991 E_Out_Parameter =>
9992 Write_Str ("Unset_Reference");
9994 when others =>
9995 Write_Str ("Field16??");
9996 end case;
9997 end Write_Field16_Name;
9999 ------------------------
10000 -- Write_Field17_Name --
10001 ------------------------
10003 procedure Write_Field17_Name (Id : Entity_Id) is
10004 begin
10005 case Ekind (Id) is
10006 when Formal_Kind |
10007 E_Constant |
10008 E_Generic_In_Out_Parameter |
10009 E_Variable =>
10010 Write_Str ("Actual_Subtype");
10012 when Digits_Kind =>
10013 Write_Str ("Digits_Value");
10015 when E_Discriminant =>
10016 Write_Str ("Discriminal");
10018 when E_Block |
10019 Class_Wide_Kind |
10020 Concurrent_Kind |
10021 Private_Kind |
10022 E_Entry |
10023 E_Entry_Family |
10024 E_Function |
10025 E_Generic_Function |
10026 E_Generic_Package |
10027 E_Generic_Procedure |
10028 E_Loop |
10029 E_Operator |
10030 E_Package |
10031 E_Package_Body |
10032 E_Procedure |
10033 E_Record_Type |
10034 E_Record_Subtype |
10035 E_Return_Statement |
10036 E_Subprogram_Body |
10037 E_Subprogram_Type =>
10038 Write_Str ("First_Entity");
10040 when Array_Kind =>
10041 Write_Str ("First_Index");
10043 when Enumeration_Kind =>
10044 Write_Str ("First_Literal");
10046 when Access_Kind =>
10047 Write_Str ("Master_Id");
10049 when Modular_Integer_Kind =>
10050 Write_Str ("Modulus");
10052 when E_Component =>
10053 Write_Str ("Prival");
10055 when others =>
10056 Write_Str ("Field17??");
10057 end case;
10058 end Write_Field17_Name;
10060 ------------------------
10061 -- Write_Field18_Name --
10062 ------------------------
10064 procedure Write_Field18_Name (Id : Entity_Id) is
10065 begin
10066 case Ekind (Id) is
10067 when E_Enumeration_Literal |
10068 E_Function |
10069 E_Operator |
10070 E_Procedure =>
10071 Write_Str ("Alias");
10073 when E_Record_Type =>
10074 Write_Str ("Corresponding_Concurrent_Type");
10076 when E_Subprogram_Body =>
10077 Write_Str ("Corresponding_Protected_Entry");
10079 when Concurrent_Kind =>
10080 Write_Str ("Corresponding_Record_Type");
10082 when E_Label |
10083 E_Loop |
10084 E_Block =>
10085 Write_Str ("Enclosing_Scope");
10087 when E_Entry_Index_Parameter =>
10088 Write_Str ("Entry_Index_Constant");
10090 when E_Class_Wide_Subtype |
10091 E_Access_Protected_Subprogram_Type |
10092 E_Anonymous_Access_Protected_Subprogram_Type |
10093 E_Access_Subprogram_Type |
10094 E_Exception_Type =>
10095 Write_Str ("Equivalent_Type");
10097 when Fixed_Point_Kind =>
10098 Write_Str ("Delta_Value");
10100 when Enumeration_Kind =>
10101 Write_Str ("Lit_Indexes");
10103 when Incomplete_Or_Private_Kind |
10104 E_Record_Subtype =>
10105 Write_Str ("Private_Dependents");
10107 when Object_Kind =>
10108 Write_Str ("Renamed_Object");
10110 when E_Exception |
10111 E_Package |
10112 E_Generic_Function |
10113 E_Generic_Procedure |
10114 E_Generic_Package =>
10115 Write_Str ("Renamed_Entity");
10117 when E_String_Literal_Subtype =>
10118 Write_Str ("String_Literal_Low_Bound");
10120 when others =>
10121 Write_Str ("Field18??");
10122 end case;
10123 end Write_Field18_Name;
10125 -----------------------
10126 -- Write_Field19_Name --
10127 -----------------------
10129 procedure Write_Field19_Name (Id : Entity_Id) is
10130 begin
10131 case Ekind (Id) is
10132 when E_Package |
10133 E_Generic_Package =>
10134 Write_Str ("Body_Entity");
10136 when E_Discriminant =>
10137 Write_Str ("Corresponding_Discriminant");
10139 when Scalar_Kind =>
10140 Write_Str ("Default_Aspect_Value");
10142 when E_Abstract_State |
10143 E_Class_Wide_Type |
10144 E_Incomplete_Type =>
10145 Write_Str ("Non_Limited_View");
10147 when E_Incomplete_Subtype =>
10148 if From_Limited_With (Id) then
10149 Write_Str ("Non_Limited_View");
10150 end if;
10152 when E_Array_Type =>
10153 Write_Str ("Default_Component_Value");
10155 when E_Protected_Type =>
10156 Write_Str ("Entry_Bodies_Array");
10158 when E_Function |
10159 E_Operator |
10160 E_Subprogram_Type =>
10161 Write_Str ("Extra_Accessibility_Of_Result");
10163 when E_Record_Type =>
10164 Write_Str ("Parent_Subtype");
10166 when E_Constant |
10167 E_Variable =>
10168 Write_Str ("Size_Check_Code");
10170 when E_Package_Body |
10171 Formal_Kind =>
10172 Write_Str ("Spec_Entity");
10174 when Private_Kind =>
10175 Write_Str ("Underlying_Full_View");
10177 when others =>
10178 Write_Str ("Field19??");
10179 end case;
10180 end Write_Field19_Name;
10182 -----------------------
10183 -- Write_Field20_Name --
10184 -----------------------
10186 procedure Write_Field20_Name (Id : Entity_Id) is
10187 begin
10188 case Ekind (Id) is
10189 when Array_Kind =>
10190 Write_Str ("Component_Type");
10192 when E_In_Parameter |
10193 E_Generic_In_Parameter =>
10194 Write_Str ("Default_Value");
10196 when Access_Kind =>
10197 Write_Str ("Directly_Designated_Type");
10199 when E_Component =>
10200 Write_Str ("Discriminant_Checking_Func");
10202 when E_Discriminant =>
10203 Write_Str ("Discriminant_Default_Value");
10205 when E_Block |
10206 Class_Wide_Kind |
10207 Concurrent_Kind |
10208 Private_Kind |
10209 E_Entry |
10210 E_Entry_Family |
10211 E_Function |
10212 E_Generic_Function |
10213 E_Generic_Package |
10214 E_Generic_Procedure |
10215 E_Loop |
10216 E_Operator |
10217 E_Package |
10218 E_Package_Body |
10219 E_Procedure |
10220 E_Record_Type |
10221 E_Record_Subtype |
10222 E_Return_Statement |
10223 E_Subprogram_Body |
10224 E_Subprogram_Type =>
10225 Write_Str ("Last_Entity");
10227 when E_Constant |
10228 E_Variable =>
10229 Write_Str ("Prival_Link");
10231 when Scalar_Kind =>
10232 Write_Str ("Scalar_Range");
10234 when E_Exception =>
10235 Write_Str ("Register_Exception_Call");
10237 when others =>
10238 Write_Str ("Field20??");
10239 end case;
10240 end Write_Field20_Name;
10242 -----------------------
10243 -- Write_Field21_Name --
10244 -----------------------
10246 procedure Write_Field21_Name (Id : Entity_Id) is
10247 begin
10248 case Ekind (Id) is
10249 when Entry_Kind =>
10250 Write_Str ("Accept_Address");
10252 when E_In_Parameter =>
10253 Write_Str ("Default_Expr_Function");
10255 when Concurrent_Kind |
10256 Incomplete_Or_Private_Kind |
10257 Class_Wide_Kind |
10258 E_Record_Type |
10259 E_Record_Subtype =>
10260 Write_Str ("Discriminant_Constraint");
10262 when E_Constant |
10263 E_Exception |
10264 E_Function |
10265 E_Generic_Function |
10266 E_Procedure |
10267 E_Generic_Procedure |
10268 E_Variable =>
10269 Write_Str ("Interface_Name");
10271 when Array_Kind |
10272 Modular_Integer_Kind =>
10273 Write_Str ("Original_Array_Type");
10275 when Fixed_Point_Kind =>
10276 Write_Str ("Small_Value");
10278 when others =>
10279 Write_Str ("Field21??");
10280 end case;
10281 end Write_Field21_Name;
10283 -----------------------
10284 -- Write_Field22_Name --
10285 -----------------------
10287 procedure Write_Field22_Name (Id : Entity_Id) is
10288 begin
10289 case Ekind (Id) is
10290 when Access_Kind =>
10291 Write_Str ("Associated_Storage_Pool");
10293 when Array_Kind =>
10294 Write_Str ("Component_Size");
10296 when E_Record_Type =>
10297 Write_Str ("Corresponding_Remote_Type");
10299 when E_Component |
10300 E_Discriminant =>
10301 Write_Str ("Original_Record_Component");
10303 when E_Enumeration_Literal =>
10304 Write_Str ("Enumeration_Rep_Expr");
10306 when E_Record_Type_With_Private |
10307 E_Record_Subtype_With_Private |
10308 E_Private_Type |
10309 E_Private_Subtype |
10310 E_Limited_Private_Type |
10311 E_Limited_Private_Subtype =>
10312 Write_Str ("Private_View");
10314 when Formal_Kind =>
10315 Write_Str ("Protected_Formal");
10317 when E_Block |
10318 E_Entry |
10319 E_Entry_Family |
10320 E_Function |
10321 E_Loop |
10322 E_Package |
10323 E_Package_Body |
10324 E_Generic_Package |
10325 E_Generic_Function |
10326 E_Generic_Procedure |
10327 E_Procedure |
10328 E_Protected_Type |
10329 E_Return_Statement |
10330 E_Subprogram_Body |
10331 E_Task_Type =>
10332 Write_Str ("Scope_Depth_Value");
10334 when E_Variable =>
10335 Write_Str ("Shared_Var_Procs_Instance");
10337 when others =>
10338 Write_Str ("Field22??");
10339 end case;
10340 end Write_Field22_Name;
10342 ------------------------
10343 -- Write_Field23_Name --
10344 ------------------------
10346 procedure Write_Field23_Name (Id : Entity_Id) is
10347 begin
10348 case Ekind (Id) is
10349 when E_Discriminant =>
10350 Write_Str ("CR_Discriminant");
10352 when E_Block =>
10353 Write_Str ("Entry_Cancel_Parameter");
10355 when E_Enumeration_Type =>
10356 Write_Str ("Enum_Pos_To_Rep");
10358 when Formal_Kind |
10359 E_Variable =>
10360 Write_Str ("Extra_Constrained");
10362 when Access_Kind =>
10363 Write_Str ("Finalization_Master");
10365 when E_Generic_Function |
10366 E_Generic_Package |
10367 E_Generic_Procedure =>
10368 Write_Str ("Inner_Instances");
10370 when Array_Kind =>
10371 Write_Str ("Packed_Array_Impl_Type");
10373 when Entry_Kind =>
10374 Write_Str ("Protection_Object");
10376 when Concurrent_Kind |
10377 Incomplete_Or_Private_Kind |
10378 Class_Wide_Kind |
10379 E_Record_Type |
10380 E_Record_Subtype =>
10381 Write_Str ("Stored_Constraint");
10383 when E_Function |
10384 E_Procedure =>
10385 if Present (Scope (Id))
10386 and then Is_Protected_Type (Scope (Id))
10387 then
10388 Write_Str ("Protection_Object");
10389 else
10390 Write_Str ("Generic_Renamings");
10391 end if;
10393 when E_Package =>
10394 if Is_Generic_Instance (Id) then
10395 Write_Str ("Generic_Renamings");
10396 else
10397 Write_Str ("Limited_View");
10398 end if;
10400 when others =>
10401 Write_Str ("Field23??");
10402 end case;
10403 end Write_Field23_Name;
10405 ------------------------
10406 -- Write_Field24_Name --
10407 ------------------------
10409 procedure Write_Field24_Name (Id : Entity_Id) is
10410 begin
10411 case Ekind (Id) is
10412 when E_Constant |
10413 E_Variable |
10414 Type_Kind =>
10415 Write_Str ("Related_Expression");
10417 when E_Function |
10418 E_Operator |
10419 E_Procedure =>
10420 Write_Str ("Subps_Index");
10422 when E_Package =>
10423 Write_Str ("Incomplete_Actuals");
10425 when others =>
10426 Write_Str ("Field24???");
10427 end case;
10428 end Write_Field24_Name;
10430 ------------------------
10431 -- Write_Field25_Name --
10432 ------------------------
10434 procedure Write_Field25_Name (Id : Entity_Id) is
10435 begin
10436 case Ekind (Id) is
10437 when E_Generic_Package |
10438 E_Package =>
10439 Write_Str ("Abstract_States");
10441 when E_Entry |
10442 E_Entry_Family =>
10443 Write_Str ("Contract_Wrapper");
10445 when E_Variable =>
10446 Write_Str ("Debug_Renaming_Link");
10448 when E_Component =>
10449 Write_Str ("DT_Offset_To_Top_Func");
10451 when E_Procedure |
10452 E_Function =>
10453 Write_Str ("Interface_Alias");
10455 when E_Record_Type |
10456 E_Record_Subtype |
10457 E_Record_Type_With_Private |
10458 E_Record_Subtype_With_Private =>
10459 Write_Str ("Interfaces");
10461 when E_Array_Type |
10462 E_Array_Subtype =>
10463 Write_Str ("Related_Array_Object");
10465 when Task_Kind =>
10466 Write_Str ("Task_Body_Procedure");
10468 when Discrete_Kind =>
10469 Write_Str ("Static_Discrete_Predicate");
10471 when Real_Kind =>
10472 Write_Str ("Static_Real_Or_String_Predicate");
10474 when others =>
10475 Write_Str ("Field25??");
10476 end case;
10477 end Write_Field25_Name;
10479 ------------------------
10480 -- Write_Field26_Name --
10481 ------------------------
10483 procedure Write_Field26_Name (Id : Entity_Id) is
10484 begin
10485 case Ekind (Id) is
10486 when E_Record_Type |
10487 E_Record_Type_With_Private =>
10488 Write_Str ("Dispatch_Table_Wrappers");
10490 when E_In_Out_Parameter |
10491 E_Out_Parameter |
10492 E_Variable =>
10493 Write_Str ("Last_Assignment");
10495 when E_Procedure |
10496 E_Function =>
10497 Write_Str ("Overridden_Operation");
10499 when E_Generic_Package |
10500 E_Package =>
10501 Write_Str ("Package_Instantiation");
10503 when E_Component |
10504 E_Constant =>
10505 Write_Str ("Related_Type");
10507 when Access_Kind |
10508 Task_Kind =>
10509 Write_Str ("Storage_Size_Variable");
10511 when others =>
10512 Write_Str ("Field26??");
10513 end case;
10514 end Write_Field26_Name;
10516 ------------------------
10517 -- Write_Field27_Name --
10518 ------------------------
10520 procedure Write_Field27_Name (Id : Entity_Id) is
10521 begin
10522 case Ekind (Id) is
10523 when E_Package |
10524 Type_Kind =>
10525 Write_Str ("Current_Use_Clause");
10527 when E_Component |
10528 E_Constant |
10529 E_Variable =>
10530 Write_Str ("Related_Type");
10532 when E_Procedure |
10533 E_Function =>
10534 Write_Str ("Wrapped_Entity");
10536 when others =>
10537 Write_Str ("Field27??");
10538 end case;
10539 end Write_Field27_Name;
10541 ------------------------
10542 -- Write_Field28_Name --
10543 ------------------------
10545 procedure Write_Field28_Name (Id : Entity_Id) is
10546 begin
10547 case Ekind (Id) is
10548 when E_Entry |
10549 E_Entry_Family |
10550 E_Function |
10551 E_Procedure |
10552 E_Subprogram_Body |
10553 E_Subprogram_Type =>
10554 Write_Str ("Extra_Formals");
10556 when E_Package |
10557 E_Package_Body =>
10558 Write_Str ("Finalizer");
10560 when E_Constant |
10561 E_Variable =>
10562 Write_Str ("Initialization_Statements");
10564 when E_Access_Subprogram_Type =>
10565 Write_Str ("Original_Access_Type");
10567 when Task_Kind =>
10568 Write_Str ("Relative_Deadline_Variable");
10570 when E_Record_Type =>
10571 Write_Str ("Underlying_Record_View");
10573 when others =>
10574 Write_Str ("Field28??");
10575 end case;
10576 end Write_Field28_Name;
10578 ------------------------
10579 -- Write_Field29_Name --
10580 ------------------------
10582 procedure Write_Field29_Name (Id : Entity_Id) is
10583 begin
10584 case Ekind (Id) is
10585 when E_Function |
10586 E_Package |
10587 E_Procedure |
10588 E_Subprogram_Body =>
10589 Write_Str ("Anonymous_Masters");
10591 when E_Constant |
10592 E_Variable =>
10593 Write_Str ("BIP_Initialization_Call");
10595 when Type_Kind =>
10596 Write_Str ("Subprograms_For_Type");
10598 when others =>
10599 Write_Str ("Field29??");
10600 end case;
10601 end Write_Field29_Name;
10603 ------------------------
10604 -- Write_Field30_Name --
10605 ------------------------
10607 procedure Write_Field30_Name (Id : Entity_Id) is
10608 begin
10609 case Ekind (Id) is
10610 when E_Protected_Type |
10611 E_Task_Type =>
10612 Write_Str ("Anonymous_Object");
10614 when E_Function =>
10615 Write_Str ("Corresponding_Equality");
10617 when E_Constant |
10618 E_Variable =>
10619 Write_Str ("Last_Aggregate_Assignment");
10621 when E_Procedure =>
10622 Write_Str ("Static_Initialization");
10624 when others =>
10625 Write_Str ("Field30??");
10626 end case;
10627 end Write_Field30_Name;
10629 ------------------------
10630 -- Write_Field31_Name --
10631 ------------------------
10633 procedure Write_Field31_Name (Id : Entity_Id) is
10634 begin
10635 case Ekind (Id) is
10636 when E_Procedure |
10637 E_Function =>
10638 Write_Str ("Thunk_Entity");
10640 when Type_Kind =>
10641 Write_Str ("Derived_Type_Link");
10643 when E_Constant |
10644 E_In_Parameter |
10645 E_In_Out_Parameter |
10646 E_Loop_Parameter |
10647 E_Out_Parameter |
10648 E_Variable =>
10649 Write_Str ("Activation_Record_Component");
10651 when others =>
10652 Write_Str ("Field31??");
10653 end case;
10654 end Write_Field31_Name;
10656 ------------------------
10657 -- Write_Field32_Name --
10658 ------------------------
10660 procedure Write_Field32_Name (Id : Entity_Id) is
10661 begin
10662 case Ekind (Id) is
10663 when E_Abstract_State |
10664 E_Constant |
10665 E_Variable =>
10666 Write_Str ("Encapsulating_State");
10668 when E_Function =>
10669 Write_Str ("Corresponding_Procedure");
10671 when E_Procedure =>
10672 Write_Str ("Corresponding_Function");
10674 when Type_Kind =>
10675 Write_Str ("No_Tagged_Streams_Pragma");
10677 when others =>
10678 Write_Str ("Field32??");
10679 end case;
10680 end Write_Field32_Name;
10682 ------------------------
10683 -- Write_Field33_Name --
10684 ------------------------
10686 procedure Write_Field33_Name (Id : Entity_Id) is
10687 begin
10688 case Ekind (Id) is
10689 when E_Constant |
10690 E_Variable |
10691 Subprogram_Kind |
10692 Type_Kind =>
10693 Write_Str ("Linker_Section_Pragma");
10695 when others =>
10696 Write_Str ("Field33??");
10697 end case;
10698 end Write_Field33_Name;
10700 ------------------------
10701 -- Write_Field34_Name --
10702 ------------------------
10704 procedure Write_Field34_Name (Id : Entity_Id) is
10705 begin
10706 case Ekind (Id) is
10707 when E_Constant |
10708 E_Entry |
10709 E_Entry_Family |
10710 E_Function |
10711 E_Generic_Function |
10712 E_Generic_Package |
10713 E_Generic_Procedure |
10714 E_Operator |
10715 E_Package |
10716 E_Package_Body |
10717 E_Procedure |
10718 E_Protected_Type |
10719 E_Subprogram_Body |
10720 E_Task_Body |
10721 E_Task_Type |
10722 E_Variable |
10723 E_Void =>
10724 Write_Str ("Contract");
10726 when others =>
10727 Write_Str ("Field34??");
10728 end case;
10729 end Write_Field34_Name;
10731 ------------------------
10732 -- Write_Field35_Name --
10733 ------------------------
10735 procedure Write_Field35_Name (Id : Entity_Id) is
10736 begin
10737 case Ekind (Id) is
10738 when E_Variable =>
10739 Write_Str ("Anonymous_Designated_Type");
10741 when Subprogram_Kind =>
10742 Write_Str ("Import_Pragma");
10744 when others =>
10745 Write_Str ("Field35??");
10746 end case;
10747 end Write_Field35_Name;
10749 ------------------------
10750 -- Write_Field36_Name --
10751 ------------------------
10753 procedure Write_Field36_Name (Id : Entity_Id) is
10754 pragma Unreferenced (Id);
10755 begin
10756 Write_Str ("Field36??");
10757 end Write_Field36_Name;
10759 ------------------------
10760 -- Write_Field37_Name --
10761 ------------------------
10763 procedure Write_Field37_Name (Id : Entity_Id) is
10764 pragma Unreferenced (Id);
10765 begin
10766 Write_Str ("Associated_Entity");
10767 end Write_Field37_Name;
10769 ------------------------
10770 -- Write_Field38_Name --
10771 ------------------------
10773 procedure Write_Field38_Name (Id : Entity_Id) is
10774 begin
10775 case Ekind (Id) is
10776 when E_Function |
10777 E_Procedure =>
10778 Write_Str ("Class-wide preconditions");
10780 when others =>
10781 Write_Str ("Field38??");
10782 end case;
10783 end Write_Field38_Name;
10785 ------------------------
10786 -- Write_Field39_Name --
10787 ------------------------
10789 procedure Write_Field39_Name (Id : Entity_Id) is
10790 begin
10791 case Ekind (Id) is
10792 when E_Function |
10793 E_Procedure =>
10794 Write_Str ("Class-wide postcondition");
10796 when others =>
10797 Write_Str ("Field39??");
10798 end case;
10799 end Write_Field39_Name;
10801 ------------------------
10802 -- Write_Field40_Name --
10803 ------------------------
10805 procedure Write_Field40_Name (Id : Entity_Id) is
10806 begin
10807 case Ekind (Id) is
10808 when E_Entry |
10809 E_Entry_Family |
10810 E_Function |
10811 E_Generic_Function |
10812 E_Generic_Package |
10813 E_Generic_Procedure |
10814 E_Operator |
10815 E_Package |
10816 E_Package_Body |
10817 E_Procedure |
10818 E_Protected_Body |
10819 E_Protected_Type |
10820 E_Subprogram_Body |
10821 E_Task_Body |
10822 E_Task_Type |
10823 E_Variable =>
10824 Write_Str ("SPARK_Pragma");
10826 when others =>
10827 Write_Str ("Field40??");
10828 end case;
10829 end Write_Field40_Name;
10831 ------------------------
10832 -- Write_Field41_Name --
10833 ------------------------
10835 procedure Write_Field41_Name (Id : Entity_Id) is
10836 begin
10837 case Ekind (Id) is
10838 when E_Generic_Package |
10839 E_Package |
10840 E_Package_Body |
10841 E_Protected_Type |
10842 E_Task_Type =>
10843 Write_Str ("SPARK_Aux_Pragma");
10845 when E_Function |
10846 E_Procedure =>
10847 Write_Str ("Original_Protected_Subprogram");
10849 when others =>
10850 Write_Str ("Field41??");
10851 end case;
10852 end Write_Field41_Name;
10854 -------------------------
10855 -- Iterator Procedures --
10856 -------------------------
10858 procedure Proc_Next_Component (N : in out Node_Id) is
10859 begin
10860 N := Next_Component (N);
10861 end Proc_Next_Component;
10863 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
10864 begin
10865 N := Next_Entity (N);
10866 while Present (N) loop
10867 exit when Ekind_In (N, E_Component, E_Discriminant);
10868 N := Next_Entity (N);
10869 end loop;
10870 end Proc_Next_Component_Or_Discriminant;
10872 procedure Proc_Next_Discriminant (N : in out Node_Id) is
10873 begin
10874 N := Next_Discriminant (N);
10875 end Proc_Next_Discriminant;
10877 procedure Proc_Next_Formal (N : in out Node_Id) is
10878 begin
10879 N := Next_Formal (N);
10880 end Proc_Next_Formal;
10882 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
10883 begin
10884 N := Next_Formal_With_Extras (N);
10885 end Proc_Next_Formal_With_Extras;
10887 procedure Proc_Next_Index (N : in out Node_Id) is
10888 begin
10889 N := Next_Index (N);
10890 end Proc_Next_Index;
10892 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
10893 begin
10894 N := Next_Inlined_Subprogram (N);
10895 end Proc_Next_Inlined_Subprogram;
10897 procedure Proc_Next_Literal (N : in out Node_Id) is
10898 begin
10899 N := Next_Literal (N);
10900 end Proc_Next_Literal;
10902 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
10903 begin
10904 N := Next_Stored_Discriminant (N);
10905 end Proc_Next_Stored_Discriminant;
10907 end Einfo;