1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2010, 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 Nlists; use Nlists;
37 with Output; use Output;
38 with Sinfo; use Sinfo;
39 with Stand; use Stand;
43 use Atree.Unchecked_Access;
44 -- This is one of the packages that is allowed direct untyped access to
45 -- the fields in a node, since it provides the next level abstraction
46 -- which incorporates appropriate checks.
48 ----------------------------------------------
49 -- Usage of Fields in Defining Entity Nodes --
50 ----------------------------------------------
52 -- Four of these fields are defined in Sinfo, since they in are the base
53 -- part of the node. The access routines for these four fields and the
54 -- corresponding set procedures are defined in Sinfo. These fields are
55 -- present in all entities. Note that Homonym is also in the base part of
56 -- the node, but has access routines that are more properly part of Einfo,
57 -- which is why they are defined here.
64 -- Remaining fields are present only in extended nodes (i.e. entities)
66 -- The following fields are present in all entities
69 -- First_Rep_Item Node6
72 -- The usage of other fields (and the entity kinds to which it applies)
73 -- depends on the particular field (see Einfo spec for details).
75 -- Associated_Node_For_Itype Node8
76 -- Dependent_Instances Elist8
77 -- Hiding_Loop_Variable Node8
78 -- Mechanism Uint8 (but returns Mechanism_Type)
79 -- Normalized_First_Bit Uint8
80 -- Postcondition_Proc Node8
81 -- Return_Applies_To Node8
82 -- First_Exit_Statement Node8
84 -- Class_Wide_Type Node9
85 -- Current_Value Node9
88 -- Direct_Primitive_Operations Elist10
89 -- Discriminal_Link Node10
90 -- Float_Rep Uint10 (but returns Float_Rep_Kind)
91 -- Handler_Records List10
92 -- Normalized_Position_Max Uint10
94 -- Component_Bit_Offset Uint11
96 -- Entry_Component Node11
97 -- Enumeration_Pos Uint11
98 -- Generic_Homonym Node11
99 -- Protected_Body_Subprogram Node11
102 -- Barrier_Function Node12
103 -- Enumeration_Rep Uint12
105 -- Next_Inlined_Subprogram Node12
107 -- Corresponding_Equality Node13
108 -- Component_Clause Node13
109 -- Elaboration_Entity Node13
110 -- Extra_Accessibility Node13
114 -- First_Optional_Parameter Node14
115 -- Normalized_Position Uint14
116 -- Shadow_Entities List14
118 -- Discriminant_Number Uint15
119 -- DT_Position Uint15
120 -- DT_Entry_Count Uint15
121 -- Entry_Bodies_Array Node15
122 -- Entry_Parameters_Type Node15
123 -- Extra_Formal Node15
124 -- Lit_Indexes Node15
125 -- Related_Instance Node15
126 -- Scale_Value Uint15
127 -- Storage_Size_Variable Node15
128 -- String_Literal_Low_Bound Node15
130 -- Access_Disp_Table Elist16
131 -- Cloned_Subtype Node16
133 -- Entry_Formal Node16
134 -- First_Private_Entity Node16
135 -- Lit_Strings Node16
136 -- String_Literal_Length Uint16
137 -- Unset_Reference Node16
139 -- Actual_Subtype Node17
140 -- Digits_Value Uint17
141 -- Discriminal Node17
142 -- First_Entity Node17
143 -- First_Index Node17
144 -- First_Literal Node17
147 -- Non_Limited_View Node17
151 -- Corresponding_Concurrent_Type Node18
152 -- Corresponding_Protected_Entry Node18
153 -- Corresponding_Record_Type Node18
154 -- Delta_Value Ureal18
155 -- Enclosing_Scope Node18
156 -- Equivalent_Type Node18
157 -- Private_Dependents Elist18
158 -- Renamed_Entity Node18
159 -- Renamed_Object Node18
161 -- Body_Entity Node19
162 -- Corresponding_Discriminant Node19
163 -- Finalization_Chain_Entity Node19
164 -- Parent_Subtype Node19
165 -- Related_Array_Object Node19
166 -- Size_Check_Code Node19
167 -- Spec_Entity Node19
168 -- Underlying_Full_View Node19
170 -- Component_Type Node20
171 -- Default_Value Node20
172 -- Directly_Designated_Type Node20
173 -- Discriminant_Checking_Func Node20
174 -- Discriminant_Default_Value Node20
175 -- Last_Entity Node20
176 -- Prival_Link Node20
177 -- Register_Exception_Call Node20
178 -- Scalar_Range Node20
180 -- Accept_Address Elist21
181 -- Default_Expr_Function Node21
182 -- Discriminant_Constraint Elist21
183 -- Interface_Name Node21
184 -- Original_Access_Type Node21
185 -- Original_Array_Type Node21
186 -- Small_Value Ureal21
188 -- Associated_Storage_Pool Node22
189 -- Component_Size Uint22
190 -- Corresponding_Remote_Type Node22
191 -- Enumeration_Rep_Expr Node22
192 -- Exception_Code Uint22
193 -- Original_Record_Component Node22
194 -- Private_View Node22
195 -- Protected_Formal Node22
196 -- Scope_Depth_Value Uint22
197 -- Shared_Var_Procs_Instance Node22
199 -- Associated_Final_Chain Node23
200 -- CR_Discriminant Node23
201 -- Entry_Cancel_Parameter Node23
202 -- Enum_Pos_To_Rep Node23
203 -- Extra_Constrained Node23
204 -- Generic_Renamings Elist23
205 -- Inner_Instances Elist23
206 -- Limited_View Node23
207 -- Packed_Array_Type Node23
208 -- Protection_Object Node23
209 -- Stored_Constraint Elist23
211 -- Related_Expression Node24
212 -- Spec_PPC_List Node24
214 -- Interface_Alias Node25
215 -- Interfaces Elist25
216 -- Debug_Renaming_Link Node25
217 -- DT_Offset_To_Top_Func Node25
218 -- PPC_Wrapper Node25
219 -- Static_Predicate List25
220 -- Task_Body_Procedure Node25
222 -- Dispatch_Table_Wrappers Elist26
223 -- Last_Assignment Node26
224 -- Overridden_Operation Node26
225 -- Package_Instantiation Node26
226 -- Relative_Deadline_Variable Node26
227 -- Static_Initialization Node26
229 -- Current_Use_Clause Node27
230 -- Related_Type Node27
231 -- Wrapped_Entity Node27
233 -- Extra_Formals Node28
234 -- Underlying_Record_View Node28
236 -- Subprograms_For_Type Node29
238 ---------------------------------------------
239 -- Usage of Flags in Defining Entity Nodes --
240 ---------------------------------------------
242 -- All flags are unique, there is no overlaying, so each flag is physically
243 -- present in every entity. However, for many of the flags, it only makes
244 -- sense for them to be set true for certain subsets of entity kinds. See
245 -- the spec of Einfo for further details.
247 -- Note: Flag1-Flag3 are absent from this list, for historical reasons
250 -- Has_Discriminants Flag5
251 -- Is_Dispatching_Operation Flag6
252 -- Is_Immediately_Visible Flag7
254 -- Is_Potentially_Use_Visible Flag9
258 -- Is_Constrained Flag12
259 -- Is_Generic_Type Flag13
260 -- Depends_On_Private Flag14
262 -- Is_Volatile Flag16
263 -- Is_Internal Flag17
264 -- Has_Delayed_Freeze Flag18
265 -- Is_Abstract_Subprogram Flag19
266 -- Is_Concurrent_Record_Type Flag20
268 -- Has_Master_Entity Flag21
269 -- Needs_No_Actuals Flag22
270 -- Has_Storage_Size_Clause Flag23
271 -- Is_Imported Flag24
272 -- Is_Limited_Record Flag25
273 -- Has_Completion Flag26
274 -- Has_Pragma_Controlled Flag27
275 -- Is_Statically_Allocated Flag28
276 -- Has_Size_Clause Flag29
279 -- Checks_May_Be_Suppressed Flag31
280 -- Kill_Elaboration_Checks Flag32
281 -- Kill_Range_Checks Flag33
282 -- Kill_Tag_Checks Flag34
283 -- Is_Class_Wide_Equivalent_Type Flag35
284 -- Referenced_As_LHS Flag36
285 -- Is_Known_Non_Null Flag37
286 -- Can_Never_Be_Null Flag38
287 -- Has_Default_Value Flag39
288 -- Body_Needed_For_SAL Flag40
290 -- Treat_As_Volatile Flag41
291 -- Is_Controlled Flag42
292 -- Has_Controlled_Component Flag43
294 -- In_Private_Part Flag45
295 -- Has_Alignment_Clause Flag46
297 -- In_Package_Body Flag48
299 -- Delay_Subprogram_Descriptors Flag50
302 -- Is_Entry_Formal Flag52
303 -- Is_Private_Descendant Flag53
304 -- Return_Present Flag54
305 -- Is_Tagged_Type Flag55
306 -- Has_Homonym Flag56
308 -- Non_Binary_Modulus Flag58
309 -- Is_Preelaborated Flag59
310 -- Is_Shared_Passive Flag60
312 -- Is_Remote_Types Flag61
313 -- Is_Remote_Call_Interface Flag62
314 -- Is_Character_Type Flag63
315 -- Is_Intrinsic_Subprogram Flag64
316 -- Has_Record_Rep_Clause Flag65
317 -- Has_Enumeration_Rep_Clause Flag66
318 -- Has_Small_Clause Flag67
319 -- Has_Component_Size_Clause Flag68
320 -- Is_Access_Constant Flag69
321 -- Is_First_Subtype Flag70
323 -- Has_Completion_In_Body Flag71
324 -- Has_Unknown_Discriminants Flag72
325 -- Is_Child_Unit Flag73
326 -- Is_CPP_Class Flag74
327 -- Has_Non_Standard_Rep Flag75
328 -- Is_Constructor Flag76
329 -- Static_Elaboration_Desired Flag77
331 -- Has_All_Calls_Remote Flag79
332 -- Is_Constr_Subt_For_U_Nominal Flag80
334 -- Is_Asynchronous Flag81
335 -- Has_Gigi_Rep_Item Flag82
336 -- Has_Machine_Radix_Clause Flag83
337 -- Machine_Radix_10 Flag84
339 -- Has_Atomic_Components Flag86
340 -- Has_Volatile_Components Flag87
341 -- Discard_Names Flag88
342 -- Is_Interrupt_Handler Flag89
343 -- Returns_By_Ref Flag90
346 -- Size_Known_At_Compile_Time Flag92
347 -- Has_Subprogram_Descriptor Flag93
348 -- Is_Generic_Actual_Type Flag94
349 -- Uses_Sec_Stack Flag95
350 -- Warnings_Off Flag96
351 -- Is_Controlling_Formal Flag97
352 -- Has_Controlling_Result Flag98
353 -- Is_Exported Flag99
354 -- Has_Specified_Layout Flag100
356 -- Has_Nested_Block_With_Handler Flag101
358 -- Is_Completely_Hidden Flag103
359 -- Address_Taken Flag104
360 -- Suppress_Init_Proc Flag105
361 -- Is_Limited_Composite Flag106
362 -- Is_Private_Composite Flag107
363 -- Default_Expressions_Processed Flag108
364 -- Is_Non_Static_Subtype Flag109
365 -- Has_External_Tag_Rep_Clause Flag110
367 -- Is_Formal_Subprogram Flag111
368 -- Is_Renaming_Of_Object Flag112
370 -- Delay_Cleanups Flag114
371 -- Never_Set_In_Source Flag115
372 -- Is_Visible_Child_Unit Flag116
373 -- Is_Unchecked_Union Flag117
374 -- Is_For_Access_Subtype Flag118
375 -- Has_Convention_Pragma Flag119
376 -- Has_Primitive_Operations Flag120
378 -- Has_Pragma_Pack Flag121
379 -- Is_Bit_Packed_Array Flag122
380 -- Has_Unchecked_Union Flag123
381 -- Is_Eliminated Flag124
382 -- C_Pass_By_Copy Flag125
383 -- Is_Instantiated Flag126
384 -- Is_Valued_Procedure Flag127
385 -- (used for Component_Alignment) Flag128
386 -- (used for Component_Alignment) Flag129
387 -- Is_Generic_Instance Flag130
389 -- No_Pool_Assigned Flag131
390 -- Is_AST_Entry Flag132
391 -- Is_VMS_Exception Flag133
392 -- Is_Optional_Parameter Flag134
393 -- Has_Aliased_Components Flag135
394 -- No_Strict_Aliasing Flag136
395 -- Is_Machine_Code_Subprogram Flag137
396 -- Is_Packed_Array_Type Flag138
397 -- Has_Biased_Representation Flag139
398 -- Has_Complex_Representation Flag140
400 -- Is_Constr_Subt_For_UN_Aliased Flag141
401 -- Has_Missing_Return Flag142
402 -- Has_Recursive_Call Flag143
403 -- Is_Unsigned_Type Flag144
404 -- Strict_Alignment Flag145
405 -- Is_Abstract_Type Flag146
406 -- Needs_Debug_Info Flag147
407 -- Suppress_Elaboration_Warnings Flag148
408 -- Is_Compilation_Unit Flag149
409 -- Has_Pragma_Elaborate_Body Flag150
411 -- Has_Default_Component_Value Flag151
412 -- Entry_Accepted Flag152
413 -- Is_Obsolescent Flag153
414 -- Has_Per_Object_Constraint Flag154
415 -- Has_Private_Declaration Flag155
416 -- Referenced Flag156
417 -- Has_Pragma_Inline Flag157
418 -- Finalize_Storage_Only Flag158
419 -- From_With_Type Flag159
420 -- Is_Package_Body_Entity Flag160
422 -- Has_Qualified_Name Flag161
423 -- Nonzero_Is_True Flag162
424 -- Is_True_Constant Flag163
425 -- Reverse_Bit_Order Flag164
426 -- Suppress_Style_Checks Flag165
427 -- Debug_Info_Off Flag166
428 -- Sec_Stack_Needed_For_Return Flag167
429 -- Materialize_Entity Flag168
430 -- Has_Pragma_Thread_Local_Storage Flag169
431 -- Is_Known_Valid Flag170
433 -- Is_Hidden_Open_Scope Flag171
434 -- Has_Object_Size_Clause Flag172
435 -- Has_Fully_Qualified_Name Flag173
436 -- Elaboration_Entity_Required Flag174
437 -- Has_Forward_Instantiation Flag175
438 -- Is_Discrim_SO_Function Flag176
439 -- Size_Depends_On_Discriminant Flag177
440 -- Is_Null_Init_Proc Flag178
441 -- Has_Pragma_Pure_Function Flag179
442 -- Has_Pragma_Unreferenced Flag180
444 -- Has_Contiguous_Rep Flag181
445 -- Has_Xref_Entry Flag182
446 -- Must_Be_On_Byte_Boundary Flag183
447 -- Has_Stream_Size_Clause Flag184
448 -- Is_Ada_2005_Only Flag185
449 -- Is_Interface Flag186
450 -- Has_Constrained_Partial_View Flag187
451 -- Has_Persistent_BSS Flag188
452 -- Is_Pure_Unit_Access_Type Flag189
453 -- Has_Specified_Stream_Input Flag190
455 -- Has_Specified_Stream_Output Flag191
456 -- Has_Specified_Stream_Read Flag192
457 -- Has_Specified_Stream_Write Flag193
458 -- Is_Local_Anonymous_Access Flag194
459 -- Is_Primitive_Wrapper Flag195
460 -- Was_Hidden Flag196
461 -- Is_Limited_Interface Flag197
462 -- Has_Pragma_Ordered Flag198
463 -- Is_Ada_2012_Only Flag199
465 -- Has_Delayed_Aspects Flag200
466 -- Has_Anon_Block_Suffix Flag201
467 -- Itype_Printed Flag202
468 -- Has_Pragma_Pure Flag203
469 -- Is_Known_Null Flag204
470 -- Low_Bound_Tested Flag205
471 -- Is_Visible_Formal Flag206
472 -- Known_To_Have_Preelab_Init Flag207
473 -- Must_Have_Preelab_Init Flag208
474 -- Is_Return_Object Flag209
475 -- Elaborate_Body_Desirable Flag210
477 -- Has_Static_Discriminants Flag211
478 -- Has_Pragma_Unreferenced_Objects Flag212
479 -- Requires_Overriding Flag213
481 -- Has_Up_Level_Access Flag215
482 -- Universal_Aliasing Flag216
483 -- Suppress_Value_Tracking_On_Call Flag217
484 -- Is_Primitive Flag218
485 -- Has_Initial_Value Flag219
486 -- Has_Dispatch_Table Flag220
488 -- Has_Pragma_Preelab_Init Flag221
489 -- Used_As_Generic_Actual Flag222
490 -- Is_Descendent_Of_Address Flag223
493 -- Is_Only_Out_Parameter Flag226
494 -- Referenced_As_Out_Parameter Flag227
495 -- Has_Thunks Flag228
496 -- Can_Use_Internal_Rep Flag229
497 -- Has_Pragma_Inline_Always Flag230
499 -- Renamed_In_Spec Flag231
500 -- Has_Invariants Flag232
501 -- Has_Pragma_Unmodified Flag233
502 -- Is_Dispatch_Table_Entity Flag234
503 -- Is_Trivial_Subprogram Flag235
504 -- Warnings_Off_Used Flag236
505 -- Warnings_Off_Used_Unmodified Flag237
506 -- Warnings_Off_Used_Unreferenced Flag238
507 -- OK_To_Reorder_Components Flag239
508 -- Has_Postconditions Flag240
510 -- Optimize_Alignment_Space Flag241
511 -- Optimize_Alignment_Time Flag242
512 -- Overlays_Constant Flag243
513 -- Is_RACW_Stub_Type Flag244
514 -- Is_Private_Primitive Flag245
515 -- Is_Underlying_Record_View Flag246
516 -- OK_To_Rename Flag247
517 -- Has_Inheritable_Invariants Flag248
518 -- Is_Safe_To_Reevaluate Flag249
519 -- Has_Predicates Flag250
526 -----------------------
527 -- Local subprograms --
528 -----------------------
530 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N;
531 -- Returns the attribute definition clause for Id whose name is Rep_Name.
532 -- Returns Empty if no matching attribute definition clause found for Id.
538 function Float_Rep (Id : E) return F is
539 pragma Assert (Is_Floating_Point_Type (Id));
541 return F'Val (UI_To_Int (Uint10 (Base_Type (Id))));
548 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N is
552 Ritem := First_Rep_Item (Id);
553 while Present (Ritem) loop
554 if Nkind (Ritem) = N_Attribute_Definition_Clause
555 and then Chars (Ritem) = Rep_Name
559 Next_Rep_Item (Ritem);
566 --------------------------------
567 -- Attribute Access Functions --
568 --------------------------------
570 function Accept_Address (Id : E) return L is
575 function Access_Disp_Table (Id : E) return L is
577 pragma Assert (Ekind_In (Id, E_Record_Type,
579 return Elist16 (Implementation_Base_Type (Id));
580 end Access_Disp_Table;
582 function Actual_Subtype (Id : E) return E is
585 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
586 or else Is_Formal (Id));
590 function Address_Taken (Id : E) return B is
595 function Alias (Id : E) return E is
598 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
602 function Alignment (Id : E) return U is
604 pragma Assert (Is_Type (Id)
605 or else Is_Formal (Id)
606 or else Ekind_In (Id, E_Loop_Parameter,
613 function Associated_Final_Chain (Id : E) return E is
615 pragma Assert (Is_Access_Type (Id));
617 end Associated_Final_Chain;
619 function Associated_Formal_Package (Id : E) return E is
621 pragma Assert (Ekind (Id) = E_Package);
623 end Associated_Formal_Package;
625 function Associated_Node_For_Itype (Id : E) return N is
628 end Associated_Node_For_Itype;
630 function Associated_Storage_Pool (Id : E) return E is
632 pragma Assert (Is_Access_Type (Id));
633 return Node22 (Root_Type (Id));
634 end Associated_Storage_Pool;
636 function Barrier_Function (Id : E) return N is
638 pragma Assert (Is_Entry (Id));
640 end Barrier_Function;
642 function Block_Node (Id : E) return N is
644 pragma Assert (Ekind (Id) = E_Block);
648 function Body_Entity (Id : E) return E is
650 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
654 function Body_Needed_For_SAL (Id : E) return B is
657 (Ekind (Id) = E_Package
658 or else Is_Subprogram (Id)
659 or else Is_Generic_Unit (Id));
661 end Body_Needed_For_SAL;
663 function C_Pass_By_Copy (Id : E) return B is
665 pragma Assert (Is_Record_Type (Id));
666 return Flag125 (Implementation_Base_Type (Id));
669 function Can_Never_Be_Null (Id : E) return B is
672 end Can_Never_Be_Null;
674 function Checks_May_Be_Suppressed (Id : E) return B is
677 end Checks_May_Be_Suppressed;
679 function Class_Wide_Type (Id : E) return E is
681 pragma Assert (Is_Type (Id));
685 function Cloned_Subtype (Id : E) return E is
687 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
691 function Component_Bit_Offset (Id : E) return U is
693 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
695 end Component_Bit_Offset;
697 function Component_Clause (Id : E) return N is
699 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
701 end Component_Clause;
703 function Component_Size (Id : E) return U is
705 pragma Assert (Is_Array_Type (Id));
706 return Uint22 (Implementation_Base_Type (Id));
709 function Component_Type (Id : E) return E is
711 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
712 return Node20 (Implementation_Base_Type (Id));
715 function Corresponding_Concurrent_Type (Id : E) return E is
717 pragma Assert (Ekind (Id) = E_Record_Type);
719 end Corresponding_Concurrent_Type;
721 function Corresponding_Discriminant (Id : E) return E is
723 pragma Assert (Ekind (Id) = E_Discriminant);
725 end Corresponding_Discriminant;
727 function Corresponding_Equality (Id : E) return E is
730 (Ekind (Id) = E_Function
731 and then not Comes_From_Source (Id)
732 and then Chars (Id) = Name_Op_Ne);
734 end Corresponding_Equality;
736 function Corresponding_Protected_Entry (Id : E) return E is
738 pragma Assert (Ekind (Id) = E_Subprogram_Body);
740 end Corresponding_Protected_Entry;
742 function Corresponding_Record_Type (Id : E) return E is
744 pragma Assert (Is_Concurrent_Type (Id));
746 end Corresponding_Record_Type;
748 function Corresponding_Remote_Type (Id : E) return E is
751 end Corresponding_Remote_Type;
753 function Current_Use_Clause (Id : E) return E is
755 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
757 end Current_Use_Clause;
759 function Current_Value (Id : E) return N is
761 pragma Assert (Ekind (Id) in Object_Kind);
765 function CR_Discriminant (Id : E) return E is
770 function Debug_Info_Off (Id : E) return B is
775 function Debug_Renaming_Link (Id : E) return E is
778 end Debug_Renaming_Link;
780 function Default_Expr_Function (Id : E) return E is
782 pragma Assert (Is_Formal (Id));
784 end Default_Expr_Function;
786 function Default_Expressions_Processed (Id : E) return B is
789 end Default_Expressions_Processed;
791 function Default_Value (Id : E) return N is
793 pragma Assert (Is_Formal (Id));
797 function Delay_Cleanups (Id : E) return B is
802 function Delay_Subprogram_Descriptors (Id : E) return B is
805 end Delay_Subprogram_Descriptors;
807 function Delta_Value (Id : E) return R is
809 pragma Assert (Is_Fixed_Point_Type (Id));
813 function Dependent_Instances (Id : E) return L is
815 pragma Assert (Is_Generic_Instance (Id));
817 end Dependent_Instances;
819 function Depends_On_Private (Id : E) return B is
821 pragma Assert (Nkind (Id) in N_Entity);
823 end Depends_On_Private;
825 function Digits_Value (Id : E) return U is
828 (Is_Floating_Point_Type (Id)
829 or else Is_Decimal_Fixed_Point_Type (Id));
833 function Direct_Primitive_Operations (Id : E) return L is
835 pragma Assert (Is_Tagged_Type (Id));
837 end Direct_Primitive_Operations;
839 function Directly_Designated_Type (Id : E) return E is
841 pragma Assert (Is_Access_Type (Id));
843 end Directly_Designated_Type;
845 function Discard_Names (Id : E) return B is
850 function Discriminal (Id : E) return E is
852 pragma Assert (Ekind (Id) = E_Discriminant);
856 function Discriminal_Link (Id : E) return N is
859 end Discriminal_Link;
861 function Discriminant_Checking_Func (Id : E) return E is
863 pragma Assert (Ekind (Id) = E_Component);
865 end Discriminant_Checking_Func;
867 function Discriminant_Constraint (Id : E) return L is
869 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
871 end Discriminant_Constraint;
873 function Discriminant_Default_Value (Id : E) return N is
875 pragma Assert (Ekind (Id) = E_Discriminant);
877 end Discriminant_Default_Value;
879 function Discriminant_Number (Id : E) return U is
881 pragma Assert (Ekind (Id) = E_Discriminant);
883 end Discriminant_Number;
885 function Dispatch_Table_Wrappers (Id : E) return L is
887 pragma Assert (Ekind_In (Id, E_Record_Type,
889 return Elist26 (Implementation_Base_Type (Id));
890 end Dispatch_Table_Wrappers;
892 function DT_Entry_Count (Id : E) return U is
894 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
898 function DT_Offset_To_Top_Func (Id : E) return E is
900 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
902 end DT_Offset_To_Top_Func;
904 function DT_Position (Id : E) return U is
906 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
907 and then Present (DTC_Entity (Id)));
911 function DTC_Entity (Id : E) return E is
913 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
917 function Elaborate_Body_Desirable (Id : E) return B is
919 pragma Assert (Ekind (Id) = E_Package);
921 end Elaborate_Body_Desirable;
923 function Elaboration_Entity (Id : E) return E is
928 Ekind (Id) = E_Package
930 Is_Generic_Unit (Id));
932 end Elaboration_Entity;
934 function Elaboration_Entity_Required (Id : E) return B is
939 Ekind (Id) = E_Package
941 Is_Generic_Unit (Id));
943 end Elaboration_Entity_Required;
945 function Enclosing_Scope (Id : E) return E is
950 function Entry_Accepted (Id : E) return B is
952 pragma Assert (Is_Entry (Id));
956 function Entry_Bodies_Array (Id : E) return E is
959 end Entry_Bodies_Array;
961 function Entry_Cancel_Parameter (Id : E) return E is
964 end Entry_Cancel_Parameter;
966 function Entry_Component (Id : E) return E is
971 function Entry_Formal (Id : E) return E is
976 function Entry_Index_Constant (Id : E) return N is
978 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
980 end Entry_Index_Constant;
982 function Entry_Parameters_Type (Id : E) return E is
985 end Entry_Parameters_Type;
987 function Enum_Pos_To_Rep (Id : E) return E is
989 pragma Assert (Ekind (Id) = E_Enumeration_Type);
993 function Enumeration_Pos (Id : E) return Uint is
995 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
999 function Enumeration_Rep (Id : E) return U is
1001 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1003 end Enumeration_Rep;
1005 function Enumeration_Rep_Expr (Id : E) return N is
1007 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1009 end Enumeration_Rep_Expr;
1011 function Equivalent_Type (Id : E) return E is
1014 (Ekind_In (Id, E_Class_Wide_Type,
1015 E_Class_Wide_Subtype,
1016 E_Access_Protected_Subprogram_Type,
1017 E_Anonymous_Access_Protected_Subprogram_Type,
1018 E_Access_Subprogram_Type,
1021 end Equivalent_Type;
1023 function Esize (Id : E) return Uint is
1028 function Exception_Code (Id : E) return Uint is
1030 pragma Assert (Ekind (Id) = E_Exception);
1034 function Extra_Accessibility (Id : E) return E is
1036 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1038 end Extra_Accessibility;
1040 function Extra_Constrained (Id : E) return E is
1042 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1044 end Extra_Constrained;
1046 function Extra_Formal (Id : E) return E is
1051 function Extra_Formals (Id : E) return E is
1054 (Is_Overloadable (Id)
1055 or else Ekind_In (Id, E_Entry_Family,
1057 E_Subprogram_Type));
1061 function Can_Use_Internal_Rep (Id : E) return B is
1063 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1064 return Flag229 (Base_Type (Id));
1065 end Can_Use_Internal_Rep;
1067 function Finalization_Chain_Entity (Id : E) return E is
1070 end Finalization_Chain_Entity;
1072 function Finalize_Storage_Only (Id : E) return B is
1074 pragma Assert (Is_Type (Id));
1075 return Flag158 (Base_Type (Id));
1076 end Finalize_Storage_Only;
1078 function First_Entity (Id : E) return E is
1083 function First_Exit_Statement (Id : E) return N is
1085 pragma Assert (Ekind (Id) = E_Loop);
1087 end First_Exit_Statement;
1089 function First_Index (Id : E) return N is
1091 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1095 function First_Literal (Id : E) return E is
1097 pragma Assert (Is_Enumeration_Type (Id));
1101 function First_Optional_Parameter (Id : E) return E is
1103 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1105 end First_Optional_Parameter;
1107 function First_Private_Entity (Id : E) return E is
1109 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1110 or else Ekind (Id) in Concurrent_Kind);
1112 end First_Private_Entity;
1114 function First_Rep_Item (Id : E) return E is
1119 function Freeze_Node (Id : E) return N is
1124 function From_With_Type (Id : E) return B is
1126 return Flag159 (Id);
1129 function Full_View (Id : E) return E is
1131 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1135 function Generic_Homonym (Id : E) return E is
1137 pragma Assert (Ekind (Id) = E_Generic_Package);
1139 end Generic_Homonym;
1141 function Generic_Renamings (Id : E) return L is
1143 return Elist23 (Id);
1144 end Generic_Renamings;
1146 function Handler_Records (Id : E) return S is
1149 end Handler_Records;
1151 function Has_Aliased_Components (Id : E) return B is
1153 return Flag135 (Implementation_Base_Type (Id));
1154 end Has_Aliased_Components;
1156 function Has_Alignment_Clause (Id : E) return B is
1159 end Has_Alignment_Clause;
1161 function Has_All_Calls_Remote (Id : E) return B is
1164 end Has_All_Calls_Remote;
1166 function Has_Anon_Block_Suffix (Id : E) return B is
1168 return Flag201 (Id);
1169 end Has_Anon_Block_Suffix;
1171 function Has_Atomic_Components (Id : E) return B is
1173 return Flag86 (Implementation_Base_Type (Id));
1174 end Has_Atomic_Components;
1176 function Has_Biased_Representation (Id : E) return B is
1178 return Flag139 (Id);
1179 end Has_Biased_Representation;
1181 function Has_Completion (Id : E) return B is
1186 function Has_Completion_In_Body (Id : E) return B is
1188 pragma Assert (Is_Type (Id));
1190 end Has_Completion_In_Body;
1192 function Has_Complex_Representation (Id : E) return B is
1194 pragma Assert (Is_Type (Id));
1195 return Flag140 (Implementation_Base_Type (Id));
1196 end Has_Complex_Representation;
1198 function Has_Component_Size_Clause (Id : E) return B is
1200 pragma Assert (Is_Array_Type (Id));
1201 return Flag68 (Implementation_Base_Type (Id));
1202 end Has_Component_Size_Clause;
1204 function Has_Constrained_Partial_View (Id : E) return B is
1206 pragma Assert (Is_Type (Id));
1207 return Flag187 (Id);
1208 end Has_Constrained_Partial_View;
1210 function Has_Controlled_Component (Id : E) return B is
1212 return Flag43 (Base_Type (Id));
1213 end Has_Controlled_Component;
1215 function Has_Contiguous_Rep (Id : E) return B is
1217 return Flag181 (Id);
1218 end Has_Contiguous_Rep;
1220 function Has_Controlling_Result (Id : E) return B is
1223 end Has_Controlling_Result;
1225 function Has_Convention_Pragma (Id : E) return B is
1227 return Flag119 (Id);
1228 end Has_Convention_Pragma;
1230 function Has_Default_Component_Value (Id : E) return B is
1232 pragma Assert (Is_Array_Type (Id));
1233 return Flag151 (Base_Type (Id));
1234 end Has_Default_Component_Value;
1236 function Has_Default_Value (Id : E) return B is
1238 pragma Assert (Is_Scalar_Type (Id));
1239 return Flag39 (Base_Type (Id));
1240 end Has_Default_Value;
1242 function Has_Delayed_Aspects (Id : E) return B is
1244 pragma Assert (Nkind (Id) in N_Entity);
1245 return Flag200 (Id);
1246 end Has_Delayed_Aspects;
1248 function Has_Delayed_Freeze (Id : E) return B is
1250 pragma Assert (Nkind (Id) in N_Entity);
1252 end Has_Delayed_Freeze;
1254 function Has_Discriminants (Id : E) return B is
1256 pragma Assert (Nkind (Id) in N_Entity);
1258 end Has_Discriminants;
1260 function Has_Dispatch_Table (Id : E) return B is
1262 pragma Assert (Is_Tagged_Type (Id));
1263 return Flag220 (Id);
1264 end Has_Dispatch_Table;
1266 function Has_Enumeration_Rep_Clause (Id : E) return B is
1268 pragma Assert (Is_Enumeration_Type (Id));
1270 end Has_Enumeration_Rep_Clause;
1272 function Has_Exit (Id : E) return B is
1277 function Has_External_Tag_Rep_Clause (Id : E) return B is
1279 pragma Assert (Is_Tagged_Type (Id));
1280 return Flag110 (Id);
1281 end Has_External_Tag_Rep_Clause;
1283 function Has_Forward_Instantiation (Id : E) return B is
1285 return Flag175 (Id);
1286 end Has_Forward_Instantiation;
1288 function Has_Fully_Qualified_Name (Id : E) return B is
1290 return Flag173 (Id);
1291 end Has_Fully_Qualified_Name;
1293 function Has_Gigi_Rep_Item (Id : E) return B is
1296 end Has_Gigi_Rep_Item;
1298 function Has_Homonym (Id : E) return B is
1303 function Has_Inheritable_Invariants (Id : E) return B is
1305 pragma Assert (Is_Type (Id));
1306 return Flag248 (Id);
1307 end Has_Inheritable_Invariants;
1309 function Has_Initial_Value (Id : E) return B is
1311 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1312 return Flag219 (Id);
1313 end Has_Initial_Value;
1315 function Has_Invariants (Id : E) return B is
1317 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Procedure);
1318 return Flag232 (Id);
1321 function Has_Machine_Radix_Clause (Id : E) return B is
1323 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1325 end Has_Machine_Radix_Clause;
1327 function Has_Master_Entity (Id : E) return B is
1330 end Has_Master_Entity;
1332 function Has_Missing_Return (Id : E) return B is
1334 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1335 return Flag142 (Id);
1336 end Has_Missing_Return;
1338 function Has_Nested_Block_With_Handler (Id : E) return B is
1340 return Flag101 (Id);
1341 end Has_Nested_Block_With_Handler;
1343 function Has_Non_Standard_Rep (Id : E) return B is
1345 return Flag75 (Implementation_Base_Type (Id));
1346 end Has_Non_Standard_Rep;
1348 function Has_Object_Size_Clause (Id : E) return B is
1350 pragma Assert (Is_Type (Id));
1351 return Flag172 (Id);
1352 end Has_Object_Size_Clause;
1354 function Has_Per_Object_Constraint (Id : E) return B is
1356 return Flag154 (Id);
1357 end Has_Per_Object_Constraint;
1359 function Has_Persistent_BSS (Id : E) return B is
1361 return Flag188 (Id);
1362 end Has_Persistent_BSS;
1364 function Has_Postconditions (Id : E) return B is
1366 pragma Assert (Is_Subprogram (Id));
1367 return Flag240 (Id);
1368 end Has_Postconditions;
1370 function Has_Pragma_Controlled (Id : E) return B is
1372 pragma Assert (Is_Access_Type (Id));
1373 return Flag27 (Implementation_Base_Type (Id));
1374 end Has_Pragma_Controlled;
1376 function Has_Pragma_Elaborate_Body (Id : E) return B is
1378 return Flag150 (Id);
1379 end Has_Pragma_Elaborate_Body;
1381 function Has_Pragma_Inline (Id : E) return B is
1383 return Flag157 (Id);
1384 end Has_Pragma_Inline;
1386 function Has_Pragma_Inline_Always (Id : E) return B is
1388 return Flag230 (Id);
1389 end Has_Pragma_Inline_Always;
1391 function Has_Pragma_Ordered (Id : E) return B is
1393 pragma Assert (Is_Enumeration_Type (Id));
1394 return Flag198 (Implementation_Base_Type (Id));
1395 end Has_Pragma_Ordered;
1397 function Has_Pragma_Pack (Id : E) return B is
1399 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1400 return Flag121 (Implementation_Base_Type (Id));
1401 end Has_Pragma_Pack;
1403 function Has_Pragma_Preelab_Init (Id : E) return B is
1405 return Flag221 (Id);
1406 end Has_Pragma_Preelab_Init;
1408 function Has_Pragma_Pure (Id : E) return B is
1410 return Flag203 (Id);
1411 end Has_Pragma_Pure;
1413 function Has_Pragma_Pure_Function (Id : E) return B is
1415 return Flag179 (Id);
1416 end Has_Pragma_Pure_Function;
1418 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1420 return Flag169 (Id);
1421 end Has_Pragma_Thread_Local_Storage;
1423 function Has_Pragma_Unmodified (Id : E) return B is
1425 return Flag233 (Id);
1426 end Has_Pragma_Unmodified;
1428 function Has_Pragma_Unreferenced (Id : E) return B is
1430 return Flag180 (Id);
1431 end Has_Pragma_Unreferenced;
1433 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1435 pragma Assert (Is_Type (Id));
1436 return Flag212 (Id);
1437 end Has_Pragma_Unreferenced_Objects;
1439 function Has_Predicates (Id : E) return B is
1441 return Flag250 (Id);
1444 function Has_Primitive_Operations (Id : E) return B is
1446 pragma Assert (Is_Type (Id));
1447 return Flag120 (Base_Type (Id));
1448 end Has_Primitive_Operations;
1450 function Has_Private_Declaration (Id : E) return B is
1452 return Flag155 (Id);
1453 end Has_Private_Declaration;
1455 function Has_Qualified_Name (Id : E) return B is
1457 return Flag161 (Id);
1458 end Has_Qualified_Name;
1460 function Has_RACW (Id : E) return B is
1462 pragma Assert (Ekind (Id) = E_Package);
1463 return Flag214 (Id);
1466 function Has_Record_Rep_Clause (Id : E) return B is
1468 pragma Assert (Is_Record_Type (Id));
1469 return Flag65 (Implementation_Base_Type (Id));
1470 end Has_Record_Rep_Clause;
1472 function Has_Recursive_Call (Id : E) return B is
1474 pragma Assert (Is_Subprogram (Id));
1475 return Flag143 (Id);
1476 end Has_Recursive_Call;
1478 function Has_Size_Clause (Id : E) return B is
1481 end Has_Size_Clause;
1483 function Has_Small_Clause (Id : E) return B is
1486 end Has_Small_Clause;
1488 function Has_Specified_Layout (Id : E) return B is
1490 pragma Assert (Is_Type (Id));
1491 return Flag100 (Implementation_Base_Type (Id));
1492 end Has_Specified_Layout;
1494 function Has_Specified_Stream_Input (Id : E) return B is
1496 pragma Assert (Is_Type (Id));
1497 return Flag190 (Id);
1498 end Has_Specified_Stream_Input;
1500 function Has_Specified_Stream_Output (Id : E) return B is
1502 pragma Assert (Is_Type (Id));
1503 return Flag191 (Id);
1504 end Has_Specified_Stream_Output;
1506 function Has_Specified_Stream_Read (Id : E) return B is
1508 pragma Assert (Is_Type (Id));
1509 return Flag192 (Id);
1510 end Has_Specified_Stream_Read;
1512 function Has_Specified_Stream_Write (Id : E) return B is
1514 pragma Assert (Is_Type (Id));
1515 return Flag193 (Id);
1516 end Has_Specified_Stream_Write;
1518 function Has_Static_Discriminants (Id : E) return B is
1520 pragma Assert (Is_Type (Id));
1521 return Flag211 (Id);
1522 end Has_Static_Discriminants;
1524 function Has_Storage_Size_Clause (Id : E) return B is
1526 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1527 return Flag23 (Implementation_Base_Type (Id));
1528 end Has_Storage_Size_Clause;
1530 function Has_Stream_Size_Clause (Id : E) return B is
1532 return Flag184 (Id);
1533 end Has_Stream_Size_Clause;
1535 function Has_Subprogram_Descriptor (Id : E) return B is
1538 end Has_Subprogram_Descriptor;
1540 function Has_Task (Id : E) return B is
1542 return Flag30 (Base_Type (Id));
1545 function Has_Thunks (Id : E) return B is
1547 return Flag228 (Id);
1550 function Has_Unchecked_Union (Id : E) return B is
1552 return Flag123 (Base_Type (Id));
1553 end Has_Unchecked_Union;
1555 function Has_Unknown_Discriminants (Id : E) return B is
1557 pragma Assert (Is_Type (Id));
1559 end Has_Unknown_Discriminants;
1561 function Has_Up_Level_Access (Id : E) return B is
1564 (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
1565 return Flag215 (Id);
1566 end Has_Up_Level_Access;
1568 function Has_Volatile_Components (Id : E) return B is
1570 return Flag87 (Implementation_Base_Type (Id));
1571 end Has_Volatile_Components;
1573 function Has_Xref_Entry (Id : E) return B is
1575 return Flag182 (Implementation_Base_Type (Id));
1578 function Hiding_Loop_Variable (Id : E) return E is
1580 pragma Assert (Ekind (Id) = E_Variable);
1582 end Hiding_Loop_Variable;
1584 function Homonym (Id : E) return E is
1589 function Interface_Alias (Id : E) return E is
1591 pragma Assert (Is_Subprogram (Id));
1593 end Interface_Alias;
1595 function Interfaces (Id : E) return L is
1597 pragma Assert (Is_Record_Type (Id));
1598 return Elist25 (Id);
1601 function In_Package_Body (Id : E) return B is
1604 end In_Package_Body;
1606 function In_Private_Part (Id : E) return B is
1609 end In_Private_Part;
1611 function In_Use (Id : E) return B is
1613 pragma Assert (Nkind (Id) in N_Entity);
1617 function Inner_Instances (Id : E) return L is
1619 return Elist23 (Id);
1620 end Inner_Instances;
1622 function Interface_Name (Id : E) return N is
1627 function Is_Abstract_Subprogram (Id : E) return B is
1629 pragma Assert (Is_Overloadable (Id));
1631 end Is_Abstract_Subprogram;
1633 function Is_Abstract_Type (Id : E) return B is
1635 pragma Assert (Is_Type (Id));
1636 return Flag146 (Id);
1637 end Is_Abstract_Type;
1639 function Is_Local_Anonymous_Access (Id : E) return B is
1641 pragma Assert (Is_Access_Type (Id));
1642 return Flag194 (Id);
1643 end Is_Local_Anonymous_Access;
1645 function Is_Access_Constant (Id : E) return B is
1647 pragma Assert (Is_Access_Type (Id));
1649 end Is_Access_Constant;
1651 function Is_Ada_2005_Only (Id : E) return B is
1653 return Flag185 (Id);
1654 end Is_Ada_2005_Only;
1656 function Is_Ada_2012_Only (Id : E) return B is
1658 return Flag199 (Id);
1659 end Is_Ada_2012_Only;
1661 function Is_Aliased (Id : E) return B is
1663 pragma Assert (Nkind (Id) in N_Entity);
1667 function Is_AST_Entry (Id : E) return B is
1669 pragma Assert (Is_Entry (Id));
1670 return Flag132 (Id);
1673 function Is_Asynchronous (Id : E) return B is
1675 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1677 end Is_Asynchronous;
1679 function Is_Atomic (Id : E) return B is
1684 function Is_Bit_Packed_Array (Id : E) return B is
1686 return Flag122 (Implementation_Base_Type (Id));
1687 end Is_Bit_Packed_Array;
1689 function Is_Called (Id : E) return B is
1691 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1692 return Flag102 (Id);
1695 function Is_Character_Type (Id : E) return B is
1698 end Is_Character_Type;
1700 function Is_Child_Unit (Id : E) return B is
1705 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1708 end Is_Class_Wide_Equivalent_Type;
1710 function Is_Compilation_Unit (Id : E) return B is
1712 return Flag149 (Id);
1713 end Is_Compilation_Unit;
1715 function Is_Completely_Hidden (Id : E) return B is
1717 pragma Assert (Ekind (Id) = E_Discriminant);
1718 return Flag103 (Id);
1719 end Is_Completely_Hidden;
1721 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1724 end Is_Constr_Subt_For_U_Nominal;
1726 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1728 return Flag141 (Id);
1729 end Is_Constr_Subt_For_UN_Aliased;
1731 function Is_Constrained (Id : E) return B is
1733 pragma Assert (Nkind (Id) in N_Entity);
1737 function Is_Constructor (Id : E) return B is
1742 function Is_Controlled (Id : E) return B is
1744 return Flag42 (Base_Type (Id));
1747 function Is_Controlling_Formal (Id : E) return B is
1749 pragma Assert (Is_Formal (Id));
1751 end Is_Controlling_Formal;
1753 function Is_CPP_Class (Id : E) return B is
1758 function Is_Descendent_Of_Address (Id : E) return B is
1760 pragma Assert (Is_Type (Id));
1761 return Flag223 (Id);
1762 end Is_Descendent_Of_Address;
1764 function Is_Discrim_SO_Function (Id : E) return B is
1766 return Flag176 (Id);
1767 end Is_Discrim_SO_Function;
1769 function Is_Dispatch_Table_Entity (Id : E) return B is
1771 return Flag234 (Id);
1772 end Is_Dispatch_Table_Entity;
1774 function Is_Dispatching_Operation (Id : E) return B is
1776 pragma Assert (Nkind (Id) in N_Entity);
1778 end Is_Dispatching_Operation;
1780 function Is_Eliminated (Id : E) return B is
1782 return Flag124 (Id);
1785 function Is_Entry_Formal (Id : E) return B is
1788 end Is_Entry_Formal;
1790 function Is_Exported (Id : E) return B is
1795 function Is_First_Subtype (Id : E) return B is
1798 end Is_First_Subtype;
1800 function Is_For_Access_Subtype (Id : E) return B is
1802 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
1803 return Flag118 (Id);
1804 end Is_For_Access_Subtype;
1806 function Is_Formal_Subprogram (Id : E) return B is
1808 return Flag111 (Id);
1809 end Is_Formal_Subprogram;
1811 function Is_Frozen (Id : E) return B is
1816 function Is_Generic_Actual_Type (Id : E) return B is
1818 pragma Assert (Is_Type (Id));
1820 end Is_Generic_Actual_Type;
1822 function Is_Generic_Instance (Id : E) return B is
1824 return Flag130 (Id);
1825 end Is_Generic_Instance;
1827 function Is_Generic_Type (Id : E) return B is
1829 pragma Assert (Nkind (Id) in N_Entity);
1831 end Is_Generic_Type;
1833 function Is_Hidden (Id : E) return B is
1838 function Is_Hidden_Open_Scope (Id : E) return B is
1840 return Flag171 (Id);
1841 end Is_Hidden_Open_Scope;
1843 function Is_Immediately_Visible (Id : E) return B is
1845 pragma Assert (Nkind (Id) in N_Entity);
1847 end Is_Immediately_Visible;
1849 function Is_Imported (Id : E) return B is
1854 function Is_Inlined (Id : E) return B is
1859 function Is_Interface (Id : E) return B is
1861 return Flag186 (Id);
1864 function Is_Instantiated (Id : E) return B is
1866 return Flag126 (Id);
1867 end Is_Instantiated;
1869 function Is_Internal (Id : E) return B is
1871 pragma Assert (Nkind (Id) in N_Entity);
1875 function Is_Interrupt_Handler (Id : E) return B is
1877 pragma Assert (Nkind (Id) in N_Entity);
1879 end Is_Interrupt_Handler;
1881 function Is_Intrinsic_Subprogram (Id : E) return B is
1884 end Is_Intrinsic_Subprogram;
1886 function Is_Itype (Id : E) return B is
1891 function Is_Known_Non_Null (Id : E) return B is
1894 end Is_Known_Non_Null;
1896 function Is_Known_Null (Id : E) return B is
1898 return Flag204 (Id);
1901 function Is_Known_Valid (Id : E) return B is
1903 return Flag170 (Id);
1906 function Is_Limited_Composite (Id : E) return B is
1908 return Flag106 (Id);
1909 end Is_Limited_Composite;
1911 function Is_Limited_Interface (Id : E) return B is
1913 return Flag197 (Id);
1914 end Is_Limited_Interface;
1916 function Is_Limited_Record (Id : E) return B is
1919 end Is_Limited_Record;
1921 function Is_Machine_Code_Subprogram (Id : E) return B is
1923 pragma Assert (Is_Subprogram (Id));
1924 return Flag137 (Id);
1925 end Is_Machine_Code_Subprogram;
1927 function Is_Non_Static_Subtype (Id : E) return B is
1929 pragma Assert (Is_Type (Id));
1930 return Flag109 (Id);
1931 end Is_Non_Static_Subtype;
1933 function Is_Null_Init_Proc (Id : E) return B is
1935 pragma Assert (Ekind (Id) = E_Procedure);
1936 return Flag178 (Id);
1937 end Is_Null_Init_Proc;
1939 function Is_Obsolescent (Id : E) return B is
1941 return Flag153 (Id);
1944 function Is_Only_Out_Parameter (Id : E) return B is
1946 pragma Assert (Is_Formal (Id));
1947 return Flag226 (Id);
1948 end Is_Only_Out_Parameter;
1950 function Is_Optional_Parameter (Id : E) return B is
1952 pragma Assert (Is_Formal (Id));
1953 return Flag134 (Id);
1954 end Is_Optional_Parameter;
1956 function Is_Package_Body_Entity (Id : E) return B is
1958 return Flag160 (Id);
1959 end Is_Package_Body_Entity;
1961 function Is_Packed (Id : E) return B is
1963 return Flag51 (Implementation_Base_Type (Id));
1966 function Is_Packed_Array_Type (Id : E) return B is
1968 return Flag138 (Id);
1969 end Is_Packed_Array_Type;
1971 function Is_Potentially_Use_Visible (Id : E) return B is
1973 pragma Assert (Nkind (Id) in N_Entity);
1975 end Is_Potentially_Use_Visible;
1977 function Is_Preelaborated (Id : E) return B is
1980 end Is_Preelaborated;
1982 function Is_Primitive (Id : E) return B is
1985 (Is_Overloadable (Id)
1986 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
1987 return Flag218 (Id);
1990 function Is_Primitive_Wrapper (Id : E) return B is
1992 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1993 return Flag195 (Id);
1994 end Is_Primitive_Wrapper;
1996 function Is_Private_Composite (Id : E) return B is
1998 pragma Assert (Is_Type (Id));
1999 return Flag107 (Id);
2000 end Is_Private_Composite;
2002 function Is_Private_Descendant (Id : E) return B is
2005 end Is_Private_Descendant;
2007 function Is_Private_Primitive (Id : E) return B is
2009 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2010 return Flag245 (Id);
2011 end Is_Private_Primitive;
2013 function Is_Public (Id : E) return B is
2015 pragma Assert (Nkind (Id) in N_Entity);
2019 function Is_Pure (Id : E) return B is
2024 function Is_Pure_Unit_Access_Type (Id : E) return B is
2026 pragma Assert (Is_Access_Type (Id));
2027 return Flag189 (Id);
2028 end Is_Pure_Unit_Access_Type;
2030 function Is_RACW_Stub_Type (Id : E) return B is
2032 pragma Assert (Is_Type (Id));
2033 return Flag244 (Id);
2034 end Is_RACW_Stub_Type;
2036 function Is_Raised (Id : E) return B is
2038 pragma Assert (Ekind (Id) = E_Exception);
2039 return Flag224 (Id);
2042 function Is_Remote_Call_Interface (Id : E) return B is
2045 end Is_Remote_Call_Interface;
2047 function Is_Remote_Types (Id : E) return B is
2050 end Is_Remote_Types;
2052 function Is_Renaming_Of_Object (Id : E) return B is
2054 return Flag112 (Id);
2055 end Is_Renaming_Of_Object;
2057 function Is_Return_Object (Id : E) return B is
2059 return Flag209 (Id);
2060 end Is_Return_Object;
2062 function Is_Safe_To_Reevaluate (Id : E) return B is
2064 return Flag249 (Id);
2065 end Is_Safe_To_Reevaluate;
2067 function Is_Shared_Passive (Id : E) return B is
2070 end Is_Shared_Passive;
2072 function Is_Statically_Allocated (Id : E) return B is
2075 end Is_Statically_Allocated;
2077 function Is_Tag (Id : E) return B is
2079 pragma Assert (Nkind (Id) in N_Entity);
2083 function Is_Tagged_Type (Id : E) return B is
2088 function Is_Thunk (Id : E) return B is
2090 pragma Assert (Is_Subprogram (Id));
2091 return Flag225 (Id);
2094 function Is_Trivial_Subprogram (Id : E) return B is
2096 return Flag235 (Id);
2097 end Is_Trivial_Subprogram;
2099 function Is_True_Constant (Id : E) return B is
2101 return Flag163 (Id);
2102 end Is_True_Constant;
2104 function Is_Unchecked_Union (Id : E) return B is
2106 return Flag117 (Implementation_Base_Type (Id));
2107 end Is_Unchecked_Union;
2109 function Is_Underlying_Record_View (Id : E) return B is
2111 return Flag246 (Id);
2112 end Is_Underlying_Record_View;
2114 function Is_Unsigned_Type (Id : E) return B is
2116 pragma Assert (Is_Type (Id));
2117 return Flag144 (Id);
2118 end Is_Unsigned_Type;
2120 function Is_Valued_Procedure (Id : E) return B is
2122 pragma Assert (Ekind (Id) = E_Procedure);
2123 return Flag127 (Id);
2124 end Is_Valued_Procedure;
2126 function Is_Visible_Child_Unit (Id : E) return B is
2128 pragma Assert (Is_Child_Unit (Id));
2129 return Flag116 (Id);
2130 end Is_Visible_Child_Unit;
2132 function Is_Visible_Formal (Id : E) return B is
2134 return Flag206 (Id);
2135 end Is_Visible_Formal;
2137 function Is_VMS_Exception (Id : E) return B is
2139 return Flag133 (Id);
2140 end Is_VMS_Exception;
2142 function Is_Volatile (Id : E) return B is
2144 pragma Assert (Nkind (Id) in N_Entity);
2146 if Is_Type (Id) then
2147 return Flag16 (Base_Type (Id));
2153 function Itype_Printed (Id : E) return B is
2155 pragma Assert (Is_Itype (Id));
2156 return Flag202 (Id);
2159 function Kill_Elaboration_Checks (Id : E) return B is
2162 end Kill_Elaboration_Checks;
2164 function Kill_Range_Checks (Id : E) return B is
2167 end Kill_Range_Checks;
2169 function Kill_Tag_Checks (Id : E) return B is
2172 end Kill_Tag_Checks;
2174 function Known_To_Have_Preelab_Init (Id : E) return B is
2176 pragma Assert (Is_Type (Id));
2177 return Flag207 (Id);
2178 end Known_To_Have_Preelab_Init;
2180 function Last_Assignment (Id : E) return N is
2182 pragma Assert (Is_Assignable (Id));
2184 end Last_Assignment;
2186 function Last_Entity (Id : E) return E is
2191 function Limited_View (Id : E) return E is
2193 pragma Assert (Ekind (Id) = E_Package);
2197 function Lit_Indexes (Id : E) return E is
2199 pragma Assert (Is_Enumeration_Type (Id));
2203 function Lit_Strings (Id : E) return E is
2205 pragma Assert (Is_Enumeration_Type (Id));
2209 function Low_Bound_Tested (Id : E) return B is
2211 return Flag205 (Id);
2212 end Low_Bound_Tested;
2214 function Machine_Radix_10 (Id : E) return B is
2216 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2218 end Machine_Radix_10;
2220 function Master_Id (Id : E) return E is
2222 pragma Assert (Is_Access_Type (Id));
2226 function Materialize_Entity (Id : E) return B is
2228 return Flag168 (Id);
2229 end Materialize_Entity;
2231 function Mechanism (Id : E) return M is
2233 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2234 return UI_To_Int (Uint8 (Id));
2237 function Modulus (Id : E) return Uint is
2239 pragma Assert (Is_Modular_Integer_Type (Id));
2240 return Uint17 (Base_Type (Id));
2243 function Must_Be_On_Byte_Boundary (Id : E) return B is
2245 pragma Assert (Is_Type (Id));
2246 return Flag183 (Id);
2247 end Must_Be_On_Byte_Boundary;
2249 function Must_Have_Preelab_Init (Id : E) return B is
2251 pragma Assert (Is_Type (Id));
2252 return Flag208 (Id);
2253 end Must_Have_Preelab_Init;
2255 function Needs_Debug_Info (Id : E) return B is
2257 return Flag147 (Id);
2258 end Needs_Debug_Info;
2260 function Needs_No_Actuals (Id : E) return B is
2263 (Is_Overloadable (Id)
2264 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2266 end Needs_No_Actuals;
2268 function Never_Set_In_Source (Id : E) return B is
2270 return Flag115 (Id);
2271 end Never_Set_In_Source;
2273 function Next_Inlined_Subprogram (Id : E) return E is
2276 end Next_Inlined_Subprogram;
2278 function No_Pool_Assigned (Id : E) return B is
2280 pragma Assert (Is_Access_Type (Id));
2281 return Flag131 (Root_Type (Id));
2282 end No_Pool_Assigned;
2284 function No_Return (Id : E) return B is
2286 return Flag113 (Id);
2289 function No_Strict_Aliasing (Id : E) return B is
2291 pragma Assert (Is_Access_Type (Id));
2292 return Flag136 (Base_Type (Id));
2293 end No_Strict_Aliasing;
2295 function Non_Binary_Modulus (Id : E) return B is
2297 pragma Assert (Is_Type (Id));
2298 return Flag58 (Base_Type (Id));
2299 end Non_Binary_Modulus;
2301 function Non_Limited_View (Id : E) return E is
2303 pragma Assert (Ekind (Id) in Incomplete_Kind);
2305 end Non_Limited_View;
2307 function Nonzero_Is_True (Id : E) return B is
2309 pragma Assert (Root_Type (Id) = Standard_Boolean);
2310 return Flag162 (Base_Type (Id));
2311 end Nonzero_Is_True;
2313 function Normalized_First_Bit (Id : E) return U is
2315 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2317 end Normalized_First_Bit;
2319 function Normalized_Position (Id : E) return U is
2321 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2323 end Normalized_Position;
2325 function Normalized_Position_Max (Id : E) return U is
2327 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2329 end Normalized_Position_Max;
2331 function OK_To_Rename (Id : E) return B is
2333 pragma Assert (Ekind (Id) = E_Variable);
2334 return Flag247 (Id);
2337 function OK_To_Reorder_Components (Id : E) return B is
2339 pragma Assert (Is_Record_Type (Id));
2340 return Flag239 (Base_Type (Id));
2341 end OK_To_Reorder_Components;
2343 function Optimize_Alignment_Space (Id : E) return B is
2346 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2347 return Flag241 (Id);
2348 end Optimize_Alignment_Space;
2350 function Optimize_Alignment_Time (Id : E) return B is
2353 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2354 return Flag242 (Id);
2355 end Optimize_Alignment_Time;
2357 function Original_Access_Type (Id : E) return E is
2359 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2361 end Original_Access_Type;
2363 function Original_Array_Type (Id : E) return E is
2365 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2367 end Original_Array_Type;
2369 function Original_Record_Component (Id : E) return E is
2371 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2373 end Original_Record_Component;
2375 function Overlays_Constant (Id : E) return B is
2377 return Flag243 (Id);
2378 end Overlays_Constant;
2380 function Overridden_Operation (Id : E) return E is
2383 end Overridden_Operation;
2385 function Package_Instantiation (Id : E) return N is
2387 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2389 end Package_Instantiation;
2391 function Packed_Array_Type (Id : E) return E is
2393 pragma Assert (Is_Array_Type (Id));
2395 end Packed_Array_Type;
2397 function Parent_Subtype (Id : E) return E is
2399 pragma Assert (Is_Record_Type (Id));
2400 return Node19 (Base_Type (Id));
2403 function Postcondition_Proc (Id : E) return E is
2405 pragma Assert (Ekind (Id) = E_Procedure);
2407 end Postcondition_Proc;
2409 function PPC_Wrapper (Id : E) return E is
2411 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2415 function Prival (Id : E) return E is
2417 pragma Assert (Is_Protected_Component (Id));
2421 function Prival_Link (Id : E) return E is
2423 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2427 function Private_Dependents (Id : E) return L is
2429 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2430 return Elist18 (Id);
2431 end Private_Dependents;
2433 function Private_View (Id : E) return N is
2435 pragma Assert (Is_Private_Type (Id));
2439 function Protected_Body_Subprogram (Id : E) return E is
2441 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2443 end Protected_Body_Subprogram;
2445 function Protected_Formal (Id : E) return E is
2447 pragma Assert (Is_Formal (Id));
2449 end Protected_Formal;
2451 function Protection_Object (Id : E) return E is
2454 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2456 end Protection_Object;
2458 function Reachable (Id : E) return B is
2463 function Referenced (Id : E) return B is
2465 return Flag156 (Id);
2468 function Referenced_As_LHS (Id : E) return B is
2471 end Referenced_As_LHS;
2473 function Referenced_As_Out_Parameter (Id : E) return B is
2475 return Flag227 (Id);
2476 end Referenced_As_Out_Parameter;
2478 function Register_Exception_Call (Id : E) return N is
2480 pragma Assert (Ekind (Id) = E_Exception);
2482 end Register_Exception_Call;
2484 function Related_Array_Object (Id : E) return E is
2486 pragma Assert (Is_Array_Type (Id));
2488 end Related_Array_Object;
2490 function Related_Expression (Id : E) return N is
2492 pragma Assert (Ekind (Id) in Type_Kind
2493 or else Ekind_In (Id, E_Constant, E_Variable));
2495 end Related_Expression;
2497 function Related_Instance (Id : E) return E is
2499 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2501 end Related_Instance;
2503 function Related_Type (Id : E) return E is
2505 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2509 function Relative_Deadline_Variable (Id : E) return E is
2511 pragma Assert (Is_Task_Type (Id));
2512 return Node26 (Implementation_Base_Type (Id));
2513 end Relative_Deadline_Variable;
2515 function Renamed_Entity (Id : E) return N is
2520 function Renamed_In_Spec (Id : E) return B is
2522 pragma Assert (Ekind (Id) = E_Package);
2523 return Flag231 (Id);
2524 end Renamed_In_Spec;
2526 function Renamed_Object (Id : E) return N is
2531 function Renaming_Map (Id : E) return U is
2536 function Requires_Overriding (Id : E) return B is
2538 pragma Assert (Is_Overloadable (Id));
2539 return Flag213 (Id);
2540 end Requires_Overriding;
2542 function Return_Present (Id : E) return B is
2547 function Return_Applies_To (Id : E) return N is
2550 end Return_Applies_To;
2552 function Returns_By_Ref (Id : E) return B is
2557 function Reverse_Bit_Order (Id : E) return B is
2559 pragma Assert (Is_Record_Type (Id));
2560 return Flag164 (Base_Type (Id));
2561 end Reverse_Bit_Order;
2563 function RM_Size (Id : E) return U is
2565 pragma Assert (Is_Type (Id));
2569 function Scalar_Range (Id : E) return N is
2574 function Scale_Value (Id : E) return U is
2579 function Scope_Depth_Value (Id : E) return U is
2582 end Scope_Depth_Value;
2584 function Sec_Stack_Needed_For_Return (Id : E) return B is
2586 return Flag167 (Id);
2587 end Sec_Stack_Needed_For_Return;
2589 function Shadow_Entities (Id : E) return S is
2591 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2593 end Shadow_Entities;
2595 function Shared_Var_Procs_Instance (Id : E) return E is
2597 pragma Assert (Ekind (Id) = E_Variable);
2599 end Shared_Var_Procs_Instance;
2601 function Size_Check_Code (Id : E) return N is
2603 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2605 end Size_Check_Code;
2607 function Size_Depends_On_Discriminant (Id : E) return B is
2609 return Flag177 (Id);
2610 end Size_Depends_On_Discriminant;
2612 function Size_Known_At_Compile_Time (Id : E) return B is
2615 end Size_Known_At_Compile_Time;
2617 function Small_Value (Id : E) return R is
2619 pragma Assert (Is_Fixed_Point_Type (Id));
2620 return Ureal21 (Id);
2623 function Spec_Entity (Id : E) return E is
2625 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2629 function Spec_PPC_List (Id : E) return N is
2632 (Ekind_In (Id, E_Entry, E_Entry_Family)
2633 or else Is_Subprogram (Id)
2634 or else Is_Generic_Subprogram (Id));
2638 function Static_Predicate (Id : E) return S is
2640 pragma Assert (Is_Discrete_Type (Id));
2642 end Static_Predicate;
2644 function Storage_Size_Variable (Id : E) return E is
2646 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2647 return Node15 (Implementation_Base_Type (Id));
2648 end Storage_Size_Variable;
2650 function Static_Elaboration_Desired (Id : E) return B is
2652 pragma Assert (Ekind (Id) = E_Package);
2654 end Static_Elaboration_Desired;
2656 function Static_Initialization (Id : E) return N is
2659 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
2661 end Static_Initialization;
2663 function Stored_Constraint (Id : E) return L is
2666 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
2667 return Elist23 (Id);
2668 end Stored_Constraint;
2670 function Strict_Alignment (Id : E) return B is
2672 return Flag145 (Implementation_Base_Type (Id));
2673 end Strict_Alignment;
2675 function String_Literal_Length (Id : E) return U is
2678 end String_Literal_Length;
2680 function String_Literal_Low_Bound (Id : E) return N is
2683 end String_Literal_Low_Bound;
2685 function Subprograms_For_Type (Id : E) return E is
2687 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
2689 end Subprograms_For_Type;
2691 function Suppress_Elaboration_Warnings (Id : E) return B is
2693 return Flag148 (Id);
2694 end Suppress_Elaboration_Warnings;
2696 function Suppress_Init_Proc (Id : E) return B is
2698 return Flag105 (Base_Type (Id));
2699 end Suppress_Init_Proc;
2701 function Suppress_Style_Checks (Id : E) return B is
2703 return Flag165 (Id);
2704 end Suppress_Style_Checks;
2706 function Suppress_Value_Tracking_On_Call (Id : E) return B is
2708 return Flag217 (Id);
2709 end Suppress_Value_Tracking_On_Call;
2711 function Task_Body_Procedure (Id : E) return N is
2713 pragma Assert (Ekind (Id) in Task_Kind);
2715 end Task_Body_Procedure;
2717 function Treat_As_Volatile (Id : E) return B is
2720 end Treat_As_Volatile;
2722 function Underlying_Full_View (Id : E) return E is
2724 pragma Assert (Ekind (Id) in Private_Kind);
2726 end Underlying_Full_View;
2728 function Underlying_Record_View (Id : E) return E is
2731 end Underlying_Record_View;
2733 function Universal_Aliasing (Id : E) return B is
2735 pragma Assert (Is_Type (Id));
2736 return Flag216 (Base_Type (Id));
2737 end Universal_Aliasing;
2739 function Unset_Reference (Id : E) return N is
2742 end Unset_Reference;
2744 function Used_As_Generic_Actual (Id : E) return B is
2746 return Flag222 (Id);
2747 end Used_As_Generic_Actual;
2749 function Uses_Sec_Stack (Id : E) return B is
2754 function Warnings_Off (Id : E) return B is
2759 function Warnings_Off_Used (Id : E) return B is
2761 return Flag236 (Id);
2762 end Warnings_Off_Used;
2764 function Warnings_Off_Used_Unmodified (Id : E) return B is
2766 return Flag237 (Id);
2767 end Warnings_Off_Used_Unmodified;
2769 function Warnings_Off_Used_Unreferenced (Id : E) return B is
2771 return Flag238 (Id);
2772 end Warnings_Off_Used_Unreferenced;
2774 function Wrapped_Entity (Id : E) return E is
2776 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
2777 and then Is_Primitive_Wrapper (Id));
2781 function Was_Hidden (Id : E) return B is
2783 return Flag196 (Id);
2786 ------------------------------
2787 -- Classification Functions --
2788 ------------------------------
2790 function Is_Access_Type (Id : E) return B is
2792 return Ekind (Id) in Access_Kind;
2795 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
2797 return Ekind (Id) in Access_Protected_Kind;
2798 end Is_Access_Protected_Subprogram_Type;
2800 function Is_Access_Subprogram_Type (Id : E) return B is
2802 return Ekind (Id) in Access_Subprogram_Kind;
2803 end Is_Access_Subprogram_Type;
2805 function Is_Aggregate_Type (Id : E) return B is
2807 return Ekind (Id) in Aggregate_Kind;
2808 end Is_Aggregate_Type;
2810 function Is_Array_Type (Id : E) return B is
2812 return Ekind (Id) in Array_Kind;
2815 function Is_Assignable (Id : E) return B is
2817 return Ekind (Id) in Assignable_Kind;
2820 function Is_Class_Wide_Type (Id : E) return B is
2822 return Ekind (Id) in Class_Wide_Kind;
2823 end Is_Class_Wide_Type;
2825 function Is_Composite_Type (Id : E) return B is
2827 return Ekind (Id) in Composite_Kind;
2828 end Is_Composite_Type;
2830 function Is_Concurrent_Body (Id : E) return B is
2832 return Ekind (Id) in
2833 Concurrent_Body_Kind;
2834 end Is_Concurrent_Body;
2836 function Is_Concurrent_Record_Type (Id : E) return B is
2839 end Is_Concurrent_Record_Type;
2841 function Is_Concurrent_Type (Id : E) return B is
2843 return Ekind (Id) in Concurrent_Kind;
2844 end Is_Concurrent_Type;
2846 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
2848 return Ekind (Id) in
2849 Decimal_Fixed_Point_Kind;
2850 end Is_Decimal_Fixed_Point_Type;
2852 function Is_Digits_Type (Id : E) return B is
2854 return Ekind (Id) in Digits_Kind;
2857 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
2859 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
2860 end Is_Discrete_Or_Fixed_Point_Type;
2862 function Is_Discrete_Type (Id : E) return B is
2864 return Ekind (Id) in Discrete_Kind;
2865 end Is_Discrete_Type;
2867 function Is_Elementary_Type (Id : E) return B is
2869 return Ekind (Id) in Elementary_Kind;
2870 end Is_Elementary_Type;
2872 function Is_Entry (Id : E) return B is
2874 return Ekind (Id) in Entry_Kind;
2877 function Is_Enumeration_Type (Id : E) return B is
2879 return Ekind (Id) in
2881 end Is_Enumeration_Type;
2883 function Is_Fixed_Point_Type (Id : E) return B is
2885 return Ekind (Id) in
2887 end Is_Fixed_Point_Type;
2889 function Is_Floating_Point_Type (Id : E) return B is
2891 return Ekind (Id) in Float_Kind;
2892 end Is_Floating_Point_Type;
2894 function Is_Formal (Id : E) return B is
2896 return Ekind (Id) in Formal_Kind;
2899 function Is_Formal_Object (Id : E) return B is
2901 return Ekind (Id) in Formal_Object_Kind;
2902 end Is_Formal_Object;
2904 function Is_Generic_Subprogram (Id : E) return B is
2906 return Ekind (Id) in Generic_Subprogram_Kind;
2907 end Is_Generic_Subprogram;
2909 function Is_Generic_Unit (Id : E) return B is
2911 return Ekind (Id) in Generic_Unit_Kind;
2912 end Is_Generic_Unit;
2914 function Is_Incomplete_Or_Private_Type (Id : E) return B is
2916 return Ekind (Id) in
2917 Incomplete_Or_Private_Kind;
2918 end Is_Incomplete_Or_Private_Type;
2920 function Is_Incomplete_Type (Id : E) return B is
2922 return Ekind (Id) in
2924 end Is_Incomplete_Type;
2926 function Is_Integer_Type (Id : E) return B is
2928 return Ekind (Id) in Integer_Kind;
2929 end Is_Integer_Type;
2931 function Is_Modular_Integer_Type (Id : E) return B is
2933 return Ekind (Id) in
2934 Modular_Integer_Kind;
2935 end Is_Modular_Integer_Type;
2937 function Is_Named_Number (Id : E) return B is
2939 return Ekind (Id) in Named_Kind;
2940 end Is_Named_Number;
2942 function Is_Numeric_Type (Id : E) return B is
2944 return Ekind (Id) in Numeric_Kind;
2945 end Is_Numeric_Type;
2947 function Is_Object (Id : E) return B is
2949 return Ekind (Id) in Object_Kind;
2952 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
2954 return Ekind (Id) in
2955 Ordinary_Fixed_Point_Kind;
2956 end Is_Ordinary_Fixed_Point_Type;
2958 function Is_Overloadable (Id : E) return B is
2960 return Ekind (Id) in Overloadable_Kind;
2961 end Is_Overloadable;
2963 function Is_Private_Type (Id : E) return B is
2965 return Ekind (Id) in Private_Kind;
2966 end Is_Private_Type;
2968 function Is_Protected_Type (Id : E) return B is
2970 return Ekind (Id) in Protected_Kind;
2971 end Is_Protected_Type;
2973 function Is_Real_Type (Id : E) return B is
2975 return Ekind (Id) in Real_Kind;
2978 function Is_Record_Type (Id : E) return B is
2980 return Ekind (Id) in Record_Kind;
2983 function Is_Scalar_Type (Id : E) return B is
2985 return Ekind (Id) in Scalar_Kind;
2988 function Is_Signed_Integer_Type (Id : E) return B is
2990 return Ekind (Id) in Signed_Integer_Kind;
2991 end Is_Signed_Integer_Type;
2993 function Is_Subprogram (Id : E) return B is
2995 return Ekind (Id) in Subprogram_Kind;
2998 function Is_Task_Type (Id : E) return B is
3000 return Ekind (Id) in Task_Kind;
3003 function Is_Type (Id : E) return B is
3005 return Ekind (Id) in Type_Kind;
3008 ------------------------------
3009 -- Attribute Set Procedures --
3010 ------------------------------
3012 -- Note: in many of these set procedures an "obvious" assertion is missing.
3013 -- The reason for this is that in many cases, a field is set before the
3014 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3015 -- it is possible to add assertions that specifically include the E_Void
3016 -- possibility, but in some cases, we just omit the assertions.
3018 procedure Set_Accept_Address (Id : E; V : L) is
3020 Set_Elist21 (Id, V);
3021 end Set_Accept_Address;
3023 procedure Set_Access_Disp_Table (Id : E; V : L) is
3025 pragma Assert (Ekind (Id) = E_Record_Type
3026 and then Id = Implementation_Base_Type (Id));
3027 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3028 Set_Elist16 (Id, V);
3029 end Set_Access_Disp_Table;
3031 procedure Set_Associated_Final_Chain (Id : E; V : E) is
3033 pragma Assert (Is_Access_Type (Id));
3035 end Set_Associated_Final_Chain;
3037 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3040 end Set_Associated_Formal_Package;
3042 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3045 end Set_Associated_Node_For_Itype;
3047 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3049 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3051 end Set_Associated_Storage_Pool;
3053 procedure Set_Actual_Subtype (Id : E; V : E) is
3056 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3057 or else Is_Formal (Id));
3059 end Set_Actual_Subtype;
3061 procedure Set_Address_Taken (Id : E; V : B := True) is
3063 Set_Flag104 (Id, V);
3064 end Set_Address_Taken;
3066 procedure Set_Alias (Id : E; V : E) is
3069 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3073 procedure Set_Alignment (Id : E; V : U) is
3075 pragma Assert (Is_Type (Id)
3076 or else Is_Formal (Id)
3077 or else Ekind_In (Id, E_Loop_Parameter,
3084 procedure Set_Barrier_Function (Id : E; V : N) is
3086 pragma Assert (Is_Entry (Id));
3088 end Set_Barrier_Function;
3090 procedure Set_Block_Node (Id : E; V : N) is
3092 pragma Assert (Ekind (Id) = E_Block);
3096 procedure Set_Body_Entity (Id : E; V : E) is
3098 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3100 end Set_Body_Entity;
3102 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3105 (Ekind (Id) = E_Package
3106 or else Is_Subprogram (Id)
3107 or else Is_Generic_Unit (Id));
3109 end Set_Body_Needed_For_SAL;
3111 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3113 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3114 Set_Flag125 (Id, V);
3115 end Set_C_Pass_By_Copy;
3117 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3120 end Set_Can_Never_Be_Null;
3122 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3125 end Set_Checks_May_Be_Suppressed;
3127 procedure Set_Class_Wide_Type (Id : E; V : E) is
3129 pragma Assert (Is_Type (Id));
3131 end Set_Class_Wide_Type;
3133 procedure Set_Cloned_Subtype (Id : E; V : E) is
3135 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3137 end Set_Cloned_Subtype;
3139 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3141 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3143 end Set_Component_Bit_Offset;
3145 procedure Set_Component_Clause (Id : E; V : N) is
3147 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3149 end Set_Component_Clause;
3151 procedure Set_Component_Size (Id : E; V : U) is
3153 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3155 end Set_Component_Size;
3157 procedure Set_Component_Type (Id : E; V : E) is
3159 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3161 end Set_Component_Type;
3163 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3166 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3168 end Set_Corresponding_Concurrent_Type;
3170 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3172 pragma Assert (Ekind (Id) = E_Discriminant);
3174 end Set_Corresponding_Discriminant;
3176 procedure Set_Corresponding_Equality (Id : E; V : E) is
3179 (Ekind (Id) = E_Function
3180 and then not Comes_From_Source (Id)
3181 and then Chars (Id) = Name_Op_Ne);
3183 end Set_Corresponding_Equality;
3185 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3187 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3189 end Set_Corresponding_Protected_Entry;
3191 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3193 pragma Assert (Is_Concurrent_Type (Id));
3195 end Set_Corresponding_Record_Type;
3197 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3200 end Set_Corresponding_Remote_Type;
3202 procedure Set_Current_Use_Clause (Id : E; V : E) is
3204 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3206 end Set_Current_Use_Clause;
3208 procedure Set_Current_Value (Id : E; V : N) is
3210 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3212 end Set_Current_Value;
3214 procedure Set_CR_Discriminant (Id : E; V : E) is
3217 end Set_CR_Discriminant;
3219 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3221 Set_Flag166 (Id, V);
3222 end Set_Debug_Info_Off;
3224 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3227 end Set_Debug_Renaming_Link;
3229 procedure Set_Default_Expr_Function (Id : E; V : E) is
3231 pragma Assert (Is_Formal (Id));
3233 end Set_Default_Expr_Function;
3235 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3237 Set_Flag108 (Id, V);
3238 end Set_Default_Expressions_Processed;
3240 procedure Set_Default_Value (Id : E; V : N) is
3242 pragma Assert (Is_Formal (Id));
3244 end Set_Default_Value;
3246 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3250 or else Is_Task_Type (Id)
3251 or else Ekind (Id) = E_Block);
3252 Set_Flag114 (Id, V);
3253 end Set_Delay_Cleanups;
3255 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3258 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3260 end Set_Delay_Subprogram_Descriptors;
3262 procedure Set_Delta_Value (Id : E; V : R) is
3264 pragma Assert (Is_Fixed_Point_Type (Id));
3265 Set_Ureal18 (Id, V);
3266 end Set_Delta_Value;
3268 procedure Set_Dependent_Instances (Id : E; V : L) is
3270 pragma Assert (Is_Generic_Instance (Id));
3272 end Set_Dependent_Instances;
3274 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3276 pragma Assert (Nkind (Id) in N_Entity);
3278 end Set_Depends_On_Private;
3280 procedure Set_Digits_Value (Id : E; V : U) is
3283 (Is_Floating_Point_Type (Id)
3284 or else Is_Decimal_Fixed_Point_Type (Id));
3286 end Set_Digits_Value;
3288 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3291 end Set_Directly_Designated_Type;
3293 procedure Set_Discard_Names (Id : E; V : B := True) is
3296 end Set_Discard_Names;
3298 procedure Set_Discriminal (Id : E; V : E) is
3300 pragma Assert (Ekind (Id) = E_Discriminant);
3302 end Set_Discriminal;
3304 procedure Set_Discriminal_Link (Id : E; V : E) is
3307 end Set_Discriminal_Link;
3309 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3311 pragma Assert (Ekind (Id) = E_Component);
3313 end Set_Discriminant_Checking_Func;
3315 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3317 pragma Assert (Nkind (Id) in N_Entity);
3318 Set_Elist21 (Id, V);
3319 end Set_Discriminant_Constraint;
3321 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3324 end Set_Discriminant_Default_Value;
3326 procedure Set_Discriminant_Number (Id : E; V : U) is
3329 end Set_Discriminant_Number;
3331 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3333 pragma Assert (Ekind (Id) = E_Record_Type
3334 and then Id = Implementation_Base_Type (Id));
3335 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3336 Set_Elist26 (Id, V);
3337 end Set_Dispatch_Table_Wrappers;
3339 procedure Set_DT_Entry_Count (Id : E; V : U) is
3341 pragma Assert (Ekind (Id) = E_Component);
3343 end Set_DT_Entry_Count;
3345 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3347 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3349 end Set_DT_Offset_To_Top_Func;
3351 procedure Set_DT_Position (Id : E; V : U) is
3353 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3355 end Set_DT_Position;
3357 procedure Set_DTC_Entity (Id : E; V : E) is
3359 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3363 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3365 pragma Assert (Ekind (Id) = E_Package);
3366 Set_Flag210 (Id, V);
3367 end Set_Elaborate_Body_Desirable;
3369 procedure Set_Elaboration_Entity (Id : E; V : E) is
3374 Ekind (Id) = E_Package
3376 Is_Generic_Unit (Id));
3378 end Set_Elaboration_Entity;
3380 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3385 Ekind (Id) = E_Package
3387 Is_Generic_Unit (Id));
3388 Set_Flag174 (Id, V);
3389 end Set_Elaboration_Entity_Required;
3391 procedure Set_Enclosing_Scope (Id : E; V : E) is
3394 end Set_Enclosing_Scope;
3396 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3398 pragma Assert (Is_Entry (Id));
3399 Set_Flag152 (Id, V);
3400 end Set_Entry_Accepted;
3402 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3405 end Set_Entry_Bodies_Array;
3407 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3410 end Set_Entry_Cancel_Parameter;
3412 procedure Set_Entry_Component (Id : E; V : E) is
3415 end Set_Entry_Component;
3417 procedure Set_Entry_Formal (Id : E; V : E) is
3420 end Set_Entry_Formal;
3422 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3424 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3426 end Set_Entry_Index_Constant;
3428 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3431 end Set_Entry_Parameters_Type;
3433 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3435 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3437 end Set_Enum_Pos_To_Rep;
3439 procedure Set_Enumeration_Pos (Id : E; V : U) is
3441 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3443 end Set_Enumeration_Pos;
3445 procedure Set_Enumeration_Rep (Id : E; V : U) is
3447 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3449 end Set_Enumeration_Rep;
3451 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3453 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3455 end Set_Enumeration_Rep_Expr;
3457 procedure Set_Equivalent_Type (Id : E; V : E) is
3460 (Ekind_In (Id, E_Class_Wide_Type,
3461 E_Class_Wide_Subtype,
3462 E_Access_Protected_Subprogram_Type,
3463 E_Anonymous_Access_Protected_Subprogram_Type,
3464 E_Access_Subprogram_Type,
3467 end Set_Equivalent_Type;
3469 procedure Set_Esize (Id : E; V : U) is
3474 procedure Set_Exception_Code (Id : E; V : U) is
3476 pragma Assert (Ekind (Id) = E_Exception);
3478 end Set_Exception_Code;
3480 procedure Set_Extra_Accessibility (Id : E; V : E) is
3482 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3484 end Set_Extra_Accessibility;
3486 procedure Set_Extra_Constrained (Id : E; V : E) is
3488 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3490 end Set_Extra_Constrained;
3492 procedure Set_Extra_Formal (Id : E; V : E) is
3495 end Set_Extra_Formal;
3497 procedure Set_Extra_Formals (Id : E; V : E) is
3500 (Is_Overloadable (Id)
3501 or else Ekind_In (Id, E_Entry_Family,
3503 E_Subprogram_Type));
3505 end Set_Extra_Formals;
3507 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3510 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3511 Set_Flag229 (Id, V);
3512 end Set_Can_Use_Internal_Rep;
3514 procedure Set_Finalization_Chain_Entity (Id : E; V : E) is
3517 end Set_Finalization_Chain_Entity;
3519 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3521 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3522 Set_Flag158 (Id, V);
3523 end Set_Finalize_Storage_Only;
3525 procedure Set_First_Entity (Id : E; V : E) is
3528 end Set_First_Entity;
3530 procedure Set_First_Exit_Statement (Id : E; V : N) is
3532 pragma Assert (Ekind (Id) = E_Loop);
3534 end Set_First_Exit_Statement;
3536 procedure Set_First_Index (Id : E; V : N) is
3538 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3540 end Set_First_Index;
3542 procedure Set_First_Literal (Id : E; V : E) is
3544 pragma Assert (Is_Enumeration_Type (Id));
3546 end Set_First_Literal;
3548 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3550 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3552 end Set_First_Optional_Parameter;
3554 procedure Set_First_Private_Entity (Id : E; V : E) is
3556 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
3557 or else Ekind (Id) in Concurrent_Kind);
3559 end Set_First_Private_Entity;
3561 procedure Set_First_Rep_Item (Id : E; V : N) is
3564 end Set_First_Rep_Item;
3566 procedure Set_Float_Rep (Id : E; V : F) is
3567 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
3569 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
3572 procedure Set_Freeze_Node (Id : E; V : N) is
3575 end Set_Freeze_Node;
3577 procedure Set_From_With_Type (Id : E; V : B := True) is
3581 or else Ekind (Id) = E_Package);
3582 Set_Flag159 (Id, V);
3583 end Set_From_With_Type;
3585 procedure Set_Full_View (Id : E; V : E) is
3587 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
3591 procedure Set_Generic_Homonym (Id : E; V : E) is
3594 end Set_Generic_Homonym;
3596 procedure Set_Generic_Renamings (Id : E; V : L) is
3598 Set_Elist23 (Id, V);
3599 end Set_Generic_Renamings;
3601 procedure Set_Handler_Records (Id : E; V : S) is
3604 end Set_Handler_Records;
3606 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
3608 pragma Assert (Id = Base_Type (Id));
3609 Set_Flag135 (Id, V);
3610 end Set_Has_Aliased_Components;
3612 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
3615 end Set_Has_Alignment_Clause;
3617 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
3620 end Set_Has_All_Calls_Remote;
3622 procedure Set_Has_Anon_Block_Suffix (Id : E; V : B := True) is
3624 Set_Flag201 (Id, V);
3625 end Set_Has_Anon_Block_Suffix;
3627 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
3629 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
3631 end Set_Has_Atomic_Components;
3633 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
3636 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
3637 Set_Flag139 (Id, V);
3638 end Set_Has_Biased_Representation;
3640 procedure Set_Has_Completion (Id : E; V : B := True) is
3643 end Set_Has_Completion;
3645 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
3647 pragma Assert (Is_Type (Id));
3649 end Set_Has_Completion_In_Body;
3651 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
3653 pragma Assert (Ekind (Id) = E_Record_Type);
3654 Set_Flag140 (Id, V);
3655 end Set_Has_Complex_Representation;
3657 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
3659 pragma Assert (Ekind (Id) = E_Array_Type);
3661 end Set_Has_Component_Size_Clause;
3663 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
3665 pragma Assert (Is_Type (Id));
3666 Set_Flag187 (Id, V);
3667 end Set_Has_Constrained_Partial_View;
3669 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
3671 Set_Flag181 (Id, V);
3672 end Set_Has_Contiguous_Rep;
3674 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
3676 pragma Assert (Id = Base_Type (Id));
3678 end Set_Has_Controlled_Component;
3680 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
3683 end Set_Has_Controlling_Result;
3685 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
3687 Set_Flag119 (Id, V);
3688 end Set_Has_Convention_Pragma;
3690 procedure Set_Has_Default_Component_Value (Id : E; V : B := True) is
3692 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3693 Set_Flag151 (Id, V);
3694 end Set_Has_Default_Component_Value;
3696 procedure Set_Has_Default_Value (Id : E; V : B := True) is
3698 pragma Assert (Is_Scalar_Type (Id) and then Is_Base_Type (Id));
3700 end Set_Has_Default_Value;
3702 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
3704 pragma Assert (Nkind (Id) in N_Entity);
3705 Set_Flag200 (Id, V);
3706 end Set_Has_Delayed_Aspects;
3708 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
3710 pragma Assert (Nkind (Id) in N_Entity);
3712 end Set_Has_Delayed_Freeze;
3714 procedure Set_Has_Discriminants (Id : E; V : B := True) is
3716 pragma Assert (Nkind (Id) in N_Entity);
3718 end Set_Has_Discriminants;
3720 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
3722 pragma Assert (Ekind (Id) = E_Record_Type
3723 and then Is_Tagged_Type (Id));
3724 Set_Flag220 (Id, V);
3725 end Set_Has_Dispatch_Table;
3727 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
3729 pragma Assert (Is_Enumeration_Type (Id));
3731 end Set_Has_Enumeration_Rep_Clause;
3733 procedure Set_Has_Exit (Id : E; V : B := True) is
3738 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True) is
3740 pragma Assert (Is_Tagged_Type (Id));
3741 Set_Flag110 (Id, V);
3742 end Set_Has_External_Tag_Rep_Clause;
3744 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
3746 Set_Flag175 (Id, V);
3747 end Set_Has_Forward_Instantiation;
3749 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
3751 Set_Flag173 (Id, V);
3752 end Set_Has_Fully_Qualified_Name;
3754 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
3757 end Set_Has_Gigi_Rep_Item;
3759 procedure Set_Has_Homonym (Id : E; V : B := True) is
3762 end Set_Has_Homonym;
3764 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
3766 pragma Assert (Is_Type (Id));
3767 Set_Flag248 (Id, V);
3768 end Set_Has_Inheritable_Invariants;
3770 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
3772 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
3773 Set_Flag219 (Id, V);
3774 end Set_Has_Initial_Value;
3776 procedure Set_Has_Invariants (Id : E; V : B := True) is
3778 pragma Assert (Is_Type (Id)
3779 or else Ekind (Id) = E_Procedure
3780 or else Ekind (Id) = E_Void);
3781 Set_Flag232 (Id, V);
3782 end Set_Has_Invariants;
3784 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
3786 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
3788 end Set_Has_Machine_Radix_Clause;
3790 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
3793 end Set_Has_Master_Entity;
3795 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
3797 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
3798 Set_Flag142 (Id, V);
3799 end Set_Has_Missing_Return;
3801 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
3803 Set_Flag101 (Id, V);
3804 end Set_Has_Nested_Block_With_Handler;
3806 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
3808 pragma Assert (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
3809 Set_Flag215 (Id, V);
3810 end Set_Has_Up_Level_Access;
3812 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
3814 pragma Assert (Id = Base_Type (Id));
3816 end Set_Has_Non_Standard_Rep;
3818 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
3820 pragma Assert (Is_Type (Id));
3821 Set_Flag172 (Id, V);
3822 end Set_Has_Object_Size_Clause;
3824 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
3826 Set_Flag154 (Id, V);
3827 end Set_Has_Per_Object_Constraint;
3829 procedure Set_Has_Persistent_BSS (Id : E; V : B := True) is
3831 Set_Flag188 (Id, V);
3832 end Set_Has_Persistent_BSS;
3834 procedure Set_Has_Postconditions (Id : E; V : B := True) is
3836 pragma Assert (Is_Subprogram (Id));
3837 Set_Flag240 (Id, V);
3838 end Set_Has_Postconditions;
3840 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
3842 pragma Assert (Is_Access_Type (Id));
3843 Set_Flag27 (Base_Type (Id), V);
3844 end Set_Has_Pragma_Controlled;
3846 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
3848 Set_Flag150 (Id, V);
3849 end Set_Has_Pragma_Elaborate_Body;
3851 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
3853 Set_Flag157 (Id, V);
3854 end Set_Has_Pragma_Inline;
3856 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
3858 Set_Flag230 (Id, V);
3859 end Set_Has_Pragma_Inline_Always;
3861 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
3863 pragma Assert (Is_Enumeration_Type (Id));
3864 pragma Assert (Id = Base_Type (Id));
3865 Set_Flag198 (Id, V);
3866 end Set_Has_Pragma_Ordered;
3868 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
3870 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
3871 pragma Assert (Id = Base_Type (Id));
3872 Set_Flag121 (Id, V);
3873 end Set_Has_Pragma_Pack;
3875 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
3877 Set_Flag221 (Id, V);
3878 end Set_Has_Pragma_Preelab_Init;
3880 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
3882 Set_Flag203 (Id, V);
3883 end Set_Has_Pragma_Pure;
3885 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
3887 Set_Flag179 (Id, V);
3888 end Set_Has_Pragma_Pure_Function;
3890 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
3892 Set_Flag169 (Id, V);
3893 end Set_Has_Pragma_Thread_Local_Storage;
3895 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
3897 Set_Flag233 (Id, V);
3898 end Set_Has_Pragma_Unmodified;
3900 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
3902 Set_Flag180 (Id, V);
3903 end Set_Has_Pragma_Unreferenced;
3905 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
3907 pragma Assert (Is_Type (Id));
3908 Set_Flag212 (Id, V);
3909 end Set_Has_Pragma_Unreferenced_Objects;
3911 procedure Set_Has_Predicates (Id : E; V : B := True) is
3913 Set_Flag250 (Id, V);
3914 end Set_Has_Predicates;
3916 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
3918 pragma Assert (Id = Base_Type (Id));
3919 Set_Flag120 (Id, V);
3920 end Set_Has_Primitive_Operations;
3922 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
3924 Set_Flag155 (Id, V);
3925 end Set_Has_Private_Declaration;
3927 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
3929 Set_Flag161 (Id, V);
3930 end Set_Has_Qualified_Name;
3932 procedure Set_Has_RACW (Id : E; V : B := True) is
3934 pragma Assert (Ekind (Id) = E_Package);
3935 Set_Flag214 (Id, V);
3938 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
3940 pragma Assert (Id = Base_Type (Id));
3942 end Set_Has_Record_Rep_Clause;
3944 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
3946 pragma Assert (Is_Subprogram (Id));
3947 Set_Flag143 (Id, V);
3948 end Set_Has_Recursive_Call;
3950 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
3953 end Set_Has_Size_Clause;
3955 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
3958 end Set_Has_Small_Clause;
3960 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
3962 pragma Assert (Id = Base_Type (Id));
3963 Set_Flag100 (Id, V);
3964 end Set_Has_Specified_Layout;
3966 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
3968 pragma Assert (Is_Type (Id));
3969 Set_Flag190 (Id, V);
3970 end Set_Has_Specified_Stream_Input;
3972 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
3974 pragma Assert (Is_Type (Id));
3975 Set_Flag191 (Id, V);
3976 end Set_Has_Specified_Stream_Output;
3978 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
3980 pragma Assert (Is_Type (Id));
3981 Set_Flag192 (Id, V);
3982 end Set_Has_Specified_Stream_Read;
3984 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
3986 pragma Assert (Is_Type (Id));
3987 Set_Flag193 (Id, V);
3988 end Set_Has_Specified_Stream_Write;
3990 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
3992 Set_Flag211 (Id, V);
3993 end Set_Has_Static_Discriminants;
3995 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
3997 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
3998 pragma Assert (Id = Base_Type (Id));
4000 end Set_Has_Storage_Size_Clause;
4002 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4004 pragma Assert (Is_Elementary_Type (Id));
4005 Set_Flag184 (Id, V);
4006 end Set_Has_Stream_Size_Clause;
4008 procedure Set_Has_Subprogram_Descriptor (Id : E; V : B := True) is
4011 end Set_Has_Subprogram_Descriptor;
4013 procedure Set_Has_Task (Id : E; V : B := True) is
4015 pragma Assert (Id = Base_Type (Id));
4019 procedure Set_Has_Thunks (Id : E; V : B := True) is
4021 pragma Assert (Is_Tag (Id));
4022 Set_Flag228 (Id, V);
4025 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4027 pragma Assert (Id = Base_Type (Id));
4028 Set_Flag123 (Id, V);
4029 end Set_Has_Unchecked_Union;
4031 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4033 pragma Assert (Is_Type (Id));
4035 end Set_Has_Unknown_Discriminants;
4037 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4039 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4041 end Set_Has_Volatile_Components;
4043 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4045 Set_Flag182 (Id, V);
4046 end Set_Has_Xref_Entry;
4048 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4050 pragma Assert (Ekind (Id) = E_Variable);
4052 end Set_Hiding_Loop_Variable;
4054 procedure Set_Homonym (Id : E; V : E) is
4056 pragma Assert (Id /= V);
4060 procedure Set_Interface_Alias (Id : E; V : E) is
4064 and then Is_Hidden (Id)
4065 and then (Ekind_In (Id, E_Procedure, E_Function)));
4067 end Set_Interface_Alias;
4069 procedure Set_Interfaces (Id : E; V : L) is
4071 pragma Assert (Is_Record_Type (Id));
4072 Set_Elist25 (Id, V);
4075 procedure Set_In_Package_Body (Id : E; V : B := True) is
4078 end Set_In_Package_Body;
4080 procedure Set_In_Private_Part (Id : E; V : B := True) is
4083 end Set_In_Private_Part;
4085 procedure Set_In_Use (Id : E; V : B := True) is
4087 pragma Assert (Nkind (Id) in N_Entity);
4091 procedure Set_Inner_Instances (Id : E; V : L) is
4093 Set_Elist23 (Id, V);
4094 end Set_Inner_Instances;
4096 procedure Set_Interface_Name (Id : E; V : N) is
4099 end Set_Interface_Name;
4101 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4103 pragma Assert (Is_Overloadable (Id));
4105 end Set_Is_Abstract_Subprogram;
4107 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4109 pragma Assert (Is_Type (Id));
4110 Set_Flag146 (Id, V);
4111 end Set_Is_Abstract_Type;
4113 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4115 pragma Assert (Is_Access_Type (Id));
4116 Set_Flag194 (Id, V);
4117 end Set_Is_Local_Anonymous_Access;
4119 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4121 pragma Assert (Is_Access_Type (Id));
4123 end Set_Is_Access_Constant;
4125 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4127 Set_Flag185 (Id, V);
4128 end Set_Is_Ada_2005_Only;
4130 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4132 Set_Flag199 (Id, V);
4133 end Set_Is_Ada_2012_Only;
4135 procedure Set_Is_Aliased (Id : E; V : B := True) is
4137 pragma Assert (Nkind (Id) in N_Entity);
4141 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
4143 pragma Assert (Is_Entry (Id));
4144 Set_Flag132 (Id, V);
4145 end Set_Is_AST_Entry;
4147 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4150 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4152 end Set_Is_Asynchronous;
4154 procedure Set_Is_Atomic (Id : E; V : B := True) is
4159 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4161 pragma Assert ((not V)
4162 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4164 Set_Flag122 (Id, V);
4165 end Set_Is_Bit_Packed_Array;
4167 procedure Set_Is_Called (Id : E; V : B := True) is
4169 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4170 Set_Flag102 (Id, V);
4173 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4176 end Set_Is_Character_Type;
4178 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4181 end Set_Is_Child_Unit;
4183 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4186 end Set_Is_Class_Wide_Equivalent_Type;
4188 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4190 Set_Flag149 (Id, V);
4191 end Set_Is_Compilation_Unit;
4193 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4195 pragma Assert (Ekind (Id) = E_Discriminant);
4196 Set_Flag103 (Id, V);
4197 end Set_Is_Completely_Hidden;
4199 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4202 end Set_Is_Concurrent_Record_Type;
4204 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4207 end Set_Is_Constr_Subt_For_U_Nominal;
4209 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4211 Set_Flag141 (Id, V);
4212 end Set_Is_Constr_Subt_For_UN_Aliased;
4214 procedure Set_Is_Constrained (Id : E; V : B := True) is
4216 pragma Assert (Nkind (Id) in N_Entity);
4218 end Set_Is_Constrained;
4220 procedure Set_Is_Constructor (Id : E; V : B := True) is
4223 end Set_Is_Constructor;
4225 procedure Set_Is_Controlled (Id : E; V : B := True) is
4227 pragma Assert (Id = Base_Type (Id));
4229 end Set_Is_Controlled;
4231 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4233 pragma Assert (Is_Formal (Id));
4235 end Set_Is_Controlling_Formal;
4237 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4240 end Set_Is_CPP_Class;
4242 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4244 pragma Assert (Is_Type (Id));
4245 Set_Flag223 (Id, V);
4246 end Set_Is_Descendent_Of_Address;
4248 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4250 Set_Flag176 (Id, V);
4251 end Set_Is_Discrim_SO_Function;
4253 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4255 Set_Flag234 (Id, V);
4256 end Set_Is_Dispatch_Table_Entity;
4258 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4263 Is_Overloadable (Id)
4265 Ekind (Id) = E_Subprogram_Type);
4268 end Set_Is_Dispatching_Operation;
4270 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4272 Set_Flag124 (Id, V);
4273 end Set_Is_Eliminated;
4275 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4278 end Set_Is_Entry_Formal;
4280 procedure Set_Is_Exported (Id : E; V : B := True) is
4283 end Set_Is_Exported;
4285 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4288 end Set_Is_First_Subtype;
4290 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4292 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4293 Set_Flag118 (Id, V);
4294 end Set_Is_For_Access_Subtype;
4296 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4298 Set_Flag111 (Id, V);
4299 end Set_Is_Formal_Subprogram;
4301 procedure Set_Is_Frozen (Id : E; V : B := True) is
4303 pragma Assert (Nkind (Id) in N_Entity);
4307 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4309 pragma Assert (Is_Type (Id));
4311 end Set_Is_Generic_Actual_Type;
4313 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4315 Set_Flag130 (Id, V);
4316 end Set_Is_Generic_Instance;
4318 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4320 pragma Assert (Nkind (Id) in N_Entity);
4322 end Set_Is_Generic_Type;
4324 procedure Set_Is_Hidden (Id : E; V : B := True) is
4329 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4331 Set_Flag171 (Id, V);
4332 end Set_Is_Hidden_Open_Scope;
4334 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4336 pragma Assert (Nkind (Id) in N_Entity);
4338 end Set_Is_Immediately_Visible;
4340 procedure Set_Is_Imported (Id : E; V : B := True) is
4343 end Set_Is_Imported;
4345 procedure Set_Is_Inlined (Id : E; V : B := True) is
4350 procedure Set_Is_Interface (Id : E; V : B := True) is
4352 pragma Assert (Is_Record_Type (Id));
4353 Set_Flag186 (Id, V);
4354 end Set_Is_Interface;
4356 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4358 Set_Flag126 (Id, V);
4359 end Set_Is_Instantiated;
4361 procedure Set_Is_Internal (Id : E; V : B := True) is
4363 pragma Assert (Nkind (Id) in N_Entity);
4365 end Set_Is_Internal;
4367 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4369 pragma Assert (Nkind (Id) in N_Entity);
4371 end Set_Is_Interrupt_Handler;
4373 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4376 end Set_Is_Intrinsic_Subprogram;
4378 procedure Set_Is_Itype (Id : E; V : B := True) is
4383 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4386 end Set_Is_Known_Non_Null;
4388 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4390 Set_Flag204 (Id, V);
4391 end Set_Is_Known_Null;
4393 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4395 Set_Flag170 (Id, V);
4396 end Set_Is_Known_Valid;
4398 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4400 pragma Assert (Is_Type (Id));
4401 Set_Flag106 (Id, V);
4402 end Set_Is_Limited_Composite;
4404 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4406 pragma Assert (Is_Interface (Id));
4407 Set_Flag197 (Id, V);
4408 end Set_Is_Limited_Interface;
4410 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4413 end Set_Is_Limited_Record;
4415 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4417 pragma Assert (Is_Subprogram (Id));
4418 Set_Flag137 (Id, V);
4419 end Set_Is_Machine_Code_Subprogram;
4421 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4423 pragma Assert (Is_Type (Id));
4424 Set_Flag109 (Id, V);
4425 end Set_Is_Non_Static_Subtype;
4427 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4429 pragma Assert (Ekind (Id) = E_Procedure);
4430 Set_Flag178 (Id, V);
4431 end Set_Is_Null_Init_Proc;
4433 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4435 Set_Flag153 (Id, V);
4436 end Set_Is_Obsolescent;
4438 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
4440 pragma Assert (Ekind (Id) = E_Out_Parameter);
4441 Set_Flag226 (Id, V);
4442 end Set_Is_Only_Out_Parameter;
4444 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
4446 pragma Assert (Is_Formal (Id));
4447 Set_Flag134 (Id, V);
4448 end Set_Is_Optional_Parameter;
4450 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
4452 Set_Flag160 (Id, V);
4453 end Set_Is_Package_Body_Entity;
4455 procedure Set_Is_Packed (Id : E; V : B := True) is
4457 pragma Assert (Id = Base_Type (Id));
4461 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
4463 Set_Flag138 (Id, V);
4464 end Set_Is_Packed_Array_Type;
4466 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
4468 pragma Assert (Nkind (Id) in N_Entity);
4470 end Set_Is_Potentially_Use_Visible;
4472 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
4475 end Set_Is_Preelaborated;
4477 procedure Set_Is_Primitive (Id : E; V : B := True) is
4480 (Is_Overloadable (Id)
4481 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
4482 Set_Flag218 (Id, V);
4483 end Set_Is_Primitive;
4485 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
4487 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4488 Set_Flag195 (Id, V);
4489 end Set_Is_Primitive_Wrapper;
4491 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
4493 pragma Assert (Is_Type (Id));
4494 Set_Flag107 (Id, V);
4495 end Set_Is_Private_Composite;
4497 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
4500 end Set_Is_Private_Descendant;
4502 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
4504 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4505 Set_Flag245 (Id, V);
4506 end Set_Is_Private_Primitive;
4508 procedure Set_Is_Public (Id : E; V : B := True) is
4510 pragma Assert (Nkind (Id) in N_Entity);
4514 procedure Set_Is_Pure (Id : E; V : B := True) is
4519 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
4521 pragma Assert (Is_Access_Type (Id));
4522 Set_Flag189 (Id, V);
4523 end Set_Is_Pure_Unit_Access_Type;
4525 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
4527 pragma Assert (Is_Type (Id));
4528 Set_Flag244 (Id, V);
4529 end Set_Is_RACW_Stub_Type;
4531 procedure Set_Is_Raised (Id : E; V : B := True) is
4533 pragma Assert (Ekind (Id) = E_Exception);
4534 Set_Flag224 (Id, V);
4537 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
4540 end Set_Is_Remote_Call_Interface;
4542 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
4545 end Set_Is_Remote_Types;
4547 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
4549 Set_Flag112 (Id, V);
4550 end Set_Is_Renaming_Of_Object;
4552 procedure Set_Is_Return_Object (Id : E; V : B := True) is
4554 Set_Flag209 (Id, V);
4555 end Set_Is_Return_Object;
4557 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
4559 pragma Assert (Ekind (Id) = E_Variable);
4560 Set_Flag249 (Id, V);
4561 end Set_Is_Safe_To_Reevaluate;
4563 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
4566 end Set_Is_Shared_Passive;
4568 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
4572 or else Ekind_In (Id, E_Exception,
4577 end Set_Is_Statically_Allocated;
4579 procedure Set_Is_Tag (Id : E; V : B := True) is
4581 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
4585 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
4588 end Set_Is_Tagged_Type;
4590 procedure Set_Is_Thunk (Id : E; V : B := True) is
4592 Set_Flag225 (Id, V);
4595 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
4597 Set_Flag235 (Id, V);
4598 end Set_Is_Trivial_Subprogram;
4600 procedure Set_Is_True_Constant (Id : E; V : B := True) is
4602 Set_Flag163 (Id, V);
4603 end Set_Is_True_Constant;
4605 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
4607 pragma Assert (Id = Base_Type (Id));
4608 Set_Flag117 (Id, V);
4609 end Set_Is_Unchecked_Union;
4611 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
4613 pragma Assert (Ekind (Id) = E_Record_Type);
4614 Set_Flag246 (Id, V);
4615 end Set_Is_Underlying_Record_View;
4617 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
4619 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
4620 Set_Flag144 (Id, V);
4621 end Set_Is_Unsigned_Type;
4623 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
4625 pragma Assert (Ekind (Id) = E_Procedure);
4626 Set_Flag127 (Id, V);
4627 end Set_Is_Valued_Procedure;
4629 procedure Set_Is_Visible_Child_Unit (Id : E; V : B := True) is
4631 pragma Assert (Is_Child_Unit (Id));
4632 Set_Flag116 (Id, V);
4633 end Set_Is_Visible_Child_Unit;
4635 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
4637 Set_Flag206 (Id, V);
4638 end Set_Is_Visible_Formal;
4640 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
4642 pragma Assert (Ekind (Id) = E_Exception);
4643 Set_Flag133 (Id, V);
4644 end Set_Is_VMS_Exception;
4646 procedure Set_Is_Volatile (Id : E; V : B := True) is
4648 pragma Assert (Nkind (Id) in N_Entity);
4650 end Set_Is_Volatile;
4652 procedure Set_Itype_Printed (Id : E; V : B := True) is
4654 pragma Assert (Is_Itype (Id));
4655 Set_Flag202 (Id, V);
4656 end Set_Itype_Printed;
4658 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
4661 end Set_Kill_Elaboration_Checks;
4663 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
4666 end Set_Kill_Range_Checks;
4668 procedure Set_Kill_Tag_Checks (Id : E; V : B := True) is
4671 end Set_Kill_Tag_Checks;
4673 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
4675 pragma Assert (Is_Type (Id));
4676 Set_Flag207 (Id, V);
4677 end Set_Known_To_Have_Preelab_Init;
4679 procedure Set_Last_Assignment (Id : E; V : N) is
4681 pragma Assert (Is_Assignable (Id));
4683 end Set_Last_Assignment;
4685 procedure Set_Last_Entity (Id : E; V : E) is
4688 end Set_Last_Entity;
4690 procedure Set_Limited_View (Id : E; V : E) is
4692 pragma Assert (Ekind (Id) = E_Package);
4694 end Set_Limited_View;
4696 procedure Set_Lit_Indexes (Id : E; V : E) is
4698 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4700 end Set_Lit_Indexes;
4702 procedure Set_Lit_Strings (Id : E; V : E) is
4704 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4706 end Set_Lit_Strings;
4708 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
4710 pragma Assert (Is_Formal (Id));
4711 Set_Flag205 (Id, V);
4712 end Set_Low_Bound_Tested;
4714 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
4716 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4718 end Set_Machine_Radix_10;
4720 procedure Set_Master_Id (Id : E; V : E) is
4722 pragma Assert (Is_Access_Type (Id));
4726 procedure Set_Materialize_Entity (Id : E; V : B := True) is
4728 Set_Flag168 (Id, V);
4729 end Set_Materialize_Entity;
4731 procedure Set_Mechanism (Id : E; V : M) is
4733 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
4734 Set_Uint8 (Id, UI_From_Int (V));
4737 procedure Set_Modulus (Id : E; V : U) is
4739 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
4743 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
4745 pragma Assert (Is_Type (Id));
4746 Set_Flag183 (Id, V);
4747 end Set_Must_Be_On_Byte_Boundary;
4749 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
4751 pragma Assert (Is_Type (Id));
4752 Set_Flag208 (Id, V);
4753 end Set_Must_Have_Preelab_Init;
4755 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
4757 Set_Flag147 (Id, V);
4758 end Set_Needs_Debug_Info;
4760 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
4763 (Is_Overloadable (Id)
4764 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
4766 end Set_Needs_No_Actuals;
4768 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
4770 Set_Flag115 (Id, V);
4771 end Set_Never_Set_In_Source;
4773 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
4776 end Set_Next_Inlined_Subprogram;
4778 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
4780 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
4781 Set_Flag131 (Id, V);
4782 end Set_No_Pool_Assigned;
4784 procedure Set_No_Return (Id : E; V : B := True) is
4787 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
4788 Set_Flag113 (Id, V);
4791 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
4793 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
4794 Set_Flag136 (Id, V);
4795 end Set_No_Strict_Aliasing;
4797 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
4799 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
4801 end Set_Non_Binary_Modulus;
4803 procedure Set_Non_Limited_View (Id : E; V : E) is
4805 pragma Assert (Ekind (Id) in Incomplete_Kind);
4807 end Set_Non_Limited_View;
4809 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
4812 (Root_Type (Id) = Standard_Boolean
4813 and then Ekind (Id) = E_Enumeration_Type);
4814 Set_Flag162 (Id, V);
4815 end Set_Nonzero_Is_True;
4817 procedure Set_Normalized_First_Bit (Id : E; V : U) is
4819 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4821 end Set_Normalized_First_Bit;
4823 procedure Set_Normalized_Position (Id : E; V : U) is
4825 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4827 end Set_Normalized_Position;
4829 procedure Set_Normalized_Position_Max (Id : E; V : U) is
4831 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4833 end Set_Normalized_Position_Max;
4835 procedure Set_OK_To_Rename (Id : E; V : B := True) is
4837 pragma Assert (Ekind (Id) = E_Variable);
4838 Set_Flag247 (Id, V);
4839 end Set_OK_To_Rename;
4841 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
4844 (Is_Record_Type (Id) and then Is_Base_Type (Id));
4845 Set_Flag239 (Id, V);
4846 end Set_OK_To_Reorder_Components;
4848 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
4851 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
4852 Set_Flag241 (Id, V);
4853 end Set_Optimize_Alignment_Space;
4855 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
4858 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
4859 Set_Flag242 (Id, V);
4860 end Set_Optimize_Alignment_Time;
4862 procedure Set_Original_Access_Type (Id : E; V : E) is
4864 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
4866 end Set_Original_Access_Type;
4868 procedure Set_Original_Array_Type (Id : E; V : E) is
4870 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
4872 end Set_Original_Array_Type;
4874 procedure Set_Original_Record_Component (Id : E; V : E) is
4876 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
4878 end Set_Original_Record_Component;
4880 procedure Set_Overlays_Constant (Id : E; V : B := True) is
4882 Set_Flag243 (Id, V);
4883 end Set_Overlays_Constant;
4885 procedure Set_Overridden_Operation (Id : E; V : E) is
4888 end Set_Overridden_Operation;
4890 procedure Set_Package_Instantiation (Id : E; V : N) is
4892 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
4894 end Set_Package_Instantiation;
4896 procedure Set_Packed_Array_Type (Id : E; V : E) is
4898 pragma Assert (Is_Array_Type (Id));
4900 end Set_Packed_Array_Type;
4902 procedure Set_Parent_Subtype (Id : E; V : E) is
4904 pragma Assert (Ekind (Id) = E_Record_Type);
4906 end Set_Parent_Subtype;
4908 procedure Set_Postcondition_Proc (Id : E; V : E) is
4910 pragma Assert (Ekind (Id) = E_Procedure);
4912 end Set_Postcondition_Proc;
4914 procedure Set_PPC_Wrapper (Id : E; V : E) is
4916 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
4918 end Set_PPC_Wrapper;
4920 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
4922 pragma Assert (Is_Tagged_Type (Id));
4923 Set_Elist10 (Id, V);
4924 end Set_Direct_Primitive_Operations;
4926 procedure Set_Prival (Id : E; V : E) is
4928 pragma Assert (Is_Protected_Component (Id));
4932 procedure Set_Prival_Link (Id : E; V : E) is
4934 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
4936 end Set_Prival_Link;
4938 procedure Set_Private_Dependents (Id : E; V : L) is
4940 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
4941 Set_Elist18 (Id, V);
4942 end Set_Private_Dependents;
4944 procedure Set_Private_View (Id : E; V : N) is
4946 pragma Assert (Is_Private_Type (Id));
4948 end Set_Private_View;
4950 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
4952 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
4954 end Set_Protected_Body_Subprogram;
4956 procedure Set_Protected_Formal (Id : E; V : E) is
4958 pragma Assert (Is_Formal (Id));
4960 end Set_Protected_Formal;
4962 procedure Set_Protection_Object (Id : E; V : E) is
4964 pragma Assert (Ekind_In (Id, E_Entry,
4969 end Set_Protection_Object;
4971 procedure Set_Reachable (Id : E; V : B := True) is
4976 procedure Set_Referenced (Id : E; V : B := True) is
4978 Set_Flag156 (Id, V);
4981 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
4984 end Set_Referenced_As_LHS;
4986 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
4988 Set_Flag227 (Id, V);
4989 end Set_Referenced_As_Out_Parameter;
4991 procedure Set_Register_Exception_Call (Id : E; V : N) is
4993 pragma Assert (Ekind (Id) = E_Exception);
4995 end Set_Register_Exception_Call;
4997 procedure Set_Related_Array_Object (Id : E; V : E) is
4999 pragma Assert (Is_Array_Type (Id));
5001 end Set_Related_Array_Object;
5003 procedure Set_Related_Expression (Id : E; V : N) is
5005 pragma Assert (Ekind (Id) in Type_Kind
5006 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
5008 end Set_Related_Expression;
5010 procedure Set_Related_Instance (Id : E; V : E) is
5012 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
5014 end Set_Related_Instance;
5016 procedure Set_Related_Type (Id : E; V : E) is
5018 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5020 end Set_Related_Type;
5022 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5024 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
5026 end Set_Relative_Deadline_Variable;
5028 procedure Set_Renamed_Entity (Id : E; V : N) is
5031 end Set_Renamed_Entity;
5033 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5035 pragma Assert (Ekind (Id) = E_Package);
5036 Set_Flag231 (Id, V);
5037 end Set_Renamed_In_Spec;
5039 procedure Set_Renamed_Object (Id : E; V : N) is
5042 end Set_Renamed_Object;
5044 procedure Set_Renaming_Map (Id : E; V : U) is
5047 end Set_Renaming_Map;
5049 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5051 pragma Assert (Is_Overloadable (Id));
5052 Set_Flag213 (Id, V);
5053 end Set_Requires_Overriding;
5055 procedure Set_Return_Present (Id : E; V : B := True) is
5058 end Set_Return_Present;
5060 procedure Set_Return_Applies_To (Id : E; V : N) is
5063 end Set_Return_Applies_To;
5065 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5068 end Set_Returns_By_Ref;
5070 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5073 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5074 Set_Flag164 (Id, V);
5075 end Set_Reverse_Bit_Order;
5077 procedure Set_RM_Size (Id : E; V : U) is
5079 pragma Assert (Is_Type (Id));
5083 procedure Set_Scalar_Range (Id : E; V : N) is
5086 end Set_Scalar_Range;
5088 procedure Set_Scale_Value (Id : E; V : U) is
5091 end Set_Scale_Value;
5093 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5095 pragma Assert (not Is_Record_Type (Id));
5097 end Set_Scope_Depth_Value;
5099 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5101 Set_Flag167 (Id, V);
5102 end Set_Sec_Stack_Needed_For_Return;
5104 procedure Set_Shadow_Entities (Id : E; V : S) is
5106 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5108 end Set_Shadow_Entities;
5110 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5112 pragma Assert (Ekind (Id) = E_Variable);
5114 end Set_Shared_Var_Procs_Instance;
5116 procedure Set_Size_Check_Code (Id : E; V : N) is
5118 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5120 end Set_Size_Check_Code;
5122 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5124 Set_Flag177 (Id, V);
5125 end Set_Size_Depends_On_Discriminant;
5127 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5130 end Set_Size_Known_At_Compile_Time;
5132 procedure Set_Small_Value (Id : E; V : R) is
5134 pragma Assert (Is_Fixed_Point_Type (Id));
5135 Set_Ureal21 (Id, V);
5136 end Set_Small_Value;
5138 procedure Set_Spec_Entity (Id : E; V : E) is
5140 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5142 end Set_Spec_Entity;
5144 procedure Set_Spec_PPC_List (Id : E; V : N) is
5147 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Void)
5148 or else Is_Subprogram (Id)
5149 or else Is_Generic_Subprogram (Id));
5151 end Set_Spec_PPC_List;
5153 procedure Set_Static_Predicate (Id : E; V : S) is
5156 (Ekind_In (Id, E_Enumeration_Subtype,
5157 E_Modular_Integer_Subtype,
5158 E_Signed_Integer_Subtype)
5159 and then Has_Predicates (Id));
5161 end Set_Static_Predicate;
5163 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5165 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5166 pragma Assert (Id = Base_Type (Id));
5168 end Set_Storage_Size_Variable;
5170 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5172 pragma Assert (Ekind (Id) = E_Package);
5174 end Set_Static_Elaboration_Desired;
5176 procedure Set_Static_Initialization (Id : E; V : N) is
5179 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5181 end Set_Static_Initialization;
5183 procedure Set_Stored_Constraint (Id : E; V : L) is
5185 pragma Assert (Nkind (Id) in N_Entity);
5186 Set_Elist23 (Id, V);
5187 end Set_Stored_Constraint;
5189 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5191 pragma Assert (Id = Base_Type (Id));
5192 Set_Flag145 (Id, V);
5193 end Set_Strict_Alignment;
5195 procedure Set_String_Literal_Length (Id : E; V : U) is
5197 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5199 end Set_String_Literal_Length;
5201 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5203 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5205 end Set_String_Literal_Low_Bound;
5207 procedure Set_Subprograms_For_Type (Id : E; V : E) is
5209 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
5211 end Set_Subprograms_For_Type;
5213 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5215 Set_Flag148 (Id, V);
5216 end Set_Suppress_Elaboration_Warnings;
5218 procedure Set_Suppress_Init_Proc (Id : E; V : B := True) is
5220 pragma Assert (Id = Base_Type (Id));
5221 Set_Flag105 (Id, V);
5222 end Set_Suppress_Init_Proc;
5224 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5226 Set_Flag165 (Id, V);
5227 end Set_Suppress_Style_Checks;
5229 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5231 Set_Flag217 (Id, V);
5232 end Set_Suppress_Value_Tracking_On_Call;
5234 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5236 pragma Assert (Ekind (Id) in Task_Kind);
5238 end Set_Task_Body_Procedure;
5240 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5243 end Set_Treat_As_Volatile;
5245 procedure Set_Underlying_Full_View (Id : E; V : E) is
5247 pragma Assert (Ekind (Id) in Private_Kind);
5249 end Set_Underlying_Full_View;
5251 procedure Set_Underlying_Record_View (Id : E; V : E) is
5253 pragma Assert (Ekind (Id) = E_Record_Type);
5255 end Set_Underlying_Record_View;
5257 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5259 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5260 Set_Flag216 (Id, V);
5261 end Set_Universal_Aliasing;
5263 procedure Set_Unset_Reference (Id : E; V : N) is
5266 end Set_Unset_Reference;
5268 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5271 end Set_Uses_Sec_Stack;
5273 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5275 Set_Flag222 (Id, V);
5276 end Set_Used_As_Generic_Actual;
5278 procedure Set_Warnings_Off (Id : E; V : B := True) is
5281 end Set_Warnings_Off;
5283 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
5285 Set_Flag236 (Id, V);
5286 end Set_Warnings_Off_Used;
5288 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
5290 Set_Flag237 (Id, V);
5291 end Set_Warnings_Off_Used_Unmodified;
5293 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
5295 Set_Flag238 (Id, V);
5296 end Set_Warnings_Off_Used_Unreferenced;
5298 procedure Set_Was_Hidden (Id : E; V : B := True) is
5300 Set_Flag196 (Id, V);
5303 procedure Set_Wrapped_Entity (Id : E; V : E) is
5305 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5306 and then Is_Primitive_Wrapper (Id));
5308 end Set_Wrapped_Entity;
5310 -----------------------------------
5311 -- Field Initialization Routines --
5312 -----------------------------------
5314 procedure Init_Alignment (Id : E) is
5316 Set_Uint14 (Id, Uint_0);
5319 procedure Init_Alignment (Id : E; V : Int) is
5321 Set_Uint14 (Id, UI_From_Int (V));
5324 procedure Init_Component_Bit_Offset (Id : E) is
5326 Set_Uint11 (Id, No_Uint);
5327 end Init_Component_Bit_Offset;
5329 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
5331 Set_Uint11 (Id, UI_From_Int (V));
5332 end Init_Component_Bit_Offset;
5334 procedure Init_Component_Size (Id : E) is
5336 Set_Uint22 (Id, Uint_0);
5337 end Init_Component_Size;
5339 procedure Init_Component_Size (Id : E; V : Int) is
5341 Set_Uint22 (Id, UI_From_Int (V));
5342 end Init_Component_Size;
5344 procedure Init_Digits_Value (Id : E) is
5346 Set_Uint17 (Id, Uint_0);
5347 end Init_Digits_Value;
5349 procedure Init_Digits_Value (Id : E; V : Int) is
5351 Set_Uint17 (Id, UI_From_Int (V));
5352 end Init_Digits_Value;
5354 procedure Init_Esize (Id : E) is
5356 Set_Uint12 (Id, Uint_0);
5359 procedure Init_Esize (Id : E; V : Int) is
5361 Set_Uint12 (Id, UI_From_Int (V));
5364 procedure Init_Normalized_First_Bit (Id : E) is
5366 Set_Uint8 (Id, No_Uint);
5367 end Init_Normalized_First_Bit;
5369 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
5371 Set_Uint8 (Id, UI_From_Int (V));
5372 end Init_Normalized_First_Bit;
5374 procedure Init_Normalized_Position (Id : E) is
5376 Set_Uint14 (Id, No_Uint);
5377 end Init_Normalized_Position;
5379 procedure Init_Normalized_Position (Id : E; V : Int) is
5381 Set_Uint14 (Id, UI_From_Int (V));
5382 end Init_Normalized_Position;
5384 procedure Init_Normalized_Position_Max (Id : E) is
5386 Set_Uint10 (Id, No_Uint);
5387 end Init_Normalized_Position_Max;
5389 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
5391 Set_Uint10 (Id, UI_From_Int (V));
5392 end Init_Normalized_Position_Max;
5394 procedure Init_RM_Size (Id : E) is
5396 Set_Uint13 (Id, Uint_0);
5399 procedure Init_RM_Size (Id : E; V : Int) is
5401 Set_Uint13 (Id, UI_From_Int (V));
5404 -----------------------------
5405 -- Init_Component_Location --
5406 -----------------------------
5408 procedure Init_Component_Location (Id : E) is
5410 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
5411 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
5412 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
5413 Set_Uint12 (Id, Uint_0); -- Esize
5414 Set_Uint14 (Id, No_Uint); -- Normalized_Position
5415 end Init_Component_Location;
5421 procedure Init_Size (Id : E; V : Int) is
5423 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
5424 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
5427 ---------------------
5428 -- Init_Size_Align --
5429 ---------------------
5431 procedure Init_Size_Align (Id : E) is
5433 Set_Uint12 (Id, Uint_0); -- Esize
5434 Set_Uint13 (Id, Uint_0); -- RM_Size
5435 Set_Uint14 (Id, Uint_0); -- Alignment
5436 end Init_Size_Align;
5438 ----------------------------------------------
5439 -- Type Representation Attribute Predicates --
5440 ----------------------------------------------
5442 function Known_Alignment (E : Entity_Id) return B is
5444 return Uint14 (E) /= Uint_0
5445 and then Uint14 (E) /= No_Uint;
5446 end Known_Alignment;
5448 function Known_Component_Bit_Offset (E : Entity_Id) return B is
5450 return Uint11 (E) /= No_Uint;
5451 end Known_Component_Bit_Offset;
5453 function Known_Component_Size (E : Entity_Id) return B is
5455 return Uint22 (Base_Type (E)) /= Uint_0
5456 and then Uint22 (Base_Type (E)) /= No_Uint;
5457 end Known_Component_Size;
5459 function Known_Esize (E : Entity_Id) return B is
5461 return Uint12 (E) /= Uint_0
5462 and then Uint12 (E) /= No_Uint;
5465 function Known_Normalized_First_Bit (E : Entity_Id) return B is
5467 return Uint8 (E) /= No_Uint;
5468 end Known_Normalized_First_Bit;
5470 function Known_Normalized_Position (E : Entity_Id) return B is
5472 return Uint14 (E) /= No_Uint;
5473 end Known_Normalized_Position;
5475 function Known_Normalized_Position_Max (E : Entity_Id) return B is
5477 return Uint10 (E) /= No_Uint;
5478 end Known_Normalized_Position_Max;
5480 function Known_RM_Size (E : Entity_Id) return B is
5482 return Uint13 (E) /= No_Uint
5483 and then (Uint13 (E) /= Uint_0
5484 or else Is_Discrete_Type (E)
5485 or else Is_Fixed_Point_Type (E));
5488 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
5490 return Uint11 (E) /= No_Uint
5491 and then Uint11 (E) >= Uint_0;
5492 end Known_Static_Component_Bit_Offset;
5494 function Known_Static_Component_Size (E : Entity_Id) return B is
5496 return Uint22 (Base_Type (E)) > Uint_0;
5497 end Known_Static_Component_Size;
5499 function Known_Static_Esize (E : Entity_Id) return B is
5501 return Uint12 (E) > Uint_0
5502 and then not Is_Generic_Type (E);
5503 end Known_Static_Esize;
5505 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
5507 return Uint8 (E) /= No_Uint
5508 and then Uint8 (E) >= Uint_0;
5509 end Known_Static_Normalized_First_Bit;
5511 function Known_Static_Normalized_Position (E : Entity_Id) return B is
5513 return Uint14 (E) /= No_Uint
5514 and then Uint14 (E) >= Uint_0;
5515 end Known_Static_Normalized_Position;
5517 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
5519 return Uint10 (E) /= No_Uint
5520 and then Uint10 (E) >= Uint_0;
5521 end Known_Static_Normalized_Position_Max;
5523 function Known_Static_RM_Size (E : Entity_Id) return B is
5525 return (Uint13 (E) > Uint_0
5526 or else Is_Discrete_Type (E)
5527 or else Is_Fixed_Point_Type (E))
5528 and then not Is_Generic_Type (E);
5529 end Known_Static_RM_Size;
5531 function Unknown_Alignment (E : Entity_Id) return B is
5533 return Uint14 (E) = Uint_0
5534 or else Uint14 (E) = No_Uint;
5535 end Unknown_Alignment;
5537 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
5539 return Uint11 (E) = No_Uint;
5540 end Unknown_Component_Bit_Offset;
5542 function Unknown_Component_Size (E : Entity_Id) return B is
5544 return Uint22 (Base_Type (E)) = Uint_0
5546 Uint22 (Base_Type (E)) = No_Uint;
5547 end Unknown_Component_Size;
5549 function Unknown_Esize (E : Entity_Id) return B is
5551 return Uint12 (E) = No_Uint
5553 Uint12 (E) = Uint_0;
5556 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
5558 return Uint8 (E) = No_Uint;
5559 end Unknown_Normalized_First_Bit;
5561 function Unknown_Normalized_Position (E : Entity_Id) return B is
5563 return Uint14 (E) = No_Uint;
5564 end Unknown_Normalized_Position;
5566 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
5568 return Uint10 (E) = No_Uint;
5569 end Unknown_Normalized_Position_Max;
5571 function Unknown_RM_Size (E : Entity_Id) return B is
5573 return (Uint13 (E) = Uint_0
5574 and then not Is_Discrete_Type (E)
5575 and then not Is_Fixed_Point_Type (E))
5576 or else Uint13 (E) = No_Uint;
5577 end Unknown_RM_Size;
5579 --------------------
5580 -- Address_Clause --
5581 --------------------
5583 function Address_Clause (Id : E) return N is
5585 return Rep_Clause (Id, Name_Address);
5592 function Aft_Value (Id : E) return U is
5594 Delta_Val : Ureal := Delta_Value (Id);
5596 while Delta_Val < Ureal_Tenth loop
5597 Delta_Val := Delta_Val * Ureal_10;
5598 Result := Result + 1;
5601 return UI_From_Int (Result);
5604 ----------------------
5605 -- Alignment_Clause --
5606 ----------------------
5608 function Alignment_Clause (Id : E) return N is
5610 return Rep_Clause (Id, Name_Alignment);
5611 end Alignment_Clause;
5617 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
5619 if Last_Entity (V) = Empty then
5620 Set_First_Entity (Id => V, V => Id);
5622 Set_Next_Entity (Last_Entity (V), Id);
5625 Set_Next_Entity (Id, Empty);
5627 Set_Last_Entity (Id => V, V => Id);
5634 function Base_Type (Id : E) return E is
5636 if Is_Base_Type (Id) then
5639 pragma Assert (Is_Type (Id));
5644 -------------------------
5645 -- Component_Alignment --
5646 -------------------------
5648 -- Component Alignment is encoded using two flags, Flag128/129 as
5649 -- follows. Note that both flags False = Align_Default, so that the
5650 -- default initialization of flags to False initializes component
5651 -- alignment to the default value as required.
5653 -- Flag128 Flag129 Value
5654 -- ------- ------- -----
5655 -- False False Calign_Default
5656 -- False True Calign_Component_Size
5657 -- True False Calign_Component_Size_4
5658 -- True True Calign_Storage_Unit
5660 function Component_Alignment (Id : E) return C is
5661 BT : constant Node_Id := Base_Type (Id);
5664 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
5666 if Flag128 (BT) then
5667 if Flag129 (BT) then
5668 return Calign_Storage_Unit;
5670 return Calign_Component_Size_4;
5674 if Flag129 (BT) then
5675 return Calign_Component_Size;
5677 return Calign_Default;
5680 end Component_Alignment;
5682 ----------------------
5683 -- Declaration_Node --
5684 ----------------------
5686 function Declaration_Node (Id : E) return N is
5690 if Ekind (Id) = E_Incomplete_Type
5691 and then Present (Full_View (Id))
5693 P := Parent (Full_View (Id));
5699 if Nkind (P) /= N_Selected_Component
5700 and then Nkind (P) /= N_Expanded_Name
5702 not (Nkind (P) = N_Defining_Program_Unit_Name
5703 and then Is_Child_Unit (Id))
5710 end Declaration_Node;
5712 ---------------------
5713 -- Designated_Type --
5714 ---------------------
5716 function Designated_Type (Id : E) return E is
5720 Desig_Type := Directly_Designated_Type (Id);
5722 if Ekind (Desig_Type) = E_Incomplete_Type
5723 and then Present (Full_View (Desig_Type))
5725 return Full_View (Desig_Type);
5727 elsif Is_Class_Wide_Type (Desig_Type)
5728 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
5729 and then Present (Full_View (Etype (Desig_Type)))
5730 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
5732 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
5737 end Designated_Type;
5739 ----------------------
5740 -- Entry_Index_Type --
5741 ----------------------
5743 function Entry_Index_Type (Id : E) return N is
5745 pragma Assert (Ekind (Id) = E_Entry_Family);
5746 return Etype (Discrete_Subtype_Definition (Parent (Id)));
5747 end Entry_Index_Type;
5749 ---------------------
5750 -- First_Component --
5751 ---------------------
5753 function First_Component (Id : E) return E is
5758 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5760 Comp_Id := First_Entity (Id);
5761 while Present (Comp_Id) loop
5762 exit when Ekind (Comp_Id) = E_Component;
5763 Comp_Id := Next_Entity (Comp_Id);
5767 end First_Component;
5769 -------------------------------------
5770 -- First_Component_Or_Discriminant --
5771 -------------------------------------
5773 function First_Component_Or_Discriminant (Id : E) return E is
5778 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5780 Comp_Id := First_Entity (Id);
5781 while Present (Comp_Id) loop
5782 exit when Ekind (Comp_Id) = E_Component
5784 Ekind (Comp_Id) = E_Discriminant;
5785 Comp_Id := Next_Entity (Comp_Id);
5789 end First_Component_Or_Discriminant;
5795 function First_Formal (Id : E) return E is
5800 (Is_Overloadable (Id)
5801 or else Ekind_In (Id, E_Entry_Family,
5803 E_Subprogram_Type));
5805 if Ekind (Id) = E_Enumeration_Literal then
5809 Formal := First_Entity (Id);
5811 if Present (Formal) and then Is_Formal (Formal) then
5819 ------------------------------
5820 -- First_Formal_With_Extras --
5821 ------------------------------
5823 function First_Formal_With_Extras (Id : E) return E is
5828 (Is_Overloadable (Id)
5829 or else Ekind_In (Id, E_Entry_Family,
5831 E_Subprogram_Type));
5833 if Ekind (Id) = E_Enumeration_Literal then
5837 Formal := First_Entity (Id);
5839 if Present (Formal) and then Is_Formal (Formal) then
5842 return Extra_Formals (Id); -- Empty if no extra formals
5845 end First_Formal_With_Extras;
5847 -------------------------------------
5848 -- Get_Attribute_Definition_Clause --
5849 -------------------------------------
5851 function Get_Attribute_Definition_Clause
5853 Id : Attribute_Id) return Node_Id
5858 N := First_Rep_Item (E);
5859 while Present (N) loop
5860 if Nkind (N) = N_Attribute_Definition_Clause
5861 and then Get_Attribute_Id (Chars (N)) = Id
5870 end Get_Attribute_Definition_Clause;
5876 function Get_Full_View (T : Entity_Id) return Entity_Id is
5878 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
5879 return Full_View (T);
5881 elsif Is_Class_Wide_Type (T)
5882 and then Ekind (Root_Type (T)) = E_Incomplete_Type
5883 and then Present (Full_View (Root_Type (T)))
5885 return Class_Wide_Type (Full_View (Root_Type (T)));
5892 --------------------------------------
5893 -- Get_Record_Representation_Clause --
5894 --------------------------------------
5896 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
5900 N := First_Rep_Item (E);
5901 while Present (N) loop
5902 if Nkind (N) = N_Record_Representation_Clause then
5910 end Get_Record_Representation_Clause;
5912 -----------------------------
5913 -- Get_Rep_Item_For_Entity --
5914 -----------------------------
5916 function Get_Rep_Item_For_Entity
5918 Nam : Name_Id) return Node_Id
5924 N := First_Rep_Item (E);
5925 while Present (N) loop
5926 if Nkind (N) = N_Pragma and then Pragma_Name (N) = Nam then
5927 Arg := Get_Pragma_Arg (First (Pragma_Argument_Associations (N)));
5929 if Is_Entity_Name (Arg) and then Entity (Arg) = E then
5933 elsif Nkind (N) = N_Attribute_Definition_Clause
5934 and then Chars (N) = Nam
5935 and then Entity (N) = E
5939 elsif Nkind (N) = N_Aspect_Specification
5940 and then Chars (Identifier (N)) = Nam
5941 and then Entity (N) = E
5950 end Get_Rep_Item_For_Entity;
5952 --------------------
5953 -- Get_Rep_Pragma --
5954 --------------------
5956 function Get_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Node_Id is
5960 N := First_Rep_Item (E);
5961 while Present (N) loop
5962 if Nkind (N) = N_Pragma and then Pragma_Name (N) = Nam then
5972 ------------------------
5973 -- Has_Attach_Handler --
5974 ------------------------
5976 function Has_Attach_Handler (Id : E) return B is
5980 pragma Assert (Is_Protected_Type (Id));
5982 Ritem := First_Rep_Item (Id);
5983 while Present (Ritem) loop
5984 if Nkind (Ritem) = N_Pragma
5985 and then Pragma_Name (Ritem) = Name_Attach_Handler
5989 Next_Rep_Item (Ritem);
5994 end Has_Attach_Handler;
5996 -------------------------------------
5997 -- Has_Attribute_Definition_Clause --
5998 -------------------------------------
6000 function Has_Attribute_Definition_Clause
6002 Id : Attribute_Id) return Boolean
6005 return Present (Get_Attribute_Definition_Clause (E, Id));
6006 end Has_Attribute_Definition_Clause;
6012 function Has_Entries (Id : E) return B is
6016 pragma Assert (Is_Concurrent_Type (Id));
6018 Ent := First_Entity (Id);
6019 while Present (Ent) loop
6020 if Is_Entry (Ent) then
6024 Ent := Next_Entity (Ent);
6030 ----------------------------
6031 -- Has_Foreign_Convention --
6032 ----------------------------
6034 function Has_Foreign_Convention (Id : E) return B is
6036 -- While regular Intrinsics such as the Standard operators fit in the
6037 -- "Ada" convention, those with an Interface_Name materialize GCC
6038 -- builtin imports for which Ada special treatments shouldn't apply.
6040 return Convention (Id) in Foreign_Convention
6041 or else (Convention (Id) = Convention_Intrinsic
6042 and then Present (Interface_Name (Id)));
6043 end Has_Foreign_Convention;
6045 ---------------------------
6046 -- Has_Interrupt_Handler --
6047 ---------------------------
6049 function Has_Interrupt_Handler (Id : E) return B is
6053 pragma Assert (Is_Protected_Type (Id));
6055 Ritem := First_Rep_Item (Id);
6056 while Present (Ritem) loop
6057 if Nkind (Ritem) = N_Pragma
6058 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6062 Next_Rep_Item (Ritem);
6067 end Has_Interrupt_Handler;
6069 --------------------------
6070 -- Has_Private_Ancestor --
6071 --------------------------
6073 function Has_Private_Ancestor (Id : E) return B is
6074 R : constant Entity_Id := Root_Type (Id);
6075 T1 : Entity_Id := Id;
6078 if Is_Private_Type (T1) then
6086 end Has_Private_Ancestor;
6088 --------------------
6089 -- Has_Rep_Pragma --
6090 --------------------
6092 function Has_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Boolean is
6094 return Present (Get_Rep_Pragma (E, Nam));
6097 --------------------
6098 -- Has_Unmodified --
6099 --------------------
6101 function Has_Unmodified (E : Entity_Id) return Boolean is
6103 if Has_Pragma_Unmodified (E) then
6105 elsif Warnings_Off (E) then
6106 Set_Warnings_Off_Used_Unmodified (E);
6113 ---------------------
6114 -- Has_Unreferenced --
6115 ---------------------
6117 function Has_Unreferenced (E : Entity_Id) return Boolean is
6119 if Has_Pragma_Unreferenced (E) then
6121 elsif Warnings_Off (E) then
6122 Set_Warnings_Off_Used_Unreferenced (E);
6127 end Has_Unreferenced;
6129 ----------------------
6130 -- Has_Warnings_Off --
6131 ----------------------
6133 function Has_Warnings_Off (E : Entity_Id) return Boolean is
6135 if Warnings_Off (E) then
6136 Set_Warnings_Off_Used (E);
6141 end Has_Warnings_Off;
6143 ------------------------------
6144 -- Implementation_Base_Type --
6145 ------------------------------
6147 function Implementation_Base_Type (Id : E) return E is
6152 Bastyp := Base_Type (Id);
6154 if Is_Incomplete_Or_Private_Type (Bastyp) then
6155 Imptyp := Underlying_Type (Bastyp);
6157 -- If we have an implementation type, then just return it,
6158 -- otherwise we return the Base_Type anyway. This can only
6159 -- happen in error situations and should avoid some error bombs.
6161 if Present (Imptyp) then
6162 return Base_Type (Imptyp);
6170 end Implementation_Base_Type;
6172 -------------------------
6173 -- Invariant_Procedure --
6174 -------------------------
6176 function Invariant_Procedure (Id : E) return E is
6180 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
6182 if No (Subprograms_For_Type (Id)) then
6186 S := Subprograms_For_Type (Id);
6187 while Present (S) loop
6188 if Has_Invariants (S) then
6191 S := Subprograms_For_Type (S);
6197 end Invariant_Procedure;
6203 -- Global flag table allowing rapid computation of this function
6205 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
6206 (E_Enumeration_Subtype |
6208 E_Signed_Integer_Subtype |
6209 E_Modular_Integer_Subtype |
6210 E_Floating_Point_Subtype |
6211 E_Ordinary_Fixed_Point_Subtype |
6212 E_Decimal_Fixed_Point_Subtype |
6217 E_Record_Subtype_With_Private |
6218 E_Limited_Private_Subtype |
6220 E_Protected_Subtype |
6222 E_String_Literal_Subtype |
6223 E_Class_Wide_Subtype => False,
6226 function Is_Base_Type (Id : E) return Boolean is
6228 return Entity_Is_Base_Type (Ekind (Id));
6231 ---------------------
6232 -- Is_Boolean_Type --
6233 ---------------------
6235 function Is_Boolean_Type (Id : E) return B is
6237 return Root_Type (Id) = Standard_Boolean;
6238 end Is_Boolean_Type;
6240 ------------------------
6241 -- Is_Constant_Object --
6242 ------------------------
6244 function Is_Constant_Object (Id : E) return B is
6245 K : constant Entity_Kind := Ekind (Id);
6248 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
6249 end Is_Constant_Object;
6251 --------------------
6252 -- Is_Discriminal --
6253 --------------------
6255 function Is_Discriminal (Id : E) return B is
6257 return (Ekind_In (Id, E_Constant, E_In_Parameter)
6258 and then Present (Discriminal_Link (Id)));
6261 ----------------------
6262 -- Is_Dynamic_Scope --
6263 ----------------------
6265 function Is_Dynamic_Scope (Id : E) return B is
6268 Ekind (Id) = E_Block
6270 Ekind (Id) = E_Function
6272 Ekind (Id) = E_Procedure
6274 Ekind (Id) = E_Subprogram_Body
6276 Ekind (Id) = E_Task_Type
6278 (Ekind (Id) = E_Limited_Private_Type
6279 and then Present (Full_View (Id))
6280 and then Ekind (Full_View (Id)) = E_Task_Type)
6282 Ekind (Id) = E_Entry
6284 Ekind (Id) = E_Entry_Family
6286 Ekind (Id) = E_Return_Statement;
6287 end Is_Dynamic_Scope;
6289 --------------------
6290 -- Is_Entity_Name --
6291 --------------------
6293 function Is_Entity_Name (N : Node_Id) return Boolean is
6294 Kind : constant Node_Kind := Nkind (N);
6297 -- Identifiers, operator symbols, expanded names are entity names
6299 return Kind = N_Identifier
6300 or else Kind = N_Operator_Symbol
6301 or else Kind = N_Expanded_Name
6303 -- Attribute references are entity names if they refer to an entity.
6304 -- Note that we don't do this by testing for the presence of the
6305 -- Entity field in the N_Attribute_Reference node, since it may not
6306 -- have been set yet.
6308 or else (Kind = N_Attribute_Reference
6309 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
6312 -----------------------------------
6313 -- Is_Package_Or_Generic_Package --
6314 -----------------------------------
6316 function Is_Package_Or_Generic_Package (Id : E) return B is
6319 Ekind (Id) = E_Package
6321 Ekind (Id) = E_Generic_Package;
6322 end Is_Package_Or_Generic_Package;
6324 ------------------------
6325 -- Predicate_Function --
6326 ------------------------
6328 function Predicate_Function (Id : E) return E is
6332 pragma Assert (Is_Type (Id));
6334 if No (Subprograms_For_Type (Id)) then
6338 S := Subprograms_For_Type (Id);
6339 while Present (S) loop
6340 if Has_Predicates (S) then
6343 S := Subprograms_For_Type (S);
6349 end Predicate_Function;
6355 function Is_Prival (Id : E) return B is
6357 return (Ekind_In (Id, E_Constant, E_Variable)
6358 and then Present (Prival_Link (Id)));
6361 ----------------------------
6362 -- Is_Protected_Component --
6363 ----------------------------
6365 function Is_Protected_Component (Id : E) return B is
6367 return Ekind (Id) = E_Component
6368 and then Is_Protected_Type (Scope (Id));
6369 end Is_Protected_Component;
6371 ----------------------------
6372 -- Is_Protected_Interface --
6373 ----------------------------
6375 function Is_Protected_Interface (Id : E) return B is
6376 Typ : constant Entity_Id := Base_Type (Id);
6378 if not Is_Interface (Typ) then
6380 elsif Is_Class_Wide_Type (Typ) then
6381 return Is_Protected_Interface (Etype (Typ));
6383 return Protected_Present (Type_Definition (Parent (Typ)));
6385 end Is_Protected_Interface;
6387 ------------------------------
6388 -- Is_Protected_Record_Type --
6389 ------------------------------
6391 function Is_Protected_Record_Type (Id : E) return B is
6394 Is_Concurrent_Record_Type (Id)
6395 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
6396 end Is_Protected_Record_Type;
6398 --------------------------------
6399 -- Is_Standard_Character_Type --
6400 --------------------------------
6402 function Is_Standard_Character_Type (Id : E) return B is
6404 if Is_Type (Id) then
6406 R : constant Entity_Id := Root_Type (Id);
6409 R = Standard_Character
6411 R = Standard_Wide_Character
6413 R = Standard_Wide_Wide_Character;
6419 end Is_Standard_Character_Type;
6421 --------------------
6422 -- Is_String_Type --
6423 --------------------
6425 function Is_String_Type (Id : E) return B is
6427 return Ekind (Id) in String_Kind
6428 or else (Is_Array_Type (Id)
6429 and then Id /= Any_Composite
6430 and then Number_Dimensions (Id) = 1
6431 and then Is_Character_Type (Component_Type (Id)));
6434 -------------------------------
6435 -- Is_Synchronized_Interface --
6436 -------------------------------
6438 function Is_Synchronized_Interface (Id : E) return B is
6439 Typ : constant Entity_Id := Base_Type (Id);
6442 if not Is_Interface (Typ) then
6445 elsif Is_Class_Wide_Type (Typ) then
6446 return Is_Synchronized_Interface (Etype (Typ));
6449 return Protected_Present (Type_Definition (Parent (Typ)))
6450 or else Synchronized_Present (Type_Definition (Parent (Typ)))
6451 or else Task_Present (Type_Definition (Parent (Typ)));
6453 end Is_Synchronized_Interface;
6455 -----------------------
6456 -- Is_Task_Interface --
6457 -----------------------
6459 function Is_Task_Interface (Id : E) return B is
6460 Typ : constant Entity_Id := Base_Type (Id);
6462 if not Is_Interface (Typ) then
6464 elsif Is_Class_Wide_Type (Typ) then
6465 return Is_Task_Interface (Etype (Typ));
6467 return Task_Present (Type_Definition (Parent (Typ)));
6469 end Is_Task_Interface;
6471 -------------------------
6472 -- Is_Task_Record_Type --
6473 -------------------------
6475 function Is_Task_Record_Type (Id : E) return B is
6478 Is_Concurrent_Record_Type (Id)
6479 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
6480 end Is_Task_Record_Type;
6482 ------------------------
6483 -- Is_Wrapper_Package --
6484 ------------------------
6486 function Is_Wrapper_Package (Id : E) return B is
6488 return (Ekind (Id) = E_Package
6489 and then Present (Related_Instance (Id)));
6490 end Is_Wrapper_Package;
6496 function Last_Formal (Id : E) return E is
6501 (Is_Overloadable (Id)
6502 or else Ekind_In (Id, E_Entry_Family,
6504 E_Subprogram_Type));
6506 if Ekind (Id) = E_Enumeration_Literal then
6510 Formal := First_Formal (Id);
6512 if Present (Formal) then
6513 while Present (Next_Formal (Formal)) loop
6514 Formal := Next_Formal (Formal);
6522 function Model_Emin_Value (Id : E) return Uint is
6524 return Machine_Emin_Value (Id);
6525 end Model_Emin_Value;
6527 -------------------------
6528 -- Model_Epsilon_Value --
6529 -------------------------
6531 function Model_Epsilon_Value (Id : E) return Ureal is
6532 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6534 return Radix ** (1 - Model_Mantissa_Value (Id));
6535 end Model_Epsilon_Value;
6537 --------------------------
6538 -- Model_Mantissa_Value --
6539 --------------------------
6541 function Model_Mantissa_Value (Id : E) return Uint is
6543 return Machine_Mantissa_Value (Id);
6544 end Model_Mantissa_Value;
6546 -----------------------
6547 -- Model_Small_Value --
6548 -----------------------
6550 function Model_Small_Value (Id : E) return Ureal is
6551 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6553 return Radix ** (Model_Emin_Value (Id) - 1);
6554 end Model_Small_Value;
6556 ------------------------
6557 -- Machine_Emax_Value --
6558 ------------------------
6560 function Machine_Emax_Value (Id : E) return Uint is
6561 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
6564 case Float_Rep (Id) is
6567 when 1 .. 6 => return Uint_128;
6568 when 7 .. 15 => return 2**10;
6569 when 16 .. 33 => return 2**14;
6570 when others => return No_Uint;
6575 when 1 .. 9 => return 2**7 - 1;
6576 when 10 .. 15 => return 2**10 - 1;
6577 when others => return No_Uint;
6581 return Uint_2 ** Uint_7 - Uint_1;
6583 end Machine_Emax_Value;
6585 ------------------------
6586 -- Machine_Emin_Value --
6587 ------------------------
6589 function Machine_Emin_Value (Id : E) return Uint is
6591 case Float_Rep (Id) is
6592 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
6593 when VAX_Native => return -Machine_Emax_Value (Id);
6594 when AAMP => return -Machine_Emax_Value (Id);
6596 end Machine_Emin_Value;
6598 ----------------------------
6599 -- Machine_Mantissa_Value --
6600 ----------------------------
6602 function Machine_Mantissa_Value (Id : E) return Uint is
6603 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
6606 case Float_Rep (Id) is
6609 when 1 .. 6 => return Uint_24;
6610 when 7 .. 15 => return UI_From_Int (53);
6611 when 16 .. 18 => return Uint_64;
6612 when 19 .. 33 => return UI_From_Int (113);
6613 when others => return No_Uint;
6618 when 1 .. 6 => return Uint_24;
6619 when 7 .. 9 => return UI_From_Int (56);
6620 when 10 .. 15 => return UI_From_Int (53);
6621 when others => return No_Uint;
6626 when 1 .. 6 => return Uint_24;
6627 when 7 .. 9 => return UI_From_Int (40);
6628 when others => return No_Uint;
6631 end Machine_Mantissa_Value;
6633 -------------------------
6634 -- Machine_Radix_Value --
6635 -------------------------
6637 function Machine_Radix_Value (Id : E) return U is
6639 case Float_Rep (Id) is
6640 when IEEE_Binary | VAX_Native | AAMP =>
6643 end Machine_Radix_Value;
6645 --------------------
6646 -- Next_Component --
6647 --------------------
6649 function Next_Component (Id : E) return E is
6653 Comp_Id := Next_Entity (Id);
6654 while Present (Comp_Id) loop
6655 exit when Ekind (Comp_Id) = E_Component;
6656 Comp_Id := Next_Entity (Comp_Id);
6662 ------------------------------------
6663 -- Next_Component_Or_Discriminant --
6664 ------------------------------------
6666 function Next_Component_Or_Discriminant (Id : E) return E is
6670 Comp_Id := Next_Entity (Id);
6671 while Present (Comp_Id) loop
6672 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6673 Comp_Id := Next_Entity (Comp_Id);
6677 end Next_Component_Or_Discriminant;
6679 -----------------------
6680 -- Next_Discriminant --
6681 -----------------------
6683 -- This function actually implements both Next_Discriminant and
6684 -- Next_Stored_Discriminant by making sure that the Discriminant
6685 -- returned is of the same variety as Id.
6687 function Next_Discriminant (Id : E) return E is
6689 -- Derived Tagged types with private extensions look like this...
6691 -- E_Discriminant d1
6692 -- E_Discriminant d2
6694 -- E_Discriminant d1
6695 -- E_Discriminant d2
6698 -- so it is critical not to go past the leading discriminants
6703 pragma Assert (Ekind (Id) = E_Discriminant);
6706 D := Next_Entity (D);
6708 or else (Ekind (D) /= E_Discriminant
6709 and then not Is_Itype (D))
6714 exit when Ekind (D) = E_Discriminant
6715 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
6719 end Next_Discriminant;
6725 function Next_Formal (Id : E) return E is
6729 -- Follow the chain of declared entities as long as the kind of the
6730 -- entity corresponds to a formal parameter. Skip internal entities
6731 -- that may have been created for implicit subtypes, in the process
6732 -- of analyzing default expressions.
6736 P := Next_Entity (P);
6738 if No (P) or else Is_Formal (P) then
6740 elsif not Is_Internal (P) then
6746 -----------------------------
6747 -- Next_Formal_With_Extras --
6748 -----------------------------
6750 function Next_Formal_With_Extras (Id : E) return E is
6752 if Present (Extra_Formal (Id)) then
6753 return Extra_Formal (Id);
6755 return Next_Formal (Id);
6757 end Next_Formal_With_Extras;
6763 function Next_Index (Id : Node_Id) return Node_Id is
6772 function Next_Literal (Id : E) return E is
6774 pragma Assert (Nkind (Id) in N_Entity);
6778 ------------------------------
6779 -- Next_Stored_Discriminant --
6780 ------------------------------
6782 function Next_Stored_Discriminant (Id : E) return E is
6784 -- See comment in Next_Discriminant
6786 return Next_Discriminant (Id);
6787 end Next_Stored_Discriminant;
6789 -----------------------
6790 -- Number_Dimensions --
6791 -----------------------
6793 function Number_Dimensions (Id : E) return Pos is
6798 if Ekind (Id) in String_Kind then
6803 T := First_Index (Id);
6804 while Present (T) loop
6811 end Number_Dimensions;
6813 --------------------
6814 -- Number_Entries --
6815 --------------------
6817 function Number_Entries (Id : E) return Nat is
6822 pragma Assert (Is_Concurrent_Type (Id));
6825 Ent := First_Entity (Id);
6826 while Present (Ent) loop
6827 if Is_Entry (Ent) then
6831 Ent := Next_Entity (Ent);
6837 --------------------
6838 -- Number_Formals --
6839 --------------------
6841 function Number_Formals (Id : E) return Pos is
6847 Formal := First_Formal (Id);
6848 while Present (Formal) loop
6850 Formal := Next_Formal (Formal);
6856 --------------------
6857 -- Parameter_Mode --
6858 --------------------
6860 function Parameter_Mode (Id : E) return Formal_Kind is
6865 --------------------------
6866 -- Primitive_Operations --
6867 --------------------------
6869 function Primitive_Operations (Id : E) return L is
6871 if Is_Concurrent_Type (Id) then
6872 if Present (Corresponding_Record_Type (Id)) then
6873 return Direct_Primitive_Operations
6874 (Corresponding_Record_Type (Id));
6879 return Direct_Primitive_Operations (Id);
6881 end Primitive_Operations;
6883 ---------------------
6884 -- Record_Rep_Item --
6885 ---------------------
6887 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
6889 Set_Next_Rep_Item (N, First_Rep_Item (E));
6890 Set_First_Rep_Item (E, N);
6891 end Record_Rep_Item;
6897 function Root_Type (Id : E) return E is
6901 pragma Assert (Nkind (Id) in N_Entity);
6903 T := Base_Type (Id);
6905 if Ekind (T) = E_Class_Wide_Type then
6908 elsif Ekind (T) = E_Class_Wide_Subtype then
6909 return Etype (Base_Type (T));
6911 -- ??? T comes from Base_Type, how can it be a subtype?
6912 -- Also Base_Type is supposed to be idempotent, so either way
6913 -- this is equivalent to "return Etype (T)" and should be merged
6914 -- with the E_Class_Wide_Type case.
6925 -- Following test catches some error cases resulting from
6928 elsif No (Etyp) then
6931 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
6934 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
6940 -- Return if there is a circularity in the inheritance chain. This
6941 -- happens in some error situations and we do not want to get
6942 -- stuck in this loop.
6944 if T = Base_Type (Id) then
6951 ---------------------
6952 -- Safe_Emax_Value --
6953 ---------------------
6955 function Safe_Emax_Value (Id : E) return Uint is
6957 return Machine_Emax_Value (Id);
6958 end Safe_Emax_Value;
6960 ----------------------
6961 -- Safe_First_Value --
6962 ----------------------
6964 function Safe_First_Value (Id : E) return Ureal is
6966 return -Safe_Last_Value (Id);
6967 end Safe_First_Value;
6969 ---------------------
6970 -- Safe_Last_Value --
6971 ---------------------
6973 function Safe_Last_Value (Id : E) return Ureal is
6974 Radix : constant Uint := Machine_Radix_Value (Id);
6975 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
6976 Emax : constant Uint := Safe_Emax_Value (Id);
6977 Significand : constant Uint := Radix ** Mantissa - 1;
6978 Exponent : constant Uint := Emax - Mantissa;
6984 (Num => Significand * 2 ** (Exponent mod 4),
6985 Den => -Exponent / 4,
6991 (Num => Significand,
6995 end Safe_Last_Value;
7001 function Scope_Depth (Id : E) return Uint is
7006 while Is_Record_Type (Scop) loop
7007 Scop := Scope (Scop);
7010 return Scope_Depth_Value (Scop);
7013 ---------------------
7014 -- Scope_Depth_Set --
7015 ---------------------
7017 function Scope_Depth_Set (Id : E) return B is
7019 return not Is_Record_Type (Id)
7020 and then Field22 (Id) /= Union_Id (Empty);
7021 end Scope_Depth_Set;
7023 -----------------------------
7024 -- Set_Component_Alignment --
7025 -----------------------------
7027 -- Component Alignment is encoded using two flags, Flag128/129 as
7028 -- follows. Note that both flags False = Align_Default, so that the
7029 -- default initialization of flags to False initializes component
7030 -- alignment to the default value as required.
7032 -- Flag128 Flag129 Value
7033 -- ------- ------- -----
7034 -- False False Calign_Default
7035 -- False True Calign_Component_Size
7036 -- True False Calign_Component_Size_4
7037 -- True True Calign_Storage_Unit
7039 procedure Set_Component_Alignment (Id : E; V : C) is
7041 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
7042 and then Is_Base_Type (Id));
7045 when Calign_Default =>
7046 Set_Flag128 (Id, False);
7047 Set_Flag129 (Id, False);
7049 when Calign_Component_Size =>
7050 Set_Flag128 (Id, False);
7051 Set_Flag129 (Id, True);
7053 when Calign_Component_Size_4 =>
7054 Set_Flag128 (Id, True);
7055 Set_Flag129 (Id, False);
7057 when Calign_Storage_Unit =>
7058 Set_Flag128 (Id, True);
7059 Set_Flag129 (Id, True);
7061 end Set_Component_Alignment;
7063 -----------------------------
7064 -- Set_Invariant_Procedure --
7065 -----------------------------
7067 procedure Set_Invariant_Procedure (Id : E; V : E) is
7071 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7073 S := Subprograms_For_Type (Id);
7074 Set_Subprograms_For_Type (Id, V);
7076 while Present (S) loop
7077 if Has_Invariants (S) then
7078 raise Program_Error;
7080 S := Subprograms_For_Type (S);
7084 Set_Subprograms_For_Type (Id, V);
7085 end Set_Invariant_Procedure;
7087 ----------------------------
7088 -- Set_Predicate_Function --
7089 ----------------------------
7091 procedure Set_Predicate_Function (Id : E; V : E) is
7095 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7097 S := Subprograms_For_Type (Id);
7098 Set_Subprograms_For_Type (Id, V);
7100 while Present (S) loop
7101 if Has_Predicates (S) then
7102 raise Program_Error;
7104 S := Subprograms_For_Type (S);
7108 Set_Subprograms_For_Type (Id, V);
7109 end Set_Predicate_Function;
7115 function Size_Clause (Id : E) return N is
7117 return Rep_Clause (Id, Name_Size);
7120 ------------------------
7121 -- Stream_Size_Clause --
7122 ------------------------
7124 function Stream_Size_Clause (Id : E) return N is
7126 return Rep_Clause (Id, Name_Stream_Size);
7127 end Stream_Size_Clause;
7133 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
7139 Kind := E_Access_Subtype;
7143 Kind := E_Array_Subtype;
7145 when E_Class_Wide_Type |
7146 E_Class_Wide_Subtype =>
7147 Kind := E_Class_Wide_Subtype;
7149 when E_Decimal_Fixed_Point_Type |
7150 E_Decimal_Fixed_Point_Subtype =>
7151 Kind := E_Decimal_Fixed_Point_Subtype;
7153 when E_Ordinary_Fixed_Point_Type |
7154 E_Ordinary_Fixed_Point_Subtype =>
7155 Kind := E_Ordinary_Fixed_Point_Subtype;
7157 when E_Private_Type |
7158 E_Private_Subtype =>
7159 Kind := E_Private_Subtype;
7161 when E_Limited_Private_Type |
7162 E_Limited_Private_Subtype =>
7163 Kind := E_Limited_Private_Subtype;
7165 when E_Record_Type_With_Private |
7166 E_Record_Subtype_With_Private =>
7167 Kind := E_Record_Subtype_With_Private;
7169 when E_Record_Type |
7171 Kind := E_Record_Subtype;
7173 when E_String_Type |
7175 Kind := E_String_Subtype;
7177 when Enumeration_Kind =>
7178 Kind := E_Enumeration_Subtype;
7181 Kind := E_Floating_Point_Subtype;
7183 when Signed_Integer_Kind =>
7184 Kind := E_Signed_Integer_Subtype;
7186 when Modular_Integer_Kind =>
7187 Kind := E_Modular_Integer_Subtype;
7189 when Protected_Kind =>
7190 Kind := E_Protected_Subtype;
7193 Kind := E_Task_Subtype;
7197 raise Program_Error;
7203 ---------------------
7204 -- Type_High_Bound --
7205 ---------------------
7207 function Type_High_Bound (Id : E) return Node_Id is
7208 Rng : constant Node_Id := Scalar_Range (Id);
7210 if Nkind (Rng) = N_Subtype_Indication then
7211 return High_Bound (Range_Expression (Constraint (Rng)));
7213 return High_Bound (Rng);
7215 end Type_High_Bound;
7217 --------------------
7218 -- Type_Low_Bound --
7219 --------------------
7221 function Type_Low_Bound (Id : E) return Node_Id is
7222 Rng : constant Node_Id := Scalar_Range (Id);
7224 if Nkind (Rng) = N_Subtype_Indication then
7225 return Low_Bound (Range_Expression (Constraint (Rng)));
7227 return Low_Bound (Rng);
7231 ---------------------
7232 -- Underlying_Type --
7233 ---------------------
7235 function Underlying_Type (Id : E) return E is
7237 -- For record_with_private the underlying type is always the direct
7238 -- full view. Never try to take the full view of the parent it
7239 -- doesn't make sense.
7241 if Ekind (Id) = E_Record_Type_With_Private then
7242 return Full_View (Id);
7244 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
7246 -- If we have an incomplete or private type with a full view,
7247 -- then we return the Underlying_Type of this full view
7249 if Present (Full_View (Id)) then
7250 if Id = Full_View (Id) then
7252 -- Previous error in declaration
7257 return Underlying_Type (Full_View (Id));
7260 -- If we have an incomplete entity that comes from the limited
7261 -- view then we return the Underlying_Type of its non-limited
7264 elsif From_With_Type (Id)
7265 and then Present (Non_Limited_View (Id))
7267 return Underlying_Type (Non_Limited_View (Id));
7269 -- Otherwise check for the case where we have a derived type or
7270 -- subtype, and if so get the Underlying_Type of the parent type.
7272 elsif Etype (Id) /= Id then
7273 return Underlying_Type (Etype (Id));
7275 -- Otherwise we have an incomplete or private type that has
7276 -- no full view, which means that we have not encountered the
7277 -- completion, so return Empty to indicate the underlying type
7278 -- is not yet known.
7284 -- For non-incomplete, non-private types, return the type itself
7285 -- Also for entities that are not types at all return the entity
7291 end Underlying_Type;
7297 function Vax_Float (Id : E) return B is
7299 return Is_Floating_Point_Type (Id) and then Float_Rep (Id) = VAX_Native;
7302 ------------------------
7303 -- Write_Entity_Flags --
7304 ------------------------
7306 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
7308 procedure W (Flag_Name : String; Flag : Boolean);
7309 -- Write out given flag if it is set
7315 procedure W (Flag_Name : String; Flag : Boolean) is
7319 Write_Str (Flag_Name);
7320 Write_Str (" = True");
7325 -- Start of processing for Write_Entity_Flags
7328 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
7329 and then Is_Base_Type (Id)
7332 Write_Str ("Component_Alignment = ");
7334 case Component_Alignment (Id) is
7335 when Calign_Default =>
7336 Write_Str ("Calign_Default");
7338 when Calign_Component_Size =>
7339 Write_Str ("Calign_Component_Size");
7341 when Calign_Component_Size_4 =>
7342 Write_Str ("Calign_Component_Size_4");
7344 when Calign_Storage_Unit =>
7345 Write_Str ("Calign_Storage_Unit");
7351 W ("Address_Taken", Flag104 (Id));
7352 W ("Body_Needed_For_SAL", Flag40 (Id));
7353 W ("C_Pass_By_Copy", Flag125 (Id));
7354 W ("Can_Never_Be_Null", Flag38 (Id));
7355 W ("Checks_May_Be_Suppressed", Flag31 (Id));
7356 W ("Debug_Info_Off", Flag166 (Id));
7357 W ("Default_Expressions_Processed", Flag108 (Id));
7358 W ("Delay_Cleanups", Flag114 (Id));
7359 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
7360 W ("Depends_On_Private", Flag14 (Id));
7361 W ("Discard_Names", Flag88 (Id));
7362 W ("Elaboration_Entity_Required", Flag174 (Id));
7363 W ("Elaborate_Body_Desirable", Flag210 (Id));
7364 W ("Entry_Accepted", Flag152 (Id));
7365 W ("Can_Use_Internal_Rep", Flag229 (Id));
7366 W ("Finalize_Storage_Only", Flag158 (Id));
7367 W ("From_With_Type", Flag159 (Id));
7368 W ("Has_Aliased_Components", Flag135 (Id));
7369 W ("Has_Alignment_Clause", Flag46 (Id));
7370 W ("Has_All_Calls_Remote", Flag79 (Id));
7371 W ("Has_Anon_Block_Suffix", Flag201 (Id));
7372 W ("Has_Atomic_Components", Flag86 (Id));
7373 W ("Has_Biased_Representation", Flag139 (Id));
7374 W ("Has_Completion", Flag26 (Id));
7375 W ("Has_Completion_In_Body", Flag71 (Id));
7376 W ("Has_Complex_Representation", Flag140 (Id));
7377 W ("Has_Component_Size_Clause", Flag68 (Id));
7378 W ("Has_Contiguous_Rep", Flag181 (Id));
7379 W ("Has_Controlled_Component", Flag43 (Id));
7380 W ("Has_Controlling_Result", Flag98 (Id));
7381 W ("Has_Convention_Pragma", Flag119 (Id));
7382 W ("Has_Default_Component_Value", Flag151 (Id));
7383 W ("Has_Default_Value", Flag39 (Id));
7384 W ("Has_Delayed_Aspects", Flag200 (Id));
7385 W ("Has_Delayed_Freeze", Flag18 (Id));
7386 W ("Has_Discriminants", Flag5 (Id));
7387 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
7388 W ("Has_Exit", Flag47 (Id));
7389 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
7390 W ("Has_Forward_Instantiation", Flag175 (Id));
7391 W ("Has_Fully_Qualified_Name", Flag173 (Id));
7392 W ("Has_Gigi_Rep_Item", Flag82 (Id));
7393 W ("Has_Homonym", Flag56 (Id));
7394 W ("Has_Inheritable_Invariants", Flag248 (Id));
7395 W ("Has_Initial_Value", Flag219 (Id));
7396 W ("Has_Invariants", Flag232 (Id));
7397 W ("Has_Machine_Radix_Clause", Flag83 (Id));
7398 W ("Has_Master_Entity", Flag21 (Id));
7399 W ("Has_Missing_Return", Flag142 (Id));
7400 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
7401 W ("Has_Non_Standard_Rep", Flag75 (Id));
7402 W ("Has_Object_Size_Clause", Flag172 (Id));
7403 W ("Has_Per_Object_Constraint", Flag154 (Id));
7404 W ("Has_Persistent_BSS", Flag188 (Id));
7405 W ("Has_Postconditions", Flag240 (Id));
7406 W ("Has_Pragma_Controlled", Flag27 (Id));
7407 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
7408 W ("Has_Pragma_Inline", Flag157 (Id));
7409 W ("Has_Pragma_Inline_Always", Flag230 (Id));
7410 W ("Has_Pragma_Ordered", Flag198 (Id));
7411 W ("Has_Pragma_Pack", Flag121 (Id));
7412 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
7413 W ("Has_Pragma_Pure", Flag203 (Id));
7414 W ("Has_Pragma_Pure_Function", Flag179 (Id));
7415 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
7416 W ("Has_Pragma_Unmodified", Flag233 (Id));
7417 W ("Has_Pragma_Unreferenced", Flag180 (Id));
7418 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
7419 W ("Has_Predicates", Flag250 (Id));
7420 W ("Has_Primitive_Operations", Flag120 (Id));
7421 W ("Has_Private_Declaration", Flag155 (Id));
7422 W ("Has_Qualified_Name", Flag161 (Id));
7423 W ("Has_RACW", Flag214 (Id));
7424 W ("Has_Record_Rep_Clause", Flag65 (Id));
7425 W ("Has_Recursive_Call", Flag143 (Id));
7426 W ("Has_Size_Clause", Flag29 (Id));
7427 W ("Has_Small_Clause", Flag67 (Id));
7428 W ("Has_Specified_Layout", Flag100 (Id));
7429 W ("Has_Specified_Stream_Input", Flag190 (Id));
7430 W ("Has_Specified_Stream_Output", Flag191 (Id));
7431 W ("Has_Specified_Stream_Read", Flag192 (Id));
7432 W ("Has_Specified_Stream_Write", Flag193 (Id));
7433 W ("Has_Static_Discriminants", Flag211 (Id));
7434 W ("Has_Storage_Size_Clause", Flag23 (Id));
7435 W ("Has_Stream_Size_Clause", Flag184 (Id));
7436 W ("Has_Subprogram_Descriptor", Flag93 (Id));
7437 W ("Has_Task", Flag30 (Id));
7438 W ("Has_Thunks", Flag228 (Id));
7439 W ("Has_Unchecked_Union", Flag123 (Id));
7440 W ("Has_Unknown_Discriminants", Flag72 (Id));
7441 W ("Has_Up_Level_Access", Flag215 (Id));
7442 W ("Has_Volatile_Components", Flag87 (Id));
7443 W ("Has_Xref_Entry", Flag182 (Id));
7444 W ("In_Package_Body", Flag48 (Id));
7445 W ("In_Private_Part", Flag45 (Id));
7446 W ("In_Use", Flag8 (Id));
7447 W ("Is_AST_Entry", Flag132 (Id));
7448 W ("Is_Abstract_Subprogram", Flag19 (Id));
7449 W ("Is_Abstract_Type", Flag146 (Id));
7450 W ("Is_Local_Anonymous_Access", Flag194 (Id));
7451 W ("Is_Access_Constant", Flag69 (Id));
7452 W ("Is_Ada_2005_Only", Flag185 (Id));
7453 W ("Is_Ada_2012_Only", Flag199 (Id));
7454 W ("Is_Aliased", Flag15 (Id));
7455 W ("Is_Asynchronous", Flag81 (Id));
7456 W ("Is_Atomic", Flag85 (Id));
7457 W ("Is_Bit_Packed_Array", Flag122 (Id));
7458 W ("Is_CPP_Class", Flag74 (Id));
7459 W ("Is_Called", Flag102 (Id));
7460 W ("Is_Character_Type", Flag63 (Id));
7461 W ("Is_Child_Unit", Flag73 (Id));
7462 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
7463 W ("Is_Compilation_Unit", Flag149 (Id));
7464 W ("Is_Completely_Hidden", Flag103 (Id));
7465 W ("Is_Concurrent_Record_Type", Flag20 (Id));
7466 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
7467 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
7468 W ("Is_Constrained", Flag12 (Id));
7469 W ("Is_Constructor", Flag76 (Id));
7470 W ("Is_Controlled", Flag42 (Id));
7471 W ("Is_Controlling_Formal", Flag97 (Id));
7472 W ("Is_Descendent_Of_Address", Flag223 (Id));
7473 W ("Is_Discrim_SO_Function", Flag176 (Id));
7474 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
7475 W ("Is_Dispatching_Operation", Flag6 (Id));
7476 W ("Is_Eliminated", Flag124 (Id));
7477 W ("Is_Entry_Formal", Flag52 (Id));
7478 W ("Is_Exported", Flag99 (Id));
7479 W ("Is_First_Subtype", Flag70 (Id));
7480 W ("Is_For_Access_Subtype", Flag118 (Id));
7481 W ("Is_Formal_Subprogram", Flag111 (Id));
7482 W ("Is_Frozen", Flag4 (Id));
7483 W ("Is_Generic_Actual_Type", Flag94 (Id));
7484 W ("Is_Generic_Instance", Flag130 (Id));
7485 W ("Is_Generic_Type", Flag13 (Id));
7486 W ("Is_Hidden", Flag57 (Id));
7487 W ("Is_Hidden_Open_Scope", Flag171 (Id));
7488 W ("Is_Immediately_Visible", Flag7 (Id));
7489 W ("Is_Imported", Flag24 (Id));
7490 W ("Is_Inlined", Flag11 (Id));
7491 W ("Is_Instantiated", Flag126 (Id));
7492 W ("Is_Interface", Flag186 (Id));
7493 W ("Is_Internal", Flag17 (Id));
7494 W ("Is_Interrupt_Handler", Flag89 (Id));
7495 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
7496 W ("Is_Itype", Flag91 (Id));
7497 W ("Is_Known_Non_Null", Flag37 (Id));
7498 W ("Is_Known_Null", Flag204 (Id));
7499 W ("Is_Known_Valid", Flag170 (Id));
7500 W ("Is_Limited_Composite", Flag106 (Id));
7501 W ("Is_Limited_Interface", Flag197 (Id));
7502 W ("Is_Limited_Record", Flag25 (Id));
7503 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
7504 W ("Is_Non_Static_Subtype", Flag109 (Id));
7505 W ("Is_Null_Init_Proc", Flag178 (Id));
7506 W ("Is_Obsolescent", Flag153 (Id));
7507 W ("Is_Only_Out_Parameter", Flag226 (Id));
7508 W ("Is_Optional_Parameter", Flag134 (Id));
7509 W ("Is_Package_Body_Entity", Flag160 (Id));
7510 W ("Is_Packed", Flag51 (Id));
7511 W ("Is_Packed_Array_Type", Flag138 (Id));
7512 W ("Is_Potentially_Use_Visible", Flag9 (Id));
7513 W ("Is_Preelaborated", Flag59 (Id));
7514 W ("Is_Primitive", Flag218 (Id));
7515 W ("Is_Primitive_Wrapper", Flag195 (Id));
7516 W ("Is_Private_Composite", Flag107 (Id));
7517 W ("Is_Private_Descendant", Flag53 (Id));
7518 W ("Is_Private_Primitive", Flag245 (Id));
7519 W ("Is_Public", Flag10 (Id));
7520 W ("Is_Pure", Flag44 (Id));
7521 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
7522 W ("Is_RACW_Stub_Type", Flag244 (Id));
7523 W ("Is_Raised", Flag224 (Id));
7524 W ("Is_Remote_Call_Interface", Flag62 (Id));
7525 W ("Is_Remote_Types", Flag61 (Id));
7526 W ("Is_Renaming_Of_Object", Flag112 (Id));
7527 W ("Is_Return_Object", Flag209 (Id));
7528 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
7529 W ("Is_Shared_Passive", Flag60 (Id));
7530 W ("Is_Statically_Allocated", Flag28 (Id));
7531 W ("Is_Tag", Flag78 (Id));
7532 W ("Is_Tagged_Type", Flag55 (Id));
7533 W ("Is_Thunk", Flag225 (Id));
7534 W ("Is_Trivial_Subprogram", Flag235 (Id));
7535 W ("Is_True_Constant", Flag163 (Id));
7536 W ("Is_Unchecked_Union", Flag117 (Id));
7537 W ("Is_Underlying_Record_View", Flag246 (Id));
7538 W ("Is_Unsigned_Type", Flag144 (Id));
7539 W ("Is_VMS_Exception", Flag133 (Id));
7540 W ("Is_Valued_Procedure", Flag127 (Id));
7541 W ("Is_Visible_Child_Unit", Flag116 (Id));
7542 W ("Is_Visible_Formal", Flag206 (Id));
7543 W ("Is_Volatile", Flag16 (Id));
7544 W ("Itype_Printed", Flag202 (Id));
7545 W ("Kill_Elaboration_Checks", Flag32 (Id));
7546 W ("Kill_Range_Checks", Flag33 (Id));
7547 W ("Kill_Tag_Checks", Flag34 (Id));
7548 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
7549 W ("Low_Bound_Tested", Flag205 (Id));
7550 W ("Machine_Radix_10", Flag84 (Id));
7551 W ("Materialize_Entity", Flag168 (Id));
7552 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
7553 W ("Must_Have_Preelab_Init", Flag208 (Id));
7554 W ("Needs_Debug_Info", Flag147 (Id));
7555 W ("Needs_No_Actuals", Flag22 (Id));
7556 W ("Never_Set_In_Source", Flag115 (Id));
7557 W ("No_Pool_Assigned", Flag131 (Id));
7558 W ("No_Return", Flag113 (Id));
7559 W ("No_Strict_Aliasing", Flag136 (Id));
7560 W ("Non_Binary_Modulus", Flag58 (Id));
7561 W ("Nonzero_Is_True", Flag162 (Id));
7562 W ("OK_To_Rename", Flag247 (Id));
7563 W ("OK_To_Reorder_Components", Flag239 (Id));
7564 W ("Optimize_Alignment_Space", Flag241 (Id));
7565 W ("Optimize_Alignment_Time", Flag242 (Id));
7566 W ("Overlays_Constant", Flag243 (Id));
7567 W ("Reachable", Flag49 (Id));
7568 W ("Referenced", Flag156 (Id));
7569 W ("Referenced_As_LHS", Flag36 (Id));
7570 W ("Referenced_As_Out_Parameter", Flag227 (Id));
7571 W ("Renamed_In_Spec", Flag231 (Id));
7572 W ("Requires_Overriding", Flag213 (Id));
7573 W ("Return_Present", Flag54 (Id));
7574 W ("Returns_By_Ref", Flag90 (Id));
7575 W ("Reverse_Bit_Order", Flag164 (Id));
7576 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
7577 W ("Size_Depends_On_Discriminant", Flag177 (Id));
7578 W ("Size_Known_At_Compile_Time", Flag92 (Id));
7579 W ("Static_Elaboration_Desired", Flag77 (Id));
7580 W ("Strict_Alignment", Flag145 (Id));
7581 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
7582 W ("Suppress_Init_Proc", Flag105 (Id));
7583 W ("Suppress_Style_Checks", Flag165 (Id));
7584 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
7585 W ("Treat_As_Volatile", Flag41 (Id));
7586 W ("Universal_Aliasing", Flag216 (Id));
7587 W ("Used_As_Generic_Actual", Flag222 (Id));
7588 W ("Uses_Sec_Stack", Flag95 (Id));
7589 W ("Warnings_Off", Flag96 (Id));
7590 W ("Warnings_Off_Used", Flag236 (Id));
7591 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
7592 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
7593 W ("Was_Hidden", Flag196 (Id));
7594 end Write_Entity_Flags;
7596 -----------------------
7597 -- Write_Entity_Info --
7598 -----------------------
7600 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
7602 procedure Write_Attribute (Which : String; Nam : E);
7603 -- Write attribute value with given string name
7605 procedure Write_Kind (Id : Entity_Id);
7606 -- Write Ekind field of entity
7608 ---------------------
7609 -- Write_Attribute --
7610 ---------------------
7612 procedure Write_Attribute (Which : String; Nam : E) is
7616 Write_Int (Int (Nam));
7618 Write_Name (Chars (Nam));
7620 end Write_Attribute;
7626 procedure Write_Kind (Id : Entity_Id) is
7627 K : constant String := Entity_Kind'Image (Ekind (Id));
7631 Write_Str (" Kind ");
7633 if Is_Type (Id) and then Is_Tagged_Type (Id) then
7634 Write_Str ("TAGGED ");
7637 Write_Str (K (3 .. K'Length));
7640 if Is_Type (Id) and then Depends_On_Private (Id) then
7641 Write_Str ("Depends_On_Private ");
7645 -- Start of processing for Write_Entity_Info
7649 Write_Attribute ("Name ", Id);
7650 Write_Int (Int (Id));
7654 Write_Attribute (" Type ", Etype (Id));
7656 Write_Attribute (" Scope ", Scope (Id));
7661 when Discrete_Kind =>
7662 Write_Str ("Bounds: Id = ");
7664 if Present (Scalar_Range (Id)) then
7665 Write_Int (Int (Type_Low_Bound (Id)));
7666 Write_Str (" .. Id = ");
7667 Write_Int (Int (Type_High_Bound (Id)));
7669 Write_Str ("Empty");
7680 (" Component Type ", Component_Type (Id));
7683 Write_Str (" Indexes ");
7685 Index := First_Index (Id);
7686 while Present (Index) loop
7687 Write_Attribute (" ", Etype (Index));
7688 Index := Next_Index (Index);
7696 (" Directly Designated Type ",
7697 Directly_Designated_Type (Id));
7700 when Overloadable_Kind =>
7701 if Present (Homonym (Id)) then
7702 Write_Str (" Homonym ");
7703 Write_Name (Chars (Homonym (Id)));
7705 Write_Int (Int (Homonym (Id)));
7712 if Ekind (Scope (Id)) in Record_Kind then
7714 " Original_Record_Component ",
7715 Original_Record_Component (Id));
7716 Write_Int (Int (Original_Record_Component (Id)));
7720 when others => null;
7722 end Write_Entity_Info;
7724 -----------------------
7725 -- Write_Field6_Name --
7726 -----------------------
7728 procedure Write_Field6_Name (Id : Entity_Id) is
7729 pragma Warnings (Off, Id);
7731 Write_Str ("First_Rep_Item");
7732 end Write_Field6_Name;
7734 -----------------------
7735 -- Write_Field7_Name --
7736 -----------------------
7738 procedure Write_Field7_Name (Id : Entity_Id) is
7739 pragma Warnings (Off, Id);
7741 Write_Str ("Freeze_Node");
7742 end Write_Field7_Name;
7744 -----------------------
7745 -- Write_Field8_Name --
7746 -----------------------
7748 procedure Write_Field8_Name (Id : Entity_Id) is
7753 Write_Str ("Normalized_First_Bit");
7757 E_Subprogram_Body =>
7758 Write_Str ("Mechanism");
7761 Write_Str ("Associated_Node_For_Itype");
7764 Write_Str ("First_Exit_Statement");
7767 Write_Str ("Dependent_Instances");
7770 Write_Str ("Postcondition_Proc");
7772 when E_Return_Statement =>
7773 Write_Str ("Return_Applies_To");
7776 Write_Str ("Hiding_Loop_Variable");
7779 Write_Str ("Field8??");
7781 end Write_Field8_Name;
7783 -----------------------
7784 -- Write_Field9_Name --
7785 -----------------------
7787 procedure Write_Field9_Name (Id : Entity_Id) is
7791 Write_Str ("Class_Wide_Type");
7794 E_Generic_Function |
7796 E_Generic_Procedure |
7799 Write_Str ("Renaming_Map");
7802 Write_Str ("Current_Value");
7805 Write_Str ("Field9??");
7807 end Write_Field9_Name;
7809 ------------------------
7810 -- Write_Field10_Name --
7811 ------------------------
7813 procedure Write_Field10_Name (Id : Entity_Id) is
7816 when Class_Wide_Kind |
7822 Write_Str ("Direct_Primitive_Operations");
7825 Write_Str ("Float_Rep");
7827 when E_In_Parameter |
7829 Write_Str ("Discriminal_Link");
7835 Write_Str ("Handler_Records");
7839 Write_Str ("Normalized_Position_Max");
7842 Write_Str ("Field10??");
7844 end Write_Field10_Name;
7846 ------------------------
7847 -- Write_Field11_Name --
7848 ------------------------
7850 procedure Write_Field11_Name (Id : Entity_Id) is
7854 Write_Str ("Entry_Component");
7858 Write_Str ("Component_Bit_Offset");
7861 Write_Str ("Full_View");
7863 when E_Enumeration_Literal =>
7864 Write_Str ("Enumeration_Pos");
7867 Write_Str ("Block_Node");
7873 Write_Str ("Protected_Body_Subprogram");
7875 when E_Generic_Package =>
7876 Write_Str ("Generic_Homonym");
7879 Write_Str ("Full_View");
7882 Write_Str ("Field11??");
7884 end Write_Field11_Name;
7886 ------------------------
7887 -- Write_Field12_Name --
7888 ------------------------
7890 procedure Write_Field12_Name (Id : Entity_Id) is
7894 Write_Str ("Barrier_Function");
7896 when E_Enumeration_Literal =>
7897 Write_Str ("Enumeration_Rep");
7905 E_In_Out_Parameter |
7909 Write_Str ("Esize");
7913 Write_Str ("Next_Inlined_Subprogram");
7916 Write_Str ("Associated_Formal_Package");
7919 Write_Str ("Field12??");
7921 end Write_Field12_Name;
7923 ------------------------
7924 -- Write_Field13_Name --
7925 ------------------------
7927 procedure Write_Field13_Name (Id : Entity_Id) is
7931 Write_Str ("RM_Size");
7935 Write_Str ("Component_Clause");
7938 if not Comes_From_Source (Id)
7940 Chars (Id) = Name_Op_Ne
7942 Write_Str ("Corresponding_Equality");
7944 elsif Comes_From_Source (Id) then
7945 Write_Str ("Elaboration_Entity");
7948 Write_Str ("Field13??");
7953 Write_Str ("Extra_Accessibility");
7957 Generic_Unit_Kind =>
7958 Write_Str ("Elaboration_Entity");
7961 Write_Str ("Field13??");
7963 end Write_Field13_Name;
7965 -----------------------
7966 -- Write_Field14_Name --
7967 -----------------------
7969 procedure Write_Field14_Name (Id : Entity_Id) is
7978 Write_Str ("Alignment");
7982 Write_Str ("Normalized_Position");
7986 Write_Str ("First_Optional_Parameter");
7989 E_Generic_Package =>
7990 Write_Str ("Shadow_Entities");
7993 Write_Str ("Field14??");
7995 end Write_Field14_Name;
7997 ------------------------
7998 -- Write_Field15_Name --
7999 ------------------------
8001 procedure Write_Field15_Name (Id : Entity_Id) is
8006 Write_Str ("Storage_Size_Variable");
8009 Write_Str ("DT_Entry_Count");
8011 when Decimal_Fixed_Point_Kind =>
8012 Write_Str ("Scale_Value");
8014 when E_Discriminant =>
8015 Write_Str ("Discriminant_Number");
8018 Write_Str ("Extra_Formal");
8022 Write_Str ("DT_Position");
8025 Write_Str ("Entry_Parameters_Type");
8027 when Enumeration_Kind =>
8028 Write_Str ("Lit_Indexes");
8032 Write_Str ("Related_Instance");
8034 when E_Protected_Type =>
8035 Write_Str ("Entry_Bodies_Array");
8037 when E_String_Literal_Subtype =>
8038 Write_Str ("String_Literal_Low_Bound");
8041 Write_Str ("Field15??");
8043 end Write_Field15_Name;
8045 ------------------------
8046 -- Write_Field16_Name --
8047 ------------------------
8049 procedure Write_Field16_Name (Id : Entity_Id) is
8053 Write_Str ("Entry_Formal");
8057 Write_Str ("DTC_Entity");
8062 Write_Str ("First_Private_Entity");
8064 when E_Record_Type |
8065 E_Record_Type_With_Private =>
8066 Write_Str ("Access_Disp_Table");
8068 when E_String_Literal_Subtype =>
8069 Write_Str ("String_Literal_Length");
8071 when Enumeration_Kind =>
8072 Write_Str ("Lit_Strings");
8076 Write_Str ("Unset_Reference");
8078 when E_Record_Subtype |
8079 E_Class_Wide_Subtype =>
8080 Write_Str ("Cloned_Subtype");
8083 Write_Str ("Field16??");
8085 end Write_Field16_Name;
8087 ------------------------
8088 -- Write_Field17_Name --
8089 ------------------------
8091 procedure Write_Field17_Name (Id : Entity_Id) is
8095 Write_Str ("Digits_Value");
8098 Write_Str ("Prival");
8100 when E_Discriminant =>
8101 Write_Str ("Discriminal");
8110 E_Generic_Function |
8112 E_Generic_Procedure |
8120 E_Return_Statement |
8122 E_Subprogram_Type =>
8123 Write_Str ("First_Entity");
8126 Write_Str ("First_Index");
8128 when Enumeration_Kind =>
8129 Write_Str ("First_Literal");
8132 Write_Str ("Master_Id");
8134 when Modular_Integer_Kind =>
8135 Write_Str ("Modulus");
8139 E_Generic_In_Out_Parameter |
8141 Write_Str ("Actual_Subtype");
8143 when E_Incomplete_Type =>
8144 Write_Str ("Non_Limited_View");
8146 when E_Incomplete_Subtype =>
8147 if From_With_Type (Id) then
8148 Write_Str ("Non_Limited_View");
8152 Write_Str ("Field17??");
8154 end Write_Field17_Name;
8156 ------------------------
8157 -- Write_Field18_Name --
8158 ------------------------
8160 procedure Write_Field18_Name (Id : Entity_Id) is
8163 when E_Enumeration_Literal |
8167 Write_Str ("Alias");
8169 when E_Record_Type =>
8170 Write_Str ("Corresponding_Concurrent_Type");
8172 when E_Subprogram_Body =>
8173 Write_Str ("Corresponding_Protected_Entry");
8175 when E_Entry_Index_Parameter =>
8176 Write_Str ("Entry_Index_Constant");
8178 when E_Class_Wide_Subtype |
8179 E_Access_Protected_Subprogram_Type |
8180 E_Anonymous_Access_Protected_Subprogram_Type |
8181 E_Access_Subprogram_Type |
8183 Write_Str ("Equivalent_Type");
8185 when Fixed_Point_Kind =>
8186 Write_Str ("Delta_Value");
8189 Write_Str ("Renamed_Object");
8193 E_Generic_Function |
8194 E_Generic_Procedure |
8195 E_Generic_Package =>
8196 Write_Str ("Renamed_Entity");
8198 when Incomplete_Or_Private_Kind |
8200 Write_Str ("Private_Dependents");
8202 when Concurrent_Kind =>
8203 Write_Str ("Corresponding_Record_Type");
8208 Write_Str ("Enclosing_Scope");
8211 Write_Str ("Field18??");
8213 end Write_Field18_Name;
8215 -----------------------
8216 -- Write_Field19_Name --
8217 -----------------------
8219 procedure Write_Field19_Name (Id : Entity_Id) is
8224 Write_Str ("Related_Array_Object");
8230 E_Return_Statement |
8232 Write_Str ("Finalization_Chain_Entity");
8234 when E_Constant | E_Variable =>
8235 Write_Str ("Size_Check_Code");
8237 when E_Discriminant =>
8238 Write_Str ("Corresponding_Discriminant");
8241 E_Generic_Package =>
8242 Write_Str ("Body_Entity");
8244 when E_Package_Body |
8246 Write_Str ("Spec_Entity");
8248 when Private_Kind =>
8249 Write_Str ("Underlying_Full_View");
8251 when E_Record_Type =>
8252 Write_Str ("Parent_Subtype");
8255 Write_Str ("Field19??");
8257 end Write_Field19_Name;
8259 -----------------------
8260 -- Write_Field20_Name --
8261 -----------------------
8263 procedure Write_Field20_Name (Id : Entity_Id) is
8267 Write_Str ("Component_Type");
8269 when E_In_Parameter |
8270 E_Generic_In_Parameter =>
8271 Write_Str ("Default_Value");
8274 Write_Str ("Directly_Designated_Type");
8277 Write_Str ("Discriminant_Checking_Func");
8281 Write_Str ("Prival_Link");
8283 when E_Discriminant =>
8284 Write_Str ("Discriminant_Default_Value");
8293 E_Generic_Function |
8295 E_Generic_Procedure |
8303 E_Return_Statement |
8305 E_Subprogram_Type =>
8306 Write_Str ("Last_Entity");
8309 Write_Str ("Scalar_Range");
8312 Write_Str ("Register_Exception_Call");
8315 Write_Str ("Field20??");
8317 end Write_Field20_Name;
8319 -----------------------
8320 -- Write_Field21_Name --
8321 -----------------------
8323 procedure Write_Field21_Name (Id : Entity_Id) is
8329 E_Generic_Function |
8331 E_Generic_Procedure |
8333 Write_Str ("Interface_Name");
8335 when Concurrent_Kind |
8336 Incomplete_Or_Private_Kind |
8340 Write_Str ("Discriminant_Constraint");
8343 Write_Str ("Accept_Address");
8345 when Fixed_Point_Kind =>
8346 Write_Str ("Small_Value");
8348 when E_Access_Subprogram_Type =>
8349 Write_Str ("Original_Access_Type");
8351 when E_In_Parameter =>
8352 Write_Str ("Default_Expr_Function");
8355 Modular_Integer_Kind =>
8356 Write_Str ("Original_Array_Type");
8359 Write_Str ("Field21??");
8361 end Write_Field21_Name;
8363 -----------------------
8364 -- Write_Field22_Name --
8365 -----------------------
8367 procedure Write_Field22_Name (Id : Entity_Id) is
8371 Write_Str ("Associated_Storage_Pool");
8374 Write_Str ("Component_Size");
8378 Write_Str ("Original_Record_Component");
8380 when E_Enumeration_Literal =>
8381 Write_Str ("Enumeration_Rep_Expr");
8384 Write_Str ("Exception_Code");
8387 Write_Str ("Protected_Formal");
8389 when E_Record_Type =>
8390 Write_Str ("Corresponding_Remote_Type");
8400 E_Generic_Function |
8401 E_Generic_Procedure |
8404 E_Return_Statement |
8407 Write_Str ("Scope_Depth_Value");
8409 when E_Record_Type_With_Private |
8410 E_Record_Subtype_With_Private |
8413 E_Limited_Private_Type |
8414 E_Limited_Private_Subtype =>
8415 Write_Str ("Private_View");
8418 Write_Str ("Shared_Var_Procs_Instance");
8421 Write_Str ("Field22??");
8423 end Write_Field22_Name;
8425 ------------------------
8426 -- Write_Field23_Name --
8427 ------------------------
8429 procedure Write_Field23_Name (Id : Entity_Id) is
8433 Write_Str ("Associated_Final_Chain");
8436 Write_Str ("Packed_Array_Type");
8439 Write_Str ("Entry_Cancel_Parameter");
8441 when E_Discriminant =>
8442 Write_Str ("CR_Discriminant");
8444 when E_Enumeration_Type =>
8445 Write_Str ("Enum_Pos_To_Rep");
8449 Write_Str ("Extra_Constrained");
8451 when E_Generic_Function |
8453 E_Generic_Procedure =>
8454 Write_Str ("Inner_Instances");
8456 when Concurrent_Kind |
8457 Incomplete_Or_Private_Kind |
8461 Write_Str ("Stored_Constraint");
8465 if Present (Scope (Id))
8466 and then Is_Protected_Type (Scope (Id))
8468 Write_Str ("Protection_Object");
8470 Write_Str ("Generic_Renamings");
8474 if Is_Generic_Instance (Id) then
8475 Write_Str ("Generic_Renamings");
8477 Write_Str ("Limited_View");
8481 Write_Str ("Protection_Object");
8484 Write_Str ("Field23??");
8486 end Write_Field23_Name;
8488 ------------------------
8489 -- Write_Field24_Name --
8490 ------------------------
8492 procedure Write_Field24_Name (Id : Entity_Id) is
8495 when Subprogram_Kind =>
8496 Write_Str ("Spec_PPC_List");
8498 when E_Variable | E_Constant | Type_Kind =>
8499 Write_Str ("Related_Expression");
8502 Write_Str ("Field24???");
8504 end Write_Field24_Name;
8506 ------------------------
8507 -- Write_Field25_Name --
8508 ------------------------
8510 procedure Write_Field25_Name (Id : Entity_Id) is
8514 Write_Str ("DT_Offset_To_Top_Func");
8518 Write_Str ("Interface_Alias");
8520 when E_Record_Type |
8522 E_Record_Type_With_Private |
8523 E_Record_Subtype_With_Private =>
8524 Write_Str ("Interfaces");
8527 Write_Str ("Task_Body_Procedure");
8530 Write_Str ("Debug_Renaming_Link");
8534 Write_Str ("PPC_Wrapper");
8536 when E_Enumeration_Subtype |
8537 E_Modular_Integer_Subtype |
8538 E_Signed_Integer_Subtype =>
8539 Write_Str ("Static_Predicate");
8542 Write_Str ("Field25??");
8544 end Write_Field25_Name;
8546 ------------------------
8547 -- Write_Field26_Name --
8548 ------------------------
8550 procedure Write_Field26_Name (Id : Entity_Id) is
8553 when E_Generic_Package |
8555 Write_Str ("Package_Instantiation");
8559 if Ekind (Id) = E_Procedure
8560 and then not Is_Dispatching_Operation (Id)
8562 Write_Str ("Static_Initialization");
8564 Write_Str ("Overridden_Operation");
8567 when E_Record_Type |
8568 E_Record_Type_With_Private =>
8569 Write_Str ("Dispatch_Table_Wrappers");
8571 when E_In_Out_Parameter |
8574 Write_Str ("Last_Assignment");
8577 Write_Str ("Relative_Deadline_Variable");
8580 Write_Str ("Field26??");
8582 end Write_Field26_Name;
8584 ------------------------
8585 -- Write_Field27_Name --
8586 ------------------------
8588 procedure Write_Field27_Name (Id : Entity_Id) is
8594 Write_Str ("Related_Type");
8597 Write_Str ("Wrapped_Entity");
8599 when E_Package | Type_Kind =>
8600 Write_Str ("Current_Use_Clause");
8603 Write_Str ("Field27??");
8605 end Write_Field27_Name;
8607 ------------------------
8608 -- Write_Field28_Name --
8609 ------------------------
8611 procedure Write_Field28_Name (Id : Entity_Id) is
8614 when E_Procedure | E_Function | E_Entry =>
8615 Write_Str ("Extra_Formals");
8617 when E_Record_Type =>
8618 Write_Str ("Underlying_Record_View");
8621 Write_Str ("Field28??");
8623 end Write_Field28_Name;
8625 procedure Write_Field29_Name (Id : Entity_Id) is
8629 Write_Str ("Subprograms_For_Type");
8632 Write_Str ("Field29??");
8634 end Write_Field29_Name;
8636 -------------------------
8637 -- Iterator Procedures --
8638 -------------------------
8640 procedure Proc_Next_Component (N : in out Node_Id) is
8642 N := Next_Component (N);
8643 end Proc_Next_Component;
8645 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
8647 N := Next_Entity (N);
8648 while Present (N) loop
8649 exit when Ekind_In (N, E_Component, E_Discriminant);
8650 N := Next_Entity (N);
8652 end Proc_Next_Component_Or_Discriminant;
8654 procedure Proc_Next_Discriminant (N : in out Node_Id) is
8656 N := Next_Discriminant (N);
8657 end Proc_Next_Discriminant;
8659 procedure Proc_Next_Formal (N : in out Node_Id) is
8661 N := Next_Formal (N);
8662 end Proc_Next_Formal;
8664 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
8666 N := Next_Formal_With_Extras (N);
8667 end Proc_Next_Formal_With_Extras;
8669 procedure Proc_Next_Index (N : in out Node_Id) is
8671 N := Next_Index (N);
8672 end Proc_Next_Index;
8674 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
8676 N := Next_Inlined_Subprogram (N);
8677 end Proc_Next_Inlined_Subprogram;
8679 procedure Proc_Next_Literal (N : in out Node_Id) is
8681 N := Next_Literal (N);
8682 end Proc_Next_Literal;
8684 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
8686 N := Next_Stored_Discriminant (N);
8687 end Proc_Next_Stored_Discriminant;