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
91 -- Direct_Primitive_Operations Elist10
92 -- Discriminal_Link Node10
93 -- Float_Rep Uint10 (but returns Float_Rep_Kind)
94 -- Handler_Records List10
95 -- Normalized_Position_Max Uint10
96 -- Refined_State Node10
98 -- Component_Bit_Offset Uint11
100 -- Entry_Component Node11
101 -- Enumeration_Pos Uint11
102 -- Generic_Homonym Node11
103 -- Protected_Body_Subprogram Node11
106 -- Barrier_Function Node12
107 -- Enumeration_Rep Uint12
109 -- Next_Inlined_Subprogram Node12
111 -- Component_Clause Node13
112 -- Elaboration_Entity Node13
113 -- Extra_Accessibility Node13
117 -- First_Optional_Parameter Node14
118 -- Normalized_Position Uint14
119 -- Shadow_Entities List14
121 -- Discriminant_Number Uint15
122 -- DT_Position Uint15
123 -- DT_Entry_Count Uint15
124 -- Entry_Bodies_Array Node15
125 -- Entry_Parameters_Type Node15
126 -- Extra_Formal Node15
127 -- Lit_Indexes Node15
128 -- Related_Instance Node15
129 -- Status_Flag_Or_Transient_Decl Node15
130 -- Scale_Value Uint15
131 -- Storage_Size_Variable Node15
132 -- String_Literal_Low_Bound Node15
134 -- Access_Disp_Table Elist16
135 -- Body_References Elist16
136 -- Cloned_Subtype Node16
138 -- Entry_Formal Node16
139 -- First_Private_Entity Node16
140 -- Lit_Strings Node16
141 -- String_Literal_Length Uint16
142 -- Unset_Reference Node16
144 -- Actual_Subtype Node17
145 -- Digits_Value Uint17
146 -- Discriminal Node17
147 -- First_Entity Node17
148 -- First_Index Node17
149 -- First_Literal Node17
152 -- Non_Limited_View Node17
156 -- Corresponding_Concurrent_Type Node18
157 -- Corresponding_Protected_Entry Node18
158 -- Corresponding_Record_Type Node18
159 -- Delta_Value Ureal18
160 -- Enclosing_Scope Node18
161 -- Equivalent_Type Node18
162 -- Private_Dependents Elist18
163 -- Renamed_Entity Node18
164 -- Renamed_Object Node18
166 -- Body_Entity Node19
167 -- Corresponding_Discriminant Node19
168 -- Default_Aspect_Component_Value Node19
169 -- Default_Aspect_Value Node19
170 -- Extra_Accessibility_Of_Result Node19
171 -- Parent_Subtype Node19
172 -- Size_Check_Code Node19
173 -- Spec_Entity Node19
174 -- Underlying_Full_View Node19
176 -- Component_Type Node20
177 -- Default_Value Node20
178 -- Directly_Designated_Type Node20
179 -- Discriminant_Checking_Func Node20
180 -- Discriminant_Default_Value Node20
181 -- Last_Entity Node20
182 -- Prival_Link Node20
183 -- Register_Exception_Call Node20
184 -- Scalar_Range Node20
186 -- Accept_Address Elist21
187 -- Default_Expr_Function Node21
188 -- Discriminant_Constraint Elist21
189 -- Interface_Name Node21
190 -- Original_Array_Type Node21
191 -- Small_Value Ureal21
193 -- Associated_Storage_Pool Node22
194 -- Component_Size Uint22
195 -- Corresponding_Remote_Type Node22
196 -- Enumeration_Rep_Expr Node22
197 -- Exception_Code Uint22
198 -- Original_Record_Component Node22
199 -- Private_View Node22
200 -- Protected_Formal Node22
201 -- Scope_Depth_Value Uint22
202 -- Shared_Var_Procs_Instance Node22
204 -- CR_Discriminant Node23
205 -- Entry_Cancel_Parameter Node23
206 -- Enum_Pos_To_Rep Node23
207 -- Extra_Constrained Node23
208 -- Finalization_Master Node23
209 -- Generic_Renamings Elist23
210 -- Inner_Instances Elist23
211 -- Limited_View Node23
212 -- Packed_Array_Type Node23
213 -- Protection_Object Node23
214 -- Stored_Constraint Elist23
216 -- Related_Expression Node24
218 -- Interface_Alias Node25
219 -- Interfaces Elist25
220 -- Debug_Renaming_Link Node25
221 -- DT_Offset_To_Top_Func Node25
222 -- PPC_Wrapper Node25
223 -- Related_Array_Object Node25
224 -- Static_Predicate List25
225 -- Task_Body_Procedure Node25
227 -- Dispatch_Table_Wrappers Elist26
228 -- Last_Assignment Node26
229 -- Original_Access_Type Node26
230 -- Overridden_Operation Node26
231 -- Package_Instantiation Node26
232 -- Relative_Deadline_Variable Node26
234 -- Current_Use_Clause Node27
235 -- Related_Type Node27
236 -- Wrapped_Entity Node27
238 -- Extra_Formals Node28
240 -- Initialization_Statements Node28
241 -- Underlying_Record_View Node28
243 -- Subprograms_For_Type Node29
245 -- Corresponding_Equality Node30
246 -- Static_Initialization Node30
248 -- Thunk_Entity Node31
250 -- SPARK_Pragma Node32
252 -- Linker_Section_Pragma Node33
253 -- SPARK_Aux_Pragma Node33
259 ---------------------------------------------
260 -- Usage of Flags in Defining Entity Nodes --
261 ---------------------------------------------
263 -- All flags are unique, there is no overlaying, so each flag is physically
264 -- present in every entity. However, for many of the flags, it only makes
265 -- sense for them to be set true for certain subsets of entity kinds. See
266 -- the spec of Einfo for further details.
269 -- Has_Discriminants Flag5
270 -- Is_Dispatching_Operation Flag6
271 -- Is_Immediately_Visible Flag7
273 -- Is_Potentially_Use_Visible Flag9
277 -- Is_Constrained Flag12
278 -- Is_Generic_Type Flag13
279 -- Depends_On_Private Flag14
281 -- Is_Volatile Flag16
282 -- Is_Internal Flag17
283 -- Has_Delayed_Freeze Flag18
284 -- Is_Abstract_Subprogram Flag19
285 -- Is_Concurrent_Record_Type Flag20
287 -- Has_Master_Entity Flag21
288 -- Needs_No_Actuals Flag22
289 -- Has_Storage_Size_Clause Flag23
290 -- Is_Imported Flag24
291 -- Is_Limited_Record Flag25
292 -- Has_Completion Flag26
293 -- Has_Pragma_Controlled Flag27
294 -- Is_Statically_Allocated Flag28
295 -- Has_Size_Clause Flag29
298 -- Checks_May_Be_Suppressed Flag31
299 -- Kill_Elaboration_Checks Flag32
300 -- Kill_Range_Checks Flag33
301 -- Has_Independent_Components Flag34
302 -- Is_Class_Wide_Equivalent_Type Flag35
303 -- Referenced_As_LHS Flag36
304 -- Is_Known_Non_Null Flag37
305 -- Can_Never_Be_Null Flag38
306 -- Has_Default_Aspect Flag39
307 -- Body_Needed_For_SAL Flag40
309 -- Treat_As_Volatile Flag41
310 -- Is_Controlled Flag42
311 -- Has_Controlled_Component Flag43
313 -- In_Private_Part Flag45
314 -- Has_Alignment_Clause Flag46
316 -- In_Package_Body Flag48
318 -- Delay_Subprogram_Descriptors Flag50
321 -- Is_Entry_Formal Flag52
322 -- Is_Private_Descendant Flag53
323 -- Return_Present Flag54
324 -- Is_Tagged_Type Flag55
325 -- Has_Homonym Flag56
327 -- Non_Binary_Modulus Flag58
328 -- Is_Preelaborated Flag59
329 -- Is_Shared_Passive Flag60
331 -- Is_Remote_Types Flag61
332 -- Is_Remote_Call_Interface Flag62
333 -- Is_Character_Type Flag63
334 -- Is_Intrinsic_Subprogram Flag64
335 -- Has_Record_Rep_Clause Flag65
336 -- Has_Enumeration_Rep_Clause Flag66
337 -- Has_Small_Clause Flag67
338 -- Has_Component_Size_Clause Flag68
339 -- Is_Access_Constant Flag69
340 -- Is_First_Subtype Flag70
342 -- Has_Completion_In_Body Flag71
343 -- Has_Unknown_Discriminants Flag72
344 -- Is_Child_Unit Flag73
345 -- Is_CPP_Class Flag74
346 -- Has_Non_Standard_Rep Flag75
347 -- Is_Constructor Flag76
348 -- Static_Elaboration_Desired Flag77
350 -- Has_All_Calls_Remote Flag79
351 -- Is_Constr_Subt_For_U_Nominal Flag80
353 -- Is_Asynchronous Flag81
354 -- Has_Gigi_Rep_Item Flag82
355 -- Has_Machine_Radix_Clause Flag83
356 -- Machine_Radix_10 Flag84
358 -- Has_Atomic_Components Flag86
359 -- Has_Volatile_Components Flag87
360 -- Discard_Names Flag88
361 -- Is_Interrupt_Handler Flag89
362 -- Returns_By_Ref Flag90
365 -- Size_Known_At_Compile_Time Flag92
366 -- Reverse_Storage_Order Flag93
367 -- Is_Generic_Actual_Type Flag94
368 -- Uses_Sec_Stack Flag95
369 -- Warnings_Off Flag96
370 -- Is_Controlling_Formal Flag97
371 -- Has_Controlling_Result Flag98
372 -- Is_Exported Flag99
373 -- Has_Specified_Layout Flag100
375 -- Has_Nested_Block_With_Handler Flag101
377 -- Is_Completely_Hidden Flag103
378 -- Address_Taken Flag104
379 -- Suppress_Initialization Flag105
380 -- Is_Limited_Composite Flag106
381 -- Is_Private_Composite Flag107
382 -- Default_Expressions_Processed Flag108
383 -- Is_Non_Static_Subtype Flag109
384 -- Has_External_Tag_Rep_Clause Flag110
386 -- Is_Formal_Subprogram Flag111
387 -- Is_Renaming_Of_Object Flag112
389 -- Delay_Cleanups Flag114
390 -- Never_Set_In_Source Flag115
391 -- Is_Visible_Lib_Unit Flag116
392 -- Is_Unchecked_Union Flag117
393 -- Is_For_Access_Subtype Flag118
394 -- Has_Convention_Pragma Flag119
395 -- Has_Primitive_Operations Flag120
397 -- Has_Pragma_Pack Flag121
398 -- Is_Bit_Packed_Array Flag122
399 -- Has_Unchecked_Union Flag123
400 -- Is_Eliminated Flag124
401 -- C_Pass_By_Copy Flag125
402 -- Is_Instantiated Flag126
403 -- Is_Valued_Procedure Flag127
404 -- (used for Component_Alignment) Flag128
405 -- (used for Component_Alignment) Flag129
406 -- Is_Generic_Instance Flag130
408 -- No_Pool_Assigned Flag131
409 -- Is_AST_Entry Flag132
410 -- Is_VMS_Exception Flag133
411 -- Is_Optional_Parameter Flag134
412 -- Has_Aliased_Components Flag135
413 -- No_Strict_Aliasing Flag136
414 -- Is_Machine_Code_Subprogram Flag137
415 -- Is_Packed_Array_Type Flag138
416 -- Has_Biased_Representation Flag139
417 -- Has_Complex_Representation Flag140
419 -- Is_Constr_Subt_For_UN_Aliased Flag141
420 -- Has_Missing_Return Flag142
421 -- Has_Recursive_Call Flag143
422 -- Is_Unsigned_Type Flag144
423 -- Strict_Alignment Flag145
424 -- Is_Abstract_Type Flag146
425 -- Needs_Debug_Info Flag147
426 -- Suppress_Elaboration_Warnings Flag148
427 -- Is_Compilation_Unit Flag149
428 -- Has_Pragma_Elaborate_Body Flag150
430 -- Has_Private_Ancestor Flag151
431 -- Entry_Accepted Flag152
432 -- Is_Obsolescent Flag153
433 -- Has_Per_Object_Constraint Flag154
434 -- Has_Private_Declaration Flag155
435 -- Referenced Flag156
436 -- Has_Pragma_Inline Flag157
437 -- Finalize_Storage_Only Flag158
438 -- From_Limited_With Flag159
439 -- Is_Package_Body_Entity Flag160
441 -- Has_Qualified_Name Flag161
442 -- Nonzero_Is_True Flag162
443 -- Is_True_Constant Flag163
444 -- Reverse_Bit_Order Flag164
445 -- Suppress_Style_Checks Flag165
446 -- Debug_Info_Off Flag166
447 -- Sec_Stack_Needed_For_Return Flag167
448 -- Materialize_Entity Flag168
449 -- Has_Pragma_Thread_Local_Storage Flag169
450 -- Is_Known_Valid Flag170
452 -- Is_Hidden_Open_Scope Flag171
453 -- Has_Object_Size_Clause Flag172
454 -- Has_Fully_Qualified_Name Flag173
455 -- Elaboration_Entity_Required Flag174
456 -- Has_Forward_Instantiation Flag175
457 -- Is_Discrim_SO_Function Flag176
458 -- Size_Depends_On_Discriminant Flag177
459 -- Is_Null_Init_Proc Flag178
460 -- Has_Pragma_Pure_Function Flag179
461 -- Has_Pragma_Unreferenced Flag180
463 -- Has_Contiguous_Rep Flag181
464 -- Has_Xref_Entry Flag182
465 -- Must_Be_On_Byte_Boundary Flag183
466 -- Has_Stream_Size_Clause Flag184
467 -- Is_Ada_2005_Only Flag185
468 -- Is_Interface Flag186
469 -- Has_Constrained_Partial_View Flag187
470 -- Uses_Lock_Free Flag188
471 -- Is_Pure_Unit_Access_Type Flag189
472 -- Has_Specified_Stream_Input Flag190
474 -- Has_Specified_Stream_Output Flag191
475 -- Has_Specified_Stream_Read Flag192
476 -- Has_Specified_Stream_Write Flag193
477 -- Is_Local_Anonymous_Access Flag194
478 -- Is_Primitive_Wrapper Flag195
479 -- Was_Hidden Flag196
480 -- Is_Limited_Interface Flag197
481 -- Has_Pragma_Ordered Flag198
482 -- Is_Ada_2012_Only Flag199
484 -- Has_Delayed_Aspects Flag200
485 -- Has_Pragma_No_Inline Flag201
486 -- Itype_Printed Flag202
487 -- Has_Pragma_Pure Flag203
488 -- Is_Known_Null Flag204
489 -- Low_Bound_Tested Flag205
490 -- Is_Visible_Formal Flag206
491 -- Known_To_Have_Preelab_Init Flag207
492 -- Must_Have_Preelab_Init Flag208
493 -- Is_Return_Object Flag209
494 -- Elaborate_Body_Desirable Flag210
496 -- Has_Static_Discriminants Flag211
497 -- Has_Pragma_Unreferenced_Objects Flag212
498 -- Requires_Overriding Flag213
500 -- Has_Up_Level_Access Flag215
501 -- Universal_Aliasing Flag216
502 -- Suppress_Value_Tracking_On_Call Flag217
503 -- Is_Primitive Flag218
504 -- Has_Initial_Value Flag219
505 -- Has_Dispatch_Table Flag220
507 -- Has_Pragma_Preelab_Init Flag221
508 -- Used_As_Generic_Actual Flag222
509 -- Is_Descendent_Of_Address Flag223
512 -- Is_Only_Out_Parameter Flag226
513 -- Referenced_As_Out_Parameter Flag227
514 -- Has_Thunks Flag228
515 -- Can_Use_Internal_Rep Flag229
516 -- Has_Pragma_Inline_Always Flag230
518 -- Renamed_In_Spec Flag231
519 -- Has_Invariants Flag232
520 -- Has_Pragma_Unmodified Flag233
521 -- Is_Dispatch_Table_Entity Flag234
522 -- Is_Trivial_Subprogram Flag235
523 -- Warnings_Off_Used Flag236
524 -- Warnings_Off_Used_Unmodified Flag237
525 -- Warnings_Off_Used_Unreferenced Flag238
526 -- OK_To_Reorder_Components Flag239
527 -- Has_Postconditions Flag240
529 -- Optimize_Alignment_Space Flag241
530 -- Optimize_Alignment_Time Flag242
531 -- Overlays_Constant Flag243
532 -- Is_RACW_Stub_Type Flag244
533 -- Is_Private_Primitive Flag245
534 -- Is_Underlying_Record_View Flag246
535 -- OK_To_Rename Flag247
536 -- Has_Inheritable_Invariants Flag248
537 -- Is_Safe_To_Reevaluate Flag249
538 -- Has_Predicates Flag250
540 -- Has_Implicit_Dereference Flag251
541 -- Is_Processed_Transient Flag252
542 -- Has_Anonymous_Master Flag253
543 -- Is_Implementation_Defined Flag254
544 -- Is_Predicate_Function Flag255
545 -- Is_Predicate_Function_M Flag256
546 -- Is_Invariant_Procedure Flag257
547 -- Has_Dynamic_Predicate_Aspect Flag258
548 -- Has_Static_Predicate_Aspect Flag259
549 -- Has_Loop_Entry_Attributes Flag260
551 -- Has_Delayed_Rep_Aspects Flag261
552 -- May_Inherit_Delayed_Rep_Aspects Flag262
553 -- Has_Visible_Refinement Flag263
554 -- Has_Body_References Flag264
555 -- SPARK_Pragma_Inherited Flag265
556 -- SPARK_Aux_Pragma_Inherited Flag266
585 -- Note: Flag287-317 are defined in atree.ads/adb, but not yet in atree.h
587 -----------------------
588 -- Local subprograms --
589 -----------------------
593 Opt_Nam : Name_Id) return Boolean;
594 -- Determine whether abstract state State has a particular option denoted
595 -- by the name Opt_Nam.
601 function Float_Rep (Id : E) return F is
602 pragma Assert (Is_Floating_Point_Type (Id));
604 return F'Val (UI_To_Int (Uint10 (Base_Type (Id))));
613 Opt_Nam : Name_Id) return Boolean
615 Par : constant Node_Id := Parent (State);
619 pragma Assert (Ekind (State) = E_Abstract_State);
621 -- States with options appear as extension aggregates in the tree
623 if Nkind (Par) = N_Extension_Aggregate then
624 if Opt_Nam = Name_Part_Of then
625 return Present (Component_Associations (Par));
628 Opt := First (Expressions (Par));
629 while Present (Opt) loop
630 if Chars (Opt) = Opt_Nam then
642 --------------------------------
643 -- Attribute Access Functions --
644 --------------------------------
646 function Abstract_States (Id : E) return L is
648 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
652 function Accept_Address (Id : E) return L is
657 function Access_Disp_Table (Id : E) return L is
659 pragma Assert (Ekind_In (Id, E_Record_Type,
661 return Elist16 (Implementation_Base_Type (Id));
662 end Access_Disp_Table;
664 function Actual_Subtype (Id : E) return E is
667 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
668 or else Is_Formal (Id));
672 function Address_Taken (Id : E) return B is
677 function Alias (Id : E) return E is
680 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
684 function Alignment (Id : E) return U is
686 pragma Assert (Is_Type (Id)
687 or else Is_Formal (Id)
688 or else Ekind_In (Id, E_Loop_Parameter,
695 function Associated_Formal_Package (Id : E) return E is
697 pragma Assert (Ekind (Id) = E_Package);
699 end Associated_Formal_Package;
701 function Associated_Node_For_Itype (Id : E) return N is
704 end Associated_Node_For_Itype;
706 function Associated_Storage_Pool (Id : E) return E is
708 pragma Assert (Is_Access_Type (Id));
709 return Node22 (Root_Type (Id));
710 end Associated_Storage_Pool;
712 function Barrier_Function (Id : E) return N is
714 pragma Assert (Is_Entry (Id));
716 end Barrier_Function;
718 function Block_Node (Id : E) return N is
720 pragma Assert (Ekind (Id) = E_Block);
724 function Body_Entity (Id : E) return E is
726 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
730 function Body_Needed_For_SAL (Id : E) return B is
733 (Ekind (Id) = E_Package
734 or else Is_Subprogram (Id)
735 or else Is_Generic_Unit (Id));
737 end Body_Needed_For_SAL;
739 function Body_References (Id : E) return L is
741 pragma Assert (Ekind (Id) = E_Abstract_State);
745 function C_Pass_By_Copy (Id : E) return B is
747 pragma Assert (Is_Record_Type (Id));
748 return Flag125 (Implementation_Base_Type (Id));
751 function Can_Never_Be_Null (Id : E) return B is
754 end Can_Never_Be_Null;
756 function Checks_May_Be_Suppressed (Id : E) return B is
759 end Checks_May_Be_Suppressed;
761 function Class_Wide_Type (Id : E) return E is
763 pragma Assert (Is_Type (Id));
767 function Cloned_Subtype (Id : E) return E is
769 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
773 function Component_Bit_Offset (Id : E) return U is
775 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
777 end Component_Bit_Offset;
779 function Component_Clause (Id : E) return N is
781 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
783 end Component_Clause;
785 function Component_Size (Id : E) return U is
787 pragma Assert (Is_Array_Type (Id));
788 return Uint22 (Implementation_Base_Type (Id));
791 function Component_Type (Id : E) return E is
793 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
794 return Node20 (Implementation_Base_Type (Id));
797 function Corresponding_Concurrent_Type (Id : E) return E is
799 pragma Assert (Ekind (Id) = E_Record_Type);
801 end Corresponding_Concurrent_Type;
803 function Corresponding_Discriminant (Id : E) return E is
805 pragma Assert (Ekind (Id) = E_Discriminant);
807 end Corresponding_Discriminant;
809 function Corresponding_Equality (Id : E) return E is
812 (Ekind (Id) = E_Function
813 and then not Comes_From_Source (Id)
814 and then Chars (Id) = Name_Op_Ne);
816 end Corresponding_Equality;
818 function Corresponding_Protected_Entry (Id : E) return E is
820 pragma Assert (Ekind (Id) = E_Subprogram_Body);
822 end Corresponding_Protected_Entry;
824 function Corresponding_Record_Type (Id : E) return E is
826 pragma Assert (Is_Concurrent_Type (Id));
828 end Corresponding_Record_Type;
830 function Corresponding_Remote_Type (Id : E) return E is
833 end Corresponding_Remote_Type;
835 function Current_Use_Clause (Id : E) return E is
837 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
839 end Current_Use_Clause;
841 function Current_Value (Id : E) return N is
843 pragma Assert (Ekind (Id) in Object_Kind);
847 function CR_Discriminant (Id : E) return E is
852 function Debug_Info_Off (Id : E) return B is
857 function Debug_Renaming_Link (Id : E) return E is
860 end Debug_Renaming_Link;
862 function Default_Aspect_Component_Value (Id : E) return N is
864 pragma Assert (Is_Array_Type (Id));
865 return Node19 (Base_Type (Id));
866 end Default_Aspect_Component_Value;
868 function Default_Aspect_Value (Id : E) return N is
870 pragma Assert (Is_Scalar_Type (Id));
871 return Node19 (Base_Type (Id));
872 end Default_Aspect_Value;
874 function Default_Expr_Function (Id : E) return E is
876 pragma Assert (Is_Formal (Id));
878 end Default_Expr_Function;
880 function Default_Expressions_Processed (Id : E) return B is
883 end Default_Expressions_Processed;
885 function Default_Value (Id : E) return N is
887 pragma Assert (Is_Formal (Id));
891 function Delay_Cleanups (Id : E) return B is
896 function Delay_Subprogram_Descriptors (Id : E) return B is
899 end Delay_Subprogram_Descriptors;
901 function Delta_Value (Id : E) return R is
903 pragma Assert (Is_Fixed_Point_Type (Id));
907 function Dependent_Instances (Id : E) return L is
909 pragma Assert (Is_Generic_Instance (Id));
911 end Dependent_Instances;
913 function Depends_On_Private (Id : E) return B is
915 pragma Assert (Nkind (Id) in N_Entity);
917 end Depends_On_Private;
919 function Digits_Value (Id : E) return U is
922 (Is_Floating_Point_Type (Id)
923 or else Is_Decimal_Fixed_Point_Type (Id));
927 function Direct_Primitive_Operations (Id : E) return L is
929 pragma Assert (Is_Tagged_Type (Id));
931 end Direct_Primitive_Operations;
933 function Directly_Designated_Type (Id : E) return E is
935 pragma Assert (Is_Access_Type (Id));
937 end Directly_Designated_Type;
939 function Discard_Names (Id : E) return B is
944 function Discriminal (Id : E) return E is
946 pragma Assert (Ekind (Id) = E_Discriminant);
950 function Discriminal_Link (Id : E) return N is
953 end Discriminal_Link;
955 function Discriminant_Checking_Func (Id : E) return E is
957 pragma Assert (Ekind (Id) = E_Component);
959 end Discriminant_Checking_Func;
961 function Discriminant_Constraint (Id : E) return L is
963 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
965 end Discriminant_Constraint;
967 function Discriminant_Default_Value (Id : E) return N is
969 pragma Assert (Ekind (Id) = E_Discriminant);
971 end Discriminant_Default_Value;
973 function Discriminant_Number (Id : E) return U is
975 pragma Assert (Ekind (Id) = E_Discriminant);
977 end Discriminant_Number;
979 function Dispatch_Table_Wrappers (Id : E) return L is
981 pragma Assert (Ekind_In (Id, E_Record_Type,
983 return Elist26 (Implementation_Base_Type (Id));
984 end Dispatch_Table_Wrappers;
986 function DT_Entry_Count (Id : E) return U is
988 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
992 function DT_Offset_To_Top_Func (Id : E) return E is
994 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
996 end DT_Offset_To_Top_Func;
998 function DT_Position (Id : E) return U is
1000 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
1001 and then Present (DTC_Entity (Id)));
1005 function DTC_Entity (Id : E) return E is
1007 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1011 function Elaborate_Body_Desirable (Id : E) return B is
1013 pragma Assert (Ekind (Id) = E_Package);
1014 return Flag210 (Id);
1015 end Elaborate_Body_Desirable;
1017 function Elaboration_Entity (Id : E) return E is
1022 Ekind (Id) = E_Package
1024 Is_Generic_Unit (Id));
1026 end Elaboration_Entity;
1028 function Elaboration_Entity_Required (Id : E) return B is
1033 Ekind (Id) = E_Package
1035 Is_Generic_Unit (Id));
1036 return Flag174 (Id);
1037 end Elaboration_Entity_Required;
1039 function Enclosing_Scope (Id : E) return E is
1042 end Enclosing_Scope;
1044 function Entry_Accepted (Id : E) return B is
1046 pragma Assert (Is_Entry (Id));
1047 return Flag152 (Id);
1050 function Entry_Bodies_Array (Id : E) return E is
1053 end Entry_Bodies_Array;
1055 function Entry_Cancel_Parameter (Id : E) return E is
1058 end Entry_Cancel_Parameter;
1060 function Entry_Component (Id : E) return E is
1063 end Entry_Component;
1065 function Entry_Formal (Id : E) return E is
1070 function Entry_Index_Constant (Id : E) return N is
1072 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
1074 end Entry_Index_Constant;
1076 function Contract (Id : E) return N is
1079 (Ekind_In (Id, E_Entry,
1086 or else Is_Generic_Subprogram (Id)
1087 or else Is_Subprogram (Id));
1091 function Entry_Parameters_Type (Id : E) return E is
1094 end Entry_Parameters_Type;
1096 function Enum_Pos_To_Rep (Id : E) return E is
1098 pragma Assert (Ekind (Id) = E_Enumeration_Type);
1100 end Enum_Pos_To_Rep;
1102 function Enumeration_Pos (Id : E) return Uint is
1104 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1106 end Enumeration_Pos;
1108 function Enumeration_Rep (Id : E) return U is
1110 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1112 end Enumeration_Rep;
1114 function Enumeration_Rep_Expr (Id : E) return N is
1116 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1118 end Enumeration_Rep_Expr;
1120 function Equivalent_Type (Id : E) return E is
1123 (Ekind_In (Id, E_Class_Wide_Type,
1124 E_Class_Wide_Subtype,
1125 E_Access_Subprogram_Type,
1126 E_Access_Protected_Subprogram_Type,
1127 E_Anonymous_Access_Protected_Subprogram_Type,
1128 E_Access_Subprogram_Type,
1131 end Equivalent_Type;
1133 function Esize (Id : E) return Uint is
1138 function Exception_Code (Id : E) return Uint is
1140 pragma Assert (Ekind (Id) = E_Exception);
1144 function Extra_Accessibility (Id : E) return E is
1147 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
1149 end Extra_Accessibility;
1151 function Extra_Accessibility_Of_Result (Id : E) return E is
1153 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
1155 end Extra_Accessibility_Of_Result;
1157 function Extra_Constrained (Id : E) return E is
1159 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1161 end Extra_Constrained;
1163 function Extra_Formal (Id : E) return E is
1168 function Extra_Formals (Id : E) return E is
1171 (Is_Overloadable (Id)
1172 or else Ekind_In (Id, E_Entry_Family,
1174 E_Subprogram_Type));
1178 function Can_Use_Internal_Rep (Id : E) return B is
1180 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1181 return Flag229 (Base_Type (Id));
1182 end Can_Use_Internal_Rep;
1184 function Finalization_Master (Id : E) return E is
1186 pragma Assert (Is_Access_Type (Id));
1187 return Node23 (Root_Type (Id));
1188 end Finalization_Master;
1190 function Finalize_Storage_Only (Id : E) return B is
1192 pragma Assert (Is_Type (Id));
1193 return Flag158 (Base_Type (Id));
1194 end Finalize_Storage_Only;
1196 function Finalizer (Id : E) return E is
1198 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
1202 function First_Entity (Id : E) return E is
1207 function First_Exit_Statement (Id : E) return N is
1209 pragma Assert (Ekind (Id) = E_Loop);
1211 end First_Exit_Statement;
1213 function First_Index (Id : E) return N is
1215 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1219 function First_Literal (Id : E) return E is
1221 pragma Assert (Is_Enumeration_Type (Id));
1225 function First_Optional_Parameter (Id : E) return E is
1227 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1229 end First_Optional_Parameter;
1231 function First_Private_Entity (Id : E) return E is
1233 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1234 or else Ekind (Id) in Concurrent_Kind);
1236 end First_Private_Entity;
1238 function First_Rep_Item (Id : E) return E is
1243 function Freeze_Node (Id : E) return N is
1248 function From_Limited_With (Id : E) return B is
1250 return Flag159 (Id);
1251 end From_Limited_With;
1253 function Full_View (Id : E) return E is
1255 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1259 function Generic_Homonym (Id : E) return E is
1261 pragma Assert (Ekind (Id) = E_Generic_Package);
1263 end Generic_Homonym;
1265 function Generic_Renamings (Id : E) return L is
1267 return Elist23 (Id);
1268 end Generic_Renamings;
1270 function Handler_Records (Id : E) return S is
1273 end Handler_Records;
1275 function Has_Aliased_Components (Id : E) return B is
1277 return Flag135 (Implementation_Base_Type (Id));
1278 end Has_Aliased_Components;
1280 function Has_Alignment_Clause (Id : E) return B is
1283 end Has_Alignment_Clause;
1285 function Has_All_Calls_Remote (Id : E) return B is
1288 end Has_All_Calls_Remote;
1290 function Has_Anonymous_Master (Id : E) return B is
1293 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
1294 return Flag253 (Id);
1295 end Has_Anonymous_Master;
1297 function Has_Atomic_Components (Id : E) return B is
1299 return Flag86 (Implementation_Base_Type (Id));
1300 end Has_Atomic_Components;
1302 function Has_Biased_Representation (Id : E) return B is
1304 return Flag139 (Id);
1305 end Has_Biased_Representation;
1307 function Has_Body_References (Id : E) return B is
1309 pragma Assert (Ekind (Id) = E_Abstract_State);
1310 return Flag264 (Id);
1311 end Has_Body_References;
1313 function Has_Completion (Id : E) return B is
1318 function Has_Completion_In_Body (Id : E) return B is
1320 pragma Assert (Is_Type (Id));
1322 end Has_Completion_In_Body;
1324 function Has_Complex_Representation (Id : E) return B is
1326 pragma Assert (Is_Type (Id));
1327 return Flag140 (Implementation_Base_Type (Id));
1328 end Has_Complex_Representation;
1330 function Has_Component_Size_Clause (Id : E) return B is
1332 pragma Assert (Is_Array_Type (Id));
1333 return Flag68 (Implementation_Base_Type (Id));
1334 end Has_Component_Size_Clause;
1336 function Has_Constrained_Partial_View (Id : E) return B is
1338 pragma Assert (Is_Type (Id));
1339 return Flag187 (Id);
1340 end Has_Constrained_Partial_View;
1342 function Has_Controlled_Component (Id : E) return B is
1344 return Flag43 (Base_Type (Id));
1345 end Has_Controlled_Component;
1347 function Has_Contiguous_Rep (Id : E) return B is
1349 return Flag181 (Id);
1350 end Has_Contiguous_Rep;
1352 function Has_Controlling_Result (Id : E) return B is
1355 end Has_Controlling_Result;
1357 function Has_Convention_Pragma (Id : E) return B is
1359 return Flag119 (Id);
1360 end Has_Convention_Pragma;
1362 function Has_Default_Aspect (Id : E) return B is
1364 return Flag39 (Base_Type (Id));
1365 end Has_Default_Aspect;
1367 function Has_Delayed_Aspects (Id : E) return B is
1369 pragma Assert (Nkind (Id) in N_Entity);
1370 return Flag200 (Id);
1371 end Has_Delayed_Aspects;
1373 function Has_Delayed_Freeze (Id : E) return B is
1375 pragma Assert (Nkind (Id) in N_Entity);
1377 end Has_Delayed_Freeze;
1379 function Has_Delayed_Rep_Aspects (Id : E) return B is
1381 pragma Assert (Nkind (Id) in N_Entity);
1382 return Flag261 (Id);
1383 end Has_Delayed_Rep_Aspects;
1385 function Has_Discriminants (Id : E) return B is
1387 pragma Assert (Nkind (Id) in N_Entity);
1389 end Has_Discriminants;
1391 function Has_Dispatch_Table (Id : E) return B is
1393 pragma Assert (Is_Tagged_Type (Id));
1394 return Flag220 (Id);
1395 end Has_Dispatch_Table;
1397 function Has_Dynamic_Predicate_Aspect (Id : E) return B is
1399 pragma Assert (Is_Type (Id));
1400 return Flag258 (Id);
1401 end Has_Dynamic_Predicate_Aspect;
1403 function Has_Enumeration_Rep_Clause (Id : E) return B is
1405 pragma Assert (Is_Enumeration_Type (Id));
1407 end Has_Enumeration_Rep_Clause;
1409 function Has_Exit (Id : E) return B is
1414 function Has_External_Tag_Rep_Clause (Id : E) return B is
1416 pragma Assert (Is_Tagged_Type (Id));
1417 return Flag110 (Id);
1418 end Has_External_Tag_Rep_Clause;
1420 function Has_Forward_Instantiation (Id : E) return B is
1422 return Flag175 (Id);
1423 end Has_Forward_Instantiation;
1425 function Has_Fully_Qualified_Name (Id : E) return B is
1427 return Flag173 (Id);
1428 end Has_Fully_Qualified_Name;
1430 function Has_Gigi_Rep_Item (Id : E) return B is
1433 end Has_Gigi_Rep_Item;
1435 function Has_Homonym (Id : E) return B is
1440 function Has_Implicit_Dereference (Id : E) return B is
1442 return Flag251 (Id);
1443 end Has_Implicit_Dereference;
1445 function Has_Independent_Components (Id : E) return B is
1447 pragma Assert (Is_Object (Id) or else Is_Type (Id));
1449 end Has_Independent_Components;
1451 function Has_Inheritable_Invariants (Id : E) return B is
1453 pragma Assert (Is_Type (Id));
1454 return Flag248 (Id);
1455 end Has_Inheritable_Invariants;
1457 function Has_Initial_Value (Id : E) return B is
1459 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1460 return Flag219 (Id);
1461 end Has_Initial_Value;
1463 function Has_Invariants (Id : E) return B is
1465 pragma Assert (Is_Type (Id));
1466 return Flag232 (Id);
1469 function Has_Loop_Entry_Attributes (Id : E) return B is
1471 pragma Assert (Ekind (Id) = E_Loop);
1472 return Flag260 (Id);
1473 end Has_Loop_Entry_Attributes;
1475 function Has_Machine_Radix_Clause (Id : E) return B is
1477 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1479 end Has_Machine_Radix_Clause;
1481 function Has_Master_Entity (Id : E) return B is
1484 end Has_Master_Entity;
1486 function Has_Missing_Return (Id : E) return B is
1488 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1489 return Flag142 (Id);
1490 end Has_Missing_Return;
1492 function Has_Nested_Block_With_Handler (Id : E) return B is
1494 return Flag101 (Id);
1495 end Has_Nested_Block_With_Handler;
1497 function Has_Non_Standard_Rep (Id : E) return B is
1499 return Flag75 (Implementation_Base_Type (Id));
1500 end Has_Non_Standard_Rep;
1502 function Has_Object_Size_Clause (Id : E) return B is
1504 pragma Assert (Is_Type (Id));
1505 return Flag172 (Id);
1506 end Has_Object_Size_Clause;
1508 function Has_Per_Object_Constraint (Id : E) return B is
1510 return Flag154 (Id);
1511 end Has_Per_Object_Constraint;
1513 function Has_Postconditions (Id : E) return B is
1515 pragma Assert (Is_Subprogram (Id));
1516 return Flag240 (Id);
1517 end Has_Postconditions;
1519 function Has_Pragma_Controlled (Id : E) return B is
1521 pragma Assert (Is_Access_Type (Id));
1522 return Flag27 (Implementation_Base_Type (Id));
1523 end Has_Pragma_Controlled;
1525 function Has_Pragma_Elaborate_Body (Id : E) return B is
1527 return Flag150 (Id);
1528 end Has_Pragma_Elaborate_Body;
1530 function Has_Pragma_Inline (Id : E) return B is
1532 return Flag157 (Id);
1533 end Has_Pragma_Inline;
1535 function Has_Pragma_Inline_Always (Id : E) return B is
1537 return Flag230 (Id);
1538 end Has_Pragma_Inline_Always;
1540 function Has_Pragma_No_Inline (Id : E) return B is
1542 return Flag201 (Id);
1543 end Has_Pragma_No_Inline;
1545 function Has_Pragma_Ordered (Id : E) return B is
1547 pragma Assert (Is_Enumeration_Type (Id));
1548 return Flag198 (Implementation_Base_Type (Id));
1549 end Has_Pragma_Ordered;
1551 function Has_Pragma_Pack (Id : E) return B is
1553 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1554 return Flag121 (Implementation_Base_Type (Id));
1555 end Has_Pragma_Pack;
1557 function Has_Pragma_Preelab_Init (Id : E) return B is
1559 return Flag221 (Id);
1560 end Has_Pragma_Preelab_Init;
1562 function Has_Pragma_Pure (Id : E) return B is
1564 return Flag203 (Id);
1565 end Has_Pragma_Pure;
1567 function Has_Pragma_Pure_Function (Id : E) return B is
1569 return Flag179 (Id);
1570 end Has_Pragma_Pure_Function;
1572 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1574 return Flag169 (Id);
1575 end Has_Pragma_Thread_Local_Storage;
1577 function Has_Pragma_Unmodified (Id : E) return B is
1579 return Flag233 (Id);
1580 end Has_Pragma_Unmodified;
1582 function Has_Pragma_Unreferenced (Id : E) return B is
1584 return Flag180 (Id);
1585 end Has_Pragma_Unreferenced;
1587 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1589 pragma Assert (Is_Type (Id));
1590 return Flag212 (Id);
1591 end Has_Pragma_Unreferenced_Objects;
1593 function Has_Predicates (Id : E) return B is
1595 pragma Assert (Is_Type (Id));
1596 return Flag250 (Id);
1599 function Has_Primitive_Operations (Id : E) return B is
1601 pragma Assert (Is_Type (Id));
1602 return Flag120 (Base_Type (Id));
1603 end Has_Primitive_Operations;
1605 function Has_Private_Ancestor (Id : E) return B is
1607 return Flag151 (Id);
1608 end Has_Private_Ancestor;
1610 function Has_Private_Declaration (Id : E) return B is
1612 return Flag155 (Id);
1613 end Has_Private_Declaration;
1615 function Has_Qualified_Name (Id : E) return B is
1617 return Flag161 (Id);
1618 end Has_Qualified_Name;
1620 function Has_RACW (Id : E) return B is
1622 pragma Assert (Ekind (Id) = E_Package);
1623 return Flag214 (Id);
1626 function Has_Record_Rep_Clause (Id : E) return B is
1628 pragma Assert (Is_Record_Type (Id));
1629 return Flag65 (Implementation_Base_Type (Id));
1630 end Has_Record_Rep_Clause;
1632 function Has_Recursive_Call (Id : E) return B is
1634 pragma Assert (Is_Subprogram (Id));
1635 return Flag143 (Id);
1636 end Has_Recursive_Call;
1638 function Has_Size_Clause (Id : E) return B is
1641 end Has_Size_Clause;
1643 function Has_Small_Clause (Id : E) return B is
1646 end Has_Small_Clause;
1648 function Has_Specified_Layout (Id : E) return B is
1650 pragma Assert (Is_Type (Id));
1651 return Flag100 (Implementation_Base_Type (Id));
1652 end Has_Specified_Layout;
1654 function Has_Specified_Stream_Input (Id : E) return B is
1656 pragma Assert (Is_Type (Id));
1657 return Flag190 (Id);
1658 end Has_Specified_Stream_Input;
1660 function Has_Specified_Stream_Output (Id : E) return B is
1662 pragma Assert (Is_Type (Id));
1663 return Flag191 (Id);
1664 end Has_Specified_Stream_Output;
1666 function Has_Specified_Stream_Read (Id : E) return B is
1668 pragma Assert (Is_Type (Id));
1669 return Flag192 (Id);
1670 end Has_Specified_Stream_Read;
1672 function Has_Specified_Stream_Write (Id : E) return B is
1674 pragma Assert (Is_Type (Id));
1675 return Flag193 (Id);
1676 end Has_Specified_Stream_Write;
1678 function Has_Static_Discriminants (Id : E) return B is
1680 pragma Assert (Is_Type (Id));
1681 return Flag211 (Id);
1682 end Has_Static_Discriminants;
1684 function Has_Static_Predicate_Aspect (Id : E) return B is
1686 pragma Assert (Is_Type (Id));
1687 return Flag259 (Id);
1688 end Has_Static_Predicate_Aspect;
1690 function Has_Storage_Size_Clause (Id : E) return B is
1692 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1693 return Flag23 (Implementation_Base_Type (Id));
1694 end Has_Storage_Size_Clause;
1696 function Has_Stream_Size_Clause (Id : E) return B is
1698 return Flag184 (Id);
1699 end Has_Stream_Size_Clause;
1701 function Has_Task (Id : E) return B is
1703 return Flag30 (Base_Type (Id));
1706 function Has_Thunks (Id : E) return B is
1708 return Flag228 (Id);
1711 function Has_Unchecked_Union (Id : E) return B is
1713 return Flag123 (Base_Type (Id));
1714 end Has_Unchecked_Union;
1716 function Has_Unknown_Discriminants (Id : E) return B is
1718 pragma Assert (Is_Type (Id));
1720 end Has_Unknown_Discriminants;
1722 function Has_Up_Level_Access (Id : E) return B is
1725 (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
1726 return Flag215 (Id);
1727 end Has_Up_Level_Access;
1729 function Has_Visible_Refinement (Id : E) return B is
1731 pragma Assert (Ekind (Id) = E_Abstract_State);
1732 return Flag263 (Id);
1733 end Has_Visible_Refinement;
1735 function Has_Volatile_Components (Id : E) return B is
1737 return Flag87 (Implementation_Base_Type (Id));
1738 end Has_Volatile_Components;
1740 function Has_Xref_Entry (Id : E) return B is
1742 return Flag182 (Id);
1745 function Hiding_Loop_Variable (Id : E) return E is
1747 pragma Assert (Ekind (Id) = E_Variable);
1749 end Hiding_Loop_Variable;
1751 function Homonym (Id : E) return E is
1756 function Interface_Alias (Id : E) return E is
1758 pragma Assert (Is_Subprogram (Id));
1760 end Interface_Alias;
1762 function Interfaces (Id : E) return L is
1764 pragma Assert (Is_Record_Type (Id));
1765 return Elist25 (Id);
1768 function In_Package_Body (Id : E) return B is
1771 end In_Package_Body;
1773 function In_Private_Part (Id : E) return B is
1776 end In_Private_Part;
1778 function In_Use (Id : E) return B is
1780 pragma Assert (Nkind (Id) in N_Entity);
1784 function Initialization_Statements (Id : E) return N is
1786 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
1788 end Initialization_Statements;
1790 function Inner_Instances (Id : E) return L is
1792 return Elist23 (Id);
1793 end Inner_Instances;
1795 function Interface_Name (Id : E) return N is
1800 function Is_Abstract_Subprogram (Id : E) return B is
1802 pragma Assert (Is_Overloadable (Id));
1804 end Is_Abstract_Subprogram;
1806 function Is_Abstract_Type (Id : E) return B is
1808 pragma Assert (Is_Type (Id));
1809 return Flag146 (Id);
1810 end Is_Abstract_Type;
1812 function Is_Local_Anonymous_Access (Id : E) return B is
1814 pragma Assert (Is_Access_Type (Id));
1815 return Flag194 (Id);
1816 end Is_Local_Anonymous_Access;
1818 function Is_Access_Constant (Id : E) return B is
1820 pragma Assert (Is_Access_Type (Id));
1822 end Is_Access_Constant;
1824 function Is_Ada_2005_Only (Id : E) return B is
1826 return Flag185 (Id);
1827 end Is_Ada_2005_Only;
1829 function Is_Ada_2012_Only (Id : E) return B is
1831 return Flag199 (Id);
1832 end Is_Ada_2012_Only;
1834 function Is_Aliased (Id : E) return B is
1836 pragma Assert (Nkind (Id) in N_Entity);
1840 function Is_AST_Entry (Id : E) return B is
1842 pragma Assert (Is_Entry (Id));
1843 return Flag132 (Id);
1846 function Is_Asynchronous (Id : E) return B is
1848 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1850 end Is_Asynchronous;
1852 function Is_Atomic (Id : E) return B is
1857 function Is_Bit_Packed_Array (Id : E) return B is
1859 return Flag122 (Implementation_Base_Type (Id));
1860 end Is_Bit_Packed_Array;
1862 function Is_Called (Id : E) return B is
1864 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1865 return Flag102 (Id);
1868 function Is_Character_Type (Id : E) return B is
1871 end Is_Character_Type;
1873 function Is_Child_Unit (Id : E) return B is
1878 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1881 end Is_Class_Wide_Equivalent_Type;
1883 function Is_Compilation_Unit (Id : E) return B is
1885 return Flag149 (Id);
1886 end Is_Compilation_Unit;
1888 function Is_Completely_Hidden (Id : E) return B is
1890 pragma Assert (Ekind (Id) = E_Discriminant);
1891 return Flag103 (Id);
1892 end Is_Completely_Hidden;
1894 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1897 end Is_Constr_Subt_For_U_Nominal;
1899 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1901 return Flag141 (Id);
1902 end Is_Constr_Subt_For_UN_Aliased;
1904 function Is_Constrained (Id : E) return B is
1906 pragma Assert (Nkind (Id) in N_Entity);
1910 function Is_Constructor (Id : E) return B is
1915 function Is_Controlled (Id : E) return B is
1917 return Flag42 (Base_Type (Id));
1920 function Is_Controlling_Formal (Id : E) return B is
1922 pragma Assert (Is_Formal (Id));
1924 end Is_Controlling_Formal;
1926 function Is_CPP_Class (Id : E) return B is
1931 function Is_Descendent_Of_Address (Id : E) return B is
1933 return Flag223 (Id);
1934 end Is_Descendent_Of_Address;
1936 function Is_Discrim_SO_Function (Id : E) return B is
1938 return Flag176 (Id);
1939 end Is_Discrim_SO_Function;
1941 function Is_Dispatch_Table_Entity (Id : E) return B is
1943 return Flag234 (Id);
1944 end Is_Dispatch_Table_Entity;
1946 function Is_Dispatching_Operation (Id : E) return B is
1948 pragma Assert (Nkind (Id) in N_Entity);
1950 end Is_Dispatching_Operation;
1952 function Is_Eliminated (Id : E) return B is
1954 return Flag124 (Id);
1957 function Is_Entry_Formal (Id : E) return B is
1960 end Is_Entry_Formal;
1962 function Is_Exported (Id : E) return B is
1967 function Is_First_Subtype (Id : E) return B is
1970 end Is_First_Subtype;
1972 function Is_For_Access_Subtype (Id : E) return B is
1974 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
1975 return Flag118 (Id);
1976 end Is_For_Access_Subtype;
1978 function Is_Formal_Subprogram (Id : E) return B is
1980 return Flag111 (Id);
1981 end Is_Formal_Subprogram;
1983 function Is_Frozen (Id : E) return B is
1988 function Is_Generic_Actual_Type (Id : E) return B is
1990 pragma Assert (Is_Type (Id));
1992 end Is_Generic_Actual_Type;
1994 function Is_Generic_Instance (Id : E) return B is
1996 return Flag130 (Id);
1997 end Is_Generic_Instance;
1999 function Is_Generic_Type (Id : E) return B is
2001 pragma Assert (Nkind (Id) in N_Entity);
2003 end Is_Generic_Type;
2005 function Is_Hidden (Id : E) return B is
2010 function Is_Hidden_Open_Scope (Id : E) return B is
2012 return Flag171 (Id);
2013 end Is_Hidden_Open_Scope;
2015 function Is_Immediately_Visible (Id : E) return B is
2017 pragma Assert (Nkind (Id) in N_Entity);
2019 end Is_Immediately_Visible;
2021 function Is_Implementation_Defined (Id : E) return B is
2023 return Flag254 (Id);
2024 end Is_Implementation_Defined;
2026 function Is_Imported (Id : E) return B is
2031 function Is_Inlined (Id : E) return B is
2036 function Is_Interface (Id : E) return B is
2038 return Flag186 (Id);
2041 function Is_Instantiated (Id : E) return B is
2043 return Flag126 (Id);
2044 end Is_Instantiated;
2046 function Is_Internal (Id : E) return B is
2048 pragma Assert (Nkind (Id) in N_Entity);
2052 function Is_Interrupt_Handler (Id : E) return B is
2054 pragma Assert (Nkind (Id) in N_Entity);
2056 end Is_Interrupt_Handler;
2058 function Is_Intrinsic_Subprogram (Id : E) return B is
2061 end Is_Intrinsic_Subprogram;
2063 function Is_Invariant_Procedure (Id : E) return B is
2065 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2066 return Flag257 (Id);
2067 end Is_Invariant_Procedure;
2069 function Is_Itype (Id : E) return B is
2074 function Is_Known_Non_Null (Id : E) return B is
2077 end Is_Known_Non_Null;
2079 function Is_Known_Null (Id : E) return B is
2081 return Flag204 (Id);
2084 function Is_Known_Valid (Id : E) return B is
2086 return Flag170 (Id);
2089 function Is_Limited_Composite (Id : E) return B is
2091 return Flag106 (Id);
2092 end Is_Limited_Composite;
2094 function Is_Limited_Interface (Id : E) return B is
2096 return Flag197 (Id);
2097 end Is_Limited_Interface;
2099 function Is_Limited_Record (Id : E) return B is
2102 end Is_Limited_Record;
2104 function Is_Machine_Code_Subprogram (Id : E) return B is
2106 pragma Assert (Is_Subprogram (Id));
2107 return Flag137 (Id);
2108 end Is_Machine_Code_Subprogram;
2110 function Is_Non_Static_Subtype (Id : E) return B is
2112 pragma Assert (Is_Type (Id));
2113 return Flag109 (Id);
2114 end Is_Non_Static_Subtype;
2116 function Is_Null_Init_Proc (Id : E) return B is
2118 pragma Assert (Ekind (Id) = E_Procedure);
2119 return Flag178 (Id);
2120 end Is_Null_Init_Proc;
2122 function Is_Obsolescent (Id : E) return B is
2124 return Flag153 (Id);
2127 function Is_Only_Out_Parameter (Id : E) return B is
2129 pragma Assert (Is_Formal (Id));
2130 return Flag226 (Id);
2131 end Is_Only_Out_Parameter;
2133 function Is_Optional_Parameter (Id : E) return B is
2135 pragma Assert (Is_Formal (Id));
2136 return Flag134 (Id);
2137 end Is_Optional_Parameter;
2139 function Is_Package_Body_Entity (Id : E) return B is
2141 return Flag160 (Id);
2142 end Is_Package_Body_Entity;
2144 function Is_Packed (Id : E) return B is
2146 return Flag51 (Implementation_Base_Type (Id));
2149 function Is_Packed_Array_Type (Id : E) return B is
2151 return Flag138 (Id);
2152 end Is_Packed_Array_Type;
2154 function Is_Potentially_Use_Visible (Id : E) return B is
2156 pragma Assert (Nkind (Id) in N_Entity);
2158 end Is_Potentially_Use_Visible;
2160 function Is_Predicate_Function (Id : E) return B is
2162 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2163 return Flag255 (Id);
2164 end Is_Predicate_Function;
2166 function Is_Predicate_Function_M (Id : E) return B is
2168 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2169 return Flag256 (Id);
2170 end Is_Predicate_Function_M;
2172 function Is_Preelaborated (Id : E) return B is
2175 end Is_Preelaborated;
2177 function Is_Primitive (Id : E) return B is
2180 (Is_Overloadable (Id)
2181 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
2182 return Flag218 (Id);
2185 function Is_Primitive_Wrapper (Id : E) return B is
2187 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2188 return Flag195 (Id);
2189 end Is_Primitive_Wrapper;
2191 function Is_Private_Composite (Id : E) return B is
2193 pragma Assert (Is_Type (Id));
2194 return Flag107 (Id);
2195 end Is_Private_Composite;
2197 function Is_Private_Descendant (Id : E) return B is
2200 end Is_Private_Descendant;
2202 function Is_Private_Primitive (Id : E) return B is
2204 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2205 return Flag245 (Id);
2206 end Is_Private_Primitive;
2208 function Is_Processed_Transient (Id : E) return B is
2210 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2211 return Flag252 (Id);
2212 end Is_Processed_Transient;
2214 function Is_Public (Id : E) return B is
2216 pragma Assert (Nkind (Id) in N_Entity);
2220 function Is_Pure (Id : E) return B is
2225 function Is_Pure_Unit_Access_Type (Id : E) return B is
2227 pragma Assert (Is_Access_Type (Id));
2228 return Flag189 (Id);
2229 end Is_Pure_Unit_Access_Type;
2231 function Is_RACW_Stub_Type (Id : E) return B is
2233 pragma Assert (Is_Type (Id));
2234 return Flag244 (Id);
2235 end Is_RACW_Stub_Type;
2237 function Is_Raised (Id : E) return B is
2239 pragma Assert (Ekind (Id) = E_Exception);
2240 return Flag224 (Id);
2243 function Is_Remote_Call_Interface (Id : E) return B is
2246 end Is_Remote_Call_Interface;
2248 function Is_Remote_Types (Id : E) return B is
2251 end Is_Remote_Types;
2253 function Is_Renaming_Of_Object (Id : E) return B is
2255 return Flag112 (Id);
2256 end Is_Renaming_Of_Object;
2258 function Is_Return_Object (Id : E) return B is
2260 return Flag209 (Id);
2261 end Is_Return_Object;
2263 function Is_Safe_To_Reevaluate (Id : E) return B is
2265 return Flag249 (Id);
2266 end Is_Safe_To_Reevaluate;
2268 function Is_Shared_Passive (Id : E) return B is
2271 end Is_Shared_Passive;
2273 function Is_Statically_Allocated (Id : E) return B is
2276 end Is_Statically_Allocated;
2278 function Is_Tag (Id : E) return B is
2280 pragma Assert (Nkind (Id) in N_Entity);
2284 function Is_Tagged_Type (Id : E) return B is
2289 function Is_Thunk (Id : E) return B is
2291 return Flag225 (Id);
2294 function Is_Trivial_Subprogram (Id : E) return B is
2296 return Flag235 (Id);
2297 end Is_Trivial_Subprogram;
2299 function Is_True_Constant (Id : E) return B is
2301 return Flag163 (Id);
2302 end Is_True_Constant;
2304 function Is_Unchecked_Union (Id : E) return B is
2306 return Flag117 (Implementation_Base_Type (Id));
2307 end Is_Unchecked_Union;
2309 function Is_Underlying_Record_View (Id : E) return B is
2311 return Flag246 (Id);
2312 end Is_Underlying_Record_View;
2314 function Is_Unsigned_Type (Id : E) return B is
2316 pragma Assert (Is_Type (Id));
2317 return Flag144 (Id);
2318 end Is_Unsigned_Type;
2320 function Is_Valued_Procedure (Id : E) return B is
2322 pragma Assert (Ekind (Id) = E_Procedure);
2323 return Flag127 (Id);
2324 end Is_Valued_Procedure;
2326 function Is_Visible_Formal (Id : E) return B is
2328 return Flag206 (Id);
2329 end Is_Visible_Formal;
2331 function Is_Visible_Lib_Unit (Id : E) return B is
2333 return Flag116 (Id);
2334 end Is_Visible_Lib_Unit;
2336 function Is_VMS_Exception (Id : E) return B is
2338 return Flag133 (Id);
2339 end Is_VMS_Exception;
2341 function Is_Volatile (Id : E) return B is
2343 pragma Assert (Nkind (Id) in N_Entity);
2345 if Is_Type (Id) then
2346 return Flag16 (Base_Type (Id));
2352 function Itype_Printed (Id : E) return B is
2354 pragma Assert (Is_Itype (Id));
2355 return Flag202 (Id);
2358 function Kill_Elaboration_Checks (Id : E) return B is
2361 end Kill_Elaboration_Checks;
2363 function Kill_Range_Checks (Id : E) return B is
2366 end Kill_Range_Checks;
2368 function Known_To_Have_Preelab_Init (Id : E) return B is
2370 pragma Assert (Is_Type (Id));
2371 return Flag207 (Id);
2372 end Known_To_Have_Preelab_Init;
2374 function Last_Assignment (Id : E) return N is
2376 pragma Assert (Is_Assignable (Id));
2378 end Last_Assignment;
2380 function Last_Entity (Id : E) return E is
2385 function Limited_View (Id : E) return E is
2387 pragma Assert (Ekind (Id) = E_Package);
2391 function Linker_Section_Pragma (Id : E) return N is
2394 (Is_Type (Id) or else Is_Object (Id) or else Is_Subprogram (Id));
2396 end Linker_Section_Pragma;
2398 function Lit_Indexes (Id : E) return E is
2400 pragma Assert (Is_Enumeration_Type (Id));
2404 function Lit_Strings (Id : E) return E is
2406 pragma Assert (Is_Enumeration_Type (Id));
2410 function Low_Bound_Tested (Id : E) return B is
2412 return Flag205 (Id);
2413 end Low_Bound_Tested;
2415 function Machine_Radix_10 (Id : E) return B is
2417 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2419 end Machine_Radix_10;
2421 function Master_Id (Id : E) return E is
2423 pragma Assert (Is_Access_Type (Id));
2427 function Materialize_Entity (Id : E) return B is
2429 return Flag168 (Id);
2430 end Materialize_Entity;
2432 function May_Inherit_Delayed_Rep_Aspects (Id : E) return B is
2434 return Flag262 (Id);
2435 end May_Inherit_Delayed_Rep_Aspects;
2437 function Mechanism (Id : E) return M is
2439 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2440 return UI_To_Int (Uint8 (Id));
2443 function Modulus (Id : E) return Uint is
2445 pragma Assert (Is_Modular_Integer_Type (Id));
2446 return Uint17 (Base_Type (Id));
2449 function Must_Be_On_Byte_Boundary (Id : E) return B is
2451 pragma Assert (Is_Type (Id));
2452 return Flag183 (Id);
2453 end Must_Be_On_Byte_Boundary;
2455 function Must_Have_Preelab_Init (Id : E) return B is
2457 pragma Assert (Is_Type (Id));
2458 return Flag208 (Id);
2459 end Must_Have_Preelab_Init;
2461 function Needs_Debug_Info (Id : E) return B is
2463 return Flag147 (Id);
2464 end Needs_Debug_Info;
2466 function Needs_No_Actuals (Id : E) return B is
2469 (Is_Overloadable (Id)
2470 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2472 end Needs_No_Actuals;
2474 function Never_Set_In_Source (Id : E) return B is
2476 return Flag115 (Id);
2477 end Never_Set_In_Source;
2479 function Next_Inlined_Subprogram (Id : E) return E is
2482 end Next_Inlined_Subprogram;
2484 function No_Pool_Assigned (Id : E) return B is
2486 pragma Assert (Is_Access_Type (Id));
2487 return Flag131 (Root_Type (Id));
2488 end No_Pool_Assigned;
2490 function No_Return (Id : E) return B is
2492 return Flag113 (Id);
2495 function No_Strict_Aliasing (Id : E) return B is
2497 pragma Assert (Is_Access_Type (Id));
2498 return Flag136 (Base_Type (Id));
2499 end No_Strict_Aliasing;
2501 function Non_Binary_Modulus (Id : E) return B is
2503 pragma Assert (Is_Type (Id));
2504 return Flag58 (Base_Type (Id));
2505 end Non_Binary_Modulus;
2507 function Non_Limited_View (Id : E) return E is
2510 (Ekind (Id) in Incomplete_Kind or else Ekind (Id) = E_Abstract_State);
2512 end Non_Limited_View;
2514 function Nonzero_Is_True (Id : E) return B is
2516 pragma Assert (Root_Type (Id) = Standard_Boolean);
2517 return Flag162 (Base_Type (Id));
2518 end Nonzero_Is_True;
2520 function Normalized_First_Bit (Id : E) return U is
2522 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2524 end Normalized_First_Bit;
2526 function Normalized_Position (Id : E) return U is
2528 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2530 end Normalized_Position;
2532 function Normalized_Position_Max (Id : E) return U is
2534 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2536 end Normalized_Position_Max;
2538 function OK_To_Rename (Id : E) return B is
2540 pragma Assert (Ekind (Id) = E_Variable);
2541 return Flag247 (Id);
2544 function OK_To_Reorder_Components (Id : E) return B is
2546 pragma Assert (Is_Record_Type (Id));
2547 return Flag239 (Base_Type (Id));
2548 end OK_To_Reorder_Components;
2550 function Optimize_Alignment_Space (Id : E) return B is
2553 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2554 return Flag241 (Id);
2555 end Optimize_Alignment_Space;
2557 function Optimize_Alignment_Time (Id : E) return B is
2560 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2561 return Flag242 (Id);
2562 end Optimize_Alignment_Time;
2564 function Original_Access_Type (Id : E) return E is
2566 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2568 end Original_Access_Type;
2570 function Original_Array_Type (Id : E) return E is
2572 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2574 end Original_Array_Type;
2576 function Original_Record_Component (Id : E) return E is
2578 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2580 end Original_Record_Component;
2582 function Overlays_Constant (Id : E) return B is
2584 return Flag243 (Id);
2585 end Overlays_Constant;
2587 function Overridden_Operation (Id : E) return E is
2590 end Overridden_Operation;
2592 function Package_Instantiation (Id : E) return N is
2594 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2596 end Package_Instantiation;
2598 function Packed_Array_Type (Id : E) return E is
2600 pragma Assert (Is_Array_Type (Id));
2602 end Packed_Array_Type;
2604 function Parent_Subtype (Id : E) return E is
2606 pragma Assert (Is_Record_Type (Id));
2607 return Node19 (Base_Type (Id));
2610 function Postcondition_Proc (Id : E) return E is
2612 pragma Assert (Ekind (Id) = E_Procedure);
2614 end Postcondition_Proc;
2616 function PPC_Wrapper (Id : E) return E is
2618 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2622 function Prival (Id : E) return E is
2624 pragma Assert (Is_Protected_Component (Id));
2628 function Prival_Link (Id : E) return E is
2630 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2634 function Private_Dependents (Id : E) return L is
2636 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2637 return Elist18 (Id);
2638 end Private_Dependents;
2640 function Private_View (Id : E) return N is
2642 pragma Assert (Is_Private_Type (Id));
2646 function Protected_Body_Subprogram (Id : E) return E is
2648 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2650 end Protected_Body_Subprogram;
2652 function Protected_Formal (Id : E) return E is
2654 pragma Assert (Is_Formal (Id));
2656 end Protected_Formal;
2658 function Protection_Object (Id : E) return E is
2661 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2663 end Protection_Object;
2665 function Reachable (Id : E) return B is
2670 function Referenced (Id : E) return B is
2672 return Flag156 (Id);
2675 function Referenced_As_LHS (Id : E) return B is
2678 end Referenced_As_LHS;
2680 function Referenced_As_Out_Parameter (Id : E) return B is
2682 return Flag227 (Id);
2683 end Referenced_As_Out_Parameter;
2685 function Refined_State (Id : E) return N is
2687 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
2691 function Refinement_Constituents (Id : E) return L is
2693 pragma Assert (Ekind (Id) = E_Abstract_State);
2695 end Refinement_Constituents;
2697 function Register_Exception_Call (Id : E) return N is
2699 pragma Assert (Ekind (Id) = E_Exception);
2701 end Register_Exception_Call;
2703 function Related_Array_Object (Id : E) return E is
2705 pragma Assert (Is_Array_Type (Id));
2707 end Related_Array_Object;
2709 function Related_Expression (Id : E) return N is
2711 pragma Assert (Ekind (Id) in Type_Kind
2712 or else Ekind_In (Id, E_Constant, E_Variable));
2714 end Related_Expression;
2716 function Related_Instance (Id : E) return E is
2718 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2720 end Related_Instance;
2722 function Related_Type (Id : E) return E is
2724 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2728 function Relative_Deadline_Variable (Id : E) return E is
2730 pragma Assert (Is_Task_Type (Id));
2731 return Node26 (Implementation_Base_Type (Id));
2732 end Relative_Deadline_Variable;
2734 function Renamed_Entity (Id : E) return N is
2739 function Renamed_In_Spec (Id : E) return B is
2741 pragma Assert (Ekind (Id) = E_Package);
2742 return Flag231 (Id);
2743 end Renamed_In_Spec;
2745 function Renamed_Object (Id : E) return N is
2750 function Renaming_Map (Id : E) return U is
2755 function Requires_Overriding (Id : E) return B is
2757 pragma Assert (Is_Overloadable (Id));
2758 return Flag213 (Id);
2759 end Requires_Overriding;
2761 function Return_Present (Id : E) return B is
2766 function Return_Applies_To (Id : E) return N is
2769 end Return_Applies_To;
2771 function Returns_By_Ref (Id : E) return B is
2776 function Reverse_Bit_Order (Id : E) return B is
2778 pragma Assert (Is_Record_Type (Id));
2779 return Flag164 (Base_Type (Id));
2780 end Reverse_Bit_Order;
2782 function Reverse_Storage_Order (Id : E) return B is
2784 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
2785 return Flag93 (Base_Type (Id));
2786 end Reverse_Storage_Order;
2788 function RM_Size (Id : E) return U is
2790 pragma Assert (Is_Type (Id));
2794 function Scalar_Range (Id : E) return N is
2799 function Scale_Value (Id : E) return U is
2804 function Scope_Depth_Value (Id : E) return U is
2807 end Scope_Depth_Value;
2809 function Sec_Stack_Needed_For_Return (Id : E) return B is
2811 return Flag167 (Id);
2812 end Sec_Stack_Needed_For_Return;
2814 function Shadow_Entities (Id : E) return S is
2816 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2818 end Shadow_Entities;
2820 function Shared_Var_Procs_Instance (Id : E) return E is
2822 pragma Assert (Ekind (Id) = E_Variable);
2824 end Shared_Var_Procs_Instance;
2826 function Size_Check_Code (Id : E) return N is
2828 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2830 end Size_Check_Code;
2832 function Size_Depends_On_Discriminant (Id : E) return B is
2834 return Flag177 (Id);
2835 end Size_Depends_On_Discriminant;
2837 function Size_Known_At_Compile_Time (Id : E) return B is
2840 end Size_Known_At_Compile_Time;
2842 function Small_Value (Id : E) return R is
2844 pragma Assert (Is_Fixed_Point_Type (Id));
2845 return Ureal21 (Id);
2848 function SPARK_Aux_Pragma (Id : E) return N is
2851 (Ekind_In (Id, E_Generic_Package, -- package variants
2855 end SPARK_Aux_Pragma;
2857 function SPARK_Aux_Pragma_Inherited (Id : E) return B is
2860 (Ekind_In (Id, E_Generic_Package, -- package variants
2863 return Flag266 (Id);
2864 end SPARK_Aux_Pragma_Inherited;
2866 function SPARK_Pragma (Id : E) return N is
2869 (Ekind_In (Id, E_Function, -- subprogram variants
2871 E_Generic_Procedure,
2875 Ekind_In (Id, E_Generic_Package, -- package variants
2881 function SPARK_Pragma_Inherited (Id : E) return B is
2884 (Ekind_In (Id, E_Function, -- subprogram variants
2886 E_Generic_Procedure,
2890 Ekind_In (Id, E_Generic_Package, -- package variants
2893 return Flag265 (Id);
2894 end SPARK_Pragma_Inherited;
2896 function Spec_Entity (Id : E) return E is
2898 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2902 function Static_Predicate (Id : E) return S is
2904 pragma Assert (Is_Discrete_Type (Id));
2906 end Static_Predicate;
2908 function Status_Flag_Or_Transient_Decl (Id : E) return N is
2910 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2912 end Status_Flag_Or_Transient_Decl;
2914 function Storage_Size_Variable (Id : E) return E is
2916 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2917 return Node15 (Implementation_Base_Type (Id));
2918 end Storage_Size_Variable;
2920 function Static_Elaboration_Desired (Id : E) return B is
2922 pragma Assert (Ekind (Id) = E_Package);
2924 end Static_Elaboration_Desired;
2926 function Static_Initialization (Id : E) return N is
2929 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
2931 end Static_Initialization;
2933 function Stored_Constraint (Id : E) return L is
2936 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
2937 return Elist23 (Id);
2938 end Stored_Constraint;
2940 function Strict_Alignment (Id : E) return B is
2942 return Flag145 (Implementation_Base_Type (Id));
2943 end Strict_Alignment;
2945 function String_Literal_Length (Id : E) return U is
2948 end String_Literal_Length;
2950 function String_Literal_Low_Bound (Id : E) return N is
2953 end String_Literal_Low_Bound;
2955 function Subprograms_For_Type (Id : E) return E is
2957 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
2959 end Subprograms_For_Type;
2961 function Suppress_Elaboration_Warnings (Id : E) return B is
2963 return Flag148 (Id);
2964 end Suppress_Elaboration_Warnings;
2966 function Suppress_Initialization (Id : E) return B is
2968 pragma Assert (Is_Type (Id));
2969 return Flag105 (Id);
2970 end Suppress_Initialization;
2972 function Suppress_Style_Checks (Id : E) return B is
2974 return Flag165 (Id);
2975 end Suppress_Style_Checks;
2977 function Suppress_Value_Tracking_On_Call (Id : E) return B is
2979 return Flag217 (Id);
2980 end Suppress_Value_Tracking_On_Call;
2982 function Task_Body_Procedure (Id : E) return N is
2984 pragma Assert (Ekind (Id) in Task_Kind);
2986 end Task_Body_Procedure;
2988 function Thunk_Entity (Id : E) return E is
2990 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
2991 and then Is_Thunk (Id));
2995 function Treat_As_Volatile (Id : E) return B is
2998 end Treat_As_Volatile;
3000 function Underlying_Full_View (Id : E) return E is
3002 pragma Assert (Ekind (Id) in Private_Kind);
3004 end Underlying_Full_View;
3006 function Underlying_Record_View (Id : E) return E is
3009 end Underlying_Record_View;
3011 function Universal_Aliasing (Id : E) return B is
3013 pragma Assert (Is_Type (Id));
3014 return Flag216 (Implementation_Base_Type (Id));
3015 end Universal_Aliasing;
3017 function Unset_Reference (Id : E) return N is
3020 end Unset_Reference;
3022 function Used_As_Generic_Actual (Id : E) return B is
3024 return Flag222 (Id);
3025 end Used_As_Generic_Actual;
3027 function Uses_Lock_Free (Id : E) return B is
3029 pragma Assert (Is_Protected_Type (Id));
3030 return Flag188 (Id);
3033 function Uses_Sec_Stack (Id : E) return B is
3038 function Warnings_Off (Id : E) return B is
3043 function Warnings_Off_Used (Id : E) return B is
3045 return Flag236 (Id);
3046 end Warnings_Off_Used;
3048 function Warnings_Off_Used_Unmodified (Id : E) return B is
3050 return Flag237 (Id);
3051 end Warnings_Off_Used_Unmodified;
3053 function Warnings_Off_Used_Unreferenced (Id : E) return B is
3055 return Flag238 (Id);
3056 end Warnings_Off_Used_Unreferenced;
3058 function Wrapped_Entity (Id : E) return E is
3060 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3061 and then Is_Primitive_Wrapper (Id));
3065 function Was_Hidden (Id : E) return B is
3067 return Flag196 (Id);
3070 ------------------------------
3071 -- Classification Functions --
3072 ------------------------------
3074 function Is_Access_Type (Id : E) return B is
3076 return Ekind (Id) in Access_Kind;
3079 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
3081 return Ekind (Id) in Access_Protected_Kind;
3082 end Is_Access_Protected_Subprogram_Type;
3084 function Is_Access_Subprogram_Type (Id : E) return B is
3086 return Ekind (Id) in Access_Subprogram_Kind;
3087 end Is_Access_Subprogram_Type;
3089 function Is_Aggregate_Type (Id : E) return B is
3091 return Ekind (Id) in Aggregate_Kind;
3092 end Is_Aggregate_Type;
3094 function Is_Array_Type (Id : E) return B is
3096 return Ekind (Id) in Array_Kind;
3099 function Is_Assignable (Id : E) return B is
3101 return Ekind (Id) in Assignable_Kind;
3104 function Is_Class_Wide_Type (Id : E) return B is
3106 return Ekind (Id) in Class_Wide_Kind;
3107 end Is_Class_Wide_Type;
3109 function Is_Composite_Type (Id : E) return B is
3111 return Ekind (Id) in Composite_Kind;
3112 end Is_Composite_Type;
3114 function Is_Concurrent_Body (Id : E) return B is
3116 return Ekind (Id) in
3117 Concurrent_Body_Kind;
3118 end Is_Concurrent_Body;
3120 function Is_Concurrent_Record_Type (Id : E) return B is
3123 end Is_Concurrent_Record_Type;
3125 function Is_Concurrent_Type (Id : E) return B is
3127 return Ekind (Id) in Concurrent_Kind;
3128 end Is_Concurrent_Type;
3130 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
3132 return Ekind (Id) in
3133 Decimal_Fixed_Point_Kind;
3134 end Is_Decimal_Fixed_Point_Type;
3136 function Is_Digits_Type (Id : E) return B is
3138 return Ekind (Id) in Digits_Kind;
3141 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
3143 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
3144 end Is_Discrete_Or_Fixed_Point_Type;
3146 function Is_Discrete_Type (Id : E) return B is
3148 return Ekind (Id) in Discrete_Kind;
3149 end Is_Discrete_Type;
3151 function Is_Elementary_Type (Id : E) return B is
3153 return Ekind (Id) in Elementary_Kind;
3154 end Is_Elementary_Type;
3156 function Is_Entry (Id : E) return B is
3158 return Ekind (Id) in Entry_Kind;
3161 function Is_Enumeration_Type (Id : E) return B is
3163 return Ekind (Id) in
3165 end Is_Enumeration_Type;
3167 function Is_Fixed_Point_Type (Id : E) return B is
3169 return Ekind (Id) in
3171 end Is_Fixed_Point_Type;
3173 function Is_Floating_Point_Type (Id : E) return B is
3175 return Ekind (Id) in Float_Kind;
3176 end Is_Floating_Point_Type;
3178 function Is_Formal (Id : E) return B is
3180 return Ekind (Id) in Formal_Kind;
3183 function Is_Formal_Object (Id : E) return B is
3185 return Ekind (Id) in Formal_Object_Kind;
3186 end Is_Formal_Object;
3188 function Is_Generic_Subprogram (Id : E) return B is
3190 return Ekind (Id) in Generic_Subprogram_Kind;
3191 end Is_Generic_Subprogram;
3193 function Is_Generic_Unit (Id : E) return B is
3195 return Ekind (Id) in Generic_Unit_Kind;
3196 end Is_Generic_Unit;
3198 function Is_Incomplete_Or_Private_Type (Id : E) return B is
3200 return Ekind (Id) in
3201 Incomplete_Or_Private_Kind;
3202 end Is_Incomplete_Or_Private_Type;
3204 function Is_Incomplete_Type (Id : E) return B is
3206 return Ekind (Id) in
3208 end Is_Incomplete_Type;
3210 function Is_Integer_Type (Id : E) return B is
3212 return Ekind (Id) in Integer_Kind;
3213 end Is_Integer_Type;
3215 function Is_Modular_Integer_Type (Id : E) return B is
3217 return Ekind (Id) in
3218 Modular_Integer_Kind;
3219 end Is_Modular_Integer_Type;
3221 function Is_Named_Number (Id : E) return B is
3223 return Ekind (Id) in Named_Kind;
3224 end Is_Named_Number;
3226 function Is_Numeric_Type (Id : E) return B is
3228 return Ekind (Id) in Numeric_Kind;
3229 end Is_Numeric_Type;
3231 function Is_Object (Id : E) return B is
3233 return Ekind (Id) in Object_Kind;
3236 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
3238 return Ekind (Id) in
3239 Ordinary_Fixed_Point_Kind;
3240 end Is_Ordinary_Fixed_Point_Type;
3242 function Is_Overloadable (Id : E) return B is
3244 return Ekind (Id) in Overloadable_Kind;
3245 end Is_Overloadable;
3247 function Is_Private_Type (Id : E) return B is
3249 return Ekind (Id) in Private_Kind;
3250 end Is_Private_Type;
3252 function Is_Protected_Type (Id : E) return B is
3254 return Ekind (Id) in Protected_Kind;
3255 end Is_Protected_Type;
3257 function Is_Real_Type (Id : E) return B is
3259 return Ekind (Id) in Real_Kind;
3262 function Is_Record_Type (Id : E) return B is
3264 return Ekind (Id) in Record_Kind;
3267 function Is_Scalar_Type (Id : E) return B is
3269 return Ekind (Id) in Scalar_Kind;
3272 function Is_Signed_Integer_Type (Id : E) return B is
3274 return Ekind (Id) in Signed_Integer_Kind;
3275 end Is_Signed_Integer_Type;
3277 function Is_Subprogram (Id : E) return B is
3279 return Ekind (Id) in Subprogram_Kind;
3282 function Is_Task_Type (Id : E) return B is
3284 return Ekind (Id) in Task_Kind;
3287 function Is_Type (Id : E) return B is
3289 return Ekind (Id) in Type_Kind;
3292 ------------------------------
3293 -- Attribute Set Procedures --
3294 ------------------------------
3296 -- Note: in many of these set procedures an "obvious" assertion is missing.
3297 -- The reason for this is that in many cases, a field is set before the
3298 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3299 -- it is possible to add assertions that specifically include the E_Void
3300 -- possibility, but in some cases, we just omit the assertions.
3302 procedure Set_Abstract_States (Id : E; V : L) is
3304 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
3305 Set_Elist25 (Id, V);
3306 end Set_Abstract_States;
3308 procedure Set_Accept_Address (Id : E; V : L) is
3310 Set_Elist21 (Id, V);
3311 end Set_Accept_Address;
3313 procedure Set_Access_Disp_Table (Id : E; V : L) is
3315 pragma Assert (Ekind (Id) = E_Record_Type
3316 and then Id = Implementation_Base_Type (Id));
3317 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3318 Set_Elist16 (Id, V);
3319 end Set_Access_Disp_Table;
3321 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3324 end Set_Associated_Formal_Package;
3326 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3329 end Set_Associated_Node_For_Itype;
3331 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3333 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3335 end Set_Associated_Storage_Pool;
3337 procedure Set_Actual_Subtype (Id : E; V : E) is
3340 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3341 or else Is_Formal (Id));
3343 end Set_Actual_Subtype;
3345 procedure Set_Address_Taken (Id : E; V : B := True) is
3347 Set_Flag104 (Id, V);
3348 end Set_Address_Taken;
3350 procedure Set_Alias (Id : E; V : E) is
3353 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3357 procedure Set_Alignment (Id : E; V : U) is
3359 pragma Assert (Is_Type (Id)
3360 or else Is_Formal (Id)
3361 or else Ekind_In (Id, E_Loop_Parameter,
3368 procedure Set_Barrier_Function (Id : E; V : N) is
3370 pragma Assert (Is_Entry (Id));
3372 end Set_Barrier_Function;
3374 procedure Set_Block_Node (Id : E; V : N) is
3376 pragma Assert (Ekind (Id) = E_Block);
3380 procedure Set_Body_Entity (Id : E; V : E) is
3382 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3384 end Set_Body_Entity;
3386 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3389 (Ekind (Id) = E_Package
3390 or else Is_Subprogram (Id)
3391 or else Is_Generic_Unit (Id));
3393 end Set_Body_Needed_For_SAL;
3395 procedure Set_Body_References (Id : E; V : L) is
3397 pragma Assert (Ekind (Id) = E_Abstract_State);
3398 Set_Elist16 (Id, V);
3399 end Set_Body_References;
3401 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3403 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3404 Set_Flag125 (Id, V);
3405 end Set_C_Pass_By_Copy;
3407 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3410 end Set_Can_Never_Be_Null;
3412 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3415 end Set_Checks_May_Be_Suppressed;
3417 procedure Set_Class_Wide_Type (Id : E; V : E) is
3419 pragma Assert (Is_Type (Id));
3421 end Set_Class_Wide_Type;
3423 procedure Set_Cloned_Subtype (Id : E; V : E) is
3425 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3427 end Set_Cloned_Subtype;
3429 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3431 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3433 end Set_Component_Bit_Offset;
3435 procedure Set_Component_Clause (Id : E; V : N) is
3437 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3439 end Set_Component_Clause;
3441 procedure Set_Component_Size (Id : E; V : U) is
3443 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3445 end Set_Component_Size;
3447 procedure Set_Component_Type (Id : E; V : E) is
3449 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3451 end Set_Component_Type;
3453 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3456 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3458 end Set_Corresponding_Concurrent_Type;
3460 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3462 pragma Assert (Ekind (Id) = E_Discriminant);
3464 end Set_Corresponding_Discriminant;
3466 procedure Set_Corresponding_Equality (Id : E; V : E) is
3469 (Ekind (Id) = E_Function
3470 and then not Comes_From_Source (Id)
3471 and then Chars (Id) = Name_Op_Ne);
3473 end Set_Corresponding_Equality;
3475 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3477 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3479 end Set_Corresponding_Protected_Entry;
3481 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3483 pragma Assert (Is_Concurrent_Type (Id));
3485 end Set_Corresponding_Record_Type;
3487 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3490 end Set_Corresponding_Remote_Type;
3492 procedure Set_Current_Use_Clause (Id : E; V : E) is
3494 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3496 end Set_Current_Use_Clause;
3498 procedure Set_Current_Value (Id : E; V : N) is
3500 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3502 end Set_Current_Value;
3504 procedure Set_CR_Discriminant (Id : E; V : E) is
3507 end Set_CR_Discriminant;
3509 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3511 Set_Flag166 (Id, V);
3512 end Set_Debug_Info_Off;
3514 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3517 end Set_Debug_Renaming_Link;
3519 procedure Set_Default_Aspect_Component_Value (Id : E; V : E) is
3521 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3523 end Set_Default_Aspect_Component_Value;
3525 procedure Set_Default_Aspect_Value (Id : E; V : E) is
3527 pragma Assert (Is_Scalar_Type (Id) and then Is_Base_Type (Id));
3529 end Set_Default_Aspect_Value;
3531 procedure Set_Default_Expr_Function (Id : E; V : E) is
3533 pragma Assert (Is_Formal (Id));
3535 end Set_Default_Expr_Function;
3537 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3539 Set_Flag108 (Id, V);
3540 end Set_Default_Expressions_Processed;
3542 procedure Set_Default_Value (Id : E; V : N) is
3544 pragma Assert (Is_Formal (Id));
3546 end Set_Default_Value;
3548 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3552 or else Is_Task_Type (Id)
3553 or else Ekind (Id) = E_Block);
3554 Set_Flag114 (Id, V);
3555 end Set_Delay_Cleanups;
3557 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3560 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3563 end Set_Delay_Subprogram_Descriptors;
3565 procedure Set_Delta_Value (Id : E; V : R) is
3567 pragma Assert (Is_Fixed_Point_Type (Id));
3568 Set_Ureal18 (Id, V);
3569 end Set_Delta_Value;
3571 procedure Set_Dependent_Instances (Id : E; V : L) is
3573 pragma Assert (Is_Generic_Instance (Id));
3575 end Set_Dependent_Instances;
3577 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3579 pragma Assert (Nkind (Id) in N_Entity);
3581 end Set_Depends_On_Private;
3583 procedure Set_Digits_Value (Id : E; V : U) is
3586 (Is_Floating_Point_Type (Id)
3587 or else Is_Decimal_Fixed_Point_Type (Id));
3589 end Set_Digits_Value;
3591 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3594 end Set_Directly_Designated_Type;
3596 procedure Set_Discard_Names (Id : E; V : B := True) is
3599 end Set_Discard_Names;
3601 procedure Set_Discriminal (Id : E; V : E) is
3603 pragma Assert (Ekind (Id) = E_Discriminant);
3605 end Set_Discriminal;
3607 procedure Set_Discriminal_Link (Id : E; V : E) is
3610 end Set_Discriminal_Link;
3612 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3614 pragma Assert (Ekind (Id) = E_Component);
3616 end Set_Discriminant_Checking_Func;
3618 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3620 pragma Assert (Nkind (Id) in N_Entity);
3621 Set_Elist21 (Id, V);
3622 end Set_Discriminant_Constraint;
3624 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3627 end Set_Discriminant_Default_Value;
3629 procedure Set_Discriminant_Number (Id : E; V : U) is
3632 end Set_Discriminant_Number;
3634 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3636 pragma Assert (Ekind (Id) = E_Record_Type
3637 and then Id = Implementation_Base_Type (Id));
3638 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3639 Set_Elist26 (Id, V);
3640 end Set_Dispatch_Table_Wrappers;
3642 procedure Set_DT_Entry_Count (Id : E; V : U) is
3644 pragma Assert (Ekind (Id) = E_Component);
3646 end Set_DT_Entry_Count;
3648 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3650 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3652 end Set_DT_Offset_To_Top_Func;
3654 procedure Set_DT_Position (Id : E; V : U) is
3656 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3658 end Set_DT_Position;
3660 procedure Set_DTC_Entity (Id : E; V : E) is
3662 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3666 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3668 pragma Assert (Ekind (Id) = E_Package);
3669 Set_Flag210 (Id, V);
3670 end Set_Elaborate_Body_Desirable;
3672 procedure Set_Elaboration_Entity (Id : E; V : E) is
3677 Ekind (Id) = E_Package
3679 Is_Generic_Unit (Id));
3681 end Set_Elaboration_Entity;
3683 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3688 Ekind (Id) = E_Package
3690 Is_Generic_Unit (Id));
3691 Set_Flag174 (Id, V);
3692 end Set_Elaboration_Entity_Required;
3694 procedure Set_Enclosing_Scope (Id : E; V : E) is
3697 end Set_Enclosing_Scope;
3699 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3701 pragma Assert (Is_Entry (Id));
3702 Set_Flag152 (Id, V);
3703 end Set_Entry_Accepted;
3705 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3708 end Set_Entry_Bodies_Array;
3710 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3713 end Set_Entry_Cancel_Parameter;
3715 procedure Set_Entry_Component (Id : E; V : E) is
3718 end Set_Entry_Component;
3720 procedure Set_Entry_Formal (Id : E; V : E) is
3723 end Set_Entry_Formal;
3725 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3727 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3729 end Set_Entry_Index_Constant;
3731 procedure Set_Contract (Id : E; V : N) is
3734 (Ekind_In (Id, E_Entry,
3742 or else Is_Generic_Subprogram (Id)
3743 or else Is_Subprogram (Id));
3747 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3750 end Set_Entry_Parameters_Type;
3752 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3754 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3756 end Set_Enum_Pos_To_Rep;
3758 procedure Set_Enumeration_Pos (Id : E; V : U) is
3760 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3762 end Set_Enumeration_Pos;
3764 procedure Set_Enumeration_Rep (Id : E; V : U) is
3766 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3768 end Set_Enumeration_Rep;
3770 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3772 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3774 end Set_Enumeration_Rep_Expr;
3776 procedure Set_Equivalent_Type (Id : E; V : E) is
3779 (Ekind_In (Id, E_Class_Wide_Type,
3780 E_Class_Wide_Subtype,
3781 E_Access_Protected_Subprogram_Type,
3782 E_Anonymous_Access_Protected_Subprogram_Type,
3783 E_Access_Subprogram_Type,
3786 end Set_Equivalent_Type;
3788 procedure Set_Esize (Id : E; V : U) is
3793 procedure Set_Exception_Code (Id : E; V : U) is
3795 pragma Assert (Ekind (Id) = E_Exception);
3797 end Set_Exception_Code;
3799 procedure Set_Extra_Accessibility (Id : E; V : E) is
3802 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
3804 end Set_Extra_Accessibility;
3806 procedure Set_Extra_Accessibility_Of_Result (Id : E; V : E) is
3808 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
3810 end Set_Extra_Accessibility_Of_Result;
3812 procedure Set_Extra_Constrained (Id : E; V : E) is
3814 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3816 end Set_Extra_Constrained;
3818 procedure Set_Extra_Formal (Id : E; V : E) is
3821 end Set_Extra_Formal;
3823 procedure Set_Extra_Formals (Id : E; V : E) is
3826 (Is_Overloadable (Id)
3827 or else Ekind_In (Id, E_Entry_Family,
3829 E_Subprogram_Type));
3831 end Set_Extra_Formals;
3833 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3836 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3837 Set_Flag229 (Id, V);
3838 end Set_Can_Use_Internal_Rep;
3840 procedure Set_Finalization_Master (Id : E; V : E) is
3842 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3844 end Set_Finalization_Master;
3846 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3848 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3849 Set_Flag158 (Id, V);
3850 end Set_Finalize_Storage_Only;
3852 procedure Set_Finalizer (Id : E; V : E) is
3854 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
3858 procedure Set_First_Entity (Id : E; V : E) is
3861 end Set_First_Entity;
3863 procedure Set_First_Exit_Statement (Id : E; V : N) is
3865 pragma Assert (Ekind (Id) = E_Loop);
3867 end Set_First_Exit_Statement;
3869 procedure Set_First_Index (Id : E; V : N) is
3871 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3873 end Set_First_Index;
3875 procedure Set_First_Literal (Id : E; V : E) is
3877 pragma Assert (Is_Enumeration_Type (Id));
3879 end Set_First_Literal;
3881 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3883 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3885 end Set_First_Optional_Parameter;
3887 procedure Set_First_Private_Entity (Id : E; V : E) is
3889 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
3890 or else Ekind (Id) in Concurrent_Kind);
3892 end Set_First_Private_Entity;
3894 procedure Set_First_Rep_Item (Id : E; V : N) is
3897 end Set_First_Rep_Item;
3899 procedure Set_Float_Rep (Id : E; V : F) is
3900 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
3902 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
3905 procedure Set_Freeze_Node (Id : E; V : N) is
3908 end Set_Freeze_Node;
3910 procedure Set_From_Limited_With (Id : E; V : B := True) is
3913 (Is_Type (Id) or else Ekind_In (Id, E_Abstract_State, E_Package));
3914 Set_Flag159 (Id, V);
3915 end Set_From_Limited_With;
3917 procedure Set_Full_View (Id : E; V : E) is
3919 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
3923 procedure Set_Generic_Homonym (Id : E; V : E) is
3926 end Set_Generic_Homonym;
3928 procedure Set_Generic_Renamings (Id : E; V : L) is
3930 Set_Elist23 (Id, V);
3931 end Set_Generic_Renamings;
3933 procedure Set_Handler_Records (Id : E; V : S) is
3936 end Set_Handler_Records;
3938 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
3940 pragma Assert (Id = Base_Type (Id));
3941 Set_Flag135 (Id, V);
3942 end Set_Has_Aliased_Components;
3944 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
3947 end Set_Has_Alignment_Clause;
3949 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
3952 end Set_Has_All_Calls_Remote;
3954 procedure Set_Has_Anonymous_Master (Id : E; V : B := True) is
3957 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
3958 Set_Flag253 (Id, V);
3959 end Set_Has_Anonymous_Master;
3961 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
3963 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
3965 end Set_Has_Atomic_Components;
3967 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
3970 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
3971 Set_Flag139 (Id, V);
3972 end Set_Has_Biased_Representation;
3974 procedure Set_Has_Body_References (Id : E; V : B := True) is
3976 pragma Assert (Ekind (Id) = E_Abstract_State);
3977 Set_Flag264 (Id, V);
3978 end Set_Has_Body_References;
3980 procedure Set_Has_Completion (Id : E; V : B := True) is
3983 end Set_Has_Completion;
3985 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
3987 pragma Assert (Is_Type (Id));
3989 end Set_Has_Completion_In_Body;
3991 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
3993 pragma Assert (Ekind (Id) = E_Record_Type);
3994 Set_Flag140 (Id, V);
3995 end Set_Has_Complex_Representation;
3997 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
3999 pragma Assert (Ekind (Id) = E_Array_Type);
4001 end Set_Has_Component_Size_Clause;
4003 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
4005 pragma Assert (Is_Type (Id));
4006 Set_Flag187 (Id, V);
4007 end Set_Has_Constrained_Partial_View;
4009 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
4011 Set_Flag181 (Id, V);
4012 end Set_Has_Contiguous_Rep;
4014 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
4016 pragma Assert (Id = Base_Type (Id));
4018 end Set_Has_Controlled_Component;
4020 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
4023 end Set_Has_Controlling_Result;
4025 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
4027 Set_Flag119 (Id, V);
4028 end Set_Has_Convention_Pragma;
4030 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
4033 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
4034 and then Is_Base_Type (Id));
4036 end Set_Has_Default_Aspect;
4038 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
4040 pragma Assert (Nkind (Id) in N_Entity);
4041 Set_Flag200 (Id, V);
4042 end Set_Has_Delayed_Aspects;
4044 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
4046 pragma Assert (Nkind (Id) in N_Entity);
4048 end Set_Has_Delayed_Freeze;
4050 procedure Set_Has_Delayed_Rep_Aspects (Id : E; V : B := True) is
4052 pragma Assert (Nkind (Id) in N_Entity);
4053 Set_Flag261 (Id, V);
4054 end Set_Has_Delayed_Rep_Aspects;
4056 procedure Set_Has_Discriminants (Id : E; V : B := True) is
4058 pragma Assert (Nkind (Id) in N_Entity);
4060 end Set_Has_Discriminants;
4062 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
4064 pragma Assert (Ekind (Id) = E_Record_Type
4065 and then Is_Tagged_Type (Id));
4066 Set_Flag220 (Id, V);
4067 end Set_Has_Dispatch_Table;
4069 procedure Set_Has_Dynamic_Predicate_Aspect (Id : E; V : B := True) is
4071 pragma Assert (Is_Type (Id));
4072 Set_Flag258 (Id, V);
4073 end Set_Has_Dynamic_Predicate_Aspect;
4075 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
4077 pragma Assert (Is_Enumeration_Type (Id));
4079 end Set_Has_Enumeration_Rep_Clause;
4081 procedure Set_Has_Exit (Id : E; V : B := True) is
4086 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True) is
4088 pragma Assert (Is_Tagged_Type (Id));
4089 Set_Flag110 (Id, V);
4090 end Set_Has_External_Tag_Rep_Clause;
4092 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
4094 Set_Flag175 (Id, V);
4095 end Set_Has_Forward_Instantiation;
4097 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
4099 Set_Flag173 (Id, V);
4100 end Set_Has_Fully_Qualified_Name;
4102 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
4105 end Set_Has_Gigi_Rep_Item;
4107 procedure Set_Has_Homonym (Id : E; V : B := True) is
4110 end Set_Has_Homonym;
4112 procedure Set_Has_Implicit_Dereference (Id : E; V : B := True) is
4114 Set_Flag251 (Id, V);
4115 end Set_Has_Implicit_Dereference;
4117 procedure Set_Has_Independent_Components (Id : E; V : B := True) is
4119 pragma Assert (Is_Object (Id) or else Is_Type (Id));
4121 end Set_Has_Independent_Components;
4123 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
4125 pragma Assert (Is_Type (Id));
4126 Set_Flag248 (Id, V);
4127 end Set_Has_Inheritable_Invariants;
4129 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
4131 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
4132 Set_Flag219 (Id, V);
4133 end Set_Has_Initial_Value;
4135 procedure Set_Has_Invariants (Id : E; V : B := True) is
4137 pragma Assert (Is_Type (Id));
4138 Set_Flag232 (Id, V);
4139 end Set_Has_Invariants;
4141 procedure Set_Has_Loop_Entry_Attributes (Id : E; V : B := True) is
4143 pragma Assert (Ekind (Id) = E_Loop);
4144 Set_Flag260 (Id, V);
4145 end Set_Has_Loop_Entry_Attributes;
4147 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
4149 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4151 end Set_Has_Machine_Radix_Clause;
4153 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
4156 end Set_Has_Master_Entity;
4158 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
4160 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4161 Set_Flag142 (Id, V);
4162 end Set_Has_Missing_Return;
4164 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
4166 Set_Flag101 (Id, V);
4167 end Set_Has_Nested_Block_With_Handler;
4169 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
4171 pragma Assert (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
4172 Set_Flag215 (Id, V);
4173 end Set_Has_Up_Level_Access;
4175 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
4177 pragma Assert (Id = Base_Type (Id));
4179 end Set_Has_Non_Standard_Rep;
4181 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
4183 pragma Assert (Is_Type (Id));
4184 Set_Flag172 (Id, V);
4185 end Set_Has_Object_Size_Clause;
4187 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
4189 Set_Flag154 (Id, V);
4190 end Set_Has_Per_Object_Constraint;
4192 procedure Set_Has_Postconditions (Id : E; V : B := True) is
4194 pragma Assert (Is_Subprogram (Id));
4195 Set_Flag240 (Id, V);
4196 end Set_Has_Postconditions;
4198 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
4200 pragma Assert (Is_Access_Type (Id));
4201 Set_Flag27 (Base_Type (Id), V);
4202 end Set_Has_Pragma_Controlled;
4204 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
4206 Set_Flag150 (Id, V);
4207 end Set_Has_Pragma_Elaborate_Body;
4209 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
4211 Set_Flag157 (Id, V);
4212 end Set_Has_Pragma_Inline;
4214 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
4216 Set_Flag230 (Id, V);
4217 end Set_Has_Pragma_Inline_Always;
4219 procedure Set_Has_Pragma_No_Inline (Id : E; V : B := True) is
4221 Set_Flag201 (Id, V);
4222 end Set_Has_Pragma_No_Inline;
4224 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
4226 pragma Assert (Is_Enumeration_Type (Id));
4227 pragma Assert (Id = Base_Type (Id));
4228 Set_Flag198 (Id, V);
4229 end Set_Has_Pragma_Ordered;
4231 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
4233 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
4234 pragma Assert (Id = Base_Type (Id));
4235 Set_Flag121 (Id, V);
4236 end Set_Has_Pragma_Pack;
4238 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
4240 Set_Flag221 (Id, V);
4241 end Set_Has_Pragma_Preelab_Init;
4243 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
4245 Set_Flag203 (Id, V);
4246 end Set_Has_Pragma_Pure;
4248 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
4250 Set_Flag179 (Id, V);
4251 end Set_Has_Pragma_Pure_Function;
4253 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
4255 Set_Flag169 (Id, V);
4256 end Set_Has_Pragma_Thread_Local_Storage;
4258 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
4260 Set_Flag233 (Id, V);
4261 end Set_Has_Pragma_Unmodified;
4263 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
4265 Set_Flag180 (Id, V);
4266 end Set_Has_Pragma_Unreferenced;
4268 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
4270 pragma Assert (Is_Type (Id));
4271 Set_Flag212 (Id, V);
4272 end Set_Has_Pragma_Unreferenced_Objects;
4274 procedure Set_Has_Predicates (Id : E; V : B := True) is
4276 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Void);
4277 Set_Flag250 (Id, V);
4278 end Set_Has_Predicates;
4280 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
4282 pragma Assert (Id = Base_Type (Id));
4283 Set_Flag120 (Id, V);
4284 end Set_Has_Primitive_Operations;
4286 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
4288 pragma Assert (Is_Type (Id));
4289 Set_Flag151 (Id, V);
4290 end Set_Has_Private_Ancestor;
4292 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
4294 Set_Flag155 (Id, V);
4295 end Set_Has_Private_Declaration;
4297 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
4299 Set_Flag161 (Id, V);
4300 end Set_Has_Qualified_Name;
4302 procedure Set_Has_RACW (Id : E; V : B := True) is
4304 pragma Assert (Ekind (Id) = E_Package);
4305 Set_Flag214 (Id, V);
4308 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
4310 pragma Assert (Id = Base_Type (Id));
4312 end Set_Has_Record_Rep_Clause;
4314 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
4316 pragma Assert (Is_Subprogram (Id));
4317 Set_Flag143 (Id, V);
4318 end Set_Has_Recursive_Call;
4320 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
4323 end Set_Has_Size_Clause;
4325 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
4328 end Set_Has_Small_Clause;
4330 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
4332 pragma Assert (Id = Base_Type (Id));
4333 Set_Flag100 (Id, V);
4334 end Set_Has_Specified_Layout;
4336 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
4338 pragma Assert (Is_Type (Id));
4339 Set_Flag190 (Id, V);
4340 end Set_Has_Specified_Stream_Input;
4342 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
4344 pragma Assert (Is_Type (Id));
4345 Set_Flag191 (Id, V);
4346 end Set_Has_Specified_Stream_Output;
4348 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
4350 pragma Assert (Is_Type (Id));
4351 Set_Flag192 (Id, V);
4352 end Set_Has_Specified_Stream_Read;
4354 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
4356 pragma Assert (Is_Type (Id));
4357 Set_Flag193 (Id, V);
4358 end Set_Has_Specified_Stream_Write;
4360 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
4362 Set_Flag211 (Id, V);
4363 end Set_Has_Static_Discriminants;
4365 procedure Set_Has_Static_Predicate_Aspect (Id : E; V : B := True) is
4367 pragma Assert (Is_Type (Id));
4368 Set_Flag259 (Id, V);
4369 end Set_Has_Static_Predicate_Aspect;
4371 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
4373 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4374 pragma Assert (Id = Base_Type (Id));
4376 end Set_Has_Storage_Size_Clause;
4378 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4380 pragma Assert (Is_Elementary_Type (Id));
4381 Set_Flag184 (Id, V);
4382 end Set_Has_Stream_Size_Clause;
4384 procedure Set_Has_Task (Id : E; V : B := True) is
4386 pragma Assert (Id = Base_Type (Id));
4390 procedure Set_Has_Thunks (Id : E; V : B := True) is
4392 pragma Assert (Is_Tag (Id));
4393 Set_Flag228 (Id, V);
4396 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4398 pragma Assert (Id = Base_Type (Id));
4399 Set_Flag123 (Id, V);
4400 end Set_Has_Unchecked_Union;
4402 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4404 pragma Assert (Is_Type (Id));
4406 end Set_Has_Unknown_Discriminants;
4408 procedure Set_Has_Visible_Refinement (Id : E; V : B := True) is
4410 pragma Assert (Ekind (Id) = E_Abstract_State);
4411 Set_Flag263 (Id, V);
4412 end Set_Has_Visible_Refinement;
4414 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4416 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4418 end Set_Has_Volatile_Components;
4420 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4422 Set_Flag182 (Id, V);
4423 end Set_Has_Xref_Entry;
4425 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4427 pragma Assert (Ekind (Id) = E_Variable);
4429 end Set_Hiding_Loop_Variable;
4431 procedure Set_Homonym (Id : E; V : E) is
4433 pragma Assert (Id /= V);
4437 procedure Set_Interface_Alias (Id : E; V : E) is
4441 and then Is_Hidden (Id)
4442 and then (Ekind_In (Id, E_Procedure, E_Function)));
4444 end Set_Interface_Alias;
4446 procedure Set_Interfaces (Id : E; V : L) is
4448 pragma Assert (Is_Record_Type (Id));
4449 Set_Elist25 (Id, V);
4452 procedure Set_In_Package_Body (Id : E; V : B := True) is
4455 end Set_In_Package_Body;
4457 procedure Set_In_Private_Part (Id : E; V : B := True) is
4460 end Set_In_Private_Part;
4462 procedure Set_In_Use (Id : E; V : B := True) is
4464 pragma Assert (Nkind (Id) in N_Entity);
4468 procedure Set_Initialization_Statements (Id : E; V : N) is
4470 -- Tolerate an E_Void entity since this can be called while resolving
4471 -- an aggregate used as the initialization expression for an object
4472 -- declaration, and this occurs before the Ekind for the object is set.
4474 pragma Assert (Ekind_In (Id, E_Void, E_Constant, E_Variable));
4476 end Set_Initialization_Statements;
4478 procedure Set_Inner_Instances (Id : E; V : L) is
4480 Set_Elist23 (Id, V);
4481 end Set_Inner_Instances;
4483 procedure Set_Interface_Name (Id : E; V : N) is
4486 end Set_Interface_Name;
4488 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4490 pragma Assert (Is_Overloadable (Id));
4492 end Set_Is_Abstract_Subprogram;
4494 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4496 pragma Assert (Is_Type (Id));
4497 Set_Flag146 (Id, V);
4498 end Set_Is_Abstract_Type;
4500 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4502 pragma Assert (Is_Access_Type (Id));
4503 Set_Flag194 (Id, V);
4504 end Set_Is_Local_Anonymous_Access;
4506 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4508 pragma Assert (Is_Access_Type (Id));
4510 end Set_Is_Access_Constant;
4512 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4514 Set_Flag185 (Id, V);
4515 end Set_Is_Ada_2005_Only;
4517 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4519 Set_Flag199 (Id, V);
4520 end Set_Is_Ada_2012_Only;
4522 procedure Set_Is_Aliased (Id : E; V : B := True) is
4524 pragma Assert (Nkind (Id) in N_Entity);
4528 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
4530 pragma Assert (Is_Entry (Id));
4531 Set_Flag132 (Id, V);
4532 end Set_Is_AST_Entry;
4534 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4537 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4539 end Set_Is_Asynchronous;
4541 procedure Set_Is_Atomic (Id : E; V : B := True) is
4546 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4548 pragma Assert ((not V)
4549 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4550 Set_Flag122 (Id, V);
4551 end Set_Is_Bit_Packed_Array;
4553 procedure Set_Is_Called (Id : E; V : B := True) is
4555 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4556 Set_Flag102 (Id, V);
4559 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4562 end Set_Is_Character_Type;
4564 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4567 end Set_Is_Child_Unit;
4569 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4572 end Set_Is_Class_Wide_Equivalent_Type;
4574 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4576 Set_Flag149 (Id, V);
4577 end Set_Is_Compilation_Unit;
4579 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4581 pragma Assert (Ekind (Id) = E_Discriminant);
4582 Set_Flag103 (Id, V);
4583 end Set_Is_Completely_Hidden;
4585 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4588 end Set_Is_Concurrent_Record_Type;
4590 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4593 end Set_Is_Constr_Subt_For_U_Nominal;
4595 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4597 Set_Flag141 (Id, V);
4598 end Set_Is_Constr_Subt_For_UN_Aliased;
4600 procedure Set_Is_Constrained (Id : E; V : B := True) is
4602 pragma Assert (Nkind (Id) in N_Entity);
4604 end Set_Is_Constrained;
4606 procedure Set_Is_Constructor (Id : E; V : B := True) is
4609 end Set_Is_Constructor;
4611 procedure Set_Is_Controlled (Id : E; V : B := True) is
4613 pragma Assert (Id = Base_Type (Id));
4615 end Set_Is_Controlled;
4617 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4619 pragma Assert (Is_Formal (Id));
4621 end Set_Is_Controlling_Formal;
4623 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4626 end Set_Is_CPP_Class;
4628 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4630 pragma Assert (Is_Type (Id));
4631 Set_Flag223 (Id, V);
4632 end Set_Is_Descendent_Of_Address;
4634 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4636 Set_Flag176 (Id, V);
4637 end Set_Is_Discrim_SO_Function;
4639 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4641 Set_Flag234 (Id, V);
4642 end Set_Is_Dispatch_Table_Entity;
4644 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4649 Is_Overloadable (Id)
4651 Ekind (Id) = E_Subprogram_Type);
4654 end Set_Is_Dispatching_Operation;
4656 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4658 Set_Flag124 (Id, V);
4659 end Set_Is_Eliminated;
4661 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4664 end Set_Is_Entry_Formal;
4666 procedure Set_Is_Exported (Id : E; V : B := True) is
4669 end Set_Is_Exported;
4671 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4674 end Set_Is_First_Subtype;
4676 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4678 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4679 Set_Flag118 (Id, V);
4680 end Set_Is_For_Access_Subtype;
4682 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4684 Set_Flag111 (Id, V);
4685 end Set_Is_Formal_Subprogram;
4687 procedure Set_Is_Frozen (Id : E; V : B := True) is
4689 pragma Assert (Nkind (Id) in N_Entity);
4693 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4695 pragma Assert (Is_Type (Id));
4697 end Set_Is_Generic_Actual_Type;
4699 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4701 Set_Flag130 (Id, V);
4702 end Set_Is_Generic_Instance;
4704 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4706 pragma Assert (Nkind (Id) in N_Entity);
4708 end Set_Is_Generic_Type;
4710 procedure Set_Is_Hidden (Id : E; V : B := True) is
4715 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4717 Set_Flag171 (Id, V);
4718 end Set_Is_Hidden_Open_Scope;
4720 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4722 pragma Assert (Nkind (Id) in N_Entity);
4724 end Set_Is_Immediately_Visible;
4726 procedure Set_Is_Implementation_Defined (Id : E; V : B := True) is
4728 Set_Flag254 (Id, V);
4729 end Set_Is_Implementation_Defined;
4731 procedure Set_Is_Imported (Id : E; V : B := True) is
4734 end Set_Is_Imported;
4736 procedure Set_Is_Inlined (Id : E; V : B := True) is
4741 procedure Set_Is_Interface (Id : E; V : B := True) is
4743 pragma Assert (Is_Record_Type (Id));
4744 Set_Flag186 (Id, V);
4745 end Set_Is_Interface;
4747 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4749 Set_Flag126 (Id, V);
4750 end Set_Is_Instantiated;
4752 procedure Set_Is_Internal (Id : E; V : B := True) is
4754 pragma Assert (Nkind (Id) in N_Entity);
4756 end Set_Is_Internal;
4758 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4760 pragma Assert (Nkind (Id) in N_Entity);
4762 end Set_Is_Interrupt_Handler;
4764 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4767 end Set_Is_Intrinsic_Subprogram;
4769 procedure Set_Is_Invariant_Procedure (Id : E; V : B := True) is
4771 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4772 Set_Flag257 (Id, V);
4773 end Set_Is_Invariant_Procedure;
4775 procedure Set_Is_Itype (Id : E; V : B := True) is
4780 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4783 end Set_Is_Known_Non_Null;
4785 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4787 Set_Flag204 (Id, V);
4788 end Set_Is_Known_Null;
4790 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4792 Set_Flag170 (Id, V);
4793 end Set_Is_Known_Valid;
4795 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4797 pragma Assert (Is_Type (Id));
4798 Set_Flag106 (Id, V);
4799 end Set_Is_Limited_Composite;
4801 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4803 pragma Assert (Is_Interface (Id));
4804 Set_Flag197 (Id, V);
4805 end Set_Is_Limited_Interface;
4807 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4810 end Set_Is_Limited_Record;
4812 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4814 pragma Assert (Is_Subprogram (Id));
4815 Set_Flag137 (Id, V);
4816 end Set_Is_Machine_Code_Subprogram;
4818 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4820 pragma Assert (Is_Type (Id));
4821 Set_Flag109 (Id, V);
4822 end Set_Is_Non_Static_Subtype;
4824 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4826 pragma Assert (Ekind (Id) = E_Procedure);
4827 Set_Flag178 (Id, V);
4828 end Set_Is_Null_Init_Proc;
4830 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4832 Set_Flag153 (Id, V);
4833 end Set_Is_Obsolescent;
4835 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
4837 pragma Assert (Ekind (Id) = E_Out_Parameter);
4838 Set_Flag226 (Id, V);
4839 end Set_Is_Only_Out_Parameter;
4841 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
4843 pragma Assert (Is_Formal (Id));
4844 Set_Flag134 (Id, V);
4845 end Set_Is_Optional_Parameter;
4847 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
4849 Set_Flag160 (Id, V);
4850 end Set_Is_Package_Body_Entity;
4852 procedure Set_Is_Packed (Id : E; V : B := True) is
4854 pragma Assert (Id = Base_Type (Id));
4858 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
4860 Set_Flag138 (Id, V);
4861 end Set_Is_Packed_Array_Type;
4863 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
4865 pragma Assert (Nkind (Id) in N_Entity);
4867 end Set_Is_Potentially_Use_Visible;
4869 procedure Set_Is_Predicate_Function (Id : E; V : B := True) is
4871 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4872 Set_Flag255 (Id, V);
4873 end Set_Is_Predicate_Function;
4875 procedure Set_Is_Predicate_Function_M (Id : E; V : B := True) is
4877 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4878 Set_Flag256 (Id, V);
4879 end Set_Is_Predicate_Function_M;
4881 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
4884 end Set_Is_Preelaborated;
4886 procedure Set_Is_Primitive (Id : E; V : B := True) is
4889 (Is_Overloadable (Id)
4890 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
4891 Set_Flag218 (Id, V);
4892 end Set_Is_Primitive;
4894 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
4896 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4897 Set_Flag195 (Id, V);
4898 end Set_Is_Primitive_Wrapper;
4900 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
4902 pragma Assert (Is_Type (Id));
4903 Set_Flag107 (Id, V);
4904 end Set_Is_Private_Composite;
4906 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
4909 end Set_Is_Private_Descendant;
4911 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
4913 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4914 Set_Flag245 (Id, V);
4915 end Set_Is_Private_Primitive;
4917 procedure Set_Is_Processed_Transient (Id : E; V : B := True) is
4919 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
4920 Set_Flag252 (Id, V);
4921 end Set_Is_Processed_Transient;
4923 procedure Set_Is_Public (Id : E; V : B := True) is
4925 pragma Assert (Nkind (Id) in N_Entity);
4929 procedure Set_Is_Pure (Id : E; V : B := True) is
4934 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
4936 pragma Assert (Is_Access_Type (Id));
4937 Set_Flag189 (Id, V);
4938 end Set_Is_Pure_Unit_Access_Type;
4940 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
4942 pragma Assert (Is_Type (Id));
4943 Set_Flag244 (Id, V);
4944 end Set_Is_RACW_Stub_Type;
4946 procedure Set_Is_Raised (Id : E; V : B := True) is
4948 pragma Assert (Ekind (Id) = E_Exception);
4949 Set_Flag224 (Id, V);
4952 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
4955 end Set_Is_Remote_Call_Interface;
4957 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
4960 end Set_Is_Remote_Types;
4962 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
4964 Set_Flag112 (Id, V);
4965 end Set_Is_Renaming_Of_Object;
4967 procedure Set_Is_Return_Object (Id : E; V : B := True) is
4969 Set_Flag209 (Id, V);
4970 end Set_Is_Return_Object;
4972 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
4974 pragma Assert (Ekind (Id) = E_Variable);
4975 Set_Flag249 (Id, V);
4976 end Set_Is_Safe_To_Reevaluate;
4978 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
4981 end Set_Is_Shared_Passive;
4983 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
4987 or else Ekind_In (Id, E_Exception,
4992 end Set_Is_Statically_Allocated;
4994 procedure Set_Is_Tag (Id : E; V : B := True) is
4996 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5000 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
5003 end Set_Is_Tagged_Type;
5005 procedure Set_Is_Thunk (Id : E; V : B := True) is
5007 pragma Assert (Is_Subprogram (Id));
5008 Set_Flag225 (Id, V);
5011 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
5013 Set_Flag235 (Id, V);
5014 end Set_Is_Trivial_Subprogram;
5016 procedure Set_Is_True_Constant (Id : E; V : B := True) is
5018 Set_Flag163 (Id, V);
5019 end Set_Is_True_Constant;
5021 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
5023 pragma Assert (Id = Base_Type (Id));
5024 Set_Flag117 (Id, V);
5025 end Set_Is_Unchecked_Union;
5027 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
5029 pragma Assert (Ekind (Id) = E_Record_Type);
5030 Set_Flag246 (Id, V);
5031 end Set_Is_Underlying_Record_View;
5033 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
5035 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
5036 Set_Flag144 (Id, V);
5037 end Set_Is_Unsigned_Type;
5039 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
5041 pragma Assert (Ekind (Id) = E_Procedure);
5042 Set_Flag127 (Id, V);
5043 end Set_Is_Valued_Procedure;
5045 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
5047 Set_Flag206 (Id, V);
5048 end Set_Is_Visible_Formal;
5050 procedure Set_Is_Visible_Lib_Unit (Id : E; V : B := True) is
5052 Set_Flag116 (Id, V);
5053 end Set_Is_Visible_Lib_Unit;
5055 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
5057 pragma Assert (Ekind (Id) = E_Exception);
5058 Set_Flag133 (Id, V);
5059 end Set_Is_VMS_Exception;
5061 procedure Set_Is_Volatile (Id : E; V : B := True) is
5063 pragma Assert (Nkind (Id) in N_Entity);
5065 end Set_Is_Volatile;
5067 procedure Set_Itype_Printed (Id : E; V : B := True) is
5069 pragma Assert (Is_Itype (Id));
5070 Set_Flag202 (Id, V);
5071 end Set_Itype_Printed;
5073 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
5076 end Set_Kill_Elaboration_Checks;
5078 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
5081 end Set_Kill_Range_Checks;
5083 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
5085 pragma Assert (Is_Type (Id));
5086 Set_Flag207 (Id, V);
5087 end Set_Known_To_Have_Preelab_Init;
5089 procedure Set_Last_Assignment (Id : E; V : N) is
5091 pragma Assert (Is_Assignable (Id));
5093 end Set_Last_Assignment;
5095 procedure Set_Last_Entity (Id : E; V : E) is
5098 end Set_Last_Entity;
5100 procedure Set_Limited_View (Id : E; V : E) is
5102 pragma Assert (Ekind (Id) = E_Package);
5104 end Set_Limited_View;
5106 procedure Set_Linker_Section_Pragma (Id : E; V : N) is
5108 pragma Assert (Is_Type (Id)
5109 or else Ekind_In (Id, E_Constant, E_Variable)
5110 or else Is_Subprogram (Id));
5112 end Set_Linker_Section_Pragma;
5114 procedure Set_Lit_Indexes (Id : E; V : E) is
5116 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5118 end Set_Lit_Indexes;
5120 procedure Set_Lit_Strings (Id : E; V : E) is
5122 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5124 end Set_Lit_Strings;
5126 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
5128 pragma Assert (Is_Formal (Id));
5129 Set_Flag205 (Id, V);
5130 end Set_Low_Bound_Tested;
5132 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
5134 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
5136 end Set_Machine_Radix_10;
5138 procedure Set_Master_Id (Id : E; V : E) is
5140 pragma Assert (Is_Access_Type (Id));
5144 procedure Set_Materialize_Entity (Id : E; V : B := True) is
5146 Set_Flag168 (Id, V);
5147 end Set_Materialize_Entity;
5149 procedure Set_May_Inherit_Delayed_Rep_Aspects (Id : E; V : B := True) is
5151 Set_Flag262 (Id, V);
5152 end Set_May_Inherit_Delayed_Rep_Aspects;
5154 procedure Set_Mechanism (Id : E; V : M) is
5156 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
5157 Set_Uint8 (Id, UI_From_Int (V));
5160 procedure Set_Modulus (Id : E; V : U) is
5162 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
5166 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
5168 pragma Assert (Is_Type (Id));
5169 Set_Flag183 (Id, V);
5170 end Set_Must_Be_On_Byte_Boundary;
5172 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
5174 pragma Assert (Is_Type (Id));
5175 Set_Flag208 (Id, V);
5176 end Set_Must_Have_Preelab_Init;
5178 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
5180 Set_Flag147 (Id, V);
5181 end Set_Needs_Debug_Info;
5183 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
5186 (Is_Overloadable (Id)
5187 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
5189 end Set_Needs_No_Actuals;
5191 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
5193 Set_Flag115 (Id, V);
5194 end Set_Never_Set_In_Source;
5196 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
5199 end Set_Next_Inlined_Subprogram;
5201 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
5203 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5204 Set_Flag131 (Id, V);
5205 end Set_No_Pool_Assigned;
5207 procedure Set_No_Return (Id : E; V : B := True) is
5210 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
5211 Set_Flag113 (Id, V);
5214 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
5216 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5217 Set_Flag136 (Id, V);
5218 end Set_No_Strict_Aliasing;
5220 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
5222 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5224 end Set_Non_Binary_Modulus;
5226 procedure Set_Non_Limited_View (Id : E; V : E) is
5229 (Ekind (Id) in Incomplete_Kind or else Ekind (Id) = E_Abstract_State);
5231 end Set_Non_Limited_View;
5233 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
5236 (Root_Type (Id) = Standard_Boolean
5237 and then Ekind (Id) = E_Enumeration_Type);
5238 Set_Flag162 (Id, V);
5239 end Set_Nonzero_Is_True;
5241 procedure Set_Normalized_First_Bit (Id : E; V : U) is
5243 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5245 end Set_Normalized_First_Bit;
5247 procedure Set_Normalized_Position (Id : E; V : U) is
5249 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5251 end Set_Normalized_Position;
5253 procedure Set_Normalized_Position_Max (Id : E; V : U) is
5255 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5257 end Set_Normalized_Position_Max;
5259 procedure Set_OK_To_Rename (Id : E; V : B := True) is
5261 pragma Assert (Ekind (Id) = E_Variable);
5262 Set_Flag247 (Id, V);
5263 end Set_OK_To_Rename;
5265 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
5268 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5269 Set_Flag239 (Id, V);
5270 end Set_OK_To_Reorder_Components;
5272 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
5275 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5276 Set_Flag241 (Id, V);
5277 end Set_Optimize_Alignment_Space;
5279 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
5282 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5283 Set_Flag242 (Id, V);
5284 end Set_Optimize_Alignment_Time;
5286 procedure Set_Original_Access_Type (Id : E; V : E) is
5288 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
5290 end Set_Original_Access_Type;
5292 procedure Set_Original_Array_Type (Id : E; V : E) is
5294 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
5296 end Set_Original_Array_Type;
5298 procedure Set_Original_Record_Component (Id : E; V : E) is
5300 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
5302 end Set_Original_Record_Component;
5304 procedure Set_Overlays_Constant (Id : E; V : B := True) is
5306 Set_Flag243 (Id, V);
5307 end Set_Overlays_Constant;
5309 procedure Set_Overridden_Operation (Id : E; V : E) is
5312 end Set_Overridden_Operation;
5314 procedure Set_Package_Instantiation (Id : E; V : N) is
5316 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
5318 end Set_Package_Instantiation;
5320 procedure Set_Packed_Array_Type (Id : E; V : E) is
5322 pragma Assert (Is_Array_Type (Id));
5324 end Set_Packed_Array_Type;
5326 procedure Set_Parent_Subtype (Id : E; V : E) is
5328 pragma Assert (Ekind (Id) = E_Record_Type);
5330 end Set_Parent_Subtype;
5332 procedure Set_Postcondition_Proc (Id : E; V : E) is
5334 pragma Assert (Ekind (Id) = E_Procedure);
5336 end Set_Postcondition_Proc;
5338 procedure Set_PPC_Wrapper (Id : E; V : E) is
5340 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
5342 end Set_PPC_Wrapper;
5344 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
5346 pragma Assert (Is_Tagged_Type (Id));
5347 Set_Elist10 (Id, V);
5348 end Set_Direct_Primitive_Operations;
5350 procedure Set_Prival (Id : E; V : E) is
5352 pragma Assert (Is_Protected_Component (Id));
5356 procedure Set_Prival_Link (Id : E; V : E) is
5358 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5360 end Set_Prival_Link;
5362 procedure Set_Private_Dependents (Id : E; V : L) is
5364 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
5365 Set_Elist18 (Id, V);
5366 end Set_Private_Dependents;
5368 procedure Set_Private_View (Id : E; V : N) is
5370 pragma Assert (Is_Private_Type (Id));
5372 end Set_Private_View;
5374 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
5376 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
5378 end Set_Protected_Body_Subprogram;
5380 procedure Set_Protected_Formal (Id : E; V : E) is
5382 pragma Assert (Is_Formal (Id));
5384 end Set_Protected_Formal;
5386 procedure Set_Protection_Object (Id : E; V : E) is
5388 pragma Assert (Ekind_In (Id, E_Entry,
5393 end Set_Protection_Object;
5395 procedure Set_Reachable (Id : E; V : B := True) is
5400 procedure Set_Referenced (Id : E; V : B := True) is
5402 Set_Flag156 (Id, V);
5405 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
5408 end Set_Referenced_As_LHS;
5410 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
5412 Set_Flag227 (Id, V);
5413 end Set_Referenced_As_Out_Parameter;
5415 procedure Set_Refined_State (Id : E; V : E) is
5417 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
5419 end Set_Refined_State;
5421 procedure Set_Refinement_Constituents (Id : E; V : L) is
5423 pragma Assert (Ekind (Id) = E_Abstract_State);
5425 end Set_Refinement_Constituents;
5427 procedure Set_Register_Exception_Call (Id : E; V : N) is
5429 pragma Assert (Ekind (Id) = E_Exception);
5431 end Set_Register_Exception_Call;
5433 procedure Set_Related_Array_Object (Id : E; V : E) is
5435 pragma Assert (Is_Array_Type (Id));
5437 end Set_Related_Array_Object;
5439 procedure Set_Related_Expression (Id : E; V : N) is
5441 pragma Assert (Ekind (Id) in Type_Kind
5442 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
5444 end Set_Related_Expression;
5446 procedure Set_Related_Instance (Id : E; V : E) is
5448 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
5450 end Set_Related_Instance;
5452 procedure Set_Related_Type (Id : E; V : E) is
5454 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5456 end Set_Related_Type;
5458 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5460 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
5462 end Set_Relative_Deadline_Variable;
5464 procedure Set_Renamed_Entity (Id : E; V : N) is
5467 end Set_Renamed_Entity;
5469 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5471 pragma Assert (Ekind (Id) = E_Package);
5472 Set_Flag231 (Id, V);
5473 end Set_Renamed_In_Spec;
5475 procedure Set_Renamed_Object (Id : E; V : N) is
5478 end Set_Renamed_Object;
5480 procedure Set_Renaming_Map (Id : E; V : U) is
5483 end Set_Renaming_Map;
5485 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5487 pragma Assert (Is_Overloadable (Id));
5488 Set_Flag213 (Id, V);
5489 end Set_Requires_Overriding;
5491 procedure Set_Return_Present (Id : E; V : B := True) is
5494 end Set_Return_Present;
5496 procedure Set_Return_Applies_To (Id : E; V : N) is
5499 end Set_Return_Applies_To;
5501 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5504 end Set_Returns_By_Ref;
5506 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5509 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5510 Set_Flag164 (Id, V);
5511 end Set_Reverse_Bit_Order;
5513 procedure Set_Reverse_Storage_Order (Id : E; V : B := True) is
5517 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5519 end Set_Reverse_Storage_Order;
5521 procedure Set_RM_Size (Id : E; V : U) is
5523 pragma Assert (Is_Type (Id));
5527 procedure Set_Scalar_Range (Id : E; V : N) is
5530 end Set_Scalar_Range;
5532 procedure Set_Scale_Value (Id : E; V : U) is
5535 end Set_Scale_Value;
5537 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5539 pragma Assert (not Is_Record_Type (Id));
5541 end Set_Scope_Depth_Value;
5543 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5545 Set_Flag167 (Id, V);
5546 end Set_Sec_Stack_Needed_For_Return;
5548 procedure Set_Shadow_Entities (Id : E; V : S) is
5550 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5552 end Set_Shadow_Entities;
5554 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5556 pragma Assert (Ekind (Id) = E_Variable);
5558 end Set_Shared_Var_Procs_Instance;
5560 procedure Set_Size_Check_Code (Id : E; V : N) is
5562 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5564 end Set_Size_Check_Code;
5566 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5568 Set_Flag177 (Id, V);
5569 end Set_Size_Depends_On_Discriminant;
5571 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5574 end Set_Size_Known_At_Compile_Time;
5576 procedure Set_Small_Value (Id : E; V : R) is
5578 pragma Assert (Is_Fixed_Point_Type (Id));
5579 Set_Ureal21 (Id, V);
5580 end Set_Small_Value;
5582 procedure Set_SPARK_Aux_Pragma (Id : E; V : N) is
5585 (Ekind_In (Id, E_Generic_Package, -- package variants
5590 end Set_SPARK_Aux_Pragma;
5592 procedure Set_SPARK_Aux_Pragma_Inherited (Id : E; V : B := True) is
5595 (Ekind_In (Id, E_Generic_Package, -- package variants
5599 Set_Flag266 (Id, V);
5600 end Set_SPARK_Aux_Pragma_Inherited;
5602 procedure Set_SPARK_Pragma (Id : E; V : N) is
5605 (Ekind_In (Id, E_Function, -- subprogram variants
5607 E_Generic_Procedure,
5611 Ekind_In (Id, E_Generic_Package, -- package variants
5616 end Set_SPARK_Pragma;
5618 procedure Set_SPARK_Pragma_Inherited (Id : E; V : B := True) is
5621 (Ekind_In (Id, E_Function, -- subprogram variants
5623 E_Generic_Procedure,
5627 Ekind_In (Id, E_Generic_Package, -- package variants
5631 Set_Flag265 (Id, V);
5632 end Set_SPARK_Pragma_Inherited;
5634 procedure Set_Spec_Entity (Id : E; V : E) is
5636 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5638 end Set_Spec_Entity;
5640 procedure Set_Static_Predicate (Id : E; V : S) is
5643 (Ekind_In (Id, E_Enumeration_Subtype,
5644 E_Modular_Integer_Subtype,
5645 E_Signed_Integer_Subtype)
5646 and then Has_Predicates (Id));
5648 end Set_Static_Predicate;
5650 procedure Set_Status_Flag_Or_Transient_Decl (Id : E; V : E) is
5652 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5654 end Set_Status_Flag_Or_Transient_Decl;
5656 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5658 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5659 pragma Assert (Id = Base_Type (Id));
5661 end Set_Storage_Size_Variable;
5663 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5665 pragma Assert (Ekind (Id) = E_Package);
5667 end Set_Static_Elaboration_Desired;
5669 procedure Set_Static_Initialization (Id : E; V : N) is
5672 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5674 end Set_Static_Initialization;
5676 procedure Set_Stored_Constraint (Id : E; V : L) is
5678 pragma Assert (Nkind (Id) in N_Entity);
5679 Set_Elist23 (Id, V);
5680 end Set_Stored_Constraint;
5682 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5684 pragma Assert (Id = Base_Type (Id));
5685 Set_Flag145 (Id, V);
5686 end Set_Strict_Alignment;
5688 procedure Set_String_Literal_Length (Id : E; V : U) is
5690 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5692 end Set_String_Literal_Length;
5694 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5696 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5698 end Set_String_Literal_Low_Bound;
5700 procedure Set_Subprograms_For_Type (Id : E; V : E) is
5702 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
5704 end Set_Subprograms_For_Type;
5706 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5708 Set_Flag148 (Id, V);
5709 end Set_Suppress_Elaboration_Warnings;
5711 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
5713 pragma Assert (Is_Type (Id));
5714 Set_Flag105 (Id, V);
5715 end Set_Suppress_Initialization;
5717 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5719 Set_Flag165 (Id, V);
5720 end Set_Suppress_Style_Checks;
5722 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5724 Set_Flag217 (Id, V);
5725 end Set_Suppress_Value_Tracking_On_Call;
5727 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5729 pragma Assert (Ekind (Id) in Task_Kind);
5731 end Set_Task_Body_Procedure;
5733 procedure Set_Thunk_Entity (Id : E; V : E) is
5735 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5736 and then Is_Thunk (Id));
5738 end Set_Thunk_Entity;
5740 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5743 end Set_Treat_As_Volatile;
5745 procedure Set_Underlying_Full_View (Id : E; V : E) is
5747 pragma Assert (Ekind (Id) in Private_Kind);
5749 end Set_Underlying_Full_View;
5751 procedure Set_Underlying_Record_View (Id : E; V : E) is
5753 pragma Assert (Ekind (Id) = E_Record_Type);
5755 end Set_Underlying_Record_View;
5757 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5759 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5760 Set_Flag216 (Id, V);
5761 end Set_Universal_Aliasing;
5763 procedure Set_Unset_Reference (Id : E; V : N) is
5766 end Set_Unset_Reference;
5768 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5770 Set_Flag222 (Id, V);
5771 end Set_Used_As_Generic_Actual;
5773 procedure Set_Uses_Lock_Free (Id : E; V : B := True) is
5775 pragma Assert (Ekind (Id) = E_Protected_Type);
5776 Set_Flag188 (Id, V);
5777 end Set_Uses_Lock_Free;
5779 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5782 end Set_Uses_Sec_Stack;
5784 procedure Set_Warnings_Off (Id : E; V : B := True) is
5787 end Set_Warnings_Off;
5789 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
5791 Set_Flag236 (Id, V);
5792 end Set_Warnings_Off_Used;
5794 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
5796 Set_Flag237 (Id, V);
5797 end Set_Warnings_Off_Used_Unmodified;
5799 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
5801 Set_Flag238 (Id, V);
5802 end Set_Warnings_Off_Used_Unreferenced;
5804 procedure Set_Was_Hidden (Id : E; V : B := True) is
5806 Set_Flag196 (Id, V);
5809 procedure Set_Wrapped_Entity (Id : E; V : E) is
5811 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5812 and then Is_Primitive_Wrapper (Id));
5814 end Set_Wrapped_Entity;
5816 -----------------------------------
5817 -- Field Initialization Routines --
5818 -----------------------------------
5820 procedure Init_Alignment (Id : E) is
5822 Set_Uint14 (Id, Uint_0);
5825 procedure Init_Alignment (Id : E; V : Int) is
5827 Set_Uint14 (Id, UI_From_Int (V));
5830 procedure Init_Component_Bit_Offset (Id : E) is
5832 Set_Uint11 (Id, No_Uint);
5833 end Init_Component_Bit_Offset;
5835 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
5837 Set_Uint11 (Id, UI_From_Int (V));
5838 end Init_Component_Bit_Offset;
5840 procedure Init_Component_Size (Id : E) is
5842 Set_Uint22 (Id, Uint_0);
5843 end Init_Component_Size;
5845 procedure Init_Component_Size (Id : E; V : Int) is
5847 Set_Uint22 (Id, UI_From_Int (V));
5848 end Init_Component_Size;
5850 procedure Init_Digits_Value (Id : E) is
5852 Set_Uint17 (Id, Uint_0);
5853 end Init_Digits_Value;
5855 procedure Init_Digits_Value (Id : E; V : Int) is
5857 Set_Uint17 (Id, UI_From_Int (V));
5858 end Init_Digits_Value;
5860 procedure Init_Esize (Id : E) is
5862 Set_Uint12 (Id, Uint_0);
5865 procedure Init_Esize (Id : E; V : Int) is
5867 Set_Uint12 (Id, UI_From_Int (V));
5870 procedure Init_Normalized_First_Bit (Id : E) is
5872 Set_Uint8 (Id, No_Uint);
5873 end Init_Normalized_First_Bit;
5875 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
5877 Set_Uint8 (Id, UI_From_Int (V));
5878 end Init_Normalized_First_Bit;
5880 procedure Init_Normalized_Position (Id : E) is
5882 Set_Uint14 (Id, No_Uint);
5883 end Init_Normalized_Position;
5885 procedure Init_Normalized_Position (Id : E; V : Int) is
5887 Set_Uint14 (Id, UI_From_Int (V));
5888 end Init_Normalized_Position;
5890 procedure Init_Normalized_Position_Max (Id : E) is
5892 Set_Uint10 (Id, No_Uint);
5893 end Init_Normalized_Position_Max;
5895 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
5897 Set_Uint10 (Id, UI_From_Int (V));
5898 end Init_Normalized_Position_Max;
5900 procedure Init_RM_Size (Id : E) is
5902 Set_Uint13 (Id, Uint_0);
5905 procedure Init_RM_Size (Id : E; V : Int) is
5907 Set_Uint13 (Id, UI_From_Int (V));
5910 -----------------------------
5911 -- Init_Component_Location --
5912 -----------------------------
5914 procedure Init_Component_Location (Id : E) is
5916 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
5917 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
5918 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
5919 Set_Uint12 (Id, Uint_0); -- Esize
5920 Set_Uint14 (Id, No_Uint); -- Normalized_Position
5921 end Init_Component_Location;
5923 ----------------------------
5924 -- Init_Object_Size_Align --
5925 ----------------------------
5927 procedure Init_Object_Size_Align (Id : E) is
5929 Set_Uint12 (Id, Uint_0); -- Esize
5930 Set_Uint14 (Id, Uint_0); -- Alignment
5931 end Init_Object_Size_Align;
5937 procedure Init_Size (Id : E; V : Int) is
5939 pragma Assert (not Is_Object (Id));
5940 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
5941 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
5944 ---------------------
5945 -- Init_Size_Align --
5946 ---------------------
5948 procedure Init_Size_Align (Id : E) is
5950 pragma Assert (not Is_Object (Id));
5951 Set_Uint12 (Id, Uint_0); -- Esize
5952 Set_Uint13 (Id, Uint_0); -- RM_Size
5953 Set_Uint14 (Id, Uint_0); -- Alignment
5954 end Init_Size_Align;
5956 ----------------------------------------------
5957 -- Type Representation Attribute Predicates --
5958 ----------------------------------------------
5960 function Known_Alignment (E : Entity_Id) return B is
5962 return Uint14 (E) /= Uint_0
5963 and then Uint14 (E) /= No_Uint;
5964 end Known_Alignment;
5966 function Known_Component_Bit_Offset (E : Entity_Id) return B is
5968 return Uint11 (E) /= No_Uint;
5969 end Known_Component_Bit_Offset;
5971 function Known_Component_Size (E : Entity_Id) return B is
5973 return Uint22 (Base_Type (E)) /= Uint_0
5974 and then Uint22 (Base_Type (E)) /= No_Uint;
5975 end Known_Component_Size;
5977 function Known_Esize (E : Entity_Id) return B is
5979 return Uint12 (E) /= Uint_0
5980 and then Uint12 (E) /= No_Uint;
5983 function Known_Normalized_First_Bit (E : Entity_Id) return B is
5985 return Uint8 (E) /= No_Uint;
5986 end Known_Normalized_First_Bit;
5988 function Known_Normalized_Position (E : Entity_Id) return B is
5990 return Uint14 (E) /= No_Uint;
5991 end Known_Normalized_Position;
5993 function Known_Normalized_Position_Max (E : Entity_Id) return B is
5995 return Uint10 (E) /= No_Uint;
5996 end Known_Normalized_Position_Max;
5998 function Known_RM_Size (E : Entity_Id) return B is
6000 return Uint13 (E) /= No_Uint
6001 and then (Uint13 (E) /= Uint_0
6002 or else Is_Discrete_Type (E)
6003 or else Is_Fixed_Point_Type (E));
6006 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
6008 return Uint11 (E) /= No_Uint
6009 and then Uint11 (E) >= Uint_0;
6010 end Known_Static_Component_Bit_Offset;
6012 function Known_Static_Component_Size (E : Entity_Id) return B is
6014 return Uint22 (Base_Type (E)) > Uint_0;
6015 end Known_Static_Component_Size;
6017 function Known_Static_Esize (E : Entity_Id) return B is
6019 return Uint12 (E) > Uint_0
6020 and then not Is_Generic_Type (E);
6021 end Known_Static_Esize;
6023 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
6025 return Uint8 (E) /= No_Uint
6026 and then Uint8 (E) >= Uint_0;
6027 end Known_Static_Normalized_First_Bit;
6029 function Known_Static_Normalized_Position (E : Entity_Id) return B is
6031 return Uint14 (E) /= No_Uint
6032 and then Uint14 (E) >= Uint_0;
6033 end Known_Static_Normalized_Position;
6035 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
6037 return Uint10 (E) /= No_Uint
6038 and then Uint10 (E) >= Uint_0;
6039 end Known_Static_Normalized_Position_Max;
6041 function Known_Static_RM_Size (E : Entity_Id) return B is
6043 return (Uint13 (E) > Uint_0
6044 or else Is_Discrete_Type (E)
6045 or else Is_Fixed_Point_Type (E))
6046 and then not Is_Generic_Type (E);
6047 end Known_Static_RM_Size;
6049 function Unknown_Alignment (E : Entity_Id) return B is
6051 return Uint14 (E) = Uint_0
6052 or else Uint14 (E) = No_Uint;
6053 end Unknown_Alignment;
6055 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
6057 return Uint11 (E) = No_Uint;
6058 end Unknown_Component_Bit_Offset;
6060 function Unknown_Component_Size (E : Entity_Id) return B is
6062 return Uint22 (Base_Type (E)) = Uint_0
6064 Uint22 (Base_Type (E)) = No_Uint;
6065 end Unknown_Component_Size;
6067 function Unknown_Esize (E : Entity_Id) return B is
6069 return Uint12 (E) = No_Uint
6071 Uint12 (E) = Uint_0;
6074 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
6076 return Uint8 (E) = No_Uint;
6077 end Unknown_Normalized_First_Bit;
6079 function Unknown_Normalized_Position (E : Entity_Id) return B is
6081 return Uint14 (E) = No_Uint;
6082 end Unknown_Normalized_Position;
6084 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
6086 return Uint10 (E) = No_Uint;
6087 end Unknown_Normalized_Position_Max;
6089 function Unknown_RM_Size (E : Entity_Id) return B is
6091 return (Uint13 (E) = Uint_0
6092 and then not Is_Discrete_Type (E)
6093 and then not Is_Fixed_Point_Type (E))
6094 or else Uint13 (E) = No_Uint;
6095 end Unknown_RM_Size;
6097 --------------------
6098 -- Address_Clause --
6099 --------------------
6101 function Address_Clause (Id : E) return N is
6103 return Get_Attribute_Definition_Clause (Id, Attribute_Address);
6110 function Aft_Value (Id : E) return U is
6112 Delta_Val : Ureal := Delta_Value (Id);
6114 while Delta_Val < Ureal_Tenth loop
6115 Delta_Val := Delta_Val * Ureal_10;
6116 Result := Result + 1;
6119 return UI_From_Int (Result);
6122 ----------------------
6123 -- Alignment_Clause --
6124 ----------------------
6126 function Alignment_Clause (Id : E) return N is
6128 return Get_Attribute_Definition_Clause (Id, Attribute_Alignment);
6129 end Alignment_Clause;
6135 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
6137 if Last_Entity (V) = Empty then
6138 Set_First_Entity (Id => V, V => Id);
6140 Set_Next_Entity (Last_Entity (V), Id);
6143 Set_Next_Entity (Id, Empty);
6145 Set_Last_Entity (Id => V, V => Id);
6152 function Base_Type (Id : E) return E is
6154 if Is_Base_Type (Id) then
6157 pragma Assert (Is_Type (Id));
6162 -------------------------
6163 -- Component_Alignment --
6164 -------------------------
6166 -- Component Alignment is encoded using two flags, Flag128/129 as
6167 -- follows. Note that both flags False = Align_Default, so that the
6168 -- default initialization of flags to False initializes component
6169 -- alignment to the default value as required.
6171 -- Flag128 Flag129 Value
6172 -- ------- ------- -----
6173 -- False False Calign_Default
6174 -- False True Calign_Component_Size
6175 -- True False Calign_Component_Size_4
6176 -- True True Calign_Storage_Unit
6178 function Component_Alignment (Id : E) return C is
6179 BT : constant Node_Id := Base_Type (Id);
6182 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
6184 if Flag128 (BT) then
6185 if Flag129 (BT) then
6186 return Calign_Storage_Unit;
6188 return Calign_Component_Size_4;
6192 if Flag129 (BT) then
6193 return Calign_Component_Size;
6195 return Calign_Default;
6198 end Component_Alignment;
6200 ----------------------
6201 -- Declaration_Node --
6202 ----------------------
6204 function Declaration_Node (Id : E) return N is
6208 if Ekind (Id) = E_Incomplete_Type
6209 and then Present (Full_View (Id))
6211 P := Parent (Full_View (Id));
6217 if Nkind (P) /= N_Selected_Component
6218 and then Nkind (P) /= N_Expanded_Name
6220 not (Nkind (P) = N_Defining_Program_Unit_Name
6221 and then Is_Child_Unit (Id))
6228 end Declaration_Node;
6230 ---------------------
6231 -- Designated_Type --
6232 ---------------------
6234 function Designated_Type (Id : E) return E is
6238 Desig_Type := Directly_Designated_Type (Id);
6240 if Ekind (Desig_Type) = E_Incomplete_Type
6241 and then Present (Full_View (Desig_Type))
6243 return Full_View (Desig_Type);
6245 elsif Is_Class_Wide_Type (Desig_Type)
6246 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
6247 and then Present (Full_View (Etype (Desig_Type)))
6248 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
6250 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
6255 end Designated_Type;
6257 ----------------------
6258 -- Entry_Index_Type --
6259 ----------------------
6261 function Entry_Index_Type (Id : E) return N is
6263 pragma Assert (Ekind (Id) = E_Entry_Family);
6264 return Etype (Discrete_Subtype_Definition (Parent (Id)));
6265 end Entry_Index_Type;
6267 ---------------------
6268 -- First_Component --
6269 ---------------------
6271 function First_Component (Id : E) return E is
6276 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
6278 Comp_Id := First_Entity (Id);
6279 while Present (Comp_Id) loop
6280 exit when Ekind (Comp_Id) = E_Component;
6281 Comp_Id := Next_Entity (Comp_Id);
6285 end First_Component;
6287 -------------------------------------
6288 -- First_Component_Or_Discriminant --
6289 -------------------------------------
6291 function First_Component_Or_Discriminant (Id : E) return E is
6296 (Is_Record_Type (Id)
6297 or else Is_Incomplete_Or_Private_Type (Id)
6298 or else Has_Discriminants (Id));
6300 Comp_Id := First_Entity (Id);
6301 while Present (Comp_Id) loop
6302 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6303 Comp_Id := Next_Entity (Comp_Id);
6307 end First_Component_Or_Discriminant;
6313 function First_Formal (Id : E) return E is
6318 (Is_Overloadable (Id)
6319 or else Ekind_In (Id, E_Entry_Family,
6321 E_Subprogram_Type));
6323 if Ekind (Id) = E_Enumeration_Literal then
6327 Formal := First_Entity (Id);
6329 if Present (Formal) and then Is_Formal (Formal) then
6337 ------------------------------
6338 -- First_Formal_With_Extras --
6339 ------------------------------
6341 function First_Formal_With_Extras (Id : E) return E is
6346 (Is_Overloadable (Id)
6347 or else Ekind_In (Id, E_Entry_Family,
6349 E_Subprogram_Type));
6351 if Ekind (Id) = E_Enumeration_Literal then
6355 Formal := First_Entity (Id);
6357 if Present (Formal) and then Is_Formal (Formal) then
6360 return Extra_Formals (Id); -- Empty if no extra formals
6363 end First_Formal_With_Extras;
6365 -------------------------------------
6366 -- Get_Attribute_Definition_Clause --
6367 -------------------------------------
6369 function Get_Attribute_Definition_Clause
6371 Id : Attribute_Id) return Node_Id
6376 N := First_Rep_Item (E);
6377 while Present (N) loop
6378 if Nkind (N) = N_Attribute_Definition_Clause
6379 and then Get_Attribute_Id (Chars (N)) = Id
6388 end Get_Attribute_Definition_Clause;
6394 function Get_Full_View (T : Entity_Id) return Entity_Id is
6396 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
6397 return Full_View (T);
6399 elsif Is_Class_Wide_Type (T)
6400 and then Ekind (Root_Type (T)) = E_Incomplete_Type
6401 and then Present (Full_View (Root_Type (T)))
6403 return Class_Wide_Type (Full_View (Root_Type (T)));
6414 function Get_Pragma (E : Entity_Id; Id : Pragma_Id) return Node_Id is
6415 Is_CDG : constant Boolean :=
6416 Id = Pragma_Abstract_State or else
6417 Id = Pragma_Async_Readers or else
6418 Id = Pragma_Async_Writers or else
6419 Id = Pragma_Depends or else
6420 Id = Pragma_Effective_Reads or else
6421 Id = Pragma_Effective_Writes or else
6422 Id = Pragma_Global or else
6423 Id = Pragma_Initial_Condition or else
6424 Id = Pragma_Initializes or else
6425 Id = Pragma_Refined_Depends or else
6426 Id = Pragma_Refined_Global or else
6427 Id = Pragma_Refined_State;
6428 Is_CTC : constant Boolean :=
6429 Id = Pragma_Contract_Cases or else
6430 Id = Pragma_Test_Case;
6431 Is_PPC : constant Boolean :=
6432 Id = Pragma_Precondition or else
6433 Id = Pragma_Postcondition;
6435 In_Contract : constant Boolean := Is_CDG or Is_CTC or Is_PPC;
6441 -- Handle pragmas that appear in N_Contract nodes. Those have to be
6442 -- extracted from their specialized list.
6445 Items := Contract (E);
6451 Item := Classifications (Items);
6454 Item := Contract_Test_Cases (Items);
6457 Item := Pre_Post_Conditions (Items);
6463 Item := First_Rep_Item (E);
6466 while Present (Item) loop
6467 if Nkind (Item) = N_Pragma
6468 and then Get_Pragma_Id (Pragma_Name (Item)) = Id
6472 -- All nodes in N_Contract are chained using Next_Pragma
6474 elsif In_Contract then
6475 Item := Next_Pragma (Item);
6480 Next_Rep_Item (Item);
6487 --------------------------------------
6488 -- Get_Record_Representation_Clause --
6489 --------------------------------------
6491 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
6495 N := First_Rep_Item (E);
6496 while Present (N) loop
6497 if Nkind (N) = N_Record_Representation_Clause then
6505 end Get_Record_Representation_Clause;
6507 ------------------------
6508 -- Has_Attach_Handler --
6509 ------------------------
6511 function Has_Attach_Handler (Id : E) return B is
6515 pragma Assert (Is_Protected_Type (Id));
6517 Ritem := First_Rep_Item (Id);
6518 while Present (Ritem) loop
6519 if Nkind (Ritem) = N_Pragma
6520 and then Pragma_Name (Ritem) = Name_Attach_Handler
6524 Next_Rep_Item (Ritem);
6529 end Has_Attach_Handler;
6535 function Has_Entries (Id : E) return B is
6539 pragma Assert (Is_Concurrent_Type (Id));
6541 Ent := First_Entity (Id);
6542 while Present (Ent) loop
6543 if Is_Entry (Ent) then
6547 Ent := Next_Entity (Ent);
6553 ----------------------------
6554 -- Has_Foreign_Convention --
6555 ----------------------------
6557 function Has_Foreign_Convention (Id : E) return B is
6559 -- While regular Intrinsics such as the Standard operators fit in the
6560 -- "Ada" convention, those with an Interface_Name materialize GCC
6561 -- builtin imports for which Ada special treatments shouldn't apply.
6563 return Convention (Id) in Foreign_Convention
6564 or else (Convention (Id) = Convention_Intrinsic
6565 and then Present (Interface_Name (Id)));
6566 end Has_Foreign_Convention;
6568 ---------------------------
6569 -- Has_Interrupt_Handler --
6570 ---------------------------
6572 function Has_Interrupt_Handler (Id : E) return B is
6576 pragma Assert (Is_Protected_Type (Id));
6578 Ritem := First_Rep_Item (Id);
6579 while Present (Ritem) loop
6580 if Nkind (Ritem) = N_Pragma
6581 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6585 Next_Rep_Item (Ritem);
6590 end Has_Interrupt_Handler;
6592 -----------------------------
6593 -- Has_Non_Null_Refinement --
6594 -----------------------------
6596 function Has_Non_Null_Refinement (Id : E) return B is
6598 -- "Refinement" is a concept applicable only to abstract states
6600 pragma Assert (Ekind (Id) = E_Abstract_State);
6602 if Has_Visible_Refinement (Id) then
6603 pragma Assert (Present (Refinement_Constituents (Id)));
6605 -- For a refinement to be non-null, the first constituent must be
6606 -- anything other than null.
6609 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) /= N_Null;
6613 end Has_Non_Null_Refinement;
6615 -----------------------------
6616 -- Has_Null_Abstract_State --
6617 -----------------------------
6619 function Has_Null_Abstract_State (Id : E) return B is
6621 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
6624 Present (Abstract_States (Id))
6625 and then Is_Null_State (Node (First_Elmt (Abstract_States (Id))));
6626 end Has_Null_Abstract_State;
6628 -------------------------
6629 -- Has_Null_Refinement --
6630 -------------------------
6632 function Has_Null_Refinement (Id : E) return B is
6634 -- "Refinement" is a concept applicable only to abstract states
6636 pragma Assert (Ekind (Id) = E_Abstract_State);
6638 if Has_Visible_Refinement (Id) then
6639 pragma Assert (Present (Refinement_Constituents (Id)));
6641 -- For a refinement to be null, the state's sole constituent must be
6645 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) = N_Null;
6649 end Has_Null_Refinement;
6651 --------------------
6652 -- Has_Unmodified --
6653 --------------------
6655 function Has_Unmodified (E : Entity_Id) return Boolean is
6657 if Has_Pragma_Unmodified (E) then
6659 elsif Warnings_Off (E) then
6660 Set_Warnings_Off_Used_Unmodified (E);
6667 ---------------------
6668 -- Has_Unreferenced --
6669 ---------------------
6671 function Has_Unreferenced (E : Entity_Id) return Boolean is
6673 if Has_Pragma_Unreferenced (E) then
6675 elsif Warnings_Off (E) then
6676 Set_Warnings_Off_Used_Unreferenced (E);
6681 end Has_Unreferenced;
6683 ----------------------
6684 -- Has_Warnings_Off --
6685 ----------------------
6687 function Has_Warnings_Off (E : Entity_Id) return Boolean is
6689 if Warnings_Off (E) then
6690 Set_Warnings_Off_Used (E);
6695 end Has_Warnings_Off;
6697 ------------------------------
6698 -- Implementation_Base_Type --
6699 ------------------------------
6701 function Implementation_Base_Type (Id : E) return E is
6706 Bastyp := Base_Type (Id);
6708 if Is_Incomplete_Or_Private_Type (Bastyp) then
6709 Imptyp := Underlying_Type (Bastyp);
6711 -- If we have an implementation type, then just return it,
6712 -- otherwise we return the Base_Type anyway. This can only
6713 -- happen in error situations and should avoid some error bombs.
6715 if Present (Imptyp) then
6716 return Base_Type (Imptyp);
6724 end Implementation_Base_Type;
6726 -------------------------
6727 -- Invariant_Procedure --
6728 -------------------------
6730 function Invariant_Procedure (Id : E) return E is
6734 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
6736 if No (Subprograms_For_Type (Id)) then
6740 S := Subprograms_For_Type (Id);
6741 while Present (S) loop
6742 if Is_Invariant_Procedure (S) then
6745 S := Subprograms_For_Type (S);
6751 end Invariant_Procedure;
6757 -- Global flag table allowing rapid computation of this function
6759 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
6760 (E_Enumeration_Subtype |
6762 E_Signed_Integer_Subtype |
6763 E_Modular_Integer_Subtype |
6764 E_Floating_Point_Subtype |
6765 E_Ordinary_Fixed_Point_Subtype |
6766 E_Decimal_Fixed_Point_Subtype |
6771 E_Record_Subtype_With_Private |
6772 E_Limited_Private_Subtype |
6774 E_Protected_Subtype |
6776 E_String_Literal_Subtype |
6777 E_Class_Wide_Subtype => False,
6780 function Is_Base_Type (Id : E) return Boolean is
6782 return Entity_Is_Base_Type (Ekind (Id));
6785 ---------------------
6786 -- Is_Boolean_Type --
6787 ---------------------
6789 function Is_Boolean_Type (Id : E) return B is
6791 return Root_Type (Id) = Standard_Boolean;
6792 end Is_Boolean_Type;
6794 ------------------------
6795 -- Is_Constant_Object --
6796 ------------------------
6798 function Is_Constant_Object (Id : E) return B is
6799 K : constant Entity_Kind := Ekind (Id);
6802 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
6803 end Is_Constant_Object;
6805 --------------------
6806 -- Is_Discriminal --
6807 --------------------
6809 function Is_Discriminal (Id : E) return B is
6811 return (Ekind_In (Id, E_Constant, E_In_Parameter)
6812 and then Present (Discriminal_Link (Id)));
6815 ----------------------
6816 -- Is_Dynamic_Scope --
6817 ----------------------
6819 function Is_Dynamic_Scope (Id : E) return B is
6822 Ekind (Id) = E_Block
6824 Ekind (Id) = E_Function
6826 Ekind (Id) = E_Procedure
6828 Ekind (Id) = E_Subprogram_Body
6830 Ekind (Id) = E_Task_Type
6832 (Ekind (Id) = E_Limited_Private_Type
6833 and then Present (Full_View (Id))
6834 and then Ekind (Full_View (Id)) = E_Task_Type)
6836 Ekind (Id) = E_Entry
6838 Ekind (Id) = E_Entry_Family
6840 Ekind (Id) = E_Return_Statement;
6841 end Is_Dynamic_Scope;
6843 --------------------
6844 -- Is_Entity_Name --
6845 --------------------
6847 function Is_Entity_Name (N : Node_Id) return Boolean is
6848 Kind : constant Node_Kind := Nkind (N);
6851 -- Identifiers, operator symbols, expanded names are entity names
6853 return Kind = N_Identifier
6854 or else Kind = N_Operator_Symbol
6855 or else Kind = N_Expanded_Name
6857 -- Attribute references are entity names if they refer to an entity.
6858 -- Note that we don't do this by testing for the presence of the
6859 -- Entity field in the N_Attribute_Reference node, since it may not
6860 -- have been set yet.
6862 or else (Kind = N_Attribute_Reference
6863 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
6866 -----------------------
6867 -- Is_External_State --
6868 -----------------------
6870 function Is_External_State (Id : E) return B is
6873 Ekind (Id) = E_Abstract_State and then Has_Option (Id, Name_External);
6874 end Is_External_State;
6880 function Is_Finalizer (Id : E) return B is
6882 return Ekind (Id) = E_Procedure and then Chars (Id) = Name_uFinalizer;
6885 ---------------------
6886 -- Is_Ghost_Entity --
6887 ---------------------
6889 -- Note: coding below allows for ghost variables. They are not currently
6890 -- implemented, so we will always get False for variables, but that is
6891 -- expected to change in the future.
6893 function Is_Ghost_Entity (Id : E) return B is
6895 if Present (Id) and then Ekind (Id) = E_Variable then
6896 return Convention (Id) = Convention_Ghost;
6898 return Is_Ghost_Subprogram (Id);
6900 end Is_Ghost_Entity;
6902 -------------------------
6903 -- Is_Ghost_Subprogram --
6904 -------------------------
6906 function Is_Ghost_Subprogram (Id : E) return B is
6908 if Present (Id) and then Ekind_In (Id, E_Function, E_Procedure) then
6909 return Convention (Id) = Convention_Ghost;
6913 end Is_Ghost_Subprogram;
6919 function Is_Null_State (Id : E) return B is
6922 Ekind (Id) = E_Abstract_State and then Nkind (Parent (Id)) = N_Null;
6925 -----------------------------------
6926 -- Is_Package_Or_Generic_Package --
6927 -----------------------------------
6929 function Is_Package_Or_Generic_Package (Id : E) return B is
6931 return Ekind_In (Id, E_Generic_Package, E_Package);
6932 end Is_Package_Or_Generic_Package;
6938 function Is_Prival (Id : E) return B is
6940 return (Ekind_In (Id, E_Constant, E_Variable)
6941 and then Present (Prival_Link (Id)));
6944 ----------------------------
6945 -- Is_Protected_Component --
6946 ----------------------------
6948 function Is_Protected_Component (Id : E) return B is
6950 return Ekind (Id) = E_Component and then Is_Protected_Type (Scope (Id));
6951 end Is_Protected_Component;
6953 ----------------------------
6954 -- Is_Protected_Interface --
6955 ----------------------------
6957 function Is_Protected_Interface (Id : E) return B is
6958 Typ : constant Entity_Id := Base_Type (Id);
6960 if not Is_Interface (Typ) then
6962 elsif Is_Class_Wide_Type (Typ) then
6963 return Is_Protected_Interface (Etype (Typ));
6965 return Protected_Present (Type_Definition (Parent (Typ)));
6967 end Is_Protected_Interface;
6969 ------------------------------
6970 -- Is_Protected_Record_Type --
6971 ------------------------------
6973 function Is_Protected_Record_Type (Id : E) return B is
6976 Is_Concurrent_Record_Type (Id)
6977 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
6978 end Is_Protected_Record_Type;
6980 --------------------------------
6981 -- Is_Standard_Character_Type --
6982 --------------------------------
6984 function Is_Standard_Character_Type (Id : E) return B is
6986 if Is_Type (Id) then
6988 R : constant Entity_Id := Root_Type (Id);
6991 R = Standard_Character
6993 R = Standard_Wide_Character
6995 R = Standard_Wide_Wide_Character;
7001 end Is_Standard_Character_Type;
7003 --------------------
7004 -- Is_String_Type --
7005 --------------------
7007 function Is_String_Type (Id : E) return B is
7009 return Ekind (Id) in String_Kind
7010 or else (Is_Array_Type (Id)
7011 and then Id /= Any_Composite
7012 and then Number_Dimensions (Id) = 1
7013 and then Is_Character_Type (Component_Type (Id)));
7016 -------------------------------
7017 -- Is_Synchronized_Interface --
7018 -------------------------------
7020 function Is_Synchronized_Interface (Id : E) return B is
7021 Typ : constant Entity_Id := Base_Type (Id);
7024 if not Is_Interface (Typ) then
7027 elsif Is_Class_Wide_Type (Typ) then
7028 return Is_Synchronized_Interface (Etype (Typ));
7031 return Protected_Present (Type_Definition (Parent (Typ)))
7032 or else Synchronized_Present (Type_Definition (Parent (Typ)))
7033 or else Task_Present (Type_Definition (Parent (Typ)));
7035 end Is_Synchronized_Interface;
7037 -----------------------
7038 -- Is_Task_Interface --
7039 -----------------------
7041 function Is_Task_Interface (Id : E) return B is
7042 Typ : constant Entity_Id := Base_Type (Id);
7044 if not Is_Interface (Typ) then
7046 elsif Is_Class_Wide_Type (Typ) then
7047 return Is_Task_Interface (Etype (Typ));
7049 return Task_Present (Type_Definition (Parent (Typ)));
7051 end Is_Task_Interface;
7053 -------------------------
7054 -- Is_Task_Record_Type --
7055 -------------------------
7057 function Is_Task_Record_Type (Id : E) return B is
7060 Is_Concurrent_Record_Type (Id)
7061 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
7062 end Is_Task_Record_Type;
7064 ------------------------
7065 -- Is_Wrapper_Package --
7066 ------------------------
7068 function Is_Wrapper_Package (Id : E) return B is
7070 return (Ekind (Id) = E_Package and then Present (Related_Instance (Id)));
7071 end Is_Wrapper_Package;
7077 function Last_Formal (Id : E) return E is
7082 (Is_Overloadable (Id)
7083 or else Ekind_In (Id, E_Entry_Family,
7085 E_Subprogram_Type));
7087 if Ekind (Id) = E_Enumeration_Literal then
7091 Formal := First_Formal (Id);
7093 if Present (Formal) then
7094 while Present (Next_Formal (Formal)) loop
7095 Formal := Next_Formal (Formal);
7103 function Model_Emin_Value (Id : E) return Uint is
7105 return Machine_Emin_Value (Id);
7106 end Model_Emin_Value;
7108 -------------------------
7109 -- Model_Epsilon_Value --
7110 -------------------------
7112 function Model_Epsilon_Value (Id : E) return Ureal is
7113 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7115 return Radix ** (1 - Model_Mantissa_Value (Id));
7116 end Model_Epsilon_Value;
7118 --------------------------
7119 -- Model_Mantissa_Value --
7120 --------------------------
7122 function Model_Mantissa_Value (Id : E) return Uint is
7124 return Machine_Mantissa_Value (Id);
7125 end Model_Mantissa_Value;
7127 -----------------------
7128 -- Model_Small_Value --
7129 -----------------------
7131 function Model_Small_Value (Id : E) return Ureal is
7132 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7134 return Radix ** (Model_Emin_Value (Id) - 1);
7135 end Model_Small_Value;
7137 ------------------------
7138 -- Machine_Emax_Value --
7139 ------------------------
7141 function Machine_Emax_Value (Id : E) return Uint is
7142 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7145 case Float_Rep (Id) is
7148 when 1 .. 6 => return Uint_128;
7149 when 7 .. 15 => return 2**10;
7150 when 16 .. 33 => return 2**14;
7151 when others => return No_Uint;
7156 when 1 .. 9 => return 2**7 - 1;
7157 when 10 .. 15 => return 2**10 - 1;
7158 when others => return No_Uint;
7162 return Uint_2 ** Uint_7 - Uint_1;
7164 end Machine_Emax_Value;
7166 ------------------------
7167 -- Machine_Emin_Value --
7168 ------------------------
7170 function Machine_Emin_Value (Id : E) return Uint is
7172 case Float_Rep (Id) is
7173 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
7174 when VAX_Native => return -Machine_Emax_Value (Id);
7175 when AAMP => return -Machine_Emax_Value (Id);
7177 end Machine_Emin_Value;
7179 ----------------------------
7180 -- Machine_Mantissa_Value --
7181 ----------------------------
7183 function Machine_Mantissa_Value (Id : E) return Uint is
7184 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7187 case Float_Rep (Id) is
7190 when 1 .. 6 => return Uint_24;
7191 when 7 .. 15 => return UI_From_Int (53);
7192 when 16 .. 18 => return Uint_64;
7193 when 19 .. 33 => return UI_From_Int (113);
7194 when others => return No_Uint;
7199 when 1 .. 6 => return Uint_24;
7200 when 7 .. 9 => return UI_From_Int (56);
7201 when 10 .. 15 => return UI_From_Int (53);
7202 when others => return No_Uint;
7207 when 1 .. 6 => return Uint_24;
7208 when 7 .. 9 => return UI_From_Int (40);
7209 when others => return No_Uint;
7212 end Machine_Mantissa_Value;
7214 -------------------------
7215 -- Machine_Radix_Value --
7216 -------------------------
7218 function Machine_Radix_Value (Id : E) return U is
7220 case Float_Rep (Id) is
7221 when IEEE_Binary | VAX_Native | AAMP =>
7224 end Machine_Radix_Value;
7226 --------------------
7227 -- Next_Component --
7228 --------------------
7230 function Next_Component (Id : E) return E is
7234 Comp_Id := Next_Entity (Id);
7235 while Present (Comp_Id) loop
7236 exit when Ekind (Comp_Id) = E_Component;
7237 Comp_Id := Next_Entity (Comp_Id);
7243 ------------------------------------
7244 -- Next_Component_Or_Discriminant --
7245 ------------------------------------
7247 function Next_Component_Or_Discriminant (Id : E) return E is
7251 Comp_Id := Next_Entity (Id);
7252 while Present (Comp_Id) loop
7253 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
7254 Comp_Id := Next_Entity (Comp_Id);
7258 end Next_Component_Or_Discriminant;
7260 -----------------------
7261 -- Next_Discriminant --
7262 -----------------------
7264 -- This function actually implements both Next_Discriminant and
7265 -- Next_Stored_Discriminant by making sure that the Discriminant
7266 -- returned is of the same variety as Id.
7268 function Next_Discriminant (Id : E) return E is
7270 -- Derived Tagged types with private extensions look like this...
7272 -- E_Discriminant d1
7273 -- E_Discriminant d2
7275 -- E_Discriminant d1
7276 -- E_Discriminant d2
7279 -- so it is critical not to go past the leading discriminants
7284 pragma Assert (Ekind (Id) = E_Discriminant);
7287 D := Next_Entity (D);
7289 or else (Ekind (D) /= E_Discriminant
7290 and then not Is_Itype (D))
7295 exit when Ekind (D) = E_Discriminant
7296 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
7300 end Next_Discriminant;
7306 function Next_Formal (Id : E) return E is
7310 -- Follow the chain of declared entities as long as the kind of the
7311 -- entity corresponds to a formal parameter. Skip internal entities
7312 -- that may have been created for implicit subtypes, in the process
7313 -- of analyzing default expressions.
7317 P := Next_Entity (P);
7319 if No (P) or else Is_Formal (P) then
7321 elsif not Is_Internal (P) then
7327 -----------------------------
7328 -- Next_Formal_With_Extras --
7329 -----------------------------
7331 function Next_Formal_With_Extras (Id : E) return E is
7333 if Present (Extra_Formal (Id)) then
7334 return Extra_Formal (Id);
7336 return Next_Formal (Id);
7338 end Next_Formal_With_Extras;
7344 function Next_Index (Id : Node_Id) return Node_Id is
7353 function Next_Literal (Id : E) return E is
7355 pragma Assert (Nkind (Id) in N_Entity);
7359 ------------------------------
7360 -- Next_Stored_Discriminant --
7361 ------------------------------
7363 function Next_Stored_Discriminant (Id : E) return E is
7365 -- See comment in Next_Discriminant
7367 return Next_Discriminant (Id);
7368 end Next_Stored_Discriminant;
7370 -----------------------
7371 -- Number_Dimensions --
7372 -----------------------
7374 function Number_Dimensions (Id : E) return Pos is
7379 if Ekind (Id) in String_Kind then
7384 T := First_Index (Id);
7385 while Present (T) loop
7392 end Number_Dimensions;
7394 --------------------
7395 -- Number_Entries --
7396 --------------------
7398 function Number_Entries (Id : E) return Nat is
7403 pragma Assert (Is_Concurrent_Type (Id));
7406 Ent := First_Entity (Id);
7407 while Present (Ent) loop
7408 if Is_Entry (Ent) then
7412 Ent := Next_Entity (Ent);
7418 --------------------
7419 -- Number_Formals --
7420 --------------------
7422 function Number_Formals (Id : E) return Pos is
7428 Formal := First_Formal (Id);
7429 while Present (Formal) loop
7431 Formal := Next_Formal (Formal);
7437 --------------------
7438 -- Parameter_Mode --
7439 --------------------
7441 function Parameter_Mode (Id : E) return Formal_Kind is
7446 ------------------------
7447 -- Predicate_Function --
7448 ------------------------
7450 function Predicate_Function (Id : E) return E is
7455 pragma Assert (Is_Type (Id));
7457 -- If type is private and has a completion, predicate may be defined
7458 -- on the full view.
7460 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7461 T := Full_View (Id);
7466 if No (Subprograms_For_Type (T)) then
7470 S := Subprograms_For_Type (T);
7471 while Present (S) loop
7472 if Is_Predicate_Function (S) then
7475 S := Subprograms_For_Type (S);
7481 end Predicate_Function;
7483 --------------------------
7484 -- Predicate_Function_M --
7485 --------------------------
7487 function Predicate_Function_M (Id : E) return E is
7492 pragma Assert (Is_Type (Id));
7494 -- If type is private and has a completion, predicate may be defined
7495 -- on the full view.
7497 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7498 T := Full_View (Id);
7503 if No (Subprograms_For_Type (T)) then
7507 S := Subprograms_For_Type (T);
7508 while Present (S) loop
7509 if Is_Predicate_Function_M (S) then
7512 S := Subprograms_For_Type (S);
7518 end Predicate_Function_M;
7520 -------------------------
7521 -- Present_In_Rep_Item --
7522 -------------------------
7524 function Present_In_Rep_Item (E : Entity_Id; N : Node_Id) return Boolean is
7528 Ritem := First_Rep_Item (E);
7530 while Present (Ritem) loop
7535 Next_Rep_Item (Ritem);
7539 end Present_In_Rep_Item;
7541 --------------------------
7542 -- Primitive_Operations --
7543 --------------------------
7545 function Primitive_Operations (Id : E) return L is
7547 if Is_Concurrent_Type (Id) then
7548 if Present (Corresponding_Record_Type (Id)) then
7549 return Direct_Primitive_Operations
7550 (Corresponding_Record_Type (Id));
7552 -- If expansion is disabled the corresponding record type is absent,
7553 -- but if the type has ancestors it may have primitive operations.
7555 elsif Is_Tagged_Type (Id) then
7556 return Direct_Primitive_Operations (Id);
7562 return Direct_Primitive_Operations (Id);
7564 end Primitive_Operations;
7566 ---------------------
7567 -- Record_Rep_Item --
7568 ---------------------
7570 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
7572 Set_Next_Rep_Item (N, First_Rep_Item (E));
7573 Set_First_Rep_Item (E, N);
7574 end Record_Rep_Item;
7580 function Root_Type (Id : E) return E is
7584 pragma Assert (Nkind (Id) in N_Entity);
7586 T := Base_Type (Id);
7588 if Ekind (T) = E_Class_Wide_Type then
7600 -- Following test catches some error cases resulting from
7603 elsif No (Etyp) then
7604 Check_Error_Detected;
7607 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
7610 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
7616 -- Return if there is a circularity in the inheritance chain. This
7617 -- happens in some error situations and we do not want to get
7618 -- stuck in this loop.
7620 if T = Base_Type (Id) then
7627 ---------------------
7628 -- Safe_Emax_Value --
7629 ---------------------
7631 function Safe_Emax_Value (Id : E) return Uint is
7633 return Machine_Emax_Value (Id);
7634 end Safe_Emax_Value;
7636 ----------------------
7637 -- Safe_First_Value --
7638 ----------------------
7640 function Safe_First_Value (Id : E) return Ureal is
7642 return -Safe_Last_Value (Id);
7643 end Safe_First_Value;
7645 ---------------------
7646 -- Safe_Last_Value --
7647 ---------------------
7649 function Safe_Last_Value (Id : E) return Ureal is
7650 Radix : constant Uint := Machine_Radix_Value (Id);
7651 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
7652 Emax : constant Uint := Safe_Emax_Value (Id);
7653 Significand : constant Uint := Radix ** Mantissa - 1;
7654 Exponent : constant Uint := Emax - Mantissa;
7660 (Num => Significand * 2 ** (Exponent mod 4),
7661 Den => -Exponent / 4,
7667 (Num => Significand,
7671 end Safe_Last_Value;
7677 function Scope_Depth (Id : E) return Uint is
7682 while Is_Record_Type (Scop) loop
7683 Scop := Scope (Scop);
7686 return Scope_Depth_Value (Scop);
7689 ---------------------
7690 -- Scope_Depth_Set --
7691 ---------------------
7693 function Scope_Depth_Set (Id : E) return B is
7695 return not Is_Record_Type (Id)
7696 and then Field22 (Id) /= Union_Id (Empty);
7697 end Scope_Depth_Set;
7699 -----------------------------
7700 -- Set_Component_Alignment --
7701 -----------------------------
7703 -- Component Alignment is encoded using two flags, Flag128/129 as
7704 -- follows. Note that both flags False = Align_Default, so that the
7705 -- default initialization of flags to False initializes component
7706 -- alignment to the default value as required.
7708 -- Flag128 Flag129 Value
7709 -- ------- ------- -----
7710 -- False False Calign_Default
7711 -- False True Calign_Component_Size
7712 -- True False Calign_Component_Size_4
7713 -- True True Calign_Storage_Unit
7715 procedure Set_Component_Alignment (Id : E; V : C) is
7717 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
7718 and then Is_Base_Type (Id));
7721 when Calign_Default =>
7722 Set_Flag128 (Id, False);
7723 Set_Flag129 (Id, False);
7725 when Calign_Component_Size =>
7726 Set_Flag128 (Id, False);
7727 Set_Flag129 (Id, True);
7729 when Calign_Component_Size_4 =>
7730 Set_Flag128 (Id, True);
7731 Set_Flag129 (Id, False);
7733 when Calign_Storage_Unit =>
7734 Set_Flag128 (Id, True);
7735 Set_Flag129 (Id, True);
7737 end Set_Component_Alignment;
7739 -----------------------------
7740 -- Set_Invariant_Procedure --
7741 -----------------------------
7743 procedure Set_Invariant_Procedure (Id : E; V : E) is
7747 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7749 S := Subprograms_For_Type (Id);
7750 Set_Subprograms_For_Type (Id, V);
7751 Set_Subprograms_For_Type (V, S);
7753 -- Check for duplicate entry
7755 while Present (S) loop
7756 if Is_Invariant_Procedure (S) then
7757 raise Program_Error;
7759 S := Subprograms_For_Type (S);
7762 end Set_Invariant_Procedure;
7764 ----------------------------
7765 -- Set_Predicate_Function --
7766 ----------------------------
7768 procedure Set_Predicate_Function (Id : E; V : E) is
7772 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7774 S := Subprograms_For_Type (Id);
7775 Set_Subprograms_For_Type (Id, V);
7776 Set_Subprograms_For_Type (V, S);
7778 while Present (S) loop
7779 if Is_Predicate_Function (S) then
7780 raise Program_Error;
7782 S := Subprograms_For_Type (S);
7785 end Set_Predicate_Function;
7787 ------------------------------
7788 -- Set_Predicate_Function_M --
7789 ------------------------------
7791 procedure Set_Predicate_Function_M (Id : E; V : E) is
7795 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7797 S := Subprograms_For_Type (Id);
7798 Set_Subprograms_For_Type (Id, V);
7799 Set_Subprograms_For_Type (V, S);
7801 -- Check for duplicates
7803 while Present (S) loop
7804 if Is_Predicate_Function_M (S) then
7805 raise Program_Error;
7807 S := Subprograms_For_Type (S);
7810 end Set_Predicate_Function_M;
7816 function Size_Clause (Id : E) return N is
7818 return Get_Attribute_Definition_Clause (Id, Attribute_Size);
7821 ------------------------
7822 -- Stream_Size_Clause --
7823 ------------------------
7825 function Stream_Size_Clause (Id : E) return N is
7827 return Get_Attribute_Definition_Clause (Id, Attribute_Stream_Size);
7828 end Stream_Size_Clause;
7834 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
7840 Kind := E_Access_Subtype;
7844 Kind := E_Array_Subtype;
7846 when E_Class_Wide_Type |
7847 E_Class_Wide_Subtype =>
7848 Kind := E_Class_Wide_Subtype;
7850 when E_Decimal_Fixed_Point_Type |
7851 E_Decimal_Fixed_Point_Subtype =>
7852 Kind := E_Decimal_Fixed_Point_Subtype;
7854 when E_Ordinary_Fixed_Point_Type |
7855 E_Ordinary_Fixed_Point_Subtype =>
7856 Kind := E_Ordinary_Fixed_Point_Subtype;
7858 when E_Private_Type |
7859 E_Private_Subtype =>
7860 Kind := E_Private_Subtype;
7862 when E_Limited_Private_Type |
7863 E_Limited_Private_Subtype =>
7864 Kind := E_Limited_Private_Subtype;
7866 when E_Record_Type_With_Private |
7867 E_Record_Subtype_With_Private =>
7868 Kind := E_Record_Subtype_With_Private;
7870 when E_Record_Type |
7872 Kind := E_Record_Subtype;
7874 when E_String_Type |
7876 Kind := E_String_Subtype;
7878 when Enumeration_Kind =>
7879 Kind := E_Enumeration_Subtype;
7882 Kind := E_Floating_Point_Subtype;
7884 when Signed_Integer_Kind =>
7885 Kind := E_Signed_Integer_Subtype;
7887 when Modular_Integer_Kind =>
7888 Kind := E_Modular_Integer_Subtype;
7890 when Protected_Kind =>
7891 Kind := E_Protected_Subtype;
7894 Kind := E_Task_Subtype;
7898 raise Program_Error;
7904 ---------------------
7905 -- Type_High_Bound --
7906 ---------------------
7908 function Type_High_Bound (Id : E) return Node_Id is
7909 Rng : constant Node_Id := Scalar_Range (Id);
7911 if Nkind (Rng) = N_Subtype_Indication then
7912 return High_Bound (Range_Expression (Constraint (Rng)));
7914 return High_Bound (Rng);
7916 end Type_High_Bound;
7918 --------------------
7919 -- Type_Low_Bound --
7920 --------------------
7922 function Type_Low_Bound (Id : E) return Node_Id is
7923 Rng : constant Node_Id := Scalar_Range (Id);
7925 if Nkind (Rng) = N_Subtype_Indication then
7926 return Low_Bound (Range_Expression (Constraint (Rng)));
7928 return Low_Bound (Rng);
7932 ---------------------
7933 -- Underlying_Type --
7934 ---------------------
7936 function Underlying_Type (Id : E) return E is
7938 -- For record_with_private the underlying type is always the direct
7939 -- full view. Never try to take the full view of the parent it
7940 -- doesn't make sense.
7942 if Ekind (Id) = E_Record_Type_With_Private then
7943 return Full_View (Id);
7945 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
7947 -- If we have an incomplete or private type with a full view,
7948 -- then we return the Underlying_Type of this full view
7950 if Present (Full_View (Id)) then
7951 if Id = Full_View (Id) then
7953 -- Previous error in declaration
7958 return Underlying_Type (Full_View (Id));
7961 -- If we have an incomplete entity that comes from the limited
7962 -- view then we return the Underlying_Type of its non-limited
7965 elsif From_Limited_With (Id)
7966 and then Present (Non_Limited_View (Id))
7968 return Underlying_Type (Non_Limited_View (Id));
7970 -- Otherwise check for the case where we have a derived type or
7971 -- subtype, and if so get the Underlying_Type of the parent type.
7973 elsif Etype (Id) /= Id then
7974 return Underlying_Type (Etype (Id));
7976 -- Otherwise we have an incomplete or private type that has
7977 -- no full view, which means that we have not encountered the
7978 -- completion, so return Empty to indicate the underlying type
7979 -- is not yet known.
7985 -- For non-incomplete, non-private types, return the type itself
7986 -- Also for entities that are not types at all return the entity
7992 end Underlying_Type;
7998 function Vax_Float (Id : E) return B is
8000 return Is_Floating_Point_Type (Id) and then Float_Rep (Id) = VAX_Native;
8003 ------------------------
8004 -- Write_Entity_Flags --
8005 ------------------------
8007 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
8009 procedure W (Flag_Name : String; Flag : Boolean);
8010 -- Write out given flag if it is set
8016 procedure W (Flag_Name : String; Flag : Boolean) is
8020 Write_Str (Flag_Name);
8021 Write_Str (" = True");
8026 -- Start of processing for Write_Entity_Flags
8029 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
8030 and then Is_Base_Type (Id)
8033 Write_Str ("Component_Alignment = ");
8035 case Component_Alignment (Id) is
8036 when Calign_Default =>
8037 Write_Str ("Calign_Default");
8039 when Calign_Component_Size =>
8040 Write_Str ("Calign_Component_Size");
8042 when Calign_Component_Size_4 =>
8043 Write_Str ("Calign_Component_Size_4");
8045 when Calign_Storage_Unit =>
8046 Write_Str ("Calign_Storage_Unit");
8052 W ("Address_Taken", Flag104 (Id));
8053 W ("Body_Needed_For_SAL", Flag40 (Id));
8054 W ("C_Pass_By_Copy", Flag125 (Id));
8055 W ("Can_Never_Be_Null", Flag38 (Id));
8056 W ("Checks_May_Be_Suppressed", Flag31 (Id));
8057 W ("Debug_Info_Off", Flag166 (Id));
8058 W ("Default_Expressions_Processed", Flag108 (Id));
8059 W ("Delay_Cleanups", Flag114 (Id));
8060 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
8061 W ("Depends_On_Private", Flag14 (Id));
8062 W ("Discard_Names", Flag88 (Id));
8063 W ("Elaboration_Entity_Required", Flag174 (Id));
8064 W ("Elaborate_Body_Desirable", Flag210 (Id));
8065 W ("Entry_Accepted", Flag152 (Id));
8066 W ("Can_Use_Internal_Rep", Flag229 (Id));
8067 W ("Finalize_Storage_Only", Flag158 (Id));
8068 W ("From_Limited_With", Flag159 (Id));
8069 W ("Has_Aliased_Components", Flag135 (Id));
8070 W ("Has_Alignment_Clause", Flag46 (Id));
8071 W ("Has_All_Calls_Remote", Flag79 (Id));
8072 W ("Has_Anonymous_Master", Flag253 (Id));
8073 W ("Has_Atomic_Components", Flag86 (Id));
8074 W ("Has_Biased_Representation", Flag139 (Id));
8075 W ("Has_Body_References", Flag264 (Id));
8076 W ("Has_Completion", Flag26 (Id));
8077 W ("Has_Completion_In_Body", Flag71 (Id));
8078 W ("Has_Complex_Representation", Flag140 (Id));
8079 W ("Has_Component_Size_Clause", Flag68 (Id));
8080 W ("Has_Contiguous_Rep", Flag181 (Id));
8081 W ("Has_Controlled_Component", Flag43 (Id));
8082 W ("Has_Controlling_Result", Flag98 (Id));
8083 W ("Has_Convention_Pragma", Flag119 (Id));
8084 W ("Has_Default_Aspect", Flag39 (Id));
8085 W ("Has_Delayed_Aspects", Flag200 (Id));
8086 W ("Has_Delayed_Freeze", Flag18 (Id));
8087 W ("Has_Delayed_Rep_Aspects", Flag261 (Id));
8088 W ("Has_Discriminants", Flag5 (Id));
8089 W ("Has_Dispatch_Table", Flag220 (Id));
8090 W ("Has_Dynamic_Predicate_Aspect", Flag258 (Id));
8091 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
8092 W ("Has_Exit", Flag47 (Id));
8093 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
8094 W ("Has_Forward_Instantiation", Flag175 (Id));
8095 W ("Has_Fully_Qualified_Name", Flag173 (Id));
8096 W ("Has_Gigi_Rep_Item", Flag82 (Id));
8097 W ("Has_Homonym", Flag56 (Id));
8098 W ("Has_Implicit_Dereference", Flag251 (Id));
8099 W ("Has_Inheritable_Invariants", Flag248 (Id));
8100 W ("Has_Initial_Value", Flag219 (Id));
8101 W ("Has_Invariants", Flag232 (Id));
8102 W ("Has_Loop_Entry_Attributes", Flag260 (Id));
8103 W ("Has_Machine_Radix_Clause", Flag83 (Id));
8104 W ("Has_Master_Entity", Flag21 (Id));
8105 W ("Has_Missing_Return", Flag142 (Id));
8106 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
8107 W ("Has_Non_Standard_Rep", Flag75 (Id));
8108 W ("Has_Object_Size_Clause", Flag172 (Id));
8109 W ("Has_Per_Object_Constraint", Flag154 (Id));
8110 W ("Has_Postconditions", Flag240 (Id));
8111 W ("Has_Pragma_Controlled", Flag27 (Id));
8112 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
8113 W ("Has_Pragma_Inline", Flag157 (Id));
8114 W ("Has_Pragma_Inline_Always", Flag230 (Id));
8115 W ("Has_Pragma_No_Inline", Flag201 (Id));
8116 W ("Has_Pragma_Ordered", Flag198 (Id));
8117 W ("Has_Pragma_Pack", Flag121 (Id));
8118 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
8119 W ("Has_Pragma_Pure", Flag203 (Id));
8120 W ("Has_Pragma_Pure_Function", Flag179 (Id));
8121 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
8122 W ("Has_Pragma_Unmodified", Flag233 (Id));
8123 W ("Has_Pragma_Unreferenced", Flag180 (Id));
8124 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
8125 W ("Has_Predicates", Flag250 (Id));
8126 W ("Has_Primitive_Operations", Flag120 (Id));
8127 W ("Has_Private_Ancestor", Flag151 (Id));
8128 W ("Has_Private_Declaration", Flag155 (Id));
8129 W ("Has_Qualified_Name", Flag161 (Id));
8130 W ("Has_RACW", Flag214 (Id));
8131 W ("Has_Record_Rep_Clause", Flag65 (Id));
8132 W ("Has_Recursive_Call", Flag143 (Id));
8133 W ("Has_Size_Clause", Flag29 (Id));
8134 W ("Has_Small_Clause", Flag67 (Id));
8135 W ("Has_Specified_Layout", Flag100 (Id));
8136 W ("Has_Specified_Stream_Input", Flag190 (Id));
8137 W ("Has_Specified_Stream_Output", Flag191 (Id));
8138 W ("Has_Specified_Stream_Read", Flag192 (Id));
8139 W ("Has_Specified_Stream_Write", Flag193 (Id));
8140 W ("Has_Static_Discriminants", Flag211 (Id));
8141 W ("Has_Static_Predicate_Aspect", Flag259 (Id));
8142 W ("Has_Storage_Size_Clause", Flag23 (Id));
8143 W ("Has_Stream_Size_Clause", Flag184 (Id));
8144 W ("Has_Task", Flag30 (Id));
8145 W ("Has_Thunks", Flag228 (Id));
8146 W ("Has_Unchecked_Union", Flag123 (Id));
8147 W ("Has_Unknown_Discriminants", Flag72 (Id));
8148 W ("Has_Up_Level_Access", Flag215 (Id));
8149 W ("Has_Visible_Refinement", Flag263 (Id));
8150 W ("Has_Volatile_Components", Flag87 (Id));
8151 W ("Has_Xref_Entry", Flag182 (Id));
8152 W ("In_Package_Body", Flag48 (Id));
8153 W ("In_Private_Part", Flag45 (Id));
8154 W ("In_Use", Flag8 (Id));
8155 W ("Is_AST_Entry", Flag132 (Id));
8156 W ("Is_Abstract_Subprogram", Flag19 (Id));
8157 W ("Is_Abstract_Type", Flag146 (Id));
8158 W ("Is_Local_Anonymous_Access", Flag194 (Id));
8159 W ("Is_Access_Constant", Flag69 (Id));
8160 W ("Is_Ada_2005_Only", Flag185 (Id));
8161 W ("Is_Ada_2012_Only", Flag199 (Id));
8162 W ("Is_Aliased", Flag15 (Id));
8163 W ("Is_Asynchronous", Flag81 (Id));
8164 W ("Is_Atomic", Flag85 (Id));
8165 W ("Is_Bit_Packed_Array", Flag122 (Id));
8166 W ("Is_CPP_Class", Flag74 (Id));
8167 W ("Is_Called", Flag102 (Id));
8168 W ("Is_Character_Type", Flag63 (Id));
8169 W ("Is_Child_Unit", Flag73 (Id));
8170 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
8171 W ("Is_Compilation_Unit", Flag149 (Id));
8172 W ("Is_Completely_Hidden", Flag103 (Id));
8173 W ("Is_Concurrent_Record_Type", Flag20 (Id));
8174 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
8175 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
8176 W ("Is_Constrained", Flag12 (Id));
8177 W ("Is_Constructor", Flag76 (Id));
8178 W ("Is_Controlled", Flag42 (Id));
8179 W ("Is_Controlling_Formal", Flag97 (Id));
8180 W ("Is_Descendent_Of_Address", Flag223 (Id));
8181 W ("Is_Discrim_SO_Function", Flag176 (Id));
8182 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
8183 W ("Is_Dispatching_Operation", Flag6 (Id));
8184 W ("Is_Eliminated", Flag124 (Id));
8185 W ("Is_Entry_Formal", Flag52 (Id));
8186 W ("Is_Exported", Flag99 (Id));
8187 W ("Is_First_Subtype", Flag70 (Id));
8188 W ("Is_For_Access_Subtype", Flag118 (Id));
8189 W ("Is_Formal_Subprogram", Flag111 (Id));
8190 W ("Is_Frozen", Flag4 (Id));
8191 W ("Is_Generic_Actual_Type", Flag94 (Id));
8192 W ("Is_Generic_Instance", Flag130 (Id));
8193 W ("Is_Generic_Type", Flag13 (Id));
8194 W ("Is_Hidden", Flag57 (Id));
8195 W ("Is_Hidden_Open_Scope", Flag171 (Id));
8196 W ("Is_Immediately_Visible", Flag7 (Id));
8197 W ("Is_Implementation_Defined", Flag254 (Id));
8198 W ("Is_Imported", Flag24 (Id));
8199 W ("Is_Inlined", Flag11 (Id));
8200 W ("Is_Instantiated", Flag126 (Id));
8201 W ("Is_Interface", Flag186 (Id));
8202 W ("Is_Internal", Flag17 (Id));
8203 W ("Is_Interrupt_Handler", Flag89 (Id));
8204 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
8205 W ("Is_Invariant_Procedure", Flag257 (Id));
8206 W ("Is_Itype", Flag91 (Id));
8207 W ("Is_Known_Non_Null", Flag37 (Id));
8208 W ("Is_Known_Null", Flag204 (Id));
8209 W ("Is_Known_Valid", Flag170 (Id));
8210 W ("Is_Limited_Composite", Flag106 (Id));
8211 W ("Is_Limited_Interface", Flag197 (Id));
8212 W ("Is_Limited_Record", Flag25 (Id));
8213 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
8214 W ("Is_Non_Static_Subtype", Flag109 (Id));
8215 W ("Is_Null_Init_Proc", Flag178 (Id));
8216 W ("Is_Obsolescent", Flag153 (Id));
8217 W ("Is_Only_Out_Parameter", Flag226 (Id));
8218 W ("Is_Optional_Parameter", Flag134 (Id));
8219 W ("Is_Package_Body_Entity", Flag160 (Id));
8220 W ("Is_Packed", Flag51 (Id));
8221 W ("Is_Packed_Array_Type", Flag138 (Id));
8222 W ("Is_Potentially_Use_Visible", Flag9 (Id));
8223 W ("Is_Predicate_Function", Flag255 (Id));
8224 W ("Is_Predicate_Function_M", Flag256 (Id));
8225 W ("Is_Preelaborated", Flag59 (Id));
8226 W ("Is_Primitive", Flag218 (Id));
8227 W ("Is_Primitive_Wrapper", Flag195 (Id));
8228 W ("Is_Private_Composite", Flag107 (Id));
8229 W ("Is_Private_Descendant", Flag53 (Id));
8230 W ("Is_Private_Primitive", Flag245 (Id));
8231 W ("Is_Processed_Transient", Flag252 (Id));
8232 W ("Is_Public", Flag10 (Id));
8233 W ("Is_Pure", Flag44 (Id));
8234 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
8235 W ("Is_RACW_Stub_Type", Flag244 (Id));
8236 W ("Is_Raised", Flag224 (Id));
8237 W ("Is_Remote_Call_Interface", Flag62 (Id));
8238 W ("Is_Remote_Types", Flag61 (Id));
8239 W ("Is_Renaming_Of_Object", Flag112 (Id));
8240 W ("Is_Return_Object", Flag209 (Id));
8241 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
8242 W ("Is_Shared_Passive", Flag60 (Id));
8243 W ("Is_Statically_Allocated", Flag28 (Id));
8244 W ("Is_Tag", Flag78 (Id));
8245 W ("Is_Tagged_Type", Flag55 (Id));
8246 W ("Is_Thunk", Flag225 (Id));
8247 W ("Is_Trivial_Subprogram", Flag235 (Id));
8248 W ("Is_True_Constant", Flag163 (Id));
8249 W ("Is_Unchecked_Union", Flag117 (Id));
8250 W ("Is_Underlying_Record_View", Flag246 (Id));
8251 W ("Is_Unsigned_Type", Flag144 (Id));
8252 W ("Is_VMS_Exception", Flag133 (Id));
8253 W ("Is_Valued_Procedure", Flag127 (Id));
8254 W ("Is_Visible_Formal", Flag206 (Id));
8255 W ("Is_Visible_Lib_Unit", Flag116 (Id));
8256 W ("Is_Volatile", Flag16 (Id));
8257 W ("Itype_Printed", Flag202 (Id));
8258 W ("Kill_Elaboration_Checks", Flag32 (Id));
8259 W ("Kill_Range_Checks", Flag33 (Id));
8260 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
8261 W ("Low_Bound_Tested", Flag205 (Id));
8262 W ("Machine_Radix_10", Flag84 (Id));
8263 W ("Materialize_Entity", Flag168 (Id));
8264 W ("May_Inherit_Delayed_Rep_Aspects", Flag262 (Id));
8265 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
8266 W ("Must_Have_Preelab_Init", Flag208 (Id));
8267 W ("Needs_Debug_Info", Flag147 (Id));
8268 W ("Needs_No_Actuals", Flag22 (Id));
8269 W ("Never_Set_In_Source", Flag115 (Id));
8270 W ("No_Pool_Assigned", Flag131 (Id));
8271 W ("No_Return", Flag113 (Id));
8272 W ("No_Strict_Aliasing", Flag136 (Id));
8273 W ("Non_Binary_Modulus", Flag58 (Id));
8274 W ("Nonzero_Is_True", Flag162 (Id));
8275 W ("OK_To_Rename", Flag247 (Id));
8276 W ("OK_To_Reorder_Components", Flag239 (Id));
8277 W ("Optimize_Alignment_Space", Flag241 (Id));
8278 W ("Optimize_Alignment_Time", Flag242 (Id));
8279 W ("Overlays_Constant", Flag243 (Id));
8280 W ("Reachable", Flag49 (Id));
8281 W ("Referenced", Flag156 (Id));
8282 W ("Referenced_As_LHS", Flag36 (Id));
8283 W ("Referenced_As_Out_Parameter", Flag227 (Id));
8284 W ("Renamed_In_Spec", Flag231 (Id));
8285 W ("Requires_Overriding", Flag213 (Id));
8286 W ("Return_Present", Flag54 (Id));
8287 W ("Returns_By_Ref", Flag90 (Id));
8288 W ("Reverse_Bit_Order", Flag164 (Id));
8289 W ("Reverse_Storage_Order", Flag93 (Id));
8290 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
8291 W ("Size_Depends_On_Discriminant", Flag177 (Id));
8292 W ("Size_Known_At_Compile_Time", Flag92 (Id));
8293 W ("SPARK_Aux_Pragma_Inherited", Flag266 (Id));
8294 W ("SPARK_Pragma_Inherited", Flag265 (Id));
8295 W ("Static_Elaboration_Desired", Flag77 (Id));
8296 W ("Strict_Alignment", Flag145 (Id));
8297 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
8298 W ("Suppress_Initialization", Flag105 (Id));
8299 W ("Suppress_Style_Checks", Flag165 (Id));
8300 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
8301 W ("Treat_As_Volatile", Flag41 (Id));
8302 W ("Universal_Aliasing", Flag216 (Id));
8303 W ("Used_As_Generic_Actual", Flag222 (Id));
8304 W ("Uses_Sec_Stack", Flag95 (Id));
8305 W ("Warnings_Off", Flag96 (Id));
8306 W ("Warnings_Off_Used", Flag236 (Id));
8307 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
8308 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
8309 W ("Was_Hidden", Flag196 (Id));
8310 end Write_Entity_Flags;
8312 -----------------------
8313 -- Write_Entity_Info --
8314 -----------------------
8316 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
8318 procedure Write_Attribute (Which : String; Nam : E);
8319 -- Write attribute value with given string name
8321 procedure Write_Kind (Id : Entity_Id);
8322 -- Write Ekind field of entity
8324 ---------------------
8325 -- Write_Attribute --
8326 ---------------------
8328 procedure Write_Attribute (Which : String; Nam : E) is
8332 Write_Int (Int (Nam));
8334 Write_Name (Chars (Nam));
8336 end Write_Attribute;
8342 procedure Write_Kind (Id : Entity_Id) is
8343 K : constant String := Entity_Kind'Image (Ekind (Id));
8347 Write_Str (" Kind ");
8349 if Is_Type (Id) and then Is_Tagged_Type (Id) then
8350 Write_Str ("TAGGED ");
8353 Write_Str (K (3 .. K'Length));
8356 if Is_Type (Id) and then Depends_On_Private (Id) then
8357 Write_Str ("Depends_On_Private ");
8361 -- Start of processing for Write_Entity_Info
8365 Write_Attribute ("Name ", Id);
8366 Write_Int (Int (Id));
8370 Write_Attribute (" Type ", Etype (Id));
8372 Write_Attribute (" Scope ", Scope (Id));
8377 when Discrete_Kind =>
8378 Write_Str ("Bounds: Id = ");
8380 if Present (Scalar_Range (Id)) then
8381 Write_Int (Int (Type_Low_Bound (Id)));
8382 Write_Str (" .. Id = ");
8383 Write_Int (Int (Type_High_Bound (Id)));
8385 Write_Str ("Empty");
8396 (" Component Type ", Component_Type (Id));
8399 Write_Str (" Indexes ");
8401 Index := First_Index (Id);
8402 while Present (Index) loop
8403 Write_Attribute (" ", Etype (Index));
8404 Index := Next_Index (Index);
8412 (" Directly Designated Type ",
8413 Directly_Designated_Type (Id));
8416 when Overloadable_Kind =>
8417 if Present (Homonym (Id)) then
8418 Write_Str (" Homonym ");
8419 Write_Name (Chars (Homonym (Id)));
8421 Write_Int (Int (Homonym (Id)));
8428 if Ekind (Scope (Id)) in Record_Kind then
8430 " Original_Record_Component ",
8431 Original_Record_Component (Id));
8432 Write_Int (Int (Original_Record_Component (Id)));
8436 when others => null;
8438 end Write_Entity_Info;
8440 -----------------------
8441 -- Write_Field6_Name --
8442 -----------------------
8444 procedure Write_Field6_Name (Id : Entity_Id) is
8445 pragma Warnings (Off, Id);
8447 Write_Str ("First_Rep_Item");
8448 end Write_Field6_Name;
8450 -----------------------
8451 -- Write_Field7_Name --
8452 -----------------------
8454 procedure Write_Field7_Name (Id : Entity_Id) is
8455 pragma Warnings (Off, Id);
8457 Write_Str ("Freeze_Node");
8458 end Write_Field7_Name;
8460 -----------------------
8461 -- Write_Field8_Name --
8462 -----------------------
8464 procedure Write_Field8_Name (Id : Entity_Id) is
8468 Write_Str ("Associated_Node_For_Itype");
8471 Write_Str ("Dependent_Instances");
8474 Write_Str ("First_Exit_Statement");
8477 Write_Str ("Hiding_Loop_Variable");
8481 E_Subprogram_Body =>
8482 Write_Str ("Mechanism");
8486 Write_Str ("Normalized_First_Bit");
8489 Write_Str ("Postcondition_Proc");
8491 when E_Abstract_State =>
8492 Write_Str ("Refinement_Constituents");
8494 when E_Return_Statement =>
8495 Write_Str ("Return_Applies_To");
8498 Write_Str ("Field8??");
8500 end Write_Field8_Name;
8502 -----------------------
8503 -- Write_Field9_Name --
8504 -----------------------
8506 procedure Write_Field9_Name (Id : Entity_Id) is
8510 Write_Str ("Class_Wide_Type");
8513 Write_Str ("Current_Value");
8516 E_Generic_Function |
8518 E_Generic_Procedure |
8521 Write_Str ("Renaming_Map");
8524 Write_Str ("Field9??");
8526 end Write_Field9_Name;
8528 ------------------------
8529 -- Write_Field10_Name --
8530 ------------------------
8532 procedure Write_Field10_Name (Id : Entity_Id) is
8535 when Class_Wide_Kind |
8541 Write_Str ("Direct_Primitive_Operations");
8544 Write_Str ("Float_Rep");
8546 when E_In_Parameter |
8548 Write_Str ("Discriminal_Link");
8554 Write_Str ("Handler_Records");
8558 Write_Str ("Normalized_Position_Max");
8560 when E_Abstract_State |
8562 Write_Str ("Refined_State");
8565 Write_Str ("Field10??");
8567 end Write_Field10_Name;
8569 ------------------------
8570 -- Write_Field11_Name --
8571 ------------------------
8573 procedure Write_Field11_Name (Id : Entity_Id) is
8577 Write_Str ("Block_Node");
8581 Write_Str ("Component_Bit_Offset");
8584 Write_Str ("Entry_Component");
8586 when E_Enumeration_Literal =>
8587 Write_Str ("Enumeration_Pos");
8591 Write_Str ("Full_View");
8593 when E_Generic_Package =>
8594 Write_Str ("Generic_Homonym");
8600 Write_Str ("Protected_Body_Subprogram");
8603 Write_Str ("Field11??");
8605 end Write_Field11_Name;
8607 ------------------------
8608 -- Write_Field12_Name --
8609 ------------------------
8611 procedure Write_Field12_Name (Id : Entity_Id) is
8615 Write_Str ("Associated_Formal_Package");
8618 Write_Str ("Barrier_Function");
8620 when E_Enumeration_Literal =>
8621 Write_Str ("Enumeration_Rep");
8629 E_In_Out_Parameter |
8633 Write_Str ("Esize");
8637 Write_Str ("Next_Inlined_Subprogram");
8640 Write_Str ("Field12??");
8642 end Write_Field12_Name;
8644 ------------------------
8645 -- Write_Field13_Name --
8646 ------------------------
8648 procedure Write_Field13_Name (Id : Entity_Id) is
8653 Write_Str ("Component_Clause");
8656 Write_Str ("Elaboration_Entity");
8660 Generic_Unit_Kind =>
8661 Write_Str ("Elaboration_Entity");
8665 Write_Str ("Extra_Accessibility");
8668 Write_Str ("RM_Size");
8671 Write_Str ("Field13??");
8673 end Write_Field13_Name;
8675 -----------------------
8676 -- Write_Field14_Name --
8677 -----------------------
8679 procedure Write_Field14_Name (Id : Entity_Id) is
8688 Write_Str ("Alignment");
8692 Write_Str ("First_Optional_Parameter");
8696 Write_Str ("Normalized_Position");
8699 E_Generic_Package =>
8700 Write_Str ("Shadow_Entities");
8703 Write_Str ("Field14??");
8705 end Write_Field14_Name;
8707 ------------------------
8708 -- Write_Field15_Name --
8709 ------------------------
8711 procedure Write_Field15_Name (Id : Entity_Id) is
8714 when E_Discriminant =>
8715 Write_Str ("Discriminant_Number");
8718 Write_Str ("DT_Entry_Count");
8722 Write_Str ("DT_Position");
8724 when E_Protected_Type =>
8725 Write_Str ("Entry_Bodies_Array");
8728 Write_Str ("Entry_Parameters_Type");
8731 Write_Str ("Extra_Formal");
8733 when Enumeration_Kind =>
8734 Write_Str ("Lit_Indexes");
8738 Write_Str ("Related_Instance");
8740 when Decimal_Fixed_Point_Kind =>
8741 Write_Str ("Scale_Value");
8745 Write_Str ("Status_Flag_Or_Transient_Decl");
8749 Write_Str ("Storage_Size_Variable");
8751 when E_String_Literal_Subtype =>
8752 Write_Str ("String_Literal_Low_Bound");
8755 Write_Str ("Field15??");
8757 end Write_Field15_Name;
8759 ------------------------
8760 -- Write_Field16_Name --
8761 ------------------------
8763 procedure Write_Field16_Name (Id : Entity_Id) is
8766 when E_Record_Type |
8767 E_Record_Type_With_Private =>
8768 Write_Str ("Access_Disp_Table");
8770 when E_Abstract_State =>
8771 Write_Str ("Body_References");
8773 when E_Record_Subtype |
8774 E_Class_Wide_Subtype =>
8775 Write_Str ("Cloned_Subtype");
8779 Write_Str ("DTC_Entity");
8782 Write_Str ("Entry_Formal");
8787 Write_Str ("First_Private_Entity");
8789 when Enumeration_Kind =>
8790 Write_Str ("Lit_Strings");
8792 when E_String_Literal_Subtype =>
8793 Write_Str ("String_Literal_Length");
8797 Write_Str ("Unset_Reference");
8800 Write_Str ("Field16??");
8802 end Write_Field16_Name;
8804 ------------------------
8805 -- Write_Field17_Name --
8806 ------------------------
8808 procedure Write_Field17_Name (Id : Entity_Id) is
8813 E_Generic_In_Out_Parameter |
8815 Write_Str ("Actual_Subtype");
8818 Write_Str ("Digits_Value");
8820 when E_Discriminant =>
8821 Write_Str ("Discriminal");
8830 E_Generic_Function |
8832 E_Generic_Procedure |
8840 E_Return_Statement |
8842 E_Subprogram_Type =>
8843 Write_Str ("First_Entity");
8846 Write_Str ("First_Index");
8848 when Enumeration_Kind =>
8849 Write_Str ("First_Literal");
8852 Write_Str ("Master_Id");
8854 when Modular_Integer_Kind =>
8855 Write_Str ("Modulus");
8857 when E_Abstract_State |
8858 E_Incomplete_Type =>
8859 Write_Str ("Non_Limited_View");
8861 when E_Incomplete_Subtype =>
8862 if From_Limited_With (Id) then
8863 Write_Str ("Non_Limited_View");
8867 Write_Str ("Prival");
8870 Write_Str ("Field17??");
8872 end Write_Field17_Name;
8874 ------------------------
8875 -- Write_Field18_Name --
8876 ------------------------
8878 procedure Write_Field18_Name (Id : Entity_Id) is
8881 when E_Enumeration_Literal |
8885 Write_Str ("Alias");
8887 when E_Record_Type =>
8888 Write_Str ("Corresponding_Concurrent_Type");
8890 when E_Subprogram_Body =>
8891 Write_Str ("Corresponding_Protected_Entry");
8893 when Concurrent_Kind =>
8894 Write_Str ("Corresponding_Record_Type");
8899 Write_Str ("Enclosing_Scope");
8901 when E_Entry_Index_Parameter =>
8902 Write_Str ("Entry_Index_Constant");
8904 when E_Class_Wide_Subtype |
8905 E_Access_Protected_Subprogram_Type |
8906 E_Anonymous_Access_Protected_Subprogram_Type |
8907 E_Access_Subprogram_Type |
8909 Write_Str ("Equivalent_Type");
8911 when Fixed_Point_Kind =>
8912 Write_Str ("Delta_Value");
8914 when Incomplete_Or_Private_Kind |
8916 Write_Str ("Private_Dependents");
8919 Write_Str ("Renamed_Object");
8923 E_Generic_Function |
8924 E_Generic_Procedure |
8925 E_Generic_Package =>
8926 Write_Str ("Renamed_Entity");
8929 Write_Str ("Field18??");
8931 end Write_Field18_Name;
8933 -----------------------
8934 -- Write_Field19_Name --
8935 -----------------------
8937 procedure Write_Field19_Name (Id : Entity_Id) is
8941 E_Generic_Package =>
8942 Write_Str ("Body_Entity");
8944 when E_Discriminant =>
8945 Write_Str ("Corresponding_Discriminant");
8948 Write_Str ("Default_Aspect_Value");
8950 when E_Array_Type =>
8951 Write_Str ("Default_Component_Value");
8953 when E_Record_Type =>
8954 Write_Str ("Parent_Subtype");
8958 Write_Str ("Size_Check_Code");
8960 when E_Package_Body |
8962 Write_Str ("Spec_Entity");
8964 when Private_Kind =>
8965 Write_Str ("Underlying_Full_View");
8967 when E_Function | E_Operator | E_Subprogram_Type =>
8968 Write_Str ("Extra_Accessibility_Of_Result");
8971 Write_Str ("Field19??");
8973 end Write_Field19_Name;
8975 -----------------------
8976 -- Write_Field20_Name --
8977 -----------------------
8979 procedure Write_Field20_Name (Id : Entity_Id) is
8983 Write_Str ("Component_Type");
8985 when E_In_Parameter |
8986 E_Generic_In_Parameter =>
8987 Write_Str ("Default_Value");
8990 Write_Str ("Directly_Designated_Type");
8993 Write_Str ("Discriminant_Checking_Func");
8995 when E_Discriminant =>
8996 Write_Str ("Discriminant_Default_Value");
9005 E_Generic_Function |
9007 E_Generic_Procedure |
9015 E_Return_Statement |
9017 E_Subprogram_Type =>
9018 Write_Str ("Last_Entity");
9022 Write_Str ("Prival_Link");
9025 Write_Str ("Scalar_Range");
9028 Write_Str ("Register_Exception_Call");
9031 Write_Str ("Field20??");
9033 end Write_Field20_Name;
9035 -----------------------
9036 -- Write_Field21_Name --
9037 -----------------------
9039 procedure Write_Field21_Name (Id : Entity_Id) is
9043 Write_Str ("Accept_Address");
9045 when E_In_Parameter =>
9046 Write_Str ("Default_Expr_Function");
9048 when Concurrent_Kind |
9049 Incomplete_Or_Private_Kind |
9053 Write_Str ("Discriminant_Constraint");
9058 E_Generic_Function |
9060 E_Generic_Procedure |
9062 Write_Str ("Interface_Name");
9065 Modular_Integer_Kind =>
9066 Write_Str ("Original_Array_Type");
9068 when Fixed_Point_Kind =>
9069 Write_Str ("Small_Value");
9072 Write_Str ("Field21??");
9074 end Write_Field21_Name;
9076 -----------------------
9077 -- Write_Field22_Name --
9078 -----------------------
9080 procedure Write_Field22_Name (Id : Entity_Id) is
9084 Write_Str ("Associated_Storage_Pool");
9087 Write_Str ("Component_Size");
9089 when E_Record_Type =>
9090 Write_Str ("Corresponding_Remote_Type");
9094 Write_Str ("Original_Record_Component");
9096 when E_Enumeration_Literal =>
9097 Write_Str ("Enumeration_Rep_Expr");
9100 Write_Str ("Exception_Code");
9102 when E_Record_Type_With_Private |
9103 E_Record_Subtype_With_Private |
9106 E_Limited_Private_Type |
9107 E_Limited_Private_Subtype =>
9108 Write_Str ("Private_View");
9111 Write_Str ("Protected_Formal");
9121 E_Generic_Function |
9122 E_Generic_Procedure |
9125 E_Return_Statement |
9128 Write_Str ("Scope_Depth_Value");
9131 Write_Str ("Shared_Var_Procs_Instance");
9134 Write_Str ("Field22??");
9136 end Write_Field22_Name;
9138 ------------------------
9139 -- Write_Field23_Name --
9140 ------------------------
9142 procedure Write_Field23_Name (Id : Entity_Id) is
9145 when E_Discriminant =>
9146 Write_Str ("CR_Discriminant");
9149 Write_Str ("Entry_Cancel_Parameter");
9151 when E_Enumeration_Type =>
9152 Write_Str ("Enum_Pos_To_Rep");
9156 Write_Str ("Extra_Constrained");
9159 Write_Str ("Finalization_Master");
9161 when E_Generic_Function |
9163 E_Generic_Procedure =>
9164 Write_Str ("Inner_Instances");
9167 Write_Str ("Packed_Array_Type");
9170 Write_Str ("Protection_Object");
9172 when Concurrent_Kind |
9173 Incomplete_Or_Private_Kind |
9177 Write_Str ("Stored_Constraint");
9181 if Present (Scope (Id))
9182 and then Is_Protected_Type (Scope (Id))
9184 Write_Str ("Protection_Object");
9186 Write_Str ("Generic_Renamings");
9190 if Is_Generic_Instance (Id) then
9191 Write_Str ("Generic_Renamings");
9193 Write_Str ("Limited_View");
9197 Write_Str ("Field23??");
9199 end Write_Field23_Name;
9201 ------------------------
9202 -- Write_Field24_Name --
9203 ------------------------
9205 procedure Write_Field24_Name (Id : Entity_Id) is
9211 Write_Str ("Related_Expression");
9214 Write_Str ("Field24???");
9216 end Write_Field24_Name;
9218 ------------------------
9219 -- Write_Field25_Name --
9220 ------------------------
9222 procedure Write_Field25_Name (Id : Entity_Id) is
9226 Write_Str ("Abstract_States");
9229 Write_Str ("Debug_Renaming_Link");
9232 Write_Str ("DT_Offset_To_Top_Func");
9236 Write_Str ("Interface_Alias");
9238 when E_Record_Type |
9240 E_Record_Type_With_Private |
9241 E_Record_Subtype_With_Private =>
9242 Write_Str ("Interfaces");
9246 Write_Str ("Related_Array_Object");
9249 Write_Str ("Task_Body_Procedure");
9253 Write_Str ("PPC_Wrapper");
9255 when E_Enumeration_Subtype |
9256 E_Modular_Integer_Subtype |
9257 E_Signed_Integer_Subtype =>
9258 Write_Str ("Static_Predicate");
9261 Write_Str ("Field25??");
9263 end Write_Field25_Name;
9265 ------------------------
9266 -- Write_Field26_Name --
9267 ------------------------
9269 procedure Write_Field26_Name (Id : Entity_Id) is
9272 when E_Record_Type |
9273 E_Record_Type_With_Private =>
9274 Write_Str ("Dispatch_Table_Wrappers");
9276 when E_In_Out_Parameter |
9279 Write_Str ("Last_Assignment");
9281 when E_Access_Subprogram_Type =>
9282 Write_Str ("Original_Access_Type");
9284 when E_Generic_Package |
9286 Write_Str ("Package_Instantiation");
9290 Write_Str ("Related_Type");
9293 Write_Str ("Relative_Deadline_Variable");
9297 Write_Str ("Overridden_Operation");
9300 Write_Str ("Field26??");
9302 end Write_Field26_Name;
9304 ------------------------
9305 -- Write_Field27_Name --
9306 ------------------------
9308 procedure Write_Field27_Name (Id : Entity_Id) is
9313 Write_Str ("Current_Use_Clause");
9318 Write_Str ("Related_Type");
9322 Write_Str ("Wrapped_Entity");
9325 Write_Str ("Field27??");
9327 end Write_Field27_Name;
9329 ------------------------
9330 -- Write_Field28_Name --
9331 ------------------------
9333 procedure Write_Field28_Name (Id : Entity_Id) is
9341 E_Subprogram_Type =>
9342 Write_Str ("Extra_Formals");
9346 Write_Str ("Finalizer");
9350 Write_Str ("Initialization_Statements");
9352 when E_Record_Type =>
9353 Write_Str ("Underlying_Record_View");
9356 Write_Str ("Field28??");
9358 end Write_Field28_Name;
9360 ------------------------
9361 -- Write_Field29_Name --
9362 ------------------------
9364 procedure Write_Field29_Name (Id : Entity_Id) is
9368 Write_Str ("Subprograms_For_Type");
9371 Write_Str ("Field29??");
9373 end Write_Field29_Name;
9375 ------------------------
9376 -- Write_Field30_Name --
9377 ------------------------
9379 procedure Write_Field30_Name (Id : Entity_Id) is
9383 Write_Str ("Corresponding_Equality");
9386 Write_Str ("Static_Initialization");
9389 Write_Str ("Field30??");
9391 end Write_Field30_Name;
9393 ------------------------
9394 -- Write_Field31_Name --
9395 ------------------------
9397 procedure Write_Field31_Name (Id : Entity_Id) is
9402 Write_Str ("Thunk_Entity");
9405 Write_Str ("Field31??");
9407 end Write_Field31_Name;
9409 ------------------------
9410 -- Write_Field32_Name --
9411 ------------------------
9413 procedure Write_Field32_Name (Id : Entity_Id) is
9417 E_Generic_Function |
9419 E_Generic_Procedure |
9423 E_Subprogram_Body =>
9424 Write_Str ("SPARK_Pragma");
9427 Write_Str ("Field32??");
9429 end Write_Field32_Name;
9431 ------------------------
9432 -- Write_Field33_Name --
9433 ------------------------
9435 procedure Write_Field33_Name (Id : Entity_Id) is
9438 when E_Generic_Package |
9441 Write_Str ("SPARK_Aux_Pragma");
9447 Write_Str ("Linker_Section_Pragma");
9450 Write_Str ("Field33??");
9452 end Write_Field33_Name;
9454 ------------------------
9455 -- Write_Field34_Name --
9456 ------------------------
9458 procedure Write_Field34_Name (Id : Entity_Id) is
9468 Generic_Subprogram_Kind |
9470 Write_Str ("Contract");
9473 Write_Str ("Field34??");
9475 end Write_Field34_Name;
9477 ------------------------
9478 -- Write_Field35_Name --
9479 ------------------------
9481 procedure Write_Field35_Name (Id : Entity_Id) is
9485 Write_Str ("Field35??");
9487 end Write_Field35_Name;
9489 -------------------------
9490 -- Iterator Procedures --
9491 -------------------------
9493 procedure Proc_Next_Component (N : in out Node_Id) is
9495 N := Next_Component (N);
9496 end Proc_Next_Component;
9498 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
9500 N := Next_Entity (N);
9501 while Present (N) loop
9502 exit when Ekind_In (N, E_Component, E_Discriminant);
9503 N := Next_Entity (N);
9505 end Proc_Next_Component_Or_Discriminant;
9507 procedure Proc_Next_Discriminant (N : in out Node_Id) is
9509 N := Next_Discriminant (N);
9510 end Proc_Next_Discriminant;
9512 procedure Proc_Next_Formal (N : in out Node_Id) is
9514 N := Next_Formal (N);
9515 end Proc_Next_Formal;
9517 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
9519 N := Next_Formal_With_Extras (N);
9520 end Proc_Next_Formal_With_Extras;
9522 procedure Proc_Next_Index (N : in out Node_Id) is
9524 N := Next_Index (N);
9525 end Proc_Next_Index;
9527 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
9529 N := Next_Inlined_Subprogram (N);
9530 end Proc_Next_Inlined_Subprogram;
9532 procedure Proc_Next_Literal (N : in out Node_Id) is
9534 N := Next_Literal (N);
9535 end Proc_Next_Literal;
9537 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
9539 N := Next_Stored_Discriminant (N);
9540 end Proc_Next_Stored_Discriminant;