1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2006, 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 Namet; use Namet;
39 with Nlists; use Nlists;
40 with Sinfo; use Sinfo;
41 with Stand; use Stand;
42 with Output; use Output;
46 use Atree.Unchecked_Access;
47 -- This is one of the packages that is allowed direct untyped access to
48 -- the fields in a node, since it provides the next level abstraction
49 -- which incorporates appropriate checks.
51 ----------------------------------------------
52 -- Usage of Fields in Defining Entity Nodes --
53 ----------------------------------------------
55 -- Four of these fields are defined in Sinfo, since they in are the
56 -- base part of the node. The access routines for these fields and
57 -- the corresponding set procedures are defined in Sinfo. These fields
58 -- are present in all entities. Note that Homonym is also in the base
59 -- part of the node, but has access routines that are more properly
60 -- part of Einfo, which is why they are defined here.
67 -- Remaining fields are present only in extended nodes (i.e. entities)
69 -- The following fields are present in all entities
72 -- First_Rep_Item Node6
74 -- Obsolescent_Warning Node24
76 -- The usage of other fields (and the entity kinds to which it applies)
77 -- depends on the particular field (see Einfo spec for details).
79 -- Associated_Node_For_Itype Node8
80 -- Dependent_Instances Elist8
81 -- Hiding_Loop_Variable Node8
82 -- Mechanism Uint8 (but returns Mechanism_Type)
83 -- Normalized_First_Bit Uint8
84 -- Return_Applies_To Node8
86 -- Class_Wide_Type Node9
87 -- Current_Value Node9
90 -- Discriminal_Link Node10
91 -- Handler_Records List10
92 -- Normalized_Position_Max Uint10
93 -- Referenced_Object Node10
95 -- Component_Bit_Offset Uint11
97 -- Entry_Component Node11
98 -- Enumeration_Pos Uint11
99 -- Generic_Homonym Node11
100 -- Protected_Body_Subprogram Node11
103 -- Barrier_Function Node12
104 -- Enumeration_Rep Uint12
106 -- Next_Inlined_Subprogram Node12
108 -- Corresponding_Equality Node13
109 -- Component_Clause Node13
110 -- Debug_Renaming_Link Node13
111 -- Elaboration_Entity Node13
112 -- Extra_Accessibility Node13
116 -- First_Optional_Parameter Node14
117 -- Normalized_Position Uint14
118 -- Shadow_Entities List14
120 -- Discriminant_Number Uint15
121 -- DT_Position Uint15
122 -- DT_Entry_Count Uint15
123 -- Entry_Bodies_Array Node15
124 -- Entry_Parameters_Type Node15
125 -- Extra_Formal Node15
126 -- Lit_Indexes Node15
127 -- Primitive_Operations Elist15
128 -- Related_Instance Node15
129 -- Scale_Value Uint15
130 -- Storage_Size_Variable Node15
131 -- String_Literal_Low_Bound Node15
132 -- Shared_Var_Read_Proc Node15
134 -- Access_Disp_Table Elist16
135 -- Cloned_Subtype Node16
137 -- Entry_Formal Node16
138 -- First_Private_Entity Node16
139 -- Lit_Strings Node16
140 -- String_Literal_Length Uint16
141 -- Unset_Reference Node16
143 -- Actual_Subtype Node17
144 -- Digits_Value Uint17
145 -- Discriminal Node17
146 -- First_Entity Node17
147 -- First_Index Node17
148 -- First_Literal Node17
151 -- Non_Limited_View Node17
156 -- Corresponding_Concurrent_Type Node18
157 -- Corresponding_Record_Type Node18
158 -- Delta_Value Ureal18
159 -- Enclosing_Scope Node18
160 -- Equivalent_Type Node18
161 -- Private_Dependents Elist18
162 -- Renamed_Entity Node18
163 -- Renamed_Object Node18
165 -- Body_Entity Node19
166 -- Corresponding_Discriminant Node19
167 -- Finalization_Chain_Entity Node19
168 -- Parent_Subtype Node19
169 -- Related_Array_Object Node19
170 -- Size_Check_Code Node19
171 -- Spec_Entity Node19
172 -- Underlying_Full_View Node19
174 -- Component_Type Node20
175 -- Default_Value Node20
176 -- Directly_Designated_Type Node20
177 -- Discriminant_Checking_Func Node20
178 -- Discriminant_Default_Value Node20
179 -- Last_Assignment Node20
180 -- Last_Entity Node20
181 -- Register_Exception_Call Node20
182 -- Scalar_Range Node20
184 -- Accept_Address Elist21
185 -- Default_Expr_Function Node21
186 -- Discriminant_Constraint Elist21
187 -- Interface_Name Node21
188 -- Original_Array_Type Node21
189 -- Small_Value Ureal21
191 -- Associated_Storage_Pool Node22
192 -- Component_Size Uint22
193 -- Corresponding_Remote_Type Node22
194 -- Enumeration_Rep_Expr Node22
195 -- Exception_Code Uint22
196 -- Original_Record_Component Node22
197 -- Private_View Node22
198 -- Protected_Formal Node22
199 -- Scope_Depth_Value Uint22
200 -- Shared_Var_Assign_Proc Node22
202 -- Associated_Final_Chain Node23
203 -- CR_Discriminant Node23
204 -- Stored_Constraint Elist23
205 -- Entry_Cancel_Parameter Node23
206 -- Extra_Constrained Node23
207 -- Generic_Renamings Elist23
208 -- Inner_Instances Elist23
209 -- Enum_Pos_To_Rep Node23
210 -- Packed_Array_Type Node23
211 -- Limited_View Node23
212 -- Privals_Chain Elist23
213 -- Protected_Operation Node23
215 -- Abstract_Interface_Alias Node25
216 -- Abstract_Interfaces Elist25
217 -- Current_Use_Clause Node25
218 -- DT_Offset_To_Top_Func Node25
219 -- Task_Body_Procedure Node25
221 -- Overridden_Operation Node26
222 -- Package_Instantiation Node26
224 -- Wrapped_Entity Node27
226 -- Extra_Formals Node28
228 ---------------------------------------------
229 -- Usage of Flags in Defining Entity Nodes --
230 ---------------------------------------------
232 -- All flags are unique, there is no overlaying, so each flag is physically
233 -- present in every entity. However, for many of the flags, it only makes
234 -- sense for them to be set true for certain subsets of entity kinds. See
235 -- the spec of Einfo for further details.
237 -- Note: Flag1-Flag3 are absent from this list, since these flag positions
238 -- are used for the flags Analyzed, Comes_From_Source, and Error_Posted,
239 -- which are common to all nodes, including entity nodes.
242 -- Has_Discriminants Flag5
243 -- Is_Dispatching_Operation Flag6
244 -- Is_Immediately_Visible Flag7
246 -- Is_Potentially_Use_Visible Flag9
250 -- Is_Constrained Flag12
251 -- Is_Generic_Type Flag13
252 -- Depends_On_Private Flag14
254 -- Is_Volatile Flag16
255 -- Is_Internal Flag17
256 -- Has_Delayed_Freeze Flag18
257 -- Is_Abstract Flag19
258 -- Is_Concurrent_Record_Type Flag20
260 -- Has_Master_Entity Flag21
261 -- Needs_No_Actuals Flag22
262 -- Has_Storage_Size_Clause Flag23
263 -- Is_Imported Flag24
264 -- Is_Limited_Record Flag25
265 -- Has_Completion Flag26
266 -- Has_Pragma_Controlled Flag27
267 -- Is_Statically_Allocated Flag28
268 -- Has_Size_Clause Flag29
271 -- Checks_May_Be_Suppressed Flag31
272 -- Kill_Elaboration_Checks Flag32
273 -- Kill_Range_Checks Flag33
274 -- Kill_Tag_Checks Flag34
275 -- Is_Class_Wide_Equivalent_Type Flag35
276 -- Referenced_As_LHS Flag36
277 -- Is_Known_Non_Null Flag37
278 -- Can_Never_Be_Null Flag38
279 -- Is_Overriding_Operation Flag39
280 -- Body_Needed_For_SAL Flag40
282 -- Treat_As_Volatile Flag41
283 -- Is_Controlled Flag42
284 -- Has_Controlled_Component Flag43
286 -- In_Private_Part Flag45
287 -- Has_Alignment_Clause Flag46
289 -- In_Package_Body Flag48
291 -- Delay_Subprogram_Descriptors Flag50
294 -- Is_Entry_Formal Flag52
295 -- Is_Private_Descendant Flag53
296 -- Return_Present Flag54
297 -- Is_Tagged_Type Flag55
298 -- Has_Homonym Flag56
300 -- Non_Binary_Modulus Flag58
301 -- Is_Preelaborated Flag59
302 -- Is_Shared_Passive Flag60
304 -- Is_Remote_Types Flag61
305 -- Is_Remote_Call_Interface Flag62
306 -- Is_Character_Type Flag63
307 -- Is_Intrinsic_Subprogram Flag64
308 -- Has_Record_Rep_Clause Flag65
309 -- Has_Enumeration_Rep_Clause Flag66
310 -- Has_Small_Clause Flag67
311 -- Has_Component_Size_Clause Flag68
312 -- Is_Access_Constant Flag69
313 -- Is_First_Subtype Flag70
315 -- Has_Completion_In_Body Flag71
316 -- Has_Unknown_Discriminants Flag72
317 -- Is_Child_Unit Flag73
318 -- Is_CPP_Class Flag74
319 -- Has_Non_Standard_Rep Flag75
320 -- Is_Constructor Flag76
321 -- Is_Thread_Body Flag77
323 -- Has_All_Calls_Remote Flag79
324 -- Is_Constr_Subt_For_U_Nominal Flag80
326 -- Is_Asynchronous Flag81
327 -- Has_Gigi_Rep_Item Flag82
328 -- Has_Machine_Radix_Clause Flag83
329 -- Machine_Radix_10 Flag84
331 -- Has_Atomic_Components Flag86
332 -- Has_Volatile_Components Flag87
333 -- Discard_Names Flag88
334 -- Is_Interrupt_Handler Flag89
335 -- Returns_By_Ref Flag90
338 -- Size_Known_At_Compile_Time Flag92
339 -- Has_Subprogram_Descriptor Flag93
340 -- Is_Generic_Actual_Type Flag94
341 -- Uses_Sec_Stack Flag95
342 -- Warnings_Off Flag96
343 -- Is_Controlling_Formal Flag97
344 -- Has_Controlling_Result Flag98
345 -- Is_Exported Flag99
346 -- Has_Specified_Layout Flag100
348 -- Has_Nested_Block_With_Handler Flag101
350 -- Is_Completely_Hidden Flag103
351 -- Address_Taken Flag104
352 -- Suppress_Init_Proc Flag105
353 -- Is_Limited_Composite Flag106
354 -- Is_Private_Composite Flag107
355 -- Default_Expressions_Processed Flag108
356 -- Is_Non_Static_Subtype Flag109
357 -- Has_External_Tag_Rep_Clause Flag110
359 -- Is_Formal_Subprogram Flag111
360 -- Is_Renaming_Of_Object Flag112
362 -- Delay_Cleanups Flag114
363 -- Never_Set_In_Source Flag115
364 -- Is_Visible_Child_Unit Flag116
365 -- Is_Unchecked_Union Flag117
366 -- Is_For_Access_Subtype Flag118
367 -- Has_Convention_Pragma Flag119
368 -- Has_Primitive_Operations Flag120
370 -- Has_Pragma_Pack Flag121
371 -- Is_Bit_Packed_Array Flag122
372 -- Has_Unchecked_Union Flag123
373 -- Is_Eliminated Flag124
374 -- C_Pass_By_Copy Flag125
375 -- Is_Instantiated Flag126
376 -- Is_Valued_Procedure Flag127
377 -- (used for Component_Alignment) Flag128
378 -- (used for Component_Alignment) Flag129
379 -- Is_Generic_Instance Flag130
381 -- No_Pool_Assigned Flag131
382 -- Is_AST_Entry Flag132
383 -- Is_VMS_Exception Flag133
384 -- Is_Optional_Parameter Flag134
385 -- Has_Aliased_Components Flag135
386 -- No_Strict_Aliasing Flag136
387 -- Is_Machine_Code_Subprogram Flag137
388 -- Is_Packed_Array_Type Flag138
389 -- Has_Biased_Representation Flag139
390 -- Has_Complex_Representation Flag140
392 -- Is_Constr_Subt_For_UN_Aliased Flag141
393 -- Has_Missing_Return Flag142
394 -- Has_Recursive_Call Flag143
395 -- Is_Unsigned_Type Flag144
396 -- Strict_Alignment Flag145
398 -- Needs_Debug_Info Flag147
399 -- Suppress_Elaboration_Warnings Flag148
400 -- Is_Compilation_Unit Flag149
401 -- Has_Pragma_Elaborate_Body Flag150
404 -- Entry_Accepted Flag152
405 -- Is_Obsolescent Flag153
406 -- Has_Per_Object_Constraint Flag154
407 -- Has_Private_Declaration Flag155
408 -- Referenced Flag156
409 -- Has_Pragma_Inline Flag157
410 -- Finalize_Storage_Only Flag158
411 -- From_With_Type Flag159
412 -- Is_Package_Body_Entity Flag160
414 -- Has_Qualified_Name Flag161
415 -- Nonzero_Is_True Flag162
416 -- Is_True_Constant Flag163
417 -- Reverse_Bit_Order Flag164
418 -- Suppress_Style_Checks Flag165
419 -- Debug_Info_Off Flag166
420 -- Sec_Stack_Needed_For_Return Flag167
421 -- Materialize_Entity Flag168
422 -- Function_Returns_With_DSP Flag169
423 -- Is_Known_Valid Flag170
425 -- Is_Hidden_Open_Scope Flag171
426 -- Has_Object_Size_Clause Flag172
427 -- Has_Fully_Qualified_Name Flag173
428 -- Elaboration_Entity_Required Flag174
429 -- Has_Forward_Instantiation Flag175
430 -- Is_Discrim_SO_Function Flag176
431 -- Size_Depends_On_Discriminant Flag177
432 -- Is_Null_Init_Proc Flag178
433 -- Has_Pragma_Pure_Function Flag179
434 -- Has_Pragma_Unreferenced Flag180
436 -- Has_Contiguous_Rep Flag181
437 -- Has_Xref_Entry Flag182
438 -- Must_Be_On_Byte_Boundary Flag183
439 -- Has_Stream_Size_Clause Flag184
440 -- Is_Ada_2005_Only Flag185
441 -- Is_Interface Flag186
442 -- Has_Constrained_Partial_View Flag187
443 -- Has_Persistent_BSS Flag188
444 -- Is_Pure_Unit_Access_Type Flag189
445 -- Has_Specified_Stream_Input Flag190
447 -- Has_Specified_Stream_Output Flag191
448 -- Has_Specified_Stream_Read Flag192
449 -- Has_Specified_Stream_Write Flag193
450 -- Is_Local_Anonymous_Access Flag194
451 -- Is_Primitive_Wrapper Flag195
452 -- Was_Hidden Flag196
453 -- Is_Limited_Interface Flag197
454 -- Is_Protected_Interface Flag198
455 -- Is_Synchronized_Interface Flag199
456 -- Is_Task_Interface Flag200
458 -- Has_Anon_Block_Suffix Flag201
459 -- Itype_Printed Flag202
460 -- Has_Pragma_Pure Flag203
461 -- Is_Known_Null Flag204
462 -- Low_Bound_Known Flag205
463 -- Is_Visible_Formal Flag206
464 -- Known_To_Have_Preelab_Init Flag207
465 -- Must_Have_Preelab_Init Flag208
466 -- Is_Return_Object Flag209
467 -- Elaborate_Body_Desirable Flag210
469 -- Has_Static_Discriminants Flag211
476 -----------------------
477 -- Local subprograms --
478 -----------------------
480 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N;
481 -- Returns the attribute definition clause whose name is Rep_Name. Returns
482 -- Empty if not found.
488 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N is
492 Ritem := First_Rep_Item (Id);
493 while Present (Ritem) loop
494 if Nkind (Ritem) = N_Attribute_Definition_Clause
495 and then Chars (Ritem) = Rep_Name
499 Ritem := Next_Rep_Item (Ritem);
506 --------------------------------
507 -- Attribute Access Functions --
508 --------------------------------
510 function Abstract_Interfaces (Id : E) return L is
513 (Ekind (Id) = E_Record_Type
514 or else Ekind (Id) = E_Record_Subtype
515 or else Ekind (Id) = E_Record_Type_With_Private
516 or else Ekind (Id) = E_Record_Subtype_With_Private
517 or else Ekind (Id) = E_Class_Wide_Type);
519 end Abstract_Interfaces;
521 function Abstract_Interface_Alias (Id : E) return E is
523 pragma Assert (Is_Subprogram (Id));
525 end Abstract_Interface_Alias;
527 function Accept_Address (Id : E) return L is
532 function Access_Disp_Table (Id : E) return L is
534 pragma Assert (Is_Tagged_Type (Id));
535 return Elist16 (Implementation_Base_Type (Id));
536 end Access_Disp_Table;
538 function Actual_Subtype (Id : E) return E is
541 (Ekind (Id) = E_Constant
542 or else Ekind (Id) = E_Variable
543 or else Ekind (Id) = E_Generic_In_Out_Parameter
544 or else Ekind (Id) in E_In_Parameter .. E_In_Out_Parameter);
548 function Address_Taken (Id : E) return B is
553 function Alias (Id : E) return E is
556 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
560 function Alignment (Id : E) return U is
562 pragma Assert (Is_Type (Id)
563 or else Is_Formal (Id)
564 or else Ekind (Id) = E_Loop_Parameter
565 or else Ekind (Id) = E_Constant
566 or else Ekind (Id) = E_Exception
567 or else Ekind (Id) = E_Variable);
571 function Associated_Final_Chain (Id : E) return E is
573 pragma Assert (Is_Access_Type (Id));
575 end Associated_Final_Chain;
577 function Associated_Formal_Package (Id : E) return E is
579 pragma Assert (Ekind (Id) = E_Package);
581 end Associated_Formal_Package;
583 function Associated_Node_For_Itype (Id : E) return N is
586 end Associated_Node_For_Itype;
588 function Associated_Storage_Pool (Id : E) return E is
590 pragma Assert (Is_Access_Type (Id));
591 return Node22 (Root_Type (Id));
592 end Associated_Storage_Pool;
594 function Barrier_Function (Id : E) return N is
596 pragma Assert (Is_Entry (Id));
598 end Barrier_Function;
600 function Block_Node (Id : E) return N is
602 pragma Assert (Ekind (Id) = E_Block);
606 function Body_Entity (Id : E) return E is
609 (Ekind (Id) = E_Package or else Ekind (Id) = E_Generic_Package);
613 function Body_Needed_For_SAL (Id : E) return B is
616 (Ekind (Id) = E_Package
617 or else Is_Subprogram (Id)
618 or else Is_Generic_Unit (Id));
620 end Body_Needed_For_SAL;
622 function C_Pass_By_Copy (Id : E) return B is
624 pragma Assert (Is_Record_Type (Id));
625 return Flag125 (Implementation_Base_Type (Id));
628 function Can_Never_Be_Null (Id : E) return B is
631 end Can_Never_Be_Null;
633 function Checks_May_Be_Suppressed (Id : E) return B is
636 end Checks_May_Be_Suppressed;
638 function Class_Wide_Type (Id : E) return E is
640 pragma Assert (Is_Type (Id));
644 function Cloned_Subtype (Id : E) return E is
647 (Ekind (Id) = E_Record_Subtype
648 or else Ekind (Id) = E_Class_Wide_Subtype);
652 function Component_Bit_Offset (Id : E) return U is
655 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
657 end Component_Bit_Offset;
659 function Component_Clause (Id : E) return N is
662 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
664 end Component_Clause;
666 function Component_Size (Id : E) return U is
668 pragma Assert (Is_Array_Type (Id));
669 return Uint22 (Implementation_Base_Type (Id));
672 function Component_Type (Id : E) return E is
674 return Node20 (Implementation_Base_Type (Id));
677 function Corresponding_Concurrent_Type (Id : E) return E is
679 pragma Assert (Ekind (Id) = E_Record_Type);
681 end Corresponding_Concurrent_Type;
683 function Corresponding_Discriminant (Id : E) return E is
685 pragma Assert (Ekind (Id) = E_Discriminant);
687 end Corresponding_Discriminant;
689 function Corresponding_Equality (Id : E) return E is
692 (Ekind (Id) = E_Function
693 and then not Comes_From_Source (Id)
694 and then Chars (Id) = Name_Op_Ne);
696 end Corresponding_Equality;
698 function Corresponding_Record_Type (Id : E) return E is
700 pragma Assert (Is_Concurrent_Type (Id));
702 end Corresponding_Record_Type;
704 function Corresponding_Remote_Type (Id : E) return E is
707 end Corresponding_Remote_Type;
709 function Current_Use_Clause (Id : E) return E is
711 pragma Assert (Ekind (Id) = E_Package);
713 end Current_Use_Clause;
715 function Current_Value (Id : E) return N is
717 pragma Assert (Ekind (Id) in Object_Kind);
721 function CR_Discriminant (Id : E) return E is
726 function Debug_Info_Off (Id : E) return B is
731 function Debug_Renaming_Link (Id : E) return E is
734 end Debug_Renaming_Link;
736 function Default_Expr_Function (Id : E) return E is
738 pragma Assert (Is_Formal (Id));
740 end Default_Expr_Function;
742 function Default_Expressions_Processed (Id : E) return B is
745 end Default_Expressions_Processed;
747 function Default_Value (Id : E) return N is
749 pragma Assert (Is_Formal (Id));
753 function Delay_Cleanups (Id : E) return B is
758 function Delay_Subprogram_Descriptors (Id : E) return B is
761 end Delay_Subprogram_Descriptors;
763 function Delta_Value (Id : E) return R is
765 pragma Assert (Is_Fixed_Point_Type (Id));
769 function Dependent_Instances (Id : E) return L is
771 pragma Assert (Is_Generic_Instance (Id));
773 end Dependent_Instances;
775 function Depends_On_Private (Id : E) return B is
777 pragma Assert (Nkind (Id) in N_Entity);
779 end Depends_On_Private;
781 function Digits_Value (Id : E) return U is
784 (Is_Floating_Point_Type (Id)
785 or else Is_Decimal_Fixed_Point_Type (Id));
789 function Directly_Designated_Type (Id : E) return E is
792 end Directly_Designated_Type;
794 function Discard_Names (Id : E) return B is
799 function Discriminal (Id : E) return E is
801 pragma Assert (Ekind (Id) = E_Discriminant);
805 function Discriminal_Link (Id : E) return N is
808 end Discriminal_Link;
810 function Discriminant_Checking_Func (Id : E) return E is
812 pragma Assert (Ekind (Id) = E_Component);
814 end Discriminant_Checking_Func;
816 function Discriminant_Constraint (Id : E) return L is
818 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
820 end Discriminant_Constraint;
822 function Discriminant_Default_Value (Id : E) return N is
824 pragma Assert (Ekind (Id) = E_Discriminant);
826 end Discriminant_Default_Value;
828 function Discriminant_Number (Id : E) return U is
830 pragma Assert (Ekind (Id) = E_Discriminant);
832 end Discriminant_Number;
834 function DT_Entry_Count (Id : E) return U is
836 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
840 function DT_Offset_To_Top_Func (Id : E) return E is
842 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
844 end DT_Offset_To_Top_Func;
846 function DT_Position (Id : E) return U is
849 ((Ekind (Id) = E_Function
850 or else Ekind (Id) = E_Procedure)
851 and then Present (DTC_Entity (Id)));
855 function DTC_Entity (Id : E) return E is
858 (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
862 function Elaborate_Body_Desirable (Id : E) return B is
864 pragma Assert (Ekind (Id) = E_Package);
866 end Elaborate_Body_Desirable;
868 function Elaboration_Entity (Id : E) return E is
873 Ekind (Id) = E_Package
875 Is_Generic_Unit (Id));
877 end Elaboration_Entity;
879 function Elaboration_Entity_Required (Id : E) return B is
884 Ekind (Id) = E_Package
886 Is_Generic_Unit (Id));
888 end Elaboration_Entity_Required;
890 function Enclosing_Scope (Id : E) return E is
895 function Entry_Accepted (Id : E) return B is
897 pragma Assert (Is_Entry (Id));
901 function Entry_Bodies_Array (Id : E) return E is
904 end Entry_Bodies_Array;
906 function Entry_Cancel_Parameter (Id : E) return E is
909 end Entry_Cancel_Parameter;
911 function Entry_Component (Id : E) return E is
916 function Entry_Formal (Id : E) return E is
921 function Entry_Index_Constant (Id : E) return N is
923 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
925 end Entry_Index_Constant;
927 function Entry_Parameters_Type (Id : E) return E is
930 end Entry_Parameters_Type;
932 function Enum_Pos_To_Rep (Id : E) return E is
934 pragma Assert (Ekind (Id) = E_Enumeration_Type);
938 function Enumeration_Pos (Id : E) return Uint is
940 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
944 function Enumeration_Rep (Id : E) return U is
946 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
950 function Enumeration_Rep_Expr (Id : E) return N is
952 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
954 end Enumeration_Rep_Expr;
956 function Equivalent_Type (Id : E) return E is
959 (Ekind (Id) = E_Class_Wide_Subtype or else
960 Ekind (Id) = E_Access_Protected_Subprogram_Type or else
961 Ekind (Id) = E_Access_Subprogram_Type or else
962 Ekind (Id) = E_Exception_Type);
966 function Esize (Id : E) return Uint is
971 function Exception_Code (Id : E) return Uint is
973 pragma Assert (Ekind (Id) = E_Exception);
977 function Extra_Accessibility (Id : E) return E is
979 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
981 end Extra_Accessibility;
983 function Extra_Constrained (Id : E) return E is
985 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
987 end Extra_Constrained;
989 function Extra_Formal (Id : E) return E is
994 function Extra_Formals (Id : E) return E is
997 (Is_Overloadable (Id)
998 or else Ekind (Id) = E_Entry_Family
999 or else Ekind (Id) = E_Subprogram_Body
1000 or else Ekind (Id) = E_Subprogram_Type);
1004 function Finalization_Chain_Entity (Id : E) return E is
1007 end Finalization_Chain_Entity;
1009 function Finalize_Storage_Only (Id : E) return B is
1011 pragma Assert (Is_Type (Id));
1012 return Flag158 (Base_Type (Id));
1013 end Finalize_Storage_Only;
1015 function First_Entity (Id : E) return E is
1020 function First_Index (Id : E) return N is
1025 function First_Literal (Id : E) return E is
1030 function First_Optional_Parameter (Id : E) return E is
1033 (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
1035 end First_Optional_Parameter;
1037 function First_Private_Entity (Id : E) return E is
1039 pragma Assert (Ekind (Id) = E_Package
1040 or else Ekind (Id) = E_Generic_Package
1041 or else Ekind (Id) in Concurrent_Kind);
1043 end First_Private_Entity;
1045 function First_Rep_Item (Id : E) return E is
1050 function Freeze_Node (Id : E) return N is
1055 function From_With_Type (Id : E) return B is
1057 return Flag159 (Id);
1060 function Full_View (Id : E) return E is
1062 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1066 function Function_Returns_With_DSP (Id : E) return B is
1069 (Is_Subprogram (Id) or else Ekind (Id) = E_Subprogram_Type);
1070 return Flag169 (Id);
1071 end Function_Returns_With_DSP;
1073 function Generic_Homonym (Id : E) return E is
1075 pragma Assert (Ekind (Id) = E_Generic_Package);
1077 end Generic_Homonym;
1079 function Generic_Renamings (Id : E) return L is
1081 return Elist23 (Id);
1082 end Generic_Renamings;
1084 function Handler_Records (Id : E) return S is
1087 end Handler_Records;
1089 function Has_Aliased_Components (Id : E) return B is
1091 return Flag135 (Implementation_Base_Type (Id));
1092 end Has_Aliased_Components;
1094 function Has_Alignment_Clause (Id : E) return B is
1097 end Has_Alignment_Clause;
1099 function Has_All_Calls_Remote (Id : E) return B is
1102 end Has_All_Calls_Remote;
1104 function Has_Anon_Block_Suffix (Id : E) return B is
1106 return Flag201 (Id);
1107 end Has_Anon_Block_Suffix;
1109 function Has_Atomic_Components (Id : E) return B is
1111 return Flag86 (Implementation_Base_Type (Id));
1112 end Has_Atomic_Components;
1114 function Has_Biased_Representation (Id : E) return B is
1116 return Flag139 (Id);
1117 end Has_Biased_Representation;
1119 function Has_Completion (Id : E) return B is
1124 function Has_Completion_In_Body (Id : E) return B is
1126 pragma Assert (Is_Type (Id));
1128 end Has_Completion_In_Body;
1130 function Has_Complex_Representation (Id : E) return B is
1132 pragma Assert (Is_Type (Id));
1133 return Flag140 (Implementation_Base_Type (Id));
1134 end Has_Complex_Representation;
1136 function Has_Component_Size_Clause (Id : E) return B is
1138 pragma Assert (Is_Array_Type (Id));
1139 return Flag68 (Implementation_Base_Type (Id));
1140 end Has_Component_Size_Clause;
1142 function Has_Constrained_Partial_View (Id : E) return B is
1144 pragma Assert (Is_Type (Id));
1145 return Flag187 (Id);
1146 end Has_Constrained_Partial_View;
1148 function Has_Controlled_Component (Id : E) return B is
1150 return Flag43 (Base_Type (Id));
1151 end Has_Controlled_Component;
1153 function Has_Contiguous_Rep (Id : E) return B is
1155 return Flag181 (Id);
1156 end Has_Contiguous_Rep;
1158 function Has_Controlling_Result (Id : E) return B is
1161 end Has_Controlling_Result;
1163 function Has_Convention_Pragma (Id : E) return B is
1165 return Flag119 (Id);
1166 end Has_Convention_Pragma;
1168 function Has_Delayed_Freeze (Id : E) return B is
1170 pragma Assert (Nkind (Id) in N_Entity);
1172 end Has_Delayed_Freeze;
1174 function Has_Discriminants (Id : E) return B is
1176 pragma Assert (Nkind (Id) in N_Entity);
1178 end Has_Discriminants;
1180 function Has_Enumeration_Rep_Clause (Id : E) return B is
1182 pragma Assert (Is_Enumeration_Type (Id));
1184 end Has_Enumeration_Rep_Clause;
1186 function Has_Exit (Id : E) return B is
1191 function Has_External_Tag_Rep_Clause (Id : E) return B is
1193 pragma Assert (Is_Tagged_Type (Id));
1194 return Flag110 (Id);
1195 end Has_External_Tag_Rep_Clause;
1197 function Has_Forward_Instantiation (Id : E) return B is
1199 return Flag175 (Id);
1200 end Has_Forward_Instantiation;
1202 function Has_Fully_Qualified_Name (Id : E) return B is
1204 return Flag173 (Id);
1205 end Has_Fully_Qualified_Name;
1207 function Has_Gigi_Rep_Item (Id : E) return B is
1210 end Has_Gigi_Rep_Item;
1212 function Has_Homonym (Id : E) return B is
1217 function Has_Machine_Radix_Clause (Id : E) return B is
1219 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1221 end Has_Machine_Radix_Clause;
1223 function Has_Master_Entity (Id : E) return B is
1226 end Has_Master_Entity;
1228 function Has_Missing_Return (Id : E) return B is
1231 (Ekind (Id) = E_Function or else Ekind (Id) = E_Generic_Function);
1232 return Flag142 (Id);
1233 end Has_Missing_Return;
1235 function Has_Nested_Block_With_Handler (Id : E) return B is
1237 return Flag101 (Id);
1238 end Has_Nested_Block_With_Handler;
1240 function Has_Non_Standard_Rep (Id : E) return B is
1242 return Flag75 (Implementation_Base_Type (Id));
1243 end Has_Non_Standard_Rep;
1245 function Has_Object_Size_Clause (Id : E) return B is
1247 pragma Assert (Is_Type (Id));
1248 return Flag172 (Id);
1249 end Has_Object_Size_Clause;
1251 function Has_Per_Object_Constraint (Id : E) return B is
1253 return Flag154 (Id);
1254 end Has_Per_Object_Constraint;
1256 function Has_Persistent_BSS (Id : E) return B is
1258 return Flag188 (Id);
1259 end Has_Persistent_BSS;
1261 function Has_Pragma_Controlled (Id : E) return B is
1263 pragma Assert (Is_Access_Type (Id));
1264 return Flag27 (Implementation_Base_Type (Id));
1265 end Has_Pragma_Controlled;
1267 function Has_Pragma_Elaborate_Body (Id : E) return B is
1269 return Flag150 (Id);
1270 end Has_Pragma_Elaborate_Body;
1272 function Has_Pragma_Inline (Id : E) return B is
1274 return Flag157 (Id);
1275 end Has_Pragma_Inline;
1277 function Has_Pragma_Pack (Id : E) return B is
1279 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1280 return Flag121 (Implementation_Base_Type (Id));
1281 end Has_Pragma_Pack;
1283 function Has_Pragma_Pure (Id : E) return B is
1285 return Flag203 (Id);
1286 end Has_Pragma_Pure;
1288 function Has_Pragma_Pure_Function (Id : E) return B is
1290 return Flag179 (Id);
1291 end Has_Pragma_Pure_Function;
1293 function Has_Pragma_Unreferenced (Id : E) return B is
1295 return Flag180 (Id);
1296 end Has_Pragma_Unreferenced;
1298 function Has_Primitive_Operations (Id : E) return B is
1300 pragma Assert (Is_Type (Id));
1301 return Flag120 (Base_Type (Id));
1302 end Has_Primitive_Operations;
1304 function Has_Private_Declaration (Id : E) return B is
1306 return Flag155 (Id);
1307 end Has_Private_Declaration;
1309 function Has_Qualified_Name (Id : E) return B is
1311 return Flag161 (Id);
1312 end Has_Qualified_Name;
1314 function Has_Record_Rep_Clause (Id : E) return B is
1316 pragma Assert (Is_Record_Type (Id));
1317 return Flag65 (Implementation_Base_Type (Id));
1318 end Has_Record_Rep_Clause;
1320 function Has_Recursive_Call (Id : E) return B is
1322 pragma Assert (Is_Subprogram (Id));
1323 return Flag143 (Id);
1324 end Has_Recursive_Call;
1326 function Has_Size_Clause (Id : E) return B is
1329 end Has_Size_Clause;
1331 function Has_Small_Clause (Id : E) return B is
1334 end Has_Small_Clause;
1336 function Has_Specified_Layout (Id : E) return B is
1338 pragma Assert (Is_Type (Id));
1339 return Flag100 (Implementation_Base_Type (Id));
1340 end Has_Specified_Layout;
1342 function Has_Specified_Stream_Input (Id : E) return B is
1344 pragma Assert (Is_Type (Id));
1345 return Flag190 (Id);
1346 end Has_Specified_Stream_Input;
1348 function Has_Specified_Stream_Output (Id : E) return B is
1350 pragma Assert (Is_Type (Id));
1351 return Flag191 (Id);
1352 end Has_Specified_Stream_Output;
1354 function Has_Specified_Stream_Read (Id : E) return B is
1356 pragma Assert (Is_Type (Id));
1357 return Flag192 (Id);
1358 end Has_Specified_Stream_Read;
1360 function Has_Specified_Stream_Write (Id : E) return B is
1362 pragma Assert (Is_Type (Id));
1363 return Flag193 (Id);
1364 end Has_Specified_Stream_Write;
1366 function Has_Static_Discriminants (Id : E) return B is
1368 pragma Assert (Is_Type (Id));
1369 return Flag211 (Id);
1370 end Has_Static_Discriminants;
1372 function Has_Storage_Size_Clause (Id : E) return B is
1374 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1375 return Flag23 (Implementation_Base_Type (Id));
1376 end Has_Storage_Size_Clause;
1378 function Has_Stream_Size_Clause (Id : E) return B is
1380 pragma Assert (Is_Elementary_Type (Id));
1381 return Flag184 (Id);
1382 end Has_Stream_Size_Clause;
1384 function Has_Subprogram_Descriptor (Id : E) return B is
1387 end Has_Subprogram_Descriptor;
1389 function Has_Task (Id : E) return B is
1391 return Flag30 (Base_Type (Id));
1394 function Has_Unchecked_Union (Id : E) return B is
1396 return Flag123 (Base_Type (Id));
1397 end Has_Unchecked_Union;
1399 function Has_Unknown_Discriminants (Id : E) return B is
1401 pragma Assert (Is_Type (Id));
1403 end Has_Unknown_Discriminants;
1405 function Has_Volatile_Components (Id : E) return B is
1407 return Flag87 (Implementation_Base_Type (Id));
1408 end Has_Volatile_Components;
1410 function Has_Xref_Entry (Id : E) return B is
1412 return Flag182 (Implementation_Base_Type (Id));
1415 function Hiding_Loop_Variable (Id : E) return E is
1417 pragma Assert (Ekind (Id) = E_Variable);
1419 end Hiding_Loop_Variable;
1421 function Homonym (Id : E) return E is
1426 function In_Package_Body (Id : E) return B is
1429 end In_Package_Body;
1431 function In_Private_Part (Id : E) return B is
1434 end In_Private_Part;
1436 function In_Use (Id : E) return B is
1438 pragma Assert (Nkind (Id) in N_Entity);
1442 function Inner_Instances (Id : E) return L is
1444 return Elist23 (Id);
1445 end Inner_Instances;
1447 function Interface_Name (Id : E) return N is
1452 function Is_Abstract (Id : E) return B is
1457 function Is_Local_Anonymous_Access (Id : E) return B is
1459 pragma Assert (Is_Access_Type (Id));
1460 return Flag194 (Id);
1461 end Is_Local_Anonymous_Access;
1463 function Is_Access_Constant (Id : E) return B is
1465 pragma Assert (Is_Access_Type (Id));
1467 end Is_Access_Constant;
1469 function Is_Ada_2005_Only (Id : E) return B is
1471 return Flag185 (Id);
1472 end Is_Ada_2005_Only;
1474 function Is_Aliased (Id : E) return B is
1476 pragma Assert (Nkind (Id) in N_Entity);
1480 function Is_AST_Entry (Id : E) return B is
1482 pragma Assert (Is_Entry (Id));
1483 return Flag132 (Id);
1486 function Is_Asynchronous (Id : E) return B is
1489 (Ekind (Id) = E_Procedure or else Is_Type (Id));
1491 end Is_Asynchronous;
1493 function Is_Atomic (Id : E) return B is
1498 function Is_Bit_Packed_Array (Id : E) return B is
1500 return Flag122 (Implementation_Base_Type (Id));
1501 end Is_Bit_Packed_Array;
1503 function Is_Called (Id : E) return B is
1506 (Ekind (Id) = E_Procedure or else Ekind (Id) = E_Function);
1507 return Flag102 (Id);
1510 function Is_Character_Type (Id : E) return B is
1513 end Is_Character_Type;
1515 function Is_Child_Unit (Id : E) return B is
1520 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1523 end Is_Class_Wide_Equivalent_Type;
1525 function Is_Compilation_Unit (Id : E) return B is
1527 return Flag149 (Id);
1528 end Is_Compilation_Unit;
1530 function Is_Completely_Hidden (Id : E) return B is
1532 pragma Assert (Ekind (Id) = E_Discriminant);
1533 return Flag103 (Id);
1534 end Is_Completely_Hidden;
1536 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1539 end Is_Constr_Subt_For_U_Nominal;
1541 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1543 return Flag141 (Id);
1544 end Is_Constr_Subt_For_UN_Aliased;
1546 function Is_Constrained (Id : E) return B is
1548 pragma Assert (Nkind (Id) in N_Entity);
1552 function Is_Constructor (Id : E) return B is
1557 function Is_Controlled (Id : E) return B is
1559 return Flag42 (Base_Type (Id));
1562 function Is_Controlling_Formal (Id : E) return B is
1564 pragma Assert (Is_Formal (Id));
1566 end Is_Controlling_Formal;
1568 function Is_CPP_Class (Id : E) return B is
1573 function Is_Discrim_SO_Function (Id : E) return B is
1575 return Flag176 (Id);
1576 end Is_Discrim_SO_Function;
1578 function Is_Dispatching_Operation (Id : E) return B is
1580 pragma Assert (Nkind (Id) in N_Entity);
1582 end Is_Dispatching_Operation;
1584 function Is_Eliminated (Id : E) return B is
1586 return Flag124 (Id);
1589 function Is_Entry_Formal (Id : E) return B is
1592 end Is_Entry_Formal;
1594 function Is_Exported (Id : E) return B is
1599 function Is_First_Subtype (Id : E) return B is
1602 end Is_First_Subtype;
1604 function Is_For_Access_Subtype (Id : E) return B is
1607 (Ekind (Id) = E_Record_Subtype
1609 Ekind (Id) = E_Private_Subtype);
1610 return Flag118 (Id);
1611 end Is_For_Access_Subtype;
1613 function Is_Formal_Subprogram (Id : E) return B is
1615 return Flag111 (Id);
1616 end Is_Formal_Subprogram;
1618 function Is_Frozen (Id : E) return B is
1623 function Is_Generic_Actual_Type (Id : E) return B is
1625 pragma Assert (Is_Type (Id));
1627 end Is_Generic_Actual_Type;
1629 function Is_Generic_Instance (Id : E) return B is
1631 return Flag130 (Id);
1632 end Is_Generic_Instance;
1634 function Is_Generic_Type (Id : E) return B is
1636 pragma Assert (Nkind (Id) in N_Entity);
1638 end Is_Generic_Type;
1640 function Is_Hidden (Id : E) return B is
1645 function Is_Hidden_Open_Scope (Id : E) return B is
1647 return Flag171 (Id);
1648 end Is_Hidden_Open_Scope;
1650 function Is_Immediately_Visible (Id : E) return B is
1652 pragma Assert (Nkind (Id) in N_Entity);
1654 end Is_Immediately_Visible;
1656 function Is_Imported (Id : E) return B is
1661 function Is_Inlined (Id : E) return B is
1666 function Is_Interface (Id : E) return B is
1668 return Flag186 (Id);
1671 function Is_Instantiated (Id : E) return B is
1673 return Flag126 (Id);
1674 end Is_Instantiated;
1676 function Is_Internal (Id : E) return B is
1678 pragma Assert (Nkind (Id) in N_Entity);
1682 function Is_Interrupt_Handler (Id : E) return B is
1684 pragma Assert (Nkind (Id) in N_Entity);
1686 end Is_Interrupt_Handler;
1688 function Is_Intrinsic_Subprogram (Id : E) return B is
1691 end Is_Intrinsic_Subprogram;
1693 function Is_Itype (Id : E) return B is
1698 function Is_Known_Non_Null (Id : E) return B is
1701 end Is_Known_Non_Null;
1703 function Is_Known_Null (Id : E) return B is
1705 return Flag204 (Id);
1708 function Is_Known_Valid (Id : E) return B is
1710 return Flag170 (Id);
1713 function Is_Limited_Composite (Id : E) return B is
1715 return Flag106 (Id);
1716 end Is_Limited_Composite;
1718 function Is_Limited_Interface (Id : E) return B is
1720 pragma Assert (Is_Interface (Id));
1721 return Flag197 (Id);
1722 end Is_Limited_Interface;
1724 function Is_Limited_Record (Id : E) return B is
1727 end Is_Limited_Record;
1729 function Is_Machine_Code_Subprogram (Id : E) return B is
1731 pragma Assert (Is_Subprogram (Id));
1732 return Flag137 (Id);
1733 end Is_Machine_Code_Subprogram;
1735 function Is_Non_Static_Subtype (Id : E) return B is
1737 pragma Assert (Is_Type (Id));
1738 return Flag109 (Id);
1739 end Is_Non_Static_Subtype;
1741 function Is_Null_Init_Proc (Id : E) return B is
1743 pragma Assert (Ekind (Id) = E_Procedure);
1744 return Flag178 (Id);
1745 end Is_Null_Init_Proc;
1747 function Is_Obsolescent (Id : E) return B is
1749 return Flag153 (Id);
1752 function Is_Optional_Parameter (Id : E) return B is
1754 pragma Assert (Is_Formal (Id));
1755 return Flag134 (Id);
1756 end Is_Optional_Parameter;
1758 function Is_Overriding_Operation (Id : E) return B is
1760 pragma Assert (Is_Subprogram (Id));
1762 end Is_Overriding_Operation;
1764 function Is_Package_Body_Entity (Id : E) return B is
1766 return Flag160 (Id);
1767 end Is_Package_Body_Entity;
1769 function Is_Packed (Id : E) return B is
1771 return Flag51 (Implementation_Base_Type (Id));
1774 function Is_Packed_Array_Type (Id : E) return B is
1776 return Flag138 (Id);
1777 end Is_Packed_Array_Type;
1779 function Is_Potentially_Use_Visible (Id : E) return B is
1781 pragma Assert (Nkind (Id) in N_Entity);
1783 end Is_Potentially_Use_Visible;
1785 function Is_Preelaborated (Id : E) return B is
1788 end Is_Preelaborated;
1790 function Is_Primitive_Wrapper (Id : E) return B is
1792 pragma Assert (Ekind (Id) = E_Procedure);
1793 return Flag195 (Id);
1794 end Is_Primitive_Wrapper;
1796 function Is_Private_Composite (Id : E) return B is
1798 pragma Assert (Is_Type (Id));
1799 return Flag107 (Id);
1800 end Is_Private_Composite;
1802 function Is_Private_Descendant (Id : E) return B is
1805 end Is_Private_Descendant;
1807 function Is_Protected_Interface (Id : E) return B is
1809 pragma Assert (Is_Interface (Id));
1810 return Flag198 (Id);
1811 end Is_Protected_Interface;
1813 function Is_Public (Id : E) return B is
1815 pragma Assert (Nkind (Id) in N_Entity);
1819 function Is_Pure (Id : E) return B is
1824 function Is_Pure_Unit_Access_Type (Id : E) return B is
1826 pragma Assert (Is_Access_Type (Id));
1827 return Flag189 (Id);
1828 end Is_Pure_Unit_Access_Type;
1830 function Is_Remote_Call_Interface (Id : E) return B is
1833 end Is_Remote_Call_Interface;
1835 function Is_Remote_Types (Id : E) return B is
1838 end Is_Remote_Types;
1840 function Is_Renaming_Of_Object (Id : E) return B is
1842 return Flag112 (Id);
1843 end Is_Renaming_Of_Object;
1845 function Is_Return_Object (Id : E) return B is
1847 return Flag209 (Id);
1848 end Is_Return_Object;
1850 function Is_Shared_Passive (Id : E) return B is
1853 end Is_Shared_Passive;
1855 function Is_Statically_Allocated (Id : E) return B is
1858 end Is_Statically_Allocated;
1860 function Is_Synchronized_Interface (Id : E) return B is
1862 pragma Assert (Is_Interface (Id));
1863 return Flag199 (Id);
1864 end Is_Synchronized_Interface;
1866 function Is_Tag (Id : E) return B is
1868 pragma Assert (Nkind (Id) in N_Entity);
1872 function Is_Tagged_Type (Id : E) return B is
1877 function Is_Task_Interface (Id : E) return B is
1879 pragma Assert (Is_Interface (Id));
1880 return Flag200 (Id);
1881 end Is_Task_Interface;
1883 function Is_Thread_Body (Id : E) return B is
1888 function Is_True_Constant (Id : E) return B is
1890 return Flag163 (Id);
1891 end Is_True_Constant;
1893 function Is_Unchecked_Union (Id : E) return B is
1895 return Flag117 (Implementation_Base_Type (Id));
1896 end Is_Unchecked_Union;
1898 function Is_Unsigned_Type (Id : E) return B is
1900 pragma Assert (Is_Type (Id));
1901 return Flag144 (Id);
1902 end Is_Unsigned_Type;
1904 function Is_Valued_Procedure (Id : E) return B is
1906 pragma Assert (Ekind (Id) = E_Procedure);
1907 return Flag127 (Id);
1908 end Is_Valued_Procedure;
1910 function Is_Visible_Child_Unit (Id : E) return B is
1912 pragma Assert (Is_Child_Unit (Id));
1913 return Flag116 (Id);
1914 end Is_Visible_Child_Unit;
1916 function Is_Visible_Formal (Id : E) return B is
1918 return Flag206 (Id);
1919 end Is_Visible_Formal;
1921 function Is_VMS_Exception (Id : E) return B is
1923 return Flag133 (Id);
1924 end Is_VMS_Exception;
1926 function Is_Volatile (Id : E) return B is
1928 pragma Assert (Nkind (Id) in N_Entity);
1930 if Is_Type (Id) then
1931 return Flag16 (Base_Type (Id));
1937 function Itype_Printed (Id : E) return B is
1939 pragma Assert (Is_Itype (Id));
1940 return Flag202 (Id);
1943 function Kill_Elaboration_Checks (Id : E) return B is
1946 end Kill_Elaboration_Checks;
1948 function Kill_Range_Checks (Id : E) return B is
1951 end Kill_Range_Checks;
1953 function Kill_Tag_Checks (Id : E) return B is
1956 end Kill_Tag_Checks;
1958 function Known_To_Have_Preelab_Init (Id : E) return B is
1960 pragma Assert (Is_Type (Id));
1961 return Flag207 (Id);
1962 end Known_To_Have_Preelab_Init;
1964 function Last_Assignment (Id : E) return N is
1966 pragma Assert (Ekind (Id) = E_Variable);
1968 end Last_Assignment;
1970 function Last_Entity (Id : E) return E is
1975 function Limited_View (Id : E) return E is
1977 pragma Assert (Ekind (Id) = E_Package);
1981 function Lit_Indexes (Id : E) return E is
1983 pragma Assert (Is_Enumeration_Type (Id));
1987 function Lit_Strings (Id : E) return E is
1989 pragma Assert (Is_Enumeration_Type (Id));
1993 function Low_Bound_Known (Id : E) return B is
1995 return Flag205 (Id);
1996 end Low_Bound_Known;
1998 function Machine_Radix_10 (Id : E) return B is
2000 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2002 end Machine_Radix_10;
2004 function Master_Id (Id : E) return E is
2009 function Materialize_Entity (Id : E) return B is
2011 return Flag168 (Id);
2012 end Materialize_Entity;
2014 function Mechanism (Id : E) return M is
2016 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2017 return UI_To_Int (Uint8 (Id));
2020 function Modulus (Id : E) return Uint is
2022 pragma Assert (Is_Modular_Integer_Type (Id));
2023 return Uint17 (Base_Type (Id));
2026 function Must_Be_On_Byte_Boundary (Id : E) return B is
2028 pragma Assert (Is_Type (Id));
2029 return Flag183 (Id);
2030 end Must_Be_On_Byte_Boundary;
2032 function Must_Have_Preelab_Init (Id : E) return B is
2034 pragma Assert (Is_Type (Id));
2035 return Flag208 (Id);
2036 end Must_Have_Preelab_Init;
2038 function Needs_Debug_Info (Id : E) return B is
2040 return Flag147 (Id);
2041 end Needs_Debug_Info;
2043 function Needs_No_Actuals (Id : E) return B is
2046 (Is_Overloadable (Id)
2047 or else Ekind (Id) = E_Subprogram_Type
2048 or else Ekind (Id) = E_Entry_Family);
2050 end Needs_No_Actuals;
2052 function Never_Set_In_Source (Id : E) return B is
2054 return Flag115 (Id);
2055 end Never_Set_In_Source;
2057 function Next_Inlined_Subprogram (Id : E) return E is
2060 end Next_Inlined_Subprogram;
2062 function No_Pool_Assigned (Id : E) return B is
2064 pragma Assert (Is_Access_Type (Id));
2065 return Flag131 (Root_Type (Id));
2066 end No_Pool_Assigned;
2068 function No_Return (Id : E) return B is
2070 return Flag113 (Id);
2073 function No_Strict_Aliasing (Id : E) return B is
2075 pragma Assert (Is_Access_Type (Id));
2076 return Flag136 (Base_Type (Id));
2077 end No_Strict_Aliasing;
2079 function Non_Binary_Modulus (Id : E) return B is
2081 pragma Assert (Is_Modular_Integer_Type (Id));
2082 return Flag58 (Base_Type (Id));
2083 end Non_Binary_Modulus;
2085 function Non_Limited_View (Id : E) return E is
2087 pragma Assert (False
2088 or else Ekind (Id) in Incomplete_Kind);
2090 end Non_Limited_View;
2092 function Nonzero_Is_True (Id : E) return B is
2094 pragma Assert (Root_Type (Id) = Standard_Boolean);
2095 return Flag162 (Base_Type (Id));
2096 end Nonzero_Is_True;
2098 function Normalized_First_Bit (Id : E) return U is
2101 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
2103 end Normalized_First_Bit;
2105 function Normalized_Position (Id : E) return U is
2108 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
2110 end Normalized_Position;
2112 function Normalized_Position_Max (Id : E) return U is
2115 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
2117 end Normalized_Position_Max;
2119 function Object_Ref (Id : E) return E is
2121 pragma Assert (Ekind (Id) = E_Protected_Body);
2125 function Obsolescent_Warning (Id : E) return N is
2128 end Obsolescent_Warning;
2130 function Original_Access_Type (Id : E) return E is
2133 (Ekind (Id) = E_Access_Subprogram_Type
2134 or else Ekind (Id) = E_Access_Protected_Subprogram_Type);
2136 end Original_Access_Type;
2138 function Original_Array_Type (Id : E) return E is
2140 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2142 end Original_Array_Type;
2144 function Original_Record_Component (Id : E) return E is
2147 (Ekind (Id) = E_Void
2148 or else Ekind (Id) = E_Component
2149 or else Ekind (Id) = E_Discriminant);
2151 end Original_Record_Component;
2153 function Overridden_Operation (Id : E) return E is
2156 end Overridden_Operation;
2158 function Package_Instantiation (Id : E) return N is
2162 or else Ekind (Id) = E_Generic_Package
2163 or else Ekind (Id) = E_Package);
2165 end Package_Instantiation;
2167 function Packed_Array_Type (Id : E) return E is
2169 pragma Assert (Is_Array_Type (Id));
2171 end Packed_Array_Type;
2173 function Parent_Subtype (Id : E) return E is
2175 pragma Assert (Ekind (Id) = E_Record_Type);
2179 function Primitive_Operations (Id : E) return L is
2181 pragma Assert (Is_Tagged_Type (Id));
2182 return Elist15 (Id);
2183 end Primitive_Operations;
2185 function Prival (Id : E) return E is
2187 pragma Assert (Is_Protected_Private (Id));
2191 function Privals_Chain (Id : E) return L is
2193 pragma Assert (Is_Overloadable (Id)
2194 or else Ekind (Id) = E_Entry_Family);
2195 return Elist23 (Id);
2198 function Private_Dependents (Id : E) return L is
2200 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2201 return Elist18 (Id);
2202 end Private_Dependents;
2204 function Private_View (Id : E) return N is
2206 pragma Assert (Is_Private_Type (Id));
2210 function Protected_Body_Subprogram (Id : E) return E is
2212 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2214 end Protected_Body_Subprogram;
2216 function Protected_Formal (Id : E) return E is
2218 pragma Assert (Is_Formal (Id));
2220 end Protected_Formal;
2222 function Protected_Operation (Id : E) return N is
2224 pragma Assert (Is_Protected_Private (Id));
2226 end Protected_Operation;
2228 function Reachable (Id : E) return B is
2233 function Referenced (Id : E) return B is
2235 return Flag156 (Id);
2238 function Referenced_As_LHS (Id : E) return B is
2241 end Referenced_As_LHS;
2243 function Referenced_Object (Id : E) return N is
2245 pragma Assert (Is_Type (Id));
2247 end Referenced_Object;
2249 function Register_Exception_Call (Id : E) return N is
2251 pragma Assert (Ekind (Id) = E_Exception);
2253 end Register_Exception_Call;
2255 function Related_Array_Object (Id : E) return E is
2257 pragma Assert (Is_Array_Type (Id));
2259 end Related_Array_Object;
2261 function Related_Instance (Id : E) return E is
2264 (Ekind (Id) = E_Package or else Ekind (Id) = E_Package_Body);
2266 end Related_Instance;
2268 function Renamed_Entity (Id : E) return N is
2273 function Renamed_Object (Id : E) return N is
2278 function Renaming_Map (Id : E) return U is
2283 function Return_Present (Id : E) return B is
2288 function Return_Applies_To (Id : E) return N is
2291 end Return_Applies_To;
2293 function Returns_By_Ref (Id : E) return B is
2298 function Reverse_Bit_Order (Id : E) return B is
2300 pragma Assert (Is_Record_Type (Id));
2301 return Flag164 (Base_Type (Id));
2302 end Reverse_Bit_Order;
2304 function RM_Size (Id : E) return U is
2306 pragma Assert (Is_Type (Id));
2310 function Scalar_Range (Id : E) return N is
2315 function Scale_Value (Id : E) return U is
2320 function Scope_Depth_Value (Id : E) return U is
2323 end Scope_Depth_Value;
2325 function Sec_Stack_Needed_For_Return (Id : E) return B is
2327 return Flag167 (Id);
2328 end Sec_Stack_Needed_For_Return;
2330 function Shadow_Entities (Id : E) return S is
2333 (Ekind (Id) = E_Package or else Ekind (Id) = E_Generic_Package);
2335 end Shadow_Entities;
2337 function Shared_Var_Assign_Proc (Id : E) return E is
2339 pragma Assert (Ekind (Id) = E_Variable);
2341 end Shared_Var_Assign_Proc;
2343 function Shared_Var_Read_Proc (Id : E) return E is
2345 pragma Assert (Ekind (Id) = E_Variable);
2347 end Shared_Var_Read_Proc;
2349 function Size_Check_Code (Id : E) return N is
2351 pragma Assert (Ekind (Id) = E_Constant or else Ekind (Id) = E_Variable);
2353 end Size_Check_Code;
2355 function Size_Depends_On_Discriminant (Id : E) return B is
2357 return Flag177 (Id);
2358 end Size_Depends_On_Discriminant;
2360 function Size_Known_At_Compile_Time (Id : E) return B is
2363 end Size_Known_At_Compile_Time;
2365 function Small_Value (Id : E) return R is
2367 pragma Assert (Is_Fixed_Point_Type (Id));
2368 return Ureal21 (Id);
2371 function Spec_Entity (Id : E) return E is
2374 (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2378 function Storage_Size_Variable (Id : E) return E is
2380 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2381 return Node15 (Implementation_Base_Type (Id));
2382 end Storage_Size_Variable;
2384 function Stored_Constraint (Id : E) return L is
2387 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
2388 return Elist23 (Id);
2389 end Stored_Constraint;
2391 function Strict_Alignment (Id : E) return B is
2393 return Flag145 (Implementation_Base_Type (Id));
2394 end Strict_Alignment;
2396 function String_Literal_Length (Id : E) return U is
2399 end String_Literal_Length;
2401 function String_Literal_Low_Bound (Id : E) return N is
2404 end String_Literal_Low_Bound;
2406 function Suppress_Elaboration_Warnings (Id : E) return B is
2408 return Flag148 (Id);
2409 end Suppress_Elaboration_Warnings;
2411 function Suppress_Init_Proc (Id : E) return B is
2413 return Flag105 (Base_Type (Id));
2414 end Suppress_Init_Proc;
2416 function Suppress_Style_Checks (Id : E) return B is
2418 return Flag165 (Id);
2419 end Suppress_Style_Checks;
2421 function Task_Body_Procedure (Id : E) return N is
2423 pragma Assert (Ekind (Id) in Task_Kind);
2425 end Task_Body_Procedure;
2427 function Treat_As_Volatile (Id : E) return B is
2430 end Treat_As_Volatile;
2432 function Underlying_Full_View (Id : E) return E is
2434 pragma Assert (Ekind (Id) in Private_Kind);
2436 end Underlying_Full_View;
2438 function Unset_Reference (Id : E) return N is
2441 end Unset_Reference;
2443 function Uses_Sec_Stack (Id : E) return B is
2448 function Vax_Float (Id : E) return B is
2450 return Flag151 (Base_Type (Id));
2453 function Warnings_Off (Id : E) return B is
2458 function Wrapped_Entity (Id : E) return E is
2460 pragma Assert (Ekind (Id) = E_Procedure
2461 and then Is_Primitive_Wrapper (Id));
2465 function Was_Hidden (Id : E) return B is
2467 return Flag196 (Id);
2470 ------------------------------
2471 -- Classification Functions --
2472 ------------------------------
2474 function Is_Access_Type (Id : E) return B is
2476 return Ekind (Id) in Access_Kind;
2479 function Is_Array_Type (Id : E) return B is
2481 return Ekind (Id) in Array_Kind;
2484 function Is_Class_Wide_Type (Id : E) return B is
2486 return Ekind (Id) in Class_Wide_Kind;
2487 end Is_Class_Wide_Type;
2489 function Is_Composite_Type (Id : E) return B is
2491 return Ekind (Id) in Composite_Kind;
2492 end Is_Composite_Type;
2494 function Is_Concurrent_Body (Id : E) return B is
2496 return Ekind (Id) in
2497 Concurrent_Body_Kind;
2498 end Is_Concurrent_Body;
2500 function Is_Concurrent_Record_Type (Id : E) return B is
2503 end Is_Concurrent_Record_Type;
2505 function Is_Concurrent_Type (Id : E) return B is
2507 return Ekind (Id) in Concurrent_Kind;
2508 end Is_Concurrent_Type;
2510 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
2512 return Ekind (Id) in
2513 Decimal_Fixed_Point_Kind;
2514 end Is_Decimal_Fixed_Point_Type;
2516 function Is_Digits_Type (Id : E) return B is
2518 return Ekind (Id) in Digits_Kind;
2521 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
2523 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
2524 end Is_Discrete_Or_Fixed_Point_Type;
2526 function Is_Discrete_Type (Id : E) return B is
2528 return Ekind (Id) in Discrete_Kind;
2529 end Is_Discrete_Type;
2531 function Is_Elementary_Type (Id : E) return B is
2533 return Ekind (Id) in Elementary_Kind;
2534 end Is_Elementary_Type;
2536 function Is_Entry (Id : E) return B is
2538 return Ekind (Id) in Entry_Kind;
2541 function Is_Enumeration_Type (Id : E) return B is
2543 return Ekind (Id) in
2545 end Is_Enumeration_Type;
2547 function Is_Fixed_Point_Type (Id : E) return B is
2549 return Ekind (Id) in
2551 end Is_Fixed_Point_Type;
2553 function Is_Floating_Point_Type (Id : E) return B is
2555 return Ekind (Id) in Float_Kind;
2556 end Is_Floating_Point_Type;
2558 function Is_Formal (Id : E) return B is
2560 return Ekind (Id) in Formal_Kind;
2563 function Is_Formal_Object (Id : E) return B is
2565 return Ekind (Id) in Formal_Object_Kind;
2566 end Is_Formal_Object;
2568 function Is_Generic_Subprogram (Id : E) return B is
2570 return Ekind (Id) in Generic_Subprogram_Kind;
2571 end Is_Generic_Subprogram;
2573 function Is_Generic_Unit (Id : E) return B is
2575 return Ekind (Id) in Generic_Unit_Kind;
2576 end Is_Generic_Unit;
2578 function Is_Incomplete_Or_Private_Type (Id : E) return B is
2580 return Ekind (Id) in
2581 Incomplete_Or_Private_Kind;
2582 end Is_Incomplete_Or_Private_Type;
2584 function Is_Incomplete_Type (Id : E) return B is
2586 return Ekind (Id) in
2588 end Is_Incomplete_Type;
2590 function Is_Integer_Type (Id : E) return B is
2592 return Ekind (Id) in Integer_Kind;
2593 end Is_Integer_Type;
2595 function Is_Modular_Integer_Type (Id : E) return B is
2597 return Ekind (Id) in
2598 Modular_Integer_Kind;
2599 end Is_Modular_Integer_Type;
2601 function Is_Named_Number (Id : E) return B is
2603 return Ekind (Id) in Named_Kind;
2604 end Is_Named_Number;
2606 function Is_Numeric_Type (Id : E) return B is
2608 return Ekind (Id) in Numeric_Kind;
2609 end Is_Numeric_Type;
2611 function Is_Object (Id : E) return B is
2613 return Ekind (Id) in Object_Kind;
2616 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
2618 return Ekind (Id) in
2619 Ordinary_Fixed_Point_Kind;
2620 end Is_Ordinary_Fixed_Point_Type;
2622 function Is_Overloadable (Id : E) return B is
2624 return Ekind (Id) in Overloadable_Kind;
2625 end Is_Overloadable;
2627 function Is_Private_Type (Id : E) return B is
2629 return Ekind (Id) in Private_Kind;
2630 end Is_Private_Type;
2632 function Is_Protected_Type (Id : E) return B is
2634 return Ekind (Id) in Protected_Kind;
2635 end Is_Protected_Type;
2637 function Is_Real_Type (Id : E) return B is
2639 return Ekind (Id) in Real_Kind;
2642 function Is_Record_Type (Id : E) return B is
2644 return Ekind (Id) in Record_Kind;
2647 function Is_Scalar_Type (Id : E) return B is
2649 return Ekind (Id) in Scalar_Kind;
2652 function Is_Signed_Integer_Type (Id : E) return B is
2654 return Ekind (Id) in
2655 Signed_Integer_Kind;
2656 end Is_Signed_Integer_Type;
2658 function Is_Subprogram (Id : E) return B is
2660 return Ekind (Id) in Subprogram_Kind;
2663 function Is_Task_Type (Id : E) return B is
2665 return Ekind (Id) in Task_Kind;
2668 function Is_Type (Id : E) return B is
2670 return Ekind (Id) in Type_Kind;
2673 ------------------------------
2674 -- Attribute Set Procedures --
2675 ------------------------------
2677 procedure Set_Abstract_Interfaces (Id : E; V : L) is
2680 (Ekind (Id) = E_Record_Type
2681 or else Ekind (Id) = E_Record_Subtype
2682 or else Ekind (Id) = E_Record_Type_With_Private
2683 or else Ekind (Id) = E_Record_Subtype_With_Private
2684 or else Ekind (Id) = E_Class_Wide_Type);
2685 Set_Elist25 (Id, V);
2686 end Set_Abstract_Interfaces;
2688 procedure Set_Abstract_Interface_Alias (Id : E; V : E) is
2693 (Ekind (Id) = E_Procedure or else Ekind (Id) = E_Function));
2695 end Set_Abstract_Interface_Alias;
2697 procedure Set_Accept_Address (Id : E; V : L) is
2699 Set_Elist21 (Id, V);
2700 end Set_Accept_Address;
2702 procedure Set_Access_Disp_Table (Id : E; V : L) is
2704 pragma Assert (Is_Tagged_Type (Id) and then Id = Base_Type (Id));
2705 Set_Elist16 (Id, V);
2706 end Set_Access_Disp_Table;
2708 procedure Set_Associated_Final_Chain (Id : E; V : E) is
2710 pragma Assert (Is_Access_Type (Id));
2712 end Set_Associated_Final_Chain;
2714 procedure Set_Associated_Formal_Package (Id : E; V : E) is
2717 end Set_Associated_Formal_Package;
2719 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
2722 end Set_Associated_Node_For_Itype;
2724 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
2726 pragma Assert (Is_Access_Type (Id) and then Id = Base_Type (Id));
2728 end Set_Associated_Storage_Pool;
2730 procedure Set_Actual_Subtype (Id : E; V : E) is
2733 (Ekind (Id) = E_Constant
2734 or else Ekind (Id) = E_Variable
2735 or else Ekind (Id) = E_Generic_In_Out_Parameter
2736 or else Ekind (Id) in E_In_Parameter .. E_In_Out_Parameter);
2738 end Set_Actual_Subtype;
2740 procedure Set_Address_Taken (Id : E; V : B := True) is
2742 Set_Flag104 (Id, V);
2743 end Set_Address_Taken;
2745 procedure Set_Alias (Id : E; V : E) is
2748 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
2752 procedure Set_Alignment (Id : E; V : U) is
2754 pragma Assert (Is_Type (Id)
2755 or else Is_Formal (Id)
2756 or else Ekind (Id) = E_Loop_Parameter
2757 or else Ekind (Id) = E_Constant
2758 or else Ekind (Id) = E_Exception
2759 or else Ekind (Id) = E_Variable);
2763 procedure Set_Barrier_Function (Id : E; V : N) is
2765 pragma Assert (Is_Entry (Id));
2767 end Set_Barrier_Function;
2769 procedure Set_Block_Node (Id : E; V : N) is
2771 pragma Assert (Ekind (Id) = E_Block);
2775 procedure Set_Body_Entity (Id : E; V : E) is
2778 (Ekind (Id) = E_Package or else Ekind (Id) = E_Generic_Package);
2780 end Set_Body_Entity;
2782 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
2785 (Ekind (Id) = E_Package
2786 or else Is_Subprogram (Id)
2787 or else Is_Generic_Unit (Id));
2789 end Set_Body_Needed_For_SAL;
2791 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
2793 pragma Assert (Is_Record_Type (Id) and then Id = Base_Type (Id));
2794 Set_Flag125 (Id, V);
2795 end Set_C_Pass_By_Copy;
2797 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
2800 end Set_Can_Never_Be_Null;
2802 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
2805 end Set_Checks_May_Be_Suppressed;
2807 procedure Set_Class_Wide_Type (Id : E; V : E) is
2809 pragma Assert (Is_Type (Id));
2811 end Set_Class_Wide_Type;
2813 procedure Set_Cloned_Subtype (Id : E; V : E) is
2816 (Ekind (Id) = E_Record_Subtype
2817 or else Ekind (Id) = E_Class_Wide_Subtype);
2819 end Set_Cloned_Subtype;
2821 procedure Set_Component_Bit_Offset (Id : E; V : U) is
2824 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
2826 end Set_Component_Bit_Offset;
2828 procedure Set_Component_Clause (Id : E; V : N) is
2831 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
2833 end Set_Component_Clause;
2835 procedure Set_Component_Size (Id : E; V : U) is
2837 pragma Assert (Is_Array_Type (Id) and then Id = Base_Type (Id));
2839 end Set_Component_Size;
2841 procedure Set_Component_Type (Id : E; V : E) is
2843 pragma Assert (Is_Array_Type (Id) and then Id = Base_Type (Id));
2845 end Set_Component_Type;
2847 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
2850 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
2852 end Set_Corresponding_Concurrent_Type;
2854 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
2856 pragma Assert (Ekind (Id) = E_Discriminant);
2858 end Set_Corresponding_Discriminant;
2860 procedure Set_Corresponding_Equality (Id : E; V : E) is
2863 (Ekind (Id) = E_Function
2864 and then not Comes_From_Source (Id)
2865 and then Chars (Id) = Name_Op_Ne);
2867 end Set_Corresponding_Equality;
2869 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
2871 pragma Assert (Is_Concurrent_Type (Id));
2873 end Set_Corresponding_Record_Type;
2875 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
2878 end Set_Corresponding_Remote_Type;
2880 procedure Set_Current_Use_Clause (Id : E; V : E) is
2882 pragma Assert (Ekind (Id) = E_Package);
2884 end Set_Current_Use_Clause;
2886 procedure Set_Current_Value (Id : E; V : N) is
2888 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
2890 end Set_Current_Value;
2892 procedure Set_CR_Discriminant (Id : E; V : E) is
2895 end Set_CR_Discriminant;
2897 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
2899 Set_Flag166 (Id, V);
2900 end Set_Debug_Info_Off;
2902 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
2905 end Set_Debug_Renaming_Link;
2907 procedure Set_Default_Expr_Function (Id : E; V : E) is
2909 pragma Assert (Is_Formal (Id));
2911 end Set_Default_Expr_Function;
2913 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
2915 Set_Flag108 (Id, V);
2916 end Set_Default_Expressions_Processed;
2918 procedure Set_Default_Value (Id : E; V : N) is
2920 pragma Assert (Is_Formal (Id));
2922 end Set_Default_Value;
2924 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
2928 or else Is_Task_Type (Id)
2929 or else Ekind (Id) = E_Block);
2930 Set_Flag114 (Id, V);
2931 end Set_Delay_Cleanups;
2933 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
2937 or else Ekind (Id) = E_Package
2938 or else Ekind (Id) = E_Package_Body);
2940 end Set_Delay_Subprogram_Descriptors;
2942 procedure Set_Delta_Value (Id : E; V : R) is
2944 pragma Assert (Is_Fixed_Point_Type (Id));
2945 Set_Ureal18 (Id, V);
2946 end Set_Delta_Value;
2948 procedure Set_Dependent_Instances (Id : E; V : L) is
2950 pragma Assert (Is_Generic_Instance (Id));
2952 end Set_Dependent_Instances;
2954 procedure Set_Depends_On_Private (Id : E; V : B := True) is
2956 pragma Assert (Nkind (Id) in N_Entity);
2958 end Set_Depends_On_Private;
2960 procedure Set_Digits_Value (Id : E; V : U) is
2963 (Is_Floating_Point_Type (Id)
2964 or else Is_Decimal_Fixed_Point_Type (Id));
2966 end Set_Digits_Value;
2968 procedure Set_Directly_Designated_Type (Id : E; V : E) is
2971 end Set_Directly_Designated_Type;
2973 procedure Set_Discard_Names (Id : E; V : B := True) is
2976 end Set_Discard_Names;
2978 procedure Set_Discriminal (Id : E; V : E) is
2980 pragma Assert (Ekind (Id) = E_Discriminant);
2982 end Set_Discriminal;
2984 procedure Set_Discriminal_Link (Id : E; V : E) is
2987 end Set_Discriminal_Link;
2989 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
2991 pragma Assert (Ekind (Id) = E_Component);
2993 end Set_Discriminant_Checking_Func;
2995 procedure Set_Discriminant_Constraint (Id : E; V : L) is
2997 pragma Assert (Nkind (Id) in N_Entity);
2998 Set_Elist21 (Id, V);
2999 end Set_Discriminant_Constraint;
3001 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3004 end Set_Discriminant_Default_Value;
3006 procedure Set_Discriminant_Number (Id : E; V : U) is
3009 end Set_Discriminant_Number;
3011 procedure Set_DT_Entry_Count (Id : E; V : U) is
3013 pragma Assert (Ekind (Id) = E_Component);
3015 end Set_DT_Entry_Count;
3017 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3019 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3021 end Set_DT_Offset_To_Top_Func;
3023 procedure Set_DT_Position (Id : E; V : U) is
3025 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
3027 end Set_DT_Position;
3029 procedure Set_DTC_Entity (Id : E; V : E) is
3032 (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
3036 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3038 pragma Assert (Ekind (Id) = E_Package);
3039 Set_Flag210 (Id, V);
3040 end Set_Elaborate_Body_Desirable;
3042 procedure Set_Elaboration_Entity (Id : E; V : E) is
3047 Ekind (Id) = E_Package
3049 Is_Generic_Unit (Id));
3051 end Set_Elaboration_Entity;
3053 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3058 Ekind (Id) = E_Package
3060 Is_Generic_Unit (Id));
3061 Set_Flag174 (Id, V);
3062 end Set_Elaboration_Entity_Required;
3064 procedure Set_Enclosing_Scope (Id : E; V : E) is
3067 end Set_Enclosing_Scope;
3069 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3071 pragma Assert (Is_Entry (Id));
3072 Set_Flag152 (Id, V);
3073 end Set_Entry_Accepted;
3075 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3078 end Set_Entry_Bodies_Array;
3080 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3083 end Set_Entry_Cancel_Parameter;
3085 procedure Set_Entry_Component (Id : E; V : E) is
3088 end Set_Entry_Component;
3090 procedure Set_Entry_Formal (Id : E; V : E) is
3093 end Set_Entry_Formal;
3095 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3097 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3099 end Set_Entry_Index_Constant;
3101 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3104 end Set_Entry_Parameters_Type;
3106 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3108 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3110 end Set_Enum_Pos_To_Rep;
3112 procedure Set_Enumeration_Pos (Id : E; V : U) is
3114 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3116 end Set_Enumeration_Pos;
3118 procedure Set_Enumeration_Rep (Id : E; V : U) is
3120 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3122 end Set_Enumeration_Rep;
3124 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3126 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3128 end Set_Enumeration_Rep_Expr;
3130 procedure Set_Equivalent_Type (Id : E; V : E) is
3133 (Ekind (Id) = E_Class_Wide_Type or else
3134 Ekind (Id) = E_Class_Wide_Subtype or else
3135 Ekind (Id) = E_Access_Protected_Subprogram_Type or else
3136 Ekind (Id) = E_Access_Subprogram_Type or else
3137 Ekind (Id) = E_Exception_Type);
3139 end Set_Equivalent_Type;
3141 procedure Set_Esize (Id : E; V : U) is
3146 procedure Set_Exception_Code (Id : E; V : U) is
3148 pragma Assert (Ekind (Id) = E_Exception);
3150 end Set_Exception_Code;
3152 procedure Set_Extra_Accessibility (Id : E; V : E) is
3154 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3156 end Set_Extra_Accessibility;
3158 procedure Set_Extra_Constrained (Id : E; V : E) is
3160 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3162 end Set_Extra_Constrained;
3164 procedure Set_Extra_Formal (Id : E; V : E) is
3167 end Set_Extra_Formal;
3169 procedure Set_Extra_Formals (Id : E; V : E) is
3172 (Is_Overloadable (Id)
3173 or else Ekind (Id) = E_Entry_Family
3174 or else Ekind (Id) = E_Subprogram_Body
3175 or else Ekind (Id) = E_Subprogram_Type);
3177 end Set_Extra_Formals;
3179 procedure Set_Finalization_Chain_Entity (Id : E; V : E) is
3182 end Set_Finalization_Chain_Entity;
3184 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3186 pragma Assert (Is_Type (Id) and then Id = Base_Type (Id));
3187 Set_Flag158 (Id, V);
3188 end Set_Finalize_Storage_Only;
3190 procedure Set_First_Entity (Id : E; V : E) is
3193 end Set_First_Entity;
3195 procedure Set_First_Index (Id : E; V : N) is
3198 end Set_First_Index;
3200 procedure Set_First_Literal (Id : E; V : E) is
3203 end Set_First_Literal;
3205 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3208 (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
3210 end Set_First_Optional_Parameter;
3212 procedure Set_First_Private_Entity (Id : E; V : E) is
3214 pragma Assert (Ekind (Id) = E_Package
3215 or else Ekind (Id) = E_Generic_Package
3216 or else Ekind (Id) in Concurrent_Kind);
3218 end Set_First_Private_Entity;
3220 procedure Set_First_Rep_Item (Id : E; V : N) is
3223 end Set_First_Rep_Item;
3225 procedure Set_Freeze_Node (Id : E; V : N) is
3228 end Set_Freeze_Node;
3230 procedure Set_From_With_Type (Id : E; V : B := True) is
3234 or else Ekind (Id) = E_Package);
3235 Set_Flag159 (Id, V);
3236 end Set_From_With_Type;
3238 procedure Set_Full_View (Id : E; V : E) is
3240 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
3244 procedure Set_Function_Returns_With_DSP (Id : E; V : B := True) is
3247 (Is_Subprogram (Id) or else Ekind (Id) = E_Subprogram_Type);
3248 Set_Flag169 (Id, V);
3249 end Set_Function_Returns_With_DSP;
3251 procedure Set_Generic_Homonym (Id : E; V : E) is
3254 end Set_Generic_Homonym;
3256 procedure Set_Generic_Renamings (Id : E; V : L) is
3258 Set_Elist23 (Id, V);
3259 end Set_Generic_Renamings;
3261 procedure Set_Handler_Records (Id : E; V : S) is
3264 end Set_Handler_Records;
3266 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
3268 pragma Assert (Base_Type (Id) = Id);
3269 Set_Flag135 (Id, V);
3270 end Set_Has_Aliased_Components;
3272 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
3275 end Set_Has_Alignment_Clause;
3277 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
3280 end Set_Has_All_Calls_Remote;
3282 procedure Set_Has_Anon_Block_Suffix (Id : E; V : B := True) is
3284 Set_Flag201 (Id, V);
3285 end Set_Has_Anon_Block_Suffix;
3287 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
3289 pragma Assert (not Is_Type (Id) or else Base_Type (Id) = Id);
3291 end Set_Has_Atomic_Components;
3293 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
3296 ((V = False) or else (Is_Discrete_Type (Id) or Is_Object (Id)));
3297 Set_Flag139 (Id, V);
3298 end Set_Has_Biased_Representation;
3300 procedure Set_Has_Completion (Id : E; V : B := True) is
3303 end Set_Has_Completion;
3305 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
3307 pragma Assert (Is_Type (Id));
3309 end Set_Has_Completion_In_Body;
3311 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
3313 pragma Assert (Ekind (Id) = E_Record_Type);
3314 Set_Flag140 (Id, V);
3315 end Set_Has_Complex_Representation;
3317 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
3319 pragma Assert (Ekind (Id) = E_Array_Type);
3321 end Set_Has_Component_Size_Clause;
3323 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
3325 pragma Assert (Is_Type (Id));
3326 Set_Flag187 (Id, V);
3327 end Set_Has_Constrained_Partial_View;
3329 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
3331 Set_Flag181 (Id, V);
3332 end Set_Has_Contiguous_Rep;
3334 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
3336 pragma Assert (Base_Type (Id) = Id);
3338 end Set_Has_Controlled_Component;
3340 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
3343 end Set_Has_Controlling_Result;
3345 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
3347 Set_Flag119 (Id, V);
3348 end Set_Has_Convention_Pragma;
3350 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
3352 pragma Assert (Nkind (Id) in N_Entity);
3354 end Set_Has_Delayed_Freeze;
3356 procedure Set_Has_Discriminants (Id : E; V : B := True) is
3358 pragma Assert (Nkind (Id) in N_Entity);
3360 end Set_Has_Discriminants;
3362 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
3364 pragma Assert (Is_Enumeration_Type (Id));
3366 end Set_Has_Enumeration_Rep_Clause;
3368 procedure Set_Has_Exit (Id : E; V : B := True) is
3373 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True) is
3375 pragma Assert (Is_Tagged_Type (Id));
3376 Set_Flag110 (Id, V);
3377 end Set_Has_External_Tag_Rep_Clause;
3379 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
3381 Set_Flag175 (Id, V);
3382 end Set_Has_Forward_Instantiation;
3384 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
3386 Set_Flag173 (Id, V);
3387 end Set_Has_Fully_Qualified_Name;
3389 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
3392 end Set_Has_Gigi_Rep_Item;
3394 procedure Set_Has_Homonym (Id : E; V : B := True) is
3397 end Set_Has_Homonym;
3399 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
3401 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
3403 end Set_Has_Machine_Radix_Clause;
3405 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
3408 end Set_Has_Master_Entity;
3410 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
3413 (Ekind (Id) = E_Function or else Ekind (Id) = E_Generic_Function);
3414 Set_Flag142 (Id, V);
3415 end Set_Has_Missing_Return;
3417 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
3419 Set_Flag101 (Id, V);
3420 end Set_Has_Nested_Block_With_Handler;
3422 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
3424 pragma Assert (Base_Type (Id) = Id);
3426 end Set_Has_Non_Standard_Rep;
3428 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
3430 pragma Assert (Is_Type (Id));
3431 Set_Flag172 (Id, V);
3432 end Set_Has_Object_Size_Clause;
3434 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
3436 Set_Flag154 (Id, V);
3437 end Set_Has_Per_Object_Constraint;
3439 procedure Set_Has_Persistent_BSS (Id : E; V : B := True) is
3441 Set_Flag188 (Id, V);
3442 end Set_Has_Persistent_BSS;
3444 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
3446 pragma Assert (Is_Access_Type (Id));
3447 Set_Flag27 (Base_Type (Id), V);
3448 end Set_Has_Pragma_Controlled;
3450 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
3452 Set_Flag150 (Id, V);
3453 end Set_Has_Pragma_Elaborate_Body;
3455 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
3457 Set_Flag157 (Id, V);
3458 end Set_Has_Pragma_Inline;
3460 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
3462 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
3463 pragma Assert (Id = Base_Type (Id));
3464 Set_Flag121 (Id, V);
3465 end Set_Has_Pragma_Pack;
3467 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
3469 Set_Flag203 (Id, V);
3470 end Set_Has_Pragma_Pure;
3472 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
3474 Set_Flag179 (Id, V);
3475 end Set_Has_Pragma_Pure_Function;
3477 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
3479 Set_Flag180 (Id, V);
3480 end Set_Has_Pragma_Unreferenced;
3482 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
3484 pragma Assert (Id = Base_Type (Id));
3485 Set_Flag120 (Id, V);
3486 end Set_Has_Primitive_Operations;
3488 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
3490 Set_Flag155 (Id, V);
3491 end Set_Has_Private_Declaration;
3493 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
3495 Set_Flag161 (Id, V);
3496 end Set_Has_Qualified_Name;
3498 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
3500 pragma Assert (Id = Base_Type (Id));
3502 end Set_Has_Record_Rep_Clause;
3504 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
3506 pragma Assert (Is_Subprogram (Id));
3507 Set_Flag143 (Id, V);
3508 end Set_Has_Recursive_Call;
3510 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
3513 end Set_Has_Size_Clause;
3515 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
3518 end Set_Has_Small_Clause;
3520 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
3522 pragma Assert (Id = Base_Type (Id));
3523 Set_Flag100 (Id, V);
3524 end Set_Has_Specified_Layout;
3526 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
3528 pragma Assert (Is_Type (Id));
3529 Set_Flag190 (Id, V);
3530 end Set_Has_Specified_Stream_Input;
3532 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
3534 pragma Assert (Is_Type (Id));
3535 Set_Flag191 (Id, V);
3536 end Set_Has_Specified_Stream_Output;
3538 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
3540 pragma Assert (Is_Type (Id));
3541 Set_Flag192 (Id, V);
3542 end Set_Has_Specified_Stream_Read;
3544 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
3546 pragma Assert (Is_Type (Id));
3547 Set_Flag193 (Id, V);
3548 end Set_Has_Specified_Stream_Write;
3550 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
3552 Set_Flag211 (Id, V);
3553 end Set_Has_Static_Discriminants;
3555 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
3557 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
3558 pragma Assert (Base_Type (Id) = Id);
3560 end Set_Has_Storage_Size_Clause;
3562 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
3564 pragma Assert (Is_Elementary_Type (Id));
3565 Set_Flag184 (Id, V);
3566 end Set_Has_Stream_Size_Clause;
3568 procedure Set_Has_Subprogram_Descriptor (Id : E; V : B := True) is
3571 end Set_Has_Subprogram_Descriptor;
3573 procedure Set_Has_Task (Id : E; V : B := True) is
3575 pragma Assert (Base_Type (Id) = Id);
3579 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
3581 pragma Assert (Base_Type (Id) = Id);
3582 Set_Flag123 (Id, V);
3583 end Set_Has_Unchecked_Union;
3585 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
3587 pragma Assert (Is_Type (Id));
3589 end Set_Has_Unknown_Discriminants;
3591 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
3593 pragma Assert (not Is_Type (Id) or else Base_Type (Id) = Id);
3595 end Set_Has_Volatile_Components;
3597 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
3599 Set_Flag182 (Id, V);
3600 end Set_Has_Xref_Entry;
3602 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
3604 pragma Assert (Ekind (Id) = E_Variable);
3606 end Set_Hiding_Loop_Variable;
3608 procedure Set_Homonym (Id : E; V : E) is
3610 pragma Assert (Id /= V);
3614 procedure Set_In_Package_Body (Id : E; V : B := True) is
3617 end Set_In_Package_Body;
3619 procedure Set_In_Private_Part (Id : E; V : B := True) is
3622 end Set_In_Private_Part;
3624 procedure Set_In_Use (Id : E; V : B := True) is
3626 pragma Assert (Nkind (Id) in N_Entity);
3630 procedure Set_Inner_Instances (Id : E; V : L) is
3632 Set_Elist23 (Id, V);
3633 end Set_Inner_Instances;
3635 procedure Set_Interface_Name (Id : E; V : N) is
3638 end Set_Interface_Name;
3640 procedure Set_Is_Abstract (Id : E; V : B := True) is
3643 end Set_Is_Abstract;
3645 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
3647 pragma Assert (Is_Access_Type (Id));
3648 Set_Flag194 (Id, V);
3649 end Set_Is_Local_Anonymous_Access;
3651 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
3653 pragma Assert (Is_Access_Type (Id));
3655 end Set_Is_Access_Constant;
3657 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
3659 Set_Flag185 (Id, V);
3660 end Set_Is_Ada_2005_Only;
3662 procedure Set_Is_Aliased (Id : E; V : B := True) is
3664 pragma Assert (Nkind (Id) in N_Entity);
3668 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
3670 pragma Assert (Is_Entry (Id));
3671 Set_Flag132 (Id, V);
3672 end Set_Is_AST_Entry;
3674 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
3677 (Ekind (Id) = E_Procedure or else Is_Type (Id));
3679 end Set_Is_Asynchronous;
3681 procedure Set_Is_Atomic (Id : E; V : B := True) is
3686 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
3688 pragma Assert ((not V)
3689 or else (Is_Array_Type (Id) and then Id = Base_Type (Id)));
3691 Set_Flag122 (Id, V);
3692 end Set_Is_Bit_Packed_Array;
3694 procedure Set_Is_Called (Id : E; V : B := True) is
3697 (Ekind (Id) = E_Procedure or else Ekind (Id) = E_Function);
3698 Set_Flag102 (Id, V);
3701 procedure Set_Is_Character_Type (Id : E; V : B := True) is
3704 end Set_Is_Character_Type;
3706 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
3709 end Set_Is_Child_Unit;
3711 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
3714 end Set_Is_Class_Wide_Equivalent_Type;
3716 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
3718 Set_Flag149 (Id, V);
3719 end Set_Is_Compilation_Unit;
3721 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
3723 pragma Assert (Ekind (Id) = E_Discriminant);
3724 Set_Flag103 (Id, V);
3725 end Set_Is_Completely_Hidden;
3727 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
3730 end Set_Is_Concurrent_Record_Type;
3732 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
3735 end Set_Is_Constr_Subt_For_U_Nominal;
3737 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
3739 Set_Flag141 (Id, V);
3740 end Set_Is_Constr_Subt_For_UN_Aliased;
3742 procedure Set_Is_Constrained (Id : E; V : B := True) is
3744 pragma Assert (Nkind (Id) in N_Entity);
3746 end Set_Is_Constrained;
3748 procedure Set_Is_Constructor (Id : E; V : B := True) is
3751 end Set_Is_Constructor;
3753 procedure Set_Is_Controlled (Id : E; V : B := True) is
3755 pragma Assert (Id = Base_Type (Id));
3757 end Set_Is_Controlled;
3759 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
3761 pragma Assert (Is_Formal (Id));
3763 end Set_Is_Controlling_Formal;
3765 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
3768 end Set_Is_CPP_Class;
3770 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
3772 Set_Flag176 (Id, V);
3773 end Set_Is_Discrim_SO_Function;
3775 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
3780 Is_Overloadable (Id)
3782 Ekind (Id) = E_Subprogram_Type);
3785 end Set_Is_Dispatching_Operation;
3787 procedure Set_Is_Eliminated (Id : E; V : B := True) is
3789 Set_Flag124 (Id, V);
3790 end Set_Is_Eliminated;
3792 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
3795 end Set_Is_Entry_Formal;
3797 procedure Set_Is_Exported (Id : E; V : B := True) is
3800 end Set_Is_Exported;
3802 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
3805 end Set_Is_First_Subtype;
3807 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
3810 (Ekind (Id) = E_Record_Subtype
3812 Ekind (Id) = E_Private_Subtype);
3813 Set_Flag118 (Id, V);
3814 end Set_Is_For_Access_Subtype;
3816 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
3818 Set_Flag111 (Id, V);
3819 end Set_Is_Formal_Subprogram;
3821 procedure Set_Is_Frozen (Id : E; V : B := True) is
3823 pragma Assert (Nkind (Id) in N_Entity);
3827 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
3829 pragma Assert (Is_Type (Id));
3831 end Set_Is_Generic_Actual_Type;
3833 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
3835 Set_Flag130 (Id, V);
3836 end Set_Is_Generic_Instance;
3838 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
3840 pragma Assert (Nkind (Id) in N_Entity);
3842 end Set_Is_Generic_Type;
3844 procedure Set_Is_Hidden (Id : E; V : B := True) is
3849 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
3851 Set_Flag171 (Id, V);
3852 end Set_Is_Hidden_Open_Scope;
3854 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
3856 pragma Assert (Nkind (Id) in N_Entity);
3858 end Set_Is_Immediately_Visible;
3860 procedure Set_Is_Imported (Id : E; V : B := True) is
3863 end Set_Is_Imported;
3865 procedure Set_Is_Inlined (Id : E; V : B := True) is
3870 procedure Set_Is_Interface (Id : E; V : B := True) is
3873 (Ekind (Id) = E_Record_Type
3874 or else Ekind (Id) = E_Record_Subtype
3875 or else Ekind (Id) = E_Record_Type_With_Private
3876 or else Ekind (Id) = E_Record_Subtype_With_Private
3877 or else Ekind (Id) = E_Class_Wide_Type);
3878 Set_Flag186 (Id, V);
3879 end Set_Is_Interface;
3881 procedure Set_Is_Instantiated (Id : E; V : B := True) is
3883 Set_Flag126 (Id, V);
3884 end Set_Is_Instantiated;
3886 procedure Set_Is_Internal (Id : E; V : B := True) is
3888 pragma Assert (Nkind (Id) in N_Entity);
3890 end Set_Is_Internal;
3892 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
3894 pragma Assert (Nkind (Id) in N_Entity);
3896 end Set_Is_Interrupt_Handler;
3898 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
3901 end Set_Is_Intrinsic_Subprogram;
3903 procedure Set_Is_Itype (Id : E; V : B := True) is
3908 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
3911 end Set_Is_Known_Non_Null;
3913 procedure Set_Is_Known_Null (Id : E; V : B := True) is
3915 Set_Flag204 (Id, V);
3916 end Set_Is_Known_Null;
3918 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
3920 Set_Flag170 (Id, V);
3921 end Set_Is_Known_Valid;
3923 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
3925 pragma Assert (Is_Type (Id));
3926 Set_Flag106 (Id, V);
3927 end Set_Is_Limited_Composite;
3929 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
3931 pragma Assert (Is_Interface (Id));
3932 Set_Flag197 (Id, V);
3933 end Set_Is_Limited_Interface;
3935 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
3938 end Set_Is_Limited_Record;
3940 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
3942 pragma Assert (Is_Subprogram (Id));
3943 Set_Flag137 (Id, V);
3944 end Set_Is_Machine_Code_Subprogram;
3946 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
3948 pragma Assert (Is_Type (Id));
3949 Set_Flag109 (Id, V);
3950 end Set_Is_Non_Static_Subtype;
3952 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
3954 pragma Assert (Ekind (Id) = E_Procedure);
3955 Set_Flag178 (Id, V);
3956 end Set_Is_Null_Init_Proc;
3958 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
3960 Set_Flag153 (Id, V);
3961 end Set_Is_Obsolescent;
3963 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
3965 pragma Assert (Is_Formal (Id));
3966 Set_Flag134 (Id, V);
3967 end Set_Is_Optional_Parameter;
3969 procedure Set_Is_Overriding_Operation (Id : E; V : B := True) is
3971 pragma Assert (Is_Subprogram (Id));
3973 end Set_Is_Overriding_Operation;
3975 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
3977 Set_Flag160 (Id, V);
3978 end Set_Is_Package_Body_Entity;
3980 procedure Set_Is_Packed (Id : E; V : B := True) is
3982 pragma Assert (Base_Type (Id) = Id);
3986 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
3988 Set_Flag138 (Id, V);
3989 end Set_Is_Packed_Array_Type;
3991 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
3993 pragma Assert (Nkind (Id) in N_Entity);
3995 end Set_Is_Potentially_Use_Visible;
3997 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
4000 end Set_Is_Preelaborated;
4002 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
4004 pragma Assert (Ekind (Id) = E_Procedure);
4005 Set_Flag195 (Id, V);
4006 end Set_Is_Primitive_Wrapper;
4008 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
4010 pragma Assert (Is_Type (Id));
4011 Set_Flag107 (Id, V);
4012 end Set_Is_Private_Composite;
4014 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
4017 end Set_Is_Private_Descendant;
4019 procedure Set_Is_Protected_Interface (Id : E; V : B := True) is
4021 pragma Assert (Is_Interface (Id));
4022 Set_Flag198 (Id, V);
4023 end Set_Is_Protected_Interface;
4025 procedure Set_Is_Public (Id : E; V : B := True) is
4027 pragma Assert (Nkind (Id) in N_Entity);
4031 procedure Set_Is_Pure (Id : E; V : B := True) is
4036 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
4038 pragma Assert (Is_Access_Type (Id));
4039 Set_Flag189 (Id, V);
4040 end Set_Is_Pure_Unit_Access_Type;
4042 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
4045 end Set_Is_Remote_Call_Interface;
4047 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
4050 end Set_Is_Remote_Types;
4052 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
4054 Set_Flag112 (Id, V);
4055 end Set_Is_Renaming_Of_Object;
4057 procedure Set_Is_Return_Object (Id : E; V : B := True) is
4059 Set_Flag209 (Id, V);
4060 end Set_Is_Return_Object;
4062 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
4065 end Set_Is_Shared_Passive;
4067 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
4070 (Ekind (Id) = E_Exception
4071 or else Ekind (Id) = E_Variable
4072 or else Ekind (Id) = E_Constant
4073 or else Is_Type (Id)
4074 or else Ekind (Id) = E_Void);
4076 end Set_Is_Statically_Allocated;
4078 procedure Set_Is_Synchronized_Interface (Id : E; V : B := True) is
4080 pragma Assert (Is_Interface (Id));
4081 Set_Flag199 (Id, V);
4082 end Set_Is_Synchronized_Interface;
4084 procedure Set_Is_Tag (Id : E; V : B := True) is
4086 pragma Assert (Nkind (Id) in N_Entity);
4090 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
4093 end Set_Is_Tagged_Type;
4095 procedure Set_Is_Thread_Body (Id : E; V : B := True) is
4098 end Set_Is_Thread_Body;
4100 procedure Set_Is_Task_Interface (Id : E; V : B := True) is
4102 pragma Assert (Is_Interface (Id));
4103 Set_Flag200 (Id, V);
4104 end Set_Is_Task_Interface;
4106 procedure Set_Is_True_Constant (Id : E; V : B := True) is
4108 Set_Flag163 (Id, V);
4109 end Set_Is_True_Constant;
4111 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
4113 pragma Assert (Base_Type (Id) = Id);
4114 Set_Flag117 (Id, V);
4115 end Set_Is_Unchecked_Union;
4117 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
4119 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
4120 Set_Flag144 (Id, V);
4121 end Set_Is_Unsigned_Type;
4123 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
4125 pragma Assert (Ekind (Id) = E_Procedure);
4126 Set_Flag127 (Id, V);
4127 end Set_Is_Valued_Procedure;
4129 procedure Set_Is_Visible_Child_Unit (Id : E; V : B := True) is
4131 pragma Assert (Is_Child_Unit (Id));
4132 Set_Flag116 (Id, V);
4133 end Set_Is_Visible_Child_Unit;
4135 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
4137 Set_Flag206 (Id, V);
4138 end Set_Is_Visible_Formal;
4140 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
4142 pragma Assert (Ekind (Id) = E_Exception);
4143 Set_Flag133 (Id, V);
4144 end Set_Is_VMS_Exception;
4146 procedure Set_Is_Volatile (Id : E; V : B := True) is
4148 pragma Assert (Nkind (Id) in N_Entity);
4150 end Set_Is_Volatile;
4152 procedure Set_Itype_Printed (Id : E; V : B := True) is
4154 pragma Assert (Is_Itype (Id));
4155 Set_Flag202 (Id, V);
4156 end Set_Itype_Printed;
4158 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
4161 end Set_Kill_Elaboration_Checks;
4163 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
4166 end Set_Kill_Range_Checks;
4168 procedure Set_Kill_Tag_Checks (Id : E; V : B := True) is
4171 end Set_Kill_Tag_Checks;
4173 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
4175 pragma Assert (Is_Type (Id));
4176 Set_Flag207 (Id, V);
4177 end Set_Known_To_Have_Preelab_Init;
4179 procedure Set_Last_Assignment (Id : E; V : N) is
4181 pragma Assert (Ekind (Id) = E_Variable);
4183 end Set_Last_Assignment;
4185 procedure Set_Last_Entity (Id : E; V : E) is
4188 end Set_Last_Entity;
4190 procedure Set_Limited_View (Id : E; V : E) is
4192 pragma Assert (Ekind (Id) = E_Package);
4194 end Set_Limited_View;
4196 procedure Set_Lit_Indexes (Id : E; V : E) is
4198 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4200 end Set_Lit_Indexes;
4202 procedure Set_Lit_Strings (Id : E; V : E) is
4204 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4206 end Set_Lit_Strings;
4208 procedure Set_Low_Bound_Known (Id : E; V : B := True) is
4210 pragma Assert (Is_Formal (Id));
4211 Set_Flag205 (Id, V);
4212 end Set_Low_Bound_Known;
4214 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
4216 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4218 end Set_Machine_Radix_10;
4220 procedure Set_Master_Id (Id : E; V : E) is
4225 procedure Set_Materialize_Entity (Id : E; V : B := True) is
4227 Set_Flag168 (Id, V);
4228 end Set_Materialize_Entity;
4230 procedure Set_Mechanism (Id : E; V : M) is
4232 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
4233 Set_Uint8 (Id, UI_From_Int (V));
4236 procedure Set_Modulus (Id : E; V : U) is
4238 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
4242 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
4244 pragma Assert (Is_Type (Id));
4245 Set_Flag183 (Id, V);
4246 end Set_Must_Be_On_Byte_Boundary;
4248 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
4250 pragma Assert (Is_Type (Id));
4251 Set_Flag208 (Id, V);
4252 end Set_Must_Have_Preelab_Init;
4254 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
4256 Set_Flag147 (Id, V);
4257 end Set_Needs_Debug_Info;
4259 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
4262 (Is_Overloadable (Id)
4263 or else Ekind (Id) = E_Subprogram_Type
4264 or else Ekind (Id) = E_Entry_Family);
4266 end Set_Needs_No_Actuals;
4268 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
4270 Set_Flag115 (Id, V);
4271 end Set_Never_Set_In_Source;
4273 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
4276 end Set_Next_Inlined_Subprogram;
4278 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
4280 pragma Assert (Is_Access_Type (Id) and then Base_Type (Id) = Id);
4281 Set_Flag131 (Id, V);
4282 end Set_No_Pool_Assigned;
4284 procedure Set_No_Return (Id : E; V : B := True) is
4288 or else Ekind (Id) = E_Procedure
4289 or else Ekind (Id) = E_Generic_Procedure);
4290 Set_Flag113 (Id, V);
4293 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
4295 pragma Assert (Is_Access_Type (Id) and then Base_Type (Id) = Id);
4296 Set_Flag136 (Id, V);
4297 end Set_No_Strict_Aliasing;
4299 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
4301 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
4303 end Set_Non_Binary_Modulus;
4305 procedure Set_Non_Limited_View (Id : E; V : E) is
4307 pragma Assert (False
4308 or else Ekind (Id) in Incomplete_Kind);
4310 end Set_Non_Limited_View;
4312 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
4315 (Root_Type (Id) = Standard_Boolean
4316 and then Ekind (Id) = E_Enumeration_Type);
4317 Set_Flag162 (Id, V);
4318 end Set_Nonzero_Is_True;
4320 procedure Set_Normalized_First_Bit (Id : E; V : U) is
4323 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
4325 end Set_Normalized_First_Bit;
4327 procedure Set_Normalized_Position (Id : E; V : U) is
4330 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
4332 end Set_Normalized_Position;
4334 procedure Set_Normalized_Position_Max (Id : E; V : U) is
4337 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
4339 end Set_Normalized_Position_Max;
4341 procedure Set_Object_Ref (Id : E; V : E) is
4343 pragma Assert (Ekind (Id) = E_Protected_Body);
4347 procedure Set_Obsolescent_Warning (Id : E; V : N) is
4350 end Set_Obsolescent_Warning;
4352 procedure Set_Original_Access_Type (Id : E; V : E) is
4355 (Ekind (Id) = E_Access_Subprogram_Type
4356 or else Ekind (Id) = E_Access_Protected_Subprogram_Type);
4358 end Set_Original_Access_Type;
4360 procedure Set_Original_Array_Type (Id : E; V : E) is
4362 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
4364 end Set_Original_Array_Type;
4366 procedure Set_Original_Record_Component (Id : E; V : E) is
4369 (Ekind (Id) = E_Void
4370 or else Ekind (Id) = E_Component
4371 or else Ekind (Id) = E_Discriminant);
4373 end Set_Original_Record_Component;
4375 procedure Set_Overridden_Operation (Id : E; V : E) is
4378 end Set_Overridden_Operation;
4380 procedure Set_Package_Instantiation (Id : E; V : N) is
4383 (Ekind (Id) = E_Void
4384 or else Ekind (Id) = E_Generic_Package
4385 or else Ekind (Id) = E_Package);
4387 end Set_Package_Instantiation;
4389 procedure Set_Packed_Array_Type (Id : E; V : E) is
4391 pragma Assert (Is_Array_Type (Id));
4393 end Set_Packed_Array_Type;
4395 procedure Set_Parent_Subtype (Id : E; V : E) is
4397 pragma Assert (Ekind (Id) = E_Record_Type);
4399 end Set_Parent_Subtype;
4401 procedure Set_Primitive_Operations (Id : E; V : L) is
4403 pragma Assert (Is_Tagged_Type (Id));
4404 Set_Elist15 (Id, V);
4405 end Set_Primitive_Operations;
4407 procedure Set_Prival (Id : E; V : E) is
4409 pragma Assert (Is_Protected_Private (Id));
4413 procedure Set_Privals_Chain (Id : E; V : L) is
4415 pragma Assert (Is_Overloadable (Id)
4416 or else Ekind (Id) = E_Entry_Family);
4417 Set_Elist23 (Id, V);
4418 end Set_Privals_Chain;
4420 procedure Set_Private_Dependents (Id : E; V : L) is
4422 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
4423 Set_Elist18 (Id, V);
4424 end Set_Private_Dependents;
4426 procedure Set_Private_View (Id : E; V : N) is
4428 pragma Assert (Is_Private_Type (Id));
4430 end Set_Private_View;
4432 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
4434 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
4436 end Set_Protected_Body_Subprogram;
4438 procedure Set_Protected_Formal (Id : E; V : E) is
4440 pragma Assert (Is_Formal (Id));
4442 end Set_Protected_Formal;
4444 procedure Set_Protected_Operation (Id : E; V : N) is
4446 pragma Assert (Is_Protected_Private (Id));
4448 end Set_Protected_Operation;
4450 procedure Set_Reachable (Id : E; V : B := True) is
4455 procedure Set_Referenced (Id : E; V : B := True) is
4457 Set_Flag156 (Id, V);
4460 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
4463 end Set_Referenced_As_LHS;
4465 procedure Set_Referenced_Object (Id : E; V : N) is
4467 pragma Assert (Is_Type (Id));
4469 end Set_Referenced_Object;
4471 procedure Set_Register_Exception_Call (Id : E; V : N) is
4473 pragma Assert (Ekind (Id) = E_Exception);
4475 end Set_Register_Exception_Call;
4477 procedure Set_Related_Array_Object (Id : E; V : E) is
4479 pragma Assert (Is_Array_Type (Id));
4481 end Set_Related_Array_Object;
4483 procedure Set_Related_Instance (Id : E; V : E) is
4486 (Ekind (Id) = E_Package or else Ekind (Id) = E_Package_Body);
4488 end Set_Related_Instance;
4490 procedure Set_Renamed_Entity (Id : E; V : N) is
4493 end Set_Renamed_Entity;
4495 procedure Set_Renamed_Object (Id : E; V : N) is
4498 end Set_Renamed_Object;
4500 procedure Set_Renaming_Map (Id : E; V : U) is
4503 end Set_Renaming_Map;
4505 procedure Set_Return_Present (Id : E; V : B := True) is
4508 end Set_Return_Present;
4510 procedure Set_Return_Applies_To (Id : E; V : N) is
4513 end Set_Return_Applies_To;
4515 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
4518 end Set_Returns_By_Ref;
4520 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
4523 (Is_Record_Type (Id) and then Id = Base_Type (Id));
4524 Set_Flag164 (Id, V);
4525 end Set_Reverse_Bit_Order;
4527 procedure Set_RM_Size (Id : E; V : U) is
4529 pragma Assert (Is_Type (Id));
4533 procedure Set_Scalar_Range (Id : E; V : N) is
4536 end Set_Scalar_Range;
4538 procedure Set_Scale_Value (Id : E; V : U) is
4541 end Set_Scale_Value;
4543 procedure Set_Scope_Depth_Value (Id : E; V : U) is
4545 pragma Assert (not Is_Record_Type (Id));
4547 end Set_Scope_Depth_Value;
4549 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
4551 Set_Flag167 (Id, V);
4552 end Set_Sec_Stack_Needed_For_Return;
4554 procedure Set_Shadow_Entities (Id : E; V : S) is
4557 (Ekind (Id) = E_Package or else Ekind (Id) = E_Generic_Package);
4559 end Set_Shadow_Entities;
4561 procedure Set_Shared_Var_Assign_Proc (Id : E; V : E) is
4563 pragma Assert (Ekind (Id) = E_Variable);
4565 end Set_Shared_Var_Assign_Proc;
4567 procedure Set_Shared_Var_Read_Proc (Id : E; V : E) is
4569 pragma Assert (Ekind (Id) = E_Variable);
4571 end Set_Shared_Var_Read_Proc;
4573 procedure Set_Size_Check_Code (Id : E; V : N) is
4575 pragma Assert (Ekind (Id) = E_Constant or else Ekind (Id) = E_Variable);
4577 end Set_Size_Check_Code;
4579 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
4581 Set_Flag177 (Id, V);
4582 end Set_Size_Depends_On_Discriminant;
4584 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
4587 end Set_Size_Known_At_Compile_Time;
4589 procedure Set_Small_Value (Id : E; V : R) is
4591 pragma Assert (Is_Fixed_Point_Type (Id));
4592 Set_Ureal21 (Id, V);
4593 end Set_Small_Value;
4595 procedure Set_Spec_Entity (Id : E; V : E) is
4597 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
4599 end Set_Spec_Entity;
4601 procedure Set_Storage_Size_Variable (Id : E; V : E) is
4603 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4604 pragma Assert (Base_Type (Id) = Id);
4606 end Set_Storage_Size_Variable;
4608 procedure Set_Stored_Constraint (Id : E; V : L) is
4610 pragma Assert (Nkind (Id) in N_Entity);
4611 Set_Elist23 (Id, V);
4612 end Set_Stored_Constraint;
4614 procedure Set_Strict_Alignment (Id : E; V : B := True) is
4616 pragma Assert (Base_Type (Id) = Id);
4617 Set_Flag145 (Id, V);
4618 end Set_Strict_Alignment;
4620 procedure Set_String_Literal_Length (Id : E; V : U) is
4622 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
4624 end Set_String_Literal_Length;
4626 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
4628 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
4630 end Set_String_Literal_Low_Bound;
4632 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
4634 Set_Flag148 (Id, V);
4635 end Set_Suppress_Elaboration_Warnings;
4637 procedure Set_Suppress_Init_Proc (Id : E; V : B := True) is
4639 pragma Assert (Id = Base_Type (Id));
4640 Set_Flag105 (Id, V);
4641 end Set_Suppress_Init_Proc;
4643 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
4645 Set_Flag165 (Id, V);
4646 end Set_Suppress_Style_Checks;
4648 procedure Set_Task_Body_Procedure (Id : E; V : N) is
4650 pragma Assert (Ekind (Id) in Task_Kind);
4652 end Set_Task_Body_Procedure;
4654 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
4657 end Set_Treat_As_Volatile;
4659 procedure Set_Underlying_Full_View (Id : E; V : E) is
4661 pragma Assert (Ekind (Id) in Private_Kind);
4663 end Set_Underlying_Full_View;
4665 procedure Set_Unset_Reference (Id : E; V : N) is
4668 end Set_Unset_Reference;
4670 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
4673 end Set_Uses_Sec_Stack;
4675 procedure Set_Vax_Float (Id : E; V : B := True) is
4677 pragma Assert (Id = Base_Type (Id));
4678 Set_Flag151 (Id, V);
4681 procedure Set_Warnings_Off (Id : E; V : B := True) is
4684 end Set_Warnings_Off;
4686 procedure Set_Was_Hidden (Id : E; V : B := True) is
4688 Set_Flag196 (Id, V);
4691 procedure Set_Wrapped_Entity (Id : E; V : E) is
4693 pragma Assert (Ekind (Id) = E_Procedure
4694 and then Is_Primitive_Wrapper (Id));
4696 end Set_Wrapped_Entity;
4698 -----------------------------------
4699 -- Field Initialization Routines --
4700 -----------------------------------
4702 procedure Init_Alignment (Id : E) is
4704 Set_Uint14 (Id, Uint_0);
4707 procedure Init_Alignment (Id : E; V : Int) is
4709 Set_Uint14 (Id, UI_From_Int (V));
4712 procedure Init_Component_Bit_Offset (Id : E) is
4714 Set_Uint11 (Id, No_Uint);
4715 end Init_Component_Bit_Offset;
4717 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
4719 Set_Uint11 (Id, UI_From_Int (V));
4720 end Init_Component_Bit_Offset;
4722 procedure Init_Component_Size (Id : E) is
4724 Set_Uint22 (Id, Uint_0);
4725 end Init_Component_Size;
4727 procedure Init_Component_Size (Id : E; V : Int) is
4729 Set_Uint22 (Id, UI_From_Int (V));
4730 end Init_Component_Size;
4732 procedure Init_Digits_Value (Id : E) is
4734 Set_Uint17 (Id, Uint_0);
4735 end Init_Digits_Value;
4737 procedure Init_Digits_Value (Id : E; V : Int) is
4739 Set_Uint17 (Id, UI_From_Int (V));
4740 end Init_Digits_Value;
4742 procedure Init_Esize (Id : E) is
4744 Set_Uint12 (Id, Uint_0);
4747 procedure Init_Esize (Id : E; V : Int) is
4749 Set_Uint12 (Id, UI_From_Int (V));
4752 procedure Init_Normalized_First_Bit (Id : E) is
4754 Set_Uint8 (Id, No_Uint);
4755 end Init_Normalized_First_Bit;
4757 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
4759 Set_Uint8 (Id, UI_From_Int (V));
4760 end Init_Normalized_First_Bit;
4762 procedure Init_Normalized_Position (Id : E) is
4764 Set_Uint14 (Id, No_Uint);
4765 end Init_Normalized_Position;
4767 procedure Init_Normalized_Position (Id : E; V : Int) is
4769 Set_Uint14 (Id, UI_From_Int (V));
4770 end Init_Normalized_Position;
4772 procedure Init_Normalized_Position_Max (Id : E) is
4774 Set_Uint10 (Id, No_Uint);
4775 end Init_Normalized_Position_Max;
4777 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
4779 Set_Uint10 (Id, UI_From_Int (V));
4780 end Init_Normalized_Position_Max;
4782 procedure Init_RM_Size (Id : E) is
4784 Set_Uint13 (Id, Uint_0);
4787 procedure Init_RM_Size (Id : E; V : Int) is
4789 Set_Uint13 (Id, UI_From_Int (V));
4792 -----------------------------
4793 -- Init_Component_Location --
4794 -----------------------------
4796 procedure Init_Component_Location (Id : E) is
4798 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
4799 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
4800 Set_Uint11 (Id, No_Uint); -- Component_First_Bit
4801 Set_Uint12 (Id, Uint_0); -- Esize
4802 Set_Uint14 (Id, No_Uint); -- Normalized_Position
4803 end Init_Component_Location;
4809 procedure Init_Size (Id : E; V : Int) is
4811 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
4812 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
4815 ---------------------
4816 -- Init_Size_Align --
4817 ---------------------
4819 procedure Init_Size_Align (Id : E) is
4821 Set_Uint12 (Id, Uint_0); -- Esize
4822 Set_Uint13 (Id, Uint_0); -- RM_Size
4823 Set_Uint14 (Id, Uint_0); -- Alignment
4824 end Init_Size_Align;
4826 ----------------------------------------------
4827 -- Type Representation Attribute Predicates --
4828 ----------------------------------------------
4830 function Known_Alignment (E : Entity_Id) return B is
4832 return Uint14 (E) /= Uint_0
4833 and then Uint14 (E) /= No_Uint;
4834 end Known_Alignment;
4836 function Known_Component_Bit_Offset (E : Entity_Id) return B is
4838 return Uint11 (E) /= No_Uint;
4839 end Known_Component_Bit_Offset;
4841 function Known_Component_Size (E : Entity_Id) return B is
4843 return Uint22 (Base_Type (E)) /= Uint_0
4844 and then Uint22 (Base_Type (E)) /= No_Uint;
4845 end Known_Component_Size;
4847 function Known_Esize (E : Entity_Id) return B is
4849 return Uint12 (E) /= Uint_0
4850 and then Uint12 (E) /= No_Uint;
4853 function Known_Normalized_First_Bit (E : Entity_Id) return B is
4855 return Uint8 (E) /= No_Uint;
4856 end Known_Normalized_First_Bit;
4858 function Known_Normalized_Position (E : Entity_Id) return B is
4860 return Uint14 (E) /= No_Uint;
4861 end Known_Normalized_Position;
4863 function Known_Normalized_Position_Max (E : Entity_Id) return B is
4865 return Uint10 (E) /= No_Uint;
4866 end Known_Normalized_Position_Max;
4868 function Known_RM_Size (E : Entity_Id) return B is
4870 return Uint13 (E) /= No_Uint
4871 and then (Uint13 (E) /= Uint_0
4872 or else Is_Discrete_Type (E)
4873 or else Is_Fixed_Point_Type (E));
4876 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
4878 return Uint11 (E) /= No_Uint
4879 and then Uint11 (E) >= Uint_0;
4880 end Known_Static_Component_Bit_Offset;
4882 function Known_Static_Component_Size (E : Entity_Id) return B is
4884 return Uint22 (Base_Type (E)) > Uint_0;
4885 end Known_Static_Component_Size;
4887 function Known_Static_Esize (E : Entity_Id) return B is
4889 return Uint12 (E) > Uint_0;
4890 end Known_Static_Esize;
4892 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
4894 return Uint8 (E) /= No_Uint
4895 and then Uint8 (E) >= Uint_0;
4896 end Known_Static_Normalized_First_Bit;
4898 function Known_Static_Normalized_Position (E : Entity_Id) return B is
4900 return Uint14 (E) /= No_Uint
4901 and then Uint14 (E) >= Uint_0;
4902 end Known_Static_Normalized_Position;
4904 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
4906 return Uint10 (E) /= No_Uint
4907 and then Uint10 (E) >= Uint_0;
4908 end Known_Static_Normalized_Position_Max;
4910 function Known_Static_RM_Size (E : Entity_Id) return B is
4912 return Uint13 (E) > Uint_0
4913 or else Is_Discrete_Type (E)
4914 or else Is_Fixed_Point_Type (E);
4915 end Known_Static_RM_Size;
4917 function Unknown_Alignment (E : Entity_Id) return B is
4919 return Uint14 (E) = Uint_0
4920 or else Uint14 (E) = No_Uint;
4921 end Unknown_Alignment;
4923 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
4925 return Uint11 (E) = No_Uint;
4926 end Unknown_Component_Bit_Offset;
4928 function Unknown_Component_Size (E : Entity_Id) return B is
4930 return Uint22 (Base_Type (E)) = Uint_0
4932 Uint22 (Base_Type (E)) = No_Uint;
4933 end Unknown_Component_Size;
4935 function Unknown_Esize (E : Entity_Id) return B is
4937 return Uint12 (E) = No_Uint
4939 Uint12 (E) = Uint_0;
4942 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
4944 return Uint8 (E) = No_Uint;
4945 end Unknown_Normalized_First_Bit;
4947 function Unknown_Normalized_Position (E : Entity_Id) return B is
4949 return Uint14 (E) = No_Uint;
4950 end Unknown_Normalized_Position;
4952 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
4954 return Uint10 (E) = No_Uint;
4955 end Unknown_Normalized_Position_Max;
4957 function Unknown_RM_Size (E : Entity_Id) return B is
4959 return (Uint13 (E) = Uint_0
4960 and then not Is_Discrete_Type (E)
4961 and then not Is_Fixed_Point_Type (E))
4962 or else Uint13 (E) = No_Uint;
4963 end Unknown_RM_Size;
4965 --------------------
4966 -- Address_Clause --
4967 --------------------
4969 function Address_Clause (Id : E) return N is
4971 return Rep_Clause (Id, Name_Address);
4974 ----------------------
4975 -- Alignment_Clause --
4976 ----------------------
4978 function Alignment_Clause (Id : E) return N is
4980 return Rep_Clause (Id, Name_Alignment);
4981 end Alignment_Clause;
4983 ----------------------
4984 -- Ancestor_Subtype --
4985 ----------------------
4987 function Ancestor_Subtype (Id : E) return E is
4989 -- If this is first subtype, or is a base type, then there is no
4990 -- ancestor subtype, so we return Empty to indicate this fact.
4992 if Is_First_Subtype (Id) or else Id = Base_Type (Id) then
4997 D : constant Node_Id := Declaration_Node (Id);
5000 -- If we have a subtype declaration, get the ancestor subtype
5002 if Nkind (D) = N_Subtype_Declaration then
5003 if Nkind (Subtype_Indication (D)) = N_Subtype_Indication then
5004 return Entity (Subtype_Mark (Subtype_Indication (D)));
5006 return Entity (Subtype_Indication (D));
5009 -- If not, then no subtype indication is available
5015 end Ancestor_Subtype;
5021 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
5023 if Last_Entity (V) = Empty then
5024 Set_First_Entity (V, Id);
5026 Set_Next_Entity (Last_Entity (V), Id);
5029 Set_Next_Entity (Id, Empty);
5031 Set_Last_Entity (V, Id);
5038 function Base_Type (Id : E) return E is
5041 when E_Enumeration_Subtype |
5043 E_Signed_Integer_Subtype |
5044 E_Modular_Integer_Subtype |
5045 E_Floating_Point_Subtype |
5046 E_Ordinary_Fixed_Point_Subtype |
5047 E_Decimal_Fixed_Point_Subtype |
5052 E_Record_Subtype_With_Private |
5053 E_Limited_Private_Subtype |
5055 E_Protected_Subtype |
5057 E_String_Literal_Subtype |
5058 E_Class_Wide_Subtype =>
5066 -------------------------
5067 -- Component_Alignment --
5068 -------------------------
5070 -- Component Alignment is encoded using two flags, Flag128/129 as
5071 -- follows. Note that both flags False = Align_Default, so that the
5072 -- default initialization of flags to False initializes component
5073 -- alignment to the default value as required.
5075 -- Flag128 Flag129 Value
5076 -- ------- ------- -----
5077 -- False False Calign_Default
5078 -- False True Calign_Component_Size
5079 -- True False Calign_Component_Size_4
5080 -- True True Calign_Storage_Unit
5082 function Component_Alignment (Id : E) return C is
5083 BT : constant Node_Id := Base_Type (Id);
5086 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
5088 if Flag128 (BT) then
5089 if Flag129 (BT) then
5090 return Calign_Storage_Unit;
5092 return Calign_Component_Size_4;
5096 if Flag129 (BT) then
5097 return Calign_Component_Size;
5099 return Calign_Default;
5102 end Component_Alignment;
5104 --------------------
5105 -- Constant_Value --
5106 --------------------
5108 function Constant_Value (Id : E) return N is
5109 D : constant Node_Id := Declaration_Node (Id);
5113 -- If we have no declaration node, then return no constant value.
5114 -- Not clear how this can happen, but it does sometimes ???
5115 -- To investigate, remove this check and compile discrim_po.adb.
5120 -- Normal case where a declaration node is present
5122 elsif Nkind (D) = N_Object_Renaming_Declaration then
5123 return Renamed_Object (Id);
5125 -- If this is a component declaration whose entity is constant, it
5126 -- is a prival within a protected function. It does not have
5127 -- a constant value.
5129 elsif Nkind (D) = N_Component_Declaration then
5132 -- If there is an expression, return it
5134 elsif Present (Expression (D)) then
5135 return (Expression (D));
5137 -- For a constant, see if we have a full view
5139 elsif Ekind (Id) = E_Constant
5140 and then Present (Full_View (Id))
5142 Full_D := Parent (Full_View (Id));
5144 -- The full view may have been rewritten as an object renaming
5146 if Nkind (Full_D) = N_Object_Renaming_Declaration then
5147 return Name (Full_D);
5149 return Expression (Full_D);
5152 -- Otherwise we have no expression to return
5159 ----------------------
5160 -- Declaration_Node --
5161 ----------------------
5163 function Declaration_Node (Id : E) return N is
5167 if Ekind (Id) = E_Incomplete_Type
5168 and then Present (Full_View (Id))
5170 P := Parent (Full_View (Id));
5176 if Nkind (P) /= N_Selected_Component
5177 and then Nkind (P) /= N_Expanded_Name
5179 not (Nkind (P) = N_Defining_Program_Unit_Name
5180 and then Is_Child_Unit (Id))
5188 end Declaration_Node;
5190 ---------------------
5191 -- Designated_Type --
5192 ---------------------
5194 function Designated_Type (Id : E) return E is
5198 Desig_Type := Directly_Designated_Type (Id);
5200 if Ekind (Desig_Type) = E_Incomplete_Type
5201 and then Present (Full_View (Desig_Type))
5203 return Full_View (Desig_Type);
5205 elsif Is_Class_Wide_Type (Desig_Type)
5206 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
5207 and then Present (Full_View (Etype (Desig_Type)))
5208 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
5210 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
5215 end Designated_Type;
5217 -----------------------------
5218 -- Enclosing_Dynamic_Scope --
5219 -----------------------------
5221 function Enclosing_Dynamic_Scope (Id : E) return E is
5225 -- The following test is an error defense against some syntax
5226 -- errors that can leave scopes very messed up.
5228 if Id = Standard_Standard then
5232 -- Normal case, search enclosing scopes
5235 while S /= Standard_Standard
5236 and then not Is_Dynamic_Scope (S)
5242 end Enclosing_Dynamic_Scope;
5244 ----------------------
5245 -- Entry_Index_Type --
5246 ----------------------
5248 function Entry_Index_Type (Id : E) return N is
5250 pragma Assert (Ekind (Id) = E_Entry_Family);
5251 return Etype (Discrete_Subtype_Definition (Parent (Id)));
5252 end Entry_Index_Type;
5254 ---------------------
5256 ---------------------
5258 function First_Component (Id : E) return E is
5263 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5265 Comp_Id := First_Entity (Id);
5266 while Present (Comp_Id) loop
5267 exit when Ekind (Comp_Id) = E_Component;
5268 Comp_Id := Next_Entity (Comp_Id);
5272 end First_Component;
5274 ------------------------
5275 -- First_Discriminant --
5276 ------------------------
5278 function First_Discriminant (Id : E) return E is
5283 (Has_Discriminants (Id)
5284 or else Has_Unknown_Discriminants (Id));
5286 Ent := First_Entity (Id);
5288 -- The discriminants are not necessarily contiguous, because access
5289 -- discriminants will generate itypes. They are not the first entities
5290 -- either, because tag and controller record must be ahead of them.
5292 if Chars (Ent) = Name_uTag then
5293 Ent := Next_Entity (Ent);
5296 if Chars (Ent) = Name_uController then
5297 Ent := Next_Entity (Ent);
5300 -- Skip all hidden stored discriminants if any
5302 while Present (Ent) loop
5303 exit when Ekind (Ent) = E_Discriminant
5304 and then not Is_Completely_Hidden (Ent);
5306 Ent := Next_Entity (Ent);
5309 pragma Assert (Ekind (Ent) = E_Discriminant);
5312 end First_Discriminant;
5318 function First_Formal (Id : E) return E is
5323 (Is_Overloadable (Id)
5324 or else Ekind (Id) = E_Entry_Family
5325 or else Ekind (Id) = E_Subprogram_Body
5326 or else Ekind (Id) = E_Subprogram_Type);
5328 if Ekind (Id) = E_Enumeration_Literal then
5332 Formal := First_Entity (Id);
5334 if Present (Formal) and then Is_Formal (Formal) then
5342 ------------------------------
5343 -- First_Formal_With_Extras --
5344 ------------------------------
5346 function First_Formal_With_Extras (Id : E) return E is
5351 (Is_Overloadable (Id)
5352 or else Ekind (Id) = E_Entry_Family
5353 or else Ekind (Id) = E_Subprogram_Body
5354 or else Ekind (Id) = E_Subprogram_Type);
5356 if Ekind (Id) = E_Enumeration_Literal then
5360 Formal := First_Entity (Id);
5362 if Present (Formal) and then Is_Formal (Formal) then
5365 return Extra_Formals (Id); -- Empty if no extra formals
5368 end First_Formal_With_Extras;
5370 -------------------------------
5371 -- First_Stored_Discriminant --
5372 -------------------------------
5374 function First_Stored_Discriminant (Id : E) return E is
5377 function Has_Completely_Hidden_Discriminant (Id : E) return Boolean;
5378 -- Scans the Discriminants to see whether any are Completely_Hidden
5379 -- (the mechanism for describing non-specified stored discriminants)
5381 ----------------------------------------
5382 -- Has_Completely_Hidden_Discriminant --
5383 ----------------------------------------
5385 function Has_Completely_Hidden_Discriminant (Id : E) return Boolean is
5386 Ent : Entity_Id := Id;
5389 pragma Assert (Ekind (Id) = E_Discriminant);
5391 while Present (Ent) and then Ekind (Ent) = E_Discriminant loop
5392 if Is_Completely_Hidden (Ent) then
5396 Ent := Next_Entity (Ent);
5400 end Has_Completely_Hidden_Discriminant;
5402 -- Start of processing for First_Stored_Discriminant
5406 (Has_Discriminants (Id)
5407 or else Has_Unknown_Discriminants (Id));
5409 Ent := First_Entity (Id);
5411 if Chars (Ent) = Name_uTag then
5412 Ent := Next_Entity (Ent);
5415 if Chars (Ent) = Name_uController then
5416 Ent := Next_Entity (Ent);
5419 if Has_Completely_Hidden_Discriminant (Ent) then
5421 while Present (Ent) loop
5422 exit when Is_Completely_Hidden (Ent);
5423 Ent := Next_Entity (Ent);
5428 pragma Assert (Ekind (Ent) = E_Discriminant);
5431 end First_Stored_Discriminant;
5437 function First_Subtype (Id : E) return E is
5438 B : constant Entity_Id := Base_Type (Id);
5439 F : constant Node_Id := Freeze_Node (B);
5443 -- If the base type has no freeze node, it is a type in standard,
5444 -- and always acts as its own first subtype unless it is one of
5445 -- the predefined integer types. If the type is formal, it is also
5446 -- a first subtype, and its base type has no freeze node. On the other
5447 -- hand, a subtype of a generic formal is not its own first_subtype.
5448 -- Its base type, if anonymous, is attached to the formal type decl.
5449 -- from which the first subtype is obtained.
5453 if B = Base_Type (Standard_Integer) then
5454 return Standard_Integer;
5456 elsif B = Base_Type (Standard_Long_Integer) then
5457 return Standard_Long_Integer;
5459 elsif B = Base_Type (Standard_Short_Short_Integer) then
5460 return Standard_Short_Short_Integer;
5462 elsif B = Base_Type (Standard_Short_Integer) then
5463 return Standard_Short_Integer;
5465 elsif B = Base_Type (Standard_Long_Long_Integer) then
5466 return Standard_Long_Long_Integer;
5468 elsif Is_Generic_Type (Id) then
5469 if Present (Parent (B)) then
5470 return Defining_Identifier (Parent (B));
5472 return Defining_Identifier (Associated_Node_For_Itype (B));
5479 -- Otherwise we check the freeze node, if it has a First_Subtype_Link
5480 -- then we use that link, otherwise (happens with some Itypes), we use
5481 -- the base type itself.
5484 Ent := First_Subtype_Link (F);
5486 if Present (Ent) then
5494 -------------------------------------
5495 -- Get_Attribute_Definition_Clause --
5496 -------------------------------------
5498 function Get_Attribute_Definition_Clause
5500 Id : Attribute_Id) return Node_Id
5505 N := First_Rep_Item (E);
5506 while Present (N) loop
5507 if Nkind (N) = N_Attribute_Definition_Clause
5508 and then Get_Attribute_Id (Chars (N)) = Id
5517 end Get_Attribute_Definition_Clause;
5519 --------------------
5520 -- Get_Rep_Pragma --
5521 --------------------
5523 function Get_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Node_Id is
5527 N := First_Rep_Item (E);
5528 while Present (N) loop
5529 if Nkind (N) = N_Pragma and then Chars (N) = Nam then
5539 ------------------------
5540 -- Has_Attach_Handler --
5541 ------------------------
5543 function Has_Attach_Handler (Id : E) return B is
5547 pragma Assert (Is_Protected_Type (Id));
5549 Ritem := First_Rep_Item (Id);
5550 while Present (Ritem) loop
5551 if Nkind (Ritem) = N_Pragma
5552 and then Chars (Ritem) = Name_Attach_Handler
5556 Ritem := Next_Rep_Item (Ritem);
5561 end Has_Attach_Handler;
5563 -------------------------------------
5564 -- Has_Attribute_Definition_Clause --
5565 -------------------------------------
5567 function Has_Attribute_Definition_Clause
5569 Id : Attribute_Id) return Boolean
5572 return Present (Get_Attribute_Definition_Clause (E, Id));
5573 end Has_Attribute_Definition_Clause;
5579 function Has_Entries (Id : E) return B is
5580 Result : Boolean := False;
5584 pragma Assert (Is_Concurrent_Type (Id));
5586 Ent := First_Entity (Id);
5587 while Present (Ent) loop
5588 if Is_Entry (Ent) then
5593 Ent := Next_Entity (Ent);
5599 ----------------------------
5600 -- Has_Foreign_Convention --
5601 ----------------------------
5603 function Has_Foreign_Convention (Id : E) return B is
5605 return Convention (Id) >= Foreign_Convention'First;
5606 end Has_Foreign_Convention;
5608 ---------------------------
5609 -- Has_Interrupt_Handler --
5610 ---------------------------
5612 function Has_Interrupt_Handler (Id : E) return B is
5616 pragma Assert (Is_Protected_Type (Id));
5618 Ritem := First_Rep_Item (Id);
5619 while Present (Ritem) loop
5620 if Nkind (Ritem) = N_Pragma
5621 and then Chars (Ritem) = Name_Interrupt_Handler
5625 Ritem := Next_Rep_Item (Ritem);
5630 end Has_Interrupt_Handler;
5632 --------------------------
5633 -- Has_Private_Ancestor --
5634 --------------------------
5636 function Has_Private_Ancestor (Id : E) return B is
5637 R : constant Entity_Id := Root_Type (Id);
5638 T1 : Entity_Id := Id;
5642 if Is_Private_Type (T1) then
5652 end Has_Private_Ancestor;
5654 --------------------
5655 -- Has_Rep_Pragma --
5656 --------------------
5658 function Has_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Boolean is
5660 return Present (Get_Rep_Pragma (E, Nam));
5663 ------------------------------
5664 -- Implementation_Base_Type --
5665 ------------------------------
5667 function Implementation_Base_Type (Id : E) return E is
5672 Bastyp := Base_Type (Id);
5674 if Is_Incomplete_Or_Private_Type (Bastyp) then
5675 Imptyp := Underlying_Type (Bastyp);
5677 -- If we have an implementation type, then just return it,
5678 -- otherwise we return the Base_Type anyway. This can only
5679 -- happen in error situations and should avoid some error bombs.
5681 if Present (Imptyp) then
5682 return Base_Type (Imptyp);
5690 end Implementation_Base_Type;
5692 -----------------------
5693 -- Is_Always_Inlined --
5694 -----------------------
5696 function Is_Always_Inlined (Id : E) return B is
5700 Item := First_Rep_Item (Id);
5701 while Present (Item) loop
5702 if Nkind (Item) = N_Pragma
5703 and then Get_Pragma_Id (Chars (Item)) = Pragma_Inline_Always
5708 Next_Rep_Item (Item);
5712 end Is_Always_Inlined;
5714 ---------------------
5715 -- Is_Boolean_Type --
5716 ---------------------
5718 function Is_Boolean_Type (Id : E) return B is
5720 return Root_Type (Id) = Standard_Boolean;
5721 end Is_Boolean_Type;
5723 ---------------------
5724 -- Is_By_Copy_Type --
5725 ---------------------
5727 function Is_By_Copy_Type (Id : E) return B is
5729 -- If Id is a private type whose full declaration has not been seen,
5730 -- we assume for now that it is not a By_Copy type. Clearly this
5731 -- attribute should not be used before the type is frozen, but it is
5732 -- needed to build the associated record of a protected type. Another
5733 -- place where some lookahead for a full view is needed ???
5736 Is_Elementary_Type (Id)
5737 or else (Is_Private_Type (Id)
5738 and then Present (Underlying_Type (Id))
5739 and then Is_Elementary_Type (Underlying_Type (Id)));
5740 end Is_By_Copy_Type;
5742 --------------------------
5743 -- Is_By_Reference_Type --
5744 --------------------------
5746 function Is_By_Reference_Type (Id : E) return B is
5747 Btype : constant Entity_Id := Base_Type (Id);
5750 if Error_Posted (Id)
5751 or else Error_Posted (Btype)
5755 elsif Is_Private_Type (Btype) then
5757 Utyp : constant Entity_Id := Underlying_Type (Btype);
5763 return Is_By_Reference_Type (Utyp);
5767 elsif Is_Concurrent_Type (Btype) then
5770 elsif Is_Record_Type (Btype) then
5771 if Is_Limited_Record (Btype)
5772 or else Is_Tagged_Type (Btype)
5773 or else Is_Volatile (Btype)
5782 C := First_Component (Btype);
5783 while Present (C) loop
5784 if Is_By_Reference_Type (Etype (C))
5785 or else Is_Volatile (Etype (C))
5790 C := Next_Component (C);
5797 elsif Is_Array_Type (Btype) then
5800 or else Is_By_Reference_Type (Component_Type (Btype))
5801 or else Is_Volatile (Component_Type (Btype))
5802 or else Has_Volatile_Components (Btype);
5807 end Is_By_Reference_Type;
5809 ---------------------
5810 -- Is_Derived_Type --
5811 ---------------------
5813 function Is_Derived_Type (Id : E) return B is
5818 and then Base_Type (Id) /= Root_Type (Id)
5819 and then not Is_Generic_Type (Id)
5820 and then not Is_Class_Wide_Type (Id)
5822 if not Is_Numeric_Type (Root_Type (Id)) then
5826 Par := Parent (First_Subtype (Id));
5828 return Present (Par)
5829 and then Nkind (Par) = N_Full_Type_Declaration
5830 and then Nkind (Type_Definition (Par))
5831 = N_Derived_Type_Definition;
5837 end Is_Derived_Type;
5839 ----------------------
5840 -- Is_Dynamic_Scope --
5841 ----------------------
5843 function Is_Dynamic_Scope (Id : E) return B is
5846 Ekind (Id) = E_Block
5848 Ekind (Id) = E_Function
5850 Ekind (Id) = E_Procedure
5852 Ekind (Id) = E_Subprogram_Body
5854 Ekind (Id) = E_Task_Type
5856 Ekind (Id) = E_Entry
5858 Ekind (Id) = E_Entry_Family
5860 Ekind (Id) = E_Return_Statement;
5861 end Is_Dynamic_Scope;
5863 --------------------
5864 -- Is_Entity_Name --
5865 --------------------
5867 function Is_Entity_Name (N : Node_Id) return Boolean is
5868 Kind : constant Node_Kind := Nkind (N);
5871 -- Identifiers, operator symbols, expanded names are entity names
5873 return Kind = N_Identifier
5874 or else Kind = N_Operator_Symbol
5875 or else Kind = N_Expanded_Name
5877 -- Attribute references are entity names if they refer to an entity.
5878 -- Note that we don't do this by testing for the presence of the
5879 -- Entity field in the N_Attribute_Reference node, since it may not
5880 -- have been set yet.
5882 or else (Kind = N_Attribute_Reference
5883 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
5886 ---------------------------
5887 -- Is_Indefinite_Subtype --
5888 ---------------------------
5890 function Is_Indefinite_Subtype (Id : Entity_Id) return B is
5891 K : constant Entity_Kind := Ekind (Id);
5894 if Is_Constrained (Id) then
5897 elsif K in Array_Kind
5898 or else K in Class_Wide_Kind
5899 or else Has_Unknown_Discriminants (Id)
5903 -- Known discriminants: indefinite if there are no default values
5905 elsif K in Record_Kind
5906 or else Is_Incomplete_Or_Private_Type (Id)
5907 or else Is_Concurrent_Type (Id)
5909 return (Has_Discriminants (Id)
5910 and then No (Discriminant_Default_Value (First_Discriminant (Id))));
5915 end Is_Indefinite_Subtype;
5917 ---------------------
5918 -- Is_Limited_Type --
5919 ---------------------
5921 function Is_Limited_Type (Id : E) return B is
5922 Btype : constant E := Base_Type (Id);
5923 Rtype : constant E := Root_Type (Btype);
5926 if not Is_Type (Id) then
5929 elsif Ekind (Btype) = E_Limited_Private_Type
5930 or else Is_Limited_Composite (Btype)
5934 elsif Is_Concurrent_Type (Btype) then
5937 -- The Is_Limited_Record flag normally indicates that the type is
5938 -- limited. The exception is that a type does not inherit limitedness
5939 -- from its interface ancestor. So the type may be derived from a
5940 -- limited interface, but is not limited.
5942 elsif Is_Limited_Record (Id)
5943 and then not Is_Interface (Id)
5947 -- Otherwise we will look around to see if there is some other reason
5948 -- for it to be limited, except that if an error was posted on the
5949 -- entity, then just assume it is non-limited, because it can cause
5950 -- trouble to recurse into a murky erroneous entity!
5952 elsif Error_Posted (Id) then
5955 elsif Is_Record_Type (Btype) then
5957 -- AI-419: limitedness is not inherited from a limited interface
5959 if Is_Limited_Record (Rtype) then
5960 return not Is_Interface (Rtype)
5961 or else Is_Protected_Interface (Rtype)
5962 or else Is_Synchronized_Interface (Rtype)
5963 or else Is_Task_Interface (Rtype);
5965 elsif Is_Class_Wide_Type (Btype) then
5966 return Is_Limited_Type (Rtype);
5973 C := First_Component (Btype);
5974 while Present (C) loop
5975 if Is_Limited_Type (Etype (C)) then
5979 C := Next_Component (C);
5986 elsif Is_Array_Type (Btype) then
5987 return Is_Limited_Type (Component_Type (Btype));
5992 end Is_Limited_Type;
5994 -----------------------------------
5995 -- Is_Package_Or_Generic_Package --
5996 -----------------------------------
5998 function Is_Package_Or_Generic_Package (Id : E) return B is
6001 Ekind (Id) = E_Package
6003 Ekind (Id) = E_Generic_Package;
6004 end Is_Package_Or_Generic_Package;
6006 --------------------------
6007 -- Is_Protected_Private --
6008 --------------------------
6010 function Is_Protected_Private (Id : E) return B is
6012 pragma Assert (Ekind (Id) = E_Component);
6013 return Is_Protected_Type (Scope (Id));
6014 end Is_Protected_Private;
6016 ------------------------------
6017 -- Is_Protected_Record_Type --
6018 ------------------------------
6020 function Is_Protected_Record_Type (Id : E) return B is
6023 Is_Concurrent_Record_Type (Id)
6024 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
6025 end Is_Protected_Record_Type;
6027 --------------------------------
6028 -- Is_Inherently_Limited_Type --
6029 --------------------------------
6031 function Is_Inherently_Limited_Type (Id : E) return B is
6032 Btype : constant Entity_Id := Base_Type (Id);
6035 if Is_Private_Type (Btype) then
6037 Utyp : constant Entity_Id := Underlying_Type (Btype);
6042 return Is_Inherently_Limited_Type (Utyp);
6046 elsif Is_Concurrent_Type (Btype) then
6049 elsif Is_Record_Type (Btype) then
6050 if Is_Limited_Record (Btype) then
6051 return not Is_Interface (Btype)
6052 or else Is_Protected_Interface (Btype)
6053 or else Is_Synchronized_Interface (Btype)
6054 or else Is_Task_Interface (Btype);
6056 elsif Is_Class_Wide_Type (Btype) then
6057 return Is_Inherently_Limited_Type (Root_Type (Btype));
6064 C := First_Component (Btype);
6065 while Present (C) loop
6066 if Is_Inherently_Limited_Type (Etype (C)) then
6070 C := Next_Component (C);
6077 elsif Is_Array_Type (Btype) then
6078 return Is_Inherently_Limited_Type (Component_Type (Btype));
6083 end Is_Inherently_Limited_Type;
6085 --------------------
6086 -- Is_String_Type --
6087 --------------------
6089 function Is_String_Type (Id : E) return B is
6091 return Ekind (Id) in String_Kind
6092 or else (Is_Array_Type (Id)
6093 and then Number_Dimensions (Id) = 1
6094 and then Is_Character_Type (Component_Type (Id)));
6097 -------------------------
6098 -- Is_Task_Record_Type --
6099 -------------------------
6101 function Is_Task_Record_Type (Id : E) return B is
6104 Is_Concurrent_Record_Type (Id)
6105 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
6106 end Is_Task_Record_Type;
6108 ------------------------
6109 -- Is_Wrapper_Package --
6110 ------------------------
6112 function Is_Wrapper_Package (Id : E) return B is
6114 return (Ekind (Id) = E_Package
6115 and then Present (Related_Instance (Id)));
6116 end Is_Wrapper_Package;
6118 --------------------
6119 -- Next_Component --
6120 --------------------
6122 function Next_Component (Id : E) return E is
6126 Comp_Id := Next_Entity (Id);
6127 while Present (Comp_Id) loop
6128 exit when Ekind (Comp_Id) = E_Component;
6129 Comp_Id := Next_Entity (Comp_Id);
6135 -----------------------
6136 -- Next_Discriminant --
6137 -----------------------
6139 -- This function actually implements both Next_Discriminant and
6140 -- Next_Stored_Discriminant by making sure that the Discriminant
6141 -- returned is of the same variety as Id.
6143 function Next_Discriminant (Id : E) return E is
6145 -- Derived Tagged types with private extensions look like this...
6147 -- E_Discriminant d1
6148 -- E_Discriminant d2
6150 -- E_Discriminant d1
6151 -- E_Discriminant d2
6154 -- so it is critical not to go past the leading discriminants
6159 pragma Assert (Ekind (Id) = E_Discriminant);
6162 D := Next_Entity (D);
6164 or else (Ekind (D) /= E_Discriminant
6165 and then not Is_Itype (D))
6170 exit when Ekind (D) = E_Discriminant
6171 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
6175 end Next_Discriminant;
6181 function Next_Formal (Id : E) return E is
6185 -- Follow the chain of declared entities as long as the kind of
6186 -- the entity corresponds to a formal parameter. Skip internal
6187 -- entities that may have been created for implicit subtypes,
6188 -- in the process of analyzing default expressions.
6193 P := Next_Entity (P);
6195 if No (P) or else Is_Formal (P) then
6197 elsif not Is_Internal (P) then
6203 -----------------------------
6204 -- Next_Formal_With_Extras --
6205 -----------------------------
6207 function Next_Formal_With_Extras (Id : E) return E is
6209 if Present (Extra_Formal (Id)) then
6210 return Extra_Formal (Id);
6212 return Next_Formal (Id);
6214 end Next_Formal_With_Extras;
6220 function Next_Index (Id : Node_Id) return Node_Id is
6229 function Next_Literal (Id : E) return E is
6231 pragma Assert (Nkind (Id) in N_Entity);
6235 ------------------------------
6236 -- Next_Stored_Discriminant --
6237 ------------------------------
6239 function Next_Stored_Discriminant (Id : E) return E is
6241 -- See comment in Next_Discriminant
6243 return Next_Discriminant (Id);
6244 end Next_Stored_Discriminant;
6246 -----------------------
6247 -- Number_Dimensions --
6248 -----------------------
6250 function Number_Dimensions (Id : E) return Pos is
6255 if Ekind (Id) in String_Kind then
6260 T := First_Index (Id);
6261 while Present (T) loop
6268 end Number_Dimensions;
6270 --------------------------
6271 -- Number_Discriminants --
6272 --------------------------
6274 function Number_Discriminants (Id : E) return Pos is
6280 Discr := First_Discriminant (Id);
6281 while Present (Discr) loop
6283 Discr := Next_Discriminant (Discr);
6287 end Number_Discriminants;
6289 --------------------
6290 -- Number_Entries --
6291 --------------------
6293 function Number_Entries (Id : E) return Nat is
6298 pragma Assert (Is_Concurrent_Type (Id));
6301 Ent := First_Entity (Id);
6302 while Present (Ent) loop
6303 if Is_Entry (Ent) then
6307 Ent := Next_Entity (Ent);
6313 --------------------
6314 -- Number_Formals --
6315 --------------------
6317 function Number_Formals (Id : E) return Pos is
6323 Formal := First_Formal (Id);
6324 while Present (Formal) loop
6326 Formal := Next_Formal (Formal);
6332 --------------------
6333 -- Parameter_Mode --
6334 --------------------
6336 function Parameter_Mode (Id : E) return Formal_Kind is
6341 ---------------------
6342 -- Record_Rep_Item --
6343 ---------------------
6345 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
6347 Set_Next_Rep_Item (N, First_Rep_Item (E));
6348 Set_First_Rep_Item (E, N);
6349 end Record_Rep_Item;
6355 function Root_Type (Id : E) return E is
6359 pragma Assert (Nkind (Id) in N_Entity);
6361 T := Base_Type (Id);
6363 if Ekind (T) = E_Class_Wide_Type then
6375 -- Following test catches some error cases resulting from
6378 elsif No (Etyp) then
6381 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
6384 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
6390 -- Return if there is a circularity in the inheritance chain.
6391 -- This happens in some error situations and we do not want
6392 -- to get stuck in this loop.
6394 if T = Base_Type (Id) then
6400 raise Program_Error;
6407 function Scope_Depth (Id : E) return Uint is
6412 while Is_Record_Type (Scop) loop
6413 Scop := Scope (Scop);
6416 return Scope_Depth_Value (Scop);
6419 ---------------------
6420 -- Scope_Depth_Set --
6421 ---------------------
6423 function Scope_Depth_Set (Id : E) return B is
6425 return not Is_Record_Type (Id)
6426 and then Field22 (Id) /= Union_Id (Empty);
6427 end Scope_Depth_Set;
6429 -----------------------------
6430 -- Set_Component_Alignment --
6431 -----------------------------
6433 -- Component Alignment is encoded using two flags, Flag128/129 as
6434 -- follows. Note that both flags False = Align_Default, so that the
6435 -- default initialization of flags to False initializes component
6436 -- alignment to the default value as required.
6438 -- Flag128 Flag129 Value
6439 -- ------- ------- -----
6440 -- False False Calign_Default
6441 -- False True Calign_Component_Size
6442 -- True False Calign_Component_Size_4
6443 -- True True Calign_Storage_Unit
6445 procedure Set_Component_Alignment (Id : E; V : C) is
6447 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
6448 and then Id = Base_Type (Id));
6451 when Calign_Default =>
6452 Set_Flag128 (Id, False);
6453 Set_Flag129 (Id, False);
6455 when Calign_Component_Size =>
6456 Set_Flag128 (Id, False);
6457 Set_Flag129 (Id, True);
6459 when Calign_Component_Size_4 =>
6460 Set_Flag128 (Id, True);
6461 Set_Flag129 (Id, False);
6463 when Calign_Storage_Unit =>
6464 Set_Flag128 (Id, True);
6465 Set_Flag129 (Id, True);
6467 end Set_Component_Alignment;
6473 function Size_Clause (Id : E) return N is
6475 return Rep_Clause (Id, Name_Size);
6478 ------------------------
6479 -- Stream_Size_Clause --
6480 ------------------------
6482 function Stream_Size_Clause (Id : E) return N is
6484 return Rep_Clause (Id, Name_Stream_Size);
6485 end Stream_Size_Clause;
6491 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
6497 Kind := E_Access_Subtype;
6501 Kind := E_Array_Subtype;
6503 when E_Class_Wide_Type |
6504 E_Class_Wide_Subtype =>
6505 Kind := E_Class_Wide_Subtype;
6507 when E_Decimal_Fixed_Point_Type |
6508 E_Decimal_Fixed_Point_Subtype =>
6509 Kind := E_Decimal_Fixed_Point_Subtype;
6511 when E_Ordinary_Fixed_Point_Type |
6512 E_Ordinary_Fixed_Point_Subtype =>
6513 Kind := E_Ordinary_Fixed_Point_Subtype;
6515 when E_Private_Type |
6516 E_Private_Subtype =>
6517 Kind := E_Private_Subtype;
6519 when E_Limited_Private_Type |
6520 E_Limited_Private_Subtype =>
6521 Kind := E_Limited_Private_Subtype;
6523 when E_Record_Type_With_Private |
6524 E_Record_Subtype_With_Private =>
6525 Kind := E_Record_Subtype_With_Private;
6527 when E_Record_Type |
6529 Kind := E_Record_Subtype;
6531 when E_String_Type |
6533 Kind := E_String_Subtype;
6535 when Enumeration_Kind =>
6536 Kind := E_Enumeration_Subtype;
6539 Kind := E_Floating_Point_Subtype;
6541 when Signed_Integer_Kind =>
6542 Kind := E_Signed_Integer_Subtype;
6544 when Modular_Integer_Kind =>
6545 Kind := E_Modular_Integer_Subtype;
6547 when Protected_Kind =>
6548 Kind := E_Protected_Subtype;
6551 Kind := E_Task_Subtype;
6555 raise Program_Error;
6561 -------------------------
6562 -- First_Tag_Component --
6563 -------------------------
6565 function First_Tag_Component (Id : E) return E is
6567 Typ : Entity_Id := Id;
6570 pragma Assert (Is_Tagged_Type (Typ));
6572 if Is_Class_Wide_Type (Typ) then
6573 Typ := Root_Type (Typ);
6576 if Is_Private_Type (Typ) then
6577 Typ := Underlying_Type (Typ);
6579 -- If the underlying type is missing then the source program has
6580 -- errors and there is nothing else to do (the full-type declaration
6581 -- associated with the private type declaration is missing).
6588 Comp := First_Entity (Typ);
6589 while Present (Comp) loop
6590 if Is_Tag (Comp) then
6594 Comp := Next_Entity (Comp);
6597 -- No tag component found
6600 end First_Tag_Component;
6602 ------------------------
6603 -- Next_Tag_Component --
6604 ------------------------
6606 function Next_Tag_Component (Id : E) return E is
6608 Typ : constant Entity_Id := Scope (Id);
6611 pragma Assert (Ekind (Id) = E_Component
6612 and then Is_Tagged_Type (Typ));
6614 Comp := Next_Entity (Id);
6615 while Present (Comp) loop
6616 if Is_Tag (Comp) then
6617 pragma Assert (Chars (Comp) /= Name_uTag);
6621 Comp := Next_Entity (Comp);
6624 -- No tag component found
6627 end Next_Tag_Component;
6629 ---------------------
6630 -- Type_High_Bound --
6631 ---------------------
6633 function Type_High_Bound (Id : E) return Node_Id is
6634 Rng : constant Node_Id := Scalar_Range (Id);
6636 if Nkind (Rng) = N_Subtype_Indication then
6637 return High_Bound (Range_Expression (Constraint (Rng)));
6639 return High_Bound (Rng);
6641 end Type_High_Bound;
6643 --------------------
6644 -- Type_Low_Bound --
6645 --------------------
6647 function Type_Low_Bound (Id : E) return Node_Id is
6648 Rng : constant Node_Id := Scalar_Range (Id);
6650 if Nkind (Rng) = N_Subtype_Indication then
6651 return Low_Bound (Range_Expression (Constraint (Rng)));
6653 return Low_Bound (Rng);
6657 ---------------------
6658 -- Underlying_Type --
6659 ---------------------
6661 function Underlying_Type (Id : E) return E is
6663 -- For record_with_private the underlying type is always the direct
6664 -- full view. Never try to take the full view of the parent it
6665 -- doesn't make sense.
6667 if Ekind (Id) = E_Record_Type_With_Private then
6668 return Full_View (Id);
6670 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
6672 -- If we have an incomplete or private type with a full view,
6673 -- then we return the Underlying_Type of this full view
6675 if Present (Full_View (Id)) then
6676 if Id = Full_View (Id) then
6678 -- Previous error in declaration
6683 return Underlying_Type (Full_View (Id));
6686 -- If we have an incomplete entity that comes from the limited
6687 -- view then we return the Underlying_Type of its non-limited
6690 elsif From_With_Type (Id)
6691 and then Present (Non_Limited_View (Id))
6693 return Underlying_Type (Non_Limited_View (Id));
6695 -- Otherwise check for the case where we have a derived type or
6696 -- subtype, and if so get the Underlying_Type of the parent type.
6698 elsif Etype (Id) /= Id then
6699 return Underlying_Type (Etype (Id));
6701 -- Otherwise we have an incomplete or private type that has
6702 -- no full view, which means that we have not encountered the
6703 -- completion, so return Empty to indicate the underlying type
6704 -- is not yet known.
6710 -- For non-incomplete, non-private types, return the type itself
6711 -- Also for entities that are not types at all return the entity
6717 end Underlying_Type;
6719 ------------------------
6720 -- Write_Entity_Flags --
6721 ------------------------
6723 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
6725 procedure W (Flag_Name : String; Flag : Boolean);
6726 -- Write out given flag if it is set
6732 procedure W (Flag_Name : String; Flag : Boolean) is
6736 Write_Str (Flag_Name);
6737 Write_Str (" = True");
6742 -- Start of processing for Write_Entity_Flags
6745 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
6746 and then Base_Type (Id) = Id
6749 Write_Str ("Component_Alignment = ");
6751 case Component_Alignment (Id) is
6752 when Calign_Default =>
6753 Write_Str ("Calign_Default");
6755 when Calign_Component_Size =>
6756 Write_Str ("Calign_Component_Size");
6758 when Calign_Component_Size_4 =>
6759 Write_Str ("Calign_Component_Size_4");
6761 when Calign_Storage_Unit =>
6762 Write_Str ("Calign_Storage_Unit");
6768 W ("Address_Taken", Flag104 (Id));
6769 W ("Body_Needed_For_SAL", Flag40 (Id));
6770 W ("C_Pass_By_Copy", Flag125 (Id));
6771 W ("Can_Never_Be_Null", Flag38 (Id));
6772 W ("Checks_May_Be_Suppressed", Flag31 (Id));
6773 W ("Debug_Info_Off", Flag166 (Id));
6774 W ("Default_Expressions_Processed", Flag108 (Id));
6775 W ("Delay_Cleanups", Flag114 (Id));
6776 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
6777 W ("Depends_On_Private", Flag14 (Id));
6778 W ("Discard_Names", Flag88 (Id));
6779 W ("Elaboration_Entity_Required", Flag174 (Id));
6780 W ("Elaborate_Body_Desirable", Flag210 (Id));
6781 W ("Entry_Accepted", Flag152 (Id));
6782 W ("Finalize_Storage_Only", Flag158 (Id));
6783 W ("From_With_Type", Flag159 (Id));
6784 W ("Function_Returns_With_DSP", Flag169 (Id));
6785 W ("Has_Aliased_Components", Flag135 (Id));
6786 W ("Has_Alignment_Clause", Flag46 (Id));
6787 W ("Has_All_Calls_Remote", Flag79 (Id));
6788 W ("Has_Anon_Block_Suffix", Flag201 (Id));
6789 W ("Has_Atomic_Components", Flag86 (Id));
6790 W ("Has_Biased_Representation", Flag139 (Id));
6791 W ("Has_Completion", Flag26 (Id));
6792 W ("Has_Completion_In_Body", Flag71 (Id));
6793 W ("Has_Complex_Representation", Flag140 (Id));
6794 W ("Has_Component_Size_Clause", Flag68 (Id));
6795 W ("Has_Contiguous_Rep", Flag181 (Id));
6796 W ("Has_Controlled_Component", Flag43 (Id));
6797 W ("Has_Controlling_Result", Flag98 (Id));
6798 W ("Has_Convention_Pragma", Flag119 (Id));
6799 W ("Has_Delayed_Freeze", Flag18 (Id));
6800 W ("Has_Discriminants", Flag5 (Id));
6801 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
6802 W ("Has_Exit", Flag47 (Id));
6803 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
6804 W ("Has_Forward_Instantiation", Flag175 (Id));
6805 W ("Has_Fully_Qualified_Name", Flag173 (Id));
6806 W ("Has_Gigi_Rep_Item", Flag82 (Id));
6807 W ("Has_Homonym", Flag56 (Id));
6808 W ("Has_Machine_Radix_Clause", Flag83 (Id));
6809 W ("Has_Master_Entity", Flag21 (Id));
6810 W ("Has_Missing_Return", Flag142 (Id));
6811 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
6812 W ("Has_Non_Standard_Rep", Flag75 (Id));
6813 W ("Has_Object_Size_Clause", Flag172 (Id));
6814 W ("Has_Per_Object_Constraint", Flag154 (Id));
6815 W ("Has_Persistent_BSS", Flag188 (Id));
6816 W ("Has_Pragma_Controlled", Flag27 (Id));
6817 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
6818 W ("Has_Pragma_Inline", Flag157 (Id));
6819 W ("Has_Pragma_Pack", Flag121 (Id));
6820 W ("Has_Pragma_Pure", Flag203 (Id));
6821 W ("Has_Pragma_Pure_Function", Flag179 (Id));
6822 W ("Has_Pragma_Unreferenced", Flag180 (Id));
6823 W ("Has_Primitive_Operations", Flag120 (Id));
6824 W ("Has_Private_Declaration", Flag155 (Id));
6825 W ("Has_Qualified_Name", Flag161 (Id));
6826 W ("Has_Record_Rep_Clause", Flag65 (Id));
6827 W ("Has_Recursive_Call", Flag143 (Id));
6828 W ("Has_Size_Clause", Flag29 (Id));
6829 W ("Has_Small_Clause", Flag67 (Id));
6830 W ("Has_Specified_Layout", Flag100 (Id));
6831 W ("Has_Specified_Stream_Input", Flag190 (Id));
6832 W ("Has_Specified_Stream_Output", Flag191 (Id));
6833 W ("Has_Specified_Stream_Read", Flag192 (Id));
6834 W ("Has_Specified_Stream_Write", Flag193 (Id));
6835 W ("Has_Static_Discriminants", Flag211 (Id));
6836 W ("Has_Storage_Size_Clause", Flag23 (Id));
6837 W ("Has_Stream_Size_Clause", Flag184 (Id));
6838 W ("Has_Subprogram_Descriptor", Flag93 (Id));
6839 W ("Has_Task", Flag30 (Id));
6840 W ("Has_Unchecked_Union", Flag123 (Id));
6841 W ("Has_Unknown_Discriminants", Flag72 (Id));
6842 W ("Has_Volatile_Components", Flag87 (Id));
6843 W ("Has_Xref_Entry", Flag182 (Id));
6844 W ("In_Package_Body", Flag48 (Id));
6845 W ("In_Private_Part", Flag45 (Id));
6846 W ("In_Use", Flag8 (Id));
6847 W ("Is_AST_Entry", Flag132 (Id));
6848 W ("Is_Abstract", Flag19 (Id));
6849 W ("Is_Local_Anonymous_Access", Flag194 (Id));
6850 W ("Is_Access_Constant", Flag69 (Id));
6851 W ("Is_Ada_2005_Only", Flag185 (Id));
6852 W ("Is_Aliased", Flag15 (Id));
6853 W ("Is_Asynchronous", Flag81 (Id));
6854 W ("Is_Atomic", Flag85 (Id));
6855 W ("Is_Bit_Packed_Array", Flag122 (Id));
6856 W ("Is_CPP_Class", Flag74 (Id));
6857 W ("Is_Called", Flag102 (Id));
6858 W ("Is_Character_Type", Flag63 (Id));
6859 W ("Is_Child_Unit", Flag73 (Id));
6860 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
6861 W ("Is_Compilation_Unit", Flag149 (Id));
6862 W ("Is_Completely_Hidden", Flag103 (Id));
6863 W ("Is_Concurrent_Record_Type", Flag20 (Id));
6864 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
6865 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
6866 W ("Is_Constrained", Flag12 (Id));
6867 W ("Is_Constructor", Flag76 (Id));
6868 W ("Is_Controlled", Flag42 (Id));
6869 W ("Is_Controlling_Formal", Flag97 (Id));
6870 W ("Is_Discrim_SO_Function", Flag176 (Id));
6871 W ("Is_Dispatching_Operation", Flag6 (Id));
6872 W ("Is_Eliminated", Flag124 (Id));
6873 W ("Is_Entry_Formal", Flag52 (Id));
6874 W ("Is_Exported", Flag99 (Id));
6875 W ("Is_First_Subtype", Flag70 (Id));
6876 W ("Is_For_Access_Subtype", Flag118 (Id));
6877 W ("Is_Formal_Subprogram", Flag111 (Id));
6878 W ("Is_Frozen", Flag4 (Id));
6879 W ("Is_Generic_Actual_Type", Flag94 (Id));
6880 W ("Is_Generic_Instance", Flag130 (Id));
6881 W ("Is_Generic_Type", Flag13 (Id));
6882 W ("Is_Hidden", Flag57 (Id));
6883 W ("Is_Hidden_Open_Scope", Flag171 (Id));
6884 W ("Is_Immediately_Visible", Flag7 (Id));
6885 W ("Is_Imported", Flag24 (Id));
6886 W ("Is_Inlined", Flag11 (Id));
6887 W ("Is_Instantiated", Flag126 (Id));
6888 W ("Is_Interface", Flag186 (Id));
6889 W ("Is_Internal", Flag17 (Id));
6890 W ("Is_Interrupt_Handler", Flag89 (Id));
6891 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
6892 W ("Is_Itype", Flag91 (Id));
6893 W ("Is_Known_Non_Null", Flag37 (Id));
6894 W ("Is_Known_Null", Flag204 (Id));
6895 W ("Is_Known_Valid", Flag170 (Id));
6896 W ("Is_Limited_Composite", Flag106 (Id));
6897 W ("Is_Limited_Interface", Flag197 (Id));
6898 W ("Is_Limited_Record", Flag25 (Id));
6899 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
6900 W ("Is_Non_Static_Subtype", Flag109 (Id));
6901 W ("Is_Null_Init_Proc", Flag178 (Id));
6902 W ("Is_Obsolescent", Flag153 (Id));
6903 W ("Is_Optional_Parameter", Flag134 (Id));
6904 W ("Is_Overriding_Operation", Flag39 (Id));
6905 W ("Is_Package_Body_Entity", Flag160 (Id));
6906 W ("Is_Packed", Flag51 (Id));
6907 W ("Is_Packed_Array_Type", Flag138 (Id));
6908 W ("Is_Potentially_Use_Visible", Flag9 (Id));
6909 W ("Is_Preelaborated", Flag59 (Id));
6910 W ("Is_Primitive_Wrapper", Flag195 (Id));
6911 W ("Is_Private_Composite", Flag107 (Id));
6912 W ("Is_Private_Descendant", Flag53 (Id));
6913 W ("Is_Protected_Interface", Flag198 (Id));
6914 W ("Is_Public", Flag10 (Id));
6915 W ("Is_Pure", Flag44 (Id));
6916 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
6917 W ("Is_Remote_Call_Interface", Flag62 (Id));
6918 W ("Is_Remote_Types", Flag61 (Id));
6919 W ("Is_Renaming_Of_Object", Flag112 (Id));
6920 W ("Is_Return_Object", Flag209 (Id));
6921 W ("Is_Shared_Passive", Flag60 (Id));
6922 W ("Is_Synchronized_Interface", Flag199 (Id));
6923 W ("Is_Statically_Allocated", Flag28 (Id));
6924 W ("Is_Tag", Flag78 (Id));
6925 W ("Is_Tagged_Type", Flag55 (Id));
6926 W ("Is_Task_Interface", Flag200 (Id));
6927 W ("Is_Thread_Body", Flag77 (Id));
6928 W ("Is_True_Constant", Flag163 (Id));
6929 W ("Is_Unchecked_Union", Flag117 (Id));
6930 W ("Is_Unsigned_Type", Flag144 (Id));
6931 W ("Is_VMS_Exception", Flag133 (Id));
6932 W ("Is_Valued_Procedure", Flag127 (Id));
6933 W ("Is_Visible_Child_Unit", Flag116 (Id));
6934 W ("Is_Visible_Formal", Flag206 (Id));
6935 W ("Is_Volatile", Flag16 (Id));
6936 W ("Itype_Printed", Flag202 (Id));
6937 W ("Kill_Elaboration_Checks", Flag32 (Id));
6938 W ("Kill_Range_Checks", Flag33 (Id));
6939 W ("Kill_Tag_Checks", Flag34 (Id));
6940 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
6941 W ("Low_Bound_Known", Flag205 (Id));
6942 W ("Machine_Radix_10", Flag84 (Id));
6943 W ("Materialize_Entity", Flag168 (Id));
6944 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
6945 W ("Must_Have_Preelab_Init", Flag208 (Id));
6946 W ("Needs_Debug_Info", Flag147 (Id));
6947 W ("Needs_No_Actuals", Flag22 (Id));
6948 W ("Never_Set_In_Source", Flag115 (Id));
6949 W ("No_Pool_Assigned", Flag131 (Id));
6950 W ("No_Return", Flag113 (Id));
6951 W ("No_Strict_Aliasing", Flag136 (Id));
6952 W ("Non_Binary_Modulus", Flag58 (Id));
6953 W ("Nonzero_Is_True", Flag162 (Id));
6954 W ("Reachable", Flag49 (Id));
6955 W ("Referenced", Flag156 (Id));
6956 W ("Referenced_As_LHS", Flag36 (Id));
6957 W ("Return_Present", Flag54 (Id));
6958 W ("Returns_By_Ref", Flag90 (Id));
6959 W ("Reverse_Bit_Order", Flag164 (Id));
6960 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
6961 W ("Size_Depends_On_Discriminant", Flag177 (Id));
6962 W ("Size_Known_At_Compile_Time", Flag92 (Id));
6963 W ("Strict_Alignment", Flag145 (Id));
6964 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
6965 W ("Suppress_Init_Proc", Flag105 (Id));
6966 W ("Suppress_Style_Checks", Flag165 (Id));
6967 W ("Treat_As_Volatile", Flag41 (Id));
6968 W ("Uses_Sec_Stack", Flag95 (Id));
6969 W ("Vax_Float", Flag151 (Id));
6970 W ("Warnings_Off", Flag96 (Id));
6971 W ("Was_Hidden", Flag196 (Id));
6972 end Write_Entity_Flags;
6974 -----------------------
6975 -- Write_Entity_Info --
6976 -----------------------
6978 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
6980 procedure Write_Attribute (Which : String; Nam : E);
6981 -- Write attribute value with given string name
6983 procedure Write_Kind (Id : Entity_Id);
6984 -- Write Ekind field of entity
6986 ---------------------
6987 -- Write_Attribute --
6988 ---------------------
6990 procedure Write_Attribute (Which : String; Nam : E) is
6994 Write_Int (Int (Nam));
6996 Write_Name (Chars (Nam));
6998 end Write_Attribute;
7004 procedure Write_Kind (Id : Entity_Id) is
7005 K : constant String := Entity_Kind'Image (Ekind (Id));
7009 Write_Str (" Kind ");
7011 if Is_Type (Id) and then Is_Tagged_Type (Id) then
7012 Write_Str ("TAGGED ");
7015 Write_Str (K (3 .. K'Length));
7018 if Is_Type (Id) and then Depends_On_Private (Id) then
7019 Write_Str ("Depends_On_Private ");
7023 -- Start of processing for Write_Entity_Info
7027 Write_Attribute ("Name ", Id);
7028 Write_Int (Int (Id));
7032 Write_Attribute (" Type ", Etype (Id));
7034 Write_Attribute (" Scope ", Scope (Id));
7039 when Discrete_Kind =>
7040 Write_Str ("Bounds: Id = ");
7042 if Present (Scalar_Range (Id)) then
7043 Write_Int (Int (Type_Low_Bound (Id)));
7044 Write_Str (" .. Id = ");
7045 Write_Int (Int (Type_High_Bound (Id)));
7047 Write_Str ("Empty");
7058 (" Component Type ", Component_Type (Id));
7061 Write_Str (" Indices ");
7063 Index := First_Index (Id);
7064 while Present (Index) loop
7065 Write_Attribute (" ", Etype (Index));
7066 Index := Next_Index (Index);
7074 (" Directly Designated Type ",
7075 Directly_Designated_Type (Id));
7078 when Overloadable_Kind =>
7079 if Present (Homonym (Id)) then
7080 Write_Str (" Homonym ");
7081 Write_Name (Chars (Homonym (Id)));
7083 Write_Int (Int (Homonym (Id)));
7090 if Ekind (Scope (Id)) in Record_Kind then
7092 " Original_Record_Component ",
7093 Original_Record_Component (Id));
7094 Write_Int (Int (Original_Record_Component (Id)));
7098 when others => null;
7100 end Write_Entity_Info;
7102 -----------------------
7103 -- Write_Field6_Name --
7104 -----------------------
7106 procedure Write_Field6_Name (Id : Entity_Id) is
7107 pragma Warnings (Off, Id);
7109 Write_Str ("First_Rep_Item");
7110 end Write_Field6_Name;
7112 -----------------------
7113 -- Write_Field7_Name --
7114 -----------------------
7116 procedure Write_Field7_Name (Id : Entity_Id) is
7117 pragma Warnings (Off, Id);
7119 Write_Str ("Freeze_Node");
7120 end Write_Field7_Name;
7122 -----------------------
7123 -- Write_Field8_Name --
7124 -----------------------
7126 procedure Write_Field8_Name (Id : Entity_Id) is
7131 Write_Str ("Normalized_First_Bit");
7135 E_Subprogram_Body =>
7136 Write_Str ("Mechanism");
7139 Write_Str ("Associated_Node_For_Itype");
7142 Write_Str ("Dependent_Instances");
7144 when E_Return_Statement =>
7145 Write_Str ("Return_Applies_To");
7148 Write_Str ("Hiding_Loop_Variable");
7151 Write_Str ("Field8??");
7153 end Write_Field8_Name;
7155 -----------------------
7156 -- Write_Field9_Name --
7157 -----------------------
7159 procedure Write_Field9_Name (Id : Entity_Id) is
7163 Write_Str ("Class_Wide_Type");
7166 E_Generic_Function |
7168 E_Generic_Procedure |
7171 Write_Str ("Renaming_Map");
7174 Write_Str ("Current_Value");
7177 Write_Str ("Field9??");
7179 end Write_Field9_Name;
7181 ------------------------
7182 -- Write_Field10_Name --
7183 ------------------------
7185 procedure Write_Field10_Name (Id : Entity_Id) is
7189 Write_Str ("Referenced_Object");
7191 when E_In_Parameter |
7193 Write_Str ("Discriminal_Link");
7199 Write_Str ("Handler_Records");
7203 Write_Str ("Normalized_Position_Max");
7206 Write_Str ("Field10??");
7208 end Write_Field10_Name;
7210 ------------------------
7211 -- Write_Field11_Name --
7212 ------------------------
7214 procedure Write_Field11_Name (Id : Entity_Id) is
7218 Write_Str ("Entry_Component");
7222 Write_Str ("Component_Bit_Offset");
7225 Write_Str ("Full_View");
7227 when E_Enumeration_Literal =>
7228 Write_Str ("Enumeration_Pos");
7231 Write_Str ("Block_Node");
7237 Write_Str ("Protected_Body_Subprogram");
7239 when E_Generic_Package =>
7240 Write_Str ("Generic_Homonym");
7243 Write_Str ("Full_View");
7246 Write_Str ("Field11??");
7248 end Write_Field11_Name;
7250 ------------------------
7251 -- Write_Field12_Name --
7252 ------------------------
7254 procedure Write_Field12_Name (Id : Entity_Id) is
7258 Write_Str ("Barrier_Function");
7260 when E_Enumeration_Literal =>
7261 Write_Str ("Enumeration_Rep");
7268 E_In_Out_Parameter |
7272 Write_Str ("Esize");
7276 Write_Str ("Next_Inlined_Subprogram");
7279 Write_Str ("Associated_Formal_Package");
7282 Write_Str ("Field12??");
7284 end Write_Field12_Name;
7286 ------------------------
7287 -- Write_Field13_Name --
7288 ------------------------
7290 procedure Write_Field13_Name (Id : Entity_Id) is
7294 Write_Str ("RM_Size");
7298 Write_Str ("Component_Clause");
7300 when E_Enumeration_Literal =>
7301 Write_Str ("Debug_Renaming_Link");
7304 if not Comes_From_Source (Id)
7306 Chars (Id) = Name_Op_Ne
7308 Write_Str ("Corresponding_Equality");
7310 elsif Comes_From_Source (Id) then
7311 Write_Str ("Elaboration_Entity");
7314 Write_Str ("Field13??");
7319 Write_Str ("Extra_Accessibility");
7323 Generic_Unit_Kind =>
7324 Write_Str ("Elaboration_Entity");
7327 Write_Str ("Field13??");
7329 end Write_Field13_Name;
7331 -----------------------
7332 -- Write_Field14_Name --
7333 -----------------------
7335 procedure Write_Field14_Name (Id : Entity_Id) is
7343 Write_Str ("Alignment");
7347 Write_Str ("Normalized_Position");
7351 Write_Str ("First_Optional_Parameter");
7354 E_Generic_Package =>
7355 Write_Str ("Shadow_Entities");
7358 Write_Str ("Field14??");
7360 end Write_Field14_Name;
7362 ------------------------
7363 -- Write_Field15_Name --
7364 ------------------------
7366 procedure Write_Field15_Name (Id : Entity_Id) is
7371 Write_Str ("Storage_Size_Variable");
7373 when Class_Wide_Kind |
7377 Write_Str ("Primitive_Operations");
7380 Write_Str ("DT_Entry_Count");
7382 when Decimal_Fixed_Point_Kind =>
7383 Write_Str ("Scale_Value");
7385 when E_Discriminant =>
7386 Write_Str ("Discriminant_Number");
7389 Write_Str ("Extra_Formal");
7393 Write_Str ("DT_Position");
7396 Write_Str ("Entry_Parameters_Type");
7398 when Enumeration_Kind =>
7399 Write_Str ("Lit_Indexes");
7403 Write_Str ("Related_Instance");
7405 when E_Protected_Type =>
7406 Write_Str ("Entry_Bodies_Array");
7408 when E_String_Literal_Subtype =>
7409 Write_Str ("String_Literal_Low_Bound");
7412 Write_Str ("Shared_Var_Read_Proc");
7415 Write_Str ("Field15??");
7417 end Write_Field15_Name;
7419 ------------------------
7420 -- Write_Field16_Name --
7421 ------------------------
7423 procedure Write_Field16_Name (Id : Entity_Id) is
7427 Write_Str ("Entry_Formal");
7431 Write_Str ("DTC_Entity");
7436 Write_Str ("First_Private_Entity");
7438 when E_Record_Type |
7439 E_Record_Type_With_Private =>
7440 Write_Str ("Access_Disp_Table");
7442 when E_String_Literal_Subtype =>
7443 Write_Str ("String_Literal_Length");
7445 when Enumeration_Kind =>
7446 Write_Str ("Lit_Strings");
7450 Write_Str ("Unset_Reference");
7452 when E_Record_Subtype |
7453 E_Class_Wide_Subtype =>
7454 Write_Str ("Cloned_Subtype");
7457 Write_Str ("Field16??");
7459 end Write_Field16_Name;
7461 ------------------------
7462 -- Write_Field17_Name --
7463 ------------------------
7465 procedure Write_Field17_Name (Id : Entity_Id) is
7469 Write_Str ("Digits_Value");
7472 Write_Str ("Prival");
7474 when E_Discriminant =>
7475 Write_Str ("Discriminal");
7484 E_Generic_Function |
7486 E_Generic_Procedure |
7494 E_Return_Statement |
7496 E_Subprogram_Type =>
7497 Write_Str ("First_Entity");
7500 Write_Str ("First_Index");
7502 when E_Protected_Body =>
7503 Write_Str ("Object_Ref");
7505 when Enumeration_Kind =>
7506 Write_Str ("First_Literal");
7509 Write_Str ("Master_Id");
7511 when Modular_Integer_Kind =>
7512 Write_Str ("Modulus");
7516 E_Generic_In_Out_Parameter |
7518 Write_Str ("Actual_Subtype");
7520 when E_Incomplete_Type =>
7521 Write_Str ("Non_Limited_View");
7523 when E_Incomplete_Subtype =>
7524 if From_With_Type (Id) then
7525 Write_Str ("Non_Limited_View");
7529 Write_Str ("Field17??");
7531 end Write_Field17_Name;
7533 -----------------------
7534 -- Write_Field18_Name --
7535 -----------------------
7537 procedure Write_Field18_Name (Id : Entity_Id) is
7540 when E_Enumeration_Literal |
7544 Write_Str ("Alias");
7546 when E_Record_Type =>
7547 Write_Str ("Corresponding_Concurrent_Type");
7549 when E_Entry_Index_Parameter =>
7550 Write_Str ("Entry_Index_Constant");
7552 when E_Class_Wide_Subtype |
7553 E_Access_Protected_Subprogram_Type |
7554 E_Access_Subprogram_Type |
7556 Write_Str ("Equivalent_Type");
7558 when Fixed_Point_Kind =>
7559 Write_Str ("Delta_Value");
7563 Write_Str ("Renamed_Object");
7567 E_Generic_Function |
7568 E_Generic_Procedure |
7569 E_Generic_Package =>
7570 Write_Str ("Renamed_Entity");
7572 when Incomplete_Or_Private_Kind =>
7573 Write_Str ("Private_Dependents");
7575 when Concurrent_Kind =>
7576 Write_Str ("Corresponding_Record_Type");
7581 Write_Str ("Enclosing_Scope");
7584 Write_Str ("Field18??");
7586 end Write_Field18_Name;
7588 -----------------------
7589 -- Write_Field19_Name --
7590 -----------------------
7592 procedure Write_Field19_Name (Id : Entity_Id) is
7597 Write_Str ("Related_Array_Object");
7604 Write_Str ("Finalization_Chain_Entity");
7606 when E_Constant | E_Variable =>
7607 Write_Str ("Size_Check_Code");
7609 when E_Discriminant =>
7610 Write_Str ("Corresponding_Discriminant");
7613 E_Generic_Package =>
7614 Write_Str ("Body_Entity");
7616 when E_Package_Body |
7618 Write_Str ("Spec_Entity");
7620 when Private_Kind =>
7621 Write_Str ("Underlying_Full_View");
7623 when E_Record_Type =>
7624 Write_Str ("Parent_Subtype");
7627 Write_Str ("Field19??");
7629 end Write_Field19_Name;
7631 -----------------------
7632 -- Write_Field20_Name --
7633 -----------------------
7635 procedure Write_Field20_Name (Id : Entity_Id) is
7639 Write_Str ("Component_Type");
7641 when E_In_Parameter |
7642 E_Generic_In_Parameter =>
7643 Write_Str ("Default_Value");
7646 Write_Str ("Directly_Designated_Type");
7649 Write_Str ("Discriminant_Checking_Func");
7651 when E_Discriminant =>
7652 Write_Str ("Discriminant_Default_Value");
7661 E_Generic_Function |
7663 E_Generic_Procedure |
7671 E_Return_Statement |
7673 E_Subprogram_Type =>
7675 Write_Str ("Last_Entity");
7678 Write_Str ("Scalar_Range");
7681 Write_Str ("Register_Exception_Call");
7684 Write_Str ("Last_Assignment");
7687 Write_Str ("Field20??");
7689 end Write_Field20_Name;
7691 -----------------------
7692 -- Write_Field21_Name --
7693 -----------------------
7695 procedure Write_Field21_Name (Id : Entity_Id) is
7701 E_Generic_Function |
7703 E_Generic_Procedure |
7705 Write_Str ("Interface_Name");
7707 when Concurrent_Kind |
7708 Incomplete_Or_Private_Kind |
7712 Write_Str ("Discriminant_Constraint");
7715 Write_Str ("Accept_Address");
7717 when Fixed_Point_Kind =>
7718 Write_Str ("Small_Value");
7720 when E_In_Parameter =>
7721 Write_Str ("Default_Expr_Function");
7724 Modular_Integer_Kind =>
7725 Write_Str ("Original_Array_Type");
7727 when E_Access_Subprogram_Type |
7728 E_Access_Protected_Subprogram_Type =>
7729 Write_Str ("Original_Access_Type");
7732 Write_Str ("Field21??");
7734 end Write_Field21_Name;
7736 -----------------------
7737 -- Write_Field22_Name --
7738 -----------------------
7740 procedure Write_Field22_Name (Id : Entity_Id) is
7744 Write_Str ("Associated_Storage_Pool");
7747 Write_Str ("Component_Size");
7751 Write_Str ("Original_Record_Component");
7753 when E_Enumeration_Literal =>
7754 Write_Str ("Enumeration_Rep_Expr");
7757 Write_Str ("Exception_Code");
7760 Write_Str ("Protected_Formal");
7762 when E_Record_Type =>
7763 Write_Str ("Corresponding_Remote_Type");
7773 E_Generic_Function |
7774 E_Generic_Procedure |
7777 E_Return_Statement |
7780 Write_Str ("Scope_Depth_Value");
7782 when E_Record_Type_With_Private |
7783 E_Record_Subtype_With_Private |
7786 E_Limited_Private_Type |
7787 E_Limited_Private_Subtype =>
7788 Write_Str ("Private_View");
7791 Write_Str ("Shared_Var_Assign_Proc");
7794 Write_Str ("Field22??");
7796 end Write_Field22_Name;
7798 ------------------------
7799 -- Write_Field23_Name --
7800 ------------------------
7802 procedure Write_Field23_Name (Id : Entity_Id) is
7806 Write_Str ("Associated_Final_Chain");
7809 Write_Str ("Packed_Array_Type");
7812 Write_Str ("Entry_Cancel_Parameter");
7815 Write_Str ("Protected_Operation");
7817 when E_Discriminant =>
7818 Write_Str ("CR_Discriminant");
7820 when E_Enumeration_Type =>
7821 Write_Str ("Enum_Pos_To_Rep");
7825 Write_Str ("Extra_Constrained");
7827 when E_Generic_Function |
7829 E_Generic_Procedure =>
7830 Write_Str ("Inner_Instances");
7832 when Concurrent_Kind |
7833 Incomplete_Or_Private_Kind |
7837 Write_Str ("Stored_Constraint");
7841 Write_Str ("Generic_Renamings");
7844 if Is_Generic_Instance (Id) then
7845 Write_Str ("Generic_Renamings");
7847 Write_Str ("Limited Views");
7850 -- What about Privals_Chain for protected operations ???
7853 Write_Str ("Privals_Chain");
7856 Write_Str ("Field23??");
7858 end Write_Field23_Name;
7860 ------------------------
7861 -- Write_Field24_Name --
7862 ------------------------
7864 procedure Write_Field24_Name (Id : Entity_Id) is
7865 pragma Warnings (Off, Id);
7867 Write_Str ("Obsolescent_Warning");
7868 end Write_Field24_Name;
7870 ------------------------
7871 -- Write_Field25_Name --
7872 ------------------------
7874 procedure Write_Field25_Name (Id : Entity_Id) is
7878 Write_Str ("DT_Offset_To_Top_Func");
7882 Write_Str ("Abstract_Interface_Alias");
7885 Write_Str ("Current_Use_Clause");
7887 when E_Record_Type |
7889 E_Record_Type_With_Private |
7890 E_Record_Subtype_With_Private =>
7891 Write_Str ("Abstract_Interfaces");
7894 Write_Str ("Task_Body_Procedure");
7897 Write_Str ("Field25??");
7899 end Write_Field25_Name;
7901 ------------------------
7902 -- Write_Field26_Name --
7903 ------------------------
7905 procedure Write_Field26_Name (Id : Entity_Id) is
7908 when E_Generic_Package |
7910 Write_Str ("Package_Instantiation");
7914 Write_Str ("Overridden_Operation");
7917 Write_Str ("Field26??");
7919 end Write_Field26_Name;
7921 ------------------------
7922 -- Write_Field27_Name --
7923 ------------------------
7925 procedure Write_Field27_Name (Id : Entity_Id) is
7929 Write_Str ("Wrapped_Entity");
7932 Write_Str ("Field27??");
7934 end Write_Field27_Name;
7936 ------------------------
7937 -- Write_Field28_Name --
7938 ------------------------
7940 procedure Write_Field28_Name (Id : Entity_Id) is
7943 when E_Procedure | E_Function | E_Entry =>
7944 Write_Str ("Extra_Formals");
7947 Write_Str ("Field28??");
7949 end Write_Field28_Name;
7951 -------------------------
7952 -- Iterator Procedures --
7953 -------------------------
7955 procedure Proc_Next_Component (N : in out Node_Id) is
7957 N := Next_Component (N);
7958 end Proc_Next_Component;
7960 procedure Proc_Next_Discriminant (N : in out Node_Id) is
7962 N := Next_Discriminant (N);
7963 end Proc_Next_Discriminant;
7965 procedure Proc_Next_Formal (N : in out Node_Id) is
7967 N := Next_Formal (N);
7968 end Proc_Next_Formal;
7970 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
7972 N := Next_Formal_With_Extras (N);
7973 end Proc_Next_Formal_With_Extras;
7975 procedure Proc_Next_Index (N : in out Node_Id) is
7977 N := Next_Index (N);
7978 end Proc_Next_Index;
7980 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
7982 N := Next_Inlined_Subprogram (N);
7983 end Proc_Next_Inlined_Subprogram;
7985 procedure Proc_Next_Literal (N : in out Node_Id) is
7987 N := Next_Literal (N);
7988 end Proc_Next_Literal;
7990 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
7992 N := Next_Stored_Discriminant (N);
7993 end Proc_Next_Stored_Discriminant;