1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. --
18 -- As a special exception under Section 7 of GPL version 3, you are granted --
19 -- additional permissions described in the GCC Runtime Library Exception, --
20 -- version 3.1, as published by the Free Software Foundation. --
22 -- You should have received a copy of the GNU General Public License and --
23 -- a copy of the GCC Runtime Library Exception along with this program; --
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
25 -- <http://www.gnu.org/licenses/>. --
27 -- GNAT was originally developed by the GNAT team at New York University. --
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
30 ------------------------------------------------------------------------------
32 pragma Style_Checks (All_Checks);
33 -- Turn off subprogram ordering, not used for this unit
35 with Atree; use Atree;
36 with Elists; use Elists;
37 with Namet; use Namet;
38 with Nlists; use Nlists;
39 with Output; use Output;
40 with Sinfo; use Sinfo;
41 with Stand; use Stand;
45 use Atree.Unchecked_Access;
46 -- This is one of the packages that is allowed direct untyped access to
47 -- the fields in a node, since it provides the next level abstraction
48 -- which incorporates appropriate checks.
50 ----------------------------------------------
51 -- Usage of Fields in Defining Entity Nodes --
52 ----------------------------------------------
54 -- Four of these fields are defined in Sinfo, since they in are the base
55 -- part of the node. The access routines for these four fields and the
56 -- corresponding set procedures are defined in Sinfo. These fields are
57 -- present in all entities. Note that Homonym is also in the base part of
58 -- the node, but has access routines that are more properly part of Einfo,
59 -- which is why they are defined here.
66 -- Remaining fields are present only in extended nodes (i.e. entities)
68 -- The following fields are present in all entities
71 -- First_Rep_Item Node6
74 -- The usage of other fields (and the entity kinds to which it applies)
75 -- depends on the particular field (see Einfo spec for details).
77 -- Associated_Node_For_Itype Node8
78 -- Dependent_Instances Elist8
79 -- Hiding_Loop_Variable Node8
80 -- Mechanism Uint8 (but returns Mechanism_Type)
81 -- Normalized_First_Bit Uint8
82 -- Postcondition_Proc Node8
83 -- Refinement_Constituents Elist8
84 -- Return_Applies_To Node8
85 -- First_Exit_Statement Node8
87 -- Class_Wide_Type Node9
88 -- Current_Value Node9
91 -- Direct_Primitive_Operations Elist10
92 -- Discriminal_Link Node10
93 -- Float_Rep Uint10 (but returns Float_Rep_Kind)
94 -- Handler_Records List10
95 -- Normalized_Position_Max Uint10
96 -- Refined_State Node10
98 -- Component_Bit_Offset Uint11
100 -- Entry_Component Node11
101 -- Enumeration_Pos Uint11
102 -- Generic_Homonym Node11
103 -- Protected_Body_Subprogram Node11
106 -- Barrier_Function Node12
107 -- Enumeration_Rep Uint12
109 -- Next_Inlined_Subprogram Node12
111 -- Component_Clause Node13
112 -- Elaboration_Entity Node13
113 -- Extra_Accessibility Node13
117 -- First_Optional_Parameter Node14
118 -- Normalized_Position Uint14
119 -- Shadow_Entities List14
121 -- Discriminant_Number Uint15
122 -- DT_Position Uint15
123 -- DT_Entry_Count Uint15
124 -- Entry_Bodies_Array Node15
125 -- Entry_Parameters_Type Node15
126 -- Extra_Formal Node15
127 -- Lit_Indexes Node15
128 -- Related_Instance Node15
129 -- Status_Flag_Or_Transient_Decl Node15
130 -- Scale_Value Uint15
131 -- Storage_Size_Variable Node15
132 -- String_Literal_Low_Bound Node15
134 -- Access_Disp_Table Elist16
135 -- Body_References Elist16
136 -- Cloned_Subtype Node16
138 -- Entry_Formal Node16
139 -- First_Private_Entity Node16
140 -- Lit_Strings Node16
141 -- String_Literal_Length Uint16
142 -- Unset_Reference Node16
144 -- Actual_Subtype Node17
145 -- Digits_Value Uint17
146 -- Discriminal Node17
147 -- First_Entity Node17
148 -- First_Index Node17
149 -- First_Literal Node17
152 -- Non_Limited_View Node17
156 -- Corresponding_Concurrent_Type Node18
157 -- Corresponding_Protected_Entry Node18
158 -- Corresponding_Record_Type Node18
159 -- Delta_Value Ureal18
160 -- Enclosing_Scope Node18
161 -- Equivalent_Type Node18
162 -- Private_Dependents Elist18
163 -- Renamed_Entity Node18
164 -- Renamed_Object Node18
166 -- Body_Entity Node19
167 -- Corresponding_Discriminant Node19
168 -- Default_Aspect_Component_Value Node19
169 -- Default_Aspect_Value Node19
170 -- Extra_Accessibility_Of_Result Node19
171 -- Parent_Subtype Node19
172 -- Size_Check_Code Node19
173 -- Spec_Entity Node19
174 -- Underlying_Full_View Node19
176 -- Component_Type Node20
177 -- Default_Value Node20
178 -- Directly_Designated_Type Node20
179 -- Discriminant_Checking_Func Node20
180 -- Discriminant_Default_Value Node20
181 -- Last_Entity Node20
182 -- Prival_Link Node20
183 -- Register_Exception_Call Node20
184 -- Scalar_Range Node20
186 -- Accept_Address Elist21
187 -- Default_Expr_Function Node21
188 -- Discriminant_Constraint Elist21
189 -- Interface_Name Node21
190 -- Original_Array_Type Node21
191 -- Small_Value Ureal21
193 -- Associated_Storage_Pool Node22
194 -- Component_Size Uint22
195 -- Corresponding_Remote_Type Node22
196 -- Enumeration_Rep_Expr Node22
197 -- Exception_Code Uint22
198 -- Original_Record_Component Node22
199 -- Private_View Node22
200 -- Protected_Formal Node22
201 -- Scope_Depth_Value Uint22
202 -- Shared_Var_Procs_Instance Node22
204 -- CR_Discriminant Node23
205 -- Entry_Cancel_Parameter Node23
206 -- Enum_Pos_To_Rep Node23
207 -- Extra_Constrained Node23
208 -- Finalization_Master Node23
209 -- Generic_Renamings Elist23
210 -- Inner_Instances Elist23
211 -- Limited_View Node23
212 -- Packed_Array_Type Node23
213 -- Protection_Object Node23
214 -- Stored_Constraint Elist23
216 -- Related_Expression Node24
219 -- Interface_Alias Node25
220 -- Interfaces Elist25
221 -- Debug_Renaming_Link Node25
222 -- DT_Offset_To_Top_Func Node25
223 -- PPC_Wrapper Node25
224 -- Related_Array_Object Node25
225 -- Static_Predicate List25
226 -- Task_Body_Procedure Node25
228 -- Dispatch_Table_Wrappers Elist26
229 -- Last_Assignment Node26
230 -- Original_Access_Type Node26
231 -- Overridden_Operation Node26
232 -- Package_Instantiation Node26
233 -- Relative_Deadline_Variable Node26
235 -- Current_Use_Clause Node27
236 -- Related_Type Node27
237 -- Wrapped_Entity Node27
239 -- Extra_Formals Node28
241 -- Initialization_Statements Node28
242 -- Underlying_Record_View Node28
244 -- Subprograms_For_Type Node29
246 -- Corresponding_Equality Node30
247 -- Static_Initialization Node30
249 -- Thunk_Entity Node31
251 -- SPARK_Mode_Pragmas Node32
259 ---------------------------------------------
260 -- Usage of Flags in Defining Entity Nodes --
261 ---------------------------------------------
263 -- All flags are unique, there is no overlaying, so each flag is physically
264 -- present in every entity. However, for many of the flags, it only makes
265 -- sense for them to be set true for certain subsets of entity kinds. See
266 -- the spec of Einfo for further details.
268 -- Note: Flag1-Flag3 are not used, for historical reasons
271 -- Has_Discriminants Flag5
272 -- Is_Dispatching_Operation Flag6
273 -- Is_Immediately_Visible Flag7
275 -- Is_Potentially_Use_Visible Flag9
279 -- Is_Constrained Flag12
280 -- Is_Generic_Type Flag13
281 -- Depends_On_Private Flag14
283 -- Is_Volatile Flag16
284 -- Is_Internal Flag17
285 -- Has_Delayed_Freeze Flag18
286 -- Is_Abstract_Subprogram Flag19
287 -- Is_Concurrent_Record_Type Flag20
289 -- Has_Master_Entity Flag21
290 -- Needs_No_Actuals Flag22
291 -- Has_Storage_Size_Clause Flag23
292 -- Is_Imported Flag24
293 -- Is_Limited_Record Flag25
294 -- Has_Completion Flag26
295 -- Has_Pragma_Controlled Flag27
296 -- Is_Statically_Allocated Flag28
297 -- Has_Size_Clause Flag29
300 -- Checks_May_Be_Suppressed Flag31
301 -- Kill_Elaboration_Checks Flag32
302 -- Kill_Range_Checks Flag33
303 -- Has_Independent_Components Flag34
304 -- Is_Class_Wide_Equivalent_Type Flag35
305 -- Referenced_As_LHS Flag36
306 -- Is_Known_Non_Null Flag37
307 -- Can_Never_Be_Null Flag38
308 -- Has_Default_Aspect Flag39
309 -- Body_Needed_For_SAL Flag40
311 -- Treat_As_Volatile Flag41
312 -- Is_Controlled Flag42
313 -- Has_Controlled_Component Flag43
315 -- In_Private_Part Flag45
316 -- Has_Alignment_Clause Flag46
318 -- In_Package_Body Flag48
320 -- Delay_Subprogram_Descriptors Flag50
323 -- Is_Entry_Formal Flag52
324 -- Is_Private_Descendant Flag53
325 -- Return_Present Flag54
326 -- Is_Tagged_Type Flag55
327 -- Has_Homonym Flag56
329 -- Non_Binary_Modulus Flag58
330 -- Is_Preelaborated Flag59
331 -- Is_Shared_Passive Flag60
333 -- Is_Remote_Types Flag61
334 -- Is_Remote_Call_Interface Flag62
335 -- Is_Character_Type Flag63
336 -- Is_Intrinsic_Subprogram Flag64
337 -- Has_Record_Rep_Clause Flag65
338 -- Has_Enumeration_Rep_Clause Flag66
339 -- Has_Small_Clause Flag67
340 -- Has_Component_Size_Clause Flag68
341 -- Is_Access_Constant Flag69
342 -- Is_First_Subtype Flag70
344 -- Has_Completion_In_Body Flag71
345 -- Has_Unknown_Discriminants Flag72
346 -- Is_Child_Unit Flag73
347 -- Is_CPP_Class Flag74
348 -- Has_Non_Standard_Rep Flag75
349 -- Is_Constructor Flag76
350 -- Static_Elaboration_Desired Flag77
352 -- Has_All_Calls_Remote Flag79
353 -- Is_Constr_Subt_For_U_Nominal Flag80
355 -- Is_Asynchronous Flag81
356 -- Has_Gigi_Rep_Item Flag82
357 -- Has_Machine_Radix_Clause Flag83
358 -- Machine_Radix_10 Flag84
360 -- Has_Atomic_Components Flag86
361 -- Has_Volatile_Components Flag87
362 -- Discard_Names Flag88
363 -- Is_Interrupt_Handler Flag89
364 -- Returns_By_Ref Flag90
367 -- Size_Known_At_Compile_Time Flag92
368 -- Reverse_Storage_Order Flag93
369 -- Is_Generic_Actual_Type Flag94
370 -- Uses_Sec_Stack Flag95
371 -- Warnings_Off Flag96
372 -- Is_Controlling_Formal Flag97
373 -- Has_Controlling_Result Flag98
374 -- Is_Exported Flag99
375 -- Has_Specified_Layout Flag100
377 -- Has_Nested_Block_With_Handler Flag101
379 -- Is_Completely_Hidden Flag103
380 -- Address_Taken Flag104
381 -- Suppress_Initialization Flag105
382 -- Is_Limited_Composite Flag106
383 -- Is_Private_Composite Flag107
384 -- Default_Expressions_Processed Flag108
385 -- Is_Non_Static_Subtype Flag109
386 -- Has_External_Tag_Rep_Clause Flag110
388 -- Is_Formal_Subprogram Flag111
389 -- Is_Renaming_Of_Object Flag112
391 -- Delay_Cleanups Flag114
392 -- Never_Set_In_Source Flag115
393 -- Is_Visible_Lib_Unit Flag116
394 -- Is_Unchecked_Union Flag117
395 -- Is_For_Access_Subtype Flag118
396 -- Has_Convention_Pragma Flag119
397 -- Has_Primitive_Operations Flag120
399 -- Has_Pragma_Pack Flag121
400 -- Is_Bit_Packed_Array Flag122
401 -- Has_Unchecked_Union Flag123
402 -- Is_Eliminated Flag124
403 -- C_Pass_By_Copy Flag125
404 -- Is_Instantiated Flag126
405 -- Is_Valued_Procedure Flag127
406 -- (used for Component_Alignment) Flag128
407 -- (used for Component_Alignment) Flag129
408 -- Is_Generic_Instance Flag130
410 -- No_Pool_Assigned Flag131
411 -- Is_AST_Entry Flag132
412 -- Is_VMS_Exception Flag133
413 -- Is_Optional_Parameter Flag134
414 -- Has_Aliased_Components Flag135
415 -- No_Strict_Aliasing Flag136
416 -- Is_Machine_Code_Subprogram Flag137
417 -- Is_Packed_Array_Type Flag138
418 -- Has_Biased_Representation Flag139
419 -- Has_Complex_Representation Flag140
421 -- Is_Constr_Subt_For_UN_Aliased Flag141
422 -- Has_Missing_Return Flag142
423 -- Has_Recursive_Call Flag143
424 -- Is_Unsigned_Type Flag144
425 -- Strict_Alignment Flag145
426 -- Is_Abstract_Type Flag146
427 -- Needs_Debug_Info Flag147
428 -- Suppress_Elaboration_Warnings Flag148
429 -- Is_Compilation_Unit Flag149
430 -- Has_Pragma_Elaborate_Body Flag150
432 -- Has_Private_Ancestor Flag151
433 -- Entry_Accepted Flag152
434 -- Is_Obsolescent Flag153
435 -- Has_Per_Object_Constraint Flag154
436 -- Has_Private_Declaration Flag155
437 -- Referenced Flag156
438 -- Has_Pragma_Inline Flag157
439 -- Finalize_Storage_Only Flag158
440 -- From_With_Type Flag159
441 -- Is_Package_Body_Entity Flag160
443 -- Has_Qualified_Name Flag161
444 -- Nonzero_Is_True Flag162
445 -- Is_True_Constant Flag163
446 -- Reverse_Bit_Order Flag164
447 -- Suppress_Style_Checks Flag165
448 -- Debug_Info_Off Flag166
449 -- Sec_Stack_Needed_For_Return Flag167
450 -- Materialize_Entity Flag168
451 -- Has_Pragma_Thread_Local_Storage Flag169
452 -- Is_Known_Valid Flag170
454 -- Is_Hidden_Open_Scope Flag171
455 -- Has_Object_Size_Clause Flag172
456 -- Has_Fully_Qualified_Name Flag173
457 -- Elaboration_Entity_Required Flag174
458 -- Has_Forward_Instantiation Flag175
459 -- Is_Discrim_SO_Function Flag176
460 -- Size_Depends_On_Discriminant Flag177
461 -- Is_Null_Init_Proc Flag178
462 -- Has_Pragma_Pure_Function Flag179
463 -- Has_Pragma_Unreferenced Flag180
465 -- Has_Contiguous_Rep Flag181
466 -- Has_Xref_Entry Flag182
467 -- Must_Be_On_Byte_Boundary Flag183
468 -- Has_Stream_Size_Clause Flag184
469 -- Is_Ada_2005_Only Flag185
470 -- Is_Interface Flag186
471 -- Has_Constrained_Partial_View Flag187
472 -- Uses_Lock_Free Flag188
473 -- Is_Pure_Unit_Access_Type Flag189
474 -- Has_Specified_Stream_Input Flag190
476 -- Has_Specified_Stream_Output Flag191
477 -- Has_Specified_Stream_Read Flag192
478 -- Has_Specified_Stream_Write Flag193
479 -- Is_Local_Anonymous_Access Flag194
480 -- Is_Primitive_Wrapper Flag195
481 -- Was_Hidden Flag196
482 -- Is_Limited_Interface Flag197
483 -- Has_Pragma_Ordered Flag198
484 -- Is_Ada_2012_Only Flag199
486 -- Has_Delayed_Aspects Flag200
487 -- Has_Pragma_No_Inline Flag201
488 -- Itype_Printed Flag202
489 -- Has_Pragma_Pure Flag203
490 -- Is_Known_Null Flag204
491 -- Low_Bound_Tested Flag205
492 -- Is_Visible_Formal Flag206
493 -- Known_To_Have_Preelab_Init Flag207
494 -- Must_Have_Preelab_Init Flag208
495 -- Is_Return_Object Flag209
496 -- Elaborate_Body_Desirable Flag210
498 -- Has_Static_Discriminants Flag211
499 -- Has_Pragma_Unreferenced_Objects Flag212
500 -- Requires_Overriding Flag213
502 -- Has_Up_Level_Access Flag215
503 -- Universal_Aliasing Flag216
504 -- Suppress_Value_Tracking_On_Call Flag217
505 -- Is_Primitive Flag218
506 -- Has_Initial_Value Flag219
507 -- Has_Dispatch_Table Flag220
509 -- Has_Pragma_Preelab_Init Flag221
510 -- Used_As_Generic_Actual Flag222
511 -- Is_Descendent_Of_Address Flag223
514 -- Is_Only_Out_Parameter Flag226
515 -- Referenced_As_Out_Parameter Flag227
516 -- Has_Thunks Flag228
517 -- Can_Use_Internal_Rep Flag229
518 -- Has_Pragma_Inline_Always Flag230
520 -- Renamed_In_Spec Flag231
521 -- Has_Invariants Flag232
522 -- Has_Pragma_Unmodified Flag233
523 -- Is_Dispatch_Table_Entity Flag234
524 -- Is_Trivial_Subprogram Flag235
525 -- Warnings_Off_Used Flag236
526 -- Warnings_Off_Used_Unmodified Flag237
527 -- Warnings_Off_Used_Unreferenced Flag238
528 -- OK_To_Reorder_Components Flag239
529 -- Has_Postconditions Flag240
531 -- Optimize_Alignment_Space Flag241
532 -- Optimize_Alignment_Time Flag242
533 -- Overlays_Constant Flag243
534 -- Is_RACW_Stub_Type Flag244
535 -- Is_Private_Primitive Flag245
536 -- Is_Underlying_Record_View Flag246
537 -- OK_To_Rename Flag247
538 -- Has_Inheritable_Invariants Flag248
539 -- Is_Safe_To_Reevaluate Flag249
540 -- Has_Predicates Flag250
542 -- Has_Implicit_Dereference Flag251
543 -- Is_Processed_Transient Flag252
544 -- Has_Anonymous_Master Flag253
545 -- Is_Implementation_Defined Flag254
546 -- Is_Predicate_Function Flag255
547 -- Is_Predicate_Function_M Flag256
548 -- Is_Invariant_Procedure Flag257
549 -- Has_Dynamic_Predicate_Aspect Flag258
550 -- Has_Static_Predicate_Aspect Flag259
551 -- Has_Loop_Entry_Attributes Flag260
553 -- Has_Delayed_Rep_Aspects Flag261
554 -- May_Inherit_Delayed_Rep_Aspects Flag262
555 -- Has_Visible_Refinement Flag263
556 -- Has_Body_References Flag264
583 -- Note: Flag287-317 are defined in atree.ads/adb, but not yet in atree.h
585 -----------------------
586 -- Local subprograms --
587 -----------------------
591 Opt_Nam : Name_Id) return Boolean;
592 -- Determine whether abstract state State has a particular option denoted
593 -- by the name Opt_Nam.
599 function Float_Rep (Id : E) return F is
600 pragma Assert (Is_Floating_Point_Type (Id));
602 return F'Val (UI_To_Int (Uint10 (Base_Type (Id))));
611 Opt_Nam : Name_Id) return Boolean
613 Par : constant Node_Id := Parent (State);
617 pragma Assert (Ekind (State) = E_Abstract_State);
619 -- States with options appear as extension aggregates in the tree
621 if Nkind (Par) = N_Extension_Aggregate then
622 if Opt_Nam = Name_Part_Of then
623 return Present (Component_Associations (Par));
626 Opt := First (Expressions (Par));
627 while Present (Opt) loop
628 if Chars (Opt) = Opt_Nam then
640 --------------------------------
641 -- Attribute Access Functions --
642 --------------------------------
644 function Abstract_States (Id : E) return L is
646 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
650 function Accept_Address (Id : E) return L is
655 function Access_Disp_Table (Id : E) return L is
657 pragma Assert (Ekind_In (Id, E_Record_Type,
659 return Elist16 (Implementation_Base_Type (Id));
660 end Access_Disp_Table;
662 function Actual_Subtype (Id : E) return E is
665 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
666 or else Is_Formal (Id));
670 function Address_Taken (Id : E) return B is
675 function Alias (Id : E) return E is
678 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
682 function Alignment (Id : E) return U is
684 pragma Assert (Is_Type (Id)
685 or else Is_Formal (Id)
686 or else Ekind_In (Id, E_Loop_Parameter,
693 function Associated_Formal_Package (Id : E) return E is
695 pragma Assert (Ekind (Id) = E_Package);
697 end Associated_Formal_Package;
699 function Associated_Node_For_Itype (Id : E) return N is
702 end Associated_Node_For_Itype;
704 function Associated_Storage_Pool (Id : E) return E is
706 pragma Assert (Is_Access_Type (Id));
707 return Node22 (Root_Type (Id));
708 end Associated_Storage_Pool;
710 function Barrier_Function (Id : E) return N is
712 pragma Assert (Is_Entry (Id));
714 end Barrier_Function;
716 function Block_Node (Id : E) return N is
718 pragma Assert (Ekind (Id) = E_Block);
722 function Body_Entity (Id : E) return E is
724 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
728 function Body_Needed_For_SAL (Id : E) return B is
731 (Ekind (Id) = E_Package
732 or else Is_Subprogram (Id)
733 or else Is_Generic_Unit (Id));
735 end Body_Needed_For_SAL;
737 function Body_References (Id : E) return L is
739 pragma Assert (Ekind (Id) = E_Abstract_State);
743 function C_Pass_By_Copy (Id : E) return B is
745 pragma Assert (Is_Record_Type (Id));
746 return Flag125 (Implementation_Base_Type (Id));
749 function Can_Never_Be_Null (Id : E) return B is
752 end Can_Never_Be_Null;
754 function Checks_May_Be_Suppressed (Id : E) return B is
757 end Checks_May_Be_Suppressed;
759 function Class_Wide_Type (Id : E) return E is
761 pragma Assert (Is_Type (Id));
765 function Cloned_Subtype (Id : E) return E is
767 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
771 function Component_Bit_Offset (Id : E) return U is
773 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
775 end Component_Bit_Offset;
777 function Component_Clause (Id : E) return N is
779 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
781 end Component_Clause;
783 function Component_Size (Id : E) return U is
785 pragma Assert (Is_Array_Type (Id));
786 return Uint22 (Implementation_Base_Type (Id));
789 function Component_Type (Id : E) return E is
791 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
792 return Node20 (Implementation_Base_Type (Id));
795 function Corresponding_Concurrent_Type (Id : E) return E is
797 pragma Assert (Ekind (Id) = E_Record_Type);
799 end Corresponding_Concurrent_Type;
801 function Corresponding_Discriminant (Id : E) return E is
803 pragma Assert (Ekind (Id) = E_Discriminant);
805 end Corresponding_Discriminant;
807 function Corresponding_Equality (Id : E) return E is
810 (Ekind (Id) = E_Function
811 and then not Comes_From_Source (Id)
812 and then Chars (Id) = Name_Op_Ne);
814 end Corresponding_Equality;
816 function Corresponding_Protected_Entry (Id : E) return E is
818 pragma Assert (Ekind (Id) = E_Subprogram_Body);
820 end Corresponding_Protected_Entry;
822 function Corresponding_Record_Type (Id : E) return E is
824 pragma Assert (Is_Concurrent_Type (Id));
826 end Corresponding_Record_Type;
828 function Corresponding_Remote_Type (Id : E) return E is
831 end Corresponding_Remote_Type;
833 function Current_Use_Clause (Id : E) return E is
835 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
837 end Current_Use_Clause;
839 function Current_Value (Id : E) return N is
841 pragma Assert (Ekind (Id) in Object_Kind);
845 function CR_Discriminant (Id : E) return E is
850 function Debug_Info_Off (Id : E) return B is
855 function Debug_Renaming_Link (Id : E) return E is
858 end Debug_Renaming_Link;
860 function Default_Aspect_Component_Value (Id : E) return N is
862 pragma Assert (Is_Array_Type (Id));
863 return Node19 (Base_Type (Id));
864 end Default_Aspect_Component_Value;
866 function Default_Aspect_Value (Id : E) return N is
868 pragma Assert (Is_Scalar_Type (Id));
869 return Node19 (Base_Type (Id));
870 end Default_Aspect_Value;
872 function Default_Expr_Function (Id : E) return E is
874 pragma Assert (Is_Formal (Id));
876 end Default_Expr_Function;
878 function Default_Expressions_Processed (Id : E) return B is
881 end Default_Expressions_Processed;
883 function Default_Value (Id : E) return N is
885 pragma Assert (Is_Formal (Id));
889 function Delay_Cleanups (Id : E) return B is
894 function Delay_Subprogram_Descriptors (Id : E) return B is
897 end Delay_Subprogram_Descriptors;
899 function Delta_Value (Id : E) return R is
901 pragma Assert (Is_Fixed_Point_Type (Id));
905 function Dependent_Instances (Id : E) return L is
907 pragma Assert (Is_Generic_Instance (Id));
909 end Dependent_Instances;
911 function Depends_On_Private (Id : E) return B is
913 pragma Assert (Nkind (Id) in N_Entity);
915 end Depends_On_Private;
917 function Digits_Value (Id : E) return U is
920 (Is_Floating_Point_Type (Id)
921 or else Is_Decimal_Fixed_Point_Type (Id));
925 function Direct_Primitive_Operations (Id : E) return L is
927 pragma Assert (Is_Tagged_Type (Id));
929 end Direct_Primitive_Operations;
931 function Directly_Designated_Type (Id : E) return E is
933 pragma Assert (Is_Access_Type (Id));
935 end Directly_Designated_Type;
937 function Discard_Names (Id : E) return B is
942 function Discriminal (Id : E) return E is
944 pragma Assert (Ekind (Id) = E_Discriminant);
948 function Discriminal_Link (Id : E) return N is
951 end Discriminal_Link;
953 function Discriminant_Checking_Func (Id : E) return E is
955 pragma Assert (Ekind (Id) = E_Component);
957 end Discriminant_Checking_Func;
959 function Discriminant_Constraint (Id : E) return L is
961 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
963 end Discriminant_Constraint;
965 function Discriminant_Default_Value (Id : E) return N is
967 pragma Assert (Ekind (Id) = E_Discriminant);
969 end Discriminant_Default_Value;
971 function Discriminant_Number (Id : E) return U is
973 pragma Assert (Ekind (Id) = E_Discriminant);
975 end Discriminant_Number;
977 function Dispatch_Table_Wrappers (Id : E) return L is
979 pragma Assert (Ekind_In (Id, E_Record_Type,
981 return Elist26 (Implementation_Base_Type (Id));
982 end Dispatch_Table_Wrappers;
984 function DT_Entry_Count (Id : E) return U is
986 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
990 function DT_Offset_To_Top_Func (Id : E) return E is
992 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
994 end DT_Offset_To_Top_Func;
996 function DT_Position (Id : E) return U is
998 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
999 and then Present (DTC_Entity (Id)));
1003 function DTC_Entity (Id : E) return E is
1005 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1009 function Elaborate_Body_Desirable (Id : E) return B is
1011 pragma Assert (Ekind (Id) = E_Package);
1012 return Flag210 (Id);
1013 end Elaborate_Body_Desirable;
1015 function Elaboration_Entity (Id : E) return E is
1020 Ekind (Id) = E_Package
1022 Is_Generic_Unit (Id));
1024 end Elaboration_Entity;
1026 function Elaboration_Entity_Required (Id : E) return B is
1031 Ekind (Id) = E_Package
1033 Is_Generic_Unit (Id));
1034 return Flag174 (Id);
1035 end Elaboration_Entity_Required;
1037 function Enclosing_Scope (Id : E) return E is
1040 end Enclosing_Scope;
1042 function Entry_Accepted (Id : E) return B is
1044 pragma Assert (Is_Entry (Id));
1045 return Flag152 (Id);
1048 function Entry_Bodies_Array (Id : E) return E is
1051 end Entry_Bodies_Array;
1053 function Entry_Cancel_Parameter (Id : E) return E is
1056 end Entry_Cancel_Parameter;
1058 function Entry_Component (Id : E) return E is
1061 end Entry_Component;
1063 function Entry_Formal (Id : E) return E is
1068 function Entry_Index_Constant (Id : E) return N is
1070 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
1072 end Entry_Index_Constant;
1074 function Contract (Id : E) return N is
1077 (Ekind_In (Id, E_Entry,
1083 or else Is_Generic_Subprogram (Id)
1084 or else Is_Subprogram (Id));
1088 function Entry_Parameters_Type (Id : E) return E is
1091 end Entry_Parameters_Type;
1093 function Enum_Pos_To_Rep (Id : E) return E is
1095 pragma Assert (Ekind (Id) = E_Enumeration_Type);
1097 end Enum_Pos_To_Rep;
1099 function Enumeration_Pos (Id : E) return Uint is
1101 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1103 end Enumeration_Pos;
1105 function Enumeration_Rep (Id : E) return U is
1107 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1109 end Enumeration_Rep;
1111 function Enumeration_Rep_Expr (Id : E) return N is
1113 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1115 end Enumeration_Rep_Expr;
1117 function Equivalent_Type (Id : E) return E is
1120 (Ekind_In (Id, E_Class_Wide_Type,
1121 E_Class_Wide_Subtype,
1122 E_Access_Subprogram_Type,
1123 E_Access_Protected_Subprogram_Type,
1124 E_Anonymous_Access_Protected_Subprogram_Type,
1125 E_Access_Subprogram_Type,
1128 end Equivalent_Type;
1130 function Esize (Id : E) return Uint is
1135 function Exception_Code (Id : E) return Uint is
1137 pragma Assert (Ekind (Id) = E_Exception);
1141 function Extra_Accessibility (Id : E) return E is
1144 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
1146 end Extra_Accessibility;
1148 function Extra_Accessibility_Of_Result (Id : E) return E is
1150 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
1152 end Extra_Accessibility_Of_Result;
1154 function Extra_Constrained (Id : E) return E is
1156 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1158 end Extra_Constrained;
1160 function Extra_Formal (Id : E) return E is
1165 function Extra_Formals (Id : E) return E is
1168 (Is_Overloadable (Id)
1169 or else Ekind_In (Id, E_Entry_Family,
1171 E_Subprogram_Type));
1175 function Can_Use_Internal_Rep (Id : E) return B is
1177 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1178 return Flag229 (Base_Type (Id));
1179 end Can_Use_Internal_Rep;
1181 function Finalization_Master (Id : E) return E is
1183 pragma Assert (Is_Access_Type (Id));
1184 return Node23 (Root_Type (Id));
1185 end Finalization_Master;
1187 function Finalize_Storage_Only (Id : E) return B is
1189 pragma Assert (Is_Type (Id));
1190 return Flag158 (Base_Type (Id));
1191 end Finalize_Storage_Only;
1193 function Finalizer (Id : E) return E is
1195 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
1199 function First_Entity (Id : E) return E is
1204 function First_Exit_Statement (Id : E) return N is
1206 pragma Assert (Ekind (Id) = E_Loop);
1208 end First_Exit_Statement;
1210 function First_Index (Id : E) return N is
1212 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1216 function First_Literal (Id : E) return E is
1218 pragma Assert (Is_Enumeration_Type (Id));
1222 function First_Optional_Parameter (Id : E) return E is
1224 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1226 end First_Optional_Parameter;
1228 function First_Private_Entity (Id : E) return E is
1230 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1231 or else Ekind (Id) in Concurrent_Kind);
1233 end First_Private_Entity;
1235 function First_Rep_Item (Id : E) return E is
1240 function Freeze_Node (Id : E) return N is
1245 function From_With_Type (Id : E) return B is
1247 return Flag159 (Id);
1250 function Full_View (Id : E) return E is
1252 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1256 function Generic_Homonym (Id : E) return E is
1258 pragma Assert (Ekind (Id) = E_Generic_Package);
1260 end Generic_Homonym;
1262 function Generic_Renamings (Id : E) return L is
1264 return Elist23 (Id);
1265 end Generic_Renamings;
1267 function Handler_Records (Id : E) return S is
1270 end Handler_Records;
1272 function Has_Aliased_Components (Id : E) return B is
1274 return Flag135 (Implementation_Base_Type (Id));
1275 end Has_Aliased_Components;
1277 function Has_Alignment_Clause (Id : E) return B is
1280 end Has_Alignment_Clause;
1282 function Has_All_Calls_Remote (Id : E) return B is
1285 end Has_All_Calls_Remote;
1287 function Has_Anonymous_Master (Id : E) return B is
1290 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
1291 return Flag253 (Id);
1292 end Has_Anonymous_Master;
1294 function Has_Atomic_Components (Id : E) return B is
1296 return Flag86 (Implementation_Base_Type (Id));
1297 end Has_Atomic_Components;
1299 function Has_Biased_Representation (Id : E) return B is
1301 return Flag139 (Id);
1302 end Has_Biased_Representation;
1304 function Has_Body_References (Id : E) return B is
1306 pragma Assert (Ekind (Id) = E_Abstract_State);
1307 return Flag264 (Id);
1308 end Has_Body_References;
1310 function Has_Completion (Id : E) return B is
1315 function Has_Completion_In_Body (Id : E) return B is
1317 pragma Assert (Is_Type (Id));
1319 end Has_Completion_In_Body;
1321 function Has_Complex_Representation (Id : E) return B is
1323 pragma Assert (Is_Type (Id));
1324 return Flag140 (Implementation_Base_Type (Id));
1325 end Has_Complex_Representation;
1327 function Has_Component_Size_Clause (Id : E) return B is
1329 pragma Assert (Is_Array_Type (Id));
1330 return Flag68 (Implementation_Base_Type (Id));
1331 end Has_Component_Size_Clause;
1333 function Has_Constrained_Partial_View (Id : E) return B is
1335 pragma Assert (Is_Type (Id));
1336 return Flag187 (Id);
1337 end Has_Constrained_Partial_View;
1339 function Has_Controlled_Component (Id : E) return B is
1341 return Flag43 (Base_Type (Id));
1342 end Has_Controlled_Component;
1344 function Has_Contiguous_Rep (Id : E) return B is
1346 return Flag181 (Id);
1347 end Has_Contiguous_Rep;
1349 function Has_Controlling_Result (Id : E) return B is
1352 end Has_Controlling_Result;
1354 function Has_Convention_Pragma (Id : E) return B is
1356 return Flag119 (Id);
1357 end Has_Convention_Pragma;
1359 function Has_Default_Aspect (Id : E) return B is
1361 return Flag39 (Base_Type (Id));
1362 end Has_Default_Aspect;
1364 function Has_Delayed_Aspects (Id : E) return B is
1366 pragma Assert (Nkind (Id) in N_Entity);
1367 return Flag200 (Id);
1368 end Has_Delayed_Aspects;
1370 function Has_Delayed_Freeze (Id : E) return B is
1372 pragma Assert (Nkind (Id) in N_Entity);
1374 end Has_Delayed_Freeze;
1376 function Has_Delayed_Rep_Aspects (Id : E) return B is
1378 pragma Assert (Nkind (Id) in N_Entity);
1379 return Flag261 (Id);
1380 end Has_Delayed_Rep_Aspects;
1382 function Has_Discriminants (Id : E) return B is
1384 pragma Assert (Nkind (Id) in N_Entity);
1386 end Has_Discriminants;
1388 function Has_Dispatch_Table (Id : E) return B is
1390 pragma Assert (Is_Tagged_Type (Id));
1391 return Flag220 (Id);
1392 end Has_Dispatch_Table;
1394 function Has_Dynamic_Predicate_Aspect (Id : E) return B is
1396 pragma Assert (Is_Type (Id));
1397 return Flag258 (Id);
1398 end Has_Dynamic_Predicate_Aspect;
1400 function Has_Enumeration_Rep_Clause (Id : E) return B is
1402 pragma Assert (Is_Enumeration_Type (Id));
1404 end Has_Enumeration_Rep_Clause;
1406 function Has_Exit (Id : E) return B is
1411 function Has_External_Tag_Rep_Clause (Id : E) return B is
1413 pragma Assert (Is_Tagged_Type (Id));
1414 return Flag110 (Id);
1415 end Has_External_Tag_Rep_Clause;
1417 function Has_Forward_Instantiation (Id : E) return B is
1419 return Flag175 (Id);
1420 end Has_Forward_Instantiation;
1422 function Has_Fully_Qualified_Name (Id : E) return B is
1424 return Flag173 (Id);
1425 end Has_Fully_Qualified_Name;
1427 function Has_Gigi_Rep_Item (Id : E) return B is
1430 end Has_Gigi_Rep_Item;
1432 function Has_Homonym (Id : E) return B is
1437 function Has_Implicit_Dereference (Id : E) return B is
1439 return Flag251 (Id);
1440 end Has_Implicit_Dereference;
1442 function Has_Independent_Components (Id : E) return B is
1444 pragma Assert (Is_Object (Id) or else Is_Type (Id));
1446 end Has_Independent_Components;
1448 function Has_Inheritable_Invariants (Id : E) return B is
1450 pragma Assert (Is_Type (Id));
1451 return Flag248 (Id);
1452 end Has_Inheritable_Invariants;
1454 function Has_Initial_Value (Id : E) return B is
1456 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1457 return Flag219 (Id);
1458 end Has_Initial_Value;
1460 function Has_Invariants (Id : E) return B is
1462 pragma Assert (Is_Type (Id));
1463 return Flag232 (Id);
1466 function Has_Loop_Entry_Attributes (Id : E) return B is
1468 pragma Assert (Ekind (Id) = E_Loop);
1469 return Flag260 (Id);
1470 end Has_Loop_Entry_Attributes;
1472 function Has_Machine_Radix_Clause (Id : E) return B is
1474 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1476 end Has_Machine_Radix_Clause;
1478 function Has_Master_Entity (Id : E) return B is
1481 end Has_Master_Entity;
1483 function Has_Missing_Return (Id : E) return B is
1485 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1486 return Flag142 (Id);
1487 end Has_Missing_Return;
1489 function Has_Nested_Block_With_Handler (Id : E) return B is
1491 return Flag101 (Id);
1492 end Has_Nested_Block_With_Handler;
1494 function Has_Non_Standard_Rep (Id : E) return B is
1496 return Flag75 (Implementation_Base_Type (Id));
1497 end Has_Non_Standard_Rep;
1499 function Has_Object_Size_Clause (Id : E) return B is
1501 pragma Assert (Is_Type (Id));
1502 return Flag172 (Id);
1503 end Has_Object_Size_Clause;
1505 function Has_Per_Object_Constraint (Id : E) return B is
1507 return Flag154 (Id);
1508 end Has_Per_Object_Constraint;
1510 function Has_Postconditions (Id : E) return B is
1512 pragma Assert (Is_Subprogram (Id));
1513 return Flag240 (Id);
1514 end Has_Postconditions;
1516 function Has_Pragma_Controlled (Id : E) return B is
1518 pragma Assert (Is_Access_Type (Id));
1519 return Flag27 (Implementation_Base_Type (Id));
1520 end Has_Pragma_Controlled;
1522 function Has_Pragma_Elaborate_Body (Id : E) return B is
1524 return Flag150 (Id);
1525 end Has_Pragma_Elaborate_Body;
1527 function Has_Pragma_Inline (Id : E) return B is
1529 return Flag157 (Id);
1530 end Has_Pragma_Inline;
1532 function Has_Pragma_Inline_Always (Id : E) return B is
1534 return Flag230 (Id);
1535 end Has_Pragma_Inline_Always;
1537 function Has_Pragma_No_Inline (Id : E) return B is
1539 return Flag201 (Id);
1540 end Has_Pragma_No_Inline;
1542 function Has_Pragma_Ordered (Id : E) return B is
1544 pragma Assert (Is_Enumeration_Type (Id));
1545 return Flag198 (Implementation_Base_Type (Id));
1546 end Has_Pragma_Ordered;
1548 function Has_Pragma_Pack (Id : E) return B is
1550 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1551 return Flag121 (Implementation_Base_Type (Id));
1552 end Has_Pragma_Pack;
1554 function Has_Pragma_Preelab_Init (Id : E) return B is
1556 return Flag221 (Id);
1557 end Has_Pragma_Preelab_Init;
1559 function Has_Pragma_Pure (Id : E) return B is
1561 return Flag203 (Id);
1562 end Has_Pragma_Pure;
1564 function Has_Pragma_Pure_Function (Id : E) return B is
1566 return Flag179 (Id);
1567 end Has_Pragma_Pure_Function;
1569 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1571 return Flag169 (Id);
1572 end Has_Pragma_Thread_Local_Storage;
1574 function Has_Pragma_Unmodified (Id : E) return B is
1576 return Flag233 (Id);
1577 end Has_Pragma_Unmodified;
1579 function Has_Pragma_Unreferenced (Id : E) return B is
1581 return Flag180 (Id);
1582 end Has_Pragma_Unreferenced;
1584 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1586 pragma Assert (Is_Type (Id));
1587 return Flag212 (Id);
1588 end Has_Pragma_Unreferenced_Objects;
1590 function Has_Predicates (Id : E) return B is
1592 pragma Assert (Is_Type (Id));
1593 return Flag250 (Id);
1596 function Has_Primitive_Operations (Id : E) return B is
1598 pragma Assert (Is_Type (Id));
1599 return Flag120 (Base_Type (Id));
1600 end Has_Primitive_Operations;
1602 function Has_Private_Ancestor (Id : E) return B is
1604 return Flag151 (Id);
1605 end Has_Private_Ancestor;
1607 function Has_Private_Declaration (Id : E) return B is
1609 return Flag155 (Id);
1610 end Has_Private_Declaration;
1612 function Has_Qualified_Name (Id : E) return B is
1614 return Flag161 (Id);
1615 end Has_Qualified_Name;
1617 function Has_RACW (Id : E) return B is
1619 pragma Assert (Ekind (Id) = E_Package);
1620 return Flag214 (Id);
1623 function Has_Record_Rep_Clause (Id : E) return B is
1625 pragma Assert (Is_Record_Type (Id));
1626 return Flag65 (Implementation_Base_Type (Id));
1627 end Has_Record_Rep_Clause;
1629 function Has_Recursive_Call (Id : E) return B is
1631 pragma Assert (Is_Subprogram (Id));
1632 return Flag143 (Id);
1633 end Has_Recursive_Call;
1635 function Has_Size_Clause (Id : E) return B is
1638 end Has_Size_Clause;
1640 function Has_Small_Clause (Id : E) return B is
1643 end Has_Small_Clause;
1645 function Has_Specified_Layout (Id : E) return B is
1647 pragma Assert (Is_Type (Id));
1648 return Flag100 (Implementation_Base_Type (Id));
1649 end Has_Specified_Layout;
1651 function Has_Specified_Stream_Input (Id : E) return B is
1653 pragma Assert (Is_Type (Id));
1654 return Flag190 (Id);
1655 end Has_Specified_Stream_Input;
1657 function Has_Specified_Stream_Output (Id : E) return B is
1659 pragma Assert (Is_Type (Id));
1660 return Flag191 (Id);
1661 end Has_Specified_Stream_Output;
1663 function Has_Specified_Stream_Read (Id : E) return B is
1665 pragma Assert (Is_Type (Id));
1666 return Flag192 (Id);
1667 end Has_Specified_Stream_Read;
1669 function Has_Specified_Stream_Write (Id : E) return B is
1671 pragma Assert (Is_Type (Id));
1672 return Flag193 (Id);
1673 end Has_Specified_Stream_Write;
1675 function Has_Static_Discriminants (Id : E) return B is
1677 pragma Assert (Is_Type (Id));
1678 return Flag211 (Id);
1679 end Has_Static_Discriminants;
1681 function Has_Static_Predicate_Aspect (Id : E) return B is
1683 pragma Assert (Is_Type (Id));
1684 return Flag259 (Id);
1685 end Has_Static_Predicate_Aspect;
1687 function Has_Storage_Size_Clause (Id : E) return B is
1689 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1690 return Flag23 (Implementation_Base_Type (Id));
1691 end Has_Storage_Size_Clause;
1693 function Has_Stream_Size_Clause (Id : E) return B is
1695 return Flag184 (Id);
1696 end Has_Stream_Size_Clause;
1698 function Has_Task (Id : E) return B is
1700 return Flag30 (Base_Type (Id));
1703 function Has_Thunks (Id : E) return B is
1705 return Flag228 (Id);
1708 function Has_Unchecked_Union (Id : E) return B is
1710 return Flag123 (Base_Type (Id));
1711 end Has_Unchecked_Union;
1713 function Has_Unknown_Discriminants (Id : E) return B is
1715 pragma Assert (Is_Type (Id));
1717 end Has_Unknown_Discriminants;
1719 function Has_Up_Level_Access (Id : E) return B is
1722 (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
1723 return Flag215 (Id);
1724 end Has_Up_Level_Access;
1726 function Has_Visible_Refinement (Id : E) return B is
1728 pragma Assert (Ekind (Id) = E_Abstract_State);
1729 return Flag263 (Id);
1730 end Has_Visible_Refinement;
1732 function Has_Volatile_Components (Id : E) return B is
1734 return Flag87 (Implementation_Base_Type (Id));
1735 end Has_Volatile_Components;
1737 function Has_Xref_Entry (Id : E) return B is
1739 return Flag182 (Id);
1742 function Hiding_Loop_Variable (Id : E) return E is
1744 pragma Assert (Ekind (Id) = E_Variable);
1746 end Hiding_Loop_Variable;
1748 function Homonym (Id : E) return E is
1753 function Interface_Alias (Id : E) return E is
1755 pragma Assert (Is_Subprogram (Id));
1757 end Interface_Alias;
1759 function Interfaces (Id : E) return L is
1761 pragma Assert (Is_Record_Type (Id));
1762 return Elist25 (Id);
1765 function In_Package_Body (Id : E) return B is
1768 end In_Package_Body;
1770 function In_Private_Part (Id : E) return B is
1773 end In_Private_Part;
1775 function In_Use (Id : E) return B is
1777 pragma Assert (Nkind (Id) in N_Entity);
1781 function Initialization_Statements (Id : E) return N is
1783 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
1785 end Initialization_Statements;
1787 function Inner_Instances (Id : E) return L is
1789 return Elist23 (Id);
1790 end Inner_Instances;
1792 function Interface_Name (Id : E) return N is
1797 function Is_Abstract_Subprogram (Id : E) return B is
1799 pragma Assert (Is_Overloadable (Id));
1801 end Is_Abstract_Subprogram;
1803 function Is_Abstract_Type (Id : E) return B is
1805 pragma Assert (Is_Type (Id));
1806 return Flag146 (Id);
1807 end Is_Abstract_Type;
1809 function Is_Local_Anonymous_Access (Id : E) return B is
1811 pragma Assert (Is_Access_Type (Id));
1812 return Flag194 (Id);
1813 end Is_Local_Anonymous_Access;
1815 function Is_Access_Constant (Id : E) return B is
1817 pragma Assert (Is_Access_Type (Id));
1819 end Is_Access_Constant;
1821 function Is_Ada_2005_Only (Id : E) return B is
1823 return Flag185 (Id);
1824 end Is_Ada_2005_Only;
1826 function Is_Ada_2012_Only (Id : E) return B is
1828 return Flag199 (Id);
1829 end Is_Ada_2012_Only;
1831 function Is_Aliased (Id : E) return B is
1833 pragma Assert (Nkind (Id) in N_Entity);
1837 function Is_AST_Entry (Id : E) return B is
1839 pragma Assert (Is_Entry (Id));
1840 return Flag132 (Id);
1843 function Is_Asynchronous (Id : E) return B is
1845 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1847 end Is_Asynchronous;
1849 function Is_Atomic (Id : E) return B is
1854 function Is_Bit_Packed_Array (Id : E) return B is
1856 return Flag122 (Implementation_Base_Type (Id));
1857 end Is_Bit_Packed_Array;
1859 function Is_Called (Id : E) return B is
1861 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1862 return Flag102 (Id);
1865 function Is_Character_Type (Id : E) return B is
1868 end Is_Character_Type;
1870 function Is_Child_Unit (Id : E) return B is
1875 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1878 end Is_Class_Wide_Equivalent_Type;
1880 function Is_Compilation_Unit (Id : E) return B is
1882 return Flag149 (Id);
1883 end Is_Compilation_Unit;
1885 function Is_Completely_Hidden (Id : E) return B is
1887 pragma Assert (Ekind (Id) = E_Discriminant);
1888 return Flag103 (Id);
1889 end Is_Completely_Hidden;
1891 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1894 end Is_Constr_Subt_For_U_Nominal;
1896 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1898 return Flag141 (Id);
1899 end Is_Constr_Subt_For_UN_Aliased;
1901 function Is_Constrained (Id : E) return B is
1903 pragma Assert (Nkind (Id) in N_Entity);
1907 function Is_Constructor (Id : E) return B is
1912 function Is_Controlled (Id : E) return B is
1914 return Flag42 (Base_Type (Id));
1917 function Is_Controlling_Formal (Id : E) return B is
1919 pragma Assert (Is_Formal (Id));
1921 end Is_Controlling_Formal;
1923 function Is_CPP_Class (Id : E) return B is
1928 function Is_Descendent_Of_Address (Id : E) return B is
1930 pragma Assert (Is_Type (Id));
1931 return Flag223 (Id);
1932 end Is_Descendent_Of_Address;
1934 function Is_Discrim_SO_Function (Id : E) return B is
1936 return Flag176 (Id);
1937 end Is_Discrim_SO_Function;
1939 function Is_Dispatch_Table_Entity (Id : E) return B is
1941 return Flag234 (Id);
1942 end Is_Dispatch_Table_Entity;
1944 function Is_Dispatching_Operation (Id : E) return B is
1946 pragma Assert (Nkind (Id) in N_Entity);
1948 end Is_Dispatching_Operation;
1950 function Is_Eliminated (Id : E) return B is
1952 return Flag124 (Id);
1955 function Is_Entry_Formal (Id : E) return B is
1958 end Is_Entry_Formal;
1960 function Is_Exported (Id : E) return B is
1965 function Is_First_Subtype (Id : E) return B is
1968 end Is_First_Subtype;
1970 function Is_For_Access_Subtype (Id : E) return B is
1972 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
1973 return Flag118 (Id);
1974 end Is_For_Access_Subtype;
1976 function Is_Formal_Subprogram (Id : E) return B is
1978 return Flag111 (Id);
1979 end Is_Formal_Subprogram;
1981 function Is_Frozen (Id : E) return B is
1986 function Is_Generic_Actual_Type (Id : E) return B is
1988 pragma Assert (Is_Type (Id));
1990 end Is_Generic_Actual_Type;
1992 function Is_Generic_Instance (Id : E) return B is
1994 return Flag130 (Id);
1995 end Is_Generic_Instance;
1997 function Is_Generic_Type (Id : E) return B is
1999 pragma Assert (Nkind (Id) in N_Entity);
2001 end Is_Generic_Type;
2003 function Is_Hidden (Id : E) return B is
2008 function Is_Hidden_Open_Scope (Id : E) return B is
2010 return Flag171 (Id);
2011 end Is_Hidden_Open_Scope;
2013 function Is_Immediately_Visible (Id : E) return B is
2015 pragma Assert (Nkind (Id) in N_Entity);
2017 end Is_Immediately_Visible;
2019 function Is_Implementation_Defined (Id : E) return B is
2021 return Flag254 (Id);
2022 end Is_Implementation_Defined;
2024 function Is_Imported (Id : E) return B is
2029 function Is_Inlined (Id : E) return B is
2034 function Is_Interface (Id : E) return B is
2036 return Flag186 (Id);
2039 function Is_Instantiated (Id : E) return B is
2041 return Flag126 (Id);
2042 end Is_Instantiated;
2044 function Is_Internal (Id : E) return B is
2046 pragma Assert (Nkind (Id) in N_Entity);
2050 function Is_Interrupt_Handler (Id : E) return B is
2052 pragma Assert (Nkind (Id) in N_Entity);
2054 end Is_Interrupt_Handler;
2056 function Is_Intrinsic_Subprogram (Id : E) return B is
2059 end Is_Intrinsic_Subprogram;
2061 function Is_Invariant_Procedure (Id : E) return B is
2063 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2064 return Flag257 (Id);
2065 end Is_Invariant_Procedure;
2067 function Is_Itype (Id : E) return B is
2072 function Is_Known_Non_Null (Id : E) return B is
2075 end Is_Known_Non_Null;
2077 function Is_Known_Null (Id : E) return B is
2079 return Flag204 (Id);
2082 function Is_Known_Valid (Id : E) return B is
2084 return Flag170 (Id);
2087 function Is_Limited_Composite (Id : E) return B is
2089 return Flag106 (Id);
2090 end Is_Limited_Composite;
2092 function Is_Limited_Interface (Id : E) return B is
2094 return Flag197 (Id);
2095 end Is_Limited_Interface;
2097 function Is_Limited_Record (Id : E) return B is
2100 end Is_Limited_Record;
2102 function Is_Machine_Code_Subprogram (Id : E) return B is
2104 pragma Assert (Is_Subprogram (Id));
2105 return Flag137 (Id);
2106 end Is_Machine_Code_Subprogram;
2108 function Is_Non_Static_Subtype (Id : E) return B is
2110 pragma Assert (Is_Type (Id));
2111 return Flag109 (Id);
2112 end Is_Non_Static_Subtype;
2114 function Is_Null_Init_Proc (Id : E) return B is
2116 pragma Assert (Ekind (Id) = E_Procedure);
2117 return Flag178 (Id);
2118 end Is_Null_Init_Proc;
2120 function Is_Obsolescent (Id : E) return B is
2122 return Flag153 (Id);
2125 function Is_Only_Out_Parameter (Id : E) return B is
2127 pragma Assert (Is_Formal (Id));
2128 return Flag226 (Id);
2129 end Is_Only_Out_Parameter;
2131 function Is_Optional_Parameter (Id : E) return B is
2133 pragma Assert (Is_Formal (Id));
2134 return Flag134 (Id);
2135 end Is_Optional_Parameter;
2137 function Is_Package_Body_Entity (Id : E) return B is
2139 return Flag160 (Id);
2140 end Is_Package_Body_Entity;
2142 function Is_Packed (Id : E) return B is
2144 return Flag51 (Implementation_Base_Type (Id));
2147 function Is_Packed_Array_Type (Id : E) return B is
2149 return Flag138 (Id);
2150 end Is_Packed_Array_Type;
2152 function Is_Potentially_Use_Visible (Id : E) return B is
2154 pragma Assert (Nkind (Id) in N_Entity);
2156 end Is_Potentially_Use_Visible;
2158 function Is_Predicate_Function (Id : E) return B is
2160 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2161 return Flag255 (Id);
2162 end Is_Predicate_Function;
2164 function Is_Predicate_Function_M (Id : E) return B is
2166 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2167 return Flag256 (Id);
2168 end Is_Predicate_Function_M;
2170 function Is_Preelaborated (Id : E) return B is
2173 end Is_Preelaborated;
2175 function Is_Primitive (Id : E) return B is
2178 (Is_Overloadable (Id)
2179 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
2180 return Flag218 (Id);
2183 function Is_Primitive_Wrapper (Id : E) return B is
2185 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2186 return Flag195 (Id);
2187 end Is_Primitive_Wrapper;
2189 function Is_Private_Composite (Id : E) return B is
2191 pragma Assert (Is_Type (Id));
2192 return Flag107 (Id);
2193 end Is_Private_Composite;
2195 function Is_Private_Descendant (Id : E) return B is
2198 end Is_Private_Descendant;
2200 function Is_Private_Primitive (Id : E) return B is
2202 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2203 return Flag245 (Id);
2204 end Is_Private_Primitive;
2206 function Is_Processed_Transient (Id : E) return B is
2208 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2209 return Flag252 (Id);
2210 end Is_Processed_Transient;
2212 function Is_Public (Id : E) return B is
2214 pragma Assert (Nkind (Id) in N_Entity);
2218 function Is_Pure (Id : E) return B is
2223 function Is_Pure_Unit_Access_Type (Id : E) return B is
2225 pragma Assert (Is_Access_Type (Id));
2226 return Flag189 (Id);
2227 end Is_Pure_Unit_Access_Type;
2229 function Is_RACW_Stub_Type (Id : E) return B is
2231 pragma Assert (Is_Type (Id));
2232 return Flag244 (Id);
2233 end Is_RACW_Stub_Type;
2235 function Is_Raised (Id : E) return B is
2237 pragma Assert (Ekind (Id) = E_Exception);
2238 return Flag224 (Id);
2241 function Is_Remote_Call_Interface (Id : E) return B is
2244 end Is_Remote_Call_Interface;
2246 function Is_Remote_Types (Id : E) return B is
2249 end Is_Remote_Types;
2251 function Is_Renaming_Of_Object (Id : E) return B is
2253 return Flag112 (Id);
2254 end Is_Renaming_Of_Object;
2256 function Is_Return_Object (Id : E) return B is
2258 return Flag209 (Id);
2259 end Is_Return_Object;
2261 function Is_Safe_To_Reevaluate (Id : E) return B is
2263 return Flag249 (Id);
2264 end Is_Safe_To_Reevaluate;
2266 function Is_Shared_Passive (Id : E) return B is
2269 end Is_Shared_Passive;
2271 function Is_Statically_Allocated (Id : E) return B is
2274 end Is_Statically_Allocated;
2276 function Is_Tag (Id : E) return B is
2278 pragma Assert (Nkind (Id) in N_Entity);
2282 function Is_Tagged_Type (Id : E) return B is
2287 function Is_Thunk (Id : E) return B is
2289 return Flag225 (Id);
2292 function Is_Trivial_Subprogram (Id : E) return B is
2294 return Flag235 (Id);
2295 end Is_Trivial_Subprogram;
2297 function Is_True_Constant (Id : E) return B is
2299 return Flag163 (Id);
2300 end Is_True_Constant;
2302 function Is_Unchecked_Union (Id : E) return B is
2304 return Flag117 (Implementation_Base_Type (Id));
2305 end Is_Unchecked_Union;
2307 function Is_Underlying_Record_View (Id : E) return B is
2309 return Flag246 (Id);
2310 end Is_Underlying_Record_View;
2312 function Is_Unsigned_Type (Id : E) return B is
2314 pragma Assert (Is_Type (Id));
2315 return Flag144 (Id);
2316 end Is_Unsigned_Type;
2318 function Is_Valued_Procedure (Id : E) return B is
2320 pragma Assert (Ekind (Id) = E_Procedure);
2321 return Flag127 (Id);
2322 end Is_Valued_Procedure;
2324 function Is_Visible_Formal (Id : E) return B is
2326 return Flag206 (Id);
2327 end Is_Visible_Formal;
2329 function Is_Visible_Lib_Unit (Id : E) return B is
2331 return Flag116 (Id);
2332 end Is_Visible_Lib_Unit;
2334 function Is_VMS_Exception (Id : E) return B is
2336 return Flag133 (Id);
2337 end Is_VMS_Exception;
2339 function Is_Volatile (Id : E) return B is
2341 pragma Assert (Nkind (Id) in N_Entity);
2343 if Is_Type (Id) then
2344 return Flag16 (Base_Type (Id));
2350 function Itype_Printed (Id : E) return B is
2352 pragma Assert (Is_Itype (Id));
2353 return Flag202 (Id);
2356 function Kill_Elaboration_Checks (Id : E) return B is
2359 end Kill_Elaboration_Checks;
2361 function Kill_Range_Checks (Id : E) return B is
2364 end Kill_Range_Checks;
2366 function Known_To_Have_Preelab_Init (Id : E) return B is
2368 pragma Assert (Is_Type (Id));
2369 return Flag207 (Id);
2370 end Known_To_Have_Preelab_Init;
2372 function Last_Assignment (Id : E) return N is
2374 pragma Assert (Is_Assignable (Id));
2376 end Last_Assignment;
2378 function Last_Entity (Id : E) return E is
2383 function Limited_View (Id : E) return E is
2385 pragma Assert (Ekind (Id) = E_Package);
2389 function Lit_Indexes (Id : E) return E is
2391 pragma Assert (Is_Enumeration_Type (Id));
2395 function Lit_Strings (Id : E) return E is
2397 pragma Assert (Is_Enumeration_Type (Id));
2401 function Low_Bound_Tested (Id : E) return B is
2403 return Flag205 (Id);
2404 end Low_Bound_Tested;
2406 function Machine_Radix_10 (Id : E) return B is
2408 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2410 end Machine_Radix_10;
2412 function Master_Id (Id : E) return E is
2414 pragma Assert (Is_Access_Type (Id));
2418 function Materialize_Entity (Id : E) return B is
2420 return Flag168 (Id);
2421 end Materialize_Entity;
2423 function May_Inherit_Delayed_Rep_Aspects (Id : E) return B is
2425 return Flag262 (Id);
2426 end May_Inherit_Delayed_Rep_Aspects;
2428 function Mechanism (Id : E) return M is
2430 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2431 return UI_To_Int (Uint8 (Id));
2434 function Modulus (Id : E) return Uint is
2436 pragma Assert (Is_Modular_Integer_Type (Id));
2437 return Uint17 (Base_Type (Id));
2440 function Must_Be_On_Byte_Boundary (Id : E) return B is
2442 pragma Assert (Is_Type (Id));
2443 return Flag183 (Id);
2444 end Must_Be_On_Byte_Boundary;
2446 function Must_Have_Preelab_Init (Id : E) return B is
2448 pragma Assert (Is_Type (Id));
2449 return Flag208 (Id);
2450 end Must_Have_Preelab_Init;
2452 function Needs_Debug_Info (Id : E) return B is
2454 return Flag147 (Id);
2455 end Needs_Debug_Info;
2457 function Needs_No_Actuals (Id : E) return B is
2460 (Is_Overloadable (Id)
2461 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2463 end Needs_No_Actuals;
2465 function Never_Set_In_Source (Id : E) return B is
2467 return Flag115 (Id);
2468 end Never_Set_In_Source;
2470 function Next_Inlined_Subprogram (Id : E) return E is
2473 end Next_Inlined_Subprogram;
2475 function No_Pool_Assigned (Id : E) return B is
2477 pragma Assert (Is_Access_Type (Id));
2478 return Flag131 (Root_Type (Id));
2479 end No_Pool_Assigned;
2481 function No_Return (Id : E) return B is
2483 return Flag113 (Id);
2486 function No_Strict_Aliasing (Id : E) return B is
2488 pragma Assert (Is_Access_Type (Id));
2489 return Flag136 (Base_Type (Id));
2490 end No_Strict_Aliasing;
2492 function Non_Binary_Modulus (Id : E) return B is
2494 pragma Assert (Is_Type (Id));
2495 return Flag58 (Base_Type (Id));
2496 end Non_Binary_Modulus;
2498 function Non_Limited_View (Id : E) return E is
2500 pragma Assert (Ekind (Id) in Incomplete_Kind);
2502 end Non_Limited_View;
2504 function Nonzero_Is_True (Id : E) return B is
2506 pragma Assert (Root_Type (Id) = Standard_Boolean);
2507 return Flag162 (Base_Type (Id));
2508 end Nonzero_Is_True;
2510 function Normalized_First_Bit (Id : E) return U is
2512 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2514 end Normalized_First_Bit;
2516 function Normalized_Position (Id : E) return U is
2518 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2520 end Normalized_Position;
2522 function Normalized_Position_Max (Id : E) return U is
2524 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2526 end Normalized_Position_Max;
2528 function OK_To_Rename (Id : E) return B is
2530 pragma Assert (Ekind (Id) = E_Variable);
2531 return Flag247 (Id);
2534 function OK_To_Reorder_Components (Id : E) return B is
2536 pragma Assert (Is_Record_Type (Id));
2537 return Flag239 (Base_Type (Id));
2538 end OK_To_Reorder_Components;
2540 function Optimize_Alignment_Space (Id : E) return B is
2543 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2544 return Flag241 (Id);
2545 end Optimize_Alignment_Space;
2547 function Optimize_Alignment_Time (Id : E) return B is
2550 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2551 return Flag242 (Id);
2552 end Optimize_Alignment_Time;
2554 function Original_Access_Type (Id : E) return E is
2556 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2558 end Original_Access_Type;
2560 function Original_Array_Type (Id : E) return E is
2562 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2564 end Original_Array_Type;
2566 function Original_Record_Component (Id : E) return E is
2568 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2570 end Original_Record_Component;
2572 function Overlays_Constant (Id : E) return B is
2574 return Flag243 (Id);
2575 end Overlays_Constant;
2577 function Overridden_Operation (Id : E) return E is
2580 end Overridden_Operation;
2582 function Package_Instantiation (Id : E) return N is
2584 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2586 end Package_Instantiation;
2588 function Packed_Array_Type (Id : E) return E is
2590 pragma Assert (Is_Array_Type (Id));
2592 end Packed_Array_Type;
2594 function Parent_Subtype (Id : E) return E is
2596 pragma Assert (Is_Record_Type (Id));
2597 return Node19 (Base_Type (Id));
2600 function Postcondition_Proc (Id : E) return E is
2602 pragma Assert (Ekind (Id) = E_Procedure);
2604 end Postcondition_Proc;
2606 function PPC_Wrapper (Id : E) return E is
2608 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2612 function Prival (Id : E) return E is
2614 pragma Assert (Is_Protected_Component (Id));
2618 function Prival_Link (Id : E) return E is
2620 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2624 function Private_Dependents (Id : E) return L is
2626 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2627 return Elist18 (Id);
2628 end Private_Dependents;
2630 function Private_View (Id : E) return N is
2632 pragma Assert (Is_Private_Type (Id));
2636 function Protected_Body_Subprogram (Id : E) return E is
2638 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2640 end Protected_Body_Subprogram;
2642 function Protected_Formal (Id : E) return E is
2644 pragma Assert (Is_Formal (Id));
2646 end Protected_Formal;
2648 function Protection_Object (Id : E) return E is
2651 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2653 end Protection_Object;
2655 function Reachable (Id : E) return B is
2660 function Referenced (Id : E) return B is
2662 return Flag156 (Id);
2665 function Referenced_As_LHS (Id : E) return B is
2668 end Referenced_As_LHS;
2670 function Referenced_As_Out_Parameter (Id : E) return B is
2672 return Flag227 (Id);
2673 end Referenced_As_Out_Parameter;
2675 function Refined_State (Id : E) return N is
2677 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
2681 function Refinement_Constituents (Id : E) return L is
2683 pragma Assert (Ekind (Id) = E_Abstract_State);
2685 end Refinement_Constituents;
2687 function Register_Exception_Call (Id : E) return N is
2689 pragma Assert (Ekind (Id) = E_Exception);
2691 end Register_Exception_Call;
2693 function Related_Array_Object (Id : E) return E is
2695 pragma Assert (Is_Array_Type (Id));
2697 end Related_Array_Object;
2699 function Related_Expression (Id : E) return N is
2701 pragma Assert (Ekind (Id) in Type_Kind
2702 or else Ekind_In (Id, E_Constant, E_Variable));
2704 end Related_Expression;
2706 function Related_Instance (Id : E) return E is
2708 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2710 end Related_Instance;
2712 function Related_Type (Id : E) return E is
2714 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2718 function Relative_Deadline_Variable (Id : E) return E is
2720 pragma Assert (Is_Task_Type (Id));
2721 return Node26 (Implementation_Base_Type (Id));
2722 end Relative_Deadline_Variable;
2724 function Renamed_Entity (Id : E) return N is
2729 function Renamed_In_Spec (Id : E) return B is
2731 pragma Assert (Ekind (Id) = E_Package);
2732 return Flag231 (Id);
2733 end Renamed_In_Spec;
2735 function Renamed_Object (Id : E) return N is
2740 function Renaming_Map (Id : E) return U is
2745 function Requires_Overriding (Id : E) return B is
2747 pragma Assert (Is_Overloadable (Id));
2748 return Flag213 (Id);
2749 end Requires_Overriding;
2751 function Return_Present (Id : E) return B is
2756 function Return_Applies_To (Id : E) return N is
2759 end Return_Applies_To;
2761 function Returns_By_Ref (Id : E) return B is
2766 function Reverse_Bit_Order (Id : E) return B is
2768 pragma Assert (Is_Record_Type (Id));
2769 return Flag164 (Base_Type (Id));
2770 end Reverse_Bit_Order;
2772 function Reverse_Storage_Order (Id : E) return B is
2774 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
2775 return Flag93 (Base_Type (Id));
2776 end Reverse_Storage_Order;
2778 function RM_Size (Id : E) return U is
2780 pragma Assert (Is_Type (Id));
2784 function Scalar_Range (Id : E) return N is
2789 function Scale_Value (Id : E) return U is
2794 function Scope_Depth_Value (Id : E) return U is
2797 end Scope_Depth_Value;
2799 function Sec_Stack_Needed_For_Return (Id : E) return B is
2801 return Flag167 (Id);
2802 end Sec_Stack_Needed_For_Return;
2804 function Shadow_Entities (Id : E) return S is
2806 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2808 end Shadow_Entities;
2810 function Shared_Var_Procs_Instance (Id : E) return E is
2812 pragma Assert (Ekind (Id) = E_Variable);
2814 end Shared_Var_Procs_Instance;
2816 function Size_Check_Code (Id : E) return N is
2818 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2820 end Size_Check_Code;
2822 function Size_Depends_On_Discriminant (Id : E) return B is
2824 return Flag177 (Id);
2825 end Size_Depends_On_Discriminant;
2827 function Size_Known_At_Compile_Time (Id : E) return B is
2830 end Size_Known_At_Compile_Time;
2832 function Small_Value (Id : E) return R is
2834 pragma Assert (Is_Fixed_Point_Type (Id));
2835 return Ureal21 (Id);
2838 function SPARK_Mode_Pragmas (Id : E) return N is
2841 (Ekind_In (Id, E_Function, -- subprogram variants
2843 E_Generic_Procedure,
2847 Ekind_In (Id, E_Generic_Package, -- package variants
2851 end SPARK_Mode_Pragmas;
2853 function Spec_Entity (Id : E) return E is
2855 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2859 function Static_Predicate (Id : E) return S is
2861 pragma Assert (Is_Discrete_Type (Id));
2863 end Static_Predicate;
2865 function Status_Flag_Or_Transient_Decl (Id : E) return N is
2867 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2869 end Status_Flag_Or_Transient_Decl;
2871 function Storage_Size_Variable (Id : E) return E is
2873 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2874 return Node15 (Implementation_Base_Type (Id));
2875 end Storage_Size_Variable;
2877 function Static_Elaboration_Desired (Id : E) return B is
2879 pragma Assert (Ekind (Id) = E_Package);
2881 end Static_Elaboration_Desired;
2883 function Static_Initialization (Id : E) return N is
2886 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
2888 end Static_Initialization;
2890 function Stored_Constraint (Id : E) return L is
2893 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
2894 return Elist23 (Id);
2895 end Stored_Constraint;
2897 function Strict_Alignment (Id : E) return B is
2899 return Flag145 (Implementation_Base_Type (Id));
2900 end Strict_Alignment;
2902 function String_Literal_Length (Id : E) return U is
2905 end String_Literal_Length;
2907 function String_Literal_Low_Bound (Id : E) return N is
2910 end String_Literal_Low_Bound;
2912 function Subprograms_For_Type (Id : E) return E is
2914 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
2916 end Subprograms_For_Type;
2918 function Suppress_Elaboration_Warnings (Id : E) return B is
2920 return Flag148 (Id);
2921 end Suppress_Elaboration_Warnings;
2923 function Suppress_Initialization (Id : E) return B is
2925 pragma Assert (Is_Type (Id));
2926 return Flag105 (Id);
2927 end Suppress_Initialization;
2929 function Suppress_Style_Checks (Id : E) return B is
2931 return Flag165 (Id);
2932 end Suppress_Style_Checks;
2934 function Suppress_Value_Tracking_On_Call (Id : E) return B is
2936 return Flag217 (Id);
2937 end Suppress_Value_Tracking_On_Call;
2939 function Task_Body_Procedure (Id : E) return N is
2941 pragma Assert (Ekind (Id) in Task_Kind);
2943 end Task_Body_Procedure;
2945 function Thunk_Entity (Id : E) return E is
2947 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
2948 and then Is_Thunk (Id));
2952 function Treat_As_Volatile (Id : E) return B is
2955 end Treat_As_Volatile;
2957 function Underlying_Full_View (Id : E) return E is
2959 pragma Assert (Ekind (Id) in Private_Kind);
2961 end Underlying_Full_View;
2963 function Underlying_Record_View (Id : E) return E is
2966 end Underlying_Record_View;
2968 function Universal_Aliasing (Id : E) return B is
2970 pragma Assert (Is_Type (Id));
2971 return Flag216 (Implementation_Base_Type (Id));
2972 end Universal_Aliasing;
2974 function Unset_Reference (Id : E) return N is
2977 end Unset_Reference;
2979 function Used_As_Generic_Actual (Id : E) return B is
2981 return Flag222 (Id);
2982 end Used_As_Generic_Actual;
2984 function Uses_Lock_Free (Id : E) return B is
2986 pragma Assert (Is_Protected_Type (Id));
2987 return Flag188 (Id);
2990 function Uses_Sec_Stack (Id : E) return B is
2995 function Warnings_Off (Id : E) return B is
3000 function Warnings_Off_Used (Id : E) return B is
3002 return Flag236 (Id);
3003 end Warnings_Off_Used;
3005 function Warnings_Off_Used_Unmodified (Id : E) return B is
3007 return Flag237 (Id);
3008 end Warnings_Off_Used_Unmodified;
3010 function Warnings_Off_Used_Unreferenced (Id : E) return B is
3012 return Flag238 (Id);
3013 end Warnings_Off_Used_Unreferenced;
3015 function Wrapped_Entity (Id : E) return E is
3017 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3018 and then Is_Primitive_Wrapper (Id));
3022 function Was_Hidden (Id : E) return B is
3024 return Flag196 (Id);
3027 ------------------------------
3028 -- Classification Functions --
3029 ------------------------------
3031 function Is_Access_Type (Id : E) return B is
3033 return Ekind (Id) in Access_Kind;
3036 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
3038 return Ekind (Id) in Access_Protected_Kind;
3039 end Is_Access_Protected_Subprogram_Type;
3041 function Is_Access_Subprogram_Type (Id : E) return B is
3043 return Ekind (Id) in Access_Subprogram_Kind;
3044 end Is_Access_Subprogram_Type;
3046 function Is_Aggregate_Type (Id : E) return B is
3048 return Ekind (Id) in Aggregate_Kind;
3049 end Is_Aggregate_Type;
3051 function Is_Array_Type (Id : E) return B is
3053 return Ekind (Id) in Array_Kind;
3056 function Is_Assignable (Id : E) return B is
3058 return Ekind (Id) in Assignable_Kind;
3061 function Is_Class_Wide_Type (Id : E) return B is
3063 return Ekind (Id) in Class_Wide_Kind;
3064 end Is_Class_Wide_Type;
3066 function Is_Composite_Type (Id : E) return B is
3068 return Ekind (Id) in Composite_Kind;
3069 end Is_Composite_Type;
3071 function Is_Concurrent_Body (Id : E) return B is
3073 return Ekind (Id) in
3074 Concurrent_Body_Kind;
3075 end Is_Concurrent_Body;
3077 function Is_Concurrent_Record_Type (Id : E) return B is
3080 end Is_Concurrent_Record_Type;
3082 function Is_Concurrent_Type (Id : E) return B is
3084 return Ekind (Id) in Concurrent_Kind;
3085 end Is_Concurrent_Type;
3087 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
3089 return Ekind (Id) in
3090 Decimal_Fixed_Point_Kind;
3091 end Is_Decimal_Fixed_Point_Type;
3093 function Is_Digits_Type (Id : E) return B is
3095 return Ekind (Id) in Digits_Kind;
3098 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
3100 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
3101 end Is_Discrete_Or_Fixed_Point_Type;
3103 function Is_Discrete_Type (Id : E) return B is
3105 return Ekind (Id) in Discrete_Kind;
3106 end Is_Discrete_Type;
3108 function Is_Elementary_Type (Id : E) return B is
3110 return Ekind (Id) in Elementary_Kind;
3111 end Is_Elementary_Type;
3113 function Is_Entry (Id : E) return B is
3115 return Ekind (Id) in Entry_Kind;
3118 function Is_Enumeration_Type (Id : E) return B is
3120 return Ekind (Id) in
3122 end Is_Enumeration_Type;
3124 function Is_Fixed_Point_Type (Id : E) return B is
3126 return Ekind (Id) in
3128 end Is_Fixed_Point_Type;
3130 function Is_Floating_Point_Type (Id : E) return B is
3132 return Ekind (Id) in Float_Kind;
3133 end Is_Floating_Point_Type;
3135 function Is_Formal (Id : E) return B is
3137 return Ekind (Id) in Formal_Kind;
3140 function Is_Formal_Object (Id : E) return B is
3142 return Ekind (Id) in Formal_Object_Kind;
3143 end Is_Formal_Object;
3145 function Is_Generic_Subprogram (Id : E) return B is
3147 return Ekind (Id) in Generic_Subprogram_Kind;
3148 end Is_Generic_Subprogram;
3150 function Is_Generic_Unit (Id : E) return B is
3152 return Ekind (Id) in Generic_Unit_Kind;
3153 end Is_Generic_Unit;
3155 function Is_Incomplete_Or_Private_Type (Id : E) return B is
3157 return Ekind (Id) in
3158 Incomplete_Or_Private_Kind;
3159 end Is_Incomplete_Or_Private_Type;
3161 function Is_Incomplete_Type (Id : E) return B is
3163 return Ekind (Id) in
3165 end Is_Incomplete_Type;
3167 function Is_Integer_Type (Id : E) return B is
3169 return Ekind (Id) in Integer_Kind;
3170 end Is_Integer_Type;
3172 function Is_Modular_Integer_Type (Id : E) return B is
3174 return Ekind (Id) in
3175 Modular_Integer_Kind;
3176 end Is_Modular_Integer_Type;
3178 function Is_Named_Number (Id : E) return B is
3180 return Ekind (Id) in Named_Kind;
3181 end Is_Named_Number;
3183 function Is_Numeric_Type (Id : E) return B is
3185 return Ekind (Id) in Numeric_Kind;
3186 end Is_Numeric_Type;
3188 function Is_Object (Id : E) return B is
3190 return Ekind (Id) in Object_Kind;
3193 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
3195 return Ekind (Id) in
3196 Ordinary_Fixed_Point_Kind;
3197 end Is_Ordinary_Fixed_Point_Type;
3199 function Is_Overloadable (Id : E) return B is
3201 return Ekind (Id) in Overloadable_Kind;
3202 end Is_Overloadable;
3204 function Is_Private_Type (Id : E) return B is
3206 return Ekind (Id) in Private_Kind;
3207 end Is_Private_Type;
3209 function Is_Protected_Type (Id : E) return B is
3211 return Ekind (Id) in Protected_Kind;
3212 end Is_Protected_Type;
3214 function Is_Real_Type (Id : E) return B is
3216 return Ekind (Id) in Real_Kind;
3219 function Is_Record_Type (Id : E) return B is
3221 return Ekind (Id) in Record_Kind;
3224 function Is_Scalar_Type (Id : E) return B is
3226 return Ekind (Id) in Scalar_Kind;
3229 function Is_Signed_Integer_Type (Id : E) return B is
3231 return Ekind (Id) in Signed_Integer_Kind;
3232 end Is_Signed_Integer_Type;
3234 function Is_Subprogram (Id : E) return B is
3236 return Ekind (Id) in Subprogram_Kind;
3239 function Is_Task_Type (Id : E) return B is
3241 return Ekind (Id) in Task_Kind;
3244 function Is_Type (Id : E) return B is
3246 return Ekind (Id) in Type_Kind;
3249 ------------------------------
3250 -- Attribute Set Procedures --
3251 ------------------------------
3253 -- Note: in many of these set procedures an "obvious" assertion is missing.
3254 -- The reason for this is that in many cases, a field is set before the
3255 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3256 -- it is possible to add assertions that specifically include the E_Void
3257 -- possibility, but in some cases, we just omit the assertions.
3259 procedure Set_Abstract_States (Id : E; V : L) is
3261 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
3262 Set_Elist25 (Id, V);
3263 end Set_Abstract_States;
3265 procedure Set_Accept_Address (Id : E; V : L) is
3267 Set_Elist21 (Id, V);
3268 end Set_Accept_Address;
3270 procedure Set_Access_Disp_Table (Id : E; V : L) is
3272 pragma Assert (Ekind (Id) = E_Record_Type
3273 and then Id = Implementation_Base_Type (Id));
3274 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3275 Set_Elist16 (Id, V);
3276 end Set_Access_Disp_Table;
3278 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3281 end Set_Associated_Formal_Package;
3283 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3286 end Set_Associated_Node_For_Itype;
3288 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3290 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3292 end Set_Associated_Storage_Pool;
3294 procedure Set_Actual_Subtype (Id : E; V : E) is
3297 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3298 or else Is_Formal (Id));
3300 end Set_Actual_Subtype;
3302 procedure Set_Address_Taken (Id : E; V : B := True) is
3304 Set_Flag104 (Id, V);
3305 end Set_Address_Taken;
3307 procedure Set_Alias (Id : E; V : E) is
3310 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3314 procedure Set_Alignment (Id : E; V : U) is
3316 pragma Assert (Is_Type (Id)
3317 or else Is_Formal (Id)
3318 or else Ekind_In (Id, E_Loop_Parameter,
3325 procedure Set_Barrier_Function (Id : E; V : N) is
3327 pragma Assert (Is_Entry (Id));
3329 end Set_Barrier_Function;
3331 procedure Set_Block_Node (Id : E; V : N) is
3333 pragma Assert (Ekind (Id) = E_Block);
3337 procedure Set_Body_Entity (Id : E; V : E) is
3339 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3341 end Set_Body_Entity;
3343 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3346 (Ekind (Id) = E_Package
3347 or else Is_Subprogram (Id)
3348 or else Is_Generic_Unit (Id));
3350 end Set_Body_Needed_For_SAL;
3352 procedure Set_Body_References (Id : E; V : L) is
3354 pragma Assert (Ekind (Id) = E_Abstract_State);
3355 Set_Elist16 (Id, V);
3356 end Set_Body_References;
3358 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3360 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3361 Set_Flag125 (Id, V);
3362 end Set_C_Pass_By_Copy;
3364 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3367 end Set_Can_Never_Be_Null;
3369 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3372 end Set_Checks_May_Be_Suppressed;
3374 procedure Set_Class_Wide_Type (Id : E; V : E) is
3376 pragma Assert (Is_Type (Id));
3378 end Set_Class_Wide_Type;
3380 procedure Set_Cloned_Subtype (Id : E; V : E) is
3382 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3384 end Set_Cloned_Subtype;
3386 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3388 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3390 end Set_Component_Bit_Offset;
3392 procedure Set_Component_Clause (Id : E; V : N) is
3394 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3396 end Set_Component_Clause;
3398 procedure Set_Component_Size (Id : E; V : U) is
3400 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3402 end Set_Component_Size;
3404 procedure Set_Component_Type (Id : E; V : E) is
3406 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3408 end Set_Component_Type;
3410 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3413 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3415 end Set_Corresponding_Concurrent_Type;
3417 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3419 pragma Assert (Ekind (Id) = E_Discriminant);
3421 end Set_Corresponding_Discriminant;
3423 procedure Set_Corresponding_Equality (Id : E; V : E) is
3426 (Ekind (Id) = E_Function
3427 and then not Comes_From_Source (Id)
3428 and then Chars (Id) = Name_Op_Ne);
3430 end Set_Corresponding_Equality;
3432 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3434 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3436 end Set_Corresponding_Protected_Entry;
3438 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3440 pragma Assert (Is_Concurrent_Type (Id));
3442 end Set_Corresponding_Record_Type;
3444 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3447 end Set_Corresponding_Remote_Type;
3449 procedure Set_Current_Use_Clause (Id : E; V : E) is
3451 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3453 end Set_Current_Use_Clause;
3455 procedure Set_Current_Value (Id : E; V : N) is
3457 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3459 end Set_Current_Value;
3461 procedure Set_CR_Discriminant (Id : E; V : E) is
3464 end Set_CR_Discriminant;
3466 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3468 Set_Flag166 (Id, V);
3469 end Set_Debug_Info_Off;
3471 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3474 end Set_Debug_Renaming_Link;
3476 procedure Set_Default_Aspect_Component_Value (Id : E; V : E) is
3478 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3480 end Set_Default_Aspect_Component_Value;
3482 procedure Set_Default_Aspect_Value (Id : E; V : E) is
3484 pragma Assert (Is_Scalar_Type (Id) and then Is_Base_Type (Id));
3486 end Set_Default_Aspect_Value;
3488 procedure Set_Default_Expr_Function (Id : E; V : E) is
3490 pragma Assert (Is_Formal (Id));
3492 end Set_Default_Expr_Function;
3494 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3496 Set_Flag108 (Id, V);
3497 end Set_Default_Expressions_Processed;
3499 procedure Set_Default_Value (Id : E; V : N) is
3501 pragma Assert (Is_Formal (Id));
3503 end Set_Default_Value;
3505 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3509 or else Is_Task_Type (Id)
3510 or else Ekind (Id) = E_Block);
3511 Set_Flag114 (Id, V);
3512 end Set_Delay_Cleanups;
3514 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3517 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3520 end Set_Delay_Subprogram_Descriptors;
3522 procedure Set_Delta_Value (Id : E; V : R) is
3524 pragma Assert (Is_Fixed_Point_Type (Id));
3525 Set_Ureal18 (Id, V);
3526 end Set_Delta_Value;
3528 procedure Set_Dependent_Instances (Id : E; V : L) is
3530 pragma Assert (Is_Generic_Instance (Id));
3532 end Set_Dependent_Instances;
3534 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3536 pragma Assert (Nkind (Id) in N_Entity);
3538 end Set_Depends_On_Private;
3540 procedure Set_Digits_Value (Id : E; V : U) is
3543 (Is_Floating_Point_Type (Id)
3544 or else Is_Decimal_Fixed_Point_Type (Id));
3546 end Set_Digits_Value;
3548 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3551 end Set_Directly_Designated_Type;
3553 procedure Set_Discard_Names (Id : E; V : B := True) is
3556 end Set_Discard_Names;
3558 procedure Set_Discriminal (Id : E; V : E) is
3560 pragma Assert (Ekind (Id) = E_Discriminant);
3562 end Set_Discriminal;
3564 procedure Set_Discriminal_Link (Id : E; V : E) is
3567 end Set_Discriminal_Link;
3569 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3571 pragma Assert (Ekind (Id) = E_Component);
3573 end Set_Discriminant_Checking_Func;
3575 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3577 pragma Assert (Nkind (Id) in N_Entity);
3578 Set_Elist21 (Id, V);
3579 end Set_Discriminant_Constraint;
3581 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3584 end Set_Discriminant_Default_Value;
3586 procedure Set_Discriminant_Number (Id : E; V : U) is
3589 end Set_Discriminant_Number;
3591 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3593 pragma Assert (Ekind (Id) = E_Record_Type
3594 and then Id = Implementation_Base_Type (Id));
3595 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3596 Set_Elist26 (Id, V);
3597 end Set_Dispatch_Table_Wrappers;
3599 procedure Set_DT_Entry_Count (Id : E; V : U) is
3601 pragma Assert (Ekind (Id) = E_Component);
3603 end Set_DT_Entry_Count;
3605 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3607 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3609 end Set_DT_Offset_To_Top_Func;
3611 procedure Set_DT_Position (Id : E; V : U) is
3613 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3615 end Set_DT_Position;
3617 procedure Set_DTC_Entity (Id : E; V : E) is
3619 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3623 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3625 pragma Assert (Ekind (Id) = E_Package);
3626 Set_Flag210 (Id, V);
3627 end Set_Elaborate_Body_Desirable;
3629 procedure Set_Elaboration_Entity (Id : E; V : E) is
3634 Ekind (Id) = E_Package
3636 Is_Generic_Unit (Id));
3638 end Set_Elaboration_Entity;
3640 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3645 Ekind (Id) = E_Package
3647 Is_Generic_Unit (Id));
3648 Set_Flag174 (Id, V);
3649 end Set_Elaboration_Entity_Required;
3651 procedure Set_Enclosing_Scope (Id : E; V : E) is
3654 end Set_Enclosing_Scope;
3656 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3658 pragma Assert (Is_Entry (Id));
3659 Set_Flag152 (Id, V);
3660 end Set_Entry_Accepted;
3662 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3665 end Set_Entry_Bodies_Array;
3667 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3670 end Set_Entry_Cancel_Parameter;
3672 procedure Set_Entry_Component (Id : E; V : E) is
3675 end Set_Entry_Component;
3677 procedure Set_Entry_Formal (Id : E; V : E) is
3680 end Set_Entry_Formal;
3682 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3684 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3686 end Set_Entry_Index_Constant;
3688 procedure Set_Contract (Id : E; V : N) is
3691 (Ekind_In (Id, E_Entry,
3698 or else Is_Generic_Subprogram (Id)
3699 or else Is_Subprogram (Id));
3703 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3706 end Set_Entry_Parameters_Type;
3708 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3710 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3712 end Set_Enum_Pos_To_Rep;
3714 procedure Set_Enumeration_Pos (Id : E; V : U) is
3716 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3718 end Set_Enumeration_Pos;
3720 procedure Set_Enumeration_Rep (Id : E; V : U) is
3722 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3724 end Set_Enumeration_Rep;
3726 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3728 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3730 end Set_Enumeration_Rep_Expr;
3732 procedure Set_Equivalent_Type (Id : E; V : E) is
3735 (Ekind_In (Id, E_Class_Wide_Type,
3736 E_Class_Wide_Subtype,
3737 E_Access_Protected_Subprogram_Type,
3738 E_Anonymous_Access_Protected_Subprogram_Type,
3739 E_Access_Subprogram_Type,
3742 end Set_Equivalent_Type;
3744 procedure Set_Esize (Id : E; V : U) is
3749 procedure Set_Exception_Code (Id : E; V : U) is
3751 pragma Assert (Ekind (Id) = E_Exception);
3753 end Set_Exception_Code;
3755 procedure Set_Extra_Accessibility (Id : E; V : E) is
3758 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
3760 end Set_Extra_Accessibility;
3762 procedure Set_Extra_Accessibility_Of_Result (Id : E; V : E) is
3764 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
3766 end Set_Extra_Accessibility_Of_Result;
3768 procedure Set_Extra_Constrained (Id : E; V : E) is
3770 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3772 end Set_Extra_Constrained;
3774 procedure Set_Extra_Formal (Id : E; V : E) is
3777 end Set_Extra_Formal;
3779 procedure Set_Extra_Formals (Id : E; V : E) is
3782 (Is_Overloadable (Id)
3783 or else Ekind_In (Id, E_Entry_Family,
3785 E_Subprogram_Type));
3787 end Set_Extra_Formals;
3789 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3792 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3793 Set_Flag229 (Id, V);
3794 end Set_Can_Use_Internal_Rep;
3796 procedure Set_Finalization_Master (Id : E; V : E) is
3798 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3800 end Set_Finalization_Master;
3802 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3804 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3805 Set_Flag158 (Id, V);
3806 end Set_Finalize_Storage_Only;
3808 procedure Set_Finalizer (Id : E; V : E) is
3810 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
3814 procedure Set_First_Entity (Id : E; V : E) is
3817 end Set_First_Entity;
3819 procedure Set_First_Exit_Statement (Id : E; V : N) is
3821 pragma Assert (Ekind (Id) = E_Loop);
3823 end Set_First_Exit_Statement;
3825 procedure Set_First_Index (Id : E; V : N) is
3827 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3829 end Set_First_Index;
3831 procedure Set_First_Literal (Id : E; V : E) is
3833 pragma Assert (Is_Enumeration_Type (Id));
3835 end Set_First_Literal;
3837 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3839 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3841 end Set_First_Optional_Parameter;
3843 procedure Set_First_Private_Entity (Id : E; V : E) is
3845 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
3846 or else Ekind (Id) in Concurrent_Kind);
3848 end Set_First_Private_Entity;
3850 procedure Set_First_Rep_Item (Id : E; V : N) is
3853 end Set_First_Rep_Item;
3855 procedure Set_Float_Rep (Id : E; V : F) is
3856 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
3858 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
3861 procedure Set_Freeze_Node (Id : E; V : N) is
3864 end Set_Freeze_Node;
3866 procedure Set_From_With_Type (Id : E; V : B := True) is
3870 or else Ekind (Id) = E_Package);
3871 Set_Flag159 (Id, V);
3872 end Set_From_With_Type;
3874 procedure Set_Full_View (Id : E; V : E) is
3876 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
3880 procedure Set_Generic_Homonym (Id : E; V : E) is
3883 end Set_Generic_Homonym;
3885 procedure Set_Generic_Renamings (Id : E; V : L) is
3887 Set_Elist23 (Id, V);
3888 end Set_Generic_Renamings;
3890 procedure Set_Handler_Records (Id : E; V : S) is
3893 end Set_Handler_Records;
3895 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
3897 pragma Assert (Id = Base_Type (Id));
3898 Set_Flag135 (Id, V);
3899 end Set_Has_Aliased_Components;
3901 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
3904 end Set_Has_Alignment_Clause;
3906 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
3909 end Set_Has_All_Calls_Remote;
3911 procedure Set_Has_Anonymous_Master (Id : E; V : B := True) is
3914 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
3915 Set_Flag253 (Id, V);
3916 end Set_Has_Anonymous_Master;
3918 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
3920 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
3922 end Set_Has_Atomic_Components;
3924 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
3927 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
3928 Set_Flag139 (Id, V);
3929 end Set_Has_Biased_Representation;
3931 procedure Set_Has_Body_References (Id : E; V : B := True) is
3933 pragma Assert (Ekind (Id) = E_Abstract_State);
3934 Set_Flag264 (Id, V);
3935 end Set_Has_Body_References;
3937 procedure Set_Has_Completion (Id : E; V : B := True) is
3940 end Set_Has_Completion;
3942 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
3944 pragma Assert (Is_Type (Id));
3946 end Set_Has_Completion_In_Body;
3948 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
3950 pragma Assert (Ekind (Id) = E_Record_Type);
3951 Set_Flag140 (Id, V);
3952 end Set_Has_Complex_Representation;
3954 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
3956 pragma Assert (Ekind (Id) = E_Array_Type);
3958 end Set_Has_Component_Size_Clause;
3960 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
3962 pragma Assert (Is_Type (Id));
3963 Set_Flag187 (Id, V);
3964 end Set_Has_Constrained_Partial_View;
3966 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
3968 Set_Flag181 (Id, V);
3969 end Set_Has_Contiguous_Rep;
3971 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
3973 pragma Assert (Id = Base_Type (Id));
3975 end Set_Has_Controlled_Component;
3977 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
3980 end Set_Has_Controlling_Result;
3982 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
3984 Set_Flag119 (Id, V);
3985 end Set_Has_Convention_Pragma;
3987 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
3990 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
3991 and then Is_Base_Type (Id));
3993 end Set_Has_Default_Aspect;
3995 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
3997 pragma Assert (Nkind (Id) in N_Entity);
3998 Set_Flag200 (Id, V);
3999 end Set_Has_Delayed_Aspects;
4001 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
4003 pragma Assert (Nkind (Id) in N_Entity);
4005 end Set_Has_Delayed_Freeze;
4007 procedure Set_Has_Delayed_Rep_Aspects (Id : E; V : B := True) is
4009 pragma Assert (Nkind (Id) in N_Entity);
4010 Set_Flag261 (Id, V);
4011 end Set_Has_Delayed_Rep_Aspects;
4013 procedure Set_Has_Discriminants (Id : E; V : B := True) is
4015 pragma Assert (Nkind (Id) in N_Entity);
4017 end Set_Has_Discriminants;
4019 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
4021 pragma Assert (Ekind (Id) = E_Record_Type
4022 and then Is_Tagged_Type (Id));
4023 Set_Flag220 (Id, V);
4024 end Set_Has_Dispatch_Table;
4026 procedure Set_Has_Dynamic_Predicate_Aspect (Id : E; V : B := True) is
4028 pragma Assert (Is_Type (Id));
4029 Set_Flag258 (Id, V);
4030 end Set_Has_Dynamic_Predicate_Aspect;
4032 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
4034 pragma Assert (Is_Enumeration_Type (Id));
4036 end Set_Has_Enumeration_Rep_Clause;
4038 procedure Set_Has_Exit (Id : E; V : B := True) is
4043 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True) is
4045 pragma Assert (Is_Tagged_Type (Id));
4046 Set_Flag110 (Id, V);
4047 end Set_Has_External_Tag_Rep_Clause;
4049 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
4051 Set_Flag175 (Id, V);
4052 end Set_Has_Forward_Instantiation;
4054 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
4056 Set_Flag173 (Id, V);
4057 end Set_Has_Fully_Qualified_Name;
4059 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
4062 end Set_Has_Gigi_Rep_Item;
4064 procedure Set_Has_Homonym (Id : E; V : B := True) is
4067 end Set_Has_Homonym;
4069 procedure Set_Has_Implicit_Dereference (Id : E; V : B := True) is
4071 Set_Flag251 (Id, V);
4072 end Set_Has_Implicit_Dereference;
4074 procedure Set_Has_Independent_Components (Id : E; V : B := True) is
4076 pragma Assert (Is_Object (Id) or else Is_Type (Id));
4078 end Set_Has_Independent_Components;
4080 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
4082 pragma Assert (Is_Type (Id));
4083 Set_Flag248 (Id, V);
4084 end Set_Has_Inheritable_Invariants;
4086 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
4088 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
4089 Set_Flag219 (Id, V);
4090 end Set_Has_Initial_Value;
4092 procedure Set_Has_Invariants (Id : E; V : B := True) is
4094 pragma Assert (Is_Type (Id));
4095 Set_Flag232 (Id, V);
4096 end Set_Has_Invariants;
4098 procedure Set_Has_Loop_Entry_Attributes (Id : E; V : B := True) is
4100 pragma Assert (Ekind (Id) = E_Loop);
4101 Set_Flag260 (Id, V);
4102 end Set_Has_Loop_Entry_Attributes;
4104 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
4106 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4108 end Set_Has_Machine_Radix_Clause;
4110 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
4113 end Set_Has_Master_Entity;
4115 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
4117 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4118 Set_Flag142 (Id, V);
4119 end Set_Has_Missing_Return;
4121 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
4123 Set_Flag101 (Id, V);
4124 end Set_Has_Nested_Block_With_Handler;
4126 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
4128 pragma Assert (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
4129 Set_Flag215 (Id, V);
4130 end Set_Has_Up_Level_Access;
4132 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
4134 pragma Assert (Id = Base_Type (Id));
4136 end Set_Has_Non_Standard_Rep;
4138 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
4140 pragma Assert (Is_Type (Id));
4141 Set_Flag172 (Id, V);
4142 end Set_Has_Object_Size_Clause;
4144 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
4146 Set_Flag154 (Id, V);
4147 end Set_Has_Per_Object_Constraint;
4149 procedure Set_Has_Postconditions (Id : E; V : B := True) is
4151 pragma Assert (Is_Subprogram (Id));
4152 Set_Flag240 (Id, V);
4153 end Set_Has_Postconditions;
4155 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
4157 pragma Assert (Is_Access_Type (Id));
4158 Set_Flag27 (Base_Type (Id), V);
4159 end Set_Has_Pragma_Controlled;
4161 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
4163 Set_Flag150 (Id, V);
4164 end Set_Has_Pragma_Elaborate_Body;
4166 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
4168 Set_Flag157 (Id, V);
4169 end Set_Has_Pragma_Inline;
4171 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
4173 Set_Flag230 (Id, V);
4174 end Set_Has_Pragma_Inline_Always;
4176 procedure Set_Has_Pragma_No_Inline (Id : E; V : B := True) is
4178 Set_Flag201 (Id, V);
4179 end Set_Has_Pragma_No_Inline;
4181 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
4183 pragma Assert (Is_Enumeration_Type (Id));
4184 pragma Assert (Id = Base_Type (Id));
4185 Set_Flag198 (Id, V);
4186 end Set_Has_Pragma_Ordered;
4188 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
4190 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
4191 pragma Assert (Id = Base_Type (Id));
4192 Set_Flag121 (Id, V);
4193 end Set_Has_Pragma_Pack;
4195 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
4197 Set_Flag221 (Id, V);
4198 end Set_Has_Pragma_Preelab_Init;
4200 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
4202 Set_Flag203 (Id, V);
4203 end Set_Has_Pragma_Pure;
4205 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
4207 Set_Flag179 (Id, V);
4208 end Set_Has_Pragma_Pure_Function;
4210 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
4212 Set_Flag169 (Id, V);
4213 end Set_Has_Pragma_Thread_Local_Storage;
4215 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
4217 Set_Flag233 (Id, V);
4218 end Set_Has_Pragma_Unmodified;
4220 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
4222 Set_Flag180 (Id, V);
4223 end Set_Has_Pragma_Unreferenced;
4225 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
4227 pragma Assert (Is_Type (Id));
4228 Set_Flag212 (Id, V);
4229 end Set_Has_Pragma_Unreferenced_Objects;
4231 procedure Set_Has_Predicates (Id : E; V : B := True) is
4233 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Void);
4234 Set_Flag250 (Id, V);
4235 end Set_Has_Predicates;
4237 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
4239 pragma Assert (Id = Base_Type (Id));
4240 Set_Flag120 (Id, V);
4241 end Set_Has_Primitive_Operations;
4243 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
4245 pragma Assert (Is_Type (Id));
4246 Set_Flag151 (Id, V);
4247 end Set_Has_Private_Ancestor;
4249 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
4251 Set_Flag155 (Id, V);
4252 end Set_Has_Private_Declaration;
4254 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
4256 Set_Flag161 (Id, V);
4257 end Set_Has_Qualified_Name;
4259 procedure Set_Has_RACW (Id : E; V : B := True) is
4261 pragma Assert (Ekind (Id) = E_Package);
4262 Set_Flag214 (Id, V);
4265 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
4267 pragma Assert (Id = Base_Type (Id));
4269 end Set_Has_Record_Rep_Clause;
4271 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
4273 pragma Assert (Is_Subprogram (Id));
4274 Set_Flag143 (Id, V);
4275 end Set_Has_Recursive_Call;
4277 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
4280 end Set_Has_Size_Clause;
4282 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
4285 end Set_Has_Small_Clause;
4287 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
4289 pragma Assert (Id = Base_Type (Id));
4290 Set_Flag100 (Id, V);
4291 end Set_Has_Specified_Layout;
4293 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
4295 pragma Assert (Is_Type (Id));
4296 Set_Flag190 (Id, V);
4297 end Set_Has_Specified_Stream_Input;
4299 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
4301 pragma Assert (Is_Type (Id));
4302 Set_Flag191 (Id, V);
4303 end Set_Has_Specified_Stream_Output;
4305 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
4307 pragma Assert (Is_Type (Id));
4308 Set_Flag192 (Id, V);
4309 end Set_Has_Specified_Stream_Read;
4311 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
4313 pragma Assert (Is_Type (Id));
4314 Set_Flag193 (Id, V);
4315 end Set_Has_Specified_Stream_Write;
4317 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
4319 Set_Flag211 (Id, V);
4320 end Set_Has_Static_Discriminants;
4322 procedure Set_Has_Static_Predicate_Aspect (Id : E; V : B := True) is
4324 pragma Assert (Is_Type (Id));
4325 Set_Flag259 (Id, V);
4326 end Set_Has_Static_Predicate_Aspect;
4328 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
4330 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4331 pragma Assert (Id = Base_Type (Id));
4333 end Set_Has_Storage_Size_Clause;
4335 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4337 pragma Assert (Is_Elementary_Type (Id));
4338 Set_Flag184 (Id, V);
4339 end Set_Has_Stream_Size_Clause;
4341 procedure Set_Has_Task (Id : E; V : B := True) is
4343 pragma Assert (Id = Base_Type (Id));
4347 procedure Set_Has_Thunks (Id : E; V : B := True) is
4349 pragma Assert (Is_Tag (Id));
4350 Set_Flag228 (Id, V);
4353 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4355 pragma Assert (Id = Base_Type (Id));
4356 Set_Flag123 (Id, V);
4357 end Set_Has_Unchecked_Union;
4359 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4361 pragma Assert (Is_Type (Id));
4363 end Set_Has_Unknown_Discriminants;
4365 procedure Set_Has_Visible_Refinement (Id : E; V : B := True) is
4367 pragma Assert (Ekind (Id) = E_Abstract_State);
4368 Set_Flag263 (Id, V);
4369 end Set_Has_Visible_Refinement;
4371 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4373 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4375 end Set_Has_Volatile_Components;
4377 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4379 Set_Flag182 (Id, V);
4380 end Set_Has_Xref_Entry;
4382 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4384 pragma Assert (Ekind (Id) = E_Variable);
4386 end Set_Hiding_Loop_Variable;
4388 procedure Set_Homonym (Id : E; V : E) is
4390 pragma Assert (Id /= V);
4394 procedure Set_Interface_Alias (Id : E; V : E) is
4398 and then Is_Hidden (Id)
4399 and then (Ekind_In (Id, E_Procedure, E_Function)));
4401 end Set_Interface_Alias;
4403 procedure Set_Interfaces (Id : E; V : L) is
4405 pragma Assert (Is_Record_Type (Id));
4406 Set_Elist25 (Id, V);
4409 procedure Set_In_Package_Body (Id : E; V : B := True) is
4412 end Set_In_Package_Body;
4414 procedure Set_In_Private_Part (Id : E; V : B := True) is
4417 end Set_In_Private_Part;
4419 procedure Set_In_Use (Id : E; V : B := True) is
4421 pragma Assert (Nkind (Id) in N_Entity);
4425 procedure Set_Initialization_Statements (Id : E; V : N) is
4427 -- Tolerate an E_Void entity since this can be called while resolving
4428 -- an aggregate used as the initialization expression for an object
4429 -- declaration, and this occurs before the Ekind for the object is set.
4431 pragma Assert (Ekind_In (Id, E_Void, E_Constant, E_Variable));
4433 end Set_Initialization_Statements;
4435 procedure Set_Inner_Instances (Id : E; V : L) is
4437 Set_Elist23 (Id, V);
4438 end Set_Inner_Instances;
4440 procedure Set_Interface_Name (Id : E; V : N) is
4443 end Set_Interface_Name;
4445 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4447 pragma Assert (Is_Overloadable (Id));
4449 end Set_Is_Abstract_Subprogram;
4451 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4453 pragma Assert (Is_Type (Id));
4454 Set_Flag146 (Id, V);
4455 end Set_Is_Abstract_Type;
4457 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4459 pragma Assert (Is_Access_Type (Id));
4460 Set_Flag194 (Id, V);
4461 end Set_Is_Local_Anonymous_Access;
4463 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4465 pragma Assert (Is_Access_Type (Id));
4467 end Set_Is_Access_Constant;
4469 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4471 Set_Flag185 (Id, V);
4472 end Set_Is_Ada_2005_Only;
4474 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4476 Set_Flag199 (Id, V);
4477 end Set_Is_Ada_2012_Only;
4479 procedure Set_Is_Aliased (Id : E; V : B := True) is
4481 pragma Assert (Nkind (Id) in N_Entity);
4485 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
4487 pragma Assert (Is_Entry (Id));
4488 Set_Flag132 (Id, V);
4489 end Set_Is_AST_Entry;
4491 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4494 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4496 end Set_Is_Asynchronous;
4498 procedure Set_Is_Atomic (Id : E; V : B := True) is
4503 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4505 pragma Assert ((not V)
4506 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4507 Set_Flag122 (Id, V);
4508 end Set_Is_Bit_Packed_Array;
4510 procedure Set_Is_Called (Id : E; V : B := True) is
4512 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4513 Set_Flag102 (Id, V);
4516 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4519 end Set_Is_Character_Type;
4521 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4524 end Set_Is_Child_Unit;
4526 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4529 end Set_Is_Class_Wide_Equivalent_Type;
4531 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4533 Set_Flag149 (Id, V);
4534 end Set_Is_Compilation_Unit;
4536 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4538 pragma Assert (Ekind (Id) = E_Discriminant);
4539 Set_Flag103 (Id, V);
4540 end Set_Is_Completely_Hidden;
4542 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4545 end Set_Is_Concurrent_Record_Type;
4547 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4550 end Set_Is_Constr_Subt_For_U_Nominal;
4552 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4554 Set_Flag141 (Id, V);
4555 end Set_Is_Constr_Subt_For_UN_Aliased;
4557 procedure Set_Is_Constrained (Id : E; V : B := True) is
4559 pragma Assert (Nkind (Id) in N_Entity);
4561 end Set_Is_Constrained;
4563 procedure Set_Is_Constructor (Id : E; V : B := True) is
4566 end Set_Is_Constructor;
4568 procedure Set_Is_Controlled (Id : E; V : B := True) is
4570 pragma Assert (Id = Base_Type (Id));
4572 end Set_Is_Controlled;
4574 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4576 pragma Assert (Is_Formal (Id));
4578 end Set_Is_Controlling_Formal;
4580 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4583 end Set_Is_CPP_Class;
4585 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4587 pragma Assert (Is_Type (Id));
4588 Set_Flag223 (Id, V);
4589 end Set_Is_Descendent_Of_Address;
4591 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4593 Set_Flag176 (Id, V);
4594 end Set_Is_Discrim_SO_Function;
4596 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4598 Set_Flag234 (Id, V);
4599 end Set_Is_Dispatch_Table_Entity;
4601 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4606 Is_Overloadable (Id)
4608 Ekind (Id) = E_Subprogram_Type);
4611 end Set_Is_Dispatching_Operation;
4613 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4615 Set_Flag124 (Id, V);
4616 end Set_Is_Eliminated;
4618 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4621 end Set_Is_Entry_Formal;
4623 procedure Set_Is_Exported (Id : E; V : B := True) is
4626 end Set_Is_Exported;
4628 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4631 end Set_Is_First_Subtype;
4633 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4635 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4636 Set_Flag118 (Id, V);
4637 end Set_Is_For_Access_Subtype;
4639 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4641 Set_Flag111 (Id, V);
4642 end Set_Is_Formal_Subprogram;
4644 procedure Set_Is_Frozen (Id : E; V : B := True) is
4646 pragma Assert (Nkind (Id) in N_Entity);
4650 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4652 pragma Assert (Is_Type (Id));
4654 end Set_Is_Generic_Actual_Type;
4656 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4658 Set_Flag130 (Id, V);
4659 end Set_Is_Generic_Instance;
4661 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4663 pragma Assert (Nkind (Id) in N_Entity);
4665 end Set_Is_Generic_Type;
4667 procedure Set_Is_Hidden (Id : E; V : B := True) is
4672 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4674 Set_Flag171 (Id, V);
4675 end Set_Is_Hidden_Open_Scope;
4677 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4679 pragma Assert (Nkind (Id) in N_Entity);
4681 end Set_Is_Immediately_Visible;
4683 procedure Set_Is_Implementation_Defined (Id : E; V : B := True) is
4685 Set_Flag254 (Id, V);
4686 end Set_Is_Implementation_Defined;
4688 procedure Set_Is_Imported (Id : E; V : B := True) is
4691 end Set_Is_Imported;
4693 procedure Set_Is_Inlined (Id : E; V : B := True) is
4698 procedure Set_Is_Interface (Id : E; V : B := True) is
4700 pragma Assert (Is_Record_Type (Id));
4701 Set_Flag186 (Id, V);
4702 end Set_Is_Interface;
4704 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4706 Set_Flag126 (Id, V);
4707 end Set_Is_Instantiated;
4709 procedure Set_Is_Internal (Id : E; V : B := True) is
4711 pragma Assert (Nkind (Id) in N_Entity);
4713 end Set_Is_Internal;
4715 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4717 pragma Assert (Nkind (Id) in N_Entity);
4719 end Set_Is_Interrupt_Handler;
4721 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4724 end Set_Is_Intrinsic_Subprogram;
4726 procedure Set_Is_Invariant_Procedure (Id : E; V : B := True) is
4728 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4729 Set_Flag257 (Id, V);
4730 end Set_Is_Invariant_Procedure;
4732 procedure Set_Is_Itype (Id : E; V : B := True) is
4737 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4740 end Set_Is_Known_Non_Null;
4742 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4744 Set_Flag204 (Id, V);
4745 end Set_Is_Known_Null;
4747 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4749 Set_Flag170 (Id, V);
4750 end Set_Is_Known_Valid;
4752 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4754 pragma Assert (Is_Type (Id));
4755 Set_Flag106 (Id, V);
4756 end Set_Is_Limited_Composite;
4758 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4760 pragma Assert (Is_Interface (Id));
4761 Set_Flag197 (Id, V);
4762 end Set_Is_Limited_Interface;
4764 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4767 end Set_Is_Limited_Record;
4769 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4771 pragma Assert (Is_Subprogram (Id));
4772 Set_Flag137 (Id, V);
4773 end Set_Is_Machine_Code_Subprogram;
4775 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4777 pragma Assert (Is_Type (Id));
4778 Set_Flag109 (Id, V);
4779 end Set_Is_Non_Static_Subtype;
4781 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4783 pragma Assert (Ekind (Id) = E_Procedure);
4784 Set_Flag178 (Id, V);
4785 end Set_Is_Null_Init_Proc;
4787 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4789 Set_Flag153 (Id, V);
4790 end Set_Is_Obsolescent;
4792 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
4794 pragma Assert (Ekind (Id) = E_Out_Parameter);
4795 Set_Flag226 (Id, V);
4796 end Set_Is_Only_Out_Parameter;
4798 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
4800 pragma Assert (Is_Formal (Id));
4801 Set_Flag134 (Id, V);
4802 end Set_Is_Optional_Parameter;
4804 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
4806 Set_Flag160 (Id, V);
4807 end Set_Is_Package_Body_Entity;
4809 procedure Set_Is_Packed (Id : E; V : B := True) is
4811 pragma Assert (Id = Base_Type (Id));
4815 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
4817 Set_Flag138 (Id, V);
4818 end Set_Is_Packed_Array_Type;
4820 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
4822 pragma Assert (Nkind (Id) in N_Entity);
4824 end Set_Is_Potentially_Use_Visible;
4826 procedure Set_Is_Predicate_Function (Id : E; V : B := True) is
4828 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4829 Set_Flag255 (Id, V);
4830 end Set_Is_Predicate_Function;
4832 procedure Set_Is_Predicate_Function_M (Id : E; V : B := True) is
4834 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4835 Set_Flag256 (Id, V);
4836 end Set_Is_Predicate_Function_M;
4838 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
4841 end Set_Is_Preelaborated;
4843 procedure Set_Is_Primitive (Id : E; V : B := True) is
4846 (Is_Overloadable (Id)
4847 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
4848 Set_Flag218 (Id, V);
4849 end Set_Is_Primitive;
4851 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
4853 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4854 Set_Flag195 (Id, V);
4855 end Set_Is_Primitive_Wrapper;
4857 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
4859 pragma Assert (Is_Type (Id));
4860 Set_Flag107 (Id, V);
4861 end Set_Is_Private_Composite;
4863 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
4866 end Set_Is_Private_Descendant;
4868 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
4870 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4871 Set_Flag245 (Id, V);
4872 end Set_Is_Private_Primitive;
4874 procedure Set_Is_Processed_Transient (Id : E; V : B := True) is
4876 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
4877 Set_Flag252 (Id, V);
4878 end Set_Is_Processed_Transient;
4880 procedure Set_Is_Public (Id : E; V : B := True) is
4882 pragma Assert (Nkind (Id) in N_Entity);
4886 procedure Set_Is_Pure (Id : E; V : B := True) is
4891 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
4893 pragma Assert (Is_Access_Type (Id));
4894 Set_Flag189 (Id, V);
4895 end Set_Is_Pure_Unit_Access_Type;
4897 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
4899 pragma Assert (Is_Type (Id));
4900 Set_Flag244 (Id, V);
4901 end Set_Is_RACW_Stub_Type;
4903 procedure Set_Is_Raised (Id : E; V : B := True) is
4905 pragma Assert (Ekind (Id) = E_Exception);
4906 Set_Flag224 (Id, V);
4909 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
4912 end Set_Is_Remote_Call_Interface;
4914 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
4917 end Set_Is_Remote_Types;
4919 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
4921 Set_Flag112 (Id, V);
4922 end Set_Is_Renaming_Of_Object;
4924 procedure Set_Is_Return_Object (Id : E; V : B := True) is
4926 Set_Flag209 (Id, V);
4927 end Set_Is_Return_Object;
4929 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
4931 pragma Assert (Ekind (Id) = E_Variable);
4932 Set_Flag249 (Id, V);
4933 end Set_Is_Safe_To_Reevaluate;
4935 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
4938 end Set_Is_Shared_Passive;
4940 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
4944 or else Ekind_In (Id, E_Exception,
4949 end Set_Is_Statically_Allocated;
4951 procedure Set_Is_Tag (Id : E; V : B := True) is
4953 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
4957 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
4960 end Set_Is_Tagged_Type;
4962 procedure Set_Is_Thunk (Id : E; V : B := True) is
4964 pragma Assert (Is_Subprogram (Id));
4965 Set_Flag225 (Id, V);
4968 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
4970 Set_Flag235 (Id, V);
4971 end Set_Is_Trivial_Subprogram;
4973 procedure Set_Is_True_Constant (Id : E; V : B := True) is
4975 Set_Flag163 (Id, V);
4976 end Set_Is_True_Constant;
4978 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
4980 pragma Assert (Id = Base_Type (Id));
4981 Set_Flag117 (Id, V);
4982 end Set_Is_Unchecked_Union;
4984 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
4986 pragma Assert (Ekind (Id) = E_Record_Type);
4987 Set_Flag246 (Id, V);
4988 end Set_Is_Underlying_Record_View;
4990 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
4992 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
4993 Set_Flag144 (Id, V);
4994 end Set_Is_Unsigned_Type;
4996 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
4998 pragma Assert (Ekind (Id) = E_Procedure);
4999 Set_Flag127 (Id, V);
5000 end Set_Is_Valued_Procedure;
5002 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
5004 Set_Flag206 (Id, V);
5005 end Set_Is_Visible_Formal;
5007 procedure Set_Is_Visible_Lib_Unit (Id : E; V : B := True) is
5009 Set_Flag116 (Id, V);
5010 end Set_Is_Visible_Lib_Unit;
5012 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
5014 pragma Assert (Ekind (Id) = E_Exception);
5015 Set_Flag133 (Id, V);
5016 end Set_Is_VMS_Exception;
5018 procedure Set_Is_Volatile (Id : E; V : B := True) is
5020 pragma Assert (Nkind (Id) in N_Entity);
5022 end Set_Is_Volatile;
5024 procedure Set_Itype_Printed (Id : E; V : B := True) is
5026 pragma Assert (Is_Itype (Id));
5027 Set_Flag202 (Id, V);
5028 end Set_Itype_Printed;
5030 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
5033 end Set_Kill_Elaboration_Checks;
5035 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
5038 end Set_Kill_Range_Checks;
5040 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
5042 pragma Assert (Is_Type (Id));
5043 Set_Flag207 (Id, V);
5044 end Set_Known_To_Have_Preelab_Init;
5046 procedure Set_Last_Assignment (Id : E; V : N) is
5048 pragma Assert (Is_Assignable (Id));
5050 end Set_Last_Assignment;
5052 procedure Set_Last_Entity (Id : E; V : E) is
5055 end Set_Last_Entity;
5057 procedure Set_Limited_View (Id : E; V : E) is
5059 pragma Assert (Ekind (Id) = E_Package);
5061 end Set_Limited_View;
5063 procedure Set_Lit_Indexes (Id : E; V : E) is
5065 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5067 end Set_Lit_Indexes;
5069 procedure Set_Lit_Strings (Id : E; V : E) is
5071 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5073 end Set_Lit_Strings;
5075 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
5077 pragma Assert (Is_Formal (Id));
5078 Set_Flag205 (Id, V);
5079 end Set_Low_Bound_Tested;
5081 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
5083 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
5085 end Set_Machine_Radix_10;
5087 procedure Set_Master_Id (Id : E; V : E) is
5089 pragma Assert (Is_Access_Type (Id));
5093 procedure Set_Materialize_Entity (Id : E; V : B := True) is
5095 Set_Flag168 (Id, V);
5096 end Set_Materialize_Entity;
5098 procedure Set_May_Inherit_Delayed_Rep_Aspects (Id : E; V : B := True) is
5100 Set_Flag262 (Id, V);
5101 end Set_May_Inherit_Delayed_Rep_Aspects;
5103 procedure Set_Mechanism (Id : E; V : M) is
5105 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
5106 Set_Uint8 (Id, UI_From_Int (V));
5109 procedure Set_Modulus (Id : E; V : U) is
5111 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
5115 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
5117 pragma Assert (Is_Type (Id));
5118 Set_Flag183 (Id, V);
5119 end Set_Must_Be_On_Byte_Boundary;
5121 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
5123 pragma Assert (Is_Type (Id));
5124 Set_Flag208 (Id, V);
5125 end Set_Must_Have_Preelab_Init;
5127 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
5129 Set_Flag147 (Id, V);
5130 end Set_Needs_Debug_Info;
5132 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
5135 (Is_Overloadable (Id)
5136 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
5138 end Set_Needs_No_Actuals;
5140 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
5142 Set_Flag115 (Id, V);
5143 end Set_Never_Set_In_Source;
5145 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
5148 end Set_Next_Inlined_Subprogram;
5150 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
5152 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5153 Set_Flag131 (Id, V);
5154 end Set_No_Pool_Assigned;
5156 procedure Set_No_Return (Id : E; V : B := True) is
5159 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
5160 Set_Flag113 (Id, V);
5163 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
5165 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5166 Set_Flag136 (Id, V);
5167 end Set_No_Strict_Aliasing;
5169 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
5171 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5173 end Set_Non_Binary_Modulus;
5175 procedure Set_Non_Limited_View (Id : E; V : E) is
5177 pragma Assert (Ekind (Id) in Incomplete_Kind);
5179 end Set_Non_Limited_View;
5181 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
5184 (Root_Type (Id) = Standard_Boolean
5185 and then Ekind (Id) = E_Enumeration_Type);
5186 Set_Flag162 (Id, V);
5187 end Set_Nonzero_Is_True;
5189 procedure Set_Normalized_First_Bit (Id : E; V : U) is
5191 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5193 end Set_Normalized_First_Bit;
5195 procedure Set_Normalized_Position (Id : E; V : U) is
5197 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5199 end Set_Normalized_Position;
5201 procedure Set_Normalized_Position_Max (Id : E; V : U) is
5203 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5205 end Set_Normalized_Position_Max;
5207 procedure Set_OK_To_Rename (Id : E; V : B := True) is
5209 pragma Assert (Ekind (Id) = E_Variable);
5210 Set_Flag247 (Id, V);
5211 end Set_OK_To_Rename;
5213 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
5216 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5217 Set_Flag239 (Id, V);
5218 end Set_OK_To_Reorder_Components;
5220 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
5223 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5224 Set_Flag241 (Id, V);
5225 end Set_Optimize_Alignment_Space;
5227 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
5230 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5231 Set_Flag242 (Id, V);
5232 end Set_Optimize_Alignment_Time;
5234 procedure Set_Original_Access_Type (Id : E; V : E) is
5236 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
5238 end Set_Original_Access_Type;
5240 procedure Set_Original_Array_Type (Id : E; V : E) is
5242 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
5244 end Set_Original_Array_Type;
5246 procedure Set_Original_Record_Component (Id : E; V : E) is
5248 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
5250 end Set_Original_Record_Component;
5252 procedure Set_Overlays_Constant (Id : E; V : B := True) is
5254 Set_Flag243 (Id, V);
5255 end Set_Overlays_Constant;
5257 procedure Set_Overridden_Operation (Id : E; V : E) is
5260 end Set_Overridden_Operation;
5262 procedure Set_Package_Instantiation (Id : E; V : N) is
5264 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
5266 end Set_Package_Instantiation;
5268 procedure Set_Packed_Array_Type (Id : E; V : E) is
5270 pragma Assert (Is_Array_Type (Id));
5272 end Set_Packed_Array_Type;
5274 procedure Set_Parent_Subtype (Id : E; V : E) is
5276 pragma Assert (Ekind (Id) = E_Record_Type);
5278 end Set_Parent_Subtype;
5280 procedure Set_Postcondition_Proc (Id : E; V : E) is
5282 pragma Assert (Ekind (Id) = E_Procedure);
5284 end Set_Postcondition_Proc;
5286 procedure Set_PPC_Wrapper (Id : E; V : E) is
5288 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
5290 end Set_PPC_Wrapper;
5292 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
5294 pragma Assert (Is_Tagged_Type (Id));
5295 Set_Elist10 (Id, V);
5296 end Set_Direct_Primitive_Operations;
5298 procedure Set_Prival (Id : E; V : E) is
5300 pragma Assert (Is_Protected_Component (Id));
5304 procedure Set_Prival_Link (Id : E; V : E) is
5306 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5308 end Set_Prival_Link;
5310 procedure Set_Private_Dependents (Id : E; V : L) is
5312 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
5313 Set_Elist18 (Id, V);
5314 end Set_Private_Dependents;
5316 procedure Set_Private_View (Id : E; V : N) is
5318 pragma Assert (Is_Private_Type (Id));
5320 end Set_Private_View;
5322 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
5324 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
5326 end Set_Protected_Body_Subprogram;
5328 procedure Set_Protected_Formal (Id : E; V : E) is
5330 pragma Assert (Is_Formal (Id));
5332 end Set_Protected_Formal;
5334 procedure Set_Protection_Object (Id : E; V : E) is
5336 pragma Assert (Ekind_In (Id, E_Entry,
5341 end Set_Protection_Object;
5343 procedure Set_Reachable (Id : E; V : B := True) is
5348 procedure Set_Referenced (Id : E; V : B := True) is
5350 Set_Flag156 (Id, V);
5353 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
5356 end Set_Referenced_As_LHS;
5358 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
5360 Set_Flag227 (Id, V);
5361 end Set_Referenced_As_Out_Parameter;
5363 procedure Set_Refined_State (Id : E; V : E) is
5365 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
5367 end Set_Refined_State;
5369 procedure Set_Refinement_Constituents (Id : E; V : L) is
5371 pragma Assert (Ekind (Id) = E_Abstract_State);
5373 end Set_Refinement_Constituents;
5375 procedure Set_Register_Exception_Call (Id : E; V : N) is
5377 pragma Assert (Ekind (Id) = E_Exception);
5379 end Set_Register_Exception_Call;
5381 procedure Set_Related_Array_Object (Id : E; V : E) is
5383 pragma Assert (Is_Array_Type (Id));
5385 end Set_Related_Array_Object;
5387 procedure Set_Related_Expression (Id : E; V : N) is
5389 pragma Assert (Ekind (Id) in Type_Kind
5390 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
5392 end Set_Related_Expression;
5394 procedure Set_Related_Instance (Id : E; V : E) is
5396 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
5398 end Set_Related_Instance;
5400 procedure Set_Related_Type (Id : E; V : E) is
5402 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5404 end Set_Related_Type;
5406 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5408 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
5410 end Set_Relative_Deadline_Variable;
5412 procedure Set_Renamed_Entity (Id : E; V : N) is
5415 end Set_Renamed_Entity;
5417 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5419 pragma Assert (Ekind (Id) = E_Package);
5420 Set_Flag231 (Id, V);
5421 end Set_Renamed_In_Spec;
5423 procedure Set_Renamed_Object (Id : E; V : N) is
5426 end Set_Renamed_Object;
5428 procedure Set_Renaming_Map (Id : E; V : U) is
5431 end Set_Renaming_Map;
5433 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5435 pragma Assert (Is_Overloadable (Id));
5436 Set_Flag213 (Id, V);
5437 end Set_Requires_Overriding;
5439 procedure Set_Return_Present (Id : E; V : B := True) is
5442 end Set_Return_Present;
5444 procedure Set_Return_Applies_To (Id : E; V : N) is
5447 end Set_Return_Applies_To;
5449 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5452 end Set_Returns_By_Ref;
5454 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5457 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5458 Set_Flag164 (Id, V);
5459 end Set_Reverse_Bit_Order;
5461 procedure Set_Reverse_Storage_Order (Id : E; V : B := True) is
5465 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5467 end Set_Reverse_Storage_Order;
5469 procedure Set_RM_Size (Id : E; V : U) is
5471 pragma Assert (Is_Type (Id));
5475 procedure Set_Scalar_Range (Id : E; V : N) is
5478 end Set_Scalar_Range;
5480 procedure Set_Scale_Value (Id : E; V : U) is
5483 end Set_Scale_Value;
5485 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5487 pragma Assert (not Is_Record_Type (Id));
5489 end Set_Scope_Depth_Value;
5491 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5493 Set_Flag167 (Id, V);
5494 end Set_Sec_Stack_Needed_For_Return;
5496 procedure Set_Shadow_Entities (Id : E; V : S) is
5498 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5500 end Set_Shadow_Entities;
5502 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5504 pragma Assert (Ekind (Id) = E_Variable);
5506 end Set_Shared_Var_Procs_Instance;
5508 procedure Set_Size_Check_Code (Id : E; V : N) is
5510 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5512 end Set_Size_Check_Code;
5514 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5516 Set_Flag177 (Id, V);
5517 end Set_Size_Depends_On_Discriminant;
5519 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5522 end Set_Size_Known_At_Compile_Time;
5524 procedure Set_Small_Value (Id : E; V : R) is
5526 pragma Assert (Is_Fixed_Point_Type (Id));
5527 Set_Ureal21 (Id, V);
5528 end Set_Small_Value;
5530 procedure Set_SPARK_Mode_Pragmas (Id : E; V : N) is
5533 (Ekind_In (Id, E_Function, -- subprogram variants
5535 E_Generic_Procedure,
5539 Ekind_In (Id, E_Generic_Package, -- package variants
5544 end Set_SPARK_Mode_Pragmas;
5546 procedure Set_Spec_Entity (Id : E; V : E) is
5548 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5550 end Set_Spec_Entity;
5552 procedure Set_Static_Predicate (Id : E; V : S) is
5555 (Ekind_In (Id, E_Enumeration_Subtype,
5556 E_Modular_Integer_Subtype,
5557 E_Signed_Integer_Subtype)
5558 and then Has_Predicates (Id));
5560 end Set_Static_Predicate;
5562 procedure Set_Status_Flag_Or_Transient_Decl (Id : E; V : E) is
5564 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5566 end Set_Status_Flag_Or_Transient_Decl;
5568 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5570 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5571 pragma Assert (Id = Base_Type (Id));
5573 end Set_Storage_Size_Variable;
5575 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5577 pragma Assert (Ekind (Id) = E_Package);
5579 end Set_Static_Elaboration_Desired;
5581 procedure Set_Static_Initialization (Id : E; V : N) is
5584 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5586 end Set_Static_Initialization;
5588 procedure Set_Stored_Constraint (Id : E; V : L) is
5590 pragma Assert (Nkind (Id) in N_Entity);
5591 Set_Elist23 (Id, V);
5592 end Set_Stored_Constraint;
5594 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5596 pragma Assert (Id = Base_Type (Id));
5597 Set_Flag145 (Id, V);
5598 end Set_Strict_Alignment;
5600 procedure Set_String_Literal_Length (Id : E; V : U) is
5602 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5604 end Set_String_Literal_Length;
5606 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5608 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5610 end Set_String_Literal_Low_Bound;
5612 procedure Set_Subprograms_For_Type (Id : E; V : E) is
5614 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
5616 end Set_Subprograms_For_Type;
5618 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5620 Set_Flag148 (Id, V);
5621 end Set_Suppress_Elaboration_Warnings;
5623 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
5625 pragma Assert (Is_Type (Id));
5626 Set_Flag105 (Id, V);
5627 end Set_Suppress_Initialization;
5629 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5631 Set_Flag165 (Id, V);
5632 end Set_Suppress_Style_Checks;
5634 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5636 Set_Flag217 (Id, V);
5637 end Set_Suppress_Value_Tracking_On_Call;
5639 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5641 pragma Assert (Ekind (Id) in Task_Kind);
5643 end Set_Task_Body_Procedure;
5645 procedure Set_Thunk_Entity (Id : E; V : E) is
5647 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5648 and then Is_Thunk (Id));
5650 end Set_Thunk_Entity;
5652 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5655 end Set_Treat_As_Volatile;
5657 procedure Set_Underlying_Full_View (Id : E; V : E) is
5659 pragma Assert (Ekind (Id) in Private_Kind);
5661 end Set_Underlying_Full_View;
5663 procedure Set_Underlying_Record_View (Id : E; V : E) is
5665 pragma Assert (Ekind (Id) = E_Record_Type);
5667 end Set_Underlying_Record_View;
5669 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5671 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5672 Set_Flag216 (Id, V);
5673 end Set_Universal_Aliasing;
5675 procedure Set_Unset_Reference (Id : E; V : N) is
5678 end Set_Unset_Reference;
5680 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5682 Set_Flag222 (Id, V);
5683 end Set_Used_As_Generic_Actual;
5685 procedure Set_Uses_Lock_Free (Id : E; V : B := True) is
5687 pragma Assert (Ekind (Id) = E_Protected_Type);
5688 Set_Flag188 (Id, V);
5689 end Set_Uses_Lock_Free;
5691 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5694 end Set_Uses_Sec_Stack;
5696 procedure Set_Warnings_Off (Id : E; V : B := True) is
5699 end Set_Warnings_Off;
5701 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
5703 Set_Flag236 (Id, V);
5704 end Set_Warnings_Off_Used;
5706 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
5708 Set_Flag237 (Id, V);
5709 end Set_Warnings_Off_Used_Unmodified;
5711 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
5713 Set_Flag238 (Id, V);
5714 end Set_Warnings_Off_Used_Unreferenced;
5716 procedure Set_Was_Hidden (Id : E; V : B := True) is
5718 Set_Flag196 (Id, V);
5721 procedure Set_Wrapped_Entity (Id : E; V : E) is
5723 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5724 and then Is_Primitive_Wrapper (Id));
5726 end Set_Wrapped_Entity;
5728 -----------------------------------
5729 -- Field Initialization Routines --
5730 -----------------------------------
5732 procedure Init_Alignment (Id : E) is
5734 Set_Uint14 (Id, Uint_0);
5737 procedure Init_Alignment (Id : E; V : Int) is
5739 Set_Uint14 (Id, UI_From_Int (V));
5742 procedure Init_Component_Bit_Offset (Id : E) is
5744 Set_Uint11 (Id, No_Uint);
5745 end Init_Component_Bit_Offset;
5747 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
5749 Set_Uint11 (Id, UI_From_Int (V));
5750 end Init_Component_Bit_Offset;
5752 procedure Init_Component_Size (Id : E) is
5754 Set_Uint22 (Id, Uint_0);
5755 end Init_Component_Size;
5757 procedure Init_Component_Size (Id : E; V : Int) is
5759 Set_Uint22 (Id, UI_From_Int (V));
5760 end Init_Component_Size;
5762 procedure Init_Digits_Value (Id : E) is
5764 Set_Uint17 (Id, Uint_0);
5765 end Init_Digits_Value;
5767 procedure Init_Digits_Value (Id : E; V : Int) is
5769 Set_Uint17 (Id, UI_From_Int (V));
5770 end Init_Digits_Value;
5772 procedure Init_Esize (Id : E) is
5774 Set_Uint12 (Id, Uint_0);
5777 procedure Init_Esize (Id : E; V : Int) is
5779 Set_Uint12 (Id, UI_From_Int (V));
5782 procedure Init_Normalized_First_Bit (Id : E) is
5784 Set_Uint8 (Id, No_Uint);
5785 end Init_Normalized_First_Bit;
5787 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
5789 Set_Uint8 (Id, UI_From_Int (V));
5790 end Init_Normalized_First_Bit;
5792 procedure Init_Normalized_Position (Id : E) is
5794 Set_Uint14 (Id, No_Uint);
5795 end Init_Normalized_Position;
5797 procedure Init_Normalized_Position (Id : E; V : Int) is
5799 Set_Uint14 (Id, UI_From_Int (V));
5800 end Init_Normalized_Position;
5802 procedure Init_Normalized_Position_Max (Id : E) is
5804 Set_Uint10 (Id, No_Uint);
5805 end Init_Normalized_Position_Max;
5807 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
5809 Set_Uint10 (Id, UI_From_Int (V));
5810 end Init_Normalized_Position_Max;
5812 procedure Init_RM_Size (Id : E) is
5814 Set_Uint13 (Id, Uint_0);
5817 procedure Init_RM_Size (Id : E; V : Int) is
5819 Set_Uint13 (Id, UI_From_Int (V));
5822 -----------------------------
5823 -- Init_Component_Location --
5824 -----------------------------
5826 procedure Init_Component_Location (Id : E) is
5828 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
5829 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
5830 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
5831 Set_Uint12 (Id, Uint_0); -- Esize
5832 Set_Uint14 (Id, No_Uint); -- Normalized_Position
5833 end Init_Component_Location;
5835 ----------------------------
5836 -- Init_Object_Size_Align --
5837 ----------------------------
5839 procedure Init_Object_Size_Align (Id : E) is
5841 Set_Uint12 (Id, Uint_0); -- Esize
5842 Set_Uint14 (Id, Uint_0); -- Alignment
5843 end Init_Object_Size_Align;
5849 procedure Init_Size (Id : E; V : Int) is
5851 pragma Assert (not Is_Object (Id));
5852 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
5853 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
5856 ---------------------
5857 -- Init_Size_Align --
5858 ---------------------
5860 procedure Init_Size_Align (Id : E) is
5862 pragma Assert (not Is_Object (Id));
5863 Set_Uint12 (Id, Uint_0); -- Esize
5864 Set_Uint13 (Id, Uint_0); -- RM_Size
5865 Set_Uint14 (Id, Uint_0); -- Alignment
5866 end Init_Size_Align;
5868 ----------------------------------------------
5869 -- Type Representation Attribute Predicates --
5870 ----------------------------------------------
5872 function Known_Alignment (E : Entity_Id) return B is
5874 return Uint14 (E) /= Uint_0
5875 and then Uint14 (E) /= No_Uint;
5876 end Known_Alignment;
5878 function Known_Component_Bit_Offset (E : Entity_Id) return B is
5880 return Uint11 (E) /= No_Uint;
5881 end Known_Component_Bit_Offset;
5883 function Known_Component_Size (E : Entity_Id) return B is
5885 return Uint22 (Base_Type (E)) /= Uint_0
5886 and then Uint22 (Base_Type (E)) /= No_Uint;
5887 end Known_Component_Size;
5889 function Known_Esize (E : Entity_Id) return B is
5891 return Uint12 (E) /= Uint_0
5892 and then Uint12 (E) /= No_Uint;
5895 function Known_Normalized_First_Bit (E : Entity_Id) return B is
5897 return Uint8 (E) /= No_Uint;
5898 end Known_Normalized_First_Bit;
5900 function Known_Normalized_Position (E : Entity_Id) return B is
5902 return Uint14 (E) /= No_Uint;
5903 end Known_Normalized_Position;
5905 function Known_Normalized_Position_Max (E : Entity_Id) return B is
5907 return Uint10 (E) /= No_Uint;
5908 end Known_Normalized_Position_Max;
5910 function Known_RM_Size (E : Entity_Id) return B is
5912 return Uint13 (E) /= No_Uint
5913 and then (Uint13 (E) /= Uint_0
5914 or else Is_Discrete_Type (E)
5915 or else Is_Fixed_Point_Type (E));
5918 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
5920 return Uint11 (E) /= No_Uint
5921 and then Uint11 (E) >= Uint_0;
5922 end Known_Static_Component_Bit_Offset;
5924 function Known_Static_Component_Size (E : Entity_Id) return B is
5926 return Uint22 (Base_Type (E)) > Uint_0;
5927 end Known_Static_Component_Size;
5929 function Known_Static_Esize (E : Entity_Id) return B is
5931 return Uint12 (E) > Uint_0
5932 and then not Is_Generic_Type (E);
5933 end Known_Static_Esize;
5935 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
5937 return Uint8 (E) /= No_Uint
5938 and then Uint8 (E) >= Uint_0;
5939 end Known_Static_Normalized_First_Bit;
5941 function Known_Static_Normalized_Position (E : Entity_Id) return B is
5943 return Uint14 (E) /= No_Uint
5944 and then Uint14 (E) >= Uint_0;
5945 end Known_Static_Normalized_Position;
5947 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
5949 return Uint10 (E) /= No_Uint
5950 and then Uint10 (E) >= Uint_0;
5951 end Known_Static_Normalized_Position_Max;
5953 function Known_Static_RM_Size (E : Entity_Id) return B is
5955 return (Uint13 (E) > Uint_0
5956 or else Is_Discrete_Type (E)
5957 or else Is_Fixed_Point_Type (E))
5958 and then not Is_Generic_Type (E);
5959 end Known_Static_RM_Size;
5961 function Unknown_Alignment (E : Entity_Id) return B is
5963 return Uint14 (E) = Uint_0
5964 or else Uint14 (E) = No_Uint;
5965 end Unknown_Alignment;
5967 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
5969 return Uint11 (E) = No_Uint;
5970 end Unknown_Component_Bit_Offset;
5972 function Unknown_Component_Size (E : Entity_Id) return B is
5974 return Uint22 (Base_Type (E)) = Uint_0
5976 Uint22 (Base_Type (E)) = No_Uint;
5977 end Unknown_Component_Size;
5979 function Unknown_Esize (E : Entity_Id) return B is
5981 return Uint12 (E) = No_Uint
5983 Uint12 (E) = Uint_0;
5986 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
5988 return Uint8 (E) = No_Uint;
5989 end Unknown_Normalized_First_Bit;
5991 function Unknown_Normalized_Position (E : Entity_Id) return B is
5993 return Uint14 (E) = No_Uint;
5994 end Unknown_Normalized_Position;
5996 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
5998 return Uint10 (E) = No_Uint;
5999 end Unknown_Normalized_Position_Max;
6001 function Unknown_RM_Size (E : Entity_Id) return B is
6003 return (Uint13 (E) = Uint_0
6004 and then not Is_Discrete_Type (E)
6005 and then not Is_Fixed_Point_Type (E))
6006 or else Uint13 (E) = No_Uint;
6007 end Unknown_RM_Size;
6009 --------------------
6010 -- Address_Clause --
6011 --------------------
6013 function Address_Clause (Id : E) return N is
6015 return Get_Attribute_Definition_Clause (Id, Attribute_Address);
6022 function Aft_Value (Id : E) return U is
6024 Delta_Val : Ureal := Delta_Value (Id);
6026 while Delta_Val < Ureal_Tenth loop
6027 Delta_Val := Delta_Val * Ureal_10;
6028 Result := Result + 1;
6031 return UI_From_Int (Result);
6034 ----------------------
6035 -- Alignment_Clause --
6036 ----------------------
6038 function Alignment_Clause (Id : E) return N is
6040 return Get_Attribute_Definition_Clause (Id, Attribute_Alignment);
6041 end Alignment_Clause;
6047 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
6049 if Last_Entity (V) = Empty then
6050 Set_First_Entity (Id => V, V => Id);
6052 Set_Next_Entity (Last_Entity (V), Id);
6055 Set_Next_Entity (Id, Empty);
6057 Set_Last_Entity (Id => V, V => Id);
6064 function Base_Type (Id : E) return E is
6066 if Is_Base_Type (Id) then
6069 pragma Assert (Is_Type (Id));
6074 -------------------------
6075 -- Component_Alignment --
6076 -------------------------
6078 -- Component Alignment is encoded using two flags, Flag128/129 as
6079 -- follows. Note that both flags False = Align_Default, so that the
6080 -- default initialization of flags to False initializes component
6081 -- alignment to the default value as required.
6083 -- Flag128 Flag129 Value
6084 -- ------- ------- -----
6085 -- False False Calign_Default
6086 -- False True Calign_Component_Size
6087 -- True False Calign_Component_Size_4
6088 -- True True Calign_Storage_Unit
6090 function Component_Alignment (Id : E) return C is
6091 BT : constant Node_Id := Base_Type (Id);
6094 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
6096 if Flag128 (BT) then
6097 if Flag129 (BT) then
6098 return Calign_Storage_Unit;
6100 return Calign_Component_Size_4;
6104 if Flag129 (BT) then
6105 return Calign_Component_Size;
6107 return Calign_Default;
6110 end Component_Alignment;
6112 ----------------------
6113 -- Declaration_Node --
6114 ----------------------
6116 function Declaration_Node (Id : E) return N is
6120 if Ekind (Id) = E_Incomplete_Type
6121 and then Present (Full_View (Id))
6123 P := Parent (Full_View (Id));
6129 if Nkind (P) /= N_Selected_Component
6130 and then Nkind (P) /= N_Expanded_Name
6132 not (Nkind (P) = N_Defining_Program_Unit_Name
6133 and then Is_Child_Unit (Id))
6140 end Declaration_Node;
6142 ---------------------
6143 -- Designated_Type --
6144 ---------------------
6146 function Designated_Type (Id : E) return E is
6150 Desig_Type := Directly_Designated_Type (Id);
6152 if Ekind (Desig_Type) = E_Incomplete_Type
6153 and then Present (Full_View (Desig_Type))
6155 return Full_View (Desig_Type);
6157 elsif Is_Class_Wide_Type (Desig_Type)
6158 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
6159 and then Present (Full_View (Etype (Desig_Type)))
6160 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
6162 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
6167 end Designated_Type;
6169 ----------------------
6170 -- Entry_Index_Type --
6171 ----------------------
6173 function Entry_Index_Type (Id : E) return N is
6175 pragma Assert (Ekind (Id) = E_Entry_Family);
6176 return Etype (Discrete_Subtype_Definition (Parent (Id)));
6177 end Entry_Index_Type;
6179 ---------------------
6180 -- First_Component --
6181 ---------------------
6183 function First_Component (Id : E) return E is
6188 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
6190 Comp_Id := First_Entity (Id);
6191 while Present (Comp_Id) loop
6192 exit when Ekind (Comp_Id) = E_Component;
6193 Comp_Id := Next_Entity (Comp_Id);
6197 end First_Component;
6199 -------------------------------------
6200 -- First_Component_Or_Discriminant --
6201 -------------------------------------
6203 function First_Component_Or_Discriminant (Id : E) return E is
6208 (Is_Record_Type (Id)
6209 or else Is_Incomplete_Or_Private_Type (Id)
6210 or else Has_Discriminants (Id));
6212 Comp_Id := First_Entity (Id);
6213 while Present (Comp_Id) loop
6214 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6215 Comp_Id := Next_Entity (Comp_Id);
6219 end First_Component_Or_Discriminant;
6225 function First_Formal (Id : E) return E is
6230 (Is_Overloadable (Id)
6231 or else Ekind_In (Id, E_Entry_Family,
6233 E_Subprogram_Type));
6235 if Ekind (Id) = E_Enumeration_Literal then
6239 Formal := First_Entity (Id);
6241 if Present (Formal) and then Is_Formal (Formal) then
6249 ------------------------------
6250 -- First_Formal_With_Extras --
6251 ------------------------------
6253 function First_Formal_With_Extras (Id : E) return E is
6258 (Is_Overloadable (Id)
6259 or else Ekind_In (Id, E_Entry_Family,
6261 E_Subprogram_Type));
6263 if Ekind (Id) = E_Enumeration_Literal then
6267 Formal := First_Entity (Id);
6269 if Present (Formal) and then Is_Formal (Formal) then
6272 return Extra_Formals (Id); -- Empty if no extra formals
6275 end First_Formal_With_Extras;
6277 -------------------------------------
6278 -- Get_Attribute_Definition_Clause --
6279 -------------------------------------
6281 function Get_Attribute_Definition_Clause
6283 Id : Attribute_Id) return Node_Id
6288 N := First_Rep_Item (E);
6289 while Present (N) loop
6290 if Nkind (N) = N_Attribute_Definition_Clause
6291 and then Get_Attribute_Id (Chars (N)) = Id
6300 end Get_Attribute_Definition_Clause;
6306 function Get_Full_View (T : Entity_Id) return Entity_Id is
6308 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
6309 return Full_View (T);
6311 elsif Is_Class_Wide_Type (T)
6312 and then Ekind (Root_Type (T)) = E_Incomplete_Type
6313 and then Present (Full_View (Root_Type (T)))
6315 return Class_Wide_Type (Full_View (Root_Type (T)));
6326 function Get_Pragma (E : Entity_Id; Id : Pragma_Id) return Node_Id is
6327 Is_CDG : constant Boolean :=
6328 Id = Pragma_Abstract_State or else
6329 Id = Pragma_Depends or else
6330 Id = Pragma_Global or else
6331 Id = Pragma_Initial_Condition or else
6332 Id = Pragma_Initializes or else
6333 Id = Pragma_Refined_Depends or else
6334 Id = Pragma_Refined_Global or else
6335 Id = Pragma_Refined_State;
6336 Is_CTC : constant Boolean :=
6337 Id = Pragma_Contract_Cases or else
6338 Id = Pragma_Test_Case;
6339 Is_PPC : constant Boolean :=
6340 Id = Pragma_Precondition or else
6341 Id = Pragma_Postcondition;
6343 In_Contract : constant Boolean := Is_CDG or Is_CTC or Is_PPC;
6349 -- Handle pragmas that appear in N_Contract nodes. Those have to be
6350 -- extracted from their specialized list.
6353 Items := Contract (E);
6359 Item := Classifications (Items);
6362 Item := Contract_Test_Cases (Items);
6365 Item := Pre_Post_Conditions (Items);
6371 Item := First_Rep_Item (E);
6374 while Present (Item) loop
6375 if Nkind (Item) = N_Pragma
6376 and then Get_Pragma_Id (Pragma_Name (Item)) = Id
6380 -- All nodes in N_Contract are chained using Next_Pragma
6382 elsif In_Contract then
6383 Item := Next_Pragma (Item);
6388 Next_Rep_Item (Item);
6395 --------------------------------------
6396 -- Get_Record_Representation_Clause --
6397 --------------------------------------
6399 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
6403 N := First_Rep_Item (E);
6404 while Present (N) loop
6405 if Nkind (N) = N_Record_Representation_Clause then
6413 end Get_Record_Representation_Clause;
6415 ------------------------
6416 -- Has_Attach_Handler --
6417 ------------------------
6419 function Has_Attach_Handler (Id : E) return B is
6423 pragma Assert (Is_Protected_Type (Id));
6425 Ritem := First_Rep_Item (Id);
6426 while Present (Ritem) loop
6427 if Nkind (Ritem) = N_Pragma
6428 and then Pragma_Name (Ritem) = Name_Attach_Handler
6432 Next_Rep_Item (Ritem);
6437 end Has_Attach_Handler;
6443 function Has_Entries (Id : E) return B is
6447 pragma Assert (Is_Concurrent_Type (Id));
6449 Ent := First_Entity (Id);
6450 while Present (Ent) loop
6451 if Is_Entry (Ent) then
6455 Ent := Next_Entity (Ent);
6461 ----------------------------
6462 -- Has_Foreign_Convention --
6463 ----------------------------
6465 function Has_Foreign_Convention (Id : E) return B is
6467 -- While regular Intrinsics such as the Standard operators fit in the
6468 -- "Ada" convention, those with an Interface_Name materialize GCC
6469 -- builtin imports for which Ada special treatments shouldn't apply.
6471 return Convention (Id) in Foreign_Convention
6472 or else (Convention (Id) = Convention_Intrinsic
6473 and then Present (Interface_Name (Id)));
6474 end Has_Foreign_Convention;
6476 ---------------------------
6477 -- Has_Interrupt_Handler --
6478 ---------------------------
6480 function Has_Interrupt_Handler (Id : E) return B is
6484 pragma Assert (Is_Protected_Type (Id));
6486 Ritem := First_Rep_Item (Id);
6487 while Present (Ritem) loop
6488 if Nkind (Ritem) = N_Pragma
6489 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6493 Next_Rep_Item (Ritem);
6498 end Has_Interrupt_Handler;
6500 -----------------------------
6501 -- Has_Non_Null_Refinement --
6502 -----------------------------
6504 function Has_Non_Null_Refinement (Id : E) return B is
6506 -- "Refinement" is a concept applicable only to abstract states
6508 pragma Assert (Ekind (Id) = E_Abstract_State);
6510 if Has_Visible_Refinement (Id) then
6511 pragma Assert (Present (Refinement_Constituents (Id)));
6513 -- For a refinement to be non-null, the first constituent must be
6514 -- anything other than null.
6517 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) /= N_Null;
6521 end Has_Non_Null_Refinement;
6523 -----------------------------
6524 -- Has_Null_Abstract_State --
6525 -----------------------------
6527 function Has_Null_Abstract_State (Id : E) return B is
6529 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
6532 Present (Abstract_States (Id))
6533 and then Is_Null_State (Node (First_Elmt (Abstract_States (Id))));
6534 end Has_Null_Abstract_State;
6536 -------------------------
6537 -- Has_Null_Refinement --
6538 -------------------------
6540 function Has_Null_Refinement (Id : E) return B is
6542 -- "Refinement" is a concept applicable only to abstract states
6544 pragma Assert (Ekind (Id) = E_Abstract_State);
6546 if Has_Visible_Refinement (Id) then
6547 pragma Assert (Present (Refinement_Constituents (Id)));
6549 -- For a refinement to be null, the state's sole constituent must be
6553 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) = N_Null;
6557 end Has_Null_Refinement;
6559 --------------------
6560 -- Has_Unmodified --
6561 --------------------
6563 function Has_Unmodified (E : Entity_Id) return Boolean is
6565 if Has_Pragma_Unmodified (E) then
6567 elsif Warnings_Off (E) then
6568 Set_Warnings_Off_Used_Unmodified (E);
6575 ---------------------
6576 -- Has_Unreferenced --
6577 ---------------------
6579 function Has_Unreferenced (E : Entity_Id) return Boolean is
6581 if Has_Pragma_Unreferenced (E) then
6583 elsif Warnings_Off (E) then
6584 Set_Warnings_Off_Used_Unreferenced (E);
6589 end Has_Unreferenced;
6591 ----------------------
6592 -- Has_Warnings_Off --
6593 ----------------------
6595 function Has_Warnings_Off (E : Entity_Id) return Boolean is
6597 if Warnings_Off (E) then
6598 Set_Warnings_Off_Used (E);
6603 end Has_Warnings_Off;
6605 ------------------------------
6606 -- Implementation_Base_Type --
6607 ------------------------------
6609 function Implementation_Base_Type (Id : E) return E is
6614 Bastyp := Base_Type (Id);
6616 if Is_Incomplete_Or_Private_Type (Bastyp) then
6617 Imptyp := Underlying_Type (Bastyp);
6619 -- If we have an implementation type, then just return it,
6620 -- otherwise we return the Base_Type anyway. This can only
6621 -- happen in error situations and should avoid some error bombs.
6623 if Present (Imptyp) then
6624 return Base_Type (Imptyp);
6632 end Implementation_Base_Type;
6634 -------------------------
6635 -- Invariant_Procedure --
6636 -------------------------
6638 function Invariant_Procedure (Id : E) return E is
6642 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
6644 if No (Subprograms_For_Type (Id)) then
6648 S := Subprograms_For_Type (Id);
6649 while Present (S) loop
6650 if Is_Invariant_Procedure (S) then
6653 S := Subprograms_For_Type (S);
6659 end Invariant_Procedure;
6665 -- Global flag table allowing rapid computation of this function
6667 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
6668 (E_Enumeration_Subtype |
6670 E_Signed_Integer_Subtype |
6671 E_Modular_Integer_Subtype |
6672 E_Floating_Point_Subtype |
6673 E_Ordinary_Fixed_Point_Subtype |
6674 E_Decimal_Fixed_Point_Subtype |
6679 E_Record_Subtype_With_Private |
6680 E_Limited_Private_Subtype |
6682 E_Protected_Subtype |
6684 E_String_Literal_Subtype |
6685 E_Class_Wide_Subtype => False,
6688 function Is_Base_Type (Id : E) return Boolean is
6690 return Entity_Is_Base_Type (Ekind (Id));
6693 ---------------------
6694 -- Is_Boolean_Type --
6695 ---------------------
6697 function Is_Boolean_Type (Id : E) return B is
6699 return Root_Type (Id) = Standard_Boolean;
6700 end Is_Boolean_Type;
6702 ------------------------
6703 -- Is_Constant_Object --
6704 ------------------------
6706 function Is_Constant_Object (Id : E) return B is
6707 K : constant Entity_Kind := Ekind (Id);
6710 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
6711 end Is_Constant_Object;
6713 --------------------
6714 -- Is_Discriminal --
6715 --------------------
6717 function Is_Discriminal (Id : E) return B is
6719 return (Ekind_In (Id, E_Constant, E_In_Parameter)
6720 and then Present (Discriminal_Link (Id)));
6723 ----------------------
6724 -- Is_Dynamic_Scope --
6725 ----------------------
6727 function Is_Dynamic_Scope (Id : E) return B is
6730 Ekind (Id) = E_Block
6732 Ekind (Id) = E_Function
6734 Ekind (Id) = E_Procedure
6736 Ekind (Id) = E_Subprogram_Body
6738 Ekind (Id) = E_Task_Type
6740 (Ekind (Id) = E_Limited_Private_Type
6741 and then Present (Full_View (Id))
6742 and then Ekind (Full_View (Id)) = E_Task_Type)
6744 Ekind (Id) = E_Entry
6746 Ekind (Id) = E_Entry_Family
6748 Ekind (Id) = E_Return_Statement;
6749 end Is_Dynamic_Scope;
6751 --------------------
6752 -- Is_Entity_Name --
6753 --------------------
6755 function Is_Entity_Name (N : Node_Id) return Boolean is
6756 Kind : constant Node_Kind := Nkind (N);
6759 -- Identifiers, operator symbols, expanded names are entity names
6761 return Kind = N_Identifier
6762 or else Kind = N_Operator_Symbol
6763 or else Kind = N_Expanded_Name
6765 -- Attribute references are entity names if they refer to an entity.
6766 -- Note that we don't do this by testing for the presence of the
6767 -- Entity field in the N_Attribute_Reference node, since it may not
6768 -- have been set yet.
6770 or else (Kind = N_Attribute_Reference
6771 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
6774 -----------------------
6775 -- Is_External_State --
6776 -----------------------
6778 function Is_External_State (Id : E) return B is
6781 Ekind (Id) = E_Abstract_State and then Has_Option (Id, Name_External);
6782 end Is_External_State;
6788 function Is_Finalizer (Id : E) return B is
6790 return Ekind (Id) = E_Procedure and then Chars (Id) = Name_uFinalizer;
6793 ---------------------
6794 -- Is_Ghost_Entity --
6795 ---------------------
6797 function Is_Ghost_Entity (Id : E) return B is
6799 if Present (Id) and then Ekind (Id) = E_Variable then
6800 return Convention (Id) = Convention_Ghost;
6802 return Is_Ghost_Subprogram (Id);
6804 end Is_Ghost_Entity;
6806 -------------------------
6807 -- Is_Ghost_Subprogram --
6808 -------------------------
6810 function Is_Ghost_Subprogram (Id : E) return B is
6812 if Present (Id) and then Ekind_In (Id, E_Function, E_Procedure) then
6813 return Convention (Id) = Convention_Ghost;
6817 end Is_Ghost_Subprogram;
6819 -------------------------
6820 -- Is_Input_Only_State --
6821 -------------------------
6823 function Is_Input_Only_State (Id : E) return B is
6826 Ekind (Id) = E_Abstract_State
6827 and then Has_Option (Id, Name_Input_Only);
6828 end Is_Input_Only_State;
6830 ---------------------------
6831 -- Is_Non_Volatile_State --
6832 ---------------------------
6834 function Is_Non_Volatile_State (Id : E) return B is
6837 Ekind (Id) = E_Abstract_State
6838 and then Has_Option (Id, Name_Non_Volatile);
6839 end Is_Non_Volatile_State;
6845 function Is_Null_State (Id : E) return B is
6848 Ekind (Id) = E_Abstract_State and then Nkind (Parent (Id)) = N_Null;
6851 ---------------------
6852 -- Is_Output_State --
6853 ---------------------
6855 function Is_Output_Only_State (Id : E) return B is
6858 Ekind (Id) = E_Abstract_State
6859 and then Has_Option (Id, Name_Output_Only);
6860 end Is_Output_Only_State;
6862 -----------------------------------
6863 -- Is_Package_Or_Generic_Package --
6864 -----------------------------------
6866 function Is_Package_Or_Generic_Package (Id : E) return B is
6868 return Ekind_In (Id, E_Generic_Package, E_Package);
6869 end Is_Package_Or_Generic_Package;
6875 function Is_Prival (Id : E) return B is
6877 return (Ekind_In (Id, E_Constant, E_Variable)
6878 and then Present (Prival_Link (Id)));
6881 ----------------------------
6882 -- Is_Protected_Component --
6883 ----------------------------
6885 function Is_Protected_Component (Id : E) return B is
6887 return Ekind (Id) = E_Component and then Is_Protected_Type (Scope (Id));
6888 end Is_Protected_Component;
6890 ----------------------------
6891 -- Is_Protected_Interface --
6892 ----------------------------
6894 function Is_Protected_Interface (Id : E) return B is
6895 Typ : constant Entity_Id := Base_Type (Id);
6897 if not Is_Interface (Typ) then
6899 elsif Is_Class_Wide_Type (Typ) then
6900 return Is_Protected_Interface (Etype (Typ));
6902 return Protected_Present (Type_Definition (Parent (Typ)));
6904 end Is_Protected_Interface;
6906 ------------------------------
6907 -- Is_Protected_Record_Type --
6908 ------------------------------
6910 function Is_Protected_Record_Type (Id : E) return B is
6913 Is_Concurrent_Record_Type (Id)
6914 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
6915 end Is_Protected_Record_Type;
6917 --------------------------------
6918 -- Is_Standard_Character_Type --
6919 --------------------------------
6921 function Is_Standard_Character_Type (Id : E) return B is
6923 if Is_Type (Id) then
6925 R : constant Entity_Id := Root_Type (Id);
6928 R = Standard_Character
6930 R = Standard_Wide_Character
6932 R = Standard_Wide_Wide_Character;
6938 end Is_Standard_Character_Type;
6940 --------------------
6941 -- Is_String_Type --
6942 --------------------
6944 function Is_String_Type (Id : E) return B is
6946 return Ekind (Id) in String_Kind
6947 or else (Is_Array_Type (Id)
6948 and then Id /= Any_Composite
6949 and then Number_Dimensions (Id) = 1
6950 and then Is_Character_Type (Component_Type (Id)));
6953 -------------------------------
6954 -- Is_Synchronized_Interface --
6955 -------------------------------
6957 function Is_Synchronized_Interface (Id : E) return B is
6958 Typ : constant Entity_Id := Base_Type (Id);
6961 if not Is_Interface (Typ) then
6964 elsif Is_Class_Wide_Type (Typ) then
6965 return Is_Synchronized_Interface (Etype (Typ));
6968 return Protected_Present (Type_Definition (Parent (Typ)))
6969 or else Synchronized_Present (Type_Definition (Parent (Typ)))
6970 or else Task_Present (Type_Definition (Parent (Typ)));
6972 end Is_Synchronized_Interface;
6974 -----------------------
6975 -- Is_Task_Interface --
6976 -----------------------
6978 function Is_Task_Interface (Id : E) return B is
6979 Typ : constant Entity_Id := Base_Type (Id);
6981 if not Is_Interface (Typ) then
6983 elsif Is_Class_Wide_Type (Typ) then
6984 return Is_Task_Interface (Etype (Typ));
6986 return Task_Present (Type_Definition (Parent (Typ)));
6988 end Is_Task_Interface;
6990 -------------------------
6991 -- Is_Task_Record_Type --
6992 -------------------------
6994 function Is_Task_Record_Type (Id : E) return B is
6997 Is_Concurrent_Record_Type (Id)
6998 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
6999 end Is_Task_Record_Type;
7001 ------------------------
7002 -- Is_Wrapper_Package --
7003 ------------------------
7005 function Is_Wrapper_Package (Id : E) return B is
7007 return (Ekind (Id) = E_Package and then Present (Related_Instance (Id)));
7008 end Is_Wrapper_Package;
7014 function Last_Formal (Id : E) return E is
7019 (Is_Overloadable (Id)
7020 or else Ekind_In (Id, E_Entry_Family,
7022 E_Subprogram_Type));
7024 if Ekind (Id) = E_Enumeration_Literal then
7028 Formal := First_Formal (Id);
7030 if Present (Formal) then
7031 while Present (Next_Formal (Formal)) loop
7032 Formal := Next_Formal (Formal);
7040 function Model_Emin_Value (Id : E) return Uint is
7042 return Machine_Emin_Value (Id);
7043 end Model_Emin_Value;
7045 -------------------------
7046 -- Model_Epsilon_Value --
7047 -------------------------
7049 function Model_Epsilon_Value (Id : E) return Ureal is
7050 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7052 return Radix ** (1 - Model_Mantissa_Value (Id));
7053 end Model_Epsilon_Value;
7055 --------------------------
7056 -- Model_Mantissa_Value --
7057 --------------------------
7059 function Model_Mantissa_Value (Id : E) return Uint is
7061 return Machine_Mantissa_Value (Id);
7062 end Model_Mantissa_Value;
7064 -----------------------
7065 -- Model_Small_Value --
7066 -----------------------
7068 function Model_Small_Value (Id : E) return Ureal is
7069 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7071 return Radix ** (Model_Emin_Value (Id) - 1);
7072 end Model_Small_Value;
7074 ------------------------
7075 -- Machine_Emax_Value --
7076 ------------------------
7078 function Machine_Emax_Value (Id : E) return Uint is
7079 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7082 case Float_Rep (Id) is
7085 when 1 .. 6 => return Uint_128;
7086 when 7 .. 15 => return 2**10;
7087 when 16 .. 33 => return 2**14;
7088 when others => return No_Uint;
7093 when 1 .. 9 => return 2**7 - 1;
7094 when 10 .. 15 => return 2**10 - 1;
7095 when others => return No_Uint;
7099 return Uint_2 ** Uint_7 - Uint_1;
7101 end Machine_Emax_Value;
7103 ------------------------
7104 -- Machine_Emin_Value --
7105 ------------------------
7107 function Machine_Emin_Value (Id : E) return Uint is
7109 case Float_Rep (Id) is
7110 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
7111 when VAX_Native => return -Machine_Emax_Value (Id);
7112 when AAMP => return -Machine_Emax_Value (Id);
7114 end Machine_Emin_Value;
7116 ----------------------------
7117 -- Machine_Mantissa_Value --
7118 ----------------------------
7120 function Machine_Mantissa_Value (Id : E) return Uint is
7121 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7124 case Float_Rep (Id) is
7127 when 1 .. 6 => return Uint_24;
7128 when 7 .. 15 => return UI_From_Int (53);
7129 when 16 .. 18 => return Uint_64;
7130 when 19 .. 33 => return UI_From_Int (113);
7131 when others => return No_Uint;
7136 when 1 .. 6 => return Uint_24;
7137 when 7 .. 9 => return UI_From_Int (56);
7138 when 10 .. 15 => return UI_From_Int (53);
7139 when others => return No_Uint;
7144 when 1 .. 6 => return Uint_24;
7145 when 7 .. 9 => return UI_From_Int (40);
7146 when others => return No_Uint;
7149 end Machine_Mantissa_Value;
7151 -------------------------
7152 -- Machine_Radix_Value --
7153 -------------------------
7155 function Machine_Radix_Value (Id : E) return U is
7157 case Float_Rep (Id) is
7158 when IEEE_Binary | VAX_Native | AAMP =>
7161 end Machine_Radix_Value;
7163 --------------------
7164 -- Next_Component --
7165 --------------------
7167 function Next_Component (Id : E) return E is
7171 Comp_Id := Next_Entity (Id);
7172 while Present (Comp_Id) loop
7173 exit when Ekind (Comp_Id) = E_Component;
7174 Comp_Id := Next_Entity (Comp_Id);
7180 ------------------------------------
7181 -- Next_Component_Or_Discriminant --
7182 ------------------------------------
7184 function Next_Component_Or_Discriminant (Id : E) return E is
7188 Comp_Id := Next_Entity (Id);
7189 while Present (Comp_Id) loop
7190 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
7191 Comp_Id := Next_Entity (Comp_Id);
7195 end Next_Component_Or_Discriminant;
7197 -----------------------
7198 -- Next_Discriminant --
7199 -----------------------
7201 -- This function actually implements both Next_Discriminant and
7202 -- Next_Stored_Discriminant by making sure that the Discriminant
7203 -- returned is of the same variety as Id.
7205 function Next_Discriminant (Id : E) return E is
7207 -- Derived Tagged types with private extensions look like this...
7209 -- E_Discriminant d1
7210 -- E_Discriminant d2
7212 -- E_Discriminant d1
7213 -- E_Discriminant d2
7216 -- so it is critical not to go past the leading discriminants
7221 pragma Assert (Ekind (Id) = E_Discriminant);
7224 D := Next_Entity (D);
7226 or else (Ekind (D) /= E_Discriminant
7227 and then not Is_Itype (D))
7232 exit when Ekind (D) = E_Discriminant
7233 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
7237 end Next_Discriminant;
7243 function Next_Formal (Id : E) return E is
7247 -- Follow the chain of declared entities as long as the kind of the
7248 -- entity corresponds to a formal parameter. Skip internal entities
7249 -- that may have been created for implicit subtypes, in the process
7250 -- of analyzing default expressions.
7254 P := Next_Entity (P);
7256 if No (P) or else Is_Formal (P) then
7258 elsif not Is_Internal (P) then
7264 -----------------------------
7265 -- Next_Formal_With_Extras --
7266 -----------------------------
7268 function Next_Formal_With_Extras (Id : E) return E is
7270 if Present (Extra_Formal (Id)) then
7271 return Extra_Formal (Id);
7273 return Next_Formal (Id);
7275 end Next_Formal_With_Extras;
7281 function Next_Index (Id : Node_Id) return Node_Id is
7290 function Next_Literal (Id : E) return E is
7292 pragma Assert (Nkind (Id) in N_Entity);
7296 ------------------------------
7297 -- Next_Stored_Discriminant --
7298 ------------------------------
7300 function Next_Stored_Discriminant (Id : E) return E is
7302 -- See comment in Next_Discriminant
7304 return Next_Discriminant (Id);
7305 end Next_Stored_Discriminant;
7307 -----------------------
7308 -- Number_Dimensions --
7309 -----------------------
7311 function Number_Dimensions (Id : E) return Pos is
7316 if Ekind (Id) in String_Kind then
7321 T := First_Index (Id);
7322 while Present (T) loop
7329 end Number_Dimensions;
7331 --------------------
7332 -- Number_Entries --
7333 --------------------
7335 function Number_Entries (Id : E) return Nat is
7340 pragma Assert (Is_Concurrent_Type (Id));
7343 Ent := First_Entity (Id);
7344 while Present (Ent) loop
7345 if Is_Entry (Ent) then
7349 Ent := Next_Entity (Ent);
7355 --------------------
7356 -- Number_Formals --
7357 --------------------
7359 function Number_Formals (Id : E) return Pos is
7365 Formal := First_Formal (Id);
7366 while Present (Formal) loop
7368 Formal := Next_Formal (Formal);
7374 --------------------
7375 -- Parameter_Mode --
7376 --------------------
7378 function Parameter_Mode (Id : E) return Formal_Kind is
7383 ------------------------
7384 -- Predicate_Function --
7385 ------------------------
7387 function Predicate_Function (Id : E) return E is
7392 pragma Assert (Is_Type (Id));
7394 -- If type is private and has a completion, predicate may be defined
7395 -- on the full view.
7397 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7398 T := Full_View (Id);
7403 if No (Subprograms_For_Type (T)) then
7407 S := Subprograms_For_Type (T);
7408 while Present (S) loop
7409 if Is_Predicate_Function (S) then
7412 S := Subprograms_For_Type (S);
7418 end Predicate_Function;
7420 --------------------------
7421 -- Predicate_Function_M --
7422 --------------------------
7424 function Predicate_Function_M (Id : E) return E is
7429 pragma Assert (Is_Type (Id));
7431 -- If type is private and has a completion, predicate may be defined
7432 -- on the full view.
7434 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7435 T := Full_View (Id);
7440 if No (Subprograms_For_Type (T)) then
7444 S := Subprograms_For_Type (T);
7445 while Present (S) loop
7446 if Is_Predicate_Function_M (S) then
7449 S := Subprograms_For_Type (S);
7455 end Predicate_Function_M;
7457 -------------------------
7458 -- Present_In_Rep_Item --
7459 -------------------------
7461 function Present_In_Rep_Item (E : Entity_Id; N : Node_Id) return Boolean is
7465 Ritem := First_Rep_Item (E);
7467 while Present (Ritem) loop
7472 Next_Rep_Item (Ritem);
7476 end Present_In_Rep_Item;
7478 --------------------------
7479 -- Primitive_Operations --
7480 --------------------------
7482 function Primitive_Operations (Id : E) return L is
7484 if Is_Concurrent_Type (Id) then
7485 if Present (Corresponding_Record_Type (Id)) then
7486 return Direct_Primitive_Operations
7487 (Corresponding_Record_Type (Id));
7489 -- If expansion is disabled the corresponding record type is absent,
7490 -- but if the type has ancestors it may have primitive operations.
7492 elsif Is_Tagged_Type (Id) then
7493 return Direct_Primitive_Operations (Id);
7499 return Direct_Primitive_Operations (Id);
7501 end Primitive_Operations;
7503 ---------------------
7504 -- Record_Rep_Item --
7505 ---------------------
7507 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
7509 Set_Next_Rep_Item (N, First_Rep_Item (E));
7510 Set_First_Rep_Item (E, N);
7511 end Record_Rep_Item;
7517 function Root_Type (Id : E) return E is
7521 pragma Assert (Nkind (Id) in N_Entity);
7523 T := Base_Type (Id);
7525 if Ekind (T) = E_Class_Wide_Type then
7537 -- Following test catches some error cases resulting from
7540 elsif No (Etyp) then
7541 Check_Error_Detected;
7544 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
7547 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
7553 -- Return if there is a circularity in the inheritance chain. This
7554 -- happens in some error situations and we do not want to get
7555 -- stuck in this loop.
7557 if T = Base_Type (Id) then
7564 ---------------------
7565 -- Safe_Emax_Value --
7566 ---------------------
7568 function Safe_Emax_Value (Id : E) return Uint is
7570 return Machine_Emax_Value (Id);
7571 end Safe_Emax_Value;
7573 ----------------------
7574 -- Safe_First_Value --
7575 ----------------------
7577 function Safe_First_Value (Id : E) return Ureal is
7579 return -Safe_Last_Value (Id);
7580 end Safe_First_Value;
7582 ---------------------
7583 -- Safe_Last_Value --
7584 ---------------------
7586 function Safe_Last_Value (Id : E) return Ureal is
7587 Radix : constant Uint := Machine_Radix_Value (Id);
7588 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
7589 Emax : constant Uint := Safe_Emax_Value (Id);
7590 Significand : constant Uint := Radix ** Mantissa - 1;
7591 Exponent : constant Uint := Emax - Mantissa;
7597 (Num => Significand * 2 ** (Exponent mod 4),
7598 Den => -Exponent / 4,
7604 (Num => Significand,
7608 end Safe_Last_Value;
7614 function Scope_Depth (Id : E) return Uint is
7619 while Is_Record_Type (Scop) loop
7620 Scop := Scope (Scop);
7623 return Scope_Depth_Value (Scop);
7626 ---------------------
7627 -- Scope_Depth_Set --
7628 ---------------------
7630 function Scope_Depth_Set (Id : E) return B is
7632 return not Is_Record_Type (Id)
7633 and then Field22 (Id) /= Union_Id (Empty);
7634 end Scope_Depth_Set;
7636 -----------------------------
7637 -- Set_Component_Alignment --
7638 -----------------------------
7640 -- Component Alignment is encoded using two flags, Flag128/129 as
7641 -- follows. Note that both flags False = Align_Default, so that the
7642 -- default initialization of flags to False initializes component
7643 -- alignment to the default value as required.
7645 -- Flag128 Flag129 Value
7646 -- ------- ------- -----
7647 -- False False Calign_Default
7648 -- False True Calign_Component_Size
7649 -- True False Calign_Component_Size_4
7650 -- True True Calign_Storage_Unit
7652 procedure Set_Component_Alignment (Id : E; V : C) is
7654 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
7655 and then Is_Base_Type (Id));
7658 when Calign_Default =>
7659 Set_Flag128 (Id, False);
7660 Set_Flag129 (Id, False);
7662 when Calign_Component_Size =>
7663 Set_Flag128 (Id, False);
7664 Set_Flag129 (Id, True);
7666 when Calign_Component_Size_4 =>
7667 Set_Flag128 (Id, True);
7668 Set_Flag129 (Id, False);
7670 when Calign_Storage_Unit =>
7671 Set_Flag128 (Id, True);
7672 Set_Flag129 (Id, True);
7674 end Set_Component_Alignment;
7676 -----------------------------
7677 -- Set_Invariant_Procedure --
7678 -----------------------------
7680 procedure Set_Invariant_Procedure (Id : E; V : E) is
7684 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7686 S := Subprograms_For_Type (Id);
7687 Set_Subprograms_For_Type (Id, V);
7688 Set_Subprograms_For_Type (V, S);
7690 -- Check for duplicate entry
7692 while Present (S) loop
7693 if Is_Invariant_Procedure (S) then
7694 raise Program_Error;
7696 S := Subprograms_For_Type (S);
7699 end Set_Invariant_Procedure;
7701 ----------------------------
7702 -- Set_Predicate_Function --
7703 ----------------------------
7705 procedure Set_Predicate_Function (Id : E; V : E) is
7709 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7711 S := Subprograms_For_Type (Id);
7712 Set_Subprograms_For_Type (Id, V);
7713 Set_Subprograms_For_Type (V, S);
7715 while Present (S) loop
7716 if Is_Predicate_Function (S) then
7717 raise Program_Error;
7719 S := Subprograms_For_Type (S);
7722 end Set_Predicate_Function;
7724 ------------------------------
7725 -- Set_Predicate_Function_M --
7726 ------------------------------
7728 procedure Set_Predicate_Function_M (Id : E; V : E) is
7732 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7734 S := Subprograms_For_Type (Id);
7735 Set_Subprograms_For_Type (Id, V);
7736 Set_Subprograms_For_Type (V, S);
7738 -- Check for duplicates
7740 while Present (S) loop
7741 if Is_Predicate_Function_M (S) then
7742 raise Program_Error;
7744 S := Subprograms_For_Type (S);
7747 end Set_Predicate_Function_M;
7753 function Size_Clause (Id : E) return N is
7755 return Get_Attribute_Definition_Clause (Id, Attribute_Size);
7758 ------------------------
7759 -- Stream_Size_Clause --
7760 ------------------------
7762 function Stream_Size_Clause (Id : E) return N is
7764 return Get_Attribute_Definition_Clause (Id, Attribute_Stream_Size);
7765 end Stream_Size_Clause;
7771 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
7777 Kind := E_Access_Subtype;
7781 Kind := E_Array_Subtype;
7783 when E_Class_Wide_Type |
7784 E_Class_Wide_Subtype =>
7785 Kind := E_Class_Wide_Subtype;
7787 when E_Decimal_Fixed_Point_Type |
7788 E_Decimal_Fixed_Point_Subtype =>
7789 Kind := E_Decimal_Fixed_Point_Subtype;
7791 when E_Ordinary_Fixed_Point_Type |
7792 E_Ordinary_Fixed_Point_Subtype =>
7793 Kind := E_Ordinary_Fixed_Point_Subtype;
7795 when E_Private_Type |
7796 E_Private_Subtype =>
7797 Kind := E_Private_Subtype;
7799 when E_Limited_Private_Type |
7800 E_Limited_Private_Subtype =>
7801 Kind := E_Limited_Private_Subtype;
7803 when E_Record_Type_With_Private |
7804 E_Record_Subtype_With_Private =>
7805 Kind := E_Record_Subtype_With_Private;
7807 when E_Record_Type |
7809 Kind := E_Record_Subtype;
7811 when E_String_Type |
7813 Kind := E_String_Subtype;
7815 when Enumeration_Kind =>
7816 Kind := E_Enumeration_Subtype;
7819 Kind := E_Floating_Point_Subtype;
7821 when Signed_Integer_Kind =>
7822 Kind := E_Signed_Integer_Subtype;
7824 when Modular_Integer_Kind =>
7825 Kind := E_Modular_Integer_Subtype;
7827 when Protected_Kind =>
7828 Kind := E_Protected_Subtype;
7831 Kind := E_Task_Subtype;
7835 raise Program_Error;
7841 ---------------------
7842 -- Type_High_Bound --
7843 ---------------------
7845 function Type_High_Bound (Id : E) return Node_Id is
7846 Rng : constant Node_Id := Scalar_Range (Id);
7848 if Nkind (Rng) = N_Subtype_Indication then
7849 return High_Bound (Range_Expression (Constraint (Rng)));
7851 return High_Bound (Rng);
7853 end Type_High_Bound;
7855 --------------------
7856 -- Type_Low_Bound --
7857 --------------------
7859 function Type_Low_Bound (Id : E) return Node_Id is
7860 Rng : constant Node_Id := Scalar_Range (Id);
7862 if Nkind (Rng) = N_Subtype_Indication then
7863 return Low_Bound (Range_Expression (Constraint (Rng)));
7865 return Low_Bound (Rng);
7869 ---------------------
7870 -- Underlying_Type --
7871 ---------------------
7873 function Underlying_Type (Id : E) return E is
7875 -- For record_with_private the underlying type is always the direct
7876 -- full view. Never try to take the full view of the parent it
7877 -- doesn't make sense.
7879 if Ekind (Id) = E_Record_Type_With_Private then
7880 return Full_View (Id);
7882 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
7884 -- If we have an incomplete or private type with a full view,
7885 -- then we return the Underlying_Type of this full view
7887 if Present (Full_View (Id)) then
7888 if Id = Full_View (Id) then
7890 -- Previous error in declaration
7895 return Underlying_Type (Full_View (Id));
7898 -- If we have an incomplete entity that comes from the limited
7899 -- view then we return the Underlying_Type of its non-limited
7902 elsif From_With_Type (Id)
7903 and then Present (Non_Limited_View (Id))
7905 return Underlying_Type (Non_Limited_View (Id));
7907 -- Otherwise check for the case where we have a derived type or
7908 -- subtype, and if so get the Underlying_Type of the parent type.
7910 elsif Etype (Id) /= Id then
7911 return Underlying_Type (Etype (Id));
7913 -- Otherwise we have an incomplete or private type that has
7914 -- no full view, which means that we have not encountered the
7915 -- completion, so return Empty to indicate the underlying type
7916 -- is not yet known.
7922 -- For non-incomplete, non-private types, return the type itself
7923 -- Also for entities that are not types at all return the entity
7929 end Underlying_Type;
7935 function Vax_Float (Id : E) return B is
7937 return Is_Floating_Point_Type (Id) and then Float_Rep (Id) = VAX_Native;
7940 ------------------------
7941 -- Write_Entity_Flags --
7942 ------------------------
7944 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
7946 procedure W (Flag_Name : String; Flag : Boolean);
7947 -- Write out given flag if it is set
7953 procedure W (Flag_Name : String; Flag : Boolean) is
7957 Write_Str (Flag_Name);
7958 Write_Str (" = True");
7963 -- Start of processing for Write_Entity_Flags
7966 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
7967 and then Is_Base_Type (Id)
7970 Write_Str ("Component_Alignment = ");
7972 case Component_Alignment (Id) is
7973 when Calign_Default =>
7974 Write_Str ("Calign_Default");
7976 when Calign_Component_Size =>
7977 Write_Str ("Calign_Component_Size");
7979 when Calign_Component_Size_4 =>
7980 Write_Str ("Calign_Component_Size_4");
7982 when Calign_Storage_Unit =>
7983 Write_Str ("Calign_Storage_Unit");
7989 W ("Address_Taken", Flag104 (Id));
7990 W ("Body_Needed_For_SAL", Flag40 (Id));
7991 W ("C_Pass_By_Copy", Flag125 (Id));
7992 W ("Can_Never_Be_Null", Flag38 (Id));
7993 W ("Checks_May_Be_Suppressed", Flag31 (Id));
7994 W ("Debug_Info_Off", Flag166 (Id));
7995 W ("Default_Expressions_Processed", Flag108 (Id));
7996 W ("Delay_Cleanups", Flag114 (Id));
7997 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
7998 W ("Depends_On_Private", Flag14 (Id));
7999 W ("Discard_Names", Flag88 (Id));
8000 W ("Elaboration_Entity_Required", Flag174 (Id));
8001 W ("Elaborate_Body_Desirable", Flag210 (Id));
8002 W ("Entry_Accepted", Flag152 (Id));
8003 W ("Can_Use_Internal_Rep", Flag229 (Id));
8004 W ("Finalize_Storage_Only", Flag158 (Id));
8005 W ("From_With_Type", Flag159 (Id));
8006 W ("Has_Aliased_Components", Flag135 (Id));
8007 W ("Has_Alignment_Clause", Flag46 (Id));
8008 W ("Has_All_Calls_Remote", Flag79 (Id));
8009 W ("Has_Anonymous_Master", Flag253 (Id));
8010 W ("Has_Atomic_Components", Flag86 (Id));
8011 W ("Has_Biased_Representation", Flag139 (Id));
8012 W ("Has_Body_References", Flag264 (Id));
8013 W ("Has_Completion", Flag26 (Id));
8014 W ("Has_Completion_In_Body", Flag71 (Id));
8015 W ("Has_Complex_Representation", Flag140 (Id));
8016 W ("Has_Component_Size_Clause", Flag68 (Id));
8017 W ("Has_Contiguous_Rep", Flag181 (Id));
8018 W ("Has_Controlled_Component", Flag43 (Id));
8019 W ("Has_Controlling_Result", Flag98 (Id));
8020 W ("Has_Convention_Pragma", Flag119 (Id));
8021 W ("Has_Default_Aspect", Flag39 (Id));
8022 W ("Has_Delayed_Aspects", Flag200 (Id));
8023 W ("Has_Delayed_Freeze", Flag18 (Id));
8024 W ("Has_Delayed_Rep_Aspects", Flag261 (Id));
8025 W ("Has_Discriminants", Flag5 (Id));
8026 W ("Has_Dispatch_Table", Flag220 (Id));
8027 W ("Has_Dynamic_Predicate_Aspect", Flag258 (Id));
8028 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
8029 W ("Has_Exit", Flag47 (Id));
8030 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
8031 W ("Has_Forward_Instantiation", Flag175 (Id));
8032 W ("Has_Fully_Qualified_Name", Flag173 (Id));
8033 W ("Has_Gigi_Rep_Item", Flag82 (Id));
8034 W ("Has_Homonym", Flag56 (Id));
8035 W ("Has_Implicit_Dereference", Flag251 (Id));
8036 W ("Has_Inheritable_Invariants", Flag248 (Id));
8037 W ("Has_Initial_Value", Flag219 (Id));
8038 W ("Has_Invariants", Flag232 (Id));
8039 W ("Has_Loop_Entry_Attributes", Flag260 (Id));
8040 W ("Has_Machine_Radix_Clause", Flag83 (Id));
8041 W ("Has_Master_Entity", Flag21 (Id));
8042 W ("Has_Missing_Return", Flag142 (Id));
8043 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
8044 W ("Has_Non_Standard_Rep", Flag75 (Id));
8045 W ("Has_Object_Size_Clause", Flag172 (Id));
8046 W ("Has_Per_Object_Constraint", Flag154 (Id));
8047 W ("Has_Postconditions", Flag240 (Id));
8048 W ("Has_Pragma_Controlled", Flag27 (Id));
8049 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
8050 W ("Has_Pragma_Inline", Flag157 (Id));
8051 W ("Has_Pragma_Inline_Always", Flag230 (Id));
8052 W ("Has_Pragma_No_Inline", Flag201 (Id));
8053 W ("Has_Pragma_Ordered", Flag198 (Id));
8054 W ("Has_Pragma_Pack", Flag121 (Id));
8055 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
8056 W ("Has_Pragma_Pure", Flag203 (Id));
8057 W ("Has_Pragma_Pure_Function", Flag179 (Id));
8058 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
8059 W ("Has_Pragma_Unmodified", Flag233 (Id));
8060 W ("Has_Pragma_Unreferenced", Flag180 (Id));
8061 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
8062 W ("Has_Predicates", Flag250 (Id));
8063 W ("Has_Primitive_Operations", Flag120 (Id));
8064 W ("Has_Private_Ancestor", Flag151 (Id));
8065 W ("Has_Private_Declaration", Flag155 (Id));
8066 W ("Has_Qualified_Name", Flag161 (Id));
8067 W ("Has_RACW", Flag214 (Id));
8068 W ("Has_Record_Rep_Clause", Flag65 (Id));
8069 W ("Has_Recursive_Call", Flag143 (Id));
8070 W ("Has_Size_Clause", Flag29 (Id));
8071 W ("Has_Small_Clause", Flag67 (Id));
8072 W ("Has_Specified_Layout", Flag100 (Id));
8073 W ("Has_Specified_Stream_Input", Flag190 (Id));
8074 W ("Has_Specified_Stream_Output", Flag191 (Id));
8075 W ("Has_Specified_Stream_Read", Flag192 (Id));
8076 W ("Has_Specified_Stream_Write", Flag193 (Id));
8077 W ("Has_Static_Discriminants", Flag211 (Id));
8078 W ("Has_Static_Predicate_Aspect", Flag259 (Id));
8079 W ("Has_Storage_Size_Clause", Flag23 (Id));
8080 W ("Has_Stream_Size_Clause", Flag184 (Id));
8081 W ("Has_Task", Flag30 (Id));
8082 W ("Has_Thunks", Flag228 (Id));
8083 W ("Has_Unchecked_Union", Flag123 (Id));
8084 W ("Has_Unknown_Discriminants", Flag72 (Id));
8085 W ("Has_Up_Level_Access", Flag215 (Id));
8086 W ("Has_Visible_Refinement", Flag263 (Id));
8087 W ("Has_Volatile_Components", Flag87 (Id));
8088 W ("Has_Xref_Entry", Flag182 (Id));
8089 W ("In_Package_Body", Flag48 (Id));
8090 W ("In_Private_Part", Flag45 (Id));
8091 W ("In_Use", Flag8 (Id));
8092 W ("Is_AST_Entry", Flag132 (Id));
8093 W ("Is_Abstract_Subprogram", Flag19 (Id));
8094 W ("Is_Abstract_Type", Flag146 (Id));
8095 W ("Is_Local_Anonymous_Access", Flag194 (Id));
8096 W ("Is_Access_Constant", Flag69 (Id));
8097 W ("Is_Ada_2005_Only", Flag185 (Id));
8098 W ("Is_Ada_2012_Only", Flag199 (Id));
8099 W ("Is_Aliased", Flag15 (Id));
8100 W ("Is_Asynchronous", Flag81 (Id));
8101 W ("Is_Atomic", Flag85 (Id));
8102 W ("Is_Bit_Packed_Array", Flag122 (Id));
8103 W ("Is_CPP_Class", Flag74 (Id));
8104 W ("Is_Called", Flag102 (Id));
8105 W ("Is_Character_Type", Flag63 (Id));
8106 W ("Is_Child_Unit", Flag73 (Id));
8107 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
8108 W ("Is_Compilation_Unit", Flag149 (Id));
8109 W ("Is_Completely_Hidden", Flag103 (Id));
8110 W ("Is_Concurrent_Record_Type", Flag20 (Id));
8111 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
8112 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
8113 W ("Is_Constrained", Flag12 (Id));
8114 W ("Is_Constructor", Flag76 (Id));
8115 W ("Is_Controlled", Flag42 (Id));
8116 W ("Is_Controlling_Formal", Flag97 (Id));
8117 W ("Is_Descendent_Of_Address", Flag223 (Id));
8118 W ("Is_Discrim_SO_Function", Flag176 (Id));
8119 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
8120 W ("Is_Dispatching_Operation", Flag6 (Id));
8121 W ("Is_Eliminated", Flag124 (Id));
8122 W ("Is_Entry_Formal", Flag52 (Id));
8123 W ("Is_Exported", Flag99 (Id));
8124 W ("Is_First_Subtype", Flag70 (Id));
8125 W ("Is_For_Access_Subtype", Flag118 (Id));
8126 W ("Is_Formal_Subprogram", Flag111 (Id));
8127 W ("Is_Frozen", Flag4 (Id));
8128 W ("Is_Generic_Actual_Type", Flag94 (Id));
8129 W ("Is_Generic_Instance", Flag130 (Id));
8130 W ("Is_Generic_Type", Flag13 (Id));
8131 W ("Is_Hidden", Flag57 (Id));
8132 W ("Is_Hidden_Open_Scope", Flag171 (Id));
8133 W ("Is_Immediately_Visible", Flag7 (Id));
8134 W ("Is_Implementation_Defined", Flag254 (Id));
8135 W ("Is_Imported", Flag24 (Id));
8136 W ("Is_Inlined", Flag11 (Id));
8137 W ("Is_Instantiated", Flag126 (Id));
8138 W ("Is_Interface", Flag186 (Id));
8139 W ("Is_Internal", Flag17 (Id));
8140 W ("Is_Interrupt_Handler", Flag89 (Id));
8141 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
8142 W ("Is_Invariant_Procedure", Flag257 (Id));
8143 W ("Is_Itype", Flag91 (Id));
8144 W ("Is_Known_Non_Null", Flag37 (Id));
8145 W ("Is_Known_Null", Flag204 (Id));
8146 W ("Is_Known_Valid", Flag170 (Id));
8147 W ("Is_Limited_Composite", Flag106 (Id));
8148 W ("Is_Limited_Interface", Flag197 (Id));
8149 W ("Is_Limited_Record", Flag25 (Id));
8150 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
8151 W ("Is_Non_Static_Subtype", Flag109 (Id));
8152 W ("Is_Null_Init_Proc", Flag178 (Id));
8153 W ("Is_Obsolescent", Flag153 (Id));
8154 W ("Is_Only_Out_Parameter", Flag226 (Id));
8155 W ("Is_Optional_Parameter", Flag134 (Id));
8156 W ("Is_Package_Body_Entity", Flag160 (Id));
8157 W ("Is_Packed", Flag51 (Id));
8158 W ("Is_Packed_Array_Type", Flag138 (Id));
8159 W ("Is_Potentially_Use_Visible", Flag9 (Id));
8160 W ("Is_Predicate_Function", Flag255 (Id));
8161 W ("Is_Predicate_Function_M", Flag256 (Id));
8162 W ("Is_Preelaborated", Flag59 (Id));
8163 W ("Is_Primitive", Flag218 (Id));
8164 W ("Is_Primitive_Wrapper", Flag195 (Id));
8165 W ("Is_Private_Composite", Flag107 (Id));
8166 W ("Is_Private_Descendant", Flag53 (Id));
8167 W ("Is_Private_Primitive", Flag245 (Id));
8168 W ("Is_Processed_Transient", Flag252 (Id));
8169 W ("Is_Public", Flag10 (Id));
8170 W ("Is_Pure", Flag44 (Id));
8171 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
8172 W ("Is_RACW_Stub_Type", Flag244 (Id));
8173 W ("Is_Raised", Flag224 (Id));
8174 W ("Is_Remote_Call_Interface", Flag62 (Id));
8175 W ("Is_Remote_Types", Flag61 (Id));
8176 W ("Is_Renaming_Of_Object", Flag112 (Id));
8177 W ("Is_Return_Object", Flag209 (Id));
8178 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
8179 W ("Is_Shared_Passive", Flag60 (Id));
8180 W ("Is_Statically_Allocated", Flag28 (Id));
8181 W ("Is_Tag", Flag78 (Id));
8182 W ("Is_Tagged_Type", Flag55 (Id));
8183 W ("Is_Thunk", Flag225 (Id));
8184 W ("Is_Trivial_Subprogram", Flag235 (Id));
8185 W ("Is_True_Constant", Flag163 (Id));
8186 W ("Is_Unchecked_Union", Flag117 (Id));
8187 W ("Is_Underlying_Record_View", Flag246 (Id));
8188 W ("Is_Unsigned_Type", Flag144 (Id));
8189 W ("Is_VMS_Exception", Flag133 (Id));
8190 W ("Is_Valued_Procedure", Flag127 (Id));
8191 W ("Is_Visible_Formal", Flag206 (Id));
8192 W ("Is_Visible_Lib_Unit", Flag116 (Id));
8193 W ("Is_Volatile", Flag16 (Id));
8194 W ("Itype_Printed", Flag202 (Id));
8195 W ("Kill_Elaboration_Checks", Flag32 (Id));
8196 W ("Kill_Range_Checks", Flag33 (Id));
8197 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
8198 W ("Low_Bound_Tested", Flag205 (Id));
8199 W ("Machine_Radix_10", Flag84 (Id));
8200 W ("Materialize_Entity", Flag168 (Id));
8201 W ("May_Inherit_Delayed_Rep_Aspects", Flag262 (Id));
8202 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
8203 W ("Must_Have_Preelab_Init", Flag208 (Id));
8204 W ("Needs_Debug_Info", Flag147 (Id));
8205 W ("Needs_No_Actuals", Flag22 (Id));
8206 W ("Never_Set_In_Source", Flag115 (Id));
8207 W ("No_Pool_Assigned", Flag131 (Id));
8208 W ("No_Return", Flag113 (Id));
8209 W ("No_Strict_Aliasing", Flag136 (Id));
8210 W ("Non_Binary_Modulus", Flag58 (Id));
8211 W ("Nonzero_Is_True", Flag162 (Id));
8212 W ("OK_To_Rename", Flag247 (Id));
8213 W ("OK_To_Reorder_Components", Flag239 (Id));
8214 W ("Optimize_Alignment_Space", Flag241 (Id));
8215 W ("Optimize_Alignment_Time", Flag242 (Id));
8216 W ("Overlays_Constant", Flag243 (Id));
8217 W ("Reachable", Flag49 (Id));
8218 W ("Referenced", Flag156 (Id));
8219 W ("Referenced_As_LHS", Flag36 (Id));
8220 W ("Referenced_As_Out_Parameter", Flag227 (Id));
8221 W ("Renamed_In_Spec", Flag231 (Id));
8222 W ("Requires_Overriding", Flag213 (Id));
8223 W ("Return_Present", Flag54 (Id));
8224 W ("Returns_By_Ref", Flag90 (Id));
8225 W ("Reverse_Bit_Order", Flag164 (Id));
8226 W ("Reverse_Storage_Order", Flag93 (Id));
8227 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
8228 W ("Size_Depends_On_Discriminant", Flag177 (Id));
8229 W ("Size_Known_At_Compile_Time", Flag92 (Id));
8230 W ("Static_Elaboration_Desired", Flag77 (Id));
8231 W ("Strict_Alignment", Flag145 (Id));
8232 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
8233 W ("Suppress_Initialization", Flag105 (Id));
8234 W ("Suppress_Style_Checks", Flag165 (Id));
8235 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
8236 W ("Treat_As_Volatile", Flag41 (Id));
8237 W ("Universal_Aliasing", Flag216 (Id));
8238 W ("Used_As_Generic_Actual", Flag222 (Id));
8239 W ("Uses_Sec_Stack", Flag95 (Id));
8240 W ("Warnings_Off", Flag96 (Id));
8241 W ("Warnings_Off_Used", Flag236 (Id));
8242 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
8243 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
8244 W ("Was_Hidden", Flag196 (Id));
8245 end Write_Entity_Flags;
8247 -----------------------
8248 -- Write_Entity_Info --
8249 -----------------------
8251 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
8253 procedure Write_Attribute (Which : String; Nam : E);
8254 -- Write attribute value with given string name
8256 procedure Write_Kind (Id : Entity_Id);
8257 -- Write Ekind field of entity
8259 ---------------------
8260 -- Write_Attribute --
8261 ---------------------
8263 procedure Write_Attribute (Which : String; Nam : E) is
8267 Write_Int (Int (Nam));
8269 Write_Name (Chars (Nam));
8271 end Write_Attribute;
8277 procedure Write_Kind (Id : Entity_Id) is
8278 K : constant String := Entity_Kind'Image (Ekind (Id));
8282 Write_Str (" Kind ");
8284 if Is_Type (Id) and then Is_Tagged_Type (Id) then
8285 Write_Str ("TAGGED ");
8288 Write_Str (K (3 .. K'Length));
8291 if Is_Type (Id) and then Depends_On_Private (Id) then
8292 Write_Str ("Depends_On_Private ");
8296 -- Start of processing for Write_Entity_Info
8300 Write_Attribute ("Name ", Id);
8301 Write_Int (Int (Id));
8305 Write_Attribute (" Type ", Etype (Id));
8307 Write_Attribute (" Scope ", Scope (Id));
8312 when Discrete_Kind =>
8313 Write_Str ("Bounds: Id = ");
8315 if Present (Scalar_Range (Id)) then
8316 Write_Int (Int (Type_Low_Bound (Id)));
8317 Write_Str (" .. Id = ");
8318 Write_Int (Int (Type_High_Bound (Id)));
8320 Write_Str ("Empty");
8331 (" Component Type ", Component_Type (Id));
8334 Write_Str (" Indexes ");
8336 Index := First_Index (Id);
8337 while Present (Index) loop
8338 Write_Attribute (" ", Etype (Index));
8339 Index := Next_Index (Index);
8347 (" Directly Designated Type ",
8348 Directly_Designated_Type (Id));
8351 when Overloadable_Kind =>
8352 if Present (Homonym (Id)) then
8353 Write_Str (" Homonym ");
8354 Write_Name (Chars (Homonym (Id)));
8356 Write_Int (Int (Homonym (Id)));
8363 if Ekind (Scope (Id)) in Record_Kind then
8365 " Original_Record_Component ",
8366 Original_Record_Component (Id));
8367 Write_Int (Int (Original_Record_Component (Id)));
8371 when others => null;
8373 end Write_Entity_Info;
8375 -----------------------
8376 -- Write_Field6_Name --
8377 -----------------------
8379 procedure Write_Field6_Name (Id : Entity_Id) is
8380 pragma Warnings (Off, Id);
8382 Write_Str ("First_Rep_Item");
8383 end Write_Field6_Name;
8385 -----------------------
8386 -- Write_Field7_Name --
8387 -----------------------
8389 procedure Write_Field7_Name (Id : Entity_Id) is
8390 pragma Warnings (Off, Id);
8392 Write_Str ("Freeze_Node");
8393 end Write_Field7_Name;
8395 -----------------------
8396 -- Write_Field8_Name --
8397 -----------------------
8399 procedure Write_Field8_Name (Id : Entity_Id) is
8403 Write_Str ("Associated_Node_For_Itype");
8406 Write_Str ("Dependent_Instances");
8409 Write_Str ("First_Exit_Statement");
8412 Write_Str ("Hiding_Loop_Variable");
8416 E_Subprogram_Body =>
8417 Write_Str ("Mechanism");
8421 Write_Str ("Normalized_First_Bit");
8424 Write_Str ("Postcondition_Proc");
8426 when E_Abstract_State =>
8427 Write_Str ("Refinement_Constituents");
8429 when E_Return_Statement =>
8430 Write_Str ("Return_Applies_To");
8433 Write_Str ("Field8??");
8435 end Write_Field8_Name;
8437 -----------------------
8438 -- Write_Field9_Name --
8439 -----------------------
8441 procedure Write_Field9_Name (Id : Entity_Id) is
8445 Write_Str ("Class_Wide_Type");
8448 Write_Str ("Current_Value");
8451 E_Generic_Function |
8453 E_Generic_Procedure |
8456 Write_Str ("Renaming_Map");
8459 Write_Str ("Field9??");
8461 end Write_Field9_Name;
8463 ------------------------
8464 -- Write_Field10_Name --
8465 ------------------------
8467 procedure Write_Field10_Name (Id : Entity_Id) is
8470 when Class_Wide_Kind |
8476 Write_Str ("Direct_Primitive_Operations");
8479 Write_Str ("Float_Rep");
8481 when E_In_Parameter |
8483 Write_Str ("Discriminal_Link");
8489 Write_Str ("Handler_Records");
8493 Write_Str ("Normalized_Position_Max");
8495 when E_Abstract_State |
8497 Write_Str ("Refined_State");
8500 Write_Str ("Field10??");
8502 end Write_Field10_Name;
8504 ------------------------
8505 -- Write_Field11_Name --
8506 ------------------------
8508 procedure Write_Field11_Name (Id : Entity_Id) is
8512 Write_Str ("Block_Node");
8516 Write_Str ("Component_Bit_Offset");
8519 Write_Str ("Entry_Component");
8521 when E_Enumeration_Literal =>
8522 Write_Str ("Enumeration_Pos");
8526 Write_Str ("Full_View");
8528 when E_Generic_Package =>
8529 Write_Str ("Generic_Homonym");
8535 Write_Str ("Protected_Body_Subprogram");
8538 Write_Str ("Field11??");
8540 end Write_Field11_Name;
8542 ------------------------
8543 -- Write_Field12_Name --
8544 ------------------------
8546 procedure Write_Field12_Name (Id : Entity_Id) is
8550 Write_Str ("Associated_Formal_Package");
8553 Write_Str ("Barrier_Function");
8555 when E_Enumeration_Literal =>
8556 Write_Str ("Enumeration_Rep");
8564 E_In_Out_Parameter |
8568 Write_Str ("Esize");
8572 Write_Str ("Next_Inlined_Subprogram");
8575 Write_Str ("Field12??");
8577 end Write_Field12_Name;
8579 ------------------------
8580 -- Write_Field13_Name --
8581 ------------------------
8583 procedure Write_Field13_Name (Id : Entity_Id) is
8588 Write_Str ("Component_Clause");
8591 Write_Str ("Elaboration_Entity");
8595 Generic_Unit_Kind =>
8596 Write_Str ("Elaboration_Entity");
8600 Write_Str ("Extra_Accessibility");
8603 Write_Str ("RM_Size");
8606 Write_Str ("Field13??");
8608 end Write_Field13_Name;
8610 -----------------------
8611 -- Write_Field14_Name --
8612 -----------------------
8614 procedure Write_Field14_Name (Id : Entity_Id) is
8623 Write_Str ("Alignment");
8627 Write_Str ("First_Optional_Parameter");
8631 Write_Str ("Normalized_Position");
8634 E_Generic_Package =>
8635 Write_Str ("Shadow_Entities");
8638 Write_Str ("Field14??");
8640 end Write_Field14_Name;
8642 ------------------------
8643 -- Write_Field15_Name --
8644 ------------------------
8646 procedure Write_Field15_Name (Id : Entity_Id) is
8649 when E_Discriminant =>
8650 Write_Str ("Discriminant_Number");
8653 Write_Str ("DT_Entry_Count");
8657 Write_Str ("DT_Position");
8659 when E_Protected_Type =>
8660 Write_Str ("Entry_Bodies_Array");
8663 Write_Str ("Entry_Parameters_Type");
8666 Write_Str ("Extra_Formal");
8668 when Enumeration_Kind =>
8669 Write_Str ("Lit_Indexes");
8673 Write_Str ("Related_Instance");
8675 when Decimal_Fixed_Point_Kind =>
8676 Write_Str ("Scale_Value");
8680 Write_Str ("Status_Flag_Or_Transient_Decl");
8684 Write_Str ("Storage_Size_Variable");
8686 when E_String_Literal_Subtype =>
8687 Write_Str ("String_Literal_Low_Bound");
8690 Write_Str ("Field15??");
8692 end Write_Field15_Name;
8694 ------------------------
8695 -- Write_Field16_Name --
8696 ------------------------
8698 procedure Write_Field16_Name (Id : Entity_Id) is
8702 when E_Abstract_State =>
8703 Write_Str ("Body_References");
8705 when E_Record_Type |
8706 E_Record_Type_With_Private =>
8707 Write_Str ("Access_Disp_Table");
8709 when E_Record_Subtype |
8710 E_Class_Wide_Subtype =>
8711 Write_Str ("Cloned_Subtype");
8715 Write_Str ("DTC_Entity");
8718 Write_Str ("Entry_Formal");
8723 Write_Str ("First_Private_Entity");
8725 when Enumeration_Kind =>
8726 Write_Str ("Lit_Strings");
8728 when E_String_Literal_Subtype =>
8729 Write_Str ("String_Literal_Length");
8733 Write_Str ("Unset_Reference");
8736 Write_Str ("Field16??");
8738 end Write_Field16_Name;
8740 ------------------------
8741 -- Write_Field17_Name --
8742 ------------------------
8744 procedure Write_Field17_Name (Id : Entity_Id) is
8749 E_Generic_In_Out_Parameter |
8751 Write_Str ("Actual_Subtype");
8754 Write_Str ("Digits_Value");
8756 when E_Discriminant =>
8757 Write_Str ("Discriminal");
8766 E_Generic_Function |
8768 E_Generic_Procedure |
8776 E_Return_Statement |
8778 E_Subprogram_Type =>
8779 Write_Str ("First_Entity");
8782 Write_Str ("First_Index");
8784 when Enumeration_Kind =>
8785 Write_Str ("First_Literal");
8788 Write_Str ("Master_Id");
8790 when Modular_Integer_Kind =>
8791 Write_Str ("Modulus");
8793 when E_Incomplete_Type =>
8794 Write_Str ("Non_Limited_View");
8796 when E_Incomplete_Subtype =>
8797 if From_With_Type (Id) then
8798 Write_Str ("Non_Limited_View");
8802 Write_Str ("Prival");
8805 Write_Str ("Field17??");
8807 end Write_Field17_Name;
8809 ------------------------
8810 -- Write_Field18_Name --
8811 ------------------------
8813 procedure Write_Field18_Name (Id : Entity_Id) is
8816 when E_Enumeration_Literal |
8820 Write_Str ("Alias");
8822 when E_Record_Type =>
8823 Write_Str ("Corresponding_Concurrent_Type");
8825 when E_Subprogram_Body =>
8826 Write_Str ("Corresponding_Protected_Entry");
8828 when Concurrent_Kind =>
8829 Write_Str ("Corresponding_Record_Type");
8834 Write_Str ("Enclosing_Scope");
8836 when E_Entry_Index_Parameter =>
8837 Write_Str ("Entry_Index_Constant");
8839 when E_Class_Wide_Subtype |
8840 E_Access_Protected_Subprogram_Type |
8841 E_Anonymous_Access_Protected_Subprogram_Type |
8842 E_Access_Subprogram_Type |
8844 Write_Str ("Equivalent_Type");
8846 when Fixed_Point_Kind =>
8847 Write_Str ("Delta_Value");
8849 when Incomplete_Or_Private_Kind |
8851 Write_Str ("Private_Dependents");
8854 Write_Str ("Renamed_Object");
8858 E_Generic_Function |
8859 E_Generic_Procedure |
8860 E_Generic_Package =>
8861 Write_Str ("Renamed_Entity");
8864 Write_Str ("Field18??");
8866 end Write_Field18_Name;
8868 -----------------------
8869 -- Write_Field19_Name --
8870 -----------------------
8872 procedure Write_Field19_Name (Id : Entity_Id) is
8876 E_Generic_Package =>
8877 Write_Str ("Body_Entity");
8879 when E_Discriminant =>
8880 Write_Str ("Corresponding_Discriminant");
8883 Write_Str ("Default_Aspect_Value");
8885 when E_Array_Type =>
8886 Write_Str ("Default_Component_Value");
8888 when E_Record_Type =>
8889 Write_Str ("Parent_Subtype");
8893 Write_Str ("Size_Check_Code");
8895 when E_Package_Body |
8897 Write_Str ("Spec_Entity");
8899 when Private_Kind =>
8900 Write_Str ("Underlying_Full_View");
8902 when E_Function | E_Operator | E_Subprogram_Type =>
8903 Write_Str ("Extra_Accessibility_Of_Result");
8906 Write_Str ("Field19??");
8908 end Write_Field19_Name;
8910 -----------------------
8911 -- Write_Field20_Name --
8912 -----------------------
8914 procedure Write_Field20_Name (Id : Entity_Id) is
8918 Write_Str ("Component_Type");
8920 when E_In_Parameter |
8921 E_Generic_In_Parameter =>
8922 Write_Str ("Default_Value");
8925 Write_Str ("Directly_Designated_Type");
8928 Write_Str ("Discriminant_Checking_Func");
8930 when E_Discriminant =>
8931 Write_Str ("Discriminant_Default_Value");
8940 E_Generic_Function |
8942 E_Generic_Procedure |
8950 E_Return_Statement |
8952 E_Subprogram_Type =>
8953 Write_Str ("Last_Entity");
8957 Write_Str ("Prival_Link");
8960 Write_Str ("Scalar_Range");
8963 Write_Str ("Register_Exception_Call");
8966 Write_Str ("Field20??");
8968 end Write_Field20_Name;
8970 -----------------------
8971 -- Write_Field21_Name --
8972 -----------------------
8974 procedure Write_Field21_Name (Id : Entity_Id) is
8978 Write_Str ("Accept_Address");
8980 when E_In_Parameter =>
8981 Write_Str ("Default_Expr_Function");
8983 when Concurrent_Kind |
8984 Incomplete_Or_Private_Kind |
8988 Write_Str ("Discriminant_Constraint");
8993 E_Generic_Function |
8995 E_Generic_Procedure |
8997 Write_Str ("Interface_Name");
9000 Modular_Integer_Kind =>
9001 Write_Str ("Original_Array_Type");
9003 when Fixed_Point_Kind =>
9004 Write_Str ("Small_Value");
9007 Write_Str ("Field21??");
9009 end Write_Field21_Name;
9011 -----------------------
9012 -- Write_Field22_Name --
9013 -----------------------
9015 procedure Write_Field22_Name (Id : Entity_Id) is
9019 Write_Str ("Associated_Storage_Pool");
9022 Write_Str ("Component_Size");
9024 when E_Record_Type =>
9025 Write_Str ("Corresponding_Remote_Type");
9029 Write_Str ("Original_Record_Component");
9031 when E_Enumeration_Literal =>
9032 Write_Str ("Enumeration_Rep_Expr");
9035 Write_Str ("Exception_Code");
9037 when E_Record_Type_With_Private |
9038 E_Record_Subtype_With_Private |
9041 E_Limited_Private_Type |
9042 E_Limited_Private_Subtype =>
9043 Write_Str ("Private_View");
9046 Write_Str ("Protected_Formal");
9056 E_Generic_Function |
9057 E_Generic_Procedure |
9060 E_Return_Statement |
9063 Write_Str ("Scope_Depth_Value");
9066 Write_Str ("Shared_Var_Procs_Instance");
9069 Write_Str ("Field22??");
9071 end Write_Field22_Name;
9073 ------------------------
9074 -- Write_Field23_Name --
9075 ------------------------
9077 procedure Write_Field23_Name (Id : Entity_Id) is
9080 when E_Discriminant =>
9081 Write_Str ("CR_Discriminant");
9084 Write_Str ("Entry_Cancel_Parameter");
9086 when E_Enumeration_Type =>
9087 Write_Str ("Enum_Pos_To_Rep");
9091 Write_Str ("Extra_Constrained");
9094 Write_Str ("Finalization_Master");
9096 when E_Generic_Function |
9098 E_Generic_Procedure =>
9099 Write_Str ("Inner_Instances");
9102 Write_Str ("Packed_Array_Type");
9105 Write_Str ("Protection_Object");
9107 when Concurrent_Kind |
9108 Incomplete_Or_Private_Kind |
9112 Write_Str ("Stored_Constraint");
9116 if Present (Scope (Id))
9117 and then Is_Protected_Type (Scope (Id))
9119 Write_Str ("Protection_Object");
9121 Write_Str ("Generic_Renamings");
9125 if Is_Generic_Instance (Id) then
9126 Write_Str ("Generic_Renamings");
9128 Write_Str ("Limited_View");
9132 Write_Str ("Field23??");
9134 end Write_Field23_Name;
9136 ------------------------
9137 -- Write_Field24_Name --
9138 ------------------------
9140 procedure Write_Field24_Name (Id : Entity_Id) is
9146 Write_Str ("Related_Expression");
9154 Generic_Subprogram_Kind |
9156 Write_Str ("Contract");
9159 Write_Str ("Field24???");
9161 end Write_Field24_Name;
9163 ------------------------
9164 -- Write_Field25_Name --
9165 ------------------------
9167 procedure Write_Field25_Name (Id : Entity_Id) is
9171 Write_Str ("Abstract_States");
9174 Write_Str ("Debug_Renaming_Link");
9177 Write_Str ("DT_Offset_To_Top_Func");
9181 Write_Str ("Interface_Alias");
9183 when E_Record_Type |
9185 E_Record_Type_With_Private |
9186 E_Record_Subtype_With_Private =>
9187 Write_Str ("Interfaces");
9191 Write_Str ("Related_Array_Object");
9194 Write_Str ("Task_Body_Procedure");
9198 Write_Str ("PPC_Wrapper");
9200 when E_Enumeration_Subtype |
9201 E_Modular_Integer_Subtype |
9202 E_Signed_Integer_Subtype =>
9203 Write_Str ("Static_Predicate");
9206 Write_Str ("Field25??");
9208 end Write_Field25_Name;
9210 ------------------------
9211 -- Write_Field26_Name --
9212 ------------------------
9214 procedure Write_Field26_Name (Id : Entity_Id) is
9217 when E_Record_Type |
9218 E_Record_Type_With_Private =>
9219 Write_Str ("Dispatch_Table_Wrappers");
9221 when E_In_Out_Parameter |
9224 Write_Str ("Last_Assignment");
9226 when E_Access_Subprogram_Type =>
9227 Write_Str ("Original_Access_Type");
9229 when E_Generic_Package |
9231 Write_Str ("Package_Instantiation");
9235 Write_Str ("Related_Type");
9238 Write_Str ("Relative_Deadline_Variable");
9242 Write_Str ("Overridden_Operation");
9245 Write_Str ("Field26??");
9247 end Write_Field26_Name;
9249 ------------------------
9250 -- Write_Field27_Name --
9251 ------------------------
9253 procedure Write_Field27_Name (Id : Entity_Id) is
9258 Write_Str ("Current_Use_Clause");
9263 Write_Str ("Related_Type");
9267 Write_Str ("Wrapped_Entity");
9270 Write_Str ("Field27??");
9272 end Write_Field27_Name;
9274 ------------------------
9275 -- Write_Field28_Name --
9276 ------------------------
9278 procedure Write_Field28_Name (Id : Entity_Id) is
9286 E_Subprogram_Type =>
9287 Write_Str ("Extra_Formals");
9291 Write_Str ("Finalizer");
9295 Write_Str ("Initialization_Statements");
9297 when E_Record_Type =>
9298 Write_Str ("Underlying_Record_View");
9301 Write_Str ("Field28??");
9303 end Write_Field28_Name;
9305 ------------------------
9306 -- Write_Field29_Name --
9307 ------------------------
9309 procedure Write_Field29_Name (Id : Entity_Id) is
9313 Write_Str ("Subprograms_For_Type");
9316 Write_Str ("Field29??");
9318 end Write_Field29_Name;
9320 ------------------------
9321 -- Write_Field30_Name --
9322 ------------------------
9324 procedure Write_Field30_Name (Id : Entity_Id) is
9328 Write_Str ("Corresponding_Equality");
9331 Write_Str ("Static_Initialization");
9334 Write_Str ("Field30??");
9336 end Write_Field30_Name;
9338 ------------------------
9339 -- Write_Field31_Name --
9340 ------------------------
9342 procedure Write_Field31_Name (Id : Entity_Id) is
9347 Write_Str ("Thunk_Entity");
9350 Write_Str ("Field31??");
9352 end Write_Field31_Name;
9354 ------------------------
9355 -- Write_Field32_Name --
9356 ------------------------
9358 procedure Write_Field32_Name (Id : Entity_Id) is
9362 E_Generic_Function |
9364 E_Generic_Procedure |
9368 E_Subprogram_Body =>
9369 Write_Str ("SPARK_Mode_Pragmas");
9372 Write_Str ("Field32??");
9374 end Write_Field32_Name;
9376 ------------------------
9377 -- Write_Field33_Name --
9378 ------------------------
9380 procedure Write_Field33_Name (Id : Entity_Id) is
9384 Write_Str ("Field33??");
9386 end Write_Field33_Name;
9388 ------------------------
9389 -- Write_Field34_Name --
9390 ------------------------
9392 procedure Write_Field34_Name (Id : Entity_Id) is
9396 Write_Str ("Field34??");
9398 end Write_Field34_Name;
9400 ------------------------
9401 -- Write_Field35_Name --
9402 ------------------------
9404 procedure Write_Field35_Name (Id : Entity_Id) is
9408 Write_Str ("Field35??");
9410 end Write_Field35_Name;
9412 -------------------------
9413 -- Iterator Procedures --
9414 -------------------------
9416 procedure Proc_Next_Component (N : in out Node_Id) is
9418 N := Next_Component (N);
9419 end Proc_Next_Component;
9421 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
9423 N := Next_Entity (N);
9424 while Present (N) loop
9425 exit when Ekind_In (N, E_Component, E_Discriminant);
9426 N := Next_Entity (N);
9428 end Proc_Next_Component_Or_Discriminant;
9430 procedure Proc_Next_Discriminant (N : in out Node_Id) is
9432 N := Next_Discriminant (N);
9433 end Proc_Next_Discriminant;
9435 procedure Proc_Next_Formal (N : in out Node_Id) is
9437 N := Next_Formal (N);
9438 end Proc_Next_Formal;
9440 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
9442 N := Next_Formal_With_Extras (N);
9443 end Proc_Next_Formal_With_Extras;
9445 procedure Proc_Next_Index (N : in out Node_Id) is
9447 N := Next_Index (N);
9448 end Proc_Next_Index;
9450 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
9452 N := Next_Inlined_Subprogram (N);
9453 end Proc_Next_Inlined_Subprogram;
9455 procedure Proc_Next_Literal (N : in out Node_Id) is
9457 N := Next_Literal (N);
9458 end Proc_Next_Literal;
9460 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
9462 N := Next_Stored_Discriminant (N);
9463 end Proc_Next_Stored_Discriminant;