1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
11 -- Copyright (C) 1992-2001 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 Snames; use Snames;
44 with Stand; use Stand;
45 with Output; use Output;
49 use Atree.Unchecked_Access;
50 -- This is one of the packages that is allowed direct untyped access to
51 -- the fields in a node, since it provides the next level abstraction
52 -- which incorporates appropriate checks.
54 ----------------------------------------------
55 -- Usage of Fields in Defining Entity Nodes --
56 ----------------------------------------------
58 -- Four of these fields are defined in Sinfo, since they in are the
59 -- base part of the node. The access routines for these fields and
60 -- the corresponding set procedures are defined in Sinfo. These fields
61 -- are present in all entities. Note that Homonym is also in the base
62 -- part of the node, but has access routines that are more properly
63 -- part of Einfo, which is why they are defined here.
70 -- Remaining fields are present only in extended nodes (i.e. entities)
72 -- The following fields are present in all entities
75 -- First_Rep_Item Node6
78 -- The usage of each field (and the entity kinds to which it applies)
79 -- depends on the particular field (see Einfo spec for details).
81 -- Associated_Node_For_Itype Node8
82 -- Dependent_Instances Elist8
83 -- Hiding_Loop_Variable Node8
84 -- Mechanism Uint8 (but returns Mechanism_Type)
85 -- Normalized_First_Bit Uint8
87 -- Class_Wide_Type Node9
88 -- Normalized_Position Uint9
89 -- Size_Check_Code Node9
92 -- Discriminal_Link Node10
93 -- Handler_Records List10
94 -- Normalized_Position_Max Uint10
95 -- Referenced_Object Node10
97 -- Component_Bit_Offset Uint11
99 -- Entry_Component Node11
100 -- Enumeration_Pos Uint11
101 -- Protected_Body_Subprogram Node11
104 -- Barrier_Function Node12
105 -- Enumeration_Rep Uint12
107 -- Next_Inlined_Subprogram Node12
109 -- Corresponding_Equality Node13
110 -- Component_Clause Node13
111 -- Debug_Renaming_Link Node13
112 -- Elaboration_Entity Node13
113 -- Extra_Accessibility Node13
117 -- First_Optional_Parameter Node14
118 -- Shadow_Entities List14
120 -- Discriminant_Number Uint15
121 -- DT_Position Uint15
122 -- DT_Entry_Count Uint15
123 -- Entry_Bodies_Array Node15
124 -- Entry_Parameters_Type Node15
125 -- Extra_Formal Node15
126 -- Lit_Indexes Node15
127 -- Primitive_Operations Elist15
128 -- Related_Instance Node15
129 -- Scale_Value Uint15
130 -- Storage_Size_Variable Node15
131 -- String_Literal_Low_Bound Node15
132 -- Shared_Var_Read_Proc Node15
134 -- Access_Disp_Table Node16
135 -- Cloned_Subtype Node16
137 -- Entry_Formal Node16
138 -- First_Private_Entity Node16
139 -- Lit_Strings Node16
140 -- String_Literal_Length Uint16
141 -- Unset_Reference Node16
143 -- Actual_Subtype Node17
144 -- Digits_Value Uint17
145 -- Discriminal Node17
146 -- First_Entity Node17
147 -- First_Index Node17
148 -- First_Literal Node17
155 -- Corresponding_Concurrent_Type Node18
156 -- Corresponding_Record_Type Node18
157 -- Delta_Value Ureal18
158 -- Enclosing_Scope Node18
159 -- Equivalent_Type Node18
160 -- Private_Dependents Elist18
161 -- Renamed_Entity Node18
162 -- Renamed_Object Node18
164 -- Body_Entity Node19
165 -- Corresponding_Discriminant Node19
166 -- Finalization_Chain_Entity Node19
167 -- Parent_Subtype Node19
168 -- Related_Array_Object Node19
169 -- Spec_Entity Node19
170 -- Underlying_Full_View Node19
172 -- Component_Type Node20
173 -- Default_Value Node20
174 -- Directly_Designated_Type Node20
175 -- Discriminant_Checking_Func Node20
176 -- Discriminant_Default_Value Node20
177 -- Last_Entity Node20
178 -- Register_Exception_Call Node20
179 -- Scalar_Range Node20
181 -- Accept_Address Elist21
182 -- Default_Expr_Function Node21
183 -- Discriminant_Constraint Elist21
184 -- Small_Value Ureal21
185 -- Interface_Name Node21
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
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 (Base_Type (Underlying_Type (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));
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_Primitive_Operations (Id : E) return B is
1095 pragma Assert (Is_Type (Id));
1096 return Flag120 (Base_Type (Id));
1097 end Has_Primitive_Operations;
1099 function Has_Private_Declaration (Id : E) return B is
1101 return Flag155 (Id);
1102 end Has_Private_Declaration;
1104 function Has_Qualified_Name (Id : E) return B is
1106 return Flag161 (Id);
1107 end Has_Qualified_Name;
1109 function Has_Record_Rep_Clause (Id : E) return B is
1111 pragma Assert (Is_Record_Type (Id));
1113 end Has_Record_Rep_Clause;
1115 function Has_Recursive_Call (Id : E) return B is
1117 pragma Assert (Is_Subprogram (Id));
1118 return Flag143 (Id);
1119 end Has_Recursive_Call;
1121 function Has_Size_Clause (Id : E) return B is
1124 end Has_Size_Clause;
1126 function Has_Small_Clause (Id : E) return B is
1129 end Has_Small_Clause;
1131 function Has_Specified_Layout (Id : E) return B is
1133 pragma Assert (Is_Type (Id));
1134 return Flag100 (Id);
1135 end Has_Specified_Layout;
1137 function Has_Storage_Size_Clause (Id : E) return B is
1139 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1140 return Flag23 (Implementation_Base_Type (Id));
1141 end Has_Storage_Size_Clause;
1143 function Has_Subprogram_Descriptor (Id : E) return B is
1146 end Has_Subprogram_Descriptor;
1148 function Has_Task (Id : E) return B is
1150 return Flag30 (Base_Type (Id));
1153 function Has_Unchecked_Union (Id : E) return B is
1155 return Flag123 (Base_Type (Id));
1156 end Has_Unchecked_Union;
1158 function Has_Unknown_Discriminants (Id : E) return B is
1160 pragma Assert (Is_Type (Id));
1162 end Has_Unknown_Discriminants;
1164 function Has_Volatile_Components (Id : E) return B is
1166 return Flag87 (Implementation_Base_Type (Id));
1167 end Has_Volatile_Components;
1169 function Hiding_Loop_Variable (Id : E) return E is
1171 pragma Assert (Ekind (Id) = E_Variable);
1173 end Hiding_Loop_Variable;
1175 function Homonym (Id : E) return E is
1180 function In_Package_Body (Id : E) return B is
1183 end In_Package_Body;
1185 function In_Private_Part (Id : E) return B is
1188 end In_Private_Part;
1190 function In_Use (Id : E) return B is
1192 pragma Assert (Nkind (Id) in N_Entity);
1196 function Inner_Instances (Id : E) return L is
1198 return Elist23 (Id);
1199 end Inner_Instances;
1201 function Interface_Name (Id : E) return N is
1206 function Is_Abstract (Id : E) return B is
1211 function Is_Access_Constant (Id : E) return B is
1213 pragma Assert (Is_Access_Type (Id));
1215 end Is_Access_Constant;
1217 function Is_Aliased (Id : E) return B is
1219 pragma Assert (Nkind (Id) in N_Entity);
1223 function Is_AST_Entry (Id : E) return B is
1225 pragma Assert (Is_Entry (Id));
1226 return Flag132 (Id);
1229 function Is_Asynchronous (Id : E) return B is
1232 (Ekind (Id) = E_Procedure or else Is_Type (Id));
1234 end Is_Asynchronous;
1236 function Is_Atomic (Id : E) return B is
1241 function Is_Bit_Packed_Array (Id : E) return B is
1243 return Flag122 (Implementation_Base_Type (Id));
1244 end Is_Bit_Packed_Array;
1246 function Is_Called (Id : E) return B is
1249 (Ekind (Id) = E_Procedure or else Ekind (Id) = E_Function);
1250 return Flag102 (Id);
1253 function Is_Character_Type (Id : E) return B is
1256 end Is_Character_Type;
1258 function Is_Child_Unit (Id : E) return B is
1263 function Is_Compilation_Unit (Id : E) return B is
1265 return Flag149 (Id);
1266 end Is_Compilation_Unit;
1268 function Is_Completely_Hidden (Id : E) return B is
1270 pragma Assert (Ekind (Id) = E_Discriminant);
1271 return Flag103 (Id);
1272 end Is_Completely_Hidden;
1274 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1277 end Is_Constr_Subt_For_U_Nominal;
1279 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1281 return Flag141 (Id);
1282 end Is_Constr_Subt_For_UN_Aliased;
1284 function Is_Constrained (Id : E) return B is
1286 pragma Assert (Nkind (Id) in N_Entity);
1290 function Is_Constructor (Id : E) return B is
1295 function Is_Controlled (Id : E) return B is
1297 return Flag42 (Base_Type (Id));
1300 function Is_Controlling_Formal (Id : E) return B is
1302 pragma Assert (Is_Formal (Id));
1304 end Is_Controlling_Formal;
1306 function Is_CPP_Class (Id : E) return B is
1311 function Is_Destructor (Id : E) return B is
1316 function Is_Discrim_SO_Function (Id : E) return B is
1318 return Flag176 (Id);
1319 end Is_Discrim_SO_Function;
1321 function Is_Dispatching_Operation (Id : E) return B is
1323 pragma Assert (Nkind (Id) in N_Entity);
1325 end Is_Dispatching_Operation;
1327 function Is_Eliminated (Id : E) return B is
1329 return Flag124 (Id);
1332 function Is_Entry_Formal (Id : E) return B is
1335 end Is_Entry_Formal;
1337 function Is_Exported (Id : E) return B is
1342 function Is_First_Subtype (Id : E) return B is
1345 end Is_First_Subtype;
1347 function Is_For_Access_Subtype (Id : E) return B is
1350 (Ekind (Id) = E_Record_Subtype
1352 Ekind (Id) = E_Private_Subtype);
1353 return Flag118 (Id);
1354 end Is_For_Access_Subtype;
1356 function Is_Formal_Subprogram (Id : E) return B is
1358 return Flag111 (Id);
1359 end Is_Formal_Subprogram;
1361 function Is_Frozen (Id : E) return B is
1366 function Is_Generic_Actual_Type (Id : E) return B is
1368 pragma Assert (Is_Type (Id));
1370 end Is_Generic_Actual_Type;
1372 function Is_Generic_Instance (Id : E) return B is
1374 return Flag130 (Id);
1375 end Is_Generic_Instance;
1377 function Is_Generic_Type (Id : E) return B is
1379 pragma Assert (Nkind (Id) in N_Entity);
1381 end Is_Generic_Type;
1383 function Is_Hidden (Id : E) return B is
1388 function Is_Hidden_Open_Scope (Id : E) return B is
1390 return Flag171 (Id);
1391 end Is_Hidden_Open_Scope;
1393 function Is_Immediately_Visible (Id : E) return B is
1395 pragma Assert (Nkind (Id) in N_Entity);
1397 end Is_Immediately_Visible;
1399 function Is_Imported (Id : E) return B is
1404 function Is_Inlined (Id : E) return B is
1409 function Is_Instantiated (Id : E) return B is
1411 return Flag126 (Id);
1412 end Is_Instantiated;
1414 function Is_Internal (Id : E) return B is
1416 pragma Assert (Nkind (Id) in N_Entity);
1420 function Is_Interrupt_Handler (Id : E) return B is
1422 pragma Assert (Nkind (Id) in N_Entity);
1424 end Is_Interrupt_Handler;
1426 function Is_Intrinsic_Subprogram (Id : E) return B is
1429 end Is_Intrinsic_Subprogram;
1431 function Is_Itype (Id : E) return B is
1436 function Is_Known_Valid (Id : E) return B is
1438 return Flag170 (Id);
1441 function Is_Limited_Composite (Id : E) return B is
1443 return Flag106 (Id);
1444 end Is_Limited_Composite;
1446 function Is_Limited_Record (Id : E) return B is
1449 end Is_Limited_Record;
1451 function Is_Machine_Code_Subprogram (Id : E) return B is
1453 pragma Assert (Is_Subprogram (Id));
1454 return Flag137 (Id);
1455 end Is_Machine_Code_Subprogram;
1457 function Is_Non_Static_Subtype (Id : E) return B is
1459 pragma Assert (Is_Type (Id));
1460 return Flag109 (Id);
1461 end Is_Non_Static_Subtype;
1463 function Is_Null_Init_Proc (Id : E) return B is
1465 pragma Assert (Ekind (Id) = E_Procedure);
1466 return Flag178 (Id);
1467 end Is_Null_Init_Proc;
1469 function Is_Optional_Parameter (Id : E) return B is
1471 pragma Assert (Is_Formal (Id));
1472 return Flag134 (Id);
1473 end Is_Optional_Parameter;
1475 function Is_Package_Body_Entity (Id : E) return B is
1477 return Flag160 (Id);
1478 end Is_Package_Body_Entity;
1480 function Is_Packed (Id : E) return B is
1482 return Flag51 (Implementation_Base_Type (Id));
1485 function Is_Packed_Array_Type (Id : E) return B is
1487 return Flag138 (Id);
1488 end Is_Packed_Array_Type;
1490 function Is_Potentially_Use_Visible (Id : E) return B is
1492 pragma Assert (Nkind (Id) in N_Entity);
1494 end Is_Potentially_Use_Visible;
1496 function Is_Preelaborated (Id : E) return B is
1499 end Is_Preelaborated;
1501 function Is_Private_Composite (Id : E) return B is
1503 pragma Assert (Is_Type (Id));
1504 return Flag107 (Id);
1505 end Is_Private_Composite;
1507 function Is_Private_Descendant (Id : E) return B is
1510 end Is_Private_Descendant;
1512 function Is_Psected (Id : E) return B is
1514 return Flag153 (Id);
1517 function Is_Public (Id : E) return B is
1519 pragma Assert (Nkind (Id) in N_Entity);
1523 function Is_Pure (Id : E) return B is
1528 function Is_Remote_Call_Interface (Id : E) return B is
1531 end Is_Remote_Call_Interface;
1533 function Is_Remote_Types (Id : E) return B is
1536 end Is_Remote_Types;
1538 function Is_Renaming_Of_Object (Id : E) return B is
1540 return Flag112 (Id);
1541 end Is_Renaming_Of_Object;
1543 function Is_Shared_Passive (Id : E) return B is
1546 end Is_Shared_Passive;
1548 function Is_Statically_Allocated (Id : E) return B is
1551 end Is_Statically_Allocated;
1553 function Is_Tag (Id : E) return B is
1555 pragma Assert (Nkind (Id) in N_Entity);
1559 function Is_Tagged_Type (Id : E) return B is
1564 function Is_True_Constant (Id : E) return B is
1566 return Flag163 (Id);
1567 end Is_True_Constant;
1569 function Is_Unchecked_Union (Id : E) return B is
1571 return Flag117 (Id);
1572 end Is_Unchecked_Union;
1574 function Is_Unsigned_Type (Id : E) return B is
1576 pragma Assert (Is_Type (Id));
1577 return Flag144 (Id);
1578 end Is_Unsigned_Type;
1580 function Is_Valued_Procedure (Id : E) return B is
1582 pragma Assert (Ekind (Id) = E_Procedure);
1583 return Flag127 (Id);
1584 end Is_Valued_Procedure;
1586 function Is_Visible_Child_Unit (Id : E) return B is
1588 pragma Assert (Is_Child_Unit (Id));
1589 return Flag116 (Id);
1590 end Is_Visible_Child_Unit;
1592 function Is_VMS_Exception (Id : E) return B is
1594 return Flag133 (Id);
1595 end Is_VMS_Exception;
1597 function Is_Volatile (Id : E) return B is
1599 pragma Assert (Nkind (Id) in N_Entity);
1603 function Last_Entity (Id : E) return E is
1608 function Lit_Indexes (Id : E) return E is
1610 pragma Assert (Is_Enumeration_Type (Id));
1614 function Lit_Strings (Id : E) return E is
1616 pragma Assert (Is_Enumeration_Type (Id));
1620 function Machine_Radix_10 (Id : E) return B is
1622 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1624 end Machine_Radix_10;
1626 function Master_Id (Id : E) return E is
1631 function Materialize_Entity (Id : E) return B is
1633 return Flag168 (Id);
1634 end Materialize_Entity;
1636 function Mechanism (Id : E) return M is
1638 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
1639 return UI_To_Int (Uint8 (Id));
1642 function Modulus (Id : E) return Uint is
1644 pragma Assert (Is_Modular_Integer_Type (Id));
1645 return Uint17 (Base_Type (Id));
1648 function Needs_Debug_Info (Id : E) return B is
1650 return Flag147 (Id);
1651 end Needs_Debug_Info;
1653 function Needs_No_Actuals (Id : E) return B is
1656 (Is_Overloadable (Id)
1657 or else Ekind (Id) = E_Subprogram_Type
1658 or else Ekind (Id) = E_Entry_Family);
1660 end Needs_No_Actuals;
1662 function Next_Inlined_Subprogram (Id : E) return E is
1665 end Next_Inlined_Subprogram;
1667 function No_Pool_Assigned (Id : E) return B is
1669 pragma Assert (Is_Access_Type (Id));
1670 return Flag131 (Root_Type (Id));
1671 end No_Pool_Assigned;
1673 function No_Return (Id : E) return B is
1676 (Ekind (Id) = E_Procedure or else Ekind (Id) = E_Generic_Procedure);
1677 return Flag113 (Id);
1680 function Non_Binary_Modulus (Id : E) return B is
1682 pragma Assert (Is_Modular_Integer_Type (Id));
1683 return Flag58 (Base_Type (Id));
1684 end Non_Binary_Modulus;
1686 function Nonzero_Is_True (Id : E) return B is
1688 pragma Assert (Root_Type (Id) = Standard_Boolean);
1689 return Flag162 (Base_Type (Id));
1690 end Nonzero_Is_True;
1692 function Normalized_First_Bit (Id : E) return U is
1695 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
1697 end Normalized_First_Bit;
1699 function Normalized_Position (Id : E) return U is
1702 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
1704 end Normalized_Position;
1706 function Normalized_Position_Max (Id : E) return U is
1709 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
1711 end Normalized_Position_Max;
1713 function Not_Source_Assigned (Id : E) return B is
1715 return Flag115 (Id);
1716 end Not_Source_Assigned;
1718 function Object_Ref (Id : E) return E is
1720 pragma Assert (Ekind (Id) = E_Protected_Body);
1724 function Original_Record_Component (Id : E) return E is
1727 end Original_Record_Component;
1729 function Packed_Array_Type (Id : E) return E is
1731 pragma Assert (Is_Array_Type (Id));
1733 end Packed_Array_Type;
1735 function Parent_Subtype (Id : E) return E is
1737 pragma Assert (Ekind (Id) = E_Record_Type);
1741 function Primitive_Operations (Id : E) return L is
1743 pragma Assert (Is_Tagged_Type (Id));
1744 return Elist15 (Id);
1745 end Primitive_Operations;
1747 function Prival (Id : E) return E is
1749 pragma Assert (Is_Protected_Private (Id));
1753 function Privals_Chain (Id : E) return L is
1755 pragma Assert (Is_Overloadable (Id)
1756 or else Ekind (Id) = E_Entry_Family);
1757 return Elist23 (Id);
1760 function Private_Dependents (Id : E) return L is
1762 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
1763 return Elist18 (Id);
1764 end Private_Dependents;
1766 function Private_View (Id : E) return N is
1768 pragma Assert (Is_Private_Type (Id));
1772 function Protected_Body_Subprogram (Id : E) return E is
1774 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
1776 end Protected_Body_Subprogram;
1778 function Protected_Formal (Id : E) return E is
1780 pragma Assert (Is_Formal (Id));
1782 end Protected_Formal;
1784 function Protected_Operation (Id : E) return N is
1786 pragma Assert (Is_Protected_Private (Id));
1788 end Protected_Operation;
1790 function Reachable (Id : E) return B is
1795 function Referenced (Id : E) return B is
1797 return Flag156 (Id);
1800 function Referenced_Object (Id : E) return N is
1802 pragma Assert (Is_Type (Id));
1804 end Referenced_Object;
1806 function Register_Exception_Call (Id : E) return N is
1808 pragma Assert (Ekind (Id) = E_Exception);
1810 end Register_Exception_Call;
1812 function Related_Array_Object (Id : E) return E is
1814 pragma Assert (Is_Array_Type (Id));
1816 end Related_Array_Object;
1818 function Related_Instance (Id : E) return E is
1820 pragma Assert (Ekind (Id) = E_Package);
1822 end Related_Instance;
1824 function Renamed_Entity (Id : E) return N is
1829 function Renamed_Object (Id : E) return N is
1834 function Renaming_Map (Id : E) return U is
1839 function Return_Present (Id : E) return B is
1844 function Returns_By_Ref (Id : E) return B is
1849 function Reverse_Bit_Order (Id : E) return B is
1851 pragma Assert (Is_Record_Type (Id));
1852 return Flag164 (Base_Type (Id));
1853 end Reverse_Bit_Order;
1855 function RM_Size (Id : E) return U is
1857 pragma Assert (Is_Type (Id));
1861 function Scalar_Range (Id : E) return N is
1866 function Scale_Value (Id : E) return U is
1871 function Scope_Depth_Value (Id : E) return U is
1874 end Scope_Depth_Value;
1876 function Sec_Stack_Needed_For_Return (Id : E) return B is
1878 return Flag167 (Id);
1879 end Sec_Stack_Needed_For_Return;
1881 function Shadow_Entities (Id : E) return S is
1884 (Ekind (Id) = E_Package or else Ekind (Id) = E_Generic_Package);
1886 end Shadow_Entities;
1888 function Shared_Var_Assign_Proc (Id : E) return E is
1890 pragma Assert (Ekind (Id) = E_Variable);
1892 end Shared_Var_Assign_Proc;
1894 function Shared_Var_Read_Proc (Id : E) return E is
1896 pragma Assert (Ekind (Id) = E_Variable);
1898 end Shared_Var_Read_Proc;
1900 function Size_Check_Code (Id : E) return N is
1902 pragma Assert (Ekind (Id) = E_Constant or else Ekind (Id) = E_Variable);
1904 end Size_Check_Code;
1906 function Size_Depends_On_Discriminant (Id : E) return B is
1908 return Flag177 (Id);
1909 end Size_Depends_On_Discriminant;
1911 function Size_Known_At_Compile_Time (Id : E) return B is
1914 end Size_Known_At_Compile_Time;
1916 function Small_Value (Id : E) return R is
1918 pragma Assert (Is_Fixed_Point_Type (Id));
1919 return Ureal21 (Id);
1922 function Spec_Entity (Id : E) return E is
1925 (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
1929 function Storage_Size_Variable (Id : E) return E is
1931 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1932 return Node15 (Implementation_Base_Type (Id));
1933 end Storage_Size_Variable;
1935 function Strict_Alignment (Id : E) return B is
1937 return Flag145 (Implementation_Base_Type (Id));
1938 end Strict_Alignment;
1940 function String_Literal_Length (Id : E) return U is
1943 end String_Literal_Length;
1945 function String_Literal_Low_Bound (Id : E) return N is
1948 end String_Literal_Low_Bound;
1950 function Suppress_Access_Checks (Id : E) return B is
1953 end Suppress_Access_Checks;
1955 function Suppress_Accessibility_Checks (Id : E) return B is
1958 end Suppress_Accessibility_Checks;
1960 function Suppress_Discriminant_Checks (Id : E) return B is
1963 end Suppress_Discriminant_Checks;
1965 function Suppress_Division_Checks (Id : E) return B is
1968 end Suppress_Division_Checks;
1970 function Suppress_Elaboration_Checks (Id : E) return B is
1973 end Suppress_Elaboration_Checks;
1975 function Suppress_Elaboration_Warnings (Id : E) return B is
1977 return Flag148 (Id);
1978 end Suppress_Elaboration_Warnings;
1980 function Suppress_Index_Checks (Id : E) return B is
1983 end Suppress_Index_Checks;
1985 function Suppress_Init_Proc (Id : E) return B is
1987 return Flag105 (Base_Type (Id));
1988 end Suppress_Init_Proc;
1990 function Suppress_Length_Checks (Id : E) return B is
1993 end Suppress_Length_Checks;
1995 function Suppress_Overflow_Checks (Id : E) return B is
1998 end Suppress_Overflow_Checks;
2000 function Suppress_Range_Checks (Id : E) return B is
2003 end Suppress_Range_Checks;
2005 function Suppress_Storage_Checks (Id : E) return B is
2008 end Suppress_Storage_Checks;
2010 function Suppress_Style_Checks (Id : E) return B is
2012 return Flag165 (Id);
2013 end Suppress_Style_Checks;
2015 function Suppress_Tag_Checks (Id : E) return B is
2018 end Suppress_Tag_Checks;
2020 function Underlying_Full_View (Id : E) return E is
2022 pragma Assert (Ekind (Id) in Private_Kind);
2024 end Underlying_Full_View;
2026 function Unset_Reference (Id : E) return N is
2029 end Unset_Reference;
2031 function Uses_Sec_Stack (Id : E) return B is
2036 function Vax_Float (Id : E) return B is
2038 return Flag151 (Base_Type (Id));
2041 function Warnings_Off (Id : E) return B is
2046 ------------------------------
2047 -- Classification Functions --
2048 ------------------------------
2050 function Is_Access_Type (Id : E) return B is
2052 return Ekind (Id) in Access_Kind;
2055 function Is_Array_Type (Id : E) return B is
2057 return Ekind (Id) in Array_Kind;
2060 function Is_Class_Wide_Type (Id : E) return B is
2062 return Ekind (Id) in Class_Wide_Kind;
2063 end Is_Class_Wide_Type;
2065 function Is_Composite_Type (Id : E) return B is
2067 return Ekind (Id) in Composite_Kind;
2068 end Is_Composite_Type;
2070 function Is_Concurrent_Body (Id : E) return B is
2072 return Ekind (Id) in
2073 Concurrent_Body_Kind;
2074 end Is_Concurrent_Body;
2076 function Is_Concurrent_Record_Type (Id : E) return B is
2079 end Is_Concurrent_Record_Type;
2081 function Is_Concurrent_Type (Id : E) return B is
2083 return Ekind (Id) in Concurrent_Kind;
2084 end Is_Concurrent_Type;
2086 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
2088 return Ekind (Id) in
2089 Decimal_Fixed_Point_Kind;
2090 end Is_Decimal_Fixed_Point_Type;
2092 function Is_Digits_Type (Id : E) return B is
2094 return Ekind (Id) in Digits_Kind;
2097 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
2099 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
2100 end Is_Discrete_Or_Fixed_Point_Type;
2102 function Is_Discrete_Type (Id : E) return B is
2104 return Ekind (Id) in Discrete_Kind;
2105 end Is_Discrete_Type;
2107 function Is_Elementary_Type (Id : E) return B is
2109 return Ekind (Id) in Elementary_Kind;
2110 end Is_Elementary_Type;
2112 function Is_Entry (Id : E) return B is
2114 return Ekind (Id) in Entry_Kind;
2117 function Is_Enumeration_Type (Id : E) return B is
2119 return Ekind (Id) in
2121 end Is_Enumeration_Type;
2123 function Is_Fixed_Point_Type (Id : E) return B is
2125 return Ekind (Id) in
2127 end Is_Fixed_Point_Type;
2129 function Is_Floating_Point_Type (Id : E) return B is
2131 return Ekind (Id) in Float_Kind;
2132 end Is_Floating_Point_Type;
2134 function Is_Formal (Id : E) return B is
2136 return Ekind (Id) in Formal_Kind;
2139 function Is_Generic_Unit (Id : E) return B is
2141 return Ekind (Id) in Generic_Unit_Kind;
2142 end Is_Generic_Unit;
2144 function Is_Incomplete_Or_Private_Type (Id : E) return B is
2146 return Ekind (Id) in
2147 Incomplete_Or_Private_Kind;
2148 end Is_Incomplete_Or_Private_Type;
2150 function Is_Integer_Type (Id : E) return B is
2152 return Ekind (Id) in Integer_Kind;
2153 end Is_Integer_Type;
2155 function Is_Modular_Integer_Type (Id : E) return B is
2157 return Ekind (Id) in
2158 Modular_Integer_Kind;
2159 end Is_Modular_Integer_Type;
2161 function Is_Named_Number (Id : E) return B is
2163 return Ekind (Id) in Named_Kind;
2164 end Is_Named_Number;
2166 function Is_Numeric_Type (Id : E) return B is
2168 return Ekind (Id) in Numeric_Kind;
2169 end Is_Numeric_Type;
2171 function Is_Object (Id : E) return B is
2173 return Ekind (Id) in Object_Kind;
2176 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
2178 return Ekind (Id) in
2179 Ordinary_Fixed_Point_Kind;
2180 end Is_Ordinary_Fixed_Point_Type;
2182 function Is_Overloadable (Id : E) return B is
2184 return Ekind (Id) in Overloadable_Kind;
2185 end Is_Overloadable;
2187 function Is_Private_Type (Id : E) return B is
2189 return Ekind (Id) in Private_Kind;
2190 end Is_Private_Type;
2192 function Is_Protected_Type (Id : E) return B is
2194 return Ekind (Id) in Protected_Kind;
2195 end Is_Protected_Type;
2197 function Is_Real_Type (Id : E) return B is
2199 return Ekind (Id) in Real_Kind;
2202 function Is_Record_Type (Id : E) return B is
2204 return Ekind (Id) in Record_Kind;
2207 function Is_Scalar_Type (Id : E) return B is
2209 return Ekind (Id) in Scalar_Kind;
2212 function Is_Signed_Integer_Type (Id : E) return B is
2214 return Ekind (Id) in
2215 Signed_Integer_Kind;
2216 end Is_Signed_Integer_Type;
2218 function Is_Subprogram (Id : E) return B is
2220 return Ekind (Id) in Subprogram_Kind;
2223 function Is_Task_Type (Id : E) return B is
2225 return Ekind (Id) in Task_Kind;
2228 function Is_Type (Id : E) return B is
2230 return Ekind (Id) in Type_Kind;
2233 ------------------------------
2234 -- Attribute Set Procedures --
2235 ------------------------------
2237 procedure Set_Accept_Address (Id : E; V : L) is
2239 Set_Elist21 (Id, V);
2240 end Set_Accept_Address;
2242 procedure Set_Access_Disp_Table (Id : E; V : E) is
2244 pragma Assert (Is_Tagged_Type (Id));
2245 Set_Node16 (Base_Type (Id), V);
2246 end Set_Access_Disp_Table;
2248 procedure Set_Associated_Final_Chain (Id : E; V : E) is
2250 pragma Assert (Is_Access_Type (Id));
2252 end Set_Associated_Final_Chain;
2254 procedure Set_Associated_Formal_Package (Id : E; V : E) is
2257 end Set_Associated_Formal_Package;
2259 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
2262 end Set_Associated_Node_For_Itype;
2264 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
2266 pragma Assert (Is_Access_Type (Id));
2268 end Set_Associated_Storage_Pool;
2270 procedure Set_Actual_Subtype (Id : E; V : E) is
2273 (Ekind (Id) = E_Constant
2274 or else Ekind (Id) = E_Variable
2275 or else Ekind (Id) = E_Generic_In_Out_Parameter
2276 or else Ekind (Id) in E_In_Parameter .. E_In_Out_Parameter);
2278 end Set_Actual_Subtype;
2280 procedure Set_Address_Taken (Id : E; V : B := True) is
2282 Set_Flag104 (Id, V);
2283 end Set_Address_Taken;
2285 procedure Set_Alias (Id : E; V : E) is
2288 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
2292 procedure Set_Alignment (Id : E; V : U) is
2297 procedure Set_Barrier_Function (Id : E; V : N) is
2299 pragma Assert (Is_Entry (Id));
2301 end Set_Barrier_Function;
2303 procedure Set_Block_Node (Id : E; V : N) is
2305 pragma Assert (Ekind (Id) = E_Block);
2309 procedure Set_Body_Entity (Id : E; V : E) is
2312 (Ekind (Id) = E_Package or else Ekind (Id) = E_Generic_Package);
2314 end Set_Body_Entity;
2316 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
2318 pragma Assert (Is_Record_Type (Id) and then Id = Base_Type (Id));
2319 Set_Flag125 (Id, V);
2320 end Set_C_Pass_By_Copy;
2322 procedure Set_Class_Wide_Type (Id : E; V : E) is
2324 pragma Assert (Is_Type (Id));
2326 end Set_Class_Wide_Type;
2328 procedure Set_Cloned_Subtype (Id : E; V : E) is
2331 (Ekind (Id) = E_Record_Subtype
2332 or else Ekind (Id) = E_Class_Wide_Subtype);
2334 end Set_Cloned_Subtype;
2336 procedure Set_Component_Bit_Offset (Id : E; V : U) is
2339 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
2341 end Set_Component_Bit_Offset;
2343 procedure Set_Component_Clause (Id : E; V : N) is
2346 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
2348 end Set_Component_Clause;
2350 procedure Set_Component_Size (Id : E; V : U) is
2352 pragma Assert (Is_Array_Type (Id));
2353 Set_Uint22 (Base_Type (Id), V);
2354 end Set_Component_Size;
2356 procedure Set_Component_Type (Id : E; V : E) is
2359 end Set_Component_Type;
2361 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
2364 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
2366 end Set_Corresponding_Concurrent_Type;
2368 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
2370 pragma Assert (Ekind (Id) = E_Discriminant);
2372 end Set_Corresponding_Discriminant;
2374 procedure Set_Corresponding_Equality (Id : E; V : E) is
2377 (Ekind (Id) = E_Function
2378 and then not Comes_From_Source (Id)
2379 and then Chars (Id) = Name_Op_Ne);
2381 end Set_Corresponding_Equality;
2383 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
2385 pragma Assert (Is_Concurrent_Type (Id));
2387 end Set_Corresponding_Record_Type;
2389 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
2392 end Set_Corresponding_Remote_Type;
2394 procedure Set_CR_Discriminant (Id : E; V : E) is
2397 end Set_CR_Discriminant;
2399 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
2401 Set_Flag166 (Id, V);
2402 end Set_Debug_Info_Off;
2404 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
2407 end Set_Debug_Renaming_Link;
2409 procedure Set_Default_Expr_Function (Id : E; V : E) is
2411 pragma Assert (Is_Formal (Id));
2413 end Set_Default_Expr_Function;
2415 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
2417 Set_Flag108 (Id, V);
2418 end Set_Default_Expressions_Processed;
2420 procedure Set_Default_Value (Id : E; V : N) is
2422 pragma Assert (Is_Formal (Id));
2424 end Set_Default_Value;
2426 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
2430 or else Is_Task_Type (Id)
2431 or else Ekind (Id) = E_Block);
2432 Set_Flag114 (Id, V);
2433 end Set_Delay_Cleanups;
2435 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
2439 or else Ekind (Id) = E_Package
2440 or else Ekind (Id) = E_Package_Body);
2442 end Set_Delay_Subprogram_Descriptors;
2444 procedure Set_Delta_Value (Id : E; V : R) is
2446 pragma Assert (Is_Fixed_Point_Type (Id));
2447 Set_Ureal18 (Id, V);
2448 end Set_Delta_Value;
2450 procedure Set_Dependent_Instances (Id : E; V : L) is
2452 pragma Assert (Is_Generic_Instance (Id));
2454 end Set_Dependent_Instances;
2456 procedure Set_Depends_On_Private (Id : E; V : B := True) is
2458 pragma Assert (Nkind (Id) in N_Entity);
2460 end Set_Depends_On_Private;
2462 procedure Set_Digits_Value (Id : E; V : U) is
2465 (Is_Floating_Point_Type (Id)
2466 or else Is_Decimal_Fixed_Point_Type (Id));
2468 end Set_Digits_Value;
2470 procedure Set_Directly_Designated_Type (Id : E; V : E) is
2473 end Set_Directly_Designated_Type;
2475 procedure Set_Discard_Names (Id : E; V : B := True) is
2478 end Set_Discard_Names;
2480 procedure Set_Discriminal (Id : E; V : E) is
2482 pragma Assert (Ekind (Id) = E_Discriminant);
2484 end Set_Discriminal;
2486 procedure Set_Discriminal_Link (Id : E; V : E) is
2489 end Set_Discriminal_Link;
2491 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
2494 (Ekind (Id) = E_Component and Ekind (Scope (Id)) in Record_Kind);
2496 end Set_Discriminant_Checking_Func;
2498 procedure Set_Discriminant_Constraint (Id : E; V : L) is
2500 pragma Assert (Nkind (Id) in N_Entity);
2501 Set_Elist21 (Id, V);
2502 end Set_Discriminant_Constraint;
2504 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
2507 end Set_Discriminant_Default_Value;
2509 procedure Set_Discriminant_Number (Id : E; V : U) is
2512 end Set_Discriminant_Number;
2514 procedure Set_DT_Entry_Count (Id : E; V : U) is
2516 pragma Assert (Ekind (Id) = E_Component);
2518 end Set_DT_Entry_Count;
2520 procedure Set_DT_Position (Id : E; V : U) is
2522 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2524 end Set_DT_Position;
2526 procedure Set_DTC_Entity (Id : E; V : E) is
2529 (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2533 procedure Set_Elaborate_All_Desirable (Id : E; V : B := True) is
2535 Set_Flag146 (Id, V);
2536 end Set_Elaborate_All_Desirable;
2538 procedure Set_Elaboration_Entity (Id : E; V : E) is
2543 Ekind (Id) = E_Package
2545 Is_Generic_Unit (Id));
2547 end Set_Elaboration_Entity;
2549 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
2554 Ekind (Id) = E_Package
2556 Is_Generic_Unit (Id));
2557 Set_Flag174 (Id, V);
2558 end Set_Elaboration_Entity_Required;
2560 procedure Set_Enclosing_Scope (Id : E; V : E) is
2563 end Set_Enclosing_Scope;
2565 procedure Set_Entry_Accepted (Id : E; V : B := True) is
2567 pragma Assert (Is_Entry (Id));
2568 Set_Flag152 (Id, V);
2569 end Set_Entry_Accepted;
2571 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
2574 end Set_Entry_Bodies_Array;
2576 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
2579 end Set_Entry_Cancel_Parameter;
2581 procedure Set_Entry_Component (Id : E; V : E) is
2584 end Set_Entry_Component;
2586 procedure Set_Entry_Formal (Id : E; V : E) is
2589 end Set_Entry_Formal;
2591 procedure Set_Entry_Index_Constant (Id : E; V : E) is
2593 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
2595 end Set_Entry_Index_Constant;
2597 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
2600 end Set_Entry_Parameters_Type;
2602 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
2604 pragma Assert (Ekind (Id) = E_Enumeration_Type);
2606 end Set_Enum_Pos_To_Rep;
2608 procedure Set_Enumeration_Pos (Id : E; V : U) is
2610 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
2612 end Set_Enumeration_Pos;
2614 procedure Set_Enumeration_Rep (Id : E; V : U) is
2616 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
2618 end Set_Enumeration_Rep;
2620 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
2622 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
2624 end Set_Enumeration_Rep_Expr;
2626 procedure Set_Equivalent_Type (Id : E; V : E) is
2629 (Ekind (Id) = E_Class_Wide_Type or else
2630 Ekind (Id) = E_Class_Wide_Subtype or else
2631 Ekind (Id) = E_Access_Protected_Subprogram_Type or else
2632 Ekind (Id) = E_Access_Subprogram_Type or else
2633 Ekind (Id) = E_Exception_Type);
2635 end Set_Equivalent_Type;
2637 procedure Set_Esize (Id : E; V : U) is
2642 procedure Set_Exception_Code (Id : E; V : U) is
2644 pragma Assert (Ekind (Id) = E_Exception);
2646 end Set_Exception_Code;
2648 procedure Set_Extra_Accessibility (Id : E; V : E) is
2650 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
2652 end Set_Extra_Accessibility;
2654 procedure Set_Extra_Constrained (Id : E; V : E) is
2656 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
2658 end Set_Extra_Constrained;
2660 procedure Set_Extra_Formal (Id : E; V : E) is
2663 end Set_Extra_Formal;
2665 procedure Set_Finalization_Chain_Entity (Id : E; V : E) is
2668 end Set_Finalization_Chain_Entity;
2670 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
2672 pragma Assert (Is_Type (Id));
2673 Set_Flag158 (Base_Type (Id), V);
2674 end Set_Finalize_Storage_Only;
2676 procedure Set_First_Entity (Id : E; V : E) is
2679 end Set_First_Entity;
2681 procedure Set_First_Index (Id : E; V : N) is
2684 end Set_First_Index;
2686 procedure Set_First_Literal (Id : E; V : E) is
2689 end Set_First_Literal;
2691 procedure Set_First_Optional_Parameter (Id : E; V : E) is
2694 (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2696 end Set_First_Optional_Parameter;
2698 procedure Set_First_Private_Entity (Id : E; V : E) is
2700 pragma Assert (Nkind (Id) in N_Entity);
2702 end Set_First_Private_Entity;
2704 procedure Set_First_Rep_Item (Id : E; V : N) is
2707 end Set_First_Rep_Item;
2709 procedure Set_Freeze_Node (Id : E; V : N) is
2712 end Set_Freeze_Node;
2714 procedure Set_From_With_Type (Id : E; V : B := True) is
2718 or else Ekind (Id) = E_Package);
2719 Set_Flag159 (Id, V);
2720 end Set_From_With_Type;
2722 procedure Set_Full_View (Id : E; V : E) is
2724 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
2728 procedure Set_Function_Returns_With_DSP (Id : E; V : B := True) is
2731 (Is_Subprogram (Id) or else Ekind (Id) = E_Subprogram_Type);
2732 Set_Flag169 (Id, V);
2733 end Set_Function_Returns_With_DSP;
2735 procedure Set_Generic_Renamings (Id : E; V : L) is
2737 Set_Elist23 (Id, V);
2738 end Set_Generic_Renamings;
2740 procedure Set_Girder_Constraint (Id : E; V : L) is
2742 pragma Assert (Nkind (Id) in N_Entity);
2743 Set_Elist23 (Id, V);
2744 end Set_Girder_Constraint;
2746 procedure Set_Handler_Records (Id : E; V : S) is
2749 end Set_Handler_Records;
2751 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
2753 pragma Assert (Base_Type (Id) = Id);
2754 Set_Flag135 (Id, V);
2755 end Set_Has_Aliased_Components;
2757 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
2760 end Set_Has_Alignment_Clause;
2762 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
2765 end Set_Has_All_Calls_Remote;
2767 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
2769 pragma Assert (not Is_Type (Id) or else Base_Type (Id) = Id);
2771 end Set_Has_Atomic_Components;
2773 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
2776 ((V = False) or else (Is_Discrete_Type (Id) or Is_Object (Id)));
2777 Set_Flag139 (Id, V);
2778 end Set_Has_Biased_Representation;
2780 procedure Set_Has_Completion (Id : E; V : B := True) is
2783 end Set_Has_Completion;
2785 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
2787 pragma Assert (Ekind (Id) = E_Incomplete_Type);
2789 end Set_Has_Completion_In_Body;
2791 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
2793 pragma Assert (Is_Record_Type (Id));
2794 Set_Flag140 (Implementation_Base_Type (Id), V);
2795 end Set_Has_Complex_Representation;
2797 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
2799 pragma Assert (Is_Array_Type (Id));
2800 Set_Flag68 (Implementation_Base_Type (Id), V);
2801 end Set_Has_Component_Size_Clause;
2803 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
2805 pragma Assert (Base_Type (Id) = Id);
2807 end Set_Has_Controlled_Component;
2809 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
2812 end Set_Has_Controlling_Result;
2814 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
2816 Set_Flag119 (Id, V);
2817 end Set_Has_Convention_Pragma;
2819 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
2821 pragma Assert (Nkind (Id) in N_Entity);
2823 end Set_Has_Delayed_Freeze;
2825 procedure Set_Has_Discriminants (Id : E; V : B := True) is
2827 pragma Assert (Nkind (Id) in N_Entity);
2829 end Set_Has_Discriminants;
2831 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
2833 pragma Assert (Is_Enumeration_Type (Id));
2835 end Set_Has_Enumeration_Rep_Clause;
2837 procedure Set_Has_Exit (Id : E; V : B := True) is
2842 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True) is
2844 pragma Assert (Is_Tagged_Type (Id));
2845 Set_Flag110 (Id, V);
2846 end Set_Has_External_Tag_Rep_Clause;
2848 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
2850 Set_Flag175 (Id, V);
2851 end Set_Has_Forward_Instantiation;
2853 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
2855 Set_Flag173 (Id, V);
2856 end Set_Has_Fully_Qualified_Name;
2858 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
2861 end Set_Has_Gigi_Rep_Item;
2863 procedure Set_Has_Homonym (Id : E; V : B := True) is
2866 end Set_Has_Homonym;
2868 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
2870 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2872 end Set_Has_Machine_Radix_Clause;
2874 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
2877 end Set_Has_Master_Entity;
2879 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
2882 (Ekind (Id) = E_Function or else Ekind (Id) = E_Generic_Function);
2883 Set_Flag142 (Id, V);
2884 end Set_Has_Missing_Return;
2886 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
2888 Set_Flag101 (Id, V);
2889 end Set_Has_Nested_Block_With_Handler;
2891 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
2893 pragma Assert (Base_Type (Id) = Id);
2895 end Set_Has_Non_Standard_Rep;
2897 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
2899 pragma Assert (Is_Type (Id));
2900 Set_Flag172 (Id, V);
2901 end Set_Has_Object_Size_Clause;
2903 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
2905 Set_Flag154 (Id, V);
2906 end Set_Has_Per_Object_Constraint;
2908 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
2910 pragma Assert (Is_Access_Type (Id));
2911 Set_Flag27 (Base_Type (Id), V);
2912 end Set_Has_Pragma_Controlled;
2914 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
2916 Set_Flag150 (Id, V);
2917 end Set_Has_Pragma_Elaborate_Body;
2919 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
2921 Set_Flag157 (Id, V);
2922 end Set_Has_Pragma_Inline;
2924 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
2926 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
2927 Set_Flag121 (Implementation_Base_Type (Id), V);
2928 end Set_Has_Pragma_Pack;
2930 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
2932 pragma Assert (Is_Subprogram (Id));
2933 Set_Flag179 (Id, V);
2934 end Set_Has_Pragma_Pure_Function;
2936 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
2938 pragma Assert (Is_Type (Id));
2939 Set_Flag120 (Base_Type (Id), V);
2940 end Set_Has_Primitive_Operations;
2942 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
2944 Set_Flag155 (Id, V);
2945 end Set_Has_Private_Declaration;
2947 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
2949 Set_Flag161 (Id, V);
2950 end Set_Has_Qualified_Name;
2952 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
2954 pragma Assert (Is_Record_Type (Id));
2956 end Set_Has_Record_Rep_Clause;
2958 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
2960 pragma Assert (Is_Subprogram (Id));
2961 Set_Flag143 (Id, V);
2962 end Set_Has_Recursive_Call;
2964 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
2967 end Set_Has_Size_Clause;
2969 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
2972 end Set_Has_Small_Clause;
2974 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
2976 pragma Assert (Is_Type (Id));
2977 Set_Flag100 (Id, V);
2978 end Set_Has_Specified_Layout;
2980 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
2982 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2983 pragma Assert (Base_Type (Id) = Id);
2985 end Set_Has_Storage_Size_Clause;
2987 procedure Set_Has_Subprogram_Descriptor (Id : E; V : B := True) is
2990 end Set_Has_Subprogram_Descriptor;
2992 procedure Set_Has_Task (Id : E; V : B := True) is
2994 pragma Assert (Base_Type (Id) = Id);
2998 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
3000 pragma Assert (Base_Type (Id) = Id);
3001 Set_Flag123 (Id, V);
3002 end Set_Has_Unchecked_Union;
3004 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
3006 pragma Assert (Is_Type (Id));
3008 end Set_Has_Unknown_Discriminants;
3010 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
3012 pragma Assert (not Is_Type (Id) or else Base_Type (Id) = Id);
3014 end Set_Has_Volatile_Components;
3016 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
3018 pragma Assert (Ekind (Id) = E_Variable);
3020 end Set_Hiding_Loop_Variable;
3022 procedure Set_Homonym (Id : E; V : E) is
3024 pragma Assert (Id /= V);
3027 procedure Set_In_Package_Body (Id : E; V : B := True) is
3030 end Set_In_Package_Body;
3032 procedure Set_In_Private_Part (Id : E; V : B := True) is
3035 end Set_In_Private_Part;
3037 procedure Set_In_Use (Id : E; V : B := True) is
3039 pragma Assert (Nkind (Id) in N_Entity);
3043 procedure Set_Inner_Instances (Id : E; V : L) is
3045 Set_Elist23 (Id, V);
3046 end Set_Inner_Instances;
3048 procedure Set_Interface_Name (Id : E; V : N) is
3051 end Set_Interface_Name;
3053 procedure Set_Is_Abstract (Id : E; V : B := True) is
3056 end Set_Is_Abstract;
3058 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
3060 pragma Assert (Is_Access_Type (Id));
3062 end Set_Is_Access_Constant;
3064 procedure Set_Is_Aliased (Id : E; V : B := True) is
3066 pragma Assert (Nkind (Id) in N_Entity);
3070 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
3072 pragma Assert (Is_Entry (Id));
3073 Set_Flag132 (Id, V);
3074 end Set_Is_AST_Entry;
3076 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
3079 (Ekind (Id) = E_Procedure or else Is_Type (Id));
3081 end Set_Is_Asynchronous;
3083 procedure Set_Is_Atomic (Id : E; V : B := True) is
3088 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
3090 Set_Flag122 (Implementation_Base_Type (Id), V);
3091 end Set_Is_Bit_Packed_Array;
3093 procedure Set_Is_Called (Id : E; V : B := True) is
3096 (Ekind (Id) = E_Procedure or else Ekind (Id) = E_Function);
3097 Set_Flag102 (Id, V);
3100 procedure Set_Is_Character_Type (Id : E; V : B := True) is
3103 end Set_Is_Character_Type;
3105 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
3108 end Set_Is_Child_Unit;
3110 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
3112 Set_Flag149 (Id, V);
3113 end Set_Is_Compilation_Unit;
3115 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
3117 pragma Assert (Ekind (Id) = E_Discriminant);
3118 Set_Flag103 (Id, V);
3119 end Set_Is_Completely_Hidden;
3121 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
3124 end Set_Is_Concurrent_Record_Type;
3126 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
3129 end Set_Is_Constr_Subt_For_U_Nominal;
3131 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
3133 Set_Flag141 (Id, V);
3134 end Set_Is_Constr_Subt_For_UN_Aliased;
3136 procedure Set_Is_Constrained (Id : E; V : B := True) is
3138 pragma Assert (Nkind (Id) in N_Entity);
3140 end Set_Is_Constrained;
3142 procedure Set_Is_Constructor (Id : E; V : B := True) is
3145 end Set_Is_Constructor;
3147 procedure Set_Is_Controlled (Id : E; V : B := True) is
3149 pragma Assert (Id = Base_Type (Id));
3151 end Set_Is_Controlled;
3153 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
3155 pragma Assert (Is_Formal (Id));
3157 end Set_Is_Controlling_Formal;
3159 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
3162 end Set_Is_CPP_Class;
3164 procedure Set_Is_Destructor (Id : E; V : B := True) is
3167 end Set_Is_Destructor;
3169 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
3171 Set_Flag176 (Id, V);
3172 end Set_Is_Discrim_SO_Function;
3174 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
3179 Is_Overloadable (Id)
3181 Ekind (Id) = E_Subprogram_Type);
3184 end Set_Is_Dispatching_Operation;
3186 procedure Set_Is_Eliminated (Id : E; V : B := True) is
3188 Set_Flag124 (Id, V);
3189 end Set_Is_Eliminated;
3191 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
3194 end Set_Is_Entry_Formal;
3196 procedure Set_Is_Exported (Id : E; V : B := True) is
3199 end Set_Is_Exported;
3201 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
3204 end Set_Is_First_Subtype;
3206 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
3209 (Ekind (Id) = E_Record_Subtype
3211 Ekind (Id) = E_Private_Subtype);
3212 Set_Flag118 (Id, V);
3213 end Set_Is_For_Access_Subtype;
3215 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
3217 Set_Flag111 (Id, V);
3218 end Set_Is_Formal_Subprogram;
3220 procedure Set_Is_Frozen (Id : E; V : B := True) is
3222 pragma Assert (Nkind (Id) in N_Entity);
3226 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
3228 pragma Assert (Is_Type (Id));
3230 end Set_Is_Generic_Actual_Type;
3232 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
3234 Set_Flag130 (Id, V);
3235 end Set_Is_Generic_Instance;
3237 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
3239 pragma Assert (Nkind (Id) in N_Entity);
3241 end Set_Is_Generic_Type;
3243 procedure Set_Is_Hidden (Id : E; V : B := True) is
3248 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
3250 Set_Flag171 (Id, V);
3251 end Set_Is_Hidden_Open_Scope;
3253 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
3255 pragma Assert (Nkind (Id) in N_Entity);
3257 end Set_Is_Immediately_Visible;
3259 procedure Set_Is_Imported (Id : E; V : B := True) is
3262 end Set_Is_Imported;
3264 procedure Set_Is_Inlined (Id : E; V : B := True) is
3269 procedure Set_Is_Instantiated (Id : E; V : B := True) is
3271 Set_Flag126 (Id, V);
3272 end Set_Is_Instantiated;
3274 procedure Set_Is_Internal (Id : E; V : B := True) is
3276 pragma Assert (Nkind (Id) in N_Entity);
3278 end Set_Is_Internal;
3280 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
3282 pragma Assert (Nkind (Id) in N_Entity);
3284 end Set_Is_Interrupt_Handler;
3286 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
3289 end Set_Is_Intrinsic_Subprogram;
3291 procedure Set_Is_Itype (Id : E; V : B := True) is
3296 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
3298 Set_Flag170 (Id, V);
3299 end Set_Is_Known_Valid;
3301 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
3303 pragma Assert (Is_Type (Id));
3304 Set_Flag106 (Id, V);
3305 end Set_Is_Limited_Composite;
3307 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
3310 end Set_Is_Limited_Record;
3312 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
3314 pragma Assert (Is_Subprogram (Id));
3315 Set_Flag137 (Id, V);
3316 end Set_Is_Machine_Code_Subprogram;
3318 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
3320 pragma Assert (Is_Type (Id));
3321 Set_Flag109 (Id, V);
3322 end Set_Is_Non_Static_Subtype;
3324 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
3326 pragma Assert (Ekind (Id) = E_Procedure);
3327 Set_Flag178 (Id, V);
3328 end Set_Is_Null_Init_Proc;
3330 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
3332 pragma Assert (Is_Formal (Id));
3333 Set_Flag134 (Id, V);
3334 end Set_Is_Optional_Parameter;
3336 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
3338 Set_Flag160 (Id, V);
3339 end Set_Is_Package_Body_Entity;
3341 procedure Set_Is_Packed (Id : E; V : B := True) is
3343 pragma Assert (Base_Type (Id) = Id);
3347 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
3349 Set_Flag138 (Id, V);
3350 end Set_Is_Packed_Array_Type;
3352 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
3354 pragma Assert (Nkind (Id) in N_Entity);
3356 end Set_Is_Potentially_Use_Visible;
3358 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
3361 end Set_Is_Preelaborated;
3363 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
3365 pragma Assert (Is_Type (Id));
3366 Set_Flag107 (Id, V);
3367 end Set_Is_Private_Composite;
3369 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
3372 end Set_Is_Private_Descendant;
3374 procedure Set_Is_Psected (Id : E; V : B := True) is
3376 Set_Flag153 (Id, V);
3379 procedure Set_Is_Public (Id : E; V : B := True) is
3381 pragma Assert (Nkind (Id) in N_Entity);
3385 procedure Set_Is_Pure (Id : E; V : B := True) is
3390 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
3393 end Set_Is_Remote_Call_Interface;
3395 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
3398 end Set_Is_Remote_Types;
3400 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
3402 Set_Flag112 (Id, V);
3403 end Set_Is_Renaming_Of_Object;
3405 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
3408 end Set_Is_Shared_Passive;
3410 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
3413 (Ekind (Id) = E_Exception
3414 or else Ekind (Id) = E_Variable
3415 or else Ekind (Id) = E_Constant
3416 or else Is_Type (Id)
3417 or else Ekind (Id) = E_Void);
3419 end Set_Is_Statically_Allocated;
3421 procedure Set_Is_Tag (Id : E; V : B := True) is
3423 pragma Assert (Nkind (Id) in N_Entity);
3427 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
3430 end Set_Is_Tagged_Type;
3432 procedure Set_Is_True_Constant (Id : E; V : B := True) is
3434 Set_Flag163 (Id, V);
3435 end Set_Is_True_Constant;
3437 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
3439 pragma Assert (Base_Type (Id) = Id);
3440 Set_Flag117 (Id, V);
3441 end Set_Is_Unchecked_Union;
3443 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
3445 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
3446 Set_Flag144 (Id, V);
3447 end Set_Is_Unsigned_Type;
3449 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
3451 pragma Assert (Ekind (Id) = E_Procedure);
3452 Set_Flag127 (Id, V);
3453 end Set_Is_Valued_Procedure;
3455 procedure Set_Is_Visible_Child_Unit (Id : E; V : B := True) is
3457 pragma Assert (Is_Child_Unit (Id));
3458 Set_Flag116 (Id, V);
3459 end Set_Is_Visible_Child_Unit;
3461 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
3463 pragma Assert (Ekind (Id) = E_Exception);
3464 Set_Flag133 (Id, V);
3465 end Set_Is_VMS_Exception;
3467 procedure Set_Is_Volatile (Id : E; V : B := True) is
3469 pragma Assert (Nkind (Id) in N_Entity);
3471 end Set_Is_Volatile;
3473 procedure Set_Last_Entity (Id : E; V : E) is
3476 end Set_Last_Entity;
3478 procedure Set_Lit_Indexes (Id : E; V : E) is
3480 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
3482 end Set_Lit_Indexes;
3484 procedure Set_Lit_Strings (Id : E; V : E) is
3486 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
3488 end Set_Lit_Strings;
3490 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
3492 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
3494 end Set_Machine_Radix_10;
3496 procedure Set_Master_Id (Id : E; V : E) is
3501 procedure Set_Materialize_Entity (Id : E; V : B := True) is
3503 Set_Flag168 (Id, V);
3504 end Set_Materialize_Entity;
3506 procedure Set_Mechanism (Id : E; V : M) is
3508 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
3509 Set_Uint8 (Id, UI_From_Int (V));
3512 procedure Set_Modulus (Id : E; V : U) is
3514 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
3518 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
3520 Set_Flag147 (Id, V);
3521 end Set_Needs_Debug_Info;
3523 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
3526 (Is_Overloadable (Id)
3527 or else Ekind (Id) = E_Subprogram_Type
3528 or else Ekind (Id) = E_Entry_Family);
3530 end Set_Needs_No_Actuals;
3532 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
3535 end Set_Next_Inlined_Subprogram;
3537 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
3539 pragma Assert (Is_Access_Type (Id) and then Root_Type (Id) = Id);
3540 Set_Flag131 (Id, V);
3541 end Set_No_Pool_Assigned;
3543 procedure Set_No_Return (Id : E; V : B := True) is
3546 (Ekind (Id) = E_Procedure or else Ekind (Id) = E_Generic_Procedure);
3547 Set_Flag113 (Id, V);
3550 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
3552 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
3554 end Set_Non_Binary_Modulus;
3556 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
3559 (Root_Type (Id) = Standard_Boolean
3560 and then Ekind (Id) = E_Enumeration_Type);
3561 Set_Flag162 (Id, V);
3562 end Set_Nonzero_Is_True;
3564 procedure Set_Normalized_First_Bit (Id : E; V : U) is
3567 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
3569 end Set_Normalized_First_Bit;
3571 procedure Set_Normalized_Position (Id : E; V : U) is
3574 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
3576 end Set_Normalized_Position;
3578 procedure Set_Normalized_Position_Max (Id : E; V : U) is
3581 (Ekind (Id) = E_Component or else Ekind (Id) = E_Discriminant);
3583 end Set_Normalized_Position_Max;
3585 procedure Set_Not_Source_Assigned (Id : E; V : B := True) is
3587 Set_Flag115 (Id, V);
3588 end Set_Not_Source_Assigned;
3590 procedure Set_Object_Ref (Id : E; V : E) is
3592 pragma Assert (Ekind (Id) = E_Protected_Body);
3596 procedure Set_Original_Record_Component (Id : E; V : E) is
3599 end Set_Original_Record_Component;
3601 procedure Set_Packed_Array_Type (Id : E; V : E) is
3603 pragma Assert (Is_Array_Type (Id));
3605 end Set_Packed_Array_Type;
3607 procedure Set_Parent_Subtype (Id : E; V : E) is
3609 pragma Assert (Ekind (Id) = E_Record_Type);
3611 end Set_Parent_Subtype;
3613 procedure Set_Primitive_Operations (Id : E; V : L) is
3615 pragma Assert (Is_Tagged_Type (Id));
3616 Set_Elist15 (Id, V);
3617 end Set_Primitive_Operations;
3619 procedure Set_Prival (Id : E; V : E) is
3621 pragma Assert (Is_Protected_Private (Id));
3625 procedure Set_Privals_Chain (Id : E; V : L) is
3627 pragma Assert (Is_Overloadable (Id)
3628 or else Ekind (Id) = E_Entry_Family);
3629 Set_Elist23 (Id, V);
3630 end Set_Privals_Chain;
3632 procedure Set_Private_Dependents (Id : E; V : L) is
3634 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
3635 Set_Elist18 (Id, V);
3636 end Set_Private_Dependents;
3638 procedure Set_Private_View (Id : E; V : N) is
3640 pragma Assert (Is_Private_Type (Id));
3642 end Set_Private_View;
3644 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
3646 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
3648 end Set_Protected_Body_Subprogram;
3650 procedure Set_Protected_Formal (Id : E; V : E) is
3652 pragma Assert (Is_Formal (Id));
3654 end Set_Protected_Formal;
3656 procedure Set_Protected_Operation (Id : E; V : N) is
3658 pragma Assert (Is_Protected_Private (Id));
3660 end Set_Protected_Operation;
3662 procedure Set_Reachable (Id : E; V : B := True) is
3667 procedure Set_Referenced (Id : E; V : B := True) is
3669 Set_Flag156 (Id, V);
3672 procedure Set_Referenced_Object (Id : E; V : N) is
3674 pragma Assert (Is_Type (Id));
3676 end Set_Referenced_Object;
3678 procedure Set_Register_Exception_Call (Id : E; V : N) is
3680 pragma Assert (Ekind (Id) = E_Exception);
3682 end Set_Register_Exception_Call;
3684 procedure Set_Related_Array_Object (Id : E; V : E) is
3686 pragma Assert (Is_Array_Type (Id));
3688 end Set_Related_Array_Object;
3690 procedure Set_Related_Instance (Id : E; V : E) is
3692 pragma Assert (Ekind (Id) = E_Package);
3694 end Set_Related_Instance;
3696 procedure Set_Renamed_Entity (Id : E; V : N) is
3699 end Set_Renamed_Entity;
3701 procedure Set_Renamed_Object (Id : E; V : N) is
3704 end Set_Renamed_Object;
3706 procedure Set_Renaming_Map (Id : E; V : U) is
3709 end Set_Renaming_Map;
3711 procedure Set_Return_Present (Id : E; V : B := True) is
3714 end Set_Return_Present;
3716 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
3719 end Set_Returns_By_Ref;
3721 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
3724 (Is_Record_Type (Id) and then Id = Base_Type (Id));
3725 Set_Flag164 (Id, V);
3726 end Set_Reverse_Bit_Order;
3728 procedure Set_RM_Size (Id : E; V : U) is
3730 pragma Assert (Is_Type (Id));
3734 procedure Set_Scalar_Range (Id : E; V : N) is
3737 end Set_Scalar_Range;
3739 procedure Set_Scale_Value (Id : E; V : U) is
3742 end Set_Scale_Value;
3744 procedure Set_Scope_Depth_Value (Id : E; V : U) is
3746 pragma Assert (not Is_Record_Type (Id));
3748 end Set_Scope_Depth_Value;
3750 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
3752 Set_Flag167 (Id, V);
3753 end Set_Sec_Stack_Needed_For_Return;
3755 procedure Set_Shadow_Entities (Id : E; V : S) is
3758 (Ekind (Id) = E_Package or else Ekind (Id) = E_Generic_Package);
3760 end Set_Shadow_Entities;
3762 procedure Set_Shared_Var_Assign_Proc (Id : E; V : E) is
3764 pragma Assert (Ekind (Id) = E_Variable);
3766 end Set_Shared_Var_Assign_Proc;
3768 procedure Set_Shared_Var_Read_Proc (Id : E; V : E) is
3770 pragma Assert (Ekind (Id) = E_Variable);
3772 end Set_Shared_Var_Read_Proc;
3774 procedure Set_Size_Check_Code (Id : E; V : N) is
3776 pragma Assert (Ekind (Id) = E_Constant or else Ekind (Id) = E_Variable);
3778 end Set_Size_Check_Code;
3780 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
3782 Set_Flag177 (Id, V);
3783 end Set_Size_Depends_On_Discriminant;
3785 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
3788 end Set_Size_Known_At_Compile_Time;
3790 procedure Set_Small_Value (Id : E; V : R) is
3792 pragma Assert (Is_Fixed_Point_Type (Id));
3793 Set_Ureal21 (Id, V);
3794 end Set_Small_Value;
3796 procedure Set_Spec_Entity (Id : E; V : E) is
3798 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
3800 end Set_Spec_Entity;
3802 procedure Set_Storage_Size_Variable (Id : E; V : E) is
3804 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
3805 pragma Assert (Base_Type (Id) = Id);
3807 end Set_Storage_Size_Variable;
3809 procedure Set_Strict_Alignment (Id : E; V : B := True) is
3811 pragma Assert (Base_Type (Id) = Id);
3812 Set_Flag145 (Id, V);
3813 end Set_Strict_Alignment;
3815 procedure Set_String_Literal_Length (Id : E; V : U) is
3817 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
3819 end Set_String_Literal_Length;
3821 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
3823 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
3825 end Set_String_Literal_Low_Bound;
3827 procedure Set_Suppress_Access_Checks (Id : E; V : B := True) is
3830 end Set_Suppress_Access_Checks;
3832 procedure Set_Suppress_Accessibility_Checks (Id : E; V : B := True) is
3835 end Set_Suppress_Accessibility_Checks;
3837 procedure Set_Suppress_Discriminant_Checks (Id : E; V : B := True) is
3840 end Set_Suppress_Discriminant_Checks;
3842 procedure Set_Suppress_Division_Checks (Id : E; V : B := True) is
3845 end Set_Suppress_Division_Checks;
3847 procedure Set_Suppress_Elaboration_Checks (Id : E; V : B := True) is
3850 end Set_Suppress_Elaboration_Checks;
3852 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
3854 Set_Flag148 (Id, V);
3855 end Set_Suppress_Elaboration_Warnings;
3857 procedure Set_Suppress_Index_Checks (Id : E; V : B := True) is
3860 end Set_Suppress_Index_Checks;
3862 procedure Set_Suppress_Init_Proc (Id : E; V : B := True) is
3864 Set_Flag105 (Id, V);
3865 end Set_Suppress_Init_Proc;
3867 procedure Set_Suppress_Length_Checks (Id : E; V : B := True) is
3870 end Set_Suppress_Length_Checks;
3872 procedure Set_Suppress_Overflow_Checks (Id : E; V : B := True) is
3875 end Set_Suppress_Overflow_Checks;
3877 procedure Set_Suppress_Range_Checks (Id : E; V : B := True) is
3880 end Set_Suppress_Range_Checks;
3882 procedure Set_Suppress_Storage_Checks (Id : E; V : B := True) is
3885 end Set_Suppress_Storage_Checks;
3887 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
3889 Set_Flag165 (Id, V);
3890 end Set_Suppress_Style_Checks;
3892 procedure Set_Suppress_Tag_Checks (Id : E; V : B := True) is
3895 end Set_Suppress_Tag_Checks;
3897 procedure Set_Underlying_Full_View (Id : E; V : E) is
3899 pragma Assert (Ekind (Id) in Private_Kind);
3901 end Set_Underlying_Full_View;
3903 procedure Set_Unset_Reference (Id : E; V : N) is
3906 end Set_Unset_Reference;
3908 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
3911 end Set_Uses_Sec_Stack;
3913 procedure Set_Vax_Float (Id : E; V : B := True) is
3915 pragma Assert (Id = Base_Type (Id));
3916 Set_Flag151 (Id, V);
3919 procedure Set_Warnings_Off (Id : E; V : B := True) is
3922 end Set_Warnings_Off;
3924 -----------------------------------
3925 -- Field Initialization Routines --
3926 -----------------------------------
3928 procedure Init_Alignment (Id : E) is
3930 Set_Uint14 (Id, Uint_0);
3933 procedure Init_Alignment (Id : E; V : Int) is
3935 Set_Uint14 (Id, UI_From_Int (V));
3938 procedure Init_Component_Bit_Offset (Id : E) is
3940 Set_Uint11 (Id, No_Uint);
3941 end Init_Component_Bit_Offset;
3943 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
3945 Set_Uint11 (Id, UI_From_Int (V));
3946 end Init_Component_Bit_Offset;
3948 procedure Init_Component_Size (Id : E) is
3950 Set_Uint22 (Id, Uint_0);
3951 end Init_Component_Size;
3953 procedure Init_Component_Size (Id : E; V : Int) is
3955 Set_Uint22 (Id, UI_From_Int (V));
3956 end Init_Component_Size;
3958 procedure Init_Digits_Value (Id : E) is
3960 Set_Uint17 (Id, Uint_0);
3961 end Init_Digits_Value;
3963 procedure Init_Digits_Value (Id : E; V : Int) is
3965 Set_Uint17 (Id, UI_From_Int (V));
3966 end Init_Digits_Value;
3968 procedure Init_Esize (Id : E) is
3970 Set_Uint12 (Id, Uint_0);
3973 procedure Init_Esize (Id : E; V : Int) is
3975 Set_Uint12 (Id, UI_From_Int (V));
3978 procedure Init_Normalized_First_Bit (Id : E) is
3980 Set_Uint8 (Id, No_Uint);
3981 end Init_Normalized_First_Bit;
3983 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
3985 Set_Uint8 (Id, UI_From_Int (V));
3986 end Init_Normalized_First_Bit;
3988 procedure Init_Normalized_Position (Id : E) is
3990 Set_Uint9 (Id, No_Uint);
3991 end Init_Normalized_Position;
3993 procedure Init_Normalized_Position (Id : E; V : Int) is
3995 Set_Uint9 (Id, UI_From_Int (V));
3996 end Init_Normalized_Position;
3998 procedure Init_Normalized_Position_Max (Id : E) is
4000 Set_Uint10 (Id, No_Uint);
4001 end Init_Normalized_Position_Max;
4003 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
4005 Set_Uint10 (Id, UI_From_Int (V));
4006 end Init_Normalized_Position_Max;
4008 procedure Init_RM_Size (Id : E) is
4010 Set_Uint13 (Id, Uint_0);
4013 procedure Init_RM_Size (Id : E; V : Int) is
4015 Set_Uint13 (Id, UI_From_Int (V));
4018 -----------------------------
4019 -- Init_Component_Location --
4020 -----------------------------
4022 procedure Init_Component_Location (Id : E) is
4024 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
4025 Set_Uint9 (Id, No_Uint); -- Normalized_Position
4026 Set_Uint11 (Id, No_Uint); -- Component_First_Bit
4027 Set_Uint12 (Id, Uint_0); -- Esize
4028 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
4029 end Init_Component_Location;
4035 procedure Init_Size (Id : E; V : Int) is
4037 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
4038 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
4041 ---------------------
4042 -- Init_Size_Align --
4043 ---------------------
4045 procedure Init_Size_Align (Id : E) is
4047 Set_Uint12 (Id, Uint_0); -- Esize
4048 Set_Uint13 (Id, Uint_0); -- RM_Size
4049 Set_Uint14 (Id, Uint_0); -- Alignment
4050 end Init_Size_Align;
4052 ----------------------------------------------
4053 -- Type Representation Attribute Predicates --
4054 ----------------------------------------------
4056 function Known_Alignment (E : Entity_Id) return B is
4058 return Uint14 (E) /= Uint_0;
4059 end Known_Alignment;
4061 function Known_Component_Bit_Offset (E : Entity_Id) return B is
4063 return Uint11 (E) /= No_Uint;
4064 end Known_Component_Bit_Offset;
4066 function Known_Component_Size (E : Entity_Id) return B is
4068 return Uint22 (Base_Type (E)) /= Uint_0;
4069 end Known_Component_Size;
4071 function Known_Esize (E : Entity_Id) return B is
4073 return Uint12 (E) /= Uint_0;
4076 function Known_Normalized_First_Bit (E : Entity_Id) return B is
4078 return Uint8 (E) /= No_Uint;
4079 end Known_Normalized_First_Bit;
4081 function Known_Normalized_Position (E : Entity_Id) return B is
4083 return Uint9 (E) /= No_Uint;
4084 end Known_Normalized_Position;
4086 function Known_Normalized_Position_Max (E : Entity_Id) return B is
4088 return Uint10 (E) /= No_Uint;
4089 end Known_Normalized_Position_Max;
4091 function Known_RM_Size (E : Entity_Id) return B is
4093 return Uint13 (E) /= Uint_0
4094 or else Is_Discrete_Type (E);
4097 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
4099 return Uint11 (E) /= No_Uint
4100 and then Uint11 (E) >= Uint_0;
4101 end Known_Static_Component_Bit_Offset;
4103 function Known_Static_Component_Size (E : Entity_Id) return B is
4105 return Uint22 (Base_Type (E)) > Uint_0;
4106 end Known_Static_Component_Size;
4108 function Known_Static_Esize (E : Entity_Id) return B is
4110 return Uint12 (E) > Uint_0;
4111 end Known_Static_Esize;
4113 function Known_Static_Normalized_Position (E : Entity_Id) return B is
4115 return Uint9 (E) /= No_Uint
4116 and then Uint9 (E) >= Uint_0;
4117 end Known_Static_Normalized_Position;
4119 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
4121 return Uint10 (E) /= No_Uint
4122 and then Uint10 (E) >= Uint_0;
4123 end Known_Static_Normalized_Position_Max;
4125 function Known_Static_RM_Size (E : Entity_Id) return B is
4127 return Uint13 (E) > Uint_0
4128 or else Is_Discrete_Type (E);
4129 end Known_Static_RM_Size;
4131 function Unknown_Alignment (E : Entity_Id) return B is
4133 return Uint14 (E) = Uint_0;
4134 end Unknown_Alignment;
4136 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
4138 return Uint11 (E) = No_Uint;
4139 end Unknown_Component_Bit_Offset;
4141 function Unknown_Component_Size (E : Entity_Id) return B is
4143 return Uint22 (Base_Type (E)) = Uint_0;
4144 end Unknown_Component_Size;
4146 function Unknown_Esize (E : Entity_Id) return B is
4148 return Uint12 (E) = Uint_0;
4151 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
4153 return Uint8 (E) = No_Uint;
4154 end Unknown_Normalized_First_Bit;
4156 function Unknown_Normalized_Position (E : Entity_Id) return B is
4158 return Uint9 (E) = No_Uint;
4159 end Unknown_Normalized_Position;
4161 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
4163 return Uint10 (E) = No_Uint;
4164 end Unknown_Normalized_Position_Max;
4166 function Unknown_RM_Size (E : Entity_Id) return B is
4168 return Uint13 (E) = Uint_0
4169 and then not Is_Discrete_Type (E);
4170 end Unknown_RM_Size;
4172 --------------------
4173 -- Address_Clause --
4174 --------------------
4176 function Address_Clause (Id : E) return N is
4180 Ritem := First_Rep_Item (Id);
4181 while Present (Ritem) loop
4182 if Nkind (Ritem) = N_Attribute_Definition_Clause
4183 and then Chars (Ritem) = Name_Address
4187 Ritem := Next_Rep_Item (Ritem);
4194 ----------------------
4195 -- Alignment_Clause --
4196 ----------------------
4198 function Alignment_Clause (Id : E) return N is
4202 Ritem := First_Rep_Item (Id);
4203 while Present (Ritem) loop
4204 if Nkind (Ritem) = N_Attribute_Definition_Clause
4205 and then Chars (Ritem) = Name_Alignment
4209 Ritem := Next_Rep_Item (Ritem);
4214 end Alignment_Clause;
4216 ----------------------
4217 -- Ancestor_Subtype --
4218 ----------------------
4220 function Ancestor_Subtype (Id : E) return E is
4222 -- If this is first subtype, or is a base type, then there is no
4223 -- ancestor subtype, so we return Empty to indicate this fact.
4225 if Is_First_Subtype (Id)
4226 or else Id = Base_Type (Id)
4232 D : constant Node_Id := Declaration_Node (Id);
4235 -- If we have a subtype declaration, get the ancestor subtype
4237 if Nkind (D) = N_Subtype_Declaration then
4238 if Nkind (Subtype_Indication (D)) = N_Subtype_Indication then
4239 return Entity (Subtype_Mark (Subtype_Indication (D)));
4241 return Entity (Subtype_Indication (D));
4244 -- If not, then no subtype indication is available
4250 end Ancestor_Subtype;
4256 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
4258 if Last_Entity (V) = Empty then
4259 Set_First_Entity (V, Id);
4261 Set_Next_Entity (Last_Entity (V), Id);
4264 Set_Next_Entity (Id, Empty);
4266 Set_Last_Entity (V, Id);
4273 function Base_Type (Id : E) return E is
4276 when E_Enumeration_Subtype |
4277 E_Signed_Integer_Subtype |
4278 E_Modular_Integer_Subtype |
4279 E_Floating_Point_Subtype |
4280 E_Ordinary_Fixed_Point_Subtype |
4281 E_Decimal_Fixed_Point_Subtype |
4286 E_Record_Subtype_With_Private |
4287 E_Limited_Private_Subtype |
4289 E_Protected_Subtype |
4291 E_String_Literal_Subtype |
4292 E_Class_Wide_Subtype =>
4295 when E_Incomplete_Type =>
4296 if Present (Etype (Id)) then
4307 -------------------------
4308 -- Component_Alignment --
4309 -------------------------
4311 -- Component Alignment is encoded using two flags, Flag128/129 as
4312 -- follows. Note that both flags False = Align_Default, so that the
4313 -- default initialization of flags to False initializes component
4314 -- alignment to the default value as required.
4316 -- Flag128 Flag129 Value
4317 -- ------- ------- -----
4318 -- False False Calign_Default
4319 -- False True Calign_Component_Size
4320 -- True False Calign_Component_Size_4
4321 -- True True Calign_Storage_Unit
4323 function Component_Alignment (Id : E) return C is
4324 BT : Node_Id := Base_Type (Id);
4327 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
4329 if Flag128 (BT) then
4330 if Flag129 (BT) then
4331 return Calign_Storage_Unit;
4333 return Calign_Component_Size_4;
4337 if Flag129 (BT) then
4338 return Calign_Component_Size;
4340 return Calign_Default;
4343 end Component_Alignment;
4345 --------------------
4346 -- Constant_Value --
4347 --------------------
4349 function Constant_Value (Id : E) return N is
4350 D : constant Node_Id := Declaration_Node (Id);
4354 -- If we have no declaration node, then return no constant value.
4355 -- Not clear how this can happen, but it does sometimes ???
4356 -- To investigate, remove this check and compile discrim_po.adb.
4361 -- Normal case where a declaration node is present
4363 elsif Nkind (D) = N_Object_Renaming_Declaration then
4364 return Renamed_Object (Id);
4366 -- If this is a component declaration whose entity is constant, it
4367 -- is a prival within a protected function. It does not have
4368 -- a constant value.
4370 elsif Nkind (D) = N_Component_Declaration then
4374 if Present (Expression (D)) then
4375 return (Expression (D));
4377 elsif Present (Full_View (Id)) then
4378 Full_D := Parent (Full_View (Id));
4380 -- The full view may have been rewritten as an object renaming.
4382 if Nkind (Full_D) = N_Object_Renaming_Declaration then
4383 return Name (Full_D);
4385 return Expression (Full_D);
4393 ----------------------
4394 -- Declaration_Node --
4395 ----------------------
4397 function Declaration_Node (Id : E) return N is
4401 if Ekind (Id) = E_Incomplete_Type
4402 and then Present (Full_View (Id))
4404 P := Parent (Full_View (Id));
4410 if Nkind (P) /= N_Selected_Component
4411 and then Nkind (P) /= N_Expanded_Name
4413 not (Nkind (P) = N_Defining_Program_Unit_Name
4414 and then Is_Child_Unit (Id))
4422 end Declaration_Node;
4424 ---------------------
4425 -- Designated_Type --
4426 ---------------------
4428 function Designated_Type (Id : E) return E is
4432 Desig_Type := Directly_Designated_Type (Id);
4434 if (Ekind (Desig_Type) = E_Incomplete_Type
4435 and then Present (Full_View (Desig_Type)))
4437 return Full_View (Desig_Type);
4439 elsif Is_Class_Wide_Type (Desig_Type)
4440 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
4441 and then Present (Full_View (Etype (Desig_Type)))
4442 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
4444 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
4449 end Designated_Type;
4451 -----------------------------
4452 -- Enclosing_Dynamic_Scope --
4453 -----------------------------
4455 function Enclosing_Dynamic_Scope (Id : E) return E is
4460 while S /= Standard_Standard
4461 and then not Is_Dynamic_Scope (S)
4467 end Enclosing_Dynamic_Scope;
4469 ----------------------
4470 -- Entry_Index_Type --
4471 ----------------------
4473 function Entry_Index_Type (Id : E) return N is
4475 pragma Assert (Ekind (Id) = E_Entry_Family);
4476 return Etype (Discrete_Subtype_Definition (Parent (Id)));
4477 end Entry_Index_Type;
4479 ---------------------
4480 -- First_Component --
4481 ---------------------
4483 function First_Component (Id : E) return E is
4488 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
4490 Comp_Id := First_Entity (Id);
4492 while Present (Comp_Id) loop
4493 exit when Ekind (Comp_Id) = E_Component;
4494 Comp_Id := Next_Entity (Comp_Id);
4498 end First_Component;
4500 ------------------------
4501 -- First_Discriminant --
4502 ------------------------
4504 function First_Discriminant (Id : E) return E is
4509 (Has_Discriminants (Id)
4510 or else Has_Unknown_Discriminants (Id));
4512 Ent := First_Entity (Id);
4514 -- The discriminants are not necessarily contiguous, because access
4515 -- discriminants will generate itypes. They are not the first entities
4516 -- either, because tag and controller record must be ahead of them.
4518 if Chars (Ent) = Name_uTag then
4519 Ent := Next_Entity (Ent);
4522 if Chars (Ent) = Name_uController then
4523 Ent := Next_Entity (Ent);
4526 -- Skip all hidden girder discriminants if any.
4528 while Present (Ent) loop
4529 exit when Ekind (Ent) = E_Discriminant
4530 and then not Is_Completely_Hidden (Ent);
4532 Ent := Next_Entity (Ent);
4535 pragma Assert (Ekind (Ent) = E_Discriminant);
4538 end First_Discriminant;
4544 function First_Formal (Id : E) return E is
4549 (Is_Overloadable (Id)
4550 or else Ekind (Id) = E_Entry_Family
4551 or else Ekind (Id) = E_Subprogram_Body
4552 or else Ekind (Id) = E_Subprogram_Type);
4554 if Ekind (Id) = E_Enumeration_Literal then
4558 Formal := First_Entity (Id);
4560 if Present (Formal) and then Is_Formal (Formal) then
4568 -------------------------------
4569 -- First_Girder_Discriminant --
4570 -------------------------------
4572 function First_Girder_Discriminant (Id : E) return E is
4575 function Has_Completely_Hidden_Discriminant (Id : E) return Boolean;
4576 -- Scans the Discriminants to see whether any are Completely_Hidden
4577 -- (the mechanism for describing non-specified girder discriminants)
4579 function Has_Completely_Hidden_Discriminant (Id : E) return Boolean is
4580 Ent : Entity_Id := Id;
4583 pragma Assert (Ekind (Id) = E_Discriminant);
4585 while Present (Ent) and then Ekind (Ent) = E_Discriminant loop
4587 if Is_Completely_Hidden (Ent) then
4591 Ent := Next_Entity (Ent);
4595 end Has_Completely_Hidden_Discriminant;
4597 -- Start of processing for First_Girder_Discriminant
4601 (Has_Discriminants (Id)
4602 or else Has_Unknown_Discriminants (Id));
4604 Ent := First_Entity (Id);
4606 if Chars (Ent) = Name_uTag then
4607 Ent := Next_Entity (Ent);
4610 if Chars (Ent) = Name_uController then
4611 Ent := Next_Entity (Ent);
4614 if Has_Completely_Hidden_Discriminant (Ent) then
4616 while Present (Ent) loop
4617 exit when Is_Completely_Hidden (Ent);
4618 Ent := Next_Entity (Ent);
4623 pragma Assert (Ekind (Ent) = E_Discriminant);
4626 end First_Girder_Discriminant;
4632 function First_Subtype (Id : E) return E is
4633 B : constant Entity_Id := Base_Type (Id);
4634 F : constant Node_Id := Freeze_Node (B);
4638 -- If the base type has no freeze node, it is a type in standard,
4639 -- and always acts as its own first subtype unless it is one of
4640 -- the predefined integer types. If the type is formal, it is also
4641 -- a first subtype, and its base type has no freeze node. On the other
4642 -- hand, a subtype of a generic formal is not its own first_subtype.
4643 -- Its base type, if anonymous, is attached to the formal type decl.
4644 -- from which the first subtype is obtained.
4648 if B = Base_Type (Standard_Integer) then
4649 return Standard_Integer;
4651 elsif B = Base_Type (Standard_Long_Integer) then
4652 return Standard_Long_Integer;
4654 elsif B = Base_Type (Standard_Short_Short_Integer) then
4655 return Standard_Short_Short_Integer;
4657 elsif B = Base_Type (Standard_Short_Integer) then
4658 return Standard_Short_Integer;
4660 elsif B = Base_Type (Standard_Long_Long_Integer) then
4661 return Standard_Long_Long_Integer;
4663 elsif Is_Generic_Type (Id) then
4664 if Present (Parent (B)) then
4665 return Defining_Identifier (Parent (B));
4667 return Defining_Identifier (Associated_Node_For_Itype (B));
4674 -- Otherwise we check the freeze node, if it has a First_Subtype_Link
4675 -- then we use that link, otherwise (happens with some Itypes), we use
4676 -- the base type itself.
4679 Ent := First_Subtype_Link (F);
4681 if Present (Ent) then
4689 ------------------------
4690 -- Has_Attach_Handler --
4691 ------------------------
4693 function Has_Attach_Handler (Id : E) return B is
4697 pragma Assert (Is_Protected_Type (Id));
4699 Ritem := First_Rep_Item (Id);
4700 while Present (Ritem) loop
4701 if Nkind (Ritem) = N_Pragma
4702 and then Chars (Ritem) = Name_Attach_Handler
4706 Ritem := Next_Rep_Item (Ritem);
4711 end Has_Attach_Handler;
4717 function Has_Entries (Id : E) return B is
4718 Result : Boolean := False;
4722 pragma Assert (Is_Concurrent_Type (Id));
4723 Ent := First_Entity (Id);
4725 while Present (Ent) loop
4726 if Is_Entry (Ent) then
4731 Ent := Next_Entity (Ent);
4737 ----------------------------
4738 -- Has_Foreign_Convention --
4739 ----------------------------
4741 function Has_Foreign_Convention (Id : E) return B is
4743 return Convention (Id) >= Foreign_Convention'First;
4744 end Has_Foreign_Convention;
4746 ---------------------------
4747 -- Has_Interrupt_Handler --
4748 ---------------------------
4750 function Has_Interrupt_Handler (Id : E) return B is
4754 pragma Assert (Is_Protected_Type (Id));
4756 Ritem := First_Rep_Item (Id);
4757 while Present (Ritem) loop
4758 if Nkind (Ritem) = N_Pragma
4759 and then Chars (Ritem) = Name_Interrupt_Handler
4763 Ritem := Next_Rep_Item (Ritem);
4768 end Has_Interrupt_Handler;
4770 --------------------------
4771 -- Has_Private_Ancestor --
4772 --------------------------
4774 function Has_Private_Ancestor (Id : E) return B is
4775 R : constant Entity_Id := Root_Type (Id);
4776 T1 : Entity_Id := Id;
4780 if Is_Private_Type (T1) then
4790 end Has_Private_Ancestor;
4792 ------------------------------
4793 -- Implementation_Base_Type --
4794 ------------------------------
4796 function Implementation_Base_Type (Id : E) return E is
4801 Bastyp := Base_Type (Id);
4803 if Is_Incomplete_Or_Private_Type (Bastyp) then
4804 Imptyp := Underlying_Type (Bastyp);
4806 -- If we have an implementation type, then just return it,
4807 -- otherwise we return the Base_Type anyway. This can only
4808 -- happen in error situations and should avoid some error bombs.
4810 if Present (Imptyp) then
4819 end Implementation_Base_Type;
4821 -----------------------
4822 -- Is_Always_Inlined --
4823 -----------------------
4825 function Is_Always_Inlined (Id : E) return B is
4829 Item := First_Rep_Item (Id);
4831 while Present (Item) loop
4832 if Nkind (Item) = N_Pragma
4833 and then Get_Pragma_Id (Chars (Item)) = Pragma_Inline_Always
4838 Next_Rep_Item (Item);
4842 end Is_Always_Inlined;
4844 ---------------------
4845 -- Is_Boolean_Type --
4846 ---------------------
4848 function Is_Boolean_Type (Id : E) return B is
4850 return Root_Type (Id) = Standard_Boolean;
4851 end Is_Boolean_Type;
4853 ---------------------
4854 -- Is_By_Copy_Type --
4855 ---------------------
4857 function Is_By_Copy_Type (Id : E) return B is
4859 -- If Id is a private type whose full declaration has not been seen,
4860 -- we assume for now that it is not a By_Copy type. Clearly this
4861 -- attribute should not be used before the type is frozen, but it is
4862 -- needed to build the associated record of a protected type. Another
4863 -- place where some lookahead for a full view is needed ???
4866 Is_Elementary_Type (Id)
4867 or else (Is_Private_Type (Id)
4868 and then Present (Underlying_Type (Id))
4869 and then Is_Elementary_Type (Underlying_Type (Id)));
4870 end Is_By_Copy_Type;
4872 --------------------------
4873 -- Is_By_Reference_Type --
4874 --------------------------
4876 function Is_By_Reference_Type (Id : E) return B is
4877 Btype : constant Entity_Id := Base_Type (Id);
4880 if Error_Posted (Id)
4881 or else Error_Posted (Btype)
4885 elsif Is_Private_Type (Btype) then
4887 Utyp : constant Entity_Id := Underlying_Type (Btype);
4893 return Is_By_Reference_Type (Utyp);
4897 elsif Is_Concurrent_Type (Btype) then
4900 elsif Is_Record_Type (Btype) then
4902 if Is_Limited_Record (Btype)
4903 or else Is_Tagged_Type (Btype)
4904 or else Is_Volatile (Btype)
4910 C : Entity_Id := First_Component (Btype);
4913 while Present (C) loop
4914 if Is_By_Reference_Type (Etype (C))
4915 or else Is_Volatile (Etype (C))
4920 C := Next_Component (C);
4927 elsif Is_Array_Type (Btype) then
4930 or else Is_By_Reference_Type (Component_Type (Btype))
4931 or else Is_Volatile (Component_Type (Btype))
4932 or else Has_Volatile_Components (Btype);
4937 end Is_By_Reference_Type;
4939 ---------------------
4940 -- Is_Derived_Type --
4941 ---------------------
4943 function Is_Derived_Type (Id : E) return B is
4947 if Base_Type (Id) /= Root_Type (Id)
4948 and then not Is_Generic_Type (Id)
4949 and then not Is_Class_Wide_Type (Id)
4951 if not Is_Numeric_Type (Root_Type (Id)) then
4955 Par := Parent (First_Subtype (Id));
4957 return Present (Par)
4958 and then Nkind (Par) = N_Full_Type_Declaration
4959 and then Nkind (Type_Definition (Par))
4960 = N_Derived_Type_Definition;
4966 end Is_Derived_Type;
4968 ----------------------
4969 -- Is_Dynamic_Scope --
4970 ----------------------
4972 function Is_Dynamic_Scope (Id : E) return B is
4975 Ekind (Id) = E_Block
4977 Ekind (Id) = E_Function
4979 Ekind (Id) = E_Procedure
4981 Ekind (Id) = E_Subprogram_Body
4983 Ekind (Id) = E_Task_Type
4985 Ekind (Id) = E_Entry
4987 Ekind (Id) = E_Entry_Family;
4988 end Is_Dynamic_Scope;
4990 --------------------
4991 -- Is_Entity_Name --
4992 --------------------
4994 function Is_Entity_Name (N : Node_Id) return Boolean is
4995 Kind : constant Node_Kind := Nkind (N);
4998 -- Identifiers, operator symbols, expanded names are entity names
5000 return Kind = N_Identifier
5001 or else Kind = N_Operator_Symbol
5002 or else Kind = N_Expanded_Name
5004 -- Attribute references are entity names if they refer to an entity.
5005 -- Note that we don't do this by testing for the presence of the
5006 -- Entity field in the N_Attribute_Reference node, since it may not
5007 -- have been set yet.
5009 or else (Kind = N_Attribute_Reference
5010 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
5013 ---------------------------
5014 -- Is_Indefinite_Subtype --
5015 ---------------------------
5017 function Is_Indefinite_Subtype (Id : Entity_Id) return B is
5018 K : constant Entity_Kind := Ekind (Id);
5021 if Is_Constrained (Id) then
5024 elsif K in Array_Kind
5025 or else K in Class_Wide_Kind
5026 or else Has_Unknown_Discriminants (Id)
5030 -- Known discriminants: indefinite if there are no default values
5032 elsif K in Record_Kind
5033 or else Is_Incomplete_Or_Private_Type (Id)
5034 or else Is_Concurrent_Type (Id)
5036 return (Has_Discriminants (Id)
5037 and then No (Discriminant_Default_Value (First_Discriminant (Id))));
5042 end Is_Indefinite_Subtype;
5044 ---------------------
5045 -- Is_Limited_Type --
5046 ---------------------
5048 function Is_Limited_Type (Id : E) return B is
5049 Btype : constant E := Base_Type (Id);
5052 if not Is_Type (Id) then
5055 elsif Ekind (Btype) = E_Limited_Private_Type
5056 or else Is_Limited_Composite (Btype)
5060 elsif Is_Concurrent_Type (Btype) then
5063 -- Otherwise we will look around to see if there is some other reason
5064 -- for it to be limited, except that if an error was posted on the
5065 -- entity, then just assume it is non-limited, because it can cause
5066 -- trouble to recurse into a murky erroneous entity!
5068 elsif Error_Posted (Id) then
5071 elsif Is_Record_Type (Btype) then
5072 if Is_Limited_Record (Root_Type (Btype)) then
5075 elsif Is_Class_Wide_Type (Btype) then
5076 return Is_Limited_Type (Root_Type (Btype));
5080 C : E := First_Component (Btype);
5083 while Present (C) loop
5084 if Is_Limited_Type (Etype (C)) then
5088 C := Next_Component (C);
5095 elsif Is_Array_Type (Btype) then
5096 return Is_Limited_Type (Component_Type (Btype));
5101 end Is_Limited_Type;
5107 function Is_Package (Id : E) return B is
5110 Ekind (Id) = E_Package
5112 Ekind (Id) = E_Generic_Package;
5115 --------------------------
5116 -- Is_Protected_Private --
5117 --------------------------
5119 function Is_Protected_Private (Id : E) return B is
5122 pragma Assert (Ekind (Id) = E_Component);
5123 return Is_Protected_Type (Scope (Id));
5124 end Is_Protected_Private;
5126 ------------------------------
5127 -- Is_Protected_Record_Type --
5128 ------------------------------
5130 function Is_Protected_Record_Type (Id : E) return B is
5133 Is_Concurrent_Record_Type (Id)
5134 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
5135 end Is_Protected_Record_Type;
5137 ---------------------------------
5138 -- Is_Return_By_Reference_Type --
5139 ---------------------------------
5141 function Is_Return_By_Reference_Type (Id : E) return B is
5142 Btype : constant Entity_Id := Base_Type (Id);
5145 if Is_Private_Type (Btype) then
5147 Utyp : constant Entity_Id := Underlying_Type (Btype);
5153 return Is_Return_By_Reference_Type (Utyp);
5157 elsif Is_Concurrent_Type (Btype) then
5160 elsif Is_Record_Type (Btype) then
5161 if Is_Limited_Record (Btype) then
5164 elsif Is_Class_Wide_Type (Btype) then
5165 return Is_Return_By_Reference_Type (Root_Type (Btype));
5169 C : Entity_Id := First_Component (Btype);
5172 while Present (C) loop
5173 if Is_Return_By_Reference_Type (Etype (C)) then
5177 C := Next_Component (C);
5184 elsif Is_Array_Type (Btype) then
5185 return Is_Return_By_Reference_Type (Component_Type (Btype));
5190 end Is_Return_By_Reference_Type;
5192 --------------------
5193 -- Is_String_Type --
5194 --------------------
5196 function Is_String_Type (Id : E) return B is
5198 return Ekind (Id) in String_Kind
5199 or else (Is_Array_Type (Id)
5200 and then Number_Dimensions (Id) = 1
5201 and then Is_Character_Type (Component_Type (Id)));
5204 -------------------------
5205 -- Is_Task_Record_Type --
5206 -------------------------
5208 function Is_Task_Record_Type (Id : E) return B is
5211 Is_Concurrent_Record_Type (Id)
5212 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
5213 end Is_Task_Record_Type;
5215 ------------------------
5216 -- Is_Wrapper_Package --
5217 ------------------------
5219 function Is_Wrapper_Package (Id : E) return B is
5221 return (Ekind (Id) = E_Package
5222 and then Present (Related_Instance (Id)));
5223 end Is_Wrapper_Package;
5225 --------------------
5226 -- Next_Component --
5227 --------------------
5229 function Next_Component (Id : E) return E is
5233 Comp_Id := Next_Entity (Id);
5235 while Present (Comp_Id) loop
5236 exit when Ekind (Comp_Id) = E_Component;
5237 Comp_Id := Next_Entity (Comp_Id);
5243 -----------------------
5244 -- Next_Discriminant --
5245 -----------------------
5247 -- This function actually implements both Next_Discriminant and
5248 -- Next_Girder_Discriminant by making sure that the Discriminant
5249 -- returned is of the same variety as Id.
5251 function Next_Discriminant (Id : E) return E is
5253 -- Derived Tagged types with private extensions look like this...
5255 -- E_Discriminant d1
5256 -- E_Discriminant d2
5258 -- E_Discriminant d1
5259 -- E_Discriminant d2
5261 -- so it is critical not to go past the leading discriminants.
5266 pragma Assert (Ekind (Id) = E_Discriminant);
5269 D := Next_Entity (D);
5271 or else (Ekind (D) /= E_Discriminant
5272 and then not Is_Itype (D))
5277 exit when Ekind (D) = E_Discriminant
5278 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
5282 end Next_Discriminant;
5288 function Next_Formal (Id : E) return E is
5292 -- Follow the chain of declared entities as long as the kind of
5293 -- the entity corresponds to a formal parameter. Skip internal
5294 -- entities that may have been created for implicit subtypes,
5295 -- in the process of analyzing default expressions.
5300 P := Next_Entity (P);
5302 if No (P) or else Is_Formal (P) then
5304 elsif not Is_Internal (P) then
5310 -----------------------------
5311 -- Next_Formal_With_Extras --
5312 -----------------------------
5314 function Next_Formal_With_Extras (Id : E) return E is
5316 if Present (Extra_Formal (Id)) then
5317 return Extra_Formal (Id);
5320 return Next_Formal (Id);
5322 end Next_Formal_With_Extras;
5324 ------------------------------
5325 -- Next_Girder_Discriminant --
5326 ------------------------------
5328 function Next_Girder_Discriminant (Id : E) return E is
5330 -- See comment in Next_Discriminant
5332 return Next_Discriminant (Id);
5333 end Next_Girder_Discriminant;
5339 function Next_Index (Id : Node_Id) return Node_Id is
5348 function Next_Literal (Id : E) return E is
5350 pragma Assert (Nkind (Id) in N_Entity);
5354 -----------------------
5355 -- Number_Dimensions --
5356 -----------------------
5358 function Number_Dimensions (Id : E) return Pos is
5363 if Ekind (Id) in String_Kind then
5368 T := First_Index (Id);
5370 while Present (T) loop
5377 end Number_Dimensions;
5379 --------------------------
5380 -- Number_Discriminants --
5381 --------------------------
5383 function Number_Discriminants (Id : E) return Pos is
5389 Discr := First_Discriminant (Id);
5391 while Present (Discr) loop
5393 Discr := Next_Discriminant (Discr);
5397 end Number_Discriminants;
5399 --------------------
5400 -- Number_Entries --
5401 --------------------
5403 function Number_Entries (Id : E) return Nat is
5408 pragma Assert (Is_Concurrent_Type (Id));
5410 Ent := First_Entity (Id);
5412 while Present (Ent) loop
5413 if Is_Entry (Ent) then
5417 Ent := Next_Entity (Ent);
5423 --------------------
5424 -- Number_Formals --
5425 --------------------
5427 function Number_Formals (Id : E) return Pos is
5433 Formal := First_Formal (Id);
5435 while Present (Formal) loop
5437 Formal := Next_Formal (Formal);
5443 --------------------
5444 -- Parameter_Mode --
5445 --------------------
5447 function Parameter_Mode (Id : E) return Formal_Kind is
5456 function Root_Type (Id : E) return E is
5460 pragma Assert (Nkind (Id) in N_Entity);
5462 T := Base_Type (Id);
5464 if Ekind (T) = E_Class_Wide_Type then
5476 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
5479 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
5487 raise Program_Error;
5494 function Scope_Depth (Id : E) return Uint is
5495 Scop : Entity_Id := Id;
5498 while Is_Record_Type (Scop) loop
5499 Scop := Scope (Scop);
5502 return Scope_Depth_Value (Scop);
5505 ---------------------
5506 -- Scope_Depth_Set --
5507 ---------------------
5509 function Scope_Depth_Set (Id : E) return B is
5511 return not Is_Record_Type (Id)
5512 and then Field22 (Id) /= Union_Id (Empty);
5513 end Scope_Depth_Set;
5515 -----------------------------
5516 -- Set_Component_Alignment --
5517 -----------------------------
5519 -- Component Alignment is encoded using two flags, Flag128/129 as
5520 -- follows. Note that both flags False = Align_Default, so that the
5521 -- default initialization of flags to False initializes component
5522 -- alignment to the default value as required.
5524 -- Flag128 Flag129 Value
5525 -- ------- ------- -----
5526 -- False False Calign_Default
5527 -- False True Calign_Component_Size
5528 -- True False Calign_Component_Size_4
5529 -- True True Calign_Storage_Unit
5531 procedure Set_Component_Alignment (Id : E; V : C) is
5533 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
5534 and then Id = Base_Type (Id));
5537 when Calign_Default =>
5538 Set_Flag128 (Id, False);
5539 Set_Flag129 (Id, False);
5541 when Calign_Component_Size =>
5542 Set_Flag128 (Id, False);
5543 Set_Flag129 (Id, True);
5545 when Calign_Component_Size_4 =>
5546 Set_Flag128 (Id, True);
5547 Set_Flag129 (Id, False);
5549 when Calign_Storage_Unit =>
5550 Set_Flag128 (Id, True);
5551 Set_Flag129 (Id, True);
5553 end Set_Component_Alignment;
5559 function Size_Clause (Id : E) return N is
5563 Ritem := First_Rep_Item (Id);
5564 while Present (Ritem) loop
5565 if Nkind (Ritem) = N_Attribute_Definition_Clause
5566 and then Chars (Ritem) = Name_Size
5570 Ritem := Next_Rep_Item (Ritem);
5581 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
5587 Kind := E_Access_Subtype;
5591 Kind := E_Array_Subtype;
5593 when E_Class_Wide_Type |
5594 E_Class_Wide_Subtype =>
5595 Kind := E_Class_Wide_Subtype;
5597 when E_Decimal_Fixed_Point_Type |
5598 E_Decimal_Fixed_Point_Subtype =>
5599 Kind := E_Decimal_Fixed_Point_Subtype;
5601 when E_Ordinary_Fixed_Point_Type |
5602 E_Ordinary_Fixed_Point_Subtype =>
5603 Kind := E_Ordinary_Fixed_Point_Subtype;
5605 when E_Private_Type |
5606 E_Private_Subtype =>
5607 Kind := E_Private_Subtype;
5609 when E_Limited_Private_Type |
5610 E_Limited_Private_Subtype =>
5611 Kind := E_Limited_Private_Subtype;
5613 when E_Record_Type_With_Private |
5614 E_Record_Subtype_With_Private =>
5615 Kind := E_Record_Subtype_With_Private;
5617 when E_Record_Type |
5619 Kind := E_Record_Subtype;
5621 when E_String_Type |
5623 Kind := E_String_Subtype;
5625 when Enumeration_Kind =>
5626 Kind := E_Enumeration_Subtype;
5629 Kind := E_Floating_Point_Subtype;
5631 when Signed_Integer_Kind =>
5632 Kind := E_Signed_Integer_Subtype;
5634 when Modular_Integer_Kind =>
5635 Kind := E_Modular_Integer_Subtype;
5637 when Protected_Kind =>
5638 Kind := E_Protected_Subtype;
5641 Kind := E_Task_Subtype;
5645 raise Program_Error;
5655 function Tag_Component (Id : E) return E is
5657 Typ : Entity_Id := Id;
5660 pragma Assert (Is_Tagged_Type (Typ));
5662 if Is_Class_Wide_Type (Typ) then
5663 Typ := Root_Type (Typ);
5666 if Is_Private_Type (Typ) then
5667 Typ := Underlying_Type (Typ);
5670 Comp := First_Entity (Typ);
5671 while Present (Comp) loop
5672 if Is_Tag (Comp) then
5676 Comp := Next_Entity (Comp);
5679 -- No tag component found
5684 ---------------------
5685 -- Type_High_Bound --
5686 ---------------------
5688 function Type_High_Bound (Id : E) return Node_Id is
5690 if Nkind (Scalar_Range (Id)) = N_Subtype_Indication then
5691 return High_Bound (Range_Expression (Constraint (Scalar_Range (Id))));
5693 return High_Bound (Scalar_Range (Id));
5695 end Type_High_Bound;
5697 --------------------
5698 -- Type_Low_Bound --
5699 --------------------
5701 function Type_Low_Bound (Id : E) return Node_Id is
5703 if Nkind (Scalar_Range (Id)) = N_Subtype_Indication then
5704 return Low_Bound (Range_Expression (Constraint (Scalar_Range (Id))));
5706 return Low_Bound (Scalar_Range (Id));
5710 ---------------------
5711 -- Underlying_Type --
5712 ---------------------
5714 function Underlying_Type (Id : E) return E is
5717 -- For record_with_private the underlying type is always the direct
5718 -- full view. Never try to take the full view of the parent it
5719 -- doesn't make sense.
5721 if Ekind (Id) = E_Record_Type_With_Private then
5722 return Full_View (Id);
5724 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
5726 -- If we have an incomplete or private type with a full view,
5727 -- then we return the Underlying_Type of this full view
5729 if Present (Full_View (Id)) then
5730 return Underlying_Type (Full_View (Id));
5732 -- Otherwise check for the case where we have a derived type or
5733 -- subtype, and if so get the Underlying_Type of the parent type.
5735 elsif Etype (Id) /= Id then
5736 return Underlying_Type (Etype (Id));
5738 -- Otherwise we have an incomplete or private type that has
5739 -- no full view, which means that we have not encountered the
5740 -- completion, so return Empty to indicate the underlying type
5741 -- is not yet known.
5747 -- For non-incomplete, non-private types, return the type itself
5748 -- Also for entities that are not types at all return the entity
5754 end Underlying_Type;
5756 ------------------------
5757 -- Write_Entity_Flags --
5758 ------------------------
5760 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
5762 procedure W (Flag_Name : String; Flag : Boolean);
5763 -- Write out given flag if it is set
5765 procedure W (Flag_Name : String; Flag : Boolean) is
5769 Write_Str (Flag_Name);
5770 Write_Str (" = True");
5775 -- Start of processing for Write_Entity_Flags
5778 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
5779 and then Base_Type (Id) = Id
5782 Write_Str ("Component_Alignment = ");
5784 case Component_Alignment (Id) is
5785 when Calign_Default =>
5786 Write_Str ("Calign_Default");
5788 when Calign_Component_Size =>
5789 Write_Str ("Calign_Component_Size");
5791 when Calign_Component_Size_4 =>
5792 Write_Str ("Calign_Component_Size_4");
5794 when Calign_Storage_Unit =>
5795 Write_Str ("Calign_Storage_Unit");
5801 W ("Address_Taken", Flag104 (Id));
5802 W ("C_Pass_By_Copy", Flag125 (Id));
5803 W ("Debug_Info_Off", Flag166 (Id));
5804 W ("Default_Expressions_Processed", Flag108 (Id));
5805 W ("Delay_Cleanups", Flag114 (Id));
5806 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
5807 W ("Depends_On_Private", Flag14 (Id));
5808 W ("Discard_Names", Flag88 (Id));
5809 W ("Elaborate_All_Desirable", Flag146 (Id));
5810 W ("Elaboration_Entity_Required", Flag174 (Id));
5811 W ("Entry_Accepted", Flag152 (Id));
5812 W ("Finalize_Storage_Only", Flag158 (Id));
5813 W ("From_With_Type", Flag159 (Id));
5814 W ("Function_Returns_With_DSP", Flag169 (Id));
5815 W ("Has_Aliased_Components", Flag135 (Id));
5816 W ("Has_Alignment_Clause", Flag46 (Id));
5817 W ("Has_All_Calls_Remote", Flag79 (Id));
5818 W ("Has_Atomic_Components", Flag86 (Id));
5819 W ("Has_Biased_Representation", Flag139 (Id));
5820 W ("Has_Completion", Flag26 (Id));
5821 W ("Has_Completion_In_Body", Flag71 (Id));
5822 W ("Has_Complex_Representation", Flag140 (Id));
5823 W ("Has_Component_Size_Clause", Flag68 (Id));
5824 W ("Has_Controlled_Component", Flag43 (Id));
5825 W ("Has_Controlling_Result", Flag98 (Id));
5826 W ("Has_Convention_Pragma", Flag119 (Id));
5827 W ("Has_Delayed_Freeze", Flag18 (Id));
5828 W ("Has_Discriminants", Flag5 (Id));
5829 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
5830 W ("Has_Exit", Flag47 (Id));
5831 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
5832 W ("Has_Forward_Instantiation", Flag175 (Id));
5833 W ("Has_Fully_Qualified_Name", Flag173 (Id));
5834 W ("Has_Gigi_Rep_Item", Flag82 (Id));
5835 W ("Has_Homonym", Flag56 (Id));
5836 W ("Has_Machine_Radix_Clause", Flag83 (Id));
5837 W ("Has_Master_Entity", Flag21 (Id));
5838 W ("Has_Missing_Return", Flag142 (Id));
5839 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
5840 W ("Has_Non_Standard_Rep", Flag75 (Id));
5841 W ("Has_Object_Size_Clause", Flag172 (Id));
5842 W ("Has_Per_Object_Constraint", Flag154 (Id));
5843 W ("Has_Pragma_Controlled", Flag27 (Id));
5844 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
5845 W ("Has_Pragma_Inline", Flag157 (Id));
5846 W ("Has_Pragma_Pack", Flag121 (Id));
5847 W ("Has_Pragma_Pure_Function", Flag179 (Id));
5848 W ("Has_Primitive_Operations", Flag120 (Id));
5849 W ("Has_Private_Declaration", Flag155 (Id));
5850 W ("Has_Qualified_Name", Flag161 (Id));
5851 W ("Has_Record_Rep_Clause", Flag65 (Id));
5852 W ("Has_Recursive_Call", Flag143 (Id));
5853 W ("Has_Size_Clause", Flag29 (Id));
5854 W ("Has_Small_Clause", Flag67 (Id));
5855 W ("Has_Specified_Layout", Flag100 (Id));
5856 W ("Has_Storage_Size_Clause", Flag23 (Id));
5857 W ("Has_Subprogram_Descriptor", Flag93 (Id));
5858 W ("Has_Task", Flag30 (Id));
5859 W ("Has_Unchecked_Union", Flag123 (Id));
5860 W ("Has_Unknown_Discriminants", Flag72 (Id));
5861 W ("Has_Volatile_Components", Flag87 (Id));
5862 W ("In_Package_Body", Flag48 (Id));
5863 W ("In_Private_Part", Flag45 (Id));
5864 W ("In_Use", Flag8 (Id));
5865 W ("Is_AST_Entry", Flag132 (Id));
5866 W ("Is_Abstract", Flag19 (Id));
5867 W ("Is_Access_Constant", Flag69 (Id));
5868 W ("Is_Aliased", Flag15 (Id));
5869 W ("Is_Asynchronous", Flag81 (Id));
5870 W ("Is_Atomic", Flag85 (Id));
5871 W ("Is_Bit_Packed_Array", Flag122 (Id));
5872 W ("Is_CPP_Class", Flag74 (Id));
5873 W ("Is_Called", Flag102 (Id));
5874 W ("Is_Character_Type", Flag63 (Id));
5875 W ("Is_Child_Unit", Flag73 (Id));
5876 W ("Is_Compilation_Unit", Flag149 (Id));
5877 W ("Is_Completely_Hidden", Flag103 (Id));
5878 W ("Is_Concurrent_Record_Type", Flag20 (Id));
5879 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
5880 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
5881 W ("Is_Constrained", Flag12 (Id));
5882 W ("Is_Constructor", Flag76 (Id));
5883 W ("Is_Controlled", Flag42 (Id));
5884 W ("Is_Controlling_Formal", Flag97 (Id));
5885 W ("Is_Destructor", Flag77 (Id));
5886 W ("Is_Discrim_SO_Function", Flag176 (Id));
5887 W ("Is_Dispatching_Operation", Flag6 (Id));
5888 W ("Is_Eliminated", Flag124 (Id));
5889 W ("Is_Entry_Formal", Flag52 (Id));
5890 W ("Is_Exported", Flag99 (Id));
5891 W ("Is_First_Subtype", Flag70 (Id));
5892 W ("Is_For_Access_Subtype", Flag118 (Id));
5893 W ("Is_Formal_Subprogram", Flag111 (Id));
5894 W ("Is_Frozen", Flag4 (Id));
5895 W ("Is_Generic_Actual_Type", Flag94 (Id));
5896 W ("Is_Generic_Instance", Flag130 (Id));
5897 W ("Is_Generic_Type", Flag13 (Id));
5898 W ("Is_Hidden", Flag57 (Id));
5899 W ("Is_Hidden_Open_Scope", Flag171 (Id));
5900 W ("Is_Immediately_Visible", Flag7 (Id));
5901 W ("Is_Imported", Flag24 (Id));
5902 W ("Is_Inlined", Flag11 (Id));
5903 W ("Is_Instantiated", Flag126 (Id));
5904 W ("Is_Internal", Flag17 (Id));
5905 W ("Is_Interrupt_Handler", Flag89 (Id));
5906 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
5907 W ("Is_Itype", Flag91 (Id));
5908 W ("Is_Known_Valid", Flag170 (Id));
5909 W ("Is_Limited_Composite", Flag106 (Id));
5910 W ("Is_Limited_Record", Flag25 (Id));
5911 W ("Is_Non_Static_Subtype", Flag109 (Id));
5912 W ("Is_Null_Init_Proc", Flag178 (Id));
5913 W ("Is_Optional_Parameter", Flag134 (Id));
5914 W ("Is_Package_Body_Entity", Flag160 (Id));
5915 W ("Is_Packed", Flag51 (Id));
5916 W ("Is_Packed_Array_Type", Flag138 (Id));
5917 W ("Is_Potentially_Use_Visible", Flag9 (Id));
5918 W ("Is_Preelaborated", Flag59 (Id));
5919 W ("Is_Private_Composite", Flag107 (Id));
5920 W ("Is_Private_Descendant", Flag53 (Id));
5921 W ("Is_Psected", Flag153 (Id));
5922 W ("Is_Public", Flag10 (Id));
5923 W ("Is_Pure", Flag44 (Id));
5924 W ("Is_Remote_Call_Interface", Flag62 (Id));
5925 W ("Is_Remote_Types", Flag61 (Id));
5926 W ("Is_Renaming_Of_Object", Flag112 (Id));
5927 W ("Is_Shared_Passive", Flag60 (Id));
5928 W ("Is_Statically_Allocated", Flag28 (Id));
5929 W ("Is_Tag", Flag78 (Id));
5930 W ("Is_Tagged_Type", Flag55 (Id));
5931 W ("Is_True_Constant", Flag163 (Id));
5932 W ("Is_Unchecked_Union", Flag117 (Id));
5933 W ("Is_Unsigned_Type", Flag144 (Id));
5934 W ("Is_VMS_Exception", Flag133 (Id));
5935 W ("Is_Valued_Procedure", Flag127 (Id));
5936 W ("Is_Visible_Child_Unit", Flag116 (Id));
5937 W ("Is_Volatile", Flag16 (Id));
5938 W ("Machine_Radix_10", Flag84 (Id));
5939 W ("Materialize_Entity", Flag168 (Id));
5940 W ("Needs_Debug_Info", Flag147 (Id));
5941 W ("Needs_No_Actuals", Flag22 (Id));
5942 W ("No_Pool_Assigned", Flag131 (Id));
5943 W ("No_Return", Flag113 (Id));
5944 W ("Non_Binary_Modulus", Flag58 (Id));
5945 W ("Nonzero_Is_True", Flag162 (Id));
5946 W ("Not_Source_Assigned", Flag115 (Id));
5947 W ("Reachable", Flag49 (Id));
5948 W ("Referenced", Flag156 (Id));
5949 W ("Return_Present", Flag54 (Id));
5950 W ("Returns_By_Ref", Flag90 (Id));
5951 W ("Reverse_Bit_Order", Flag164 (Id));
5952 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
5953 W ("Size_Depends_On_Discriminant", Flag177 (Id));
5954 W ("Size_Known_At_Compile_Time", Flag92 (Id));
5955 W ("Strict_Alignment", Flag145 (Id));
5956 W ("Suppress_Access_Checks", Flag31 (Id));
5957 W ("Suppress_Accessibility_Checks", Flag32 (Id));
5958 W ("Suppress_Discriminant_Checks", Flag33 (Id));
5959 W ("Suppress_Division_Checks", Flag34 (Id));
5960 W ("Suppress_Elaboration_Checks", Flag35 (Id));
5961 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
5962 W ("Suppress_Index_Checks", Flag36 (Id));
5963 W ("Suppress_Init_Proc", Flag105 (Id));
5964 W ("Suppress_Length_Checks", Flag37 (Id));
5965 W ("Suppress_Overflow_Checks", Flag38 (Id));
5966 W ("Suppress_Range_Checks", Flag39 (Id));
5967 W ("Suppress_Storage_Checks", Flag40 (Id));
5968 W ("Suppress_Style_Checks", Flag165 (Id));
5969 W ("Suppress_Tag_Checks", Flag41 (Id));
5970 W ("Uses_Sec_Stack", Flag95 (Id));
5971 W ("Vax_Float", Flag151 (Id));
5972 W ("Warnings_Off", Flag96 (Id));
5974 end Write_Entity_Flags;
5976 -----------------------
5977 -- Write_Entity_Info --
5978 -----------------------
5980 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
5982 procedure Write_Attribute (Which : String; Nam : E);
5983 -- Write attribute value with given string name
5985 procedure Write_Kind (Id : Entity_Id);
5986 -- Write Ekind field of entity
5988 procedure Write_Attribute (Which : String; Nam : E) is
5992 Write_Int (Int (Nam));
5994 Write_Name (Chars (Nam));
5996 end Write_Attribute;
5998 procedure Write_Kind (Id : Entity_Id) is
5999 K : constant String := Entity_Kind'Image (Ekind (Id));
6003 Write_Str (" Kind ");
6005 if Is_Type (Id) and then Is_Tagged_Type (Id) then
6006 Write_Str ("TAGGED ");
6009 Write_Str (K (3 .. K'Length));
6012 if Is_Type (Id) and then Depends_On_Private (Id) then
6013 Write_Str ("Depends_On_Private ");
6017 -- Start of processing for Write_Entity_Info
6021 Write_Attribute ("Name ", Id);
6022 Write_Int (Int (Id));
6026 Write_Attribute (" Type ", Etype (Id));
6028 Write_Attribute (" Scope ", Scope (Id));
6033 when Discrete_Kind =>
6034 Write_Str ("Bounds: Id = ");
6036 if Present (Scalar_Range (Id)) then
6037 Write_Int (Int (Type_Low_Bound (Id)));
6038 Write_Str (" .. Id = ");
6039 Write_Int (Int (Type_High_Bound (Id)));
6041 Write_Str ("Empty");
6051 Write_Attribute (" Component Type ",
6052 Component_Type (Id));
6055 Write_Str (" Indices ");
6057 Index := First_Index (Id);
6059 while Present (Index) loop
6060 Write_Attribute (" ", Etype (Index));
6061 Index := Next_Index (Index);
6069 (" Directly Designated Type ",
6070 Directly_Designated_Type (Id));
6073 when Overloadable_Kind =>
6074 if Present (Homonym (Id)) then
6075 Write_Str (" Homonym ");
6076 Write_Name (Chars (Homonym (Id)));
6078 Write_Int (Int (Homonym (Id)));
6085 if Ekind (Scope (Id)) in Record_Kind then
6087 " Original_Record_Component ",
6088 Original_Record_Component (Id));
6089 Write_Int (Int (Original_Record_Component (Id)));
6093 when others => null;
6095 end Write_Entity_Info;
6097 -----------------------
6098 -- Write_Field6_Name --
6099 -----------------------
6101 procedure Write_Field6_Name (Id : Entity_Id) is
6103 Write_Str ("First_Rep_Item");
6104 end Write_Field6_Name;
6106 -----------------------
6107 -- Write_Field7_Name --
6108 -----------------------
6110 procedure Write_Field7_Name (Id : Entity_Id) is
6112 Write_Str ("Freeze_Node");
6113 end Write_Field7_Name;
6115 -----------------------
6116 -- Write_Field8_Name --
6117 -----------------------
6119 procedure Write_Field8_Name (Id : Entity_Id) is
6124 Write_Str ("Normalized_First_Bit");
6128 Write_Str ("Mechanism");
6131 Write_Str ("Associated_Node_For_Itype");
6134 Write_Str ("Dependent_Instances");
6137 Write_Str ("Hiding_Loop_Variable");
6140 Write_Str ("Field8??");
6142 end Write_Field8_Name;
6144 -----------------------
6145 -- Write_Field9_Name --
6146 -----------------------
6148 procedure Write_Field9_Name (Id : Entity_Id) is
6152 Write_Str ("Class_Wide_Type");
6154 when E_Constant | E_Variable =>
6155 Write_Str ("Size_Check_Code");
6158 E_Generic_Function |
6160 E_Generic_Procedure |
6163 Write_Str ("Renaming_Map");
6167 Write_Str ("Normalized_Position");
6170 Write_Str ("Field9??");
6172 end Write_Field9_Name;
6174 ------------------------
6175 -- Write_Field10_Name --
6176 ------------------------
6178 procedure Write_Field10_Name (Id : Entity_Id) is
6182 Write_Str ("Referenced_Object");
6184 when E_In_Parameter |
6186 Write_Str ("Discriminal_Link");
6192 Write_Str ("Handler_Records");
6196 Write_Str ("Normalized_Position_Max");
6199 Write_Str ("Field10??");
6201 end Write_Field10_Name;
6203 ------------------------
6204 -- Write_Field11_Name --
6205 ------------------------
6207 procedure Write_Field11_Name (Id : Entity_Id) is
6211 Write_Str ("Entry_Component");
6215 Write_Str ("Component_Bit_Offset");
6218 Write_Str ("Full_View");
6220 when E_Enumeration_Literal =>
6221 Write_Str ("Enumeration_Pos");
6224 Write_Str ("Block_Node");
6230 Write_Str ("Protected_Body_Subprogram");
6233 Write_Str ("Full_View");
6236 Write_Str ("Field11??");
6238 end Write_Field11_Name;
6240 ------------------------
6241 -- Write_Field12_Name --
6242 ------------------------
6244 procedure Write_Field12_Name (Id : Entity_Id) is
6248 Write_Str ("Barrier_Function");
6250 when E_Enumeration_Literal =>
6251 Write_Str ("Enumeration_Rep");
6258 E_In_Out_Parameter |
6262 Write_Str ("Esize");
6266 Write_Str ("Next_Inlined_Subprogram");
6269 Write_Str ("Associated_Formal_Package");
6272 Write_Str ("Field12??");
6274 end Write_Field12_Name;
6276 ------------------------
6277 -- Write_Field13_Name --
6278 ------------------------
6280 procedure Write_Field13_Name (Id : Entity_Id) is
6284 Write_Str ("RM_Size");
6288 Write_Str ("Component_Clause");
6290 when E_Enumeration_Literal =>
6291 Write_Str ("Debug_Renaming_Link");
6294 if not Comes_From_Source (Id)
6296 Chars (Id) = Name_Op_Ne
6298 Write_Str ("Corresponding_Equality");
6300 elsif Comes_From_Source (Id) then
6301 Write_Str ("Elaboration_Entity");
6304 Write_Str ("Field13??");
6309 Write_Str ("Extra_Accessibility");
6313 Generic_Unit_Kind =>
6314 Write_Str ("Elaboration_Entity");
6317 Write_Str ("Field13??");
6319 end Write_Field13_Name;
6321 -----------------------
6322 -- Write_Field14_Name --
6323 -----------------------
6325 procedure Write_Field14_Name (Id : Entity_Id) is
6330 Write_Str ("Alignment");
6334 Write_Str ("First_Optional_Parameter");
6337 E_Generic_Package =>
6338 Write_Str ("Shadow_Entities");
6341 Write_Str ("Field14??");
6343 end Write_Field14_Name;
6345 ------------------------
6346 -- Write_Field15_Name --
6347 ------------------------
6349 procedure Write_Field15_Name (Id : Entity_Id) is
6354 Write_Str ("Storage_Size_Variable");
6356 when Class_Wide_Kind |
6360 Write_Str ("Primitive_Operations");
6363 Write_Str ("DT_Entry_Count");
6365 when Decimal_Fixed_Point_Kind =>
6366 Write_Str ("Scale_Value");
6368 when E_Discriminant =>
6369 Write_Str ("Discriminant_Number");
6372 Write_Str ("Extra_Formal");
6376 Write_Str ("DT_Position");
6379 Write_Str ("Entry_Parameters_Type");
6381 when Enumeration_Kind =>
6382 Write_Str ("Lit_Indexes");
6385 Write_Str ("Related_Instance");
6387 when E_Protected_Type =>
6388 Write_Str ("Entry_Bodies_Array");
6390 when E_String_Literal_Subtype =>
6391 Write_Str ("String_Literal_Low_Bound");
6394 Write_Str ("Shared_Var_Read_Proc");
6397 Write_Str ("Field15??");
6399 end Write_Field15_Name;
6401 ------------------------
6402 -- Write_Field16_Name --
6403 ------------------------
6405 procedure Write_Field16_Name (Id : Entity_Id) is
6409 Write_Str ("Entry_Formal");
6413 Write_Str ("DTC_Entity");
6418 Write_Str ("First_Private_Entity");
6420 when E_Record_Type |
6421 E_Record_Type_With_Private =>
6422 Write_Str ("Access_Disp_Table");
6424 when E_String_Literal_Subtype =>
6425 Write_Str ("String_Literal_Length");
6427 when Enumeration_Kind =>
6428 Write_Str ("Lit_Strings");
6432 Write_Str ("Unset_Reference");
6434 when E_Record_Subtype |
6435 E_Class_Wide_Subtype =>
6436 Write_Str ("Cloned_Subtype");
6439 Write_Str ("Field16??");
6441 end Write_Field16_Name;
6443 ------------------------
6444 -- Write_Field17_Name --
6445 ------------------------
6447 procedure Write_Field17_Name (Id : Entity_Id) is
6451 Write_Str ("Digits_Value");
6454 Write_Str ("Prival");
6456 when E_Discriminant =>
6457 Write_Str ("Discriminal");
6466 E_Generic_Function |
6468 E_Generic_Procedure |
6477 E_Subprogram_Type =>
6478 Write_Str ("First_Entity");
6481 Write_Str ("First_Index");
6483 when E_Protected_Body =>
6484 Write_Str ("Object_Ref");
6486 when Enumeration_Kind =>
6487 Write_Str ("First_Literal");
6490 Write_Str ("Master_Id");
6492 when Modular_Integer_Kind =>
6493 Write_Str ("Modulus");
6497 E_Generic_In_Out_Parameter |
6499 Write_Str ("Actual_Subtype");
6502 Write_Str ("Field17??");
6504 end Write_Field17_Name;
6506 -----------------------
6507 -- Write_Field18_Name --
6508 -----------------------
6510 procedure Write_Field18_Name (Id : Entity_Id) is
6513 when E_Enumeration_Literal |
6517 Write_Str ("Alias");
6519 when E_Record_Type =>
6520 Write_Str ("Corresponding_Concurrent_Type");
6522 when E_Entry_Index_Parameter =>
6523 Write_Str ("Entry_Index_Constant");
6525 when E_Class_Wide_Subtype |
6526 E_Access_Protected_Subprogram_Type |
6527 E_Access_Subprogram_Type |
6529 Write_Str ("Equivalent_Type");
6531 when Fixed_Point_Kind =>
6532 Write_Str ("Delta_Value");
6536 Write_Str ("Renamed_Object");
6540 E_Generic_Function |
6541 E_Generic_Procedure |
6542 E_Generic_Package =>
6543 Write_Str ("Renamed_Entity");
6545 when Incomplete_Or_Private_Kind =>
6546 Write_Str ("Private_Dependents");
6548 when Concurrent_Kind =>
6549 Write_Str ("Corresponding_Record_Type");
6554 Write_Str ("Enclosing_Scope");
6557 Write_Str ("Field18??");
6559 end Write_Field18_Name;
6561 -----------------------
6562 -- Write_Field19_Name --
6563 -----------------------
6565 procedure Write_Field19_Name (Id : Entity_Id) is
6570 Write_Str ("Related_Array_Object");
6577 Write_Str ("Finalization_Chain_Entity");
6579 when E_Discriminant =>
6580 Write_Str ("Corresponding_Discriminant");
6583 E_Generic_Package =>
6584 Write_Str ("Body_Entity");
6586 when E_Package_Body |
6588 Write_Str ("Spec_Entity");
6590 when Private_Kind =>
6591 Write_Str ("Underlying_Full_View");
6593 when E_Record_Type =>
6594 Write_Str ("Parent_Subtype");
6597 Write_Str ("Field19??");
6599 end Write_Field19_Name;
6601 -----------------------
6602 -- Write_Field20_Name --
6603 -----------------------
6605 procedure Write_Field20_Name (Id : Entity_Id) is
6609 Write_Str ("Component_Type");
6611 when E_In_Parameter |
6612 E_Generic_In_Parameter =>
6613 Write_Str ("Default_Value");
6616 Write_Str ("Directly_Designated_Type");
6619 Write_Str ("Discriminant_Checking_Func");
6621 when E_Discriminant =>
6622 Write_Str ("Discriminant_Default_Value");
6631 E_Generic_Function |
6633 E_Generic_Procedure |
6642 E_Subprogram_Type =>
6644 Write_Str ("Last_Entity");
6647 Write_Str ("Scalar_Range");
6650 Write_Str ("Register_Exception_Call");
6653 Write_Str ("Field20??");
6655 end Write_Field20_Name;
6657 -----------------------
6658 -- Write_Field21_Name --
6659 -----------------------
6661 procedure Write_Field21_Name (Id : Entity_Id) is
6667 E_Generic_Function |
6669 E_Generic_Procedure |
6671 Write_Str ("Interface_Name");
6673 when Concurrent_Kind |
6674 Incomplete_Or_Private_Kind |
6678 Write_Str ("Discriminant_Constraint");
6681 Write_Str ("Accept_Address");
6683 when Fixed_Point_Kind =>
6684 Write_Str ("Small_Value");
6686 when E_In_Parameter =>
6687 Write_Str ("Default_Expr_Function");
6690 Write_Str ("Field21??");
6692 end Write_Field21_Name;
6694 -----------------------
6695 -- Write_Field22_Name --
6696 -----------------------
6698 procedure Write_Field22_Name (Id : Entity_Id) is
6702 Write_Str ("Associated_Storage_Pool");
6705 Write_Str ("Component_Size");
6709 Write_Str ("Original_Record_Component");
6711 when E_Enumeration_Literal =>
6712 Write_Str ("Enumeration_Rep_Expr");
6715 Write_Str ("Exception_Code");
6718 Write_Str ("Protected_Formal");
6720 when E_Record_Type =>
6721 Write_Str ("Corresponding_Remote_Type");
6731 E_Generic_Function |
6732 E_Generic_Procedure |
6737 Write_Str ("Scope_Depth_Value");
6739 when E_Record_Type_With_Private |
6740 E_Record_Subtype_With_Private |
6743 E_Limited_Private_Type |
6744 E_Limited_Private_Subtype =>
6745 Write_Str ("Private_View");
6748 Write_Str ("Shared_Var_Assign_Proc");
6751 Write_Str ("Field22??");
6753 end Write_Field22_Name;
6755 ------------------------
6756 -- Write_Field23_Name --
6757 ------------------------
6759 procedure Write_Field23_Name (Id : Entity_Id) is
6763 Write_Str ("Associated_Final_Chain");
6766 Write_Str ("Packed_Array_Type");
6769 Write_Str ("Entry_Cancel_Parameter");
6772 Write_Str ("Protected_Operation");
6774 when E_Discriminant =>
6775 Write_Str ("CR_Discriminant");
6777 when E_Enumeration_Type =>
6778 Write_Str ("Enum_Pos_To_Rep");
6782 Write_Str ("Extra_Constrained");
6784 when E_Generic_Function |
6786 E_Generic_Procedure =>
6787 Write_Str ("Inner_Instances");
6789 when Concurrent_Kind |
6790 Incomplete_Or_Private_Kind |
6794 Write_Str ("Girder_Constraint");
6799 Write_Str ("Generic_Renamings");
6801 -- What about Privals_Chain for protected operations ???
6804 Write_Str ("Privals_Chain");
6807 Write_Str ("Field23??");
6809 end Write_Field23_Name;
6811 -------------------------
6812 -- Iterator Procedures --
6813 -------------------------
6815 procedure Proc_Next_Component (N : in out Node_Id) is
6817 N := Next_Component (N);
6818 end Proc_Next_Component;
6820 procedure Proc_Next_Discriminant (N : in out Node_Id) is
6822 N := Next_Discriminant (N);
6823 end Proc_Next_Discriminant;
6825 procedure Proc_Next_Formal (N : in out Node_Id) is
6827 N := Next_Formal (N);
6828 end Proc_Next_Formal;
6830 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
6832 N := Next_Formal_With_Extras (N);
6833 end Proc_Next_Formal_With_Extras;
6835 procedure Proc_Next_Girder_Discriminant (N : in out Node_Id) is
6837 N := Next_Girder_Discriminant (N);
6838 end Proc_Next_Girder_Discriminant;
6840 procedure Proc_Next_Index (N : in out Node_Id) is
6842 N := Next_Index (N);
6843 end Proc_Next_Index;
6845 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
6847 N := Next_Inlined_Subprogram (N);
6848 end Proc_Next_Inlined_Subprogram;
6850 procedure Proc_Next_Literal (N : in out Node_Id) is
6852 N := Next_Literal (N);
6853 end Proc_Next_Literal;