1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. --
18 -- As a special exception under Section 7 of GPL version 3, you are granted --
19 -- additional permissions described in the GCC Runtime Library Exception, --
20 -- version 3.1, as published by the Free Software Foundation. --
22 -- You should have received a copy of the GNU General Public License and --
23 -- a copy of the GCC Runtime Library Exception along with this program; --
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
25 -- <http://www.gnu.org/licenses/>. --
27 -- GNAT was originally developed by the GNAT team at New York University. --
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
30 ------------------------------------------------------------------------------
32 pragma Style_Checks (All_Checks);
33 -- Turn off subprogram ordering, not used for this unit
35 with Atree; use Atree;
36 with Elists; use Elists;
37 with Namet; use Namet;
38 with Nlists; use Nlists;
39 with Output; use Output;
40 with Sinfo; use Sinfo;
41 with Stand; use Stand;
45 use Atree.Unchecked_Access;
46 -- This is one of the packages that is allowed direct untyped access to
47 -- the fields in a node, since it provides the next level abstraction
48 -- which incorporates appropriate checks.
50 ----------------------------------------------
51 -- Usage of Fields in Defining Entity Nodes --
52 ----------------------------------------------
54 -- Four of these fields are defined in Sinfo, since they in are the base
55 -- part of the node. The access routines for these four fields and the
56 -- corresponding set procedures are defined in Sinfo. These fields are
57 -- present in all entities. Note that Homonym is also in the base part of
58 -- the node, but has access routines that are more properly part of Einfo,
59 -- which is why they are defined here.
66 -- Remaining fields are present only in extended nodes (i.e. entities)
68 -- The following fields are present in all entities
71 -- First_Rep_Item Node6
74 -- The usage of other fields (and the entity kinds to which it applies)
75 -- depends on the particular field (see Einfo spec for details).
77 -- Associated_Node_For_Itype Node8
78 -- Dependent_Instances Elist8
79 -- Hiding_Loop_Variable Node8
80 -- Mechanism Uint8 (but returns Mechanism_Type)
81 -- Normalized_First_Bit Uint8
82 -- Postcondition_Proc Node8
83 -- Refinement_Constituents Elist8
84 -- Return_Applies_To Node8
85 -- First_Exit_Statement Node8
87 -- Class_Wide_Type Node9
88 -- Current_Value Node9
91 -- Direct_Primitive_Operations Elist10
92 -- Discriminal_Link Node10
93 -- Float_Rep Uint10 (but returns Float_Rep_Kind)
94 -- Handler_Records List10
95 -- Normalized_Position_Max Uint10
96 -- Refined_State Node10
98 -- Component_Bit_Offset Uint11
100 -- Entry_Component Node11
101 -- Enumeration_Pos Uint11
102 -- Generic_Homonym Node11
103 -- Protected_Body_Subprogram Node11
106 -- Barrier_Function Node12
107 -- Enumeration_Rep Uint12
109 -- Next_Inlined_Subprogram Node12
111 -- Component_Clause Node13
112 -- Elaboration_Entity Node13
113 -- Extra_Accessibility Node13
117 -- First_Optional_Parameter Node14
118 -- Normalized_Position Uint14
119 -- Shadow_Entities List14
121 -- Discriminant_Number Uint15
122 -- DT_Position Uint15
123 -- DT_Entry_Count Uint15
124 -- Entry_Bodies_Array Node15
125 -- Entry_Parameters_Type Node15
126 -- Extra_Formal Node15
127 -- Lit_Indexes Node15
128 -- Related_Instance Node15
129 -- Status_Flag_Or_Transient_Decl Node15
130 -- Scale_Value Uint15
131 -- Storage_Size_Variable Node15
132 -- String_Literal_Low_Bound Node15
134 -- Access_Disp_Table Elist16
135 -- Body_References Elist16
136 -- Cloned_Subtype Node16
138 -- Entry_Formal Node16
139 -- First_Private_Entity Node16
140 -- Lit_Strings Node16
141 -- String_Literal_Length Uint16
142 -- Unset_Reference Node16
144 -- Actual_Subtype Node17
145 -- Digits_Value Uint17
146 -- Discriminal Node17
147 -- First_Entity Node17
148 -- First_Index Node17
149 -- First_Literal Node17
152 -- Non_Limited_View Node17
156 -- Corresponding_Concurrent_Type Node18
157 -- Corresponding_Protected_Entry Node18
158 -- Corresponding_Record_Type Node18
159 -- Delta_Value Ureal18
160 -- Enclosing_Scope Node18
161 -- Equivalent_Type Node18
162 -- Private_Dependents Elist18
163 -- Renamed_Entity Node18
164 -- Renamed_Object Node18
166 -- Body_Entity Node19
167 -- Corresponding_Discriminant Node19
168 -- Default_Aspect_Component_Value Node19
169 -- Default_Aspect_Value Node19
170 -- Extra_Accessibility_Of_Result Node19
171 -- Parent_Subtype Node19
172 -- Size_Check_Code Node19
173 -- Spec_Entity Node19
174 -- Underlying_Full_View Node19
176 -- Component_Type Node20
177 -- Default_Value Node20
178 -- Directly_Designated_Type Node20
179 -- Discriminant_Checking_Func Node20
180 -- Discriminant_Default_Value Node20
181 -- Last_Entity Node20
182 -- Prival_Link Node20
183 -- Register_Exception_Call Node20
184 -- Scalar_Range Node20
186 -- Accept_Address Elist21
187 -- Default_Expr_Function Node21
188 -- Discriminant_Constraint Elist21
189 -- Interface_Name Node21
190 -- Original_Array_Type Node21
191 -- Small_Value Ureal21
193 -- Associated_Storage_Pool Node22
194 -- Component_Size Uint22
195 -- Corresponding_Remote_Type Node22
196 -- Enumeration_Rep_Expr Node22
197 -- Exception_Code Uint22
198 -- Original_Record_Component Node22
199 -- Private_View Node22
200 -- Protected_Formal Node22
201 -- Scope_Depth_Value Uint22
202 -- Shared_Var_Procs_Instance Node22
204 -- CR_Discriminant Node23
205 -- Entry_Cancel_Parameter Node23
206 -- Enum_Pos_To_Rep Node23
207 -- Extra_Constrained Node23
208 -- Finalization_Master Node23
209 -- Generic_Renamings Elist23
210 -- Inner_Instances Elist23
211 -- Limited_View Node23
212 -- Packed_Array_Type Node23
213 -- Protection_Object Node23
214 -- Stored_Constraint Elist23
216 -- Related_Expression Node24
218 -- Interface_Alias Node25
219 -- Interfaces Elist25
220 -- Debug_Renaming_Link Node25
221 -- DT_Offset_To_Top_Func Node25
222 -- PPC_Wrapper Node25
223 -- Related_Array_Object Node25
224 -- Static_Predicate List25
225 -- Task_Body_Procedure Node25
227 -- Dispatch_Table_Wrappers Elist26
228 -- Last_Assignment Node26
229 -- Original_Access_Type Node26
230 -- Overridden_Operation Node26
231 -- Package_Instantiation Node26
232 -- Relative_Deadline_Variable Node26
234 -- Current_Use_Clause Node27
235 -- Related_Type Node27
236 -- Wrapped_Entity Node27
238 -- Extra_Formals Node28
240 -- Initialization_Statements Node28
241 -- Underlying_Record_View Node28
243 -- Subprograms_For_Type Node29
245 -- Corresponding_Equality Node30
246 -- Static_Initialization Node30
248 -- Thunk_Entity Node31
250 -- SPARK_Pragma Node32
252 -- SPARK_Aux_Pragma Node33
258 ---------------------------------------------
259 -- Usage of Flags in Defining Entity Nodes --
260 ---------------------------------------------
262 -- All flags are unique, there is no overlaying, so each flag is physically
263 -- present in every entity. However, for many of the flags, it only makes
264 -- sense for them to be set true for certain subsets of entity kinds. See
265 -- the spec of Einfo for further details.
267 -- Note: Flag1-Flag3 are not used, for historical reasons
270 -- Has_Discriminants Flag5
271 -- Is_Dispatching_Operation Flag6
272 -- Is_Immediately_Visible Flag7
274 -- Is_Potentially_Use_Visible Flag9
278 -- Is_Constrained Flag12
279 -- Is_Generic_Type Flag13
280 -- Depends_On_Private Flag14
282 -- Is_Volatile Flag16
283 -- Is_Internal Flag17
284 -- Has_Delayed_Freeze Flag18
285 -- Is_Abstract_Subprogram Flag19
286 -- Is_Concurrent_Record_Type Flag20
288 -- Has_Master_Entity Flag21
289 -- Needs_No_Actuals Flag22
290 -- Has_Storage_Size_Clause Flag23
291 -- Is_Imported Flag24
292 -- Is_Limited_Record Flag25
293 -- Has_Completion Flag26
294 -- Has_Pragma_Controlled Flag27
295 -- Is_Statically_Allocated Flag28
296 -- Has_Size_Clause Flag29
299 -- Checks_May_Be_Suppressed Flag31
300 -- Kill_Elaboration_Checks Flag32
301 -- Kill_Range_Checks Flag33
302 -- Has_Independent_Components Flag34
303 -- Is_Class_Wide_Equivalent_Type Flag35
304 -- Referenced_As_LHS Flag36
305 -- Is_Known_Non_Null Flag37
306 -- Can_Never_Be_Null Flag38
307 -- Has_Default_Aspect Flag39
308 -- Body_Needed_For_SAL Flag40
310 -- Treat_As_Volatile Flag41
311 -- Is_Controlled Flag42
312 -- Has_Controlled_Component Flag43
314 -- In_Private_Part Flag45
315 -- Has_Alignment_Clause Flag46
317 -- In_Package_Body Flag48
319 -- Delay_Subprogram_Descriptors Flag50
322 -- Is_Entry_Formal Flag52
323 -- Is_Private_Descendant Flag53
324 -- Return_Present Flag54
325 -- Is_Tagged_Type Flag55
326 -- Has_Homonym Flag56
328 -- Non_Binary_Modulus Flag58
329 -- Is_Preelaborated Flag59
330 -- Is_Shared_Passive Flag60
332 -- Is_Remote_Types Flag61
333 -- Is_Remote_Call_Interface Flag62
334 -- Is_Character_Type Flag63
335 -- Is_Intrinsic_Subprogram Flag64
336 -- Has_Record_Rep_Clause Flag65
337 -- Has_Enumeration_Rep_Clause Flag66
338 -- Has_Small_Clause Flag67
339 -- Has_Component_Size_Clause Flag68
340 -- Is_Access_Constant Flag69
341 -- Is_First_Subtype Flag70
343 -- Has_Completion_In_Body Flag71
344 -- Has_Unknown_Discriminants Flag72
345 -- Is_Child_Unit Flag73
346 -- Is_CPP_Class Flag74
347 -- Has_Non_Standard_Rep Flag75
348 -- Is_Constructor Flag76
349 -- Static_Elaboration_Desired Flag77
351 -- Has_All_Calls_Remote Flag79
352 -- Is_Constr_Subt_For_U_Nominal Flag80
354 -- Is_Asynchronous Flag81
355 -- Has_Gigi_Rep_Item Flag82
356 -- Has_Machine_Radix_Clause Flag83
357 -- Machine_Radix_10 Flag84
359 -- Has_Atomic_Components Flag86
360 -- Has_Volatile_Components Flag87
361 -- Discard_Names Flag88
362 -- Is_Interrupt_Handler Flag89
363 -- Returns_By_Ref Flag90
366 -- Size_Known_At_Compile_Time Flag92
367 -- Reverse_Storage_Order Flag93
368 -- Is_Generic_Actual_Type Flag94
369 -- Uses_Sec_Stack Flag95
370 -- Warnings_Off Flag96
371 -- Is_Controlling_Formal Flag97
372 -- Has_Controlling_Result Flag98
373 -- Is_Exported Flag99
374 -- Has_Specified_Layout Flag100
376 -- Has_Nested_Block_With_Handler Flag101
378 -- Is_Completely_Hidden Flag103
379 -- Address_Taken Flag104
380 -- Suppress_Initialization Flag105
381 -- Is_Limited_Composite Flag106
382 -- Is_Private_Composite Flag107
383 -- Default_Expressions_Processed Flag108
384 -- Is_Non_Static_Subtype Flag109
385 -- Has_External_Tag_Rep_Clause Flag110
387 -- Is_Formal_Subprogram Flag111
388 -- Is_Renaming_Of_Object Flag112
390 -- Delay_Cleanups Flag114
391 -- Never_Set_In_Source Flag115
392 -- Is_Visible_Lib_Unit Flag116
393 -- Is_Unchecked_Union Flag117
394 -- Is_For_Access_Subtype Flag118
395 -- Has_Convention_Pragma Flag119
396 -- Has_Primitive_Operations Flag120
398 -- Has_Pragma_Pack Flag121
399 -- Is_Bit_Packed_Array Flag122
400 -- Has_Unchecked_Union Flag123
401 -- Is_Eliminated Flag124
402 -- C_Pass_By_Copy Flag125
403 -- Is_Instantiated Flag126
404 -- Is_Valued_Procedure Flag127
405 -- (used for Component_Alignment) Flag128
406 -- (used for Component_Alignment) Flag129
407 -- Is_Generic_Instance Flag130
409 -- No_Pool_Assigned Flag131
410 -- Is_AST_Entry Flag132
411 -- Is_VMS_Exception Flag133
412 -- Is_Optional_Parameter Flag134
413 -- Has_Aliased_Components Flag135
414 -- No_Strict_Aliasing Flag136
415 -- Is_Machine_Code_Subprogram Flag137
416 -- Is_Packed_Array_Type Flag138
417 -- Has_Biased_Representation Flag139
418 -- Has_Complex_Representation Flag140
420 -- Is_Constr_Subt_For_UN_Aliased Flag141
421 -- Has_Missing_Return Flag142
422 -- Has_Recursive_Call Flag143
423 -- Is_Unsigned_Type Flag144
424 -- Strict_Alignment Flag145
425 -- Is_Abstract_Type Flag146
426 -- Needs_Debug_Info Flag147
427 -- Suppress_Elaboration_Warnings Flag148
428 -- Is_Compilation_Unit Flag149
429 -- Has_Pragma_Elaborate_Body Flag150
431 -- Has_Private_Ancestor Flag151
432 -- Entry_Accepted Flag152
433 -- Is_Obsolescent Flag153
434 -- Has_Per_Object_Constraint Flag154
435 -- Has_Private_Declaration Flag155
436 -- Referenced Flag156
437 -- Has_Pragma_Inline Flag157
438 -- Finalize_Storage_Only Flag158
439 -- From_Limited_With Flag159
440 -- Is_Package_Body_Entity Flag160
442 -- Has_Qualified_Name Flag161
443 -- Nonzero_Is_True Flag162
444 -- Is_True_Constant Flag163
445 -- Reverse_Bit_Order Flag164
446 -- Suppress_Style_Checks Flag165
447 -- Debug_Info_Off Flag166
448 -- Sec_Stack_Needed_For_Return Flag167
449 -- Materialize_Entity Flag168
450 -- Has_Pragma_Thread_Local_Storage Flag169
451 -- Is_Known_Valid Flag170
453 -- Is_Hidden_Open_Scope Flag171
454 -- Has_Object_Size_Clause Flag172
455 -- Has_Fully_Qualified_Name Flag173
456 -- Elaboration_Entity_Required Flag174
457 -- Has_Forward_Instantiation Flag175
458 -- Is_Discrim_SO_Function Flag176
459 -- Size_Depends_On_Discriminant Flag177
460 -- Is_Null_Init_Proc Flag178
461 -- Has_Pragma_Pure_Function Flag179
462 -- Has_Pragma_Unreferenced Flag180
464 -- Has_Contiguous_Rep Flag181
465 -- Has_Xref_Entry Flag182
466 -- Must_Be_On_Byte_Boundary Flag183
467 -- Has_Stream_Size_Clause Flag184
468 -- Is_Ada_2005_Only Flag185
469 -- Is_Interface Flag186
470 -- Has_Constrained_Partial_View Flag187
471 -- Uses_Lock_Free Flag188
472 -- Is_Pure_Unit_Access_Type Flag189
473 -- Has_Specified_Stream_Input Flag190
475 -- Has_Specified_Stream_Output Flag191
476 -- Has_Specified_Stream_Read Flag192
477 -- Has_Specified_Stream_Write Flag193
478 -- Is_Local_Anonymous_Access Flag194
479 -- Is_Primitive_Wrapper Flag195
480 -- Was_Hidden Flag196
481 -- Is_Limited_Interface Flag197
482 -- Has_Pragma_Ordered Flag198
483 -- Is_Ada_2012_Only Flag199
485 -- Has_Delayed_Aspects Flag200
486 -- Has_Pragma_No_Inline Flag201
487 -- Itype_Printed Flag202
488 -- Has_Pragma_Pure Flag203
489 -- Is_Known_Null Flag204
490 -- Low_Bound_Tested Flag205
491 -- Is_Visible_Formal Flag206
492 -- Known_To_Have_Preelab_Init Flag207
493 -- Must_Have_Preelab_Init Flag208
494 -- Is_Return_Object Flag209
495 -- Elaborate_Body_Desirable Flag210
497 -- Has_Static_Discriminants Flag211
498 -- Has_Pragma_Unreferenced_Objects Flag212
499 -- Requires_Overriding Flag213
501 -- Has_Up_Level_Access Flag215
502 -- Universal_Aliasing Flag216
503 -- Suppress_Value_Tracking_On_Call Flag217
504 -- Is_Primitive Flag218
505 -- Has_Initial_Value Flag219
506 -- Has_Dispatch_Table Flag220
508 -- Has_Pragma_Preelab_Init Flag221
509 -- Used_As_Generic_Actual Flag222
510 -- Is_Descendent_Of_Address Flag223
513 -- Is_Only_Out_Parameter Flag226
514 -- Referenced_As_Out_Parameter Flag227
515 -- Has_Thunks Flag228
516 -- Can_Use_Internal_Rep Flag229
517 -- Has_Pragma_Inline_Always Flag230
519 -- Renamed_In_Spec Flag231
520 -- Has_Invariants Flag232
521 -- Has_Pragma_Unmodified Flag233
522 -- Is_Dispatch_Table_Entity Flag234
523 -- Is_Trivial_Subprogram Flag235
524 -- Warnings_Off_Used Flag236
525 -- Warnings_Off_Used_Unmodified Flag237
526 -- Warnings_Off_Used_Unreferenced Flag238
527 -- OK_To_Reorder_Components Flag239
528 -- Has_Postconditions Flag240
530 -- Optimize_Alignment_Space Flag241
531 -- Optimize_Alignment_Time Flag242
532 -- Overlays_Constant Flag243
533 -- Is_RACW_Stub_Type Flag244
534 -- Is_Private_Primitive Flag245
535 -- Is_Underlying_Record_View Flag246
536 -- OK_To_Rename Flag247
537 -- Has_Inheritable_Invariants Flag248
538 -- Is_Safe_To_Reevaluate Flag249
539 -- Has_Predicates Flag250
541 -- Has_Implicit_Dereference Flag251
542 -- Is_Processed_Transient Flag252
543 -- Has_Anonymous_Master Flag253
544 -- Is_Implementation_Defined Flag254
545 -- Is_Predicate_Function Flag255
546 -- Is_Predicate_Function_M Flag256
547 -- Is_Invariant_Procedure Flag257
548 -- Has_Dynamic_Predicate_Aspect Flag258
549 -- Has_Static_Predicate_Aspect Flag259
550 -- Has_Loop_Entry_Attributes Flag260
552 -- Has_Delayed_Rep_Aspects Flag261
553 -- May_Inherit_Delayed_Rep_Aspects Flag262
554 -- Has_Visible_Refinement Flag263
555 -- Has_Body_References Flag264
556 -- SPARK_Pragma_Inherited Flag265
557 -- SPARK_Aux_Pragma_Inherited Flag266
582 -- Note: Flag287-317 are defined in atree.ads/adb, but not yet in atree.h
584 -----------------------
585 -- Local subprograms --
586 -----------------------
590 Opt_Nam : Name_Id) return Boolean;
591 -- Determine whether abstract state State has a particular option denoted
592 -- by the name Opt_Nam.
598 function Float_Rep (Id : E) return F is
599 pragma Assert (Is_Floating_Point_Type (Id));
601 return F'Val (UI_To_Int (Uint10 (Base_Type (Id))));
610 Opt_Nam : Name_Id) return Boolean
612 Par : constant Node_Id := Parent (State);
616 pragma Assert (Ekind (State) = E_Abstract_State);
618 -- States with options appear as extension aggregates in the tree
620 if Nkind (Par) = N_Extension_Aggregate then
621 if Opt_Nam = Name_Part_Of then
622 return Present (Component_Associations (Par));
625 Opt := First (Expressions (Par));
626 while Present (Opt) loop
627 if Chars (Opt) = Opt_Nam then
639 --------------------------------
640 -- Attribute Access Functions --
641 --------------------------------
643 function Abstract_States (Id : E) return L is
645 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
649 function Accept_Address (Id : E) return L is
654 function Access_Disp_Table (Id : E) return L is
656 pragma Assert (Ekind_In (Id, E_Record_Type,
658 return Elist16 (Implementation_Base_Type (Id));
659 end Access_Disp_Table;
661 function Actual_Subtype (Id : E) return E is
664 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
665 or else Is_Formal (Id));
669 function Address_Taken (Id : E) return B is
674 function Alias (Id : E) return E is
677 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
681 function Alignment (Id : E) return U is
683 pragma Assert (Is_Type (Id)
684 or else Is_Formal (Id)
685 or else Ekind_In (Id, E_Loop_Parameter,
692 function Associated_Formal_Package (Id : E) return E is
694 pragma Assert (Ekind (Id) = E_Package);
696 end Associated_Formal_Package;
698 function Associated_Node_For_Itype (Id : E) return N is
701 end Associated_Node_For_Itype;
703 function Associated_Storage_Pool (Id : E) return E is
705 pragma Assert (Is_Access_Type (Id));
706 return Node22 (Root_Type (Id));
707 end Associated_Storage_Pool;
709 function Barrier_Function (Id : E) return N is
711 pragma Assert (Is_Entry (Id));
713 end Barrier_Function;
715 function Block_Node (Id : E) return N is
717 pragma Assert (Ekind (Id) = E_Block);
721 function Body_Entity (Id : E) return E is
723 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
727 function Body_Needed_For_SAL (Id : E) return B is
730 (Ekind (Id) = E_Package
731 or else Is_Subprogram (Id)
732 or else Is_Generic_Unit (Id));
734 end Body_Needed_For_SAL;
736 function Body_References (Id : E) return L is
738 pragma Assert (Ekind (Id) = E_Abstract_State);
742 function C_Pass_By_Copy (Id : E) return B is
744 pragma Assert (Is_Record_Type (Id));
745 return Flag125 (Implementation_Base_Type (Id));
748 function Can_Never_Be_Null (Id : E) return B is
751 end Can_Never_Be_Null;
753 function Checks_May_Be_Suppressed (Id : E) return B is
756 end Checks_May_Be_Suppressed;
758 function Class_Wide_Type (Id : E) return E is
760 pragma Assert (Is_Type (Id));
764 function Cloned_Subtype (Id : E) return E is
766 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
770 function Component_Bit_Offset (Id : E) return U is
772 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
774 end Component_Bit_Offset;
776 function Component_Clause (Id : E) return N is
778 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
780 end Component_Clause;
782 function Component_Size (Id : E) return U is
784 pragma Assert (Is_Array_Type (Id));
785 return Uint22 (Implementation_Base_Type (Id));
788 function Component_Type (Id : E) return E is
790 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
791 return Node20 (Implementation_Base_Type (Id));
794 function Corresponding_Concurrent_Type (Id : E) return E is
796 pragma Assert (Ekind (Id) = E_Record_Type);
798 end Corresponding_Concurrent_Type;
800 function Corresponding_Discriminant (Id : E) return E is
802 pragma Assert (Ekind (Id) = E_Discriminant);
804 end Corresponding_Discriminant;
806 function Corresponding_Equality (Id : E) return E is
809 (Ekind (Id) = E_Function
810 and then not Comes_From_Source (Id)
811 and then Chars (Id) = Name_Op_Ne);
813 end Corresponding_Equality;
815 function Corresponding_Protected_Entry (Id : E) return E is
817 pragma Assert (Ekind (Id) = E_Subprogram_Body);
819 end Corresponding_Protected_Entry;
821 function Corresponding_Record_Type (Id : E) return E is
823 pragma Assert (Is_Concurrent_Type (Id));
825 end Corresponding_Record_Type;
827 function Corresponding_Remote_Type (Id : E) return E is
830 end Corresponding_Remote_Type;
832 function Current_Use_Clause (Id : E) return E is
834 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
836 end Current_Use_Clause;
838 function Current_Value (Id : E) return N is
840 pragma Assert (Ekind (Id) in Object_Kind);
844 function CR_Discriminant (Id : E) return E is
849 function Debug_Info_Off (Id : E) return B is
854 function Debug_Renaming_Link (Id : E) return E is
857 end Debug_Renaming_Link;
859 function Default_Aspect_Component_Value (Id : E) return N is
861 pragma Assert (Is_Array_Type (Id));
862 return Node19 (Base_Type (Id));
863 end Default_Aspect_Component_Value;
865 function Default_Aspect_Value (Id : E) return N is
867 pragma Assert (Is_Scalar_Type (Id));
868 return Node19 (Base_Type (Id));
869 end Default_Aspect_Value;
871 function Default_Expr_Function (Id : E) return E is
873 pragma Assert (Is_Formal (Id));
875 end Default_Expr_Function;
877 function Default_Expressions_Processed (Id : E) return B is
880 end Default_Expressions_Processed;
882 function Default_Value (Id : E) return N is
884 pragma Assert (Is_Formal (Id));
888 function Delay_Cleanups (Id : E) return B is
893 function Delay_Subprogram_Descriptors (Id : E) return B is
896 end Delay_Subprogram_Descriptors;
898 function Delta_Value (Id : E) return R is
900 pragma Assert (Is_Fixed_Point_Type (Id));
904 function Dependent_Instances (Id : E) return L is
906 pragma Assert (Is_Generic_Instance (Id));
908 end Dependent_Instances;
910 function Depends_On_Private (Id : E) return B is
912 pragma Assert (Nkind (Id) in N_Entity);
914 end Depends_On_Private;
916 function Digits_Value (Id : E) return U is
919 (Is_Floating_Point_Type (Id)
920 or else Is_Decimal_Fixed_Point_Type (Id));
924 function Direct_Primitive_Operations (Id : E) return L is
926 pragma Assert (Is_Tagged_Type (Id));
928 end Direct_Primitive_Operations;
930 function Directly_Designated_Type (Id : E) return E is
932 pragma Assert (Is_Access_Type (Id));
934 end Directly_Designated_Type;
936 function Discard_Names (Id : E) return B is
941 function Discriminal (Id : E) return E is
943 pragma Assert (Ekind (Id) = E_Discriminant);
947 function Discriminal_Link (Id : E) return N is
950 end Discriminal_Link;
952 function Discriminant_Checking_Func (Id : E) return E is
954 pragma Assert (Ekind (Id) = E_Component);
956 end Discriminant_Checking_Func;
958 function Discriminant_Constraint (Id : E) return L is
960 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
962 end Discriminant_Constraint;
964 function Discriminant_Default_Value (Id : E) return N is
966 pragma Assert (Ekind (Id) = E_Discriminant);
968 end Discriminant_Default_Value;
970 function Discriminant_Number (Id : E) return U is
972 pragma Assert (Ekind (Id) = E_Discriminant);
974 end Discriminant_Number;
976 function Dispatch_Table_Wrappers (Id : E) return L is
978 pragma Assert (Ekind_In (Id, E_Record_Type,
980 return Elist26 (Implementation_Base_Type (Id));
981 end Dispatch_Table_Wrappers;
983 function DT_Entry_Count (Id : E) return U is
985 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
989 function DT_Offset_To_Top_Func (Id : E) return E is
991 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
993 end DT_Offset_To_Top_Func;
995 function DT_Position (Id : E) return U is
997 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
998 and then Present (DTC_Entity (Id)));
1002 function DTC_Entity (Id : E) return E is
1004 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1008 function Elaborate_Body_Desirable (Id : E) return B is
1010 pragma Assert (Ekind (Id) = E_Package);
1011 return Flag210 (Id);
1012 end Elaborate_Body_Desirable;
1014 function Elaboration_Entity (Id : E) return E is
1019 Ekind (Id) = E_Package
1021 Is_Generic_Unit (Id));
1023 end Elaboration_Entity;
1025 function Elaboration_Entity_Required (Id : E) return B is
1030 Ekind (Id) = E_Package
1032 Is_Generic_Unit (Id));
1033 return Flag174 (Id);
1034 end Elaboration_Entity_Required;
1036 function Enclosing_Scope (Id : E) return E is
1039 end Enclosing_Scope;
1041 function Entry_Accepted (Id : E) return B is
1043 pragma Assert (Is_Entry (Id));
1044 return Flag152 (Id);
1047 function Entry_Bodies_Array (Id : E) return E is
1050 end Entry_Bodies_Array;
1052 function Entry_Cancel_Parameter (Id : E) return E is
1055 end Entry_Cancel_Parameter;
1057 function Entry_Component (Id : E) return E is
1060 end Entry_Component;
1062 function Entry_Formal (Id : E) return E is
1067 function Entry_Index_Constant (Id : E) return N is
1069 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
1071 end Entry_Index_Constant;
1073 function Contract (Id : E) return N is
1076 (Ekind_In (Id, E_Entry,
1083 or else Is_Generic_Subprogram (Id)
1084 or else Is_Subprogram (Id));
1088 function Entry_Parameters_Type (Id : E) return E is
1091 end Entry_Parameters_Type;
1093 function Enum_Pos_To_Rep (Id : E) return E is
1095 pragma Assert (Ekind (Id) = E_Enumeration_Type);
1097 end Enum_Pos_To_Rep;
1099 function Enumeration_Pos (Id : E) return Uint is
1101 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1103 end Enumeration_Pos;
1105 function Enumeration_Rep (Id : E) return U is
1107 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1109 end Enumeration_Rep;
1111 function Enumeration_Rep_Expr (Id : E) return N is
1113 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1115 end Enumeration_Rep_Expr;
1117 function Equivalent_Type (Id : E) return E is
1120 (Ekind_In (Id, E_Class_Wide_Type,
1121 E_Class_Wide_Subtype,
1122 E_Access_Subprogram_Type,
1123 E_Access_Protected_Subprogram_Type,
1124 E_Anonymous_Access_Protected_Subprogram_Type,
1125 E_Access_Subprogram_Type,
1128 end Equivalent_Type;
1130 function Esize (Id : E) return Uint is
1135 function Exception_Code (Id : E) return Uint is
1137 pragma Assert (Ekind (Id) = E_Exception);
1141 function Extra_Accessibility (Id : E) return E is
1144 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
1146 end Extra_Accessibility;
1148 function Extra_Accessibility_Of_Result (Id : E) return E is
1150 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
1152 end Extra_Accessibility_Of_Result;
1154 function Extra_Constrained (Id : E) return E is
1156 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1158 end Extra_Constrained;
1160 function Extra_Formal (Id : E) return E is
1165 function Extra_Formals (Id : E) return E is
1168 (Is_Overloadable (Id)
1169 or else Ekind_In (Id, E_Entry_Family,
1171 E_Subprogram_Type));
1175 function Can_Use_Internal_Rep (Id : E) return B is
1177 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1178 return Flag229 (Base_Type (Id));
1179 end Can_Use_Internal_Rep;
1181 function Finalization_Master (Id : E) return E is
1183 pragma Assert (Is_Access_Type (Id));
1184 return Node23 (Root_Type (Id));
1185 end Finalization_Master;
1187 function Finalize_Storage_Only (Id : E) return B is
1189 pragma Assert (Is_Type (Id));
1190 return Flag158 (Base_Type (Id));
1191 end Finalize_Storage_Only;
1193 function Finalizer (Id : E) return E is
1195 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
1199 function First_Entity (Id : E) return E is
1204 function First_Exit_Statement (Id : E) return N is
1206 pragma Assert (Ekind (Id) = E_Loop);
1208 end First_Exit_Statement;
1210 function First_Index (Id : E) return N is
1212 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1216 function First_Literal (Id : E) return E is
1218 pragma Assert (Is_Enumeration_Type (Id));
1222 function First_Optional_Parameter (Id : E) return E is
1224 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1226 end First_Optional_Parameter;
1228 function First_Private_Entity (Id : E) return E is
1230 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1231 or else Ekind (Id) in Concurrent_Kind);
1233 end First_Private_Entity;
1235 function First_Rep_Item (Id : E) return E is
1240 function Freeze_Node (Id : E) return N is
1245 function From_Limited_With (Id : E) return B is
1247 return Flag159 (Id);
1248 end From_Limited_With;
1250 function Full_View (Id : E) return E is
1252 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1256 function Generic_Homonym (Id : E) return E is
1258 pragma Assert (Ekind (Id) = E_Generic_Package);
1260 end Generic_Homonym;
1262 function Generic_Renamings (Id : E) return L is
1264 return Elist23 (Id);
1265 end Generic_Renamings;
1267 function Handler_Records (Id : E) return S is
1270 end Handler_Records;
1272 function Has_Aliased_Components (Id : E) return B is
1274 return Flag135 (Implementation_Base_Type (Id));
1275 end Has_Aliased_Components;
1277 function Has_Alignment_Clause (Id : E) return B is
1280 end Has_Alignment_Clause;
1282 function Has_All_Calls_Remote (Id : E) return B is
1285 end Has_All_Calls_Remote;
1287 function Has_Anonymous_Master (Id : E) return B is
1290 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
1291 return Flag253 (Id);
1292 end Has_Anonymous_Master;
1294 function Has_Atomic_Components (Id : E) return B is
1296 return Flag86 (Implementation_Base_Type (Id));
1297 end Has_Atomic_Components;
1299 function Has_Biased_Representation (Id : E) return B is
1301 return Flag139 (Id);
1302 end Has_Biased_Representation;
1304 function Has_Body_References (Id : E) return B is
1306 pragma Assert (Ekind (Id) = E_Abstract_State);
1307 return Flag264 (Id);
1308 end Has_Body_References;
1310 function Has_Completion (Id : E) return B is
1315 function Has_Completion_In_Body (Id : E) return B is
1317 pragma Assert (Is_Type (Id));
1319 end Has_Completion_In_Body;
1321 function Has_Complex_Representation (Id : E) return B is
1323 pragma Assert (Is_Type (Id));
1324 return Flag140 (Implementation_Base_Type (Id));
1325 end Has_Complex_Representation;
1327 function Has_Component_Size_Clause (Id : E) return B is
1329 pragma Assert (Is_Array_Type (Id));
1330 return Flag68 (Implementation_Base_Type (Id));
1331 end Has_Component_Size_Clause;
1333 function Has_Constrained_Partial_View (Id : E) return B is
1335 pragma Assert (Is_Type (Id));
1336 return Flag187 (Id);
1337 end Has_Constrained_Partial_View;
1339 function Has_Controlled_Component (Id : E) return B is
1341 return Flag43 (Base_Type (Id));
1342 end Has_Controlled_Component;
1344 function Has_Contiguous_Rep (Id : E) return B is
1346 return Flag181 (Id);
1347 end Has_Contiguous_Rep;
1349 function Has_Controlling_Result (Id : E) return B is
1352 end Has_Controlling_Result;
1354 function Has_Convention_Pragma (Id : E) return B is
1356 return Flag119 (Id);
1357 end Has_Convention_Pragma;
1359 function Has_Default_Aspect (Id : E) return B is
1361 return Flag39 (Base_Type (Id));
1362 end Has_Default_Aspect;
1364 function Has_Delayed_Aspects (Id : E) return B is
1366 pragma Assert (Nkind (Id) in N_Entity);
1367 return Flag200 (Id);
1368 end Has_Delayed_Aspects;
1370 function Has_Delayed_Freeze (Id : E) return B is
1372 pragma Assert (Nkind (Id) in N_Entity);
1374 end Has_Delayed_Freeze;
1376 function Has_Delayed_Rep_Aspects (Id : E) return B is
1378 pragma Assert (Nkind (Id) in N_Entity);
1379 return Flag261 (Id);
1380 end Has_Delayed_Rep_Aspects;
1382 function Has_Discriminants (Id : E) return B is
1384 pragma Assert (Nkind (Id) in N_Entity);
1386 end Has_Discriminants;
1388 function Has_Dispatch_Table (Id : E) return B is
1390 pragma Assert (Is_Tagged_Type (Id));
1391 return Flag220 (Id);
1392 end Has_Dispatch_Table;
1394 function Has_Dynamic_Predicate_Aspect (Id : E) return B is
1396 pragma Assert (Is_Type (Id));
1397 return Flag258 (Id);
1398 end Has_Dynamic_Predicate_Aspect;
1400 function Has_Enumeration_Rep_Clause (Id : E) return B is
1402 pragma Assert (Is_Enumeration_Type (Id));
1404 end Has_Enumeration_Rep_Clause;
1406 function Has_Exit (Id : E) return B is
1411 function Has_External_Tag_Rep_Clause (Id : E) return B is
1413 pragma Assert (Is_Tagged_Type (Id));
1414 return Flag110 (Id);
1415 end Has_External_Tag_Rep_Clause;
1417 function Has_Forward_Instantiation (Id : E) return B is
1419 return Flag175 (Id);
1420 end Has_Forward_Instantiation;
1422 function Has_Fully_Qualified_Name (Id : E) return B is
1424 return Flag173 (Id);
1425 end Has_Fully_Qualified_Name;
1427 function Has_Gigi_Rep_Item (Id : E) return B is
1430 end Has_Gigi_Rep_Item;
1432 function Has_Homonym (Id : E) return B is
1437 function Has_Implicit_Dereference (Id : E) return B is
1439 return Flag251 (Id);
1440 end Has_Implicit_Dereference;
1442 function Has_Independent_Components (Id : E) return B is
1444 pragma Assert (Is_Object (Id) or else Is_Type (Id));
1446 end Has_Independent_Components;
1448 function Has_Inheritable_Invariants (Id : E) return B is
1450 pragma Assert (Is_Type (Id));
1451 return Flag248 (Id);
1452 end Has_Inheritable_Invariants;
1454 function Has_Initial_Value (Id : E) return B is
1456 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1457 return Flag219 (Id);
1458 end Has_Initial_Value;
1460 function Has_Invariants (Id : E) return B is
1462 pragma Assert (Is_Type (Id));
1463 return Flag232 (Id);
1466 function Has_Loop_Entry_Attributes (Id : E) return B is
1468 pragma Assert (Ekind (Id) = E_Loop);
1469 return Flag260 (Id);
1470 end Has_Loop_Entry_Attributes;
1472 function Has_Machine_Radix_Clause (Id : E) return B is
1474 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1476 end Has_Machine_Radix_Clause;
1478 function Has_Master_Entity (Id : E) return B is
1481 end Has_Master_Entity;
1483 function Has_Missing_Return (Id : E) return B is
1485 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1486 return Flag142 (Id);
1487 end Has_Missing_Return;
1489 function Has_Nested_Block_With_Handler (Id : E) return B is
1491 return Flag101 (Id);
1492 end Has_Nested_Block_With_Handler;
1494 function Has_Non_Standard_Rep (Id : E) return B is
1496 return Flag75 (Implementation_Base_Type (Id));
1497 end Has_Non_Standard_Rep;
1499 function Has_Object_Size_Clause (Id : E) return B is
1501 pragma Assert (Is_Type (Id));
1502 return Flag172 (Id);
1503 end Has_Object_Size_Clause;
1505 function Has_Per_Object_Constraint (Id : E) return B is
1507 return Flag154 (Id);
1508 end Has_Per_Object_Constraint;
1510 function Has_Postconditions (Id : E) return B is
1512 pragma Assert (Is_Subprogram (Id));
1513 return Flag240 (Id);
1514 end Has_Postconditions;
1516 function Has_Pragma_Controlled (Id : E) return B is
1518 pragma Assert (Is_Access_Type (Id));
1519 return Flag27 (Implementation_Base_Type (Id));
1520 end Has_Pragma_Controlled;
1522 function Has_Pragma_Elaborate_Body (Id : E) return B is
1524 return Flag150 (Id);
1525 end Has_Pragma_Elaborate_Body;
1527 function Has_Pragma_Inline (Id : E) return B is
1529 return Flag157 (Id);
1530 end Has_Pragma_Inline;
1532 function Has_Pragma_Inline_Always (Id : E) return B is
1534 return Flag230 (Id);
1535 end Has_Pragma_Inline_Always;
1537 function Has_Pragma_No_Inline (Id : E) return B is
1539 return Flag201 (Id);
1540 end Has_Pragma_No_Inline;
1542 function Has_Pragma_Ordered (Id : E) return B is
1544 pragma Assert (Is_Enumeration_Type (Id));
1545 return Flag198 (Implementation_Base_Type (Id));
1546 end Has_Pragma_Ordered;
1548 function Has_Pragma_Pack (Id : E) return B is
1550 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1551 return Flag121 (Implementation_Base_Type (Id));
1552 end Has_Pragma_Pack;
1554 function Has_Pragma_Preelab_Init (Id : E) return B is
1556 return Flag221 (Id);
1557 end Has_Pragma_Preelab_Init;
1559 function Has_Pragma_Pure (Id : E) return B is
1561 return Flag203 (Id);
1562 end Has_Pragma_Pure;
1564 function Has_Pragma_Pure_Function (Id : E) return B is
1566 return Flag179 (Id);
1567 end Has_Pragma_Pure_Function;
1569 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1571 return Flag169 (Id);
1572 end Has_Pragma_Thread_Local_Storage;
1574 function Has_Pragma_Unmodified (Id : E) return B is
1576 return Flag233 (Id);
1577 end Has_Pragma_Unmodified;
1579 function Has_Pragma_Unreferenced (Id : E) return B is
1581 return Flag180 (Id);
1582 end Has_Pragma_Unreferenced;
1584 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1586 pragma Assert (Is_Type (Id));
1587 return Flag212 (Id);
1588 end Has_Pragma_Unreferenced_Objects;
1590 function Has_Predicates (Id : E) return B is
1592 pragma Assert (Is_Type (Id));
1593 return Flag250 (Id);
1596 function Has_Primitive_Operations (Id : E) return B is
1598 pragma Assert (Is_Type (Id));
1599 return Flag120 (Base_Type (Id));
1600 end Has_Primitive_Operations;
1602 function Has_Private_Ancestor (Id : E) return B is
1604 return Flag151 (Id);
1605 end Has_Private_Ancestor;
1607 function Has_Private_Declaration (Id : E) return B is
1609 return Flag155 (Id);
1610 end Has_Private_Declaration;
1612 function Has_Qualified_Name (Id : E) return B is
1614 return Flag161 (Id);
1615 end Has_Qualified_Name;
1617 function Has_RACW (Id : E) return B is
1619 pragma Assert (Ekind (Id) = E_Package);
1620 return Flag214 (Id);
1623 function Has_Record_Rep_Clause (Id : E) return B is
1625 pragma Assert (Is_Record_Type (Id));
1626 return Flag65 (Implementation_Base_Type (Id));
1627 end Has_Record_Rep_Clause;
1629 function Has_Recursive_Call (Id : E) return B is
1631 pragma Assert (Is_Subprogram (Id));
1632 return Flag143 (Id);
1633 end Has_Recursive_Call;
1635 function Has_Size_Clause (Id : E) return B is
1638 end Has_Size_Clause;
1640 function Has_Small_Clause (Id : E) return B is
1643 end Has_Small_Clause;
1645 function Has_Specified_Layout (Id : E) return B is
1647 pragma Assert (Is_Type (Id));
1648 return Flag100 (Implementation_Base_Type (Id));
1649 end Has_Specified_Layout;
1651 function Has_Specified_Stream_Input (Id : E) return B is
1653 pragma Assert (Is_Type (Id));
1654 return Flag190 (Id);
1655 end Has_Specified_Stream_Input;
1657 function Has_Specified_Stream_Output (Id : E) return B is
1659 pragma Assert (Is_Type (Id));
1660 return Flag191 (Id);
1661 end Has_Specified_Stream_Output;
1663 function Has_Specified_Stream_Read (Id : E) return B is
1665 pragma Assert (Is_Type (Id));
1666 return Flag192 (Id);
1667 end Has_Specified_Stream_Read;
1669 function Has_Specified_Stream_Write (Id : E) return B is
1671 pragma Assert (Is_Type (Id));
1672 return Flag193 (Id);
1673 end Has_Specified_Stream_Write;
1675 function Has_Static_Discriminants (Id : E) return B is
1677 pragma Assert (Is_Type (Id));
1678 return Flag211 (Id);
1679 end Has_Static_Discriminants;
1681 function Has_Static_Predicate_Aspect (Id : E) return B is
1683 pragma Assert (Is_Type (Id));
1684 return Flag259 (Id);
1685 end Has_Static_Predicate_Aspect;
1687 function Has_Storage_Size_Clause (Id : E) return B is
1689 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1690 return Flag23 (Implementation_Base_Type (Id));
1691 end Has_Storage_Size_Clause;
1693 function Has_Stream_Size_Clause (Id : E) return B is
1695 return Flag184 (Id);
1696 end Has_Stream_Size_Clause;
1698 function Has_Task (Id : E) return B is
1700 return Flag30 (Base_Type (Id));
1703 function Has_Thunks (Id : E) return B is
1705 return Flag228 (Id);
1708 function Has_Unchecked_Union (Id : E) return B is
1710 return Flag123 (Base_Type (Id));
1711 end Has_Unchecked_Union;
1713 function Has_Unknown_Discriminants (Id : E) return B is
1715 pragma Assert (Is_Type (Id));
1717 end Has_Unknown_Discriminants;
1719 function Has_Up_Level_Access (Id : E) return B is
1722 (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
1723 return Flag215 (Id);
1724 end Has_Up_Level_Access;
1726 function Has_Visible_Refinement (Id : E) return B is
1728 pragma Assert (Ekind (Id) = E_Abstract_State);
1729 return Flag263 (Id);
1730 end Has_Visible_Refinement;
1732 function Has_Volatile_Components (Id : E) return B is
1734 return Flag87 (Implementation_Base_Type (Id));
1735 end Has_Volatile_Components;
1737 function Has_Xref_Entry (Id : E) return B is
1739 return Flag182 (Id);
1742 function Hiding_Loop_Variable (Id : E) return E is
1744 pragma Assert (Ekind (Id) = E_Variable);
1746 end Hiding_Loop_Variable;
1748 function Homonym (Id : E) return E is
1753 function Interface_Alias (Id : E) return E is
1755 pragma Assert (Is_Subprogram (Id));
1757 end Interface_Alias;
1759 function Interfaces (Id : E) return L is
1761 pragma Assert (Is_Record_Type (Id));
1762 return Elist25 (Id);
1765 function In_Package_Body (Id : E) return B is
1768 end In_Package_Body;
1770 function In_Private_Part (Id : E) return B is
1773 end In_Private_Part;
1775 function In_Use (Id : E) return B is
1777 pragma Assert (Nkind (Id) in N_Entity);
1781 function Initialization_Statements (Id : E) return N is
1783 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
1785 end Initialization_Statements;
1787 function Inner_Instances (Id : E) return L is
1789 return Elist23 (Id);
1790 end Inner_Instances;
1792 function Interface_Name (Id : E) return N is
1797 function Is_Abstract_Subprogram (Id : E) return B is
1799 pragma Assert (Is_Overloadable (Id));
1801 end Is_Abstract_Subprogram;
1803 function Is_Abstract_Type (Id : E) return B is
1805 pragma Assert (Is_Type (Id));
1806 return Flag146 (Id);
1807 end Is_Abstract_Type;
1809 function Is_Local_Anonymous_Access (Id : E) return B is
1811 pragma Assert (Is_Access_Type (Id));
1812 return Flag194 (Id);
1813 end Is_Local_Anonymous_Access;
1815 function Is_Access_Constant (Id : E) return B is
1817 pragma Assert (Is_Access_Type (Id));
1819 end Is_Access_Constant;
1821 function Is_Ada_2005_Only (Id : E) return B is
1823 return Flag185 (Id);
1824 end Is_Ada_2005_Only;
1826 function Is_Ada_2012_Only (Id : E) return B is
1828 return Flag199 (Id);
1829 end Is_Ada_2012_Only;
1831 function Is_Aliased (Id : E) return B is
1833 pragma Assert (Nkind (Id) in N_Entity);
1837 function Is_AST_Entry (Id : E) return B is
1839 pragma Assert (Is_Entry (Id));
1840 return Flag132 (Id);
1843 function Is_Asynchronous (Id : E) return B is
1845 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1847 end Is_Asynchronous;
1849 function Is_Atomic (Id : E) return B is
1854 function Is_Bit_Packed_Array (Id : E) return B is
1856 return Flag122 (Implementation_Base_Type (Id));
1857 end Is_Bit_Packed_Array;
1859 function Is_Called (Id : E) return B is
1861 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1862 return Flag102 (Id);
1865 function Is_Character_Type (Id : E) return B is
1868 end Is_Character_Type;
1870 function Is_Child_Unit (Id : E) return B is
1875 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1878 end Is_Class_Wide_Equivalent_Type;
1880 function Is_Compilation_Unit (Id : E) return B is
1882 return Flag149 (Id);
1883 end Is_Compilation_Unit;
1885 function Is_Completely_Hidden (Id : E) return B is
1887 pragma Assert (Ekind (Id) = E_Discriminant);
1888 return Flag103 (Id);
1889 end Is_Completely_Hidden;
1891 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1894 end Is_Constr_Subt_For_U_Nominal;
1896 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1898 return Flag141 (Id);
1899 end Is_Constr_Subt_For_UN_Aliased;
1901 function Is_Constrained (Id : E) return B is
1903 pragma Assert (Nkind (Id) in N_Entity);
1907 function Is_Constructor (Id : E) return B is
1912 function Is_Controlled (Id : E) return B is
1914 return Flag42 (Base_Type (Id));
1917 function Is_Controlling_Formal (Id : E) return B is
1919 pragma Assert (Is_Formal (Id));
1921 end Is_Controlling_Formal;
1923 function Is_CPP_Class (Id : E) return B is
1928 function Is_Descendent_Of_Address (Id : E) return B is
1930 return Flag223 (Id);
1931 end Is_Descendent_Of_Address;
1933 function Is_Discrim_SO_Function (Id : E) return B is
1935 return Flag176 (Id);
1936 end Is_Discrim_SO_Function;
1938 function Is_Dispatch_Table_Entity (Id : E) return B is
1940 return Flag234 (Id);
1941 end Is_Dispatch_Table_Entity;
1943 function Is_Dispatching_Operation (Id : E) return B is
1945 pragma Assert (Nkind (Id) in N_Entity);
1947 end Is_Dispatching_Operation;
1949 function Is_Eliminated (Id : E) return B is
1951 return Flag124 (Id);
1954 function Is_Entry_Formal (Id : E) return B is
1957 end Is_Entry_Formal;
1959 function Is_Exported (Id : E) return B is
1964 function Is_First_Subtype (Id : E) return B is
1967 end Is_First_Subtype;
1969 function Is_For_Access_Subtype (Id : E) return B is
1971 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
1972 return Flag118 (Id);
1973 end Is_For_Access_Subtype;
1975 function Is_Formal_Subprogram (Id : E) return B is
1977 return Flag111 (Id);
1978 end Is_Formal_Subprogram;
1980 function Is_Frozen (Id : E) return B is
1985 function Is_Generic_Actual_Type (Id : E) return B is
1987 pragma Assert (Is_Type (Id));
1989 end Is_Generic_Actual_Type;
1991 function Is_Generic_Instance (Id : E) return B is
1993 return Flag130 (Id);
1994 end Is_Generic_Instance;
1996 function Is_Generic_Type (Id : E) return B is
1998 pragma Assert (Nkind (Id) in N_Entity);
2000 end Is_Generic_Type;
2002 function Is_Hidden (Id : E) return B is
2007 function Is_Hidden_Open_Scope (Id : E) return B is
2009 return Flag171 (Id);
2010 end Is_Hidden_Open_Scope;
2012 function Is_Immediately_Visible (Id : E) return B is
2014 pragma Assert (Nkind (Id) in N_Entity);
2016 end Is_Immediately_Visible;
2018 function Is_Implementation_Defined (Id : E) return B is
2020 return Flag254 (Id);
2021 end Is_Implementation_Defined;
2023 function Is_Imported (Id : E) return B is
2028 function Is_Inlined (Id : E) return B is
2033 function Is_Interface (Id : E) return B is
2035 return Flag186 (Id);
2038 function Is_Instantiated (Id : E) return B is
2040 return Flag126 (Id);
2041 end Is_Instantiated;
2043 function Is_Internal (Id : E) return B is
2045 pragma Assert (Nkind (Id) in N_Entity);
2049 function Is_Interrupt_Handler (Id : E) return B is
2051 pragma Assert (Nkind (Id) in N_Entity);
2053 end Is_Interrupt_Handler;
2055 function Is_Intrinsic_Subprogram (Id : E) return B is
2058 end Is_Intrinsic_Subprogram;
2060 function Is_Invariant_Procedure (Id : E) return B is
2062 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2063 return Flag257 (Id);
2064 end Is_Invariant_Procedure;
2066 function Is_Itype (Id : E) return B is
2071 function Is_Known_Non_Null (Id : E) return B is
2074 end Is_Known_Non_Null;
2076 function Is_Known_Null (Id : E) return B is
2078 return Flag204 (Id);
2081 function Is_Known_Valid (Id : E) return B is
2083 return Flag170 (Id);
2086 function Is_Limited_Composite (Id : E) return B is
2088 return Flag106 (Id);
2089 end Is_Limited_Composite;
2091 function Is_Limited_Interface (Id : E) return B is
2093 return Flag197 (Id);
2094 end Is_Limited_Interface;
2096 function Is_Limited_Record (Id : E) return B is
2099 end Is_Limited_Record;
2101 function Is_Machine_Code_Subprogram (Id : E) return B is
2103 pragma Assert (Is_Subprogram (Id));
2104 return Flag137 (Id);
2105 end Is_Machine_Code_Subprogram;
2107 function Is_Non_Static_Subtype (Id : E) return B is
2109 pragma Assert (Is_Type (Id));
2110 return Flag109 (Id);
2111 end Is_Non_Static_Subtype;
2113 function Is_Null_Init_Proc (Id : E) return B is
2115 pragma Assert (Ekind (Id) = E_Procedure);
2116 return Flag178 (Id);
2117 end Is_Null_Init_Proc;
2119 function Is_Obsolescent (Id : E) return B is
2121 return Flag153 (Id);
2124 function Is_Only_Out_Parameter (Id : E) return B is
2126 pragma Assert (Is_Formal (Id));
2127 return Flag226 (Id);
2128 end Is_Only_Out_Parameter;
2130 function Is_Optional_Parameter (Id : E) return B is
2132 pragma Assert (Is_Formal (Id));
2133 return Flag134 (Id);
2134 end Is_Optional_Parameter;
2136 function Is_Package_Body_Entity (Id : E) return B is
2138 return Flag160 (Id);
2139 end Is_Package_Body_Entity;
2141 function Is_Packed (Id : E) return B is
2143 return Flag51 (Implementation_Base_Type (Id));
2146 function Is_Packed_Array_Type (Id : E) return B is
2148 return Flag138 (Id);
2149 end Is_Packed_Array_Type;
2151 function Is_Potentially_Use_Visible (Id : E) return B is
2153 pragma Assert (Nkind (Id) in N_Entity);
2155 end Is_Potentially_Use_Visible;
2157 function Is_Predicate_Function (Id : E) return B is
2159 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2160 return Flag255 (Id);
2161 end Is_Predicate_Function;
2163 function Is_Predicate_Function_M (Id : E) return B is
2165 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2166 return Flag256 (Id);
2167 end Is_Predicate_Function_M;
2169 function Is_Preelaborated (Id : E) return B is
2172 end Is_Preelaborated;
2174 function Is_Primitive (Id : E) return B is
2177 (Is_Overloadable (Id)
2178 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
2179 return Flag218 (Id);
2182 function Is_Primitive_Wrapper (Id : E) return B is
2184 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2185 return Flag195 (Id);
2186 end Is_Primitive_Wrapper;
2188 function Is_Private_Composite (Id : E) return B is
2190 pragma Assert (Is_Type (Id));
2191 return Flag107 (Id);
2192 end Is_Private_Composite;
2194 function Is_Private_Descendant (Id : E) return B is
2197 end Is_Private_Descendant;
2199 function Is_Private_Primitive (Id : E) return B is
2201 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2202 return Flag245 (Id);
2203 end Is_Private_Primitive;
2205 function Is_Processed_Transient (Id : E) return B is
2207 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2208 return Flag252 (Id);
2209 end Is_Processed_Transient;
2211 function Is_Public (Id : E) return B is
2213 pragma Assert (Nkind (Id) in N_Entity);
2217 function Is_Pure (Id : E) return B is
2222 function Is_Pure_Unit_Access_Type (Id : E) return B is
2224 pragma Assert (Is_Access_Type (Id));
2225 return Flag189 (Id);
2226 end Is_Pure_Unit_Access_Type;
2228 function Is_RACW_Stub_Type (Id : E) return B is
2230 pragma Assert (Is_Type (Id));
2231 return Flag244 (Id);
2232 end Is_RACW_Stub_Type;
2234 function Is_Raised (Id : E) return B is
2236 pragma Assert (Ekind (Id) = E_Exception);
2237 return Flag224 (Id);
2240 function Is_Remote_Call_Interface (Id : E) return B is
2243 end Is_Remote_Call_Interface;
2245 function Is_Remote_Types (Id : E) return B is
2248 end Is_Remote_Types;
2250 function Is_Renaming_Of_Object (Id : E) return B is
2252 return Flag112 (Id);
2253 end Is_Renaming_Of_Object;
2255 function Is_Return_Object (Id : E) return B is
2257 return Flag209 (Id);
2258 end Is_Return_Object;
2260 function Is_Safe_To_Reevaluate (Id : E) return B is
2262 return Flag249 (Id);
2263 end Is_Safe_To_Reevaluate;
2265 function Is_Shared_Passive (Id : E) return B is
2268 end Is_Shared_Passive;
2270 function Is_Statically_Allocated (Id : E) return B is
2273 end Is_Statically_Allocated;
2275 function Is_Tag (Id : E) return B is
2277 pragma Assert (Nkind (Id) in N_Entity);
2281 function Is_Tagged_Type (Id : E) return B is
2286 function Is_Thunk (Id : E) return B is
2288 return Flag225 (Id);
2291 function Is_Trivial_Subprogram (Id : E) return B is
2293 return Flag235 (Id);
2294 end Is_Trivial_Subprogram;
2296 function Is_True_Constant (Id : E) return B is
2298 return Flag163 (Id);
2299 end Is_True_Constant;
2301 function Is_Unchecked_Union (Id : E) return B is
2303 return Flag117 (Implementation_Base_Type (Id));
2304 end Is_Unchecked_Union;
2306 function Is_Underlying_Record_View (Id : E) return B is
2308 return Flag246 (Id);
2309 end Is_Underlying_Record_View;
2311 function Is_Unsigned_Type (Id : E) return B is
2313 pragma Assert (Is_Type (Id));
2314 return Flag144 (Id);
2315 end Is_Unsigned_Type;
2317 function Is_Valued_Procedure (Id : E) return B is
2319 pragma Assert (Ekind (Id) = E_Procedure);
2320 return Flag127 (Id);
2321 end Is_Valued_Procedure;
2323 function Is_Visible_Formal (Id : E) return B is
2325 return Flag206 (Id);
2326 end Is_Visible_Formal;
2328 function Is_Visible_Lib_Unit (Id : E) return B is
2330 return Flag116 (Id);
2331 end Is_Visible_Lib_Unit;
2333 function Is_VMS_Exception (Id : E) return B is
2335 return Flag133 (Id);
2336 end Is_VMS_Exception;
2338 function Is_Volatile (Id : E) return B is
2340 pragma Assert (Nkind (Id) in N_Entity);
2342 if Is_Type (Id) then
2343 return Flag16 (Base_Type (Id));
2349 function Itype_Printed (Id : E) return B is
2351 pragma Assert (Is_Itype (Id));
2352 return Flag202 (Id);
2355 function Kill_Elaboration_Checks (Id : E) return B is
2358 end Kill_Elaboration_Checks;
2360 function Kill_Range_Checks (Id : E) return B is
2363 end Kill_Range_Checks;
2365 function Known_To_Have_Preelab_Init (Id : E) return B is
2367 pragma Assert (Is_Type (Id));
2368 return Flag207 (Id);
2369 end Known_To_Have_Preelab_Init;
2371 function Last_Assignment (Id : E) return N is
2373 pragma Assert (Is_Assignable (Id));
2375 end Last_Assignment;
2377 function Last_Entity (Id : E) return E is
2382 function Limited_View (Id : E) return E is
2384 pragma Assert (Ekind (Id) = E_Package);
2388 function Lit_Indexes (Id : E) return E is
2390 pragma Assert (Is_Enumeration_Type (Id));
2394 function Lit_Strings (Id : E) return E is
2396 pragma Assert (Is_Enumeration_Type (Id));
2400 function Low_Bound_Tested (Id : E) return B is
2402 return Flag205 (Id);
2403 end Low_Bound_Tested;
2405 function Machine_Radix_10 (Id : E) return B is
2407 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2409 end Machine_Radix_10;
2411 function Master_Id (Id : E) return E is
2413 pragma Assert (Is_Access_Type (Id));
2417 function Materialize_Entity (Id : E) return B is
2419 return Flag168 (Id);
2420 end Materialize_Entity;
2422 function May_Inherit_Delayed_Rep_Aspects (Id : E) return B is
2424 return Flag262 (Id);
2425 end May_Inherit_Delayed_Rep_Aspects;
2427 function Mechanism (Id : E) return M is
2429 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2430 return UI_To_Int (Uint8 (Id));
2433 function Modulus (Id : E) return Uint is
2435 pragma Assert (Is_Modular_Integer_Type (Id));
2436 return Uint17 (Base_Type (Id));
2439 function Must_Be_On_Byte_Boundary (Id : E) return B is
2441 pragma Assert (Is_Type (Id));
2442 return Flag183 (Id);
2443 end Must_Be_On_Byte_Boundary;
2445 function Must_Have_Preelab_Init (Id : E) return B is
2447 pragma Assert (Is_Type (Id));
2448 return Flag208 (Id);
2449 end Must_Have_Preelab_Init;
2451 function Needs_Debug_Info (Id : E) return B is
2453 return Flag147 (Id);
2454 end Needs_Debug_Info;
2456 function Needs_No_Actuals (Id : E) return B is
2459 (Is_Overloadable (Id)
2460 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2462 end Needs_No_Actuals;
2464 function Never_Set_In_Source (Id : E) return B is
2466 return Flag115 (Id);
2467 end Never_Set_In_Source;
2469 function Next_Inlined_Subprogram (Id : E) return E is
2472 end Next_Inlined_Subprogram;
2474 function No_Pool_Assigned (Id : E) return B is
2476 pragma Assert (Is_Access_Type (Id));
2477 return Flag131 (Root_Type (Id));
2478 end No_Pool_Assigned;
2480 function No_Return (Id : E) return B is
2482 return Flag113 (Id);
2485 function No_Strict_Aliasing (Id : E) return B is
2487 pragma Assert (Is_Access_Type (Id));
2488 return Flag136 (Base_Type (Id));
2489 end No_Strict_Aliasing;
2491 function Non_Binary_Modulus (Id : E) return B is
2493 pragma Assert (Is_Type (Id));
2494 return Flag58 (Base_Type (Id));
2495 end Non_Binary_Modulus;
2497 function Non_Limited_View (Id : E) return E is
2500 (Ekind (Id) in Incomplete_Kind or else Ekind (Id) = E_Abstract_State);
2502 end Non_Limited_View;
2504 function Nonzero_Is_True (Id : E) return B is
2506 pragma Assert (Root_Type (Id) = Standard_Boolean);
2507 return Flag162 (Base_Type (Id));
2508 end Nonzero_Is_True;
2510 function Normalized_First_Bit (Id : E) return U is
2512 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2514 end Normalized_First_Bit;
2516 function Normalized_Position (Id : E) return U is
2518 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2520 end Normalized_Position;
2522 function Normalized_Position_Max (Id : E) return U is
2524 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2526 end Normalized_Position_Max;
2528 function OK_To_Rename (Id : E) return B is
2530 pragma Assert (Ekind (Id) = E_Variable);
2531 return Flag247 (Id);
2534 function OK_To_Reorder_Components (Id : E) return B is
2536 pragma Assert (Is_Record_Type (Id));
2537 return Flag239 (Base_Type (Id));
2538 end OK_To_Reorder_Components;
2540 function Optimize_Alignment_Space (Id : E) return B is
2543 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2544 return Flag241 (Id);
2545 end Optimize_Alignment_Space;
2547 function Optimize_Alignment_Time (Id : E) return B is
2550 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2551 return Flag242 (Id);
2552 end Optimize_Alignment_Time;
2554 function Original_Access_Type (Id : E) return E is
2556 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2558 end Original_Access_Type;
2560 function Original_Array_Type (Id : E) return E is
2562 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2564 end Original_Array_Type;
2566 function Original_Record_Component (Id : E) return E is
2568 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2570 end Original_Record_Component;
2572 function Overlays_Constant (Id : E) return B is
2574 return Flag243 (Id);
2575 end Overlays_Constant;
2577 function Overridden_Operation (Id : E) return E is
2580 end Overridden_Operation;
2582 function Package_Instantiation (Id : E) return N is
2584 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2586 end Package_Instantiation;
2588 function Packed_Array_Type (Id : E) return E is
2590 pragma Assert (Is_Array_Type (Id));
2592 end Packed_Array_Type;
2594 function Parent_Subtype (Id : E) return E is
2596 pragma Assert (Is_Record_Type (Id));
2597 return Node19 (Base_Type (Id));
2600 function Postcondition_Proc (Id : E) return E is
2602 pragma Assert (Ekind (Id) = E_Procedure);
2604 end Postcondition_Proc;
2606 function PPC_Wrapper (Id : E) return E is
2608 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2612 function Prival (Id : E) return E is
2614 pragma Assert (Is_Protected_Component (Id));
2618 function Prival_Link (Id : E) return E is
2620 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2624 function Private_Dependents (Id : E) return L is
2626 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2627 return Elist18 (Id);
2628 end Private_Dependents;
2630 function Private_View (Id : E) return N is
2632 pragma Assert (Is_Private_Type (Id));
2636 function Protected_Body_Subprogram (Id : E) return E is
2638 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2640 end Protected_Body_Subprogram;
2642 function Protected_Formal (Id : E) return E is
2644 pragma Assert (Is_Formal (Id));
2646 end Protected_Formal;
2648 function Protection_Object (Id : E) return E is
2651 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2653 end Protection_Object;
2655 function Reachable (Id : E) return B is
2660 function Referenced (Id : E) return B is
2662 return Flag156 (Id);
2665 function Referenced_As_LHS (Id : E) return B is
2668 end Referenced_As_LHS;
2670 function Referenced_As_Out_Parameter (Id : E) return B is
2672 return Flag227 (Id);
2673 end Referenced_As_Out_Parameter;
2675 function Refined_State (Id : E) return N is
2677 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
2681 function Refinement_Constituents (Id : E) return L is
2683 pragma Assert (Ekind (Id) = E_Abstract_State);
2685 end Refinement_Constituents;
2687 function Register_Exception_Call (Id : E) return N is
2689 pragma Assert (Ekind (Id) = E_Exception);
2691 end Register_Exception_Call;
2693 function Related_Array_Object (Id : E) return E is
2695 pragma Assert (Is_Array_Type (Id));
2697 end Related_Array_Object;
2699 function Related_Expression (Id : E) return N is
2701 pragma Assert (Ekind (Id) in Type_Kind
2702 or else Ekind_In (Id, E_Constant, E_Variable));
2704 end Related_Expression;
2706 function Related_Instance (Id : E) return E is
2708 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2710 end Related_Instance;
2712 function Related_Type (Id : E) return E is
2714 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2718 function Relative_Deadline_Variable (Id : E) return E is
2720 pragma Assert (Is_Task_Type (Id));
2721 return Node26 (Implementation_Base_Type (Id));
2722 end Relative_Deadline_Variable;
2724 function Renamed_Entity (Id : E) return N is
2729 function Renamed_In_Spec (Id : E) return B is
2731 pragma Assert (Ekind (Id) = E_Package);
2732 return Flag231 (Id);
2733 end Renamed_In_Spec;
2735 function Renamed_Object (Id : E) return N is
2740 function Renaming_Map (Id : E) return U is
2745 function Requires_Overriding (Id : E) return B is
2747 pragma Assert (Is_Overloadable (Id));
2748 return Flag213 (Id);
2749 end Requires_Overriding;
2751 function Return_Present (Id : E) return B is
2756 function Return_Applies_To (Id : E) return N is
2759 end Return_Applies_To;
2761 function Returns_By_Ref (Id : E) return B is
2766 function Reverse_Bit_Order (Id : E) return B is
2768 pragma Assert (Is_Record_Type (Id));
2769 return Flag164 (Base_Type (Id));
2770 end Reverse_Bit_Order;
2772 function Reverse_Storage_Order (Id : E) return B is
2774 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
2775 return Flag93 (Base_Type (Id));
2776 end Reverse_Storage_Order;
2778 function RM_Size (Id : E) return U is
2780 pragma Assert (Is_Type (Id));
2784 function Scalar_Range (Id : E) return N is
2789 function Scale_Value (Id : E) return U is
2794 function Scope_Depth_Value (Id : E) return U is
2797 end Scope_Depth_Value;
2799 function Sec_Stack_Needed_For_Return (Id : E) return B is
2801 return Flag167 (Id);
2802 end Sec_Stack_Needed_For_Return;
2804 function Shadow_Entities (Id : E) return S is
2806 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2808 end Shadow_Entities;
2810 function Shared_Var_Procs_Instance (Id : E) return E is
2812 pragma Assert (Ekind (Id) = E_Variable);
2814 end Shared_Var_Procs_Instance;
2816 function Size_Check_Code (Id : E) return N is
2818 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2820 end Size_Check_Code;
2822 function Size_Depends_On_Discriminant (Id : E) return B is
2824 return Flag177 (Id);
2825 end Size_Depends_On_Discriminant;
2827 function Size_Known_At_Compile_Time (Id : E) return B is
2830 end Size_Known_At_Compile_Time;
2832 function Small_Value (Id : E) return R is
2834 pragma Assert (Is_Fixed_Point_Type (Id));
2835 return Ureal21 (Id);
2838 function SPARK_Aux_Pragma (Id : E) return N is
2841 (Ekind_In (Id, E_Generic_Package, -- package variants
2845 end SPARK_Aux_Pragma;
2847 function SPARK_Aux_Pragma_Inherited (Id : E) return B is
2850 (Ekind_In (Id, E_Generic_Package, -- package variants
2853 return Flag266 (Id);
2854 end SPARK_Aux_Pragma_Inherited;
2856 function SPARK_Pragma (Id : E) return N is
2859 (Ekind_In (Id, E_Function, -- subprogram variants
2861 E_Generic_Procedure,
2865 Ekind_In (Id, E_Generic_Package, -- package variants
2871 function SPARK_Pragma_Inherited (Id : E) return B is
2874 (Ekind_In (Id, E_Function, -- subprogram variants
2876 E_Generic_Procedure,
2880 Ekind_In (Id, E_Generic_Package, -- package variants
2883 return Flag265 (Id);
2884 end SPARK_Pragma_Inherited;
2886 function Spec_Entity (Id : E) return E is
2888 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2892 function Static_Predicate (Id : E) return S is
2894 pragma Assert (Is_Discrete_Type (Id));
2896 end Static_Predicate;
2898 function Status_Flag_Or_Transient_Decl (Id : E) return N is
2900 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2902 end Status_Flag_Or_Transient_Decl;
2904 function Storage_Size_Variable (Id : E) return E is
2906 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2907 return Node15 (Implementation_Base_Type (Id));
2908 end Storage_Size_Variable;
2910 function Static_Elaboration_Desired (Id : E) return B is
2912 pragma Assert (Ekind (Id) = E_Package);
2914 end Static_Elaboration_Desired;
2916 function Static_Initialization (Id : E) return N is
2919 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
2921 end Static_Initialization;
2923 function Stored_Constraint (Id : E) return L is
2926 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
2927 return Elist23 (Id);
2928 end Stored_Constraint;
2930 function Strict_Alignment (Id : E) return B is
2932 return Flag145 (Implementation_Base_Type (Id));
2933 end Strict_Alignment;
2935 function String_Literal_Length (Id : E) return U is
2938 end String_Literal_Length;
2940 function String_Literal_Low_Bound (Id : E) return N is
2943 end String_Literal_Low_Bound;
2945 function Subprograms_For_Type (Id : E) return E is
2947 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
2949 end Subprograms_For_Type;
2951 function Suppress_Elaboration_Warnings (Id : E) return B is
2953 return Flag148 (Id);
2954 end Suppress_Elaboration_Warnings;
2956 function Suppress_Initialization (Id : E) return B is
2958 pragma Assert (Is_Type (Id));
2959 return Flag105 (Id);
2960 end Suppress_Initialization;
2962 function Suppress_Style_Checks (Id : E) return B is
2964 return Flag165 (Id);
2965 end Suppress_Style_Checks;
2967 function Suppress_Value_Tracking_On_Call (Id : E) return B is
2969 return Flag217 (Id);
2970 end Suppress_Value_Tracking_On_Call;
2972 function Task_Body_Procedure (Id : E) return N is
2974 pragma Assert (Ekind (Id) in Task_Kind);
2976 end Task_Body_Procedure;
2978 function Thunk_Entity (Id : E) return E is
2980 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
2981 and then Is_Thunk (Id));
2985 function Treat_As_Volatile (Id : E) return B is
2988 end Treat_As_Volatile;
2990 function Underlying_Full_View (Id : E) return E is
2992 pragma Assert (Ekind (Id) in Private_Kind);
2994 end Underlying_Full_View;
2996 function Underlying_Record_View (Id : E) return E is
2999 end Underlying_Record_View;
3001 function Universal_Aliasing (Id : E) return B is
3003 pragma Assert (Is_Type (Id));
3004 return Flag216 (Implementation_Base_Type (Id));
3005 end Universal_Aliasing;
3007 function Unset_Reference (Id : E) return N is
3010 end Unset_Reference;
3012 function Used_As_Generic_Actual (Id : E) return B is
3014 return Flag222 (Id);
3015 end Used_As_Generic_Actual;
3017 function Uses_Lock_Free (Id : E) return B is
3019 pragma Assert (Is_Protected_Type (Id));
3020 return Flag188 (Id);
3023 function Uses_Sec_Stack (Id : E) return B is
3028 function Warnings_Off (Id : E) return B is
3033 function Warnings_Off_Used (Id : E) return B is
3035 return Flag236 (Id);
3036 end Warnings_Off_Used;
3038 function Warnings_Off_Used_Unmodified (Id : E) return B is
3040 return Flag237 (Id);
3041 end Warnings_Off_Used_Unmodified;
3043 function Warnings_Off_Used_Unreferenced (Id : E) return B is
3045 return Flag238 (Id);
3046 end Warnings_Off_Used_Unreferenced;
3048 function Wrapped_Entity (Id : E) return E is
3050 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3051 and then Is_Primitive_Wrapper (Id));
3055 function Was_Hidden (Id : E) return B is
3057 return Flag196 (Id);
3060 ------------------------------
3061 -- Classification Functions --
3062 ------------------------------
3064 function Is_Access_Type (Id : E) return B is
3066 return Ekind (Id) in Access_Kind;
3069 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
3071 return Ekind (Id) in Access_Protected_Kind;
3072 end Is_Access_Protected_Subprogram_Type;
3074 function Is_Access_Subprogram_Type (Id : E) return B is
3076 return Ekind (Id) in Access_Subprogram_Kind;
3077 end Is_Access_Subprogram_Type;
3079 function Is_Aggregate_Type (Id : E) return B is
3081 return Ekind (Id) in Aggregate_Kind;
3082 end Is_Aggregate_Type;
3084 function Is_Array_Type (Id : E) return B is
3086 return Ekind (Id) in Array_Kind;
3089 function Is_Assignable (Id : E) return B is
3091 return Ekind (Id) in Assignable_Kind;
3094 function Is_Class_Wide_Type (Id : E) return B is
3096 return Ekind (Id) in Class_Wide_Kind;
3097 end Is_Class_Wide_Type;
3099 function Is_Composite_Type (Id : E) return B is
3101 return Ekind (Id) in Composite_Kind;
3102 end Is_Composite_Type;
3104 function Is_Concurrent_Body (Id : E) return B is
3106 return Ekind (Id) in
3107 Concurrent_Body_Kind;
3108 end Is_Concurrent_Body;
3110 function Is_Concurrent_Record_Type (Id : E) return B is
3113 end Is_Concurrent_Record_Type;
3115 function Is_Concurrent_Type (Id : E) return B is
3117 return Ekind (Id) in Concurrent_Kind;
3118 end Is_Concurrent_Type;
3120 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
3122 return Ekind (Id) in
3123 Decimal_Fixed_Point_Kind;
3124 end Is_Decimal_Fixed_Point_Type;
3126 function Is_Digits_Type (Id : E) return B is
3128 return Ekind (Id) in Digits_Kind;
3131 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
3133 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
3134 end Is_Discrete_Or_Fixed_Point_Type;
3136 function Is_Discrete_Type (Id : E) return B is
3138 return Ekind (Id) in Discrete_Kind;
3139 end Is_Discrete_Type;
3141 function Is_Elementary_Type (Id : E) return B is
3143 return Ekind (Id) in Elementary_Kind;
3144 end Is_Elementary_Type;
3146 function Is_Entry (Id : E) return B is
3148 return Ekind (Id) in Entry_Kind;
3151 function Is_Enumeration_Type (Id : E) return B is
3153 return Ekind (Id) in
3155 end Is_Enumeration_Type;
3157 function Is_Fixed_Point_Type (Id : E) return B is
3159 return Ekind (Id) in
3161 end Is_Fixed_Point_Type;
3163 function Is_Floating_Point_Type (Id : E) return B is
3165 return Ekind (Id) in Float_Kind;
3166 end Is_Floating_Point_Type;
3168 function Is_Formal (Id : E) return B is
3170 return Ekind (Id) in Formal_Kind;
3173 function Is_Formal_Object (Id : E) return B is
3175 return Ekind (Id) in Formal_Object_Kind;
3176 end Is_Formal_Object;
3178 function Is_Generic_Subprogram (Id : E) return B is
3180 return Ekind (Id) in Generic_Subprogram_Kind;
3181 end Is_Generic_Subprogram;
3183 function Is_Generic_Unit (Id : E) return B is
3185 return Ekind (Id) in Generic_Unit_Kind;
3186 end Is_Generic_Unit;
3188 function Is_Incomplete_Or_Private_Type (Id : E) return B is
3190 return Ekind (Id) in
3191 Incomplete_Or_Private_Kind;
3192 end Is_Incomplete_Or_Private_Type;
3194 function Is_Incomplete_Type (Id : E) return B is
3196 return Ekind (Id) in
3198 end Is_Incomplete_Type;
3200 function Is_Integer_Type (Id : E) return B is
3202 return Ekind (Id) in Integer_Kind;
3203 end Is_Integer_Type;
3205 function Is_Modular_Integer_Type (Id : E) return B is
3207 return Ekind (Id) in
3208 Modular_Integer_Kind;
3209 end Is_Modular_Integer_Type;
3211 function Is_Named_Number (Id : E) return B is
3213 return Ekind (Id) in Named_Kind;
3214 end Is_Named_Number;
3216 function Is_Numeric_Type (Id : E) return B is
3218 return Ekind (Id) in Numeric_Kind;
3219 end Is_Numeric_Type;
3221 function Is_Object (Id : E) return B is
3223 return Ekind (Id) in Object_Kind;
3226 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
3228 return Ekind (Id) in
3229 Ordinary_Fixed_Point_Kind;
3230 end Is_Ordinary_Fixed_Point_Type;
3232 function Is_Overloadable (Id : E) return B is
3234 return Ekind (Id) in Overloadable_Kind;
3235 end Is_Overloadable;
3237 function Is_Private_Type (Id : E) return B is
3239 return Ekind (Id) in Private_Kind;
3240 end Is_Private_Type;
3242 function Is_Protected_Type (Id : E) return B is
3244 return Ekind (Id) in Protected_Kind;
3245 end Is_Protected_Type;
3247 function Is_Real_Type (Id : E) return B is
3249 return Ekind (Id) in Real_Kind;
3252 function Is_Record_Type (Id : E) return B is
3254 return Ekind (Id) in Record_Kind;
3257 function Is_Scalar_Type (Id : E) return B is
3259 return Ekind (Id) in Scalar_Kind;
3262 function Is_Signed_Integer_Type (Id : E) return B is
3264 return Ekind (Id) in Signed_Integer_Kind;
3265 end Is_Signed_Integer_Type;
3267 function Is_Subprogram (Id : E) return B is
3269 return Ekind (Id) in Subprogram_Kind;
3272 function Is_Task_Type (Id : E) return B is
3274 return Ekind (Id) in Task_Kind;
3277 function Is_Type (Id : E) return B is
3279 return Ekind (Id) in Type_Kind;
3282 ------------------------------
3283 -- Attribute Set Procedures --
3284 ------------------------------
3286 -- Note: in many of these set procedures an "obvious" assertion is missing.
3287 -- The reason for this is that in many cases, a field is set before the
3288 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3289 -- it is possible to add assertions that specifically include the E_Void
3290 -- possibility, but in some cases, we just omit the assertions.
3292 procedure Set_Abstract_States (Id : E; V : L) is
3294 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
3295 Set_Elist25 (Id, V);
3296 end Set_Abstract_States;
3298 procedure Set_Accept_Address (Id : E; V : L) is
3300 Set_Elist21 (Id, V);
3301 end Set_Accept_Address;
3303 procedure Set_Access_Disp_Table (Id : E; V : L) is
3305 pragma Assert (Ekind (Id) = E_Record_Type
3306 and then Id = Implementation_Base_Type (Id));
3307 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3308 Set_Elist16 (Id, V);
3309 end Set_Access_Disp_Table;
3311 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3314 end Set_Associated_Formal_Package;
3316 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3319 end Set_Associated_Node_For_Itype;
3321 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3323 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3325 end Set_Associated_Storage_Pool;
3327 procedure Set_Actual_Subtype (Id : E; V : E) is
3330 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3331 or else Is_Formal (Id));
3333 end Set_Actual_Subtype;
3335 procedure Set_Address_Taken (Id : E; V : B := True) is
3337 Set_Flag104 (Id, V);
3338 end Set_Address_Taken;
3340 procedure Set_Alias (Id : E; V : E) is
3343 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3347 procedure Set_Alignment (Id : E; V : U) is
3349 pragma Assert (Is_Type (Id)
3350 or else Is_Formal (Id)
3351 or else Ekind_In (Id, E_Loop_Parameter,
3358 procedure Set_Barrier_Function (Id : E; V : N) is
3360 pragma Assert (Is_Entry (Id));
3362 end Set_Barrier_Function;
3364 procedure Set_Block_Node (Id : E; V : N) is
3366 pragma Assert (Ekind (Id) = E_Block);
3370 procedure Set_Body_Entity (Id : E; V : E) is
3372 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3374 end Set_Body_Entity;
3376 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3379 (Ekind (Id) = E_Package
3380 or else Is_Subprogram (Id)
3381 or else Is_Generic_Unit (Id));
3383 end Set_Body_Needed_For_SAL;
3385 procedure Set_Body_References (Id : E; V : L) is
3387 pragma Assert (Ekind (Id) = E_Abstract_State);
3388 Set_Elist16 (Id, V);
3389 end Set_Body_References;
3391 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3393 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3394 Set_Flag125 (Id, V);
3395 end Set_C_Pass_By_Copy;
3397 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3400 end Set_Can_Never_Be_Null;
3402 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3405 end Set_Checks_May_Be_Suppressed;
3407 procedure Set_Class_Wide_Type (Id : E; V : E) is
3409 pragma Assert (Is_Type (Id));
3411 end Set_Class_Wide_Type;
3413 procedure Set_Cloned_Subtype (Id : E; V : E) is
3415 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3417 end Set_Cloned_Subtype;
3419 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3421 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3423 end Set_Component_Bit_Offset;
3425 procedure Set_Component_Clause (Id : E; V : N) is
3427 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3429 end Set_Component_Clause;
3431 procedure Set_Component_Size (Id : E; V : U) is
3433 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3435 end Set_Component_Size;
3437 procedure Set_Component_Type (Id : E; V : E) is
3439 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3441 end Set_Component_Type;
3443 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3446 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3448 end Set_Corresponding_Concurrent_Type;
3450 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3452 pragma Assert (Ekind (Id) = E_Discriminant);
3454 end Set_Corresponding_Discriminant;
3456 procedure Set_Corresponding_Equality (Id : E; V : E) is
3459 (Ekind (Id) = E_Function
3460 and then not Comes_From_Source (Id)
3461 and then Chars (Id) = Name_Op_Ne);
3463 end Set_Corresponding_Equality;
3465 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3467 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3469 end Set_Corresponding_Protected_Entry;
3471 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3473 pragma Assert (Is_Concurrent_Type (Id));
3475 end Set_Corresponding_Record_Type;
3477 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3480 end Set_Corresponding_Remote_Type;
3482 procedure Set_Current_Use_Clause (Id : E; V : E) is
3484 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3486 end Set_Current_Use_Clause;
3488 procedure Set_Current_Value (Id : E; V : N) is
3490 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3492 end Set_Current_Value;
3494 procedure Set_CR_Discriminant (Id : E; V : E) is
3497 end Set_CR_Discriminant;
3499 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3501 Set_Flag166 (Id, V);
3502 end Set_Debug_Info_Off;
3504 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3507 end Set_Debug_Renaming_Link;
3509 procedure Set_Default_Aspect_Component_Value (Id : E; V : E) is
3511 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3513 end Set_Default_Aspect_Component_Value;
3515 procedure Set_Default_Aspect_Value (Id : E; V : E) is
3517 pragma Assert (Is_Scalar_Type (Id) and then Is_Base_Type (Id));
3519 end Set_Default_Aspect_Value;
3521 procedure Set_Default_Expr_Function (Id : E; V : E) is
3523 pragma Assert (Is_Formal (Id));
3525 end Set_Default_Expr_Function;
3527 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3529 Set_Flag108 (Id, V);
3530 end Set_Default_Expressions_Processed;
3532 procedure Set_Default_Value (Id : E; V : N) is
3534 pragma Assert (Is_Formal (Id));
3536 end Set_Default_Value;
3538 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3542 or else Is_Task_Type (Id)
3543 or else Ekind (Id) = E_Block);
3544 Set_Flag114 (Id, V);
3545 end Set_Delay_Cleanups;
3547 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3550 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3553 end Set_Delay_Subprogram_Descriptors;
3555 procedure Set_Delta_Value (Id : E; V : R) is
3557 pragma Assert (Is_Fixed_Point_Type (Id));
3558 Set_Ureal18 (Id, V);
3559 end Set_Delta_Value;
3561 procedure Set_Dependent_Instances (Id : E; V : L) is
3563 pragma Assert (Is_Generic_Instance (Id));
3565 end Set_Dependent_Instances;
3567 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3569 pragma Assert (Nkind (Id) in N_Entity);
3571 end Set_Depends_On_Private;
3573 procedure Set_Digits_Value (Id : E; V : U) is
3576 (Is_Floating_Point_Type (Id)
3577 or else Is_Decimal_Fixed_Point_Type (Id));
3579 end Set_Digits_Value;
3581 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3584 end Set_Directly_Designated_Type;
3586 procedure Set_Discard_Names (Id : E; V : B := True) is
3589 end Set_Discard_Names;
3591 procedure Set_Discriminal (Id : E; V : E) is
3593 pragma Assert (Ekind (Id) = E_Discriminant);
3595 end Set_Discriminal;
3597 procedure Set_Discriminal_Link (Id : E; V : E) is
3600 end Set_Discriminal_Link;
3602 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3604 pragma Assert (Ekind (Id) = E_Component);
3606 end Set_Discriminant_Checking_Func;
3608 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3610 pragma Assert (Nkind (Id) in N_Entity);
3611 Set_Elist21 (Id, V);
3612 end Set_Discriminant_Constraint;
3614 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3617 end Set_Discriminant_Default_Value;
3619 procedure Set_Discriminant_Number (Id : E; V : U) is
3622 end Set_Discriminant_Number;
3624 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3626 pragma Assert (Ekind (Id) = E_Record_Type
3627 and then Id = Implementation_Base_Type (Id));
3628 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3629 Set_Elist26 (Id, V);
3630 end Set_Dispatch_Table_Wrappers;
3632 procedure Set_DT_Entry_Count (Id : E; V : U) is
3634 pragma Assert (Ekind (Id) = E_Component);
3636 end Set_DT_Entry_Count;
3638 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3640 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3642 end Set_DT_Offset_To_Top_Func;
3644 procedure Set_DT_Position (Id : E; V : U) is
3646 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3648 end Set_DT_Position;
3650 procedure Set_DTC_Entity (Id : E; V : E) is
3652 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3656 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3658 pragma Assert (Ekind (Id) = E_Package);
3659 Set_Flag210 (Id, V);
3660 end Set_Elaborate_Body_Desirable;
3662 procedure Set_Elaboration_Entity (Id : E; V : E) is
3667 Ekind (Id) = E_Package
3669 Is_Generic_Unit (Id));
3671 end Set_Elaboration_Entity;
3673 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3678 Ekind (Id) = E_Package
3680 Is_Generic_Unit (Id));
3681 Set_Flag174 (Id, V);
3682 end Set_Elaboration_Entity_Required;
3684 procedure Set_Enclosing_Scope (Id : E; V : E) is
3687 end Set_Enclosing_Scope;
3689 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3691 pragma Assert (Is_Entry (Id));
3692 Set_Flag152 (Id, V);
3693 end Set_Entry_Accepted;
3695 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3698 end Set_Entry_Bodies_Array;
3700 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3703 end Set_Entry_Cancel_Parameter;
3705 procedure Set_Entry_Component (Id : E; V : E) is
3708 end Set_Entry_Component;
3710 procedure Set_Entry_Formal (Id : E; V : E) is
3713 end Set_Entry_Formal;
3715 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3717 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3719 end Set_Entry_Index_Constant;
3721 procedure Set_Contract (Id : E; V : N) is
3724 (Ekind_In (Id, E_Entry,
3732 or else Is_Generic_Subprogram (Id)
3733 or else Is_Subprogram (Id));
3737 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3740 end Set_Entry_Parameters_Type;
3742 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3744 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3746 end Set_Enum_Pos_To_Rep;
3748 procedure Set_Enumeration_Pos (Id : E; V : U) is
3750 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3752 end Set_Enumeration_Pos;
3754 procedure Set_Enumeration_Rep (Id : E; V : U) is
3756 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3758 end Set_Enumeration_Rep;
3760 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3762 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3764 end Set_Enumeration_Rep_Expr;
3766 procedure Set_Equivalent_Type (Id : E; V : E) is
3769 (Ekind_In (Id, E_Class_Wide_Type,
3770 E_Class_Wide_Subtype,
3771 E_Access_Protected_Subprogram_Type,
3772 E_Anonymous_Access_Protected_Subprogram_Type,
3773 E_Access_Subprogram_Type,
3776 end Set_Equivalent_Type;
3778 procedure Set_Esize (Id : E; V : U) is
3783 procedure Set_Exception_Code (Id : E; V : U) is
3785 pragma Assert (Ekind (Id) = E_Exception);
3787 end Set_Exception_Code;
3789 procedure Set_Extra_Accessibility (Id : E; V : E) is
3792 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
3794 end Set_Extra_Accessibility;
3796 procedure Set_Extra_Accessibility_Of_Result (Id : E; V : E) is
3798 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
3800 end Set_Extra_Accessibility_Of_Result;
3802 procedure Set_Extra_Constrained (Id : E; V : E) is
3804 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3806 end Set_Extra_Constrained;
3808 procedure Set_Extra_Formal (Id : E; V : E) is
3811 end Set_Extra_Formal;
3813 procedure Set_Extra_Formals (Id : E; V : E) is
3816 (Is_Overloadable (Id)
3817 or else Ekind_In (Id, E_Entry_Family,
3819 E_Subprogram_Type));
3821 end Set_Extra_Formals;
3823 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3826 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3827 Set_Flag229 (Id, V);
3828 end Set_Can_Use_Internal_Rep;
3830 procedure Set_Finalization_Master (Id : E; V : E) is
3832 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3834 end Set_Finalization_Master;
3836 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3838 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3839 Set_Flag158 (Id, V);
3840 end Set_Finalize_Storage_Only;
3842 procedure Set_Finalizer (Id : E; V : E) is
3844 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
3848 procedure Set_First_Entity (Id : E; V : E) is
3851 end Set_First_Entity;
3853 procedure Set_First_Exit_Statement (Id : E; V : N) is
3855 pragma Assert (Ekind (Id) = E_Loop);
3857 end Set_First_Exit_Statement;
3859 procedure Set_First_Index (Id : E; V : N) is
3861 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3863 end Set_First_Index;
3865 procedure Set_First_Literal (Id : E; V : E) is
3867 pragma Assert (Is_Enumeration_Type (Id));
3869 end Set_First_Literal;
3871 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3873 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3875 end Set_First_Optional_Parameter;
3877 procedure Set_First_Private_Entity (Id : E; V : E) is
3879 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
3880 or else Ekind (Id) in Concurrent_Kind);
3882 end Set_First_Private_Entity;
3884 procedure Set_First_Rep_Item (Id : E; V : N) is
3887 end Set_First_Rep_Item;
3889 procedure Set_Float_Rep (Id : E; V : F) is
3890 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
3892 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
3895 procedure Set_Freeze_Node (Id : E; V : N) is
3898 end Set_Freeze_Node;
3900 procedure Set_From_Limited_With (Id : E; V : B := True) is
3903 (Is_Type (Id) or else Ekind_In (Id, E_Abstract_State, E_Package));
3904 Set_Flag159 (Id, V);
3905 end Set_From_Limited_With;
3907 procedure Set_Full_View (Id : E; V : E) is
3909 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
3913 procedure Set_Generic_Homonym (Id : E; V : E) is
3916 end Set_Generic_Homonym;
3918 procedure Set_Generic_Renamings (Id : E; V : L) is
3920 Set_Elist23 (Id, V);
3921 end Set_Generic_Renamings;
3923 procedure Set_Handler_Records (Id : E; V : S) is
3926 end Set_Handler_Records;
3928 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
3930 pragma Assert (Id = Base_Type (Id));
3931 Set_Flag135 (Id, V);
3932 end Set_Has_Aliased_Components;
3934 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
3937 end Set_Has_Alignment_Clause;
3939 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
3942 end Set_Has_All_Calls_Remote;
3944 procedure Set_Has_Anonymous_Master (Id : E; V : B := True) is
3947 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
3948 Set_Flag253 (Id, V);
3949 end Set_Has_Anonymous_Master;
3951 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
3953 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
3955 end Set_Has_Atomic_Components;
3957 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
3960 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
3961 Set_Flag139 (Id, V);
3962 end Set_Has_Biased_Representation;
3964 procedure Set_Has_Body_References (Id : E; V : B := True) is
3966 pragma Assert (Ekind (Id) = E_Abstract_State);
3967 Set_Flag264 (Id, V);
3968 end Set_Has_Body_References;
3970 procedure Set_Has_Completion (Id : E; V : B := True) is
3973 end Set_Has_Completion;
3975 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
3977 pragma Assert (Is_Type (Id));
3979 end Set_Has_Completion_In_Body;
3981 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
3983 pragma Assert (Ekind (Id) = E_Record_Type);
3984 Set_Flag140 (Id, V);
3985 end Set_Has_Complex_Representation;
3987 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
3989 pragma Assert (Ekind (Id) = E_Array_Type);
3991 end Set_Has_Component_Size_Clause;
3993 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
3995 pragma Assert (Is_Type (Id));
3996 Set_Flag187 (Id, V);
3997 end Set_Has_Constrained_Partial_View;
3999 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
4001 Set_Flag181 (Id, V);
4002 end Set_Has_Contiguous_Rep;
4004 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
4006 pragma Assert (Id = Base_Type (Id));
4008 end Set_Has_Controlled_Component;
4010 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
4013 end Set_Has_Controlling_Result;
4015 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
4017 Set_Flag119 (Id, V);
4018 end Set_Has_Convention_Pragma;
4020 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
4023 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
4024 and then Is_Base_Type (Id));
4026 end Set_Has_Default_Aspect;
4028 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
4030 pragma Assert (Nkind (Id) in N_Entity);
4031 Set_Flag200 (Id, V);
4032 end Set_Has_Delayed_Aspects;
4034 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
4036 pragma Assert (Nkind (Id) in N_Entity);
4038 end Set_Has_Delayed_Freeze;
4040 procedure Set_Has_Delayed_Rep_Aspects (Id : E; V : B := True) is
4042 pragma Assert (Nkind (Id) in N_Entity);
4043 Set_Flag261 (Id, V);
4044 end Set_Has_Delayed_Rep_Aspects;
4046 procedure Set_Has_Discriminants (Id : E; V : B := True) is
4048 pragma Assert (Nkind (Id) in N_Entity);
4050 end Set_Has_Discriminants;
4052 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
4054 pragma Assert (Ekind (Id) = E_Record_Type
4055 and then Is_Tagged_Type (Id));
4056 Set_Flag220 (Id, V);
4057 end Set_Has_Dispatch_Table;
4059 procedure Set_Has_Dynamic_Predicate_Aspect (Id : E; V : B := True) is
4061 pragma Assert (Is_Type (Id));
4062 Set_Flag258 (Id, V);
4063 end Set_Has_Dynamic_Predicate_Aspect;
4065 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
4067 pragma Assert (Is_Enumeration_Type (Id));
4069 end Set_Has_Enumeration_Rep_Clause;
4071 procedure Set_Has_Exit (Id : E; V : B := True) is
4076 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True) is
4078 pragma Assert (Is_Tagged_Type (Id));
4079 Set_Flag110 (Id, V);
4080 end Set_Has_External_Tag_Rep_Clause;
4082 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
4084 Set_Flag175 (Id, V);
4085 end Set_Has_Forward_Instantiation;
4087 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
4089 Set_Flag173 (Id, V);
4090 end Set_Has_Fully_Qualified_Name;
4092 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
4095 end Set_Has_Gigi_Rep_Item;
4097 procedure Set_Has_Homonym (Id : E; V : B := True) is
4100 end Set_Has_Homonym;
4102 procedure Set_Has_Implicit_Dereference (Id : E; V : B := True) is
4104 Set_Flag251 (Id, V);
4105 end Set_Has_Implicit_Dereference;
4107 procedure Set_Has_Independent_Components (Id : E; V : B := True) is
4109 pragma Assert (Is_Object (Id) or else Is_Type (Id));
4111 end Set_Has_Independent_Components;
4113 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
4115 pragma Assert (Is_Type (Id));
4116 Set_Flag248 (Id, V);
4117 end Set_Has_Inheritable_Invariants;
4119 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
4121 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
4122 Set_Flag219 (Id, V);
4123 end Set_Has_Initial_Value;
4125 procedure Set_Has_Invariants (Id : E; V : B := True) is
4127 pragma Assert (Is_Type (Id));
4128 Set_Flag232 (Id, V);
4129 end Set_Has_Invariants;
4131 procedure Set_Has_Loop_Entry_Attributes (Id : E; V : B := True) is
4133 pragma Assert (Ekind (Id) = E_Loop);
4134 Set_Flag260 (Id, V);
4135 end Set_Has_Loop_Entry_Attributes;
4137 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
4139 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4141 end Set_Has_Machine_Radix_Clause;
4143 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
4146 end Set_Has_Master_Entity;
4148 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
4150 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4151 Set_Flag142 (Id, V);
4152 end Set_Has_Missing_Return;
4154 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
4156 Set_Flag101 (Id, V);
4157 end Set_Has_Nested_Block_With_Handler;
4159 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
4161 pragma Assert (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
4162 Set_Flag215 (Id, V);
4163 end Set_Has_Up_Level_Access;
4165 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
4167 pragma Assert (Id = Base_Type (Id));
4169 end Set_Has_Non_Standard_Rep;
4171 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
4173 pragma Assert (Is_Type (Id));
4174 Set_Flag172 (Id, V);
4175 end Set_Has_Object_Size_Clause;
4177 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
4179 Set_Flag154 (Id, V);
4180 end Set_Has_Per_Object_Constraint;
4182 procedure Set_Has_Postconditions (Id : E; V : B := True) is
4184 pragma Assert (Is_Subprogram (Id));
4185 Set_Flag240 (Id, V);
4186 end Set_Has_Postconditions;
4188 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
4190 pragma Assert (Is_Access_Type (Id));
4191 Set_Flag27 (Base_Type (Id), V);
4192 end Set_Has_Pragma_Controlled;
4194 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
4196 Set_Flag150 (Id, V);
4197 end Set_Has_Pragma_Elaborate_Body;
4199 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
4201 Set_Flag157 (Id, V);
4202 end Set_Has_Pragma_Inline;
4204 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
4206 Set_Flag230 (Id, V);
4207 end Set_Has_Pragma_Inline_Always;
4209 procedure Set_Has_Pragma_No_Inline (Id : E; V : B := True) is
4211 Set_Flag201 (Id, V);
4212 end Set_Has_Pragma_No_Inline;
4214 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
4216 pragma Assert (Is_Enumeration_Type (Id));
4217 pragma Assert (Id = Base_Type (Id));
4218 Set_Flag198 (Id, V);
4219 end Set_Has_Pragma_Ordered;
4221 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
4223 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
4224 pragma Assert (Id = Base_Type (Id));
4225 Set_Flag121 (Id, V);
4226 end Set_Has_Pragma_Pack;
4228 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
4230 Set_Flag221 (Id, V);
4231 end Set_Has_Pragma_Preelab_Init;
4233 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
4235 Set_Flag203 (Id, V);
4236 end Set_Has_Pragma_Pure;
4238 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
4240 Set_Flag179 (Id, V);
4241 end Set_Has_Pragma_Pure_Function;
4243 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
4245 Set_Flag169 (Id, V);
4246 end Set_Has_Pragma_Thread_Local_Storage;
4248 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
4250 Set_Flag233 (Id, V);
4251 end Set_Has_Pragma_Unmodified;
4253 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
4255 Set_Flag180 (Id, V);
4256 end Set_Has_Pragma_Unreferenced;
4258 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
4260 pragma Assert (Is_Type (Id));
4261 Set_Flag212 (Id, V);
4262 end Set_Has_Pragma_Unreferenced_Objects;
4264 procedure Set_Has_Predicates (Id : E; V : B := True) is
4266 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Void);
4267 Set_Flag250 (Id, V);
4268 end Set_Has_Predicates;
4270 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
4272 pragma Assert (Id = Base_Type (Id));
4273 Set_Flag120 (Id, V);
4274 end Set_Has_Primitive_Operations;
4276 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
4278 pragma Assert (Is_Type (Id));
4279 Set_Flag151 (Id, V);
4280 end Set_Has_Private_Ancestor;
4282 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
4284 Set_Flag155 (Id, V);
4285 end Set_Has_Private_Declaration;
4287 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
4289 Set_Flag161 (Id, V);
4290 end Set_Has_Qualified_Name;
4292 procedure Set_Has_RACW (Id : E; V : B := True) is
4294 pragma Assert (Ekind (Id) = E_Package);
4295 Set_Flag214 (Id, V);
4298 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
4300 pragma Assert (Id = Base_Type (Id));
4302 end Set_Has_Record_Rep_Clause;
4304 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
4306 pragma Assert (Is_Subprogram (Id));
4307 Set_Flag143 (Id, V);
4308 end Set_Has_Recursive_Call;
4310 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
4313 end Set_Has_Size_Clause;
4315 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
4318 end Set_Has_Small_Clause;
4320 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
4322 pragma Assert (Id = Base_Type (Id));
4323 Set_Flag100 (Id, V);
4324 end Set_Has_Specified_Layout;
4326 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
4328 pragma Assert (Is_Type (Id));
4329 Set_Flag190 (Id, V);
4330 end Set_Has_Specified_Stream_Input;
4332 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
4334 pragma Assert (Is_Type (Id));
4335 Set_Flag191 (Id, V);
4336 end Set_Has_Specified_Stream_Output;
4338 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
4340 pragma Assert (Is_Type (Id));
4341 Set_Flag192 (Id, V);
4342 end Set_Has_Specified_Stream_Read;
4344 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
4346 pragma Assert (Is_Type (Id));
4347 Set_Flag193 (Id, V);
4348 end Set_Has_Specified_Stream_Write;
4350 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
4352 Set_Flag211 (Id, V);
4353 end Set_Has_Static_Discriminants;
4355 procedure Set_Has_Static_Predicate_Aspect (Id : E; V : B := True) is
4357 pragma Assert (Is_Type (Id));
4358 Set_Flag259 (Id, V);
4359 end Set_Has_Static_Predicate_Aspect;
4361 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
4363 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4364 pragma Assert (Id = Base_Type (Id));
4366 end Set_Has_Storage_Size_Clause;
4368 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4370 pragma Assert (Is_Elementary_Type (Id));
4371 Set_Flag184 (Id, V);
4372 end Set_Has_Stream_Size_Clause;
4374 procedure Set_Has_Task (Id : E; V : B := True) is
4376 pragma Assert (Id = Base_Type (Id));
4380 procedure Set_Has_Thunks (Id : E; V : B := True) is
4382 pragma Assert (Is_Tag (Id));
4383 Set_Flag228 (Id, V);
4386 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4388 pragma Assert (Id = Base_Type (Id));
4389 Set_Flag123 (Id, V);
4390 end Set_Has_Unchecked_Union;
4392 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4394 pragma Assert (Is_Type (Id));
4396 end Set_Has_Unknown_Discriminants;
4398 procedure Set_Has_Visible_Refinement (Id : E; V : B := True) is
4400 pragma Assert (Ekind (Id) = E_Abstract_State);
4401 Set_Flag263 (Id, V);
4402 end Set_Has_Visible_Refinement;
4404 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4406 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4408 end Set_Has_Volatile_Components;
4410 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4412 Set_Flag182 (Id, V);
4413 end Set_Has_Xref_Entry;
4415 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4417 pragma Assert (Ekind (Id) = E_Variable);
4419 end Set_Hiding_Loop_Variable;
4421 procedure Set_Homonym (Id : E; V : E) is
4423 pragma Assert (Id /= V);
4427 procedure Set_Interface_Alias (Id : E; V : E) is
4431 and then Is_Hidden (Id)
4432 and then (Ekind_In (Id, E_Procedure, E_Function)));
4434 end Set_Interface_Alias;
4436 procedure Set_Interfaces (Id : E; V : L) is
4438 pragma Assert (Is_Record_Type (Id));
4439 Set_Elist25 (Id, V);
4442 procedure Set_In_Package_Body (Id : E; V : B := True) is
4445 end Set_In_Package_Body;
4447 procedure Set_In_Private_Part (Id : E; V : B := True) is
4450 end Set_In_Private_Part;
4452 procedure Set_In_Use (Id : E; V : B := True) is
4454 pragma Assert (Nkind (Id) in N_Entity);
4458 procedure Set_Initialization_Statements (Id : E; V : N) is
4460 -- Tolerate an E_Void entity since this can be called while resolving
4461 -- an aggregate used as the initialization expression for an object
4462 -- declaration, and this occurs before the Ekind for the object is set.
4464 pragma Assert (Ekind_In (Id, E_Void, E_Constant, E_Variable));
4466 end Set_Initialization_Statements;
4468 procedure Set_Inner_Instances (Id : E; V : L) is
4470 Set_Elist23 (Id, V);
4471 end Set_Inner_Instances;
4473 procedure Set_Interface_Name (Id : E; V : N) is
4476 end Set_Interface_Name;
4478 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4480 pragma Assert (Is_Overloadable (Id));
4482 end Set_Is_Abstract_Subprogram;
4484 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4486 pragma Assert (Is_Type (Id));
4487 Set_Flag146 (Id, V);
4488 end Set_Is_Abstract_Type;
4490 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4492 pragma Assert (Is_Access_Type (Id));
4493 Set_Flag194 (Id, V);
4494 end Set_Is_Local_Anonymous_Access;
4496 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4498 pragma Assert (Is_Access_Type (Id));
4500 end Set_Is_Access_Constant;
4502 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4504 Set_Flag185 (Id, V);
4505 end Set_Is_Ada_2005_Only;
4507 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4509 Set_Flag199 (Id, V);
4510 end Set_Is_Ada_2012_Only;
4512 procedure Set_Is_Aliased (Id : E; V : B := True) is
4514 pragma Assert (Nkind (Id) in N_Entity);
4518 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
4520 pragma Assert (Is_Entry (Id));
4521 Set_Flag132 (Id, V);
4522 end Set_Is_AST_Entry;
4524 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4527 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4529 end Set_Is_Asynchronous;
4531 procedure Set_Is_Atomic (Id : E; V : B := True) is
4536 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4538 pragma Assert ((not V)
4539 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4540 Set_Flag122 (Id, V);
4541 end Set_Is_Bit_Packed_Array;
4543 procedure Set_Is_Called (Id : E; V : B := True) is
4545 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4546 Set_Flag102 (Id, V);
4549 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4552 end Set_Is_Character_Type;
4554 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4557 end Set_Is_Child_Unit;
4559 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4562 end Set_Is_Class_Wide_Equivalent_Type;
4564 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4566 Set_Flag149 (Id, V);
4567 end Set_Is_Compilation_Unit;
4569 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4571 pragma Assert (Ekind (Id) = E_Discriminant);
4572 Set_Flag103 (Id, V);
4573 end Set_Is_Completely_Hidden;
4575 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4578 end Set_Is_Concurrent_Record_Type;
4580 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4583 end Set_Is_Constr_Subt_For_U_Nominal;
4585 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4587 Set_Flag141 (Id, V);
4588 end Set_Is_Constr_Subt_For_UN_Aliased;
4590 procedure Set_Is_Constrained (Id : E; V : B := True) is
4592 pragma Assert (Nkind (Id) in N_Entity);
4594 end Set_Is_Constrained;
4596 procedure Set_Is_Constructor (Id : E; V : B := True) is
4599 end Set_Is_Constructor;
4601 procedure Set_Is_Controlled (Id : E; V : B := True) is
4603 pragma Assert (Id = Base_Type (Id));
4605 end Set_Is_Controlled;
4607 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4609 pragma Assert (Is_Formal (Id));
4611 end Set_Is_Controlling_Formal;
4613 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4616 end Set_Is_CPP_Class;
4618 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4620 pragma Assert (Is_Type (Id));
4621 Set_Flag223 (Id, V);
4622 end Set_Is_Descendent_Of_Address;
4624 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4626 Set_Flag176 (Id, V);
4627 end Set_Is_Discrim_SO_Function;
4629 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4631 Set_Flag234 (Id, V);
4632 end Set_Is_Dispatch_Table_Entity;
4634 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4639 Is_Overloadable (Id)
4641 Ekind (Id) = E_Subprogram_Type);
4644 end Set_Is_Dispatching_Operation;
4646 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4648 Set_Flag124 (Id, V);
4649 end Set_Is_Eliminated;
4651 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4654 end Set_Is_Entry_Formal;
4656 procedure Set_Is_Exported (Id : E; V : B := True) is
4659 end Set_Is_Exported;
4661 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4664 end Set_Is_First_Subtype;
4666 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4668 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4669 Set_Flag118 (Id, V);
4670 end Set_Is_For_Access_Subtype;
4672 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4674 Set_Flag111 (Id, V);
4675 end Set_Is_Formal_Subprogram;
4677 procedure Set_Is_Frozen (Id : E; V : B := True) is
4679 pragma Assert (Nkind (Id) in N_Entity);
4683 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4685 pragma Assert (Is_Type (Id));
4687 end Set_Is_Generic_Actual_Type;
4689 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4691 Set_Flag130 (Id, V);
4692 end Set_Is_Generic_Instance;
4694 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4696 pragma Assert (Nkind (Id) in N_Entity);
4698 end Set_Is_Generic_Type;
4700 procedure Set_Is_Hidden (Id : E; V : B := True) is
4705 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4707 Set_Flag171 (Id, V);
4708 end Set_Is_Hidden_Open_Scope;
4710 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4712 pragma Assert (Nkind (Id) in N_Entity);
4714 end Set_Is_Immediately_Visible;
4716 procedure Set_Is_Implementation_Defined (Id : E; V : B := True) is
4718 Set_Flag254 (Id, V);
4719 end Set_Is_Implementation_Defined;
4721 procedure Set_Is_Imported (Id : E; V : B := True) is
4724 end Set_Is_Imported;
4726 procedure Set_Is_Inlined (Id : E; V : B := True) is
4731 procedure Set_Is_Interface (Id : E; V : B := True) is
4733 pragma Assert (Is_Record_Type (Id));
4734 Set_Flag186 (Id, V);
4735 end Set_Is_Interface;
4737 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4739 Set_Flag126 (Id, V);
4740 end Set_Is_Instantiated;
4742 procedure Set_Is_Internal (Id : E; V : B := True) is
4744 pragma Assert (Nkind (Id) in N_Entity);
4746 end Set_Is_Internal;
4748 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4750 pragma Assert (Nkind (Id) in N_Entity);
4752 end Set_Is_Interrupt_Handler;
4754 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4757 end Set_Is_Intrinsic_Subprogram;
4759 procedure Set_Is_Invariant_Procedure (Id : E; V : B := True) is
4761 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4762 Set_Flag257 (Id, V);
4763 end Set_Is_Invariant_Procedure;
4765 procedure Set_Is_Itype (Id : E; V : B := True) is
4770 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4773 end Set_Is_Known_Non_Null;
4775 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4777 Set_Flag204 (Id, V);
4778 end Set_Is_Known_Null;
4780 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4782 Set_Flag170 (Id, V);
4783 end Set_Is_Known_Valid;
4785 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4787 pragma Assert (Is_Type (Id));
4788 Set_Flag106 (Id, V);
4789 end Set_Is_Limited_Composite;
4791 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4793 pragma Assert (Is_Interface (Id));
4794 Set_Flag197 (Id, V);
4795 end Set_Is_Limited_Interface;
4797 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4800 end Set_Is_Limited_Record;
4802 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4804 pragma Assert (Is_Subprogram (Id));
4805 Set_Flag137 (Id, V);
4806 end Set_Is_Machine_Code_Subprogram;
4808 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4810 pragma Assert (Is_Type (Id));
4811 Set_Flag109 (Id, V);
4812 end Set_Is_Non_Static_Subtype;
4814 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4816 pragma Assert (Ekind (Id) = E_Procedure);
4817 Set_Flag178 (Id, V);
4818 end Set_Is_Null_Init_Proc;
4820 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4822 Set_Flag153 (Id, V);
4823 end Set_Is_Obsolescent;
4825 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
4827 pragma Assert (Ekind (Id) = E_Out_Parameter);
4828 Set_Flag226 (Id, V);
4829 end Set_Is_Only_Out_Parameter;
4831 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
4833 pragma Assert (Is_Formal (Id));
4834 Set_Flag134 (Id, V);
4835 end Set_Is_Optional_Parameter;
4837 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
4839 Set_Flag160 (Id, V);
4840 end Set_Is_Package_Body_Entity;
4842 procedure Set_Is_Packed (Id : E; V : B := True) is
4844 pragma Assert (Id = Base_Type (Id));
4848 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
4850 Set_Flag138 (Id, V);
4851 end Set_Is_Packed_Array_Type;
4853 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
4855 pragma Assert (Nkind (Id) in N_Entity);
4857 end Set_Is_Potentially_Use_Visible;
4859 procedure Set_Is_Predicate_Function (Id : E; V : B := True) is
4861 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4862 Set_Flag255 (Id, V);
4863 end Set_Is_Predicate_Function;
4865 procedure Set_Is_Predicate_Function_M (Id : E; V : B := True) is
4867 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4868 Set_Flag256 (Id, V);
4869 end Set_Is_Predicate_Function_M;
4871 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
4874 end Set_Is_Preelaborated;
4876 procedure Set_Is_Primitive (Id : E; V : B := True) is
4879 (Is_Overloadable (Id)
4880 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
4881 Set_Flag218 (Id, V);
4882 end Set_Is_Primitive;
4884 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
4886 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4887 Set_Flag195 (Id, V);
4888 end Set_Is_Primitive_Wrapper;
4890 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
4892 pragma Assert (Is_Type (Id));
4893 Set_Flag107 (Id, V);
4894 end Set_Is_Private_Composite;
4896 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
4899 end Set_Is_Private_Descendant;
4901 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
4903 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4904 Set_Flag245 (Id, V);
4905 end Set_Is_Private_Primitive;
4907 procedure Set_Is_Processed_Transient (Id : E; V : B := True) is
4909 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
4910 Set_Flag252 (Id, V);
4911 end Set_Is_Processed_Transient;
4913 procedure Set_Is_Public (Id : E; V : B := True) is
4915 pragma Assert (Nkind (Id) in N_Entity);
4919 procedure Set_Is_Pure (Id : E; V : B := True) is
4924 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
4926 pragma Assert (Is_Access_Type (Id));
4927 Set_Flag189 (Id, V);
4928 end Set_Is_Pure_Unit_Access_Type;
4930 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
4932 pragma Assert (Is_Type (Id));
4933 Set_Flag244 (Id, V);
4934 end Set_Is_RACW_Stub_Type;
4936 procedure Set_Is_Raised (Id : E; V : B := True) is
4938 pragma Assert (Ekind (Id) = E_Exception);
4939 Set_Flag224 (Id, V);
4942 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
4945 end Set_Is_Remote_Call_Interface;
4947 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
4950 end Set_Is_Remote_Types;
4952 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
4954 Set_Flag112 (Id, V);
4955 end Set_Is_Renaming_Of_Object;
4957 procedure Set_Is_Return_Object (Id : E; V : B := True) is
4959 Set_Flag209 (Id, V);
4960 end Set_Is_Return_Object;
4962 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
4964 pragma Assert (Ekind (Id) = E_Variable);
4965 Set_Flag249 (Id, V);
4966 end Set_Is_Safe_To_Reevaluate;
4968 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
4971 end Set_Is_Shared_Passive;
4973 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
4977 or else Ekind_In (Id, E_Exception,
4982 end Set_Is_Statically_Allocated;
4984 procedure Set_Is_Tag (Id : E; V : B := True) is
4986 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
4990 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
4993 end Set_Is_Tagged_Type;
4995 procedure Set_Is_Thunk (Id : E; V : B := True) is
4997 pragma Assert (Is_Subprogram (Id));
4998 Set_Flag225 (Id, V);
5001 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
5003 Set_Flag235 (Id, V);
5004 end Set_Is_Trivial_Subprogram;
5006 procedure Set_Is_True_Constant (Id : E; V : B := True) is
5008 Set_Flag163 (Id, V);
5009 end Set_Is_True_Constant;
5011 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
5013 pragma Assert (Id = Base_Type (Id));
5014 Set_Flag117 (Id, V);
5015 end Set_Is_Unchecked_Union;
5017 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
5019 pragma Assert (Ekind (Id) = E_Record_Type);
5020 Set_Flag246 (Id, V);
5021 end Set_Is_Underlying_Record_View;
5023 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
5025 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
5026 Set_Flag144 (Id, V);
5027 end Set_Is_Unsigned_Type;
5029 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
5031 pragma Assert (Ekind (Id) = E_Procedure);
5032 Set_Flag127 (Id, V);
5033 end Set_Is_Valued_Procedure;
5035 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
5037 Set_Flag206 (Id, V);
5038 end Set_Is_Visible_Formal;
5040 procedure Set_Is_Visible_Lib_Unit (Id : E; V : B := True) is
5042 Set_Flag116 (Id, V);
5043 end Set_Is_Visible_Lib_Unit;
5045 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
5047 pragma Assert (Ekind (Id) = E_Exception);
5048 Set_Flag133 (Id, V);
5049 end Set_Is_VMS_Exception;
5051 procedure Set_Is_Volatile (Id : E; V : B := True) is
5053 pragma Assert (Nkind (Id) in N_Entity);
5055 end Set_Is_Volatile;
5057 procedure Set_Itype_Printed (Id : E; V : B := True) is
5059 pragma Assert (Is_Itype (Id));
5060 Set_Flag202 (Id, V);
5061 end Set_Itype_Printed;
5063 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
5066 end Set_Kill_Elaboration_Checks;
5068 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
5071 end Set_Kill_Range_Checks;
5073 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
5075 pragma Assert (Is_Type (Id));
5076 Set_Flag207 (Id, V);
5077 end Set_Known_To_Have_Preelab_Init;
5079 procedure Set_Last_Assignment (Id : E; V : N) is
5081 pragma Assert (Is_Assignable (Id));
5083 end Set_Last_Assignment;
5085 procedure Set_Last_Entity (Id : E; V : E) is
5088 end Set_Last_Entity;
5090 procedure Set_Limited_View (Id : E; V : E) is
5092 pragma Assert (Ekind (Id) = E_Package);
5094 end Set_Limited_View;
5096 procedure Set_Lit_Indexes (Id : E; V : E) is
5098 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5100 end Set_Lit_Indexes;
5102 procedure Set_Lit_Strings (Id : E; V : E) is
5104 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5106 end Set_Lit_Strings;
5108 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
5110 pragma Assert (Is_Formal (Id));
5111 Set_Flag205 (Id, V);
5112 end Set_Low_Bound_Tested;
5114 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
5116 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
5118 end Set_Machine_Radix_10;
5120 procedure Set_Master_Id (Id : E; V : E) is
5122 pragma Assert (Is_Access_Type (Id));
5126 procedure Set_Materialize_Entity (Id : E; V : B := True) is
5128 Set_Flag168 (Id, V);
5129 end Set_Materialize_Entity;
5131 procedure Set_May_Inherit_Delayed_Rep_Aspects (Id : E; V : B := True) is
5133 Set_Flag262 (Id, V);
5134 end Set_May_Inherit_Delayed_Rep_Aspects;
5136 procedure Set_Mechanism (Id : E; V : M) is
5138 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
5139 Set_Uint8 (Id, UI_From_Int (V));
5142 procedure Set_Modulus (Id : E; V : U) is
5144 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
5148 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
5150 pragma Assert (Is_Type (Id));
5151 Set_Flag183 (Id, V);
5152 end Set_Must_Be_On_Byte_Boundary;
5154 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
5156 pragma Assert (Is_Type (Id));
5157 Set_Flag208 (Id, V);
5158 end Set_Must_Have_Preelab_Init;
5160 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
5162 Set_Flag147 (Id, V);
5163 end Set_Needs_Debug_Info;
5165 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
5168 (Is_Overloadable (Id)
5169 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
5171 end Set_Needs_No_Actuals;
5173 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
5175 Set_Flag115 (Id, V);
5176 end Set_Never_Set_In_Source;
5178 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
5181 end Set_Next_Inlined_Subprogram;
5183 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
5185 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5186 Set_Flag131 (Id, V);
5187 end Set_No_Pool_Assigned;
5189 procedure Set_No_Return (Id : E; V : B := True) is
5192 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
5193 Set_Flag113 (Id, V);
5196 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
5198 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5199 Set_Flag136 (Id, V);
5200 end Set_No_Strict_Aliasing;
5202 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
5204 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5206 end Set_Non_Binary_Modulus;
5208 procedure Set_Non_Limited_View (Id : E; V : E) is
5211 (Ekind (Id) in Incomplete_Kind or else Ekind (Id) = E_Abstract_State);
5213 end Set_Non_Limited_View;
5215 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
5218 (Root_Type (Id) = Standard_Boolean
5219 and then Ekind (Id) = E_Enumeration_Type);
5220 Set_Flag162 (Id, V);
5221 end Set_Nonzero_Is_True;
5223 procedure Set_Normalized_First_Bit (Id : E; V : U) is
5225 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5227 end Set_Normalized_First_Bit;
5229 procedure Set_Normalized_Position (Id : E; V : U) is
5231 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5233 end Set_Normalized_Position;
5235 procedure Set_Normalized_Position_Max (Id : E; V : U) is
5237 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5239 end Set_Normalized_Position_Max;
5241 procedure Set_OK_To_Rename (Id : E; V : B := True) is
5243 pragma Assert (Ekind (Id) = E_Variable);
5244 Set_Flag247 (Id, V);
5245 end Set_OK_To_Rename;
5247 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
5250 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5251 Set_Flag239 (Id, V);
5252 end Set_OK_To_Reorder_Components;
5254 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
5257 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5258 Set_Flag241 (Id, V);
5259 end Set_Optimize_Alignment_Space;
5261 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
5264 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5265 Set_Flag242 (Id, V);
5266 end Set_Optimize_Alignment_Time;
5268 procedure Set_Original_Access_Type (Id : E; V : E) is
5270 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
5272 end Set_Original_Access_Type;
5274 procedure Set_Original_Array_Type (Id : E; V : E) is
5276 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
5278 end Set_Original_Array_Type;
5280 procedure Set_Original_Record_Component (Id : E; V : E) is
5282 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
5284 end Set_Original_Record_Component;
5286 procedure Set_Overlays_Constant (Id : E; V : B := True) is
5288 Set_Flag243 (Id, V);
5289 end Set_Overlays_Constant;
5291 procedure Set_Overridden_Operation (Id : E; V : E) is
5294 end Set_Overridden_Operation;
5296 procedure Set_Package_Instantiation (Id : E; V : N) is
5298 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
5300 end Set_Package_Instantiation;
5302 procedure Set_Packed_Array_Type (Id : E; V : E) is
5304 pragma Assert (Is_Array_Type (Id));
5306 end Set_Packed_Array_Type;
5308 procedure Set_Parent_Subtype (Id : E; V : E) is
5310 pragma Assert (Ekind (Id) = E_Record_Type);
5312 end Set_Parent_Subtype;
5314 procedure Set_Postcondition_Proc (Id : E; V : E) is
5316 pragma Assert (Ekind (Id) = E_Procedure);
5318 end Set_Postcondition_Proc;
5320 procedure Set_PPC_Wrapper (Id : E; V : E) is
5322 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
5324 end Set_PPC_Wrapper;
5326 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
5328 pragma Assert (Is_Tagged_Type (Id));
5329 Set_Elist10 (Id, V);
5330 end Set_Direct_Primitive_Operations;
5332 procedure Set_Prival (Id : E; V : E) is
5334 pragma Assert (Is_Protected_Component (Id));
5338 procedure Set_Prival_Link (Id : E; V : E) is
5340 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5342 end Set_Prival_Link;
5344 procedure Set_Private_Dependents (Id : E; V : L) is
5346 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
5347 Set_Elist18 (Id, V);
5348 end Set_Private_Dependents;
5350 procedure Set_Private_View (Id : E; V : N) is
5352 pragma Assert (Is_Private_Type (Id));
5354 end Set_Private_View;
5356 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
5358 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
5360 end Set_Protected_Body_Subprogram;
5362 procedure Set_Protected_Formal (Id : E; V : E) is
5364 pragma Assert (Is_Formal (Id));
5366 end Set_Protected_Formal;
5368 procedure Set_Protection_Object (Id : E; V : E) is
5370 pragma Assert (Ekind_In (Id, E_Entry,
5375 end Set_Protection_Object;
5377 procedure Set_Reachable (Id : E; V : B := True) is
5382 procedure Set_Referenced (Id : E; V : B := True) is
5384 Set_Flag156 (Id, V);
5387 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
5390 end Set_Referenced_As_LHS;
5392 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
5394 Set_Flag227 (Id, V);
5395 end Set_Referenced_As_Out_Parameter;
5397 procedure Set_Refined_State (Id : E; V : E) is
5399 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
5401 end Set_Refined_State;
5403 procedure Set_Refinement_Constituents (Id : E; V : L) is
5405 pragma Assert (Ekind (Id) = E_Abstract_State);
5407 end Set_Refinement_Constituents;
5409 procedure Set_Register_Exception_Call (Id : E; V : N) is
5411 pragma Assert (Ekind (Id) = E_Exception);
5413 end Set_Register_Exception_Call;
5415 procedure Set_Related_Array_Object (Id : E; V : E) is
5417 pragma Assert (Is_Array_Type (Id));
5419 end Set_Related_Array_Object;
5421 procedure Set_Related_Expression (Id : E; V : N) is
5423 pragma Assert (Ekind (Id) in Type_Kind
5424 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
5426 end Set_Related_Expression;
5428 procedure Set_Related_Instance (Id : E; V : E) is
5430 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
5432 end Set_Related_Instance;
5434 procedure Set_Related_Type (Id : E; V : E) is
5436 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5438 end Set_Related_Type;
5440 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5442 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
5444 end Set_Relative_Deadline_Variable;
5446 procedure Set_Renamed_Entity (Id : E; V : N) is
5449 end Set_Renamed_Entity;
5451 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5453 pragma Assert (Ekind (Id) = E_Package);
5454 Set_Flag231 (Id, V);
5455 end Set_Renamed_In_Spec;
5457 procedure Set_Renamed_Object (Id : E; V : N) is
5460 end Set_Renamed_Object;
5462 procedure Set_Renaming_Map (Id : E; V : U) is
5465 end Set_Renaming_Map;
5467 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5469 pragma Assert (Is_Overloadable (Id));
5470 Set_Flag213 (Id, V);
5471 end Set_Requires_Overriding;
5473 procedure Set_Return_Present (Id : E; V : B := True) is
5476 end Set_Return_Present;
5478 procedure Set_Return_Applies_To (Id : E; V : N) is
5481 end Set_Return_Applies_To;
5483 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5486 end Set_Returns_By_Ref;
5488 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5491 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5492 Set_Flag164 (Id, V);
5493 end Set_Reverse_Bit_Order;
5495 procedure Set_Reverse_Storage_Order (Id : E; V : B := True) is
5499 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5501 end Set_Reverse_Storage_Order;
5503 procedure Set_RM_Size (Id : E; V : U) is
5505 pragma Assert (Is_Type (Id));
5509 procedure Set_Scalar_Range (Id : E; V : N) is
5512 end Set_Scalar_Range;
5514 procedure Set_Scale_Value (Id : E; V : U) is
5517 end Set_Scale_Value;
5519 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5521 pragma Assert (not Is_Record_Type (Id));
5523 end Set_Scope_Depth_Value;
5525 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5527 Set_Flag167 (Id, V);
5528 end Set_Sec_Stack_Needed_For_Return;
5530 procedure Set_Shadow_Entities (Id : E; V : S) is
5532 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5534 end Set_Shadow_Entities;
5536 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5538 pragma Assert (Ekind (Id) = E_Variable);
5540 end Set_Shared_Var_Procs_Instance;
5542 procedure Set_Size_Check_Code (Id : E; V : N) is
5544 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5546 end Set_Size_Check_Code;
5548 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5550 Set_Flag177 (Id, V);
5551 end Set_Size_Depends_On_Discriminant;
5553 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5556 end Set_Size_Known_At_Compile_Time;
5558 procedure Set_Small_Value (Id : E; V : R) is
5560 pragma Assert (Is_Fixed_Point_Type (Id));
5561 Set_Ureal21 (Id, V);
5562 end Set_Small_Value;
5564 procedure Set_SPARK_Aux_Pragma (Id : E; V : N) is
5567 (Ekind_In (Id, E_Generic_Package, -- package variants
5572 end Set_SPARK_Aux_Pragma;
5574 procedure Set_SPARK_Aux_Pragma_Inherited (Id : E; V : B := True) is
5577 (Ekind_In (Id, E_Generic_Package, -- package variants
5581 Set_Flag266 (Id, V);
5582 end Set_SPARK_Aux_Pragma_Inherited;
5584 procedure Set_SPARK_Pragma (Id : E; V : N) is
5587 (Ekind_In (Id, E_Function, -- subprogram variants
5589 E_Generic_Procedure,
5593 Ekind_In (Id, E_Generic_Package, -- package variants
5598 end Set_SPARK_Pragma;
5600 procedure Set_SPARK_Pragma_Inherited (Id : E; V : B := True) is
5603 (Ekind_In (Id, E_Function, -- subprogram variants
5605 E_Generic_Procedure,
5609 Ekind_In (Id, E_Generic_Package, -- package variants
5613 Set_Flag265 (Id, V);
5614 end Set_SPARK_Pragma_Inherited;
5616 procedure Set_Spec_Entity (Id : E; V : E) is
5618 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5620 end Set_Spec_Entity;
5622 procedure Set_Static_Predicate (Id : E; V : S) is
5625 (Ekind_In (Id, E_Enumeration_Subtype,
5626 E_Modular_Integer_Subtype,
5627 E_Signed_Integer_Subtype)
5628 and then Has_Predicates (Id));
5630 end Set_Static_Predicate;
5632 procedure Set_Status_Flag_Or_Transient_Decl (Id : E; V : E) is
5634 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5636 end Set_Status_Flag_Or_Transient_Decl;
5638 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5640 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5641 pragma Assert (Id = Base_Type (Id));
5643 end Set_Storage_Size_Variable;
5645 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5647 pragma Assert (Ekind (Id) = E_Package);
5649 end Set_Static_Elaboration_Desired;
5651 procedure Set_Static_Initialization (Id : E; V : N) is
5654 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5656 end Set_Static_Initialization;
5658 procedure Set_Stored_Constraint (Id : E; V : L) is
5660 pragma Assert (Nkind (Id) in N_Entity);
5661 Set_Elist23 (Id, V);
5662 end Set_Stored_Constraint;
5664 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5666 pragma Assert (Id = Base_Type (Id));
5667 Set_Flag145 (Id, V);
5668 end Set_Strict_Alignment;
5670 procedure Set_String_Literal_Length (Id : E; V : U) is
5672 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5674 end Set_String_Literal_Length;
5676 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5678 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5680 end Set_String_Literal_Low_Bound;
5682 procedure Set_Subprograms_For_Type (Id : E; V : E) is
5684 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
5686 end Set_Subprograms_For_Type;
5688 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5690 Set_Flag148 (Id, V);
5691 end Set_Suppress_Elaboration_Warnings;
5693 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
5695 pragma Assert (Is_Type (Id));
5696 Set_Flag105 (Id, V);
5697 end Set_Suppress_Initialization;
5699 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5701 Set_Flag165 (Id, V);
5702 end Set_Suppress_Style_Checks;
5704 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5706 Set_Flag217 (Id, V);
5707 end Set_Suppress_Value_Tracking_On_Call;
5709 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5711 pragma Assert (Ekind (Id) in Task_Kind);
5713 end Set_Task_Body_Procedure;
5715 procedure Set_Thunk_Entity (Id : E; V : E) is
5717 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5718 and then Is_Thunk (Id));
5720 end Set_Thunk_Entity;
5722 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5725 end Set_Treat_As_Volatile;
5727 procedure Set_Underlying_Full_View (Id : E; V : E) is
5729 pragma Assert (Ekind (Id) in Private_Kind);
5731 end Set_Underlying_Full_View;
5733 procedure Set_Underlying_Record_View (Id : E; V : E) is
5735 pragma Assert (Ekind (Id) = E_Record_Type);
5737 end Set_Underlying_Record_View;
5739 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5741 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5742 Set_Flag216 (Id, V);
5743 end Set_Universal_Aliasing;
5745 procedure Set_Unset_Reference (Id : E; V : N) is
5748 end Set_Unset_Reference;
5750 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5752 Set_Flag222 (Id, V);
5753 end Set_Used_As_Generic_Actual;
5755 procedure Set_Uses_Lock_Free (Id : E; V : B := True) is
5757 pragma Assert (Ekind (Id) = E_Protected_Type);
5758 Set_Flag188 (Id, V);
5759 end Set_Uses_Lock_Free;
5761 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5764 end Set_Uses_Sec_Stack;
5766 procedure Set_Warnings_Off (Id : E; V : B := True) is
5769 end Set_Warnings_Off;
5771 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
5773 Set_Flag236 (Id, V);
5774 end Set_Warnings_Off_Used;
5776 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
5778 Set_Flag237 (Id, V);
5779 end Set_Warnings_Off_Used_Unmodified;
5781 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
5783 Set_Flag238 (Id, V);
5784 end Set_Warnings_Off_Used_Unreferenced;
5786 procedure Set_Was_Hidden (Id : E; V : B := True) is
5788 Set_Flag196 (Id, V);
5791 procedure Set_Wrapped_Entity (Id : E; V : E) is
5793 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5794 and then Is_Primitive_Wrapper (Id));
5796 end Set_Wrapped_Entity;
5798 -----------------------------------
5799 -- Field Initialization Routines --
5800 -----------------------------------
5802 procedure Init_Alignment (Id : E) is
5804 Set_Uint14 (Id, Uint_0);
5807 procedure Init_Alignment (Id : E; V : Int) is
5809 Set_Uint14 (Id, UI_From_Int (V));
5812 procedure Init_Component_Bit_Offset (Id : E) is
5814 Set_Uint11 (Id, No_Uint);
5815 end Init_Component_Bit_Offset;
5817 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
5819 Set_Uint11 (Id, UI_From_Int (V));
5820 end Init_Component_Bit_Offset;
5822 procedure Init_Component_Size (Id : E) is
5824 Set_Uint22 (Id, Uint_0);
5825 end Init_Component_Size;
5827 procedure Init_Component_Size (Id : E; V : Int) is
5829 Set_Uint22 (Id, UI_From_Int (V));
5830 end Init_Component_Size;
5832 procedure Init_Digits_Value (Id : E) is
5834 Set_Uint17 (Id, Uint_0);
5835 end Init_Digits_Value;
5837 procedure Init_Digits_Value (Id : E; V : Int) is
5839 Set_Uint17 (Id, UI_From_Int (V));
5840 end Init_Digits_Value;
5842 procedure Init_Esize (Id : E) is
5844 Set_Uint12 (Id, Uint_0);
5847 procedure Init_Esize (Id : E; V : Int) is
5849 Set_Uint12 (Id, UI_From_Int (V));
5852 procedure Init_Normalized_First_Bit (Id : E) is
5854 Set_Uint8 (Id, No_Uint);
5855 end Init_Normalized_First_Bit;
5857 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
5859 Set_Uint8 (Id, UI_From_Int (V));
5860 end Init_Normalized_First_Bit;
5862 procedure Init_Normalized_Position (Id : E) is
5864 Set_Uint14 (Id, No_Uint);
5865 end Init_Normalized_Position;
5867 procedure Init_Normalized_Position (Id : E; V : Int) is
5869 Set_Uint14 (Id, UI_From_Int (V));
5870 end Init_Normalized_Position;
5872 procedure Init_Normalized_Position_Max (Id : E) is
5874 Set_Uint10 (Id, No_Uint);
5875 end Init_Normalized_Position_Max;
5877 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
5879 Set_Uint10 (Id, UI_From_Int (V));
5880 end Init_Normalized_Position_Max;
5882 procedure Init_RM_Size (Id : E) is
5884 Set_Uint13 (Id, Uint_0);
5887 procedure Init_RM_Size (Id : E; V : Int) is
5889 Set_Uint13 (Id, UI_From_Int (V));
5892 -----------------------------
5893 -- Init_Component_Location --
5894 -----------------------------
5896 procedure Init_Component_Location (Id : E) is
5898 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
5899 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
5900 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
5901 Set_Uint12 (Id, Uint_0); -- Esize
5902 Set_Uint14 (Id, No_Uint); -- Normalized_Position
5903 end Init_Component_Location;
5905 ----------------------------
5906 -- Init_Object_Size_Align --
5907 ----------------------------
5909 procedure Init_Object_Size_Align (Id : E) is
5911 Set_Uint12 (Id, Uint_0); -- Esize
5912 Set_Uint14 (Id, Uint_0); -- Alignment
5913 end Init_Object_Size_Align;
5919 procedure Init_Size (Id : E; V : Int) is
5921 pragma Assert (not Is_Object (Id));
5922 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
5923 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
5926 ---------------------
5927 -- Init_Size_Align --
5928 ---------------------
5930 procedure Init_Size_Align (Id : E) is
5932 pragma Assert (not Is_Object (Id));
5933 Set_Uint12 (Id, Uint_0); -- Esize
5934 Set_Uint13 (Id, Uint_0); -- RM_Size
5935 Set_Uint14 (Id, Uint_0); -- Alignment
5936 end Init_Size_Align;
5938 ----------------------------------------------
5939 -- Type Representation Attribute Predicates --
5940 ----------------------------------------------
5942 function Known_Alignment (E : Entity_Id) return B is
5944 return Uint14 (E) /= Uint_0
5945 and then Uint14 (E) /= No_Uint;
5946 end Known_Alignment;
5948 function Known_Component_Bit_Offset (E : Entity_Id) return B is
5950 return Uint11 (E) /= No_Uint;
5951 end Known_Component_Bit_Offset;
5953 function Known_Component_Size (E : Entity_Id) return B is
5955 return Uint22 (Base_Type (E)) /= Uint_0
5956 and then Uint22 (Base_Type (E)) /= No_Uint;
5957 end Known_Component_Size;
5959 function Known_Esize (E : Entity_Id) return B is
5961 return Uint12 (E) /= Uint_0
5962 and then Uint12 (E) /= No_Uint;
5965 function Known_Normalized_First_Bit (E : Entity_Id) return B is
5967 return Uint8 (E) /= No_Uint;
5968 end Known_Normalized_First_Bit;
5970 function Known_Normalized_Position (E : Entity_Id) return B is
5972 return Uint14 (E) /= No_Uint;
5973 end Known_Normalized_Position;
5975 function Known_Normalized_Position_Max (E : Entity_Id) return B is
5977 return Uint10 (E) /= No_Uint;
5978 end Known_Normalized_Position_Max;
5980 function Known_RM_Size (E : Entity_Id) return B is
5982 return Uint13 (E) /= No_Uint
5983 and then (Uint13 (E) /= Uint_0
5984 or else Is_Discrete_Type (E)
5985 or else Is_Fixed_Point_Type (E));
5988 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
5990 return Uint11 (E) /= No_Uint
5991 and then Uint11 (E) >= Uint_0;
5992 end Known_Static_Component_Bit_Offset;
5994 function Known_Static_Component_Size (E : Entity_Id) return B is
5996 return Uint22 (Base_Type (E)) > Uint_0;
5997 end Known_Static_Component_Size;
5999 function Known_Static_Esize (E : Entity_Id) return B is
6001 return Uint12 (E) > Uint_0
6002 and then not Is_Generic_Type (E);
6003 end Known_Static_Esize;
6005 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
6007 return Uint8 (E) /= No_Uint
6008 and then Uint8 (E) >= Uint_0;
6009 end Known_Static_Normalized_First_Bit;
6011 function Known_Static_Normalized_Position (E : Entity_Id) return B is
6013 return Uint14 (E) /= No_Uint
6014 and then Uint14 (E) >= Uint_0;
6015 end Known_Static_Normalized_Position;
6017 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
6019 return Uint10 (E) /= No_Uint
6020 and then Uint10 (E) >= Uint_0;
6021 end Known_Static_Normalized_Position_Max;
6023 function Known_Static_RM_Size (E : Entity_Id) return B is
6025 return (Uint13 (E) > Uint_0
6026 or else Is_Discrete_Type (E)
6027 or else Is_Fixed_Point_Type (E))
6028 and then not Is_Generic_Type (E);
6029 end Known_Static_RM_Size;
6031 function Unknown_Alignment (E : Entity_Id) return B is
6033 return Uint14 (E) = Uint_0
6034 or else Uint14 (E) = No_Uint;
6035 end Unknown_Alignment;
6037 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
6039 return Uint11 (E) = No_Uint;
6040 end Unknown_Component_Bit_Offset;
6042 function Unknown_Component_Size (E : Entity_Id) return B is
6044 return Uint22 (Base_Type (E)) = Uint_0
6046 Uint22 (Base_Type (E)) = No_Uint;
6047 end Unknown_Component_Size;
6049 function Unknown_Esize (E : Entity_Id) return B is
6051 return Uint12 (E) = No_Uint
6053 Uint12 (E) = Uint_0;
6056 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
6058 return Uint8 (E) = No_Uint;
6059 end Unknown_Normalized_First_Bit;
6061 function Unknown_Normalized_Position (E : Entity_Id) return B is
6063 return Uint14 (E) = No_Uint;
6064 end Unknown_Normalized_Position;
6066 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
6068 return Uint10 (E) = No_Uint;
6069 end Unknown_Normalized_Position_Max;
6071 function Unknown_RM_Size (E : Entity_Id) return B is
6073 return (Uint13 (E) = Uint_0
6074 and then not Is_Discrete_Type (E)
6075 and then not Is_Fixed_Point_Type (E))
6076 or else Uint13 (E) = No_Uint;
6077 end Unknown_RM_Size;
6079 --------------------
6080 -- Address_Clause --
6081 --------------------
6083 function Address_Clause (Id : E) return N is
6085 return Get_Attribute_Definition_Clause (Id, Attribute_Address);
6092 function Aft_Value (Id : E) return U is
6094 Delta_Val : Ureal := Delta_Value (Id);
6096 while Delta_Val < Ureal_Tenth loop
6097 Delta_Val := Delta_Val * Ureal_10;
6098 Result := Result + 1;
6101 return UI_From_Int (Result);
6104 ----------------------
6105 -- Alignment_Clause --
6106 ----------------------
6108 function Alignment_Clause (Id : E) return N is
6110 return Get_Attribute_Definition_Clause (Id, Attribute_Alignment);
6111 end Alignment_Clause;
6117 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
6119 if Last_Entity (V) = Empty then
6120 Set_First_Entity (Id => V, V => Id);
6122 Set_Next_Entity (Last_Entity (V), Id);
6125 Set_Next_Entity (Id, Empty);
6127 Set_Last_Entity (Id => V, V => Id);
6134 function Base_Type (Id : E) return E is
6136 if Is_Base_Type (Id) then
6139 pragma Assert (Is_Type (Id));
6144 -------------------------
6145 -- Component_Alignment --
6146 -------------------------
6148 -- Component Alignment is encoded using two flags, Flag128/129 as
6149 -- follows. Note that both flags False = Align_Default, so that the
6150 -- default initialization of flags to False initializes component
6151 -- alignment to the default value as required.
6153 -- Flag128 Flag129 Value
6154 -- ------- ------- -----
6155 -- False False Calign_Default
6156 -- False True Calign_Component_Size
6157 -- True False Calign_Component_Size_4
6158 -- True True Calign_Storage_Unit
6160 function Component_Alignment (Id : E) return C is
6161 BT : constant Node_Id := Base_Type (Id);
6164 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
6166 if Flag128 (BT) then
6167 if Flag129 (BT) then
6168 return Calign_Storage_Unit;
6170 return Calign_Component_Size_4;
6174 if Flag129 (BT) then
6175 return Calign_Component_Size;
6177 return Calign_Default;
6180 end Component_Alignment;
6182 ----------------------
6183 -- Declaration_Node --
6184 ----------------------
6186 function Declaration_Node (Id : E) return N is
6190 if Ekind (Id) = E_Incomplete_Type
6191 and then Present (Full_View (Id))
6193 P := Parent (Full_View (Id));
6199 if Nkind (P) /= N_Selected_Component
6200 and then Nkind (P) /= N_Expanded_Name
6202 not (Nkind (P) = N_Defining_Program_Unit_Name
6203 and then Is_Child_Unit (Id))
6210 end Declaration_Node;
6212 ---------------------
6213 -- Designated_Type --
6214 ---------------------
6216 function Designated_Type (Id : E) return E is
6220 Desig_Type := Directly_Designated_Type (Id);
6222 if Ekind (Desig_Type) = E_Incomplete_Type
6223 and then Present (Full_View (Desig_Type))
6225 return Full_View (Desig_Type);
6227 elsif Is_Class_Wide_Type (Desig_Type)
6228 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
6229 and then Present (Full_View (Etype (Desig_Type)))
6230 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
6232 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
6237 end Designated_Type;
6239 ----------------------
6240 -- Entry_Index_Type --
6241 ----------------------
6243 function Entry_Index_Type (Id : E) return N is
6245 pragma Assert (Ekind (Id) = E_Entry_Family);
6246 return Etype (Discrete_Subtype_Definition (Parent (Id)));
6247 end Entry_Index_Type;
6249 ---------------------
6250 -- First_Component --
6251 ---------------------
6253 function First_Component (Id : E) return E is
6258 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
6260 Comp_Id := First_Entity (Id);
6261 while Present (Comp_Id) loop
6262 exit when Ekind (Comp_Id) = E_Component;
6263 Comp_Id := Next_Entity (Comp_Id);
6267 end First_Component;
6269 -------------------------------------
6270 -- First_Component_Or_Discriminant --
6271 -------------------------------------
6273 function First_Component_Or_Discriminant (Id : E) return E is
6278 (Is_Record_Type (Id)
6279 or else Is_Incomplete_Or_Private_Type (Id)
6280 or else Has_Discriminants (Id));
6282 Comp_Id := First_Entity (Id);
6283 while Present (Comp_Id) loop
6284 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6285 Comp_Id := Next_Entity (Comp_Id);
6289 end First_Component_Or_Discriminant;
6295 function First_Formal (Id : E) return E is
6300 (Is_Overloadable (Id)
6301 or else Ekind_In (Id, E_Entry_Family,
6303 E_Subprogram_Type));
6305 if Ekind (Id) = E_Enumeration_Literal then
6309 Formal := First_Entity (Id);
6311 if Present (Formal) and then Is_Formal (Formal) then
6319 ------------------------------
6320 -- First_Formal_With_Extras --
6321 ------------------------------
6323 function First_Formal_With_Extras (Id : E) return E is
6328 (Is_Overloadable (Id)
6329 or else Ekind_In (Id, E_Entry_Family,
6331 E_Subprogram_Type));
6333 if Ekind (Id) = E_Enumeration_Literal then
6337 Formal := First_Entity (Id);
6339 if Present (Formal) and then Is_Formal (Formal) then
6342 return Extra_Formals (Id); -- Empty if no extra formals
6345 end First_Formal_With_Extras;
6347 -------------------------------------
6348 -- Get_Attribute_Definition_Clause --
6349 -------------------------------------
6351 function Get_Attribute_Definition_Clause
6353 Id : Attribute_Id) return Node_Id
6358 N := First_Rep_Item (E);
6359 while Present (N) loop
6360 if Nkind (N) = N_Attribute_Definition_Clause
6361 and then Get_Attribute_Id (Chars (N)) = Id
6370 end Get_Attribute_Definition_Clause;
6376 function Get_Full_View (T : Entity_Id) return Entity_Id is
6378 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
6379 return Full_View (T);
6381 elsif Is_Class_Wide_Type (T)
6382 and then Ekind (Root_Type (T)) = E_Incomplete_Type
6383 and then Present (Full_View (Root_Type (T)))
6385 return Class_Wide_Type (Full_View (Root_Type (T)));
6396 function Get_Pragma (E : Entity_Id; Id : Pragma_Id) return Node_Id is
6397 Is_CDG : constant Boolean :=
6398 Id = Pragma_Abstract_State or else
6399 Id = Pragma_Async_Readers or else
6400 Id = Pragma_Async_Writers or else
6401 Id = Pragma_Depends or else
6402 Id = Pragma_Effective_Reads or else
6403 Id = Pragma_Effective_Writes or else
6404 Id = Pragma_Global or else
6405 Id = Pragma_Initial_Condition or else
6406 Id = Pragma_Initializes or else
6407 Id = Pragma_Refined_Depends or else
6408 Id = Pragma_Refined_Global or else
6409 Id = Pragma_Refined_State;
6410 Is_CTC : constant Boolean :=
6411 Id = Pragma_Contract_Cases or else
6412 Id = Pragma_Test_Case;
6413 Is_PPC : constant Boolean :=
6414 Id = Pragma_Precondition or else
6415 Id = Pragma_Postcondition;
6417 In_Contract : constant Boolean := Is_CDG or Is_CTC or Is_PPC;
6423 -- Handle pragmas that appear in N_Contract nodes. Those have to be
6424 -- extracted from their specialized list.
6427 Items := Contract (E);
6433 Item := Classifications (Items);
6436 Item := Contract_Test_Cases (Items);
6439 Item := Pre_Post_Conditions (Items);
6445 Item := First_Rep_Item (E);
6448 while Present (Item) loop
6449 if Nkind (Item) = N_Pragma
6450 and then Get_Pragma_Id (Pragma_Name (Item)) = Id
6454 -- All nodes in N_Contract are chained using Next_Pragma
6456 elsif In_Contract then
6457 Item := Next_Pragma (Item);
6462 Next_Rep_Item (Item);
6469 --------------------------------------
6470 -- Get_Record_Representation_Clause --
6471 --------------------------------------
6473 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
6477 N := First_Rep_Item (E);
6478 while Present (N) loop
6479 if Nkind (N) = N_Record_Representation_Clause then
6487 end Get_Record_Representation_Clause;
6489 ------------------------
6490 -- Has_Attach_Handler --
6491 ------------------------
6493 function Has_Attach_Handler (Id : E) return B is
6497 pragma Assert (Is_Protected_Type (Id));
6499 Ritem := First_Rep_Item (Id);
6500 while Present (Ritem) loop
6501 if Nkind (Ritem) = N_Pragma
6502 and then Pragma_Name (Ritem) = Name_Attach_Handler
6506 Next_Rep_Item (Ritem);
6511 end Has_Attach_Handler;
6517 function Has_Entries (Id : E) return B is
6521 pragma Assert (Is_Concurrent_Type (Id));
6523 Ent := First_Entity (Id);
6524 while Present (Ent) loop
6525 if Is_Entry (Ent) then
6529 Ent := Next_Entity (Ent);
6535 ----------------------------
6536 -- Has_Foreign_Convention --
6537 ----------------------------
6539 function Has_Foreign_Convention (Id : E) return B is
6541 -- While regular Intrinsics such as the Standard operators fit in the
6542 -- "Ada" convention, those with an Interface_Name materialize GCC
6543 -- builtin imports for which Ada special treatments shouldn't apply.
6545 return Convention (Id) in Foreign_Convention
6546 or else (Convention (Id) = Convention_Intrinsic
6547 and then Present (Interface_Name (Id)));
6548 end Has_Foreign_Convention;
6550 ---------------------------
6551 -- Has_Interrupt_Handler --
6552 ---------------------------
6554 function Has_Interrupt_Handler (Id : E) return B is
6558 pragma Assert (Is_Protected_Type (Id));
6560 Ritem := First_Rep_Item (Id);
6561 while Present (Ritem) loop
6562 if Nkind (Ritem) = N_Pragma
6563 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6567 Next_Rep_Item (Ritem);
6572 end Has_Interrupt_Handler;
6574 -----------------------------
6575 -- Has_Non_Null_Refinement --
6576 -----------------------------
6578 function Has_Non_Null_Refinement (Id : E) return B is
6580 -- "Refinement" is a concept applicable only to abstract states
6582 pragma Assert (Ekind (Id) = E_Abstract_State);
6584 if Has_Visible_Refinement (Id) then
6585 pragma Assert (Present (Refinement_Constituents (Id)));
6587 -- For a refinement to be non-null, the first constituent must be
6588 -- anything other than null.
6591 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) /= N_Null;
6595 end Has_Non_Null_Refinement;
6597 -----------------------------
6598 -- Has_Null_Abstract_State --
6599 -----------------------------
6601 function Has_Null_Abstract_State (Id : E) return B is
6603 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
6606 Present (Abstract_States (Id))
6607 and then Is_Null_State (Node (First_Elmt (Abstract_States (Id))));
6608 end Has_Null_Abstract_State;
6610 -------------------------
6611 -- Has_Null_Refinement --
6612 -------------------------
6614 function Has_Null_Refinement (Id : E) return B is
6616 -- "Refinement" is a concept applicable only to abstract states
6618 pragma Assert (Ekind (Id) = E_Abstract_State);
6620 if Has_Visible_Refinement (Id) then
6621 pragma Assert (Present (Refinement_Constituents (Id)));
6623 -- For a refinement to be null, the state's sole constituent must be
6627 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) = N_Null;
6631 end Has_Null_Refinement;
6633 --------------------
6634 -- Has_Unmodified --
6635 --------------------
6637 function Has_Unmodified (E : Entity_Id) return Boolean is
6639 if Has_Pragma_Unmodified (E) then
6641 elsif Warnings_Off (E) then
6642 Set_Warnings_Off_Used_Unmodified (E);
6649 ---------------------
6650 -- Has_Unreferenced --
6651 ---------------------
6653 function Has_Unreferenced (E : Entity_Id) return Boolean is
6655 if Has_Pragma_Unreferenced (E) then
6657 elsif Warnings_Off (E) then
6658 Set_Warnings_Off_Used_Unreferenced (E);
6663 end Has_Unreferenced;
6665 ----------------------
6666 -- Has_Warnings_Off --
6667 ----------------------
6669 function Has_Warnings_Off (E : Entity_Id) return Boolean is
6671 if Warnings_Off (E) then
6672 Set_Warnings_Off_Used (E);
6677 end Has_Warnings_Off;
6679 ------------------------------
6680 -- Implementation_Base_Type --
6681 ------------------------------
6683 function Implementation_Base_Type (Id : E) return E is
6688 Bastyp := Base_Type (Id);
6690 if Is_Incomplete_Or_Private_Type (Bastyp) then
6691 Imptyp := Underlying_Type (Bastyp);
6693 -- If we have an implementation type, then just return it,
6694 -- otherwise we return the Base_Type anyway. This can only
6695 -- happen in error situations and should avoid some error bombs.
6697 if Present (Imptyp) then
6698 return Base_Type (Imptyp);
6706 end Implementation_Base_Type;
6708 -------------------------
6709 -- Invariant_Procedure --
6710 -------------------------
6712 function Invariant_Procedure (Id : E) return E is
6716 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
6718 if No (Subprograms_For_Type (Id)) then
6722 S := Subprograms_For_Type (Id);
6723 while Present (S) loop
6724 if Is_Invariant_Procedure (S) then
6727 S := Subprograms_For_Type (S);
6733 end Invariant_Procedure;
6739 -- Global flag table allowing rapid computation of this function
6741 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
6742 (E_Enumeration_Subtype |
6744 E_Signed_Integer_Subtype |
6745 E_Modular_Integer_Subtype |
6746 E_Floating_Point_Subtype |
6747 E_Ordinary_Fixed_Point_Subtype |
6748 E_Decimal_Fixed_Point_Subtype |
6753 E_Record_Subtype_With_Private |
6754 E_Limited_Private_Subtype |
6756 E_Protected_Subtype |
6758 E_String_Literal_Subtype |
6759 E_Class_Wide_Subtype => False,
6762 function Is_Base_Type (Id : E) return Boolean is
6764 return Entity_Is_Base_Type (Ekind (Id));
6767 ---------------------
6768 -- Is_Boolean_Type --
6769 ---------------------
6771 function Is_Boolean_Type (Id : E) return B is
6773 return Root_Type (Id) = Standard_Boolean;
6774 end Is_Boolean_Type;
6776 ------------------------
6777 -- Is_Constant_Object --
6778 ------------------------
6780 function Is_Constant_Object (Id : E) return B is
6781 K : constant Entity_Kind := Ekind (Id);
6784 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
6785 end Is_Constant_Object;
6787 --------------------
6788 -- Is_Discriminal --
6789 --------------------
6791 function Is_Discriminal (Id : E) return B is
6793 return (Ekind_In (Id, E_Constant, E_In_Parameter)
6794 and then Present (Discriminal_Link (Id)));
6797 ----------------------
6798 -- Is_Dynamic_Scope --
6799 ----------------------
6801 function Is_Dynamic_Scope (Id : E) return B is
6804 Ekind (Id) = E_Block
6806 Ekind (Id) = E_Function
6808 Ekind (Id) = E_Procedure
6810 Ekind (Id) = E_Subprogram_Body
6812 Ekind (Id) = E_Task_Type
6814 (Ekind (Id) = E_Limited_Private_Type
6815 and then Present (Full_View (Id))
6816 and then Ekind (Full_View (Id)) = E_Task_Type)
6818 Ekind (Id) = E_Entry
6820 Ekind (Id) = E_Entry_Family
6822 Ekind (Id) = E_Return_Statement;
6823 end Is_Dynamic_Scope;
6825 --------------------
6826 -- Is_Entity_Name --
6827 --------------------
6829 function Is_Entity_Name (N : Node_Id) return Boolean is
6830 Kind : constant Node_Kind := Nkind (N);
6833 -- Identifiers, operator symbols, expanded names are entity names
6835 return Kind = N_Identifier
6836 or else Kind = N_Operator_Symbol
6837 or else Kind = N_Expanded_Name
6839 -- Attribute references are entity names if they refer to an entity.
6840 -- Note that we don't do this by testing for the presence of the
6841 -- Entity field in the N_Attribute_Reference node, since it may not
6842 -- have been set yet.
6844 or else (Kind = N_Attribute_Reference
6845 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
6848 -----------------------
6849 -- Is_External_State --
6850 -----------------------
6852 function Is_External_State (Id : E) return B is
6855 Ekind (Id) = E_Abstract_State and then Has_Option (Id, Name_External);
6856 end Is_External_State;
6862 function Is_Finalizer (Id : E) return B is
6864 return Ekind (Id) = E_Procedure and then Chars (Id) = Name_uFinalizer;
6867 ---------------------
6868 -- Is_Ghost_Entity --
6869 ---------------------
6871 function Is_Ghost_Entity (Id : E) return B is
6873 if Present (Id) and then Ekind (Id) = E_Variable then
6874 return Convention (Id) = Convention_Ghost;
6876 return Is_Ghost_Subprogram (Id);
6878 end Is_Ghost_Entity;
6880 -------------------------
6881 -- Is_Ghost_Subprogram --
6882 -------------------------
6884 function Is_Ghost_Subprogram (Id : E) return B is
6886 if Present (Id) and then Ekind_In (Id, E_Function, E_Procedure) then
6887 return Convention (Id) = Convention_Ghost;
6891 end Is_Ghost_Subprogram;
6893 -------------------------
6894 -- Is_Input_Only_State --
6895 -------------------------
6897 function Is_Input_Only_State (Id : E) return B is
6900 Ekind (Id) = E_Abstract_State
6901 and then Has_Option (Id, Name_Input_Only);
6902 end Is_Input_Only_State;
6904 ---------------------------
6905 -- Is_Non_Volatile_State --
6906 ---------------------------
6908 function Is_Non_Volatile_State (Id : E) return B is
6911 Ekind (Id) = E_Abstract_State
6912 and then Has_Option (Id, Name_Non_Volatile);
6913 end Is_Non_Volatile_State;
6919 function Is_Null_State (Id : E) return B is
6922 Ekind (Id) = E_Abstract_State and then Nkind (Parent (Id)) = N_Null;
6925 ---------------------
6926 -- Is_Output_State --
6927 ---------------------
6929 function Is_Output_Only_State (Id : E) return B is
6932 Ekind (Id) = E_Abstract_State
6933 and then Has_Option (Id, Name_Output_Only);
6934 end Is_Output_Only_State;
6936 -----------------------------------
6937 -- Is_Package_Or_Generic_Package --
6938 -----------------------------------
6940 function Is_Package_Or_Generic_Package (Id : E) return B is
6942 return Ekind_In (Id, E_Generic_Package, E_Package);
6943 end Is_Package_Or_Generic_Package;
6949 function Is_Prival (Id : E) return B is
6951 return (Ekind_In (Id, E_Constant, E_Variable)
6952 and then Present (Prival_Link (Id)));
6955 ----------------------------
6956 -- Is_Protected_Component --
6957 ----------------------------
6959 function Is_Protected_Component (Id : E) return B is
6961 return Ekind (Id) = E_Component and then Is_Protected_Type (Scope (Id));
6962 end Is_Protected_Component;
6964 ----------------------------
6965 -- Is_Protected_Interface --
6966 ----------------------------
6968 function Is_Protected_Interface (Id : E) return B is
6969 Typ : constant Entity_Id := Base_Type (Id);
6971 if not Is_Interface (Typ) then
6973 elsif Is_Class_Wide_Type (Typ) then
6974 return Is_Protected_Interface (Etype (Typ));
6976 return Protected_Present (Type_Definition (Parent (Typ)));
6978 end Is_Protected_Interface;
6980 ------------------------------
6981 -- Is_Protected_Record_Type --
6982 ------------------------------
6984 function Is_Protected_Record_Type (Id : E) return B is
6987 Is_Concurrent_Record_Type (Id)
6988 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
6989 end Is_Protected_Record_Type;
6991 --------------------------------
6992 -- Is_Standard_Character_Type --
6993 --------------------------------
6995 function Is_Standard_Character_Type (Id : E) return B is
6997 if Is_Type (Id) then
6999 R : constant Entity_Id := Root_Type (Id);
7002 R = Standard_Character
7004 R = Standard_Wide_Character
7006 R = Standard_Wide_Wide_Character;
7012 end Is_Standard_Character_Type;
7014 --------------------
7015 -- Is_String_Type --
7016 --------------------
7018 function Is_String_Type (Id : E) return B is
7020 return Ekind (Id) in String_Kind
7021 or else (Is_Array_Type (Id)
7022 and then Id /= Any_Composite
7023 and then Number_Dimensions (Id) = 1
7024 and then Is_Character_Type (Component_Type (Id)));
7027 -------------------------------
7028 -- Is_Synchronized_Interface --
7029 -------------------------------
7031 function Is_Synchronized_Interface (Id : E) return B is
7032 Typ : constant Entity_Id := Base_Type (Id);
7035 if not Is_Interface (Typ) then
7038 elsif Is_Class_Wide_Type (Typ) then
7039 return Is_Synchronized_Interface (Etype (Typ));
7042 return Protected_Present (Type_Definition (Parent (Typ)))
7043 or else Synchronized_Present (Type_Definition (Parent (Typ)))
7044 or else Task_Present (Type_Definition (Parent (Typ)));
7046 end Is_Synchronized_Interface;
7048 -----------------------
7049 -- Is_Task_Interface --
7050 -----------------------
7052 function Is_Task_Interface (Id : E) return B is
7053 Typ : constant Entity_Id := Base_Type (Id);
7055 if not Is_Interface (Typ) then
7057 elsif Is_Class_Wide_Type (Typ) then
7058 return Is_Task_Interface (Etype (Typ));
7060 return Task_Present (Type_Definition (Parent (Typ)));
7062 end Is_Task_Interface;
7064 -------------------------
7065 -- Is_Task_Record_Type --
7066 -------------------------
7068 function Is_Task_Record_Type (Id : E) return B is
7071 Is_Concurrent_Record_Type (Id)
7072 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
7073 end Is_Task_Record_Type;
7075 ------------------------
7076 -- Is_Wrapper_Package --
7077 ------------------------
7079 function Is_Wrapper_Package (Id : E) return B is
7081 return (Ekind (Id) = E_Package and then Present (Related_Instance (Id)));
7082 end Is_Wrapper_Package;
7088 function Last_Formal (Id : E) return E is
7093 (Is_Overloadable (Id)
7094 or else Ekind_In (Id, E_Entry_Family,
7096 E_Subprogram_Type));
7098 if Ekind (Id) = E_Enumeration_Literal then
7102 Formal := First_Formal (Id);
7104 if Present (Formal) then
7105 while Present (Next_Formal (Formal)) loop
7106 Formal := Next_Formal (Formal);
7114 function Model_Emin_Value (Id : E) return Uint is
7116 return Machine_Emin_Value (Id);
7117 end Model_Emin_Value;
7119 -------------------------
7120 -- Model_Epsilon_Value --
7121 -------------------------
7123 function Model_Epsilon_Value (Id : E) return Ureal is
7124 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7126 return Radix ** (1 - Model_Mantissa_Value (Id));
7127 end Model_Epsilon_Value;
7129 --------------------------
7130 -- Model_Mantissa_Value --
7131 --------------------------
7133 function Model_Mantissa_Value (Id : E) return Uint is
7135 return Machine_Mantissa_Value (Id);
7136 end Model_Mantissa_Value;
7138 -----------------------
7139 -- Model_Small_Value --
7140 -----------------------
7142 function Model_Small_Value (Id : E) return Ureal is
7143 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7145 return Radix ** (Model_Emin_Value (Id) - 1);
7146 end Model_Small_Value;
7148 ------------------------
7149 -- Machine_Emax_Value --
7150 ------------------------
7152 function Machine_Emax_Value (Id : E) return Uint is
7153 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7156 case Float_Rep (Id) is
7159 when 1 .. 6 => return Uint_128;
7160 when 7 .. 15 => return 2**10;
7161 when 16 .. 33 => return 2**14;
7162 when others => return No_Uint;
7167 when 1 .. 9 => return 2**7 - 1;
7168 when 10 .. 15 => return 2**10 - 1;
7169 when others => return No_Uint;
7173 return Uint_2 ** Uint_7 - Uint_1;
7175 end Machine_Emax_Value;
7177 ------------------------
7178 -- Machine_Emin_Value --
7179 ------------------------
7181 function Machine_Emin_Value (Id : E) return Uint is
7183 case Float_Rep (Id) is
7184 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
7185 when VAX_Native => return -Machine_Emax_Value (Id);
7186 when AAMP => return -Machine_Emax_Value (Id);
7188 end Machine_Emin_Value;
7190 ----------------------------
7191 -- Machine_Mantissa_Value --
7192 ----------------------------
7194 function Machine_Mantissa_Value (Id : E) return Uint is
7195 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7198 case Float_Rep (Id) is
7201 when 1 .. 6 => return Uint_24;
7202 when 7 .. 15 => return UI_From_Int (53);
7203 when 16 .. 18 => return Uint_64;
7204 when 19 .. 33 => return UI_From_Int (113);
7205 when others => return No_Uint;
7210 when 1 .. 6 => return Uint_24;
7211 when 7 .. 9 => return UI_From_Int (56);
7212 when 10 .. 15 => return UI_From_Int (53);
7213 when others => return No_Uint;
7218 when 1 .. 6 => return Uint_24;
7219 when 7 .. 9 => return UI_From_Int (40);
7220 when others => return No_Uint;
7223 end Machine_Mantissa_Value;
7225 -------------------------
7226 -- Machine_Radix_Value --
7227 -------------------------
7229 function Machine_Radix_Value (Id : E) return U is
7231 case Float_Rep (Id) is
7232 when IEEE_Binary | VAX_Native | AAMP =>
7235 end Machine_Radix_Value;
7237 --------------------
7238 -- Next_Component --
7239 --------------------
7241 function Next_Component (Id : E) return E is
7245 Comp_Id := Next_Entity (Id);
7246 while Present (Comp_Id) loop
7247 exit when Ekind (Comp_Id) = E_Component;
7248 Comp_Id := Next_Entity (Comp_Id);
7254 ------------------------------------
7255 -- Next_Component_Or_Discriminant --
7256 ------------------------------------
7258 function Next_Component_Or_Discriminant (Id : E) return E is
7262 Comp_Id := Next_Entity (Id);
7263 while Present (Comp_Id) loop
7264 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
7265 Comp_Id := Next_Entity (Comp_Id);
7269 end Next_Component_Or_Discriminant;
7271 -----------------------
7272 -- Next_Discriminant --
7273 -----------------------
7275 -- This function actually implements both Next_Discriminant and
7276 -- Next_Stored_Discriminant by making sure that the Discriminant
7277 -- returned is of the same variety as Id.
7279 function Next_Discriminant (Id : E) return E is
7281 -- Derived Tagged types with private extensions look like this...
7283 -- E_Discriminant d1
7284 -- E_Discriminant d2
7286 -- E_Discriminant d1
7287 -- E_Discriminant d2
7290 -- so it is critical not to go past the leading discriminants
7295 pragma Assert (Ekind (Id) = E_Discriminant);
7298 D := Next_Entity (D);
7300 or else (Ekind (D) /= E_Discriminant
7301 and then not Is_Itype (D))
7306 exit when Ekind (D) = E_Discriminant
7307 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
7311 end Next_Discriminant;
7317 function Next_Formal (Id : E) return E is
7321 -- Follow the chain of declared entities as long as the kind of the
7322 -- entity corresponds to a formal parameter. Skip internal entities
7323 -- that may have been created for implicit subtypes, in the process
7324 -- of analyzing default expressions.
7328 P := Next_Entity (P);
7330 if No (P) or else Is_Formal (P) then
7332 elsif not Is_Internal (P) then
7338 -----------------------------
7339 -- Next_Formal_With_Extras --
7340 -----------------------------
7342 function Next_Formal_With_Extras (Id : E) return E is
7344 if Present (Extra_Formal (Id)) then
7345 return Extra_Formal (Id);
7347 return Next_Formal (Id);
7349 end Next_Formal_With_Extras;
7355 function Next_Index (Id : Node_Id) return Node_Id is
7364 function Next_Literal (Id : E) return E is
7366 pragma Assert (Nkind (Id) in N_Entity);
7370 ------------------------------
7371 -- Next_Stored_Discriminant --
7372 ------------------------------
7374 function Next_Stored_Discriminant (Id : E) return E is
7376 -- See comment in Next_Discriminant
7378 return Next_Discriminant (Id);
7379 end Next_Stored_Discriminant;
7381 -----------------------
7382 -- Number_Dimensions --
7383 -----------------------
7385 function Number_Dimensions (Id : E) return Pos is
7390 if Ekind (Id) in String_Kind then
7395 T := First_Index (Id);
7396 while Present (T) loop
7403 end Number_Dimensions;
7405 --------------------
7406 -- Number_Entries --
7407 --------------------
7409 function Number_Entries (Id : E) return Nat is
7414 pragma Assert (Is_Concurrent_Type (Id));
7417 Ent := First_Entity (Id);
7418 while Present (Ent) loop
7419 if Is_Entry (Ent) then
7423 Ent := Next_Entity (Ent);
7429 --------------------
7430 -- Number_Formals --
7431 --------------------
7433 function Number_Formals (Id : E) return Pos is
7439 Formal := First_Formal (Id);
7440 while Present (Formal) loop
7442 Formal := Next_Formal (Formal);
7448 --------------------
7449 -- Parameter_Mode --
7450 --------------------
7452 function Parameter_Mode (Id : E) return Formal_Kind is
7457 ------------------------
7458 -- Predicate_Function --
7459 ------------------------
7461 function Predicate_Function (Id : E) return E is
7466 pragma Assert (Is_Type (Id));
7468 -- If type is private and has a completion, predicate may be defined
7469 -- on the full view.
7471 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7472 T := Full_View (Id);
7477 if No (Subprograms_For_Type (T)) then
7481 S := Subprograms_For_Type (T);
7482 while Present (S) loop
7483 if Is_Predicate_Function (S) then
7486 S := Subprograms_For_Type (S);
7492 end Predicate_Function;
7494 --------------------------
7495 -- Predicate_Function_M --
7496 --------------------------
7498 function Predicate_Function_M (Id : E) return E is
7503 pragma Assert (Is_Type (Id));
7505 -- If type is private and has a completion, predicate may be defined
7506 -- on the full view.
7508 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7509 T := Full_View (Id);
7514 if No (Subprograms_For_Type (T)) then
7518 S := Subprograms_For_Type (T);
7519 while Present (S) loop
7520 if Is_Predicate_Function_M (S) then
7523 S := Subprograms_For_Type (S);
7529 end Predicate_Function_M;
7531 -------------------------
7532 -- Present_In_Rep_Item --
7533 -------------------------
7535 function Present_In_Rep_Item (E : Entity_Id; N : Node_Id) return Boolean is
7539 Ritem := First_Rep_Item (E);
7541 while Present (Ritem) loop
7546 Next_Rep_Item (Ritem);
7550 end Present_In_Rep_Item;
7552 --------------------------
7553 -- Primitive_Operations --
7554 --------------------------
7556 function Primitive_Operations (Id : E) return L is
7558 if Is_Concurrent_Type (Id) then
7559 if Present (Corresponding_Record_Type (Id)) then
7560 return Direct_Primitive_Operations
7561 (Corresponding_Record_Type (Id));
7563 -- If expansion is disabled the corresponding record type is absent,
7564 -- but if the type has ancestors it may have primitive operations.
7566 elsif Is_Tagged_Type (Id) then
7567 return Direct_Primitive_Operations (Id);
7573 return Direct_Primitive_Operations (Id);
7575 end Primitive_Operations;
7577 ---------------------
7578 -- Record_Rep_Item --
7579 ---------------------
7581 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
7583 Set_Next_Rep_Item (N, First_Rep_Item (E));
7584 Set_First_Rep_Item (E, N);
7585 end Record_Rep_Item;
7591 function Root_Type (Id : E) return E is
7595 pragma Assert (Nkind (Id) in N_Entity);
7597 T := Base_Type (Id);
7599 if Ekind (T) = E_Class_Wide_Type then
7611 -- Following test catches some error cases resulting from
7614 elsif No (Etyp) then
7615 Check_Error_Detected;
7618 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
7621 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
7627 -- Return if there is a circularity in the inheritance chain. This
7628 -- happens in some error situations and we do not want to get
7629 -- stuck in this loop.
7631 if T = Base_Type (Id) then
7638 ---------------------
7639 -- Safe_Emax_Value --
7640 ---------------------
7642 function Safe_Emax_Value (Id : E) return Uint is
7644 return Machine_Emax_Value (Id);
7645 end Safe_Emax_Value;
7647 ----------------------
7648 -- Safe_First_Value --
7649 ----------------------
7651 function Safe_First_Value (Id : E) return Ureal is
7653 return -Safe_Last_Value (Id);
7654 end Safe_First_Value;
7656 ---------------------
7657 -- Safe_Last_Value --
7658 ---------------------
7660 function Safe_Last_Value (Id : E) return Ureal is
7661 Radix : constant Uint := Machine_Radix_Value (Id);
7662 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
7663 Emax : constant Uint := Safe_Emax_Value (Id);
7664 Significand : constant Uint := Radix ** Mantissa - 1;
7665 Exponent : constant Uint := Emax - Mantissa;
7671 (Num => Significand * 2 ** (Exponent mod 4),
7672 Den => -Exponent / 4,
7678 (Num => Significand,
7682 end Safe_Last_Value;
7688 function Scope_Depth (Id : E) return Uint is
7693 while Is_Record_Type (Scop) loop
7694 Scop := Scope (Scop);
7697 return Scope_Depth_Value (Scop);
7700 ---------------------
7701 -- Scope_Depth_Set --
7702 ---------------------
7704 function Scope_Depth_Set (Id : E) return B is
7706 return not Is_Record_Type (Id)
7707 and then Field22 (Id) /= Union_Id (Empty);
7708 end Scope_Depth_Set;
7710 -----------------------------
7711 -- Set_Component_Alignment --
7712 -----------------------------
7714 -- Component Alignment is encoded using two flags, Flag128/129 as
7715 -- follows. Note that both flags False = Align_Default, so that the
7716 -- default initialization of flags to False initializes component
7717 -- alignment to the default value as required.
7719 -- Flag128 Flag129 Value
7720 -- ------- ------- -----
7721 -- False False Calign_Default
7722 -- False True Calign_Component_Size
7723 -- True False Calign_Component_Size_4
7724 -- True True Calign_Storage_Unit
7726 procedure Set_Component_Alignment (Id : E; V : C) is
7728 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
7729 and then Is_Base_Type (Id));
7732 when Calign_Default =>
7733 Set_Flag128 (Id, False);
7734 Set_Flag129 (Id, False);
7736 when Calign_Component_Size =>
7737 Set_Flag128 (Id, False);
7738 Set_Flag129 (Id, True);
7740 when Calign_Component_Size_4 =>
7741 Set_Flag128 (Id, True);
7742 Set_Flag129 (Id, False);
7744 when Calign_Storage_Unit =>
7745 Set_Flag128 (Id, True);
7746 Set_Flag129 (Id, True);
7748 end Set_Component_Alignment;
7750 -----------------------------
7751 -- Set_Invariant_Procedure --
7752 -----------------------------
7754 procedure Set_Invariant_Procedure (Id : E; V : E) is
7758 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7760 S := Subprograms_For_Type (Id);
7761 Set_Subprograms_For_Type (Id, V);
7762 Set_Subprograms_For_Type (V, S);
7764 -- Check for duplicate entry
7766 while Present (S) loop
7767 if Is_Invariant_Procedure (S) then
7768 raise Program_Error;
7770 S := Subprograms_For_Type (S);
7773 end Set_Invariant_Procedure;
7775 ----------------------------
7776 -- Set_Predicate_Function --
7777 ----------------------------
7779 procedure Set_Predicate_Function (Id : E; V : E) is
7783 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7785 S := Subprograms_For_Type (Id);
7786 Set_Subprograms_For_Type (Id, V);
7787 Set_Subprograms_For_Type (V, S);
7789 while Present (S) loop
7790 if Is_Predicate_Function (S) then
7791 raise Program_Error;
7793 S := Subprograms_For_Type (S);
7796 end Set_Predicate_Function;
7798 ------------------------------
7799 -- Set_Predicate_Function_M --
7800 ------------------------------
7802 procedure Set_Predicate_Function_M (Id : E; V : E) is
7806 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7808 S := Subprograms_For_Type (Id);
7809 Set_Subprograms_For_Type (Id, V);
7810 Set_Subprograms_For_Type (V, S);
7812 -- Check for duplicates
7814 while Present (S) loop
7815 if Is_Predicate_Function_M (S) then
7816 raise Program_Error;
7818 S := Subprograms_For_Type (S);
7821 end Set_Predicate_Function_M;
7827 function Size_Clause (Id : E) return N is
7829 return Get_Attribute_Definition_Clause (Id, Attribute_Size);
7832 ------------------------
7833 -- Stream_Size_Clause --
7834 ------------------------
7836 function Stream_Size_Clause (Id : E) return N is
7838 return Get_Attribute_Definition_Clause (Id, Attribute_Stream_Size);
7839 end Stream_Size_Clause;
7845 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
7851 Kind := E_Access_Subtype;
7855 Kind := E_Array_Subtype;
7857 when E_Class_Wide_Type |
7858 E_Class_Wide_Subtype =>
7859 Kind := E_Class_Wide_Subtype;
7861 when E_Decimal_Fixed_Point_Type |
7862 E_Decimal_Fixed_Point_Subtype =>
7863 Kind := E_Decimal_Fixed_Point_Subtype;
7865 when E_Ordinary_Fixed_Point_Type |
7866 E_Ordinary_Fixed_Point_Subtype =>
7867 Kind := E_Ordinary_Fixed_Point_Subtype;
7869 when E_Private_Type |
7870 E_Private_Subtype =>
7871 Kind := E_Private_Subtype;
7873 when E_Limited_Private_Type |
7874 E_Limited_Private_Subtype =>
7875 Kind := E_Limited_Private_Subtype;
7877 when E_Record_Type_With_Private |
7878 E_Record_Subtype_With_Private =>
7879 Kind := E_Record_Subtype_With_Private;
7881 when E_Record_Type |
7883 Kind := E_Record_Subtype;
7885 when E_String_Type |
7887 Kind := E_String_Subtype;
7889 when Enumeration_Kind =>
7890 Kind := E_Enumeration_Subtype;
7893 Kind := E_Floating_Point_Subtype;
7895 when Signed_Integer_Kind =>
7896 Kind := E_Signed_Integer_Subtype;
7898 when Modular_Integer_Kind =>
7899 Kind := E_Modular_Integer_Subtype;
7901 when Protected_Kind =>
7902 Kind := E_Protected_Subtype;
7905 Kind := E_Task_Subtype;
7909 raise Program_Error;
7915 ---------------------
7916 -- Type_High_Bound --
7917 ---------------------
7919 function Type_High_Bound (Id : E) return Node_Id is
7920 Rng : constant Node_Id := Scalar_Range (Id);
7922 if Nkind (Rng) = N_Subtype_Indication then
7923 return High_Bound (Range_Expression (Constraint (Rng)));
7925 return High_Bound (Rng);
7927 end Type_High_Bound;
7929 --------------------
7930 -- Type_Low_Bound --
7931 --------------------
7933 function Type_Low_Bound (Id : E) return Node_Id is
7934 Rng : constant Node_Id := Scalar_Range (Id);
7936 if Nkind (Rng) = N_Subtype_Indication then
7937 return Low_Bound (Range_Expression (Constraint (Rng)));
7939 return Low_Bound (Rng);
7943 ---------------------
7944 -- Underlying_Type --
7945 ---------------------
7947 function Underlying_Type (Id : E) return E is
7949 -- For record_with_private the underlying type is always the direct
7950 -- full view. Never try to take the full view of the parent it
7951 -- doesn't make sense.
7953 if Ekind (Id) = E_Record_Type_With_Private then
7954 return Full_View (Id);
7956 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
7958 -- If we have an incomplete or private type with a full view,
7959 -- then we return the Underlying_Type of this full view
7961 if Present (Full_View (Id)) then
7962 if Id = Full_View (Id) then
7964 -- Previous error in declaration
7969 return Underlying_Type (Full_View (Id));
7972 -- If we have an incomplete entity that comes from the limited
7973 -- view then we return the Underlying_Type of its non-limited
7976 elsif From_Limited_With (Id)
7977 and then Present (Non_Limited_View (Id))
7979 return Underlying_Type (Non_Limited_View (Id));
7981 -- Otherwise check for the case where we have a derived type or
7982 -- subtype, and if so get the Underlying_Type of the parent type.
7984 elsif Etype (Id) /= Id then
7985 return Underlying_Type (Etype (Id));
7987 -- Otherwise we have an incomplete or private type that has
7988 -- no full view, which means that we have not encountered the
7989 -- completion, so return Empty to indicate the underlying type
7990 -- is not yet known.
7996 -- For non-incomplete, non-private types, return the type itself
7997 -- Also for entities that are not types at all return the entity
8003 end Underlying_Type;
8009 function Vax_Float (Id : E) return B is
8011 return Is_Floating_Point_Type (Id) and then Float_Rep (Id) = VAX_Native;
8014 ------------------------
8015 -- Write_Entity_Flags --
8016 ------------------------
8018 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
8020 procedure W (Flag_Name : String; Flag : Boolean);
8021 -- Write out given flag if it is set
8027 procedure W (Flag_Name : String; Flag : Boolean) is
8031 Write_Str (Flag_Name);
8032 Write_Str (" = True");
8037 -- Start of processing for Write_Entity_Flags
8040 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
8041 and then Is_Base_Type (Id)
8044 Write_Str ("Component_Alignment = ");
8046 case Component_Alignment (Id) is
8047 when Calign_Default =>
8048 Write_Str ("Calign_Default");
8050 when Calign_Component_Size =>
8051 Write_Str ("Calign_Component_Size");
8053 when Calign_Component_Size_4 =>
8054 Write_Str ("Calign_Component_Size_4");
8056 when Calign_Storage_Unit =>
8057 Write_Str ("Calign_Storage_Unit");
8063 W ("Address_Taken", Flag104 (Id));
8064 W ("Body_Needed_For_SAL", Flag40 (Id));
8065 W ("C_Pass_By_Copy", Flag125 (Id));
8066 W ("Can_Never_Be_Null", Flag38 (Id));
8067 W ("Checks_May_Be_Suppressed", Flag31 (Id));
8068 W ("Debug_Info_Off", Flag166 (Id));
8069 W ("Default_Expressions_Processed", Flag108 (Id));
8070 W ("Delay_Cleanups", Flag114 (Id));
8071 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
8072 W ("Depends_On_Private", Flag14 (Id));
8073 W ("Discard_Names", Flag88 (Id));
8074 W ("Elaboration_Entity_Required", Flag174 (Id));
8075 W ("Elaborate_Body_Desirable", Flag210 (Id));
8076 W ("Entry_Accepted", Flag152 (Id));
8077 W ("Can_Use_Internal_Rep", Flag229 (Id));
8078 W ("Finalize_Storage_Only", Flag158 (Id));
8079 W ("From_Limited_With", Flag159 (Id));
8080 W ("Has_Aliased_Components", Flag135 (Id));
8081 W ("Has_Alignment_Clause", Flag46 (Id));
8082 W ("Has_All_Calls_Remote", Flag79 (Id));
8083 W ("Has_Anonymous_Master", Flag253 (Id));
8084 W ("Has_Atomic_Components", Flag86 (Id));
8085 W ("Has_Biased_Representation", Flag139 (Id));
8086 W ("Has_Body_References", Flag264 (Id));
8087 W ("Has_Completion", Flag26 (Id));
8088 W ("Has_Completion_In_Body", Flag71 (Id));
8089 W ("Has_Complex_Representation", Flag140 (Id));
8090 W ("Has_Component_Size_Clause", Flag68 (Id));
8091 W ("Has_Contiguous_Rep", Flag181 (Id));
8092 W ("Has_Controlled_Component", Flag43 (Id));
8093 W ("Has_Controlling_Result", Flag98 (Id));
8094 W ("Has_Convention_Pragma", Flag119 (Id));
8095 W ("Has_Default_Aspect", Flag39 (Id));
8096 W ("Has_Delayed_Aspects", Flag200 (Id));
8097 W ("Has_Delayed_Freeze", Flag18 (Id));
8098 W ("Has_Delayed_Rep_Aspects", Flag261 (Id));
8099 W ("Has_Discriminants", Flag5 (Id));
8100 W ("Has_Dispatch_Table", Flag220 (Id));
8101 W ("Has_Dynamic_Predicate_Aspect", Flag258 (Id));
8102 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
8103 W ("Has_Exit", Flag47 (Id));
8104 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
8105 W ("Has_Forward_Instantiation", Flag175 (Id));
8106 W ("Has_Fully_Qualified_Name", Flag173 (Id));
8107 W ("Has_Gigi_Rep_Item", Flag82 (Id));
8108 W ("Has_Homonym", Flag56 (Id));
8109 W ("Has_Implicit_Dereference", Flag251 (Id));
8110 W ("Has_Inheritable_Invariants", Flag248 (Id));
8111 W ("Has_Initial_Value", Flag219 (Id));
8112 W ("Has_Invariants", Flag232 (Id));
8113 W ("Has_Loop_Entry_Attributes", Flag260 (Id));
8114 W ("Has_Machine_Radix_Clause", Flag83 (Id));
8115 W ("Has_Master_Entity", Flag21 (Id));
8116 W ("Has_Missing_Return", Flag142 (Id));
8117 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
8118 W ("Has_Non_Standard_Rep", Flag75 (Id));
8119 W ("Has_Object_Size_Clause", Flag172 (Id));
8120 W ("Has_Per_Object_Constraint", Flag154 (Id));
8121 W ("Has_Postconditions", Flag240 (Id));
8122 W ("Has_Pragma_Controlled", Flag27 (Id));
8123 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
8124 W ("Has_Pragma_Inline", Flag157 (Id));
8125 W ("Has_Pragma_Inline_Always", Flag230 (Id));
8126 W ("Has_Pragma_No_Inline", Flag201 (Id));
8127 W ("Has_Pragma_Ordered", Flag198 (Id));
8128 W ("Has_Pragma_Pack", Flag121 (Id));
8129 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
8130 W ("Has_Pragma_Pure", Flag203 (Id));
8131 W ("Has_Pragma_Pure_Function", Flag179 (Id));
8132 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
8133 W ("Has_Pragma_Unmodified", Flag233 (Id));
8134 W ("Has_Pragma_Unreferenced", Flag180 (Id));
8135 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
8136 W ("Has_Predicates", Flag250 (Id));
8137 W ("Has_Primitive_Operations", Flag120 (Id));
8138 W ("Has_Private_Ancestor", Flag151 (Id));
8139 W ("Has_Private_Declaration", Flag155 (Id));
8140 W ("Has_Qualified_Name", Flag161 (Id));
8141 W ("Has_RACW", Flag214 (Id));
8142 W ("Has_Record_Rep_Clause", Flag65 (Id));
8143 W ("Has_Recursive_Call", Flag143 (Id));
8144 W ("Has_Size_Clause", Flag29 (Id));
8145 W ("Has_Small_Clause", Flag67 (Id));
8146 W ("Has_Specified_Layout", Flag100 (Id));
8147 W ("Has_Specified_Stream_Input", Flag190 (Id));
8148 W ("Has_Specified_Stream_Output", Flag191 (Id));
8149 W ("Has_Specified_Stream_Read", Flag192 (Id));
8150 W ("Has_Specified_Stream_Write", Flag193 (Id));
8151 W ("Has_Static_Discriminants", Flag211 (Id));
8152 W ("Has_Static_Predicate_Aspect", Flag259 (Id));
8153 W ("Has_Storage_Size_Clause", Flag23 (Id));
8154 W ("Has_Stream_Size_Clause", Flag184 (Id));
8155 W ("Has_Task", Flag30 (Id));
8156 W ("Has_Thunks", Flag228 (Id));
8157 W ("Has_Unchecked_Union", Flag123 (Id));
8158 W ("Has_Unknown_Discriminants", Flag72 (Id));
8159 W ("Has_Up_Level_Access", Flag215 (Id));
8160 W ("Has_Visible_Refinement", Flag263 (Id));
8161 W ("Has_Volatile_Components", Flag87 (Id));
8162 W ("Has_Xref_Entry", Flag182 (Id));
8163 W ("In_Package_Body", Flag48 (Id));
8164 W ("In_Private_Part", Flag45 (Id));
8165 W ("In_Use", Flag8 (Id));
8166 W ("Is_AST_Entry", Flag132 (Id));
8167 W ("Is_Abstract_Subprogram", Flag19 (Id));
8168 W ("Is_Abstract_Type", Flag146 (Id));
8169 W ("Is_Local_Anonymous_Access", Flag194 (Id));
8170 W ("Is_Access_Constant", Flag69 (Id));
8171 W ("Is_Ada_2005_Only", Flag185 (Id));
8172 W ("Is_Ada_2012_Only", Flag199 (Id));
8173 W ("Is_Aliased", Flag15 (Id));
8174 W ("Is_Asynchronous", Flag81 (Id));
8175 W ("Is_Atomic", Flag85 (Id));
8176 W ("Is_Bit_Packed_Array", Flag122 (Id));
8177 W ("Is_CPP_Class", Flag74 (Id));
8178 W ("Is_Called", Flag102 (Id));
8179 W ("Is_Character_Type", Flag63 (Id));
8180 W ("Is_Child_Unit", Flag73 (Id));
8181 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
8182 W ("Is_Compilation_Unit", Flag149 (Id));
8183 W ("Is_Completely_Hidden", Flag103 (Id));
8184 W ("Is_Concurrent_Record_Type", Flag20 (Id));
8185 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
8186 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
8187 W ("Is_Constrained", Flag12 (Id));
8188 W ("Is_Constructor", Flag76 (Id));
8189 W ("Is_Controlled", Flag42 (Id));
8190 W ("Is_Controlling_Formal", Flag97 (Id));
8191 W ("Is_Descendent_Of_Address", Flag223 (Id));
8192 W ("Is_Discrim_SO_Function", Flag176 (Id));
8193 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
8194 W ("Is_Dispatching_Operation", Flag6 (Id));
8195 W ("Is_Eliminated", Flag124 (Id));
8196 W ("Is_Entry_Formal", Flag52 (Id));
8197 W ("Is_Exported", Flag99 (Id));
8198 W ("Is_First_Subtype", Flag70 (Id));
8199 W ("Is_For_Access_Subtype", Flag118 (Id));
8200 W ("Is_Formal_Subprogram", Flag111 (Id));
8201 W ("Is_Frozen", Flag4 (Id));
8202 W ("Is_Generic_Actual_Type", Flag94 (Id));
8203 W ("Is_Generic_Instance", Flag130 (Id));
8204 W ("Is_Generic_Type", Flag13 (Id));
8205 W ("Is_Hidden", Flag57 (Id));
8206 W ("Is_Hidden_Open_Scope", Flag171 (Id));
8207 W ("Is_Immediately_Visible", Flag7 (Id));
8208 W ("Is_Implementation_Defined", Flag254 (Id));
8209 W ("Is_Imported", Flag24 (Id));
8210 W ("Is_Inlined", Flag11 (Id));
8211 W ("Is_Instantiated", Flag126 (Id));
8212 W ("Is_Interface", Flag186 (Id));
8213 W ("Is_Internal", Flag17 (Id));
8214 W ("Is_Interrupt_Handler", Flag89 (Id));
8215 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
8216 W ("Is_Invariant_Procedure", Flag257 (Id));
8217 W ("Is_Itype", Flag91 (Id));
8218 W ("Is_Known_Non_Null", Flag37 (Id));
8219 W ("Is_Known_Null", Flag204 (Id));
8220 W ("Is_Known_Valid", Flag170 (Id));
8221 W ("Is_Limited_Composite", Flag106 (Id));
8222 W ("Is_Limited_Interface", Flag197 (Id));
8223 W ("Is_Limited_Record", Flag25 (Id));
8224 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
8225 W ("Is_Non_Static_Subtype", Flag109 (Id));
8226 W ("Is_Null_Init_Proc", Flag178 (Id));
8227 W ("Is_Obsolescent", Flag153 (Id));
8228 W ("Is_Only_Out_Parameter", Flag226 (Id));
8229 W ("Is_Optional_Parameter", Flag134 (Id));
8230 W ("Is_Package_Body_Entity", Flag160 (Id));
8231 W ("Is_Packed", Flag51 (Id));
8232 W ("Is_Packed_Array_Type", Flag138 (Id));
8233 W ("Is_Potentially_Use_Visible", Flag9 (Id));
8234 W ("Is_Predicate_Function", Flag255 (Id));
8235 W ("Is_Predicate_Function_M", Flag256 (Id));
8236 W ("Is_Preelaborated", Flag59 (Id));
8237 W ("Is_Primitive", Flag218 (Id));
8238 W ("Is_Primitive_Wrapper", Flag195 (Id));
8239 W ("Is_Private_Composite", Flag107 (Id));
8240 W ("Is_Private_Descendant", Flag53 (Id));
8241 W ("Is_Private_Primitive", Flag245 (Id));
8242 W ("Is_Processed_Transient", Flag252 (Id));
8243 W ("Is_Public", Flag10 (Id));
8244 W ("Is_Pure", Flag44 (Id));
8245 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
8246 W ("Is_RACW_Stub_Type", Flag244 (Id));
8247 W ("Is_Raised", Flag224 (Id));
8248 W ("Is_Remote_Call_Interface", Flag62 (Id));
8249 W ("Is_Remote_Types", Flag61 (Id));
8250 W ("Is_Renaming_Of_Object", Flag112 (Id));
8251 W ("Is_Return_Object", Flag209 (Id));
8252 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
8253 W ("Is_Shared_Passive", Flag60 (Id));
8254 W ("Is_Statically_Allocated", Flag28 (Id));
8255 W ("Is_Tag", Flag78 (Id));
8256 W ("Is_Tagged_Type", Flag55 (Id));
8257 W ("Is_Thunk", Flag225 (Id));
8258 W ("Is_Trivial_Subprogram", Flag235 (Id));
8259 W ("Is_True_Constant", Flag163 (Id));
8260 W ("Is_Unchecked_Union", Flag117 (Id));
8261 W ("Is_Underlying_Record_View", Flag246 (Id));
8262 W ("Is_Unsigned_Type", Flag144 (Id));
8263 W ("Is_VMS_Exception", Flag133 (Id));
8264 W ("Is_Valued_Procedure", Flag127 (Id));
8265 W ("Is_Visible_Formal", Flag206 (Id));
8266 W ("Is_Visible_Lib_Unit", Flag116 (Id));
8267 W ("Is_Volatile", Flag16 (Id));
8268 W ("Itype_Printed", Flag202 (Id));
8269 W ("Kill_Elaboration_Checks", Flag32 (Id));
8270 W ("Kill_Range_Checks", Flag33 (Id));
8271 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
8272 W ("Low_Bound_Tested", Flag205 (Id));
8273 W ("Machine_Radix_10", Flag84 (Id));
8274 W ("Materialize_Entity", Flag168 (Id));
8275 W ("May_Inherit_Delayed_Rep_Aspects", Flag262 (Id));
8276 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
8277 W ("Must_Have_Preelab_Init", Flag208 (Id));
8278 W ("Needs_Debug_Info", Flag147 (Id));
8279 W ("Needs_No_Actuals", Flag22 (Id));
8280 W ("Never_Set_In_Source", Flag115 (Id));
8281 W ("No_Pool_Assigned", Flag131 (Id));
8282 W ("No_Return", Flag113 (Id));
8283 W ("No_Strict_Aliasing", Flag136 (Id));
8284 W ("Non_Binary_Modulus", Flag58 (Id));
8285 W ("Nonzero_Is_True", Flag162 (Id));
8286 W ("OK_To_Rename", Flag247 (Id));
8287 W ("OK_To_Reorder_Components", Flag239 (Id));
8288 W ("Optimize_Alignment_Space", Flag241 (Id));
8289 W ("Optimize_Alignment_Time", Flag242 (Id));
8290 W ("Overlays_Constant", Flag243 (Id));
8291 W ("Reachable", Flag49 (Id));
8292 W ("Referenced", Flag156 (Id));
8293 W ("Referenced_As_LHS", Flag36 (Id));
8294 W ("Referenced_As_Out_Parameter", Flag227 (Id));
8295 W ("Renamed_In_Spec", Flag231 (Id));
8296 W ("Requires_Overriding", Flag213 (Id));
8297 W ("Return_Present", Flag54 (Id));
8298 W ("Returns_By_Ref", Flag90 (Id));
8299 W ("Reverse_Bit_Order", Flag164 (Id));
8300 W ("Reverse_Storage_Order", Flag93 (Id));
8301 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
8302 W ("Size_Depends_On_Discriminant", Flag177 (Id));
8303 W ("Size_Known_At_Compile_Time", Flag92 (Id));
8304 W ("SPARK_Aux_Pragma_Inherited", Flag266 (Id));
8305 W ("SPARK_Pragma_Inherited", Flag265 (Id));
8306 W ("Static_Elaboration_Desired", Flag77 (Id));
8307 W ("Strict_Alignment", Flag145 (Id));
8308 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
8309 W ("Suppress_Initialization", Flag105 (Id));
8310 W ("Suppress_Style_Checks", Flag165 (Id));
8311 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
8312 W ("Treat_As_Volatile", Flag41 (Id));
8313 W ("Universal_Aliasing", Flag216 (Id));
8314 W ("Used_As_Generic_Actual", Flag222 (Id));
8315 W ("Uses_Sec_Stack", Flag95 (Id));
8316 W ("Warnings_Off", Flag96 (Id));
8317 W ("Warnings_Off_Used", Flag236 (Id));
8318 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
8319 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
8320 W ("Was_Hidden", Flag196 (Id));
8321 end Write_Entity_Flags;
8323 -----------------------
8324 -- Write_Entity_Info --
8325 -----------------------
8327 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
8329 procedure Write_Attribute (Which : String; Nam : E);
8330 -- Write attribute value with given string name
8332 procedure Write_Kind (Id : Entity_Id);
8333 -- Write Ekind field of entity
8335 ---------------------
8336 -- Write_Attribute --
8337 ---------------------
8339 procedure Write_Attribute (Which : String; Nam : E) is
8343 Write_Int (Int (Nam));
8345 Write_Name (Chars (Nam));
8347 end Write_Attribute;
8353 procedure Write_Kind (Id : Entity_Id) is
8354 K : constant String := Entity_Kind'Image (Ekind (Id));
8358 Write_Str (" Kind ");
8360 if Is_Type (Id) and then Is_Tagged_Type (Id) then
8361 Write_Str ("TAGGED ");
8364 Write_Str (K (3 .. K'Length));
8367 if Is_Type (Id) and then Depends_On_Private (Id) then
8368 Write_Str ("Depends_On_Private ");
8372 -- Start of processing for Write_Entity_Info
8376 Write_Attribute ("Name ", Id);
8377 Write_Int (Int (Id));
8381 Write_Attribute (" Type ", Etype (Id));
8383 Write_Attribute (" Scope ", Scope (Id));
8388 when Discrete_Kind =>
8389 Write_Str ("Bounds: Id = ");
8391 if Present (Scalar_Range (Id)) then
8392 Write_Int (Int (Type_Low_Bound (Id)));
8393 Write_Str (" .. Id = ");
8394 Write_Int (Int (Type_High_Bound (Id)));
8396 Write_Str ("Empty");
8407 (" Component Type ", Component_Type (Id));
8410 Write_Str (" Indexes ");
8412 Index := First_Index (Id);
8413 while Present (Index) loop
8414 Write_Attribute (" ", Etype (Index));
8415 Index := Next_Index (Index);
8423 (" Directly Designated Type ",
8424 Directly_Designated_Type (Id));
8427 when Overloadable_Kind =>
8428 if Present (Homonym (Id)) then
8429 Write_Str (" Homonym ");
8430 Write_Name (Chars (Homonym (Id)));
8432 Write_Int (Int (Homonym (Id)));
8439 if Ekind (Scope (Id)) in Record_Kind then
8441 " Original_Record_Component ",
8442 Original_Record_Component (Id));
8443 Write_Int (Int (Original_Record_Component (Id)));
8447 when others => null;
8449 end Write_Entity_Info;
8451 -----------------------
8452 -- Write_Field6_Name --
8453 -----------------------
8455 procedure Write_Field6_Name (Id : Entity_Id) is
8456 pragma Warnings (Off, Id);
8458 Write_Str ("First_Rep_Item");
8459 end Write_Field6_Name;
8461 -----------------------
8462 -- Write_Field7_Name --
8463 -----------------------
8465 procedure Write_Field7_Name (Id : Entity_Id) is
8466 pragma Warnings (Off, Id);
8468 Write_Str ("Freeze_Node");
8469 end Write_Field7_Name;
8471 -----------------------
8472 -- Write_Field8_Name --
8473 -----------------------
8475 procedure Write_Field8_Name (Id : Entity_Id) is
8479 Write_Str ("Associated_Node_For_Itype");
8482 Write_Str ("Dependent_Instances");
8485 Write_Str ("First_Exit_Statement");
8488 Write_Str ("Hiding_Loop_Variable");
8492 E_Subprogram_Body =>
8493 Write_Str ("Mechanism");
8497 Write_Str ("Normalized_First_Bit");
8500 Write_Str ("Postcondition_Proc");
8502 when E_Abstract_State =>
8503 Write_Str ("Refinement_Constituents");
8505 when E_Return_Statement =>
8506 Write_Str ("Return_Applies_To");
8509 Write_Str ("Field8??");
8511 end Write_Field8_Name;
8513 -----------------------
8514 -- Write_Field9_Name --
8515 -----------------------
8517 procedure Write_Field9_Name (Id : Entity_Id) is
8521 Write_Str ("Class_Wide_Type");
8524 Write_Str ("Current_Value");
8527 E_Generic_Function |
8529 E_Generic_Procedure |
8532 Write_Str ("Renaming_Map");
8535 Write_Str ("Field9??");
8537 end Write_Field9_Name;
8539 ------------------------
8540 -- Write_Field10_Name --
8541 ------------------------
8543 procedure Write_Field10_Name (Id : Entity_Id) is
8546 when Class_Wide_Kind |
8552 Write_Str ("Direct_Primitive_Operations");
8555 Write_Str ("Float_Rep");
8557 when E_In_Parameter |
8559 Write_Str ("Discriminal_Link");
8565 Write_Str ("Handler_Records");
8569 Write_Str ("Normalized_Position_Max");
8571 when E_Abstract_State |
8573 Write_Str ("Refined_State");
8576 Write_Str ("Field10??");
8578 end Write_Field10_Name;
8580 ------------------------
8581 -- Write_Field11_Name --
8582 ------------------------
8584 procedure Write_Field11_Name (Id : Entity_Id) is
8588 Write_Str ("Block_Node");
8592 Write_Str ("Component_Bit_Offset");
8595 Write_Str ("Entry_Component");
8597 when E_Enumeration_Literal =>
8598 Write_Str ("Enumeration_Pos");
8602 Write_Str ("Full_View");
8604 when E_Generic_Package =>
8605 Write_Str ("Generic_Homonym");
8611 Write_Str ("Protected_Body_Subprogram");
8614 Write_Str ("Field11??");
8616 end Write_Field11_Name;
8618 ------------------------
8619 -- Write_Field12_Name --
8620 ------------------------
8622 procedure Write_Field12_Name (Id : Entity_Id) is
8626 Write_Str ("Associated_Formal_Package");
8629 Write_Str ("Barrier_Function");
8631 when E_Enumeration_Literal =>
8632 Write_Str ("Enumeration_Rep");
8640 E_In_Out_Parameter |
8644 Write_Str ("Esize");
8648 Write_Str ("Next_Inlined_Subprogram");
8651 Write_Str ("Field12??");
8653 end Write_Field12_Name;
8655 ------------------------
8656 -- Write_Field13_Name --
8657 ------------------------
8659 procedure Write_Field13_Name (Id : Entity_Id) is
8664 Write_Str ("Component_Clause");
8667 Write_Str ("Elaboration_Entity");
8671 Generic_Unit_Kind =>
8672 Write_Str ("Elaboration_Entity");
8676 Write_Str ("Extra_Accessibility");
8679 Write_Str ("RM_Size");
8682 Write_Str ("Field13??");
8684 end Write_Field13_Name;
8686 -----------------------
8687 -- Write_Field14_Name --
8688 -----------------------
8690 procedure Write_Field14_Name (Id : Entity_Id) is
8699 Write_Str ("Alignment");
8703 Write_Str ("First_Optional_Parameter");
8707 Write_Str ("Normalized_Position");
8710 E_Generic_Package =>
8711 Write_Str ("Shadow_Entities");
8714 Write_Str ("Field14??");
8716 end Write_Field14_Name;
8718 ------------------------
8719 -- Write_Field15_Name --
8720 ------------------------
8722 procedure Write_Field15_Name (Id : Entity_Id) is
8725 when E_Discriminant =>
8726 Write_Str ("Discriminant_Number");
8729 Write_Str ("DT_Entry_Count");
8733 Write_Str ("DT_Position");
8735 when E_Protected_Type =>
8736 Write_Str ("Entry_Bodies_Array");
8739 Write_Str ("Entry_Parameters_Type");
8742 Write_Str ("Extra_Formal");
8744 when Enumeration_Kind =>
8745 Write_Str ("Lit_Indexes");
8749 Write_Str ("Related_Instance");
8751 when Decimal_Fixed_Point_Kind =>
8752 Write_Str ("Scale_Value");
8756 Write_Str ("Status_Flag_Or_Transient_Decl");
8760 Write_Str ("Storage_Size_Variable");
8762 when E_String_Literal_Subtype =>
8763 Write_Str ("String_Literal_Low_Bound");
8766 Write_Str ("Field15??");
8768 end Write_Field15_Name;
8770 ------------------------
8771 -- Write_Field16_Name --
8772 ------------------------
8774 procedure Write_Field16_Name (Id : Entity_Id) is
8777 when E_Record_Type |
8778 E_Record_Type_With_Private =>
8779 Write_Str ("Access_Disp_Table");
8781 when E_Abstract_State =>
8782 Write_Str ("Body_References");
8784 when E_Record_Subtype |
8785 E_Class_Wide_Subtype =>
8786 Write_Str ("Cloned_Subtype");
8790 Write_Str ("DTC_Entity");
8793 Write_Str ("Entry_Formal");
8798 Write_Str ("First_Private_Entity");
8800 when Enumeration_Kind =>
8801 Write_Str ("Lit_Strings");
8803 when E_String_Literal_Subtype =>
8804 Write_Str ("String_Literal_Length");
8808 Write_Str ("Unset_Reference");
8811 Write_Str ("Field16??");
8813 end Write_Field16_Name;
8815 ------------------------
8816 -- Write_Field17_Name --
8817 ------------------------
8819 procedure Write_Field17_Name (Id : Entity_Id) is
8824 E_Generic_In_Out_Parameter |
8826 Write_Str ("Actual_Subtype");
8829 Write_Str ("Digits_Value");
8831 when E_Discriminant =>
8832 Write_Str ("Discriminal");
8841 E_Generic_Function |
8843 E_Generic_Procedure |
8851 E_Return_Statement |
8853 E_Subprogram_Type =>
8854 Write_Str ("First_Entity");
8857 Write_Str ("First_Index");
8859 when Enumeration_Kind =>
8860 Write_Str ("First_Literal");
8863 Write_Str ("Master_Id");
8865 when Modular_Integer_Kind =>
8866 Write_Str ("Modulus");
8868 when E_Abstract_State |
8869 E_Incomplete_Type =>
8870 Write_Str ("Non_Limited_View");
8872 when E_Incomplete_Subtype =>
8873 if From_Limited_With (Id) then
8874 Write_Str ("Non_Limited_View");
8878 Write_Str ("Prival");
8881 Write_Str ("Field17??");
8883 end Write_Field17_Name;
8885 ------------------------
8886 -- Write_Field18_Name --
8887 ------------------------
8889 procedure Write_Field18_Name (Id : Entity_Id) is
8892 when E_Enumeration_Literal |
8896 Write_Str ("Alias");
8898 when E_Record_Type =>
8899 Write_Str ("Corresponding_Concurrent_Type");
8901 when E_Subprogram_Body =>
8902 Write_Str ("Corresponding_Protected_Entry");
8904 when Concurrent_Kind =>
8905 Write_Str ("Corresponding_Record_Type");
8910 Write_Str ("Enclosing_Scope");
8912 when E_Entry_Index_Parameter =>
8913 Write_Str ("Entry_Index_Constant");
8915 when E_Class_Wide_Subtype |
8916 E_Access_Protected_Subprogram_Type |
8917 E_Anonymous_Access_Protected_Subprogram_Type |
8918 E_Access_Subprogram_Type |
8920 Write_Str ("Equivalent_Type");
8922 when Fixed_Point_Kind =>
8923 Write_Str ("Delta_Value");
8925 when Incomplete_Or_Private_Kind |
8927 Write_Str ("Private_Dependents");
8930 Write_Str ("Renamed_Object");
8934 E_Generic_Function |
8935 E_Generic_Procedure |
8936 E_Generic_Package =>
8937 Write_Str ("Renamed_Entity");
8940 Write_Str ("Field18??");
8942 end Write_Field18_Name;
8944 -----------------------
8945 -- Write_Field19_Name --
8946 -----------------------
8948 procedure Write_Field19_Name (Id : Entity_Id) is
8952 E_Generic_Package =>
8953 Write_Str ("Body_Entity");
8955 when E_Discriminant =>
8956 Write_Str ("Corresponding_Discriminant");
8959 Write_Str ("Default_Aspect_Value");
8961 when E_Array_Type =>
8962 Write_Str ("Default_Component_Value");
8964 when E_Record_Type =>
8965 Write_Str ("Parent_Subtype");
8969 Write_Str ("Size_Check_Code");
8971 when E_Package_Body |
8973 Write_Str ("Spec_Entity");
8975 when Private_Kind =>
8976 Write_Str ("Underlying_Full_View");
8978 when E_Function | E_Operator | E_Subprogram_Type =>
8979 Write_Str ("Extra_Accessibility_Of_Result");
8982 Write_Str ("Field19??");
8984 end Write_Field19_Name;
8986 -----------------------
8987 -- Write_Field20_Name --
8988 -----------------------
8990 procedure Write_Field20_Name (Id : Entity_Id) is
8994 Write_Str ("Component_Type");
8996 when E_In_Parameter |
8997 E_Generic_In_Parameter =>
8998 Write_Str ("Default_Value");
9001 Write_Str ("Directly_Designated_Type");
9004 Write_Str ("Discriminant_Checking_Func");
9006 when E_Discriminant =>
9007 Write_Str ("Discriminant_Default_Value");
9016 E_Generic_Function |
9018 E_Generic_Procedure |
9026 E_Return_Statement |
9028 E_Subprogram_Type =>
9029 Write_Str ("Last_Entity");
9033 Write_Str ("Prival_Link");
9036 Write_Str ("Scalar_Range");
9039 Write_Str ("Register_Exception_Call");
9042 Write_Str ("Field20??");
9044 end Write_Field20_Name;
9046 -----------------------
9047 -- Write_Field21_Name --
9048 -----------------------
9050 procedure Write_Field21_Name (Id : Entity_Id) is
9054 Write_Str ("Accept_Address");
9056 when E_In_Parameter =>
9057 Write_Str ("Default_Expr_Function");
9059 when Concurrent_Kind |
9060 Incomplete_Or_Private_Kind |
9064 Write_Str ("Discriminant_Constraint");
9069 E_Generic_Function |
9071 E_Generic_Procedure |
9073 Write_Str ("Interface_Name");
9076 Modular_Integer_Kind =>
9077 Write_Str ("Original_Array_Type");
9079 when Fixed_Point_Kind =>
9080 Write_Str ("Small_Value");
9083 Write_Str ("Field21??");
9085 end Write_Field21_Name;
9087 -----------------------
9088 -- Write_Field22_Name --
9089 -----------------------
9091 procedure Write_Field22_Name (Id : Entity_Id) is
9095 Write_Str ("Associated_Storage_Pool");
9098 Write_Str ("Component_Size");
9100 when E_Record_Type =>
9101 Write_Str ("Corresponding_Remote_Type");
9105 Write_Str ("Original_Record_Component");
9107 when E_Enumeration_Literal =>
9108 Write_Str ("Enumeration_Rep_Expr");
9111 Write_Str ("Exception_Code");
9113 when E_Record_Type_With_Private |
9114 E_Record_Subtype_With_Private |
9117 E_Limited_Private_Type |
9118 E_Limited_Private_Subtype =>
9119 Write_Str ("Private_View");
9122 Write_Str ("Protected_Formal");
9132 E_Generic_Function |
9133 E_Generic_Procedure |
9136 E_Return_Statement |
9139 Write_Str ("Scope_Depth_Value");
9142 Write_Str ("Shared_Var_Procs_Instance");
9145 Write_Str ("Field22??");
9147 end Write_Field22_Name;
9149 ------------------------
9150 -- Write_Field23_Name --
9151 ------------------------
9153 procedure Write_Field23_Name (Id : Entity_Id) is
9156 when E_Discriminant =>
9157 Write_Str ("CR_Discriminant");
9160 Write_Str ("Entry_Cancel_Parameter");
9162 when E_Enumeration_Type =>
9163 Write_Str ("Enum_Pos_To_Rep");
9167 Write_Str ("Extra_Constrained");
9170 Write_Str ("Finalization_Master");
9172 when E_Generic_Function |
9174 E_Generic_Procedure =>
9175 Write_Str ("Inner_Instances");
9178 Write_Str ("Packed_Array_Type");
9181 Write_Str ("Protection_Object");
9183 when Concurrent_Kind |
9184 Incomplete_Or_Private_Kind |
9188 Write_Str ("Stored_Constraint");
9192 if Present (Scope (Id))
9193 and then Is_Protected_Type (Scope (Id))
9195 Write_Str ("Protection_Object");
9197 Write_Str ("Generic_Renamings");
9201 if Is_Generic_Instance (Id) then
9202 Write_Str ("Generic_Renamings");
9204 Write_Str ("Limited_View");
9208 Write_Str ("Field23??");
9210 end Write_Field23_Name;
9212 ------------------------
9213 -- Write_Field24_Name --
9214 ------------------------
9216 procedure Write_Field24_Name (Id : Entity_Id) is
9222 Write_Str ("Related_Expression");
9225 Write_Str ("Field24???");
9227 end Write_Field24_Name;
9229 ------------------------
9230 -- Write_Field25_Name --
9231 ------------------------
9233 procedure Write_Field25_Name (Id : Entity_Id) is
9237 Write_Str ("Abstract_States");
9240 Write_Str ("Debug_Renaming_Link");
9243 Write_Str ("DT_Offset_To_Top_Func");
9247 Write_Str ("Interface_Alias");
9249 when E_Record_Type |
9251 E_Record_Type_With_Private |
9252 E_Record_Subtype_With_Private =>
9253 Write_Str ("Interfaces");
9257 Write_Str ("Related_Array_Object");
9260 Write_Str ("Task_Body_Procedure");
9264 Write_Str ("PPC_Wrapper");
9266 when E_Enumeration_Subtype |
9267 E_Modular_Integer_Subtype |
9268 E_Signed_Integer_Subtype =>
9269 Write_Str ("Static_Predicate");
9272 Write_Str ("Field25??");
9274 end Write_Field25_Name;
9276 ------------------------
9277 -- Write_Field26_Name --
9278 ------------------------
9280 procedure Write_Field26_Name (Id : Entity_Id) is
9283 when E_Record_Type |
9284 E_Record_Type_With_Private =>
9285 Write_Str ("Dispatch_Table_Wrappers");
9287 when E_In_Out_Parameter |
9290 Write_Str ("Last_Assignment");
9292 when E_Access_Subprogram_Type =>
9293 Write_Str ("Original_Access_Type");
9295 when E_Generic_Package |
9297 Write_Str ("Package_Instantiation");
9301 Write_Str ("Related_Type");
9304 Write_Str ("Relative_Deadline_Variable");
9308 Write_Str ("Overridden_Operation");
9311 Write_Str ("Field26??");
9313 end Write_Field26_Name;
9315 ------------------------
9316 -- Write_Field27_Name --
9317 ------------------------
9319 procedure Write_Field27_Name (Id : Entity_Id) is
9324 Write_Str ("Current_Use_Clause");
9329 Write_Str ("Related_Type");
9333 Write_Str ("Wrapped_Entity");
9336 Write_Str ("Field27??");
9338 end Write_Field27_Name;
9340 ------------------------
9341 -- Write_Field28_Name --
9342 ------------------------
9344 procedure Write_Field28_Name (Id : Entity_Id) is
9352 E_Subprogram_Type =>
9353 Write_Str ("Extra_Formals");
9357 Write_Str ("Finalizer");
9361 Write_Str ("Initialization_Statements");
9363 when E_Record_Type =>
9364 Write_Str ("Underlying_Record_View");
9367 Write_Str ("Field28??");
9369 end Write_Field28_Name;
9371 ------------------------
9372 -- Write_Field29_Name --
9373 ------------------------
9375 procedure Write_Field29_Name (Id : Entity_Id) is
9379 Write_Str ("Subprograms_For_Type");
9382 Write_Str ("Field29??");
9384 end Write_Field29_Name;
9386 ------------------------
9387 -- Write_Field30_Name --
9388 ------------------------
9390 procedure Write_Field30_Name (Id : Entity_Id) is
9394 Write_Str ("Corresponding_Equality");
9397 Write_Str ("Static_Initialization");
9400 Write_Str ("Field30??");
9402 end Write_Field30_Name;
9404 ------------------------
9405 -- Write_Field31_Name --
9406 ------------------------
9408 procedure Write_Field31_Name (Id : Entity_Id) is
9413 Write_Str ("Thunk_Entity");
9416 Write_Str ("Field31??");
9418 end Write_Field31_Name;
9420 ------------------------
9421 -- Write_Field32_Name --
9422 ------------------------
9424 procedure Write_Field32_Name (Id : Entity_Id) is
9428 E_Generic_Function |
9430 E_Generic_Procedure |
9434 E_Subprogram_Body =>
9435 Write_Str ("SPARK_Pragma");
9438 Write_Str ("Field32??");
9440 end Write_Field32_Name;
9442 ------------------------
9443 -- Write_Field33_Name --
9444 ------------------------
9446 procedure Write_Field33_Name (Id : Entity_Id) is
9449 when E_Generic_Package |
9452 Write_Str ("SPARK_Aux_Pragma");
9455 Write_Str ("Field33??");
9457 end Write_Field33_Name;
9459 ------------------------
9460 -- Write_Field34_Name --
9461 ------------------------
9463 procedure Write_Field34_Name (Id : Entity_Id) is
9473 Generic_Subprogram_Kind |
9475 Write_Str ("Contract");
9478 Write_Str ("Field34??");
9480 end Write_Field34_Name;
9482 ------------------------
9483 -- Write_Field35_Name --
9484 ------------------------
9486 procedure Write_Field35_Name (Id : Entity_Id) is
9490 Write_Str ("Field35??");
9492 end Write_Field35_Name;
9494 -------------------------
9495 -- Iterator Procedures --
9496 -------------------------
9498 procedure Proc_Next_Component (N : in out Node_Id) is
9500 N := Next_Component (N);
9501 end Proc_Next_Component;
9503 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
9505 N := Next_Entity (N);
9506 while Present (N) loop
9507 exit when Ekind_In (N, E_Component, E_Discriminant);
9508 N := Next_Entity (N);
9510 end Proc_Next_Component_Or_Discriminant;
9512 procedure Proc_Next_Discriminant (N : in out Node_Id) is
9514 N := Next_Discriminant (N);
9515 end Proc_Next_Discriminant;
9517 procedure Proc_Next_Formal (N : in out Node_Id) is
9519 N := Next_Formal (N);
9520 end Proc_Next_Formal;
9522 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
9524 N := Next_Formal_With_Extras (N);
9525 end Proc_Next_Formal_With_Extras;
9527 procedure Proc_Next_Index (N : in out Node_Id) is
9529 N := Next_Index (N);
9530 end Proc_Next_Index;
9532 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
9534 N := Next_Inlined_Subprogram (N);
9535 end Proc_Next_Inlined_Subprogram;
9537 procedure Proc_Next_Literal (N : in out Node_Id) is
9539 N := Next_Literal (N);
9540 end Proc_Next_Literal;
9542 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
9544 N := Next_Stored_Discriminant (N);
9545 end Proc_Next_Stored_Discriminant;