1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2008, 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 2, 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. See the GNU General Public License --
17 -- for more details. You should have received a copy of the GNU General --
18 -- Public License distributed with GNAT; see file COPYING. If not, write --
19 -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
20 -- Boston, MA 02110-1301, USA. --
22 -- As a special exception, if other files instantiate generics from this --
23 -- unit, or you link this unit with other files to produce an executable, --
24 -- this unit does not by itself cause the resulting executable to be --
25 -- covered by the GNU General Public License. This exception does not --
26 -- however invalidate any other reasons why the executable file might be --
27 -- covered by the GNU Public License. --
29 -- GNAT was originally developed by the GNAT team at New York University. --
30 -- Extensive contributions were provided by Ada Core Technologies Inc. --
32 ------------------------------------------------------------------------------
34 pragma Style_Checks (All_Checks);
35 -- Turn off subprogram ordering, not used for this unit
37 with Atree; use Atree;
38 with Nlists; use Nlists;
39 with Output; use Output;
40 with Sinfo; use Sinfo;
41 with Stand; use Stand;
45 use Atree.Unchecked_Access;
46 -- This is one of the packages that is allowed direct untyped access to
47 -- the fields in a node, since it provides the next level abstraction
48 -- which incorporates appropriate checks.
50 ----------------------------------------------
51 -- Usage of Fields in Defining Entity Nodes --
52 ----------------------------------------------
54 -- Four of these fields are defined in Sinfo, since they in are the
55 -- base part of the node. The access routines for these fields and
56 -- the corresponding set procedures are defined in Sinfo. These fields
57 -- are present in all entities. Note that Homonym is also in the base
58 -- part of the node, but has access routines that are more properly
59 -- part of Einfo, which is why they are defined here.
66 -- Remaining fields are present only in extended nodes (i.e. entities)
68 -- The following fields are present in all entities
71 -- First_Rep_Item Node6
73 -- Obsolescent_Warning Node24
75 -- The usage of other fields (and the entity kinds to which it applies)
76 -- depends on the particular field (see Einfo spec for details).
78 -- Associated_Node_For_Itype Node8
79 -- Dependent_Instances Elist8
80 -- Hiding_Loop_Variable Node8
81 -- Mechanism Uint8 (but returns Mechanism_Type)
82 -- Normalized_First_Bit Uint8
83 -- Return_Applies_To Node8
85 -- Class_Wide_Type Node9
86 -- Current_Value Node9
89 -- Discriminal_Link Node10
90 -- Handler_Records List10
91 -- Normalized_Position_Max Uint10
92 -- Referenced_Object Node10
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 -- Primitive_Operations Elist15
126 -- Related_Instance Node15
127 -- Scale_Value Uint15
128 -- Storage_Size_Variable Node15
129 -- String_Literal_Low_Bound Node15
130 -- Shared_Var_Read_Proc Node15
132 -- Access_Disp_Table Elist16
133 -- Cloned_Subtype Node16
135 -- Entry_Formal Node16
136 -- First_Private_Entity Node16
137 -- Lit_Strings Node16
138 -- String_Literal_Length Uint16
139 -- Unset_Reference Node16
141 -- Actual_Subtype Node17
142 -- Digits_Value Uint17
143 -- Discriminal Node17
144 -- First_Entity Node17
145 -- First_Index Node17
146 -- First_Literal Node17
149 -- Non_Limited_View Node17
154 -- Corresponding_Concurrent_Type Node18
155 -- Corresponding_Record_Type Node18
156 -- Delta_Value Ureal18
157 -- Enclosing_Scope Node18
158 -- Equivalent_Type Node18
159 -- Private_Dependents Elist18
160 -- Renamed_Entity Node18
161 -- Renamed_Object Node18
163 -- Body_Entity Node19
164 -- Corresponding_Discriminant Node19
165 -- Finalization_Chain_Entity Node19
166 -- Parent_Subtype Node19
167 -- Related_Array_Object Node19
168 -- Size_Check_Code Node19
169 -- Spec_Entity Node19
170 -- Underlying_Full_View Node19
172 -- Component_Type Node20
173 -- Default_Value Node20
174 -- Directly_Designated_Type Node20
175 -- Discriminant_Checking_Func Node20
176 -- Discriminant_Default_Value Node20
177 -- Last_Entity Node20
178 -- Register_Exception_Call Node20
179 -- Scalar_Range Node20
181 -- Accept_Address Elist21
182 -- Default_Expr_Function Node21
183 -- Discriminant_Constraint Elist21
184 -- Interface_Name 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_Assign_Proc Node22
199 -- Associated_Final_Chain Node23
200 -- CR_Discriminant Node23
201 -- Stored_Constraint Elist23
202 -- Entry_Cancel_Parameter Node23
203 -- Extra_Constrained Node23
204 -- Generic_Renamings Elist23
205 -- Inner_Instances Elist23
206 -- Enum_Pos_To_Rep Node23
207 -- Packed_Array_Type Node23
208 -- Limited_View Node23
209 -- Privals_Chain Elist23
210 -- Protected_Operation Node23
212 -- Obsolescent_Warning Node24
214 -- Abstract_Interface_Alias Node25
215 -- Abstract_Interfaces Elist25
216 -- Current_Use_Clause Node25
217 -- Debug_Renaming_Link Node25
218 -- DT_Offset_To_Top_Func Node25
219 -- Task_Body_Procedure Node25
221 -- Dispatch_Table_Wrapper Node26
222 -- Last_Assignment Node26
223 -- Overridden_Operation Node26
224 -- Package_Instantiation Node26
225 -- Related_Type Node26
226 -- Static_Initialization Node26
228 -- Wrapped_Entity Node27
230 -- Extra_Formals Node28
232 ---------------------------------------------
233 -- Usage of Flags in Defining Entity Nodes --
234 ---------------------------------------------
236 -- All flags are unique, there is no overlaying, so each flag is physically
237 -- present in every entity. However, for many of the flags, it only makes
238 -- sense for them to be set true for certain subsets of entity kinds. See
239 -- the spec of Einfo for further details.
241 -- Note: Flag1-Flag3 are absent from this list, since these flag positions
242 -- are used for the flags Analyzed, Comes_From_Source, and Error_Posted,
243 -- which are common to all nodes, including entity nodes.
246 -- Has_Discriminants Flag5
247 -- Is_Dispatching_Operation Flag6
248 -- Is_Immediately_Visible Flag7
250 -- Is_Potentially_Use_Visible Flag9
254 -- Is_Constrained Flag12
255 -- Is_Generic_Type Flag13
256 -- Depends_On_Private Flag14
258 -- Is_Volatile Flag16
259 -- Is_Internal Flag17
260 -- Has_Delayed_Freeze Flag18
261 -- Is_Abstract_Subprogram Flag19
262 -- Is_Concurrent_Record_Type Flag20
264 -- Has_Master_Entity Flag21
265 -- Needs_No_Actuals Flag22
266 -- Has_Storage_Size_Clause Flag23
267 -- Is_Imported Flag24
268 -- Is_Limited_Record Flag25
269 -- Has_Completion Flag26
270 -- Has_Pragma_Controlled Flag27
271 -- Is_Statically_Allocated Flag28
272 -- Has_Size_Clause Flag29
275 -- Checks_May_Be_Suppressed Flag31
276 -- Kill_Elaboration_Checks Flag32
277 -- Kill_Range_Checks Flag33
278 -- Kill_Tag_Checks Flag34
279 -- Is_Class_Wide_Equivalent_Type Flag35
280 -- Referenced_As_LHS Flag36
281 -- Is_Known_Non_Null Flag37
282 -- Can_Never_Be_Null Flag38
283 -- Is_Overriding_Operation Flag39
284 -- Body_Needed_For_SAL Flag40
286 -- Treat_As_Volatile Flag41
287 -- Is_Controlled Flag42
288 -- Has_Controlled_Component Flag43
290 -- In_Private_Part Flag45
291 -- Has_Alignment_Clause Flag46
293 -- In_Package_Body Flag48
295 -- Delay_Subprogram_Descriptors Flag50
298 -- Is_Entry_Formal Flag52
299 -- Is_Private_Descendant Flag53
300 -- Return_Present Flag54
301 -- Is_Tagged_Type Flag55
302 -- Has_Homonym Flag56
304 -- Non_Binary_Modulus Flag58
305 -- Is_Preelaborated Flag59
306 -- Is_Shared_Passive Flag60
308 -- Is_Remote_Types Flag61
309 -- Is_Remote_Call_Interface Flag62
310 -- Is_Character_Type Flag63
311 -- Is_Intrinsic_Subprogram Flag64
312 -- Has_Record_Rep_Clause Flag65
313 -- Has_Enumeration_Rep_Clause Flag66
314 -- Has_Small_Clause Flag67
315 -- Has_Component_Size_Clause Flag68
316 -- Is_Access_Constant Flag69
317 -- Is_First_Subtype Flag70
319 -- Has_Completion_In_Body Flag71
320 -- Has_Unknown_Discriminants Flag72
321 -- Is_Child_Unit Flag73
322 -- Is_CPP_Class Flag74
323 -- Has_Non_Standard_Rep Flag75
324 -- Is_Constructor Flag76
325 -- Static_Elaboration_Desired Flag77
327 -- Has_All_Calls_Remote Flag79
328 -- Is_Constr_Subt_For_U_Nominal Flag80
330 -- Is_Asynchronous Flag81
331 -- Has_Gigi_Rep_Item Flag82
332 -- Has_Machine_Radix_Clause Flag83
333 -- Machine_Radix_10 Flag84
335 -- Has_Atomic_Components Flag86
336 -- Has_Volatile_Components Flag87
337 -- Discard_Names Flag88
338 -- Is_Interrupt_Handler Flag89
339 -- Returns_By_Ref Flag90
342 -- Size_Known_At_Compile_Time Flag92
343 -- Has_Subprogram_Descriptor Flag93
344 -- Is_Generic_Actual_Type Flag94
345 -- Uses_Sec_Stack Flag95
346 -- Warnings_Off Flag96
347 -- Is_Controlling_Formal Flag97
348 -- Has_Controlling_Result Flag98
349 -- Is_Exported Flag99
350 -- Has_Specified_Layout Flag100
352 -- Has_Nested_Block_With_Handler Flag101
354 -- Is_Completely_Hidden Flag103
355 -- Address_Taken Flag104
356 -- Suppress_Init_Proc Flag105
357 -- Is_Limited_Composite Flag106
358 -- Is_Private_Composite Flag107
359 -- Default_Expressions_Processed Flag108
360 -- Is_Non_Static_Subtype Flag109
361 -- Has_External_Tag_Rep_Clause Flag110
363 -- Is_Formal_Subprogram Flag111
364 -- Is_Renaming_Of_Object Flag112
366 -- Delay_Cleanups Flag114
367 -- Never_Set_In_Source Flag115
368 -- Is_Visible_Child_Unit Flag116
369 -- Is_Unchecked_Union Flag117
370 -- Is_For_Access_Subtype Flag118
371 -- Has_Convention_Pragma Flag119
372 -- Has_Primitive_Operations Flag120
374 -- Has_Pragma_Pack Flag121
375 -- Is_Bit_Packed_Array Flag122
376 -- Has_Unchecked_Union Flag123
377 -- Is_Eliminated Flag124
378 -- C_Pass_By_Copy Flag125
379 -- Is_Instantiated Flag126
380 -- Is_Valued_Procedure Flag127
381 -- (used for Component_Alignment) Flag128
382 -- (used for Component_Alignment) Flag129
383 -- Is_Generic_Instance Flag130
385 -- No_Pool_Assigned Flag131
386 -- Is_AST_Entry Flag132
387 -- Is_VMS_Exception Flag133
388 -- Is_Optional_Parameter Flag134
389 -- Has_Aliased_Components Flag135
390 -- No_Strict_Aliasing Flag136
391 -- Is_Machine_Code_Subprogram Flag137
392 -- Is_Packed_Array_Type Flag138
393 -- Has_Biased_Representation Flag139
394 -- Has_Complex_Representation Flag140
396 -- Is_Constr_Subt_For_UN_Aliased Flag141
397 -- Has_Missing_Return Flag142
398 -- Has_Recursive_Call Flag143
399 -- Is_Unsigned_Type Flag144
400 -- Strict_Alignment Flag145
401 -- Is_Abstract_Type Flag146
402 -- Needs_Debug_Info Flag147
403 -- Suppress_Elaboration_Warnings Flag148
404 -- Is_Compilation_Unit Flag149
405 -- Has_Pragma_Elaborate_Body Flag150
408 -- Entry_Accepted Flag152
409 -- Is_Obsolescent Flag153
410 -- Has_Per_Object_Constraint Flag154
411 -- Has_Private_Declaration Flag155
412 -- Referenced Flag156
413 -- Has_Pragma_Inline Flag157
414 -- Finalize_Storage_Only Flag158
415 -- From_With_Type Flag159
416 -- Is_Package_Body_Entity Flag160
418 -- Has_Qualified_Name Flag161
419 -- Nonzero_Is_True Flag162
420 -- Is_True_Constant Flag163
421 -- Reverse_Bit_Order Flag164
422 -- Suppress_Style_Checks Flag165
423 -- Debug_Info_Off Flag166
424 -- Sec_Stack_Needed_For_Return Flag167
425 -- Materialize_Entity Flag168
426 -- Function_Returns_With_DSP Flag169
427 -- Is_Known_Valid Flag170
429 -- Is_Hidden_Open_Scope Flag171
430 -- Has_Object_Size_Clause Flag172
431 -- Has_Fully_Qualified_Name Flag173
432 -- Elaboration_Entity_Required Flag174
433 -- Has_Forward_Instantiation Flag175
434 -- Is_Discrim_SO_Function Flag176
435 -- Size_Depends_On_Discriminant Flag177
436 -- Is_Null_Init_Proc Flag178
437 -- Has_Pragma_Pure_Function Flag179
438 -- Has_Pragma_Unreferenced Flag180
440 -- Has_Contiguous_Rep Flag181
441 -- Has_Xref_Entry Flag182
442 -- Must_Be_On_Byte_Boundary Flag183
443 -- Has_Stream_Size_Clause Flag184
444 -- Is_Ada_2005_Only Flag185
445 -- Is_Interface Flag186
446 -- Has_Constrained_Partial_View Flag187
447 -- Has_Persistent_BSS Flag188
448 -- Is_Pure_Unit_Access_Type Flag189
449 -- Has_Specified_Stream_Input Flag190
451 -- Has_Specified_Stream_Output Flag191
452 -- Has_Specified_Stream_Read Flag192
453 -- Has_Specified_Stream_Write Flag193
454 -- Is_Local_Anonymous_Access Flag194
455 -- Is_Primitive_Wrapper Flag195
456 -- Was_Hidden Flag196
457 -- Is_Limited_Interface Flag197
458 -- Is_Protected_Interface Flag198
459 -- Is_Synchronized_Interface Flag199
460 -- Is_Task_Interface Flag200
462 -- Has_Anon_Block_Suffix Flag201
463 -- Itype_Printed Flag202
464 -- Has_Pragma_Pure Flag203
465 -- Is_Known_Null Flag204
466 -- Low_Bound_Known Flag205
467 -- Is_Visible_Formal Flag206
468 -- Known_To_Have_Preelab_Init Flag207
469 -- Must_Have_Preelab_Init Flag208
470 -- Is_Return_Object Flag209
471 -- Elaborate_Body_Desirable Flag210
473 -- Has_Static_Discriminants Flag211
474 -- Has_Pragma_Unreferenced_Objects Flag212
475 -- Requires_Overriding Flag213
477 -- Has_Up_Level_Access Flag215
478 -- Universal_Aliasing Flag216
479 -- Suppress_Value_Tracking_On_Call Flag217
480 -- Is_Primitive Flag218
481 -- Has_Initial_Value Flag219
482 -- Has_Dispatch_Table Flag220
484 -- Has_Pragma_Preelab_Init Flag221
485 -- Used_As_Generic_Actual Flag222
486 -- Is_Descendent_Of_Address Flag223
489 -- Is_Only_Out_Parameter Flag226
490 -- Referenced_As_Out_Parameter Flag227
491 -- Has_Thunks Flag228
492 -- Can_Use_Internal_Rep Flag229
493 -- Has_Pragma_Inline_Always Flag230
495 -- Renamed_In_Spec Flag231
496 -- Implemented_By_Entry Flag232
497 -- Has_Pragma_Unmodified Flag233
498 -- Is_Static_Dispatch_Table_Entity Flag234
499 -- Is_Trivial_Subprogram Flag235
500 -- Warnings_Off_Used Flag236
501 -- Warnings_Off_Used_Unmodified Flag237
502 -- Warnings_Off_Used_Unreferenced Flag238
503 -- OK_To_Reorder_Components Flag239
514 -----------------------
515 -- Local subprograms --
516 -----------------------
518 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N;
519 -- Returns the attribute definition clause for Id whose name is Rep_Name.
520 -- Returns Empty if no matching attribute definition clause found for Id.
526 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N is
530 Ritem := First_Rep_Item (Id);
531 while Present (Ritem) loop
532 if Nkind (Ritem) = N_Attribute_Definition_Clause
533 and then Chars (Ritem) = Rep_Name
537 Ritem := Next_Rep_Item (Ritem);
544 --------------------------------
545 -- Attribute Access Functions --
546 --------------------------------
548 function Abstract_Interfaces (Id : E) return L is
550 pragma Assert (Is_Record_Type (Id));
552 end Abstract_Interfaces;
554 function Abstract_Interface_Alias (Id : E) return E is
556 pragma Assert (Is_Subprogram (Id));
558 end Abstract_Interface_Alias;
560 function Accept_Address (Id : E) return L is
565 function Access_Disp_Table (Id : E) return L is
567 pragma Assert (Is_Tagged_Type (Id));
568 return Elist16 (Implementation_Base_Type (Id));
569 end Access_Disp_Table;
571 function Actual_Subtype (Id : E) return E is
574 (Ekind (Id) = E_Constant
575 or else Ekind (Id) = E_Variable
576 or else Ekind (Id) = E_Generic_In_Out_Parameter
577 or else Is_Formal (Id));
581 function Address_Taken (Id : E) return B is
586 function Alias (Id : E) return E is
589 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
593 function Alignment (Id : E) return U is
595 pragma Assert (Is_Type (Id)
596 or else Is_Formal (Id)
597 or else Ekind (Id) = E_Loop_Parameter
598 or else Ekind (Id) = E_Constant
599 or else Ekind (Id) = E_Exception
600 or else Ekind (Id) = E_Variable);
604 function Associated_Final_Chain (Id : E) return E is
606 pragma Assert (Is_Access_Type (Id));
608 end Associated_Final_Chain;
610 function Associated_Formal_Package (Id : E) return E is
612 pragma Assert (Ekind (Id) = E_Package);
614 end Associated_Formal_Package;
616 function Associated_Node_For_Itype (Id : E) return N is
619 end Associated_Node_For_Itype;
621 function Associated_Storage_Pool (Id : E) return E is
623 pragma Assert (Is_Access_Type (Id));
624 return Node22 (Root_Type (Id));
625 end Associated_Storage_Pool;
627 function Barrier_Function (Id : E) return N is
629 pragma Assert (Is_Entry (Id));
631 end Barrier_Function;
633 function Block_Node (Id : E) return N is
635 pragma Assert (Ekind (Id) = E_Block);
639 function Body_Entity (Id : E) return E is
642 (Ekind (Id) = E_Package or else Ekind (Id) = E_Generic_Package);
646 function Body_Needed_For_SAL (Id : E) return B is
649 (Ekind (Id) = E_Package
650 or else Is_Subprogram (Id)
651 or else Is_Generic_Unit (Id));
653 end Body_Needed_For_SAL;
655 function C_Pass_By_Copy (Id : E) return B is
657 pragma Assert (Is_Record_Type (Id));
658 return Flag125 (Implementation_Base_Type (Id));
661 function Can_Never_Be_Null (Id : E) return B is
664 end Can_Never_Be_Null;
666 function Checks_May_Be_Suppressed (Id : E) return B is
669 end Checks_May_Be_Suppressed;
671 function Class_Wide_Type (Id : E) return E is
673 pragma Assert (Is_Type (Id));
677 function Cloned_Subtype (Id : E) return E is
680 (Ekind (Id) = E_Record_Subtype
681 or else Ekind (Id) = E_Class_Wide_Subtype);
685 function Component_Bit_Offset (Id : E) return U is
688 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
690 end Component_Bit_Offset;
692 function Component_Clause (Id : E) return N is
695 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
697 end Component_Clause;
699 function Component_Size (Id : E) return U is
701 pragma Assert (Is_Array_Type (Id));
702 return Uint22 (Implementation_Base_Type (Id));
705 function Component_Type (Id : E) return E is
707 return Node20 (Implementation_Base_Type (Id));
710 function Corresponding_Concurrent_Type (Id : E) return E is
712 pragma Assert (Ekind (Id) = E_Record_Type);
714 end Corresponding_Concurrent_Type;
716 function Corresponding_Discriminant (Id : E) return E is
718 pragma Assert (Ekind (Id) = E_Discriminant);
720 end Corresponding_Discriminant;
722 function Corresponding_Equality (Id : E) return E is
725 (Ekind (Id) = E_Function
726 and then not Comes_From_Source (Id)
727 and then Chars (Id) = Name_Op_Ne);
729 end Corresponding_Equality;
731 function Corresponding_Record_Type (Id : E) return E is
733 pragma Assert (Is_Concurrent_Type (Id));
735 end Corresponding_Record_Type;
737 function Corresponding_Remote_Type (Id : E) return E is
740 end Corresponding_Remote_Type;
742 function Current_Use_Clause (Id : E) return E is
744 pragma Assert (Ekind (Id) = E_Package);
746 end Current_Use_Clause;
748 function Current_Value (Id : E) return N is
750 pragma Assert (Ekind (Id) in Object_Kind);
754 function CR_Discriminant (Id : E) return E is
759 function Debug_Info_Off (Id : E) return B is
764 function Debug_Renaming_Link (Id : E) return E is
767 end Debug_Renaming_Link;
769 function Default_Expr_Function (Id : E) return E is
771 pragma Assert (Is_Formal (Id));
773 end Default_Expr_Function;
775 function Default_Expressions_Processed (Id : E) return B is
778 end Default_Expressions_Processed;
780 function Default_Value (Id : E) return N is
782 pragma Assert (Is_Formal (Id));
786 function Delay_Cleanups (Id : E) return B is
791 function Delay_Subprogram_Descriptors (Id : E) return B is
794 end Delay_Subprogram_Descriptors;
796 function Delta_Value (Id : E) return R is
798 pragma Assert (Is_Fixed_Point_Type (Id));
802 function Dependent_Instances (Id : E) return L is
804 pragma Assert (Is_Generic_Instance (Id));
806 end Dependent_Instances;
808 function Depends_On_Private (Id : E) return B is
810 pragma Assert (Nkind (Id) in N_Entity);
812 end Depends_On_Private;
814 function Digits_Value (Id : E) return U is
817 (Is_Floating_Point_Type (Id)
818 or else Is_Decimal_Fixed_Point_Type (Id));
822 function Directly_Designated_Type (Id : E) return E is
825 end Directly_Designated_Type;
827 function Discard_Names (Id : E) return B is
832 function Discriminal (Id : E) return E is
834 pragma Assert (Ekind (Id) = E_Discriminant);
838 function Discriminal_Link (Id : E) return N is
841 end Discriminal_Link;
843 function Discriminant_Checking_Func (Id : E) return E is
845 pragma Assert (Ekind (Id) = E_Component);
847 end Discriminant_Checking_Func;
849 function Discriminant_Constraint (Id : E) return L is
851 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
853 end Discriminant_Constraint;
855 function Discriminant_Default_Value (Id : E) return N is
857 pragma Assert (Ekind (Id) = E_Discriminant);
859 end Discriminant_Default_Value;
861 function Discriminant_Number (Id : E) return U is
863 pragma Assert (Ekind (Id) = E_Discriminant);
865 end Discriminant_Number;
867 function Dispatch_Table_Wrapper (Id : E) return E is
869 pragma Assert (Is_Tagged_Type (Id));
870 return Node26 (Implementation_Base_Type (Id));
871 end Dispatch_Table_Wrapper;
873 function DT_Entry_Count (Id : E) return U is
875 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
879 function DT_Offset_To_Top_Func (Id : E) return E is
881 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
883 end DT_Offset_To_Top_Func;
885 function DT_Position (Id : E) return U is
888 ((Ekind (Id) = E_Function
889 or else Ekind (Id) = E_Procedure)
890 and then Present (DTC_Entity (Id)));
894 function DTC_Entity (Id : E) return E is
897 (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
901 function Elaborate_Body_Desirable (Id : E) return B is
903 pragma Assert (Ekind (Id) = E_Package);
905 end Elaborate_Body_Desirable;
907 function Elaboration_Entity (Id : E) return E is
912 Ekind (Id) = E_Package
914 Is_Generic_Unit (Id));
916 end Elaboration_Entity;
918 function Elaboration_Entity_Required (Id : E) return B is
923 Ekind (Id) = E_Package
925 Is_Generic_Unit (Id));
927 end Elaboration_Entity_Required;
929 function Enclosing_Scope (Id : E) return E is
934 function Entry_Accepted (Id : E) return B is
936 pragma Assert (Is_Entry (Id));
940 function Entry_Bodies_Array (Id : E) return E is
943 end Entry_Bodies_Array;
945 function Entry_Cancel_Parameter (Id : E) return E is
948 end Entry_Cancel_Parameter;
950 function Entry_Component (Id : E) return E is
955 function Entry_Formal (Id : E) return E is
960 function Entry_Index_Constant (Id : E) return N is
962 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
964 end Entry_Index_Constant;
966 function Entry_Parameters_Type (Id : E) return E is
969 end Entry_Parameters_Type;
971 function Enum_Pos_To_Rep (Id : E) return E is
973 pragma Assert (Ekind (Id) = E_Enumeration_Type);
977 function Enumeration_Pos (Id : E) return Uint is
979 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
983 function Enumeration_Rep (Id : E) return U is
985 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
989 function Enumeration_Rep_Expr (Id : E) return N is
991 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
993 end Enumeration_Rep_Expr;
995 function Equivalent_Type (Id : E) return E is
998 (Ekind (Id) = E_Class_Wide_Subtype or else
999 Ekind (Id) = E_Access_Protected_Subprogram_Type or else
1000 Ekind (Id) = E_Anonymous_Access_Protected_Subprogram_Type or else
1001 Ekind (Id) = E_Access_Subprogram_Type or else
1002 Ekind (Id) = E_Exception_Type);
1004 end Equivalent_Type;
1006 function Esize (Id : E) return Uint is
1011 function Exception_Code (Id : E) return Uint is
1013 pragma Assert (Ekind (Id) = E_Exception);
1017 function Extra_Accessibility (Id : E) return E is
1019 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1021 end Extra_Accessibility;
1023 function Extra_Constrained (Id : E) return E is
1025 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1027 end Extra_Constrained;
1029 function Extra_Formal (Id : E) return E is
1034 function Extra_Formals (Id : E) return E is
1037 (Is_Overloadable (Id)
1038 or else Ekind (Id) = E_Entry_Family
1039 or else Ekind (Id) = E_Subprogram_Body
1040 or else Ekind (Id) = E_Subprogram_Type);
1044 function Can_Use_Internal_Rep (Id : E) return B is
1046 pragma Assert (Is_Access_Subprogram_Type (Id));
1047 return Flag229 (Id);
1048 end Can_Use_Internal_Rep;
1050 function Finalization_Chain_Entity (Id : E) return E is
1053 end Finalization_Chain_Entity;
1055 function Finalize_Storage_Only (Id : E) return B is
1057 pragma Assert (Is_Type (Id));
1058 return Flag158 (Base_Type (Id));
1059 end Finalize_Storage_Only;
1061 function First_Entity (Id : E) return E is
1066 function First_Index (Id : E) return N is
1068 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1072 function First_Literal (Id : E) return E is
1074 pragma Assert (Is_Enumeration_Type (Id));
1078 function First_Optional_Parameter (Id : E) return E is
1081 (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
1083 end First_Optional_Parameter;
1085 function First_Private_Entity (Id : E) return E is
1087 pragma Assert (Ekind (Id) = E_Package
1088 or else Ekind (Id) = E_Generic_Package
1089 or else Ekind (Id) in Concurrent_Kind);
1091 end First_Private_Entity;
1093 function First_Rep_Item (Id : E) return E is
1098 function Freeze_Node (Id : E) return N is
1103 function From_With_Type (Id : E) return B is
1105 return Flag159 (Id);
1108 function Full_View (Id : E) return E is
1110 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1114 function Function_Returns_With_DSP (Id : E) return B is
1117 (Is_Subprogram (Id) or else Ekind (Id) = E_Subprogram_Type);
1118 return Flag169 (Id);
1119 end Function_Returns_With_DSP;
1121 function Generic_Homonym (Id : E) return E is
1123 pragma Assert (Ekind (Id) = E_Generic_Package);
1125 end Generic_Homonym;
1127 function Generic_Renamings (Id : E) return L is
1129 return Elist23 (Id);
1130 end Generic_Renamings;
1132 function Handler_Records (Id : E) return S is
1135 end Handler_Records;
1137 function Has_Aliased_Components (Id : E) return B is
1139 return Flag135 (Implementation_Base_Type (Id));
1140 end Has_Aliased_Components;
1142 function Has_Alignment_Clause (Id : E) return B is
1145 end Has_Alignment_Clause;
1147 function Has_All_Calls_Remote (Id : E) return B is
1150 end Has_All_Calls_Remote;
1152 function Has_Anon_Block_Suffix (Id : E) return B is
1154 return Flag201 (Id);
1155 end Has_Anon_Block_Suffix;
1157 function Has_Atomic_Components (Id : E) return B is
1159 return Flag86 (Implementation_Base_Type (Id));
1160 end Has_Atomic_Components;
1162 function Has_Biased_Representation (Id : E) return B is
1164 return Flag139 (Id);
1165 end Has_Biased_Representation;
1167 function Has_Completion (Id : E) return B is
1172 function Has_Completion_In_Body (Id : E) return B is
1174 pragma Assert (Is_Type (Id));
1176 end Has_Completion_In_Body;
1178 function Has_Complex_Representation (Id : E) return B is
1180 pragma Assert (Is_Type (Id));
1181 return Flag140 (Implementation_Base_Type (Id));
1182 end Has_Complex_Representation;
1184 function Has_Component_Size_Clause (Id : E) return B is
1186 pragma Assert (Is_Array_Type (Id));
1187 return Flag68 (Implementation_Base_Type (Id));
1188 end Has_Component_Size_Clause;
1190 function Has_Constrained_Partial_View (Id : E) return B is
1192 pragma Assert (Is_Type (Id));
1193 return Flag187 (Id);
1194 end Has_Constrained_Partial_View;
1196 function Has_Controlled_Component (Id : E) return B is
1198 return Flag43 (Base_Type (Id));
1199 end Has_Controlled_Component;
1201 function Has_Contiguous_Rep (Id : E) return B is
1203 return Flag181 (Id);
1204 end Has_Contiguous_Rep;
1206 function Has_Controlling_Result (Id : E) return B is
1209 end Has_Controlling_Result;
1211 function Has_Convention_Pragma (Id : E) return B is
1213 return Flag119 (Id);
1214 end Has_Convention_Pragma;
1216 function Has_Delayed_Freeze (Id : E) return B is
1218 pragma Assert (Nkind (Id) in N_Entity);
1220 end Has_Delayed_Freeze;
1222 function Has_Discriminants (Id : E) return B is
1224 pragma Assert (Nkind (Id) in N_Entity);
1226 end Has_Discriminants;
1228 function Has_Dispatch_Table (Id : E) return B is
1230 pragma Assert (Is_Tagged_Type (Id));
1231 return Flag220 (Id);
1232 end Has_Dispatch_Table;
1234 function Has_Enumeration_Rep_Clause (Id : E) return B is
1236 pragma Assert (Is_Enumeration_Type (Id));
1238 end Has_Enumeration_Rep_Clause;
1240 function Has_Exit (Id : E) return B is
1245 function Has_External_Tag_Rep_Clause (Id : E) return B is
1247 pragma Assert (Is_Tagged_Type (Id));
1248 return Flag110 (Id);
1249 end Has_External_Tag_Rep_Clause;
1251 function Has_Forward_Instantiation (Id : E) return B is
1253 return Flag175 (Id);
1254 end Has_Forward_Instantiation;
1256 function Has_Fully_Qualified_Name (Id : E) return B is
1258 return Flag173 (Id);
1259 end Has_Fully_Qualified_Name;
1261 function Has_Gigi_Rep_Item (Id : E) return B is
1264 end Has_Gigi_Rep_Item;
1266 function Has_Homonym (Id : E) return B is
1271 function Has_Initial_Value (Id : E) return B is
1274 (Ekind (Id) = E_Variable or else Is_Formal (Id));
1275 return Flag219 (Id);
1276 end Has_Initial_Value;
1278 function Has_Machine_Radix_Clause (Id : E) return B is
1280 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1282 end Has_Machine_Radix_Clause;
1284 function Has_Master_Entity (Id : E) return B is
1287 end Has_Master_Entity;
1289 function Has_Missing_Return (Id : E) return B is
1292 (Ekind (Id) = E_Function or else Ekind (Id) = E_Generic_Function);
1293 return Flag142 (Id);
1294 end Has_Missing_Return;
1296 function Has_Nested_Block_With_Handler (Id : E) return B is
1298 return Flag101 (Id);
1299 end Has_Nested_Block_With_Handler;
1301 function Has_Non_Standard_Rep (Id : E) return B is
1303 return Flag75 (Implementation_Base_Type (Id));
1304 end Has_Non_Standard_Rep;
1306 function Has_Object_Size_Clause (Id : E) return B is
1308 pragma Assert (Is_Type (Id));
1309 return Flag172 (Id);
1310 end Has_Object_Size_Clause;
1312 function Has_Per_Object_Constraint (Id : E) return B is
1314 return Flag154 (Id);
1315 end Has_Per_Object_Constraint;
1317 function Has_Persistent_BSS (Id : E) return B is
1319 return Flag188 (Id);
1320 end Has_Persistent_BSS;
1322 function Has_Pragma_Controlled (Id : E) return B is
1324 pragma Assert (Is_Access_Type (Id));
1325 return Flag27 (Implementation_Base_Type (Id));
1326 end Has_Pragma_Controlled;
1328 function Has_Pragma_Elaborate_Body (Id : E) return B is
1330 return Flag150 (Id);
1331 end Has_Pragma_Elaborate_Body;
1333 function Has_Pragma_Inline (Id : E) return B is
1335 return Flag157 (Id);
1336 end Has_Pragma_Inline;
1338 function Has_Pragma_Inline_Always (Id : E) return B is
1340 return Flag230 (Id);
1341 end Has_Pragma_Inline_Always;
1343 function Has_Pragma_Pack (Id : E) return B is
1345 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1346 return Flag121 (Implementation_Base_Type (Id));
1347 end Has_Pragma_Pack;
1349 function Has_Pragma_Preelab_Init (Id : E) return B is
1351 return Flag221 (Id);
1352 end Has_Pragma_Preelab_Init;
1354 function Has_Pragma_Pure (Id : E) return B is
1356 return Flag203 (Id);
1357 end Has_Pragma_Pure;
1359 function Has_Pragma_Pure_Function (Id : E) return B is
1361 return Flag179 (Id);
1362 end Has_Pragma_Pure_Function;
1364 function Has_Pragma_Unmodified (Id : E) return B is
1366 return Flag233 (Id);
1367 end Has_Pragma_Unmodified;
1369 function Has_Pragma_Unreferenced (Id : E) return B is
1371 return Flag180 (Id);
1372 end Has_Pragma_Unreferenced;
1374 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1376 pragma Assert (Is_Type (Id));
1377 return Flag212 (Id);
1378 end Has_Pragma_Unreferenced_Objects;
1380 function Has_Primitive_Operations (Id : E) return B is
1382 pragma Assert (Is_Type (Id));
1383 return Flag120 (Base_Type (Id));
1384 end Has_Primitive_Operations;
1386 function Has_Private_Declaration (Id : E) return B is
1388 return Flag155 (Id);
1389 end Has_Private_Declaration;
1391 function Has_Qualified_Name (Id : E) return B is
1393 return Flag161 (Id);
1394 end Has_Qualified_Name;
1396 function Has_RACW (Id : E) return B is
1398 pragma Assert (Ekind (Id) = E_Package);
1399 return Flag214 (Id);
1402 function Has_Record_Rep_Clause (Id : E) return B is
1404 pragma Assert (Is_Record_Type (Id));
1405 return Flag65 (Implementation_Base_Type (Id));
1406 end Has_Record_Rep_Clause;
1408 function Has_Recursive_Call (Id : E) return B is
1410 pragma Assert (Is_Subprogram (Id));
1411 return Flag143 (Id);
1412 end Has_Recursive_Call;
1414 function Has_Size_Clause (Id : E) return B is
1417 end Has_Size_Clause;
1419 function Has_Small_Clause (Id : E) return B is
1422 end Has_Small_Clause;
1424 function Has_Specified_Layout (Id : E) return B is
1426 pragma Assert (Is_Type (Id));
1427 return Flag100 (Implementation_Base_Type (Id));
1428 end Has_Specified_Layout;
1430 function Has_Specified_Stream_Input (Id : E) return B is
1432 pragma Assert (Is_Type (Id));
1433 return Flag190 (Id);
1434 end Has_Specified_Stream_Input;
1436 function Has_Specified_Stream_Output (Id : E) return B is
1438 pragma Assert (Is_Type (Id));
1439 return Flag191 (Id);
1440 end Has_Specified_Stream_Output;
1442 function Has_Specified_Stream_Read (Id : E) return B is
1444 pragma Assert (Is_Type (Id));
1445 return Flag192 (Id);
1446 end Has_Specified_Stream_Read;
1448 function Has_Specified_Stream_Write (Id : E) return B is
1450 pragma Assert (Is_Type (Id));
1451 return Flag193 (Id);
1452 end Has_Specified_Stream_Write;
1454 function Has_Static_Discriminants (Id : E) return B is
1456 pragma Assert (Is_Type (Id));
1457 return Flag211 (Id);
1458 end Has_Static_Discriminants;
1460 function Has_Storage_Size_Clause (Id : E) return B is
1462 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1463 return Flag23 (Implementation_Base_Type (Id));
1464 end Has_Storage_Size_Clause;
1466 function Has_Stream_Size_Clause (Id : E) return B is
1468 return Flag184 (Id);
1469 end Has_Stream_Size_Clause;
1471 function Has_Subprogram_Descriptor (Id : E) return B is
1474 end Has_Subprogram_Descriptor;
1476 function Has_Task (Id : E) return B is
1478 return Flag30 (Base_Type (Id));
1481 function Has_Thunks (Id : E) return B is
1483 pragma Assert (Ekind (Id) = E_Constant);
1484 return Flag228 (Id);
1487 function Has_Unchecked_Union (Id : E) return B is
1489 return Flag123 (Base_Type (Id));
1490 end Has_Unchecked_Union;
1492 function Has_Unknown_Discriminants (Id : E) return B is
1494 pragma Assert (Is_Type (Id));
1496 end Has_Unknown_Discriminants;
1498 function Has_Up_Level_Access (Id : E) return B is
1501 (Ekind (Id) = E_Variable
1502 or else Ekind (Id) = E_Constant
1503 or else Ekind (Id) = E_Loop_Parameter);
1504 return Flag215 (Id);
1505 end Has_Up_Level_Access;
1507 function Has_Volatile_Components (Id : E) return B is
1509 return Flag87 (Implementation_Base_Type (Id));
1510 end Has_Volatile_Components;
1512 function Has_Xref_Entry (Id : E) return B is
1514 return Flag182 (Implementation_Base_Type (Id));
1517 function Hiding_Loop_Variable (Id : E) return E is
1519 pragma Assert (Ekind (Id) = E_Variable);
1521 end Hiding_Loop_Variable;
1523 function Homonym (Id : E) return E is
1528 function Implemented_By_Entry (Id : E) return B is
1531 (Ekind (Id) = E_Function
1532 or else Ekind (Id) = E_Procedure);
1533 return Flag232 (Id);
1534 end Implemented_By_Entry;
1536 function In_Package_Body (Id : E) return B is
1539 end In_Package_Body;
1541 function In_Private_Part (Id : E) return B is
1544 end In_Private_Part;
1546 function In_Use (Id : E) return B is
1548 pragma Assert (Nkind (Id) in N_Entity);
1552 function Inner_Instances (Id : E) return L is
1554 return Elist23 (Id);
1555 end Inner_Instances;
1557 function Interface_Name (Id : E) return N is
1562 function Is_Abstract_Subprogram (Id : E) return B is
1564 pragma Assert (Is_Overloadable (Id));
1566 end Is_Abstract_Subprogram;
1568 function Is_Abstract_Type (Id : E) return B is
1570 pragma Assert (Is_Type (Id));
1571 return Flag146 (Id);
1572 end Is_Abstract_Type;
1574 function Is_Local_Anonymous_Access (Id : E) return B is
1576 pragma Assert (Is_Access_Type (Id));
1577 return Flag194 (Id);
1578 end Is_Local_Anonymous_Access;
1580 function Is_Access_Constant (Id : E) return B is
1582 pragma Assert (Is_Access_Type (Id));
1584 end Is_Access_Constant;
1586 function Is_Ada_2005_Only (Id : E) return B is
1588 return Flag185 (Id);
1589 end Is_Ada_2005_Only;
1591 function Is_Aliased (Id : E) return B is
1593 pragma Assert (Nkind (Id) in N_Entity);
1597 function Is_AST_Entry (Id : E) return B is
1599 pragma Assert (Is_Entry (Id));
1600 return Flag132 (Id);
1603 function Is_Asynchronous (Id : E) return B is
1606 (Ekind (Id) = E_Procedure or else Is_Type (Id));
1608 end Is_Asynchronous;
1610 function Is_Atomic (Id : E) return B is
1615 function Is_Bit_Packed_Array (Id : E) return B is
1617 return Flag122 (Implementation_Base_Type (Id));
1618 end Is_Bit_Packed_Array;
1620 function Is_Called (Id : E) return B is
1623 (Ekind (Id) = E_Procedure or else Ekind (Id) = E_Function);
1624 return Flag102 (Id);
1627 function Is_Character_Type (Id : E) return B is
1630 end Is_Character_Type;
1632 function Is_Child_Unit (Id : E) return B is
1637 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1640 end Is_Class_Wide_Equivalent_Type;
1642 function Is_Compilation_Unit (Id : E) return B is
1644 return Flag149 (Id);
1645 end Is_Compilation_Unit;
1647 function Is_Completely_Hidden (Id : E) return B is
1649 pragma Assert (Ekind (Id) = E_Discriminant);
1650 return Flag103 (Id);
1651 end Is_Completely_Hidden;
1653 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1656 end Is_Constr_Subt_For_U_Nominal;
1658 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1660 return Flag141 (Id);
1661 end Is_Constr_Subt_For_UN_Aliased;
1663 function Is_Constrained (Id : E) return B is
1665 pragma Assert (Nkind (Id) in N_Entity);
1669 function Is_Constructor (Id : E) return B is
1674 function Is_Controlled (Id : E) return B is
1676 return Flag42 (Base_Type (Id));
1679 function Is_Controlling_Formal (Id : E) return B is
1681 pragma Assert (Is_Formal (Id));
1683 end Is_Controlling_Formal;
1685 function Is_CPP_Class (Id : E) return B is
1690 function Is_Discrim_SO_Function (Id : E) return B is
1692 return Flag176 (Id);
1693 end Is_Discrim_SO_Function;
1695 function Is_Descendent_Of_Address (Id : E) return B is
1697 pragma Assert (Is_Type (Id));
1698 return Flag223 (Id);
1699 end Is_Descendent_Of_Address;
1701 function Is_Dispatching_Operation (Id : E) return B is
1703 pragma Assert (Nkind (Id) in N_Entity);
1705 end Is_Dispatching_Operation;
1707 function Is_Eliminated (Id : E) return B is
1709 return Flag124 (Id);
1712 function Is_Entry_Formal (Id : E) return B is
1715 end Is_Entry_Formal;
1717 function Is_Exported (Id : E) return B is
1722 function Is_First_Subtype (Id : E) return B is
1725 end Is_First_Subtype;
1727 function Is_For_Access_Subtype (Id : E) return B is
1730 (Ekind (Id) = E_Record_Subtype
1732 Ekind (Id) = E_Private_Subtype);
1733 return Flag118 (Id);
1734 end Is_For_Access_Subtype;
1736 function Is_Formal_Subprogram (Id : E) return B is
1738 return Flag111 (Id);
1739 end Is_Formal_Subprogram;
1741 function Is_Frozen (Id : E) return B is
1746 function Is_Generic_Actual_Type (Id : E) return B is
1748 pragma Assert (Is_Type (Id));
1750 end Is_Generic_Actual_Type;
1752 function Is_Generic_Instance (Id : E) return B is
1754 return Flag130 (Id);
1755 end Is_Generic_Instance;
1757 function Is_Generic_Type (Id : E) return B is
1759 pragma Assert (Nkind (Id) in N_Entity);
1761 end Is_Generic_Type;
1763 function Is_Hidden (Id : E) return B is
1768 function Is_Hidden_Open_Scope (Id : E) return B is
1770 return Flag171 (Id);
1771 end Is_Hidden_Open_Scope;
1773 function Is_Immediately_Visible (Id : E) return B is
1775 pragma Assert (Nkind (Id) in N_Entity);
1777 end Is_Immediately_Visible;
1779 function Is_Imported (Id : E) return B is
1784 function Is_Inlined (Id : E) return B is
1789 function Is_Interface (Id : E) return B is
1791 return Flag186 (Id);
1794 function Is_Instantiated (Id : E) return B is
1796 return Flag126 (Id);
1797 end Is_Instantiated;
1799 function Is_Internal (Id : E) return B is
1801 pragma Assert (Nkind (Id) in N_Entity);
1805 function Is_Interrupt_Handler (Id : E) return B is
1807 pragma Assert (Nkind (Id) in N_Entity);
1809 end Is_Interrupt_Handler;
1811 function Is_Intrinsic_Subprogram (Id : E) return B is
1814 end Is_Intrinsic_Subprogram;
1816 function Is_Itype (Id : E) return B is
1821 function Is_Known_Non_Null (Id : E) return B is
1824 end Is_Known_Non_Null;
1826 function Is_Known_Null (Id : E) return B is
1828 return Flag204 (Id);
1831 function Is_Known_Valid (Id : E) return B is
1833 return Flag170 (Id);
1836 function Is_Limited_Composite (Id : E) return B is
1838 return Flag106 (Id);
1839 end Is_Limited_Composite;
1841 function Is_Limited_Interface (Id : E) return B is
1843 return Flag197 (Id);
1844 end Is_Limited_Interface;
1846 function Is_Limited_Record (Id : E) return B is
1849 end Is_Limited_Record;
1851 function Is_Machine_Code_Subprogram (Id : E) return B is
1853 pragma Assert (Is_Subprogram (Id));
1854 return Flag137 (Id);
1855 end Is_Machine_Code_Subprogram;
1857 function Is_Non_Static_Subtype (Id : E) return B is
1859 pragma Assert (Is_Type (Id));
1860 return Flag109 (Id);
1861 end Is_Non_Static_Subtype;
1863 function Is_Null_Init_Proc (Id : E) return B is
1865 pragma Assert (Ekind (Id) = E_Procedure);
1866 return Flag178 (Id);
1867 end Is_Null_Init_Proc;
1869 function Is_Obsolescent (Id : E) return B is
1871 return Flag153 (Id);
1874 function Is_Only_Out_Parameter (Id : E) return B is
1876 pragma Assert (Is_Formal (Id));
1877 return Flag226 (Id);
1878 end Is_Only_Out_Parameter;
1880 function Is_Optional_Parameter (Id : E) return B is
1882 pragma Assert (Is_Formal (Id));
1883 return Flag134 (Id);
1884 end Is_Optional_Parameter;
1886 function Is_Overriding_Operation (Id : E) return B is
1888 pragma Assert (Is_Subprogram (Id));
1890 end Is_Overriding_Operation;
1892 function Is_Package_Body_Entity (Id : E) return B is
1894 return Flag160 (Id);
1895 end Is_Package_Body_Entity;
1897 function Is_Packed (Id : E) return B is
1899 return Flag51 (Implementation_Base_Type (Id));
1902 function Is_Packed_Array_Type (Id : E) return B is
1904 return Flag138 (Id);
1905 end Is_Packed_Array_Type;
1907 function Is_Potentially_Use_Visible (Id : E) return B is
1909 pragma Assert (Nkind (Id) in N_Entity);
1911 end Is_Potentially_Use_Visible;
1913 function Is_Preelaborated (Id : E) return B is
1916 end Is_Preelaborated;
1918 function Is_Primitive (Id : E) return B is
1921 (Is_Overloadable (Id)
1922 or else Ekind (Id) = E_Generic_Function
1923 or else Ekind (Id) = E_Generic_Procedure);
1924 return Flag218 (Id);
1927 function Is_Primitive_Wrapper (Id : E) return B is
1929 pragma Assert (Ekind (Id) = E_Procedure);
1930 return Flag195 (Id);
1931 end Is_Primitive_Wrapper;
1933 function Is_Private_Composite (Id : E) return B is
1935 pragma Assert (Is_Type (Id));
1936 return Flag107 (Id);
1937 end Is_Private_Composite;
1939 function Is_Private_Descendant (Id : E) return B is
1942 end Is_Private_Descendant;
1944 function Is_Protected_Interface (Id : E) return B is
1946 pragma Assert (Is_Interface (Id));
1947 return Flag198 (Id);
1948 end Is_Protected_Interface;
1950 function Is_Public (Id : E) return B is
1952 pragma Assert (Nkind (Id) in N_Entity);
1956 function Is_Pure (Id : E) return B is
1961 function Is_Pure_Unit_Access_Type (Id : E) return B is
1963 pragma Assert (Is_Access_Type (Id));
1964 return Flag189 (Id);
1965 end Is_Pure_Unit_Access_Type;
1967 function Is_Raised (Id : E) return B is
1969 pragma Assert (Ekind (Id) = E_Exception);
1970 return Flag224 (Id);
1973 function Is_Remote_Call_Interface (Id : E) return B is
1976 end Is_Remote_Call_Interface;
1978 function Is_Remote_Types (Id : E) return B is
1981 end Is_Remote_Types;
1983 function Is_Renaming_Of_Object (Id : E) return B is
1985 return Flag112 (Id);
1986 end Is_Renaming_Of_Object;
1988 function Is_Return_Object (Id : E) return B is
1990 return Flag209 (Id);
1991 end Is_Return_Object;
1993 function Is_Shared_Passive (Id : E) return B is
1996 end Is_Shared_Passive;
1998 function Is_Statically_Allocated (Id : E) return B is
2001 end Is_Statically_Allocated;
2003 function Is_Static_Dispatch_Table_Entity (Id : E) return B is
2005 return Flag234 (Id);
2006 end Is_Static_Dispatch_Table_Entity;
2008 function Is_Synchronized_Interface (Id : E) return B is
2010 pragma Assert (Is_Interface (Id));
2011 return Flag199 (Id);
2012 end Is_Synchronized_Interface;
2014 function Is_Tag (Id : E) return B is
2016 pragma Assert (Nkind (Id) in N_Entity);
2020 function Is_Tagged_Type (Id : E) return B is
2025 function Is_Task_Interface (Id : E) return B is
2027 pragma Assert (Is_Interface (Id));
2028 return Flag200 (Id);
2029 end Is_Task_Interface;
2031 function Is_Thunk (Id : E) return B is
2033 pragma Assert (Is_Subprogram (Id));
2034 return Flag225 (Id);
2037 function Is_Trivial_Subprogram (Id : E) return B is
2039 return Flag235 (Id);
2040 end Is_Trivial_Subprogram;
2042 function Is_True_Constant (Id : E) return B is
2044 return Flag163 (Id);
2045 end Is_True_Constant;
2047 function Is_Unchecked_Union (Id : E) return B is
2049 return Flag117 (Implementation_Base_Type (Id));
2050 end Is_Unchecked_Union;
2052 function Is_Unsigned_Type (Id : E) return B is
2054 pragma Assert (Is_Type (Id));
2055 return Flag144 (Id);
2056 end Is_Unsigned_Type;
2058 function Is_Valued_Procedure (Id : E) return B is
2060 pragma Assert (Ekind (Id) = E_Procedure);
2061 return Flag127 (Id);
2062 end Is_Valued_Procedure;
2064 function Is_Visible_Child_Unit (Id : E) return B is
2066 pragma Assert (Is_Child_Unit (Id));
2067 return Flag116 (Id);
2068 end Is_Visible_Child_Unit;
2070 function Is_Visible_Formal (Id : E) return B is
2072 return Flag206 (Id);
2073 end Is_Visible_Formal;
2075 function Is_VMS_Exception (Id : E) return B is
2077 return Flag133 (Id);
2078 end Is_VMS_Exception;
2080 function Is_Volatile (Id : E) return B is
2082 pragma Assert (Nkind (Id) in N_Entity);
2084 if Is_Type (Id) then
2085 return Flag16 (Base_Type (Id));
2091 function Itype_Printed (Id : E) return B is
2093 pragma Assert (Is_Itype (Id));
2094 return Flag202 (Id);
2097 function Kill_Elaboration_Checks (Id : E) return B is
2100 end Kill_Elaboration_Checks;
2102 function Kill_Range_Checks (Id : E) return B is
2105 end Kill_Range_Checks;
2107 function Kill_Tag_Checks (Id : E) return B is
2110 end Kill_Tag_Checks;
2112 function Known_To_Have_Preelab_Init (Id : E) return B is
2114 pragma Assert (Is_Type (Id));
2115 return Flag207 (Id);
2116 end Known_To_Have_Preelab_Init;
2118 function Last_Assignment (Id : E) return N is
2120 pragma Assert (Is_Assignable (Id));
2122 end Last_Assignment;
2124 function Last_Entity (Id : E) return E is
2129 function Limited_View (Id : E) return E is
2131 pragma Assert (Ekind (Id) = E_Package);
2135 function Lit_Indexes (Id : E) return E is
2137 pragma Assert (Is_Enumeration_Type (Id));
2141 function Lit_Strings (Id : E) return E is
2143 pragma Assert (Is_Enumeration_Type (Id));
2147 function Low_Bound_Known (Id : E) return B is
2149 return Flag205 (Id);
2150 end Low_Bound_Known;
2152 function Machine_Radix_10 (Id : E) return B is
2154 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2156 end Machine_Radix_10;
2158 function Master_Id (Id : E) return E is
2160 pragma Assert (Is_Access_Type (Id));
2164 function Materialize_Entity (Id : E) return B is
2166 return Flag168 (Id);
2167 end Materialize_Entity;
2169 function Mechanism (Id : E) return M is
2171 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2172 return UI_To_Int (Uint8 (Id));
2175 function Modulus (Id : E) return Uint is
2177 pragma Assert (Is_Modular_Integer_Type (Id));
2178 return Uint17 (Base_Type (Id));
2181 function Must_Be_On_Byte_Boundary (Id : E) return B is
2183 pragma Assert (Is_Type (Id));
2184 return Flag183 (Id);
2185 end Must_Be_On_Byte_Boundary;
2187 function Must_Have_Preelab_Init (Id : E) return B is
2189 pragma Assert (Is_Type (Id));
2190 return Flag208 (Id);
2191 end Must_Have_Preelab_Init;
2193 function Needs_Debug_Info (Id : E) return B is
2195 return Flag147 (Id);
2196 end Needs_Debug_Info;
2198 function Needs_No_Actuals (Id : E) return B is
2201 (Is_Overloadable (Id)
2202 or else Ekind (Id) = E_Subprogram_Type
2203 or else Ekind (Id) = E_Entry_Family);
2205 end Needs_No_Actuals;
2207 function Never_Set_In_Source (Id : E) return B is
2209 return Flag115 (Id);
2210 end Never_Set_In_Source;
2212 function Next_Inlined_Subprogram (Id : E) return E is
2215 end Next_Inlined_Subprogram;
2217 function No_Pool_Assigned (Id : E) return B is
2219 pragma Assert (Is_Access_Type (Id));
2220 return Flag131 (Root_Type (Id));
2221 end No_Pool_Assigned;
2223 function No_Return (Id : E) return B is
2225 return Flag113 (Id);
2228 function No_Strict_Aliasing (Id : E) return B is
2230 pragma Assert (Is_Access_Type (Id));
2231 return Flag136 (Base_Type (Id));
2232 end No_Strict_Aliasing;
2234 function Non_Binary_Modulus (Id : E) return B is
2236 pragma Assert (Is_Modular_Integer_Type (Id));
2237 return Flag58 (Base_Type (Id));
2238 end Non_Binary_Modulus;
2240 function Non_Limited_View (Id : E) return E is
2242 pragma Assert (Ekind (Id) in Incomplete_Kind);
2244 end Non_Limited_View;
2246 function Nonzero_Is_True (Id : E) return B is
2248 pragma Assert (Root_Type (Id) = Standard_Boolean);
2249 return Flag162 (Base_Type (Id));
2250 end Nonzero_Is_True;
2252 function Normalized_First_Bit (Id : E) return U is
2255 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
2257 end Normalized_First_Bit;
2259 function Normalized_Position (Id : E) return U is
2262 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
2264 end Normalized_Position;
2266 function Normalized_Position_Max (Id : E) return U is
2269 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
2271 end Normalized_Position_Max;
2273 function Object_Ref (Id : E) return E is
2275 pragma Assert (Ekind (Id) = E_Protected_Body);
2279 function Obsolescent_Warning (Id : E) return N is
2282 end Obsolescent_Warning;
2284 function OK_To_Reorder_Components (Id : E) return B is
2286 pragma Assert (Is_Record_Type (Id));
2287 return Flag239 (Base_Type (Id));
2288 end OK_To_Reorder_Components;
2290 function Original_Array_Type (Id : E) return E is
2292 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2294 end Original_Array_Type;
2296 function Original_Record_Component (Id : E) return E is
2299 (Ekind (Id) = E_Void
2300 or else Ekind (Id) = E_Component
2301 or else Ekind (Id) = E_Discriminant);
2303 end Original_Record_Component;
2305 function Overridden_Operation (Id : E) return E is
2308 end Overridden_Operation;
2310 function Package_Instantiation (Id : E) return N is
2314 or else Ekind (Id) = E_Generic_Package
2315 or else Ekind (Id) = E_Package);
2317 end Package_Instantiation;
2319 function Packed_Array_Type (Id : E) return E is
2321 pragma Assert (Is_Array_Type (Id));
2323 end Packed_Array_Type;
2325 function Parent_Subtype (Id : E) return E is
2327 pragma Assert (Ekind (Id) = E_Record_Type);
2331 function Primitive_Operations (Id : E) return L is
2333 pragma Assert (Is_Tagged_Type (Id));
2334 return Elist15 (Id);
2335 end Primitive_Operations;
2337 function Prival (Id : E) return E is
2339 pragma Assert (Is_Protected_Private (Id));
2343 function Privals_Chain (Id : E) return L is
2345 pragma Assert (Is_Overloadable (Id)
2346 or else Ekind (Id) = E_Entry_Family);
2347 return Elist23 (Id);
2350 function Private_Dependents (Id : E) return L is
2352 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2353 return Elist18 (Id);
2354 end Private_Dependents;
2356 function Private_View (Id : E) return N is
2358 pragma Assert (Is_Private_Type (Id));
2362 function Protected_Body_Subprogram (Id : E) return E is
2364 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2366 end Protected_Body_Subprogram;
2368 function Protected_Formal (Id : E) return E is
2370 pragma Assert (Is_Formal (Id));
2372 end Protected_Formal;
2374 function Protected_Operation (Id : E) return N is
2376 pragma Assert (Is_Protected_Private (Id));
2378 end Protected_Operation;
2380 function Reachable (Id : E) return B is
2385 function Referenced (Id : E) return B is
2387 return Flag156 (Id);
2390 function Referenced_As_LHS (Id : E) return B is
2393 end Referenced_As_LHS;
2395 function Referenced_As_Out_Parameter (Id : E) return B is
2397 return Flag227 (Id);
2398 end Referenced_As_Out_Parameter;
2400 function Referenced_Object (Id : E) return N is
2402 pragma Assert (Is_Type (Id));
2404 end Referenced_Object;
2406 function Register_Exception_Call (Id : E) return N is
2408 pragma Assert (Ekind (Id) = E_Exception);
2410 end Register_Exception_Call;
2412 function Related_Array_Object (Id : E) return E is
2414 pragma Assert (Is_Array_Type (Id));
2416 end Related_Array_Object;
2418 function Related_Instance (Id : E) return E is
2421 (Ekind (Id) = E_Package or else Ekind (Id) = E_Package_Body);
2423 end Related_Instance;
2425 function Related_Type (Id : E) return E is
2428 (Ekind (Id) = E_Component or else Ekind (Id) = E_Constant);
2432 function Renamed_Entity (Id : E) return N is
2437 function Renamed_In_Spec (Id : E) return B is
2439 pragma Assert (Ekind (Id) = E_Package);
2440 return Flag231 (Id);
2441 end Renamed_In_Spec;
2443 function Renamed_Object (Id : E) return N is
2448 function Renaming_Map (Id : E) return U is
2453 function Requires_Overriding (Id : E) return B is
2455 pragma Assert (Is_Overloadable (Id));
2456 return Flag213 (Id);
2457 end Requires_Overriding;
2459 function Return_Present (Id : E) return B is
2464 function Return_Applies_To (Id : E) return N is
2467 end Return_Applies_To;
2469 function Returns_By_Ref (Id : E) return B is
2474 function Reverse_Bit_Order (Id : E) return B is
2476 pragma Assert (Is_Record_Type (Id));
2477 return Flag164 (Base_Type (Id));
2478 end Reverse_Bit_Order;
2480 function RM_Size (Id : E) return U is
2482 pragma Assert (Is_Type (Id));
2486 function Scalar_Range (Id : E) return N is
2491 function Scale_Value (Id : E) return U is
2496 function Scope_Depth_Value (Id : E) return U is
2499 end Scope_Depth_Value;
2501 function Sec_Stack_Needed_For_Return (Id : E) return B is
2503 return Flag167 (Id);
2504 end Sec_Stack_Needed_For_Return;
2506 function Shadow_Entities (Id : E) return S is
2509 (Ekind (Id) = E_Package or else Ekind (Id) = E_Generic_Package);
2511 end Shadow_Entities;
2513 function Shared_Var_Assign_Proc (Id : E) return E is
2515 pragma Assert (Ekind (Id) = E_Variable);
2517 end Shared_Var_Assign_Proc;
2519 function Shared_Var_Read_Proc (Id : E) return E is
2521 pragma Assert (Ekind (Id) = E_Variable);
2523 end Shared_Var_Read_Proc;
2525 function Size_Check_Code (Id : E) return N is
2527 pragma Assert (Ekind (Id) = E_Constant or else Ekind (Id) = E_Variable);
2529 end Size_Check_Code;
2531 function Size_Depends_On_Discriminant (Id : E) return B is
2533 return Flag177 (Id);
2534 end Size_Depends_On_Discriminant;
2536 function Size_Known_At_Compile_Time (Id : E) return B is
2539 end Size_Known_At_Compile_Time;
2541 function Small_Value (Id : E) return R is
2543 pragma Assert (Is_Fixed_Point_Type (Id));
2544 return Ureal21 (Id);
2547 function Spec_Entity (Id : E) return E is
2550 (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2554 function Storage_Size_Variable (Id : E) return E is
2556 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2557 return Node15 (Implementation_Base_Type (Id));
2558 end Storage_Size_Variable;
2560 function Static_Elaboration_Desired (Id : E) return B is
2562 pragma Assert (Ekind (Id) = E_Package);
2564 end Static_Elaboration_Desired;
2566 function Static_Initialization (Id : E) return N is
2569 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
2571 end Static_Initialization;
2573 function Stored_Constraint (Id : E) return L is
2576 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
2577 return Elist23 (Id);
2578 end Stored_Constraint;
2580 function Strict_Alignment (Id : E) return B is
2582 return Flag145 (Implementation_Base_Type (Id));
2583 end Strict_Alignment;
2585 function String_Literal_Length (Id : E) return U is
2588 end String_Literal_Length;
2590 function String_Literal_Low_Bound (Id : E) return N is
2593 end String_Literal_Low_Bound;
2595 function Suppress_Elaboration_Warnings (Id : E) return B is
2597 return Flag148 (Id);
2598 end Suppress_Elaboration_Warnings;
2600 function Suppress_Init_Proc (Id : E) return B is
2602 return Flag105 (Base_Type (Id));
2603 end Suppress_Init_Proc;
2605 function Suppress_Style_Checks (Id : E) return B is
2607 return Flag165 (Id);
2608 end Suppress_Style_Checks;
2610 function Suppress_Value_Tracking_On_Call (Id : E) return B is
2612 return Flag217 (Id);
2613 end Suppress_Value_Tracking_On_Call;
2615 function Task_Body_Procedure (Id : E) return N is
2617 pragma Assert (Ekind (Id) in Task_Kind);
2619 end Task_Body_Procedure;
2621 function Treat_As_Volatile (Id : E) return B is
2624 end Treat_As_Volatile;
2626 function Underlying_Full_View (Id : E) return E is
2628 pragma Assert (Ekind (Id) in Private_Kind);
2630 end Underlying_Full_View;
2632 function Universal_Aliasing (Id : E) return B is
2634 pragma Assert (Is_Type (Id));
2635 return Flag216 (Base_Type (Id));
2636 end Universal_Aliasing;
2638 function Unset_Reference (Id : E) return N is
2641 end Unset_Reference;
2643 function Used_As_Generic_Actual (Id : E) return B is
2645 return Flag222 (Id);
2646 end Used_As_Generic_Actual;
2648 function Uses_Sec_Stack (Id : E) return B is
2653 function Vax_Float (Id : E) return B is
2655 return Flag151 (Base_Type (Id));
2658 function Warnings_Off (Id : E) return B is
2663 function Warnings_Off_Used (Id : E) return B is
2665 return Flag236 (Id);
2666 end Warnings_Off_Used;
2668 function Warnings_Off_Used_Unmodified (Id : E) return B is
2670 return Flag237 (Id);
2671 end Warnings_Off_Used_Unmodified;
2673 function Warnings_Off_Used_Unreferenced (Id : E) return B is
2675 return Flag238 (Id);
2676 end Warnings_Off_Used_Unreferenced;
2678 function Wrapped_Entity (Id : E) return E is
2680 pragma Assert (Ekind (Id) = E_Procedure
2681 and then Is_Primitive_Wrapper (Id));
2685 function Was_Hidden (Id : E) return B is
2687 return Flag196 (Id);
2690 ------------------------------
2691 -- Classification Functions --
2692 ------------------------------
2694 function Is_Access_Type (Id : E) return B is
2696 return Ekind (Id) in Access_Kind;
2699 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
2701 return Ekind (Id) in Access_Protected_Kind;
2702 end Is_Access_Protected_Subprogram_Type;
2704 function Is_Access_Subprogram_Type (Id : E) return B is
2706 return Ekind (Id) in Access_Subprogram_Kind;
2707 end Is_Access_Subprogram_Type;
2709 function Is_Array_Type (Id : E) return B is
2711 return Ekind (Id) in Array_Kind;
2714 function Is_Assignable (Id : E) return B is
2716 return Ekind (Id) in Assignable_Kind;
2719 function Is_Class_Wide_Type (Id : E) return B is
2721 return Ekind (Id) in Class_Wide_Kind;
2722 end Is_Class_Wide_Type;
2724 function Is_Composite_Type (Id : E) return B is
2726 return Ekind (Id) in Composite_Kind;
2727 end Is_Composite_Type;
2729 function Is_Concurrent_Body (Id : E) return B is
2731 return Ekind (Id) in
2732 Concurrent_Body_Kind;
2733 end Is_Concurrent_Body;
2735 function Is_Concurrent_Record_Type (Id : E) return B is
2738 end Is_Concurrent_Record_Type;
2740 function Is_Concurrent_Type (Id : E) return B is
2742 return Ekind (Id) in Concurrent_Kind;
2743 end Is_Concurrent_Type;
2745 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
2747 return Ekind (Id) in
2748 Decimal_Fixed_Point_Kind;
2749 end Is_Decimal_Fixed_Point_Type;
2751 function Is_Digits_Type (Id : E) return B is
2753 return Ekind (Id) in Digits_Kind;
2756 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
2758 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
2759 end Is_Discrete_Or_Fixed_Point_Type;
2761 function Is_Discrete_Type (Id : E) return B is
2763 return Ekind (Id) in Discrete_Kind;
2764 end Is_Discrete_Type;
2766 function Is_Elementary_Type (Id : E) return B is
2768 return Ekind (Id) in Elementary_Kind;
2769 end Is_Elementary_Type;
2771 function Is_Entry (Id : E) return B is
2773 return Ekind (Id) in Entry_Kind;
2776 function Is_Enumeration_Type (Id : E) return B is
2778 return Ekind (Id) in
2780 end Is_Enumeration_Type;
2782 function Is_Fixed_Point_Type (Id : E) return B is
2784 return Ekind (Id) in
2786 end Is_Fixed_Point_Type;
2788 function Is_Floating_Point_Type (Id : E) return B is
2790 return Ekind (Id) in Float_Kind;
2791 end Is_Floating_Point_Type;
2793 function Is_Formal (Id : E) return B is
2795 return Ekind (Id) in Formal_Kind;
2798 function Is_Formal_Object (Id : E) return B is
2800 return Ekind (Id) in Formal_Object_Kind;
2801 end Is_Formal_Object;
2803 function Is_Generic_Subprogram (Id : E) return B is
2805 return Ekind (Id) in Generic_Subprogram_Kind;
2806 end Is_Generic_Subprogram;
2808 function Is_Generic_Unit (Id : E) return B is
2810 return Ekind (Id) in Generic_Unit_Kind;
2811 end Is_Generic_Unit;
2813 function Is_Incomplete_Or_Private_Type (Id : E) return B is
2815 return Ekind (Id) in
2816 Incomplete_Or_Private_Kind;
2817 end Is_Incomplete_Or_Private_Type;
2819 function Is_Incomplete_Type (Id : E) return B is
2821 return Ekind (Id) in
2823 end Is_Incomplete_Type;
2825 function Is_Integer_Type (Id : E) return B is
2827 return Ekind (Id) in Integer_Kind;
2828 end Is_Integer_Type;
2830 function Is_Modular_Integer_Type (Id : E) return B is
2832 return Ekind (Id) in
2833 Modular_Integer_Kind;
2834 end Is_Modular_Integer_Type;
2836 function Is_Named_Number (Id : E) return B is
2838 return Ekind (Id) in Named_Kind;
2839 end Is_Named_Number;
2841 function Is_Numeric_Type (Id : E) return B is
2843 return Ekind (Id) in Numeric_Kind;
2844 end Is_Numeric_Type;
2846 function Is_Object (Id : E) return B is
2848 return Ekind (Id) in Object_Kind;
2851 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
2853 return Ekind (Id) in
2854 Ordinary_Fixed_Point_Kind;
2855 end Is_Ordinary_Fixed_Point_Type;
2857 function Is_Overloadable (Id : E) return B is
2859 return Ekind (Id) in Overloadable_Kind;
2860 end Is_Overloadable;
2862 function Is_Private_Type (Id : E) return B is
2864 return Ekind (Id) in Private_Kind;
2865 end Is_Private_Type;
2867 function Is_Protected_Type (Id : E) return B is
2869 return Ekind (Id) in Protected_Kind;
2870 end Is_Protected_Type;
2872 function Is_Real_Type (Id : E) return B is
2874 return Ekind (Id) in Real_Kind;
2877 function Is_Record_Type (Id : E) return B is
2879 return Ekind (Id) in Record_Kind;
2882 function Is_Scalar_Type (Id : E) return B is
2884 return Ekind (Id) in Scalar_Kind;
2887 function Is_Signed_Integer_Type (Id : E) return B is
2889 return Ekind (Id) in
2890 Signed_Integer_Kind;
2891 end Is_Signed_Integer_Type;
2893 function Is_Subprogram (Id : E) return B is
2895 return Ekind (Id) in Subprogram_Kind;
2898 function Is_Task_Type (Id : E) return B is
2900 return Ekind (Id) in Task_Kind;
2903 function Is_Type (Id : E) return B is
2905 return Ekind (Id) in Type_Kind;
2908 ------------------------------
2909 -- Attribute Set Procedures --
2910 ------------------------------
2912 procedure Set_Abstract_Interfaces (Id : E; V : L) is
2914 pragma Assert (Is_Record_Type (Id));
2915 Set_Elist25 (Id, V);
2916 end Set_Abstract_Interfaces;
2918 procedure Set_Abstract_Interface_Alias (Id : E; V : E) is
2923 (Ekind (Id) = E_Procedure or else Ekind (Id) = E_Function));
2925 end Set_Abstract_Interface_Alias;
2927 procedure Set_Accept_Address (Id : E; V : L) is
2929 Set_Elist21 (Id, V);
2930 end Set_Accept_Address;
2932 procedure Set_Access_Disp_Table (Id : E; V : L) is
2934 pragma Assert (Is_Tagged_Type (Id) and then Id = Base_Type (Id));
2935 Set_Elist16 (Id, V);
2936 end Set_Access_Disp_Table;
2938 procedure Set_Associated_Final_Chain (Id : E; V : E) is
2940 pragma Assert (Is_Access_Type (Id));
2942 end Set_Associated_Final_Chain;
2944 procedure Set_Associated_Formal_Package (Id : E; V : E) is
2947 end Set_Associated_Formal_Package;
2949 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
2952 end Set_Associated_Node_For_Itype;
2954 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
2956 pragma Assert (Is_Access_Type (Id) and then Id = Base_Type (Id));
2958 end Set_Associated_Storage_Pool;
2960 procedure Set_Actual_Subtype (Id : E; V : E) is
2963 (Ekind (Id) = E_Constant
2964 or else Ekind (Id) = E_Variable
2965 or else Ekind (Id) = E_Generic_In_Out_Parameter
2966 or else Is_Formal (Id));
2968 end Set_Actual_Subtype;
2970 procedure Set_Address_Taken (Id : E; V : B := True) is
2972 Set_Flag104 (Id, V);
2973 end Set_Address_Taken;
2975 procedure Set_Alias (Id : E; V : E) is
2978 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
2982 procedure Set_Alignment (Id : E; V : U) is
2984 pragma Assert (Is_Type (Id)
2985 or else Is_Formal (Id)
2986 or else Ekind (Id) = E_Loop_Parameter
2987 or else Ekind (Id) = E_Constant
2988 or else Ekind (Id) = E_Exception
2989 or else Ekind (Id) = E_Variable);
2993 procedure Set_Barrier_Function (Id : E; V : N) is
2995 pragma Assert (Is_Entry (Id));
2997 end Set_Barrier_Function;
2999 procedure Set_Block_Node (Id : E; V : N) is
3001 pragma Assert (Ekind (Id) = E_Block);
3005 procedure Set_Body_Entity (Id : E; V : E) is
3008 (Ekind (Id) = E_Package or else Ekind (Id) = E_Generic_Package);
3010 end Set_Body_Entity;
3012 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3015 (Ekind (Id) = E_Package
3016 or else Is_Subprogram (Id)
3017 or else Is_Generic_Unit (Id));
3019 end Set_Body_Needed_For_SAL;
3021 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3023 pragma Assert (Is_Record_Type (Id) and then Id = Base_Type (Id));
3024 Set_Flag125 (Id, V);
3025 end Set_C_Pass_By_Copy;
3027 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3030 end Set_Can_Never_Be_Null;
3032 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3035 end Set_Checks_May_Be_Suppressed;
3037 procedure Set_Class_Wide_Type (Id : E; V : E) is
3039 pragma Assert (Is_Type (Id));
3041 end Set_Class_Wide_Type;
3043 procedure Set_Cloned_Subtype (Id : E; V : E) is
3046 (Ekind (Id) = E_Record_Subtype
3047 or else Ekind (Id) = E_Class_Wide_Subtype);
3049 end Set_Cloned_Subtype;
3051 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3054 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
3056 end Set_Component_Bit_Offset;
3058 procedure Set_Component_Clause (Id : E; V : N) is
3061 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
3063 end Set_Component_Clause;
3065 procedure Set_Component_Size (Id : E; V : U) is
3067 pragma Assert (Is_Array_Type (Id) and then Id = Base_Type (Id));
3069 end Set_Component_Size;
3071 procedure Set_Component_Type (Id : E; V : E) is
3073 pragma Assert (Is_Array_Type (Id) and then Id = Base_Type (Id));
3075 end Set_Component_Type;
3077 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3080 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3082 end Set_Corresponding_Concurrent_Type;
3084 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3086 pragma Assert (Ekind (Id) = E_Discriminant);
3088 end Set_Corresponding_Discriminant;
3090 procedure Set_Corresponding_Equality (Id : E; V : E) is
3093 (Ekind (Id) = E_Function
3094 and then not Comes_From_Source (Id)
3095 and then Chars (Id) = Name_Op_Ne);
3097 end Set_Corresponding_Equality;
3099 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3101 pragma Assert (Is_Concurrent_Type (Id));
3103 end Set_Corresponding_Record_Type;
3105 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3108 end Set_Corresponding_Remote_Type;
3110 procedure Set_Current_Use_Clause (Id : E; V : E) is
3112 pragma Assert (Ekind (Id) = E_Package);
3114 end Set_Current_Use_Clause;
3116 procedure Set_Current_Value (Id : E; V : N) is
3118 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3120 end Set_Current_Value;
3122 procedure Set_CR_Discriminant (Id : E; V : E) is
3125 end Set_CR_Discriminant;
3127 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3129 Set_Flag166 (Id, V);
3130 end Set_Debug_Info_Off;
3132 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3135 end Set_Debug_Renaming_Link;
3137 procedure Set_Default_Expr_Function (Id : E; V : E) is
3139 pragma Assert (Is_Formal (Id));
3141 end Set_Default_Expr_Function;
3143 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3145 Set_Flag108 (Id, V);
3146 end Set_Default_Expressions_Processed;
3148 procedure Set_Default_Value (Id : E; V : N) is
3150 pragma Assert (Is_Formal (Id));
3152 end Set_Default_Value;
3154 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3158 or else Is_Task_Type (Id)
3159 or else Ekind (Id) = E_Block);
3160 Set_Flag114 (Id, V);
3161 end Set_Delay_Cleanups;
3163 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3167 or else Ekind (Id) = E_Package
3168 or else Ekind (Id) = E_Package_Body);
3170 end Set_Delay_Subprogram_Descriptors;
3172 procedure Set_Delta_Value (Id : E; V : R) is
3174 pragma Assert (Is_Fixed_Point_Type (Id));
3175 Set_Ureal18 (Id, V);
3176 end Set_Delta_Value;
3178 procedure Set_Dependent_Instances (Id : E; V : L) is
3180 pragma Assert (Is_Generic_Instance (Id));
3182 end Set_Dependent_Instances;
3184 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3186 pragma Assert (Nkind (Id) in N_Entity);
3188 end Set_Depends_On_Private;
3190 procedure Set_Digits_Value (Id : E; V : U) is
3193 (Is_Floating_Point_Type (Id)
3194 or else Is_Decimal_Fixed_Point_Type (Id));
3196 end Set_Digits_Value;
3198 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3201 end Set_Directly_Designated_Type;
3203 procedure Set_Discard_Names (Id : E; V : B := True) is
3206 end Set_Discard_Names;
3208 procedure Set_Discriminal (Id : E; V : E) is
3210 pragma Assert (Ekind (Id) = E_Discriminant);
3212 end Set_Discriminal;
3214 procedure Set_Discriminal_Link (Id : E; V : E) is
3217 end Set_Discriminal_Link;
3219 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3221 pragma Assert (Ekind (Id) = E_Component);
3223 end Set_Discriminant_Checking_Func;
3225 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3227 pragma Assert (Nkind (Id) in N_Entity);
3228 Set_Elist21 (Id, V);
3229 end Set_Discriminant_Constraint;
3231 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3234 end Set_Discriminant_Default_Value;
3236 procedure Set_Discriminant_Number (Id : E; V : U) is
3239 end Set_Discriminant_Number;
3241 procedure Set_Dispatch_Table_Wrapper (Id : E; V : E) is
3243 pragma Assert (Is_Tagged_Type (Id) and then Id = Base_Type (Id));
3245 end Set_Dispatch_Table_Wrapper;
3247 procedure Set_DT_Entry_Count (Id : E; V : U) is
3249 pragma Assert (Ekind (Id) = E_Component);
3251 end Set_DT_Entry_Count;
3253 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3255 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3257 end Set_DT_Offset_To_Top_Func;
3259 procedure Set_DT_Position (Id : E; V : U) is
3261 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
3263 end Set_DT_Position;
3265 procedure Set_DTC_Entity (Id : E; V : E) is
3268 (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
3272 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3274 pragma Assert (Ekind (Id) = E_Package);
3275 Set_Flag210 (Id, V);
3276 end Set_Elaborate_Body_Desirable;
3278 procedure Set_Elaboration_Entity (Id : E; V : E) is
3283 Ekind (Id) = E_Package
3285 Is_Generic_Unit (Id));
3287 end Set_Elaboration_Entity;
3289 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3294 Ekind (Id) = E_Package
3296 Is_Generic_Unit (Id));
3297 Set_Flag174 (Id, V);
3298 end Set_Elaboration_Entity_Required;
3300 procedure Set_Enclosing_Scope (Id : E; V : E) is
3303 end Set_Enclosing_Scope;
3305 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3307 pragma Assert (Is_Entry (Id));
3308 Set_Flag152 (Id, V);
3309 end Set_Entry_Accepted;
3311 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3314 end Set_Entry_Bodies_Array;
3316 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3319 end Set_Entry_Cancel_Parameter;
3321 procedure Set_Entry_Component (Id : E; V : E) is
3324 end Set_Entry_Component;
3326 procedure Set_Entry_Formal (Id : E; V : E) is
3329 end Set_Entry_Formal;
3331 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3333 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3335 end Set_Entry_Index_Constant;
3337 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3340 end Set_Entry_Parameters_Type;
3342 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3344 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3346 end Set_Enum_Pos_To_Rep;
3348 procedure Set_Enumeration_Pos (Id : E; V : U) is
3350 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3352 end Set_Enumeration_Pos;
3354 procedure Set_Enumeration_Rep (Id : E; V : U) is
3356 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3358 end Set_Enumeration_Rep;
3360 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3362 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3364 end Set_Enumeration_Rep_Expr;
3366 procedure Set_Equivalent_Type (Id : E; V : E) is
3369 (Ekind (Id) = E_Class_Wide_Type or else
3370 Ekind (Id) = E_Class_Wide_Subtype or else
3371 Ekind (Id) = E_Access_Protected_Subprogram_Type or else
3372 Ekind (Id) = E_Anonymous_Access_Protected_Subprogram_Type or else
3373 Ekind (Id) = E_Access_Subprogram_Type or else
3374 Ekind (Id) = E_Exception_Type);
3376 end Set_Equivalent_Type;
3378 procedure Set_Esize (Id : E; V : U) is
3383 procedure Set_Exception_Code (Id : E; V : U) is
3385 pragma Assert (Ekind (Id) = E_Exception);
3387 end Set_Exception_Code;
3389 procedure Set_Extra_Accessibility (Id : E; V : E) is
3391 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3393 end Set_Extra_Accessibility;
3395 procedure Set_Extra_Constrained (Id : E; V : E) is
3397 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3399 end Set_Extra_Constrained;
3401 procedure Set_Extra_Formal (Id : E; V : E) is
3404 end Set_Extra_Formal;
3406 procedure Set_Extra_Formals (Id : E; V : E) is
3409 (Is_Overloadable (Id)
3410 or else Ekind (Id) = E_Entry_Family
3411 or else Ekind (Id) = E_Subprogram_Body
3412 or else Ekind (Id) = E_Subprogram_Type);
3414 end Set_Extra_Formals;
3416 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3418 pragma Assert (Is_Access_Subprogram_Type (Id));
3419 Set_Flag229 (Id, V);
3420 end Set_Can_Use_Internal_Rep;
3422 procedure Set_Finalization_Chain_Entity (Id : E; V : E) is
3425 end Set_Finalization_Chain_Entity;
3427 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3429 pragma Assert (Is_Type (Id) and then Id = Base_Type (Id));
3430 Set_Flag158 (Id, V);
3431 end Set_Finalize_Storage_Only;
3433 procedure Set_First_Entity (Id : E; V : E) is
3436 end Set_First_Entity;
3438 procedure Set_First_Index (Id : E; V : N) is
3440 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3442 end Set_First_Index;
3444 procedure Set_First_Literal (Id : E; V : E) is
3446 pragma Assert (Is_Enumeration_Type (Id));
3448 end Set_First_Literal;
3450 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3453 (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
3455 end Set_First_Optional_Parameter;
3457 procedure Set_First_Private_Entity (Id : E; V : E) is
3459 pragma Assert (Ekind (Id) = E_Package
3460 or else Ekind (Id) = E_Generic_Package
3461 or else Ekind (Id) in Concurrent_Kind);
3463 end Set_First_Private_Entity;
3465 procedure Set_First_Rep_Item (Id : E; V : N) is
3468 end Set_First_Rep_Item;
3470 procedure Set_Freeze_Node (Id : E; V : N) is
3473 end Set_Freeze_Node;
3475 procedure Set_From_With_Type (Id : E; V : B := True) is
3479 or else Ekind (Id) = E_Package);
3480 Set_Flag159 (Id, V);
3481 end Set_From_With_Type;
3483 procedure Set_Full_View (Id : E; V : E) is
3485 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
3489 procedure Set_Function_Returns_With_DSP (Id : E; V : B := True) is
3492 (Is_Subprogram (Id) or else Ekind (Id) = E_Subprogram_Type);
3493 Set_Flag169 (Id, V);
3494 end Set_Function_Returns_With_DSP;
3496 procedure Set_Generic_Homonym (Id : E; V : E) is
3499 end Set_Generic_Homonym;
3501 procedure Set_Generic_Renamings (Id : E; V : L) is
3503 Set_Elist23 (Id, V);
3504 end Set_Generic_Renamings;
3506 procedure Set_Handler_Records (Id : E; V : S) is
3509 end Set_Handler_Records;
3511 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
3513 pragma Assert (Base_Type (Id) = Id);
3514 Set_Flag135 (Id, V);
3515 end Set_Has_Aliased_Components;
3517 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
3520 end Set_Has_Alignment_Clause;
3522 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
3525 end Set_Has_All_Calls_Remote;
3527 procedure Set_Has_Anon_Block_Suffix (Id : E; V : B := True) is
3529 Set_Flag201 (Id, V);
3530 end Set_Has_Anon_Block_Suffix;
3532 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
3534 pragma Assert (not Is_Type (Id) or else Base_Type (Id) = Id);
3536 end Set_Has_Atomic_Components;
3538 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
3541 ((V = False) or else (Is_Discrete_Type (Id) or Is_Object (Id)));
3542 Set_Flag139 (Id, V);
3543 end Set_Has_Biased_Representation;
3545 procedure Set_Has_Completion (Id : E; V : B := True) is
3548 end Set_Has_Completion;
3550 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
3552 pragma Assert (Is_Type (Id));
3554 end Set_Has_Completion_In_Body;
3556 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
3558 pragma Assert (Ekind (Id) = E_Record_Type);
3559 Set_Flag140 (Id, V);
3560 end Set_Has_Complex_Representation;
3562 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
3564 pragma Assert (Ekind (Id) = E_Array_Type);
3566 end Set_Has_Component_Size_Clause;
3568 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
3570 pragma Assert (Is_Type (Id));
3571 Set_Flag187 (Id, V);
3572 end Set_Has_Constrained_Partial_View;
3574 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
3576 Set_Flag181 (Id, V);
3577 end Set_Has_Contiguous_Rep;
3579 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
3581 pragma Assert (Base_Type (Id) = Id);
3583 end Set_Has_Controlled_Component;
3585 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
3588 end Set_Has_Controlling_Result;
3590 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
3592 Set_Flag119 (Id, V);
3593 end Set_Has_Convention_Pragma;
3595 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
3597 pragma Assert (Nkind (Id) in N_Entity);
3599 end Set_Has_Delayed_Freeze;
3601 procedure Set_Has_Discriminants (Id : E; V : B := True) is
3603 pragma Assert (Nkind (Id) in N_Entity);
3605 end Set_Has_Discriminants;
3607 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
3609 pragma Assert (Ekind (Id) = E_Record_Type
3610 and then Is_Tagged_Type (Id));
3611 Set_Flag220 (Id, V);
3612 end Set_Has_Dispatch_Table;
3614 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
3616 pragma Assert (Is_Enumeration_Type (Id));
3618 end Set_Has_Enumeration_Rep_Clause;
3620 procedure Set_Has_Exit (Id : E; V : B := True) is
3625 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True) is
3627 pragma Assert (Is_Tagged_Type (Id));
3628 Set_Flag110 (Id, V);
3629 end Set_Has_External_Tag_Rep_Clause;
3631 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
3633 Set_Flag175 (Id, V);
3634 end Set_Has_Forward_Instantiation;
3636 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
3638 Set_Flag173 (Id, V);
3639 end Set_Has_Fully_Qualified_Name;
3641 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
3644 end Set_Has_Gigi_Rep_Item;
3646 procedure Set_Has_Homonym (Id : E; V : B := True) is
3649 end Set_Has_Homonym;
3651 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
3654 (Ekind (Id) = E_Variable or else Ekind (Id) = E_Out_Parameter);
3655 Set_Flag219 (Id, V);
3656 end Set_Has_Initial_Value;
3658 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
3660 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
3662 end Set_Has_Machine_Radix_Clause;
3664 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
3667 end Set_Has_Master_Entity;
3669 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
3672 (Ekind (Id) = E_Function or else Ekind (Id) = E_Generic_Function);
3673 Set_Flag142 (Id, V);
3674 end Set_Has_Missing_Return;
3676 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
3678 Set_Flag101 (Id, V);
3679 end Set_Has_Nested_Block_With_Handler;
3681 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
3684 (Ekind (Id) = E_Variable
3685 or else Ekind (Id) = E_Constant
3686 or else Ekind (Id) = E_Loop_Parameter);
3687 Set_Flag215 (Id, V);
3688 end Set_Has_Up_Level_Access;
3690 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
3692 pragma Assert (Base_Type (Id) = Id);
3694 end Set_Has_Non_Standard_Rep;
3696 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
3698 pragma Assert (Is_Type (Id));
3699 Set_Flag172 (Id, V);
3700 end Set_Has_Object_Size_Clause;
3702 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
3704 Set_Flag154 (Id, V);
3705 end Set_Has_Per_Object_Constraint;
3707 procedure Set_Has_Persistent_BSS (Id : E; V : B := True) is
3709 Set_Flag188 (Id, V);
3710 end Set_Has_Persistent_BSS;
3712 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
3714 pragma Assert (Is_Access_Type (Id));
3715 Set_Flag27 (Base_Type (Id), V);
3716 end Set_Has_Pragma_Controlled;
3718 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
3720 Set_Flag150 (Id, V);
3721 end Set_Has_Pragma_Elaborate_Body;
3723 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
3725 Set_Flag157 (Id, V);
3726 end Set_Has_Pragma_Inline;
3728 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
3730 Set_Flag230 (Id, V);
3731 end Set_Has_Pragma_Inline_Always;
3733 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
3735 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
3736 pragma Assert (Id = Base_Type (Id));
3737 Set_Flag121 (Id, V);
3738 end Set_Has_Pragma_Pack;
3740 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
3742 Set_Flag221 (Id, V);
3743 end Set_Has_Pragma_Preelab_Init;
3745 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
3747 Set_Flag203 (Id, V);
3748 end Set_Has_Pragma_Pure;
3750 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
3752 Set_Flag179 (Id, V);
3753 end Set_Has_Pragma_Pure_Function;
3755 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
3757 Set_Flag233 (Id, V);
3758 end Set_Has_Pragma_Unmodified;
3760 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
3762 Set_Flag180 (Id, V);
3763 end Set_Has_Pragma_Unreferenced;
3765 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
3767 pragma Assert (Is_Type (Id));
3768 Set_Flag212 (Id, V);
3769 end Set_Has_Pragma_Unreferenced_Objects;
3771 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
3773 pragma Assert (Id = Base_Type (Id));
3774 Set_Flag120 (Id, V);
3775 end Set_Has_Primitive_Operations;
3777 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
3779 Set_Flag155 (Id, V);
3780 end Set_Has_Private_Declaration;
3782 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
3784 Set_Flag161 (Id, V);
3785 end Set_Has_Qualified_Name;
3787 procedure Set_Has_RACW (Id : E; V : B := True) is
3789 pragma Assert (Ekind (Id) = E_Package);
3790 Set_Flag214 (Id, V);
3793 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
3795 pragma Assert (Id = Base_Type (Id));
3797 end Set_Has_Record_Rep_Clause;
3799 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
3801 pragma Assert (Is_Subprogram (Id));
3802 Set_Flag143 (Id, V);
3803 end Set_Has_Recursive_Call;
3805 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
3808 end Set_Has_Size_Clause;
3810 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
3813 end Set_Has_Small_Clause;
3815 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
3817 pragma Assert (Id = Base_Type (Id));
3818 Set_Flag100 (Id, V);
3819 end Set_Has_Specified_Layout;
3821 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
3823 pragma Assert (Is_Type (Id));
3824 Set_Flag190 (Id, V);
3825 end Set_Has_Specified_Stream_Input;
3827 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
3829 pragma Assert (Is_Type (Id));
3830 Set_Flag191 (Id, V);
3831 end Set_Has_Specified_Stream_Output;
3833 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
3835 pragma Assert (Is_Type (Id));
3836 Set_Flag192 (Id, V);
3837 end Set_Has_Specified_Stream_Read;
3839 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
3841 pragma Assert (Is_Type (Id));
3842 Set_Flag193 (Id, V);
3843 end Set_Has_Specified_Stream_Write;
3845 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
3847 Set_Flag211 (Id, V);
3848 end Set_Has_Static_Discriminants;
3850 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
3852 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
3853 pragma Assert (Base_Type (Id) = Id);
3855 end Set_Has_Storage_Size_Clause;
3857 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
3859 pragma Assert (Is_Elementary_Type (Id));
3860 Set_Flag184 (Id, V);
3861 end Set_Has_Stream_Size_Clause;
3863 procedure Set_Has_Subprogram_Descriptor (Id : E; V : B := True) is
3866 end Set_Has_Subprogram_Descriptor;
3868 procedure Set_Has_Task (Id : E; V : B := True) is
3870 pragma Assert (Base_Type (Id) = Id);
3874 procedure Set_Has_Thunks (Id : E; V : B := True) is
3876 pragma Assert (Is_Tag (Id)
3877 and then Ekind (Id) = E_Constant);
3878 Set_Flag228 (Id, V);
3881 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
3883 pragma Assert (Base_Type (Id) = Id);
3884 Set_Flag123 (Id, V);
3885 end Set_Has_Unchecked_Union;
3887 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
3889 pragma Assert (Is_Type (Id));
3891 end Set_Has_Unknown_Discriminants;
3893 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
3895 pragma Assert (not Is_Type (Id) or else Base_Type (Id) = Id);
3897 end Set_Has_Volatile_Components;
3899 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
3901 Set_Flag182 (Id, V);
3902 end Set_Has_Xref_Entry;
3904 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
3906 pragma Assert (Ekind (Id) = E_Variable);
3908 end Set_Hiding_Loop_Variable;
3910 procedure Set_Homonym (Id : E; V : E) is
3912 pragma Assert (Id /= V);
3916 procedure Set_Implemented_By_Entry (Id : E; V : B := True) is
3919 (Ekind (Id) = E_Function
3920 or else Ekind (Id) = E_Procedure);
3921 Set_Flag232 (Id, V);
3922 end Set_Implemented_By_Entry;
3924 procedure Set_In_Package_Body (Id : E; V : B := True) is
3927 end Set_In_Package_Body;
3929 procedure Set_In_Private_Part (Id : E; V : B := True) is
3932 end Set_In_Private_Part;
3934 procedure Set_In_Use (Id : E; V : B := True) is
3936 pragma Assert (Nkind (Id) in N_Entity);
3940 procedure Set_Inner_Instances (Id : E; V : L) is
3942 Set_Elist23 (Id, V);
3943 end Set_Inner_Instances;
3945 procedure Set_Interface_Name (Id : E; V : N) is
3948 end Set_Interface_Name;
3950 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
3952 pragma Assert (Is_Overloadable (Id));
3954 end Set_Is_Abstract_Subprogram;
3956 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
3958 pragma Assert (Is_Type (Id));
3959 Set_Flag146 (Id, V);
3960 end Set_Is_Abstract_Type;
3962 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
3964 pragma Assert (Is_Access_Type (Id));
3965 Set_Flag194 (Id, V);
3966 end Set_Is_Local_Anonymous_Access;
3968 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
3970 pragma Assert (Is_Access_Type (Id));
3972 end Set_Is_Access_Constant;
3974 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
3976 Set_Flag185 (Id, V);
3977 end Set_Is_Ada_2005_Only;
3979 procedure Set_Is_Aliased (Id : E; V : B := True) is
3981 pragma Assert (Nkind (Id) in N_Entity);
3985 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
3987 pragma Assert (Is_Entry (Id));
3988 Set_Flag132 (Id, V);
3989 end Set_Is_AST_Entry;
3991 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
3994 (Ekind (Id) = E_Procedure or else Is_Type (Id));
3996 end Set_Is_Asynchronous;
3998 procedure Set_Is_Atomic (Id : E; V : B := True) is
4003 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4005 pragma Assert ((not V)
4006 or else (Is_Array_Type (Id) and then Id = Base_Type (Id)));
4008 Set_Flag122 (Id, V);
4009 end Set_Is_Bit_Packed_Array;
4011 procedure Set_Is_Called (Id : E; V : B := True) is
4014 (Ekind (Id) = E_Procedure or else Ekind (Id) = E_Function);
4015 Set_Flag102 (Id, V);
4018 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4021 end Set_Is_Character_Type;
4023 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4026 end Set_Is_Child_Unit;
4028 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4031 end Set_Is_Class_Wide_Equivalent_Type;
4033 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4035 Set_Flag149 (Id, V);
4036 end Set_Is_Compilation_Unit;
4038 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4040 pragma Assert (Ekind (Id) = E_Discriminant);
4041 Set_Flag103 (Id, V);
4042 end Set_Is_Completely_Hidden;
4044 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4047 end Set_Is_Concurrent_Record_Type;
4049 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4052 end Set_Is_Constr_Subt_For_U_Nominal;
4054 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4056 Set_Flag141 (Id, V);
4057 end Set_Is_Constr_Subt_For_UN_Aliased;
4059 procedure Set_Is_Constrained (Id : E; V : B := True) is
4061 pragma Assert (Nkind (Id) in N_Entity);
4063 end Set_Is_Constrained;
4065 procedure Set_Is_Constructor (Id : E; V : B := True) is
4068 end Set_Is_Constructor;
4070 procedure Set_Is_Controlled (Id : E; V : B := True) is
4072 pragma Assert (Id = Base_Type (Id));
4074 end Set_Is_Controlled;
4076 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4078 pragma Assert (Is_Formal (Id));
4080 end Set_Is_Controlling_Formal;
4082 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4085 end Set_Is_CPP_Class;
4087 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4089 pragma Assert (Is_Type (Id));
4090 Set_Flag223 (Id, V);
4091 end Set_Is_Descendent_Of_Address;
4093 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4095 Set_Flag176 (Id, V);
4096 end Set_Is_Discrim_SO_Function;
4098 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4103 Is_Overloadable (Id)
4105 Ekind (Id) = E_Subprogram_Type);
4108 end Set_Is_Dispatching_Operation;
4110 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4112 Set_Flag124 (Id, V);
4113 end Set_Is_Eliminated;
4115 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4118 end Set_Is_Entry_Formal;
4120 procedure Set_Is_Exported (Id : E; V : B := True) is
4123 end Set_Is_Exported;
4125 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4128 end Set_Is_First_Subtype;
4130 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4133 (Ekind (Id) = E_Record_Subtype
4135 Ekind (Id) = E_Private_Subtype);
4136 Set_Flag118 (Id, V);
4137 end Set_Is_For_Access_Subtype;
4139 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4141 Set_Flag111 (Id, V);
4142 end Set_Is_Formal_Subprogram;
4144 procedure Set_Is_Frozen (Id : E; V : B := True) is
4146 pragma Assert (Nkind (Id) in N_Entity);
4150 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4152 pragma Assert (Is_Type (Id));
4154 end Set_Is_Generic_Actual_Type;
4156 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4158 Set_Flag130 (Id, V);
4159 end Set_Is_Generic_Instance;
4161 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4163 pragma Assert (Nkind (Id) in N_Entity);
4165 end Set_Is_Generic_Type;
4167 procedure Set_Is_Hidden (Id : E; V : B := True) is
4172 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4174 Set_Flag171 (Id, V);
4175 end Set_Is_Hidden_Open_Scope;
4177 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4179 pragma Assert (Nkind (Id) in N_Entity);
4181 end Set_Is_Immediately_Visible;
4183 procedure Set_Is_Imported (Id : E; V : B := True) is
4186 end Set_Is_Imported;
4188 procedure Set_Is_Inlined (Id : E; V : B := True) is
4193 procedure Set_Is_Interface (Id : E; V : B := True) is
4196 (Ekind (Id) = E_Record_Type
4197 or else Ekind (Id) = E_Record_Subtype
4198 or else Ekind (Id) = E_Record_Type_With_Private
4199 or else Ekind (Id) = E_Record_Subtype_With_Private
4200 or else Ekind (Id) = E_Class_Wide_Type
4201 or else Ekind (Id) = E_Class_Wide_Subtype);
4202 Set_Flag186 (Id, V);
4203 end Set_Is_Interface;
4205 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4207 Set_Flag126 (Id, V);
4208 end Set_Is_Instantiated;
4210 procedure Set_Is_Internal (Id : E; V : B := True) is
4212 pragma Assert (Nkind (Id) in N_Entity);
4214 end Set_Is_Internal;
4216 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4218 pragma Assert (Nkind (Id) in N_Entity);
4220 end Set_Is_Interrupt_Handler;
4222 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4225 end Set_Is_Intrinsic_Subprogram;
4227 procedure Set_Is_Itype (Id : E; V : B := True) is
4232 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4235 end Set_Is_Known_Non_Null;
4237 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4239 Set_Flag204 (Id, V);
4240 end Set_Is_Known_Null;
4242 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4244 Set_Flag170 (Id, V);
4245 end Set_Is_Known_Valid;
4247 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4249 pragma Assert (Is_Type (Id));
4250 Set_Flag106 (Id, V);
4251 end Set_Is_Limited_Composite;
4253 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4255 pragma Assert (Is_Interface (Id));
4256 Set_Flag197 (Id, V);
4257 end Set_Is_Limited_Interface;
4259 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4262 end Set_Is_Limited_Record;
4264 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4266 pragma Assert (Is_Subprogram (Id));
4267 Set_Flag137 (Id, V);
4268 end Set_Is_Machine_Code_Subprogram;
4270 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4272 pragma Assert (Is_Type (Id));
4273 Set_Flag109 (Id, V);
4274 end Set_Is_Non_Static_Subtype;
4276 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4278 pragma Assert (Ekind (Id) = E_Procedure);
4279 Set_Flag178 (Id, V);
4280 end Set_Is_Null_Init_Proc;
4282 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4284 Set_Flag153 (Id, V);
4285 end Set_Is_Obsolescent;
4287 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
4289 pragma Assert (Ekind (Id) = E_Out_Parameter);
4290 Set_Flag226 (Id, V);
4291 end Set_Is_Only_Out_Parameter;
4293 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
4295 pragma Assert (Is_Formal (Id));
4296 Set_Flag134 (Id, V);
4297 end Set_Is_Optional_Parameter;
4299 procedure Set_Is_Overriding_Operation (Id : E; V : B := True) is
4301 pragma Assert (Is_Subprogram (Id));
4303 end Set_Is_Overriding_Operation;
4305 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
4307 Set_Flag160 (Id, V);
4308 end Set_Is_Package_Body_Entity;
4310 procedure Set_Is_Packed (Id : E; V : B := True) is
4312 pragma Assert (Base_Type (Id) = Id);
4316 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
4318 Set_Flag138 (Id, V);
4319 end Set_Is_Packed_Array_Type;
4321 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
4323 pragma Assert (Nkind (Id) in N_Entity);
4325 end Set_Is_Potentially_Use_Visible;
4327 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
4330 end Set_Is_Preelaborated;
4332 procedure Set_Is_Primitive (Id : E; V : B := True) is
4335 (Is_Overloadable (Id)
4336 or else Ekind (Id) = E_Generic_Function
4337 or else Ekind (Id) = E_Generic_Procedure);
4338 Set_Flag218 (Id, V);
4339 end Set_Is_Primitive;
4341 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
4343 pragma Assert (Ekind (Id) = E_Procedure);
4344 Set_Flag195 (Id, V);
4345 end Set_Is_Primitive_Wrapper;
4347 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
4349 pragma Assert (Is_Type (Id));
4350 Set_Flag107 (Id, V);
4351 end Set_Is_Private_Composite;
4353 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
4356 end Set_Is_Private_Descendant;
4358 procedure Set_Is_Protected_Interface (Id : E; V : B := True) is
4360 pragma Assert (Is_Interface (Id));
4361 Set_Flag198 (Id, V);
4362 end Set_Is_Protected_Interface;
4364 procedure Set_Is_Public (Id : E; V : B := True) is
4366 pragma Assert (Nkind (Id) in N_Entity);
4370 procedure Set_Is_Pure (Id : E; V : B := True) is
4375 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
4377 pragma Assert (Is_Access_Type (Id));
4378 Set_Flag189 (Id, V);
4379 end Set_Is_Pure_Unit_Access_Type;
4381 procedure Set_Is_Raised (Id : E; V : B := True) is
4383 pragma Assert (Ekind (Id) = E_Exception);
4384 Set_Flag224 (Id, V);
4387 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
4390 end Set_Is_Remote_Call_Interface;
4392 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
4395 end Set_Is_Remote_Types;
4397 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
4399 Set_Flag112 (Id, V);
4400 end Set_Is_Renaming_Of_Object;
4402 procedure Set_Is_Return_Object (Id : E; V : B := True) is
4404 Set_Flag209 (Id, V);
4405 end Set_Is_Return_Object;
4407 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
4410 end Set_Is_Shared_Passive;
4412 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
4415 (Ekind (Id) = E_Exception
4416 or else Ekind (Id) = E_Variable
4417 or else Ekind (Id) = E_Constant
4418 or else Is_Type (Id)
4419 or else Ekind (Id) = E_Void);
4421 end Set_Is_Statically_Allocated;
4423 procedure Set_Is_Static_Dispatch_Table_Entity (Id : E; V : B := True) is
4425 Set_Flag234 (Id, V);
4426 end Set_Is_Static_Dispatch_Table_Entity;
4428 procedure Set_Is_Synchronized_Interface (Id : E; V : B := True) is
4430 pragma Assert (Is_Interface (Id));
4431 Set_Flag199 (Id, V);
4432 end Set_Is_Synchronized_Interface;
4434 procedure Set_Is_Tag (Id : E; V : B := True) is
4437 (Ekind (Id) = E_Component
4438 or else Ekind (Id) = E_Constant);
4442 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
4445 end Set_Is_Tagged_Type;
4447 procedure Set_Is_Task_Interface (Id : E; V : B := True) is
4449 pragma Assert (Is_Interface (Id));
4450 Set_Flag200 (Id, V);
4451 end Set_Is_Task_Interface;
4453 procedure Set_Is_Thunk (Id : E; V : B := True) is
4455 Set_Flag225 (Id, V);
4458 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
4460 Set_Flag235 (Id, V);
4461 end Set_Is_Trivial_Subprogram;
4463 procedure Set_Is_True_Constant (Id : E; V : B := True) is
4465 Set_Flag163 (Id, V);
4466 end Set_Is_True_Constant;
4468 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
4470 pragma Assert (Base_Type (Id) = Id);
4471 Set_Flag117 (Id, V);
4472 end Set_Is_Unchecked_Union;
4474 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
4476 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
4477 Set_Flag144 (Id, V);
4478 end Set_Is_Unsigned_Type;
4480 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
4482 pragma Assert (Ekind (Id) = E_Procedure);
4483 Set_Flag127 (Id, V);
4484 end Set_Is_Valued_Procedure;
4486 procedure Set_Is_Visible_Child_Unit (Id : E; V : B := True) is
4488 pragma Assert (Is_Child_Unit (Id));
4489 Set_Flag116 (Id, V);
4490 end Set_Is_Visible_Child_Unit;
4492 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
4494 Set_Flag206 (Id, V);
4495 end Set_Is_Visible_Formal;
4497 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
4499 pragma Assert (Ekind (Id) = E_Exception);
4500 Set_Flag133 (Id, V);
4501 end Set_Is_VMS_Exception;
4503 procedure Set_Is_Volatile (Id : E; V : B := True) is
4505 pragma Assert (Nkind (Id) in N_Entity);
4507 end Set_Is_Volatile;
4509 procedure Set_Itype_Printed (Id : E; V : B := True) is
4511 pragma Assert (Is_Itype (Id));
4512 Set_Flag202 (Id, V);
4513 end Set_Itype_Printed;
4515 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
4518 end Set_Kill_Elaboration_Checks;
4520 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
4523 end Set_Kill_Range_Checks;
4525 procedure Set_Kill_Tag_Checks (Id : E; V : B := True) is
4528 end Set_Kill_Tag_Checks;
4530 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
4532 pragma Assert (Is_Type (Id));
4533 Set_Flag207 (Id, V);
4534 end Set_Known_To_Have_Preelab_Init;
4536 procedure Set_Last_Assignment (Id : E; V : N) is
4538 pragma Assert (Is_Assignable (Id));
4540 end Set_Last_Assignment;
4542 procedure Set_Last_Entity (Id : E; V : E) is
4545 end Set_Last_Entity;
4547 procedure Set_Limited_View (Id : E; V : E) is
4549 pragma Assert (Ekind (Id) = E_Package);
4551 end Set_Limited_View;
4553 procedure Set_Lit_Indexes (Id : E; V : E) is
4555 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4557 end Set_Lit_Indexes;
4559 procedure Set_Lit_Strings (Id : E; V : E) is
4561 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4563 end Set_Lit_Strings;
4565 procedure Set_Low_Bound_Known (Id : E; V : B := True) is
4567 pragma Assert (Is_Formal (Id));
4568 Set_Flag205 (Id, V);
4569 end Set_Low_Bound_Known;
4571 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
4573 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4575 end Set_Machine_Radix_10;
4577 procedure Set_Master_Id (Id : E; V : E) is
4579 pragma Assert (Is_Access_Type (Id));
4583 procedure Set_Materialize_Entity (Id : E; V : B := True) is
4585 Set_Flag168 (Id, V);
4586 end Set_Materialize_Entity;
4588 procedure Set_Mechanism (Id : E; V : M) is
4590 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
4591 Set_Uint8 (Id, UI_From_Int (V));
4594 procedure Set_Modulus (Id : E; V : U) is
4596 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
4600 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
4602 pragma Assert (Is_Type (Id));
4603 Set_Flag183 (Id, V);
4604 end Set_Must_Be_On_Byte_Boundary;
4606 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
4608 pragma Assert (Is_Type (Id));
4609 Set_Flag208 (Id, V);
4610 end Set_Must_Have_Preelab_Init;
4612 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
4614 Set_Flag147 (Id, V);
4615 end Set_Needs_Debug_Info;
4617 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
4620 (Is_Overloadable (Id)
4621 or else Ekind (Id) = E_Subprogram_Type
4622 or else Ekind (Id) = E_Entry_Family);
4624 end Set_Needs_No_Actuals;
4626 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
4628 Set_Flag115 (Id, V);
4629 end Set_Never_Set_In_Source;
4631 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
4634 end Set_Next_Inlined_Subprogram;
4636 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
4638 pragma Assert (Is_Access_Type (Id) and then Base_Type (Id) = Id);
4639 Set_Flag131 (Id, V);
4640 end Set_No_Pool_Assigned;
4642 procedure Set_No_Return (Id : E; V : B := True) is
4646 or else Ekind (Id) = E_Procedure
4647 or else Ekind (Id) = E_Generic_Procedure);
4648 Set_Flag113 (Id, V);
4651 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
4653 pragma Assert (Is_Access_Type (Id) and then Base_Type (Id) = Id);
4654 Set_Flag136 (Id, V);
4655 end Set_No_Strict_Aliasing;
4657 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
4659 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
4661 end Set_Non_Binary_Modulus;
4663 procedure Set_Non_Limited_View (Id : E; V : E) is
4665 pragma Assert (Ekind (Id) in Incomplete_Kind);
4667 end Set_Non_Limited_View;
4669 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
4672 (Root_Type (Id) = Standard_Boolean
4673 and then Ekind (Id) = E_Enumeration_Type);
4674 Set_Flag162 (Id, V);
4675 end Set_Nonzero_Is_True;
4677 procedure Set_Normalized_First_Bit (Id : E; V : U) is
4680 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
4682 end Set_Normalized_First_Bit;
4684 procedure Set_Normalized_Position (Id : E; V : U) is
4687 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
4689 end Set_Normalized_Position;
4691 procedure Set_Normalized_Position_Max (Id : E; V : U) is
4694 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
4696 end Set_Normalized_Position_Max;
4698 procedure Set_Object_Ref (Id : E; V : E) is
4700 pragma Assert (Ekind (Id) = E_Protected_Body);
4704 procedure Set_Obsolescent_Warning (Id : E; V : N) is
4707 end Set_Obsolescent_Warning;
4709 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
4712 (Is_Record_Type (Id) and then Id = Base_Type (Id));
4713 Set_Flag239 (Id, V);
4714 end Set_OK_To_Reorder_Components;
4716 procedure Set_Original_Array_Type (Id : E; V : E) is
4718 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
4720 end Set_Original_Array_Type;
4722 procedure Set_Original_Record_Component (Id : E; V : E) is
4725 (Ekind (Id) = E_Void
4726 or else Ekind (Id) = E_Component
4727 or else Ekind (Id) = E_Discriminant);
4729 end Set_Original_Record_Component;
4731 procedure Set_Overridden_Operation (Id : E; V : E) is
4734 end Set_Overridden_Operation;
4736 procedure Set_Package_Instantiation (Id : E; V : N) is
4739 (Ekind (Id) = E_Void
4740 or else Ekind (Id) = E_Generic_Package
4741 or else Ekind (Id) = E_Package);
4743 end Set_Package_Instantiation;
4745 procedure Set_Packed_Array_Type (Id : E; V : E) is
4747 pragma Assert (Is_Array_Type (Id));
4749 end Set_Packed_Array_Type;
4751 procedure Set_Parent_Subtype (Id : E; V : E) is
4753 pragma Assert (Ekind (Id) = E_Record_Type);
4755 end Set_Parent_Subtype;
4757 procedure Set_Primitive_Operations (Id : E; V : L) is
4759 pragma Assert (Is_Tagged_Type (Id));
4760 Set_Elist15 (Id, V);
4761 end Set_Primitive_Operations;
4763 procedure Set_Prival (Id : E; V : E) is
4765 pragma Assert (Is_Protected_Private (Id));
4769 procedure Set_Privals_Chain (Id : E; V : L) is
4771 pragma Assert (Is_Overloadable (Id)
4772 or else Ekind (Id) = E_Entry_Family);
4773 Set_Elist23 (Id, V);
4774 end Set_Privals_Chain;
4776 procedure Set_Private_Dependents (Id : E; V : L) is
4778 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
4779 Set_Elist18 (Id, V);
4780 end Set_Private_Dependents;
4782 procedure Set_Private_View (Id : E; V : N) is
4784 pragma Assert (Is_Private_Type (Id));
4786 end Set_Private_View;
4788 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
4790 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
4792 end Set_Protected_Body_Subprogram;
4794 procedure Set_Protected_Formal (Id : E; V : E) is
4796 pragma Assert (Is_Formal (Id));
4798 end Set_Protected_Formal;
4800 procedure Set_Protected_Operation (Id : E; V : N) is
4802 pragma Assert (Is_Protected_Private (Id));
4804 end Set_Protected_Operation;
4806 procedure Set_Reachable (Id : E; V : B := True) is
4811 procedure Set_Referenced (Id : E; V : B := True) is
4813 Set_Flag156 (Id, V);
4816 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
4819 end Set_Referenced_As_LHS;
4821 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
4823 Set_Flag227 (Id, V);
4824 end Set_Referenced_As_Out_Parameter;
4826 procedure Set_Referenced_Object (Id : E; V : N) is
4828 pragma Assert (Is_Type (Id));
4830 end Set_Referenced_Object;
4832 procedure Set_Register_Exception_Call (Id : E; V : N) is
4834 pragma Assert (Ekind (Id) = E_Exception);
4836 end Set_Register_Exception_Call;
4838 procedure Set_Related_Array_Object (Id : E; V : E) is
4840 pragma Assert (Is_Array_Type (Id));
4842 end Set_Related_Array_Object;
4844 procedure Set_Related_Instance (Id : E; V : E) is
4847 (Ekind (Id) = E_Package or else Ekind (Id) = E_Package_Body);
4849 end Set_Related_Instance;
4851 procedure Set_Related_Type (Id : E; V : E) is
4854 (Ekind (Id) = E_Component or else Ekind (Id) = E_Constant);
4856 end Set_Related_Type;
4858 procedure Set_Renamed_Entity (Id : E; V : N) is
4861 end Set_Renamed_Entity;
4863 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
4865 pragma Assert (Ekind (Id) = E_Package);
4866 Set_Flag231 (Id, V);
4867 end Set_Renamed_In_Spec;
4869 procedure Set_Renamed_Object (Id : E; V : N) is
4872 end Set_Renamed_Object;
4874 procedure Set_Renaming_Map (Id : E; V : U) is
4877 end Set_Renaming_Map;
4879 procedure Set_Requires_Overriding (Id : E; V : B := True) is
4881 pragma Assert (Is_Overloadable (Id));
4882 Set_Flag213 (Id, V);
4883 end Set_Requires_Overriding;
4885 procedure Set_Return_Present (Id : E; V : B := True) is
4888 end Set_Return_Present;
4890 procedure Set_Return_Applies_To (Id : E; V : N) is
4893 end Set_Return_Applies_To;
4895 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
4898 end Set_Returns_By_Ref;
4900 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
4903 (Is_Record_Type (Id) and then Id = Base_Type (Id));
4904 Set_Flag164 (Id, V);
4905 end Set_Reverse_Bit_Order;
4907 procedure Set_RM_Size (Id : E; V : U) is
4909 pragma Assert (Is_Type (Id));
4913 procedure Set_Scalar_Range (Id : E; V : N) is
4916 end Set_Scalar_Range;
4918 procedure Set_Scale_Value (Id : E; V : U) is
4921 end Set_Scale_Value;
4923 procedure Set_Scope_Depth_Value (Id : E; V : U) is
4925 pragma Assert (not Is_Record_Type (Id));
4927 end Set_Scope_Depth_Value;
4929 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
4931 Set_Flag167 (Id, V);
4932 end Set_Sec_Stack_Needed_For_Return;
4934 procedure Set_Shadow_Entities (Id : E; V : S) is
4937 (Ekind (Id) = E_Package or else Ekind (Id) = E_Generic_Package);
4939 end Set_Shadow_Entities;
4941 procedure Set_Shared_Var_Assign_Proc (Id : E; V : E) is
4943 pragma Assert (Ekind (Id) = E_Variable);
4945 end Set_Shared_Var_Assign_Proc;
4947 procedure Set_Shared_Var_Read_Proc (Id : E; V : E) is
4949 pragma Assert (Ekind (Id) = E_Variable);
4951 end Set_Shared_Var_Read_Proc;
4953 procedure Set_Size_Check_Code (Id : E; V : N) is
4955 pragma Assert (Ekind (Id) = E_Constant or else Ekind (Id) = E_Variable);
4957 end Set_Size_Check_Code;
4959 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
4961 Set_Flag177 (Id, V);
4962 end Set_Size_Depends_On_Discriminant;
4964 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
4967 end Set_Size_Known_At_Compile_Time;
4969 procedure Set_Small_Value (Id : E; V : R) is
4971 pragma Assert (Is_Fixed_Point_Type (Id));
4972 Set_Ureal21 (Id, V);
4973 end Set_Small_Value;
4975 procedure Set_Spec_Entity (Id : E; V : E) is
4977 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
4979 end Set_Spec_Entity;
4981 procedure Set_Storage_Size_Variable (Id : E; V : E) is
4983 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4984 pragma Assert (Base_Type (Id) = Id);
4986 end Set_Storage_Size_Variable;
4988 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
4990 pragma Assert (Ekind (Id) = E_Package);
4992 end Set_Static_Elaboration_Desired;
4994 procedure Set_Static_Initialization (Id : E; V : N) is
4997 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
4999 end Set_Static_Initialization;
5001 procedure Set_Stored_Constraint (Id : E; V : L) is
5003 pragma Assert (Nkind (Id) in N_Entity);
5004 Set_Elist23 (Id, V);
5005 end Set_Stored_Constraint;
5007 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5009 pragma Assert (Base_Type (Id) = Id);
5010 Set_Flag145 (Id, V);
5011 end Set_Strict_Alignment;
5013 procedure Set_String_Literal_Length (Id : E; V : U) is
5015 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5017 end Set_String_Literal_Length;
5019 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5021 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5023 end Set_String_Literal_Low_Bound;
5025 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5027 Set_Flag148 (Id, V);
5028 end Set_Suppress_Elaboration_Warnings;
5030 procedure Set_Suppress_Init_Proc (Id : E; V : B := True) is
5032 pragma Assert (Id = Base_Type (Id));
5033 Set_Flag105 (Id, V);
5034 end Set_Suppress_Init_Proc;
5036 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5038 Set_Flag165 (Id, V);
5039 end Set_Suppress_Style_Checks;
5041 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5043 Set_Flag217 (Id, V);
5044 end Set_Suppress_Value_Tracking_On_Call;
5046 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5048 pragma Assert (Ekind (Id) in Task_Kind);
5050 end Set_Task_Body_Procedure;
5052 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5055 end Set_Treat_As_Volatile;
5057 procedure Set_Underlying_Full_View (Id : E; V : E) is
5059 pragma Assert (Ekind (Id) in Private_Kind);
5061 end Set_Underlying_Full_View;
5063 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5065 pragma Assert (Is_Type (Id) and then Base_Type (Id) = Id);
5066 Set_Flag216 (Id, V);
5067 end Set_Universal_Aliasing;
5069 procedure Set_Unset_Reference (Id : E; V : N) is
5072 end Set_Unset_Reference;
5074 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5077 end Set_Uses_Sec_Stack;
5079 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5081 Set_Flag222 (Id, V);
5082 end Set_Used_As_Generic_Actual;
5084 procedure Set_Vax_Float (Id : E; V : B := True) is
5086 pragma Assert (Id = Base_Type (Id));
5087 Set_Flag151 (Id, V);
5090 procedure Set_Warnings_Off (Id : E; V : B := True) is
5093 end Set_Warnings_Off;
5095 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
5097 Set_Flag236 (Id, V);
5098 end Set_Warnings_Off_Used;
5100 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
5102 Set_Flag237 (Id, V);
5103 end Set_Warnings_Off_Used_Unmodified;
5105 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
5107 Set_Flag238 (Id, V);
5108 end Set_Warnings_Off_Used_Unreferenced;
5110 procedure Set_Was_Hidden (Id : E; V : B := True) is
5112 Set_Flag196 (Id, V);
5115 procedure Set_Wrapped_Entity (Id : E; V : E) is
5117 pragma Assert (Ekind (Id) = E_Procedure
5118 and then Is_Primitive_Wrapper (Id));
5120 end Set_Wrapped_Entity;
5122 -----------------------------------
5123 -- Field Initialization Routines --
5124 -----------------------------------
5126 procedure Init_Alignment (Id : E) is
5128 Set_Uint14 (Id, Uint_0);
5131 procedure Init_Alignment (Id : E; V : Int) is
5133 Set_Uint14 (Id, UI_From_Int (V));
5136 procedure Init_Component_Bit_Offset (Id : E) is
5138 Set_Uint11 (Id, No_Uint);
5139 end Init_Component_Bit_Offset;
5141 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
5143 Set_Uint11 (Id, UI_From_Int (V));
5144 end Init_Component_Bit_Offset;
5146 procedure Init_Component_Size (Id : E) is
5148 Set_Uint22 (Id, Uint_0);
5149 end Init_Component_Size;
5151 procedure Init_Component_Size (Id : E; V : Int) is
5153 Set_Uint22 (Id, UI_From_Int (V));
5154 end Init_Component_Size;
5156 procedure Init_Digits_Value (Id : E) is
5158 Set_Uint17 (Id, Uint_0);
5159 end Init_Digits_Value;
5161 procedure Init_Digits_Value (Id : E; V : Int) is
5163 Set_Uint17 (Id, UI_From_Int (V));
5164 end Init_Digits_Value;
5166 procedure Init_Esize (Id : E) is
5168 Set_Uint12 (Id, Uint_0);
5171 procedure Init_Esize (Id : E; V : Int) is
5173 Set_Uint12 (Id, UI_From_Int (V));
5176 procedure Init_Normalized_First_Bit (Id : E) is
5178 Set_Uint8 (Id, No_Uint);
5179 end Init_Normalized_First_Bit;
5181 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
5183 Set_Uint8 (Id, UI_From_Int (V));
5184 end Init_Normalized_First_Bit;
5186 procedure Init_Normalized_Position (Id : E) is
5188 Set_Uint14 (Id, No_Uint);
5189 end Init_Normalized_Position;
5191 procedure Init_Normalized_Position (Id : E; V : Int) is
5193 Set_Uint14 (Id, UI_From_Int (V));
5194 end Init_Normalized_Position;
5196 procedure Init_Normalized_Position_Max (Id : E) is
5198 Set_Uint10 (Id, No_Uint);
5199 end Init_Normalized_Position_Max;
5201 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
5203 Set_Uint10 (Id, UI_From_Int (V));
5204 end Init_Normalized_Position_Max;
5206 procedure Init_RM_Size (Id : E) is
5208 Set_Uint13 (Id, Uint_0);
5211 procedure Init_RM_Size (Id : E; V : Int) is
5213 Set_Uint13 (Id, UI_From_Int (V));
5216 -----------------------------
5217 -- Init_Component_Location --
5218 -----------------------------
5220 procedure Init_Component_Location (Id : E) is
5222 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
5223 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
5224 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
5225 Set_Uint12 (Id, Uint_0); -- Esize
5226 Set_Uint14 (Id, No_Uint); -- Normalized_Position
5227 end Init_Component_Location;
5233 procedure Init_Size (Id : E; V : Int) is
5235 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
5236 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
5239 ---------------------
5240 -- Init_Size_Align --
5241 ---------------------
5243 procedure Init_Size_Align (Id : E) is
5245 Set_Uint12 (Id, Uint_0); -- Esize
5246 Set_Uint13 (Id, Uint_0); -- RM_Size
5247 Set_Uint14 (Id, Uint_0); -- Alignment
5248 end Init_Size_Align;
5250 ----------------------------------------------
5251 -- Type Representation Attribute Predicates --
5252 ----------------------------------------------
5254 function Known_Alignment (E : Entity_Id) return B is
5256 return Uint14 (E) /= Uint_0
5257 and then Uint14 (E) /= No_Uint;
5258 end Known_Alignment;
5260 function Known_Component_Bit_Offset (E : Entity_Id) return B is
5262 return Uint11 (E) /= No_Uint;
5263 end Known_Component_Bit_Offset;
5265 function Known_Component_Size (E : Entity_Id) return B is
5267 return Uint22 (Base_Type (E)) /= Uint_0
5268 and then Uint22 (Base_Type (E)) /= No_Uint;
5269 end Known_Component_Size;
5271 function Known_Esize (E : Entity_Id) return B is
5273 return Uint12 (E) /= Uint_0
5274 and then Uint12 (E) /= No_Uint;
5277 function Known_Normalized_First_Bit (E : Entity_Id) return B is
5279 return Uint8 (E) /= No_Uint;
5280 end Known_Normalized_First_Bit;
5282 function Known_Normalized_Position (E : Entity_Id) return B is
5284 return Uint14 (E) /= No_Uint;
5285 end Known_Normalized_Position;
5287 function Known_Normalized_Position_Max (E : Entity_Id) return B is
5289 return Uint10 (E) /= No_Uint;
5290 end Known_Normalized_Position_Max;
5292 function Known_RM_Size (E : Entity_Id) return B is
5294 return Uint13 (E) /= No_Uint
5295 and then (Uint13 (E) /= Uint_0
5296 or else Is_Discrete_Type (E)
5297 or else Is_Fixed_Point_Type (E));
5300 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
5302 return Uint11 (E) /= No_Uint
5303 and then Uint11 (E) >= Uint_0;
5304 end Known_Static_Component_Bit_Offset;
5306 function Known_Static_Component_Size (E : Entity_Id) return B is
5308 return Uint22 (Base_Type (E)) > Uint_0;
5309 end Known_Static_Component_Size;
5311 function Known_Static_Esize (E : Entity_Id) return B is
5313 return Uint12 (E) > Uint_0;
5314 end Known_Static_Esize;
5316 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
5318 return Uint8 (E) /= No_Uint
5319 and then Uint8 (E) >= Uint_0;
5320 end Known_Static_Normalized_First_Bit;
5322 function Known_Static_Normalized_Position (E : Entity_Id) return B is
5324 return Uint14 (E) /= No_Uint
5325 and then Uint14 (E) >= Uint_0;
5326 end Known_Static_Normalized_Position;
5328 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
5330 return Uint10 (E) /= No_Uint
5331 and then Uint10 (E) >= Uint_0;
5332 end Known_Static_Normalized_Position_Max;
5334 function Known_Static_RM_Size (E : Entity_Id) return B is
5336 return Uint13 (E) > Uint_0
5337 or else Is_Discrete_Type (E)
5338 or else Is_Fixed_Point_Type (E);
5339 end Known_Static_RM_Size;
5341 function Unknown_Alignment (E : Entity_Id) return B is
5343 return Uint14 (E) = Uint_0
5344 or else Uint14 (E) = No_Uint;
5345 end Unknown_Alignment;
5347 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
5349 return Uint11 (E) = No_Uint;
5350 end Unknown_Component_Bit_Offset;
5352 function Unknown_Component_Size (E : Entity_Id) return B is
5354 return Uint22 (Base_Type (E)) = Uint_0
5356 Uint22 (Base_Type (E)) = No_Uint;
5357 end Unknown_Component_Size;
5359 function Unknown_Esize (E : Entity_Id) return B is
5361 return Uint12 (E) = No_Uint
5363 Uint12 (E) = Uint_0;
5366 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
5368 return Uint8 (E) = No_Uint;
5369 end Unknown_Normalized_First_Bit;
5371 function Unknown_Normalized_Position (E : Entity_Id) return B is
5373 return Uint14 (E) = No_Uint;
5374 end Unknown_Normalized_Position;
5376 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
5378 return Uint10 (E) = No_Uint;
5379 end Unknown_Normalized_Position_Max;
5381 function Unknown_RM_Size (E : Entity_Id) return B is
5383 return (Uint13 (E) = Uint_0
5384 and then not Is_Discrete_Type (E)
5385 and then not Is_Fixed_Point_Type (E))
5386 or else Uint13 (E) = No_Uint;
5387 end Unknown_RM_Size;
5389 --------------------
5390 -- Address_Clause --
5391 --------------------
5393 function Address_Clause (Id : E) return N is
5395 return Rep_Clause (Id, Name_Address);
5398 ----------------------
5399 -- Alignment_Clause --
5400 ----------------------
5402 function Alignment_Clause (Id : E) return N is
5404 return Rep_Clause (Id, Name_Alignment);
5405 end Alignment_Clause;
5407 ----------------------
5408 -- Ancestor_Subtype --
5409 ----------------------
5411 function Ancestor_Subtype (Id : E) return E is
5413 -- If this is first subtype, or is a base type, then there is no
5414 -- ancestor subtype, so we return Empty to indicate this fact.
5416 if Is_First_Subtype (Id) or else Id = Base_Type (Id) then
5421 D : constant Node_Id := Declaration_Node (Id);
5424 -- If we have a subtype declaration, get the ancestor subtype
5426 if Nkind (D) = N_Subtype_Declaration then
5427 if Nkind (Subtype_Indication (D)) = N_Subtype_Indication then
5428 return Entity (Subtype_Mark (Subtype_Indication (D)));
5430 return Entity (Subtype_Indication (D));
5433 -- If not, then no subtype indication is available
5439 end Ancestor_Subtype;
5445 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
5447 if Last_Entity (V) = Empty then
5448 Set_First_Entity (V, Id);
5450 Set_Next_Entity (Last_Entity (V), Id);
5453 Set_Next_Entity (Id, Empty);
5455 Set_Last_Entity (V, Id);
5458 --------------------
5459 -- Available_View --
5460 --------------------
5462 function Available_View (Id : E) return E is
5464 if Is_Incomplete_Type (Id)
5465 and then Present (Non_Limited_View (Id))
5467 -- The non-limited view may itself be an incomplete type, in
5468 -- which case get its full view.
5470 return Get_Full_View (Non_Limited_View (Id));
5472 elsif Is_Class_Wide_Type (Id)
5473 and then Is_Incomplete_Type (Etype (Id))
5474 and then Present (Non_Limited_View (Etype (Id)))
5476 return Class_Wide_Type (Non_Limited_View (Etype (Id)));
5487 function Base_Type (Id : E) return E is
5490 when E_Enumeration_Subtype |
5492 E_Signed_Integer_Subtype |
5493 E_Modular_Integer_Subtype |
5494 E_Floating_Point_Subtype |
5495 E_Ordinary_Fixed_Point_Subtype |
5496 E_Decimal_Fixed_Point_Subtype |
5501 E_Record_Subtype_With_Private |
5502 E_Limited_Private_Subtype |
5504 E_Protected_Subtype |
5506 E_String_Literal_Subtype |
5507 E_Class_Wide_Subtype =>
5515 -------------------------
5516 -- Component_Alignment --
5517 -------------------------
5519 -- Component Alignment is encoded using two flags, Flag128/129 as
5520 -- follows. Note that both flags False = Align_Default, so that the
5521 -- default initialization of flags to False initializes component
5522 -- alignment to the default value as required.
5524 -- Flag128 Flag129 Value
5525 -- ------- ------- -----
5526 -- False False Calign_Default
5527 -- False True Calign_Component_Size
5528 -- True False Calign_Component_Size_4
5529 -- True True Calign_Storage_Unit
5531 function Component_Alignment (Id : E) return C is
5532 BT : constant Node_Id := Base_Type (Id);
5535 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
5537 if Flag128 (BT) then
5538 if Flag129 (BT) then
5539 return Calign_Storage_Unit;
5541 return Calign_Component_Size_4;
5545 if Flag129 (BT) then
5546 return Calign_Component_Size;
5548 return Calign_Default;
5551 end Component_Alignment;
5553 --------------------
5554 -- Constant_Value --
5555 --------------------
5557 function Constant_Value (Id : E) return N is
5558 D : constant Node_Id := Declaration_Node (Id);
5562 -- If we have no declaration node, then return no constant value.
5563 -- Not clear how this can happen, but it does sometimes ???
5564 -- To investigate, remove this check and compile discrim_po.adb.
5569 -- Normal case where a declaration node is present
5571 elsif Nkind (D) = N_Object_Renaming_Declaration then
5572 return Renamed_Object (Id);
5574 -- If this is a component declaration whose entity is constant, it
5575 -- is a prival within a protected function. It does not have
5576 -- a constant value.
5578 elsif Nkind (D) = N_Component_Declaration then
5581 -- If there is an expression, return it
5583 elsif Present (Expression (D)) then
5584 return (Expression (D));
5586 -- For a constant, see if we have a full view
5588 elsif Ekind (Id) = E_Constant
5589 and then Present (Full_View (Id))
5591 Full_D := Parent (Full_View (Id));
5593 -- The full view may have been rewritten as an object renaming
5595 if Nkind (Full_D) = N_Object_Renaming_Declaration then
5596 return Name (Full_D);
5598 return Expression (Full_D);
5601 -- Otherwise we have no expression to return
5608 ----------------------
5609 -- Declaration_Node --
5610 ----------------------
5612 function Declaration_Node (Id : E) return N is
5616 if Ekind (Id) = E_Incomplete_Type
5617 and then Present (Full_View (Id))
5619 P := Parent (Full_View (Id));
5625 if Nkind (P) /= N_Selected_Component
5626 and then Nkind (P) /= N_Expanded_Name
5628 not (Nkind (P) = N_Defining_Program_Unit_Name
5629 and then Is_Child_Unit (Id))
5636 end Declaration_Node;
5638 ---------------------
5639 -- Designated_Type --
5640 ---------------------
5642 function Designated_Type (Id : E) return E is
5646 Desig_Type := Directly_Designated_Type (Id);
5648 if Ekind (Desig_Type) = E_Incomplete_Type
5649 and then Present (Full_View (Desig_Type))
5651 return Full_View (Desig_Type);
5653 elsif Is_Class_Wide_Type (Desig_Type)
5654 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
5655 and then Present (Full_View (Etype (Desig_Type)))
5656 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
5658 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
5663 end Designated_Type;
5665 -----------------------------
5666 -- Enclosing_Dynamic_Scope --
5667 -----------------------------
5669 function Enclosing_Dynamic_Scope (Id : E) return E is
5673 -- The following test is an error defense against some syntax
5674 -- errors that can leave scopes very messed up.
5676 if Id = Standard_Standard then
5680 -- Normal case, search enclosing scopes
5682 -- Note: the test for Present (S) should not be required, it is a
5683 -- defence against an ill-formed tree.
5687 -- If we somehow got an empty value for Scope, the tree must be
5688 -- malformed. Rather than blow up we return Standard in this case.
5691 return Standard_Standard;
5693 -- Quit if we get to standard or a dynamic scope
5695 elsif S = Standard_Standard
5696 or else Is_Dynamic_Scope (S)
5700 -- Otherwise keep climbing
5708 end Enclosing_Dynamic_Scope;
5710 ----------------------
5711 -- Entry_Index_Type --
5712 ----------------------
5714 function Entry_Index_Type (Id : E) return N is
5716 pragma Assert (Ekind (Id) = E_Entry_Family);
5717 return Etype (Discrete_Subtype_Definition (Parent (Id)));
5718 end Entry_Index_Type;
5720 ---------------------
5721 -- First_Component --
5722 ---------------------
5724 function First_Component (Id : E) return E is
5729 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5731 Comp_Id := First_Entity (Id);
5732 while Present (Comp_Id) loop
5733 exit when Ekind (Comp_Id) = E_Component;
5734 Comp_Id := Next_Entity (Comp_Id);
5738 end First_Component;
5740 -------------------------------------
5741 -- First_Component_Or_Discriminant --
5742 -------------------------------------
5744 function First_Component_Or_Discriminant (Id : E) return E is
5749 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5751 Comp_Id := First_Entity (Id);
5752 while Present (Comp_Id) loop
5753 exit when Ekind (Comp_Id) = E_Component
5755 Ekind (Comp_Id) = E_Discriminant;
5756 Comp_Id := Next_Entity (Comp_Id);
5760 end First_Component_Or_Discriminant;
5762 ------------------------
5763 -- First_Discriminant --
5764 ------------------------
5766 function First_Discriminant (Id : E) return E is
5771 (Has_Discriminants (Id)
5772 or else Has_Unknown_Discriminants (Id));
5774 Ent := First_Entity (Id);
5776 -- The discriminants are not necessarily contiguous, because access
5777 -- discriminants will generate itypes. They are not the first entities
5778 -- either, because tag and controller record must be ahead of them.
5780 if Chars (Ent) = Name_uTag then
5781 Ent := Next_Entity (Ent);
5784 if Chars (Ent) = Name_uController then
5785 Ent := Next_Entity (Ent);
5788 -- Skip all hidden stored discriminants if any
5790 while Present (Ent) loop
5791 exit when Ekind (Ent) = E_Discriminant
5792 and then not Is_Completely_Hidden (Ent);
5794 Ent := Next_Entity (Ent);
5797 pragma Assert (Ekind (Ent) = E_Discriminant);
5800 end First_Discriminant;
5806 function First_Formal (Id : E) return E is
5811 (Is_Overloadable (Id)
5812 or else Ekind (Id) = E_Entry_Family
5813 or else Ekind (Id) = E_Subprogram_Body
5814 or else Ekind (Id) = E_Subprogram_Type);
5816 if Ekind (Id) = E_Enumeration_Literal then
5820 Formal := First_Entity (Id);
5822 if Present (Formal) and then Is_Formal (Formal) then
5830 ------------------------------
5831 -- First_Formal_With_Extras --
5832 ------------------------------
5834 function First_Formal_With_Extras (Id : E) return E is
5839 (Is_Overloadable (Id)
5840 or else Ekind (Id) = E_Entry_Family
5841 or else Ekind (Id) = E_Subprogram_Body
5842 or else Ekind (Id) = E_Subprogram_Type);
5844 if Ekind (Id) = E_Enumeration_Literal then
5848 Formal := First_Entity (Id);
5850 if Present (Formal) and then Is_Formal (Formal) then
5853 return Extra_Formals (Id); -- Empty if no extra formals
5856 end First_Formal_With_Extras;
5858 -------------------------------
5859 -- First_Stored_Discriminant --
5860 -------------------------------
5862 function First_Stored_Discriminant (Id : E) return E is
5865 function Has_Completely_Hidden_Discriminant (Id : E) return Boolean;
5866 -- Scans the Discriminants to see whether any are Completely_Hidden
5867 -- (the mechanism for describing non-specified stored discriminants)
5869 ----------------------------------------
5870 -- Has_Completely_Hidden_Discriminant --
5871 ----------------------------------------
5873 function Has_Completely_Hidden_Discriminant (Id : E) return Boolean is
5874 Ent : Entity_Id := Id;
5877 pragma Assert (Ekind (Id) = E_Discriminant);
5879 while Present (Ent) and then Ekind (Ent) = E_Discriminant loop
5880 if Is_Completely_Hidden (Ent) then
5884 Ent := Next_Entity (Ent);
5888 end Has_Completely_Hidden_Discriminant;
5890 -- Start of processing for First_Stored_Discriminant
5894 (Has_Discriminants (Id)
5895 or else Has_Unknown_Discriminants (Id));
5897 Ent := First_Entity (Id);
5899 if Chars (Ent) = Name_uTag then
5900 Ent := Next_Entity (Ent);
5903 if Chars (Ent) = Name_uController then
5904 Ent := Next_Entity (Ent);
5907 if Has_Completely_Hidden_Discriminant (Ent) then
5909 while Present (Ent) loop
5910 exit when Is_Completely_Hidden (Ent);
5911 Ent := Next_Entity (Ent);
5916 pragma Assert (Ekind (Ent) = E_Discriminant);
5919 end First_Stored_Discriminant;
5925 function First_Subtype (Id : E) return E is
5926 B : constant Entity_Id := Base_Type (Id);
5927 F : constant Node_Id := Freeze_Node (B);
5931 -- If the base type has no freeze node, it is a type in standard,
5932 -- and always acts as its own first subtype unless it is one of
5933 -- the predefined integer types. If the type is formal, it is also
5934 -- a first subtype, and its base type has no freeze node. On the other
5935 -- hand, a subtype of a generic formal is not its own first_subtype.
5936 -- Its base type, if anonymous, is attached to the formal type decl.
5937 -- from which the first subtype is obtained.
5941 if B = Base_Type (Standard_Integer) then
5942 return Standard_Integer;
5944 elsif B = Base_Type (Standard_Long_Integer) then
5945 return Standard_Long_Integer;
5947 elsif B = Base_Type (Standard_Short_Short_Integer) then
5948 return Standard_Short_Short_Integer;
5950 elsif B = Base_Type (Standard_Short_Integer) then
5951 return Standard_Short_Integer;
5953 elsif B = Base_Type (Standard_Long_Long_Integer) then
5954 return Standard_Long_Long_Integer;
5956 elsif Is_Generic_Type (Id) then
5957 if Present (Parent (B)) then
5958 return Defining_Identifier (Parent (B));
5960 return Defining_Identifier (Associated_Node_For_Itype (B));
5967 -- Otherwise we check the freeze node, if it has a First_Subtype_Link
5968 -- then we use that link, otherwise (happens with some Itypes), we use
5969 -- the base type itself.
5972 Ent := First_Subtype_Link (F);
5974 if Present (Ent) then
5982 -------------------------------------
5983 -- Get_Attribute_Definition_Clause --
5984 -------------------------------------
5986 function Get_Attribute_Definition_Clause
5988 Id : Attribute_Id) return Node_Id
5993 N := First_Rep_Item (E);
5994 while Present (N) loop
5995 if Nkind (N) = N_Attribute_Definition_Clause
5996 and then Get_Attribute_Id (Chars (N)) = Id
6005 end Get_Attribute_Definition_Clause;
6011 function Get_Full_View (T : Entity_Id) return Entity_Id is
6013 if Ekind (T) = E_Incomplete_Type
6014 and then Present (Full_View (T))
6016 return Full_View (T);
6018 elsif Is_Class_Wide_Type (T)
6019 and then Ekind (Root_Type (T)) = E_Incomplete_Type
6020 and then Present (Full_View (Root_Type (T)))
6022 return Class_Wide_Type (Full_View (Root_Type (T)));
6029 --------------------
6030 -- Get_Rep_Pragma --
6031 --------------------
6033 function Get_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Node_Id is
6037 N := First_Rep_Item (E);
6038 while Present (N) loop
6039 if Nkind (N) = N_Pragma and then Pragma_Name (N) = Nam then
6049 ------------------------
6050 -- Has_Attach_Handler --
6051 ------------------------
6053 function Has_Attach_Handler (Id : E) return B is
6057 pragma Assert (Is_Protected_Type (Id));
6059 Ritem := First_Rep_Item (Id);
6060 while Present (Ritem) loop
6061 if Nkind (Ritem) = N_Pragma
6062 and then Pragma_Name (Ritem) = Name_Attach_Handler
6066 Ritem := Next_Rep_Item (Ritem);
6071 end Has_Attach_Handler;
6073 -------------------------------------
6074 -- Has_Attribute_Definition_Clause --
6075 -------------------------------------
6077 function Has_Attribute_Definition_Clause
6079 Id : Attribute_Id) return Boolean
6082 return Present (Get_Attribute_Definition_Clause (E, Id));
6083 end Has_Attribute_Definition_Clause;
6089 function Has_Entries (Id : E) return B is
6093 pragma Assert (Is_Concurrent_Type (Id));
6095 Ent := First_Entity (Id);
6096 while Present (Ent) loop
6097 if Is_Entry (Ent) then
6101 Ent := Next_Entity (Ent);
6107 ----------------------------
6108 -- Has_Foreign_Convention --
6109 ----------------------------
6111 function Has_Foreign_Convention (Id : E) return B is
6113 return Convention (Id) in Foreign_Convention;
6114 end Has_Foreign_Convention;
6116 ---------------------------
6117 -- Has_Interrupt_Handler --
6118 ---------------------------
6120 function Has_Interrupt_Handler (Id : E) return B is
6124 pragma Assert (Is_Protected_Type (Id));
6126 Ritem := First_Rep_Item (Id);
6127 while Present (Ritem) loop
6128 if Nkind (Ritem) = N_Pragma
6129 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6133 Ritem := Next_Rep_Item (Ritem);
6138 end Has_Interrupt_Handler;
6140 --------------------------
6141 -- Has_Private_Ancestor --
6142 --------------------------
6144 function Has_Private_Ancestor (Id : E) return B is
6145 R : constant Entity_Id := Root_Type (Id);
6146 T1 : Entity_Id := Id;
6149 if Is_Private_Type (T1) then
6157 end Has_Private_Ancestor;
6159 --------------------
6160 -- Has_Rep_Pragma --
6161 --------------------
6163 function Has_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Boolean is
6165 return Present (Get_Rep_Pragma (E, Nam));
6168 --------------------
6169 -- Has_Unmodified --
6170 --------------------
6172 function Has_Unmodified (E : Entity_Id) return Boolean is
6174 if Has_Pragma_Unmodified (E) then
6176 elsif Warnings_Off (E) then
6177 Set_Warnings_Off_Used_Unmodified (E);
6184 ---------------------
6185 -- Has_Unreferenced --
6186 ---------------------
6188 function Has_Unreferenced (E : Entity_Id) return Boolean is
6190 if Has_Pragma_Unreferenced (E) then
6192 elsif Warnings_Off (E) then
6193 Set_Warnings_Off_Used_Unreferenced (E);
6198 end Has_Unreferenced;
6200 ----------------------
6201 -- Has_Warnings_Off --
6202 ----------------------
6204 function Has_Warnings_Off (E : Entity_Id) return Boolean is
6206 if Warnings_Off (E) then
6207 Set_Warnings_Off_Used (E);
6212 end Has_Warnings_Off;
6214 ------------------------------
6215 -- Implementation_Base_Type --
6216 ------------------------------
6218 function Implementation_Base_Type (Id : E) return E is
6223 Bastyp := Base_Type (Id);
6225 if Is_Incomplete_Or_Private_Type (Bastyp) then
6226 Imptyp := Underlying_Type (Bastyp);
6228 -- If we have an implementation type, then just return it,
6229 -- otherwise we return the Base_Type anyway. This can only
6230 -- happen in error situations and should avoid some error bombs.
6232 if Present (Imptyp) then
6233 return Base_Type (Imptyp);
6241 end Implementation_Base_Type;
6243 ---------------------
6244 -- Is_Boolean_Type --
6245 ---------------------
6247 function Is_Boolean_Type (Id : E) return B is
6249 return Root_Type (Id) = Standard_Boolean;
6250 end Is_Boolean_Type;
6252 ---------------------
6253 -- Is_By_Copy_Type --
6254 ---------------------
6256 function Is_By_Copy_Type (Id : E) return B is
6258 -- If Id is a private type whose full declaration has not been seen,
6259 -- we assume for now that it is not a By_Copy type. Clearly this
6260 -- attribute should not be used before the type is frozen, but it is
6261 -- needed to build the associated record of a protected type. Another
6262 -- place where some lookahead for a full view is needed ???
6265 Is_Elementary_Type (Id)
6266 or else (Is_Private_Type (Id)
6267 and then Present (Underlying_Type (Id))
6268 and then Is_Elementary_Type (Underlying_Type (Id)));
6269 end Is_By_Copy_Type;
6271 --------------------------
6272 -- Is_By_Reference_Type --
6273 --------------------------
6275 -- This function knows too much semantics, it should be in sem_util ???
6277 function Is_By_Reference_Type (Id : E) return B is
6278 Btype : constant Entity_Id := Base_Type (Id);
6281 if Error_Posted (Id)
6282 or else Error_Posted (Btype)
6286 elsif Is_Private_Type (Btype) then
6288 Utyp : constant Entity_Id := Underlying_Type (Btype);
6293 return Is_By_Reference_Type (Utyp);
6297 elsif Is_Incomplete_Type (Btype) then
6299 Ftyp : constant Entity_Id := Full_View (Btype);
6304 return Is_By_Reference_Type (Ftyp);
6308 elsif Is_Concurrent_Type (Btype) then
6311 elsif Is_Record_Type (Btype) then
6312 if Is_Limited_Record (Btype)
6313 or else Is_Tagged_Type (Btype)
6314 or else Is_Volatile (Btype)
6323 C := First_Component (Btype);
6324 while Present (C) loop
6325 if Is_By_Reference_Type (Etype (C))
6326 or else Is_Volatile (Etype (C))
6331 C := Next_Component (C);
6338 elsif Is_Array_Type (Btype) then
6341 or else Is_By_Reference_Type (Component_Type (Btype))
6342 or else Is_Volatile (Component_Type (Btype))
6343 or else Has_Volatile_Components (Btype);
6348 end Is_By_Reference_Type;
6350 ---------------------
6351 -- Is_Derived_Type --
6352 ---------------------
6354 function Is_Derived_Type (Id : E) return B is
6359 and then Base_Type (Id) /= Root_Type (Id)
6360 and then not Is_Class_Wide_Type (Id)
6362 if not Is_Numeric_Type (Root_Type (Id)) then
6366 Par := Parent (First_Subtype (Id));
6368 return Present (Par)
6369 and then Nkind (Par) = N_Full_Type_Declaration
6370 and then Nkind (Type_Definition (Par))
6371 = N_Derived_Type_Definition;
6377 end Is_Derived_Type;
6379 ----------------------
6380 -- Is_Dynamic_Scope --
6381 ----------------------
6383 function Is_Dynamic_Scope (Id : E) return B is
6386 Ekind (Id) = E_Block
6388 Ekind (Id) = E_Function
6390 Ekind (Id) = E_Procedure
6392 Ekind (Id) = E_Subprogram_Body
6394 Ekind (Id) = E_Task_Type
6396 Ekind (Id) = E_Entry
6398 Ekind (Id) = E_Entry_Family
6400 Ekind (Id) = E_Return_Statement;
6401 end Is_Dynamic_Scope;
6403 --------------------
6404 -- Is_Entity_Name --
6405 --------------------
6407 function Is_Entity_Name (N : Node_Id) return Boolean is
6408 Kind : constant Node_Kind := Nkind (N);
6411 -- Identifiers, operator symbols, expanded names are entity names
6413 return Kind = N_Identifier
6414 or else Kind = N_Operator_Symbol
6415 or else Kind = N_Expanded_Name
6417 -- Attribute references are entity names if they refer to an entity.
6418 -- Note that we don't do this by testing for the presence of the
6419 -- Entity field in the N_Attribute_Reference node, since it may not
6420 -- have been set yet.
6422 or else (Kind = N_Attribute_Reference
6423 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
6426 ---------------------------
6427 -- Is_Indefinite_Subtype --
6428 ---------------------------
6430 function Is_Indefinite_Subtype (Id : Entity_Id) return B is
6431 K : constant Entity_Kind := Ekind (Id);
6434 if Is_Constrained (Id) then
6437 elsif K in Array_Kind
6438 or else K in Class_Wide_Kind
6439 or else Has_Unknown_Discriminants (Id)
6443 -- Known discriminants: indefinite if there are no default values
6445 elsif K in Record_Kind
6446 or else Is_Incomplete_Or_Private_Type (Id)
6447 or else Is_Concurrent_Type (Id)
6449 return (Has_Discriminants (Id)
6450 and then No (Discriminant_Default_Value (First_Discriminant (Id))));
6455 end Is_Indefinite_Subtype;
6457 ---------------------
6458 -- Is_Limited_Type --
6459 ---------------------
6461 function Is_Limited_Type (Id : E) return B is
6462 Btype : constant E := Base_Type (Id);
6463 Rtype : constant E := Root_Type (Btype);
6466 if not Is_Type (Id) then
6469 elsif Ekind (Btype) = E_Limited_Private_Type
6470 or else Is_Limited_Composite (Btype)
6474 elsif Is_Concurrent_Type (Btype) then
6477 -- The Is_Limited_Record flag normally indicates that the type is
6478 -- limited. The exception is that a type does not inherit limitedness
6479 -- from its interface ancestor. So the type may be derived from a
6480 -- limited interface, but is not limited.
6482 elsif Is_Limited_Record (Id)
6483 and then not Is_Interface (Id)
6487 -- Otherwise we will look around to see if there is some other reason
6488 -- for it to be limited, except that if an error was posted on the
6489 -- entity, then just assume it is non-limited, because it can cause
6490 -- trouble to recurse into a murky erroneous entity!
6492 elsif Error_Posted (Id) then
6495 elsif Is_Record_Type (Btype) then
6497 if Is_Limited_Interface (Id) then
6500 -- AI-419: limitedness is not inherited from a limited interface
6502 elsif Is_Limited_Record (Rtype) then
6503 return not Is_Interface (Rtype)
6504 or else Is_Protected_Interface (Rtype)
6505 or else Is_Synchronized_Interface (Rtype)
6506 or else Is_Task_Interface (Rtype);
6508 elsif Is_Class_Wide_Type (Btype) then
6509 return Is_Limited_Type (Rtype);
6516 C := First_Component (Btype);
6517 while Present (C) loop
6518 if Is_Limited_Type (Etype (C)) then
6522 C := Next_Component (C);
6529 elsif Is_Array_Type (Btype) then
6530 return Is_Limited_Type (Component_Type (Btype));
6535 end Is_Limited_Type;
6537 -----------------------------------
6538 -- Is_Package_Or_Generic_Package --
6539 -----------------------------------
6541 function Is_Package_Or_Generic_Package (Id : E) return B is
6544 Ekind (Id) = E_Package
6546 Ekind (Id) = E_Generic_Package;
6547 end Is_Package_Or_Generic_Package;
6549 --------------------------
6550 -- Is_Protected_Private --
6551 --------------------------
6553 function Is_Protected_Private (Id : E) return B is
6555 pragma Assert (Ekind (Id) = E_Component);
6556 return Is_Protected_Type (Scope (Id));
6557 end Is_Protected_Private;
6559 ------------------------------
6560 -- Is_Protected_Record_Type --
6561 ------------------------------
6563 function Is_Protected_Record_Type (Id : E) return B is
6566 Is_Concurrent_Record_Type (Id)
6567 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
6568 end Is_Protected_Record_Type;
6570 --------------------------------
6571 -- Is_Inherently_Limited_Type --
6572 --------------------------------
6574 function Is_Inherently_Limited_Type (Id : E) return B is
6575 Btype : constant Entity_Id := Base_Type (Id);
6578 if Is_Private_Type (Btype) then
6580 Utyp : constant Entity_Id := Underlying_Type (Btype);
6585 return Is_Inherently_Limited_Type (Utyp);
6589 elsif Is_Concurrent_Type (Btype) then
6592 elsif Is_Record_Type (Btype) then
6593 if Is_Limited_Record (Btype) then
6594 return not Is_Interface (Btype)
6595 or else Is_Protected_Interface (Btype)
6596 or else Is_Synchronized_Interface (Btype)
6597 or else Is_Task_Interface (Btype);
6599 elsif Is_Class_Wide_Type (Btype) then
6600 return Is_Inherently_Limited_Type (Root_Type (Btype));
6607 C := First_Component (Btype);
6608 while Present (C) loop
6609 if Is_Inherently_Limited_Type (Etype (C)) then
6613 C := Next_Component (C);
6620 elsif Is_Array_Type (Btype) then
6621 return Is_Inherently_Limited_Type (Component_Type (Btype));
6626 end Is_Inherently_Limited_Type;
6628 --------------------
6629 -- Is_String_Type --
6630 --------------------
6632 function Is_String_Type (Id : E) return B is
6634 return Ekind (Id) in String_Kind
6635 or else (Is_Array_Type (Id)
6636 and then Number_Dimensions (Id) = 1
6637 and then Is_Character_Type (Component_Type (Id)));
6640 -------------------------
6641 -- Is_Task_Record_Type --
6642 -------------------------
6644 function Is_Task_Record_Type (Id : E) return B is
6647 Is_Concurrent_Record_Type (Id)
6648 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
6649 end Is_Task_Record_Type;
6651 ------------------------
6652 -- Is_Wrapper_Package --
6653 ------------------------
6655 function Is_Wrapper_Package (Id : E) return B is
6657 return (Ekind (Id) = E_Package
6658 and then Present (Related_Instance (Id)));
6659 end Is_Wrapper_Package;
6661 --------------------
6662 -- Next_Component --
6663 --------------------
6665 function Next_Component (Id : E) return E is
6669 Comp_Id := Next_Entity (Id);
6670 while Present (Comp_Id) loop
6671 exit when Ekind (Comp_Id) = E_Component;
6672 Comp_Id := Next_Entity (Comp_Id);
6678 ------------------------------------
6679 -- Next_Component_Or_Discriminant --
6680 ------------------------------------
6682 function Next_Component_Or_Discriminant (Id : E) return E is
6686 Comp_Id := Next_Entity (Id);
6687 while Present (Comp_Id) loop
6688 exit when Ekind (Comp_Id) = E_Component
6690 Ekind (Comp_Id) = E_Discriminant;
6691 Comp_Id := Next_Entity (Comp_Id);
6695 end Next_Component_Or_Discriminant;
6697 -----------------------
6698 -- Next_Discriminant --
6699 -----------------------
6701 -- This function actually implements both Next_Discriminant and
6702 -- Next_Stored_Discriminant by making sure that the Discriminant
6703 -- returned is of the same variety as Id.
6705 function Next_Discriminant (Id : E) return E is
6707 -- Derived Tagged types with private extensions look like this...
6709 -- E_Discriminant d1
6710 -- E_Discriminant d2
6712 -- E_Discriminant d1
6713 -- E_Discriminant d2
6716 -- so it is critical not to go past the leading discriminants
6721 pragma Assert (Ekind (Id) = E_Discriminant);
6724 D := Next_Entity (D);
6726 or else (Ekind (D) /= E_Discriminant
6727 and then not Is_Itype (D))
6732 exit when Ekind (D) = E_Discriminant
6733 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
6737 end Next_Discriminant;
6743 function Next_Formal (Id : E) return E is
6747 -- Follow the chain of declared entities as long as the kind of the
6748 -- entity corresponds to a formal parameter. Skip internal entities
6749 -- that may have been created for implicit subtypes, in the process
6750 -- of analyzing default expressions.
6755 P := Next_Entity (P);
6757 if No (P) or else Is_Formal (P) then
6759 elsif not Is_Internal (P) then
6765 -----------------------------
6766 -- Next_Formal_With_Extras --
6767 -----------------------------
6769 function Next_Formal_With_Extras (Id : E) return E is
6771 if Present (Extra_Formal (Id)) then
6772 return Extra_Formal (Id);
6774 return Next_Formal (Id);
6776 end Next_Formal_With_Extras;
6782 function Next_Index (Id : Node_Id) return Node_Id is
6791 function Next_Literal (Id : E) return E is
6793 pragma Assert (Nkind (Id) in N_Entity);
6797 ------------------------------
6798 -- Next_Stored_Discriminant --
6799 ------------------------------
6801 function Next_Stored_Discriminant (Id : E) return E is
6803 -- See comment in Next_Discriminant
6805 return Next_Discriminant (Id);
6806 end Next_Stored_Discriminant;
6808 -----------------------
6809 -- Number_Dimensions --
6810 -----------------------
6812 function Number_Dimensions (Id : E) return Pos is
6817 if Ekind (Id) in String_Kind then
6822 T := First_Index (Id);
6823 while Present (T) loop
6830 end Number_Dimensions;
6832 --------------------------
6833 -- Number_Discriminants --
6834 --------------------------
6836 function Number_Discriminants (Id : E) return Pos is
6842 Discr := First_Discriminant (Id);
6843 while Present (Discr) loop
6845 Discr := Next_Discriminant (Discr);
6849 end Number_Discriminants;
6851 --------------------
6852 -- Number_Entries --
6853 --------------------
6855 function Number_Entries (Id : E) return Nat is
6860 pragma Assert (Is_Concurrent_Type (Id));
6863 Ent := First_Entity (Id);
6864 while Present (Ent) loop
6865 if Is_Entry (Ent) then
6869 Ent := Next_Entity (Ent);
6875 --------------------
6876 -- Number_Formals --
6877 --------------------
6879 function Number_Formals (Id : E) return Pos is
6885 Formal := First_Formal (Id);
6886 while Present (Formal) loop
6888 Formal := Next_Formal (Formal);
6894 --------------------
6895 -- Parameter_Mode --
6896 --------------------
6898 function Parameter_Mode (Id : E) return Formal_Kind is
6903 ---------------------
6904 -- Record_Rep_Item --
6905 ---------------------
6907 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
6909 Set_Next_Rep_Item (N, First_Rep_Item (E));
6910 Set_First_Rep_Item (E, N);
6911 end Record_Rep_Item;
6917 function Root_Type (Id : E) return E is
6921 pragma Assert (Nkind (Id) in N_Entity);
6923 T := Base_Type (Id);
6925 if Ekind (T) = E_Class_Wide_Type then
6928 elsif Ekind (T) = E_Class_Wide_Subtype then
6929 return Etype (Base_Type (T));
6931 -- ??? T comes from Base_Type, how can it be a subtype?
6932 -- Also Base_Type is supposed to be idempotent, so either way
6933 -- this is equivalent to "return Etype (T)" and should be merged
6934 -- with the E_Class_Wide_Type case.
6945 -- Following test catches some error cases resulting from
6948 elsif No (Etyp) then
6951 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
6954 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
6960 -- Return if there is a circularity in the inheritance chain.
6961 -- This happens in some error situations and we do not want
6962 -- to get stuck in this loop.
6964 if T = Base_Type (Id) then
6970 raise Program_Error;
6977 function Scope_Depth (Id : E) return Uint is
6982 while Is_Record_Type (Scop) loop
6983 Scop := Scope (Scop);
6986 return Scope_Depth_Value (Scop);
6989 ---------------------
6990 -- Scope_Depth_Set --
6991 ---------------------
6993 function Scope_Depth_Set (Id : E) return B is
6995 return not Is_Record_Type (Id)
6996 and then Field22 (Id) /= Union_Id (Empty);
6997 end Scope_Depth_Set;
6999 -----------------------------
7000 -- Set_Component_Alignment --
7001 -----------------------------
7003 -- Component Alignment is encoded using two flags, Flag128/129 as
7004 -- follows. Note that both flags False = Align_Default, so that the
7005 -- default initialization of flags to False initializes component
7006 -- alignment to the default value as required.
7008 -- Flag128 Flag129 Value
7009 -- ------- ------- -----
7010 -- False False Calign_Default
7011 -- False True Calign_Component_Size
7012 -- True False Calign_Component_Size_4
7013 -- True True Calign_Storage_Unit
7015 procedure Set_Component_Alignment (Id : E; V : C) is
7017 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
7018 and then Id = Base_Type (Id));
7021 when Calign_Default =>
7022 Set_Flag128 (Id, False);
7023 Set_Flag129 (Id, False);
7025 when Calign_Component_Size =>
7026 Set_Flag128 (Id, False);
7027 Set_Flag129 (Id, True);
7029 when Calign_Component_Size_4 =>
7030 Set_Flag128 (Id, True);
7031 Set_Flag129 (Id, False);
7033 when Calign_Storage_Unit =>
7034 Set_Flag128 (Id, True);
7035 Set_Flag129 (Id, True);
7037 end Set_Component_Alignment;
7043 function Size_Clause (Id : E) return N is
7045 return Rep_Clause (Id, Name_Size);
7048 ------------------------
7049 -- Stream_Size_Clause --
7050 ------------------------
7052 function Stream_Size_Clause (Id : E) return N is
7054 return Rep_Clause (Id, Name_Stream_Size);
7055 end Stream_Size_Clause;
7061 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
7067 Kind := E_Access_Subtype;
7071 Kind := E_Array_Subtype;
7073 when E_Class_Wide_Type |
7074 E_Class_Wide_Subtype =>
7075 Kind := E_Class_Wide_Subtype;
7077 when E_Decimal_Fixed_Point_Type |
7078 E_Decimal_Fixed_Point_Subtype =>
7079 Kind := E_Decimal_Fixed_Point_Subtype;
7081 when E_Ordinary_Fixed_Point_Type |
7082 E_Ordinary_Fixed_Point_Subtype =>
7083 Kind := E_Ordinary_Fixed_Point_Subtype;
7085 when E_Private_Type |
7086 E_Private_Subtype =>
7087 Kind := E_Private_Subtype;
7089 when E_Limited_Private_Type |
7090 E_Limited_Private_Subtype =>
7091 Kind := E_Limited_Private_Subtype;
7093 when E_Record_Type_With_Private |
7094 E_Record_Subtype_With_Private =>
7095 Kind := E_Record_Subtype_With_Private;
7097 when E_Record_Type |
7099 Kind := E_Record_Subtype;
7101 when E_String_Type |
7103 Kind := E_String_Subtype;
7105 when Enumeration_Kind =>
7106 Kind := E_Enumeration_Subtype;
7109 Kind := E_Floating_Point_Subtype;
7111 when Signed_Integer_Kind =>
7112 Kind := E_Signed_Integer_Subtype;
7114 when Modular_Integer_Kind =>
7115 Kind := E_Modular_Integer_Subtype;
7117 when Protected_Kind =>
7118 Kind := E_Protected_Subtype;
7121 Kind := E_Task_Subtype;
7125 raise Program_Error;
7131 -------------------------
7132 -- First_Tag_Component --
7133 -------------------------
7135 function First_Tag_Component (Id : E) return E is
7137 Typ : Entity_Id := Id;
7140 pragma Assert (Is_Tagged_Type (Typ));
7142 if Is_Class_Wide_Type (Typ) then
7143 Typ := Root_Type (Typ);
7146 if Is_Private_Type (Typ) then
7147 Typ := Underlying_Type (Typ);
7149 -- If the underlying type is missing then the source program has
7150 -- errors and there is nothing else to do (the full-type declaration
7151 -- associated with the private type declaration is missing).
7158 Comp := First_Entity (Typ);
7159 while Present (Comp) loop
7160 if Is_Tag (Comp) then
7164 Comp := Next_Entity (Comp);
7167 -- No tag component found
7170 end First_Tag_Component;
7172 ------------------------
7173 -- Next_Tag_Component --
7174 ------------------------
7176 function Next_Tag_Component (Id : E) return E is
7178 Typ : constant Entity_Id := Scope (Id);
7181 pragma Assert (Ekind (Id) = E_Component
7182 and then Is_Tagged_Type (Typ));
7184 Comp := Next_Entity (Id);
7185 while Present (Comp) loop
7186 if Is_Tag (Comp) then
7187 pragma Assert (Chars (Comp) /= Name_uTag);
7191 Comp := Next_Entity (Comp);
7194 -- No tag component found
7197 end Next_Tag_Component;
7199 ---------------------
7200 -- Type_High_Bound --
7201 ---------------------
7203 function Type_High_Bound (Id : E) return Node_Id is
7204 Rng : constant Node_Id := Scalar_Range (Id);
7206 if Nkind (Rng) = N_Subtype_Indication then
7207 return High_Bound (Range_Expression (Constraint (Rng)));
7209 return High_Bound (Rng);
7211 end Type_High_Bound;
7213 --------------------
7214 -- Type_Low_Bound --
7215 --------------------
7217 function Type_Low_Bound (Id : E) return Node_Id is
7218 Rng : constant Node_Id := Scalar_Range (Id);
7220 if Nkind (Rng) = N_Subtype_Indication then
7221 return Low_Bound (Range_Expression (Constraint (Rng)));
7223 return Low_Bound (Rng);
7227 ---------------------
7228 -- Underlying_Type --
7229 ---------------------
7231 function Underlying_Type (Id : E) return E is
7233 -- For record_with_private the underlying type is always the direct
7234 -- full view. Never try to take the full view of the parent it
7235 -- doesn't make sense.
7237 if Ekind (Id) = E_Record_Type_With_Private then
7238 return Full_View (Id);
7240 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
7242 -- If we have an incomplete or private type with a full view,
7243 -- then we return the Underlying_Type of this full view
7245 if Present (Full_View (Id)) then
7246 if Id = Full_View (Id) then
7248 -- Previous error in declaration
7253 return Underlying_Type (Full_View (Id));
7256 -- If we have an incomplete entity that comes from the limited
7257 -- view then we return the Underlying_Type of its non-limited
7260 elsif From_With_Type (Id)
7261 and then Present (Non_Limited_View (Id))
7263 return Underlying_Type (Non_Limited_View (Id));
7265 -- Otherwise check for the case where we have a derived type or
7266 -- subtype, and if so get the Underlying_Type of the parent type.
7268 elsif Etype (Id) /= Id then
7269 return Underlying_Type (Etype (Id));
7271 -- Otherwise we have an incomplete or private type that has
7272 -- no full view, which means that we have not encountered the
7273 -- completion, so return Empty to indicate the underlying type
7274 -- is not yet known.
7280 -- For non-incomplete, non-private types, return the type itself
7281 -- Also for entities that are not types at all return the entity
7287 end Underlying_Type;
7289 ------------------------
7290 -- Write_Entity_Flags --
7291 ------------------------
7293 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
7295 procedure W (Flag_Name : String; Flag : Boolean);
7296 -- Write out given flag if it is set
7302 procedure W (Flag_Name : String; Flag : Boolean) is
7306 Write_Str (Flag_Name);
7307 Write_Str (" = True");
7312 -- Start of processing for Write_Entity_Flags
7315 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
7316 and then Base_Type (Id) = Id
7319 Write_Str ("Component_Alignment = ");
7321 case Component_Alignment (Id) is
7322 when Calign_Default =>
7323 Write_Str ("Calign_Default");
7325 when Calign_Component_Size =>
7326 Write_Str ("Calign_Component_Size");
7328 when Calign_Component_Size_4 =>
7329 Write_Str ("Calign_Component_Size_4");
7331 when Calign_Storage_Unit =>
7332 Write_Str ("Calign_Storage_Unit");
7338 W ("Address_Taken", Flag104 (Id));
7339 W ("Body_Needed_For_SAL", Flag40 (Id));
7340 W ("C_Pass_By_Copy", Flag125 (Id));
7341 W ("Can_Never_Be_Null", Flag38 (Id));
7342 W ("Checks_May_Be_Suppressed", Flag31 (Id));
7343 W ("Debug_Info_Off", Flag166 (Id));
7344 W ("Default_Expressions_Processed", Flag108 (Id));
7345 W ("Delay_Cleanups", Flag114 (Id));
7346 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
7347 W ("Depends_On_Private", Flag14 (Id));
7348 W ("Discard_Names", Flag88 (Id));
7349 W ("Elaboration_Entity_Required", Flag174 (Id));
7350 W ("Elaborate_Body_Desirable", Flag210 (Id));
7351 W ("Entry_Accepted", Flag152 (Id));
7352 W ("Can_Use_Internal_Rep", Flag229 (Id));
7353 W ("Finalize_Storage_Only", Flag158 (Id));
7354 W ("From_With_Type", Flag159 (Id));
7355 W ("Function_Returns_With_DSP", Flag169 (Id));
7356 W ("Has_Aliased_Components", Flag135 (Id));
7357 W ("Has_Alignment_Clause", Flag46 (Id));
7358 W ("Has_All_Calls_Remote", Flag79 (Id));
7359 W ("Has_Anon_Block_Suffix", Flag201 (Id));
7360 W ("Has_Atomic_Components", Flag86 (Id));
7361 W ("Has_Biased_Representation", Flag139 (Id));
7362 W ("Has_Completion", Flag26 (Id));
7363 W ("Has_Completion_In_Body", Flag71 (Id));
7364 W ("Has_Complex_Representation", Flag140 (Id));
7365 W ("Has_Component_Size_Clause", Flag68 (Id));
7366 W ("Has_Contiguous_Rep", Flag181 (Id));
7367 W ("Has_Controlled_Component", Flag43 (Id));
7368 W ("Has_Controlling_Result", Flag98 (Id));
7369 W ("Has_Convention_Pragma", Flag119 (Id));
7370 W ("Has_Delayed_Freeze", Flag18 (Id));
7371 W ("Has_Discriminants", Flag5 (Id));
7372 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
7373 W ("Has_Exit", Flag47 (Id));
7374 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
7375 W ("Has_Forward_Instantiation", Flag175 (Id));
7376 W ("Has_Fully_Qualified_Name", Flag173 (Id));
7377 W ("Has_Gigi_Rep_Item", Flag82 (Id));
7378 W ("Has_Homonym", Flag56 (Id));
7379 W ("Has_Initial_Value", Flag219 (Id));
7380 W ("Has_Machine_Radix_Clause", Flag83 (Id));
7381 W ("Has_Master_Entity", Flag21 (Id));
7382 W ("Has_Missing_Return", Flag142 (Id));
7383 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
7384 W ("Has_Non_Standard_Rep", Flag75 (Id));
7385 W ("Has_Object_Size_Clause", Flag172 (Id));
7386 W ("Has_Per_Object_Constraint", Flag154 (Id));
7387 W ("Has_Persistent_BSS", Flag188 (Id));
7388 W ("Has_Pragma_Controlled", Flag27 (Id));
7389 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
7390 W ("Has_Pragma_Inline", Flag157 (Id));
7391 W ("Has_Pragma_Inline_Always", Flag230 (Id));
7392 W ("Has_Pragma_Pack", Flag121 (Id));
7393 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
7394 W ("Has_Pragma_Pure", Flag203 (Id));
7395 W ("Has_Pragma_Pure_Function", Flag179 (Id));
7396 W ("Has_Pragma_Unmodified", Flag233 (Id));
7397 W ("Has_Pragma_Unreferenced", Flag180 (Id));
7398 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
7399 W ("Has_Primitive_Operations", Flag120 (Id));
7400 W ("Has_Private_Declaration", Flag155 (Id));
7401 W ("Has_Qualified_Name", Flag161 (Id));
7402 W ("Has_RACW", Flag214 (Id));
7403 W ("Has_Record_Rep_Clause", Flag65 (Id));
7404 W ("Has_Recursive_Call", Flag143 (Id));
7405 W ("Has_Size_Clause", Flag29 (Id));
7406 W ("Has_Small_Clause", Flag67 (Id));
7407 W ("Has_Specified_Layout", Flag100 (Id));
7408 W ("Has_Specified_Stream_Input", Flag190 (Id));
7409 W ("Has_Specified_Stream_Output", Flag191 (Id));
7410 W ("Has_Specified_Stream_Read", Flag192 (Id));
7411 W ("Has_Specified_Stream_Write", Flag193 (Id));
7412 W ("Has_Static_Discriminants", Flag211 (Id));
7413 W ("Has_Storage_Size_Clause", Flag23 (Id));
7414 W ("Has_Stream_Size_Clause", Flag184 (Id));
7415 W ("Has_Subprogram_Descriptor", Flag93 (Id));
7416 W ("Has_Task", Flag30 (Id));
7417 W ("Has_Thunks", Flag228 (Id));
7418 W ("Has_Unchecked_Union", Flag123 (Id));
7419 W ("Has_Unknown_Discriminants", Flag72 (Id));
7420 W ("Has_Up_Level_Access", Flag215 (Id));
7421 W ("Has_Volatile_Components", Flag87 (Id));
7422 W ("Has_Xref_Entry", Flag182 (Id));
7423 W ("Implemented_By_Entry", Flag232 (Id));
7424 W ("In_Package_Body", Flag48 (Id));
7425 W ("In_Private_Part", Flag45 (Id));
7426 W ("In_Use", Flag8 (Id));
7427 W ("Is_AST_Entry", Flag132 (Id));
7428 W ("Is_Abstract_Subprogram", Flag19 (Id));
7429 W ("Is_Abstract_Type", Flag146 (Id));
7430 W ("Is_Local_Anonymous_Access", Flag194 (Id));
7431 W ("Is_Access_Constant", Flag69 (Id));
7432 W ("Is_Ada_2005_Only", Flag185 (Id));
7433 W ("Is_Aliased", Flag15 (Id));
7434 W ("Is_Asynchronous", Flag81 (Id));
7435 W ("Is_Atomic", Flag85 (Id));
7436 W ("Is_Bit_Packed_Array", Flag122 (Id));
7437 W ("Is_CPP_Class", Flag74 (Id));
7438 W ("Is_Called", Flag102 (Id));
7439 W ("Is_Character_Type", Flag63 (Id));
7440 W ("Is_Child_Unit", Flag73 (Id));
7441 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
7442 W ("Is_Compilation_Unit", Flag149 (Id));
7443 W ("Is_Completely_Hidden", Flag103 (Id));
7444 W ("Is_Concurrent_Record_Type", Flag20 (Id));
7445 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
7446 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
7447 W ("Is_Constrained", Flag12 (Id));
7448 W ("Is_Constructor", Flag76 (Id));
7449 W ("Is_Controlled", Flag42 (Id));
7450 W ("Is_Controlling_Formal", Flag97 (Id));
7451 W ("Is_Descendent_Of_Address", Flag223 (Id));
7452 W ("Is_Discrim_SO_Function", Flag176 (Id));
7453 W ("Is_Dispatching_Operation", Flag6 (Id));
7454 W ("Is_Eliminated", Flag124 (Id));
7455 W ("Is_Entry_Formal", Flag52 (Id));
7456 W ("Is_Exported", Flag99 (Id));
7457 W ("Is_First_Subtype", Flag70 (Id));
7458 W ("Is_For_Access_Subtype", Flag118 (Id));
7459 W ("Is_Formal_Subprogram", Flag111 (Id));
7460 W ("Is_Frozen", Flag4 (Id));
7461 W ("Is_Generic_Actual_Type", Flag94 (Id));
7462 W ("Is_Generic_Instance", Flag130 (Id));
7463 W ("Is_Generic_Type", Flag13 (Id));
7464 W ("Is_Hidden", Flag57 (Id));
7465 W ("Is_Hidden_Open_Scope", Flag171 (Id));
7466 W ("Is_Immediately_Visible", Flag7 (Id));
7467 W ("Is_Imported", Flag24 (Id));
7468 W ("Is_Inlined", Flag11 (Id));
7469 W ("Is_Instantiated", Flag126 (Id));
7470 W ("Is_Interface", Flag186 (Id));
7471 W ("Is_Internal", Flag17 (Id));
7472 W ("Is_Interrupt_Handler", Flag89 (Id));
7473 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
7474 W ("Is_Itype", Flag91 (Id));
7475 W ("Is_Known_Non_Null", Flag37 (Id));
7476 W ("Is_Known_Null", Flag204 (Id));
7477 W ("Is_Known_Valid", Flag170 (Id));
7478 W ("Is_Limited_Composite", Flag106 (Id));
7479 W ("Is_Limited_Interface", Flag197 (Id));
7480 W ("Is_Limited_Record", Flag25 (Id));
7481 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
7482 W ("Is_Non_Static_Subtype", Flag109 (Id));
7483 W ("Is_Null_Init_Proc", Flag178 (Id));
7484 W ("Is_Obsolescent", Flag153 (Id));
7485 W ("Is_Only_Out_Parameter", Flag226 (Id));
7486 W ("Is_Optional_Parameter", Flag134 (Id));
7487 W ("Is_Overriding_Operation", Flag39 (Id));
7488 W ("Is_Package_Body_Entity", Flag160 (Id));
7489 W ("Is_Packed", Flag51 (Id));
7490 W ("Is_Packed_Array_Type", Flag138 (Id));
7491 W ("Is_Potentially_Use_Visible", Flag9 (Id));
7492 W ("Is_Preelaborated", Flag59 (Id));
7493 W ("Is_Primitive_Wrapper", Flag195 (Id));
7494 W ("Is_Private_Composite", Flag107 (Id));
7495 W ("Is_Private_Descendant", Flag53 (Id));
7496 W ("Is_Protected_Interface", Flag198 (Id));
7497 W ("Is_Public", Flag10 (Id));
7498 W ("Is_Pure", Flag44 (Id));
7499 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
7500 W ("Is_Raised", Flag224 (Id));
7501 W ("Is_Remote_Call_Interface", Flag62 (Id));
7502 W ("Is_Remote_Types", Flag61 (Id));
7503 W ("Is_Renaming_Of_Object", Flag112 (Id));
7504 W ("Is_Return_Object", Flag209 (Id));
7505 W ("Is_Shared_Passive", Flag60 (Id));
7506 W ("Is_Synchronized_Interface", Flag199 (Id));
7507 W ("Is_Static_Dispatch_Table_Entity", Flag234 (Id));
7508 W ("Is_Statically_Allocated", Flag28 (Id));
7509 W ("Is_Tag", Flag78 (Id));
7510 W ("Is_Tagged_Type", Flag55 (Id));
7511 W ("Is_Task_Interface", Flag200 (Id));
7512 W ("Is_Thunk", Flag225 (Id));
7513 W ("Is_Trivial_Subprogram", Flag235 (Id));
7514 W ("Is_True_Constant", Flag163 (Id));
7515 W ("Is_Unchecked_Union", Flag117 (Id));
7516 W ("Is_Unsigned_Type", Flag144 (Id));
7517 W ("Is_VMS_Exception", Flag133 (Id));
7518 W ("Is_Valued_Procedure", Flag127 (Id));
7519 W ("Is_Visible_Child_Unit", Flag116 (Id));
7520 W ("Is_Visible_Formal", Flag206 (Id));
7521 W ("Is_Volatile", Flag16 (Id));
7522 W ("Itype_Printed", Flag202 (Id));
7523 W ("Kill_Elaboration_Checks", Flag32 (Id));
7524 W ("Kill_Range_Checks", Flag33 (Id));
7525 W ("Kill_Tag_Checks", Flag34 (Id));
7526 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
7527 W ("Low_Bound_Known", Flag205 (Id));
7528 W ("Machine_Radix_10", Flag84 (Id));
7529 W ("Materialize_Entity", Flag168 (Id));
7530 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
7531 W ("Must_Have_Preelab_Init", Flag208 (Id));
7532 W ("Needs_Debug_Info", Flag147 (Id));
7533 W ("Needs_No_Actuals", Flag22 (Id));
7534 W ("Never_Set_In_Source", Flag115 (Id));
7535 W ("No_Pool_Assigned", Flag131 (Id));
7536 W ("No_Return", Flag113 (Id));
7537 W ("No_Strict_Aliasing", Flag136 (Id));
7538 W ("Non_Binary_Modulus", Flag58 (Id));
7539 W ("Nonzero_Is_True", Flag162 (Id));
7540 W ("OK_To_Reorder_Components", Flag239 (Id));
7541 W ("Reachable", Flag49 (Id));
7542 W ("Referenced", Flag156 (Id));
7543 W ("Referenced_As_LHS", Flag36 (Id));
7544 W ("Referenced_As_Out_Parameter", Flag227 (Id));
7545 W ("Renamed_In_Spec", Flag231 (Id));
7546 W ("Requires_Overriding", Flag213 (Id));
7547 W ("Return_Present", Flag54 (Id));
7548 W ("Returns_By_Ref", Flag90 (Id));
7549 W ("Reverse_Bit_Order", Flag164 (Id));
7550 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
7551 W ("Size_Depends_On_Discriminant", Flag177 (Id));
7552 W ("Size_Known_At_Compile_Time", Flag92 (Id));
7553 W ("Static_Elaboration_Desired", Flag77 (Id));
7554 W ("Strict_Alignment", Flag145 (Id));
7555 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
7556 W ("Suppress_Init_Proc", Flag105 (Id));
7557 W ("Suppress_Style_Checks", Flag165 (Id));
7558 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
7559 W ("Is_Primitive", Flag218 (Id));
7560 W ("Treat_As_Volatile", Flag41 (Id));
7561 W ("Universal_Aliasing", Flag216 (Id));
7562 W ("Used_As_Generic_Actual", Flag222 (Id));
7563 W ("Uses_Sec_Stack", Flag95 (Id));
7564 W ("Vax_Float", Flag151 (Id));
7565 W ("Warnings_Off", Flag96 (Id));
7566 W ("Warnings_Off_Used", Flag236 (Id));
7567 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
7568 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
7569 W ("Was_Hidden", Flag196 (Id));
7570 end Write_Entity_Flags;
7572 -----------------------
7573 -- Write_Entity_Info --
7574 -----------------------
7576 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
7578 procedure Write_Attribute (Which : String; Nam : E);
7579 -- Write attribute value with given string name
7581 procedure Write_Kind (Id : Entity_Id);
7582 -- Write Ekind field of entity
7584 ---------------------
7585 -- Write_Attribute --
7586 ---------------------
7588 procedure Write_Attribute (Which : String; Nam : E) is
7592 Write_Int (Int (Nam));
7594 Write_Name (Chars (Nam));
7596 end Write_Attribute;
7602 procedure Write_Kind (Id : Entity_Id) is
7603 K : constant String := Entity_Kind'Image (Ekind (Id));
7607 Write_Str (" Kind ");
7609 if Is_Type (Id) and then Is_Tagged_Type (Id) then
7610 Write_Str ("TAGGED ");
7613 Write_Str (K (3 .. K'Length));
7616 if Is_Type (Id) and then Depends_On_Private (Id) then
7617 Write_Str ("Depends_On_Private ");
7621 -- Start of processing for Write_Entity_Info
7625 Write_Attribute ("Name ", Id);
7626 Write_Int (Int (Id));
7630 Write_Attribute (" Type ", Etype (Id));
7632 Write_Attribute (" Scope ", Scope (Id));
7637 when Discrete_Kind =>
7638 Write_Str ("Bounds: Id = ");
7640 if Present (Scalar_Range (Id)) then
7641 Write_Int (Int (Type_Low_Bound (Id)));
7642 Write_Str (" .. Id = ");
7643 Write_Int (Int (Type_High_Bound (Id)));
7645 Write_Str ("Empty");
7656 (" Component Type ", Component_Type (Id));
7659 Write_Str (" Indices ");
7661 Index := First_Index (Id);
7662 while Present (Index) loop
7663 Write_Attribute (" ", Etype (Index));
7664 Index := Next_Index (Index);
7672 (" Directly Designated Type ",
7673 Directly_Designated_Type (Id));
7676 when Overloadable_Kind =>
7677 if Present (Homonym (Id)) then
7678 Write_Str (" Homonym ");
7679 Write_Name (Chars (Homonym (Id)));
7681 Write_Int (Int (Homonym (Id)));
7688 if Ekind (Scope (Id)) in Record_Kind then
7690 " Original_Record_Component ",
7691 Original_Record_Component (Id));
7692 Write_Int (Int (Original_Record_Component (Id)));
7696 when others => null;
7698 end Write_Entity_Info;
7700 -----------------------
7701 -- Write_Field6_Name --
7702 -----------------------
7704 procedure Write_Field6_Name (Id : Entity_Id) is
7705 pragma Warnings (Off, Id);
7707 Write_Str ("First_Rep_Item");
7708 end Write_Field6_Name;
7710 -----------------------
7711 -- Write_Field7_Name --
7712 -----------------------
7714 procedure Write_Field7_Name (Id : Entity_Id) is
7715 pragma Warnings (Off, Id);
7717 Write_Str ("Freeze_Node");
7718 end Write_Field7_Name;
7720 -----------------------
7721 -- Write_Field8_Name --
7722 -----------------------
7724 procedure Write_Field8_Name (Id : Entity_Id) is
7729 Write_Str ("Normalized_First_Bit");
7733 E_Subprogram_Body =>
7734 Write_Str ("Mechanism");
7737 Write_Str ("Associated_Node_For_Itype");
7740 Write_Str ("Dependent_Instances");
7742 when E_Return_Statement =>
7743 Write_Str ("Return_Applies_To");
7746 Write_Str ("Hiding_Loop_Variable");
7749 Write_Str ("Field8??");
7751 end Write_Field8_Name;
7753 -----------------------
7754 -- Write_Field9_Name --
7755 -----------------------
7757 procedure Write_Field9_Name (Id : Entity_Id) is
7761 Write_Str ("Class_Wide_Type");
7764 E_Generic_Function |
7766 E_Generic_Procedure |
7769 Write_Str ("Renaming_Map");
7772 Write_Str ("Current_Value");
7775 Write_Str ("Field9??");
7777 end Write_Field9_Name;
7779 ------------------------
7780 -- Write_Field10_Name --
7781 ------------------------
7783 procedure Write_Field10_Name (Id : Entity_Id) is
7787 Write_Str ("Referenced_Object");
7789 when E_In_Parameter |
7791 Write_Str ("Discriminal_Link");
7797 Write_Str ("Handler_Records");
7801 Write_Str ("Normalized_Position_Max");
7804 Write_Str ("Field10??");
7806 end Write_Field10_Name;
7808 ------------------------
7809 -- Write_Field11_Name --
7810 ------------------------
7812 procedure Write_Field11_Name (Id : Entity_Id) is
7816 Write_Str ("Entry_Component");
7820 Write_Str ("Component_Bit_Offset");
7823 Write_Str ("Full_View");
7825 when E_Enumeration_Literal =>
7826 Write_Str ("Enumeration_Pos");
7829 Write_Str ("Block_Node");
7835 Write_Str ("Protected_Body_Subprogram");
7837 when E_Generic_Package =>
7838 Write_Str ("Generic_Homonym");
7841 Write_Str ("Full_View");
7844 Write_Str ("Field11??");
7846 end Write_Field11_Name;
7848 ------------------------
7849 -- Write_Field12_Name --
7850 ------------------------
7852 procedure Write_Field12_Name (Id : Entity_Id) is
7856 Write_Str ("Barrier_Function");
7858 when E_Enumeration_Literal =>
7859 Write_Str ("Enumeration_Rep");
7867 E_In_Out_Parameter |
7871 Write_Str ("Esize");
7875 Write_Str ("Next_Inlined_Subprogram");
7878 Write_Str ("Associated_Formal_Package");
7881 Write_Str ("Field12??");
7883 end Write_Field12_Name;
7885 ------------------------
7886 -- Write_Field13_Name --
7887 ------------------------
7889 procedure Write_Field13_Name (Id : Entity_Id) is
7893 Write_Str ("RM_Size");
7897 Write_Str ("Component_Clause");
7900 if not Comes_From_Source (Id)
7902 Chars (Id) = Name_Op_Ne
7904 Write_Str ("Corresponding_Equality");
7906 elsif Comes_From_Source (Id) then
7907 Write_Str ("Elaboration_Entity");
7910 Write_Str ("Field13??");
7915 Write_Str ("Extra_Accessibility");
7919 Generic_Unit_Kind =>
7920 Write_Str ("Elaboration_Entity");
7923 Write_Str ("Field13??");
7925 end Write_Field13_Name;
7927 -----------------------
7928 -- Write_Field14_Name --
7929 -----------------------
7931 procedure Write_Field14_Name (Id : Entity_Id) is
7940 Write_Str ("Alignment");
7944 Write_Str ("Normalized_Position");
7948 Write_Str ("First_Optional_Parameter");
7951 E_Generic_Package =>
7952 Write_Str ("Shadow_Entities");
7955 Write_Str ("Field14??");
7957 end Write_Field14_Name;
7959 ------------------------
7960 -- Write_Field15_Name --
7961 ------------------------
7963 procedure Write_Field15_Name (Id : Entity_Id) is
7968 Write_Str ("Storage_Size_Variable");
7970 when Class_Wide_Kind |
7974 Write_Str ("Primitive_Operations");
7977 Write_Str ("DT_Entry_Count");
7979 when Decimal_Fixed_Point_Kind =>
7980 Write_Str ("Scale_Value");
7982 when E_Discriminant =>
7983 Write_Str ("Discriminant_Number");
7986 Write_Str ("Extra_Formal");
7990 Write_Str ("DT_Position");
7993 Write_Str ("Entry_Parameters_Type");
7995 when Enumeration_Kind =>
7996 Write_Str ("Lit_Indexes");
8000 Write_Str ("Related_Instance");
8002 when E_Protected_Type =>
8003 Write_Str ("Entry_Bodies_Array");
8005 when E_String_Literal_Subtype =>
8006 Write_Str ("String_Literal_Low_Bound");
8009 Write_Str ("Shared_Var_Read_Proc");
8012 Write_Str ("Field15??");
8014 end Write_Field15_Name;
8016 ------------------------
8017 -- Write_Field16_Name --
8018 ------------------------
8020 procedure Write_Field16_Name (Id : Entity_Id) is
8024 Write_Str ("Entry_Formal");
8028 Write_Str ("DTC_Entity");
8033 Write_Str ("First_Private_Entity");
8035 when E_Record_Type |
8036 E_Record_Type_With_Private =>
8037 Write_Str ("Access_Disp_Table");
8039 when E_String_Literal_Subtype =>
8040 Write_Str ("String_Literal_Length");
8042 when Enumeration_Kind =>
8043 Write_Str ("Lit_Strings");
8047 Write_Str ("Unset_Reference");
8049 when E_Record_Subtype |
8050 E_Class_Wide_Subtype =>
8051 Write_Str ("Cloned_Subtype");
8054 Write_Str ("Field16??");
8056 end Write_Field16_Name;
8058 ------------------------
8059 -- Write_Field17_Name --
8060 ------------------------
8062 procedure Write_Field17_Name (Id : Entity_Id) is
8066 Write_Str ("Digits_Value");
8069 Write_Str ("Prival");
8071 when E_Discriminant =>
8072 Write_Str ("Discriminal");
8081 E_Generic_Function |
8083 E_Generic_Procedure |
8091 E_Return_Statement |
8093 E_Subprogram_Type =>
8094 Write_Str ("First_Entity");
8097 Write_Str ("First_Index");
8099 when E_Protected_Body =>
8100 Write_Str ("Object_Ref");
8102 when Enumeration_Kind =>
8103 Write_Str ("First_Literal");
8106 Write_Str ("Master_Id");
8108 when Modular_Integer_Kind =>
8109 Write_Str ("Modulus");
8113 E_Generic_In_Out_Parameter |
8115 Write_Str ("Actual_Subtype");
8117 when E_Incomplete_Type =>
8118 Write_Str ("Non_Limited_View");
8120 when E_Incomplete_Subtype =>
8121 if From_With_Type (Id) then
8122 Write_Str ("Non_Limited_View");
8126 Write_Str ("Field17??");
8128 end Write_Field17_Name;
8130 ------------------------
8131 -- Write_Field18_Name --
8132 ------------------------
8134 procedure Write_Field18_Name (Id : Entity_Id) is
8137 when E_Enumeration_Literal |
8141 Write_Str ("Alias");
8143 when E_Record_Type =>
8144 Write_Str ("Corresponding_Concurrent_Type");
8146 when E_Entry_Index_Parameter =>
8147 Write_Str ("Entry_Index_Constant");
8149 when E_Class_Wide_Subtype |
8150 E_Access_Protected_Subprogram_Type |
8151 E_Anonymous_Access_Protected_Subprogram_Type |
8152 E_Access_Subprogram_Type |
8154 Write_Str ("Equivalent_Type");
8156 when Fixed_Point_Kind =>
8157 Write_Str ("Delta_Value");
8160 Write_Str ("Renamed_Object");
8164 E_Generic_Function |
8165 E_Generic_Procedure |
8166 E_Generic_Package =>
8167 Write_Str ("Renamed_Entity");
8169 when Incomplete_Or_Private_Kind =>
8170 Write_Str ("Private_Dependents");
8172 when Concurrent_Kind =>
8173 Write_Str ("Corresponding_Record_Type");
8178 Write_Str ("Enclosing_Scope");
8181 Write_Str ("Field18??");
8183 end Write_Field18_Name;
8185 -----------------------
8186 -- Write_Field19_Name --
8187 -----------------------
8189 procedure Write_Field19_Name (Id : Entity_Id) is
8194 Write_Str ("Related_Array_Object");
8200 E_Return_Statement |
8202 Write_Str ("Finalization_Chain_Entity");
8204 when E_Constant | E_Variable =>
8205 Write_Str ("Size_Check_Code");
8207 when E_Discriminant =>
8208 Write_Str ("Corresponding_Discriminant");
8211 E_Generic_Package =>
8212 Write_Str ("Body_Entity");
8214 when E_Package_Body |
8216 Write_Str ("Spec_Entity");
8218 when Private_Kind =>
8219 Write_Str ("Underlying_Full_View");
8221 when E_Record_Type =>
8222 Write_Str ("Parent_Subtype");
8225 Write_Str ("Field19??");
8227 end Write_Field19_Name;
8229 -----------------------
8230 -- Write_Field20_Name --
8231 -----------------------
8233 procedure Write_Field20_Name (Id : Entity_Id) is
8237 Write_Str ("Component_Type");
8239 when E_In_Parameter |
8240 E_Generic_In_Parameter =>
8241 Write_Str ("Default_Value");
8244 Write_Str ("Directly_Designated_Type");
8247 Write_Str ("Discriminant_Checking_Func");
8249 when E_Discriminant =>
8250 Write_Str ("Discriminant_Default_Value");
8259 E_Generic_Function |
8261 E_Generic_Procedure |
8269 E_Return_Statement |
8271 E_Subprogram_Type =>
8273 Write_Str ("Last_Entity");
8276 Write_Str ("Scalar_Range");
8279 Write_Str ("Register_Exception_Call");
8282 Write_Str ("Field20??");
8284 end Write_Field20_Name;
8286 -----------------------
8287 -- Write_Field21_Name --
8288 -----------------------
8290 procedure Write_Field21_Name (Id : Entity_Id) is
8296 E_Generic_Function |
8298 E_Generic_Procedure |
8300 Write_Str ("Interface_Name");
8302 when Concurrent_Kind |
8303 Incomplete_Or_Private_Kind |
8307 Write_Str ("Discriminant_Constraint");
8310 Write_Str ("Accept_Address");
8312 when Fixed_Point_Kind =>
8313 Write_Str ("Small_Value");
8315 when E_In_Parameter =>
8316 Write_Str ("Default_Expr_Function");
8319 Modular_Integer_Kind =>
8320 Write_Str ("Original_Array_Type");
8323 Write_Str ("Field21??");
8325 end Write_Field21_Name;
8327 -----------------------
8328 -- Write_Field22_Name --
8329 -----------------------
8331 procedure Write_Field22_Name (Id : Entity_Id) is
8335 Write_Str ("Associated_Storage_Pool");
8338 Write_Str ("Component_Size");
8342 Write_Str ("Original_Record_Component");
8344 when E_Enumeration_Literal =>
8345 Write_Str ("Enumeration_Rep_Expr");
8348 Write_Str ("Exception_Code");
8351 Write_Str ("Protected_Formal");
8353 when E_Record_Type =>
8354 Write_Str ("Corresponding_Remote_Type");
8364 E_Generic_Function |
8365 E_Generic_Procedure |
8368 E_Return_Statement |
8371 Write_Str ("Scope_Depth_Value");
8373 when E_Record_Type_With_Private |
8374 E_Record_Subtype_With_Private |
8377 E_Limited_Private_Type |
8378 E_Limited_Private_Subtype =>
8379 Write_Str ("Private_View");
8382 Write_Str ("Shared_Var_Assign_Proc");
8385 Write_Str ("Field22??");
8387 end Write_Field22_Name;
8389 ------------------------
8390 -- Write_Field23_Name --
8391 ------------------------
8393 procedure Write_Field23_Name (Id : Entity_Id) is
8397 Write_Str ("Associated_Final_Chain");
8400 Write_Str ("Packed_Array_Type");
8403 Write_Str ("Entry_Cancel_Parameter");
8406 Write_Str ("Protected_Operation");
8408 when E_Discriminant =>
8409 Write_Str ("CR_Discriminant");
8411 when E_Enumeration_Type =>
8412 Write_Str ("Enum_Pos_To_Rep");
8416 Write_Str ("Extra_Constrained");
8418 when E_Generic_Function |
8420 E_Generic_Procedure =>
8421 Write_Str ("Inner_Instances");
8423 when Concurrent_Kind |
8424 Incomplete_Or_Private_Kind |
8428 Write_Str ("Stored_Constraint");
8432 Write_Str ("Generic_Renamings");
8435 if Is_Generic_Instance (Id) then
8436 Write_Str ("Generic_Renamings");
8438 Write_Str ("Limited_View");
8441 -- What about Privals_Chain for protected operations ???
8444 Write_Str ("Privals_Chain");
8447 Write_Str ("Field23??");
8449 end Write_Field23_Name;
8451 ------------------------
8452 -- Write_Field24_Name --
8453 ------------------------
8455 procedure Write_Field24_Name (Id : Entity_Id) is
8456 pragma Warnings (Off, Id);
8458 Write_Str ("Obsolescent_Warning");
8459 end Write_Field24_Name;
8461 ------------------------
8462 -- Write_Field25_Name --
8463 ------------------------
8465 procedure Write_Field25_Name (Id : Entity_Id) is
8469 Write_Str ("DT_Offset_To_Top_Func");
8473 Write_Str ("Abstract_Interface_Alias");
8476 Write_Str ("Current_Use_Clause");
8478 when E_Record_Type |
8480 E_Record_Type_With_Private |
8481 E_Record_Subtype_With_Private =>
8482 Write_Str ("Abstract_Interfaces");
8485 Write_Str ("Task_Body_Procedure");
8488 Write_Str ("Debug_Renaming_Link");
8491 Write_Str ("Field25??");
8493 end Write_Field25_Name;
8495 ------------------------
8496 -- Write_Field26_Name --
8497 ------------------------
8499 procedure Write_Field26_Name (Id : Entity_Id) is
8504 Write_Str ("Related_Type");
8506 when E_Generic_Package |
8508 Write_Str ("Package_Instantiation");
8513 if Is_Dispatching_Operation (Id) then
8514 Write_Str ("Overridden_Operation");
8516 Write_Str ("Static_Initialization");
8519 when E_Record_Type |
8520 E_Record_Type_With_Private =>
8521 Write_Str ("Dispatch_Table_Wrapper");
8523 when E_In_Out_Parameter |
8526 Write_Str ("Last_Assignment");
8529 Write_Str ("Field26??");
8531 end Write_Field26_Name;
8533 ------------------------
8534 -- Write_Field27_Name --
8535 ------------------------
8537 procedure Write_Field27_Name (Id : Entity_Id) is
8541 Write_Str ("Wrapped_Entity");
8544 Write_Str ("Field27??");
8546 end Write_Field27_Name;
8548 ------------------------
8549 -- Write_Field28_Name --
8550 ------------------------
8552 procedure Write_Field28_Name (Id : Entity_Id) is
8555 when E_Procedure | E_Function | E_Entry =>
8556 Write_Str ("Extra_Formals");
8559 Write_Str ("Field28??");
8561 end Write_Field28_Name;
8563 -------------------------
8564 -- Iterator Procedures --
8565 -------------------------
8567 procedure Proc_Next_Component (N : in out Node_Id) is
8569 N := Next_Component (N);
8570 end Proc_Next_Component;
8572 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
8574 N := Next_Entity (N);
8575 while Present (N) loop
8576 exit when Ekind (N) = E_Component
8578 Ekind (N) = E_Discriminant;
8579 N := Next_Entity (N);
8581 end Proc_Next_Component_Or_Discriminant;
8583 procedure Proc_Next_Discriminant (N : in out Node_Id) is
8585 N := Next_Discriminant (N);
8586 end Proc_Next_Discriminant;
8588 procedure Proc_Next_Formal (N : in out Node_Id) is
8590 N := Next_Formal (N);
8591 end Proc_Next_Formal;
8593 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
8595 N := Next_Formal_With_Extras (N);
8596 end Proc_Next_Formal_With_Extras;
8598 procedure Proc_Next_Index (N : in out Node_Id) is
8600 N := Next_Index (N);
8601 end Proc_Next_Index;
8603 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
8605 N := Next_Inlined_Subprogram (N);
8606 end Proc_Next_Inlined_Subprogram;
8608 procedure Proc_Next_Literal (N : in out Node_Id) is
8610 N := Next_Literal (N);
8611 end Proc_Next_Literal;
8613 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
8615 N := Next_Stored_Discriminant (N);
8616 end Proc_Next_Stored_Discriminant;