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
551 -- Has_Delayed_Rep_Aspects Flag261
552 -- May_Inherit_Delayed_Rep_Aspects Flag262
581 -- Note: Flag287-317 are defined in atree.ads/adb, but not yet in atree.h
583 -----------------------
584 -- Local subprograms --
585 -----------------------
587 function Has_Property
589 Prop_Nam : Name_Id) return Boolean;
590 -- Determine whether abstract state State has a particular property denoted
591 -- by the name Prop_Nam.
597 function Float_Rep (Id : E) return F is
598 pragma Assert (Is_Floating_Point_Type (Id));
600 return F'Val (UI_To_Int (Uint10 (Base_Type (Id))));
607 function Has_Property
609 Prop_Nam : Name_Id) return Boolean
611 Par : constant Node_Id := Parent (State);
615 pragma Assert (Ekind (State) = E_Abstract_State);
617 -- States with properties appear as extension aggregates in the tree
619 if Nkind (Par) = N_Extension_Aggregate then
620 if Prop_Nam = Name_Integrity then
621 return Present (Component_Associations (Par));
624 Prop := First (Expressions (Par));
625 while Present (Prop) loop
626 if Chars (Prop) = Prop_Nam then
638 --------------------------------
639 -- Attribute Access Functions --
640 --------------------------------
642 function Abstract_States (Id : E) return L is
644 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
648 function Accept_Address (Id : E) return L is
653 function Access_Disp_Table (Id : E) return L is
655 pragma Assert (Ekind_In (Id, E_Record_Type,
657 return Elist16 (Implementation_Base_Type (Id));
658 end Access_Disp_Table;
660 function Actual_Subtype (Id : E) return E is
663 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
664 or else Is_Formal (Id));
668 function Address_Taken (Id : E) return B is
673 function Alias (Id : E) return E is
676 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
680 function Alignment (Id : E) return U is
682 pragma Assert (Is_Type (Id)
683 or else Is_Formal (Id)
684 or else Ekind_In (Id, E_Loop_Parameter,
691 function Associated_Formal_Package (Id : E) return E is
693 pragma Assert (Ekind (Id) = E_Package);
695 end Associated_Formal_Package;
697 function Associated_Node_For_Itype (Id : E) return N is
700 end Associated_Node_For_Itype;
702 function Associated_Storage_Pool (Id : E) return E is
704 pragma Assert (Is_Access_Type (Id));
705 return Node22 (Root_Type (Id));
706 end Associated_Storage_Pool;
708 function Barrier_Function (Id : E) return N is
710 pragma Assert (Is_Entry (Id));
712 end Barrier_Function;
714 function Block_Node (Id : E) return N is
716 pragma Assert (Ekind (Id) = E_Block);
720 function Body_Entity (Id : E) return E is
722 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
726 function Body_Needed_For_SAL (Id : E) return B is
729 (Ekind (Id) = E_Package
730 or else Is_Subprogram (Id)
731 or else Is_Generic_Unit (Id));
733 end Body_Needed_For_SAL;
735 function C_Pass_By_Copy (Id : E) return B is
737 pragma Assert (Is_Record_Type (Id));
738 return Flag125 (Implementation_Base_Type (Id));
741 function Can_Never_Be_Null (Id : E) return B is
744 end Can_Never_Be_Null;
746 function Checks_May_Be_Suppressed (Id : E) return B is
749 end Checks_May_Be_Suppressed;
751 function Class_Wide_Type (Id : E) return E is
753 pragma Assert (Is_Type (Id));
757 function Cloned_Subtype (Id : E) return E is
759 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
763 function Component_Bit_Offset (Id : E) return U is
765 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
767 end Component_Bit_Offset;
769 function Component_Clause (Id : E) return N is
771 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
773 end Component_Clause;
775 function Component_Size (Id : E) return U is
777 pragma Assert (Is_Array_Type (Id));
778 return Uint22 (Implementation_Base_Type (Id));
781 function Component_Type (Id : E) return E is
783 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
784 return Node20 (Implementation_Base_Type (Id));
787 function Corresponding_Concurrent_Type (Id : E) return E is
789 pragma Assert (Ekind (Id) = E_Record_Type);
791 end Corresponding_Concurrent_Type;
793 function Corresponding_Discriminant (Id : E) return E is
795 pragma Assert (Ekind (Id) = E_Discriminant);
797 end Corresponding_Discriminant;
799 function Corresponding_Equality (Id : E) return E is
802 (Ekind (Id) = E_Function
803 and then not Comes_From_Source (Id)
804 and then Chars (Id) = Name_Op_Ne);
806 end Corresponding_Equality;
808 function Corresponding_Protected_Entry (Id : E) return E is
810 pragma Assert (Ekind (Id) = E_Subprogram_Body);
812 end Corresponding_Protected_Entry;
814 function Corresponding_Record_Type (Id : E) return E is
816 pragma Assert (Is_Concurrent_Type (Id));
818 end Corresponding_Record_Type;
820 function Corresponding_Remote_Type (Id : E) return E is
823 end Corresponding_Remote_Type;
825 function Current_Use_Clause (Id : E) return E is
827 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
829 end Current_Use_Clause;
831 function Current_Value (Id : E) return N is
833 pragma Assert (Ekind (Id) in Object_Kind);
837 function CR_Discriminant (Id : E) return E is
842 function Debug_Info_Off (Id : E) return B is
847 function Debug_Renaming_Link (Id : E) return E is
850 end Debug_Renaming_Link;
852 function Default_Aspect_Component_Value (Id : E) return N is
854 pragma Assert (Is_Array_Type (Id));
856 end Default_Aspect_Component_Value;
858 function Default_Aspect_Value (Id : E) return N is
860 pragma Assert (Is_Scalar_Type (Id));
862 end Default_Aspect_Value;
864 function Default_Expr_Function (Id : E) return E is
866 pragma Assert (Is_Formal (Id));
868 end Default_Expr_Function;
870 function Default_Expressions_Processed (Id : E) return B is
873 end Default_Expressions_Processed;
875 function Default_Value (Id : E) return N is
877 pragma Assert (Is_Formal (Id));
881 function Delay_Cleanups (Id : E) return B is
886 function Delay_Subprogram_Descriptors (Id : E) return B is
889 end Delay_Subprogram_Descriptors;
891 function Delta_Value (Id : E) return R is
893 pragma Assert (Is_Fixed_Point_Type (Id));
897 function Dependent_Instances (Id : E) return L is
899 pragma Assert (Is_Generic_Instance (Id));
901 end Dependent_Instances;
903 function Depends_On_Private (Id : E) return B is
905 pragma Assert (Nkind (Id) in N_Entity);
907 end Depends_On_Private;
909 function Digits_Value (Id : E) return U is
912 (Is_Floating_Point_Type (Id)
913 or else Is_Decimal_Fixed_Point_Type (Id));
917 function Direct_Primitive_Operations (Id : E) return L is
919 pragma Assert (Is_Tagged_Type (Id));
921 end Direct_Primitive_Operations;
923 function Directly_Designated_Type (Id : E) return E is
925 pragma Assert (Is_Access_Type (Id));
927 end Directly_Designated_Type;
929 function Discard_Names (Id : E) return B is
934 function Discriminal (Id : E) return E is
936 pragma Assert (Ekind (Id) = E_Discriminant);
940 function Discriminal_Link (Id : E) return N is
943 end Discriminal_Link;
945 function Discriminant_Checking_Func (Id : E) return E is
947 pragma Assert (Ekind (Id) = E_Component);
949 end Discriminant_Checking_Func;
951 function Discriminant_Constraint (Id : E) return L is
953 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
955 end Discriminant_Constraint;
957 function Discriminant_Default_Value (Id : E) return N is
959 pragma Assert (Ekind (Id) = E_Discriminant);
961 end Discriminant_Default_Value;
963 function Discriminant_Number (Id : E) return U is
965 pragma Assert (Ekind (Id) = E_Discriminant);
967 end Discriminant_Number;
969 function Dispatch_Table_Wrappers (Id : E) return L is
971 pragma Assert (Ekind_In (Id, E_Record_Type,
973 return Elist26 (Implementation_Base_Type (Id));
974 end Dispatch_Table_Wrappers;
976 function DT_Entry_Count (Id : E) return U is
978 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
982 function DT_Offset_To_Top_Func (Id : E) return E is
984 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
986 end DT_Offset_To_Top_Func;
988 function DT_Position (Id : E) return U is
990 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
991 and then Present (DTC_Entity (Id)));
995 function DTC_Entity (Id : E) return E is
997 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1001 function Elaborate_Body_Desirable (Id : E) return B is
1003 pragma Assert (Ekind (Id) = E_Package);
1004 return Flag210 (Id);
1005 end Elaborate_Body_Desirable;
1007 function Elaboration_Entity (Id : E) return E is
1012 Ekind (Id) = E_Package
1014 Is_Generic_Unit (Id));
1016 end Elaboration_Entity;
1018 function Elaboration_Entity_Required (Id : E) return B is
1023 Ekind (Id) = E_Package
1025 Is_Generic_Unit (Id));
1026 return Flag174 (Id);
1027 end Elaboration_Entity_Required;
1029 function Enclosing_Scope (Id : E) return E is
1032 end Enclosing_Scope;
1034 function Entry_Accepted (Id : E) return B is
1036 pragma Assert (Is_Entry (Id));
1037 return Flag152 (Id);
1040 function Entry_Bodies_Array (Id : E) return E is
1043 end Entry_Bodies_Array;
1045 function Entry_Cancel_Parameter (Id : E) return E is
1048 end Entry_Cancel_Parameter;
1050 function Entry_Component (Id : E) return E is
1053 end Entry_Component;
1055 function Entry_Formal (Id : E) return E is
1060 function Entry_Index_Constant (Id : E) return N is
1062 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
1064 end Entry_Index_Constant;
1066 function Contract (Id : E) return N is
1069 (Ekind_In (Id, E_Entry, E_Entry_Family)
1070 or else Is_Subprogram (Id)
1071 or else Is_Generic_Subprogram (Id));
1075 function Entry_Parameters_Type (Id : E) return E is
1078 end Entry_Parameters_Type;
1080 function Enum_Pos_To_Rep (Id : E) return E is
1082 pragma Assert (Ekind (Id) = E_Enumeration_Type);
1084 end Enum_Pos_To_Rep;
1086 function Enumeration_Pos (Id : E) return Uint is
1088 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1090 end Enumeration_Pos;
1092 function Enumeration_Rep (Id : E) return U is
1094 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1096 end Enumeration_Rep;
1098 function Enumeration_Rep_Expr (Id : E) return N is
1100 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1102 end Enumeration_Rep_Expr;
1104 function Equivalent_Type (Id : E) return E is
1107 (Ekind_In (Id, E_Class_Wide_Type,
1108 E_Class_Wide_Subtype,
1109 E_Access_Protected_Subprogram_Type,
1110 E_Anonymous_Access_Protected_Subprogram_Type,
1111 E_Access_Subprogram_Type,
1114 end Equivalent_Type;
1116 function Esize (Id : E) return Uint is
1121 function Exception_Code (Id : E) return Uint is
1123 pragma Assert (Ekind (Id) = E_Exception);
1127 function Extra_Accessibility (Id : E) return E is
1130 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
1132 end Extra_Accessibility;
1134 function Extra_Accessibility_Of_Result (Id : E) return E is
1136 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
1138 end Extra_Accessibility_Of_Result;
1140 function Extra_Constrained (Id : E) return E is
1142 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1144 end Extra_Constrained;
1146 function Extra_Formal (Id : E) return E is
1151 function Extra_Formals (Id : E) return E is
1154 (Is_Overloadable (Id)
1155 or else Ekind_In (Id, E_Entry_Family,
1157 E_Subprogram_Type));
1161 function Can_Use_Internal_Rep (Id : E) return B is
1163 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1164 return Flag229 (Base_Type (Id));
1165 end Can_Use_Internal_Rep;
1167 function Finalization_Master (Id : E) return E is
1169 pragma Assert (Is_Access_Type (Id));
1170 return Node23 (Root_Type (Id));
1171 end Finalization_Master;
1173 function Finalize_Storage_Only (Id : E) return B is
1175 pragma Assert (Is_Type (Id));
1176 return Flag158 (Base_Type (Id));
1177 end Finalize_Storage_Only;
1179 function Finalizer (Id : E) return E is
1182 (Ekind (Id) = E_Package
1183 or else Ekind (Id) = E_Package_Body);
1187 function First_Entity (Id : E) return E is
1192 function First_Exit_Statement (Id : E) return N is
1194 pragma Assert (Ekind (Id) = E_Loop);
1196 end First_Exit_Statement;
1198 function First_Index (Id : E) return N is
1200 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1204 function First_Literal (Id : E) return E is
1206 pragma Assert (Is_Enumeration_Type (Id));
1210 function First_Optional_Parameter (Id : E) return E is
1212 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1214 end First_Optional_Parameter;
1216 function First_Private_Entity (Id : E) return E is
1218 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1219 or else Ekind (Id) in Concurrent_Kind);
1221 end First_Private_Entity;
1223 function First_Rep_Item (Id : E) return E is
1228 function Freeze_Node (Id : E) return N is
1233 function From_With_Type (Id : E) return B is
1235 return Flag159 (Id);
1238 function Full_View (Id : E) return E is
1240 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1244 function Generic_Homonym (Id : E) return E is
1246 pragma Assert (Ekind (Id) = E_Generic_Package);
1248 end Generic_Homonym;
1250 function Generic_Renamings (Id : E) return L is
1252 return Elist23 (Id);
1253 end Generic_Renamings;
1255 function Handler_Records (Id : E) return S is
1258 end Handler_Records;
1260 function Has_Aliased_Components (Id : E) return B is
1262 return Flag135 (Implementation_Base_Type (Id));
1263 end Has_Aliased_Components;
1265 function Has_Alignment_Clause (Id : E) return B is
1268 end Has_Alignment_Clause;
1270 function Has_All_Calls_Remote (Id : E) return B is
1273 end Has_All_Calls_Remote;
1275 function Has_Anonymous_Master (Id : E) return B is
1278 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
1279 return Flag253 (Id);
1280 end Has_Anonymous_Master;
1282 function Has_Atomic_Components (Id : E) return B is
1284 return Flag86 (Implementation_Base_Type (Id));
1285 end Has_Atomic_Components;
1287 function Has_Biased_Representation (Id : E) return B is
1289 return Flag139 (Id);
1290 end Has_Biased_Representation;
1292 function Has_Completion (Id : E) return B is
1297 function Has_Completion_In_Body (Id : E) return B is
1299 pragma Assert (Is_Type (Id));
1301 end Has_Completion_In_Body;
1303 function Has_Complex_Representation (Id : E) return B is
1305 pragma Assert (Is_Type (Id));
1306 return Flag140 (Implementation_Base_Type (Id));
1307 end Has_Complex_Representation;
1309 function Has_Component_Size_Clause (Id : E) return B is
1311 pragma Assert (Is_Array_Type (Id));
1312 return Flag68 (Implementation_Base_Type (Id));
1313 end Has_Component_Size_Clause;
1315 function Has_Constrained_Partial_View (Id : E) return B is
1317 pragma Assert (Is_Type (Id));
1318 return Flag187 (Id);
1319 end Has_Constrained_Partial_View;
1321 function Has_Controlled_Component (Id : E) return B is
1323 return Flag43 (Base_Type (Id));
1324 end Has_Controlled_Component;
1326 function Has_Contiguous_Rep (Id : E) return B is
1328 return Flag181 (Id);
1329 end Has_Contiguous_Rep;
1331 function Has_Controlling_Result (Id : E) return B is
1334 end Has_Controlling_Result;
1336 function Has_Convention_Pragma (Id : E) return B is
1338 return Flag119 (Id);
1339 end Has_Convention_Pragma;
1341 function Has_Default_Aspect (Id : E) return B is
1343 return Flag39 (Base_Type (Id));
1344 end Has_Default_Aspect;
1346 function Has_Delayed_Aspects (Id : E) return B is
1348 pragma Assert (Nkind (Id) in N_Entity);
1349 return Flag200 (Id);
1350 end Has_Delayed_Aspects;
1352 function Has_Delayed_Freeze (Id : E) return B is
1354 pragma Assert (Nkind (Id) in N_Entity);
1356 end Has_Delayed_Freeze;
1358 function Has_Delayed_Rep_Aspects (Id : E) return B is
1360 pragma Assert (Nkind (Id) in N_Entity);
1361 return Flag261 (Id);
1362 end Has_Delayed_Rep_Aspects;
1364 function Has_Discriminants (Id : E) return B is
1366 pragma Assert (Nkind (Id) in N_Entity);
1368 end Has_Discriminants;
1370 function Has_Dispatch_Table (Id : E) return B is
1372 pragma Assert (Is_Tagged_Type (Id));
1373 return Flag220 (Id);
1374 end Has_Dispatch_Table;
1376 function Has_Dynamic_Predicate_Aspect (Id : E) return B is
1378 pragma Assert (Is_Type (Id));
1379 return Flag258 (Id);
1380 end Has_Dynamic_Predicate_Aspect;
1382 function Has_Enumeration_Rep_Clause (Id : E) return B is
1384 pragma Assert (Is_Enumeration_Type (Id));
1386 end Has_Enumeration_Rep_Clause;
1388 function Has_Exit (Id : E) return B is
1393 function Has_External_Tag_Rep_Clause (Id : E) return B is
1395 pragma Assert (Is_Tagged_Type (Id));
1396 return Flag110 (Id);
1397 end Has_External_Tag_Rep_Clause;
1399 function Has_Forward_Instantiation (Id : E) return B is
1401 return Flag175 (Id);
1402 end Has_Forward_Instantiation;
1404 function Has_Fully_Qualified_Name (Id : E) return B is
1406 return Flag173 (Id);
1407 end Has_Fully_Qualified_Name;
1409 function Has_Gigi_Rep_Item (Id : E) return B is
1412 end Has_Gigi_Rep_Item;
1414 function Has_Homonym (Id : E) return B is
1419 function Has_Implicit_Dereference (Id : E) return B is
1421 return Flag251 (Id);
1422 end Has_Implicit_Dereference;
1424 function Has_Independent_Components (Id : E) return B is
1426 pragma Assert (Is_Object (Id) or else Is_Type (Id));
1428 end Has_Independent_Components;
1430 function Has_Inheritable_Invariants (Id : E) return B is
1432 pragma Assert (Is_Type (Id));
1433 return Flag248 (Id);
1434 end Has_Inheritable_Invariants;
1436 function Has_Initial_Value (Id : E) return B is
1438 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1439 return Flag219 (Id);
1440 end Has_Initial_Value;
1442 function Has_Invariants (Id : E) return B is
1444 pragma Assert (Is_Type (Id));
1445 return Flag232 (Id);
1448 function Has_Loop_Entry_Attributes (Id : E) return B is
1450 pragma Assert (Ekind (Id) = E_Loop);
1451 return Flag260 (Id);
1452 end Has_Loop_Entry_Attributes;
1454 function Has_Machine_Radix_Clause (Id : E) return B is
1456 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1458 end Has_Machine_Radix_Clause;
1460 function Has_Master_Entity (Id : E) return B is
1463 end Has_Master_Entity;
1465 function Has_Missing_Return (Id : E) return B is
1467 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1468 return Flag142 (Id);
1469 end Has_Missing_Return;
1471 function Has_Nested_Block_With_Handler (Id : E) return B is
1473 return Flag101 (Id);
1474 end Has_Nested_Block_With_Handler;
1476 function Has_Non_Standard_Rep (Id : E) return B is
1478 return Flag75 (Implementation_Base_Type (Id));
1479 end Has_Non_Standard_Rep;
1481 function Has_Object_Size_Clause (Id : E) return B is
1483 pragma Assert (Is_Type (Id));
1484 return Flag172 (Id);
1485 end Has_Object_Size_Clause;
1487 function Has_Per_Object_Constraint (Id : E) return B is
1489 return Flag154 (Id);
1490 end Has_Per_Object_Constraint;
1492 function Has_Postconditions (Id : E) return B is
1494 pragma Assert (Is_Subprogram (Id));
1495 return Flag240 (Id);
1496 end Has_Postconditions;
1498 function Has_Pragma_Controlled (Id : E) return B is
1500 pragma Assert (Is_Access_Type (Id));
1501 return Flag27 (Implementation_Base_Type (Id));
1502 end Has_Pragma_Controlled;
1504 function Has_Pragma_Elaborate_Body (Id : E) return B is
1506 return Flag150 (Id);
1507 end Has_Pragma_Elaborate_Body;
1509 function Has_Pragma_Inline (Id : E) return B is
1511 return Flag157 (Id);
1512 end Has_Pragma_Inline;
1514 function Has_Pragma_Inline_Always (Id : E) return B is
1516 return Flag230 (Id);
1517 end Has_Pragma_Inline_Always;
1519 function Has_Pragma_No_Inline (Id : E) return B is
1521 return Flag201 (Id);
1522 end Has_Pragma_No_Inline;
1524 function Has_Pragma_Ordered (Id : E) return B is
1526 pragma Assert (Is_Enumeration_Type (Id));
1527 return Flag198 (Implementation_Base_Type (Id));
1528 end Has_Pragma_Ordered;
1530 function Has_Pragma_Pack (Id : E) return B is
1532 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1533 return Flag121 (Implementation_Base_Type (Id));
1534 end Has_Pragma_Pack;
1536 function Has_Pragma_Preelab_Init (Id : E) return B is
1538 return Flag221 (Id);
1539 end Has_Pragma_Preelab_Init;
1541 function Has_Pragma_Pure (Id : E) return B is
1543 return Flag203 (Id);
1544 end Has_Pragma_Pure;
1546 function Has_Pragma_Pure_Function (Id : E) return B is
1548 return Flag179 (Id);
1549 end Has_Pragma_Pure_Function;
1551 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1553 return Flag169 (Id);
1554 end Has_Pragma_Thread_Local_Storage;
1556 function Has_Pragma_Unmodified (Id : E) return B is
1558 return Flag233 (Id);
1559 end Has_Pragma_Unmodified;
1561 function Has_Pragma_Unreferenced (Id : E) return B is
1563 return Flag180 (Id);
1564 end Has_Pragma_Unreferenced;
1566 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1568 pragma Assert (Is_Type (Id));
1569 return Flag212 (Id);
1570 end Has_Pragma_Unreferenced_Objects;
1572 function Has_Predicates (Id : E) return B is
1574 pragma Assert (Is_Type (Id));
1575 return Flag250 (Id);
1578 function Has_Primitive_Operations (Id : E) return B is
1580 pragma Assert (Is_Type (Id));
1581 return Flag120 (Base_Type (Id));
1582 end Has_Primitive_Operations;
1584 function Has_Private_Ancestor (Id : E) return B is
1586 return Flag151 (Id);
1587 end Has_Private_Ancestor;
1589 function Has_Private_Declaration (Id : E) return B is
1591 return Flag155 (Id);
1592 end Has_Private_Declaration;
1594 function Has_Qualified_Name (Id : E) return B is
1596 return Flag161 (Id);
1597 end Has_Qualified_Name;
1599 function Has_RACW (Id : E) return B is
1601 pragma Assert (Ekind (Id) = E_Package);
1602 return Flag214 (Id);
1605 function Has_Record_Rep_Clause (Id : E) return B is
1607 pragma Assert (Is_Record_Type (Id));
1608 return Flag65 (Implementation_Base_Type (Id));
1609 end Has_Record_Rep_Clause;
1611 function Has_Recursive_Call (Id : E) return B is
1613 pragma Assert (Is_Subprogram (Id));
1614 return Flag143 (Id);
1615 end Has_Recursive_Call;
1617 function Has_Size_Clause (Id : E) return B is
1620 end Has_Size_Clause;
1622 function Has_Small_Clause (Id : E) return B is
1625 end Has_Small_Clause;
1627 function Has_Specified_Layout (Id : E) return B is
1629 pragma Assert (Is_Type (Id));
1630 return Flag100 (Implementation_Base_Type (Id));
1631 end Has_Specified_Layout;
1633 function Has_Specified_Stream_Input (Id : E) return B is
1635 pragma Assert (Is_Type (Id));
1636 return Flag190 (Id);
1637 end Has_Specified_Stream_Input;
1639 function Has_Specified_Stream_Output (Id : E) return B is
1641 pragma Assert (Is_Type (Id));
1642 return Flag191 (Id);
1643 end Has_Specified_Stream_Output;
1645 function Has_Specified_Stream_Read (Id : E) return B is
1647 pragma Assert (Is_Type (Id));
1648 return Flag192 (Id);
1649 end Has_Specified_Stream_Read;
1651 function Has_Specified_Stream_Write (Id : E) return B is
1653 pragma Assert (Is_Type (Id));
1654 return Flag193 (Id);
1655 end Has_Specified_Stream_Write;
1657 function Has_Static_Discriminants (Id : E) return B is
1659 pragma Assert (Is_Type (Id));
1660 return Flag211 (Id);
1661 end Has_Static_Discriminants;
1663 function Has_Static_Predicate_Aspect (Id : E) return B is
1665 pragma Assert (Is_Type (Id));
1666 return Flag259 (Id);
1667 end Has_Static_Predicate_Aspect;
1669 function Has_Storage_Size_Clause (Id : E) return B is
1671 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1672 return Flag23 (Implementation_Base_Type (Id));
1673 end Has_Storage_Size_Clause;
1675 function Has_Stream_Size_Clause (Id : E) return B is
1677 return Flag184 (Id);
1678 end Has_Stream_Size_Clause;
1680 function Has_Task (Id : E) return B is
1682 return Flag30 (Base_Type (Id));
1685 function Has_Thunks (Id : E) return B is
1687 return Flag228 (Id);
1690 function Has_Unchecked_Union (Id : E) return B is
1692 return Flag123 (Base_Type (Id));
1693 end Has_Unchecked_Union;
1695 function Has_Unknown_Discriminants (Id : E) return B is
1697 pragma Assert (Is_Type (Id));
1699 end Has_Unknown_Discriminants;
1701 function Has_Up_Level_Access (Id : E) return B is
1704 (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
1705 return Flag215 (Id);
1706 end Has_Up_Level_Access;
1708 function Has_Volatile_Components (Id : E) return B is
1710 return Flag87 (Implementation_Base_Type (Id));
1711 end Has_Volatile_Components;
1713 function Has_Xref_Entry (Id : E) return B is
1715 return Flag182 (Id);
1718 function Hiding_Loop_Variable (Id : E) return E is
1720 pragma Assert (Ekind (Id) = E_Variable);
1722 end Hiding_Loop_Variable;
1724 function Homonym (Id : E) return E is
1729 function Interface_Alias (Id : E) return E is
1731 pragma Assert (Is_Subprogram (Id));
1733 end Interface_Alias;
1735 function Interfaces (Id : E) return L is
1737 pragma Assert (Is_Record_Type (Id));
1738 return Elist25 (Id);
1741 function In_Package_Body (Id : E) return B is
1744 end In_Package_Body;
1746 function In_Private_Part (Id : E) return B is
1749 end In_Private_Part;
1751 function In_Use (Id : E) return B is
1753 pragma Assert (Nkind (Id) in N_Entity);
1757 function Initialization_Statements (Id : E) return N is
1759 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
1761 end Initialization_Statements;
1763 function Integrity_Level (Id : E) return U is
1765 pragma Assert (Ekind (Id) = E_Abstract_State);
1767 end Integrity_Level;
1769 function Inner_Instances (Id : E) return L is
1771 return Elist23 (Id);
1772 end Inner_Instances;
1774 function Interface_Name (Id : E) return N is
1779 function Is_Abstract_Subprogram (Id : E) return B is
1781 pragma Assert (Is_Overloadable (Id));
1783 end Is_Abstract_Subprogram;
1785 function Is_Abstract_Type (Id : E) return B is
1787 pragma Assert (Is_Type (Id));
1788 return Flag146 (Id);
1789 end Is_Abstract_Type;
1791 function Is_Local_Anonymous_Access (Id : E) return B is
1793 pragma Assert (Is_Access_Type (Id));
1794 return Flag194 (Id);
1795 end Is_Local_Anonymous_Access;
1797 function Is_Access_Constant (Id : E) return B is
1799 pragma Assert (Is_Access_Type (Id));
1801 end Is_Access_Constant;
1803 function Is_Ada_2005_Only (Id : E) return B is
1805 return Flag185 (Id);
1806 end Is_Ada_2005_Only;
1808 function Is_Ada_2012_Only (Id : E) return B is
1810 return Flag199 (Id);
1811 end Is_Ada_2012_Only;
1813 function Is_Aliased (Id : E) return B is
1815 pragma Assert (Nkind (Id) in N_Entity);
1819 function Is_AST_Entry (Id : E) return B is
1821 pragma Assert (Is_Entry (Id));
1822 return Flag132 (Id);
1825 function Is_Asynchronous (Id : E) return B is
1827 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1829 end Is_Asynchronous;
1831 function Is_Atomic (Id : E) return B is
1836 function Is_Bit_Packed_Array (Id : E) return B is
1838 return Flag122 (Implementation_Base_Type (Id));
1839 end Is_Bit_Packed_Array;
1841 function Is_Called (Id : E) return B is
1843 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1844 return Flag102 (Id);
1847 function Is_Character_Type (Id : E) return B is
1850 end Is_Character_Type;
1852 function Is_Child_Unit (Id : E) return B is
1857 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1860 end Is_Class_Wide_Equivalent_Type;
1862 function Is_Compilation_Unit (Id : E) return B is
1864 return Flag149 (Id);
1865 end Is_Compilation_Unit;
1867 function Is_Completely_Hidden (Id : E) return B is
1869 pragma Assert (Ekind (Id) = E_Discriminant);
1870 return Flag103 (Id);
1871 end Is_Completely_Hidden;
1873 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1876 end Is_Constr_Subt_For_U_Nominal;
1878 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1880 return Flag141 (Id);
1881 end Is_Constr_Subt_For_UN_Aliased;
1883 function Is_Constrained (Id : E) return B is
1885 pragma Assert (Nkind (Id) in N_Entity);
1889 function Is_Constructor (Id : E) return B is
1894 function Is_Controlled (Id : E) return B is
1896 return Flag42 (Base_Type (Id));
1899 function Is_Controlling_Formal (Id : E) return B is
1901 pragma Assert (Is_Formal (Id));
1903 end Is_Controlling_Formal;
1905 function Is_CPP_Class (Id : E) return B is
1910 function Is_Descendent_Of_Address (Id : E) return B is
1912 pragma Assert (Is_Type (Id));
1913 return Flag223 (Id);
1914 end Is_Descendent_Of_Address;
1916 function Is_Discrim_SO_Function (Id : E) return B is
1918 return Flag176 (Id);
1919 end Is_Discrim_SO_Function;
1921 function Is_Dispatch_Table_Entity (Id : E) return B is
1923 return Flag234 (Id);
1924 end Is_Dispatch_Table_Entity;
1926 function Is_Dispatching_Operation (Id : E) return B is
1928 pragma Assert (Nkind (Id) in N_Entity);
1930 end Is_Dispatching_Operation;
1932 function Is_Eliminated (Id : E) return B is
1934 return Flag124 (Id);
1937 function Is_Entry_Formal (Id : E) return B is
1940 end Is_Entry_Formal;
1942 function Is_Exported (Id : E) return B is
1947 function Is_First_Subtype (Id : E) return B is
1950 end Is_First_Subtype;
1952 function Is_For_Access_Subtype (Id : E) return B is
1954 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
1955 return Flag118 (Id);
1956 end Is_For_Access_Subtype;
1958 function Is_Formal_Subprogram (Id : E) return B is
1960 return Flag111 (Id);
1961 end Is_Formal_Subprogram;
1963 function Is_Frozen (Id : E) return B is
1968 function Is_Generic_Actual_Type (Id : E) return B is
1970 pragma Assert (Is_Type (Id));
1972 end Is_Generic_Actual_Type;
1974 function Is_Generic_Instance (Id : E) return B is
1976 return Flag130 (Id);
1977 end Is_Generic_Instance;
1979 function Is_Generic_Type (Id : E) return B is
1981 pragma Assert (Nkind (Id) in N_Entity);
1983 end Is_Generic_Type;
1985 function Is_Hidden (Id : E) return B is
1990 function Is_Hidden_Open_Scope (Id : E) return B is
1992 return Flag171 (Id);
1993 end Is_Hidden_Open_Scope;
1995 function Is_Immediately_Visible (Id : E) return B is
1997 pragma Assert (Nkind (Id) in N_Entity);
1999 end Is_Immediately_Visible;
2001 function Is_Implementation_Defined (Id : E) return B is
2003 return Flag254 (Id);
2004 end Is_Implementation_Defined;
2006 function Is_Imported (Id : E) return B is
2011 function Is_Inlined (Id : E) return B is
2016 function Is_Interface (Id : E) return B is
2018 return Flag186 (Id);
2021 function Is_Instantiated (Id : E) return B is
2023 return Flag126 (Id);
2024 end Is_Instantiated;
2026 function Is_Internal (Id : E) return B is
2028 pragma Assert (Nkind (Id) in N_Entity);
2032 function Is_Interrupt_Handler (Id : E) return B is
2034 pragma Assert (Nkind (Id) in N_Entity);
2036 end Is_Interrupt_Handler;
2038 function Is_Intrinsic_Subprogram (Id : E) return B is
2041 end Is_Intrinsic_Subprogram;
2043 function Is_Invariant_Procedure (Id : E) return B is
2045 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2046 return Flag257 (Id);
2047 end Is_Invariant_Procedure;
2049 function Is_Itype (Id : E) return B is
2054 function Is_Known_Non_Null (Id : E) return B is
2057 end Is_Known_Non_Null;
2059 function Is_Known_Null (Id : E) return B is
2061 return Flag204 (Id);
2064 function Is_Known_Valid (Id : E) return B is
2066 return Flag170 (Id);
2069 function Is_Limited_Composite (Id : E) return B is
2071 return Flag106 (Id);
2072 end Is_Limited_Composite;
2074 function Is_Limited_Interface (Id : E) return B is
2076 return Flag197 (Id);
2077 end Is_Limited_Interface;
2079 function Is_Limited_Record (Id : E) return B is
2082 end Is_Limited_Record;
2084 function Is_Machine_Code_Subprogram (Id : E) return B is
2086 pragma Assert (Is_Subprogram (Id));
2087 return Flag137 (Id);
2088 end Is_Machine_Code_Subprogram;
2090 function Is_Non_Static_Subtype (Id : E) return B is
2092 pragma Assert (Is_Type (Id));
2093 return Flag109 (Id);
2094 end Is_Non_Static_Subtype;
2096 function Is_Null_Init_Proc (Id : E) return B is
2098 pragma Assert (Ekind (Id) = E_Procedure);
2099 return Flag178 (Id);
2100 end Is_Null_Init_Proc;
2102 function Is_Obsolescent (Id : E) return B is
2104 return Flag153 (Id);
2107 function Is_Only_Out_Parameter (Id : E) return B is
2109 pragma Assert (Is_Formal (Id));
2110 return Flag226 (Id);
2111 end Is_Only_Out_Parameter;
2113 function Is_Optional_Parameter (Id : E) return B is
2115 pragma Assert (Is_Formal (Id));
2116 return Flag134 (Id);
2117 end Is_Optional_Parameter;
2119 function Is_Package_Body_Entity (Id : E) return B is
2121 return Flag160 (Id);
2122 end Is_Package_Body_Entity;
2124 function Is_Packed (Id : E) return B is
2126 return Flag51 (Implementation_Base_Type (Id));
2129 function Is_Packed_Array_Type (Id : E) return B is
2131 return Flag138 (Id);
2132 end Is_Packed_Array_Type;
2134 function Is_Potentially_Use_Visible (Id : E) return B is
2136 pragma Assert (Nkind (Id) in N_Entity);
2138 end Is_Potentially_Use_Visible;
2140 function Is_Predicate_Function (Id : E) return B is
2142 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2143 return Flag255 (Id);
2144 end Is_Predicate_Function;
2146 function Is_Predicate_Function_M (Id : E) return B is
2148 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2149 return Flag256 (Id);
2150 end Is_Predicate_Function_M;
2152 function Is_Preelaborated (Id : E) return B is
2155 end Is_Preelaborated;
2157 function Is_Primitive (Id : E) return B is
2160 (Is_Overloadable (Id)
2161 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
2162 return Flag218 (Id);
2165 function Is_Primitive_Wrapper (Id : E) return B is
2167 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2168 return Flag195 (Id);
2169 end Is_Primitive_Wrapper;
2171 function Is_Private_Composite (Id : E) return B is
2173 pragma Assert (Is_Type (Id));
2174 return Flag107 (Id);
2175 end Is_Private_Composite;
2177 function Is_Private_Descendant (Id : E) return B is
2180 end Is_Private_Descendant;
2182 function Is_Private_Primitive (Id : E) return B is
2184 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2185 return Flag245 (Id);
2186 end Is_Private_Primitive;
2188 function Is_Processed_Transient (Id : E) return B is
2190 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2191 return Flag252 (Id);
2192 end Is_Processed_Transient;
2194 function Is_Public (Id : E) return B is
2196 pragma Assert (Nkind (Id) in N_Entity);
2200 function Is_Pure (Id : E) return B is
2205 function Is_Pure_Unit_Access_Type (Id : E) return B is
2207 pragma Assert (Is_Access_Type (Id));
2208 return Flag189 (Id);
2209 end Is_Pure_Unit_Access_Type;
2211 function Is_RACW_Stub_Type (Id : E) return B is
2213 pragma Assert (Is_Type (Id));
2214 return Flag244 (Id);
2215 end Is_RACW_Stub_Type;
2217 function Is_Raised (Id : E) return B is
2219 pragma Assert (Ekind (Id) = E_Exception);
2220 return Flag224 (Id);
2223 function Is_Remote_Call_Interface (Id : E) return B is
2226 end Is_Remote_Call_Interface;
2228 function Is_Remote_Types (Id : E) return B is
2231 end Is_Remote_Types;
2233 function Is_Renaming_Of_Object (Id : E) return B is
2235 return Flag112 (Id);
2236 end Is_Renaming_Of_Object;
2238 function Is_Return_Object (Id : E) return B is
2240 return Flag209 (Id);
2241 end Is_Return_Object;
2243 function Is_Safe_To_Reevaluate (Id : E) return B is
2245 return Flag249 (Id);
2246 end Is_Safe_To_Reevaluate;
2248 function Is_Shared_Passive (Id : E) return B is
2251 end Is_Shared_Passive;
2253 function Is_Statically_Allocated (Id : E) return B is
2256 end Is_Statically_Allocated;
2258 function Is_Tag (Id : E) return B is
2260 pragma Assert (Nkind (Id) in N_Entity);
2264 function Is_Tagged_Type (Id : E) return B is
2269 function Is_Thunk (Id : E) return B is
2271 return Flag225 (Id);
2274 function Is_Trivial_Subprogram (Id : E) return B is
2276 return Flag235 (Id);
2277 end Is_Trivial_Subprogram;
2279 function Is_True_Constant (Id : E) return B is
2281 return Flag163 (Id);
2282 end Is_True_Constant;
2284 function Is_Unchecked_Union (Id : E) return B is
2286 return Flag117 (Implementation_Base_Type (Id));
2287 end Is_Unchecked_Union;
2289 function Is_Underlying_Record_View (Id : E) return B is
2291 return Flag246 (Id);
2292 end Is_Underlying_Record_View;
2294 function Is_Unsigned_Type (Id : E) return B is
2296 pragma Assert (Is_Type (Id));
2297 return Flag144 (Id);
2298 end Is_Unsigned_Type;
2300 function Is_Valued_Procedure (Id : E) return B is
2302 pragma Assert (Ekind (Id) = E_Procedure);
2303 return Flag127 (Id);
2304 end Is_Valued_Procedure;
2306 function Is_Visible_Formal (Id : E) return B is
2308 return Flag206 (Id);
2309 end Is_Visible_Formal;
2311 function Is_Visible_Lib_Unit (Id : E) return B is
2313 return Flag116 (Id);
2314 end Is_Visible_Lib_Unit;
2316 function Is_VMS_Exception (Id : E) return B is
2318 return Flag133 (Id);
2319 end Is_VMS_Exception;
2321 function Is_Volatile (Id : E) return B is
2323 pragma Assert (Nkind (Id) in N_Entity);
2325 if Is_Type (Id) then
2326 return Flag16 (Base_Type (Id));
2332 function Itype_Printed (Id : E) return B is
2334 pragma Assert (Is_Itype (Id));
2335 return Flag202 (Id);
2338 function Kill_Elaboration_Checks (Id : E) return B is
2341 end Kill_Elaboration_Checks;
2343 function Kill_Range_Checks (Id : E) return B is
2346 end Kill_Range_Checks;
2348 function Known_To_Have_Preelab_Init (Id : E) return B is
2350 pragma Assert (Is_Type (Id));
2351 return Flag207 (Id);
2352 end Known_To_Have_Preelab_Init;
2354 function Last_Assignment (Id : E) return N is
2356 pragma Assert (Is_Assignable (Id));
2358 end Last_Assignment;
2360 function Last_Entity (Id : E) return E is
2365 function Limited_View (Id : E) return E is
2367 pragma Assert (Ekind (Id) = E_Package);
2371 function Lit_Indexes (Id : E) return E is
2373 pragma Assert (Is_Enumeration_Type (Id));
2377 function Lit_Strings (Id : E) return E is
2379 pragma Assert (Is_Enumeration_Type (Id));
2383 function Low_Bound_Tested (Id : E) return B is
2385 return Flag205 (Id);
2386 end Low_Bound_Tested;
2388 function Machine_Radix_10 (Id : E) return B is
2390 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2392 end Machine_Radix_10;
2394 function Master_Id (Id : E) return E is
2396 pragma Assert (Is_Access_Type (Id));
2400 function Materialize_Entity (Id : E) return B is
2402 return Flag168 (Id);
2403 end Materialize_Entity;
2405 function May_Inherit_Delayed_Rep_Aspects (Id : E) return B is
2407 return Flag262 (Id);
2408 end May_Inherit_Delayed_Rep_Aspects;
2410 function Mechanism (Id : E) return M is
2412 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2413 return UI_To_Int (Uint8 (Id));
2416 function Modulus (Id : E) return Uint is
2418 pragma Assert (Is_Modular_Integer_Type (Id));
2419 return Uint17 (Base_Type (Id));
2422 function Must_Be_On_Byte_Boundary (Id : E) return B is
2424 pragma Assert (Is_Type (Id));
2425 return Flag183 (Id);
2426 end Must_Be_On_Byte_Boundary;
2428 function Must_Have_Preelab_Init (Id : E) return B is
2430 pragma Assert (Is_Type (Id));
2431 return Flag208 (Id);
2432 end Must_Have_Preelab_Init;
2434 function Needs_Debug_Info (Id : E) return B is
2436 return Flag147 (Id);
2437 end Needs_Debug_Info;
2439 function Needs_No_Actuals (Id : E) return B is
2442 (Is_Overloadable (Id)
2443 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2445 end Needs_No_Actuals;
2447 function Never_Set_In_Source (Id : E) return B is
2449 return Flag115 (Id);
2450 end Never_Set_In_Source;
2452 function Next_Inlined_Subprogram (Id : E) return E is
2455 end Next_Inlined_Subprogram;
2457 function No_Pool_Assigned (Id : E) return B is
2459 pragma Assert (Is_Access_Type (Id));
2460 return Flag131 (Root_Type (Id));
2461 end No_Pool_Assigned;
2463 function No_Return (Id : E) return B is
2465 return Flag113 (Id);
2468 function No_Strict_Aliasing (Id : E) return B is
2470 pragma Assert (Is_Access_Type (Id));
2471 return Flag136 (Base_Type (Id));
2472 end No_Strict_Aliasing;
2474 function Non_Binary_Modulus (Id : E) return B is
2476 pragma Assert (Is_Type (Id));
2477 return Flag58 (Base_Type (Id));
2478 end Non_Binary_Modulus;
2480 function Non_Limited_View (Id : E) return E is
2482 pragma Assert (Ekind (Id) in Incomplete_Kind);
2484 end Non_Limited_View;
2486 function Nonzero_Is_True (Id : E) return B is
2488 pragma Assert (Root_Type (Id) = Standard_Boolean);
2489 return Flag162 (Base_Type (Id));
2490 end Nonzero_Is_True;
2492 function Normalized_First_Bit (Id : E) return U is
2494 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2496 end Normalized_First_Bit;
2498 function Normalized_Position (Id : E) return U is
2500 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2502 end Normalized_Position;
2504 function Normalized_Position_Max (Id : E) return U is
2506 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2508 end Normalized_Position_Max;
2510 function OK_To_Rename (Id : E) return B is
2512 pragma Assert (Ekind (Id) = E_Variable);
2513 return Flag247 (Id);
2516 function OK_To_Reorder_Components (Id : E) return B is
2518 pragma Assert (Is_Record_Type (Id));
2519 return Flag239 (Base_Type (Id));
2520 end OK_To_Reorder_Components;
2522 function Optimize_Alignment_Space (Id : E) return B is
2525 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2526 return Flag241 (Id);
2527 end Optimize_Alignment_Space;
2529 function Optimize_Alignment_Time (Id : E) return B is
2532 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2533 return Flag242 (Id);
2534 end Optimize_Alignment_Time;
2536 function Original_Access_Type (Id : E) return E is
2538 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2540 end Original_Access_Type;
2542 function Original_Array_Type (Id : E) return E is
2544 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2546 end Original_Array_Type;
2548 function Original_Record_Component (Id : E) return E is
2550 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2552 end Original_Record_Component;
2554 function Overlays_Constant (Id : E) return B is
2556 return Flag243 (Id);
2557 end Overlays_Constant;
2559 function Overridden_Operation (Id : E) return E is
2562 end Overridden_Operation;
2564 function Package_Instantiation (Id : E) return N is
2566 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2568 end Package_Instantiation;
2570 function Packed_Array_Type (Id : E) return E is
2572 pragma Assert (Is_Array_Type (Id));
2574 end Packed_Array_Type;
2576 function Parent_Subtype (Id : E) return E is
2578 pragma Assert (Is_Record_Type (Id));
2579 return Node19 (Base_Type (Id));
2582 function Postcondition_Proc (Id : E) return E is
2584 pragma Assert (Ekind (Id) = E_Procedure);
2586 end Postcondition_Proc;
2588 function PPC_Wrapper (Id : E) return E is
2590 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2594 function Prival (Id : E) return E is
2596 pragma Assert (Is_Protected_Component (Id));
2600 function Prival_Link (Id : E) return E is
2602 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2606 function Private_Dependents (Id : E) return L is
2608 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2609 return Elist18 (Id);
2610 end Private_Dependents;
2612 function Private_View (Id : E) return N is
2614 pragma Assert (Is_Private_Type (Id));
2618 function Protected_Body_Subprogram (Id : E) return E is
2620 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2622 end Protected_Body_Subprogram;
2624 function Protected_Formal (Id : E) return E is
2626 pragma Assert (Is_Formal (Id));
2628 end Protected_Formal;
2630 function Protection_Object (Id : E) return E is
2633 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2635 end Protection_Object;
2637 function Reachable (Id : E) return B is
2642 function Referenced (Id : E) return B is
2644 return Flag156 (Id);
2647 function Referenced_As_LHS (Id : E) return B is
2650 end Referenced_As_LHS;
2652 function Referenced_As_Out_Parameter (Id : E) return B is
2654 return Flag227 (Id);
2655 end Referenced_As_Out_Parameter;
2657 function Refined_State (Id : E) return E is
2659 pragma Assert (Ekind (Id) = E_Abstract_State);
2663 function Register_Exception_Call (Id : E) return N is
2665 pragma Assert (Ekind (Id) = E_Exception);
2667 end Register_Exception_Call;
2669 function Related_Array_Object (Id : E) return E is
2671 pragma Assert (Is_Array_Type (Id));
2673 end Related_Array_Object;
2675 function Related_Expression (Id : E) return N is
2677 pragma Assert (Ekind (Id) in Type_Kind
2678 or else Ekind_In (Id, E_Constant, E_Variable));
2680 end Related_Expression;
2682 function Related_Instance (Id : E) return E is
2684 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2686 end Related_Instance;
2688 function Related_Type (Id : E) return E is
2690 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2694 function Relative_Deadline_Variable (Id : E) return E is
2696 pragma Assert (Is_Task_Type (Id));
2697 return Node26 (Implementation_Base_Type (Id));
2698 end Relative_Deadline_Variable;
2700 function Renamed_Entity (Id : E) return N is
2705 function Renamed_In_Spec (Id : E) return B is
2707 pragma Assert (Ekind (Id) = E_Package);
2708 return Flag231 (Id);
2709 end Renamed_In_Spec;
2711 function Renamed_Object (Id : E) return N is
2716 function Renaming_Map (Id : E) return U is
2721 function Requires_Overriding (Id : E) return B is
2723 pragma Assert (Is_Overloadable (Id));
2724 return Flag213 (Id);
2725 end Requires_Overriding;
2727 function Return_Present (Id : E) return B is
2732 function Return_Applies_To (Id : E) return N is
2735 end Return_Applies_To;
2737 function Returns_By_Ref (Id : E) return B is
2742 function Reverse_Bit_Order (Id : E) return B is
2744 pragma Assert (Is_Record_Type (Id));
2745 return Flag164 (Base_Type (Id));
2746 end Reverse_Bit_Order;
2748 function Reverse_Storage_Order (Id : E) return B is
2750 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
2751 return Flag93 (Base_Type (Id));
2752 end Reverse_Storage_Order;
2754 function RM_Size (Id : E) return U is
2756 pragma Assert (Is_Type (Id));
2760 function Scalar_Range (Id : E) return N is
2765 function Scale_Value (Id : E) return U is
2770 function Scope_Depth_Value (Id : E) return U is
2773 end Scope_Depth_Value;
2775 function Sec_Stack_Needed_For_Return (Id : E) return B is
2777 return Flag167 (Id);
2778 end Sec_Stack_Needed_For_Return;
2780 function Shadow_Entities (Id : E) return S is
2782 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2784 end Shadow_Entities;
2786 function Shared_Var_Procs_Instance (Id : E) return E is
2788 pragma Assert (Ekind (Id) = E_Variable);
2790 end Shared_Var_Procs_Instance;
2792 function Size_Check_Code (Id : E) return N is
2794 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2796 end Size_Check_Code;
2798 function Size_Depends_On_Discriminant (Id : E) return B is
2800 return Flag177 (Id);
2801 end Size_Depends_On_Discriminant;
2803 function Size_Known_At_Compile_Time (Id : E) return B is
2806 end Size_Known_At_Compile_Time;
2808 function Small_Value (Id : E) return R is
2810 pragma Assert (Is_Fixed_Point_Type (Id));
2811 return Ureal21 (Id);
2814 function SPARK_Mode_Pragmas (Id : E) return N is
2817 (Ekind_In (Id, E_Function, -- subprogram variants
2819 E_Generic_Procedure,
2823 Ekind_In (Id, E_Generic_Package, -- package variants
2827 end SPARK_Mode_Pragmas;
2829 function Spec_Entity (Id : E) return E is
2831 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2835 function Static_Predicate (Id : E) return S is
2837 pragma Assert (Is_Discrete_Type (Id));
2839 end Static_Predicate;
2841 function Status_Flag_Or_Transient_Decl (Id : E) return N is
2843 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2845 end Status_Flag_Or_Transient_Decl;
2847 function Storage_Size_Variable (Id : E) return E is
2849 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2850 return Node15 (Implementation_Base_Type (Id));
2851 end Storage_Size_Variable;
2853 function Static_Elaboration_Desired (Id : E) return B is
2855 pragma Assert (Ekind (Id) = E_Package);
2857 end Static_Elaboration_Desired;
2859 function Static_Initialization (Id : E) return N is
2862 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
2864 end Static_Initialization;
2866 function Stored_Constraint (Id : E) return L is
2869 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
2870 return Elist23 (Id);
2871 end Stored_Constraint;
2873 function Strict_Alignment (Id : E) return B is
2875 return Flag145 (Implementation_Base_Type (Id));
2876 end Strict_Alignment;
2878 function String_Literal_Length (Id : E) return U is
2881 end String_Literal_Length;
2883 function String_Literal_Low_Bound (Id : E) return N is
2886 end String_Literal_Low_Bound;
2888 function Subprograms_For_Type (Id : E) return E is
2890 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
2892 end Subprograms_For_Type;
2894 function Suppress_Elaboration_Warnings (Id : E) return B is
2896 return Flag148 (Id);
2897 end Suppress_Elaboration_Warnings;
2899 function Suppress_Initialization (Id : E) return B is
2901 pragma Assert (Is_Type (Id));
2902 return Flag105 (Id);
2903 end Suppress_Initialization;
2905 function Suppress_Style_Checks (Id : E) return B is
2907 return Flag165 (Id);
2908 end Suppress_Style_Checks;
2910 function Suppress_Value_Tracking_On_Call (Id : E) return B is
2912 return Flag217 (Id);
2913 end Suppress_Value_Tracking_On_Call;
2915 function Task_Body_Procedure (Id : E) return N is
2917 pragma Assert (Ekind (Id) in Task_Kind);
2919 end Task_Body_Procedure;
2921 function Thunk_Entity (Id : E) return E is
2923 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
2924 and then Is_Thunk (Id));
2928 function Treat_As_Volatile (Id : E) return B is
2931 end Treat_As_Volatile;
2933 function Underlying_Full_View (Id : E) return E is
2935 pragma Assert (Ekind (Id) in Private_Kind);
2937 end Underlying_Full_View;
2939 function Underlying_Record_View (Id : E) return E is
2942 end Underlying_Record_View;
2944 function Universal_Aliasing (Id : E) return B is
2946 pragma Assert (Is_Type (Id));
2947 return Flag216 (Implementation_Base_Type (Id));
2948 end Universal_Aliasing;
2950 function Unset_Reference (Id : E) return N is
2953 end Unset_Reference;
2955 function Used_As_Generic_Actual (Id : E) return B is
2957 return Flag222 (Id);
2958 end Used_As_Generic_Actual;
2960 function Uses_Lock_Free (Id : E) return B is
2962 pragma Assert (Is_Protected_Type (Id));
2963 return Flag188 (Id);
2966 function Uses_Sec_Stack (Id : E) return B is
2971 function Warnings_Off (Id : E) return B is
2976 function Warnings_Off_Used (Id : E) return B is
2978 return Flag236 (Id);
2979 end Warnings_Off_Used;
2981 function Warnings_Off_Used_Unmodified (Id : E) return B is
2983 return Flag237 (Id);
2984 end Warnings_Off_Used_Unmodified;
2986 function Warnings_Off_Used_Unreferenced (Id : E) return B is
2988 return Flag238 (Id);
2989 end Warnings_Off_Used_Unreferenced;
2991 function Wrapped_Entity (Id : E) return E is
2993 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
2994 and then Is_Primitive_Wrapper (Id));
2998 function Was_Hidden (Id : E) return B is
3000 return Flag196 (Id);
3003 ------------------------------
3004 -- Classification Functions --
3005 ------------------------------
3007 function Is_Access_Type (Id : E) return B is
3009 return Ekind (Id) in Access_Kind;
3012 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
3014 return Ekind (Id) in Access_Protected_Kind;
3015 end Is_Access_Protected_Subprogram_Type;
3017 function Is_Access_Subprogram_Type (Id : E) return B is
3019 return Ekind (Id) in Access_Subprogram_Kind;
3020 end Is_Access_Subprogram_Type;
3022 function Is_Aggregate_Type (Id : E) return B is
3024 return Ekind (Id) in Aggregate_Kind;
3025 end Is_Aggregate_Type;
3027 function Is_Array_Type (Id : E) return B is
3029 return Ekind (Id) in Array_Kind;
3032 function Is_Assignable (Id : E) return B is
3034 return Ekind (Id) in Assignable_Kind;
3037 function Is_Class_Wide_Type (Id : E) return B is
3039 return Ekind (Id) in Class_Wide_Kind;
3040 end Is_Class_Wide_Type;
3042 function Is_Composite_Type (Id : E) return B is
3044 return Ekind (Id) in Composite_Kind;
3045 end Is_Composite_Type;
3047 function Is_Concurrent_Body (Id : E) return B is
3049 return Ekind (Id) in
3050 Concurrent_Body_Kind;
3051 end Is_Concurrent_Body;
3053 function Is_Concurrent_Record_Type (Id : E) return B is
3056 end Is_Concurrent_Record_Type;
3058 function Is_Concurrent_Type (Id : E) return B is
3060 return Ekind (Id) in Concurrent_Kind;
3061 end Is_Concurrent_Type;
3063 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
3065 return Ekind (Id) in
3066 Decimal_Fixed_Point_Kind;
3067 end Is_Decimal_Fixed_Point_Type;
3069 function Is_Digits_Type (Id : E) return B is
3071 return Ekind (Id) in Digits_Kind;
3074 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
3076 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
3077 end Is_Discrete_Or_Fixed_Point_Type;
3079 function Is_Discrete_Type (Id : E) return B is
3081 return Ekind (Id) in Discrete_Kind;
3082 end Is_Discrete_Type;
3084 function Is_Elementary_Type (Id : E) return B is
3086 return Ekind (Id) in Elementary_Kind;
3087 end Is_Elementary_Type;
3089 function Is_Entry (Id : E) return B is
3091 return Ekind (Id) in Entry_Kind;
3094 function Is_Enumeration_Type (Id : E) return B is
3096 return Ekind (Id) in
3098 end Is_Enumeration_Type;
3100 function Is_Fixed_Point_Type (Id : E) return B is
3102 return Ekind (Id) in
3104 end Is_Fixed_Point_Type;
3106 function Is_Floating_Point_Type (Id : E) return B is
3108 return Ekind (Id) in Float_Kind;
3109 end Is_Floating_Point_Type;
3111 function Is_Formal (Id : E) return B is
3113 return Ekind (Id) in Formal_Kind;
3116 function Is_Formal_Object (Id : E) return B is
3118 return Ekind (Id) in Formal_Object_Kind;
3119 end Is_Formal_Object;
3121 function Is_Generic_Subprogram (Id : E) return B is
3123 return Ekind (Id) in Generic_Subprogram_Kind;
3124 end Is_Generic_Subprogram;
3126 function Is_Generic_Unit (Id : E) return B is
3128 return Ekind (Id) in Generic_Unit_Kind;
3129 end Is_Generic_Unit;
3131 function Is_Incomplete_Or_Private_Type (Id : E) return B is
3133 return Ekind (Id) in
3134 Incomplete_Or_Private_Kind;
3135 end Is_Incomplete_Or_Private_Type;
3137 function Is_Incomplete_Type (Id : E) return B is
3139 return Ekind (Id) in
3141 end Is_Incomplete_Type;
3143 function Is_Integer_Type (Id : E) return B is
3145 return Ekind (Id) in Integer_Kind;
3146 end Is_Integer_Type;
3148 function Is_Modular_Integer_Type (Id : E) return B is
3150 return Ekind (Id) in
3151 Modular_Integer_Kind;
3152 end Is_Modular_Integer_Type;
3154 function Is_Named_Number (Id : E) return B is
3156 return Ekind (Id) in Named_Kind;
3157 end Is_Named_Number;
3159 function Is_Numeric_Type (Id : E) return B is
3161 return Ekind (Id) in Numeric_Kind;
3162 end Is_Numeric_Type;
3164 function Is_Object (Id : E) return B is
3166 return Ekind (Id) in Object_Kind;
3169 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
3171 return Ekind (Id) in
3172 Ordinary_Fixed_Point_Kind;
3173 end Is_Ordinary_Fixed_Point_Type;
3175 function Is_Overloadable (Id : E) return B is
3177 return Ekind (Id) in Overloadable_Kind;
3178 end Is_Overloadable;
3180 function Is_Private_Type (Id : E) return B is
3182 return Ekind (Id) in Private_Kind;
3183 end Is_Private_Type;
3185 function Is_Protected_Type (Id : E) return B is
3187 return Ekind (Id) in Protected_Kind;
3188 end Is_Protected_Type;
3190 function Is_Real_Type (Id : E) return B is
3192 return Ekind (Id) in Real_Kind;
3195 function Is_Record_Type (Id : E) return B is
3197 return Ekind (Id) in Record_Kind;
3200 function Is_Scalar_Type (Id : E) return B is
3202 return Ekind (Id) in Scalar_Kind;
3205 function Is_Signed_Integer_Type (Id : E) return B is
3207 return Ekind (Id) in Signed_Integer_Kind;
3208 end Is_Signed_Integer_Type;
3210 function Is_Subprogram (Id : E) return B is
3212 return Ekind (Id) in Subprogram_Kind;
3215 function Is_Task_Type (Id : E) return B is
3217 return Ekind (Id) in Task_Kind;
3220 function Is_Type (Id : E) return B is
3222 return Ekind (Id) in Type_Kind;
3225 ------------------------------
3226 -- Attribute Set Procedures --
3227 ------------------------------
3229 -- Note: in many of these set procedures an "obvious" assertion is missing.
3230 -- The reason for this is that in many cases, a field is set before the
3231 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3232 -- it is possible to add assertions that specifically include the E_Void
3233 -- possibility, but in some cases, we just omit the assertions.
3235 procedure Set_Abstract_States (Id : E; V : L) is
3237 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
3238 Set_Elist25 (Id, V);
3239 end Set_Abstract_States;
3241 procedure Set_Accept_Address (Id : E; V : L) is
3243 Set_Elist21 (Id, V);
3244 end Set_Accept_Address;
3246 procedure Set_Access_Disp_Table (Id : E; V : L) is
3248 pragma Assert (Ekind (Id) = E_Record_Type
3249 and then Id = Implementation_Base_Type (Id));
3250 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3251 Set_Elist16 (Id, V);
3252 end Set_Access_Disp_Table;
3254 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3257 end Set_Associated_Formal_Package;
3259 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3262 end Set_Associated_Node_For_Itype;
3264 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3266 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3268 end Set_Associated_Storage_Pool;
3270 procedure Set_Actual_Subtype (Id : E; V : E) is
3273 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3274 or else Is_Formal (Id));
3276 end Set_Actual_Subtype;
3278 procedure Set_Address_Taken (Id : E; V : B := True) is
3280 Set_Flag104 (Id, V);
3281 end Set_Address_Taken;
3283 procedure Set_Alias (Id : E; V : E) is
3286 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3290 procedure Set_Alignment (Id : E; V : U) is
3292 pragma Assert (Is_Type (Id)
3293 or else Is_Formal (Id)
3294 or else Ekind_In (Id, E_Loop_Parameter,
3301 procedure Set_Barrier_Function (Id : E; V : N) is
3303 pragma Assert (Is_Entry (Id));
3305 end Set_Barrier_Function;
3307 procedure Set_Block_Node (Id : E; V : N) is
3309 pragma Assert (Ekind (Id) = E_Block);
3313 procedure Set_Body_Entity (Id : E; V : E) is
3315 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3317 end Set_Body_Entity;
3319 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3322 (Ekind (Id) = E_Package
3323 or else Is_Subprogram (Id)
3324 or else Is_Generic_Unit (Id));
3326 end Set_Body_Needed_For_SAL;
3328 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3330 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3331 Set_Flag125 (Id, V);
3332 end Set_C_Pass_By_Copy;
3334 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3337 end Set_Can_Never_Be_Null;
3339 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3342 end Set_Checks_May_Be_Suppressed;
3344 procedure Set_Class_Wide_Type (Id : E; V : E) is
3346 pragma Assert (Is_Type (Id));
3348 end Set_Class_Wide_Type;
3350 procedure Set_Cloned_Subtype (Id : E; V : E) is
3352 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3354 end Set_Cloned_Subtype;
3356 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3358 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3360 end Set_Component_Bit_Offset;
3362 procedure Set_Component_Clause (Id : E; V : N) is
3364 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3366 end Set_Component_Clause;
3368 procedure Set_Component_Size (Id : E; V : U) is
3370 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3372 end Set_Component_Size;
3374 procedure Set_Component_Type (Id : E; V : E) is
3376 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3378 end Set_Component_Type;
3380 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3383 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3385 end Set_Corresponding_Concurrent_Type;
3387 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3389 pragma Assert (Ekind (Id) = E_Discriminant);
3391 end Set_Corresponding_Discriminant;
3393 procedure Set_Corresponding_Equality (Id : E; V : E) is
3396 (Ekind (Id) = E_Function
3397 and then not Comes_From_Source (Id)
3398 and then Chars (Id) = Name_Op_Ne);
3400 end Set_Corresponding_Equality;
3402 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3404 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3406 end Set_Corresponding_Protected_Entry;
3408 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3410 pragma Assert (Is_Concurrent_Type (Id));
3412 end Set_Corresponding_Record_Type;
3414 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3417 end Set_Corresponding_Remote_Type;
3419 procedure Set_Current_Use_Clause (Id : E; V : E) is
3421 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3423 end Set_Current_Use_Clause;
3425 procedure Set_Current_Value (Id : E; V : N) is
3427 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3429 end Set_Current_Value;
3431 procedure Set_CR_Discriminant (Id : E; V : E) is
3434 end Set_CR_Discriminant;
3436 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3438 Set_Flag166 (Id, V);
3439 end Set_Debug_Info_Off;
3441 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3444 end Set_Debug_Renaming_Link;
3446 procedure Set_Default_Aspect_Component_Value (Id : E; V : E) is
3448 pragma Assert (Is_Array_Type (Id));
3450 end Set_Default_Aspect_Component_Value;
3452 procedure Set_Default_Aspect_Value (Id : E; V : E) is
3454 pragma Assert (Is_Scalar_Type (Id));
3456 end Set_Default_Aspect_Value;
3458 procedure Set_Default_Expr_Function (Id : E; V : E) is
3460 pragma Assert (Is_Formal (Id));
3462 end Set_Default_Expr_Function;
3464 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3466 Set_Flag108 (Id, V);
3467 end Set_Default_Expressions_Processed;
3469 procedure Set_Default_Value (Id : E; V : N) is
3471 pragma Assert (Is_Formal (Id));
3473 end Set_Default_Value;
3475 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3479 or else Is_Task_Type (Id)
3480 or else Ekind (Id) = E_Block);
3481 Set_Flag114 (Id, V);
3482 end Set_Delay_Cleanups;
3484 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3487 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3490 end Set_Delay_Subprogram_Descriptors;
3492 procedure Set_Delta_Value (Id : E; V : R) is
3494 pragma Assert (Is_Fixed_Point_Type (Id));
3495 Set_Ureal18 (Id, V);
3496 end Set_Delta_Value;
3498 procedure Set_Dependent_Instances (Id : E; V : L) is
3500 pragma Assert (Is_Generic_Instance (Id));
3502 end Set_Dependent_Instances;
3504 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3506 pragma Assert (Nkind (Id) in N_Entity);
3508 end Set_Depends_On_Private;
3510 procedure Set_Digits_Value (Id : E; V : U) is
3513 (Is_Floating_Point_Type (Id)
3514 or else Is_Decimal_Fixed_Point_Type (Id));
3516 end Set_Digits_Value;
3518 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3521 end Set_Directly_Designated_Type;
3523 procedure Set_Discard_Names (Id : E; V : B := True) is
3526 end Set_Discard_Names;
3528 procedure Set_Discriminal (Id : E; V : E) is
3530 pragma Assert (Ekind (Id) = E_Discriminant);
3532 end Set_Discriminal;
3534 procedure Set_Discriminal_Link (Id : E; V : E) is
3537 end Set_Discriminal_Link;
3539 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3541 pragma Assert (Ekind (Id) = E_Component);
3543 end Set_Discriminant_Checking_Func;
3545 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3547 pragma Assert (Nkind (Id) in N_Entity);
3548 Set_Elist21 (Id, V);
3549 end Set_Discriminant_Constraint;
3551 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3554 end Set_Discriminant_Default_Value;
3556 procedure Set_Discriminant_Number (Id : E; V : U) is
3559 end Set_Discriminant_Number;
3561 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3563 pragma Assert (Ekind (Id) = E_Record_Type
3564 and then Id = Implementation_Base_Type (Id));
3565 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3566 Set_Elist26 (Id, V);
3567 end Set_Dispatch_Table_Wrappers;
3569 procedure Set_DT_Entry_Count (Id : E; V : U) is
3571 pragma Assert (Ekind (Id) = E_Component);
3573 end Set_DT_Entry_Count;
3575 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3577 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3579 end Set_DT_Offset_To_Top_Func;
3581 procedure Set_DT_Position (Id : E; V : U) is
3583 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3585 end Set_DT_Position;
3587 procedure Set_DTC_Entity (Id : E; V : E) is
3589 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3593 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3595 pragma Assert (Ekind (Id) = E_Package);
3596 Set_Flag210 (Id, V);
3597 end Set_Elaborate_Body_Desirable;
3599 procedure Set_Elaboration_Entity (Id : E; V : E) is
3604 Ekind (Id) = E_Package
3606 Is_Generic_Unit (Id));
3608 end Set_Elaboration_Entity;
3610 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3615 Ekind (Id) = E_Package
3617 Is_Generic_Unit (Id));
3618 Set_Flag174 (Id, V);
3619 end Set_Elaboration_Entity_Required;
3621 procedure Set_Enclosing_Scope (Id : E; V : E) is
3624 end Set_Enclosing_Scope;
3626 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3628 pragma Assert (Is_Entry (Id));
3629 Set_Flag152 (Id, V);
3630 end Set_Entry_Accepted;
3632 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3635 end Set_Entry_Bodies_Array;
3637 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3640 end Set_Entry_Cancel_Parameter;
3642 procedure Set_Entry_Component (Id : E; V : E) is
3645 end Set_Entry_Component;
3647 procedure Set_Entry_Formal (Id : E; V : E) is
3650 end Set_Entry_Formal;
3652 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3654 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3656 end Set_Entry_Index_Constant;
3658 procedure Set_Contract (Id : E; V : N) is
3661 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Void)
3662 or else Is_Subprogram (Id)
3663 or else Is_Generic_Subprogram (Id));
3667 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3670 end Set_Entry_Parameters_Type;
3672 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3674 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3676 end Set_Enum_Pos_To_Rep;
3678 procedure Set_Enumeration_Pos (Id : E; V : U) is
3680 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3682 end Set_Enumeration_Pos;
3684 procedure Set_Enumeration_Rep (Id : E; V : U) is
3686 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3688 end Set_Enumeration_Rep;
3690 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3692 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3694 end Set_Enumeration_Rep_Expr;
3696 procedure Set_Equivalent_Type (Id : E; V : E) is
3699 (Ekind_In (Id, E_Class_Wide_Type,
3700 E_Class_Wide_Subtype,
3701 E_Access_Protected_Subprogram_Type,
3702 E_Anonymous_Access_Protected_Subprogram_Type,
3703 E_Access_Subprogram_Type,
3706 end Set_Equivalent_Type;
3708 procedure Set_Esize (Id : E; V : U) is
3713 procedure Set_Exception_Code (Id : E; V : U) is
3715 pragma Assert (Ekind (Id) = E_Exception);
3717 end Set_Exception_Code;
3719 procedure Set_Extra_Accessibility (Id : E; V : E) is
3722 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
3724 end Set_Extra_Accessibility;
3726 procedure Set_Extra_Accessibility_Of_Result (Id : E; V : E) is
3728 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
3730 end Set_Extra_Accessibility_Of_Result;
3732 procedure Set_Extra_Constrained (Id : E; V : E) is
3734 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3736 end Set_Extra_Constrained;
3738 procedure Set_Extra_Formal (Id : E; V : E) is
3741 end Set_Extra_Formal;
3743 procedure Set_Extra_Formals (Id : E; V : E) is
3746 (Is_Overloadable (Id)
3747 or else Ekind_In (Id, E_Entry_Family,
3749 E_Subprogram_Type));
3751 end Set_Extra_Formals;
3753 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3756 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3757 Set_Flag229 (Id, V);
3758 end Set_Can_Use_Internal_Rep;
3760 procedure Set_Finalization_Master (Id : E; V : E) is
3762 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3764 end Set_Finalization_Master;
3766 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3768 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3769 Set_Flag158 (Id, V);
3770 end Set_Finalize_Storage_Only;
3772 procedure Set_Finalizer (Id : E; V : E) is
3775 (Ekind (Id) = E_Package
3776 or else Ekind (Id) = E_Package_Body);
3780 procedure Set_First_Entity (Id : E; V : E) is
3783 end Set_First_Entity;
3785 procedure Set_First_Exit_Statement (Id : E; V : N) is
3787 pragma Assert (Ekind (Id) = E_Loop);
3789 end Set_First_Exit_Statement;
3791 procedure Set_First_Index (Id : E; V : N) is
3793 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3795 end Set_First_Index;
3797 procedure Set_First_Literal (Id : E; V : E) is
3799 pragma Assert (Is_Enumeration_Type (Id));
3801 end Set_First_Literal;
3803 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3805 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3807 end Set_First_Optional_Parameter;
3809 procedure Set_First_Private_Entity (Id : E; V : E) is
3811 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
3812 or else Ekind (Id) in Concurrent_Kind);
3814 end Set_First_Private_Entity;
3816 procedure Set_First_Rep_Item (Id : E; V : N) is
3819 end Set_First_Rep_Item;
3821 procedure Set_Float_Rep (Id : E; V : F) is
3822 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
3824 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
3827 procedure Set_Freeze_Node (Id : E; V : N) is
3830 end Set_Freeze_Node;
3832 procedure Set_From_With_Type (Id : E; V : B := True) is
3836 or else Ekind (Id) = E_Package);
3837 Set_Flag159 (Id, V);
3838 end Set_From_With_Type;
3840 procedure Set_Full_View (Id : E; V : E) is
3842 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
3846 procedure Set_Generic_Homonym (Id : E; V : E) is
3849 end Set_Generic_Homonym;
3851 procedure Set_Generic_Renamings (Id : E; V : L) is
3853 Set_Elist23 (Id, V);
3854 end Set_Generic_Renamings;
3856 procedure Set_Handler_Records (Id : E; V : S) is
3859 end Set_Handler_Records;
3861 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
3863 pragma Assert (Id = Base_Type (Id));
3864 Set_Flag135 (Id, V);
3865 end Set_Has_Aliased_Components;
3867 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
3870 end Set_Has_Alignment_Clause;
3872 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
3875 end Set_Has_All_Calls_Remote;
3877 procedure Set_Has_Anonymous_Master (Id : E; V : B := True) is
3880 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
3881 Set_Flag253 (Id, V);
3882 end Set_Has_Anonymous_Master;
3884 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
3886 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
3888 end Set_Has_Atomic_Components;
3890 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
3893 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
3894 Set_Flag139 (Id, V);
3895 end Set_Has_Biased_Representation;
3897 procedure Set_Has_Completion (Id : E; V : B := True) is
3900 end Set_Has_Completion;
3902 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
3904 pragma Assert (Is_Type (Id));
3906 end Set_Has_Completion_In_Body;
3908 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
3910 pragma Assert (Ekind (Id) = E_Record_Type);
3911 Set_Flag140 (Id, V);
3912 end Set_Has_Complex_Representation;
3914 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
3916 pragma Assert (Ekind (Id) = E_Array_Type);
3918 end Set_Has_Component_Size_Clause;
3920 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
3922 pragma Assert (Is_Type (Id));
3923 Set_Flag187 (Id, V);
3924 end Set_Has_Constrained_Partial_View;
3926 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
3928 Set_Flag181 (Id, V);
3929 end Set_Has_Contiguous_Rep;
3931 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
3933 pragma Assert (Id = Base_Type (Id));
3935 end Set_Has_Controlled_Component;
3937 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
3940 end Set_Has_Controlling_Result;
3942 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
3944 Set_Flag119 (Id, V);
3945 end Set_Has_Convention_Pragma;
3947 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
3950 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
3951 and then Is_Base_Type (Id));
3953 end Set_Has_Default_Aspect;
3955 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
3957 pragma Assert (Nkind (Id) in N_Entity);
3958 Set_Flag200 (Id, V);
3959 end Set_Has_Delayed_Aspects;
3961 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
3963 pragma Assert (Nkind (Id) in N_Entity);
3965 end Set_Has_Delayed_Freeze;
3967 procedure Set_Has_Delayed_Rep_Aspects (Id : E; V : B := True) is
3969 pragma Assert (Nkind (Id) in N_Entity);
3970 Set_Flag261 (Id, V);
3971 end Set_Has_Delayed_Rep_Aspects;
3973 procedure Set_Has_Discriminants (Id : E; V : B := True) is
3975 pragma Assert (Nkind (Id) in N_Entity);
3977 end Set_Has_Discriminants;
3979 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
3981 pragma Assert (Ekind (Id) = E_Record_Type
3982 and then Is_Tagged_Type (Id));
3983 Set_Flag220 (Id, V);
3984 end Set_Has_Dispatch_Table;
3986 procedure Set_Has_Dynamic_Predicate_Aspect (Id : E; V : B := True) is
3988 pragma Assert (Is_Type (Id));
3989 Set_Flag258 (Id, V);
3990 end Set_Has_Dynamic_Predicate_Aspect;
3992 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
3994 pragma Assert (Is_Enumeration_Type (Id));
3996 end Set_Has_Enumeration_Rep_Clause;
3998 procedure Set_Has_Exit (Id : E; V : B := True) is
4003 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True) is
4005 pragma Assert (Is_Tagged_Type (Id));
4006 Set_Flag110 (Id, V);
4007 end Set_Has_External_Tag_Rep_Clause;
4009 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
4011 Set_Flag175 (Id, V);
4012 end Set_Has_Forward_Instantiation;
4014 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
4016 Set_Flag173 (Id, V);
4017 end Set_Has_Fully_Qualified_Name;
4019 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
4022 end Set_Has_Gigi_Rep_Item;
4024 procedure Set_Has_Homonym (Id : E; V : B := True) is
4027 end Set_Has_Homonym;
4029 procedure Set_Has_Implicit_Dereference (Id : E; V : B := True) is
4031 Set_Flag251 (Id, V);
4032 end Set_Has_Implicit_Dereference;
4034 procedure Set_Has_Independent_Components (Id : E; V : B := True) is
4036 pragma Assert (Is_Object (Id) or else Is_Type (Id));
4038 end Set_Has_Independent_Components;
4040 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
4042 pragma Assert (Is_Type (Id));
4043 Set_Flag248 (Id, V);
4044 end Set_Has_Inheritable_Invariants;
4046 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
4048 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
4049 Set_Flag219 (Id, V);
4050 end Set_Has_Initial_Value;
4052 procedure Set_Has_Invariants (Id : E; V : B := True) is
4054 pragma Assert (Is_Type (Id));
4055 Set_Flag232 (Id, V);
4056 end Set_Has_Invariants;
4058 procedure Set_Has_Loop_Entry_Attributes (Id : E; V : B := True) is
4060 pragma Assert (Ekind (Id) = E_Loop);
4061 Set_Flag260 (Id, V);
4062 end Set_Has_Loop_Entry_Attributes;
4064 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
4066 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4068 end Set_Has_Machine_Radix_Clause;
4070 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
4073 end Set_Has_Master_Entity;
4075 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
4077 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4078 Set_Flag142 (Id, V);
4079 end Set_Has_Missing_Return;
4081 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
4083 Set_Flag101 (Id, V);
4084 end Set_Has_Nested_Block_With_Handler;
4086 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
4088 pragma Assert (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
4089 Set_Flag215 (Id, V);
4090 end Set_Has_Up_Level_Access;
4092 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
4094 pragma Assert (Id = Base_Type (Id));
4096 end Set_Has_Non_Standard_Rep;
4098 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
4100 pragma Assert (Is_Type (Id));
4101 Set_Flag172 (Id, V);
4102 end Set_Has_Object_Size_Clause;
4104 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
4106 Set_Flag154 (Id, V);
4107 end Set_Has_Per_Object_Constraint;
4109 procedure Set_Has_Postconditions (Id : E; V : B := True) is
4111 pragma Assert (Is_Subprogram (Id));
4112 Set_Flag240 (Id, V);
4113 end Set_Has_Postconditions;
4115 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
4117 pragma Assert (Is_Access_Type (Id));
4118 Set_Flag27 (Base_Type (Id), V);
4119 end Set_Has_Pragma_Controlled;
4121 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
4123 Set_Flag150 (Id, V);
4124 end Set_Has_Pragma_Elaborate_Body;
4126 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
4128 Set_Flag157 (Id, V);
4129 end Set_Has_Pragma_Inline;
4131 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
4133 Set_Flag230 (Id, V);
4134 end Set_Has_Pragma_Inline_Always;
4136 procedure Set_Has_Pragma_No_Inline (Id : E; V : B := True) is
4138 Set_Flag201 (Id, V);
4139 end Set_Has_Pragma_No_Inline;
4141 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
4143 pragma Assert (Is_Enumeration_Type (Id));
4144 pragma Assert (Id = Base_Type (Id));
4145 Set_Flag198 (Id, V);
4146 end Set_Has_Pragma_Ordered;
4148 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
4150 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
4151 pragma Assert (Id = Base_Type (Id));
4152 Set_Flag121 (Id, V);
4153 end Set_Has_Pragma_Pack;
4155 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
4157 Set_Flag221 (Id, V);
4158 end Set_Has_Pragma_Preelab_Init;
4160 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
4162 Set_Flag203 (Id, V);
4163 end Set_Has_Pragma_Pure;
4165 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
4167 Set_Flag179 (Id, V);
4168 end Set_Has_Pragma_Pure_Function;
4170 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
4172 Set_Flag169 (Id, V);
4173 end Set_Has_Pragma_Thread_Local_Storage;
4175 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
4177 Set_Flag233 (Id, V);
4178 end Set_Has_Pragma_Unmodified;
4180 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
4182 Set_Flag180 (Id, V);
4183 end Set_Has_Pragma_Unreferenced;
4185 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
4187 pragma Assert (Is_Type (Id));
4188 Set_Flag212 (Id, V);
4189 end Set_Has_Pragma_Unreferenced_Objects;
4191 procedure Set_Has_Predicates (Id : E; V : B := True) is
4193 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Void);
4194 Set_Flag250 (Id, V);
4195 end Set_Has_Predicates;
4197 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
4199 pragma Assert (Id = Base_Type (Id));
4200 Set_Flag120 (Id, V);
4201 end Set_Has_Primitive_Operations;
4203 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
4205 pragma Assert (Is_Type (Id));
4206 Set_Flag151 (Id, V);
4207 end Set_Has_Private_Ancestor;
4209 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
4211 Set_Flag155 (Id, V);
4212 end Set_Has_Private_Declaration;
4214 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
4216 Set_Flag161 (Id, V);
4217 end Set_Has_Qualified_Name;
4219 procedure Set_Has_RACW (Id : E; V : B := True) is
4221 pragma Assert (Ekind (Id) = E_Package);
4222 Set_Flag214 (Id, V);
4225 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
4227 pragma Assert (Id = Base_Type (Id));
4229 end Set_Has_Record_Rep_Clause;
4231 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
4233 pragma Assert (Is_Subprogram (Id));
4234 Set_Flag143 (Id, V);
4235 end Set_Has_Recursive_Call;
4237 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
4240 end Set_Has_Size_Clause;
4242 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
4245 end Set_Has_Small_Clause;
4247 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
4249 pragma Assert (Id = Base_Type (Id));
4250 Set_Flag100 (Id, V);
4251 end Set_Has_Specified_Layout;
4253 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
4255 pragma Assert (Is_Type (Id));
4256 Set_Flag190 (Id, V);
4257 end Set_Has_Specified_Stream_Input;
4259 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
4261 pragma Assert (Is_Type (Id));
4262 Set_Flag191 (Id, V);
4263 end Set_Has_Specified_Stream_Output;
4265 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
4267 pragma Assert (Is_Type (Id));
4268 Set_Flag192 (Id, V);
4269 end Set_Has_Specified_Stream_Read;
4271 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
4273 pragma Assert (Is_Type (Id));
4274 Set_Flag193 (Id, V);
4275 end Set_Has_Specified_Stream_Write;
4277 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
4279 Set_Flag211 (Id, V);
4280 end Set_Has_Static_Discriminants;
4282 procedure Set_Has_Static_Predicate_Aspect (Id : E; V : B := True) is
4284 pragma Assert (Is_Type (Id));
4285 Set_Flag259 (Id, V);
4286 end Set_Has_Static_Predicate_Aspect;
4288 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
4290 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4291 pragma Assert (Id = Base_Type (Id));
4293 end Set_Has_Storage_Size_Clause;
4295 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4297 pragma Assert (Is_Elementary_Type (Id));
4298 Set_Flag184 (Id, V);
4299 end Set_Has_Stream_Size_Clause;
4301 procedure Set_Has_Task (Id : E; V : B := True) is
4303 pragma Assert (Id = Base_Type (Id));
4307 procedure Set_Has_Thunks (Id : E; V : B := True) is
4309 pragma Assert (Is_Tag (Id));
4310 Set_Flag228 (Id, V);
4313 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4315 pragma Assert (Id = Base_Type (Id));
4316 Set_Flag123 (Id, V);
4317 end Set_Has_Unchecked_Union;
4319 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4321 pragma Assert (Is_Type (Id));
4323 end Set_Has_Unknown_Discriminants;
4325 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4327 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4329 end Set_Has_Volatile_Components;
4331 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4333 Set_Flag182 (Id, V);
4334 end Set_Has_Xref_Entry;
4336 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4338 pragma Assert (Ekind (Id) = E_Variable);
4340 end Set_Hiding_Loop_Variable;
4342 procedure Set_Homonym (Id : E; V : E) is
4344 pragma Assert (Id /= V);
4348 procedure Set_Interface_Alias (Id : E; V : E) is
4352 and then Is_Hidden (Id)
4353 and then (Ekind_In (Id, E_Procedure, E_Function)));
4355 end Set_Interface_Alias;
4357 procedure Set_Interfaces (Id : E; V : L) is
4359 pragma Assert (Is_Record_Type (Id));
4360 Set_Elist25 (Id, V);
4363 procedure Set_In_Package_Body (Id : E; V : B := True) is
4366 end Set_In_Package_Body;
4368 procedure Set_In_Private_Part (Id : E; V : B := True) is
4371 end Set_In_Private_Part;
4373 procedure Set_In_Use (Id : E; V : B := True) is
4375 pragma Assert (Nkind (Id) in N_Entity);
4379 procedure Set_Initialization_Statements (Id : E; V : N) is
4381 -- Tolerate an E_Void entity since this can be called while resolving
4382 -- an aggregate used as the initialization expression for an object
4383 -- declaration, and this occurs before the Ekind for the object is set.
4385 pragma Assert (Ekind_In (Id, E_Void, E_Constant, E_Variable));
4387 end Set_Initialization_Statements;
4389 procedure Set_Integrity_Level (Id : E; V : Uint) is
4391 pragma Assert (Ekind (Id) = E_Abstract_State);
4393 end Set_Integrity_Level;
4395 procedure Set_Inner_Instances (Id : E; V : L) is
4397 Set_Elist23 (Id, V);
4398 end Set_Inner_Instances;
4400 procedure Set_Interface_Name (Id : E; V : N) is
4403 end Set_Interface_Name;
4405 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4407 pragma Assert (Is_Overloadable (Id));
4409 end Set_Is_Abstract_Subprogram;
4411 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4413 pragma Assert (Is_Type (Id));
4414 Set_Flag146 (Id, V);
4415 end Set_Is_Abstract_Type;
4417 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4419 pragma Assert (Is_Access_Type (Id));
4420 Set_Flag194 (Id, V);
4421 end Set_Is_Local_Anonymous_Access;
4423 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4425 pragma Assert (Is_Access_Type (Id));
4427 end Set_Is_Access_Constant;
4429 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4431 Set_Flag185 (Id, V);
4432 end Set_Is_Ada_2005_Only;
4434 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4436 Set_Flag199 (Id, V);
4437 end Set_Is_Ada_2012_Only;
4439 procedure Set_Is_Aliased (Id : E; V : B := True) is
4441 pragma Assert (Nkind (Id) in N_Entity);
4445 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
4447 pragma Assert (Is_Entry (Id));
4448 Set_Flag132 (Id, V);
4449 end Set_Is_AST_Entry;
4451 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4454 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4456 end Set_Is_Asynchronous;
4458 procedure Set_Is_Atomic (Id : E; V : B := True) is
4463 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4465 pragma Assert ((not V)
4466 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4467 Set_Flag122 (Id, V);
4468 end Set_Is_Bit_Packed_Array;
4470 procedure Set_Is_Called (Id : E; V : B := True) is
4472 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4473 Set_Flag102 (Id, V);
4476 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4479 end Set_Is_Character_Type;
4481 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4484 end Set_Is_Child_Unit;
4486 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4489 end Set_Is_Class_Wide_Equivalent_Type;
4491 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4493 Set_Flag149 (Id, V);
4494 end Set_Is_Compilation_Unit;
4496 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4498 pragma Assert (Ekind (Id) = E_Discriminant);
4499 Set_Flag103 (Id, V);
4500 end Set_Is_Completely_Hidden;
4502 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4505 end Set_Is_Concurrent_Record_Type;
4507 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4510 end Set_Is_Constr_Subt_For_U_Nominal;
4512 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4514 Set_Flag141 (Id, V);
4515 end Set_Is_Constr_Subt_For_UN_Aliased;
4517 procedure Set_Is_Constrained (Id : E; V : B := True) is
4519 pragma Assert (Nkind (Id) in N_Entity);
4521 end Set_Is_Constrained;
4523 procedure Set_Is_Constructor (Id : E; V : B := True) is
4526 end Set_Is_Constructor;
4528 procedure Set_Is_Controlled (Id : E; V : B := True) is
4530 pragma Assert (Id = Base_Type (Id));
4532 end Set_Is_Controlled;
4534 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4536 pragma Assert (Is_Formal (Id));
4538 end Set_Is_Controlling_Formal;
4540 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4543 end Set_Is_CPP_Class;
4545 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4547 pragma Assert (Is_Type (Id));
4548 Set_Flag223 (Id, V);
4549 end Set_Is_Descendent_Of_Address;
4551 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4553 Set_Flag176 (Id, V);
4554 end Set_Is_Discrim_SO_Function;
4556 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4558 Set_Flag234 (Id, V);
4559 end Set_Is_Dispatch_Table_Entity;
4561 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4566 Is_Overloadable (Id)
4568 Ekind (Id) = E_Subprogram_Type);
4571 end Set_Is_Dispatching_Operation;
4573 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4575 Set_Flag124 (Id, V);
4576 end Set_Is_Eliminated;
4578 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4581 end Set_Is_Entry_Formal;
4583 procedure Set_Is_Exported (Id : E; V : B := True) is
4586 end Set_Is_Exported;
4588 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4591 end Set_Is_First_Subtype;
4593 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4595 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4596 Set_Flag118 (Id, V);
4597 end Set_Is_For_Access_Subtype;
4599 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4601 Set_Flag111 (Id, V);
4602 end Set_Is_Formal_Subprogram;
4604 procedure Set_Is_Frozen (Id : E; V : B := True) is
4606 pragma Assert (Nkind (Id) in N_Entity);
4610 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4612 pragma Assert (Is_Type (Id));
4614 end Set_Is_Generic_Actual_Type;
4616 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4618 Set_Flag130 (Id, V);
4619 end Set_Is_Generic_Instance;
4621 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4623 pragma Assert (Nkind (Id) in N_Entity);
4625 end Set_Is_Generic_Type;
4627 procedure Set_Is_Hidden (Id : E; V : B := True) is
4632 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4634 Set_Flag171 (Id, V);
4635 end Set_Is_Hidden_Open_Scope;
4637 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4639 pragma Assert (Nkind (Id) in N_Entity);
4641 end Set_Is_Immediately_Visible;
4643 procedure Set_Is_Implementation_Defined (Id : E; V : B := True) is
4645 Set_Flag254 (Id, V);
4646 end Set_Is_Implementation_Defined;
4648 procedure Set_Is_Imported (Id : E; V : B := True) is
4651 end Set_Is_Imported;
4653 procedure Set_Is_Inlined (Id : E; V : B := True) is
4658 procedure Set_Is_Interface (Id : E; V : B := True) is
4660 pragma Assert (Is_Record_Type (Id));
4661 Set_Flag186 (Id, V);
4662 end Set_Is_Interface;
4664 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4666 Set_Flag126 (Id, V);
4667 end Set_Is_Instantiated;
4669 procedure Set_Is_Internal (Id : E; V : B := True) is
4671 pragma Assert (Nkind (Id) in N_Entity);
4673 end Set_Is_Internal;
4675 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4677 pragma Assert (Nkind (Id) in N_Entity);
4679 end Set_Is_Interrupt_Handler;
4681 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4684 end Set_Is_Intrinsic_Subprogram;
4686 procedure Set_Is_Invariant_Procedure (Id : E; V : B := True) is
4688 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4689 Set_Flag257 (Id, V);
4690 end Set_Is_Invariant_Procedure;
4692 procedure Set_Is_Itype (Id : E; V : B := True) is
4697 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4700 end Set_Is_Known_Non_Null;
4702 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4704 Set_Flag204 (Id, V);
4705 end Set_Is_Known_Null;
4707 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4709 Set_Flag170 (Id, V);
4710 end Set_Is_Known_Valid;
4712 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4714 pragma Assert (Is_Type (Id));
4715 Set_Flag106 (Id, V);
4716 end Set_Is_Limited_Composite;
4718 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4720 pragma Assert (Is_Interface (Id));
4721 Set_Flag197 (Id, V);
4722 end Set_Is_Limited_Interface;
4724 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4727 end Set_Is_Limited_Record;
4729 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4731 pragma Assert (Is_Subprogram (Id));
4732 Set_Flag137 (Id, V);
4733 end Set_Is_Machine_Code_Subprogram;
4735 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4737 pragma Assert (Is_Type (Id));
4738 Set_Flag109 (Id, V);
4739 end Set_Is_Non_Static_Subtype;
4741 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4743 pragma Assert (Ekind (Id) = E_Procedure);
4744 Set_Flag178 (Id, V);
4745 end Set_Is_Null_Init_Proc;
4747 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4749 Set_Flag153 (Id, V);
4750 end Set_Is_Obsolescent;
4752 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
4754 pragma Assert (Ekind (Id) = E_Out_Parameter);
4755 Set_Flag226 (Id, V);
4756 end Set_Is_Only_Out_Parameter;
4758 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
4760 pragma Assert (Is_Formal (Id));
4761 Set_Flag134 (Id, V);
4762 end Set_Is_Optional_Parameter;
4764 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
4766 Set_Flag160 (Id, V);
4767 end Set_Is_Package_Body_Entity;
4769 procedure Set_Is_Packed (Id : E; V : B := True) is
4771 pragma Assert (Id = Base_Type (Id));
4775 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
4777 Set_Flag138 (Id, V);
4778 end Set_Is_Packed_Array_Type;
4780 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
4782 pragma Assert (Nkind (Id) in N_Entity);
4784 end Set_Is_Potentially_Use_Visible;
4786 procedure Set_Is_Predicate_Function (Id : E; V : B := True) is
4788 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4789 Set_Flag255 (Id, V);
4790 end Set_Is_Predicate_Function;
4792 procedure Set_Is_Predicate_Function_M (Id : E; V : B := True) is
4794 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4795 Set_Flag256 (Id, V);
4796 end Set_Is_Predicate_Function_M;
4798 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
4801 end Set_Is_Preelaborated;
4803 procedure Set_Is_Primitive (Id : E; V : B := True) is
4806 (Is_Overloadable (Id)
4807 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
4808 Set_Flag218 (Id, V);
4809 end Set_Is_Primitive;
4811 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
4813 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4814 Set_Flag195 (Id, V);
4815 end Set_Is_Primitive_Wrapper;
4817 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
4819 pragma Assert (Is_Type (Id));
4820 Set_Flag107 (Id, V);
4821 end Set_Is_Private_Composite;
4823 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
4826 end Set_Is_Private_Descendant;
4828 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
4830 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4831 Set_Flag245 (Id, V);
4832 end Set_Is_Private_Primitive;
4834 procedure Set_Is_Processed_Transient (Id : E; V : B := True) is
4836 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
4837 Set_Flag252 (Id, V);
4838 end Set_Is_Processed_Transient;
4840 procedure Set_Is_Public (Id : E; V : B := True) is
4842 pragma Assert (Nkind (Id) in N_Entity);
4846 procedure Set_Is_Pure (Id : E; V : B := True) is
4851 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
4853 pragma Assert (Is_Access_Type (Id));
4854 Set_Flag189 (Id, V);
4855 end Set_Is_Pure_Unit_Access_Type;
4857 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
4859 pragma Assert (Is_Type (Id));
4860 Set_Flag244 (Id, V);
4861 end Set_Is_RACW_Stub_Type;
4863 procedure Set_Is_Raised (Id : E; V : B := True) is
4865 pragma Assert (Ekind (Id) = E_Exception);
4866 Set_Flag224 (Id, V);
4869 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
4872 end Set_Is_Remote_Call_Interface;
4874 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
4877 end Set_Is_Remote_Types;
4879 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
4881 Set_Flag112 (Id, V);
4882 end Set_Is_Renaming_Of_Object;
4884 procedure Set_Is_Return_Object (Id : E; V : B := True) is
4886 Set_Flag209 (Id, V);
4887 end Set_Is_Return_Object;
4889 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
4891 pragma Assert (Ekind (Id) = E_Variable);
4892 Set_Flag249 (Id, V);
4893 end Set_Is_Safe_To_Reevaluate;
4895 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
4898 end Set_Is_Shared_Passive;
4900 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
4904 or else Ekind_In (Id, E_Exception,
4909 end Set_Is_Statically_Allocated;
4911 procedure Set_Is_Tag (Id : E; V : B := True) is
4913 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
4917 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
4920 end Set_Is_Tagged_Type;
4922 procedure Set_Is_Thunk (Id : E; V : B := True) is
4924 pragma Assert (Is_Subprogram (Id));
4925 Set_Flag225 (Id, V);
4928 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
4930 Set_Flag235 (Id, V);
4931 end Set_Is_Trivial_Subprogram;
4933 procedure Set_Is_True_Constant (Id : E; V : B := True) is
4935 Set_Flag163 (Id, V);
4936 end Set_Is_True_Constant;
4938 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
4940 pragma Assert (Id = Base_Type (Id));
4941 Set_Flag117 (Id, V);
4942 end Set_Is_Unchecked_Union;
4944 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
4946 pragma Assert (Ekind (Id) = E_Record_Type);
4947 Set_Flag246 (Id, V);
4948 end Set_Is_Underlying_Record_View;
4950 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
4952 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
4953 Set_Flag144 (Id, V);
4954 end Set_Is_Unsigned_Type;
4956 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
4958 pragma Assert (Ekind (Id) = E_Procedure);
4959 Set_Flag127 (Id, V);
4960 end Set_Is_Valued_Procedure;
4962 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
4964 Set_Flag206 (Id, V);
4965 end Set_Is_Visible_Formal;
4967 procedure Set_Is_Visible_Lib_Unit (Id : E; V : B := True) is
4969 Set_Flag116 (Id, V);
4970 end Set_Is_Visible_Lib_Unit;
4972 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
4974 pragma Assert (Ekind (Id) = E_Exception);
4975 Set_Flag133 (Id, V);
4976 end Set_Is_VMS_Exception;
4978 procedure Set_Is_Volatile (Id : E; V : B := True) is
4980 pragma Assert (Nkind (Id) in N_Entity);
4982 end Set_Is_Volatile;
4984 procedure Set_Itype_Printed (Id : E; V : B := True) is
4986 pragma Assert (Is_Itype (Id));
4987 Set_Flag202 (Id, V);
4988 end Set_Itype_Printed;
4990 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
4993 end Set_Kill_Elaboration_Checks;
4995 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
4998 end Set_Kill_Range_Checks;
5000 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
5002 pragma Assert (Is_Type (Id));
5003 Set_Flag207 (Id, V);
5004 end Set_Known_To_Have_Preelab_Init;
5006 procedure Set_Last_Assignment (Id : E; V : N) is
5008 pragma Assert (Is_Assignable (Id));
5010 end Set_Last_Assignment;
5012 procedure Set_Last_Entity (Id : E; V : E) is
5015 end Set_Last_Entity;
5017 procedure Set_Limited_View (Id : E; V : E) is
5019 pragma Assert (Ekind (Id) = E_Package);
5021 end Set_Limited_View;
5023 procedure Set_Lit_Indexes (Id : E; V : E) is
5025 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5027 end Set_Lit_Indexes;
5029 procedure Set_Lit_Strings (Id : E; V : E) is
5031 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5033 end Set_Lit_Strings;
5035 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
5037 pragma Assert (Is_Formal (Id));
5038 Set_Flag205 (Id, V);
5039 end Set_Low_Bound_Tested;
5041 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
5043 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
5045 end Set_Machine_Radix_10;
5047 procedure Set_Master_Id (Id : E; V : E) is
5049 pragma Assert (Is_Access_Type (Id));
5053 procedure Set_Materialize_Entity (Id : E; V : B := True) is
5055 Set_Flag168 (Id, V);
5056 end Set_Materialize_Entity;
5058 procedure Set_May_Inherit_Delayed_Rep_Aspects (Id : E; V : B := True) is
5060 Set_Flag262 (Id, V);
5061 end Set_May_Inherit_Delayed_Rep_Aspects;
5063 procedure Set_Mechanism (Id : E; V : M) is
5065 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
5066 Set_Uint8 (Id, UI_From_Int (V));
5069 procedure Set_Modulus (Id : E; V : U) is
5071 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
5075 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
5077 pragma Assert (Is_Type (Id));
5078 Set_Flag183 (Id, V);
5079 end Set_Must_Be_On_Byte_Boundary;
5081 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
5083 pragma Assert (Is_Type (Id));
5084 Set_Flag208 (Id, V);
5085 end Set_Must_Have_Preelab_Init;
5087 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
5089 Set_Flag147 (Id, V);
5090 end Set_Needs_Debug_Info;
5092 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
5095 (Is_Overloadable (Id)
5096 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
5098 end Set_Needs_No_Actuals;
5100 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
5102 Set_Flag115 (Id, V);
5103 end Set_Never_Set_In_Source;
5105 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
5108 end Set_Next_Inlined_Subprogram;
5110 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
5112 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5113 Set_Flag131 (Id, V);
5114 end Set_No_Pool_Assigned;
5116 procedure Set_No_Return (Id : E; V : B := True) is
5119 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
5120 Set_Flag113 (Id, V);
5123 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
5125 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5126 Set_Flag136 (Id, V);
5127 end Set_No_Strict_Aliasing;
5129 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
5131 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5133 end Set_Non_Binary_Modulus;
5135 procedure Set_Non_Limited_View (Id : E; V : E) is
5137 pragma Assert (Ekind (Id) in Incomplete_Kind);
5139 end Set_Non_Limited_View;
5141 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
5144 (Root_Type (Id) = Standard_Boolean
5145 and then Ekind (Id) = E_Enumeration_Type);
5146 Set_Flag162 (Id, V);
5147 end Set_Nonzero_Is_True;
5149 procedure Set_Normalized_First_Bit (Id : E; V : U) is
5151 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5153 end Set_Normalized_First_Bit;
5155 procedure Set_Normalized_Position (Id : E; V : U) is
5157 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5159 end Set_Normalized_Position;
5161 procedure Set_Normalized_Position_Max (Id : E; V : U) is
5163 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5165 end Set_Normalized_Position_Max;
5167 procedure Set_OK_To_Rename (Id : E; V : B := True) is
5169 pragma Assert (Ekind (Id) = E_Variable);
5170 Set_Flag247 (Id, V);
5171 end Set_OK_To_Rename;
5173 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
5176 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5177 Set_Flag239 (Id, V);
5178 end Set_OK_To_Reorder_Components;
5180 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
5183 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5184 Set_Flag241 (Id, V);
5185 end Set_Optimize_Alignment_Space;
5187 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
5190 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5191 Set_Flag242 (Id, V);
5192 end Set_Optimize_Alignment_Time;
5194 procedure Set_Original_Access_Type (Id : E; V : E) is
5196 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
5198 end Set_Original_Access_Type;
5200 procedure Set_Original_Array_Type (Id : E; V : E) is
5202 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
5204 end Set_Original_Array_Type;
5206 procedure Set_Original_Record_Component (Id : E; V : E) is
5208 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
5210 end Set_Original_Record_Component;
5212 procedure Set_Overlays_Constant (Id : E; V : B := True) is
5214 Set_Flag243 (Id, V);
5215 end Set_Overlays_Constant;
5217 procedure Set_Overridden_Operation (Id : E; V : E) is
5220 end Set_Overridden_Operation;
5222 procedure Set_Package_Instantiation (Id : E; V : N) is
5224 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
5226 end Set_Package_Instantiation;
5228 procedure Set_Packed_Array_Type (Id : E; V : E) is
5230 pragma Assert (Is_Array_Type (Id));
5232 end Set_Packed_Array_Type;
5234 procedure Set_Parent_Subtype (Id : E; V : E) is
5236 pragma Assert (Ekind (Id) = E_Record_Type);
5238 end Set_Parent_Subtype;
5240 procedure Set_Postcondition_Proc (Id : E; V : E) is
5242 pragma Assert (Ekind (Id) = E_Procedure);
5244 end Set_Postcondition_Proc;
5246 procedure Set_PPC_Wrapper (Id : E; V : E) is
5248 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
5250 end Set_PPC_Wrapper;
5252 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
5254 pragma Assert (Is_Tagged_Type (Id));
5255 Set_Elist10 (Id, V);
5256 end Set_Direct_Primitive_Operations;
5258 procedure Set_Prival (Id : E; V : E) is
5260 pragma Assert (Is_Protected_Component (Id));
5264 procedure Set_Prival_Link (Id : E; V : E) is
5266 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5268 end Set_Prival_Link;
5270 procedure Set_Private_Dependents (Id : E; V : L) is
5272 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
5273 Set_Elist18 (Id, V);
5274 end Set_Private_Dependents;
5276 procedure Set_Private_View (Id : E; V : N) is
5278 pragma Assert (Is_Private_Type (Id));
5280 end Set_Private_View;
5282 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
5284 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
5286 end Set_Protected_Body_Subprogram;
5288 procedure Set_Protected_Formal (Id : E; V : E) is
5290 pragma Assert (Is_Formal (Id));
5292 end Set_Protected_Formal;
5294 procedure Set_Protection_Object (Id : E; V : E) is
5296 pragma Assert (Ekind_In (Id, E_Entry,
5301 end Set_Protection_Object;
5303 procedure Set_Reachable (Id : E; V : B := True) is
5308 procedure Set_Referenced (Id : E; V : B := True) is
5310 Set_Flag156 (Id, V);
5313 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
5316 end Set_Referenced_As_LHS;
5318 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
5320 Set_Flag227 (Id, V);
5321 end Set_Referenced_As_Out_Parameter;
5323 procedure Set_Refined_State (Id : E; V : E) is
5325 pragma Assert (Ekind (Id) = E_Abstract_State);
5327 end Set_Refined_State;
5329 procedure Set_Register_Exception_Call (Id : E; V : N) is
5331 pragma Assert (Ekind (Id) = E_Exception);
5333 end Set_Register_Exception_Call;
5335 procedure Set_Related_Array_Object (Id : E; V : E) is
5337 pragma Assert (Is_Array_Type (Id));
5339 end Set_Related_Array_Object;
5341 procedure Set_Related_Expression (Id : E; V : N) is
5343 pragma Assert (Ekind (Id) in Type_Kind
5344 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
5346 end Set_Related_Expression;
5348 procedure Set_Related_Instance (Id : E; V : E) is
5350 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
5352 end Set_Related_Instance;
5354 procedure Set_Related_Type (Id : E; V : E) is
5356 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5358 end Set_Related_Type;
5360 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5362 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
5364 end Set_Relative_Deadline_Variable;
5366 procedure Set_Renamed_Entity (Id : E; V : N) is
5369 end Set_Renamed_Entity;
5371 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5373 pragma Assert (Ekind (Id) = E_Package);
5374 Set_Flag231 (Id, V);
5375 end Set_Renamed_In_Spec;
5377 procedure Set_Renamed_Object (Id : E; V : N) is
5380 end Set_Renamed_Object;
5382 procedure Set_Renaming_Map (Id : E; V : U) is
5385 end Set_Renaming_Map;
5387 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5389 pragma Assert (Is_Overloadable (Id));
5390 Set_Flag213 (Id, V);
5391 end Set_Requires_Overriding;
5393 procedure Set_Return_Present (Id : E; V : B := True) is
5396 end Set_Return_Present;
5398 procedure Set_Return_Applies_To (Id : E; V : N) is
5401 end Set_Return_Applies_To;
5403 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5406 end Set_Returns_By_Ref;
5408 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5411 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5412 Set_Flag164 (Id, V);
5413 end Set_Reverse_Bit_Order;
5415 procedure Set_Reverse_Storage_Order (Id : E; V : B := True) is
5419 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5421 end Set_Reverse_Storage_Order;
5423 procedure Set_RM_Size (Id : E; V : U) is
5425 pragma Assert (Is_Type (Id));
5429 procedure Set_Scalar_Range (Id : E; V : N) is
5432 end Set_Scalar_Range;
5434 procedure Set_Scale_Value (Id : E; V : U) is
5437 end Set_Scale_Value;
5439 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5441 pragma Assert (not Is_Record_Type (Id));
5443 end Set_Scope_Depth_Value;
5445 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5447 Set_Flag167 (Id, V);
5448 end Set_Sec_Stack_Needed_For_Return;
5450 procedure Set_Shadow_Entities (Id : E; V : S) is
5452 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5454 end Set_Shadow_Entities;
5456 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5458 pragma Assert (Ekind (Id) = E_Variable);
5460 end Set_Shared_Var_Procs_Instance;
5462 procedure Set_Size_Check_Code (Id : E; V : N) is
5464 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5466 end Set_Size_Check_Code;
5468 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5470 Set_Flag177 (Id, V);
5471 end Set_Size_Depends_On_Discriminant;
5473 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5476 end Set_Size_Known_At_Compile_Time;
5478 procedure Set_Small_Value (Id : E; V : R) is
5480 pragma Assert (Is_Fixed_Point_Type (Id));
5481 Set_Ureal21 (Id, V);
5482 end Set_Small_Value;
5484 procedure Set_SPARK_Mode_Pragmas (Id : E; V : N) is
5487 (Ekind_In (Id, E_Function, -- subprogram variants
5489 E_Generic_Procedure,
5493 Ekind_In (Id, E_Generic_Package, -- package variants
5498 end Set_SPARK_Mode_Pragmas;
5500 procedure Set_Spec_Entity (Id : E; V : E) is
5502 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5504 end Set_Spec_Entity;
5506 procedure Set_Static_Predicate (Id : E; V : S) is
5509 (Ekind_In (Id, E_Enumeration_Subtype,
5510 E_Modular_Integer_Subtype,
5511 E_Signed_Integer_Subtype)
5512 and then Has_Predicates (Id));
5514 end Set_Static_Predicate;
5516 procedure Set_Status_Flag_Or_Transient_Decl (Id : E; V : E) is
5518 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5520 end Set_Status_Flag_Or_Transient_Decl;
5522 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5524 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5525 pragma Assert (Id = Base_Type (Id));
5527 end Set_Storage_Size_Variable;
5529 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5531 pragma Assert (Ekind (Id) = E_Package);
5533 end Set_Static_Elaboration_Desired;
5535 procedure Set_Static_Initialization (Id : E; V : N) is
5538 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5540 end Set_Static_Initialization;
5542 procedure Set_Stored_Constraint (Id : E; V : L) is
5544 pragma Assert (Nkind (Id) in N_Entity);
5545 Set_Elist23 (Id, V);
5546 end Set_Stored_Constraint;
5548 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5550 pragma Assert (Id = Base_Type (Id));
5551 Set_Flag145 (Id, V);
5552 end Set_Strict_Alignment;
5554 procedure Set_String_Literal_Length (Id : E; V : U) is
5556 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5558 end Set_String_Literal_Length;
5560 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5562 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5564 end Set_String_Literal_Low_Bound;
5566 procedure Set_Subprograms_For_Type (Id : E; V : E) is
5568 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
5570 end Set_Subprograms_For_Type;
5572 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5574 Set_Flag148 (Id, V);
5575 end Set_Suppress_Elaboration_Warnings;
5577 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
5579 pragma Assert (Is_Type (Id));
5580 Set_Flag105 (Id, V);
5581 end Set_Suppress_Initialization;
5583 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5585 Set_Flag165 (Id, V);
5586 end Set_Suppress_Style_Checks;
5588 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5590 Set_Flag217 (Id, V);
5591 end Set_Suppress_Value_Tracking_On_Call;
5593 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5595 pragma Assert (Ekind (Id) in Task_Kind);
5597 end Set_Task_Body_Procedure;
5599 procedure Set_Thunk_Entity (Id : E; V : E) is
5601 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5602 and then Is_Thunk (Id));
5604 end Set_Thunk_Entity;
5606 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5609 end Set_Treat_As_Volatile;
5611 procedure Set_Underlying_Full_View (Id : E; V : E) is
5613 pragma Assert (Ekind (Id) in Private_Kind);
5615 end Set_Underlying_Full_View;
5617 procedure Set_Underlying_Record_View (Id : E; V : E) is
5619 pragma Assert (Ekind (Id) = E_Record_Type);
5621 end Set_Underlying_Record_View;
5623 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5625 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5626 Set_Flag216 (Id, V);
5627 end Set_Universal_Aliasing;
5629 procedure Set_Unset_Reference (Id : E; V : N) is
5632 end Set_Unset_Reference;
5634 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5636 Set_Flag222 (Id, V);
5637 end Set_Used_As_Generic_Actual;
5639 procedure Set_Uses_Lock_Free (Id : E; V : B := True) is
5641 pragma Assert (Ekind (Id) = E_Protected_Type);
5642 Set_Flag188 (Id, V);
5643 end Set_Uses_Lock_Free;
5645 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5648 end Set_Uses_Sec_Stack;
5650 procedure Set_Warnings_Off (Id : E; V : B := True) is
5653 end Set_Warnings_Off;
5655 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
5657 Set_Flag236 (Id, V);
5658 end Set_Warnings_Off_Used;
5660 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
5662 Set_Flag237 (Id, V);
5663 end Set_Warnings_Off_Used_Unmodified;
5665 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
5667 Set_Flag238 (Id, V);
5668 end Set_Warnings_Off_Used_Unreferenced;
5670 procedure Set_Was_Hidden (Id : E; V : B := True) is
5672 Set_Flag196 (Id, V);
5675 procedure Set_Wrapped_Entity (Id : E; V : E) is
5677 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5678 and then Is_Primitive_Wrapper (Id));
5680 end Set_Wrapped_Entity;
5682 -----------------------------------
5683 -- Field Initialization Routines --
5684 -----------------------------------
5686 procedure Init_Alignment (Id : E) is
5688 Set_Uint14 (Id, Uint_0);
5691 procedure Init_Alignment (Id : E; V : Int) is
5693 Set_Uint14 (Id, UI_From_Int (V));
5696 procedure Init_Component_Bit_Offset (Id : E) is
5698 Set_Uint11 (Id, No_Uint);
5699 end Init_Component_Bit_Offset;
5701 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
5703 Set_Uint11 (Id, UI_From_Int (V));
5704 end Init_Component_Bit_Offset;
5706 procedure Init_Component_Size (Id : E) is
5708 Set_Uint22 (Id, Uint_0);
5709 end Init_Component_Size;
5711 procedure Init_Component_Size (Id : E; V : Int) is
5713 Set_Uint22 (Id, UI_From_Int (V));
5714 end Init_Component_Size;
5716 procedure Init_Digits_Value (Id : E) is
5718 Set_Uint17 (Id, Uint_0);
5719 end Init_Digits_Value;
5721 procedure Init_Digits_Value (Id : E; V : Int) is
5723 Set_Uint17 (Id, UI_From_Int (V));
5724 end Init_Digits_Value;
5726 procedure Init_Esize (Id : E) is
5728 Set_Uint12 (Id, Uint_0);
5731 procedure Init_Esize (Id : E; V : Int) is
5733 Set_Uint12 (Id, UI_From_Int (V));
5736 procedure Init_Normalized_First_Bit (Id : E) is
5738 Set_Uint8 (Id, No_Uint);
5739 end Init_Normalized_First_Bit;
5741 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
5743 Set_Uint8 (Id, UI_From_Int (V));
5744 end Init_Normalized_First_Bit;
5746 procedure Init_Normalized_Position (Id : E) is
5748 Set_Uint14 (Id, No_Uint);
5749 end Init_Normalized_Position;
5751 procedure Init_Normalized_Position (Id : E; V : Int) is
5753 Set_Uint14 (Id, UI_From_Int (V));
5754 end Init_Normalized_Position;
5756 procedure Init_Normalized_Position_Max (Id : E) is
5758 Set_Uint10 (Id, No_Uint);
5759 end Init_Normalized_Position_Max;
5761 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
5763 Set_Uint10 (Id, UI_From_Int (V));
5764 end Init_Normalized_Position_Max;
5766 procedure Init_RM_Size (Id : E) is
5768 Set_Uint13 (Id, Uint_0);
5771 procedure Init_RM_Size (Id : E; V : Int) is
5773 Set_Uint13 (Id, UI_From_Int (V));
5776 -----------------------------
5777 -- Init_Component_Location --
5778 -----------------------------
5780 procedure Init_Component_Location (Id : E) is
5782 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
5783 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
5784 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
5785 Set_Uint12 (Id, Uint_0); -- Esize
5786 Set_Uint14 (Id, No_Uint); -- Normalized_Position
5787 end Init_Component_Location;
5789 ----------------------------
5790 -- Init_Object_Size_Align --
5791 ----------------------------
5793 procedure Init_Object_Size_Align (Id : E) is
5795 Set_Uint12 (Id, Uint_0); -- Esize
5796 Set_Uint14 (Id, Uint_0); -- Alignment
5797 end Init_Object_Size_Align;
5803 procedure Init_Size (Id : E; V : Int) is
5805 pragma Assert (not Is_Object (Id));
5806 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
5807 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
5810 ---------------------
5811 -- Init_Size_Align --
5812 ---------------------
5814 procedure Init_Size_Align (Id : E) is
5816 pragma Assert (not Is_Object (Id));
5817 Set_Uint12 (Id, Uint_0); -- Esize
5818 Set_Uint13 (Id, Uint_0); -- RM_Size
5819 Set_Uint14 (Id, Uint_0); -- Alignment
5820 end Init_Size_Align;
5822 ----------------------------------------------
5823 -- Type Representation Attribute Predicates --
5824 ----------------------------------------------
5826 function Known_Alignment (E : Entity_Id) return B is
5828 return Uint14 (E) /= Uint_0
5829 and then Uint14 (E) /= No_Uint;
5830 end Known_Alignment;
5832 function Known_Component_Bit_Offset (E : Entity_Id) return B is
5834 return Uint11 (E) /= No_Uint;
5835 end Known_Component_Bit_Offset;
5837 function Known_Component_Size (E : Entity_Id) return B is
5839 return Uint22 (Base_Type (E)) /= Uint_0
5840 and then Uint22 (Base_Type (E)) /= No_Uint;
5841 end Known_Component_Size;
5843 function Known_Esize (E : Entity_Id) return B is
5845 return Uint12 (E) /= Uint_0
5846 and then Uint12 (E) /= No_Uint;
5849 function Known_Normalized_First_Bit (E : Entity_Id) return B is
5851 return Uint8 (E) /= No_Uint;
5852 end Known_Normalized_First_Bit;
5854 function Known_Normalized_Position (E : Entity_Id) return B is
5856 return Uint14 (E) /= No_Uint;
5857 end Known_Normalized_Position;
5859 function Known_Normalized_Position_Max (E : Entity_Id) return B is
5861 return Uint10 (E) /= No_Uint;
5862 end Known_Normalized_Position_Max;
5864 function Known_RM_Size (E : Entity_Id) return B is
5866 return Uint13 (E) /= No_Uint
5867 and then (Uint13 (E) /= Uint_0
5868 or else Is_Discrete_Type (E)
5869 or else Is_Fixed_Point_Type (E));
5872 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
5874 return Uint11 (E) /= No_Uint
5875 and then Uint11 (E) >= Uint_0;
5876 end Known_Static_Component_Bit_Offset;
5878 function Known_Static_Component_Size (E : Entity_Id) return B is
5880 return Uint22 (Base_Type (E)) > Uint_0;
5881 end Known_Static_Component_Size;
5883 function Known_Static_Esize (E : Entity_Id) return B is
5885 return Uint12 (E) > Uint_0
5886 and then not Is_Generic_Type (E);
5887 end Known_Static_Esize;
5889 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
5891 return Uint8 (E) /= No_Uint
5892 and then Uint8 (E) >= Uint_0;
5893 end Known_Static_Normalized_First_Bit;
5895 function Known_Static_Normalized_Position (E : Entity_Id) return B is
5897 return Uint14 (E) /= No_Uint
5898 and then Uint14 (E) >= Uint_0;
5899 end Known_Static_Normalized_Position;
5901 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
5903 return Uint10 (E) /= No_Uint
5904 and then Uint10 (E) >= Uint_0;
5905 end Known_Static_Normalized_Position_Max;
5907 function Known_Static_RM_Size (E : Entity_Id) return B is
5909 return (Uint13 (E) > Uint_0
5910 or else Is_Discrete_Type (E)
5911 or else Is_Fixed_Point_Type (E))
5912 and then not Is_Generic_Type (E);
5913 end Known_Static_RM_Size;
5915 function Unknown_Alignment (E : Entity_Id) return B is
5917 return Uint14 (E) = Uint_0
5918 or else Uint14 (E) = No_Uint;
5919 end Unknown_Alignment;
5921 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
5923 return Uint11 (E) = No_Uint;
5924 end Unknown_Component_Bit_Offset;
5926 function Unknown_Component_Size (E : Entity_Id) return B is
5928 return Uint22 (Base_Type (E)) = Uint_0
5930 Uint22 (Base_Type (E)) = No_Uint;
5931 end Unknown_Component_Size;
5933 function Unknown_Esize (E : Entity_Id) return B is
5935 return Uint12 (E) = No_Uint
5937 Uint12 (E) = Uint_0;
5940 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
5942 return Uint8 (E) = No_Uint;
5943 end Unknown_Normalized_First_Bit;
5945 function Unknown_Normalized_Position (E : Entity_Id) return B is
5947 return Uint14 (E) = No_Uint;
5948 end Unknown_Normalized_Position;
5950 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
5952 return Uint10 (E) = No_Uint;
5953 end Unknown_Normalized_Position_Max;
5955 function Unknown_RM_Size (E : Entity_Id) return B is
5957 return (Uint13 (E) = Uint_0
5958 and then not Is_Discrete_Type (E)
5959 and then not Is_Fixed_Point_Type (E))
5960 or else Uint13 (E) = No_Uint;
5961 end Unknown_RM_Size;
5963 --------------------
5964 -- Address_Clause --
5965 --------------------
5967 function Address_Clause (Id : E) return N is
5969 return Get_Attribute_Definition_Clause (Id, Attribute_Address);
5976 function Aft_Value (Id : E) return U is
5978 Delta_Val : Ureal := Delta_Value (Id);
5980 while Delta_Val < Ureal_Tenth loop
5981 Delta_Val := Delta_Val * Ureal_10;
5982 Result := Result + 1;
5985 return UI_From_Int (Result);
5988 ----------------------
5989 -- Alignment_Clause --
5990 ----------------------
5992 function Alignment_Clause (Id : E) return N is
5994 return Get_Attribute_Definition_Clause (Id, Attribute_Alignment);
5995 end Alignment_Clause;
6001 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
6003 if Last_Entity (V) = Empty then
6004 Set_First_Entity (Id => V, V => Id);
6006 Set_Next_Entity (Last_Entity (V), Id);
6009 Set_Next_Entity (Id, Empty);
6011 Set_Last_Entity (Id => V, V => Id);
6018 function Base_Type (Id : E) return E is
6020 if Is_Base_Type (Id) then
6023 pragma Assert (Is_Type (Id));
6028 -------------------------
6029 -- Component_Alignment --
6030 -------------------------
6032 -- Component Alignment is encoded using two flags, Flag128/129 as
6033 -- follows. Note that both flags False = Align_Default, so that the
6034 -- default initialization of flags to False initializes component
6035 -- alignment to the default value as required.
6037 -- Flag128 Flag129 Value
6038 -- ------- ------- -----
6039 -- False False Calign_Default
6040 -- False True Calign_Component_Size
6041 -- True False Calign_Component_Size_4
6042 -- True True Calign_Storage_Unit
6044 function Component_Alignment (Id : E) return C is
6045 BT : constant Node_Id := Base_Type (Id);
6048 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
6050 if Flag128 (BT) then
6051 if Flag129 (BT) then
6052 return Calign_Storage_Unit;
6054 return Calign_Component_Size_4;
6058 if Flag129 (BT) then
6059 return Calign_Component_Size;
6061 return Calign_Default;
6064 end Component_Alignment;
6066 ----------------------
6067 -- Declaration_Node --
6068 ----------------------
6070 function Declaration_Node (Id : E) return N is
6074 if Ekind (Id) = E_Incomplete_Type
6075 and then Present (Full_View (Id))
6077 P := Parent (Full_View (Id));
6083 if Nkind (P) /= N_Selected_Component
6084 and then Nkind (P) /= N_Expanded_Name
6086 not (Nkind (P) = N_Defining_Program_Unit_Name
6087 and then Is_Child_Unit (Id))
6094 end Declaration_Node;
6096 ---------------------
6097 -- Designated_Type --
6098 ---------------------
6100 function Designated_Type (Id : E) return E is
6104 Desig_Type := Directly_Designated_Type (Id);
6106 if Ekind (Desig_Type) = E_Incomplete_Type
6107 and then Present (Full_View (Desig_Type))
6109 return Full_View (Desig_Type);
6111 elsif Is_Class_Wide_Type (Desig_Type)
6112 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
6113 and then Present (Full_View (Etype (Desig_Type)))
6114 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
6116 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
6121 end Designated_Type;
6123 ----------------------
6124 -- Entry_Index_Type --
6125 ----------------------
6127 function Entry_Index_Type (Id : E) return N is
6129 pragma Assert (Ekind (Id) = E_Entry_Family);
6130 return Etype (Discrete_Subtype_Definition (Parent (Id)));
6131 end Entry_Index_Type;
6133 ---------------------
6134 -- First_Component --
6135 ---------------------
6137 function First_Component (Id : E) return E is
6142 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
6144 Comp_Id := First_Entity (Id);
6145 while Present (Comp_Id) loop
6146 exit when Ekind (Comp_Id) = E_Component;
6147 Comp_Id := Next_Entity (Comp_Id);
6151 end First_Component;
6153 -------------------------------------
6154 -- First_Component_Or_Discriminant --
6155 -------------------------------------
6157 function First_Component_Or_Discriminant (Id : E) return E is
6162 (Is_Record_Type (Id)
6163 or else Is_Incomplete_Or_Private_Type (Id)
6164 or else Has_Discriminants (Id));
6166 Comp_Id := First_Entity (Id);
6167 while Present (Comp_Id) loop
6168 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6169 Comp_Id := Next_Entity (Comp_Id);
6173 end First_Component_Or_Discriminant;
6179 function First_Formal (Id : E) return E is
6184 (Is_Overloadable (Id)
6185 or else Ekind_In (Id, E_Entry_Family,
6187 E_Subprogram_Type));
6189 if Ekind (Id) = E_Enumeration_Literal then
6193 Formal := First_Entity (Id);
6195 if Present (Formal) and then Is_Formal (Formal) then
6203 ------------------------------
6204 -- First_Formal_With_Extras --
6205 ------------------------------
6207 function First_Formal_With_Extras (Id : E) return E is
6212 (Is_Overloadable (Id)
6213 or else Ekind_In (Id, E_Entry_Family,
6215 E_Subprogram_Type));
6217 if Ekind (Id) = E_Enumeration_Literal then
6221 Formal := First_Entity (Id);
6223 if Present (Formal) and then Is_Formal (Formal) then
6226 return Extra_Formals (Id); -- Empty if no extra formals
6229 end First_Formal_With_Extras;
6231 -------------------------------------
6232 -- Get_Attribute_Definition_Clause --
6233 -------------------------------------
6235 function Get_Attribute_Definition_Clause
6237 Id : Attribute_Id) return Node_Id
6242 N := First_Rep_Item (E);
6243 while Present (N) loop
6244 if Nkind (N) = N_Attribute_Definition_Clause
6245 and then Get_Attribute_Id (Chars (N)) = Id
6254 end Get_Attribute_Definition_Clause;
6260 function Get_Full_View (T : Entity_Id) return Entity_Id is
6262 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
6263 return Full_View (T);
6265 elsif Is_Class_Wide_Type (T)
6266 and then Ekind (Root_Type (T)) = E_Incomplete_Type
6267 and then Present (Full_View (Root_Type (T)))
6269 return Class_Wide_Type (Full_View (Root_Type (T)));
6280 function Get_Pragma (E : Entity_Id; Id : Pragma_Id) return Node_Id is
6281 Is_CDG : constant Boolean :=
6282 Id = Pragma_Depends or else Id = Pragma_Global;
6283 Is_CTC : constant Boolean :=
6284 Id = Pragma_Contract_Cases or else Id = Pragma_Test_Case;
6285 Is_PPC : constant Boolean :=
6286 Id = Pragma_Precondition or else Id = Pragma_Postcondition;
6287 Delayed : constant Boolean := Is_CDG or Is_CTC or Is_PPC;
6292 -- Handle delayed pragmas that appear in N_Contract nodes. Those have to
6293 -- be extracted from their specialized list.
6296 Items := Contract (E);
6302 Item := Classifications (Items);
6305 Item := Contract_Test_Cases (Items);
6308 Item := Pre_Post_Conditions (Items);
6314 Item := First_Rep_Item (E);
6317 while Present (Item) loop
6318 if Nkind (Item) = N_Pragma
6319 and then Get_Pragma_Id (Pragma_Name (Item)) = Id
6323 -- All nodes in N_Contract are chained using Next_Pragma
6326 Item := Next_Pragma (Item);
6331 Next_Rep_Item (Item);
6338 --------------------------------------
6339 -- Get_Record_Representation_Clause --
6340 --------------------------------------
6342 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
6346 N := First_Rep_Item (E);
6347 while Present (N) loop
6348 if Nkind (N) = N_Record_Representation_Clause then
6356 end Get_Record_Representation_Clause;
6358 ------------------------
6359 -- Has_Attach_Handler --
6360 ------------------------
6362 function Has_Attach_Handler (Id : E) return B is
6366 pragma Assert (Is_Protected_Type (Id));
6368 Ritem := First_Rep_Item (Id);
6369 while Present (Ritem) loop
6370 if Nkind (Ritem) = N_Pragma
6371 and then Pragma_Name (Ritem) = Name_Attach_Handler
6375 Next_Rep_Item (Ritem);
6380 end Has_Attach_Handler;
6386 function Has_Entries (Id : E) return B is
6390 pragma Assert (Is_Concurrent_Type (Id));
6392 Ent := First_Entity (Id);
6393 while Present (Ent) loop
6394 if Is_Entry (Ent) then
6398 Ent := Next_Entity (Ent);
6404 ----------------------------
6405 -- Has_Foreign_Convention --
6406 ----------------------------
6408 function Has_Foreign_Convention (Id : E) return B is
6410 -- While regular Intrinsics such as the Standard operators fit in the
6411 -- "Ada" convention, those with an Interface_Name materialize GCC
6412 -- builtin imports for which Ada special treatments shouldn't apply.
6414 return Convention (Id) in Foreign_Convention
6415 or else (Convention (Id) = Convention_Intrinsic
6416 and then Present (Interface_Name (Id)));
6417 end Has_Foreign_Convention;
6419 ---------------------------
6420 -- Has_Interrupt_Handler --
6421 ---------------------------
6423 function Has_Interrupt_Handler (Id : E) return B is
6427 pragma Assert (Is_Protected_Type (Id));
6429 Ritem := First_Rep_Item (Id);
6430 while Present (Ritem) loop
6431 if Nkind (Ritem) = N_Pragma
6432 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6436 Next_Rep_Item (Ritem);
6441 end Has_Interrupt_Handler;
6443 --------------------
6444 -- Has_Unmodified --
6445 --------------------
6447 function Has_Unmodified (E : Entity_Id) return Boolean is
6449 if Has_Pragma_Unmodified (E) then
6451 elsif Warnings_Off (E) then
6452 Set_Warnings_Off_Used_Unmodified (E);
6459 ---------------------
6460 -- Has_Unreferenced --
6461 ---------------------
6463 function Has_Unreferenced (E : Entity_Id) return Boolean is
6465 if Has_Pragma_Unreferenced (E) then
6467 elsif Warnings_Off (E) then
6468 Set_Warnings_Off_Used_Unreferenced (E);
6473 end Has_Unreferenced;
6475 ----------------------
6476 -- Has_Warnings_Off --
6477 ----------------------
6479 function Has_Warnings_Off (E : Entity_Id) return Boolean is
6481 if Warnings_Off (E) then
6482 Set_Warnings_Off_Used (E);
6487 end Has_Warnings_Off;
6489 ------------------------------
6490 -- Implementation_Base_Type --
6491 ------------------------------
6493 function Implementation_Base_Type (Id : E) return E is
6498 Bastyp := Base_Type (Id);
6500 if Is_Incomplete_Or_Private_Type (Bastyp) then
6501 Imptyp := Underlying_Type (Bastyp);
6503 -- If we have an implementation type, then just return it,
6504 -- otherwise we return the Base_Type anyway. This can only
6505 -- happen in error situations and should avoid some error bombs.
6507 if Present (Imptyp) then
6508 return Base_Type (Imptyp);
6516 end Implementation_Base_Type;
6518 -------------------------
6519 -- Invariant_Procedure --
6520 -------------------------
6522 function Invariant_Procedure (Id : E) return E is
6526 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
6528 if No (Subprograms_For_Type (Id)) then
6532 S := Subprograms_For_Type (Id);
6533 while Present (S) loop
6534 if Is_Invariant_Procedure (S) then
6537 S := Subprograms_For_Type (S);
6543 end Invariant_Procedure;
6549 -- Global flag table allowing rapid computation of this function
6551 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
6552 (E_Enumeration_Subtype |
6554 E_Signed_Integer_Subtype |
6555 E_Modular_Integer_Subtype |
6556 E_Floating_Point_Subtype |
6557 E_Ordinary_Fixed_Point_Subtype |
6558 E_Decimal_Fixed_Point_Subtype |
6563 E_Record_Subtype_With_Private |
6564 E_Limited_Private_Subtype |
6566 E_Protected_Subtype |
6568 E_String_Literal_Subtype |
6569 E_Class_Wide_Subtype => False,
6572 function Is_Base_Type (Id : E) return Boolean is
6574 return Entity_Is_Base_Type (Ekind (Id));
6577 ---------------------
6578 -- Is_Boolean_Type --
6579 ---------------------
6581 function Is_Boolean_Type (Id : E) return B is
6583 return Root_Type (Id) = Standard_Boolean;
6584 end Is_Boolean_Type;
6586 ------------------------
6587 -- Is_Constant_Object --
6588 ------------------------
6590 function Is_Constant_Object (Id : E) return B is
6591 K : constant Entity_Kind := Ekind (Id);
6594 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
6595 end Is_Constant_Object;
6597 --------------------
6598 -- Is_Discriminal --
6599 --------------------
6601 function Is_Discriminal (Id : E) return B is
6603 return (Ekind_In (Id, E_Constant, E_In_Parameter)
6604 and then Present (Discriminal_Link (Id)));
6607 ----------------------
6608 -- Is_Dynamic_Scope --
6609 ----------------------
6611 function Is_Dynamic_Scope (Id : E) return B is
6614 Ekind (Id) = E_Block
6616 Ekind (Id) = E_Function
6618 Ekind (Id) = E_Procedure
6620 Ekind (Id) = E_Subprogram_Body
6622 Ekind (Id) = E_Task_Type
6624 (Ekind (Id) = E_Limited_Private_Type
6625 and then Present (Full_View (Id))
6626 and then Ekind (Full_View (Id)) = E_Task_Type)
6628 Ekind (Id) = E_Entry
6630 Ekind (Id) = E_Entry_Family
6632 Ekind (Id) = E_Return_Statement;
6633 end Is_Dynamic_Scope;
6635 --------------------
6636 -- Is_Entity_Name --
6637 --------------------
6639 function Is_Entity_Name (N : Node_Id) return Boolean is
6640 Kind : constant Node_Kind := Nkind (N);
6643 -- Identifiers, operator symbols, expanded names are entity names
6645 return Kind = N_Identifier
6646 or else Kind = N_Operator_Symbol
6647 or else Kind = N_Expanded_Name
6649 -- Attribute references are entity names if they refer to an entity.
6650 -- Note that we don't do this by testing for the presence of the
6651 -- Entity field in the N_Attribute_Reference node, since it may not
6652 -- have been set yet.
6654 or else (Kind = N_Attribute_Reference
6655 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
6662 function Is_Finalizer (Id : E) return B is
6664 return Ekind (Id) = E_Procedure and then Chars (Id) = Name_uFinalizer;
6667 ---------------------
6668 -- Is_Ghost_Entity --
6669 ---------------------
6671 function Is_Ghost_Entity (Id : E) return B is
6673 if Present (Id) and then Ekind (Id) = E_Variable then
6674 return Convention (Id) = Convention_Ghost;
6676 return Is_Ghost_Subprogram (Id);
6678 end Is_Ghost_Entity;
6680 -------------------------
6681 -- Is_Ghost_Subprogram --
6682 -------------------------
6684 function Is_Ghost_Subprogram (Id : E) return B is
6686 if Present (Id) and then Ekind_In (Id, E_Function, E_Procedure) then
6687 return Convention (Id) = Convention_Ghost;
6691 end Is_Ghost_Subprogram;
6693 --------------------
6694 -- Is_Input_State --
6695 --------------------
6697 function Is_Input_State (Id : E) return B is
6700 Ekind (Id) = E_Abstract_State and then Has_Property (Id, Name_Input);
6707 function Is_Null_State (Id : E) return B is
6710 Ekind (Id) = E_Abstract_State and then Nkind (Parent (Id)) = N_Null;
6713 ---------------------
6714 -- Is_Output_State --
6715 ---------------------
6717 function Is_Output_State (Id : E) return B is
6720 Ekind (Id) = E_Abstract_State and then Has_Property (Id, Name_Output);
6721 end Is_Output_State;
6723 -----------------------------------
6724 -- Is_Package_Or_Generic_Package --
6725 -----------------------------------
6727 function Is_Package_Or_Generic_Package (Id : E) return B is
6729 return Ekind_In (Id, E_Generic_Package, E_Package);
6730 end Is_Package_Or_Generic_Package;
6736 function Is_Prival (Id : E) return B is
6738 return (Ekind_In (Id, E_Constant, E_Variable)
6739 and then Present (Prival_Link (Id)));
6742 ----------------------------
6743 -- Is_Protected_Component --
6744 ----------------------------
6746 function Is_Protected_Component (Id : E) return B is
6748 return Ekind (Id) = E_Component and then Is_Protected_Type (Scope (Id));
6749 end Is_Protected_Component;
6751 ----------------------------
6752 -- Is_Protected_Interface --
6753 ----------------------------
6755 function Is_Protected_Interface (Id : E) return B is
6756 Typ : constant Entity_Id := Base_Type (Id);
6758 if not Is_Interface (Typ) then
6760 elsif Is_Class_Wide_Type (Typ) then
6761 return Is_Protected_Interface (Etype (Typ));
6763 return Protected_Present (Type_Definition (Parent (Typ)));
6765 end Is_Protected_Interface;
6767 ------------------------------
6768 -- Is_Protected_Record_Type --
6769 ------------------------------
6771 function Is_Protected_Record_Type (Id : E) return B is
6774 Is_Concurrent_Record_Type (Id)
6775 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
6776 end Is_Protected_Record_Type;
6778 --------------------------------
6779 -- Is_Standard_Character_Type --
6780 --------------------------------
6782 function Is_Standard_Character_Type (Id : E) return B is
6784 if Is_Type (Id) then
6786 R : constant Entity_Id := Root_Type (Id);
6789 R = Standard_Character
6791 R = Standard_Wide_Character
6793 R = Standard_Wide_Wide_Character;
6799 end Is_Standard_Character_Type;
6801 --------------------
6802 -- Is_String_Type --
6803 --------------------
6805 function Is_String_Type (Id : E) return B is
6807 return Ekind (Id) in String_Kind
6808 or else (Is_Array_Type (Id)
6809 and then Id /= Any_Composite
6810 and then Number_Dimensions (Id) = 1
6811 and then Is_Character_Type (Component_Type (Id)));
6814 -------------------------------
6815 -- Is_Synchronized_Interface --
6816 -------------------------------
6818 function Is_Synchronized_Interface (Id : E) return B is
6819 Typ : constant Entity_Id := Base_Type (Id);
6822 if not Is_Interface (Typ) then
6825 elsif Is_Class_Wide_Type (Typ) then
6826 return Is_Synchronized_Interface (Etype (Typ));
6829 return Protected_Present (Type_Definition (Parent (Typ)))
6830 or else Synchronized_Present (Type_Definition (Parent (Typ)))
6831 or else Task_Present (Type_Definition (Parent (Typ)));
6833 end Is_Synchronized_Interface;
6835 -----------------------
6836 -- Is_Task_Interface --
6837 -----------------------
6839 function Is_Task_Interface (Id : E) return B is
6840 Typ : constant Entity_Id := Base_Type (Id);
6842 if not Is_Interface (Typ) then
6844 elsif Is_Class_Wide_Type (Typ) then
6845 return Is_Task_Interface (Etype (Typ));
6847 return Task_Present (Type_Definition (Parent (Typ)));
6849 end Is_Task_Interface;
6851 -------------------------
6852 -- Is_Task_Record_Type --
6853 -------------------------
6855 function Is_Task_Record_Type (Id : E) return B is
6858 Is_Concurrent_Record_Type (Id)
6859 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
6860 end Is_Task_Record_Type;
6862 -----------------------
6863 -- Is_Volatile_State --
6864 -----------------------
6866 function Is_Volatile_State (Id : E) return B is
6869 Ekind (Id) = E_Abstract_State
6870 and then Has_Property (Id, Name_Volatile);
6871 end Is_Volatile_State;
6873 ------------------------
6874 -- Is_Wrapper_Package --
6875 ------------------------
6877 function Is_Wrapper_Package (Id : E) return B is
6879 return (Ekind (Id) = E_Package and then Present (Related_Instance (Id)));
6880 end Is_Wrapper_Package;
6886 function Last_Formal (Id : E) return E is
6891 (Is_Overloadable (Id)
6892 or else Ekind_In (Id, E_Entry_Family,
6894 E_Subprogram_Type));
6896 if Ekind (Id) = E_Enumeration_Literal then
6900 Formal := First_Formal (Id);
6902 if Present (Formal) then
6903 while Present (Next_Formal (Formal)) loop
6904 Formal := Next_Formal (Formal);
6912 function Model_Emin_Value (Id : E) return Uint is
6914 return Machine_Emin_Value (Id);
6915 end Model_Emin_Value;
6917 -------------------------
6918 -- Model_Epsilon_Value --
6919 -------------------------
6921 function Model_Epsilon_Value (Id : E) return Ureal is
6922 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6924 return Radix ** (1 - Model_Mantissa_Value (Id));
6925 end Model_Epsilon_Value;
6927 --------------------------
6928 -- Model_Mantissa_Value --
6929 --------------------------
6931 function Model_Mantissa_Value (Id : E) return Uint is
6933 return Machine_Mantissa_Value (Id);
6934 end Model_Mantissa_Value;
6936 -----------------------
6937 -- Model_Small_Value --
6938 -----------------------
6940 function Model_Small_Value (Id : E) return Ureal is
6941 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6943 return Radix ** (Model_Emin_Value (Id) - 1);
6944 end Model_Small_Value;
6946 ------------------------
6947 -- Machine_Emax_Value --
6948 ------------------------
6950 function Machine_Emax_Value (Id : E) return Uint is
6951 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
6954 case Float_Rep (Id) is
6957 when 1 .. 6 => return Uint_128;
6958 when 7 .. 15 => return 2**10;
6959 when 16 .. 33 => return 2**14;
6960 when others => return No_Uint;
6965 when 1 .. 9 => return 2**7 - 1;
6966 when 10 .. 15 => return 2**10 - 1;
6967 when others => return No_Uint;
6971 return Uint_2 ** Uint_7 - Uint_1;
6973 end Machine_Emax_Value;
6975 ------------------------
6976 -- Machine_Emin_Value --
6977 ------------------------
6979 function Machine_Emin_Value (Id : E) return Uint is
6981 case Float_Rep (Id) is
6982 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
6983 when VAX_Native => return -Machine_Emax_Value (Id);
6984 when AAMP => return -Machine_Emax_Value (Id);
6986 end Machine_Emin_Value;
6988 ----------------------------
6989 -- Machine_Mantissa_Value --
6990 ----------------------------
6992 function Machine_Mantissa_Value (Id : E) return Uint is
6993 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
6996 case Float_Rep (Id) is
6999 when 1 .. 6 => return Uint_24;
7000 when 7 .. 15 => return UI_From_Int (53);
7001 when 16 .. 18 => return Uint_64;
7002 when 19 .. 33 => return UI_From_Int (113);
7003 when others => return No_Uint;
7008 when 1 .. 6 => return Uint_24;
7009 when 7 .. 9 => return UI_From_Int (56);
7010 when 10 .. 15 => return UI_From_Int (53);
7011 when others => return No_Uint;
7016 when 1 .. 6 => return Uint_24;
7017 when 7 .. 9 => return UI_From_Int (40);
7018 when others => return No_Uint;
7021 end Machine_Mantissa_Value;
7023 -------------------------
7024 -- Machine_Radix_Value --
7025 -------------------------
7027 function Machine_Radix_Value (Id : E) return U is
7029 case Float_Rep (Id) is
7030 when IEEE_Binary | VAX_Native | AAMP =>
7033 end Machine_Radix_Value;
7035 --------------------
7036 -- Next_Component --
7037 --------------------
7039 function Next_Component (Id : E) return E is
7043 Comp_Id := Next_Entity (Id);
7044 while Present (Comp_Id) loop
7045 exit when Ekind (Comp_Id) = E_Component;
7046 Comp_Id := Next_Entity (Comp_Id);
7052 ------------------------------------
7053 -- Next_Component_Or_Discriminant --
7054 ------------------------------------
7056 function Next_Component_Or_Discriminant (Id : E) return E is
7060 Comp_Id := Next_Entity (Id);
7061 while Present (Comp_Id) loop
7062 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
7063 Comp_Id := Next_Entity (Comp_Id);
7067 end Next_Component_Or_Discriminant;
7069 -----------------------
7070 -- Next_Discriminant --
7071 -----------------------
7073 -- This function actually implements both Next_Discriminant and
7074 -- Next_Stored_Discriminant by making sure that the Discriminant
7075 -- returned is of the same variety as Id.
7077 function Next_Discriminant (Id : E) return E is
7079 -- Derived Tagged types with private extensions look like this...
7081 -- E_Discriminant d1
7082 -- E_Discriminant d2
7084 -- E_Discriminant d1
7085 -- E_Discriminant d2
7088 -- so it is critical not to go past the leading discriminants
7093 pragma Assert (Ekind (Id) = E_Discriminant);
7096 D := Next_Entity (D);
7098 or else (Ekind (D) /= E_Discriminant
7099 and then not Is_Itype (D))
7104 exit when Ekind (D) = E_Discriminant
7105 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
7109 end Next_Discriminant;
7115 function Next_Formal (Id : E) return E is
7119 -- Follow the chain of declared entities as long as the kind of the
7120 -- entity corresponds to a formal parameter. Skip internal entities
7121 -- that may have been created for implicit subtypes, in the process
7122 -- of analyzing default expressions.
7126 P := Next_Entity (P);
7128 if No (P) or else Is_Formal (P) then
7130 elsif not Is_Internal (P) then
7136 -----------------------------
7137 -- Next_Formal_With_Extras --
7138 -----------------------------
7140 function Next_Formal_With_Extras (Id : E) return E is
7142 if Present (Extra_Formal (Id)) then
7143 return Extra_Formal (Id);
7145 return Next_Formal (Id);
7147 end Next_Formal_With_Extras;
7153 function Next_Index (Id : Node_Id) return Node_Id is
7162 function Next_Literal (Id : E) return E is
7164 pragma Assert (Nkind (Id) in N_Entity);
7168 ------------------------------
7169 -- Next_Stored_Discriminant --
7170 ------------------------------
7172 function Next_Stored_Discriminant (Id : E) return E is
7174 -- See comment in Next_Discriminant
7176 return Next_Discriminant (Id);
7177 end Next_Stored_Discriminant;
7179 -----------------------
7180 -- Number_Dimensions --
7181 -----------------------
7183 function Number_Dimensions (Id : E) return Pos is
7188 if Ekind (Id) in String_Kind then
7193 T := First_Index (Id);
7194 while Present (T) loop
7201 end Number_Dimensions;
7203 --------------------
7204 -- Number_Entries --
7205 --------------------
7207 function Number_Entries (Id : E) return Nat is
7212 pragma Assert (Is_Concurrent_Type (Id));
7215 Ent := First_Entity (Id);
7216 while Present (Ent) loop
7217 if Is_Entry (Ent) then
7221 Ent := Next_Entity (Ent);
7227 --------------------
7228 -- Number_Formals --
7229 --------------------
7231 function Number_Formals (Id : E) return Pos is
7237 Formal := First_Formal (Id);
7238 while Present (Formal) loop
7240 Formal := Next_Formal (Formal);
7246 --------------------
7247 -- Parameter_Mode --
7248 --------------------
7250 function Parameter_Mode (Id : E) return Formal_Kind is
7255 ------------------------
7256 -- Predicate_Function --
7257 ------------------------
7259 function Predicate_Function (Id : E) return E is
7264 pragma Assert (Is_Type (Id));
7266 -- If type is private and has a completion, predicate may be defined
7267 -- on the full view.
7269 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7270 T := Full_View (Id);
7275 if No (Subprograms_For_Type (T)) then
7279 S := Subprograms_For_Type (T);
7280 while Present (S) loop
7281 if Is_Predicate_Function (S) then
7284 S := Subprograms_For_Type (S);
7290 end Predicate_Function;
7292 --------------------------
7293 -- Predicate_Function_M --
7294 --------------------------
7296 function Predicate_Function_M (Id : E) return E is
7301 pragma Assert (Is_Type (Id));
7303 -- If type is private and has a completion, predicate may be defined
7304 -- on the full view.
7306 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7307 T := Full_View (Id);
7312 if No (Subprograms_For_Type (T)) then
7316 S := Subprograms_For_Type (T);
7317 while Present (S) loop
7318 if Is_Predicate_Function_M (S) then
7321 S := Subprograms_For_Type (S);
7327 end Predicate_Function_M;
7329 -------------------------
7330 -- Present_In_Rep_Item --
7331 -------------------------
7333 function Present_In_Rep_Item (E : Entity_Id; N : Node_Id) return Boolean is
7337 Ritem := First_Rep_Item (E);
7339 while Present (Ritem) loop
7344 Next_Rep_Item (Ritem);
7348 end Present_In_Rep_Item;
7350 --------------------------
7351 -- Primitive_Operations --
7352 --------------------------
7354 function Primitive_Operations (Id : E) return L is
7356 if Is_Concurrent_Type (Id) then
7357 if Present (Corresponding_Record_Type (Id)) then
7358 return Direct_Primitive_Operations
7359 (Corresponding_Record_Type (Id));
7361 -- If expansion is disabled the corresponding record type is absent,
7362 -- but if the type has ancestors it may have primitive operations.
7364 elsif Is_Tagged_Type (Id) then
7365 return Direct_Primitive_Operations (Id);
7371 return Direct_Primitive_Operations (Id);
7373 end Primitive_Operations;
7375 ---------------------
7376 -- Record_Rep_Item --
7377 ---------------------
7379 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
7381 Set_Next_Rep_Item (N, First_Rep_Item (E));
7382 Set_First_Rep_Item (E, N);
7383 end Record_Rep_Item;
7389 function Root_Type (Id : E) return E is
7393 pragma Assert (Nkind (Id) in N_Entity);
7395 T := Base_Type (Id);
7397 if Ekind (T) = E_Class_Wide_Type then
7409 -- Following test catches some error cases resulting from
7412 elsif No (Etyp) then
7413 Check_Error_Detected;
7416 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
7419 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
7425 -- Return if there is a circularity in the inheritance chain. This
7426 -- happens in some error situations and we do not want to get
7427 -- stuck in this loop.
7429 if T = Base_Type (Id) then
7436 ---------------------
7437 -- Safe_Emax_Value --
7438 ---------------------
7440 function Safe_Emax_Value (Id : E) return Uint is
7442 return Machine_Emax_Value (Id);
7443 end Safe_Emax_Value;
7445 ----------------------
7446 -- Safe_First_Value --
7447 ----------------------
7449 function Safe_First_Value (Id : E) return Ureal is
7451 return -Safe_Last_Value (Id);
7452 end Safe_First_Value;
7454 ---------------------
7455 -- Safe_Last_Value --
7456 ---------------------
7458 function Safe_Last_Value (Id : E) return Ureal is
7459 Radix : constant Uint := Machine_Radix_Value (Id);
7460 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
7461 Emax : constant Uint := Safe_Emax_Value (Id);
7462 Significand : constant Uint := Radix ** Mantissa - 1;
7463 Exponent : constant Uint := Emax - Mantissa;
7469 (Num => Significand * 2 ** (Exponent mod 4),
7470 Den => -Exponent / 4,
7476 (Num => Significand,
7480 end Safe_Last_Value;
7486 function Scope_Depth (Id : E) return Uint is
7491 while Is_Record_Type (Scop) loop
7492 Scop := Scope (Scop);
7495 return Scope_Depth_Value (Scop);
7498 ---------------------
7499 -- Scope_Depth_Set --
7500 ---------------------
7502 function Scope_Depth_Set (Id : E) return B is
7504 return not Is_Record_Type (Id)
7505 and then Field22 (Id) /= Union_Id (Empty);
7506 end Scope_Depth_Set;
7508 -----------------------------
7509 -- Set_Component_Alignment --
7510 -----------------------------
7512 -- Component Alignment is encoded using two flags, Flag128/129 as
7513 -- follows. Note that both flags False = Align_Default, so that the
7514 -- default initialization of flags to False initializes component
7515 -- alignment to the default value as required.
7517 -- Flag128 Flag129 Value
7518 -- ------- ------- -----
7519 -- False False Calign_Default
7520 -- False True Calign_Component_Size
7521 -- True False Calign_Component_Size_4
7522 -- True True Calign_Storage_Unit
7524 procedure Set_Component_Alignment (Id : E; V : C) is
7526 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
7527 and then Is_Base_Type (Id));
7530 when Calign_Default =>
7531 Set_Flag128 (Id, False);
7532 Set_Flag129 (Id, False);
7534 when Calign_Component_Size =>
7535 Set_Flag128 (Id, False);
7536 Set_Flag129 (Id, True);
7538 when Calign_Component_Size_4 =>
7539 Set_Flag128 (Id, True);
7540 Set_Flag129 (Id, False);
7542 when Calign_Storage_Unit =>
7543 Set_Flag128 (Id, True);
7544 Set_Flag129 (Id, True);
7546 end Set_Component_Alignment;
7548 -----------------------------
7549 -- Set_Invariant_Procedure --
7550 -----------------------------
7552 procedure Set_Invariant_Procedure (Id : E; V : E) is
7556 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7558 S := Subprograms_For_Type (Id);
7559 Set_Subprograms_For_Type (Id, V);
7560 Set_Subprograms_For_Type (V, S);
7562 -- Check for duplicate entry
7564 while Present (S) loop
7565 if Is_Invariant_Procedure (S) then
7566 raise Program_Error;
7568 S := Subprograms_For_Type (S);
7571 end Set_Invariant_Procedure;
7573 ----------------------------
7574 -- Set_Predicate_Function --
7575 ----------------------------
7577 procedure Set_Predicate_Function (Id : E; V : E) is
7581 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7583 S := Subprograms_For_Type (Id);
7584 Set_Subprograms_For_Type (Id, V);
7585 Set_Subprograms_For_Type (V, S);
7587 while Present (S) loop
7588 if Is_Predicate_Function (S) then
7589 raise Program_Error;
7591 S := Subprograms_For_Type (S);
7594 end Set_Predicate_Function;
7596 ------------------------------
7597 -- Set_Predicate_Function_M --
7598 ------------------------------
7600 procedure Set_Predicate_Function_M (Id : E; V : E) is
7604 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7606 S := Subprograms_For_Type (Id);
7607 Set_Subprograms_For_Type (Id, V);
7608 Set_Subprograms_For_Type (V, S);
7610 -- Check for duplicates
7612 while Present (S) loop
7613 if Is_Predicate_Function_M (S) then
7614 raise Program_Error;
7616 S := Subprograms_For_Type (S);
7619 end Set_Predicate_Function_M;
7625 function Size_Clause (Id : E) return N is
7627 return Get_Attribute_Definition_Clause (Id, Attribute_Size);
7630 ------------------------
7631 -- Stream_Size_Clause --
7632 ------------------------
7634 function Stream_Size_Clause (Id : E) return N is
7636 return Get_Attribute_Definition_Clause (Id, Attribute_Stream_Size);
7637 end Stream_Size_Clause;
7643 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
7649 Kind := E_Access_Subtype;
7653 Kind := E_Array_Subtype;
7655 when E_Class_Wide_Type |
7656 E_Class_Wide_Subtype =>
7657 Kind := E_Class_Wide_Subtype;
7659 when E_Decimal_Fixed_Point_Type |
7660 E_Decimal_Fixed_Point_Subtype =>
7661 Kind := E_Decimal_Fixed_Point_Subtype;
7663 when E_Ordinary_Fixed_Point_Type |
7664 E_Ordinary_Fixed_Point_Subtype =>
7665 Kind := E_Ordinary_Fixed_Point_Subtype;
7667 when E_Private_Type |
7668 E_Private_Subtype =>
7669 Kind := E_Private_Subtype;
7671 when E_Limited_Private_Type |
7672 E_Limited_Private_Subtype =>
7673 Kind := E_Limited_Private_Subtype;
7675 when E_Record_Type_With_Private |
7676 E_Record_Subtype_With_Private =>
7677 Kind := E_Record_Subtype_With_Private;
7679 when E_Record_Type |
7681 Kind := E_Record_Subtype;
7683 when E_String_Type |
7685 Kind := E_String_Subtype;
7687 when Enumeration_Kind =>
7688 Kind := E_Enumeration_Subtype;
7691 Kind := E_Floating_Point_Subtype;
7693 when Signed_Integer_Kind =>
7694 Kind := E_Signed_Integer_Subtype;
7696 when Modular_Integer_Kind =>
7697 Kind := E_Modular_Integer_Subtype;
7699 when Protected_Kind =>
7700 Kind := E_Protected_Subtype;
7703 Kind := E_Task_Subtype;
7707 raise Program_Error;
7713 ---------------------
7714 -- Type_High_Bound --
7715 ---------------------
7717 function Type_High_Bound (Id : E) return Node_Id is
7718 Rng : constant Node_Id := Scalar_Range (Id);
7720 if Nkind (Rng) = N_Subtype_Indication then
7721 return High_Bound (Range_Expression (Constraint (Rng)));
7723 return High_Bound (Rng);
7725 end Type_High_Bound;
7727 --------------------
7728 -- Type_Low_Bound --
7729 --------------------
7731 function Type_Low_Bound (Id : E) return Node_Id is
7732 Rng : constant Node_Id := Scalar_Range (Id);
7734 if Nkind (Rng) = N_Subtype_Indication then
7735 return Low_Bound (Range_Expression (Constraint (Rng)));
7737 return Low_Bound (Rng);
7741 ---------------------
7742 -- Underlying_Type --
7743 ---------------------
7745 function Underlying_Type (Id : E) return E is
7747 -- For record_with_private the underlying type is always the direct
7748 -- full view. Never try to take the full view of the parent it
7749 -- doesn't make sense.
7751 if Ekind (Id) = E_Record_Type_With_Private then
7752 return Full_View (Id);
7754 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
7756 -- If we have an incomplete or private type with a full view,
7757 -- then we return the Underlying_Type of this full view
7759 if Present (Full_View (Id)) then
7760 if Id = Full_View (Id) then
7762 -- Previous error in declaration
7767 return Underlying_Type (Full_View (Id));
7770 -- If we have an incomplete entity that comes from the limited
7771 -- view then we return the Underlying_Type of its non-limited
7774 elsif From_With_Type (Id)
7775 and then Present (Non_Limited_View (Id))
7777 return Underlying_Type (Non_Limited_View (Id));
7779 -- Otherwise check for the case where we have a derived type or
7780 -- subtype, and if so get the Underlying_Type of the parent type.
7782 elsif Etype (Id) /= Id then
7783 return Underlying_Type (Etype (Id));
7785 -- Otherwise we have an incomplete or private type that has
7786 -- no full view, which means that we have not encountered the
7787 -- completion, so return Empty to indicate the underlying type
7788 -- is not yet known.
7794 -- For non-incomplete, non-private types, return the type itself
7795 -- Also for entities that are not types at all return the entity
7801 end Underlying_Type;
7807 function Vax_Float (Id : E) return B is
7809 return Is_Floating_Point_Type (Id) and then Float_Rep (Id) = VAX_Native;
7812 ------------------------
7813 -- Write_Entity_Flags --
7814 ------------------------
7816 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
7818 procedure W (Flag_Name : String; Flag : Boolean);
7819 -- Write out given flag if it is set
7825 procedure W (Flag_Name : String; Flag : Boolean) is
7829 Write_Str (Flag_Name);
7830 Write_Str (" = True");
7835 -- Start of processing for Write_Entity_Flags
7838 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
7839 and then Is_Base_Type (Id)
7842 Write_Str ("Component_Alignment = ");
7844 case Component_Alignment (Id) is
7845 when Calign_Default =>
7846 Write_Str ("Calign_Default");
7848 when Calign_Component_Size =>
7849 Write_Str ("Calign_Component_Size");
7851 when Calign_Component_Size_4 =>
7852 Write_Str ("Calign_Component_Size_4");
7854 when Calign_Storage_Unit =>
7855 Write_Str ("Calign_Storage_Unit");
7861 W ("Address_Taken", Flag104 (Id));
7862 W ("Body_Needed_For_SAL", Flag40 (Id));
7863 W ("C_Pass_By_Copy", Flag125 (Id));
7864 W ("Can_Never_Be_Null", Flag38 (Id));
7865 W ("Checks_May_Be_Suppressed", Flag31 (Id));
7866 W ("Debug_Info_Off", Flag166 (Id));
7867 W ("Default_Expressions_Processed", Flag108 (Id));
7868 W ("Delay_Cleanups", Flag114 (Id));
7869 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
7870 W ("Depends_On_Private", Flag14 (Id));
7871 W ("Discard_Names", Flag88 (Id));
7872 W ("Elaboration_Entity_Required", Flag174 (Id));
7873 W ("Elaborate_Body_Desirable", Flag210 (Id));
7874 W ("Entry_Accepted", Flag152 (Id));
7875 W ("Can_Use_Internal_Rep", Flag229 (Id));
7876 W ("Finalize_Storage_Only", Flag158 (Id));
7877 W ("From_With_Type", Flag159 (Id));
7878 W ("Has_Aliased_Components", Flag135 (Id));
7879 W ("Has_Alignment_Clause", Flag46 (Id));
7880 W ("Has_All_Calls_Remote", Flag79 (Id));
7881 W ("Has_Anonymous_Master", Flag253 (Id));
7882 W ("Has_Atomic_Components", Flag86 (Id));
7883 W ("Has_Biased_Representation", Flag139 (Id));
7884 W ("Has_Completion", Flag26 (Id));
7885 W ("Has_Completion_In_Body", Flag71 (Id));
7886 W ("Has_Complex_Representation", Flag140 (Id));
7887 W ("Has_Component_Size_Clause", Flag68 (Id));
7888 W ("Has_Contiguous_Rep", Flag181 (Id));
7889 W ("Has_Controlled_Component", Flag43 (Id));
7890 W ("Has_Controlling_Result", Flag98 (Id));
7891 W ("Has_Convention_Pragma", Flag119 (Id));
7892 W ("Has_Default_Aspect", Flag39 (Id));
7893 W ("Has_Delayed_Aspects", Flag200 (Id));
7894 W ("Has_Delayed_Freeze", Flag18 (Id));
7895 W ("Has_Delayed_Rep_Aspects", Flag261 (Id));
7896 W ("Has_Discriminants", Flag5 (Id));
7897 W ("Has_Dispatch_Table", Flag220 (Id));
7898 W ("Has_Dynamic_Predicate_Aspect", Flag258 (Id));
7899 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
7900 W ("Has_Exit", Flag47 (Id));
7901 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
7902 W ("Has_Forward_Instantiation", Flag175 (Id));
7903 W ("Has_Fully_Qualified_Name", Flag173 (Id));
7904 W ("Has_Gigi_Rep_Item", Flag82 (Id));
7905 W ("Has_Homonym", Flag56 (Id));
7906 W ("Has_Implicit_Dereference", Flag251 (Id));
7907 W ("Has_Inheritable_Invariants", Flag248 (Id));
7908 W ("Has_Initial_Value", Flag219 (Id));
7909 W ("Has_Invariants", Flag232 (Id));
7910 W ("Has_Loop_Entry_Attributes", Flag260 (Id));
7911 W ("Has_Machine_Radix_Clause", Flag83 (Id));
7912 W ("Has_Master_Entity", Flag21 (Id));
7913 W ("Has_Missing_Return", Flag142 (Id));
7914 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
7915 W ("Has_Non_Standard_Rep", Flag75 (Id));
7916 W ("Has_Object_Size_Clause", Flag172 (Id));
7917 W ("Has_Per_Object_Constraint", Flag154 (Id));
7918 W ("Has_Postconditions", Flag240 (Id));
7919 W ("Has_Pragma_Controlled", Flag27 (Id));
7920 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
7921 W ("Has_Pragma_Inline", Flag157 (Id));
7922 W ("Has_Pragma_Inline_Always", Flag230 (Id));
7923 W ("Has_Pragma_No_Inline", Flag201 (Id));
7924 W ("Has_Pragma_Ordered", Flag198 (Id));
7925 W ("Has_Pragma_Pack", Flag121 (Id));
7926 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
7927 W ("Has_Pragma_Pure", Flag203 (Id));
7928 W ("Has_Pragma_Pure_Function", Flag179 (Id));
7929 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
7930 W ("Has_Pragma_Unmodified", Flag233 (Id));
7931 W ("Has_Pragma_Unreferenced", Flag180 (Id));
7932 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
7933 W ("Has_Predicates", Flag250 (Id));
7934 W ("Has_Primitive_Operations", Flag120 (Id));
7935 W ("Has_Private_Ancestor", Flag151 (Id));
7936 W ("Has_Private_Declaration", Flag155 (Id));
7937 W ("Has_Qualified_Name", Flag161 (Id));
7938 W ("Has_RACW", Flag214 (Id));
7939 W ("Has_Record_Rep_Clause", Flag65 (Id));
7940 W ("Has_Recursive_Call", Flag143 (Id));
7941 W ("Has_Size_Clause", Flag29 (Id));
7942 W ("Has_Small_Clause", Flag67 (Id));
7943 W ("Has_Specified_Layout", Flag100 (Id));
7944 W ("Has_Specified_Stream_Input", Flag190 (Id));
7945 W ("Has_Specified_Stream_Output", Flag191 (Id));
7946 W ("Has_Specified_Stream_Read", Flag192 (Id));
7947 W ("Has_Specified_Stream_Write", Flag193 (Id));
7948 W ("Has_Static_Discriminants", Flag211 (Id));
7949 W ("Has_Static_Predicate_Aspect", Flag259 (Id));
7950 W ("Has_Storage_Size_Clause", Flag23 (Id));
7951 W ("Has_Stream_Size_Clause", Flag184 (Id));
7952 W ("Has_Task", Flag30 (Id));
7953 W ("Has_Thunks", Flag228 (Id));
7954 W ("Has_Unchecked_Union", Flag123 (Id));
7955 W ("Has_Unknown_Discriminants", Flag72 (Id));
7956 W ("Has_Up_Level_Access", Flag215 (Id));
7957 W ("Has_Volatile_Components", Flag87 (Id));
7958 W ("Has_Xref_Entry", Flag182 (Id));
7959 W ("In_Package_Body", Flag48 (Id));
7960 W ("In_Private_Part", Flag45 (Id));
7961 W ("In_Use", Flag8 (Id));
7962 W ("Is_AST_Entry", Flag132 (Id));
7963 W ("Is_Abstract_Subprogram", Flag19 (Id));
7964 W ("Is_Abstract_Type", Flag146 (Id));
7965 W ("Is_Local_Anonymous_Access", Flag194 (Id));
7966 W ("Is_Access_Constant", Flag69 (Id));
7967 W ("Is_Ada_2005_Only", Flag185 (Id));
7968 W ("Is_Ada_2012_Only", Flag199 (Id));
7969 W ("Is_Aliased", Flag15 (Id));
7970 W ("Is_Asynchronous", Flag81 (Id));
7971 W ("Is_Atomic", Flag85 (Id));
7972 W ("Is_Bit_Packed_Array", Flag122 (Id));
7973 W ("Is_CPP_Class", Flag74 (Id));
7974 W ("Is_Called", Flag102 (Id));
7975 W ("Is_Character_Type", Flag63 (Id));
7976 W ("Is_Child_Unit", Flag73 (Id));
7977 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
7978 W ("Is_Compilation_Unit", Flag149 (Id));
7979 W ("Is_Completely_Hidden", Flag103 (Id));
7980 W ("Is_Concurrent_Record_Type", Flag20 (Id));
7981 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
7982 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
7983 W ("Is_Constrained", Flag12 (Id));
7984 W ("Is_Constructor", Flag76 (Id));
7985 W ("Is_Controlled", Flag42 (Id));
7986 W ("Is_Controlling_Formal", Flag97 (Id));
7987 W ("Is_Descendent_Of_Address", Flag223 (Id));
7988 W ("Is_Discrim_SO_Function", Flag176 (Id));
7989 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
7990 W ("Is_Dispatching_Operation", Flag6 (Id));
7991 W ("Is_Eliminated", Flag124 (Id));
7992 W ("Is_Entry_Formal", Flag52 (Id));
7993 W ("Is_Exported", Flag99 (Id));
7994 W ("Is_First_Subtype", Flag70 (Id));
7995 W ("Is_For_Access_Subtype", Flag118 (Id));
7996 W ("Is_Formal_Subprogram", Flag111 (Id));
7997 W ("Is_Frozen", Flag4 (Id));
7998 W ("Is_Generic_Actual_Type", Flag94 (Id));
7999 W ("Is_Generic_Instance", Flag130 (Id));
8000 W ("Is_Generic_Type", Flag13 (Id));
8001 W ("Is_Hidden", Flag57 (Id));
8002 W ("Is_Hidden_Open_Scope", Flag171 (Id));
8003 W ("Is_Immediately_Visible", Flag7 (Id));
8004 W ("Is_Implementation_Defined", Flag254 (Id));
8005 W ("Is_Imported", Flag24 (Id));
8006 W ("Is_Inlined", Flag11 (Id));
8007 W ("Is_Instantiated", Flag126 (Id));
8008 W ("Is_Interface", Flag186 (Id));
8009 W ("Is_Internal", Flag17 (Id));
8010 W ("Is_Interrupt_Handler", Flag89 (Id));
8011 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
8012 W ("Is_Invariant_Procedure", Flag257 (Id));
8013 W ("Is_Itype", Flag91 (Id));
8014 W ("Is_Known_Non_Null", Flag37 (Id));
8015 W ("Is_Known_Null", Flag204 (Id));
8016 W ("Is_Known_Valid", Flag170 (Id));
8017 W ("Is_Limited_Composite", Flag106 (Id));
8018 W ("Is_Limited_Interface", Flag197 (Id));
8019 W ("Is_Limited_Record", Flag25 (Id));
8020 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
8021 W ("Is_Non_Static_Subtype", Flag109 (Id));
8022 W ("Is_Null_Init_Proc", Flag178 (Id));
8023 W ("Is_Obsolescent", Flag153 (Id));
8024 W ("Is_Only_Out_Parameter", Flag226 (Id));
8025 W ("Is_Optional_Parameter", Flag134 (Id));
8026 W ("Is_Package_Body_Entity", Flag160 (Id));
8027 W ("Is_Packed", Flag51 (Id));
8028 W ("Is_Packed_Array_Type", Flag138 (Id));
8029 W ("Is_Potentially_Use_Visible", Flag9 (Id));
8030 W ("Is_Predicate_Function", Flag255 (Id));
8031 W ("Is_Predicate_Function_M", Flag256 (Id));
8032 W ("Is_Preelaborated", Flag59 (Id));
8033 W ("Is_Primitive", Flag218 (Id));
8034 W ("Is_Primitive_Wrapper", Flag195 (Id));
8035 W ("Is_Private_Composite", Flag107 (Id));
8036 W ("Is_Private_Descendant", Flag53 (Id));
8037 W ("Is_Private_Primitive", Flag245 (Id));
8038 W ("Is_Processed_Transient", Flag252 (Id));
8039 W ("Is_Public", Flag10 (Id));
8040 W ("Is_Pure", Flag44 (Id));
8041 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
8042 W ("Is_RACW_Stub_Type", Flag244 (Id));
8043 W ("Is_Raised", Flag224 (Id));
8044 W ("Is_Remote_Call_Interface", Flag62 (Id));
8045 W ("Is_Remote_Types", Flag61 (Id));
8046 W ("Is_Renaming_Of_Object", Flag112 (Id));
8047 W ("Is_Return_Object", Flag209 (Id));
8048 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
8049 W ("Is_Shared_Passive", Flag60 (Id));
8050 W ("Is_Statically_Allocated", Flag28 (Id));
8051 W ("Is_Tag", Flag78 (Id));
8052 W ("Is_Tagged_Type", Flag55 (Id));
8053 W ("Is_Thunk", Flag225 (Id));
8054 W ("Is_Trivial_Subprogram", Flag235 (Id));
8055 W ("Is_True_Constant", Flag163 (Id));
8056 W ("Is_Unchecked_Union", Flag117 (Id));
8057 W ("Is_Underlying_Record_View", Flag246 (Id));
8058 W ("Is_Unsigned_Type", Flag144 (Id));
8059 W ("Is_VMS_Exception", Flag133 (Id));
8060 W ("Is_Valued_Procedure", Flag127 (Id));
8061 W ("Is_Visible_Formal", Flag206 (Id));
8062 W ("Is_Visible_Lib_Unit", Flag116 (Id));
8063 W ("Is_Volatile", Flag16 (Id));
8064 W ("Itype_Printed", Flag202 (Id));
8065 W ("Kill_Elaboration_Checks", Flag32 (Id));
8066 W ("Kill_Range_Checks", Flag33 (Id));
8067 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
8068 W ("Low_Bound_Tested", Flag205 (Id));
8069 W ("Machine_Radix_10", Flag84 (Id));
8070 W ("Materialize_Entity", Flag168 (Id));
8071 W ("May_Inherit_Delayed_Rep_Aspects", Flag262 (Id));
8072 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
8073 W ("Must_Have_Preelab_Init", Flag208 (Id));
8074 W ("Needs_Debug_Info", Flag147 (Id));
8075 W ("Needs_No_Actuals", Flag22 (Id));
8076 W ("Never_Set_In_Source", Flag115 (Id));
8077 W ("No_Pool_Assigned", Flag131 (Id));
8078 W ("No_Return", Flag113 (Id));
8079 W ("No_Strict_Aliasing", Flag136 (Id));
8080 W ("Non_Binary_Modulus", Flag58 (Id));
8081 W ("Nonzero_Is_True", Flag162 (Id));
8082 W ("OK_To_Rename", Flag247 (Id));
8083 W ("OK_To_Reorder_Components", Flag239 (Id));
8084 W ("Optimize_Alignment_Space", Flag241 (Id));
8085 W ("Optimize_Alignment_Time", Flag242 (Id));
8086 W ("Overlays_Constant", Flag243 (Id));
8087 W ("Reachable", Flag49 (Id));
8088 W ("Referenced", Flag156 (Id));
8089 W ("Referenced_As_LHS", Flag36 (Id));
8090 W ("Referenced_As_Out_Parameter", Flag227 (Id));
8091 W ("Renamed_In_Spec", Flag231 (Id));
8092 W ("Requires_Overriding", Flag213 (Id));
8093 W ("Return_Present", Flag54 (Id));
8094 W ("Returns_By_Ref", Flag90 (Id));
8095 W ("Reverse_Bit_Order", Flag164 (Id));
8096 W ("Reverse_Storage_Order", Flag93 (Id));
8097 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
8098 W ("Size_Depends_On_Discriminant", Flag177 (Id));
8099 W ("Size_Known_At_Compile_Time", Flag92 (Id));
8100 W ("Static_Elaboration_Desired", Flag77 (Id));
8101 W ("Strict_Alignment", Flag145 (Id));
8102 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
8103 W ("Suppress_Initialization", Flag105 (Id));
8104 W ("Suppress_Style_Checks", Flag165 (Id));
8105 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
8106 W ("Treat_As_Volatile", Flag41 (Id));
8107 W ("Universal_Aliasing", Flag216 (Id));
8108 W ("Used_As_Generic_Actual", Flag222 (Id));
8109 W ("Uses_Sec_Stack", Flag95 (Id));
8110 W ("Warnings_Off", Flag96 (Id));
8111 W ("Warnings_Off_Used", Flag236 (Id));
8112 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
8113 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
8114 W ("Was_Hidden", Flag196 (Id));
8115 end Write_Entity_Flags;
8117 -----------------------
8118 -- Write_Entity_Info --
8119 -----------------------
8121 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
8123 procedure Write_Attribute (Which : String; Nam : E);
8124 -- Write attribute value with given string name
8126 procedure Write_Kind (Id : Entity_Id);
8127 -- Write Ekind field of entity
8129 ---------------------
8130 -- Write_Attribute --
8131 ---------------------
8133 procedure Write_Attribute (Which : String; Nam : E) is
8137 Write_Int (Int (Nam));
8139 Write_Name (Chars (Nam));
8141 end Write_Attribute;
8147 procedure Write_Kind (Id : Entity_Id) is
8148 K : constant String := Entity_Kind'Image (Ekind (Id));
8152 Write_Str (" Kind ");
8154 if Is_Type (Id) and then Is_Tagged_Type (Id) then
8155 Write_Str ("TAGGED ");
8158 Write_Str (K (3 .. K'Length));
8161 if Is_Type (Id) and then Depends_On_Private (Id) then
8162 Write_Str ("Depends_On_Private ");
8166 -- Start of processing for Write_Entity_Info
8170 Write_Attribute ("Name ", Id);
8171 Write_Int (Int (Id));
8175 Write_Attribute (" Type ", Etype (Id));
8177 Write_Attribute (" Scope ", Scope (Id));
8182 when Discrete_Kind =>
8183 Write_Str ("Bounds: Id = ");
8185 if Present (Scalar_Range (Id)) then
8186 Write_Int (Int (Type_Low_Bound (Id)));
8187 Write_Str (" .. Id = ");
8188 Write_Int (Int (Type_High_Bound (Id)));
8190 Write_Str ("Empty");
8201 (" Component Type ", Component_Type (Id));
8204 Write_Str (" Indexes ");
8206 Index := First_Index (Id);
8207 while Present (Index) loop
8208 Write_Attribute (" ", Etype (Index));
8209 Index := Next_Index (Index);
8217 (" Directly Designated Type ",
8218 Directly_Designated_Type (Id));
8221 when Overloadable_Kind =>
8222 if Present (Homonym (Id)) then
8223 Write_Str (" Homonym ");
8224 Write_Name (Chars (Homonym (Id)));
8226 Write_Int (Int (Homonym (Id)));
8233 if Ekind (Scope (Id)) in Record_Kind then
8235 " Original_Record_Component ",
8236 Original_Record_Component (Id));
8237 Write_Int (Int (Original_Record_Component (Id)));
8241 when others => null;
8243 end Write_Entity_Info;
8245 -----------------------
8246 -- Write_Field6_Name --
8247 -----------------------
8249 procedure Write_Field6_Name (Id : Entity_Id) is
8250 pragma Warnings (Off, Id);
8252 Write_Str ("First_Rep_Item");
8253 end Write_Field6_Name;
8255 -----------------------
8256 -- Write_Field7_Name --
8257 -----------------------
8259 procedure Write_Field7_Name (Id : Entity_Id) is
8260 pragma Warnings (Off, Id);
8262 Write_Str ("Freeze_Node");
8263 end Write_Field7_Name;
8265 -----------------------
8266 -- Write_Field8_Name --
8267 -----------------------
8269 procedure Write_Field8_Name (Id : Entity_Id) is
8273 Write_Str ("Associated_Node_For_Itype");
8276 Write_Str ("Dependent_Instances");
8279 Write_Str ("First_Exit_Statement");
8282 Write_Str ("Hiding_Loop_Variable");
8284 when E_Abstract_State =>
8285 Write_Str ("Integrity_Level");
8289 E_Subprogram_Body =>
8290 Write_Str ("Mechanism");
8294 Write_Str ("Normalized_First_Bit");
8297 Write_Str ("Postcondition_Proc");
8299 when E_Return_Statement =>
8300 Write_Str ("Return_Applies_To");
8303 Write_Str ("Field8??");
8305 end Write_Field8_Name;
8307 -----------------------
8308 -- Write_Field9_Name --
8309 -----------------------
8311 procedure Write_Field9_Name (Id : Entity_Id) is
8315 Write_Str ("Class_Wide_Type");
8318 Write_Str ("Current_Value");
8320 when E_Abstract_State =>
8321 Write_Str ("Refined_State");
8324 E_Generic_Function |
8326 E_Generic_Procedure |
8329 Write_Str ("Renaming_Map");
8332 Write_Str ("Field9??");
8334 end Write_Field9_Name;
8336 ------------------------
8337 -- Write_Field10_Name --
8338 ------------------------
8340 procedure Write_Field10_Name (Id : Entity_Id) is
8343 when Class_Wide_Kind |
8349 Write_Str ("Direct_Primitive_Operations");
8352 Write_Str ("Float_Rep");
8354 when E_In_Parameter |
8356 Write_Str ("Discriminal_Link");
8362 Write_Str ("Handler_Records");
8366 Write_Str ("Normalized_Position_Max");
8369 Write_Str ("Field10??");
8371 end Write_Field10_Name;
8373 ------------------------
8374 -- Write_Field11_Name --
8375 ------------------------
8377 procedure Write_Field11_Name (Id : Entity_Id) is
8381 Write_Str ("Block_Node");
8385 Write_Str ("Component_Bit_Offset");
8388 Write_Str ("Entry_Component");
8390 when E_Enumeration_Literal =>
8391 Write_Str ("Enumeration_Pos");
8395 Write_Str ("Full_View");
8397 when E_Generic_Package =>
8398 Write_Str ("Generic_Homonym");
8404 Write_Str ("Protected_Body_Subprogram");
8407 Write_Str ("Field11??");
8409 end Write_Field11_Name;
8411 ------------------------
8412 -- Write_Field12_Name --
8413 ------------------------
8415 procedure Write_Field12_Name (Id : Entity_Id) is
8419 Write_Str ("Associated_Formal_Package");
8422 Write_Str ("Barrier_Function");
8424 when E_Enumeration_Literal =>
8425 Write_Str ("Enumeration_Rep");
8433 E_In_Out_Parameter |
8437 Write_Str ("Esize");
8441 Write_Str ("Next_Inlined_Subprogram");
8444 Write_Str ("Field12??");
8446 end Write_Field12_Name;
8448 ------------------------
8449 -- Write_Field13_Name --
8450 ------------------------
8452 procedure Write_Field13_Name (Id : Entity_Id) is
8457 Write_Str ("Component_Clause");
8460 Write_Str ("Elaboration_Entity");
8464 Generic_Unit_Kind =>
8465 Write_Str ("Elaboration_Entity");
8469 Write_Str ("Extra_Accessibility");
8472 Write_Str ("RM_Size");
8475 Write_Str ("Field13??");
8477 end Write_Field13_Name;
8479 -----------------------
8480 -- Write_Field14_Name --
8481 -----------------------
8483 procedure Write_Field14_Name (Id : Entity_Id) is
8492 Write_Str ("Alignment");
8496 Write_Str ("First_Optional_Parameter");
8500 Write_Str ("Normalized_Position");
8503 E_Generic_Package =>
8504 Write_Str ("Shadow_Entities");
8507 Write_Str ("Field14??");
8509 end Write_Field14_Name;
8511 ------------------------
8512 -- Write_Field15_Name --
8513 ------------------------
8515 procedure Write_Field15_Name (Id : Entity_Id) is
8518 when E_Discriminant =>
8519 Write_Str ("Discriminant_Number");
8522 Write_Str ("DT_Entry_Count");
8526 Write_Str ("DT_Position");
8528 when E_Protected_Type =>
8529 Write_Str ("Entry_Bodies_Array");
8532 Write_Str ("Entry_Parameters_Type");
8535 Write_Str ("Extra_Formal");
8537 when Enumeration_Kind =>
8538 Write_Str ("Lit_Indexes");
8542 Write_Str ("Related_Instance");
8544 when Decimal_Fixed_Point_Kind =>
8545 Write_Str ("Scale_Value");
8549 Write_Str ("Status_Flag_Or_Transient_Decl");
8553 Write_Str ("Storage_Size_Variable");
8555 when E_String_Literal_Subtype =>
8556 Write_Str ("String_Literal_Low_Bound");
8559 Write_Str ("Field15??");
8561 end Write_Field15_Name;
8563 ------------------------
8564 -- Write_Field16_Name --
8565 ------------------------
8567 procedure Write_Field16_Name (Id : Entity_Id) is
8570 when E_Record_Type |
8571 E_Record_Type_With_Private =>
8572 Write_Str ("Access_Disp_Table");
8574 when E_Record_Subtype |
8575 E_Class_Wide_Subtype =>
8576 Write_Str ("Cloned_Subtype");
8580 Write_Str ("DTC_Entity");
8583 Write_Str ("Entry_Formal");
8588 Write_Str ("First_Private_Entity");
8590 when Enumeration_Kind =>
8591 Write_Str ("Lit_Strings");
8593 when E_String_Literal_Subtype =>
8594 Write_Str ("String_Literal_Length");
8598 Write_Str ("Unset_Reference");
8601 Write_Str ("Field16??");
8603 end Write_Field16_Name;
8605 ------------------------
8606 -- Write_Field17_Name --
8607 ------------------------
8609 procedure Write_Field17_Name (Id : Entity_Id) is
8614 E_Generic_In_Out_Parameter |
8616 Write_Str ("Actual_Subtype");
8619 Write_Str ("Digits_Value");
8621 when E_Discriminant =>
8622 Write_Str ("Discriminal");
8631 E_Generic_Function |
8633 E_Generic_Procedure |
8641 E_Return_Statement |
8643 E_Subprogram_Type =>
8644 Write_Str ("First_Entity");
8647 Write_Str ("First_Index");
8649 when Enumeration_Kind =>
8650 Write_Str ("First_Literal");
8653 Write_Str ("Master_Id");
8655 when Modular_Integer_Kind =>
8656 Write_Str ("Modulus");
8658 when E_Incomplete_Type =>
8659 Write_Str ("Non_Limited_View");
8661 when E_Incomplete_Subtype =>
8662 if From_With_Type (Id) then
8663 Write_Str ("Non_Limited_View");
8667 Write_Str ("Prival");
8670 Write_Str ("Field17??");
8672 end Write_Field17_Name;
8674 ------------------------
8675 -- Write_Field18_Name --
8676 ------------------------
8678 procedure Write_Field18_Name (Id : Entity_Id) is
8681 when E_Enumeration_Literal |
8685 Write_Str ("Alias");
8687 when E_Record_Type =>
8688 Write_Str ("Corresponding_Concurrent_Type");
8690 when E_Subprogram_Body =>
8691 Write_Str ("Corresponding_Protected_Entry");
8693 when Concurrent_Kind =>
8694 Write_Str ("Corresponding_Record_Type");
8699 Write_Str ("Enclosing_Scope");
8701 when E_Entry_Index_Parameter =>
8702 Write_Str ("Entry_Index_Constant");
8704 when E_Class_Wide_Subtype |
8705 E_Access_Protected_Subprogram_Type |
8706 E_Anonymous_Access_Protected_Subprogram_Type |
8707 E_Access_Subprogram_Type |
8709 Write_Str ("Equivalent_Type");
8711 when Fixed_Point_Kind =>
8712 Write_Str ("Delta_Value");
8714 when Incomplete_Or_Private_Kind |
8716 Write_Str ("Private_Dependents");
8719 Write_Str ("Renamed_Object");
8723 E_Generic_Function |
8724 E_Generic_Procedure |
8725 E_Generic_Package =>
8726 Write_Str ("Renamed_Entity");
8729 Write_Str ("Field18??");
8731 end Write_Field18_Name;
8733 -----------------------
8734 -- Write_Field19_Name --
8735 -----------------------
8737 procedure Write_Field19_Name (Id : Entity_Id) is
8741 E_Generic_Package =>
8742 Write_Str ("Body_Entity");
8744 when E_Discriminant =>
8745 Write_Str ("Corresponding_Discriminant");
8748 Write_Str ("Default_Value");
8750 when E_Array_Type =>
8751 Write_Str ("Default_Component_Value");
8753 when E_Record_Type =>
8754 Write_Str ("Parent_Subtype");
8758 Write_Str ("Size_Check_Code");
8760 when E_Package_Body |
8762 Write_Str ("Spec_Entity");
8764 when Private_Kind =>
8765 Write_Str ("Underlying_Full_View");
8767 when E_Function | E_Operator | E_Subprogram_Type =>
8768 Write_Str ("Extra_Accessibility_Of_Result");
8771 Write_Str ("Field19??");
8773 end Write_Field19_Name;
8775 -----------------------
8776 -- Write_Field20_Name --
8777 -----------------------
8779 procedure Write_Field20_Name (Id : Entity_Id) is
8783 Write_Str ("Component_Type");
8785 when E_In_Parameter |
8786 E_Generic_In_Parameter =>
8787 Write_Str ("Default_Value");
8790 Write_Str ("Directly_Designated_Type");
8793 Write_Str ("Discriminant_Checking_Func");
8795 when E_Discriminant =>
8796 Write_Str ("Discriminant_Default_Value");
8805 E_Generic_Function |
8807 E_Generic_Procedure |
8815 E_Return_Statement |
8817 E_Subprogram_Type =>
8818 Write_Str ("Last_Entity");
8822 Write_Str ("Prival_Link");
8825 Write_Str ("Scalar_Range");
8828 Write_Str ("Register_Exception_Call");
8831 Write_Str ("Field20??");
8833 end Write_Field20_Name;
8835 -----------------------
8836 -- Write_Field21_Name --
8837 -----------------------
8839 procedure Write_Field21_Name (Id : Entity_Id) is
8843 Write_Str ("Accept_Address");
8845 when E_In_Parameter =>
8846 Write_Str ("Default_Expr_Function");
8848 when Concurrent_Kind |
8849 Incomplete_Or_Private_Kind |
8853 Write_Str ("Discriminant_Constraint");
8858 E_Generic_Function |
8860 E_Generic_Procedure |
8862 Write_Str ("Interface_Name");
8865 Modular_Integer_Kind =>
8866 Write_Str ("Original_Array_Type");
8868 when Fixed_Point_Kind =>
8869 Write_Str ("Small_Value");
8872 Write_Str ("Field21??");
8874 end Write_Field21_Name;
8876 -----------------------
8877 -- Write_Field22_Name --
8878 -----------------------
8880 procedure Write_Field22_Name (Id : Entity_Id) is
8884 Write_Str ("Associated_Storage_Pool");
8887 Write_Str ("Component_Size");
8889 when E_Record_Type =>
8890 Write_Str ("Corresponding_Remote_Type");
8894 Write_Str ("Original_Record_Component");
8896 when E_Enumeration_Literal =>
8897 Write_Str ("Enumeration_Rep_Expr");
8900 Write_Str ("Exception_Code");
8902 when E_Record_Type_With_Private |
8903 E_Record_Subtype_With_Private |
8906 E_Limited_Private_Type |
8907 E_Limited_Private_Subtype =>
8908 Write_Str ("Private_View");
8911 Write_Str ("Protected_Formal");
8921 E_Generic_Function |
8922 E_Generic_Procedure |
8925 E_Return_Statement |
8928 Write_Str ("Scope_Depth_Value");
8931 Write_Str ("Shared_Var_Procs_Instance");
8934 Write_Str ("Field22??");
8936 end Write_Field22_Name;
8938 ------------------------
8939 -- Write_Field23_Name --
8940 ------------------------
8942 procedure Write_Field23_Name (Id : Entity_Id) is
8945 when E_Discriminant =>
8946 Write_Str ("CR_Discriminant");
8949 Write_Str ("Entry_Cancel_Parameter");
8951 when E_Enumeration_Type =>
8952 Write_Str ("Enum_Pos_To_Rep");
8956 Write_Str ("Extra_Constrained");
8959 Write_Str ("Finalization_Master");
8961 when E_Generic_Function |
8963 E_Generic_Procedure =>
8964 Write_Str ("Inner_Instances");
8967 Write_Str ("Packed_Array_Type");
8970 Write_Str ("Protection_Object");
8972 when Concurrent_Kind |
8973 Incomplete_Or_Private_Kind |
8977 Write_Str ("Stored_Constraint");
8981 if Present (Scope (Id))
8982 and then Is_Protected_Type (Scope (Id))
8984 Write_Str ("Protection_Object");
8986 Write_Str ("Generic_Renamings");
8990 if Is_Generic_Instance (Id) then
8991 Write_Str ("Generic_Renamings");
8993 Write_Str ("Limited_View");
8997 Write_Str ("Field23??");
8999 end Write_Field23_Name;
9001 ------------------------
9002 -- Write_Field24_Name --
9003 ------------------------
9005 procedure Write_Field24_Name (Id : Entity_Id) is
9010 Write_Str ("Finalizer");
9015 Write_Str ("Related_Expression");
9020 Generic_Subprogram_Kind =>
9021 Write_Str ("Contract");
9024 Write_Str ("Field24???");
9026 end Write_Field24_Name;
9028 ------------------------
9029 -- Write_Field25_Name --
9030 ------------------------
9032 procedure Write_Field25_Name (Id : Entity_Id) is
9036 Write_Str ("Abstract_States");
9039 Write_Str ("Debug_Renaming_Link");
9042 Write_Str ("DT_Offset_To_Top_Func");
9046 Write_Str ("Interface_Alias");
9048 when E_Record_Type |
9050 E_Record_Type_With_Private |
9051 E_Record_Subtype_With_Private =>
9052 Write_Str ("Interfaces");
9056 Write_Str ("Related_Array_Object");
9059 Write_Str ("Task_Body_Procedure");
9063 Write_Str ("PPC_Wrapper");
9065 when E_Enumeration_Subtype |
9066 E_Modular_Integer_Subtype |
9067 E_Signed_Integer_Subtype =>
9068 Write_Str ("Static_Predicate");
9071 Write_Str ("Field25??");
9073 end Write_Field25_Name;
9075 ------------------------
9076 -- Write_Field26_Name --
9077 ------------------------
9079 procedure Write_Field26_Name (Id : Entity_Id) is
9082 when E_Record_Type |
9083 E_Record_Type_With_Private =>
9084 Write_Str ("Dispatch_Table_Wrappers");
9086 when E_In_Out_Parameter |
9089 Write_Str ("Last_Assignment");
9091 when E_Access_Subprogram_Type =>
9092 Write_Str ("Original_Access_Type");
9094 when E_Generic_Package |
9096 Write_Str ("Package_Instantiation");
9100 Write_Str ("Related_Type");
9103 Write_Str ("Relative_Deadline_Variable");
9107 Write_Str ("Overridden_Operation");
9110 Write_Str ("Field26??");
9112 end Write_Field26_Name;
9114 ------------------------
9115 -- Write_Field27_Name --
9116 ------------------------
9118 procedure Write_Field27_Name (Id : Entity_Id) is
9123 Write_Str ("Current_Use_Clause");
9128 Write_Str ("Related_Type");
9132 Write_Str ("Wrapped_Entity");
9135 Write_Str ("Field27??");
9137 end Write_Field27_Name;
9139 ------------------------
9140 -- Write_Field28_Name --
9141 ------------------------
9143 procedure Write_Field28_Name (Id : Entity_Id) is
9151 E_Subprogram_Type =>
9152 Write_Str ("Extra_Formals");
9154 when E_Constant | E_Variable =>
9155 Write_Str ("Initialization_Statements");
9157 when E_Record_Type =>
9158 Write_Str ("Underlying_Record_View");
9161 Write_Str ("Field28??");
9163 end Write_Field28_Name;
9165 ------------------------
9166 -- Write_Field29_Name --
9167 ------------------------
9169 procedure Write_Field29_Name (Id : Entity_Id) is
9173 Write_Str ("Subprograms_For_Type");
9176 Write_Str ("Field29??");
9178 end Write_Field29_Name;
9180 ------------------------
9181 -- Write_Field30_Name --
9182 ------------------------
9184 procedure Write_Field30_Name (Id : Entity_Id) is
9188 Write_Str ("Corresponding_Equality");
9191 Write_Str ("Static_Initialization");
9194 Write_Str ("Field30??");
9196 end Write_Field30_Name;
9198 ------------------------
9199 -- Write_Field31_Name --
9200 ------------------------
9202 procedure Write_Field31_Name (Id : Entity_Id) is
9207 Write_Str ("Thunk_Entity");
9210 Write_Str ("Field31??");
9212 end Write_Field31_Name;
9214 ------------------------
9215 -- Write_Field32_Name --
9216 ------------------------
9218 procedure Write_Field32_Name (Id : Entity_Id) is
9222 E_Generic_Function |
9224 E_Generic_Procedure |
9228 E_Subprogram_Body =>
9229 Write_Str ("SPARK_Mode_Pragmas");
9232 Write_Str ("Field32??");
9234 end Write_Field32_Name;
9236 ------------------------
9237 -- Write_Field33_Name --
9238 ------------------------
9240 procedure Write_Field33_Name (Id : Entity_Id) is
9244 Write_Str ("Field33??");
9246 end Write_Field33_Name;
9248 ------------------------
9249 -- Write_Field34_Name --
9250 ------------------------
9252 procedure Write_Field34_Name (Id : Entity_Id) is
9256 Write_Str ("Field34??");
9258 end Write_Field34_Name;
9260 ------------------------
9261 -- Write_Field35_Name --
9262 ------------------------
9264 procedure Write_Field35_Name (Id : Entity_Id) is
9268 Write_Str ("Field35??");
9270 end Write_Field35_Name;
9272 -------------------------
9273 -- Iterator Procedures --
9274 -------------------------
9276 procedure Proc_Next_Component (N : in out Node_Id) is
9278 N := Next_Component (N);
9279 end Proc_Next_Component;
9281 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
9283 N := Next_Entity (N);
9284 while Present (N) loop
9285 exit when Ekind_In (N, E_Component, E_Discriminant);
9286 N := Next_Entity (N);
9288 end Proc_Next_Component_Or_Discriminant;
9290 procedure Proc_Next_Discriminant (N : in out Node_Id) is
9292 N := Next_Discriminant (N);
9293 end Proc_Next_Discriminant;
9295 procedure Proc_Next_Formal (N : in out Node_Id) is
9297 N := Next_Formal (N);
9298 end Proc_Next_Formal;
9300 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
9302 N := Next_Formal_With_Extras (N);
9303 end Proc_Next_Formal_With_Extras;
9305 procedure Proc_Next_Index (N : in out Node_Id) is
9307 N := Next_Index (N);
9308 end Proc_Next_Index;
9310 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
9312 N := Next_Inlined_Subprogram (N);
9313 end Proc_Next_Inlined_Subprogram;
9315 procedure Proc_Next_Literal (N : in out Node_Id) is
9317 N := Next_Literal (N);
9318 end Proc_Next_Literal;
9320 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
9322 N := Next_Stored_Discriminant (N);
9323 end Proc_Next_Stored_Discriminant;