1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
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. --
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. --
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/>. --
27 -- GNAT was originally developed by the GNAT team at New York University. --
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
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;
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.
66 -- Remaining fields are present only in extended nodes (i.e. entities)
68 -- The following fields are present in all entities
71 -- First_Rep_Item Node6
74 -- The usage of other fields (and the entity kinds to which it applies)
75 -- depends on the particular field (see Einfo spec for details).
77 -- Associated_Node_For_Itype Node8
78 -- Dependent_Instances Elist8
79 -- Hiding_Loop_Variable Node8
80 -- Mechanism Uint8 (but returns Mechanism_Type)
81 -- Normalized_First_Bit Uint8
82 -- Postcondition_Proc Node8
83 -- Refinement_Constituents Elist8
84 -- Return_Applies_To Node8
85 -- First_Exit_Statement Node8
87 -- Class_Wide_Type Node9
88 -- Current_Value Node9
89 -- Part_Of_Constituents Elist9
92 -- Encapsulating_State Node10
93 -- Direct_Primitive_Operations Elist10
94 -- Discriminal_Link Node10
95 -- Float_Rep Uint10 (but returns Float_Rep_Kind)
96 -- Handler_Records List10
97 -- Normalized_Position_Max Uint10
99 -- Component_Bit_Offset Uint11
101 -- Entry_Component Node11
102 -- Enumeration_Pos Uint11
103 -- Generic_Homonym Node11
104 -- Protected_Body_Subprogram Node11
107 -- Barrier_Function Node12
108 -- Enumeration_Rep Uint12
110 -- Next_Inlined_Subprogram Node12
112 -- Component_Clause Node13
113 -- Elaboration_Entity Node13
114 -- Extra_Accessibility Node13
118 -- First_Optional_Parameter Node14
119 -- Normalized_Position Uint14
120 -- Shadow_Entities List14
122 -- Discriminant_Number Uint15
123 -- DT_Position Uint15
124 -- DT_Entry_Count Uint15
125 -- Entry_Bodies_Array Node15
126 -- Entry_Parameters_Type Node15
127 -- Extra_Formal Node15
128 -- Lit_Indexes Node15
129 -- Related_Instance Node15
130 -- Status_Flag_Or_Transient_Decl Node15
131 -- Scale_Value Uint15
132 -- Storage_Size_Variable Node15
133 -- String_Literal_Low_Bound Node15
135 -- Access_Disp_Table Elist16
136 -- Body_References Elist16
137 -- Cloned_Subtype Node16
139 -- Entry_Formal Node16
140 -- First_Private_Entity Node16
141 -- Lit_Strings Node16
142 -- String_Literal_Length Uint16
143 -- Unset_Reference Node16
145 -- Actual_Subtype Node17
146 -- Digits_Value Uint17
147 -- Discriminal Node17
148 -- First_Entity Node17
149 -- First_Index Node17
150 -- First_Literal Node17
153 -- Non_Limited_View Node17
157 -- Corresponding_Concurrent_Type Node18
158 -- Corresponding_Protected_Entry Node18
159 -- Corresponding_Record_Type Node18
160 -- Delta_Value Ureal18
161 -- Enclosing_Scope Node18
162 -- Equivalent_Type Node18
163 -- Private_Dependents Elist18
164 -- Renamed_Entity Node18
165 -- Renamed_Object Node18
167 -- Body_Entity Node19
168 -- Corresponding_Discriminant Node19
169 -- Default_Aspect_Component_Value Node19
170 -- Default_Aspect_Value Node19
171 -- Extra_Accessibility_Of_Result 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 -- Exception_Code Uint22
199 -- Original_Record_Component Node22
200 -- Private_View Node22
201 -- Protected_Formal Node22
202 -- Scope_Depth_Value Uint22
203 -- Shared_Var_Procs_Instance Node22
205 -- CR_Discriminant Node23
206 -- Entry_Cancel_Parameter Node23
207 -- Enum_Pos_To_Rep Node23
208 -- Extra_Constrained Node23
209 -- Finalization_Master Node23
210 -- Generic_Renamings Elist23
211 -- Inner_Instances Elist23
212 -- Limited_View Node23
213 -- Packed_Array_Type Node23
214 -- Protection_Object Node23
215 -- Stored_Constraint Elist23
217 -- Related_Expression Node24
219 -- Interface_Alias Node25
220 -- Interfaces Elist25
221 -- Debug_Renaming_Link Node25
222 -- DT_Offset_To_Top_Func Node25
223 -- PPC_Wrapper Node25
224 -- Related_Array_Object Node25
225 -- Static_Predicate List25
226 -- Task_Body_Procedure Node25
228 -- Dispatch_Table_Wrappers Elist26
229 -- Last_Assignment Node26
230 -- Original_Access_Type Node26
231 -- Overridden_Operation Node26
232 -- Package_Instantiation Node26
233 -- Relative_Deadline_Variable Node26
235 -- Current_Use_Clause Node27
236 -- Related_Type Node27
237 -- Wrapped_Entity Node27
239 -- Extra_Formals Node28
241 -- Initialization_Statements Node28
242 -- Underlying_Record_View Node28
244 -- Subprograms_For_Type Node29
246 -- Corresponding_Equality Node30
247 -- Static_Initialization Node30
249 -- Thunk_Entity Node31
251 -- SPARK_Pragma Node32
253 -- Linker_Section_Pragma Node33
254 -- SPARK_Aux_Pragma Node33
260 ---------------------------------------------
261 -- Usage of Flags in Defining Entity Nodes --
262 ---------------------------------------------
264 -- All flags are unique, there is no overlaying, so each flag is physically
265 -- present in every entity. However, for many of the flags, it only makes
266 -- sense for them to be set true for certain subsets of entity kinds. See
267 -- the spec of Einfo for further details.
270 -- Has_Discriminants Flag5
271 -- Is_Dispatching_Operation Flag6
272 -- Is_Immediately_Visible Flag7
274 -- Is_Potentially_Use_Visible Flag9
278 -- Is_Constrained Flag12
279 -- Is_Generic_Type Flag13
280 -- Depends_On_Private Flag14
282 -- Is_Volatile Flag16
283 -- Is_Internal Flag17
284 -- Has_Delayed_Freeze Flag18
285 -- Is_Abstract_Subprogram Flag19
286 -- Is_Concurrent_Record_Type Flag20
288 -- Has_Master_Entity Flag21
289 -- Needs_No_Actuals Flag22
290 -- Has_Storage_Size_Clause Flag23
291 -- Is_Imported Flag24
292 -- Is_Limited_Record Flag25
293 -- Has_Completion Flag26
294 -- Has_Pragma_Controlled Flag27
295 -- Is_Statically_Allocated Flag28
296 -- Has_Size_Clause Flag29
299 -- Checks_May_Be_Suppressed Flag31
300 -- Kill_Elaboration_Checks Flag32
301 -- Kill_Range_Checks Flag33
302 -- Has_Independent_Components Flag34
303 -- Is_Class_Wide_Equivalent_Type Flag35
304 -- Referenced_As_LHS Flag36
305 -- Is_Known_Non_Null Flag37
306 -- Can_Never_Be_Null Flag38
307 -- Has_Default_Aspect Flag39
308 -- Body_Needed_For_SAL Flag40
310 -- Treat_As_Volatile Flag41
311 -- Is_Controlled Flag42
312 -- Has_Controlled_Component Flag43
314 -- In_Private_Part Flag45
315 -- Has_Alignment_Clause Flag46
317 -- In_Package_Body Flag48
319 -- Delay_Subprogram_Descriptors Flag50
322 -- Is_Entry_Formal Flag52
323 -- Is_Private_Descendant Flag53
324 -- Return_Present Flag54
325 -- Is_Tagged_Type Flag55
326 -- Has_Homonym Flag56
328 -- Non_Binary_Modulus Flag58
329 -- Is_Preelaborated Flag59
330 -- Is_Shared_Passive Flag60
332 -- Is_Remote_Types Flag61
333 -- Is_Remote_Call_Interface Flag62
334 -- Is_Character_Type Flag63
335 -- Is_Intrinsic_Subprogram Flag64
336 -- Has_Record_Rep_Clause Flag65
337 -- Has_Enumeration_Rep_Clause Flag66
338 -- Has_Small_Clause Flag67
339 -- Has_Component_Size_Clause Flag68
340 -- Is_Access_Constant Flag69
341 -- Is_First_Subtype Flag70
343 -- Has_Completion_In_Body Flag71
344 -- Has_Unknown_Discriminants Flag72
345 -- Is_Child_Unit Flag73
346 -- Is_CPP_Class Flag74
347 -- Has_Non_Standard_Rep Flag75
348 -- Is_Constructor Flag76
349 -- Static_Elaboration_Desired Flag77
351 -- Has_All_Calls_Remote Flag79
352 -- Is_Constr_Subt_For_U_Nominal Flag80
354 -- Is_Asynchronous Flag81
355 -- Has_Gigi_Rep_Item Flag82
356 -- Has_Machine_Radix_Clause Flag83
357 -- Machine_Radix_10 Flag84
359 -- Has_Atomic_Components Flag86
360 -- Has_Volatile_Components Flag87
361 -- Discard_Names Flag88
362 -- Is_Interrupt_Handler Flag89
363 -- Returns_By_Ref Flag90
366 -- Size_Known_At_Compile_Time Flag92
367 -- Reverse_Storage_Order Flag93
368 -- Is_Generic_Actual_Type Flag94
369 -- Uses_Sec_Stack Flag95
370 -- Warnings_Off Flag96
371 -- Is_Controlling_Formal Flag97
372 -- Has_Controlling_Result Flag98
373 -- Is_Exported Flag99
374 -- Has_Specified_Layout Flag100
376 -- Has_Nested_Block_With_Handler Flag101
378 -- Is_Completely_Hidden Flag103
379 -- Address_Taken Flag104
380 -- Suppress_Initialization Flag105
381 -- Is_Limited_Composite Flag106
382 -- Is_Private_Composite Flag107
383 -- Default_Expressions_Processed Flag108
384 -- Is_Non_Static_Subtype Flag109
385 -- Has_External_Tag_Rep_Clause Flag110
387 -- Is_Formal_Subprogram Flag111
388 -- Is_Renaming_Of_Object Flag112
390 -- Delay_Cleanups Flag114
391 -- Never_Set_In_Source Flag115
392 -- Is_Visible_Lib_Unit Flag116
393 -- Is_Unchecked_Union Flag117
394 -- Is_For_Access_Subtype Flag118
395 -- Has_Convention_Pragma Flag119
396 -- Has_Primitive_Operations Flag120
398 -- Has_Pragma_Pack Flag121
399 -- Is_Bit_Packed_Array Flag122
400 -- Has_Unchecked_Union Flag123
401 -- Is_Eliminated Flag124
402 -- C_Pass_By_Copy Flag125
403 -- Is_Instantiated Flag126
404 -- Is_Valued_Procedure Flag127
405 -- (used for Component_Alignment) Flag128
406 -- (used for Component_Alignment) Flag129
407 -- Is_Generic_Instance Flag130
409 -- No_Pool_Assigned Flag131
410 -- Is_AST_Entry Flag132
411 -- Is_VMS_Exception Flag133
412 -- Is_Optional_Parameter Flag134
413 -- Has_Aliased_Components Flag135
414 -- No_Strict_Aliasing Flag136
415 -- Is_Machine_Code_Subprogram Flag137
416 -- Is_Packed_Array_Type Flag138
417 -- Has_Biased_Representation Flag139
418 -- Has_Complex_Representation Flag140
420 -- Is_Constr_Subt_For_UN_Aliased Flag141
421 -- Has_Missing_Return Flag142
422 -- Has_Recursive_Call Flag143
423 -- Is_Unsigned_Type Flag144
424 -- Strict_Alignment Flag145
425 -- Is_Abstract_Type Flag146
426 -- Needs_Debug_Info Flag147
427 -- Suppress_Elaboration_Warnings Flag148
428 -- Is_Compilation_Unit Flag149
429 -- Has_Pragma_Elaborate_Body Flag150
431 -- Has_Private_Ancestor Flag151
432 -- Entry_Accepted Flag152
433 -- Is_Obsolescent Flag153
434 -- Has_Per_Object_Constraint Flag154
435 -- Has_Private_Declaration Flag155
436 -- Referenced Flag156
437 -- Has_Pragma_Inline Flag157
438 -- Finalize_Storage_Only Flag158
439 -- From_Limited_With Flag159
440 -- Is_Package_Body_Entity Flag160
442 -- Has_Qualified_Name Flag161
443 -- Nonzero_Is_True Flag162
444 -- Is_True_Constant Flag163
445 -- Reverse_Bit_Order Flag164
446 -- Suppress_Style_Checks Flag165
447 -- Debug_Info_Off Flag166
448 -- Sec_Stack_Needed_For_Return Flag167
449 -- Materialize_Entity Flag168
450 -- Has_Pragma_Thread_Local_Storage Flag169
451 -- Is_Known_Valid Flag170
453 -- Is_Hidden_Open_Scope Flag171
454 -- Has_Object_Size_Clause Flag172
455 -- Has_Fully_Qualified_Name Flag173
456 -- Elaboration_Entity_Required Flag174
457 -- Has_Forward_Instantiation Flag175
458 -- Is_Discrim_SO_Function Flag176
459 -- Size_Depends_On_Discriminant Flag177
460 -- Is_Null_Init_Proc Flag178
461 -- Has_Pragma_Pure_Function Flag179
462 -- Has_Pragma_Unreferenced Flag180
464 -- Has_Contiguous_Rep Flag181
465 -- Has_Xref_Entry Flag182
466 -- Must_Be_On_Byte_Boundary Flag183
467 -- Has_Stream_Size_Clause Flag184
468 -- Is_Ada_2005_Only Flag185
469 -- Is_Interface Flag186
470 -- Has_Constrained_Partial_View Flag187
471 -- Uses_Lock_Free Flag188
472 -- Is_Pure_Unit_Access_Type Flag189
473 -- Has_Specified_Stream_Input Flag190
475 -- Has_Specified_Stream_Output Flag191
476 -- Has_Specified_Stream_Read Flag192
477 -- Has_Specified_Stream_Write Flag193
478 -- Is_Local_Anonymous_Access Flag194
479 -- Is_Primitive_Wrapper Flag195
480 -- Was_Hidden Flag196
481 -- Is_Limited_Interface Flag197
482 -- Has_Pragma_Ordered Flag198
483 -- Is_Ada_2012_Only Flag199
485 -- Has_Delayed_Aspects Flag200
486 -- Has_Pragma_No_Inline Flag201
487 -- Itype_Printed Flag202
488 -- Has_Pragma_Pure Flag203
489 -- Is_Known_Null Flag204
490 -- Low_Bound_Tested Flag205
491 -- Is_Visible_Formal Flag206
492 -- Known_To_Have_Preelab_Init Flag207
493 -- Must_Have_Preelab_Init Flag208
494 -- Is_Return_Object Flag209
495 -- Elaborate_Body_Desirable Flag210
497 -- Has_Static_Discriminants Flag211
498 -- Has_Pragma_Unreferenced_Objects Flag212
499 -- Requires_Overriding Flag213
501 -- Has_Up_Level_Access Flag215
502 -- Universal_Aliasing Flag216
503 -- Suppress_Value_Tracking_On_Call Flag217
504 -- Is_Primitive Flag218
505 -- Has_Initial_Value Flag219
506 -- Has_Dispatch_Table Flag220
508 -- Has_Pragma_Preelab_Init Flag221
509 -- Used_As_Generic_Actual Flag222
510 -- Is_Descendent_Of_Address Flag223
513 -- Is_Only_Out_Parameter Flag226
514 -- Referenced_As_Out_Parameter Flag227
515 -- Has_Thunks Flag228
516 -- Can_Use_Internal_Rep Flag229
517 -- Has_Pragma_Inline_Always Flag230
519 -- Renamed_In_Spec Flag231
520 -- Has_Invariants Flag232
521 -- Has_Pragma_Unmodified Flag233
522 -- Is_Dispatch_Table_Entity Flag234
523 -- Is_Trivial_Subprogram Flag235
524 -- Warnings_Off_Used Flag236
525 -- Warnings_Off_Used_Unmodified Flag237
526 -- Warnings_Off_Used_Unreferenced Flag238
527 -- OK_To_Reorder_Components Flag239
528 -- Has_Postconditions Flag240
530 -- Optimize_Alignment_Space Flag241
531 -- Optimize_Alignment_Time Flag242
532 -- Overlays_Constant Flag243
533 -- Is_RACW_Stub_Type Flag244
534 -- Is_Private_Primitive Flag245
535 -- Is_Underlying_Record_View Flag246
536 -- OK_To_Rename Flag247
537 -- Has_Inheritable_Invariants Flag248
538 -- Is_Safe_To_Reevaluate Flag249
539 -- Has_Predicates Flag250
541 -- Has_Implicit_Dereference Flag251
542 -- Is_Processed_Transient Flag252
543 -- Has_Anonymous_Master Flag253
544 -- Is_Implementation_Defined Flag254
545 -- Is_Predicate_Function Flag255
546 -- Is_Predicate_Function_M Flag256
547 -- Is_Invariant_Procedure Flag257
548 -- Has_Dynamic_Predicate_Aspect Flag258
549 -- Has_Static_Predicate_Aspect Flag259
550 -- Has_Loop_Entry_Attributes Flag260
552 -- Has_Delayed_Rep_Aspects Flag261
553 -- May_Inherit_Delayed_Rep_Aspects Flag262
554 -- Has_Visible_Refinement Flag263
555 -- SPARK_Pragma_Inherited Flag265
556 -- SPARK_Aux_Pragma_Inherited Flag266
586 -- Note: Flag287-317 are defined in atree.ads/adb, but not yet in atree.h
588 -----------------------
589 -- Local subprograms --
590 -----------------------
593 (State_Id : Entity_Id;
594 Option_Nam : Name_Id) return Boolean;
595 -- Determine whether abstract state State_Id has particular option denoted
596 -- by the name Option_Nam.
602 function Float_Rep (Id : E) return F is
603 pragma Assert (Is_Floating_Point_Type (Id));
605 return F'Val (UI_To_Int (Uint10 (Base_Type (Id))));
613 (State_Id : Entity_Id;
614 Option_Nam : Name_Id) return Boolean
616 Decl : constant Node_Id := Parent (State_Id);
621 pragma Assert (Ekind (State_Id) = E_Abstract_State);
623 -- The declaration of abstract states with options appear as an
624 -- extension aggregate. If this is not the case, the option is not
627 if Nkind (Decl) /= N_Extension_Aggregate then
633 Opt := First (Expressions (Decl));
634 while Present (Opt) loop
636 -- Currently the only simple option allowed is External
638 if Nkind (Opt) = N_Identifier
639 and then Chars (Opt) = Name_External
640 and then Chars (Opt) = Option_Nam
648 -- Complex options with various specifiers
650 Opt := First (Component_Associations (Decl));
651 while Present (Opt) loop
652 Opt_Nam := First (Choices (Opt));
654 if Nkind (Opt_Nam) = N_Identifier
655 and then Chars (Opt_Nam) = Option_Nam
666 --------------------------------
667 -- Attribute Access Functions --
668 --------------------------------
670 function Abstract_States (Id : E) return L is
672 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
676 function Accept_Address (Id : E) return L is
681 function Access_Disp_Table (Id : E) return L is
683 pragma Assert (Ekind_In (Id, E_Record_Type,
685 return Elist16 (Implementation_Base_Type (Id));
686 end Access_Disp_Table;
688 function Actual_Subtype (Id : E) return E is
691 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
692 or else Is_Formal (Id));
696 function Address_Taken (Id : E) return B is
701 function Alias (Id : E) return E is
704 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
708 function Alignment (Id : E) return U is
710 pragma Assert (Is_Type (Id)
711 or else Is_Formal (Id)
712 or else Ekind_In (Id, E_Loop_Parameter,
719 function Associated_Formal_Package (Id : E) return E is
721 pragma Assert (Ekind (Id) = E_Package);
723 end Associated_Formal_Package;
725 function Associated_Node_For_Itype (Id : E) return N is
728 end Associated_Node_For_Itype;
730 function Associated_Storage_Pool (Id : E) return E is
732 pragma Assert (Is_Access_Type (Id));
733 return Node22 (Root_Type (Id));
734 end Associated_Storage_Pool;
736 function Barrier_Function (Id : E) return N is
738 pragma Assert (Is_Entry (Id));
740 end Barrier_Function;
742 function Block_Node (Id : E) return N is
744 pragma Assert (Ekind (Id) = E_Block);
748 function Body_Entity (Id : E) return E is
750 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
754 function Body_Needed_For_SAL (Id : E) return B is
757 (Ekind (Id) = E_Package
758 or else Is_Subprogram (Id)
759 or else Is_Generic_Unit (Id));
761 end Body_Needed_For_SAL;
763 function Body_References (Id : E) return L is
765 pragma Assert (Ekind (Id) = E_Abstract_State);
769 function C_Pass_By_Copy (Id : E) return B is
771 pragma Assert (Is_Record_Type (Id));
772 return Flag125 (Implementation_Base_Type (Id));
775 function Can_Never_Be_Null (Id : E) return B is
778 end Can_Never_Be_Null;
780 function Checks_May_Be_Suppressed (Id : E) return B is
783 end Checks_May_Be_Suppressed;
785 function Class_Wide_Type (Id : E) return E is
787 pragma Assert (Is_Type (Id));
791 function Cloned_Subtype (Id : E) return E is
793 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
797 function Component_Bit_Offset (Id : E) return U is
799 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
801 end Component_Bit_Offset;
803 function Component_Clause (Id : E) return N is
805 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
807 end Component_Clause;
809 function Component_Size (Id : E) return U is
811 pragma Assert (Is_Array_Type (Id));
812 return Uint22 (Implementation_Base_Type (Id));
815 function Component_Type (Id : E) return E is
817 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
818 return Node20 (Implementation_Base_Type (Id));
821 function Corresponding_Concurrent_Type (Id : E) return E is
823 pragma Assert (Ekind (Id) = E_Record_Type);
825 end Corresponding_Concurrent_Type;
827 function Corresponding_Discriminant (Id : E) return E is
829 pragma Assert (Ekind (Id) = E_Discriminant);
831 end Corresponding_Discriminant;
833 function Corresponding_Equality (Id : E) return E is
836 (Ekind (Id) = E_Function
837 and then not Comes_From_Source (Id)
838 and then Chars (Id) = Name_Op_Ne);
840 end Corresponding_Equality;
842 function Corresponding_Protected_Entry (Id : E) return E is
844 pragma Assert (Ekind (Id) = E_Subprogram_Body);
846 end Corresponding_Protected_Entry;
848 function Corresponding_Record_Type (Id : E) return E is
850 pragma Assert (Is_Concurrent_Type (Id));
852 end Corresponding_Record_Type;
854 function Corresponding_Remote_Type (Id : E) return E is
857 end Corresponding_Remote_Type;
859 function Current_Use_Clause (Id : E) return E is
861 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
863 end Current_Use_Clause;
865 function Current_Value (Id : E) return N is
867 pragma Assert (Ekind (Id) in Object_Kind);
871 function CR_Discriminant (Id : E) return E is
876 function Debug_Info_Off (Id : E) return B is
881 function Debug_Renaming_Link (Id : E) return E is
884 end Debug_Renaming_Link;
886 function Default_Aspect_Component_Value (Id : E) return N is
888 pragma Assert (Is_Array_Type (Id));
889 return Node19 (Base_Type (Id));
890 end Default_Aspect_Component_Value;
892 function Default_Aspect_Value (Id : E) return N is
894 pragma Assert (Is_Scalar_Type (Id));
895 return Node19 (Base_Type (Id));
896 end Default_Aspect_Value;
898 function Default_Expr_Function (Id : E) return E is
900 pragma Assert (Is_Formal (Id));
902 end Default_Expr_Function;
904 function Default_Expressions_Processed (Id : E) return B is
907 end Default_Expressions_Processed;
909 function Default_Value (Id : E) return N is
911 pragma Assert (Is_Formal (Id));
915 function Delay_Cleanups (Id : E) return B is
920 function Delay_Subprogram_Descriptors (Id : E) return B is
923 end Delay_Subprogram_Descriptors;
925 function Delta_Value (Id : E) return R is
927 pragma Assert (Is_Fixed_Point_Type (Id));
931 function Dependent_Instances (Id : E) return L is
933 pragma Assert (Is_Generic_Instance (Id));
935 end Dependent_Instances;
937 function Depends_On_Private (Id : E) return B is
939 pragma Assert (Nkind (Id) in N_Entity);
941 end Depends_On_Private;
943 function Digits_Value (Id : E) return U is
946 (Is_Floating_Point_Type (Id)
947 or else Is_Decimal_Fixed_Point_Type (Id));
951 function Direct_Primitive_Operations (Id : E) return L is
953 pragma Assert (Is_Tagged_Type (Id));
955 end Direct_Primitive_Operations;
957 function Directly_Designated_Type (Id : E) return E is
959 pragma Assert (Is_Access_Type (Id));
961 end Directly_Designated_Type;
963 function Discard_Names (Id : E) return B is
968 function Discriminal (Id : E) return E is
970 pragma Assert (Ekind (Id) = E_Discriminant);
974 function Discriminal_Link (Id : E) return N is
977 end Discriminal_Link;
979 function Discriminant_Checking_Func (Id : E) return E is
981 pragma Assert (Ekind (Id) = E_Component);
983 end Discriminant_Checking_Func;
985 function Discriminant_Constraint (Id : E) return L is
987 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
989 end Discriminant_Constraint;
991 function Discriminant_Default_Value (Id : E) return N is
993 pragma Assert (Ekind (Id) = E_Discriminant);
995 end Discriminant_Default_Value;
997 function Discriminant_Number (Id : E) return U is
999 pragma Assert (Ekind (Id) = E_Discriminant);
1001 end Discriminant_Number;
1003 function Dispatch_Table_Wrappers (Id : E) return L is
1005 pragma Assert (Ekind_In (Id, E_Record_Type,
1007 return Elist26 (Implementation_Base_Type (Id));
1008 end Dispatch_Table_Wrappers;
1010 function DT_Entry_Count (Id : E) return U is
1012 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1016 function DT_Offset_To_Top_Func (Id : E) return E is
1018 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1020 end DT_Offset_To_Top_Func;
1022 function DT_Position (Id : E) return U is
1024 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
1025 and then Present (DTC_Entity (Id)));
1029 function DTC_Entity (Id : E) return E is
1031 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1035 function Elaborate_Body_Desirable (Id : E) return B is
1037 pragma Assert (Ekind (Id) = E_Package);
1038 return Flag210 (Id);
1039 end Elaborate_Body_Desirable;
1041 function Elaboration_Entity (Id : E) return E is
1046 Ekind (Id) = E_Package
1048 Is_Generic_Unit (Id));
1050 end Elaboration_Entity;
1052 function Elaboration_Entity_Required (Id : E) return B is
1057 Ekind (Id) = E_Package
1059 Is_Generic_Unit (Id));
1060 return Flag174 (Id);
1061 end Elaboration_Entity_Required;
1063 function Encapsulating_State (Id : E) return N is
1065 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
1067 end Encapsulating_State;
1069 function Enclosing_Scope (Id : E) return E is
1072 end Enclosing_Scope;
1074 function Entry_Accepted (Id : E) return B is
1076 pragma Assert (Is_Entry (Id));
1077 return Flag152 (Id);
1080 function Entry_Bodies_Array (Id : E) return E is
1083 end Entry_Bodies_Array;
1085 function Entry_Cancel_Parameter (Id : E) return E is
1088 end Entry_Cancel_Parameter;
1090 function Entry_Component (Id : E) return E is
1093 end Entry_Component;
1095 function Entry_Formal (Id : E) return E is
1100 function Entry_Index_Constant (Id : E) return N is
1102 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
1104 end Entry_Index_Constant;
1106 function Contract (Id : E) return N is
1109 (Ekind_In (Id, E_Entry,
1116 or else Is_Generic_Subprogram (Id)
1117 or else Is_Subprogram (Id));
1121 function Entry_Parameters_Type (Id : E) return E is
1124 end Entry_Parameters_Type;
1126 function Enum_Pos_To_Rep (Id : E) return E is
1128 pragma Assert (Ekind (Id) = E_Enumeration_Type);
1130 end Enum_Pos_To_Rep;
1132 function Enumeration_Pos (Id : E) return Uint is
1134 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1136 end Enumeration_Pos;
1138 function Enumeration_Rep (Id : E) return U is
1140 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1142 end Enumeration_Rep;
1144 function Enumeration_Rep_Expr (Id : E) return N is
1146 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1148 end Enumeration_Rep_Expr;
1150 function Equivalent_Type (Id : E) return E is
1153 (Ekind_In (Id, E_Class_Wide_Type,
1154 E_Class_Wide_Subtype,
1155 E_Access_Subprogram_Type,
1156 E_Access_Protected_Subprogram_Type,
1157 E_Anonymous_Access_Protected_Subprogram_Type,
1158 E_Access_Subprogram_Type,
1161 end Equivalent_Type;
1163 function Esize (Id : E) return Uint is
1168 function Exception_Code (Id : E) return Uint is
1170 pragma Assert (Ekind (Id) = E_Exception);
1174 function Extra_Accessibility (Id : E) return E is
1177 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
1179 end Extra_Accessibility;
1181 function Extra_Accessibility_Of_Result (Id : E) return E is
1183 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
1185 end Extra_Accessibility_Of_Result;
1187 function Extra_Constrained (Id : E) return E is
1189 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1191 end Extra_Constrained;
1193 function Extra_Formal (Id : E) return E is
1198 function Extra_Formals (Id : E) return E is
1201 (Is_Overloadable (Id)
1202 or else Ekind_In (Id, E_Entry_Family,
1204 E_Subprogram_Type));
1208 function Can_Use_Internal_Rep (Id : E) return B is
1210 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1211 return Flag229 (Base_Type (Id));
1212 end Can_Use_Internal_Rep;
1214 function Finalization_Master (Id : E) return E is
1216 pragma Assert (Is_Access_Type (Id));
1217 return Node23 (Root_Type (Id));
1218 end Finalization_Master;
1220 function Finalize_Storage_Only (Id : E) return B is
1222 pragma Assert (Is_Type (Id));
1223 return Flag158 (Base_Type (Id));
1224 end Finalize_Storage_Only;
1226 function Finalizer (Id : E) return E is
1228 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
1232 function First_Entity (Id : E) return E is
1237 function First_Exit_Statement (Id : E) return N is
1239 pragma Assert (Ekind (Id) = E_Loop);
1241 end First_Exit_Statement;
1243 function First_Index (Id : E) return N is
1245 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1249 function First_Literal (Id : E) return E is
1251 pragma Assert (Is_Enumeration_Type (Id));
1255 function First_Optional_Parameter (Id : E) return E is
1257 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1259 end First_Optional_Parameter;
1261 function First_Private_Entity (Id : E) return E is
1263 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1264 or else Ekind (Id) in Concurrent_Kind);
1266 end First_Private_Entity;
1268 function First_Rep_Item (Id : E) return E is
1273 function Freeze_Node (Id : E) return N is
1278 function From_Limited_With (Id : E) return B is
1280 return Flag159 (Id);
1281 end From_Limited_With;
1283 function Full_View (Id : E) return E is
1285 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1289 function Generic_Homonym (Id : E) return E is
1291 pragma Assert (Ekind (Id) = E_Generic_Package);
1293 end Generic_Homonym;
1295 function Generic_Renamings (Id : E) return L is
1297 return Elist23 (Id);
1298 end Generic_Renamings;
1300 function Handler_Records (Id : E) return S is
1303 end Handler_Records;
1305 function Has_Aliased_Components (Id : E) return B is
1307 return Flag135 (Implementation_Base_Type (Id));
1308 end Has_Aliased_Components;
1310 function Has_Alignment_Clause (Id : E) return B is
1313 end Has_Alignment_Clause;
1315 function Has_All_Calls_Remote (Id : E) return B is
1318 end Has_All_Calls_Remote;
1320 function Has_Anonymous_Master (Id : E) return B is
1323 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
1324 return Flag253 (Id);
1325 end Has_Anonymous_Master;
1327 function Has_Atomic_Components (Id : E) return B is
1329 return Flag86 (Implementation_Base_Type (Id));
1330 end Has_Atomic_Components;
1332 function Has_Biased_Representation (Id : E) return B is
1334 return Flag139 (Id);
1335 end Has_Biased_Representation;
1337 function Has_Completion (Id : E) return B is
1342 function Has_Completion_In_Body (Id : E) return B is
1344 pragma Assert (Is_Type (Id));
1346 end Has_Completion_In_Body;
1348 function Has_Complex_Representation (Id : E) return B is
1350 pragma Assert (Is_Type (Id));
1351 return Flag140 (Implementation_Base_Type (Id));
1352 end Has_Complex_Representation;
1354 function Has_Component_Size_Clause (Id : E) return B is
1356 pragma Assert (Is_Array_Type (Id));
1357 return Flag68 (Implementation_Base_Type (Id));
1358 end Has_Component_Size_Clause;
1360 function Has_Constrained_Partial_View (Id : E) return B is
1362 pragma Assert (Is_Type (Id));
1363 return Flag187 (Id);
1364 end Has_Constrained_Partial_View;
1366 function Has_Controlled_Component (Id : E) return B is
1368 return Flag43 (Base_Type (Id));
1369 end Has_Controlled_Component;
1371 function Has_Contiguous_Rep (Id : E) return B is
1373 return Flag181 (Id);
1374 end Has_Contiguous_Rep;
1376 function Has_Controlling_Result (Id : E) return B is
1379 end Has_Controlling_Result;
1381 function Has_Convention_Pragma (Id : E) return B is
1383 return Flag119 (Id);
1384 end Has_Convention_Pragma;
1386 function Has_Default_Aspect (Id : E) return B is
1388 return Flag39 (Base_Type (Id));
1389 end Has_Default_Aspect;
1391 function Has_Delayed_Aspects (Id : E) return B is
1393 pragma Assert (Nkind (Id) in N_Entity);
1394 return Flag200 (Id);
1395 end Has_Delayed_Aspects;
1397 function Has_Delayed_Freeze (Id : E) return B is
1399 pragma Assert (Nkind (Id) in N_Entity);
1401 end Has_Delayed_Freeze;
1403 function Has_Delayed_Rep_Aspects (Id : E) return B is
1405 pragma Assert (Nkind (Id) in N_Entity);
1406 return Flag261 (Id);
1407 end Has_Delayed_Rep_Aspects;
1409 function Has_Discriminants (Id : E) return B is
1411 pragma Assert (Nkind (Id) in N_Entity);
1413 end Has_Discriminants;
1415 function Has_Dispatch_Table (Id : E) return B is
1417 pragma Assert (Is_Tagged_Type (Id));
1418 return Flag220 (Id);
1419 end Has_Dispatch_Table;
1421 function Has_Dynamic_Predicate_Aspect (Id : E) return B is
1423 pragma Assert (Is_Type (Id));
1424 return Flag258 (Id);
1425 end Has_Dynamic_Predicate_Aspect;
1427 function Has_Enumeration_Rep_Clause (Id : E) return B is
1429 pragma Assert (Is_Enumeration_Type (Id));
1431 end Has_Enumeration_Rep_Clause;
1433 function Has_Exit (Id : E) return B is
1438 function Has_External_Tag_Rep_Clause (Id : E) return B is
1440 pragma Assert (Is_Tagged_Type (Id));
1441 return Flag110 (Id);
1442 end Has_External_Tag_Rep_Clause;
1444 function Has_Forward_Instantiation (Id : E) return B is
1446 return Flag175 (Id);
1447 end Has_Forward_Instantiation;
1449 function Has_Fully_Qualified_Name (Id : E) return B is
1451 return Flag173 (Id);
1452 end Has_Fully_Qualified_Name;
1454 function Has_Gigi_Rep_Item (Id : E) return B is
1457 end Has_Gigi_Rep_Item;
1459 function Has_Homonym (Id : E) return B is
1464 function Has_Implicit_Dereference (Id : E) return B is
1466 return Flag251 (Id);
1467 end Has_Implicit_Dereference;
1469 function Has_Independent_Components (Id : E) return B is
1471 pragma Assert (Is_Object (Id) or else Is_Type (Id));
1473 end Has_Independent_Components;
1475 function Has_Inheritable_Invariants (Id : E) return B is
1477 pragma Assert (Is_Type (Id));
1478 return Flag248 (Id);
1479 end Has_Inheritable_Invariants;
1481 function Has_Initial_Value (Id : E) return B is
1483 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1484 return Flag219 (Id);
1485 end Has_Initial_Value;
1487 function Has_Invariants (Id : E) return B is
1489 pragma Assert (Is_Type (Id));
1490 return Flag232 (Id);
1493 function Has_Loop_Entry_Attributes (Id : E) return B is
1495 pragma Assert (Ekind (Id) = E_Loop);
1496 return Flag260 (Id);
1497 end Has_Loop_Entry_Attributes;
1499 function Has_Machine_Radix_Clause (Id : E) return B is
1501 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1503 end Has_Machine_Radix_Clause;
1505 function Has_Master_Entity (Id : E) return B is
1508 end Has_Master_Entity;
1510 function Has_Missing_Return (Id : E) return B is
1512 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1513 return Flag142 (Id);
1514 end Has_Missing_Return;
1516 function Has_Nested_Block_With_Handler (Id : E) return B is
1518 return Flag101 (Id);
1519 end Has_Nested_Block_With_Handler;
1521 function Has_Non_Standard_Rep (Id : E) return B is
1523 return Flag75 (Implementation_Base_Type (Id));
1524 end Has_Non_Standard_Rep;
1526 function Has_Object_Size_Clause (Id : E) return B is
1528 pragma Assert (Is_Type (Id));
1529 return Flag172 (Id);
1530 end Has_Object_Size_Clause;
1532 function Has_Per_Object_Constraint (Id : E) return B is
1534 return Flag154 (Id);
1535 end Has_Per_Object_Constraint;
1537 function Has_Postconditions (Id : E) return B is
1539 pragma Assert (Is_Subprogram (Id));
1540 return Flag240 (Id);
1541 end Has_Postconditions;
1543 function Has_Pragma_Controlled (Id : E) return B is
1545 pragma Assert (Is_Access_Type (Id));
1546 return Flag27 (Implementation_Base_Type (Id));
1547 end Has_Pragma_Controlled;
1549 function Has_Pragma_Elaborate_Body (Id : E) return B is
1551 return Flag150 (Id);
1552 end Has_Pragma_Elaborate_Body;
1554 function Has_Pragma_Inline (Id : E) return B is
1556 return Flag157 (Id);
1557 end Has_Pragma_Inline;
1559 function Has_Pragma_Inline_Always (Id : E) return B is
1561 return Flag230 (Id);
1562 end Has_Pragma_Inline_Always;
1564 function Has_Pragma_No_Inline (Id : E) return B is
1566 return Flag201 (Id);
1567 end Has_Pragma_No_Inline;
1569 function Has_Pragma_Ordered (Id : E) return B is
1571 pragma Assert (Is_Enumeration_Type (Id));
1572 return Flag198 (Implementation_Base_Type (Id));
1573 end Has_Pragma_Ordered;
1575 function Has_Pragma_Pack (Id : E) return B is
1577 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1578 return Flag121 (Implementation_Base_Type (Id));
1579 end Has_Pragma_Pack;
1581 function Has_Pragma_Preelab_Init (Id : E) return B is
1583 return Flag221 (Id);
1584 end Has_Pragma_Preelab_Init;
1586 function Has_Pragma_Pure (Id : E) return B is
1588 return Flag203 (Id);
1589 end Has_Pragma_Pure;
1591 function Has_Pragma_Pure_Function (Id : E) return B is
1593 return Flag179 (Id);
1594 end Has_Pragma_Pure_Function;
1596 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1598 return Flag169 (Id);
1599 end Has_Pragma_Thread_Local_Storage;
1601 function Has_Pragma_Unmodified (Id : E) return B is
1603 return Flag233 (Id);
1604 end Has_Pragma_Unmodified;
1606 function Has_Pragma_Unreferenced (Id : E) return B is
1608 return Flag180 (Id);
1609 end Has_Pragma_Unreferenced;
1611 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1613 pragma Assert (Is_Type (Id));
1614 return Flag212 (Id);
1615 end Has_Pragma_Unreferenced_Objects;
1617 function Has_Predicates (Id : E) return B is
1619 pragma Assert (Is_Type (Id));
1620 return Flag250 (Id);
1623 function Has_Primitive_Operations (Id : E) return B is
1625 pragma Assert (Is_Type (Id));
1626 return Flag120 (Base_Type (Id));
1627 end Has_Primitive_Operations;
1629 function Has_Private_Ancestor (Id : E) return B is
1631 return Flag151 (Id);
1632 end Has_Private_Ancestor;
1634 function Has_Private_Declaration (Id : E) return B is
1636 return Flag155 (Id);
1637 end Has_Private_Declaration;
1639 function Has_Qualified_Name (Id : E) return B is
1641 return Flag161 (Id);
1642 end Has_Qualified_Name;
1644 function Has_RACW (Id : E) return B is
1646 pragma Assert (Ekind (Id) = E_Package);
1647 return Flag214 (Id);
1650 function Has_Record_Rep_Clause (Id : E) return B is
1652 pragma Assert (Is_Record_Type (Id));
1653 return Flag65 (Implementation_Base_Type (Id));
1654 end Has_Record_Rep_Clause;
1656 function Has_Recursive_Call (Id : E) return B is
1658 pragma Assert (Is_Subprogram (Id));
1659 return Flag143 (Id);
1660 end Has_Recursive_Call;
1662 function Has_Size_Clause (Id : E) return B is
1665 end Has_Size_Clause;
1667 function Has_Small_Clause (Id : E) return B is
1670 end Has_Small_Clause;
1672 function Has_Specified_Layout (Id : E) return B is
1674 pragma Assert (Is_Type (Id));
1675 return Flag100 (Implementation_Base_Type (Id));
1676 end Has_Specified_Layout;
1678 function Has_Specified_Stream_Input (Id : E) return B is
1680 pragma Assert (Is_Type (Id));
1681 return Flag190 (Id);
1682 end Has_Specified_Stream_Input;
1684 function Has_Specified_Stream_Output (Id : E) return B is
1686 pragma Assert (Is_Type (Id));
1687 return Flag191 (Id);
1688 end Has_Specified_Stream_Output;
1690 function Has_Specified_Stream_Read (Id : E) return B is
1692 pragma Assert (Is_Type (Id));
1693 return Flag192 (Id);
1694 end Has_Specified_Stream_Read;
1696 function Has_Specified_Stream_Write (Id : E) return B is
1698 pragma Assert (Is_Type (Id));
1699 return Flag193 (Id);
1700 end Has_Specified_Stream_Write;
1702 function Has_Static_Discriminants (Id : E) return B is
1704 pragma Assert (Is_Type (Id));
1705 return Flag211 (Id);
1706 end Has_Static_Discriminants;
1708 function Has_Static_Predicate_Aspect (Id : E) return B is
1710 pragma Assert (Is_Type (Id));
1711 return Flag259 (Id);
1712 end Has_Static_Predicate_Aspect;
1714 function Has_Storage_Size_Clause (Id : E) return B is
1716 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1717 return Flag23 (Implementation_Base_Type (Id));
1718 end Has_Storage_Size_Clause;
1720 function Has_Stream_Size_Clause (Id : E) return B is
1722 return Flag184 (Id);
1723 end Has_Stream_Size_Clause;
1725 function Has_Task (Id : E) return B is
1727 return Flag30 (Base_Type (Id));
1730 function Has_Thunks (Id : E) return B is
1732 return Flag228 (Id);
1735 function Has_Unchecked_Union (Id : E) return B is
1737 return Flag123 (Base_Type (Id));
1738 end Has_Unchecked_Union;
1740 function Has_Unknown_Discriminants (Id : E) return B is
1742 pragma Assert (Is_Type (Id));
1744 end Has_Unknown_Discriminants;
1746 function Has_Up_Level_Access (Id : E) return B is
1749 (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
1750 return Flag215 (Id);
1751 end Has_Up_Level_Access;
1753 function Has_Visible_Refinement (Id : E) return B is
1755 pragma Assert (Ekind (Id) = E_Abstract_State);
1756 return Flag263 (Id);
1757 end Has_Visible_Refinement;
1759 function Has_Volatile_Components (Id : E) return B is
1761 return Flag87 (Implementation_Base_Type (Id));
1762 end Has_Volatile_Components;
1764 function Has_Xref_Entry (Id : E) return B is
1766 return Flag182 (Id);
1769 function Hiding_Loop_Variable (Id : E) return E is
1771 pragma Assert (Ekind (Id) = E_Variable);
1773 end Hiding_Loop_Variable;
1775 function Homonym (Id : E) return E is
1780 function Interface_Alias (Id : E) return E is
1782 pragma Assert (Is_Subprogram (Id));
1784 end Interface_Alias;
1786 function Interfaces (Id : E) return L is
1788 pragma Assert (Is_Record_Type (Id));
1789 return Elist25 (Id);
1792 function In_Package_Body (Id : E) return B is
1795 end In_Package_Body;
1797 function In_Private_Part (Id : E) return B is
1800 end In_Private_Part;
1802 function In_Use (Id : E) return B is
1804 pragma Assert (Nkind (Id) in N_Entity);
1808 function Initialization_Statements (Id : E) return N is
1810 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
1812 end Initialization_Statements;
1814 function Inner_Instances (Id : E) return L is
1816 return Elist23 (Id);
1817 end Inner_Instances;
1819 function Interface_Name (Id : E) return N is
1824 function Is_Abstract_Subprogram (Id : E) return B is
1826 pragma Assert (Is_Overloadable (Id));
1828 end Is_Abstract_Subprogram;
1830 function Is_Abstract_Type (Id : E) return B is
1832 pragma Assert (Is_Type (Id));
1833 return Flag146 (Id);
1834 end Is_Abstract_Type;
1836 function Is_Local_Anonymous_Access (Id : E) return B is
1838 pragma Assert (Is_Access_Type (Id));
1839 return Flag194 (Id);
1840 end Is_Local_Anonymous_Access;
1842 function Is_Access_Constant (Id : E) return B is
1844 pragma Assert (Is_Access_Type (Id));
1846 end Is_Access_Constant;
1848 function Is_Ada_2005_Only (Id : E) return B is
1850 return Flag185 (Id);
1851 end Is_Ada_2005_Only;
1853 function Is_Ada_2012_Only (Id : E) return B is
1855 return Flag199 (Id);
1856 end Is_Ada_2012_Only;
1858 function Is_Aliased (Id : E) return B is
1860 pragma Assert (Nkind (Id) in N_Entity);
1864 function Is_AST_Entry (Id : E) return B is
1866 pragma Assert (Is_Entry (Id));
1867 return Flag132 (Id);
1870 function Is_Asynchronous (Id : E) return B is
1872 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1874 end Is_Asynchronous;
1876 function Is_Atomic (Id : E) return B is
1881 function Is_Bit_Packed_Array (Id : E) return B is
1883 return Flag122 (Implementation_Base_Type (Id));
1884 end Is_Bit_Packed_Array;
1886 function Is_Called (Id : E) return B is
1888 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1889 return Flag102 (Id);
1892 function Is_Character_Type (Id : E) return B is
1895 end Is_Character_Type;
1897 function Is_Child_Unit (Id : E) return B is
1902 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1905 end Is_Class_Wide_Equivalent_Type;
1907 function Is_Compilation_Unit (Id : E) return B is
1909 return Flag149 (Id);
1910 end Is_Compilation_Unit;
1912 function Is_Completely_Hidden (Id : E) return B is
1914 pragma Assert (Ekind (Id) = E_Discriminant);
1915 return Flag103 (Id);
1916 end Is_Completely_Hidden;
1918 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1921 end Is_Constr_Subt_For_U_Nominal;
1923 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1925 return Flag141 (Id);
1926 end Is_Constr_Subt_For_UN_Aliased;
1928 function Is_Constrained (Id : E) return B is
1930 pragma Assert (Nkind (Id) in N_Entity);
1934 function Is_Constructor (Id : E) return B is
1939 function Is_Controlled (Id : E) return B is
1941 return Flag42 (Base_Type (Id));
1944 function Is_Controlling_Formal (Id : E) return B is
1946 pragma Assert (Is_Formal (Id));
1948 end Is_Controlling_Formal;
1950 function Is_CPP_Class (Id : E) return B is
1955 function Is_Descendent_Of_Address (Id : E) return B is
1957 return Flag223 (Id);
1958 end Is_Descendent_Of_Address;
1960 function Is_Discrim_SO_Function (Id : E) return B is
1962 return Flag176 (Id);
1963 end Is_Discrim_SO_Function;
1965 function Is_Dispatch_Table_Entity (Id : E) return B is
1967 return Flag234 (Id);
1968 end Is_Dispatch_Table_Entity;
1970 function Is_Dispatching_Operation (Id : E) return B is
1972 pragma Assert (Nkind (Id) in N_Entity);
1974 end Is_Dispatching_Operation;
1976 function Is_Eliminated (Id : E) return B is
1978 return Flag124 (Id);
1981 function Is_Entry_Formal (Id : E) return B is
1984 end Is_Entry_Formal;
1986 function Is_Exported (Id : E) return B is
1991 function Is_First_Subtype (Id : E) return B is
1994 end Is_First_Subtype;
1996 function Is_For_Access_Subtype (Id : E) return B is
1998 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
1999 return Flag118 (Id);
2000 end Is_For_Access_Subtype;
2002 function Is_Formal_Subprogram (Id : E) return B is
2004 return Flag111 (Id);
2005 end Is_Formal_Subprogram;
2007 function Is_Frozen (Id : E) return B is
2012 function Is_Generic_Actual_Type (Id : E) return B is
2014 pragma Assert (Is_Type (Id));
2016 end Is_Generic_Actual_Type;
2018 function Is_Generic_Instance (Id : E) return B is
2020 return Flag130 (Id);
2021 end Is_Generic_Instance;
2023 function Is_Generic_Type (Id : E) return B is
2025 pragma Assert (Nkind (Id) in N_Entity);
2027 end Is_Generic_Type;
2029 function Is_Hidden (Id : E) return B is
2034 function Is_Hidden_Open_Scope (Id : E) return B is
2036 return Flag171 (Id);
2037 end Is_Hidden_Open_Scope;
2039 function Is_Immediately_Visible (Id : E) return B is
2041 pragma Assert (Nkind (Id) in N_Entity);
2043 end Is_Immediately_Visible;
2045 function Is_Implementation_Defined (Id : E) return B is
2047 return Flag254 (Id);
2048 end Is_Implementation_Defined;
2050 function Is_Imported (Id : E) return B is
2055 function Is_Inlined (Id : E) return B is
2060 function Is_Interface (Id : E) return B is
2062 return Flag186 (Id);
2065 function Is_Instantiated (Id : E) return B is
2067 return Flag126 (Id);
2068 end Is_Instantiated;
2070 function Is_Internal (Id : E) return B is
2072 pragma Assert (Nkind (Id) in N_Entity);
2076 function Is_Interrupt_Handler (Id : E) return B is
2078 pragma Assert (Nkind (Id) in N_Entity);
2080 end Is_Interrupt_Handler;
2082 function Is_Intrinsic_Subprogram (Id : E) return B is
2085 end Is_Intrinsic_Subprogram;
2087 function Is_Invariant_Procedure (Id : E) return B is
2089 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2090 return Flag257 (Id);
2091 end Is_Invariant_Procedure;
2093 function Is_Itype (Id : E) return B is
2098 function Is_Known_Non_Null (Id : E) return B is
2101 end Is_Known_Non_Null;
2103 function Is_Known_Null (Id : E) return B is
2105 return Flag204 (Id);
2108 function Is_Known_Valid (Id : E) return B is
2110 return Flag170 (Id);
2113 function Is_Limited_Composite (Id : E) return B is
2115 return Flag106 (Id);
2116 end Is_Limited_Composite;
2118 function Is_Limited_Interface (Id : E) return B is
2120 return Flag197 (Id);
2121 end Is_Limited_Interface;
2123 function Is_Limited_Record (Id : E) return B is
2126 end Is_Limited_Record;
2128 function Is_Machine_Code_Subprogram (Id : E) return B is
2130 pragma Assert (Is_Subprogram (Id));
2131 return Flag137 (Id);
2132 end Is_Machine_Code_Subprogram;
2134 function Is_Non_Static_Subtype (Id : E) return B is
2136 pragma Assert (Is_Type (Id));
2137 return Flag109 (Id);
2138 end Is_Non_Static_Subtype;
2140 function Is_Null_Init_Proc (Id : E) return B is
2142 pragma Assert (Ekind (Id) = E_Procedure);
2143 return Flag178 (Id);
2144 end Is_Null_Init_Proc;
2146 function Is_Obsolescent (Id : E) return B is
2148 return Flag153 (Id);
2151 function Is_Only_Out_Parameter (Id : E) return B is
2153 pragma Assert (Is_Formal (Id));
2154 return Flag226 (Id);
2155 end Is_Only_Out_Parameter;
2157 function Is_Optional_Parameter (Id : E) return B is
2159 pragma Assert (Is_Formal (Id));
2160 return Flag134 (Id);
2161 end Is_Optional_Parameter;
2163 function Is_Package_Body_Entity (Id : E) return B is
2165 return Flag160 (Id);
2166 end Is_Package_Body_Entity;
2168 function Is_Packed (Id : E) return B is
2170 return Flag51 (Implementation_Base_Type (Id));
2173 function Is_Packed_Array_Type (Id : E) return B is
2175 return Flag138 (Id);
2176 end Is_Packed_Array_Type;
2178 function Is_Potentially_Use_Visible (Id : E) return B is
2180 pragma Assert (Nkind (Id) in N_Entity);
2182 end Is_Potentially_Use_Visible;
2184 function Is_Predicate_Function (Id : E) return B is
2186 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2187 return Flag255 (Id);
2188 end Is_Predicate_Function;
2190 function Is_Predicate_Function_M (Id : E) return B is
2192 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2193 return Flag256 (Id);
2194 end Is_Predicate_Function_M;
2196 function Is_Preelaborated (Id : E) return B is
2199 end Is_Preelaborated;
2201 function Is_Primitive (Id : E) return B is
2204 (Is_Overloadable (Id)
2205 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
2206 return Flag218 (Id);
2209 function Is_Primitive_Wrapper (Id : E) return B is
2211 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2212 return Flag195 (Id);
2213 end Is_Primitive_Wrapper;
2215 function Is_Private_Composite (Id : E) return B is
2217 pragma Assert (Is_Type (Id));
2218 return Flag107 (Id);
2219 end Is_Private_Composite;
2221 function Is_Private_Descendant (Id : E) return B is
2224 end Is_Private_Descendant;
2226 function Is_Private_Primitive (Id : E) return B is
2228 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2229 return Flag245 (Id);
2230 end Is_Private_Primitive;
2232 function Is_Processed_Transient (Id : E) return B is
2234 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2235 return Flag252 (Id);
2236 end Is_Processed_Transient;
2238 function Is_Public (Id : E) return B is
2240 pragma Assert (Nkind (Id) in N_Entity);
2244 function Is_Pure (Id : E) return B is
2249 function Is_Pure_Unit_Access_Type (Id : E) return B is
2251 pragma Assert (Is_Access_Type (Id));
2252 return Flag189 (Id);
2253 end Is_Pure_Unit_Access_Type;
2255 function Is_RACW_Stub_Type (Id : E) return B is
2257 pragma Assert (Is_Type (Id));
2258 return Flag244 (Id);
2259 end Is_RACW_Stub_Type;
2261 function Is_Raised (Id : E) return B is
2263 pragma Assert (Ekind (Id) = E_Exception);
2264 return Flag224 (Id);
2267 function Is_Remote_Call_Interface (Id : E) return B is
2270 end Is_Remote_Call_Interface;
2272 function Is_Remote_Types (Id : E) return B is
2275 end Is_Remote_Types;
2277 function Is_Renaming_Of_Object (Id : E) return B is
2279 return Flag112 (Id);
2280 end Is_Renaming_Of_Object;
2282 function Is_Return_Object (Id : E) return B is
2284 return Flag209 (Id);
2285 end Is_Return_Object;
2287 function Is_Safe_To_Reevaluate (Id : E) return B is
2289 return Flag249 (Id);
2290 end Is_Safe_To_Reevaluate;
2292 function Is_Shared_Passive (Id : E) return B is
2295 end Is_Shared_Passive;
2297 function Is_Statically_Allocated (Id : E) return B is
2300 end Is_Statically_Allocated;
2302 function Is_Tag (Id : E) return B is
2304 pragma Assert (Nkind (Id) in N_Entity);
2308 function Is_Tagged_Type (Id : E) return B is
2313 function Is_Thunk (Id : E) return B is
2315 return Flag225 (Id);
2318 function Is_Trivial_Subprogram (Id : E) return B is
2320 return Flag235 (Id);
2321 end Is_Trivial_Subprogram;
2323 function Is_True_Constant (Id : E) return B is
2325 return Flag163 (Id);
2326 end Is_True_Constant;
2328 function Is_Unchecked_Union (Id : E) return B is
2330 return Flag117 (Implementation_Base_Type (Id));
2331 end Is_Unchecked_Union;
2333 function Is_Underlying_Record_View (Id : E) return B is
2335 return Flag246 (Id);
2336 end Is_Underlying_Record_View;
2338 function Is_Unsigned_Type (Id : E) return B is
2340 pragma Assert (Is_Type (Id));
2341 return Flag144 (Id);
2342 end Is_Unsigned_Type;
2344 function Is_Valued_Procedure (Id : E) return B is
2346 pragma Assert (Ekind (Id) = E_Procedure);
2347 return Flag127 (Id);
2348 end Is_Valued_Procedure;
2350 function Is_Visible_Formal (Id : E) return B is
2352 return Flag206 (Id);
2353 end Is_Visible_Formal;
2355 function Is_Visible_Lib_Unit (Id : E) return B is
2357 return Flag116 (Id);
2358 end Is_Visible_Lib_Unit;
2360 function Is_VMS_Exception (Id : E) return B is
2362 return Flag133 (Id);
2363 end Is_VMS_Exception;
2365 function Is_Volatile (Id : E) return B is
2367 pragma Assert (Nkind (Id) in N_Entity);
2369 if Is_Type (Id) then
2370 return Flag16 (Base_Type (Id));
2376 function Itype_Printed (Id : E) return B is
2378 pragma Assert (Is_Itype (Id));
2379 return Flag202 (Id);
2382 function Kill_Elaboration_Checks (Id : E) return B is
2385 end Kill_Elaboration_Checks;
2387 function Kill_Range_Checks (Id : E) return B is
2390 end Kill_Range_Checks;
2392 function Known_To_Have_Preelab_Init (Id : E) return B is
2394 pragma Assert (Is_Type (Id));
2395 return Flag207 (Id);
2396 end Known_To_Have_Preelab_Init;
2398 function Last_Assignment (Id : E) return N is
2400 pragma Assert (Is_Assignable (Id));
2402 end Last_Assignment;
2404 function Last_Entity (Id : E) return E is
2409 function Limited_View (Id : E) return E is
2411 pragma Assert (Ekind (Id) = E_Package);
2415 function Linker_Section_Pragma (Id : E) return N is
2418 (Is_Type (Id) or else Is_Object (Id) or else Is_Subprogram (Id));
2420 end Linker_Section_Pragma;
2422 function Lit_Indexes (Id : E) return E is
2424 pragma Assert (Is_Enumeration_Type (Id));
2428 function Lit_Strings (Id : E) return E is
2430 pragma Assert (Is_Enumeration_Type (Id));
2434 function Low_Bound_Tested (Id : E) return B is
2436 return Flag205 (Id);
2437 end Low_Bound_Tested;
2439 function Machine_Radix_10 (Id : E) return B is
2441 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2443 end Machine_Radix_10;
2445 function Master_Id (Id : E) return E is
2447 pragma Assert (Is_Access_Type (Id));
2451 function Materialize_Entity (Id : E) return B is
2453 return Flag168 (Id);
2454 end Materialize_Entity;
2456 function May_Inherit_Delayed_Rep_Aspects (Id : E) return B is
2458 return Flag262 (Id);
2459 end May_Inherit_Delayed_Rep_Aspects;
2461 function Mechanism (Id : E) return M is
2463 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2464 return UI_To_Int (Uint8 (Id));
2467 function Modulus (Id : E) return Uint is
2469 pragma Assert (Is_Modular_Integer_Type (Id));
2470 return Uint17 (Base_Type (Id));
2473 function Must_Be_On_Byte_Boundary (Id : E) return B is
2475 pragma Assert (Is_Type (Id));
2476 return Flag183 (Id);
2477 end Must_Be_On_Byte_Boundary;
2479 function Must_Have_Preelab_Init (Id : E) return B is
2481 pragma Assert (Is_Type (Id));
2482 return Flag208 (Id);
2483 end Must_Have_Preelab_Init;
2485 function Needs_Debug_Info (Id : E) return B is
2487 return Flag147 (Id);
2488 end Needs_Debug_Info;
2490 function Needs_No_Actuals (Id : E) return B is
2493 (Is_Overloadable (Id)
2494 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2496 end Needs_No_Actuals;
2498 function Never_Set_In_Source (Id : E) return B is
2500 return Flag115 (Id);
2501 end Never_Set_In_Source;
2503 function Next_Inlined_Subprogram (Id : E) return E is
2506 end Next_Inlined_Subprogram;
2508 function No_Pool_Assigned (Id : E) return B is
2510 pragma Assert (Is_Access_Type (Id));
2511 return Flag131 (Root_Type (Id));
2512 end No_Pool_Assigned;
2514 function No_Return (Id : E) return B is
2516 return Flag113 (Id);
2519 function No_Strict_Aliasing (Id : E) return B is
2521 pragma Assert (Is_Access_Type (Id));
2522 return Flag136 (Base_Type (Id));
2523 end No_Strict_Aliasing;
2525 function Non_Binary_Modulus (Id : E) return B is
2527 pragma Assert (Is_Type (Id));
2528 return Flag58 (Base_Type (Id));
2529 end Non_Binary_Modulus;
2531 function Non_Limited_View (Id : E) return E is
2534 (Ekind (Id) in Incomplete_Kind or else Ekind (Id) = E_Abstract_State);
2536 end Non_Limited_View;
2538 function Nonzero_Is_True (Id : E) return B is
2540 pragma Assert (Root_Type (Id) = Standard_Boolean);
2541 return Flag162 (Base_Type (Id));
2542 end Nonzero_Is_True;
2544 function Normalized_First_Bit (Id : E) return U is
2546 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2548 end Normalized_First_Bit;
2550 function Normalized_Position (Id : E) return U is
2552 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2554 end Normalized_Position;
2556 function Normalized_Position_Max (Id : E) return U is
2558 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2560 end Normalized_Position_Max;
2562 function OK_To_Rename (Id : E) return B is
2564 pragma Assert (Ekind (Id) = E_Variable);
2565 return Flag247 (Id);
2568 function OK_To_Reorder_Components (Id : E) return B is
2570 pragma Assert (Is_Record_Type (Id));
2571 return Flag239 (Base_Type (Id));
2572 end OK_To_Reorder_Components;
2574 function Optimize_Alignment_Space (Id : E) return B is
2577 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2578 return Flag241 (Id);
2579 end Optimize_Alignment_Space;
2581 function Optimize_Alignment_Time (Id : E) return B is
2584 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2585 return Flag242 (Id);
2586 end Optimize_Alignment_Time;
2588 function Original_Access_Type (Id : E) return E is
2590 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2592 end Original_Access_Type;
2594 function Original_Array_Type (Id : E) return E is
2596 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2598 end Original_Array_Type;
2600 function Original_Record_Component (Id : E) return E is
2602 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2604 end Original_Record_Component;
2606 function Overlays_Constant (Id : E) return B is
2608 return Flag243 (Id);
2609 end Overlays_Constant;
2611 function Overridden_Operation (Id : E) return E is
2614 end Overridden_Operation;
2616 function Package_Instantiation (Id : E) return N is
2618 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2620 end Package_Instantiation;
2622 function Packed_Array_Type (Id : E) return E is
2624 pragma Assert (Is_Array_Type (Id));
2626 end Packed_Array_Type;
2628 function Parent_Subtype (Id : E) return E is
2630 pragma Assert (Is_Record_Type (Id));
2631 return Node19 (Base_Type (Id));
2634 function Part_Of_Constituents (Id : E) return L is
2636 pragma Assert (Ekind (Id) = E_Abstract_State);
2638 end Part_Of_Constituents;
2640 function Postcondition_Proc (Id : E) return E is
2642 pragma Assert (Ekind (Id) = E_Procedure);
2644 end Postcondition_Proc;
2646 function PPC_Wrapper (Id : E) return E is
2648 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2652 function Prival (Id : E) return E is
2654 pragma Assert (Is_Protected_Component (Id));
2658 function Prival_Link (Id : E) return E is
2660 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2664 function Private_Dependents (Id : E) return L is
2666 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2667 return Elist18 (Id);
2668 end Private_Dependents;
2670 function Private_View (Id : E) return N is
2672 pragma Assert (Is_Private_Type (Id));
2676 function Protected_Body_Subprogram (Id : E) return E is
2678 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2680 end Protected_Body_Subprogram;
2682 function Protected_Formal (Id : E) return E is
2684 pragma Assert (Is_Formal (Id));
2686 end Protected_Formal;
2688 function Protection_Object (Id : E) return E is
2691 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2693 end Protection_Object;
2695 function Reachable (Id : E) return B is
2700 function Referenced (Id : E) return B is
2702 return Flag156 (Id);
2705 function Referenced_As_LHS (Id : E) return B is
2708 end Referenced_As_LHS;
2710 function Referenced_As_Out_Parameter (Id : E) return B is
2712 return Flag227 (Id);
2713 end Referenced_As_Out_Parameter;
2715 function Refinement_Constituents (Id : E) return L is
2717 pragma Assert (Ekind (Id) = E_Abstract_State);
2719 end Refinement_Constituents;
2721 function Register_Exception_Call (Id : E) return N is
2723 pragma Assert (Ekind (Id) = E_Exception);
2725 end Register_Exception_Call;
2727 function Related_Array_Object (Id : E) return E is
2729 pragma Assert (Is_Array_Type (Id));
2731 end Related_Array_Object;
2733 function Related_Expression (Id : E) return N is
2735 pragma Assert (Ekind (Id) in Type_Kind
2736 or else Ekind_In (Id, E_Constant, E_Variable));
2738 end Related_Expression;
2740 function Related_Instance (Id : E) return E is
2742 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2744 end Related_Instance;
2746 function Related_Type (Id : E) return E is
2748 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2752 function Relative_Deadline_Variable (Id : E) return E is
2754 pragma Assert (Is_Task_Type (Id));
2755 return Node26 (Implementation_Base_Type (Id));
2756 end Relative_Deadline_Variable;
2758 function Renamed_Entity (Id : E) return N is
2763 function Renamed_In_Spec (Id : E) return B is
2765 pragma Assert (Ekind (Id) = E_Package);
2766 return Flag231 (Id);
2767 end Renamed_In_Spec;
2769 function Renamed_Object (Id : E) return N is
2774 function Renaming_Map (Id : E) return U is
2779 function Requires_Overriding (Id : E) return B is
2781 pragma Assert (Is_Overloadable (Id));
2782 return Flag213 (Id);
2783 end Requires_Overriding;
2785 function Return_Present (Id : E) return B is
2790 function Return_Applies_To (Id : E) return N is
2793 end Return_Applies_To;
2795 function Returns_By_Ref (Id : E) return B is
2800 function Reverse_Bit_Order (Id : E) return B is
2802 pragma Assert (Is_Record_Type (Id));
2803 return Flag164 (Base_Type (Id));
2804 end Reverse_Bit_Order;
2806 function Reverse_Storage_Order (Id : E) return B is
2808 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
2809 return Flag93 (Base_Type (Id));
2810 end Reverse_Storage_Order;
2812 function RM_Size (Id : E) return U is
2814 pragma Assert (Is_Type (Id));
2818 function Scalar_Range (Id : E) return N is
2823 function Scale_Value (Id : E) return U is
2828 function Scope_Depth_Value (Id : E) return U is
2831 end Scope_Depth_Value;
2833 function Sec_Stack_Needed_For_Return (Id : E) return B is
2835 return Flag167 (Id);
2836 end Sec_Stack_Needed_For_Return;
2838 function Shadow_Entities (Id : E) return S is
2840 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2842 end Shadow_Entities;
2844 function Shared_Var_Procs_Instance (Id : E) return E is
2846 pragma Assert (Ekind (Id) = E_Variable);
2848 end Shared_Var_Procs_Instance;
2850 function Size_Check_Code (Id : E) return N is
2852 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2854 end Size_Check_Code;
2856 function Size_Depends_On_Discriminant (Id : E) return B is
2858 return Flag177 (Id);
2859 end Size_Depends_On_Discriminant;
2861 function Size_Known_At_Compile_Time (Id : E) return B is
2864 end Size_Known_At_Compile_Time;
2866 function Small_Value (Id : E) return R is
2868 pragma Assert (Is_Fixed_Point_Type (Id));
2869 return Ureal21 (Id);
2872 function SPARK_Aux_Pragma (Id : E) return N is
2875 (Ekind_In (Id, E_Generic_Package, -- package variants
2879 end SPARK_Aux_Pragma;
2881 function SPARK_Aux_Pragma_Inherited (Id : E) return B is
2884 (Ekind_In (Id, E_Generic_Package, -- package variants
2887 return Flag266 (Id);
2888 end SPARK_Aux_Pragma_Inherited;
2890 function SPARK_Pragma (Id : E) return N is
2893 (Ekind_In (Id, E_Function, -- subprogram variants
2895 E_Generic_Procedure,
2899 Ekind_In (Id, E_Generic_Package, -- package variants
2905 function SPARK_Pragma_Inherited (Id : E) return B is
2908 (Ekind_In (Id, E_Function, -- subprogram variants
2910 E_Generic_Procedure,
2914 Ekind_In (Id, E_Generic_Package, -- package variants
2917 return Flag265 (Id);
2918 end SPARK_Pragma_Inherited;
2920 function Spec_Entity (Id : E) return E is
2922 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2926 function Static_Predicate (Id : E) return S is
2928 pragma Assert (Is_Discrete_Type (Id));
2930 end Static_Predicate;
2932 function Status_Flag_Or_Transient_Decl (Id : E) return N is
2934 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2936 end Status_Flag_Or_Transient_Decl;
2938 function Storage_Size_Variable (Id : E) return E is
2940 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2941 return Node15 (Implementation_Base_Type (Id));
2942 end Storage_Size_Variable;
2944 function Static_Elaboration_Desired (Id : E) return B is
2946 pragma Assert (Ekind (Id) = E_Package);
2948 end Static_Elaboration_Desired;
2950 function Static_Initialization (Id : E) return N is
2953 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
2955 end Static_Initialization;
2957 function Stored_Constraint (Id : E) return L is
2960 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
2961 return Elist23 (Id);
2962 end Stored_Constraint;
2964 function Strict_Alignment (Id : E) return B is
2966 return Flag145 (Implementation_Base_Type (Id));
2967 end Strict_Alignment;
2969 function String_Literal_Length (Id : E) return U is
2972 end String_Literal_Length;
2974 function String_Literal_Low_Bound (Id : E) return N is
2977 end String_Literal_Low_Bound;
2979 function Subprograms_For_Type (Id : E) return E is
2981 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
2983 end Subprograms_For_Type;
2985 function Suppress_Elaboration_Warnings (Id : E) return B is
2987 return Flag148 (Id);
2988 end Suppress_Elaboration_Warnings;
2990 function Suppress_Initialization (Id : E) return B is
2992 pragma Assert (Is_Type (Id));
2993 return Flag105 (Id);
2994 end Suppress_Initialization;
2996 function Suppress_Style_Checks (Id : E) return B is
2998 return Flag165 (Id);
2999 end Suppress_Style_Checks;
3001 function Suppress_Value_Tracking_On_Call (Id : E) return B is
3003 return Flag217 (Id);
3004 end Suppress_Value_Tracking_On_Call;
3006 function Task_Body_Procedure (Id : E) return N is
3008 pragma Assert (Ekind (Id) in Task_Kind);
3010 end Task_Body_Procedure;
3012 function Thunk_Entity (Id : E) return E is
3014 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3015 and then Is_Thunk (Id));
3019 function Treat_As_Volatile (Id : E) return B is
3022 end Treat_As_Volatile;
3024 function Underlying_Full_View (Id : E) return E is
3026 pragma Assert (Ekind (Id) in Private_Kind);
3028 end Underlying_Full_View;
3030 function Underlying_Record_View (Id : E) return E is
3033 end Underlying_Record_View;
3035 function Universal_Aliasing (Id : E) return B is
3037 pragma Assert (Is_Type (Id));
3038 return Flag216 (Implementation_Base_Type (Id));
3039 end Universal_Aliasing;
3041 function Unset_Reference (Id : E) return N is
3044 end Unset_Reference;
3046 function Used_As_Generic_Actual (Id : E) return B is
3048 return Flag222 (Id);
3049 end Used_As_Generic_Actual;
3051 function Uses_Lock_Free (Id : E) return B is
3053 pragma Assert (Is_Protected_Type (Id));
3054 return Flag188 (Id);
3057 function Uses_Sec_Stack (Id : E) return B is
3062 function Warnings_Off (Id : E) return B is
3067 function Warnings_Off_Used (Id : E) return B is
3069 return Flag236 (Id);
3070 end Warnings_Off_Used;
3072 function Warnings_Off_Used_Unmodified (Id : E) return B is
3074 return Flag237 (Id);
3075 end Warnings_Off_Used_Unmodified;
3077 function Warnings_Off_Used_Unreferenced (Id : E) return B is
3079 return Flag238 (Id);
3080 end Warnings_Off_Used_Unreferenced;
3082 function Wrapped_Entity (Id : E) return E is
3084 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3085 and then Is_Primitive_Wrapper (Id));
3089 function Was_Hidden (Id : E) return B is
3091 return Flag196 (Id);
3094 ------------------------------
3095 -- Classification Functions --
3096 ------------------------------
3098 function Is_Access_Type (Id : E) return B is
3100 return Ekind (Id) in Access_Kind;
3103 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
3105 return Ekind (Id) in Access_Protected_Kind;
3106 end Is_Access_Protected_Subprogram_Type;
3108 function Is_Access_Subprogram_Type (Id : E) return B is
3110 return Ekind (Id) in Access_Subprogram_Kind;
3111 end Is_Access_Subprogram_Type;
3113 function Is_Aggregate_Type (Id : E) return B is
3115 return Ekind (Id) in Aggregate_Kind;
3116 end Is_Aggregate_Type;
3118 function Is_Array_Type (Id : E) return B is
3120 return Ekind (Id) in Array_Kind;
3123 function Is_Assignable (Id : E) return B is
3125 return Ekind (Id) in Assignable_Kind;
3128 function Is_Class_Wide_Type (Id : E) return B is
3130 return Ekind (Id) in Class_Wide_Kind;
3131 end Is_Class_Wide_Type;
3133 function Is_Composite_Type (Id : E) return B is
3135 return Ekind (Id) in Composite_Kind;
3136 end Is_Composite_Type;
3138 function Is_Concurrent_Body (Id : E) return B is
3140 return Ekind (Id) in
3141 Concurrent_Body_Kind;
3142 end Is_Concurrent_Body;
3144 function Is_Concurrent_Record_Type (Id : E) return B is
3147 end Is_Concurrent_Record_Type;
3149 function Is_Concurrent_Type (Id : E) return B is
3151 return Ekind (Id) in Concurrent_Kind;
3152 end Is_Concurrent_Type;
3154 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
3156 return Ekind (Id) in
3157 Decimal_Fixed_Point_Kind;
3158 end Is_Decimal_Fixed_Point_Type;
3160 function Is_Digits_Type (Id : E) return B is
3162 return Ekind (Id) in Digits_Kind;
3165 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
3167 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
3168 end Is_Discrete_Or_Fixed_Point_Type;
3170 function Is_Discrete_Type (Id : E) return B is
3172 return Ekind (Id) in Discrete_Kind;
3173 end Is_Discrete_Type;
3175 function Is_Elementary_Type (Id : E) return B is
3177 return Ekind (Id) in Elementary_Kind;
3178 end Is_Elementary_Type;
3180 function Is_Entry (Id : E) return B is
3182 return Ekind (Id) in Entry_Kind;
3185 function Is_Enumeration_Type (Id : E) return B is
3187 return Ekind (Id) in
3189 end Is_Enumeration_Type;
3191 function Is_Fixed_Point_Type (Id : E) return B is
3193 return Ekind (Id) in
3195 end Is_Fixed_Point_Type;
3197 function Is_Floating_Point_Type (Id : E) return B is
3199 return Ekind (Id) in Float_Kind;
3200 end Is_Floating_Point_Type;
3202 function Is_Formal (Id : E) return B is
3204 return Ekind (Id) in Formal_Kind;
3207 function Is_Formal_Object (Id : E) return B is
3209 return Ekind (Id) in Formal_Object_Kind;
3210 end Is_Formal_Object;
3212 function Is_Generic_Subprogram (Id : E) return B is
3214 return Ekind (Id) in Generic_Subprogram_Kind;
3215 end Is_Generic_Subprogram;
3217 function Is_Generic_Unit (Id : E) return B is
3219 return Ekind (Id) in Generic_Unit_Kind;
3220 end Is_Generic_Unit;
3222 function Is_Incomplete_Or_Private_Type (Id : E) return B is
3224 return Ekind (Id) in
3225 Incomplete_Or_Private_Kind;
3226 end Is_Incomplete_Or_Private_Type;
3228 function Is_Incomplete_Type (Id : E) return B is
3230 return Ekind (Id) in
3232 end Is_Incomplete_Type;
3234 function Is_Integer_Type (Id : E) return B is
3236 return Ekind (Id) in Integer_Kind;
3237 end Is_Integer_Type;
3239 function Is_Modular_Integer_Type (Id : E) return B is
3241 return Ekind (Id) in
3242 Modular_Integer_Kind;
3243 end Is_Modular_Integer_Type;
3245 function Is_Named_Number (Id : E) return B is
3247 return Ekind (Id) in Named_Kind;
3248 end Is_Named_Number;
3250 function Is_Numeric_Type (Id : E) return B is
3252 return Ekind (Id) in Numeric_Kind;
3253 end Is_Numeric_Type;
3255 function Is_Object (Id : E) return B is
3257 return Ekind (Id) in Object_Kind;
3260 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
3262 return Ekind (Id) in
3263 Ordinary_Fixed_Point_Kind;
3264 end Is_Ordinary_Fixed_Point_Type;
3266 function Is_Overloadable (Id : E) return B is
3268 return Ekind (Id) in Overloadable_Kind;
3269 end Is_Overloadable;
3271 function Is_Private_Type (Id : E) return B is
3273 return Ekind (Id) in Private_Kind;
3274 end Is_Private_Type;
3276 function Is_Protected_Type (Id : E) return B is
3278 return Ekind (Id) in Protected_Kind;
3279 end Is_Protected_Type;
3281 function Is_Real_Type (Id : E) return B is
3283 return Ekind (Id) in Real_Kind;
3286 function Is_Record_Type (Id : E) return B is
3288 return Ekind (Id) in Record_Kind;
3291 function Is_Scalar_Type (Id : E) return B is
3293 return Ekind (Id) in Scalar_Kind;
3296 function Is_Signed_Integer_Type (Id : E) return B is
3298 return Ekind (Id) in Signed_Integer_Kind;
3299 end Is_Signed_Integer_Type;
3301 function Is_Subprogram (Id : E) return B is
3303 return Ekind (Id) in Subprogram_Kind;
3306 function Is_Task_Type (Id : E) return B is
3308 return Ekind (Id) in Task_Kind;
3311 function Is_Type (Id : E) return B is
3313 return Ekind (Id) in Type_Kind;
3316 ------------------------------
3317 -- Attribute Set Procedures --
3318 ------------------------------
3320 -- Note: in many of these set procedures an "obvious" assertion is missing.
3321 -- The reason for this is that in many cases, a field is set before the
3322 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3323 -- it is possible to add assertions that specifically include the E_Void
3324 -- possibility, but in some cases, we just omit the assertions.
3326 procedure Set_Abstract_States (Id : E; V : L) is
3328 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
3329 Set_Elist25 (Id, V);
3330 end Set_Abstract_States;
3332 procedure Set_Accept_Address (Id : E; V : L) is
3334 Set_Elist21 (Id, V);
3335 end Set_Accept_Address;
3337 procedure Set_Access_Disp_Table (Id : E; V : L) is
3339 pragma Assert (Ekind (Id) = E_Record_Type
3340 and then Id = Implementation_Base_Type (Id));
3341 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3342 Set_Elist16 (Id, V);
3343 end Set_Access_Disp_Table;
3345 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3348 end Set_Associated_Formal_Package;
3350 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3353 end Set_Associated_Node_For_Itype;
3355 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3357 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3359 end Set_Associated_Storage_Pool;
3361 procedure Set_Actual_Subtype (Id : E; V : E) is
3364 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3365 or else Is_Formal (Id));
3367 end Set_Actual_Subtype;
3369 procedure Set_Address_Taken (Id : E; V : B := True) is
3371 Set_Flag104 (Id, V);
3372 end Set_Address_Taken;
3374 procedure Set_Alias (Id : E; V : E) is
3377 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3381 procedure Set_Alignment (Id : E; V : U) is
3383 pragma Assert (Is_Type (Id)
3384 or else Is_Formal (Id)
3385 or else Ekind_In (Id, E_Loop_Parameter,
3392 procedure Set_Barrier_Function (Id : E; V : N) is
3394 pragma Assert (Is_Entry (Id));
3396 end Set_Barrier_Function;
3398 procedure Set_Block_Node (Id : E; V : N) is
3400 pragma Assert (Ekind (Id) = E_Block);
3404 procedure Set_Body_Entity (Id : E; V : E) is
3406 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3408 end Set_Body_Entity;
3410 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3413 (Ekind (Id) = E_Package
3414 or else Is_Subprogram (Id)
3415 or else Is_Generic_Unit (Id));
3417 end Set_Body_Needed_For_SAL;
3419 procedure Set_Body_References (Id : E; V : L) is
3421 pragma Assert (Ekind (Id) = E_Abstract_State);
3422 Set_Elist16 (Id, V);
3423 end Set_Body_References;
3425 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3427 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3428 Set_Flag125 (Id, V);
3429 end Set_C_Pass_By_Copy;
3431 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3434 end Set_Can_Never_Be_Null;
3436 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3439 end Set_Checks_May_Be_Suppressed;
3441 procedure Set_Class_Wide_Type (Id : E; V : E) is
3443 pragma Assert (Is_Type (Id));
3445 end Set_Class_Wide_Type;
3447 procedure Set_Cloned_Subtype (Id : E; V : E) is
3449 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3451 end Set_Cloned_Subtype;
3453 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3455 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3457 end Set_Component_Bit_Offset;
3459 procedure Set_Component_Clause (Id : E; V : N) is
3461 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3463 end Set_Component_Clause;
3465 procedure Set_Component_Size (Id : E; V : U) is
3467 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3469 end Set_Component_Size;
3471 procedure Set_Component_Type (Id : E; V : E) is
3473 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3475 end Set_Component_Type;
3477 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3480 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3482 end Set_Corresponding_Concurrent_Type;
3484 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3486 pragma Assert (Ekind (Id) = E_Discriminant);
3488 end Set_Corresponding_Discriminant;
3490 procedure Set_Corresponding_Equality (Id : E; V : E) is
3493 (Ekind (Id) = E_Function
3494 and then not Comes_From_Source (Id)
3495 and then Chars (Id) = Name_Op_Ne);
3497 end Set_Corresponding_Equality;
3499 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3501 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3503 end Set_Corresponding_Protected_Entry;
3505 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3507 pragma Assert (Is_Concurrent_Type (Id));
3509 end Set_Corresponding_Record_Type;
3511 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3514 end Set_Corresponding_Remote_Type;
3516 procedure Set_Current_Use_Clause (Id : E; V : E) is
3518 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3520 end Set_Current_Use_Clause;
3522 procedure Set_Current_Value (Id : E; V : N) is
3524 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3526 end Set_Current_Value;
3528 procedure Set_CR_Discriminant (Id : E; V : E) is
3531 end Set_CR_Discriminant;
3533 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3535 Set_Flag166 (Id, V);
3536 end Set_Debug_Info_Off;
3538 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3541 end Set_Debug_Renaming_Link;
3543 procedure Set_Default_Aspect_Component_Value (Id : E; V : E) is
3545 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3547 end Set_Default_Aspect_Component_Value;
3549 procedure Set_Default_Aspect_Value (Id : E; V : E) is
3551 pragma Assert (Is_Scalar_Type (Id) and then Is_Base_Type (Id));
3553 end Set_Default_Aspect_Value;
3555 procedure Set_Default_Expr_Function (Id : E; V : E) is
3557 pragma Assert (Is_Formal (Id));
3559 end Set_Default_Expr_Function;
3561 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3563 Set_Flag108 (Id, V);
3564 end Set_Default_Expressions_Processed;
3566 procedure Set_Default_Value (Id : E; V : N) is
3568 pragma Assert (Is_Formal (Id));
3570 end Set_Default_Value;
3572 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3576 or else Is_Task_Type (Id)
3577 or else Ekind (Id) = E_Block);
3578 Set_Flag114 (Id, V);
3579 end Set_Delay_Cleanups;
3581 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3584 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3587 end Set_Delay_Subprogram_Descriptors;
3589 procedure Set_Delta_Value (Id : E; V : R) is
3591 pragma Assert (Is_Fixed_Point_Type (Id));
3592 Set_Ureal18 (Id, V);
3593 end Set_Delta_Value;
3595 procedure Set_Dependent_Instances (Id : E; V : L) is
3597 pragma Assert (Is_Generic_Instance (Id));
3599 end Set_Dependent_Instances;
3601 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3603 pragma Assert (Nkind (Id) in N_Entity);
3605 end Set_Depends_On_Private;
3607 procedure Set_Digits_Value (Id : E; V : U) is
3610 (Is_Floating_Point_Type (Id)
3611 or else Is_Decimal_Fixed_Point_Type (Id));
3613 end Set_Digits_Value;
3615 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3618 end Set_Directly_Designated_Type;
3620 procedure Set_Discard_Names (Id : E; V : B := True) is
3623 end Set_Discard_Names;
3625 procedure Set_Discriminal (Id : E; V : E) is
3627 pragma Assert (Ekind (Id) = E_Discriminant);
3629 end Set_Discriminal;
3631 procedure Set_Discriminal_Link (Id : E; V : E) is
3634 end Set_Discriminal_Link;
3636 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3638 pragma Assert (Ekind (Id) = E_Component);
3640 end Set_Discriminant_Checking_Func;
3642 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3644 pragma Assert (Nkind (Id) in N_Entity);
3645 Set_Elist21 (Id, V);
3646 end Set_Discriminant_Constraint;
3648 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3651 end Set_Discriminant_Default_Value;
3653 procedure Set_Discriminant_Number (Id : E; V : U) is
3656 end Set_Discriminant_Number;
3658 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3660 pragma Assert (Ekind (Id) = E_Record_Type
3661 and then Id = Implementation_Base_Type (Id));
3662 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3663 Set_Elist26 (Id, V);
3664 end Set_Dispatch_Table_Wrappers;
3666 procedure Set_DT_Entry_Count (Id : E; V : U) is
3668 pragma Assert (Ekind (Id) = E_Component);
3670 end Set_DT_Entry_Count;
3672 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3674 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3676 end Set_DT_Offset_To_Top_Func;
3678 procedure Set_DT_Position (Id : E; V : U) is
3680 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3682 end Set_DT_Position;
3684 procedure Set_DTC_Entity (Id : E; V : E) is
3686 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3690 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3692 pragma Assert (Ekind (Id) = E_Package);
3693 Set_Flag210 (Id, V);
3694 end Set_Elaborate_Body_Desirable;
3696 procedure Set_Elaboration_Entity (Id : E; V : E) is
3701 Ekind (Id) = E_Package
3703 Is_Generic_Unit (Id));
3705 end Set_Elaboration_Entity;
3707 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3712 Ekind (Id) = E_Package
3714 Is_Generic_Unit (Id));
3715 Set_Flag174 (Id, V);
3716 end Set_Elaboration_Entity_Required;
3718 procedure Set_Encapsulating_State (Id : E; V : E) is
3720 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
3722 end Set_Encapsulating_State;
3724 procedure Set_Enclosing_Scope (Id : E; V : E) is
3727 end Set_Enclosing_Scope;
3729 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3731 pragma Assert (Is_Entry (Id));
3732 Set_Flag152 (Id, V);
3733 end Set_Entry_Accepted;
3735 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3738 end Set_Entry_Bodies_Array;
3740 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3743 end Set_Entry_Cancel_Parameter;
3745 procedure Set_Entry_Component (Id : E; V : E) is
3748 end Set_Entry_Component;
3750 procedure Set_Entry_Formal (Id : E; V : E) is
3753 end Set_Entry_Formal;
3755 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3757 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3759 end Set_Entry_Index_Constant;
3761 procedure Set_Contract (Id : E; V : N) is
3764 (Ekind_In (Id, E_Entry,
3772 or else Is_Generic_Subprogram (Id)
3773 or else Is_Subprogram (Id));
3777 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3780 end Set_Entry_Parameters_Type;
3782 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3784 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3786 end Set_Enum_Pos_To_Rep;
3788 procedure Set_Enumeration_Pos (Id : E; V : U) is
3790 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3792 end Set_Enumeration_Pos;
3794 procedure Set_Enumeration_Rep (Id : E; V : U) is
3796 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3798 end Set_Enumeration_Rep;
3800 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3802 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3804 end Set_Enumeration_Rep_Expr;
3806 procedure Set_Equivalent_Type (Id : E; V : E) is
3809 (Ekind_In (Id, E_Class_Wide_Type,
3810 E_Class_Wide_Subtype,
3811 E_Access_Protected_Subprogram_Type,
3812 E_Anonymous_Access_Protected_Subprogram_Type,
3813 E_Access_Subprogram_Type,
3816 end Set_Equivalent_Type;
3818 procedure Set_Esize (Id : E; V : U) is
3823 procedure Set_Exception_Code (Id : E; V : U) is
3825 pragma Assert (Ekind (Id) = E_Exception);
3827 end Set_Exception_Code;
3829 procedure Set_Extra_Accessibility (Id : E; V : E) is
3832 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
3834 end Set_Extra_Accessibility;
3836 procedure Set_Extra_Accessibility_Of_Result (Id : E; V : E) is
3838 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
3840 end Set_Extra_Accessibility_Of_Result;
3842 procedure Set_Extra_Constrained (Id : E; V : E) is
3844 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3846 end Set_Extra_Constrained;
3848 procedure Set_Extra_Formal (Id : E; V : E) is
3851 end Set_Extra_Formal;
3853 procedure Set_Extra_Formals (Id : E; V : E) is
3856 (Is_Overloadable (Id)
3857 or else Ekind_In (Id, E_Entry_Family,
3859 E_Subprogram_Type));
3861 end Set_Extra_Formals;
3863 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3866 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3867 Set_Flag229 (Id, V);
3868 end Set_Can_Use_Internal_Rep;
3870 procedure Set_Finalization_Master (Id : E; V : E) is
3872 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3874 end Set_Finalization_Master;
3876 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3878 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3879 Set_Flag158 (Id, V);
3880 end Set_Finalize_Storage_Only;
3882 procedure Set_Finalizer (Id : E; V : E) is
3884 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
3888 procedure Set_First_Entity (Id : E; V : E) is
3891 end Set_First_Entity;
3893 procedure Set_First_Exit_Statement (Id : E; V : N) is
3895 pragma Assert (Ekind (Id) = E_Loop);
3897 end Set_First_Exit_Statement;
3899 procedure Set_First_Index (Id : E; V : N) is
3901 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3903 end Set_First_Index;
3905 procedure Set_First_Literal (Id : E; V : E) is
3907 pragma Assert (Is_Enumeration_Type (Id));
3909 end Set_First_Literal;
3911 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3913 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3915 end Set_First_Optional_Parameter;
3917 procedure Set_First_Private_Entity (Id : E; V : E) is
3919 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
3920 or else Ekind (Id) in Concurrent_Kind);
3922 end Set_First_Private_Entity;
3924 procedure Set_First_Rep_Item (Id : E; V : N) is
3927 end Set_First_Rep_Item;
3929 procedure Set_Float_Rep (Id : E; V : F) is
3930 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
3932 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
3935 procedure Set_Freeze_Node (Id : E; V : N) is
3938 end Set_Freeze_Node;
3940 procedure Set_From_Limited_With (Id : E; V : B := True) is
3943 (Is_Type (Id) or else Ekind_In (Id, E_Abstract_State, E_Package));
3944 Set_Flag159 (Id, V);
3945 end Set_From_Limited_With;
3947 procedure Set_Full_View (Id : E; V : E) is
3949 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
3953 procedure Set_Generic_Homonym (Id : E; V : E) is
3956 end Set_Generic_Homonym;
3958 procedure Set_Generic_Renamings (Id : E; V : L) is
3960 Set_Elist23 (Id, V);
3961 end Set_Generic_Renamings;
3963 procedure Set_Handler_Records (Id : E; V : S) is
3966 end Set_Handler_Records;
3968 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
3970 pragma Assert (Id = Base_Type (Id));
3971 Set_Flag135 (Id, V);
3972 end Set_Has_Aliased_Components;
3974 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
3977 end Set_Has_Alignment_Clause;
3979 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
3982 end Set_Has_All_Calls_Remote;
3984 procedure Set_Has_Anonymous_Master (Id : E; V : B := True) is
3987 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
3988 Set_Flag253 (Id, V);
3989 end Set_Has_Anonymous_Master;
3991 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
3993 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
3995 end Set_Has_Atomic_Components;
3997 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
4000 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
4001 Set_Flag139 (Id, V);
4002 end Set_Has_Biased_Representation;
4004 procedure Set_Has_Completion (Id : E; V : B := True) is
4007 end Set_Has_Completion;
4009 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
4011 pragma Assert (Is_Type (Id));
4013 end Set_Has_Completion_In_Body;
4015 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
4017 pragma Assert (Ekind (Id) = E_Record_Type);
4018 Set_Flag140 (Id, V);
4019 end Set_Has_Complex_Representation;
4021 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
4023 pragma Assert (Ekind (Id) = E_Array_Type);
4025 end Set_Has_Component_Size_Clause;
4027 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
4029 pragma Assert (Is_Type (Id));
4030 Set_Flag187 (Id, V);
4031 end Set_Has_Constrained_Partial_View;
4033 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
4035 Set_Flag181 (Id, V);
4036 end Set_Has_Contiguous_Rep;
4038 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
4040 pragma Assert (Id = Base_Type (Id));
4042 end Set_Has_Controlled_Component;
4044 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
4047 end Set_Has_Controlling_Result;
4049 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
4051 Set_Flag119 (Id, V);
4052 end Set_Has_Convention_Pragma;
4054 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
4057 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
4058 and then Is_Base_Type (Id));
4060 end Set_Has_Default_Aspect;
4062 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
4064 pragma Assert (Nkind (Id) in N_Entity);
4065 Set_Flag200 (Id, V);
4066 end Set_Has_Delayed_Aspects;
4068 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
4070 pragma Assert (Nkind (Id) in N_Entity);
4072 end Set_Has_Delayed_Freeze;
4074 procedure Set_Has_Delayed_Rep_Aspects (Id : E; V : B := True) is
4076 pragma Assert (Nkind (Id) in N_Entity);
4077 Set_Flag261 (Id, V);
4078 end Set_Has_Delayed_Rep_Aspects;
4080 procedure Set_Has_Discriminants (Id : E; V : B := True) is
4082 pragma Assert (Nkind (Id) in N_Entity);
4084 end Set_Has_Discriminants;
4086 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
4088 pragma Assert (Ekind (Id) = E_Record_Type
4089 and then Is_Tagged_Type (Id));
4090 Set_Flag220 (Id, V);
4091 end Set_Has_Dispatch_Table;
4093 procedure Set_Has_Dynamic_Predicate_Aspect (Id : E; V : B := True) is
4095 pragma Assert (Is_Type (Id));
4096 Set_Flag258 (Id, V);
4097 end Set_Has_Dynamic_Predicate_Aspect;
4099 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
4101 pragma Assert (Is_Enumeration_Type (Id));
4103 end Set_Has_Enumeration_Rep_Clause;
4105 procedure Set_Has_Exit (Id : E; V : B := True) is
4110 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True) is
4112 pragma Assert (Is_Tagged_Type (Id));
4113 Set_Flag110 (Id, V);
4114 end Set_Has_External_Tag_Rep_Clause;
4116 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
4118 Set_Flag175 (Id, V);
4119 end Set_Has_Forward_Instantiation;
4121 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
4123 Set_Flag173 (Id, V);
4124 end Set_Has_Fully_Qualified_Name;
4126 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
4129 end Set_Has_Gigi_Rep_Item;
4131 procedure Set_Has_Homonym (Id : E; V : B := True) is
4134 end Set_Has_Homonym;
4136 procedure Set_Has_Implicit_Dereference (Id : E; V : B := True) is
4138 Set_Flag251 (Id, V);
4139 end Set_Has_Implicit_Dereference;
4141 procedure Set_Has_Independent_Components (Id : E; V : B := True) is
4143 pragma Assert (Is_Object (Id) or else Is_Type (Id));
4145 end Set_Has_Independent_Components;
4147 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
4149 pragma Assert (Is_Type (Id));
4150 Set_Flag248 (Id, V);
4151 end Set_Has_Inheritable_Invariants;
4153 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
4155 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
4156 Set_Flag219 (Id, V);
4157 end Set_Has_Initial_Value;
4159 procedure Set_Has_Invariants (Id : E; V : B := True) is
4161 pragma Assert (Is_Type (Id));
4162 Set_Flag232 (Id, V);
4163 end Set_Has_Invariants;
4165 procedure Set_Has_Loop_Entry_Attributes (Id : E; V : B := True) is
4167 pragma Assert (Ekind (Id) = E_Loop);
4168 Set_Flag260 (Id, V);
4169 end Set_Has_Loop_Entry_Attributes;
4171 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
4173 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4175 end Set_Has_Machine_Radix_Clause;
4177 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
4180 end Set_Has_Master_Entity;
4182 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
4184 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4185 Set_Flag142 (Id, V);
4186 end Set_Has_Missing_Return;
4188 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
4190 Set_Flag101 (Id, V);
4191 end Set_Has_Nested_Block_With_Handler;
4193 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
4195 pragma Assert (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
4196 Set_Flag215 (Id, V);
4197 end Set_Has_Up_Level_Access;
4199 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
4201 pragma Assert (Id = Base_Type (Id));
4203 end Set_Has_Non_Standard_Rep;
4205 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
4207 pragma Assert (Is_Type (Id));
4208 Set_Flag172 (Id, V);
4209 end Set_Has_Object_Size_Clause;
4211 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
4213 Set_Flag154 (Id, V);
4214 end Set_Has_Per_Object_Constraint;
4216 procedure Set_Has_Postconditions (Id : E; V : B := True) is
4218 pragma Assert (Is_Subprogram (Id));
4219 Set_Flag240 (Id, V);
4220 end Set_Has_Postconditions;
4222 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
4224 pragma Assert (Is_Access_Type (Id));
4225 Set_Flag27 (Base_Type (Id), V);
4226 end Set_Has_Pragma_Controlled;
4228 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
4230 Set_Flag150 (Id, V);
4231 end Set_Has_Pragma_Elaborate_Body;
4233 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
4235 Set_Flag157 (Id, V);
4236 end Set_Has_Pragma_Inline;
4238 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
4240 Set_Flag230 (Id, V);
4241 end Set_Has_Pragma_Inline_Always;
4243 procedure Set_Has_Pragma_No_Inline (Id : E; V : B := True) is
4245 Set_Flag201 (Id, V);
4246 end Set_Has_Pragma_No_Inline;
4248 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
4250 pragma Assert (Is_Enumeration_Type (Id));
4251 pragma Assert (Id = Base_Type (Id));
4252 Set_Flag198 (Id, V);
4253 end Set_Has_Pragma_Ordered;
4255 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
4257 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
4258 pragma Assert (Id = Base_Type (Id));
4259 Set_Flag121 (Id, V);
4260 end Set_Has_Pragma_Pack;
4262 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
4264 Set_Flag221 (Id, V);
4265 end Set_Has_Pragma_Preelab_Init;
4267 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
4269 Set_Flag203 (Id, V);
4270 end Set_Has_Pragma_Pure;
4272 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
4274 Set_Flag179 (Id, V);
4275 end Set_Has_Pragma_Pure_Function;
4277 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
4279 Set_Flag169 (Id, V);
4280 end Set_Has_Pragma_Thread_Local_Storage;
4282 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
4284 Set_Flag233 (Id, V);
4285 end Set_Has_Pragma_Unmodified;
4287 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
4289 Set_Flag180 (Id, V);
4290 end Set_Has_Pragma_Unreferenced;
4292 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
4294 pragma Assert (Is_Type (Id));
4295 Set_Flag212 (Id, V);
4296 end Set_Has_Pragma_Unreferenced_Objects;
4298 procedure Set_Has_Predicates (Id : E; V : B := True) is
4300 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Void);
4301 Set_Flag250 (Id, V);
4302 end Set_Has_Predicates;
4304 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
4306 pragma Assert (Id = Base_Type (Id));
4307 Set_Flag120 (Id, V);
4308 end Set_Has_Primitive_Operations;
4310 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
4312 pragma Assert (Is_Type (Id));
4313 Set_Flag151 (Id, V);
4314 end Set_Has_Private_Ancestor;
4316 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
4318 Set_Flag155 (Id, V);
4319 end Set_Has_Private_Declaration;
4321 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
4323 Set_Flag161 (Id, V);
4324 end Set_Has_Qualified_Name;
4326 procedure Set_Has_RACW (Id : E; V : B := True) is
4328 pragma Assert (Ekind (Id) = E_Package);
4329 Set_Flag214 (Id, V);
4332 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
4334 pragma Assert (Id = Base_Type (Id));
4336 end Set_Has_Record_Rep_Clause;
4338 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
4340 pragma Assert (Is_Subprogram (Id));
4341 Set_Flag143 (Id, V);
4342 end Set_Has_Recursive_Call;
4344 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
4347 end Set_Has_Size_Clause;
4349 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
4352 end Set_Has_Small_Clause;
4354 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
4356 pragma Assert (Id = Base_Type (Id));
4357 Set_Flag100 (Id, V);
4358 end Set_Has_Specified_Layout;
4360 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
4362 pragma Assert (Is_Type (Id));
4363 Set_Flag190 (Id, V);
4364 end Set_Has_Specified_Stream_Input;
4366 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
4368 pragma Assert (Is_Type (Id));
4369 Set_Flag191 (Id, V);
4370 end Set_Has_Specified_Stream_Output;
4372 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
4374 pragma Assert (Is_Type (Id));
4375 Set_Flag192 (Id, V);
4376 end Set_Has_Specified_Stream_Read;
4378 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
4380 pragma Assert (Is_Type (Id));
4381 Set_Flag193 (Id, V);
4382 end Set_Has_Specified_Stream_Write;
4384 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
4386 Set_Flag211 (Id, V);
4387 end Set_Has_Static_Discriminants;
4389 procedure Set_Has_Static_Predicate_Aspect (Id : E; V : B := True) is
4391 pragma Assert (Is_Type (Id));
4392 Set_Flag259 (Id, V);
4393 end Set_Has_Static_Predicate_Aspect;
4395 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
4397 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4398 pragma Assert (Id = Base_Type (Id));
4400 end Set_Has_Storage_Size_Clause;
4402 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4404 pragma Assert (Is_Elementary_Type (Id));
4405 Set_Flag184 (Id, V);
4406 end Set_Has_Stream_Size_Clause;
4408 procedure Set_Has_Task (Id : E; V : B := True) is
4410 pragma Assert (Id = Base_Type (Id));
4414 procedure Set_Has_Thunks (Id : E; V : B := True) is
4416 pragma Assert (Is_Tag (Id));
4417 Set_Flag228 (Id, V);
4420 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4422 pragma Assert (Id = Base_Type (Id));
4423 Set_Flag123 (Id, V);
4424 end Set_Has_Unchecked_Union;
4426 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4428 pragma Assert (Is_Type (Id));
4430 end Set_Has_Unknown_Discriminants;
4432 procedure Set_Has_Visible_Refinement (Id : E; V : B := True) is
4434 pragma Assert (Ekind (Id) = E_Abstract_State);
4435 Set_Flag263 (Id, V);
4436 end Set_Has_Visible_Refinement;
4438 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4440 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4442 end Set_Has_Volatile_Components;
4444 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4446 Set_Flag182 (Id, V);
4447 end Set_Has_Xref_Entry;
4449 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4451 pragma Assert (Ekind (Id) = E_Variable);
4453 end Set_Hiding_Loop_Variable;
4455 procedure Set_Homonym (Id : E; V : E) is
4457 pragma Assert (Id /= V);
4461 procedure Set_Interface_Alias (Id : E; V : E) is
4465 and then Is_Hidden (Id)
4466 and then (Ekind_In (Id, E_Procedure, E_Function)));
4468 end Set_Interface_Alias;
4470 procedure Set_Interfaces (Id : E; V : L) is
4472 pragma Assert (Is_Record_Type (Id));
4473 Set_Elist25 (Id, V);
4476 procedure Set_In_Package_Body (Id : E; V : B := True) is
4479 end Set_In_Package_Body;
4481 procedure Set_In_Private_Part (Id : E; V : B := True) is
4484 end Set_In_Private_Part;
4486 procedure Set_In_Use (Id : E; V : B := True) is
4488 pragma Assert (Nkind (Id) in N_Entity);
4492 procedure Set_Initialization_Statements (Id : E; V : N) is
4494 -- Tolerate an E_Void entity since this can be called while resolving
4495 -- an aggregate used as the initialization expression for an object
4496 -- declaration, and this occurs before the Ekind for the object is set.
4498 pragma Assert (Ekind_In (Id, E_Void, E_Constant, E_Variable));
4500 end Set_Initialization_Statements;
4502 procedure Set_Inner_Instances (Id : E; V : L) is
4504 Set_Elist23 (Id, V);
4505 end Set_Inner_Instances;
4507 procedure Set_Interface_Name (Id : E; V : N) is
4510 end Set_Interface_Name;
4512 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4514 pragma Assert (Is_Overloadable (Id));
4516 end Set_Is_Abstract_Subprogram;
4518 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4520 pragma Assert (Is_Type (Id));
4521 Set_Flag146 (Id, V);
4522 end Set_Is_Abstract_Type;
4524 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4526 pragma Assert (Is_Access_Type (Id));
4527 Set_Flag194 (Id, V);
4528 end Set_Is_Local_Anonymous_Access;
4530 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4532 pragma Assert (Is_Access_Type (Id));
4534 end Set_Is_Access_Constant;
4536 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4538 Set_Flag185 (Id, V);
4539 end Set_Is_Ada_2005_Only;
4541 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4543 Set_Flag199 (Id, V);
4544 end Set_Is_Ada_2012_Only;
4546 procedure Set_Is_Aliased (Id : E; V : B := True) is
4548 pragma Assert (Nkind (Id) in N_Entity);
4552 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
4554 pragma Assert (Is_Entry (Id));
4555 Set_Flag132 (Id, V);
4556 end Set_Is_AST_Entry;
4558 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4561 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4563 end Set_Is_Asynchronous;
4565 procedure Set_Is_Atomic (Id : E; V : B := True) is
4570 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4572 pragma Assert ((not V)
4573 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4574 Set_Flag122 (Id, V);
4575 end Set_Is_Bit_Packed_Array;
4577 procedure Set_Is_Called (Id : E; V : B := True) is
4579 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4580 Set_Flag102 (Id, V);
4583 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4586 end Set_Is_Character_Type;
4588 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4591 end Set_Is_Child_Unit;
4593 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4596 end Set_Is_Class_Wide_Equivalent_Type;
4598 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4600 Set_Flag149 (Id, V);
4601 end Set_Is_Compilation_Unit;
4603 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4605 pragma Assert (Ekind (Id) = E_Discriminant);
4606 Set_Flag103 (Id, V);
4607 end Set_Is_Completely_Hidden;
4609 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4612 end Set_Is_Concurrent_Record_Type;
4614 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4617 end Set_Is_Constr_Subt_For_U_Nominal;
4619 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4621 Set_Flag141 (Id, V);
4622 end Set_Is_Constr_Subt_For_UN_Aliased;
4624 procedure Set_Is_Constrained (Id : E; V : B := True) is
4626 pragma Assert (Nkind (Id) in N_Entity);
4628 end Set_Is_Constrained;
4630 procedure Set_Is_Constructor (Id : E; V : B := True) is
4633 end Set_Is_Constructor;
4635 procedure Set_Is_Controlled (Id : E; V : B := True) is
4637 pragma Assert (Id = Base_Type (Id));
4639 end Set_Is_Controlled;
4641 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4643 pragma Assert (Is_Formal (Id));
4645 end Set_Is_Controlling_Formal;
4647 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4650 end Set_Is_CPP_Class;
4652 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4654 pragma Assert (Is_Type (Id));
4655 Set_Flag223 (Id, V);
4656 end Set_Is_Descendent_Of_Address;
4658 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4660 Set_Flag176 (Id, V);
4661 end Set_Is_Discrim_SO_Function;
4663 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4665 Set_Flag234 (Id, V);
4666 end Set_Is_Dispatch_Table_Entity;
4668 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4673 Is_Overloadable (Id)
4675 Ekind (Id) = E_Subprogram_Type);
4678 end Set_Is_Dispatching_Operation;
4680 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4682 Set_Flag124 (Id, V);
4683 end Set_Is_Eliminated;
4685 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4688 end Set_Is_Entry_Formal;
4690 procedure Set_Is_Exported (Id : E; V : B := True) is
4693 end Set_Is_Exported;
4695 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4698 end Set_Is_First_Subtype;
4700 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4702 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4703 Set_Flag118 (Id, V);
4704 end Set_Is_For_Access_Subtype;
4706 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4708 Set_Flag111 (Id, V);
4709 end Set_Is_Formal_Subprogram;
4711 procedure Set_Is_Frozen (Id : E; V : B := True) is
4713 pragma Assert (Nkind (Id) in N_Entity);
4717 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4719 pragma Assert (Is_Type (Id));
4721 end Set_Is_Generic_Actual_Type;
4723 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4725 Set_Flag130 (Id, V);
4726 end Set_Is_Generic_Instance;
4728 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4730 pragma Assert (Nkind (Id) in N_Entity);
4732 end Set_Is_Generic_Type;
4734 procedure Set_Is_Hidden (Id : E; V : B := True) is
4739 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4741 Set_Flag171 (Id, V);
4742 end Set_Is_Hidden_Open_Scope;
4744 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4746 pragma Assert (Nkind (Id) in N_Entity);
4748 end Set_Is_Immediately_Visible;
4750 procedure Set_Is_Implementation_Defined (Id : E; V : B := True) is
4752 Set_Flag254 (Id, V);
4753 end Set_Is_Implementation_Defined;
4755 procedure Set_Is_Imported (Id : E; V : B := True) is
4758 end Set_Is_Imported;
4760 procedure Set_Is_Inlined (Id : E; V : B := True) is
4765 procedure Set_Is_Interface (Id : E; V : B := True) is
4767 pragma Assert (Is_Record_Type (Id));
4768 Set_Flag186 (Id, V);
4769 end Set_Is_Interface;
4771 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4773 Set_Flag126 (Id, V);
4774 end Set_Is_Instantiated;
4776 procedure Set_Is_Internal (Id : E; V : B := True) is
4778 pragma Assert (Nkind (Id) in N_Entity);
4780 end Set_Is_Internal;
4782 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4784 pragma Assert (Nkind (Id) in N_Entity);
4786 end Set_Is_Interrupt_Handler;
4788 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4791 end Set_Is_Intrinsic_Subprogram;
4793 procedure Set_Is_Invariant_Procedure (Id : E; V : B := True) is
4795 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4796 Set_Flag257 (Id, V);
4797 end Set_Is_Invariant_Procedure;
4799 procedure Set_Is_Itype (Id : E; V : B := True) is
4804 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4807 end Set_Is_Known_Non_Null;
4809 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4811 Set_Flag204 (Id, V);
4812 end Set_Is_Known_Null;
4814 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4816 Set_Flag170 (Id, V);
4817 end Set_Is_Known_Valid;
4819 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4821 pragma Assert (Is_Type (Id));
4822 Set_Flag106 (Id, V);
4823 end Set_Is_Limited_Composite;
4825 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4827 pragma Assert (Is_Interface (Id));
4828 Set_Flag197 (Id, V);
4829 end Set_Is_Limited_Interface;
4831 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4834 end Set_Is_Limited_Record;
4836 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4838 pragma Assert (Is_Subprogram (Id));
4839 Set_Flag137 (Id, V);
4840 end Set_Is_Machine_Code_Subprogram;
4842 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4844 pragma Assert (Is_Type (Id));
4845 Set_Flag109 (Id, V);
4846 end Set_Is_Non_Static_Subtype;
4848 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4850 pragma Assert (Ekind (Id) = E_Procedure);
4851 Set_Flag178 (Id, V);
4852 end Set_Is_Null_Init_Proc;
4854 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4856 Set_Flag153 (Id, V);
4857 end Set_Is_Obsolescent;
4859 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
4861 pragma Assert (Ekind (Id) = E_Out_Parameter);
4862 Set_Flag226 (Id, V);
4863 end Set_Is_Only_Out_Parameter;
4865 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
4867 pragma Assert (Is_Formal (Id));
4868 Set_Flag134 (Id, V);
4869 end Set_Is_Optional_Parameter;
4871 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
4873 Set_Flag160 (Id, V);
4874 end Set_Is_Package_Body_Entity;
4876 procedure Set_Is_Packed (Id : E; V : B := True) is
4878 pragma Assert (Id = Base_Type (Id));
4882 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
4884 Set_Flag138 (Id, V);
4885 end Set_Is_Packed_Array_Type;
4887 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
4889 pragma Assert (Nkind (Id) in N_Entity);
4891 end Set_Is_Potentially_Use_Visible;
4893 procedure Set_Is_Predicate_Function (Id : E; V : B := True) is
4895 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4896 Set_Flag255 (Id, V);
4897 end Set_Is_Predicate_Function;
4899 procedure Set_Is_Predicate_Function_M (Id : E; V : B := True) is
4901 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4902 Set_Flag256 (Id, V);
4903 end Set_Is_Predicate_Function_M;
4905 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
4908 end Set_Is_Preelaborated;
4910 procedure Set_Is_Primitive (Id : E; V : B := True) is
4913 (Is_Overloadable (Id)
4914 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
4915 Set_Flag218 (Id, V);
4916 end Set_Is_Primitive;
4918 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
4920 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4921 Set_Flag195 (Id, V);
4922 end Set_Is_Primitive_Wrapper;
4924 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
4926 pragma Assert (Is_Type (Id));
4927 Set_Flag107 (Id, V);
4928 end Set_Is_Private_Composite;
4930 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
4933 end Set_Is_Private_Descendant;
4935 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
4937 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4938 Set_Flag245 (Id, V);
4939 end Set_Is_Private_Primitive;
4941 procedure Set_Is_Processed_Transient (Id : E; V : B := True) is
4943 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
4944 Set_Flag252 (Id, V);
4945 end Set_Is_Processed_Transient;
4947 procedure Set_Is_Public (Id : E; V : B := True) is
4949 pragma Assert (Nkind (Id) in N_Entity);
4953 procedure Set_Is_Pure (Id : E; V : B := True) is
4958 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
4960 pragma Assert (Is_Access_Type (Id));
4961 Set_Flag189 (Id, V);
4962 end Set_Is_Pure_Unit_Access_Type;
4964 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
4966 pragma Assert (Is_Type (Id));
4967 Set_Flag244 (Id, V);
4968 end Set_Is_RACW_Stub_Type;
4970 procedure Set_Is_Raised (Id : E; V : B := True) is
4972 pragma Assert (Ekind (Id) = E_Exception);
4973 Set_Flag224 (Id, V);
4976 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
4979 end Set_Is_Remote_Call_Interface;
4981 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
4984 end Set_Is_Remote_Types;
4986 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
4988 Set_Flag112 (Id, V);
4989 end Set_Is_Renaming_Of_Object;
4991 procedure Set_Is_Return_Object (Id : E; V : B := True) is
4993 Set_Flag209 (Id, V);
4994 end Set_Is_Return_Object;
4996 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
4998 pragma Assert (Ekind (Id) = E_Variable);
4999 Set_Flag249 (Id, V);
5000 end Set_Is_Safe_To_Reevaluate;
5002 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
5005 end Set_Is_Shared_Passive;
5007 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
5011 or else Ekind_In (Id, E_Exception,
5016 end Set_Is_Statically_Allocated;
5018 procedure Set_Is_Tag (Id : E; V : B := True) is
5020 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5024 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
5027 end Set_Is_Tagged_Type;
5029 procedure Set_Is_Thunk (Id : E; V : B := True) is
5031 pragma Assert (Is_Subprogram (Id));
5032 Set_Flag225 (Id, V);
5035 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
5037 Set_Flag235 (Id, V);
5038 end Set_Is_Trivial_Subprogram;
5040 procedure Set_Is_True_Constant (Id : E; V : B := True) is
5042 Set_Flag163 (Id, V);
5043 end Set_Is_True_Constant;
5045 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
5047 pragma Assert (Id = Base_Type (Id));
5048 Set_Flag117 (Id, V);
5049 end Set_Is_Unchecked_Union;
5051 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
5053 pragma Assert (Ekind (Id) = E_Record_Type);
5054 Set_Flag246 (Id, V);
5055 end Set_Is_Underlying_Record_View;
5057 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
5059 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
5060 Set_Flag144 (Id, V);
5061 end Set_Is_Unsigned_Type;
5063 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
5065 pragma Assert (Ekind (Id) = E_Procedure);
5066 Set_Flag127 (Id, V);
5067 end Set_Is_Valued_Procedure;
5069 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
5071 Set_Flag206 (Id, V);
5072 end Set_Is_Visible_Formal;
5074 procedure Set_Is_Visible_Lib_Unit (Id : E; V : B := True) is
5076 Set_Flag116 (Id, V);
5077 end Set_Is_Visible_Lib_Unit;
5079 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
5081 pragma Assert (Ekind (Id) = E_Exception);
5082 Set_Flag133 (Id, V);
5083 end Set_Is_VMS_Exception;
5085 procedure Set_Is_Volatile (Id : E; V : B := True) is
5087 pragma Assert (Nkind (Id) in N_Entity);
5089 end Set_Is_Volatile;
5091 procedure Set_Itype_Printed (Id : E; V : B := True) is
5093 pragma Assert (Is_Itype (Id));
5094 Set_Flag202 (Id, V);
5095 end Set_Itype_Printed;
5097 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
5100 end Set_Kill_Elaboration_Checks;
5102 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
5105 end Set_Kill_Range_Checks;
5107 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
5109 pragma Assert (Is_Type (Id));
5110 Set_Flag207 (Id, V);
5111 end Set_Known_To_Have_Preelab_Init;
5113 procedure Set_Last_Assignment (Id : E; V : N) is
5115 pragma Assert (Is_Assignable (Id));
5117 end Set_Last_Assignment;
5119 procedure Set_Last_Entity (Id : E; V : E) is
5122 end Set_Last_Entity;
5124 procedure Set_Limited_View (Id : E; V : E) is
5126 pragma Assert (Ekind (Id) = E_Package);
5128 end Set_Limited_View;
5130 procedure Set_Linker_Section_Pragma (Id : E; V : N) is
5132 pragma Assert (Is_Type (Id)
5133 or else Ekind_In (Id, E_Constant, E_Variable)
5134 or else Is_Subprogram (Id));
5136 end Set_Linker_Section_Pragma;
5138 procedure Set_Lit_Indexes (Id : E; V : E) is
5140 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5142 end Set_Lit_Indexes;
5144 procedure Set_Lit_Strings (Id : E; V : E) is
5146 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5148 end Set_Lit_Strings;
5150 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
5152 pragma Assert (Is_Formal (Id));
5153 Set_Flag205 (Id, V);
5154 end Set_Low_Bound_Tested;
5156 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
5158 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
5160 end Set_Machine_Radix_10;
5162 procedure Set_Master_Id (Id : E; V : E) is
5164 pragma Assert (Is_Access_Type (Id));
5168 procedure Set_Materialize_Entity (Id : E; V : B := True) is
5170 Set_Flag168 (Id, V);
5171 end Set_Materialize_Entity;
5173 procedure Set_May_Inherit_Delayed_Rep_Aspects (Id : E; V : B := True) is
5175 Set_Flag262 (Id, V);
5176 end Set_May_Inherit_Delayed_Rep_Aspects;
5178 procedure Set_Mechanism (Id : E; V : M) is
5180 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
5181 Set_Uint8 (Id, UI_From_Int (V));
5184 procedure Set_Modulus (Id : E; V : U) is
5186 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
5190 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
5192 pragma Assert (Is_Type (Id));
5193 Set_Flag183 (Id, V);
5194 end Set_Must_Be_On_Byte_Boundary;
5196 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
5198 pragma Assert (Is_Type (Id));
5199 Set_Flag208 (Id, V);
5200 end Set_Must_Have_Preelab_Init;
5202 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
5204 Set_Flag147 (Id, V);
5205 end Set_Needs_Debug_Info;
5207 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
5210 (Is_Overloadable (Id)
5211 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
5213 end Set_Needs_No_Actuals;
5215 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
5217 Set_Flag115 (Id, V);
5218 end Set_Never_Set_In_Source;
5220 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
5223 end Set_Next_Inlined_Subprogram;
5225 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
5227 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5228 Set_Flag131 (Id, V);
5229 end Set_No_Pool_Assigned;
5231 procedure Set_No_Return (Id : E; V : B := True) is
5234 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
5235 Set_Flag113 (Id, V);
5238 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
5240 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5241 Set_Flag136 (Id, V);
5242 end Set_No_Strict_Aliasing;
5244 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
5246 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5248 end Set_Non_Binary_Modulus;
5250 procedure Set_Non_Limited_View (Id : E; V : E) is
5253 (Ekind (Id) in Incomplete_Kind or else Ekind (Id) = E_Abstract_State);
5255 end Set_Non_Limited_View;
5257 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
5260 (Root_Type (Id) = Standard_Boolean
5261 and then Ekind (Id) = E_Enumeration_Type);
5262 Set_Flag162 (Id, V);
5263 end Set_Nonzero_Is_True;
5265 procedure Set_Normalized_First_Bit (Id : E; V : U) is
5267 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5269 end Set_Normalized_First_Bit;
5271 procedure Set_Normalized_Position (Id : E; V : U) is
5273 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5275 end Set_Normalized_Position;
5277 procedure Set_Normalized_Position_Max (Id : E; V : U) is
5279 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5281 end Set_Normalized_Position_Max;
5283 procedure Set_OK_To_Rename (Id : E; V : B := True) is
5285 pragma Assert (Ekind (Id) = E_Variable);
5286 Set_Flag247 (Id, V);
5287 end Set_OK_To_Rename;
5289 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
5292 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5293 Set_Flag239 (Id, V);
5294 end Set_OK_To_Reorder_Components;
5296 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
5299 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5300 Set_Flag241 (Id, V);
5301 end Set_Optimize_Alignment_Space;
5303 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
5306 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5307 Set_Flag242 (Id, V);
5308 end Set_Optimize_Alignment_Time;
5310 procedure Set_Original_Access_Type (Id : E; V : E) is
5312 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
5314 end Set_Original_Access_Type;
5316 procedure Set_Original_Array_Type (Id : E; V : E) is
5318 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
5320 end Set_Original_Array_Type;
5322 procedure Set_Original_Record_Component (Id : E; V : E) is
5324 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
5326 end Set_Original_Record_Component;
5328 procedure Set_Overlays_Constant (Id : E; V : B := True) is
5330 Set_Flag243 (Id, V);
5331 end Set_Overlays_Constant;
5333 procedure Set_Overridden_Operation (Id : E; V : E) is
5336 end Set_Overridden_Operation;
5338 procedure Set_Package_Instantiation (Id : E; V : N) is
5340 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
5342 end Set_Package_Instantiation;
5344 procedure Set_Packed_Array_Type (Id : E; V : E) is
5346 pragma Assert (Is_Array_Type (Id));
5348 end Set_Packed_Array_Type;
5350 procedure Set_Parent_Subtype (Id : E; V : E) is
5352 pragma Assert (Ekind (Id) = E_Record_Type);
5354 end Set_Parent_Subtype;
5356 procedure Set_Part_Of_Constituents (Id : E; V : L) is
5358 pragma Assert (Ekind (Id) = E_Abstract_State);
5360 end Set_Part_Of_Constituents;
5362 procedure Set_Postcondition_Proc (Id : E; V : E) is
5364 pragma Assert (Ekind (Id) = E_Procedure);
5366 end Set_Postcondition_Proc;
5368 procedure Set_PPC_Wrapper (Id : E; V : E) is
5370 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
5372 end Set_PPC_Wrapper;
5374 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
5376 pragma Assert (Is_Tagged_Type (Id));
5377 Set_Elist10 (Id, V);
5378 end Set_Direct_Primitive_Operations;
5380 procedure Set_Prival (Id : E; V : E) is
5382 pragma Assert (Is_Protected_Component (Id));
5386 procedure Set_Prival_Link (Id : E; V : E) is
5388 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5390 end Set_Prival_Link;
5392 procedure Set_Private_Dependents (Id : E; V : L) is
5394 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
5395 Set_Elist18 (Id, V);
5396 end Set_Private_Dependents;
5398 procedure Set_Private_View (Id : E; V : N) is
5400 pragma Assert (Is_Private_Type (Id));
5402 end Set_Private_View;
5404 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
5406 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
5408 end Set_Protected_Body_Subprogram;
5410 procedure Set_Protected_Formal (Id : E; V : E) is
5412 pragma Assert (Is_Formal (Id));
5414 end Set_Protected_Formal;
5416 procedure Set_Protection_Object (Id : E; V : E) is
5418 pragma Assert (Ekind_In (Id, E_Entry,
5423 end Set_Protection_Object;
5425 procedure Set_Reachable (Id : E; V : B := True) is
5430 procedure Set_Referenced (Id : E; V : B := True) is
5432 Set_Flag156 (Id, V);
5435 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
5438 end Set_Referenced_As_LHS;
5440 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
5442 Set_Flag227 (Id, V);
5443 end Set_Referenced_As_Out_Parameter;
5445 procedure Set_Refinement_Constituents (Id : E; V : L) is
5447 pragma Assert (Ekind (Id) = E_Abstract_State);
5449 end Set_Refinement_Constituents;
5451 procedure Set_Register_Exception_Call (Id : E; V : N) is
5453 pragma Assert (Ekind (Id) = E_Exception);
5455 end Set_Register_Exception_Call;
5457 procedure Set_Related_Array_Object (Id : E; V : E) is
5459 pragma Assert (Is_Array_Type (Id));
5461 end Set_Related_Array_Object;
5463 procedure Set_Related_Expression (Id : E; V : N) is
5465 pragma Assert (Ekind (Id) in Type_Kind
5466 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
5468 end Set_Related_Expression;
5470 procedure Set_Related_Instance (Id : E; V : E) is
5472 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
5474 end Set_Related_Instance;
5476 procedure Set_Related_Type (Id : E; V : E) is
5478 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5480 end Set_Related_Type;
5482 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5484 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
5486 end Set_Relative_Deadline_Variable;
5488 procedure Set_Renamed_Entity (Id : E; V : N) is
5491 end Set_Renamed_Entity;
5493 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5495 pragma Assert (Ekind (Id) = E_Package);
5496 Set_Flag231 (Id, V);
5497 end Set_Renamed_In_Spec;
5499 procedure Set_Renamed_Object (Id : E; V : N) is
5502 end Set_Renamed_Object;
5504 procedure Set_Renaming_Map (Id : E; V : U) is
5507 end Set_Renaming_Map;
5509 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5511 pragma Assert (Is_Overloadable (Id));
5512 Set_Flag213 (Id, V);
5513 end Set_Requires_Overriding;
5515 procedure Set_Return_Present (Id : E; V : B := True) is
5518 end Set_Return_Present;
5520 procedure Set_Return_Applies_To (Id : E; V : N) is
5523 end Set_Return_Applies_To;
5525 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5528 end Set_Returns_By_Ref;
5530 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5533 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5534 Set_Flag164 (Id, V);
5535 end Set_Reverse_Bit_Order;
5537 procedure Set_Reverse_Storage_Order (Id : E; V : B := True) is
5541 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5543 end Set_Reverse_Storage_Order;
5545 procedure Set_RM_Size (Id : E; V : U) is
5547 pragma Assert (Is_Type (Id));
5551 procedure Set_Scalar_Range (Id : E; V : N) is
5554 end Set_Scalar_Range;
5556 procedure Set_Scale_Value (Id : E; V : U) is
5559 end Set_Scale_Value;
5561 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5563 pragma Assert (not Is_Record_Type (Id));
5565 end Set_Scope_Depth_Value;
5567 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5569 Set_Flag167 (Id, V);
5570 end Set_Sec_Stack_Needed_For_Return;
5572 procedure Set_Shadow_Entities (Id : E; V : S) is
5574 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5576 end Set_Shadow_Entities;
5578 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5580 pragma Assert (Ekind (Id) = E_Variable);
5582 end Set_Shared_Var_Procs_Instance;
5584 procedure Set_Size_Check_Code (Id : E; V : N) is
5586 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5588 end Set_Size_Check_Code;
5590 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5592 Set_Flag177 (Id, V);
5593 end Set_Size_Depends_On_Discriminant;
5595 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5598 end Set_Size_Known_At_Compile_Time;
5600 procedure Set_Small_Value (Id : E; V : R) is
5602 pragma Assert (Is_Fixed_Point_Type (Id));
5603 Set_Ureal21 (Id, V);
5604 end Set_Small_Value;
5606 procedure Set_SPARK_Aux_Pragma (Id : E; V : N) is
5609 (Ekind_In (Id, E_Generic_Package, -- package variants
5614 end Set_SPARK_Aux_Pragma;
5616 procedure Set_SPARK_Aux_Pragma_Inherited (Id : E; V : B := True) is
5619 (Ekind_In (Id, E_Generic_Package, -- package variants
5623 Set_Flag266 (Id, V);
5624 end Set_SPARK_Aux_Pragma_Inherited;
5626 procedure Set_SPARK_Pragma (Id : E; V : N) is
5629 (Ekind_In (Id, E_Function, -- subprogram variants
5631 E_Generic_Procedure,
5635 Ekind_In (Id, E_Generic_Package, -- package variants
5640 end Set_SPARK_Pragma;
5642 procedure Set_SPARK_Pragma_Inherited (Id : E; V : B := True) is
5645 (Ekind_In (Id, E_Function, -- subprogram variants
5647 E_Generic_Procedure,
5651 Ekind_In (Id, E_Generic_Package, -- package variants
5655 Set_Flag265 (Id, V);
5656 end Set_SPARK_Pragma_Inherited;
5658 procedure Set_Spec_Entity (Id : E; V : E) is
5660 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5662 end Set_Spec_Entity;
5664 procedure Set_Static_Predicate (Id : E; V : S) is
5667 (Ekind_In (Id, E_Enumeration_Subtype,
5668 E_Modular_Integer_Subtype,
5669 E_Signed_Integer_Subtype)
5670 and then Has_Predicates (Id));
5672 end Set_Static_Predicate;
5674 procedure Set_Status_Flag_Or_Transient_Decl (Id : E; V : E) is
5676 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5678 end Set_Status_Flag_Or_Transient_Decl;
5680 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5682 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5683 pragma Assert (Id = Base_Type (Id));
5685 end Set_Storage_Size_Variable;
5687 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5689 pragma Assert (Ekind (Id) = E_Package);
5691 end Set_Static_Elaboration_Desired;
5693 procedure Set_Static_Initialization (Id : E; V : N) is
5696 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5698 end Set_Static_Initialization;
5700 procedure Set_Stored_Constraint (Id : E; V : L) is
5702 pragma Assert (Nkind (Id) in N_Entity);
5703 Set_Elist23 (Id, V);
5704 end Set_Stored_Constraint;
5706 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5708 pragma Assert (Id = Base_Type (Id));
5709 Set_Flag145 (Id, V);
5710 end Set_Strict_Alignment;
5712 procedure Set_String_Literal_Length (Id : E; V : U) is
5714 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5716 end Set_String_Literal_Length;
5718 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5720 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5722 end Set_String_Literal_Low_Bound;
5724 procedure Set_Subprograms_For_Type (Id : E; V : E) is
5726 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
5728 end Set_Subprograms_For_Type;
5730 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5732 Set_Flag148 (Id, V);
5733 end Set_Suppress_Elaboration_Warnings;
5735 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
5737 pragma Assert (Is_Type (Id));
5738 Set_Flag105 (Id, V);
5739 end Set_Suppress_Initialization;
5741 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5743 Set_Flag165 (Id, V);
5744 end Set_Suppress_Style_Checks;
5746 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5748 Set_Flag217 (Id, V);
5749 end Set_Suppress_Value_Tracking_On_Call;
5751 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5753 pragma Assert (Ekind (Id) in Task_Kind);
5755 end Set_Task_Body_Procedure;
5757 procedure Set_Thunk_Entity (Id : E; V : E) is
5759 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5760 and then Is_Thunk (Id));
5762 end Set_Thunk_Entity;
5764 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5767 end Set_Treat_As_Volatile;
5769 procedure Set_Underlying_Full_View (Id : E; V : E) is
5771 pragma Assert (Ekind (Id) in Private_Kind);
5773 end Set_Underlying_Full_View;
5775 procedure Set_Underlying_Record_View (Id : E; V : E) is
5777 pragma Assert (Ekind (Id) = E_Record_Type);
5779 end Set_Underlying_Record_View;
5781 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5783 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5784 Set_Flag216 (Id, V);
5785 end Set_Universal_Aliasing;
5787 procedure Set_Unset_Reference (Id : E; V : N) is
5790 end Set_Unset_Reference;
5792 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5794 Set_Flag222 (Id, V);
5795 end Set_Used_As_Generic_Actual;
5797 procedure Set_Uses_Lock_Free (Id : E; V : B := True) is
5799 pragma Assert (Ekind (Id) = E_Protected_Type);
5800 Set_Flag188 (Id, V);
5801 end Set_Uses_Lock_Free;
5803 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5806 end Set_Uses_Sec_Stack;
5808 procedure Set_Warnings_Off (Id : E; V : B := True) is
5811 end Set_Warnings_Off;
5813 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
5815 Set_Flag236 (Id, V);
5816 end Set_Warnings_Off_Used;
5818 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
5820 Set_Flag237 (Id, V);
5821 end Set_Warnings_Off_Used_Unmodified;
5823 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
5825 Set_Flag238 (Id, V);
5826 end Set_Warnings_Off_Used_Unreferenced;
5828 procedure Set_Was_Hidden (Id : E; V : B := True) is
5830 Set_Flag196 (Id, V);
5833 procedure Set_Wrapped_Entity (Id : E; V : E) is
5835 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5836 and then Is_Primitive_Wrapper (Id));
5838 end Set_Wrapped_Entity;
5840 -----------------------------------
5841 -- Field Initialization Routines --
5842 -----------------------------------
5844 procedure Init_Alignment (Id : E) is
5846 Set_Uint14 (Id, Uint_0);
5849 procedure Init_Alignment (Id : E; V : Int) is
5851 Set_Uint14 (Id, UI_From_Int (V));
5854 procedure Init_Component_Bit_Offset (Id : E) is
5856 Set_Uint11 (Id, No_Uint);
5857 end Init_Component_Bit_Offset;
5859 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
5861 Set_Uint11 (Id, UI_From_Int (V));
5862 end Init_Component_Bit_Offset;
5864 procedure Init_Component_Size (Id : E) is
5866 Set_Uint22 (Id, Uint_0);
5867 end Init_Component_Size;
5869 procedure Init_Component_Size (Id : E; V : Int) is
5871 Set_Uint22 (Id, UI_From_Int (V));
5872 end Init_Component_Size;
5874 procedure Init_Digits_Value (Id : E) is
5876 Set_Uint17 (Id, Uint_0);
5877 end Init_Digits_Value;
5879 procedure Init_Digits_Value (Id : E; V : Int) is
5881 Set_Uint17 (Id, UI_From_Int (V));
5882 end Init_Digits_Value;
5884 procedure Init_Esize (Id : E) is
5886 Set_Uint12 (Id, Uint_0);
5889 procedure Init_Esize (Id : E; V : Int) is
5891 Set_Uint12 (Id, UI_From_Int (V));
5894 procedure Init_Normalized_First_Bit (Id : E) is
5896 Set_Uint8 (Id, No_Uint);
5897 end Init_Normalized_First_Bit;
5899 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
5901 Set_Uint8 (Id, UI_From_Int (V));
5902 end Init_Normalized_First_Bit;
5904 procedure Init_Normalized_Position (Id : E) is
5906 Set_Uint14 (Id, No_Uint);
5907 end Init_Normalized_Position;
5909 procedure Init_Normalized_Position (Id : E; V : Int) is
5911 Set_Uint14 (Id, UI_From_Int (V));
5912 end Init_Normalized_Position;
5914 procedure Init_Normalized_Position_Max (Id : E) is
5916 Set_Uint10 (Id, No_Uint);
5917 end Init_Normalized_Position_Max;
5919 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
5921 Set_Uint10 (Id, UI_From_Int (V));
5922 end Init_Normalized_Position_Max;
5924 procedure Init_RM_Size (Id : E) is
5926 Set_Uint13 (Id, Uint_0);
5929 procedure Init_RM_Size (Id : E; V : Int) is
5931 Set_Uint13 (Id, UI_From_Int (V));
5934 -----------------------------
5935 -- Init_Component_Location --
5936 -----------------------------
5938 procedure Init_Component_Location (Id : E) is
5940 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
5941 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
5942 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
5943 Set_Uint12 (Id, Uint_0); -- Esize
5944 Set_Uint14 (Id, No_Uint); -- Normalized_Position
5945 end Init_Component_Location;
5947 ----------------------------
5948 -- Init_Object_Size_Align --
5949 ----------------------------
5951 procedure Init_Object_Size_Align (Id : E) is
5953 Set_Uint12 (Id, Uint_0); -- Esize
5954 Set_Uint14 (Id, Uint_0); -- Alignment
5955 end Init_Object_Size_Align;
5961 procedure Init_Size (Id : E; V : Int) is
5963 pragma Assert (not Is_Object (Id));
5964 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
5965 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
5968 ---------------------
5969 -- Init_Size_Align --
5970 ---------------------
5972 procedure Init_Size_Align (Id : E) is
5974 pragma Assert (not Is_Object (Id));
5975 Set_Uint12 (Id, Uint_0); -- Esize
5976 Set_Uint13 (Id, Uint_0); -- RM_Size
5977 Set_Uint14 (Id, Uint_0); -- Alignment
5978 end Init_Size_Align;
5980 ----------------------------------------------
5981 -- Type Representation Attribute Predicates --
5982 ----------------------------------------------
5984 function Known_Alignment (E : Entity_Id) return B is
5986 return Uint14 (E) /= Uint_0
5987 and then Uint14 (E) /= No_Uint;
5988 end Known_Alignment;
5990 function Known_Component_Bit_Offset (E : Entity_Id) return B is
5992 return Uint11 (E) /= No_Uint;
5993 end Known_Component_Bit_Offset;
5995 function Known_Component_Size (E : Entity_Id) return B is
5997 return Uint22 (Base_Type (E)) /= Uint_0
5998 and then Uint22 (Base_Type (E)) /= No_Uint;
5999 end Known_Component_Size;
6001 function Known_Esize (E : Entity_Id) return B is
6003 return Uint12 (E) /= Uint_0
6004 and then Uint12 (E) /= No_Uint;
6007 function Known_Normalized_First_Bit (E : Entity_Id) return B is
6009 return Uint8 (E) /= No_Uint;
6010 end Known_Normalized_First_Bit;
6012 function Known_Normalized_Position (E : Entity_Id) return B is
6014 return Uint14 (E) /= No_Uint;
6015 end Known_Normalized_Position;
6017 function Known_Normalized_Position_Max (E : Entity_Id) return B is
6019 return Uint10 (E) /= No_Uint;
6020 end Known_Normalized_Position_Max;
6022 function Known_RM_Size (E : Entity_Id) return B is
6024 return Uint13 (E) /= No_Uint
6025 and then (Uint13 (E) /= Uint_0
6026 or else Is_Discrete_Type (E)
6027 or else Is_Fixed_Point_Type (E));
6030 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
6032 return Uint11 (E) /= No_Uint
6033 and then Uint11 (E) >= Uint_0;
6034 end Known_Static_Component_Bit_Offset;
6036 function Known_Static_Component_Size (E : Entity_Id) return B is
6038 return Uint22 (Base_Type (E)) > Uint_0;
6039 end Known_Static_Component_Size;
6041 function Known_Static_Esize (E : Entity_Id) return B is
6043 return Uint12 (E) > Uint_0
6044 and then not Is_Generic_Type (E);
6045 end Known_Static_Esize;
6047 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
6049 return Uint8 (E) /= No_Uint
6050 and then Uint8 (E) >= Uint_0;
6051 end Known_Static_Normalized_First_Bit;
6053 function Known_Static_Normalized_Position (E : Entity_Id) return B is
6055 return Uint14 (E) /= No_Uint
6056 and then Uint14 (E) >= Uint_0;
6057 end Known_Static_Normalized_Position;
6059 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
6061 return Uint10 (E) /= No_Uint
6062 and then Uint10 (E) >= Uint_0;
6063 end Known_Static_Normalized_Position_Max;
6065 function Known_Static_RM_Size (E : Entity_Id) return B is
6067 return (Uint13 (E) > Uint_0
6068 or else Is_Discrete_Type (E)
6069 or else Is_Fixed_Point_Type (E))
6070 and then not Is_Generic_Type (E);
6071 end Known_Static_RM_Size;
6073 function Unknown_Alignment (E : Entity_Id) return B is
6075 return Uint14 (E) = Uint_0
6076 or else Uint14 (E) = No_Uint;
6077 end Unknown_Alignment;
6079 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
6081 return Uint11 (E) = No_Uint;
6082 end Unknown_Component_Bit_Offset;
6084 function Unknown_Component_Size (E : Entity_Id) return B is
6086 return Uint22 (Base_Type (E)) = Uint_0
6088 Uint22 (Base_Type (E)) = No_Uint;
6089 end Unknown_Component_Size;
6091 function Unknown_Esize (E : Entity_Id) return B is
6093 return Uint12 (E) = No_Uint
6095 Uint12 (E) = Uint_0;
6098 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
6100 return Uint8 (E) = No_Uint;
6101 end Unknown_Normalized_First_Bit;
6103 function Unknown_Normalized_Position (E : Entity_Id) return B is
6105 return Uint14 (E) = No_Uint;
6106 end Unknown_Normalized_Position;
6108 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
6110 return Uint10 (E) = No_Uint;
6111 end Unknown_Normalized_Position_Max;
6113 function Unknown_RM_Size (E : Entity_Id) return B is
6115 return (Uint13 (E) = Uint_0
6116 and then not Is_Discrete_Type (E)
6117 and then not Is_Fixed_Point_Type (E))
6118 or else Uint13 (E) = No_Uint;
6119 end Unknown_RM_Size;
6121 --------------------
6122 -- Address_Clause --
6123 --------------------
6125 function Address_Clause (Id : E) return N is
6127 return Get_Attribute_Definition_Clause (Id, Attribute_Address);
6134 function Aft_Value (Id : E) return U is
6136 Delta_Val : Ureal := Delta_Value (Id);
6138 while Delta_Val < Ureal_Tenth loop
6139 Delta_Val := Delta_Val * Ureal_10;
6140 Result := Result + 1;
6143 return UI_From_Int (Result);
6146 ----------------------
6147 -- Alignment_Clause --
6148 ----------------------
6150 function Alignment_Clause (Id : E) return N is
6152 return Get_Attribute_Definition_Clause (Id, Attribute_Alignment);
6153 end Alignment_Clause;
6159 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
6161 if Last_Entity (V) = Empty then
6162 Set_First_Entity (Id => V, V => Id);
6164 Set_Next_Entity (Last_Entity (V), Id);
6167 Set_Next_Entity (Id, Empty);
6169 Set_Last_Entity (Id => V, V => Id);
6176 function Base_Type (Id : E) return E is
6178 if Is_Base_Type (Id) then
6181 pragma Assert (Is_Type (Id));
6186 -------------------------
6187 -- Component_Alignment --
6188 -------------------------
6190 -- Component Alignment is encoded using two flags, Flag128/129 as
6191 -- follows. Note that both flags False = Align_Default, so that the
6192 -- default initialization of flags to False initializes component
6193 -- alignment to the default value as required.
6195 -- Flag128 Flag129 Value
6196 -- ------- ------- -----
6197 -- False False Calign_Default
6198 -- False True Calign_Component_Size
6199 -- True False Calign_Component_Size_4
6200 -- True True Calign_Storage_Unit
6202 function Component_Alignment (Id : E) return C is
6203 BT : constant Node_Id := Base_Type (Id);
6206 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
6208 if Flag128 (BT) then
6209 if Flag129 (BT) then
6210 return Calign_Storage_Unit;
6212 return Calign_Component_Size_4;
6216 if Flag129 (BT) then
6217 return Calign_Component_Size;
6219 return Calign_Default;
6222 end Component_Alignment;
6224 ----------------------
6225 -- Declaration_Node --
6226 ----------------------
6228 function Declaration_Node (Id : E) return N is
6232 if Ekind (Id) = E_Incomplete_Type
6233 and then Present (Full_View (Id))
6235 P := Parent (Full_View (Id));
6241 if Nkind (P) /= N_Selected_Component
6242 and then Nkind (P) /= N_Expanded_Name
6244 not (Nkind (P) = N_Defining_Program_Unit_Name
6245 and then Is_Child_Unit (Id))
6252 end Declaration_Node;
6254 ---------------------
6255 -- Designated_Type --
6256 ---------------------
6258 function Designated_Type (Id : E) return E is
6262 Desig_Type := Directly_Designated_Type (Id);
6264 if Ekind (Desig_Type) = E_Incomplete_Type
6265 and then Present (Full_View (Desig_Type))
6267 return Full_View (Desig_Type);
6269 elsif Is_Class_Wide_Type (Desig_Type)
6270 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
6271 and then Present (Full_View (Etype (Desig_Type)))
6272 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
6274 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
6279 end Designated_Type;
6281 ----------------------
6282 -- Entry_Index_Type --
6283 ----------------------
6285 function Entry_Index_Type (Id : E) return N is
6287 pragma Assert (Ekind (Id) = E_Entry_Family);
6288 return Etype (Discrete_Subtype_Definition (Parent (Id)));
6289 end Entry_Index_Type;
6291 ---------------------
6292 -- First_Component --
6293 ---------------------
6295 function First_Component (Id : E) return E is
6300 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
6302 Comp_Id := First_Entity (Id);
6303 while Present (Comp_Id) loop
6304 exit when Ekind (Comp_Id) = E_Component;
6305 Comp_Id := Next_Entity (Comp_Id);
6309 end First_Component;
6311 -------------------------------------
6312 -- First_Component_Or_Discriminant --
6313 -------------------------------------
6315 function First_Component_Or_Discriminant (Id : E) return E is
6320 (Is_Record_Type (Id)
6321 or else Is_Incomplete_Or_Private_Type (Id)
6322 or else Has_Discriminants (Id));
6324 Comp_Id := First_Entity (Id);
6325 while Present (Comp_Id) loop
6326 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6327 Comp_Id := Next_Entity (Comp_Id);
6331 end First_Component_Or_Discriminant;
6337 function First_Formal (Id : E) return E is
6342 (Is_Overloadable (Id)
6343 or else Ekind_In (Id, E_Entry_Family,
6345 E_Subprogram_Type));
6347 if Ekind (Id) = E_Enumeration_Literal then
6351 Formal := First_Entity (Id);
6353 if Present (Formal) and then Is_Formal (Formal) then
6361 ------------------------------
6362 -- First_Formal_With_Extras --
6363 ------------------------------
6365 function First_Formal_With_Extras (Id : E) return E is
6370 (Is_Overloadable (Id)
6371 or else Ekind_In (Id, E_Entry_Family,
6373 E_Subprogram_Type));
6375 if Ekind (Id) = E_Enumeration_Literal then
6379 Formal := First_Entity (Id);
6381 if Present (Formal) and then Is_Formal (Formal) then
6384 return Extra_Formals (Id); -- Empty if no extra formals
6387 end First_Formal_With_Extras;
6389 -------------------------------------
6390 -- Get_Attribute_Definition_Clause --
6391 -------------------------------------
6393 function Get_Attribute_Definition_Clause
6395 Id : Attribute_Id) return Node_Id
6400 N := First_Rep_Item (E);
6401 while Present (N) loop
6402 if Nkind (N) = N_Attribute_Definition_Clause
6403 and then Get_Attribute_Id (Chars (N)) = Id
6412 end Get_Attribute_Definition_Clause;
6418 function Get_Full_View (T : Entity_Id) return Entity_Id is
6420 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
6421 return Full_View (T);
6423 elsif Is_Class_Wide_Type (T)
6424 and then Ekind (Root_Type (T)) = E_Incomplete_Type
6425 and then Present (Full_View (Root_Type (T)))
6427 return Class_Wide_Type (Full_View (Root_Type (T)));
6438 function Get_Pragma (E : Entity_Id; Id : Pragma_Id) return Node_Id is
6439 Is_CDG : constant Boolean :=
6440 Id = Pragma_Abstract_State or else
6441 Id = Pragma_Async_Readers or else
6442 Id = Pragma_Async_Writers or else
6443 Id = Pragma_Depends or else
6444 Id = Pragma_Effective_Reads or else
6445 Id = Pragma_Effective_Writes or else
6446 Id = Pragma_Global or else
6447 Id = Pragma_Initial_Condition or else
6448 Id = Pragma_Initializes or else
6449 Id = Pragma_Part_Of or else
6450 Id = Pragma_Refined_Depends or else
6451 Id = Pragma_Refined_Global or else
6452 Id = Pragma_Refined_State;
6453 Is_CTC : constant Boolean :=
6454 Id = Pragma_Contract_Cases or else
6455 Id = Pragma_Test_Case;
6456 Is_PPC : constant Boolean :=
6457 Id = Pragma_Precondition or else
6458 Id = Pragma_Postcondition or else
6459 Id = Pragma_Refined_Post;
6461 In_Contract : constant Boolean := Is_CDG or Is_CTC or Is_PPC;
6467 -- Handle pragmas that appear in N_Contract nodes. Those have to be
6468 -- extracted from their specialized list.
6471 Items := Contract (E);
6477 Item := Classifications (Items);
6480 Item := Contract_Test_Cases (Items);
6483 Item := Pre_Post_Conditions (Items);
6489 Item := First_Rep_Item (E);
6492 while Present (Item) loop
6493 if Nkind (Item) = N_Pragma
6494 and then Get_Pragma_Id (Pragma_Name (Item)) = Id
6498 -- All nodes in N_Contract are chained using Next_Pragma
6500 elsif In_Contract then
6501 Item := Next_Pragma (Item);
6506 Next_Rep_Item (Item);
6513 --------------------------------------
6514 -- Get_Record_Representation_Clause --
6515 --------------------------------------
6517 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
6521 N := First_Rep_Item (E);
6522 while Present (N) loop
6523 if Nkind (N) = N_Record_Representation_Clause then
6531 end Get_Record_Representation_Clause;
6533 ------------------------
6534 -- Has_Attach_Handler --
6535 ------------------------
6537 function Has_Attach_Handler (Id : E) return B is
6541 pragma Assert (Is_Protected_Type (Id));
6543 Ritem := First_Rep_Item (Id);
6544 while Present (Ritem) loop
6545 if Nkind (Ritem) = N_Pragma
6546 and then Pragma_Name (Ritem) = Name_Attach_Handler
6550 Next_Rep_Item (Ritem);
6555 end Has_Attach_Handler;
6561 function Has_Entries (Id : E) return B is
6565 pragma Assert (Is_Concurrent_Type (Id));
6567 Ent := First_Entity (Id);
6568 while Present (Ent) loop
6569 if Is_Entry (Ent) then
6573 Ent := Next_Entity (Ent);
6579 ----------------------------
6580 -- Has_Foreign_Convention --
6581 ----------------------------
6583 function Has_Foreign_Convention (Id : E) return B is
6585 -- While regular Intrinsics such as the Standard operators fit in the
6586 -- "Ada" convention, those with an Interface_Name materialize GCC
6587 -- builtin imports for which Ada special treatments shouldn't apply.
6589 return Convention (Id) in Foreign_Convention
6590 or else (Convention (Id) = Convention_Intrinsic
6591 and then Present (Interface_Name (Id)));
6592 end Has_Foreign_Convention;
6594 ---------------------------
6595 -- Has_Interrupt_Handler --
6596 ---------------------------
6598 function Has_Interrupt_Handler (Id : E) return B is
6602 pragma Assert (Is_Protected_Type (Id));
6604 Ritem := First_Rep_Item (Id);
6605 while Present (Ritem) loop
6606 if Nkind (Ritem) = N_Pragma
6607 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6611 Next_Rep_Item (Ritem);
6616 end Has_Interrupt_Handler;
6618 -----------------------------
6619 -- Has_Non_Null_Refinement --
6620 -----------------------------
6622 function Has_Non_Null_Refinement (Id : E) return B is
6624 -- "Refinement" is a concept applicable only to abstract states
6626 pragma Assert (Ekind (Id) = E_Abstract_State);
6628 if Has_Visible_Refinement (Id) then
6629 pragma Assert (Present (Refinement_Constituents (Id)));
6631 -- For a refinement to be non-null, the first constituent must be
6632 -- anything other than null.
6635 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) /= N_Null;
6639 end Has_Non_Null_Refinement;
6641 -----------------------------
6642 -- Has_Null_Abstract_State --
6643 -----------------------------
6645 function Has_Null_Abstract_State (Id : E) return B is
6647 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
6650 Present (Abstract_States (Id))
6651 and then Is_Null_State (Node (First_Elmt (Abstract_States (Id))));
6652 end Has_Null_Abstract_State;
6654 -------------------------
6655 -- Has_Null_Refinement --
6656 -------------------------
6658 function Has_Null_Refinement (Id : E) return B is
6660 -- "Refinement" is a concept applicable only to abstract states
6662 pragma Assert (Ekind (Id) = E_Abstract_State);
6664 if Has_Visible_Refinement (Id) then
6665 pragma Assert (Present (Refinement_Constituents (Id)));
6667 -- For a refinement to be null, the state's sole constituent must be
6671 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) = N_Null;
6675 end Has_Null_Refinement;
6677 --------------------
6678 -- Has_Unmodified --
6679 --------------------
6681 function Has_Unmodified (E : Entity_Id) return Boolean is
6683 if Has_Pragma_Unmodified (E) then
6685 elsif Warnings_Off (E) then
6686 Set_Warnings_Off_Used_Unmodified (E);
6693 ---------------------
6694 -- Has_Unreferenced --
6695 ---------------------
6697 function Has_Unreferenced (E : Entity_Id) return Boolean is
6699 if Has_Pragma_Unreferenced (E) then
6701 elsif Warnings_Off (E) then
6702 Set_Warnings_Off_Used_Unreferenced (E);
6707 end Has_Unreferenced;
6709 ----------------------
6710 -- Has_Warnings_Off --
6711 ----------------------
6713 function Has_Warnings_Off (E : Entity_Id) return Boolean is
6715 if Warnings_Off (E) then
6716 Set_Warnings_Off_Used (E);
6721 end Has_Warnings_Off;
6723 ------------------------------
6724 -- Implementation_Base_Type --
6725 ------------------------------
6727 function Implementation_Base_Type (Id : E) return E is
6732 Bastyp := Base_Type (Id);
6734 if Is_Incomplete_Or_Private_Type (Bastyp) then
6735 Imptyp := Underlying_Type (Bastyp);
6737 -- If we have an implementation type, then just return it,
6738 -- otherwise we return the Base_Type anyway. This can only
6739 -- happen in error situations and should avoid some error bombs.
6741 if Present (Imptyp) then
6742 return Base_Type (Imptyp);
6750 end Implementation_Base_Type;
6752 -------------------------
6753 -- Invariant_Procedure --
6754 -------------------------
6756 function Invariant_Procedure (Id : E) return E is
6760 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
6762 if No (Subprograms_For_Type (Id)) then
6766 S := Subprograms_For_Type (Id);
6767 while Present (S) loop
6768 if Is_Invariant_Procedure (S) then
6771 S := Subprograms_For_Type (S);
6777 end Invariant_Procedure;
6783 -- Global flag table allowing rapid computation of this function
6785 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
6786 (E_Enumeration_Subtype |
6788 E_Signed_Integer_Subtype |
6789 E_Modular_Integer_Subtype |
6790 E_Floating_Point_Subtype |
6791 E_Ordinary_Fixed_Point_Subtype |
6792 E_Decimal_Fixed_Point_Subtype |
6797 E_Record_Subtype_With_Private |
6798 E_Limited_Private_Subtype |
6800 E_Protected_Subtype |
6802 E_String_Literal_Subtype |
6803 E_Class_Wide_Subtype => False,
6806 function Is_Base_Type (Id : E) return Boolean is
6808 return Entity_Is_Base_Type (Ekind (Id));
6811 ---------------------
6812 -- Is_Boolean_Type --
6813 ---------------------
6815 function Is_Boolean_Type (Id : E) return B is
6817 return Root_Type (Id) = Standard_Boolean;
6818 end Is_Boolean_Type;
6820 ------------------------
6821 -- Is_Constant_Object --
6822 ------------------------
6824 function Is_Constant_Object (Id : E) return B is
6825 K : constant Entity_Kind := Ekind (Id);
6828 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
6829 end Is_Constant_Object;
6831 --------------------
6832 -- Is_Discriminal --
6833 --------------------
6835 function Is_Discriminal (Id : E) return B is
6837 return (Ekind_In (Id, E_Constant, E_In_Parameter)
6838 and then Present (Discriminal_Link (Id)));
6841 ----------------------
6842 -- Is_Dynamic_Scope --
6843 ----------------------
6845 function Is_Dynamic_Scope (Id : E) return B is
6848 Ekind (Id) = E_Block
6850 Ekind (Id) = E_Function
6852 Ekind (Id) = E_Procedure
6854 Ekind (Id) = E_Subprogram_Body
6856 Ekind (Id) = E_Task_Type
6858 (Ekind (Id) = E_Limited_Private_Type
6859 and then Present (Full_View (Id))
6860 and then Ekind (Full_View (Id)) = E_Task_Type)
6862 Ekind (Id) = E_Entry
6864 Ekind (Id) = E_Entry_Family
6866 Ekind (Id) = E_Return_Statement;
6867 end Is_Dynamic_Scope;
6869 --------------------
6870 -- Is_Entity_Name --
6871 --------------------
6873 function Is_Entity_Name (N : Node_Id) return Boolean is
6874 Kind : constant Node_Kind := Nkind (N);
6877 -- Identifiers, operator symbols, expanded names are entity names
6879 return Kind = N_Identifier
6880 or else Kind = N_Operator_Symbol
6881 or else Kind = N_Expanded_Name
6883 -- Attribute references are entity names if they refer to an entity.
6884 -- Note that we don't do this by testing for the presence of the
6885 -- Entity field in the N_Attribute_Reference node, since it may not
6886 -- have been set yet.
6888 or else (Kind = N_Attribute_Reference
6889 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
6892 -----------------------
6893 -- Is_External_State --
6894 -----------------------
6896 function Is_External_State (Id : E) return B is
6899 Ekind (Id) = E_Abstract_State and then Has_Option (Id, Name_External);
6900 end Is_External_State;
6906 function Is_Finalizer (Id : E) return B is
6908 return Ekind (Id) = E_Procedure and then Chars (Id) = Name_uFinalizer;
6911 ---------------------
6912 -- Is_Ghost_Entity --
6913 ---------------------
6915 -- Note: coding below allows for ghost variables. They are not currently
6916 -- implemented, so we will always get False for variables, but that is
6917 -- expected to change in the future.
6919 function Is_Ghost_Entity (Id : E) return B is
6921 if Present (Id) and then Ekind (Id) = E_Variable then
6922 return Convention (Id) = Convention_Ghost;
6924 return Is_Ghost_Subprogram (Id);
6926 end Is_Ghost_Entity;
6928 -------------------------
6929 -- Is_Ghost_Subprogram --
6930 -------------------------
6932 function Is_Ghost_Subprogram (Id : E) return B is
6934 if Present (Id) and then Ekind_In (Id, E_Function, E_Procedure) then
6935 return Convention (Id) = Convention_Ghost;
6939 end Is_Ghost_Subprogram;
6945 function Is_Null_State (Id : E) return B is
6948 Ekind (Id) = E_Abstract_State and then Nkind (Parent (Id)) = N_Null;
6951 -----------------------------------
6952 -- Is_Package_Or_Generic_Package --
6953 -----------------------------------
6955 function Is_Package_Or_Generic_Package (Id : E) return B is
6957 return Ekind_In (Id, E_Generic_Package, E_Package);
6958 end Is_Package_Or_Generic_Package;
6964 function Is_Prival (Id : E) return B is
6966 return (Ekind_In (Id, E_Constant, E_Variable)
6967 and then Present (Prival_Link (Id)));
6970 ----------------------------
6971 -- Is_Protected_Component --
6972 ----------------------------
6974 function Is_Protected_Component (Id : E) return B is
6976 return Ekind (Id) = E_Component and then Is_Protected_Type (Scope (Id));
6977 end Is_Protected_Component;
6979 ----------------------------
6980 -- Is_Protected_Interface --
6981 ----------------------------
6983 function Is_Protected_Interface (Id : E) return B is
6984 Typ : constant Entity_Id := Base_Type (Id);
6986 if not Is_Interface (Typ) then
6988 elsif Is_Class_Wide_Type (Typ) then
6989 return Is_Protected_Interface (Etype (Typ));
6991 return Protected_Present (Type_Definition (Parent (Typ)));
6993 end Is_Protected_Interface;
6995 ------------------------------
6996 -- Is_Protected_Record_Type --
6997 ------------------------------
6999 function Is_Protected_Record_Type (Id : E) return B is
7002 Is_Concurrent_Record_Type (Id)
7003 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
7004 end Is_Protected_Record_Type;
7006 --------------------------------
7007 -- Is_Standard_Character_Type --
7008 --------------------------------
7010 function Is_Standard_Character_Type (Id : E) return B is
7012 if Is_Type (Id) then
7014 R : constant Entity_Id := Root_Type (Id);
7017 R = Standard_Character
7019 R = Standard_Wide_Character
7021 R = Standard_Wide_Wide_Character;
7027 end Is_Standard_Character_Type;
7029 --------------------
7030 -- Is_String_Type --
7031 --------------------
7033 function Is_String_Type (Id : E) return B is
7035 return Ekind (Id) in String_Kind
7036 or else (Is_Array_Type (Id)
7037 and then Id /= Any_Composite
7038 and then Number_Dimensions (Id) = 1
7039 and then Is_Character_Type (Component_Type (Id)));
7042 -------------------------------
7043 -- Is_Synchronized_Interface --
7044 -------------------------------
7046 function Is_Synchronized_Interface (Id : E) return B is
7047 Typ : constant Entity_Id := Base_Type (Id);
7050 if not Is_Interface (Typ) then
7053 elsif Is_Class_Wide_Type (Typ) then
7054 return Is_Synchronized_Interface (Etype (Typ));
7057 return Protected_Present (Type_Definition (Parent (Typ)))
7058 or else Synchronized_Present (Type_Definition (Parent (Typ)))
7059 or else Task_Present (Type_Definition (Parent (Typ)));
7061 end Is_Synchronized_Interface;
7063 -----------------------
7064 -- Is_Task_Interface --
7065 -----------------------
7067 function Is_Task_Interface (Id : E) return B is
7068 Typ : constant Entity_Id := Base_Type (Id);
7070 if not Is_Interface (Typ) then
7072 elsif Is_Class_Wide_Type (Typ) then
7073 return Is_Task_Interface (Etype (Typ));
7075 return Task_Present (Type_Definition (Parent (Typ)));
7077 end Is_Task_Interface;
7079 -------------------------
7080 -- Is_Task_Record_Type --
7081 -------------------------
7083 function Is_Task_Record_Type (Id : E) return B is
7086 Is_Concurrent_Record_Type (Id)
7087 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
7088 end Is_Task_Record_Type;
7090 ------------------------
7091 -- Is_Wrapper_Package --
7092 ------------------------
7094 function Is_Wrapper_Package (Id : E) return B is
7096 return (Ekind (Id) = E_Package and then Present (Related_Instance (Id)));
7097 end Is_Wrapper_Package;
7103 function Last_Formal (Id : E) return E is
7108 (Is_Overloadable (Id)
7109 or else Ekind_In (Id, E_Entry_Family,
7111 E_Subprogram_Type));
7113 if Ekind (Id) = E_Enumeration_Literal then
7117 Formal := First_Formal (Id);
7119 if Present (Formal) then
7120 while Present (Next_Formal (Formal)) loop
7121 Formal := Next_Formal (Formal);
7129 function Model_Emin_Value (Id : E) return Uint is
7131 return Machine_Emin_Value (Id);
7132 end Model_Emin_Value;
7134 -------------------------
7135 -- Model_Epsilon_Value --
7136 -------------------------
7138 function Model_Epsilon_Value (Id : E) return Ureal is
7139 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7141 return Radix ** (1 - Model_Mantissa_Value (Id));
7142 end Model_Epsilon_Value;
7144 --------------------------
7145 -- Model_Mantissa_Value --
7146 --------------------------
7148 function Model_Mantissa_Value (Id : E) return Uint is
7150 return Machine_Mantissa_Value (Id);
7151 end Model_Mantissa_Value;
7153 -----------------------
7154 -- Model_Small_Value --
7155 -----------------------
7157 function Model_Small_Value (Id : E) return Ureal is
7158 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7160 return Radix ** (Model_Emin_Value (Id) - 1);
7161 end Model_Small_Value;
7163 ------------------------
7164 -- Machine_Emax_Value --
7165 ------------------------
7167 function Machine_Emax_Value (Id : E) return Uint is
7168 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7171 case Float_Rep (Id) is
7174 when 1 .. 6 => return Uint_128;
7175 when 7 .. 15 => return 2**10;
7176 when 16 .. 33 => return 2**14;
7177 when others => return No_Uint;
7182 when 1 .. 9 => return 2**7 - 1;
7183 when 10 .. 15 => return 2**10 - 1;
7184 when others => return No_Uint;
7188 return Uint_2 ** Uint_7 - Uint_1;
7190 end Machine_Emax_Value;
7192 ------------------------
7193 -- Machine_Emin_Value --
7194 ------------------------
7196 function Machine_Emin_Value (Id : E) return Uint is
7198 case Float_Rep (Id) is
7199 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
7200 when VAX_Native => return -Machine_Emax_Value (Id);
7201 when AAMP => return -Machine_Emax_Value (Id);
7203 end Machine_Emin_Value;
7205 ----------------------------
7206 -- Machine_Mantissa_Value --
7207 ----------------------------
7209 function Machine_Mantissa_Value (Id : E) return Uint is
7210 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7213 case Float_Rep (Id) is
7216 when 1 .. 6 => return Uint_24;
7217 when 7 .. 15 => return UI_From_Int (53);
7218 when 16 .. 18 => return Uint_64;
7219 when 19 .. 33 => return UI_From_Int (113);
7220 when others => return No_Uint;
7225 when 1 .. 6 => return Uint_24;
7226 when 7 .. 9 => return UI_From_Int (56);
7227 when 10 .. 15 => return UI_From_Int (53);
7228 when others => return No_Uint;
7233 when 1 .. 6 => return Uint_24;
7234 when 7 .. 9 => return UI_From_Int (40);
7235 when others => return No_Uint;
7238 end Machine_Mantissa_Value;
7240 -------------------------
7241 -- Machine_Radix_Value --
7242 -------------------------
7244 function Machine_Radix_Value (Id : E) return U is
7246 case Float_Rep (Id) is
7247 when IEEE_Binary | VAX_Native | AAMP =>
7250 end Machine_Radix_Value;
7252 --------------------
7253 -- Next_Component --
7254 --------------------
7256 function Next_Component (Id : E) return E is
7260 Comp_Id := Next_Entity (Id);
7261 while Present (Comp_Id) loop
7262 exit when Ekind (Comp_Id) = E_Component;
7263 Comp_Id := Next_Entity (Comp_Id);
7269 ------------------------------------
7270 -- Next_Component_Or_Discriminant --
7271 ------------------------------------
7273 function Next_Component_Or_Discriminant (Id : E) return E is
7277 Comp_Id := Next_Entity (Id);
7278 while Present (Comp_Id) loop
7279 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
7280 Comp_Id := Next_Entity (Comp_Id);
7284 end Next_Component_Or_Discriminant;
7286 -----------------------
7287 -- Next_Discriminant --
7288 -----------------------
7290 -- This function actually implements both Next_Discriminant and
7291 -- Next_Stored_Discriminant by making sure that the Discriminant
7292 -- returned is of the same variety as Id.
7294 function Next_Discriminant (Id : E) return E is
7296 -- Derived Tagged types with private extensions look like this...
7298 -- E_Discriminant d1
7299 -- E_Discriminant d2
7301 -- E_Discriminant d1
7302 -- E_Discriminant d2
7305 -- so it is critical not to go past the leading discriminants
7310 pragma Assert (Ekind (Id) = E_Discriminant);
7313 D := Next_Entity (D);
7315 or else (Ekind (D) /= E_Discriminant
7316 and then not Is_Itype (D))
7321 exit when Ekind (D) = E_Discriminant
7322 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
7326 end Next_Discriminant;
7332 function Next_Formal (Id : E) return E is
7336 -- Follow the chain of declared entities as long as the kind of the
7337 -- entity corresponds to a formal parameter. Skip internal entities
7338 -- that may have been created for implicit subtypes, in the process
7339 -- of analyzing default expressions.
7343 P := Next_Entity (P);
7345 if No (P) or else Is_Formal (P) then
7347 elsif not Is_Internal (P) then
7353 -----------------------------
7354 -- Next_Formal_With_Extras --
7355 -----------------------------
7357 function Next_Formal_With_Extras (Id : E) return E is
7359 if Present (Extra_Formal (Id)) then
7360 return Extra_Formal (Id);
7362 return Next_Formal (Id);
7364 end Next_Formal_With_Extras;
7370 function Next_Index (Id : Node_Id) return Node_Id is
7379 function Next_Literal (Id : E) return E is
7381 pragma Assert (Nkind (Id) in N_Entity);
7385 ------------------------------
7386 -- Next_Stored_Discriminant --
7387 ------------------------------
7389 function Next_Stored_Discriminant (Id : E) return E is
7391 -- See comment in Next_Discriminant
7393 return Next_Discriminant (Id);
7394 end Next_Stored_Discriminant;
7396 -----------------------
7397 -- Number_Dimensions --
7398 -----------------------
7400 function Number_Dimensions (Id : E) return Pos is
7405 if Ekind (Id) in String_Kind then
7410 T := First_Index (Id);
7411 while Present (T) loop
7418 end Number_Dimensions;
7420 --------------------
7421 -- Number_Entries --
7422 --------------------
7424 function Number_Entries (Id : E) return Nat is
7429 pragma Assert (Is_Concurrent_Type (Id));
7432 Ent := First_Entity (Id);
7433 while Present (Ent) loop
7434 if Is_Entry (Ent) then
7438 Ent := Next_Entity (Ent);
7444 --------------------
7445 -- Number_Formals --
7446 --------------------
7448 function Number_Formals (Id : E) return Pos is
7454 Formal := First_Formal (Id);
7455 while Present (Formal) loop
7457 Formal := Next_Formal (Formal);
7463 --------------------
7464 -- Parameter_Mode --
7465 --------------------
7467 function Parameter_Mode (Id : E) return Formal_Kind is
7472 ------------------------
7473 -- Predicate_Function --
7474 ------------------------
7476 function Predicate_Function (Id : E) return E is
7481 pragma Assert (Is_Type (Id));
7483 -- If type is private and has a completion, predicate may be defined
7484 -- on the full view.
7486 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7487 T := Full_View (Id);
7492 if No (Subprograms_For_Type (T)) then
7496 S := Subprograms_For_Type (T);
7497 while Present (S) loop
7498 if Is_Predicate_Function (S) then
7501 S := Subprograms_For_Type (S);
7507 end Predicate_Function;
7509 --------------------------
7510 -- Predicate_Function_M --
7511 --------------------------
7513 function Predicate_Function_M (Id : E) return E is
7518 pragma Assert (Is_Type (Id));
7520 -- If type is private and has a completion, predicate may be defined
7521 -- on the full view.
7523 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7524 T := Full_View (Id);
7529 if No (Subprograms_For_Type (T)) then
7533 S := Subprograms_For_Type (T);
7534 while Present (S) loop
7535 if Is_Predicate_Function_M (S) then
7538 S := Subprograms_For_Type (S);
7544 end Predicate_Function_M;
7546 -------------------------
7547 -- Present_In_Rep_Item --
7548 -------------------------
7550 function Present_In_Rep_Item (E : Entity_Id; N : Node_Id) return Boolean is
7554 Ritem := First_Rep_Item (E);
7556 while Present (Ritem) loop
7561 Next_Rep_Item (Ritem);
7565 end Present_In_Rep_Item;
7567 --------------------------
7568 -- Primitive_Operations --
7569 --------------------------
7571 function Primitive_Operations (Id : E) return L is
7573 if Is_Concurrent_Type (Id) then
7574 if Present (Corresponding_Record_Type (Id)) then
7575 return Direct_Primitive_Operations
7576 (Corresponding_Record_Type (Id));
7578 -- If expansion is disabled the corresponding record type is absent,
7579 -- but if the type has ancestors it may have primitive operations.
7581 elsif Is_Tagged_Type (Id) then
7582 return Direct_Primitive_Operations (Id);
7588 return Direct_Primitive_Operations (Id);
7590 end Primitive_Operations;
7592 ---------------------
7593 -- Record_Rep_Item --
7594 ---------------------
7596 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
7598 Set_Next_Rep_Item (N, First_Rep_Item (E));
7599 Set_First_Rep_Item (E, N);
7600 end Record_Rep_Item;
7606 function Root_Type (Id : E) return E is
7610 pragma Assert (Nkind (Id) in N_Entity);
7612 T := Base_Type (Id);
7614 if Ekind (T) = E_Class_Wide_Type then
7626 -- Following test catches some error cases resulting from
7629 elsif No (Etyp) then
7630 Check_Error_Detected;
7633 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
7636 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
7642 -- Return if there is a circularity in the inheritance chain. This
7643 -- happens in some error situations and we do not want to get
7644 -- stuck in this loop.
7646 if T = Base_Type (Id) then
7653 ---------------------
7654 -- Safe_Emax_Value --
7655 ---------------------
7657 function Safe_Emax_Value (Id : E) return Uint is
7659 return Machine_Emax_Value (Id);
7660 end Safe_Emax_Value;
7662 ----------------------
7663 -- Safe_First_Value --
7664 ----------------------
7666 function Safe_First_Value (Id : E) return Ureal is
7668 return -Safe_Last_Value (Id);
7669 end Safe_First_Value;
7671 ---------------------
7672 -- Safe_Last_Value --
7673 ---------------------
7675 function Safe_Last_Value (Id : E) return Ureal is
7676 Radix : constant Uint := Machine_Radix_Value (Id);
7677 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
7678 Emax : constant Uint := Safe_Emax_Value (Id);
7679 Significand : constant Uint := Radix ** Mantissa - 1;
7680 Exponent : constant Uint := Emax - Mantissa;
7686 (Num => Significand * 2 ** (Exponent mod 4),
7687 Den => -Exponent / 4,
7693 (Num => Significand,
7697 end Safe_Last_Value;
7703 function Scope_Depth (Id : E) return Uint is
7708 while Is_Record_Type (Scop) loop
7709 Scop := Scope (Scop);
7712 return Scope_Depth_Value (Scop);
7715 ---------------------
7716 -- Scope_Depth_Set --
7717 ---------------------
7719 function Scope_Depth_Set (Id : E) return B is
7721 return not Is_Record_Type (Id)
7722 and then Field22 (Id) /= Union_Id (Empty);
7723 end Scope_Depth_Set;
7725 -----------------------------
7726 -- Set_Component_Alignment --
7727 -----------------------------
7729 -- Component Alignment is encoded using two flags, Flag128/129 as
7730 -- follows. Note that both flags False = Align_Default, so that the
7731 -- default initialization of flags to False initializes component
7732 -- alignment to the default value as required.
7734 -- Flag128 Flag129 Value
7735 -- ------- ------- -----
7736 -- False False Calign_Default
7737 -- False True Calign_Component_Size
7738 -- True False Calign_Component_Size_4
7739 -- True True Calign_Storage_Unit
7741 procedure Set_Component_Alignment (Id : E; V : C) is
7743 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
7744 and then Is_Base_Type (Id));
7747 when Calign_Default =>
7748 Set_Flag128 (Id, False);
7749 Set_Flag129 (Id, False);
7751 when Calign_Component_Size =>
7752 Set_Flag128 (Id, False);
7753 Set_Flag129 (Id, True);
7755 when Calign_Component_Size_4 =>
7756 Set_Flag128 (Id, True);
7757 Set_Flag129 (Id, False);
7759 when Calign_Storage_Unit =>
7760 Set_Flag128 (Id, True);
7761 Set_Flag129 (Id, True);
7763 end Set_Component_Alignment;
7765 -----------------------------
7766 -- Set_Invariant_Procedure --
7767 -----------------------------
7769 procedure Set_Invariant_Procedure (Id : E; V : E) is
7773 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7775 S := Subprograms_For_Type (Id);
7776 Set_Subprograms_For_Type (Id, V);
7777 Set_Subprograms_For_Type (V, S);
7779 -- Check for duplicate entry
7781 while Present (S) loop
7782 if Is_Invariant_Procedure (S) then
7783 raise Program_Error;
7785 S := Subprograms_For_Type (S);
7788 end Set_Invariant_Procedure;
7790 ----------------------------
7791 -- Set_Predicate_Function --
7792 ----------------------------
7794 procedure Set_Predicate_Function (Id : E; V : E) is
7798 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7800 S := Subprograms_For_Type (Id);
7801 Set_Subprograms_For_Type (Id, V);
7802 Set_Subprograms_For_Type (V, S);
7804 while Present (S) loop
7805 if Is_Predicate_Function (S) then
7806 raise Program_Error;
7808 S := Subprograms_For_Type (S);
7811 end Set_Predicate_Function;
7813 ------------------------------
7814 -- Set_Predicate_Function_M --
7815 ------------------------------
7817 procedure Set_Predicate_Function_M (Id : E; V : E) is
7821 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7823 S := Subprograms_For_Type (Id);
7824 Set_Subprograms_For_Type (Id, V);
7825 Set_Subprograms_For_Type (V, S);
7827 -- Check for duplicates
7829 while Present (S) loop
7830 if Is_Predicate_Function_M (S) then
7831 raise Program_Error;
7833 S := Subprograms_For_Type (S);
7836 end Set_Predicate_Function_M;
7842 function Size_Clause (Id : E) return N is
7844 return Get_Attribute_Definition_Clause (Id, Attribute_Size);
7847 ------------------------
7848 -- Stream_Size_Clause --
7849 ------------------------
7851 function Stream_Size_Clause (Id : E) return N is
7853 return Get_Attribute_Definition_Clause (Id, Attribute_Stream_Size);
7854 end Stream_Size_Clause;
7860 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
7866 Kind := E_Access_Subtype;
7870 Kind := E_Array_Subtype;
7872 when E_Class_Wide_Type |
7873 E_Class_Wide_Subtype =>
7874 Kind := E_Class_Wide_Subtype;
7876 when E_Decimal_Fixed_Point_Type |
7877 E_Decimal_Fixed_Point_Subtype =>
7878 Kind := E_Decimal_Fixed_Point_Subtype;
7880 when E_Ordinary_Fixed_Point_Type |
7881 E_Ordinary_Fixed_Point_Subtype =>
7882 Kind := E_Ordinary_Fixed_Point_Subtype;
7884 when E_Private_Type |
7885 E_Private_Subtype =>
7886 Kind := E_Private_Subtype;
7888 when E_Limited_Private_Type |
7889 E_Limited_Private_Subtype =>
7890 Kind := E_Limited_Private_Subtype;
7892 when E_Record_Type_With_Private |
7893 E_Record_Subtype_With_Private =>
7894 Kind := E_Record_Subtype_With_Private;
7896 when E_Record_Type |
7898 Kind := E_Record_Subtype;
7900 when E_String_Type |
7902 Kind := E_String_Subtype;
7904 when Enumeration_Kind =>
7905 Kind := E_Enumeration_Subtype;
7908 Kind := E_Floating_Point_Subtype;
7910 when Signed_Integer_Kind =>
7911 Kind := E_Signed_Integer_Subtype;
7913 when Modular_Integer_Kind =>
7914 Kind := E_Modular_Integer_Subtype;
7916 when Protected_Kind =>
7917 Kind := E_Protected_Subtype;
7920 Kind := E_Task_Subtype;
7924 raise Program_Error;
7930 ---------------------
7931 -- Type_High_Bound --
7932 ---------------------
7934 function Type_High_Bound (Id : E) return Node_Id is
7935 Rng : constant Node_Id := Scalar_Range (Id);
7937 if Nkind (Rng) = N_Subtype_Indication then
7938 return High_Bound (Range_Expression (Constraint (Rng)));
7940 return High_Bound (Rng);
7942 end Type_High_Bound;
7944 --------------------
7945 -- Type_Low_Bound --
7946 --------------------
7948 function Type_Low_Bound (Id : E) return Node_Id is
7949 Rng : constant Node_Id := Scalar_Range (Id);
7951 if Nkind (Rng) = N_Subtype_Indication then
7952 return Low_Bound (Range_Expression (Constraint (Rng)));
7954 return Low_Bound (Rng);
7958 ---------------------
7959 -- Underlying_Type --
7960 ---------------------
7962 function Underlying_Type (Id : E) return E is
7964 -- For record_with_private the underlying type is always the direct
7965 -- full view. Never try to take the full view of the parent it
7966 -- doesn't make sense.
7968 if Ekind (Id) = E_Record_Type_With_Private then
7969 return Full_View (Id);
7971 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
7973 -- If we have an incomplete or private type with a full view,
7974 -- then we return the Underlying_Type of this full view
7976 if Present (Full_View (Id)) then
7977 if Id = Full_View (Id) then
7979 -- Previous error in declaration
7984 return Underlying_Type (Full_View (Id));
7987 -- If we have an incomplete entity that comes from the limited
7988 -- view then we return the Underlying_Type of its non-limited
7991 elsif From_Limited_With (Id)
7992 and then Present (Non_Limited_View (Id))
7994 return Underlying_Type (Non_Limited_View (Id));
7996 -- Otherwise check for the case where we have a derived type or
7997 -- subtype, and if so get the Underlying_Type of the parent type.
7999 elsif Etype (Id) /= Id then
8000 return Underlying_Type (Etype (Id));
8002 -- Otherwise we have an incomplete or private type that has
8003 -- no full view, which means that we have not encountered the
8004 -- completion, so return Empty to indicate the underlying type
8005 -- is not yet known.
8011 -- For non-incomplete, non-private types, return the type itself
8012 -- Also for entities that are not types at all return the entity
8018 end Underlying_Type;
8024 function Vax_Float (Id : E) return B is
8026 return Is_Floating_Point_Type (Id) and then Float_Rep (Id) = VAX_Native;
8029 ------------------------
8030 -- Write_Entity_Flags --
8031 ------------------------
8033 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
8035 procedure W (Flag_Name : String; Flag : Boolean);
8036 -- Write out given flag if it is set
8042 procedure W (Flag_Name : String; Flag : Boolean) is
8046 Write_Str (Flag_Name);
8047 Write_Str (" = True");
8052 -- Start of processing for Write_Entity_Flags
8055 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
8056 and then Is_Base_Type (Id)
8059 Write_Str ("Component_Alignment = ");
8061 case Component_Alignment (Id) is
8062 when Calign_Default =>
8063 Write_Str ("Calign_Default");
8065 when Calign_Component_Size =>
8066 Write_Str ("Calign_Component_Size");
8068 when Calign_Component_Size_4 =>
8069 Write_Str ("Calign_Component_Size_4");
8071 when Calign_Storage_Unit =>
8072 Write_Str ("Calign_Storage_Unit");
8078 W ("Address_Taken", Flag104 (Id));
8079 W ("Body_Needed_For_SAL", Flag40 (Id));
8080 W ("C_Pass_By_Copy", Flag125 (Id));
8081 W ("Can_Never_Be_Null", Flag38 (Id));
8082 W ("Checks_May_Be_Suppressed", Flag31 (Id));
8083 W ("Debug_Info_Off", Flag166 (Id));
8084 W ("Default_Expressions_Processed", Flag108 (Id));
8085 W ("Delay_Cleanups", Flag114 (Id));
8086 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
8087 W ("Depends_On_Private", Flag14 (Id));
8088 W ("Discard_Names", Flag88 (Id));
8089 W ("Elaboration_Entity_Required", Flag174 (Id));
8090 W ("Elaborate_Body_Desirable", Flag210 (Id));
8091 W ("Entry_Accepted", Flag152 (Id));
8092 W ("Can_Use_Internal_Rep", Flag229 (Id));
8093 W ("Finalize_Storage_Only", Flag158 (Id));
8094 W ("From_Limited_With", Flag159 (Id));
8095 W ("Has_Aliased_Components", Flag135 (Id));
8096 W ("Has_Alignment_Clause", Flag46 (Id));
8097 W ("Has_All_Calls_Remote", Flag79 (Id));
8098 W ("Has_Anonymous_Master", Flag253 (Id));
8099 W ("Has_Atomic_Components", Flag86 (Id));
8100 W ("Has_Biased_Representation", Flag139 (Id));
8101 W ("Has_Completion", Flag26 (Id));
8102 W ("Has_Completion_In_Body", Flag71 (Id));
8103 W ("Has_Complex_Representation", Flag140 (Id));
8104 W ("Has_Component_Size_Clause", Flag68 (Id));
8105 W ("Has_Contiguous_Rep", Flag181 (Id));
8106 W ("Has_Controlled_Component", Flag43 (Id));
8107 W ("Has_Controlling_Result", Flag98 (Id));
8108 W ("Has_Convention_Pragma", Flag119 (Id));
8109 W ("Has_Default_Aspect", Flag39 (Id));
8110 W ("Has_Delayed_Aspects", Flag200 (Id));
8111 W ("Has_Delayed_Freeze", Flag18 (Id));
8112 W ("Has_Delayed_Rep_Aspects", Flag261 (Id));
8113 W ("Has_Discriminants", Flag5 (Id));
8114 W ("Has_Dispatch_Table", Flag220 (Id));
8115 W ("Has_Dynamic_Predicate_Aspect", Flag258 (Id));
8116 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
8117 W ("Has_Exit", Flag47 (Id));
8118 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
8119 W ("Has_Forward_Instantiation", Flag175 (Id));
8120 W ("Has_Fully_Qualified_Name", Flag173 (Id));
8121 W ("Has_Gigi_Rep_Item", Flag82 (Id));
8122 W ("Has_Homonym", Flag56 (Id));
8123 W ("Has_Implicit_Dereference", Flag251 (Id));
8124 W ("Has_Inheritable_Invariants", Flag248 (Id));
8125 W ("Has_Initial_Value", Flag219 (Id));
8126 W ("Has_Invariants", Flag232 (Id));
8127 W ("Has_Loop_Entry_Attributes", Flag260 (Id));
8128 W ("Has_Machine_Radix_Clause", Flag83 (Id));
8129 W ("Has_Master_Entity", Flag21 (Id));
8130 W ("Has_Missing_Return", Flag142 (Id));
8131 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
8132 W ("Has_Non_Standard_Rep", Flag75 (Id));
8133 W ("Has_Object_Size_Clause", Flag172 (Id));
8134 W ("Has_Per_Object_Constraint", Flag154 (Id));
8135 W ("Has_Postconditions", Flag240 (Id));
8136 W ("Has_Pragma_Controlled", Flag27 (Id));
8137 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
8138 W ("Has_Pragma_Inline", Flag157 (Id));
8139 W ("Has_Pragma_Inline_Always", Flag230 (Id));
8140 W ("Has_Pragma_No_Inline", Flag201 (Id));
8141 W ("Has_Pragma_Ordered", Flag198 (Id));
8142 W ("Has_Pragma_Pack", Flag121 (Id));
8143 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
8144 W ("Has_Pragma_Pure", Flag203 (Id));
8145 W ("Has_Pragma_Pure_Function", Flag179 (Id));
8146 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
8147 W ("Has_Pragma_Unmodified", Flag233 (Id));
8148 W ("Has_Pragma_Unreferenced", Flag180 (Id));
8149 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
8150 W ("Has_Predicates", Flag250 (Id));
8151 W ("Has_Primitive_Operations", Flag120 (Id));
8152 W ("Has_Private_Ancestor", Flag151 (Id));
8153 W ("Has_Private_Declaration", Flag155 (Id));
8154 W ("Has_Qualified_Name", Flag161 (Id));
8155 W ("Has_RACW", Flag214 (Id));
8156 W ("Has_Record_Rep_Clause", Flag65 (Id));
8157 W ("Has_Recursive_Call", Flag143 (Id));
8158 W ("Has_Size_Clause", Flag29 (Id));
8159 W ("Has_Small_Clause", Flag67 (Id));
8160 W ("Has_Specified_Layout", Flag100 (Id));
8161 W ("Has_Specified_Stream_Input", Flag190 (Id));
8162 W ("Has_Specified_Stream_Output", Flag191 (Id));
8163 W ("Has_Specified_Stream_Read", Flag192 (Id));
8164 W ("Has_Specified_Stream_Write", Flag193 (Id));
8165 W ("Has_Static_Discriminants", Flag211 (Id));
8166 W ("Has_Static_Predicate_Aspect", Flag259 (Id));
8167 W ("Has_Storage_Size_Clause", Flag23 (Id));
8168 W ("Has_Stream_Size_Clause", Flag184 (Id));
8169 W ("Has_Task", Flag30 (Id));
8170 W ("Has_Thunks", Flag228 (Id));
8171 W ("Has_Unchecked_Union", Flag123 (Id));
8172 W ("Has_Unknown_Discriminants", Flag72 (Id));
8173 W ("Has_Up_Level_Access", Flag215 (Id));
8174 W ("Has_Visible_Refinement", Flag263 (Id));
8175 W ("Has_Volatile_Components", Flag87 (Id));
8176 W ("Has_Xref_Entry", Flag182 (Id));
8177 W ("In_Package_Body", Flag48 (Id));
8178 W ("In_Private_Part", Flag45 (Id));
8179 W ("In_Use", Flag8 (Id));
8180 W ("Is_AST_Entry", Flag132 (Id));
8181 W ("Is_Abstract_Subprogram", Flag19 (Id));
8182 W ("Is_Abstract_Type", Flag146 (Id));
8183 W ("Is_Local_Anonymous_Access", Flag194 (Id));
8184 W ("Is_Access_Constant", Flag69 (Id));
8185 W ("Is_Ada_2005_Only", Flag185 (Id));
8186 W ("Is_Ada_2012_Only", Flag199 (Id));
8187 W ("Is_Aliased", Flag15 (Id));
8188 W ("Is_Asynchronous", Flag81 (Id));
8189 W ("Is_Atomic", Flag85 (Id));
8190 W ("Is_Bit_Packed_Array", Flag122 (Id));
8191 W ("Is_CPP_Class", Flag74 (Id));
8192 W ("Is_Called", Flag102 (Id));
8193 W ("Is_Character_Type", Flag63 (Id));
8194 W ("Is_Child_Unit", Flag73 (Id));
8195 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
8196 W ("Is_Compilation_Unit", Flag149 (Id));
8197 W ("Is_Completely_Hidden", Flag103 (Id));
8198 W ("Is_Concurrent_Record_Type", Flag20 (Id));
8199 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
8200 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
8201 W ("Is_Constrained", Flag12 (Id));
8202 W ("Is_Constructor", Flag76 (Id));
8203 W ("Is_Controlled", Flag42 (Id));
8204 W ("Is_Controlling_Formal", Flag97 (Id));
8205 W ("Is_Descendent_Of_Address", Flag223 (Id));
8206 W ("Is_Discrim_SO_Function", Flag176 (Id));
8207 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
8208 W ("Is_Dispatching_Operation", Flag6 (Id));
8209 W ("Is_Eliminated", Flag124 (Id));
8210 W ("Is_Entry_Formal", Flag52 (Id));
8211 W ("Is_Exported", Flag99 (Id));
8212 W ("Is_First_Subtype", Flag70 (Id));
8213 W ("Is_For_Access_Subtype", Flag118 (Id));
8214 W ("Is_Formal_Subprogram", Flag111 (Id));
8215 W ("Is_Frozen", Flag4 (Id));
8216 W ("Is_Generic_Actual_Type", Flag94 (Id));
8217 W ("Is_Generic_Instance", Flag130 (Id));
8218 W ("Is_Generic_Type", Flag13 (Id));
8219 W ("Is_Hidden", Flag57 (Id));
8220 W ("Is_Hidden_Open_Scope", Flag171 (Id));
8221 W ("Is_Immediately_Visible", Flag7 (Id));
8222 W ("Is_Implementation_Defined", Flag254 (Id));
8223 W ("Is_Imported", Flag24 (Id));
8224 W ("Is_Inlined", Flag11 (Id));
8225 W ("Is_Instantiated", Flag126 (Id));
8226 W ("Is_Interface", Flag186 (Id));
8227 W ("Is_Internal", Flag17 (Id));
8228 W ("Is_Interrupt_Handler", Flag89 (Id));
8229 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
8230 W ("Is_Invariant_Procedure", Flag257 (Id));
8231 W ("Is_Itype", Flag91 (Id));
8232 W ("Is_Known_Non_Null", Flag37 (Id));
8233 W ("Is_Known_Null", Flag204 (Id));
8234 W ("Is_Known_Valid", Flag170 (Id));
8235 W ("Is_Limited_Composite", Flag106 (Id));
8236 W ("Is_Limited_Interface", Flag197 (Id));
8237 W ("Is_Limited_Record", Flag25 (Id));
8238 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
8239 W ("Is_Non_Static_Subtype", Flag109 (Id));
8240 W ("Is_Null_Init_Proc", Flag178 (Id));
8241 W ("Is_Obsolescent", Flag153 (Id));
8242 W ("Is_Only_Out_Parameter", Flag226 (Id));
8243 W ("Is_Optional_Parameter", Flag134 (Id));
8244 W ("Is_Package_Body_Entity", Flag160 (Id));
8245 W ("Is_Packed", Flag51 (Id));
8246 W ("Is_Packed_Array_Type", Flag138 (Id));
8247 W ("Is_Potentially_Use_Visible", Flag9 (Id));
8248 W ("Is_Predicate_Function", Flag255 (Id));
8249 W ("Is_Predicate_Function_M", Flag256 (Id));
8250 W ("Is_Preelaborated", Flag59 (Id));
8251 W ("Is_Primitive", Flag218 (Id));
8252 W ("Is_Primitive_Wrapper", Flag195 (Id));
8253 W ("Is_Private_Composite", Flag107 (Id));
8254 W ("Is_Private_Descendant", Flag53 (Id));
8255 W ("Is_Private_Primitive", Flag245 (Id));
8256 W ("Is_Processed_Transient", Flag252 (Id));
8257 W ("Is_Public", Flag10 (Id));
8258 W ("Is_Pure", Flag44 (Id));
8259 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
8260 W ("Is_RACW_Stub_Type", Flag244 (Id));
8261 W ("Is_Raised", Flag224 (Id));
8262 W ("Is_Remote_Call_Interface", Flag62 (Id));
8263 W ("Is_Remote_Types", Flag61 (Id));
8264 W ("Is_Renaming_Of_Object", Flag112 (Id));
8265 W ("Is_Return_Object", Flag209 (Id));
8266 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
8267 W ("Is_Shared_Passive", Flag60 (Id));
8268 W ("Is_Statically_Allocated", Flag28 (Id));
8269 W ("Is_Tag", Flag78 (Id));
8270 W ("Is_Tagged_Type", Flag55 (Id));
8271 W ("Is_Thunk", Flag225 (Id));
8272 W ("Is_Trivial_Subprogram", Flag235 (Id));
8273 W ("Is_True_Constant", Flag163 (Id));
8274 W ("Is_Unchecked_Union", Flag117 (Id));
8275 W ("Is_Underlying_Record_View", Flag246 (Id));
8276 W ("Is_Unsigned_Type", Flag144 (Id));
8277 W ("Is_VMS_Exception", Flag133 (Id));
8278 W ("Is_Valued_Procedure", Flag127 (Id));
8279 W ("Is_Visible_Formal", Flag206 (Id));
8280 W ("Is_Visible_Lib_Unit", Flag116 (Id));
8281 W ("Is_Volatile", Flag16 (Id));
8282 W ("Itype_Printed", Flag202 (Id));
8283 W ("Kill_Elaboration_Checks", Flag32 (Id));
8284 W ("Kill_Range_Checks", Flag33 (Id));
8285 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
8286 W ("Low_Bound_Tested", Flag205 (Id));
8287 W ("Machine_Radix_10", Flag84 (Id));
8288 W ("Materialize_Entity", Flag168 (Id));
8289 W ("May_Inherit_Delayed_Rep_Aspects", Flag262 (Id));
8290 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
8291 W ("Must_Have_Preelab_Init", Flag208 (Id));
8292 W ("Needs_Debug_Info", Flag147 (Id));
8293 W ("Needs_No_Actuals", Flag22 (Id));
8294 W ("Never_Set_In_Source", Flag115 (Id));
8295 W ("No_Pool_Assigned", Flag131 (Id));
8296 W ("No_Return", Flag113 (Id));
8297 W ("No_Strict_Aliasing", Flag136 (Id));
8298 W ("Non_Binary_Modulus", Flag58 (Id));
8299 W ("Nonzero_Is_True", Flag162 (Id));
8300 W ("OK_To_Rename", Flag247 (Id));
8301 W ("OK_To_Reorder_Components", Flag239 (Id));
8302 W ("Optimize_Alignment_Space", Flag241 (Id));
8303 W ("Optimize_Alignment_Time", Flag242 (Id));
8304 W ("Overlays_Constant", Flag243 (Id));
8305 W ("Reachable", Flag49 (Id));
8306 W ("Referenced", Flag156 (Id));
8307 W ("Referenced_As_LHS", Flag36 (Id));
8308 W ("Referenced_As_Out_Parameter", Flag227 (Id));
8309 W ("Renamed_In_Spec", Flag231 (Id));
8310 W ("Requires_Overriding", Flag213 (Id));
8311 W ("Return_Present", Flag54 (Id));
8312 W ("Returns_By_Ref", Flag90 (Id));
8313 W ("Reverse_Bit_Order", Flag164 (Id));
8314 W ("Reverse_Storage_Order", Flag93 (Id));
8315 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
8316 W ("Size_Depends_On_Discriminant", Flag177 (Id));
8317 W ("Size_Known_At_Compile_Time", Flag92 (Id));
8318 W ("SPARK_Aux_Pragma_Inherited", Flag266 (Id));
8319 W ("SPARK_Pragma_Inherited", Flag265 (Id));
8320 W ("Static_Elaboration_Desired", Flag77 (Id));
8321 W ("Strict_Alignment", Flag145 (Id));
8322 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
8323 W ("Suppress_Initialization", Flag105 (Id));
8324 W ("Suppress_Style_Checks", Flag165 (Id));
8325 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
8326 W ("Treat_As_Volatile", Flag41 (Id));
8327 W ("Universal_Aliasing", Flag216 (Id));
8328 W ("Used_As_Generic_Actual", Flag222 (Id));
8329 W ("Uses_Sec_Stack", Flag95 (Id));
8330 W ("Warnings_Off", Flag96 (Id));
8331 W ("Warnings_Off_Used", Flag236 (Id));
8332 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
8333 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
8334 W ("Was_Hidden", Flag196 (Id));
8335 end Write_Entity_Flags;
8337 -----------------------
8338 -- Write_Entity_Info --
8339 -----------------------
8341 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
8343 procedure Write_Attribute (Which : String; Nam : E);
8344 -- Write attribute value with given string name
8346 procedure Write_Kind (Id : Entity_Id);
8347 -- Write Ekind field of entity
8349 ---------------------
8350 -- Write_Attribute --
8351 ---------------------
8353 procedure Write_Attribute (Which : String; Nam : E) is
8357 Write_Int (Int (Nam));
8359 Write_Name (Chars (Nam));
8361 end Write_Attribute;
8367 procedure Write_Kind (Id : Entity_Id) is
8368 K : constant String := Entity_Kind'Image (Ekind (Id));
8372 Write_Str (" Kind ");
8374 if Is_Type (Id) and then Is_Tagged_Type (Id) then
8375 Write_Str ("TAGGED ");
8378 Write_Str (K (3 .. K'Length));
8381 if Is_Type (Id) and then Depends_On_Private (Id) then
8382 Write_Str ("Depends_On_Private ");
8386 -- Start of processing for Write_Entity_Info
8390 Write_Attribute ("Name ", Id);
8391 Write_Int (Int (Id));
8395 Write_Attribute (" Type ", Etype (Id));
8397 Write_Attribute (" Scope ", Scope (Id));
8402 when Discrete_Kind =>
8403 Write_Str ("Bounds: Id = ");
8405 if Present (Scalar_Range (Id)) then
8406 Write_Int (Int (Type_Low_Bound (Id)));
8407 Write_Str (" .. Id = ");
8408 Write_Int (Int (Type_High_Bound (Id)));
8410 Write_Str ("Empty");
8421 (" Component Type ", Component_Type (Id));
8424 Write_Str (" Indexes ");
8426 Index := First_Index (Id);
8427 while Present (Index) loop
8428 Write_Attribute (" ", Etype (Index));
8429 Index := Next_Index (Index);
8437 (" Directly Designated Type ",
8438 Directly_Designated_Type (Id));
8441 when Overloadable_Kind =>
8442 if Present (Homonym (Id)) then
8443 Write_Str (" Homonym ");
8444 Write_Name (Chars (Homonym (Id)));
8446 Write_Int (Int (Homonym (Id)));
8453 if Ekind (Scope (Id)) in Record_Kind then
8455 " Original_Record_Component ",
8456 Original_Record_Component (Id));
8457 Write_Int (Int (Original_Record_Component (Id)));
8461 when others => null;
8463 end Write_Entity_Info;
8465 -----------------------
8466 -- Write_Field6_Name --
8467 -----------------------
8469 procedure Write_Field6_Name (Id : Entity_Id) is
8470 pragma Warnings (Off, Id);
8472 Write_Str ("First_Rep_Item");
8473 end Write_Field6_Name;
8475 -----------------------
8476 -- Write_Field7_Name --
8477 -----------------------
8479 procedure Write_Field7_Name (Id : Entity_Id) is
8480 pragma Warnings (Off, Id);
8482 Write_Str ("Freeze_Node");
8483 end Write_Field7_Name;
8485 -----------------------
8486 -- Write_Field8_Name --
8487 -----------------------
8489 procedure Write_Field8_Name (Id : Entity_Id) is
8493 Write_Str ("Associated_Node_For_Itype");
8496 Write_Str ("Dependent_Instances");
8499 Write_Str ("First_Exit_Statement");
8502 Write_Str ("Hiding_Loop_Variable");
8506 E_Subprogram_Body =>
8507 Write_Str ("Mechanism");
8511 Write_Str ("Normalized_First_Bit");
8514 Write_Str ("Postcondition_Proc");
8516 when E_Abstract_State =>
8517 Write_Str ("Refinement_Constituents");
8519 when E_Return_Statement =>
8520 Write_Str ("Return_Applies_To");
8523 Write_Str ("Field8??");
8525 end Write_Field8_Name;
8527 -----------------------
8528 -- Write_Field9_Name --
8529 -----------------------
8531 procedure Write_Field9_Name (Id : Entity_Id) is
8535 Write_Str ("Class_Wide_Type");
8538 Write_Str ("Current_Value");
8540 when E_Abstract_State =>
8541 Write_Str ("Part_Of_Constituents");
8544 E_Generic_Function |
8546 E_Generic_Procedure |
8549 Write_Str ("Renaming_Map");
8552 Write_Str ("Field9??");
8554 end Write_Field9_Name;
8556 ------------------------
8557 -- Write_Field10_Name --
8558 ------------------------
8560 procedure Write_Field10_Name (Id : Entity_Id) is
8563 when E_Abstract_State |
8565 Write_Str ("Encapsulating_State");
8567 when Class_Wide_Kind |
8573 Write_Str ("Direct_Primitive_Operations");
8576 Write_Str ("Float_Rep");
8578 when E_In_Parameter |
8580 Write_Str ("Discriminal_Link");
8586 Write_Str ("Handler_Records");
8590 Write_Str ("Normalized_Position_Max");
8593 Write_Str ("Field10??");
8595 end Write_Field10_Name;
8597 ------------------------
8598 -- Write_Field11_Name --
8599 ------------------------
8601 procedure Write_Field11_Name (Id : Entity_Id) is
8605 Write_Str ("Block_Node");
8609 Write_Str ("Component_Bit_Offset");
8612 Write_Str ("Entry_Component");
8614 when E_Enumeration_Literal =>
8615 Write_Str ("Enumeration_Pos");
8619 Write_Str ("Full_View");
8621 when E_Generic_Package =>
8622 Write_Str ("Generic_Homonym");
8628 Write_Str ("Protected_Body_Subprogram");
8631 Write_Str ("Field11??");
8633 end Write_Field11_Name;
8635 ------------------------
8636 -- Write_Field12_Name --
8637 ------------------------
8639 procedure Write_Field12_Name (Id : Entity_Id) is
8643 Write_Str ("Associated_Formal_Package");
8646 Write_Str ("Barrier_Function");
8648 when E_Enumeration_Literal =>
8649 Write_Str ("Enumeration_Rep");
8657 E_In_Out_Parameter |
8661 Write_Str ("Esize");
8665 Write_Str ("Next_Inlined_Subprogram");
8668 Write_Str ("Field12??");
8670 end Write_Field12_Name;
8672 ------------------------
8673 -- Write_Field13_Name --
8674 ------------------------
8676 procedure Write_Field13_Name (Id : Entity_Id) is
8681 Write_Str ("Component_Clause");
8684 Write_Str ("Elaboration_Entity");
8688 Generic_Unit_Kind =>
8689 Write_Str ("Elaboration_Entity");
8693 Write_Str ("Extra_Accessibility");
8696 Write_Str ("RM_Size");
8699 Write_Str ("Field13??");
8701 end Write_Field13_Name;
8703 -----------------------
8704 -- Write_Field14_Name --
8705 -----------------------
8707 procedure Write_Field14_Name (Id : Entity_Id) is
8716 Write_Str ("Alignment");
8720 Write_Str ("First_Optional_Parameter");
8724 Write_Str ("Normalized_Position");
8727 E_Generic_Package =>
8728 Write_Str ("Shadow_Entities");
8731 Write_Str ("Field14??");
8733 end Write_Field14_Name;
8735 ------------------------
8736 -- Write_Field15_Name --
8737 ------------------------
8739 procedure Write_Field15_Name (Id : Entity_Id) is
8742 when E_Discriminant =>
8743 Write_Str ("Discriminant_Number");
8746 Write_Str ("DT_Entry_Count");
8750 Write_Str ("DT_Position");
8752 when E_Protected_Type =>
8753 Write_Str ("Entry_Bodies_Array");
8756 Write_Str ("Entry_Parameters_Type");
8759 Write_Str ("Extra_Formal");
8761 when Enumeration_Kind =>
8762 Write_Str ("Lit_Indexes");
8766 Write_Str ("Related_Instance");
8768 when Decimal_Fixed_Point_Kind =>
8769 Write_Str ("Scale_Value");
8773 Write_Str ("Status_Flag_Or_Transient_Decl");
8777 Write_Str ("Storage_Size_Variable");
8779 when E_String_Literal_Subtype =>
8780 Write_Str ("String_Literal_Low_Bound");
8783 Write_Str ("Field15??");
8785 end Write_Field15_Name;
8787 ------------------------
8788 -- Write_Field16_Name --
8789 ------------------------
8791 procedure Write_Field16_Name (Id : Entity_Id) is
8794 when E_Record_Type |
8795 E_Record_Type_With_Private =>
8796 Write_Str ("Access_Disp_Table");
8798 when E_Abstract_State =>
8799 Write_Str ("Body_References");
8801 when E_Record_Subtype |
8802 E_Class_Wide_Subtype =>
8803 Write_Str ("Cloned_Subtype");
8807 Write_Str ("DTC_Entity");
8810 Write_Str ("Entry_Formal");
8815 Write_Str ("First_Private_Entity");
8817 when Enumeration_Kind =>
8818 Write_Str ("Lit_Strings");
8820 when E_String_Literal_Subtype =>
8821 Write_Str ("String_Literal_Length");
8825 Write_Str ("Unset_Reference");
8828 Write_Str ("Field16??");
8830 end Write_Field16_Name;
8832 ------------------------
8833 -- Write_Field17_Name --
8834 ------------------------
8836 procedure Write_Field17_Name (Id : Entity_Id) is
8841 E_Generic_In_Out_Parameter |
8843 Write_Str ("Actual_Subtype");
8846 Write_Str ("Digits_Value");
8848 when E_Discriminant =>
8849 Write_Str ("Discriminal");
8858 E_Generic_Function |
8860 E_Generic_Procedure |
8868 E_Return_Statement |
8870 E_Subprogram_Type =>
8871 Write_Str ("First_Entity");
8874 Write_Str ("First_Index");
8876 when Enumeration_Kind =>
8877 Write_Str ("First_Literal");
8880 Write_Str ("Master_Id");
8882 when Modular_Integer_Kind =>
8883 Write_Str ("Modulus");
8885 when E_Abstract_State |
8886 E_Incomplete_Type =>
8887 Write_Str ("Non_Limited_View");
8889 when E_Incomplete_Subtype =>
8890 if From_Limited_With (Id) then
8891 Write_Str ("Non_Limited_View");
8895 Write_Str ("Prival");
8898 Write_Str ("Field17??");
8900 end Write_Field17_Name;
8902 ------------------------
8903 -- Write_Field18_Name --
8904 ------------------------
8906 procedure Write_Field18_Name (Id : Entity_Id) is
8909 when E_Enumeration_Literal |
8913 Write_Str ("Alias");
8915 when E_Record_Type =>
8916 Write_Str ("Corresponding_Concurrent_Type");
8918 when E_Subprogram_Body =>
8919 Write_Str ("Corresponding_Protected_Entry");
8921 when Concurrent_Kind =>
8922 Write_Str ("Corresponding_Record_Type");
8927 Write_Str ("Enclosing_Scope");
8929 when E_Entry_Index_Parameter =>
8930 Write_Str ("Entry_Index_Constant");
8932 when E_Class_Wide_Subtype |
8933 E_Access_Protected_Subprogram_Type |
8934 E_Anonymous_Access_Protected_Subprogram_Type |
8935 E_Access_Subprogram_Type |
8937 Write_Str ("Equivalent_Type");
8939 when Fixed_Point_Kind =>
8940 Write_Str ("Delta_Value");
8942 when Incomplete_Or_Private_Kind |
8944 Write_Str ("Private_Dependents");
8947 Write_Str ("Renamed_Object");
8951 E_Generic_Function |
8952 E_Generic_Procedure |
8953 E_Generic_Package =>
8954 Write_Str ("Renamed_Entity");
8957 Write_Str ("Field18??");
8959 end Write_Field18_Name;
8961 -----------------------
8962 -- Write_Field19_Name --
8963 -----------------------
8965 procedure Write_Field19_Name (Id : Entity_Id) is
8969 E_Generic_Package =>
8970 Write_Str ("Body_Entity");
8972 when E_Discriminant =>
8973 Write_Str ("Corresponding_Discriminant");
8976 Write_Str ("Default_Aspect_Value");
8978 when E_Array_Type =>
8979 Write_Str ("Default_Component_Value");
8981 when E_Record_Type =>
8982 Write_Str ("Parent_Subtype");
8986 Write_Str ("Size_Check_Code");
8988 when E_Package_Body |
8990 Write_Str ("Spec_Entity");
8992 when Private_Kind =>
8993 Write_Str ("Underlying_Full_View");
8995 when E_Function | E_Operator | E_Subprogram_Type =>
8996 Write_Str ("Extra_Accessibility_Of_Result");
8999 Write_Str ("Field19??");
9001 end Write_Field19_Name;
9003 -----------------------
9004 -- Write_Field20_Name --
9005 -----------------------
9007 procedure Write_Field20_Name (Id : Entity_Id) is
9011 Write_Str ("Component_Type");
9013 when E_In_Parameter |
9014 E_Generic_In_Parameter =>
9015 Write_Str ("Default_Value");
9018 Write_Str ("Directly_Designated_Type");
9021 Write_Str ("Discriminant_Checking_Func");
9023 when E_Discriminant =>
9024 Write_Str ("Discriminant_Default_Value");
9033 E_Generic_Function |
9035 E_Generic_Procedure |
9043 E_Return_Statement |
9045 E_Subprogram_Type =>
9046 Write_Str ("Last_Entity");
9050 Write_Str ("Prival_Link");
9053 Write_Str ("Scalar_Range");
9056 Write_Str ("Register_Exception_Call");
9059 Write_Str ("Field20??");
9061 end Write_Field20_Name;
9063 -----------------------
9064 -- Write_Field21_Name --
9065 -----------------------
9067 procedure Write_Field21_Name (Id : Entity_Id) is
9071 Write_Str ("Accept_Address");
9073 when E_In_Parameter =>
9074 Write_Str ("Default_Expr_Function");
9076 when Concurrent_Kind |
9077 Incomplete_Or_Private_Kind |
9081 Write_Str ("Discriminant_Constraint");
9086 E_Generic_Function |
9088 E_Generic_Procedure |
9090 Write_Str ("Interface_Name");
9093 Modular_Integer_Kind =>
9094 Write_Str ("Original_Array_Type");
9096 when Fixed_Point_Kind =>
9097 Write_Str ("Small_Value");
9100 Write_Str ("Field21??");
9102 end Write_Field21_Name;
9104 -----------------------
9105 -- Write_Field22_Name --
9106 -----------------------
9108 procedure Write_Field22_Name (Id : Entity_Id) is
9112 Write_Str ("Associated_Storage_Pool");
9115 Write_Str ("Component_Size");
9117 when E_Record_Type =>
9118 Write_Str ("Corresponding_Remote_Type");
9122 Write_Str ("Original_Record_Component");
9124 when E_Enumeration_Literal =>
9125 Write_Str ("Enumeration_Rep_Expr");
9128 Write_Str ("Exception_Code");
9130 when E_Record_Type_With_Private |
9131 E_Record_Subtype_With_Private |
9134 E_Limited_Private_Type |
9135 E_Limited_Private_Subtype =>
9136 Write_Str ("Private_View");
9139 Write_Str ("Protected_Formal");
9149 E_Generic_Function |
9150 E_Generic_Procedure |
9153 E_Return_Statement |
9156 Write_Str ("Scope_Depth_Value");
9159 Write_Str ("Shared_Var_Procs_Instance");
9162 Write_Str ("Field22??");
9164 end Write_Field22_Name;
9166 ------------------------
9167 -- Write_Field23_Name --
9168 ------------------------
9170 procedure Write_Field23_Name (Id : Entity_Id) is
9173 when E_Discriminant =>
9174 Write_Str ("CR_Discriminant");
9177 Write_Str ("Entry_Cancel_Parameter");
9179 when E_Enumeration_Type =>
9180 Write_Str ("Enum_Pos_To_Rep");
9184 Write_Str ("Extra_Constrained");
9187 Write_Str ("Finalization_Master");
9189 when E_Generic_Function |
9191 E_Generic_Procedure =>
9192 Write_Str ("Inner_Instances");
9195 Write_Str ("Packed_Array_Type");
9198 Write_Str ("Protection_Object");
9200 when Concurrent_Kind |
9201 Incomplete_Or_Private_Kind |
9205 Write_Str ("Stored_Constraint");
9209 if Present (Scope (Id))
9210 and then Is_Protected_Type (Scope (Id))
9212 Write_Str ("Protection_Object");
9214 Write_Str ("Generic_Renamings");
9218 if Is_Generic_Instance (Id) then
9219 Write_Str ("Generic_Renamings");
9221 Write_Str ("Limited_View");
9225 Write_Str ("Field23??");
9227 end Write_Field23_Name;
9229 ------------------------
9230 -- Write_Field24_Name --
9231 ------------------------
9233 procedure Write_Field24_Name (Id : Entity_Id) is
9239 Write_Str ("Related_Expression");
9242 Write_Str ("Field24???");
9244 end Write_Field24_Name;
9246 ------------------------
9247 -- Write_Field25_Name --
9248 ------------------------
9250 procedure Write_Field25_Name (Id : Entity_Id) is
9254 Write_Str ("Abstract_States");
9257 Write_Str ("Debug_Renaming_Link");
9260 Write_Str ("DT_Offset_To_Top_Func");
9264 Write_Str ("Interface_Alias");
9266 when E_Record_Type |
9268 E_Record_Type_With_Private |
9269 E_Record_Subtype_With_Private =>
9270 Write_Str ("Interfaces");
9274 Write_Str ("Related_Array_Object");
9277 Write_Str ("Task_Body_Procedure");
9281 Write_Str ("PPC_Wrapper");
9283 when E_Enumeration_Subtype |
9284 E_Modular_Integer_Subtype |
9285 E_Signed_Integer_Subtype =>
9286 Write_Str ("Static_Predicate");
9289 Write_Str ("Field25??");
9291 end Write_Field25_Name;
9293 ------------------------
9294 -- Write_Field26_Name --
9295 ------------------------
9297 procedure Write_Field26_Name (Id : Entity_Id) is
9300 when E_Record_Type |
9301 E_Record_Type_With_Private =>
9302 Write_Str ("Dispatch_Table_Wrappers");
9304 when E_In_Out_Parameter |
9307 Write_Str ("Last_Assignment");
9309 when E_Access_Subprogram_Type =>
9310 Write_Str ("Original_Access_Type");
9312 when E_Generic_Package |
9314 Write_Str ("Package_Instantiation");
9318 Write_Str ("Related_Type");
9321 Write_Str ("Relative_Deadline_Variable");
9325 Write_Str ("Overridden_Operation");
9328 Write_Str ("Field26??");
9330 end Write_Field26_Name;
9332 ------------------------
9333 -- Write_Field27_Name --
9334 ------------------------
9336 procedure Write_Field27_Name (Id : Entity_Id) is
9341 Write_Str ("Current_Use_Clause");
9346 Write_Str ("Related_Type");
9350 Write_Str ("Wrapped_Entity");
9353 Write_Str ("Field27??");
9355 end Write_Field27_Name;
9357 ------------------------
9358 -- Write_Field28_Name --
9359 ------------------------
9361 procedure Write_Field28_Name (Id : Entity_Id) is
9369 E_Subprogram_Type =>
9370 Write_Str ("Extra_Formals");
9374 Write_Str ("Finalizer");
9378 Write_Str ("Initialization_Statements");
9380 when E_Record_Type =>
9381 Write_Str ("Underlying_Record_View");
9384 Write_Str ("Field28??");
9386 end Write_Field28_Name;
9388 ------------------------
9389 -- Write_Field29_Name --
9390 ------------------------
9392 procedure Write_Field29_Name (Id : Entity_Id) is
9396 Write_Str ("Subprograms_For_Type");
9399 Write_Str ("Field29??");
9401 end Write_Field29_Name;
9403 ------------------------
9404 -- Write_Field30_Name --
9405 ------------------------
9407 procedure Write_Field30_Name (Id : Entity_Id) is
9411 Write_Str ("Corresponding_Equality");
9414 Write_Str ("Static_Initialization");
9417 Write_Str ("Field30??");
9419 end Write_Field30_Name;
9421 ------------------------
9422 -- Write_Field31_Name --
9423 ------------------------
9425 procedure Write_Field31_Name (Id : Entity_Id) is
9430 Write_Str ("Thunk_Entity");
9433 Write_Str ("Field31??");
9435 end Write_Field31_Name;
9437 ------------------------
9438 -- Write_Field32_Name --
9439 ------------------------
9441 procedure Write_Field32_Name (Id : Entity_Id) is
9445 E_Generic_Function |
9447 E_Generic_Procedure |
9451 E_Subprogram_Body =>
9452 Write_Str ("SPARK_Pragma");
9455 Write_Str ("Field32??");
9457 end Write_Field32_Name;
9459 ------------------------
9460 -- Write_Field33_Name --
9461 ------------------------
9463 procedure Write_Field33_Name (Id : Entity_Id) is
9466 when E_Generic_Package |
9469 Write_Str ("SPARK_Aux_Pragma");
9475 Write_Str ("Linker_Section_Pragma");
9478 Write_Str ("Field33??");
9480 end Write_Field33_Name;
9482 ------------------------
9483 -- Write_Field34_Name --
9484 ------------------------
9486 procedure Write_Field34_Name (Id : Entity_Id) is
9496 Generic_Subprogram_Kind |
9498 Write_Str ("Contract");
9501 Write_Str ("Field34??");
9503 end Write_Field34_Name;
9505 ------------------------
9506 -- Write_Field35_Name --
9507 ------------------------
9509 procedure Write_Field35_Name (Id : Entity_Id) is
9513 Write_Str ("Field35??");
9515 end Write_Field35_Name;
9517 -------------------------
9518 -- Iterator Procedures --
9519 -------------------------
9521 procedure Proc_Next_Component (N : in out Node_Id) is
9523 N := Next_Component (N);
9524 end Proc_Next_Component;
9526 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
9528 N := Next_Entity (N);
9529 while Present (N) loop
9530 exit when Ekind_In (N, E_Component, E_Discriminant);
9531 N := Next_Entity (N);
9533 end Proc_Next_Component_Or_Discriminant;
9535 procedure Proc_Next_Discriminant (N : in out Node_Id) is
9537 N := Next_Discriminant (N);
9538 end Proc_Next_Discriminant;
9540 procedure Proc_Next_Formal (N : in out Node_Id) is
9542 N := Next_Formal (N);
9543 end Proc_Next_Formal;
9545 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
9547 N := Next_Formal_With_Extras (N);
9548 end Proc_Next_Formal_With_Extras;
9550 procedure Proc_Next_Index (N : in out Node_Id) is
9552 N := Next_Index (N);
9553 end Proc_Next_Index;
9555 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
9557 N := Next_Inlined_Subprogram (N);
9558 end Proc_Next_Inlined_Subprogram;
9560 procedure Proc_Next_Literal (N : in out Node_Id) is
9562 N := Next_Literal (N);
9563 end Proc_Next_Literal;
9565 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
9567 N := Next_Stored_Discriminant (N);
9568 end Proc_Next_Stored_Discriminant;