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_Limited_With 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_Limited_With (Id : E) return B is
1247 return Flag159 (Id);
1248 end From_Limited_With;
1250 function Full_View (Id : E) return E is
1252 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1256 function Generic_Homonym (Id : E) return E is
1258 pragma Assert (Ekind (Id) = E_Generic_Package);
1260 end Generic_Homonym;
1262 function Generic_Renamings (Id : E) return L is
1264 return Elist23 (Id);
1265 end Generic_Renamings;
1267 function Handler_Records (Id : E) return S is
1270 end Handler_Records;
1272 function Has_Aliased_Components (Id : E) return B is
1274 return Flag135 (Implementation_Base_Type (Id));
1275 end Has_Aliased_Components;
1277 function Has_Alignment_Clause (Id : E) return B is
1280 end Has_Alignment_Clause;
1282 function Has_All_Calls_Remote (Id : E) return B is
1285 end Has_All_Calls_Remote;
1287 function Has_Anonymous_Master (Id : E) return B is
1290 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
1291 return Flag253 (Id);
1292 end Has_Anonymous_Master;
1294 function Has_Atomic_Components (Id : E) return B is
1296 return Flag86 (Implementation_Base_Type (Id));
1297 end Has_Atomic_Components;
1299 function Has_Biased_Representation (Id : E) return B is
1301 return Flag139 (Id);
1302 end Has_Biased_Representation;
1304 function Has_Body_References (Id : E) return B is
1306 pragma Assert (Ekind (Id) = E_Abstract_State);
1307 return Flag264 (Id);
1308 end Has_Body_References;
1310 function Has_Completion (Id : E) return B is
1315 function Has_Completion_In_Body (Id : E) return B is
1317 pragma Assert (Is_Type (Id));
1319 end Has_Completion_In_Body;
1321 function Has_Complex_Representation (Id : E) return B is
1323 pragma Assert (Is_Type (Id));
1324 return Flag140 (Implementation_Base_Type (Id));
1325 end Has_Complex_Representation;
1327 function Has_Component_Size_Clause (Id : E) return B is
1329 pragma Assert (Is_Array_Type (Id));
1330 return Flag68 (Implementation_Base_Type (Id));
1331 end Has_Component_Size_Clause;
1333 function Has_Constrained_Partial_View (Id : E) return B is
1335 pragma Assert (Is_Type (Id));
1336 return Flag187 (Id);
1337 end Has_Constrained_Partial_View;
1339 function Has_Controlled_Component (Id : E) return B is
1341 return Flag43 (Base_Type (Id));
1342 end Has_Controlled_Component;
1344 function Has_Contiguous_Rep (Id : E) return B is
1346 return Flag181 (Id);
1347 end Has_Contiguous_Rep;
1349 function Has_Controlling_Result (Id : E) return B is
1352 end Has_Controlling_Result;
1354 function Has_Convention_Pragma (Id : E) return B is
1356 return Flag119 (Id);
1357 end Has_Convention_Pragma;
1359 function Has_Default_Aspect (Id : E) return B is
1361 return Flag39 (Base_Type (Id));
1362 end Has_Default_Aspect;
1364 function Has_Delayed_Aspects (Id : E) return B is
1366 pragma Assert (Nkind (Id) in N_Entity);
1367 return Flag200 (Id);
1368 end Has_Delayed_Aspects;
1370 function Has_Delayed_Freeze (Id : E) return B is
1372 pragma Assert (Nkind (Id) in N_Entity);
1374 end Has_Delayed_Freeze;
1376 function Has_Delayed_Rep_Aspects (Id : E) return B is
1378 pragma Assert (Nkind (Id) in N_Entity);
1379 return Flag261 (Id);
1380 end Has_Delayed_Rep_Aspects;
1382 function Has_Discriminants (Id : E) return B is
1384 pragma Assert (Nkind (Id) in N_Entity);
1386 end Has_Discriminants;
1388 function Has_Dispatch_Table (Id : E) return B is
1390 pragma Assert (Is_Tagged_Type (Id));
1391 return Flag220 (Id);
1392 end Has_Dispatch_Table;
1394 function Has_Dynamic_Predicate_Aspect (Id : E) return B is
1396 pragma Assert (Is_Type (Id));
1397 return Flag258 (Id);
1398 end Has_Dynamic_Predicate_Aspect;
1400 function Has_Enumeration_Rep_Clause (Id : E) return B is
1402 pragma Assert (Is_Enumeration_Type (Id));
1404 end Has_Enumeration_Rep_Clause;
1406 function Has_Exit (Id : E) return B is
1411 function Has_External_Tag_Rep_Clause (Id : E) return B is
1413 pragma Assert (Is_Tagged_Type (Id));
1414 return Flag110 (Id);
1415 end Has_External_Tag_Rep_Clause;
1417 function Has_Forward_Instantiation (Id : E) return B is
1419 return Flag175 (Id);
1420 end Has_Forward_Instantiation;
1422 function Has_Fully_Qualified_Name (Id : E) return B is
1424 return Flag173 (Id);
1425 end Has_Fully_Qualified_Name;
1427 function Has_Gigi_Rep_Item (Id : E) return B is
1430 end Has_Gigi_Rep_Item;
1432 function Has_Homonym (Id : E) return B is
1437 function Has_Implicit_Dereference (Id : E) return B is
1439 return Flag251 (Id);
1440 end Has_Implicit_Dereference;
1442 function Has_Independent_Components (Id : E) return B is
1444 pragma Assert (Is_Object (Id) or else Is_Type (Id));
1446 end Has_Independent_Components;
1448 function Has_Inheritable_Invariants (Id : E) return B is
1450 pragma Assert (Is_Type (Id));
1451 return Flag248 (Id);
1452 end Has_Inheritable_Invariants;
1454 function Has_Initial_Value (Id : E) return B is
1456 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1457 return Flag219 (Id);
1458 end Has_Initial_Value;
1460 function Has_Invariants (Id : E) return B is
1462 pragma Assert (Is_Type (Id));
1463 return Flag232 (Id);
1466 function Has_Loop_Entry_Attributes (Id : E) return B is
1468 pragma Assert (Ekind (Id) = E_Loop);
1469 return Flag260 (Id);
1470 end Has_Loop_Entry_Attributes;
1472 function Has_Machine_Radix_Clause (Id : E) return B is
1474 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1476 end Has_Machine_Radix_Clause;
1478 function Has_Master_Entity (Id : E) return B is
1481 end Has_Master_Entity;
1483 function Has_Missing_Return (Id : E) return B is
1485 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1486 return Flag142 (Id);
1487 end Has_Missing_Return;
1489 function Has_Nested_Block_With_Handler (Id : E) return B is
1491 return Flag101 (Id);
1492 end Has_Nested_Block_With_Handler;
1494 function Has_Non_Standard_Rep (Id : E) return B is
1496 return Flag75 (Implementation_Base_Type (Id));
1497 end Has_Non_Standard_Rep;
1499 function Has_Object_Size_Clause (Id : E) return B is
1501 pragma Assert (Is_Type (Id));
1502 return Flag172 (Id);
1503 end Has_Object_Size_Clause;
1505 function Has_Per_Object_Constraint (Id : E) return B is
1507 return Flag154 (Id);
1508 end Has_Per_Object_Constraint;
1510 function Has_Postconditions (Id : E) return B is
1512 pragma Assert (Is_Subprogram (Id));
1513 return Flag240 (Id);
1514 end Has_Postconditions;
1516 function Has_Pragma_Controlled (Id : E) return B is
1518 pragma Assert (Is_Access_Type (Id));
1519 return Flag27 (Implementation_Base_Type (Id));
1520 end Has_Pragma_Controlled;
1522 function Has_Pragma_Elaborate_Body (Id : E) return B is
1524 return Flag150 (Id);
1525 end Has_Pragma_Elaborate_Body;
1527 function Has_Pragma_Inline (Id : E) return B is
1529 return Flag157 (Id);
1530 end Has_Pragma_Inline;
1532 function Has_Pragma_Inline_Always (Id : E) return B is
1534 return Flag230 (Id);
1535 end Has_Pragma_Inline_Always;
1537 function Has_Pragma_No_Inline (Id : E) return B is
1539 return Flag201 (Id);
1540 end Has_Pragma_No_Inline;
1542 function Has_Pragma_Ordered (Id : E) return B is
1544 pragma Assert (Is_Enumeration_Type (Id));
1545 return Flag198 (Implementation_Base_Type (Id));
1546 end Has_Pragma_Ordered;
1548 function Has_Pragma_Pack (Id : E) return B is
1550 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1551 return Flag121 (Implementation_Base_Type (Id));
1552 end Has_Pragma_Pack;
1554 function Has_Pragma_Preelab_Init (Id : E) return B is
1556 return Flag221 (Id);
1557 end Has_Pragma_Preelab_Init;
1559 function Has_Pragma_Pure (Id : E) return B is
1561 return Flag203 (Id);
1562 end Has_Pragma_Pure;
1564 function Has_Pragma_Pure_Function (Id : E) return B is
1566 return Flag179 (Id);
1567 end Has_Pragma_Pure_Function;
1569 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1571 return Flag169 (Id);
1572 end Has_Pragma_Thread_Local_Storage;
1574 function Has_Pragma_Unmodified (Id : E) return B is
1576 return Flag233 (Id);
1577 end Has_Pragma_Unmodified;
1579 function Has_Pragma_Unreferenced (Id : E) return B is
1581 return Flag180 (Id);
1582 end Has_Pragma_Unreferenced;
1584 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1586 pragma Assert (Is_Type (Id));
1587 return Flag212 (Id);
1588 end Has_Pragma_Unreferenced_Objects;
1590 function Has_Predicates (Id : E) return B is
1592 pragma Assert (Is_Type (Id));
1593 return Flag250 (Id);
1596 function Has_Primitive_Operations (Id : E) return B is
1598 pragma Assert (Is_Type (Id));
1599 return Flag120 (Base_Type (Id));
1600 end Has_Primitive_Operations;
1602 function Has_Private_Ancestor (Id : E) return B is
1604 return Flag151 (Id);
1605 end Has_Private_Ancestor;
1607 function Has_Private_Declaration (Id : E) return B is
1609 return Flag155 (Id);
1610 end Has_Private_Declaration;
1612 function Has_Qualified_Name (Id : E) return B is
1614 return Flag161 (Id);
1615 end Has_Qualified_Name;
1617 function Has_RACW (Id : E) return B is
1619 pragma Assert (Ekind (Id) = E_Package);
1620 return Flag214 (Id);
1623 function Has_Record_Rep_Clause (Id : E) return B is
1625 pragma Assert (Is_Record_Type (Id));
1626 return Flag65 (Implementation_Base_Type (Id));
1627 end Has_Record_Rep_Clause;
1629 function Has_Recursive_Call (Id : E) return B is
1631 pragma Assert (Is_Subprogram (Id));
1632 return Flag143 (Id);
1633 end Has_Recursive_Call;
1635 function Has_Size_Clause (Id : E) return B is
1638 end Has_Size_Clause;
1640 function Has_Small_Clause (Id : E) return B is
1643 end Has_Small_Clause;
1645 function Has_Specified_Layout (Id : E) return B is
1647 pragma Assert (Is_Type (Id));
1648 return Flag100 (Implementation_Base_Type (Id));
1649 end Has_Specified_Layout;
1651 function Has_Specified_Stream_Input (Id : E) return B is
1653 pragma Assert (Is_Type (Id));
1654 return Flag190 (Id);
1655 end Has_Specified_Stream_Input;
1657 function Has_Specified_Stream_Output (Id : E) return B is
1659 pragma Assert (Is_Type (Id));
1660 return Flag191 (Id);
1661 end Has_Specified_Stream_Output;
1663 function Has_Specified_Stream_Read (Id : E) return B is
1665 pragma Assert (Is_Type (Id));
1666 return Flag192 (Id);
1667 end Has_Specified_Stream_Read;
1669 function Has_Specified_Stream_Write (Id : E) return B is
1671 pragma Assert (Is_Type (Id));
1672 return Flag193 (Id);
1673 end Has_Specified_Stream_Write;
1675 function Has_Static_Discriminants (Id : E) return B is
1677 pragma Assert (Is_Type (Id));
1678 return Flag211 (Id);
1679 end Has_Static_Discriminants;
1681 function Has_Static_Predicate_Aspect (Id : E) return B is
1683 pragma Assert (Is_Type (Id));
1684 return Flag259 (Id);
1685 end Has_Static_Predicate_Aspect;
1687 function Has_Storage_Size_Clause (Id : E) return B is
1689 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1690 return Flag23 (Implementation_Base_Type (Id));
1691 end Has_Storage_Size_Clause;
1693 function Has_Stream_Size_Clause (Id : E) return B is
1695 return Flag184 (Id);
1696 end Has_Stream_Size_Clause;
1698 function Has_Task (Id : E) return B is
1700 return Flag30 (Base_Type (Id));
1703 function Has_Thunks (Id : E) return B is
1705 return Flag228 (Id);
1708 function Has_Unchecked_Union (Id : E) return B is
1710 return Flag123 (Base_Type (Id));
1711 end Has_Unchecked_Union;
1713 function Has_Unknown_Discriminants (Id : E) return B is
1715 pragma Assert (Is_Type (Id));
1717 end Has_Unknown_Discriminants;
1719 function Has_Up_Level_Access (Id : E) return B is
1722 (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
1723 return Flag215 (Id);
1724 end Has_Up_Level_Access;
1726 function Has_Visible_Refinement (Id : E) return B is
1728 pragma Assert (Ekind (Id) = E_Abstract_State);
1729 return Flag263 (Id);
1730 end Has_Visible_Refinement;
1732 function Has_Volatile_Components (Id : E) return B is
1734 return Flag87 (Implementation_Base_Type (Id));
1735 end Has_Volatile_Components;
1737 function Has_Xref_Entry (Id : E) return B is
1739 return Flag182 (Id);
1742 function Hiding_Loop_Variable (Id : E) return E is
1744 pragma Assert (Ekind (Id) = E_Variable);
1746 end Hiding_Loop_Variable;
1748 function Homonym (Id : E) return E is
1753 function Interface_Alias (Id : E) return E is
1755 pragma Assert (Is_Subprogram (Id));
1757 end Interface_Alias;
1759 function Interfaces (Id : E) return L is
1761 pragma Assert (Is_Record_Type (Id));
1762 return Elist25 (Id);
1765 function In_Package_Body (Id : E) return B is
1768 end In_Package_Body;
1770 function In_Private_Part (Id : E) return B is
1773 end In_Private_Part;
1775 function In_Use (Id : E) return B is
1777 pragma Assert (Nkind (Id) in N_Entity);
1781 function Initialization_Statements (Id : E) return N is
1783 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
1785 end Initialization_Statements;
1787 function Inner_Instances (Id : E) return L is
1789 return Elist23 (Id);
1790 end Inner_Instances;
1792 function Interface_Name (Id : E) return N is
1797 function Is_Abstract_Subprogram (Id : E) return B is
1799 pragma Assert (Is_Overloadable (Id));
1801 end Is_Abstract_Subprogram;
1803 function Is_Abstract_Type (Id : E) return B is
1805 pragma Assert (Is_Type (Id));
1806 return Flag146 (Id);
1807 end Is_Abstract_Type;
1809 function Is_Local_Anonymous_Access (Id : E) return B is
1811 pragma Assert (Is_Access_Type (Id));
1812 return Flag194 (Id);
1813 end Is_Local_Anonymous_Access;
1815 function Is_Access_Constant (Id : E) return B is
1817 pragma Assert (Is_Access_Type (Id));
1819 end Is_Access_Constant;
1821 function Is_Ada_2005_Only (Id : E) return B is
1823 return Flag185 (Id);
1824 end Is_Ada_2005_Only;
1826 function Is_Ada_2012_Only (Id : E) return B is
1828 return Flag199 (Id);
1829 end Is_Ada_2012_Only;
1831 function Is_Aliased (Id : E) return B is
1833 pragma Assert (Nkind (Id) in N_Entity);
1837 function Is_AST_Entry (Id : E) return B is
1839 pragma Assert (Is_Entry (Id));
1840 return Flag132 (Id);
1843 function Is_Asynchronous (Id : E) return B is
1845 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1847 end Is_Asynchronous;
1849 function Is_Atomic (Id : E) return B is
1854 function Is_Bit_Packed_Array (Id : E) return B is
1856 return Flag122 (Implementation_Base_Type (Id));
1857 end Is_Bit_Packed_Array;
1859 function Is_Called (Id : E) return B is
1861 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1862 return Flag102 (Id);
1865 function Is_Character_Type (Id : E) return B is
1868 end Is_Character_Type;
1870 function Is_Child_Unit (Id : E) return B is
1875 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1878 end Is_Class_Wide_Equivalent_Type;
1880 function Is_Compilation_Unit (Id : E) return B is
1882 return Flag149 (Id);
1883 end Is_Compilation_Unit;
1885 function Is_Completely_Hidden (Id : E) return B is
1887 pragma Assert (Ekind (Id) = E_Discriminant);
1888 return Flag103 (Id);
1889 end Is_Completely_Hidden;
1891 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1894 end Is_Constr_Subt_For_U_Nominal;
1896 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1898 return Flag141 (Id);
1899 end Is_Constr_Subt_For_UN_Aliased;
1901 function Is_Constrained (Id : E) return B is
1903 pragma Assert (Nkind (Id) in N_Entity);
1907 function Is_Constructor (Id : E) return B is
1912 function Is_Controlled (Id : E) return B is
1914 return Flag42 (Base_Type (Id));
1917 function Is_Controlling_Formal (Id : E) return B is
1919 pragma Assert (Is_Formal (Id));
1921 end Is_Controlling_Formal;
1923 function Is_CPP_Class (Id : E) return B is
1928 function Is_Descendent_Of_Address (Id : E) return B is
1930 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
2501 (Ekind (Id) in Incomplete_Kind or else Ekind (Id) = E_Abstract_State);
2503 end Non_Limited_View;
2505 function Nonzero_Is_True (Id : E) return B is
2507 pragma Assert (Root_Type (Id) = Standard_Boolean);
2508 return Flag162 (Base_Type (Id));
2509 end Nonzero_Is_True;
2511 function Normalized_First_Bit (Id : E) return U is
2513 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2515 end Normalized_First_Bit;
2517 function Normalized_Position (Id : E) return U is
2519 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2521 end Normalized_Position;
2523 function Normalized_Position_Max (Id : E) return U is
2525 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2527 end Normalized_Position_Max;
2529 function OK_To_Rename (Id : E) return B is
2531 pragma Assert (Ekind (Id) = E_Variable);
2532 return Flag247 (Id);
2535 function OK_To_Reorder_Components (Id : E) return B is
2537 pragma Assert (Is_Record_Type (Id));
2538 return Flag239 (Base_Type (Id));
2539 end OK_To_Reorder_Components;
2541 function Optimize_Alignment_Space (Id : E) return B is
2544 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2545 return Flag241 (Id);
2546 end Optimize_Alignment_Space;
2548 function Optimize_Alignment_Time (Id : E) return B is
2551 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2552 return Flag242 (Id);
2553 end Optimize_Alignment_Time;
2555 function Original_Access_Type (Id : E) return E is
2557 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2559 end Original_Access_Type;
2561 function Original_Array_Type (Id : E) return E is
2563 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2565 end Original_Array_Type;
2567 function Original_Record_Component (Id : E) return E is
2569 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2571 end Original_Record_Component;
2573 function Overlays_Constant (Id : E) return B is
2575 return Flag243 (Id);
2576 end Overlays_Constant;
2578 function Overridden_Operation (Id : E) return E is
2581 end Overridden_Operation;
2583 function Package_Instantiation (Id : E) return N is
2585 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2587 end Package_Instantiation;
2589 function Packed_Array_Type (Id : E) return E is
2591 pragma Assert (Is_Array_Type (Id));
2593 end Packed_Array_Type;
2595 function Parent_Subtype (Id : E) return E is
2597 pragma Assert (Is_Record_Type (Id));
2598 return Node19 (Base_Type (Id));
2601 function Postcondition_Proc (Id : E) return E is
2603 pragma Assert (Ekind (Id) = E_Procedure);
2605 end Postcondition_Proc;
2607 function PPC_Wrapper (Id : E) return E is
2609 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2613 function Prival (Id : E) return E is
2615 pragma Assert (Is_Protected_Component (Id));
2619 function Prival_Link (Id : E) return E is
2621 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2625 function Private_Dependents (Id : E) return L is
2627 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2628 return Elist18 (Id);
2629 end Private_Dependents;
2631 function Private_View (Id : E) return N is
2633 pragma Assert (Is_Private_Type (Id));
2637 function Protected_Body_Subprogram (Id : E) return E is
2639 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2641 end Protected_Body_Subprogram;
2643 function Protected_Formal (Id : E) return E is
2645 pragma Assert (Is_Formal (Id));
2647 end Protected_Formal;
2649 function Protection_Object (Id : E) return E is
2652 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2654 end Protection_Object;
2656 function Reachable (Id : E) return B is
2661 function Referenced (Id : E) return B is
2663 return Flag156 (Id);
2666 function Referenced_As_LHS (Id : E) return B is
2669 end Referenced_As_LHS;
2671 function Referenced_As_Out_Parameter (Id : E) return B is
2673 return Flag227 (Id);
2674 end Referenced_As_Out_Parameter;
2676 function Refined_State (Id : E) return N is
2678 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
2682 function Refinement_Constituents (Id : E) return L is
2684 pragma Assert (Ekind (Id) = E_Abstract_State);
2686 end Refinement_Constituents;
2688 function Register_Exception_Call (Id : E) return N is
2690 pragma Assert (Ekind (Id) = E_Exception);
2692 end Register_Exception_Call;
2694 function Related_Array_Object (Id : E) return E is
2696 pragma Assert (Is_Array_Type (Id));
2698 end Related_Array_Object;
2700 function Related_Expression (Id : E) return N is
2702 pragma Assert (Ekind (Id) in Type_Kind
2703 or else Ekind_In (Id, E_Constant, E_Variable));
2705 end Related_Expression;
2707 function Related_Instance (Id : E) return E is
2709 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2711 end Related_Instance;
2713 function Related_Type (Id : E) return E is
2715 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2719 function Relative_Deadline_Variable (Id : E) return E is
2721 pragma Assert (Is_Task_Type (Id));
2722 return Node26 (Implementation_Base_Type (Id));
2723 end Relative_Deadline_Variable;
2725 function Renamed_Entity (Id : E) return N is
2730 function Renamed_In_Spec (Id : E) return B is
2732 pragma Assert (Ekind (Id) = E_Package);
2733 return Flag231 (Id);
2734 end Renamed_In_Spec;
2736 function Renamed_Object (Id : E) return N is
2741 function Renaming_Map (Id : E) return U is
2746 function Requires_Overriding (Id : E) return B is
2748 pragma Assert (Is_Overloadable (Id));
2749 return Flag213 (Id);
2750 end Requires_Overriding;
2752 function Return_Present (Id : E) return B is
2757 function Return_Applies_To (Id : E) return N is
2760 end Return_Applies_To;
2762 function Returns_By_Ref (Id : E) return B is
2767 function Reverse_Bit_Order (Id : E) return B is
2769 pragma Assert (Is_Record_Type (Id));
2770 return Flag164 (Base_Type (Id));
2771 end Reverse_Bit_Order;
2773 function Reverse_Storage_Order (Id : E) return B is
2775 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
2776 return Flag93 (Base_Type (Id));
2777 end Reverse_Storage_Order;
2779 function RM_Size (Id : E) return U is
2781 pragma Assert (Is_Type (Id));
2785 function Scalar_Range (Id : E) return N is
2790 function Scale_Value (Id : E) return U is
2795 function Scope_Depth_Value (Id : E) return U is
2798 end Scope_Depth_Value;
2800 function Sec_Stack_Needed_For_Return (Id : E) return B is
2802 return Flag167 (Id);
2803 end Sec_Stack_Needed_For_Return;
2805 function Shadow_Entities (Id : E) return S is
2807 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2809 end Shadow_Entities;
2811 function Shared_Var_Procs_Instance (Id : E) return E is
2813 pragma Assert (Ekind (Id) = E_Variable);
2815 end Shared_Var_Procs_Instance;
2817 function Size_Check_Code (Id : E) return N is
2819 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2821 end Size_Check_Code;
2823 function Size_Depends_On_Discriminant (Id : E) return B is
2825 return Flag177 (Id);
2826 end Size_Depends_On_Discriminant;
2828 function Size_Known_At_Compile_Time (Id : E) return B is
2831 end Size_Known_At_Compile_Time;
2833 function Small_Value (Id : E) return R is
2835 pragma Assert (Is_Fixed_Point_Type (Id));
2836 return Ureal21 (Id);
2839 function SPARK_Mode_Pragmas (Id : E) return N is
2842 (Ekind_In (Id, E_Function, -- subprogram variants
2844 E_Generic_Procedure,
2848 Ekind_In (Id, E_Generic_Package, -- package variants
2852 end SPARK_Mode_Pragmas;
2854 function Spec_Entity (Id : E) return E is
2856 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2860 function Static_Predicate (Id : E) return S is
2862 pragma Assert (Is_Discrete_Type (Id));
2864 end Static_Predicate;
2866 function Status_Flag_Or_Transient_Decl (Id : E) return N is
2868 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2870 end Status_Flag_Or_Transient_Decl;
2872 function Storage_Size_Variable (Id : E) return E is
2874 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2875 return Node15 (Implementation_Base_Type (Id));
2876 end Storage_Size_Variable;
2878 function Static_Elaboration_Desired (Id : E) return B is
2880 pragma Assert (Ekind (Id) = E_Package);
2882 end Static_Elaboration_Desired;
2884 function Static_Initialization (Id : E) return N is
2887 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
2889 end Static_Initialization;
2891 function Stored_Constraint (Id : E) return L is
2894 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
2895 return Elist23 (Id);
2896 end Stored_Constraint;
2898 function Strict_Alignment (Id : E) return B is
2900 return Flag145 (Implementation_Base_Type (Id));
2901 end Strict_Alignment;
2903 function String_Literal_Length (Id : E) return U is
2906 end String_Literal_Length;
2908 function String_Literal_Low_Bound (Id : E) return N is
2911 end String_Literal_Low_Bound;
2913 function Subprograms_For_Type (Id : E) return E is
2915 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
2917 end Subprograms_For_Type;
2919 function Suppress_Elaboration_Warnings (Id : E) return B is
2921 return Flag148 (Id);
2922 end Suppress_Elaboration_Warnings;
2924 function Suppress_Initialization (Id : E) return B is
2926 pragma Assert (Is_Type (Id));
2927 return Flag105 (Id);
2928 end Suppress_Initialization;
2930 function Suppress_Style_Checks (Id : E) return B is
2932 return Flag165 (Id);
2933 end Suppress_Style_Checks;
2935 function Suppress_Value_Tracking_On_Call (Id : E) return B is
2937 return Flag217 (Id);
2938 end Suppress_Value_Tracking_On_Call;
2940 function Task_Body_Procedure (Id : E) return N is
2942 pragma Assert (Ekind (Id) in Task_Kind);
2944 end Task_Body_Procedure;
2946 function Thunk_Entity (Id : E) return E is
2948 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
2949 and then Is_Thunk (Id));
2953 function Treat_As_Volatile (Id : E) return B is
2956 end Treat_As_Volatile;
2958 function Underlying_Full_View (Id : E) return E is
2960 pragma Assert (Ekind (Id) in Private_Kind);
2962 end Underlying_Full_View;
2964 function Underlying_Record_View (Id : E) return E is
2967 end Underlying_Record_View;
2969 function Universal_Aliasing (Id : E) return B is
2971 pragma Assert (Is_Type (Id));
2972 return Flag216 (Implementation_Base_Type (Id));
2973 end Universal_Aliasing;
2975 function Unset_Reference (Id : E) return N is
2978 end Unset_Reference;
2980 function Used_As_Generic_Actual (Id : E) return B is
2982 return Flag222 (Id);
2983 end Used_As_Generic_Actual;
2985 function Uses_Lock_Free (Id : E) return B is
2987 pragma Assert (Is_Protected_Type (Id));
2988 return Flag188 (Id);
2991 function Uses_Sec_Stack (Id : E) return B is
2996 function Warnings_Off (Id : E) return B is
3001 function Warnings_Off_Used (Id : E) return B is
3003 return Flag236 (Id);
3004 end Warnings_Off_Used;
3006 function Warnings_Off_Used_Unmodified (Id : E) return B is
3008 return Flag237 (Id);
3009 end Warnings_Off_Used_Unmodified;
3011 function Warnings_Off_Used_Unreferenced (Id : E) return B is
3013 return Flag238 (Id);
3014 end Warnings_Off_Used_Unreferenced;
3016 function Wrapped_Entity (Id : E) return E is
3018 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3019 and then Is_Primitive_Wrapper (Id));
3023 function Was_Hidden (Id : E) return B is
3025 return Flag196 (Id);
3028 ------------------------------
3029 -- Classification Functions --
3030 ------------------------------
3032 function Is_Access_Type (Id : E) return B is
3034 return Ekind (Id) in Access_Kind;
3037 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
3039 return Ekind (Id) in Access_Protected_Kind;
3040 end Is_Access_Protected_Subprogram_Type;
3042 function Is_Access_Subprogram_Type (Id : E) return B is
3044 return Ekind (Id) in Access_Subprogram_Kind;
3045 end Is_Access_Subprogram_Type;
3047 function Is_Aggregate_Type (Id : E) return B is
3049 return Ekind (Id) in Aggregate_Kind;
3050 end Is_Aggregate_Type;
3052 function Is_Array_Type (Id : E) return B is
3054 return Ekind (Id) in Array_Kind;
3057 function Is_Assignable (Id : E) return B is
3059 return Ekind (Id) in Assignable_Kind;
3062 function Is_Class_Wide_Type (Id : E) return B is
3064 return Ekind (Id) in Class_Wide_Kind;
3065 end Is_Class_Wide_Type;
3067 function Is_Composite_Type (Id : E) return B is
3069 return Ekind (Id) in Composite_Kind;
3070 end Is_Composite_Type;
3072 function Is_Concurrent_Body (Id : E) return B is
3074 return Ekind (Id) in
3075 Concurrent_Body_Kind;
3076 end Is_Concurrent_Body;
3078 function Is_Concurrent_Record_Type (Id : E) return B is
3081 end Is_Concurrent_Record_Type;
3083 function Is_Concurrent_Type (Id : E) return B is
3085 return Ekind (Id) in Concurrent_Kind;
3086 end Is_Concurrent_Type;
3088 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
3090 return Ekind (Id) in
3091 Decimal_Fixed_Point_Kind;
3092 end Is_Decimal_Fixed_Point_Type;
3094 function Is_Digits_Type (Id : E) return B is
3096 return Ekind (Id) in Digits_Kind;
3099 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
3101 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
3102 end Is_Discrete_Or_Fixed_Point_Type;
3104 function Is_Discrete_Type (Id : E) return B is
3106 return Ekind (Id) in Discrete_Kind;
3107 end Is_Discrete_Type;
3109 function Is_Elementary_Type (Id : E) return B is
3111 return Ekind (Id) in Elementary_Kind;
3112 end Is_Elementary_Type;
3114 function Is_Entry (Id : E) return B is
3116 return Ekind (Id) in Entry_Kind;
3119 function Is_Enumeration_Type (Id : E) return B is
3121 return Ekind (Id) in
3123 end Is_Enumeration_Type;
3125 function Is_Fixed_Point_Type (Id : E) return B is
3127 return Ekind (Id) in
3129 end Is_Fixed_Point_Type;
3131 function Is_Floating_Point_Type (Id : E) return B is
3133 return Ekind (Id) in Float_Kind;
3134 end Is_Floating_Point_Type;
3136 function Is_Formal (Id : E) return B is
3138 return Ekind (Id) in Formal_Kind;
3141 function Is_Formal_Object (Id : E) return B is
3143 return Ekind (Id) in Formal_Object_Kind;
3144 end Is_Formal_Object;
3146 function Is_Generic_Subprogram (Id : E) return B is
3148 return Ekind (Id) in Generic_Subprogram_Kind;
3149 end Is_Generic_Subprogram;
3151 function Is_Generic_Unit (Id : E) return B is
3153 return Ekind (Id) in Generic_Unit_Kind;
3154 end Is_Generic_Unit;
3156 function Is_Incomplete_Or_Private_Type (Id : E) return B is
3158 return Ekind (Id) in
3159 Incomplete_Or_Private_Kind;
3160 end Is_Incomplete_Or_Private_Type;
3162 function Is_Incomplete_Type (Id : E) return B is
3164 return Ekind (Id) in
3166 end Is_Incomplete_Type;
3168 function Is_Integer_Type (Id : E) return B is
3170 return Ekind (Id) in Integer_Kind;
3171 end Is_Integer_Type;
3173 function Is_Modular_Integer_Type (Id : E) return B is
3175 return Ekind (Id) in
3176 Modular_Integer_Kind;
3177 end Is_Modular_Integer_Type;
3179 function Is_Named_Number (Id : E) return B is
3181 return Ekind (Id) in Named_Kind;
3182 end Is_Named_Number;
3184 function Is_Numeric_Type (Id : E) return B is
3186 return Ekind (Id) in Numeric_Kind;
3187 end Is_Numeric_Type;
3189 function Is_Object (Id : E) return B is
3191 return Ekind (Id) in Object_Kind;
3194 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
3196 return Ekind (Id) in
3197 Ordinary_Fixed_Point_Kind;
3198 end Is_Ordinary_Fixed_Point_Type;
3200 function Is_Overloadable (Id : E) return B is
3202 return Ekind (Id) in Overloadable_Kind;
3203 end Is_Overloadable;
3205 function Is_Private_Type (Id : E) return B is
3207 return Ekind (Id) in Private_Kind;
3208 end Is_Private_Type;
3210 function Is_Protected_Type (Id : E) return B is
3212 return Ekind (Id) in Protected_Kind;
3213 end Is_Protected_Type;
3215 function Is_Real_Type (Id : E) return B is
3217 return Ekind (Id) in Real_Kind;
3220 function Is_Record_Type (Id : E) return B is
3222 return Ekind (Id) in Record_Kind;
3225 function Is_Scalar_Type (Id : E) return B is
3227 return Ekind (Id) in Scalar_Kind;
3230 function Is_Signed_Integer_Type (Id : E) return B is
3232 return Ekind (Id) in Signed_Integer_Kind;
3233 end Is_Signed_Integer_Type;
3235 function Is_Subprogram (Id : E) return B is
3237 return Ekind (Id) in Subprogram_Kind;
3240 function Is_Task_Type (Id : E) return B is
3242 return Ekind (Id) in Task_Kind;
3245 function Is_Type (Id : E) return B is
3247 return Ekind (Id) in Type_Kind;
3250 ------------------------------
3251 -- Attribute Set Procedures --
3252 ------------------------------
3254 -- Note: in many of these set procedures an "obvious" assertion is missing.
3255 -- The reason for this is that in many cases, a field is set before the
3256 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3257 -- it is possible to add assertions that specifically include the E_Void
3258 -- possibility, but in some cases, we just omit the assertions.
3260 procedure Set_Abstract_States (Id : E; V : L) is
3262 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
3263 Set_Elist25 (Id, V);
3264 end Set_Abstract_States;
3266 procedure Set_Accept_Address (Id : E; V : L) is
3268 Set_Elist21 (Id, V);
3269 end Set_Accept_Address;
3271 procedure Set_Access_Disp_Table (Id : E; V : L) is
3273 pragma Assert (Ekind (Id) = E_Record_Type
3274 and then Id = Implementation_Base_Type (Id));
3275 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3276 Set_Elist16 (Id, V);
3277 end Set_Access_Disp_Table;
3279 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3282 end Set_Associated_Formal_Package;
3284 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3287 end Set_Associated_Node_For_Itype;
3289 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3291 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3293 end Set_Associated_Storage_Pool;
3295 procedure Set_Actual_Subtype (Id : E; V : E) is
3298 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3299 or else Is_Formal (Id));
3301 end Set_Actual_Subtype;
3303 procedure Set_Address_Taken (Id : E; V : B := True) is
3305 Set_Flag104 (Id, V);
3306 end Set_Address_Taken;
3308 procedure Set_Alias (Id : E; V : E) is
3311 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3315 procedure Set_Alignment (Id : E; V : U) is
3317 pragma Assert (Is_Type (Id)
3318 or else Is_Formal (Id)
3319 or else Ekind_In (Id, E_Loop_Parameter,
3326 procedure Set_Barrier_Function (Id : E; V : N) is
3328 pragma Assert (Is_Entry (Id));
3330 end Set_Barrier_Function;
3332 procedure Set_Block_Node (Id : E; V : N) is
3334 pragma Assert (Ekind (Id) = E_Block);
3338 procedure Set_Body_Entity (Id : E; V : E) is
3340 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3342 end Set_Body_Entity;
3344 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3347 (Ekind (Id) = E_Package
3348 or else Is_Subprogram (Id)
3349 or else Is_Generic_Unit (Id));
3351 end Set_Body_Needed_For_SAL;
3353 procedure Set_Body_References (Id : E; V : L) is
3355 pragma Assert (Ekind (Id) = E_Abstract_State);
3356 Set_Elist16 (Id, V);
3357 end Set_Body_References;
3359 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3361 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3362 Set_Flag125 (Id, V);
3363 end Set_C_Pass_By_Copy;
3365 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3368 end Set_Can_Never_Be_Null;
3370 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3373 end Set_Checks_May_Be_Suppressed;
3375 procedure Set_Class_Wide_Type (Id : E; V : E) is
3377 pragma Assert (Is_Type (Id));
3379 end Set_Class_Wide_Type;
3381 procedure Set_Cloned_Subtype (Id : E; V : E) is
3383 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3385 end Set_Cloned_Subtype;
3387 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3389 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3391 end Set_Component_Bit_Offset;
3393 procedure Set_Component_Clause (Id : E; V : N) is
3395 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3397 end Set_Component_Clause;
3399 procedure Set_Component_Size (Id : E; V : U) is
3401 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3403 end Set_Component_Size;
3405 procedure Set_Component_Type (Id : E; V : E) is
3407 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3409 end Set_Component_Type;
3411 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3414 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3416 end Set_Corresponding_Concurrent_Type;
3418 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3420 pragma Assert (Ekind (Id) = E_Discriminant);
3422 end Set_Corresponding_Discriminant;
3424 procedure Set_Corresponding_Equality (Id : E; V : E) is
3427 (Ekind (Id) = E_Function
3428 and then not Comes_From_Source (Id)
3429 and then Chars (Id) = Name_Op_Ne);
3431 end Set_Corresponding_Equality;
3433 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3435 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3437 end Set_Corresponding_Protected_Entry;
3439 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3441 pragma Assert (Is_Concurrent_Type (Id));
3443 end Set_Corresponding_Record_Type;
3445 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3448 end Set_Corresponding_Remote_Type;
3450 procedure Set_Current_Use_Clause (Id : E; V : E) is
3452 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3454 end Set_Current_Use_Clause;
3456 procedure Set_Current_Value (Id : E; V : N) is
3458 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3460 end Set_Current_Value;
3462 procedure Set_CR_Discriminant (Id : E; V : E) is
3465 end Set_CR_Discriminant;
3467 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3469 Set_Flag166 (Id, V);
3470 end Set_Debug_Info_Off;
3472 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3475 end Set_Debug_Renaming_Link;
3477 procedure Set_Default_Aspect_Component_Value (Id : E; V : E) is
3479 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3481 end Set_Default_Aspect_Component_Value;
3483 procedure Set_Default_Aspect_Value (Id : E; V : E) is
3485 pragma Assert (Is_Scalar_Type (Id) and then Is_Base_Type (Id));
3487 end Set_Default_Aspect_Value;
3489 procedure Set_Default_Expr_Function (Id : E; V : E) is
3491 pragma Assert (Is_Formal (Id));
3493 end Set_Default_Expr_Function;
3495 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3497 Set_Flag108 (Id, V);
3498 end Set_Default_Expressions_Processed;
3500 procedure Set_Default_Value (Id : E; V : N) is
3502 pragma Assert (Is_Formal (Id));
3504 end Set_Default_Value;
3506 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3510 or else Is_Task_Type (Id)
3511 or else Ekind (Id) = E_Block);
3512 Set_Flag114 (Id, V);
3513 end Set_Delay_Cleanups;
3515 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3518 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3521 end Set_Delay_Subprogram_Descriptors;
3523 procedure Set_Delta_Value (Id : E; V : R) is
3525 pragma Assert (Is_Fixed_Point_Type (Id));
3526 Set_Ureal18 (Id, V);
3527 end Set_Delta_Value;
3529 procedure Set_Dependent_Instances (Id : E; V : L) is
3531 pragma Assert (Is_Generic_Instance (Id));
3533 end Set_Dependent_Instances;
3535 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3537 pragma Assert (Nkind (Id) in N_Entity);
3539 end Set_Depends_On_Private;
3541 procedure Set_Digits_Value (Id : E; V : U) is
3544 (Is_Floating_Point_Type (Id)
3545 or else Is_Decimal_Fixed_Point_Type (Id));
3547 end Set_Digits_Value;
3549 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3552 end Set_Directly_Designated_Type;
3554 procedure Set_Discard_Names (Id : E; V : B := True) is
3557 end Set_Discard_Names;
3559 procedure Set_Discriminal (Id : E; V : E) is
3561 pragma Assert (Ekind (Id) = E_Discriminant);
3563 end Set_Discriminal;
3565 procedure Set_Discriminal_Link (Id : E; V : E) is
3568 end Set_Discriminal_Link;
3570 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3572 pragma Assert (Ekind (Id) = E_Component);
3574 end Set_Discriminant_Checking_Func;
3576 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3578 pragma Assert (Nkind (Id) in N_Entity);
3579 Set_Elist21 (Id, V);
3580 end Set_Discriminant_Constraint;
3582 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3585 end Set_Discriminant_Default_Value;
3587 procedure Set_Discriminant_Number (Id : E; V : U) is
3590 end Set_Discriminant_Number;
3592 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3594 pragma Assert (Ekind (Id) = E_Record_Type
3595 and then Id = Implementation_Base_Type (Id));
3596 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3597 Set_Elist26 (Id, V);
3598 end Set_Dispatch_Table_Wrappers;
3600 procedure Set_DT_Entry_Count (Id : E; V : U) is
3602 pragma Assert (Ekind (Id) = E_Component);
3604 end Set_DT_Entry_Count;
3606 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3608 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3610 end Set_DT_Offset_To_Top_Func;
3612 procedure Set_DT_Position (Id : E; V : U) is
3614 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3616 end Set_DT_Position;
3618 procedure Set_DTC_Entity (Id : E; V : E) is
3620 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3624 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3626 pragma Assert (Ekind (Id) = E_Package);
3627 Set_Flag210 (Id, V);
3628 end Set_Elaborate_Body_Desirable;
3630 procedure Set_Elaboration_Entity (Id : E; V : E) is
3635 Ekind (Id) = E_Package
3637 Is_Generic_Unit (Id));
3639 end Set_Elaboration_Entity;
3641 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3646 Ekind (Id) = E_Package
3648 Is_Generic_Unit (Id));
3649 Set_Flag174 (Id, V);
3650 end Set_Elaboration_Entity_Required;
3652 procedure Set_Enclosing_Scope (Id : E; V : E) is
3655 end Set_Enclosing_Scope;
3657 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3659 pragma Assert (Is_Entry (Id));
3660 Set_Flag152 (Id, V);
3661 end Set_Entry_Accepted;
3663 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3666 end Set_Entry_Bodies_Array;
3668 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3671 end Set_Entry_Cancel_Parameter;
3673 procedure Set_Entry_Component (Id : E; V : E) is
3676 end Set_Entry_Component;
3678 procedure Set_Entry_Formal (Id : E; V : E) is
3681 end Set_Entry_Formal;
3683 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3685 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3687 end Set_Entry_Index_Constant;
3689 procedure Set_Contract (Id : E; V : N) is
3692 (Ekind_In (Id, E_Entry,
3699 or else Is_Generic_Subprogram (Id)
3700 or else Is_Subprogram (Id));
3704 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3707 end Set_Entry_Parameters_Type;
3709 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3711 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3713 end Set_Enum_Pos_To_Rep;
3715 procedure Set_Enumeration_Pos (Id : E; V : U) is
3717 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3719 end Set_Enumeration_Pos;
3721 procedure Set_Enumeration_Rep (Id : E; V : U) is
3723 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3725 end Set_Enumeration_Rep;
3727 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3729 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3731 end Set_Enumeration_Rep_Expr;
3733 procedure Set_Equivalent_Type (Id : E; V : E) is
3736 (Ekind_In (Id, E_Class_Wide_Type,
3737 E_Class_Wide_Subtype,
3738 E_Access_Protected_Subprogram_Type,
3739 E_Anonymous_Access_Protected_Subprogram_Type,
3740 E_Access_Subprogram_Type,
3743 end Set_Equivalent_Type;
3745 procedure Set_Esize (Id : E; V : U) is
3750 procedure Set_Exception_Code (Id : E; V : U) is
3752 pragma Assert (Ekind (Id) = E_Exception);
3754 end Set_Exception_Code;
3756 procedure Set_Extra_Accessibility (Id : E; V : E) is
3759 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
3761 end Set_Extra_Accessibility;
3763 procedure Set_Extra_Accessibility_Of_Result (Id : E; V : E) is
3765 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
3767 end Set_Extra_Accessibility_Of_Result;
3769 procedure Set_Extra_Constrained (Id : E; V : E) is
3771 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3773 end Set_Extra_Constrained;
3775 procedure Set_Extra_Formal (Id : E; V : E) is
3778 end Set_Extra_Formal;
3780 procedure Set_Extra_Formals (Id : E; V : E) is
3783 (Is_Overloadable (Id)
3784 or else Ekind_In (Id, E_Entry_Family,
3786 E_Subprogram_Type));
3788 end Set_Extra_Formals;
3790 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3793 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3794 Set_Flag229 (Id, V);
3795 end Set_Can_Use_Internal_Rep;
3797 procedure Set_Finalization_Master (Id : E; V : E) is
3799 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3801 end Set_Finalization_Master;
3803 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3805 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3806 Set_Flag158 (Id, V);
3807 end Set_Finalize_Storage_Only;
3809 procedure Set_Finalizer (Id : E; V : E) is
3811 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
3815 procedure Set_First_Entity (Id : E; V : E) is
3818 end Set_First_Entity;
3820 procedure Set_First_Exit_Statement (Id : E; V : N) is
3822 pragma Assert (Ekind (Id) = E_Loop);
3824 end Set_First_Exit_Statement;
3826 procedure Set_First_Index (Id : E; V : N) is
3828 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3830 end Set_First_Index;
3832 procedure Set_First_Literal (Id : E; V : E) is
3834 pragma Assert (Is_Enumeration_Type (Id));
3836 end Set_First_Literal;
3838 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3840 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3842 end Set_First_Optional_Parameter;
3844 procedure Set_First_Private_Entity (Id : E; V : E) is
3846 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
3847 or else Ekind (Id) in Concurrent_Kind);
3849 end Set_First_Private_Entity;
3851 procedure Set_First_Rep_Item (Id : E; V : N) is
3854 end Set_First_Rep_Item;
3856 procedure Set_Float_Rep (Id : E; V : F) is
3857 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
3859 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
3862 procedure Set_Freeze_Node (Id : E; V : N) is
3865 end Set_Freeze_Node;
3867 procedure Set_From_Limited_With (Id : E; V : B := True) is
3870 (Is_Type (Id) or else Ekind_In (Id, E_Abstract_State, E_Package));
3871 Set_Flag159 (Id, V);
3872 end Set_From_Limited_With;
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
5178 (Ekind (Id) in Incomplete_Kind or else Ekind (Id) = E_Abstract_State);
5180 end Set_Non_Limited_View;
5182 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
5185 (Root_Type (Id) = Standard_Boolean
5186 and then Ekind (Id) = E_Enumeration_Type);
5187 Set_Flag162 (Id, V);
5188 end Set_Nonzero_Is_True;
5190 procedure Set_Normalized_First_Bit (Id : E; V : U) is
5192 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5194 end Set_Normalized_First_Bit;
5196 procedure Set_Normalized_Position (Id : E; V : U) is
5198 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5200 end Set_Normalized_Position;
5202 procedure Set_Normalized_Position_Max (Id : E; V : U) is
5204 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5206 end Set_Normalized_Position_Max;
5208 procedure Set_OK_To_Rename (Id : E; V : B := True) is
5210 pragma Assert (Ekind (Id) = E_Variable);
5211 Set_Flag247 (Id, V);
5212 end Set_OK_To_Rename;
5214 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
5217 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5218 Set_Flag239 (Id, V);
5219 end Set_OK_To_Reorder_Components;
5221 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
5224 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5225 Set_Flag241 (Id, V);
5226 end Set_Optimize_Alignment_Space;
5228 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
5231 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5232 Set_Flag242 (Id, V);
5233 end Set_Optimize_Alignment_Time;
5235 procedure Set_Original_Access_Type (Id : E; V : E) is
5237 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
5239 end Set_Original_Access_Type;
5241 procedure Set_Original_Array_Type (Id : E; V : E) is
5243 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
5245 end Set_Original_Array_Type;
5247 procedure Set_Original_Record_Component (Id : E; V : E) is
5249 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
5251 end Set_Original_Record_Component;
5253 procedure Set_Overlays_Constant (Id : E; V : B := True) is
5255 Set_Flag243 (Id, V);
5256 end Set_Overlays_Constant;
5258 procedure Set_Overridden_Operation (Id : E; V : E) is
5261 end Set_Overridden_Operation;
5263 procedure Set_Package_Instantiation (Id : E; V : N) is
5265 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
5267 end Set_Package_Instantiation;
5269 procedure Set_Packed_Array_Type (Id : E; V : E) is
5271 pragma Assert (Is_Array_Type (Id));
5273 end Set_Packed_Array_Type;
5275 procedure Set_Parent_Subtype (Id : E; V : E) is
5277 pragma Assert (Ekind (Id) = E_Record_Type);
5279 end Set_Parent_Subtype;
5281 procedure Set_Postcondition_Proc (Id : E; V : E) is
5283 pragma Assert (Ekind (Id) = E_Procedure);
5285 end Set_Postcondition_Proc;
5287 procedure Set_PPC_Wrapper (Id : E; V : E) is
5289 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
5291 end Set_PPC_Wrapper;
5293 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
5295 pragma Assert (Is_Tagged_Type (Id));
5296 Set_Elist10 (Id, V);
5297 end Set_Direct_Primitive_Operations;
5299 procedure Set_Prival (Id : E; V : E) is
5301 pragma Assert (Is_Protected_Component (Id));
5305 procedure Set_Prival_Link (Id : E; V : E) is
5307 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5309 end Set_Prival_Link;
5311 procedure Set_Private_Dependents (Id : E; V : L) is
5313 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
5314 Set_Elist18 (Id, V);
5315 end Set_Private_Dependents;
5317 procedure Set_Private_View (Id : E; V : N) is
5319 pragma Assert (Is_Private_Type (Id));
5321 end Set_Private_View;
5323 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
5325 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
5327 end Set_Protected_Body_Subprogram;
5329 procedure Set_Protected_Formal (Id : E; V : E) is
5331 pragma Assert (Is_Formal (Id));
5333 end Set_Protected_Formal;
5335 procedure Set_Protection_Object (Id : E; V : E) is
5337 pragma Assert (Ekind_In (Id, E_Entry,
5342 end Set_Protection_Object;
5344 procedure Set_Reachable (Id : E; V : B := True) is
5349 procedure Set_Referenced (Id : E; V : B := True) is
5351 Set_Flag156 (Id, V);
5354 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
5357 end Set_Referenced_As_LHS;
5359 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
5361 Set_Flag227 (Id, V);
5362 end Set_Referenced_As_Out_Parameter;
5364 procedure Set_Refined_State (Id : E; V : E) is
5366 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
5368 end Set_Refined_State;
5370 procedure Set_Refinement_Constituents (Id : E; V : L) is
5372 pragma Assert (Ekind (Id) = E_Abstract_State);
5374 end Set_Refinement_Constituents;
5376 procedure Set_Register_Exception_Call (Id : E; V : N) is
5378 pragma Assert (Ekind (Id) = E_Exception);
5380 end Set_Register_Exception_Call;
5382 procedure Set_Related_Array_Object (Id : E; V : E) is
5384 pragma Assert (Is_Array_Type (Id));
5386 end Set_Related_Array_Object;
5388 procedure Set_Related_Expression (Id : E; V : N) is
5390 pragma Assert (Ekind (Id) in Type_Kind
5391 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
5393 end Set_Related_Expression;
5395 procedure Set_Related_Instance (Id : E; V : E) is
5397 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
5399 end Set_Related_Instance;
5401 procedure Set_Related_Type (Id : E; V : E) is
5403 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5405 end Set_Related_Type;
5407 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5409 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
5411 end Set_Relative_Deadline_Variable;
5413 procedure Set_Renamed_Entity (Id : E; V : N) is
5416 end Set_Renamed_Entity;
5418 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5420 pragma Assert (Ekind (Id) = E_Package);
5421 Set_Flag231 (Id, V);
5422 end Set_Renamed_In_Spec;
5424 procedure Set_Renamed_Object (Id : E; V : N) is
5427 end Set_Renamed_Object;
5429 procedure Set_Renaming_Map (Id : E; V : U) is
5432 end Set_Renaming_Map;
5434 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5436 pragma Assert (Is_Overloadable (Id));
5437 Set_Flag213 (Id, V);
5438 end Set_Requires_Overriding;
5440 procedure Set_Return_Present (Id : E; V : B := True) is
5443 end Set_Return_Present;
5445 procedure Set_Return_Applies_To (Id : E; V : N) is
5448 end Set_Return_Applies_To;
5450 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5453 end Set_Returns_By_Ref;
5455 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5458 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5459 Set_Flag164 (Id, V);
5460 end Set_Reverse_Bit_Order;
5462 procedure Set_Reverse_Storage_Order (Id : E; V : B := True) is
5466 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5468 end Set_Reverse_Storage_Order;
5470 procedure Set_RM_Size (Id : E; V : U) is
5472 pragma Assert (Is_Type (Id));
5476 procedure Set_Scalar_Range (Id : E; V : N) is
5479 end Set_Scalar_Range;
5481 procedure Set_Scale_Value (Id : E; V : U) is
5484 end Set_Scale_Value;
5486 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5488 pragma Assert (not Is_Record_Type (Id));
5490 end Set_Scope_Depth_Value;
5492 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5494 Set_Flag167 (Id, V);
5495 end Set_Sec_Stack_Needed_For_Return;
5497 procedure Set_Shadow_Entities (Id : E; V : S) is
5499 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5501 end Set_Shadow_Entities;
5503 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5505 pragma Assert (Ekind (Id) = E_Variable);
5507 end Set_Shared_Var_Procs_Instance;
5509 procedure Set_Size_Check_Code (Id : E; V : N) is
5511 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5513 end Set_Size_Check_Code;
5515 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5517 Set_Flag177 (Id, V);
5518 end Set_Size_Depends_On_Discriminant;
5520 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5523 end Set_Size_Known_At_Compile_Time;
5525 procedure Set_Small_Value (Id : E; V : R) is
5527 pragma Assert (Is_Fixed_Point_Type (Id));
5528 Set_Ureal21 (Id, V);
5529 end Set_Small_Value;
5531 procedure Set_SPARK_Mode_Pragmas (Id : E; V : N) is
5534 (Ekind_In (Id, E_Function, -- subprogram variants
5536 E_Generic_Procedure,
5540 Ekind_In (Id, E_Generic_Package, -- package variants
5545 end Set_SPARK_Mode_Pragmas;
5547 procedure Set_Spec_Entity (Id : E; V : E) is
5549 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5551 end Set_Spec_Entity;
5553 procedure Set_Static_Predicate (Id : E; V : S) is
5556 (Ekind_In (Id, E_Enumeration_Subtype,
5557 E_Modular_Integer_Subtype,
5558 E_Signed_Integer_Subtype)
5559 and then Has_Predicates (Id));
5561 end Set_Static_Predicate;
5563 procedure Set_Status_Flag_Or_Transient_Decl (Id : E; V : E) is
5565 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5567 end Set_Status_Flag_Or_Transient_Decl;
5569 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5571 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5572 pragma Assert (Id = Base_Type (Id));
5574 end Set_Storage_Size_Variable;
5576 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5578 pragma Assert (Ekind (Id) = E_Package);
5580 end Set_Static_Elaboration_Desired;
5582 procedure Set_Static_Initialization (Id : E; V : N) is
5585 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5587 end Set_Static_Initialization;
5589 procedure Set_Stored_Constraint (Id : E; V : L) is
5591 pragma Assert (Nkind (Id) in N_Entity);
5592 Set_Elist23 (Id, V);
5593 end Set_Stored_Constraint;
5595 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5597 pragma Assert (Id = Base_Type (Id));
5598 Set_Flag145 (Id, V);
5599 end Set_Strict_Alignment;
5601 procedure Set_String_Literal_Length (Id : E; V : U) is
5603 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5605 end Set_String_Literal_Length;
5607 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5609 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5611 end Set_String_Literal_Low_Bound;
5613 procedure Set_Subprograms_For_Type (Id : E; V : E) is
5615 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
5617 end Set_Subprograms_For_Type;
5619 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5621 Set_Flag148 (Id, V);
5622 end Set_Suppress_Elaboration_Warnings;
5624 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
5626 pragma Assert (Is_Type (Id));
5627 Set_Flag105 (Id, V);
5628 end Set_Suppress_Initialization;
5630 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5632 Set_Flag165 (Id, V);
5633 end Set_Suppress_Style_Checks;
5635 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5637 Set_Flag217 (Id, V);
5638 end Set_Suppress_Value_Tracking_On_Call;
5640 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5642 pragma Assert (Ekind (Id) in Task_Kind);
5644 end Set_Task_Body_Procedure;
5646 procedure Set_Thunk_Entity (Id : E; V : E) is
5648 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5649 and then Is_Thunk (Id));
5651 end Set_Thunk_Entity;
5653 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5656 end Set_Treat_As_Volatile;
5658 procedure Set_Underlying_Full_View (Id : E; V : E) is
5660 pragma Assert (Ekind (Id) in Private_Kind);
5662 end Set_Underlying_Full_View;
5664 procedure Set_Underlying_Record_View (Id : E; V : E) is
5666 pragma Assert (Ekind (Id) = E_Record_Type);
5668 end Set_Underlying_Record_View;
5670 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5672 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5673 Set_Flag216 (Id, V);
5674 end Set_Universal_Aliasing;
5676 procedure Set_Unset_Reference (Id : E; V : N) is
5679 end Set_Unset_Reference;
5681 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5683 Set_Flag222 (Id, V);
5684 end Set_Used_As_Generic_Actual;
5686 procedure Set_Uses_Lock_Free (Id : E; V : B := True) is
5688 pragma Assert (Ekind (Id) = E_Protected_Type);
5689 Set_Flag188 (Id, V);
5690 end Set_Uses_Lock_Free;
5692 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5695 end Set_Uses_Sec_Stack;
5697 procedure Set_Warnings_Off (Id : E; V : B := True) is
5700 end Set_Warnings_Off;
5702 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
5704 Set_Flag236 (Id, V);
5705 end Set_Warnings_Off_Used;
5707 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
5709 Set_Flag237 (Id, V);
5710 end Set_Warnings_Off_Used_Unmodified;
5712 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
5714 Set_Flag238 (Id, V);
5715 end Set_Warnings_Off_Used_Unreferenced;
5717 procedure Set_Was_Hidden (Id : E; V : B := True) is
5719 Set_Flag196 (Id, V);
5722 procedure Set_Wrapped_Entity (Id : E; V : E) is
5724 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5725 and then Is_Primitive_Wrapper (Id));
5727 end Set_Wrapped_Entity;
5729 -----------------------------------
5730 -- Field Initialization Routines --
5731 -----------------------------------
5733 procedure Init_Alignment (Id : E) is
5735 Set_Uint14 (Id, Uint_0);
5738 procedure Init_Alignment (Id : E; V : Int) is
5740 Set_Uint14 (Id, UI_From_Int (V));
5743 procedure Init_Component_Bit_Offset (Id : E) is
5745 Set_Uint11 (Id, No_Uint);
5746 end Init_Component_Bit_Offset;
5748 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
5750 Set_Uint11 (Id, UI_From_Int (V));
5751 end Init_Component_Bit_Offset;
5753 procedure Init_Component_Size (Id : E) is
5755 Set_Uint22 (Id, Uint_0);
5756 end Init_Component_Size;
5758 procedure Init_Component_Size (Id : E; V : Int) is
5760 Set_Uint22 (Id, UI_From_Int (V));
5761 end Init_Component_Size;
5763 procedure Init_Digits_Value (Id : E) is
5765 Set_Uint17 (Id, Uint_0);
5766 end Init_Digits_Value;
5768 procedure Init_Digits_Value (Id : E; V : Int) is
5770 Set_Uint17 (Id, UI_From_Int (V));
5771 end Init_Digits_Value;
5773 procedure Init_Esize (Id : E) is
5775 Set_Uint12 (Id, Uint_0);
5778 procedure Init_Esize (Id : E; V : Int) is
5780 Set_Uint12 (Id, UI_From_Int (V));
5783 procedure Init_Normalized_First_Bit (Id : E) is
5785 Set_Uint8 (Id, No_Uint);
5786 end Init_Normalized_First_Bit;
5788 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
5790 Set_Uint8 (Id, UI_From_Int (V));
5791 end Init_Normalized_First_Bit;
5793 procedure Init_Normalized_Position (Id : E) is
5795 Set_Uint14 (Id, No_Uint);
5796 end Init_Normalized_Position;
5798 procedure Init_Normalized_Position (Id : E; V : Int) is
5800 Set_Uint14 (Id, UI_From_Int (V));
5801 end Init_Normalized_Position;
5803 procedure Init_Normalized_Position_Max (Id : E) is
5805 Set_Uint10 (Id, No_Uint);
5806 end Init_Normalized_Position_Max;
5808 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
5810 Set_Uint10 (Id, UI_From_Int (V));
5811 end Init_Normalized_Position_Max;
5813 procedure Init_RM_Size (Id : E) is
5815 Set_Uint13 (Id, Uint_0);
5818 procedure Init_RM_Size (Id : E; V : Int) is
5820 Set_Uint13 (Id, UI_From_Int (V));
5823 -----------------------------
5824 -- Init_Component_Location --
5825 -----------------------------
5827 procedure Init_Component_Location (Id : E) is
5829 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
5830 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
5831 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
5832 Set_Uint12 (Id, Uint_0); -- Esize
5833 Set_Uint14 (Id, No_Uint); -- Normalized_Position
5834 end Init_Component_Location;
5836 ----------------------------
5837 -- Init_Object_Size_Align --
5838 ----------------------------
5840 procedure Init_Object_Size_Align (Id : E) is
5842 Set_Uint12 (Id, Uint_0); -- Esize
5843 Set_Uint14 (Id, Uint_0); -- Alignment
5844 end Init_Object_Size_Align;
5850 procedure Init_Size (Id : E; V : Int) is
5852 pragma Assert (not Is_Object (Id));
5853 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
5854 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
5857 ---------------------
5858 -- Init_Size_Align --
5859 ---------------------
5861 procedure Init_Size_Align (Id : E) is
5863 pragma Assert (not Is_Object (Id));
5864 Set_Uint12 (Id, Uint_0); -- Esize
5865 Set_Uint13 (Id, Uint_0); -- RM_Size
5866 Set_Uint14 (Id, Uint_0); -- Alignment
5867 end Init_Size_Align;
5869 ----------------------------------------------
5870 -- Type Representation Attribute Predicates --
5871 ----------------------------------------------
5873 function Known_Alignment (E : Entity_Id) return B is
5875 return Uint14 (E) /= Uint_0
5876 and then Uint14 (E) /= No_Uint;
5877 end Known_Alignment;
5879 function Known_Component_Bit_Offset (E : Entity_Id) return B is
5881 return Uint11 (E) /= No_Uint;
5882 end Known_Component_Bit_Offset;
5884 function Known_Component_Size (E : Entity_Id) return B is
5886 return Uint22 (Base_Type (E)) /= Uint_0
5887 and then Uint22 (Base_Type (E)) /= No_Uint;
5888 end Known_Component_Size;
5890 function Known_Esize (E : Entity_Id) return B is
5892 return Uint12 (E) /= Uint_0
5893 and then Uint12 (E) /= No_Uint;
5896 function Known_Normalized_First_Bit (E : Entity_Id) return B is
5898 return Uint8 (E) /= No_Uint;
5899 end Known_Normalized_First_Bit;
5901 function Known_Normalized_Position (E : Entity_Id) return B is
5903 return Uint14 (E) /= No_Uint;
5904 end Known_Normalized_Position;
5906 function Known_Normalized_Position_Max (E : Entity_Id) return B is
5908 return Uint10 (E) /= No_Uint;
5909 end Known_Normalized_Position_Max;
5911 function Known_RM_Size (E : Entity_Id) return B is
5913 return Uint13 (E) /= No_Uint
5914 and then (Uint13 (E) /= Uint_0
5915 or else Is_Discrete_Type (E)
5916 or else Is_Fixed_Point_Type (E));
5919 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
5921 return Uint11 (E) /= No_Uint
5922 and then Uint11 (E) >= Uint_0;
5923 end Known_Static_Component_Bit_Offset;
5925 function Known_Static_Component_Size (E : Entity_Id) return B is
5927 return Uint22 (Base_Type (E)) > Uint_0;
5928 end Known_Static_Component_Size;
5930 function Known_Static_Esize (E : Entity_Id) return B is
5932 return Uint12 (E) > Uint_0
5933 and then not Is_Generic_Type (E);
5934 end Known_Static_Esize;
5936 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
5938 return Uint8 (E) /= No_Uint
5939 and then Uint8 (E) >= Uint_0;
5940 end Known_Static_Normalized_First_Bit;
5942 function Known_Static_Normalized_Position (E : Entity_Id) return B is
5944 return Uint14 (E) /= No_Uint
5945 and then Uint14 (E) >= Uint_0;
5946 end Known_Static_Normalized_Position;
5948 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
5950 return Uint10 (E) /= No_Uint
5951 and then Uint10 (E) >= Uint_0;
5952 end Known_Static_Normalized_Position_Max;
5954 function Known_Static_RM_Size (E : Entity_Id) return B is
5956 return (Uint13 (E) > Uint_0
5957 or else Is_Discrete_Type (E)
5958 or else Is_Fixed_Point_Type (E))
5959 and then not Is_Generic_Type (E);
5960 end Known_Static_RM_Size;
5962 function Unknown_Alignment (E : Entity_Id) return B is
5964 return Uint14 (E) = Uint_0
5965 or else Uint14 (E) = No_Uint;
5966 end Unknown_Alignment;
5968 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
5970 return Uint11 (E) = No_Uint;
5971 end Unknown_Component_Bit_Offset;
5973 function Unknown_Component_Size (E : Entity_Id) return B is
5975 return Uint22 (Base_Type (E)) = Uint_0
5977 Uint22 (Base_Type (E)) = No_Uint;
5978 end Unknown_Component_Size;
5980 function Unknown_Esize (E : Entity_Id) return B is
5982 return Uint12 (E) = No_Uint
5984 Uint12 (E) = Uint_0;
5987 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
5989 return Uint8 (E) = No_Uint;
5990 end Unknown_Normalized_First_Bit;
5992 function Unknown_Normalized_Position (E : Entity_Id) return B is
5994 return Uint14 (E) = No_Uint;
5995 end Unknown_Normalized_Position;
5997 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
5999 return Uint10 (E) = No_Uint;
6000 end Unknown_Normalized_Position_Max;
6002 function Unknown_RM_Size (E : Entity_Id) return B is
6004 return (Uint13 (E) = Uint_0
6005 and then not Is_Discrete_Type (E)
6006 and then not Is_Fixed_Point_Type (E))
6007 or else Uint13 (E) = No_Uint;
6008 end Unknown_RM_Size;
6010 --------------------
6011 -- Address_Clause --
6012 --------------------
6014 function Address_Clause (Id : E) return N is
6016 return Get_Attribute_Definition_Clause (Id, Attribute_Address);
6023 function Aft_Value (Id : E) return U is
6025 Delta_Val : Ureal := Delta_Value (Id);
6027 while Delta_Val < Ureal_Tenth loop
6028 Delta_Val := Delta_Val * Ureal_10;
6029 Result := Result + 1;
6032 return UI_From_Int (Result);
6035 ----------------------
6036 -- Alignment_Clause --
6037 ----------------------
6039 function Alignment_Clause (Id : E) return N is
6041 return Get_Attribute_Definition_Clause (Id, Attribute_Alignment);
6042 end Alignment_Clause;
6048 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
6050 if Last_Entity (V) = Empty then
6051 Set_First_Entity (Id => V, V => Id);
6053 Set_Next_Entity (Last_Entity (V), Id);
6056 Set_Next_Entity (Id, Empty);
6058 Set_Last_Entity (Id => V, V => Id);
6065 function Base_Type (Id : E) return E is
6067 if Is_Base_Type (Id) then
6070 pragma Assert (Is_Type (Id));
6075 -------------------------
6076 -- Component_Alignment --
6077 -------------------------
6079 -- Component Alignment is encoded using two flags, Flag128/129 as
6080 -- follows. Note that both flags False = Align_Default, so that the
6081 -- default initialization of flags to False initializes component
6082 -- alignment to the default value as required.
6084 -- Flag128 Flag129 Value
6085 -- ------- ------- -----
6086 -- False False Calign_Default
6087 -- False True Calign_Component_Size
6088 -- True False Calign_Component_Size_4
6089 -- True True Calign_Storage_Unit
6091 function Component_Alignment (Id : E) return C is
6092 BT : constant Node_Id := Base_Type (Id);
6095 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
6097 if Flag128 (BT) then
6098 if Flag129 (BT) then
6099 return Calign_Storage_Unit;
6101 return Calign_Component_Size_4;
6105 if Flag129 (BT) then
6106 return Calign_Component_Size;
6108 return Calign_Default;
6111 end Component_Alignment;
6113 ----------------------
6114 -- Declaration_Node --
6115 ----------------------
6117 function Declaration_Node (Id : E) return N is
6121 if Ekind (Id) = E_Incomplete_Type
6122 and then Present (Full_View (Id))
6124 P := Parent (Full_View (Id));
6130 if Nkind (P) /= N_Selected_Component
6131 and then Nkind (P) /= N_Expanded_Name
6133 not (Nkind (P) = N_Defining_Program_Unit_Name
6134 and then Is_Child_Unit (Id))
6141 end Declaration_Node;
6143 ---------------------
6144 -- Designated_Type --
6145 ---------------------
6147 function Designated_Type (Id : E) return E is
6151 Desig_Type := Directly_Designated_Type (Id);
6153 if Ekind (Desig_Type) = E_Incomplete_Type
6154 and then Present (Full_View (Desig_Type))
6156 return Full_View (Desig_Type);
6158 elsif Is_Class_Wide_Type (Desig_Type)
6159 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
6160 and then Present (Full_View (Etype (Desig_Type)))
6161 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
6163 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
6168 end Designated_Type;
6170 ----------------------
6171 -- Entry_Index_Type --
6172 ----------------------
6174 function Entry_Index_Type (Id : E) return N is
6176 pragma Assert (Ekind (Id) = E_Entry_Family);
6177 return Etype (Discrete_Subtype_Definition (Parent (Id)));
6178 end Entry_Index_Type;
6180 ---------------------
6181 -- First_Component --
6182 ---------------------
6184 function First_Component (Id : E) return E is
6189 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
6191 Comp_Id := First_Entity (Id);
6192 while Present (Comp_Id) loop
6193 exit when Ekind (Comp_Id) = E_Component;
6194 Comp_Id := Next_Entity (Comp_Id);
6198 end First_Component;
6200 -------------------------------------
6201 -- First_Component_Or_Discriminant --
6202 -------------------------------------
6204 function First_Component_Or_Discriminant (Id : E) return E is
6209 (Is_Record_Type (Id)
6210 or else Is_Incomplete_Or_Private_Type (Id)
6211 or else Has_Discriminants (Id));
6213 Comp_Id := First_Entity (Id);
6214 while Present (Comp_Id) loop
6215 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6216 Comp_Id := Next_Entity (Comp_Id);
6220 end First_Component_Or_Discriminant;
6226 function First_Formal (Id : E) return E is
6231 (Is_Overloadable (Id)
6232 or else Ekind_In (Id, E_Entry_Family,
6234 E_Subprogram_Type));
6236 if Ekind (Id) = E_Enumeration_Literal then
6240 Formal := First_Entity (Id);
6242 if Present (Formal) and then Is_Formal (Formal) then
6250 ------------------------------
6251 -- First_Formal_With_Extras --
6252 ------------------------------
6254 function First_Formal_With_Extras (Id : E) return E is
6259 (Is_Overloadable (Id)
6260 or else Ekind_In (Id, E_Entry_Family,
6262 E_Subprogram_Type));
6264 if Ekind (Id) = E_Enumeration_Literal then
6268 Formal := First_Entity (Id);
6270 if Present (Formal) and then Is_Formal (Formal) then
6273 return Extra_Formals (Id); -- Empty if no extra formals
6276 end First_Formal_With_Extras;
6278 -------------------------------------
6279 -- Get_Attribute_Definition_Clause --
6280 -------------------------------------
6282 function Get_Attribute_Definition_Clause
6284 Id : Attribute_Id) return Node_Id
6289 N := First_Rep_Item (E);
6290 while Present (N) loop
6291 if Nkind (N) = N_Attribute_Definition_Clause
6292 and then Get_Attribute_Id (Chars (N)) = Id
6301 end Get_Attribute_Definition_Clause;
6307 function Get_Full_View (T : Entity_Id) return Entity_Id is
6309 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
6310 return Full_View (T);
6312 elsif Is_Class_Wide_Type (T)
6313 and then Ekind (Root_Type (T)) = E_Incomplete_Type
6314 and then Present (Full_View (Root_Type (T)))
6316 return Class_Wide_Type (Full_View (Root_Type (T)));
6327 function Get_Pragma (E : Entity_Id; Id : Pragma_Id) return Node_Id is
6328 Is_CDG : constant Boolean :=
6329 Id = Pragma_Abstract_State or else
6330 Id = Pragma_Depends or else
6331 Id = Pragma_Global or else
6332 Id = Pragma_Initial_Condition or else
6333 Id = Pragma_Initializes or else
6334 Id = Pragma_Refined_Depends or else
6335 Id = Pragma_Refined_Global or else
6336 Id = Pragma_Refined_State;
6337 Is_CTC : constant Boolean :=
6338 Id = Pragma_Contract_Cases or else
6339 Id = Pragma_Test_Case;
6340 Is_PPC : constant Boolean :=
6341 Id = Pragma_Precondition or else
6342 Id = Pragma_Postcondition;
6344 In_Contract : constant Boolean := Is_CDG or Is_CTC or Is_PPC;
6350 -- Handle pragmas that appear in N_Contract nodes. Those have to be
6351 -- extracted from their specialized list.
6354 Items := Contract (E);
6360 Item := Classifications (Items);
6363 Item := Contract_Test_Cases (Items);
6366 Item := Pre_Post_Conditions (Items);
6372 Item := First_Rep_Item (E);
6375 while Present (Item) loop
6376 if Nkind (Item) = N_Pragma
6377 and then Get_Pragma_Id (Pragma_Name (Item)) = Id
6381 -- All nodes in N_Contract are chained using Next_Pragma
6383 elsif In_Contract then
6384 Item := Next_Pragma (Item);
6389 Next_Rep_Item (Item);
6396 --------------------------------------
6397 -- Get_Record_Representation_Clause --
6398 --------------------------------------
6400 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
6404 N := First_Rep_Item (E);
6405 while Present (N) loop
6406 if Nkind (N) = N_Record_Representation_Clause then
6414 end Get_Record_Representation_Clause;
6416 ------------------------
6417 -- Has_Attach_Handler --
6418 ------------------------
6420 function Has_Attach_Handler (Id : E) return B is
6424 pragma Assert (Is_Protected_Type (Id));
6426 Ritem := First_Rep_Item (Id);
6427 while Present (Ritem) loop
6428 if Nkind (Ritem) = N_Pragma
6429 and then Pragma_Name (Ritem) = Name_Attach_Handler
6433 Next_Rep_Item (Ritem);
6438 end Has_Attach_Handler;
6444 function Has_Entries (Id : E) return B is
6448 pragma Assert (Is_Concurrent_Type (Id));
6450 Ent := First_Entity (Id);
6451 while Present (Ent) loop
6452 if Is_Entry (Ent) then
6456 Ent := Next_Entity (Ent);
6462 ----------------------------
6463 -- Has_Foreign_Convention --
6464 ----------------------------
6466 function Has_Foreign_Convention (Id : E) return B is
6468 -- While regular Intrinsics such as the Standard operators fit in the
6469 -- "Ada" convention, those with an Interface_Name materialize GCC
6470 -- builtin imports for which Ada special treatments shouldn't apply.
6472 return Convention (Id) in Foreign_Convention
6473 or else (Convention (Id) = Convention_Intrinsic
6474 and then Present (Interface_Name (Id)));
6475 end Has_Foreign_Convention;
6477 ---------------------------
6478 -- Has_Interrupt_Handler --
6479 ---------------------------
6481 function Has_Interrupt_Handler (Id : E) return B is
6485 pragma Assert (Is_Protected_Type (Id));
6487 Ritem := First_Rep_Item (Id);
6488 while Present (Ritem) loop
6489 if Nkind (Ritem) = N_Pragma
6490 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6494 Next_Rep_Item (Ritem);
6499 end Has_Interrupt_Handler;
6501 -----------------------------
6502 -- Has_Non_Null_Refinement --
6503 -----------------------------
6505 function Has_Non_Null_Refinement (Id : E) return B is
6507 -- "Refinement" is a concept applicable only to abstract states
6509 pragma Assert (Ekind (Id) = E_Abstract_State);
6511 if Has_Visible_Refinement (Id) then
6512 pragma Assert (Present (Refinement_Constituents (Id)));
6514 -- For a refinement to be non-null, the first constituent must be
6515 -- anything other than null.
6518 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) /= N_Null;
6522 end Has_Non_Null_Refinement;
6524 -----------------------------
6525 -- Has_Null_Abstract_State --
6526 -----------------------------
6528 function Has_Null_Abstract_State (Id : E) return B is
6530 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
6533 Present (Abstract_States (Id))
6534 and then Is_Null_State (Node (First_Elmt (Abstract_States (Id))));
6535 end Has_Null_Abstract_State;
6537 -------------------------
6538 -- Has_Null_Refinement --
6539 -------------------------
6541 function Has_Null_Refinement (Id : E) return B is
6543 -- "Refinement" is a concept applicable only to abstract states
6545 pragma Assert (Ekind (Id) = E_Abstract_State);
6547 if Has_Visible_Refinement (Id) then
6548 pragma Assert (Present (Refinement_Constituents (Id)));
6550 -- For a refinement to be null, the state's sole constituent must be
6554 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) = N_Null;
6558 end Has_Null_Refinement;
6560 --------------------
6561 -- Has_Unmodified --
6562 --------------------
6564 function Has_Unmodified (E : Entity_Id) return Boolean is
6566 if Has_Pragma_Unmodified (E) then
6568 elsif Warnings_Off (E) then
6569 Set_Warnings_Off_Used_Unmodified (E);
6576 ---------------------
6577 -- Has_Unreferenced --
6578 ---------------------
6580 function Has_Unreferenced (E : Entity_Id) return Boolean is
6582 if Has_Pragma_Unreferenced (E) then
6584 elsif Warnings_Off (E) then
6585 Set_Warnings_Off_Used_Unreferenced (E);
6590 end Has_Unreferenced;
6592 ----------------------
6593 -- Has_Warnings_Off --
6594 ----------------------
6596 function Has_Warnings_Off (E : Entity_Id) return Boolean is
6598 if Warnings_Off (E) then
6599 Set_Warnings_Off_Used (E);
6604 end Has_Warnings_Off;
6606 ------------------------------
6607 -- Implementation_Base_Type --
6608 ------------------------------
6610 function Implementation_Base_Type (Id : E) return E is
6615 Bastyp := Base_Type (Id);
6617 if Is_Incomplete_Or_Private_Type (Bastyp) then
6618 Imptyp := Underlying_Type (Bastyp);
6620 -- If we have an implementation type, then just return it,
6621 -- otherwise we return the Base_Type anyway. This can only
6622 -- happen in error situations and should avoid some error bombs.
6624 if Present (Imptyp) then
6625 return Base_Type (Imptyp);
6633 end Implementation_Base_Type;
6635 -------------------------
6636 -- Invariant_Procedure --
6637 -------------------------
6639 function Invariant_Procedure (Id : E) return E is
6643 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
6645 if No (Subprograms_For_Type (Id)) then
6649 S := Subprograms_For_Type (Id);
6650 while Present (S) loop
6651 if Is_Invariant_Procedure (S) then
6654 S := Subprograms_For_Type (S);
6660 end Invariant_Procedure;
6666 -- Global flag table allowing rapid computation of this function
6668 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
6669 (E_Enumeration_Subtype |
6671 E_Signed_Integer_Subtype |
6672 E_Modular_Integer_Subtype |
6673 E_Floating_Point_Subtype |
6674 E_Ordinary_Fixed_Point_Subtype |
6675 E_Decimal_Fixed_Point_Subtype |
6680 E_Record_Subtype_With_Private |
6681 E_Limited_Private_Subtype |
6683 E_Protected_Subtype |
6685 E_String_Literal_Subtype |
6686 E_Class_Wide_Subtype => False,
6689 function Is_Base_Type (Id : E) return Boolean is
6691 return Entity_Is_Base_Type (Ekind (Id));
6694 ---------------------
6695 -- Is_Boolean_Type --
6696 ---------------------
6698 function Is_Boolean_Type (Id : E) return B is
6700 return Root_Type (Id) = Standard_Boolean;
6701 end Is_Boolean_Type;
6703 ------------------------
6704 -- Is_Constant_Object --
6705 ------------------------
6707 function Is_Constant_Object (Id : E) return B is
6708 K : constant Entity_Kind := Ekind (Id);
6711 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
6712 end Is_Constant_Object;
6714 --------------------
6715 -- Is_Discriminal --
6716 --------------------
6718 function Is_Discriminal (Id : E) return B is
6720 return (Ekind_In (Id, E_Constant, E_In_Parameter)
6721 and then Present (Discriminal_Link (Id)));
6724 ----------------------
6725 -- Is_Dynamic_Scope --
6726 ----------------------
6728 function Is_Dynamic_Scope (Id : E) return B is
6731 Ekind (Id) = E_Block
6733 Ekind (Id) = E_Function
6735 Ekind (Id) = E_Procedure
6737 Ekind (Id) = E_Subprogram_Body
6739 Ekind (Id) = E_Task_Type
6741 (Ekind (Id) = E_Limited_Private_Type
6742 and then Present (Full_View (Id))
6743 and then Ekind (Full_View (Id)) = E_Task_Type)
6745 Ekind (Id) = E_Entry
6747 Ekind (Id) = E_Entry_Family
6749 Ekind (Id) = E_Return_Statement;
6750 end Is_Dynamic_Scope;
6752 --------------------
6753 -- Is_Entity_Name --
6754 --------------------
6756 function Is_Entity_Name (N : Node_Id) return Boolean is
6757 Kind : constant Node_Kind := Nkind (N);
6760 -- Identifiers, operator symbols, expanded names are entity names
6762 return Kind = N_Identifier
6763 or else Kind = N_Operator_Symbol
6764 or else Kind = N_Expanded_Name
6766 -- Attribute references are entity names if they refer to an entity.
6767 -- Note that we don't do this by testing for the presence of the
6768 -- Entity field in the N_Attribute_Reference node, since it may not
6769 -- have been set yet.
6771 or else (Kind = N_Attribute_Reference
6772 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
6775 -----------------------
6776 -- Is_External_State --
6777 -----------------------
6779 function Is_External_State (Id : E) return B is
6782 Ekind (Id) = E_Abstract_State and then Has_Option (Id, Name_External);
6783 end Is_External_State;
6789 function Is_Finalizer (Id : E) return B is
6791 return Ekind (Id) = E_Procedure and then Chars (Id) = Name_uFinalizer;
6794 ---------------------
6795 -- Is_Ghost_Entity --
6796 ---------------------
6798 function Is_Ghost_Entity (Id : E) return B is
6800 if Present (Id) and then Ekind (Id) = E_Variable then
6801 return Convention (Id) = Convention_Ghost;
6803 return Is_Ghost_Subprogram (Id);
6805 end Is_Ghost_Entity;
6807 -------------------------
6808 -- Is_Ghost_Subprogram --
6809 -------------------------
6811 function Is_Ghost_Subprogram (Id : E) return B is
6813 if Present (Id) and then Ekind_In (Id, E_Function, E_Procedure) then
6814 return Convention (Id) = Convention_Ghost;
6818 end Is_Ghost_Subprogram;
6820 -------------------------
6821 -- Is_Input_Only_State --
6822 -------------------------
6824 function Is_Input_Only_State (Id : E) return B is
6827 Ekind (Id) = E_Abstract_State
6828 and then Has_Option (Id, Name_Input_Only);
6829 end Is_Input_Only_State;
6831 ---------------------------
6832 -- Is_Non_Volatile_State --
6833 ---------------------------
6835 function Is_Non_Volatile_State (Id : E) return B is
6838 Ekind (Id) = E_Abstract_State
6839 and then Has_Option (Id, Name_Non_Volatile);
6840 end Is_Non_Volatile_State;
6846 function Is_Null_State (Id : E) return B is
6849 Ekind (Id) = E_Abstract_State and then Nkind (Parent (Id)) = N_Null;
6852 ---------------------
6853 -- Is_Output_State --
6854 ---------------------
6856 function Is_Output_Only_State (Id : E) return B is
6859 Ekind (Id) = E_Abstract_State
6860 and then Has_Option (Id, Name_Output_Only);
6861 end Is_Output_Only_State;
6863 -----------------------------------
6864 -- Is_Package_Or_Generic_Package --
6865 -----------------------------------
6867 function Is_Package_Or_Generic_Package (Id : E) return B is
6869 return Ekind_In (Id, E_Generic_Package, E_Package);
6870 end Is_Package_Or_Generic_Package;
6876 function Is_Prival (Id : E) return B is
6878 return (Ekind_In (Id, E_Constant, E_Variable)
6879 and then Present (Prival_Link (Id)));
6882 ----------------------------
6883 -- Is_Protected_Component --
6884 ----------------------------
6886 function Is_Protected_Component (Id : E) return B is
6888 return Ekind (Id) = E_Component and then Is_Protected_Type (Scope (Id));
6889 end Is_Protected_Component;
6891 ----------------------------
6892 -- Is_Protected_Interface --
6893 ----------------------------
6895 function Is_Protected_Interface (Id : E) return B is
6896 Typ : constant Entity_Id := Base_Type (Id);
6898 if not Is_Interface (Typ) then
6900 elsif Is_Class_Wide_Type (Typ) then
6901 return Is_Protected_Interface (Etype (Typ));
6903 return Protected_Present (Type_Definition (Parent (Typ)));
6905 end Is_Protected_Interface;
6907 ------------------------------
6908 -- Is_Protected_Record_Type --
6909 ------------------------------
6911 function Is_Protected_Record_Type (Id : E) return B is
6914 Is_Concurrent_Record_Type (Id)
6915 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
6916 end Is_Protected_Record_Type;
6918 --------------------------------
6919 -- Is_Standard_Character_Type --
6920 --------------------------------
6922 function Is_Standard_Character_Type (Id : E) return B is
6924 if Is_Type (Id) then
6926 R : constant Entity_Id := Root_Type (Id);
6929 R = Standard_Character
6931 R = Standard_Wide_Character
6933 R = Standard_Wide_Wide_Character;
6939 end Is_Standard_Character_Type;
6941 --------------------
6942 -- Is_String_Type --
6943 --------------------
6945 function Is_String_Type (Id : E) return B is
6947 return Ekind (Id) in String_Kind
6948 or else (Is_Array_Type (Id)
6949 and then Id /= Any_Composite
6950 and then Number_Dimensions (Id) = 1
6951 and then Is_Character_Type (Component_Type (Id)));
6954 -------------------------------
6955 -- Is_Synchronized_Interface --
6956 -------------------------------
6958 function Is_Synchronized_Interface (Id : E) return B is
6959 Typ : constant Entity_Id := Base_Type (Id);
6962 if not Is_Interface (Typ) then
6965 elsif Is_Class_Wide_Type (Typ) then
6966 return Is_Synchronized_Interface (Etype (Typ));
6969 return Protected_Present (Type_Definition (Parent (Typ)))
6970 or else Synchronized_Present (Type_Definition (Parent (Typ)))
6971 or else Task_Present (Type_Definition (Parent (Typ)));
6973 end Is_Synchronized_Interface;
6975 -----------------------
6976 -- Is_Task_Interface --
6977 -----------------------
6979 function Is_Task_Interface (Id : E) return B is
6980 Typ : constant Entity_Id := Base_Type (Id);
6982 if not Is_Interface (Typ) then
6984 elsif Is_Class_Wide_Type (Typ) then
6985 return Is_Task_Interface (Etype (Typ));
6987 return Task_Present (Type_Definition (Parent (Typ)));
6989 end Is_Task_Interface;
6991 -------------------------
6992 -- Is_Task_Record_Type --
6993 -------------------------
6995 function Is_Task_Record_Type (Id : E) return B is
6998 Is_Concurrent_Record_Type (Id)
6999 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
7000 end Is_Task_Record_Type;
7002 ------------------------
7003 -- Is_Wrapper_Package --
7004 ------------------------
7006 function Is_Wrapper_Package (Id : E) return B is
7008 return (Ekind (Id) = E_Package and then Present (Related_Instance (Id)));
7009 end Is_Wrapper_Package;
7015 function Last_Formal (Id : E) return E is
7020 (Is_Overloadable (Id)
7021 or else Ekind_In (Id, E_Entry_Family,
7023 E_Subprogram_Type));
7025 if Ekind (Id) = E_Enumeration_Literal then
7029 Formal := First_Formal (Id);
7031 if Present (Formal) then
7032 while Present (Next_Formal (Formal)) loop
7033 Formal := Next_Formal (Formal);
7041 function Model_Emin_Value (Id : E) return Uint is
7043 return Machine_Emin_Value (Id);
7044 end Model_Emin_Value;
7046 -------------------------
7047 -- Model_Epsilon_Value --
7048 -------------------------
7050 function Model_Epsilon_Value (Id : E) return Ureal is
7051 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7053 return Radix ** (1 - Model_Mantissa_Value (Id));
7054 end Model_Epsilon_Value;
7056 --------------------------
7057 -- Model_Mantissa_Value --
7058 --------------------------
7060 function Model_Mantissa_Value (Id : E) return Uint is
7062 return Machine_Mantissa_Value (Id);
7063 end Model_Mantissa_Value;
7065 -----------------------
7066 -- Model_Small_Value --
7067 -----------------------
7069 function Model_Small_Value (Id : E) return Ureal is
7070 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7072 return Radix ** (Model_Emin_Value (Id) - 1);
7073 end Model_Small_Value;
7075 ------------------------
7076 -- Machine_Emax_Value --
7077 ------------------------
7079 function Machine_Emax_Value (Id : E) return Uint is
7080 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7083 case Float_Rep (Id) is
7086 when 1 .. 6 => return Uint_128;
7087 when 7 .. 15 => return 2**10;
7088 when 16 .. 33 => return 2**14;
7089 when others => return No_Uint;
7094 when 1 .. 9 => return 2**7 - 1;
7095 when 10 .. 15 => return 2**10 - 1;
7096 when others => return No_Uint;
7100 return Uint_2 ** Uint_7 - Uint_1;
7102 end Machine_Emax_Value;
7104 ------------------------
7105 -- Machine_Emin_Value --
7106 ------------------------
7108 function Machine_Emin_Value (Id : E) return Uint is
7110 case Float_Rep (Id) is
7111 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
7112 when VAX_Native => return -Machine_Emax_Value (Id);
7113 when AAMP => return -Machine_Emax_Value (Id);
7115 end Machine_Emin_Value;
7117 ----------------------------
7118 -- Machine_Mantissa_Value --
7119 ----------------------------
7121 function Machine_Mantissa_Value (Id : E) return Uint is
7122 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7125 case Float_Rep (Id) is
7128 when 1 .. 6 => return Uint_24;
7129 when 7 .. 15 => return UI_From_Int (53);
7130 when 16 .. 18 => return Uint_64;
7131 when 19 .. 33 => return UI_From_Int (113);
7132 when others => return No_Uint;
7137 when 1 .. 6 => return Uint_24;
7138 when 7 .. 9 => return UI_From_Int (56);
7139 when 10 .. 15 => return UI_From_Int (53);
7140 when others => return No_Uint;
7145 when 1 .. 6 => return Uint_24;
7146 when 7 .. 9 => return UI_From_Int (40);
7147 when others => return No_Uint;
7150 end Machine_Mantissa_Value;
7152 -------------------------
7153 -- Machine_Radix_Value --
7154 -------------------------
7156 function Machine_Radix_Value (Id : E) return U is
7158 case Float_Rep (Id) is
7159 when IEEE_Binary | VAX_Native | AAMP =>
7162 end Machine_Radix_Value;
7164 --------------------
7165 -- Next_Component --
7166 --------------------
7168 function Next_Component (Id : E) return E is
7172 Comp_Id := Next_Entity (Id);
7173 while Present (Comp_Id) loop
7174 exit when Ekind (Comp_Id) = E_Component;
7175 Comp_Id := Next_Entity (Comp_Id);
7181 ------------------------------------
7182 -- Next_Component_Or_Discriminant --
7183 ------------------------------------
7185 function Next_Component_Or_Discriminant (Id : E) return E is
7189 Comp_Id := Next_Entity (Id);
7190 while Present (Comp_Id) loop
7191 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
7192 Comp_Id := Next_Entity (Comp_Id);
7196 end Next_Component_Or_Discriminant;
7198 -----------------------
7199 -- Next_Discriminant --
7200 -----------------------
7202 -- This function actually implements both Next_Discriminant and
7203 -- Next_Stored_Discriminant by making sure that the Discriminant
7204 -- returned is of the same variety as Id.
7206 function Next_Discriminant (Id : E) return E is
7208 -- Derived Tagged types with private extensions look like this...
7210 -- E_Discriminant d1
7211 -- E_Discriminant d2
7213 -- E_Discriminant d1
7214 -- E_Discriminant d2
7217 -- so it is critical not to go past the leading discriminants
7222 pragma Assert (Ekind (Id) = E_Discriminant);
7225 D := Next_Entity (D);
7227 or else (Ekind (D) /= E_Discriminant
7228 and then not Is_Itype (D))
7233 exit when Ekind (D) = E_Discriminant
7234 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
7238 end Next_Discriminant;
7244 function Next_Formal (Id : E) return E is
7248 -- Follow the chain of declared entities as long as the kind of the
7249 -- entity corresponds to a formal parameter. Skip internal entities
7250 -- that may have been created for implicit subtypes, in the process
7251 -- of analyzing default expressions.
7255 P := Next_Entity (P);
7257 if No (P) or else Is_Formal (P) then
7259 elsif not Is_Internal (P) then
7265 -----------------------------
7266 -- Next_Formal_With_Extras --
7267 -----------------------------
7269 function Next_Formal_With_Extras (Id : E) return E is
7271 if Present (Extra_Formal (Id)) then
7272 return Extra_Formal (Id);
7274 return Next_Formal (Id);
7276 end Next_Formal_With_Extras;
7282 function Next_Index (Id : Node_Id) return Node_Id is
7291 function Next_Literal (Id : E) return E is
7293 pragma Assert (Nkind (Id) in N_Entity);
7297 ------------------------------
7298 -- Next_Stored_Discriminant --
7299 ------------------------------
7301 function Next_Stored_Discriminant (Id : E) return E is
7303 -- See comment in Next_Discriminant
7305 return Next_Discriminant (Id);
7306 end Next_Stored_Discriminant;
7308 -----------------------
7309 -- Number_Dimensions --
7310 -----------------------
7312 function Number_Dimensions (Id : E) return Pos is
7317 if Ekind (Id) in String_Kind then
7322 T := First_Index (Id);
7323 while Present (T) loop
7330 end Number_Dimensions;
7332 --------------------
7333 -- Number_Entries --
7334 --------------------
7336 function Number_Entries (Id : E) return Nat is
7341 pragma Assert (Is_Concurrent_Type (Id));
7344 Ent := First_Entity (Id);
7345 while Present (Ent) loop
7346 if Is_Entry (Ent) then
7350 Ent := Next_Entity (Ent);
7356 --------------------
7357 -- Number_Formals --
7358 --------------------
7360 function Number_Formals (Id : E) return Pos is
7366 Formal := First_Formal (Id);
7367 while Present (Formal) loop
7369 Formal := Next_Formal (Formal);
7375 --------------------
7376 -- Parameter_Mode --
7377 --------------------
7379 function Parameter_Mode (Id : E) return Formal_Kind is
7384 ------------------------
7385 -- Predicate_Function --
7386 ------------------------
7388 function Predicate_Function (Id : E) return E is
7393 pragma Assert (Is_Type (Id));
7395 -- If type is private and has a completion, predicate may be defined
7396 -- on the full view.
7398 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7399 T := Full_View (Id);
7404 if No (Subprograms_For_Type (T)) then
7408 S := Subprograms_For_Type (T);
7409 while Present (S) loop
7410 if Is_Predicate_Function (S) then
7413 S := Subprograms_For_Type (S);
7419 end Predicate_Function;
7421 --------------------------
7422 -- Predicate_Function_M --
7423 --------------------------
7425 function Predicate_Function_M (Id : E) return E is
7430 pragma Assert (Is_Type (Id));
7432 -- If type is private and has a completion, predicate may be defined
7433 -- on the full view.
7435 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7436 T := Full_View (Id);
7441 if No (Subprograms_For_Type (T)) then
7445 S := Subprograms_For_Type (T);
7446 while Present (S) loop
7447 if Is_Predicate_Function_M (S) then
7450 S := Subprograms_For_Type (S);
7456 end Predicate_Function_M;
7458 -------------------------
7459 -- Present_In_Rep_Item --
7460 -------------------------
7462 function Present_In_Rep_Item (E : Entity_Id; N : Node_Id) return Boolean is
7466 Ritem := First_Rep_Item (E);
7468 while Present (Ritem) loop
7473 Next_Rep_Item (Ritem);
7477 end Present_In_Rep_Item;
7479 --------------------------
7480 -- Primitive_Operations --
7481 --------------------------
7483 function Primitive_Operations (Id : E) return L is
7485 if Is_Concurrent_Type (Id) then
7486 if Present (Corresponding_Record_Type (Id)) then
7487 return Direct_Primitive_Operations
7488 (Corresponding_Record_Type (Id));
7490 -- If expansion is disabled the corresponding record type is absent,
7491 -- but if the type has ancestors it may have primitive operations.
7493 elsif Is_Tagged_Type (Id) then
7494 return Direct_Primitive_Operations (Id);
7500 return Direct_Primitive_Operations (Id);
7502 end Primitive_Operations;
7504 ---------------------
7505 -- Record_Rep_Item --
7506 ---------------------
7508 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
7510 Set_Next_Rep_Item (N, First_Rep_Item (E));
7511 Set_First_Rep_Item (E, N);
7512 end Record_Rep_Item;
7518 function Root_Type (Id : E) return E is
7522 pragma Assert (Nkind (Id) in N_Entity);
7524 T := Base_Type (Id);
7526 if Ekind (T) = E_Class_Wide_Type then
7538 -- Following test catches some error cases resulting from
7541 elsif No (Etyp) then
7542 Check_Error_Detected;
7545 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
7548 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
7554 -- Return if there is a circularity in the inheritance chain. This
7555 -- happens in some error situations and we do not want to get
7556 -- stuck in this loop.
7558 if T = Base_Type (Id) then
7565 ---------------------
7566 -- Safe_Emax_Value --
7567 ---------------------
7569 function Safe_Emax_Value (Id : E) return Uint is
7571 return Machine_Emax_Value (Id);
7572 end Safe_Emax_Value;
7574 ----------------------
7575 -- Safe_First_Value --
7576 ----------------------
7578 function Safe_First_Value (Id : E) return Ureal is
7580 return -Safe_Last_Value (Id);
7581 end Safe_First_Value;
7583 ---------------------
7584 -- Safe_Last_Value --
7585 ---------------------
7587 function Safe_Last_Value (Id : E) return Ureal is
7588 Radix : constant Uint := Machine_Radix_Value (Id);
7589 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
7590 Emax : constant Uint := Safe_Emax_Value (Id);
7591 Significand : constant Uint := Radix ** Mantissa - 1;
7592 Exponent : constant Uint := Emax - Mantissa;
7598 (Num => Significand * 2 ** (Exponent mod 4),
7599 Den => -Exponent / 4,
7605 (Num => Significand,
7609 end Safe_Last_Value;
7615 function Scope_Depth (Id : E) return Uint is
7620 while Is_Record_Type (Scop) loop
7621 Scop := Scope (Scop);
7624 return Scope_Depth_Value (Scop);
7627 ---------------------
7628 -- Scope_Depth_Set --
7629 ---------------------
7631 function Scope_Depth_Set (Id : E) return B is
7633 return not Is_Record_Type (Id)
7634 and then Field22 (Id) /= Union_Id (Empty);
7635 end Scope_Depth_Set;
7637 -----------------------------
7638 -- Set_Component_Alignment --
7639 -----------------------------
7641 -- Component Alignment is encoded using two flags, Flag128/129 as
7642 -- follows. Note that both flags False = Align_Default, so that the
7643 -- default initialization of flags to False initializes component
7644 -- alignment to the default value as required.
7646 -- Flag128 Flag129 Value
7647 -- ------- ------- -----
7648 -- False False Calign_Default
7649 -- False True Calign_Component_Size
7650 -- True False Calign_Component_Size_4
7651 -- True True Calign_Storage_Unit
7653 procedure Set_Component_Alignment (Id : E; V : C) is
7655 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
7656 and then Is_Base_Type (Id));
7659 when Calign_Default =>
7660 Set_Flag128 (Id, False);
7661 Set_Flag129 (Id, False);
7663 when Calign_Component_Size =>
7664 Set_Flag128 (Id, False);
7665 Set_Flag129 (Id, True);
7667 when Calign_Component_Size_4 =>
7668 Set_Flag128 (Id, True);
7669 Set_Flag129 (Id, False);
7671 when Calign_Storage_Unit =>
7672 Set_Flag128 (Id, True);
7673 Set_Flag129 (Id, True);
7675 end Set_Component_Alignment;
7677 -----------------------------
7678 -- Set_Invariant_Procedure --
7679 -----------------------------
7681 procedure Set_Invariant_Procedure (Id : E; V : E) is
7685 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7687 S := Subprograms_For_Type (Id);
7688 Set_Subprograms_For_Type (Id, V);
7689 Set_Subprograms_For_Type (V, S);
7691 -- Check for duplicate entry
7693 while Present (S) loop
7694 if Is_Invariant_Procedure (S) then
7695 raise Program_Error;
7697 S := Subprograms_For_Type (S);
7700 end Set_Invariant_Procedure;
7702 ----------------------------
7703 -- Set_Predicate_Function --
7704 ----------------------------
7706 procedure Set_Predicate_Function (Id : E; V : E) is
7710 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7712 S := Subprograms_For_Type (Id);
7713 Set_Subprograms_For_Type (Id, V);
7714 Set_Subprograms_For_Type (V, S);
7716 while Present (S) loop
7717 if Is_Predicate_Function (S) then
7718 raise Program_Error;
7720 S := Subprograms_For_Type (S);
7723 end Set_Predicate_Function;
7725 ------------------------------
7726 -- Set_Predicate_Function_M --
7727 ------------------------------
7729 procedure Set_Predicate_Function_M (Id : E; V : E) is
7733 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7735 S := Subprograms_For_Type (Id);
7736 Set_Subprograms_For_Type (Id, V);
7737 Set_Subprograms_For_Type (V, S);
7739 -- Check for duplicates
7741 while Present (S) loop
7742 if Is_Predicate_Function_M (S) then
7743 raise Program_Error;
7745 S := Subprograms_For_Type (S);
7748 end Set_Predicate_Function_M;
7754 function Size_Clause (Id : E) return N is
7756 return Get_Attribute_Definition_Clause (Id, Attribute_Size);
7759 ------------------------
7760 -- Stream_Size_Clause --
7761 ------------------------
7763 function Stream_Size_Clause (Id : E) return N is
7765 return Get_Attribute_Definition_Clause (Id, Attribute_Stream_Size);
7766 end Stream_Size_Clause;
7772 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
7778 Kind := E_Access_Subtype;
7782 Kind := E_Array_Subtype;
7784 when E_Class_Wide_Type |
7785 E_Class_Wide_Subtype =>
7786 Kind := E_Class_Wide_Subtype;
7788 when E_Decimal_Fixed_Point_Type |
7789 E_Decimal_Fixed_Point_Subtype =>
7790 Kind := E_Decimal_Fixed_Point_Subtype;
7792 when E_Ordinary_Fixed_Point_Type |
7793 E_Ordinary_Fixed_Point_Subtype =>
7794 Kind := E_Ordinary_Fixed_Point_Subtype;
7796 when E_Private_Type |
7797 E_Private_Subtype =>
7798 Kind := E_Private_Subtype;
7800 when E_Limited_Private_Type |
7801 E_Limited_Private_Subtype =>
7802 Kind := E_Limited_Private_Subtype;
7804 when E_Record_Type_With_Private |
7805 E_Record_Subtype_With_Private =>
7806 Kind := E_Record_Subtype_With_Private;
7808 when E_Record_Type |
7810 Kind := E_Record_Subtype;
7812 when E_String_Type |
7814 Kind := E_String_Subtype;
7816 when Enumeration_Kind =>
7817 Kind := E_Enumeration_Subtype;
7820 Kind := E_Floating_Point_Subtype;
7822 when Signed_Integer_Kind =>
7823 Kind := E_Signed_Integer_Subtype;
7825 when Modular_Integer_Kind =>
7826 Kind := E_Modular_Integer_Subtype;
7828 when Protected_Kind =>
7829 Kind := E_Protected_Subtype;
7832 Kind := E_Task_Subtype;
7836 raise Program_Error;
7842 ---------------------
7843 -- Type_High_Bound --
7844 ---------------------
7846 function Type_High_Bound (Id : E) return Node_Id is
7847 Rng : constant Node_Id := Scalar_Range (Id);
7849 if Nkind (Rng) = N_Subtype_Indication then
7850 return High_Bound (Range_Expression (Constraint (Rng)));
7852 return High_Bound (Rng);
7854 end Type_High_Bound;
7856 --------------------
7857 -- Type_Low_Bound --
7858 --------------------
7860 function Type_Low_Bound (Id : E) return Node_Id is
7861 Rng : constant Node_Id := Scalar_Range (Id);
7863 if Nkind (Rng) = N_Subtype_Indication then
7864 return Low_Bound (Range_Expression (Constraint (Rng)));
7866 return Low_Bound (Rng);
7870 ---------------------
7871 -- Underlying_Type --
7872 ---------------------
7874 function Underlying_Type (Id : E) return E is
7876 -- For record_with_private the underlying type is always the direct
7877 -- full view. Never try to take the full view of the parent it
7878 -- doesn't make sense.
7880 if Ekind (Id) = E_Record_Type_With_Private then
7881 return Full_View (Id);
7883 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
7885 -- If we have an incomplete or private type with a full view,
7886 -- then we return the Underlying_Type of this full view
7888 if Present (Full_View (Id)) then
7889 if Id = Full_View (Id) then
7891 -- Previous error in declaration
7896 return Underlying_Type (Full_View (Id));
7899 -- If we have an incomplete entity that comes from the limited
7900 -- view then we return the Underlying_Type of its non-limited
7903 elsif From_Limited_With (Id)
7904 and then Present (Non_Limited_View (Id))
7906 return Underlying_Type (Non_Limited_View (Id));
7908 -- Otherwise check for the case where we have a derived type or
7909 -- subtype, and if so get the Underlying_Type of the parent type.
7911 elsif Etype (Id) /= Id then
7912 return Underlying_Type (Etype (Id));
7914 -- Otherwise we have an incomplete or private type that has
7915 -- no full view, which means that we have not encountered the
7916 -- completion, so return Empty to indicate the underlying type
7917 -- is not yet known.
7923 -- For non-incomplete, non-private types, return the type itself
7924 -- Also for entities that are not types at all return the entity
7930 end Underlying_Type;
7936 function Vax_Float (Id : E) return B is
7938 return Is_Floating_Point_Type (Id) and then Float_Rep (Id) = VAX_Native;
7941 ------------------------
7942 -- Write_Entity_Flags --
7943 ------------------------
7945 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
7947 procedure W (Flag_Name : String; Flag : Boolean);
7948 -- Write out given flag if it is set
7954 procedure W (Flag_Name : String; Flag : Boolean) is
7958 Write_Str (Flag_Name);
7959 Write_Str (" = True");
7964 -- Start of processing for Write_Entity_Flags
7967 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
7968 and then Is_Base_Type (Id)
7971 Write_Str ("Component_Alignment = ");
7973 case Component_Alignment (Id) is
7974 when Calign_Default =>
7975 Write_Str ("Calign_Default");
7977 when Calign_Component_Size =>
7978 Write_Str ("Calign_Component_Size");
7980 when Calign_Component_Size_4 =>
7981 Write_Str ("Calign_Component_Size_4");
7983 when Calign_Storage_Unit =>
7984 Write_Str ("Calign_Storage_Unit");
7990 W ("Address_Taken", Flag104 (Id));
7991 W ("Body_Needed_For_SAL", Flag40 (Id));
7992 W ("C_Pass_By_Copy", Flag125 (Id));
7993 W ("Can_Never_Be_Null", Flag38 (Id));
7994 W ("Checks_May_Be_Suppressed", Flag31 (Id));
7995 W ("Debug_Info_Off", Flag166 (Id));
7996 W ("Default_Expressions_Processed", Flag108 (Id));
7997 W ("Delay_Cleanups", Flag114 (Id));
7998 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
7999 W ("Depends_On_Private", Flag14 (Id));
8000 W ("Discard_Names", Flag88 (Id));
8001 W ("Elaboration_Entity_Required", Flag174 (Id));
8002 W ("Elaborate_Body_Desirable", Flag210 (Id));
8003 W ("Entry_Accepted", Flag152 (Id));
8004 W ("Can_Use_Internal_Rep", Flag229 (Id));
8005 W ("Finalize_Storage_Only", Flag158 (Id));
8006 W ("From_Limited_With", Flag159 (Id));
8007 W ("Has_Aliased_Components", Flag135 (Id));
8008 W ("Has_Alignment_Clause", Flag46 (Id));
8009 W ("Has_All_Calls_Remote", Flag79 (Id));
8010 W ("Has_Anonymous_Master", Flag253 (Id));
8011 W ("Has_Atomic_Components", Flag86 (Id));
8012 W ("Has_Biased_Representation", Flag139 (Id));
8013 W ("Has_Body_References", Flag264 (Id));
8014 W ("Has_Completion", Flag26 (Id));
8015 W ("Has_Completion_In_Body", Flag71 (Id));
8016 W ("Has_Complex_Representation", Flag140 (Id));
8017 W ("Has_Component_Size_Clause", Flag68 (Id));
8018 W ("Has_Contiguous_Rep", Flag181 (Id));
8019 W ("Has_Controlled_Component", Flag43 (Id));
8020 W ("Has_Controlling_Result", Flag98 (Id));
8021 W ("Has_Convention_Pragma", Flag119 (Id));
8022 W ("Has_Default_Aspect", Flag39 (Id));
8023 W ("Has_Delayed_Aspects", Flag200 (Id));
8024 W ("Has_Delayed_Freeze", Flag18 (Id));
8025 W ("Has_Delayed_Rep_Aspects", Flag261 (Id));
8026 W ("Has_Discriminants", Flag5 (Id));
8027 W ("Has_Dispatch_Table", Flag220 (Id));
8028 W ("Has_Dynamic_Predicate_Aspect", Flag258 (Id));
8029 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
8030 W ("Has_Exit", Flag47 (Id));
8031 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
8032 W ("Has_Forward_Instantiation", Flag175 (Id));
8033 W ("Has_Fully_Qualified_Name", Flag173 (Id));
8034 W ("Has_Gigi_Rep_Item", Flag82 (Id));
8035 W ("Has_Homonym", Flag56 (Id));
8036 W ("Has_Implicit_Dereference", Flag251 (Id));
8037 W ("Has_Inheritable_Invariants", Flag248 (Id));
8038 W ("Has_Initial_Value", Flag219 (Id));
8039 W ("Has_Invariants", Flag232 (Id));
8040 W ("Has_Loop_Entry_Attributes", Flag260 (Id));
8041 W ("Has_Machine_Radix_Clause", Flag83 (Id));
8042 W ("Has_Master_Entity", Flag21 (Id));
8043 W ("Has_Missing_Return", Flag142 (Id));
8044 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
8045 W ("Has_Non_Standard_Rep", Flag75 (Id));
8046 W ("Has_Object_Size_Clause", Flag172 (Id));
8047 W ("Has_Per_Object_Constraint", Flag154 (Id));
8048 W ("Has_Postconditions", Flag240 (Id));
8049 W ("Has_Pragma_Controlled", Flag27 (Id));
8050 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
8051 W ("Has_Pragma_Inline", Flag157 (Id));
8052 W ("Has_Pragma_Inline_Always", Flag230 (Id));
8053 W ("Has_Pragma_No_Inline", Flag201 (Id));
8054 W ("Has_Pragma_Ordered", Flag198 (Id));
8055 W ("Has_Pragma_Pack", Flag121 (Id));
8056 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
8057 W ("Has_Pragma_Pure", Flag203 (Id));
8058 W ("Has_Pragma_Pure_Function", Flag179 (Id));
8059 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
8060 W ("Has_Pragma_Unmodified", Flag233 (Id));
8061 W ("Has_Pragma_Unreferenced", Flag180 (Id));
8062 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
8063 W ("Has_Predicates", Flag250 (Id));
8064 W ("Has_Primitive_Operations", Flag120 (Id));
8065 W ("Has_Private_Ancestor", Flag151 (Id));
8066 W ("Has_Private_Declaration", Flag155 (Id));
8067 W ("Has_Qualified_Name", Flag161 (Id));
8068 W ("Has_RACW", Flag214 (Id));
8069 W ("Has_Record_Rep_Clause", Flag65 (Id));
8070 W ("Has_Recursive_Call", Flag143 (Id));
8071 W ("Has_Size_Clause", Flag29 (Id));
8072 W ("Has_Small_Clause", Flag67 (Id));
8073 W ("Has_Specified_Layout", Flag100 (Id));
8074 W ("Has_Specified_Stream_Input", Flag190 (Id));
8075 W ("Has_Specified_Stream_Output", Flag191 (Id));
8076 W ("Has_Specified_Stream_Read", Flag192 (Id));
8077 W ("Has_Specified_Stream_Write", Flag193 (Id));
8078 W ("Has_Static_Discriminants", Flag211 (Id));
8079 W ("Has_Static_Predicate_Aspect", Flag259 (Id));
8080 W ("Has_Storage_Size_Clause", Flag23 (Id));
8081 W ("Has_Stream_Size_Clause", Flag184 (Id));
8082 W ("Has_Task", Flag30 (Id));
8083 W ("Has_Thunks", Flag228 (Id));
8084 W ("Has_Unchecked_Union", Flag123 (Id));
8085 W ("Has_Unknown_Discriminants", Flag72 (Id));
8086 W ("Has_Up_Level_Access", Flag215 (Id));
8087 W ("Has_Visible_Refinement", Flag263 (Id));
8088 W ("Has_Volatile_Components", Flag87 (Id));
8089 W ("Has_Xref_Entry", Flag182 (Id));
8090 W ("In_Package_Body", Flag48 (Id));
8091 W ("In_Private_Part", Flag45 (Id));
8092 W ("In_Use", Flag8 (Id));
8093 W ("Is_AST_Entry", Flag132 (Id));
8094 W ("Is_Abstract_Subprogram", Flag19 (Id));
8095 W ("Is_Abstract_Type", Flag146 (Id));
8096 W ("Is_Local_Anonymous_Access", Flag194 (Id));
8097 W ("Is_Access_Constant", Flag69 (Id));
8098 W ("Is_Ada_2005_Only", Flag185 (Id));
8099 W ("Is_Ada_2012_Only", Flag199 (Id));
8100 W ("Is_Aliased", Flag15 (Id));
8101 W ("Is_Asynchronous", Flag81 (Id));
8102 W ("Is_Atomic", Flag85 (Id));
8103 W ("Is_Bit_Packed_Array", Flag122 (Id));
8104 W ("Is_CPP_Class", Flag74 (Id));
8105 W ("Is_Called", Flag102 (Id));
8106 W ("Is_Character_Type", Flag63 (Id));
8107 W ("Is_Child_Unit", Flag73 (Id));
8108 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
8109 W ("Is_Compilation_Unit", Flag149 (Id));
8110 W ("Is_Completely_Hidden", Flag103 (Id));
8111 W ("Is_Concurrent_Record_Type", Flag20 (Id));
8112 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
8113 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
8114 W ("Is_Constrained", Flag12 (Id));
8115 W ("Is_Constructor", Flag76 (Id));
8116 W ("Is_Controlled", Flag42 (Id));
8117 W ("Is_Controlling_Formal", Flag97 (Id));
8118 W ("Is_Descendent_Of_Address", Flag223 (Id));
8119 W ("Is_Discrim_SO_Function", Flag176 (Id));
8120 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
8121 W ("Is_Dispatching_Operation", Flag6 (Id));
8122 W ("Is_Eliminated", Flag124 (Id));
8123 W ("Is_Entry_Formal", Flag52 (Id));
8124 W ("Is_Exported", Flag99 (Id));
8125 W ("Is_First_Subtype", Flag70 (Id));
8126 W ("Is_For_Access_Subtype", Flag118 (Id));
8127 W ("Is_Formal_Subprogram", Flag111 (Id));
8128 W ("Is_Frozen", Flag4 (Id));
8129 W ("Is_Generic_Actual_Type", Flag94 (Id));
8130 W ("Is_Generic_Instance", Flag130 (Id));
8131 W ("Is_Generic_Type", Flag13 (Id));
8132 W ("Is_Hidden", Flag57 (Id));
8133 W ("Is_Hidden_Open_Scope", Flag171 (Id));
8134 W ("Is_Immediately_Visible", Flag7 (Id));
8135 W ("Is_Implementation_Defined", Flag254 (Id));
8136 W ("Is_Imported", Flag24 (Id));
8137 W ("Is_Inlined", Flag11 (Id));
8138 W ("Is_Instantiated", Flag126 (Id));
8139 W ("Is_Interface", Flag186 (Id));
8140 W ("Is_Internal", Flag17 (Id));
8141 W ("Is_Interrupt_Handler", Flag89 (Id));
8142 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
8143 W ("Is_Invariant_Procedure", Flag257 (Id));
8144 W ("Is_Itype", Flag91 (Id));
8145 W ("Is_Known_Non_Null", Flag37 (Id));
8146 W ("Is_Known_Null", Flag204 (Id));
8147 W ("Is_Known_Valid", Flag170 (Id));
8148 W ("Is_Limited_Composite", Flag106 (Id));
8149 W ("Is_Limited_Interface", Flag197 (Id));
8150 W ("Is_Limited_Record", Flag25 (Id));
8151 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
8152 W ("Is_Non_Static_Subtype", Flag109 (Id));
8153 W ("Is_Null_Init_Proc", Flag178 (Id));
8154 W ("Is_Obsolescent", Flag153 (Id));
8155 W ("Is_Only_Out_Parameter", Flag226 (Id));
8156 W ("Is_Optional_Parameter", Flag134 (Id));
8157 W ("Is_Package_Body_Entity", Flag160 (Id));
8158 W ("Is_Packed", Flag51 (Id));
8159 W ("Is_Packed_Array_Type", Flag138 (Id));
8160 W ("Is_Potentially_Use_Visible", Flag9 (Id));
8161 W ("Is_Predicate_Function", Flag255 (Id));
8162 W ("Is_Predicate_Function_M", Flag256 (Id));
8163 W ("Is_Preelaborated", Flag59 (Id));
8164 W ("Is_Primitive", Flag218 (Id));
8165 W ("Is_Primitive_Wrapper", Flag195 (Id));
8166 W ("Is_Private_Composite", Flag107 (Id));
8167 W ("Is_Private_Descendant", Flag53 (Id));
8168 W ("Is_Private_Primitive", Flag245 (Id));
8169 W ("Is_Processed_Transient", Flag252 (Id));
8170 W ("Is_Public", Flag10 (Id));
8171 W ("Is_Pure", Flag44 (Id));
8172 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
8173 W ("Is_RACW_Stub_Type", Flag244 (Id));
8174 W ("Is_Raised", Flag224 (Id));
8175 W ("Is_Remote_Call_Interface", Flag62 (Id));
8176 W ("Is_Remote_Types", Flag61 (Id));
8177 W ("Is_Renaming_Of_Object", Flag112 (Id));
8178 W ("Is_Return_Object", Flag209 (Id));
8179 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
8180 W ("Is_Shared_Passive", Flag60 (Id));
8181 W ("Is_Statically_Allocated", Flag28 (Id));
8182 W ("Is_Tag", Flag78 (Id));
8183 W ("Is_Tagged_Type", Flag55 (Id));
8184 W ("Is_Thunk", Flag225 (Id));
8185 W ("Is_Trivial_Subprogram", Flag235 (Id));
8186 W ("Is_True_Constant", Flag163 (Id));
8187 W ("Is_Unchecked_Union", Flag117 (Id));
8188 W ("Is_Underlying_Record_View", Flag246 (Id));
8189 W ("Is_Unsigned_Type", Flag144 (Id));
8190 W ("Is_VMS_Exception", Flag133 (Id));
8191 W ("Is_Valued_Procedure", Flag127 (Id));
8192 W ("Is_Visible_Formal", Flag206 (Id));
8193 W ("Is_Visible_Lib_Unit", Flag116 (Id));
8194 W ("Is_Volatile", Flag16 (Id));
8195 W ("Itype_Printed", Flag202 (Id));
8196 W ("Kill_Elaboration_Checks", Flag32 (Id));
8197 W ("Kill_Range_Checks", Flag33 (Id));
8198 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
8199 W ("Low_Bound_Tested", Flag205 (Id));
8200 W ("Machine_Radix_10", Flag84 (Id));
8201 W ("Materialize_Entity", Flag168 (Id));
8202 W ("May_Inherit_Delayed_Rep_Aspects", Flag262 (Id));
8203 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
8204 W ("Must_Have_Preelab_Init", Flag208 (Id));
8205 W ("Needs_Debug_Info", Flag147 (Id));
8206 W ("Needs_No_Actuals", Flag22 (Id));
8207 W ("Never_Set_In_Source", Flag115 (Id));
8208 W ("No_Pool_Assigned", Flag131 (Id));
8209 W ("No_Return", Flag113 (Id));
8210 W ("No_Strict_Aliasing", Flag136 (Id));
8211 W ("Non_Binary_Modulus", Flag58 (Id));
8212 W ("Nonzero_Is_True", Flag162 (Id));
8213 W ("OK_To_Rename", Flag247 (Id));
8214 W ("OK_To_Reorder_Components", Flag239 (Id));
8215 W ("Optimize_Alignment_Space", Flag241 (Id));
8216 W ("Optimize_Alignment_Time", Flag242 (Id));
8217 W ("Overlays_Constant", Flag243 (Id));
8218 W ("Reachable", Flag49 (Id));
8219 W ("Referenced", Flag156 (Id));
8220 W ("Referenced_As_LHS", Flag36 (Id));
8221 W ("Referenced_As_Out_Parameter", Flag227 (Id));
8222 W ("Renamed_In_Spec", Flag231 (Id));
8223 W ("Requires_Overriding", Flag213 (Id));
8224 W ("Return_Present", Flag54 (Id));
8225 W ("Returns_By_Ref", Flag90 (Id));
8226 W ("Reverse_Bit_Order", Flag164 (Id));
8227 W ("Reverse_Storage_Order", Flag93 (Id));
8228 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
8229 W ("Size_Depends_On_Discriminant", Flag177 (Id));
8230 W ("Size_Known_At_Compile_Time", Flag92 (Id));
8231 W ("Static_Elaboration_Desired", Flag77 (Id));
8232 W ("Strict_Alignment", Flag145 (Id));
8233 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
8234 W ("Suppress_Initialization", Flag105 (Id));
8235 W ("Suppress_Style_Checks", Flag165 (Id));
8236 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
8237 W ("Treat_As_Volatile", Flag41 (Id));
8238 W ("Universal_Aliasing", Flag216 (Id));
8239 W ("Used_As_Generic_Actual", Flag222 (Id));
8240 W ("Uses_Sec_Stack", Flag95 (Id));
8241 W ("Warnings_Off", Flag96 (Id));
8242 W ("Warnings_Off_Used", Flag236 (Id));
8243 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
8244 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
8245 W ("Was_Hidden", Flag196 (Id));
8246 end Write_Entity_Flags;
8248 -----------------------
8249 -- Write_Entity_Info --
8250 -----------------------
8252 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
8254 procedure Write_Attribute (Which : String; Nam : E);
8255 -- Write attribute value with given string name
8257 procedure Write_Kind (Id : Entity_Id);
8258 -- Write Ekind field of entity
8260 ---------------------
8261 -- Write_Attribute --
8262 ---------------------
8264 procedure Write_Attribute (Which : String; Nam : E) is
8268 Write_Int (Int (Nam));
8270 Write_Name (Chars (Nam));
8272 end Write_Attribute;
8278 procedure Write_Kind (Id : Entity_Id) is
8279 K : constant String := Entity_Kind'Image (Ekind (Id));
8283 Write_Str (" Kind ");
8285 if Is_Type (Id) and then Is_Tagged_Type (Id) then
8286 Write_Str ("TAGGED ");
8289 Write_Str (K (3 .. K'Length));
8292 if Is_Type (Id) and then Depends_On_Private (Id) then
8293 Write_Str ("Depends_On_Private ");
8297 -- Start of processing for Write_Entity_Info
8301 Write_Attribute ("Name ", Id);
8302 Write_Int (Int (Id));
8306 Write_Attribute (" Type ", Etype (Id));
8308 Write_Attribute (" Scope ", Scope (Id));
8313 when Discrete_Kind =>
8314 Write_Str ("Bounds: Id = ");
8316 if Present (Scalar_Range (Id)) then
8317 Write_Int (Int (Type_Low_Bound (Id)));
8318 Write_Str (" .. Id = ");
8319 Write_Int (Int (Type_High_Bound (Id)));
8321 Write_Str ("Empty");
8332 (" Component Type ", Component_Type (Id));
8335 Write_Str (" Indexes ");
8337 Index := First_Index (Id);
8338 while Present (Index) loop
8339 Write_Attribute (" ", Etype (Index));
8340 Index := Next_Index (Index);
8348 (" Directly Designated Type ",
8349 Directly_Designated_Type (Id));
8352 when Overloadable_Kind =>
8353 if Present (Homonym (Id)) then
8354 Write_Str (" Homonym ");
8355 Write_Name (Chars (Homonym (Id)));
8357 Write_Int (Int (Homonym (Id)));
8364 if Ekind (Scope (Id)) in Record_Kind then
8366 " Original_Record_Component ",
8367 Original_Record_Component (Id));
8368 Write_Int (Int (Original_Record_Component (Id)));
8372 when others => null;
8374 end Write_Entity_Info;
8376 -----------------------
8377 -- Write_Field6_Name --
8378 -----------------------
8380 procedure Write_Field6_Name (Id : Entity_Id) is
8381 pragma Warnings (Off, Id);
8383 Write_Str ("First_Rep_Item");
8384 end Write_Field6_Name;
8386 -----------------------
8387 -- Write_Field7_Name --
8388 -----------------------
8390 procedure Write_Field7_Name (Id : Entity_Id) is
8391 pragma Warnings (Off, Id);
8393 Write_Str ("Freeze_Node");
8394 end Write_Field7_Name;
8396 -----------------------
8397 -- Write_Field8_Name --
8398 -----------------------
8400 procedure Write_Field8_Name (Id : Entity_Id) is
8404 Write_Str ("Associated_Node_For_Itype");
8407 Write_Str ("Dependent_Instances");
8410 Write_Str ("First_Exit_Statement");
8413 Write_Str ("Hiding_Loop_Variable");
8417 E_Subprogram_Body =>
8418 Write_Str ("Mechanism");
8422 Write_Str ("Normalized_First_Bit");
8425 Write_Str ("Postcondition_Proc");
8427 when E_Abstract_State =>
8428 Write_Str ("Refinement_Constituents");
8430 when E_Return_Statement =>
8431 Write_Str ("Return_Applies_To");
8434 Write_Str ("Field8??");
8436 end Write_Field8_Name;
8438 -----------------------
8439 -- Write_Field9_Name --
8440 -----------------------
8442 procedure Write_Field9_Name (Id : Entity_Id) is
8446 Write_Str ("Class_Wide_Type");
8449 Write_Str ("Current_Value");
8452 E_Generic_Function |
8454 E_Generic_Procedure |
8457 Write_Str ("Renaming_Map");
8460 Write_Str ("Field9??");
8462 end Write_Field9_Name;
8464 ------------------------
8465 -- Write_Field10_Name --
8466 ------------------------
8468 procedure Write_Field10_Name (Id : Entity_Id) is
8471 when Class_Wide_Kind |
8477 Write_Str ("Direct_Primitive_Operations");
8480 Write_Str ("Float_Rep");
8482 when E_In_Parameter |
8484 Write_Str ("Discriminal_Link");
8490 Write_Str ("Handler_Records");
8494 Write_Str ("Normalized_Position_Max");
8496 when E_Abstract_State |
8498 Write_Str ("Refined_State");
8501 Write_Str ("Field10??");
8503 end Write_Field10_Name;
8505 ------------------------
8506 -- Write_Field11_Name --
8507 ------------------------
8509 procedure Write_Field11_Name (Id : Entity_Id) is
8513 Write_Str ("Block_Node");
8517 Write_Str ("Component_Bit_Offset");
8520 Write_Str ("Entry_Component");
8522 when E_Enumeration_Literal =>
8523 Write_Str ("Enumeration_Pos");
8527 Write_Str ("Full_View");
8529 when E_Generic_Package =>
8530 Write_Str ("Generic_Homonym");
8536 Write_Str ("Protected_Body_Subprogram");
8539 Write_Str ("Field11??");
8541 end Write_Field11_Name;
8543 ------------------------
8544 -- Write_Field12_Name --
8545 ------------------------
8547 procedure Write_Field12_Name (Id : Entity_Id) is
8551 Write_Str ("Associated_Formal_Package");
8554 Write_Str ("Barrier_Function");
8556 when E_Enumeration_Literal =>
8557 Write_Str ("Enumeration_Rep");
8565 E_In_Out_Parameter |
8569 Write_Str ("Esize");
8573 Write_Str ("Next_Inlined_Subprogram");
8576 Write_Str ("Field12??");
8578 end Write_Field12_Name;
8580 ------------------------
8581 -- Write_Field13_Name --
8582 ------------------------
8584 procedure Write_Field13_Name (Id : Entity_Id) is
8589 Write_Str ("Component_Clause");
8592 Write_Str ("Elaboration_Entity");
8596 Generic_Unit_Kind =>
8597 Write_Str ("Elaboration_Entity");
8601 Write_Str ("Extra_Accessibility");
8604 Write_Str ("RM_Size");
8607 Write_Str ("Field13??");
8609 end Write_Field13_Name;
8611 -----------------------
8612 -- Write_Field14_Name --
8613 -----------------------
8615 procedure Write_Field14_Name (Id : Entity_Id) is
8624 Write_Str ("Alignment");
8628 Write_Str ("First_Optional_Parameter");
8632 Write_Str ("Normalized_Position");
8635 E_Generic_Package =>
8636 Write_Str ("Shadow_Entities");
8639 Write_Str ("Field14??");
8641 end Write_Field14_Name;
8643 ------------------------
8644 -- Write_Field15_Name --
8645 ------------------------
8647 procedure Write_Field15_Name (Id : Entity_Id) is
8650 when E_Discriminant =>
8651 Write_Str ("Discriminant_Number");
8654 Write_Str ("DT_Entry_Count");
8658 Write_Str ("DT_Position");
8660 when E_Protected_Type =>
8661 Write_Str ("Entry_Bodies_Array");
8664 Write_Str ("Entry_Parameters_Type");
8667 Write_Str ("Extra_Formal");
8669 when Enumeration_Kind =>
8670 Write_Str ("Lit_Indexes");
8674 Write_Str ("Related_Instance");
8676 when Decimal_Fixed_Point_Kind =>
8677 Write_Str ("Scale_Value");
8681 Write_Str ("Status_Flag_Or_Transient_Decl");
8685 Write_Str ("Storage_Size_Variable");
8687 when E_String_Literal_Subtype =>
8688 Write_Str ("String_Literal_Low_Bound");
8691 Write_Str ("Field15??");
8693 end Write_Field15_Name;
8695 ------------------------
8696 -- Write_Field16_Name --
8697 ------------------------
8699 procedure Write_Field16_Name (Id : Entity_Id) is
8702 when E_Record_Type |
8703 E_Record_Type_With_Private =>
8704 Write_Str ("Access_Disp_Table");
8706 when E_Abstract_State =>
8707 Write_Str ("Body_References");
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_Abstract_State |
8794 E_Incomplete_Type =>
8795 Write_Str ("Non_Limited_View");
8797 when E_Incomplete_Subtype =>
8798 if From_Limited_With (Id) then
8799 Write_Str ("Non_Limited_View");
8803 Write_Str ("Prival");
8806 Write_Str ("Field17??");
8808 end Write_Field17_Name;
8810 ------------------------
8811 -- Write_Field18_Name --
8812 ------------------------
8814 procedure Write_Field18_Name (Id : Entity_Id) is
8817 when E_Enumeration_Literal |
8821 Write_Str ("Alias");
8823 when E_Record_Type =>
8824 Write_Str ("Corresponding_Concurrent_Type");
8826 when E_Subprogram_Body =>
8827 Write_Str ("Corresponding_Protected_Entry");
8829 when Concurrent_Kind =>
8830 Write_Str ("Corresponding_Record_Type");
8835 Write_Str ("Enclosing_Scope");
8837 when E_Entry_Index_Parameter =>
8838 Write_Str ("Entry_Index_Constant");
8840 when E_Class_Wide_Subtype |
8841 E_Access_Protected_Subprogram_Type |
8842 E_Anonymous_Access_Protected_Subprogram_Type |
8843 E_Access_Subprogram_Type |
8845 Write_Str ("Equivalent_Type");
8847 when Fixed_Point_Kind =>
8848 Write_Str ("Delta_Value");
8850 when Incomplete_Or_Private_Kind |
8852 Write_Str ("Private_Dependents");
8855 Write_Str ("Renamed_Object");
8859 E_Generic_Function |
8860 E_Generic_Procedure |
8861 E_Generic_Package =>
8862 Write_Str ("Renamed_Entity");
8865 Write_Str ("Field18??");
8867 end Write_Field18_Name;
8869 -----------------------
8870 -- Write_Field19_Name --
8871 -----------------------
8873 procedure Write_Field19_Name (Id : Entity_Id) is
8877 E_Generic_Package =>
8878 Write_Str ("Body_Entity");
8880 when E_Discriminant =>
8881 Write_Str ("Corresponding_Discriminant");
8884 Write_Str ("Default_Aspect_Value");
8886 when E_Array_Type =>
8887 Write_Str ("Default_Component_Value");
8889 when E_Record_Type =>
8890 Write_Str ("Parent_Subtype");
8894 Write_Str ("Size_Check_Code");
8896 when E_Package_Body |
8898 Write_Str ("Spec_Entity");
8900 when Private_Kind =>
8901 Write_Str ("Underlying_Full_View");
8903 when E_Function | E_Operator | E_Subprogram_Type =>
8904 Write_Str ("Extra_Accessibility_Of_Result");
8907 Write_Str ("Field19??");
8909 end Write_Field19_Name;
8911 -----------------------
8912 -- Write_Field20_Name --
8913 -----------------------
8915 procedure Write_Field20_Name (Id : Entity_Id) is
8919 Write_Str ("Component_Type");
8921 when E_In_Parameter |
8922 E_Generic_In_Parameter =>
8923 Write_Str ("Default_Value");
8926 Write_Str ("Directly_Designated_Type");
8929 Write_Str ("Discriminant_Checking_Func");
8931 when E_Discriminant =>
8932 Write_Str ("Discriminant_Default_Value");
8941 E_Generic_Function |
8943 E_Generic_Procedure |
8951 E_Return_Statement |
8953 E_Subprogram_Type =>
8954 Write_Str ("Last_Entity");
8958 Write_Str ("Prival_Link");
8961 Write_Str ("Scalar_Range");
8964 Write_Str ("Register_Exception_Call");
8967 Write_Str ("Field20??");
8969 end Write_Field20_Name;
8971 -----------------------
8972 -- Write_Field21_Name --
8973 -----------------------
8975 procedure Write_Field21_Name (Id : Entity_Id) is
8979 Write_Str ("Accept_Address");
8981 when E_In_Parameter =>
8982 Write_Str ("Default_Expr_Function");
8984 when Concurrent_Kind |
8985 Incomplete_Or_Private_Kind |
8989 Write_Str ("Discriminant_Constraint");
8994 E_Generic_Function |
8996 E_Generic_Procedure |
8998 Write_Str ("Interface_Name");
9001 Modular_Integer_Kind =>
9002 Write_Str ("Original_Array_Type");
9004 when Fixed_Point_Kind =>
9005 Write_Str ("Small_Value");
9008 Write_Str ("Field21??");
9010 end Write_Field21_Name;
9012 -----------------------
9013 -- Write_Field22_Name --
9014 -----------------------
9016 procedure Write_Field22_Name (Id : Entity_Id) is
9020 Write_Str ("Associated_Storage_Pool");
9023 Write_Str ("Component_Size");
9025 when E_Record_Type =>
9026 Write_Str ("Corresponding_Remote_Type");
9030 Write_Str ("Original_Record_Component");
9032 when E_Enumeration_Literal =>
9033 Write_Str ("Enumeration_Rep_Expr");
9036 Write_Str ("Exception_Code");
9038 when E_Record_Type_With_Private |
9039 E_Record_Subtype_With_Private |
9042 E_Limited_Private_Type |
9043 E_Limited_Private_Subtype =>
9044 Write_Str ("Private_View");
9047 Write_Str ("Protected_Formal");
9057 E_Generic_Function |
9058 E_Generic_Procedure |
9061 E_Return_Statement |
9064 Write_Str ("Scope_Depth_Value");
9067 Write_Str ("Shared_Var_Procs_Instance");
9070 Write_Str ("Field22??");
9072 end Write_Field22_Name;
9074 ------------------------
9075 -- Write_Field23_Name --
9076 ------------------------
9078 procedure Write_Field23_Name (Id : Entity_Id) is
9081 when E_Discriminant =>
9082 Write_Str ("CR_Discriminant");
9085 Write_Str ("Entry_Cancel_Parameter");
9087 when E_Enumeration_Type =>
9088 Write_Str ("Enum_Pos_To_Rep");
9092 Write_Str ("Extra_Constrained");
9095 Write_Str ("Finalization_Master");
9097 when E_Generic_Function |
9099 E_Generic_Procedure =>
9100 Write_Str ("Inner_Instances");
9103 Write_Str ("Packed_Array_Type");
9106 Write_Str ("Protection_Object");
9108 when Concurrent_Kind |
9109 Incomplete_Or_Private_Kind |
9113 Write_Str ("Stored_Constraint");
9117 if Present (Scope (Id))
9118 and then Is_Protected_Type (Scope (Id))
9120 Write_Str ("Protection_Object");
9122 Write_Str ("Generic_Renamings");
9126 if Is_Generic_Instance (Id) then
9127 Write_Str ("Generic_Renamings");
9129 Write_Str ("Limited_View");
9133 Write_Str ("Field23??");
9135 end Write_Field23_Name;
9137 ------------------------
9138 -- Write_Field24_Name --
9139 ------------------------
9141 procedure Write_Field24_Name (Id : Entity_Id) is
9147 Write_Str ("Related_Expression");
9155 Generic_Subprogram_Kind |
9157 Write_Str ("Contract");
9160 Write_Str ("Field24???");
9162 end Write_Field24_Name;
9164 ------------------------
9165 -- Write_Field25_Name --
9166 ------------------------
9168 procedure Write_Field25_Name (Id : Entity_Id) is
9172 Write_Str ("Abstract_States");
9175 Write_Str ("Debug_Renaming_Link");
9178 Write_Str ("DT_Offset_To_Top_Func");
9182 Write_Str ("Interface_Alias");
9184 when E_Record_Type |
9186 E_Record_Type_With_Private |
9187 E_Record_Subtype_With_Private =>
9188 Write_Str ("Interfaces");
9192 Write_Str ("Related_Array_Object");
9195 Write_Str ("Task_Body_Procedure");
9199 Write_Str ("PPC_Wrapper");
9201 when E_Enumeration_Subtype |
9202 E_Modular_Integer_Subtype |
9203 E_Signed_Integer_Subtype =>
9204 Write_Str ("Static_Predicate");
9207 Write_Str ("Field25??");
9209 end Write_Field25_Name;
9211 ------------------------
9212 -- Write_Field26_Name --
9213 ------------------------
9215 procedure Write_Field26_Name (Id : Entity_Id) is
9218 when E_Record_Type |
9219 E_Record_Type_With_Private =>
9220 Write_Str ("Dispatch_Table_Wrappers");
9222 when E_In_Out_Parameter |
9225 Write_Str ("Last_Assignment");
9227 when E_Access_Subprogram_Type =>
9228 Write_Str ("Original_Access_Type");
9230 when E_Generic_Package |
9232 Write_Str ("Package_Instantiation");
9236 Write_Str ("Related_Type");
9239 Write_Str ("Relative_Deadline_Variable");
9243 Write_Str ("Overridden_Operation");
9246 Write_Str ("Field26??");
9248 end Write_Field26_Name;
9250 ------------------------
9251 -- Write_Field27_Name --
9252 ------------------------
9254 procedure Write_Field27_Name (Id : Entity_Id) is
9259 Write_Str ("Current_Use_Clause");
9264 Write_Str ("Related_Type");
9268 Write_Str ("Wrapped_Entity");
9271 Write_Str ("Field27??");
9273 end Write_Field27_Name;
9275 ------------------------
9276 -- Write_Field28_Name --
9277 ------------------------
9279 procedure Write_Field28_Name (Id : Entity_Id) is
9287 E_Subprogram_Type =>
9288 Write_Str ("Extra_Formals");
9292 Write_Str ("Finalizer");
9296 Write_Str ("Initialization_Statements");
9298 when E_Record_Type =>
9299 Write_Str ("Underlying_Record_View");
9302 Write_Str ("Field28??");
9304 end Write_Field28_Name;
9306 ------------------------
9307 -- Write_Field29_Name --
9308 ------------------------
9310 procedure Write_Field29_Name (Id : Entity_Id) is
9314 Write_Str ("Subprograms_For_Type");
9317 Write_Str ("Field29??");
9319 end Write_Field29_Name;
9321 ------------------------
9322 -- Write_Field30_Name --
9323 ------------------------
9325 procedure Write_Field30_Name (Id : Entity_Id) is
9329 Write_Str ("Corresponding_Equality");
9332 Write_Str ("Static_Initialization");
9335 Write_Str ("Field30??");
9337 end Write_Field30_Name;
9339 ------------------------
9340 -- Write_Field31_Name --
9341 ------------------------
9343 procedure Write_Field31_Name (Id : Entity_Id) is
9348 Write_Str ("Thunk_Entity");
9351 Write_Str ("Field31??");
9353 end Write_Field31_Name;
9355 ------------------------
9356 -- Write_Field32_Name --
9357 ------------------------
9359 procedure Write_Field32_Name (Id : Entity_Id) is
9363 E_Generic_Function |
9365 E_Generic_Procedure |
9369 E_Subprogram_Body =>
9370 Write_Str ("SPARK_Mode_Pragmas");
9373 Write_Str ("Field32??");
9375 end Write_Field32_Name;
9377 ------------------------
9378 -- Write_Field33_Name --
9379 ------------------------
9381 procedure Write_Field33_Name (Id : Entity_Id) is
9385 Write_Str ("Field33??");
9387 end Write_Field33_Name;
9389 ------------------------
9390 -- Write_Field34_Name --
9391 ------------------------
9393 procedure Write_Field34_Name (Id : Entity_Id) is
9397 Write_Str ("Field34??");
9399 end Write_Field34_Name;
9401 ------------------------
9402 -- Write_Field35_Name --
9403 ------------------------
9405 procedure Write_Field35_Name (Id : Entity_Id) is
9409 Write_Str ("Field35??");
9411 end Write_Field35_Name;
9413 -------------------------
9414 -- Iterator Procedures --
9415 -------------------------
9417 procedure Proc_Next_Component (N : in out Node_Id) is
9419 N := Next_Component (N);
9420 end Proc_Next_Component;
9422 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
9424 N := Next_Entity (N);
9425 while Present (N) loop
9426 exit when Ekind_In (N, E_Component, E_Discriminant);
9427 N := Next_Entity (N);
9429 end Proc_Next_Component_Or_Discriminant;
9431 procedure Proc_Next_Discriminant (N : in out Node_Id) is
9433 N := Next_Discriminant (N);
9434 end Proc_Next_Discriminant;
9436 procedure Proc_Next_Formal (N : in out Node_Id) is
9438 N := Next_Formal (N);
9439 end Proc_Next_Formal;
9441 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
9443 N := Next_Formal_With_Extras (N);
9444 end Proc_Next_Formal_With_Extras;
9446 procedure Proc_Next_Index (N : in out Node_Id) is
9448 N := Next_Index (N);
9449 end Proc_Next_Index;
9451 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
9453 N := Next_Inlined_Subprogram (N);
9454 end Proc_Next_Inlined_Subprogram;
9456 procedure Proc_Next_Literal (N : in out Node_Id) is
9458 N := Next_Literal (N);
9459 end Proc_Next_Literal;
9461 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
9463 N := Next_Stored_Discriminant (N);
9464 end Proc_Next_Stored_Discriminant;