1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
11 -- Copyright (C) 1992-2002 Free Software Foundation, Inc. --
13 -- GNAT is free software; you can redistribute it and/or modify it under --
14 -- terms of the GNU General Public License as published by the Free Soft- --
15 -- ware Foundation; either version 2, or (at your option) any later ver- --
16 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
17 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
18 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
19 -- for more details. You should have received a copy of the GNU General --
20 -- Public License distributed with GNAT; see file COPYING. If not, write --
21 -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
22 -- MA 02111-1307, USA. --
24 -- As a special exception, if other files instantiate generics from this --
25 -- unit, or you link this unit with other files to produce an executable, --
26 -- this unit does not by itself cause the resulting executable to be --
27 -- covered by the GNU General Public License. This exception does not --
28 -- however invalidate any other reasons why the executable file might be --
29 -- covered by the GNU Public License. --
31 -- GNAT was originally developed by the GNAT team at New York University. --
32 -- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). --
34 ------------------------------------------------------------------------------
36 pragma Style_Checks (All_Checks);
37 -- Turn off subprogram ordering, not used for this unit
39 with Atree; use Atree;
40 with Namet; use Namet;
41 with Nlists; use Nlists;
42 with Sinfo; use Sinfo;
43 with Stand; use Stand;
44 with Output; use Output;
48 use Atree.Unchecked_Access;
49 -- This is one of the packages that is allowed direct untyped access to
50 -- the fields in a node, since it provides the next level abstraction
51 -- which incorporates appropriate checks.
53 ----------------------------------------------
54 -- Usage of Fields in Defining Entity Nodes --
55 ----------------------------------------------
57 -- Four of these fields are defined in Sinfo, since they in are the
58 -- base part of the node. The access routines for these fields and
59 -- the corresponding set procedures are defined in Sinfo. These fields
60 -- are present in all entities. Note that Homonym is also in the base
61 -- part of the node, but has access routines that are more properly
62 -- part of Einfo, which is why they are defined here.
69 -- Remaining fields are present only in extended nodes (i.e. entities)
71 -- The following fields are present in all entities
74 -- First_Rep_Item Node6
77 -- The usage of each field (and the entity kinds to which it applies)
78 -- depends on the particular field (see Einfo spec for details).
80 -- Associated_Node_For_Itype Node8
81 -- Dependent_Instances Elist8
82 -- Hiding_Loop_Variable Node8
83 -- Mechanism Uint8 (but returns Mechanism_Type)
84 -- Normalized_First_Bit Uint8
86 -- Class_Wide_Type Node9
87 -- Normalized_Position Uint9
88 -- Size_Check_Code Node9
91 -- Discriminal_Link Node10
92 -- Handler_Records List10
93 -- Normalized_Position_Max Uint10
94 -- Referenced_Object Node10
96 -- Component_Bit_Offset Uint11
98 -- Entry_Component Node11
99 -- Enumeration_Pos Uint11
100 -- Protected_Body_Subprogram Node11
103 -- Barrier_Function Node12
104 -- Enumeration_Rep Uint12
106 -- Next_Inlined_Subprogram Node12
108 -- Corresponding_Equality Node13
109 -- Component_Clause Node13
110 -- Debug_Renaming_Link Node13
111 -- Elaboration_Entity Node13
112 -- Extra_Accessibility Node13
116 -- First_Optional_Parameter Node14
117 -- Shadow_Entities List14
119 -- Discriminant_Number Uint15
120 -- DT_Position Uint15
121 -- DT_Entry_Count Uint15
122 -- Entry_Bodies_Array Node15
123 -- Entry_Parameters_Type Node15
124 -- Extra_Formal Node15
125 -- Lit_Indexes Node15
126 -- Primitive_Operations Elist15
127 -- Related_Instance Node15
128 -- Scale_Value Uint15
129 -- Storage_Size_Variable Node15
130 -- String_Literal_Low_Bound Node15
131 -- Shared_Var_Read_Proc Node15
133 -- Access_Disp_Table Node16
134 -- Cloned_Subtype Node16
136 -- Entry_Formal Node16
137 -- First_Private_Entity Node16
138 -- Lit_Strings Node16
139 -- String_Literal_Length Uint16
140 -- Unset_Reference Node16
142 -- Actual_Subtype Node17
143 -- Digits_Value Uint17
144 -- Discriminal Node17
145 -- First_Entity Node17
146 -- First_Index Node17
147 -- First_Literal 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 -- Spec_Entity Node19
169 -- Underlying_Full_View Node19
171 -- Component_Type Node20
172 -- Default_Value Node20
173 -- Directly_Designated_Type Node20
174 -- Discriminant_Checking_Func Node20
175 -- Discriminant_Default_Value Node20
176 -- Last_Entity Node20
177 -- Register_Exception_Call Node20
178 -- Scalar_Range Node20
180 -- Accept_Address Elist21
181 -- Default_Expr_Function Node21
182 -- Discriminant_Constraint Elist21
183 -- Interface_Name Node21
184 -- Original_Array_Type Node21
185 -- Small_Value Ureal21
187 -- Associated_Storage_Pool Node22
188 -- Component_Size Uint22
189 -- Corresponding_Remote_Type Node22
190 -- Enumeration_Rep_Expr Node22
191 -- Exception_Code Uint22
192 -- Original_Record_Component Node22
193 -- Private_View Node22
194 -- Protected_Formal Node22
195 -- Scope_Depth_Value Uint22
196 -- Shared_Var_Assign_Proc Node22
198 -- Associated_Final_Chain Node23
199 -- CR_Discriminant Node23
200 -- Girder_Constraint Elist23
201 -- Entry_Cancel_Parameter Node23
202 -- Extra_Constrained Node23
203 -- Generic_Renamings Elist23
204 -- Inner_Instances Elist23
205 -- Enum_Pos_To_Rep Node23
206 -- Packed_Array_Type Node23
207 -- Privals_Chain Elist23
208 -- Protected_Operation Node23
210 ---------------------------------------------
211 -- Usage of Flags in Defining Entity Nodes --
212 ---------------------------------------------
214 -- All flags are unique, there is no overlaying, so each flag is physically
215 -- present in every entity. However, for many of the flags, it only makes
216 -- sense for them to be set true for certain subsets of entity kinds. See
217 -- the spec of Einfo for further details.
219 -- Note: Flag1-Flag3 are absent from this list, since these flag positions
220 -- are used for the flags Analyzed, Comes_From_Source, and Error_Posted,
221 -- which are common to all nodes, including entity nodes.
224 -- Has_Discriminants Flag5
225 -- Is_Dispatching_Operation Flag6
226 -- Is_Immediately_Visible Flag7
228 -- Is_Potentially_Use_Visible Flag9
231 -- Is_Constrained Flag12
232 -- Is_Generic_Type Flag13
233 -- Depends_On_Private Flag14
235 -- Is_Volatile Flag16
236 -- Is_Internal Flag17
237 -- Has_Delayed_Freeze Flag18
238 -- Is_Abstract Flag19
239 -- Is_Concurrent_Record_Type Flag20
240 -- Has_Master_Entity Flag21
241 -- Needs_No_Actuals Flag22
242 -- Has_Storage_Size_Clause Flag23
243 -- Is_Imported Flag24
244 -- Is_Limited_Record Flag25
245 -- Has_Completion Flag26
246 -- Has_Pragma_Controlled Flag27
247 -- Is_Statically_Allocated Flag28
248 -- Has_Size_Clause Flag29
250 -- Suppress_Access_Checks Flag31
251 -- Suppress_Accessibility_Checks Flag32
252 -- Suppress_Discriminant_Checks Flag33
253 -- Suppress_Division_Checks Flag34
254 -- Suppress_Elaboration_Checks Flag35
255 -- Suppress_Index_Checks Flag36
256 -- Suppress_Length_Checks Flag37
257 -- Suppress_Overflow_Checks Flag38
258 -- Suppress_Range_Checks Flag39
259 -- Suppress_Storage_Checks Flag40
260 -- Suppress_Tag_Checks Flag41
261 -- Is_Controlled Flag42
262 -- Has_Controlled_Component Flag43
264 -- In_Private_Part Flag45
265 -- Has_Alignment_Clause Flag46
267 -- In_Package_Body Flag48
269 -- Delay_Subprogram_Descriptors Flag50
271 -- Is_Entry_Formal Flag52
272 -- Is_Private_Descendant Flag53
273 -- Return_Present Flag54
274 -- Is_Tagged_Type Flag55
275 -- Has_Homonym Flag56
277 -- Non_Binary_Modulus Flag58
278 -- Is_Preelaborated Flag59
279 -- Is_Shared_Passive Flag60
280 -- Is_Remote_Types Flag61
281 -- Is_Remote_Call_Interface Flag62
282 -- Is_Character_Type Flag63
283 -- Is_Intrinsic_Subprogram Flag64
284 -- Has_Record_Rep_Clause Flag65
285 -- Has_Enumeration_Rep_Clause Flag66
286 -- Has_Small_Clause Flag67
287 -- Has_Component_Size_Clause Flag68
288 -- Is_Access_Constant Flag69
289 -- Is_First_Subtype Flag70
290 -- Has_Completion_In_Body Flag71
291 -- Has_Unknown_Discriminants Flag72
292 -- Is_Child_Unit Flag73
293 -- Is_CPP_Class Flag74
294 -- Has_Non_Standard_Rep Flag75
295 -- Is_Constructor Flag76
296 -- Is_Destructor Flag77
298 -- Has_All_Calls_Remote Flag79
299 -- Is_Constr_Subt_For_U_Nominal Flag80
300 -- Is_Asynchronous Flag81
301 -- Has_Gigi_Rep_Item Flag82
302 -- Has_Machine_Radix_Clause Flag83
303 -- Machine_Radix_10 Flag84
305 -- Has_Atomic_Components Flag86
306 -- Has_Volatile_Components Flag87
307 -- Discard_Names Flag88
308 -- Is_Interrupt_Handler Flag89
309 -- Returns_By_Ref Flag90
311 -- Size_Known_At_Compile_Time Flag92
312 -- Has_Subprogram_Descriptor Flag93
313 -- Is_Generic_Actual_Type Flag94
314 -- Uses_Sec_Stack Flag95
315 -- Warnings_Off Flag96
316 -- Is_Controlling_Formal Flag97
317 -- Has_Controlling_Result Flag98
318 -- Is_Exported Flag99
319 -- Has_Specified_Layout Flag100
320 -- Has_Nested_Block_With_Handler Flag101
322 -- Is_Completely_Hidden Flag103
323 -- Address_Taken Flag104
324 -- Suppress_Init_Proc Flag105
325 -- Is_Limited_Composite Flag106
326 -- Is_Private_Composite Flag107
327 -- Default_Expressions_Processed Flag108
328 -- Is_Non_Static_Subtype Flag109
329 -- Has_External_Tag_Rep_Clause Flag110
330 -- Is_Formal_Subprogram Flag111
331 -- Is_Renaming_Of_Object Flag112
333 -- Delay_Cleanups Flag114
334 -- Not_Source_Assigned Flag115
335 -- Is_Visible_Child_Unit Flag116
336 -- Is_Unchecked_Union Flag117
337 -- Is_For_Access_Subtype Flag118
338 -- Has_Convention_Pragma Flag119
339 -- Has_Primitive_Operations Flag120
340 -- Has_Pragma_Pack Flag121
341 -- Is_Bit_Packed_Array Flag122
342 -- Has_Unchecked_Union Flag123
343 -- Is_Eliminated Flag124
344 -- C_Pass_By_Copy Flag125
345 -- Is_Instantiated Flag126
346 -- Is_Valued_Procedure Flag127
347 -- (used for Component_Alignment) Flag128
348 -- (used for Component_Alignment) Flag129
349 -- Is_Generic_Instance Flag130
350 -- No_Pool_Assigned Flag131
351 -- Is_AST_Entry Flag132
352 -- Is_VMS_Exception Flag133
353 -- Is_Optional_Parameter Flag134
354 -- Has_Aliased_Components Flag135
355 -- Is_Machine_Code_Subprogram Flag137
356 -- Is_Packed_Array_Type Flag138
357 -- Has_Biased_Representation Flag139
358 -- Has_Complex_Representation Flag140
359 -- Is_Constr_Subt_For_UN_Aliased Flag141
360 -- Has_Missing_Return Flag142
361 -- Has_Recursive_Call Flag143
362 -- Is_Unsigned_Type Flag144
363 -- Strict_Alignment Flag145
364 -- Elaborate_All_Desirable Flag146
365 -- Needs_Debug_Info Flag147
366 -- Suppress_Elaboration_Warnings Flag148
367 -- Is_Compilation_Unit Flag149
368 -- Has_Pragma_Elaborate_Body Flag150
370 -- Entry_Accepted Flag152
371 -- Is_Psected Flag153
372 -- Has_Per_Object_Constraint Flag154
373 -- Has_Private_Declaration Flag155
374 -- Referenced Flag156
375 -- Has_Pragma_Inline Flag157
376 -- Finalize_Storage_Only Flag158
377 -- From_With_Type Flag159
378 -- Is_Package_Body_Entity Flag160
379 -- Has_Qualified_Name Flag161
380 -- Nonzero_Is_True Flag162
381 -- Is_True_Constant Flag163
382 -- Reverse_Bit_Order Flag164
383 -- Suppress_Style_Checks Flag165
384 -- Debug_Info_Off Flag166
385 -- Sec_Stack_Needed_For_Return Flag167
386 -- Materialize_Entity Flag168
387 -- Function_Returns_With_DSP Flag169
388 -- Is_Known_Valid Flag170
389 -- Is_Hidden_Open_Scope Flag171
390 -- Has_Object_Size_Clause Flag172
391 -- Has_Fully_Qualified_Name Flag173
392 -- Elaboration_Entity_Required Flag174
393 -- Has_Forward_Instantiation Flag175
394 -- Is_Discrim_SO_Function Flag176
395 -- Size_Depends_On_Discriminant Flag177
396 -- Is_Null_Init_Proc Flag178
397 -- Has_Pragma_Pure_Function Flag179
398 -- Has_Pragma_Unreferenced Flag180
404 --------------------------------
405 -- Attribute Access Functions --
406 --------------------------------
408 function Accept_Address (Id : E) return L is
413 function Access_Disp_Table (Id : E) return E is
415 pragma Assert (Is_Tagged_Type (Id));
416 return Node16 (Implementation_Base_Type (Id));
417 end Access_Disp_Table;
419 function Actual_Subtype (Id : E) return E is
422 (Ekind (Id) = E_Constant
423 or else Ekind (Id) = E_Variable
424 or else Ekind (Id) = E_Generic_In_Out_Parameter
425 or else Ekind (Id) in E_In_Parameter .. E_In_Out_Parameter);
429 function Address_Taken (Id : E) return B is
434 function Alias (Id : E) return E is
437 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
441 function Alignment (Id : E) return U is
446 function Associated_Final_Chain (Id : E) return E is
448 pragma Assert (Is_Access_Type (Id));
450 end Associated_Final_Chain;
452 function Associated_Formal_Package (Id : E) return E is
454 pragma Assert (Ekind (Id) = E_Package);
456 end Associated_Formal_Package;
458 function Associated_Node_For_Itype (Id : E) return N is
461 end Associated_Node_For_Itype;
463 function Associated_Storage_Pool (Id : E) return E is
465 pragma Assert (Is_Access_Type (Id));
466 return Node22 (Root_Type (Id));
467 end Associated_Storage_Pool;
469 function Barrier_Function (Id : E) return N is
471 pragma Assert (Is_Entry (Id));
473 end Barrier_Function;
475 function Block_Node (Id : E) return N is
477 pragma Assert (Ekind (Id) = E_Block);
481 function Body_Entity (Id : E) return E is
484 (Ekind (Id) = E_Package or else Ekind (Id) = E_Generic_Package);
488 function C_Pass_By_Copy (Id : E) return B is
490 pragma Assert (Is_Record_Type (Id));
491 return Flag125 (Implementation_Base_Type (Id));
494 function Class_Wide_Type (Id : E) return E is
496 pragma Assert (Is_Type (Id));
500 function Cloned_Subtype (Id : E) return E is
503 (Ekind (Id) = E_Record_Subtype
504 or else Ekind (Id) = E_Class_Wide_Subtype);
508 function Component_Bit_Offset (Id : E) return U is
511 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
513 end Component_Bit_Offset;
515 function Component_Clause (Id : E) return N is
518 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
520 end Component_Clause;
522 function Component_Size (Id : E) return U is
524 pragma Assert (Is_Array_Type (Id));
525 return Uint22 (Implementation_Base_Type (Id));
528 function Component_Type (Id : E) return E is
530 return Node20 (Implementation_Base_Type (Id));
533 function Corresponding_Concurrent_Type (Id : E) return E is
535 pragma Assert (Ekind (Id) = E_Record_Type);
537 end Corresponding_Concurrent_Type;
539 function Corresponding_Discriminant (Id : E) return E is
541 pragma Assert (Ekind (Id) = E_Discriminant);
543 end Corresponding_Discriminant;
545 function Corresponding_Equality (Id : E) return E is
548 (Ekind (Id) = E_Function
549 and then not Comes_From_Source (Id)
550 and then Chars (Id) = Name_Op_Ne);
552 end Corresponding_Equality;
554 function Corresponding_Record_Type (Id : E) return E is
556 pragma Assert (Is_Concurrent_Type (Id));
558 end Corresponding_Record_Type;
560 function Corresponding_Remote_Type (Id : E) return E is
563 end Corresponding_Remote_Type;
565 function CR_Discriminant (Id : E) return E is
570 function Debug_Info_Off (Id : E) return B is
575 function Debug_Renaming_Link (Id : E) return E is
578 end Debug_Renaming_Link;
580 function Default_Expr_Function (Id : E) return E is
582 pragma Assert (Is_Formal (Id));
584 end Default_Expr_Function;
586 function Default_Expressions_Processed (Id : E) return B is
589 end Default_Expressions_Processed;
591 function Default_Value (Id : E) return N is
593 pragma Assert (Is_Formal (Id));
597 function Delay_Cleanups (Id : E) return B is
602 function Delay_Subprogram_Descriptors (Id : E) return B is
605 end Delay_Subprogram_Descriptors;
607 function Delta_Value (Id : E) return R is
609 pragma Assert (Is_Fixed_Point_Type (Id));
613 function Dependent_Instances (Id : E) return L is
615 pragma Assert (Is_Generic_Instance (Id));
617 end Dependent_Instances;
619 function Depends_On_Private (Id : E) return B is
621 pragma Assert (Nkind (Id) in N_Entity);
623 end Depends_On_Private;
625 function Digits_Value (Id : E) return U is
628 (Is_Floating_Point_Type (Id)
629 or else Is_Decimal_Fixed_Point_Type (Id));
633 function Directly_Designated_Type (Id : E) return E is
636 end Directly_Designated_Type;
638 function Discard_Names (Id : E) return B is
643 function Discriminal (Id : E) return E is
645 pragma Assert (Ekind (Id) = E_Discriminant);
649 function Discriminal_Link (Id : E) return N is
652 end Discriminal_Link;
654 function Discriminant_Checking_Func (Id : E) return E is
656 pragma Assert (Ekind (Id) = E_Component);
658 end Discriminant_Checking_Func;
660 function Discriminant_Constraint (Id : E) return L is
662 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
664 end Discriminant_Constraint;
666 function Discriminant_Default_Value (Id : E) return N is
668 pragma Assert (Ekind (Id) = E_Discriminant);
670 end Discriminant_Default_Value;
672 function Discriminant_Number (Id : E) return U is
674 pragma Assert (Ekind (Id) = E_Discriminant);
676 end Discriminant_Number;
678 function DT_Entry_Count (Id : E) return U is
680 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
684 function DT_Position (Id : E) return U is
687 ((Ekind (Id) = E_Function
688 or else Ekind (Id) = E_Procedure)
689 and then Present (DTC_Entity (Id)));
693 function DTC_Entity (Id : E) return E is
696 (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
700 function Elaborate_All_Desirable (Id : E) return B is
703 end Elaborate_All_Desirable;
705 function Elaboration_Entity (Id : E) return E is
710 Ekind (Id) = E_Package
712 Is_Generic_Unit (Id));
714 end Elaboration_Entity;
716 function Elaboration_Entity_Required (Id : E) return B is
721 Ekind (Id) = E_Package
723 Is_Generic_Unit (Id));
725 end Elaboration_Entity_Required;
727 function Enclosing_Scope (Id : E) return E is
732 function Entry_Accepted (Id : E) return B is
734 pragma Assert (Is_Entry (Id));
738 function Entry_Bodies_Array (Id : E) return E is
741 end Entry_Bodies_Array;
743 function Entry_Cancel_Parameter (Id : E) return E is
746 end Entry_Cancel_Parameter;
748 function Entry_Component (Id : E) return E is
753 function Entry_Formal (Id : E) return E is
758 function Entry_Index_Constant (Id : E) return N is
760 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
762 end Entry_Index_Constant;
764 function Entry_Parameters_Type (Id : E) return E is
767 end Entry_Parameters_Type;
769 function Enum_Pos_To_Rep (Id : E) return E is
771 pragma Assert (Ekind (Id) = E_Enumeration_Type);
775 function Enumeration_Pos (Id : E) return Uint is
777 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
781 function Enumeration_Rep (Id : E) return U is
783 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
787 function Enumeration_Rep_Expr (Id : E) return N is
789 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
791 end Enumeration_Rep_Expr;
793 function Equivalent_Type (Id : E) return E is
796 (Ekind (Id) = E_Class_Wide_Subtype or else
797 Ekind (Id) = E_Access_Protected_Subprogram_Type or else
798 Ekind (Id) = E_Access_Subprogram_Type or else
799 Ekind (Id) = E_Exception_Type);
803 function Esize (Id : E) return Uint is
808 function Exception_Code (Id : E) return Uint is
810 pragma Assert (Ekind (Id) = E_Exception);
814 function Extra_Accessibility (Id : E) return E is
816 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
818 end Extra_Accessibility;
820 function Extra_Constrained (Id : E) return E is
822 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
824 end Extra_Constrained;
826 function Extra_Formal (Id : E) return E is
831 function Finalization_Chain_Entity (Id : E) return E is
834 end Finalization_Chain_Entity;
836 function Finalize_Storage_Only (Id : E) return B is
838 pragma Assert (Is_Type (Id));
839 return Flag158 (Base_Type (Id));
840 end Finalize_Storage_Only;
842 function First_Entity (Id : E) return E is
847 function First_Index (Id : E) return N is
852 function First_Literal (Id : E) return E is
857 function First_Optional_Parameter (Id : E) return E is
860 (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
862 end First_Optional_Parameter;
864 function First_Private_Entity (Id : E) return E is
867 end First_Private_Entity;
869 function First_Rep_Item (Id : E) return E is
874 function Freeze_Node (Id : E) return N is
879 function From_With_Type (Id : E) return B is
884 function Full_View (Id : E) return E is
886 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
890 function Function_Returns_With_DSP (Id : E) return B is
893 (Is_Subprogram (Id) or else Ekind (Id) = E_Subprogram_Type);
895 end Function_Returns_With_DSP;
897 function Generic_Renamings (Id : E) return L is
900 end Generic_Renamings;
902 function Girder_Constraint (Id : E) return L is
905 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
907 end Girder_Constraint;
909 function Handler_Records (Id : E) return S is
914 function Has_Aliased_Components (Id : E) return B is
916 return Flag135 (Implementation_Base_Type (Id));
917 end Has_Aliased_Components;
919 function Has_Alignment_Clause (Id : E) return B is
922 end Has_Alignment_Clause;
924 function Has_All_Calls_Remote (Id : E) return B is
927 end Has_All_Calls_Remote;
929 function Has_Atomic_Components (Id : E) return B is
931 return Flag86 (Implementation_Base_Type (Id));
932 end Has_Atomic_Components;
934 function Has_Biased_Representation (Id : E) return B is
937 end Has_Biased_Representation;
939 function Has_Completion (Id : E) return B is
944 function Has_Completion_In_Body (Id : E) return B is
946 pragma Assert (Is_Type (Id));
948 end Has_Completion_In_Body;
950 function Has_Complex_Representation (Id : E) return B is
952 pragma Assert (Is_Type (Id));
953 return Flag140 (Implementation_Base_Type (Id));
954 end Has_Complex_Representation;
956 function Has_Component_Size_Clause (Id : E) return B is
958 pragma Assert (Is_Array_Type (Id));
959 return Flag68 (Implementation_Base_Type (Id));
960 end Has_Component_Size_Clause;
962 function Has_Controlled_Component (Id : E) return B is
964 return Flag43 (Base_Type (Id));
965 end Has_Controlled_Component;
967 function Has_Controlling_Result (Id : E) return B is
970 end Has_Controlling_Result;
972 function Has_Convention_Pragma (Id : E) return B is
975 end Has_Convention_Pragma;
977 function Has_Delayed_Freeze (Id : E) return B is
979 pragma Assert (Nkind (Id) in N_Entity);
981 end Has_Delayed_Freeze;
983 function Has_Discriminants (Id : E) return B is
985 pragma Assert (Nkind (Id) in N_Entity);
987 end Has_Discriminants;
989 function Has_Enumeration_Rep_Clause (Id : E) return B is
991 pragma Assert (Is_Enumeration_Type (Id));
993 end Has_Enumeration_Rep_Clause;
995 function Has_Exit (Id : E) return B is
1000 function Has_External_Tag_Rep_Clause (Id : E) return B is
1002 pragma Assert (Is_Tagged_Type (Id));
1003 return Flag110 (Id);
1004 end Has_External_Tag_Rep_Clause;
1006 function Has_Forward_Instantiation (Id : E) return B is
1008 return Flag175 (Id);
1009 end Has_Forward_Instantiation;
1011 function Has_Fully_Qualified_Name (Id : E) return B is
1013 return Flag173 (Id);
1014 end Has_Fully_Qualified_Name;
1016 function Has_Gigi_Rep_Item (Id : E) return B is
1019 end Has_Gigi_Rep_Item;
1021 function Has_Homonym (Id : E) return B is
1026 function Has_Machine_Radix_Clause (Id : E) return B is
1028 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1030 end Has_Machine_Radix_Clause;
1032 function Has_Master_Entity (Id : E) return B is
1035 end Has_Master_Entity;
1037 function Has_Missing_Return (Id : E) return B is
1040 (Ekind (Id) = E_Function or else Ekind (Id) = E_Generic_Function);
1041 return Flag142 (Id);
1042 end Has_Missing_Return;
1044 function Has_Nested_Block_With_Handler (Id : E) return B is
1046 return Flag101 (Id);
1047 end Has_Nested_Block_With_Handler;
1049 function Has_Non_Standard_Rep (Id : E) return B is
1051 return Flag75 (Implementation_Base_Type (Id));
1052 end Has_Non_Standard_Rep;
1054 function Has_Object_Size_Clause (Id : E) return B is
1056 pragma Assert (Is_Type (Id));
1057 return Flag172 (Id);
1058 end Has_Object_Size_Clause;
1060 function Has_Per_Object_Constraint (Id : E) return B is
1062 return Flag154 (Id);
1063 end Has_Per_Object_Constraint;
1065 function Has_Pragma_Controlled (Id : E) return B is
1067 pragma Assert (Is_Access_Type (Id));
1068 return Flag27 (Implementation_Base_Type (Id));
1069 end Has_Pragma_Controlled;
1071 function Has_Pragma_Elaborate_Body (Id : E) return B is
1073 return Flag150 (Id);
1074 end Has_Pragma_Elaborate_Body;
1076 function Has_Pragma_Inline (Id : E) return B is
1078 return Flag157 (Id);
1079 end Has_Pragma_Inline;
1081 function Has_Pragma_Pack (Id : E) return B is
1083 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1084 return Flag121 (Implementation_Base_Type (Id));
1085 end Has_Pragma_Pack;
1087 function Has_Pragma_Pure_Function (Id : E) return B is
1089 pragma Assert (Is_Subprogram (Id));
1090 return Flag179 (Id);
1091 end Has_Pragma_Pure_Function;
1093 function Has_Pragma_Unreferenced (Id : E) return B is
1095 return Flag180 (Id);
1096 end Has_Pragma_Unreferenced;
1098 function Has_Primitive_Operations (Id : E) return B is
1100 pragma Assert (Is_Type (Id));
1101 return Flag120 (Base_Type (Id));
1102 end Has_Primitive_Operations;
1104 function Has_Private_Declaration (Id : E) return B is
1106 return Flag155 (Id);
1107 end Has_Private_Declaration;
1109 function Has_Qualified_Name (Id : E) return B is
1111 return Flag161 (Id);
1112 end Has_Qualified_Name;
1114 function Has_Record_Rep_Clause (Id : E) return B is
1116 pragma Assert (Is_Record_Type (Id));
1117 return Flag65 (Implementation_Base_Type (Id));
1118 end Has_Record_Rep_Clause;
1120 function Has_Recursive_Call (Id : E) return B is
1122 pragma Assert (Is_Subprogram (Id));
1123 return Flag143 (Id);
1124 end Has_Recursive_Call;
1126 function Has_Size_Clause (Id : E) return B is
1129 end Has_Size_Clause;
1131 function Has_Small_Clause (Id : E) return B is
1134 end Has_Small_Clause;
1136 function Has_Specified_Layout (Id : E) return B is
1138 pragma Assert (Is_Type (Id));
1139 return Flag100 (Implementation_Base_Type (Id));
1140 end Has_Specified_Layout;
1142 function Has_Storage_Size_Clause (Id : E) return B is
1144 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1145 return Flag23 (Implementation_Base_Type (Id));
1146 end Has_Storage_Size_Clause;
1148 function Has_Subprogram_Descriptor (Id : E) return B is
1151 end Has_Subprogram_Descriptor;
1153 function Has_Task (Id : E) return B is
1155 return Flag30 (Base_Type (Id));
1158 function Has_Unchecked_Union (Id : E) return B is
1160 return Flag123 (Base_Type (Id));
1161 end Has_Unchecked_Union;
1163 function Has_Unknown_Discriminants (Id : E) return B is
1165 pragma Assert (Is_Type (Id));
1167 end Has_Unknown_Discriminants;
1169 function Has_Volatile_Components (Id : E) return B is
1171 return Flag87 (Implementation_Base_Type (Id));
1172 end Has_Volatile_Components;
1174 function Hiding_Loop_Variable (Id : E) return E is
1176 pragma Assert (Ekind (Id) = E_Variable);
1178 end Hiding_Loop_Variable;
1180 function Homonym (Id : E) return E is
1185 function In_Package_Body (Id : E) return B is
1188 end In_Package_Body;
1190 function In_Private_Part (Id : E) return B is
1193 end In_Private_Part;
1195 function In_Use (Id : E) return B is
1197 pragma Assert (Nkind (Id) in N_Entity);
1201 function Inner_Instances (Id : E) return L is
1203 return Elist23 (Id);
1204 end Inner_Instances;
1206 function Interface_Name (Id : E) return N is
1211 function Is_Abstract (Id : E) return B is
1216 function Is_Access_Constant (Id : E) return B is
1218 pragma Assert (Is_Access_Type (Id));
1220 end Is_Access_Constant;
1222 function Is_Aliased (Id : E) return B is
1224 pragma Assert (Nkind (Id) in N_Entity);
1228 function Is_AST_Entry (Id : E) return B is
1230 pragma Assert (Is_Entry (Id));
1231 return Flag132 (Id);
1234 function Is_Asynchronous (Id : E) return B is
1237 (Ekind (Id) = E_Procedure or else Is_Type (Id));
1239 end Is_Asynchronous;
1241 function Is_Atomic (Id : E) return B is
1246 function Is_Bit_Packed_Array (Id : E) return B is
1248 return Flag122 (Implementation_Base_Type (Id));
1249 end Is_Bit_Packed_Array;
1251 function Is_Called (Id : E) return B is
1254 (Ekind (Id) = E_Procedure or else Ekind (Id) = E_Function);
1255 return Flag102 (Id);
1258 function Is_Character_Type (Id : E) return B is
1261 end Is_Character_Type;
1263 function Is_Child_Unit (Id : E) return B is
1268 function Is_Compilation_Unit (Id : E) return B is
1270 return Flag149 (Id);
1271 end Is_Compilation_Unit;
1273 function Is_Completely_Hidden (Id : E) return B is
1275 pragma Assert (Ekind (Id) = E_Discriminant);
1276 return Flag103 (Id);
1277 end Is_Completely_Hidden;
1279 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1282 end Is_Constr_Subt_For_U_Nominal;
1284 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1286 return Flag141 (Id);
1287 end Is_Constr_Subt_For_UN_Aliased;
1289 function Is_Constrained (Id : E) return B is
1291 pragma Assert (Nkind (Id) in N_Entity);
1295 function Is_Constructor (Id : E) return B is
1300 function Is_Controlled (Id : E) return B is
1302 return Flag42 (Base_Type (Id));
1305 function Is_Controlling_Formal (Id : E) return B is
1307 pragma Assert (Is_Formal (Id));
1309 end Is_Controlling_Formal;
1311 function Is_CPP_Class (Id : E) return B is
1316 function Is_Destructor (Id : E) return B is
1321 function Is_Discrim_SO_Function (Id : E) return B is
1323 return Flag176 (Id);
1324 end Is_Discrim_SO_Function;
1326 function Is_Dispatching_Operation (Id : E) return B is
1328 pragma Assert (Nkind (Id) in N_Entity);
1330 end Is_Dispatching_Operation;
1332 function Is_Eliminated (Id : E) return B is
1334 return Flag124 (Id);
1337 function Is_Entry_Formal (Id : E) return B is
1340 end Is_Entry_Formal;
1342 function Is_Exported (Id : E) return B is
1347 function Is_First_Subtype (Id : E) return B is
1350 end Is_First_Subtype;
1352 function Is_For_Access_Subtype (Id : E) return B is
1355 (Ekind (Id) = E_Record_Subtype
1357 Ekind (Id) = E_Private_Subtype);
1358 return Flag118 (Id);
1359 end Is_For_Access_Subtype;
1361 function Is_Formal_Subprogram (Id : E) return B is
1363 return Flag111 (Id);
1364 end Is_Formal_Subprogram;
1366 function Is_Frozen (Id : E) return B is
1371 function Is_Generic_Actual_Type (Id : E) return B is
1373 pragma Assert (Is_Type (Id));
1375 end Is_Generic_Actual_Type;
1377 function Is_Generic_Instance (Id : E) return B is
1379 return Flag130 (Id);
1380 end Is_Generic_Instance;
1382 function Is_Generic_Type (Id : E) return B is
1384 pragma Assert (Nkind (Id) in N_Entity);
1386 end Is_Generic_Type;
1388 function Is_Hidden (Id : E) return B is
1393 function Is_Hidden_Open_Scope (Id : E) return B is
1395 return Flag171 (Id);
1396 end Is_Hidden_Open_Scope;
1398 function Is_Immediately_Visible (Id : E) return B is
1400 pragma Assert (Nkind (Id) in N_Entity);
1402 end Is_Immediately_Visible;
1404 function Is_Imported (Id : E) return B is
1409 function Is_Inlined (Id : E) return B is
1414 function Is_Instantiated (Id : E) return B is
1416 return Flag126 (Id);
1417 end Is_Instantiated;
1419 function Is_Internal (Id : E) return B is
1421 pragma Assert (Nkind (Id) in N_Entity);
1425 function Is_Interrupt_Handler (Id : E) return B is
1427 pragma Assert (Nkind (Id) in N_Entity);
1429 end Is_Interrupt_Handler;
1431 function Is_Intrinsic_Subprogram (Id : E) return B is
1434 end Is_Intrinsic_Subprogram;
1436 function Is_Itype (Id : E) return B is
1441 function Is_Known_Valid (Id : E) return B is
1443 return Flag170 (Id);
1446 function Is_Limited_Composite (Id : E) return B is
1448 return Flag106 (Id);
1449 end Is_Limited_Composite;
1451 function Is_Limited_Record (Id : E) return B is
1454 end Is_Limited_Record;
1456 function Is_Machine_Code_Subprogram (Id : E) return B is
1458 pragma Assert (Is_Subprogram (Id));
1459 return Flag137 (Id);
1460 end Is_Machine_Code_Subprogram;
1462 function Is_Non_Static_Subtype (Id : E) return B is
1464 pragma Assert (Is_Type (Id));
1465 return Flag109 (Id);
1466 end Is_Non_Static_Subtype;
1468 function Is_Null_Init_Proc (Id : E) return B is
1470 pragma Assert (Ekind (Id) = E_Procedure);
1471 return Flag178 (Id);
1472 end Is_Null_Init_Proc;
1474 function Is_Optional_Parameter (Id : E) return B is
1476 pragma Assert (Is_Formal (Id));
1477 return Flag134 (Id);
1478 end Is_Optional_Parameter;
1480 function Is_Package_Body_Entity (Id : E) return B is
1482 return Flag160 (Id);
1483 end Is_Package_Body_Entity;
1485 function Is_Packed (Id : E) return B is
1487 return Flag51 (Implementation_Base_Type (Id));
1490 function Is_Packed_Array_Type (Id : E) return B is
1492 return Flag138 (Id);
1493 end Is_Packed_Array_Type;
1495 function Is_Potentially_Use_Visible (Id : E) return B is
1497 pragma Assert (Nkind (Id) in N_Entity);
1499 end Is_Potentially_Use_Visible;
1501 function Is_Preelaborated (Id : E) return B is
1504 end Is_Preelaborated;
1506 function Is_Private_Composite (Id : E) return B is
1508 pragma Assert (Is_Type (Id));
1509 return Flag107 (Id);
1510 end Is_Private_Composite;
1512 function Is_Private_Descendant (Id : E) return B is
1515 end Is_Private_Descendant;
1517 function Is_Psected (Id : E) return B is
1519 return Flag153 (Id);
1522 function Is_Public (Id : E) return B is
1524 pragma Assert (Nkind (Id) in N_Entity);
1528 function Is_Pure (Id : E) return B is
1533 function Is_Remote_Call_Interface (Id : E) return B is
1536 end Is_Remote_Call_Interface;
1538 function Is_Remote_Types (Id : E) return B is
1541 end Is_Remote_Types;
1543 function Is_Renaming_Of_Object (Id : E) return B is
1545 return Flag112 (Id);
1546 end Is_Renaming_Of_Object;
1548 function Is_Shared_Passive (Id : E) return B is
1551 end Is_Shared_Passive;
1553 function Is_Statically_Allocated (Id : E) return B is
1556 end Is_Statically_Allocated;
1558 function Is_Tag (Id : E) return B is
1560 pragma Assert (Nkind (Id) in N_Entity);
1564 function Is_Tagged_Type (Id : E) return B is
1569 function Is_True_Constant (Id : E) return B is
1571 return Flag163 (Id);
1572 end Is_True_Constant;
1574 function Is_Unchecked_Union (Id : E) return B is
1576 return Flag117 (Id);
1577 end Is_Unchecked_Union;
1579 function Is_Unsigned_Type (Id : E) return B is
1581 pragma Assert (Is_Type (Id));
1582 return Flag144 (Id);
1583 end Is_Unsigned_Type;
1585 function Is_Valued_Procedure (Id : E) return B is
1587 pragma Assert (Ekind (Id) = E_Procedure);
1588 return Flag127 (Id);
1589 end Is_Valued_Procedure;
1591 function Is_Visible_Child_Unit (Id : E) return B is
1593 pragma Assert (Is_Child_Unit (Id));
1594 return Flag116 (Id);
1595 end Is_Visible_Child_Unit;
1597 function Is_VMS_Exception (Id : E) return B is
1599 return Flag133 (Id);
1600 end Is_VMS_Exception;
1602 function Is_Volatile (Id : E) return B is
1604 pragma Assert (Nkind (Id) in N_Entity);
1608 function Last_Entity (Id : E) return E is
1613 function Lit_Indexes (Id : E) return E is
1615 pragma Assert (Is_Enumeration_Type (Id));
1619 function Lit_Strings (Id : E) return E is
1621 pragma Assert (Is_Enumeration_Type (Id));
1625 function Machine_Radix_10 (Id : E) return B is
1627 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1629 end Machine_Radix_10;
1631 function Master_Id (Id : E) return E is
1636 function Materialize_Entity (Id : E) return B is
1638 return Flag168 (Id);
1639 end Materialize_Entity;
1641 function Mechanism (Id : E) return M is
1643 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
1644 return UI_To_Int (Uint8 (Id));
1647 function Modulus (Id : E) return Uint is
1649 pragma Assert (Is_Modular_Integer_Type (Id));
1650 return Uint17 (Base_Type (Id));
1653 function Needs_Debug_Info (Id : E) return B is
1655 return Flag147 (Id);
1656 end Needs_Debug_Info;
1658 function Needs_No_Actuals (Id : E) return B is
1661 (Is_Overloadable (Id)
1662 or else Ekind (Id) = E_Subprogram_Type
1663 or else Ekind (Id) = E_Entry_Family);
1665 end Needs_No_Actuals;
1667 function Next_Inlined_Subprogram (Id : E) return E is
1670 end Next_Inlined_Subprogram;
1672 function No_Pool_Assigned (Id : E) return B is
1674 pragma Assert (Is_Access_Type (Id));
1675 return Flag131 (Root_Type (Id));
1676 end No_Pool_Assigned;
1678 function No_Return (Id : E) return B is
1681 (Ekind (Id) = E_Procedure or else Ekind (Id) = E_Generic_Procedure);
1682 return Flag113 (Id);
1685 function Non_Binary_Modulus (Id : E) return B is
1687 pragma Assert (Is_Modular_Integer_Type (Id));
1688 return Flag58 (Base_Type (Id));
1689 end Non_Binary_Modulus;
1691 function Nonzero_Is_True (Id : E) return B is
1693 pragma Assert (Root_Type (Id) = Standard_Boolean);
1694 return Flag162 (Base_Type (Id));
1695 end Nonzero_Is_True;
1697 function Normalized_First_Bit (Id : E) return U is
1700 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
1702 end Normalized_First_Bit;
1704 function Normalized_Position (Id : E) return U is
1707 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
1709 end Normalized_Position;
1711 function Normalized_Position_Max (Id : E) return U is
1714 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
1716 end Normalized_Position_Max;
1718 function Not_Source_Assigned (Id : E) return B is
1720 return Flag115 (Id);
1721 end Not_Source_Assigned;
1723 function Object_Ref (Id : E) return E is
1725 pragma Assert (Ekind (Id) = E_Protected_Body);
1729 function Original_Array_Type (Id : E) return E is
1731 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
1733 end Original_Array_Type;
1735 function Original_Record_Component (Id : E) return E is
1738 end Original_Record_Component;
1740 function Packed_Array_Type (Id : E) return E is
1742 pragma Assert (Is_Array_Type (Id));
1744 end Packed_Array_Type;
1746 function Parent_Subtype (Id : E) return E is
1748 pragma Assert (Ekind (Id) = E_Record_Type);
1752 function Primitive_Operations (Id : E) return L is
1754 pragma Assert (Is_Tagged_Type (Id));
1755 return Elist15 (Id);
1756 end Primitive_Operations;
1758 function Prival (Id : E) return E is
1760 pragma Assert (Is_Protected_Private (Id));
1764 function Privals_Chain (Id : E) return L is
1766 pragma Assert (Is_Overloadable (Id)
1767 or else Ekind (Id) = E_Entry_Family);
1768 return Elist23 (Id);
1771 function Private_Dependents (Id : E) return L is
1773 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
1774 return Elist18 (Id);
1775 end Private_Dependents;
1777 function Private_View (Id : E) return N is
1779 pragma Assert (Is_Private_Type (Id));
1783 function Protected_Body_Subprogram (Id : E) return E is
1785 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
1787 end Protected_Body_Subprogram;
1789 function Protected_Formal (Id : E) return E is
1791 pragma Assert (Is_Formal (Id));
1793 end Protected_Formal;
1795 function Protected_Operation (Id : E) return N is
1797 pragma Assert (Is_Protected_Private (Id));
1799 end Protected_Operation;
1801 function Reachable (Id : E) return B is
1806 function Referenced (Id : E) return B is
1808 return Flag156 (Id);
1811 function Referenced_Object (Id : E) return N is
1813 pragma Assert (Is_Type (Id));
1815 end Referenced_Object;
1817 function Register_Exception_Call (Id : E) return N is
1819 pragma Assert (Ekind (Id) = E_Exception);
1821 end Register_Exception_Call;
1823 function Related_Array_Object (Id : E) return E is
1825 pragma Assert (Is_Array_Type (Id));
1827 end Related_Array_Object;
1829 function Related_Instance (Id : E) return E is
1831 pragma Assert (Ekind (Id) = E_Package);
1833 end Related_Instance;
1835 function Renamed_Entity (Id : E) return N is
1840 function Renamed_Object (Id : E) return N is
1845 function Renaming_Map (Id : E) return U is
1850 function Return_Present (Id : E) return B is
1855 function Returns_By_Ref (Id : E) return B is
1860 function Reverse_Bit_Order (Id : E) return B is
1862 pragma Assert (Is_Record_Type (Id));
1863 return Flag164 (Base_Type (Id));
1864 end Reverse_Bit_Order;
1866 function RM_Size (Id : E) return U is
1868 pragma Assert (Is_Type (Id));
1872 function Scalar_Range (Id : E) return N is
1877 function Scale_Value (Id : E) return U is
1882 function Scope_Depth_Value (Id : E) return U is
1885 end Scope_Depth_Value;
1887 function Sec_Stack_Needed_For_Return (Id : E) return B is
1889 return Flag167 (Id);
1890 end Sec_Stack_Needed_For_Return;
1892 function Shadow_Entities (Id : E) return S is
1895 (Ekind (Id) = E_Package or else Ekind (Id) = E_Generic_Package);
1897 end Shadow_Entities;
1899 function Shared_Var_Assign_Proc (Id : E) return E is
1901 pragma Assert (Ekind (Id) = E_Variable);
1903 end Shared_Var_Assign_Proc;
1905 function Shared_Var_Read_Proc (Id : E) return E is
1907 pragma Assert (Ekind (Id) = E_Variable);
1909 end Shared_Var_Read_Proc;
1911 function Size_Check_Code (Id : E) return N is
1913 pragma Assert (Ekind (Id) = E_Constant or else Ekind (Id) = E_Variable);
1915 end Size_Check_Code;
1917 function Size_Depends_On_Discriminant (Id : E) return B is
1919 return Flag177 (Id);
1920 end Size_Depends_On_Discriminant;
1922 function Size_Known_At_Compile_Time (Id : E) return B is
1925 end Size_Known_At_Compile_Time;
1927 function Small_Value (Id : E) return R is
1929 pragma Assert (Is_Fixed_Point_Type (Id));
1930 return Ureal21 (Id);
1933 function Spec_Entity (Id : E) return E is
1936 (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
1940 function Storage_Size_Variable (Id : E) return E is
1942 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1943 return Node15 (Implementation_Base_Type (Id));
1944 end Storage_Size_Variable;
1946 function Strict_Alignment (Id : E) return B is
1948 return Flag145 (Implementation_Base_Type (Id));
1949 end Strict_Alignment;
1951 function String_Literal_Length (Id : E) return U is
1954 end String_Literal_Length;
1956 function String_Literal_Low_Bound (Id : E) return N is
1959 end String_Literal_Low_Bound;
1961 function Suppress_Access_Checks (Id : E) return B is
1964 end Suppress_Access_Checks;
1966 function Suppress_Accessibility_Checks (Id : E) return B is
1969 end Suppress_Accessibility_Checks;
1971 function Suppress_Discriminant_Checks (Id : E) return B is
1974 end Suppress_Discriminant_Checks;
1976 function Suppress_Division_Checks (Id : E) return B is
1979 end Suppress_Division_Checks;
1981 function Suppress_Elaboration_Checks (Id : E) return B is
1984 end Suppress_Elaboration_Checks;
1986 function Suppress_Elaboration_Warnings (Id : E) return B is
1988 return Flag148 (Id);
1989 end Suppress_Elaboration_Warnings;
1991 function Suppress_Index_Checks (Id : E) return B is
1994 end Suppress_Index_Checks;
1996 function Suppress_Init_Proc (Id : E) return B is
1998 return Flag105 (Base_Type (Id));
1999 end Suppress_Init_Proc;
2001 function Suppress_Length_Checks (Id : E) return B is
2004 end Suppress_Length_Checks;
2006 function Suppress_Overflow_Checks (Id : E) return B is
2009 end Suppress_Overflow_Checks;
2011 function Suppress_Range_Checks (Id : E) return B is
2014 end Suppress_Range_Checks;
2016 function Suppress_Storage_Checks (Id : E) return B is
2019 end Suppress_Storage_Checks;
2021 function Suppress_Style_Checks (Id : E) return B is
2023 return Flag165 (Id);
2024 end Suppress_Style_Checks;
2026 function Suppress_Tag_Checks (Id : E) return B is
2029 end Suppress_Tag_Checks;
2031 function Underlying_Full_View (Id : E) return E is
2033 pragma Assert (Ekind (Id) in Private_Kind);
2035 end Underlying_Full_View;
2037 function Unset_Reference (Id : E) return N is
2040 end Unset_Reference;
2042 function Uses_Sec_Stack (Id : E) return B is
2047 function Vax_Float (Id : E) return B is
2049 return Flag151 (Base_Type (Id));
2052 function Warnings_Off (Id : E) return B is
2057 ------------------------------
2058 -- Classification Functions --
2059 ------------------------------
2061 function Is_Access_Type (Id : E) return B is
2063 return Ekind (Id) in Access_Kind;
2066 function Is_Array_Type (Id : E) return B is
2068 return Ekind (Id) in Array_Kind;
2071 function Is_Class_Wide_Type (Id : E) return B is
2073 return Ekind (Id) in Class_Wide_Kind;
2074 end Is_Class_Wide_Type;
2076 function Is_Composite_Type (Id : E) return B is
2078 return Ekind (Id) in Composite_Kind;
2079 end Is_Composite_Type;
2081 function Is_Concurrent_Body (Id : E) return B is
2083 return Ekind (Id) in
2084 Concurrent_Body_Kind;
2085 end Is_Concurrent_Body;
2087 function Is_Concurrent_Record_Type (Id : E) return B is
2090 end Is_Concurrent_Record_Type;
2092 function Is_Concurrent_Type (Id : E) return B is
2094 return Ekind (Id) in Concurrent_Kind;
2095 end Is_Concurrent_Type;
2097 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
2099 return Ekind (Id) in
2100 Decimal_Fixed_Point_Kind;
2101 end Is_Decimal_Fixed_Point_Type;
2103 function Is_Digits_Type (Id : E) return B is
2105 return Ekind (Id) in Digits_Kind;
2108 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
2110 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
2111 end Is_Discrete_Or_Fixed_Point_Type;
2113 function Is_Discrete_Type (Id : E) return B is
2115 return Ekind (Id) in Discrete_Kind;
2116 end Is_Discrete_Type;
2118 function Is_Elementary_Type (Id : E) return B is
2120 return Ekind (Id) in Elementary_Kind;
2121 end Is_Elementary_Type;
2123 function Is_Entry (Id : E) return B is
2125 return Ekind (Id) in Entry_Kind;
2128 function Is_Enumeration_Type (Id : E) return B is
2130 return Ekind (Id) in
2132 end Is_Enumeration_Type;
2134 function Is_Fixed_Point_Type (Id : E) return B is
2136 return Ekind (Id) in
2138 end Is_Fixed_Point_Type;
2140 function Is_Floating_Point_Type (Id : E) return B is
2142 return Ekind (Id) in Float_Kind;
2143 end Is_Floating_Point_Type;
2145 function Is_Formal (Id : E) return B is
2147 return Ekind (Id) in Formal_Kind;
2150 function Is_Generic_Unit (Id : E) return B is
2152 return Ekind (Id) in Generic_Unit_Kind;
2153 end Is_Generic_Unit;
2155 function Is_Incomplete_Or_Private_Type (Id : E) return B is
2157 return Ekind (Id) in
2158 Incomplete_Or_Private_Kind;
2159 end Is_Incomplete_Or_Private_Type;
2161 function Is_Integer_Type (Id : E) return B is
2163 return Ekind (Id) in Integer_Kind;
2164 end Is_Integer_Type;
2166 function Is_Modular_Integer_Type (Id : E) return B is
2168 return Ekind (Id) in
2169 Modular_Integer_Kind;
2170 end Is_Modular_Integer_Type;
2172 function Is_Named_Number (Id : E) return B is
2174 return Ekind (Id) in Named_Kind;
2175 end Is_Named_Number;
2177 function Is_Numeric_Type (Id : E) return B is
2179 return Ekind (Id) in Numeric_Kind;
2180 end Is_Numeric_Type;
2182 function Is_Object (Id : E) return B is
2184 return Ekind (Id) in Object_Kind;
2187 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
2189 return Ekind (Id) in
2190 Ordinary_Fixed_Point_Kind;
2191 end Is_Ordinary_Fixed_Point_Type;
2193 function Is_Overloadable (Id : E) return B is
2195 return Ekind (Id) in Overloadable_Kind;
2196 end Is_Overloadable;
2198 function Is_Private_Type (Id : E) return B is
2200 return Ekind (Id) in Private_Kind;
2201 end Is_Private_Type;
2203 function Is_Protected_Type (Id : E) return B is
2205 return Ekind (Id) in Protected_Kind;
2206 end Is_Protected_Type;
2208 function Is_Real_Type (Id : E) return B is
2210 return Ekind (Id) in Real_Kind;
2213 function Is_Record_Type (Id : E) return B is
2215 return Ekind (Id) in Record_Kind;
2218 function Is_Scalar_Type (Id : E) return B is
2220 return Ekind (Id) in Scalar_Kind;
2223 function Is_Signed_Integer_Type (Id : E) return B is
2225 return Ekind (Id) in
2226 Signed_Integer_Kind;
2227 end Is_Signed_Integer_Type;
2229 function Is_Subprogram (Id : E) return B is
2231 return Ekind (Id) in Subprogram_Kind;
2234 function Is_Task_Type (Id : E) return B is
2236 return Ekind (Id) in Task_Kind;
2239 function Is_Type (Id : E) return B is
2241 return Ekind (Id) in Type_Kind;
2244 ------------------------------
2245 -- Attribute Set Procedures --
2246 ------------------------------
2248 procedure Set_Accept_Address (Id : E; V : L) is
2250 Set_Elist21 (Id, V);
2251 end Set_Accept_Address;
2253 procedure Set_Access_Disp_Table (Id : E; V : E) is
2255 pragma Assert (Is_Tagged_Type (Id) and then Id = Base_Type (Id));
2257 end Set_Access_Disp_Table;
2259 procedure Set_Associated_Final_Chain (Id : E; V : E) is
2261 pragma Assert (Is_Access_Type (Id));
2263 end Set_Associated_Final_Chain;
2265 procedure Set_Associated_Formal_Package (Id : E; V : E) is
2268 end Set_Associated_Formal_Package;
2270 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
2273 end Set_Associated_Node_For_Itype;
2275 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
2277 pragma Assert (Is_Access_Type (Id) and then Id = Base_Type (Id));
2279 end Set_Associated_Storage_Pool;
2281 procedure Set_Actual_Subtype (Id : E; V : E) is
2284 (Ekind (Id) = E_Constant
2285 or else Ekind (Id) = E_Variable
2286 or else Ekind (Id) = E_Generic_In_Out_Parameter
2287 or else Ekind (Id) in E_In_Parameter .. E_In_Out_Parameter);
2289 end Set_Actual_Subtype;
2291 procedure Set_Address_Taken (Id : E; V : B := True) is
2293 Set_Flag104 (Id, V);
2294 end Set_Address_Taken;
2296 procedure Set_Alias (Id : E; V : E) is
2299 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
2303 procedure Set_Alignment (Id : E; V : U) is
2308 procedure Set_Barrier_Function (Id : E; V : N) is
2310 pragma Assert (Is_Entry (Id));
2312 end Set_Barrier_Function;
2314 procedure Set_Block_Node (Id : E; V : N) is
2316 pragma Assert (Ekind (Id) = E_Block);
2320 procedure Set_Body_Entity (Id : E; V : E) is
2323 (Ekind (Id) = E_Package or else Ekind (Id) = E_Generic_Package);
2325 end Set_Body_Entity;
2327 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
2329 pragma Assert (Is_Record_Type (Id) and then Id = Base_Type (Id));
2330 Set_Flag125 (Id, V);
2331 end Set_C_Pass_By_Copy;
2333 procedure Set_Class_Wide_Type (Id : E; V : E) is
2335 pragma Assert (Is_Type (Id));
2337 end Set_Class_Wide_Type;
2339 procedure Set_Cloned_Subtype (Id : E; V : E) is
2342 (Ekind (Id) = E_Record_Subtype
2343 or else Ekind (Id) = E_Class_Wide_Subtype);
2345 end Set_Cloned_Subtype;
2347 procedure Set_Component_Bit_Offset (Id : E; V : U) is
2350 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
2352 end Set_Component_Bit_Offset;
2354 procedure Set_Component_Clause (Id : E; V : N) is
2357 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
2359 end Set_Component_Clause;
2361 procedure Set_Component_Size (Id : E; V : U) is
2363 pragma Assert (Is_Array_Type (Id) and then Id = Base_Type (Id));
2365 end Set_Component_Size;
2367 procedure Set_Component_Type (Id : E; V : E) is
2369 pragma Assert (Is_Array_Type (Id) and then Id = Base_Type (Id));
2371 end Set_Component_Type;
2373 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
2376 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
2378 end Set_Corresponding_Concurrent_Type;
2380 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
2382 pragma Assert (Ekind (Id) = E_Discriminant);
2384 end Set_Corresponding_Discriminant;
2386 procedure Set_Corresponding_Equality (Id : E; V : E) is
2389 (Ekind (Id) = E_Function
2390 and then not Comes_From_Source (Id)
2391 and then Chars (Id) = Name_Op_Ne);
2393 end Set_Corresponding_Equality;
2395 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
2397 pragma Assert (Is_Concurrent_Type (Id));
2399 end Set_Corresponding_Record_Type;
2401 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
2404 end Set_Corresponding_Remote_Type;
2406 procedure Set_CR_Discriminant (Id : E; V : E) is
2409 end Set_CR_Discriminant;
2411 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
2413 Set_Flag166 (Id, V);
2414 end Set_Debug_Info_Off;
2416 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
2419 end Set_Debug_Renaming_Link;
2421 procedure Set_Default_Expr_Function (Id : E; V : E) is
2423 pragma Assert (Is_Formal (Id));
2425 end Set_Default_Expr_Function;
2427 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
2429 Set_Flag108 (Id, V);
2430 end Set_Default_Expressions_Processed;
2432 procedure Set_Default_Value (Id : E; V : N) is
2434 pragma Assert (Is_Formal (Id));
2436 end Set_Default_Value;
2438 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
2442 or else Is_Task_Type (Id)
2443 or else Ekind (Id) = E_Block);
2444 Set_Flag114 (Id, V);
2445 end Set_Delay_Cleanups;
2447 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
2451 or else Ekind (Id) = E_Package
2452 or else Ekind (Id) = E_Package_Body);
2454 end Set_Delay_Subprogram_Descriptors;
2456 procedure Set_Delta_Value (Id : E; V : R) is
2458 pragma Assert (Is_Fixed_Point_Type (Id));
2459 Set_Ureal18 (Id, V);
2460 end Set_Delta_Value;
2462 procedure Set_Dependent_Instances (Id : E; V : L) is
2464 pragma Assert (Is_Generic_Instance (Id));
2466 end Set_Dependent_Instances;
2468 procedure Set_Depends_On_Private (Id : E; V : B := True) is
2470 pragma Assert (Nkind (Id) in N_Entity);
2472 end Set_Depends_On_Private;
2474 procedure Set_Digits_Value (Id : E; V : U) is
2477 (Is_Floating_Point_Type (Id)
2478 or else Is_Decimal_Fixed_Point_Type (Id));
2480 end Set_Digits_Value;
2482 procedure Set_Directly_Designated_Type (Id : E; V : E) is
2485 end Set_Directly_Designated_Type;
2487 procedure Set_Discard_Names (Id : E; V : B := True) is
2490 end Set_Discard_Names;
2492 procedure Set_Discriminal (Id : E; V : E) is
2494 pragma Assert (Ekind (Id) = E_Discriminant);
2496 end Set_Discriminal;
2498 procedure Set_Discriminal_Link (Id : E; V : E) is
2501 end Set_Discriminal_Link;
2503 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
2506 (Ekind (Id) = E_Component and Ekind (Scope (Id)) in Record_Kind);
2508 end Set_Discriminant_Checking_Func;
2510 procedure Set_Discriminant_Constraint (Id : E; V : L) is
2512 pragma Assert (Nkind (Id) in N_Entity);
2513 Set_Elist21 (Id, V);
2514 end Set_Discriminant_Constraint;
2516 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
2519 end Set_Discriminant_Default_Value;
2521 procedure Set_Discriminant_Number (Id : E; V : U) is
2524 end Set_Discriminant_Number;
2526 procedure Set_DT_Entry_Count (Id : E; V : U) is
2528 pragma Assert (Ekind (Id) = E_Component);
2530 end Set_DT_Entry_Count;
2532 procedure Set_DT_Position (Id : E; V : U) is
2534 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2536 end Set_DT_Position;
2538 procedure Set_DTC_Entity (Id : E; V : E) is
2541 (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2545 procedure Set_Elaborate_All_Desirable (Id : E; V : B := True) is
2547 Set_Flag146 (Id, V);
2548 end Set_Elaborate_All_Desirable;
2550 procedure Set_Elaboration_Entity (Id : E; V : E) is
2555 Ekind (Id) = E_Package
2557 Is_Generic_Unit (Id));
2559 end Set_Elaboration_Entity;
2561 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
2566 Ekind (Id) = E_Package
2568 Is_Generic_Unit (Id));
2569 Set_Flag174 (Id, V);
2570 end Set_Elaboration_Entity_Required;
2572 procedure Set_Enclosing_Scope (Id : E; V : E) is
2575 end Set_Enclosing_Scope;
2577 procedure Set_Entry_Accepted (Id : E; V : B := True) is
2579 pragma Assert (Is_Entry (Id));
2580 Set_Flag152 (Id, V);
2581 end Set_Entry_Accepted;
2583 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
2586 end Set_Entry_Bodies_Array;
2588 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
2591 end Set_Entry_Cancel_Parameter;
2593 procedure Set_Entry_Component (Id : E; V : E) is
2596 end Set_Entry_Component;
2598 procedure Set_Entry_Formal (Id : E; V : E) is
2601 end Set_Entry_Formal;
2603 procedure Set_Entry_Index_Constant (Id : E; V : E) is
2605 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
2607 end Set_Entry_Index_Constant;
2609 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
2612 end Set_Entry_Parameters_Type;
2614 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
2616 pragma Assert (Ekind (Id) = E_Enumeration_Type);
2618 end Set_Enum_Pos_To_Rep;
2620 procedure Set_Enumeration_Pos (Id : E; V : U) is
2622 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
2624 end Set_Enumeration_Pos;
2626 procedure Set_Enumeration_Rep (Id : E; V : U) is
2628 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
2630 end Set_Enumeration_Rep;
2632 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
2634 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
2636 end Set_Enumeration_Rep_Expr;
2638 procedure Set_Equivalent_Type (Id : E; V : E) is
2641 (Ekind (Id) = E_Class_Wide_Type or else
2642 Ekind (Id) = E_Class_Wide_Subtype or else
2643 Ekind (Id) = E_Access_Protected_Subprogram_Type or else
2644 Ekind (Id) = E_Access_Subprogram_Type or else
2645 Ekind (Id) = E_Exception_Type);
2647 end Set_Equivalent_Type;
2649 procedure Set_Esize (Id : E; V : U) is
2654 procedure Set_Exception_Code (Id : E; V : U) is
2656 pragma Assert (Ekind (Id) = E_Exception);
2658 end Set_Exception_Code;
2660 procedure Set_Extra_Accessibility (Id : E; V : E) is
2662 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
2664 end Set_Extra_Accessibility;
2666 procedure Set_Extra_Constrained (Id : E; V : E) is
2668 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
2670 end Set_Extra_Constrained;
2672 procedure Set_Extra_Formal (Id : E; V : E) is
2675 end Set_Extra_Formal;
2677 procedure Set_Finalization_Chain_Entity (Id : E; V : E) is
2680 end Set_Finalization_Chain_Entity;
2682 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
2684 pragma Assert (Is_Type (Id) and then Id = Base_Type (Id));
2685 Set_Flag158 (Id, V);
2686 end Set_Finalize_Storage_Only;
2688 procedure Set_First_Entity (Id : E; V : E) is
2691 end Set_First_Entity;
2693 procedure Set_First_Index (Id : E; V : N) is
2696 end Set_First_Index;
2698 procedure Set_First_Literal (Id : E; V : E) is
2701 end Set_First_Literal;
2703 procedure Set_First_Optional_Parameter (Id : E; V : E) is
2706 (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2708 end Set_First_Optional_Parameter;
2710 procedure Set_First_Private_Entity (Id : E; V : E) is
2712 pragma Assert (Nkind (Id) in N_Entity);
2714 end Set_First_Private_Entity;
2716 procedure Set_First_Rep_Item (Id : E; V : N) is
2719 end Set_First_Rep_Item;
2721 procedure Set_Freeze_Node (Id : E; V : N) is
2724 end Set_Freeze_Node;
2726 procedure Set_From_With_Type (Id : E; V : B := True) is
2730 or else Ekind (Id) = E_Package);
2731 Set_Flag159 (Id, V);
2732 end Set_From_With_Type;
2734 procedure Set_Full_View (Id : E; V : E) is
2736 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
2740 procedure Set_Function_Returns_With_DSP (Id : E; V : B := True) is
2743 (Is_Subprogram (Id) or else Ekind (Id) = E_Subprogram_Type);
2744 Set_Flag169 (Id, V);
2745 end Set_Function_Returns_With_DSP;
2747 procedure Set_Generic_Renamings (Id : E; V : L) is
2749 Set_Elist23 (Id, V);
2750 end Set_Generic_Renamings;
2752 procedure Set_Girder_Constraint (Id : E; V : L) is
2754 pragma Assert (Nkind (Id) in N_Entity);
2755 Set_Elist23 (Id, V);
2756 end Set_Girder_Constraint;
2758 procedure Set_Handler_Records (Id : E; V : S) is
2761 end Set_Handler_Records;
2763 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
2765 pragma Assert (Base_Type (Id) = Id);
2766 Set_Flag135 (Id, V);
2767 end Set_Has_Aliased_Components;
2769 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
2772 end Set_Has_Alignment_Clause;
2774 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
2777 end Set_Has_All_Calls_Remote;
2779 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
2781 pragma Assert (not Is_Type (Id) or else Base_Type (Id) = Id);
2783 end Set_Has_Atomic_Components;
2785 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
2788 ((V = False) or else (Is_Discrete_Type (Id) or Is_Object (Id)));
2789 Set_Flag139 (Id, V);
2790 end Set_Has_Biased_Representation;
2792 procedure Set_Has_Completion (Id : E; V : B := True) is
2795 end Set_Has_Completion;
2797 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
2799 pragma Assert (Ekind (Id) = E_Incomplete_Type);
2801 end Set_Has_Completion_In_Body;
2803 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
2805 pragma Assert (Ekind (Id) = E_Record_Type);
2806 Set_Flag140 (Id, V);
2807 end Set_Has_Complex_Representation;
2809 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
2811 pragma Assert (Ekind (Id) = E_Array_Type);
2813 end Set_Has_Component_Size_Clause;
2815 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
2817 pragma Assert (Base_Type (Id) = Id);
2819 end Set_Has_Controlled_Component;
2821 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
2824 end Set_Has_Controlling_Result;
2826 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
2828 Set_Flag119 (Id, V);
2829 end Set_Has_Convention_Pragma;
2831 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
2833 pragma Assert (Nkind (Id) in N_Entity);
2835 end Set_Has_Delayed_Freeze;
2837 procedure Set_Has_Discriminants (Id : E; V : B := True) is
2839 pragma Assert (Nkind (Id) in N_Entity);
2841 end Set_Has_Discriminants;
2843 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
2845 pragma Assert (Is_Enumeration_Type (Id));
2847 end Set_Has_Enumeration_Rep_Clause;
2849 procedure Set_Has_Exit (Id : E; V : B := True) is
2854 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True) is
2856 pragma Assert (Is_Tagged_Type (Id));
2857 Set_Flag110 (Id, V);
2858 end Set_Has_External_Tag_Rep_Clause;
2860 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
2862 Set_Flag175 (Id, V);
2863 end Set_Has_Forward_Instantiation;
2865 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
2867 Set_Flag173 (Id, V);
2868 end Set_Has_Fully_Qualified_Name;
2870 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
2873 end Set_Has_Gigi_Rep_Item;
2875 procedure Set_Has_Homonym (Id : E; V : B := True) is
2878 end Set_Has_Homonym;
2880 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
2882 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2884 end Set_Has_Machine_Radix_Clause;
2886 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
2889 end Set_Has_Master_Entity;
2891 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
2894 (Ekind (Id) = E_Function or else Ekind (Id) = E_Generic_Function);
2895 Set_Flag142 (Id, V);
2896 end Set_Has_Missing_Return;
2898 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
2900 Set_Flag101 (Id, V);
2901 end Set_Has_Nested_Block_With_Handler;
2903 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
2905 pragma Assert (Base_Type (Id) = Id);
2907 end Set_Has_Non_Standard_Rep;
2909 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
2911 pragma Assert (Is_Type (Id));
2912 Set_Flag172 (Id, V);
2913 end Set_Has_Object_Size_Clause;
2915 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
2917 Set_Flag154 (Id, V);
2918 end Set_Has_Per_Object_Constraint;
2920 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
2922 pragma Assert (Is_Access_Type (Id));
2923 Set_Flag27 (Base_Type (Id), V);
2924 end Set_Has_Pragma_Controlled;
2926 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
2928 Set_Flag150 (Id, V);
2929 end Set_Has_Pragma_Elaborate_Body;
2931 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
2933 Set_Flag157 (Id, V);
2934 end Set_Has_Pragma_Inline;
2936 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
2938 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
2939 pragma Assert (Id = Base_Type (Id));
2940 Set_Flag121 (Id, V);
2941 end Set_Has_Pragma_Pack;
2943 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
2945 pragma Assert (Is_Subprogram (Id));
2946 Set_Flag179 (Id, V);
2947 end Set_Has_Pragma_Pure_Function;
2949 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
2951 Set_Flag180 (Id, V);
2952 end Set_Has_Pragma_Unreferenced;
2954 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
2956 pragma Assert (Id = Base_Type (Id));
2957 Set_Flag120 (Id, V);
2958 end Set_Has_Primitive_Operations;
2960 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
2962 Set_Flag155 (Id, V);
2963 end Set_Has_Private_Declaration;
2965 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
2967 Set_Flag161 (Id, V);
2968 end Set_Has_Qualified_Name;
2970 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
2972 pragma Assert (Id = Base_Type (Id));
2974 end Set_Has_Record_Rep_Clause;
2976 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
2978 pragma Assert (Is_Subprogram (Id));
2979 Set_Flag143 (Id, V);
2980 end Set_Has_Recursive_Call;
2982 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
2985 end Set_Has_Size_Clause;
2987 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
2990 end Set_Has_Small_Clause;
2992 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
2994 pragma Assert (Id = Base_Type (Id));
2995 Set_Flag100 (Id, V);
2996 end Set_Has_Specified_Layout;
2998 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
3000 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
3001 pragma Assert (Base_Type (Id) = Id);
3003 end Set_Has_Storage_Size_Clause;
3005 procedure Set_Has_Subprogram_Descriptor (Id : E; V : B := True) is
3008 end Set_Has_Subprogram_Descriptor;
3010 procedure Set_Has_Task (Id : E; V : B := True) is
3012 pragma Assert (Base_Type (Id) = Id);
3016 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
3018 pragma Assert (Base_Type (Id) = Id);
3019 Set_Flag123 (Id, V);
3020 end Set_Has_Unchecked_Union;
3022 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
3024 pragma Assert (Is_Type (Id));
3026 end Set_Has_Unknown_Discriminants;
3028 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
3030 pragma Assert (not Is_Type (Id) or else Base_Type (Id) = Id);
3032 end Set_Has_Volatile_Components;
3034 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
3036 pragma Assert (Ekind (Id) = E_Variable);
3038 end Set_Hiding_Loop_Variable;
3040 procedure Set_Homonym (Id : E; V : E) is
3042 pragma Assert (Id /= V);
3045 procedure Set_In_Package_Body (Id : E; V : B := True) is
3048 end Set_In_Package_Body;
3050 procedure Set_In_Private_Part (Id : E; V : B := True) is
3053 end Set_In_Private_Part;
3055 procedure Set_In_Use (Id : E; V : B := True) is
3057 pragma Assert (Nkind (Id) in N_Entity);
3061 procedure Set_Inner_Instances (Id : E; V : L) is
3063 Set_Elist23 (Id, V);
3064 end Set_Inner_Instances;
3066 procedure Set_Interface_Name (Id : E; V : N) is
3069 end Set_Interface_Name;
3071 procedure Set_Is_Abstract (Id : E; V : B := True) is
3074 end Set_Is_Abstract;
3076 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
3078 pragma Assert (Is_Access_Type (Id));
3080 end Set_Is_Access_Constant;
3082 procedure Set_Is_Aliased (Id : E; V : B := True) is
3084 pragma Assert (Nkind (Id) in N_Entity);
3088 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
3090 pragma Assert (Is_Entry (Id));
3091 Set_Flag132 (Id, V);
3092 end Set_Is_AST_Entry;
3094 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
3097 (Ekind (Id) = E_Procedure or else Is_Type (Id));
3099 end Set_Is_Asynchronous;
3101 procedure Set_Is_Atomic (Id : E; V : B := True) is
3106 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
3108 pragma Assert ((not V)
3109 or else (Is_Array_Type (Id) and then Id = Base_Type (Id)));
3111 Set_Flag122 (Id, V);
3112 end Set_Is_Bit_Packed_Array;
3114 procedure Set_Is_Called (Id : E; V : B := True) is
3117 (Ekind (Id) = E_Procedure or else Ekind (Id) = E_Function);
3118 Set_Flag102 (Id, V);
3121 procedure Set_Is_Character_Type (Id : E; V : B := True) is
3124 end Set_Is_Character_Type;
3126 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
3129 end Set_Is_Child_Unit;
3131 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
3133 Set_Flag149 (Id, V);
3134 end Set_Is_Compilation_Unit;
3136 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
3138 pragma Assert (Ekind (Id) = E_Discriminant);
3139 Set_Flag103 (Id, V);
3140 end Set_Is_Completely_Hidden;
3142 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
3145 end Set_Is_Concurrent_Record_Type;
3147 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
3150 end Set_Is_Constr_Subt_For_U_Nominal;
3152 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
3154 Set_Flag141 (Id, V);
3155 end Set_Is_Constr_Subt_For_UN_Aliased;
3157 procedure Set_Is_Constrained (Id : E; V : B := True) is
3159 pragma Assert (Nkind (Id) in N_Entity);
3161 end Set_Is_Constrained;
3163 procedure Set_Is_Constructor (Id : E; V : B := True) is
3166 end Set_Is_Constructor;
3168 procedure Set_Is_Controlled (Id : E; V : B := True) is
3170 pragma Assert (Id = Base_Type (Id));
3172 end Set_Is_Controlled;
3174 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
3176 pragma Assert (Is_Formal (Id));
3178 end Set_Is_Controlling_Formal;
3180 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
3183 end Set_Is_CPP_Class;
3185 procedure Set_Is_Destructor (Id : E; V : B := True) is
3188 end Set_Is_Destructor;
3190 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
3192 Set_Flag176 (Id, V);
3193 end Set_Is_Discrim_SO_Function;
3195 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
3200 Is_Overloadable (Id)
3202 Ekind (Id) = E_Subprogram_Type);
3205 end Set_Is_Dispatching_Operation;
3207 procedure Set_Is_Eliminated (Id : E; V : B := True) is
3209 Set_Flag124 (Id, V);
3210 end Set_Is_Eliminated;
3212 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
3215 end Set_Is_Entry_Formal;
3217 procedure Set_Is_Exported (Id : E; V : B := True) is
3220 end Set_Is_Exported;
3222 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
3225 end Set_Is_First_Subtype;
3227 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
3230 (Ekind (Id) = E_Record_Subtype
3232 Ekind (Id) = E_Private_Subtype);
3233 Set_Flag118 (Id, V);
3234 end Set_Is_For_Access_Subtype;
3236 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
3238 Set_Flag111 (Id, V);
3239 end Set_Is_Formal_Subprogram;
3241 procedure Set_Is_Frozen (Id : E; V : B := True) is
3243 pragma Assert (Nkind (Id) in N_Entity);
3247 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
3249 pragma Assert (Is_Type (Id));
3251 end Set_Is_Generic_Actual_Type;
3253 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
3255 Set_Flag130 (Id, V);
3256 end Set_Is_Generic_Instance;
3258 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
3260 pragma Assert (Nkind (Id) in N_Entity);
3262 end Set_Is_Generic_Type;
3264 procedure Set_Is_Hidden (Id : E; V : B := True) is
3269 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
3271 Set_Flag171 (Id, V);
3272 end Set_Is_Hidden_Open_Scope;
3274 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
3276 pragma Assert (Nkind (Id) in N_Entity);
3278 end Set_Is_Immediately_Visible;
3280 procedure Set_Is_Imported (Id : E; V : B := True) is
3283 end Set_Is_Imported;
3285 procedure Set_Is_Inlined (Id : E; V : B := True) is
3290 procedure Set_Is_Instantiated (Id : E; V : B := True) is
3292 Set_Flag126 (Id, V);
3293 end Set_Is_Instantiated;
3295 procedure Set_Is_Internal (Id : E; V : B := True) is
3297 pragma Assert (Nkind (Id) in N_Entity);
3299 end Set_Is_Internal;
3301 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
3303 pragma Assert (Nkind (Id) in N_Entity);
3305 end Set_Is_Interrupt_Handler;
3307 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
3310 end Set_Is_Intrinsic_Subprogram;
3312 procedure Set_Is_Itype (Id : E; V : B := True) is
3317 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
3319 Set_Flag170 (Id, V);
3320 end Set_Is_Known_Valid;
3322 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
3324 pragma Assert (Is_Type (Id));
3325 Set_Flag106 (Id, V);
3326 end Set_Is_Limited_Composite;
3328 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
3331 end Set_Is_Limited_Record;
3333 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
3335 pragma Assert (Is_Subprogram (Id));
3336 Set_Flag137 (Id, V);
3337 end Set_Is_Machine_Code_Subprogram;
3339 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
3341 pragma Assert (Is_Type (Id));
3342 Set_Flag109 (Id, V);
3343 end Set_Is_Non_Static_Subtype;
3345 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
3347 pragma Assert (Ekind (Id) = E_Procedure);
3348 Set_Flag178 (Id, V);
3349 end Set_Is_Null_Init_Proc;
3351 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
3353 pragma Assert (Is_Formal (Id));
3354 Set_Flag134 (Id, V);
3355 end Set_Is_Optional_Parameter;
3357 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
3359 Set_Flag160 (Id, V);
3360 end Set_Is_Package_Body_Entity;
3362 procedure Set_Is_Packed (Id : E; V : B := True) is
3364 pragma Assert (Base_Type (Id) = Id);
3368 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
3370 Set_Flag138 (Id, V);
3371 end Set_Is_Packed_Array_Type;
3373 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
3375 pragma Assert (Nkind (Id) in N_Entity);
3377 end Set_Is_Potentially_Use_Visible;
3379 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
3382 end Set_Is_Preelaborated;
3384 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
3386 pragma Assert (Is_Type (Id));
3387 Set_Flag107 (Id, V);
3388 end Set_Is_Private_Composite;
3390 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
3393 end Set_Is_Private_Descendant;
3395 procedure Set_Is_Psected (Id : E; V : B := True) is
3397 Set_Flag153 (Id, V);
3400 procedure Set_Is_Public (Id : E; V : B := True) is
3402 pragma Assert (Nkind (Id) in N_Entity);
3406 procedure Set_Is_Pure (Id : E; V : B := True) is
3411 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
3414 end Set_Is_Remote_Call_Interface;
3416 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
3419 end Set_Is_Remote_Types;
3421 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
3423 Set_Flag112 (Id, V);
3424 end Set_Is_Renaming_Of_Object;
3426 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
3429 end Set_Is_Shared_Passive;
3431 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
3434 (Ekind (Id) = E_Exception
3435 or else Ekind (Id) = E_Variable
3436 or else Ekind (Id) = E_Constant
3437 or else Is_Type (Id)
3438 or else Ekind (Id) = E_Void);
3440 end Set_Is_Statically_Allocated;
3442 procedure Set_Is_Tag (Id : E; V : B := True) is
3444 pragma Assert (Nkind (Id) in N_Entity);
3448 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
3451 end Set_Is_Tagged_Type;
3453 procedure Set_Is_True_Constant (Id : E; V : B := True) is
3455 Set_Flag163 (Id, V);
3456 end Set_Is_True_Constant;
3458 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
3460 pragma Assert (Base_Type (Id) = Id);
3461 Set_Flag117 (Id, V);
3462 end Set_Is_Unchecked_Union;
3464 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
3466 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
3467 Set_Flag144 (Id, V);
3468 end Set_Is_Unsigned_Type;
3470 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
3472 pragma Assert (Ekind (Id) = E_Procedure);
3473 Set_Flag127 (Id, V);
3474 end Set_Is_Valued_Procedure;
3476 procedure Set_Is_Visible_Child_Unit (Id : E; V : B := True) is
3478 pragma Assert (Is_Child_Unit (Id));
3479 Set_Flag116 (Id, V);
3480 end Set_Is_Visible_Child_Unit;
3482 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
3484 pragma Assert (Ekind (Id) = E_Exception);
3485 Set_Flag133 (Id, V);
3486 end Set_Is_VMS_Exception;
3488 procedure Set_Is_Volatile (Id : E; V : B := True) is
3490 pragma Assert (Nkind (Id) in N_Entity);
3492 end Set_Is_Volatile;
3494 procedure Set_Last_Entity (Id : E; V : E) is
3497 end Set_Last_Entity;
3499 procedure Set_Lit_Indexes (Id : E; V : E) is
3501 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
3503 end Set_Lit_Indexes;
3505 procedure Set_Lit_Strings (Id : E; V : E) is
3507 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
3509 end Set_Lit_Strings;
3511 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
3513 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
3515 end Set_Machine_Radix_10;
3517 procedure Set_Master_Id (Id : E; V : E) is
3522 procedure Set_Materialize_Entity (Id : E; V : B := True) is
3524 Set_Flag168 (Id, V);
3525 end Set_Materialize_Entity;
3527 procedure Set_Mechanism (Id : E; V : M) is
3529 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
3530 Set_Uint8 (Id, UI_From_Int (V));
3533 procedure Set_Modulus (Id : E; V : U) is
3535 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
3539 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
3541 Set_Flag147 (Id, V);
3542 end Set_Needs_Debug_Info;
3544 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
3547 (Is_Overloadable (Id)
3548 or else Ekind (Id) = E_Subprogram_Type
3549 or else Ekind (Id) = E_Entry_Family);
3551 end Set_Needs_No_Actuals;
3553 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
3556 end Set_Next_Inlined_Subprogram;
3558 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
3560 pragma Assert (Is_Access_Type (Id) and then Base_Type (Id) = Id);
3561 Set_Flag131 (Id, V);
3562 end Set_No_Pool_Assigned;
3564 procedure Set_No_Return (Id : E; V : B := True) is
3567 (Ekind (Id) = E_Procedure or else Ekind (Id) = E_Generic_Procedure);
3568 Set_Flag113 (Id, V);
3571 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
3573 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
3575 end Set_Non_Binary_Modulus;
3577 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
3580 (Root_Type (Id) = Standard_Boolean
3581 and then Ekind (Id) = E_Enumeration_Type);
3582 Set_Flag162 (Id, V);
3583 end Set_Nonzero_Is_True;
3585 procedure Set_Normalized_First_Bit (Id : E; V : U) is
3588 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
3590 end Set_Normalized_First_Bit;
3592 procedure Set_Normalized_Position (Id : E; V : U) is
3595 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
3597 end Set_Normalized_Position;
3599 procedure Set_Normalized_Position_Max (Id : E; V : U) is
3602 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
3604 end Set_Normalized_Position_Max;
3606 procedure Set_Not_Source_Assigned (Id : E; V : B := True) is
3608 Set_Flag115 (Id, V);
3609 end Set_Not_Source_Assigned;
3611 procedure Set_Object_Ref (Id : E; V : E) is
3613 pragma Assert (Ekind (Id) = E_Protected_Body);
3617 procedure Set_Original_Array_Type (Id : E; V : E) is
3619 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
3621 end Set_Original_Array_Type;
3623 procedure Set_Original_Record_Component (Id : E; V : E) is
3626 end Set_Original_Record_Component;
3628 procedure Set_Packed_Array_Type (Id : E; V : E) is
3630 pragma Assert (Is_Array_Type (Id));
3632 end Set_Packed_Array_Type;
3634 procedure Set_Parent_Subtype (Id : E; V : E) is
3636 pragma Assert (Ekind (Id) = E_Record_Type);
3638 end Set_Parent_Subtype;
3640 procedure Set_Primitive_Operations (Id : E; V : L) is
3642 pragma Assert (Is_Tagged_Type (Id));
3643 Set_Elist15 (Id, V);
3644 end Set_Primitive_Operations;
3646 procedure Set_Prival (Id : E; V : E) is
3648 pragma Assert (Is_Protected_Private (Id));
3652 procedure Set_Privals_Chain (Id : E; V : L) is
3654 pragma Assert (Is_Overloadable (Id)
3655 or else Ekind (Id) = E_Entry_Family);
3656 Set_Elist23 (Id, V);
3657 end Set_Privals_Chain;
3659 procedure Set_Private_Dependents (Id : E; V : L) is
3661 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
3662 Set_Elist18 (Id, V);
3663 end Set_Private_Dependents;
3665 procedure Set_Private_View (Id : E; V : N) is
3667 pragma Assert (Is_Private_Type (Id));
3669 end Set_Private_View;
3671 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
3673 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
3675 end Set_Protected_Body_Subprogram;
3677 procedure Set_Protected_Formal (Id : E; V : E) is
3679 pragma Assert (Is_Formal (Id));
3681 end Set_Protected_Formal;
3683 procedure Set_Protected_Operation (Id : E; V : N) is
3685 pragma Assert (Is_Protected_Private (Id));
3687 end Set_Protected_Operation;
3689 procedure Set_Reachable (Id : E; V : B := True) is
3694 procedure Set_Referenced (Id : E; V : B := True) is
3696 Set_Flag156 (Id, V);
3699 procedure Set_Referenced_Object (Id : E; V : N) is
3701 pragma Assert (Is_Type (Id));
3703 end Set_Referenced_Object;
3705 procedure Set_Register_Exception_Call (Id : E; V : N) is
3707 pragma Assert (Ekind (Id) = E_Exception);
3709 end Set_Register_Exception_Call;
3711 procedure Set_Related_Array_Object (Id : E; V : E) is
3713 pragma Assert (Is_Array_Type (Id));
3715 end Set_Related_Array_Object;
3717 procedure Set_Related_Instance (Id : E; V : E) is
3719 pragma Assert (Ekind (Id) = E_Package);
3721 end Set_Related_Instance;
3723 procedure Set_Renamed_Entity (Id : E; V : N) is
3726 end Set_Renamed_Entity;
3728 procedure Set_Renamed_Object (Id : E; V : N) is
3731 end Set_Renamed_Object;
3733 procedure Set_Renaming_Map (Id : E; V : U) is
3736 end Set_Renaming_Map;
3738 procedure Set_Return_Present (Id : E; V : B := True) is
3741 end Set_Return_Present;
3743 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
3746 end Set_Returns_By_Ref;
3748 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
3751 (Is_Record_Type (Id) and then Id = Base_Type (Id));
3752 Set_Flag164 (Id, V);
3753 end Set_Reverse_Bit_Order;
3755 procedure Set_RM_Size (Id : E; V : U) is
3757 pragma Assert (Is_Type (Id));
3761 procedure Set_Scalar_Range (Id : E; V : N) is
3764 end Set_Scalar_Range;
3766 procedure Set_Scale_Value (Id : E; V : U) is
3769 end Set_Scale_Value;
3771 procedure Set_Scope_Depth_Value (Id : E; V : U) is
3773 pragma Assert (not Is_Record_Type (Id));
3775 end Set_Scope_Depth_Value;
3777 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
3779 Set_Flag167 (Id, V);
3780 end Set_Sec_Stack_Needed_For_Return;
3782 procedure Set_Shadow_Entities (Id : E; V : S) is
3785 (Ekind (Id) = E_Package or else Ekind (Id) = E_Generic_Package);
3787 end Set_Shadow_Entities;
3789 procedure Set_Shared_Var_Assign_Proc (Id : E; V : E) is
3791 pragma Assert (Ekind (Id) = E_Variable);
3793 end Set_Shared_Var_Assign_Proc;
3795 procedure Set_Shared_Var_Read_Proc (Id : E; V : E) is
3797 pragma Assert (Ekind (Id) = E_Variable);
3799 end Set_Shared_Var_Read_Proc;
3801 procedure Set_Size_Check_Code (Id : E; V : N) is
3803 pragma Assert (Ekind (Id) = E_Constant or else Ekind (Id) = E_Variable);
3805 end Set_Size_Check_Code;
3807 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
3809 Set_Flag177 (Id, V);
3810 end Set_Size_Depends_On_Discriminant;
3812 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
3815 end Set_Size_Known_At_Compile_Time;
3817 procedure Set_Small_Value (Id : E; V : R) is
3819 pragma Assert (Is_Fixed_Point_Type (Id));
3820 Set_Ureal21 (Id, V);
3821 end Set_Small_Value;
3823 procedure Set_Spec_Entity (Id : E; V : E) is
3825 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
3827 end Set_Spec_Entity;
3829 procedure Set_Storage_Size_Variable (Id : E; V : E) is
3831 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
3832 pragma Assert (Base_Type (Id) = Id);
3834 end Set_Storage_Size_Variable;
3836 procedure Set_Strict_Alignment (Id : E; V : B := True) is
3838 pragma Assert (Base_Type (Id) = Id);
3839 Set_Flag145 (Id, V);
3840 end Set_Strict_Alignment;
3842 procedure Set_String_Literal_Length (Id : E; V : U) is
3844 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
3846 end Set_String_Literal_Length;
3848 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
3850 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
3852 end Set_String_Literal_Low_Bound;
3854 procedure Set_Suppress_Access_Checks (Id : E; V : B := True) is
3857 end Set_Suppress_Access_Checks;
3859 procedure Set_Suppress_Accessibility_Checks (Id : E; V : B := True) is
3862 end Set_Suppress_Accessibility_Checks;
3864 procedure Set_Suppress_Discriminant_Checks (Id : E; V : B := True) is
3867 end Set_Suppress_Discriminant_Checks;
3869 procedure Set_Suppress_Division_Checks (Id : E; V : B := True) is
3872 end Set_Suppress_Division_Checks;
3874 procedure Set_Suppress_Elaboration_Checks (Id : E; V : B := True) is
3877 end Set_Suppress_Elaboration_Checks;
3879 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
3881 Set_Flag148 (Id, V);
3882 end Set_Suppress_Elaboration_Warnings;
3884 procedure Set_Suppress_Index_Checks (Id : E; V : B := True) is
3887 end Set_Suppress_Index_Checks;
3889 procedure Set_Suppress_Init_Proc (Id : E; V : B := True) is
3891 pragma Assert (Id = Base_Type (Id));
3892 Set_Flag105 (Id, V);
3893 end Set_Suppress_Init_Proc;
3895 procedure Set_Suppress_Length_Checks (Id : E; V : B := True) is
3898 end Set_Suppress_Length_Checks;
3900 procedure Set_Suppress_Overflow_Checks (Id : E; V : B := True) is
3903 end Set_Suppress_Overflow_Checks;
3905 procedure Set_Suppress_Range_Checks (Id : E; V : B := True) is
3908 end Set_Suppress_Range_Checks;
3910 procedure Set_Suppress_Storage_Checks (Id : E; V : B := True) is
3913 end Set_Suppress_Storage_Checks;
3915 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
3917 Set_Flag165 (Id, V);
3918 end Set_Suppress_Style_Checks;
3920 procedure Set_Suppress_Tag_Checks (Id : E; V : B := True) is
3923 end Set_Suppress_Tag_Checks;
3925 procedure Set_Underlying_Full_View (Id : E; V : E) is
3927 pragma Assert (Ekind (Id) in Private_Kind);
3929 end Set_Underlying_Full_View;
3931 procedure Set_Unset_Reference (Id : E; V : N) is
3934 end Set_Unset_Reference;
3936 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
3939 end Set_Uses_Sec_Stack;
3941 procedure Set_Vax_Float (Id : E; V : B := True) is
3943 pragma Assert (Id = Base_Type (Id));
3944 Set_Flag151 (Id, V);
3947 procedure Set_Warnings_Off (Id : E; V : B := True) is
3950 end Set_Warnings_Off;
3952 -----------------------------------
3953 -- Field Initialization Routines --
3954 -----------------------------------
3956 procedure Init_Alignment (Id : E) is
3958 Set_Uint14 (Id, Uint_0);
3961 procedure Init_Alignment (Id : E; V : Int) is
3963 Set_Uint14 (Id, UI_From_Int (V));
3966 procedure Init_Component_Bit_Offset (Id : E) is
3968 Set_Uint11 (Id, No_Uint);
3969 end Init_Component_Bit_Offset;
3971 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
3973 Set_Uint11 (Id, UI_From_Int (V));
3974 end Init_Component_Bit_Offset;
3976 procedure Init_Component_Size (Id : E) is
3978 Set_Uint22 (Id, Uint_0);
3979 end Init_Component_Size;
3981 procedure Init_Component_Size (Id : E; V : Int) is
3983 Set_Uint22 (Id, UI_From_Int (V));
3984 end Init_Component_Size;
3986 procedure Init_Digits_Value (Id : E) is
3988 Set_Uint17 (Id, Uint_0);
3989 end Init_Digits_Value;
3991 procedure Init_Digits_Value (Id : E; V : Int) is
3993 Set_Uint17 (Id, UI_From_Int (V));
3994 end Init_Digits_Value;
3996 procedure Init_Esize (Id : E) is
3998 Set_Uint12 (Id, Uint_0);
4001 procedure Init_Esize (Id : E; V : Int) is
4003 Set_Uint12 (Id, UI_From_Int (V));
4006 procedure Init_Normalized_First_Bit (Id : E) is
4008 Set_Uint8 (Id, No_Uint);
4009 end Init_Normalized_First_Bit;
4011 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
4013 Set_Uint8 (Id, UI_From_Int (V));
4014 end Init_Normalized_First_Bit;
4016 procedure Init_Normalized_Position (Id : E) is
4018 Set_Uint9 (Id, No_Uint);
4019 end Init_Normalized_Position;
4021 procedure Init_Normalized_Position (Id : E; V : Int) is
4023 Set_Uint9 (Id, UI_From_Int (V));
4024 end Init_Normalized_Position;
4026 procedure Init_Normalized_Position_Max (Id : E) is
4028 Set_Uint10 (Id, No_Uint);
4029 end Init_Normalized_Position_Max;
4031 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
4033 Set_Uint10 (Id, UI_From_Int (V));
4034 end Init_Normalized_Position_Max;
4036 procedure Init_RM_Size (Id : E) is
4038 Set_Uint13 (Id, Uint_0);
4041 procedure Init_RM_Size (Id : E; V : Int) is
4043 Set_Uint13 (Id, UI_From_Int (V));
4046 -----------------------------
4047 -- Init_Component_Location --
4048 -----------------------------
4050 procedure Init_Component_Location (Id : E) is
4052 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
4053 Set_Uint9 (Id, No_Uint); -- Normalized_Position
4054 Set_Uint11 (Id, No_Uint); -- Component_First_Bit
4055 Set_Uint12 (Id, Uint_0); -- Esize
4056 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
4057 end Init_Component_Location;
4063 procedure Init_Size (Id : E; V : Int) is
4065 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
4066 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
4069 ---------------------
4070 -- Init_Size_Align --
4071 ---------------------
4073 procedure Init_Size_Align (Id : E) is
4075 Set_Uint12 (Id, Uint_0); -- Esize
4076 Set_Uint13 (Id, Uint_0); -- RM_Size
4077 Set_Uint14 (Id, Uint_0); -- Alignment
4078 end Init_Size_Align;
4080 ----------------------------------------------
4081 -- Type Representation Attribute Predicates --
4082 ----------------------------------------------
4084 function Known_Alignment (E : Entity_Id) return B is
4086 return Uint14 (E) /= Uint_0
4087 and then Uint14 (E) /= No_Uint;
4088 end Known_Alignment;
4090 function Known_Component_Bit_Offset (E : Entity_Id) return B is
4092 return Uint11 (E) /= No_Uint;
4093 end Known_Component_Bit_Offset;
4095 function Known_Component_Size (E : Entity_Id) return B is
4097 return Uint22 (Base_Type (E)) /= Uint_0
4098 and then Uint22 (Base_Type (E)) /= No_Uint;
4099 end Known_Component_Size;
4101 function Known_Esize (E : Entity_Id) return B is
4103 return Uint12 (E) /= Uint_0
4104 and then Uint12 (E) /= No_Uint;
4107 function Known_Normalized_First_Bit (E : Entity_Id) return B is
4109 return Uint8 (E) /= No_Uint;
4110 end Known_Normalized_First_Bit;
4112 function Known_Normalized_Position (E : Entity_Id) return B is
4114 return Uint9 (E) /= No_Uint;
4115 end Known_Normalized_Position;
4117 function Known_Normalized_Position_Max (E : Entity_Id) return B is
4119 return Uint10 (E) /= No_Uint;
4120 end Known_Normalized_Position_Max;
4122 function Known_RM_Size (E : Entity_Id) return B is
4124 return Uint13 (E) /= No_Uint
4125 and then (Uint13 (E) /= Uint_0
4126 or else Is_Discrete_Type (E));
4129 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
4131 return Uint11 (E) /= No_Uint
4132 and then Uint11 (E) >= Uint_0;
4133 end Known_Static_Component_Bit_Offset;
4135 function Known_Static_Component_Size (E : Entity_Id) return B is
4137 return Uint22 (Base_Type (E)) > Uint_0;
4138 end Known_Static_Component_Size;
4140 function Known_Static_Esize (E : Entity_Id) return B is
4142 return Uint12 (E) > Uint_0;
4143 end Known_Static_Esize;
4145 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
4147 return Uint8 (E) /= No_Uint
4148 and then Uint8 (E) >= Uint_0;
4149 end Known_Static_Normalized_First_Bit;
4151 function Known_Static_Normalized_Position (E : Entity_Id) return B is
4153 return Uint9 (E) /= No_Uint
4154 and then Uint9 (E) >= Uint_0;
4155 end Known_Static_Normalized_Position;
4157 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
4159 return Uint10 (E) /= No_Uint
4160 and then Uint10 (E) >= Uint_0;
4161 end Known_Static_Normalized_Position_Max;
4163 function Known_Static_RM_Size (E : Entity_Id) return B is
4165 return Uint13 (E) > Uint_0
4166 or else Is_Discrete_Type (E);
4167 end Known_Static_RM_Size;
4169 function Unknown_Alignment (E : Entity_Id) return B is
4171 return Uint14 (E) = Uint_0
4172 or else Uint14 (E) = No_Uint;
4173 end Unknown_Alignment;
4175 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
4177 return Uint11 (E) = No_Uint;
4178 end Unknown_Component_Bit_Offset;
4180 function Unknown_Component_Size (E : Entity_Id) return B is
4182 return Uint22 (Base_Type (E)) = Uint_0
4184 Uint22 (Base_Type (E)) = No_Uint;
4185 end Unknown_Component_Size;
4187 function Unknown_Esize (E : Entity_Id) return B is
4189 return Uint12 (E) = No_Uint
4191 Uint12 (E) = Uint_0;
4194 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
4196 return Uint8 (E) = No_Uint;
4197 end Unknown_Normalized_First_Bit;
4199 function Unknown_Normalized_Position (E : Entity_Id) return B is
4201 return Uint9 (E) = No_Uint;
4202 end Unknown_Normalized_Position;
4204 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
4206 return Uint10 (E) = No_Uint;
4207 end Unknown_Normalized_Position_Max;
4209 function Unknown_RM_Size (E : Entity_Id) return B is
4211 return (Uint13 (E) = Uint_0
4212 and then not Is_Discrete_Type (E))
4213 or else Uint13 (E) = No_Uint;
4214 end Unknown_RM_Size;
4216 --------------------
4217 -- Address_Clause --
4218 --------------------
4220 function Address_Clause (Id : E) return N is
4224 Ritem := First_Rep_Item (Id);
4225 while Present (Ritem) loop
4226 if Nkind (Ritem) = N_Attribute_Definition_Clause
4227 and then Chars (Ritem) = Name_Address
4231 Ritem := Next_Rep_Item (Ritem);
4238 ----------------------
4239 -- Alignment_Clause --
4240 ----------------------
4242 function Alignment_Clause (Id : E) return N is
4246 Ritem := First_Rep_Item (Id);
4247 while Present (Ritem) loop
4248 if Nkind (Ritem) = N_Attribute_Definition_Clause
4249 and then Chars (Ritem) = Name_Alignment
4253 Ritem := Next_Rep_Item (Ritem);
4258 end Alignment_Clause;
4260 ----------------------
4261 -- Ancestor_Subtype --
4262 ----------------------
4264 function Ancestor_Subtype (Id : E) return E is
4266 -- If this is first subtype, or is a base type, then there is no
4267 -- ancestor subtype, so we return Empty to indicate this fact.
4269 if Is_First_Subtype (Id)
4270 or else Id = Base_Type (Id)
4276 D : constant Node_Id := Declaration_Node (Id);
4279 -- If we have a subtype declaration, get the ancestor subtype
4281 if Nkind (D) = N_Subtype_Declaration then
4282 if Nkind (Subtype_Indication (D)) = N_Subtype_Indication then
4283 return Entity (Subtype_Mark (Subtype_Indication (D)));
4285 return Entity (Subtype_Indication (D));
4288 -- If not, then no subtype indication is available
4294 end Ancestor_Subtype;
4300 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
4302 if Last_Entity (V) = Empty then
4303 Set_First_Entity (V, Id);
4305 Set_Next_Entity (Last_Entity (V), Id);
4308 Set_Next_Entity (Id, Empty);
4310 Set_Last_Entity (V, Id);
4317 function Base_Type (Id : E) return E is
4320 when E_Enumeration_Subtype |
4321 E_Signed_Integer_Subtype |
4322 E_Modular_Integer_Subtype |
4323 E_Floating_Point_Subtype |
4324 E_Ordinary_Fixed_Point_Subtype |
4325 E_Decimal_Fixed_Point_Subtype |
4330 E_Record_Subtype_With_Private |
4331 E_Limited_Private_Subtype |
4333 E_Protected_Subtype |
4335 E_String_Literal_Subtype |
4336 E_Class_Wide_Subtype =>
4339 when E_Incomplete_Type =>
4340 if Present (Etype (Id)) then
4351 -------------------------
4352 -- Component_Alignment --
4353 -------------------------
4355 -- Component Alignment is encoded using two flags, Flag128/129 as
4356 -- follows. Note that both flags False = Align_Default, so that the
4357 -- default initialization of flags to False initializes component
4358 -- alignment to the default value as required.
4360 -- Flag128 Flag129 Value
4361 -- ------- ------- -----
4362 -- False False Calign_Default
4363 -- False True Calign_Component_Size
4364 -- True False Calign_Component_Size_4
4365 -- True True Calign_Storage_Unit
4367 function Component_Alignment (Id : E) return C is
4368 BT : Node_Id := Base_Type (Id);
4371 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
4373 if Flag128 (BT) then
4374 if Flag129 (BT) then
4375 return Calign_Storage_Unit;
4377 return Calign_Component_Size_4;
4381 if Flag129 (BT) then
4382 return Calign_Component_Size;
4384 return Calign_Default;
4387 end Component_Alignment;
4389 --------------------
4390 -- Constant_Value --
4391 --------------------
4393 function Constant_Value (Id : E) return N is
4394 D : constant Node_Id := Declaration_Node (Id);
4398 -- If we have no declaration node, then return no constant value.
4399 -- Not clear how this can happen, but it does sometimes ???
4400 -- To investigate, remove this check and compile discrim_po.adb.
4405 -- Normal case where a declaration node is present
4407 elsif Nkind (D) = N_Object_Renaming_Declaration then
4408 return Renamed_Object (Id);
4410 -- If this is a component declaration whose entity is constant, it
4411 -- is a prival within a protected function. It does not have
4412 -- a constant value.
4414 elsif Nkind (D) = N_Component_Declaration then
4418 if Present (Expression (D)) then
4419 return (Expression (D));
4421 elsif Present (Full_View (Id)) then
4422 Full_D := Parent (Full_View (Id));
4424 -- The full view may have been rewritten as an object renaming.
4426 if Nkind (Full_D) = N_Object_Renaming_Declaration then
4427 return Name (Full_D);
4429 return Expression (Full_D);
4437 ----------------------
4438 -- Declaration_Node --
4439 ----------------------
4441 function Declaration_Node (Id : E) return N is
4445 if Ekind (Id) = E_Incomplete_Type
4446 and then Present (Full_View (Id))
4448 P := Parent (Full_View (Id));
4454 if Nkind (P) /= N_Selected_Component
4455 and then Nkind (P) /= N_Expanded_Name
4457 not (Nkind (P) = N_Defining_Program_Unit_Name
4458 and then Is_Child_Unit (Id))
4466 end Declaration_Node;
4468 ---------------------
4469 -- Designated_Type --
4470 ---------------------
4472 function Designated_Type (Id : E) return E is
4476 Desig_Type := Directly_Designated_Type (Id);
4478 if (Ekind (Desig_Type) = E_Incomplete_Type
4479 and then Present (Full_View (Desig_Type)))
4481 return Full_View (Desig_Type);
4483 elsif Is_Class_Wide_Type (Desig_Type)
4484 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
4485 and then Present (Full_View (Etype (Desig_Type)))
4486 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
4488 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
4493 end Designated_Type;
4495 -----------------------------
4496 -- Enclosing_Dynamic_Scope --
4497 -----------------------------
4499 function Enclosing_Dynamic_Scope (Id : E) return E is
4504 while S /= Standard_Standard
4505 and then not Is_Dynamic_Scope (S)
4511 end Enclosing_Dynamic_Scope;
4513 ----------------------
4514 -- Entry_Index_Type --
4515 ----------------------
4517 function Entry_Index_Type (Id : E) return N is
4519 pragma Assert (Ekind (Id) = E_Entry_Family);
4520 return Etype (Discrete_Subtype_Definition (Parent (Id)));
4521 end Entry_Index_Type;
4523 ---------------------
4524 -- First_Component --
4525 ---------------------
4527 function First_Component (Id : E) return E is
4532 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
4534 Comp_Id := First_Entity (Id);
4536 while Present (Comp_Id) loop
4537 exit when Ekind (Comp_Id) = E_Component;
4538 Comp_Id := Next_Entity (Comp_Id);
4542 end First_Component;
4544 ------------------------
4545 -- First_Discriminant --
4546 ------------------------
4548 function First_Discriminant (Id : E) return E is
4553 (Has_Discriminants (Id)
4554 or else Has_Unknown_Discriminants (Id));
4556 Ent := First_Entity (Id);
4558 -- The discriminants are not necessarily contiguous, because access
4559 -- discriminants will generate itypes. They are not the first entities
4560 -- either, because tag and controller record must be ahead of them.
4562 if Chars (Ent) = Name_uTag then
4563 Ent := Next_Entity (Ent);
4566 if Chars (Ent) = Name_uController then
4567 Ent := Next_Entity (Ent);
4570 -- Skip all hidden girder discriminants if any.
4572 while Present (Ent) loop
4573 exit when Ekind (Ent) = E_Discriminant
4574 and then not Is_Completely_Hidden (Ent);
4576 Ent := Next_Entity (Ent);
4579 pragma Assert (Ekind (Ent) = E_Discriminant);
4582 end First_Discriminant;
4588 function First_Formal (Id : E) return E is
4593 (Is_Overloadable (Id)
4594 or else Ekind (Id) = E_Entry_Family
4595 or else Ekind (Id) = E_Subprogram_Body
4596 or else Ekind (Id) = E_Subprogram_Type);
4598 if Ekind (Id) = E_Enumeration_Literal then
4602 Formal := First_Entity (Id);
4604 if Present (Formal) and then Is_Formal (Formal) then
4612 -------------------------------
4613 -- First_Girder_Discriminant --
4614 -------------------------------
4616 function First_Girder_Discriminant (Id : E) return E is
4619 function Has_Completely_Hidden_Discriminant (Id : E) return Boolean;
4620 -- Scans the Discriminants to see whether any are Completely_Hidden
4621 -- (the mechanism for describing non-specified girder discriminants)
4623 function Has_Completely_Hidden_Discriminant (Id : E) return Boolean is
4624 Ent : Entity_Id := Id;
4627 pragma Assert (Ekind (Id) = E_Discriminant);
4629 while Present (Ent) and then Ekind (Ent) = E_Discriminant loop
4631 if Is_Completely_Hidden (Ent) then
4635 Ent := Next_Entity (Ent);
4639 end Has_Completely_Hidden_Discriminant;
4641 -- Start of processing for First_Girder_Discriminant
4645 (Has_Discriminants (Id)
4646 or else Has_Unknown_Discriminants (Id));
4648 Ent := First_Entity (Id);
4650 if Chars (Ent) = Name_uTag then
4651 Ent := Next_Entity (Ent);
4654 if Chars (Ent) = Name_uController then
4655 Ent := Next_Entity (Ent);
4658 if Has_Completely_Hidden_Discriminant (Ent) then
4660 while Present (Ent) loop
4661 exit when Is_Completely_Hidden (Ent);
4662 Ent := Next_Entity (Ent);
4667 pragma Assert (Ekind (Ent) = E_Discriminant);
4670 end First_Girder_Discriminant;
4676 function First_Subtype (Id : E) return E is
4677 B : constant Entity_Id := Base_Type (Id);
4678 F : constant Node_Id := Freeze_Node (B);
4682 -- If the base type has no freeze node, it is a type in standard,
4683 -- and always acts as its own first subtype unless it is one of
4684 -- the predefined integer types. If the type is formal, it is also
4685 -- a first subtype, and its base type has no freeze node. On the other
4686 -- hand, a subtype of a generic formal is not its own first_subtype.
4687 -- Its base type, if anonymous, is attached to the formal type decl.
4688 -- from which the first subtype is obtained.
4692 if B = Base_Type (Standard_Integer) then
4693 return Standard_Integer;
4695 elsif B = Base_Type (Standard_Long_Integer) then
4696 return Standard_Long_Integer;
4698 elsif B = Base_Type (Standard_Short_Short_Integer) then
4699 return Standard_Short_Short_Integer;
4701 elsif B = Base_Type (Standard_Short_Integer) then
4702 return Standard_Short_Integer;
4704 elsif B = Base_Type (Standard_Long_Long_Integer) then
4705 return Standard_Long_Long_Integer;
4707 elsif Is_Generic_Type (Id) then
4708 if Present (Parent (B)) then
4709 return Defining_Identifier (Parent (B));
4711 return Defining_Identifier (Associated_Node_For_Itype (B));
4718 -- Otherwise we check the freeze node, if it has a First_Subtype_Link
4719 -- then we use that link, otherwise (happens with some Itypes), we use
4720 -- the base type itself.
4723 Ent := First_Subtype_Link (F);
4725 if Present (Ent) then
4733 -------------------------------------
4734 -- Get_Attribute_Definition_Clause --
4735 -------------------------------------
4737 function Get_Attribute_Definition_Clause
4745 N := First_Rep_Item (E);
4746 while Present (N) loop
4747 if Nkind (N) = N_Attribute_Definition_Clause
4748 and then Get_Attribute_Id (Chars (N)) = Id
4757 end Get_Attribute_Definition_Clause;
4759 --------------------
4760 -- Get_Rep_Pragma --
4761 --------------------
4763 function Get_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Node_Id is
4768 N := First_Rep_Item (E);
4770 while Present (N) loop
4771 if Nkind (N) = N_Pragma and then Chars (N) = Nam then
4773 if Nam = Name_Stream_Convert then
4775 -- For tagged types this pragma is not inherited, so we
4776 -- must verify that it is defined for the given type and
4779 Typ := Entity (Expression
4780 (First (Pragma_Argument_Associations (N))));
4782 if not Is_Tagged_Type (E)
4784 or else (Is_Private_Type (Typ)
4785 and then E = Full_View (Typ))
4803 ------------------------
4804 -- Has_Attach_Handler --
4805 ------------------------
4807 function Has_Attach_Handler (Id : E) return B is
4811 pragma Assert (Is_Protected_Type (Id));
4813 Ritem := First_Rep_Item (Id);
4814 while Present (Ritem) loop
4815 if Nkind (Ritem) = N_Pragma
4816 and then Chars (Ritem) = Name_Attach_Handler
4820 Ritem := Next_Rep_Item (Ritem);
4825 end Has_Attach_Handler;
4831 function Has_Entries (Id : E) return B is
4832 Result : Boolean := False;
4836 pragma Assert (Is_Concurrent_Type (Id));
4837 Ent := First_Entity (Id);
4839 while Present (Ent) loop
4840 if Is_Entry (Ent) then
4845 Ent := Next_Entity (Ent);
4851 ----------------------------
4852 -- Has_Foreign_Convention --
4853 ----------------------------
4855 function Has_Foreign_Convention (Id : E) return B is
4857 return Convention (Id) >= Foreign_Convention'First;
4858 end Has_Foreign_Convention;
4860 ---------------------------
4861 -- Has_Interrupt_Handler --
4862 ---------------------------
4864 function Has_Interrupt_Handler (Id : E) return B is
4868 pragma Assert (Is_Protected_Type (Id));
4870 Ritem := First_Rep_Item (Id);
4871 while Present (Ritem) loop
4872 if Nkind (Ritem) = N_Pragma
4873 and then Chars (Ritem) = Name_Interrupt_Handler
4877 Ritem := Next_Rep_Item (Ritem);
4882 end Has_Interrupt_Handler;
4884 --------------------------
4885 -- Has_Private_Ancestor --
4886 --------------------------
4888 function Has_Private_Ancestor (Id : E) return B is
4889 R : constant Entity_Id := Root_Type (Id);
4890 T1 : Entity_Id := Id;
4894 if Is_Private_Type (T1) then
4904 end Has_Private_Ancestor;
4906 ------------------------------
4907 -- Implementation_Base_Type --
4908 ------------------------------
4910 function Implementation_Base_Type (Id : E) return E is
4915 Bastyp := Base_Type (Id);
4917 if Is_Incomplete_Or_Private_Type (Bastyp) then
4918 Imptyp := Underlying_Type (Bastyp);
4920 -- If we have an implementation type, then just return it,
4921 -- otherwise we return the Base_Type anyway. This can only
4922 -- happen in error situations and should avoid some error bombs.
4924 if Present (Imptyp) then
4925 return Base_Type (Imptyp);
4933 end Implementation_Base_Type;
4935 -----------------------
4936 -- Is_Always_Inlined --
4937 -----------------------
4939 function Is_Always_Inlined (Id : E) return B is
4943 Item := First_Rep_Item (Id);
4945 while Present (Item) loop
4946 if Nkind (Item) = N_Pragma
4947 and then Get_Pragma_Id (Chars (Item)) = Pragma_Inline_Always
4952 Next_Rep_Item (Item);
4956 end Is_Always_Inlined;
4958 ---------------------
4959 -- Is_Boolean_Type --
4960 ---------------------
4962 function Is_Boolean_Type (Id : E) return B is
4964 return Root_Type (Id) = Standard_Boolean;
4965 end Is_Boolean_Type;
4967 ---------------------
4968 -- Is_By_Copy_Type --
4969 ---------------------
4971 function Is_By_Copy_Type (Id : E) return B is
4973 -- If Id is a private type whose full declaration has not been seen,
4974 -- we assume for now that it is not a By_Copy type. Clearly this
4975 -- attribute should not be used before the type is frozen, but it is
4976 -- needed to build the associated record of a protected type. Another
4977 -- place where some lookahead for a full view is needed ???
4980 Is_Elementary_Type (Id)
4981 or else (Is_Private_Type (Id)
4982 and then Present (Underlying_Type (Id))
4983 and then Is_Elementary_Type (Underlying_Type (Id)));
4984 end Is_By_Copy_Type;
4986 --------------------------
4987 -- Is_By_Reference_Type --
4988 --------------------------
4990 function Is_By_Reference_Type (Id : E) return B is
4991 Btype : constant Entity_Id := Base_Type (Id);
4994 if Error_Posted (Id)
4995 or else Error_Posted (Btype)
4999 elsif Is_Private_Type (Btype) then
5001 Utyp : constant Entity_Id := Underlying_Type (Btype);
5007 return Is_By_Reference_Type (Utyp);
5011 elsif Is_Concurrent_Type (Btype) then
5014 elsif Is_Record_Type (Btype) then
5016 if Is_Limited_Record (Btype)
5017 or else Is_Tagged_Type (Btype)
5018 or else Is_Volatile (Btype)
5024 C : Entity_Id := First_Component (Btype);
5027 while Present (C) loop
5028 if Is_By_Reference_Type (Etype (C))
5029 or else Is_Volatile (Etype (C))
5034 C := Next_Component (C);
5041 elsif Is_Array_Type (Btype) then
5044 or else Is_By_Reference_Type (Component_Type (Btype))
5045 or else Is_Volatile (Component_Type (Btype))
5046 or else Has_Volatile_Components (Btype);
5051 end Is_By_Reference_Type;
5053 ---------------------
5054 -- Is_Derived_Type --
5055 ---------------------
5057 function Is_Derived_Type (Id : E) return B is
5061 if Base_Type (Id) /= Root_Type (Id)
5062 and then not Is_Generic_Type (Id)
5063 and then not Is_Class_Wide_Type (Id)
5065 if not Is_Numeric_Type (Root_Type (Id)) then
5069 Par := Parent (First_Subtype (Id));
5071 return Present (Par)
5072 and then Nkind (Par) = N_Full_Type_Declaration
5073 and then Nkind (Type_Definition (Par))
5074 = N_Derived_Type_Definition;
5080 end Is_Derived_Type;
5082 ----------------------
5083 -- Is_Dynamic_Scope --
5084 ----------------------
5086 function Is_Dynamic_Scope (Id : E) return B is
5089 Ekind (Id) = E_Block
5091 Ekind (Id) = E_Function
5093 Ekind (Id) = E_Procedure
5095 Ekind (Id) = E_Subprogram_Body
5097 Ekind (Id) = E_Task_Type
5099 Ekind (Id) = E_Entry
5101 Ekind (Id) = E_Entry_Family;
5102 end Is_Dynamic_Scope;
5104 --------------------
5105 -- Is_Entity_Name --
5106 --------------------
5108 function Is_Entity_Name (N : Node_Id) return Boolean is
5109 Kind : constant Node_Kind := Nkind (N);
5112 -- Identifiers, operator symbols, expanded names are entity names
5114 return Kind = N_Identifier
5115 or else Kind = N_Operator_Symbol
5116 or else Kind = N_Expanded_Name
5118 -- Attribute references are entity names if they refer to an entity.
5119 -- Note that we don't do this by testing for the presence of the
5120 -- Entity field in the N_Attribute_Reference node, since it may not
5121 -- have been set yet.
5123 or else (Kind = N_Attribute_Reference
5124 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
5127 ---------------------------
5128 -- Is_Indefinite_Subtype --
5129 ---------------------------
5131 function Is_Indefinite_Subtype (Id : Entity_Id) return B is
5132 K : constant Entity_Kind := Ekind (Id);
5135 if Is_Constrained (Id) then
5138 elsif K in Array_Kind
5139 or else K in Class_Wide_Kind
5140 or else Has_Unknown_Discriminants (Id)
5144 -- Known discriminants: indefinite if there are no default values
5146 elsif K in Record_Kind
5147 or else Is_Incomplete_Or_Private_Type (Id)
5148 or else Is_Concurrent_Type (Id)
5150 return (Has_Discriminants (Id)
5151 and then No (Discriminant_Default_Value (First_Discriminant (Id))));
5156 end Is_Indefinite_Subtype;
5158 ---------------------
5159 -- Is_Limited_Type --
5160 ---------------------
5162 function Is_Limited_Type (Id : E) return B is
5163 Btype : constant E := Base_Type (Id);
5166 if not Is_Type (Id) then
5169 elsif Ekind (Btype) = E_Limited_Private_Type
5170 or else Is_Limited_Composite (Btype)
5174 elsif Is_Concurrent_Type (Btype) then
5177 -- Otherwise we will look around to see if there is some other reason
5178 -- for it to be limited, except that if an error was posted on the
5179 -- entity, then just assume it is non-limited, because it can cause
5180 -- trouble to recurse into a murky erroneous entity!
5182 elsif Error_Posted (Id) then
5185 elsif Is_Record_Type (Btype) then
5186 if Is_Limited_Record (Root_Type (Btype)) then
5189 elsif Is_Class_Wide_Type (Btype) then
5190 return Is_Limited_Type (Root_Type (Btype));
5194 C : E := First_Component (Btype);
5197 while Present (C) loop
5198 if Is_Limited_Type (Etype (C)) then
5202 C := Next_Component (C);
5209 elsif Is_Array_Type (Btype) then
5210 return Is_Limited_Type (Component_Type (Btype));
5215 end Is_Limited_Type;
5221 function Is_Package (Id : E) return B is
5224 Ekind (Id) = E_Package
5226 Ekind (Id) = E_Generic_Package;
5229 --------------------------
5230 -- Is_Protected_Private --
5231 --------------------------
5233 function Is_Protected_Private (Id : E) return B is
5236 pragma Assert (Ekind (Id) = E_Component);
5237 return Is_Protected_Type (Scope (Id));
5238 end Is_Protected_Private;
5240 ------------------------------
5241 -- Is_Protected_Record_Type --
5242 ------------------------------
5244 function Is_Protected_Record_Type (Id : E) return B is
5247 Is_Concurrent_Record_Type (Id)
5248 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
5249 end Is_Protected_Record_Type;
5251 ---------------------------------
5252 -- Is_Return_By_Reference_Type --
5253 ---------------------------------
5255 function Is_Return_By_Reference_Type (Id : E) return B is
5256 Btype : constant Entity_Id := Base_Type (Id);
5259 if Is_Private_Type (Btype) then
5261 Utyp : constant Entity_Id := Underlying_Type (Btype);
5267 return Is_Return_By_Reference_Type (Utyp);
5271 elsif Is_Concurrent_Type (Btype) then
5274 elsif Is_Record_Type (Btype) then
5275 if Is_Limited_Record (Btype) then
5278 elsif Is_Class_Wide_Type (Btype) then
5279 return Is_Return_By_Reference_Type (Root_Type (Btype));
5283 C : Entity_Id := First_Component (Btype);
5286 while Present (C) loop
5287 if Is_Return_By_Reference_Type (Etype (C)) then
5291 C := Next_Component (C);
5298 elsif Is_Array_Type (Btype) then
5299 return Is_Return_By_Reference_Type (Component_Type (Btype));
5304 end Is_Return_By_Reference_Type;
5306 --------------------
5307 -- Is_String_Type --
5308 --------------------
5310 function Is_String_Type (Id : E) return B is
5312 return Ekind (Id) in String_Kind
5313 or else (Is_Array_Type (Id)
5314 and then Number_Dimensions (Id) = 1
5315 and then Is_Character_Type (Component_Type (Id)));
5318 -------------------------
5319 -- Is_Task_Record_Type --
5320 -------------------------
5322 function Is_Task_Record_Type (Id : E) return B is
5325 Is_Concurrent_Record_Type (Id)
5326 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
5327 end Is_Task_Record_Type;
5329 ------------------------
5330 -- Is_Wrapper_Package --
5331 ------------------------
5333 function Is_Wrapper_Package (Id : E) return B is
5335 return (Ekind (Id) = E_Package
5336 and then Present (Related_Instance (Id)));
5337 end Is_Wrapper_Package;
5339 --------------------
5340 -- Next_Component --
5341 --------------------
5343 function Next_Component (Id : E) return E is
5347 Comp_Id := Next_Entity (Id);
5349 while Present (Comp_Id) loop
5350 exit when Ekind (Comp_Id) = E_Component;
5351 Comp_Id := Next_Entity (Comp_Id);
5357 -----------------------
5358 -- Next_Discriminant --
5359 -----------------------
5361 -- This function actually implements both Next_Discriminant and
5362 -- Next_Girder_Discriminant by making sure that the Discriminant
5363 -- returned is of the same variety as Id.
5365 function Next_Discriminant (Id : E) return E is
5367 -- Derived Tagged types with private extensions look like this...
5369 -- E_Discriminant d1
5370 -- E_Discriminant d2
5372 -- E_Discriminant d1
5373 -- E_Discriminant d2
5375 -- so it is critical not to go past the leading discriminants.
5380 pragma Assert (Ekind (Id) = E_Discriminant);
5383 D := Next_Entity (D);
5385 or else (Ekind (D) /= E_Discriminant
5386 and then not Is_Itype (D))
5391 exit when Ekind (D) = E_Discriminant
5392 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
5396 end Next_Discriminant;
5402 function Next_Formal (Id : E) return E is
5406 -- Follow the chain of declared entities as long as the kind of
5407 -- the entity corresponds to a formal parameter. Skip internal
5408 -- entities that may have been created for implicit subtypes,
5409 -- in the process of analyzing default expressions.
5414 P := Next_Entity (P);
5416 if No (P) or else Is_Formal (P) then
5418 elsif not Is_Internal (P) then
5424 -----------------------------
5425 -- Next_Formal_With_Extras --
5426 -----------------------------
5428 function Next_Formal_With_Extras (Id : E) return E is
5430 if Present (Extra_Formal (Id)) then
5431 return Extra_Formal (Id);
5434 return Next_Formal (Id);
5436 end Next_Formal_With_Extras;
5438 ------------------------------
5439 -- Next_Girder_Discriminant --
5440 ------------------------------
5442 function Next_Girder_Discriminant (Id : E) return E is
5444 -- See comment in Next_Discriminant
5446 return Next_Discriminant (Id);
5447 end Next_Girder_Discriminant;
5453 function Next_Index (Id : Node_Id) return Node_Id is
5462 function Next_Literal (Id : E) return E is
5464 pragma Assert (Nkind (Id) in N_Entity);
5468 -----------------------
5469 -- Number_Dimensions --
5470 -----------------------
5472 function Number_Dimensions (Id : E) return Pos is
5477 if Ekind (Id) in String_Kind then
5482 T := First_Index (Id);
5484 while Present (T) loop
5491 end Number_Dimensions;
5493 --------------------------
5494 -- Number_Discriminants --
5495 --------------------------
5497 function Number_Discriminants (Id : E) return Pos is
5503 Discr := First_Discriminant (Id);
5505 while Present (Discr) loop
5507 Discr := Next_Discriminant (Discr);
5511 end Number_Discriminants;
5513 --------------------
5514 -- Number_Entries --
5515 --------------------
5517 function Number_Entries (Id : E) return Nat is
5522 pragma Assert (Is_Concurrent_Type (Id));
5524 Ent := First_Entity (Id);
5526 while Present (Ent) loop
5527 if Is_Entry (Ent) then
5531 Ent := Next_Entity (Ent);
5537 --------------------
5538 -- Number_Formals --
5539 --------------------
5541 function Number_Formals (Id : E) return Pos is
5547 Formal := First_Formal (Id);
5549 while Present (Formal) loop
5551 Formal := Next_Formal (Formal);
5557 --------------------
5558 -- Parameter_Mode --
5559 --------------------
5561 function Parameter_Mode (Id : E) return Formal_Kind is
5570 function Root_Type (Id : E) return E is
5574 pragma Assert (Nkind (Id) in N_Entity);
5576 T := Base_Type (Id);
5578 if Ekind (T) = E_Class_Wide_Type then
5590 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
5593 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
5601 raise Program_Error;
5608 function Scope_Depth (Id : E) return Uint is
5609 Scop : Entity_Id := Id;
5612 while Is_Record_Type (Scop) loop
5613 Scop := Scope (Scop);
5616 return Scope_Depth_Value (Scop);
5619 ---------------------
5620 -- Scope_Depth_Set --
5621 ---------------------
5623 function Scope_Depth_Set (Id : E) return B is
5625 return not Is_Record_Type (Id)
5626 and then Field22 (Id) /= Union_Id (Empty);
5627 end Scope_Depth_Set;
5629 -----------------------------
5630 -- Set_Component_Alignment --
5631 -----------------------------
5633 -- Component Alignment is encoded using two flags, Flag128/129 as
5634 -- follows. Note that both flags False = Align_Default, so that the
5635 -- default initialization of flags to False initializes component
5636 -- alignment to the default value as required.
5638 -- Flag128 Flag129 Value
5639 -- ------- ------- -----
5640 -- False False Calign_Default
5641 -- False True Calign_Component_Size
5642 -- True False Calign_Component_Size_4
5643 -- True True Calign_Storage_Unit
5645 procedure Set_Component_Alignment (Id : E; V : C) is
5647 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
5648 and then Id = Base_Type (Id));
5651 when Calign_Default =>
5652 Set_Flag128 (Id, False);
5653 Set_Flag129 (Id, False);
5655 when Calign_Component_Size =>
5656 Set_Flag128 (Id, False);
5657 Set_Flag129 (Id, True);
5659 when Calign_Component_Size_4 =>
5660 Set_Flag128 (Id, True);
5661 Set_Flag129 (Id, False);
5663 when Calign_Storage_Unit =>
5664 Set_Flag128 (Id, True);
5665 Set_Flag129 (Id, True);
5667 end Set_Component_Alignment;
5673 function Size_Clause (Id : E) return N is
5677 Ritem := First_Rep_Item (Id);
5678 while Present (Ritem) loop
5679 if Nkind (Ritem) = N_Attribute_Definition_Clause
5680 and then Chars (Ritem) = Name_Size
5684 Ritem := Next_Rep_Item (Ritem);
5695 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
5701 Kind := E_Access_Subtype;
5705 Kind := E_Array_Subtype;
5707 when E_Class_Wide_Type |
5708 E_Class_Wide_Subtype =>
5709 Kind := E_Class_Wide_Subtype;
5711 when E_Decimal_Fixed_Point_Type |
5712 E_Decimal_Fixed_Point_Subtype =>
5713 Kind := E_Decimal_Fixed_Point_Subtype;
5715 when E_Ordinary_Fixed_Point_Type |
5716 E_Ordinary_Fixed_Point_Subtype =>
5717 Kind := E_Ordinary_Fixed_Point_Subtype;
5719 when E_Private_Type |
5720 E_Private_Subtype =>
5721 Kind := E_Private_Subtype;
5723 when E_Limited_Private_Type |
5724 E_Limited_Private_Subtype =>
5725 Kind := E_Limited_Private_Subtype;
5727 when E_Record_Type_With_Private |
5728 E_Record_Subtype_With_Private =>
5729 Kind := E_Record_Subtype_With_Private;
5731 when E_Record_Type |
5733 Kind := E_Record_Subtype;
5735 when E_String_Type |
5737 Kind := E_String_Subtype;
5739 when Enumeration_Kind =>
5740 Kind := E_Enumeration_Subtype;
5743 Kind := E_Floating_Point_Subtype;
5745 when Signed_Integer_Kind =>
5746 Kind := E_Signed_Integer_Subtype;
5748 when Modular_Integer_Kind =>
5749 Kind := E_Modular_Integer_Subtype;
5751 when Protected_Kind =>
5752 Kind := E_Protected_Subtype;
5755 Kind := E_Task_Subtype;
5759 raise Program_Error;
5769 function Tag_Component (Id : E) return E is
5771 Typ : Entity_Id := Id;
5774 pragma Assert (Is_Tagged_Type (Typ));
5776 if Is_Class_Wide_Type (Typ) then
5777 Typ := Root_Type (Typ);
5780 if Is_Private_Type (Typ) then
5781 Typ := Underlying_Type (Typ);
5784 Comp := First_Entity (Typ);
5785 while Present (Comp) loop
5786 if Is_Tag (Comp) then
5790 Comp := Next_Entity (Comp);
5793 -- No tag component found
5798 ---------------------
5799 -- Type_High_Bound --
5800 ---------------------
5802 function Type_High_Bound (Id : E) return Node_Id is
5804 if Nkind (Scalar_Range (Id)) = N_Subtype_Indication then
5805 return High_Bound (Range_Expression (Constraint (Scalar_Range (Id))));
5807 return High_Bound (Scalar_Range (Id));
5809 end Type_High_Bound;
5811 --------------------
5812 -- Type_Low_Bound --
5813 --------------------
5815 function Type_Low_Bound (Id : E) return Node_Id is
5817 if Nkind (Scalar_Range (Id)) = N_Subtype_Indication then
5818 return Low_Bound (Range_Expression (Constraint (Scalar_Range (Id))));
5820 return Low_Bound (Scalar_Range (Id));
5824 ---------------------
5825 -- Underlying_Type --
5826 ---------------------
5828 function Underlying_Type (Id : E) return E is
5831 -- For record_with_private the underlying type is always the direct
5832 -- full view. Never try to take the full view of the parent it
5833 -- doesn't make sense.
5835 if Ekind (Id) = E_Record_Type_With_Private then
5836 return Full_View (Id);
5838 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
5840 -- If we have an incomplete or private type with a full view,
5841 -- then we return the Underlying_Type of this full view
5843 if Present (Full_View (Id)) then
5844 return Underlying_Type (Full_View (Id));
5846 -- Otherwise check for the case where we have a derived type or
5847 -- subtype, and if so get the Underlying_Type of the parent type.
5849 elsif Etype (Id) /= Id then
5850 return Underlying_Type (Etype (Id));
5852 -- Otherwise we have an incomplete or private type that has
5853 -- no full view, which means that we have not encountered the
5854 -- completion, so return Empty to indicate the underlying type
5855 -- is not yet known.
5861 -- For non-incomplete, non-private types, return the type itself
5862 -- Also for entities that are not types at all return the entity
5868 end Underlying_Type;
5870 ------------------------
5871 -- Write_Entity_Flags --
5872 ------------------------
5874 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
5876 procedure W (Flag_Name : String; Flag : Boolean);
5877 -- Write out given flag if it is set
5879 procedure W (Flag_Name : String; Flag : Boolean) is
5883 Write_Str (Flag_Name);
5884 Write_Str (" = True");
5889 -- Start of processing for Write_Entity_Flags
5892 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
5893 and then Base_Type (Id) = Id
5896 Write_Str ("Component_Alignment = ");
5898 case Component_Alignment (Id) is
5899 when Calign_Default =>
5900 Write_Str ("Calign_Default");
5902 when Calign_Component_Size =>
5903 Write_Str ("Calign_Component_Size");
5905 when Calign_Component_Size_4 =>
5906 Write_Str ("Calign_Component_Size_4");
5908 when Calign_Storage_Unit =>
5909 Write_Str ("Calign_Storage_Unit");
5915 W ("Address_Taken", Flag104 (Id));
5916 W ("C_Pass_By_Copy", Flag125 (Id));
5917 W ("Debug_Info_Off", Flag166 (Id));
5918 W ("Default_Expressions_Processed", Flag108 (Id));
5919 W ("Delay_Cleanups", Flag114 (Id));
5920 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
5921 W ("Depends_On_Private", Flag14 (Id));
5922 W ("Discard_Names", Flag88 (Id));
5923 W ("Elaborate_All_Desirable", Flag146 (Id));
5924 W ("Elaboration_Entity_Required", Flag174 (Id));
5925 W ("Entry_Accepted", Flag152 (Id));
5926 W ("Finalize_Storage_Only", Flag158 (Id));
5927 W ("From_With_Type", Flag159 (Id));
5928 W ("Function_Returns_With_DSP", Flag169 (Id));
5929 W ("Has_Aliased_Components", Flag135 (Id));
5930 W ("Has_Alignment_Clause", Flag46 (Id));
5931 W ("Has_All_Calls_Remote", Flag79 (Id));
5932 W ("Has_Atomic_Components", Flag86 (Id));
5933 W ("Has_Biased_Representation", Flag139 (Id));
5934 W ("Has_Completion", Flag26 (Id));
5935 W ("Has_Completion_In_Body", Flag71 (Id));
5936 W ("Has_Complex_Representation", Flag140 (Id));
5937 W ("Has_Component_Size_Clause", Flag68 (Id));
5938 W ("Has_Controlled_Component", Flag43 (Id));
5939 W ("Has_Controlling_Result", Flag98 (Id));
5940 W ("Has_Convention_Pragma", Flag119 (Id));
5941 W ("Has_Delayed_Freeze", Flag18 (Id));
5942 W ("Has_Discriminants", Flag5 (Id));
5943 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
5944 W ("Has_Exit", Flag47 (Id));
5945 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
5946 W ("Has_Forward_Instantiation", Flag175 (Id));
5947 W ("Has_Fully_Qualified_Name", Flag173 (Id));
5948 W ("Has_Gigi_Rep_Item", Flag82 (Id));
5949 W ("Has_Homonym", Flag56 (Id));
5950 W ("Has_Machine_Radix_Clause", Flag83 (Id));
5951 W ("Has_Master_Entity", Flag21 (Id));
5952 W ("Has_Missing_Return", Flag142 (Id));
5953 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
5954 W ("Has_Non_Standard_Rep", Flag75 (Id));
5955 W ("Has_Object_Size_Clause", Flag172 (Id));
5956 W ("Has_Per_Object_Constraint", Flag154 (Id));
5957 W ("Has_Pragma_Controlled", Flag27 (Id));
5958 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
5959 W ("Has_Pragma_Inline", Flag157 (Id));
5960 W ("Has_Pragma_Pack", Flag121 (Id));
5961 W ("Has_Pragma_Pure_Function", Flag179 (Id));
5962 W ("Has_Pragma_Unreferenced", Flag180 (Id));
5963 W ("Has_Primitive_Operations", Flag120 (Id));
5964 W ("Has_Private_Declaration", Flag155 (Id));
5965 W ("Has_Qualified_Name", Flag161 (Id));
5966 W ("Has_Record_Rep_Clause", Flag65 (Id));
5967 W ("Has_Recursive_Call", Flag143 (Id));
5968 W ("Has_Size_Clause", Flag29 (Id));
5969 W ("Has_Small_Clause", Flag67 (Id));
5970 W ("Has_Specified_Layout", Flag100 (Id));
5971 W ("Has_Storage_Size_Clause", Flag23 (Id));
5972 W ("Has_Subprogram_Descriptor", Flag93 (Id));
5973 W ("Has_Task", Flag30 (Id));
5974 W ("Has_Unchecked_Union", Flag123 (Id));
5975 W ("Has_Unknown_Discriminants", Flag72 (Id));
5976 W ("Has_Volatile_Components", Flag87 (Id));
5977 W ("In_Package_Body", Flag48 (Id));
5978 W ("In_Private_Part", Flag45 (Id));
5979 W ("In_Use", Flag8 (Id));
5980 W ("Is_AST_Entry", Flag132 (Id));
5981 W ("Is_Abstract", Flag19 (Id));
5982 W ("Is_Access_Constant", Flag69 (Id));
5983 W ("Is_Aliased", Flag15 (Id));
5984 W ("Is_Asynchronous", Flag81 (Id));
5985 W ("Is_Atomic", Flag85 (Id));
5986 W ("Is_Bit_Packed_Array", Flag122 (Id));
5987 W ("Is_CPP_Class", Flag74 (Id));
5988 W ("Is_Called", Flag102 (Id));
5989 W ("Is_Character_Type", Flag63 (Id));
5990 W ("Is_Child_Unit", Flag73 (Id));
5991 W ("Is_Compilation_Unit", Flag149 (Id));
5992 W ("Is_Completely_Hidden", Flag103 (Id));
5993 W ("Is_Concurrent_Record_Type", Flag20 (Id));
5994 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
5995 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
5996 W ("Is_Constrained", Flag12 (Id));
5997 W ("Is_Constructor", Flag76 (Id));
5998 W ("Is_Controlled", Flag42 (Id));
5999 W ("Is_Controlling_Formal", Flag97 (Id));
6000 W ("Is_Destructor", Flag77 (Id));
6001 W ("Is_Discrim_SO_Function", Flag176 (Id));
6002 W ("Is_Dispatching_Operation", Flag6 (Id));
6003 W ("Is_Eliminated", Flag124 (Id));
6004 W ("Is_Entry_Formal", Flag52 (Id));
6005 W ("Is_Exported", Flag99 (Id));
6006 W ("Is_First_Subtype", Flag70 (Id));
6007 W ("Is_For_Access_Subtype", Flag118 (Id));
6008 W ("Is_Formal_Subprogram", Flag111 (Id));
6009 W ("Is_Frozen", Flag4 (Id));
6010 W ("Is_Generic_Actual_Type", Flag94 (Id));
6011 W ("Is_Generic_Instance", Flag130 (Id));
6012 W ("Is_Generic_Type", Flag13 (Id));
6013 W ("Is_Hidden", Flag57 (Id));
6014 W ("Is_Hidden_Open_Scope", Flag171 (Id));
6015 W ("Is_Immediately_Visible", Flag7 (Id));
6016 W ("Is_Imported", Flag24 (Id));
6017 W ("Is_Inlined", Flag11 (Id));
6018 W ("Is_Instantiated", Flag126 (Id));
6019 W ("Is_Internal", Flag17 (Id));
6020 W ("Is_Interrupt_Handler", Flag89 (Id));
6021 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
6022 W ("Is_Itype", Flag91 (Id));
6023 W ("Is_Known_Valid", Flag170 (Id));
6024 W ("Is_Limited_Composite", Flag106 (Id));
6025 W ("Is_Limited_Record", Flag25 (Id));
6026 W ("Is_Non_Static_Subtype", Flag109 (Id));
6027 W ("Is_Null_Init_Proc", Flag178 (Id));
6028 W ("Is_Optional_Parameter", Flag134 (Id));
6029 W ("Is_Package_Body_Entity", Flag160 (Id));
6030 W ("Is_Packed", Flag51 (Id));
6031 W ("Is_Packed_Array_Type", Flag138 (Id));
6032 W ("Is_Potentially_Use_Visible", Flag9 (Id));
6033 W ("Is_Preelaborated", Flag59 (Id));
6034 W ("Is_Private_Composite", Flag107 (Id));
6035 W ("Is_Private_Descendant", Flag53 (Id));
6036 W ("Is_Psected", Flag153 (Id));
6037 W ("Is_Public", Flag10 (Id));
6038 W ("Is_Pure", Flag44 (Id));
6039 W ("Is_Remote_Call_Interface", Flag62 (Id));
6040 W ("Is_Remote_Types", Flag61 (Id));
6041 W ("Is_Renaming_Of_Object", Flag112 (Id));
6042 W ("Is_Shared_Passive", Flag60 (Id));
6043 W ("Is_Statically_Allocated", Flag28 (Id));
6044 W ("Is_Tag", Flag78 (Id));
6045 W ("Is_Tagged_Type", Flag55 (Id));
6046 W ("Is_True_Constant", Flag163 (Id));
6047 W ("Is_Unchecked_Union", Flag117 (Id));
6048 W ("Is_Unsigned_Type", Flag144 (Id));
6049 W ("Is_VMS_Exception", Flag133 (Id));
6050 W ("Is_Valued_Procedure", Flag127 (Id));
6051 W ("Is_Visible_Child_Unit", Flag116 (Id));
6052 W ("Is_Volatile", Flag16 (Id));
6053 W ("Machine_Radix_10", Flag84 (Id));
6054 W ("Materialize_Entity", Flag168 (Id));
6055 W ("Needs_Debug_Info", Flag147 (Id));
6056 W ("Needs_No_Actuals", Flag22 (Id));
6057 W ("No_Pool_Assigned", Flag131 (Id));
6058 W ("No_Return", Flag113 (Id));
6059 W ("Non_Binary_Modulus", Flag58 (Id));
6060 W ("Nonzero_Is_True", Flag162 (Id));
6061 W ("Not_Source_Assigned", Flag115 (Id));
6062 W ("Reachable", Flag49 (Id));
6063 W ("Referenced", Flag156 (Id));
6064 W ("Return_Present", Flag54 (Id));
6065 W ("Returns_By_Ref", Flag90 (Id));
6066 W ("Reverse_Bit_Order", Flag164 (Id));
6067 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
6068 W ("Size_Depends_On_Discriminant", Flag177 (Id));
6069 W ("Size_Known_At_Compile_Time", Flag92 (Id));
6070 W ("Strict_Alignment", Flag145 (Id));
6071 W ("Suppress_Access_Checks", Flag31 (Id));
6072 W ("Suppress_Accessibility_Checks", Flag32 (Id));
6073 W ("Suppress_Discriminant_Checks", Flag33 (Id));
6074 W ("Suppress_Division_Checks", Flag34 (Id));
6075 W ("Suppress_Elaboration_Checks", Flag35 (Id));
6076 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
6077 W ("Suppress_Index_Checks", Flag36 (Id));
6078 W ("Suppress_Init_Proc", Flag105 (Id));
6079 W ("Suppress_Length_Checks", Flag37 (Id));
6080 W ("Suppress_Overflow_Checks", Flag38 (Id));
6081 W ("Suppress_Range_Checks", Flag39 (Id));
6082 W ("Suppress_Storage_Checks", Flag40 (Id));
6083 W ("Suppress_Style_Checks", Flag165 (Id));
6084 W ("Suppress_Tag_Checks", Flag41 (Id));
6085 W ("Uses_Sec_Stack", Flag95 (Id));
6086 W ("Vax_Float", Flag151 (Id));
6087 W ("Warnings_Off", Flag96 (Id));
6089 end Write_Entity_Flags;
6091 -----------------------
6092 -- Write_Entity_Info --
6093 -----------------------
6095 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
6097 procedure Write_Attribute (Which : String; Nam : E);
6098 -- Write attribute value with given string name
6100 procedure Write_Kind (Id : Entity_Id);
6101 -- Write Ekind field of entity
6103 procedure Write_Attribute (Which : String; Nam : E) is
6107 Write_Int (Int (Nam));
6109 Write_Name (Chars (Nam));
6111 end Write_Attribute;
6113 procedure Write_Kind (Id : Entity_Id) is
6114 K : constant String := Entity_Kind'Image (Ekind (Id));
6118 Write_Str (" Kind ");
6120 if Is_Type (Id) and then Is_Tagged_Type (Id) then
6121 Write_Str ("TAGGED ");
6124 Write_Str (K (3 .. K'Length));
6127 if Is_Type (Id) and then Depends_On_Private (Id) then
6128 Write_Str ("Depends_On_Private ");
6132 -- Start of processing for Write_Entity_Info
6136 Write_Attribute ("Name ", Id);
6137 Write_Int (Int (Id));
6141 Write_Attribute (" Type ", Etype (Id));
6143 Write_Attribute (" Scope ", Scope (Id));
6148 when Discrete_Kind =>
6149 Write_Str ("Bounds: Id = ");
6151 if Present (Scalar_Range (Id)) then
6152 Write_Int (Int (Type_Low_Bound (Id)));
6153 Write_Str (" .. Id = ");
6154 Write_Int (Int (Type_High_Bound (Id)));
6156 Write_Str ("Empty");
6166 Write_Attribute (" Component Type ",
6167 Component_Type (Id));
6170 Write_Str (" Indices ");
6172 Index := First_Index (Id);
6174 while Present (Index) loop
6175 Write_Attribute (" ", Etype (Index));
6176 Index := Next_Index (Index);
6184 (" Directly Designated Type ",
6185 Directly_Designated_Type (Id));
6188 when Overloadable_Kind =>
6189 if Present (Homonym (Id)) then
6190 Write_Str (" Homonym ");
6191 Write_Name (Chars (Homonym (Id)));
6193 Write_Int (Int (Homonym (Id)));
6200 if Ekind (Scope (Id)) in Record_Kind then
6202 " Original_Record_Component ",
6203 Original_Record_Component (Id));
6204 Write_Int (Int (Original_Record_Component (Id)));
6208 when others => null;
6210 end Write_Entity_Info;
6212 -----------------------
6213 -- Write_Field6_Name --
6214 -----------------------
6216 procedure Write_Field6_Name (Id : Entity_Id) is
6217 pragma Warnings (Off, Id);
6220 Write_Str ("First_Rep_Item");
6221 end Write_Field6_Name;
6223 -----------------------
6224 -- Write_Field7_Name --
6225 -----------------------
6227 procedure Write_Field7_Name (Id : Entity_Id) is
6228 pragma Warnings (Off, Id);
6231 Write_Str ("Freeze_Node");
6232 end Write_Field7_Name;
6234 -----------------------
6235 -- Write_Field8_Name --
6236 -----------------------
6238 procedure Write_Field8_Name (Id : Entity_Id) is
6243 Write_Str ("Normalized_First_Bit");
6247 E_Subprogram_Body =>
6248 Write_Str ("Mechanism");
6251 Write_Str ("Associated_Node_For_Itype");
6254 Write_Str ("Dependent_Instances");
6257 Write_Str ("Hiding_Loop_Variable");
6260 Write_Str ("Field8??");
6262 end Write_Field8_Name;
6264 -----------------------
6265 -- Write_Field9_Name --
6266 -----------------------
6268 procedure Write_Field9_Name (Id : Entity_Id) is
6272 Write_Str ("Class_Wide_Type");
6274 when E_Constant | E_Variable =>
6275 Write_Str ("Size_Check_Code");
6278 E_Generic_Function |
6280 E_Generic_Procedure |
6283 Write_Str ("Renaming_Map");
6287 Write_Str ("Normalized_Position");
6290 Write_Str ("Field9??");
6292 end Write_Field9_Name;
6294 ------------------------
6295 -- Write_Field10_Name --
6296 ------------------------
6298 procedure Write_Field10_Name (Id : Entity_Id) is
6302 Write_Str ("Referenced_Object");
6304 when E_In_Parameter |
6306 Write_Str ("Discriminal_Link");
6312 Write_Str ("Handler_Records");
6316 Write_Str ("Normalized_Position_Max");
6319 Write_Str ("Field10??");
6321 end Write_Field10_Name;
6323 ------------------------
6324 -- Write_Field11_Name --
6325 ------------------------
6327 procedure Write_Field11_Name (Id : Entity_Id) is
6331 Write_Str ("Entry_Component");
6335 Write_Str ("Component_Bit_Offset");
6338 Write_Str ("Full_View");
6340 when E_Enumeration_Literal =>
6341 Write_Str ("Enumeration_Pos");
6344 Write_Str ("Block_Node");
6350 Write_Str ("Protected_Body_Subprogram");
6353 Write_Str ("Full_View");
6356 Write_Str ("Field11??");
6358 end Write_Field11_Name;
6360 ------------------------
6361 -- Write_Field12_Name --
6362 ------------------------
6364 procedure Write_Field12_Name (Id : Entity_Id) is
6368 Write_Str ("Barrier_Function");
6370 when E_Enumeration_Literal =>
6371 Write_Str ("Enumeration_Rep");
6378 E_In_Out_Parameter |
6382 Write_Str ("Esize");
6386 Write_Str ("Next_Inlined_Subprogram");
6389 Write_Str ("Associated_Formal_Package");
6392 Write_Str ("Field12??");
6394 end Write_Field12_Name;
6396 ------------------------
6397 -- Write_Field13_Name --
6398 ------------------------
6400 procedure Write_Field13_Name (Id : Entity_Id) is
6404 Write_Str ("RM_Size");
6408 Write_Str ("Component_Clause");
6410 when E_Enumeration_Literal =>
6411 Write_Str ("Debug_Renaming_Link");
6414 if not Comes_From_Source (Id)
6416 Chars (Id) = Name_Op_Ne
6418 Write_Str ("Corresponding_Equality");
6420 elsif Comes_From_Source (Id) then
6421 Write_Str ("Elaboration_Entity");
6424 Write_Str ("Field13??");
6429 Write_Str ("Extra_Accessibility");
6433 Generic_Unit_Kind =>
6434 Write_Str ("Elaboration_Entity");
6437 Write_Str ("Field13??");
6439 end Write_Field13_Name;
6441 -----------------------
6442 -- Write_Field14_Name --
6443 -----------------------
6445 procedure Write_Field14_Name (Id : Entity_Id) is
6450 Write_Str ("Alignment");
6454 Write_Str ("First_Optional_Parameter");
6457 E_Generic_Package =>
6458 Write_Str ("Shadow_Entities");
6461 Write_Str ("Field14??");
6463 end Write_Field14_Name;
6465 ------------------------
6466 -- Write_Field15_Name --
6467 ------------------------
6469 procedure Write_Field15_Name (Id : Entity_Id) is
6474 Write_Str ("Storage_Size_Variable");
6476 when Class_Wide_Kind |
6480 Write_Str ("Primitive_Operations");
6483 Write_Str ("DT_Entry_Count");
6485 when Decimal_Fixed_Point_Kind =>
6486 Write_Str ("Scale_Value");
6488 when E_Discriminant =>
6489 Write_Str ("Discriminant_Number");
6492 Write_Str ("Extra_Formal");
6496 Write_Str ("DT_Position");
6499 Write_Str ("Entry_Parameters_Type");
6501 when Enumeration_Kind =>
6502 Write_Str ("Lit_Indexes");
6505 Write_Str ("Related_Instance");
6507 when E_Protected_Type =>
6508 Write_Str ("Entry_Bodies_Array");
6510 when E_String_Literal_Subtype =>
6511 Write_Str ("String_Literal_Low_Bound");
6514 Write_Str ("Shared_Var_Read_Proc");
6517 Write_Str ("Field15??");
6519 end Write_Field15_Name;
6521 ------------------------
6522 -- Write_Field16_Name --
6523 ------------------------
6525 procedure Write_Field16_Name (Id : Entity_Id) is
6529 Write_Str ("Entry_Formal");
6533 Write_Str ("DTC_Entity");
6538 Write_Str ("First_Private_Entity");
6540 when E_Record_Type |
6541 E_Record_Type_With_Private =>
6542 Write_Str ("Access_Disp_Table");
6544 when E_String_Literal_Subtype =>
6545 Write_Str ("String_Literal_Length");
6547 when Enumeration_Kind =>
6548 Write_Str ("Lit_Strings");
6552 Write_Str ("Unset_Reference");
6554 when E_Record_Subtype |
6555 E_Class_Wide_Subtype =>
6556 Write_Str ("Cloned_Subtype");
6559 Write_Str ("Field16??");
6561 end Write_Field16_Name;
6563 ------------------------
6564 -- Write_Field17_Name --
6565 ------------------------
6567 procedure Write_Field17_Name (Id : Entity_Id) is
6571 Write_Str ("Digits_Value");
6574 Write_Str ("Prival");
6576 when E_Discriminant =>
6577 Write_Str ("Discriminal");
6586 E_Generic_Function |
6588 E_Generic_Procedure |
6597 E_Subprogram_Type =>
6598 Write_Str ("First_Entity");
6601 Write_Str ("First_Index");
6603 when E_Protected_Body =>
6604 Write_Str ("Object_Ref");
6606 when Enumeration_Kind =>
6607 Write_Str ("First_Literal");
6610 Write_Str ("Master_Id");
6612 when Modular_Integer_Kind =>
6613 Write_Str ("Modulus");
6617 E_Generic_In_Out_Parameter |
6619 Write_Str ("Actual_Subtype");
6622 Write_Str ("Field17??");
6624 end Write_Field17_Name;
6626 -----------------------
6627 -- Write_Field18_Name --
6628 -----------------------
6630 procedure Write_Field18_Name (Id : Entity_Id) is
6633 when E_Enumeration_Literal |
6637 Write_Str ("Alias");
6639 when E_Record_Type =>
6640 Write_Str ("Corresponding_Concurrent_Type");
6642 when E_Entry_Index_Parameter =>
6643 Write_Str ("Entry_Index_Constant");
6645 when E_Class_Wide_Subtype |
6646 E_Access_Protected_Subprogram_Type |
6647 E_Access_Subprogram_Type |
6649 Write_Str ("Equivalent_Type");
6651 when Fixed_Point_Kind =>
6652 Write_Str ("Delta_Value");
6656 Write_Str ("Renamed_Object");
6660 E_Generic_Function |
6661 E_Generic_Procedure |
6662 E_Generic_Package =>
6663 Write_Str ("Renamed_Entity");
6665 when Incomplete_Or_Private_Kind =>
6666 Write_Str ("Private_Dependents");
6668 when Concurrent_Kind =>
6669 Write_Str ("Corresponding_Record_Type");
6674 Write_Str ("Enclosing_Scope");
6677 Write_Str ("Field18??");
6679 end Write_Field18_Name;
6681 -----------------------
6682 -- Write_Field19_Name --
6683 -----------------------
6685 procedure Write_Field19_Name (Id : Entity_Id) is
6690 Write_Str ("Related_Array_Object");
6697 Write_Str ("Finalization_Chain_Entity");
6699 when E_Discriminant =>
6700 Write_Str ("Corresponding_Discriminant");
6703 E_Generic_Package =>
6704 Write_Str ("Body_Entity");
6706 when E_Package_Body |
6708 Write_Str ("Spec_Entity");
6710 when Private_Kind =>
6711 Write_Str ("Underlying_Full_View");
6713 when E_Record_Type =>
6714 Write_Str ("Parent_Subtype");
6717 Write_Str ("Field19??");
6719 end Write_Field19_Name;
6721 -----------------------
6722 -- Write_Field20_Name --
6723 -----------------------
6725 procedure Write_Field20_Name (Id : Entity_Id) is
6729 Write_Str ("Component_Type");
6731 when E_In_Parameter |
6732 E_Generic_In_Parameter =>
6733 Write_Str ("Default_Value");
6736 Write_Str ("Directly_Designated_Type");
6739 Write_Str ("Discriminant_Checking_Func");
6741 when E_Discriminant =>
6742 Write_Str ("Discriminant_Default_Value");
6751 E_Generic_Function |
6753 E_Generic_Procedure |
6762 E_Subprogram_Type =>
6764 Write_Str ("Last_Entity");
6767 Write_Str ("Scalar_Range");
6770 Write_Str ("Register_Exception_Call");
6773 Write_Str ("Field20??");
6775 end Write_Field20_Name;
6777 -----------------------
6778 -- Write_Field21_Name --
6779 -----------------------
6781 procedure Write_Field21_Name (Id : Entity_Id) is
6787 E_Generic_Function |
6789 E_Generic_Procedure |
6791 Write_Str ("Interface_Name");
6793 when Concurrent_Kind |
6794 Incomplete_Or_Private_Kind |
6798 Write_Str ("Discriminant_Constraint");
6801 Write_Str ("Accept_Address");
6803 when Fixed_Point_Kind =>
6804 Write_Str ("Small_Value");
6806 when E_In_Parameter =>
6807 Write_Str ("Default_Expr_Function");
6810 Modular_Integer_Kind =>
6811 Write_Str ("Original_Array_Type");
6814 Write_Str ("Field21??");
6816 end Write_Field21_Name;
6818 -----------------------
6819 -- Write_Field22_Name --
6820 -----------------------
6822 procedure Write_Field22_Name (Id : Entity_Id) is
6826 Write_Str ("Associated_Storage_Pool");
6829 Write_Str ("Component_Size");
6833 Write_Str ("Original_Record_Component");
6835 when E_Enumeration_Literal =>
6836 Write_Str ("Enumeration_Rep_Expr");
6839 Write_Str ("Exception_Code");
6842 Write_Str ("Protected_Formal");
6844 when E_Record_Type =>
6845 Write_Str ("Corresponding_Remote_Type");
6855 E_Generic_Function |
6856 E_Generic_Procedure |
6861 Write_Str ("Scope_Depth_Value");
6863 when E_Record_Type_With_Private |
6864 E_Record_Subtype_With_Private |
6867 E_Limited_Private_Type |
6868 E_Limited_Private_Subtype =>
6869 Write_Str ("Private_View");
6872 Write_Str ("Shared_Var_Assign_Proc");
6875 Write_Str ("Field22??");
6877 end Write_Field22_Name;
6879 ------------------------
6880 -- Write_Field23_Name --
6881 ------------------------
6883 procedure Write_Field23_Name (Id : Entity_Id) is
6887 Write_Str ("Associated_Final_Chain");
6890 Write_Str ("Packed_Array_Type");
6893 Write_Str ("Entry_Cancel_Parameter");
6896 Write_Str ("Protected_Operation");
6898 when E_Discriminant =>
6899 Write_Str ("CR_Discriminant");
6901 when E_Enumeration_Type =>
6902 Write_Str ("Enum_Pos_To_Rep");
6906 Write_Str ("Extra_Constrained");
6908 when E_Generic_Function |
6910 E_Generic_Procedure =>
6911 Write_Str ("Inner_Instances");
6913 when Concurrent_Kind |
6914 Incomplete_Or_Private_Kind |
6918 Write_Str ("Girder_Constraint");
6923 Write_Str ("Generic_Renamings");
6925 -- What about Privals_Chain for protected operations ???
6928 Write_Str ("Privals_Chain");
6931 Write_Str ("Field23??");
6933 end Write_Field23_Name;
6935 -------------------------
6936 -- Iterator Procedures --
6937 -------------------------
6939 procedure Proc_Next_Component (N : in out Node_Id) is
6941 N := Next_Component (N);
6942 end Proc_Next_Component;
6944 procedure Proc_Next_Discriminant (N : in out Node_Id) is
6946 N := Next_Discriminant (N);
6947 end Proc_Next_Discriminant;
6949 procedure Proc_Next_Formal (N : in out Node_Id) is
6951 N := Next_Formal (N);
6952 end Proc_Next_Formal;
6954 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
6956 N := Next_Formal_With_Extras (N);
6957 end Proc_Next_Formal_With_Extras;
6959 procedure Proc_Next_Girder_Discriminant (N : in out Node_Id) is
6961 N := Next_Girder_Discriminant (N);
6962 end Proc_Next_Girder_Discriminant;
6964 procedure Proc_Next_Index (N : in out Node_Id) is
6966 N := Next_Index (N);
6967 end Proc_Next_Index;
6969 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
6971 N := Next_Inlined_Subprogram (N);
6972 end Proc_Next_Inlined_Subprogram;
6974 procedure Proc_Next_Literal (N : in out Node_Id) is
6976 N := Next_Literal (N);
6977 end Proc_Next_Literal;