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 Namet; use Namet;
37 with Nlists; use Nlists;
38 with Output; use Output;
39 with Sinfo; use Sinfo;
40 with Stand; use Stand;
44 use Atree.Unchecked_Access;
45 -- This is one of the packages that is allowed direct untyped access to
46 -- the fields in a node, since it provides the next level abstraction
47 -- which incorporates appropriate checks.
49 ----------------------------------------------
50 -- Usage of Fields in Defining Entity Nodes --
51 ----------------------------------------------
53 -- Four of these fields are defined in Sinfo, since they in are the base
54 -- part of the node. The access routines for these four fields and the
55 -- corresponding set procedures are defined in Sinfo. These fields are
56 -- present in all entities. Note that Homonym is also in the base part of
57 -- the node, but has access routines that are more properly part of Einfo,
58 -- which is why they are defined here.
65 -- Remaining fields are present only in extended nodes (i.e. entities)
67 -- The following fields are present in all entities
70 -- First_Rep_Item Node6
73 -- The usage of other fields (and the entity kinds to which it applies)
74 -- depends on the particular field (see Einfo spec for details).
76 -- Associated_Node_For_Itype Node8
77 -- Dependent_Instances Elist8
78 -- Hiding_Loop_Variable Node8
79 -- Integrity_Level Uint8
80 -- Mechanism Uint8 (but returns Mechanism_Type)
81 -- Normalized_First_Bit Uint8
82 -- Postcondition_Proc Node8
83 -- Return_Applies_To Node8
84 -- First_Exit_Statement Node8
86 -- Class_Wide_Type Node9
87 -- Current_Value Node9
88 -- Refined_State 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
97 -- Component_Bit_Offset Uint11
99 -- Entry_Component Node11
100 -- Enumeration_Pos Uint11
101 -- Generic_Homonym Node11
102 -- Protected_Body_Subprogram Node11
105 -- Barrier_Function Node12
106 -- Enumeration_Rep Uint12
108 -- Next_Inlined_Subprogram Node12
110 -- Component_Clause Node13
111 -- Elaboration_Entity Node13
112 -- Extra_Accessibility Node13
116 -- First_Optional_Parameter Node14
117 -- Normalized_Position Uint14
118 -- Shadow_Entities List14
120 -- Discriminant_Number Uint15
121 -- DT_Position Uint15
122 -- DT_Entry_Count Uint15
123 -- Entry_Bodies_Array Node15
124 -- Entry_Parameters_Type Node15
125 -- Extra_Formal Node15
126 -- Lit_Indexes Node15
127 -- Related_Instance Node15
128 -- Status_Flag_Or_Transient_Decl Node15
129 -- Scale_Value Uint15
130 -- Storage_Size_Variable Node15
131 -- String_Literal_Low_Bound Node15
133 -- Access_Disp_Table Elist16
134 -- Cloned_Subtype Node16
136 -- Entry_Formal Node16
137 -- First_Private_Entity Node16
138 -- Lit_Strings Node16
139 -- String_Literal_Length Uint16
140 -- Unset_Reference Node16
142 -- Actual_Subtype Node17
143 -- Digits_Value Uint17
144 -- Discriminal Node17
145 -- First_Entity Node17
146 -- First_Index Node17
147 -- First_Literal Node17
150 -- Non_Limited_View Node17
154 -- Corresponding_Concurrent_Type Node18
155 -- Corresponding_Protected_Entry Node18
156 -- Corresponding_Record_Type Node18
157 -- Delta_Value Ureal18
158 -- Enclosing_Scope Node18
159 -- Equivalent_Type Node18
160 -- Private_Dependents Elist18
161 -- Renamed_Entity Node18
162 -- Renamed_Object Node18
164 -- Body_Entity Node19
165 -- Corresponding_Discriminant Node19
166 -- Default_Aspect_Component_Value Node19
167 -- Default_Aspect_Value Node19
168 -- Extra_Accessibility_Of_Result Node19
169 -- Parent_Subtype Node19
170 -- Size_Check_Code Node19
171 -- Spec_Entity Node19
172 -- Underlying_Full_View Node19
174 -- Component_Type Node20
175 -- Default_Value Node20
176 -- Directly_Designated_Type Node20
177 -- Discriminant_Checking_Func Node20
178 -- Discriminant_Default_Value Node20
179 -- Last_Entity Node20
180 -- Prival_Link Node20
181 -- Register_Exception_Call Node20
182 -- Scalar_Range Node20
184 -- Accept_Address Elist21
185 -- Default_Expr_Function Node21
186 -- Discriminant_Constraint Elist21
187 -- Interface_Name Node21
188 -- Original_Array_Type Node21
189 -- Small_Value Ureal21
191 -- Associated_Storage_Pool Node22
192 -- Component_Size Uint22
193 -- Corresponding_Remote_Type Node22
194 -- Enumeration_Rep_Expr Node22
195 -- Exception_Code Uint22
196 -- Original_Record_Component Node22
197 -- Private_View Node22
198 -- Protected_Formal Node22
199 -- Scope_Depth_Value Uint22
200 -- Shared_Var_Procs_Instance Node22
202 -- CR_Discriminant Node23
203 -- Entry_Cancel_Parameter Node23
204 -- Enum_Pos_To_Rep Node23
205 -- Extra_Constrained Node23
206 -- Finalization_Master Node23
207 -- Generic_Renamings Elist23
208 -- Inner_Instances Elist23
209 -- Limited_View Node23
210 -- Packed_Array_Type Node23
211 -- Protection_Object Node23
212 -- Stored_Constraint Elist23
215 -- 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
239 -- Initialization_Statements Node28
240 -- Underlying_Record_View Node28
242 -- Subprograms_For_Type Node29
244 -- Corresponding_Equality Node30
245 -- Static_Initialization Node30
247 -- Thunk_Entity Node31
249 -- SPARK_Mode_Pragmas Node32
257 ---------------------------------------------
258 -- Usage of Flags in Defining Entity Nodes --
259 ---------------------------------------------
261 -- All flags are unique, there is no overlaying, so each flag is physically
262 -- present in every entity. However, for many of the flags, it only makes
263 -- sense for them to be set true for certain subsets of entity kinds. See
264 -- the spec of Einfo for further details.
266 -- Note: Flag1-Flag3 are not used, for historical reasons
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_With_Type 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
580 -- Note: Flag287-317 are defined in atree.ads/adb, but not yet in atree.h
582 -----------------------
583 -- Local subprograms --
584 -----------------------
586 function Has_Property
588 Prop_Nam : Name_Id) return Boolean;
589 -- Determine whether abstract state State has a particular property denoted
590 -- by the name Prop_Nam.
592 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N;
593 -- Returns the attribute definition clause for Id whose name is Rep_Name.
594 -- Returns Empty if no matching attribute definition clause found for Id.
600 function Float_Rep (Id : E) return F is
601 pragma Assert (Is_Floating_Point_Type (Id));
603 return F'Val (UI_To_Int (Uint10 (Base_Type (Id))));
610 function Has_Property
612 Prop_Nam : Name_Id) return Boolean
614 Par : constant Node_Id := Parent (State);
618 pragma Assert (Ekind (State) = E_Abstract_State);
620 -- States with properties appear as extension aggregates in the tree
622 if Nkind (Par) = N_Extension_Aggregate then
623 if Prop_Nam = Name_Integrity then
624 return Present (Component_Associations (Par));
627 Prop := First (Expressions (Par));
628 while Present (Prop) loop
629 if Chars (Prop) = Prop_Nam then
645 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N is
649 Ritem := First_Rep_Item (Id);
650 while Present (Ritem) loop
651 if Nkind (Ritem) = N_Attribute_Definition_Clause
652 and then Chars (Ritem) = Rep_Name
656 Next_Rep_Item (Ritem);
663 --------------------------------
664 -- Attribute Access Functions --
665 --------------------------------
667 function Abstract_States (Id : E) return L is
669 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
673 function Accept_Address (Id : E) return L is
678 function Access_Disp_Table (Id : E) return L is
680 pragma Assert (Ekind_In (Id, E_Record_Type,
682 return Elist16 (Implementation_Base_Type (Id));
683 end Access_Disp_Table;
685 function Actual_Subtype (Id : E) return E is
688 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
689 or else Is_Formal (Id));
693 function Address_Taken (Id : E) return B is
698 function Alias (Id : E) return E is
701 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
705 function Alignment (Id : E) return U is
707 pragma Assert (Is_Type (Id)
708 or else Is_Formal (Id)
709 or else Ekind_In (Id, E_Loop_Parameter,
716 function Associated_Formal_Package (Id : E) return E is
718 pragma Assert (Ekind (Id) = E_Package);
720 end Associated_Formal_Package;
722 function Associated_Node_For_Itype (Id : E) return N is
725 end Associated_Node_For_Itype;
727 function Associated_Storage_Pool (Id : E) return E is
729 pragma Assert (Is_Access_Type (Id));
730 return Node22 (Root_Type (Id));
731 end Associated_Storage_Pool;
733 function Barrier_Function (Id : E) return N is
735 pragma Assert (Is_Entry (Id));
737 end Barrier_Function;
739 function Block_Node (Id : E) return N is
741 pragma Assert (Ekind (Id) = E_Block);
745 function Body_Entity (Id : E) return E is
747 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
751 function Body_Needed_For_SAL (Id : E) return B is
754 (Ekind (Id) = E_Package
755 or else Is_Subprogram (Id)
756 or else Is_Generic_Unit (Id));
758 end Body_Needed_For_SAL;
760 function C_Pass_By_Copy (Id : E) return B is
762 pragma Assert (Is_Record_Type (Id));
763 return Flag125 (Implementation_Base_Type (Id));
766 function Can_Never_Be_Null (Id : E) return B is
769 end Can_Never_Be_Null;
771 function Checks_May_Be_Suppressed (Id : E) return B is
774 end Checks_May_Be_Suppressed;
776 function Class_Wide_Type (Id : E) return E is
778 pragma Assert (Is_Type (Id));
782 function Cloned_Subtype (Id : E) return E is
784 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
788 function Component_Bit_Offset (Id : E) return U is
790 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
792 end Component_Bit_Offset;
794 function Component_Clause (Id : E) return N is
796 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
798 end Component_Clause;
800 function Component_Size (Id : E) return U is
802 pragma Assert (Is_Array_Type (Id));
803 return Uint22 (Implementation_Base_Type (Id));
806 function Component_Type (Id : E) return E is
808 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
809 return Node20 (Implementation_Base_Type (Id));
812 function Corresponding_Concurrent_Type (Id : E) return E is
814 pragma Assert (Ekind (Id) = E_Record_Type);
816 end Corresponding_Concurrent_Type;
818 function Corresponding_Discriminant (Id : E) return E is
820 pragma Assert (Ekind (Id) = E_Discriminant);
822 end Corresponding_Discriminant;
824 function Corresponding_Equality (Id : E) return E is
827 (Ekind (Id) = E_Function
828 and then not Comes_From_Source (Id)
829 and then Chars (Id) = Name_Op_Ne);
831 end Corresponding_Equality;
833 function Corresponding_Protected_Entry (Id : E) return E is
835 pragma Assert (Ekind (Id) = E_Subprogram_Body);
837 end Corresponding_Protected_Entry;
839 function Corresponding_Record_Type (Id : E) return E is
841 pragma Assert (Is_Concurrent_Type (Id));
843 end Corresponding_Record_Type;
845 function Corresponding_Remote_Type (Id : E) return E is
848 end Corresponding_Remote_Type;
850 function Current_Use_Clause (Id : E) return E is
852 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
854 end Current_Use_Clause;
856 function Current_Value (Id : E) return N is
858 pragma Assert (Ekind (Id) in Object_Kind);
862 function CR_Discriminant (Id : E) return E is
867 function Debug_Info_Off (Id : E) return B is
872 function Debug_Renaming_Link (Id : E) return E is
875 end Debug_Renaming_Link;
877 function Default_Aspect_Component_Value (Id : E) return N is
879 pragma Assert (Is_Array_Type (Id));
881 end Default_Aspect_Component_Value;
883 function Default_Aspect_Value (Id : E) return N is
885 pragma Assert (Is_Scalar_Type (Id));
887 end Default_Aspect_Value;
889 function Default_Expr_Function (Id : E) return E is
891 pragma Assert (Is_Formal (Id));
893 end Default_Expr_Function;
895 function Default_Expressions_Processed (Id : E) return B is
898 end Default_Expressions_Processed;
900 function Default_Value (Id : E) return N is
902 pragma Assert (Is_Formal (Id));
906 function Delay_Cleanups (Id : E) return B is
911 function Delay_Subprogram_Descriptors (Id : E) return B is
914 end Delay_Subprogram_Descriptors;
916 function Delta_Value (Id : E) return R is
918 pragma Assert (Is_Fixed_Point_Type (Id));
922 function Dependent_Instances (Id : E) return L is
924 pragma Assert (Is_Generic_Instance (Id));
926 end Dependent_Instances;
928 function Depends_On_Private (Id : E) return B is
930 pragma Assert (Nkind (Id) in N_Entity);
932 end Depends_On_Private;
934 function Digits_Value (Id : E) return U is
937 (Is_Floating_Point_Type (Id)
938 or else Is_Decimal_Fixed_Point_Type (Id));
942 function Direct_Primitive_Operations (Id : E) return L is
944 pragma Assert (Is_Tagged_Type (Id));
946 end Direct_Primitive_Operations;
948 function Directly_Designated_Type (Id : E) return E is
950 pragma Assert (Is_Access_Type (Id));
952 end Directly_Designated_Type;
954 function Discard_Names (Id : E) return B is
959 function Discriminal (Id : E) return E is
961 pragma Assert (Ekind (Id) = E_Discriminant);
965 function Discriminal_Link (Id : E) return N is
968 end Discriminal_Link;
970 function Discriminant_Checking_Func (Id : E) return E is
972 pragma Assert (Ekind (Id) = E_Component);
974 end Discriminant_Checking_Func;
976 function Discriminant_Constraint (Id : E) return L is
978 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
980 end Discriminant_Constraint;
982 function Discriminant_Default_Value (Id : E) return N is
984 pragma Assert (Ekind (Id) = E_Discriminant);
986 end Discriminant_Default_Value;
988 function Discriminant_Number (Id : E) return U is
990 pragma Assert (Ekind (Id) = E_Discriminant);
992 end Discriminant_Number;
994 function Dispatch_Table_Wrappers (Id : E) return L is
996 pragma Assert (Ekind_In (Id, E_Record_Type,
998 return Elist26 (Implementation_Base_Type (Id));
999 end Dispatch_Table_Wrappers;
1001 function DT_Entry_Count (Id : E) return U is
1003 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1007 function DT_Offset_To_Top_Func (Id : E) return E is
1009 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1011 end DT_Offset_To_Top_Func;
1013 function DT_Position (Id : E) return U is
1015 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
1016 and then Present (DTC_Entity (Id)));
1020 function DTC_Entity (Id : E) return E is
1022 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1026 function Elaborate_Body_Desirable (Id : E) return B is
1028 pragma Assert (Ekind (Id) = E_Package);
1029 return Flag210 (Id);
1030 end Elaborate_Body_Desirable;
1032 function Elaboration_Entity (Id : E) return E is
1037 Ekind (Id) = E_Package
1039 Is_Generic_Unit (Id));
1041 end Elaboration_Entity;
1043 function Elaboration_Entity_Required (Id : E) return B is
1048 Ekind (Id) = E_Package
1050 Is_Generic_Unit (Id));
1051 return Flag174 (Id);
1052 end Elaboration_Entity_Required;
1054 function Enclosing_Scope (Id : E) return E is
1057 end Enclosing_Scope;
1059 function Entry_Accepted (Id : E) return B is
1061 pragma Assert (Is_Entry (Id));
1062 return Flag152 (Id);
1065 function Entry_Bodies_Array (Id : E) return E is
1068 end Entry_Bodies_Array;
1070 function Entry_Cancel_Parameter (Id : E) return E is
1073 end Entry_Cancel_Parameter;
1075 function Entry_Component (Id : E) return E is
1078 end Entry_Component;
1080 function Entry_Formal (Id : E) return E is
1085 function Entry_Index_Constant (Id : E) return N is
1087 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
1089 end Entry_Index_Constant;
1091 function Contract (Id : E) return N is
1094 (Ekind_In (Id, E_Entry, E_Entry_Family)
1095 or else Is_Subprogram (Id)
1096 or else Is_Generic_Subprogram (Id));
1100 function Entry_Parameters_Type (Id : E) return E is
1103 end Entry_Parameters_Type;
1105 function Enum_Pos_To_Rep (Id : E) return E is
1107 pragma Assert (Ekind (Id) = E_Enumeration_Type);
1109 end Enum_Pos_To_Rep;
1111 function Enumeration_Pos (Id : E) return Uint is
1113 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1115 end Enumeration_Pos;
1117 function Enumeration_Rep (Id : E) return U is
1119 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1121 end Enumeration_Rep;
1123 function Enumeration_Rep_Expr (Id : E) return N is
1125 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1127 end Enumeration_Rep_Expr;
1129 function Equivalent_Type (Id : E) return E is
1132 (Ekind_In (Id, E_Class_Wide_Type,
1133 E_Class_Wide_Subtype,
1134 E_Access_Protected_Subprogram_Type,
1135 E_Anonymous_Access_Protected_Subprogram_Type,
1136 E_Access_Subprogram_Type,
1139 end Equivalent_Type;
1141 function Esize (Id : E) return Uint is
1146 function Exception_Code (Id : E) return Uint is
1148 pragma Assert (Ekind (Id) = E_Exception);
1152 function Extra_Accessibility (Id : E) return E is
1155 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
1157 end Extra_Accessibility;
1159 function Extra_Accessibility_Of_Result (Id : E) return E is
1161 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
1163 end Extra_Accessibility_Of_Result;
1165 function Extra_Constrained (Id : E) return E is
1167 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1169 end Extra_Constrained;
1171 function Extra_Formal (Id : E) return E is
1176 function Extra_Formals (Id : E) return E is
1179 (Is_Overloadable (Id)
1180 or else Ekind_In (Id, E_Entry_Family,
1182 E_Subprogram_Type));
1186 function Can_Use_Internal_Rep (Id : E) return B is
1188 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1189 return Flag229 (Base_Type (Id));
1190 end Can_Use_Internal_Rep;
1192 function Finalization_Master (Id : E) return E is
1194 pragma Assert (Is_Access_Type (Id));
1195 return Node23 (Root_Type (Id));
1196 end Finalization_Master;
1198 function Finalize_Storage_Only (Id : E) return B is
1200 pragma Assert (Is_Type (Id));
1201 return Flag158 (Base_Type (Id));
1202 end Finalize_Storage_Only;
1204 function Finalizer (Id : E) return E is
1207 (Ekind (Id) = E_Package
1208 or else Ekind (Id) = E_Package_Body);
1212 function First_Entity (Id : E) return E is
1217 function First_Exit_Statement (Id : E) return N is
1219 pragma Assert (Ekind (Id) = E_Loop);
1221 end First_Exit_Statement;
1223 function First_Index (Id : E) return N is
1225 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1229 function First_Literal (Id : E) return E is
1231 pragma Assert (Is_Enumeration_Type (Id));
1235 function First_Optional_Parameter (Id : E) return E is
1237 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1239 end First_Optional_Parameter;
1241 function First_Private_Entity (Id : E) return E is
1243 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1244 or else Ekind (Id) in Concurrent_Kind);
1246 end First_Private_Entity;
1248 function First_Rep_Item (Id : E) return E is
1253 function Freeze_Node (Id : E) return N is
1258 function From_With_Type (Id : E) return B is
1260 return Flag159 (Id);
1263 function Full_View (Id : E) return E is
1265 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1269 function Generic_Homonym (Id : E) return E is
1271 pragma Assert (Ekind (Id) = E_Generic_Package);
1273 end Generic_Homonym;
1275 function Generic_Renamings (Id : E) return L is
1277 return Elist23 (Id);
1278 end Generic_Renamings;
1280 function Handler_Records (Id : E) return S is
1283 end Handler_Records;
1285 function Has_Aliased_Components (Id : E) return B is
1287 return Flag135 (Implementation_Base_Type (Id));
1288 end Has_Aliased_Components;
1290 function Has_Alignment_Clause (Id : E) return B is
1293 end Has_Alignment_Clause;
1295 function Has_All_Calls_Remote (Id : E) return B is
1298 end Has_All_Calls_Remote;
1300 function Has_Anonymous_Master (Id : E) return B is
1303 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
1304 return Flag253 (Id);
1305 end Has_Anonymous_Master;
1307 function Has_Atomic_Components (Id : E) return B is
1309 return Flag86 (Implementation_Base_Type (Id));
1310 end Has_Atomic_Components;
1312 function Has_Biased_Representation (Id : E) return B is
1314 return Flag139 (Id);
1315 end Has_Biased_Representation;
1317 function Has_Completion (Id : E) return B is
1322 function Has_Completion_In_Body (Id : E) return B is
1324 pragma Assert (Is_Type (Id));
1326 end Has_Completion_In_Body;
1328 function Has_Complex_Representation (Id : E) return B is
1330 pragma Assert (Is_Type (Id));
1331 return Flag140 (Implementation_Base_Type (Id));
1332 end Has_Complex_Representation;
1334 function Has_Component_Size_Clause (Id : E) return B is
1336 pragma Assert (Is_Array_Type (Id));
1337 return Flag68 (Implementation_Base_Type (Id));
1338 end Has_Component_Size_Clause;
1340 function Has_Constrained_Partial_View (Id : E) return B is
1342 pragma Assert (Is_Type (Id));
1343 return Flag187 (Id);
1344 end Has_Constrained_Partial_View;
1346 function Has_Controlled_Component (Id : E) return B is
1348 return Flag43 (Base_Type (Id));
1349 end Has_Controlled_Component;
1351 function Has_Contiguous_Rep (Id : E) return B is
1353 return Flag181 (Id);
1354 end Has_Contiguous_Rep;
1356 function Has_Controlling_Result (Id : E) return B is
1359 end Has_Controlling_Result;
1361 function Has_Convention_Pragma (Id : E) return B is
1363 return Flag119 (Id);
1364 end Has_Convention_Pragma;
1366 function Has_Default_Aspect (Id : E) return B is
1368 return Flag39 (Base_Type (Id));
1369 end Has_Default_Aspect;
1371 function Has_Delayed_Aspects (Id : E) return B is
1373 pragma Assert (Nkind (Id) in N_Entity);
1374 return Flag200 (Id);
1375 end Has_Delayed_Aspects;
1377 function Has_Delayed_Freeze (Id : E) return B is
1379 pragma Assert (Nkind (Id) in N_Entity);
1381 end Has_Delayed_Freeze;
1383 function Has_Discriminants (Id : E) return B is
1385 pragma Assert (Nkind (Id) in N_Entity);
1387 end Has_Discriminants;
1389 function Has_Dispatch_Table (Id : E) return B is
1391 pragma Assert (Is_Tagged_Type (Id));
1392 return Flag220 (Id);
1393 end Has_Dispatch_Table;
1395 function Has_Dynamic_Predicate_Aspect (Id : E) return B is
1397 pragma Assert (Is_Type (Id));
1398 return Flag258 (Id);
1399 end Has_Dynamic_Predicate_Aspect;
1401 function Has_Enumeration_Rep_Clause (Id : E) return B is
1403 pragma Assert (Is_Enumeration_Type (Id));
1405 end Has_Enumeration_Rep_Clause;
1407 function Has_Exit (Id : E) return B is
1412 function Has_External_Tag_Rep_Clause (Id : E) return B is
1414 pragma Assert (Is_Tagged_Type (Id));
1415 return Flag110 (Id);
1416 end Has_External_Tag_Rep_Clause;
1418 function Has_Forward_Instantiation (Id : E) return B is
1420 return Flag175 (Id);
1421 end Has_Forward_Instantiation;
1423 function Has_Fully_Qualified_Name (Id : E) return B is
1425 return Flag173 (Id);
1426 end Has_Fully_Qualified_Name;
1428 function Has_Gigi_Rep_Item (Id : E) return B is
1431 end Has_Gigi_Rep_Item;
1433 function Has_Homonym (Id : E) return B is
1438 function Has_Implicit_Dereference (Id : E) return B is
1440 return Flag251 (Id);
1441 end Has_Implicit_Dereference;
1443 function Has_Independent_Components (Id : E) return B is
1445 pragma Assert (Is_Object (Id) or else Is_Type (Id));
1447 end Has_Independent_Components;
1449 function Has_Inheritable_Invariants (Id : E) return B is
1451 pragma Assert (Is_Type (Id));
1452 return Flag248 (Id);
1453 end Has_Inheritable_Invariants;
1455 function Has_Initial_Value (Id : E) return B is
1457 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1458 return Flag219 (Id);
1459 end Has_Initial_Value;
1461 function Has_Invariants (Id : E) return B is
1463 pragma Assert (Is_Type (Id));
1464 return Flag232 (Id);
1467 function Has_Loop_Entry_Attributes (Id : E) return B is
1469 pragma Assert (Ekind (Id) = E_Loop);
1470 return Flag260 (Id);
1471 end Has_Loop_Entry_Attributes;
1473 function Has_Machine_Radix_Clause (Id : E) return B is
1475 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1477 end Has_Machine_Radix_Clause;
1479 function Has_Master_Entity (Id : E) return B is
1482 end Has_Master_Entity;
1484 function Has_Missing_Return (Id : E) return B is
1486 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1487 return Flag142 (Id);
1488 end Has_Missing_Return;
1490 function Has_Nested_Block_With_Handler (Id : E) return B is
1492 return Flag101 (Id);
1493 end Has_Nested_Block_With_Handler;
1495 function Has_Non_Standard_Rep (Id : E) return B is
1497 return Flag75 (Implementation_Base_Type (Id));
1498 end Has_Non_Standard_Rep;
1500 function Has_Object_Size_Clause (Id : E) return B is
1502 pragma Assert (Is_Type (Id));
1503 return Flag172 (Id);
1504 end Has_Object_Size_Clause;
1506 function Has_Per_Object_Constraint (Id : E) return B is
1508 return Flag154 (Id);
1509 end Has_Per_Object_Constraint;
1511 function Has_Postconditions (Id : E) return B is
1513 pragma Assert (Is_Subprogram (Id));
1514 return Flag240 (Id);
1515 end Has_Postconditions;
1517 function Has_Pragma_Controlled (Id : E) return B is
1519 pragma Assert (Is_Access_Type (Id));
1520 return Flag27 (Implementation_Base_Type (Id));
1521 end Has_Pragma_Controlled;
1523 function Has_Pragma_Elaborate_Body (Id : E) return B is
1525 return Flag150 (Id);
1526 end Has_Pragma_Elaborate_Body;
1528 function Has_Pragma_Inline (Id : E) return B is
1530 return Flag157 (Id);
1531 end Has_Pragma_Inline;
1533 function Has_Pragma_Inline_Always (Id : E) return B is
1535 return Flag230 (Id);
1536 end Has_Pragma_Inline_Always;
1538 function Has_Pragma_No_Inline (Id : E) return B is
1540 return Flag201 (Id);
1541 end Has_Pragma_No_Inline;
1543 function Has_Pragma_Ordered (Id : E) return B is
1545 pragma Assert (Is_Enumeration_Type (Id));
1546 return Flag198 (Implementation_Base_Type (Id));
1547 end Has_Pragma_Ordered;
1549 function Has_Pragma_Pack (Id : E) return B is
1551 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1552 return Flag121 (Implementation_Base_Type (Id));
1553 end Has_Pragma_Pack;
1555 function Has_Pragma_Preelab_Init (Id : E) return B is
1557 return Flag221 (Id);
1558 end Has_Pragma_Preelab_Init;
1560 function Has_Pragma_Pure (Id : E) return B is
1562 return Flag203 (Id);
1563 end Has_Pragma_Pure;
1565 function Has_Pragma_Pure_Function (Id : E) return B is
1567 return Flag179 (Id);
1568 end Has_Pragma_Pure_Function;
1570 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1572 return Flag169 (Id);
1573 end Has_Pragma_Thread_Local_Storage;
1575 function Has_Pragma_Unmodified (Id : E) return B is
1577 return Flag233 (Id);
1578 end Has_Pragma_Unmodified;
1580 function Has_Pragma_Unreferenced (Id : E) return B is
1582 return Flag180 (Id);
1583 end Has_Pragma_Unreferenced;
1585 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1587 pragma Assert (Is_Type (Id));
1588 return Flag212 (Id);
1589 end Has_Pragma_Unreferenced_Objects;
1591 function Has_Predicates (Id : E) return B is
1593 pragma Assert (Is_Type (Id));
1594 return Flag250 (Id);
1597 function Has_Primitive_Operations (Id : E) return B is
1599 pragma Assert (Is_Type (Id));
1600 return Flag120 (Base_Type (Id));
1601 end Has_Primitive_Operations;
1603 function Has_Private_Ancestor (Id : E) return B is
1605 return Flag151 (Id);
1606 end Has_Private_Ancestor;
1608 function Has_Private_Declaration (Id : E) return B is
1610 return Flag155 (Id);
1611 end Has_Private_Declaration;
1613 function Has_Qualified_Name (Id : E) return B is
1615 return Flag161 (Id);
1616 end Has_Qualified_Name;
1618 function Has_RACW (Id : E) return B is
1620 pragma Assert (Ekind (Id) = E_Package);
1621 return Flag214 (Id);
1624 function Has_Record_Rep_Clause (Id : E) return B is
1626 pragma Assert (Is_Record_Type (Id));
1627 return Flag65 (Implementation_Base_Type (Id));
1628 end Has_Record_Rep_Clause;
1630 function Has_Recursive_Call (Id : E) return B is
1632 pragma Assert (Is_Subprogram (Id));
1633 return Flag143 (Id);
1634 end Has_Recursive_Call;
1636 function Has_Size_Clause (Id : E) return B is
1639 end Has_Size_Clause;
1641 function Has_Small_Clause (Id : E) return B is
1644 end Has_Small_Clause;
1646 function Has_Specified_Layout (Id : E) return B is
1648 pragma Assert (Is_Type (Id));
1649 return Flag100 (Implementation_Base_Type (Id));
1650 end Has_Specified_Layout;
1652 function Has_Specified_Stream_Input (Id : E) return B is
1654 pragma Assert (Is_Type (Id));
1655 return Flag190 (Id);
1656 end Has_Specified_Stream_Input;
1658 function Has_Specified_Stream_Output (Id : E) return B is
1660 pragma Assert (Is_Type (Id));
1661 return Flag191 (Id);
1662 end Has_Specified_Stream_Output;
1664 function Has_Specified_Stream_Read (Id : E) return B is
1666 pragma Assert (Is_Type (Id));
1667 return Flag192 (Id);
1668 end Has_Specified_Stream_Read;
1670 function Has_Specified_Stream_Write (Id : E) return B is
1672 pragma Assert (Is_Type (Id));
1673 return Flag193 (Id);
1674 end Has_Specified_Stream_Write;
1676 function Has_Static_Discriminants (Id : E) return B is
1678 pragma Assert (Is_Type (Id));
1679 return Flag211 (Id);
1680 end Has_Static_Discriminants;
1682 function Has_Static_Predicate_Aspect (Id : E) return B is
1684 pragma Assert (Is_Type (Id));
1685 return Flag259 (Id);
1686 end Has_Static_Predicate_Aspect;
1688 function Has_Storage_Size_Clause (Id : E) return B is
1690 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1691 return Flag23 (Implementation_Base_Type (Id));
1692 end Has_Storage_Size_Clause;
1694 function Has_Stream_Size_Clause (Id : E) return B is
1696 return Flag184 (Id);
1697 end Has_Stream_Size_Clause;
1699 function Has_Task (Id : E) return B is
1701 return Flag30 (Base_Type (Id));
1704 function Has_Thunks (Id : E) return B is
1706 return Flag228 (Id);
1709 function Has_Unchecked_Union (Id : E) return B is
1711 return Flag123 (Base_Type (Id));
1712 end Has_Unchecked_Union;
1714 function Has_Unknown_Discriminants (Id : E) return B is
1716 pragma Assert (Is_Type (Id));
1718 end Has_Unknown_Discriminants;
1720 function Has_Up_Level_Access (Id : E) return B is
1723 (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
1724 return Flag215 (Id);
1725 end Has_Up_Level_Access;
1727 function Has_Volatile_Components (Id : E) return B is
1729 return Flag87 (Implementation_Base_Type (Id));
1730 end Has_Volatile_Components;
1732 function Has_Xref_Entry (Id : E) return B is
1734 return Flag182 (Id);
1737 function Hiding_Loop_Variable (Id : E) return E is
1739 pragma Assert (Ekind (Id) = E_Variable);
1741 end Hiding_Loop_Variable;
1743 function Homonym (Id : E) return E is
1748 function Interface_Alias (Id : E) return E is
1750 pragma Assert (Is_Subprogram (Id));
1752 end Interface_Alias;
1754 function Interfaces (Id : E) return L is
1756 pragma Assert (Is_Record_Type (Id));
1757 return Elist25 (Id);
1760 function In_Package_Body (Id : E) return B is
1763 end In_Package_Body;
1765 function In_Private_Part (Id : E) return B is
1768 end In_Private_Part;
1770 function In_Use (Id : E) return B is
1772 pragma Assert (Nkind (Id) in N_Entity);
1776 function Initialization_Statements (Id : E) return N is
1778 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
1780 end Initialization_Statements;
1782 function Integrity_Level (Id : E) return U is
1784 pragma Assert (Ekind (Id) = E_Abstract_State);
1786 end Integrity_Level;
1788 function Inner_Instances (Id : E) return L is
1790 return Elist23 (Id);
1791 end Inner_Instances;
1793 function Interface_Name (Id : E) return N is
1798 function Is_Abstract_Subprogram (Id : E) return B is
1800 pragma Assert (Is_Overloadable (Id));
1802 end Is_Abstract_Subprogram;
1804 function Is_Abstract_Type (Id : E) return B is
1806 pragma Assert (Is_Type (Id));
1807 return Flag146 (Id);
1808 end Is_Abstract_Type;
1810 function Is_Local_Anonymous_Access (Id : E) return B is
1812 pragma Assert (Is_Access_Type (Id));
1813 return Flag194 (Id);
1814 end Is_Local_Anonymous_Access;
1816 function Is_Access_Constant (Id : E) return B is
1818 pragma Assert (Is_Access_Type (Id));
1820 end Is_Access_Constant;
1822 function Is_Ada_2005_Only (Id : E) return B is
1824 return Flag185 (Id);
1825 end Is_Ada_2005_Only;
1827 function Is_Ada_2012_Only (Id : E) return B is
1829 return Flag199 (Id);
1830 end Is_Ada_2012_Only;
1832 function Is_Aliased (Id : E) return B is
1834 pragma Assert (Nkind (Id) in N_Entity);
1838 function Is_AST_Entry (Id : E) return B is
1840 pragma Assert (Is_Entry (Id));
1841 return Flag132 (Id);
1844 function Is_Asynchronous (Id : E) return B is
1846 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1848 end Is_Asynchronous;
1850 function Is_Atomic (Id : E) return B is
1855 function Is_Bit_Packed_Array (Id : E) return B is
1857 return Flag122 (Implementation_Base_Type (Id));
1858 end Is_Bit_Packed_Array;
1860 function Is_Called (Id : E) return B is
1862 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1863 return Flag102 (Id);
1866 function Is_Character_Type (Id : E) return B is
1869 end Is_Character_Type;
1871 function Is_Child_Unit (Id : E) return B is
1876 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1879 end Is_Class_Wide_Equivalent_Type;
1881 function Is_Compilation_Unit (Id : E) return B is
1883 return Flag149 (Id);
1884 end Is_Compilation_Unit;
1886 function Is_Completely_Hidden (Id : E) return B is
1888 pragma Assert (Ekind (Id) = E_Discriminant);
1889 return Flag103 (Id);
1890 end Is_Completely_Hidden;
1892 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1895 end Is_Constr_Subt_For_U_Nominal;
1897 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1899 return Flag141 (Id);
1900 end Is_Constr_Subt_For_UN_Aliased;
1902 function Is_Constrained (Id : E) return B is
1904 pragma Assert (Nkind (Id) in N_Entity);
1908 function Is_Constructor (Id : E) return B is
1913 function Is_Controlled (Id : E) return B is
1915 return Flag42 (Base_Type (Id));
1918 function Is_Controlling_Formal (Id : E) return B is
1920 pragma Assert (Is_Formal (Id));
1922 end Is_Controlling_Formal;
1924 function Is_CPP_Class (Id : E) return B is
1929 function Is_Descendent_Of_Address (Id : E) return B is
1931 pragma Assert (Is_Type (Id));
1932 return Flag223 (Id);
1933 end Is_Descendent_Of_Address;
1935 function Is_Discrim_SO_Function (Id : E) return B is
1937 return Flag176 (Id);
1938 end Is_Discrim_SO_Function;
1940 function Is_Dispatch_Table_Entity (Id : E) return B is
1942 return Flag234 (Id);
1943 end Is_Dispatch_Table_Entity;
1945 function Is_Dispatching_Operation (Id : E) return B is
1947 pragma Assert (Nkind (Id) in N_Entity);
1949 end Is_Dispatching_Operation;
1951 function Is_Eliminated (Id : E) return B is
1953 return Flag124 (Id);
1956 function Is_Entry_Formal (Id : E) return B is
1959 end Is_Entry_Formal;
1961 function Is_Exported (Id : E) return B is
1966 function Is_First_Subtype (Id : E) return B is
1969 end Is_First_Subtype;
1971 function Is_For_Access_Subtype (Id : E) return B is
1973 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
1974 return Flag118 (Id);
1975 end Is_For_Access_Subtype;
1977 function Is_Formal_Subprogram (Id : E) return B is
1979 return Flag111 (Id);
1980 end Is_Formal_Subprogram;
1982 function Is_Frozen (Id : E) return B is
1987 function Is_Generic_Actual_Type (Id : E) return B is
1989 pragma Assert (Is_Type (Id));
1991 end Is_Generic_Actual_Type;
1993 function Is_Generic_Instance (Id : E) return B is
1995 return Flag130 (Id);
1996 end Is_Generic_Instance;
1998 function Is_Generic_Type (Id : E) return B is
2000 pragma Assert (Nkind (Id) in N_Entity);
2002 end Is_Generic_Type;
2004 function Is_Hidden (Id : E) return B is
2009 function Is_Hidden_Open_Scope (Id : E) return B is
2011 return Flag171 (Id);
2012 end Is_Hidden_Open_Scope;
2014 function Is_Immediately_Visible (Id : E) return B is
2016 pragma Assert (Nkind (Id) in N_Entity);
2018 end Is_Immediately_Visible;
2020 function Is_Implementation_Defined (Id : E) return B is
2022 return Flag254 (Id);
2023 end Is_Implementation_Defined;
2025 function Is_Imported (Id : E) return B is
2030 function Is_Inlined (Id : E) return B is
2035 function Is_Interface (Id : E) return B is
2037 return Flag186 (Id);
2040 function Is_Instantiated (Id : E) return B is
2042 return Flag126 (Id);
2043 end Is_Instantiated;
2045 function Is_Internal (Id : E) return B is
2047 pragma Assert (Nkind (Id) in N_Entity);
2051 function Is_Interrupt_Handler (Id : E) return B is
2053 pragma Assert (Nkind (Id) in N_Entity);
2055 end Is_Interrupt_Handler;
2057 function Is_Intrinsic_Subprogram (Id : E) return B is
2060 end Is_Intrinsic_Subprogram;
2062 function Is_Invariant_Procedure (Id : E) return B is
2064 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2065 return Flag257 (Id);
2066 end Is_Invariant_Procedure;
2068 function Is_Itype (Id : E) return B is
2073 function Is_Known_Non_Null (Id : E) return B is
2076 end Is_Known_Non_Null;
2078 function Is_Known_Null (Id : E) return B is
2080 return Flag204 (Id);
2083 function Is_Known_Valid (Id : E) return B is
2085 return Flag170 (Id);
2088 function Is_Limited_Composite (Id : E) return B is
2090 return Flag106 (Id);
2091 end Is_Limited_Composite;
2093 function Is_Limited_Interface (Id : E) return B is
2095 return Flag197 (Id);
2096 end Is_Limited_Interface;
2098 function Is_Limited_Record (Id : E) return B is
2101 end Is_Limited_Record;
2103 function Is_Machine_Code_Subprogram (Id : E) return B is
2105 pragma Assert (Is_Subprogram (Id));
2106 return Flag137 (Id);
2107 end Is_Machine_Code_Subprogram;
2109 function Is_Non_Static_Subtype (Id : E) return B is
2111 pragma Assert (Is_Type (Id));
2112 return Flag109 (Id);
2113 end Is_Non_Static_Subtype;
2115 function Is_Null_Init_Proc (Id : E) return B is
2117 pragma Assert (Ekind (Id) = E_Procedure);
2118 return Flag178 (Id);
2119 end Is_Null_Init_Proc;
2121 function Is_Obsolescent (Id : E) return B is
2123 return Flag153 (Id);
2126 function Is_Only_Out_Parameter (Id : E) return B is
2128 pragma Assert (Is_Formal (Id));
2129 return Flag226 (Id);
2130 end Is_Only_Out_Parameter;
2132 function Is_Optional_Parameter (Id : E) return B is
2134 pragma Assert (Is_Formal (Id));
2135 return Flag134 (Id);
2136 end Is_Optional_Parameter;
2138 function Is_Package_Body_Entity (Id : E) return B is
2140 return Flag160 (Id);
2141 end Is_Package_Body_Entity;
2143 function Is_Packed (Id : E) return B is
2145 return Flag51 (Implementation_Base_Type (Id));
2148 function Is_Packed_Array_Type (Id : E) return B is
2150 return Flag138 (Id);
2151 end Is_Packed_Array_Type;
2153 function Is_Potentially_Use_Visible (Id : E) return B is
2155 pragma Assert (Nkind (Id) in N_Entity);
2157 end Is_Potentially_Use_Visible;
2159 function Is_Predicate_Function (Id : E) return B is
2161 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2162 return Flag255 (Id);
2163 end Is_Predicate_Function;
2165 function Is_Predicate_Function_M (Id : E) return B is
2167 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2168 return Flag256 (Id);
2169 end Is_Predicate_Function_M;
2171 function Is_Preelaborated (Id : E) return B is
2174 end Is_Preelaborated;
2176 function Is_Primitive (Id : E) return B is
2179 (Is_Overloadable (Id)
2180 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
2181 return Flag218 (Id);
2184 function Is_Primitive_Wrapper (Id : E) return B is
2186 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2187 return Flag195 (Id);
2188 end Is_Primitive_Wrapper;
2190 function Is_Private_Composite (Id : E) return B is
2192 pragma Assert (Is_Type (Id));
2193 return Flag107 (Id);
2194 end Is_Private_Composite;
2196 function Is_Private_Descendant (Id : E) return B is
2199 end Is_Private_Descendant;
2201 function Is_Private_Primitive (Id : E) return B is
2203 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2204 return Flag245 (Id);
2205 end Is_Private_Primitive;
2207 function Is_Processed_Transient (Id : E) return B is
2209 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2210 return Flag252 (Id);
2211 end Is_Processed_Transient;
2213 function Is_Public (Id : E) return B is
2215 pragma Assert (Nkind (Id) in N_Entity);
2219 function Is_Pure (Id : E) return B is
2224 function Is_Pure_Unit_Access_Type (Id : E) return B is
2226 pragma Assert (Is_Access_Type (Id));
2227 return Flag189 (Id);
2228 end Is_Pure_Unit_Access_Type;
2230 function Is_RACW_Stub_Type (Id : E) return B is
2232 pragma Assert (Is_Type (Id));
2233 return Flag244 (Id);
2234 end Is_RACW_Stub_Type;
2236 function Is_Raised (Id : E) return B is
2238 pragma Assert (Ekind (Id) = E_Exception);
2239 return Flag224 (Id);
2242 function Is_Remote_Call_Interface (Id : E) return B is
2245 end Is_Remote_Call_Interface;
2247 function Is_Remote_Types (Id : E) return B is
2250 end Is_Remote_Types;
2252 function Is_Renaming_Of_Object (Id : E) return B is
2254 return Flag112 (Id);
2255 end Is_Renaming_Of_Object;
2257 function Is_Return_Object (Id : E) return B is
2259 return Flag209 (Id);
2260 end Is_Return_Object;
2262 function Is_Safe_To_Reevaluate (Id : E) return B is
2264 return Flag249 (Id);
2265 end Is_Safe_To_Reevaluate;
2267 function Is_Shared_Passive (Id : E) return B is
2270 end Is_Shared_Passive;
2272 function Is_Statically_Allocated (Id : E) return B is
2275 end Is_Statically_Allocated;
2277 function Is_Tag (Id : E) return B is
2279 pragma Assert (Nkind (Id) in N_Entity);
2283 function Is_Tagged_Type (Id : E) return B is
2288 function Is_Thunk (Id : E) return B is
2290 return Flag225 (Id);
2293 function Is_Trivial_Subprogram (Id : E) return B is
2295 return Flag235 (Id);
2296 end Is_Trivial_Subprogram;
2298 function Is_True_Constant (Id : E) return B is
2300 return Flag163 (Id);
2301 end Is_True_Constant;
2303 function Is_Unchecked_Union (Id : E) return B is
2305 return Flag117 (Implementation_Base_Type (Id));
2306 end Is_Unchecked_Union;
2308 function Is_Underlying_Record_View (Id : E) return B is
2310 return Flag246 (Id);
2311 end Is_Underlying_Record_View;
2313 function Is_Unsigned_Type (Id : E) return B is
2315 pragma Assert (Is_Type (Id));
2316 return Flag144 (Id);
2317 end Is_Unsigned_Type;
2319 function Is_Valued_Procedure (Id : E) return B is
2321 pragma Assert (Ekind (Id) = E_Procedure);
2322 return Flag127 (Id);
2323 end Is_Valued_Procedure;
2325 function Is_Visible_Formal (Id : E) return B is
2327 return Flag206 (Id);
2328 end Is_Visible_Formal;
2330 function Is_Visible_Lib_Unit (Id : E) return B is
2332 return Flag116 (Id);
2333 end Is_Visible_Lib_Unit;
2335 function Is_VMS_Exception (Id : E) return B is
2337 return Flag133 (Id);
2338 end Is_VMS_Exception;
2340 function Is_Volatile (Id : E) return B is
2342 pragma Assert (Nkind (Id) in N_Entity);
2344 if Is_Type (Id) then
2345 return Flag16 (Base_Type (Id));
2351 function Itype_Printed (Id : E) return B is
2353 pragma Assert (Is_Itype (Id));
2354 return Flag202 (Id);
2357 function Kill_Elaboration_Checks (Id : E) return B is
2360 end Kill_Elaboration_Checks;
2362 function Kill_Range_Checks (Id : E) return B is
2365 end Kill_Range_Checks;
2367 function Known_To_Have_Preelab_Init (Id : E) return B is
2369 pragma Assert (Is_Type (Id));
2370 return Flag207 (Id);
2371 end Known_To_Have_Preelab_Init;
2373 function Last_Assignment (Id : E) return N is
2375 pragma Assert (Is_Assignable (Id));
2377 end Last_Assignment;
2379 function Last_Entity (Id : E) return E is
2384 function Limited_View (Id : E) return E is
2386 pragma Assert (Ekind (Id) = E_Package);
2390 function Lit_Indexes (Id : E) return E is
2392 pragma Assert (Is_Enumeration_Type (Id));
2396 function Lit_Strings (Id : E) return E is
2398 pragma Assert (Is_Enumeration_Type (Id));
2402 function Low_Bound_Tested (Id : E) return B is
2404 return Flag205 (Id);
2405 end Low_Bound_Tested;
2407 function Machine_Radix_10 (Id : E) return B is
2409 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2411 end Machine_Radix_10;
2413 function Master_Id (Id : E) return E is
2415 pragma Assert (Is_Access_Type (Id));
2419 function Materialize_Entity (Id : E) return B is
2421 return Flag168 (Id);
2422 end Materialize_Entity;
2424 function Mechanism (Id : E) return M is
2426 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2427 return UI_To_Int (Uint8 (Id));
2430 function Modulus (Id : E) return Uint is
2432 pragma Assert (Is_Modular_Integer_Type (Id));
2433 return Uint17 (Base_Type (Id));
2436 function Must_Be_On_Byte_Boundary (Id : E) return B is
2438 pragma Assert (Is_Type (Id));
2439 return Flag183 (Id);
2440 end Must_Be_On_Byte_Boundary;
2442 function Must_Have_Preelab_Init (Id : E) return B is
2444 pragma Assert (Is_Type (Id));
2445 return Flag208 (Id);
2446 end Must_Have_Preelab_Init;
2448 function Needs_Debug_Info (Id : E) return B is
2450 return Flag147 (Id);
2451 end Needs_Debug_Info;
2453 function Needs_No_Actuals (Id : E) return B is
2456 (Is_Overloadable (Id)
2457 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2459 end Needs_No_Actuals;
2461 function Never_Set_In_Source (Id : E) return B is
2463 return Flag115 (Id);
2464 end Never_Set_In_Source;
2466 function Next_Inlined_Subprogram (Id : E) return E is
2469 end Next_Inlined_Subprogram;
2471 function No_Pool_Assigned (Id : E) return B is
2473 pragma Assert (Is_Access_Type (Id));
2474 return Flag131 (Root_Type (Id));
2475 end No_Pool_Assigned;
2477 function No_Return (Id : E) return B is
2479 return Flag113 (Id);
2482 function No_Strict_Aliasing (Id : E) return B is
2484 pragma Assert (Is_Access_Type (Id));
2485 return Flag136 (Base_Type (Id));
2486 end No_Strict_Aliasing;
2488 function Non_Binary_Modulus (Id : E) return B is
2490 pragma Assert (Is_Type (Id));
2491 return Flag58 (Base_Type (Id));
2492 end Non_Binary_Modulus;
2494 function Non_Limited_View (Id : E) return E is
2496 pragma Assert (Ekind (Id) in Incomplete_Kind);
2498 end Non_Limited_View;
2500 function Nonzero_Is_True (Id : E) return B is
2502 pragma Assert (Root_Type (Id) = Standard_Boolean);
2503 return Flag162 (Base_Type (Id));
2504 end Nonzero_Is_True;
2506 function Normalized_First_Bit (Id : E) return U is
2508 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2510 end Normalized_First_Bit;
2512 function Normalized_Position (Id : E) return U is
2514 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2516 end Normalized_Position;
2518 function Normalized_Position_Max (Id : E) return U is
2520 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2522 end Normalized_Position_Max;
2524 function OK_To_Rename (Id : E) return B is
2526 pragma Assert (Ekind (Id) = E_Variable);
2527 return Flag247 (Id);
2530 function OK_To_Reorder_Components (Id : E) return B is
2532 pragma Assert (Is_Record_Type (Id));
2533 return Flag239 (Base_Type (Id));
2534 end OK_To_Reorder_Components;
2536 function Optimize_Alignment_Space (Id : E) return B is
2539 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2540 return Flag241 (Id);
2541 end Optimize_Alignment_Space;
2543 function Optimize_Alignment_Time (Id : E) return B is
2546 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2547 return Flag242 (Id);
2548 end Optimize_Alignment_Time;
2550 function Original_Access_Type (Id : E) return E is
2552 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2554 end Original_Access_Type;
2556 function Original_Array_Type (Id : E) return E is
2558 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2560 end Original_Array_Type;
2562 function Original_Record_Component (Id : E) return E is
2564 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2566 end Original_Record_Component;
2568 function Overlays_Constant (Id : E) return B is
2570 return Flag243 (Id);
2571 end Overlays_Constant;
2573 function Overridden_Operation (Id : E) return E is
2576 end Overridden_Operation;
2578 function Package_Instantiation (Id : E) return N is
2580 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2582 end Package_Instantiation;
2584 function Packed_Array_Type (Id : E) return E is
2586 pragma Assert (Is_Array_Type (Id));
2588 end Packed_Array_Type;
2590 function Parent_Subtype (Id : E) return E is
2592 pragma Assert (Is_Record_Type (Id));
2593 return Node19 (Base_Type (Id));
2596 function Postcondition_Proc (Id : E) return E is
2598 pragma Assert (Ekind (Id) = E_Procedure);
2600 end Postcondition_Proc;
2602 function PPC_Wrapper (Id : E) return E is
2604 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2608 function Prival (Id : E) return E is
2610 pragma Assert (Is_Protected_Component (Id));
2614 function Prival_Link (Id : E) return E is
2616 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2620 function Private_Dependents (Id : E) return L is
2622 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2623 return Elist18 (Id);
2624 end Private_Dependents;
2626 function Private_View (Id : E) return N is
2628 pragma Assert (Is_Private_Type (Id));
2632 function Protected_Body_Subprogram (Id : E) return E is
2634 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2636 end Protected_Body_Subprogram;
2638 function Protected_Formal (Id : E) return E is
2640 pragma Assert (Is_Formal (Id));
2642 end Protected_Formal;
2644 function Protection_Object (Id : E) return E is
2647 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2649 end Protection_Object;
2651 function Reachable (Id : E) return B is
2656 function Referenced (Id : E) return B is
2658 return Flag156 (Id);
2661 function Referenced_As_LHS (Id : E) return B is
2664 end Referenced_As_LHS;
2666 function Referenced_As_Out_Parameter (Id : E) return B is
2668 return Flag227 (Id);
2669 end Referenced_As_Out_Parameter;
2671 function Refined_State (Id : E) return E is
2673 pragma Assert (Ekind (Id) = E_Abstract_State);
2677 function Register_Exception_Call (Id : E) return N is
2679 pragma Assert (Ekind (Id) = E_Exception);
2681 end Register_Exception_Call;
2683 function Related_Array_Object (Id : E) return E is
2685 pragma Assert (Is_Array_Type (Id));
2687 end Related_Array_Object;
2689 function Related_Expression (Id : E) return N is
2691 pragma Assert (Ekind (Id) in Type_Kind
2692 or else Ekind_In (Id, E_Constant, E_Variable));
2694 end Related_Expression;
2696 function Related_Instance (Id : E) return E is
2698 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2700 end Related_Instance;
2702 function Related_Type (Id : E) return E is
2704 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2708 function Relative_Deadline_Variable (Id : E) return E is
2710 pragma Assert (Is_Task_Type (Id));
2711 return Node26 (Implementation_Base_Type (Id));
2712 end Relative_Deadline_Variable;
2714 function Renamed_Entity (Id : E) return N is
2719 function Renamed_In_Spec (Id : E) return B is
2721 pragma Assert (Ekind (Id) = E_Package);
2722 return Flag231 (Id);
2723 end Renamed_In_Spec;
2725 function Renamed_Object (Id : E) return N is
2730 function Renaming_Map (Id : E) return U is
2735 function Requires_Overriding (Id : E) return B is
2737 pragma Assert (Is_Overloadable (Id));
2738 return Flag213 (Id);
2739 end Requires_Overriding;
2741 function Return_Present (Id : E) return B is
2746 function Return_Applies_To (Id : E) return N is
2749 end Return_Applies_To;
2751 function Returns_By_Ref (Id : E) return B is
2756 function Reverse_Bit_Order (Id : E) return B is
2758 pragma Assert (Is_Record_Type (Id));
2759 return Flag164 (Base_Type (Id));
2760 end Reverse_Bit_Order;
2762 function Reverse_Storage_Order (Id : E) return B is
2764 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
2765 return Flag93 (Base_Type (Id));
2766 end Reverse_Storage_Order;
2768 function RM_Size (Id : E) return U is
2770 pragma Assert (Is_Type (Id));
2774 function Scalar_Range (Id : E) return N is
2779 function Scale_Value (Id : E) return U is
2784 function Scope_Depth_Value (Id : E) return U is
2787 end Scope_Depth_Value;
2789 function Sec_Stack_Needed_For_Return (Id : E) return B is
2791 return Flag167 (Id);
2792 end Sec_Stack_Needed_For_Return;
2794 function Shadow_Entities (Id : E) return S is
2796 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2798 end Shadow_Entities;
2800 function Shared_Var_Procs_Instance (Id : E) return E is
2802 pragma Assert (Ekind (Id) = E_Variable);
2804 end Shared_Var_Procs_Instance;
2806 function Size_Check_Code (Id : E) return N is
2808 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2810 end Size_Check_Code;
2812 function Size_Depends_On_Discriminant (Id : E) return B is
2814 return Flag177 (Id);
2815 end Size_Depends_On_Discriminant;
2817 function Size_Known_At_Compile_Time (Id : E) return B is
2820 end Size_Known_At_Compile_Time;
2822 function Small_Value (Id : E) return R is
2824 pragma Assert (Is_Fixed_Point_Type (Id));
2825 return Ureal21 (Id);
2828 function SPARK_Mode_Pragmas (Id : E) return N is
2831 (Ekind_In (Id, E_Function, -- subprogram variants
2833 E_Generic_Procedure,
2837 Ekind_In (Id, E_Generic_Package, -- package variants
2841 end SPARK_Mode_Pragmas;
2843 function Spec_Entity (Id : E) return E is
2845 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2849 function Static_Predicate (Id : E) return S is
2851 pragma Assert (Is_Discrete_Type (Id));
2853 end Static_Predicate;
2855 function Status_Flag_Or_Transient_Decl (Id : E) return N is
2857 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2859 end Status_Flag_Or_Transient_Decl;
2861 function Storage_Size_Variable (Id : E) return E is
2863 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2864 return Node15 (Implementation_Base_Type (Id));
2865 end Storage_Size_Variable;
2867 function Static_Elaboration_Desired (Id : E) return B is
2869 pragma Assert (Ekind (Id) = E_Package);
2871 end Static_Elaboration_Desired;
2873 function Static_Initialization (Id : E) return N is
2876 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
2878 end Static_Initialization;
2880 function Stored_Constraint (Id : E) return L is
2883 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
2884 return Elist23 (Id);
2885 end Stored_Constraint;
2887 function Strict_Alignment (Id : E) return B is
2889 return Flag145 (Implementation_Base_Type (Id));
2890 end Strict_Alignment;
2892 function String_Literal_Length (Id : E) return U is
2895 end String_Literal_Length;
2897 function String_Literal_Low_Bound (Id : E) return N is
2900 end String_Literal_Low_Bound;
2902 function Subprograms_For_Type (Id : E) return E is
2904 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
2906 end Subprograms_For_Type;
2908 function Suppress_Elaboration_Warnings (Id : E) return B is
2910 return Flag148 (Id);
2911 end Suppress_Elaboration_Warnings;
2913 function Suppress_Initialization (Id : E) return B is
2915 pragma Assert (Is_Type (Id));
2916 return Flag105 (Id);
2917 end Suppress_Initialization;
2919 function Suppress_Style_Checks (Id : E) return B is
2921 return Flag165 (Id);
2922 end Suppress_Style_Checks;
2924 function Suppress_Value_Tracking_On_Call (Id : E) return B is
2926 return Flag217 (Id);
2927 end Suppress_Value_Tracking_On_Call;
2929 function Task_Body_Procedure (Id : E) return N is
2931 pragma Assert (Ekind (Id) in Task_Kind);
2933 end Task_Body_Procedure;
2935 function Thunk_Entity (Id : E) return E is
2937 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
2938 and then Is_Thunk (Id));
2942 function Treat_As_Volatile (Id : E) return B is
2945 end Treat_As_Volatile;
2947 function Underlying_Full_View (Id : E) return E is
2949 pragma Assert (Ekind (Id) in Private_Kind);
2951 end Underlying_Full_View;
2953 function Underlying_Record_View (Id : E) return E is
2956 end Underlying_Record_View;
2958 function Universal_Aliasing (Id : E) return B is
2960 pragma Assert (Is_Type (Id));
2961 return Flag216 (Implementation_Base_Type (Id));
2962 end Universal_Aliasing;
2964 function Unset_Reference (Id : E) return N is
2967 end Unset_Reference;
2969 function Used_As_Generic_Actual (Id : E) return B is
2971 return Flag222 (Id);
2972 end Used_As_Generic_Actual;
2974 function Uses_Lock_Free (Id : E) return B is
2976 pragma Assert (Is_Protected_Type (Id));
2977 return Flag188 (Id);
2980 function Uses_Sec_Stack (Id : E) return B is
2985 function Warnings_Off (Id : E) return B is
2990 function Warnings_Off_Used (Id : E) return B is
2992 return Flag236 (Id);
2993 end Warnings_Off_Used;
2995 function Warnings_Off_Used_Unmodified (Id : E) return B is
2997 return Flag237 (Id);
2998 end Warnings_Off_Used_Unmodified;
3000 function Warnings_Off_Used_Unreferenced (Id : E) return B is
3002 return Flag238 (Id);
3003 end Warnings_Off_Used_Unreferenced;
3005 function Wrapped_Entity (Id : E) return E is
3007 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3008 and then Is_Primitive_Wrapper (Id));
3012 function Was_Hidden (Id : E) return B is
3014 return Flag196 (Id);
3017 ------------------------------
3018 -- Classification Functions --
3019 ------------------------------
3021 function Is_Access_Type (Id : E) return B is
3023 return Ekind (Id) in Access_Kind;
3026 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
3028 return Ekind (Id) in Access_Protected_Kind;
3029 end Is_Access_Protected_Subprogram_Type;
3031 function Is_Access_Subprogram_Type (Id : E) return B is
3033 return Ekind (Id) in Access_Subprogram_Kind;
3034 end Is_Access_Subprogram_Type;
3036 function Is_Aggregate_Type (Id : E) return B is
3038 return Ekind (Id) in Aggregate_Kind;
3039 end Is_Aggregate_Type;
3041 function Is_Array_Type (Id : E) return B is
3043 return Ekind (Id) in Array_Kind;
3046 function Is_Assignable (Id : E) return B is
3048 return Ekind (Id) in Assignable_Kind;
3051 function Is_Class_Wide_Type (Id : E) return B is
3053 return Ekind (Id) in Class_Wide_Kind;
3054 end Is_Class_Wide_Type;
3056 function Is_Composite_Type (Id : E) return B is
3058 return Ekind (Id) in Composite_Kind;
3059 end Is_Composite_Type;
3061 function Is_Concurrent_Body (Id : E) return B is
3063 return Ekind (Id) in
3064 Concurrent_Body_Kind;
3065 end Is_Concurrent_Body;
3067 function Is_Concurrent_Record_Type (Id : E) return B is
3070 end Is_Concurrent_Record_Type;
3072 function Is_Concurrent_Type (Id : E) return B is
3074 return Ekind (Id) in Concurrent_Kind;
3075 end Is_Concurrent_Type;
3077 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
3079 return Ekind (Id) in
3080 Decimal_Fixed_Point_Kind;
3081 end Is_Decimal_Fixed_Point_Type;
3083 function Is_Digits_Type (Id : E) return B is
3085 return Ekind (Id) in Digits_Kind;
3088 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
3090 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
3091 end Is_Discrete_Or_Fixed_Point_Type;
3093 function Is_Discrete_Type (Id : E) return B is
3095 return Ekind (Id) in Discrete_Kind;
3096 end Is_Discrete_Type;
3098 function Is_Elementary_Type (Id : E) return B is
3100 return Ekind (Id) in Elementary_Kind;
3101 end Is_Elementary_Type;
3103 function Is_Entry (Id : E) return B is
3105 return Ekind (Id) in Entry_Kind;
3108 function Is_Enumeration_Type (Id : E) return B is
3110 return Ekind (Id) in
3112 end Is_Enumeration_Type;
3114 function Is_Fixed_Point_Type (Id : E) return B is
3116 return Ekind (Id) in
3118 end Is_Fixed_Point_Type;
3120 function Is_Floating_Point_Type (Id : E) return B is
3122 return Ekind (Id) in Float_Kind;
3123 end Is_Floating_Point_Type;
3125 function Is_Formal (Id : E) return B is
3127 return Ekind (Id) in Formal_Kind;
3130 function Is_Formal_Object (Id : E) return B is
3132 return Ekind (Id) in Formal_Object_Kind;
3133 end Is_Formal_Object;
3135 function Is_Generic_Subprogram (Id : E) return B is
3137 return Ekind (Id) in Generic_Subprogram_Kind;
3138 end Is_Generic_Subprogram;
3140 function Is_Generic_Unit (Id : E) return B is
3142 return Ekind (Id) in Generic_Unit_Kind;
3143 end Is_Generic_Unit;
3145 function Is_Incomplete_Or_Private_Type (Id : E) return B is
3147 return Ekind (Id) in
3148 Incomplete_Or_Private_Kind;
3149 end Is_Incomplete_Or_Private_Type;
3151 function Is_Incomplete_Type (Id : E) return B is
3153 return Ekind (Id) in
3155 end Is_Incomplete_Type;
3157 function Is_Integer_Type (Id : E) return B is
3159 return Ekind (Id) in Integer_Kind;
3160 end Is_Integer_Type;
3162 function Is_Modular_Integer_Type (Id : E) return B is
3164 return Ekind (Id) in
3165 Modular_Integer_Kind;
3166 end Is_Modular_Integer_Type;
3168 function Is_Named_Number (Id : E) return B is
3170 return Ekind (Id) in Named_Kind;
3171 end Is_Named_Number;
3173 function Is_Numeric_Type (Id : E) return B is
3175 return Ekind (Id) in Numeric_Kind;
3176 end Is_Numeric_Type;
3178 function Is_Object (Id : E) return B is
3180 return Ekind (Id) in Object_Kind;
3183 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
3185 return Ekind (Id) in
3186 Ordinary_Fixed_Point_Kind;
3187 end Is_Ordinary_Fixed_Point_Type;
3189 function Is_Overloadable (Id : E) return B is
3191 return Ekind (Id) in Overloadable_Kind;
3192 end Is_Overloadable;
3194 function Is_Private_Type (Id : E) return B is
3196 return Ekind (Id) in Private_Kind;
3197 end Is_Private_Type;
3199 function Is_Protected_Type (Id : E) return B is
3201 return Ekind (Id) in Protected_Kind;
3202 end Is_Protected_Type;
3204 function Is_Real_Type (Id : E) return B is
3206 return Ekind (Id) in Real_Kind;
3209 function Is_Record_Type (Id : E) return B is
3211 return Ekind (Id) in Record_Kind;
3214 function Is_Scalar_Type (Id : E) return B is
3216 return Ekind (Id) in Scalar_Kind;
3219 function Is_Signed_Integer_Type (Id : E) return B is
3221 return Ekind (Id) in Signed_Integer_Kind;
3222 end Is_Signed_Integer_Type;
3224 function Is_Subprogram (Id : E) return B is
3226 return Ekind (Id) in Subprogram_Kind;
3229 function Is_Task_Type (Id : E) return B is
3231 return Ekind (Id) in Task_Kind;
3234 function Is_Type (Id : E) return B is
3236 return Ekind (Id) in Type_Kind;
3239 ------------------------------
3240 -- Attribute Set Procedures --
3241 ------------------------------
3243 -- Note: in many of these set procedures an "obvious" assertion is missing.
3244 -- The reason for this is that in many cases, a field is set before the
3245 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3246 -- it is possible to add assertions that specifically include the E_Void
3247 -- possibility, but in some cases, we just omit the assertions.
3249 procedure Set_Abstract_States (Id : E; V : L) is
3251 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
3252 Set_Elist25 (Id, V);
3253 end Set_Abstract_States;
3255 procedure Set_Accept_Address (Id : E; V : L) is
3257 Set_Elist21 (Id, V);
3258 end Set_Accept_Address;
3260 procedure Set_Access_Disp_Table (Id : E; V : L) is
3262 pragma Assert (Ekind (Id) = E_Record_Type
3263 and then Id = Implementation_Base_Type (Id));
3264 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3265 Set_Elist16 (Id, V);
3266 end Set_Access_Disp_Table;
3268 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3271 end Set_Associated_Formal_Package;
3273 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3276 end Set_Associated_Node_For_Itype;
3278 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3280 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3282 end Set_Associated_Storage_Pool;
3284 procedure Set_Actual_Subtype (Id : E; V : E) is
3287 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3288 or else Is_Formal (Id));
3290 end Set_Actual_Subtype;
3292 procedure Set_Address_Taken (Id : E; V : B := True) is
3294 Set_Flag104 (Id, V);
3295 end Set_Address_Taken;
3297 procedure Set_Alias (Id : E; V : E) is
3300 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3304 procedure Set_Alignment (Id : E; V : U) is
3306 pragma Assert (Is_Type (Id)
3307 or else Is_Formal (Id)
3308 or else Ekind_In (Id, E_Loop_Parameter,
3315 procedure Set_Barrier_Function (Id : E; V : N) is
3317 pragma Assert (Is_Entry (Id));
3319 end Set_Barrier_Function;
3321 procedure Set_Block_Node (Id : E; V : N) is
3323 pragma Assert (Ekind (Id) = E_Block);
3327 procedure Set_Body_Entity (Id : E; V : E) is
3329 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3331 end Set_Body_Entity;
3333 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3336 (Ekind (Id) = E_Package
3337 or else Is_Subprogram (Id)
3338 or else Is_Generic_Unit (Id));
3340 end Set_Body_Needed_For_SAL;
3342 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3344 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3345 Set_Flag125 (Id, V);
3346 end Set_C_Pass_By_Copy;
3348 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3351 end Set_Can_Never_Be_Null;
3353 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3356 end Set_Checks_May_Be_Suppressed;
3358 procedure Set_Class_Wide_Type (Id : E; V : E) is
3360 pragma Assert (Is_Type (Id));
3362 end Set_Class_Wide_Type;
3364 procedure Set_Cloned_Subtype (Id : E; V : E) is
3366 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3368 end Set_Cloned_Subtype;
3370 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3372 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3374 end Set_Component_Bit_Offset;
3376 procedure Set_Component_Clause (Id : E; V : N) is
3378 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3380 end Set_Component_Clause;
3382 procedure Set_Component_Size (Id : E; V : U) is
3384 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3386 end Set_Component_Size;
3388 procedure Set_Component_Type (Id : E; V : E) is
3390 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3392 end Set_Component_Type;
3394 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3397 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3399 end Set_Corresponding_Concurrent_Type;
3401 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3403 pragma Assert (Ekind (Id) = E_Discriminant);
3405 end Set_Corresponding_Discriminant;
3407 procedure Set_Corresponding_Equality (Id : E; V : E) is
3410 (Ekind (Id) = E_Function
3411 and then not Comes_From_Source (Id)
3412 and then Chars (Id) = Name_Op_Ne);
3414 end Set_Corresponding_Equality;
3416 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3418 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3420 end Set_Corresponding_Protected_Entry;
3422 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3424 pragma Assert (Is_Concurrent_Type (Id));
3426 end Set_Corresponding_Record_Type;
3428 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3431 end Set_Corresponding_Remote_Type;
3433 procedure Set_Current_Use_Clause (Id : E; V : E) is
3435 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3437 end Set_Current_Use_Clause;
3439 procedure Set_Current_Value (Id : E; V : N) is
3441 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3443 end Set_Current_Value;
3445 procedure Set_CR_Discriminant (Id : E; V : E) is
3448 end Set_CR_Discriminant;
3450 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3452 Set_Flag166 (Id, V);
3453 end Set_Debug_Info_Off;
3455 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3458 end Set_Debug_Renaming_Link;
3460 procedure Set_Default_Aspect_Component_Value (Id : E; V : E) is
3462 pragma Assert (Is_Array_Type (Id));
3464 end Set_Default_Aspect_Component_Value;
3466 procedure Set_Default_Aspect_Value (Id : E; V : E) is
3468 pragma Assert (Is_Scalar_Type (Id));
3470 end Set_Default_Aspect_Value;
3472 procedure Set_Default_Expr_Function (Id : E; V : E) is
3474 pragma Assert (Is_Formal (Id));
3476 end Set_Default_Expr_Function;
3478 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3480 Set_Flag108 (Id, V);
3481 end Set_Default_Expressions_Processed;
3483 procedure Set_Default_Value (Id : E; V : N) is
3485 pragma Assert (Is_Formal (Id));
3487 end Set_Default_Value;
3489 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3493 or else Is_Task_Type (Id)
3494 or else Ekind (Id) = E_Block);
3495 Set_Flag114 (Id, V);
3496 end Set_Delay_Cleanups;
3498 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3501 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3504 end Set_Delay_Subprogram_Descriptors;
3506 procedure Set_Delta_Value (Id : E; V : R) is
3508 pragma Assert (Is_Fixed_Point_Type (Id));
3509 Set_Ureal18 (Id, V);
3510 end Set_Delta_Value;
3512 procedure Set_Dependent_Instances (Id : E; V : L) is
3514 pragma Assert (Is_Generic_Instance (Id));
3516 end Set_Dependent_Instances;
3518 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3520 pragma Assert (Nkind (Id) in N_Entity);
3522 end Set_Depends_On_Private;
3524 procedure Set_Digits_Value (Id : E; V : U) is
3527 (Is_Floating_Point_Type (Id)
3528 or else Is_Decimal_Fixed_Point_Type (Id));
3530 end Set_Digits_Value;
3532 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3535 end Set_Directly_Designated_Type;
3537 procedure Set_Discard_Names (Id : E; V : B := True) is
3540 end Set_Discard_Names;
3542 procedure Set_Discriminal (Id : E; V : E) is
3544 pragma Assert (Ekind (Id) = E_Discriminant);
3546 end Set_Discriminal;
3548 procedure Set_Discriminal_Link (Id : E; V : E) is
3551 end Set_Discriminal_Link;
3553 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3555 pragma Assert (Ekind (Id) = E_Component);
3557 end Set_Discriminant_Checking_Func;
3559 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3561 pragma Assert (Nkind (Id) in N_Entity);
3562 Set_Elist21 (Id, V);
3563 end Set_Discriminant_Constraint;
3565 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3568 end Set_Discriminant_Default_Value;
3570 procedure Set_Discriminant_Number (Id : E; V : U) is
3573 end Set_Discriminant_Number;
3575 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3577 pragma Assert (Ekind (Id) = E_Record_Type
3578 and then Id = Implementation_Base_Type (Id));
3579 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3580 Set_Elist26 (Id, V);
3581 end Set_Dispatch_Table_Wrappers;
3583 procedure Set_DT_Entry_Count (Id : E; V : U) is
3585 pragma Assert (Ekind (Id) = E_Component);
3587 end Set_DT_Entry_Count;
3589 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3591 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3593 end Set_DT_Offset_To_Top_Func;
3595 procedure Set_DT_Position (Id : E; V : U) is
3597 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3599 end Set_DT_Position;
3601 procedure Set_DTC_Entity (Id : E; V : E) is
3603 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3607 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3609 pragma Assert (Ekind (Id) = E_Package);
3610 Set_Flag210 (Id, V);
3611 end Set_Elaborate_Body_Desirable;
3613 procedure Set_Elaboration_Entity (Id : E; V : E) is
3618 Ekind (Id) = E_Package
3620 Is_Generic_Unit (Id));
3622 end Set_Elaboration_Entity;
3624 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3629 Ekind (Id) = E_Package
3631 Is_Generic_Unit (Id));
3632 Set_Flag174 (Id, V);
3633 end Set_Elaboration_Entity_Required;
3635 procedure Set_Enclosing_Scope (Id : E; V : E) is
3638 end Set_Enclosing_Scope;
3640 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3642 pragma Assert (Is_Entry (Id));
3643 Set_Flag152 (Id, V);
3644 end Set_Entry_Accepted;
3646 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3649 end Set_Entry_Bodies_Array;
3651 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3654 end Set_Entry_Cancel_Parameter;
3656 procedure Set_Entry_Component (Id : E; V : E) is
3659 end Set_Entry_Component;
3661 procedure Set_Entry_Formal (Id : E; V : E) is
3664 end Set_Entry_Formal;
3666 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3668 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3670 end Set_Entry_Index_Constant;
3672 procedure Set_Contract (Id : E; V : N) is
3675 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Void)
3676 or else Is_Subprogram (Id)
3677 or else Is_Generic_Subprogram (Id));
3681 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3684 end Set_Entry_Parameters_Type;
3686 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3688 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3690 end Set_Enum_Pos_To_Rep;
3692 procedure Set_Enumeration_Pos (Id : E; V : U) is
3694 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3696 end Set_Enumeration_Pos;
3698 procedure Set_Enumeration_Rep (Id : E; V : U) is
3700 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3702 end Set_Enumeration_Rep;
3704 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3706 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3708 end Set_Enumeration_Rep_Expr;
3710 procedure Set_Equivalent_Type (Id : E; V : E) is
3713 (Ekind_In (Id, E_Class_Wide_Type,
3714 E_Class_Wide_Subtype,
3715 E_Access_Protected_Subprogram_Type,
3716 E_Anonymous_Access_Protected_Subprogram_Type,
3717 E_Access_Subprogram_Type,
3720 end Set_Equivalent_Type;
3722 procedure Set_Esize (Id : E; V : U) is
3727 procedure Set_Exception_Code (Id : E; V : U) is
3729 pragma Assert (Ekind (Id) = E_Exception);
3731 end Set_Exception_Code;
3733 procedure Set_Extra_Accessibility (Id : E; V : E) is
3736 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
3738 end Set_Extra_Accessibility;
3740 procedure Set_Extra_Accessibility_Of_Result (Id : E; V : E) is
3742 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
3744 end Set_Extra_Accessibility_Of_Result;
3746 procedure Set_Extra_Constrained (Id : E; V : E) is
3748 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3750 end Set_Extra_Constrained;
3752 procedure Set_Extra_Formal (Id : E; V : E) is
3755 end Set_Extra_Formal;
3757 procedure Set_Extra_Formals (Id : E; V : E) is
3760 (Is_Overloadable (Id)
3761 or else Ekind_In (Id, E_Entry_Family,
3763 E_Subprogram_Type));
3765 end Set_Extra_Formals;
3767 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3770 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3771 Set_Flag229 (Id, V);
3772 end Set_Can_Use_Internal_Rep;
3774 procedure Set_Finalization_Master (Id : E; V : E) is
3776 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3778 end Set_Finalization_Master;
3780 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3782 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3783 Set_Flag158 (Id, V);
3784 end Set_Finalize_Storage_Only;
3786 procedure Set_Finalizer (Id : E; V : E) is
3789 (Ekind (Id) = E_Package
3790 or else Ekind (Id) = E_Package_Body);
3794 procedure Set_First_Entity (Id : E; V : E) is
3797 end Set_First_Entity;
3799 procedure Set_First_Exit_Statement (Id : E; V : N) is
3801 pragma Assert (Ekind (Id) = E_Loop);
3803 end Set_First_Exit_Statement;
3805 procedure Set_First_Index (Id : E; V : N) is
3807 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3809 end Set_First_Index;
3811 procedure Set_First_Literal (Id : E; V : E) is
3813 pragma Assert (Is_Enumeration_Type (Id));
3815 end Set_First_Literal;
3817 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3819 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3821 end Set_First_Optional_Parameter;
3823 procedure Set_First_Private_Entity (Id : E; V : E) is
3825 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
3826 or else Ekind (Id) in Concurrent_Kind);
3828 end Set_First_Private_Entity;
3830 procedure Set_First_Rep_Item (Id : E; V : N) is
3833 end Set_First_Rep_Item;
3835 procedure Set_Float_Rep (Id : E; V : F) is
3836 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
3838 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
3841 procedure Set_Freeze_Node (Id : E; V : N) is
3844 end Set_Freeze_Node;
3846 procedure Set_From_With_Type (Id : E; V : B := True) is
3850 or else Ekind (Id) = E_Package);
3851 Set_Flag159 (Id, V);
3852 end Set_From_With_Type;
3854 procedure Set_Full_View (Id : E; V : E) is
3856 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
3860 procedure Set_Generic_Homonym (Id : E; V : E) is
3863 end Set_Generic_Homonym;
3865 procedure Set_Generic_Renamings (Id : E; V : L) is
3867 Set_Elist23 (Id, V);
3868 end Set_Generic_Renamings;
3870 procedure Set_Handler_Records (Id : E; V : S) is
3873 end Set_Handler_Records;
3875 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
3877 pragma Assert (Id = Base_Type (Id));
3878 Set_Flag135 (Id, V);
3879 end Set_Has_Aliased_Components;
3881 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
3884 end Set_Has_Alignment_Clause;
3886 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
3889 end Set_Has_All_Calls_Remote;
3891 procedure Set_Has_Anonymous_Master (Id : E; V : B := True) is
3894 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
3895 Set_Flag253 (Id, V);
3896 end Set_Has_Anonymous_Master;
3898 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
3900 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
3902 end Set_Has_Atomic_Components;
3904 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
3907 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
3908 Set_Flag139 (Id, V);
3909 end Set_Has_Biased_Representation;
3911 procedure Set_Has_Completion (Id : E; V : B := True) is
3914 end Set_Has_Completion;
3916 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
3918 pragma Assert (Is_Type (Id));
3920 end Set_Has_Completion_In_Body;
3922 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
3924 pragma Assert (Ekind (Id) = E_Record_Type);
3925 Set_Flag140 (Id, V);
3926 end Set_Has_Complex_Representation;
3928 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
3930 pragma Assert (Ekind (Id) = E_Array_Type);
3932 end Set_Has_Component_Size_Clause;
3934 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
3936 pragma Assert (Is_Type (Id));
3937 Set_Flag187 (Id, V);
3938 end Set_Has_Constrained_Partial_View;
3940 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
3942 Set_Flag181 (Id, V);
3943 end Set_Has_Contiguous_Rep;
3945 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
3947 pragma Assert (Id = Base_Type (Id));
3949 end Set_Has_Controlled_Component;
3951 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
3954 end Set_Has_Controlling_Result;
3956 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
3958 Set_Flag119 (Id, V);
3959 end Set_Has_Convention_Pragma;
3961 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
3964 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
3965 and then Is_Base_Type (Id));
3967 end Set_Has_Default_Aspect;
3969 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
3971 pragma Assert (Nkind (Id) in N_Entity);
3972 Set_Flag200 (Id, V);
3973 end Set_Has_Delayed_Aspects;
3975 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
3977 pragma Assert (Nkind (Id) in N_Entity);
3979 end Set_Has_Delayed_Freeze;
3981 procedure Set_Has_Discriminants (Id : E; V : B := True) is
3983 pragma Assert (Nkind (Id) in N_Entity);
3985 end Set_Has_Discriminants;
3987 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
3989 pragma Assert (Ekind (Id) = E_Record_Type
3990 and then Is_Tagged_Type (Id));
3991 Set_Flag220 (Id, V);
3992 end Set_Has_Dispatch_Table;
3994 procedure Set_Has_Dynamic_Predicate_Aspect (Id : E; V : B := True) is
3996 pragma Assert (Is_Type (Id));
3997 Set_Flag258 (Id, V);
3998 end Set_Has_Dynamic_Predicate_Aspect;
4000 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
4002 pragma Assert (Is_Enumeration_Type (Id));
4004 end Set_Has_Enumeration_Rep_Clause;
4006 procedure Set_Has_Exit (Id : E; V : B := True) is
4011 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True) is
4013 pragma Assert (Is_Tagged_Type (Id));
4014 Set_Flag110 (Id, V);
4015 end Set_Has_External_Tag_Rep_Clause;
4017 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
4019 Set_Flag175 (Id, V);
4020 end Set_Has_Forward_Instantiation;
4022 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
4024 Set_Flag173 (Id, V);
4025 end Set_Has_Fully_Qualified_Name;
4027 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
4030 end Set_Has_Gigi_Rep_Item;
4032 procedure Set_Has_Homonym (Id : E; V : B := True) is
4035 end Set_Has_Homonym;
4037 procedure Set_Has_Implicit_Dereference (Id : E; V : B := True) is
4039 Set_Flag251 (Id, V);
4040 end Set_Has_Implicit_Dereference;
4042 procedure Set_Has_Independent_Components (Id : E; V : B := True) is
4044 pragma Assert (Is_Object (Id) or else Is_Type (Id));
4046 end Set_Has_Independent_Components;
4048 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
4050 pragma Assert (Is_Type (Id));
4051 Set_Flag248 (Id, V);
4052 end Set_Has_Inheritable_Invariants;
4054 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
4056 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
4057 Set_Flag219 (Id, V);
4058 end Set_Has_Initial_Value;
4060 procedure Set_Has_Invariants (Id : E; V : B := True) is
4062 pragma Assert (Is_Type (Id));
4063 Set_Flag232 (Id, V);
4064 end Set_Has_Invariants;
4066 procedure Set_Has_Loop_Entry_Attributes (Id : E; V : B := True) is
4068 pragma Assert (Ekind (Id) = E_Loop);
4069 Set_Flag260 (Id, V);
4070 end Set_Has_Loop_Entry_Attributes;
4072 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
4074 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4076 end Set_Has_Machine_Radix_Clause;
4078 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
4081 end Set_Has_Master_Entity;
4083 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
4085 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4086 Set_Flag142 (Id, V);
4087 end Set_Has_Missing_Return;
4089 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
4091 Set_Flag101 (Id, V);
4092 end Set_Has_Nested_Block_With_Handler;
4094 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
4096 pragma Assert (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
4097 Set_Flag215 (Id, V);
4098 end Set_Has_Up_Level_Access;
4100 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
4102 pragma Assert (Id = Base_Type (Id));
4104 end Set_Has_Non_Standard_Rep;
4106 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
4108 pragma Assert (Is_Type (Id));
4109 Set_Flag172 (Id, V);
4110 end Set_Has_Object_Size_Clause;
4112 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
4114 Set_Flag154 (Id, V);
4115 end Set_Has_Per_Object_Constraint;
4117 procedure Set_Has_Postconditions (Id : E; V : B := True) is
4119 pragma Assert (Is_Subprogram (Id));
4120 Set_Flag240 (Id, V);
4121 end Set_Has_Postconditions;
4123 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
4125 pragma Assert (Is_Access_Type (Id));
4126 Set_Flag27 (Base_Type (Id), V);
4127 end Set_Has_Pragma_Controlled;
4129 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
4131 Set_Flag150 (Id, V);
4132 end Set_Has_Pragma_Elaborate_Body;
4134 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
4136 Set_Flag157 (Id, V);
4137 end Set_Has_Pragma_Inline;
4139 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
4141 Set_Flag230 (Id, V);
4142 end Set_Has_Pragma_Inline_Always;
4144 procedure Set_Has_Pragma_No_Inline (Id : E; V : B := True) is
4146 Set_Flag201 (Id, V);
4147 end Set_Has_Pragma_No_Inline;
4149 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
4151 pragma Assert (Is_Enumeration_Type (Id));
4152 pragma Assert (Id = Base_Type (Id));
4153 Set_Flag198 (Id, V);
4154 end Set_Has_Pragma_Ordered;
4156 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
4158 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
4159 pragma Assert (Id = Base_Type (Id));
4160 Set_Flag121 (Id, V);
4161 end Set_Has_Pragma_Pack;
4163 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
4165 Set_Flag221 (Id, V);
4166 end Set_Has_Pragma_Preelab_Init;
4168 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
4170 Set_Flag203 (Id, V);
4171 end Set_Has_Pragma_Pure;
4173 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
4175 Set_Flag179 (Id, V);
4176 end Set_Has_Pragma_Pure_Function;
4178 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
4180 Set_Flag169 (Id, V);
4181 end Set_Has_Pragma_Thread_Local_Storage;
4183 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
4185 Set_Flag233 (Id, V);
4186 end Set_Has_Pragma_Unmodified;
4188 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
4190 Set_Flag180 (Id, V);
4191 end Set_Has_Pragma_Unreferenced;
4193 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
4195 pragma Assert (Is_Type (Id));
4196 Set_Flag212 (Id, V);
4197 end Set_Has_Pragma_Unreferenced_Objects;
4199 procedure Set_Has_Predicates (Id : E; V : B := True) is
4201 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Void);
4202 Set_Flag250 (Id, V);
4203 end Set_Has_Predicates;
4205 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
4207 pragma Assert (Id = Base_Type (Id));
4208 Set_Flag120 (Id, V);
4209 end Set_Has_Primitive_Operations;
4211 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
4213 pragma Assert (Is_Type (Id));
4214 Set_Flag151 (Id, V);
4215 end Set_Has_Private_Ancestor;
4217 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
4219 Set_Flag155 (Id, V);
4220 end Set_Has_Private_Declaration;
4222 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
4224 Set_Flag161 (Id, V);
4225 end Set_Has_Qualified_Name;
4227 procedure Set_Has_RACW (Id : E; V : B := True) is
4229 pragma Assert (Ekind (Id) = E_Package);
4230 Set_Flag214 (Id, V);
4233 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
4235 pragma Assert (Id = Base_Type (Id));
4237 end Set_Has_Record_Rep_Clause;
4239 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
4241 pragma Assert (Is_Subprogram (Id));
4242 Set_Flag143 (Id, V);
4243 end Set_Has_Recursive_Call;
4245 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
4248 end Set_Has_Size_Clause;
4250 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
4253 end Set_Has_Small_Clause;
4255 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
4257 pragma Assert (Id = Base_Type (Id));
4258 Set_Flag100 (Id, V);
4259 end Set_Has_Specified_Layout;
4261 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
4263 pragma Assert (Is_Type (Id));
4264 Set_Flag190 (Id, V);
4265 end Set_Has_Specified_Stream_Input;
4267 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
4269 pragma Assert (Is_Type (Id));
4270 Set_Flag191 (Id, V);
4271 end Set_Has_Specified_Stream_Output;
4273 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
4275 pragma Assert (Is_Type (Id));
4276 Set_Flag192 (Id, V);
4277 end Set_Has_Specified_Stream_Read;
4279 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
4281 pragma Assert (Is_Type (Id));
4282 Set_Flag193 (Id, V);
4283 end Set_Has_Specified_Stream_Write;
4285 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
4287 Set_Flag211 (Id, V);
4288 end Set_Has_Static_Discriminants;
4290 procedure Set_Has_Static_Predicate_Aspect (Id : E; V : B := True) is
4292 pragma Assert (Is_Type (Id));
4293 Set_Flag259 (Id, V);
4294 end Set_Has_Static_Predicate_Aspect;
4296 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
4298 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4299 pragma Assert (Id = Base_Type (Id));
4301 end Set_Has_Storage_Size_Clause;
4303 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4305 pragma Assert (Is_Elementary_Type (Id));
4306 Set_Flag184 (Id, V);
4307 end Set_Has_Stream_Size_Clause;
4309 procedure Set_Has_Task (Id : E; V : B := True) is
4311 pragma Assert (Id = Base_Type (Id));
4315 procedure Set_Has_Thunks (Id : E; V : B := True) is
4317 pragma Assert (Is_Tag (Id));
4318 Set_Flag228 (Id, V);
4321 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4323 pragma Assert (Id = Base_Type (Id));
4324 Set_Flag123 (Id, V);
4325 end Set_Has_Unchecked_Union;
4327 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4329 pragma Assert (Is_Type (Id));
4331 end Set_Has_Unknown_Discriminants;
4333 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4335 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4337 end Set_Has_Volatile_Components;
4339 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4341 Set_Flag182 (Id, V);
4342 end Set_Has_Xref_Entry;
4344 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4346 pragma Assert (Ekind (Id) = E_Variable);
4348 end Set_Hiding_Loop_Variable;
4350 procedure Set_Homonym (Id : E; V : E) is
4352 pragma Assert (Id /= V);
4356 procedure Set_Interface_Alias (Id : E; V : E) is
4360 and then Is_Hidden (Id)
4361 and then (Ekind_In (Id, E_Procedure, E_Function)));
4363 end Set_Interface_Alias;
4365 procedure Set_Interfaces (Id : E; V : L) is
4367 pragma Assert (Is_Record_Type (Id));
4368 Set_Elist25 (Id, V);
4371 procedure Set_In_Package_Body (Id : E; V : B := True) is
4374 end Set_In_Package_Body;
4376 procedure Set_In_Private_Part (Id : E; V : B := True) is
4379 end Set_In_Private_Part;
4381 procedure Set_In_Use (Id : E; V : B := True) is
4383 pragma Assert (Nkind (Id) in N_Entity);
4387 procedure Set_Initialization_Statements (Id : E; V : N) is
4389 -- Tolerate an E_Void entity since this can be called while resolving
4390 -- an aggregate used as the initialization expression for an object
4391 -- declaration, and this occurs before the Ekind for the object is set.
4393 pragma Assert (Ekind_In (Id, E_Void, E_Constant, E_Variable));
4395 end Set_Initialization_Statements;
4397 procedure Set_Integrity_Level (Id : E; V : Uint) is
4399 pragma Assert (Ekind (Id) = E_Abstract_State);
4401 end Set_Integrity_Level;
4403 procedure Set_Inner_Instances (Id : E; V : L) is
4405 Set_Elist23 (Id, V);
4406 end Set_Inner_Instances;
4408 procedure Set_Interface_Name (Id : E; V : N) is
4411 end Set_Interface_Name;
4413 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4415 pragma Assert (Is_Overloadable (Id));
4417 end Set_Is_Abstract_Subprogram;
4419 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4421 pragma Assert (Is_Type (Id));
4422 Set_Flag146 (Id, V);
4423 end Set_Is_Abstract_Type;
4425 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4427 pragma Assert (Is_Access_Type (Id));
4428 Set_Flag194 (Id, V);
4429 end Set_Is_Local_Anonymous_Access;
4431 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4433 pragma Assert (Is_Access_Type (Id));
4435 end Set_Is_Access_Constant;
4437 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4439 Set_Flag185 (Id, V);
4440 end Set_Is_Ada_2005_Only;
4442 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4444 Set_Flag199 (Id, V);
4445 end Set_Is_Ada_2012_Only;
4447 procedure Set_Is_Aliased (Id : E; V : B := True) is
4449 pragma Assert (Nkind (Id) in N_Entity);
4453 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
4455 pragma Assert (Is_Entry (Id));
4456 Set_Flag132 (Id, V);
4457 end Set_Is_AST_Entry;
4459 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4462 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4464 end Set_Is_Asynchronous;
4466 procedure Set_Is_Atomic (Id : E; V : B := True) is
4471 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4473 pragma Assert ((not V)
4474 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4475 Set_Flag122 (Id, V);
4476 end Set_Is_Bit_Packed_Array;
4478 procedure Set_Is_Called (Id : E; V : B := True) is
4480 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4481 Set_Flag102 (Id, V);
4484 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4487 end Set_Is_Character_Type;
4489 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4492 end Set_Is_Child_Unit;
4494 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4497 end Set_Is_Class_Wide_Equivalent_Type;
4499 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4501 Set_Flag149 (Id, V);
4502 end Set_Is_Compilation_Unit;
4504 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4506 pragma Assert (Ekind (Id) = E_Discriminant);
4507 Set_Flag103 (Id, V);
4508 end Set_Is_Completely_Hidden;
4510 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4513 end Set_Is_Concurrent_Record_Type;
4515 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4518 end Set_Is_Constr_Subt_For_U_Nominal;
4520 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4522 Set_Flag141 (Id, V);
4523 end Set_Is_Constr_Subt_For_UN_Aliased;
4525 procedure Set_Is_Constrained (Id : E; V : B := True) is
4527 pragma Assert (Nkind (Id) in N_Entity);
4529 end Set_Is_Constrained;
4531 procedure Set_Is_Constructor (Id : E; V : B := True) is
4534 end Set_Is_Constructor;
4536 procedure Set_Is_Controlled (Id : E; V : B := True) is
4538 pragma Assert (Id = Base_Type (Id));
4540 end Set_Is_Controlled;
4542 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4544 pragma Assert (Is_Formal (Id));
4546 end Set_Is_Controlling_Formal;
4548 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4551 end Set_Is_CPP_Class;
4553 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4555 pragma Assert (Is_Type (Id));
4556 Set_Flag223 (Id, V);
4557 end Set_Is_Descendent_Of_Address;
4559 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4561 Set_Flag176 (Id, V);
4562 end Set_Is_Discrim_SO_Function;
4564 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4566 Set_Flag234 (Id, V);
4567 end Set_Is_Dispatch_Table_Entity;
4569 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4574 Is_Overloadable (Id)
4576 Ekind (Id) = E_Subprogram_Type);
4579 end Set_Is_Dispatching_Operation;
4581 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4583 Set_Flag124 (Id, V);
4584 end Set_Is_Eliminated;
4586 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4589 end Set_Is_Entry_Formal;
4591 procedure Set_Is_Exported (Id : E; V : B := True) is
4594 end Set_Is_Exported;
4596 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4599 end Set_Is_First_Subtype;
4601 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4603 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4604 Set_Flag118 (Id, V);
4605 end Set_Is_For_Access_Subtype;
4607 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4609 Set_Flag111 (Id, V);
4610 end Set_Is_Formal_Subprogram;
4612 procedure Set_Is_Frozen (Id : E; V : B := True) is
4614 pragma Assert (Nkind (Id) in N_Entity);
4618 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4620 pragma Assert (Is_Type (Id));
4622 end Set_Is_Generic_Actual_Type;
4624 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4626 Set_Flag130 (Id, V);
4627 end Set_Is_Generic_Instance;
4629 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4631 pragma Assert (Nkind (Id) in N_Entity);
4633 end Set_Is_Generic_Type;
4635 procedure Set_Is_Hidden (Id : E; V : B := True) is
4640 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4642 Set_Flag171 (Id, V);
4643 end Set_Is_Hidden_Open_Scope;
4645 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4647 pragma Assert (Nkind (Id) in N_Entity);
4649 end Set_Is_Immediately_Visible;
4651 procedure Set_Is_Implementation_Defined (Id : E; V : B := True) is
4653 Set_Flag254 (Id, V);
4654 end Set_Is_Implementation_Defined;
4656 procedure Set_Is_Imported (Id : E; V : B := True) is
4659 end Set_Is_Imported;
4661 procedure Set_Is_Inlined (Id : E; V : B := True) is
4666 procedure Set_Is_Interface (Id : E; V : B := True) is
4668 pragma Assert (Is_Record_Type (Id));
4669 Set_Flag186 (Id, V);
4670 end Set_Is_Interface;
4672 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4674 Set_Flag126 (Id, V);
4675 end Set_Is_Instantiated;
4677 procedure Set_Is_Internal (Id : E; V : B := True) is
4679 pragma Assert (Nkind (Id) in N_Entity);
4681 end Set_Is_Internal;
4683 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4685 pragma Assert (Nkind (Id) in N_Entity);
4687 end Set_Is_Interrupt_Handler;
4689 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4692 end Set_Is_Intrinsic_Subprogram;
4694 procedure Set_Is_Invariant_Procedure (Id : E; V : B := True) is
4696 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4697 Set_Flag257 (Id, V);
4698 end Set_Is_Invariant_Procedure;
4700 procedure Set_Is_Itype (Id : E; V : B := True) is
4705 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4708 end Set_Is_Known_Non_Null;
4710 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4712 Set_Flag204 (Id, V);
4713 end Set_Is_Known_Null;
4715 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4717 Set_Flag170 (Id, V);
4718 end Set_Is_Known_Valid;
4720 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4722 pragma Assert (Is_Type (Id));
4723 Set_Flag106 (Id, V);
4724 end Set_Is_Limited_Composite;
4726 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4728 pragma Assert (Is_Interface (Id));
4729 Set_Flag197 (Id, V);
4730 end Set_Is_Limited_Interface;
4732 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4735 end Set_Is_Limited_Record;
4737 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4739 pragma Assert (Is_Subprogram (Id));
4740 Set_Flag137 (Id, V);
4741 end Set_Is_Machine_Code_Subprogram;
4743 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4745 pragma Assert (Is_Type (Id));
4746 Set_Flag109 (Id, V);
4747 end Set_Is_Non_Static_Subtype;
4749 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4751 pragma Assert (Ekind (Id) = E_Procedure);
4752 Set_Flag178 (Id, V);
4753 end Set_Is_Null_Init_Proc;
4755 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4757 Set_Flag153 (Id, V);
4758 end Set_Is_Obsolescent;
4760 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
4762 pragma Assert (Ekind (Id) = E_Out_Parameter);
4763 Set_Flag226 (Id, V);
4764 end Set_Is_Only_Out_Parameter;
4766 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
4768 pragma Assert (Is_Formal (Id));
4769 Set_Flag134 (Id, V);
4770 end Set_Is_Optional_Parameter;
4772 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
4774 Set_Flag160 (Id, V);
4775 end Set_Is_Package_Body_Entity;
4777 procedure Set_Is_Packed (Id : E; V : B := True) is
4779 pragma Assert (Id = Base_Type (Id));
4783 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
4785 Set_Flag138 (Id, V);
4786 end Set_Is_Packed_Array_Type;
4788 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
4790 pragma Assert (Nkind (Id) in N_Entity);
4792 end Set_Is_Potentially_Use_Visible;
4794 procedure Set_Is_Predicate_Function (Id : E; V : B := True) is
4796 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4797 Set_Flag255 (Id, V);
4798 end Set_Is_Predicate_Function;
4800 procedure Set_Is_Predicate_Function_M (Id : E; V : B := True) is
4802 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4803 Set_Flag256 (Id, V);
4804 end Set_Is_Predicate_Function_M;
4806 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
4809 end Set_Is_Preelaborated;
4811 procedure Set_Is_Primitive (Id : E; V : B := True) is
4814 (Is_Overloadable (Id)
4815 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
4816 Set_Flag218 (Id, V);
4817 end Set_Is_Primitive;
4819 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
4821 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4822 Set_Flag195 (Id, V);
4823 end Set_Is_Primitive_Wrapper;
4825 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
4827 pragma Assert (Is_Type (Id));
4828 Set_Flag107 (Id, V);
4829 end Set_Is_Private_Composite;
4831 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
4834 end Set_Is_Private_Descendant;
4836 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
4838 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4839 Set_Flag245 (Id, V);
4840 end Set_Is_Private_Primitive;
4842 procedure Set_Is_Processed_Transient (Id : E; V : B := True) is
4844 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
4845 Set_Flag252 (Id, V);
4846 end Set_Is_Processed_Transient;
4848 procedure Set_Is_Public (Id : E; V : B := True) is
4850 pragma Assert (Nkind (Id) in N_Entity);
4854 procedure Set_Is_Pure (Id : E; V : B := True) is
4859 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
4861 pragma Assert (Is_Access_Type (Id));
4862 Set_Flag189 (Id, V);
4863 end Set_Is_Pure_Unit_Access_Type;
4865 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
4867 pragma Assert (Is_Type (Id));
4868 Set_Flag244 (Id, V);
4869 end Set_Is_RACW_Stub_Type;
4871 procedure Set_Is_Raised (Id : E; V : B := True) is
4873 pragma Assert (Ekind (Id) = E_Exception);
4874 Set_Flag224 (Id, V);
4877 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
4880 end Set_Is_Remote_Call_Interface;
4882 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
4885 end Set_Is_Remote_Types;
4887 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
4889 Set_Flag112 (Id, V);
4890 end Set_Is_Renaming_Of_Object;
4892 procedure Set_Is_Return_Object (Id : E; V : B := True) is
4894 Set_Flag209 (Id, V);
4895 end Set_Is_Return_Object;
4897 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
4899 pragma Assert (Ekind (Id) = E_Variable);
4900 Set_Flag249 (Id, V);
4901 end Set_Is_Safe_To_Reevaluate;
4903 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
4906 end Set_Is_Shared_Passive;
4908 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
4912 or else Ekind_In (Id, E_Exception,
4917 end Set_Is_Statically_Allocated;
4919 procedure Set_Is_Tag (Id : E; V : B := True) is
4921 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
4925 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
4928 end Set_Is_Tagged_Type;
4930 procedure Set_Is_Thunk (Id : E; V : B := True) is
4932 pragma Assert (Is_Subprogram (Id));
4933 Set_Flag225 (Id, V);
4936 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
4938 Set_Flag235 (Id, V);
4939 end Set_Is_Trivial_Subprogram;
4941 procedure Set_Is_True_Constant (Id : E; V : B := True) is
4943 Set_Flag163 (Id, V);
4944 end Set_Is_True_Constant;
4946 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
4948 pragma Assert (Id = Base_Type (Id));
4949 Set_Flag117 (Id, V);
4950 end Set_Is_Unchecked_Union;
4952 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
4954 pragma Assert (Ekind (Id) = E_Record_Type);
4955 Set_Flag246 (Id, V);
4956 end Set_Is_Underlying_Record_View;
4958 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
4960 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
4961 Set_Flag144 (Id, V);
4962 end Set_Is_Unsigned_Type;
4964 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
4966 pragma Assert (Ekind (Id) = E_Procedure);
4967 Set_Flag127 (Id, V);
4968 end Set_Is_Valued_Procedure;
4970 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
4972 Set_Flag206 (Id, V);
4973 end Set_Is_Visible_Formal;
4975 procedure Set_Is_Visible_Lib_Unit (Id : E; V : B := True) is
4977 Set_Flag116 (Id, V);
4978 end Set_Is_Visible_Lib_Unit;
4980 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
4982 pragma Assert (Ekind (Id) = E_Exception);
4983 Set_Flag133 (Id, V);
4984 end Set_Is_VMS_Exception;
4986 procedure Set_Is_Volatile (Id : E; V : B := True) is
4988 pragma Assert (Nkind (Id) in N_Entity);
4990 end Set_Is_Volatile;
4992 procedure Set_Itype_Printed (Id : E; V : B := True) is
4994 pragma Assert (Is_Itype (Id));
4995 Set_Flag202 (Id, V);
4996 end Set_Itype_Printed;
4998 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
5001 end Set_Kill_Elaboration_Checks;
5003 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
5006 end Set_Kill_Range_Checks;
5008 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
5010 pragma Assert (Is_Type (Id));
5011 Set_Flag207 (Id, V);
5012 end Set_Known_To_Have_Preelab_Init;
5014 procedure Set_Last_Assignment (Id : E; V : N) is
5016 pragma Assert (Is_Assignable (Id));
5018 end Set_Last_Assignment;
5020 procedure Set_Last_Entity (Id : E; V : E) is
5023 end Set_Last_Entity;
5025 procedure Set_Limited_View (Id : E; V : E) is
5027 pragma Assert (Ekind (Id) = E_Package);
5029 end Set_Limited_View;
5031 procedure Set_Lit_Indexes (Id : E; V : E) is
5033 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5035 end Set_Lit_Indexes;
5037 procedure Set_Lit_Strings (Id : E; V : E) is
5039 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5041 end Set_Lit_Strings;
5043 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
5045 pragma Assert (Is_Formal (Id));
5046 Set_Flag205 (Id, V);
5047 end Set_Low_Bound_Tested;
5049 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
5051 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
5053 end Set_Machine_Radix_10;
5055 procedure Set_Master_Id (Id : E; V : E) is
5057 pragma Assert (Is_Access_Type (Id));
5061 procedure Set_Materialize_Entity (Id : E; V : B := True) is
5063 Set_Flag168 (Id, V);
5064 end Set_Materialize_Entity;
5066 procedure Set_Mechanism (Id : E; V : M) is
5068 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
5069 Set_Uint8 (Id, UI_From_Int (V));
5072 procedure Set_Modulus (Id : E; V : U) is
5074 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
5078 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
5080 pragma Assert (Is_Type (Id));
5081 Set_Flag183 (Id, V);
5082 end Set_Must_Be_On_Byte_Boundary;
5084 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
5086 pragma Assert (Is_Type (Id));
5087 Set_Flag208 (Id, V);
5088 end Set_Must_Have_Preelab_Init;
5090 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
5092 Set_Flag147 (Id, V);
5093 end Set_Needs_Debug_Info;
5095 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
5098 (Is_Overloadable (Id)
5099 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
5101 end Set_Needs_No_Actuals;
5103 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
5105 Set_Flag115 (Id, V);
5106 end Set_Never_Set_In_Source;
5108 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
5111 end Set_Next_Inlined_Subprogram;
5113 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
5115 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5116 Set_Flag131 (Id, V);
5117 end Set_No_Pool_Assigned;
5119 procedure Set_No_Return (Id : E; V : B := True) is
5122 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
5123 Set_Flag113 (Id, V);
5126 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
5128 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5129 Set_Flag136 (Id, V);
5130 end Set_No_Strict_Aliasing;
5132 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
5134 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5136 end Set_Non_Binary_Modulus;
5138 procedure Set_Non_Limited_View (Id : E; V : E) is
5140 pragma Assert (Ekind (Id) in Incomplete_Kind);
5142 end Set_Non_Limited_View;
5144 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
5147 (Root_Type (Id) = Standard_Boolean
5148 and then Ekind (Id) = E_Enumeration_Type);
5149 Set_Flag162 (Id, V);
5150 end Set_Nonzero_Is_True;
5152 procedure Set_Normalized_First_Bit (Id : E; V : U) is
5154 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5156 end Set_Normalized_First_Bit;
5158 procedure Set_Normalized_Position (Id : E; V : U) is
5160 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5162 end Set_Normalized_Position;
5164 procedure Set_Normalized_Position_Max (Id : E; V : U) is
5166 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5168 end Set_Normalized_Position_Max;
5170 procedure Set_OK_To_Rename (Id : E; V : B := True) is
5172 pragma Assert (Ekind (Id) = E_Variable);
5173 Set_Flag247 (Id, V);
5174 end Set_OK_To_Rename;
5176 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
5179 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5180 Set_Flag239 (Id, V);
5181 end Set_OK_To_Reorder_Components;
5183 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
5186 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5187 Set_Flag241 (Id, V);
5188 end Set_Optimize_Alignment_Space;
5190 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
5193 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5194 Set_Flag242 (Id, V);
5195 end Set_Optimize_Alignment_Time;
5197 procedure Set_Original_Access_Type (Id : E; V : E) is
5199 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
5201 end Set_Original_Access_Type;
5203 procedure Set_Original_Array_Type (Id : E; V : E) is
5205 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
5207 end Set_Original_Array_Type;
5209 procedure Set_Original_Record_Component (Id : E; V : E) is
5211 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
5213 end Set_Original_Record_Component;
5215 procedure Set_Overlays_Constant (Id : E; V : B := True) is
5217 Set_Flag243 (Id, V);
5218 end Set_Overlays_Constant;
5220 procedure Set_Overridden_Operation (Id : E; V : E) is
5223 end Set_Overridden_Operation;
5225 procedure Set_Package_Instantiation (Id : E; V : N) is
5227 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
5229 end Set_Package_Instantiation;
5231 procedure Set_Packed_Array_Type (Id : E; V : E) is
5233 pragma Assert (Is_Array_Type (Id));
5235 end Set_Packed_Array_Type;
5237 procedure Set_Parent_Subtype (Id : E; V : E) is
5239 pragma Assert (Ekind (Id) = E_Record_Type);
5241 end Set_Parent_Subtype;
5243 procedure Set_Postcondition_Proc (Id : E; V : E) is
5245 pragma Assert (Ekind (Id) = E_Procedure);
5247 end Set_Postcondition_Proc;
5249 procedure Set_PPC_Wrapper (Id : E; V : E) is
5251 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
5253 end Set_PPC_Wrapper;
5255 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
5257 pragma Assert (Is_Tagged_Type (Id));
5258 Set_Elist10 (Id, V);
5259 end Set_Direct_Primitive_Operations;
5261 procedure Set_Prival (Id : E; V : E) is
5263 pragma Assert (Is_Protected_Component (Id));
5267 procedure Set_Prival_Link (Id : E; V : E) is
5269 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5271 end Set_Prival_Link;
5273 procedure Set_Private_Dependents (Id : E; V : L) is
5275 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
5276 Set_Elist18 (Id, V);
5277 end Set_Private_Dependents;
5279 procedure Set_Private_View (Id : E; V : N) is
5281 pragma Assert (Is_Private_Type (Id));
5283 end Set_Private_View;
5285 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
5287 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
5289 end Set_Protected_Body_Subprogram;
5291 procedure Set_Protected_Formal (Id : E; V : E) is
5293 pragma Assert (Is_Formal (Id));
5295 end Set_Protected_Formal;
5297 procedure Set_Protection_Object (Id : E; V : E) is
5299 pragma Assert (Ekind_In (Id, E_Entry,
5304 end Set_Protection_Object;
5306 procedure Set_Reachable (Id : E; V : B := True) is
5311 procedure Set_Referenced (Id : E; V : B := True) is
5313 Set_Flag156 (Id, V);
5316 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
5319 end Set_Referenced_As_LHS;
5321 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
5323 Set_Flag227 (Id, V);
5324 end Set_Referenced_As_Out_Parameter;
5326 procedure Set_Refined_State (Id : E; V : E) is
5328 pragma Assert (Ekind (Id) = E_Abstract_State);
5330 end Set_Refined_State;
5332 procedure Set_Register_Exception_Call (Id : E; V : N) is
5334 pragma Assert (Ekind (Id) = E_Exception);
5336 end Set_Register_Exception_Call;
5338 procedure Set_Related_Array_Object (Id : E; V : E) is
5340 pragma Assert (Is_Array_Type (Id));
5342 end Set_Related_Array_Object;
5344 procedure Set_Related_Expression (Id : E; V : N) is
5346 pragma Assert (Ekind (Id) in Type_Kind
5347 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
5349 end Set_Related_Expression;
5351 procedure Set_Related_Instance (Id : E; V : E) is
5353 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
5355 end Set_Related_Instance;
5357 procedure Set_Related_Type (Id : E; V : E) is
5359 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5361 end Set_Related_Type;
5363 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5365 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
5367 end Set_Relative_Deadline_Variable;
5369 procedure Set_Renamed_Entity (Id : E; V : N) is
5372 end Set_Renamed_Entity;
5374 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5376 pragma Assert (Ekind (Id) = E_Package);
5377 Set_Flag231 (Id, V);
5378 end Set_Renamed_In_Spec;
5380 procedure Set_Renamed_Object (Id : E; V : N) is
5383 end Set_Renamed_Object;
5385 procedure Set_Renaming_Map (Id : E; V : U) is
5388 end Set_Renaming_Map;
5390 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5392 pragma Assert (Is_Overloadable (Id));
5393 Set_Flag213 (Id, V);
5394 end Set_Requires_Overriding;
5396 procedure Set_Return_Present (Id : E; V : B := True) is
5399 end Set_Return_Present;
5401 procedure Set_Return_Applies_To (Id : E; V : N) is
5404 end Set_Return_Applies_To;
5406 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5409 end Set_Returns_By_Ref;
5411 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5414 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5415 Set_Flag164 (Id, V);
5416 end Set_Reverse_Bit_Order;
5418 procedure Set_Reverse_Storage_Order (Id : E; V : B := True) is
5422 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5424 end Set_Reverse_Storage_Order;
5426 procedure Set_RM_Size (Id : E; V : U) is
5428 pragma Assert (Is_Type (Id));
5432 procedure Set_Scalar_Range (Id : E; V : N) is
5435 end Set_Scalar_Range;
5437 procedure Set_Scale_Value (Id : E; V : U) is
5440 end Set_Scale_Value;
5442 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5444 pragma Assert (not Is_Record_Type (Id));
5446 end Set_Scope_Depth_Value;
5448 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5450 Set_Flag167 (Id, V);
5451 end Set_Sec_Stack_Needed_For_Return;
5453 procedure Set_Shadow_Entities (Id : E; V : S) is
5455 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5457 end Set_Shadow_Entities;
5459 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5461 pragma Assert (Ekind (Id) = E_Variable);
5463 end Set_Shared_Var_Procs_Instance;
5465 procedure Set_Size_Check_Code (Id : E; V : N) is
5467 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5469 end Set_Size_Check_Code;
5471 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5473 Set_Flag177 (Id, V);
5474 end Set_Size_Depends_On_Discriminant;
5476 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5479 end Set_Size_Known_At_Compile_Time;
5481 procedure Set_Small_Value (Id : E; V : R) is
5483 pragma Assert (Is_Fixed_Point_Type (Id));
5484 Set_Ureal21 (Id, V);
5485 end Set_Small_Value;
5487 procedure Set_SPARK_Mode_Pragmas (Id : E; V : N) is
5490 (Ekind_In (Id, E_Function, -- subprogram variants
5492 E_Generic_Procedure,
5496 Ekind_In (Id, E_Generic_Package, -- package variants
5501 end Set_SPARK_Mode_Pragmas;
5503 procedure Set_Spec_Entity (Id : E; V : E) is
5505 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5507 end Set_Spec_Entity;
5509 procedure Set_Static_Predicate (Id : E; V : S) is
5512 (Ekind_In (Id, E_Enumeration_Subtype,
5513 E_Modular_Integer_Subtype,
5514 E_Signed_Integer_Subtype)
5515 and then Has_Predicates (Id));
5517 end Set_Static_Predicate;
5519 procedure Set_Status_Flag_Or_Transient_Decl (Id : E; V : E) is
5521 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5523 end Set_Status_Flag_Or_Transient_Decl;
5525 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5527 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5528 pragma Assert (Id = Base_Type (Id));
5530 end Set_Storage_Size_Variable;
5532 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5534 pragma Assert (Ekind (Id) = E_Package);
5536 end Set_Static_Elaboration_Desired;
5538 procedure Set_Static_Initialization (Id : E; V : N) is
5541 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5543 end Set_Static_Initialization;
5545 procedure Set_Stored_Constraint (Id : E; V : L) is
5547 pragma Assert (Nkind (Id) in N_Entity);
5548 Set_Elist23 (Id, V);
5549 end Set_Stored_Constraint;
5551 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5553 pragma Assert (Id = Base_Type (Id));
5554 Set_Flag145 (Id, V);
5555 end Set_Strict_Alignment;
5557 procedure Set_String_Literal_Length (Id : E; V : U) is
5559 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5561 end Set_String_Literal_Length;
5563 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5565 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5567 end Set_String_Literal_Low_Bound;
5569 procedure Set_Subprograms_For_Type (Id : E; V : E) is
5571 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
5573 end Set_Subprograms_For_Type;
5575 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5577 Set_Flag148 (Id, V);
5578 end Set_Suppress_Elaboration_Warnings;
5580 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
5582 pragma Assert (Is_Type (Id));
5583 Set_Flag105 (Id, V);
5584 end Set_Suppress_Initialization;
5586 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5588 Set_Flag165 (Id, V);
5589 end Set_Suppress_Style_Checks;
5591 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5593 Set_Flag217 (Id, V);
5594 end Set_Suppress_Value_Tracking_On_Call;
5596 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5598 pragma Assert (Ekind (Id) in Task_Kind);
5600 end Set_Task_Body_Procedure;
5602 procedure Set_Thunk_Entity (Id : E; V : E) is
5604 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5605 and then Is_Thunk (Id));
5607 end Set_Thunk_Entity;
5609 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5612 end Set_Treat_As_Volatile;
5614 procedure Set_Underlying_Full_View (Id : E; V : E) is
5616 pragma Assert (Ekind (Id) in Private_Kind);
5618 end Set_Underlying_Full_View;
5620 procedure Set_Underlying_Record_View (Id : E; V : E) is
5622 pragma Assert (Ekind (Id) = E_Record_Type);
5624 end Set_Underlying_Record_View;
5626 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5628 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5629 Set_Flag216 (Id, V);
5630 end Set_Universal_Aliasing;
5632 procedure Set_Unset_Reference (Id : E; V : N) is
5635 end Set_Unset_Reference;
5637 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5639 Set_Flag222 (Id, V);
5640 end Set_Used_As_Generic_Actual;
5642 procedure Set_Uses_Lock_Free (Id : E; V : B := True) is
5644 pragma Assert (Ekind (Id) = E_Protected_Type);
5645 Set_Flag188 (Id, V);
5646 end Set_Uses_Lock_Free;
5648 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5651 end Set_Uses_Sec_Stack;
5653 procedure Set_Warnings_Off (Id : E; V : B := True) is
5656 end Set_Warnings_Off;
5658 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
5660 Set_Flag236 (Id, V);
5661 end Set_Warnings_Off_Used;
5663 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
5665 Set_Flag237 (Id, V);
5666 end Set_Warnings_Off_Used_Unmodified;
5668 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
5670 Set_Flag238 (Id, V);
5671 end Set_Warnings_Off_Used_Unreferenced;
5673 procedure Set_Was_Hidden (Id : E; V : B := True) is
5675 Set_Flag196 (Id, V);
5678 procedure Set_Wrapped_Entity (Id : E; V : E) is
5680 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5681 and then Is_Primitive_Wrapper (Id));
5683 end Set_Wrapped_Entity;
5685 -----------------------------------
5686 -- Field Initialization Routines --
5687 -----------------------------------
5689 procedure Init_Alignment (Id : E) is
5691 Set_Uint14 (Id, Uint_0);
5694 procedure Init_Alignment (Id : E; V : Int) is
5696 Set_Uint14 (Id, UI_From_Int (V));
5699 procedure Init_Component_Bit_Offset (Id : E) is
5701 Set_Uint11 (Id, No_Uint);
5702 end Init_Component_Bit_Offset;
5704 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
5706 Set_Uint11 (Id, UI_From_Int (V));
5707 end Init_Component_Bit_Offset;
5709 procedure Init_Component_Size (Id : E) is
5711 Set_Uint22 (Id, Uint_0);
5712 end Init_Component_Size;
5714 procedure Init_Component_Size (Id : E; V : Int) is
5716 Set_Uint22 (Id, UI_From_Int (V));
5717 end Init_Component_Size;
5719 procedure Init_Digits_Value (Id : E) is
5721 Set_Uint17 (Id, Uint_0);
5722 end Init_Digits_Value;
5724 procedure Init_Digits_Value (Id : E; V : Int) is
5726 Set_Uint17 (Id, UI_From_Int (V));
5727 end Init_Digits_Value;
5729 procedure Init_Esize (Id : E) is
5731 Set_Uint12 (Id, Uint_0);
5734 procedure Init_Esize (Id : E; V : Int) is
5736 Set_Uint12 (Id, UI_From_Int (V));
5739 procedure Init_Normalized_First_Bit (Id : E) is
5741 Set_Uint8 (Id, No_Uint);
5742 end Init_Normalized_First_Bit;
5744 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
5746 Set_Uint8 (Id, UI_From_Int (V));
5747 end Init_Normalized_First_Bit;
5749 procedure Init_Normalized_Position (Id : E) is
5751 Set_Uint14 (Id, No_Uint);
5752 end Init_Normalized_Position;
5754 procedure Init_Normalized_Position (Id : E; V : Int) is
5756 Set_Uint14 (Id, UI_From_Int (V));
5757 end Init_Normalized_Position;
5759 procedure Init_Normalized_Position_Max (Id : E) is
5761 Set_Uint10 (Id, No_Uint);
5762 end Init_Normalized_Position_Max;
5764 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
5766 Set_Uint10 (Id, UI_From_Int (V));
5767 end Init_Normalized_Position_Max;
5769 procedure Init_RM_Size (Id : E) is
5771 Set_Uint13 (Id, Uint_0);
5774 procedure Init_RM_Size (Id : E; V : Int) is
5776 Set_Uint13 (Id, UI_From_Int (V));
5779 -----------------------------
5780 -- Init_Component_Location --
5781 -----------------------------
5783 procedure Init_Component_Location (Id : E) is
5785 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
5786 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
5787 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
5788 Set_Uint12 (Id, Uint_0); -- Esize
5789 Set_Uint14 (Id, No_Uint); -- Normalized_Position
5790 end Init_Component_Location;
5792 ----------------------------
5793 -- Init_Object_Size_Align --
5794 ----------------------------
5796 procedure Init_Object_Size_Align (Id : E) is
5798 Set_Uint12 (Id, Uint_0); -- Esize
5799 Set_Uint14 (Id, Uint_0); -- Alignment
5800 end Init_Object_Size_Align;
5806 procedure Init_Size (Id : E; V : Int) is
5808 pragma Assert (not Is_Object (Id));
5809 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
5810 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
5813 ---------------------
5814 -- Init_Size_Align --
5815 ---------------------
5817 procedure Init_Size_Align (Id : E) is
5819 pragma Assert (not Is_Object (Id));
5820 Set_Uint12 (Id, Uint_0); -- Esize
5821 Set_Uint13 (Id, Uint_0); -- RM_Size
5822 Set_Uint14 (Id, Uint_0); -- Alignment
5823 end Init_Size_Align;
5825 ----------------------------------------------
5826 -- Type Representation Attribute Predicates --
5827 ----------------------------------------------
5829 function Known_Alignment (E : Entity_Id) return B is
5831 return Uint14 (E) /= Uint_0
5832 and then Uint14 (E) /= No_Uint;
5833 end Known_Alignment;
5835 function Known_Component_Bit_Offset (E : Entity_Id) return B is
5837 return Uint11 (E) /= No_Uint;
5838 end Known_Component_Bit_Offset;
5840 function Known_Component_Size (E : Entity_Id) return B is
5842 return Uint22 (Base_Type (E)) /= Uint_0
5843 and then Uint22 (Base_Type (E)) /= No_Uint;
5844 end Known_Component_Size;
5846 function Known_Esize (E : Entity_Id) return B is
5848 return Uint12 (E) /= Uint_0
5849 and then Uint12 (E) /= No_Uint;
5852 function Known_Normalized_First_Bit (E : Entity_Id) return B is
5854 return Uint8 (E) /= No_Uint;
5855 end Known_Normalized_First_Bit;
5857 function Known_Normalized_Position (E : Entity_Id) return B is
5859 return Uint14 (E) /= No_Uint;
5860 end Known_Normalized_Position;
5862 function Known_Normalized_Position_Max (E : Entity_Id) return B is
5864 return Uint10 (E) /= No_Uint;
5865 end Known_Normalized_Position_Max;
5867 function Known_RM_Size (E : Entity_Id) return B is
5869 return Uint13 (E) /= No_Uint
5870 and then (Uint13 (E) /= Uint_0
5871 or else Is_Discrete_Type (E)
5872 or else Is_Fixed_Point_Type (E));
5875 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
5877 return Uint11 (E) /= No_Uint
5878 and then Uint11 (E) >= Uint_0;
5879 end Known_Static_Component_Bit_Offset;
5881 function Known_Static_Component_Size (E : Entity_Id) return B is
5883 return Uint22 (Base_Type (E)) > Uint_0;
5884 end Known_Static_Component_Size;
5886 function Known_Static_Esize (E : Entity_Id) return B is
5888 return Uint12 (E) > Uint_0
5889 and then not Is_Generic_Type (E);
5890 end Known_Static_Esize;
5892 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
5894 return Uint8 (E) /= No_Uint
5895 and then Uint8 (E) >= Uint_0;
5896 end Known_Static_Normalized_First_Bit;
5898 function Known_Static_Normalized_Position (E : Entity_Id) return B is
5900 return Uint14 (E) /= No_Uint
5901 and then Uint14 (E) >= Uint_0;
5902 end Known_Static_Normalized_Position;
5904 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
5906 return Uint10 (E) /= No_Uint
5907 and then Uint10 (E) >= Uint_0;
5908 end Known_Static_Normalized_Position_Max;
5910 function Known_Static_RM_Size (E : Entity_Id) return B is
5912 return (Uint13 (E) > Uint_0
5913 or else Is_Discrete_Type (E)
5914 or else Is_Fixed_Point_Type (E))
5915 and then not Is_Generic_Type (E);
5916 end Known_Static_RM_Size;
5918 function Unknown_Alignment (E : Entity_Id) return B is
5920 return Uint14 (E) = Uint_0
5921 or else Uint14 (E) = No_Uint;
5922 end Unknown_Alignment;
5924 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
5926 return Uint11 (E) = No_Uint;
5927 end Unknown_Component_Bit_Offset;
5929 function Unknown_Component_Size (E : Entity_Id) return B is
5931 return Uint22 (Base_Type (E)) = Uint_0
5933 Uint22 (Base_Type (E)) = No_Uint;
5934 end Unknown_Component_Size;
5936 function Unknown_Esize (E : Entity_Id) return B is
5938 return Uint12 (E) = No_Uint
5940 Uint12 (E) = Uint_0;
5943 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
5945 return Uint8 (E) = No_Uint;
5946 end Unknown_Normalized_First_Bit;
5948 function Unknown_Normalized_Position (E : Entity_Id) return B is
5950 return Uint14 (E) = No_Uint;
5951 end Unknown_Normalized_Position;
5953 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
5955 return Uint10 (E) = No_Uint;
5956 end Unknown_Normalized_Position_Max;
5958 function Unknown_RM_Size (E : Entity_Id) return B is
5960 return (Uint13 (E) = Uint_0
5961 and then not Is_Discrete_Type (E)
5962 and then not Is_Fixed_Point_Type (E))
5963 or else Uint13 (E) = No_Uint;
5964 end Unknown_RM_Size;
5966 --------------------
5967 -- Address_Clause --
5968 --------------------
5970 function Address_Clause (Id : E) return N is
5972 return Rep_Clause (Id, Name_Address);
5979 function Aft_Value (Id : E) return U is
5981 Delta_Val : Ureal := Delta_Value (Id);
5983 while Delta_Val < Ureal_Tenth loop
5984 Delta_Val := Delta_Val * Ureal_10;
5985 Result := Result + 1;
5988 return UI_From_Int (Result);
5991 ----------------------
5992 -- Alignment_Clause --
5993 ----------------------
5995 function Alignment_Clause (Id : E) return N is
5997 return Rep_Clause (Id, Name_Alignment);
5998 end Alignment_Clause;
6004 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
6006 if Last_Entity (V) = Empty then
6007 Set_First_Entity (Id => V, V => Id);
6009 Set_Next_Entity (Last_Entity (V), Id);
6012 Set_Next_Entity (Id, Empty);
6014 Set_Last_Entity (Id => V, V => Id);
6021 function Base_Type (Id : E) return E is
6023 if Is_Base_Type (Id) then
6026 pragma Assert (Is_Type (Id));
6031 -------------------------
6032 -- Component_Alignment --
6033 -------------------------
6035 -- Component Alignment is encoded using two flags, Flag128/129 as
6036 -- follows. Note that both flags False = Align_Default, so that the
6037 -- default initialization of flags to False initializes component
6038 -- alignment to the default value as required.
6040 -- Flag128 Flag129 Value
6041 -- ------- ------- -----
6042 -- False False Calign_Default
6043 -- False True Calign_Component_Size
6044 -- True False Calign_Component_Size_4
6045 -- True True Calign_Storage_Unit
6047 function Component_Alignment (Id : E) return C is
6048 BT : constant Node_Id := Base_Type (Id);
6051 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
6053 if Flag128 (BT) then
6054 if Flag129 (BT) then
6055 return Calign_Storage_Unit;
6057 return Calign_Component_Size_4;
6061 if Flag129 (BT) then
6062 return Calign_Component_Size;
6064 return Calign_Default;
6067 end Component_Alignment;
6069 ----------------------
6070 -- Declaration_Node --
6071 ----------------------
6073 function Declaration_Node (Id : E) return N is
6077 if Ekind (Id) = E_Incomplete_Type
6078 and then Present (Full_View (Id))
6080 P := Parent (Full_View (Id));
6086 if Nkind (P) /= N_Selected_Component
6087 and then Nkind (P) /= N_Expanded_Name
6089 not (Nkind (P) = N_Defining_Program_Unit_Name
6090 and then Is_Child_Unit (Id))
6097 end Declaration_Node;
6099 ---------------------
6100 -- Designated_Type --
6101 ---------------------
6103 function Designated_Type (Id : E) return E is
6107 Desig_Type := Directly_Designated_Type (Id);
6109 if Ekind (Desig_Type) = E_Incomplete_Type
6110 and then Present (Full_View (Desig_Type))
6112 return Full_View (Desig_Type);
6114 elsif Is_Class_Wide_Type (Desig_Type)
6115 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
6116 and then Present (Full_View (Etype (Desig_Type)))
6117 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
6119 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
6124 end Designated_Type;
6126 ----------------------
6127 -- Entry_Index_Type --
6128 ----------------------
6130 function Entry_Index_Type (Id : E) return N is
6132 pragma Assert (Ekind (Id) = E_Entry_Family);
6133 return Etype (Discrete_Subtype_Definition (Parent (Id)));
6134 end Entry_Index_Type;
6136 ---------------------
6137 -- First_Component --
6138 ---------------------
6140 function First_Component (Id : E) return E is
6145 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
6147 Comp_Id := First_Entity (Id);
6148 while Present (Comp_Id) loop
6149 exit when Ekind (Comp_Id) = E_Component;
6150 Comp_Id := Next_Entity (Comp_Id);
6154 end First_Component;
6156 -------------------------------------
6157 -- First_Component_Or_Discriminant --
6158 -------------------------------------
6160 function First_Component_Or_Discriminant (Id : E) return E is
6165 (Is_Record_Type (Id)
6166 or else Is_Incomplete_Or_Private_Type (Id)
6167 or else Has_Discriminants (Id));
6169 Comp_Id := First_Entity (Id);
6170 while Present (Comp_Id) loop
6171 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6172 Comp_Id := Next_Entity (Comp_Id);
6176 end First_Component_Or_Discriminant;
6182 function First_Formal (Id : E) return E is
6187 (Is_Overloadable (Id)
6188 or else Ekind_In (Id, E_Entry_Family,
6190 E_Subprogram_Type));
6192 if Ekind (Id) = E_Enumeration_Literal then
6196 Formal := First_Entity (Id);
6198 if Present (Formal) and then Is_Formal (Formal) then
6206 ------------------------------
6207 -- First_Formal_With_Extras --
6208 ------------------------------
6210 function First_Formal_With_Extras (Id : E) return E is
6215 (Is_Overloadable (Id)
6216 or else Ekind_In (Id, E_Entry_Family,
6218 E_Subprogram_Type));
6220 if Ekind (Id) = E_Enumeration_Literal then
6224 Formal := First_Entity (Id);
6226 if Present (Formal) and then Is_Formal (Formal) then
6229 return Extra_Formals (Id); -- Empty if no extra formals
6232 end First_Formal_With_Extras;
6234 -------------------------------------
6235 -- Get_Attribute_Definition_Clause --
6236 -------------------------------------
6238 function Get_Attribute_Definition_Clause
6240 Id : Attribute_Id) return Node_Id
6245 N := First_Rep_Item (E);
6246 while Present (N) loop
6247 if Nkind (N) = N_Attribute_Definition_Clause
6248 and then Get_Attribute_Id (Chars (N)) = Id
6257 end Get_Attribute_Definition_Clause;
6263 function Get_Full_View (T : Entity_Id) return Entity_Id is
6265 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
6266 return Full_View (T);
6268 elsif Is_Class_Wide_Type (T)
6269 and then Ekind (Root_Type (T)) = E_Incomplete_Type
6270 and then Present (Full_View (Root_Type (T)))
6272 return Class_Wide_Type (Full_View (Root_Type (T)));
6283 function Get_Pragma (E : Entity_Id; Id : Pragma_Id) return Node_Id
6288 N := First_Rep_Item (E);
6289 while Present (N) loop
6290 if Nkind (N) = N_Pragma
6291 and then Get_Pragma_Id (Pragma_Name (N)) = Id
6302 --------------------------------------
6303 -- Get_Record_Representation_Clause --
6304 --------------------------------------
6306 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
6310 N := First_Rep_Item (E);
6311 while Present (N) loop
6312 if Nkind (N) = N_Record_Representation_Clause then
6320 end Get_Record_Representation_Clause;
6322 ------------------------
6323 -- Has_Attach_Handler --
6324 ------------------------
6326 function Has_Attach_Handler (Id : E) return B is
6330 pragma Assert (Is_Protected_Type (Id));
6332 Ritem := First_Rep_Item (Id);
6333 while Present (Ritem) loop
6334 if Nkind (Ritem) = N_Pragma
6335 and then Pragma_Name (Ritem) = Name_Attach_Handler
6339 Next_Rep_Item (Ritem);
6344 end Has_Attach_Handler;
6350 function Has_Entries (Id : E) return B is
6354 pragma Assert (Is_Concurrent_Type (Id));
6356 Ent := First_Entity (Id);
6357 while Present (Ent) loop
6358 if Is_Entry (Ent) then
6362 Ent := Next_Entity (Ent);
6368 ----------------------------
6369 -- Has_Foreign_Convention --
6370 ----------------------------
6372 function Has_Foreign_Convention (Id : E) return B is
6374 -- While regular Intrinsics such as the Standard operators fit in the
6375 -- "Ada" convention, those with an Interface_Name materialize GCC
6376 -- builtin imports for which Ada special treatments shouldn't apply.
6378 return Convention (Id) in Foreign_Convention
6379 or else (Convention (Id) = Convention_Intrinsic
6380 and then Present (Interface_Name (Id)));
6381 end Has_Foreign_Convention;
6383 ---------------------------
6384 -- Has_Interrupt_Handler --
6385 ---------------------------
6387 function Has_Interrupt_Handler (Id : E) return B is
6391 pragma Assert (Is_Protected_Type (Id));
6393 Ritem := First_Rep_Item (Id);
6394 while Present (Ritem) loop
6395 if Nkind (Ritem) = N_Pragma
6396 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6400 Next_Rep_Item (Ritem);
6405 end Has_Interrupt_Handler;
6407 --------------------
6408 -- Has_Unmodified --
6409 --------------------
6411 function Has_Unmodified (E : Entity_Id) return Boolean is
6413 if Has_Pragma_Unmodified (E) then
6415 elsif Warnings_Off (E) then
6416 Set_Warnings_Off_Used_Unmodified (E);
6423 ---------------------
6424 -- Has_Unreferenced --
6425 ---------------------
6427 function Has_Unreferenced (E : Entity_Id) return Boolean is
6429 if Has_Pragma_Unreferenced (E) then
6431 elsif Warnings_Off (E) then
6432 Set_Warnings_Off_Used_Unreferenced (E);
6437 end Has_Unreferenced;
6439 ----------------------
6440 -- Has_Warnings_Off --
6441 ----------------------
6443 function Has_Warnings_Off (E : Entity_Id) return Boolean is
6445 if Warnings_Off (E) then
6446 Set_Warnings_Off_Used (E);
6451 end Has_Warnings_Off;
6453 ------------------------------
6454 -- Implementation_Base_Type --
6455 ------------------------------
6457 function Implementation_Base_Type (Id : E) return E is
6462 Bastyp := Base_Type (Id);
6464 if Is_Incomplete_Or_Private_Type (Bastyp) then
6465 Imptyp := Underlying_Type (Bastyp);
6467 -- If we have an implementation type, then just return it,
6468 -- otherwise we return the Base_Type anyway. This can only
6469 -- happen in error situations and should avoid some error bombs.
6471 if Present (Imptyp) then
6472 return Base_Type (Imptyp);
6480 end Implementation_Base_Type;
6482 -------------------------
6483 -- Invariant_Procedure --
6484 -------------------------
6486 function Invariant_Procedure (Id : E) return E is
6490 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
6492 if No (Subprograms_For_Type (Id)) then
6496 S := Subprograms_For_Type (Id);
6497 while Present (S) loop
6498 if Is_Invariant_Procedure (S) then
6501 S := Subprograms_For_Type (S);
6507 end Invariant_Procedure;
6513 -- Global flag table allowing rapid computation of this function
6515 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
6516 (E_Enumeration_Subtype |
6518 E_Signed_Integer_Subtype |
6519 E_Modular_Integer_Subtype |
6520 E_Floating_Point_Subtype |
6521 E_Ordinary_Fixed_Point_Subtype |
6522 E_Decimal_Fixed_Point_Subtype |
6527 E_Record_Subtype_With_Private |
6528 E_Limited_Private_Subtype |
6530 E_Protected_Subtype |
6532 E_String_Literal_Subtype |
6533 E_Class_Wide_Subtype => False,
6536 function Is_Base_Type (Id : E) return Boolean is
6538 return Entity_Is_Base_Type (Ekind (Id));
6541 ---------------------
6542 -- Is_Boolean_Type --
6543 ---------------------
6545 function Is_Boolean_Type (Id : E) return B is
6547 return Root_Type (Id) = Standard_Boolean;
6548 end Is_Boolean_Type;
6550 ------------------------
6551 -- Is_Constant_Object --
6552 ------------------------
6554 function Is_Constant_Object (Id : E) return B is
6555 K : constant Entity_Kind := Ekind (Id);
6558 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
6559 end Is_Constant_Object;
6561 --------------------
6562 -- Is_Discriminal --
6563 --------------------
6565 function Is_Discriminal (Id : E) return B is
6567 return (Ekind_In (Id, E_Constant, E_In_Parameter)
6568 and then Present (Discriminal_Link (Id)));
6571 ----------------------
6572 -- Is_Dynamic_Scope --
6573 ----------------------
6575 function Is_Dynamic_Scope (Id : E) return B is
6578 Ekind (Id) = E_Block
6580 Ekind (Id) = E_Function
6582 Ekind (Id) = E_Procedure
6584 Ekind (Id) = E_Subprogram_Body
6586 Ekind (Id) = E_Task_Type
6588 (Ekind (Id) = E_Limited_Private_Type
6589 and then Present (Full_View (Id))
6590 and then Ekind (Full_View (Id)) = E_Task_Type)
6592 Ekind (Id) = E_Entry
6594 Ekind (Id) = E_Entry_Family
6596 Ekind (Id) = E_Return_Statement;
6597 end Is_Dynamic_Scope;
6599 --------------------
6600 -- Is_Entity_Name --
6601 --------------------
6603 function Is_Entity_Name (N : Node_Id) return Boolean is
6604 Kind : constant Node_Kind := Nkind (N);
6607 -- Identifiers, operator symbols, expanded names are entity names
6609 return Kind = N_Identifier
6610 or else Kind = N_Operator_Symbol
6611 or else Kind = N_Expanded_Name
6613 -- Attribute references are entity names if they refer to an entity.
6614 -- Note that we don't do this by testing for the presence of the
6615 -- Entity field in the N_Attribute_Reference node, since it may not
6616 -- have been set yet.
6618 or else (Kind = N_Attribute_Reference
6619 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
6626 function Is_Finalizer (Id : E) return B is
6628 return Ekind (Id) = E_Procedure and then Chars (Id) = Name_uFinalizer;
6631 ---------------------
6632 -- Is_Ghost_Entity --
6633 ---------------------
6635 function Is_Ghost_Entity (Id : E) return B is
6637 if Present (Id) and then Ekind (Id) = E_Variable then
6638 return Convention (Id) = Convention_Ghost;
6640 return Is_Ghost_Subprogram (Id);
6642 end Is_Ghost_Entity;
6644 -------------------------
6645 -- Is_Ghost_Subprogram --
6646 -------------------------
6648 function Is_Ghost_Subprogram (Id : E) return B is
6650 if Present (Id) and then Ekind_In (Id, E_Function, E_Procedure) then
6651 return Convention (Id) = Convention_Ghost;
6655 end Is_Ghost_Subprogram;
6657 --------------------
6658 -- Is_Input_State --
6659 --------------------
6661 function Is_Input_State (Id : E) return B is
6664 Ekind (Id) = E_Abstract_State and then Has_Property (Id, Name_Input);
6671 function Is_Null_State (Id : E) return B is
6674 Ekind (Id) = E_Abstract_State and then Nkind (Parent (Id)) = N_Null;
6677 ---------------------
6678 -- Is_Output_State --
6679 ---------------------
6681 function Is_Output_State (Id : E) return B is
6684 Ekind (Id) = E_Abstract_State and then Has_Property (Id, Name_Output);
6685 end Is_Output_State;
6687 -----------------------------------
6688 -- Is_Package_Or_Generic_Package --
6689 -----------------------------------
6691 function Is_Package_Or_Generic_Package (Id : E) return B is
6693 return Ekind_In (Id, E_Generic_Package, E_Package);
6694 end Is_Package_Or_Generic_Package;
6700 function Is_Prival (Id : E) return B is
6702 return (Ekind_In (Id, E_Constant, E_Variable)
6703 and then Present (Prival_Link (Id)));
6706 ----------------------------
6707 -- Is_Protected_Component --
6708 ----------------------------
6710 function Is_Protected_Component (Id : E) return B is
6712 return Ekind (Id) = E_Component and then Is_Protected_Type (Scope (Id));
6713 end Is_Protected_Component;
6715 ----------------------------
6716 -- Is_Protected_Interface --
6717 ----------------------------
6719 function Is_Protected_Interface (Id : E) return B is
6720 Typ : constant Entity_Id := Base_Type (Id);
6722 if not Is_Interface (Typ) then
6724 elsif Is_Class_Wide_Type (Typ) then
6725 return Is_Protected_Interface (Etype (Typ));
6727 return Protected_Present (Type_Definition (Parent (Typ)));
6729 end Is_Protected_Interface;
6731 ------------------------------
6732 -- Is_Protected_Record_Type --
6733 ------------------------------
6735 function Is_Protected_Record_Type (Id : E) return B is
6738 Is_Concurrent_Record_Type (Id)
6739 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
6740 end Is_Protected_Record_Type;
6742 --------------------------------
6743 -- Is_Standard_Character_Type --
6744 --------------------------------
6746 function Is_Standard_Character_Type (Id : E) return B is
6748 if Is_Type (Id) then
6750 R : constant Entity_Id := Root_Type (Id);
6753 R = Standard_Character
6755 R = Standard_Wide_Character
6757 R = Standard_Wide_Wide_Character;
6763 end Is_Standard_Character_Type;
6765 --------------------
6766 -- Is_String_Type --
6767 --------------------
6769 function Is_String_Type (Id : E) return B is
6771 return Ekind (Id) in String_Kind
6772 or else (Is_Array_Type (Id)
6773 and then Id /= Any_Composite
6774 and then Number_Dimensions (Id) = 1
6775 and then Is_Character_Type (Component_Type (Id)));
6778 -------------------------------
6779 -- Is_Synchronized_Interface --
6780 -------------------------------
6782 function Is_Synchronized_Interface (Id : E) return B is
6783 Typ : constant Entity_Id := Base_Type (Id);
6786 if not Is_Interface (Typ) then
6789 elsif Is_Class_Wide_Type (Typ) then
6790 return Is_Synchronized_Interface (Etype (Typ));
6793 return Protected_Present (Type_Definition (Parent (Typ)))
6794 or else Synchronized_Present (Type_Definition (Parent (Typ)))
6795 or else Task_Present (Type_Definition (Parent (Typ)));
6797 end Is_Synchronized_Interface;
6799 -----------------------
6800 -- Is_Task_Interface --
6801 -----------------------
6803 function Is_Task_Interface (Id : E) return B is
6804 Typ : constant Entity_Id := Base_Type (Id);
6806 if not Is_Interface (Typ) then
6808 elsif Is_Class_Wide_Type (Typ) then
6809 return Is_Task_Interface (Etype (Typ));
6811 return Task_Present (Type_Definition (Parent (Typ)));
6813 end Is_Task_Interface;
6815 -------------------------
6816 -- Is_Task_Record_Type --
6817 -------------------------
6819 function Is_Task_Record_Type (Id : E) return B is
6822 Is_Concurrent_Record_Type (Id)
6823 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
6824 end Is_Task_Record_Type;
6826 -----------------------
6827 -- Is_Volatile_State --
6828 -----------------------
6830 function Is_Volatile_State (Id : E) return B is
6833 Ekind (Id) = E_Abstract_State
6834 and then Has_Property (Id, Name_Volatile);
6835 end Is_Volatile_State;
6837 ------------------------
6838 -- Is_Wrapper_Package --
6839 ------------------------
6841 function Is_Wrapper_Package (Id : E) return B is
6843 return (Ekind (Id) = E_Package and then Present (Related_Instance (Id)));
6844 end Is_Wrapper_Package;
6850 function Last_Formal (Id : E) return E is
6855 (Is_Overloadable (Id)
6856 or else Ekind_In (Id, E_Entry_Family,
6858 E_Subprogram_Type));
6860 if Ekind (Id) = E_Enumeration_Literal then
6864 Formal := First_Formal (Id);
6866 if Present (Formal) then
6867 while Present (Next_Formal (Formal)) loop
6868 Formal := Next_Formal (Formal);
6876 function Model_Emin_Value (Id : E) return Uint is
6878 return Machine_Emin_Value (Id);
6879 end Model_Emin_Value;
6881 -------------------------
6882 -- Model_Epsilon_Value --
6883 -------------------------
6885 function Model_Epsilon_Value (Id : E) return Ureal is
6886 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6888 return Radix ** (1 - Model_Mantissa_Value (Id));
6889 end Model_Epsilon_Value;
6891 --------------------------
6892 -- Model_Mantissa_Value --
6893 --------------------------
6895 function Model_Mantissa_Value (Id : E) return Uint is
6897 return Machine_Mantissa_Value (Id);
6898 end Model_Mantissa_Value;
6900 -----------------------
6901 -- Model_Small_Value --
6902 -----------------------
6904 function Model_Small_Value (Id : E) return Ureal is
6905 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6907 return Radix ** (Model_Emin_Value (Id) - 1);
6908 end Model_Small_Value;
6910 ------------------------
6911 -- Machine_Emax_Value --
6912 ------------------------
6914 function Machine_Emax_Value (Id : E) return Uint is
6915 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
6918 case Float_Rep (Id) is
6921 when 1 .. 6 => return Uint_128;
6922 when 7 .. 15 => return 2**10;
6923 when 16 .. 33 => return 2**14;
6924 when others => return No_Uint;
6929 when 1 .. 9 => return 2**7 - 1;
6930 when 10 .. 15 => return 2**10 - 1;
6931 when others => return No_Uint;
6935 return Uint_2 ** Uint_7 - Uint_1;
6937 end Machine_Emax_Value;
6939 ------------------------
6940 -- Machine_Emin_Value --
6941 ------------------------
6943 function Machine_Emin_Value (Id : E) return Uint is
6945 case Float_Rep (Id) is
6946 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
6947 when VAX_Native => return -Machine_Emax_Value (Id);
6948 when AAMP => return -Machine_Emax_Value (Id);
6950 end Machine_Emin_Value;
6952 ----------------------------
6953 -- Machine_Mantissa_Value --
6954 ----------------------------
6956 function Machine_Mantissa_Value (Id : E) return Uint is
6957 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
6960 case Float_Rep (Id) is
6963 when 1 .. 6 => return Uint_24;
6964 when 7 .. 15 => return UI_From_Int (53);
6965 when 16 .. 18 => return Uint_64;
6966 when 19 .. 33 => return UI_From_Int (113);
6967 when others => return No_Uint;
6972 when 1 .. 6 => return Uint_24;
6973 when 7 .. 9 => return UI_From_Int (56);
6974 when 10 .. 15 => return UI_From_Int (53);
6975 when others => return No_Uint;
6980 when 1 .. 6 => return Uint_24;
6981 when 7 .. 9 => return UI_From_Int (40);
6982 when others => return No_Uint;
6985 end Machine_Mantissa_Value;
6987 -------------------------
6988 -- Machine_Radix_Value --
6989 -------------------------
6991 function Machine_Radix_Value (Id : E) return U is
6993 case Float_Rep (Id) is
6994 when IEEE_Binary | VAX_Native | AAMP =>
6997 end Machine_Radix_Value;
6999 --------------------
7000 -- Next_Component --
7001 --------------------
7003 function Next_Component (Id : E) return E is
7007 Comp_Id := Next_Entity (Id);
7008 while Present (Comp_Id) loop
7009 exit when Ekind (Comp_Id) = E_Component;
7010 Comp_Id := Next_Entity (Comp_Id);
7016 ------------------------------------
7017 -- Next_Component_Or_Discriminant --
7018 ------------------------------------
7020 function Next_Component_Or_Discriminant (Id : E) return E is
7024 Comp_Id := Next_Entity (Id);
7025 while Present (Comp_Id) loop
7026 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
7027 Comp_Id := Next_Entity (Comp_Id);
7031 end Next_Component_Or_Discriminant;
7033 -----------------------
7034 -- Next_Discriminant --
7035 -----------------------
7037 -- This function actually implements both Next_Discriminant and
7038 -- Next_Stored_Discriminant by making sure that the Discriminant
7039 -- returned is of the same variety as Id.
7041 function Next_Discriminant (Id : E) return E is
7043 -- Derived Tagged types with private extensions look like this...
7045 -- E_Discriminant d1
7046 -- E_Discriminant d2
7048 -- E_Discriminant d1
7049 -- E_Discriminant d2
7052 -- so it is critical not to go past the leading discriminants
7057 pragma Assert (Ekind (Id) = E_Discriminant);
7060 D := Next_Entity (D);
7062 or else (Ekind (D) /= E_Discriminant
7063 and then not Is_Itype (D))
7068 exit when Ekind (D) = E_Discriminant
7069 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
7073 end Next_Discriminant;
7079 function Next_Formal (Id : E) return E is
7083 -- Follow the chain of declared entities as long as the kind of the
7084 -- entity corresponds to a formal parameter. Skip internal entities
7085 -- that may have been created for implicit subtypes, in the process
7086 -- of analyzing default expressions.
7090 P := Next_Entity (P);
7092 if No (P) or else Is_Formal (P) then
7094 elsif not Is_Internal (P) then
7100 -----------------------------
7101 -- Next_Formal_With_Extras --
7102 -----------------------------
7104 function Next_Formal_With_Extras (Id : E) return E is
7106 if Present (Extra_Formal (Id)) then
7107 return Extra_Formal (Id);
7109 return Next_Formal (Id);
7111 end Next_Formal_With_Extras;
7117 function Next_Index (Id : Node_Id) return Node_Id is
7126 function Next_Literal (Id : E) return E is
7128 pragma Assert (Nkind (Id) in N_Entity);
7132 ------------------------------
7133 -- Next_Stored_Discriminant --
7134 ------------------------------
7136 function Next_Stored_Discriminant (Id : E) return E is
7138 -- See comment in Next_Discriminant
7140 return Next_Discriminant (Id);
7141 end Next_Stored_Discriminant;
7143 -----------------------
7144 -- Number_Dimensions --
7145 -----------------------
7147 function Number_Dimensions (Id : E) return Pos is
7152 if Ekind (Id) in String_Kind then
7157 T := First_Index (Id);
7158 while Present (T) loop
7165 end Number_Dimensions;
7167 --------------------
7168 -- Number_Entries --
7169 --------------------
7171 function Number_Entries (Id : E) return Nat is
7176 pragma Assert (Is_Concurrent_Type (Id));
7179 Ent := First_Entity (Id);
7180 while Present (Ent) loop
7181 if Is_Entry (Ent) then
7185 Ent := Next_Entity (Ent);
7191 --------------------
7192 -- Number_Formals --
7193 --------------------
7195 function Number_Formals (Id : E) return Pos is
7201 Formal := First_Formal (Id);
7202 while Present (Formal) loop
7204 Formal := Next_Formal (Formal);
7210 --------------------
7211 -- Parameter_Mode --
7212 --------------------
7214 function Parameter_Mode (Id : E) return Formal_Kind is
7219 ------------------------
7220 -- Predicate_Function --
7221 ------------------------
7223 function Predicate_Function (Id : E) return E is
7228 pragma Assert (Is_Type (Id));
7230 -- If type is private and has a completion, predicate may be defined
7231 -- on the full view.
7233 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7234 T := Full_View (Id);
7239 if No (Subprograms_For_Type (T)) then
7243 S := Subprograms_For_Type (T);
7244 while Present (S) loop
7245 if Is_Predicate_Function (S) then
7248 S := Subprograms_For_Type (S);
7254 end Predicate_Function;
7256 --------------------------
7257 -- Predicate_Function_M --
7258 --------------------------
7260 function Predicate_Function_M (Id : E) return E is
7265 pragma Assert (Is_Type (Id));
7267 -- If type is private and has a completion, predicate may be defined
7268 -- on the full view.
7270 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7271 T := Full_View (Id);
7276 if No (Subprograms_For_Type (T)) then
7280 S := Subprograms_For_Type (T);
7281 while Present (S) loop
7282 if Is_Predicate_Function_M (S) then
7285 S := Subprograms_For_Type (S);
7291 end Predicate_Function_M;
7293 -------------------------
7294 -- Present_In_Rep_Item --
7295 -------------------------
7297 function Present_In_Rep_Item (E : Entity_Id; N : Node_Id) return Boolean is
7301 Ritem := First_Rep_Item (E);
7303 while Present (Ritem) loop
7308 Next_Rep_Item (Ritem);
7312 end Present_In_Rep_Item;
7314 --------------------------
7315 -- Primitive_Operations --
7316 --------------------------
7318 function Primitive_Operations (Id : E) return L is
7320 if Is_Concurrent_Type (Id) then
7321 if Present (Corresponding_Record_Type (Id)) then
7322 return Direct_Primitive_Operations
7323 (Corresponding_Record_Type (Id));
7325 -- If expansion is disabled the corresponding record type is absent,
7326 -- but if the type has ancestors it may have primitive operations.
7328 elsif Is_Tagged_Type (Id) then
7329 return Direct_Primitive_Operations (Id);
7335 return Direct_Primitive_Operations (Id);
7337 end Primitive_Operations;
7339 ---------------------
7340 -- Record_Rep_Item --
7341 ---------------------
7343 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
7345 Set_Next_Rep_Item (N, First_Rep_Item (E));
7346 Set_First_Rep_Item (E, N);
7347 end Record_Rep_Item;
7353 function Root_Type (Id : E) return E is
7357 pragma Assert (Nkind (Id) in N_Entity);
7359 T := Base_Type (Id);
7361 if Ekind (T) = E_Class_Wide_Type then
7373 -- Following test catches some error cases resulting from
7376 elsif No (Etyp) then
7377 Check_Error_Detected;
7380 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
7383 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
7389 -- Return if there is a circularity in the inheritance chain. This
7390 -- happens in some error situations and we do not want to get
7391 -- stuck in this loop.
7393 if T = Base_Type (Id) then
7400 ---------------------
7401 -- Safe_Emax_Value --
7402 ---------------------
7404 function Safe_Emax_Value (Id : E) return Uint is
7406 return Machine_Emax_Value (Id);
7407 end Safe_Emax_Value;
7409 ----------------------
7410 -- Safe_First_Value --
7411 ----------------------
7413 function Safe_First_Value (Id : E) return Ureal is
7415 return -Safe_Last_Value (Id);
7416 end Safe_First_Value;
7418 ---------------------
7419 -- Safe_Last_Value --
7420 ---------------------
7422 function Safe_Last_Value (Id : E) return Ureal is
7423 Radix : constant Uint := Machine_Radix_Value (Id);
7424 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
7425 Emax : constant Uint := Safe_Emax_Value (Id);
7426 Significand : constant Uint := Radix ** Mantissa - 1;
7427 Exponent : constant Uint := Emax - Mantissa;
7433 (Num => Significand * 2 ** (Exponent mod 4),
7434 Den => -Exponent / 4,
7440 (Num => Significand,
7444 end Safe_Last_Value;
7450 function Scope_Depth (Id : E) return Uint is
7455 while Is_Record_Type (Scop) loop
7456 Scop := Scope (Scop);
7459 return Scope_Depth_Value (Scop);
7462 ---------------------
7463 -- Scope_Depth_Set --
7464 ---------------------
7466 function Scope_Depth_Set (Id : E) return B is
7468 return not Is_Record_Type (Id)
7469 and then Field22 (Id) /= Union_Id (Empty);
7470 end Scope_Depth_Set;
7472 -----------------------------
7473 -- Set_Component_Alignment --
7474 -----------------------------
7476 -- Component Alignment is encoded using two flags, Flag128/129 as
7477 -- follows. Note that both flags False = Align_Default, so that the
7478 -- default initialization of flags to False initializes component
7479 -- alignment to the default value as required.
7481 -- Flag128 Flag129 Value
7482 -- ------- ------- -----
7483 -- False False Calign_Default
7484 -- False True Calign_Component_Size
7485 -- True False Calign_Component_Size_4
7486 -- True True Calign_Storage_Unit
7488 procedure Set_Component_Alignment (Id : E; V : C) is
7490 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
7491 and then Is_Base_Type (Id));
7494 when Calign_Default =>
7495 Set_Flag128 (Id, False);
7496 Set_Flag129 (Id, False);
7498 when Calign_Component_Size =>
7499 Set_Flag128 (Id, False);
7500 Set_Flag129 (Id, True);
7502 when Calign_Component_Size_4 =>
7503 Set_Flag128 (Id, True);
7504 Set_Flag129 (Id, False);
7506 when Calign_Storage_Unit =>
7507 Set_Flag128 (Id, True);
7508 Set_Flag129 (Id, True);
7510 end Set_Component_Alignment;
7512 -----------------------------
7513 -- Set_Invariant_Procedure --
7514 -----------------------------
7516 procedure Set_Invariant_Procedure (Id : E; V : E) is
7520 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7522 S := Subprograms_For_Type (Id);
7523 Set_Subprograms_For_Type (Id, V);
7524 Set_Subprograms_For_Type (V, S);
7526 -- Check for duplicate entry
7528 while Present (S) loop
7529 if Is_Invariant_Procedure (S) then
7530 raise Program_Error;
7532 S := Subprograms_For_Type (S);
7535 end Set_Invariant_Procedure;
7537 ----------------------------
7538 -- Set_Predicate_Function --
7539 ----------------------------
7541 procedure Set_Predicate_Function (Id : E; V : E) is
7545 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7547 S := Subprograms_For_Type (Id);
7548 Set_Subprograms_For_Type (Id, V);
7549 Set_Subprograms_For_Type (V, S);
7551 while Present (S) loop
7552 if Is_Predicate_Function (S) then
7553 raise Program_Error;
7555 S := Subprograms_For_Type (S);
7558 end Set_Predicate_Function;
7560 ------------------------------
7561 -- Set_Predicate_Function_M --
7562 ------------------------------
7564 procedure Set_Predicate_Function_M (Id : E; V : E) is
7568 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7570 S := Subprograms_For_Type (Id);
7571 Set_Subprograms_For_Type (Id, V);
7572 Set_Subprograms_For_Type (V, S);
7574 -- Check for duplicates
7576 while Present (S) loop
7577 if Is_Predicate_Function_M (S) then
7578 raise Program_Error;
7580 S := Subprograms_For_Type (S);
7583 end Set_Predicate_Function_M;
7589 function Size_Clause (Id : E) return N is
7591 return Rep_Clause (Id, Name_Size);
7594 ------------------------
7595 -- Stream_Size_Clause --
7596 ------------------------
7598 function Stream_Size_Clause (Id : E) return N is
7600 return Rep_Clause (Id, Name_Stream_Size);
7601 end Stream_Size_Clause;
7607 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
7613 Kind := E_Access_Subtype;
7617 Kind := E_Array_Subtype;
7619 when E_Class_Wide_Type |
7620 E_Class_Wide_Subtype =>
7621 Kind := E_Class_Wide_Subtype;
7623 when E_Decimal_Fixed_Point_Type |
7624 E_Decimal_Fixed_Point_Subtype =>
7625 Kind := E_Decimal_Fixed_Point_Subtype;
7627 when E_Ordinary_Fixed_Point_Type |
7628 E_Ordinary_Fixed_Point_Subtype =>
7629 Kind := E_Ordinary_Fixed_Point_Subtype;
7631 when E_Private_Type |
7632 E_Private_Subtype =>
7633 Kind := E_Private_Subtype;
7635 when E_Limited_Private_Type |
7636 E_Limited_Private_Subtype =>
7637 Kind := E_Limited_Private_Subtype;
7639 when E_Record_Type_With_Private |
7640 E_Record_Subtype_With_Private =>
7641 Kind := E_Record_Subtype_With_Private;
7643 when E_Record_Type |
7645 Kind := E_Record_Subtype;
7647 when E_String_Type |
7649 Kind := E_String_Subtype;
7651 when Enumeration_Kind =>
7652 Kind := E_Enumeration_Subtype;
7655 Kind := E_Floating_Point_Subtype;
7657 when Signed_Integer_Kind =>
7658 Kind := E_Signed_Integer_Subtype;
7660 when Modular_Integer_Kind =>
7661 Kind := E_Modular_Integer_Subtype;
7663 when Protected_Kind =>
7664 Kind := E_Protected_Subtype;
7667 Kind := E_Task_Subtype;
7671 raise Program_Error;
7677 ---------------------
7678 -- Type_High_Bound --
7679 ---------------------
7681 function Type_High_Bound (Id : E) return Node_Id is
7682 Rng : constant Node_Id := Scalar_Range (Id);
7684 if Nkind (Rng) = N_Subtype_Indication then
7685 return High_Bound (Range_Expression (Constraint (Rng)));
7687 return High_Bound (Rng);
7689 end Type_High_Bound;
7691 --------------------
7692 -- Type_Low_Bound --
7693 --------------------
7695 function Type_Low_Bound (Id : E) return Node_Id is
7696 Rng : constant Node_Id := Scalar_Range (Id);
7698 if Nkind (Rng) = N_Subtype_Indication then
7699 return Low_Bound (Range_Expression (Constraint (Rng)));
7701 return Low_Bound (Rng);
7705 ---------------------
7706 -- Underlying_Type --
7707 ---------------------
7709 function Underlying_Type (Id : E) return E is
7711 -- For record_with_private the underlying type is always the direct
7712 -- full view. Never try to take the full view of the parent it
7713 -- doesn't make sense.
7715 if Ekind (Id) = E_Record_Type_With_Private then
7716 return Full_View (Id);
7718 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
7720 -- If we have an incomplete or private type with a full view,
7721 -- then we return the Underlying_Type of this full view
7723 if Present (Full_View (Id)) then
7724 if Id = Full_View (Id) then
7726 -- Previous error in declaration
7731 return Underlying_Type (Full_View (Id));
7734 -- If we have an incomplete entity that comes from the limited
7735 -- view then we return the Underlying_Type of its non-limited
7738 elsif From_With_Type (Id)
7739 and then Present (Non_Limited_View (Id))
7741 return Underlying_Type (Non_Limited_View (Id));
7743 -- Otherwise check for the case where we have a derived type or
7744 -- subtype, and if so get the Underlying_Type of the parent type.
7746 elsif Etype (Id) /= Id then
7747 return Underlying_Type (Etype (Id));
7749 -- Otherwise we have an incomplete or private type that has
7750 -- no full view, which means that we have not encountered the
7751 -- completion, so return Empty to indicate the underlying type
7752 -- is not yet known.
7758 -- For non-incomplete, non-private types, return the type itself
7759 -- Also for entities that are not types at all return the entity
7765 end Underlying_Type;
7771 function Vax_Float (Id : E) return B is
7773 return Is_Floating_Point_Type (Id) and then Float_Rep (Id) = VAX_Native;
7776 ------------------------
7777 -- Write_Entity_Flags --
7778 ------------------------
7780 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
7782 procedure W (Flag_Name : String; Flag : Boolean);
7783 -- Write out given flag if it is set
7789 procedure W (Flag_Name : String; Flag : Boolean) is
7793 Write_Str (Flag_Name);
7794 Write_Str (" = True");
7799 -- Start of processing for Write_Entity_Flags
7802 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
7803 and then Is_Base_Type (Id)
7806 Write_Str ("Component_Alignment = ");
7808 case Component_Alignment (Id) is
7809 when Calign_Default =>
7810 Write_Str ("Calign_Default");
7812 when Calign_Component_Size =>
7813 Write_Str ("Calign_Component_Size");
7815 when Calign_Component_Size_4 =>
7816 Write_Str ("Calign_Component_Size_4");
7818 when Calign_Storage_Unit =>
7819 Write_Str ("Calign_Storage_Unit");
7825 W ("Address_Taken", Flag104 (Id));
7826 W ("Body_Needed_For_SAL", Flag40 (Id));
7827 W ("C_Pass_By_Copy", Flag125 (Id));
7828 W ("Can_Never_Be_Null", Flag38 (Id));
7829 W ("Checks_May_Be_Suppressed", Flag31 (Id));
7830 W ("Debug_Info_Off", Flag166 (Id));
7831 W ("Default_Expressions_Processed", Flag108 (Id));
7832 W ("Delay_Cleanups", Flag114 (Id));
7833 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
7834 W ("Depends_On_Private", Flag14 (Id));
7835 W ("Discard_Names", Flag88 (Id));
7836 W ("Elaboration_Entity_Required", Flag174 (Id));
7837 W ("Elaborate_Body_Desirable", Flag210 (Id));
7838 W ("Entry_Accepted", Flag152 (Id));
7839 W ("Can_Use_Internal_Rep", Flag229 (Id));
7840 W ("Finalize_Storage_Only", Flag158 (Id));
7841 W ("From_With_Type", Flag159 (Id));
7842 W ("Has_Aliased_Components", Flag135 (Id));
7843 W ("Has_Alignment_Clause", Flag46 (Id));
7844 W ("Has_All_Calls_Remote", Flag79 (Id));
7845 W ("Has_Anonymous_Master", Flag253 (Id));
7846 W ("Has_Atomic_Components", Flag86 (Id));
7847 W ("Has_Biased_Representation", Flag139 (Id));
7848 W ("Has_Completion", Flag26 (Id));
7849 W ("Has_Completion_In_Body", Flag71 (Id));
7850 W ("Has_Complex_Representation", Flag140 (Id));
7851 W ("Has_Component_Size_Clause", Flag68 (Id));
7852 W ("Has_Contiguous_Rep", Flag181 (Id));
7853 W ("Has_Controlled_Component", Flag43 (Id));
7854 W ("Has_Controlling_Result", Flag98 (Id));
7855 W ("Has_Convention_Pragma", Flag119 (Id));
7856 W ("Has_Default_Aspect", Flag39 (Id));
7857 W ("Has_Delayed_Aspects", Flag200 (Id));
7858 W ("Has_Delayed_Freeze", Flag18 (Id));
7859 W ("Has_Discriminants", Flag5 (Id));
7860 W ("Has_Dispatch_Table", Flag220 (Id));
7861 W ("Has_Dynamic_Predicate_Aspect", Flag258 (Id));
7862 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
7863 W ("Has_Exit", Flag47 (Id));
7864 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
7865 W ("Has_Forward_Instantiation", Flag175 (Id));
7866 W ("Has_Fully_Qualified_Name", Flag173 (Id));
7867 W ("Has_Gigi_Rep_Item", Flag82 (Id));
7868 W ("Has_Homonym", Flag56 (Id));
7869 W ("Has_Implicit_Dereference", Flag251 (Id));
7870 W ("Has_Inheritable_Invariants", Flag248 (Id));
7871 W ("Has_Initial_Value", Flag219 (Id));
7872 W ("Has_Invariants", Flag232 (Id));
7873 W ("Has_Loop_Entry_Attributes", Flag260 (Id));
7874 W ("Has_Machine_Radix_Clause", Flag83 (Id));
7875 W ("Has_Master_Entity", Flag21 (Id));
7876 W ("Has_Missing_Return", Flag142 (Id));
7877 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
7878 W ("Has_Non_Standard_Rep", Flag75 (Id));
7879 W ("Has_Object_Size_Clause", Flag172 (Id));
7880 W ("Has_Per_Object_Constraint", Flag154 (Id));
7881 W ("Has_Postconditions", Flag240 (Id));
7882 W ("Has_Pragma_Controlled", Flag27 (Id));
7883 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
7884 W ("Has_Pragma_Inline", Flag157 (Id));
7885 W ("Has_Pragma_Inline_Always", Flag230 (Id));
7886 W ("Has_Pragma_No_Inline", Flag201 (Id));
7887 W ("Has_Pragma_Ordered", Flag198 (Id));
7888 W ("Has_Pragma_Pack", Flag121 (Id));
7889 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
7890 W ("Has_Pragma_Pure", Flag203 (Id));
7891 W ("Has_Pragma_Pure_Function", Flag179 (Id));
7892 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
7893 W ("Has_Pragma_Unmodified", Flag233 (Id));
7894 W ("Has_Pragma_Unreferenced", Flag180 (Id));
7895 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
7896 W ("Has_Predicates", Flag250 (Id));
7897 W ("Has_Primitive_Operations", Flag120 (Id));
7898 W ("Has_Private_Ancestor", Flag151 (Id));
7899 W ("Has_Private_Declaration", Flag155 (Id));
7900 W ("Has_Qualified_Name", Flag161 (Id));
7901 W ("Has_RACW", Flag214 (Id));
7902 W ("Has_Record_Rep_Clause", Flag65 (Id));
7903 W ("Has_Recursive_Call", Flag143 (Id));
7904 W ("Has_Size_Clause", Flag29 (Id));
7905 W ("Has_Small_Clause", Flag67 (Id));
7906 W ("Has_Specified_Layout", Flag100 (Id));
7907 W ("Has_Specified_Stream_Input", Flag190 (Id));
7908 W ("Has_Specified_Stream_Output", Flag191 (Id));
7909 W ("Has_Specified_Stream_Read", Flag192 (Id));
7910 W ("Has_Specified_Stream_Write", Flag193 (Id));
7911 W ("Has_Static_Discriminants", Flag211 (Id));
7912 W ("Has_Static_Predicate_Aspect", Flag259 (Id));
7913 W ("Has_Storage_Size_Clause", Flag23 (Id));
7914 W ("Has_Stream_Size_Clause", Flag184 (Id));
7915 W ("Has_Task", Flag30 (Id));
7916 W ("Has_Thunks", Flag228 (Id));
7917 W ("Has_Unchecked_Union", Flag123 (Id));
7918 W ("Has_Unknown_Discriminants", Flag72 (Id));
7919 W ("Has_Up_Level_Access", Flag215 (Id));
7920 W ("Has_Volatile_Components", Flag87 (Id));
7921 W ("Has_Xref_Entry", Flag182 (Id));
7922 W ("In_Package_Body", Flag48 (Id));
7923 W ("In_Private_Part", Flag45 (Id));
7924 W ("In_Use", Flag8 (Id));
7925 W ("Is_AST_Entry", Flag132 (Id));
7926 W ("Is_Abstract_Subprogram", Flag19 (Id));
7927 W ("Is_Abstract_Type", Flag146 (Id));
7928 W ("Is_Local_Anonymous_Access", Flag194 (Id));
7929 W ("Is_Access_Constant", Flag69 (Id));
7930 W ("Is_Ada_2005_Only", Flag185 (Id));
7931 W ("Is_Ada_2012_Only", Flag199 (Id));
7932 W ("Is_Aliased", Flag15 (Id));
7933 W ("Is_Asynchronous", Flag81 (Id));
7934 W ("Is_Atomic", Flag85 (Id));
7935 W ("Is_Bit_Packed_Array", Flag122 (Id));
7936 W ("Is_CPP_Class", Flag74 (Id));
7937 W ("Is_Called", Flag102 (Id));
7938 W ("Is_Character_Type", Flag63 (Id));
7939 W ("Is_Child_Unit", Flag73 (Id));
7940 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
7941 W ("Is_Compilation_Unit", Flag149 (Id));
7942 W ("Is_Completely_Hidden", Flag103 (Id));
7943 W ("Is_Concurrent_Record_Type", Flag20 (Id));
7944 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
7945 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
7946 W ("Is_Constrained", Flag12 (Id));
7947 W ("Is_Constructor", Flag76 (Id));
7948 W ("Is_Controlled", Flag42 (Id));
7949 W ("Is_Controlling_Formal", Flag97 (Id));
7950 W ("Is_Descendent_Of_Address", Flag223 (Id));
7951 W ("Is_Discrim_SO_Function", Flag176 (Id));
7952 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
7953 W ("Is_Dispatching_Operation", Flag6 (Id));
7954 W ("Is_Eliminated", Flag124 (Id));
7955 W ("Is_Entry_Formal", Flag52 (Id));
7956 W ("Is_Exported", Flag99 (Id));
7957 W ("Is_First_Subtype", Flag70 (Id));
7958 W ("Is_For_Access_Subtype", Flag118 (Id));
7959 W ("Is_Formal_Subprogram", Flag111 (Id));
7960 W ("Is_Frozen", Flag4 (Id));
7961 W ("Is_Generic_Actual_Type", Flag94 (Id));
7962 W ("Is_Generic_Instance", Flag130 (Id));
7963 W ("Is_Generic_Type", Flag13 (Id));
7964 W ("Is_Hidden", Flag57 (Id));
7965 W ("Is_Hidden_Open_Scope", Flag171 (Id));
7966 W ("Is_Immediately_Visible", Flag7 (Id));
7967 W ("Is_Implementation_Defined", Flag254 (Id));
7968 W ("Is_Imported", Flag24 (Id));
7969 W ("Is_Inlined", Flag11 (Id));
7970 W ("Is_Instantiated", Flag126 (Id));
7971 W ("Is_Interface", Flag186 (Id));
7972 W ("Is_Internal", Flag17 (Id));
7973 W ("Is_Interrupt_Handler", Flag89 (Id));
7974 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
7975 W ("Is_Invariant_Procedure", Flag257 (Id));
7976 W ("Is_Itype", Flag91 (Id));
7977 W ("Is_Known_Non_Null", Flag37 (Id));
7978 W ("Is_Known_Null", Flag204 (Id));
7979 W ("Is_Known_Valid", Flag170 (Id));
7980 W ("Is_Limited_Composite", Flag106 (Id));
7981 W ("Is_Limited_Interface", Flag197 (Id));
7982 W ("Is_Limited_Record", Flag25 (Id));
7983 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
7984 W ("Is_Non_Static_Subtype", Flag109 (Id));
7985 W ("Is_Null_Init_Proc", Flag178 (Id));
7986 W ("Is_Obsolescent", Flag153 (Id));
7987 W ("Is_Only_Out_Parameter", Flag226 (Id));
7988 W ("Is_Optional_Parameter", Flag134 (Id));
7989 W ("Is_Package_Body_Entity", Flag160 (Id));
7990 W ("Is_Packed", Flag51 (Id));
7991 W ("Is_Packed_Array_Type", Flag138 (Id));
7992 W ("Is_Potentially_Use_Visible", Flag9 (Id));
7993 W ("Is_Predicate_Function", Flag255 (Id));
7994 W ("Is_Predicate_Function_M", Flag256 (Id));
7995 W ("Is_Preelaborated", Flag59 (Id));
7996 W ("Is_Primitive", Flag218 (Id));
7997 W ("Is_Primitive_Wrapper", Flag195 (Id));
7998 W ("Is_Private_Composite", Flag107 (Id));
7999 W ("Is_Private_Descendant", Flag53 (Id));
8000 W ("Is_Private_Primitive", Flag245 (Id));
8001 W ("Is_Processed_Transient", Flag252 (Id));
8002 W ("Is_Public", Flag10 (Id));
8003 W ("Is_Pure", Flag44 (Id));
8004 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
8005 W ("Is_RACW_Stub_Type", Flag244 (Id));
8006 W ("Is_Raised", Flag224 (Id));
8007 W ("Is_Remote_Call_Interface", Flag62 (Id));
8008 W ("Is_Remote_Types", Flag61 (Id));
8009 W ("Is_Renaming_Of_Object", Flag112 (Id));
8010 W ("Is_Return_Object", Flag209 (Id));
8011 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
8012 W ("Is_Shared_Passive", Flag60 (Id));
8013 W ("Is_Statically_Allocated", Flag28 (Id));
8014 W ("Is_Tag", Flag78 (Id));
8015 W ("Is_Tagged_Type", Flag55 (Id));
8016 W ("Is_Thunk", Flag225 (Id));
8017 W ("Is_Trivial_Subprogram", Flag235 (Id));
8018 W ("Is_True_Constant", Flag163 (Id));
8019 W ("Is_Unchecked_Union", Flag117 (Id));
8020 W ("Is_Underlying_Record_View", Flag246 (Id));
8021 W ("Is_Unsigned_Type", Flag144 (Id));
8022 W ("Is_VMS_Exception", Flag133 (Id));
8023 W ("Is_Valued_Procedure", Flag127 (Id));
8024 W ("Is_Visible_Formal", Flag206 (Id));
8025 W ("Is_Visible_Lib_Unit", Flag116 (Id));
8026 W ("Is_Volatile", Flag16 (Id));
8027 W ("Itype_Printed", Flag202 (Id));
8028 W ("Kill_Elaboration_Checks", Flag32 (Id));
8029 W ("Kill_Range_Checks", Flag33 (Id));
8030 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
8031 W ("Low_Bound_Tested", Flag205 (Id));
8032 W ("Machine_Radix_10", Flag84 (Id));
8033 W ("Materialize_Entity", Flag168 (Id));
8034 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
8035 W ("Must_Have_Preelab_Init", Flag208 (Id));
8036 W ("Needs_Debug_Info", Flag147 (Id));
8037 W ("Needs_No_Actuals", Flag22 (Id));
8038 W ("Never_Set_In_Source", Flag115 (Id));
8039 W ("No_Pool_Assigned", Flag131 (Id));
8040 W ("No_Return", Flag113 (Id));
8041 W ("No_Strict_Aliasing", Flag136 (Id));
8042 W ("Non_Binary_Modulus", Flag58 (Id));
8043 W ("Nonzero_Is_True", Flag162 (Id));
8044 W ("OK_To_Rename", Flag247 (Id));
8045 W ("OK_To_Reorder_Components", Flag239 (Id));
8046 W ("Optimize_Alignment_Space", Flag241 (Id));
8047 W ("Optimize_Alignment_Time", Flag242 (Id));
8048 W ("Overlays_Constant", Flag243 (Id));
8049 W ("Reachable", Flag49 (Id));
8050 W ("Referenced", Flag156 (Id));
8051 W ("Referenced_As_LHS", Flag36 (Id));
8052 W ("Referenced_As_Out_Parameter", Flag227 (Id));
8053 W ("Renamed_In_Spec", Flag231 (Id));
8054 W ("Requires_Overriding", Flag213 (Id));
8055 W ("Return_Present", Flag54 (Id));
8056 W ("Returns_By_Ref", Flag90 (Id));
8057 W ("Reverse_Bit_Order", Flag164 (Id));
8058 W ("Reverse_Storage_Order", Flag93 (Id));
8059 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
8060 W ("Size_Depends_On_Discriminant", Flag177 (Id));
8061 W ("Size_Known_At_Compile_Time", Flag92 (Id));
8062 W ("Static_Elaboration_Desired", Flag77 (Id));
8063 W ("Strict_Alignment", Flag145 (Id));
8064 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
8065 W ("Suppress_Initialization", Flag105 (Id));
8066 W ("Suppress_Style_Checks", Flag165 (Id));
8067 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
8068 W ("Treat_As_Volatile", Flag41 (Id));
8069 W ("Universal_Aliasing", Flag216 (Id));
8070 W ("Used_As_Generic_Actual", Flag222 (Id));
8071 W ("Uses_Sec_Stack", Flag95 (Id));
8072 W ("Warnings_Off", Flag96 (Id));
8073 W ("Warnings_Off_Used", Flag236 (Id));
8074 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
8075 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
8076 W ("Was_Hidden", Flag196 (Id));
8077 end Write_Entity_Flags;
8079 -----------------------
8080 -- Write_Entity_Info --
8081 -----------------------
8083 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
8085 procedure Write_Attribute (Which : String; Nam : E);
8086 -- Write attribute value with given string name
8088 procedure Write_Kind (Id : Entity_Id);
8089 -- Write Ekind field of entity
8091 ---------------------
8092 -- Write_Attribute --
8093 ---------------------
8095 procedure Write_Attribute (Which : String; Nam : E) is
8099 Write_Int (Int (Nam));
8101 Write_Name (Chars (Nam));
8103 end Write_Attribute;
8109 procedure Write_Kind (Id : Entity_Id) is
8110 K : constant String := Entity_Kind'Image (Ekind (Id));
8114 Write_Str (" Kind ");
8116 if Is_Type (Id) and then Is_Tagged_Type (Id) then
8117 Write_Str ("TAGGED ");
8120 Write_Str (K (3 .. K'Length));
8123 if Is_Type (Id) and then Depends_On_Private (Id) then
8124 Write_Str ("Depends_On_Private ");
8128 -- Start of processing for Write_Entity_Info
8132 Write_Attribute ("Name ", Id);
8133 Write_Int (Int (Id));
8137 Write_Attribute (" Type ", Etype (Id));
8139 Write_Attribute (" Scope ", Scope (Id));
8144 when Discrete_Kind =>
8145 Write_Str ("Bounds: Id = ");
8147 if Present (Scalar_Range (Id)) then
8148 Write_Int (Int (Type_Low_Bound (Id)));
8149 Write_Str (" .. Id = ");
8150 Write_Int (Int (Type_High_Bound (Id)));
8152 Write_Str ("Empty");
8163 (" Component Type ", Component_Type (Id));
8166 Write_Str (" Indexes ");
8168 Index := First_Index (Id);
8169 while Present (Index) loop
8170 Write_Attribute (" ", Etype (Index));
8171 Index := Next_Index (Index);
8179 (" Directly Designated Type ",
8180 Directly_Designated_Type (Id));
8183 when Overloadable_Kind =>
8184 if Present (Homonym (Id)) then
8185 Write_Str (" Homonym ");
8186 Write_Name (Chars (Homonym (Id)));
8188 Write_Int (Int (Homonym (Id)));
8195 if Ekind (Scope (Id)) in Record_Kind then
8197 " Original_Record_Component ",
8198 Original_Record_Component (Id));
8199 Write_Int (Int (Original_Record_Component (Id)));
8203 when others => null;
8205 end Write_Entity_Info;
8207 -----------------------
8208 -- Write_Field6_Name --
8209 -----------------------
8211 procedure Write_Field6_Name (Id : Entity_Id) is
8212 pragma Warnings (Off, Id);
8214 Write_Str ("First_Rep_Item");
8215 end Write_Field6_Name;
8217 -----------------------
8218 -- Write_Field7_Name --
8219 -----------------------
8221 procedure Write_Field7_Name (Id : Entity_Id) is
8222 pragma Warnings (Off, Id);
8224 Write_Str ("Freeze_Node");
8225 end Write_Field7_Name;
8227 -----------------------
8228 -- Write_Field8_Name --
8229 -----------------------
8231 procedure Write_Field8_Name (Id : Entity_Id) is
8235 Write_Str ("Associated_Node_For_Itype");
8238 Write_Str ("Dependent_Instances");
8241 Write_Str ("First_Exit_Statement");
8244 Write_Str ("Hiding_Loop_Variable");
8246 when E_Abstract_State =>
8247 Write_Str ("Integrity_Level");
8251 E_Subprogram_Body =>
8252 Write_Str ("Mechanism");
8256 Write_Str ("Normalized_First_Bit");
8259 Write_Str ("Postcondition_Proc");
8261 when E_Return_Statement =>
8262 Write_Str ("Return_Applies_To");
8265 Write_Str ("Field8??");
8267 end Write_Field8_Name;
8269 -----------------------
8270 -- Write_Field9_Name --
8271 -----------------------
8273 procedure Write_Field9_Name (Id : Entity_Id) is
8277 Write_Str ("Class_Wide_Type");
8280 Write_Str ("Current_Value");
8282 when E_Abstract_State =>
8283 Write_Str ("Refined_State");
8286 E_Generic_Function |
8288 E_Generic_Procedure |
8291 Write_Str ("Renaming_Map");
8294 Write_Str ("Field9??");
8296 end Write_Field9_Name;
8298 ------------------------
8299 -- Write_Field10_Name --
8300 ------------------------
8302 procedure Write_Field10_Name (Id : Entity_Id) is
8305 when Class_Wide_Kind |
8311 Write_Str ("Direct_Primitive_Operations");
8314 Write_Str ("Float_Rep");
8316 when E_In_Parameter |
8318 Write_Str ("Discriminal_Link");
8324 Write_Str ("Handler_Records");
8328 Write_Str ("Normalized_Position_Max");
8331 Write_Str ("Field10??");
8333 end Write_Field10_Name;
8335 ------------------------
8336 -- Write_Field11_Name --
8337 ------------------------
8339 procedure Write_Field11_Name (Id : Entity_Id) is
8343 Write_Str ("Block_Node");
8347 Write_Str ("Component_Bit_Offset");
8350 Write_Str ("Entry_Component");
8352 when E_Enumeration_Literal =>
8353 Write_Str ("Enumeration_Pos");
8357 Write_Str ("Full_View");
8359 when E_Generic_Package =>
8360 Write_Str ("Generic_Homonym");
8366 Write_Str ("Protected_Body_Subprogram");
8369 Write_Str ("Field11??");
8371 end Write_Field11_Name;
8373 ------------------------
8374 -- Write_Field12_Name --
8375 ------------------------
8377 procedure Write_Field12_Name (Id : Entity_Id) is
8381 Write_Str ("Associated_Formal_Package");
8384 Write_Str ("Barrier_Function");
8386 when E_Enumeration_Literal =>
8387 Write_Str ("Enumeration_Rep");
8395 E_In_Out_Parameter |
8399 Write_Str ("Esize");
8403 Write_Str ("Next_Inlined_Subprogram");
8406 Write_Str ("Field12??");
8408 end Write_Field12_Name;
8410 ------------------------
8411 -- Write_Field13_Name --
8412 ------------------------
8414 procedure Write_Field13_Name (Id : Entity_Id) is
8419 Write_Str ("Component_Clause");
8422 Write_Str ("Elaboration_Entity");
8426 Generic_Unit_Kind =>
8427 Write_Str ("Elaboration_Entity");
8431 Write_Str ("Extra_Accessibility");
8434 Write_Str ("RM_Size");
8437 Write_Str ("Field13??");
8439 end Write_Field13_Name;
8441 -----------------------
8442 -- Write_Field14_Name --
8443 -----------------------
8445 procedure Write_Field14_Name (Id : Entity_Id) is
8454 Write_Str ("Alignment");
8458 Write_Str ("First_Optional_Parameter");
8462 Write_Str ("Normalized_Position");
8465 E_Generic_Package =>
8466 Write_Str ("Shadow_Entities");
8469 Write_Str ("Field14??");
8471 end Write_Field14_Name;
8473 ------------------------
8474 -- Write_Field15_Name --
8475 ------------------------
8477 procedure Write_Field15_Name (Id : Entity_Id) is
8480 when E_Discriminant =>
8481 Write_Str ("Discriminant_Number");
8484 Write_Str ("DT_Entry_Count");
8488 Write_Str ("DT_Position");
8490 when E_Protected_Type =>
8491 Write_Str ("Entry_Bodies_Array");
8494 Write_Str ("Entry_Parameters_Type");
8497 Write_Str ("Extra_Formal");
8499 when Enumeration_Kind =>
8500 Write_Str ("Lit_Indexes");
8504 Write_Str ("Related_Instance");
8506 when Decimal_Fixed_Point_Kind =>
8507 Write_Str ("Scale_Value");
8511 Write_Str ("Status_Flag_Or_Transient_Decl");
8515 Write_Str ("Storage_Size_Variable");
8517 when E_String_Literal_Subtype =>
8518 Write_Str ("String_Literal_Low_Bound");
8521 Write_Str ("Field15??");
8523 end Write_Field15_Name;
8525 ------------------------
8526 -- Write_Field16_Name --
8527 ------------------------
8529 procedure Write_Field16_Name (Id : Entity_Id) is
8532 when E_Record_Type |
8533 E_Record_Type_With_Private =>
8534 Write_Str ("Access_Disp_Table");
8536 when E_Record_Subtype |
8537 E_Class_Wide_Subtype =>
8538 Write_Str ("Cloned_Subtype");
8542 Write_Str ("DTC_Entity");
8545 Write_Str ("Entry_Formal");
8550 Write_Str ("First_Private_Entity");
8552 when Enumeration_Kind =>
8553 Write_Str ("Lit_Strings");
8555 when E_String_Literal_Subtype =>
8556 Write_Str ("String_Literal_Length");
8560 Write_Str ("Unset_Reference");
8563 Write_Str ("Field16??");
8565 end Write_Field16_Name;
8567 ------------------------
8568 -- Write_Field17_Name --
8569 ------------------------
8571 procedure Write_Field17_Name (Id : Entity_Id) is
8576 E_Generic_In_Out_Parameter |
8578 Write_Str ("Actual_Subtype");
8581 Write_Str ("Digits_Value");
8583 when E_Discriminant =>
8584 Write_Str ("Discriminal");
8593 E_Generic_Function |
8595 E_Generic_Procedure |
8603 E_Return_Statement |
8605 E_Subprogram_Type =>
8606 Write_Str ("First_Entity");
8609 Write_Str ("First_Index");
8611 when Enumeration_Kind =>
8612 Write_Str ("First_Literal");
8615 Write_Str ("Master_Id");
8617 when Modular_Integer_Kind =>
8618 Write_Str ("Modulus");
8620 when E_Incomplete_Type =>
8621 Write_Str ("Non_Limited_View");
8623 when E_Incomplete_Subtype =>
8624 if From_With_Type (Id) then
8625 Write_Str ("Non_Limited_View");
8629 Write_Str ("Prival");
8632 Write_Str ("Field17??");
8634 end Write_Field17_Name;
8636 ------------------------
8637 -- Write_Field18_Name --
8638 ------------------------
8640 procedure Write_Field18_Name (Id : Entity_Id) is
8643 when E_Enumeration_Literal |
8647 Write_Str ("Alias");
8649 when E_Record_Type =>
8650 Write_Str ("Corresponding_Concurrent_Type");
8652 when E_Subprogram_Body =>
8653 Write_Str ("Corresponding_Protected_Entry");
8655 when Concurrent_Kind =>
8656 Write_Str ("Corresponding_Record_Type");
8661 Write_Str ("Enclosing_Scope");
8663 when E_Entry_Index_Parameter =>
8664 Write_Str ("Entry_Index_Constant");
8666 when E_Class_Wide_Subtype |
8667 E_Access_Protected_Subprogram_Type |
8668 E_Anonymous_Access_Protected_Subprogram_Type |
8669 E_Access_Subprogram_Type |
8671 Write_Str ("Equivalent_Type");
8673 when Fixed_Point_Kind =>
8674 Write_Str ("Delta_Value");
8676 when Incomplete_Or_Private_Kind |
8678 Write_Str ("Private_Dependents");
8681 Write_Str ("Renamed_Object");
8685 E_Generic_Function |
8686 E_Generic_Procedure |
8687 E_Generic_Package =>
8688 Write_Str ("Renamed_Entity");
8691 Write_Str ("Field18??");
8693 end Write_Field18_Name;
8695 -----------------------
8696 -- Write_Field19_Name --
8697 -----------------------
8699 procedure Write_Field19_Name (Id : Entity_Id) is
8703 E_Generic_Package =>
8704 Write_Str ("Body_Entity");
8706 when E_Discriminant =>
8707 Write_Str ("Corresponding_Discriminant");
8710 Write_Str ("Default_Value");
8712 when E_Array_Type =>
8713 Write_Str ("Default_Component_Value");
8715 when E_Record_Type =>
8716 Write_Str ("Parent_Subtype");
8720 Write_Str ("Size_Check_Code");
8722 when E_Package_Body |
8724 Write_Str ("Spec_Entity");
8726 when Private_Kind =>
8727 Write_Str ("Underlying_Full_View");
8729 when E_Function | E_Operator | E_Subprogram_Type =>
8730 Write_Str ("Extra_Accessibility_Of_Result");
8733 Write_Str ("Field19??");
8735 end Write_Field19_Name;
8737 -----------------------
8738 -- Write_Field20_Name --
8739 -----------------------
8741 procedure Write_Field20_Name (Id : Entity_Id) is
8745 Write_Str ("Component_Type");
8747 when E_In_Parameter |
8748 E_Generic_In_Parameter =>
8749 Write_Str ("Default_Value");
8752 Write_Str ("Directly_Designated_Type");
8755 Write_Str ("Discriminant_Checking_Func");
8757 when E_Discriminant =>
8758 Write_Str ("Discriminant_Default_Value");
8767 E_Generic_Function |
8769 E_Generic_Procedure |
8777 E_Return_Statement |
8779 E_Subprogram_Type =>
8780 Write_Str ("Last_Entity");
8784 Write_Str ("Prival_Link");
8787 Write_Str ("Scalar_Range");
8790 Write_Str ("Register_Exception_Call");
8793 Write_Str ("Field20??");
8795 end Write_Field20_Name;
8797 -----------------------
8798 -- Write_Field21_Name --
8799 -----------------------
8801 procedure Write_Field21_Name (Id : Entity_Id) is
8805 Write_Str ("Accept_Address");
8807 when E_In_Parameter =>
8808 Write_Str ("Default_Expr_Function");
8810 when Concurrent_Kind |
8811 Incomplete_Or_Private_Kind |
8815 Write_Str ("Discriminant_Constraint");
8820 E_Generic_Function |
8822 E_Generic_Procedure |
8824 Write_Str ("Interface_Name");
8827 Modular_Integer_Kind =>
8828 Write_Str ("Original_Array_Type");
8830 when Fixed_Point_Kind =>
8831 Write_Str ("Small_Value");
8834 Write_Str ("Field21??");
8836 end Write_Field21_Name;
8838 -----------------------
8839 -- Write_Field22_Name --
8840 -----------------------
8842 procedure Write_Field22_Name (Id : Entity_Id) is
8846 Write_Str ("Associated_Storage_Pool");
8849 Write_Str ("Component_Size");
8851 when E_Record_Type =>
8852 Write_Str ("Corresponding_Remote_Type");
8856 Write_Str ("Original_Record_Component");
8858 when E_Enumeration_Literal =>
8859 Write_Str ("Enumeration_Rep_Expr");
8862 Write_Str ("Exception_Code");
8864 when E_Record_Type_With_Private |
8865 E_Record_Subtype_With_Private |
8868 E_Limited_Private_Type |
8869 E_Limited_Private_Subtype =>
8870 Write_Str ("Private_View");
8873 Write_Str ("Protected_Formal");
8883 E_Generic_Function |
8884 E_Generic_Procedure |
8887 E_Return_Statement |
8890 Write_Str ("Scope_Depth_Value");
8893 Write_Str ("Shared_Var_Procs_Instance");
8896 Write_Str ("Field22??");
8898 end Write_Field22_Name;
8900 ------------------------
8901 -- Write_Field23_Name --
8902 ------------------------
8904 procedure Write_Field23_Name (Id : Entity_Id) is
8907 when E_Discriminant =>
8908 Write_Str ("CR_Discriminant");
8911 Write_Str ("Entry_Cancel_Parameter");
8913 when E_Enumeration_Type =>
8914 Write_Str ("Enum_Pos_To_Rep");
8918 Write_Str ("Extra_Constrained");
8921 Write_Str ("Finalization_Master");
8923 when E_Generic_Function |
8925 E_Generic_Procedure =>
8926 Write_Str ("Inner_Instances");
8929 Write_Str ("Packed_Array_Type");
8932 Write_Str ("Protection_Object");
8934 when Concurrent_Kind |
8935 Incomplete_Or_Private_Kind |
8939 Write_Str ("Stored_Constraint");
8943 if Present (Scope (Id))
8944 and then Is_Protected_Type (Scope (Id))
8946 Write_Str ("Protection_Object");
8948 Write_Str ("Generic_Renamings");
8952 if Is_Generic_Instance (Id) then
8953 Write_Str ("Generic_Renamings");
8955 Write_Str ("Limited_View");
8959 Write_Str ("Field23??");
8961 end Write_Field23_Name;
8963 ------------------------
8964 -- Write_Field24_Name --
8965 ------------------------
8967 procedure Write_Field24_Name (Id : Entity_Id) is
8972 Write_Str ("Finalizer");
8977 Write_Str ("Related_Expression");
8982 Generic_Subprogram_Kind =>
8983 Write_Str ("Contract");
8986 Write_Str ("Field24???");
8988 end Write_Field24_Name;
8990 ------------------------
8991 -- Write_Field25_Name --
8992 ------------------------
8994 procedure Write_Field25_Name (Id : Entity_Id) is
8998 Write_Str ("Abstract_States");
9001 Write_Str ("Debug_Renaming_Link");
9004 Write_Str ("DT_Offset_To_Top_Func");
9008 Write_Str ("Interface_Alias");
9010 when E_Record_Type |
9012 E_Record_Type_With_Private |
9013 E_Record_Subtype_With_Private =>
9014 Write_Str ("Interfaces");
9018 Write_Str ("Related_Array_Object");
9021 Write_Str ("Task_Body_Procedure");
9025 Write_Str ("PPC_Wrapper");
9027 when E_Enumeration_Subtype |
9028 E_Modular_Integer_Subtype |
9029 E_Signed_Integer_Subtype =>
9030 Write_Str ("Static_Predicate");
9033 Write_Str ("Field25??");
9035 end Write_Field25_Name;
9037 ------------------------
9038 -- Write_Field26_Name --
9039 ------------------------
9041 procedure Write_Field26_Name (Id : Entity_Id) is
9044 when E_Record_Type |
9045 E_Record_Type_With_Private =>
9046 Write_Str ("Dispatch_Table_Wrappers");
9048 when E_In_Out_Parameter |
9051 Write_Str ("Last_Assignment");
9053 when E_Access_Subprogram_Type =>
9054 Write_Str ("Original_Access_Type");
9056 when E_Generic_Package |
9058 Write_Str ("Package_Instantiation");
9062 Write_Str ("Related_Type");
9065 Write_Str ("Relative_Deadline_Variable");
9069 Write_Str ("Overridden_Operation");
9072 Write_Str ("Field26??");
9074 end Write_Field26_Name;
9076 ------------------------
9077 -- Write_Field27_Name --
9078 ------------------------
9080 procedure Write_Field27_Name (Id : Entity_Id) is
9085 Write_Str ("Current_Use_Clause");
9090 Write_Str ("Related_Type");
9094 Write_Str ("Wrapped_Entity");
9097 Write_Str ("Field27??");
9099 end Write_Field27_Name;
9101 ------------------------
9102 -- Write_Field28_Name --
9103 ------------------------
9105 procedure Write_Field28_Name (Id : Entity_Id) is
9113 E_Subprogram_Type =>
9114 Write_Str ("Extra_Formals");
9116 when E_Constant | E_Variable =>
9117 Write_Str ("Initialization_Statements");
9119 when E_Record_Type =>
9120 Write_Str ("Underlying_Record_View");
9123 Write_Str ("Field28??");
9125 end Write_Field28_Name;
9127 ------------------------
9128 -- Write_Field29_Name --
9129 ------------------------
9131 procedure Write_Field29_Name (Id : Entity_Id) is
9135 Write_Str ("Subprograms_For_Type");
9138 Write_Str ("Field29??");
9140 end Write_Field29_Name;
9142 ------------------------
9143 -- Write_Field30_Name --
9144 ------------------------
9146 procedure Write_Field30_Name (Id : Entity_Id) is
9150 Write_Str ("Corresponding_Equality");
9153 Write_Str ("Static_Initialization");
9156 Write_Str ("Field30??");
9158 end Write_Field30_Name;
9160 ------------------------
9161 -- Write_Field31_Name --
9162 ------------------------
9164 procedure Write_Field31_Name (Id : Entity_Id) is
9169 Write_Str ("Thunk_Entity");
9172 Write_Str ("Field31??");
9174 end Write_Field31_Name;
9176 ------------------------
9177 -- Write_Field32_Name --
9178 ------------------------
9180 procedure Write_Field32_Name (Id : Entity_Id) is
9184 E_Generic_Function |
9186 E_Generic_Procedure |
9190 E_Subprogram_Body =>
9191 Write_Str ("SPARK_Mode_Pragmas");
9194 Write_Str ("Field32??");
9196 end Write_Field32_Name;
9198 ------------------------
9199 -- Write_Field33_Name --
9200 ------------------------
9202 procedure Write_Field33_Name (Id : Entity_Id) is
9206 Write_Str ("Field33??");
9208 end Write_Field33_Name;
9210 ------------------------
9211 -- Write_Field34_Name --
9212 ------------------------
9214 procedure Write_Field34_Name (Id : Entity_Id) is
9218 Write_Str ("Field34??");
9220 end Write_Field34_Name;
9222 ------------------------
9223 -- Write_Field35_Name --
9224 ------------------------
9226 procedure Write_Field35_Name (Id : Entity_Id) is
9230 Write_Str ("Field35??");
9232 end Write_Field35_Name;
9234 -------------------------
9235 -- Iterator Procedures --
9236 -------------------------
9238 procedure Proc_Next_Component (N : in out Node_Id) is
9240 N := Next_Component (N);
9241 end Proc_Next_Component;
9243 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
9245 N := Next_Entity (N);
9246 while Present (N) loop
9247 exit when Ekind_In (N, E_Component, E_Discriminant);
9248 N := Next_Entity (N);
9250 end Proc_Next_Component_Or_Discriminant;
9252 procedure Proc_Next_Discriminant (N : in out Node_Id) is
9254 N := Next_Discriminant (N);
9255 end Proc_Next_Discriminant;
9257 procedure Proc_Next_Formal (N : in out Node_Id) is
9259 N := Next_Formal (N);
9260 end Proc_Next_Formal;
9262 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
9264 N := Next_Formal_With_Extras (N);
9265 end Proc_Next_Formal_With_Extras;
9267 procedure Proc_Next_Index (N : in out Node_Id) is
9269 N := Next_Index (N);
9270 end Proc_Next_Index;
9272 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
9274 N := Next_Inlined_Subprogram (N);
9275 end Proc_Next_Inlined_Subprogram;
9277 procedure Proc_Next_Literal (N : in out Node_Id) is
9279 N := Next_Literal (N);
9280 end Proc_Next_Literal;
9282 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
9284 N := Next_Stored_Discriminant (N);
9285 end Proc_Next_Stored_Discriminant;