1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2007, 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
515 -----------------------
516 -- Local subprograms --
517 -----------------------
519 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N;
520 -- Returns the attribute definition clause for Id whose name is Rep_Name.
521 -- Returns Empty if no matching attribute definition clause found for Id.
527 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N is
531 Ritem := First_Rep_Item (Id);
532 while Present (Ritem) loop
533 if Nkind (Ritem) = N_Attribute_Definition_Clause
534 and then Chars (Ritem) = Rep_Name
538 Ritem := Next_Rep_Item (Ritem);
545 --------------------------------
546 -- Attribute Access Functions --
547 --------------------------------
549 function Abstract_Interfaces (Id : E) return L is
551 pragma Assert (Is_Record_Type (Id));
553 end Abstract_Interfaces;
555 function Abstract_Interface_Alias (Id : E) return E is
557 pragma Assert (Is_Subprogram (Id));
559 end Abstract_Interface_Alias;
561 function Accept_Address (Id : E) return L is
566 function Access_Disp_Table (Id : E) return L is
568 pragma Assert (Is_Tagged_Type (Id));
569 return Elist16 (Implementation_Base_Type (Id));
570 end Access_Disp_Table;
572 function Actual_Subtype (Id : E) return E is
575 (Ekind (Id) = E_Constant
576 or else Ekind (Id) = E_Variable
577 or else Ekind (Id) = E_Generic_In_Out_Parameter
578 or else Is_Formal (Id));
582 function Address_Taken (Id : E) return B is
587 function Alias (Id : E) return E is
590 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
594 function Alignment (Id : E) return U is
596 pragma Assert (Is_Type (Id)
597 or else Is_Formal (Id)
598 or else Ekind (Id) = E_Loop_Parameter
599 or else Ekind (Id) = E_Constant
600 or else Ekind (Id) = E_Exception
601 or else Ekind (Id) = E_Variable);
605 function Associated_Final_Chain (Id : E) return E is
607 pragma Assert (Is_Access_Type (Id));
609 end Associated_Final_Chain;
611 function Associated_Formal_Package (Id : E) return E is
613 pragma Assert (Ekind (Id) = E_Package);
615 end Associated_Formal_Package;
617 function Associated_Node_For_Itype (Id : E) return N is
620 end Associated_Node_For_Itype;
622 function Associated_Storage_Pool (Id : E) return E is
624 pragma Assert (Is_Access_Type (Id));
625 return Node22 (Root_Type (Id));
626 end Associated_Storage_Pool;
628 function Barrier_Function (Id : E) return N is
630 pragma Assert (Is_Entry (Id));
632 end Barrier_Function;
634 function Block_Node (Id : E) return N is
636 pragma Assert (Ekind (Id) = E_Block);
640 function Body_Entity (Id : E) return E is
643 (Ekind (Id) = E_Package or else Ekind (Id) = E_Generic_Package);
647 function Body_Needed_For_SAL (Id : E) return B is
650 (Ekind (Id) = E_Package
651 or else Is_Subprogram (Id)
652 or else Is_Generic_Unit (Id));
654 end Body_Needed_For_SAL;
656 function C_Pass_By_Copy (Id : E) return B is
658 pragma Assert (Is_Record_Type (Id));
659 return Flag125 (Implementation_Base_Type (Id));
662 function Can_Never_Be_Null (Id : E) return B is
665 end Can_Never_Be_Null;
667 function Checks_May_Be_Suppressed (Id : E) return B is
670 end Checks_May_Be_Suppressed;
672 function Class_Wide_Type (Id : E) return E is
674 pragma Assert (Is_Type (Id));
678 function Cloned_Subtype (Id : E) return E is
681 (Ekind (Id) = E_Record_Subtype
682 or else Ekind (Id) = E_Class_Wide_Subtype);
686 function Component_Bit_Offset (Id : E) return U is
689 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
691 end Component_Bit_Offset;
693 function Component_Clause (Id : E) return N is
696 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
698 end Component_Clause;
700 function Component_Size (Id : E) return U is
702 pragma Assert (Is_Array_Type (Id));
703 return Uint22 (Implementation_Base_Type (Id));
706 function Component_Type (Id : E) return E is
708 return Node20 (Implementation_Base_Type (Id));
711 function Corresponding_Concurrent_Type (Id : E) return E is
713 pragma Assert (Ekind (Id) = E_Record_Type);
715 end Corresponding_Concurrent_Type;
717 function Corresponding_Discriminant (Id : E) return E is
719 pragma Assert (Ekind (Id) = E_Discriminant);
721 end Corresponding_Discriminant;
723 function Corresponding_Equality (Id : E) return E is
726 (Ekind (Id) = E_Function
727 and then not Comes_From_Source (Id)
728 and then Chars (Id) = Name_Op_Ne);
730 end Corresponding_Equality;
732 function Corresponding_Record_Type (Id : E) return E is
734 pragma Assert (Is_Concurrent_Type (Id));
736 end Corresponding_Record_Type;
738 function Corresponding_Remote_Type (Id : E) return E is
741 end Corresponding_Remote_Type;
743 function Current_Use_Clause (Id : E) return E is
745 pragma Assert (Ekind (Id) = E_Package);
747 end Current_Use_Clause;
749 function Current_Value (Id : E) return N is
751 pragma Assert (Ekind (Id) in Object_Kind);
755 function CR_Discriminant (Id : E) return E is
760 function Debug_Info_Off (Id : E) return B is
765 function Debug_Renaming_Link (Id : E) return E is
768 end Debug_Renaming_Link;
770 function Default_Expr_Function (Id : E) return E is
772 pragma Assert (Is_Formal (Id));
774 end Default_Expr_Function;
776 function Default_Expressions_Processed (Id : E) return B is
779 end Default_Expressions_Processed;
781 function Default_Value (Id : E) return N is
783 pragma Assert (Is_Formal (Id));
787 function Delay_Cleanups (Id : E) return B is
792 function Delay_Subprogram_Descriptors (Id : E) return B is
795 end Delay_Subprogram_Descriptors;
797 function Delta_Value (Id : E) return R is
799 pragma Assert (Is_Fixed_Point_Type (Id));
803 function Dependent_Instances (Id : E) return L is
805 pragma Assert (Is_Generic_Instance (Id));
807 end Dependent_Instances;
809 function Depends_On_Private (Id : E) return B is
811 pragma Assert (Nkind (Id) in N_Entity);
813 end Depends_On_Private;
815 function Digits_Value (Id : E) return U is
818 (Is_Floating_Point_Type (Id)
819 or else Is_Decimal_Fixed_Point_Type (Id));
823 function Directly_Designated_Type (Id : E) return E is
826 end Directly_Designated_Type;
828 function Discard_Names (Id : E) return B is
833 function Discriminal (Id : E) return E is
835 pragma Assert (Ekind (Id) = E_Discriminant);
839 function Discriminal_Link (Id : E) return N is
842 end Discriminal_Link;
844 function Discriminant_Checking_Func (Id : E) return E is
846 pragma Assert (Ekind (Id) = E_Component);
848 end Discriminant_Checking_Func;
850 function Discriminant_Constraint (Id : E) return L is
852 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
854 end Discriminant_Constraint;
856 function Discriminant_Default_Value (Id : E) return N is
858 pragma Assert (Ekind (Id) = E_Discriminant);
860 end Discriminant_Default_Value;
862 function Discriminant_Number (Id : E) return U is
864 pragma Assert (Ekind (Id) = E_Discriminant);
866 end Discriminant_Number;
868 function Dispatch_Table_Wrapper (Id : E) return E is
870 pragma Assert (Is_Tagged_Type (Id));
871 return Node26 (Implementation_Base_Type (Id));
872 end Dispatch_Table_Wrapper;
874 function DT_Entry_Count (Id : E) return U is
876 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
880 function DT_Offset_To_Top_Func (Id : E) return E is
882 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
884 end DT_Offset_To_Top_Func;
886 function DT_Position (Id : E) return U is
889 ((Ekind (Id) = E_Function
890 or else Ekind (Id) = E_Procedure)
891 and then Present (DTC_Entity (Id)));
895 function DTC_Entity (Id : E) return E is
898 (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
902 function Elaborate_Body_Desirable (Id : E) return B is
904 pragma Assert (Ekind (Id) = E_Package);
906 end Elaborate_Body_Desirable;
908 function Elaboration_Entity (Id : E) return E is
913 Ekind (Id) = E_Package
915 Is_Generic_Unit (Id));
917 end Elaboration_Entity;
919 function Elaboration_Entity_Required (Id : E) return B is
924 Ekind (Id) = E_Package
926 Is_Generic_Unit (Id));
928 end Elaboration_Entity_Required;
930 function Enclosing_Scope (Id : E) return E is
935 function Entry_Accepted (Id : E) return B is
937 pragma Assert (Is_Entry (Id));
941 function Entry_Bodies_Array (Id : E) return E is
944 end Entry_Bodies_Array;
946 function Entry_Cancel_Parameter (Id : E) return E is
949 end Entry_Cancel_Parameter;
951 function Entry_Component (Id : E) return E is
956 function Entry_Formal (Id : E) return E is
961 function Entry_Index_Constant (Id : E) return N is
963 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
965 end Entry_Index_Constant;
967 function Entry_Parameters_Type (Id : E) return E is
970 end Entry_Parameters_Type;
972 function Enum_Pos_To_Rep (Id : E) return E is
974 pragma Assert (Ekind (Id) = E_Enumeration_Type);
978 function Enumeration_Pos (Id : E) return Uint is
980 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
984 function Enumeration_Rep (Id : E) return U is
986 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
990 function Enumeration_Rep_Expr (Id : E) return N is
992 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
994 end Enumeration_Rep_Expr;
996 function Equivalent_Type (Id : E) return E is
999 (Ekind (Id) = E_Class_Wide_Subtype or else
1000 Ekind (Id) = E_Access_Protected_Subprogram_Type or else
1001 Ekind (Id) = E_Anonymous_Access_Protected_Subprogram_Type or else
1002 Ekind (Id) = E_Access_Subprogram_Type or else
1003 Ekind (Id) = E_Exception_Type);
1005 end Equivalent_Type;
1007 function Esize (Id : E) return Uint is
1012 function Exception_Code (Id : E) return Uint is
1014 pragma Assert (Ekind (Id) = E_Exception);
1018 function Extra_Accessibility (Id : E) return E is
1020 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1022 end Extra_Accessibility;
1024 function Extra_Constrained (Id : E) return E is
1026 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1028 end Extra_Constrained;
1030 function Extra_Formal (Id : E) return E is
1035 function Extra_Formals (Id : E) return E is
1038 (Is_Overloadable (Id)
1039 or else Ekind (Id) = E_Entry_Family
1040 or else Ekind (Id) = E_Subprogram_Body
1041 or else Ekind (Id) = E_Subprogram_Type);
1045 function Can_Use_Internal_Rep (Id : E) return B is
1047 pragma Assert (Ekind (Id) in Access_Subprogram_Type_Kind);
1048 return Flag229 (Id);
1049 end Can_Use_Internal_Rep;
1051 function Finalization_Chain_Entity (Id : E) return E is
1054 end Finalization_Chain_Entity;
1056 function Finalize_Storage_Only (Id : E) return B is
1058 pragma Assert (Is_Type (Id));
1059 return Flag158 (Base_Type (Id));
1060 end Finalize_Storage_Only;
1062 function First_Entity (Id : E) return E is
1067 function First_Index (Id : E) return N is
1069 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1073 function First_Literal (Id : E) return E is
1075 pragma Assert (Is_Enumeration_Type (Id));
1079 function First_Optional_Parameter (Id : E) return E is
1082 (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
1084 end First_Optional_Parameter;
1086 function First_Private_Entity (Id : E) return E is
1088 pragma Assert (Ekind (Id) = E_Package
1089 or else Ekind (Id) = E_Generic_Package
1090 or else Ekind (Id) in Concurrent_Kind);
1092 end First_Private_Entity;
1094 function First_Rep_Item (Id : E) return E is
1099 function Freeze_Node (Id : E) return N is
1104 function From_With_Type (Id : E) return B is
1106 return Flag159 (Id);
1109 function Full_View (Id : E) return E is
1111 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1115 function Function_Returns_With_DSP (Id : E) return B is
1118 (Is_Subprogram (Id) or else Ekind (Id) = E_Subprogram_Type);
1119 return Flag169 (Id);
1120 end Function_Returns_With_DSP;
1122 function Generic_Homonym (Id : E) return E is
1124 pragma Assert (Ekind (Id) = E_Generic_Package);
1126 end Generic_Homonym;
1128 function Generic_Renamings (Id : E) return L is
1130 return Elist23 (Id);
1131 end Generic_Renamings;
1133 function Handler_Records (Id : E) return S is
1136 end Handler_Records;
1138 function Has_Aliased_Components (Id : E) return B is
1140 return Flag135 (Implementation_Base_Type (Id));
1141 end Has_Aliased_Components;
1143 function Has_Alignment_Clause (Id : E) return B is
1146 end Has_Alignment_Clause;
1148 function Has_All_Calls_Remote (Id : E) return B is
1151 end Has_All_Calls_Remote;
1153 function Has_Anon_Block_Suffix (Id : E) return B is
1155 return Flag201 (Id);
1156 end Has_Anon_Block_Suffix;
1158 function Has_Atomic_Components (Id : E) return B is
1160 return Flag86 (Implementation_Base_Type (Id));
1161 end Has_Atomic_Components;
1163 function Has_Biased_Representation (Id : E) return B is
1165 return Flag139 (Id);
1166 end Has_Biased_Representation;
1168 function Has_Completion (Id : E) return B is
1173 function Has_Completion_In_Body (Id : E) return B is
1175 pragma Assert (Is_Type (Id));
1177 end Has_Completion_In_Body;
1179 function Has_Complex_Representation (Id : E) return B is
1181 pragma Assert (Is_Type (Id));
1182 return Flag140 (Implementation_Base_Type (Id));
1183 end Has_Complex_Representation;
1185 function Has_Component_Size_Clause (Id : E) return B is
1187 pragma Assert (Is_Array_Type (Id));
1188 return Flag68 (Implementation_Base_Type (Id));
1189 end Has_Component_Size_Clause;
1191 function Has_Constrained_Partial_View (Id : E) return B is
1193 pragma Assert (Is_Type (Id));
1194 return Flag187 (Id);
1195 end Has_Constrained_Partial_View;
1197 function Has_Controlled_Component (Id : E) return B is
1199 return Flag43 (Base_Type (Id));
1200 end Has_Controlled_Component;
1202 function Has_Contiguous_Rep (Id : E) return B is
1204 return Flag181 (Id);
1205 end Has_Contiguous_Rep;
1207 function Has_Controlling_Result (Id : E) return B is
1210 end Has_Controlling_Result;
1212 function Has_Convention_Pragma (Id : E) return B is
1214 return Flag119 (Id);
1215 end Has_Convention_Pragma;
1217 function Has_Delayed_Freeze (Id : E) return B is
1219 pragma Assert (Nkind (Id) in N_Entity);
1221 end Has_Delayed_Freeze;
1223 function Has_Discriminants (Id : E) return B is
1225 pragma Assert (Nkind (Id) in N_Entity);
1227 end Has_Discriminants;
1229 function Has_Dispatch_Table (Id : E) return B is
1231 pragma Assert (Is_Tagged_Type (Id));
1232 return Flag220 (Id);
1233 end Has_Dispatch_Table;
1235 function Has_Enumeration_Rep_Clause (Id : E) return B is
1237 pragma Assert (Is_Enumeration_Type (Id));
1239 end Has_Enumeration_Rep_Clause;
1241 function Has_Exit (Id : E) return B is
1246 function Has_External_Tag_Rep_Clause (Id : E) return B is
1248 pragma Assert (Is_Tagged_Type (Id));
1249 return Flag110 (Id);
1250 end Has_External_Tag_Rep_Clause;
1252 function Has_Forward_Instantiation (Id : E) return B is
1254 return Flag175 (Id);
1255 end Has_Forward_Instantiation;
1257 function Has_Fully_Qualified_Name (Id : E) return B is
1259 return Flag173 (Id);
1260 end Has_Fully_Qualified_Name;
1262 function Has_Gigi_Rep_Item (Id : E) return B is
1265 end Has_Gigi_Rep_Item;
1267 function Has_Homonym (Id : E) return B is
1272 function Has_Initial_Value (Id : E) return B is
1275 (Ekind (Id) = E_Variable or else Is_Formal (Id));
1276 return Flag219 (Id);
1277 end Has_Initial_Value;
1279 function Has_Machine_Radix_Clause (Id : E) return B is
1281 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1283 end Has_Machine_Radix_Clause;
1285 function Has_Master_Entity (Id : E) return B is
1288 end Has_Master_Entity;
1290 function Has_Missing_Return (Id : E) return B is
1293 (Ekind (Id) = E_Function or else Ekind (Id) = E_Generic_Function);
1294 return Flag142 (Id);
1295 end Has_Missing_Return;
1297 function Has_Nested_Block_With_Handler (Id : E) return B is
1299 return Flag101 (Id);
1300 end Has_Nested_Block_With_Handler;
1302 function Has_Non_Standard_Rep (Id : E) return B is
1304 return Flag75 (Implementation_Base_Type (Id));
1305 end Has_Non_Standard_Rep;
1307 function Has_Object_Size_Clause (Id : E) return B is
1309 pragma Assert (Is_Type (Id));
1310 return Flag172 (Id);
1311 end Has_Object_Size_Clause;
1313 function Has_Per_Object_Constraint (Id : E) return B is
1315 return Flag154 (Id);
1316 end Has_Per_Object_Constraint;
1318 function Has_Persistent_BSS (Id : E) return B is
1320 return Flag188 (Id);
1321 end Has_Persistent_BSS;
1323 function Has_Pragma_Controlled (Id : E) return B is
1325 pragma Assert (Is_Access_Type (Id));
1326 return Flag27 (Implementation_Base_Type (Id));
1327 end Has_Pragma_Controlled;
1329 function Has_Pragma_Elaborate_Body (Id : E) return B is
1331 return Flag150 (Id);
1332 end Has_Pragma_Elaborate_Body;
1334 function Has_Pragma_Inline (Id : E) return B is
1336 return Flag157 (Id);
1337 end Has_Pragma_Inline;
1339 function Has_Pragma_Inline_Always (Id : E) return B is
1341 return Flag230 (Id);
1342 end Has_Pragma_Inline_Always;
1344 function Has_Pragma_Pack (Id : E) return B is
1346 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1347 return Flag121 (Implementation_Base_Type (Id));
1348 end Has_Pragma_Pack;
1350 function Has_Pragma_Preelab_Init (Id : E) return B is
1352 return Flag221 (Id);
1353 end Has_Pragma_Preelab_Init;
1355 function Has_Pragma_Pure (Id : E) return B is
1357 return Flag203 (Id);
1358 end Has_Pragma_Pure;
1360 function Has_Pragma_Pure_Function (Id : E) return B is
1362 return Flag179 (Id);
1363 end Has_Pragma_Pure_Function;
1365 function Has_Pragma_Unreferenced (Id : E) return B is
1367 return Flag180 (Id);
1368 end Has_Pragma_Unreferenced;
1370 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1372 pragma Assert (Is_Type (Id));
1373 return Flag212 (Id);
1374 end Has_Pragma_Unreferenced_Objects;
1376 function Has_Primitive_Operations (Id : E) return B is
1378 pragma Assert (Is_Type (Id));
1379 return Flag120 (Base_Type (Id));
1380 end Has_Primitive_Operations;
1382 function Has_Private_Declaration (Id : E) return B is
1384 return Flag155 (Id);
1385 end Has_Private_Declaration;
1387 function Has_Qualified_Name (Id : E) return B is
1389 return Flag161 (Id);
1390 end Has_Qualified_Name;
1392 function Has_RACW (Id : E) return B is
1394 pragma Assert (Ekind (Id) = E_Package);
1395 return Flag214 (Id);
1398 function Has_Record_Rep_Clause (Id : E) return B is
1400 pragma Assert (Is_Record_Type (Id));
1401 return Flag65 (Implementation_Base_Type (Id));
1402 end Has_Record_Rep_Clause;
1404 function Has_Recursive_Call (Id : E) return B is
1406 pragma Assert (Is_Subprogram (Id));
1407 return Flag143 (Id);
1408 end Has_Recursive_Call;
1410 function Has_Size_Clause (Id : E) return B is
1413 end Has_Size_Clause;
1415 function Has_Small_Clause (Id : E) return B is
1418 end Has_Small_Clause;
1420 function Has_Specified_Layout (Id : E) return B is
1422 pragma Assert (Is_Type (Id));
1423 return Flag100 (Implementation_Base_Type (Id));
1424 end Has_Specified_Layout;
1426 function Has_Specified_Stream_Input (Id : E) return B is
1428 pragma Assert (Is_Type (Id));
1429 return Flag190 (Id);
1430 end Has_Specified_Stream_Input;
1432 function Has_Specified_Stream_Output (Id : E) return B is
1434 pragma Assert (Is_Type (Id));
1435 return Flag191 (Id);
1436 end Has_Specified_Stream_Output;
1438 function Has_Specified_Stream_Read (Id : E) return B is
1440 pragma Assert (Is_Type (Id));
1441 return Flag192 (Id);
1442 end Has_Specified_Stream_Read;
1444 function Has_Specified_Stream_Write (Id : E) return B is
1446 pragma Assert (Is_Type (Id));
1447 return Flag193 (Id);
1448 end Has_Specified_Stream_Write;
1450 function Has_Static_Discriminants (Id : E) return B is
1452 pragma Assert (Is_Type (Id));
1453 return Flag211 (Id);
1454 end Has_Static_Discriminants;
1456 function Has_Storage_Size_Clause (Id : E) return B is
1458 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1459 return Flag23 (Implementation_Base_Type (Id));
1460 end Has_Storage_Size_Clause;
1462 function Has_Stream_Size_Clause (Id : E) return B is
1464 return Flag184 (Id);
1465 end Has_Stream_Size_Clause;
1467 function Has_Subprogram_Descriptor (Id : E) return B is
1470 end Has_Subprogram_Descriptor;
1472 function Has_Task (Id : E) return B is
1474 return Flag30 (Base_Type (Id));
1477 function Has_Thunks (Id : E) return B is
1479 pragma Assert (Ekind (Id) = E_Constant);
1480 return Flag228 (Id);
1483 function Has_Unchecked_Union (Id : E) return B is
1485 return Flag123 (Base_Type (Id));
1486 end Has_Unchecked_Union;
1488 function Has_Unknown_Discriminants (Id : E) return B is
1490 pragma Assert (Is_Type (Id));
1492 end Has_Unknown_Discriminants;
1494 function Has_Up_Level_Access (Id : E) return B is
1497 (Ekind (Id) = E_Variable
1498 or else Ekind (Id) = E_Constant
1499 or else Ekind (Id) = E_Loop_Parameter);
1500 return Flag215 (Id);
1501 end Has_Up_Level_Access;
1503 function Has_Volatile_Components (Id : E) return B is
1505 return Flag87 (Implementation_Base_Type (Id));
1506 end Has_Volatile_Components;
1508 function Has_Xref_Entry (Id : E) return B is
1510 return Flag182 (Implementation_Base_Type (Id));
1513 function Hiding_Loop_Variable (Id : E) return E is
1515 pragma Assert (Ekind (Id) = E_Variable);
1517 end Hiding_Loop_Variable;
1519 function Homonym (Id : E) return E is
1524 function Implemented_By_Entry (Id : E) return B is
1527 (Ekind (Id) = E_Function
1528 or else Ekind (Id) = E_Procedure);
1529 return Flag232 (Id);
1530 end Implemented_By_Entry;
1532 function In_Package_Body (Id : E) return B is
1535 end In_Package_Body;
1537 function In_Private_Part (Id : E) return B is
1540 end In_Private_Part;
1542 function In_Use (Id : E) return B is
1544 pragma Assert (Nkind (Id) in N_Entity);
1548 function Inner_Instances (Id : E) return L is
1550 return Elist23 (Id);
1551 end Inner_Instances;
1553 function Interface_Name (Id : E) return N is
1558 function Is_Abstract_Subprogram (Id : E) return B is
1560 pragma Assert (Is_Overloadable (Id));
1562 end Is_Abstract_Subprogram;
1564 function Is_Abstract_Type (Id : E) return B is
1566 pragma Assert (Is_Type (Id));
1567 return Flag146 (Id);
1568 end Is_Abstract_Type;
1570 function Is_Local_Anonymous_Access (Id : E) return B is
1572 pragma Assert (Is_Access_Type (Id));
1573 return Flag194 (Id);
1574 end Is_Local_Anonymous_Access;
1576 function Is_Access_Constant (Id : E) return B is
1578 pragma Assert (Is_Access_Type (Id));
1580 end Is_Access_Constant;
1582 function Is_Ada_2005_Only (Id : E) return B is
1584 return Flag185 (Id);
1585 end Is_Ada_2005_Only;
1587 function Is_Aliased (Id : E) return B is
1589 pragma Assert (Nkind (Id) in N_Entity);
1593 function Is_AST_Entry (Id : E) return B is
1595 pragma Assert (Is_Entry (Id));
1596 return Flag132 (Id);
1599 function Is_Asynchronous (Id : E) return B is
1602 (Ekind (Id) = E_Procedure or else Is_Type (Id));
1604 end Is_Asynchronous;
1606 function Is_Atomic (Id : E) return B is
1611 function Is_Bit_Packed_Array (Id : E) return B is
1613 return Flag122 (Implementation_Base_Type (Id));
1614 end Is_Bit_Packed_Array;
1616 function Is_Called (Id : E) return B is
1619 (Ekind (Id) = E_Procedure or else Ekind (Id) = E_Function);
1620 return Flag102 (Id);
1623 function Is_Character_Type (Id : E) return B is
1626 end Is_Character_Type;
1628 function Is_Child_Unit (Id : E) return B is
1633 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1636 end Is_Class_Wide_Equivalent_Type;
1638 function Is_Compilation_Unit (Id : E) return B is
1640 return Flag149 (Id);
1641 end Is_Compilation_Unit;
1643 function Is_Completely_Hidden (Id : E) return B is
1645 pragma Assert (Ekind (Id) = E_Discriminant);
1646 return Flag103 (Id);
1647 end Is_Completely_Hidden;
1649 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1652 end Is_Constr_Subt_For_U_Nominal;
1654 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1656 return Flag141 (Id);
1657 end Is_Constr_Subt_For_UN_Aliased;
1659 function Is_Constrained (Id : E) return B is
1661 pragma Assert (Nkind (Id) in N_Entity);
1665 function Is_Constructor (Id : E) return B is
1670 function Is_Controlled (Id : E) return B is
1672 return Flag42 (Base_Type (Id));
1675 function Is_Controlling_Formal (Id : E) return B is
1677 pragma Assert (Is_Formal (Id));
1679 end Is_Controlling_Formal;
1681 function Is_CPP_Class (Id : E) return B is
1686 function Is_Discrim_SO_Function (Id : E) return B is
1688 return Flag176 (Id);
1689 end Is_Discrim_SO_Function;
1691 function Is_Descendent_Of_Address (Id : E) return B is
1693 pragma Assert (Is_Type (Id));
1694 return Flag223 (Id);
1695 end Is_Descendent_Of_Address;
1697 function Is_Dispatching_Operation (Id : E) return B is
1699 pragma Assert (Nkind (Id) in N_Entity);
1701 end Is_Dispatching_Operation;
1703 function Is_Eliminated (Id : E) return B is
1705 return Flag124 (Id);
1708 function Is_Entry_Formal (Id : E) return B is
1711 end Is_Entry_Formal;
1713 function Is_Exported (Id : E) return B is
1718 function Is_First_Subtype (Id : E) return B is
1721 end Is_First_Subtype;
1723 function Is_For_Access_Subtype (Id : E) return B is
1726 (Ekind (Id) = E_Record_Subtype
1728 Ekind (Id) = E_Private_Subtype);
1729 return Flag118 (Id);
1730 end Is_For_Access_Subtype;
1732 function Is_Formal_Subprogram (Id : E) return B is
1734 return Flag111 (Id);
1735 end Is_Formal_Subprogram;
1737 function Is_Frozen (Id : E) return B is
1742 function Is_Generic_Actual_Type (Id : E) return B is
1744 pragma Assert (Is_Type (Id));
1746 end Is_Generic_Actual_Type;
1748 function Is_Generic_Instance (Id : E) return B is
1750 return Flag130 (Id);
1751 end Is_Generic_Instance;
1753 function Is_Generic_Type (Id : E) return B is
1755 pragma Assert (Nkind (Id) in N_Entity);
1757 end Is_Generic_Type;
1759 function Is_Hidden (Id : E) return B is
1764 function Is_Hidden_Open_Scope (Id : E) return B is
1766 return Flag171 (Id);
1767 end Is_Hidden_Open_Scope;
1769 function Is_Immediately_Visible (Id : E) return B is
1771 pragma Assert (Nkind (Id) in N_Entity);
1773 end Is_Immediately_Visible;
1775 function Is_Imported (Id : E) return B is
1780 function Is_Inlined (Id : E) return B is
1785 function Is_Interface (Id : E) return B is
1787 return Flag186 (Id);
1790 function Is_Instantiated (Id : E) return B is
1792 return Flag126 (Id);
1793 end Is_Instantiated;
1795 function Is_Internal (Id : E) return B is
1797 pragma Assert (Nkind (Id) in N_Entity);
1801 function Is_Interrupt_Handler (Id : E) return B is
1803 pragma Assert (Nkind (Id) in N_Entity);
1805 end Is_Interrupt_Handler;
1807 function Is_Intrinsic_Subprogram (Id : E) return B is
1810 end Is_Intrinsic_Subprogram;
1812 function Is_Itype (Id : E) return B is
1817 function Is_Known_Non_Null (Id : E) return B is
1820 end Is_Known_Non_Null;
1822 function Is_Known_Null (Id : E) return B is
1824 return Flag204 (Id);
1827 function Is_Known_Valid (Id : E) return B is
1829 return Flag170 (Id);
1832 function Is_Limited_Composite (Id : E) return B is
1834 return Flag106 (Id);
1835 end Is_Limited_Composite;
1837 function Is_Limited_Interface (Id : E) return B is
1839 return Flag197 (Id);
1840 end Is_Limited_Interface;
1842 function Is_Limited_Record (Id : E) return B is
1845 end Is_Limited_Record;
1847 function Is_Machine_Code_Subprogram (Id : E) return B is
1849 pragma Assert (Is_Subprogram (Id));
1850 return Flag137 (Id);
1851 end Is_Machine_Code_Subprogram;
1853 function Is_Non_Static_Subtype (Id : E) return B is
1855 pragma Assert (Is_Type (Id));
1856 return Flag109 (Id);
1857 end Is_Non_Static_Subtype;
1859 function Is_Null_Init_Proc (Id : E) return B is
1861 pragma Assert (Ekind (Id) = E_Procedure);
1862 return Flag178 (Id);
1863 end Is_Null_Init_Proc;
1865 function Is_Obsolescent (Id : E) return B is
1867 return Flag153 (Id);
1870 function Is_Only_Out_Parameter (Id : E) return B is
1872 pragma Assert (Is_Formal (Id));
1873 return Flag226 (Id);
1874 end Is_Only_Out_Parameter;
1876 function Is_Optional_Parameter (Id : E) return B is
1878 pragma Assert (Is_Formal (Id));
1879 return Flag134 (Id);
1880 end Is_Optional_Parameter;
1882 function Is_Overriding_Operation (Id : E) return B is
1884 pragma Assert (Is_Subprogram (Id));
1886 end Is_Overriding_Operation;
1888 function Is_Package_Body_Entity (Id : E) return B is
1890 return Flag160 (Id);
1891 end Is_Package_Body_Entity;
1893 function Is_Packed (Id : E) return B is
1895 return Flag51 (Implementation_Base_Type (Id));
1898 function Is_Packed_Array_Type (Id : E) return B is
1900 return Flag138 (Id);
1901 end Is_Packed_Array_Type;
1903 function Is_Potentially_Use_Visible (Id : E) return B is
1905 pragma Assert (Nkind (Id) in N_Entity);
1907 end Is_Potentially_Use_Visible;
1909 function Is_Preelaborated (Id : E) return B is
1912 end Is_Preelaborated;
1914 function Is_Primitive (Id : E) return B is
1917 (Is_Overloadable (Id)
1918 or else Ekind (Id) = E_Generic_Function
1919 or else Ekind (Id) = E_Generic_Procedure);
1920 return Flag218 (Id);
1923 function Is_Primitive_Wrapper (Id : E) return B is
1925 pragma Assert (Ekind (Id) = E_Procedure);
1926 return Flag195 (Id);
1927 end Is_Primitive_Wrapper;
1929 function Is_Private_Composite (Id : E) return B is
1931 pragma Assert (Is_Type (Id));
1932 return Flag107 (Id);
1933 end Is_Private_Composite;
1935 function Is_Private_Descendant (Id : E) return B is
1938 end Is_Private_Descendant;
1940 function Is_Protected_Interface (Id : E) return B is
1942 pragma Assert (Is_Interface (Id));
1943 return Flag198 (Id);
1944 end Is_Protected_Interface;
1946 function Is_Public (Id : E) return B is
1948 pragma Assert (Nkind (Id) in N_Entity);
1952 function Is_Pure (Id : E) return B is
1957 function Is_Pure_Unit_Access_Type (Id : E) return B is
1959 pragma Assert (Is_Access_Type (Id));
1960 return Flag189 (Id);
1961 end Is_Pure_Unit_Access_Type;
1963 function Is_Raised (Id : E) return B is
1965 pragma Assert (Ekind (Id) = E_Exception);
1966 return Flag224 (Id);
1969 function Is_Remote_Call_Interface (Id : E) return B is
1972 end Is_Remote_Call_Interface;
1974 function Is_Remote_Types (Id : E) return B is
1977 end Is_Remote_Types;
1979 function Is_Renaming_Of_Object (Id : E) return B is
1981 return Flag112 (Id);
1982 end Is_Renaming_Of_Object;
1984 function Is_Return_Object (Id : E) return B is
1986 return Flag209 (Id);
1987 end Is_Return_Object;
1989 function Is_Shared_Passive (Id : E) return B is
1992 end Is_Shared_Passive;
1994 function Is_Statically_Allocated (Id : E) return B is
1997 end Is_Statically_Allocated;
1999 function Is_Synchronized_Interface (Id : E) return B is
2001 pragma Assert (Is_Interface (Id));
2002 return Flag199 (Id);
2003 end Is_Synchronized_Interface;
2005 function Is_Tag (Id : E) return B is
2007 pragma Assert (Nkind (Id) in N_Entity);
2011 function Is_Tagged_Type (Id : E) return B is
2016 function Is_Task_Interface (Id : E) return B is
2018 pragma Assert (Is_Interface (Id));
2019 return Flag200 (Id);
2020 end Is_Task_Interface;
2022 function Is_Thunk (Id : E) return B is
2024 pragma Assert (Is_Subprogram (Id));
2025 return Flag225 (Id);
2028 function Is_True_Constant (Id : E) return B is
2030 return Flag163 (Id);
2031 end Is_True_Constant;
2033 function Is_Unchecked_Union (Id : E) return B is
2035 return Flag117 (Implementation_Base_Type (Id));
2036 end Is_Unchecked_Union;
2038 function Is_Unsigned_Type (Id : E) return B is
2040 pragma Assert (Is_Type (Id));
2041 return Flag144 (Id);
2042 end Is_Unsigned_Type;
2044 function Is_Valued_Procedure (Id : E) return B is
2046 pragma Assert (Ekind (Id) = E_Procedure);
2047 return Flag127 (Id);
2048 end Is_Valued_Procedure;
2050 function Is_Visible_Child_Unit (Id : E) return B is
2052 pragma Assert (Is_Child_Unit (Id));
2053 return Flag116 (Id);
2054 end Is_Visible_Child_Unit;
2056 function Is_Visible_Formal (Id : E) return B is
2058 return Flag206 (Id);
2059 end Is_Visible_Formal;
2061 function Is_VMS_Exception (Id : E) return B is
2063 return Flag133 (Id);
2064 end Is_VMS_Exception;
2066 function Is_Volatile (Id : E) return B is
2068 pragma Assert (Nkind (Id) in N_Entity);
2070 if Is_Type (Id) then
2071 return Flag16 (Base_Type (Id));
2077 function Itype_Printed (Id : E) return B is
2079 pragma Assert (Is_Itype (Id));
2080 return Flag202 (Id);
2083 function Kill_Elaboration_Checks (Id : E) return B is
2086 end Kill_Elaboration_Checks;
2088 function Kill_Range_Checks (Id : E) return B is
2091 end Kill_Range_Checks;
2093 function Kill_Tag_Checks (Id : E) return B is
2096 end Kill_Tag_Checks;
2098 function Known_To_Have_Preelab_Init (Id : E) return B is
2100 pragma Assert (Is_Type (Id));
2101 return Flag207 (Id);
2102 end Known_To_Have_Preelab_Init;
2104 function Last_Assignment (Id : E) return N is
2106 pragma Assert (Is_Assignable (Id));
2108 end Last_Assignment;
2110 function Last_Entity (Id : E) return E is
2115 function Limited_View (Id : E) return E is
2117 pragma Assert (Ekind (Id) = E_Package);
2121 function Lit_Indexes (Id : E) return E is
2123 pragma Assert (Is_Enumeration_Type (Id));
2127 function Lit_Strings (Id : E) return E is
2129 pragma Assert (Is_Enumeration_Type (Id));
2133 function Low_Bound_Known (Id : E) return B is
2135 return Flag205 (Id);
2136 end Low_Bound_Known;
2138 function Machine_Radix_10 (Id : E) return B is
2140 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2142 end Machine_Radix_10;
2144 function Master_Id (Id : E) return E is
2146 pragma Assert (Is_Access_Type (Id));
2150 function Materialize_Entity (Id : E) return B is
2152 return Flag168 (Id);
2153 end Materialize_Entity;
2155 function Mechanism (Id : E) return M is
2157 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2158 return UI_To_Int (Uint8 (Id));
2161 function Modulus (Id : E) return Uint is
2163 pragma Assert (Is_Modular_Integer_Type (Id));
2164 return Uint17 (Base_Type (Id));
2167 function Must_Be_On_Byte_Boundary (Id : E) return B is
2169 pragma Assert (Is_Type (Id));
2170 return Flag183 (Id);
2171 end Must_Be_On_Byte_Boundary;
2173 function Must_Have_Preelab_Init (Id : E) return B is
2175 pragma Assert (Is_Type (Id));
2176 return Flag208 (Id);
2177 end Must_Have_Preelab_Init;
2179 function Needs_Debug_Info (Id : E) return B is
2181 return Flag147 (Id);
2182 end Needs_Debug_Info;
2184 function Needs_No_Actuals (Id : E) return B is
2187 (Is_Overloadable (Id)
2188 or else Ekind (Id) = E_Subprogram_Type
2189 or else Ekind (Id) = E_Entry_Family);
2191 end Needs_No_Actuals;
2193 function Never_Set_In_Source (Id : E) return B is
2195 return Flag115 (Id);
2196 end Never_Set_In_Source;
2198 function Next_Inlined_Subprogram (Id : E) return E is
2201 end Next_Inlined_Subprogram;
2203 function No_Pool_Assigned (Id : E) return B is
2205 pragma Assert (Is_Access_Type (Id));
2206 return Flag131 (Root_Type (Id));
2207 end No_Pool_Assigned;
2209 function No_Return (Id : E) return B is
2211 return Flag113 (Id);
2214 function No_Strict_Aliasing (Id : E) return B is
2216 pragma Assert (Is_Access_Type (Id));
2217 return Flag136 (Base_Type (Id));
2218 end No_Strict_Aliasing;
2220 function Non_Binary_Modulus (Id : E) return B is
2222 pragma Assert (Is_Modular_Integer_Type (Id));
2223 return Flag58 (Base_Type (Id));
2224 end Non_Binary_Modulus;
2226 function Non_Limited_View (Id : E) return E is
2228 pragma Assert (Ekind (Id) in Incomplete_Kind);
2230 end Non_Limited_View;
2232 function Nonzero_Is_True (Id : E) return B is
2234 pragma Assert (Root_Type (Id) = Standard_Boolean);
2235 return Flag162 (Base_Type (Id));
2236 end Nonzero_Is_True;
2238 function Normalized_First_Bit (Id : E) return U is
2241 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
2243 end Normalized_First_Bit;
2245 function Normalized_Position (Id : E) return U is
2248 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
2250 end Normalized_Position;
2252 function Normalized_Position_Max (Id : E) return U is
2255 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
2257 end Normalized_Position_Max;
2259 function Object_Ref (Id : E) return E is
2261 pragma Assert (Ekind (Id) = E_Protected_Body);
2265 function Obsolescent_Warning (Id : E) return N is
2268 end Obsolescent_Warning;
2270 function Original_Array_Type (Id : E) return E is
2272 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2274 end Original_Array_Type;
2276 function Original_Record_Component (Id : E) return E is
2279 (Ekind (Id) = E_Void
2280 or else Ekind (Id) = E_Component
2281 or else Ekind (Id) = E_Discriminant);
2283 end Original_Record_Component;
2285 function Overridden_Operation (Id : E) return E is
2288 end Overridden_Operation;
2290 function Package_Instantiation (Id : E) return N is
2294 or else Ekind (Id) = E_Generic_Package
2295 or else Ekind (Id) = E_Package);
2297 end Package_Instantiation;
2299 function Packed_Array_Type (Id : E) return E is
2301 pragma Assert (Is_Array_Type (Id));
2303 end Packed_Array_Type;
2305 function Parent_Subtype (Id : E) return E is
2307 pragma Assert (Ekind (Id) = E_Record_Type);
2311 function Primitive_Operations (Id : E) return L is
2313 pragma Assert (Is_Tagged_Type (Id));
2314 return Elist15 (Id);
2315 end Primitive_Operations;
2317 function Prival (Id : E) return E is
2319 pragma Assert (Is_Protected_Private (Id));
2323 function Privals_Chain (Id : E) return L is
2325 pragma Assert (Is_Overloadable (Id)
2326 or else Ekind (Id) = E_Entry_Family);
2327 return Elist23 (Id);
2330 function Private_Dependents (Id : E) return L is
2332 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2333 return Elist18 (Id);
2334 end Private_Dependents;
2336 function Private_View (Id : E) return N is
2338 pragma Assert (Is_Private_Type (Id));
2342 function Protected_Body_Subprogram (Id : E) return E is
2344 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2346 end Protected_Body_Subprogram;
2348 function Protected_Formal (Id : E) return E is
2350 pragma Assert (Is_Formal (Id));
2352 end Protected_Formal;
2354 function Protected_Operation (Id : E) return N is
2356 pragma Assert (Is_Protected_Private (Id));
2358 end Protected_Operation;
2360 function Reachable (Id : E) return B is
2365 function Referenced (Id : E) return B is
2367 return Flag156 (Id);
2370 function Referenced_As_LHS (Id : E) return B is
2373 end Referenced_As_LHS;
2375 function Referenced_As_Out_Parameter (Id : E) return B is
2377 return Flag227 (Id);
2378 end Referenced_As_Out_Parameter;
2380 function Referenced_Object (Id : E) return N is
2382 pragma Assert (Is_Type (Id));
2384 end Referenced_Object;
2386 function Register_Exception_Call (Id : E) return N is
2388 pragma Assert (Ekind (Id) = E_Exception);
2390 end Register_Exception_Call;
2392 function Related_Array_Object (Id : E) return E is
2394 pragma Assert (Is_Array_Type (Id));
2396 end Related_Array_Object;
2398 function Related_Instance (Id : E) return E is
2401 (Ekind (Id) = E_Package or else Ekind (Id) = E_Package_Body);
2403 end Related_Instance;
2405 function Related_Type (Id : E) return E is
2408 (Ekind (Id) = E_Component or else Ekind (Id) = E_Constant);
2412 function Renamed_Entity (Id : E) return N is
2417 function Renamed_In_Spec (Id : E) return B is
2419 pragma Assert (Ekind (Id) = E_Package);
2420 return Flag231 (Id);
2421 end Renamed_In_Spec;
2423 function Renamed_Object (Id : E) return N is
2428 function Renaming_Map (Id : E) return U is
2433 function Requires_Overriding (Id : E) return B is
2435 pragma Assert (Is_Overloadable (Id));
2436 return Flag213 (Id);
2437 end Requires_Overriding;
2439 function Return_Present (Id : E) return B is
2444 function Return_Applies_To (Id : E) return N is
2447 end Return_Applies_To;
2449 function Returns_By_Ref (Id : E) return B is
2454 function Reverse_Bit_Order (Id : E) return B is
2456 pragma Assert (Is_Record_Type (Id));
2457 return Flag164 (Base_Type (Id));
2458 end Reverse_Bit_Order;
2460 function RM_Size (Id : E) return U is
2462 pragma Assert (Is_Type (Id));
2466 function Scalar_Range (Id : E) return N is
2471 function Scale_Value (Id : E) return U is
2476 function Scope_Depth_Value (Id : E) return U is
2479 end Scope_Depth_Value;
2481 function Sec_Stack_Needed_For_Return (Id : E) return B is
2483 return Flag167 (Id);
2484 end Sec_Stack_Needed_For_Return;
2486 function Shadow_Entities (Id : E) return S is
2489 (Ekind (Id) = E_Package or else Ekind (Id) = E_Generic_Package);
2491 end Shadow_Entities;
2493 function Shared_Var_Assign_Proc (Id : E) return E is
2495 pragma Assert (Ekind (Id) = E_Variable);
2497 end Shared_Var_Assign_Proc;
2499 function Shared_Var_Read_Proc (Id : E) return E is
2501 pragma Assert (Ekind (Id) = E_Variable);
2503 end Shared_Var_Read_Proc;
2505 function Size_Check_Code (Id : E) return N is
2507 pragma Assert (Ekind (Id) = E_Constant or else Ekind (Id) = E_Variable);
2509 end Size_Check_Code;
2511 function Size_Depends_On_Discriminant (Id : E) return B is
2513 return Flag177 (Id);
2514 end Size_Depends_On_Discriminant;
2516 function Size_Known_At_Compile_Time (Id : E) return B is
2519 end Size_Known_At_Compile_Time;
2521 function Small_Value (Id : E) return R is
2523 pragma Assert (Is_Fixed_Point_Type (Id));
2524 return Ureal21 (Id);
2527 function Spec_Entity (Id : E) return E is
2530 (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2534 function Storage_Size_Variable (Id : E) return E is
2536 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2537 return Node15 (Implementation_Base_Type (Id));
2538 end Storage_Size_Variable;
2540 function Static_Elaboration_Desired (Id : E) return B is
2542 pragma Assert (Ekind (Id) = E_Package);
2544 end Static_Elaboration_Desired;
2546 function Static_Initialization (Id : E) return N is
2549 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
2551 end Static_Initialization;
2553 function Stored_Constraint (Id : E) return L is
2556 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
2557 return Elist23 (Id);
2558 end Stored_Constraint;
2560 function Strict_Alignment (Id : E) return B is
2562 return Flag145 (Implementation_Base_Type (Id));
2563 end Strict_Alignment;
2565 function String_Literal_Length (Id : E) return U is
2568 end String_Literal_Length;
2570 function String_Literal_Low_Bound (Id : E) return N is
2573 end String_Literal_Low_Bound;
2575 function Suppress_Elaboration_Warnings (Id : E) return B is
2577 return Flag148 (Id);
2578 end Suppress_Elaboration_Warnings;
2580 function Suppress_Init_Proc (Id : E) return B is
2582 return Flag105 (Base_Type (Id));
2583 end Suppress_Init_Proc;
2585 function Suppress_Style_Checks (Id : E) return B is
2587 return Flag165 (Id);
2588 end Suppress_Style_Checks;
2590 function Suppress_Value_Tracking_On_Call (Id : E) return B is
2592 return Flag217 (Id);
2593 end Suppress_Value_Tracking_On_Call;
2595 function Task_Body_Procedure (Id : E) return N is
2597 pragma Assert (Ekind (Id) in Task_Kind);
2599 end Task_Body_Procedure;
2601 function Treat_As_Volatile (Id : E) return B is
2604 end Treat_As_Volatile;
2606 function Underlying_Full_View (Id : E) return E is
2608 pragma Assert (Ekind (Id) in Private_Kind);
2610 end Underlying_Full_View;
2612 function Universal_Aliasing (Id : E) return B is
2614 pragma Assert (Is_Type (Id));
2615 return Flag216 (Base_Type (Id));
2616 end Universal_Aliasing;
2618 function Unset_Reference (Id : E) return N is
2621 end Unset_Reference;
2623 function Used_As_Generic_Actual (Id : E) return B is
2625 return Flag222 (Id);
2626 end Used_As_Generic_Actual;
2628 function Uses_Sec_Stack (Id : E) return B is
2633 function Vax_Float (Id : E) return B is
2635 return Flag151 (Base_Type (Id));
2638 function Warnings_Off (Id : E) return B is
2643 function Wrapped_Entity (Id : E) return E is
2645 pragma Assert (Ekind (Id) = E_Procedure
2646 and then Is_Primitive_Wrapper (Id));
2650 function Was_Hidden (Id : E) return B is
2652 return Flag196 (Id);
2655 ------------------------------
2656 -- Classification Functions --
2657 ------------------------------
2659 function Is_Access_Type (Id : E) return B is
2661 return Ekind (Id) in Access_Kind;
2664 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
2666 return Ekind (Id) in Access_Protected_Kind;
2667 end Is_Access_Protected_Subprogram_Type;
2669 function Is_Array_Type (Id : E) return B is
2671 return Ekind (Id) in Array_Kind;
2674 function Is_Assignable (Id : E) return B is
2676 return Ekind (Id) in Assignable_Kind;
2679 function Is_Class_Wide_Type (Id : E) return B is
2681 return Ekind (Id) in Class_Wide_Kind;
2682 end Is_Class_Wide_Type;
2684 function Is_Composite_Type (Id : E) return B is
2686 return Ekind (Id) in Composite_Kind;
2687 end Is_Composite_Type;
2689 function Is_Concurrent_Body (Id : E) return B is
2691 return Ekind (Id) in
2692 Concurrent_Body_Kind;
2693 end Is_Concurrent_Body;
2695 function Is_Concurrent_Record_Type (Id : E) return B is
2698 end Is_Concurrent_Record_Type;
2700 function Is_Concurrent_Type (Id : E) return B is
2702 return Ekind (Id) in Concurrent_Kind;
2703 end Is_Concurrent_Type;
2705 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
2707 return Ekind (Id) in
2708 Decimal_Fixed_Point_Kind;
2709 end Is_Decimal_Fixed_Point_Type;
2711 function Is_Digits_Type (Id : E) return B is
2713 return Ekind (Id) in Digits_Kind;
2716 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
2718 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
2719 end Is_Discrete_Or_Fixed_Point_Type;
2721 function Is_Discrete_Type (Id : E) return B is
2723 return Ekind (Id) in Discrete_Kind;
2724 end Is_Discrete_Type;
2726 function Is_Elementary_Type (Id : E) return B is
2728 return Ekind (Id) in Elementary_Kind;
2729 end Is_Elementary_Type;
2731 function Is_Entry (Id : E) return B is
2733 return Ekind (Id) in Entry_Kind;
2736 function Is_Enumeration_Type (Id : E) return B is
2738 return Ekind (Id) in
2740 end Is_Enumeration_Type;
2742 function Is_Fixed_Point_Type (Id : E) return B is
2744 return Ekind (Id) in
2746 end Is_Fixed_Point_Type;
2748 function Is_Floating_Point_Type (Id : E) return B is
2750 return Ekind (Id) in Float_Kind;
2751 end Is_Floating_Point_Type;
2753 function Is_Formal (Id : E) return B is
2755 return Ekind (Id) in Formal_Kind;
2758 function Is_Formal_Object (Id : E) return B is
2760 return Ekind (Id) in Formal_Object_Kind;
2761 end Is_Formal_Object;
2763 function Is_Generic_Subprogram (Id : E) return B is
2765 return Ekind (Id) in Generic_Subprogram_Kind;
2766 end Is_Generic_Subprogram;
2768 function Is_Generic_Unit (Id : E) return B is
2770 return Ekind (Id) in Generic_Unit_Kind;
2771 end Is_Generic_Unit;
2773 function Is_Incomplete_Or_Private_Type (Id : E) return B is
2775 return Ekind (Id) in
2776 Incomplete_Or_Private_Kind;
2777 end Is_Incomplete_Or_Private_Type;
2779 function Is_Incomplete_Type (Id : E) return B is
2781 return Ekind (Id) in
2783 end Is_Incomplete_Type;
2785 function Is_Integer_Type (Id : E) return B is
2787 return Ekind (Id) in Integer_Kind;
2788 end Is_Integer_Type;
2790 function Is_Modular_Integer_Type (Id : E) return B is
2792 return Ekind (Id) in
2793 Modular_Integer_Kind;
2794 end Is_Modular_Integer_Type;
2796 function Is_Named_Number (Id : E) return B is
2798 return Ekind (Id) in Named_Kind;
2799 end Is_Named_Number;
2801 function Is_Numeric_Type (Id : E) return B is
2803 return Ekind (Id) in Numeric_Kind;
2804 end Is_Numeric_Type;
2806 function Is_Object (Id : E) return B is
2808 return Ekind (Id) in Object_Kind;
2811 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
2813 return Ekind (Id) in
2814 Ordinary_Fixed_Point_Kind;
2815 end Is_Ordinary_Fixed_Point_Type;
2817 function Is_Overloadable (Id : E) return B is
2819 return Ekind (Id) in Overloadable_Kind;
2820 end Is_Overloadable;
2822 function Is_Private_Type (Id : E) return B is
2824 return Ekind (Id) in Private_Kind;
2825 end Is_Private_Type;
2827 function Is_Protected_Type (Id : E) return B is
2829 return Ekind (Id) in Protected_Kind;
2830 end Is_Protected_Type;
2832 function Is_Real_Type (Id : E) return B is
2834 return Ekind (Id) in Real_Kind;
2837 function Is_Record_Type (Id : E) return B is
2839 return Ekind (Id) in Record_Kind;
2842 function Is_Scalar_Type (Id : E) return B is
2844 return Ekind (Id) in Scalar_Kind;
2847 function Is_Signed_Integer_Type (Id : E) return B is
2849 return Ekind (Id) in
2850 Signed_Integer_Kind;
2851 end Is_Signed_Integer_Type;
2853 function Is_Subprogram (Id : E) return B is
2855 return Ekind (Id) in Subprogram_Kind;
2858 function Is_Task_Type (Id : E) return B is
2860 return Ekind (Id) in Task_Kind;
2863 function Is_Type (Id : E) return B is
2865 return Ekind (Id) in Type_Kind;
2868 ------------------------------
2869 -- Attribute Set Procedures --
2870 ------------------------------
2872 procedure Set_Abstract_Interfaces (Id : E; V : L) is
2874 pragma Assert (Is_Record_Type (Id));
2875 Set_Elist25 (Id, V);
2876 end Set_Abstract_Interfaces;
2878 procedure Set_Abstract_Interface_Alias (Id : E; V : E) is
2883 (Ekind (Id) = E_Procedure or else Ekind (Id) = E_Function));
2885 end Set_Abstract_Interface_Alias;
2887 procedure Set_Accept_Address (Id : E; V : L) is
2889 Set_Elist21 (Id, V);
2890 end Set_Accept_Address;
2892 procedure Set_Access_Disp_Table (Id : E; V : L) is
2894 pragma Assert (Is_Tagged_Type (Id) and then Id = Base_Type (Id));
2895 Set_Elist16 (Id, V);
2896 end Set_Access_Disp_Table;
2898 procedure Set_Associated_Final_Chain (Id : E; V : E) is
2900 pragma Assert (Is_Access_Type (Id));
2902 end Set_Associated_Final_Chain;
2904 procedure Set_Associated_Formal_Package (Id : E; V : E) is
2907 end Set_Associated_Formal_Package;
2909 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
2912 end Set_Associated_Node_For_Itype;
2914 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
2916 pragma Assert (Is_Access_Type (Id) and then Id = Base_Type (Id));
2918 end Set_Associated_Storage_Pool;
2920 procedure Set_Actual_Subtype (Id : E; V : E) is
2923 (Ekind (Id) = E_Constant
2924 or else Ekind (Id) = E_Variable
2925 or else Ekind (Id) = E_Generic_In_Out_Parameter
2926 or else Is_Formal (Id));
2928 end Set_Actual_Subtype;
2930 procedure Set_Address_Taken (Id : E; V : B := True) is
2932 Set_Flag104 (Id, V);
2933 end Set_Address_Taken;
2935 procedure Set_Alias (Id : E; V : E) is
2938 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
2942 procedure Set_Alignment (Id : E; V : U) is
2944 pragma Assert (Is_Type (Id)
2945 or else Is_Formal (Id)
2946 or else Ekind (Id) = E_Loop_Parameter
2947 or else Ekind (Id) = E_Constant
2948 or else Ekind (Id) = E_Exception
2949 or else Ekind (Id) = E_Variable);
2953 procedure Set_Barrier_Function (Id : E; V : N) is
2955 pragma Assert (Is_Entry (Id));
2957 end Set_Barrier_Function;
2959 procedure Set_Block_Node (Id : E; V : N) is
2961 pragma Assert (Ekind (Id) = E_Block);
2965 procedure Set_Body_Entity (Id : E; V : E) is
2968 (Ekind (Id) = E_Package or else Ekind (Id) = E_Generic_Package);
2970 end Set_Body_Entity;
2972 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
2975 (Ekind (Id) = E_Package
2976 or else Is_Subprogram (Id)
2977 or else Is_Generic_Unit (Id));
2979 end Set_Body_Needed_For_SAL;
2981 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
2983 pragma Assert (Is_Record_Type (Id) and then Id = Base_Type (Id));
2984 Set_Flag125 (Id, V);
2985 end Set_C_Pass_By_Copy;
2987 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
2990 end Set_Can_Never_Be_Null;
2992 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
2995 end Set_Checks_May_Be_Suppressed;
2997 procedure Set_Class_Wide_Type (Id : E; V : E) is
2999 pragma Assert (Is_Type (Id));
3001 end Set_Class_Wide_Type;
3003 procedure Set_Cloned_Subtype (Id : E; V : E) is
3006 (Ekind (Id) = E_Record_Subtype
3007 or else Ekind (Id) = E_Class_Wide_Subtype);
3009 end Set_Cloned_Subtype;
3011 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3014 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
3016 end Set_Component_Bit_Offset;
3018 procedure Set_Component_Clause (Id : E; V : N) is
3021 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
3023 end Set_Component_Clause;
3025 procedure Set_Component_Size (Id : E; V : U) is
3027 pragma Assert (Is_Array_Type (Id) and then Id = Base_Type (Id));
3029 end Set_Component_Size;
3031 procedure Set_Component_Type (Id : E; V : E) is
3033 pragma Assert (Is_Array_Type (Id) and then Id = Base_Type (Id));
3035 end Set_Component_Type;
3037 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3040 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3042 end Set_Corresponding_Concurrent_Type;
3044 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3046 pragma Assert (Ekind (Id) = E_Discriminant);
3048 end Set_Corresponding_Discriminant;
3050 procedure Set_Corresponding_Equality (Id : E; V : E) is
3053 (Ekind (Id) = E_Function
3054 and then not Comes_From_Source (Id)
3055 and then Chars (Id) = Name_Op_Ne);
3057 end Set_Corresponding_Equality;
3059 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3061 pragma Assert (Is_Concurrent_Type (Id));
3063 end Set_Corresponding_Record_Type;
3065 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3068 end Set_Corresponding_Remote_Type;
3070 procedure Set_Current_Use_Clause (Id : E; V : E) is
3072 pragma Assert (Ekind (Id) = E_Package);
3074 end Set_Current_Use_Clause;
3076 procedure Set_Current_Value (Id : E; V : N) is
3078 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3080 end Set_Current_Value;
3082 procedure Set_CR_Discriminant (Id : E; V : E) is
3085 end Set_CR_Discriminant;
3087 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3089 Set_Flag166 (Id, V);
3090 end Set_Debug_Info_Off;
3092 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3095 end Set_Debug_Renaming_Link;
3097 procedure Set_Default_Expr_Function (Id : E; V : E) is
3099 pragma Assert (Is_Formal (Id));
3101 end Set_Default_Expr_Function;
3103 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3105 Set_Flag108 (Id, V);
3106 end Set_Default_Expressions_Processed;
3108 procedure Set_Default_Value (Id : E; V : N) is
3110 pragma Assert (Is_Formal (Id));
3112 end Set_Default_Value;
3114 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3118 or else Is_Task_Type (Id)
3119 or else Ekind (Id) = E_Block);
3120 Set_Flag114 (Id, V);
3121 end Set_Delay_Cleanups;
3123 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3127 or else Ekind (Id) = E_Package
3128 or else Ekind (Id) = E_Package_Body);
3130 end Set_Delay_Subprogram_Descriptors;
3132 procedure Set_Delta_Value (Id : E; V : R) is
3134 pragma Assert (Is_Fixed_Point_Type (Id));
3135 Set_Ureal18 (Id, V);
3136 end Set_Delta_Value;
3138 procedure Set_Dependent_Instances (Id : E; V : L) is
3140 pragma Assert (Is_Generic_Instance (Id));
3142 end Set_Dependent_Instances;
3144 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3146 pragma Assert (Nkind (Id) in N_Entity);
3148 end Set_Depends_On_Private;
3150 procedure Set_Digits_Value (Id : E; V : U) is
3153 (Is_Floating_Point_Type (Id)
3154 or else Is_Decimal_Fixed_Point_Type (Id));
3156 end Set_Digits_Value;
3158 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3161 end Set_Directly_Designated_Type;
3163 procedure Set_Discard_Names (Id : E; V : B := True) is
3166 end Set_Discard_Names;
3168 procedure Set_Discriminal (Id : E; V : E) is
3170 pragma Assert (Ekind (Id) = E_Discriminant);
3172 end Set_Discriminal;
3174 procedure Set_Discriminal_Link (Id : E; V : E) is
3177 end Set_Discriminal_Link;
3179 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3181 pragma Assert (Ekind (Id) = E_Component);
3183 end Set_Discriminant_Checking_Func;
3185 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3187 pragma Assert (Nkind (Id) in N_Entity);
3188 Set_Elist21 (Id, V);
3189 end Set_Discriminant_Constraint;
3191 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3194 end Set_Discriminant_Default_Value;
3196 procedure Set_Discriminant_Number (Id : E; V : U) is
3199 end Set_Discriminant_Number;
3201 procedure Set_Dispatch_Table_Wrapper (Id : E; V : E) is
3203 pragma Assert (Is_Tagged_Type (Id) and then Id = Base_Type (Id));
3205 end Set_Dispatch_Table_Wrapper;
3207 procedure Set_DT_Entry_Count (Id : E; V : U) is
3209 pragma Assert (Ekind (Id) = E_Component);
3211 end Set_DT_Entry_Count;
3213 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3215 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3217 end Set_DT_Offset_To_Top_Func;
3219 procedure Set_DT_Position (Id : E; V : U) is
3221 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
3223 end Set_DT_Position;
3225 procedure Set_DTC_Entity (Id : E; V : E) is
3228 (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
3232 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3234 pragma Assert (Ekind (Id) = E_Package);
3235 Set_Flag210 (Id, V);
3236 end Set_Elaborate_Body_Desirable;
3238 procedure Set_Elaboration_Entity (Id : E; V : E) is
3243 Ekind (Id) = E_Package
3245 Is_Generic_Unit (Id));
3247 end Set_Elaboration_Entity;
3249 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3254 Ekind (Id) = E_Package
3256 Is_Generic_Unit (Id));
3257 Set_Flag174 (Id, V);
3258 end Set_Elaboration_Entity_Required;
3260 procedure Set_Enclosing_Scope (Id : E; V : E) is
3263 end Set_Enclosing_Scope;
3265 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3267 pragma Assert (Is_Entry (Id));
3268 Set_Flag152 (Id, V);
3269 end Set_Entry_Accepted;
3271 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3274 end Set_Entry_Bodies_Array;
3276 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3279 end Set_Entry_Cancel_Parameter;
3281 procedure Set_Entry_Component (Id : E; V : E) is
3284 end Set_Entry_Component;
3286 procedure Set_Entry_Formal (Id : E; V : E) is
3289 end Set_Entry_Formal;
3291 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3293 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3295 end Set_Entry_Index_Constant;
3297 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3300 end Set_Entry_Parameters_Type;
3302 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3304 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3306 end Set_Enum_Pos_To_Rep;
3308 procedure Set_Enumeration_Pos (Id : E; V : U) is
3310 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3312 end Set_Enumeration_Pos;
3314 procedure Set_Enumeration_Rep (Id : E; V : U) is
3316 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3318 end Set_Enumeration_Rep;
3320 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3322 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3324 end Set_Enumeration_Rep_Expr;
3326 procedure Set_Equivalent_Type (Id : E; V : E) is
3329 (Ekind (Id) = E_Class_Wide_Type or else
3330 Ekind (Id) = E_Class_Wide_Subtype or else
3331 Ekind (Id) = E_Access_Protected_Subprogram_Type or else
3332 Ekind (Id) = E_Anonymous_Access_Protected_Subprogram_Type or else
3333 Ekind (Id) = E_Access_Subprogram_Type or else
3334 Ekind (Id) = E_Exception_Type);
3336 end Set_Equivalent_Type;
3338 procedure Set_Esize (Id : E; V : U) is
3343 procedure Set_Exception_Code (Id : E; V : U) is
3345 pragma Assert (Ekind (Id) = E_Exception);
3347 end Set_Exception_Code;
3349 procedure Set_Extra_Accessibility (Id : E; V : E) is
3351 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3353 end Set_Extra_Accessibility;
3355 procedure Set_Extra_Constrained (Id : E; V : E) is
3357 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3359 end Set_Extra_Constrained;
3361 procedure Set_Extra_Formal (Id : E; V : E) is
3364 end Set_Extra_Formal;
3366 procedure Set_Extra_Formals (Id : E; V : E) is
3369 (Is_Overloadable (Id)
3370 or else Ekind (Id) = E_Entry_Family
3371 or else Ekind (Id) = E_Subprogram_Body
3372 or else Ekind (Id) = E_Subprogram_Type);
3374 end Set_Extra_Formals;
3376 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3378 pragma Assert (Ekind (Id) in Access_Subprogram_Type_Kind);
3379 Set_Flag229 (Id, V);
3380 end Set_Can_Use_Internal_Rep;
3382 procedure Set_Finalization_Chain_Entity (Id : E; V : E) is
3385 end Set_Finalization_Chain_Entity;
3387 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3389 pragma Assert (Is_Type (Id) and then Id = Base_Type (Id));
3390 Set_Flag158 (Id, V);
3391 end Set_Finalize_Storage_Only;
3393 procedure Set_First_Entity (Id : E; V : E) is
3396 end Set_First_Entity;
3398 procedure Set_First_Index (Id : E; V : N) is
3400 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3402 end Set_First_Index;
3404 procedure Set_First_Literal (Id : E; V : E) is
3406 pragma Assert (Is_Enumeration_Type (Id));
3408 end Set_First_Literal;
3410 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3413 (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
3415 end Set_First_Optional_Parameter;
3417 procedure Set_First_Private_Entity (Id : E; V : E) is
3419 pragma Assert (Ekind (Id) = E_Package
3420 or else Ekind (Id) = E_Generic_Package
3421 or else Ekind (Id) in Concurrent_Kind);
3423 end Set_First_Private_Entity;
3425 procedure Set_First_Rep_Item (Id : E; V : N) is
3428 end Set_First_Rep_Item;
3430 procedure Set_Freeze_Node (Id : E; V : N) is
3433 end Set_Freeze_Node;
3435 procedure Set_From_With_Type (Id : E; V : B := True) is
3439 or else Ekind (Id) = E_Package);
3440 Set_Flag159 (Id, V);
3441 end Set_From_With_Type;
3443 procedure Set_Full_View (Id : E; V : E) is
3445 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
3449 procedure Set_Function_Returns_With_DSP (Id : E; V : B := True) is
3452 (Is_Subprogram (Id) or else Ekind (Id) = E_Subprogram_Type);
3453 Set_Flag169 (Id, V);
3454 end Set_Function_Returns_With_DSP;
3456 procedure Set_Generic_Homonym (Id : E; V : E) is
3459 end Set_Generic_Homonym;
3461 procedure Set_Generic_Renamings (Id : E; V : L) is
3463 Set_Elist23 (Id, V);
3464 end Set_Generic_Renamings;
3466 procedure Set_Handler_Records (Id : E; V : S) is
3469 end Set_Handler_Records;
3471 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
3473 pragma Assert (Base_Type (Id) = Id);
3474 Set_Flag135 (Id, V);
3475 end Set_Has_Aliased_Components;
3477 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
3480 end Set_Has_Alignment_Clause;
3482 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
3485 end Set_Has_All_Calls_Remote;
3487 procedure Set_Has_Anon_Block_Suffix (Id : E; V : B := True) is
3489 Set_Flag201 (Id, V);
3490 end Set_Has_Anon_Block_Suffix;
3492 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
3494 pragma Assert (not Is_Type (Id) or else Base_Type (Id) = Id);
3496 end Set_Has_Atomic_Components;
3498 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
3501 ((V = False) or else (Is_Discrete_Type (Id) or Is_Object (Id)));
3502 Set_Flag139 (Id, V);
3503 end Set_Has_Biased_Representation;
3505 procedure Set_Has_Completion (Id : E; V : B := True) is
3508 end Set_Has_Completion;
3510 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
3512 pragma Assert (Is_Type (Id));
3514 end Set_Has_Completion_In_Body;
3516 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
3518 pragma Assert (Ekind (Id) = E_Record_Type);
3519 Set_Flag140 (Id, V);
3520 end Set_Has_Complex_Representation;
3522 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
3524 pragma Assert (Ekind (Id) = E_Array_Type);
3526 end Set_Has_Component_Size_Clause;
3528 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
3530 pragma Assert (Is_Type (Id));
3531 Set_Flag187 (Id, V);
3532 end Set_Has_Constrained_Partial_View;
3534 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
3536 Set_Flag181 (Id, V);
3537 end Set_Has_Contiguous_Rep;
3539 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
3541 pragma Assert (Base_Type (Id) = Id);
3543 end Set_Has_Controlled_Component;
3545 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
3548 end Set_Has_Controlling_Result;
3550 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
3552 Set_Flag119 (Id, V);
3553 end Set_Has_Convention_Pragma;
3555 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
3557 pragma Assert (Nkind (Id) in N_Entity);
3559 end Set_Has_Delayed_Freeze;
3561 procedure Set_Has_Discriminants (Id : E; V : B := True) is
3563 pragma Assert (Nkind (Id) in N_Entity);
3565 end Set_Has_Discriminants;
3567 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
3569 pragma Assert (Ekind (Id) = E_Record_Type
3570 and then Is_Tagged_Type (Id));
3571 Set_Flag220 (Id, V);
3572 end Set_Has_Dispatch_Table;
3574 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
3576 pragma Assert (Is_Enumeration_Type (Id));
3578 end Set_Has_Enumeration_Rep_Clause;
3580 procedure Set_Has_Exit (Id : E; V : B := True) is
3585 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True) is
3587 pragma Assert (Is_Tagged_Type (Id));
3588 Set_Flag110 (Id, V);
3589 end Set_Has_External_Tag_Rep_Clause;
3591 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
3593 Set_Flag175 (Id, V);
3594 end Set_Has_Forward_Instantiation;
3596 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
3598 Set_Flag173 (Id, V);
3599 end Set_Has_Fully_Qualified_Name;
3601 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
3604 end Set_Has_Gigi_Rep_Item;
3606 procedure Set_Has_Homonym (Id : E; V : B := True) is
3609 end Set_Has_Homonym;
3611 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
3614 (Ekind (Id) = E_Variable or else Ekind (Id) = E_Out_Parameter);
3615 Set_Flag219 (Id, V);
3616 end Set_Has_Initial_Value;
3618 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
3620 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
3622 end Set_Has_Machine_Radix_Clause;
3624 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
3627 end Set_Has_Master_Entity;
3629 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
3632 (Ekind (Id) = E_Function or else Ekind (Id) = E_Generic_Function);
3633 Set_Flag142 (Id, V);
3634 end Set_Has_Missing_Return;
3636 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
3638 Set_Flag101 (Id, V);
3639 end Set_Has_Nested_Block_With_Handler;
3641 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
3644 (Ekind (Id) = E_Variable
3645 or else Ekind (Id) = E_Constant
3646 or else Ekind (Id) = E_Loop_Parameter);
3647 Set_Flag215 (Id, V);
3648 end Set_Has_Up_Level_Access;
3650 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
3652 pragma Assert (Base_Type (Id) = Id);
3654 end Set_Has_Non_Standard_Rep;
3656 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
3658 pragma Assert (Is_Type (Id));
3659 Set_Flag172 (Id, V);
3660 end Set_Has_Object_Size_Clause;
3662 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
3664 Set_Flag154 (Id, V);
3665 end Set_Has_Per_Object_Constraint;
3667 procedure Set_Has_Persistent_BSS (Id : E; V : B := True) is
3669 Set_Flag188 (Id, V);
3670 end Set_Has_Persistent_BSS;
3672 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
3674 pragma Assert (Is_Access_Type (Id));
3675 Set_Flag27 (Base_Type (Id), V);
3676 end Set_Has_Pragma_Controlled;
3678 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
3680 Set_Flag150 (Id, V);
3681 end Set_Has_Pragma_Elaborate_Body;
3683 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
3685 Set_Flag157 (Id, V);
3686 end Set_Has_Pragma_Inline;
3688 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
3690 Set_Flag230 (Id, V);
3691 end Set_Has_Pragma_Inline_Always;
3693 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
3695 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
3696 pragma Assert (Id = Base_Type (Id));
3697 Set_Flag121 (Id, V);
3698 end Set_Has_Pragma_Pack;
3700 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
3702 Set_Flag221 (Id, V);
3703 end Set_Has_Pragma_Preelab_Init;
3705 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
3707 Set_Flag203 (Id, V);
3708 end Set_Has_Pragma_Pure;
3710 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
3712 Set_Flag179 (Id, V);
3713 end Set_Has_Pragma_Pure_Function;
3715 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
3717 Set_Flag180 (Id, V);
3718 end Set_Has_Pragma_Unreferenced;
3720 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
3722 pragma Assert (Is_Type (Id));
3723 Set_Flag212 (Id, V);
3724 end Set_Has_Pragma_Unreferenced_Objects;
3726 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
3728 pragma Assert (Id = Base_Type (Id));
3729 Set_Flag120 (Id, V);
3730 end Set_Has_Primitive_Operations;
3732 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
3734 Set_Flag155 (Id, V);
3735 end Set_Has_Private_Declaration;
3737 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
3739 Set_Flag161 (Id, V);
3740 end Set_Has_Qualified_Name;
3742 procedure Set_Has_RACW (Id : E; V : B := True) is
3744 pragma Assert (Ekind (Id) = E_Package);
3745 Set_Flag214 (Id, V);
3748 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
3750 pragma Assert (Id = Base_Type (Id));
3752 end Set_Has_Record_Rep_Clause;
3754 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
3756 pragma Assert (Is_Subprogram (Id));
3757 Set_Flag143 (Id, V);
3758 end Set_Has_Recursive_Call;
3760 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
3763 end Set_Has_Size_Clause;
3765 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
3768 end Set_Has_Small_Clause;
3770 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
3772 pragma Assert (Id = Base_Type (Id));
3773 Set_Flag100 (Id, V);
3774 end Set_Has_Specified_Layout;
3776 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
3778 pragma Assert (Is_Type (Id));
3779 Set_Flag190 (Id, V);
3780 end Set_Has_Specified_Stream_Input;
3782 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
3784 pragma Assert (Is_Type (Id));
3785 Set_Flag191 (Id, V);
3786 end Set_Has_Specified_Stream_Output;
3788 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
3790 pragma Assert (Is_Type (Id));
3791 Set_Flag192 (Id, V);
3792 end Set_Has_Specified_Stream_Read;
3794 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
3796 pragma Assert (Is_Type (Id));
3797 Set_Flag193 (Id, V);
3798 end Set_Has_Specified_Stream_Write;
3800 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
3802 Set_Flag211 (Id, V);
3803 end Set_Has_Static_Discriminants;
3805 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
3807 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
3808 pragma Assert (Base_Type (Id) = Id);
3810 end Set_Has_Storage_Size_Clause;
3812 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
3814 pragma Assert (Is_Elementary_Type (Id));
3815 Set_Flag184 (Id, V);
3816 end Set_Has_Stream_Size_Clause;
3818 procedure Set_Has_Subprogram_Descriptor (Id : E; V : B := True) is
3821 end Set_Has_Subprogram_Descriptor;
3823 procedure Set_Has_Task (Id : E; V : B := True) is
3825 pragma Assert (Base_Type (Id) = Id);
3829 procedure Set_Has_Thunks (Id : E; V : B := True) is
3831 pragma Assert (Is_Tag (Id)
3832 and then Ekind (Id) = E_Constant);
3833 Set_Flag228 (Id, V);
3836 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
3838 pragma Assert (Base_Type (Id) = Id);
3839 Set_Flag123 (Id, V);
3840 end Set_Has_Unchecked_Union;
3842 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
3844 pragma Assert (Is_Type (Id));
3846 end Set_Has_Unknown_Discriminants;
3848 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
3850 pragma Assert (not Is_Type (Id) or else Base_Type (Id) = Id);
3852 end Set_Has_Volatile_Components;
3854 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
3856 Set_Flag182 (Id, V);
3857 end Set_Has_Xref_Entry;
3859 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
3861 pragma Assert (Ekind (Id) = E_Variable);
3863 end Set_Hiding_Loop_Variable;
3865 procedure Set_Homonym (Id : E; V : E) is
3867 pragma Assert (Id /= V);
3871 procedure Set_Implemented_By_Entry (Id : E; V : B := True) is
3874 (Ekind (Id) = E_Function
3875 or else Ekind (Id) = E_Procedure);
3876 Set_Flag232 (Id, V);
3877 end Set_Implemented_By_Entry;
3879 procedure Set_In_Package_Body (Id : E; V : B := True) is
3882 end Set_In_Package_Body;
3884 procedure Set_In_Private_Part (Id : E; V : B := True) is
3887 end Set_In_Private_Part;
3889 procedure Set_In_Use (Id : E; V : B := True) is
3891 pragma Assert (Nkind (Id) in N_Entity);
3895 procedure Set_Inner_Instances (Id : E; V : L) is
3897 Set_Elist23 (Id, V);
3898 end Set_Inner_Instances;
3900 procedure Set_Interface_Name (Id : E; V : N) is
3903 end Set_Interface_Name;
3905 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
3907 pragma Assert (Is_Overloadable (Id));
3909 end Set_Is_Abstract_Subprogram;
3911 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
3913 pragma Assert (Is_Type (Id));
3914 Set_Flag146 (Id, V);
3915 end Set_Is_Abstract_Type;
3917 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
3919 pragma Assert (Is_Access_Type (Id));
3920 Set_Flag194 (Id, V);
3921 end Set_Is_Local_Anonymous_Access;
3923 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
3925 pragma Assert (Is_Access_Type (Id));
3927 end Set_Is_Access_Constant;
3929 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
3931 Set_Flag185 (Id, V);
3932 end Set_Is_Ada_2005_Only;
3934 procedure Set_Is_Aliased (Id : E; V : B := True) is
3936 pragma Assert (Nkind (Id) in N_Entity);
3940 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
3942 pragma Assert (Is_Entry (Id));
3943 Set_Flag132 (Id, V);
3944 end Set_Is_AST_Entry;
3946 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
3949 (Ekind (Id) = E_Procedure or else Is_Type (Id));
3951 end Set_Is_Asynchronous;
3953 procedure Set_Is_Atomic (Id : E; V : B := True) is
3958 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
3960 pragma Assert ((not V)
3961 or else (Is_Array_Type (Id) and then Id = Base_Type (Id)));
3963 Set_Flag122 (Id, V);
3964 end Set_Is_Bit_Packed_Array;
3966 procedure Set_Is_Called (Id : E; V : B := True) is
3969 (Ekind (Id) = E_Procedure or else Ekind (Id) = E_Function);
3970 Set_Flag102 (Id, V);
3973 procedure Set_Is_Character_Type (Id : E; V : B := True) is
3976 end Set_Is_Character_Type;
3978 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
3981 end Set_Is_Child_Unit;
3983 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
3986 end Set_Is_Class_Wide_Equivalent_Type;
3988 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
3990 Set_Flag149 (Id, V);
3991 end Set_Is_Compilation_Unit;
3993 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
3995 pragma Assert (Ekind (Id) = E_Discriminant);
3996 Set_Flag103 (Id, V);
3997 end Set_Is_Completely_Hidden;
3999 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4002 end Set_Is_Concurrent_Record_Type;
4004 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4007 end Set_Is_Constr_Subt_For_U_Nominal;
4009 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4011 Set_Flag141 (Id, V);
4012 end Set_Is_Constr_Subt_For_UN_Aliased;
4014 procedure Set_Is_Constrained (Id : E; V : B := True) is
4016 pragma Assert (Nkind (Id) in N_Entity);
4018 end Set_Is_Constrained;
4020 procedure Set_Is_Constructor (Id : E; V : B := True) is
4023 end Set_Is_Constructor;
4025 procedure Set_Is_Controlled (Id : E; V : B := True) is
4027 pragma Assert (Id = Base_Type (Id));
4029 end Set_Is_Controlled;
4031 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4033 pragma Assert (Is_Formal (Id));
4035 end Set_Is_Controlling_Formal;
4037 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4040 end Set_Is_CPP_Class;
4042 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4044 pragma Assert (Is_Type (Id));
4045 Set_Flag223 (Id, V);
4046 end Set_Is_Descendent_Of_Address;
4048 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4050 Set_Flag176 (Id, V);
4051 end Set_Is_Discrim_SO_Function;
4053 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4058 Is_Overloadable (Id)
4060 Ekind (Id) = E_Subprogram_Type);
4063 end Set_Is_Dispatching_Operation;
4065 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4067 Set_Flag124 (Id, V);
4068 end Set_Is_Eliminated;
4070 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4073 end Set_Is_Entry_Formal;
4075 procedure Set_Is_Exported (Id : E; V : B := True) is
4078 end Set_Is_Exported;
4080 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4083 end Set_Is_First_Subtype;
4085 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4088 (Ekind (Id) = E_Record_Subtype
4090 Ekind (Id) = E_Private_Subtype);
4091 Set_Flag118 (Id, V);
4092 end Set_Is_For_Access_Subtype;
4094 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4096 Set_Flag111 (Id, V);
4097 end Set_Is_Formal_Subprogram;
4099 procedure Set_Is_Frozen (Id : E; V : B := True) is
4101 pragma Assert (Nkind (Id) in N_Entity);
4105 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4107 pragma Assert (Is_Type (Id));
4109 end Set_Is_Generic_Actual_Type;
4111 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4113 Set_Flag130 (Id, V);
4114 end Set_Is_Generic_Instance;
4116 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4118 pragma Assert (Nkind (Id) in N_Entity);
4120 end Set_Is_Generic_Type;
4122 procedure Set_Is_Hidden (Id : E; V : B := True) is
4127 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4129 Set_Flag171 (Id, V);
4130 end Set_Is_Hidden_Open_Scope;
4132 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4134 pragma Assert (Nkind (Id) in N_Entity);
4136 end Set_Is_Immediately_Visible;
4138 procedure Set_Is_Imported (Id : E; V : B := True) is
4141 end Set_Is_Imported;
4143 procedure Set_Is_Inlined (Id : E; V : B := True) is
4148 procedure Set_Is_Interface (Id : E; V : B := True) is
4151 (Ekind (Id) = E_Record_Type
4152 or else Ekind (Id) = E_Record_Subtype
4153 or else Ekind (Id) = E_Record_Type_With_Private
4154 or else Ekind (Id) = E_Record_Subtype_With_Private
4155 or else Ekind (Id) = E_Class_Wide_Type
4156 or else Ekind (Id) = E_Class_Wide_Subtype);
4157 Set_Flag186 (Id, V);
4158 end Set_Is_Interface;
4160 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4162 Set_Flag126 (Id, V);
4163 end Set_Is_Instantiated;
4165 procedure Set_Is_Internal (Id : E; V : B := True) is
4167 pragma Assert (Nkind (Id) in N_Entity);
4169 end Set_Is_Internal;
4171 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4173 pragma Assert (Nkind (Id) in N_Entity);
4175 end Set_Is_Interrupt_Handler;
4177 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4180 end Set_Is_Intrinsic_Subprogram;
4182 procedure Set_Is_Itype (Id : E; V : B := True) is
4187 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4190 end Set_Is_Known_Non_Null;
4192 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4194 Set_Flag204 (Id, V);
4195 end Set_Is_Known_Null;
4197 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4199 Set_Flag170 (Id, V);
4200 end Set_Is_Known_Valid;
4202 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4204 pragma Assert (Is_Type (Id));
4205 Set_Flag106 (Id, V);
4206 end Set_Is_Limited_Composite;
4208 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4210 pragma Assert (Is_Interface (Id));
4211 Set_Flag197 (Id, V);
4212 end Set_Is_Limited_Interface;
4214 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4217 end Set_Is_Limited_Record;
4219 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4221 pragma Assert (Is_Subprogram (Id));
4222 Set_Flag137 (Id, V);
4223 end Set_Is_Machine_Code_Subprogram;
4225 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4227 pragma Assert (Is_Type (Id));
4228 Set_Flag109 (Id, V);
4229 end Set_Is_Non_Static_Subtype;
4231 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4233 pragma Assert (Ekind (Id) = E_Procedure);
4234 Set_Flag178 (Id, V);
4235 end Set_Is_Null_Init_Proc;
4237 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4239 Set_Flag153 (Id, V);
4240 end Set_Is_Obsolescent;
4242 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
4244 pragma Assert (Ekind (Id) = E_Out_Parameter);
4245 Set_Flag226 (Id, V);
4246 end Set_Is_Only_Out_Parameter;
4248 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
4250 pragma Assert (Is_Formal (Id));
4251 Set_Flag134 (Id, V);
4252 end Set_Is_Optional_Parameter;
4254 procedure Set_Is_Overriding_Operation (Id : E; V : B := True) is
4256 pragma Assert (Is_Subprogram (Id));
4258 end Set_Is_Overriding_Operation;
4260 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
4262 Set_Flag160 (Id, V);
4263 end Set_Is_Package_Body_Entity;
4265 procedure Set_Is_Packed (Id : E; V : B := True) is
4267 pragma Assert (Base_Type (Id) = Id);
4271 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
4273 Set_Flag138 (Id, V);
4274 end Set_Is_Packed_Array_Type;
4276 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
4278 pragma Assert (Nkind (Id) in N_Entity);
4280 end Set_Is_Potentially_Use_Visible;
4282 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
4285 end Set_Is_Preelaborated;
4287 procedure Set_Is_Primitive (Id : E; V : B := True) is
4290 (Is_Overloadable (Id)
4291 or else Ekind (Id) = E_Generic_Function
4292 or else Ekind (Id) = E_Generic_Procedure);
4293 Set_Flag218 (Id, V);
4294 end Set_Is_Primitive;
4296 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
4298 pragma Assert (Ekind (Id) = E_Procedure);
4299 Set_Flag195 (Id, V);
4300 end Set_Is_Primitive_Wrapper;
4302 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
4304 pragma Assert (Is_Type (Id));
4305 Set_Flag107 (Id, V);
4306 end Set_Is_Private_Composite;
4308 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
4311 end Set_Is_Private_Descendant;
4313 procedure Set_Is_Protected_Interface (Id : E; V : B := True) is
4315 pragma Assert (Is_Interface (Id));
4316 Set_Flag198 (Id, V);
4317 end Set_Is_Protected_Interface;
4319 procedure Set_Is_Public (Id : E; V : B := True) is
4321 pragma Assert (Nkind (Id) in N_Entity);
4325 procedure Set_Is_Pure (Id : E; V : B := True) is
4330 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
4332 pragma Assert (Is_Access_Type (Id));
4333 Set_Flag189 (Id, V);
4334 end Set_Is_Pure_Unit_Access_Type;
4336 procedure Set_Is_Raised (Id : E; V : B := True) is
4338 pragma Assert (Ekind (Id) = E_Exception);
4339 Set_Flag224 (Id, V);
4342 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
4345 end Set_Is_Remote_Call_Interface;
4347 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
4350 end Set_Is_Remote_Types;
4352 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
4354 Set_Flag112 (Id, V);
4355 end Set_Is_Renaming_Of_Object;
4357 procedure Set_Is_Return_Object (Id : E; V : B := True) is
4359 Set_Flag209 (Id, V);
4360 end Set_Is_Return_Object;
4362 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
4365 end Set_Is_Shared_Passive;
4367 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
4370 (Ekind (Id) = E_Exception
4371 or else Ekind (Id) = E_Variable
4372 or else Ekind (Id) = E_Constant
4373 or else Is_Type (Id)
4374 or else Ekind (Id) = E_Void);
4376 end Set_Is_Statically_Allocated;
4378 procedure Set_Is_Synchronized_Interface (Id : E; V : B := True) is
4380 pragma Assert (Is_Interface (Id));
4381 Set_Flag199 (Id, V);
4382 end Set_Is_Synchronized_Interface;
4384 procedure Set_Is_Tag (Id : E; V : B := True) is
4387 (Ekind (Id) = E_Component
4388 or else Ekind (Id) = E_Constant);
4392 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
4395 end Set_Is_Tagged_Type;
4397 procedure Set_Is_Task_Interface (Id : E; V : B := True) is
4399 pragma Assert (Is_Interface (Id));
4400 Set_Flag200 (Id, V);
4401 end Set_Is_Task_Interface;
4403 procedure Set_Is_Thunk (Id : E; V : B := True) is
4405 Set_Flag225 (Id, V);
4408 procedure Set_Is_True_Constant (Id : E; V : B := True) is
4410 Set_Flag163 (Id, V);
4411 end Set_Is_True_Constant;
4413 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
4415 pragma Assert (Base_Type (Id) = Id);
4416 Set_Flag117 (Id, V);
4417 end Set_Is_Unchecked_Union;
4419 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
4421 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
4422 Set_Flag144 (Id, V);
4423 end Set_Is_Unsigned_Type;
4425 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
4427 pragma Assert (Ekind (Id) = E_Procedure);
4428 Set_Flag127 (Id, V);
4429 end Set_Is_Valued_Procedure;
4431 procedure Set_Is_Visible_Child_Unit (Id : E; V : B := True) is
4433 pragma Assert (Is_Child_Unit (Id));
4434 Set_Flag116 (Id, V);
4435 end Set_Is_Visible_Child_Unit;
4437 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
4439 Set_Flag206 (Id, V);
4440 end Set_Is_Visible_Formal;
4442 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
4444 pragma Assert (Ekind (Id) = E_Exception);
4445 Set_Flag133 (Id, V);
4446 end Set_Is_VMS_Exception;
4448 procedure Set_Is_Volatile (Id : E; V : B := True) is
4450 pragma Assert (Nkind (Id) in N_Entity);
4452 end Set_Is_Volatile;
4454 procedure Set_Itype_Printed (Id : E; V : B := True) is
4456 pragma Assert (Is_Itype (Id));
4457 Set_Flag202 (Id, V);
4458 end Set_Itype_Printed;
4460 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
4463 end Set_Kill_Elaboration_Checks;
4465 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
4468 end Set_Kill_Range_Checks;
4470 procedure Set_Kill_Tag_Checks (Id : E; V : B := True) is
4473 end Set_Kill_Tag_Checks;
4475 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
4477 pragma Assert (Is_Type (Id));
4478 Set_Flag207 (Id, V);
4479 end Set_Known_To_Have_Preelab_Init;
4481 procedure Set_Last_Assignment (Id : E; V : N) is
4483 pragma Assert (Is_Assignable (Id));
4485 end Set_Last_Assignment;
4487 procedure Set_Last_Entity (Id : E; V : E) is
4490 end Set_Last_Entity;
4492 procedure Set_Limited_View (Id : E; V : E) is
4494 pragma Assert (Ekind (Id) = E_Package);
4496 end Set_Limited_View;
4498 procedure Set_Lit_Indexes (Id : E; V : E) is
4500 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4502 end Set_Lit_Indexes;
4504 procedure Set_Lit_Strings (Id : E; V : E) is
4506 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4508 end Set_Lit_Strings;
4510 procedure Set_Low_Bound_Known (Id : E; V : B := True) is
4512 pragma Assert (Is_Formal (Id));
4513 Set_Flag205 (Id, V);
4514 end Set_Low_Bound_Known;
4516 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
4518 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4520 end Set_Machine_Radix_10;
4522 procedure Set_Master_Id (Id : E; V : E) is
4524 pragma Assert (Is_Access_Type (Id));
4528 procedure Set_Materialize_Entity (Id : E; V : B := True) is
4530 Set_Flag168 (Id, V);
4531 end Set_Materialize_Entity;
4533 procedure Set_Mechanism (Id : E; V : M) is
4535 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
4536 Set_Uint8 (Id, UI_From_Int (V));
4539 procedure Set_Modulus (Id : E; V : U) is
4541 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
4545 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
4547 pragma Assert (Is_Type (Id));
4548 Set_Flag183 (Id, V);
4549 end Set_Must_Be_On_Byte_Boundary;
4551 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
4553 pragma Assert (Is_Type (Id));
4554 Set_Flag208 (Id, V);
4555 end Set_Must_Have_Preelab_Init;
4557 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
4559 Set_Flag147 (Id, V);
4560 end Set_Needs_Debug_Info;
4562 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
4565 (Is_Overloadable (Id)
4566 or else Ekind (Id) = E_Subprogram_Type
4567 or else Ekind (Id) = E_Entry_Family);
4569 end Set_Needs_No_Actuals;
4571 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
4573 Set_Flag115 (Id, V);
4574 end Set_Never_Set_In_Source;
4576 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
4579 end Set_Next_Inlined_Subprogram;
4581 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
4583 pragma Assert (Is_Access_Type (Id) and then Base_Type (Id) = Id);
4584 Set_Flag131 (Id, V);
4585 end Set_No_Pool_Assigned;
4587 procedure Set_No_Return (Id : E; V : B := True) is
4591 or else Ekind (Id) = E_Procedure
4592 or else Ekind (Id) = E_Generic_Procedure);
4593 Set_Flag113 (Id, V);
4596 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
4598 pragma Assert (Is_Access_Type (Id) and then Base_Type (Id) = Id);
4599 Set_Flag136 (Id, V);
4600 end Set_No_Strict_Aliasing;
4602 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
4604 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
4606 end Set_Non_Binary_Modulus;
4608 procedure Set_Non_Limited_View (Id : E; V : E) is
4610 pragma Assert (Ekind (Id) in Incomplete_Kind);
4612 end Set_Non_Limited_View;
4614 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
4617 (Root_Type (Id) = Standard_Boolean
4618 and then Ekind (Id) = E_Enumeration_Type);
4619 Set_Flag162 (Id, V);
4620 end Set_Nonzero_Is_True;
4622 procedure Set_Normalized_First_Bit (Id : E; V : U) is
4625 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
4627 end Set_Normalized_First_Bit;
4629 procedure Set_Normalized_Position (Id : E; V : U) is
4632 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
4634 end Set_Normalized_Position;
4636 procedure Set_Normalized_Position_Max (Id : E; V : U) is
4639 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
4641 end Set_Normalized_Position_Max;
4643 procedure Set_Object_Ref (Id : E; V : E) is
4645 pragma Assert (Ekind (Id) = E_Protected_Body);
4649 procedure Set_Obsolescent_Warning (Id : E; V : N) is
4652 end Set_Obsolescent_Warning;
4654 procedure Set_Original_Array_Type (Id : E; V : E) is
4656 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
4658 end Set_Original_Array_Type;
4660 procedure Set_Original_Record_Component (Id : E; V : E) is
4663 (Ekind (Id) = E_Void
4664 or else Ekind (Id) = E_Component
4665 or else Ekind (Id) = E_Discriminant);
4667 end Set_Original_Record_Component;
4669 procedure Set_Overridden_Operation (Id : E; V : E) is
4672 end Set_Overridden_Operation;
4674 procedure Set_Package_Instantiation (Id : E; V : N) is
4677 (Ekind (Id) = E_Void
4678 or else Ekind (Id) = E_Generic_Package
4679 or else Ekind (Id) = E_Package);
4681 end Set_Package_Instantiation;
4683 procedure Set_Packed_Array_Type (Id : E; V : E) is
4685 pragma Assert (Is_Array_Type (Id));
4687 end Set_Packed_Array_Type;
4689 procedure Set_Parent_Subtype (Id : E; V : E) is
4691 pragma Assert (Ekind (Id) = E_Record_Type);
4693 end Set_Parent_Subtype;
4695 procedure Set_Primitive_Operations (Id : E; V : L) is
4697 pragma Assert (Is_Tagged_Type (Id));
4698 Set_Elist15 (Id, V);
4699 end Set_Primitive_Operations;
4701 procedure Set_Prival (Id : E; V : E) is
4703 pragma Assert (Is_Protected_Private (Id));
4707 procedure Set_Privals_Chain (Id : E; V : L) is
4709 pragma Assert (Is_Overloadable (Id)
4710 or else Ekind (Id) = E_Entry_Family);
4711 Set_Elist23 (Id, V);
4712 end Set_Privals_Chain;
4714 procedure Set_Private_Dependents (Id : E; V : L) is
4716 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
4717 Set_Elist18 (Id, V);
4718 end Set_Private_Dependents;
4720 procedure Set_Private_View (Id : E; V : N) is
4722 pragma Assert (Is_Private_Type (Id));
4724 end Set_Private_View;
4726 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
4728 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
4730 end Set_Protected_Body_Subprogram;
4732 procedure Set_Protected_Formal (Id : E; V : E) is
4734 pragma Assert (Is_Formal (Id));
4736 end Set_Protected_Formal;
4738 procedure Set_Protected_Operation (Id : E; V : N) is
4740 pragma Assert (Is_Protected_Private (Id));
4742 end Set_Protected_Operation;
4744 procedure Set_Reachable (Id : E; V : B := True) is
4749 procedure Set_Referenced (Id : E; V : B := True) is
4751 Set_Flag156 (Id, V);
4754 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
4757 end Set_Referenced_As_LHS;
4759 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
4761 Set_Flag227 (Id, V);
4762 end Set_Referenced_As_Out_Parameter;
4764 procedure Set_Referenced_Object (Id : E; V : N) is
4766 pragma Assert (Is_Type (Id));
4768 end Set_Referenced_Object;
4770 procedure Set_Register_Exception_Call (Id : E; V : N) is
4772 pragma Assert (Ekind (Id) = E_Exception);
4774 end Set_Register_Exception_Call;
4776 procedure Set_Related_Array_Object (Id : E; V : E) is
4778 pragma Assert (Is_Array_Type (Id));
4780 end Set_Related_Array_Object;
4782 procedure Set_Related_Instance (Id : E; V : E) is
4785 (Ekind (Id) = E_Package or else Ekind (Id) = E_Package_Body);
4787 end Set_Related_Instance;
4789 procedure Set_Related_Type (Id : E; V : E) is
4792 (Ekind (Id) = E_Component or else Ekind (Id) = E_Constant);
4794 end Set_Related_Type;
4796 procedure Set_Renamed_Entity (Id : E; V : N) is
4799 end Set_Renamed_Entity;
4801 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
4803 pragma Assert (Ekind (Id) = E_Package);
4804 Set_Flag231 (Id, V);
4805 end Set_Renamed_In_Spec;
4807 procedure Set_Renamed_Object (Id : E; V : N) is
4810 end Set_Renamed_Object;
4812 procedure Set_Renaming_Map (Id : E; V : U) is
4815 end Set_Renaming_Map;
4817 procedure Set_Requires_Overriding (Id : E; V : B := True) is
4819 pragma Assert (Is_Overloadable (Id));
4820 Set_Flag213 (Id, V);
4821 end Set_Requires_Overriding;
4823 procedure Set_Return_Present (Id : E; V : B := True) is
4826 end Set_Return_Present;
4828 procedure Set_Return_Applies_To (Id : E; V : N) is
4831 end Set_Return_Applies_To;
4833 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
4836 end Set_Returns_By_Ref;
4838 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
4841 (Is_Record_Type (Id) and then Id = Base_Type (Id));
4842 Set_Flag164 (Id, V);
4843 end Set_Reverse_Bit_Order;
4845 procedure Set_RM_Size (Id : E; V : U) is
4847 pragma Assert (Is_Type (Id));
4851 procedure Set_Scalar_Range (Id : E; V : N) is
4854 end Set_Scalar_Range;
4856 procedure Set_Scale_Value (Id : E; V : U) is
4859 end Set_Scale_Value;
4861 procedure Set_Scope_Depth_Value (Id : E; V : U) is
4863 pragma Assert (not Is_Record_Type (Id));
4865 end Set_Scope_Depth_Value;
4867 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
4869 Set_Flag167 (Id, V);
4870 end Set_Sec_Stack_Needed_For_Return;
4872 procedure Set_Shadow_Entities (Id : E; V : S) is
4875 (Ekind (Id) = E_Package or else Ekind (Id) = E_Generic_Package);
4877 end Set_Shadow_Entities;
4879 procedure Set_Shared_Var_Assign_Proc (Id : E; V : E) is
4881 pragma Assert (Ekind (Id) = E_Variable);
4883 end Set_Shared_Var_Assign_Proc;
4885 procedure Set_Shared_Var_Read_Proc (Id : E; V : E) is
4887 pragma Assert (Ekind (Id) = E_Variable);
4889 end Set_Shared_Var_Read_Proc;
4891 procedure Set_Size_Check_Code (Id : E; V : N) is
4893 pragma Assert (Ekind (Id) = E_Constant or else Ekind (Id) = E_Variable);
4895 end Set_Size_Check_Code;
4897 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
4899 Set_Flag177 (Id, V);
4900 end Set_Size_Depends_On_Discriminant;
4902 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
4905 end Set_Size_Known_At_Compile_Time;
4907 procedure Set_Small_Value (Id : E; V : R) is
4909 pragma Assert (Is_Fixed_Point_Type (Id));
4910 Set_Ureal21 (Id, V);
4911 end Set_Small_Value;
4913 procedure Set_Spec_Entity (Id : E; V : E) is
4915 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
4917 end Set_Spec_Entity;
4919 procedure Set_Storage_Size_Variable (Id : E; V : E) is
4921 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4922 pragma Assert (Base_Type (Id) = Id);
4924 end Set_Storage_Size_Variable;
4926 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
4928 pragma Assert (Ekind (Id) = E_Package);
4930 end Set_Static_Elaboration_Desired;
4932 procedure Set_Static_Initialization (Id : E; V : N) is
4935 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
4937 end Set_Static_Initialization;
4939 procedure Set_Stored_Constraint (Id : E; V : L) is
4941 pragma Assert (Nkind (Id) in N_Entity);
4942 Set_Elist23 (Id, V);
4943 end Set_Stored_Constraint;
4945 procedure Set_Strict_Alignment (Id : E; V : B := True) is
4947 pragma Assert (Base_Type (Id) = Id);
4948 Set_Flag145 (Id, V);
4949 end Set_Strict_Alignment;
4951 procedure Set_String_Literal_Length (Id : E; V : U) is
4953 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
4955 end Set_String_Literal_Length;
4957 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
4959 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
4961 end Set_String_Literal_Low_Bound;
4963 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
4965 Set_Flag148 (Id, V);
4966 end Set_Suppress_Elaboration_Warnings;
4968 procedure Set_Suppress_Init_Proc (Id : E; V : B := True) is
4970 pragma Assert (Id = Base_Type (Id));
4971 Set_Flag105 (Id, V);
4972 end Set_Suppress_Init_Proc;
4974 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
4976 Set_Flag165 (Id, V);
4977 end Set_Suppress_Style_Checks;
4979 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
4981 Set_Flag217 (Id, V);
4982 end Set_Suppress_Value_Tracking_On_Call;
4984 procedure Set_Task_Body_Procedure (Id : E; V : N) is
4986 pragma Assert (Ekind (Id) in Task_Kind);
4988 end Set_Task_Body_Procedure;
4990 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
4993 end Set_Treat_As_Volatile;
4995 procedure Set_Underlying_Full_View (Id : E; V : E) is
4997 pragma Assert (Ekind (Id) in Private_Kind);
4999 end Set_Underlying_Full_View;
5001 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5003 pragma Assert (Is_Type (Id) and then Base_Type (Id) = Id);
5004 Set_Flag216 (Id, V);
5005 end Set_Universal_Aliasing;
5007 procedure Set_Unset_Reference (Id : E; V : N) is
5010 end Set_Unset_Reference;
5012 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5015 end Set_Uses_Sec_Stack;
5017 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5019 Set_Flag222 (Id, V);
5020 end Set_Used_As_Generic_Actual;
5022 procedure Set_Vax_Float (Id : E; V : B := True) is
5024 pragma Assert (Id = Base_Type (Id));
5025 Set_Flag151 (Id, V);
5028 procedure Set_Warnings_Off (Id : E; V : B := True) is
5031 end Set_Warnings_Off;
5033 procedure Set_Was_Hidden (Id : E; V : B := True) is
5035 Set_Flag196 (Id, V);
5038 procedure Set_Wrapped_Entity (Id : E; V : E) is
5040 pragma Assert (Ekind (Id) = E_Procedure
5041 and then Is_Primitive_Wrapper (Id));
5043 end Set_Wrapped_Entity;
5045 -----------------------------------
5046 -- Field Initialization Routines --
5047 -----------------------------------
5049 procedure Init_Alignment (Id : E) is
5051 Set_Uint14 (Id, Uint_0);
5054 procedure Init_Alignment (Id : E; V : Int) is
5056 Set_Uint14 (Id, UI_From_Int (V));
5059 procedure Init_Component_Bit_Offset (Id : E) is
5061 Set_Uint11 (Id, No_Uint);
5062 end Init_Component_Bit_Offset;
5064 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
5066 Set_Uint11 (Id, UI_From_Int (V));
5067 end Init_Component_Bit_Offset;
5069 procedure Init_Component_Size (Id : E) is
5071 Set_Uint22 (Id, Uint_0);
5072 end Init_Component_Size;
5074 procedure Init_Component_Size (Id : E; V : Int) is
5076 Set_Uint22 (Id, UI_From_Int (V));
5077 end Init_Component_Size;
5079 procedure Init_Digits_Value (Id : E) is
5081 Set_Uint17 (Id, Uint_0);
5082 end Init_Digits_Value;
5084 procedure Init_Digits_Value (Id : E; V : Int) is
5086 Set_Uint17 (Id, UI_From_Int (V));
5087 end Init_Digits_Value;
5089 procedure Init_Esize (Id : E) is
5091 Set_Uint12 (Id, Uint_0);
5094 procedure Init_Esize (Id : E; V : Int) is
5096 Set_Uint12 (Id, UI_From_Int (V));
5099 procedure Init_Normalized_First_Bit (Id : E) is
5101 Set_Uint8 (Id, No_Uint);
5102 end Init_Normalized_First_Bit;
5104 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
5106 Set_Uint8 (Id, UI_From_Int (V));
5107 end Init_Normalized_First_Bit;
5109 procedure Init_Normalized_Position (Id : E) is
5111 Set_Uint14 (Id, No_Uint);
5112 end Init_Normalized_Position;
5114 procedure Init_Normalized_Position (Id : E; V : Int) is
5116 Set_Uint14 (Id, UI_From_Int (V));
5117 end Init_Normalized_Position;
5119 procedure Init_Normalized_Position_Max (Id : E) is
5121 Set_Uint10 (Id, No_Uint);
5122 end Init_Normalized_Position_Max;
5124 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
5126 Set_Uint10 (Id, UI_From_Int (V));
5127 end Init_Normalized_Position_Max;
5129 procedure Init_RM_Size (Id : E) is
5131 Set_Uint13 (Id, Uint_0);
5134 procedure Init_RM_Size (Id : E; V : Int) is
5136 Set_Uint13 (Id, UI_From_Int (V));
5139 -----------------------------
5140 -- Init_Component_Location --
5141 -----------------------------
5143 procedure Init_Component_Location (Id : E) is
5145 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
5146 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
5147 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
5148 Set_Uint12 (Id, Uint_0); -- Esize
5149 Set_Uint14 (Id, No_Uint); -- Normalized_Position
5150 end Init_Component_Location;
5156 procedure Init_Size (Id : E; V : Int) is
5158 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
5159 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
5162 ---------------------
5163 -- Init_Size_Align --
5164 ---------------------
5166 procedure Init_Size_Align (Id : E) is
5168 Set_Uint12 (Id, Uint_0); -- Esize
5169 Set_Uint13 (Id, Uint_0); -- RM_Size
5170 Set_Uint14 (Id, Uint_0); -- Alignment
5171 end Init_Size_Align;
5173 ----------------------------------------------
5174 -- Type Representation Attribute Predicates --
5175 ----------------------------------------------
5177 function Known_Alignment (E : Entity_Id) return B is
5179 return Uint14 (E) /= Uint_0
5180 and then Uint14 (E) /= No_Uint;
5181 end Known_Alignment;
5183 function Known_Component_Bit_Offset (E : Entity_Id) return B is
5185 return Uint11 (E) /= No_Uint;
5186 end Known_Component_Bit_Offset;
5188 function Known_Component_Size (E : Entity_Id) return B is
5190 return Uint22 (Base_Type (E)) /= Uint_0
5191 and then Uint22 (Base_Type (E)) /= No_Uint;
5192 end Known_Component_Size;
5194 function Known_Esize (E : Entity_Id) return B is
5196 return Uint12 (E) /= Uint_0
5197 and then Uint12 (E) /= No_Uint;
5200 function Known_Normalized_First_Bit (E : Entity_Id) return B is
5202 return Uint8 (E) /= No_Uint;
5203 end Known_Normalized_First_Bit;
5205 function Known_Normalized_Position (E : Entity_Id) return B is
5207 return Uint14 (E) /= No_Uint;
5208 end Known_Normalized_Position;
5210 function Known_Normalized_Position_Max (E : Entity_Id) return B is
5212 return Uint10 (E) /= No_Uint;
5213 end Known_Normalized_Position_Max;
5215 function Known_RM_Size (E : Entity_Id) return B is
5217 return Uint13 (E) /= No_Uint
5218 and then (Uint13 (E) /= Uint_0
5219 or else Is_Discrete_Type (E)
5220 or else Is_Fixed_Point_Type (E));
5223 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
5225 return Uint11 (E) /= No_Uint
5226 and then Uint11 (E) >= Uint_0;
5227 end Known_Static_Component_Bit_Offset;
5229 function Known_Static_Component_Size (E : Entity_Id) return B is
5231 return Uint22 (Base_Type (E)) > Uint_0;
5232 end Known_Static_Component_Size;
5234 function Known_Static_Esize (E : Entity_Id) return B is
5236 return Uint12 (E) > Uint_0;
5237 end Known_Static_Esize;
5239 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
5241 return Uint8 (E) /= No_Uint
5242 and then Uint8 (E) >= Uint_0;
5243 end Known_Static_Normalized_First_Bit;
5245 function Known_Static_Normalized_Position (E : Entity_Id) return B is
5247 return Uint14 (E) /= No_Uint
5248 and then Uint14 (E) >= Uint_0;
5249 end Known_Static_Normalized_Position;
5251 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
5253 return Uint10 (E) /= No_Uint
5254 and then Uint10 (E) >= Uint_0;
5255 end Known_Static_Normalized_Position_Max;
5257 function Known_Static_RM_Size (E : Entity_Id) return B is
5259 return Uint13 (E) > Uint_0
5260 or else Is_Discrete_Type (E)
5261 or else Is_Fixed_Point_Type (E);
5262 end Known_Static_RM_Size;
5264 function Unknown_Alignment (E : Entity_Id) return B is
5266 return Uint14 (E) = Uint_0
5267 or else Uint14 (E) = No_Uint;
5268 end Unknown_Alignment;
5270 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
5272 return Uint11 (E) = No_Uint;
5273 end Unknown_Component_Bit_Offset;
5275 function Unknown_Component_Size (E : Entity_Id) return B is
5277 return Uint22 (Base_Type (E)) = Uint_0
5279 Uint22 (Base_Type (E)) = No_Uint;
5280 end Unknown_Component_Size;
5282 function Unknown_Esize (E : Entity_Id) return B is
5284 return Uint12 (E) = No_Uint
5286 Uint12 (E) = Uint_0;
5289 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
5291 return Uint8 (E) = No_Uint;
5292 end Unknown_Normalized_First_Bit;
5294 function Unknown_Normalized_Position (E : Entity_Id) return B is
5296 return Uint14 (E) = No_Uint;
5297 end Unknown_Normalized_Position;
5299 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
5301 return Uint10 (E) = No_Uint;
5302 end Unknown_Normalized_Position_Max;
5304 function Unknown_RM_Size (E : Entity_Id) return B is
5306 return (Uint13 (E) = Uint_0
5307 and then not Is_Discrete_Type (E)
5308 and then not Is_Fixed_Point_Type (E))
5309 or else Uint13 (E) = No_Uint;
5310 end Unknown_RM_Size;
5312 --------------------
5313 -- Address_Clause --
5314 --------------------
5316 function Address_Clause (Id : E) return N is
5318 return Rep_Clause (Id, Name_Address);
5321 ----------------------
5322 -- Alignment_Clause --
5323 ----------------------
5325 function Alignment_Clause (Id : E) return N is
5327 return Rep_Clause (Id, Name_Alignment);
5328 end Alignment_Clause;
5330 ----------------------
5331 -- Ancestor_Subtype --
5332 ----------------------
5334 function Ancestor_Subtype (Id : E) return E is
5336 -- If this is first subtype, or is a base type, then there is no
5337 -- ancestor subtype, so we return Empty to indicate this fact.
5339 if Is_First_Subtype (Id) or else Id = Base_Type (Id) then
5344 D : constant Node_Id := Declaration_Node (Id);
5347 -- If we have a subtype declaration, get the ancestor subtype
5349 if Nkind (D) = N_Subtype_Declaration then
5350 if Nkind (Subtype_Indication (D)) = N_Subtype_Indication then
5351 return Entity (Subtype_Mark (Subtype_Indication (D)));
5353 return Entity (Subtype_Indication (D));
5356 -- If not, then no subtype indication is available
5362 end Ancestor_Subtype;
5368 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
5370 if Last_Entity (V) = Empty then
5371 Set_First_Entity (V, Id);
5373 Set_Next_Entity (Last_Entity (V), Id);
5376 Set_Next_Entity (Id, Empty);
5378 Set_Last_Entity (V, Id);
5381 --------------------
5382 -- Available_View --
5383 --------------------
5385 function Available_View (Id : E) return E is
5387 if Is_Incomplete_Type (Id)
5388 and then Present (Non_Limited_View (Id))
5390 -- The non-limited view may itself be an incomplete type, in
5391 -- which case get its full view.
5393 return Get_Full_View (Non_Limited_View (Id));
5395 elsif Is_Class_Wide_Type (Id)
5396 and then Is_Incomplete_Type (Etype (Id))
5397 and then Present (Non_Limited_View (Etype (Id)))
5399 return Class_Wide_Type (Non_Limited_View (Etype (Id)));
5410 function Base_Type (Id : E) return E is
5413 when E_Enumeration_Subtype |
5415 E_Signed_Integer_Subtype |
5416 E_Modular_Integer_Subtype |
5417 E_Floating_Point_Subtype |
5418 E_Ordinary_Fixed_Point_Subtype |
5419 E_Decimal_Fixed_Point_Subtype |
5424 E_Record_Subtype_With_Private |
5425 E_Limited_Private_Subtype |
5427 E_Protected_Subtype |
5429 E_String_Literal_Subtype |
5430 E_Class_Wide_Subtype =>
5438 -------------------------
5439 -- Component_Alignment --
5440 -------------------------
5442 -- Component Alignment is encoded using two flags, Flag128/129 as
5443 -- follows. Note that both flags False = Align_Default, so that the
5444 -- default initialization of flags to False initializes component
5445 -- alignment to the default value as required.
5447 -- Flag128 Flag129 Value
5448 -- ------- ------- -----
5449 -- False False Calign_Default
5450 -- False True Calign_Component_Size
5451 -- True False Calign_Component_Size_4
5452 -- True True Calign_Storage_Unit
5454 function Component_Alignment (Id : E) return C is
5455 BT : constant Node_Id := Base_Type (Id);
5458 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
5460 if Flag128 (BT) then
5461 if Flag129 (BT) then
5462 return Calign_Storage_Unit;
5464 return Calign_Component_Size_4;
5468 if Flag129 (BT) then
5469 return Calign_Component_Size;
5471 return Calign_Default;
5474 end Component_Alignment;
5476 --------------------
5477 -- Constant_Value --
5478 --------------------
5480 function Constant_Value (Id : E) return N is
5481 D : constant Node_Id := Declaration_Node (Id);
5485 -- If we have no declaration node, then return no constant value.
5486 -- Not clear how this can happen, but it does sometimes ???
5487 -- To investigate, remove this check and compile discrim_po.adb.
5492 -- Normal case where a declaration node is present
5494 elsif Nkind (D) = N_Object_Renaming_Declaration then
5495 return Renamed_Object (Id);
5497 -- If this is a component declaration whose entity is constant, it
5498 -- is a prival within a protected function. It does not have
5499 -- a constant value.
5501 elsif Nkind (D) = N_Component_Declaration then
5504 -- If there is an expression, return it
5506 elsif Present (Expression (D)) then
5507 return (Expression (D));
5509 -- For a constant, see if we have a full view
5511 elsif Ekind (Id) = E_Constant
5512 and then Present (Full_View (Id))
5514 Full_D := Parent (Full_View (Id));
5516 -- The full view may have been rewritten as an object renaming
5518 if Nkind (Full_D) = N_Object_Renaming_Declaration then
5519 return Name (Full_D);
5521 return Expression (Full_D);
5524 -- Otherwise we have no expression to return
5531 ----------------------
5532 -- Declaration_Node --
5533 ----------------------
5535 function Declaration_Node (Id : E) return N is
5539 if Ekind (Id) = E_Incomplete_Type
5540 and then Present (Full_View (Id))
5542 P := Parent (Full_View (Id));
5548 if Nkind (P) /= N_Selected_Component
5549 and then Nkind (P) /= N_Expanded_Name
5551 not (Nkind (P) = N_Defining_Program_Unit_Name
5552 and then Is_Child_Unit (Id))
5559 end Declaration_Node;
5561 ---------------------
5562 -- Designated_Type --
5563 ---------------------
5565 function Designated_Type (Id : E) return E is
5569 Desig_Type := Directly_Designated_Type (Id);
5571 if Ekind (Desig_Type) = E_Incomplete_Type
5572 and then Present (Full_View (Desig_Type))
5574 return Full_View (Desig_Type);
5576 elsif Is_Class_Wide_Type (Desig_Type)
5577 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
5578 and then Present (Full_View (Etype (Desig_Type)))
5579 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
5581 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
5586 end Designated_Type;
5588 -----------------------------
5589 -- Enclosing_Dynamic_Scope --
5590 -----------------------------
5592 function Enclosing_Dynamic_Scope (Id : E) return E is
5596 -- The following test is an error defense against some syntax
5597 -- errors that can leave scopes very messed up.
5599 if Id = Standard_Standard then
5603 -- Normal case, search enclosing scopes
5605 -- Note: the test for Present (S) should not be required, it is a
5606 -- defence against an ill-formed tree.
5610 -- If we somehow got an empty value for Scope, the tree must be
5611 -- malformed. Rather than blow up we return Standard in this case.
5614 return Standard_Standard;
5616 -- Quit if we get to standard or a dynamic scope
5618 elsif S = Standard_Standard
5619 or else Is_Dynamic_Scope (S)
5623 -- Otherwise keep climbing
5631 end Enclosing_Dynamic_Scope;
5633 ----------------------
5634 -- Entry_Index_Type --
5635 ----------------------
5637 function Entry_Index_Type (Id : E) return N is
5639 pragma Assert (Ekind (Id) = E_Entry_Family);
5640 return Etype (Discrete_Subtype_Definition (Parent (Id)));
5641 end Entry_Index_Type;
5643 ---------------------
5644 -- First_Component --
5645 ---------------------
5647 function First_Component (Id : E) return E is
5652 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5654 Comp_Id := First_Entity (Id);
5655 while Present (Comp_Id) loop
5656 exit when Ekind (Comp_Id) = E_Component;
5657 Comp_Id := Next_Entity (Comp_Id);
5661 end First_Component;
5663 -------------------------------------
5664 -- First_Component_Or_Discriminant --
5665 -------------------------------------
5667 function First_Component_Or_Discriminant (Id : E) return E is
5672 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5674 Comp_Id := First_Entity (Id);
5675 while Present (Comp_Id) loop
5676 exit when Ekind (Comp_Id) = E_Component
5678 Ekind (Comp_Id) = E_Discriminant;
5679 Comp_Id := Next_Entity (Comp_Id);
5683 end First_Component_Or_Discriminant;
5685 ------------------------
5686 -- First_Discriminant --
5687 ------------------------
5689 function First_Discriminant (Id : E) return E is
5694 (Has_Discriminants (Id)
5695 or else Has_Unknown_Discriminants (Id));
5697 Ent := First_Entity (Id);
5699 -- The discriminants are not necessarily contiguous, because access
5700 -- discriminants will generate itypes. They are not the first entities
5701 -- either, because tag and controller record must be ahead of them.
5703 if Chars (Ent) = Name_uTag then
5704 Ent := Next_Entity (Ent);
5707 if Chars (Ent) = Name_uController then
5708 Ent := Next_Entity (Ent);
5711 -- Skip all hidden stored discriminants if any
5713 while Present (Ent) loop
5714 exit when Ekind (Ent) = E_Discriminant
5715 and then not Is_Completely_Hidden (Ent);
5717 Ent := Next_Entity (Ent);
5720 pragma Assert (Ekind (Ent) = E_Discriminant);
5723 end First_Discriminant;
5729 function First_Formal (Id : E) return E is
5734 (Is_Overloadable (Id)
5735 or else Ekind (Id) = E_Entry_Family
5736 or else Ekind (Id) = E_Subprogram_Body
5737 or else Ekind (Id) = E_Subprogram_Type);
5739 if Ekind (Id) = E_Enumeration_Literal then
5743 Formal := First_Entity (Id);
5745 if Present (Formal) and then Is_Formal (Formal) then
5753 ------------------------------
5754 -- First_Formal_With_Extras --
5755 ------------------------------
5757 function First_Formal_With_Extras (Id : E) return E is
5762 (Is_Overloadable (Id)
5763 or else Ekind (Id) = E_Entry_Family
5764 or else Ekind (Id) = E_Subprogram_Body
5765 or else Ekind (Id) = E_Subprogram_Type);
5767 if Ekind (Id) = E_Enumeration_Literal then
5771 Formal := First_Entity (Id);
5773 if Present (Formal) and then Is_Formal (Formal) then
5776 return Extra_Formals (Id); -- Empty if no extra formals
5779 end First_Formal_With_Extras;
5781 -------------------------------
5782 -- First_Stored_Discriminant --
5783 -------------------------------
5785 function First_Stored_Discriminant (Id : E) return E is
5788 function Has_Completely_Hidden_Discriminant (Id : E) return Boolean;
5789 -- Scans the Discriminants to see whether any are Completely_Hidden
5790 -- (the mechanism for describing non-specified stored discriminants)
5792 ----------------------------------------
5793 -- Has_Completely_Hidden_Discriminant --
5794 ----------------------------------------
5796 function Has_Completely_Hidden_Discriminant (Id : E) return Boolean is
5797 Ent : Entity_Id := Id;
5800 pragma Assert (Ekind (Id) = E_Discriminant);
5802 while Present (Ent) and then Ekind (Ent) = E_Discriminant loop
5803 if Is_Completely_Hidden (Ent) then
5807 Ent := Next_Entity (Ent);
5811 end Has_Completely_Hidden_Discriminant;
5813 -- Start of processing for First_Stored_Discriminant
5817 (Has_Discriminants (Id)
5818 or else Has_Unknown_Discriminants (Id));
5820 Ent := First_Entity (Id);
5822 if Chars (Ent) = Name_uTag then
5823 Ent := Next_Entity (Ent);
5826 if Chars (Ent) = Name_uController then
5827 Ent := Next_Entity (Ent);
5830 if Has_Completely_Hidden_Discriminant (Ent) then
5832 while Present (Ent) loop
5833 exit when Is_Completely_Hidden (Ent);
5834 Ent := Next_Entity (Ent);
5839 pragma Assert (Ekind (Ent) = E_Discriminant);
5842 end First_Stored_Discriminant;
5848 function First_Subtype (Id : E) return E is
5849 B : constant Entity_Id := Base_Type (Id);
5850 F : constant Node_Id := Freeze_Node (B);
5854 -- If the base type has no freeze node, it is a type in standard,
5855 -- and always acts as its own first subtype unless it is one of
5856 -- the predefined integer types. If the type is formal, it is also
5857 -- a first subtype, and its base type has no freeze node. On the other
5858 -- hand, a subtype of a generic formal is not its own first_subtype.
5859 -- Its base type, if anonymous, is attached to the formal type decl.
5860 -- from which the first subtype is obtained.
5864 if B = Base_Type (Standard_Integer) then
5865 return Standard_Integer;
5867 elsif B = Base_Type (Standard_Long_Integer) then
5868 return Standard_Long_Integer;
5870 elsif B = Base_Type (Standard_Short_Short_Integer) then
5871 return Standard_Short_Short_Integer;
5873 elsif B = Base_Type (Standard_Short_Integer) then
5874 return Standard_Short_Integer;
5876 elsif B = Base_Type (Standard_Long_Long_Integer) then
5877 return Standard_Long_Long_Integer;
5879 elsif Is_Generic_Type (Id) then
5880 if Present (Parent (B)) then
5881 return Defining_Identifier (Parent (B));
5883 return Defining_Identifier (Associated_Node_For_Itype (B));
5890 -- Otherwise we check the freeze node, if it has a First_Subtype_Link
5891 -- then we use that link, otherwise (happens with some Itypes), we use
5892 -- the base type itself.
5895 Ent := First_Subtype_Link (F);
5897 if Present (Ent) then
5905 -------------------------------------
5906 -- Get_Attribute_Definition_Clause --
5907 -------------------------------------
5909 function Get_Attribute_Definition_Clause
5911 Id : Attribute_Id) return Node_Id
5916 N := First_Rep_Item (E);
5917 while Present (N) loop
5918 if Nkind (N) = N_Attribute_Definition_Clause
5919 and then Get_Attribute_Id (Chars (N)) = Id
5928 end Get_Attribute_Definition_Clause;
5934 function Get_Full_View (T : Entity_Id) return Entity_Id is
5936 if Ekind (T) = E_Incomplete_Type
5937 and then Present (Full_View (T))
5939 return Full_View (T);
5941 elsif Is_Class_Wide_Type (T)
5942 and then Ekind (Root_Type (T)) = E_Incomplete_Type
5943 and then Present (Full_View (Root_Type (T)))
5945 return Class_Wide_Type (Full_View (Root_Type (T)));
5952 --------------------
5953 -- Get_Rep_Pragma --
5954 --------------------
5956 function Get_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Node_Id is
5960 N := First_Rep_Item (E);
5961 while Present (N) loop
5962 if Nkind (N) = N_Pragma and then Chars (N) = Nam then
5972 ------------------------
5973 -- Has_Attach_Handler --
5974 ------------------------
5976 function Has_Attach_Handler (Id : E) return B is
5980 pragma Assert (Is_Protected_Type (Id));
5982 Ritem := First_Rep_Item (Id);
5983 while Present (Ritem) loop
5984 if Nkind (Ritem) = N_Pragma
5985 and then Chars (Ritem) = Name_Attach_Handler
5989 Ritem := Next_Rep_Item (Ritem);
5994 end Has_Attach_Handler;
5996 -------------------------------------
5997 -- Has_Attribute_Definition_Clause --
5998 -------------------------------------
6000 function Has_Attribute_Definition_Clause
6002 Id : Attribute_Id) return Boolean
6005 return Present (Get_Attribute_Definition_Clause (E, Id));
6006 end Has_Attribute_Definition_Clause;
6012 function Has_Entries (Id : E) return B is
6013 Result : Boolean := False;
6017 pragma Assert (Is_Concurrent_Type (Id));
6019 Ent := First_Entity (Id);
6020 while Present (Ent) loop
6021 if Is_Entry (Ent) then
6026 Ent := Next_Entity (Ent);
6032 ----------------------------
6033 -- Has_Foreign_Convention --
6034 ----------------------------
6036 function Has_Foreign_Convention (Id : E) return B is
6038 return Convention (Id) in Foreign_Convention;
6039 end Has_Foreign_Convention;
6041 ---------------------------
6042 -- Has_Interrupt_Handler --
6043 ---------------------------
6045 function Has_Interrupt_Handler (Id : E) return B is
6049 pragma Assert (Is_Protected_Type (Id));
6051 Ritem := First_Rep_Item (Id);
6052 while Present (Ritem) loop
6053 if Nkind (Ritem) = N_Pragma
6054 and then Chars (Ritem) = Name_Interrupt_Handler
6058 Ritem := Next_Rep_Item (Ritem);
6063 end Has_Interrupt_Handler;
6065 --------------------------
6066 -- Has_Private_Ancestor --
6067 --------------------------
6069 function Has_Private_Ancestor (Id : E) return B is
6070 R : constant Entity_Id := Root_Type (Id);
6071 T1 : Entity_Id := Id;
6075 if Is_Private_Type (T1) then
6085 end Has_Private_Ancestor;
6087 --------------------
6088 -- Has_Rep_Pragma --
6089 --------------------
6091 function Has_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Boolean is
6093 return Present (Get_Rep_Pragma (E, Nam));
6096 ------------------------------
6097 -- Implementation_Base_Type --
6098 ------------------------------
6100 function Implementation_Base_Type (Id : E) return E is
6105 Bastyp := Base_Type (Id);
6107 if Is_Incomplete_Or_Private_Type (Bastyp) then
6108 Imptyp := Underlying_Type (Bastyp);
6110 -- If we have an implementation type, then just return it,
6111 -- otherwise we return the Base_Type anyway. This can only
6112 -- happen in error situations and should avoid some error bombs.
6114 if Present (Imptyp) then
6115 return Base_Type (Imptyp);
6123 end Implementation_Base_Type;
6125 ---------------------
6126 -- Is_Boolean_Type --
6127 ---------------------
6129 function Is_Boolean_Type (Id : E) return B is
6131 return Root_Type (Id) = Standard_Boolean;
6132 end Is_Boolean_Type;
6134 ---------------------
6135 -- Is_By_Copy_Type --
6136 ---------------------
6138 function Is_By_Copy_Type (Id : E) return B is
6140 -- If Id is a private type whose full declaration has not been seen,
6141 -- we assume for now that it is not a By_Copy type. Clearly this
6142 -- attribute should not be used before the type is frozen, but it is
6143 -- needed to build the associated record of a protected type. Another
6144 -- place where some lookahead for a full view is needed ???
6147 Is_Elementary_Type (Id)
6148 or else (Is_Private_Type (Id)
6149 and then Present (Underlying_Type (Id))
6150 and then Is_Elementary_Type (Underlying_Type (Id)));
6151 end Is_By_Copy_Type;
6153 --------------------------
6154 -- Is_By_Reference_Type --
6155 --------------------------
6157 -- This function knows too much semantics, it should be in sem_util ???
6159 function Is_By_Reference_Type (Id : E) return B is
6160 Btype : constant Entity_Id := Base_Type (Id);
6163 if Error_Posted (Id)
6164 or else Error_Posted (Btype)
6168 elsif Is_Private_Type (Btype) then
6170 Utyp : constant Entity_Id := Underlying_Type (Btype);
6175 return Is_By_Reference_Type (Utyp);
6179 elsif Is_Incomplete_Type (Btype) then
6181 Ftyp : constant Entity_Id := Full_View (Btype);
6186 return Is_By_Reference_Type (Ftyp);
6190 elsif Is_Concurrent_Type (Btype) then
6193 elsif Is_Record_Type (Btype) then
6194 if Is_Limited_Record (Btype)
6195 or else Is_Tagged_Type (Btype)
6196 or else Is_Volatile (Btype)
6205 C := First_Component (Btype);
6206 while Present (C) loop
6207 if Is_By_Reference_Type (Etype (C))
6208 or else Is_Volatile (Etype (C))
6213 C := Next_Component (C);
6220 elsif Is_Array_Type (Btype) then
6223 or else Is_By_Reference_Type (Component_Type (Btype))
6224 or else Is_Volatile (Component_Type (Btype))
6225 or else Has_Volatile_Components (Btype);
6230 end Is_By_Reference_Type;
6232 ---------------------
6233 -- Is_Derived_Type --
6234 ---------------------
6236 function Is_Derived_Type (Id : E) return B is
6241 and then Base_Type (Id) /= Root_Type (Id)
6242 and then not Is_Class_Wide_Type (Id)
6244 if not Is_Numeric_Type (Root_Type (Id)) then
6248 Par := Parent (First_Subtype (Id));
6250 return Present (Par)
6251 and then Nkind (Par) = N_Full_Type_Declaration
6252 and then Nkind (Type_Definition (Par))
6253 = N_Derived_Type_Definition;
6259 end Is_Derived_Type;
6261 ----------------------
6262 -- Is_Dynamic_Scope --
6263 ----------------------
6265 function Is_Dynamic_Scope (Id : E) return B is
6268 Ekind (Id) = E_Block
6270 Ekind (Id) = E_Function
6272 Ekind (Id) = E_Procedure
6274 Ekind (Id) = E_Subprogram_Body
6276 Ekind (Id) = E_Task_Type
6278 Ekind (Id) = E_Entry
6280 Ekind (Id) = E_Entry_Family
6282 Ekind (Id) = E_Return_Statement;
6283 end Is_Dynamic_Scope;
6285 --------------------
6286 -- Is_Entity_Name --
6287 --------------------
6289 function Is_Entity_Name (N : Node_Id) return Boolean is
6290 Kind : constant Node_Kind := Nkind (N);
6293 -- Identifiers, operator symbols, expanded names are entity names
6295 return Kind = N_Identifier
6296 or else Kind = N_Operator_Symbol
6297 or else Kind = N_Expanded_Name
6299 -- Attribute references are entity names if they refer to an entity.
6300 -- Note that we don't do this by testing for the presence of the
6301 -- Entity field in the N_Attribute_Reference node, since it may not
6302 -- have been set yet.
6304 or else (Kind = N_Attribute_Reference
6305 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
6308 ---------------------------
6309 -- Is_Indefinite_Subtype --
6310 ---------------------------
6312 function Is_Indefinite_Subtype (Id : Entity_Id) return B is
6313 K : constant Entity_Kind := Ekind (Id);
6316 if Is_Constrained (Id) then
6319 elsif K in Array_Kind
6320 or else K in Class_Wide_Kind
6321 or else Has_Unknown_Discriminants (Id)
6325 -- Known discriminants: indefinite if there are no default values
6327 elsif K in Record_Kind
6328 or else Is_Incomplete_Or_Private_Type (Id)
6329 or else Is_Concurrent_Type (Id)
6331 return (Has_Discriminants (Id)
6332 and then No (Discriminant_Default_Value (First_Discriminant (Id))));
6337 end Is_Indefinite_Subtype;
6339 ---------------------
6340 -- Is_Limited_Type --
6341 ---------------------
6343 function Is_Limited_Type (Id : E) return B is
6344 Btype : constant E := Base_Type (Id);
6345 Rtype : constant E := Root_Type (Btype);
6348 if not Is_Type (Id) then
6351 elsif Ekind (Btype) = E_Limited_Private_Type
6352 or else Is_Limited_Composite (Btype)
6356 elsif Is_Concurrent_Type (Btype) then
6359 -- The Is_Limited_Record flag normally indicates that the type is
6360 -- limited. The exception is that a type does not inherit limitedness
6361 -- from its interface ancestor. So the type may be derived from a
6362 -- limited interface, but is not limited.
6364 elsif Is_Limited_Record (Id)
6365 and then not Is_Interface (Id)
6369 -- Otherwise we will look around to see if there is some other reason
6370 -- for it to be limited, except that if an error was posted on the
6371 -- entity, then just assume it is non-limited, because it can cause
6372 -- trouble to recurse into a murky erroneous entity!
6374 elsif Error_Posted (Id) then
6377 elsif Is_Record_Type (Btype) then
6379 if Is_Limited_Interface (Id) then
6382 -- AI-419: limitedness is not inherited from a limited interface
6384 elsif Is_Limited_Record (Rtype) then
6385 return not Is_Interface (Rtype)
6386 or else Is_Protected_Interface (Rtype)
6387 or else Is_Synchronized_Interface (Rtype)
6388 or else Is_Task_Interface (Rtype);
6390 elsif Is_Class_Wide_Type (Btype) then
6391 return Is_Limited_Type (Rtype);
6398 C := First_Component (Btype);
6399 while Present (C) loop
6400 if Is_Limited_Type (Etype (C)) then
6404 C := Next_Component (C);
6411 elsif Is_Array_Type (Btype) then
6412 return Is_Limited_Type (Component_Type (Btype));
6417 end Is_Limited_Type;
6419 -----------------------------------
6420 -- Is_Package_Or_Generic_Package --
6421 -----------------------------------
6423 function Is_Package_Or_Generic_Package (Id : E) return B is
6426 Ekind (Id) = E_Package
6428 Ekind (Id) = E_Generic_Package;
6429 end Is_Package_Or_Generic_Package;
6431 --------------------------
6432 -- Is_Protected_Private --
6433 --------------------------
6435 function Is_Protected_Private (Id : E) return B is
6437 pragma Assert (Ekind (Id) = E_Component);
6438 return Is_Protected_Type (Scope (Id));
6439 end Is_Protected_Private;
6441 ------------------------------
6442 -- Is_Protected_Record_Type --
6443 ------------------------------
6445 function Is_Protected_Record_Type (Id : E) return B is
6448 Is_Concurrent_Record_Type (Id)
6449 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
6450 end Is_Protected_Record_Type;
6452 --------------------------------
6453 -- Is_Inherently_Limited_Type --
6454 --------------------------------
6456 function Is_Inherently_Limited_Type (Id : E) return B is
6457 Btype : constant Entity_Id := Base_Type (Id);
6460 if Is_Private_Type (Btype) then
6462 Utyp : constant Entity_Id := Underlying_Type (Btype);
6467 return Is_Inherently_Limited_Type (Utyp);
6471 elsif Is_Concurrent_Type (Btype) then
6474 elsif Is_Record_Type (Btype) then
6475 if Is_Limited_Record (Btype) then
6476 return not Is_Interface (Btype)
6477 or else Is_Protected_Interface (Btype)
6478 or else Is_Synchronized_Interface (Btype)
6479 or else Is_Task_Interface (Btype);
6481 elsif Is_Class_Wide_Type (Btype) then
6482 return Is_Inherently_Limited_Type (Root_Type (Btype));
6489 C := First_Component (Btype);
6490 while Present (C) loop
6491 if Is_Inherently_Limited_Type (Etype (C)) then
6495 C := Next_Component (C);
6502 elsif Is_Array_Type (Btype) then
6503 return Is_Inherently_Limited_Type (Component_Type (Btype));
6508 end Is_Inherently_Limited_Type;
6510 --------------------
6511 -- Is_String_Type --
6512 --------------------
6514 function Is_String_Type (Id : E) return B is
6516 return Ekind (Id) in String_Kind
6517 or else (Is_Array_Type (Id)
6518 and then Number_Dimensions (Id) = 1
6519 and then Is_Character_Type (Component_Type (Id)));
6522 -------------------------
6523 -- Is_Task_Record_Type --
6524 -------------------------
6526 function Is_Task_Record_Type (Id : E) return B is
6529 Is_Concurrent_Record_Type (Id)
6530 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
6531 end Is_Task_Record_Type;
6533 ------------------------
6534 -- Is_Wrapper_Package --
6535 ------------------------
6537 function Is_Wrapper_Package (Id : E) return B is
6539 return (Ekind (Id) = E_Package
6540 and then Present (Related_Instance (Id)));
6541 end Is_Wrapper_Package;
6543 --------------------
6544 -- Next_Component --
6545 --------------------
6547 function Next_Component (Id : E) return E is
6551 Comp_Id := Next_Entity (Id);
6552 while Present (Comp_Id) loop
6553 exit when Ekind (Comp_Id) = E_Component;
6554 Comp_Id := Next_Entity (Comp_Id);
6560 ------------------------------------
6561 -- Next_Component_Or_Discriminant --
6562 ------------------------------------
6564 function Next_Component_Or_Discriminant (Id : E) return E is
6568 Comp_Id := Next_Entity (Id);
6569 while Present (Comp_Id) loop
6570 exit when Ekind (Comp_Id) = E_Component
6572 Ekind (Comp_Id) = E_Discriminant;
6573 Comp_Id := Next_Entity (Comp_Id);
6577 end Next_Component_Or_Discriminant;
6579 -----------------------
6580 -- Next_Discriminant --
6581 -----------------------
6583 -- This function actually implements both Next_Discriminant and
6584 -- Next_Stored_Discriminant by making sure that the Discriminant
6585 -- returned is of the same variety as Id.
6587 function Next_Discriminant (Id : E) return E is
6589 -- Derived Tagged types with private extensions look like this...
6591 -- E_Discriminant d1
6592 -- E_Discriminant d2
6594 -- E_Discriminant d1
6595 -- E_Discriminant d2
6598 -- so it is critical not to go past the leading discriminants
6603 pragma Assert (Ekind (Id) = E_Discriminant);
6606 D := Next_Entity (D);
6608 or else (Ekind (D) /= E_Discriminant
6609 and then not Is_Itype (D))
6614 exit when Ekind (D) = E_Discriminant
6615 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
6619 end Next_Discriminant;
6625 function Next_Formal (Id : E) return E is
6629 -- Follow the chain of declared entities as long as the kind of the
6630 -- entity corresponds to a formal parameter. Skip internal entities
6631 -- that may have been created for implicit subtypes, in the process
6632 -- of analyzing default expressions.
6637 P := Next_Entity (P);
6639 if No (P) or else Is_Formal (P) then
6641 elsif not Is_Internal (P) then
6647 -----------------------------
6648 -- Next_Formal_With_Extras --
6649 -----------------------------
6651 function Next_Formal_With_Extras (Id : E) return E is
6653 if Present (Extra_Formal (Id)) then
6654 return Extra_Formal (Id);
6656 return Next_Formal (Id);
6658 end Next_Formal_With_Extras;
6664 function Next_Index (Id : Node_Id) return Node_Id is
6673 function Next_Literal (Id : E) return E is
6675 pragma Assert (Nkind (Id) in N_Entity);
6679 ------------------------------
6680 -- Next_Stored_Discriminant --
6681 ------------------------------
6683 function Next_Stored_Discriminant (Id : E) return E is
6685 -- See comment in Next_Discriminant
6687 return Next_Discriminant (Id);
6688 end Next_Stored_Discriminant;
6690 -----------------------
6691 -- Number_Dimensions --
6692 -----------------------
6694 function Number_Dimensions (Id : E) return Pos is
6699 if Ekind (Id) in String_Kind then
6704 T := First_Index (Id);
6705 while Present (T) loop
6712 end Number_Dimensions;
6714 --------------------------
6715 -- Number_Discriminants --
6716 --------------------------
6718 function Number_Discriminants (Id : E) return Pos is
6724 Discr := First_Discriminant (Id);
6725 while Present (Discr) loop
6727 Discr := Next_Discriminant (Discr);
6731 end Number_Discriminants;
6733 --------------------
6734 -- Number_Entries --
6735 --------------------
6737 function Number_Entries (Id : E) return Nat is
6742 pragma Assert (Is_Concurrent_Type (Id));
6745 Ent := First_Entity (Id);
6746 while Present (Ent) loop
6747 if Is_Entry (Ent) then
6751 Ent := Next_Entity (Ent);
6757 --------------------
6758 -- Number_Formals --
6759 --------------------
6761 function Number_Formals (Id : E) return Pos is
6767 Formal := First_Formal (Id);
6768 while Present (Formal) loop
6770 Formal := Next_Formal (Formal);
6776 --------------------
6777 -- Parameter_Mode --
6778 --------------------
6780 function Parameter_Mode (Id : E) return Formal_Kind is
6785 ---------------------
6786 -- Record_Rep_Item --
6787 ---------------------
6789 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
6791 Set_Next_Rep_Item (N, First_Rep_Item (E));
6792 Set_First_Rep_Item (E, N);
6793 end Record_Rep_Item;
6799 function Root_Type (Id : E) return E is
6803 pragma Assert (Nkind (Id) in N_Entity);
6805 T := Base_Type (Id);
6807 if Ekind (T) = E_Class_Wide_Type then
6810 elsif Ekind (T) = E_Class_Wide_Subtype then
6811 return Etype (Base_Type (T));
6813 -- ??? T comes from Base_Type, how can it be a subtype?
6814 -- Also Base_Type is supposed to be idempotent, so either way
6815 -- this is equivalent to "return Etype (T)" and should be merged
6816 -- with the E_Class_Wide_Type case.
6827 -- Following test catches some error cases resulting from
6830 elsif No (Etyp) then
6833 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
6836 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
6842 -- Return if there is a circularity in the inheritance chain.
6843 -- This happens in some error situations and we do not want
6844 -- to get stuck in this loop.
6846 if T = Base_Type (Id) then
6852 raise Program_Error;
6859 function Scope_Depth (Id : E) return Uint is
6864 while Is_Record_Type (Scop) loop
6865 Scop := Scope (Scop);
6868 return Scope_Depth_Value (Scop);
6871 ---------------------
6872 -- Scope_Depth_Set --
6873 ---------------------
6875 function Scope_Depth_Set (Id : E) return B is
6877 return not Is_Record_Type (Id)
6878 and then Field22 (Id) /= Union_Id (Empty);
6879 end Scope_Depth_Set;
6881 -----------------------------
6882 -- Set_Component_Alignment --
6883 -----------------------------
6885 -- Component Alignment is encoded using two flags, Flag128/129 as
6886 -- follows. Note that both flags False = Align_Default, so that the
6887 -- default initialization of flags to False initializes component
6888 -- alignment to the default value as required.
6890 -- Flag128 Flag129 Value
6891 -- ------- ------- -----
6892 -- False False Calign_Default
6893 -- False True Calign_Component_Size
6894 -- True False Calign_Component_Size_4
6895 -- True True Calign_Storage_Unit
6897 procedure Set_Component_Alignment (Id : E; V : C) is
6899 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
6900 and then Id = Base_Type (Id));
6903 when Calign_Default =>
6904 Set_Flag128 (Id, False);
6905 Set_Flag129 (Id, False);
6907 when Calign_Component_Size =>
6908 Set_Flag128 (Id, False);
6909 Set_Flag129 (Id, True);
6911 when Calign_Component_Size_4 =>
6912 Set_Flag128 (Id, True);
6913 Set_Flag129 (Id, False);
6915 when Calign_Storage_Unit =>
6916 Set_Flag128 (Id, True);
6917 Set_Flag129 (Id, True);
6919 end Set_Component_Alignment;
6925 function Size_Clause (Id : E) return N is
6927 return Rep_Clause (Id, Name_Size);
6930 ------------------------
6931 -- Stream_Size_Clause --
6932 ------------------------
6934 function Stream_Size_Clause (Id : E) return N is
6936 return Rep_Clause (Id, Name_Stream_Size);
6937 end Stream_Size_Clause;
6943 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
6949 Kind := E_Access_Subtype;
6953 Kind := E_Array_Subtype;
6955 when E_Class_Wide_Type |
6956 E_Class_Wide_Subtype =>
6957 Kind := E_Class_Wide_Subtype;
6959 when E_Decimal_Fixed_Point_Type |
6960 E_Decimal_Fixed_Point_Subtype =>
6961 Kind := E_Decimal_Fixed_Point_Subtype;
6963 when E_Ordinary_Fixed_Point_Type |
6964 E_Ordinary_Fixed_Point_Subtype =>
6965 Kind := E_Ordinary_Fixed_Point_Subtype;
6967 when E_Private_Type |
6968 E_Private_Subtype =>
6969 Kind := E_Private_Subtype;
6971 when E_Limited_Private_Type |
6972 E_Limited_Private_Subtype =>
6973 Kind := E_Limited_Private_Subtype;
6975 when E_Record_Type_With_Private |
6976 E_Record_Subtype_With_Private =>
6977 Kind := E_Record_Subtype_With_Private;
6979 when E_Record_Type |
6981 Kind := E_Record_Subtype;
6983 when E_String_Type |
6985 Kind := E_String_Subtype;
6987 when Enumeration_Kind =>
6988 Kind := E_Enumeration_Subtype;
6991 Kind := E_Floating_Point_Subtype;
6993 when Signed_Integer_Kind =>
6994 Kind := E_Signed_Integer_Subtype;
6996 when Modular_Integer_Kind =>
6997 Kind := E_Modular_Integer_Subtype;
6999 when Protected_Kind =>
7000 Kind := E_Protected_Subtype;
7003 Kind := E_Task_Subtype;
7007 raise Program_Error;
7013 -------------------------
7014 -- First_Tag_Component --
7015 -------------------------
7017 function First_Tag_Component (Id : E) return E is
7019 Typ : Entity_Id := Id;
7022 pragma Assert (Is_Tagged_Type (Typ));
7024 if Is_Class_Wide_Type (Typ) then
7025 Typ := Root_Type (Typ);
7028 if Is_Private_Type (Typ) then
7029 Typ := Underlying_Type (Typ);
7031 -- If the underlying type is missing then the source program has
7032 -- errors and there is nothing else to do (the full-type declaration
7033 -- associated with the private type declaration is missing).
7040 Comp := First_Entity (Typ);
7041 while Present (Comp) loop
7042 if Is_Tag (Comp) then
7046 Comp := Next_Entity (Comp);
7049 -- No tag component found
7052 end First_Tag_Component;
7054 ------------------------
7055 -- Next_Tag_Component --
7056 ------------------------
7058 function Next_Tag_Component (Id : E) return E is
7060 Typ : constant Entity_Id := Scope (Id);
7063 pragma Assert (Ekind (Id) = E_Component
7064 and then Is_Tagged_Type (Typ));
7066 Comp := Next_Entity (Id);
7067 while Present (Comp) loop
7068 if Is_Tag (Comp) then
7069 pragma Assert (Chars (Comp) /= Name_uTag);
7073 Comp := Next_Entity (Comp);
7076 -- No tag component found
7079 end Next_Tag_Component;
7081 ---------------------
7082 -- Type_High_Bound --
7083 ---------------------
7085 function Type_High_Bound (Id : E) return Node_Id is
7086 Rng : constant Node_Id := Scalar_Range (Id);
7088 if Nkind (Rng) = N_Subtype_Indication then
7089 return High_Bound (Range_Expression (Constraint (Rng)));
7091 return High_Bound (Rng);
7093 end Type_High_Bound;
7095 --------------------
7096 -- Type_Low_Bound --
7097 --------------------
7099 function Type_Low_Bound (Id : E) return Node_Id is
7100 Rng : constant Node_Id := Scalar_Range (Id);
7102 if Nkind (Rng) = N_Subtype_Indication then
7103 return Low_Bound (Range_Expression (Constraint (Rng)));
7105 return Low_Bound (Rng);
7109 ---------------------
7110 -- Underlying_Type --
7111 ---------------------
7113 function Underlying_Type (Id : E) return E is
7115 -- For record_with_private the underlying type is always the direct
7116 -- full view. Never try to take the full view of the parent it
7117 -- doesn't make sense.
7119 if Ekind (Id) = E_Record_Type_With_Private then
7120 return Full_View (Id);
7122 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
7124 -- If we have an incomplete or private type with a full view,
7125 -- then we return the Underlying_Type of this full view
7127 if Present (Full_View (Id)) then
7128 if Id = Full_View (Id) then
7130 -- Previous error in declaration
7135 return Underlying_Type (Full_View (Id));
7138 -- If we have an incomplete entity that comes from the limited
7139 -- view then we return the Underlying_Type of its non-limited
7142 elsif From_With_Type (Id)
7143 and then Present (Non_Limited_View (Id))
7145 return Underlying_Type (Non_Limited_View (Id));
7147 -- Otherwise check for the case where we have a derived type or
7148 -- subtype, and if so get the Underlying_Type of the parent type.
7150 elsif Etype (Id) /= Id then
7151 return Underlying_Type (Etype (Id));
7153 -- Otherwise we have an incomplete or private type that has
7154 -- no full view, which means that we have not encountered the
7155 -- completion, so return Empty to indicate the underlying type
7156 -- is not yet known.
7162 -- For non-incomplete, non-private types, return the type itself
7163 -- Also for entities that are not types at all return the entity
7169 end Underlying_Type;
7171 ------------------------
7172 -- Write_Entity_Flags --
7173 ------------------------
7175 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
7177 procedure W (Flag_Name : String; Flag : Boolean);
7178 -- Write out given flag if it is set
7184 procedure W (Flag_Name : String; Flag : Boolean) is
7188 Write_Str (Flag_Name);
7189 Write_Str (" = True");
7194 -- Start of processing for Write_Entity_Flags
7197 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
7198 and then Base_Type (Id) = Id
7201 Write_Str ("Component_Alignment = ");
7203 case Component_Alignment (Id) is
7204 when Calign_Default =>
7205 Write_Str ("Calign_Default");
7207 when Calign_Component_Size =>
7208 Write_Str ("Calign_Component_Size");
7210 when Calign_Component_Size_4 =>
7211 Write_Str ("Calign_Component_Size_4");
7213 when Calign_Storage_Unit =>
7214 Write_Str ("Calign_Storage_Unit");
7220 W ("Address_Taken", Flag104 (Id));
7221 W ("Body_Needed_For_SAL", Flag40 (Id));
7222 W ("C_Pass_By_Copy", Flag125 (Id));
7223 W ("Can_Never_Be_Null", Flag38 (Id));
7224 W ("Checks_May_Be_Suppressed", Flag31 (Id));
7225 W ("Debug_Info_Off", Flag166 (Id));
7226 W ("Default_Expressions_Processed", Flag108 (Id));
7227 W ("Delay_Cleanups", Flag114 (Id));
7228 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
7229 W ("Depends_On_Private", Flag14 (Id));
7230 W ("Discard_Names", Flag88 (Id));
7231 W ("Elaboration_Entity_Required", Flag174 (Id));
7232 W ("Elaborate_Body_Desirable", Flag210 (Id));
7233 W ("Entry_Accepted", Flag152 (Id));
7234 W ("Can_Use_Internal_Rep", Flag229 (Id));
7235 W ("Finalize_Storage_Only", Flag158 (Id));
7236 W ("From_With_Type", Flag159 (Id));
7237 W ("Function_Returns_With_DSP", Flag169 (Id));
7238 W ("Has_Aliased_Components", Flag135 (Id));
7239 W ("Has_Alignment_Clause", Flag46 (Id));
7240 W ("Has_All_Calls_Remote", Flag79 (Id));
7241 W ("Has_Anon_Block_Suffix", Flag201 (Id));
7242 W ("Has_Atomic_Components", Flag86 (Id));
7243 W ("Has_Biased_Representation", Flag139 (Id));
7244 W ("Has_Completion", Flag26 (Id));
7245 W ("Has_Completion_In_Body", Flag71 (Id));
7246 W ("Has_Complex_Representation", Flag140 (Id));
7247 W ("Has_Component_Size_Clause", Flag68 (Id));
7248 W ("Has_Contiguous_Rep", Flag181 (Id));
7249 W ("Has_Controlled_Component", Flag43 (Id));
7250 W ("Has_Controlling_Result", Flag98 (Id));
7251 W ("Has_Convention_Pragma", Flag119 (Id));
7252 W ("Has_Delayed_Freeze", Flag18 (Id));
7253 W ("Has_Discriminants", Flag5 (Id));
7254 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
7255 W ("Has_Exit", Flag47 (Id));
7256 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
7257 W ("Has_Forward_Instantiation", Flag175 (Id));
7258 W ("Has_Fully_Qualified_Name", Flag173 (Id));
7259 W ("Has_Gigi_Rep_Item", Flag82 (Id));
7260 W ("Has_Homonym", Flag56 (Id));
7261 W ("Has_Initial_Value", Flag219 (Id));
7262 W ("Has_Machine_Radix_Clause", Flag83 (Id));
7263 W ("Has_Master_Entity", Flag21 (Id));
7264 W ("Has_Missing_Return", Flag142 (Id));
7265 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
7266 W ("Has_Non_Standard_Rep", Flag75 (Id));
7267 W ("Has_Object_Size_Clause", Flag172 (Id));
7268 W ("Has_Per_Object_Constraint", Flag154 (Id));
7269 W ("Has_Persistent_BSS", Flag188 (Id));
7270 W ("Has_Pragma_Controlled", Flag27 (Id));
7271 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
7272 W ("Has_Pragma_Inline", Flag157 (Id));
7273 W ("Has_Pragma_Inline_Always", Flag230 (Id));
7274 W ("Has_Pragma_Pack", Flag121 (Id));
7275 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
7276 W ("Has_Pragma_Pure", Flag203 (Id));
7277 W ("Has_Pragma_Pure_Function", Flag179 (Id));
7278 W ("Has_Pragma_Unreferenced", Flag180 (Id));
7279 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
7280 W ("Has_Primitive_Operations", Flag120 (Id));
7281 W ("Has_Private_Declaration", Flag155 (Id));
7282 W ("Has_Qualified_Name", Flag161 (Id));
7283 W ("Has_RACW", Flag214 (Id));
7284 W ("Has_Record_Rep_Clause", Flag65 (Id));
7285 W ("Has_Recursive_Call", Flag143 (Id));
7286 W ("Has_Size_Clause", Flag29 (Id));
7287 W ("Has_Small_Clause", Flag67 (Id));
7288 W ("Has_Specified_Layout", Flag100 (Id));
7289 W ("Has_Specified_Stream_Input", Flag190 (Id));
7290 W ("Has_Specified_Stream_Output", Flag191 (Id));
7291 W ("Has_Specified_Stream_Read", Flag192 (Id));
7292 W ("Has_Specified_Stream_Write", Flag193 (Id));
7293 W ("Has_Static_Discriminants", Flag211 (Id));
7294 W ("Has_Storage_Size_Clause", Flag23 (Id));
7295 W ("Has_Stream_Size_Clause", Flag184 (Id));
7296 W ("Has_Subprogram_Descriptor", Flag93 (Id));
7297 W ("Has_Task", Flag30 (Id));
7298 W ("Has_Thunks", Flag228 (Id));
7299 W ("Has_Unchecked_Union", Flag123 (Id));
7300 W ("Has_Unknown_Discriminants", Flag72 (Id));
7301 W ("Has_Up_Level_Access", Flag215 (Id));
7302 W ("Has_Volatile_Components", Flag87 (Id));
7303 W ("Has_Xref_Entry", Flag182 (Id));
7304 W ("Implemented_By_Entry", Flag232 (Id));
7305 W ("In_Package_Body", Flag48 (Id));
7306 W ("In_Private_Part", Flag45 (Id));
7307 W ("In_Use", Flag8 (Id));
7308 W ("Is_AST_Entry", Flag132 (Id));
7309 W ("Is_Abstract_Subprogram", Flag19 (Id));
7310 W ("Is_Abstract_Type", Flag146 (Id));
7311 W ("Is_Local_Anonymous_Access", Flag194 (Id));
7312 W ("Is_Access_Constant", Flag69 (Id));
7313 W ("Is_Ada_2005_Only", Flag185 (Id));
7314 W ("Is_Aliased", Flag15 (Id));
7315 W ("Is_Asynchronous", Flag81 (Id));
7316 W ("Is_Atomic", Flag85 (Id));
7317 W ("Is_Bit_Packed_Array", Flag122 (Id));
7318 W ("Is_CPP_Class", Flag74 (Id));
7319 W ("Is_Called", Flag102 (Id));
7320 W ("Is_Character_Type", Flag63 (Id));
7321 W ("Is_Child_Unit", Flag73 (Id));
7322 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
7323 W ("Is_Compilation_Unit", Flag149 (Id));
7324 W ("Is_Completely_Hidden", Flag103 (Id));
7325 W ("Is_Concurrent_Record_Type", Flag20 (Id));
7326 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
7327 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
7328 W ("Is_Constrained", Flag12 (Id));
7329 W ("Is_Constructor", Flag76 (Id));
7330 W ("Is_Controlled", Flag42 (Id));
7331 W ("Is_Controlling_Formal", Flag97 (Id));
7332 W ("Is_Descendent_Of_Address", Flag223 (Id));
7333 W ("Is_Discrim_SO_Function", Flag176 (Id));
7334 W ("Is_Dispatching_Operation", Flag6 (Id));
7335 W ("Is_Eliminated", Flag124 (Id));
7336 W ("Is_Entry_Formal", Flag52 (Id));
7337 W ("Is_Exported", Flag99 (Id));
7338 W ("Is_First_Subtype", Flag70 (Id));
7339 W ("Is_For_Access_Subtype", Flag118 (Id));
7340 W ("Is_Formal_Subprogram", Flag111 (Id));
7341 W ("Is_Frozen", Flag4 (Id));
7342 W ("Is_Generic_Actual_Type", Flag94 (Id));
7343 W ("Is_Generic_Instance", Flag130 (Id));
7344 W ("Is_Generic_Type", Flag13 (Id));
7345 W ("Is_Hidden", Flag57 (Id));
7346 W ("Is_Hidden_Open_Scope", Flag171 (Id));
7347 W ("Is_Immediately_Visible", Flag7 (Id));
7348 W ("Is_Imported", Flag24 (Id));
7349 W ("Is_Inlined", Flag11 (Id));
7350 W ("Is_Instantiated", Flag126 (Id));
7351 W ("Is_Interface", Flag186 (Id));
7352 W ("Is_Internal", Flag17 (Id));
7353 W ("Is_Interrupt_Handler", Flag89 (Id));
7354 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
7355 W ("Is_Itype", Flag91 (Id));
7356 W ("Is_Known_Non_Null", Flag37 (Id));
7357 W ("Is_Known_Null", Flag204 (Id));
7358 W ("Is_Known_Valid", Flag170 (Id));
7359 W ("Is_Limited_Composite", Flag106 (Id));
7360 W ("Is_Limited_Interface", Flag197 (Id));
7361 W ("Is_Limited_Record", Flag25 (Id));
7362 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
7363 W ("Is_Non_Static_Subtype", Flag109 (Id));
7364 W ("Is_Null_Init_Proc", Flag178 (Id));
7365 W ("Is_Obsolescent", Flag153 (Id));
7366 W ("Is_Only_Out_Parameter", Flag226 (Id));
7367 W ("Is_Optional_Parameter", Flag134 (Id));
7368 W ("Is_Overriding_Operation", Flag39 (Id));
7369 W ("Is_Package_Body_Entity", Flag160 (Id));
7370 W ("Is_Packed", Flag51 (Id));
7371 W ("Is_Packed_Array_Type", Flag138 (Id));
7372 W ("Is_Potentially_Use_Visible", Flag9 (Id));
7373 W ("Is_Preelaborated", Flag59 (Id));
7374 W ("Is_Primitive_Wrapper", Flag195 (Id));
7375 W ("Is_Private_Composite", Flag107 (Id));
7376 W ("Is_Private_Descendant", Flag53 (Id));
7377 W ("Is_Protected_Interface", Flag198 (Id));
7378 W ("Is_Public", Flag10 (Id));
7379 W ("Is_Pure", Flag44 (Id));
7380 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
7381 W ("Is_Raised", Flag224 (Id));
7382 W ("Is_Remote_Call_Interface", Flag62 (Id));
7383 W ("Is_Remote_Types", Flag61 (Id));
7384 W ("Is_Renaming_Of_Object", Flag112 (Id));
7385 W ("Is_Return_Object", Flag209 (Id));
7386 W ("Is_Shared_Passive", Flag60 (Id));
7387 W ("Is_Synchronized_Interface", Flag199 (Id));
7388 W ("Is_Statically_Allocated", Flag28 (Id));
7389 W ("Is_Tag", Flag78 (Id));
7390 W ("Is_Tagged_Type", Flag55 (Id));
7391 W ("Is_Task_Interface", Flag200 (Id));
7392 W ("Is_Thunk", Flag225 (Id));
7393 W ("Is_True_Constant", Flag163 (Id));
7394 W ("Is_Unchecked_Union", Flag117 (Id));
7395 W ("Is_Unsigned_Type", Flag144 (Id));
7396 W ("Is_VMS_Exception", Flag133 (Id));
7397 W ("Is_Valued_Procedure", Flag127 (Id));
7398 W ("Is_Visible_Child_Unit", Flag116 (Id));
7399 W ("Is_Visible_Formal", Flag206 (Id));
7400 W ("Is_Volatile", Flag16 (Id));
7401 W ("Itype_Printed", Flag202 (Id));
7402 W ("Kill_Elaboration_Checks", Flag32 (Id));
7403 W ("Kill_Range_Checks", Flag33 (Id));
7404 W ("Kill_Tag_Checks", Flag34 (Id));
7405 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
7406 W ("Low_Bound_Known", Flag205 (Id));
7407 W ("Machine_Radix_10", Flag84 (Id));
7408 W ("Materialize_Entity", Flag168 (Id));
7409 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
7410 W ("Must_Have_Preelab_Init", Flag208 (Id));
7411 W ("Needs_Debug_Info", Flag147 (Id));
7412 W ("Needs_No_Actuals", Flag22 (Id));
7413 W ("Never_Set_In_Source", Flag115 (Id));
7414 W ("No_Pool_Assigned", Flag131 (Id));
7415 W ("No_Return", Flag113 (Id));
7416 W ("No_Strict_Aliasing", Flag136 (Id));
7417 W ("Non_Binary_Modulus", Flag58 (Id));
7418 W ("Nonzero_Is_True", Flag162 (Id));
7419 W ("Reachable", Flag49 (Id));
7420 W ("Referenced", Flag156 (Id));
7421 W ("Referenced_As_LHS", Flag36 (Id));
7422 W ("Referenced_As_Out_Parameter", Flag227 (Id));
7423 W ("Renamed_In_Spec", Flag231 (Id));
7424 W ("Requires_Overriding", Flag213 (Id));
7425 W ("Return_Present", Flag54 (Id));
7426 W ("Returns_By_Ref", Flag90 (Id));
7427 W ("Reverse_Bit_Order", Flag164 (Id));
7428 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
7429 W ("Size_Depends_On_Discriminant", Flag177 (Id));
7430 W ("Size_Known_At_Compile_Time", Flag92 (Id));
7431 W ("Static_Elaboration_Desired", Flag77 (Id));
7432 W ("Strict_Alignment", Flag145 (Id));
7433 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
7434 W ("Suppress_Init_Proc", Flag105 (Id));
7435 W ("Suppress_Style_Checks", Flag165 (Id));
7436 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
7437 W ("Is_Primitive", Flag218 (Id));
7438 W ("Treat_As_Volatile", Flag41 (Id));
7439 W ("Universal_Aliasing", Flag216 (Id));
7440 W ("Used_As_Generic_Actual", Flag222 (Id));
7441 W ("Uses_Sec_Stack", Flag95 (Id));
7442 W ("Vax_Float", Flag151 (Id));
7443 W ("Warnings_Off", Flag96 (Id));
7444 W ("Was_Hidden", Flag196 (Id));
7445 end Write_Entity_Flags;
7447 -----------------------
7448 -- Write_Entity_Info --
7449 -----------------------
7451 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
7453 procedure Write_Attribute (Which : String; Nam : E);
7454 -- Write attribute value with given string name
7456 procedure Write_Kind (Id : Entity_Id);
7457 -- Write Ekind field of entity
7459 ---------------------
7460 -- Write_Attribute --
7461 ---------------------
7463 procedure Write_Attribute (Which : String; Nam : E) is
7467 Write_Int (Int (Nam));
7469 Write_Name (Chars (Nam));
7471 end Write_Attribute;
7477 procedure Write_Kind (Id : Entity_Id) is
7478 K : constant String := Entity_Kind'Image (Ekind (Id));
7482 Write_Str (" Kind ");
7484 if Is_Type (Id) and then Is_Tagged_Type (Id) then
7485 Write_Str ("TAGGED ");
7488 Write_Str (K (3 .. K'Length));
7491 if Is_Type (Id) and then Depends_On_Private (Id) then
7492 Write_Str ("Depends_On_Private ");
7496 -- Start of processing for Write_Entity_Info
7500 Write_Attribute ("Name ", Id);
7501 Write_Int (Int (Id));
7505 Write_Attribute (" Type ", Etype (Id));
7507 Write_Attribute (" Scope ", Scope (Id));
7512 when Discrete_Kind =>
7513 Write_Str ("Bounds: Id = ");
7515 if Present (Scalar_Range (Id)) then
7516 Write_Int (Int (Type_Low_Bound (Id)));
7517 Write_Str (" .. Id = ");
7518 Write_Int (Int (Type_High_Bound (Id)));
7520 Write_Str ("Empty");
7531 (" Component Type ", Component_Type (Id));
7534 Write_Str (" Indices ");
7536 Index := First_Index (Id);
7537 while Present (Index) loop
7538 Write_Attribute (" ", Etype (Index));
7539 Index := Next_Index (Index);
7547 (" Directly Designated Type ",
7548 Directly_Designated_Type (Id));
7551 when Overloadable_Kind =>
7552 if Present (Homonym (Id)) then
7553 Write_Str (" Homonym ");
7554 Write_Name (Chars (Homonym (Id)));
7556 Write_Int (Int (Homonym (Id)));
7563 if Ekind (Scope (Id)) in Record_Kind then
7565 " Original_Record_Component ",
7566 Original_Record_Component (Id));
7567 Write_Int (Int (Original_Record_Component (Id)));
7571 when others => null;
7573 end Write_Entity_Info;
7575 -----------------------
7576 -- Write_Field6_Name --
7577 -----------------------
7579 procedure Write_Field6_Name (Id : Entity_Id) is
7580 pragma Warnings (Off, Id);
7582 Write_Str ("First_Rep_Item");
7583 end Write_Field6_Name;
7585 -----------------------
7586 -- Write_Field7_Name --
7587 -----------------------
7589 procedure Write_Field7_Name (Id : Entity_Id) is
7590 pragma Warnings (Off, Id);
7592 Write_Str ("Freeze_Node");
7593 end Write_Field7_Name;
7595 -----------------------
7596 -- Write_Field8_Name --
7597 -----------------------
7599 procedure Write_Field8_Name (Id : Entity_Id) is
7604 Write_Str ("Normalized_First_Bit");
7608 E_Subprogram_Body =>
7609 Write_Str ("Mechanism");
7612 Write_Str ("Associated_Node_For_Itype");
7615 Write_Str ("Dependent_Instances");
7617 when E_Return_Statement =>
7618 Write_Str ("Return_Applies_To");
7621 Write_Str ("Hiding_Loop_Variable");
7624 Write_Str ("Field8??");
7626 end Write_Field8_Name;
7628 -----------------------
7629 -- Write_Field9_Name --
7630 -----------------------
7632 procedure Write_Field9_Name (Id : Entity_Id) is
7636 Write_Str ("Class_Wide_Type");
7639 E_Generic_Function |
7641 E_Generic_Procedure |
7644 Write_Str ("Renaming_Map");
7647 Write_Str ("Current_Value");
7650 Write_Str ("Field9??");
7652 end Write_Field9_Name;
7654 ------------------------
7655 -- Write_Field10_Name --
7656 ------------------------
7658 procedure Write_Field10_Name (Id : Entity_Id) is
7662 Write_Str ("Referenced_Object");
7664 when E_In_Parameter |
7666 Write_Str ("Discriminal_Link");
7672 Write_Str ("Handler_Records");
7676 Write_Str ("Normalized_Position_Max");
7679 Write_Str ("Field10??");
7681 end Write_Field10_Name;
7683 ------------------------
7684 -- Write_Field11_Name --
7685 ------------------------
7687 procedure Write_Field11_Name (Id : Entity_Id) is
7691 Write_Str ("Entry_Component");
7695 Write_Str ("Component_Bit_Offset");
7698 Write_Str ("Full_View");
7700 when E_Enumeration_Literal =>
7701 Write_Str ("Enumeration_Pos");
7704 Write_Str ("Block_Node");
7710 Write_Str ("Protected_Body_Subprogram");
7712 when E_Generic_Package =>
7713 Write_Str ("Generic_Homonym");
7716 Write_Str ("Full_View");
7719 Write_Str ("Field11??");
7721 end Write_Field11_Name;
7723 ------------------------
7724 -- Write_Field12_Name --
7725 ------------------------
7727 procedure Write_Field12_Name (Id : Entity_Id) is
7731 Write_Str ("Barrier_Function");
7733 when E_Enumeration_Literal =>
7734 Write_Str ("Enumeration_Rep");
7742 E_In_Out_Parameter |
7746 Write_Str ("Esize");
7750 Write_Str ("Next_Inlined_Subprogram");
7753 Write_Str ("Associated_Formal_Package");
7756 Write_Str ("Field12??");
7758 end Write_Field12_Name;
7760 ------------------------
7761 -- Write_Field13_Name --
7762 ------------------------
7764 procedure Write_Field13_Name (Id : Entity_Id) is
7768 Write_Str ("RM_Size");
7772 Write_Str ("Component_Clause");
7775 if not Comes_From_Source (Id)
7777 Chars (Id) = Name_Op_Ne
7779 Write_Str ("Corresponding_Equality");
7781 elsif Comes_From_Source (Id) then
7782 Write_Str ("Elaboration_Entity");
7785 Write_Str ("Field13??");
7790 Write_Str ("Extra_Accessibility");
7794 Generic_Unit_Kind =>
7795 Write_Str ("Elaboration_Entity");
7798 Write_Str ("Field13??");
7800 end Write_Field13_Name;
7802 -----------------------
7803 -- Write_Field14_Name --
7804 -----------------------
7806 procedure Write_Field14_Name (Id : Entity_Id) is
7815 Write_Str ("Alignment");
7819 Write_Str ("Normalized_Position");
7823 Write_Str ("First_Optional_Parameter");
7826 E_Generic_Package =>
7827 Write_Str ("Shadow_Entities");
7830 Write_Str ("Field14??");
7832 end Write_Field14_Name;
7834 ------------------------
7835 -- Write_Field15_Name --
7836 ------------------------
7838 procedure Write_Field15_Name (Id : Entity_Id) is
7843 Write_Str ("Storage_Size_Variable");
7845 when Class_Wide_Kind |
7849 Write_Str ("Primitive_Operations");
7852 Write_Str ("DT_Entry_Count");
7854 when Decimal_Fixed_Point_Kind =>
7855 Write_Str ("Scale_Value");
7857 when E_Discriminant =>
7858 Write_Str ("Discriminant_Number");
7861 Write_Str ("Extra_Formal");
7865 Write_Str ("DT_Position");
7868 Write_Str ("Entry_Parameters_Type");
7870 when Enumeration_Kind =>
7871 Write_Str ("Lit_Indexes");
7875 Write_Str ("Related_Instance");
7877 when E_Protected_Type =>
7878 Write_Str ("Entry_Bodies_Array");
7880 when E_String_Literal_Subtype =>
7881 Write_Str ("String_Literal_Low_Bound");
7884 Write_Str ("Shared_Var_Read_Proc");
7887 Write_Str ("Field15??");
7889 end Write_Field15_Name;
7891 ------------------------
7892 -- Write_Field16_Name --
7893 ------------------------
7895 procedure Write_Field16_Name (Id : Entity_Id) is
7899 Write_Str ("Entry_Formal");
7903 Write_Str ("DTC_Entity");
7908 Write_Str ("First_Private_Entity");
7910 when E_Record_Type |
7911 E_Record_Type_With_Private =>
7912 Write_Str ("Access_Disp_Table");
7914 when E_String_Literal_Subtype =>
7915 Write_Str ("String_Literal_Length");
7917 when Enumeration_Kind =>
7918 Write_Str ("Lit_Strings");
7922 Write_Str ("Unset_Reference");
7924 when E_Record_Subtype |
7925 E_Class_Wide_Subtype =>
7926 Write_Str ("Cloned_Subtype");
7929 Write_Str ("Field16??");
7931 end Write_Field16_Name;
7933 ------------------------
7934 -- Write_Field17_Name --
7935 ------------------------
7937 procedure Write_Field17_Name (Id : Entity_Id) is
7941 Write_Str ("Digits_Value");
7944 Write_Str ("Prival");
7946 when E_Discriminant =>
7947 Write_Str ("Discriminal");
7956 E_Generic_Function |
7958 E_Generic_Procedure |
7966 E_Return_Statement |
7968 E_Subprogram_Type =>
7969 Write_Str ("First_Entity");
7972 Write_Str ("First_Index");
7974 when E_Protected_Body =>
7975 Write_Str ("Object_Ref");
7977 when Enumeration_Kind =>
7978 Write_Str ("First_Literal");
7981 Write_Str ("Master_Id");
7983 when Modular_Integer_Kind =>
7984 Write_Str ("Modulus");
7988 E_Generic_In_Out_Parameter |
7990 Write_Str ("Actual_Subtype");
7992 when E_Incomplete_Type =>
7993 Write_Str ("Non_Limited_View");
7995 when E_Incomplete_Subtype =>
7996 if From_With_Type (Id) then
7997 Write_Str ("Non_Limited_View");
8001 Write_Str ("Field17??");
8003 end Write_Field17_Name;
8005 ------------------------
8006 -- Write_Field18_Name --
8007 ------------------------
8009 procedure Write_Field18_Name (Id : Entity_Id) is
8012 when E_Enumeration_Literal |
8016 Write_Str ("Alias");
8018 when E_Record_Type =>
8019 Write_Str ("Corresponding_Concurrent_Type");
8021 when E_Entry_Index_Parameter =>
8022 Write_Str ("Entry_Index_Constant");
8024 when E_Class_Wide_Subtype |
8025 E_Access_Protected_Subprogram_Type |
8026 E_Anonymous_Access_Protected_Subprogram_Type |
8027 E_Access_Subprogram_Type |
8029 Write_Str ("Equivalent_Type");
8031 when Fixed_Point_Kind =>
8032 Write_Str ("Delta_Value");
8035 Write_Str ("Renamed_Object");
8039 E_Generic_Function |
8040 E_Generic_Procedure |
8041 E_Generic_Package =>
8042 Write_Str ("Renamed_Entity");
8044 when Incomplete_Or_Private_Kind =>
8045 Write_Str ("Private_Dependents");
8047 when Concurrent_Kind =>
8048 Write_Str ("Corresponding_Record_Type");
8053 Write_Str ("Enclosing_Scope");
8056 Write_Str ("Field18??");
8058 end Write_Field18_Name;
8060 -----------------------
8061 -- Write_Field19_Name --
8062 -----------------------
8064 procedure Write_Field19_Name (Id : Entity_Id) is
8069 Write_Str ("Related_Array_Object");
8075 E_Return_Statement |
8077 Write_Str ("Finalization_Chain_Entity");
8079 when E_Constant | E_Variable =>
8080 Write_Str ("Size_Check_Code");
8082 when E_Discriminant =>
8083 Write_Str ("Corresponding_Discriminant");
8086 E_Generic_Package =>
8087 Write_Str ("Body_Entity");
8089 when E_Package_Body |
8091 Write_Str ("Spec_Entity");
8093 when Private_Kind =>
8094 Write_Str ("Underlying_Full_View");
8096 when E_Record_Type =>
8097 Write_Str ("Parent_Subtype");
8100 Write_Str ("Field19??");
8102 end Write_Field19_Name;
8104 -----------------------
8105 -- Write_Field20_Name --
8106 -----------------------
8108 procedure Write_Field20_Name (Id : Entity_Id) is
8112 Write_Str ("Component_Type");
8114 when E_In_Parameter |
8115 E_Generic_In_Parameter =>
8116 Write_Str ("Default_Value");
8119 Write_Str ("Directly_Designated_Type");
8122 Write_Str ("Discriminant_Checking_Func");
8124 when E_Discriminant =>
8125 Write_Str ("Discriminant_Default_Value");
8134 E_Generic_Function |
8136 E_Generic_Procedure |
8144 E_Return_Statement |
8146 E_Subprogram_Type =>
8148 Write_Str ("Last_Entity");
8151 Write_Str ("Scalar_Range");
8154 Write_Str ("Register_Exception_Call");
8157 Write_Str ("Field20??");
8159 end Write_Field20_Name;
8161 -----------------------
8162 -- Write_Field21_Name --
8163 -----------------------
8165 procedure Write_Field21_Name (Id : Entity_Id) is
8171 E_Generic_Function |
8173 E_Generic_Procedure |
8175 Write_Str ("Interface_Name");
8177 when Concurrent_Kind |
8178 Incomplete_Or_Private_Kind |
8182 Write_Str ("Discriminant_Constraint");
8185 Write_Str ("Accept_Address");
8187 when Fixed_Point_Kind =>
8188 Write_Str ("Small_Value");
8190 when E_In_Parameter =>
8191 Write_Str ("Default_Expr_Function");
8194 Modular_Integer_Kind =>
8195 Write_Str ("Original_Array_Type");
8198 Write_Str ("Field21??");
8200 end Write_Field21_Name;
8202 -----------------------
8203 -- Write_Field22_Name --
8204 -----------------------
8206 procedure Write_Field22_Name (Id : Entity_Id) is
8210 Write_Str ("Associated_Storage_Pool");
8213 Write_Str ("Component_Size");
8217 Write_Str ("Original_Record_Component");
8219 when E_Enumeration_Literal =>
8220 Write_Str ("Enumeration_Rep_Expr");
8223 Write_Str ("Exception_Code");
8226 Write_Str ("Protected_Formal");
8228 when E_Record_Type =>
8229 Write_Str ("Corresponding_Remote_Type");
8239 E_Generic_Function |
8240 E_Generic_Procedure |
8243 E_Return_Statement |
8246 Write_Str ("Scope_Depth_Value");
8248 when E_Record_Type_With_Private |
8249 E_Record_Subtype_With_Private |
8252 E_Limited_Private_Type |
8253 E_Limited_Private_Subtype =>
8254 Write_Str ("Private_View");
8257 Write_Str ("Shared_Var_Assign_Proc");
8260 Write_Str ("Field22??");
8262 end Write_Field22_Name;
8264 ------------------------
8265 -- Write_Field23_Name --
8266 ------------------------
8268 procedure Write_Field23_Name (Id : Entity_Id) is
8272 Write_Str ("Associated_Final_Chain");
8275 Write_Str ("Packed_Array_Type");
8278 Write_Str ("Entry_Cancel_Parameter");
8281 Write_Str ("Protected_Operation");
8283 when E_Discriminant =>
8284 Write_Str ("CR_Discriminant");
8286 when E_Enumeration_Type =>
8287 Write_Str ("Enum_Pos_To_Rep");
8291 Write_Str ("Extra_Constrained");
8293 when E_Generic_Function |
8295 E_Generic_Procedure =>
8296 Write_Str ("Inner_Instances");
8298 when Concurrent_Kind |
8299 Incomplete_Or_Private_Kind |
8303 Write_Str ("Stored_Constraint");
8307 Write_Str ("Generic_Renamings");
8310 if Is_Generic_Instance (Id) then
8311 Write_Str ("Generic_Renamings");
8313 Write_Str ("Limited_View");
8316 -- What about Privals_Chain for protected operations ???
8319 Write_Str ("Privals_Chain");
8322 Write_Str ("Field23??");
8324 end Write_Field23_Name;
8326 ------------------------
8327 -- Write_Field24_Name --
8328 ------------------------
8330 procedure Write_Field24_Name (Id : Entity_Id) is
8331 pragma Warnings (Off, Id);
8333 Write_Str ("Obsolescent_Warning");
8334 end Write_Field24_Name;
8336 ------------------------
8337 -- Write_Field25_Name --
8338 ------------------------
8340 procedure Write_Field25_Name (Id : Entity_Id) is
8344 Write_Str ("DT_Offset_To_Top_Func");
8348 Write_Str ("Abstract_Interface_Alias");
8351 Write_Str ("Current_Use_Clause");
8353 when E_Record_Type |
8355 E_Record_Type_With_Private |
8356 E_Record_Subtype_With_Private =>
8357 Write_Str ("Abstract_Interfaces");
8360 Write_Str ("Task_Body_Procedure");
8363 Write_Str ("Debug_Renaming_Link");
8366 Write_Str ("Field25??");
8368 end Write_Field25_Name;
8370 ------------------------
8371 -- Write_Field26_Name --
8372 ------------------------
8374 procedure Write_Field26_Name (Id : Entity_Id) is
8379 Write_Str ("Related_Type");
8381 when E_Generic_Package |
8383 Write_Str ("Package_Instantiation");
8388 if Is_Dispatching_Operation (Id) then
8389 Write_Str ("Overridden_Operation");
8391 Write_Str ("Static_Initialization");
8394 when E_Record_Type |
8395 E_Record_Type_With_Private =>
8396 Write_Str ("Dispatch_Table_Wrapper");
8398 when E_In_Out_Parameter |
8401 Write_Str ("Last_Assignment");
8404 Write_Str ("Field26??");
8406 end Write_Field26_Name;
8408 ------------------------
8409 -- Write_Field27_Name --
8410 ------------------------
8412 procedure Write_Field27_Name (Id : Entity_Id) is
8416 Write_Str ("Wrapped_Entity");
8419 Write_Str ("Field27??");
8421 end Write_Field27_Name;
8423 ------------------------
8424 -- Write_Field28_Name --
8425 ------------------------
8427 procedure Write_Field28_Name (Id : Entity_Id) is
8430 when E_Procedure | E_Function | E_Entry =>
8431 Write_Str ("Extra_Formals");
8434 Write_Str ("Field28??");
8436 end Write_Field28_Name;
8438 -------------------------
8439 -- Iterator Procedures --
8440 -------------------------
8442 procedure Proc_Next_Component (N : in out Node_Id) is
8444 N := Next_Component (N);
8445 end Proc_Next_Component;
8447 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
8449 N := Next_Component (N);
8450 end Proc_Next_Component_Or_Discriminant;
8452 procedure Proc_Next_Discriminant (N : in out Node_Id) is
8454 N := Next_Discriminant (N);
8455 end Proc_Next_Discriminant;
8457 procedure Proc_Next_Formal (N : in out Node_Id) is
8459 N := Next_Formal (N);
8460 end Proc_Next_Formal;
8462 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
8464 N := Next_Formal_With_Extras (N);
8465 end Proc_Next_Formal_With_Extras;
8467 procedure Proc_Next_Index (N : in out Node_Id) is
8469 N := Next_Index (N);
8470 end Proc_Next_Index;
8472 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
8474 N := Next_Inlined_Subprogram (N);
8475 end Proc_Next_Inlined_Subprogram;
8477 procedure Proc_Next_Literal (N : in out Node_Id) is
8479 N := Next_Literal (N);
8480 end Proc_Next_Literal;
8482 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
8484 N := Next_Stored_Discriminant (N);
8485 end Proc_Next_Stored_Discriminant;