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 -- Refined_State_Pragma Node8
84 -- Refinement_Constituents Elist8
85 -- Return_Applies_To Node8
86 -- First_Exit_Statement Node8
88 -- Class_Wide_Type Node9
89 -- Current_Value Node9
92 -- Direct_Primitive_Operations Elist10
93 -- Discriminal_Link Node10
94 -- Float_Rep Uint10 (but returns Float_Rep_Kind)
95 -- Handler_Records List10
96 -- Normalized_Position_Max Uint10
97 -- Refined_State Node10
99 -- Component_Bit_Offset Uint11
101 -- Entry_Component Node11
102 -- Enumeration_Pos Uint11
103 -- Generic_Homonym Node11
104 -- Protected_Body_Subprogram Node11
107 -- Barrier_Function Node12
108 -- Enumeration_Rep Uint12
110 -- Next_Inlined_Subprogram Node12
112 -- Component_Clause Node13
113 -- Elaboration_Entity Node13
114 -- Extra_Accessibility Node13
118 -- First_Optional_Parameter Node14
119 -- Normalized_Position Uint14
120 -- Shadow_Entities List14
122 -- Discriminant_Number Uint15
123 -- DT_Position Uint15
124 -- DT_Entry_Count Uint15
125 -- Entry_Bodies_Array Node15
126 -- Entry_Parameters_Type Node15
127 -- Extra_Formal Node15
128 -- Lit_Indexes Node15
129 -- Related_Instance Node15
130 -- Status_Flag_Or_Transient_Decl Node15
131 -- Scale_Value Uint15
132 -- Storage_Size_Variable Node15
133 -- String_Literal_Low_Bound Node15
135 -- Access_Disp_Table 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
217 -- Related_Expression Node24
220 -- Interface_Alias Node25
221 -- Interfaces Elist25
222 -- Debug_Renaming_Link Node25
223 -- DT_Offset_To_Top_Func Node25
224 -- PPC_Wrapper Node25
225 -- Related_Array_Object Node25
226 -- Static_Predicate List25
227 -- Task_Body_Procedure Node25
229 -- Dispatch_Table_Wrappers Elist26
230 -- Last_Assignment Node26
231 -- Original_Access_Type Node26
232 -- Overridden_Operation Node26
233 -- Package_Instantiation Node26
234 -- Relative_Deadline_Variable Node26
236 -- Current_Use_Clause Node27
237 -- Related_Type Node27
238 -- Wrapped_Entity Node27
240 -- Extra_Formals Node28
241 -- Initialization_Statements Node28
242 -- Underlying_Record_View Node28
244 -- Subprograms_For_Type Node29
246 -- Corresponding_Equality Node30
247 -- Static_Initialization Node30
249 -- Thunk_Entity Node31
251 -- SPARK_Mode_Pragmas Node32
259 ---------------------------------------------
260 -- Usage of Flags in Defining Entity Nodes --
261 ---------------------------------------------
263 -- All flags are unique, there is no overlaying, so each flag is physically
264 -- present in every entity. However, for many of the flags, it only makes
265 -- sense for them to be set true for certain subsets of entity kinds. See
266 -- the spec of Einfo for further details.
268 -- Note: Flag1-Flag3 are not used, for historical reasons
271 -- Has_Discriminants Flag5
272 -- Is_Dispatching_Operation Flag6
273 -- Is_Immediately_Visible Flag7
275 -- Is_Potentially_Use_Visible Flag9
279 -- Is_Constrained Flag12
280 -- Is_Generic_Type Flag13
281 -- Depends_On_Private Flag14
283 -- Is_Volatile Flag16
284 -- Is_Internal Flag17
285 -- Has_Delayed_Freeze Flag18
286 -- Is_Abstract_Subprogram Flag19
287 -- Is_Concurrent_Record_Type Flag20
289 -- Has_Master_Entity Flag21
290 -- Needs_No_Actuals Flag22
291 -- Has_Storage_Size_Clause Flag23
292 -- Is_Imported Flag24
293 -- Is_Limited_Record Flag25
294 -- Has_Completion Flag26
295 -- Has_Pragma_Controlled Flag27
296 -- Is_Statically_Allocated Flag28
297 -- Has_Size_Clause Flag29
300 -- Checks_May_Be_Suppressed Flag31
301 -- Kill_Elaboration_Checks Flag32
302 -- Kill_Range_Checks Flag33
303 -- Has_Independent_Components Flag34
304 -- Is_Class_Wide_Equivalent_Type Flag35
305 -- Referenced_As_LHS Flag36
306 -- Is_Known_Non_Null Flag37
307 -- Can_Never_Be_Null Flag38
308 -- Has_Default_Aspect Flag39
309 -- Body_Needed_For_SAL Flag40
311 -- Treat_As_Volatile Flag41
312 -- Is_Controlled Flag42
313 -- Has_Controlled_Component Flag43
315 -- In_Private_Part Flag45
316 -- Has_Alignment_Clause Flag46
318 -- In_Package_Body Flag48
320 -- Delay_Subprogram_Descriptors Flag50
323 -- Is_Entry_Formal Flag52
324 -- Is_Private_Descendant Flag53
325 -- Return_Present Flag54
326 -- Is_Tagged_Type Flag55
327 -- Has_Homonym Flag56
329 -- Non_Binary_Modulus Flag58
330 -- Is_Preelaborated Flag59
331 -- Is_Shared_Passive Flag60
333 -- Is_Remote_Types Flag61
334 -- Is_Remote_Call_Interface Flag62
335 -- Is_Character_Type Flag63
336 -- Is_Intrinsic_Subprogram Flag64
337 -- Has_Record_Rep_Clause Flag65
338 -- Has_Enumeration_Rep_Clause Flag66
339 -- Has_Small_Clause Flag67
340 -- Has_Component_Size_Clause Flag68
341 -- Is_Access_Constant Flag69
342 -- Is_First_Subtype Flag70
344 -- Has_Completion_In_Body Flag71
345 -- Has_Unknown_Discriminants Flag72
346 -- Is_Child_Unit Flag73
347 -- Is_CPP_Class Flag74
348 -- Has_Non_Standard_Rep Flag75
349 -- Is_Constructor Flag76
350 -- Static_Elaboration_Desired Flag77
352 -- Has_All_Calls_Remote Flag79
353 -- Is_Constr_Subt_For_U_Nominal Flag80
355 -- Is_Asynchronous Flag81
356 -- Has_Gigi_Rep_Item Flag82
357 -- Has_Machine_Radix_Clause Flag83
358 -- Machine_Radix_10 Flag84
360 -- Has_Atomic_Components Flag86
361 -- Has_Volatile_Components Flag87
362 -- Discard_Names Flag88
363 -- Is_Interrupt_Handler Flag89
364 -- Returns_By_Ref Flag90
367 -- Size_Known_At_Compile_Time Flag92
368 -- Reverse_Storage_Order Flag93
369 -- Is_Generic_Actual_Type Flag94
370 -- Uses_Sec_Stack Flag95
371 -- Warnings_Off Flag96
372 -- Is_Controlling_Formal Flag97
373 -- Has_Controlling_Result Flag98
374 -- Is_Exported Flag99
375 -- Has_Specified_Layout Flag100
377 -- Has_Nested_Block_With_Handler Flag101
379 -- Is_Completely_Hidden Flag103
380 -- Address_Taken Flag104
381 -- Suppress_Initialization Flag105
382 -- Is_Limited_Composite Flag106
383 -- Is_Private_Composite Flag107
384 -- Default_Expressions_Processed Flag108
385 -- Is_Non_Static_Subtype Flag109
386 -- Has_External_Tag_Rep_Clause Flag110
388 -- Is_Formal_Subprogram Flag111
389 -- Is_Renaming_Of_Object Flag112
391 -- Delay_Cleanups Flag114
392 -- Never_Set_In_Source Flag115
393 -- Is_Visible_Lib_Unit Flag116
394 -- Is_Unchecked_Union Flag117
395 -- Is_For_Access_Subtype Flag118
396 -- Has_Convention_Pragma Flag119
397 -- Has_Primitive_Operations Flag120
399 -- Has_Pragma_Pack Flag121
400 -- Is_Bit_Packed_Array Flag122
401 -- Has_Unchecked_Union Flag123
402 -- Is_Eliminated Flag124
403 -- C_Pass_By_Copy Flag125
404 -- Is_Instantiated Flag126
405 -- Is_Valued_Procedure Flag127
406 -- (used for Component_Alignment) Flag128
407 -- (used for Component_Alignment) Flag129
408 -- Is_Generic_Instance Flag130
410 -- No_Pool_Assigned Flag131
411 -- Is_AST_Entry Flag132
412 -- Is_VMS_Exception Flag133
413 -- Is_Optional_Parameter Flag134
414 -- Has_Aliased_Components Flag135
415 -- No_Strict_Aliasing Flag136
416 -- Is_Machine_Code_Subprogram Flag137
417 -- Is_Packed_Array_Type Flag138
418 -- Has_Biased_Representation Flag139
419 -- Has_Complex_Representation Flag140
421 -- Is_Constr_Subt_For_UN_Aliased Flag141
422 -- Has_Missing_Return Flag142
423 -- Has_Recursive_Call Flag143
424 -- Is_Unsigned_Type Flag144
425 -- Strict_Alignment Flag145
426 -- Is_Abstract_Type Flag146
427 -- Needs_Debug_Info Flag147
428 -- Suppress_Elaboration_Warnings Flag148
429 -- Is_Compilation_Unit Flag149
430 -- Has_Pragma_Elaborate_Body Flag150
432 -- Has_Private_Ancestor Flag151
433 -- Entry_Accepted Flag152
434 -- Is_Obsolescent Flag153
435 -- Has_Per_Object_Constraint Flag154
436 -- Has_Private_Declaration Flag155
437 -- Referenced Flag156
438 -- Has_Pragma_Inline Flag157
439 -- Finalize_Storage_Only Flag158
440 -- From_With_Type Flag159
441 -- Is_Package_Body_Entity Flag160
443 -- Has_Qualified_Name Flag161
444 -- Nonzero_Is_True Flag162
445 -- Is_True_Constant Flag163
446 -- Reverse_Bit_Order Flag164
447 -- Suppress_Style_Checks Flag165
448 -- Debug_Info_Off Flag166
449 -- Sec_Stack_Needed_For_Return Flag167
450 -- Materialize_Entity Flag168
451 -- Has_Pragma_Thread_Local_Storage Flag169
452 -- Is_Known_Valid Flag170
454 -- Is_Hidden_Open_Scope Flag171
455 -- Has_Object_Size_Clause Flag172
456 -- Has_Fully_Qualified_Name Flag173
457 -- Elaboration_Entity_Required Flag174
458 -- Has_Forward_Instantiation Flag175
459 -- Is_Discrim_SO_Function Flag176
460 -- Size_Depends_On_Discriminant Flag177
461 -- Is_Null_Init_Proc Flag178
462 -- Has_Pragma_Pure_Function Flag179
463 -- Has_Pragma_Unreferenced Flag180
465 -- Has_Contiguous_Rep Flag181
466 -- Has_Xref_Entry Flag182
467 -- Must_Be_On_Byte_Boundary Flag183
468 -- Has_Stream_Size_Clause Flag184
469 -- Is_Ada_2005_Only Flag185
470 -- Is_Interface Flag186
471 -- Has_Constrained_Partial_View Flag187
472 -- Uses_Lock_Free Flag188
473 -- Is_Pure_Unit_Access_Type Flag189
474 -- Has_Specified_Stream_Input Flag190
476 -- Has_Specified_Stream_Output Flag191
477 -- Has_Specified_Stream_Read Flag192
478 -- Has_Specified_Stream_Write Flag193
479 -- Is_Local_Anonymous_Access Flag194
480 -- Is_Primitive_Wrapper Flag195
481 -- Was_Hidden Flag196
482 -- Is_Limited_Interface Flag197
483 -- Has_Pragma_Ordered Flag198
484 -- Is_Ada_2012_Only Flag199
486 -- Has_Delayed_Aspects Flag200
487 -- Has_Pragma_No_Inline Flag201
488 -- Itype_Printed Flag202
489 -- Has_Pragma_Pure Flag203
490 -- Is_Known_Null Flag204
491 -- Low_Bound_Tested Flag205
492 -- Is_Visible_Formal Flag206
493 -- Known_To_Have_Preelab_Init Flag207
494 -- Must_Have_Preelab_Init Flag208
495 -- Is_Return_Object Flag209
496 -- Elaborate_Body_Desirable Flag210
498 -- Has_Static_Discriminants Flag211
499 -- Has_Pragma_Unreferenced_Objects Flag212
500 -- Requires_Overriding Flag213
502 -- Has_Up_Level_Access Flag215
503 -- Universal_Aliasing Flag216
504 -- Suppress_Value_Tracking_On_Call Flag217
505 -- Is_Primitive Flag218
506 -- Has_Initial_Value Flag219
507 -- Has_Dispatch_Table Flag220
509 -- Has_Pragma_Preelab_Init Flag221
510 -- Used_As_Generic_Actual Flag222
511 -- Is_Descendent_Of_Address Flag223
514 -- Is_Only_Out_Parameter Flag226
515 -- Referenced_As_Out_Parameter Flag227
516 -- Has_Thunks Flag228
517 -- Can_Use_Internal_Rep Flag229
518 -- Has_Pragma_Inline_Always Flag230
520 -- Renamed_In_Spec Flag231
521 -- Has_Invariants Flag232
522 -- Has_Pragma_Unmodified Flag233
523 -- Is_Dispatch_Table_Entity Flag234
524 -- Is_Trivial_Subprogram Flag235
525 -- Warnings_Off_Used Flag236
526 -- Warnings_Off_Used_Unmodified Flag237
527 -- Warnings_Off_Used_Unreferenced Flag238
528 -- OK_To_Reorder_Components Flag239
529 -- Has_Postconditions Flag240
531 -- Optimize_Alignment_Space Flag241
532 -- Optimize_Alignment_Time Flag242
533 -- Overlays_Constant Flag243
534 -- Is_RACW_Stub_Type Flag244
535 -- Is_Private_Primitive Flag245
536 -- Is_Underlying_Record_View Flag246
537 -- OK_To_Rename Flag247
538 -- Has_Inheritable_Invariants Flag248
539 -- Is_Safe_To_Reevaluate Flag249
540 -- Has_Predicates Flag250
542 -- Has_Implicit_Dereference Flag251
543 -- Is_Processed_Transient Flag252
544 -- Has_Anonymous_Master Flag253
545 -- Is_Implementation_Defined Flag254
546 -- Is_Predicate_Function Flag255
547 -- Is_Predicate_Function_M Flag256
548 -- Is_Invariant_Procedure Flag257
549 -- Has_Dynamic_Predicate_Aspect Flag258
550 -- Has_Static_Predicate_Aspect Flag259
551 -- Has_Loop_Entry_Attributes Flag260
553 -- Has_Delayed_Rep_Aspects Flag261
554 -- May_Inherit_Delayed_Rep_Aspects Flag262
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 C_Pass_By_Copy (Id : E) return B is
739 pragma Assert (Is_Record_Type (Id));
740 return Flag125 (Implementation_Base_Type (Id));
743 function Can_Never_Be_Null (Id : E) return B is
746 end Can_Never_Be_Null;
748 function Checks_May_Be_Suppressed (Id : E) return B is
751 end Checks_May_Be_Suppressed;
753 function Class_Wide_Type (Id : E) return E is
755 pragma Assert (Is_Type (Id));
759 function Cloned_Subtype (Id : E) return E is
761 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
765 function Component_Bit_Offset (Id : E) return U is
767 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
769 end Component_Bit_Offset;
771 function Component_Clause (Id : E) return N is
773 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
775 end Component_Clause;
777 function Component_Size (Id : E) return U is
779 pragma Assert (Is_Array_Type (Id));
780 return Uint22 (Implementation_Base_Type (Id));
783 function Component_Type (Id : E) return E is
785 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
786 return Node20 (Implementation_Base_Type (Id));
789 function Corresponding_Concurrent_Type (Id : E) return E is
791 pragma Assert (Ekind (Id) = E_Record_Type);
793 end Corresponding_Concurrent_Type;
795 function Corresponding_Discriminant (Id : E) return E is
797 pragma Assert (Ekind (Id) = E_Discriminant);
799 end Corresponding_Discriminant;
801 function Corresponding_Equality (Id : E) return E is
804 (Ekind (Id) = E_Function
805 and then not Comes_From_Source (Id)
806 and then Chars (Id) = Name_Op_Ne);
808 end Corresponding_Equality;
810 function Corresponding_Protected_Entry (Id : E) return E is
812 pragma Assert (Ekind (Id) = E_Subprogram_Body);
814 end Corresponding_Protected_Entry;
816 function Corresponding_Record_Type (Id : E) return E is
818 pragma Assert (Is_Concurrent_Type (Id));
820 end Corresponding_Record_Type;
822 function Corresponding_Remote_Type (Id : E) return E is
825 end Corresponding_Remote_Type;
827 function Current_Use_Clause (Id : E) return E is
829 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
831 end Current_Use_Clause;
833 function Current_Value (Id : E) return N is
835 pragma Assert (Ekind (Id) in Object_Kind);
839 function CR_Discriminant (Id : E) return E is
844 function Debug_Info_Off (Id : E) return B is
849 function Debug_Renaming_Link (Id : E) return E is
852 end Debug_Renaming_Link;
854 function Default_Aspect_Component_Value (Id : E) return N is
856 pragma Assert (Is_Array_Type (Id));
858 end Default_Aspect_Component_Value;
860 function Default_Aspect_Value (Id : E) return N is
862 pragma Assert (Is_Scalar_Type (Id));
864 end Default_Aspect_Value;
866 function Default_Expr_Function (Id : E) return E is
868 pragma Assert (Is_Formal (Id));
870 end Default_Expr_Function;
872 function Default_Expressions_Processed (Id : E) return B is
875 end Default_Expressions_Processed;
877 function Default_Value (Id : E) return N is
879 pragma Assert (Is_Formal (Id));
883 function Delay_Cleanups (Id : E) return B is
888 function Delay_Subprogram_Descriptors (Id : E) return B is
891 end Delay_Subprogram_Descriptors;
893 function Delta_Value (Id : E) return R is
895 pragma Assert (Is_Fixed_Point_Type (Id));
899 function Dependent_Instances (Id : E) return L is
901 pragma Assert (Is_Generic_Instance (Id));
903 end Dependent_Instances;
905 function Depends_On_Private (Id : E) return B is
907 pragma Assert (Nkind (Id) in N_Entity);
909 end Depends_On_Private;
911 function Digits_Value (Id : E) return U is
914 (Is_Floating_Point_Type (Id)
915 or else Is_Decimal_Fixed_Point_Type (Id));
919 function Direct_Primitive_Operations (Id : E) return L is
921 pragma Assert (Is_Tagged_Type (Id));
923 end Direct_Primitive_Operations;
925 function Directly_Designated_Type (Id : E) return E is
927 pragma Assert (Is_Access_Type (Id));
929 end Directly_Designated_Type;
931 function Discard_Names (Id : E) return B is
936 function Discriminal (Id : E) return E is
938 pragma Assert (Ekind (Id) = E_Discriminant);
942 function Discriminal_Link (Id : E) return N is
945 end Discriminal_Link;
947 function Discriminant_Checking_Func (Id : E) return E is
949 pragma Assert (Ekind (Id) = E_Component);
951 end Discriminant_Checking_Func;
953 function Discriminant_Constraint (Id : E) return L is
955 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
957 end Discriminant_Constraint;
959 function Discriminant_Default_Value (Id : E) return N is
961 pragma Assert (Ekind (Id) = E_Discriminant);
963 end Discriminant_Default_Value;
965 function Discriminant_Number (Id : E) return U is
967 pragma Assert (Ekind (Id) = E_Discriminant);
969 end Discriminant_Number;
971 function Dispatch_Table_Wrappers (Id : E) return L is
973 pragma Assert (Ekind_In (Id, E_Record_Type,
975 return Elist26 (Implementation_Base_Type (Id));
976 end Dispatch_Table_Wrappers;
978 function DT_Entry_Count (Id : E) return U is
980 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
984 function DT_Offset_To_Top_Func (Id : E) return E is
986 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
988 end DT_Offset_To_Top_Func;
990 function DT_Position (Id : E) return U is
992 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
993 and then Present (DTC_Entity (Id)));
997 function DTC_Entity (Id : E) return E is
999 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1003 function Elaborate_Body_Desirable (Id : E) return B is
1005 pragma Assert (Ekind (Id) = E_Package);
1006 return Flag210 (Id);
1007 end Elaborate_Body_Desirable;
1009 function Elaboration_Entity (Id : E) return E is
1014 Ekind (Id) = E_Package
1016 Is_Generic_Unit (Id));
1018 end Elaboration_Entity;
1020 function Elaboration_Entity_Required (Id : E) return B is
1025 Ekind (Id) = E_Package
1027 Is_Generic_Unit (Id));
1028 return Flag174 (Id);
1029 end Elaboration_Entity_Required;
1031 function Enclosing_Scope (Id : E) return E is
1034 end Enclosing_Scope;
1036 function Entry_Accepted (Id : E) return B is
1038 pragma Assert (Is_Entry (Id));
1039 return Flag152 (Id);
1042 function Entry_Bodies_Array (Id : E) return E is
1045 end Entry_Bodies_Array;
1047 function Entry_Cancel_Parameter (Id : E) return E is
1050 end Entry_Cancel_Parameter;
1052 function Entry_Component (Id : E) return E is
1055 end Entry_Component;
1057 function Entry_Formal (Id : E) return E is
1062 function Entry_Index_Constant (Id : E) return N is
1064 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
1066 end Entry_Index_Constant;
1068 function Contract (Id : E) return N is
1071 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Subprogram_Body)
1072 or else Is_Subprogram (Id)
1073 or else Is_Generic_Subprogram (Id));
1077 function Entry_Parameters_Type (Id : E) return E is
1080 end Entry_Parameters_Type;
1082 function Enum_Pos_To_Rep (Id : E) return E is
1084 pragma Assert (Ekind (Id) = E_Enumeration_Type);
1086 end Enum_Pos_To_Rep;
1088 function Enumeration_Pos (Id : E) return Uint is
1090 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1092 end Enumeration_Pos;
1094 function Enumeration_Rep (Id : E) return U is
1096 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1098 end Enumeration_Rep;
1100 function Enumeration_Rep_Expr (Id : E) return N is
1102 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1104 end Enumeration_Rep_Expr;
1106 function Equivalent_Type (Id : E) return E is
1109 (Ekind_In (Id, E_Class_Wide_Type,
1110 E_Class_Wide_Subtype,
1111 E_Access_Protected_Subprogram_Type,
1112 E_Anonymous_Access_Protected_Subprogram_Type,
1113 E_Access_Subprogram_Type,
1116 end Equivalent_Type;
1118 function Esize (Id : E) return Uint is
1123 function Exception_Code (Id : E) return Uint is
1125 pragma Assert (Ekind (Id) = E_Exception);
1129 function Extra_Accessibility (Id : E) return E is
1132 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
1134 end Extra_Accessibility;
1136 function Extra_Accessibility_Of_Result (Id : E) return E is
1138 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
1140 end Extra_Accessibility_Of_Result;
1142 function Extra_Constrained (Id : E) return E is
1144 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1146 end Extra_Constrained;
1148 function Extra_Formal (Id : E) return E is
1153 function Extra_Formals (Id : E) return E is
1156 (Is_Overloadable (Id)
1157 or else Ekind_In (Id, E_Entry_Family,
1159 E_Subprogram_Type));
1163 function Can_Use_Internal_Rep (Id : E) return B is
1165 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1166 return Flag229 (Base_Type (Id));
1167 end Can_Use_Internal_Rep;
1169 function Finalization_Master (Id : E) return E is
1171 pragma Assert (Is_Access_Type (Id));
1172 return Node23 (Root_Type (Id));
1173 end Finalization_Master;
1175 function Finalize_Storage_Only (Id : E) return B is
1177 pragma Assert (Is_Type (Id));
1178 return Flag158 (Base_Type (Id));
1179 end Finalize_Storage_Only;
1181 function Finalizer (Id : E) return E is
1184 (Ekind (Id) = E_Package
1185 or else Ekind (Id) = E_Package_Body);
1189 function First_Entity (Id : E) return E is
1194 function First_Exit_Statement (Id : E) return N is
1196 pragma Assert (Ekind (Id) = E_Loop);
1198 end First_Exit_Statement;
1200 function First_Index (Id : E) return N is
1202 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1206 function First_Literal (Id : E) return E is
1208 pragma Assert (Is_Enumeration_Type (Id));
1212 function First_Optional_Parameter (Id : E) return E is
1214 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1216 end First_Optional_Parameter;
1218 function First_Private_Entity (Id : E) return E is
1220 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1221 or else Ekind (Id) in Concurrent_Kind);
1223 end First_Private_Entity;
1225 function First_Rep_Item (Id : E) return E is
1230 function Freeze_Node (Id : E) return N is
1235 function From_With_Type (Id : E) return B is
1237 return Flag159 (Id);
1240 function Full_View (Id : E) return E is
1242 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1246 function Generic_Homonym (Id : E) return E is
1248 pragma Assert (Ekind (Id) = E_Generic_Package);
1250 end Generic_Homonym;
1252 function Generic_Renamings (Id : E) return L is
1254 return Elist23 (Id);
1255 end Generic_Renamings;
1257 function Handler_Records (Id : E) return S is
1260 end Handler_Records;
1262 function Has_Aliased_Components (Id : E) return B is
1264 return Flag135 (Implementation_Base_Type (Id));
1265 end Has_Aliased_Components;
1267 function Has_Alignment_Clause (Id : E) return B is
1270 end Has_Alignment_Clause;
1272 function Has_All_Calls_Remote (Id : E) return B is
1275 end Has_All_Calls_Remote;
1277 function Has_Anonymous_Master (Id : E) return B is
1280 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
1281 return Flag253 (Id);
1282 end Has_Anonymous_Master;
1284 function Has_Atomic_Components (Id : E) return B is
1286 return Flag86 (Implementation_Base_Type (Id));
1287 end Has_Atomic_Components;
1289 function Has_Biased_Representation (Id : E) return B is
1291 return Flag139 (Id);
1292 end Has_Biased_Representation;
1294 function Has_Completion (Id : E) return B is
1299 function Has_Completion_In_Body (Id : E) return B is
1301 pragma Assert (Is_Type (Id));
1303 end Has_Completion_In_Body;
1305 function Has_Complex_Representation (Id : E) return B is
1307 pragma Assert (Is_Type (Id));
1308 return Flag140 (Implementation_Base_Type (Id));
1309 end Has_Complex_Representation;
1311 function Has_Component_Size_Clause (Id : E) return B is
1313 pragma Assert (Is_Array_Type (Id));
1314 return Flag68 (Implementation_Base_Type (Id));
1315 end Has_Component_Size_Clause;
1317 function Has_Constrained_Partial_View (Id : E) return B is
1319 pragma Assert (Is_Type (Id));
1320 return Flag187 (Id);
1321 end Has_Constrained_Partial_View;
1323 function Has_Controlled_Component (Id : E) return B is
1325 return Flag43 (Base_Type (Id));
1326 end Has_Controlled_Component;
1328 function Has_Contiguous_Rep (Id : E) return B is
1330 return Flag181 (Id);
1331 end Has_Contiguous_Rep;
1333 function Has_Controlling_Result (Id : E) return B is
1336 end Has_Controlling_Result;
1338 function Has_Convention_Pragma (Id : E) return B is
1340 return Flag119 (Id);
1341 end Has_Convention_Pragma;
1343 function Has_Default_Aspect (Id : E) return B is
1345 return Flag39 (Base_Type (Id));
1346 end Has_Default_Aspect;
1348 function Has_Delayed_Aspects (Id : E) return B is
1350 pragma Assert (Nkind (Id) in N_Entity);
1351 return Flag200 (Id);
1352 end Has_Delayed_Aspects;
1354 function Has_Delayed_Freeze (Id : E) return B is
1356 pragma Assert (Nkind (Id) in N_Entity);
1358 end Has_Delayed_Freeze;
1360 function Has_Delayed_Rep_Aspects (Id : E) return B is
1362 pragma Assert (Nkind (Id) in N_Entity);
1363 return Flag261 (Id);
1364 end Has_Delayed_Rep_Aspects;
1366 function Has_Discriminants (Id : E) return B is
1368 pragma Assert (Nkind (Id) in N_Entity);
1370 end Has_Discriminants;
1372 function Has_Dispatch_Table (Id : E) return B is
1374 pragma Assert (Is_Tagged_Type (Id));
1375 return Flag220 (Id);
1376 end Has_Dispatch_Table;
1378 function Has_Dynamic_Predicate_Aspect (Id : E) return B is
1380 pragma Assert (Is_Type (Id));
1381 return Flag258 (Id);
1382 end Has_Dynamic_Predicate_Aspect;
1384 function Has_Enumeration_Rep_Clause (Id : E) return B is
1386 pragma Assert (Is_Enumeration_Type (Id));
1388 end Has_Enumeration_Rep_Clause;
1390 function Has_Exit (Id : E) return B is
1395 function Has_External_Tag_Rep_Clause (Id : E) return B is
1397 pragma Assert (Is_Tagged_Type (Id));
1398 return Flag110 (Id);
1399 end Has_External_Tag_Rep_Clause;
1401 function Has_Forward_Instantiation (Id : E) return B is
1403 return Flag175 (Id);
1404 end Has_Forward_Instantiation;
1406 function Has_Fully_Qualified_Name (Id : E) return B is
1408 return Flag173 (Id);
1409 end Has_Fully_Qualified_Name;
1411 function Has_Gigi_Rep_Item (Id : E) return B is
1414 end Has_Gigi_Rep_Item;
1416 function Has_Homonym (Id : E) return B is
1421 function Has_Implicit_Dereference (Id : E) return B is
1423 return Flag251 (Id);
1424 end Has_Implicit_Dereference;
1426 function Has_Independent_Components (Id : E) return B is
1428 pragma Assert (Is_Object (Id) or else Is_Type (Id));
1430 end Has_Independent_Components;
1432 function Has_Inheritable_Invariants (Id : E) return B is
1434 pragma Assert (Is_Type (Id));
1435 return Flag248 (Id);
1436 end Has_Inheritable_Invariants;
1438 function Has_Initial_Value (Id : E) return B is
1440 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1441 return Flag219 (Id);
1442 end Has_Initial_Value;
1444 function Has_Invariants (Id : E) return B is
1446 pragma Assert (Is_Type (Id));
1447 return Flag232 (Id);
1450 function Has_Loop_Entry_Attributes (Id : E) return B is
1452 pragma Assert (Ekind (Id) = E_Loop);
1453 return Flag260 (Id);
1454 end Has_Loop_Entry_Attributes;
1456 function Has_Machine_Radix_Clause (Id : E) return B is
1458 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1460 end Has_Machine_Radix_Clause;
1462 function Has_Master_Entity (Id : E) return B is
1465 end Has_Master_Entity;
1467 function Has_Missing_Return (Id : E) return B is
1469 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1470 return Flag142 (Id);
1471 end Has_Missing_Return;
1473 function Has_Nested_Block_With_Handler (Id : E) return B is
1475 return Flag101 (Id);
1476 end Has_Nested_Block_With_Handler;
1478 function Has_Non_Standard_Rep (Id : E) return B is
1480 return Flag75 (Implementation_Base_Type (Id));
1481 end Has_Non_Standard_Rep;
1483 function Has_Object_Size_Clause (Id : E) return B is
1485 pragma Assert (Is_Type (Id));
1486 return Flag172 (Id);
1487 end Has_Object_Size_Clause;
1489 function Has_Per_Object_Constraint (Id : E) return B is
1491 return Flag154 (Id);
1492 end Has_Per_Object_Constraint;
1494 function Has_Postconditions (Id : E) return B is
1496 pragma Assert (Is_Subprogram (Id));
1497 return Flag240 (Id);
1498 end Has_Postconditions;
1500 function Has_Pragma_Controlled (Id : E) return B is
1502 pragma Assert (Is_Access_Type (Id));
1503 return Flag27 (Implementation_Base_Type (Id));
1504 end Has_Pragma_Controlled;
1506 function Has_Pragma_Elaborate_Body (Id : E) return B is
1508 return Flag150 (Id);
1509 end Has_Pragma_Elaborate_Body;
1511 function Has_Pragma_Inline (Id : E) return B is
1513 return Flag157 (Id);
1514 end Has_Pragma_Inline;
1516 function Has_Pragma_Inline_Always (Id : E) return B is
1518 return Flag230 (Id);
1519 end Has_Pragma_Inline_Always;
1521 function Has_Pragma_No_Inline (Id : E) return B is
1523 return Flag201 (Id);
1524 end Has_Pragma_No_Inline;
1526 function Has_Pragma_Ordered (Id : E) return B is
1528 pragma Assert (Is_Enumeration_Type (Id));
1529 return Flag198 (Implementation_Base_Type (Id));
1530 end Has_Pragma_Ordered;
1532 function Has_Pragma_Pack (Id : E) return B is
1534 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1535 return Flag121 (Implementation_Base_Type (Id));
1536 end Has_Pragma_Pack;
1538 function Has_Pragma_Preelab_Init (Id : E) return B is
1540 return Flag221 (Id);
1541 end Has_Pragma_Preelab_Init;
1543 function Has_Pragma_Pure (Id : E) return B is
1545 return Flag203 (Id);
1546 end Has_Pragma_Pure;
1548 function Has_Pragma_Pure_Function (Id : E) return B is
1550 return Flag179 (Id);
1551 end Has_Pragma_Pure_Function;
1553 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1555 return Flag169 (Id);
1556 end Has_Pragma_Thread_Local_Storage;
1558 function Has_Pragma_Unmodified (Id : E) return B is
1560 return Flag233 (Id);
1561 end Has_Pragma_Unmodified;
1563 function Has_Pragma_Unreferenced (Id : E) return B is
1565 return Flag180 (Id);
1566 end Has_Pragma_Unreferenced;
1568 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1570 pragma Assert (Is_Type (Id));
1571 return Flag212 (Id);
1572 end Has_Pragma_Unreferenced_Objects;
1574 function Has_Predicates (Id : E) return B is
1576 pragma Assert (Is_Type (Id));
1577 return Flag250 (Id);
1580 function Has_Primitive_Operations (Id : E) return B is
1582 pragma Assert (Is_Type (Id));
1583 return Flag120 (Base_Type (Id));
1584 end Has_Primitive_Operations;
1586 function Has_Private_Ancestor (Id : E) return B is
1588 return Flag151 (Id);
1589 end Has_Private_Ancestor;
1591 function Has_Private_Declaration (Id : E) return B is
1593 return Flag155 (Id);
1594 end Has_Private_Declaration;
1596 function Has_Qualified_Name (Id : E) return B is
1598 return Flag161 (Id);
1599 end Has_Qualified_Name;
1601 function Has_RACW (Id : E) return B is
1603 pragma Assert (Ekind (Id) = E_Package);
1604 return Flag214 (Id);
1607 function Has_Record_Rep_Clause (Id : E) return B is
1609 pragma Assert (Is_Record_Type (Id));
1610 return Flag65 (Implementation_Base_Type (Id));
1611 end Has_Record_Rep_Clause;
1613 function Has_Recursive_Call (Id : E) return B is
1615 pragma Assert (Is_Subprogram (Id));
1616 return Flag143 (Id);
1617 end Has_Recursive_Call;
1619 function Has_Size_Clause (Id : E) return B is
1622 end Has_Size_Clause;
1624 function Has_Small_Clause (Id : E) return B is
1627 end Has_Small_Clause;
1629 function Has_Specified_Layout (Id : E) return B is
1631 pragma Assert (Is_Type (Id));
1632 return Flag100 (Implementation_Base_Type (Id));
1633 end Has_Specified_Layout;
1635 function Has_Specified_Stream_Input (Id : E) return B is
1637 pragma Assert (Is_Type (Id));
1638 return Flag190 (Id);
1639 end Has_Specified_Stream_Input;
1641 function Has_Specified_Stream_Output (Id : E) return B is
1643 pragma Assert (Is_Type (Id));
1644 return Flag191 (Id);
1645 end Has_Specified_Stream_Output;
1647 function Has_Specified_Stream_Read (Id : E) return B is
1649 pragma Assert (Is_Type (Id));
1650 return Flag192 (Id);
1651 end Has_Specified_Stream_Read;
1653 function Has_Specified_Stream_Write (Id : E) return B is
1655 pragma Assert (Is_Type (Id));
1656 return Flag193 (Id);
1657 end Has_Specified_Stream_Write;
1659 function Has_Static_Discriminants (Id : E) return B is
1661 pragma Assert (Is_Type (Id));
1662 return Flag211 (Id);
1663 end Has_Static_Discriminants;
1665 function Has_Static_Predicate_Aspect (Id : E) return B is
1667 pragma Assert (Is_Type (Id));
1668 return Flag259 (Id);
1669 end Has_Static_Predicate_Aspect;
1671 function Has_Storage_Size_Clause (Id : E) return B is
1673 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1674 return Flag23 (Implementation_Base_Type (Id));
1675 end Has_Storage_Size_Clause;
1677 function Has_Stream_Size_Clause (Id : E) return B is
1679 return Flag184 (Id);
1680 end Has_Stream_Size_Clause;
1682 function Has_Task (Id : E) return B is
1684 return Flag30 (Base_Type (Id));
1687 function Has_Thunks (Id : E) return B is
1689 return Flag228 (Id);
1692 function Has_Unchecked_Union (Id : E) return B is
1694 return Flag123 (Base_Type (Id));
1695 end Has_Unchecked_Union;
1697 function Has_Unknown_Discriminants (Id : E) return B is
1699 pragma Assert (Is_Type (Id));
1701 end Has_Unknown_Discriminants;
1703 function Has_Up_Level_Access (Id : E) return B is
1706 (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
1707 return Flag215 (Id);
1708 end Has_Up_Level_Access;
1710 function Has_Volatile_Components (Id : E) return B is
1712 return Flag87 (Implementation_Base_Type (Id));
1713 end Has_Volatile_Components;
1715 function Has_Xref_Entry (Id : E) return B is
1717 return Flag182 (Id);
1720 function Hiding_Loop_Variable (Id : E) return E is
1722 pragma Assert (Ekind (Id) = E_Variable);
1724 end Hiding_Loop_Variable;
1726 function Homonym (Id : E) return E is
1731 function Interface_Alias (Id : E) return E is
1733 pragma Assert (Is_Subprogram (Id));
1735 end Interface_Alias;
1737 function Interfaces (Id : E) return L is
1739 pragma Assert (Is_Record_Type (Id));
1740 return Elist25 (Id);
1743 function In_Package_Body (Id : E) return B is
1746 end In_Package_Body;
1748 function In_Private_Part (Id : E) return B is
1751 end In_Private_Part;
1753 function In_Use (Id : E) return B is
1755 pragma Assert (Nkind (Id) in N_Entity);
1759 function Initialization_Statements (Id : E) return N is
1761 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
1763 end Initialization_Statements;
1765 function Inner_Instances (Id : E) return L is
1767 return Elist23 (Id);
1768 end Inner_Instances;
1770 function Interface_Name (Id : E) return N is
1775 function Is_Abstract_Subprogram (Id : E) return B is
1777 pragma Assert (Is_Overloadable (Id));
1779 end Is_Abstract_Subprogram;
1781 function Is_Abstract_Type (Id : E) return B is
1783 pragma Assert (Is_Type (Id));
1784 return Flag146 (Id);
1785 end Is_Abstract_Type;
1787 function Is_Local_Anonymous_Access (Id : E) return B is
1789 pragma Assert (Is_Access_Type (Id));
1790 return Flag194 (Id);
1791 end Is_Local_Anonymous_Access;
1793 function Is_Access_Constant (Id : E) return B is
1795 pragma Assert (Is_Access_Type (Id));
1797 end Is_Access_Constant;
1799 function Is_Ada_2005_Only (Id : E) return B is
1801 return Flag185 (Id);
1802 end Is_Ada_2005_Only;
1804 function Is_Ada_2012_Only (Id : E) return B is
1806 return Flag199 (Id);
1807 end Is_Ada_2012_Only;
1809 function Is_Aliased (Id : E) return B is
1811 pragma Assert (Nkind (Id) in N_Entity);
1815 function Is_AST_Entry (Id : E) return B is
1817 pragma Assert (Is_Entry (Id));
1818 return Flag132 (Id);
1821 function Is_Asynchronous (Id : E) return B is
1823 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1825 end Is_Asynchronous;
1827 function Is_Atomic (Id : E) return B is
1832 function Is_Bit_Packed_Array (Id : E) return B is
1834 return Flag122 (Implementation_Base_Type (Id));
1835 end Is_Bit_Packed_Array;
1837 function Is_Called (Id : E) return B is
1839 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1840 return Flag102 (Id);
1843 function Is_Character_Type (Id : E) return B is
1846 end Is_Character_Type;
1848 function Is_Child_Unit (Id : E) return B is
1853 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1856 end Is_Class_Wide_Equivalent_Type;
1858 function Is_Compilation_Unit (Id : E) return B is
1860 return Flag149 (Id);
1861 end Is_Compilation_Unit;
1863 function Is_Completely_Hidden (Id : E) return B is
1865 pragma Assert (Ekind (Id) = E_Discriminant);
1866 return Flag103 (Id);
1867 end Is_Completely_Hidden;
1869 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1872 end Is_Constr_Subt_For_U_Nominal;
1874 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1876 return Flag141 (Id);
1877 end Is_Constr_Subt_For_UN_Aliased;
1879 function Is_Constrained (Id : E) return B is
1881 pragma Assert (Nkind (Id) in N_Entity);
1885 function Is_Constructor (Id : E) return B is
1890 function Is_Controlled (Id : E) return B is
1892 return Flag42 (Base_Type (Id));
1895 function Is_Controlling_Formal (Id : E) return B is
1897 pragma Assert (Is_Formal (Id));
1899 end Is_Controlling_Formal;
1901 function Is_CPP_Class (Id : E) return B is
1906 function Is_Descendent_Of_Address (Id : E) return B is
1908 pragma Assert (Is_Type (Id));
1909 return Flag223 (Id);
1910 end Is_Descendent_Of_Address;
1912 function Is_Discrim_SO_Function (Id : E) return B is
1914 return Flag176 (Id);
1915 end Is_Discrim_SO_Function;
1917 function Is_Dispatch_Table_Entity (Id : E) return B is
1919 return Flag234 (Id);
1920 end Is_Dispatch_Table_Entity;
1922 function Is_Dispatching_Operation (Id : E) return B is
1924 pragma Assert (Nkind (Id) in N_Entity);
1926 end Is_Dispatching_Operation;
1928 function Is_Eliminated (Id : E) return B is
1930 return Flag124 (Id);
1933 function Is_Entry_Formal (Id : E) return B is
1936 end Is_Entry_Formal;
1938 function Is_Exported (Id : E) return B is
1943 function Is_First_Subtype (Id : E) return B is
1946 end Is_First_Subtype;
1948 function Is_For_Access_Subtype (Id : E) return B is
1950 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
1951 return Flag118 (Id);
1952 end Is_For_Access_Subtype;
1954 function Is_Formal_Subprogram (Id : E) return B is
1956 return Flag111 (Id);
1957 end Is_Formal_Subprogram;
1959 function Is_Frozen (Id : E) return B is
1964 function Is_Generic_Actual_Type (Id : E) return B is
1966 pragma Assert (Is_Type (Id));
1968 end Is_Generic_Actual_Type;
1970 function Is_Generic_Instance (Id : E) return B is
1972 return Flag130 (Id);
1973 end Is_Generic_Instance;
1975 function Is_Generic_Type (Id : E) return B is
1977 pragma Assert (Nkind (Id) in N_Entity);
1979 end Is_Generic_Type;
1981 function Is_Hidden (Id : E) return B is
1986 function Is_Hidden_Open_Scope (Id : E) return B is
1988 return Flag171 (Id);
1989 end Is_Hidden_Open_Scope;
1991 function Is_Immediately_Visible (Id : E) return B is
1993 pragma Assert (Nkind (Id) in N_Entity);
1995 end Is_Immediately_Visible;
1997 function Is_Implementation_Defined (Id : E) return B is
1999 return Flag254 (Id);
2000 end Is_Implementation_Defined;
2002 function Is_Imported (Id : E) return B is
2007 function Is_Inlined (Id : E) return B is
2012 function Is_Interface (Id : E) return B is
2014 return Flag186 (Id);
2017 function Is_Instantiated (Id : E) return B is
2019 return Flag126 (Id);
2020 end Is_Instantiated;
2022 function Is_Internal (Id : E) return B is
2024 pragma Assert (Nkind (Id) in N_Entity);
2028 function Is_Interrupt_Handler (Id : E) return B is
2030 pragma Assert (Nkind (Id) in N_Entity);
2032 end Is_Interrupt_Handler;
2034 function Is_Intrinsic_Subprogram (Id : E) return B is
2037 end Is_Intrinsic_Subprogram;
2039 function Is_Invariant_Procedure (Id : E) return B is
2041 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2042 return Flag257 (Id);
2043 end Is_Invariant_Procedure;
2045 function Is_Itype (Id : E) return B is
2050 function Is_Known_Non_Null (Id : E) return B is
2053 end Is_Known_Non_Null;
2055 function Is_Known_Null (Id : E) return B is
2057 return Flag204 (Id);
2060 function Is_Known_Valid (Id : E) return B is
2062 return Flag170 (Id);
2065 function Is_Limited_Composite (Id : E) return B is
2067 return Flag106 (Id);
2068 end Is_Limited_Composite;
2070 function Is_Limited_Interface (Id : E) return B is
2072 return Flag197 (Id);
2073 end Is_Limited_Interface;
2075 function Is_Limited_Record (Id : E) return B is
2078 end Is_Limited_Record;
2080 function Is_Machine_Code_Subprogram (Id : E) return B is
2082 pragma Assert (Is_Subprogram (Id));
2083 return Flag137 (Id);
2084 end Is_Machine_Code_Subprogram;
2086 function Is_Non_Static_Subtype (Id : E) return B is
2088 pragma Assert (Is_Type (Id));
2089 return Flag109 (Id);
2090 end Is_Non_Static_Subtype;
2092 function Is_Null_Init_Proc (Id : E) return B is
2094 pragma Assert (Ekind (Id) = E_Procedure);
2095 return Flag178 (Id);
2096 end Is_Null_Init_Proc;
2098 function Is_Obsolescent (Id : E) return B is
2100 return Flag153 (Id);
2103 function Is_Only_Out_Parameter (Id : E) return B is
2105 pragma Assert (Is_Formal (Id));
2106 return Flag226 (Id);
2107 end Is_Only_Out_Parameter;
2109 function Is_Optional_Parameter (Id : E) return B is
2111 pragma Assert (Is_Formal (Id));
2112 return Flag134 (Id);
2113 end Is_Optional_Parameter;
2115 function Is_Package_Body_Entity (Id : E) return B is
2117 return Flag160 (Id);
2118 end Is_Package_Body_Entity;
2120 function Is_Packed (Id : E) return B is
2122 return Flag51 (Implementation_Base_Type (Id));
2125 function Is_Packed_Array_Type (Id : E) return B is
2127 return Flag138 (Id);
2128 end Is_Packed_Array_Type;
2130 function Is_Potentially_Use_Visible (Id : E) return B is
2132 pragma Assert (Nkind (Id) in N_Entity);
2134 end Is_Potentially_Use_Visible;
2136 function Is_Predicate_Function (Id : E) return B is
2138 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2139 return Flag255 (Id);
2140 end Is_Predicate_Function;
2142 function Is_Predicate_Function_M (Id : E) return B is
2144 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2145 return Flag256 (Id);
2146 end Is_Predicate_Function_M;
2148 function Is_Preelaborated (Id : E) return B is
2151 end Is_Preelaborated;
2153 function Is_Primitive (Id : E) return B is
2156 (Is_Overloadable (Id)
2157 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
2158 return Flag218 (Id);
2161 function Is_Primitive_Wrapper (Id : E) return B is
2163 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2164 return Flag195 (Id);
2165 end Is_Primitive_Wrapper;
2167 function Is_Private_Composite (Id : E) return B is
2169 pragma Assert (Is_Type (Id));
2170 return Flag107 (Id);
2171 end Is_Private_Composite;
2173 function Is_Private_Descendant (Id : E) return B is
2176 end Is_Private_Descendant;
2178 function Is_Private_Primitive (Id : E) return B is
2180 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2181 return Flag245 (Id);
2182 end Is_Private_Primitive;
2184 function Is_Processed_Transient (Id : E) return B is
2186 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2187 return Flag252 (Id);
2188 end Is_Processed_Transient;
2190 function Is_Public (Id : E) return B is
2192 pragma Assert (Nkind (Id) in N_Entity);
2196 function Is_Pure (Id : E) return B is
2201 function Is_Pure_Unit_Access_Type (Id : E) return B is
2203 pragma Assert (Is_Access_Type (Id));
2204 return Flag189 (Id);
2205 end Is_Pure_Unit_Access_Type;
2207 function Is_RACW_Stub_Type (Id : E) return B is
2209 pragma Assert (Is_Type (Id));
2210 return Flag244 (Id);
2211 end Is_RACW_Stub_Type;
2213 function Is_Raised (Id : E) return B is
2215 pragma Assert (Ekind (Id) = E_Exception);
2216 return Flag224 (Id);
2219 function Is_Remote_Call_Interface (Id : E) return B is
2222 end Is_Remote_Call_Interface;
2224 function Is_Remote_Types (Id : E) return B is
2227 end Is_Remote_Types;
2229 function Is_Renaming_Of_Object (Id : E) return B is
2231 return Flag112 (Id);
2232 end Is_Renaming_Of_Object;
2234 function Is_Return_Object (Id : E) return B is
2236 return Flag209 (Id);
2237 end Is_Return_Object;
2239 function Is_Safe_To_Reevaluate (Id : E) return B is
2241 return Flag249 (Id);
2242 end Is_Safe_To_Reevaluate;
2244 function Is_Shared_Passive (Id : E) return B is
2247 end Is_Shared_Passive;
2249 function Is_Statically_Allocated (Id : E) return B is
2252 end Is_Statically_Allocated;
2254 function Is_Tag (Id : E) return B is
2256 pragma Assert (Nkind (Id) in N_Entity);
2260 function Is_Tagged_Type (Id : E) return B is
2265 function Is_Thunk (Id : E) return B is
2267 return Flag225 (Id);
2270 function Is_Trivial_Subprogram (Id : E) return B is
2272 return Flag235 (Id);
2273 end Is_Trivial_Subprogram;
2275 function Is_True_Constant (Id : E) return B is
2277 return Flag163 (Id);
2278 end Is_True_Constant;
2280 function Is_Unchecked_Union (Id : E) return B is
2282 return Flag117 (Implementation_Base_Type (Id));
2283 end Is_Unchecked_Union;
2285 function Is_Underlying_Record_View (Id : E) return B is
2287 return Flag246 (Id);
2288 end Is_Underlying_Record_View;
2290 function Is_Unsigned_Type (Id : E) return B is
2292 pragma Assert (Is_Type (Id));
2293 return Flag144 (Id);
2294 end Is_Unsigned_Type;
2296 function Is_Valued_Procedure (Id : E) return B is
2298 pragma Assert (Ekind (Id) = E_Procedure);
2299 return Flag127 (Id);
2300 end Is_Valued_Procedure;
2302 function Is_Visible_Formal (Id : E) return B is
2304 return Flag206 (Id);
2305 end Is_Visible_Formal;
2307 function Is_Visible_Lib_Unit (Id : E) return B is
2309 return Flag116 (Id);
2310 end Is_Visible_Lib_Unit;
2312 function Is_VMS_Exception (Id : E) return B is
2314 return Flag133 (Id);
2315 end Is_VMS_Exception;
2317 function Is_Volatile (Id : E) return B is
2319 pragma Assert (Nkind (Id) in N_Entity);
2321 if Is_Type (Id) then
2322 return Flag16 (Base_Type (Id));
2328 function Itype_Printed (Id : E) return B is
2330 pragma Assert (Is_Itype (Id));
2331 return Flag202 (Id);
2334 function Kill_Elaboration_Checks (Id : E) return B is
2337 end Kill_Elaboration_Checks;
2339 function Kill_Range_Checks (Id : E) return B is
2342 end Kill_Range_Checks;
2344 function Known_To_Have_Preelab_Init (Id : E) return B is
2346 pragma Assert (Is_Type (Id));
2347 return Flag207 (Id);
2348 end Known_To_Have_Preelab_Init;
2350 function Last_Assignment (Id : E) return N is
2352 pragma Assert (Is_Assignable (Id));
2354 end Last_Assignment;
2356 function Last_Entity (Id : E) return E is
2361 function Limited_View (Id : E) return E is
2363 pragma Assert (Ekind (Id) = E_Package);
2367 function Lit_Indexes (Id : E) return E is
2369 pragma Assert (Is_Enumeration_Type (Id));
2373 function Lit_Strings (Id : E) return E is
2375 pragma Assert (Is_Enumeration_Type (Id));
2379 function Low_Bound_Tested (Id : E) return B is
2381 return Flag205 (Id);
2382 end Low_Bound_Tested;
2384 function Machine_Radix_10 (Id : E) return B is
2386 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2388 end Machine_Radix_10;
2390 function Master_Id (Id : E) return E is
2392 pragma Assert (Is_Access_Type (Id));
2396 function Materialize_Entity (Id : E) return B is
2398 return Flag168 (Id);
2399 end Materialize_Entity;
2401 function May_Inherit_Delayed_Rep_Aspects (Id : E) return B is
2403 return Flag262 (Id);
2404 end May_Inherit_Delayed_Rep_Aspects;
2406 function Mechanism (Id : E) return M is
2408 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2409 return UI_To_Int (Uint8 (Id));
2412 function Modulus (Id : E) return Uint is
2414 pragma Assert (Is_Modular_Integer_Type (Id));
2415 return Uint17 (Base_Type (Id));
2418 function Must_Be_On_Byte_Boundary (Id : E) return B is
2420 pragma Assert (Is_Type (Id));
2421 return Flag183 (Id);
2422 end Must_Be_On_Byte_Boundary;
2424 function Must_Have_Preelab_Init (Id : E) return B is
2426 pragma Assert (Is_Type (Id));
2427 return Flag208 (Id);
2428 end Must_Have_Preelab_Init;
2430 function Needs_Debug_Info (Id : E) return B is
2432 return Flag147 (Id);
2433 end Needs_Debug_Info;
2435 function Needs_No_Actuals (Id : E) return B is
2438 (Is_Overloadable (Id)
2439 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2441 end Needs_No_Actuals;
2443 function Never_Set_In_Source (Id : E) return B is
2445 return Flag115 (Id);
2446 end Never_Set_In_Source;
2448 function Next_Inlined_Subprogram (Id : E) return E is
2451 end Next_Inlined_Subprogram;
2453 function No_Pool_Assigned (Id : E) return B is
2455 pragma Assert (Is_Access_Type (Id));
2456 return Flag131 (Root_Type (Id));
2457 end No_Pool_Assigned;
2459 function No_Return (Id : E) return B is
2461 return Flag113 (Id);
2464 function No_Strict_Aliasing (Id : E) return B is
2466 pragma Assert (Is_Access_Type (Id));
2467 return Flag136 (Base_Type (Id));
2468 end No_Strict_Aliasing;
2470 function Non_Binary_Modulus (Id : E) return B is
2472 pragma Assert (Is_Type (Id));
2473 return Flag58 (Base_Type (Id));
2474 end Non_Binary_Modulus;
2476 function Non_Limited_View (Id : E) return E is
2478 pragma Assert (Ekind (Id) in Incomplete_Kind);
2480 end Non_Limited_View;
2482 function Nonzero_Is_True (Id : E) return B is
2484 pragma Assert (Root_Type (Id) = Standard_Boolean);
2485 return Flag162 (Base_Type (Id));
2486 end Nonzero_Is_True;
2488 function Normalized_First_Bit (Id : E) return U is
2490 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2492 end Normalized_First_Bit;
2494 function Normalized_Position (Id : E) return U is
2496 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2498 end Normalized_Position;
2500 function Normalized_Position_Max (Id : E) return U is
2502 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2504 end Normalized_Position_Max;
2506 function OK_To_Rename (Id : E) return B is
2508 pragma Assert (Ekind (Id) = E_Variable);
2509 return Flag247 (Id);
2512 function OK_To_Reorder_Components (Id : E) return B is
2514 pragma Assert (Is_Record_Type (Id));
2515 return Flag239 (Base_Type (Id));
2516 end OK_To_Reorder_Components;
2518 function Optimize_Alignment_Space (Id : E) return B is
2521 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2522 return Flag241 (Id);
2523 end Optimize_Alignment_Space;
2525 function Optimize_Alignment_Time (Id : E) return B is
2528 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2529 return Flag242 (Id);
2530 end Optimize_Alignment_Time;
2532 function Original_Access_Type (Id : E) return E is
2534 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2536 end Original_Access_Type;
2538 function Original_Array_Type (Id : E) return E is
2540 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2542 end Original_Array_Type;
2544 function Original_Record_Component (Id : E) return E is
2546 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2548 end Original_Record_Component;
2550 function Overlays_Constant (Id : E) return B is
2552 return Flag243 (Id);
2553 end Overlays_Constant;
2555 function Overridden_Operation (Id : E) return E is
2558 end Overridden_Operation;
2560 function Package_Instantiation (Id : E) return N is
2562 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2564 end Package_Instantiation;
2566 function Packed_Array_Type (Id : E) return E is
2568 pragma Assert (Is_Array_Type (Id));
2570 end Packed_Array_Type;
2572 function Parent_Subtype (Id : E) return E is
2574 pragma Assert (Is_Record_Type (Id));
2575 return Node19 (Base_Type (Id));
2578 function Postcondition_Proc (Id : E) return E is
2580 pragma Assert (Ekind (Id) = E_Procedure);
2582 end Postcondition_Proc;
2584 function PPC_Wrapper (Id : E) return E is
2586 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2590 function Prival (Id : E) return E is
2592 pragma Assert (Is_Protected_Component (Id));
2596 function Prival_Link (Id : E) return E is
2598 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2602 function Private_Dependents (Id : E) return L is
2604 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2605 return Elist18 (Id);
2606 end Private_Dependents;
2608 function Private_View (Id : E) return N is
2610 pragma Assert (Is_Private_Type (Id));
2614 function Protected_Body_Subprogram (Id : E) return E is
2616 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2618 end Protected_Body_Subprogram;
2620 function Protected_Formal (Id : E) return E is
2622 pragma Assert (Is_Formal (Id));
2624 end Protected_Formal;
2626 function Protection_Object (Id : E) return E is
2629 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2631 end Protection_Object;
2633 function Reachable (Id : E) return B is
2638 function Referenced (Id : E) return B is
2640 return Flag156 (Id);
2643 function Referenced_As_LHS (Id : E) return B is
2646 end Referenced_As_LHS;
2648 function Referenced_As_Out_Parameter (Id : E) return B is
2650 return Flag227 (Id);
2651 end Referenced_As_Out_Parameter;
2653 function Refined_State (Id : E) return N is
2655 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
2659 function Refined_State_Pragma (Id : E) return N is
2661 pragma Assert (Ekind (Id) = E_Package_Body);
2663 end Refined_State_Pragma;
2665 function Refinement_Constituents (Id : E) return L is
2667 pragma Assert (Ekind (Id) = E_Abstract_State);
2669 end Refinement_Constituents;
2671 function Register_Exception_Call (Id : E) return N is
2673 pragma Assert (Ekind (Id) = E_Exception);
2675 end Register_Exception_Call;
2677 function Related_Array_Object (Id : E) return E is
2679 pragma Assert (Is_Array_Type (Id));
2681 end Related_Array_Object;
2683 function Related_Expression (Id : E) return N is
2685 pragma Assert (Ekind (Id) in Type_Kind
2686 or else Ekind_In (Id, E_Constant, E_Variable));
2688 end Related_Expression;
2690 function Related_Instance (Id : E) return E is
2692 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2694 end Related_Instance;
2696 function Related_Type (Id : E) return E is
2698 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2702 function Relative_Deadline_Variable (Id : E) return E is
2704 pragma Assert (Is_Task_Type (Id));
2705 return Node26 (Implementation_Base_Type (Id));
2706 end Relative_Deadline_Variable;
2708 function Renamed_Entity (Id : E) return N is
2713 function Renamed_In_Spec (Id : E) return B is
2715 pragma Assert (Ekind (Id) = E_Package);
2716 return Flag231 (Id);
2717 end Renamed_In_Spec;
2719 function Renamed_Object (Id : E) return N is
2724 function Renaming_Map (Id : E) return U is
2729 function Requires_Overriding (Id : E) return B is
2731 pragma Assert (Is_Overloadable (Id));
2732 return Flag213 (Id);
2733 end Requires_Overriding;
2735 function Return_Present (Id : E) return B is
2740 function Return_Applies_To (Id : E) return N is
2743 end Return_Applies_To;
2745 function Returns_By_Ref (Id : E) return B is
2750 function Reverse_Bit_Order (Id : E) return B is
2752 pragma Assert (Is_Record_Type (Id));
2753 return Flag164 (Base_Type (Id));
2754 end Reverse_Bit_Order;
2756 function Reverse_Storage_Order (Id : E) return B is
2758 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
2759 return Flag93 (Base_Type (Id));
2760 end Reverse_Storage_Order;
2762 function RM_Size (Id : E) return U is
2764 pragma Assert (Is_Type (Id));
2768 function Scalar_Range (Id : E) return N is
2773 function Scale_Value (Id : E) return U is
2778 function Scope_Depth_Value (Id : E) return U is
2781 end Scope_Depth_Value;
2783 function Sec_Stack_Needed_For_Return (Id : E) return B is
2785 return Flag167 (Id);
2786 end Sec_Stack_Needed_For_Return;
2788 function Shadow_Entities (Id : E) return S is
2790 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2792 end Shadow_Entities;
2794 function Shared_Var_Procs_Instance (Id : E) return E is
2796 pragma Assert (Ekind (Id) = E_Variable);
2798 end Shared_Var_Procs_Instance;
2800 function Size_Check_Code (Id : E) return N is
2802 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2804 end Size_Check_Code;
2806 function Size_Depends_On_Discriminant (Id : E) return B is
2808 return Flag177 (Id);
2809 end Size_Depends_On_Discriminant;
2811 function Size_Known_At_Compile_Time (Id : E) return B is
2814 end Size_Known_At_Compile_Time;
2816 function Small_Value (Id : E) return R is
2818 pragma Assert (Is_Fixed_Point_Type (Id));
2819 return Ureal21 (Id);
2822 function SPARK_Mode_Pragmas (Id : E) return N is
2825 (Ekind_In (Id, E_Function, -- subprogram variants
2827 E_Generic_Procedure,
2831 Ekind_In (Id, E_Generic_Package, -- package variants
2835 end SPARK_Mode_Pragmas;
2837 function Spec_Entity (Id : E) return E is
2839 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2843 function Static_Predicate (Id : E) return S is
2845 pragma Assert (Is_Discrete_Type (Id));
2847 end Static_Predicate;
2849 function Status_Flag_Or_Transient_Decl (Id : E) return N is
2851 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2853 end Status_Flag_Or_Transient_Decl;
2855 function Storage_Size_Variable (Id : E) return E is
2857 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2858 return Node15 (Implementation_Base_Type (Id));
2859 end Storage_Size_Variable;
2861 function Static_Elaboration_Desired (Id : E) return B is
2863 pragma Assert (Ekind (Id) = E_Package);
2865 end Static_Elaboration_Desired;
2867 function Static_Initialization (Id : E) return N is
2870 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
2872 end Static_Initialization;
2874 function Stored_Constraint (Id : E) return L is
2877 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
2878 return Elist23 (Id);
2879 end Stored_Constraint;
2881 function Strict_Alignment (Id : E) return B is
2883 return Flag145 (Implementation_Base_Type (Id));
2884 end Strict_Alignment;
2886 function String_Literal_Length (Id : E) return U is
2889 end String_Literal_Length;
2891 function String_Literal_Low_Bound (Id : E) return N is
2894 end String_Literal_Low_Bound;
2896 function Subprograms_For_Type (Id : E) return E is
2898 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
2900 end Subprograms_For_Type;
2902 function Suppress_Elaboration_Warnings (Id : E) return B is
2904 return Flag148 (Id);
2905 end Suppress_Elaboration_Warnings;
2907 function Suppress_Initialization (Id : E) return B is
2909 pragma Assert (Is_Type (Id));
2910 return Flag105 (Id);
2911 end Suppress_Initialization;
2913 function Suppress_Style_Checks (Id : E) return B is
2915 return Flag165 (Id);
2916 end Suppress_Style_Checks;
2918 function Suppress_Value_Tracking_On_Call (Id : E) return B is
2920 return Flag217 (Id);
2921 end Suppress_Value_Tracking_On_Call;
2923 function Task_Body_Procedure (Id : E) return N is
2925 pragma Assert (Ekind (Id) in Task_Kind);
2927 end Task_Body_Procedure;
2929 function Thunk_Entity (Id : E) return E is
2931 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
2932 and then Is_Thunk (Id));
2936 function Treat_As_Volatile (Id : E) return B is
2939 end Treat_As_Volatile;
2941 function Underlying_Full_View (Id : E) return E is
2943 pragma Assert (Ekind (Id) in Private_Kind);
2945 end Underlying_Full_View;
2947 function Underlying_Record_View (Id : E) return E is
2950 end Underlying_Record_View;
2952 function Universal_Aliasing (Id : E) return B is
2954 pragma Assert (Is_Type (Id));
2955 return Flag216 (Implementation_Base_Type (Id));
2956 end Universal_Aliasing;
2958 function Unset_Reference (Id : E) return N is
2961 end Unset_Reference;
2963 function Used_As_Generic_Actual (Id : E) return B is
2965 return Flag222 (Id);
2966 end Used_As_Generic_Actual;
2968 function Uses_Lock_Free (Id : E) return B is
2970 pragma Assert (Is_Protected_Type (Id));
2971 return Flag188 (Id);
2974 function Uses_Sec_Stack (Id : E) return B is
2979 function Warnings_Off (Id : E) return B is
2984 function Warnings_Off_Used (Id : E) return B is
2986 return Flag236 (Id);
2987 end Warnings_Off_Used;
2989 function Warnings_Off_Used_Unmodified (Id : E) return B is
2991 return Flag237 (Id);
2992 end Warnings_Off_Used_Unmodified;
2994 function Warnings_Off_Used_Unreferenced (Id : E) return B is
2996 return Flag238 (Id);
2997 end Warnings_Off_Used_Unreferenced;
2999 function Wrapped_Entity (Id : E) return E is
3001 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3002 and then Is_Primitive_Wrapper (Id));
3006 function Was_Hidden (Id : E) return B is
3008 return Flag196 (Id);
3011 ------------------------------
3012 -- Classification Functions --
3013 ------------------------------
3015 function Is_Access_Type (Id : E) return B is
3017 return Ekind (Id) in Access_Kind;
3020 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
3022 return Ekind (Id) in Access_Protected_Kind;
3023 end Is_Access_Protected_Subprogram_Type;
3025 function Is_Access_Subprogram_Type (Id : E) return B is
3027 return Ekind (Id) in Access_Subprogram_Kind;
3028 end Is_Access_Subprogram_Type;
3030 function Is_Aggregate_Type (Id : E) return B is
3032 return Ekind (Id) in Aggregate_Kind;
3033 end Is_Aggregate_Type;
3035 function Is_Array_Type (Id : E) return B is
3037 return Ekind (Id) in Array_Kind;
3040 function Is_Assignable (Id : E) return B is
3042 return Ekind (Id) in Assignable_Kind;
3045 function Is_Class_Wide_Type (Id : E) return B is
3047 return Ekind (Id) in Class_Wide_Kind;
3048 end Is_Class_Wide_Type;
3050 function Is_Composite_Type (Id : E) return B is
3052 return Ekind (Id) in Composite_Kind;
3053 end Is_Composite_Type;
3055 function Is_Concurrent_Body (Id : E) return B is
3057 return Ekind (Id) in
3058 Concurrent_Body_Kind;
3059 end Is_Concurrent_Body;
3061 function Is_Concurrent_Record_Type (Id : E) return B is
3064 end Is_Concurrent_Record_Type;
3066 function Is_Concurrent_Type (Id : E) return B is
3068 return Ekind (Id) in Concurrent_Kind;
3069 end Is_Concurrent_Type;
3071 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
3073 return Ekind (Id) in
3074 Decimal_Fixed_Point_Kind;
3075 end Is_Decimal_Fixed_Point_Type;
3077 function Is_Digits_Type (Id : E) return B is
3079 return Ekind (Id) in Digits_Kind;
3082 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
3084 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
3085 end Is_Discrete_Or_Fixed_Point_Type;
3087 function Is_Discrete_Type (Id : E) return B is
3089 return Ekind (Id) in Discrete_Kind;
3090 end Is_Discrete_Type;
3092 function Is_Elementary_Type (Id : E) return B is
3094 return Ekind (Id) in Elementary_Kind;
3095 end Is_Elementary_Type;
3097 function Is_Entry (Id : E) return B is
3099 return Ekind (Id) in Entry_Kind;
3102 function Is_Enumeration_Type (Id : E) return B is
3104 return Ekind (Id) in
3106 end Is_Enumeration_Type;
3108 function Is_Fixed_Point_Type (Id : E) return B is
3110 return Ekind (Id) in
3112 end Is_Fixed_Point_Type;
3114 function Is_Floating_Point_Type (Id : E) return B is
3116 return Ekind (Id) in Float_Kind;
3117 end Is_Floating_Point_Type;
3119 function Is_Formal (Id : E) return B is
3121 return Ekind (Id) in Formal_Kind;
3124 function Is_Formal_Object (Id : E) return B is
3126 return Ekind (Id) in Formal_Object_Kind;
3127 end Is_Formal_Object;
3129 function Is_Generic_Subprogram (Id : E) return B is
3131 return Ekind (Id) in Generic_Subprogram_Kind;
3132 end Is_Generic_Subprogram;
3134 function Is_Generic_Unit (Id : E) return B is
3136 return Ekind (Id) in Generic_Unit_Kind;
3137 end Is_Generic_Unit;
3139 function Is_Incomplete_Or_Private_Type (Id : E) return B is
3141 return Ekind (Id) in
3142 Incomplete_Or_Private_Kind;
3143 end Is_Incomplete_Or_Private_Type;
3145 function Is_Incomplete_Type (Id : E) return B is
3147 return Ekind (Id) in
3149 end Is_Incomplete_Type;
3151 function Is_Integer_Type (Id : E) return B is
3153 return Ekind (Id) in Integer_Kind;
3154 end Is_Integer_Type;
3156 function Is_Modular_Integer_Type (Id : E) return B is
3158 return Ekind (Id) in
3159 Modular_Integer_Kind;
3160 end Is_Modular_Integer_Type;
3162 function Is_Named_Number (Id : E) return B is
3164 return Ekind (Id) in Named_Kind;
3165 end Is_Named_Number;
3167 function Is_Numeric_Type (Id : E) return B is
3169 return Ekind (Id) in Numeric_Kind;
3170 end Is_Numeric_Type;
3172 function Is_Object (Id : E) return B is
3174 return Ekind (Id) in Object_Kind;
3177 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
3179 return Ekind (Id) in
3180 Ordinary_Fixed_Point_Kind;
3181 end Is_Ordinary_Fixed_Point_Type;
3183 function Is_Overloadable (Id : E) return B is
3185 return Ekind (Id) in Overloadable_Kind;
3186 end Is_Overloadable;
3188 function Is_Private_Type (Id : E) return B is
3190 return Ekind (Id) in Private_Kind;
3191 end Is_Private_Type;
3193 function Is_Protected_Type (Id : E) return B is
3195 return Ekind (Id) in Protected_Kind;
3196 end Is_Protected_Type;
3198 function Is_Real_Type (Id : E) return B is
3200 return Ekind (Id) in Real_Kind;
3203 function Is_Record_Type (Id : E) return B is
3205 return Ekind (Id) in Record_Kind;
3208 function Is_Scalar_Type (Id : E) return B is
3210 return Ekind (Id) in Scalar_Kind;
3213 function Is_Signed_Integer_Type (Id : E) return B is
3215 return Ekind (Id) in Signed_Integer_Kind;
3216 end Is_Signed_Integer_Type;
3218 function Is_Subprogram (Id : E) return B is
3220 return Ekind (Id) in Subprogram_Kind;
3223 function Is_Task_Type (Id : E) return B is
3225 return Ekind (Id) in Task_Kind;
3228 function Is_Type (Id : E) return B is
3230 return Ekind (Id) in Type_Kind;
3233 ------------------------------
3234 -- Attribute Set Procedures --
3235 ------------------------------
3237 -- Note: in many of these set procedures an "obvious" assertion is missing.
3238 -- The reason for this is that in many cases, a field is set before the
3239 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3240 -- it is possible to add assertions that specifically include the E_Void
3241 -- possibility, but in some cases, we just omit the assertions.
3243 procedure Set_Abstract_States (Id : E; V : L) is
3245 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
3246 Set_Elist25 (Id, V);
3247 end Set_Abstract_States;
3249 procedure Set_Accept_Address (Id : E; V : L) is
3251 Set_Elist21 (Id, V);
3252 end Set_Accept_Address;
3254 procedure Set_Access_Disp_Table (Id : E; V : L) is
3256 pragma Assert (Ekind (Id) = E_Record_Type
3257 and then Id = Implementation_Base_Type (Id));
3258 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3259 Set_Elist16 (Id, V);
3260 end Set_Access_Disp_Table;
3262 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3265 end Set_Associated_Formal_Package;
3267 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3270 end Set_Associated_Node_For_Itype;
3272 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3274 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3276 end Set_Associated_Storage_Pool;
3278 procedure Set_Actual_Subtype (Id : E; V : E) is
3281 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3282 or else Is_Formal (Id));
3284 end Set_Actual_Subtype;
3286 procedure Set_Address_Taken (Id : E; V : B := True) is
3288 Set_Flag104 (Id, V);
3289 end Set_Address_Taken;
3291 procedure Set_Alias (Id : E; V : E) is
3294 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3298 procedure Set_Alignment (Id : E; V : U) is
3300 pragma Assert (Is_Type (Id)
3301 or else Is_Formal (Id)
3302 or else Ekind_In (Id, E_Loop_Parameter,
3309 procedure Set_Barrier_Function (Id : E; V : N) is
3311 pragma Assert (Is_Entry (Id));
3313 end Set_Barrier_Function;
3315 procedure Set_Block_Node (Id : E; V : N) is
3317 pragma Assert (Ekind (Id) = E_Block);
3321 procedure Set_Body_Entity (Id : E; V : E) is
3323 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3325 end Set_Body_Entity;
3327 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3330 (Ekind (Id) = E_Package
3331 or else Is_Subprogram (Id)
3332 or else Is_Generic_Unit (Id));
3334 end Set_Body_Needed_For_SAL;
3336 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3338 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3339 Set_Flag125 (Id, V);
3340 end Set_C_Pass_By_Copy;
3342 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3345 end Set_Can_Never_Be_Null;
3347 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3350 end Set_Checks_May_Be_Suppressed;
3352 procedure Set_Class_Wide_Type (Id : E; V : E) is
3354 pragma Assert (Is_Type (Id));
3356 end Set_Class_Wide_Type;
3358 procedure Set_Cloned_Subtype (Id : E; V : E) is
3360 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3362 end Set_Cloned_Subtype;
3364 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3366 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3368 end Set_Component_Bit_Offset;
3370 procedure Set_Component_Clause (Id : E; V : N) is
3372 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3374 end Set_Component_Clause;
3376 procedure Set_Component_Size (Id : E; V : U) is
3378 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3380 end Set_Component_Size;
3382 procedure Set_Component_Type (Id : E; V : E) is
3384 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3386 end Set_Component_Type;
3388 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3391 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3393 end Set_Corresponding_Concurrent_Type;
3395 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3397 pragma Assert (Ekind (Id) = E_Discriminant);
3399 end Set_Corresponding_Discriminant;
3401 procedure Set_Corresponding_Equality (Id : E; V : E) is
3404 (Ekind (Id) = E_Function
3405 and then not Comes_From_Source (Id)
3406 and then Chars (Id) = Name_Op_Ne);
3408 end Set_Corresponding_Equality;
3410 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3412 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3414 end Set_Corresponding_Protected_Entry;
3416 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3418 pragma Assert (Is_Concurrent_Type (Id));
3420 end Set_Corresponding_Record_Type;
3422 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3425 end Set_Corresponding_Remote_Type;
3427 procedure Set_Current_Use_Clause (Id : E; V : E) is
3429 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3431 end Set_Current_Use_Clause;
3433 procedure Set_Current_Value (Id : E; V : N) is
3435 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3437 end Set_Current_Value;
3439 procedure Set_CR_Discriminant (Id : E; V : E) is
3442 end Set_CR_Discriminant;
3444 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3446 Set_Flag166 (Id, V);
3447 end Set_Debug_Info_Off;
3449 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3452 end Set_Debug_Renaming_Link;
3454 procedure Set_Default_Aspect_Component_Value (Id : E; V : E) is
3456 pragma Assert (Is_Array_Type (Id));
3458 end Set_Default_Aspect_Component_Value;
3460 procedure Set_Default_Aspect_Value (Id : E; V : E) is
3462 pragma Assert (Is_Scalar_Type (Id));
3464 end Set_Default_Aspect_Value;
3466 procedure Set_Default_Expr_Function (Id : E; V : E) is
3468 pragma Assert (Is_Formal (Id));
3470 end Set_Default_Expr_Function;
3472 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3474 Set_Flag108 (Id, V);
3475 end Set_Default_Expressions_Processed;
3477 procedure Set_Default_Value (Id : E; V : N) is
3479 pragma Assert (Is_Formal (Id));
3481 end Set_Default_Value;
3483 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3487 or else Is_Task_Type (Id)
3488 or else Ekind (Id) = E_Block);
3489 Set_Flag114 (Id, V);
3490 end Set_Delay_Cleanups;
3492 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3495 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3498 end Set_Delay_Subprogram_Descriptors;
3500 procedure Set_Delta_Value (Id : E; V : R) is
3502 pragma Assert (Is_Fixed_Point_Type (Id));
3503 Set_Ureal18 (Id, V);
3504 end Set_Delta_Value;
3506 procedure Set_Dependent_Instances (Id : E; V : L) is
3508 pragma Assert (Is_Generic_Instance (Id));
3510 end Set_Dependent_Instances;
3512 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3514 pragma Assert (Nkind (Id) in N_Entity);
3516 end Set_Depends_On_Private;
3518 procedure Set_Digits_Value (Id : E; V : U) is
3521 (Is_Floating_Point_Type (Id)
3522 or else Is_Decimal_Fixed_Point_Type (Id));
3524 end Set_Digits_Value;
3526 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3529 end Set_Directly_Designated_Type;
3531 procedure Set_Discard_Names (Id : E; V : B := True) is
3534 end Set_Discard_Names;
3536 procedure Set_Discriminal (Id : E; V : E) is
3538 pragma Assert (Ekind (Id) = E_Discriminant);
3540 end Set_Discriminal;
3542 procedure Set_Discriminal_Link (Id : E; V : E) is
3545 end Set_Discriminal_Link;
3547 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3549 pragma Assert (Ekind (Id) = E_Component);
3551 end Set_Discriminant_Checking_Func;
3553 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3555 pragma Assert (Nkind (Id) in N_Entity);
3556 Set_Elist21 (Id, V);
3557 end Set_Discriminant_Constraint;
3559 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3562 end Set_Discriminant_Default_Value;
3564 procedure Set_Discriminant_Number (Id : E; V : U) is
3567 end Set_Discriminant_Number;
3569 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3571 pragma Assert (Ekind (Id) = E_Record_Type
3572 and then Id = Implementation_Base_Type (Id));
3573 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3574 Set_Elist26 (Id, V);
3575 end Set_Dispatch_Table_Wrappers;
3577 procedure Set_DT_Entry_Count (Id : E; V : U) is
3579 pragma Assert (Ekind (Id) = E_Component);
3581 end Set_DT_Entry_Count;
3583 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3585 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3587 end Set_DT_Offset_To_Top_Func;
3589 procedure Set_DT_Position (Id : E; V : U) is
3591 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3593 end Set_DT_Position;
3595 procedure Set_DTC_Entity (Id : E; V : E) is
3597 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3601 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3603 pragma Assert (Ekind (Id) = E_Package);
3604 Set_Flag210 (Id, V);
3605 end Set_Elaborate_Body_Desirable;
3607 procedure Set_Elaboration_Entity (Id : E; V : E) is
3612 Ekind (Id) = E_Package
3614 Is_Generic_Unit (Id));
3616 end Set_Elaboration_Entity;
3618 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3623 Ekind (Id) = E_Package
3625 Is_Generic_Unit (Id));
3626 Set_Flag174 (Id, V);
3627 end Set_Elaboration_Entity_Required;
3629 procedure Set_Enclosing_Scope (Id : E; V : E) is
3632 end Set_Enclosing_Scope;
3634 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3636 pragma Assert (Is_Entry (Id));
3637 Set_Flag152 (Id, V);
3638 end Set_Entry_Accepted;
3640 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3643 end Set_Entry_Bodies_Array;
3645 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3648 end Set_Entry_Cancel_Parameter;
3650 procedure Set_Entry_Component (Id : E; V : E) is
3653 end Set_Entry_Component;
3655 procedure Set_Entry_Formal (Id : E; V : E) is
3658 end Set_Entry_Formal;
3660 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3662 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3664 end Set_Entry_Index_Constant;
3666 procedure Set_Contract (Id : E; V : N) is
3669 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Subprogram_Body, E_Void)
3670 or else Is_Subprogram (Id)
3671 or else Is_Generic_Subprogram (Id));
3675 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3678 end Set_Entry_Parameters_Type;
3680 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3682 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3684 end Set_Enum_Pos_To_Rep;
3686 procedure Set_Enumeration_Pos (Id : E; V : U) is
3688 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3690 end Set_Enumeration_Pos;
3692 procedure Set_Enumeration_Rep (Id : E; V : U) is
3694 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3696 end Set_Enumeration_Rep;
3698 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3700 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3702 end Set_Enumeration_Rep_Expr;
3704 procedure Set_Equivalent_Type (Id : E; V : E) is
3707 (Ekind_In (Id, E_Class_Wide_Type,
3708 E_Class_Wide_Subtype,
3709 E_Access_Protected_Subprogram_Type,
3710 E_Anonymous_Access_Protected_Subprogram_Type,
3711 E_Access_Subprogram_Type,
3714 end Set_Equivalent_Type;
3716 procedure Set_Esize (Id : E; V : U) is
3721 procedure Set_Exception_Code (Id : E; V : U) is
3723 pragma Assert (Ekind (Id) = E_Exception);
3725 end Set_Exception_Code;
3727 procedure Set_Extra_Accessibility (Id : E; V : E) is
3730 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
3732 end Set_Extra_Accessibility;
3734 procedure Set_Extra_Accessibility_Of_Result (Id : E; V : E) is
3736 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
3738 end Set_Extra_Accessibility_Of_Result;
3740 procedure Set_Extra_Constrained (Id : E; V : E) is
3742 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3744 end Set_Extra_Constrained;
3746 procedure Set_Extra_Formal (Id : E; V : E) is
3749 end Set_Extra_Formal;
3751 procedure Set_Extra_Formals (Id : E; V : E) is
3754 (Is_Overloadable (Id)
3755 or else Ekind_In (Id, E_Entry_Family,
3757 E_Subprogram_Type));
3759 end Set_Extra_Formals;
3761 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3764 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3765 Set_Flag229 (Id, V);
3766 end Set_Can_Use_Internal_Rep;
3768 procedure Set_Finalization_Master (Id : E; V : E) is
3770 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3772 end Set_Finalization_Master;
3774 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3776 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3777 Set_Flag158 (Id, V);
3778 end Set_Finalize_Storage_Only;
3780 procedure Set_Finalizer (Id : E; V : E) is
3783 (Ekind (Id) = E_Package
3784 or else Ekind (Id) = E_Package_Body);
3788 procedure Set_First_Entity (Id : E; V : E) is
3791 end Set_First_Entity;
3793 procedure Set_First_Exit_Statement (Id : E; V : N) is
3795 pragma Assert (Ekind (Id) = E_Loop);
3797 end Set_First_Exit_Statement;
3799 procedure Set_First_Index (Id : E; V : N) is
3801 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3803 end Set_First_Index;
3805 procedure Set_First_Literal (Id : E; V : E) is
3807 pragma Assert (Is_Enumeration_Type (Id));
3809 end Set_First_Literal;
3811 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3813 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3815 end Set_First_Optional_Parameter;
3817 procedure Set_First_Private_Entity (Id : E; V : E) is
3819 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
3820 or else Ekind (Id) in Concurrent_Kind);
3822 end Set_First_Private_Entity;
3824 procedure Set_First_Rep_Item (Id : E; V : N) is
3827 end Set_First_Rep_Item;
3829 procedure Set_Float_Rep (Id : E; V : F) is
3830 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
3832 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
3835 procedure Set_Freeze_Node (Id : E; V : N) is
3838 end Set_Freeze_Node;
3840 procedure Set_From_With_Type (Id : E; V : B := True) is
3844 or else Ekind (Id) = E_Package);
3845 Set_Flag159 (Id, V);
3846 end Set_From_With_Type;
3848 procedure Set_Full_View (Id : E; V : E) is
3850 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
3854 procedure Set_Generic_Homonym (Id : E; V : E) is
3857 end Set_Generic_Homonym;
3859 procedure Set_Generic_Renamings (Id : E; V : L) is
3861 Set_Elist23 (Id, V);
3862 end Set_Generic_Renamings;
3864 procedure Set_Handler_Records (Id : E; V : S) is
3867 end Set_Handler_Records;
3869 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
3871 pragma Assert (Id = Base_Type (Id));
3872 Set_Flag135 (Id, V);
3873 end Set_Has_Aliased_Components;
3875 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
3878 end Set_Has_Alignment_Clause;
3880 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
3883 end Set_Has_All_Calls_Remote;
3885 procedure Set_Has_Anonymous_Master (Id : E; V : B := True) is
3888 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
3889 Set_Flag253 (Id, V);
3890 end Set_Has_Anonymous_Master;
3892 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
3894 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
3896 end Set_Has_Atomic_Components;
3898 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
3901 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
3902 Set_Flag139 (Id, V);
3903 end Set_Has_Biased_Representation;
3905 procedure Set_Has_Completion (Id : E; V : B := True) is
3908 end Set_Has_Completion;
3910 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
3912 pragma Assert (Is_Type (Id));
3914 end Set_Has_Completion_In_Body;
3916 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
3918 pragma Assert (Ekind (Id) = E_Record_Type);
3919 Set_Flag140 (Id, V);
3920 end Set_Has_Complex_Representation;
3922 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
3924 pragma Assert (Ekind (Id) = E_Array_Type);
3926 end Set_Has_Component_Size_Clause;
3928 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
3930 pragma Assert (Is_Type (Id));
3931 Set_Flag187 (Id, V);
3932 end Set_Has_Constrained_Partial_View;
3934 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
3936 Set_Flag181 (Id, V);
3937 end Set_Has_Contiguous_Rep;
3939 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
3941 pragma Assert (Id = Base_Type (Id));
3943 end Set_Has_Controlled_Component;
3945 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
3948 end Set_Has_Controlling_Result;
3950 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
3952 Set_Flag119 (Id, V);
3953 end Set_Has_Convention_Pragma;
3955 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
3958 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
3959 and then Is_Base_Type (Id));
3961 end Set_Has_Default_Aspect;
3963 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
3965 pragma Assert (Nkind (Id) in N_Entity);
3966 Set_Flag200 (Id, V);
3967 end Set_Has_Delayed_Aspects;
3969 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
3971 pragma Assert (Nkind (Id) in N_Entity);
3973 end Set_Has_Delayed_Freeze;
3975 procedure Set_Has_Delayed_Rep_Aspects (Id : E; V : B := True) is
3977 pragma Assert (Nkind (Id) in N_Entity);
3978 Set_Flag261 (Id, V);
3979 end Set_Has_Delayed_Rep_Aspects;
3981 procedure Set_Has_Discriminants (Id : E; V : B := True) is
3983 pragma Assert (Nkind (Id) in N_Entity);
3985 end Set_Has_Discriminants;
3987 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
3989 pragma Assert (Ekind (Id) = E_Record_Type
3990 and then Is_Tagged_Type (Id));
3991 Set_Flag220 (Id, V);
3992 end Set_Has_Dispatch_Table;
3994 procedure Set_Has_Dynamic_Predicate_Aspect (Id : E; V : B := True) is
3996 pragma Assert (Is_Type (Id));
3997 Set_Flag258 (Id, V);
3998 end Set_Has_Dynamic_Predicate_Aspect;
4000 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
4002 pragma Assert (Is_Enumeration_Type (Id));
4004 end Set_Has_Enumeration_Rep_Clause;
4006 procedure Set_Has_Exit (Id : E; V : B := True) is
4011 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True) is
4013 pragma Assert (Is_Tagged_Type (Id));
4014 Set_Flag110 (Id, V);
4015 end Set_Has_External_Tag_Rep_Clause;
4017 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
4019 Set_Flag175 (Id, V);
4020 end Set_Has_Forward_Instantiation;
4022 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
4024 Set_Flag173 (Id, V);
4025 end Set_Has_Fully_Qualified_Name;
4027 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
4030 end Set_Has_Gigi_Rep_Item;
4032 procedure Set_Has_Homonym (Id : E; V : B := True) is
4035 end Set_Has_Homonym;
4037 procedure Set_Has_Implicit_Dereference (Id : E; V : B := True) is
4039 Set_Flag251 (Id, V);
4040 end Set_Has_Implicit_Dereference;
4042 procedure Set_Has_Independent_Components (Id : E; V : B := True) is
4044 pragma Assert (Is_Object (Id) or else Is_Type (Id));
4046 end Set_Has_Independent_Components;
4048 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
4050 pragma Assert (Is_Type (Id));
4051 Set_Flag248 (Id, V);
4052 end Set_Has_Inheritable_Invariants;
4054 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
4056 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
4057 Set_Flag219 (Id, V);
4058 end Set_Has_Initial_Value;
4060 procedure Set_Has_Invariants (Id : E; V : B := True) is
4062 pragma Assert (Is_Type (Id));
4063 Set_Flag232 (Id, V);
4064 end Set_Has_Invariants;
4066 procedure Set_Has_Loop_Entry_Attributes (Id : E; V : B := True) is
4068 pragma Assert (Ekind (Id) = E_Loop);
4069 Set_Flag260 (Id, V);
4070 end Set_Has_Loop_Entry_Attributes;
4072 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
4074 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4076 end Set_Has_Machine_Radix_Clause;
4078 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
4081 end Set_Has_Master_Entity;
4083 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
4085 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4086 Set_Flag142 (Id, V);
4087 end Set_Has_Missing_Return;
4089 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
4091 Set_Flag101 (Id, V);
4092 end Set_Has_Nested_Block_With_Handler;
4094 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
4096 pragma Assert (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
4097 Set_Flag215 (Id, V);
4098 end Set_Has_Up_Level_Access;
4100 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
4102 pragma Assert (Id = Base_Type (Id));
4104 end Set_Has_Non_Standard_Rep;
4106 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
4108 pragma Assert (Is_Type (Id));
4109 Set_Flag172 (Id, V);
4110 end Set_Has_Object_Size_Clause;
4112 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
4114 Set_Flag154 (Id, V);
4115 end Set_Has_Per_Object_Constraint;
4117 procedure Set_Has_Postconditions (Id : E; V : B := True) is
4119 pragma Assert (Is_Subprogram (Id));
4120 Set_Flag240 (Id, V);
4121 end Set_Has_Postconditions;
4123 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
4125 pragma Assert (Is_Access_Type (Id));
4126 Set_Flag27 (Base_Type (Id), V);
4127 end Set_Has_Pragma_Controlled;
4129 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
4131 Set_Flag150 (Id, V);
4132 end Set_Has_Pragma_Elaborate_Body;
4134 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
4136 Set_Flag157 (Id, V);
4137 end Set_Has_Pragma_Inline;
4139 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
4141 Set_Flag230 (Id, V);
4142 end Set_Has_Pragma_Inline_Always;
4144 procedure Set_Has_Pragma_No_Inline (Id : E; V : B := True) is
4146 Set_Flag201 (Id, V);
4147 end Set_Has_Pragma_No_Inline;
4149 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
4151 pragma Assert (Is_Enumeration_Type (Id));
4152 pragma Assert (Id = Base_Type (Id));
4153 Set_Flag198 (Id, V);
4154 end Set_Has_Pragma_Ordered;
4156 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
4158 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
4159 pragma Assert (Id = Base_Type (Id));
4160 Set_Flag121 (Id, V);
4161 end Set_Has_Pragma_Pack;
4163 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
4165 Set_Flag221 (Id, V);
4166 end Set_Has_Pragma_Preelab_Init;
4168 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
4170 Set_Flag203 (Id, V);
4171 end Set_Has_Pragma_Pure;
4173 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
4175 Set_Flag179 (Id, V);
4176 end Set_Has_Pragma_Pure_Function;
4178 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
4180 Set_Flag169 (Id, V);
4181 end Set_Has_Pragma_Thread_Local_Storage;
4183 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
4185 Set_Flag233 (Id, V);
4186 end Set_Has_Pragma_Unmodified;
4188 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
4190 Set_Flag180 (Id, V);
4191 end Set_Has_Pragma_Unreferenced;
4193 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
4195 pragma Assert (Is_Type (Id));
4196 Set_Flag212 (Id, V);
4197 end Set_Has_Pragma_Unreferenced_Objects;
4199 procedure Set_Has_Predicates (Id : E; V : B := True) is
4201 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Void);
4202 Set_Flag250 (Id, V);
4203 end Set_Has_Predicates;
4205 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
4207 pragma Assert (Id = Base_Type (Id));
4208 Set_Flag120 (Id, V);
4209 end Set_Has_Primitive_Operations;
4211 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
4213 pragma Assert (Is_Type (Id));
4214 Set_Flag151 (Id, V);
4215 end Set_Has_Private_Ancestor;
4217 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
4219 Set_Flag155 (Id, V);
4220 end Set_Has_Private_Declaration;
4222 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
4224 Set_Flag161 (Id, V);
4225 end Set_Has_Qualified_Name;
4227 procedure Set_Has_RACW (Id : E; V : B := True) is
4229 pragma Assert (Ekind (Id) = E_Package);
4230 Set_Flag214 (Id, V);
4233 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
4235 pragma Assert (Id = Base_Type (Id));
4237 end Set_Has_Record_Rep_Clause;
4239 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
4241 pragma Assert (Is_Subprogram (Id));
4242 Set_Flag143 (Id, V);
4243 end Set_Has_Recursive_Call;
4245 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
4248 end Set_Has_Size_Clause;
4250 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
4253 end Set_Has_Small_Clause;
4255 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
4257 pragma Assert (Id = Base_Type (Id));
4258 Set_Flag100 (Id, V);
4259 end Set_Has_Specified_Layout;
4261 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
4263 pragma Assert (Is_Type (Id));
4264 Set_Flag190 (Id, V);
4265 end Set_Has_Specified_Stream_Input;
4267 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
4269 pragma Assert (Is_Type (Id));
4270 Set_Flag191 (Id, V);
4271 end Set_Has_Specified_Stream_Output;
4273 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
4275 pragma Assert (Is_Type (Id));
4276 Set_Flag192 (Id, V);
4277 end Set_Has_Specified_Stream_Read;
4279 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
4281 pragma Assert (Is_Type (Id));
4282 Set_Flag193 (Id, V);
4283 end Set_Has_Specified_Stream_Write;
4285 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
4287 Set_Flag211 (Id, V);
4288 end Set_Has_Static_Discriminants;
4290 procedure Set_Has_Static_Predicate_Aspect (Id : E; V : B := True) is
4292 pragma Assert (Is_Type (Id));
4293 Set_Flag259 (Id, V);
4294 end Set_Has_Static_Predicate_Aspect;
4296 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
4298 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4299 pragma Assert (Id = Base_Type (Id));
4301 end Set_Has_Storage_Size_Clause;
4303 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4305 pragma Assert (Is_Elementary_Type (Id));
4306 Set_Flag184 (Id, V);
4307 end Set_Has_Stream_Size_Clause;
4309 procedure Set_Has_Task (Id : E; V : B := True) is
4311 pragma Assert (Id = Base_Type (Id));
4315 procedure Set_Has_Thunks (Id : E; V : B := True) is
4317 pragma Assert (Is_Tag (Id));
4318 Set_Flag228 (Id, V);
4321 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4323 pragma Assert (Id = Base_Type (Id));
4324 Set_Flag123 (Id, V);
4325 end Set_Has_Unchecked_Union;
4327 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4329 pragma Assert (Is_Type (Id));
4331 end Set_Has_Unknown_Discriminants;
4333 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4335 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4337 end Set_Has_Volatile_Components;
4339 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4341 Set_Flag182 (Id, V);
4342 end Set_Has_Xref_Entry;
4344 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4346 pragma Assert (Ekind (Id) = E_Variable);
4348 end Set_Hiding_Loop_Variable;
4350 procedure Set_Homonym (Id : E; V : E) is
4352 pragma Assert (Id /= V);
4356 procedure Set_Interface_Alias (Id : E; V : E) is
4360 and then Is_Hidden (Id)
4361 and then (Ekind_In (Id, E_Procedure, E_Function)));
4363 end Set_Interface_Alias;
4365 procedure Set_Interfaces (Id : E; V : L) is
4367 pragma Assert (Is_Record_Type (Id));
4368 Set_Elist25 (Id, V);
4371 procedure Set_In_Package_Body (Id : E; V : B := True) is
4374 end Set_In_Package_Body;
4376 procedure Set_In_Private_Part (Id : E; V : B := True) is
4379 end Set_In_Private_Part;
4381 procedure Set_In_Use (Id : E; V : B := True) is
4383 pragma Assert (Nkind (Id) in N_Entity);
4387 procedure Set_Initialization_Statements (Id : E; V : N) is
4389 -- Tolerate an E_Void entity since this can be called while resolving
4390 -- an aggregate used as the initialization expression for an object
4391 -- declaration, and this occurs before the Ekind for the object is set.
4393 pragma Assert (Ekind_In (Id, E_Void, E_Constant, E_Variable));
4395 end Set_Initialization_Statements;
4397 procedure Set_Inner_Instances (Id : E; V : L) is
4399 Set_Elist23 (Id, V);
4400 end Set_Inner_Instances;
4402 procedure Set_Interface_Name (Id : E; V : N) is
4405 end Set_Interface_Name;
4407 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4409 pragma Assert (Is_Overloadable (Id));
4411 end Set_Is_Abstract_Subprogram;
4413 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4415 pragma Assert (Is_Type (Id));
4416 Set_Flag146 (Id, V);
4417 end Set_Is_Abstract_Type;
4419 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4421 pragma Assert (Is_Access_Type (Id));
4422 Set_Flag194 (Id, V);
4423 end Set_Is_Local_Anonymous_Access;
4425 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4427 pragma Assert (Is_Access_Type (Id));
4429 end Set_Is_Access_Constant;
4431 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4433 Set_Flag185 (Id, V);
4434 end Set_Is_Ada_2005_Only;
4436 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4438 Set_Flag199 (Id, V);
4439 end Set_Is_Ada_2012_Only;
4441 procedure Set_Is_Aliased (Id : E; V : B := True) is
4443 pragma Assert (Nkind (Id) in N_Entity);
4447 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
4449 pragma Assert (Is_Entry (Id));
4450 Set_Flag132 (Id, V);
4451 end Set_Is_AST_Entry;
4453 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4456 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4458 end Set_Is_Asynchronous;
4460 procedure Set_Is_Atomic (Id : E; V : B := True) is
4465 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4467 pragma Assert ((not V)
4468 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4469 Set_Flag122 (Id, V);
4470 end Set_Is_Bit_Packed_Array;
4472 procedure Set_Is_Called (Id : E; V : B := True) is
4474 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4475 Set_Flag102 (Id, V);
4478 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4481 end Set_Is_Character_Type;
4483 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4486 end Set_Is_Child_Unit;
4488 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4491 end Set_Is_Class_Wide_Equivalent_Type;
4493 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4495 Set_Flag149 (Id, V);
4496 end Set_Is_Compilation_Unit;
4498 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4500 pragma Assert (Ekind (Id) = E_Discriminant);
4501 Set_Flag103 (Id, V);
4502 end Set_Is_Completely_Hidden;
4504 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4507 end Set_Is_Concurrent_Record_Type;
4509 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4512 end Set_Is_Constr_Subt_For_U_Nominal;
4514 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4516 Set_Flag141 (Id, V);
4517 end Set_Is_Constr_Subt_For_UN_Aliased;
4519 procedure Set_Is_Constrained (Id : E; V : B := True) is
4521 pragma Assert (Nkind (Id) in N_Entity);
4523 end Set_Is_Constrained;
4525 procedure Set_Is_Constructor (Id : E; V : B := True) is
4528 end Set_Is_Constructor;
4530 procedure Set_Is_Controlled (Id : E; V : B := True) is
4532 pragma Assert (Id = Base_Type (Id));
4534 end Set_Is_Controlled;
4536 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4538 pragma Assert (Is_Formal (Id));
4540 end Set_Is_Controlling_Formal;
4542 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4545 end Set_Is_CPP_Class;
4547 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4549 pragma Assert (Is_Type (Id));
4550 Set_Flag223 (Id, V);
4551 end Set_Is_Descendent_Of_Address;
4553 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4555 Set_Flag176 (Id, V);
4556 end Set_Is_Discrim_SO_Function;
4558 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4560 Set_Flag234 (Id, V);
4561 end Set_Is_Dispatch_Table_Entity;
4563 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4568 Is_Overloadable (Id)
4570 Ekind (Id) = E_Subprogram_Type);
4573 end Set_Is_Dispatching_Operation;
4575 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4577 Set_Flag124 (Id, V);
4578 end Set_Is_Eliminated;
4580 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4583 end Set_Is_Entry_Formal;
4585 procedure Set_Is_Exported (Id : E; V : B := True) is
4588 end Set_Is_Exported;
4590 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4593 end Set_Is_First_Subtype;
4595 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4597 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4598 Set_Flag118 (Id, V);
4599 end Set_Is_For_Access_Subtype;
4601 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4603 Set_Flag111 (Id, V);
4604 end Set_Is_Formal_Subprogram;
4606 procedure Set_Is_Frozen (Id : E; V : B := True) is
4608 pragma Assert (Nkind (Id) in N_Entity);
4612 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4614 pragma Assert (Is_Type (Id));
4616 end Set_Is_Generic_Actual_Type;
4618 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4620 Set_Flag130 (Id, V);
4621 end Set_Is_Generic_Instance;
4623 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4625 pragma Assert (Nkind (Id) in N_Entity);
4627 end Set_Is_Generic_Type;
4629 procedure Set_Is_Hidden (Id : E; V : B := True) is
4634 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4636 Set_Flag171 (Id, V);
4637 end Set_Is_Hidden_Open_Scope;
4639 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4641 pragma Assert (Nkind (Id) in N_Entity);
4643 end Set_Is_Immediately_Visible;
4645 procedure Set_Is_Implementation_Defined (Id : E; V : B := True) is
4647 Set_Flag254 (Id, V);
4648 end Set_Is_Implementation_Defined;
4650 procedure Set_Is_Imported (Id : E; V : B := True) is
4653 end Set_Is_Imported;
4655 procedure Set_Is_Inlined (Id : E; V : B := True) is
4660 procedure Set_Is_Interface (Id : E; V : B := True) is
4662 pragma Assert (Is_Record_Type (Id));
4663 Set_Flag186 (Id, V);
4664 end Set_Is_Interface;
4666 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4668 Set_Flag126 (Id, V);
4669 end Set_Is_Instantiated;
4671 procedure Set_Is_Internal (Id : E; V : B := True) is
4673 pragma Assert (Nkind (Id) in N_Entity);
4675 end Set_Is_Internal;
4677 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4679 pragma Assert (Nkind (Id) in N_Entity);
4681 end Set_Is_Interrupt_Handler;
4683 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4686 end Set_Is_Intrinsic_Subprogram;
4688 procedure Set_Is_Invariant_Procedure (Id : E; V : B := True) is
4690 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4691 Set_Flag257 (Id, V);
4692 end Set_Is_Invariant_Procedure;
4694 procedure Set_Is_Itype (Id : E; V : B := True) is
4699 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4702 end Set_Is_Known_Non_Null;
4704 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4706 Set_Flag204 (Id, V);
4707 end Set_Is_Known_Null;
4709 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4711 Set_Flag170 (Id, V);
4712 end Set_Is_Known_Valid;
4714 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4716 pragma Assert (Is_Type (Id));
4717 Set_Flag106 (Id, V);
4718 end Set_Is_Limited_Composite;
4720 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4722 pragma Assert (Is_Interface (Id));
4723 Set_Flag197 (Id, V);
4724 end Set_Is_Limited_Interface;
4726 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4729 end Set_Is_Limited_Record;
4731 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4733 pragma Assert (Is_Subprogram (Id));
4734 Set_Flag137 (Id, V);
4735 end Set_Is_Machine_Code_Subprogram;
4737 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4739 pragma Assert (Is_Type (Id));
4740 Set_Flag109 (Id, V);
4741 end Set_Is_Non_Static_Subtype;
4743 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4745 pragma Assert (Ekind (Id) = E_Procedure);
4746 Set_Flag178 (Id, V);
4747 end Set_Is_Null_Init_Proc;
4749 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4751 Set_Flag153 (Id, V);
4752 end Set_Is_Obsolescent;
4754 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
4756 pragma Assert (Ekind (Id) = E_Out_Parameter);
4757 Set_Flag226 (Id, V);
4758 end Set_Is_Only_Out_Parameter;
4760 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
4762 pragma Assert (Is_Formal (Id));
4763 Set_Flag134 (Id, V);
4764 end Set_Is_Optional_Parameter;
4766 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
4768 Set_Flag160 (Id, V);
4769 end Set_Is_Package_Body_Entity;
4771 procedure Set_Is_Packed (Id : E; V : B := True) is
4773 pragma Assert (Id = Base_Type (Id));
4777 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
4779 Set_Flag138 (Id, V);
4780 end Set_Is_Packed_Array_Type;
4782 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
4784 pragma Assert (Nkind (Id) in N_Entity);
4786 end Set_Is_Potentially_Use_Visible;
4788 procedure Set_Is_Predicate_Function (Id : E; V : B := True) is
4790 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4791 Set_Flag255 (Id, V);
4792 end Set_Is_Predicate_Function;
4794 procedure Set_Is_Predicate_Function_M (Id : E; V : B := True) is
4796 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4797 Set_Flag256 (Id, V);
4798 end Set_Is_Predicate_Function_M;
4800 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
4803 end Set_Is_Preelaborated;
4805 procedure Set_Is_Primitive (Id : E; V : B := True) is
4808 (Is_Overloadable (Id)
4809 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
4810 Set_Flag218 (Id, V);
4811 end Set_Is_Primitive;
4813 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
4815 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4816 Set_Flag195 (Id, V);
4817 end Set_Is_Primitive_Wrapper;
4819 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
4821 pragma Assert (Is_Type (Id));
4822 Set_Flag107 (Id, V);
4823 end Set_Is_Private_Composite;
4825 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
4828 end Set_Is_Private_Descendant;
4830 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
4832 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4833 Set_Flag245 (Id, V);
4834 end Set_Is_Private_Primitive;
4836 procedure Set_Is_Processed_Transient (Id : E; V : B := True) is
4838 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
4839 Set_Flag252 (Id, V);
4840 end Set_Is_Processed_Transient;
4842 procedure Set_Is_Public (Id : E; V : B := True) is
4844 pragma Assert (Nkind (Id) in N_Entity);
4848 procedure Set_Is_Pure (Id : E; V : B := True) is
4853 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
4855 pragma Assert (Is_Access_Type (Id));
4856 Set_Flag189 (Id, V);
4857 end Set_Is_Pure_Unit_Access_Type;
4859 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
4861 pragma Assert (Is_Type (Id));
4862 Set_Flag244 (Id, V);
4863 end Set_Is_RACW_Stub_Type;
4865 procedure Set_Is_Raised (Id : E; V : B := True) is
4867 pragma Assert (Ekind (Id) = E_Exception);
4868 Set_Flag224 (Id, V);
4871 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
4874 end Set_Is_Remote_Call_Interface;
4876 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
4879 end Set_Is_Remote_Types;
4881 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
4883 Set_Flag112 (Id, V);
4884 end Set_Is_Renaming_Of_Object;
4886 procedure Set_Is_Return_Object (Id : E; V : B := True) is
4888 Set_Flag209 (Id, V);
4889 end Set_Is_Return_Object;
4891 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
4893 pragma Assert (Ekind (Id) = E_Variable);
4894 Set_Flag249 (Id, V);
4895 end Set_Is_Safe_To_Reevaluate;
4897 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
4900 end Set_Is_Shared_Passive;
4902 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
4906 or else Ekind_In (Id, E_Exception,
4911 end Set_Is_Statically_Allocated;
4913 procedure Set_Is_Tag (Id : E; V : B := True) is
4915 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
4919 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
4922 end Set_Is_Tagged_Type;
4924 procedure Set_Is_Thunk (Id : E; V : B := True) is
4926 pragma Assert (Is_Subprogram (Id));
4927 Set_Flag225 (Id, V);
4930 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
4932 Set_Flag235 (Id, V);
4933 end Set_Is_Trivial_Subprogram;
4935 procedure Set_Is_True_Constant (Id : E; V : B := True) is
4937 Set_Flag163 (Id, V);
4938 end Set_Is_True_Constant;
4940 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
4942 pragma Assert (Id = Base_Type (Id));
4943 Set_Flag117 (Id, V);
4944 end Set_Is_Unchecked_Union;
4946 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
4948 pragma Assert (Ekind (Id) = E_Record_Type);
4949 Set_Flag246 (Id, V);
4950 end Set_Is_Underlying_Record_View;
4952 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
4954 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
4955 Set_Flag144 (Id, V);
4956 end Set_Is_Unsigned_Type;
4958 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
4960 pragma Assert (Ekind (Id) = E_Procedure);
4961 Set_Flag127 (Id, V);
4962 end Set_Is_Valued_Procedure;
4964 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
4966 Set_Flag206 (Id, V);
4967 end Set_Is_Visible_Formal;
4969 procedure Set_Is_Visible_Lib_Unit (Id : E; V : B := True) is
4971 Set_Flag116 (Id, V);
4972 end Set_Is_Visible_Lib_Unit;
4974 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
4976 pragma Assert (Ekind (Id) = E_Exception);
4977 Set_Flag133 (Id, V);
4978 end Set_Is_VMS_Exception;
4980 procedure Set_Is_Volatile (Id : E; V : B := True) is
4982 pragma Assert (Nkind (Id) in N_Entity);
4984 end Set_Is_Volatile;
4986 procedure Set_Itype_Printed (Id : E; V : B := True) is
4988 pragma Assert (Is_Itype (Id));
4989 Set_Flag202 (Id, V);
4990 end Set_Itype_Printed;
4992 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
4995 end Set_Kill_Elaboration_Checks;
4997 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
5000 end Set_Kill_Range_Checks;
5002 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
5004 pragma Assert (Is_Type (Id));
5005 Set_Flag207 (Id, V);
5006 end Set_Known_To_Have_Preelab_Init;
5008 procedure Set_Last_Assignment (Id : E; V : N) is
5010 pragma Assert (Is_Assignable (Id));
5012 end Set_Last_Assignment;
5014 procedure Set_Last_Entity (Id : E; V : E) is
5017 end Set_Last_Entity;
5019 procedure Set_Limited_View (Id : E; V : E) is
5021 pragma Assert (Ekind (Id) = E_Package);
5023 end Set_Limited_View;
5025 procedure Set_Lit_Indexes (Id : E; V : E) is
5027 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5029 end Set_Lit_Indexes;
5031 procedure Set_Lit_Strings (Id : E; V : E) is
5033 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5035 end Set_Lit_Strings;
5037 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
5039 pragma Assert (Is_Formal (Id));
5040 Set_Flag205 (Id, V);
5041 end Set_Low_Bound_Tested;
5043 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
5045 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
5047 end Set_Machine_Radix_10;
5049 procedure Set_Master_Id (Id : E; V : E) is
5051 pragma Assert (Is_Access_Type (Id));
5055 procedure Set_Materialize_Entity (Id : E; V : B := True) is
5057 Set_Flag168 (Id, V);
5058 end Set_Materialize_Entity;
5060 procedure Set_May_Inherit_Delayed_Rep_Aspects (Id : E; V : B := True) is
5062 Set_Flag262 (Id, V);
5063 end Set_May_Inherit_Delayed_Rep_Aspects;
5065 procedure Set_Mechanism (Id : E; V : M) is
5067 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
5068 Set_Uint8 (Id, UI_From_Int (V));
5071 procedure Set_Modulus (Id : E; V : U) is
5073 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
5077 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
5079 pragma Assert (Is_Type (Id));
5080 Set_Flag183 (Id, V);
5081 end Set_Must_Be_On_Byte_Boundary;
5083 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
5085 pragma Assert (Is_Type (Id));
5086 Set_Flag208 (Id, V);
5087 end Set_Must_Have_Preelab_Init;
5089 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
5091 Set_Flag147 (Id, V);
5092 end Set_Needs_Debug_Info;
5094 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
5097 (Is_Overloadable (Id)
5098 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
5100 end Set_Needs_No_Actuals;
5102 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
5104 Set_Flag115 (Id, V);
5105 end Set_Never_Set_In_Source;
5107 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
5110 end Set_Next_Inlined_Subprogram;
5112 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
5114 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5115 Set_Flag131 (Id, V);
5116 end Set_No_Pool_Assigned;
5118 procedure Set_No_Return (Id : E; V : B := True) is
5121 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
5122 Set_Flag113 (Id, V);
5125 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
5127 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5128 Set_Flag136 (Id, V);
5129 end Set_No_Strict_Aliasing;
5131 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
5133 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5135 end Set_Non_Binary_Modulus;
5137 procedure Set_Non_Limited_View (Id : E; V : E) is
5139 pragma Assert (Ekind (Id) in Incomplete_Kind);
5141 end Set_Non_Limited_View;
5143 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
5146 (Root_Type (Id) = Standard_Boolean
5147 and then Ekind (Id) = E_Enumeration_Type);
5148 Set_Flag162 (Id, V);
5149 end Set_Nonzero_Is_True;
5151 procedure Set_Normalized_First_Bit (Id : E; V : U) is
5153 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5155 end Set_Normalized_First_Bit;
5157 procedure Set_Normalized_Position (Id : E; V : U) is
5159 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5161 end Set_Normalized_Position;
5163 procedure Set_Normalized_Position_Max (Id : E; V : U) is
5165 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5167 end Set_Normalized_Position_Max;
5169 procedure Set_OK_To_Rename (Id : E; V : B := True) is
5171 pragma Assert (Ekind (Id) = E_Variable);
5172 Set_Flag247 (Id, V);
5173 end Set_OK_To_Rename;
5175 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
5178 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5179 Set_Flag239 (Id, V);
5180 end Set_OK_To_Reorder_Components;
5182 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
5185 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5186 Set_Flag241 (Id, V);
5187 end Set_Optimize_Alignment_Space;
5189 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
5192 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5193 Set_Flag242 (Id, V);
5194 end Set_Optimize_Alignment_Time;
5196 procedure Set_Original_Access_Type (Id : E; V : E) is
5198 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
5200 end Set_Original_Access_Type;
5202 procedure Set_Original_Array_Type (Id : E; V : E) is
5204 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
5206 end Set_Original_Array_Type;
5208 procedure Set_Original_Record_Component (Id : E; V : E) is
5210 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
5212 end Set_Original_Record_Component;
5214 procedure Set_Overlays_Constant (Id : E; V : B := True) is
5216 Set_Flag243 (Id, V);
5217 end Set_Overlays_Constant;
5219 procedure Set_Overridden_Operation (Id : E; V : E) is
5222 end Set_Overridden_Operation;
5224 procedure Set_Package_Instantiation (Id : E; V : N) is
5226 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
5228 end Set_Package_Instantiation;
5230 procedure Set_Packed_Array_Type (Id : E; V : E) is
5232 pragma Assert (Is_Array_Type (Id));
5234 end Set_Packed_Array_Type;
5236 procedure Set_Parent_Subtype (Id : E; V : E) is
5238 pragma Assert (Ekind (Id) = E_Record_Type);
5240 end Set_Parent_Subtype;
5242 procedure Set_Postcondition_Proc (Id : E; V : E) is
5244 pragma Assert (Ekind (Id) = E_Procedure);
5246 end Set_Postcondition_Proc;
5248 procedure Set_PPC_Wrapper (Id : E; V : E) is
5250 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
5252 end Set_PPC_Wrapper;
5254 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
5256 pragma Assert (Is_Tagged_Type (Id));
5257 Set_Elist10 (Id, V);
5258 end Set_Direct_Primitive_Operations;
5260 procedure Set_Prival (Id : E; V : E) is
5262 pragma Assert (Is_Protected_Component (Id));
5266 procedure Set_Prival_Link (Id : E; V : E) is
5268 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5270 end Set_Prival_Link;
5272 procedure Set_Private_Dependents (Id : E; V : L) is
5274 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
5275 Set_Elist18 (Id, V);
5276 end Set_Private_Dependents;
5278 procedure Set_Private_View (Id : E; V : N) is
5280 pragma Assert (Is_Private_Type (Id));
5282 end Set_Private_View;
5284 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
5286 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
5288 end Set_Protected_Body_Subprogram;
5290 procedure Set_Protected_Formal (Id : E; V : E) is
5292 pragma Assert (Is_Formal (Id));
5294 end Set_Protected_Formal;
5296 procedure Set_Protection_Object (Id : E; V : E) is
5298 pragma Assert (Ekind_In (Id, E_Entry,
5303 end Set_Protection_Object;
5305 procedure Set_Reachable (Id : E; V : B := True) is
5310 procedure Set_Referenced (Id : E; V : B := True) is
5312 Set_Flag156 (Id, V);
5315 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
5318 end Set_Referenced_As_LHS;
5320 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
5322 Set_Flag227 (Id, V);
5323 end Set_Referenced_As_Out_Parameter;
5325 procedure Set_Refined_State (Id : E; V : E) is
5327 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
5329 end Set_Refined_State;
5331 procedure Set_Refined_State_Pragma (Id : E; V : N) is
5333 pragma Assert (Ekind (Id) = E_Package_Body);
5335 end Set_Refined_State_Pragma;
5337 procedure Set_Refinement_Constituents (Id : E; V : L) is
5339 pragma Assert (Ekind (Id) = E_Abstract_State);
5341 end Set_Refinement_Constituents;
5343 procedure Set_Register_Exception_Call (Id : E; V : N) is
5345 pragma Assert (Ekind (Id) = E_Exception);
5347 end Set_Register_Exception_Call;
5349 procedure Set_Related_Array_Object (Id : E; V : E) is
5351 pragma Assert (Is_Array_Type (Id));
5353 end Set_Related_Array_Object;
5355 procedure Set_Related_Expression (Id : E; V : N) is
5357 pragma Assert (Ekind (Id) in Type_Kind
5358 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
5360 end Set_Related_Expression;
5362 procedure Set_Related_Instance (Id : E; V : E) is
5364 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
5366 end Set_Related_Instance;
5368 procedure Set_Related_Type (Id : E; V : E) is
5370 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5372 end Set_Related_Type;
5374 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5376 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
5378 end Set_Relative_Deadline_Variable;
5380 procedure Set_Renamed_Entity (Id : E; V : N) is
5383 end Set_Renamed_Entity;
5385 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5387 pragma Assert (Ekind (Id) = E_Package);
5388 Set_Flag231 (Id, V);
5389 end Set_Renamed_In_Spec;
5391 procedure Set_Renamed_Object (Id : E; V : N) is
5394 end Set_Renamed_Object;
5396 procedure Set_Renaming_Map (Id : E; V : U) is
5399 end Set_Renaming_Map;
5401 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5403 pragma Assert (Is_Overloadable (Id));
5404 Set_Flag213 (Id, V);
5405 end Set_Requires_Overriding;
5407 procedure Set_Return_Present (Id : E; V : B := True) is
5410 end Set_Return_Present;
5412 procedure Set_Return_Applies_To (Id : E; V : N) is
5415 end Set_Return_Applies_To;
5417 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5420 end Set_Returns_By_Ref;
5422 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5425 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5426 Set_Flag164 (Id, V);
5427 end Set_Reverse_Bit_Order;
5429 procedure Set_Reverse_Storage_Order (Id : E; V : B := True) is
5433 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5435 end Set_Reverse_Storage_Order;
5437 procedure Set_RM_Size (Id : E; V : U) is
5439 pragma Assert (Is_Type (Id));
5443 procedure Set_Scalar_Range (Id : E; V : N) is
5446 end Set_Scalar_Range;
5448 procedure Set_Scale_Value (Id : E; V : U) is
5451 end Set_Scale_Value;
5453 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5455 pragma Assert (not Is_Record_Type (Id));
5457 end Set_Scope_Depth_Value;
5459 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5461 Set_Flag167 (Id, V);
5462 end Set_Sec_Stack_Needed_For_Return;
5464 procedure Set_Shadow_Entities (Id : E; V : S) is
5466 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5468 end Set_Shadow_Entities;
5470 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5472 pragma Assert (Ekind (Id) = E_Variable);
5474 end Set_Shared_Var_Procs_Instance;
5476 procedure Set_Size_Check_Code (Id : E; V : N) is
5478 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5480 end Set_Size_Check_Code;
5482 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5484 Set_Flag177 (Id, V);
5485 end Set_Size_Depends_On_Discriminant;
5487 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5490 end Set_Size_Known_At_Compile_Time;
5492 procedure Set_Small_Value (Id : E; V : R) is
5494 pragma Assert (Is_Fixed_Point_Type (Id));
5495 Set_Ureal21 (Id, V);
5496 end Set_Small_Value;
5498 procedure Set_SPARK_Mode_Pragmas (Id : E; V : N) is
5501 (Ekind_In (Id, E_Function, -- subprogram variants
5503 E_Generic_Procedure,
5507 Ekind_In (Id, E_Generic_Package, -- package variants
5512 end Set_SPARK_Mode_Pragmas;
5514 procedure Set_Spec_Entity (Id : E; V : E) is
5516 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5518 end Set_Spec_Entity;
5520 procedure Set_Static_Predicate (Id : E; V : S) is
5523 (Ekind_In (Id, E_Enumeration_Subtype,
5524 E_Modular_Integer_Subtype,
5525 E_Signed_Integer_Subtype)
5526 and then Has_Predicates (Id));
5528 end Set_Static_Predicate;
5530 procedure Set_Status_Flag_Or_Transient_Decl (Id : E; V : E) is
5532 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5534 end Set_Status_Flag_Or_Transient_Decl;
5536 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5538 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5539 pragma Assert (Id = Base_Type (Id));
5541 end Set_Storage_Size_Variable;
5543 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5545 pragma Assert (Ekind (Id) = E_Package);
5547 end Set_Static_Elaboration_Desired;
5549 procedure Set_Static_Initialization (Id : E; V : N) is
5552 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5554 end Set_Static_Initialization;
5556 procedure Set_Stored_Constraint (Id : E; V : L) is
5558 pragma Assert (Nkind (Id) in N_Entity);
5559 Set_Elist23 (Id, V);
5560 end Set_Stored_Constraint;
5562 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5564 pragma Assert (Id = Base_Type (Id));
5565 Set_Flag145 (Id, V);
5566 end Set_Strict_Alignment;
5568 procedure Set_String_Literal_Length (Id : E; V : U) is
5570 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5572 end Set_String_Literal_Length;
5574 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5576 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5578 end Set_String_Literal_Low_Bound;
5580 procedure Set_Subprograms_For_Type (Id : E; V : E) is
5582 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
5584 end Set_Subprograms_For_Type;
5586 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5588 Set_Flag148 (Id, V);
5589 end Set_Suppress_Elaboration_Warnings;
5591 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
5593 pragma Assert (Is_Type (Id));
5594 Set_Flag105 (Id, V);
5595 end Set_Suppress_Initialization;
5597 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5599 Set_Flag165 (Id, V);
5600 end Set_Suppress_Style_Checks;
5602 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5604 Set_Flag217 (Id, V);
5605 end Set_Suppress_Value_Tracking_On_Call;
5607 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5609 pragma Assert (Ekind (Id) in Task_Kind);
5611 end Set_Task_Body_Procedure;
5613 procedure Set_Thunk_Entity (Id : E; V : E) is
5615 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5616 and then Is_Thunk (Id));
5618 end Set_Thunk_Entity;
5620 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5623 end Set_Treat_As_Volatile;
5625 procedure Set_Underlying_Full_View (Id : E; V : E) is
5627 pragma Assert (Ekind (Id) in Private_Kind);
5629 end Set_Underlying_Full_View;
5631 procedure Set_Underlying_Record_View (Id : E; V : E) is
5633 pragma Assert (Ekind (Id) = E_Record_Type);
5635 end Set_Underlying_Record_View;
5637 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5639 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5640 Set_Flag216 (Id, V);
5641 end Set_Universal_Aliasing;
5643 procedure Set_Unset_Reference (Id : E; V : N) is
5646 end Set_Unset_Reference;
5648 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5650 Set_Flag222 (Id, V);
5651 end Set_Used_As_Generic_Actual;
5653 procedure Set_Uses_Lock_Free (Id : E; V : B := True) is
5655 pragma Assert (Ekind (Id) = E_Protected_Type);
5656 Set_Flag188 (Id, V);
5657 end Set_Uses_Lock_Free;
5659 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5662 end Set_Uses_Sec_Stack;
5664 procedure Set_Warnings_Off (Id : E; V : B := True) is
5667 end Set_Warnings_Off;
5669 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
5671 Set_Flag236 (Id, V);
5672 end Set_Warnings_Off_Used;
5674 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
5676 Set_Flag237 (Id, V);
5677 end Set_Warnings_Off_Used_Unmodified;
5679 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
5681 Set_Flag238 (Id, V);
5682 end Set_Warnings_Off_Used_Unreferenced;
5684 procedure Set_Was_Hidden (Id : E; V : B := True) is
5686 Set_Flag196 (Id, V);
5689 procedure Set_Wrapped_Entity (Id : E; V : E) is
5691 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5692 and then Is_Primitive_Wrapper (Id));
5694 end Set_Wrapped_Entity;
5696 -----------------------------------
5697 -- Field Initialization Routines --
5698 -----------------------------------
5700 procedure Init_Alignment (Id : E) is
5702 Set_Uint14 (Id, Uint_0);
5705 procedure Init_Alignment (Id : E; V : Int) is
5707 Set_Uint14 (Id, UI_From_Int (V));
5710 procedure Init_Component_Bit_Offset (Id : E) is
5712 Set_Uint11 (Id, No_Uint);
5713 end Init_Component_Bit_Offset;
5715 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
5717 Set_Uint11 (Id, UI_From_Int (V));
5718 end Init_Component_Bit_Offset;
5720 procedure Init_Component_Size (Id : E) is
5722 Set_Uint22 (Id, Uint_0);
5723 end Init_Component_Size;
5725 procedure Init_Component_Size (Id : E; V : Int) is
5727 Set_Uint22 (Id, UI_From_Int (V));
5728 end Init_Component_Size;
5730 procedure Init_Digits_Value (Id : E) is
5732 Set_Uint17 (Id, Uint_0);
5733 end Init_Digits_Value;
5735 procedure Init_Digits_Value (Id : E; V : Int) is
5737 Set_Uint17 (Id, UI_From_Int (V));
5738 end Init_Digits_Value;
5740 procedure Init_Esize (Id : E) is
5742 Set_Uint12 (Id, Uint_0);
5745 procedure Init_Esize (Id : E; V : Int) is
5747 Set_Uint12 (Id, UI_From_Int (V));
5750 procedure Init_Normalized_First_Bit (Id : E) is
5752 Set_Uint8 (Id, No_Uint);
5753 end Init_Normalized_First_Bit;
5755 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
5757 Set_Uint8 (Id, UI_From_Int (V));
5758 end Init_Normalized_First_Bit;
5760 procedure Init_Normalized_Position (Id : E) is
5762 Set_Uint14 (Id, No_Uint);
5763 end Init_Normalized_Position;
5765 procedure Init_Normalized_Position (Id : E; V : Int) is
5767 Set_Uint14 (Id, UI_From_Int (V));
5768 end Init_Normalized_Position;
5770 procedure Init_Normalized_Position_Max (Id : E) is
5772 Set_Uint10 (Id, No_Uint);
5773 end Init_Normalized_Position_Max;
5775 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
5777 Set_Uint10 (Id, UI_From_Int (V));
5778 end Init_Normalized_Position_Max;
5780 procedure Init_RM_Size (Id : E) is
5782 Set_Uint13 (Id, Uint_0);
5785 procedure Init_RM_Size (Id : E; V : Int) is
5787 Set_Uint13 (Id, UI_From_Int (V));
5790 -----------------------------
5791 -- Init_Component_Location --
5792 -----------------------------
5794 procedure Init_Component_Location (Id : E) is
5796 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
5797 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
5798 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
5799 Set_Uint12 (Id, Uint_0); -- Esize
5800 Set_Uint14 (Id, No_Uint); -- Normalized_Position
5801 end Init_Component_Location;
5803 ----------------------------
5804 -- Init_Object_Size_Align --
5805 ----------------------------
5807 procedure Init_Object_Size_Align (Id : E) is
5809 Set_Uint12 (Id, Uint_0); -- Esize
5810 Set_Uint14 (Id, Uint_0); -- Alignment
5811 end Init_Object_Size_Align;
5817 procedure Init_Size (Id : E; V : Int) is
5819 pragma Assert (not Is_Object (Id));
5820 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
5821 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
5824 ---------------------
5825 -- Init_Size_Align --
5826 ---------------------
5828 procedure Init_Size_Align (Id : E) is
5830 pragma Assert (not Is_Object (Id));
5831 Set_Uint12 (Id, Uint_0); -- Esize
5832 Set_Uint13 (Id, Uint_0); -- RM_Size
5833 Set_Uint14 (Id, Uint_0); -- Alignment
5834 end Init_Size_Align;
5836 ----------------------------------------------
5837 -- Type Representation Attribute Predicates --
5838 ----------------------------------------------
5840 function Known_Alignment (E : Entity_Id) return B is
5842 return Uint14 (E) /= Uint_0
5843 and then Uint14 (E) /= No_Uint;
5844 end Known_Alignment;
5846 function Known_Component_Bit_Offset (E : Entity_Id) return B is
5848 return Uint11 (E) /= No_Uint;
5849 end Known_Component_Bit_Offset;
5851 function Known_Component_Size (E : Entity_Id) return B is
5853 return Uint22 (Base_Type (E)) /= Uint_0
5854 and then Uint22 (Base_Type (E)) /= No_Uint;
5855 end Known_Component_Size;
5857 function Known_Esize (E : Entity_Id) return B is
5859 return Uint12 (E) /= Uint_0
5860 and then Uint12 (E) /= No_Uint;
5863 function Known_Normalized_First_Bit (E : Entity_Id) return B is
5865 return Uint8 (E) /= No_Uint;
5866 end Known_Normalized_First_Bit;
5868 function Known_Normalized_Position (E : Entity_Id) return B is
5870 return Uint14 (E) /= No_Uint;
5871 end Known_Normalized_Position;
5873 function Known_Normalized_Position_Max (E : Entity_Id) return B is
5875 return Uint10 (E) /= No_Uint;
5876 end Known_Normalized_Position_Max;
5878 function Known_RM_Size (E : Entity_Id) return B is
5880 return Uint13 (E) /= No_Uint
5881 and then (Uint13 (E) /= Uint_0
5882 or else Is_Discrete_Type (E)
5883 or else Is_Fixed_Point_Type (E));
5886 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
5888 return Uint11 (E) /= No_Uint
5889 and then Uint11 (E) >= Uint_0;
5890 end Known_Static_Component_Bit_Offset;
5892 function Known_Static_Component_Size (E : Entity_Id) return B is
5894 return Uint22 (Base_Type (E)) > Uint_0;
5895 end Known_Static_Component_Size;
5897 function Known_Static_Esize (E : Entity_Id) return B is
5899 return Uint12 (E) > Uint_0
5900 and then not Is_Generic_Type (E);
5901 end Known_Static_Esize;
5903 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
5905 return Uint8 (E) /= No_Uint
5906 and then Uint8 (E) >= Uint_0;
5907 end Known_Static_Normalized_First_Bit;
5909 function Known_Static_Normalized_Position (E : Entity_Id) return B is
5911 return Uint14 (E) /= No_Uint
5912 and then Uint14 (E) >= Uint_0;
5913 end Known_Static_Normalized_Position;
5915 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
5917 return Uint10 (E) /= No_Uint
5918 and then Uint10 (E) >= Uint_0;
5919 end Known_Static_Normalized_Position_Max;
5921 function Known_Static_RM_Size (E : Entity_Id) return B is
5923 return (Uint13 (E) > Uint_0
5924 or else Is_Discrete_Type (E)
5925 or else Is_Fixed_Point_Type (E))
5926 and then not Is_Generic_Type (E);
5927 end Known_Static_RM_Size;
5929 function Unknown_Alignment (E : Entity_Id) return B is
5931 return Uint14 (E) = Uint_0
5932 or else Uint14 (E) = No_Uint;
5933 end Unknown_Alignment;
5935 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
5937 return Uint11 (E) = No_Uint;
5938 end Unknown_Component_Bit_Offset;
5940 function Unknown_Component_Size (E : Entity_Id) return B is
5942 return Uint22 (Base_Type (E)) = Uint_0
5944 Uint22 (Base_Type (E)) = No_Uint;
5945 end Unknown_Component_Size;
5947 function Unknown_Esize (E : Entity_Id) return B is
5949 return Uint12 (E) = No_Uint
5951 Uint12 (E) = Uint_0;
5954 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
5956 return Uint8 (E) = No_Uint;
5957 end Unknown_Normalized_First_Bit;
5959 function Unknown_Normalized_Position (E : Entity_Id) return B is
5961 return Uint14 (E) = No_Uint;
5962 end Unknown_Normalized_Position;
5964 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
5966 return Uint10 (E) = No_Uint;
5967 end Unknown_Normalized_Position_Max;
5969 function Unknown_RM_Size (E : Entity_Id) return B is
5971 return (Uint13 (E) = Uint_0
5972 and then not Is_Discrete_Type (E)
5973 and then not Is_Fixed_Point_Type (E))
5974 or else Uint13 (E) = No_Uint;
5975 end Unknown_RM_Size;
5977 --------------------
5978 -- Address_Clause --
5979 --------------------
5981 function Address_Clause (Id : E) return N is
5983 return Get_Attribute_Definition_Clause (Id, Attribute_Address);
5990 function Aft_Value (Id : E) return U is
5992 Delta_Val : Ureal := Delta_Value (Id);
5994 while Delta_Val < Ureal_Tenth loop
5995 Delta_Val := Delta_Val * Ureal_10;
5996 Result := Result + 1;
5999 return UI_From_Int (Result);
6002 ----------------------
6003 -- Alignment_Clause --
6004 ----------------------
6006 function Alignment_Clause (Id : E) return N is
6008 return Get_Attribute_Definition_Clause (Id, Attribute_Alignment);
6009 end Alignment_Clause;
6015 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
6017 if Last_Entity (V) = Empty then
6018 Set_First_Entity (Id => V, V => Id);
6020 Set_Next_Entity (Last_Entity (V), Id);
6023 Set_Next_Entity (Id, Empty);
6025 Set_Last_Entity (Id => V, V => Id);
6032 function Base_Type (Id : E) return E is
6034 if Is_Base_Type (Id) then
6037 pragma Assert (Is_Type (Id));
6042 -------------------------
6043 -- Component_Alignment --
6044 -------------------------
6046 -- Component Alignment is encoded using two flags, Flag128/129 as
6047 -- follows. Note that both flags False = Align_Default, so that the
6048 -- default initialization of flags to False initializes component
6049 -- alignment to the default value as required.
6051 -- Flag128 Flag129 Value
6052 -- ------- ------- -----
6053 -- False False Calign_Default
6054 -- False True Calign_Component_Size
6055 -- True False Calign_Component_Size_4
6056 -- True True Calign_Storage_Unit
6058 function Component_Alignment (Id : E) return C is
6059 BT : constant Node_Id := Base_Type (Id);
6062 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
6064 if Flag128 (BT) then
6065 if Flag129 (BT) then
6066 return Calign_Storage_Unit;
6068 return Calign_Component_Size_4;
6072 if Flag129 (BT) then
6073 return Calign_Component_Size;
6075 return Calign_Default;
6078 end Component_Alignment;
6080 ----------------------
6081 -- Declaration_Node --
6082 ----------------------
6084 function Declaration_Node (Id : E) return N is
6088 if Ekind (Id) = E_Incomplete_Type
6089 and then Present (Full_View (Id))
6091 P := Parent (Full_View (Id));
6097 if Nkind (P) /= N_Selected_Component
6098 and then Nkind (P) /= N_Expanded_Name
6100 not (Nkind (P) = N_Defining_Program_Unit_Name
6101 and then Is_Child_Unit (Id))
6108 end Declaration_Node;
6110 ---------------------
6111 -- Designated_Type --
6112 ---------------------
6114 function Designated_Type (Id : E) return E is
6118 Desig_Type := Directly_Designated_Type (Id);
6120 if Ekind (Desig_Type) = E_Incomplete_Type
6121 and then Present (Full_View (Desig_Type))
6123 return Full_View (Desig_Type);
6125 elsif Is_Class_Wide_Type (Desig_Type)
6126 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
6127 and then Present (Full_View (Etype (Desig_Type)))
6128 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
6130 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
6135 end Designated_Type;
6137 ----------------------
6138 -- Entry_Index_Type --
6139 ----------------------
6141 function Entry_Index_Type (Id : E) return N is
6143 pragma Assert (Ekind (Id) = E_Entry_Family);
6144 return Etype (Discrete_Subtype_Definition (Parent (Id)));
6145 end Entry_Index_Type;
6147 ---------------------
6148 -- First_Component --
6149 ---------------------
6151 function First_Component (Id : E) return E is
6156 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
6158 Comp_Id := First_Entity (Id);
6159 while Present (Comp_Id) loop
6160 exit when Ekind (Comp_Id) = E_Component;
6161 Comp_Id := Next_Entity (Comp_Id);
6165 end First_Component;
6167 -------------------------------------
6168 -- First_Component_Or_Discriminant --
6169 -------------------------------------
6171 function First_Component_Or_Discriminant (Id : E) return E is
6176 (Is_Record_Type (Id)
6177 or else Is_Incomplete_Or_Private_Type (Id)
6178 or else Has_Discriminants (Id));
6180 Comp_Id := First_Entity (Id);
6181 while Present (Comp_Id) loop
6182 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6183 Comp_Id := Next_Entity (Comp_Id);
6187 end First_Component_Or_Discriminant;
6193 function First_Formal (Id : E) return E is
6198 (Is_Overloadable (Id)
6199 or else Ekind_In (Id, E_Entry_Family,
6201 E_Subprogram_Type));
6203 if Ekind (Id) = E_Enumeration_Literal then
6207 Formal := First_Entity (Id);
6209 if Present (Formal) and then Is_Formal (Formal) then
6217 ------------------------------
6218 -- First_Formal_With_Extras --
6219 ------------------------------
6221 function First_Formal_With_Extras (Id : E) return E is
6226 (Is_Overloadable (Id)
6227 or else Ekind_In (Id, E_Entry_Family,
6229 E_Subprogram_Type));
6231 if Ekind (Id) = E_Enumeration_Literal then
6235 Formal := First_Entity (Id);
6237 if Present (Formal) and then Is_Formal (Formal) then
6240 return Extra_Formals (Id); -- Empty if no extra formals
6243 end First_Formal_With_Extras;
6245 -------------------------------------
6246 -- Get_Attribute_Definition_Clause --
6247 -------------------------------------
6249 function Get_Attribute_Definition_Clause
6251 Id : Attribute_Id) return Node_Id
6256 N := First_Rep_Item (E);
6257 while Present (N) loop
6258 if Nkind (N) = N_Attribute_Definition_Clause
6259 and then Get_Attribute_Id (Chars (N)) = Id
6268 end Get_Attribute_Definition_Clause;
6274 function Get_Full_View (T : Entity_Id) return Entity_Id is
6276 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
6277 return Full_View (T);
6279 elsif Is_Class_Wide_Type (T)
6280 and then Ekind (Root_Type (T)) = E_Incomplete_Type
6281 and then Present (Full_View (Root_Type (T)))
6283 return Class_Wide_Type (Full_View (Root_Type (T)));
6294 function Get_Pragma (E : Entity_Id; Id : Pragma_Id) return Node_Id is
6295 Is_CDG : constant Boolean :=
6297 or else Id = Pragma_Global
6298 or else Id = Pragma_Refined_Depends
6299 or else Id = Pragma_Refined_Global;
6300 Is_CTC : constant Boolean :=
6301 Id = Pragma_Contract_Cases or else Id = Pragma_Test_Case;
6302 Is_PPC : constant Boolean :=
6303 Id = Pragma_Precondition
6304 or else Id = Pragma_Postcondition;
6305 In_Contract : constant Boolean := Is_CDG or Is_CTC or Is_PPC;
6311 -- Handle pragmas that appear in N_Contract nodes. Those have to be
6312 -- extracted from their specialized list.
6315 Items := Contract (E);
6321 Item := Classifications (Items);
6324 Item := Contract_Test_Cases (Items);
6327 Item := Pre_Post_Conditions (Items);
6333 Item := First_Rep_Item (E);
6336 while Present (Item) loop
6337 if Nkind (Item) = N_Pragma
6338 and then Get_Pragma_Id (Pragma_Name (Item)) = Id
6342 -- All nodes in N_Contract are chained using Next_Pragma
6344 elsif In_Contract then
6345 Item := Next_Pragma (Item);
6350 Next_Rep_Item (Item);
6357 --------------------------------------
6358 -- Get_Record_Representation_Clause --
6359 --------------------------------------
6361 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
6365 N := First_Rep_Item (E);
6366 while Present (N) loop
6367 if Nkind (N) = N_Record_Representation_Clause then
6375 end Get_Record_Representation_Clause;
6377 ------------------------
6378 -- Has_Attach_Handler --
6379 ------------------------
6381 function Has_Attach_Handler (Id : E) return B is
6385 pragma Assert (Is_Protected_Type (Id));
6387 Ritem := First_Rep_Item (Id);
6388 while Present (Ritem) loop
6389 if Nkind (Ritem) = N_Pragma
6390 and then Pragma_Name (Ritem) = Name_Attach_Handler
6394 Next_Rep_Item (Ritem);
6399 end Has_Attach_Handler;
6405 function Has_Entries (Id : E) return B is
6409 pragma Assert (Is_Concurrent_Type (Id));
6411 Ent := First_Entity (Id);
6412 while Present (Ent) loop
6413 if Is_Entry (Ent) then
6417 Ent := Next_Entity (Ent);
6423 ----------------------------
6424 -- Has_Foreign_Convention --
6425 ----------------------------
6427 function Has_Foreign_Convention (Id : E) return B is
6429 -- While regular Intrinsics such as the Standard operators fit in the
6430 -- "Ada" convention, those with an Interface_Name materialize GCC
6431 -- builtin imports for which Ada special treatments shouldn't apply.
6433 return Convention (Id) in Foreign_Convention
6434 or else (Convention (Id) = Convention_Intrinsic
6435 and then Present (Interface_Name (Id)));
6436 end Has_Foreign_Convention;
6438 ---------------------------
6439 -- Has_Interrupt_Handler --
6440 ---------------------------
6442 function Has_Interrupt_Handler (Id : E) return B is
6446 pragma Assert (Is_Protected_Type (Id));
6448 Ritem := First_Rep_Item (Id);
6449 while Present (Ritem) loop
6450 if Nkind (Ritem) = N_Pragma
6451 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6455 Next_Rep_Item (Ritem);
6460 end Has_Interrupt_Handler;
6462 -----------------------------
6463 -- Has_Null_Abstract_State --
6464 -----------------------------
6466 function Has_Null_Abstract_State (Id : E) return B is
6468 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
6471 Present (Abstract_States (Id))
6472 and then Is_Null_State (Node (First_Elmt (Abstract_States (Id))));
6473 end Has_Null_Abstract_State;
6475 --------------------
6476 -- Has_Unmodified --
6477 --------------------
6479 function Has_Unmodified (E : Entity_Id) return Boolean is
6481 if Has_Pragma_Unmodified (E) then
6483 elsif Warnings_Off (E) then
6484 Set_Warnings_Off_Used_Unmodified (E);
6491 ---------------------
6492 -- Has_Unreferenced --
6493 ---------------------
6495 function Has_Unreferenced (E : Entity_Id) return Boolean is
6497 if Has_Pragma_Unreferenced (E) then
6499 elsif Warnings_Off (E) then
6500 Set_Warnings_Off_Used_Unreferenced (E);
6505 end Has_Unreferenced;
6507 ----------------------
6508 -- Has_Warnings_Off --
6509 ----------------------
6511 function Has_Warnings_Off (E : Entity_Id) return Boolean is
6513 if Warnings_Off (E) then
6514 Set_Warnings_Off_Used (E);
6519 end Has_Warnings_Off;
6521 ------------------------------
6522 -- Implementation_Base_Type --
6523 ------------------------------
6525 function Implementation_Base_Type (Id : E) return E is
6530 Bastyp := Base_Type (Id);
6532 if Is_Incomplete_Or_Private_Type (Bastyp) then
6533 Imptyp := Underlying_Type (Bastyp);
6535 -- If we have an implementation type, then just return it,
6536 -- otherwise we return the Base_Type anyway. This can only
6537 -- happen in error situations and should avoid some error bombs.
6539 if Present (Imptyp) then
6540 return Base_Type (Imptyp);
6548 end Implementation_Base_Type;
6550 -------------------------
6551 -- Invariant_Procedure --
6552 -------------------------
6554 function Invariant_Procedure (Id : E) return E is
6558 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
6560 if No (Subprograms_For_Type (Id)) then
6564 S := Subprograms_For_Type (Id);
6565 while Present (S) loop
6566 if Is_Invariant_Procedure (S) then
6569 S := Subprograms_For_Type (S);
6575 end Invariant_Procedure;
6581 -- Global flag table allowing rapid computation of this function
6583 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
6584 (E_Enumeration_Subtype |
6586 E_Signed_Integer_Subtype |
6587 E_Modular_Integer_Subtype |
6588 E_Floating_Point_Subtype |
6589 E_Ordinary_Fixed_Point_Subtype |
6590 E_Decimal_Fixed_Point_Subtype |
6595 E_Record_Subtype_With_Private |
6596 E_Limited_Private_Subtype |
6598 E_Protected_Subtype |
6600 E_String_Literal_Subtype |
6601 E_Class_Wide_Subtype => False,
6604 function Is_Base_Type (Id : E) return Boolean is
6606 return Entity_Is_Base_Type (Ekind (Id));
6609 ---------------------
6610 -- Is_Boolean_Type --
6611 ---------------------
6613 function Is_Boolean_Type (Id : E) return B is
6615 return Root_Type (Id) = Standard_Boolean;
6616 end Is_Boolean_Type;
6618 ------------------------
6619 -- Is_Constant_Object --
6620 ------------------------
6622 function Is_Constant_Object (Id : E) return B is
6623 K : constant Entity_Kind := Ekind (Id);
6626 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
6627 end Is_Constant_Object;
6629 --------------------
6630 -- Is_Discriminal --
6631 --------------------
6633 function Is_Discriminal (Id : E) return B is
6635 return (Ekind_In (Id, E_Constant, E_In_Parameter)
6636 and then Present (Discriminal_Link (Id)));
6639 ----------------------
6640 -- Is_Dynamic_Scope --
6641 ----------------------
6643 function Is_Dynamic_Scope (Id : E) return B is
6646 Ekind (Id) = E_Block
6648 Ekind (Id) = E_Function
6650 Ekind (Id) = E_Procedure
6652 Ekind (Id) = E_Subprogram_Body
6654 Ekind (Id) = E_Task_Type
6656 (Ekind (Id) = E_Limited_Private_Type
6657 and then Present (Full_View (Id))
6658 and then Ekind (Full_View (Id)) = E_Task_Type)
6660 Ekind (Id) = E_Entry
6662 Ekind (Id) = E_Entry_Family
6664 Ekind (Id) = E_Return_Statement;
6665 end Is_Dynamic_Scope;
6667 --------------------
6668 -- Is_Entity_Name --
6669 --------------------
6671 function Is_Entity_Name (N : Node_Id) return Boolean is
6672 Kind : constant Node_Kind := Nkind (N);
6675 -- Identifiers, operator symbols, expanded names are entity names
6677 return Kind = N_Identifier
6678 or else Kind = N_Operator_Symbol
6679 or else Kind = N_Expanded_Name
6681 -- Attribute references are entity names if they refer to an entity.
6682 -- Note that we don't do this by testing for the presence of the
6683 -- Entity field in the N_Attribute_Reference node, since it may not
6684 -- have been set yet.
6686 or else (Kind = N_Attribute_Reference
6687 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
6690 -----------------------
6691 -- Is_External_State --
6692 -----------------------
6694 function Is_External_State (Id : E) return B is
6697 Ekind (Id) = E_Abstract_State and then Has_Option (Id, Name_External);
6698 end Is_External_State;
6704 function Is_Finalizer (Id : E) return B is
6706 return Ekind (Id) = E_Procedure and then Chars (Id) = Name_uFinalizer;
6709 ---------------------
6710 -- Is_Ghost_Entity --
6711 ---------------------
6713 function Is_Ghost_Entity (Id : E) return B is
6715 if Present (Id) and then Ekind (Id) = E_Variable then
6716 return Convention (Id) = Convention_Ghost;
6718 return Is_Ghost_Subprogram (Id);
6720 end Is_Ghost_Entity;
6722 -------------------------
6723 -- Is_Ghost_Subprogram --
6724 -------------------------
6726 function Is_Ghost_Subprogram (Id : E) return B is
6728 if Present (Id) and then Ekind_In (Id, E_Function, E_Procedure) then
6729 return Convention (Id) = Convention_Ghost;
6733 end Is_Ghost_Subprogram;
6735 -------------------------
6736 -- Is_Input_Only_State --
6737 -------------------------
6739 function Is_Input_Only_State (Id : E) return B is
6742 Ekind (Id) = E_Abstract_State
6743 and then Has_Option (Id, Name_Input_Only);
6744 end Is_Input_Only_State;
6746 ---------------------------
6747 -- Is_Non_Volatile_State --
6748 ---------------------------
6750 function Is_Non_Volatile_State (Id : E) return B is
6753 Ekind (Id) = E_Abstract_State
6754 and then Has_Option (Id, Name_Non_Volatile);
6755 end Is_Non_Volatile_State;
6761 function Is_Null_State (Id : E) return B is
6764 Ekind (Id) = E_Abstract_State and then Nkind (Parent (Id)) = N_Null;
6767 ---------------------
6768 -- Is_Output_State --
6769 ---------------------
6771 function Is_Output_Only_State (Id : E) return B is
6774 Ekind (Id) = E_Abstract_State
6775 and then Has_Option (Id, Name_Output_Only);
6776 end Is_Output_Only_State;
6778 -----------------------------------
6779 -- Is_Package_Or_Generic_Package --
6780 -----------------------------------
6782 function Is_Package_Or_Generic_Package (Id : E) return B is
6784 return Ekind_In (Id, E_Generic_Package, E_Package);
6785 end Is_Package_Or_Generic_Package;
6791 function Is_Prival (Id : E) return B is
6793 return (Ekind_In (Id, E_Constant, E_Variable)
6794 and then Present (Prival_Link (Id)));
6797 ----------------------------
6798 -- Is_Protected_Component --
6799 ----------------------------
6801 function Is_Protected_Component (Id : E) return B is
6803 return Ekind (Id) = E_Component and then Is_Protected_Type (Scope (Id));
6804 end Is_Protected_Component;
6806 ----------------------------
6807 -- Is_Protected_Interface --
6808 ----------------------------
6810 function Is_Protected_Interface (Id : E) return B is
6811 Typ : constant Entity_Id := Base_Type (Id);
6813 if not Is_Interface (Typ) then
6815 elsif Is_Class_Wide_Type (Typ) then
6816 return Is_Protected_Interface (Etype (Typ));
6818 return Protected_Present (Type_Definition (Parent (Typ)));
6820 end Is_Protected_Interface;
6822 ------------------------------
6823 -- Is_Protected_Record_Type --
6824 ------------------------------
6826 function Is_Protected_Record_Type (Id : E) return B is
6829 Is_Concurrent_Record_Type (Id)
6830 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
6831 end Is_Protected_Record_Type;
6833 --------------------------------
6834 -- Is_Standard_Character_Type --
6835 --------------------------------
6837 function Is_Standard_Character_Type (Id : E) return B is
6839 if Is_Type (Id) then
6841 R : constant Entity_Id := Root_Type (Id);
6844 R = Standard_Character
6846 R = Standard_Wide_Character
6848 R = Standard_Wide_Wide_Character;
6854 end Is_Standard_Character_Type;
6856 --------------------
6857 -- Is_String_Type --
6858 --------------------
6860 function Is_String_Type (Id : E) return B is
6862 return Ekind (Id) in String_Kind
6863 or else (Is_Array_Type (Id)
6864 and then Id /= Any_Composite
6865 and then Number_Dimensions (Id) = 1
6866 and then Is_Character_Type (Component_Type (Id)));
6869 -------------------------------
6870 -- Is_Synchronized_Interface --
6871 -------------------------------
6873 function Is_Synchronized_Interface (Id : E) return B is
6874 Typ : constant Entity_Id := Base_Type (Id);
6877 if not Is_Interface (Typ) then
6880 elsif Is_Class_Wide_Type (Typ) then
6881 return Is_Synchronized_Interface (Etype (Typ));
6884 return Protected_Present (Type_Definition (Parent (Typ)))
6885 or else Synchronized_Present (Type_Definition (Parent (Typ)))
6886 or else Task_Present (Type_Definition (Parent (Typ)));
6888 end Is_Synchronized_Interface;
6890 -----------------------
6891 -- Is_Task_Interface --
6892 -----------------------
6894 function Is_Task_Interface (Id : E) return B is
6895 Typ : constant Entity_Id := Base_Type (Id);
6897 if not Is_Interface (Typ) then
6899 elsif Is_Class_Wide_Type (Typ) then
6900 return Is_Task_Interface (Etype (Typ));
6902 return Task_Present (Type_Definition (Parent (Typ)));
6904 end Is_Task_Interface;
6906 -------------------------
6907 -- Is_Task_Record_Type --
6908 -------------------------
6910 function Is_Task_Record_Type (Id : E) return B is
6913 Is_Concurrent_Record_Type (Id)
6914 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
6915 end Is_Task_Record_Type;
6917 ------------------------
6918 -- Is_Wrapper_Package --
6919 ------------------------
6921 function Is_Wrapper_Package (Id : E) return B is
6923 return (Ekind (Id) = E_Package and then Present (Related_Instance (Id)));
6924 end Is_Wrapper_Package;
6930 function Last_Formal (Id : E) return E is
6935 (Is_Overloadable (Id)
6936 or else Ekind_In (Id, E_Entry_Family,
6938 E_Subprogram_Type));
6940 if Ekind (Id) = E_Enumeration_Literal then
6944 Formal := First_Formal (Id);
6946 if Present (Formal) then
6947 while Present (Next_Formal (Formal)) loop
6948 Formal := Next_Formal (Formal);
6956 function Model_Emin_Value (Id : E) return Uint is
6958 return Machine_Emin_Value (Id);
6959 end Model_Emin_Value;
6961 -------------------------
6962 -- Model_Epsilon_Value --
6963 -------------------------
6965 function Model_Epsilon_Value (Id : E) return Ureal is
6966 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6968 return Radix ** (1 - Model_Mantissa_Value (Id));
6969 end Model_Epsilon_Value;
6971 --------------------------
6972 -- Model_Mantissa_Value --
6973 --------------------------
6975 function Model_Mantissa_Value (Id : E) return Uint is
6977 return Machine_Mantissa_Value (Id);
6978 end Model_Mantissa_Value;
6980 -----------------------
6981 -- Model_Small_Value --
6982 -----------------------
6984 function Model_Small_Value (Id : E) return Ureal is
6985 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6987 return Radix ** (Model_Emin_Value (Id) - 1);
6988 end Model_Small_Value;
6990 ------------------------
6991 -- Machine_Emax_Value --
6992 ------------------------
6994 function Machine_Emax_Value (Id : E) return Uint is
6995 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
6998 case Float_Rep (Id) is
7001 when 1 .. 6 => return Uint_128;
7002 when 7 .. 15 => return 2**10;
7003 when 16 .. 33 => return 2**14;
7004 when others => return No_Uint;
7009 when 1 .. 9 => return 2**7 - 1;
7010 when 10 .. 15 => return 2**10 - 1;
7011 when others => return No_Uint;
7015 return Uint_2 ** Uint_7 - Uint_1;
7017 end Machine_Emax_Value;
7019 ------------------------
7020 -- Machine_Emin_Value --
7021 ------------------------
7023 function Machine_Emin_Value (Id : E) return Uint is
7025 case Float_Rep (Id) is
7026 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
7027 when VAX_Native => return -Machine_Emax_Value (Id);
7028 when AAMP => return -Machine_Emax_Value (Id);
7030 end Machine_Emin_Value;
7032 ----------------------------
7033 -- Machine_Mantissa_Value --
7034 ----------------------------
7036 function Machine_Mantissa_Value (Id : E) return Uint is
7037 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7040 case Float_Rep (Id) is
7043 when 1 .. 6 => return Uint_24;
7044 when 7 .. 15 => return UI_From_Int (53);
7045 when 16 .. 18 => return Uint_64;
7046 when 19 .. 33 => return UI_From_Int (113);
7047 when others => return No_Uint;
7052 when 1 .. 6 => return Uint_24;
7053 when 7 .. 9 => return UI_From_Int (56);
7054 when 10 .. 15 => return UI_From_Int (53);
7055 when others => return No_Uint;
7060 when 1 .. 6 => return Uint_24;
7061 when 7 .. 9 => return UI_From_Int (40);
7062 when others => return No_Uint;
7065 end Machine_Mantissa_Value;
7067 -------------------------
7068 -- Machine_Radix_Value --
7069 -------------------------
7071 function Machine_Radix_Value (Id : E) return U is
7073 case Float_Rep (Id) is
7074 when IEEE_Binary | VAX_Native | AAMP =>
7077 end Machine_Radix_Value;
7079 --------------------
7080 -- Next_Component --
7081 --------------------
7083 function Next_Component (Id : E) return E is
7087 Comp_Id := Next_Entity (Id);
7088 while Present (Comp_Id) loop
7089 exit when Ekind (Comp_Id) = E_Component;
7090 Comp_Id := Next_Entity (Comp_Id);
7096 ------------------------------------
7097 -- Next_Component_Or_Discriminant --
7098 ------------------------------------
7100 function Next_Component_Or_Discriminant (Id : E) return E is
7104 Comp_Id := Next_Entity (Id);
7105 while Present (Comp_Id) loop
7106 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
7107 Comp_Id := Next_Entity (Comp_Id);
7111 end Next_Component_Or_Discriminant;
7113 -----------------------
7114 -- Next_Discriminant --
7115 -----------------------
7117 -- This function actually implements both Next_Discriminant and
7118 -- Next_Stored_Discriminant by making sure that the Discriminant
7119 -- returned is of the same variety as Id.
7121 function Next_Discriminant (Id : E) return E is
7123 -- Derived Tagged types with private extensions look like this...
7125 -- E_Discriminant d1
7126 -- E_Discriminant d2
7128 -- E_Discriminant d1
7129 -- E_Discriminant d2
7132 -- so it is critical not to go past the leading discriminants
7137 pragma Assert (Ekind (Id) = E_Discriminant);
7140 D := Next_Entity (D);
7142 or else (Ekind (D) /= E_Discriminant
7143 and then not Is_Itype (D))
7148 exit when Ekind (D) = E_Discriminant
7149 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
7153 end Next_Discriminant;
7159 function Next_Formal (Id : E) return E is
7163 -- Follow the chain of declared entities as long as the kind of the
7164 -- entity corresponds to a formal parameter. Skip internal entities
7165 -- that may have been created for implicit subtypes, in the process
7166 -- of analyzing default expressions.
7170 P := Next_Entity (P);
7172 if No (P) or else Is_Formal (P) then
7174 elsif not Is_Internal (P) then
7180 -----------------------------
7181 -- Next_Formal_With_Extras --
7182 -----------------------------
7184 function Next_Formal_With_Extras (Id : E) return E is
7186 if Present (Extra_Formal (Id)) then
7187 return Extra_Formal (Id);
7189 return Next_Formal (Id);
7191 end Next_Formal_With_Extras;
7197 function Next_Index (Id : Node_Id) return Node_Id is
7206 function Next_Literal (Id : E) return E is
7208 pragma Assert (Nkind (Id) in N_Entity);
7212 ------------------------------
7213 -- Next_Stored_Discriminant --
7214 ------------------------------
7216 function Next_Stored_Discriminant (Id : E) return E is
7218 -- See comment in Next_Discriminant
7220 return Next_Discriminant (Id);
7221 end Next_Stored_Discriminant;
7223 -----------------------
7224 -- Number_Dimensions --
7225 -----------------------
7227 function Number_Dimensions (Id : E) return Pos is
7232 if Ekind (Id) in String_Kind then
7237 T := First_Index (Id);
7238 while Present (T) loop
7245 end Number_Dimensions;
7247 --------------------
7248 -- Number_Entries --
7249 --------------------
7251 function Number_Entries (Id : E) return Nat is
7256 pragma Assert (Is_Concurrent_Type (Id));
7259 Ent := First_Entity (Id);
7260 while Present (Ent) loop
7261 if Is_Entry (Ent) then
7265 Ent := Next_Entity (Ent);
7271 --------------------
7272 -- Number_Formals --
7273 --------------------
7275 function Number_Formals (Id : E) return Pos is
7281 Formal := First_Formal (Id);
7282 while Present (Formal) loop
7284 Formal := Next_Formal (Formal);
7290 --------------------
7291 -- Parameter_Mode --
7292 --------------------
7294 function Parameter_Mode (Id : E) return Formal_Kind is
7299 ------------------------
7300 -- Predicate_Function --
7301 ------------------------
7303 function Predicate_Function (Id : E) return E is
7308 pragma Assert (Is_Type (Id));
7310 -- If type is private and has a completion, predicate may be defined
7311 -- on the full view.
7313 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7314 T := Full_View (Id);
7319 if No (Subprograms_For_Type (T)) then
7323 S := Subprograms_For_Type (T);
7324 while Present (S) loop
7325 if Is_Predicate_Function (S) then
7328 S := Subprograms_For_Type (S);
7334 end Predicate_Function;
7336 --------------------------
7337 -- Predicate_Function_M --
7338 --------------------------
7340 function Predicate_Function_M (Id : E) return E is
7345 pragma Assert (Is_Type (Id));
7347 -- If type is private and has a completion, predicate may be defined
7348 -- on the full view.
7350 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7351 T := Full_View (Id);
7356 if No (Subprograms_For_Type (T)) then
7360 S := Subprograms_For_Type (T);
7361 while Present (S) loop
7362 if Is_Predicate_Function_M (S) then
7365 S := Subprograms_For_Type (S);
7371 end Predicate_Function_M;
7373 -------------------------
7374 -- Present_In_Rep_Item --
7375 -------------------------
7377 function Present_In_Rep_Item (E : Entity_Id; N : Node_Id) return Boolean is
7381 Ritem := First_Rep_Item (E);
7383 while Present (Ritem) loop
7388 Next_Rep_Item (Ritem);
7392 end Present_In_Rep_Item;
7394 --------------------------
7395 -- Primitive_Operations --
7396 --------------------------
7398 function Primitive_Operations (Id : E) return L is
7400 if Is_Concurrent_Type (Id) then
7401 if Present (Corresponding_Record_Type (Id)) then
7402 return Direct_Primitive_Operations
7403 (Corresponding_Record_Type (Id));
7405 -- If expansion is disabled the corresponding record type is absent,
7406 -- but if the type has ancestors it may have primitive operations.
7408 elsif Is_Tagged_Type (Id) then
7409 return Direct_Primitive_Operations (Id);
7415 return Direct_Primitive_Operations (Id);
7417 end Primitive_Operations;
7419 ---------------------
7420 -- Record_Rep_Item --
7421 ---------------------
7423 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
7425 Set_Next_Rep_Item (N, First_Rep_Item (E));
7426 Set_First_Rep_Item (E, N);
7427 end Record_Rep_Item;
7433 function Root_Type (Id : E) return E is
7437 pragma Assert (Nkind (Id) in N_Entity);
7439 T := Base_Type (Id);
7441 if Ekind (T) = E_Class_Wide_Type then
7453 -- Following test catches some error cases resulting from
7456 elsif No (Etyp) then
7457 Check_Error_Detected;
7460 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
7463 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
7469 -- Return if there is a circularity in the inheritance chain. This
7470 -- happens in some error situations and we do not want to get
7471 -- stuck in this loop.
7473 if T = Base_Type (Id) then
7480 ---------------------
7481 -- Safe_Emax_Value --
7482 ---------------------
7484 function Safe_Emax_Value (Id : E) return Uint is
7486 return Machine_Emax_Value (Id);
7487 end Safe_Emax_Value;
7489 ----------------------
7490 -- Safe_First_Value --
7491 ----------------------
7493 function Safe_First_Value (Id : E) return Ureal is
7495 return -Safe_Last_Value (Id);
7496 end Safe_First_Value;
7498 ---------------------
7499 -- Safe_Last_Value --
7500 ---------------------
7502 function Safe_Last_Value (Id : E) return Ureal is
7503 Radix : constant Uint := Machine_Radix_Value (Id);
7504 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
7505 Emax : constant Uint := Safe_Emax_Value (Id);
7506 Significand : constant Uint := Radix ** Mantissa - 1;
7507 Exponent : constant Uint := Emax - Mantissa;
7513 (Num => Significand * 2 ** (Exponent mod 4),
7514 Den => -Exponent / 4,
7520 (Num => Significand,
7524 end Safe_Last_Value;
7530 function Scope_Depth (Id : E) return Uint is
7535 while Is_Record_Type (Scop) loop
7536 Scop := Scope (Scop);
7539 return Scope_Depth_Value (Scop);
7542 ---------------------
7543 -- Scope_Depth_Set --
7544 ---------------------
7546 function Scope_Depth_Set (Id : E) return B is
7548 return not Is_Record_Type (Id)
7549 and then Field22 (Id) /= Union_Id (Empty);
7550 end Scope_Depth_Set;
7552 -----------------------------
7553 -- Set_Component_Alignment --
7554 -----------------------------
7556 -- Component Alignment is encoded using two flags, Flag128/129 as
7557 -- follows. Note that both flags False = Align_Default, so that the
7558 -- default initialization of flags to False initializes component
7559 -- alignment to the default value as required.
7561 -- Flag128 Flag129 Value
7562 -- ------- ------- -----
7563 -- False False Calign_Default
7564 -- False True Calign_Component_Size
7565 -- True False Calign_Component_Size_4
7566 -- True True Calign_Storage_Unit
7568 procedure Set_Component_Alignment (Id : E; V : C) is
7570 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
7571 and then Is_Base_Type (Id));
7574 when Calign_Default =>
7575 Set_Flag128 (Id, False);
7576 Set_Flag129 (Id, False);
7578 when Calign_Component_Size =>
7579 Set_Flag128 (Id, False);
7580 Set_Flag129 (Id, True);
7582 when Calign_Component_Size_4 =>
7583 Set_Flag128 (Id, True);
7584 Set_Flag129 (Id, False);
7586 when Calign_Storage_Unit =>
7587 Set_Flag128 (Id, True);
7588 Set_Flag129 (Id, True);
7590 end Set_Component_Alignment;
7592 -----------------------------
7593 -- Set_Invariant_Procedure --
7594 -----------------------------
7596 procedure Set_Invariant_Procedure (Id : E; V : E) is
7600 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7602 S := Subprograms_For_Type (Id);
7603 Set_Subprograms_For_Type (Id, V);
7604 Set_Subprograms_For_Type (V, S);
7606 -- Check for duplicate entry
7608 while Present (S) loop
7609 if Is_Invariant_Procedure (S) then
7610 raise Program_Error;
7612 S := Subprograms_For_Type (S);
7615 end Set_Invariant_Procedure;
7617 ----------------------------
7618 -- Set_Predicate_Function --
7619 ----------------------------
7621 procedure Set_Predicate_Function (Id : E; V : E) is
7625 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7627 S := Subprograms_For_Type (Id);
7628 Set_Subprograms_For_Type (Id, V);
7629 Set_Subprograms_For_Type (V, S);
7631 while Present (S) loop
7632 if Is_Predicate_Function (S) then
7633 raise Program_Error;
7635 S := Subprograms_For_Type (S);
7638 end Set_Predicate_Function;
7640 ------------------------------
7641 -- Set_Predicate_Function_M --
7642 ------------------------------
7644 procedure Set_Predicate_Function_M (Id : E; V : E) is
7648 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7650 S := Subprograms_For_Type (Id);
7651 Set_Subprograms_For_Type (Id, V);
7652 Set_Subprograms_For_Type (V, S);
7654 -- Check for duplicates
7656 while Present (S) loop
7657 if Is_Predicate_Function_M (S) then
7658 raise Program_Error;
7660 S := Subprograms_For_Type (S);
7663 end Set_Predicate_Function_M;
7669 function Size_Clause (Id : E) return N is
7671 return Get_Attribute_Definition_Clause (Id, Attribute_Size);
7674 ------------------------
7675 -- Stream_Size_Clause --
7676 ------------------------
7678 function Stream_Size_Clause (Id : E) return N is
7680 return Get_Attribute_Definition_Clause (Id, Attribute_Stream_Size);
7681 end Stream_Size_Clause;
7687 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
7693 Kind := E_Access_Subtype;
7697 Kind := E_Array_Subtype;
7699 when E_Class_Wide_Type |
7700 E_Class_Wide_Subtype =>
7701 Kind := E_Class_Wide_Subtype;
7703 when E_Decimal_Fixed_Point_Type |
7704 E_Decimal_Fixed_Point_Subtype =>
7705 Kind := E_Decimal_Fixed_Point_Subtype;
7707 when E_Ordinary_Fixed_Point_Type |
7708 E_Ordinary_Fixed_Point_Subtype =>
7709 Kind := E_Ordinary_Fixed_Point_Subtype;
7711 when E_Private_Type |
7712 E_Private_Subtype =>
7713 Kind := E_Private_Subtype;
7715 when E_Limited_Private_Type |
7716 E_Limited_Private_Subtype =>
7717 Kind := E_Limited_Private_Subtype;
7719 when E_Record_Type_With_Private |
7720 E_Record_Subtype_With_Private =>
7721 Kind := E_Record_Subtype_With_Private;
7723 when E_Record_Type |
7725 Kind := E_Record_Subtype;
7727 when E_String_Type |
7729 Kind := E_String_Subtype;
7731 when Enumeration_Kind =>
7732 Kind := E_Enumeration_Subtype;
7735 Kind := E_Floating_Point_Subtype;
7737 when Signed_Integer_Kind =>
7738 Kind := E_Signed_Integer_Subtype;
7740 when Modular_Integer_Kind =>
7741 Kind := E_Modular_Integer_Subtype;
7743 when Protected_Kind =>
7744 Kind := E_Protected_Subtype;
7747 Kind := E_Task_Subtype;
7751 raise Program_Error;
7757 ---------------------
7758 -- Type_High_Bound --
7759 ---------------------
7761 function Type_High_Bound (Id : E) return Node_Id is
7762 Rng : constant Node_Id := Scalar_Range (Id);
7764 if Nkind (Rng) = N_Subtype_Indication then
7765 return High_Bound (Range_Expression (Constraint (Rng)));
7767 return High_Bound (Rng);
7769 end Type_High_Bound;
7771 --------------------
7772 -- Type_Low_Bound --
7773 --------------------
7775 function Type_Low_Bound (Id : E) return Node_Id is
7776 Rng : constant Node_Id := Scalar_Range (Id);
7778 if Nkind (Rng) = N_Subtype_Indication then
7779 return Low_Bound (Range_Expression (Constraint (Rng)));
7781 return Low_Bound (Rng);
7785 ---------------------
7786 -- Underlying_Type --
7787 ---------------------
7789 function Underlying_Type (Id : E) return E is
7791 -- For record_with_private the underlying type is always the direct
7792 -- full view. Never try to take the full view of the parent it
7793 -- doesn't make sense.
7795 if Ekind (Id) = E_Record_Type_With_Private then
7796 return Full_View (Id);
7798 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
7800 -- If we have an incomplete or private type with a full view,
7801 -- then we return the Underlying_Type of this full view
7803 if Present (Full_View (Id)) then
7804 if Id = Full_View (Id) then
7806 -- Previous error in declaration
7811 return Underlying_Type (Full_View (Id));
7814 -- If we have an incomplete entity that comes from the limited
7815 -- view then we return the Underlying_Type of its non-limited
7818 elsif From_With_Type (Id)
7819 and then Present (Non_Limited_View (Id))
7821 return Underlying_Type (Non_Limited_View (Id));
7823 -- Otherwise check for the case where we have a derived type or
7824 -- subtype, and if so get the Underlying_Type of the parent type.
7826 elsif Etype (Id) /= Id then
7827 return Underlying_Type (Etype (Id));
7829 -- Otherwise we have an incomplete or private type that has
7830 -- no full view, which means that we have not encountered the
7831 -- completion, so return Empty to indicate the underlying type
7832 -- is not yet known.
7838 -- For non-incomplete, non-private types, return the type itself
7839 -- Also for entities that are not types at all return the entity
7845 end Underlying_Type;
7851 function Vax_Float (Id : E) return B is
7853 return Is_Floating_Point_Type (Id) and then Float_Rep (Id) = VAX_Native;
7856 ------------------------
7857 -- Write_Entity_Flags --
7858 ------------------------
7860 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
7862 procedure W (Flag_Name : String; Flag : Boolean);
7863 -- Write out given flag if it is set
7869 procedure W (Flag_Name : String; Flag : Boolean) is
7873 Write_Str (Flag_Name);
7874 Write_Str (" = True");
7879 -- Start of processing for Write_Entity_Flags
7882 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
7883 and then Is_Base_Type (Id)
7886 Write_Str ("Component_Alignment = ");
7888 case Component_Alignment (Id) is
7889 when Calign_Default =>
7890 Write_Str ("Calign_Default");
7892 when Calign_Component_Size =>
7893 Write_Str ("Calign_Component_Size");
7895 when Calign_Component_Size_4 =>
7896 Write_Str ("Calign_Component_Size_4");
7898 when Calign_Storage_Unit =>
7899 Write_Str ("Calign_Storage_Unit");
7905 W ("Address_Taken", Flag104 (Id));
7906 W ("Body_Needed_For_SAL", Flag40 (Id));
7907 W ("C_Pass_By_Copy", Flag125 (Id));
7908 W ("Can_Never_Be_Null", Flag38 (Id));
7909 W ("Checks_May_Be_Suppressed", Flag31 (Id));
7910 W ("Debug_Info_Off", Flag166 (Id));
7911 W ("Default_Expressions_Processed", Flag108 (Id));
7912 W ("Delay_Cleanups", Flag114 (Id));
7913 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
7914 W ("Depends_On_Private", Flag14 (Id));
7915 W ("Discard_Names", Flag88 (Id));
7916 W ("Elaboration_Entity_Required", Flag174 (Id));
7917 W ("Elaborate_Body_Desirable", Flag210 (Id));
7918 W ("Entry_Accepted", Flag152 (Id));
7919 W ("Can_Use_Internal_Rep", Flag229 (Id));
7920 W ("Finalize_Storage_Only", Flag158 (Id));
7921 W ("From_With_Type", Flag159 (Id));
7922 W ("Has_Aliased_Components", Flag135 (Id));
7923 W ("Has_Alignment_Clause", Flag46 (Id));
7924 W ("Has_All_Calls_Remote", Flag79 (Id));
7925 W ("Has_Anonymous_Master", Flag253 (Id));
7926 W ("Has_Atomic_Components", Flag86 (Id));
7927 W ("Has_Biased_Representation", Flag139 (Id));
7928 W ("Has_Completion", Flag26 (Id));
7929 W ("Has_Completion_In_Body", Flag71 (Id));
7930 W ("Has_Complex_Representation", Flag140 (Id));
7931 W ("Has_Component_Size_Clause", Flag68 (Id));
7932 W ("Has_Contiguous_Rep", Flag181 (Id));
7933 W ("Has_Controlled_Component", Flag43 (Id));
7934 W ("Has_Controlling_Result", Flag98 (Id));
7935 W ("Has_Convention_Pragma", Flag119 (Id));
7936 W ("Has_Default_Aspect", Flag39 (Id));
7937 W ("Has_Delayed_Aspects", Flag200 (Id));
7938 W ("Has_Delayed_Freeze", Flag18 (Id));
7939 W ("Has_Delayed_Rep_Aspects", Flag261 (Id));
7940 W ("Has_Discriminants", Flag5 (Id));
7941 W ("Has_Dispatch_Table", Flag220 (Id));
7942 W ("Has_Dynamic_Predicate_Aspect", Flag258 (Id));
7943 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
7944 W ("Has_Exit", Flag47 (Id));
7945 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
7946 W ("Has_Forward_Instantiation", Flag175 (Id));
7947 W ("Has_Fully_Qualified_Name", Flag173 (Id));
7948 W ("Has_Gigi_Rep_Item", Flag82 (Id));
7949 W ("Has_Homonym", Flag56 (Id));
7950 W ("Has_Implicit_Dereference", Flag251 (Id));
7951 W ("Has_Inheritable_Invariants", Flag248 (Id));
7952 W ("Has_Initial_Value", Flag219 (Id));
7953 W ("Has_Invariants", Flag232 (Id));
7954 W ("Has_Loop_Entry_Attributes", Flag260 (Id));
7955 W ("Has_Machine_Radix_Clause", Flag83 (Id));
7956 W ("Has_Master_Entity", Flag21 (Id));
7957 W ("Has_Missing_Return", Flag142 (Id));
7958 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
7959 W ("Has_Non_Standard_Rep", Flag75 (Id));
7960 W ("Has_Object_Size_Clause", Flag172 (Id));
7961 W ("Has_Per_Object_Constraint", Flag154 (Id));
7962 W ("Has_Postconditions", Flag240 (Id));
7963 W ("Has_Pragma_Controlled", Flag27 (Id));
7964 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
7965 W ("Has_Pragma_Inline", Flag157 (Id));
7966 W ("Has_Pragma_Inline_Always", Flag230 (Id));
7967 W ("Has_Pragma_No_Inline", Flag201 (Id));
7968 W ("Has_Pragma_Ordered", Flag198 (Id));
7969 W ("Has_Pragma_Pack", Flag121 (Id));
7970 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
7971 W ("Has_Pragma_Pure", Flag203 (Id));
7972 W ("Has_Pragma_Pure_Function", Flag179 (Id));
7973 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
7974 W ("Has_Pragma_Unmodified", Flag233 (Id));
7975 W ("Has_Pragma_Unreferenced", Flag180 (Id));
7976 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
7977 W ("Has_Predicates", Flag250 (Id));
7978 W ("Has_Primitive_Operations", Flag120 (Id));
7979 W ("Has_Private_Ancestor", Flag151 (Id));
7980 W ("Has_Private_Declaration", Flag155 (Id));
7981 W ("Has_Qualified_Name", Flag161 (Id));
7982 W ("Has_RACW", Flag214 (Id));
7983 W ("Has_Record_Rep_Clause", Flag65 (Id));
7984 W ("Has_Recursive_Call", Flag143 (Id));
7985 W ("Has_Size_Clause", Flag29 (Id));
7986 W ("Has_Small_Clause", Flag67 (Id));
7987 W ("Has_Specified_Layout", Flag100 (Id));
7988 W ("Has_Specified_Stream_Input", Flag190 (Id));
7989 W ("Has_Specified_Stream_Output", Flag191 (Id));
7990 W ("Has_Specified_Stream_Read", Flag192 (Id));
7991 W ("Has_Specified_Stream_Write", Flag193 (Id));
7992 W ("Has_Static_Discriminants", Flag211 (Id));
7993 W ("Has_Static_Predicate_Aspect", Flag259 (Id));
7994 W ("Has_Storage_Size_Clause", Flag23 (Id));
7995 W ("Has_Stream_Size_Clause", Flag184 (Id));
7996 W ("Has_Task", Flag30 (Id));
7997 W ("Has_Thunks", Flag228 (Id));
7998 W ("Has_Unchecked_Union", Flag123 (Id));
7999 W ("Has_Unknown_Discriminants", Flag72 (Id));
8000 W ("Has_Up_Level_Access", Flag215 (Id));
8001 W ("Has_Volatile_Components", Flag87 (Id));
8002 W ("Has_Xref_Entry", Flag182 (Id));
8003 W ("In_Package_Body", Flag48 (Id));
8004 W ("In_Private_Part", Flag45 (Id));
8005 W ("In_Use", Flag8 (Id));
8006 W ("Is_AST_Entry", Flag132 (Id));
8007 W ("Is_Abstract_Subprogram", Flag19 (Id));
8008 W ("Is_Abstract_Type", Flag146 (Id));
8009 W ("Is_Local_Anonymous_Access", Flag194 (Id));
8010 W ("Is_Access_Constant", Flag69 (Id));
8011 W ("Is_Ada_2005_Only", Flag185 (Id));
8012 W ("Is_Ada_2012_Only", Flag199 (Id));
8013 W ("Is_Aliased", Flag15 (Id));
8014 W ("Is_Asynchronous", Flag81 (Id));
8015 W ("Is_Atomic", Flag85 (Id));
8016 W ("Is_Bit_Packed_Array", Flag122 (Id));
8017 W ("Is_CPP_Class", Flag74 (Id));
8018 W ("Is_Called", Flag102 (Id));
8019 W ("Is_Character_Type", Flag63 (Id));
8020 W ("Is_Child_Unit", Flag73 (Id));
8021 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
8022 W ("Is_Compilation_Unit", Flag149 (Id));
8023 W ("Is_Completely_Hidden", Flag103 (Id));
8024 W ("Is_Concurrent_Record_Type", Flag20 (Id));
8025 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
8026 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
8027 W ("Is_Constrained", Flag12 (Id));
8028 W ("Is_Constructor", Flag76 (Id));
8029 W ("Is_Controlled", Flag42 (Id));
8030 W ("Is_Controlling_Formal", Flag97 (Id));
8031 W ("Is_Descendent_Of_Address", Flag223 (Id));
8032 W ("Is_Discrim_SO_Function", Flag176 (Id));
8033 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
8034 W ("Is_Dispatching_Operation", Flag6 (Id));
8035 W ("Is_Eliminated", Flag124 (Id));
8036 W ("Is_Entry_Formal", Flag52 (Id));
8037 W ("Is_Exported", Flag99 (Id));
8038 W ("Is_First_Subtype", Flag70 (Id));
8039 W ("Is_For_Access_Subtype", Flag118 (Id));
8040 W ("Is_Formal_Subprogram", Flag111 (Id));
8041 W ("Is_Frozen", Flag4 (Id));
8042 W ("Is_Generic_Actual_Type", Flag94 (Id));
8043 W ("Is_Generic_Instance", Flag130 (Id));
8044 W ("Is_Generic_Type", Flag13 (Id));
8045 W ("Is_Hidden", Flag57 (Id));
8046 W ("Is_Hidden_Open_Scope", Flag171 (Id));
8047 W ("Is_Immediately_Visible", Flag7 (Id));
8048 W ("Is_Implementation_Defined", Flag254 (Id));
8049 W ("Is_Imported", Flag24 (Id));
8050 W ("Is_Inlined", Flag11 (Id));
8051 W ("Is_Instantiated", Flag126 (Id));
8052 W ("Is_Interface", Flag186 (Id));
8053 W ("Is_Internal", Flag17 (Id));
8054 W ("Is_Interrupt_Handler", Flag89 (Id));
8055 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
8056 W ("Is_Invariant_Procedure", Flag257 (Id));
8057 W ("Is_Itype", Flag91 (Id));
8058 W ("Is_Known_Non_Null", Flag37 (Id));
8059 W ("Is_Known_Null", Flag204 (Id));
8060 W ("Is_Known_Valid", Flag170 (Id));
8061 W ("Is_Limited_Composite", Flag106 (Id));
8062 W ("Is_Limited_Interface", Flag197 (Id));
8063 W ("Is_Limited_Record", Flag25 (Id));
8064 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
8065 W ("Is_Non_Static_Subtype", Flag109 (Id));
8066 W ("Is_Null_Init_Proc", Flag178 (Id));
8067 W ("Is_Obsolescent", Flag153 (Id));
8068 W ("Is_Only_Out_Parameter", Flag226 (Id));
8069 W ("Is_Optional_Parameter", Flag134 (Id));
8070 W ("Is_Package_Body_Entity", Flag160 (Id));
8071 W ("Is_Packed", Flag51 (Id));
8072 W ("Is_Packed_Array_Type", Flag138 (Id));
8073 W ("Is_Potentially_Use_Visible", Flag9 (Id));
8074 W ("Is_Predicate_Function", Flag255 (Id));
8075 W ("Is_Predicate_Function_M", Flag256 (Id));
8076 W ("Is_Preelaborated", Flag59 (Id));
8077 W ("Is_Primitive", Flag218 (Id));
8078 W ("Is_Primitive_Wrapper", Flag195 (Id));
8079 W ("Is_Private_Composite", Flag107 (Id));
8080 W ("Is_Private_Descendant", Flag53 (Id));
8081 W ("Is_Private_Primitive", Flag245 (Id));
8082 W ("Is_Processed_Transient", Flag252 (Id));
8083 W ("Is_Public", Flag10 (Id));
8084 W ("Is_Pure", Flag44 (Id));
8085 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
8086 W ("Is_RACW_Stub_Type", Flag244 (Id));
8087 W ("Is_Raised", Flag224 (Id));
8088 W ("Is_Remote_Call_Interface", Flag62 (Id));
8089 W ("Is_Remote_Types", Flag61 (Id));
8090 W ("Is_Renaming_Of_Object", Flag112 (Id));
8091 W ("Is_Return_Object", Flag209 (Id));
8092 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
8093 W ("Is_Shared_Passive", Flag60 (Id));
8094 W ("Is_Statically_Allocated", Flag28 (Id));
8095 W ("Is_Tag", Flag78 (Id));
8096 W ("Is_Tagged_Type", Flag55 (Id));
8097 W ("Is_Thunk", Flag225 (Id));
8098 W ("Is_Trivial_Subprogram", Flag235 (Id));
8099 W ("Is_True_Constant", Flag163 (Id));
8100 W ("Is_Unchecked_Union", Flag117 (Id));
8101 W ("Is_Underlying_Record_View", Flag246 (Id));
8102 W ("Is_Unsigned_Type", Flag144 (Id));
8103 W ("Is_VMS_Exception", Flag133 (Id));
8104 W ("Is_Valued_Procedure", Flag127 (Id));
8105 W ("Is_Visible_Formal", Flag206 (Id));
8106 W ("Is_Visible_Lib_Unit", Flag116 (Id));
8107 W ("Is_Volatile", Flag16 (Id));
8108 W ("Itype_Printed", Flag202 (Id));
8109 W ("Kill_Elaboration_Checks", Flag32 (Id));
8110 W ("Kill_Range_Checks", Flag33 (Id));
8111 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
8112 W ("Low_Bound_Tested", Flag205 (Id));
8113 W ("Machine_Radix_10", Flag84 (Id));
8114 W ("Materialize_Entity", Flag168 (Id));
8115 W ("May_Inherit_Delayed_Rep_Aspects", Flag262 (Id));
8116 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
8117 W ("Must_Have_Preelab_Init", Flag208 (Id));
8118 W ("Needs_Debug_Info", Flag147 (Id));
8119 W ("Needs_No_Actuals", Flag22 (Id));
8120 W ("Never_Set_In_Source", Flag115 (Id));
8121 W ("No_Pool_Assigned", Flag131 (Id));
8122 W ("No_Return", Flag113 (Id));
8123 W ("No_Strict_Aliasing", Flag136 (Id));
8124 W ("Non_Binary_Modulus", Flag58 (Id));
8125 W ("Nonzero_Is_True", Flag162 (Id));
8126 W ("OK_To_Rename", Flag247 (Id));
8127 W ("OK_To_Reorder_Components", Flag239 (Id));
8128 W ("Optimize_Alignment_Space", Flag241 (Id));
8129 W ("Optimize_Alignment_Time", Flag242 (Id));
8130 W ("Overlays_Constant", Flag243 (Id));
8131 W ("Reachable", Flag49 (Id));
8132 W ("Referenced", Flag156 (Id));
8133 W ("Referenced_As_LHS", Flag36 (Id));
8134 W ("Referenced_As_Out_Parameter", Flag227 (Id));
8135 W ("Renamed_In_Spec", Flag231 (Id));
8136 W ("Requires_Overriding", Flag213 (Id));
8137 W ("Return_Present", Flag54 (Id));
8138 W ("Returns_By_Ref", Flag90 (Id));
8139 W ("Reverse_Bit_Order", Flag164 (Id));
8140 W ("Reverse_Storage_Order", Flag93 (Id));
8141 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
8142 W ("Size_Depends_On_Discriminant", Flag177 (Id));
8143 W ("Size_Known_At_Compile_Time", Flag92 (Id));
8144 W ("Static_Elaboration_Desired", Flag77 (Id));
8145 W ("Strict_Alignment", Flag145 (Id));
8146 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
8147 W ("Suppress_Initialization", Flag105 (Id));
8148 W ("Suppress_Style_Checks", Flag165 (Id));
8149 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
8150 W ("Treat_As_Volatile", Flag41 (Id));
8151 W ("Universal_Aliasing", Flag216 (Id));
8152 W ("Used_As_Generic_Actual", Flag222 (Id));
8153 W ("Uses_Sec_Stack", Flag95 (Id));
8154 W ("Warnings_Off", Flag96 (Id));
8155 W ("Warnings_Off_Used", Flag236 (Id));
8156 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
8157 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
8158 W ("Was_Hidden", Flag196 (Id));
8159 end Write_Entity_Flags;
8161 -----------------------
8162 -- Write_Entity_Info --
8163 -----------------------
8165 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
8167 procedure Write_Attribute (Which : String; Nam : E);
8168 -- Write attribute value with given string name
8170 procedure Write_Kind (Id : Entity_Id);
8171 -- Write Ekind field of entity
8173 ---------------------
8174 -- Write_Attribute --
8175 ---------------------
8177 procedure Write_Attribute (Which : String; Nam : E) is
8181 Write_Int (Int (Nam));
8183 Write_Name (Chars (Nam));
8185 end Write_Attribute;
8191 procedure Write_Kind (Id : Entity_Id) is
8192 K : constant String := Entity_Kind'Image (Ekind (Id));
8196 Write_Str (" Kind ");
8198 if Is_Type (Id) and then Is_Tagged_Type (Id) then
8199 Write_Str ("TAGGED ");
8202 Write_Str (K (3 .. K'Length));
8205 if Is_Type (Id) and then Depends_On_Private (Id) then
8206 Write_Str ("Depends_On_Private ");
8210 -- Start of processing for Write_Entity_Info
8214 Write_Attribute ("Name ", Id);
8215 Write_Int (Int (Id));
8219 Write_Attribute (" Type ", Etype (Id));
8221 Write_Attribute (" Scope ", Scope (Id));
8226 when Discrete_Kind =>
8227 Write_Str ("Bounds: Id = ");
8229 if Present (Scalar_Range (Id)) then
8230 Write_Int (Int (Type_Low_Bound (Id)));
8231 Write_Str (" .. Id = ");
8232 Write_Int (Int (Type_High_Bound (Id)));
8234 Write_Str ("Empty");
8245 (" Component Type ", Component_Type (Id));
8248 Write_Str (" Indexes ");
8250 Index := First_Index (Id);
8251 while Present (Index) loop
8252 Write_Attribute (" ", Etype (Index));
8253 Index := Next_Index (Index);
8261 (" Directly Designated Type ",
8262 Directly_Designated_Type (Id));
8265 when Overloadable_Kind =>
8266 if Present (Homonym (Id)) then
8267 Write_Str (" Homonym ");
8268 Write_Name (Chars (Homonym (Id)));
8270 Write_Int (Int (Homonym (Id)));
8277 if Ekind (Scope (Id)) in Record_Kind then
8279 " Original_Record_Component ",
8280 Original_Record_Component (Id));
8281 Write_Int (Int (Original_Record_Component (Id)));
8285 when others => null;
8287 end Write_Entity_Info;
8289 -----------------------
8290 -- Write_Field6_Name --
8291 -----------------------
8293 procedure Write_Field6_Name (Id : Entity_Id) is
8294 pragma Warnings (Off, Id);
8296 Write_Str ("First_Rep_Item");
8297 end Write_Field6_Name;
8299 -----------------------
8300 -- Write_Field7_Name --
8301 -----------------------
8303 procedure Write_Field7_Name (Id : Entity_Id) is
8304 pragma Warnings (Off, Id);
8306 Write_Str ("Freeze_Node");
8307 end Write_Field7_Name;
8309 -----------------------
8310 -- Write_Field8_Name --
8311 -----------------------
8313 procedure Write_Field8_Name (Id : Entity_Id) is
8317 Write_Str ("Associated_Node_For_Itype");
8320 Write_Str ("Dependent_Instances");
8323 Write_Str ("First_Exit_Statement");
8326 Write_Str ("Hiding_Loop_Variable");
8330 E_Subprogram_Body =>
8331 Write_Str ("Mechanism");
8335 Write_Str ("Normalized_First_Bit");
8338 Write_Str ("Postcondition_Proc");
8340 when E_Package_Body =>
8341 Write_Str ("Refined_State_Pragma");
8343 when E_Abstract_State =>
8344 Write_Str ("Refinement_Constituents");
8346 when E_Return_Statement =>
8347 Write_Str ("Return_Applies_To");
8350 Write_Str ("Field8??");
8352 end Write_Field8_Name;
8354 -----------------------
8355 -- Write_Field9_Name --
8356 -----------------------
8358 procedure Write_Field9_Name (Id : Entity_Id) is
8362 Write_Str ("Class_Wide_Type");
8365 Write_Str ("Current_Value");
8368 E_Generic_Function |
8370 E_Generic_Procedure |
8373 Write_Str ("Renaming_Map");
8376 Write_Str ("Field9??");
8378 end Write_Field9_Name;
8380 ------------------------
8381 -- Write_Field10_Name --
8382 ------------------------
8384 procedure Write_Field10_Name (Id : Entity_Id) is
8387 when Class_Wide_Kind |
8393 Write_Str ("Direct_Primitive_Operations");
8396 Write_Str ("Float_Rep");
8398 when E_In_Parameter |
8400 Write_Str ("Discriminal_Link");
8406 Write_Str ("Handler_Records");
8410 Write_Str ("Normalized_Position_Max");
8412 when E_Abstract_State |
8414 Write_Str ("Refined_State");
8417 Write_Str ("Field10??");
8419 end Write_Field10_Name;
8421 ------------------------
8422 -- Write_Field11_Name --
8423 ------------------------
8425 procedure Write_Field11_Name (Id : Entity_Id) is
8429 Write_Str ("Block_Node");
8433 Write_Str ("Component_Bit_Offset");
8436 Write_Str ("Entry_Component");
8438 when E_Enumeration_Literal =>
8439 Write_Str ("Enumeration_Pos");
8443 Write_Str ("Full_View");
8445 when E_Generic_Package =>
8446 Write_Str ("Generic_Homonym");
8452 Write_Str ("Protected_Body_Subprogram");
8455 Write_Str ("Field11??");
8457 end Write_Field11_Name;
8459 ------------------------
8460 -- Write_Field12_Name --
8461 ------------------------
8463 procedure Write_Field12_Name (Id : Entity_Id) is
8467 Write_Str ("Associated_Formal_Package");
8470 Write_Str ("Barrier_Function");
8472 when E_Enumeration_Literal =>
8473 Write_Str ("Enumeration_Rep");
8481 E_In_Out_Parameter |
8485 Write_Str ("Esize");
8489 Write_Str ("Next_Inlined_Subprogram");
8492 Write_Str ("Field12??");
8494 end Write_Field12_Name;
8496 ------------------------
8497 -- Write_Field13_Name --
8498 ------------------------
8500 procedure Write_Field13_Name (Id : Entity_Id) is
8505 Write_Str ("Component_Clause");
8508 Write_Str ("Elaboration_Entity");
8512 Generic_Unit_Kind =>
8513 Write_Str ("Elaboration_Entity");
8517 Write_Str ("Extra_Accessibility");
8520 Write_Str ("RM_Size");
8523 Write_Str ("Field13??");
8525 end Write_Field13_Name;
8527 -----------------------
8528 -- Write_Field14_Name --
8529 -----------------------
8531 procedure Write_Field14_Name (Id : Entity_Id) is
8540 Write_Str ("Alignment");
8544 Write_Str ("First_Optional_Parameter");
8548 Write_Str ("Normalized_Position");
8551 E_Generic_Package =>
8552 Write_Str ("Shadow_Entities");
8555 Write_Str ("Field14??");
8557 end Write_Field14_Name;
8559 ------------------------
8560 -- Write_Field15_Name --
8561 ------------------------
8563 procedure Write_Field15_Name (Id : Entity_Id) is
8566 when E_Discriminant =>
8567 Write_Str ("Discriminant_Number");
8570 Write_Str ("DT_Entry_Count");
8574 Write_Str ("DT_Position");
8576 when E_Protected_Type =>
8577 Write_Str ("Entry_Bodies_Array");
8580 Write_Str ("Entry_Parameters_Type");
8583 Write_Str ("Extra_Formal");
8585 when Enumeration_Kind =>
8586 Write_Str ("Lit_Indexes");
8590 Write_Str ("Related_Instance");
8592 when Decimal_Fixed_Point_Kind =>
8593 Write_Str ("Scale_Value");
8597 Write_Str ("Status_Flag_Or_Transient_Decl");
8601 Write_Str ("Storage_Size_Variable");
8603 when E_String_Literal_Subtype =>
8604 Write_Str ("String_Literal_Low_Bound");
8607 Write_Str ("Field15??");
8609 end Write_Field15_Name;
8611 ------------------------
8612 -- Write_Field16_Name --
8613 ------------------------
8615 procedure Write_Field16_Name (Id : Entity_Id) is
8618 when E_Record_Type |
8619 E_Record_Type_With_Private =>
8620 Write_Str ("Access_Disp_Table");
8622 when E_Record_Subtype |
8623 E_Class_Wide_Subtype =>
8624 Write_Str ("Cloned_Subtype");
8628 Write_Str ("DTC_Entity");
8631 Write_Str ("Entry_Formal");
8636 Write_Str ("First_Private_Entity");
8638 when Enumeration_Kind =>
8639 Write_Str ("Lit_Strings");
8641 when E_String_Literal_Subtype =>
8642 Write_Str ("String_Literal_Length");
8646 Write_Str ("Unset_Reference");
8649 Write_Str ("Field16??");
8651 end Write_Field16_Name;
8653 ------------------------
8654 -- Write_Field17_Name --
8655 ------------------------
8657 procedure Write_Field17_Name (Id : Entity_Id) is
8662 E_Generic_In_Out_Parameter |
8664 Write_Str ("Actual_Subtype");
8667 Write_Str ("Digits_Value");
8669 when E_Discriminant =>
8670 Write_Str ("Discriminal");
8679 E_Generic_Function |
8681 E_Generic_Procedure |
8689 E_Return_Statement |
8691 E_Subprogram_Type =>
8692 Write_Str ("First_Entity");
8695 Write_Str ("First_Index");
8697 when Enumeration_Kind =>
8698 Write_Str ("First_Literal");
8701 Write_Str ("Master_Id");
8703 when Modular_Integer_Kind =>
8704 Write_Str ("Modulus");
8706 when E_Incomplete_Type =>
8707 Write_Str ("Non_Limited_View");
8709 when E_Incomplete_Subtype =>
8710 if From_With_Type (Id) then
8711 Write_Str ("Non_Limited_View");
8715 Write_Str ("Prival");
8718 Write_Str ("Field17??");
8720 end Write_Field17_Name;
8722 ------------------------
8723 -- Write_Field18_Name --
8724 ------------------------
8726 procedure Write_Field18_Name (Id : Entity_Id) is
8729 when E_Enumeration_Literal |
8733 Write_Str ("Alias");
8735 when E_Record_Type =>
8736 Write_Str ("Corresponding_Concurrent_Type");
8738 when E_Subprogram_Body =>
8739 Write_Str ("Corresponding_Protected_Entry");
8741 when Concurrent_Kind =>
8742 Write_Str ("Corresponding_Record_Type");
8747 Write_Str ("Enclosing_Scope");
8749 when E_Entry_Index_Parameter =>
8750 Write_Str ("Entry_Index_Constant");
8752 when E_Class_Wide_Subtype |
8753 E_Access_Protected_Subprogram_Type |
8754 E_Anonymous_Access_Protected_Subprogram_Type |
8755 E_Access_Subprogram_Type |
8757 Write_Str ("Equivalent_Type");
8759 when Fixed_Point_Kind =>
8760 Write_Str ("Delta_Value");
8762 when Incomplete_Or_Private_Kind |
8764 Write_Str ("Private_Dependents");
8767 Write_Str ("Renamed_Object");
8771 E_Generic_Function |
8772 E_Generic_Procedure |
8773 E_Generic_Package =>
8774 Write_Str ("Renamed_Entity");
8777 Write_Str ("Field18??");
8779 end Write_Field18_Name;
8781 -----------------------
8782 -- Write_Field19_Name --
8783 -----------------------
8785 procedure Write_Field19_Name (Id : Entity_Id) is
8789 E_Generic_Package =>
8790 Write_Str ("Body_Entity");
8792 when E_Discriminant =>
8793 Write_Str ("Corresponding_Discriminant");
8796 Write_Str ("Default_Aspect_Value");
8798 when E_Array_Type =>
8799 Write_Str ("Default_Component_Value");
8801 when E_Record_Type =>
8802 Write_Str ("Parent_Subtype");
8806 Write_Str ("Size_Check_Code");
8808 when E_Package_Body |
8810 Write_Str ("Spec_Entity");
8812 when Private_Kind =>
8813 Write_Str ("Underlying_Full_View");
8815 when E_Function | E_Operator | E_Subprogram_Type =>
8816 Write_Str ("Extra_Accessibility_Of_Result");
8819 Write_Str ("Field19??");
8821 end Write_Field19_Name;
8823 -----------------------
8824 -- Write_Field20_Name --
8825 -----------------------
8827 procedure Write_Field20_Name (Id : Entity_Id) is
8831 Write_Str ("Component_Type");
8833 when E_In_Parameter |
8834 E_Generic_In_Parameter =>
8835 Write_Str ("Default_Value");
8838 Write_Str ("Directly_Designated_Type");
8841 Write_Str ("Discriminant_Checking_Func");
8843 when E_Discriminant =>
8844 Write_Str ("Discriminant_Default_Value");
8853 E_Generic_Function |
8855 E_Generic_Procedure |
8863 E_Return_Statement |
8865 E_Subprogram_Type =>
8866 Write_Str ("Last_Entity");
8870 Write_Str ("Prival_Link");
8873 Write_Str ("Scalar_Range");
8876 Write_Str ("Register_Exception_Call");
8879 Write_Str ("Field20??");
8881 end Write_Field20_Name;
8883 -----------------------
8884 -- Write_Field21_Name --
8885 -----------------------
8887 procedure Write_Field21_Name (Id : Entity_Id) is
8891 Write_Str ("Accept_Address");
8893 when E_In_Parameter =>
8894 Write_Str ("Default_Expr_Function");
8896 when Concurrent_Kind |
8897 Incomplete_Or_Private_Kind |
8901 Write_Str ("Discriminant_Constraint");
8906 E_Generic_Function |
8908 E_Generic_Procedure |
8910 Write_Str ("Interface_Name");
8913 Modular_Integer_Kind =>
8914 Write_Str ("Original_Array_Type");
8916 when Fixed_Point_Kind =>
8917 Write_Str ("Small_Value");
8920 Write_Str ("Field21??");
8922 end Write_Field21_Name;
8924 -----------------------
8925 -- Write_Field22_Name --
8926 -----------------------
8928 procedure Write_Field22_Name (Id : Entity_Id) is
8932 Write_Str ("Associated_Storage_Pool");
8935 Write_Str ("Component_Size");
8937 when E_Record_Type =>
8938 Write_Str ("Corresponding_Remote_Type");
8942 Write_Str ("Original_Record_Component");
8944 when E_Enumeration_Literal =>
8945 Write_Str ("Enumeration_Rep_Expr");
8948 Write_Str ("Exception_Code");
8950 when E_Record_Type_With_Private |
8951 E_Record_Subtype_With_Private |
8954 E_Limited_Private_Type |
8955 E_Limited_Private_Subtype =>
8956 Write_Str ("Private_View");
8959 Write_Str ("Protected_Formal");
8969 E_Generic_Function |
8970 E_Generic_Procedure |
8973 E_Return_Statement |
8976 Write_Str ("Scope_Depth_Value");
8979 Write_Str ("Shared_Var_Procs_Instance");
8982 Write_Str ("Field22??");
8984 end Write_Field22_Name;
8986 ------------------------
8987 -- Write_Field23_Name --
8988 ------------------------
8990 procedure Write_Field23_Name (Id : Entity_Id) is
8993 when E_Discriminant =>
8994 Write_Str ("CR_Discriminant");
8997 Write_Str ("Entry_Cancel_Parameter");
8999 when E_Enumeration_Type =>
9000 Write_Str ("Enum_Pos_To_Rep");
9004 Write_Str ("Extra_Constrained");
9007 Write_Str ("Finalization_Master");
9009 when E_Generic_Function |
9011 E_Generic_Procedure =>
9012 Write_Str ("Inner_Instances");
9015 Write_Str ("Packed_Array_Type");
9018 Write_Str ("Protection_Object");
9020 when Concurrent_Kind |
9021 Incomplete_Or_Private_Kind |
9025 Write_Str ("Stored_Constraint");
9029 if Present (Scope (Id))
9030 and then Is_Protected_Type (Scope (Id))
9032 Write_Str ("Protection_Object");
9034 Write_Str ("Generic_Renamings");
9038 if Is_Generic_Instance (Id) then
9039 Write_Str ("Generic_Renamings");
9041 Write_Str ("Limited_View");
9045 Write_Str ("Field23??");
9047 end Write_Field23_Name;
9049 ------------------------
9050 -- Write_Field24_Name --
9051 ------------------------
9053 procedure Write_Field24_Name (Id : Entity_Id) is
9058 Write_Str ("Finalizer");
9063 Write_Str ("Related_Expression");
9069 Generic_Subprogram_Kind =>
9070 Write_Str ("Contract");
9073 Write_Str ("Field24???");
9075 end Write_Field24_Name;
9077 ------------------------
9078 -- Write_Field25_Name --
9079 ------------------------
9081 procedure Write_Field25_Name (Id : Entity_Id) is
9085 Write_Str ("Abstract_States");
9088 Write_Str ("Debug_Renaming_Link");
9091 Write_Str ("DT_Offset_To_Top_Func");
9095 Write_Str ("Interface_Alias");
9097 when E_Record_Type |
9099 E_Record_Type_With_Private |
9100 E_Record_Subtype_With_Private =>
9101 Write_Str ("Interfaces");
9105 Write_Str ("Related_Array_Object");
9108 Write_Str ("Task_Body_Procedure");
9112 Write_Str ("PPC_Wrapper");
9114 when E_Enumeration_Subtype |
9115 E_Modular_Integer_Subtype |
9116 E_Signed_Integer_Subtype =>
9117 Write_Str ("Static_Predicate");
9120 Write_Str ("Field25??");
9122 end Write_Field25_Name;
9124 ------------------------
9125 -- Write_Field26_Name --
9126 ------------------------
9128 procedure Write_Field26_Name (Id : Entity_Id) is
9131 when E_Record_Type |
9132 E_Record_Type_With_Private =>
9133 Write_Str ("Dispatch_Table_Wrappers");
9135 when E_In_Out_Parameter |
9138 Write_Str ("Last_Assignment");
9140 when E_Access_Subprogram_Type =>
9141 Write_Str ("Original_Access_Type");
9143 when E_Generic_Package |
9145 Write_Str ("Package_Instantiation");
9149 Write_Str ("Related_Type");
9152 Write_Str ("Relative_Deadline_Variable");
9156 Write_Str ("Overridden_Operation");
9159 Write_Str ("Field26??");
9161 end Write_Field26_Name;
9163 ------------------------
9164 -- Write_Field27_Name --
9165 ------------------------
9167 procedure Write_Field27_Name (Id : Entity_Id) is
9172 Write_Str ("Current_Use_Clause");
9177 Write_Str ("Related_Type");
9181 Write_Str ("Wrapped_Entity");
9184 Write_Str ("Field27??");
9186 end Write_Field27_Name;
9188 ------------------------
9189 -- Write_Field28_Name --
9190 ------------------------
9192 procedure Write_Field28_Name (Id : Entity_Id) is
9200 E_Subprogram_Type =>
9201 Write_Str ("Extra_Formals");
9203 when E_Constant | E_Variable =>
9204 Write_Str ("Initialization_Statements");
9206 when E_Record_Type =>
9207 Write_Str ("Underlying_Record_View");
9210 Write_Str ("Field28??");
9212 end Write_Field28_Name;
9214 ------------------------
9215 -- Write_Field29_Name --
9216 ------------------------
9218 procedure Write_Field29_Name (Id : Entity_Id) is
9222 Write_Str ("Subprograms_For_Type");
9225 Write_Str ("Field29??");
9227 end Write_Field29_Name;
9229 ------------------------
9230 -- Write_Field30_Name --
9231 ------------------------
9233 procedure Write_Field30_Name (Id : Entity_Id) is
9237 Write_Str ("Corresponding_Equality");
9240 Write_Str ("Static_Initialization");
9243 Write_Str ("Field30??");
9245 end Write_Field30_Name;
9247 ------------------------
9248 -- Write_Field31_Name --
9249 ------------------------
9251 procedure Write_Field31_Name (Id : Entity_Id) is
9256 Write_Str ("Thunk_Entity");
9259 Write_Str ("Field31??");
9261 end Write_Field31_Name;
9263 ------------------------
9264 -- Write_Field32_Name --
9265 ------------------------
9267 procedure Write_Field32_Name (Id : Entity_Id) is
9271 E_Generic_Function |
9273 E_Generic_Procedure |
9277 E_Subprogram_Body =>
9278 Write_Str ("SPARK_Mode_Pragmas");
9281 Write_Str ("Field32??");
9283 end Write_Field32_Name;
9285 ------------------------
9286 -- Write_Field33_Name --
9287 ------------------------
9289 procedure Write_Field33_Name (Id : Entity_Id) is
9293 Write_Str ("Field33??");
9295 end Write_Field33_Name;
9297 ------------------------
9298 -- Write_Field34_Name --
9299 ------------------------
9301 procedure Write_Field34_Name (Id : Entity_Id) is
9305 Write_Str ("Field34??");
9307 end Write_Field34_Name;
9309 ------------------------
9310 -- Write_Field35_Name --
9311 ------------------------
9313 procedure Write_Field35_Name (Id : Entity_Id) is
9317 Write_Str ("Field35??");
9319 end Write_Field35_Name;
9321 -------------------------
9322 -- Iterator Procedures --
9323 -------------------------
9325 procedure Proc_Next_Component (N : in out Node_Id) is
9327 N := Next_Component (N);
9328 end Proc_Next_Component;
9330 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
9332 N := Next_Entity (N);
9333 while Present (N) loop
9334 exit when Ekind_In (N, E_Component, E_Discriminant);
9335 N := Next_Entity (N);
9337 end Proc_Next_Component_Or_Discriminant;
9339 procedure Proc_Next_Discriminant (N : in out Node_Id) is
9341 N := Next_Discriminant (N);
9342 end Proc_Next_Discriminant;
9344 procedure Proc_Next_Formal (N : in out Node_Id) is
9346 N := Next_Formal (N);
9347 end Proc_Next_Formal;
9349 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
9351 N := Next_Formal_With_Extras (N);
9352 end Proc_Next_Formal_With_Extras;
9354 procedure Proc_Next_Index (N : in out Node_Id) is
9356 N := Next_Index (N);
9357 end Proc_Next_Index;
9359 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
9361 N := Next_Inlined_Subprogram (N);
9362 end Proc_Next_Inlined_Subprogram;
9364 procedure Proc_Next_Literal (N : in out Node_Id) is
9366 N := Next_Literal (N);
9367 end Proc_Next_Literal;
9369 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
9371 N := Next_Stored_Discriminant (N);
9372 end Proc_Next_Stored_Discriminant;