1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2005, 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
75 -- The usage of each field (and the entity kinds to which it applies)
76 -- depends on the particular field (see Einfo spec for details).
78 -- Associated_Node_For_Itype Node8
79 -- Dependent_Instances Elist8
80 -- Hiding_Loop_Variable Node8
81 -- Mechanism Uint8 (but returns Mechanism_Type)
82 -- Normalized_First_Bit Uint8
84 -- Class_Wide_Type Node9
85 -- Current_Value Node9
88 -- Discriminal_Link Node10
89 -- Handler_Records List10
90 -- Normalized_Position_Max Uint10
91 -- Referenced_Object Node10
93 -- Component_Bit_Offset Uint11
95 -- Entry_Component Node11
96 -- Enumeration_Pos Uint11
97 -- Generic_Homonym Node11
98 -- Protected_Body_Subprogram Node11
101 -- Barrier_Function Node12
102 -- Enumeration_Rep Uint12
104 -- Next_Inlined_Subprogram Node12
106 -- Corresponding_Equality Node13
107 -- Component_Clause Node13
108 -- Debug_Renaming_Link Node13
109 -- Elaboration_Entity Node13
110 -- Extra_Accessibility Node13
114 -- First_Optional_Parameter Node14
115 -- Normalized_Position Uint14
116 -- Shadow_Entities List14
118 -- Discriminant_Number Uint15
119 -- DT_Position Uint15
120 -- DT_Entry_Count Uint15
121 -- Entry_Bodies_Array Node15
122 -- Entry_Parameters_Type Node15
123 -- Extra_Formal Node15
124 -- Lit_Indexes Node15
125 -- Primitive_Operations Elist15
126 -- Related_Instance Node15
127 -- Scale_Value Uint15
128 -- Storage_Size_Variable Node15
129 -- String_Literal_Low_Bound Node15
130 -- Shared_Var_Read_Proc Node15
132 -- Access_Disp_Table Elist16
133 -- Cloned_Subtype Node16
135 -- Entry_Formal Node16
136 -- First_Private_Entity Node16
137 -- Lit_Strings Node16
138 -- String_Literal_Length Uint16
139 -- Unset_Reference Node16
141 -- Actual_Subtype Node17
142 -- Digits_Value Uint17
143 -- Discriminal Node17
144 -- First_Entity Node17
145 -- First_Index Node17
146 -- First_Literal Node17
149 -- Non_Limited_View Node17
154 -- Corresponding_Concurrent_Type Node18
155 -- Corresponding_Record_Type Node18
156 -- Delta_Value Ureal18
157 -- Enclosing_Scope Node18
158 -- Equivalent_Type Node18
159 -- Private_Dependents Elist18
160 -- Renamed_Entity Node18
161 -- Renamed_Object Node18
163 -- Body_Entity Node19
164 -- Corresponding_Discriminant Node19
165 -- Finalization_Chain_Entity Node19
166 -- Parent_Subtype Node19
167 -- Related_Array_Object Node19
168 -- Size_Check_Code Node19
169 -- Spec_Entity Node19
170 -- Underlying_Full_View Node19
172 -- Component_Type Node20
173 -- Default_Value Node20
174 -- Directly_Designated_Type Node20
175 -- Discriminant_Checking_Func Node20
176 -- Discriminant_Default_Value Node20
177 -- Last_Entity Node20
178 -- Register_Exception_Call Node20
179 -- Scalar_Range Node20
181 -- Accept_Address Elist21
182 -- Default_Expr_Function Node21
183 -- Discriminant_Constraint Elist21
184 -- Interface_Name Node21
185 -- Original_Array_Type Node21
186 -- Small_Value Ureal21
188 -- Associated_Storage_Pool Node22
189 -- Component_Size Uint22
190 -- Corresponding_Remote_Type Node22
191 -- Enumeration_Rep_Expr Node22
192 -- Exception_Code Uint22
193 -- Original_Record_Component Node22
194 -- Private_View Node22
195 -- Protected_Formal Node22
196 -- Scope_Depth_Value Uint22
197 -- Shared_Var_Assign_Proc Node22
199 -- Associated_Final_Chain Node23
200 -- CR_Discriminant Node23
201 -- Stored_Constraint Elist23
202 -- Entry_Cancel_Parameter Node23
203 -- Extra_Constrained Node23
204 -- Generic_Renamings Elist23
205 -- Inner_Instances Elist23
206 -- Enum_Pos_To_Rep Node23
207 -- Packed_Array_Type Node23
208 -- Limited_View Node23
209 -- Privals_Chain Elist23
210 -- Protected_Operation Node23
212 -- Obsolescent_Warning Node24
213 -- Task_Body_Procedure Node24
214 -- Abstract_Interfaces Elist24
216 -- Abstract_Interface_Alias Node25
217 -- Current_Use_Clause Node25
219 -- Overridden_Operation Node26
220 -- Package_Instantiation Node26
222 -- Wrapped_Entity Node27
224 ---------------------------------------------
225 -- Usage of Flags in Defining Entity Nodes --
226 ---------------------------------------------
228 -- All flags are unique, there is no overlaying, so each flag is physically
229 -- present in every entity. However, for many of the flags, it only makes
230 -- sense for them to be set true for certain subsets of entity kinds. See
231 -- the spec of Einfo for further details.
233 -- Note: Flag1-Flag3 are absent from this list, since these flag positions
234 -- are used for the flags Analyzed, Comes_From_Source, and Error_Posted,
235 -- which are common to all nodes, including entity nodes.
238 -- Has_Discriminants Flag5
239 -- Is_Dispatching_Operation Flag6
240 -- Is_Immediately_Visible Flag7
242 -- Is_Potentially_Use_Visible Flag9
246 -- Is_Constrained Flag12
247 -- Is_Generic_Type Flag13
248 -- Depends_On_Private Flag14
250 -- Is_Volatile Flag16
251 -- Is_Internal Flag17
252 -- Has_Delayed_Freeze Flag18
253 -- Is_Abstract Flag19
254 -- Is_Concurrent_Record_Type Flag20
256 -- Has_Master_Entity Flag21
257 -- Needs_No_Actuals Flag22
258 -- Has_Storage_Size_Clause Flag23
259 -- Is_Imported Flag24
260 -- Is_Limited_Record Flag25
261 -- Has_Completion Flag26
262 -- Has_Pragma_Controlled Flag27
263 -- Is_Statically_Allocated Flag28
264 -- Has_Size_Clause Flag29
267 -- Checks_May_Be_Suppressed Flag31
268 -- Kill_Elaboration_Checks Flag32
269 -- Kill_Range_Checks Flag33
270 -- Kill_Tag_Checks Flag34
271 -- Is_Class_Wide_Equivalent_Type Flag35
272 -- Referenced_As_LHS Flag36
273 -- Is_Known_Non_Null Flag37
274 -- Can_Never_Be_Null Flag38
275 -- Is_Overriding_Operation Flag39
276 -- Body_Needed_For_SAL Flag40
278 -- Treat_As_Volatile Flag41
279 -- Is_Controlled Flag42
280 -- Has_Controlled_Component Flag43
282 -- In_Private_Part Flag45
283 -- Has_Alignment_Clause Flag46
285 -- In_Package_Body Flag48
287 -- Delay_Subprogram_Descriptors Flag50
290 -- Is_Entry_Formal Flag52
291 -- Is_Private_Descendant Flag53
292 -- Return_Present Flag54
293 -- Is_Tagged_Type Flag55
294 -- Has_Homonym Flag56
296 -- Non_Binary_Modulus Flag58
297 -- Is_Preelaborated Flag59
298 -- Is_Shared_Passive Flag60
300 -- Is_Remote_Types Flag61
301 -- Is_Remote_Call_Interface Flag62
302 -- Is_Character_Type Flag63
303 -- Is_Intrinsic_Subprogram Flag64
304 -- Has_Record_Rep_Clause Flag65
305 -- Has_Enumeration_Rep_Clause Flag66
306 -- Has_Small_Clause Flag67
307 -- Has_Component_Size_Clause Flag68
308 -- Is_Access_Constant Flag69
309 -- Is_First_Subtype Flag70
311 -- Has_Completion_In_Body Flag71
312 -- Has_Unknown_Discriminants Flag72
313 -- Is_Child_Unit Flag73
314 -- Is_CPP_Class Flag74
315 -- Has_Non_Standard_Rep Flag75
316 -- Is_Constructor Flag76
317 -- Is_Thread_Body Flag77
319 -- Has_All_Calls_Remote Flag79
320 -- Is_Constr_Subt_For_U_Nominal Flag80
322 -- Is_Asynchronous Flag81
323 -- Has_Gigi_Rep_Item Flag82
324 -- Has_Machine_Radix_Clause Flag83
325 -- Machine_Radix_10 Flag84
327 -- Has_Atomic_Components Flag86
328 -- Has_Volatile_Components Flag87
329 -- Discard_Names Flag88
330 -- Is_Interrupt_Handler Flag89
331 -- Returns_By_Ref Flag90
334 -- Size_Known_At_Compile_Time Flag92
335 -- Has_Subprogram_Descriptor Flag93
336 -- Is_Generic_Actual_Type Flag94
337 -- Uses_Sec_Stack Flag95
338 -- Warnings_Off Flag96
339 -- Is_Controlling_Formal Flag97
340 -- Has_Controlling_Result Flag98
341 -- Is_Exported Flag99
342 -- Has_Specified_Layout Flag100
344 -- Has_Nested_Block_With_Handler Flag101
346 -- Is_Completely_Hidden Flag103
347 -- Address_Taken Flag104
348 -- Suppress_Init_Proc Flag105
349 -- Is_Limited_Composite Flag106
350 -- Is_Private_Composite Flag107
351 -- Default_Expressions_Processed Flag108
352 -- Is_Non_Static_Subtype Flag109
353 -- Has_External_Tag_Rep_Clause Flag110
355 -- Is_Formal_Subprogram Flag111
356 -- Is_Renaming_Of_Object Flag112
358 -- Delay_Cleanups Flag114
359 -- Never_Set_In_Source Flag115
360 -- Is_Visible_Child_Unit Flag116
361 -- Is_Unchecked_Union Flag117
362 -- Is_For_Access_Subtype Flag118
363 -- Has_Convention_Pragma Flag119
364 -- Has_Primitive_Operations Flag120
366 -- Has_Pragma_Pack Flag121
367 -- Is_Bit_Packed_Array Flag122
368 -- Has_Unchecked_Union Flag123
369 -- Is_Eliminated Flag124
370 -- C_Pass_By_Copy Flag125
371 -- Is_Instantiated Flag126
372 -- Is_Valued_Procedure Flag127
373 -- (used for Component_Alignment) Flag128
374 -- (used for Component_Alignment) Flag129
375 -- Is_Generic_Instance Flag130
377 -- No_Pool_Assigned Flag131
378 -- Is_AST_Entry Flag132
379 -- Is_VMS_Exception Flag133
380 -- Is_Optional_Parameter Flag134
381 -- Has_Aliased_Components Flag135
382 -- No_Strict_Aliasing Flag136
383 -- Is_Machine_Code_Subprogram Flag137
384 -- Is_Packed_Array_Type Flag138
385 -- Has_Biased_Representation Flag139
386 -- Has_Complex_Representation Flag140
388 -- Is_Constr_Subt_For_UN_Aliased Flag141
389 -- Has_Missing_Return Flag142
390 -- Has_Recursive_Call Flag143
391 -- Is_Unsigned_Type Flag144
392 -- Strict_Alignment Flag145
394 -- Needs_Debug_Info Flag147
395 -- Suppress_Elaboration_Warnings Flag148
396 -- Is_Compilation_Unit Flag149
397 -- Has_Pragma_Elaborate_Body Flag150
400 -- Entry_Accepted Flag152
401 -- Is_Obsolescent Flag153
402 -- Has_Per_Object_Constraint Flag154
403 -- Has_Private_Declaration Flag155
404 -- Referenced Flag156
405 -- Has_Pragma_Inline Flag157
406 -- Finalize_Storage_Only Flag158
407 -- From_With_Type Flag159
408 -- Is_Package_Body_Entity Flag160
410 -- Has_Qualified_Name Flag161
411 -- Nonzero_Is_True Flag162
412 -- Is_True_Constant Flag163
413 -- Reverse_Bit_Order Flag164
414 -- Suppress_Style_Checks Flag165
415 -- Debug_Info_Off Flag166
416 -- Sec_Stack_Needed_For_Return Flag167
417 -- Materialize_Entity Flag168
418 -- Function_Returns_With_DSP Flag169
419 -- Is_Known_Valid Flag170
421 -- Is_Hidden_Open_Scope Flag171
422 -- Has_Object_Size_Clause Flag172
423 -- Has_Fully_Qualified_Name Flag173
424 -- Elaboration_Entity_Required Flag174
425 -- Has_Forward_Instantiation Flag175
426 -- Is_Discrim_SO_Function Flag176
427 -- Size_Depends_On_Discriminant Flag177
428 -- Is_Null_Init_Proc Flag178
429 -- Has_Pragma_Pure_Function Flag179
430 -- Has_Pragma_Unreferenced Flag180
432 -- Has_Contiguous_Rep Flag181
433 -- Has_Xref_Entry Flag182
434 -- Must_Be_On_Byte_Boundary Flag183
435 -- Has_Stream_Size_Clause Flag184
436 -- Is_Ada_2005 Flag185
437 -- Is_Interface Flag186
438 -- Has_Constrained_Partial_View Flag187
439 -- Has_Persistent_BSS Flag188
440 -- Is_Pure_Unit_Access_Type Flag189
441 -- Has_Specified_Stream_Input Flag190
443 -- Has_Specified_Stream_Output Flag191
444 -- Has_Specified_Stream_Read Flag192
445 -- Has_Specified_Stream_Write Flag193
446 -- Is_Local_Anonymous_Access Flag194
447 -- Is_Primitive_Wrapper Flag195
448 -- Was_Hidden Flag196
449 -- Is_Limited_Interface Flag197
450 -- Is_Protected_Interface Flag198
451 -- Is_Synchronized_Interface Flag199
452 -- Is_Task_Interface Flag200
454 -- Has_Anon_Block_Suffix Flag201
471 -----------------------
472 -- Local subprograms --
473 -----------------------
475 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N;
476 -- Returns the attribute definition clause whose name is Rep_Name. Returns
477 -- Empty if not found.
483 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N is
487 Ritem := First_Rep_Item (Id);
488 while Present (Ritem) loop
489 if Nkind (Ritem) = N_Attribute_Definition_Clause
490 and then Chars (Ritem) = Rep_Name
494 Ritem := Next_Rep_Item (Ritem);
501 --------------------------------
502 -- Attribute Access Functions --
503 --------------------------------
505 function Abstract_Interfaces (Id : E) return L is
508 (Ekind (Id) = E_Record_Type
509 or else Ekind (Id) = E_Record_Subtype
510 or else Ekind (Id) = E_Record_Type_With_Private
511 or else Ekind (Id) = E_Record_Subtype_With_Private
512 or else Ekind (Id) = E_Class_Wide_Type);
514 end Abstract_Interfaces;
516 function Abstract_Interface_Alias (Id : E) return E is
518 pragma Assert (Is_Subprogram (Id));
520 end Abstract_Interface_Alias;
522 function Accept_Address (Id : E) return L is
527 function Access_Disp_Table (Id : E) return L is
529 pragma Assert (Is_Tagged_Type (Id));
530 return Elist16 (Implementation_Base_Type (Id));
531 end Access_Disp_Table;
533 function Actual_Subtype (Id : E) return E is
536 (Ekind (Id) = E_Constant
537 or else Ekind (Id) = E_Variable
538 or else Ekind (Id) = E_Generic_In_Out_Parameter
539 or else Ekind (Id) in E_In_Parameter .. E_In_Out_Parameter);
543 function Address_Taken (Id : E) return B is
548 function Alias (Id : E) return E is
551 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
555 function Alignment (Id : E) return U is
557 pragma Assert (Is_Type (Id)
558 or else Is_Formal (Id)
559 or else Ekind (Id) = E_Loop_Parameter
560 or else Ekind (Id) = E_Constant
561 or else Ekind (Id) = E_Exception
562 or else Ekind (Id) = E_Variable);
566 function Associated_Final_Chain (Id : E) return E is
568 pragma Assert (Is_Access_Type (Id));
570 end Associated_Final_Chain;
572 function Associated_Formal_Package (Id : E) return E is
574 pragma Assert (Ekind (Id) = E_Package);
576 end Associated_Formal_Package;
578 function Associated_Node_For_Itype (Id : E) return N is
581 end Associated_Node_For_Itype;
583 function Associated_Storage_Pool (Id : E) return E is
585 pragma Assert (Is_Access_Type (Id));
586 return Node22 (Root_Type (Id));
587 end Associated_Storage_Pool;
589 function Barrier_Function (Id : E) return N is
591 pragma Assert (Is_Entry (Id));
593 end Barrier_Function;
595 function Block_Node (Id : E) return N is
597 pragma Assert (Ekind (Id) = E_Block);
601 function Body_Entity (Id : E) return E is
604 (Ekind (Id) = E_Package or else Ekind (Id) = E_Generic_Package);
608 function Body_Needed_For_SAL (Id : E) return B is
611 (Ekind (Id) = E_Package
612 or else Is_Subprogram (Id)
613 or else Is_Generic_Unit (Id));
615 end Body_Needed_For_SAL;
617 function C_Pass_By_Copy (Id : E) return B is
619 pragma Assert (Is_Record_Type (Id));
620 return Flag125 (Implementation_Base_Type (Id));
623 function Can_Never_Be_Null (Id : E) return B is
626 end Can_Never_Be_Null;
628 function Checks_May_Be_Suppressed (Id : E) return B is
631 end Checks_May_Be_Suppressed;
633 function Class_Wide_Type (Id : E) return E is
635 pragma Assert (Is_Type (Id));
639 function Cloned_Subtype (Id : E) return E is
642 (Ekind (Id) = E_Record_Subtype
643 or else Ekind (Id) = E_Class_Wide_Subtype);
647 function Component_Bit_Offset (Id : E) return U is
650 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
652 end Component_Bit_Offset;
654 function Component_Clause (Id : E) return N is
657 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
659 end Component_Clause;
661 function Component_Size (Id : E) return U is
663 pragma Assert (Is_Array_Type (Id));
664 return Uint22 (Implementation_Base_Type (Id));
667 function Component_Type (Id : E) return E is
669 return Node20 (Implementation_Base_Type (Id));
672 function Corresponding_Concurrent_Type (Id : E) return E is
674 pragma Assert (Ekind (Id) = E_Record_Type);
676 end Corresponding_Concurrent_Type;
678 function Corresponding_Discriminant (Id : E) return E is
680 pragma Assert (Ekind (Id) = E_Discriminant);
682 end Corresponding_Discriminant;
684 function Corresponding_Equality (Id : E) return E is
687 (Ekind (Id) = E_Function
688 and then not Comes_From_Source (Id)
689 and then Chars (Id) = Name_Op_Ne);
691 end Corresponding_Equality;
693 function Corresponding_Record_Type (Id : E) return E is
695 pragma Assert (Is_Concurrent_Type (Id));
697 end Corresponding_Record_Type;
699 function Corresponding_Remote_Type (Id : E) return E is
702 end Corresponding_Remote_Type;
704 function Current_Use_Clause (Id : E) return E is
706 pragma Assert (Ekind (Id) = E_Package);
708 end Current_Use_Clause;
710 function Current_Value (Id : E) return N is
712 pragma Assert (Ekind (Id) in Object_Kind);
716 function CR_Discriminant (Id : E) return E is
721 function Debug_Info_Off (Id : E) return B is
726 function Debug_Renaming_Link (Id : E) return E is
729 end Debug_Renaming_Link;
731 function Default_Expr_Function (Id : E) return E is
733 pragma Assert (Is_Formal (Id));
735 end Default_Expr_Function;
737 function Default_Expressions_Processed (Id : E) return B is
740 end Default_Expressions_Processed;
742 function Default_Value (Id : E) return N is
744 pragma Assert (Is_Formal (Id));
748 function Delay_Cleanups (Id : E) return B is
753 function Delay_Subprogram_Descriptors (Id : E) return B is
756 end Delay_Subprogram_Descriptors;
758 function Delta_Value (Id : E) return R is
760 pragma Assert (Is_Fixed_Point_Type (Id));
764 function Dependent_Instances (Id : E) return L is
766 pragma Assert (Is_Generic_Instance (Id));
768 end Dependent_Instances;
770 function Depends_On_Private (Id : E) return B is
772 pragma Assert (Nkind (Id) in N_Entity);
774 end Depends_On_Private;
776 function Digits_Value (Id : E) return U is
779 (Is_Floating_Point_Type (Id)
780 or else Is_Decimal_Fixed_Point_Type (Id));
784 function Directly_Designated_Type (Id : E) return E is
787 end Directly_Designated_Type;
789 function Discard_Names (Id : E) return B is
794 function Discriminal (Id : E) return E is
796 pragma Assert (Ekind (Id) = E_Discriminant);
800 function Discriminal_Link (Id : E) return N is
803 end Discriminal_Link;
805 function Discriminant_Checking_Func (Id : E) return E is
807 pragma Assert (Ekind (Id) = E_Component);
809 end Discriminant_Checking_Func;
811 function Discriminant_Constraint (Id : E) return L is
813 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
815 end Discriminant_Constraint;
817 function Discriminant_Default_Value (Id : E) return N is
819 pragma Assert (Ekind (Id) = E_Discriminant);
821 end Discriminant_Default_Value;
823 function Discriminant_Number (Id : E) return U is
825 pragma Assert (Ekind (Id) = E_Discriminant);
827 end Discriminant_Number;
829 function DT_Entry_Count (Id : E) return U is
831 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
835 function DT_Position (Id : E) return U is
838 ((Ekind (Id) = E_Function
839 or else Ekind (Id) = E_Procedure)
840 and then Present (DTC_Entity (Id)));
844 function DTC_Entity (Id : E) return E is
847 (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
851 function Elaboration_Entity (Id : E) return E is
856 Ekind (Id) = E_Package
858 Is_Generic_Unit (Id));
860 end Elaboration_Entity;
862 function Elaboration_Entity_Required (Id : E) return B is
867 Ekind (Id) = E_Package
869 Is_Generic_Unit (Id));
871 end Elaboration_Entity_Required;
873 function Enclosing_Scope (Id : E) return E is
878 function Entry_Accepted (Id : E) return B is
880 pragma Assert (Is_Entry (Id));
884 function Entry_Bodies_Array (Id : E) return E is
887 end Entry_Bodies_Array;
889 function Entry_Cancel_Parameter (Id : E) return E is
892 end Entry_Cancel_Parameter;
894 function Entry_Component (Id : E) return E is
899 function Entry_Formal (Id : E) return E is
904 function Entry_Index_Constant (Id : E) return N is
906 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
908 end Entry_Index_Constant;
910 function Entry_Parameters_Type (Id : E) return E is
913 end Entry_Parameters_Type;
915 function Enum_Pos_To_Rep (Id : E) return E is
917 pragma Assert (Ekind (Id) = E_Enumeration_Type);
921 function Enumeration_Pos (Id : E) return Uint is
923 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
927 function Enumeration_Rep (Id : E) return U is
929 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
933 function Enumeration_Rep_Expr (Id : E) return N is
935 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
937 end Enumeration_Rep_Expr;
939 function Equivalent_Type (Id : E) return E is
942 (Ekind (Id) = E_Class_Wide_Subtype or else
943 Ekind (Id) = E_Access_Protected_Subprogram_Type or else
944 Ekind (Id) = E_Access_Subprogram_Type or else
945 Ekind (Id) = E_Exception_Type);
949 function Esize (Id : E) return Uint is
954 function Exception_Code (Id : E) return Uint is
956 pragma Assert (Ekind (Id) = E_Exception);
960 function Extra_Accessibility (Id : E) return E is
962 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
964 end Extra_Accessibility;
966 function Extra_Constrained (Id : E) return E is
968 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
970 end Extra_Constrained;
972 function Extra_Formal (Id : E) return E is
977 function Finalization_Chain_Entity (Id : E) return E is
980 end Finalization_Chain_Entity;
982 function Finalize_Storage_Only (Id : E) return B is
984 pragma Assert (Is_Type (Id));
985 return Flag158 (Base_Type (Id));
986 end Finalize_Storage_Only;
988 function First_Entity (Id : E) return E is
993 function First_Index (Id : E) return N is
998 function First_Literal (Id : E) return E is
1003 function First_Optional_Parameter (Id : E) return E is
1006 (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
1008 end First_Optional_Parameter;
1010 function First_Private_Entity (Id : E) return E is
1012 pragma Assert (Ekind (Id) = E_Package
1013 or else Ekind (Id) = E_Generic_Package
1014 or else Ekind (Id) = E_Protected_Type
1015 or else Ekind (Id) = E_Protected_Subtype
1016 or else Ekind (Id) = E_Task_Type
1017 or else Ekind (Id) = E_Task_Subtype);
1019 end First_Private_Entity;
1021 function First_Rep_Item (Id : E) return E is
1026 function Freeze_Node (Id : E) return N is
1031 function From_With_Type (Id : E) return B is
1033 return Flag159 (Id);
1036 function Full_View (Id : E) return E is
1038 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1042 function Function_Returns_With_DSP (Id : E) return B is
1045 (Is_Subprogram (Id) or else Ekind (Id) = E_Subprogram_Type);
1046 return Flag169 (Id);
1047 end Function_Returns_With_DSP;
1049 function Generic_Homonym (Id : E) return E is
1051 pragma Assert (Ekind (Id) = E_Generic_Package);
1053 end Generic_Homonym;
1055 function Generic_Renamings (Id : E) return L is
1057 return Elist23 (Id);
1058 end Generic_Renamings;
1060 function Handler_Records (Id : E) return S is
1063 end Handler_Records;
1065 function Has_Aliased_Components (Id : E) return B is
1067 return Flag135 (Implementation_Base_Type (Id));
1068 end Has_Aliased_Components;
1070 function Has_Alignment_Clause (Id : E) return B is
1073 end Has_Alignment_Clause;
1075 function Has_All_Calls_Remote (Id : E) return B is
1078 end Has_All_Calls_Remote;
1080 function Has_Anon_Block_Suffix (Id : E) return B is
1082 return Flag201 (Id);
1083 end Has_Anon_Block_Suffix;
1085 function Has_Atomic_Components (Id : E) return B is
1087 return Flag86 (Implementation_Base_Type (Id));
1088 end Has_Atomic_Components;
1090 function Has_Biased_Representation (Id : E) return B is
1092 return Flag139 (Id);
1093 end Has_Biased_Representation;
1095 function Has_Completion (Id : E) return B is
1100 function Has_Completion_In_Body (Id : E) return B is
1102 pragma Assert (Is_Type (Id));
1104 end Has_Completion_In_Body;
1106 function Has_Complex_Representation (Id : E) return B is
1108 pragma Assert (Is_Type (Id));
1109 return Flag140 (Implementation_Base_Type (Id));
1110 end Has_Complex_Representation;
1112 function Has_Component_Size_Clause (Id : E) return B is
1114 pragma Assert (Is_Array_Type (Id));
1115 return Flag68 (Implementation_Base_Type (Id));
1116 end Has_Component_Size_Clause;
1118 function Has_Constrained_Partial_View (Id : E) return B is
1120 pragma Assert (Is_Type (Id));
1121 return Flag187 (Id);
1122 end Has_Constrained_Partial_View;
1124 function Has_Controlled_Component (Id : E) return B is
1126 return Flag43 (Base_Type (Id));
1127 end Has_Controlled_Component;
1129 function Has_Contiguous_Rep (Id : E) return B is
1131 return Flag181 (Id);
1132 end Has_Contiguous_Rep;
1134 function Has_Controlling_Result (Id : E) return B is
1137 end Has_Controlling_Result;
1139 function Has_Convention_Pragma (Id : E) return B is
1141 return Flag119 (Id);
1142 end Has_Convention_Pragma;
1144 function Has_Delayed_Freeze (Id : E) return B is
1146 pragma Assert (Nkind (Id) in N_Entity);
1148 end Has_Delayed_Freeze;
1150 function Has_Discriminants (Id : E) return B is
1152 pragma Assert (Nkind (Id) in N_Entity);
1154 end Has_Discriminants;
1156 function Has_Enumeration_Rep_Clause (Id : E) return B is
1158 pragma Assert (Is_Enumeration_Type (Id));
1160 end Has_Enumeration_Rep_Clause;
1162 function Has_Exit (Id : E) return B is
1167 function Has_External_Tag_Rep_Clause (Id : E) return B is
1169 pragma Assert (Is_Tagged_Type (Id));
1170 return Flag110 (Id);
1171 end Has_External_Tag_Rep_Clause;
1173 function Has_Forward_Instantiation (Id : E) return B is
1175 return Flag175 (Id);
1176 end Has_Forward_Instantiation;
1178 function Has_Fully_Qualified_Name (Id : E) return B is
1180 return Flag173 (Id);
1181 end Has_Fully_Qualified_Name;
1183 function Has_Gigi_Rep_Item (Id : E) return B is
1186 end Has_Gigi_Rep_Item;
1188 function Has_Homonym (Id : E) return B is
1193 function Has_Machine_Radix_Clause (Id : E) return B is
1195 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1197 end Has_Machine_Radix_Clause;
1199 function Has_Master_Entity (Id : E) return B is
1202 end Has_Master_Entity;
1204 function Has_Missing_Return (Id : E) return B is
1207 (Ekind (Id) = E_Function or else Ekind (Id) = E_Generic_Function);
1208 return Flag142 (Id);
1209 end Has_Missing_Return;
1211 function Has_Nested_Block_With_Handler (Id : E) return B is
1213 return Flag101 (Id);
1214 end Has_Nested_Block_With_Handler;
1216 function Has_Non_Standard_Rep (Id : E) return B is
1218 return Flag75 (Implementation_Base_Type (Id));
1219 end Has_Non_Standard_Rep;
1221 function Has_Object_Size_Clause (Id : E) return B is
1223 pragma Assert (Is_Type (Id));
1224 return Flag172 (Id);
1225 end Has_Object_Size_Clause;
1227 function Has_Per_Object_Constraint (Id : E) return B is
1229 return Flag154 (Id);
1230 end Has_Per_Object_Constraint;
1232 function Has_Persistent_BSS (Id : E) return B is
1234 return Flag188 (Id);
1235 end Has_Persistent_BSS;
1237 function Has_Pragma_Controlled (Id : E) return B is
1239 pragma Assert (Is_Access_Type (Id));
1240 return Flag27 (Implementation_Base_Type (Id));
1241 end Has_Pragma_Controlled;
1243 function Has_Pragma_Elaborate_Body (Id : E) return B is
1245 return Flag150 (Id);
1246 end Has_Pragma_Elaborate_Body;
1248 function Has_Pragma_Inline (Id : E) return B is
1250 return Flag157 (Id);
1251 end Has_Pragma_Inline;
1253 function Has_Pragma_Pack (Id : E) return B is
1255 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1256 return Flag121 (Implementation_Base_Type (Id));
1257 end Has_Pragma_Pack;
1259 function Has_Pragma_Pure_Function (Id : E) return B is
1261 pragma Assert (Is_Subprogram (Id));
1262 return Flag179 (Id);
1263 end Has_Pragma_Pure_Function;
1265 function Has_Pragma_Unreferenced (Id : E) return B is
1267 return Flag180 (Id);
1268 end Has_Pragma_Unreferenced;
1270 function Has_Primitive_Operations (Id : E) return B is
1272 pragma Assert (Is_Type (Id));
1273 return Flag120 (Base_Type (Id));
1274 end Has_Primitive_Operations;
1276 function Has_Private_Declaration (Id : E) return B is
1278 return Flag155 (Id);
1279 end Has_Private_Declaration;
1281 function Has_Qualified_Name (Id : E) return B is
1283 return Flag161 (Id);
1284 end Has_Qualified_Name;
1286 function Has_Record_Rep_Clause (Id : E) return B is
1288 pragma Assert (Is_Record_Type (Id));
1289 return Flag65 (Implementation_Base_Type (Id));
1290 end Has_Record_Rep_Clause;
1292 function Has_Recursive_Call (Id : E) return B is
1294 pragma Assert (Is_Subprogram (Id));
1295 return Flag143 (Id);
1296 end Has_Recursive_Call;
1298 function Has_Size_Clause (Id : E) return B is
1301 end Has_Size_Clause;
1303 function Has_Small_Clause (Id : E) return B is
1306 end Has_Small_Clause;
1308 function Has_Specified_Layout (Id : E) return B is
1310 pragma Assert (Is_Type (Id));
1311 return Flag100 (Implementation_Base_Type (Id));
1312 end Has_Specified_Layout;
1314 function Has_Specified_Stream_Input (Id : E) return B is
1316 pragma Assert (Is_Type (Id));
1317 return Flag190 (Id);
1318 end Has_Specified_Stream_Input;
1320 function Has_Specified_Stream_Output (Id : E) return B is
1322 pragma Assert (Is_Type (Id));
1323 return Flag191 (Id);
1324 end Has_Specified_Stream_Output;
1326 function Has_Specified_Stream_Read (Id : E) return B is
1328 pragma Assert (Is_Type (Id));
1329 return Flag192 (Id);
1330 end Has_Specified_Stream_Read;
1332 function Has_Specified_Stream_Write (Id : E) return B is
1334 pragma Assert (Is_Type (Id));
1335 return Flag193 (Id);
1336 end Has_Specified_Stream_Write;
1338 function Has_Storage_Size_Clause (Id : E) return B is
1340 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1341 return Flag23 (Implementation_Base_Type (Id));
1342 end Has_Storage_Size_Clause;
1344 function Has_Stream_Size_Clause (Id : E) return B is
1346 pragma Assert (Is_Elementary_Type (Id));
1347 return Flag184 (Id);
1348 end Has_Stream_Size_Clause;
1350 function Has_Subprogram_Descriptor (Id : E) return B is
1353 end Has_Subprogram_Descriptor;
1355 function Has_Task (Id : E) return B is
1357 return Flag30 (Base_Type (Id));
1360 function Has_Unchecked_Union (Id : E) return B is
1362 return Flag123 (Base_Type (Id));
1363 end Has_Unchecked_Union;
1365 function Has_Unknown_Discriminants (Id : E) return B is
1367 pragma Assert (Is_Type (Id));
1369 end Has_Unknown_Discriminants;
1371 function Has_Volatile_Components (Id : E) return B is
1373 return Flag87 (Implementation_Base_Type (Id));
1374 end Has_Volatile_Components;
1376 function Has_Xref_Entry (Id : E) return B is
1378 return Flag182 (Implementation_Base_Type (Id));
1381 function Hiding_Loop_Variable (Id : E) return E is
1383 pragma Assert (Ekind (Id) = E_Variable);
1385 end Hiding_Loop_Variable;
1387 function Homonym (Id : E) return E is
1392 function In_Package_Body (Id : E) return B is
1395 end In_Package_Body;
1397 function In_Private_Part (Id : E) return B is
1400 end In_Private_Part;
1402 function In_Use (Id : E) return B is
1404 pragma Assert (Nkind (Id) in N_Entity);
1408 function Inner_Instances (Id : E) return L is
1410 return Elist23 (Id);
1411 end Inner_Instances;
1413 function Interface_Name (Id : E) return N is
1418 function Is_Abstract (Id : E) return B is
1423 function Is_Local_Anonymous_Access (Id : E) return B is
1425 pragma Assert (Is_Access_Type (Id));
1426 return Flag194 (Id);
1427 end Is_Local_Anonymous_Access;
1429 function Is_Access_Constant (Id : E) return B is
1431 pragma Assert (Is_Access_Type (Id));
1433 end Is_Access_Constant;
1435 function Is_Ada_2005 (Id : E) return B is
1437 return Flag185 (Id);
1440 function Is_Aliased (Id : E) return B is
1442 pragma Assert (Nkind (Id) in N_Entity);
1446 function Is_AST_Entry (Id : E) return B is
1448 pragma Assert (Is_Entry (Id));
1449 return Flag132 (Id);
1452 function Is_Asynchronous (Id : E) return B is
1455 (Ekind (Id) = E_Procedure or else Is_Type (Id));
1457 end Is_Asynchronous;
1459 function Is_Atomic (Id : E) return B is
1464 function Is_Bit_Packed_Array (Id : E) return B is
1466 return Flag122 (Implementation_Base_Type (Id));
1467 end Is_Bit_Packed_Array;
1469 function Is_Called (Id : E) return B is
1472 (Ekind (Id) = E_Procedure or else Ekind (Id) = E_Function);
1473 return Flag102 (Id);
1476 function Is_Character_Type (Id : E) return B is
1479 end Is_Character_Type;
1481 function Is_Child_Unit (Id : E) return B is
1486 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1489 end Is_Class_Wide_Equivalent_Type;
1491 function Is_Compilation_Unit (Id : E) return B is
1493 return Flag149 (Id);
1494 end Is_Compilation_Unit;
1496 function Is_Completely_Hidden (Id : E) return B is
1498 pragma Assert (Ekind (Id) = E_Discriminant);
1499 return Flag103 (Id);
1500 end Is_Completely_Hidden;
1502 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1505 end Is_Constr_Subt_For_U_Nominal;
1507 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1509 return Flag141 (Id);
1510 end Is_Constr_Subt_For_UN_Aliased;
1512 function Is_Constrained (Id : E) return B is
1514 pragma Assert (Nkind (Id) in N_Entity);
1518 function Is_Constructor (Id : E) return B is
1523 function Is_Controlled (Id : E) return B is
1525 return Flag42 (Base_Type (Id));
1528 function Is_Controlling_Formal (Id : E) return B is
1530 pragma Assert (Is_Formal (Id));
1532 end Is_Controlling_Formal;
1534 function Is_CPP_Class (Id : E) return B is
1539 function Is_Discrim_SO_Function (Id : E) return B is
1541 return Flag176 (Id);
1542 end Is_Discrim_SO_Function;
1544 function Is_Dispatching_Operation (Id : E) return B is
1546 pragma Assert (Nkind (Id) in N_Entity);
1548 end Is_Dispatching_Operation;
1550 function Is_Eliminated (Id : E) return B is
1552 return Flag124 (Id);
1555 function Is_Entry_Formal (Id : E) return B is
1558 end Is_Entry_Formal;
1560 function Is_Exported (Id : E) return B is
1565 function Is_First_Subtype (Id : E) return B is
1568 end Is_First_Subtype;
1570 function Is_For_Access_Subtype (Id : E) return B is
1573 (Ekind (Id) = E_Record_Subtype
1575 Ekind (Id) = E_Private_Subtype);
1576 return Flag118 (Id);
1577 end Is_For_Access_Subtype;
1579 function Is_Formal_Subprogram (Id : E) return B is
1581 return Flag111 (Id);
1582 end Is_Formal_Subprogram;
1584 function Is_Frozen (Id : E) return B is
1589 function Is_Generic_Actual_Type (Id : E) return B is
1591 pragma Assert (Is_Type (Id));
1593 end Is_Generic_Actual_Type;
1595 function Is_Generic_Instance (Id : E) return B is
1597 return Flag130 (Id);
1598 end Is_Generic_Instance;
1600 function Is_Generic_Type (Id : E) return B is
1602 pragma Assert (Nkind (Id) in N_Entity);
1604 end Is_Generic_Type;
1606 function Is_Hidden (Id : E) return B is
1611 function Is_Hidden_Open_Scope (Id : E) return B is
1613 return Flag171 (Id);
1614 end Is_Hidden_Open_Scope;
1616 function Is_Immediately_Visible (Id : E) return B is
1618 pragma Assert (Nkind (Id) in N_Entity);
1620 end Is_Immediately_Visible;
1622 function Is_Imported (Id : E) return B is
1627 function Is_Inlined (Id : E) return B is
1632 function Is_Interface (Id : E) return B is
1634 return Flag186 (Id);
1637 function Is_Instantiated (Id : E) return B is
1639 return Flag126 (Id);
1640 end Is_Instantiated;
1642 function Is_Internal (Id : E) return B is
1644 pragma Assert (Nkind (Id) in N_Entity);
1648 function Is_Interrupt_Handler (Id : E) return B is
1650 pragma Assert (Nkind (Id) in N_Entity);
1652 end Is_Interrupt_Handler;
1654 function Is_Intrinsic_Subprogram (Id : E) return B is
1657 end Is_Intrinsic_Subprogram;
1659 function Is_Itype (Id : E) return B is
1664 function Is_Known_Non_Null (Id : E) return B is
1667 end Is_Known_Non_Null;
1669 function Is_Known_Valid (Id : E) return B is
1671 return Flag170 (Id);
1674 function Is_Limited_Composite (Id : E) return B is
1676 return Flag106 (Id);
1677 end Is_Limited_Composite;
1679 function Is_Limited_Interface (Id : E) return B is
1681 pragma Assert (Is_Interface (Id));
1682 return Flag197 (Id);
1683 end Is_Limited_Interface;
1685 function Is_Limited_Record (Id : E) return B is
1688 end Is_Limited_Record;
1690 function Is_Machine_Code_Subprogram (Id : E) return B is
1692 pragma Assert (Is_Subprogram (Id));
1693 return Flag137 (Id);
1694 end Is_Machine_Code_Subprogram;
1696 function Is_Non_Static_Subtype (Id : E) return B is
1698 pragma Assert (Is_Type (Id));
1699 return Flag109 (Id);
1700 end Is_Non_Static_Subtype;
1702 function Is_Null_Init_Proc (Id : E) return B is
1704 pragma Assert (Ekind (Id) = E_Procedure);
1705 return Flag178 (Id);
1706 end Is_Null_Init_Proc;
1708 function Is_Obsolescent (Id : E) return B is
1710 return Flag153 (Id);
1713 function Is_Optional_Parameter (Id : E) return B is
1715 pragma Assert (Is_Formal (Id));
1716 return Flag134 (Id);
1717 end Is_Optional_Parameter;
1719 function Is_Overriding_Operation (Id : E) return B is
1721 pragma Assert (Is_Subprogram (Id));
1723 end Is_Overriding_Operation;
1725 function Is_Package_Body_Entity (Id : E) return B is
1727 return Flag160 (Id);
1728 end Is_Package_Body_Entity;
1730 function Is_Packed (Id : E) return B is
1732 return Flag51 (Implementation_Base_Type (Id));
1735 function Is_Packed_Array_Type (Id : E) return B is
1737 return Flag138 (Id);
1738 end Is_Packed_Array_Type;
1740 function Is_Potentially_Use_Visible (Id : E) return B is
1742 pragma Assert (Nkind (Id) in N_Entity);
1744 end Is_Potentially_Use_Visible;
1746 function Is_Preelaborated (Id : E) return B is
1749 end Is_Preelaborated;
1751 function Is_Primitive_Wrapper (Id : E) return B is
1753 pragma Assert (Ekind (Id) = E_Procedure);
1754 return Flag195 (Id);
1755 end Is_Primitive_Wrapper;
1757 function Is_Private_Composite (Id : E) return B is
1759 pragma Assert (Is_Type (Id));
1760 return Flag107 (Id);
1761 end Is_Private_Composite;
1763 function Is_Private_Descendant (Id : E) return B is
1766 end Is_Private_Descendant;
1768 function Is_Protected_Interface (Id : E) return B is
1770 pragma Assert (Is_Interface (Id));
1771 return Flag198 (Id);
1772 end Is_Protected_Interface;
1774 function Is_Public (Id : E) return B is
1776 pragma Assert (Nkind (Id) in N_Entity);
1780 function Is_Pure (Id : E) return B is
1785 function Is_Pure_Unit_Access_Type (Id : E) return B is
1787 pragma Assert (Is_Access_Type (Id));
1788 return Flag189 (Id);
1789 end Is_Pure_Unit_Access_Type;
1791 function Is_Remote_Call_Interface (Id : E) return B is
1794 end Is_Remote_Call_Interface;
1796 function Is_Remote_Types (Id : E) return B is
1799 end Is_Remote_Types;
1801 function Is_Renaming_Of_Object (Id : E) return B is
1803 return Flag112 (Id);
1804 end Is_Renaming_Of_Object;
1806 function Is_Shared_Passive (Id : E) return B is
1809 end Is_Shared_Passive;
1811 function Is_Statically_Allocated (Id : E) return B is
1814 end Is_Statically_Allocated;
1816 function Is_Synchronized_Interface (Id : E) return B is
1818 pragma Assert (Is_Interface (Id));
1819 return Flag199 (Id);
1820 end Is_Synchronized_Interface;
1822 function Is_Tag (Id : E) return B is
1824 pragma Assert (Nkind (Id) in N_Entity);
1828 function Is_Tagged_Type (Id : E) return B is
1833 function Is_Task_Interface (Id : E) return B is
1835 pragma Assert (Is_Interface (Id));
1836 return Flag200 (Id);
1837 end Is_Task_Interface;
1839 function Is_Thread_Body (Id : E) return B is
1844 function Is_True_Constant (Id : E) return B is
1846 return Flag163 (Id);
1847 end Is_True_Constant;
1849 function Is_Unchecked_Union (Id : E) return B is
1851 return Flag117 (Id);
1852 end Is_Unchecked_Union;
1854 function Is_Unsigned_Type (Id : E) return B is
1856 pragma Assert (Is_Type (Id));
1857 return Flag144 (Id);
1858 end Is_Unsigned_Type;
1860 function Is_Valued_Procedure (Id : E) return B is
1862 pragma Assert (Ekind (Id) = E_Procedure);
1863 return Flag127 (Id);
1864 end Is_Valued_Procedure;
1866 function Is_Visible_Child_Unit (Id : E) return B is
1868 pragma Assert (Is_Child_Unit (Id));
1869 return Flag116 (Id);
1870 end Is_Visible_Child_Unit;
1872 function Is_VMS_Exception (Id : E) return B is
1874 return Flag133 (Id);
1875 end Is_VMS_Exception;
1877 function Is_Volatile (Id : E) return B is
1879 pragma Assert (Nkind (Id) in N_Entity);
1880 if Is_Type (Id) then
1881 return Flag16 (Base_Type (Id));
1887 function Kill_Elaboration_Checks (Id : E) return B is
1890 end Kill_Elaboration_Checks;
1892 function Kill_Range_Checks (Id : E) return B is
1895 end Kill_Range_Checks;
1897 function Kill_Tag_Checks (Id : E) return B is
1900 end Kill_Tag_Checks;
1902 function Last_Entity (Id : E) return E is
1907 function Limited_View (Id : E) return E is
1909 pragma Assert (Ekind (Id) = E_Package);
1913 function Lit_Indexes (Id : E) return E is
1915 pragma Assert (Is_Enumeration_Type (Id));
1919 function Lit_Strings (Id : E) return E is
1921 pragma Assert (Is_Enumeration_Type (Id));
1925 function Machine_Radix_10 (Id : E) return B is
1927 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1929 end Machine_Radix_10;
1931 function Master_Id (Id : E) return E is
1936 function Materialize_Entity (Id : E) return B is
1938 return Flag168 (Id);
1939 end Materialize_Entity;
1941 function Mechanism (Id : E) return M is
1943 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
1944 return UI_To_Int (Uint8 (Id));
1947 function Modulus (Id : E) return Uint is
1949 pragma Assert (Is_Modular_Integer_Type (Id));
1950 return Uint17 (Base_Type (Id));
1953 function Must_Be_On_Byte_Boundary (Id : E) return B is
1955 pragma Assert (Is_Type (Id));
1956 return Flag183 (Id);
1957 end Must_Be_On_Byte_Boundary;
1959 function Needs_Debug_Info (Id : E) return B is
1961 return Flag147 (Id);
1962 end Needs_Debug_Info;
1964 function Needs_No_Actuals (Id : E) return B is
1967 (Is_Overloadable (Id)
1968 or else Ekind (Id) = E_Subprogram_Type
1969 or else Ekind (Id) = E_Entry_Family);
1971 end Needs_No_Actuals;
1973 function Never_Set_In_Source (Id : E) return B is
1975 return Flag115 (Id);
1976 end Never_Set_In_Source;
1978 function Next_Inlined_Subprogram (Id : E) return E is
1981 end Next_Inlined_Subprogram;
1983 function No_Pool_Assigned (Id : E) return B is
1985 pragma Assert (Is_Access_Type (Id));
1986 return Flag131 (Root_Type (Id));
1987 end No_Pool_Assigned;
1989 function No_Return (Id : E) return B is
1993 or else Ekind (Id) = E_Procedure
1994 or else Ekind (Id) = E_Generic_Procedure);
1995 return Flag113 (Id);
1998 function No_Strict_Aliasing (Id : E) return B is
2000 pragma Assert (Is_Access_Type (Id));
2001 return Flag136 (Base_Type (Id));
2002 end No_Strict_Aliasing;
2004 function Non_Binary_Modulus (Id : E) return B is
2006 pragma Assert (Is_Modular_Integer_Type (Id));
2007 return Flag58 (Base_Type (Id));
2008 end Non_Binary_Modulus;
2010 function Non_Limited_View (Id : E) return E is
2012 pragma Assert (False
2013 or else Ekind (Id) = E_Incomplete_Type);
2015 end Non_Limited_View;
2017 function Nonzero_Is_True (Id : E) return B is
2019 pragma Assert (Root_Type (Id) = Standard_Boolean);
2020 return Flag162 (Base_Type (Id));
2021 end Nonzero_Is_True;
2023 function Normalized_First_Bit (Id : E) return U is
2026 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
2028 end Normalized_First_Bit;
2030 function Normalized_Position (Id : E) return U is
2033 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
2035 end Normalized_Position;
2037 function Normalized_Position_Max (Id : E) return U is
2040 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
2042 end Normalized_Position_Max;
2044 function Object_Ref (Id : E) return E is
2046 pragma Assert (Ekind (Id) = E_Protected_Body);
2050 function Obsolescent_Warning (Id : E) return N is
2053 (Is_Subprogram (Id) or else Is_Package_Or_Generic_Package (Id));
2055 end Obsolescent_Warning;
2057 function Original_Access_Type (Id : E) return E is
2060 (Ekind (Id) = E_Access_Subprogram_Type
2061 or else Ekind (Id) = E_Access_Protected_Subprogram_Type);
2063 end Original_Access_Type;
2065 function Original_Array_Type (Id : E) return E is
2067 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2069 end Original_Array_Type;
2071 function Original_Record_Component (Id : E) return E is
2074 (Ekind (Id) = E_Void
2075 or else Ekind (Id) = E_Component
2076 or else Ekind (Id) = E_Discriminant);
2078 end Original_Record_Component;
2080 function Overridden_Operation (Id : E) return E is
2083 end Overridden_Operation;
2085 function Package_Instantiation (Id : E) return N is
2089 or else Ekind (Id) = E_Generic_Package
2090 or else Ekind (Id) = E_Package);
2092 end Package_Instantiation;
2094 function Packed_Array_Type (Id : E) return E is
2096 pragma Assert (Is_Array_Type (Id));
2098 end Packed_Array_Type;
2100 function Parent_Subtype (Id : E) return E is
2102 pragma Assert (Ekind (Id) = E_Record_Type);
2106 function Primitive_Operations (Id : E) return L is
2108 pragma Assert (Is_Tagged_Type (Id));
2109 return Elist15 (Id);
2110 end Primitive_Operations;
2112 function Prival (Id : E) return E is
2114 pragma Assert (Is_Protected_Private (Id));
2118 function Privals_Chain (Id : E) return L is
2120 pragma Assert (Is_Overloadable (Id)
2121 or else Ekind (Id) = E_Entry_Family);
2122 return Elist23 (Id);
2125 function Private_Dependents (Id : E) return L is
2127 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2128 return Elist18 (Id);
2129 end Private_Dependents;
2131 function Private_View (Id : E) return N is
2133 pragma Assert (Is_Private_Type (Id));
2137 function Protected_Body_Subprogram (Id : E) return E is
2139 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2141 end Protected_Body_Subprogram;
2143 function Protected_Formal (Id : E) return E is
2145 pragma Assert (Is_Formal (Id));
2147 end Protected_Formal;
2149 function Protected_Operation (Id : E) return N is
2151 pragma Assert (Is_Protected_Private (Id));
2153 end Protected_Operation;
2155 function Reachable (Id : E) return B is
2160 function Referenced (Id : E) return B is
2162 return Flag156 (Id);
2165 function Referenced_As_LHS (Id : E) return B is
2168 end Referenced_As_LHS;
2170 function Referenced_Object (Id : E) return N is
2172 pragma Assert (Is_Type (Id));
2174 end Referenced_Object;
2176 function Register_Exception_Call (Id : E) return N is
2178 pragma Assert (Ekind (Id) = E_Exception);
2180 end Register_Exception_Call;
2182 function Related_Array_Object (Id : E) return E is
2184 pragma Assert (Is_Array_Type (Id));
2186 end Related_Array_Object;
2188 function Related_Instance (Id : E) return E is
2191 (Ekind (Id) = E_Package or else Ekind (Id) = E_Package_Body);
2193 end Related_Instance;
2195 function Renamed_Entity (Id : E) return N is
2200 function Renamed_Object (Id : E) return N is
2205 function Renaming_Map (Id : E) return U is
2210 function Return_Present (Id : E) return B is
2215 function Returns_By_Ref (Id : E) return B is
2220 function Reverse_Bit_Order (Id : E) return B is
2222 pragma Assert (Is_Record_Type (Id));
2223 return Flag164 (Base_Type (Id));
2224 end Reverse_Bit_Order;
2226 function RM_Size (Id : E) return U is
2228 pragma Assert (Is_Type (Id));
2232 function Scalar_Range (Id : E) return N is
2237 function Scale_Value (Id : E) return U is
2242 function Scope_Depth_Value (Id : E) return U is
2245 end Scope_Depth_Value;
2247 function Sec_Stack_Needed_For_Return (Id : E) return B is
2249 return Flag167 (Id);
2250 end Sec_Stack_Needed_For_Return;
2252 function Shadow_Entities (Id : E) return S is
2255 (Ekind (Id) = E_Package or else Ekind (Id) = E_Generic_Package);
2257 end Shadow_Entities;
2259 function Shared_Var_Assign_Proc (Id : E) return E is
2261 pragma Assert (Ekind (Id) = E_Variable);
2263 end Shared_Var_Assign_Proc;
2265 function Shared_Var_Read_Proc (Id : E) return E is
2267 pragma Assert (Ekind (Id) = E_Variable);
2269 end Shared_Var_Read_Proc;
2271 function Size_Check_Code (Id : E) return N is
2273 pragma Assert (Ekind (Id) = E_Constant or else Ekind (Id) = E_Variable);
2275 end Size_Check_Code;
2277 function Size_Depends_On_Discriminant (Id : E) return B is
2279 return Flag177 (Id);
2280 end Size_Depends_On_Discriminant;
2282 function Size_Known_At_Compile_Time (Id : E) return B is
2285 end Size_Known_At_Compile_Time;
2287 function Small_Value (Id : E) return R is
2289 pragma Assert (Is_Fixed_Point_Type (Id));
2290 return Ureal21 (Id);
2293 function Spec_Entity (Id : E) return E is
2296 (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2300 function Storage_Size_Variable (Id : E) return E is
2302 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2303 return Node15 (Implementation_Base_Type (Id));
2304 end Storage_Size_Variable;
2306 function Stored_Constraint (Id : E) return L is
2309 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
2310 return Elist23 (Id);
2311 end Stored_Constraint;
2313 function Strict_Alignment (Id : E) return B is
2315 return Flag145 (Implementation_Base_Type (Id));
2316 end Strict_Alignment;
2318 function String_Literal_Length (Id : E) return U is
2321 end String_Literal_Length;
2323 function String_Literal_Low_Bound (Id : E) return N is
2326 end String_Literal_Low_Bound;
2328 function Suppress_Elaboration_Warnings (Id : E) return B is
2330 return Flag148 (Id);
2331 end Suppress_Elaboration_Warnings;
2333 function Suppress_Init_Proc (Id : E) return B is
2335 return Flag105 (Base_Type (Id));
2336 end Suppress_Init_Proc;
2338 function Suppress_Style_Checks (Id : E) return B is
2340 return Flag165 (Id);
2341 end Suppress_Style_Checks;
2343 function Task_Body_Procedure (Id : E) return N is
2345 pragma Assert (Ekind (Id) = E_Task_Type
2346 or else Ekind (Id) = E_Task_Subtype);
2348 end Task_Body_Procedure;
2350 function Treat_As_Volatile (Id : E) return B is
2353 end Treat_As_Volatile;
2355 function Underlying_Full_View (Id : E) return E is
2357 pragma Assert (Ekind (Id) in Private_Kind);
2359 end Underlying_Full_View;
2361 function Unset_Reference (Id : E) return N is
2364 end Unset_Reference;
2366 function Uses_Sec_Stack (Id : E) return B is
2371 function Vax_Float (Id : E) return B is
2373 return Flag151 (Base_Type (Id));
2376 function Warnings_Off (Id : E) return B is
2381 function Wrapped_Entity (Id : E) return E is
2383 pragma Assert (Ekind (Id) = E_Procedure
2384 and then Is_Primitive_Wrapper (Id));
2388 function Was_Hidden (Id : E) return B is
2390 return Flag196 (Id);
2393 ------------------------------
2394 -- Classification Functions --
2395 ------------------------------
2397 function Is_Access_Type (Id : E) return B is
2399 return Ekind (Id) in Access_Kind;
2402 function Is_Array_Type (Id : E) return B is
2404 return Ekind (Id) in Array_Kind;
2407 function Is_Class_Wide_Type (Id : E) return B is
2409 return Ekind (Id) in Class_Wide_Kind;
2410 end Is_Class_Wide_Type;
2412 function Is_Composite_Type (Id : E) return B is
2414 return Ekind (Id) in Composite_Kind;
2415 end Is_Composite_Type;
2417 function Is_Concurrent_Body (Id : E) return B is
2419 return Ekind (Id) in
2420 Concurrent_Body_Kind;
2421 end Is_Concurrent_Body;
2423 function Is_Concurrent_Record_Type (Id : E) return B is
2426 end Is_Concurrent_Record_Type;
2428 function Is_Concurrent_Type (Id : E) return B is
2430 return Ekind (Id) in Concurrent_Kind;
2431 end Is_Concurrent_Type;
2433 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
2435 return Ekind (Id) in
2436 Decimal_Fixed_Point_Kind;
2437 end Is_Decimal_Fixed_Point_Type;
2439 function Is_Digits_Type (Id : E) return B is
2441 return Ekind (Id) in Digits_Kind;
2444 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
2446 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
2447 end Is_Discrete_Or_Fixed_Point_Type;
2449 function Is_Discrete_Type (Id : E) return B is
2451 return Ekind (Id) in Discrete_Kind;
2452 end Is_Discrete_Type;
2454 function Is_Elementary_Type (Id : E) return B is
2456 return Ekind (Id) in Elementary_Kind;
2457 end Is_Elementary_Type;
2459 function Is_Entry (Id : E) return B is
2461 return Ekind (Id) in Entry_Kind;
2464 function Is_Enumeration_Type (Id : E) return B is
2466 return Ekind (Id) in
2468 end Is_Enumeration_Type;
2470 function Is_Fixed_Point_Type (Id : E) return B is
2472 return Ekind (Id) in
2474 end Is_Fixed_Point_Type;
2476 function Is_Floating_Point_Type (Id : E) return B is
2478 return Ekind (Id) in Float_Kind;
2479 end Is_Floating_Point_Type;
2481 function Is_Formal (Id : E) return B is
2483 return Ekind (Id) in Formal_Kind;
2486 function Is_Generic_Subprogram (Id : E) return B is
2488 return Ekind (Id) in Generic_Subprogram_Kind;
2489 end Is_Generic_Subprogram;
2491 function Is_Generic_Unit (Id : E) return B is
2493 return Ekind (Id) in Generic_Unit_Kind;
2494 end Is_Generic_Unit;
2496 function Is_Incomplete_Or_Private_Type (Id : E) return B is
2498 return Ekind (Id) in
2499 Incomplete_Or_Private_Kind;
2500 end Is_Incomplete_Or_Private_Type;
2502 function Is_Integer_Type (Id : E) return B is
2504 return Ekind (Id) in Integer_Kind;
2505 end Is_Integer_Type;
2507 function Is_Modular_Integer_Type (Id : E) return B is
2509 return Ekind (Id) in
2510 Modular_Integer_Kind;
2511 end Is_Modular_Integer_Type;
2513 function Is_Named_Number (Id : E) return B is
2515 return Ekind (Id) in Named_Kind;
2516 end Is_Named_Number;
2518 function Is_Numeric_Type (Id : E) return B is
2520 return Ekind (Id) in Numeric_Kind;
2521 end Is_Numeric_Type;
2523 function Is_Object (Id : E) return B is
2525 return Ekind (Id) in Object_Kind;
2528 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
2530 return Ekind (Id) in
2531 Ordinary_Fixed_Point_Kind;
2532 end Is_Ordinary_Fixed_Point_Type;
2534 function Is_Overloadable (Id : E) return B is
2536 return Ekind (Id) in Overloadable_Kind;
2537 end Is_Overloadable;
2539 function Is_Private_Type (Id : E) return B is
2541 return Ekind (Id) in Private_Kind;
2542 end Is_Private_Type;
2544 function Is_Protected_Type (Id : E) return B is
2546 return Ekind (Id) in Protected_Kind;
2547 end Is_Protected_Type;
2549 function Is_Real_Type (Id : E) return B is
2551 return Ekind (Id) in Real_Kind;
2554 function Is_Record_Type (Id : E) return B is
2556 return Ekind (Id) in Record_Kind;
2559 function Is_Scalar_Type (Id : E) return B is
2561 return Ekind (Id) in Scalar_Kind;
2564 function Is_Signed_Integer_Type (Id : E) return B is
2566 return Ekind (Id) in
2567 Signed_Integer_Kind;
2568 end Is_Signed_Integer_Type;
2570 function Is_Subprogram (Id : E) return B is
2572 return Ekind (Id) in Subprogram_Kind;
2575 function Is_Task_Type (Id : E) return B is
2577 return Ekind (Id) in Task_Kind;
2580 function Is_Type (Id : E) return B is
2582 return Ekind (Id) in Type_Kind;
2585 ------------------------------
2586 -- Attribute Set Procedures --
2587 ------------------------------
2589 procedure Set_Abstract_Interfaces (Id : E; V : L) is
2592 (Ekind (Id) = E_Record_Type
2593 or else Ekind (Id) = E_Record_Subtype
2594 or else Ekind (Id) = E_Record_Type_With_Private
2595 or else Ekind (Id) = E_Record_Subtype_With_Private
2596 or else Ekind (Id) = E_Class_Wide_Type);
2597 Set_Elist24 (Id, V);
2598 end Set_Abstract_Interfaces;
2600 procedure Set_Abstract_Interface_Alias (Id : E; V : E) is
2603 (Ekind (Id) = E_Procedure or Ekind (Id) = E_Function);
2605 end Set_Abstract_Interface_Alias;
2607 procedure Set_Accept_Address (Id : E; V : L) is
2609 Set_Elist21 (Id, V);
2610 end Set_Accept_Address;
2612 procedure Set_Access_Disp_Table (Id : E; V : L) is
2614 pragma Assert (Is_Tagged_Type (Id) and then Id = Base_Type (Id));
2615 Set_Elist16 (Id, V);
2616 end Set_Access_Disp_Table;
2618 procedure Set_Associated_Final_Chain (Id : E; V : E) is
2620 pragma Assert (Is_Access_Type (Id));
2622 end Set_Associated_Final_Chain;
2624 procedure Set_Associated_Formal_Package (Id : E; V : E) is
2627 end Set_Associated_Formal_Package;
2629 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
2632 end Set_Associated_Node_For_Itype;
2634 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
2636 pragma Assert (Is_Access_Type (Id) and then Id = Base_Type (Id));
2638 end Set_Associated_Storage_Pool;
2640 procedure Set_Actual_Subtype (Id : E; V : E) is
2643 (Ekind (Id) = E_Constant
2644 or else Ekind (Id) = E_Variable
2645 or else Ekind (Id) = E_Generic_In_Out_Parameter
2646 or else Ekind (Id) in E_In_Parameter .. E_In_Out_Parameter);
2648 end Set_Actual_Subtype;
2650 procedure Set_Address_Taken (Id : E; V : B := True) is
2652 Set_Flag104 (Id, V);
2653 end Set_Address_Taken;
2655 procedure Set_Alias (Id : E; V : E) is
2658 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
2662 procedure Set_Alignment (Id : E; V : U) is
2664 pragma Assert (Is_Type (Id)
2665 or else Is_Formal (Id)
2666 or else Ekind (Id) = E_Loop_Parameter
2667 or else Ekind (Id) = E_Constant
2668 or else Ekind (Id) = E_Exception
2669 or else Ekind (Id) = E_Variable);
2673 procedure Set_Barrier_Function (Id : E; V : N) is
2675 pragma Assert (Is_Entry (Id));
2677 end Set_Barrier_Function;
2679 procedure Set_Block_Node (Id : E; V : N) is
2681 pragma Assert (Ekind (Id) = E_Block);
2685 procedure Set_Body_Entity (Id : E; V : E) is
2688 (Ekind (Id) = E_Package or else Ekind (Id) = E_Generic_Package);
2690 end Set_Body_Entity;
2692 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
2695 (Ekind (Id) = E_Package
2696 or else Is_Subprogram (Id)
2697 or else Is_Generic_Unit (Id));
2699 end Set_Body_Needed_For_SAL;
2701 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
2703 pragma Assert (Is_Record_Type (Id) and then Id = Base_Type (Id));
2704 Set_Flag125 (Id, V);
2705 end Set_C_Pass_By_Copy;
2707 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
2710 end Set_Can_Never_Be_Null;
2712 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
2715 end Set_Checks_May_Be_Suppressed;
2717 procedure Set_Class_Wide_Type (Id : E; V : E) is
2719 pragma Assert (Is_Type (Id));
2721 end Set_Class_Wide_Type;
2723 procedure Set_Cloned_Subtype (Id : E; V : E) is
2726 (Ekind (Id) = E_Record_Subtype
2727 or else Ekind (Id) = E_Class_Wide_Subtype);
2729 end Set_Cloned_Subtype;
2731 procedure Set_Component_Bit_Offset (Id : E; V : U) is
2734 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
2736 end Set_Component_Bit_Offset;
2738 procedure Set_Component_Clause (Id : E; V : N) is
2741 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
2743 end Set_Component_Clause;
2745 procedure Set_Component_Size (Id : E; V : U) is
2747 pragma Assert (Is_Array_Type (Id) and then Id = Base_Type (Id));
2749 end Set_Component_Size;
2751 procedure Set_Component_Type (Id : E; V : E) is
2753 pragma Assert (Is_Array_Type (Id) and then Id = Base_Type (Id));
2755 end Set_Component_Type;
2757 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
2760 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
2762 end Set_Corresponding_Concurrent_Type;
2764 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
2766 pragma Assert (Ekind (Id) = E_Discriminant);
2768 end Set_Corresponding_Discriminant;
2770 procedure Set_Corresponding_Equality (Id : E; V : E) is
2773 (Ekind (Id) = E_Function
2774 and then not Comes_From_Source (Id)
2775 and then Chars (Id) = Name_Op_Ne);
2777 end Set_Corresponding_Equality;
2779 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
2781 pragma Assert (Is_Concurrent_Type (Id));
2783 end Set_Corresponding_Record_Type;
2785 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
2788 end Set_Corresponding_Remote_Type;
2790 procedure Set_Current_Use_Clause (Id : E; V : E) is
2792 pragma Assert (Ekind (Id) = E_Package);
2794 end Set_Current_Use_Clause;
2796 procedure Set_Current_Value (Id : E; V : N) is
2798 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
2800 end Set_Current_Value;
2802 procedure Set_CR_Discriminant (Id : E; V : E) is
2805 end Set_CR_Discriminant;
2807 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
2809 Set_Flag166 (Id, V);
2810 end Set_Debug_Info_Off;
2812 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
2815 end Set_Debug_Renaming_Link;
2817 procedure Set_Default_Expr_Function (Id : E; V : E) is
2819 pragma Assert (Is_Formal (Id));
2821 end Set_Default_Expr_Function;
2823 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
2825 Set_Flag108 (Id, V);
2826 end Set_Default_Expressions_Processed;
2828 procedure Set_Default_Value (Id : E; V : N) is
2830 pragma Assert (Is_Formal (Id));
2832 end Set_Default_Value;
2834 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
2838 or else Is_Task_Type (Id)
2839 or else Ekind (Id) = E_Block);
2840 Set_Flag114 (Id, V);
2841 end Set_Delay_Cleanups;
2843 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
2847 or else Ekind (Id) = E_Package
2848 or else Ekind (Id) = E_Package_Body);
2850 end Set_Delay_Subprogram_Descriptors;
2852 procedure Set_Delta_Value (Id : E; V : R) is
2854 pragma Assert (Is_Fixed_Point_Type (Id));
2855 Set_Ureal18 (Id, V);
2856 end Set_Delta_Value;
2858 procedure Set_Dependent_Instances (Id : E; V : L) is
2860 pragma Assert (Is_Generic_Instance (Id));
2862 end Set_Dependent_Instances;
2864 procedure Set_Depends_On_Private (Id : E; V : B := True) is
2866 pragma Assert (Nkind (Id) in N_Entity);
2868 end Set_Depends_On_Private;
2870 procedure Set_Digits_Value (Id : E; V : U) is
2873 (Is_Floating_Point_Type (Id)
2874 or else Is_Decimal_Fixed_Point_Type (Id));
2876 end Set_Digits_Value;
2878 procedure Set_Directly_Designated_Type (Id : E; V : E) is
2881 end Set_Directly_Designated_Type;
2883 procedure Set_Discard_Names (Id : E; V : B := True) is
2886 end Set_Discard_Names;
2888 procedure Set_Discriminal (Id : E; V : E) is
2890 pragma Assert (Ekind (Id) = E_Discriminant);
2892 end Set_Discriminal;
2894 procedure Set_Discriminal_Link (Id : E; V : E) is
2897 end Set_Discriminal_Link;
2899 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
2901 pragma Assert (Ekind (Id) = E_Component);
2903 end Set_Discriminant_Checking_Func;
2905 procedure Set_Discriminant_Constraint (Id : E; V : L) is
2907 pragma Assert (Nkind (Id) in N_Entity);
2908 Set_Elist21 (Id, V);
2909 end Set_Discriminant_Constraint;
2911 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
2914 end Set_Discriminant_Default_Value;
2916 procedure Set_Discriminant_Number (Id : E; V : U) is
2919 end Set_Discriminant_Number;
2921 procedure Set_DT_Entry_Count (Id : E; V : U) is
2923 pragma Assert (Ekind (Id) = E_Component);
2925 end Set_DT_Entry_Count;
2927 procedure Set_DT_Position (Id : E; V : U) is
2929 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2931 end Set_DT_Position;
2933 procedure Set_DTC_Entity (Id : E; V : E) is
2936 (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2940 procedure Set_Elaboration_Entity (Id : E; V : E) is
2945 Ekind (Id) = E_Package
2947 Is_Generic_Unit (Id));
2949 end Set_Elaboration_Entity;
2951 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
2956 Ekind (Id) = E_Package
2958 Is_Generic_Unit (Id));
2959 Set_Flag174 (Id, V);
2960 end Set_Elaboration_Entity_Required;
2962 procedure Set_Enclosing_Scope (Id : E; V : E) is
2965 end Set_Enclosing_Scope;
2967 procedure Set_Entry_Accepted (Id : E; V : B := True) is
2969 pragma Assert (Is_Entry (Id));
2970 Set_Flag152 (Id, V);
2971 end Set_Entry_Accepted;
2973 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
2976 end Set_Entry_Bodies_Array;
2978 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
2981 end Set_Entry_Cancel_Parameter;
2983 procedure Set_Entry_Component (Id : E; V : E) is
2986 end Set_Entry_Component;
2988 procedure Set_Entry_Formal (Id : E; V : E) is
2991 end Set_Entry_Formal;
2993 procedure Set_Entry_Index_Constant (Id : E; V : E) is
2995 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
2997 end Set_Entry_Index_Constant;
2999 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3002 end Set_Entry_Parameters_Type;
3004 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3006 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3008 end Set_Enum_Pos_To_Rep;
3010 procedure Set_Enumeration_Pos (Id : E; V : U) is
3012 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3014 end Set_Enumeration_Pos;
3016 procedure Set_Enumeration_Rep (Id : E; V : U) is
3018 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3020 end Set_Enumeration_Rep;
3022 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3024 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3026 end Set_Enumeration_Rep_Expr;
3028 procedure Set_Equivalent_Type (Id : E; V : E) is
3031 (Ekind (Id) = E_Class_Wide_Type or else
3032 Ekind (Id) = E_Class_Wide_Subtype or else
3033 Ekind (Id) = E_Access_Protected_Subprogram_Type or else
3034 Ekind (Id) = E_Access_Subprogram_Type or else
3035 Ekind (Id) = E_Exception_Type);
3037 end Set_Equivalent_Type;
3039 procedure Set_Esize (Id : E; V : U) is
3044 procedure Set_Exception_Code (Id : E; V : U) is
3046 pragma Assert (Ekind (Id) = E_Exception);
3048 end Set_Exception_Code;
3050 procedure Set_Extra_Accessibility (Id : E; V : E) is
3052 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3054 end Set_Extra_Accessibility;
3056 procedure Set_Extra_Constrained (Id : E; V : E) is
3058 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3060 end Set_Extra_Constrained;
3062 procedure Set_Extra_Formal (Id : E; V : E) is
3065 end Set_Extra_Formal;
3067 procedure Set_Finalization_Chain_Entity (Id : E; V : E) is
3070 end Set_Finalization_Chain_Entity;
3072 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3074 pragma Assert (Is_Type (Id) and then Id = Base_Type (Id));
3075 Set_Flag158 (Id, V);
3076 end Set_Finalize_Storage_Only;
3078 procedure Set_First_Entity (Id : E; V : E) is
3081 end Set_First_Entity;
3083 procedure Set_First_Index (Id : E; V : N) is
3086 end Set_First_Index;
3088 procedure Set_First_Literal (Id : E; V : E) is
3091 end Set_First_Literal;
3093 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3096 (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
3098 end Set_First_Optional_Parameter;
3100 procedure Set_First_Private_Entity (Id : E; V : E) is
3102 pragma Assert (Ekind (Id) = E_Package
3103 or else Ekind (Id) = E_Generic_Package
3104 or else Ekind (Id) = E_Protected_Type
3105 or else Ekind (Id) = E_Protected_Subtype
3106 or else Ekind (Id) = E_Task_Type
3107 or else Ekind (Id) = E_Task_Subtype);
3109 end Set_First_Private_Entity;
3111 procedure Set_First_Rep_Item (Id : E; V : N) is
3114 end Set_First_Rep_Item;
3116 procedure Set_Freeze_Node (Id : E; V : N) is
3119 end Set_Freeze_Node;
3121 procedure Set_From_With_Type (Id : E; V : B := True) is
3125 or else Ekind (Id) = E_Package);
3126 Set_Flag159 (Id, V);
3127 end Set_From_With_Type;
3129 procedure Set_Full_View (Id : E; V : E) is
3131 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
3135 procedure Set_Function_Returns_With_DSP (Id : E; V : B := True) is
3138 (Is_Subprogram (Id) or else Ekind (Id) = E_Subprogram_Type);
3139 Set_Flag169 (Id, V);
3140 end Set_Function_Returns_With_DSP;
3142 procedure Set_Generic_Homonym (Id : E; V : E) is
3145 end Set_Generic_Homonym;
3147 procedure Set_Generic_Renamings (Id : E; V : L) is
3149 Set_Elist23 (Id, V);
3150 end Set_Generic_Renamings;
3152 procedure Set_Handler_Records (Id : E; V : S) is
3155 end Set_Handler_Records;
3157 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
3159 pragma Assert (Base_Type (Id) = Id);
3160 Set_Flag135 (Id, V);
3161 end Set_Has_Aliased_Components;
3163 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
3166 end Set_Has_Alignment_Clause;
3168 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
3171 end Set_Has_All_Calls_Remote;
3173 procedure Set_Has_Anon_Block_Suffix (Id : E; V : B := True) is
3175 Set_Flag201 (Id, V);
3176 end Set_Has_Anon_Block_Suffix;
3178 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
3180 pragma Assert (not Is_Type (Id) or else Base_Type (Id) = Id);
3182 end Set_Has_Atomic_Components;
3184 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
3187 ((V = False) or else (Is_Discrete_Type (Id) or Is_Object (Id)));
3188 Set_Flag139 (Id, V);
3189 end Set_Has_Biased_Representation;
3191 procedure Set_Has_Completion (Id : E; V : B := True) is
3194 end Set_Has_Completion;
3196 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
3198 pragma Assert (Ekind (Id) = E_Incomplete_Type);
3200 end Set_Has_Completion_In_Body;
3202 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
3204 pragma Assert (Ekind (Id) = E_Record_Type);
3205 Set_Flag140 (Id, V);
3206 end Set_Has_Complex_Representation;
3208 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
3210 pragma Assert (Ekind (Id) = E_Array_Type);
3212 end Set_Has_Component_Size_Clause;
3214 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
3216 pragma Assert (Is_Type (Id));
3217 Set_Flag187 (Id, V);
3218 end Set_Has_Constrained_Partial_View;
3220 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
3222 Set_Flag181 (Id, V);
3223 end Set_Has_Contiguous_Rep;
3225 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
3227 pragma Assert (Base_Type (Id) = Id);
3229 end Set_Has_Controlled_Component;
3231 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
3234 end Set_Has_Controlling_Result;
3236 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
3238 Set_Flag119 (Id, V);
3239 end Set_Has_Convention_Pragma;
3241 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
3243 pragma Assert (Nkind (Id) in N_Entity);
3245 end Set_Has_Delayed_Freeze;
3247 procedure Set_Has_Discriminants (Id : E; V : B := True) is
3249 pragma Assert (Nkind (Id) in N_Entity);
3251 end Set_Has_Discriminants;
3253 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
3255 pragma Assert (Is_Enumeration_Type (Id));
3257 end Set_Has_Enumeration_Rep_Clause;
3259 procedure Set_Has_Exit (Id : E; V : B := True) is
3264 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True) is
3266 pragma Assert (Is_Tagged_Type (Id));
3267 Set_Flag110 (Id, V);
3268 end Set_Has_External_Tag_Rep_Clause;
3270 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
3272 Set_Flag175 (Id, V);
3273 end Set_Has_Forward_Instantiation;
3275 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
3277 Set_Flag173 (Id, V);
3278 end Set_Has_Fully_Qualified_Name;
3280 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
3283 end Set_Has_Gigi_Rep_Item;
3285 procedure Set_Has_Homonym (Id : E; V : B := True) is
3288 end Set_Has_Homonym;
3290 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
3292 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
3294 end Set_Has_Machine_Radix_Clause;
3296 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
3299 end Set_Has_Master_Entity;
3301 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
3304 (Ekind (Id) = E_Function or else Ekind (Id) = E_Generic_Function);
3305 Set_Flag142 (Id, V);
3306 end Set_Has_Missing_Return;
3308 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
3310 Set_Flag101 (Id, V);
3311 end Set_Has_Nested_Block_With_Handler;
3313 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
3315 pragma Assert (Base_Type (Id) = Id);
3317 end Set_Has_Non_Standard_Rep;
3319 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
3321 pragma Assert (Is_Type (Id));
3322 Set_Flag172 (Id, V);
3323 end Set_Has_Object_Size_Clause;
3325 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
3327 Set_Flag154 (Id, V);
3328 end Set_Has_Per_Object_Constraint;
3330 procedure Set_Has_Persistent_BSS (Id : E; V : B := True) is
3332 Set_Flag188 (Id, V);
3333 end Set_Has_Persistent_BSS;
3335 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
3337 pragma Assert (Is_Access_Type (Id));
3338 Set_Flag27 (Base_Type (Id), V);
3339 end Set_Has_Pragma_Controlled;
3341 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
3343 Set_Flag150 (Id, V);
3344 end Set_Has_Pragma_Elaborate_Body;
3346 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
3348 Set_Flag157 (Id, V);
3349 end Set_Has_Pragma_Inline;
3351 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
3353 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
3354 pragma Assert (Id = Base_Type (Id));
3355 Set_Flag121 (Id, V);
3356 end Set_Has_Pragma_Pack;
3358 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
3360 pragma Assert (Is_Subprogram (Id));
3361 Set_Flag179 (Id, V);
3362 end Set_Has_Pragma_Pure_Function;
3364 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
3366 Set_Flag180 (Id, V);
3367 end Set_Has_Pragma_Unreferenced;
3369 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
3371 pragma Assert (Id = Base_Type (Id));
3372 Set_Flag120 (Id, V);
3373 end Set_Has_Primitive_Operations;
3375 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
3377 Set_Flag155 (Id, V);
3378 end Set_Has_Private_Declaration;
3380 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
3382 Set_Flag161 (Id, V);
3383 end Set_Has_Qualified_Name;
3385 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
3387 pragma Assert (Id = Base_Type (Id));
3389 end Set_Has_Record_Rep_Clause;
3391 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
3393 pragma Assert (Is_Subprogram (Id));
3394 Set_Flag143 (Id, V);
3395 end Set_Has_Recursive_Call;
3397 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
3400 end Set_Has_Size_Clause;
3402 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
3405 end Set_Has_Small_Clause;
3407 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
3409 pragma Assert (Id = Base_Type (Id));
3410 Set_Flag100 (Id, V);
3411 end Set_Has_Specified_Layout;
3413 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
3415 pragma Assert (Is_Type (Id));
3416 Set_Flag190 (Id, V);
3417 end Set_Has_Specified_Stream_Input;
3419 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
3421 pragma Assert (Is_Type (Id));
3422 Set_Flag191 (Id, V);
3423 end Set_Has_Specified_Stream_Output;
3425 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
3427 pragma Assert (Is_Type (Id));
3428 Set_Flag192 (Id, V);
3429 end Set_Has_Specified_Stream_Read;
3431 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
3433 pragma Assert (Is_Type (Id));
3434 Set_Flag193 (Id, V);
3435 end Set_Has_Specified_Stream_Write;
3437 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
3439 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
3440 pragma Assert (Base_Type (Id) = Id);
3442 end Set_Has_Storage_Size_Clause;
3444 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
3446 pragma Assert (Is_Elementary_Type (Id));
3447 Set_Flag184 (Id, V);
3448 end Set_Has_Stream_Size_Clause;
3450 procedure Set_Has_Subprogram_Descriptor (Id : E; V : B := True) is
3453 end Set_Has_Subprogram_Descriptor;
3455 procedure Set_Has_Task (Id : E; V : B := True) is
3457 pragma Assert (Base_Type (Id) = Id);
3461 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
3463 pragma Assert (Base_Type (Id) = Id);
3464 Set_Flag123 (Id, V);
3465 end Set_Has_Unchecked_Union;
3467 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
3469 pragma Assert (Is_Type (Id));
3471 end Set_Has_Unknown_Discriminants;
3473 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
3475 pragma Assert (not Is_Type (Id) or else Base_Type (Id) = Id);
3477 end Set_Has_Volatile_Components;
3479 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
3481 Set_Flag182 (Id, V);
3482 end Set_Has_Xref_Entry;
3484 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
3486 pragma Assert (Ekind (Id) = E_Variable);
3488 end Set_Hiding_Loop_Variable;
3490 procedure Set_Homonym (Id : E; V : E) is
3492 pragma Assert (Id /= V);
3496 procedure Set_In_Package_Body (Id : E; V : B := True) is
3499 end Set_In_Package_Body;
3501 procedure Set_In_Private_Part (Id : E; V : B := True) is
3504 end Set_In_Private_Part;
3506 procedure Set_In_Use (Id : E; V : B := True) is
3508 pragma Assert (Nkind (Id) in N_Entity);
3512 procedure Set_Inner_Instances (Id : E; V : L) is
3514 Set_Elist23 (Id, V);
3515 end Set_Inner_Instances;
3517 procedure Set_Interface_Name (Id : E; V : N) is
3520 end Set_Interface_Name;
3522 procedure Set_Is_Abstract (Id : E; V : B := True) is
3525 end Set_Is_Abstract;
3527 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
3529 pragma Assert (Is_Access_Type (Id));
3530 Set_Flag194 (Id, V);
3531 end Set_Is_Local_Anonymous_Access;
3533 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
3535 pragma Assert (Is_Access_Type (Id));
3537 end Set_Is_Access_Constant;
3539 procedure Set_Is_Ada_2005 (Id : E; V : B := True) is
3541 Set_Flag185 (Id, V);
3542 end Set_Is_Ada_2005;
3544 procedure Set_Is_Aliased (Id : E; V : B := True) is
3546 pragma Assert (Nkind (Id) in N_Entity);
3550 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
3552 pragma Assert (Is_Entry (Id));
3553 Set_Flag132 (Id, V);
3554 end Set_Is_AST_Entry;
3556 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
3559 (Ekind (Id) = E_Procedure or else Is_Type (Id));
3561 end Set_Is_Asynchronous;
3563 procedure Set_Is_Atomic (Id : E; V : B := True) is
3568 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
3570 pragma Assert ((not V)
3571 or else (Is_Array_Type (Id) and then Id = Base_Type (Id)));
3573 Set_Flag122 (Id, V);
3574 end Set_Is_Bit_Packed_Array;
3576 procedure Set_Is_Called (Id : E; V : B := True) is
3579 (Ekind (Id) = E_Procedure or else Ekind (Id) = E_Function);
3580 Set_Flag102 (Id, V);
3583 procedure Set_Is_Character_Type (Id : E; V : B := True) is
3586 end Set_Is_Character_Type;
3588 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
3591 end Set_Is_Child_Unit;
3593 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
3596 end Set_Is_Class_Wide_Equivalent_Type;
3598 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
3600 Set_Flag149 (Id, V);
3601 end Set_Is_Compilation_Unit;
3603 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
3605 pragma Assert (Ekind (Id) = E_Discriminant);
3606 Set_Flag103 (Id, V);
3607 end Set_Is_Completely_Hidden;
3609 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
3612 end Set_Is_Concurrent_Record_Type;
3614 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
3617 end Set_Is_Constr_Subt_For_U_Nominal;
3619 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
3621 Set_Flag141 (Id, V);
3622 end Set_Is_Constr_Subt_For_UN_Aliased;
3624 procedure Set_Is_Constrained (Id : E; V : B := True) is
3626 pragma Assert (Nkind (Id) in N_Entity);
3628 end Set_Is_Constrained;
3630 procedure Set_Is_Constructor (Id : E; V : B := True) is
3633 end Set_Is_Constructor;
3635 procedure Set_Is_Controlled (Id : E; V : B := True) is
3637 pragma Assert (Id = Base_Type (Id));
3639 end Set_Is_Controlled;
3641 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
3643 pragma Assert (Is_Formal (Id));
3645 end Set_Is_Controlling_Formal;
3647 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
3650 end Set_Is_CPP_Class;
3652 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
3654 Set_Flag176 (Id, V);
3655 end Set_Is_Discrim_SO_Function;
3657 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
3662 Is_Overloadable (Id)
3664 Ekind (Id) = E_Subprogram_Type);
3667 end Set_Is_Dispatching_Operation;
3669 procedure Set_Is_Eliminated (Id : E; V : B := True) is
3671 Set_Flag124 (Id, V);
3672 end Set_Is_Eliminated;
3674 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
3677 end Set_Is_Entry_Formal;
3679 procedure Set_Is_Exported (Id : E; V : B := True) is
3682 end Set_Is_Exported;
3684 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
3687 end Set_Is_First_Subtype;
3689 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
3692 (Ekind (Id) = E_Record_Subtype
3694 Ekind (Id) = E_Private_Subtype);
3695 Set_Flag118 (Id, V);
3696 end Set_Is_For_Access_Subtype;
3698 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
3700 Set_Flag111 (Id, V);
3701 end Set_Is_Formal_Subprogram;
3703 procedure Set_Is_Frozen (Id : E; V : B := True) is
3705 pragma Assert (Nkind (Id) in N_Entity);
3709 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
3711 pragma Assert (Is_Type (Id));
3713 end Set_Is_Generic_Actual_Type;
3715 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
3717 Set_Flag130 (Id, V);
3718 end Set_Is_Generic_Instance;
3720 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
3722 pragma Assert (Nkind (Id) in N_Entity);
3724 end Set_Is_Generic_Type;
3726 procedure Set_Is_Hidden (Id : E; V : B := True) is
3731 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
3733 Set_Flag171 (Id, V);
3734 end Set_Is_Hidden_Open_Scope;
3736 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
3738 pragma Assert (Nkind (Id) in N_Entity);
3740 end Set_Is_Immediately_Visible;
3742 procedure Set_Is_Imported (Id : E; V : B := True) is
3745 end Set_Is_Imported;
3747 procedure Set_Is_Inlined (Id : E; V : B := True) is
3752 procedure Set_Is_Interface (Id : E; V : B := True) is
3755 (Ekind (Id) = E_Record_Type
3756 or else Ekind (Id) = E_Record_Subtype
3757 or else Ekind (Id) = E_Record_Type_With_Private
3758 or else Ekind (Id) = E_Record_Subtype_With_Private
3759 or else Ekind (Id) = E_Class_Wide_Type);
3760 Set_Flag186 (Id, V);
3761 end Set_Is_Interface;
3763 procedure Set_Is_Instantiated (Id : E; V : B := True) is
3765 Set_Flag126 (Id, V);
3766 end Set_Is_Instantiated;
3768 procedure Set_Is_Internal (Id : E; V : B := True) is
3770 pragma Assert (Nkind (Id) in N_Entity);
3772 end Set_Is_Internal;
3774 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
3776 pragma Assert (Nkind (Id) in N_Entity);
3778 end Set_Is_Interrupt_Handler;
3780 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
3783 end Set_Is_Intrinsic_Subprogram;
3785 procedure Set_Is_Itype (Id : E; V : B := True) is
3790 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
3793 end Set_Is_Known_Non_Null;
3795 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
3797 Set_Flag170 (Id, V);
3798 end Set_Is_Known_Valid;
3800 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
3802 pragma Assert (Is_Type (Id));
3803 Set_Flag106 (Id, V);
3804 end Set_Is_Limited_Composite;
3806 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
3808 pragma Assert (Is_Interface (Id));
3809 Set_Flag197 (Id, V);
3810 end Set_Is_Limited_Interface;
3812 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
3815 end Set_Is_Limited_Record;
3817 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
3819 pragma Assert (Is_Subprogram (Id));
3820 Set_Flag137 (Id, V);
3821 end Set_Is_Machine_Code_Subprogram;
3823 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
3825 pragma Assert (Is_Type (Id));
3826 Set_Flag109 (Id, V);
3827 end Set_Is_Non_Static_Subtype;
3829 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
3831 pragma Assert (Ekind (Id) = E_Procedure);
3832 Set_Flag178 (Id, V);
3833 end Set_Is_Null_Init_Proc;
3835 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
3837 Set_Flag153 (Id, V);
3838 end Set_Is_Obsolescent;
3840 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
3842 pragma Assert (Is_Formal (Id));
3843 Set_Flag134 (Id, V);
3844 end Set_Is_Optional_Parameter;
3846 procedure Set_Is_Overriding_Operation (Id : E; V : B := True) is
3848 pragma Assert (Is_Subprogram (Id));
3850 end Set_Is_Overriding_Operation;
3852 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
3854 Set_Flag160 (Id, V);
3855 end Set_Is_Package_Body_Entity;
3857 procedure Set_Is_Packed (Id : E; V : B := True) is
3859 pragma Assert (Base_Type (Id) = Id);
3863 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
3865 Set_Flag138 (Id, V);
3866 end Set_Is_Packed_Array_Type;
3868 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
3870 pragma Assert (Nkind (Id) in N_Entity);
3872 end Set_Is_Potentially_Use_Visible;
3874 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
3877 end Set_Is_Preelaborated;
3879 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
3881 pragma Assert (Ekind (Id) = E_Procedure);
3882 Set_Flag195 (Id, V);
3883 end Set_Is_Primitive_Wrapper;
3885 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
3887 pragma Assert (Is_Type (Id));
3888 Set_Flag107 (Id, V);
3889 end Set_Is_Private_Composite;
3891 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
3894 end Set_Is_Private_Descendant;
3896 procedure Set_Is_Protected_Interface (Id : E; V : B := True) is
3898 pragma Assert (Is_Interface (Id));
3899 Set_Flag198 (Id, V);
3900 end Set_Is_Protected_Interface;
3902 procedure Set_Is_Public (Id : E; V : B := True) is
3904 pragma Assert (Nkind (Id) in N_Entity);
3908 procedure Set_Is_Pure (Id : E; V : B := True) is
3913 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
3915 pragma Assert (Is_Access_Type (Id));
3916 Set_Flag189 (Id, V);
3917 end Set_Is_Pure_Unit_Access_Type;
3919 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
3922 end Set_Is_Remote_Call_Interface;
3924 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
3927 end Set_Is_Remote_Types;
3929 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
3931 Set_Flag112 (Id, V);
3932 end Set_Is_Renaming_Of_Object;
3934 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
3937 end Set_Is_Shared_Passive;
3939 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
3942 (Ekind (Id) = E_Exception
3943 or else Ekind (Id) = E_Variable
3944 or else Ekind (Id) = E_Constant
3945 or else Is_Type (Id)
3946 or else Ekind (Id) = E_Void);
3948 end Set_Is_Statically_Allocated;
3950 procedure Set_Is_Synchronized_Interface (Id : E; V : B := True) is
3952 pragma Assert (Is_Interface (Id));
3953 Set_Flag199 (Id, V);
3954 end Set_Is_Synchronized_Interface;
3956 procedure Set_Is_Tag (Id : E; V : B := True) is
3958 pragma Assert (Nkind (Id) in N_Entity);
3962 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
3965 end Set_Is_Tagged_Type;
3967 procedure Set_Is_Thread_Body (Id : E; V : B := True) is
3970 end Set_Is_Thread_Body;
3972 procedure Set_Is_Task_Interface (Id : E; V : B := True) is
3974 pragma Assert (Is_Interface (Id));
3975 Set_Flag200 (Id, V);
3976 end Set_Is_Task_Interface;
3978 procedure Set_Is_True_Constant (Id : E; V : B := True) is
3980 Set_Flag163 (Id, V);
3981 end Set_Is_True_Constant;
3983 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
3985 pragma Assert (Base_Type (Id) = Id);
3986 Set_Flag117 (Id, V);
3987 end Set_Is_Unchecked_Union;
3989 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
3991 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
3992 Set_Flag144 (Id, V);
3993 end Set_Is_Unsigned_Type;
3995 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
3997 pragma Assert (Ekind (Id) = E_Procedure);
3998 Set_Flag127 (Id, V);
3999 end Set_Is_Valued_Procedure;
4001 procedure Set_Is_Visible_Child_Unit (Id : E; V : B := True) is
4003 pragma Assert (Is_Child_Unit (Id));
4004 Set_Flag116 (Id, V);
4005 end Set_Is_Visible_Child_Unit;
4007 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
4009 pragma Assert (Ekind (Id) = E_Exception);
4010 Set_Flag133 (Id, V);
4011 end Set_Is_VMS_Exception;
4013 procedure Set_Is_Volatile (Id : E; V : B := True) is
4015 pragma Assert (Nkind (Id) in N_Entity);
4017 end Set_Is_Volatile;
4019 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
4022 end Set_Kill_Elaboration_Checks;
4024 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
4027 end Set_Kill_Range_Checks;
4029 procedure Set_Kill_Tag_Checks (Id : E; V : B := True) is
4032 end Set_Kill_Tag_Checks;
4034 procedure Set_Last_Entity (Id : E; V : E) is
4037 end Set_Last_Entity;
4039 procedure Set_Limited_View (Id : E; V : E) is
4041 pragma Assert (Ekind (Id) = E_Package);
4043 end Set_Limited_View;
4045 procedure Set_Lit_Indexes (Id : E; V : E) is
4047 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4049 end Set_Lit_Indexes;
4051 procedure Set_Lit_Strings (Id : E; V : E) is
4053 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4055 end Set_Lit_Strings;
4057 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
4059 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4061 end Set_Machine_Radix_10;
4063 procedure Set_Master_Id (Id : E; V : E) is
4068 procedure Set_Materialize_Entity (Id : E; V : B := True) is
4070 Set_Flag168 (Id, V);
4071 end Set_Materialize_Entity;
4073 procedure Set_Mechanism (Id : E; V : M) is
4075 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
4076 Set_Uint8 (Id, UI_From_Int (V));
4079 procedure Set_Modulus (Id : E; V : U) is
4081 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
4085 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
4087 pragma Assert (Is_Type (Id));
4088 Set_Flag183 (Id, V);
4089 end Set_Must_Be_On_Byte_Boundary;
4091 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
4093 Set_Flag147 (Id, V);
4094 end Set_Needs_Debug_Info;
4096 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
4099 (Is_Overloadable (Id)
4100 or else Ekind (Id) = E_Subprogram_Type
4101 or else Ekind (Id) = E_Entry_Family);
4103 end Set_Needs_No_Actuals;
4105 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
4107 Set_Flag115 (Id, V);
4108 end Set_Never_Set_In_Source;
4110 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
4113 end Set_Next_Inlined_Subprogram;
4115 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
4117 pragma Assert (Is_Access_Type (Id) and then Base_Type (Id) = Id);
4118 Set_Flag131 (Id, V);
4119 end Set_No_Pool_Assigned;
4121 procedure Set_No_Return (Id : E; V : B := True) is
4124 (Ekind (Id) = E_Procedure or else Ekind (Id) = E_Generic_Procedure);
4125 Set_Flag113 (Id, V);
4128 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
4130 pragma Assert (Is_Access_Type (Id) and then Base_Type (Id) = Id);
4131 Set_Flag136 (Id, V);
4132 end Set_No_Strict_Aliasing;
4134 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
4136 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
4138 end Set_Non_Binary_Modulus;
4140 procedure Set_Non_Limited_View (Id : E; V : E) is
4141 pragma Assert (False
4142 or else Ekind (Id) = E_Incomplete_Type);
4145 end Set_Non_Limited_View;
4147 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
4150 (Root_Type (Id) = Standard_Boolean
4151 and then Ekind (Id) = E_Enumeration_Type);
4152 Set_Flag162 (Id, V);
4153 end Set_Nonzero_Is_True;
4155 procedure Set_Normalized_First_Bit (Id : E; V : U) is
4158 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
4160 end Set_Normalized_First_Bit;
4162 procedure Set_Normalized_Position (Id : E; V : U) is
4165 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
4167 end Set_Normalized_Position;
4169 procedure Set_Normalized_Position_Max (Id : E; V : U) is
4172 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
4174 end Set_Normalized_Position_Max;
4176 procedure Set_Object_Ref (Id : E; V : E) is
4178 pragma Assert (Ekind (Id) = E_Protected_Body);
4182 procedure Set_Obsolescent_Warning (Id : E; V : N) is
4185 (Is_Subprogram (Id) or else Is_Package_Or_Generic_Package (Id));
4187 end Set_Obsolescent_Warning;
4189 procedure Set_Original_Access_Type (Id : E; V : E) is
4192 (Ekind (Id) = E_Access_Subprogram_Type
4193 or else Ekind (Id) = E_Access_Protected_Subprogram_Type);
4195 end Set_Original_Access_Type;
4197 procedure Set_Original_Array_Type (Id : E; V : E) is
4199 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
4201 end Set_Original_Array_Type;
4203 procedure Set_Original_Record_Component (Id : E; V : E) is
4206 (Ekind (Id) = E_Void
4207 or else Ekind (Id) = E_Component
4208 or else Ekind (Id) = E_Discriminant);
4210 end Set_Original_Record_Component;
4212 procedure Set_Overridden_Operation (Id : E; V : E) is
4215 end Set_Overridden_Operation;
4217 procedure Set_Package_Instantiation (Id : E; V : N) is
4220 (Ekind (Id) = E_Void
4221 or else Ekind (Id) = E_Generic_Package
4222 or else Ekind (Id) = E_Package);
4224 end Set_Package_Instantiation;
4226 procedure Set_Packed_Array_Type (Id : E; V : E) is
4228 pragma Assert (Is_Array_Type (Id));
4230 end Set_Packed_Array_Type;
4232 procedure Set_Parent_Subtype (Id : E; V : E) is
4234 pragma Assert (Ekind (Id) = E_Record_Type);
4236 end Set_Parent_Subtype;
4238 procedure Set_Primitive_Operations (Id : E; V : L) is
4240 pragma Assert (Is_Tagged_Type (Id));
4241 Set_Elist15 (Id, V);
4242 end Set_Primitive_Operations;
4244 procedure Set_Prival (Id : E; V : E) is
4246 pragma Assert (Is_Protected_Private (Id));
4250 procedure Set_Privals_Chain (Id : E; V : L) is
4252 pragma Assert (Is_Overloadable (Id)
4253 or else Ekind (Id) = E_Entry_Family);
4254 Set_Elist23 (Id, V);
4255 end Set_Privals_Chain;
4257 procedure Set_Private_Dependents (Id : E; V : L) is
4259 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
4260 Set_Elist18 (Id, V);
4261 end Set_Private_Dependents;
4263 procedure Set_Private_View (Id : E; V : N) is
4265 pragma Assert (Is_Private_Type (Id));
4267 end Set_Private_View;
4269 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
4271 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
4273 end Set_Protected_Body_Subprogram;
4275 procedure Set_Protected_Formal (Id : E; V : E) is
4277 pragma Assert (Is_Formal (Id));
4279 end Set_Protected_Formal;
4281 procedure Set_Protected_Operation (Id : E; V : N) is
4283 pragma Assert (Is_Protected_Private (Id));
4285 end Set_Protected_Operation;
4287 procedure Set_Reachable (Id : E; V : B := True) is
4292 procedure Set_Referenced (Id : E; V : B := True) is
4294 Set_Flag156 (Id, V);
4297 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
4300 end Set_Referenced_As_LHS;
4302 procedure Set_Referenced_Object (Id : E; V : N) is
4304 pragma Assert (Is_Type (Id));
4306 end Set_Referenced_Object;
4308 procedure Set_Register_Exception_Call (Id : E; V : N) is
4310 pragma Assert (Ekind (Id) = E_Exception);
4312 end Set_Register_Exception_Call;
4314 procedure Set_Related_Array_Object (Id : E; V : E) is
4316 pragma Assert (Is_Array_Type (Id));
4318 end Set_Related_Array_Object;
4320 procedure Set_Related_Instance (Id : E; V : E) is
4323 (Ekind (Id) = E_Package or else Ekind (Id) = E_Package_Body);
4325 end Set_Related_Instance;
4327 procedure Set_Renamed_Entity (Id : E; V : N) is
4330 end Set_Renamed_Entity;
4332 procedure Set_Renamed_Object (Id : E; V : N) is
4335 end Set_Renamed_Object;
4337 procedure Set_Renaming_Map (Id : E; V : U) is
4340 end Set_Renaming_Map;
4342 procedure Set_Return_Present (Id : E; V : B := True) is
4345 end Set_Return_Present;
4347 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
4350 end Set_Returns_By_Ref;
4352 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
4355 (Is_Record_Type (Id) and then Id = Base_Type (Id));
4356 Set_Flag164 (Id, V);
4357 end Set_Reverse_Bit_Order;
4359 procedure Set_RM_Size (Id : E; V : U) is
4361 pragma Assert (Is_Type (Id));
4365 procedure Set_Scalar_Range (Id : E; V : N) is
4368 end Set_Scalar_Range;
4370 procedure Set_Scale_Value (Id : E; V : U) is
4373 end Set_Scale_Value;
4375 procedure Set_Scope_Depth_Value (Id : E; V : U) is
4377 pragma Assert (not Is_Record_Type (Id));
4379 end Set_Scope_Depth_Value;
4381 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
4383 Set_Flag167 (Id, V);
4384 end Set_Sec_Stack_Needed_For_Return;
4386 procedure Set_Shadow_Entities (Id : E; V : S) is
4389 (Ekind (Id) = E_Package or else Ekind (Id) = E_Generic_Package);
4391 end Set_Shadow_Entities;
4393 procedure Set_Shared_Var_Assign_Proc (Id : E; V : E) is
4395 pragma Assert (Ekind (Id) = E_Variable);
4397 end Set_Shared_Var_Assign_Proc;
4399 procedure Set_Shared_Var_Read_Proc (Id : E; V : E) is
4401 pragma Assert (Ekind (Id) = E_Variable);
4403 end Set_Shared_Var_Read_Proc;
4405 procedure Set_Size_Check_Code (Id : E; V : N) is
4407 pragma Assert (Ekind (Id) = E_Constant or else Ekind (Id) = E_Variable);
4409 end Set_Size_Check_Code;
4411 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
4413 Set_Flag177 (Id, V);
4414 end Set_Size_Depends_On_Discriminant;
4416 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
4419 end Set_Size_Known_At_Compile_Time;
4421 procedure Set_Small_Value (Id : E; V : R) is
4423 pragma Assert (Is_Fixed_Point_Type (Id));
4424 Set_Ureal21 (Id, V);
4425 end Set_Small_Value;
4427 procedure Set_Spec_Entity (Id : E; V : E) is
4429 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
4431 end Set_Spec_Entity;
4433 procedure Set_Storage_Size_Variable (Id : E; V : E) is
4435 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4436 pragma Assert (Base_Type (Id) = Id);
4438 end Set_Storage_Size_Variable;
4440 procedure Set_Stored_Constraint (Id : E; V : L) is
4442 pragma Assert (Nkind (Id) in N_Entity);
4443 Set_Elist23 (Id, V);
4444 end Set_Stored_Constraint;
4446 procedure Set_Strict_Alignment (Id : E; V : B := True) is
4448 pragma Assert (Base_Type (Id) = Id);
4449 Set_Flag145 (Id, V);
4450 end Set_Strict_Alignment;
4452 procedure Set_String_Literal_Length (Id : E; V : U) is
4454 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
4456 end Set_String_Literal_Length;
4458 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
4460 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
4462 end Set_String_Literal_Low_Bound;
4464 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
4466 Set_Flag148 (Id, V);
4467 end Set_Suppress_Elaboration_Warnings;
4469 procedure Set_Suppress_Init_Proc (Id : E; V : B := True) is
4471 pragma Assert (Id = Base_Type (Id));
4472 Set_Flag105 (Id, V);
4473 end Set_Suppress_Init_Proc;
4475 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
4477 Set_Flag165 (Id, V);
4478 end Set_Suppress_Style_Checks;
4480 procedure Set_Task_Body_Procedure (Id : E; V : N) is
4482 pragma Assert (Ekind (Id) = E_Task_Type
4483 or else Ekind (Id) = E_Task_Subtype);
4485 end Set_Task_Body_Procedure;
4487 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
4490 end Set_Treat_As_Volatile;
4492 procedure Set_Underlying_Full_View (Id : E; V : E) is
4494 pragma Assert (Ekind (Id) in Private_Kind);
4496 end Set_Underlying_Full_View;
4498 procedure Set_Unset_Reference (Id : E; V : N) is
4501 end Set_Unset_Reference;
4503 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
4506 end Set_Uses_Sec_Stack;
4508 procedure Set_Vax_Float (Id : E; V : B := True) is
4510 pragma Assert (Id = Base_Type (Id));
4511 Set_Flag151 (Id, V);
4514 procedure Set_Warnings_Off (Id : E; V : B := True) is
4517 end Set_Warnings_Off;
4519 procedure Set_Was_Hidden (Id : E; V : B := True) is
4521 Set_Flag196 (Id, V);
4524 procedure Set_Wrapped_Entity (Id : E; V : E) is
4526 pragma Assert (Ekind (Id) = E_Procedure
4527 and then Is_Primitive_Wrapper (Id));
4529 end Set_Wrapped_Entity;
4531 -----------------------------------
4532 -- Field Initialization Routines --
4533 -----------------------------------
4535 procedure Init_Alignment (Id : E) is
4537 Set_Uint14 (Id, Uint_0);
4540 procedure Init_Alignment (Id : E; V : Int) is
4542 Set_Uint14 (Id, UI_From_Int (V));
4545 procedure Init_Component_Bit_Offset (Id : E) is
4547 Set_Uint11 (Id, No_Uint);
4548 end Init_Component_Bit_Offset;
4550 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
4552 Set_Uint11 (Id, UI_From_Int (V));
4553 end Init_Component_Bit_Offset;
4555 procedure Init_Component_Size (Id : E) is
4557 Set_Uint22 (Id, Uint_0);
4558 end Init_Component_Size;
4560 procedure Init_Component_Size (Id : E; V : Int) is
4562 Set_Uint22 (Id, UI_From_Int (V));
4563 end Init_Component_Size;
4565 procedure Init_Digits_Value (Id : E) is
4567 Set_Uint17 (Id, Uint_0);
4568 end Init_Digits_Value;
4570 procedure Init_Digits_Value (Id : E; V : Int) is
4572 Set_Uint17 (Id, UI_From_Int (V));
4573 end Init_Digits_Value;
4575 procedure Init_Esize (Id : E) is
4577 Set_Uint12 (Id, Uint_0);
4580 procedure Init_Esize (Id : E; V : Int) is
4582 Set_Uint12 (Id, UI_From_Int (V));
4585 procedure Init_Normalized_First_Bit (Id : E) is
4587 Set_Uint8 (Id, No_Uint);
4588 end Init_Normalized_First_Bit;
4590 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
4592 Set_Uint8 (Id, UI_From_Int (V));
4593 end Init_Normalized_First_Bit;
4595 procedure Init_Normalized_Position (Id : E) is
4597 Set_Uint14 (Id, No_Uint);
4598 end Init_Normalized_Position;
4600 procedure Init_Normalized_Position (Id : E; V : Int) is
4602 Set_Uint14 (Id, UI_From_Int (V));
4603 end Init_Normalized_Position;
4605 procedure Init_Normalized_Position_Max (Id : E) is
4607 Set_Uint10 (Id, No_Uint);
4608 end Init_Normalized_Position_Max;
4610 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
4612 Set_Uint10 (Id, UI_From_Int (V));
4613 end Init_Normalized_Position_Max;
4615 procedure Init_RM_Size (Id : E) is
4617 Set_Uint13 (Id, Uint_0);
4620 procedure Init_RM_Size (Id : E; V : Int) is
4622 Set_Uint13 (Id, UI_From_Int (V));
4625 -----------------------------
4626 -- Init_Component_Location --
4627 -----------------------------
4629 procedure Init_Component_Location (Id : E) is
4631 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
4632 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
4633 Set_Uint11 (Id, No_Uint); -- Component_First_Bit
4634 Set_Uint12 (Id, Uint_0); -- Esize
4635 Set_Uint14 (Id, No_Uint); -- Normalized_Position
4636 end Init_Component_Location;
4642 procedure Init_Size (Id : E; V : Int) is
4644 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
4645 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
4648 ---------------------
4649 -- Init_Size_Align --
4650 ---------------------
4652 procedure Init_Size_Align (Id : E) is
4654 Set_Uint12 (Id, Uint_0); -- Esize
4655 Set_Uint13 (Id, Uint_0); -- RM_Size
4656 Set_Uint14 (Id, Uint_0); -- Alignment
4657 end Init_Size_Align;
4659 ----------------------------------------------
4660 -- Type Representation Attribute Predicates --
4661 ----------------------------------------------
4663 function Known_Alignment (E : Entity_Id) return B is
4665 return Uint14 (E) /= Uint_0
4666 and then Uint14 (E) /= No_Uint;
4667 end Known_Alignment;
4669 function Known_Component_Bit_Offset (E : Entity_Id) return B is
4671 return Uint11 (E) /= No_Uint;
4672 end Known_Component_Bit_Offset;
4674 function Known_Component_Size (E : Entity_Id) return B is
4676 return Uint22 (Base_Type (E)) /= Uint_0
4677 and then Uint22 (Base_Type (E)) /= No_Uint;
4678 end Known_Component_Size;
4680 function Known_Esize (E : Entity_Id) return B is
4682 return Uint12 (E) /= Uint_0
4683 and then Uint12 (E) /= No_Uint;
4686 function Known_Normalized_First_Bit (E : Entity_Id) return B is
4688 return Uint8 (E) /= No_Uint;
4689 end Known_Normalized_First_Bit;
4691 function Known_Normalized_Position (E : Entity_Id) return B is
4693 return Uint14 (E) /= No_Uint;
4694 end Known_Normalized_Position;
4696 function Known_Normalized_Position_Max (E : Entity_Id) return B is
4698 return Uint10 (E) /= No_Uint;
4699 end Known_Normalized_Position_Max;
4701 function Known_RM_Size (E : Entity_Id) return B is
4703 return Uint13 (E) /= No_Uint
4704 and then (Uint13 (E) /= Uint_0
4705 or else Is_Discrete_Type (E)
4706 or else Is_Fixed_Point_Type (E));
4709 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
4711 return Uint11 (E) /= No_Uint
4712 and then Uint11 (E) >= Uint_0;
4713 end Known_Static_Component_Bit_Offset;
4715 function Known_Static_Component_Size (E : Entity_Id) return B is
4717 return Uint22 (Base_Type (E)) > Uint_0;
4718 end Known_Static_Component_Size;
4720 function Known_Static_Esize (E : Entity_Id) return B is
4722 return Uint12 (E) > Uint_0;
4723 end Known_Static_Esize;
4725 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
4727 return Uint8 (E) /= No_Uint
4728 and then Uint8 (E) >= Uint_0;
4729 end Known_Static_Normalized_First_Bit;
4731 function Known_Static_Normalized_Position (E : Entity_Id) return B is
4733 return Uint14 (E) /= No_Uint
4734 and then Uint14 (E) >= Uint_0;
4735 end Known_Static_Normalized_Position;
4737 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
4739 return Uint10 (E) /= No_Uint
4740 and then Uint10 (E) >= Uint_0;
4741 end Known_Static_Normalized_Position_Max;
4743 function Known_Static_RM_Size (E : Entity_Id) return B is
4745 return Uint13 (E) > Uint_0
4746 or else Is_Discrete_Type (E)
4747 or else Is_Fixed_Point_Type (E);
4748 end Known_Static_RM_Size;
4750 function Unknown_Alignment (E : Entity_Id) return B is
4752 return Uint14 (E) = Uint_0
4753 or else Uint14 (E) = No_Uint;
4754 end Unknown_Alignment;
4756 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
4758 return Uint11 (E) = No_Uint;
4759 end Unknown_Component_Bit_Offset;
4761 function Unknown_Component_Size (E : Entity_Id) return B is
4763 return Uint22 (Base_Type (E)) = Uint_0
4765 Uint22 (Base_Type (E)) = No_Uint;
4766 end Unknown_Component_Size;
4768 function Unknown_Esize (E : Entity_Id) return B is
4770 return Uint12 (E) = No_Uint
4772 Uint12 (E) = Uint_0;
4775 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
4777 return Uint8 (E) = No_Uint;
4778 end Unknown_Normalized_First_Bit;
4780 function Unknown_Normalized_Position (E : Entity_Id) return B is
4782 return Uint14 (E) = No_Uint;
4783 end Unknown_Normalized_Position;
4785 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
4787 return Uint10 (E) = No_Uint;
4788 end Unknown_Normalized_Position_Max;
4790 function Unknown_RM_Size (E : Entity_Id) return B is
4792 return (Uint13 (E) = Uint_0
4793 and then not Is_Discrete_Type (E)
4794 and then not Is_Fixed_Point_Type (E))
4795 or else Uint13 (E) = No_Uint;
4796 end Unknown_RM_Size;
4798 --------------------
4799 -- Address_Clause --
4800 --------------------
4802 function Address_Clause (Id : E) return N is
4804 return Rep_Clause (Id, Name_Address);
4807 ----------------------
4808 -- Alignment_Clause --
4809 ----------------------
4811 function Alignment_Clause (Id : E) return N is
4813 return Rep_Clause (Id, Name_Alignment);
4814 end Alignment_Clause;
4816 ----------------------
4817 -- Ancestor_Subtype --
4818 ----------------------
4820 function Ancestor_Subtype (Id : E) return E is
4822 -- If this is first subtype, or is a base type, then there is no
4823 -- ancestor subtype, so we return Empty to indicate this fact.
4825 if Is_First_Subtype (Id) or else Id = Base_Type (Id) then
4830 D : constant Node_Id := Declaration_Node (Id);
4833 -- If we have a subtype declaration, get the ancestor subtype
4835 if Nkind (D) = N_Subtype_Declaration then
4836 if Nkind (Subtype_Indication (D)) = N_Subtype_Indication then
4837 return Entity (Subtype_Mark (Subtype_Indication (D)));
4839 return Entity (Subtype_Indication (D));
4842 -- If not, then no subtype indication is available
4848 end Ancestor_Subtype;
4854 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
4856 if Last_Entity (V) = Empty then
4857 Set_First_Entity (V, Id);
4859 Set_Next_Entity (Last_Entity (V), Id);
4862 Set_Next_Entity (Id, Empty);
4864 Set_Last_Entity (V, Id);
4871 function Base_Type (Id : E) return E is
4874 when E_Enumeration_Subtype |
4876 E_Signed_Integer_Subtype |
4877 E_Modular_Integer_Subtype |
4878 E_Floating_Point_Subtype |
4879 E_Ordinary_Fixed_Point_Subtype |
4880 E_Decimal_Fixed_Point_Subtype |
4885 E_Record_Subtype_With_Private |
4886 E_Limited_Private_Subtype |
4888 E_Protected_Subtype |
4890 E_String_Literal_Subtype |
4891 E_Class_Wide_Subtype =>
4899 -------------------------
4900 -- Component_Alignment --
4901 -------------------------
4903 -- Component Alignment is encoded using two flags, Flag128/129 as
4904 -- follows. Note that both flags False = Align_Default, so that the
4905 -- default initialization of flags to False initializes component
4906 -- alignment to the default value as required.
4908 -- Flag128 Flag129 Value
4909 -- ------- ------- -----
4910 -- False False Calign_Default
4911 -- False True Calign_Component_Size
4912 -- True False Calign_Component_Size_4
4913 -- True True Calign_Storage_Unit
4915 function Component_Alignment (Id : E) return C is
4916 BT : constant Node_Id := Base_Type (Id);
4919 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
4921 if Flag128 (BT) then
4922 if Flag129 (BT) then
4923 return Calign_Storage_Unit;
4925 return Calign_Component_Size_4;
4929 if Flag129 (BT) then
4930 return Calign_Component_Size;
4932 return Calign_Default;
4935 end Component_Alignment;
4937 --------------------
4938 -- Constant_Value --
4939 --------------------
4941 function Constant_Value (Id : E) return N is
4942 D : constant Node_Id := Declaration_Node (Id);
4946 -- If we have no declaration node, then return no constant value.
4947 -- Not clear how this can happen, but it does sometimes ???
4948 -- To investigate, remove this check and compile discrim_po.adb.
4953 -- Normal case where a declaration node is present
4955 elsif Nkind (D) = N_Object_Renaming_Declaration then
4956 return Renamed_Object (Id);
4958 -- If this is a component declaration whose entity is constant, it
4959 -- is a prival within a protected function. It does not have
4960 -- a constant value.
4962 elsif Nkind (D) = N_Component_Declaration then
4965 -- If there is an expression, return it
4967 elsif Present (Expression (D)) then
4968 return (Expression (D));
4970 -- For a constant, see if we have a full view
4972 elsif Ekind (Id) = E_Constant
4973 and then Present (Full_View (Id))
4975 Full_D := Parent (Full_View (Id));
4977 -- The full view may have been rewritten as an object renaming
4979 if Nkind (Full_D) = N_Object_Renaming_Declaration then
4980 return Name (Full_D);
4982 return Expression (Full_D);
4985 -- Otherwise we have no expression to return
4992 ----------------------
4993 -- Declaration_Node --
4994 ----------------------
4996 function Declaration_Node (Id : E) return N is
5000 if Ekind (Id) = E_Incomplete_Type
5001 and then Present (Full_View (Id))
5003 P := Parent (Full_View (Id));
5009 if Nkind (P) /= N_Selected_Component
5010 and then Nkind (P) /= N_Expanded_Name
5012 not (Nkind (P) = N_Defining_Program_Unit_Name
5013 and then Is_Child_Unit (Id))
5021 end Declaration_Node;
5023 ---------------------
5024 -- Designated_Type --
5025 ---------------------
5027 function Designated_Type (Id : E) return E is
5031 Desig_Type := Directly_Designated_Type (Id);
5033 if Ekind (Desig_Type) = E_Incomplete_Type
5034 and then Present (Full_View (Desig_Type))
5036 return Full_View (Desig_Type);
5038 elsif Is_Class_Wide_Type (Desig_Type)
5039 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
5040 and then Present (Full_View (Etype (Desig_Type)))
5041 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
5043 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
5048 end Designated_Type;
5050 -----------------------------
5051 -- Enclosing_Dynamic_Scope --
5052 -----------------------------
5054 function Enclosing_Dynamic_Scope (Id : E) return E is
5058 -- The following test is an error defense against some syntax
5059 -- errors that can leave scopes very messed up.
5061 if Id = Standard_Standard then
5065 -- Normal case, search enclosing scopes
5068 while S /= Standard_Standard
5069 and then not Is_Dynamic_Scope (S)
5075 end Enclosing_Dynamic_Scope;
5077 ----------------------
5078 -- Entry_Index_Type --
5079 ----------------------
5081 function Entry_Index_Type (Id : E) return N is
5083 pragma Assert (Ekind (Id) = E_Entry_Family);
5084 return Etype (Discrete_Subtype_Definition (Parent (Id)));
5085 end Entry_Index_Type;
5087 ---------------------
5089 ---------------------
5091 function First_Component (Id : E) return E is
5096 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5098 Comp_Id := First_Entity (Id);
5099 while Present (Comp_Id) loop
5100 exit when Ekind (Comp_Id) = E_Component;
5101 Comp_Id := Next_Entity (Comp_Id);
5105 end First_Component;
5107 ------------------------
5108 -- First_Discriminant --
5109 ------------------------
5111 function First_Discriminant (Id : E) return E is
5116 (Has_Discriminants (Id)
5117 or else Has_Unknown_Discriminants (Id));
5119 Ent := First_Entity (Id);
5121 -- The discriminants are not necessarily contiguous, because access
5122 -- discriminants will generate itypes. They are not the first entities
5123 -- either, because tag and controller record must be ahead of them.
5125 if Chars (Ent) = Name_uTag then
5126 Ent := Next_Entity (Ent);
5129 if Chars (Ent) = Name_uController then
5130 Ent := Next_Entity (Ent);
5133 -- Skip all hidden stored discriminants if any
5135 while Present (Ent) loop
5136 exit when Ekind (Ent) = E_Discriminant
5137 and then not Is_Completely_Hidden (Ent);
5139 Ent := Next_Entity (Ent);
5142 pragma Assert (Ekind (Ent) = E_Discriminant);
5145 end First_Discriminant;
5151 function First_Formal (Id : E) return E is
5156 (Is_Overloadable (Id)
5157 or else Ekind (Id) = E_Entry_Family
5158 or else Ekind (Id) = E_Subprogram_Body
5159 or else Ekind (Id) = E_Subprogram_Type);
5161 if Ekind (Id) = E_Enumeration_Literal then
5165 Formal := First_Entity (Id);
5167 if Present (Formal) and then Is_Formal (Formal) then
5175 -------------------------------
5176 -- First_Stored_Discriminant --
5177 -------------------------------
5179 function First_Stored_Discriminant (Id : E) return E is
5182 function Has_Completely_Hidden_Discriminant (Id : E) return Boolean;
5183 -- Scans the Discriminants to see whether any are Completely_Hidden
5184 -- (the mechanism for describing non-specified stored discriminants)
5186 ----------------------------------------
5187 -- Has_Completely_Hidden_Discriminant --
5188 ----------------------------------------
5190 function Has_Completely_Hidden_Discriminant (Id : E) return Boolean is
5191 Ent : Entity_Id := Id;
5194 pragma Assert (Ekind (Id) = E_Discriminant);
5196 while Present (Ent) and then Ekind (Ent) = E_Discriminant loop
5197 if Is_Completely_Hidden (Ent) then
5201 Ent := Next_Entity (Ent);
5205 end Has_Completely_Hidden_Discriminant;
5207 -- Start of processing for First_Stored_Discriminant
5211 (Has_Discriminants (Id)
5212 or else Has_Unknown_Discriminants (Id));
5214 Ent := First_Entity (Id);
5216 if Chars (Ent) = Name_uTag then
5217 Ent := Next_Entity (Ent);
5220 if Chars (Ent) = Name_uController then
5221 Ent := Next_Entity (Ent);
5224 if Has_Completely_Hidden_Discriminant (Ent) then
5226 while Present (Ent) loop
5227 exit when Is_Completely_Hidden (Ent);
5228 Ent := Next_Entity (Ent);
5233 pragma Assert (Ekind (Ent) = E_Discriminant);
5236 end First_Stored_Discriminant;
5242 function First_Subtype (Id : E) return E is
5243 B : constant Entity_Id := Base_Type (Id);
5244 F : constant Node_Id := Freeze_Node (B);
5248 -- If the base type has no freeze node, it is a type in standard,
5249 -- and always acts as its own first subtype unless it is one of
5250 -- the predefined integer types. If the type is formal, it is also
5251 -- a first subtype, and its base type has no freeze node. On the other
5252 -- hand, a subtype of a generic formal is not its own first_subtype.
5253 -- Its base type, if anonymous, is attached to the formal type decl.
5254 -- from which the first subtype is obtained.
5258 if B = Base_Type (Standard_Integer) then
5259 return Standard_Integer;
5261 elsif B = Base_Type (Standard_Long_Integer) then
5262 return Standard_Long_Integer;
5264 elsif B = Base_Type (Standard_Short_Short_Integer) then
5265 return Standard_Short_Short_Integer;
5267 elsif B = Base_Type (Standard_Short_Integer) then
5268 return Standard_Short_Integer;
5270 elsif B = Base_Type (Standard_Long_Long_Integer) then
5271 return Standard_Long_Long_Integer;
5273 elsif Is_Generic_Type (Id) then
5274 if Present (Parent (B)) then
5275 return Defining_Identifier (Parent (B));
5277 return Defining_Identifier (Associated_Node_For_Itype (B));
5284 -- Otherwise we check the freeze node, if it has a First_Subtype_Link
5285 -- then we use that link, otherwise (happens with some Itypes), we use
5286 -- the base type itself.
5289 Ent := First_Subtype_Link (F);
5291 if Present (Ent) then
5299 -------------------------------------
5300 -- Get_Attribute_Definition_Clause --
5301 -------------------------------------
5303 function Get_Attribute_Definition_Clause
5305 Id : Attribute_Id) return Node_Id
5310 N := First_Rep_Item (E);
5311 while Present (N) loop
5312 if Nkind (N) = N_Attribute_Definition_Clause
5313 and then Get_Attribute_Id (Chars (N)) = Id
5322 end Get_Attribute_Definition_Clause;
5324 --------------------
5325 -- Get_Rep_Pragma --
5326 --------------------
5328 function Get_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Node_Id is
5332 N := First_Rep_Item (E);
5333 while Present (N) loop
5334 if Nkind (N) = N_Pragma and then Chars (N) = Nam then
5344 ------------------------
5345 -- Has_Attach_Handler --
5346 ------------------------
5348 function Has_Attach_Handler (Id : E) return B is
5352 pragma Assert (Is_Protected_Type (Id));
5354 Ritem := First_Rep_Item (Id);
5355 while Present (Ritem) loop
5356 if Nkind (Ritem) = N_Pragma
5357 and then Chars (Ritem) = Name_Attach_Handler
5361 Ritem := Next_Rep_Item (Ritem);
5366 end Has_Attach_Handler;
5368 -------------------------------------
5369 -- Has_Attribute_Definition_Clause --
5370 -------------------------------------
5372 function Has_Attribute_Definition_Clause
5374 Id : Attribute_Id) return Boolean
5377 return Present (Get_Attribute_Definition_Clause (E, Id));
5378 end Has_Attribute_Definition_Clause;
5384 function Has_Entries (Id : E) return B is
5385 Result : Boolean := False;
5389 pragma Assert (Is_Concurrent_Type (Id));
5391 Ent := First_Entity (Id);
5392 while Present (Ent) loop
5393 if Is_Entry (Ent) then
5398 Ent := Next_Entity (Ent);
5404 ----------------------------
5405 -- Has_Foreign_Convention --
5406 ----------------------------
5408 function Has_Foreign_Convention (Id : E) return B is
5410 return Convention (Id) >= Foreign_Convention'First;
5411 end Has_Foreign_Convention;
5413 ---------------------------
5414 -- Has_Interrupt_Handler --
5415 ---------------------------
5417 function Has_Interrupt_Handler (Id : E) return B is
5421 pragma Assert (Is_Protected_Type (Id));
5423 Ritem := First_Rep_Item (Id);
5424 while Present (Ritem) loop
5425 if Nkind (Ritem) = N_Pragma
5426 and then Chars (Ritem) = Name_Interrupt_Handler
5430 Ritem := Next_Rep_Item (Ritem);
5435 end Has_Interrupt_Handler;
5437 --------------------------
5438 -- Has_Private_Ancestor --
5439 --------------------------
5441 function Has_Private_Ancestor (Id : E) return B is
5442 R : constant Entity_Id := Root_Type (Id);
5443 T1 : Entity_Id := Id;
5447 if Is_Private_Type (T1) then
5457 end Has_Private_Ancestor;
5459 --------------------
5460 -- Has_Rep_Pragma --
5461 --------------------
5463 function Has_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Boolean is
5465 return Present (Get_Rep_Pragma (E, Nam));
5468 ------------------------------
5469 -- Implementation_Base_Type --
5470 ------------------------------
5472 function Implementation_Base_Type (Id : E) return E is
5477 Bastyp := Base_Type (Id);
5479 if Is_Incomplete_Or_Private_Type (Bastyp) then
5480 Imptyp := Underlying_Type (Bastyp);
5482 -- If we have an implementation type, then just return it,
5483 -- otherwise we return the Base_Type anyway. This can only
5484 -- happen in error situations and should avoid some error bombs.
5486 if Present (Imptyp) then
5487 return Base_Type (Imptyp);
5495 end Implementation_Base_Type;
5497 -----------------------
5498 -- Is_Always_Inlined --
5499 -----------------------
5501 function Is_Always_Inlined (Id : E) return B is
5505 Item := First_Rep_Item (Id);
5506 while Present (Item) loop
5507 if Nkind (Item) = N_Pragma
5508 and then Get_Pragma_Id (Chars (Item)) = Pragma_Inline_Always
5513 Next_Rep_Item (Item);
5517 end Is_Always_Inlined;
5519 ---------------------
5520 -- Is_Boolean_Type --
5521 ---------------------
5523 function Is_Boolean_Type (Id : E) return B is
5525 return Root_Type (Id) = Standard_Boolean;
5526 end Is_Boolean_Type;
5528 ---------------------
5529 -- Is_By_Copy_Type --
5530 ---------------------
5532 function Is_By_Copy_Type (Id : E) return B is
5534 -- If Id is a private type whose full declaration has not been seen,
5535 -- we assume for now that it is not a By_Copy type. Clearly this
5536 -- attribute should not be used before the type is frozen, but it is
5537 -- needed to build the associated record of a protected type. Another
5538 -- place where some lookahead for a full view is needed ???
5541 Is_Elementary_Type (Id)
5542 or else (Is_Private_Type (Id)
5543 and then Present (Underlying_Type (Id))
5544 and then Is_Elementary_Type (Underlying_Type (Id)));
5545 end Is_By_Copy_Type;
5547 --------------------------
5548 -- Is_By_Reference_Type --
5549 --------------------------
5551 function Is_By_Reference_Type (Id : E) return B is
5552 Btype : constant Entity_Id := Base_Type (Id);
5555 if Error_Posted (Id)
5556 or else Error_Posted (Btype)
5560 elsif Is_Private_Type (Btype) then
5562 Utyp : constant Entity_Id := Underlying_Type (Btype);
5568 return Is_By_Reference_Type (Utyp);
5572 elsif Is_Concurrent_Type (Btype) then
5575 elsif Is_Record_Type (Btype) then
5576 if Is_Limited_Record (Btype)
5577 or else Is_Tagged_Type (Btype)
5578 or else Is_Volatile (Btype)
5587 C := First_Component (Btype);
5588 while Present (C) loop
5589 if Is_By_Reference_Type (Etype (C))
5590 or else Is_Volatile (Etype (C))
5595 C := Next_Component (C);
5602 elsif Is_Array_Type (Btype) then
5605 or else Is_By_Reference_Type (Component_Type (Btype))
5606 or else Is_Volatile (Component_Type (Btype))
5607 or else Has_Volatile_Components (Btype);
5612 end Is_By_Reference_Type;
5614 ---------------------
5615 -- Is_Derived_Type --
5616 ---------------------
5618 function Is_Derived_Type (Id : E) return B is
5622 if Base_Type (Id) /= Root_Type (Id)
5623 and then not Is_Generic_Type (Id)
5624 and then not Is_Class_Wide_Type (Id)
5626 if not Is_Numeric_Type (Root_Type (Id)) then
5630 Par := Parent (First_Subtype (Id));
5632 return Present (Par)
5633 and then Nkind (Par) = N_Full_Type_Declaration
5634 and then Nkind (Type_Definition (Par))
5635 = N_Derived_Type_Definition;
5641 end Is_Derived_Type;
5643 ----------------------
5644 -- Is_Dynamic_Scope --
5645 ----------------------
5647 function Is_Dynamic_Scope (Id : E) return B is
5650 Ekind (Id) = E_Block
5652 Ekind (Id) = E_Function
5654 Ekind (Id) = E_Procedure
5656 Ekind (Id) = E_Subprogram_Body
5658 Ekind (Id) = E_Task_Type
5660 Ekind (Id) = E_Entry
5662 Ekind (Id) = E_Entry_Family;
5663 end Is_Dynamic_Scope;
5665 --------------------
5666 -- Is_Entity_Name --
5667 --------------------
5669 function Is_Entity_Name (N : Node_Id) return Boolean is
5670 Kind : constant Node_Kind := Nkind (N);
5673 -- Identifiers, operator symbols, expanded names are entity names
5675 return Kind = N_Identifier
5676 or else Kind = N_Operator_Symbol
5677 or else Kind = N_Expanded_Name
5679 -- Attribute references are entity names if they refer to an entity.
5680 -- Note that we don't do this by testing for the presence of the
5681 -- Entity field in the N_Attribute_Reference node, since it may not
5682 -- have been set yet.
5684 or else (Kind = N_Attribute_Reference
5685 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
5688 ---------------------------
5689 -- Is_Indefinite_Subtype --
5690 ---------------------------
5692 function Is_Indefinite_Subtype (Id : Entity_Id) return B is
5693 K : constant Entity_Kind := Ekind (Id);
5696 if Is_Constrained (Id) then
5699 elsif K in Array_Kind
5700 or else K in Class_Wide_Kind
5701 or else Has_Unknown_Discriminants (Id)
5705 -- Known discriminants: indefinite if there are no default values
5707 elsif K in Record_Kind
5708 or else Is_Incomplete_Or_Private_Type (Id)
5709 or else Is_Concurrent_Type (Id)
5711 return (Has_Discriminants (Id)
5712 and then No (Discriminant_Default_Value (First_Discriminant (Id))));
5717 end Is_Indefinite_Subtype;
5719 ---------------------
5720 -- Is_Limited_Type --
5721 ---------------------
5723 function Is_Limited_Type (Id : E) return B is
5724 Btype : constant E := Base_Type (Id);
5727 if not Is_Type (Id) then
5730 elsif Ekind (Btype) = E_Limited_Private_Type
5731 or else Is_Limited_Composite (Btype)
5735 elsif Is_Concurrent_Type (Btype) then
5738 -- Otherwise we will look around to see if there is some other reason
5739 -- for it to be limited, except that if an error was posted on the
5740 -- entity, then just assume it is non-limited, because it can cause
5741 -- trouble to recurse into a murky erroneous entity!
5743 elsif Error_Posted (Id) then
5746 elsif Is_Record_Type (Btype) then
5747 if Is_Limited_Record (Root_Type (Btype)) then
5750 elsif Is_Class_Wide_Type (Btype) then
5751 return Is_Limited_Type (Root_Type (Btype));
5758 C := First_Component (Btype);
5759 while Present (C) loop
5760 if Is_Limited_Type (Etype (C)) then
5764 C := Next_Component (C);
5771 elsif Is_Array_Type (Btype) then
5772 return Is_Limited_Type (Component_Type (Btype));
5777 end Is_Limited_Type;
5779 -----------------------------------
5780 -- Is_Package_Or_Generic_Package --
5781 -----------------------------------
5783 function Is_Package_Or_Generic_Package (Id : E) return B is
5786 Ekind (Id) = E_Package
5788 Ekind (Id) = E_Generic_Package;
5789 end Is_Package_Or_Generic_Package;
5791 --------------------------
5792 -- Is_Protected_Private --
5793 --------------------------
5795 function Is_Protected_Private (Id : E) return B is
5797 pragma Assert (Ekind (Id) = E_Component);
5798 return Is_Protected_Type (Scope (Id));
5799 end Is_Protected_Private;
5801 ------------------------------
5802 -- Is_Protected_Record_Type --
5803 ------------------------------
5805 function Is_Protected_Record_Type (Id : E) return B is
5808 Is_Concurrent_Record_Type (Id)
5809 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
5810 end Is_Protected_Record_Type;
5812 ---------------------------------
5813 -- Is_Return_By_Reference_Type --
5814 ---------------------------------
5816 function Is_Return_By_Reference_Type (Id : E) return B is
5817 Btype : constant Entity_Id := Base_Type (Id);
5820 if Is_Private_Type (Btype) then
5822 Utyp : constant Entity_Id := Underlying_Type (Btype);
5828 return Is_Return_By_Reference_Type (Utyp);
5832 elsif Is_Concurrent_Type (Btype) then
5835 elsif Is_Record_Type (Btype) then
5836 if Is_Limited_Record (Btype) then
5839 elsif Is_Class_Wide_Type (Btype) then
5840 return Is_Return_By_Reference_Type (Root_Type (Btype));
5847 C := First_Component (Btype);
5848 while Present (C) loop
5849 if Is_Return_By_Reference_Type (Etype (C)) then
5853 C := Next_Component (C);
5860 elsif Is_Array_Type (Btype) then
5861 return Is_Return_By_Reference_Type (Component_Type (Btype));
5866 end Is_Return_By_Reference_Type;
5868 --------------------
5869 -- Is_String_Type --
5870 --------------------
5872 function Is_String_Type (Id : E) return B is
5874 return Ekind (Id) in String_Kind
5875 or else (Is_Array_Type (Id)
5876 and then Number_Dimensions (Id) = 1
5877 and then Is_Character_Type (Component_Type (Id)));
5880 -------------------------
5881 -- Is_Task_Record_Type --
5882 -------------------------
5884 function Is_Task_Record_Type (Id : E) return B is
5887 Is_Concurrent_Record_Type (Id)
5888 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
5889 end Is_Task_Record_Type;
5891 ------------------------
5892 -- Is_Wrapper_Package --
5893 ------------------------
5895 function Is_Wrapper_Package (Id : E) return B is
5897 return (Ekind (Id) = E_Package
5898 and then Present (Related_Instance (Id)));
5899 end Is_Wrapper_Package;
5901 --------------------
5902 -- Next_Component --
5903 --------------------
5905 function Next_Component (Id : E) return E is
5909 Comp_Id := Next_Entity (Id);
5910 while Present (Comp_Id) loop
5911 exit when Ekind (Comp_Id) = E_Component;
5912 Comp_Id := Next_Entity (Comp_Id);
5918 -----------------------
5919 -- Next_Discriminant --
5920 -----------------------
5922 -- This function actually implements both Next_Discriminant and
5923 -- Next_Stored_Discriminant by making sure that the Discriminant
5924 -- returned is of the same variety as Id.
5926 function Next_Discriminant (Id : E) return E is
5928 -- Derived Tagged types with private extensions look like this...
5930 -- E_Discriminant d1
5931 -- E_Discriminant d2
5933 -- E_Discriminant d1
5934 -- E_Discriminant d2
5937 -- so it is critical not to go past the leading discriminants
5942 pragma Assert (Ekind (Id) = E_Discriminant);
5945 D := Next_Entity (D);
5947 or else (Ekind (D) /= E_Discriminant
5948 and then not Is_Itype (D))
5953 exit when Ekind (D) = E_Discriminant
5954 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
5958 end Next_Discriminant;
5964 function Next_Formal (Id : E) return E is
5968 -- Follow the chain of declared entities as long as the kind of
5969 -- the entity corresponds to a formal parameter. Skip internal
5970 -- entities that may have been created for implicit subtypes,
5971 -- in the process of analyzing default expressions.
5976 P := Next_Entity (P);
5978 if No (P) or else Is_Formal (P) then
5980 elsif not Is_Internal (P) then
5986 -----------------------------
5987 -- Next_Formal_With_Extras --
5988 -----------------------------
5990 function Next_Formal_With_Extras (Id : E) return E is
5992 if Present (Extra_Formal (Id)) then
5993 return Extra_Formal (Id);
5995 return Next_Formal (Id);
5997 end Next_Formal_With_Extras;
6003 function Next_Index (Id : Node_Id) return Node_Id is
6012 function Next_Literal (Id : E) return E is
6014 pragma Assert (Nkind (Id) in N_Entity);
6018 ------------------------------
6019 -- Next_Stored_Discriminant --
6020 ------------------------------
6022 function Next_Stored_Discriminant (Id : E) return E is
6024 -- See comment in Next_Discriminant
6026 return Next_Discriminant (Id);
6027 end Next_Stored_Discriminant;
6029 -----------------------
6030 -- Number_Dimensions --
6031 -----------------------
6033 function Number_Dimensions (Id : E) return Pos is
6038 if Ekind (Id) in String_Kind then
6043 T := First_Index (Id);
6044 while Present (T) loop
6051 end Number_Dimensions;
6053 --------------------------
6054 -- Number_Discriminants --
6055 --------------------------
6057 function Number_Discriminants (Id : E) return Pos is
6063 Discr := First_Discriminant (Id);
6064 while Present (Discr) loop
6066 Discr := Next_Discriminant (Discr);
6070 end Number_Discriminants;
6072 --------------------
6073 -- Number_Entries --
6074 --------------------
6076 function Number_Entries (Id : E) return Nat is
6081 pragma Assert (Is_Concurrent_Type (Id));
6084 Ent := First_Entity (Id);
6085 while Present (Ent) loop
6086 if Is_Entry (Ent) then
6090 Ent := Next_Entity (Ent);
6096 --------------------
6097 -- Number_Formals --
6098 --------------------
6100 function Number_Formals (Id : E) return Pos is
6106 Formal := First_Formal (Id);
6107 while Present (Formal) loop
6109 Formal := Next_Formal (Formal);
6115 --------------------
6116 -- Parameter_Mode --
6117 --------------------
6119 function Parameter_Mode (Id : E) return Formal_Kind is
6124 ---------------------
6125 -- Record_Rep_Item --
6126 ---------------------
6128 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
6130 Set_Next_Rep_Item (N, First_Rep_Item (E));
6131 Set_First_Rep_Item (E, N);
6132 end Record_Rep_Item;
6138 function Root_Type (Id : E) return E is
6142 pragma Assert (Nkind (Id) in N_Entity);
6144 T := Base_Type (Id);
6146 if Ekind (T) = E_Class_Wide_Type then
6158 -- Following test catches some error cases resulting from
6161 elsif No (Etyp) then
6164 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
6167 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
6173 -- Return if there is a circularity in the inheritance chain.
6174 -- This happens in some error situations and we do not want
6175 -- to get stuck in this loop.
6177 if T = Base_Type (Id) then
6183 raise Program_Error;
6190 function Scope_Depth (Id : E) return Uint is
6195 while Is_Record_Type (Scop) loop
6196 Scop := Scope (Scop);
6199 return Scope_Depth_Value (Scop);
6202 ---------------------
6203 -- Scope_Depth_Set --
6204 ---------------------
6206 function Scope_Depth_Set (Id : E) return B is
6208 return not Is_Record_Type (Id)
6209 and then Field22 (Id) /= Union_Id (Empty);
6210 end Scope_Depth_Set;
6212 -----------------------------
6213 -- Set_Component_Alignment --
6214 -----------------------------
6216 -- Component Alignment is encoded using two flags, Flag128/129 as
6217 -- follows. Note that both flags False = Align_Default, so that the
6218 -- default initialization of flags to False initializes component
6219 -- alignment to the default value as required.
6221 -- Flag128 Flag129 Value
6222 -- ------- ------- -----
6223 -- False False Calign_Default
6224 -- False True Calign_Component_Size
6225 -- True False Calign_Component_Size_4
6226 -- True True Calign_Storage_Unit
6228 procedure Set_Component_Alignment (Id : E; V : C) is
6230 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
6231 and then Id = Base_Type (Id));
6234 when Calign_Default =>
6235 Set_Flag128 (Id, False);
6236 Set_Flag129 (Id, False);
6238 when Calign_Component_Size =>
6239 Set_Flag128 (Id, False);
6240 Set_Flag129 (Id, True);
6242 when Calign_Component_Size_4 =>
6243 Set_Flag128 (Id, True);
6244 Set_Flag129 (Id, False);
6246 when Calign_Storage_Unit =>
6247 Set_Flag128 (Id, True);
6248 Set_Flag129 (Id, True);
6250 end Set_Component_Alignment;
6256 function Size_Clause (Id : E) return N is
6258 return Rep_Clause (Id, Name_Size);
6261 ------------------------
6262 -- Stream_Size_Clause --
6263 ------------------------
6265 function Stream_Size_Clause (Id : E) return N is
6267 return Rep_Clause (Id, Name_Stream_Size);
6268 end Stream_Size_Clause;
6274 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
6280 Kind := E_Access_Subtype;
6284 Kind := E_Array_Subtype;
6286 when E_Class_Wide_Type |
6287 E_Class_Wide_Subtype =>
6288 Kind := E_Class_Wide_Subtype;
6290 when E_Decimal_Fixed_Point_Type |
6291 E_Decimal_Fixed_Point_Subtype =>
6292 Kind := E_Decimal_Fixed_Point_Subtype;
6294 when E_Ordinary_Fixed_Point_Type |
6295 E_Ordinary_Fixed_Point_Subtype =>
6296 Kind := E_Ordinary_Fixed_Point_Subtype;
6298 when E_Private_Type |
6299 E_Private_Subtype =>
6300 Kind := E_Private_Subtype;
6302 when E_Limited_Private_Type |
6303 E_Limited_Private_Subtype =>
6304 Kind := E_Limited_Private_Subtype;
6306 when E_Record_Type_With_Private |
6307 E_Record_Subtype_With_Private =>
6308 Kind := E_Record_Subtype_With_Private;
6310 when E_Record_Type |
6312 Kind := E_Record_Subtype;
6314 when E_String_Type |
6316 Kind := E_String_Subtype;
6318 when Enumeration_Kind =>
6319 Kind := E_Enumeration_Subtype;
6322 Kind := E_Floating_Point_Subtype;
6324 when Signed_Integer_Kind =>
6325 Kind := E_Signed_Integer_Subtype;
6327 when Modular_Integer_Kind =>
6328 Kind := E_Modular_Integer_Subtype;
6330 when Protected_Kind =>
6331 Kind := E_Protected_Subtype;
6334 Kind := E_Task_Subtype;
6338 raise Program_Error;
6344 -------------------------
6345 -- First_Tag_Component --
6346 -------------------------
6348 function First_Tag_Component (Id : E) return E is
6350 Typ : Entity_Id := Id;
6353 pragma Assert (Is_Tagged_Type (Typ));
6355 if Is_Class_Wide_Type (Typ) then
6356 Typ := Root_Type (Typ);
6359 if Is_Private_Type (Typ) then
6360 Typ := Underlying_Type (Typ);
6363 Comp := First_Entity (Typ);
6364 while Present (Comp) loop
6365 if Is_Tag (Comp) then
6369 Comp := Next_Entity (Comp);
6372 -- No tag component found
6375 end First_Tag_Component;
6377 ------------------------
6378 -- Next_Tag_Component --
6379 ------------------------
6381 function Next_Tag_Component (Id : E) return E is
6383 Typ : constant Entity_Id := Scope (Id);
6386 pragma Assert (Ekind (Id) = E_Component
6387 and then Is_Tagged_Type (Typ));
6389 Comp := Next_Entity (Id);
6390 while Present (Comp) loop
6391 if Is_Tag (Comp) then
6392 pragma Assert (Chars (Comp) /= Name_uTag);
6396 Comp := Next_Entity (Comp);
6399 -- No tag component found
6402 end Next_Tag_Component;
6404 ---------------------
6405 -- Type_High_Bound --
6406 ---------------------
6408 function Type_High_Bound (Id : E) return Node_Id is
6410 if Nkind (Scalar_Range (Id)) = N_Subtype_Indication then
6411 return High_Bound (Range_Expression (Constraint (Scalar_Range (Id))));
6413 return High_Bound (Scalar_Range (Id));
6415 end Type_High_Bound;
6417 --------------------
6418 -- Type_Low_Bound --
6419 --------------------
6421 function Type_Low_Bound (Id : E) return Node_Id is
6423 if Nkind (Scalar_Range (Id)) = N_Subtype_Indication then
6424 return Low_Bound (Range_Expression (Constraint (Scalar_Range (Id))));
6426 return Low_Bound (Scalar_Range (Id));
6430 ---------------------
6431 -- Underlying_Type --
6432 ---------------------
6434 function Underlying_Type (Id : E) return E is
6436 -- For record_with_private the underlying type is always the direct
6437 -- full view. Never try to take the full view of the parent it
6438 -- doesn't make sense.
6440 if Ekind (Id) = E_Record_Type_With_Private then
6441 return Full_View (Id);
6443 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
6445 -- If we have an incomplete or private type with a full view,
6446 -- then we return the Underlying_Type of this full view
6448 if Present (Full_View (Id)) then
6449 if Id = Full_View (Id) then
6451 -- Previous error in declaration
6456 return Underlying_Type (Full_View (Id));
6459 -- If we have an incomplete entity that comes from the limited
6460 -- view then we return the Underlying_Type of its non-limited
6463 elsif From_With_Type (Id)
6464 and then Present (Non_Limited_View (Id))
6466 return Underlying_Type (Non_Limited_View (Id));
6468 -- Otherwise check for the case where we have a derived type or
6469 -- subtype, and if so get the Underlying_Type of the parent type.
6471 elsif Etype (Id) /= Id then
6472 return Underlying_Type (Etype (Id));
6474 -- Otherwise we have an incomplete or private type that has
6475 -- no full view, which means that we have not encountered the
6476 -- completion, so return Empty to indicate the underlying type
6477 -- is not yet known.
6483 -- For non-incomplete, non-private types, return the type itself
6484 -- Also for entities that are not types at all return the entity
6490 end Underlying_Type;
6492 ------------------------
6493 -- Write_Entity_Flags --
6494 ------------------------
6496 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
6498 procedure W (Flag_Name : String; Flag : Boolean);
6499 -- Write out given flag if it is set
6505 procedure W (Flag_Name : String; Flag : Boolean) is
6509 Write_Str (Flag_Name);
6510 Write_Str (" = True");
6515 -- Start of processing for Write_Entity_Flags
6518 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
6519 and then Base_Type (Id) = Id
6522 Write_Str ("Component_Alignment = ");
6524 case Component_Alignment (Id) is
6525 when Calign_Default =>
6526 Write_Str ("Calign_Default");
6528 when Calign_Component_Size =>
6529 Write_Str ("Calign_Component_Size");
6531 when Calign_Component_Size_4 =>
6532 Write_Str ("Calign_Component_Size_4");
6534 when Calign_Storage_Unit =>
6535 Write_Str ("Calign_Storage_Unit");
6541 W ("Address_Taken", Flag104 (Id));
6542 W ("Body_Needed_For_SAL", Flag40 (Id));
6543 W ("C_Pass_By_Copy", Flag125 (Id));
6544 W ("Can_Never_Be_Null", Flag38 (Id));
6545 W ("Checks_May_Be_Suppressed", Flag31 (Id));
6546 W ("Debug_Info_Off", Flag166 (Id));
6547 W ("Default_Expressions_Processed", Flag108 (Id));
6548 W ("Delay_Cleanups", Flag114 (Id));
6549 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
6550 W ("Depends_On_Private", Flag14 (Id));
6551 W ("Discard_Names", Flag88 (Id));
6552 W ("Elaboration_Entity_Required", Flag174 (Id));
6553 W ("Entry_Accepted", Flag152 (Id));
6554 W ("Finalize_Storage_Only", Flag158 (Id));
6555 W ("From_With_Type", Flag159 (Id));
6556 W ("Function_Returns_With_DSP", Flag169 (Id));
6557 W ("Has_Aliased_Components", Flag135 (Id));
6558 W ("Has_Alignment_Clause", Flag46 (Id));
6559 W ("Has_All_Calls_Remote", Flag79 (Id));
6560 W ("Has_Anon_Block_Suffix", Flag201 (Id));
6561 W ("Has_Atomic_Components", Flag86 (Id));
6562 W ("Has_Biased_Representation", Flag139 (Id));
6563 W ("Has_Completion", Flag26 (Id));
6564 W ("Has_Completion_In_Body", Flag71 (Id));
6565 W ("Has_Complex_Representation", Flag140 (Id));
6566 W ("Has_Component_Size_Clause", Flag68 (Id));
6567 W ("Has_Contiguous_Rep", Flag181 (Id));
6568 W ("Has_Controlled_Component", Flag43 (Id));
6569 W ("Has_Controlling_Result", Flag98 (Id));
6570 W ("Has_Convention_Pragma", Flag119 (Id));
6571 W ("Has_Delayed_Freeze", Flag18 (Id));
6572 W ("Has_Discriminants", Flag5 (Id));
6573 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
6574 W ("Has_Exit", Flag47 (Id));
6575 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
6576 W ("Has_Forward_Instantiation", Flag175 (Id));
6577 W ("Has_Fully_Qualified_Name", Flag173 (Id));
6578 W ("Has_Gigi_Rep_Item", Flag82 (Id));
6579 W ("Has_Homonym", Flag56 (Id));
6580 W ("Has_Machine_Radix_Clause", Flag83 (Id));
6581 W ("Has_Master_Entity", Flag21 (Id));
6582 W ("Has_Missing_Return", Flag142 (Id));
6583 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
6584 W ("Has_Non_Standard_Rep", Flag75 (Id));
6585 W ("Has_Object_Size_Clause", Flag172 (Id));
6586 W ("Has_Per_Object_Constraint", Flag154 (Id));
6587 W ("Has_Persistent_BSS", Flag188 (Id));
6588 W ("Has_Pragma_Controlled", Flag27 (Id));
6589 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
6590 W ("Has_Pragma_Inline", Flag157 (Id));
6591 W ("Has_Pragma_Pack", Flag121 (Id));
6592 W ("Has_Pragma_Pure_Function", Flag179 (Id));
6593 W ("Has_Pragma_Unreferenced", Flag180 (Id));
6594 W ("Has_Primitive_Operations", Flag120 (Id));
6595 W ("Has_Private_Declaration", Flag155 (Id));
6596 W ("Has_Qualified_Name", Flag161 (Id));
6597 W ("Has_Record_Rep_Clause", Flag65 (Id));
6598 W ("Has_Recursive_Call", Flag143 (Id));
6599 W ("Has_Size_Clause", Flag29 (Id));
6600 W ("Has_Small_Clause", Flag67 (Id));
6601 W ("Has_Specified_Layout", Flag100 (Id));
6602 W ("Has_Specified_Stream_Input", Flag190 (Id));
6603 W ("Has_Specified_Stream_Output", Flag191 (Id));
6604 W ("Has_Specified_Stream_Read", Flag192 (Id));
6605 W ("Has_Specified_Stream_Write", Flag193 (Id));
6606 W ("Has_Storage_Size_Clause", Flag23 (Id));
6607 W ("Has_Stream_Size_Clause", Flag184 (Id));
6608 W ("Has_Subprogram_Descriptor", Flag93 (Id));
6609 W ("Has_Task", Flag30 (Id));
6610 W ("Has_Unchecked_Union", Flag123 (Id));
6611 W ("Has_Unknown_Discriminants", Flag72 (Id));
6612 W ("Has_Volatile_Components", Flag87 (Id));
6613 W ("Has_Xref_Entry", Flag182 (Id));
6614 W ("In_Package_Body", Flag48 (Id));
6615 W ("In_Private_Part", Flag45 (Id));
6616 W ("In_Use", Flag8 (Id));
6617 W ("Is_AST_Entry", Flag132 (Id));
6618 W ("Is_Abstract", Flag19 (Id));
6619 W ("Is_Local_Anonymous_Access", Flag194 (Id));
6620 W ("Is_Access_Constant", Flag69 (Id));
6621 W ("Is_Ada_2005", Flag185 (Id));
6622 W ("Is_Aliased", Flag15 (Id));
6623 W ("Is_Asynchronous", Flag81 (Id));
6624 W ("Is_Atomic", Flag85 (Id));
6625 W ("Is_Bit_Packed_Array", Flag122 (Id));
6626 W ("Is_CPP_Class", Flag74 (Id));
6627 W ("Is_Called", Flag102 (Id));
6628 W ("Is_Character_Type", Flag63 (Id));
6629 W ("Is_Child_Unit", Flag73 (Id));
6630 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
6631 W ("Is_Compilation_Unit", Flag149 (Id));
6632 W ("Is_Completely_Hidden", Flag103 (Id));
6633 W ("Is_Concurrent_Record_Type", Flag20 (Id));
6634 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
6635 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
6636 W ("Is_Constrained", Flag12 (Id));
6637 W ("Is_Constructor", Flag76 (Id));
6638 W ("Is_Controlled", Flag42 (Id));
6639 W ("Is_Controlling_Formal", Flag97 (Id));
6640 W ("Is_Discrim_SO_Function", Flag176 (Id));
6641 W ("Is_Dispatching_Operation", Flag6 (Id));
6642 W ("Is_Eliminated", Flag124 (Id));
6643 W ("Is_Entry_Formal", Flag52 (Id));
6644 W ("Is_Exported", Flag99 (Id));
6645 W ("Is_First_Subtype", Flag70 (Id));
6646 W ("Is_For_Access_Subtype", Flag118 (Id));
6647 W ("Is_Formal_Subprogram", Flag111 (Id));
6648 W ("Is_Frozen", Flag4 (Id));
6649 W ("Is_Generic_Actual_Type", Flag94 (Id));
6650 W ("Is_Generic_Instance", Flag130 (Id));
6651 W ("Is_Generic_Type", Flag13 (Id));
6652 W ("Is_Hidden", Flag57 (Id));
6653 W ("Is_Hidden_Open_Scope", Flag171 (Id));
6654 W ("Is_Immediately_Visible", Flag7 (Id));
6655 W ("Is_Imported", Flag24 (Id));
6656 W ("Is_Inlined", Flag11 (Id));
6657 W ("Is_Instantiated", Flag126 (Id));
6658 W ("Is_Interface", Flag186 (Id));
6659 W ("Is_Internal", Flag17 (Id));
6660 W ("Is_Interrupt_Handler", Flag89 (Id));
6661 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
6662 W ("Is_Itype", Flag91 (Id));
6663 W ("Is_Known_Valid", Flag37 (Id));
6664 W ("Is_Known_Valid", Flag170 (Id));
6665 W ("Is_Limited_Composite", Flag106 (Id));
6666 W ("Is_Limited_Interface", Flag197 (Id));
6667 W ("Is_Limited_Record", Flag25 (Id));
6668 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
6669 W ("Is_Non_Static_Subtype", Flag109 (Id));
6670 W ("Is_Null_Init_Proc", Flag178 (Id));
6671 W ("Is_Obsolescent", Flag153 (Id));
6672 W ("Is_Optional_Parameter", Flag134 (Id));
6673 W ("Is_Overriding_Operation", Flag39 (Id));
6674 W ("Is_Package_Body_Entity", Flag160 (Id));
6675 W ("Is_Packed", Flag51 (Id));
6676 W ("Is_Packed_Array_Type", Flag138 (Id));
6677 W ("Is_Potentially_Use_Visible", Flag9 (Id));
6678 W ("Is_Preelaborated", Flag59 (Id));
6679 W ("Is_Primitive_Wrapper", Flag195 (Id));
6680 W ("Is_Private_Composite", Flag107 (Id));
6681 W ("Is_Private_Descendant", Flag53 (Id));
6682 W ("Is_Protected_Interface", Flag198 (Id));
6683 W ("Is_Public", Flag10 (Id));
6684 W ("Is_Pure", Flag44 (Id));
6685 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
6686 W ("Is_Remote_Call_Interface", Flag62 (Id));
6687 W ("Is_Remote_Types", Flag61 (Id));
6688 W ("Is_Renaming_Of_Object", Flag112 (Id));
6689 W ("Is_Shared_Passive", Flag60 (Id));
6690 W ("Is_Synchronized_Interface", Flag199 (Id));
6691 W ("Is_Statically_Allocated", Flag28 (Id));
6692 W ("Is_Tag", Flag78 (Id));
6693 W ("Is_Tagged_Type", Flag55 (Id));
6694 W ("Is_Task_Interface", Flag200 (Id));
6695 W ("Is_Thread_Body", Flag77 (Id));
6696 W ("Is_True_Constant", Flag163 (Id));
6697 W ("Is_Unchecked_Union", Flag117 (Id));
6698 W ("Is_Unsigned_Type", Flag144 (Id));
6699 W ("Is_VMS_Exception", Flag133 (Id));
6700 W ("Is_Valued_Procedure", Flag127 (Id));
6701 W ("Is_Visible_Child_Unit", Flag116 (Id));
6702 W ("Is_Volatile", Flag16 (Id));
6703 W ("Kill_Elaboration_Checks", Flag32 (Id));
6704 W ("Kill_Range_Checks", Flag33 (Id));
6705 W ("Kill_Tag_Checks", Flag34 (Id));
6706 W ("Machine_Radix_10", Flag84 (Id));
6707 W ("Materialize_Entity", Flag168 (Id));
6708 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
6709 W ("Needs_Debug_Info", Flag147 (Id));
6710 W ("Needs_No_Actuals", Flag22 (Id));
6711 W ("Never_Set_In_Source", Flag115 (Id));
6712 W ("No_Pool_Assigned", Flag131 (Id));
6713 W ("No_Return", Flag113 (Id));
6714 W ("No_Strict_Aliasing", Flag136 (Id));
6715 W ("Non_Binary_Modulus", Flag58 (Id));
6716 W ("Nonzero_Is_True", Flag162 (Id));
6717 W ("Reachable", Flag49 (Id));
6718 W ("Referenced", Flag156 (Id));
6719 W ("Referenced_As_LHS", Flag36 (Id));
6720 W ("Return_Present", Flag54 (Id));
6721 W ("Returns_By_Ref", Flag90 (Id));
6722 W ("Reverse_Bit_Order", Flag164 (Id));
6723 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
6724 W ("Size_Depends_On_Discriminant", Flag177 (Id));
6725 W ("Size_Known_At_Compile_Time", Flag92 (Id));
6726 W ("Strict_Alignment", Flag145 (Id));
6727 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
6728 W ("Suppress_Init_Proc", Flag105 (Id));
6729 W ("Suppress_Style_Checks", Flag165 (Id));
6730 W ("Treat_As_Volatile", Flag41 (Id));
6731 W ("Uses_Sec_Stack", Flag95 (Id));
6732 W ("Vax_Float", Flag151 (Id));
6733 W ("Warnings_Off", Flag96 (Id));
6734 W ("Was_Hidden", Flag196 (Id));
6735 end Write_Entity_Flags;
6737 -----------------------
6738 -- Write_Entity_Info --
6739 -----------------------
6741 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
6743 procedure Write_Attribute (Which : String; Nam : E);
6744 -- Write attribute value with given string name
6746 procedure Write_Kind (Id : Entity_Id);
6747 -- Write Ekind field of entity
6749 procedure Write_Attribute (Which : String; Nam : E) is
6753 Write_Int (Int (Nam));
6755 Write_Name (Chars (Nam));
6757 end Write_Attribute;
6759 procedure Write_Kind (Id : Entity_Id) is
6760 K : constant String := Entity_Kind'Image (Ekind (Id));
6764 Write_Str (" Kind ");
6766 if Is_Type (Id) and then Is_Tagged_Type (Id) then
6767 Write_Str ("TAGGED ");
6770 Write_Str (K (3 .. K'Length));
6773 if Is_Type (Id) and then Depends_On_Private (Id) then
6774 Write_Str ("Depends_On_Private ");
6778 -- Start of processing for Write_Entity_Info
6782 Write_Attribute ("Name ", Id);
6783 Write_Int (Int (Id));
6787 Write_Attribute (" Type ", Etype (Id));
6789 Write_Attribute (" Scope ", Scope (Id));
6794 when Discrete_Kind =>
6795 Write_Str ("Bounds: Id = ");
6797 if Present (Scalar_Range (Id)) then
6798 Write_Int (Int (Type_Low_Bound (Id)));
6799 Write_Str (" .. Id = ");
6800 Write_Int (Int (Type_High_Bound (Id)));
6802 Write_Str ("Empty");
6813 (" Component Type ", Component_Type (Id));
6816 Write_Str (" Indices ");
6818 Index := First_Index (Id);
6819 while Present (Index) loop
6820 Write_Attribute (" ", Etype (Index));
6821 Index := Next_Index (Index);
6829 (" Directly Designated Type ",
6830 Directly_Designated_Type (Id));
6833 when Overloadable_Kind =>
6834 if Present (Homonym (Id)) then
6835 Write_Str (" Homonym ");
6836 Write_Name (Chars (Homonym (Id)));
6838 Write_Int (Int (Homonym (Id)));
6845 if Ekind (Scope (Id)) in Record_Kind then
6847 " Original_Record_Component ",
6848 Original_Record_Component (Id));
6849 Write_Int (Int (Original_Record_Component (Id)));
6853 when others => null;
6855 end Write_Entity_Info;
6857 -----------------------
6858 -- Write_Field6_Name --
6859 -----------------------
6861 procedure Write_Field6_Name (Id : Entity_Id) is
6862 pragma Warnings (Off, Id);
6865 Write_Str ("First_Rep_Item");
6866 end Write_Field6_Name;
6868 -----------------------
6869 -- Write_Field7_Name --
6870 -----------------------
6872 procedure Write_Field7_Name (Id : Entity_Id) is
6873 pragma Warnings (Off, Id);
6876 Write_Str ("Freeze_Node");
6877 end Write_Field7_Name;
6879 -----------------------
6880 -- Write_Field8_Name --
6881 -----------------------
6883 procedure Write_Field8_Name (Id : Entity_Id) is
6888 Write_Str ("Normalized_First_Bit");
6892 E_Subprogram_Body =>
6893 Write_Str ("Mechanism");
6896 Write_Str ("Associated_Node_For_Itype");
6899 Write_Str ("Dependent_Instances");
6902 Write_Str ("Hiding_Loop_Variable");
6905 Write_Str ("Field8??");
6907 end Write_Field8_Name;
6909 -----------------------
6910 -- Write_Field9_Name --
6911 -----------------------
6913 procedure Write_Field9_Name (Id : Entity_Id) is
6917 Write_Str ("Class_Wide_Type");
6920 E_Generic_Function |
6922 E_Generic_Procedure |
6925 Write_Str ("Renaming_Map");
6928 Write_Str ("Current_Value");
6931 Write_Str ("Field9??");
6933 end Write_Field9_Name;
6935 ------------------------
6936 -- Write_Field10_Name --
6937 ------------------------
6939 procedure Write_Field10_Name (Id : Entity_Id) is
6943 Write_Str ("Referenced_Object");
6945 when E_In_Parameter |
6947 Write_Str ("Discriminal_Link");
6953 Write_Str ("Handler_Records");
6957 Write_Str ("Normalized_Position_Max");
6960 Write_Str ("Field10??");
6962 end Write_Field10_Name;
6964 ------------------------
6965 -- Write_Field11_Name --
6966 ------------------------
6968 procedure Write_Field11_Name (Id : Entity_Id) is
6972 Write_Str ("Entry_Component");
6976 Write_Str ("Component_Bit_Offset");
6979 Write_Str ("Full_View");
6981 when E_Enumeration_Literal =>
6982 Write_Str ("Enumeration_Pos");
6985 Write_Str ("Block_Node");
6991 Write_Str ("Protected_Body_Subprogram");
6993 when E_Generic_Package =>
6994 Write_Str ("Generic_Homonym");
6997 Write_Str ("Full_View");
7000 Write_Str ("Field11??");
7002 end Write_Field11_Name;
7004 ------------------------
7005 -- Write_Field12_Name --
7006 ------------------------
7008 procedure Write_Field12_Name (Id : Entity_Id) is
7012 Write_Str ("Barrier_Function");
7014 when E_Enumeration_Literal =>
7015 Write_Str ("Enumeration_Rep");
7022 E_In_Out_Parameter |
7026 Write_Str ("Esize");
7030 Write_Str ("Next_Inlined_Subprogram");
7033 Write_Str ("Associated_Formal_Package");
7036 Write_Str ("Field12??");
7038 end Write_Field12_Name;
7040 ------------------------
7041 -- Write_Field13_Name --
7042 ------------------------
7044 procedure Write_Field13_Name (Id : Entity_Id) is
7048 Write_Str ("RM_Size");
7052 Write_Str ("Component_Clause");
7054 when E_Enumeration_Literal =>
7055 Write_Str ("Debug_Renaming_Link");
7058 if not Comes_From_Source (Id)
7060 Chars (Id) = Name_Op_Ne
7062 Write_Str ("Corresponding_Equality");
7064 elsif Comes_From_Source (Id) then
7065 Write_Str ("Elaboration_Entity");
7068 Write_Str ("Field13??");
7073 Write_Str ("Extra_Accessibility");
7077 Generic_Unit_Kind =>
7078 Write_Str ("Elaboration_Entity");
7081 Write_Str ("Field13??");
7083 end Write_Field13_Name;
7085 -----------------------
7086 -- Write_Field14_Name --
7087 -----------------------
7089 procedure Write_Field14_Name (Id : Entity_Id) is
7097 Write_Str ("Alignment");
7101 Write_Str ("Normalized_Position");
7105 Write_Str ("First_Optional_Parameter");
7108 E_Generic_Package =>
7109 Write_Str ("Shadow_Entities");
7112 Write_Str ("Field14??");
7114 end Write_Field14_Name;
7116 ------------------------
7117 -- Write_Field15_Name --
7118 ------------------------
7120 procedure Write_Field15_Name (Id : Entity_Id) is
7125 Write_Str ("Storage_Size_Variable");
7127 when Class_Wide_Kind |
7131 Write_Str ("Primitive_Operations");
7134 Write_Str ("DT_Entry_Count");
7136 when Decimal_Fixed_Point_Kind =>
7137 Write_Str ("Scale_Value");
7139 when E_Discriminant =>
7140 Write_Str ("Discriminant_Number");
7143 Write_Str ("Extra_Formal");
7147 Write_Str ("DT_Position");
7150 Write_Str ("Entry_Parameters_Type");
7152 when Enumeration_Kind =>
7153 Write_Str ("Lit_Indexes");
7157 Write_Str ("Related_Instance");
7159 when E_Protected_Type =>
7160 Write_Str ("Entry_Bodies_Array");
7162 when E_String_Literal_Subtype =>
7163 Write_Str ("String_Literal_Low_Bound");
7166 Write_Str ("Shared_Var_Read_Proc");
7169 Write_Str ("Field15??");
7171 end Write_Field15_Name;
7173 ------------------------
7174 -- Write_Field16_Name --
7175 ------------------------
7177 procedure Write_Field16_Name (Id : Entity_Id) is
7181 Write_Str ("Entry_Formal");
7185 Write_Str ("DTC_Entity");
7190 Write_Str ("First_Private_Entity");
7192 when E_Record_Type |
7193 E_Record_Type_With_Private =>
7194 Write_Str ("Access_Disp_Table");
7196 when E_String_Literal_Subtype =>
7197 Write_Str ("String_Literal_Length");
7199 when Enumeration_Kind =>
7200 Write_Str ("Lit_Strings");
7204 Write_Str ("Unset_Reference");
7206 when E_Record_Subtype |
7207 E_Class_Wide_Subtype =>
7208 Write_Str ("Cloned_Subtype");
7211 Write_Str ("Field16??");
7213 end Write_Field16_Name;
7215 ------------------------
7216 -- Write_Field17_Name --
7217 ------------------------
7219 procedure Write_Field17_Name (Id : Entity_Id) is
7223 Write_Str ("Digits_Value");
7226 Write_Str ("Prival");
7228 when E_Discriminant =>
7229 Write_Str ("Discriminal");
7238 E_Generic_Function |
7240 E_Generic_Procedure |
7249 E_Subprogram_Type =>
7250 Write_Str ("First_Entity");
7253 Write_Str ("First_Index");
7255 when E_Protected_Body =>
7256 Write_Str ("Object_Ref");
7258 when Enumeration_Kind =>
7259 Write_Str ("First_Literal");
7262 Write_Str ("Master_Id");
7264 when Modular_Integer_Kind =>
7265 Write_Str ("Modulus");
7269 E_Generic_In_Out_Parameter |
7271 Write_Str ("Actual_Subtype");
7273 when E_Incomplete_Type =>
7274 Write_Str ("Non-limited view");
7277 Write_Str ("Field17??");
7279 end Write_Field17_Name;
7281 -----------------------
7282 -- Write_Field18_Name --
7283 -----------------------
7285 procedure Write_Field18_Name (Id : Entity_Id) is
7288 when E_Enumeration_Literal |
7292 Write_Str ("Alias");
7294 when E_Record_Type =>
7295 Write_Str ("Corresponding_Concurrent_Type");
7297 when E_Entry_Index_Parameter =>
7298 Write_Str ("Entry_Index_Constant");
7300 when E_Class_Wide_Subtype |
7301 E_Access_Protected_Subprogram_Type |
7302 E_Access_Subprogram_Type |
7304 Write_Str ("Equivalent_Type");
7306 when Fixed_Point_Kind =>
7307 Write_Str ("Delta_Value");
7311 Write_Str ("Renamed_Object");
7315 E_Generic_Function |
7316 E_Generic_Procedure |
7317 E_Generic_Package =>
7318 Write_Str ("Renamed_Entity");
7320 when Incomplete_Or_Private_Kind =>
7321 Write_Str ("Private_Dependents");
7323 when Concurrent_Kind =>
7324 Write_Str ("Corresponding_Record_Type");
7329 Write_Str ("Enclosing_Scope");
7332 Write_Str ("Field18??");
7334 end Write_Field18_Name;
7336 -----------------------
7337 -- Write_Field19_Name --
7338 -----------------------
7340 procedure Write_Field19_Name (Id : Entity_Id) is
7345 Write_Str ("Related_Array_Object");
7352 Write_Str ("Finalization_Chain_Entity");
7354 when E_Constant | E_Variable =>
7355 Write_Str ("Size_Check_Code");
7357 when E_Discriminant =>
7358 Write_Str ("Corresponding_Discriminant");
7361 E_Generic_Package =>
7362 Write_Str ("Body_Entity");
7364 when E_Package_Body |
7366 Write_Str ("Spec_Entity");
7368 when Private_Kind =>
7369 Write_Str ("Underlying_Full_View");
7371 when E_Record_Type =>
7372 Write_Str ("Parent_Subtype");
7375 Write_Str ("Field19??");
7377 end Write_Field19_Name;
7379 -----------------------
7380 -- Write_Field20_Name --
7381 -----------------------
7383 procedure Write_Field20_Name (Id : Entity_Id) is
7387 Write_Str ("Component_Type");
7389 when E_In_Parameter |
7390 E_Generic_In_Parameter =>
7391 Write_Str ("Default_Value");
7394 Write_Str ("Directly_Designated_Type");
7397 Write_Str ("Discriminant_Checking_Func");
7399 when E_Discriminant =>
7400 Write_Str ("Discriminant_Default_Value");
7409 E_Generic_Function |
7411 E_Generic_Procedure |
7420 E_Subprogram_Type =>
7422 Write_Str ("Last_Entity");
7425 Write_Str ("Scalar_Range");
7428 Write_Str ("Register_Exception_Call");
7431 Write_Str ("Field20??");
7433 end Write_Field20_Name;
7435 -----------------------
7436 -- Write_Field21_Name --
7437 -----------------------
7439 procedure Write_Field21_Name (Id : Entity_Id) is
7445 E_Generic_Function |
7447 E_Generic_Procedure |
7449 Write_Str ("Interface_Name");
7451 when Concurrent_Kind |
7452 Incomplete_Or_Private_Kind |
7456 Write_Str ("Discriminant_Constraint");
7459 Write_Str ("Accept_Address");
7461 when Fixed_Point_Kind =>
7462 Write_Str ("Small_Value");
7464 when E_In_Parameter =>
7465 Write_Str ("Default_Expr_Function");
7468 Modular_Integer_Kind =>
7469 Write_Str ("Original_Array_Type");
7471 when E_Access_Subprogram_Type |
7472 E_Access_Protected_Subprogram_Type =>
7473 Write_Str ("Original_Access_Type");
7476 Write_Str ("Field21??");
7478 end Write_Field21_Name;
7480 -----------------------
7481 -- Write_Field22_Name --
7482 -----------------------
7484 procedure Write_Field22_Name (Id : Entity_Id) is
7488 Write_Str ("Associated_Storage_Pool");
7491 Write_Str ("Component_Size");
7495 Write_Str ("Original_Record_Component");
7497 when E_Enumeration_Literal =>
7498 Write_Str ("Enumeration_Rep_Expr");
7501 Write_Str ("Exception_Code");
7504 Write_Str ("Protected_Formal");
7506 when E_Record_Type =>
7507 Write_Str ("Corresponding_Remote_Type");
7517 E_Generic_Function |
7518 E_Generic_Procedure |
7523 Write_Str ("Scope_Depth_Value");
7525 when E_Record_Type_With_Private |
7526 E_Record_Subtype_With_Private |
7529 E_Limited_Private_Type |
7530 E_Limited_Private_Subtype =>
7531 Write_Str ("Private_View");
7534 Write_Str ("Shared_Var_Assign_Proc");
7537 Write_Str ("Field22??");
7539 end Write_Field22_Name;
7541 ------------------------
7542 -- Write_Field23_Name --
7543 ------------------------
7545 procedure Write_Field23_Name (Id : Entity_Id) is
7549 Write_Str ("Associated_Final_Chain");
7552 Write_Str ("Packed_Array_Type");
7555 Write_Str ("Entry_Cancel_Parameter");
7558 Write_Str ("Protected_Operation");
7560 when E_Discriminant =>
7561 Write_Str ("CR_Discriminant");
7563 when E_Enumeration_Type =>
7564 Write_Str ("Enum_Pos_To_Rep");
7568 Write_Str ("Extra_Constrained");
7570 when E_Generic_Function |
7572 E_Generic_Procedure =>
7573 Write_Str ("Inner_Instances");
7575 when Concurrent_Kind |
7576 Incomplete_Or_Private_Kind |
7580 Write_Str ("Stored_Constraint");
7584 Write_Str ("Generic_Renamings");
7587 if Is_Generic_Instance (Id) then
7588 Write_Str ("Generic_Renamings");
7590 Write_Str ("Limited Views");
7593 -- What about Privals_Chain for protected operations ???
7596 Write_Str ("Privals_Chain");
7599 Write_Str ("Field23??");
7601 end Write_Field23_Name;
7603 ------------------------
7604 -- Write_Field24_Name --
7605 ------------------------
7607 procedure Write_Field24_Name (Id : Entity_Id) is
7610 when E_Record_Type |
7612 E_Record_Type_With_Private |
7613 E_Record_Subtype_With_Private =>
7614 Write_Str ("Abstract_Interfaces");
7616 when Subprogram_Kind |
7618 E_Generic_Package =>
7619 Write_Str ("Obsolescent_Warning");
7622 Write_Str ("Task_Body_Procedure");
7625 Write_Str ("Field24??");
7627 end Write_Field24_Name;
7629 ------------------------
7630 -- Write_Field25_Name --
7631 ------------------------
7633 procedure Write_Field25_Name (Id : Entity_Id) is
7638 Write_Str ("Abstract_Interface_Alias");
7641 Write_Str ("Current_Use_Clause");
7644 Write_Str ("Field25??");
7646 end Write_Field25_Name;
7648 ------------------------
7649 -- Write_Field26_Name --
7650 ------------------------
7652 procedure Write_Field26_Name (Id : Entity_Id) is
7655 when E_Generic_Package |
7657 Write_Str ("Package_Instantiation");
7661 Write_Str ("Overridden_Operation");
7664 Write_Str ("Field26??");
7666 end Write_Field26_Name;
7668 ------------------------
7669 -- Write_Field27_Name --
7670 ------------------------
7672 procedure Write_Field27_Name (Id : Entity_Id) is
7676 Write_Str ("Wrapped_Entity");
7679 Write_Str ("Field27??");
7681 end Write_Field27_Name;
7683 -------------------------
7684 -- Iterator Procedures --
7685 -------------------------
7687 procedure Proc_Next_Component (N : in out Node_Id) is
7689 N := Next_Component (N);
7690 end Proc_Next_Component;
7692 procedure Proc_Next_Discriminant (N : in out Node_Id) is
7694 N := Next_Discriminant (N);
7695 end Proc_Next_Discriminant;
7697 procedure Proc_Next_Formal (N : in out Node_Id) is
7699 N := Next_Formal (N);
7700 end Proc_Next_Formal;
7702 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
7704 N := Next_Formal_With_Extras (N);
7705 end Proc_Next_Formal_With_Extras;
7707 procedure Proc_Next_Index (N : in out Node_Id) is
7709 N := Next_Index (N);
7710 end Proc_Next_Index;
7712 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
7714 N := Next_Inlined_Subprogram (N);
7715 end Proc_Next_Inlined_Subprogram;
7717 procedure Proc_Next_Literal (N : in out Node_Id) is
7719 N := Next_Literal (N);
7720 end Proc_Next_Literal;
7722 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
7724 N := Next_Stored_Discriminant (N);
7725 end Proc_Next_Stored_Discriminant;