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 -- Cloned_Subtype Node16
137 -- Entry_Formal Node16
138 -- First_Private_Entity Node16
139 -- Lit_Strings Node16
140 -- String_Literal_Length Uint16
141 -- Unset_Reference Node16
143 -- Actual_Subtype Node17
144 -- Digits_Value Uint17
145 -- Discriminal Node17
146 -- First_Entity Node17
147 -- First_Index Node17
148 -- First_Literal Node17
151 -- Non_Limited_View Node17
155 -- Corresponding_Concurrent_Type Node18
156 -- Corresponding_Protected_Entry Node18
157 -- Corresponding_Record_Type Node18
158 -- Delta_Value Ureal18
159 -- Enclosing_Scope Node18
160 -- Equivalent_Type Node18
161 -- Private_Dependents Elist18
162 -- Renamed_Entity Node18
163 -- Renamed_Object Node18
165 -- Body_Entity Node19
166 -- Corresponding_Discriminant Node19
167 -- Default_Aspect_Component_Value Node19
168 -- Default_Aspect_Value Node19
169 -- Extra_Accessibility_Of_Result Node19
170 -- Parent_Subtype Node19
171 -- Size_Check_Code Node19
172 -- Spec_Entity Node19
173 -- Underlying_Full_View Node19
175 -- Component_Type Node20
176 -- Default_Value Node20
177 -- Directly_Designated_Type Node20
178 -- Discriminant_Checking_Func Node20
179 -- Discriminant_Default_Value Node20
180 -- Last_Entity Node20
181 -- Prival_Link Node20
182 -- Register_Exception_Call Node20
183 -- Scalar_Range Node20
185 -- Accept_Address Elist21
186 -- Default_Expr_Function Node21
187 -- Discriminant_Constraint Elist21
188 -- Interface_Name Node21
189 -- Original_Array_Type Node21
190 -- Small_Value Ureal21
192 -- Associated_Storage_Pool Node22
193 -- Component_Size Uint22
194 -- Corresponding_Remote_Type Node22
195 -- Enumeration_Rep_Expr Node22
196 -- Exception_Code Uint22
197 -- Original_Record_Component Node22
198 -- Private_View Node22
199 -- Protected_Formal Node22
200 -- Scope_Depth_Value Uint22
201 -- Shared_Var_Procs_Instance Node22
203 -- CR_Discriminant Node23
204 -- Entry_Cancel_Parameter Node23
205 -- Enum_Pos_To_Rep Node23
206 -- Extra_Constrained Node23
207 -- Finalization_Master Node23
208 -- Generic_Renamings Elist23
209 -- Inner_Instances Elist23
210 -- Limited_View Node23
211 -- Packed_Array_Type Node23
212 -- Protection_Object Node23
213 -- Stored_Constraint Elist23
215 -- Related_Expression Node24
218 -- Interface_Alias Node25
219 -- Interfaces Elist25
220 -- Debug_Renaming_Link Node25
221 -- DT_Offset_To_Top_Func Node25
222 -- PPC_Wrapper Node25
223 -- Related_Array_Object Node25
224 -- Static_Predicate List25
225 -- Task_Body_Procedure Node25
227 -- Dispatch_Table_Wrappers Elist26
228 -- Last_Assignment Node26
229 -- Original_Access_Type Node26
230 -- Overridden_Operation Node26
231 -- Package_Instantiation Node26
232 -- Relative_Deadline_Variable Node26
234 -- Current_Use_Clause Node27
235 -- Related_Type Node27
236 -- Wrapped_Entity Node27
238 -- Extra_Formals Node28
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_Mode_Pragmas Node32
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_With_Type 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
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 C_Pass_By_Copy (Id : E) return B is
738 pragma Assert (Is_Record_Type (Id));
739 return Flag125 (Implementation_Base_Type (Id));
742 function Can_Never_Be_Null (Id : E) return B is
745 end Can_Never_Be_Null;
747 function Checks_May_Be_Suppressed (Id : E) return B is
750 end Checks_May_Be_Suppressed;
752 function Class_Wide_Type (Id : E) return E is
754 pragma Assert (Is_Type (Id));
758 function Cloned_Subtype (Id : E) return E is
760 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
764 function Component_Bit_Offset (Id : E) return U is
766 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
768 end Component_Bit_Offset;
770 function Component_Clause (Id : E) return N is
772 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
774 end Component_Clause;
776 function Component_Size (Id : E) return U is
778 pragma Assert (Is_Array_Type (Id));
779 return Uint22 (Implementation_Base_Type (Id));
782 function Component_Type (Id : E) return E is
784 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
785 return Node20 (Implementation_Base_Type (Id));
788 function Corresponding_Concurrent_Type (Id : E) return E is
790 pragma Assert (Ekind (Id) = E_Record_Type);
792 end Corresponding_Concurrent_Type;
794 function Corresponding_Discriminant (Id : E) return E is
796 pragma Assert (Ekind (Id) = E_Discriminant);
798 end Corresponding_Discriminant;
800 function Corresponding_Equality (Id : E) return E is
803 (Ekind (Id) = E_Function
804 and then not Comes_From_Source (Id)
805 and then Chars (Id) = Name_Op_Ne);
807 end Corresponding_Equality;
809 function Corresponding_Protected_Entry (Id : E) return E is
811 pragma Assert (Ekind (Id) = E_Subprogram_Body);
813 end Corresponding_Protected_Entry;
815 function Corresponding_Record_Type (Id : E) return E is
817 pragma Assert (Is_Concurrent_Type (Id));
819 end Corresponding_Record_Type;
821 function Corresponding_Remote_Type (Id : E) return E is
824 end Corresponding_Remote_Type;
826 function Current_Use_Clause (Id : E) return E is
828 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
830 end Current_Use_Clause;
832 function Current_Value (Id : E) return N is
834 pragma Assert (Ekind (Id) in Object_Kind);
838 function CR_Discriminant (Id : E) return E is
843 function Debug_Info_Off (Id : E) return B is
848 function Debug_Renaming_Link (Id : E) return E is
851 end Debug_Renaming_Link;
853 function Default_Aspect_Component_Value (Id : E) return N is
855 pragma Assert (Is_Array_Type (Id));
856 return Node19 (Base_Type (Id));
857 end Default_Aspect_Component_Value;
859 function Default_Aspect_Value (Id : E) return N is
861 pragma Assert (Is_Scalar_Type (Id));
862 return Node19 (Base_Type (Id));
863 end Default_Aspect_Value;
865 function Default_Expr_Function (Id : E) return E is
867 pragma Assert (Is_Formal (Id));
869 end Default_Expr_Function;
871 function Default_Expressions_Processed (Id : E) return B is
874 end Default_Expressions_Processed;
876 function Default_Value (Id : E) return N is
878 pragma Assert (Is_Formal (Id));
882 function Delay_Cleanups (Id : E) return B is
887 function Delay_Subprogram_Descriptors (Id : E) return B is
890 end Delay_Subprogram_Descriptors;
892 function Delta_Value (Id : E) return R is
894 pragma Assert (Is_Fixed_Point_Type (Id));
898 function Dependent_Instances (Id : E) return L is
900 pragma Assert (Is_Generic_Instance (Id));
902 end Dependent_Instances;
904 function Depends_On_Private (Id : E) return B is
906 pragma Assert (Nkind (Id) in N_Entity);
908 end Depends_On_Private;
910 function Digits_Value (Id : E) return U is
913 (Is_Floating_Point_Type (Id)
914 or else Is_Decimal_Fixed_Point_Type (Id));
918 function Direct_Primitive_Operations (Id : E) return L is
920 pragma Assert (Is_Tagged_Type (Id));
922 end Direct_Primitive_Operations;
924 function Directly_Designated_Type (Id : E) return E is
926 pragma Assert (Is_Access_Type (Id));
928 end Directly_Designated_Type;
930 function Discard_Names (Id : E) return B is
935 function Discriminal (Id : E) return E is
937 pragma Assert (Ekind (Id) = E_Discriminant);
941 function Discriminal_Link (Id : E) return N is
944 end Discriminal_Link;
946 function Discriminant_Checking_Func (Id : E) return E is
948 pragma Assert (Ekind (Id) = E_Component);
950 end Discriminant_Checking_Func;
952 function Discriminant_Constraint (Id : E) return L is
954 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
956 end Discriminant_Constraint;
958 function Discriminant_Default_Value (Id : E) return N is
960 pragma Assert (Ekind (Id) = E_Discriminant);
962 end Discriminant_Default_Value;
964 function Discriminant_Number (Id : E) return U is
966 pragma Assert (Ekind (Id) = E_Discriminant);
968 end Discriminant_Number;
970 function Dispatch_Table_Wrappers (Id : E) return L is
972 pragma Assert (Ekind_In (Id, E_Record_Type,
974 return Elist26 (Implementation_Base_Type (Id));
975 end Dispatch_Table_Wrappers;
977 function DT_Entry_Count (Id : E) return U is
979 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
983 function DT_Offset_To_Top_Func (Id : E) return E is
985 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
987 end DT_Offset_To_Top_Func;
989 function DT_Position (Id : E) return U is
991 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
992 and then Present (DTC_Entity (Id)));
996 function DTC_Entity (Id : E) return E is
998 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1002 function Elaborate_Body_Desirable (Id : E) return B is
1004 pragma Assert (Ekind (Id) = E_Package);
1005 return Flag210 (Id);
1006 end Elaborate_Body_Desirable;
1008 function Elaboration_Entity (Id : E) return E is
1013 Ekind (Id) = E_Package
1015 Is_Generic_Unit (Id));
1017 end Elaboration_Entity;
1019 function Elaboration_Entity_Required (Id : E) return B is
1024 Ekind (Id) = E_Package
1026 Is_Generic_Unit (Id));
1027 return Flag174 (Id);
1028 end Elaboration_Entity_Required;
1030 function Enclosing_Scope (Id : E) return E is
1033 end Enclosing_Scope;
1035 function Entry_Accepted (Id : E) return B is
1037 pragma Assert (Is_Entry (Id));
1038 return Flag152 (Id);
1041 function Entry_Bodies_Array (Id : E) return E is
1044 end Entry_Bodies_Array;
1046 function Entry_Cancel_Parameter (Id : E) return E is
1049 end Entry_Cancel_Parameter;
1051 function Entry_Component (Id : E) return E is
1054 end Entry_Component;
1056 function Entry_Formal (Id : E) return E is
1061 function Entry_Index_Constant (Id : E) return N is
1063 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
1065 end Entry_Index_Constant;
1067 function Contract (Id : E) return N is
1070 (Ekind_In (Id, E_Entry,
1076 or else Is_Generic_Subprogram (Id)
1077 or else Is_Subprogram (Id));
1081 function Entry_Parameters_Type (Id : E) return E is
1084 end Entry_Parameters_Type;
1086 function Enum_Pos_To_Rep (Id : E) return E is
1088 pragma Assert (Ekind (Id) = E_Enumeration_Type);
1090 end Enum_Pos_To_Rep;
1092 function Enumeration_Pos (Id : E) return Uint is
1094 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1096 end Enumeration_Pos;
1098 function Enumeration_Rep (Id : E) return U is
1100 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1102 end Enumeration_Rep;
1104 function Enumeration_Rep_Expr (Id : E) return N is
1106 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1108 end Enumeration_Rep_Expr;
1110 function Equivalent_Type (Id : E) return E is
1113 (Ekind_In (Id, E_Class_Wide_Type,
1114 E_Class_Wide_Subtype,
1115 E_Access_Subprogram_Type,
1116 E_Access_Protected_Subprogram_Type,
1117 E_Anonymous_Access_Protected_Subprogram_Type,
1118 E_Access_Subprogram_Type,
1121 end Equivalent_Type;
1123 function Esize (Id : E) return Uint is
1128 function Exception_Code (Id : E) return Uint is
1130 pragma Assert (Ekind (Id) = E_Exception);
1134 function Extra_Accessibility (Id : E) return E is
1137 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
1139 end Extra_Accessibility;
1141 function Extra_Accessibility_Of_Result (Id : E) return E is
1143 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
1145 end Extra_Accessibility_Of_Result;
1147 function Extra_Constrained (Id : E) return E is
1149 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1151 end Extra_Constrained;
1153 function Extra_Formal (Id : E) return E is
1158 function Extra_Formals (Id : E) return E is
1161 (Is_Overloadable (Id)
1162 or else Ekind_In (Id, E_Entry_Family,
1164 E_Subprogram_Type));
1168 function Can_Use_Internal_Rep (Id : E) return B is
1170 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1171 return Flag229 (Base_Type (Id));
1172 end Can_Use_Internal_Rep;
1174 function Finalization_Master (Id : E) return E is
1176 pragma Assert (Is_Access_Type (Id));
1177 return Node23 (Root_Type (Id));
1178 end Finalization_Master;
1180 function Finalize_Storage_Only (Id : E) return B is
1182 pragma Assert (Is_Type (Id));
1183 return Flag158 (Base_Type (Id));
1184 end Finalize_Storage_Only;
1186 function Finalizer (Id : E) return E is
1188 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
1192 function First_Entity (Id : E) return E is
1197 function First_Exit_Statement (Id : E) return N is
1199 pragma Assert (Ekind (Id) = E_Loop);
1201 end First_Exit_Statement;
1203 function First_Index (Id : E) return N is
1205 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1209 function First_Literal (Id : E) return E is
1211 pragma Assert (Is_Enumeration_Type (Id));
1215 function First_Optional_Parameter (Id : E) return E is
1217 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1219 end First_Optional_Parameter;
1221 function First_Private_Entity (Id : E) return E is
1223 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1224 or else Ekind (Id) in Concurrent_Kind);
1226 end First_Private_Entity;
1228 function First_Rep_Item (Id : E) return E is
1233 function Freeze_Node (Id : E) return N is
1238 function From_With_Type (Id : E) return B is
1240 return Flag159 (Id);
1243 function Full_View (Id : E) return E is
1245 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1249 function Generic_Homonym (Id : E) return E is
1251 pragma Assert (Ekind (Id) = E_Generic_Package);
1253 end Generic_Homonym;
1255 function Generic_Renamings (Id : E) return L is
1257 return Elist23 (Id);
1258 end Generic_Renamings;
1260 function Handler_Records (Id : E) return S is
1263 end Handler_Records;
1265 function Has_Aliased_Components (Id : E) return B is
1267 return Flag135 (Implementation_Base_Type (Id));
1268 end Has_Aliased_Components;
1270 function Has_Alignment_Clause (Id : E) return B is
1273 end Has_Alignment_Clause;
1275 function Has_All_Calls_Remote (Id : E) return B is
1278 end Has_All_Calls_Remote;
1280 function Has_Anonymous_Master (Id : E) return B is
1283 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
1284 return Flag253 (Id);
1285 end Has_Anonymous_Master;
1287 function Has_Atomic_Components (Id : E) return B is
1289 return Flag86 (Implementation_Base_Type (Id));
1290 end Has_Atomic_Components;
1292 function Has_Biased_Representation (Id : E) return B is
1294 return Flag139 (Id);
1295 end Has_Biased_Representation;
1297 function Has_Completion (Id : E) return B is
1302 function Has_Completion_In_Body (Id : E) return B is
1304 pragma Assert (Is_Type (Id));
1306 end Has_Completion_In_Body;
1308 function Has_Complex_Representation (Id : E) return B is
1310 pragma Assert (Is_Type (Id));
1311 return Flag140 (Implementation_Base_Type (Id));
1312 end Has_Complex_Representation;
1314 function Has_Component_Size_Clause (Id : E) return B is
1316 pragma Assert (Is_Array_Type (Id));
1317 return Flag68 (Implementation_Base_Type (Id));
1318 end Has_Component_Size_Clause;
1320 function Has_Constrained_Partial_View (Id : E) return B is
1322 pragma Assert (Is_Type (Id));
1323 return Flag187 (Id);
1324 end Has_Constrained_Partial_View;
1326 function Has_Controlled_Component (Id : E) return B is
1328 return Flag43 (Base_Type (Id));
1329 end Has_Controlled_Component;
1331 function Has_Contiguous_Rep (Id : E) return B is
1333 return Flag181 (Id);
1334 end Has_Contiguous_Rep;
1336 function Has_Controlling_Result (Id : E) return B is
1339 end Has_Controlling_Result;
1341 function Has_Convention_Pragma (Id : E) return B is
1343 return Flag119 (Id);
1344 end Has_Convention_Pragma;
1346 function Has_Default_Aspect (Id : E) return B is
1348 return Flag39 (Base_Type (Id));
1349 end Has_Default_Aspect;
1351 function Has_Delayed_Aspects (Id : E) return B is
1353 pragma Assert (Nkind (Id) in N_Entity);
1354 return Flag200 (Id);
1355 end Has_Delayed_Aspects;
1357 function Has_Delayed_Freeze (Id : E) return B is
1359 pragma Assert (Nkind (Id) in N_Entity);
1361 end Has_Delayed_Freeze;
1363 function Has_Delayed_Rep_Aspects (Id : E) return B is
1365 pragma Assert (Nkind (Id) in N_Entity);
1366 return Flag261 (Id);
1367 end Has_Delayed_Rep_Aspects;
1369 function Has_Discriminants (Id : E) return B is
1371 pragma Assert (Nkind (Id) in N_Entity);
1373 end Has_Discriminants;
1375 function Has_Dispatch_Table (Id : E) return B is
1377 pragma Assert (Is_Tagged_Type (Id));
1378 return Flag220 (Id);
1379 end Has_Dispatch_Table;
1381 function Has_Dynamic_Predicate_Aspect (Id : E) return B is
1383 pragma Assert (Is_Type (Id));
1384 return Flag258 (Id);
1385 end Has_Dynamic_Predicate_Aspect;
1387 function Has_Enumeration_Rep_Clause (Id : E) return B is
1389 pragma Assert (Is_Enumeration_Type (Id));
1391 end Has_Enumeration_Rep_Clause;
1393 function Has_Exit (Id : E) return B is
1398 function Has_External_Tag_Rep_Clause (Id : E) return B is
1400 pragma Assert (Is_Tagged_Type (Id));
1401 return Flag110 (Id);
1402 end Has_External_Tag_Rep_Clause;
1404 function Has_Forward_Instantiation (Id : E) return B is
1406 return Flag175 (Id);
1407 end Has_Forward_Instantiation;
1409 function Has_Fully_Qualified_Name (Id : E) return B is
1411 return Flag173 (Id);
1412 end Has_Fully_Qualified_Name;
1414 function Has_Gigi_Rep_Item (Id : E) return B is
1417 end Has_Gigi_Rep_Item;
1419 function Has_Homonym (Id : E) return B is
1424 function Has_Implicit_Dereference (Id : E) return B is
1426 return Flag251 (Id);
1427 end Has_Implicit_Dereference;
1429 function Has_Independent_Components (Id : E) return B is
1431 pragma Assert (Is_Object (Id) or else Is_Type (Id));
1433 end Has_Independent_Components;
1435 function Has_Inheritable_Invariants (Id : E) return B is
1437 pragma Assert (Is_Type (Id));
1438 return Flag248 (Id);
1439 end Has_Inheritable_Invariants;
1441 function Has_Initial_Value (Id : E) return B is
1443 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1444 return Flag219 (Id);
1445 end Has_Initial_Value;
1447 function Has_Invariants (Id : E) return B is
1449 pragma Assert (Is_Type (Id));
1450 return Flag232 (Id);
1453 function Has_Loop_Entry_Attributes (Id : E) return B is
1455 pragma Assert (Ekind (Id) = E_Loop);
1456 return Flag260 (Id);
1457 end Has_Loop_Entry_Attributes;
1459 function Has_Machine_Radix_Clause (Id : E) return B is
1461 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1463 end Has_Machine_Radix_Clause;
1465 function Has_Master_Entity (Id : E) return B is
1468 end Has_Master_Entity;
1470 function Has_Missing_Return (Id : E) return B is
1472 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1473 return Flag142 (Id);
1474 end Has_Missing_Return;
1476 function Has_Nested_Block_With_Handler (Id : E) return B is
1478 return Flag101 (Id);
1479 end Has_Nested_Block_With_Handler;
1481 function Has_Non_Standard_Rep (Id : E) return B is
1483 return Flag75 (Implementation_Base_Type (Id));
1484 end Has_Non_Standard_Rep;
1486 function Has_Object_Size_Clause (Id : E) return B is
1488 pragma Assert (Is_Type (Id));
1489 return Flag172 (Id);
1490 end Has_Object_Size_Clause;
1492 function Has_Per_Object_Constraint (Id : E) return B is
1494 return Flag154 (Id);
1495 end Has_Per_Object_Constraint;
1497 function Has_Postconditions (Id : E) return B is
1499 pragma Assert (Is_Subprogram (Id));
1500 return Flag240 (Id);
1501 end Has_Postconditions;
1503 function Has_Pragma_Controlled (Id : E) return B is
1505 pragma Assert (Is_Access_Type (Id));
1506 return Flag27 (Implementation_Base_Type (Id));
1507 end Has_Pragma_Controlled;
1509 function Has_Pragma_Elaborate_Body (Id : E) return B is
1511 return Flag150 (Id);
1512 end Has_Pragma_Elaborate_Body;
1514 function Has_Pragma_Inline (Id : E) return B is
1516 return Flag157 (Id);
1517 end Has_Pragma_Inline;
1519 function Has_Pragma_Inline_Always (Id : E) return B is
1521 return Flag230 (Id);
1522 end Has_Pragma_Inline_Always;
1524 function Has_Pragma_No_Inline (Id : E) return B is
1526 return Flag201 (Id);
1527 end Has_Pragma_No_Inline;
1529 function Has_Pragma_Ordered (Id : E) return B is
1531 pragma Assert (Is_Enumeration_Type (Id));
1532 return Flag198 (Implementation_Base_Type (Id));
1533 end Has_Pragma_Ordered;
1535 function Has_Pragma_Pack (Id : E) return B is
1537 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1538 return Flag121 (Implementation_Base_Type (Id));
1539 end Has_Pragma_Pack;
1541 function Has_Pragma_Preelab_Init (Id : E) return B is
1543 return Flag221 (Id);
1544 end Has_Pragma_Preelab_Init;
1546 function Has_Pragma_Pure (Id : E) return B is
1548 return Flag203 (Id);
1549 end Has_Pragma_Pure;
1551 function Has_Pragma_Pure_Function (Id : E) return B is
1553 return Flag179 (Id);
1554 end Has_Pragma_Pure_Function;
1556 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1558 return Flag169 (Id);
1559 end Has_Pragma_Thread_Local_Storage;
1561 function Has_Pragma_Unmodified (Id : E) return B is
1563 return Flag233 (Id);
1564 end Has_Pragma_Unmodified;
1566 function Has_Pragma_Unreferenced (Id : E) return B is
1568 return Flag180 (Id);
1569 end Has_Pragma_Unreferenced;
1571 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1573 pragma Assert (Is_Type (Id));
1574 return Flag212 (Id);
1575 end Has_Pragma_Unreferenced_Objects;
1577 function Has_Predicates (Id : E) return B is
1579 pragma Assert (Is_Type (Id));
1580 return Flag250 (Id);
1583 function Has_Primitive_Operations (Id : E) return B is
1585 pragma Assert (Is_Type (Id));
1586 return Flag120 (Base_Type (Id));
1587 end Has_Primitive_Operations;
1589 function Has_Private_Ancestor (Id : E) return B is
1591 return Flag151 (Id);
1592 end Has_Private_Ancestor;
1594 function Has_Private_Declaration (Id : E) return B is
1596 return Flag155 (Id);
1597 end Has_Private_Declaration;
1599 function Has_Qualified_Name (Id : E) return B is
1601 return Flag161 (Id);
1602 end Has_Qualified_Name;
1604 function Has_RACW (Id : E) return B is
1606 pragma Assert (Ekind (Id) = E_Package);
1607 return Flag214 (Id);
1610 function Has_Record_Rep_Clause (Id : E) return B is
1612 pragma Assert (Is_Record_Type (Id));
1613 return Flag65 (Implementation_Base_Type (Id));
1614 end Has_Record_Rep_Clause;
1616 function Has_Recursive_Call (Id : E) return B is
1618 pragma Assert (Is_Subprogram (Id));
1619 return Flag143 (Id);
1620 end Has_Recursive_Call;
1622 function Has_Size_Clause (Id : E) return B is
1625 end Has_Size_Clause;
1627 function Has_Small_Clause (Id : E) return B is
1630 end Has_Small_Clause;
1632 function Has_Specified_Layout (Id : E) return B is
1634 pragma Assert (Is_Type (Id));
1635 return Flag100 (Implementation_Base_Type (Id));
1636 end Has_Specified_Layout;
1638 function Has_Specified_Stream_Input (Id : E) return B is
1640 pragma Assert (Is_Type (Id));
1641 return Flag190 (Id);
1642 end Has_Specified_Stream_Input;
1644 function Has_Specified_Stream_Output (Id : E) return B is
1646 pragma Assert (Is_Type (Id));
1647 return Flag191 (Id);
1648 end Has_Specified_Stream_Output;
1650 function Has_Specified_Stream_Read (Id : E) return B is
1652 pragma Assert (Is_Type (Id));
1653 return Flag192 (Id);
1654 end Has_Specified_Stream_Read;
1656 function Has_Specified_Stream_Write (Id : E) return B is
1658 pragma Assert (Is_Type (Id));
1659 return Flag193 (Id);
1660 end Has_Specified_Stream_Write;
1662 function Has_Static_Discriminants (Id : E) return B is
1664 pragma Assert (Is_Type (Id));
1665 return Flag211 (Id);
1666 end Has_Static_Discriminants;
1668 function Has_Static_Predicate_Aspect (Id : E) return B is
1670 pragma Assert (Is_Type (Id));
1671 return Flag259 (Id);
1672 end Has_Static_Predicate_Aspect;
1674 function Has_Storage_Size_Clause (Id : E) return B is
1676 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1677 return Flag23 (Implementation_Base_Type (Id));
1678 end Has_Storage_Size_Clause;
1680 function Has_Stream_Size_Clause (Id : E) return B is
1682 return Flag184 (Id);
1683 end Has_Stream_Size_Clause;
1685 function Has_Task (Id : E) return B is
1687 return Flag30 (Base_Type (Id));
1690 function Has_Thunks (Id : E) return B is
1692 return Flag228 (Id);
1695 function Has_Unchecked_Union (Id : E) return B is
1697 return Flag123 (Base_Type (Id));
1698 end Has_Unchecked_Union;
1700 function Has_Unknown_Discriminants (Id : E) return B is
1702 pragma Assert (Is_Type (Id));
1704 end Has_Unknown_Discriminants;
1706 function Has_Up_Level_Access (Id : E) return B is
1709 (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
1710 return Flag215 (Id);
1711 end Has_Up_Level_Access;
1713 function Has_Visible_Refinement (Id : E) return B is
1715 pragma Assert (Ekind (Id) = E_Abstract_State);
1716 return Flag263 (Id);
1717 end Has_Visible_Refinement;
1719 function Has_Volatile_Components (Id : E) return B is
1721 return Flag87 (Implementation_Base_Type (Id));
1722 end Has_Volatile_Components;
1724 function Has_Xref_Entry (Id : E) return B is
1726 return Flag182 (Id);
1729 function Hiding_Loop_Variable (Id : E) return E is
1731 pragma Assert (Ekind (Id) = E_Variable);
1733 end Hiding_Loop_Variable;
1735 function Homonym (Id : E) return E is
1740 function Interface_Alias (Id : E) return E is
1742 pragma Assert (Is_Subprogram (Id));
1744 end Interface_Alias;
1746 function Interfaces (Id : E) return L is
1748 pragma Assert (Is_Record_Type (Id));
1749 return Elist25 (Id);
1752 function In_Package_Body (Id : E) return B is
1755 end In_Package_Body;
1757 function In_Private_Part (Id : E) return B is
1760 end In_Private_Part;
1762 function In_Use (Id : E) return B is
1764 pragma Assert (Nkind (Id) in N_Entity);
1768 function Initialization_Statements (Id : E) return N is
1770 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
1772 end Initialization_Statements;
1774 function Inner_Instances (Id : E) return L is
1776 return Elist23 (Id);
1777 end Inner_Instances;
1779 function Interface_Name (Id : E) return N is
1784 function Is_Abstract_Subprogram (Id : E) return B is
1786 pragma Assert (Is_Overloadable (Id));
1788 end Is_Abstract_Subprogram;
1790 function Is_Abstract_Type (Id : E) return B is
1792 pragma Assert (Is_Type (Id));
1793 return Flag146 (Id);
1794 end Is_Abstract_Type;
1796 function Is_Local_Anonymous_Access (Id : E) return B is
1798 pragma Assert (Is_Access_Type (Id));
1799 return Flag194 (Id);
1800 end Is_Local_Anonymous_Access;
1802 function Is_Access_Constant (Id : E) return B is
1804 pragma Assert (Is_Access_Type (Id));
1806 end Is_Access_Constant;
1808 function Is_Ada_2005_Only (Id : E) return B is
1810 return Flag185 (Id);
1811 end Is_Ada_2005_Only;
1813 function Is_Ada_2012_Only (Id : E) return B is
1815 return Flag199 (Id);
1816 end Is_Ada_2012_Only;
1818 function Is_Aliased (Id : E) return B is
1820 pragma Assert (Nkind (Id) in N_Entity);
1824 function Is_AST_Entry (Id : E) return B is
1826 pragma Assert (Is_Entry (Id));
1827 return Flag132 (Id);
1830 function Is_Asynchronous (Id : E) return B is
1832 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1834 end Is_Asynchronous;
1836 function Is_Atomic (Id : E) return B is
1841 function Is_Bit_Packed_Array (Id : E) return B is
1843 return Flag122 (Implementation_Base_Type (Id));
1844 end Is_Bit_Packed_Array;
1846 function Is_Called (Id : E) return B is
1848 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1849 return Flag102 (Id);
1852 function Is_Character_Type (Id : E) return B is
1855 end Is_Character_Type;
1857 function Is_Child_Unit (Id : E) return B is
1862 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1865 end Is_Class_Wide_Equivalent_Type;
1867 function Is_Compilation_Unit (Id : E) return B is
1869 return Flag149 (Id);
1870 end Is_Compilation_Unit;
1872 function Is_Completely_Hidden (Id : E) return B is
1874 pragma Assert (Ekind (Id) = E_Discriminant);
1875 return Flag103 (Id);
1876 end Is_Completely_Hidden;
1878 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1881 end Is_Constr_Subt_For_U_Nominal;
1883 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1885 return Flag141 (Id);
1886 end Is_Constr_Subt_For_UN_Aliased;
1888 function Is_Constrained (Id : E) return B is
1890 pragma Assert (Nkind (Id) in N_Entity);
1894 function Is_Constructor (Id : E) return B is
1899 function Is_Controlled (Id : E) return B is
1901 return Flag42 (Base_Type (Id));
1904 function Is_Controlling_Formal (Id : E) return B is
1906 pragma Assert (Is_Formal (Id));
1908 end Is_Controlling_Formal;
1910 function Is_CPP_Class (Id : E) return B is
1915 function Is_Descendent_Of_Address (Id : E) return B is
1917 pragma Assert (Is_Type (Id));
1918 return Flag223 (Id);
1919 end Is_Descendent_Of_Address;
1921 function Is_Discrim_SO_Function (Id : E) return B is
1923 return Flag176 (Id);
1924 end Is_Discrim_SO_Function;
1926 function Is_Dispatch_Table_Entity (Id : E) return B is
1928 return Flag234 (Id);
1929 end Is_Dispatch_Table_Entity;
1931 function Is_Dispatching_Operation (Id : E) return B is
1933 pragma Assert (Nkind (Id) in N_Entity);
1935 end Is_Dispatching_Operation;
1937 function Is_Eliminated (Id : E) return B is
1939 return Flag124 (Id);
1942 function Is_Entry_Formal (Id : E) return B is
1945 end Is_Entry_Formal;
1947 function Is_Exported (Id : E) return B is
1952 function Is_First_Subtype (Id : E) return B is
1955 end Is_First_Subtype;
1957 function Is_For_Access_Subtype (Id : E) return B is
1959 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
1960 return Flag118 (Id);
1961 end Is_For_Access_Subtype;
1963 function Is_Formal_Subprogram (Id : E) return B is
1965 return Flag111 (Id);
1966 end Is_Formal_Subprogram;
1968 function Is_Frozen (Id : E) return B is
1973 function Is_Generic_Actual_Type (Id : E) return B is
1975 pragma Assert (Is_Type (Id));
1977 end Is_Generic_Actual_Type;
1979 function Is_Generic_Instance (Id : E) return B is
1981 return Flag130 (Id);
1982 end Is_Generic_Instance;
1984 function Is_Generic_Type (Id : E) return B is
1986 pragma Assert (Nkind (Id) in N_Entity);
1988 end Is_Generic_Type;
1990 function Is_Hidden (Id : E) return B is
1995 function Is_Hidden_Open_Scope (Id : E) return B is
1997 return Flag171 (Id);
1998 end Is_Hidden_Open_Scope;
2000 function Is_Immediately_Visible (Id : E) return B is
2002 pragma Assert (Nkind (Id) in N_Entity);
2004 end Is_Immediately_Visible;
2006 function Is_Implementation_Defined (Id : E) return B is
2008 return Flag254 (Id);
2009 end Is_Implementation_Defined;
2011 function Is_Imported (Id : E) return B is
2016 function Is_Inlined (Id : E) return B is
2021 function Is_Interface (Id : E) return B is
2023 return Flag186 (Id);
2026 function Is_Instantiated (Id : E) return B is
2028 return Flag126 (Id);
2029 end Is_Instantiated;
2031 function Is_Internal (Id : E) return B is
2033 pragma Assert (Nkind (Id) in N_Entity);
2037 function Is_Interrupt_Handler (Id : E) return B is
2039 pragma Assert (Nkind (Id) in N_Entity);
2041 end Is_Interrupt_Handler;
2043 function Is_Intrinsic_Subprogram (Id : E) return B is
2046 end Is_Intrinsic_Subprogram;
2048 function Is_Invariant_Procedure (Id : E) return B is
2050 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2051 return Flag257 (Id);
2052 end Is_Invariant_Procedure;
2054 function Is_Itype (Id : E) return B is
2059 function Is_Known_Non_Null (Id : E) return B is
2062 end Is_Known_Non_Null;
2064 function Is_Known_Null (Id : E) return B is
2066 return Flag204 (Id);
2069 function Is_Known_Valid (Id : E) return B is
2071 return Flag170 (Id);
2074 function Is_Limited_Composite (Id : E) return B is
2076 return Flag106 (Id);
2077 end Is_Limited_Composite;
2079 function Is_Limited_Interface (Id : E) return B is
2081 return Flag197 (Id);
2082 end Is_Limited_Interface;
2084 function Is_Limited_Record (Id : E) return B is
2087 end Is_Limited_Record;
2089 function Is_Machine_Code_Subprogram (Id : E) return B is
2091 pragma Assert (Is_Subprogram (Id));
2092 return Flag137 (Id);
2093 end Is_Machine_Code_Subprogram;
2095 function Is_Non_Static_Subtype (Id : E) return B is
2097 pragma Assert (Is_Type (Id));
2098 return Flag109 (Id);
2099 end Is_Non_Static_Subtype;
2101 function Is_Null_Init_Proc (Id : E) return B is
2103 pragma Assert (Ekind (Id) = E_Procedure);
2104 return Flag178 (Id);
2105 end Is_Null_Init_Proc;
2107 function Is_Obsolescent (Id : E) return B is
2109 return Flag153 (Id);
2112 function Is_Only_Out_Parameter (Id : E) return B is
2114 pragma Assert (Is_Formal (Id));
2115 return Flag226 (Id);
2116 end Is_Only_Out_Parameter;
2118 function Is_Optional_Parameter (Id : E) return B is
2120 pragma Assert (Is_Formal (Id));
2121 return Flag134 (Id);
2122 end Is_Optional_Parameter;
2124 function Is_Package_Body_Entity (Id : E) return B is
2126 return Flag160 (Id);
2127 end Is_Package_Body_Entity;
2129 function Is_Packed (Id : E) return B is
2131 return Flag51 (Implementation_Base_Type (Id));
2134 function Is_Packed_Array_Type (Id : E) return B is
2136 return Flag138 (Id);
2137 end Is_Packed_Array_Type;
2139 function Is_Potentially_Use_Visible (Id : E) return B is
2141 pragma Assert (Nkind (Id) in N_Entity);
2143 end Is_Potentially_Use_Visible;
2145 function Is_Predicate_Function (Id : E) return B is
2147 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2148 return Flag255 (Id);
2149 end Is_Predicate_Function;
2151 function Is_Predicate_Function_M (Id : E) return B is
2153 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2154 return Flag256 (Id);
2155 end Is_Predicate_Function_M;
2157 function Is_Preelaborated (Id : E) return B is
2160 end Is_Preelaborated;
2162 function Is_Primitive (Id : E) return B is
2165 (Is_Overloadable (Id)
2166 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
2167 return Flag218 (Id);
2170 function Is_Primitive_Wrapper (Id : E) return B is
2172 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2173 return Flag195 (Id);
2174 end Is_Primitive_Wrapper;
2176 function Is_Private_Composite (Id : E) return B is
2178 pragma Assert (Is_Type (Id));
2179 return Flag107 (Id);
2180 end Is_Private_Composite;
2182 function Is_Private_Descendant (Id : E) return B is
2185 end Is_Private_Descendant;
2187 function Is_Private_Primitive (Id : E) return B is
2189 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2190 return Flag245 (Id);
2191 end Is_Private_Primitive;
2193 function Is_Processed_Transient (Id : E) return B is
2195 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2196 return Flag252 (Id);
2197 end Is_Processed_Transient;
2199 function Is_Public (Id : E) return B is
2201 pragma Assert (Nkind (Id) in N_Entity);
2205 function Is_Pure (Id : E) return B is
2210 function Is_Pure_Unit_Access_Type (Id : E) return B is
2212 pragma Assert (Is_Access_Type (Id));
2213 return Flag189 (Id);
2214 end Is_Pure_Unit_Access_Type;
2216 function Is_RACW_Stub_Type (Id : E) return B is
2218 pragma Assert (Is_Type (Id));
2219 return Flag244 (Id);
2220 end Is_RACW_Stub_Type;
2222 function Is_Raised (Id : E) return B is
2224 pragma Assert (Ekind (Id) = E_Exception);
2225 return Flag224 (Id);
2228 function Is_Remote_Call_Interface (Id : E) return B is
2231 end Is_Remote_Call_Interface;
2233 function Is_Remote_Types (Id : E) return B is
2236 end Is_Remote_Types;
2238 function Is_Renaming_Of_Object (Id : E) return B is
2240 return Flag112 (Id);
2241 end Is_Renaming_Of_Object;
2243 function Is_Return_Object (Id : E) return B is
2245 return Flag209 (Id);
2246 end Is_Return_Object;
2248 function Is_Safe_To_Reevaluate (Id : E) return B is
2250 return Flag249 (Id);
2251 end Is_Safe_To_Reevaluate;
2253 function Is_Shared_Passive (Id : E) return B is
2256 end Is_Shared_Passive;
2258 function Is_Statically_Allocated (Id : E) return B is
2261 end Is_Statically_Allocated;
2263 function Is_Tag (Id : E) return B is
2265 pragma Assert (Nkind (Id) in N_Entity);
2269 function Is_Tagged_Type (Id : E) return B is
2274 function Is_Thunk (Id : E) return B is
2276 return Flag225 (Id);
2279 function Is_Trivial_Subprogram (Id : E) return B is
2281 return Flag235 (Id);
2282 end Is_Trivial_Subprogram;
2284 function Is_True_Constant (Id : E) return B is
2286 return Flag163 (Id);
2287 end Is_True_Constant;
2289 function Is_Unchecked_Union (Id : E) return B is
2291 return Flag117 (Implementation_Base_Type (Id));
2292 end Is_Unchecked_Union;
2294 function Is_Underlying_Record_View (Id : E) return B is
2296 return Flag246 (Id);
2297 end Is_Underlying_Record_View;
2299 function Is_Unsigned_Type (Id : E) return B is
2301 pragma Assert (Is_Type (Id));
2302 return Flag144 (Id);
2303 end Is_Unsigned_Type;
2305 function Is_Valued_Procedure (Id : E) return B is
2307 pragma Assert (Ekind (Id) = E_Procedure);
2308 return Flag127 (Id);
2309 end Is_Valued_Procedure;
2311 function Is_Visible_Formal (Id : E) return B is
2313 return Flag206 (Id);
2314 end Is_Visible_Formal;
2316 function Is_Visible_Lib_Unit (Id : E) return B is
2318 return Flag116 (Id);
2319 end Is_Visible_Lib_Unit;
2321 function Is_VMS_Exception (Id : E) return B is
2323 return Flag133 (Id);
2324 end Is_VMS_Exception;
2326 function Is_Volatile (Id : E) return B is
2328 pragma Assert (Nkind (Id) in N_Entity);
2330 if Is_Type (Id) then
2331 return Flag16 (Base_Type (Id));
2337 function Itype_Printed (Id : E) return B is
2339 pragma Assert (Is_Itype (Id));
2340 return Flag202 (Id);
2343 function Kill_Elaboration_Checks (Id : E) return B is
2346 end Kill_Elaboration_Checks;
2348 function Kill_Range_Checks (Id : E) return B is
2351 end Kill_Range_Checks;
2353 function Known_To_Have_Preelab_Init (Id : E) return B is
2355 pragma Assert (Is_Type (Id));
2356 return Flag207 (Id);
2357 end Known_To_Have_Preelab_Init;
2359 function Last_Assignment (Id : E) return N is
2361 pragma Assert (Is_Assignable (Id));
2363 end Last_Assignment;
2365 function Last_Entity (Id : E) return E is
2370 function Limited_View (Id : E) return E is
2372 pragma Assert (Ekind (Id) = E_Package);
2376 function Lit_Indexes (Id : E) return E is
2378 pragma Assert (Is_Enumeration_Type (Id));
2382 function Lit_Strings (Id : E) return E is
2384 pragma Assert (Is_Enumeration_Type (Id));
2388 function Low_Bound_Tested (Id : E) return B is
2390 return Flag205 (Id);
2391 end Low_Bound_Tested;
2393 function Machine_Radix_10 (Id : E) return B is
2395 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2397 end Machine_Radix_10;
2399 function Master_Id (Id : E) return E is
2401 pragma Assert (Is_Access_Type (Id));
2405 function Materialize_Entity (Id : E) return B is
2407 return Flag168 (Id);
2408 end Materialize_Entity;
2410 function May_Inherit_Delayed_Rep_Aspects (Id : E) return B is
2412 return Flag262 (Id);
2413 end May_Inherit_Delayed_Rep_Aspects;
2415 function Mechanism (Id : E) return M is
2417 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2418 return UI_To_Int (Uint8 (Id));
2421 function Modulus (Id : E) return Uint is
2423 pragma Assert (Is_Modular_Integer_Type (Id));
2424 return Uint17 (Base_Type (Id));
2427 function Must_Be_On_Byte_Boundary (Id : E) return B is
2429 pragma Assert (Is_Type (Id));
2430 return Flag183 (Id);
2431 end Must_Be_On_Byte_Boundary;
2433 function Must_Have_Preelab_Init (Id : E) return B is
2435 pragma Assert (Is_Type (Id));
2436 return Flag208 (Id);
2437 end Must_Have_Preelab_Init;
2439 function Needs_Debug_Info (Id : E) return B is
2441 return Flag147 (Id);
2442 end Needs_Debug_Info;
2444 function Needs_No_Actuals (Id : E) return B is
2447 (Is_Overloadable (Id)
2448 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2450 end Needs_No_Actuals;
2452 function Never_Set_In_Source (Id : E) return B is
2454 return Flag115 (Id);
2455 end Never_Set_In_Source;
2457 function Next_Inlined_Subprogram (Id : E) return E is
2460 end Next_Inlined_Subprogram;
2462 function No_Pool_Assigned (Id : E) return B is
2464 pragma Assert (Is_Access_Type (Id));
2465 return Flag131 (Root_Type (Id));
2466 end No_Pool_Assigned;
2468 function No_Return (Id : E) return B is
2470 return Flag113 (Id);
2473 function No_Strict_Aliasing (Id : E) return B is
2475 pragma Assert (Is_Access_Type (Id));
2476 return Flag136 (Base_Type (Id));
2477 end No_Strict_Aliasing;
2479 function Non_Binary_Modulus (Id : E) return B is
2481 pragma Assert (Is_Type (Id));
2482 return Flag58 (Base_Type (Id));
2483 end Non_Binary_Modulus;
2485 function Non_Limited_View (Id : E) return E is
2487 pragma Assert (Ekind (Id) in Incomplete_Kind);
2489 end Non_Limited_View;
2491 function Nonzero_Is_True (Id : E) return B is
2493 pragma Assert (Root_Type (Id) = Standard_Boolean);
2494 return Flag162 (Base_Type (Id));
2495 end Nonzero_Is_True;
2497 function Normalized_First_Bit (Id : E) return U is
2499 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2501 end Normalized_First_Bit;
2503 function Normalized_Position (Id : E) return U is
2505 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2507 end Normalized_Position;
2509 function Normalized_Position_Max (Id : E) return U is
2511 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2513 end Normalized_Position_Max;
2515 function OK_To_Rename (Id : E) return B is
2517 pragma Assert (Ekind (Id) = E_Variable);
2518 return Flag247 (Id);
2521 function OK_To_Reorder_Components (Id : E) return B is
2523 pragma Assert (Is_Record_Type (Id));
2524 return Flag239 (Base_Type (Id));
2525 end OK_To_Reorder_Components;
2527 function Optimize_Alignment_Space (Id : E) return B is
2530 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2531 return Flag241 (Id);
2532 end Optimize_Alignment_Space;
2534 function Optimize_Alignment_Time (Id : E) return B is
2537 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2538 return Flag242 (Id);
2539 end Optimize_Alignment_Time;
2541 function Original_Access_Type (Id : E) return E is
2543 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2545 end Original_Access_Type;
2547 function Original_Array_Type (Id : E) return E is
2549 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2551 end Original_Array_Type;
2553 function Original_Record_Component (Id : E) return E is
2555 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2557 end Original_Record_Component;
2559 function Overlays_Constant (Id : E) return B is
2561 return Flag243 (Id);
2562 end Overlays_Constant;
2564 function Overridden_Operation (Id : E) return E is
2567 end Overridden_Operation;
2569 function Package_Instantiation (Id : E) return N is
2571 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2573 end Package_Instantiation;
2575 function Packed_Array_Type (Id : E) return E is
2577 pragma Assert (Is_Array_Type (Id));
2579 end Packed_Array_Type;
2581 function Parent_Subtype (Id : E) return E is
2583 pragma Assert (Is_Record_Type (Id));
2584 return Node19 (Base_Type (Id));
2587 function Postcondition_Proc (Id : E) return E is
2589 pragma Assert (Ekind (Id) = E_Procedure);
2591 end Postcondition_Proc;
2593 function PPC_Wrapper (Id : E) return E is
2595 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2599 function Prival (Id : E) return E is
2601 pragma Assert (Is_Protected_Component (Id));
2605 function Prival_Link (Id : E) return E is
2607 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2611 function Private_Dependents (Id : E) return L is
2613 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2614 return Elist18 (Id);
2615 end Private_Dependents;
2617 function Private_View (Id : E) return N is
2619 pragma Assert (Is_Private_Type (Id));
2623 function Protected_Body_Subprogram (Id : E) return E is
2625 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2627 end Protected_Body_Subprogram;
2629 function Protected_Formal (Id : E) return E is
2631 pragma Assert (Is_Formal (Id));
2633 end Protected_Formal;
2635 function Protection_Object (Id : E) return E is
2638 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2640 end Protection_Object;
2642 function Reachable (Id : E) return B is
2647 function Referenced (Id : E) return B is
2649 return Flag156 (Id);
2652 function Referenced_As_LHS (Id : E) return B is
2655 end Referenced_As_LHS;
2657 function Referenced_As_Out_Parameter (Id : E) return B is
2659 return Flag227 (Id);
2660 end Referenced_As_Out_Parameter;
2662 function Refined_State (Id : E) return N is
2664 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
2668 function Refinement_Constituents (Id : E) return L is
2670 pragma Assert (Ekind (Id) = E_Abstract_State);
2672 end Refinement_Constituents;
2674 function Register_Exception_Call (Id : E) return N is
2676 pragma Assert (Ekind (Id) = E_Exception);
2678 end Register_Exception_Call;
2680 function Related_Array_Object (Id : E) return E is
2682 pragma Assert (Is_Array_Type (Id));
2684 end Related_Array_Object;
2686 function Related_Expression (Id : E) return N is
2688 pragma Assert (Ekind (Id) in Type_Kind
2689 or else Ekind_In (Id, E_Constant, E_Variable));
2691 end Related_Expression;
2693 function Related_Instance (Id : E) return E is
2695 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2697 end Related_Instance;
2699 function Related_Type (Id : E) return E is
2701 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2705 function Relative_Deadline_Variable (Id : E) return E is
2707 pragma Assert (Is_Task_Type (Id));
2708 return Node26 (Implementation_Base_Type (Id));
2709 end Relative_Deadline_Variable;
2711 function Renamed_Entity (Id : E) return N is
2716 function Renamed_In_Spec (Id : E) return B is
2718 pragma Assert (Ekind (Id) = E_Package);
2719 return Flag231 (Id);
2720 end Renamed_In_Spec;
2722 function Renamed_Object (Id : E) return N is
2727 function Renaming_Map (Id : E) return U is
2732 function Requires_Overriding (Id : E) return B is
2734 pragma Assert (Is_Overloadable (Id));
2735 return Flag213 (Id);
2736 end Requires_Overriding;
2738 function Return_Present (Id : E) return B is
2743 function Return_Applies_To (Id : E) return N is
2746 end Return_Applies_To;
2748 function Returns_By_Ref (Id : E) return B is
2753 function Reverse_Bit_Order (Id : E) return B is
2755 pragma Assert (Is_Record_Type (Id));
2756 return Flag164 (Base_Type (Id));
2757 end Reverse_Bit_Order;
2759 function Reverse_Storage_Order (Id : E) return B is
2761 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
2762 return Flag93 (Base_Type (Id));
2763 end Reverse_Storage_Order;
2765 function RM_Size (Id : E) return U is
2767 pragma Assert (Is_Type (Id));
2771 function Scalar_Range (Id : E) return N is
2776 function Scale_Value (Id : E) return U is
2781 function Scope_Depth_Value (Id : E) return U is
2784 end Scope_Depth_Value;
2786 function Sec_Stack_Needed_For_Return (Id : E) return B is
2788 return Flag167 (Id);
2789 end Sec_Stack_Needed_For_Return;
2791 function Shadow_Entities (Id : E) return S is
2793 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2795 end Shadow_Entities;
2797 function Shared_Var_Procs_Instance (Id : E) return E is
2799 pragma Assert (Ekind (Id) = E_Variable);
2801 end Shared_Var_Procs_Instance;
2803 function Size_Check_Code (Id : E) return N is
2805 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2807 end Size_Check_Code;
2809 function Size_Depends_On_Discriminant (Id : E) return B is
2811 return Flag177 (Id);
2812 end Size_Depends_On_Discriminant;
2814 function Size_Known_At_Compile_Time (Id : E) return B is
2817 end Size_Known_At_Compile_Time;
2819 function Small_Value (Id : E) return R is
2821 pragma Assert (Is_Fixed_Point_Type (Id));
2822 return Ureal21 (Id);
2825 function SPARK_Mode_Pragmas (Id : E) return N is
2828 (Ekind_In (Id, E_Function, -- subprogram variants
2830 E_Generic_Procedure,
2834 Ekind_In (Id, E_Generic_Package, -- package variants
2838 end SPARK_Mode_Pragmas;
2840 function Spec_Entity (Id : E) return E is
2842 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2846 function Static_Predicate (Id : E) return S is
2848 pragma Assert (Is_Discrete_Type (Id));
2850 end Static_Predicate;
2852 function Status_Flag_Or_Transient_Decl (Id : E) return N is
2854 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2856 end Status_Flag_Or_Transient_Decl;
2858 function Storage_Size_Variable (Id : E) return E is
2860 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2861 return Node15 (Implementation_Base_Type (Id));
2862 end Storage_Size_Variable;
2864 function Static_Elaboration_Desired (Id : E) return B is
2866 pragma Assert (Ekind (Id) = E_Package);
2868 end Static_Elaboration_Desired;
2870 function Static_Initialization (Id : E) return N is
2873 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
2875 end Static_Initialization;
2877 function Stored_Constraint (Id : E) return L is
2880 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
2881 return Elist23 (Id);
2882 end Stored_Constraint;
2884 function Strict_Alignment (Id : E) return B is
2886 return Flag145 (Implementation_Base_Type (Id));
2887 end Strict_Alignment;
2889 function String_Literal_Length (Id : E) return U is
2892 end String_Literal_Length;
2894 function String_Literal_Low_Bound (Id : E) return N is
2897 end String_Literal_Low_Bound;
2899 function Subprograms_For_Type (Id : E) return E is
2901 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
2903 end Subprograms_For_Type;
2905 function Suppress_Elaboration_Warnings (Id : E) return B is
2907 return Flag148 (Id);
2908 end Suppress_Elaboration_Warnings;
2910 function Suppress_Initialization (Id : E) return B is
2912 pragma Assert (Is_Type (Id));
2913 return Flag105 (Id);
2914 end Suppress_Initialization;
2916 function Suppress_Style_Checks (Id : E) return B is
2918 return Flag165 (Id);
2919 end Suppress_Style_Checks;
2921 function Suppress_Value_Tracking_On_Call (Id : E) return B is
2923 return Flag217 (Id);
2924 end Suppress_Value_Tracking_On_Call;
2926 function Task_Body_Procedure (Id : E) return N is
2928 pragma Assert (Ekind (Id) in Task_Kind);
2930 end Task_Body_Procedure;
2932 function Thunk_Entity (Id : E) return E is
2934 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
2935 and then Is_Thunk (Id));
2939 function Treat_As_Volatile (Id : E) return B is
2942 end Treat_As_Volatile;
2944 function Underlying_Full_View (Id : E) return E is
2946 pragma Assert (Ekind (Id) in Private_Kind);
2948 end Underlying_Full_View;
2950 function Underlying_Record_View (Id : E) return E is
2953 end Underlying_Record_View;
2955 function Universal_Aliasing (Id : E) return B is
2957 pragma Assert (Is_Type (Id));
2958 return Flag216 (Implementation_Base_Type (Id));
2959 end Universal_Aliasing;
2961 function Unset_Reference (Id : E) return N is
2964 end Unset_Reference;
2966 function Used_As_Generic_Actual (Id : E) return B is
2968 return Flag222 (Id);
2969 end Used_As_Generic_Actual;
2971 function Uses_Lock_Free (Id : E) return B is
2973 pragma Assert (Is_Protected_Type (Id));
2974 return Flag188 (Id);
2977 function Uses_Sec_Stack (Id : E) return B is
2982 function Warnings_Off (Id : E) return B is
2987 function Warnings_Off_Used (Id : E) return B is
2989 return Flag236 (Id);
2990 end Warnings_Off_Used;
2992 function Warnings_Off_Used_Unmodified (Id : E) return B is
2994 return Flag237 (Id);
2995 end Warnings_Off_Used_Unmodified;
2997 function Warnings_Off_Used_Unreferenced (Id : E) return B is
2999 return Flag238 (Id);
3000 end Warnings_Off_Used_Unreferenced;
3002 function Wrapped_Entity (Id : E) return E is
3004 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3005 and then Is_Primitive_Wrapper (Id));
3009 function Was_Hidden (Id : E) return B is
3011 return Flag196 (Id);
3014 ------------------------------
3015 -- Classification Functions --
3016 ------------------------------
3018 function Is_Access_Type (Id : E) return B is
3020 return Ekind (Id) in Access_Kind;
3023 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
3025 return Ekind (Id) in Access_Protected_Kind;
3026 end Is_Access_Protected_Subprogram_Type;
3028 function Is_Access_Subprogram_Type (Id : E) return B is
3030 return Ekind (Id) in Access_Subprogram_Kind;
3031 end Is_Access_Subprogram_Type;
3033 function Is_Aggregate_Type (Id : E) return B is
3035 return Ekind (Id) in Aggregate_Kind;
3036 end Is_Aggregate_Type;
3038 function Is_Array_Type (Id : E) return B is
3040 return Ekind (Id) in Array_Kind;
3043 function Is_Assignable (Id : E) return B is
3045 return Ekind (Id) in Assignable_Kind;
3048 function Is_Class_Wide_Type (Id : E) return B is
3050 return Ekind (Id) in Class_Wide_Kind;
3051 end Is_Class_Wide_Type;
3053 function Is_Composite_Type (Id : E) return B is
3055 return Ekind (Id) in Composite_Kind;
3056 end Is_Composite_Type;
3058 function Is_Concurrent_Body (Id : E) return B is
3060 return Ekind (Id) in
3061 Concurrent_Body_Kind;
3062 end Is_Concurrent_Body;
3064 function Is_Concurrent_Record_Type (Id : E) return B is
3067 end Is_Concurrent_Record_Type;
3069 function Is_Concurrent_Type (Id : E) return B is
3071 return Ekind (Id) in Concurrent_Kind;
3072 end Is_Concurrent_Type;
3074 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
3076 return Ekind (Id) in
3077 Decimal_Fixed_Point_Kind;
3078 end Is_Decimal_Fixed_Point_Type;
3080 function Is_Digits_Type (Id : E) return B is
3082 return Ekind (Id) in Digits_Kind;
3085 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
3087 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
3088 end Is_Discrete_Or_Fixed_Point_Type;
3090 function Is_Discrete_Type (Id : E) return B is
3092 return Ekind (Id) in Discrete_Kind;
3093 end Is_Discrete_Type;
3095 function Is_Elementary_Type (Id : E) return B is
3097 return Ekind (Id) in Elementary_Kind;
3098 end Is_Elementary_Type;
3100 function Is_Entry (Id : E) return B is
3102 return Ekind (Id) in Entry_Kind;
3105 function Is_Enumeration_Type (Id : E) return B is
3107 return Ekind (Id) in
3109 end Is_Enumeration_Type;
3111 function Is_Fixed_Point_Type (Id : E) return B is
3113 return Ekind (Id) in
3115 end Is_Fixed_Point_Type;
3117 function Is_Floating_Point_Type (Id : E) return B is
3119 return Ekind (Id) in Float_Kind;
3120 end Is_Floating_Point_Type;
3122 function Is_Formal (Id : E) return B is
3124 return Ekind (Id) in Formal_Kind;
3127 function Is_Formal_Object (Id : E) return B is
3129 return Ekind (Id) in Formal_Object_Kind;
3130 end Is_Formal_Object;
3132 function Is_Generic_Subprogram (Id : E) return B is
3134 return Ekind (Id) in Generic_Subprogram_Kind;
3135 end Is_Generic_Subprogram;
3137 function Is_Generic_Unit (Id : E) return B is
3139 return Ekind (Id) in Generic_Unit_Kind;
3140 end Is_Generic_Unit;
3142 function Is_Incomplete_Or_Private_Type (Id : E) return B is
3144 return Ekind (Id) in
3145 Incomplete_Or_Private_Kind;
3146 end Is_Incomplete_Or_Private_Type;
3148 function Is_Incomplete_Type (Id : E) return B is
3150 return Ekind (Id) in
3152 end Is_Incomplete_Type;
3154 function Is_Integer_Type (Id : E) return B is
3156 return Ekind (Id) in Integer_Kind;
3157 end Is_Integer_Type;
3159 function Is_Modular_Integer_Type (Id : E) return B is
3161 return Ekind (Id) in
3162 Modular_Integer_Kind;
3163 end Is_Modular_Integer_Type;
3165 function Is_Named_Number (Id : E) return B is
3167 return Ekind (Id) in Named_Kind;
3168 end Is_Named_Number;
3170 function Is_Numeric_Type (Id : E) return B is
3172 return Ekind (Id) in Numeric_Kind;
3173 end Is_Numeric_Type;
3175 function Is_Object (Id : E) return B is
3177 return Ekind (Id) in Object_Kind;
3180 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
3182 return Ekind (Id) in
3183 Ordinary_Fixed_Point_Kind;
3184 end Is_Ordinary_Fixed_Point_Type;
3186 function Is_Overloadable (Id : E) return B is
3188 return Ekind (Id) in Overloadable_Kind;
3189 end Is_Overloadable;
3191 function Is_Private_Type (Id : E) return B is
3193 return Ekind (Id) in Private_Kind;
3194 end Is_Private_Type;
3196 function Is_Protected_Type (Id : E) return B is
3198 return Ekind (Id) in Protected_Kind;
3199 end Is_Protected_Type;
3201 function Is_Real_Type (Id : E) return B is
3203 return Ekind (Id) in Real_Kind;
3206 function Is_Record_Type (Id : E) return B is
3208 return Ekind (Id) in Record_Kind;
3211 function Is_Scalar_Type (Id : E) return B is
3213 return Ekind (Id) in Scalar_Kind;
3216 function Is_Signed_Integer_Type (Id : E) return B is
3218 return Ekind (Id) in Signed_Integer_Kind;
3219 end Is_Signed_Integer_Type;
3221 function Is_Subprogram (Id : E) return B is
3223 return Ekind (Id) in Subprogram_Kind;
3226 function Is_Task_Type (Id : E) return B is
3228 return Ekind (Id) in Task_Kind;
3231 function Is_Type (Id : E) return B is
3233 return Ekind (Id) in Type_Kind;
3236 ------------------------------
3237 -- Attribute Set Procedures --
3238 ------------------------------
3240 -- Note: in many of these set procedures an "obvious" assertion is missing.
3241 -- The reason for this is that in many cases, a field is set before the
3242 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3243 -- it is possible to add assertions that specifically include the E_Void
3244 -- possibility, but in some cases, we just omit the assertions.
3246 procedure Set_Abstract_States (Id : E; V : L) is
3248 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
3249 Set_Elist25 (Id, V);
3250 end Set_Abstract_States;
3252 procedure Set_Accept_Address (Id : E; V : L) is
3254 Set_Elist21 (Id, V);
3255 end Set_Accept_Address;
3257 procedure Set_Access_Disp_Table (Id : E; V : L) is
3259 pragma Assert (Ekind (Id) = E_Record_Type
3260 and then Id = Implementation_Base_Type (Id));
3261 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3262 Set_Elist16 (Id, V);
3263 end Set_Access_Disp_Table;
3265 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3268 end Set_Associated_Formal_Package;
3270 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3273 end Set_Associated_Node_For_Itype;
3275 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3277 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3279 end Set_Associated_Storage_Pool;
3281 procedure Set_Actual_Subtype (Id : E; V : E) is
3284 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3285 or else Is_Formal (Id));
3287 end Set_Actual_Subtype;
3289 procedure Set_Address_Taken (Id : E; V : B := True) is
3291 Set_Flag104 (Id, V);
3292 end Set_Address_Taken;
3294 procedure Set_Alias (Id : E; V : E) is
3297 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3301 procedure Set_Alignment (Id : E; V : U) is
3303 pragma Assert (Is_Type (Id)
3304 or else Is_Formal (Id)
3305 or else Ekind_In (Id, E_Loop_Parameter,
3312 procedure Set_Barrier_Function (Id : E; V : N) is
3314 pragma Assert (Is_Entry (Id));
3316 end Set_Barrier_Function;
3318 procedure Set_Block_Node (Id : E; V : N) is
3320 pragma Assert (Ekind (Id) = E_Block);
3324 procedure Set_Body_Entity (Id : E; V : E) is
3326 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3328 end Set_Body_Entity;
3330 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3333 (Ekind (Id) = E_Package
3334 or else Is_Subprogram (Id)
3335 or else Is_Generic_Unit (Id));
3337 end Set_Body_Needed_For_SAL;
3339 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3341 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3342 Set_Flag125 (Id, V);
3343 end Set_C_Pass_By_Copy;
3345 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3348 end Set_Can_Never_Be_Null;
3350 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3353 end Set_Checks_May_Be_Suppressed;
3355 procedure Set_Class_Wide_Type (Id : E; V : E) is
3357 pragma Assert (Is_Type (Id));
3359 end Set_Class_Wide_Type;
3361 procedure Set_Cloned_Subtype (Id : E; V : E) is
3363 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3365 end Set_Cloned_Subtype;
3367 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3369 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3371 end Set_Component_Bit_Offset;
3373 procedure Set_Component_Clause (Id : E; V : N) is
3375 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3377 end Set_Component_Clause;
3379 procedure Set_Component_Size (Id : E; V : U) is
3381 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3383 end Set_Component_Size;
3385 procedure Set_Component_Type (Id : E; V : E) is
3387 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3389 end Set_Component_Type;
3391 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3394 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3396 end Set_Corresponding_Concurrent_Type;
3398 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3400 pragma Assert (Ekind (Id) = E_Discriminant);
3402 end Set_Corresponding_Discriminant;
3404 procedure Set_Corresponding_Equality (Id : E; V : E) is
3407 (Ekind (Id) = E_Function
3408 and then not Comes_From_Source (Id)
3409 and then Chars (Id) = Name_Op_Ne);
3411 end Set_Corresponding_Equality;
3413 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3415 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3417 end Set_Corresponding_Protected_Entry;
3419 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3421 pragma Assert (Is_Concurrent_Type (Id));
3423 end Set_Corresponding_Record_Type;
3425 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3428 end Set_Corresponding_Remote_Type;
3430 procedure Set_Current_Use_Clause (Id : E; V : E) is
3432 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3434 end Set_Current_Use_Clause;
3436 procedure Set_Current_Value (Id : E; V : N) is
3438 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3440 end Set_Current_Value;
3442 procedure Set_CR_Discriminant (Id : E; V : E) is
3445 end Set_CR_Discriminant;
3447 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3449 Set_Flag166 (Id, V);
3450 end Set_Debug_Info_Off;
3452 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3455 end Set_Debug_Renaming_Link;
3457 procedure Set_Default_Aspect_Component_Value (Id : E; V : E) is
3459 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3461 end Set_Default_Aspect_Component_Value;
3463 procedure Set_Default_Aspect_Value (Id : E; V : E) is
3465 pragma Assert (Is_Scalar_Type (Id) and then Is_Base_Type (Id));
3467 end Set_Default_Aspect_Value;
3469 procedure Set_Default_Expr_Function (Id : E; V : E) is
3471 pragma Assert (Is_Formal (Id));
3473 end Set_Default_Expr_Function;
3475 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3477 Set_Flag108 (Id, V);
3478 end Set_Default_Expressions_Processed;
3480 procedure Set_Default_Value (Id : E; V : N) is
3482 pragma Assert (Is_Formal (Id));
3484 end Set_Default_Value;
3486 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3490 or else Is_Task_Type (Id)
3491 or else Ekind (Id) = E_Block);
3492 Set_Flag114 (Id, V);
3493 end Set_Delay_Cleanups;
3495 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3498 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3501 end Set_Delay_Subprogram_Descriptors;
3503 procedure Set_Delta_Value (Id : E; V : R) is
3505 pragma Assert (Is_Fixed_Point_Type (Id));
3506 Set_Ureal18 (Id, V);
3507 end Set_Delta_Value;
3509 procedure Set_Dependent_Instances (Id : E; V : L) is
3511 pragma Assert (Is_Generic_Instance (Id));
3513 end Set_Dependent_Instances;
3515 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3517 pragma Assert (Nkind (Id) in N_Entity);
3519 end Set_Depends_On_Private;
3521 procedure Set_Digits_Value (Id : E; V : U) is
3524 (Is_Floating_Point_Type (Id)
3525 or else Is_Decimal_Fixed_Point_Type (Id));
3527 end Set_Digits_Value;
3529 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3532 end Set_Directly_Designated_Type;
3534 procedure Set_Discard_Names (Id : E; V : B := True) is
3537 end Set_Discard_Names;
3539 procedure Set_Discriminal (Id : E; V : E) is
3541 pragma Assert (Ekind (Id) = E_Discriminant);
3543 end Set_Discriminal;
3545 procedure Set_Discriminal_Link (Id : E; V : E) is
3548 end Set_Discriminal_Link;
3550 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3552 pragma Assert (Ekind (Id) = E_Component);
3554 end Set_Discriminant_Checking_Func;
3556 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3558 pragma Assert (Nkind (Id) in N_Entity);
3559 Set_Elist21 (Id, V);
3560 end Set_Discriminant_Constraint;
3562 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3565 end Set_Discriminant_Default_Value;
3567 procedure Set_Discriminant_Number (Id : E; V : U) is
3570 end Set_Discriminant_Number;
3572 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3574 pragma Assert (Ekind (Id) = E_Record_Type
3575 and then Id = Implementation_Base_Type (Id));
3576 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3577 Set_Elist26 (Id, V);
3578 end Set_Dispatch_Table_Wrappers;
3580 procedure Set_DT_Entry_Count (Id : E; V : U) is
3582 pragma Assert (Ekind (Id) = E_Component);
3584 end Set_DT_Entry_Count;
3586 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3588 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3590 end Set_DT_Offset_To_Top_Func;
3592 procedure Set_DT_Position (Id : E; V : U) is
3594 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3596 end Set_DT_Position;
3598 procedure Set_DTC_Entity (Id : E; V : E) is
3600 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3604 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3606 pragma Assert (Ekind (Id) = E_Package);
3607 Set_Flag210 (Id, V);
3608 end Set_Elaborate_Body_Desirable;
3610 procedure Set_Elaboration_Entity (Id : E; V : E) is
3615 Ekind (Id) = E_Package
3617 Is_Generic_Unit (Id));
3619 end Set_Elaboration_Entity;
3621 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3626 Ekind (Id) = E_Package
3628 Is_Generic_Unit (Id));
3629 Set_Flag174 (Id, V);
3630 end Set_Elaboration_Entity_Required;
3632 procedure Set_Enclosing_Scope (Id : E; V : E) is
3635 end Set_Enclosing_Scope;
3637 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3639 pragma Assert (Is_Entry (Id));
3640 Set_Flag152 (Id, V);
3641 end Set_Entry_Accepted;
3643 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3646 end Set_Entry_Bodies_Array;
3648 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3651 end Set_Entry_Cancel_Parameter;
3653 procedure Set_Entry_Component (Id : E; V : E) is
3656 end Set_Entry_Component;
3658 procedure Set_Entry_Formal (Id : E; V : E) is
3661 end Set_Entry_Formal;
3663 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3665 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3667 end Set_Entry_Index_Constant;
3669 procedure Set_Contract (Id : E; V : N) is
3672 (Ekind_In (Id, E_Entry,
3679 or else Is_Generic_Subprogram (Id)
3680 or else Is_Subprogram (Id));
3684 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3687 end Set_Entry_Parameters_Type;
3689 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3691 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3693 end Set_Enum_Pos_To_Rep;
3695 procedure Set_Enumeration_Pos (Id : E; V : U) is
3697 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3699 end Set_Enumeration_Pos;
3701 procedure Set_Enumeration_Rep (Id : E; V : U) is
3703 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3705 end Set_Enumeration_Rep;
3707 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3709 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3711 end Set_Enumeration_Rep_Expr;
3713 procedure Set_Equivalent_Type (Id : E; V : E) is
3716 (Ekind_In (Id, E_Class_Wide_Type,
3717 E_Class_Wide_Subtype,
3718 E_Access_Protected_Subprogram_Type,
3719 E_Anonymous_Access_Protected_Subprogram_Type,
3720 E_Access_Subprogram_Type,
3723 end Set_Equivalent_Type;
3725 procedure Set_Esize (Id : E; V : U) is
3730 procedure Set_Exception_Code (Id : E; V : U) is
3732 pragma Assert (Ekind (Id) = E_Exception);
3734 end Set_Exception_Code;
3736 procedure Set_Extra_Accessibility (Id : E; V : E) is
3739 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
3741 end Set_Extra_Accessibility;
3743 procedure Set_Extra_Accessibility_Of_Result (Id : E; V : E) is
3745 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
3747 end Set_Extra_Accessibility_Of_Result;
3749 procedure Set_Extra_Constrained (Id : E; V : E) is
3751 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3753 end Set_Extra_Constrained;
3755 procedure Set_Extra_Formal (Id : E; V : E) is
3758 end Set_Extra_Formal;
3760 procedure Set_Extra_Formals (Id : E; V : E) is
3763 (Is_Overloadable (Id)
3764 or else Ekind_In (Id, E_Entry_Family,
3766 E_Subprogram_Type));
3768 end Set_Extra_Formals;
3770 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3773 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3774 Set_Flag229 (Id, V);
3775 end Set_Can_Use_Internal_Rep;
3777 procedure Set_Finalization_Master (Id : E; V : E) is
3779 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3781 end Set_Finalization_Master;
3783 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3785 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3786 Set_Flag158 (Id, V);
3787 end Set_Finalize_Storage_Only;
3789 procedure Set_Finalizer (Id : E; V : E) is
3791 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
3795 procedure Set_First_Entity (Id : E; V : E) is
3798 end Set_First_Entity;
3800 procedure Set_First_Exit_Statement (Id : E; V : N) is
3802 pragma Assert (Ekind (Id) = E_Loop);
3804 end Set_First_Exit_Statement;
3806 procedure Set_First_Index (Id : E; V : N) is
3808 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3810 end Set_First_Index;
3812 procedure Set_First_Literal (Id : E; V : E) is
3814 pragma Assert (Is_Enumeration_Type (Id));
3816 end Set_First_Literal;
3818 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3820 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3822 end Set_First_Optional_Parameter;
3824 procedure Set_First_Private_Entity (Id : E; V : E) is
3826 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
3827 or else Ekind (Id) in Concurrent_Kind);
3829 end Set_First_Private_Entity;
3831 procedure Set_First_Rep_Item (Id : E; V : N) is
3834 end Set_First_Rep_Item;
3836 procedure Set_Float_Rep (Id : E; V : F) is
3837 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
3839 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
3842 procedure Set_Freeze_Node (Id : E; V : N) is
3845 end Set_Freeze_Node;
3847 procedure Set_From_With_Type (Id : E; V : B := True) is
3851 or else Ekind (Id) = E_Package);
3852 Set_Flag159 (Id, V);
3853 end Set_From_With_Type;
3855 procedure Set_Full_View (Id : E; V : E) is
3857 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
3861 procedure Set_Generic_Homonym (Id : E; V : E) is
3864 end Set_Generic_Homonym;
3866 procedure Set_Generic_Renamings (Id : E; V : L) is
3868 Set_Elist23 (Id, V);
3869 end Set_Generic_Renamings;
3871 procedure Set_Handler_Records (Id : E; V : S) is
3874 end Set_Handler_Records;
3876 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
3878 pragma Assert (Id = Base_Type (Id));
3879 Set_Flag135 (Id, V);
3880 end Set_Has_Aliased_Components;
3882 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
3885 end Set_Has_Alignment_Clause;
3887 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
3890 end Set_Has_All_Calls_Remote;
3892 procedure Set_Has_Anonymous_Master (Id : E; V : B := True) is
3895 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
3896 Set_Flag253 (Id, V);
3897 end Set_Has_Anonymous_Master;
3899 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
3901 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
3903 end Set_Has_Atomic_Components;
3905 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
3908 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
3909 Set_Flag139 (Id, V);
3910 end Set_Has_Biased_Representation;
3912 procedure Set_Has_Completion (Id : E; V : B := True) is
3915 end Set_Has_Completion;
3917 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
3919 pragma Assert (Is_Type (Id));
3921 end Set_Has_Completion_In_Body;
3923 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
3925 pragma Assert (Ekind (Id) = E_Record_Type);
3926 Set_Flag140 (Id, V);
3927 end Set_Has_Complex_Representation;
3929 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
3931 pragma Assert (Ekind (Id) = E_Array_Type);
3933 end Set_Has_Component_Size_Clause;
3935 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
3937 pragma Assert (Is_Type (Id));
3938 Set_Flag187 (Id, V);
3939 end Set_Has_Constrained_Partial_View;
3941 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
3943 Set_Flag181 (Id, V);
3944 end Set_Has_Contiguous_Rep;
3946 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
3948 pragma Assert (Id = Base_Type (Id));
3950 end Set_Has_Controlled_Component;
3952 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
3955 end Set_Has_Controlling_Result;
3957 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
3959 Set_Flag119 (Id, V);
3960 end Set_Has_Convention_Pragma;
3962 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
3965 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
3966 and then Is_Base_Type (Id));
3968 end Set_Has_Default_Aspect;
3970 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
3972 pragma Assert (Nkind (Id) in N_Entity);
3973 Set_Flag200 (Id, V);
3974 end Set_Has_Delayed_Aspects;
3976 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
3978 pragma Assert (Nkind (Id) in N_Entity);
3980 end Set_Has_Delayed_Freeze;
3982 procedure Set_Has_Delayed_Rep_Aspects (Id : E; V : B := True) is
3984 pragma Assert (Nkind (Id) in N_Entity);
3985 Set_Flag261 (Id, V);
3986 end Set_Has_Delayed_Rep_Aspects;
3988 procedure Set_Has_Discriminants (Id : E; V : B := True) is
3990 pragma Assert (Nkind (Id) in N_Entity);
3992 end Set_Has_Discriminants;
3994 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
3996 pragma Assert (Ekind (Id) = E_Record_Type
3997 and then Is_Tagged_Type (Id));
3998 Set_Flag220 (Id, V);
3999 end Set_Has_Dispatch_Table;
4001 procedure Set_Has_Dynamic_Predicate_Aspect (Id : E; V : B := True) is
4003 pragma Assert (Is_Type (Id));
4004 Set_Flag258 (Id, V);
4005 end Set_Has_Dynamic_Predicate_Aspect;
4007 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
4009 pragma Assert (Is_Enumeration_Type (Id));
4011 end Set_Has_Enumeration_Rep_Clause;
4013 procedure Set_Has_Exit (Id : E; V : B := True) is
4018 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True) is
4020 pragma Assert (Is_Tagged_Type (Id));
4021 Set_Flag110 (Id, V);
4022 end Set_Has_External_Tag_Rep_Clause;
4024 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
4026 Set_Flag175 (Id, V);
4027 end Set_Has_Forward_Instantiation;
4029 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
4031 Set_Flag173 (Id, V);
4032 end Set_Has_Fully_Qualified_Name;
4034 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
4037 end Set_Has_Gigi_Rep_Item;
4039 procedure Set_Has_Homonym (Id : E; V : B := True) is
4042 end Set_Has_Homonym;
4044 procedure Set_Has_Implicit_Dereference (Id : E; V : B := True) is
4046 Set_Flag251 (Id, V);
4047 end Set_Has_Implicit_Dereference;
4049 procedure Set_Has_Independent_Components (Id : E; V : B := True) is
4051 pragma Assert (Is_Object (Id) or else Is_Type (Id));
4053 end Set_Has_Independent_Components;
4055 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
4057 pragma Assert (Is_Type (Id));
4058 Set_Flag248 (Id, V);
4059 end Set_Has_Inheritable_Invariants;
4061 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
4063 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
4064 Set_Flag219 (Id, V);
4065 end Set_Has_Initial_Value;
4067 procedure Set_Has_Invariants (Id : E; V : B := True) is
4069 pragma Assert (Is_Type (Id));
4070 Set_Flag232 (Id, V);
4071 end Set_Has_Invariants;
4073 procedure Set_Has_Loop_Entry_Attributes (Id : E; V : B := True) is
4075 pragma Assert (Ekind (Id) = E_Loop);
4076 Set_Flag260 (Id, V);
4077 end Set_Has_Loop_Entry_Attributes;
4079 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
4081 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4083 end Set_Has_Machine_Radix_Clause;
4085 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
4088 end Set_Has_Master_Entity;
4090 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
4092 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4093 Set_Flag142 (Id, V);
4094 end Set_Has_Missing_Return;
4096 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
4098 Set_Flag101 (Id, V);
4099 end Set_Has_Nested_Block_With_Handler;
4101 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
4103 pragma Assert (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
4104 Set_Flag215 (Id, V);
4105 end Set_Has_Up_Level_Access;
4107 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
4109 pragma Assert (Id = Base_Type (Id));
4111 end Set_Has_Non_Standard_Rep;
4113 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
4115 pragma Assert (Is_Type (Id));
4116 Set_Flag172 (Id, V);
4117 end Set_Has_Object_Size_Clause;
4119 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
4121 Set_Flag154 (Id, V);
4122 end Set_Has_Per_Object_Constraint;
4124 procedure Set_Has_Postconditions (Id : E; V : B := True) is
4126 pragma Assert (Is_Subprogram (Id));
4127 Set_Flag240 (Id, V);
4128 end Set_Has_Postconditions;
4130 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
4132 pragma Assert (Is_Access_Type (Id));
4133 Set_Flag27 (Base_Type (Id), V);
4134 end Set_Has_Pragma_Controlled;
4136 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
4138 Set_Flag150 (Id, V);
4139 end Set_Has_Pragma_Elaborate_Body;
4141 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
4143 Set_Flag157 (Id, V);
4144 end Set_Has_Pragma_Inline;
4146 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
4148 Set_Flag230 (Id, V);
4149 end Set_Has_Pragma_Inline_Always;
4151 procedure Set_Has_Pragma_No_Inline (Id : E; V : B := True) is
4153 Set_Flag201 (Id, V);
4154 end Set_Has_Pragma_No_Inline;
4156 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
4158 pragma Assert (Is_Enumeration_Type (Id));
4159 pragma Assert (Id = Base_Type (Id));
4160 Set_Flag198 (Id, V);
4161 end Set_Has_Pragma_Ordered;
4163 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
4165 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
4166 pragma Assert (Id = Base_Type (Id));
4167 Set_Flag121 (Id, V);
4168 end Set_Has_Pragma_Pack;
4170 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
4172 Set_Flag221 (Id, V);
4173 end Set_Has_Pragma_Preelab_Init;
4175 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
4177 Set_Flag203 (Id, V);
4178 end Set_Has_Pragma_Pure;
4180 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
4182 Set_Flag179 (Id, V);
4183 end Set_Has_Pragma_Pure_Function;
4185 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
4187 Set_Flag169 (Id, V);
4188 end Set_Has_Pragma_Thread_Local_Storage;
4190 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
4192 Set_Flag233 (Id, V);
4193 end Set_Has_Pragma_Unmodified;
4195 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
4197 Set_Flag180 (Id, V);
4198 end Set_Has_Pragma_Unreferenced;
4200 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
4202 pragma Assert (Is_Type (Id));
4203 Set_Flag212 (Id, V);
4204 end Set_Has_Pragma_Unreferenced_Objects;
4206 procedure Set_Has_Predicates (Id : E; V : B := True) is
4208 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Void);
4209 Set_Flag250 (Id, V);
4210 end Set_Has_Predicates;
4212 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
4214 pragma Assert (Id = Base_Type (Id));
4215 Set_Flag120 (Id, V);
4216 end Set_Has_Primitive_Operations;
4218 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
4220 pragma Assert (Is_Type (Id));
4221 Set_Flag151 (Id, V);
4222 end Set_Has_Private_Ancestor;
4224 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
4226 Set_Flag155 (Id, V);
4227 end Set_Has_Private_Declaration;
4229 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
4231 Set_Flag161 (Id, V);
4232 end Set_Has_Qualified_Name;
4234 procedure Set_Has_RACW (Id : E; V : B := True) is
4236 pragma Assert (Ekind (Id) = E_Package);
4237 Set_Flag214 (Id, V);
4240 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
4242 pragma Assert (Id = Base_Type (Id));
4244 end Set_Has_Record_Rep_Clause;
4246 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
4248 pragma Assert (Is_Subprogram (Id));
4249 Set_Flag143 (Id, V);
4250 end Set_Has_Recursive_Call;
4252 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
4255 end Set_Has_Size_Clause;
4257 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
4260 end Set_Has_Small_Clause;
4262 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
4264 pragma Assert (Id = Base_Type (Id));
4265 Set_Flag100 (Id, V);
4266 end Set_Has_Specified_Layout;
4268 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
4270 pragma Assert (Is_Type (Id));
4271 Set_Flag190 (Id, V);
4272 end Set_Has_Specified_Stream_Input;
4274 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
4276 pragma Assert (Is_Type (Id));
4277 Set_Flag191 (Id, V);
4278 end Set_Has_Specified_Stream_Output;
4280 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
4282 pragma Assert (Is_Type (Id));
4283 Set_Flag192 (Id, V);
4284 end Set_Has_Specified_Stream_Read;
4286 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
4288 pragma Assert (Is_Type (Id));
4289 Set_Flag193 (Id, V);
4290 end Set_Has_Specified_Stream_Write;
4292 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
4294 Set_Flag211 (Id, V);
4295 end Set_Has_Static_Discriminants;
4297 procedure Set_Has_Static_Predicate_Aspect (Id : E; V : B := True) is
4299 pragma Assert (Is_Type (Id));
4300 Set_Flag259 (Id, V);
4301 end Set_Has_Static_Predicate_Aspect;
4303 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
4305 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4306 pragma Assert (Id = Base_Type (Id));
4308 end Set_Has_Storage_Size_Clause;
4310 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4312 pragma Assert (Is_Elementary_Type (Id));
4313 Set_Flag184 (Id, V);
4314 end Set_Has_Stream_Size_Clause;
4316 procedure Set_Has_Task (Id : E; V : B := True) is
4318 pragma Assert (Id = Base_Type (Id));
4322 procedure Set_Has_Thunks (Id : E; V : B := True) is
4324 pragma Assert (Is_Tag (Id));
4325 Set_Flag228 (Id, V);
4328 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4330 pragma Assert (Id = Base_Type (Id));
4331 Set_Flag123 (Id, V);
4332 end Set_Has_Unchecked_Union;
4334 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4336 pragma Assert (Is_Type (Id));
4338 end Set_Has_Unknown_Discriminants;
4340 procedure Set_Has_Visible_Refinement (Id : E; V : B := True) is
4342 pragma Assert (Ekind (Id) = E_Abstract_State);
4343 Set_Flag263 (Id, V);
4344 end Set_Has_Visible_Refinement;
4346 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4348 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4350 end Set_Has_Volatile_Components;
4352 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4354 Set_Flag182 (Id, V);
4355 end Set_Has_Xref_Entry;
4357 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4359 pragma Assert (Ekind (Id) = E_Variable);
4361 end Set_Hiding_Loop_Variable;
4363 procedure Set_Homonym (Id : E; V : E) is
4365 pragma Assert (Id /= V);
4369 procedure Set_Interface_Alias (Id : E; V : E) is
4373 and then Is_Hidden (Id)
4374 and then (Ekind_In (Id, E_Procedure, E_Function)));
4376 end Set_Interface_Alias;
4378 procedure Set_Interfaces (Id : E; V : L) is
4380 pragma Assert (Is_Record_Type (Id));
4381 Set_Elist25 (Id, V);
4384 procedure Set_In_Package_Body (Id : E; V : B := True) is
4387 end Set_In_Package_Body;
4389 procedure Set_In_Private_Part (Id : E; V : B := True) is
4392 end Set_In_Private_Part;
4394 procedure Set_In_Use (Id : E; V : B := True) is
4396 pragma Assert (Nkind (Id) in N_Entity);
4400 procedure Set_Initialization_Statements (Id : E; V : N) is
4402 -- Tolerate an E_Void entity since this can be called while resolving
4403 -- an aggregate used as the initialization expression for an object
4404 -- declaration, and this occurs before the Ekind for the object is set.
4406 pragma Assert (Ekind_In (Id, E_Void, E_Constant, E_Variable));
4408 end Set_Initialization_Statements;
4410 procedure Set_Inner_Instances (Id : E; V : L) is
4412 Set_Elist23 (Id, V);
4413 end Set_Inner_Instances;
4415 procedure Set_Interface_Name (Id : E; V : N) is
4418 end Set_Interface_Name;
4420 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4422 pragma Assert (Is_Overloadable (Id));
4424 end Set_Is_Abstract_Subprogram;
4426 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4428 pragma Assert (Is_Type (Id));
4429 Set_Flag146 (Id, V);
4430 end Set_Is_Abstract_Type;
4432 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4434 pragma Assert (Is_Access_Type (Id));
4435 Set_Flag194 (Id, V);
4436 end Set_Is_Local_Anonymous_Access;
4438 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4440 pragma Assert (Is_Access_Type (Id));
4442 end Set_Is_Access_Constant;
4444 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4446 Set_Flag185 (Id, V);
4447 end Set_Is_Ada_2005_Only;
4449 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4451 Set_Flag199 (Id, V);
4452 end Set_Is_Ada_2012_Only;
4454 procedure Set_Is_Aliased (Id : E; V : B := True) is
4456 pragma Assert (Nkind (Id) in N_Entity);
4460 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
4462 pragma Assert (Is_Entry (Id));
4463 Set_Flag132 (Id, V);
4464 end Set_Is_AST_Entry;
4466 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4469 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4471 end Set_Is_Asynchronous;
4473 procedure Set_Is_Atomic (Id : E; V : B := True) is
4478 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4480 pragma Assert ((not V)
4481 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4482 Set_Flag122 (Id, V);
4483 end Set_Is_Bit_Packed_Array;
4485 procedure Set_Is_Called (Id : E; V : B := True) is
4487 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4488 Set_Flag102 (Id, V);
4491 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4494 end Set_Is_Character_Type;
4496 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4499 end Set_Is_Child_Unit;
4501 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4504 end Set_Is_Class_Wide_Equivalent_Type;
4506 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4508 Set_Flag149 (Id, V);
4509 end Set_Is_Compilation_Unit;
4511 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4513 pragma Assert (Ekind (Id) = E_Discriminant);
4514 Set_Flag103 (Id, V);
4515 end Set_Is_Completely_Hidden;
4517 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4520 end Set_Is_Concurrent_Record_Type;
4522 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4525 end Set_Is_Constr_Subt_For_U_Nominal;
4527 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4529 Set_Flag141 (Id, V);
4530 end Set_Is_Constr_Subt_For_UN_Aliased;
4532 procedure Set_Is_Constrained (Id : E; V : B := True) is
4534 pragma Assert (Nkind (Id) in N_Entity);
4536 end Set_Is_Constrained;
4538 procedure Set_Is_Constructor (Id : E; V : B := True) is
4541 end Set_Is_Constructor;
4543 procedure Set_Is_Controlled (Id : E; V : B := True) is
4545 pragma Assert (Id = Base_Type (Id));
4547 end Set_Is_Controlled;
4549 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4551 pragma Assert (Is_Formal (Id));
4553 end Set_Is_Controlling_Formal;
4555 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4558 end Set_Is_CPP_Class;
4560 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4562 pragma Assert (Is_Type (Id));
4563 Set_Flag223 (Id, V);
4564 end Set_Is_Descendent_Of_Address;
4566 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4568 Set_Flag176 (Id, V);
4569 end Set_Is_Discrim_SO_Function;
4571 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4573 Set_Flag234 (Id, V);
4574 end Set_Is_Dispatch_Table_Entity;
4576 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4581 Is_Overloadable (Id)
4583 Ekind (Id) = E_Subprogram_Type);
4586 end Set_Is_Dispatching_Operation;
4588 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4590 Set_Flag124 (Id, V);
4591 end Set_Is_Eliminated;
4593 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4596 end Set_Is_Entry_Formal;
4598 procedure Set_Is_Exported (Id : E; V : B := True) is
4601 end Set_Is_Exported;
4603 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4606 end Set_Is_First_Subtype;
4608 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4610 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4611 Set_Flag118 (Id, V);
4612 end Set_Is_For_Access_Subtype;
4614 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4616 Set_Flag111 (Id, V);
4617 end Set_Is_Formal_Subprogram;
4619 procedure Set_Is_Frozen (Id : E; V : B := True) is
4621 pragma Assert (Nkind (Id) in N_Entity);
4625 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4627 pragma Assert (Is_Type (Id));
4629 end Set_Is_Generic_Actual_Type;
4631 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4633 Set_Flag130 (Id, V);
4634 end Set_Is_Generic_Instance;
4636 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4638 pragma Assert (Nkind (Id) in N_Entity);
4640 end Set_Is_Generic_Type;
4642 procedure Set_Is_Hidden (Id : E; V : B := True) is
4647 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4649 Set_Flag171 (Id, V);
4650 end Set_Is_Hidden_Open_Scope;
4652 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4654 pragma Assert (Nkind (Id) in N_Entity);
4656 end Set_Is_Immediately_Visible;
4658 procedure Set_Is_Implementation_Defined (Id : E; V : B := True) is
4660 Set_Flag254 (Id, V);
4661 end Set_Is_Implementation_Defined;
4663 procedure Set_Is_Imported (Id : E; V : B := True) is
4666 end Set_Is_Imported;
4668 procedure Set_Is_Inlined (Id : E; V : B := True) is
4673 procedure Set_Is_Interface (Id : E; V : B := True) is
4675 pragma Assert (Is_Record_Type (Id));
4676 Set_Flag186 (Id, V);
4677 end Set_Is_Interface;
4679 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4681 Set_Flag126 (Id, V);
4682 end Set_Is_Instantiated;
4684 procedure Set_Is_Internal (Id : E; V : B := True) is
4686 pragma Assert (Nkind (Id) in N_Entity);
4688 end Set_Is_Internal;
4690 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4692 pragma Assert (Nkind (Id) in N_Entity);
4694 end Set_Is_Interrupt_Handler;
4696 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4699 end Set_Is_Intrinsic_Subprogram;
4701 procedure Set_Is_Invariant_Procedure (Id : E; V : B := True) is
4703 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4704 Set_Flag257 (Id, V);
4705 end Set_Is_Invariant_Procedure;
4707 procedure Set_Is_Itype (Id : E; V : B := True) is
4712 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4715 end Set_Is_Known_Non_Null;
4717 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4719 Set_Flag204 (Id, V);
4720 end Set_Is_Known_Null;
4722 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4724 Set_Flag170 (Id, V);
4725 end Set_Is_Known_Valid;
4727 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4729 pragma Assert (Is_Type (Id));
4730 Set_Flag106 (Id, V);
4731 end Set_Is_Limited_Composite;
4733 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4735 pragma Assert (Is_Interface (Id));
4736 Set_Flag197 (Id, V);
4737 end Set_Is_Limited_Interface;
4739 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4742 end Set_Is_Limited_Record;
4744 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4746 pragma Assert (Is_Subprogram (Id));
4747 Set_Flag137 (Id, V);
4748 end Set_Is_Machine_Code_Subprogram;
4750 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4752 pragma Assert (Is_Type (Id));
4753 Set_Flag109 (Id, V);
4754 end Set_Is_Non_Static_Subtype;
4756 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4758 pragma Assert (Ekind (Id) = E_Procedure);
4759 Set_Flag178 (Id, V);
4760 end Set_Is_Null_Init_Proc;
4762 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4764 Set_Flag153 (Id, V);
4765 end Set_Is_Obsolescent;
4767 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
4769 pragma Assert (Ekind (Id) = E_Out_Parameter);
4770 Set_Flag226 (Id, V);
4771 end Set_Is_Only_Out_Parameter;
4773 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
4775 pragma Assert (Is_Formal (Id));
4776 Set_Flag134 (Id, V);
4777 end Set_Is_Optional_Parameter;
4779 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
4781 Set_Flag160 (Id, V);
4782 end Set_Is_Package_Body_Entity;
4784 procedure Set_Is_Packed (Id : E; V : B := True) is
4786 pragma Assert (Id = Base_Type (Id));
4790 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
4792 Set_Flag138 (Id, V);
4793 end Set_Is_Packed_Array_Type;
4795 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
4797 pragma Assert (Nkind (Id) in N_Entity);
4799 end Set_Is_Potentially_Use_Visible;
4801 procedure Set_Is_Predicate_Function (Id : E; V : B := True) is
4803 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4804 Set_Flag255 (Id, V);
4805 end Set_Is_Predicate_Function;
4807 procedure Set_Is_Predicate_Function_M (Id : E; V : B := True) is
4809 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4810 Set_Flag256 (Id, V);
4811 end Set_Is_Predicate_Function_M;
4813 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
4816 end Set_Is_Preelaborated;
4818 procedure Set_Is_Primitive (Id : E; V : B := True) is
4821 (Is_Overloadable (Id)
4822 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
4823 Set_Flag218 (Id, V);
4824 end Set_Is_Primitive;
4826 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
4828 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4829 Set_Flag195 (Id, V);
4830 end Set_Is_Primitive_Wrapper;
4832 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
4834 pragma Assert (Is_Type (Id));
4835 Set_Flag107 (Id, V);
4836 end Set_Is_Private_Composite;
4838 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
4841 end Set_Is_Private_Descendant;
4843 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
4845 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4846 Set_Flag245 (Id, V);
4847 end Set_Is_Private_Primitive;
4849 procedure Set_Is_Processed_Transient (Id : E; V : B := True) is
4851 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
4852 Set_Flag252 (Id, V);
4853 end Set_Is_Processed_Transient;
4855 procedure Set_Is_Public (Id : E; V : B := True) is
4857 pragma Assert (Nkind (Id) in N_Entity);
4861 procedure Set_Is_Pure (Id : E; V : B := True) is
4866 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
4868 pragma Assert (Is_Access_Type (Id));
4869 Set_Flag189 (Id, V);
4870 end Set_Is_Pure_Unit_Access_Type;
4872 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
4874 pragma Assert (Is_Type (Id));
4875 Set_Flag244 (Id, V);
4876 end Set_Is_RACW_Stub_Type;
4878 procedure Set_Is_Raised (Id : E; V : B := True) is
4880 pragma Assert (Ekind (Id) = E_Exception);
4881 Set_Flag224 (Id, V);
4884 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
4887 end Set_Is_Remote_Call_Interface;
4889 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
4892 end Set_Is_Remote_Types;
4894 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
4896 Set_Flag112 (Id, V);
4897 end Set_Is_Renaming_Of_Object;
4899 procedure Set_Is_Return_Object (Id : E; V : B := True) is
4901 Set_Flag209 (Id, V);
4902 end Set_Is_Return_Object;
4904 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
4906 pragma Assert (Ekind (Id) = E_Variable);
4907 Set_Flag249 (Id, V);
4908 end Set_Is_Safe_To_Reevaluate;
4910 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
4913 end Set_Is_Shared_Passive;
4915 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
4919 or else Ekind_In (Id, E_Exception,
4924 end Set_Is_Statically_Allocated;
4926 procedure Set_Is_Tag (Id : E; V : B := True) is
4928 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
4932 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
4935 end Set_Is_Tagged_Type;
4937 procedure Set_Is_Thunk (Id : E; V : B := True) is
4939 pragma Assert (Is_Subprogram (Id));
4940 Set_Flag225 (Id, V);
4943 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
4945 Set_Flag235 (Id, V);
4946 end Set_Is_Trivial_Subprogram;
4948 procedure Set_Is_True_Constant (Id : E; V : B := True) is
4950 Set_Flag163 (Id, V);
4951 end Set_Is_True_Constant;
4953 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
4955 pragma Assert (Id = Base_Type (Id));
4956 Set_Flag117 (Id, V);
4957 end Set_Is_Unchecked_Union;
4959 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
4961 pragma Assert (Ekind (Id) = E_Record_Type);
4962 Set_Flag246 (Id, V);
4963 end Set_Is_Underlying_Record_View;
4965 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
4967 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
4968 Set_Flag144 (Id, V);
4969 end Set_Is_Unsigned_Type;
4971 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
4973 pragma Assert (Ekind (Id) = E_Procedure);
4974 Set_Flag127 (Id, V);
4975 end Set_Is_Valued_Procedure;
4977 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
4979 Set_Flag206 (Id, V);
4980 end Set_Is_Visible_Formal;
4982 procedure Set_Is_Visible_Lib_Unit (Id : E; V : B := True) is
4984 Set_Flag116 (Id, V);
4985 end Set_Is_Visible_Lib_Unit;
4987 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
4989 pragma Assert (Ekind (Id) = E_Exception);
4990 Set_Flag133 (Id, V);
4991 end Set_Is_VMS_Exception;
4993 procedure Set_Is_Volatile (Id : E; V : B := True) is
4995 pragma Assert (Nkind (Id) in N_Entity);
4997 end Set_Is_Volatile;
4999 procedure Set_Itype_Printed (Id : E; V : B := True) is
5001 pragma Assert (Is_Itype (Id));
5002 Set_Flag202 (Id, V);
5003 end Set_Itype_Printed;
5005 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
5008 end Set_Kill_Elaboration_Checks;
5010 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
5013 end Set_Kill_Range_Checks;
5015 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
5017 pragma Assert (Is_Type (Id));
5018 Set_Flag207 (Id, V);
5019 end Set_Known_To_Have_Preelab_Init;
5021 procedure Set_Last_Assignment (Id : E; V : N) is
5023 pragma Assert (Is_Assignable (Id));
5025 end Set_Last_Assignment;
5027 procedure Set_Last_Entity (Id : E; V : E) is
5030 end Set_Last_Entity;
5032 procedure Set_Limited_View (Id : E; V : E) is
5034 pragma Assert (Ekind (Id) = E_Package);
5036 end Set_Limited_View;
5038 procedure Set_Lit_Indexes (Id : E; V : E) is
5040 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5042 end Set_Lit_Indexes;
5044 procedure Set_Lit_Strings (Id : E; V : E) is
5046 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5048 end Set_Lit_Strings;
5050 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
5052 pragma Assert (Is_Formal (Id));
5053 Set_Flag205 (Id, V);
5054 end Set_Low_Bound_Tested;
5056 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
5058 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
5060 end Set_Machine_Radix_10;
5062 procedure Set_Master_Id (Id : E; V : E) is
5064 pragma Assert (Is_Access_Type (Id));
5068 procedure Set_Materialize_Entity (Id : E; V : B := True) is
5070 Set_Flag168 (Id, V);
5071 end Set_Materialize_Entity;
5073 procedure Set_May_Inherit_Delayed_Rep_Aspects (Id : E; V : B := True) is
5075 Set_Flag262 (Id, V);
5076 end Set_May_Inherit_Delayed_Rep_Aspects;
5078 procedure Set_Mechanism (Id : E; V : M) is
5080 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
5081 Set_Uint8 (Id, UI_From_Int (V));
5084 procedure Set_Modulus (Id : E; V : U) is
5086 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
5090 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
5092 pragma Assert (Is_Type (Id));
5093 Set_Flag183 (Id, V);
5094 end Set_Must_Be_On_Byte_Boundary;
5096 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
5098 pragma Assert (Is_Type (Id));
5099 Set_Flag208 (Id, V);
5100 end Set_Must_Have_Preelab_Init;
5102 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
5104 Set_Flag147 (Id, V);
5105 end Set_Needs_Debug_Info;
5107 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
5110 (Is_Overloadable (Id)
5111 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
5113 end Set_Needs_No_Actuals;
5115 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
5117 Set_Flag115 (Id, V);
5118 end Set_Never_Set_In_Source;
5120 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
5123 end Set_Next_Inlined_Subprogram;
5125 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
5127 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5128 Set_Flag131 (Id, V);
5129 end Set_No_Pool_Assigned;
5131 procedure Set_No_Return (Id : E; V : B := True) is
5134 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
5135 Set_Flag113 (Id, V);
5138 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
5140 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5141 Set_Flag136 (Id, V);
5142 end Set_No_Strict_Aliasing;
5144 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
5146 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5148 end Set_Non_Binary_Modulus;
5150 procedure Set_Non_Limited_View (Id : E; V : E) is
5152 pragma Assert (Ekind (Id) in Incomplete_Kind);
5154 end Set_Non_Limited_View;
5156 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
5159 (Root_Type (Id) = Standard_Boolean
5160 and then Ekind (Id) = E_Enumeration_Type);
5161 Set_Flag162 (Id, V);
5162 end Set_Nonzero_Is_True;
5164 procedure Set_Normalized_First_Bit (Id : E; V : U) is
5166 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5168 end Set_Normalized_First_Bit;
5170 procedure Set_Normalized_Position (Id : E; V : U) is
5172 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5174 end Set_Normalized_Position;
5176 procedure Set_Normalized_Position_Max (Id : E; V : U) is
5178 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5180 end Set_Normalized_Position_Max;
5182 procedure Set_OK_To_Rename (Id : E; V : B := True) is
5184 pragma Assert (Ekind (Id) = E_Variable);
5185 Set_Flag247 (Id, V);
5186 end Set_OK_To_Rename;
5188 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
5191 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5192 Set_Flag239 (Id, V);
5193 end Set_OK_To_Reorder_Components;
5195 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
5198 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5199 Set_Flag241 (Id, V);
5200 end Set_Optimize_Alignment_Space;
5202 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
5205 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5206 Set_Flag242 (Id, V);
5207 end Set_Optimize_Alignment_Time;
5209 procedure Set_Original_Access_Type (Id : E; V : E) is
5211 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
5213 end Set_Original_Access_Type;
5215 procedure Set_Original_Array_Type (Id : E; V : E) is
5217 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
5219 end Set_Original_Array_Type;
5221 procedure Set_Original_Record_Component (Id : E; V : E) is
5223 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
5225 end Set_Original_Record_Component;
5227 procedure Set_Overlays_Constant (Id : E; V : B := True) is
5229 Set_Flag243 (Id, V);
5230 end Set_Overlays_Constant;
5232 procedure Set_Overridden_Operation (Id : E; V : E) is
5235 end Set_Overridden_Operation;
5237 procedure Set_Package_Instantiation (Id : E; V : N) is
5239 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
5241 end Set_Package_Instantiation;
5243 procedure Set_Packed_Array_Type (Id : E; V : E) is
5245 pragma Assert (Is_Array_Type (Id));
5247 end Set_Packed_Array_Type;
5249 procedure Set_Parent_Subtype (Id : E; V : E) is
5251 pragma Assert (Ekind (Id) = E_Record_Type);
5253 end Set_Parent_Subtype;
5255 procedure Set_Postcondition_Proc (Id : E; V : E) is
5257 pragma Assert (Ekind (Id) = E_Procedure);
5259 end Set_Postcondition_Proc;
5261 procedure Set_PPC_Wrapper (Id : E; V : E) is
5263 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
5265 end Set_PPC_Wrapper;
5267 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
5269 pragma Assert (Is_Tagged_Type (Id));
5270 Set_Elist10 (Id, V);
5271 end Set_Direct_Primitive_Operations;
5273 procedure Set_Prival (Id : E; V : E) is
5275 pragma Assert (Is_Protected_Component (Id));
5279 procedure Set_Prival_Link (Id : E; V : E) is
5281 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5283 end Set_Prival_Link;
5285 procedure Set_Private_Dependents (Id : E; V : L) is
5287 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
5288 Set_Elist18 (Id, V);
5289 end Set_Private_Dependents;
5291 procedure Set_Private_View (Id : E; V : N) is
5293 pragma Assert (Is_Private_Type (Id));
5295 end Set_Private_View;
5297 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
5299 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
5301 end Set_Protected_Body_Subprogram;
5303 procedure Set_Protected_Formal (Id : E; V : E) is
5305 pragma Assert (Is_Formal (Id));
5307 end Set_Protected_Formal;
5309 procedure Set_Protection_Object (Id : E; V : E) is
5311 pragma Assert (Ekind_In (Id, E_Entry,
5316 end Set_Protection_Object;
5318 procedure Set_Reachable (Id : E; V : B := True) is
5323 procedure Set_Referenced (Id : E; V : B := True) is
5325 Set_Flag156 (Id, V);
5328 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
5331 end Set_Referenced_As_LHS;
5333 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
5335 Set_Flag227 (Id, V);
5336 end Set_Referenced_As_Out_Parameter;
5338 procedure Set_Refined_State (Id : E; V : E) is
5340 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
5342 end Set_Refined_State;
5344 procedure Set_Refinement_Constituents (Id : E; V : L) is
5346 pragma Assert (Ekind (Id) = E_Abstract_State);
5348 end Set_Refinement_Constituents;
5350 procedure Set_Register_Exception_Call (Id : E; V : N) is
5352 pragma Assert (Ekind (Id) = E_Exception);
5354 end Set_Register_Exception_Call;
5356 procedure Set_Related_Array_Object (Id : E; V : E) is
5358 pragma Assert (Is_Array_Type (Id));
5360 end Set_Related_Array_Object;
5362 procedure Set_Related_Expression (Id : E; V : N) is
5364 pragma Assert (Ekind (Id) in Type_Kind
5365 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
5367 end Set_Related_Expression;
5369 procedure Set_Related_Instance (Id : E; V : E) is
5371 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
5373 end Set_Related_Instance;
5375 procedure Set_Related_Type (Id : E; V : E) is
5377 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5379 end Set_Related_Type;
5381 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5383 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
5385 end Set_Relative_Deadline_Variable;
5387 procedure Set_Renamed_Entity (Id : E; V : N) is
5390 end Set_Renamed_Entity;
5392 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5394 pragma Assert (Ekind (Id) = E_Package);
5395 Set_Flag231 (Id, V);
5396 end Set_Renamed_In_Spec;
5398 procedure Set_Renamed_Object (Id : E; V : N) is
5401 end Set_Renamed_Object;
5403 procedure Set_Renaming_Map (Id : E; V : U) is
5406 end Set_Renaming_Map;
5408 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5410 pragma Assert (Is_Overloadable (Id));
5411 Set_Flag213 (Id, V);
5412 end Set_Requires_Overriding;
5414 procedure Set_Return_Present (Id : E; V : B := True) is
5417 end Set_Return_Present;
5419 procedure Set_Return_Applies_To (Id : E; V : N) is
5422 end Set_Return_Applies_To;
5424 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5427 end Set_Returns_By_Ref;
5429 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5432 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5433 Set_Flag164 (Id, V);
5434 end Set_Reverse_Bit_Order;
5436 procedure Set_Reverse_Storage_Order (Id : E; V : B := True) is
5440 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5442 end Set_Reverse_Storage_Order;
5444 procedure Set_RM_Size (Id : E; V : U) is
5446 pragma Assert (Is_Type (Id));
5450 procedure Set_Scalar_Range (Id : E; V : N) is
5453 end Set_Scalar_Range;
5455 procedure Set_Scale_Value (Id : E; V : U) is
5458 end Set_Scale_Value;
5460 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5462 pragma Assert (not Is_Record_Type (Id));
5464 end Set_Scope_Depth_Value;
5466 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5468 Set_Flag167 (Id, V);
5469 end Set_Sec_Stack_Needed_For_Return;
5471 procedure Set_Shadow_Entities (Id : E; V : S) is
5473 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5475 end Set_Shadow_Entities;
5477 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5479 pragma Assert (Ekind (Id) = E_Variable);
5481 end Set_Shared_Var_Procs_Instance;
5483 procedure Set_Size_Check_Code (Id : E; V : N) is
5485 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5487 end Set_Size_Check_Code;
5489 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5491 Set_Flag177 (Id, V);
5492 end Set_Size_Depends_On_Discriminant;
5494 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5497 end Set_Size_Known_At_Compile_Time;
5499 procedure Set_Small_Value (Id : E; V : R) is
5501 pragma Assert (Is_Fixed_Point_Type (Id));
5502 Set_Ureal21 (Id, V);
5503 end Set_Small_Value;
5505 procedure Set_SPARK_Mode_Pragmas (Id : E; V : N) is
5508 (Ekind_In (Id, E_Function, -- subprogram variants
5510 E_Generic_Procedure,
5514 Ekind_In (Id, E_Generic_Package, -- package variants
5519 end Set_SPARK_Mode_Pragmas;
5521 procedure Set_Spec_Entity (Id : E; V : E) is
5523 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5525 end Set_Spec_Entity;
5527 procedure Set_Static_Predicate (Id : E; V : S) is
5530 (Ekind_In (Id, E_Enumeration_Subtype,
5531 E_Modular_Integer_Subtype,
5532 E_Signed_Integer_Subtype)
5533 and then Has_Predicates (Id));
5535 end Set_Static_Predicate;
5537 procedure Set_Status_Flag_Or_Transient_Decl (Id : E; V : E) is
5539 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5541 end Set_Status_Flag_Or_Transient_Decl;
5543 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5545 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5546 pragma Assert (Id = Base_Type (Id));
5548 end Set_Storage_Size_Variable;
5550 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5552 pragma Assert (Ekind (Id) = E_Package);
5554 end Set_Static_Elaboration_Desired;
5556 procedure Set_Static_Initialization (Id : E; V : N) is
5559 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5561 end Set_Static_Initialization;
5563 procedure Set_Stored_Constraint (Id : E; V : L) is
5565 pragma Assert (Nkind (Id) in N_Entity);
5566 Set_Elist23 (Id, V);
5567 end Set_Stored_Constraint;
5569 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5571 pragma Assert (Id = Base_Type (Id));
5572 Set_Flag145 (Id, V);
5573 end Set_Strict_Alignment;
5575 procedure Set_String_Literal_Length (Id : E; V : U) is
5577 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5579 end Set_String_Literal_Length;
5581 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5583 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5585 end Set_String_Literal_Low_Bound;
5587 procedure Set_Subprograms_For_Type (Id : E; V : E) is
5589 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
5591 end Set_Subprograms_For_Type;
5593 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5595 Set_Flag148 (Id, V);
5596 end Set_Suppress_Elaboration_Warnings;
5598 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
5600 pragma Assert (Is_Type (Id));
5601 Set_Flag105 (Id, V);
5602 end Set_Suppress_Initialization;
5604 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5606 Set_Flag165 (Id, V);
5607 end Set_Suppress_Style_Checks;
5609 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5611 Set_Flag217 (Id, V);
5612 end Set_Suppress_Value_Tracking_On_Call;
5614 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5616 pragma Assert (Ekind (Id) in Task_Kind);
5618 end Set_Task_Body_Procedure;
5620 procedure Set_Thunk_Entity (Id : E; V : E) is
5622 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5623 and then Is_Thunk (Id));
5625 end Set_Thunk_Entity;
5627 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5630 end Set_Treat_As_Volatile;
5632 procedure Set_Underlying_Full_View (Id : E; V : E) is
5634 pragma Assert (Ekind (Id) in Private_Kind);
5636 end Set_Underlying_Full_View;
5638 procedure Set_Underlying_Record_View (Id : E; V : E) is
5640 pragma Assert (Ekind (Id) = E_Record_Type);
5642 end Set_Underlying_Record_View;
5644 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5646 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5647 Set_Flag216 (Id, V);
5648 end Set_Universal_Aliasing;
5650 procedure Set_Unset_Reference (Id : E; V : N) is
5653 end Set_Unset_Reference;
5655 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5657 Set_Flag222 (Id, V);
5658 end Set_Used_As_Generic_Actual;
5660 procedure Set_Uses_Lock_Free (Id : E; V : B := True) is
5662 pragma Assert (Ekind (Id) = E_Protected_Type);
5663 Set_Flag188 (Id, V);
5664 end Set_Uses_Lock_Free;
5666 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5669 end Set_Uses_Sec_Stack;
5671 procedure Set_Warnings_Off (Id : E; V : B := True) is
5674 end Set_Warnings_Off;
5676 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
5678 Set_Flag236 (Id, V);
5679 end Set_Warnings_Off_Used;
5681 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
5683 Set_Flag237 (Id, V);
5684 end Set_Warnings_Off_Used_Unmodified;
5686 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
5688 Set_Flag238 (Id, V);
5689 end Set_Warnings_Off_Used_Unreferenced;
5691 procedure Set_Was_Hidden (Id : E; V : B := True) is
5693 Set_Flag196 (Id, V);
5696 procedure Set_Wrapped_Entity (Id : E; V : E) is
5698 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5699 and then Is_Primitive_Wrapper (Id));
5701 end Set_Wrapped_Entity;
5703 -----------------------------------
5704 -- Field Initialization Routines --
5705 -----------------------------------
5707 procedure Init_Alignment (Id : E) is
5709 Set_Uint14 (Id, Uint_0);
5712 procedure Init_Alignment (Id : E; V : Int) is
5714 Set_Uint14 (Id, UI_From_Int (V));
5717 procedure Init_Component_Bit_Offset (Id : E) is
5719 Set_Uint11 (Id, No_Uint);
5720 end Init_Component_Bit_Offset;
5722 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
5724 Set_Uint11 (Id, UI_From_Int (V));
5725 end Init_Component_Bit_Offset;
5727 procedure Init_Component_Size (Id : E) is
5729 Set_Uint22 (Id, Uint_0);
5730 end Init_Component_Size;
5732 procedure Init_Component_Size (Id : E; V : Int) is
5734 Set_Uint22 (Id, UI_From_Int (V));
5735 end Init_Component_Size;
5737 procedure Init_Digits_Value (Id : E) is
5739 Set_Uint17 (Id, Uint_0);
5740 end Init_Digits_Value;
5742 procedure Init_Digits_Value (Id : E; V : Int) is
5744 Set_Uint17 (Id, UI_From_Int (V));
5745 end Init_Digits_Value;
5747 procedure Init_Esize (Id : E) is
5749 Set_Uint12 (Id, Uint_0);
5752 procedure Init_Esize (Id : E; V : Int) is
5754 Set_Uint12 (Id, UI_From_Int (V));
5757 procedure Init_Normalized_First_Bit (Id : E) is
5759 Set_Uint8 (Id, No_Uint);
5760 end Init_Normalized_First_Bit;
5762 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
5764 Set_Uint8 (Id, UI_From_Int (V));
5765 end Init_Normalized_First_Bit;
5767 procedure Init_Normalized_Position (Id : E) is
5769 Set_Uint14 (Id, No_Uint);
5770 end Init_Normalized_Position;
5772 procedure Init_Normalized_Position (Id : E; V : Int) is
5774 Set_Uint14 (Id, UI_From_Int (V));
5775 end Init_Normalized_Position;
5777 procedure Init_Normalized_Position_Max (Id : E) is
5779 Set_Uint10 (Id, No_Uint);
5780 end Init_Normalized_Position_Max;
5782 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
5784 Set_Uint10 (Id, UI_From_Int (V));
5785 end Init_Normalized_Position_Max;
5787 procedure Init_RM_Size (Id : E) is
5789 Set_Uint13 (Id, Uint_0);
5792 procedure Init_RM_Size (Id : E; V : Int) is
5794 Set_Uint13 (Id, UI_From_Int (V));
5797 -----------------------------
5798 -- Init_Component_Location --
5799 -----------------------------
5801 procedure Init_Component_Location (Id : E) is
5803 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
5804 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
5805 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
5806 Set_Uint12 (Id, Uint_0); -- Esize
5807 Set_Uint14 (Id, No_Uint); -- Normalized_Position
5808 end Init_Component_Location;
5810 ----------------------------
5811 -- Init_Object_Size_Align --
5812 ----------------------------
5814 procedure Init_Object_Size_Align (Id : E) is
5816 Set_Uint12 (Id, Uint_0); -- Esize
5817 Set_Uint14 (Id, Uint_0); -- Alignment
5818 end Init_Object_Size_Align;
5824 procedure Init_Size (Id : E; V : Int) is
5826 pragma Assert (not Is_Object (Id));
5827 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
5828 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
5831 ---------------------
5832 -- Init_Size_Align --
5833 ---------------------
5835 procedure Init_Size_Align (Id : E) is
5837 pragma Assert (not Is_Object (Id));
5838 Set_Uint12 (Id, Uint_0); -- Esize
5839 Set_Uint13 (Id, Uint_0); -- RM_Size
5840 Set_Uint14 (Id, Uint_0); -- Alignment
5841 end Init_Size_Align;
5843 ----------------------------------------------
5844 -- Type Representation Attribute Predicates --
5845 ----------------------------------------------
5847 function Known_Alignment (E : Entity_Id) return B is
5849 return Uint14 (E) /= Uint_0
5850 and then Uint14 (E) /= No_Uint;
5851 end Known_Alignment;
5853 function Known_Component_Bit_Offset (E : Entity_Id) return B is
5855 return Uint11 (E) /= No_Uint;
5856 end Known_Component_Bit_Offset;
5858 function Known_Component_Size (E : Entity_Id) return B is
5860 return Uint22 (Base_Type (E)) /= Uint_0
5861 and then Uint22 (Base_Type (E)) /= No_Uint;
5862 end Known_Component_Size;
5864 function Known_Esize (E : Entity_Id) return B is
5866 return Uint12 (E) /= Uint_0
5867 and then Uint12 (E) /= No_Uint;
5870 function Known_Normalized_First_Bit (E : Entity_Id) return B is
5872 return Uint8 (E) /= No_Uint;
5873 end Known_Normalized_First_Bit;
5875 function Known_Normalized_Position (E : Entity_Id) return B is
5877 return Uint14 (E) /= No_Uint;
5878 end Known_Normalized_Position;
5880 function Known_Normalized_Position_Max (E : Entity_Id) return B is
5882 return Uint10 (E) /= No_Uint;
5883 end Known_Normalized_Position_Max;
5885 function Known_RM_Size (E : Entity_Id) return B is
5887 return Uint13 (E) /= No_Uint
5888 and then (Uint13 (E) /= Uint_0
5889 or else Is_Discrete_Type (E)
5890 or else Is_Fixed_Point_Type (E));
5893 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
5895 return Uint11 (E) /= No_Uint
5896 and then Uint11 (E) >= Uint_0;
5897 end Known_Static_Component_Bit_Offset;
5899 function Known_Static_Component_Size (E : Entity_Id) return B is
5901 return Uint22 (Base_Type (E)) > Uint_0;
5902 end Known_Static_Component_Size;
5904 function Known_Static_Esize (E : Entity_Id) return B is
5906 return Uint12 (E) > Uint_0
5907 and then not Is_Generic_Type (E);
5908 end Known_Static_Esize;
5910 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
5912 return Uint8 (E) /= No_Uint
5913 and then Uint8 (E) >= Uint_0;
5914 end Known_Static_Normalized_First_Bit;
5916 function Known_Static_Normalized_Position (E : Entity_Id) return B is
5918 return Uint14 (E) /= No_Uint
5919 and then Uint14 (E) >= Uint_0;
5920 end Known_Static_Normalized_Position;
5922 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
5924 return Uint10 (E) /= No_Uint
5925 and then Uint10 (E) >= Uint_0;
5926 end Known_Static_Normalized_Position_Max;
5928 function Known_Static_RM_Size (E : Entity_Id) return B is
5930 return (Uint13 (E) > Uint_0
5931 or else Is_Discrete_Type (E)
5932 or else Is_Fixed_Point_Type (E))
5933 and then not Is_Generic_Type (E);
5934 end Known_Static_RM_Size;
5936 function Unknown_Alignment (E : Entity_Id) return B is
5938 return Uint14 (E) = Uint_0
5939 or else Uint14 (E) = No_Uint;
5940 end Unknown_Alignment;
5942 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
5944 return Uint11 (E) = No_Uint;
5945 end Unknown_Component_Bit_Offset;
5947 function Unknown_Component_Size (E : Entity_Id) return B is
5949 return Uint22 (Base_Type (E)) = Uint_0
5951 Uint22 (Base_Type (E)) = No_Uint;
5952 end Unknown_Component_Size;
5954 function Unknown_Esize (E : Entity_Id) return B is
5956 return Uint12 (E) = No_Uint
5958 Uint12 (E) = Uint_0;
5961 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
5963 return Uint8 (E) = No_Uint;
5964 end Unknown_Normalized_First_Bit;
5966 function Unknown_Normalized_Position (E : Entity_Id) return B is
5968 return Uint14 (E) = No_Uint;
5969 end Unknown_Normalized_Position;
5971 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
5973 return Uint10 (E) = No_Uint;
5974 end Unknown_Normalized_Position_Max;
5976 function Unknown_RM_Size (E : Entity_Id) return B is
5978 return (Uint13 (E) = Uint_0
5979 and then not Is_Discrete_Type (E)
5980 and then not Is_Fixed_Point_Type (E))
5981 or else Uint13 (E) = No_Uint;
5982 end Unknown_RM_Size;
5984 --------------------
5985 -- Address_Clause --
5986 --------------------
5988 function Address_Clause (Id : E) return N is
5990 return Get_Attribute_Definition_Clause (Id, Attribute_Address);
5997 function Aft_Value (Id : E) return U is
5999 Delta_Val : Ureal := Delta_Value (Id);
6001 while Delta_Val < Ureal_Tenth loop
6002 Delta_Val := Delta_Val * Ureal_10;
6003 Result := Result + 1;
6006 return UI_From_Int (Result);
6009 ----------------------
6010 -- Alignment_Clause --
6011 ----------------------
6013 function Alignment_Clause (Id : E) return N is
6015 return Get_Attribute_Definition_Clause (Id, Attribute_Alignment);
6016 end Alignment_Clause;
6022 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
6024 if Last_Entity (V) = Empty then
6025 Set_First_Entity (Id => V, V => Id);
6027 Set_Next_Entity (Last_Entity (V), Id);
6030 Set_Next_Entity (Id, Empty);
6032 Set_Last_Entity (Id => V, V => Id);
6039 function Base_Type (Id : E) return E is
6041 if Is_Base_Type (Id) then
6044 pragma Assert (Is_Type (Id));
6049 -------------------------
6050 -- Component_Alignment --
6051 -------------------------
6053 -- Component Alignment is encoded using two flags, Flag128/129 as
6054 -- follows. Note that both flags False = Align_Default, so that the
6055 -- default initialization of flags to False initializes component
6056 -- alignment to the default value as required.
6058 -- Flag128 Flag129 Value
6059 -- ------- ------- -----
6060 -- False False Calign_Default
6061 -- False True Calign_Component_Size
6062 -- True False Calign_Component_Size_4
6063 -- True True Calign_Storage_Unit
6065 function Component_Alignment (Id : E) return C is
6066 BT : constant Node_Id := Base_Type (Id);
6069 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
6071 if Flag128 (BT) then
6072 if Flag129 (BT) then
6073 return Calign_Storage_Unit;
6075 return Calign_Component_Size_4;
6079 if Flag129 (BT) then
6080 return Calign_Component_Size;
6082 return Calign_Default;
6085 end Component_Alignment;
6087 ----------------------
6088 -- Declaration_Node --
6089 ----------------------
6091 function Declaration_Node (Id : E) return N is
6095 if Ekind (Id) = E_Incomplete_Type
6096 and then Present (Full_View (Id))
6098 P := Parent (Full_View (Id));
6104 if Nkind (P) /= N_Selected_Component
6105 and then Nkind (P) /= N_Expanded_Name
6107 not (Nkind (P) = N_Defining_Program_Unit_Name
6108 and then Is_Child_Unit (Id))
6115 end Declaration_Node;
6117 ---------------------
6118 -- Designated_Type --
6119 ---------------------
6121 function Designated_Type (Id : E) return E is
6125 Desig_Type := Directly_Designated_Type (Id);
6127 if Ekind (Desig_Type) = E_Incomplete_Type
6128 and then Present (Full_View (Desig_Type))
6130 return Full_View (Desig_Type);
6132 elsif Is_Class_Wide_Type (Desig_Type)
6133 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
6134 and then Present (Full_View (Etype (Desig_Type)))
6135 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
6137 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
6142 end Designated_Type;
6144 ----------------------
6145 -- Entry_Index_Type --
6146 ----------------------
6148 function Entry_Index_Type (Id : E) return N is
6150 pragma Assert (Ekind (Id) = E_Entry_Family);
6151 return Etype (Discrete_Subtype_Definition (Parent (Id)));
6152 end Entry_Index_Type;
6154 ---------------------
6155 -- First_Component --
6156 ---------------------
6158 function First_Component (Id : E) return E is
6163 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
6165 Comp_Id := First_Entity (Id);
6166 while Present (Comp_Id) loop
6167 exit when Ekind (Comp_Id) = E_Component;
6168 Comp_Id := Next_Entity (Comp_Id);
6172 end First_Component;
6174 -------------------------------------
6175 -- First_Component_Or_Discriminant --
6176 -------------------------------------
6178 function First_Component_Or_Discriminant (Id : E) return E is
6183 (Is_Record_Type (Id)
6184 or else Is_Incomplete_Or_Private_Type (Id)
6185 or else Has_Discriminants (Id));
6187 Comp_Id := First_Entity (Id);
6188 while Present (Comp_Id) loop
6189 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6190 Comp_Id := Next_Entity (Comp_Id);
6194 end First_Component_Or_Discriminant;
6200 function First_Formal (Id : E) return E is
6205 (Is_Overloadable (Id)
6206 or else Ekind_In (Id, E_Entry_Family,
6208 E_Subprogram_Type));
6210 if Ekind (Id) = E_Enumeration_Literal then
6214 Formal := First_Entity (Id);
6216 if Present (Formal) and then Is_Formal (Formal) then
6224 ------------------------------
6225 -- First_Formal_With_Extras --
6226 ------------------------------
6228 function First_Formal_With_Extras (Id : E) return E is
6233 (Is_Overloadable (Id)
6234 or else Ekind_In (Id, E_Entry_Family,
6236 E_Subprogram_Type));
6238 if Ekind (Id) = E_Enumeration_Literal then
6242 Formal := First_Entity (Id);
6244 if Present (Formal) and then Is_Formal (Formal) then
6247 return Extra_Formals (Id); -- Empty if no extra formals
6250 end First_Formal_With_Extras;
6252 -------------------------------------
6253 -- Get_Attribute_Definition_Clause --
6254 -------------------------------------
6256 function Get_Attribute_Definition_Clause
6258 Id : Attribute_Id) return Node_Id
6263 N := First_Rep_Item (E);
6264 while Present (N) loop
6265 if Nkind (N) = N_Attribute_Definition_Clause
6266 and then Get_Attribute_Id (Chars (N)) = Id
6275 end Get_Attribute_Definition_Clause;
6281 function Get_Full_View (T : Entity_Id) return Entity_Id is
6283 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
6284 return Full_View (T);
6286 elsif Is_Class_Wide_Type (T)
6287 and then Ekind (Root_Type (T)) = E_Incomplete_Type
6288 and then Present (Full_View (Root_Type (T)))
6290 return Class_Wide_Type (Full_View (Root_Type (T)));
6301 function Get_Pragma (E : Entity_Id; Id : Pragma_Id) return Node_Id is
6302 Is_CDG : constant Boolean :=
6303 Id = Pragma_Abstract_State or else
6304 Id = Pragma_Depends or else
6305 Id = Pragma_Global or else
6306 Id = Pragma_Initializes or else
6307 Id = Pragma_Refined_Depends or else
6308 Id = Pragma_Refined_Global or else
6309 Id = Pragma_Refined_State;
6310 Is_CTC : constant Boolean :=
6311 Id = Pragma_Contract_Cases or else
6312 Id = Pragma_Test_Case;
6313 Is_PPC : constant Boolean :=
6314 Id = Pragma_Precondition or else
6315 Id = Pragma_Postcondition;
6317 In_Contract : constant Boolean := Is_CDG or Is_CTC or Is_PPC;
6323 -- Handle pragmas that appear in N_Contract nodes. Those have to be
6324 -- extracted from their specialized list.
6327 Items := Contract (E);
6333 Item := Classifications (Items);
6336 Item := Contract_Test_Cases (Items);
6339 Item := Pre_Post_Conditions (Items);
6345 Item := First_Rep_Item (E);
6348 while Present (Item) loop
6349 if Nkind (Item) = N_Pragma
6350 and then Get_Pragma_Id (Pragma_Name (Item)) = Id
6354 -- All nodes in N_Contract are chained using Next_Pragma
6356 elsif In_Contract then
6357 Item := Next_Pragma (Item);
6362 Next_Rep_Item (Item);
6369 --------------------------------------
6370 -- Get_Record_Representation_Clause --
6371 --------------------------------------
6373 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
6377 N := First_Rep_Item (E);
6378 while Present (N) loop
6379 if Nkind (N) = N_Record_Representation_Clause then
6387 end Get_Record_Representation_Clause;
6389 ------------------------
6390 -- Has_Attach_Handler --
6391 ------------------------
6393 function Has_Attach_Handler (Id : E) return B is
6397 pragma Assert (Is_Protected_Type (Id));
6399 Ritem := First_Rep_Item (Id);
6400 while Present (Ritem) loop
6401 if Nkind (Ritem) = N_Pragma
6402 and then Pragma_Name (Ritem) = Name_Attach_Handler
6406 Next_Rep_Item (Ritem);
6411 end Has_Attach_Handler;
6417 function Has_Entries (Id : E) return B is
6421 pragma Assert (Is_Concurrent_Type (Id));
6423 Ent := First_Entity (Id);
6424 while Present (Ent) loop
6425 if Is_Entry (Ent) then
6429 Ent := Next_Entity (Ent);
6435 ----------------------------
6436 -- Has_Foreign_Convention --
6437 ----------------------------
6439 function Has_Foreign_Convention (Id : E) return B is
6441 -- While regular Intrinsics such as the Standard operators fit in the
6442 -- "Ada" convention, those with an Interface_Name materialize GCC
6443 -- builtin imports for which Ada special treatments shouldn't apply.
6445 return Convention (Id) in Foreign_Convention
6446 or else (Convention (Id) = Convention_Intrinsic
6447 and then Present (Interface_Name (Id)));
6448 end Has_Foreign_Convention;
6450 ---------------------------
6451 -- Has_Interrupt_Handler --
6452 ---------------------------
6454 function Has_Interrupt_Handler (Id : E) return B is
6458 pragma Assert (Is_Protected_Type (Id));
6460 Ritem := First_Rep_Item (Id);
6461 while Present (Ritem) loop
6462 if Nkind (Ritem) = N_Pragma
6463 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6467 Next_Rep_Item (Ritem);
6472 end Has_Interrupt_Handler;
6474 -----------------------------
6475 -- Has_Non_Null_Refinement --
6476 -----------------------------
6478 function Has_Non_Null_Refinement (Id : E) return B is
6480 -- "Refinement" is a concept applicable only to abstract states
6482 pragma Assert (Ekind (Id) = E_Abstract_State);
6484 if Has_Visible_Refinement (Id) then
6485 pragma Assert (Present (Refinement_Constituents (Id)));
6487 -- For a refinement to be non-null, the first constituent must be
6488 -- anything other than null.
6491 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) /= N_Null;
6495 end Has_Non_Null_Refinement;
6497 -----------------------------
6498 -- Has_Null_Abstract_State --
6499 -----------------------------
6501 function Has_Null_Abstract_State (Id : E) return B is
6503 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
6506 Present (Abstract_States (Id))
6507 and then Is_Null_State (Node (First_Elmt (Abstract_States (Id))));
6508 end Has_Null_Abstract_State;
6510 -------------------------
6511 -- Has_Null_Refinement --
6512 -------------------------
6514 function Has_Null_Refinement (Id : E) return B is
6516 -- "Refinement" is a concept applicable only to abstract states
6518 pragma Assert (Ekind (Id) = E_Abstract_State);
6520 if Has_Visible_Refinement (Id) then
6521 pragma Assert (Present (Refinement_Constituents (Id)));
6523 -- For a refinement to be null, the state's sole constituent must be
6527 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) = N_Null;
6531 end Has_Null_Refinement;
6533 --------------------
6534 -- Has_Unmodified --
6535 --------------------
6537 function Has_Unmodified (E : Entity_Id) return Boolean is
6539 if Has_Pragma_Unmodified (E) then
6541 elsif Warnings_Off (E) then
6542 Set_Warnings_Off_Used_Unmodified (E);
6549 ---------------------
6550 -- Has_Unreferenced --
6551 ---------------------
6553 function Has_Unreferenced (E : Entity_Id) return Boolean is
6555 if Has_Pragma_Unreferenced (E) then
6557 elsif Warnings_Off (E) then
6558 Set_Warnings_Off_Used_Unreferenced (E);
6563 end Has_Unreferenced;
6565 ----------------------
6566 -- Has_Warnings_Off --
6567 ----------------------
6569 function Has_Warnings_Off (E : Entity_Id) return Boolean is
6571 if Warnings_Off (E) then
6572 Set_Warnings_Off_Used (E);
6577 end Has_Warnings_Off;
6579 ------------------------------
6580 -- Implementation_Base_Type --
6581 ------------------------------
6583 function Implementation_Base_Type (Id : E) return E is
6588 Bastyp := Base_Type (Id);
6590 if Is_Incomplete_Or_Private_Type (Bastyp) then
6591 Imptyp := Underlying_Type (Bastyp);
6593 -- If we have an implementation type, then just return it,
6594 -- otherwise we return the Base_Type anyway. This can only
6595 -- happen in error situations and should avoid some error bombs.
6597 if Present (Imptyp) then
6598 return Base_Type (Imptyp);
6606 end Implementation_Base_Type;
6608 -------------------------
6609 -- Invariant_Procedure --
6610 -------------------------
6612 function Invariant_Procedure (Id : E) return E is
6616 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
6618 if No (Subprograms_For_Type (Id)) then
6622 S := Subprograms_For_Type (Id);
6623 while Present (S) loop
6624 if Is_Invariant_Procedure (S) then
6627 S := Subprograms_For_Type (S);
6633 end Invariant_Procedure;
6639 -- Global flag table allowing rapid computation of this function
6641 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
6642 (E_Enumeration_Subtype |
6644 E_Signed_Integer_Subtype |
6645 E_Modular_Integer_Subtype |
6646 E_Floating_Point_Subtype |
6647 E_Ordinary_Fixed_Point_Subtype |
6648 E_Decimal_Fixed_Point_Subtype |
6653 E_Record_Subtype_With_Private |
6654 E_Limited_Private_Subtype |
6656 E_Protected_Subtype |
6658 E_String_Literal_Subtype |
6659 E_Class_Wide_Subtype => False,
6662 function Is_Base_Type (Id : E) return Boolean is
6664 return Entity_Is_Base_Type (Ekind (Id));
6667 ---------------------
6668 -- Is_Boolean_Type --
6669 ---------------------
6671 function Is_Boolean_Type (Id : E) return B is
6673 return Root_Type (Id) = Standard_Boolean;
6674 end Is_Boolean_Type;
6676 ------------------------
6677 -- Is_Constant_Object --
6678 ------------------------
6680 function Is_Constant_Object (Id : E) return B is
6681 K : constant Entity_Kind := Ekind (Id);
6684 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
6685 end Is_Constant_Object;
6687 --------------------
6688 -- Is_Discriminal --
6689 --------------------
6691 function Is_Discriminal (Id : E) return B is
6693 return (Ekind_In (Id, E_Constant, E_In_Parameter)
6694 and then Present (Discriminal_Link (Id)));
6697 ----------------------
6698 -- Is_Dynamic_Scope --
6699 ----------------------
6701 function Is_Dynamic_Scope (Id : E) return B is
6704 Ekind (Id) = E_Block
6706 Ekind (Id) = E_Function
6708 Ekind (Id) = E_Procedure
6710 Ekind (Id) = E_Subprogram_Body
6712 Ekind (Id) = E_Task_Type
6714 (Ekind (Id) = E_Limited_Private_Type
6715 and then Present (Full_View (Id))
6716 and then Ekind (Full_View (Id)) = E_Task_Type)
6718 Ekind (Id) = E_Entry
6720 Ekind (Id) = E_Entry_Family
6722 Ekind (Id) = E_Return_Statement;
6723 end Is_Dynamic_Scope;
6725 --------------------
6726 -- Is_Entity_Name --
6727 --------------------
6729 function Is_Entity_Name (N : Node_Id) return Boolean is
6730 Kind : constant Node_Kind := Nkind (N);
6733 -- Identifiers, operator symbols, expanded names are entity names
6735 return Kind = N_Identifier
6736 or else Kind = N_Operator_Symbol
6737 or else Kind = N_Expanded_Name
6739 -- Attribute references are entity names if they refer to an entity.
6740 -- Note that we don't do this by testing for the presence of the
6741 -- Entity field in the N_Attribute_Reference node, since it may not
6742 -- have been set yet.
6744 or else (Kind = N_Attribute_Reference
6745 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
6748 -----------------------
6749 -- Is_External_State --
6750 -----------------------
6752 function Is_External_State (Id : E) return B is
6755 Ekind (Id) = E_Abstract_State and then Has_Option (Id, Name_External);
6756 end Is_External_State;
6762 function Is_Finalizer (Id : E) return B is
6764 return Ekind (Id) = E_Procedure and then Chars (Id) = Name_uFinalizer;
6767 ---------------------
6768 -- Is_Ghost_Entity --
6769 ---------------------
6771 function Is_Ghost_Entity (Id : E) return B is
6773 if Present (Id) and then Ekind (Id) = E_Variable then
6774 return Convention (Id) = Convention_Ghost;
6776 return Is_Ghost_Subprogram (Id);
6778 end Is_Ghost_Entity;
6780 -------------------------
6781 -- Is_Ghost_Subprogram --
6782 -------------------------
6784 function Is_Ghost_Subprogram (Id : E) return B is
6786 if Present (Id) and then Ekind_In (Id, E_Function, E_Procedure) then
6787 return Convention (Id) = Convention_Ghost;
6791 end Is_Ghost_Subprogram;
6793 -------------------------
6794 -- Is_Input_Only_State --
6795 -------------------------
6797 function Is_Input_Only_State (Id : E) return B is
6800 Ekind (Id) = E_Abstract_State
6801 and then Has_Option (Id, Name_Input_Only);
6802 end Is_Input_Only_State;
6804 ---------------------------
6805 -- Is_Non_Volatile_State --
6806 ---------------------------
6808 function Is_Non_Volatile_State (Id : E) return B is
6811 Ekind (Id) = E_Abstract_State
6812 and then Has_Option (Id, Name_Non_Volatile);
6813 end Is_Non_Volatile_State;
6819 function Is_Null_State (Id : E) return B is
6822 Ekind (Id) = E_Abstract_State and then Nkind (Parent (Id)) = N_Null;
6825 ---------------------
6826 -- Is_Output_State --
6827 ---------------------
6829 function Is_Output_Only_State (Id : E) return B is
6832 Ekind (Id) = E_Abstract_State
6833 and then Has_Option (Id, Name_Output_Only);
6834 end Is_Output_Only_State;
6836 -----------------------------------
6837 -- Is_Package_Or_Generic_Package --
6838 -----------------------------------
6840 function Is_Package_Or_Generic_Package (Id : E) return B is
6842 return Ekind_In (Id, E_Generic_Package, E_Package);
6843 end Is_Package_Or_Generic_Package;
6849 function Is_Prival (Id : E) return B is
6851 return (Ekind_In (Id, E_Constant, E_Variable)
6852 and then Present (Prival_Link (Id)));
6855 ----------------------------
6856 -- Is_Protected_Component --
6857 ----------------------------
6859 function Is_Protected_Component (Id : E) return B is
6861 return Ekind (Id) = E_Component and then Is_Protected_Type (Scope (Id));
6862 end Is_Protected_Component;
6864 ----------------------------
6865 -- Is_Protected_Interface --
6866 ----------------------------
6868 function Is_Protected_Interface (Id : E) return B is
6869 Typ : constant Entity_Id := Base_Type (Id);
6871 if not Is_Interface (Typ) then
6873 elsif Is_Class_Wide_Type (Typ) then
6874 return Is_Protected_Interface (Etype (Typ));
6876 return Protected_Present (Type_Definition (Parent (Typ)));
6878 end Is_Protected_Interface;
6880 ------------------------------
6881 -- Is_Protected_Record_Type --
6882 ------------------------------
6884 function Is_Protected_Record_Type (Id : E) return B is
6887 Is_Concurrent_Record_Type (Id)
6888 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
6889 end Is_Protected_Record_Type;
6891 --------------------------------
6892 -- Is_Standard_Character_Type --
6893 --------------------------------
6895 function Is_Standard_Character_Type (Id : E) return B is
6897 if Is_Type (Id) then
6899 R : constant Entity_Id := Root_Type (Id);
6902 R = Standard_Character
6904 R = Standard_Wide_Character
6906 R = Standard_Wide_Wide_Character;
6912 end Is_Standard_Character_Type;
6914 --------------------
6915 -- Is_String_Type --
6916 --------------------
6918 function Is_String_Type (Id : E) return B is
6920 return Ekind (Id) in String_Kind
6921 or else (Is_Array_Type (Id)
6922 and then Id /= Any_Composite
6923 and then Number_Dimensions (Id) = 1
6924 and then Is_Character_Type (Component_Type (Id)));
6927 -------------------------------
6928 -- Is_Synchronized_Interface --
6929 -------------------------------
6931 function Is_Synchronized_Interface (Id : E) return B is
6932 Typ : constant Entity_Id := Base_Type (Id);
6935 if not Is_Interface (Typ) then
6938 elsif Is_Class_Wide_Type (Typ) then
6939 return Is_Synchronized_Interface (Etype (Typ));
6942 return Protected_Present (Type_Definition (Parent (Typ)))
6943 or else Synchronized_Present (Type_Definition (Parent (Typ)))
6944 or else Task_Present (Type_Definition (Parent (Typ)));
6946 end Is_Synchronized_Interface;
6948 -----------------------
6949 -- Is_Task_Interface --
6950 -----------------------
6952 function Is_Task_Interface (Id : E) return B is
6953 Typ : constant Entity_Id := Base_Type (Id);
6955 if not Is_Interface (Typ) then
6957 elsif Is_Class_Wide_Type (Typ) then
6958 return Is_Task_Interface (Etype (Typ));
6960 return Task_Present (Type_Definition (Parent (Typ)));
6962 end Is_Task_Interface;
6964 -------------------------
6965 -- Is_Task_Record_Type --
6966 -------------------------
6968 function Is_Task_Record_Type (Id : E) return B is
6971 Is_Concurrent_Record_Type (Id)
6972 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
6973 end Is_Task_Record_Type;
6975 ------------------------
6976 -- Is_Wrapper_Package --
6977 ------------------------
6979 function Is_Wrapper_Package (Id : E) return B is
6981 return (Ekind (Id) = E_Package and then Present (Related_Instance (Id)));
6982 end Is_Wrapper_Package;
6988 function Last_Formal (Id : E) return E is
6993 (Is_Overloadable (Id)
6994 or else Ekind_In (Id, E_Entry_Family,
6996 E_Subprogram_Type));
6998 if Ekind (Id) = E_Enumeration_Literal then
7002 Formal := First_Formal (Id);
7004 if Present (Formal) then
7005 while Present (Next_Formal (Formal)) loop
7006 Formal := Next_Formal (Formal);
7014 function Model_Emin_Value (Id : E) return Uint is
7016 return Machine_Emin_Value (Id);
7017 end Model_Emin_Value;
7019 -------------------------
7020 -- Model_Epsilon_Value --
7021 -------------------------
7023 function Model_Epsilon_Value (Id : E) return Ureal is
7024 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7026 return Radix ** (1 - Model_Mantissa_Value (Id));
7027 end Model_Epsilon_Value;
7029 --------------------------
7030 -- Model_Mantissa_Value --
7031 --------------------------
7033 function Model_Mantissa_Value (Id : E) return Uint is
7035 return Machine_Mantissa_Value (Id);
7036 end Model_Mantissa_Value;
7038 -----------------------
7039 -- Model_Small_Value --
7040 -----------------------
7042 function Model_Small_Value (Id : E) return Ureal is
7043 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7045 return Radix ** (Model_Emin_Value (Id) - 1);
7046 end Model_Small_Value;
7048 ------------------------
7049 -- Machine_Emax_Value --
7050 ------------------------
7052 function Machine_Emax_Value (Id : E) return Uint is
7053 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7056 case Float_Rep (Id) is
7059 when 1 .. 6 => return Uint_128;
7060 when 7 .. 15 => return 2**10;
7061 when 16 .. 33 => return 2**14;
7062 when others => return No_Uint;
7067 when 1 .. 9 => return 2**7 - 1;
7068 when 10 .. 15 => return 2**10 - 1;
7069 when others => return No_Uint;
7073 return Uint_2 ** Uint_7 - Uint_1;
7075 end Machine_Emax_Value;
7077 ------------------------
7078 -- Machine_Emin_Value --
7079 ------------------------
7081 function Machine_Emin_Value (Id : E) return Uint is
7083 case Float_Rep (Id) is
7084 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
7085 when VAX_Native => return -Machine_Emax_Value (Id);
7086 when AAMP => return -Machine_Emax_Value (Id);
7088 end Machine_Emin_Value;
7090 ----------------------------
7091 -- Machine_Mantissa_Value --
7092 ----------------------------
7094 function Machine_Mantissa_Value (Id : E) return Uint is
7095 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7098 case Float_Rep (Id) is
7101 when 1 .. 6 => return Uint_24;
7102 when 7 .. 15 => return UI_From_Int (53);
7103 when 16 .. 18 => return Uint_64;
7104 when 19 .. 33 => return UI_From_Int (113);
7105 when others => return No_Uint;
7110 when 1 .. 6 => return Uint_24;
7111 when 7 .. 9 => return UI_From_Int (56);
7112 when 10 .. 15 => return UI_From_Int (53);
7113 when others => return No_Uint;
7118 when 1 .. 6 => return Uint_24;
7119 when 7 .. 9 => return UI_From_Int (40);
7120 when others => return No_Uint;
7123 end Machine_Mantissa_Value;
7125 -------------------------
7126 -- Machine_Radix_Value --
7127 -------------------------
7129 function Machine_Radix_Value (Id : E) return U is
7131 case Float_Rep (Id) is
7132 when IEEE_Binary | VAX_Native | AAMP =>
7135 end Machine_Radix_Value;
7137 --------------------
7138 -- Next_Component --
7139 --------------------
7141 function Next_Component (Id : E) return E is
7145 Comp_Id := Next_Entity (Id);
7146 while Present (Comp_Id) loop
7147 exit when Ekind (Comp_Id) = E_Component;
7148 Comp_Id := Next_Entity (Comp_Id);
7154 ------------------------------------
7155 -- Next_Component_Or_Discriminant --
7156 ------------------------------------
7158 function Next_Component_Or_Discriminant (Id : E) return E is
7162 Comp_Id := Next_Entity (Id);
7163 while Present (Comp_Id) loop
7164 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
7165 Comp_Id := Next_Entity (Comp_Id);
7169 end Next_Component_Or_Discriminant;
7171 -----------------------
7172 -- Next_Discriminant --
7173 -----------------------
7175 -- This function actually implements both Next_Discriminant and
7176 -- Next_Stored_Discriminant by making sure that the Discriminant
7177 -- returned is of the same variety as Id.
7179 function Next_Discriminant (Id : E) return E is
7181 -- Derived Tagged types with private extensions look like this...
7183 -- E_Discriminant d1
7184 -- E_Discriminant d2
7186 -- E_Discriminant d1
7187 -- E_Discriminant d2
7190 -- so it is critical not to go past the leading discriminants
7195 pragma Assert (Ekind (Id) = E_Discriminant);
7198 D := Next_Entity (D);
7200 or else (Ekind (D) /= E_Discriminant
7201 and then not Is_Itype (D))
7206 exit when Ekind (D) = E_Discriminant
7207 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
7211 end Next_Discriminant;
7217 function Next_Formal (Id : E) return E is
7221 -- Follow the chain of declared entities as long as the kind of the
7222 -- entity corresponds to a formal parameter. Skip internal entities
7223 -- that may have been created for implicit subtypes, in the process
7224 -- of analyzing default expressions.
7228 P := Next_Entity (P);
7230 if No (P) or else Is_Formal (P) then
7232 elsif not Is_Internal (P) then
7238 -----------------------------
7239 -- Next_Formal_With_Extras --
7240 -----------------------------
7242 function Next_Formal_With_Extras (Id : E) return E is
7244 if Present (Extra_Formal (Id)) then
7245 return Extra_Formal (Id);
7247 return Next_Formal (Id);
7249 end Next_Formal_With_Extras;
7255 function Next_Index (Id : Node_Id) return Node_Id is
7264 function Next_Literal (Id : E) return E is
7266 pragma Assert (Nkind (Id) in N_Entity);
7270 ------------------------------
7271 -- Next_Stored_Discriminant --
7272 ------------------------------
7274 function Next_Stored_Discriminant (Id : E) return E is
7276 -- See comment in Next_Discriminant
7278 return Next_Discriminant (Id);
7279 end Next_Stored_Discriminant;
7281 -----------------------
7282 -- Number_Dimensions --
7283 -----------------------
7285 function Number_Dimensions (Id : E) return Pos is
7290 if Ekind (Id) in String_Kind then
7295 T := First_Index (Id);
7296 while Present (T) loop
7303 end Number_Dimensions;
7305 --------------------
7306 -- Number_Entries --
7307 --------------------
7309 function Number_Entries (Id : E) return Nat is
7314 pragma Assert (Is_Concurrent_Type (Id));
7317 Ent := First_Entity (Id);
7318 while Present (Ent) loop
7319 if Is_Entry (Ent) then
7323 Ent := Next_Entity (Ent);
7329 --------------------
7330 -- Number_Formals --
7331 --------------------
7333 function Number_Formals (Id : E) return Pos is
7339 Formal := First_Formal (Id);
7340 while Present (Formal) loop
7342 Formal := Next_Formal (Formal);
7348 --------------------
7349 -- Parameter_Mode --
7350 --------------------
7352 function Parameter_Mode (Id : E) return Formal_Kind is
7357 ------------------------
7358 -- Predicate_Function --
7359 ------------------------
7361 function Predicate_Function (Id : E) return E is
7366 pragma Assert (Is_Type (Id));
7368 -- If type is private and has a completion, predicate may be defined
7369 -- on the full view.
7371 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7372 T := Full_View (Id);
7377 if No (Subprograms_For_Type (T)) then
7381 S := Subprograms_For_Type (T);
7382 while Present (S) loop
7383 if Is_Predicate_Function (S) then
7386 S := Subprograms_For_Type (S);
7392 end Predicate_Function;
7394 --------------------------
7395 -- Predicate_Function_M --
7396 --------------------------
7398 function Predicate_Function_M (Id : E) return E is
7403 pragma Assert (Is_Type (Id));
7405 -- If type is private and has a completion, predicate may be defined
7406 -- on the full view.
7408 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7409 T := Full_View (Id);
7414 if No (Subprograms_For_Type (T)) then
7418 S := Subprograms_For_Type (T);
7419 while Present (S) loop
7420 if Is_Predicate_Function_M (S) then
7423 S := Subprograms_For_Type (S);
7429 end Predicate_Function_M;
7431 -------------------------
7432 -- Present_In_Rep_Item --
7433 -------------------------
7435 function Present_In_Rep_Item (E : Entity_Id; N : Node_Id) return Boolean is
7439 Ritem := First_Rep_Item (E);
7441 while Present (Ritem) loop
7446 Next_Rep_Item (Ritem);
7450 end Present_In_Rep_Item;
7452 --------------------------
7453 -- Primitive_Operations --
7454 --------------------------
7456 function Primitive_Operations (Id : E) return L is
7458 if Is_Concurrent_Type (Id) then
7459 if Present (Corresponding_Record_Type (Id)) then
7460 return Direct_Primitive_Operations
7461 (Corresponding_Record_Type (Id));
7463 -- If expansion is disabled the corresponding record type is absent,
7464 -- but if the type has ancestors it may have primitive operations.
7466 elsif Is_Tagged_Type (Id) then
7467 return Direct_Primitive_Operations (Id);
7473 return Direct_Primitive_Operations (Id);
7475 end Primitive_Operations;
7477 ---------------------
7478 -- Record_Rep_Item --
7479 ---------------------
7481 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
7483 Set_Next_Rep_Item (N, First_Rep_Item (E));
7484 Set_First_Rep_Item (E, N);
7485 end Record_Rep_Item;
7491 function Root_Type (Id : E) return E is
7495 pragma Assert (Nkind (Id) in N_Entity);
7497 T := Base_Type (Id);
7499 if Ekind (T) = E_Class_Wide_Type then
7511 -- Following test catches some error cases resulting from
7514 elsif No (Etyp) then
7515 Check_Error_Detected;
7518 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
7521 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
7527 -- Return if there is a circularity in the inheritance chain. This
7528 -- happens in some error situations and we do not want to get
7529 -- stuck in this loop.
7531 if T = Base_Type (Id) then
7538 ---------------------
7539 -- Safe_Emax_Value --
7540 ---------------------
7542 function Safe_Emax_Value (Id : E) return Uint is
7544 return Machine_Emax_Value (Id);
7545 end Safe_Emax_Value;
7547 ----------------------
7548 -- Safe_First_Value --
7549 ----------------------
7551 function Safe_First_Value (Id : E) return Ureal is
7553 return -Safe_Last_Value (Id);
7554 end Safe_First_Value;
7556 ---------------------
7557 -- Safe_Last_Value --
7558 ---------------------
7560 function Safe_Last_Value (Id : E) return Ureal is
7561 Radix : constant Uint := Machine_Radix_Value (Id);
7562 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
7563 Emax : constant Uint := Safe_Emax_Value (Id);
7564 Significand : constant Uint := Radix ** Mantissa - 1;
7565 Exponent : constant Uint := Emax - Mantissa;
7571 (Num => Significand * 2 ** (Exponent mod 4),
7572 Den => -Exponent / 4,
7578 (Num => Significand,
7582 end Safe_Last_Value;
7588 function Scope_Depth (Id : E) return Uint is
7593 while Is_Record_Type (Scop) loop
7594 Scop := Scope (Scop);
7597 return Scope_Depth_Value (Scop);
7600 ---------------------
7601 -- Scope_Depth_Set --
7602 ---------------------
7604 function Scope_Depth_Set (Id : E) return B is
7606 return not Is_Record_Type (Id)
7607 and then Field22 (Id) /= Union_Id (Empty);
7608 end Scope_Depth_Set;
7610 -----------------------------
7611 -- Set_Component_Alignment --
7612 -----------------------------
7614 -- Component Alignment is encoded using two flags, Flag128/129 as
7615 -- follows. Note that both flags False = Align_Default, so that the
7616 -- default initialization of flags to False initializes component
7617 -- alignment to the default value as required.
7619 -- Flag128 Flag129 Value
7620 -- ------- ------- -----
7621 -- False False Calign_Default
7622 -- False True Calign_Component_Size
7623 -- True False Calign_Component_Size_4
7624 -- True True Calign_Storage_Unit
7626 procedure Set_Component_Alignment (Id : E; V : C) is
7628 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
7629 and then Is_Base_Type (Id));
7632 when Calign_Default =>
7633 Set_Flag128 (Id, False);
7634 Set_Flag129 (Id, False);
7636 when Calign_Component_Size =>
7637 Set_Flag128 (Id, False);
7638 Set_Flag129 (Id, True);
7640 when Calign_Component_Size_4 =>
7641 Set_Flag128 (Id, True);
7642 Set_Flag129 (Id, False);
7644 when Calign_Storage_Unit =>
7645 Set_Flag128 (Id, True);
7646 Set_Flag129 (Id, True);
7648 end Set_Component_Alignment;
7650 -----------------------------
7651 -- Set_Invariant_Procedure --
7652 -----------------------------
7654 procedure Set_Invariant_Procedure (Id : E; V : E) is
7658 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7660 S := Subprograms_For_Type (Id);
7661 Set_Subprograms_For_Type (Id, V);
7662 Set_Subprograms_For_Type (V, S);
7664 -- Check for duplicate entry
7666 while Present (S) loop
7667 if Is_Invariant_Procedure (S) then
7668 raise Program_Error;
7670 S := Subprograms_For_Type (S);
7673 end Set_Invariant_Procedure;
7675 ----------------------------
7676 -- Set_Predicate_Function --
7677 ----------------------------
7679 procedure Set_Predicate_Function (Id : E; V : E) is
7683 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7685 S := Subprograms_For_Type (Id);
7686 Set_Subprograms_For_Type (Id, V);
7687 Set_Subprograms_For_Type (V, S);
7689 while Present (S) loop
7690 if Is_Predicate_Function (S) then
7691 raise Program_Error;
7693 S := Subprograms_For_Type (S);
7696 end Set_Predicate_Function;
7698 ------------------------------
7699 -- Set_Predicate_Function_M --
7700 ------------------------------
7702 procedure Set_Predicate_Function_M (Id : E; V : E) is
7706 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7708 S := Subprograms_For_Type (Id);
7709 Set_Subprograms_For_Type (Id, V);
7710 Set_Subprograms_For_Type (V, S);
7712 -- Check for duplicates
7714 while Present (S) loop
7715 if Is_Predicate_Function_M (S) then
7716 raise Program_Error;
7718 S := Subprograms_For_Type (S);
7721 end Set_Predicate_Function_M;
7727 function Size_Clause (Id : E) return N is
7729 return Get_Attribute_Definition_Clause (Id, Attribute_Size);
7732 ------------------------
7733 -- Stream_Size_Clause --
7734 ------------------------
7736 function Stream_Size_Clause (Id : E) return N is
7738 return Get_Attribute_Definition_Clause (Id, Attribute_Stream_Size);
7739 end Stream_Size_Clause;
7745 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
7751 Kind := E_Access_Subtype;
7755 Kind := E_Array_Subtype;
7757 when E_Class_Wide_Type |
7758 E_Class_Wide_Subtype =>
7759 Kind := E_Class_Wide_Subtype;
7761 when E_Decimal_Fixed_Point_Type |
7762 E_Decimal_Fixed_Point_Subtype =>
7763 Kind := E_Decimal_Fixed_Point_Subtype;
7765 when E_Ordinary_Fixed_Point_Type |
7766 E_Ordinary_Fixed_Point_Subtype =>
7767 Kind := E_Ordinary_Fixed_Point_Subtype;
7769 when E_Private_Type |
7770 E_Private_Subtype =>
7771 Kind := E_Private_Subtype;
7773 when E_Limited_Private_Type |
7774 E_Limited_Private_Subtype =>
7775 Kind := E_Limited_Private_Subtype;
7777 when E_Record_Type_With_Private |
7778 E_Record_Subtype_With_Private =>
7779 Kind := E_Record_Subtype_With_Private;
7781 when E_Record_Type |
7783 Kind := E_Record_Subtype;
7785 when E_String_Type |
7787 Kind := E_String_Subtype;
7789 when Enumeration_Kind =>
7790 Kind := E_Enumeration_Subtype;
7793 Kind := E_Floating_Point_Subtype;
7795 when Signed_Integer_Kind =>
7796 Kind := E_Signed_Integer_Subtype;
7798 when Modular_Integer_Kind =>
7799 Kind := E_Modular_Integer_Subtype;
7801 when Protected_Kind =>
7802 Kind := E_Protected_Subtype;
7805 Kind := E_Task_Subtype;
7809 raise Program_Error;
7815 ---------------------
7816 -- Type_High_Bound --
7817 ---------------------
7819 function Type_High_Bound (Id : E) return Node_Id is
7820 Rng : constant Node_Id := Scalar_Range (Id);
7822 if Nkind (Rng) = N_Subtype_Indication then
7823 return High_Bound (Range_Expression (Constraint (Rng)));
7825 return High_Bound (Rng);
7827 end Type_High_Bound;
7829 --------------------
7830 -- Type_Low_Bound --
7831 --------------------
7833 function Type_Low_Bound (Id : E) return Node_Id is
7834 Rng : constant Node_Id := Scalar_Range (Id);
7836 if Nkind (Rng) = N_Subtype_Indication then
7837 return Low_Bound (Range_Expression (Constraint (Rng)));
7839 return Low_Bound (Rng);
7843 ---------------------
7844 -- Underlying_Type --
7845 ---------------------
7847 function Underlying_Type (Id : E) return E is
7849 -- For record_with_private the underlying type is always the direct
7850 -- full view. Never try to take the full view of the parent it
7851 -- doesn't make sense.
7853 if Ekind (Id) = E_Record_Type_With_Private then
7854 return Full_View (Id);
7856 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
7858 -- If we have an incomplete or private type with a full view,
7859 -- then we return the Underlying_Type of this full view
7861 if Present (Full_View (Id)) then
7862 if Id = Full_View (Id) then
7864 -- Previous error in declaration
7869 return Underlying_Type (Full_View (Id));
7872 -- If we have an incomplete entity that comes from the limited
7873 -- view then we return the Underlying_Type of its non-limited
7876 elsif From_With_Type (Id)
7877 and then Present (Non_Limited_View (Id))
7879 return Underlying_Type (Non_Limited_View (Id));
7881 -- Otherwise check for the case where we have a derived type or
7882 -- subtype, and if so get the Underlying_Type of the parent type.
7884 elsif Etype (Id) /= Id then
7885 return Underlying_Type (Etype (Id));
7887 -- Otherwise we have an incomplete or private type that has
7888 -- no full view, which means that we have not encountered the
7889 -- completion, so return Empty to indicate the underlying type
7890 -- is not yet known.
7896 -- For non-incomplete, non-private types, return the type itself
7897 -- Also for entities that are not types at all return the entity
7903 end Underlying_Type;
7909 function Vax_Float (Id : E) return B is
7911 return Is_Floating_Point_Type (Id) and then Float_Rep (Id) = VAX_Native;
7914 ------------------------
7915 -- Write_Entity_Flags --
7916 ------------------------
7918 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
7920 procedure W (Flag_Name : String; Flag : Boolean);
7921 -- Write out given flag if it is set
7927 procedure W (Flag_Name : String; Flag : Boolean) is
7931 Write_Str (Flag_Name);
7932 Write_Str (" = True");
7937 -- Start of processing for Write_Entity_Flags
7940 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
7941 and then Is_Base_Type (Id)
7944 Write_Str ("Component_Alignment = ");
7946 case Component_Alignment (Id) is
7947 when Calign_Default =>
7948 Write_Str ("Calign_Default");
7950 when Calign_Component_Size =>
7951 Write_Str ("Calign_Component_Size");
7953 when Calign_Component_Size_4 =>
7954 Write_Str ("Calign_Component_Size_4");
7956 when Calign_Storage_Unit =>
7957 Write_Str ("Calign_Storage_Unit");
7963 W ("Address_Taken", Flag104 (Id));
7964 W ("Body_Needed_For_SAL", Flag40 (Id));
7965 W ("C_Pass_By_Copy", Flag125 (Id));
7966 W ("Can_Never_Be_Null", Flag38 (Id));
7967 W ("Checks_May_Be_Suppressed", Flag31 (Id));
7968 W ("Debug_Info_Off", Flag166 (Id));
7969 W ("Default_Expressions_Processed", Flag108 (Id));
7970 W ("Delay_Cleanups", Flag114 (Id));
7971 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
7972 W ("Depends_On_Private", Flag14 (Id));
7973 W ("Discard_Names", Flag88 (Id));
7974 W ("Elaboration_Entity_Required", Flag174 (Id));
7975 W ("Elaborate_Body_Desirable", Flag210 (Id));
7976 W ("Entry_Accepted", Flag152 (Id));
7977 W ("Can_Use_Internal_Rep", Flag229 (Id));
7978 W ("Finalize_Storage_Only", Flag158 (Id));
7979 W ("From_With_Type", Flag159 (Id));
7980 W ("Has_Aliased_Components", Flag135 (Id));
7981 W ("Has_Alignment_Clause", Flag46 (Id));
7982 W ("Has_All_Calls_Remote", Flag79 (Id));
7983 W ("Has_Anonymous_Master", Flag253 (Id));
7984 W ("Has_Atomic_Components", Flag86 (Id));
7985 W ("Has_Biased_Representation", Flag139 (Id));
7986 W ("Has_Completion", Flag26 (Id));
7987 W ("Has_Completion_In_Body", Flag71 (Id));
7988 W ("Has_Complex_Representation", Flag140 (Id));
7989 W ("Has_Component_Size_Clause", Flag68 (Id));
7990 W ("Has_Contiguous_Rep", Flag181 (Id));
7991 W ("Has_Controlled_Component", Flag43 (Id));
7992 W ("Has_Controlling_Result", Flag98 (Id));
7993 W ("Has_Convention_Pragma", Flag119 (Id));
7994 W ("Has_Default_Aspect", Flag39 (Id));
7995 W ("Has_Delayed_Aspects", Flag200 (Id));
7996 W ("Has_Delayed_Freeze", Flag18 (Id));
7997 W ("Has_Delayed_Rep_Aspects", Flag261 (Id));
7998 W ("Has_Discriminants", Flag5 (Id));
7999 W ("Has_Dispatch_Table", Flag220 (Id));
8000 W ("Has_Dynamic_Predicate_Aspect", Flag258 (Id));
8001 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
8002 W ("Has_Exit", Flag47 (Id));
8003 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
8004 W ("Has_Forward_Instantiation", Flag175 (Id));
8005 W ("Has_Fully_Qualified_Name", Flag173 (Id));
8006 W ("Has_Gigi_Rep_Item", Flag82 (Id));
8007 W ("Has_Homonym", Flag56 (Id));
8008 W ("Has_Implicit_Dereference", Flag251 (Id));
8009 W ("Has_Inheritable_Invariants", Flag248 (Id));
8010 W ("Has_Initial_Value", Flag219 (Id));
8011 W ("Has_Invariants", Flag232 (Id));
8012 W ("Has_Loop_Entry_Attributes", Flag260 (Id));
8013 W ("Has_Machine_Radix_Clause", Flag83 (Id));
8014 W ("Has_Master_Entity", Flag21 (Id));
8015 W ("Has_Missing_Return", Flag142 (Id));
8016 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
8017 W ("Has_Non_Standard_Rep", Flag75 (Id));
8018 W ("Has_Object_Size_Clause", Flag172 (Id));
8019 W ("Has_Per_Object_Constraint", Flag154 (Id));
8020 W ("Has_Postconditions", Flag240 (Id));
8021 W ("Has_Pragma_Controlled", Flag27 (Id));
8022 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
8023 W ("Has_Pragma_Inline", Flag157 (Id));
8024 W ("Has_Pragma_Inline_Always", Flag230 (Id));
8025 W ("Has_Pragma_No_Inline", Flag201 (Id));
8026 W ("Has_Pragma_Ordered", Flag198 (Id));
8027 W ("Has_Pragma_Pack", Flag121 (Id));
8028 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
8029 W ("Has_Pragma_Pure", Flag203 (Id));
8030 W ("Has_Pragma_Pure_Function", Flag179 (Id));
8031 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
8032 W ("Has_Pragma_Unmodified", Flag233 (Id));
8033 W ("Has_Pragma_Unreferenced", Flag180 (Id));
8034 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
8035 W ("Has_Predicates", Flag250 (Id));
8036 W ("Has_Primitive_Operations", Flag120 (Id));
8037 W ("Has_Private_Ancestor", Flag151 (Id));
8038 W ("Has_Private_Declaration", Flag155 (Id));
8039 W ("Has_Qualified_Name", Flag161 (Id));
8040 W ("Has_RACW", Flag214 (Id));
8041 W ("Has_Record_Rep_Clause", Flag65 (Id));
8042 W ("Has_Recursive_Call", Flag143 (Id));
8043 W ("Has_Size_Clause", Flag29 (Id));
8044 W ("Has_Small_Clause", Flag67 (Id));
8045 W ("Has_Specified_Layout", Flag100 (Id));
8046 W ("Has_Specified_Stream_Input", Flag190 (Id));
8047 W ("Has_Specified_Stream_Output", Flag191 (Id));
8048 W ("Has_Specified_Stream_Read", Flag192 (Id));
8049 W ("Has_Specified_Stream_Write", Flag193 (Id));
8050 W ("Has_Static_Discriminants", Flag211 (Id));
8051 W ("Has_Static_Predicate_Aspect", Flag259 (Id));
8052 W ("Has_Storage_Size_Clause", Flag23 (Id));
8053 W ("Has_Stream_Size_Clause", Flag184 (Id));
8054 W ("Has_Task", Flag30 (Id));
8055 W ("Has_Thunks", Flag228 (Id));
8056 W ("Has_Unchecked_Union", Flag123 (Id));
8057 W ("Has_Unknown_Discriminants", Flag72 (Id));
8058 W ("Has_Up_Level_Access", Flag215 (Id));
8059 W ("Has_Visible_Refinement", Flag263 (Id));
8060 W ("Has_Volatile_Components", Flag87 (Id));
8061 W ("Has_Xref_Entry", Flag182 (Id));
8062 W ("In_Package_Body", Flag48 (Id));
8063 W ("In_Private_Part", Flag45 (Id));
8064 W ("In_Use", Flag8 (Id));
8065 W ("Is_AST_Entry", Flag132 (Id));
8066 W ("Is_Abstract_Subprogram", Flag19 (Id));
8067 W ("Is_Abstract_Type", Flag146 (Id));
8068 W ("Is_Local_Anonymous_Access", Flag194 (Id));
8069 W ("Is_Access_Constant", Flag69 (Id));
8070 W ("Is_Ada_2005_Only", Flag185 (Id));
8071 W ("Is_Ada_2012_Only", Flag199 (Id));
8072 W ("Is_Aliased", Flag15 (Id));
8073 W ("Is_Asynchronous", Flag81 (Id));
8074 W ("Is_Atomic", Flag85 (Id));
8075 W ("Is_Bit_Packed_Array", Flag122 (Id));
8076 W ("Is_CPP_Class", Flag74 (Id));
8077 W ("Is_Called", Flag102 (Id));
8078 W ("Is_Character_Type", Flag63 (Id));
8079 W ("Is_Child_Unit", Flag73 (Id));
8080 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
8081 W ("Is_Compilation_Unit", Flag149 (Id));
8082 W ("Is_Completely_Hidden", Flag103 (Id));
8083 W ("Is_Concurrent_Record_Type", Flag20 (Id));
8084 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
8085 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
8086 W ("Is_Constrained", Flag12 (Id));
8087 W ("Is_Constructor", Flag76 (Id));
8088 W ("Is_Controlled", Flag42 (Id));
8089 W ("Is_Controlling_Formal", Flag97 (Id));
8090 W ("Is_Descendent_Of_Address", Flag223 (Id));
8091 W ("Is_Discrim_SO_Function", Flag176 (Id));
8092 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
8093 W ("Is_Dispatching_Operation", Flag6 (Id));
8094 W ("Is_Eliminated", Flag124 (Id));
8095 W ("Is_Entry_Formal", Flag52 (Id));
8096 W ("Is_Exported", Flag99 (Id));
8097 W ("Is_First_Subtype", Flag70 (Id));
8098 W ("Is_For_Access_Subtype", Flag118 (Id));
8099 W ("Is_Formal_Subprogram", Flag111 (Id));
8100 W ("Is_Frozen", Flag4 (Id));
8101 W ("Is_Generic_Actual_Type", Flag94 (Id));
8102 W ("Is_Generic_Instance", Flag130 (Id));
8103 W ("Is_Generic_Type", Flag13 (Id));
8104 W ("Is_Hidden", Flag57 (Id));
8105 W ("Is_Hidden_Open_Scope", Flag171 (Id));
8106 W ("Is_Immediately_Visible", Flag7 (Id));
8107 W ("Is_Implementation_Defined", Flag254 (Id));
8108 W ("Is_Imported", Flag24 (Id));
8109 W ("Is_Inlined", Flag11 (Id));
8110 W ("Is_Instantiated", Flag126 (Id));
8111 W ("Is_Interface", Flag186 (Id));
8112 W ("Is_Internal", Flag17 (Id));
8113 W ("Is_Interrupt_Handler", Flag89 (Id));
8114 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
8115 W ("Is_Invariant_Procedure", Flag257 (Id));
8116 W ("Is_Itype", Flag91 (Id));
8117 W ("Is_Known_Non_Null", Flag37 (Id));
8118 W ("Is_Known_Null", Flag204 (Id));
8119 W ("Is_Known_Valid", Flag170 (Id));
8120 W ("Is_Limited_Composite", Flag106 (Id));
8121 W ("Is_Limited_Interface", Flag197 (Id));
8122 W ("Is_Limited_Record", Flag25 (Id));
8123 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
8124 W ("Is_Non_Static_Subtype", Flag109 (Id));
8125 W ("Is_Null_Init_Proc", Flag178 (Id));
8126 W ("Is_Obsolescent", Flag153 (Id));
8127 W ("Is_Only_Out_Parameter", Flag226 (Id));
8128 W ("Is_Optional_Parameter", Flag134 (Id));
8129 W ("Is_Package_Body_Entity", Flag160 (Id));
8130 W ("Is_Packed", Flag51 (Id));
8131 W ("Is_Packed_Array_Type", Flag138 (Id));
8132 W ("Is_Potentially_Use_Visible", Flag9 (Id));
8133 W ("Is_Predicate_Function", Flag255 (Id));
8134 W ("Is_Predicate_Function_M", Flag256 (Id));
8135 W ("Is_Preelaborated", Flag59 (Id));
8136 W ("Is_Primitive", Flag218 (Id));
8137 W ("Is_Primitive_Wrapper", Flag195 (Id));
8138 W ("Is_Private_Composite", Flag107 (Id));
8139 W ("Is_Private_Descendant", Flag53 (Id));
8140 W ("Is_Private_Primitive", Flag245 (Id));
8141 W ("Is_Processed_Transient", Flag252 (Id));
8142 W ("Is_Public", Flag10 (Id));
8143 W ("Is_Pure", Flag44 (Id));
8144 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
8145 W ("Is_RACW_Stub_Type", Flag244 (Id));
8146 W ("Is_Raised", Flag224 (Id));
8147 W ("Is_Remote_Call_Interface", Flag62 (Id));
8148 W ("Is_Remote_Types", Flag61 (Id));
8149 W ("Is_Renaming_Of_Object", Flag112 (Id));
8150 W ("Is_Return_Object", Flag209 (Id));
8151 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
8152 W ("Is_Shared_Passive", Flag60 (Id));
8153 W ("Is_Statically_Allocated", Flag28 (Id));
8154 W ("Is_Tag", Flag78 (Id));
8155 W ("Is_Tagged_Type", Flag55 (Id));
8156 W ("Is_Thunk", Flag225 (Id));
8157 W ("Is_Trivial_Subprogram", Flag235 (Id));
8158 W ("Is_True_Constant", Flag163 (Id));
8159 W ("Is_Unchecked_Union", Flag117 (Id));
8160 W ("Is_Underlying_Record_View", Flag246 (Id));
8161 W ("Is_Unsigned_Type", Flag144 (Id));
8162 W ("Is_VMS_Exception", Flag133 (Id));
8163 W ("Is_Valued_Procedure", Flag127 (Id));
8164 W ("Is_Visible_Formal", Flag206 (Id));
8165 W ("Is_Visible_Lib_Unit", Flag116 (Id));
8166 W ("Is_Volatile", Flag16 (Id));
8167 W ("Itype_Printed", Flag202 (Id));
8168 W ("Kill_Elaboration_Checks", Flag32 (Id));
8169 W ("Kill_Range_Checks", Flag33 (Id));
8170 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
8171 W ("Low_Bound_Tested", Flag205 (Id));
8172 W ("Machine_Radix_10", Flag84 (Id));
8173 W ("Materialize_Entity", Flag168 (Id));
8174 W ("May_Inherit_Delayed_Rep_Aspects", Flag262 (Id));
8175 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
8176 W ("Must_Have_Preelab_Init", Flag208 (Id));
8177 W ("Needs_Debug_Info", Flag147 (Id));
8178 W ("Needs_No_Actuals", Flag22 (Id));
8179 W ("Never_Set_In_Source", Flag115 (Id));
8180 W ("No_Pool_Assigned", Flag131 (Id));
8181 W ("No_Return", Flag113 (Id));
8182 W ("No_Strict_Aliasing", Flag136 (Id));
8183 W ("Non_Binary_Modulus", Flag58 (Id));
8184 W ("Nonzero_Is_True", Flag162 (Id));
8185 W ("OK_To_Rename", Flag247 (Id));
8186 W ("OK_To_Reorder_Components", Flag239 (Id));
8187 W ("Optimize_Alignment_Space", Flag241 (Id));
8188 W ("Optimize_Alignment_Time", Flag242 (Id));
8189 W ("Overlays_Constant", Flag243 (Id));
8190 W ("Reachable", Flag49 (Id));
8191 W ("Referenced", Flag156 (Id));
8192 W ("Referenced_As_LHS", Flag36 (Id));
8193 W ("Referenced_As_Out_Parameter", Flag227 (Id));
8194 W ("Renamed_In_Spec", Flag231 (Id));
8195 W ("Requires_Overriding", Flag213 (Id));
8196 W ("Return_Present", Flag54 (Id));
8197 W ("Returns_By_Ref", Flag90 (Id));
8198 W ("Reverse_Bit_Order", Flag164 (Id));
8199 W ("Reverse_Storage_Order", Flag93 (Id));
8200 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
8201 W ("Size_Depends_On_Discriminant", Flag177 (Id));
8202 W ("Size_Known_At_Compile_Time", Flag92 (Id));
8203 W ("Static_Elaboration_Desired", Flag77 (Id));
8204 W ("Strict_Alignment", Flag145 (Id));
8205 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
8206 W ("Suppress_Initialization", Flag105 (Id));
8207 W ("Suppress_Style_Checks", Flag165 (Id));
8208 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
8209 W ("Treat_As_Volatile", Flag41 (Id));
8210 W ("Universal_Aliasing", Flag216 (Id));
8211 W ("Used_As_Generic_Actual", Flag222 (Id));
8212 W ("Uses_Sec_Stack", Flag95 (Id));
8213 W ("Warnings_Off", Flag96 (Id));
8214 W ("Warnings_Off_Used", Flag236 (Id));
8215 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
8216 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
8217 W ("Was_Hidden", Flag196 (Id));
8218 end Write_Entity_Flags;
8220 -----------------------
8221 -- Write_Entity_Info --
8222 -----------------------
8224 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
8226 procedure Write_Attribute (Which : String; Nam : E);
8227 -- Write attribute value with given string name
8229 procedure Write_Kind (Id : Entity_Id);
8230 -- Write Ekind field of entity
8232 ---------------------
8233 -- Write_Attribute --
8234 ---------------------
8236 procedure Write_Attribute (Which : String; Nam : E) is
8240 Write_Int (Int (Nam));
8242 Write_Name (Chars (Nam));
8244 end Write_Attribute;
8250 procedure Write_Kind (Id : Entity_Id) is
8251 K : constant String := Entity_Kind'Image (Ekind (Id));
8255 Write_Str (" Kind ");
8257 if Is_Type (Id) and then Is_Tagged_Type (Id) then
8258 Write_Str ("TAGGED ");
8261 Write_Str (K (3 .. K'Length));
8264 if Is_Type (Id) and then Depends_On_Private (Id) then
8265 Write_Str ("Depends_On_Private ");
8269 -- Start of processing for Write_Entity_Info
8273 Write_Attribute ("Name ", Id);
8274 Write_Int (Int (Id));
8278 Write_Attribute (" Type ", Etype (Id));
8280 Write_Attribute (" Scope ", Scope (Id));
8285 when Discrete_Kind =>
8286 Write_Str ("Bounds: Id = ");
8288 if Present (Scalar_Range (Id)) then
8289 Write_Int (Int (Type_Low_Bound (Id)));
8290 Write_Str (" .. Id = ");
8291 Write_Int (Int (Type_High_Bound (Id)));
8293 Write_Str ("Empty");
8304 (" Component Type ", Component_Type (Id));
8307 Write_Str (" Indexes ");
8309 Index := First_Index (Id);
8310 while Present (Index) loop
8311 Write_Attribute (" ", Etype (Index));
8312 Index := Next_Index (Index);
8320 (" Directly Designated Type ",
8321 Directly_Designated_Type (Id));
8324 when Overloadable_Kind =>
8325 if Present (Homonym (Id)) then
8326 Write_Str (" Homonym ");
8327 Write_Name (Chars (Homonym (Id)));
8329 Write_Int (Int (Homonym (Id)));
8336 if Ekind (Scope (Id)) in Record_Kind then
8338 " Original_Record_Component ",
8339 Original_Record_Component (Id));
8340 Write_Int (Int (Original_Record_Component (Id)));
8344 when others => null;
8346 end Write_Entity_Info;
8348 -----------------------
8349 -- Write_Field6_Name --
8350 -----------------------
8352 procedure Write_Field6_Name (Id : Entity_Id) is
8353 pragma Warnings (Off, Id);
8355 Write_Str ("First_Rep_Item");
8356 end Write_Field6_Name;
8358 -----------------------
8359 -- Write_Field7_Name --
8360 -----------------------
8362 procedure Write_Field7_Name (Id : Entity_Id) is
8363 pragma Warnings (Off, Id);
8365 Write_Str ("Freeze_Node");
8366 end Write_Field7_Name;
8368 -----------------------
8369 -- Write_Field8_Name --
8370 -----------------------
8372 procedure Write_Field8_Name (Id : Entity_Id) is
8376 Write_Str ("Associated_Node_For_Itype");
8379 Write_Str ("Dependent_Instances");
8382 Write_Str ("First_Exit_Statement");
8385 Write_Str ("Hiding_Loop_Variable");
8389 E_Subprogram_Body =>
8390 Write_Str ("Mechanism");
8394 Write_Str ("Normalized_First_Bit");
8397 Write_Str ("Postcondition_Proc");
8399 when E_Abstract_State =>
8400 Write_Str ("Refinement_Constituents");
8402 when E_Return_Statement =>
8403 Write_Str ("Return_Applies_To");
8406 Write_Str ("Field8??");
8408 end Write_Field8_Name;
8410 -----------------------
8411 -- Write_Field9_Name --
8412 -----------------------
8414 procedure Write_Field9_Name (Id : Entity_Id) is
8418 Write_Str ("Class_Wide_Type");
8421 Write_Str ("Current_Value");
8424 E_Generic_Function |
8426 E_Generic_Procedure |
8429 Write_Str ("Renaming_Map");
8432 Write_Str ("Field9??");
8434 end Write_Field9_Name;
8436 ------------------------
8437 -- Write_Field10_Name --
8438 ------------------------
8440 procedure Write_Field10_Name (Id : Entity_Id) is
8443 when Class_Wide_Kind |
8449 Write_Str ("Direct_Primitive_Operations");
8452 Write_Str ("Float_Rep");
8454 when E_In_Parameter |
8456 Write_Str ("Discriminal_Link");
8462 Write_Str ("Handler_Records");
8466 Write_Str ("Normalized_Position_Max");
8468 when E_Abstract_State |
8470 Write_Str ("Refined_State");
8473 Write_Str ("Field10??");
8475 end Write_Field10_Name;
8477 ------------------------
8478 -- Write_Field11_Name --
8479 ------------------------
8481 procedure Write_Field11_Name (Id : Entity_Id) is
8485 Write_Str ("Block_Node");
8489 Write_Str ("Component_Bit_Offset");
8492 Write_Str ("Entry_Component");
8494 when E_Enumeration_Literal =>
8495 Write_Str ("Enumeration_Pos");
8499 Write_Str ("Full_View");
8501 when E_Generic_Package =>
8502 Write_Str ("Generic_Homonym");
8508 Write_Str ("Protected_Body_Subprogram");
8511 Write_Str ("Field11??");
8513 end Write_Field11_Name;
8515 ------------------------
8516 -- Write_Field12_Name --
8517 ------------------------
8519 procedure Write_Field12_Name (Id : Entity_Id) is
8523 Write_Str ("Associated_Formal_Package");
8526 Write_Str ("Barrier_Function");
8528 when E_Enumeration_Literal =>
8529 Write_Str ("Enumeration_Rep");
8537 E_In_Out_Parameter |
8541 Write_Str ("Esize");
8545 Write_Str ("Next_Inlined_Subprogram");
8548 Write_Str ("Field12??");
8550 end Write_Field12_Name;
8552 ------------------------
8553 -- Write_Field13_Name --
8554 ------------------------
8556 procedure Write_Field13_Name (Id : Entity_Id) is
8561 Write_Str ("Component_Clause");
8564 Write_Str ("Elaboration_Entity");
8568 Generic_Unit_Kind =>
8569 Write_Str ("Elaboration_Entity");
8573 Write_Str ("Extra_Accessibility");
8576 Write_Str ("RM_Size");
8579 Write_Str ("Field13??");
8581 end Write_Field13_Name;
8583 -----------------------
8584 -- Write_Field14_Name --
8585 -----------------------
8587 procedure Write_Field14_Name (Id : Entity_Id) is
8596 Write_Str ("Alignment");
8600 Write_Str ("First_Optional_Parameter");
8604 Write_Str ("Normalized_Position");
8607 E_Generic_Package =>
8608 Write_Str ("Shadow_Entities");
8611 Write_Str ("Field14??");
8613 end Write_Field14_Name;
8615 ------------------------
8616 -- Write_Field15_Name --
8617 ------------------------
8619 procedure Write_Field15_Name (Id : Entity_Id) is
8622 when E_Discriminant =>
8623 Write_Str ("Discriminant_Number");
8626 Write_Str ("DT_Entry_Count");
8630 Write_Str ("DT_Position");
8632 when E_Protected_Type =>
8633 Write_Str ("Entry_Bodies_Array");
8636 Write_Str ("Entry_Parameters_Type");
8639 Write_Str ("Extra_Formal");
8641 when Enumeration_Kind =>
8642 Write_Str ("Lit_Indexes");
8646 Write_Str ("Related_Instance");
8648 when Decimal_Fixed_Point_Kind =>
8649 Write_Str ("Scale_Value");
8653 Write_Str ("Status_Flag_Or_Transient_Decl");
8657 Write_Str ("Storage_Size_Variable");
8659 when E_String_Literal_Subtype =>
8660 Write_Str ("String_Literal_Low_Bound");
8663 Write_Str ("Field15??");
8665 end Write_Field15_Name;
8667 ------------------------
8668 -- Write_Field16_Name --
8669 ------------------------
8671 procedure Write_Field16_Name (Id : Entity_Id) is
8674 when E_Record_Type |
8675 E_Record_Type_With_Private =>
8676 Write_Str ("Access_Disp_Table");
8678 when E_Record_Subtype |
8679 E_Class_Wide_Subtype =>
8680 Write_Str ("Cloned_Subtype");
8684 Write_Str ("DTC_Entity");
8687 Write_Str ("Entry_Formal");
8692 Write_Str ("First_Private_Entity");
8694 when Enumeration_Kind =>
8695 Write_Str ("Lit_Strings");
8697 when E_String_Literal_Subtype =>
8698 Write_Str ("String_Literal_Length");
8702 Write_Str ("Unset_Reference");
8705 Write_Str ("Field16??");
8707 end Write_Field16_Name;
8709 ------------------------
8710 -- Write_Field17_Name --
8711 ------------------------
8713 procedure Write_Field17_Name (Id : Entity_Id) is
8718 E_Generic_In_Out_Parameter |
8720 Write_Str ("Actual_Subtype");
8723 Write_Str ("Digits_Value");
8725 when E_Discriminant =>
8726 Write_Str ("Discriminal");
8735 E_Generic_Function |
8737 E_Generic_Procedure |
8745 E_Return_Statement |
8747 E_Subprogram_Type =>
8748 Write_Str ("First_Entity");
8751 Write_Str ("First_Index");
8753 when Enumeration_Kind =>
8754 Write_Str ("First_Literal");
8757 Write_Str ("Master_Id");
8759 when Modular_Integer_Kind =>
8760 Write_Str ("Modulus");
8762 when E_Incomplete_Type =>
8763 Write_Str ("Non_Limited_View");
8765 when E_Incomplete_Subtype =>
8766 if From_With_Type (Id) then
8767 Write_Str ("Non_Limited_View");
8771 Write_Str ("Prival");
8774 Write_Str ("Field17??");
8776 end Write_Field17_Name;
8778 ------------------------
8779 -- Write_Field18_Name --
8780 ------------------------
8782 procedure Write_Field18_Name (Id : Entity_Id) is
8785 when E_Enumeration_Literal |
8789 Write_Str ("Alias");
8791 when E_Record_Type =>
8792 Write_Str ("Corresponding_Concurrent_Type");
8794 when E_Subprogram_Body =>
8795 Write_Str ("Corresponding_Protected_Entry");
8797 when Concurrent_Kind =>
8798 Write_Str ("Corresponding_Record_Type");
8803 Write_Str ("Enclosing_Scope");
8805 when E_Entry_Index_Parameter =>
8806 Write_Str ("Entry_Index_Constant");
8808 when E_Class_Wide_Subtype |
8809 E_Access_Protected_Subprogram_Type |
8810 E_Anonymous_Access_Protected_Subprogram_Type |
8811 E_Access_Subprogram_Type |
8813 Write_Str ("Equivalent_Type");
8815 when Fixed_Point_Kind =>
8816 Write_Str ("Delta_Value");
8818 when Incomplete_Or_Private_Kind |
8820 Write_Str ("Private_Dependents");
8823 Write_Str ("Renamed_Object");
8827 E_Generic_Function |
8828 E_Generic_Procedure |
8829 E_Generic_Package =>
8830 Write_Str ("Renamed_Entity");
8833 Write_Str ("Field18??");
8835 end Write_Field18_Name;
8837 -----------------------
8838 -- Write_Field19_Name --
8839 -----------------------
8841 procedure Write_Field19_Name (Id : Entity_Id) is
8845 E_Generic_Package =>
8846 Write_Str ("Body_Entity");
8848 when E_Discriminant =>
8849 Write_Str ("Corresponding_Discriminant");
8852 Write_Str ("Default_Aspect_Value");
8854 when E_Array_Type =>
8855 Write_Str ("Default_Component_Value");
8857 when E_Record_Type =>
8858 Write_Str ("Parent_Subtype");
8862 Write_Str ("Size_Check_Code");
8864 when E_Package_Body |
8866 Write_Str ("Spec_Entity");
8868 when Private_Kind =>
8869 Write_Str ("Underlying_Full_View");
8871 when E_Function | E_Operator | E_Subprogram_Type =>
8872 Write_Str ("Extra_Accessibility_Of_Result");
8875 Write_Str ("Field19??");
8877 end Write_Field19_Name;
8879 -----------------------
8880 -- Write_Field20_Name --
8881 -----------------------
8883 procedure Write_Field20_Name (Id : Entity_Id) is
8887 Write_Str ("Component_Type");
8889 when E_In_Parameter |
8890 E_Generic_In_Parameter =>
8891 Write_Str ("Default_Value");
8894 Write_Str ("Directly_Designated_Type");
8897 Write_Str ("Discriminant_Checking_Func");
8899 when E_Discriminant =>
8900 Write_Str ("Discriminant_Default_Value");
8909 E_Generic_Function |
8911 E_Generic_Procedure |
8919 E_Return_Statement |
8921 E_Subprogram_Type =>
8922 Write_Str ("Last_Entity");
8926 Write_Str ("Prival_Link");
8929 Write_Str ("Scalar_Range");
8932 Write_Str ("Register_Exception_Call");
8935 Write_Str ("Field20??");
8937 end Write_Field20_Name;
8939 -----------------------
8940 -- Write_Field21_Name --
8941 -----------------------
8943 procedure Write_Field21_Name (Id : Entity_Id) is
8947 Write_Str ("Accept_Address");
8949 when E_In_Parameter =>
8950 Write_Str ("Default_Expr_Function");
8952 when Concurrent_Kind |
8953 Incomplete_Or_Private_Kind |
8957 Write_Str ("Discriminant_Constraint");
8962 E_Generic_Function |
8964 E_Generic_Procedure |
8966 Write_Str ("Interface_Name");
8969 Modular_Integer_Kind =>
8970 Write_Str ("Original_Array_Type");
8972 when Fixed_Point_Kind =>
8973 Write_Str ("Small_Value");
8976 Write_Str ("Field21??");
8978 end Write_Field21_Name;
8980 -----------------------
8981 -- Write_Field22_Name --
8982 -----------------------
8984 procedure Write_Field22_Name (Id : Entity_Id) is
8988 Write_Str ("Associated_Storage_Pool");
8991 Write_Str ("Component_Size");
8993 when E_Record_Type =>
8994 Write_Str ("Corresponding_Remote_Type");
8998 Write_Str ("Original_Record_Component");
9000 when E_Enumeration_Literal =>
9001 Write_Str ("Enumeration_Rep_Expr");
9004 Write_Str ("Exception_Code");
9006 when E_Record_Type_With_Private |
9007 E_Record_Subtype_With_Private |
9010 E_Limited_Private_Type |
9011 E_Limited_Private_Subtype =>
9012 Write_Str ("Private_View");
9015 Write_Str ("Protected_Formal");
9025 E_Generic_Function |
9026 E_Generic_Procedure |
9029 E_Return_Statement |
9032 Write_Str ("Scope_Depth_Value");
9035 Write_Str ("Shared_Var_Procs_Instance");
9038 Write_Str ("Field22??");
9040 end Write_Field22_Name;
9042 ------------------------
9043 -- Write_Field23_Name --
9044 ------------------------
9046 procedure Write_Field23_Name (Id : Entity_Id) is
9049 when E_Discriminant =>
9050 Write_Str ("CR_Discriminant");
9053 Write_Str ("Entry_Cancel_Parameter");
9055 when E_Enumeration_Type =>
9056 Write_Str ("Enum_Pos_To_Rep");
9060 Write_Str ("Extra_Constrained");
9063 Write_Str ("Finalization_Master");
9065 when E_Generic_Function |
9067 E_Generic_Procedure =>
9068 Write_Str ("Inner_Instances");
9071 Write_Str ("Packed_Array_Type");
9074 Write_Str ("Protection_Object");
9076 when Concurrent_Kind |
9077 Incomplete_Or_Private_Kind |
9081 Write_Str ("Stored_Constraint");
9085 if Present (Scope (Id))
9086 and then Is_Protected_Type (Scope (Id))
9088 Write_Str ("Protection_Object");
9090 Write_Str ("Generic_Renamings");
9094 if Is_Generic_Instance (Id) then
9095 Write_Str ("Generic_Renamings");
9097 Write_Str ("Limited_View");
9101 Write_Str ("Field23??");
9103 end Write_Field23_Name;
9105 ------------------------
9106 -- Write_Field24_Name --
9107 ------------------------
9109 procedure Write_Field24_Name (Id : Entity_Id) is
9115 Write_Str ("Related_Expression");
9123 Generic_Subprogram_Kind |
9125 Write_Str ("Contract");
9128 Write_Str ("Field24???");
9130 end Write_Field24_Name;
9132 ------------------------
9133 -- Write_Field25_Name --
9134 ------------------------
9136 procedure Write_Field25_Name (Id : Entity_Id) is
9140 Write_Str ("Abstract_States");
9143 Write_Str ("Debug_Renaming_Link");
9146 Write_Str ("DT_Offset_To_Top_Func");
9150 Write_Str ("Interface_Alias");
9152 when E_Record_Type |
9154 E_Record_Type_With_Private |
9155 E_Record_Subtype_With_Private =>
9156 Write_Str ("Interfaces");
9160 Write_Str ("Related_Array_Object");
9163 Write_Str ("Task_Body_Procedure");
9167 Write_Str ("PPC_Wrapper");
9169 when E_Enumeration_Subtype |
9170 E_Modular_Integer_Subtype |
9171 E_Signed_Integer_Subtype =>
9172 Write_Str ("Static_Predicate");
9175 Write_Str ("Field25??");
9177 end Write_Field25_Name;
9179 ------------------------
9180 -- Write_Field26_Name --
9181 ------------------------
9183 procedure Write_Field26_Name (Id : Entity_Id) is
9186 when E_Record_Type |
9187 E_Record_Type_With_Private =>
9188 Write_Str ("Dispatch_Table_Wrappers");
9190 when E_In_Out_Parameter |
9193 Write_Str ("Last_Assignment");
9195 when E_Access_Subprogram_Type =>
9196 Write_Str ("Original_Access_Type");
9198 when E_Generic_Package |
9200 Write_Str ("Package_Instantiation");
9204 Write_Str ("Related_Type");
9207 Write_Str ("Relative_Deadline_Variable");
9211 Write_Str ("Overridden_Operation");
9214 Write_Str ("Field26??");
9216 end Write_Field26_Name;
9218 ------------------------
9219 -- Write_Field27_Name --
9220 ------------------------
9222 procedure Write_Field27_Name (Id : Entity_Id) is
9227 Write_Str ("Current_Use_Clause");
9232 Write_Str ("Related_Type");
9236 Write_Str ("Wrapped_Entity");
9239 Write_Str ("Field27??");
9241 end Write_Field27_Name;
9243 ------------------------
9244 -- Write_Field28_Name --
9245 ------------------------
9247 procedure Write_Field28_Name (Id : Entity_Id) is
9255 E_Subprogram_Type =>
9256 Write_Str ("Extra_Formals");
9260 Write_Str ("Finalizer");
9264 Write_Str ("Initialization_Statements");
9266 when E_Record_Type =>
9267 Write_Str ("Underlying_Record_View");
9270 Write_Str ("Field28??");
9272 end Write_Field28_Name;
9274 ------------------------
9275 -- Write_Field29_Name --
9276 ------------------------
9278 procedure Write_Field29_Name (Id : Entity_Id) is
9282 Write_Str ("Subprograms_For_Type");
9285 Write_Str ("Field29??");
9287 end Write_Field29_Name;
9289 ------------------------
9290 -- Write_Field30_Name --
9291 ------------------------
9293 procedure Write_Field30_Name (Id : Entity_Id) is
9297 Write_Str ("Corresponding_Equality");
9300 Write_Str ("Static_Initialization");
9303 Write_Str ("Field30??");
9305 end Write_Field30_Name;
9307 ------------------------
9308 -- Write_Field31_Name --
9309 ------------------------
9311 procedure Write_Field31_Name (Id : Entity_Id) is
9316 Write_Str ("Thunk_Entity");
9319 Write_Str ("Field31??");
9321 end Write_Field31_Name;
9323 ------------------------
9324 -- Write_Field32_Name --
9325 ------------------------
9327 procedure Write_Field32_Name (Id : Entity_Id) is
9331 E_Generic_Function |
9333 E_Generic_Procedure |
9337 E_Subprogram_Body =>
9338 Write_Str ("SPARK_Mode_Pragmas");
9341 Write_Str ("Field32??");
9343 end Write_Field32_Name;
9345 ------------------------
9346 -- Write_Field33_Name --
9347 ------------------------
9349 procedure Write_Field33_Name (Id : Entity_Id) is
9353 Write_Str ("Field33??");
9355 end Write_Field33_Name;
9357 ------------------------
9358 -- Write_Field34_Name --
9359 ------------------------
9361 procedure Write_Field34_Name (Id : Entity_Id) is
9365 Write_Str ("Field34??");
9367 end Write_Field34_Name;
9369 ------------------------
9370 -- Write_Field35_Name --
9371 ------------------------
9373 procedure Write_Field35_Name (Id : Entity_Id) is
9377 Write_Str ("Field35??");
9379 end Write_Field35_Name;
9381 -------------------------
9382 -- Iterator Procedures --
9383 -------------------------
9385 procedure Proc_Next_Component (N : in out Node_Id) is
9387 N := Next_Component (N);
9388 end Proc_Next_Component;
9390 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
9392 N := Next_Entity (N);
9393 while Present (N) loop
9394 exit when Ekind_In (N, E_Component, E_Discriminant);
9395 N := Next_Entity (N);
9397 end Proc_Next_Component_Or_Discriminant;
9399 procedure Proc_Next_Discriminant (N : in out Node_Id) is
9401 N := Next_Discriminant (N);
9402 end Proc_Next_Discriminant;
9404 procedure Proc_Next_Formal (N : in out Node_Id) is
9406 N := Next_Formal (N);
9407 end Proc_Next_Formal;
9409 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
9411 N := Next_Formal_With_Extras (N);
9412 end Proc_Next_Formal_With_Extras;
9414 procedure Proc_Next_Index (N : in out Node_Id) is
9416 N := Next_Index (N);
9417 end Proc_Next_Index;
9419 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
9421 N := Next_Inlined_Subprogram (N);
9422 end Proc_Next_Inlined_Subprogram;
9424 procedure Proc_Next_Literal (N : in out Node_Id) is
9426 N := Next_Literal (N);
9427 end Proc_Next_Literal;
9429 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
9431 N := Next_Stored_Discriminant (N);
9432 end Proc_Next_Stored_Discriminant;