1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2010, Free Software Foundation, Inc. --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. --
18 -- As a special exception under Section 7 of GPL version 3, you are granted --
19 -- additional permissions described in the GCC Runtime Library Exception, --
20 -- version 3.1, as published by the Free Software Foundation. --
22 -- You should have received a copy of the GNU General Public License and --
23 -- a copy of the GCC Runtime Library Exception along with this program; --
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
25 -- <http://www.gnu.org/licenses/>. --
27 -- GNAT was originally developed by the GNAT team at New York University. --
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
30 ------------------------------------------------------------------------------
32 pragma Style_Checks (All_Checks);
33 -- Turn off subprogram ordering, not used for this unit
35 with Atree; use Atree;
36 with Nlists; use Nlists;
37 with Output; use Output;
38 with Sinfo; use Sinfo;
39 with Stand; use Stand;
43 use Atree.Unchecked_Access;
44 -- This is one of the packages that is allowed direct untyped access to
45 -- the fields in a node, since it provides the next level abstraction
46 -- which incorporates appropriate checks.
48 ----------------------------------------------
49 -- Usage of Fields in Defining Entity Nodes --
50 ----------------------------------------------
52 -- Four of these fields are defined in Sinfo, since they in are the base
53 -- part of the node. The access routines for these four fields and the
54 -- corresponding set procedures are defined in Sinfo. These fields are
55 -- present in all entities. Note that Homonym is also in the base part of
56 -- the node, but has access routines that are more properly part of Einfo,
57 -- which is why they are defined here.
64 -- Remaining fields are present only in extended nodes (i.e. entities)
66 -- The following fields are present in all entities
69 -- First_Rep_Item Node6
72 -- The usage of other fields (and the entity kinds to which it applies)
73 -- depends on the particular field (see Einfo spec for details).
75 -- Associated_Node_For_Itype Node8
76 -- Dependent_Instances Elist8
77 -- Hiding_Loop_Variable Node8
78 -- Mechanism Uint8 (but returns Mechanism_Type)
79 -- Normalized_First_Bit Uint8
80 -- Postcondition_Proc Node8
81 -- Return_Applies_To Node8
82 -- First_Exit_Statement Node8
84 -- Class_Wide_Type Node9
85 -- Current_Value Node9
88 -- Discriminal_Link Node10
89 -- Handler_Records List10
90 -- Normalized_Position_Max Uint10
91 -- Referenced_Object Node10
93 -- Component_Bit_Offset Uint11
95 -- Entry_Component Node11
96 -- Enumeration_Pos Uint11
97 -- Generic_Homonym Node11
98 -- Protected_Body_Subprogram Node11
101 -- Barrier_Function Node12
102 -- Enumeration_Rep Uint12
104 -- Next_Inlined_Subprogram Node12
106 -- Corresponding_Equality Node13
107 -- Component_Clause Node13
108 -- Elaboration_Entity Node13
109 -- Extra_Accessibility Node13
113 -- First_Optional_Parameter Node14
114 -- Normalized_Position Uint14
115 -- Shadow_Entities List14
117 -- Discriminant_Number Uint15
118 -- DT_Position Uint15
119 -- DT_Entry_Count Uint15
120 -- Entry_Bodies_Array Node15
121 -- Entry_Parameters_Type Node15
122 -- Extra_Formal Node15
123 -- Lit_Indexes Node15
124 -- Direct_Primitive_Operations Elist15
125 -- Related_Instance Node15
126 -- Scale_Value Uint15
127 -- Storage_Size_Variable Node15
128 -- String_Literal_Low_Bound Node15
130 -- Access_Disp_Table Elist16
131 -- Cloned_Subtype Node16
133 -- Entry_Formal Node16
134 -- First_Private_Entity Node16
135 -- Lit_Strings Node16
136 -- String_Literal_Length Uint16
137 -- Unset_Reference Node16
139 -- Actual_Subtype Node17
140 -- Digits_Value Uint17
141 -- Discriminal Node17
142 -- First_Entity Node17
143 -- First_Index Node17
144 -- First_Literal Node17
147 -- Non_Limited_View Node17
151 -- Corresponding_Concurrent_Type Node18
152 -- Corresponding_Protected_Entry Node18
153 -- Corresponding_Record_Type Node18
154 -- Delta_Value Ureal18
155 -- Enclosing_Scope Node18
156 -- Equivalent_Type Node18
157 -- Private_Dependents Elist18
158 -- Renamed_Entity Node18
159 -- Renamed_Object Node18
161 -- Body_Entity Node19
162 -- Corresponding_Discriminant Node19
163 -- Finalization_Chain_Entity Node19
164 -- Parent_Subtype Node19
165 -- Related_Array_Object Node19
166 -- Size_Check_Code Node19
167 -- Spec_Entity Node19
168 -- Underlying_Full_View Node19
170 -- Component_Type Node20
171 -- Default_Value Node20
172 -- Directly_Designated_Type Node20
173 -- Discriminant_Checking_Func Node20
174 -- Discriminant_Default_Value Node20
175 -- Last_Entity Node20
176 -- Prival_Link Node20
177 -- Register_Exception_Call Node20
178 -- Scalar_Range Node20
180 -- Accept_Address Elist21
181 -- Default_Expr_Function Node21
182 -- Discriminant_Constraint Elist21
183 -- Interface_Name Node21
184 -- Original_Array_Type Node21
185 -- Small_Value Ureal21
187 -- Associated_Storage_Pool Node22
188 -- Component_Size Uint22
189 -- Corresponding_Remote_Type Node22
190 -- Enumeration_Rep_Expr Node22
191 -- Exception_Code Uint22
192 -- Original_Record_Component Node22
193 -- Private_View Node22
194 -- Protected_Formal Node22
195 -- Scope_Depth_Value Uint22
196 -- Shared_Var_Procs_Instance Node22
198 -- Associated_Final_Chain Node23
199 -- CR_Discriminant Node23
200 -- Entry_Cancel_Parameter Node23
201 -- Enum_Pos_To_Rep Node23
202 -- Extra_Constrained Node23
203 -- Generic_Renamings Elist23
204 -- Inner_Instances Elist23
205 -- Limited_View Node23
206 -- Packed_Array_Type Node23
207 -- Protection_Object Node23
208 -- Stored_Constraint Elist23
210 -- Related_Expression Node24
211 -- Spec_PPC_List Node24
213 -- Interface_Alias Node25
214 -- Interfaces Elist25
215 -- Debug_Renaming_Link Node25
216 -- DT_Offset_To_Top_Func Node25
217 -- PPC_Wrapper Node25
218 -- Task_Body_Procedure Node25
220 -- Dispatch_Table_Wrappers Elist26
221 -- Last_Assignment Node26
222 -- Overridden_Operation Node26
223 -- Package_Instantiation Node26
224 -- Relative_Deadline_Variable Node26
225 -- Static_Initialization Node26
227 -- Current_Use_Clause Node27
228 -- Related_Type Node27
229 -- Wrapped_Entity Node27
231 -- Extra_Formals Node28
232 -- Underlying_Record_View Node28
236 ---------------------------------------------
237 -- Usage of Flags in Defining Entity Nodes --
238 ---------------------------------------------
240 -- All flags are unique, there is no overlaying, so each flag is physically
241 -- present in every entity. However, for many of the flags, it only makes
242 -- sense for them to be set true for certain subsets of entity kinds. See
243 -- the spec of Einfo for further details.
245 -- Note: Flag1-Flag2 are absent from this list, for historical reasons
248 -- Has_Discriminants Flag5
249 -- Is_Dispatching_Operation Flag6
250 -- Is_Immediately_Visible Flag7
252 -- Is_Potentially_Use_Visible Flag9
256 -- Is_Constrained Flag12
257 -- Is_Generic_Type Flag13
258 -- Depends_On_Private Flag14
260 -- Is_Volatile Flag16
261 -- Is_Internal Flag17
262 -- Has_Delayed_Freeze Flag18
263 -- Is_Abstract_Subprogram Flag19
264 -- Is_Concurrent_Record_Type Flag20
266 -- Has_Master_Entity Flag21
267 -- Needs_No_Actuals Flag22
268 -- Has_Storage_Size_Clause Flag23
269 -- Is_Imported Flag24
270 -- Is_Limited_Record Flag25
271 -- Has_Completion Flag26
272 -- Has_Pragma_Controlled Flag27
273 -- Is_Statically_Allocated Flag28
274 -- Has_Size_Clause Flag29
277 -- Checks_May_Be_Suppressed Flag31
278 -- Kill_Elaboration_Checks Flag32
279 -- Kill_Range_Checks Flag33
280 -- Kill_Tag_Checks Flag34
281 -- Is_Class_Wide_Equivalent_Type Flag35
282 -- Referenced_As_LHS Flag36
283 -- Is_Known_Non_Null Flag37
284 -- Can_Never_Be_Null Flag38
285 -- Is_Overriding_Operation Flag39
286 -- Body_Needed_For_SAL Flag40
288 -- Treat_As_Volatile Flag41
289 -- Is_Controlled Flag42
290 -- Has_Controlled_Component Flag43
292 -- In_Private_Part Flag45
293 -- Has_Alignment_Clause Flag46
295 -- In_Package_Body Flag48
297 -- Delay_Subprogram_Descriptors Flag50
300 -- Is_Entry_Formal Flag52
301 -- Is_Private_Descendant Flag53
302 -- Return_Present Flag54
303 -- Is_Tagged_Type Flag55
304 -- Has_Homonym Flag56
306 -- Non_Binary_Modulus Flag58
307 -- Is_Preelaborated Flag59
308 -- Is_Shared_Passive Flag60
310 -- Is_Remote_Types Flag61
311 -- Is_Remote_Call_Interface Flag62
312 -- Is_Character_Type Flag63
313 -- Is_Intrinsic_Subprogram Flag64
314 -- Has_Record_Rep_Clause Flag65
315 -- Has_Enumeration_Rep_Clause Flag66
316 -- Has_Small_Clause Flag67
317 -- Has_Component_Size_Clause Flag68
318 -- Is_Access_Constant Flag69
319 -- Is_First_Subtype Flag70
321 -- Has_Completion_In_Body Flag71
322 -- Has_Unknown_Discriminants Flag72
323 -- Is_Child_Unit Flag73
324 -- Is_CPP_Class Flag74
325 -- Has_Non_Standard_Rep Flag75
326 -- Is_Constructor Flag76
327 -- Static_Elaboration_Desired Flag77
329 -- Has_All_Calls_Remote Flag79
330 -- Is_Constr_Subt_For_U_Nominal Flag80
332 -- Is_Asynchronous Flag81
333 -- Has_Gigi_Rep_Item Flag82
334 -- Has_Machine_Radix_Clause Flag83
335 -- Machine_Radix_10 Flag84
337 -- Has_Atomic_Components Flag86
338 -- Has_Volatile_Components Flag87
339 -- Discard_Names Flag88
340 -- Is_Interrupt_Handler Flag89
341 -- Returns_By_Ref Flag90
344 -- Size_Known_At_Compile_Time Flag92
345 -- Has_Subprogram_Descriptor Flag93
346 -- Is_Generic_Actual_Type Flag94
347 -- Uses_Sec_Stack Flag95
348 -- Warnings_Off Flag96
349 -- Is_Controlling_Formal Flag97
350 -- Has_Controlling_Result Flag98
351 -- Is_Exported Flag99
352 -- Has_Specified_Layout Flag100
354 -- Has_Nested_Block_With_Handler Flag101
356 -- Is_Completely_Hidden Flag103
357 -- Address_Taken Flag104
358 -- Suppress_Init_Proc Flag105
359 -- Is_Limited_Composite Flag106
360 -- Is_Private_Composite Flag107
361 -- Default_Expressions_Processed Flag108
362 -- Is_Non_Static_Subtype Flag109
363 -- Has_External_Tag_Rep_Clause Flag110
365 -- Is_Formal_Subprogram Flag111
366 -- Is_Renaming_Of_Object Flag112
368 -- Delay_Cleanups Flag114
369 -- Never_Set_In_Source Flag115
370 -- Is_Visible_Child_Unit Flag116
371 -- Is_Unchecked_Union Flag117
372 -- Is_For_Access_Subtype Flag118
373 -- Has_Convention_Pragma Flag119
374 -- Has_Primitive_Operations Flag120
376 -- Has_Pragma_Pack Flag121
377 -- Is_Bit_Packed_Array Flag122
378 -- Has_Unchecked_Union Flag123
379 -- Is_Eliminated Flag124
380 -- C_Pass_By_Copy Flag125
381 -- Is_Instantiated Flag126
382 -- Is_Valued_Procedure Flag127
383 -- (used for Component_Alignment) Flag128
384 -- (used for Component_Alignment) Flag129
385 -- Is_Generic_Instance Flag130
387 -- No_Pool_Assigned Flag131
388 -- Is_AST_Entry Flag132
389 -- Is_VMS_Exception Flag133
390 -- Is_Optional_Parameter Flag134
391 -- Has_Aliased_Components Flag135
392 -- No_Strict_Aliasing Flag136
393 -- Is_Machine_Code_Subprogram Flag137
394 -- Is_Packed_Array_Type Flag138
395 -- Has_Biased_Representation Flag139
396 -- Has_Complex_Representation Flag140
398 -- Is_Constr_Subt_For_UN_Aliased Flag141
399 -- Has_Missing_Return Flag142
400 -- Has_Recursive_Call Flag143
401 -- Is_Unsigned_Type Flag144
402 -- Strict_Alignment Flag145
403 -- Is_Abstract_Type Flag146
404 -- Needs_Debug_Info Flag147
405 -- Suppress_Elaboration_Warnings Flag148
406 -- Is_Compilation_Unit Flag149
407 -- Has_Pragma_Elaborate_Body Flag150
410 -- Entry_Accepted Flag152
411 -- Is_Obsolescent Flag153
412 -- Has_Per_Object_Constraint Flag154
413 -- Has_Private_Declaration Flag155
414 -- Referenced Flag156
415 -- Has_Pragma_Inline Flag157
416 -- Finalize_Storage_Only Flag158
417 -- From_With_Type Flag159
418 -- Is_Package_Body_Entity Flag160
420 -- Has_Qualified_Name Flag161
421 -- Nonzero_Is_True Flag162
422 -- Is_True_Constant Flag163
423 -- Reverse_Bit_Order Flag164
424 -- Suppress_Style_Checks Flag165
425 -- Debug_Info_Off Flag166
426 -- Sec_Stack_Needed_For_Return Flag167
427 -- Materialize_Entity Flag168
428 -- Has_Pragma_Thread_Local_Storage Flag169
429 -- Is_Known_Valid Flag170
431 -- Is_Hidden_Open_Scope Flag171
432 -- Has_Object_Size_Clause Flag172
433 -- Has_Fully_Qualified_Name Flag173
434 -- Elaboration_Entity_Required Flag174
435 -- Has_Forward_Instantiation Flag175
436 -- Is_Discrim_SO_Function Flag176
437 -- Size_Depends_On_Discriminant Flag177
438 -- Is_Null_Init_Proc Flag178
439 -- Has_Pragma_Pure_Function Flag179
440 -- Has_Pragma_Unreferenced Flag180
442 -- Has_Contiguous_Rep Flag181
443 -- Has_Xref_Entry Flag182
444 -- Must_Be_On_Byte_Boundary Flag183
445 -- Has_Stream_Size_Clause Flag184
446 -- Is_Ada_2005_Only Flag185
447 -- Is_Interface Flag186
448 -- Has_Constrained_Partial_View Flag187
449 -- Has_Persistent_BSS Flag188
450 -- Is_Pure_Unit_Access_Type Flag189
451 -- Has_Specified_Stream_Input Flag190
453 -- Has_Specified_Stream_Output Flag191
454 -- Has_Specified_Stream_Read Flag192
455 -- Has_Specified_Stream_Write Flag193
456 -- Is_Local_Anonymous_Access Flag194
457 -- Is_Primitive_Wrapper Flag195
458 -- Was_Hidden Flag196
459 -- Is_Limited_Interface Flag197
460 -- Has_Pragma_Ordered Flag198
461 -- Is_Ada_2012_Only Flag199
463 -- Has_Delayed_Aspects Flag200
464 -- Has_Anon_Block_Suffix Flag201
465 -- Itype_Printed Flag202
466 -- Has_Pragma_Pure Flag203
467 -- Is_Known_Null Flag204
468 -- Low_Bound_Tested Flag205
469 -- Is_Visible_Formal Flag206
470 -- Known_To_Have_Preelab_Init Flag207
471 -- Must_Have_Preelab_Init Flag208
472 -- Is_Return_Object Flag209
473 -- Elaborate_Body_Desirable Flag210
475 -- Has_Static_Discriminants Flag211
476 -- Has_Pragma_Unreferenced_Objects Flag212
477 -- Requires_Overriding Flag213
479 -- Has_Up_Level_Access Flag215
480 -- Universal_Aliasing Flag216
481 -- Suppress_Value_Tracking_On_Call Flag217
482 -- Is_Primitive Flag218
483 -- Has_Initial_Value Flag219
484 -- Has_Dispatch_Table Flag220
486 -- Has_Pragma_Preelab_Init Flag221
487 -- Used_As_Generic_Actual Flag222
488 -- Is_Descendent_Of_Address Flag223
491 -- Is_Only_Out_Parameter Flag226
492 -- Referenced_As_Out_Parameter Flag227
493 -- Has_Thunks Flag228
494 -- Can_Use_Internal_Rep Flag229
495 -- Has_Pragma_Inline_Always Flag230
497 -- Renamed_In_Spec Flag231
498 -- Has_Pragma_Unmodified Flag233
499 -- Is_Dispatch_Table_Entity Flag234
500 -- Is_Trivial_Subprogram Flag235
501 -- Warnings_Off_Used Flag236
502 -- Warnings_Off_Used_Unmodified Flag237
503 -- Warnings_Off_Used_Unreferenced Flag238
504 -- OK_To_Reorder_Components Flag239
505 -- Has_Postconditions Flag240
507 -- Optimize_Alignment_Space Flag241
508 -- Optimize_Alignment_Time Flag242
509 -- Overlays_Constant Flag243
510 -- Is_RACW_Stub_Type Flag244
511 -- Is_Private_Primitive Flag245
512 -- Is_Underlying_Record_View Flag246
513 -- OK_To_Rename Flag247
524 -----------------------
525 -- Local subprograms --
526 -----------------------
528 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N;
529 -- Returns the attribute definition clause for Id whose name is Rep_Name.
530 -- Returns Empty if no matching attribute definition clause found for Id.
536 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N is
540 Ritem := First_Rep_Item (Id);
541 while Present (Ritem) loop
542 if Nkind (Ritem) = N_Attribute_Definition_Clause
543 and then Chars (Ritem) = Rep_Name
547 Ritem := Next_Rep_Item (Ritem);
554 --------------------------------
555 -- Attribute Access Functions --
556 --------------------------------
558 function Accept_Address (Id : E) return L is
563 function Access_Disp_Table (Id : E) return L is
565 pragma Assert (Is_Tagged_Type (Id));
566 return Elist16 (Implementation_Base_Type (Id));
567 end Access_Disp_Table;
569 function Actual_Subtype (Id : E) return E is
572 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
573 or else Is_Formal (Id));
577 function Address_Taken (Id : E) return B is
582 function Alias (Id : E) return E is
585 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
589 function Alignment (Id : E) return U is
591 pragma Assert (Is_Type (Id)
592 or else Is_Formal (Id)
593 or else Ekind_In (Id, E_Loop_Parameter,
600 function Associated_Final_Chain (Id : E) return E is
602 pragma Assert (Is_Access_Type (Id));
604 end Associated_Final_Chain;
606 function Associated_Formal_Package (Id : E) return E is
608 pragma Assert (Ekind (Id) = E_Package);
610 end Associated_Formal_Package;
612 function Associated_Node_For_Itype (Id : E) return N is
615 end Associated_Node_For_Itype;
617 function Associated_Storage_Pool (Id : E) return E is
619 pragma Assert (Is_Access_Type (Id));
620 return Node22 (Root_Type (Id));
621 end Associated_Storage_Pool;
623 function Barrier_Function (Id : E) return N is
625 pragma Assert (Is_Entry (Id));
627 end Barrier_Function;
629 function Block_Node (Id : E) return N is
631 pragma Assert (Ekind (Id) = E_Block);
635 function Body_Entity (Id : E) return E is
637 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
641 function Body_Needed_For_SAL (Id : E) return B is
644 (Ekind (Id) = E_Package
645 or else Is_Subprogram (Id)
646 or else Is_Generic_Unit (Id));
648 end Body_Needed_For_SAL;
650 function C_Pass_By_Copy (Id : E) return B is
652 pragma Assert (Is_Record_Type (Id));
653 return Flag125 (Implementation_Base_Type (Id));
656 function Can_Never_Be_Null (Id : E) return B is
659 end Can_Never_Be_Null;
661 function Checks_May_Be_Suppressed (Id : E) return B is
664 end Checks_May_Be_Suppressed;
666 function Class_Wide_Type (Id : E) return E is
668 pragma Assert (Is_Type (Id));
672 function Cloned_Subtype (Id : E) return E is
674 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
678 function Component_Bit_Offset (Id : E) return U is
680 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
682 end Component_Bit_Offset;
684 function Component_Clause (Id : E) return N is
686 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
688 end Component_Clause;
690 function Component_Size (Id : E) return U is
692 pragma Assert (Is_Array_Type (Id));
693 return Uint22 (Implementation_Base_Type (Id));
696 function Component_Type (Id : E) return E is
698 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
699 return Node20 (Implementation_Base_Type (Id));
702 function Corresponding_Concurrent_Type (Id : E) return E is
704 pragma Assert (Ekind (Id) = E_Record_Type);
706 end Corresponding_Concurrent_Type;
708 function Corresponding_Discriminant (Id : E) return E is
710 pragma Assert (Ekind (Id) = E_Discriminant);
712 end Corresponding_Discriminant;
714 function Corresponding_Equality (Id : E) return E is
717 (Ekind (Id) = E_Function
718 and then not Comes_From_Source (Id)
719 and then Chars (Id) = Name_Op_Ne);
721 end Corresponding_Equality;
723 function Corresponding_Protected_Entry (Id : E) return E is
725 pragma Assert (Ekind (Id) = E_Subprogram_Body);
727 end Corresponding_Protected_Entry;
729 function Corresponding_Record_Type (Id : E) return E is
731 pragma Assert (Is_Concurrent_Type (Id));
733 end Corresponding_Record_Type;
735 function Corresponding_Remote_Type (Id : E) return E is
738 end Corresponding_Remote_Type;
740 function Current_Use_Clause (Id : E) return E is
742 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
744 end Current_Use_Clause;
746 function Current_Value (Id : E) return N is
748 pragma Assert (Ekind (Id) in Object_Kind);
752 function CR_Discriminant (Id : E) return E is
757 function Debug_Info_Off (Id : E) return B is
762 function Debug_Renaming_Link (Id : E) return E is
765 end Debug_Renaming_Link;
767 function Default_Expr_Function (Id : E) return E is
769 pragma Assert (Is_Formal (Id));
771 end Default_Expr_Function;
773 function Default_Expressions_Processed (Id : E) return B is
776 end Default_Expressions_Processed;
778 function Default_Value (Id : E) return N is
780 pragma Assert (Is_Formal (Id));
784 function Delay_Cleanups (Id : E) return B is
789 function Delay_Subprogram_Descriptors (Id : E) return B is
792 end Delay_Subprogram_Descriptors;
794 function Delta_Value (Id : E) return R is
796 pragma Assert (Is_Fixed_Point_Type (Id));
800 function Dependent_Instances (Id : E) return L is
802 pragma Assert (Is_Generic_Instance (Id));
804 end Dependent_Instances;
806 function Depends_On_Private (Id : E) return B is
808 pragma Assert (Nkind (Id) in N_Entity);
810 end Depends_On_Private;
812 function Digits_Value (Id : E) return U is
815 (Is_Floating_Point_Type (Id)
816 or else Is_Decimal_Fixed_Point_Type (Id));
820 function Direct_Primitive_Operations (Id : E) return L is
822 pragma Assert (Is_Tagged_Type (Id)
823 and then not Is_Concurrent_Type (Id));
825 end Direct_Primitive_Operations;
827 function Directly_Designated_Type (Id : E) return E is
829 pragma Assert (Is_Access_Type (Id));
831 end Directly_Designated_Type;
833 function Discard_Names (Id : E) return B is
838 function Discriminal (Id : E) return E is
840 pragma Assert (Ekind (Id) = E_Discriminant);
844 function Discriminal_Link (Id : E) return N is
847 end Discriminal_Link;
849 function Discriminant_Checking_Func (Id : E) return E is
851 pragma Assert (Ekind (Id) = E_Component);
853 end Discriminant_Checking_Func;
855 function Discriminant_Constraint (Id : E) return L is
857 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
859 end Discriminant_Constraint;
861 function Discriminant_Default_Value (Id : E) return N is
863 pragma Assert (Ekind (Id) = E_Discriminant);
865 end Discriminant_Default_Value;
867 function Discriminant_Number (Id : E) return U is
869 pragma Assert (Ekind (Id) = E_Discriminant);
871 end Discriminant_Number;
873 function Dispatch_Table_Wrappers (Id : E) return L is
875 pragma Assert (Is_Tagged_Type (Id));
876 return Elist26 (Implementation_Base_Type (Id));
877 end Dispatch_Table_Wrappers;
879 function DT_Entry_Count (Id : E) return U is
881 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
885 function DT_Offset_To_Top_Func (Id : E) return E is
887 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
889 end DT_Offset_To_Top_Func;
891 function DT_Position (Id : E) return U is
893 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
894 and then Present (DTC_Entity (Id)));
898 function DTC_Entity (Id : E) return E is
900 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
904 function Elaborate_Body_Desirable (Id : E) return B is
906 pragma Assert (Ekind (Id) = E_Package);
908 end Elaborate_Body_Desirable;
910 function Elaboration_Entity (Id : E) return E is
915 Ekind (Id) = E_Package
917 Is_Generic_Unit (Id));
919 end Elaboration_Entity;
921 function Elaboration_Entity_Required (Id : E) return B is
926 Ekind (Id) = E_Package
928 Is_Generic_Unit (Id));
930 end Elaboration_Entity_Required;
932 function Enclosing_Scope (Id : E) return E is
937 function Entry_Accepted (Id : E) return B is
939 pragma Assert (Is_Entry (Id));
943 function Entry_Bodies_Array (Id : E) return E is
946 end Entry_Bodies_Array;
948 function Entry_Cancel_Parameter (Id : E) return E is
951 end Entry_Cancel_Parameter;
953 function Entry_Component (Id : E) return E is
958 function Entry_Formal (Id : E) return E is
963 function Entry_Index_Constant (Id : E) return N is
965 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
967 end Entry_Index_Constant;
969 function Entry_Parameters_Type (Id : E) return E is
972 end Entry_Parameters_Type;
974 function Enum_Pos_To_Rep (Id : E) return E is
976 pragma Assert (Ekind (Id) = E_Enumeration_Type);
980 function Enumeration_Pos (Id : E) return Uint is
982 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
986 function Enumeration_Rep (Id : E) return U is
988 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
992 function Enumeration_Rep_Expr (Id : E) return N is
994 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
996 end Enumeration_Rep_Expr;
998 function Equivalent_Type (Id : E) return E is
1001 (Ekind_In (Id, E_Class_Wide_Type,
1002 E_Class_Wide_Subtype,
1003 E_Access_Protected_Subprogram_Type,
1004 E_Anonymous_Access_Protected_Subprogram_Type,
1005 E_Access_Subprogram_Type,
1008 end Equivalent_Type;
1010 function Esize (Id : E) return Uint is
1015 function Exception_Code (Id : E) return Uint is
1017 pragma Assert (Ekind (Id) = E_Exception);
1021 function Extra_Accessibility (Id : E) return E is
1023 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1025 end Extra_Accessibility;
1027 function Extra_Constrained (Id : E) return E is
1029 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1031 end Extra_Constrained;
1033 function Extra_Formal (Id : E) return E is
1038 function Extra_Formals (Id : E) return E is
1041 (Is_Overloadable (Id)
1042 or else Ekind_In (Id, E_Entry_Family,
1044 E_Subprogram_Type));
1048 function Can_Use_Internal_Rep (Id : E) return B is
1050 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1051 return Flag229 (Base_Type (Id));
1052 end Can_Use_Internal_Rep;
1054 function Finalization_Chain_Entity (Id : E) return E is
1057 end Finalization_Chain_Entity;
1059 function Finalize_Storage_Only (Id : E) return B is
1061 pragma Assert (Is_Type (Id));
1062 return Flag158 (Base_Type (Id));
1063 end Finalize_Storage_Only;
1065 function First_Entity (Id : E) return E is
1070 function First_Exit_Statement (Id : E) return N is
1072 pragma Assert (Ekind (Id) = E_Loop);
1074 end First_Exit_Statement;
1076 function First_Index (Id : E) return N is
1078 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1082 function First_Literal (Id : E) return E is
1084 pragma Assert (Is_Enumeration_Type (Id));
1088 function First_Optional_Parameter (Id : E) return E is
1090 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1092 end First_Optional_Parameter;
1094 function First_Private_Entity (Id : E) return E is
1096 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1097 or else Ekind (Id) in Concurrent_Kind);
1099 end First_Private_Entity;
1101 function First_Rep_Item (Id : E) return E is
1106 function Freeze_Node (Id : E) return N is
1111 function From_With_Type (Id : E) return B is
1113 return Flag159 (Id);
1116 function Full_View (Id : E) return E is
1118 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1122 function Generic_Homonym (Id : E) return E is
1124 pragma Assert (Ekind (Id) = E_Generic_Package);
1126 end Generic_Homonym;
1128 function Generic_Renamings (Id : E) return L is
1130 return Elist23 (Id);
1131 end Generic_Renamings;
1133 function Handler_Records (Id : E) return S is
1136 end Handler_Records;
1138 function Has_Aliased_Components (Id : E) return B is
1140 return Flag135 (Implementation_Base_Type (Id));
1141 end Has_Aliased_Components;
1143 function Has_Alignment_Clause (Id : E) return B is
1146 end Has_Alignment_Clause;
1148 function Has_All_Calls_Remote (Id : E) return B is
1151 end Has_All_Calls_Remote;
1153 function Has_Anon_Block_Suffix (Id : E) return B is
1155 return Flag201 (Id);
1156 end Has_Anon_Block_Suffix;
1158 function Has_Atomic_Components (Id : E) return B is
1160 return Flag86 (Implementation_Base_Type (Id));
1161 end Has_Atomic_Components;
1163 function Has_Biased_Representation (Id : E) return B is
1165 return Flag139 (Id);
1166 end Has_Biased_Representation;
1168 function Has_Completion (Id : E) return B is
1173 function Has_Completion_In_Body (Id : E) return B is
1175 pragma Assert (Is_Type (Id));
1177 end Has_Completion_In_Body;
1179 function Has_Complex_Representation (Id : E) return B is
1181 pragma Assert (Is_Type (Id));
1182 return Flag140 (Implementation_Base_Type (Id));
1183 end Has_Complex_Representation;
1185 function Has_Component_Size_Clause (Id : E) return B is
1187 pragma Assert (Is_Array_Type (Id));
1188 return Flag68 (Implementation_Base_Type (Id));
1189 end Has_Component_Size_Clause;
1191 function Has_Constrained_Partial_View (Id : E) return B is
1193 pragma Assert (Is_Type (Id));
1194 return Flag187 (Id);
1195 end Has_Constrained_Partial_View;
1197 function Has_Controlled_Component (Id : E) return B is
1199 return Flag43 (Base_Type (Id));
1200 end Has_Controlled_Component;
1202 function Has_Contiguous_Rep (Id : E) return B is
1204 return Flag181 (Id);
1205 end Has_Contiguous_Rep;
1207 function Has_Controlling_Result (Id : E) return B is
1210 end Has_Controlling_Result;
1212 function Has_Convention_Pragma (Id : E) return B is
1214 return Flag119 (Id);
1215 end Has_Convention_Pragma;
1217 function Has_Delayed_Aspects (Id : E) return B is
1219 pragma Assert (Nkind (Id) in N_Entity);
1220 return Flag200 (Id);
1221 end Has_Delayed_Aspects;
1223 function Has_Delayed_Freeze (Id : E) return B is
1225 pragma Assert (Nkind (Id) in N_Entity);
1227 end Has_Delayed_Freeze;
1229 function Has_Discriminants (Id : E) return B is
1231 pragma Assert (Nkind (Id) in N_Entity);
1233 end Has_Discriminants;
1235 function Has_Dispatch_Table (Id : E) return B is
1237 pragma Assert (Is_Tagged_Type (Id));
1238 return Flag220 (Id);
1239 end Has_Dispatch_Table;
1241 function Has_Enumeration_Rep_Clause (Id : E) return B is
1243 pragma Assert (Is_Enumeration_Type (Id));
1245 end Has_Enumeration_Rep_Clause;
1247 function Has_Exit (Id : E) return B is
1252 function Has_External_Tag_Rep_Clause (Id : E) return B is
1254 pragma Assert (Is_Tagged_Type (Id));
1255 return Flag110 (Id);
1256 end Has_External_Tag_Rep_Clause;
1258 function Has_Forward_Instantiation (Id : E) return B is
1260 return Flag175 (Id);
1261 end Has_Forward_Instantiation;
1263 function Has_Fully_Qualified_Name (Id : E) return B is
1265 return Flag173 (Id);
1266 end Has_Fully_Qualified_Name;
1268 function Has_Gigi_Rep_Item (Id : E) return B is
1271 end Has_Gigi_Rep_Item;
1273 function Has_Homonym (Id : E) return B is
1278 function Has_Initial_Value (Id : E) return B is
1281 (Ekind (Id) = E_Variable or else Is_Formal (Id));
1282 return Flag219 (Id);
1283 end Has_Initial_Value;
1285 function Has_Machine_Radix_Clause (Id : E) return B is
1287 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1289 end Has_Machine_Radix_Clause;
1291 function Has_Master_Entity (Id : E) return B is
1294 end Has_Master_Entity;
1296 function Has_Missing_Return (Id : E) return B is
1298 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1299 return Flag142 (Id);
1300 end Has_Missing_Return;
1302 function Has_Nested_Block_With_Handler (Id : E) return B is
1304 return Flag101 (Id);
1305 end Has_Nested_Block_With_Handler;
1307 function Has_Non_Standard_Rep (Id : E) return B is
1309 return Flag75 (Implementation_Base_Type (Id));
1310 end Has_Non_Standard_Rep;
1312 function Has_Object_Size_Clause (Id : E) return B is
1314 pragma Assert (Is_Type (Id));
1315 return Flag172 (Id);
1316 end Has_Object_Size_Clause;
1318 function Has_Per_Object_Constraint (Id : E) return B is
1320 return Flag154 (Id);
1321 end Has_Per_Object_Constraint;
1323 function Has_Persistent_BSS (Id : E) return B is
1325 return Flag188 (Id);
1326 end Has_Persistent_BSS;
1328 function Has_Postconditions (Id : E) return B is
1330 pragma Assert (Is_Subprogram (Id));
1331 return Flag240 (Id);
1332 end Has_Postconditions;
1334 function Has_Pragma_Controlled (Id : E) return B is
1336 pragma Assert (Is_Access_Type (Id));
1337 return Flag27 (Implementation_Base_Type (Id));
1338 end Has_Pragma_Controlled;
1340 function Has_Pragma_Elaborate_Body (Id : E) return B is
1342 return Flag150 (Id);
1343 end Has_Pragma_Elaborate_Body;
1345 function Has_Pragma_Inline (Id : E) return B is
1347 return Flag157 (Id);
1348 end Has_Pragma_Inline;
1350 function Has_Pragma_Inline_Always (Id : E) return B is
1352 return Flag230 (Id);
1353 end Has_Pragma_Inline_Always;
1355 function Has_Pragma_Ordered (Id : E) return B is
1357 pragma Assert (Is_Enumeration_Type (Id));
1358 return Flag198 (Implementation_Base_Type (Id));
1359 end Has_Pragma_Ordered;
1361 function Has_Pragma_Pack (Id : E) return B is
1363 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1364 return Flag121 (Implementation_Base_Type (Id));
1365 end Has_Pragma_Pack;
1367 function Has_Pragma_Preelab_Init (Id : E) return B is
1369 return Flag221 (Id);
1370 end Has_Pragma_Preelab_Init;
1372 function Has_Pragma_Pure (Id : E) return B is
1374 return Flag203 (Id);
1375 end Has_Pragma_Pure;
1377 function Has_Pragma_Pure_Function (Id : E) return B is
1379 return Flag179 (Id);
1380 end Has_Pragma_Pure_Function;
1382 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1384 return Flag169 (Id);
1385 end Has_Pragma_Thread_Local_Storage;
1387 function Has_Pragma_Unmodified (Id : E) return B is
1389 return Flag233 (Id);
1390 end Has_Pragma_Unmodified;
1392 function Has_Pragma_Unreferenced (Id : E) return B is
1394 return Flag180 (Id);
1395 end Has_Pragma_Unreferenced;
1397 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1399 pragma Assert (Is_Type (Id));
1400 return Flag212 (Id);
1401 end Has_Pragma_Unreferenced_Objects;
1403 function Has_Primitive_Operations (Id : E) return B is
1405 pragma Assert (Is_Type (Id));
1406 return Flag120 (Base_Type (Id));
1407 end Has_Primitive_Operations;
1409 function Has_Private_Declaration (Id : E) return B is
1411 return Flag155 (Id);
1412 end Has_Private_Declaration;
1414 function Has_Qualified_Name (Id : E) return B is
1416 return Flag161 (Id);
1417 end Has_Qualified_Name;
1419 function Has_RACW (Id : E) return B is
1421 pragma Assert (Ekind (Id) = E_Package);
1422 return Flag214 (Id);
1425 function Has_Record_Rep_Clause (Id : E) return B is
1427 pragma Assert (Is_Record_Type (Id));
1428 return Flag65 (Implementation_Base_Type (Id));
1429 end Has_Record_Rep_Clause;
1431 function Has_Recursive_Call (Id : E) return B is
1433 pragma Assert (Is_Subprogram (Id));
1434 return Flag143 (Id);
1435 end Has_Recursive_Call;
1437 function Has_Size_Clause (Id : E) return B is
1440 end Has_Size_Clause;
1442 function Has_Small_Clause (Id : E) return B is
1445 end Has_Small_Clause;
1447 function Has_Specified_Layout (Id : E) return B is
1449 pragma Assert (Is_Type (Id));
1450 return Flag100 (Implementation_Base_Type (Id));
1451 end Has_Specified_Layout;
1453 function Has_Specified_Stream_Input (Id : E) return B is
1455 pragma Assert (Is_Type (Id));
1456 return Flag190 (Id);
1457 end Has_Specified_Stream_Input;
1459 function Has_Specified_Stream_Output (Id : E) return B is
1461 pragma Assert (Is_Type (Id));
1462 return Flag191 (Id);
1463 end Has_Specified_Stream_Output;
1465 function Has_Specified_Stream_Read (Id : E) return B is
1467 pragma Assert (Is_Type (Id));
1468 return Flag192 (Id);
1469 end Has_Specified_Stream_Read;
1471 function Has_Specified_Stream_Write (Id : E) return B is
1473 pragma Assert (Is_Type (Id));
1474 return Flag193 (Id);
1475 end Has_Specified_Stream_Write;
1477 function Has_Static_Discriminants (Id : E) return B is
1479 pragma Assert (Is_Type (Id));
1480 return Flag211 (Id);
1481 end Has_Static_Discriminants;
1483 function Has_Storage_Size_Clause (Id : E) return B is
1485 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1486 return Flag23 (Implementation_Base_Type (Id));
1487 end Has_Storage_Size_Clause;
1489 function Has_Stream_Size_Clause (Id : E) return B is
1491 return Flag184 (Id);
1492 end Has_Stream_Size_Clause;
1494 function Has_Subprogram_Descriptor (Id : E) return B is
1497 end Has_Subprogram_Descriptor;
1499 function Has_Task (Id : E) return B is
1501 return Flag30 (Base_Type (Id));
1504 function Has_Thunks (Id : E) return B is
1506 return Flag228 (Id);
1509 function Has_Unchecked_Union (Id : E) return B is
1511 return Flag123 (Base_Type (Id));
1512 end Has_Unchecked_Union;
1514 function Has_Unknown_Discriminants (Id : E) return B is
1516 pragma Assert (Is_Type (Id));
1518 end Has_Unknown_Discriminants;
1520 function Has_Up_Level_Access (Id : E) return B is
1523 (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
1524 return Flag215 (Id);
1525 end Has_Up_Level_Access;
1527 function Has_Volatile_Components (Id : E) return B is
1529 return Flag87 (Implementation_Base_Type (Id));
1530 end Has_Volatile_Components;
1532 function Has_Xref_Entry (Id : E) return B is
1534 return Flag182 (Implementation_Base_Type (Id));
1537 function Hiding_Loop_Variable (Id : E) return E is
1539 pragma Assert (Ekind (Id) = E_Variable);
1541 end Hiding_Loop_Variable;
1543 function Homonym (Id : E) return E is
1548 function Interface_Alias (Id : E) return E is
1550 pragma Assert (Is_Subprogram (Id));
1552 end Interface_Alias;
1554 function Interfaces (Id : E) return L is
1556 pragma Assert (Is_Record_Type (Id));
1557 return Elist25 (Id);
1560 function In_Package_Body (Id : E) return B is
1563 end In_Package_Body;
1565 function In_Private_Part (Id : E) return B is
1568 end In_Private_Part;
1570 function In_Use (Id : E) return B is
1572 pragma Assert (Nkind (Id) in N_Entity);
1576 function Inner_Instances (Id : E) return L is
1578 return Elist23 (Id);
1579 end Inner_Instances;
1581 function Interface_Name (Id : E) return N is
1586 function Is_Abstract_Subprogram (Id : E) return B is
1588 pragma Assert (Is_Overloadable (Id));
1590 end Is_Abstract_Subprogram;
1592 function Is_Abstract_Type (Id : E) return B is
1594 pragma Assert (Is_Type (Id));
1595 return Flag146 (Id);
1596 end Is_Abstract_Type;
1598 function Is_Local_Anonymous_Access (Id : E) return B is
1600 pragma Assert (Is_Access_Type (Id));
1601 return Flag194 (Id);
1602 end Is_Local_Anonymous_Access;
1604 function Is_Access_Constant (Id : E) return B is
1606 pragma Assert (Is_Access_Type (Id));
1608 end Is_Access_Constant;
1610 function Is_Ada_2005_Only (Id : E) return B is
1612 return Flag185 (Id);
1613 end Is_Ada_2005_Only;
1615 function Is_Ada_2012_Only (Id : E) return B is
1617 return Flag199 (Id);
1618 end Is_Ada_2012_Only;
1620 function Is_Aliased (Id : E) return B is
1622 pragma Assert (Nkind (Id) in N_Entity);
1626 function Is_AST_Entry (Id : E) return B is
1628 pragma Assert (Is_Entry (Id));
1629 return Flag132 (Id);
1632 function Is_Asynchronous (Id : E) return B is
1634 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1636 end Is_Asynchronous;
1638 function Is_Atomic (Id : E) return B is
1643 function Is_Bit_Packed_Array (Id : E) return B is
1645 return Flag122 (Implementation_Base_Type (Id));
1646 end Is_Bit_Packed_Array;
1648 function Is_Called (Id : E) return B is
1650 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1651 return Flag102 (Id);
1654 function Is_Character_Type (Id : E) return B is
1657 end Is_Character_Type;
1659 function Is_Child_Unit (Id : E) return B is
1664 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1667 end Is_Class_Wide_Equivalent_Type;
1669 function Is_Compilation_Unit (Id : E) return B is
1671 return Flag149 (Id);
1672 end Is_Compilation_Unit;
1674 function Is_Completely_Hidden (Id : E) return B is
1676 pragma Assert (Ekind (Id) = E_Discriminant);
1677 return Flag103 (Id);
1678 end Is_Completely_Hidden;
1680 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1683 end Is_Constr_Subt_For_U_Nominal;
1685 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1687 return Flag141 (Id);
1688 end Is_Constr_Subt_For_UN_Aliased;
1690 function Is_Constrained (Id : E) return B is
1692 pragma Assert (Nkind (Id) in N_Entity);
1696 function Is_Constructor (Id : E) return B is
1701 function Is_Controlled (Id : E) return B is
1703 return Flag42 (Base_Type (Id));
1706 function Is_Controlling_Formal (Id : E) return B is
1708 pragma Assert (Is_Formal (Id));
1710 end Is_Controlling_Formal;
1712 function Is_CPP_Class (Id : E) return B is
1717 function Is_Descendent_Of_Address (Id : E) return B is
1719 pragma Assert (Is_Type (Id));
1720 return Flag223 (Id);
1721 end Is_Descendent_Of_Address;
1723 function Is_Discrim_SO_Function (Id : E) return B is
1725 return Flag176 (Id);
1726 end Is_Discrim_SO_Function;
1728 function Is_Dispatch_Table_Entity (Id : E) return B is
1730 return Flag234 (Id);
1731 end Is_Dispatch_Table_Entity;
1733 function Is_Dispatching_Operation (Id : E) return B is
1735 pragma Assert (Nkind (Id) in N_Entity);
1737 end Is_Dispatching_Operation;
1739 function Is_Eliminated (Id : E) return B is
1741 return Flag124 (Id);
1744 function Is_Entry_Formal (Id : E) return B is
1747 end Is_Entry_Formal;
1749 function Is_Exported (Id : E) return B is
1754 function Is_First_Subtype (Id : E) return B is
1757 end Is_First_Subtype;
1759 function Is_For_Access_Subtype (Id : E) return B is
1761 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
1762 return Flag118 (Id);
1763 end Is_For_Access_Subtype;
1765 function Is_Formal_Subprogram (Id : E) return B is
1767 return Flag111 (Id);
1768 end Is_Formal_Subprogram;
1770 function Is_Frozen (Id : E) return B is
1775 function Is_Generic_Actual_Type (Id : E) return B is
1777 pragma Assert (Is_Type (Id));
1779 end Is_Generic_Actual_Type;
1781 function Is_Generic_Instance (Id : E) return B is
1783 return Flag130 (Id);
1784 end Is_Generic_Instance;
1786 function Is_Generic_Type (Id : E) return B is
1788 pragma Assert (Nkind (Id) in N_Entity);
1790 end Is_Generic_Type;
1792 function Is_Hidden (Id : E) return B is
1797 function Is_Hidden_Open_Scope (Id : E) return B is
1799 return Flag171 (Id);
1800 end Is_Hidden_Open_Scope;
1802 function Is_Immediately_Visible (Id : E) return B is
1804 pragma Assert (Nkind (Id) in N_Entity);
1806 end Is_Immediately_Visible;
1808 function Is_Imported (Id : E) return B is
1813 function Is_Inlined (Id : E) return B is
1818 function Is_Interface (Id : E) return B is
1820 return Flag186 (Id);
1823 function Is_Instantiated (Id : E) return B is
1825 return Flag126 (Id);
1826 end Is_Instantiated;
1828 function Is_Internal (Id : E) return B is
1830 pragma Assert (Nkind (Id) in N_Entity);
1834 function Is_Interrupt_Handler (Id : E) return B is
1836 pragma Assert (Nkind (Id) in N_Entity);
1838 end Is_Interrupt_Handler;
1840 function Is_Intrinsic_Subprogram (Id : E) return B is
1843 end Is_Intrinsic_Subprogram;
1845 function Is_Itype (Id : E) return B is
1850 function Is_Known_Non_Null (Id : E) return B is
1853 end Is_Known_Non_Null;
1855 function Is_Known_Null (Id : E) return B is
1857 return Flag204 (Id);
1860 function Is_Known_Valid (Id : E) return B is
1862 return Flag170 (Id);
1865 function Is_Limited_Composite (Id : E) return B is
1867 return Flag106 (Id);
1868 end Is_Limited_Composite;
1870 function Is_Limited_Interface (Id : E) return B is
1872 return Flag197 (Id);
1873 end Is_Limited_Interface;
1875 function Is_Limited_Record (Id : E) return B is
1878 end Is_Limited_Record;
1880 function Is_Machine_Code_Subprogram (Id : E) return B is
1882 pragma Assert (Is_Subprogram (Id));
1883 return Flag137 (Id);
1884 end Is_Machine_Code_Subprogram;
1886 function Is_Non_Static_Subtype (Id : E) return B is
1888 pragma Assert (Is_Type (Id));
1889 return Flag109 (Id);
1890 end Is_Non_Static_Subtype;
1892 function Is_Null_Init_Proc (Id : E) return B is
1894 pragma Assert (Ekind (Id) = E_Procedure);
1895 return Flag178 (Id);
1896 end Is_Null_Init_Proc;
1898 function Is_Obsolescent (Id : E) return B is
1900 return Flag153 (Id);
1903 function Is_Only_Out_Parameter (Id : E) return B is
1905 pragma Assert (Is_Formal (Id));
1906 return Flag226 (Id);
1907 end Is_Only_Out_Parameter;
1909 function Is_Optional_Parameter (Id : E) return B is
1911 pragma Assert (Is_Formal (Id));
1912 return Flag134 (Id);
1913 end Is_Optional_Parameter;
1915 function Is_Overriding_Operation (Id : E) return B is
1917 pragma Assert (Is_Subprogram (Id));
1919 end Is_Overriding_Operation;
1921 function Is_Package_Body_Entity (Id : E) return B is
1923 return Flag160 (Id);
1924 end Is_Package_Body_Entity;
1926 function Is_Packed (Id : E) return B is
1928 return Flag51 (Implementation_Base_Type (Id));
1931 function Is_Packed_Array_Type (Id : E) return B is
1933 return Flag138 (Id);
1934 end Is_Packed_Array_Type;
1936 function Is_Potentially_Use_Visible (Id : E) return B is
1938 pragma Assert (Nkind (Id) in N_Entity);
1940 end Is_Potentially_Use_Visible;
1942 function Is_Preelaborated (Id : E) return B is
1945 end Is_Preelaborated;
1947 function Is_Primitive (Id : E) return B is
1950 (Is_Overloadable (Id)
1951 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
1952 return Flag218 (Id);
1955 function Is_Primitive_Wrapper (Id : E) return B is
1957 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1958 return Flag195 (Id);
1959 end Is_Primitive_Wrapper;
1961 function Is_Private_Composite (Id : E) return B is
1963 pragma Assert (Is_Type (Id));
1964 return Flag107 (Id);
1965 end Is_Private_Composite;
1967 function Is_Private_Descendant (Id : E) return B is
1970 end Is_Private_Descendant;
1972 function Is_Private_Primitive (Id : E) return B is
1974 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1975 return Flag245 (Id);
1976 end Is_Private_Primitive;
1978 function Is_Public (Id : E) return B is
1980 pragma Assert (Nkind (Id) in N_Entity);
1984 function Is_Pure (Id : E) return B is
1989 function Is_Pure_Unit_Access_Type (Id : E) return B is
1991 pragma Assert (Is_Access_Type (Id));
1992 return Flag189 (Id);
1993 end Is_Pure_Unit_Access_Type;
1995 function Is_RACW_Stub_Type (Id : E) return B is
1997 pragma Assert (Is_Type (Id));
1998 return Flag244 (Id);
1999 end Is_RACW_Stub_Type;
2001 function Is_Raised (Id : E) return B is
2003 pragma Assert (Ekind (Id) = E_Exception);
2004 return Flag224 (Id);
2007 function Is_Remote_Call_Interface (Id : E) return B is
2010 end Is_Remote_Call_Interface;
2012 function Is_Remote_Types (Id : E) return B is
2015 end Is_Remote_Types;
2017 function Is_Renaming_Of_Object (Id : E) return B is
2019 return Flag112 (Id);
2020 end Is_Renaming_Of_Object;
2022 function Is_Return_Object (Id : E) return B is
2024 return Flag209 (Id);
2025 end Is_Return_Object;
2027 function Is_Shared_Passive (Id : E) return B is
2030 end Is_Shared_Passive;
2032 function Is_Statically_Allocated (Id : E) return B is
2035 end Is_Statically_Allocated;
2037 function Is_Tag (Id : E) return B is
2039 pragma Assert (Nkind (Id) in N_Entity);
2043 function Is_Tagged_Type (Id : E) return B is
2048 function Is_Thunk (Id : E) return B is
2050 pragma Assert (Is_Subprogram (Id));
2051 return Flag225 (Id);
2054 function Is_Trivial_Subprogram (Id : E) return B is
2056 return Flag235 (Id);
2057 end Is_Trivial_Subprogram;
2059 function Is_True_Constant (Id : E) return B is
2061 return Flag163 (Id);
2062 end Is_True_Constant;
2064 function Is_Unchecked_Union (Id : E) return B is
2066 return Flag117 (Implementation_Base_Type (Id));
2067 end Is_Unchecked_Union;
2069 function Is_Underlying_Record_View (Id : E) return B is
2071 return Flag246 (Id);
2072 end Is_Underlying_Record_View;
2074 function Is_Unsigned_Type (Id : E) return B is
2076 pragma Assert (Is_Type (Id));
2077 return Flag144 (Id);
2078 end Is_Unsigned_Type;
2080 function Is_Valued_Procedure (Id : E) return B is
2082 pragma Assert (Ekind (Id) = E_Procedure);
2083 return Flag127 (Id);
2084 end Is_Valued_Procedure;
2086 function Is_Visible_Child_Unit (Id : E) return B is
2088 pragma Assert (Is_Child_Unit (Id));
2089 return Flag116 (Id);
2090 end Is_Visible_Child_Unit;
2092 function Is_Visible_Formal (Id : E) return B is
2094 return Flag206 (Id);
2095 end Is_Visible_Formal;
2097 function Is_VMS_Exception (Id : E) return B is
2099 return Flag133 (Id);
2100 end Is_VMS_Exception;
2102 function Is_Volatile (Id : E) return B is
2104 pragma Assert (Nkind (Id) in N_Entity);
2106 if Is_Type (Id) then
2107 return Flag16 (Base_Type (Id));
2113 function Itype_Printed (Id : E) return B is
2115 pragma Assert (Is_Itype (Id));
2116 return Flag202 (Id);
2119 function Kill_Elaboration_Checks (Id : E) return B is
2122 end Kill_Elaboration_Checks;
2124 function Kill_Range_Checks (Id : E) return B is
2127 end Kill_Range_Checks;
2129 function Kill_Tag_Checks (Id : E) return B is
2132 end Kill_Tag_Checks;
2134 function Known_To_Have_Preelab_Init (Id : E) return B is
2136 pragma Assert (Is_Type (Id));
2137 return Flag207 (Id);
2138 end Known_To_Have_Preelab_Init;
2140 function Last_Assignment (Id : E) return N is
2142 pragma Assert (Is_Assignable (Id));
2144 end Last_Assignment;
2146 function Last_Entity (Id : E) return E is
2151 function Limited_View (Id : E) return E is
2153 pragma Assert (Ekind (Id) = E_Package);
2157 function Lit_Indexes (Id : E) return E is
2159 pragma Assert (Is_Enumeration_Type (Id));
2163 function Lit_Strings (Id : E) return E is
2165 pragma Assert (Is_Enumeration_Type (Id));
2169 function Low_Bound_Tested (Id : E) return B is
2171 return Flag205 (Id);
2172 end Low_Bound_Tested;
2174 function Machine_Radix_10 (Id : E) return B is
2176 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2178 end Machine_Radix_10;
2180 function Master_Id (Id : E) return E is
2182 pragma Assert (Is_Access_Type (Id));
2186 function Materialize_Entity (Id : E) return B is
2188 return Flag168 (Id);
2189 end Materialize_Entity;
2191 function Mechanism (Id : E) return M is
2193 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2194 return UI_To_Int (Uint8 (Id));
2197 function Modulus (Id : E) return Uint is
2199 pragma Assert (Is_Modular_Integer_Type (Id));
2200 return Uint17 (Base_Type (Id));
2203 function Must_Be_On_Byte_Boundary (Id : E) return B is
2205 pragma Assert (Is_Type (Id));
2206 return Flag183 (Id);
2207 end Must_Be_On_Byte_Boundary;
2209 function Must_Have_Preelab_Init (Id : E) return B is
2211 pragma Assert (Is_Type (Id));
2212 return Flag208 (Id);
2213 end Must_Have_Preelab_Init;
2215 function Needs_Debug_Info (Id : E) return B is
2217 return Flag147 (Id);
2218 end Needs_Debug_Info;
2220 function Needs_No_Actuals (Id : E) return B is
2223 (Is_Overloadable (Id)
2224 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2226 end Needs_No_Actuals;
2228 function Never_Set_In_Source (Id : E) return B is
2230 return Flag115 (Id);
2231 end Never_Set_In_Source;
2233 function Next_Inlined_Subprogram (Id : E) return E is
2236 end Next_Inlined_Subprogram;
2238 function No_Pool_Assigned (Id : E) return B is
2240 pragma Assert (Is_Access_Type (Id));
2241 return Flag131 (Root_Type (Id));
2242 end No_Pool_Assigned;
2244 function No_Return (Id : E) return B is
2246 return Flag113 (Id);
2249 function No_Strict_Aliasing (Id : E) return B is
2251 pragma Assert (Is_Access_Type (Id));
2252 return Flag136 (Base_Type (Id));
2253 end No_Strict_Aliasing;
2255 function Non_Binary_Modulus (Id : E) return B is
2257 pragma Assert (Is_Type (Id));
2258 return Flag58 (Base_Type (Id));
2259 end Non_Binary_Modulus;
2261 function Non_Limited_View (Id : E) return E is
2263 pragma Assert (Ekind (Id) in Incomplete_Kind);
2265 end Non_Limited_View;
2267 function Nonzero_Is_True (Id : E) return B is
2269 pragma Assert (Root_Type (Id) = Standard_Boolean);
2270 return Flag162 (Base_Type (Id));
2271 end Nonzero_Is_True;
2273 function Normalized_First_Bit (Id : E) return U is
2275 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2277 end Normalized_First_Bit;
2279 function Normalized_Position (Id : E) return U is
2281 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2283 end Normalized_Position;
2285 function Normalized_Position_Max (Id : E) return U is
2287 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2289 end Normalized_Position_Max;
2291 function OK_To_Rename (Id : E) return B is
2293 pragma Assert (Ekind (Id) = E_Variable);
2294 return Flag247 (Id);
2297 function OK_To_Reorder_Components (Id : E) return B is
2299 pragma Assert (Is_Record_Type (Id));
2300 return Flag239 (Base_Type (Id));
2301 end OK_To_Reorder_Components;
2303 function Optimize_Alignment_Space (Id : E) return B is
2306 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2307 return Flag241 (Id);
2308 end Optimize_Alignment_Space;
2310 function Optimize_Alignment_Time (Id : E) return B is
2313 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2314 return Flag242 (Id);
2315 end Optimize_Alignment_Time;
2317 function Original_Array_Type (Id : E) return E is
2319 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2321 end Original_Array_Type;
2323 function Original_Record_Component (Id : E) return E is
2325 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2327 end Original_Record_Component;
2329 function Overlays_Constant (Id : E) return B is
2331 return Flag243 (Id);
2332 end Overlays_Constant;
2334 function Overridden_Operation (Id : E) return E is
2337 end Overridden_Operation;
2339 function Package_Instantiation (Id : E) return N is
2341 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2343 end Package_Instantiation;
2345 function Packed_Array_Type (Id : E) return E is
2347 pragma Assert (Is_Array_Type (Id));
2349 end Packed_Array_Type;
2351 function Parent_Subtype (Id : E) return E is
2353 pragma Assert (Is_Record_Type (Id));
2354 return Node19 (Base_Type (Id));
2357 function Postcondition_Proc (Id : E) return E is
2359 pragma Assert (Ekind (Id) = E_Procedure);
2361 end Postcondition_Proc;
2363 function PPC_Wrapper (Id : E) return E is
2365 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2369 function Prival (Id : E) return E is
2371 pragma Assert (Is_Protected_Component (Id));
2375 function Prival_Link (Id : E) return E is
2377 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2381 function Private_Dependents (Id : E) return L is
2383 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2384 return Elist18 (Id);
2385 end Private_Dependents;
2387 function Private_View (Id : E) return N is
2389 pragma Assert (Is_Private_Type (Id));
2393 function Protected_Body_Subprogram (Id : E) return E is
2395 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2397 end Protected_Body_Subprogram;
2399 function Protected_Formal (Id : E) return E is
2401 pragma Assert (Is_Formal (Id));
2403 end Protected_Formal;
2405 function Protection_Object (Id : E) return E is
2408 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2410 end Protection_Object;
2412 function Reachable (Id : E) return B is
2417 function Referenced (Id : E) return B is
2419 return Flag156 (Id);
2422 function Referenced_As_LHS (Id : E) return B is
2425 end Referenced_As_LHS;
2427 function Referenced_As_Out_Parameter (Id : E) return B is
2429 return Flag227 (Id);
2430 end Referenced_As_Out_Parameter;
2432 function Referenced_Object (Id : E) return N is
2434 pragma Assert (Is_Type (Id));
2436 end Referenced_Object;
2438 function Register_Exception_Call (Id : E) return N is
2440 pragma Assert (Ekind (Id) = E_Exception);
2442 end Register_Exception_Call;
2444 function Related_Array_Object (Id : E) return E is
2446 pragma Assert (Is_Array_Type (Id));
2448 end Related_Array_Object;
2450 function Related_Expression (Id : E) return N is
2452 pragma Assert (Ekind (Id) in Type_Kind
2453 or else Ekind_In (Id, E_Constant, E_Variable));
2455 end Related_Expression;
2457 function Related_Instance (Id : E) return E is
2459 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2461 end Related_Instance;
2463 function Related_Type (Id : E) return E is
2465 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2469 function Relative_Deadline_Variable (Id : E) return E is
2471 pragma Assert (Is_Task_Type (Id));
2472 return Node26 (Implementation_Base_Type (Id));
2473 end Relative_Deadline_Variable;
2475 function Renamed_Entity (Id : E) return N is
2480 function Renamed_In_Spec (Id : E) return B is
2482 pragma Assert (Ekind (Id) = E_Package);
2483 return Flag231 (Id);
2484 end Renamed_In_Spec;
2486 function Renamed_Object (Id : E) return N is
2491 function Renaming_Map (Id : E) return U is
2496 function Requires_Overriding (Id : E) return B is
2498 pragma Assert (Is_Overloadable (Id));
2499 return Flag213 (Id);
2500 end Requires_Overriding;
2502 function Return_Present (Id : E) return B is
2507 function Return_Applies_To (Id : E) return N is
2510 end Return_Applies_To;
2512 function Returns_By_Ref (Id : E) return B is
2517 function Reverse_Bit_Order (Id : E) return B is
2519 pragma Assert (Is_Record_Type (Id));
2520 return Flag164 (Base_Type (Id));
2521 end Reverse_Bit_Order;
2523 function RM_Size (Id : E) return U is
2525 pragma Assert (Is_Type (Id));
2529 function Scalar_Range (Id : E) return N is
2534 function Scale_Value (Id : E) return U is
2539 function Scope_Depth_Value (Id : E) return U is
2542 end Scope_Depth_Value;
2544 function Sec_Stack_Needed_For_Return (Id : E) return B is
2546 return Flag167 (Id);
2547 end Sec_Stack_Needed_For_Return;
2549 function Shadow_Entities (Id : E) return S is
2551 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2553 end Shadow_Entities;
2555 function Shared_Var_Procs_Instance (Id : E) return E is
2557 pragma Assert (Ekind (Id) = E_Variable);
2559 end Shared_Var_Procs_Instance;
2561 function Size_Check_Code (Id : E) return N is
2563 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2565 end Size_Check_Code;
2567 function Size_Depends_On_Discriminant (Id : E) return B is
2569 return Flag177 (Id);
2570 end Size_Depends_On_Discriminant;
2572 function Size_Known_At_Compile_Time (Id : E) return B is
2575 end Size_Known_At_Compile_Time;
2577 function Small_Value (Id : E) return R is
2579 pragma Assert (Is_Fixed_Point_Type (Id));
2580 return Ureal21 (Id);
2583 function Spec_Entity (Id : E) return E is
2585 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2589 function Spec_PPC_List (Id : E) return N is
2592 (Ekind_In (Id, E_Entry, E_Entry_Family)
2593 or else Is_Subprogram (Id)
2594 or else Is_Generic_Subprogram (Id));
2598 function Storage_Size_Variable (Id : E) return E is
2600 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2601 return Node15 (Implementation_Base_Type (Id));
2602 end Storage_Size_Variable;
2604 function Static_Elaboration_Desired (Id : E) return B is
2606 pragma Assert (Ekind (Id) = E_Package);
2608 end Static_Elaboration_Desired;
2610 function Static_Initialization (Id : E) return N is
2613 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
2615 end Static_Initialization;
2617 function Stored_Constraint (Id : E) return L is
2620 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
2621 return Elist23 (Id);
2622 end Stored_Constraint;
2624 function Strict_Alignment (Id : E) return B is
2626 return Flag145 (Implementation_Base_Type (Id));
2627 end Strict_Alignment;
2629 function String_Literal_Length (Id : E) return U is
2632 end String_Literal_Length;
2634 function String_Literal_Low_Bound (Id : E) return N is
2637 end String_Literal_Low_Bound;
2639 function Suppress_Elaboration_Warnings (Id : E) return B is
2641 return Flag148 (Id);
2642 end Suppress_Elaboration_Warnings;
2644 function Suppress_Init_Proc (Id : E) return B is
2646 return Flag105 (Base_Type (Id));
2647 end Suppress_Init_Proc;
2649 function Suppress_Style_Checks (Id : E) return B is
2651 return Flag165 (Id);
2652 end Suppress_Style_Checks;
2654 function Suppress_Value_Tracking_On_Call (Id : E) return B is
2656 return Flag217 (Id);
2657 end Suppress_Value_Tracking_On_Call;
2659 function Task_Body_Procedure (Id : E) return N is
2661 pragma Assert (Ekind (Id) in Task_Kind);
2663 end Task_Body_Procedure;
2665 function Treat_As_Volatile (Id : E) return B is
2668 end Treat_As_Volatile;
2670 function Underlying_Full_View (Id : E) return E is
2672 pragma Assert (Ekind (Id) in Private_Kind);
2674 end Underlying_Full_View;
2676 function Underlying_Record_View (Id : E) return E is
2679 end Underlying_Record_View;
2681 function Universal_Aliasing (Id : E) return B is
2683 pragma Assert (Is_Type (Id));
2684 return Flag216 (Base_Type (Id));
2685 end Universal_Aliasing;
2687 function Unset_Reference (Id : E) return N is
2690 end Unset_Reference;
2692 function Used_As_Generic_Actual (Id : E) return B is
2694 return Flag222 (Id);
2695 end Used_As_Generic_Actual;
2697 function Uses_Sec_Stack (Id : E) return B is
2702 function Vax_Float (Id : E) return B is
2704 return Flag151 (Base_Type (Id));
2707 function Warnings_Off (Id : E) return B is
2712 function Warnings_Off_Used (Id : E) return B is
2714 return Flag236 (Id);
2715 end Warnings_Off_Used;
2717 function Warnings_Off_Used_Unmodified (Id : E) return B is
2719 return Flag237 (Id);
2720 end Warnings_Off_Used_Unmodified;
2722 function Warnings_Off_Used_Unreferenced (Id : E) return B is
2724 return Flag238 (Id);
2725 end Warnings_Off_Used_Unreferenced;
2727 function Wrapped_Entity (Id : E) return E is
2729 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
2730 and then Is_Primitive_Wrapper (Id));
2734 function Was_Hidden (Id : E) return B is
2736 return Flag196 (Id);
2739 ------------------------------
2740 -- Classification Functions --
2741 ------------------------------
2743 function Is_Access_Type (Id : E) return B is
2745 return Ekind (Id) in Access_Kind;
2748 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
2750 return Ekind (Id) in Access_Protected_Kind;
2751 end Is_Access_Protected_Subprogram_Type;
2753 function Is_Access_Subprogram_Type (Id : E) return B is
2755 return Ekind (Id) in Access_Subprogram_Kind;
2756 end Is_Access_Subprogram_Type;
2758 function Is_Aggregate_Type (Id : E) return B is
2760 return Ekind (Id) in Aggregate_Kind;
2761 end Is_Aggregate_Type;
2763 function Is_Array_Type (Id : E) return B is
2765 return Ekind (Id) in Array_Kind;
2768 function Is_Assignable (Id : E) return B is
2770 return Ekind (Id) in Assignable_Kind;
2773 function Is_Class_Wide_Type (Id : E) return B is
2775 return Ekind (Id) in Class_Wide_Kind;
2776 end Is_Class_Wide_Type;
2778 function Is_Composite_Type (Id : E) return B is
2780 return Ekind (Id) in Composite_Kind;
2781 end Is_Composite_Type;
2783 function Is_Concurrent_Body (Id : E) return B is
2785 return Ekind (Id) in
2786 Concurrent_Body_Kind;
2787 end Is_Concurrent_Body;
2789 function Is_Concurrent_Record_Type (Id : E) return B is
2792 end Is_Concurrent_Record_Type;
2794 function Is_Concurrent_Type (Id : E) return B is
2796 return Ekind (Id) in Concurrent_Kind;
2797 end Is_Concurrent_Type;
2799 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
2801 return Ekind (Id) in
2802 Decimal_Fixed_Point_Kind;
2803 end Is_Decimal_Fixed_Point_Type;
2805 function Is_Digits_Type (Id : E) return B is
2807 return Ekind (Id) in Digits_Kind;
2810 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
2812 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
2813 end Is_Discrete_Or_Fixed_Point_Type;
2815 function Is_Discrete_Type (Id : E) return B is
2817 return Ekind (Id) in Discrete_Kind;
2818 end Is_Discrete_Type;
2820 function Is_Elementary_Type (Id : E) return B is
2822 return Ekind (Id) in Elementary_Kind;
2823 end Is_Elementary_Type;
2825 function Is_Entry (Id : E) return B is
2827 return Ekind (Id) in Entry_Kind;
2830 function Is_Enumeration_Type (Id : E) return B is
2832 return Ekind (Id) in
2834 end Is_Enumeration_Type;
2836 function Is_Fixed_Point_Type (Id : E) return B is
2838 return Ekind (Id) in
2840 end Is_Fixed_Point_Type;
2842 function Is_Floating_Point_Type (Id : E) return B is
2844 return Ekind (Id) in Float_Kind;
2845 end Is_Floating_Point_Type;
2847 function Is_Formal (Id : E) return B is
2849 return Ekind (Id) in Formal_Kind;
2852 function Is_Formal_Object (Id : E) return B is
2854 return Ekind (Id) in Formal_Object_Kind;
2855 end Is_Formal_Object;
2857 function Is_Generic_Subprogram (Id : E) return B is
2859 return Ekind (Id) in Generic_Subprogram_Kind;
2860 end Is_Generic_Subprogram;
2862 function Is_Generic_Unit (Id : E) return B is
2864 return Ekind (Id) in Generic_Unit_Kind;
2865 end Is_Generic_Unit;
2867 function Is_Incomplete_Or_Private_Type (Id : E) return B is
2869 return Ekind (Id) in
2870 Incomplete_Or_Private_Kind;
2871 end Is_Incomplete_Or_Private_Type;
2873 function Is_Incomplete_Type (Id : E) return B is
2875 return Ekind (Id) in
2877 end Is_Incomplete_Type;
2879 function Is_Integer_Type (Id : E) return B is
2881 return Ekind (Id) in Integer_Kind;
2882 end Is_Integer_Type;
2884 function Is_Modular_Integer_Type (Id : E) return B is
2886 return Ekind (Id) in
2887 Modular_Integer_Kind;
2888 end Is_Modular_Integer_Type;
2890 function Is_Named_Number (Id : E) return B is
2892 return Ekind (Id) in Named_Kind;
2893 end Is_Named_Number;
2895 function Is_Numeric_Type (Id : E) return B is
2897 return Ekind (Id) in Numeric_Kind;
2898 end Is_Numeric_Type;
2900 function Is_Object (Id : E) return B is
2902 return Ekind (Id) in Object_Kind;
2905 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
2907 return Ekind (Id) in
2908 Ordinary_Fixed_Point_Kind;
2909 end Is_Ordinary_Fixed_Point_Type;
2911 function Is_Overloadable (Id : E) return B is
2913 return Ekind (Id) in Overloadable_Kind;
2914 end Is_Overloadable;
2916 function Is_Private_Type (Id : E) return B is
2918 return Ekind (Id) in Private_Kind;
2919 end Is_Private_Type;
2921 function Is_Protected_Type (Id : E) return B is
2923 return Ekind (Id) in Protected_Kind;
2924 end Is_Protected_Type;
2926 function Is_Real_Type (Id : E) return B is
2928 return Ekind (Id) in Real_Kind;
2931 function Is_Record_Type (Id : E) return B is
2933 return Ekind (Id) in Record_Kind;
2936 function Is_Scalar_Type (Id : E) return B is
2938 return Ekind (Id) in Scalar_Kind;
2941 function Is_Signed_Integer_Type (Id : E) return B is
2943 return Ekind (Id) in Signed_Integer_Kind;
2944 end Is_Signed_Integer_Type;
2946 function Is_Subprogram (Id : E) return B is
2948 return Ekind (Id) in Subprogram_Kind;
2951 function Is_Task_Type (Id : E) return B is
2953 return Ekind (Id) in Task_Kind;
2956 function Is_Type (Id : E) return B is
2958 return Ekind (Id) in Type_Kind;
2961 ------------------------------
2962 -- Attribute Set Procedures --
2963 ------------------------------
2965 -- Note: in many of these set procedures an "obvious" assertion is missing.
2966 -- The reason for this is that in many cases, a field is set before the
2967 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
2968 -- it is possible to add assertions that specifically include the E_Void
2969 -- possibility, but in some cases, we just omit the assertions.
2971 procedure Set_Accept_Address (Id : E; V : L) is
2973 Set_Elist21 (Id, V);
2974 end Set_Accept_Address;
2976 procedure Set_Access_Disp_Table (Id : E; V : L) is
2978 pragma Assert (Is_Tagged_Type (Id) and then Id = Base_Type (Id));
2979 Set_Elist16 (Id, V);
2980 end Set_Access_Disp_Table;
2982 procedure Set_Associated_Final_Chain (Id : E; V : E) is
2984 pragma Assert (Is_Access_Type (Id));
2986 end Set_Associated_Final_Chain;
2988 procedure Set_Associated_Formal_Package (Id : E; V : E) is
2991 end Set_Associated_Formal_Package;
2993 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
2996 end Set_Associated_Node_For_Itype;
2998 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3000 pragma Assert (Is_Access_Type (Id) and then Id = Base_Type (Id));
3002 end Set_Associated_Storage_Pool;
3004 procedure Set_Actual_Subtype (Id : E; V : E) is
3007 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3008 or else Is_Formal (Id));
3010 end Set_Actual_Subtype;
3012 procedure Set_Address_Taken (Id : E; V : B := True) is
3014 Set_Flag104 (Id, V);
3015 end Set_Address_Taken;
3017 procedure Set_Alias (Id : E; V : E) is
3020 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3024 procedure Set_Alignment (Id : E; V : U) is
3026 pragma Assert (Is_Type (Id)
3027 or else Is_Formal (Id)
3028 or else Ekind_In (Id, E_Loop_Parameter,
3035 procedure Set_Barrier_Function (Id : E; V : N) is
3037 pragma Assert (Is_Entry (Id));
3039 end Set_Barrier_Function;
3041 procedure Set_Block_Node (Id : E; V : N) is
3043 pragma Assert (Ekind (Id) = E_Block);
3047 procedure Set_Body_Entity (Id : E; V : E) is
3049 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3051 end Set_Body_Entity;
3053 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3056 (Ekind (Id) = E_Package
3057 or else Is_Subprogram (Id)
3058 or else Is_Generic_Unit (Id));
3060 end Set_Body_Needed_For_SAL;
3062 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3064 pragma Assert (Is_Record_Type (Id) and then Id = Base_Type (Id));
3065 Set_Flag125 (Id, V);
3066 end Set_C_Pass_By_Copy;
3068 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3071 end Set_Can_Never_Be_Null;
3073 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3076 end Set_Checks_May_Be_Suppressed;
3078 procedure Set_Class_Wide_Type (Id : E; V : E) is
3080 pragma Assert (Is_Type (Id));
3082 end Set_Class_Wide_Type;
3084 procedure Set_Cloned_Subtype (Id : E; V : E) is
3086 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3088 end Set_Cloned_Subtype;
3090 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3092 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3094 end Set_Component_Bit_Offset;
3096 procedure Set_Component_Clause (Id : E; V : N) is
3098 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3100 end Set_Component_Clause;
3102 procedure Set_Component_Size (Id : E; V : U) is
3104 pragma Assert (Is_Array_Type (Id) and then Id = Base_Type (Id));
3106 end Set_Component_Size;
3108 procedure Set_Component_Type (Id : E; V : E) is
3110 pragma Assert (Is_Array_Type (Id) and then Id = Base_Type (Id));
3112 end Set_Component_Type;
3114 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3117 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3119 end Set_Corresponding_Concurrent_Type;
3121 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3123 pragma Assert (Ekind (Id) = E_Discriminant);
3125 end Set_Corresponding_Discriminant;
3127 procedure Set_Corresponding_Equality (Id : E; V : E) is
3130 (Ekind (Id) = E_Function
3131 and then not Comes_From_Source (Id)
3132 and then Chars (Id) = Name_Op_Ne);
3134 end Set_Corresponding_Equality;
3136 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3138 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3140 end Set_Corresponding_Protected_Entry;
3142 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3144 pragma Assert (Is_Concurrent_Type (Id));
3146 end Set_Corresponding_Record_Type;
3148 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3151 end Set_Corresponding_Remote_Type;
3153 procedure Set_Current_Use_Clause (Id : E; V : E) is
3155 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3157 end Set_Current_Use_Clause;
3159 procedure Set_Current_Value (Id : E; V : N) is
3161 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3163 end Set_Current_Value;
3165 procedure Set_CR_Discriminant (Id : E; V : E) is
3168 end Set_CR_Discriminant;
3170 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3172 Set_Flag166 (Id, V);
3173 end Set_Debug_Info_Off;
3175 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3178 end Set_Debug_Renaming_Link;
3180 procedure Set_Default_Expr_Function (Id : E; V : E) is
3182 pragma Assert (Is_Formal (Id));
3184 end Set_Default_Expr_Function;
3186 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3188 Set_Flag108 (Id, V);
3189 end Set_Default_Expressions_Processed;
3191 procedure Set_Default_Value (Id : E; V : N) is
3193 pragma Assert (Is_Formal (Id));
3195 end Set_Default_Value;
3197 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3201 or else Is_Task_Type (Id)
3202 or else Ekind (Id) = E_Block);
3203 Set_Flag114 (Id, V);
3204 end Set_Delay_Cleanups;
3206 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3209 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3211 end Set_Delay_Subprogram_Descriptors;
3213 procedure Set_Delta_Value (Id : E; V : R) is
3215 pragma Assert (Is_Fixed_Point_Type (Id));
3216 Set_Ureal18 (Id, V);
3217 end Set_Delta_Value;
3219 procedure Set_Dependent_Instances (Id : E; V : L) is
3221 pragma Assert (Is_Generic_Instance (Id));
3223 end Set_Dependent_Instances;
3225 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3227 pragma Assert (Nkind (Id) in N_Entity);
3229 end Set_Depends_On_Private;
3231 procedure Set_Digits_Value (Id : E; V : U) is
3234 (Is_Floating_Point_Type (Id)
3235 or else Is_Decimal_Fixed_Point_Type (Id));
3237 end Set_Digits_Value;
3239 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3242 end Set_Directly_Designated_Type;
3244 procedure Set_Discard_Names (Id : E; V : B := True) is
3247 end Set_Discard_Names;
3249 procedure Set_Discriminal (Id : E; V : E) is
3251 pragma Assert (Ekind (Id) = E_Discriminant);
3253 end Set_Discriminal;
3255 procedure Set_Discriminal_Link (Id : E; V : E) is
3258 end Set_Discriminal_Link;
3260 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3262 pragma Assert (Ekind (Id) = E_Component);
3264 end Set_Discriminant_Checking_Func;
3266 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3268 pragma Assert (Nkind (Id) in N_Entity);
3269 Set_Elist21 (Id, V);
3270 end Set_Discriminant_Constraint;
3272 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3275 end Set_Discriminant_Default_Value;
3277 procedure Set_Discriminant_Number (Id : E; V : U) is
3280 end Set_Discriminant_Number;
3282 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3284 pragma Assert (Is_Tagged_Type (Id) and then Id = Base_Type (Id));
3285 Set_Elist26 (Id, V);
3286 end Set_Dispatch_Table_Wrappers;
3288 procedure Set_DT_Entry_Count (Id : E; V : U) is
3290 pragma Assert (Ekind (Id) = E_Component);
3292 end Set_DT_Entry_Count;
3294 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3296 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3298 end Set_DT_Offset_To_Top_Func;
3300 procedure Set_DT_Position (Id : E; V : U) is
3302 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3304 end Set_DT_Position;
3306 procedure Set_DTC_Entity (Id : E; V : E) is
3308 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3312 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3314 pragma Assert (Ekind (Id) = E_Package);
3315 Set_Flag210 (Id, V);
3316 end Set_Elaborate_Body_Desirable;
3318 procedure Set_Elaboration_Entity (Id : E; V : E) is
3323 Ekind (Id) = E_Package
3325 Is_Generic_Unit (Id));
3327 end Set_Elaboration_Entity;
3329 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3334 Ekind (Id) = E_Package
3336 Is_Generic_Unit (Id));
3337 Set_Flag174 (Id, V);
3338 end Set_Elaboration_Entity_Required;
3340 procedure Set_Enclosing_Scope (Id : E; V : E) is
3343 end Set_Enclosing_Scope;
3345 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3347 pragma Assert (Is_Entry (Id));
3348 Set_Flag152 (Id, V);
3349 end Set_Entry_Accepted;
3351 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3354 end Set_Entry_Bodies_Array;
3356 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3359 end Set_Entry_Cancel_Parameter;
3361 procedure Set_Entry_Component (Id : E; V : E) is
3364 end Set_Entry_Component;
3366 procedure Set_Entry_Formal (Id : E; V : E) is
3369 end Set_Entry_Formal;
3371 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3373 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3375 end Set_Entry_Index_Constant;
3377 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3380 end Set_Entry_Parameters_Type;
3382 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3384 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3386 end Set_Enum_Pos_To_Rep;
3388 procedure Set_Enumeration_Pos (Id : E; V : U) is
3390 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3392 end Set_Enumeration_Pos;
3394 procedure Set_Enumeration_Rep (Id : E; V : U) is
3396 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3398 end Set_Enumeration_Rep;
3400 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3402 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3404 end Set_Enumeration_Rep_Expr;
3406 procedure Set_Equivalent_Type (Id : E; V : E) is
3409 (Ekind_In (Id, E_Class_Wide_Type,
3410 E_Class_Wide_Subtype,
3411 E_Access_Protected_Subprogram_Type,
3412 E_Anonymous_Access_Protected_Subprogram_Type,
3413 E_Access_Subprogram_Type,
3416 end Set_Equivalent_Type;
3418 procedure Set_Esize (Id : E; V : U) is
3423 procedure Set_Exception_Code (Id : E; V : U) is
3425 pragma Assert (Ekind (Id) = E_Exception);
3427 end Set_Exception_Code;
3429 procedure Set_Extra_Accessibility (Id : E; V : E) is
3431 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3433 end Set_Extra_Accessibility;
3435 procedure Set_Extra_Constrained (Id : E; V : E) is
3437 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3439 end Set_Extra_Constrained;
3441 procedure Set_Extra_Formal (Id : E; V : E) is
3444 end Set_Extra_Formal;
3446 procedure Set_Extra_Formals (Id : E; V : E) is
3449 (Is_Overloadable (Id)
3450 or else Ekind_In (Id, E_Entry_Family,
3452 E_Subprogram_Type));
3454 end Set_Extra_Formals;
3456 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3459 (Is_Access_Subprogram_Type (Id)
3460 and then Id = Base_Type (Id));
3461 Set_Flag229 (Id, V);
3462 end Set_Can_Use_Internal_Rep;
3464 procedure Set_Finalization_Chain_Entity (Id : E; V : E) is
3467 end Set_Finalization_Chain_Entity;
3469 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3471 pragma Assert (Is_Type (Id) and then Id = Base_Type (Id));
3472 Set_Flag158 (Id, V);
3473 end Set_Finalize_Storage_Only;
3475 procedure Set_First_Entity (Id : E; V : E) is
3478 end Set_First_Entity;
3480 procedure Set_First_Exit_Statement (Id : E; V : N) is
3482 pragma Assert (Ekind (Id) = E_Loop);
3484 end Set_First_Exit_Statement;
3486 procedure Set_First_Index (Id : E; V : N) is
3488 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3490 end Set_First_Index;
3492 procedure Set_First_Literal (Id : E; V : E) is
3494 pragma Assert (Is_Enumeration_Type (Id));
3496 end Set_First_Literal;
3498 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3500 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3502 end Set_First_Optional_Parameter;
3504 procedure Set_First_Private_Entity (Id : E; V : E) is
3506 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
3507 or else Ekind (Id) in Concurrent_Kind);
3509 end Set_First_Private_Entity;
3511 procedure Set_First_Rep_Item (Id : E; V : N) is
3514 end Set_First_Rep_Item;
3516 procedure Set_Freeze_Node (Id : E; V : N) is
3519 end Set_Freeze_Node;
3521 procedure Set_From_With_Type (Id : E; V : B := True) is
3525 or else Ekind (Id) = E_Package);
3526 Set_Flag159 (Id, V);
3527 end Set_From_With_Type;
3529 procedure Set_Full_View (Id : E; V : E) is
3531 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
3535 procedure Set_Generic_Homonym (Id : E; V : E) is
3538 end Set_Generic_Homonym;
3540 procedure Set_Generic_Renamings (Id : E; V : L) is
3542 Set_Elist23 (Id, V);
3543 end Set_Generic_Renamings;
3545 procedure Set_Handler_Records (Id : E; V : S) is
3548 end Set_Handler_Records;
3550 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
3552 pragma Assert (Id = Base_Type (Id));
3553 Set_Flag135 (Id, V);
3554 end Set_Has_Aliased_Components;
3556 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
3559 end Set_Has_Alignment_Clause;
3561 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
3564 end Set_Has_All_Calls_Remote;
3566 procedure Set_Has_Anon_Block_Suffix (Id : E; V : B := True) is
3568 Set_Flag201 (Id, V);
3569 end Set_Has_Anon_Block_Suffix;
3571 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
3573 pragma Assert (not Is_Type (Id) or else Id = Base_Type (Id));
3575 end Set_Has_Atomic_Components;
3577 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
3580 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
3581 Set_Flag139 (Id, V);
3582 end Set_Has_Biased_Representation;
3584 procedure Set_Has_Completion (Id : E; V : B := True) is
3587 end Set_Has_Completion;
3589 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
3591 pragma Assert (Is_Type (Id));
3593 end Set_Has_Completion_In_Body;
3595 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
3597 pragma Assert (Ekind (Id) = E_Record_Type);
3598 Set_Flag140 (Id, V);
3599 end Set_Has_Complex_Representation;
3601 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
3603 pragma Assert (Ekind (Id) = E_Array_Type);
3605 end Set_Has_Component_Size_Clause;
3607 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
3609 pragma Assert (Is_Type (Id));
3610 Set_Flag187 (Id, V);
3611 end Set_Has_Constrained_Partial_View;
3613 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
3615 Set_Flag181 (Id, V);
3616 end Set_Has_Contiguous_Rep;
3618 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
3620 pragma Assert (Id = Base_Type (Id));
3622 end Set_Has_Controlled_Component;
3624 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
3627 end Set_Has_Controlling_Result;
3629 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
3631 Set_Flag119 (Id, V);
3632 end Set_Has_Convention_Pragma;
3634 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
3636 pragma Assert (Nkind (Id) in N_Entity);
3637 Set_Flag200 (Id, V);
3638 end Set_Has_Delayed_Aspects;
3640 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
3642 pragma Assert (Nkind (Id) in N_Entity);
3644 end Set_Has_Delayed_Freeze;
3646 procedure Set_Has_Discriminants (Id : E; V : B := True) is
3648 pragma Assert (Nkind (Id) in N_Entity);
3650 end Set_Has_Discriminants;
3652 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
3654 pragma Assert (Ekind (Id) = E_Record_Type
3655 and then Is_Tagged_Type (Id));
3656 Set_Flag220 (Id, V);
3657 end Set_Has_Dispatch_Table;
3659 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
3661 pragma Assert (Is_Enumeration_Type (Id));
3663 end Set_Has_Enumeration_Rep_Clause;
3665 procedure Set_Has_Exit (Id : E; V : B := True) is
3670 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True) is
3672 pragma Assert (Is_Tagged_Type (Id));
3673 Set_Flag110 (Id, V);
3674 end Set_Has_External_Tag_Rep_Clause;
3676 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
3678 Set_Flag175 (Id, V);
3679 end Set_Has_Forward_Instantiation;
3681 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
3683 Set_Flag173 (Id, V);
3684 end Set_Has_Fully_Qualified_Name;
3686 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
3689 end Set_Has_Gigi_Rep_Item;
3691 procedure Set_Has_Homonym (Id : E; V : B := True) is
3694 end Set_Has_Homonym;
3696 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
3698 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
3699 Set_Flag219 (Id, V);
3700 end Set_Has_Initial_Value;
3702 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
3704 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
3706 end Set_Has_Machine_Radix_Clause;
3708 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
3711 end Set_Has_Master_Entity;
3713 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
3715 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
3716 Set_Flag142 (Id, V);
3717 end Set_Has_Missing_Return;
3719 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
3721 Set_Flag101 (Id, V);
3722 end Set_Has_Nested_Block_With_Handler;
3724 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
3726 pragma Assert (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
3727 Set_Flag215 (Id, V);
3728 end Set_Has_Up_Level_Access;
3730 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
3732 pragma Assert (Id = Base_Type (Id));
3734 end Set_Has_Non_Standard_Rep;
3736 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
3738 pragma Assert (Is_Type (Id));
3739 Set_Flag172 (Id, V);
3740 end Set_Has_Object_Size_Clause;
3742 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
3744 Set_Flag154 (Id, V);
3745 end Set_Has_Per_Object_Constraint;
3747 procedure Set_Has_Persistent_BSS (Id : E; V : B := True) is
3749 Set_Flag188 (Id, V);
3750 end Set_Has_Persistent_BSS;
3752 procedure Set_Has_Postconditions (Id : E; V : B := True) is
3754 pragma Assert (Is_Subprogram (Id));
3755 Set_Flag240 (Id, V);
3756 end Set_Has_Postconditions;
3758 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
3760 pragma Assert (Is_Access_Type (Id));
3761 Set_Flag27 (Base_Type (Id), V);
3762 end Set_Has_Pragma_Controlled;
3764 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
3766 Set_Flag150 (Id, V);
3767 end Set_Has_Pragma_Elaborate_Body;
3769 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
3771 Set_Flag157 (Id, V);
3772 end Set_Has_Pragma_Inline;
3774 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
3776 Set_Flag230 (Id, V);
3777 end Set_Has_Pragma_Inline_Always;
3779 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
3781 pragma Assert (Is_Enumeration_Type (Id));
3782 pragma Assert (Id = Base_Type (Id));
3783 Set_Flag198 (Id, V);
3784 end Set_Has_Pragma_Ordered;
3786 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
3788 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
3789 pragma Assert (Id = Base_Type (Id));
3790 Set_Flag121 (Id, V);
3791 end Set_Has_Pragma_Pack;
3793 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
3795 Set_Flag221 (Id, V);
3796 end Set_Has_Pragma_Preelab_Init;
3798 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
3800 Set_Flag203 (Id, V);
3801 end Set_Has_Pragma_Pure;
3803 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
3805 Set_Flag179 (Id, V);
3806 end Set_Has_Pragma_Pure_Function;
3808 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
3810 Set_Flag169 (Id, V);
3811 end Set_Has_Pragma_Thread_Local_Storage;
3813 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
3815 Set_Flag233 (Id, V);
3816 end Set_Has_Pragma_Unmodified;
3818 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
3820 Set_Flag180 (Id, V);
3821 end Set_Has_Pragma_Unreferenced;
3823 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
3825 pragma Assert (Is_Type (Id));
3826 Set_Flag212 (Id, V);
3827 end Set_Has_Pragma_Unreferenced_Objects;
3829 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
3831 pragma Assert (Id = Base_Type (Id));
3832 Set_Flag120 (Id, V);
3833 end Set_Has_Primitive_Operations;
3835 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
3837 Set_Flag155 (Id, V);
3838 end Set_Has_Private_Declaration;
3840 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
3842 Set_Flag161 (Id, V);
3843 end Set_Has_Qualified_Name;
3845 procedure Set_Has_RACW (Id : E; V : B := True) is
3847 pragma Assert (Ekind (Id) = E_Package);
3848 Set_Flag214 (Id, V);
3851 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
3853 pragma Assert (Id = Base_Type (Id));
3855 end Set_Has_Record_Rep_Clause;
3857 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
3859 pragma Assert (Is_Subprogram (Id));
3860 Set_Flag143 (Id, V);
3861 end Set_Has_Recursive_Call;
3863 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
3866 end Set_Has_Size_Clause;
3868 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
3871 end Set_Has_Small_Clause;
3873 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
3875 pragma Assert (Id = Base_Type (Id));
3876 Set_Flag100 (Id, V);
3877 end Set_Has_Specified_Layout;
3879 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
3881 pragma Assert (Is_Type (Id));
3882 Set_Flag190 (Id, V);
3883 end Set_Has_Specified_Stream_Input;
3885 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
3887 pragma Assert (Is_Type (Id));
3888 Set_Flag191 (Id, V);
3889 end Set_Has_Specified_Stream_Output;
3891 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
3893 pragma Assert (Is_Type (Id));
3894 Set_Flag192 (Id, V);
3895 end Set_Has_Specified_Stream_Read;
3897 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
3899 pragma Assert (Is_Type (Id));
3900 Set_Flag193 (Id, V);
3901 end Set_Has_Specified_Stream_Write;
3903 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
3905 Set_Flag211 (Id, V);
3906 end Set_Has_Static_Discriminants;
3908 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
3910 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
3911 pragma Assert (Id = Base_Type (Id));
3913 end Set_Has_Storage_Size_Clause;
3915 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
3917 pragma Assert (Is_Elementary_Type (Id));
3918 Set_Flag184 (Id, V);
3919 end Set_Has_Stream_Size_Clause;
3921 procedure Set_Has_Subprogram_Descriptor (Id : E; V : B := True) is
3924 end Set_Has_Subprogram_Descriptor;
3926 procedure Set_Has_Task (Id : E; V : B := True) is
3928 pragma Assert (Id = Base_Type (Id));
3932 procedure Set_Has_Thunks (Id : E; V : B := True) is
3934 pragma Assert (Is_Tag (Id));
3935 Set_Flag228 (Id, V);
3938 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
3940 pragma Assert (Id = Base_Type (Id));
3941 Set_Flag123 (Id, V);
3942 end Set_Has_Unchecked_Union;
3944 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
3946 pragma Assert (Is_Type (Id));
3948 end Set_Has_Unknown_Discriminants;
3950 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
3952 pragma Assert (not Is_Type (Id) or else Id = Base_Type (Id));
3954 end Set_Has_Volatile_Components;
3956 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
3958 Set_Flag182 (Id, V);
3959 end Set_Has_Xref_Entry;
3961 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
3963 pragma Assert (Ekind (Id) = E_Variable);
3965 end Set_Hiding_Loop_Variable;
3967 procedure Set_Homonym (Id : E; V : E) is
3969 pragma Assert (Id /= V);
3973 procedure Set_Interface_Alias (Id : E; V : E) is
3977 and then Is_Hidden (Id)
3978 and then (Ekind_In (Id, E_Procedure, E_Function)));
3980 end Set_Interface_Alias;
3982 procedure Set_Interfaces (Id : E; V : L) is
3984 pragma Assert (Is_Record_Type (Id));
3985 Set_Elist25 (Id, V);
3988 procedure Set_In_Package_Body (Id : E; V : B := True) is
3991 end Set_In_Package_Body;
3993 procedure Set_In_Private_Part (Id : E; V : B := True) is
3996 end Set_In_Private_Part;
3998 procedure Set_In_Use (Id : E; V : B := True) is
4000 pragma Assert (Nkind (Id) in N_Entity);
4004 procedure Set_Inner_Instances (Id : E; V : L) is
4006 Set_Elist23 (Id, V);
4007 end Set_Inner_Instances;
4009 procedure Set_Interface_Name (Id : E; V : N) is
4012 end Set_Interface_Name;
4014 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4016 pragma Assert (Is_Overloadable (Id));
4018 end Set_Is_Abstract_Subprogram;
4020 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4022 pragma Assert (Is_Type (Id));
4023 Set_Flag146 (Id, V);
4024 end Set_Is_Abstract_Type;
4026 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4028 pragma Assert (Is_Access_Type (Id));
4029 Set_Flag194 (Id, V);
4030 end Set_Is_Local_Anonymous_Access;
4032 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4034 pragma Assert (Is_Access_Type (Id));
4036 end Set_Is_Access_Constant;
4038 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4040 Set_Flag185 (Id, V);
4041 end Set_Is_Ada_2005_Only;
4043 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4045 Set_Flag199 (Id, V);
4046 end Set_Is_Ada_2012_Only;
4048 procedure Set_Is_Aliased (Id : E; V : B := True) is
4050 pragma Assert (Nkind (Id) in N_Entity);
4054 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
4056 pragma Assert (Is_Entry (Id));
4057 Set_Flag132 (Id, V);
4058 end Set_Is_AST_Entry;
4060 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4063 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4065 end Set_Is_Asynchronous;
4067 procedure Set_Is_Atomic (Id : E; V : B := True) is
4072 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4074 pragma Assert ((not V)
4075 or else (Is_Array_Type (Id) and then Id = Base_Type (Id)));
4077 Set_Flag122 (Id, V);
4078 end Set_Is_Bit_Packed_Array;
4080 procedure Set_Is_Called (Id : E; V : B := True) is
4082 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4083 Set_Flag102 (Id, V);
4086 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4089 end Set_Is_Character_Type;
4091 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4094 end Set_Is_Child_Unit;
4096 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4099 end Set_Is_Class_Wide_Equivalent_Type;
4101 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4103 Set_Flag149 (Id, V);
4104 end Set_Is_Compilation_Unit;
4106 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4108 pragma Assert (Ekind (Id) = E_Discriminant);
4109 Set_Flag103 (Id, V);
4110 end Set_Is_Completely_Hidden;
4112 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4115 end Set_Is_Concurrent_Record_Type;
4117 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4120 end Set_Is_Constr_Subt_For_U_Nominal;
4122 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4124 Set_Flag141 (Id, V);
4125 end Set_Is_Constr_Subt_For_UN_Aliased;
4127 procedure Set_Is_Constrained (Id : E; V : B := True) is
4129 pragma Assert (Nkind (Id) in N_Entity);
4131 end Set_Is_Constrained;
4133 procedure Set_Is_Constructor (Id : E; V : B := True) is
4136 end Set_Is_Constructor;
4138 procedure Set_Is_Controlled (Id : E; V : B := True) is
4140 pragma Assert (Id = Base_Type (Id));
4142 end Set_Is_Controlled;
4144 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4146 pragma Assert (Is_Formal (Id));
4148 end Set_Is_Controlling_Formal;
4150 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4153 end Set_Is_CPP_Class;
4155 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4157 pragma Assert (Is_Type (Id));
4158 Set_Flag223 (Id, V);
4159 end Set_Is_Descendent_Of_Address;
4161 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4163 Set_Flag176 (Id, V);
4164 end Set_Is_Discrim_SO_Function;
4166 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4168 Set_Flag234 (Id, V);
4169 end Set_Is_Dispatch_Table_Entity;
4171 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4176 Is_Overloadable (Id)
4178 Ekind (Id) = E_Subprogram_Type);
4181 end Set_Is_Dispatching_Operation;
4183 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4185 Set_Flag124 (Id, V);
4186 end Set_Is_Eliminated;
4188 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4191 end Set_Is_Entry_Formal;
4193 procedure Set_Is_Exported (Id : E; V : B := True) is
4196 end Set_Is_Exported;
4198 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4201 end Set_Is_First_Subtype;
4203 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4205 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4206 Set_Flag118 (Id, V);
4207 end Set_Is_For_Access_Subtype;
4209 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4211 Set_Flag111 (Id, V);
4212 end Set_Is_Formal_Subprogram;
4214 procedure Set_Is_Frozen (Id : E; V : B := True) is
4216 pragma Assert (Nkind (Id) in N_Entity);
4220 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4222 pragma Assert (Is_Type (Id));
4224 end Set_Is_Generic_Actual_Type;
4226 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4228 Set_Flag130 (Id, V);
4229 end Set_Is_Generic_Instance;
4231 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4233 pragma Assert (Nkind (Id) in N_Entity);
4235 end Set_Is_Generic_Type;
4237 procedure Set_Is_Hidden (Id : E; V : B := True) is
4242 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4244 Set_Flag171 (Id, V);
4245 end Set_Is_Hidden_Open_Scope;
4247 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4249 pragma Assert (Nkind (Id) in N_Entity);
4251 end Set_Is_Immediately_Visible;
4253 procedure Set_Is_Imported (Id : E; V : B := True) is
4256 end Set_Is_Imported;
4258 procedure Set_Is_Inlined (Id : E; V : B := True) is
4263 procedure Set_Is_Interface (Id : E; V : B := True) is
4266 (Ekind_In (Id, E_Record_Type,
4268 E_Record_Type_With_Private,
4269 E_Record_Subtype_With_Private,
4271 E_Class_Wide_Subtype));
4272 Set_Flag186 (Id, V);
4273 end Set_Is_Interface;
4275 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4277 Set_Flag126 (Id, V);
4278 end Set_Is_Instantiated;
4280 procedure Set_Is_Internal (Id : E; V : B := True) is
4282 pragma Assert (Nkind (Id) in N_Entity);
4284 end Set_Is_Internal;
4286 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4288 pragma Assert (Nkind (Id) in N_Entity);
4290 end Set_Is_Interrupt_Handler;
4292 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4295 end Set_Is_Intrinsic_Subprogram;
4297 procedure Set_Is_Itype (Id : E; V : B := True) is
4302 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4305 end Set_Is_Known_Non_Null;
4307 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4309 Set_Flag204 (Id, V);
4310 end Set_Is_Known_Null;
4312 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4314 Set_Flag170 (Id, V);
4315 end Set_Is_Known_Valid;
4317 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4319 pragma Assert (Is_Type (Id));
4320 Set_Flag106 (Id, V);
4321 end Set_Is_Limited_Composite;
4323 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4325 pragma Assert (Is_Interface (Id));
4326 Set_Flag197 (Id, V);
4327 end Set_Is_Limited_Interface;
4329 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4332 end Set_Is_Limited_Record;
4334 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4336 pragma Assert (Is_Subprogram (Id));
4337 Set_Flag137 (Id, V);
4338 end Set_Is_Machine_Code_Subprogram;
4340 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4342 pragma Assert (Is_Type (Id));
4343 Set_Flag109 (Id, V);
4344 end Set_Is_Non_Static_Subtype;
4346 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4348 pragma Assert (Ekind (Id) = E_Procedure);
4349 Set_Flag178 (Id, V);
4350 end Set_Is_Null_Init_Proc;
4352 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4354 Set_Flag153 (Id, V);
4355 end Set_Is_Obsolescent;
4357 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
4359 pragma Assert (Ekind (Id) = E_Out_Parameter);
4360 Set_Flag226 (Id, V);
4361 end Set_Is_Only_Out_Parameter;
4363 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
4365 pragma Assert (Is_Formal (Id));
4366 Set_Flag134 (Id, V);
4367 end Set_Is_Optional_Parameter;
4369 procedure Set_Is_Overriding_Operation (Id : E; V : B := True) is
4371 pragma Assert (Is_Subprogram (Id));
4373 end Set_Is_Overriding_Operation;
4375 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
4377 Set_Flag160 (Id, V);
4378 end Set_Is_Package_Body_Entity;
4380 procedure Set_Is_Packed (Id : E; V : B := True) is
4382 pragma Assert (Id = Base_Type (Id));
4386 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
4388 Set_Flag138 (Id, V);
4389 end Set_Is_Packed_Array_Type;
4391 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
4393 pragma Assert (Nkind (Id) in N_Entity);
4395 end Set_Is_Potentially_Use_Visible;
4397 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
4400 end Set_Is_Preelaborated;
4402 procedure Set_Is_Primitive (Id : E; V : B := True) is
4405 (Is_Overloadable (Id)
4406 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
4407 Set_Flag218 (Id, V);
4408 end Set_Is_Primitive;
4410 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
4412 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4413 Set_Flag195 (Id, V);
4414 end Set_Is_Primitive_Wrapper;
4416 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
4418 pragma Assert (Is_Type (Id));
4419 Set_Flag107 (Id, V);
4420 end Set_Is_Private_Composite;
4422 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
4425 end Set_Is_Private_Descendant;
4427 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
4429 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4430 Set_Flag245 (Id, V);
4431 end Set_Is_Private_Primitive;
4433 procedure Set_Is_Public (Id : E; V : B := True) is
4435 pragma Assert (Nkind (Id) in N_Entity);
4439 procedure Set_Is_Pure (Id : E; V : B := True) is
4444 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
4446 pragma Assert (Is_Access_Type (Id));
4447 Set_Flag189 (Id, V);
4448 end Set_Is_Pure_Unit_Access_Type;
4450 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
4452 pragma Assert (Is_Type (Id));
4453 Set_Flag244 (Id, V);
4454 end Set_Is_RACW_Stub_Type;
4456 procedure Set_Is_Raised (Id : E; V : B := True) is
4458 pragma Assert (Ekind (Id) = E_Exception);
4459 Set_Flag224 (Id, V);
4462 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
4465 end Set_Is_Remote_Call_Interface;
4467 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
4470 end Set_Is_Remote_Types;
4472 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
4474 Set_Flag112 (Id, V);
4475 end Set_Is_Renaming_Of_Object;
4477 procedure Set_Is_Return_Object (Id : E; V : B := True) is
4479 Set_Flag209 (Id, V);
4480 end Set_Is_Return_Object;
4482 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
4485 end Set_Is_Shared_Passive;
4487 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
4491 or else Ekind_In (Id, E_Exception,
4496 end Set_Is_Statically_Allocated;
4498 procedure Set_Is_Tag (Id : E; V : B := True) is
4500 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
4504 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
4507 end Set_Is_Tagged_Type;
4509 procedure Set_Is_Thunk (Id : E; V : B := True) is
4511 Set_Flag225 (Id, V);
4514 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
4516 Set_Flag235 (Id, V);
4517 end Set_Is_Trivial_Subprogram;
4519 procedure Set_Is_True_Constant (Id : E; V : B := True) is
4521 Set_Flag163 (Id, V);
4522 end Set_Is_True_Constant;
4524 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
4526 pragma Assert (Id = Base_Type (Id));
4527 Set_Flag117 (Id, V);
4528 end Set_Is_Unchecked_Union;
4530 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
4532 pragma Assert (Ekind (Id) = E_Record_Type);
4533 Set_Flag246 (Id, V);
4534 end Set_Is_Underlying_Record_View;
4536 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
4538 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
4539 Set_Flag144 (Id, V);
4540 end Set_Is_Unsigned_Type;
4542 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
4544 pragma Assert (Ekind (Id) = E_Procedure);
4545 Set_Flag127 (Id, V);
4546 end Set_Is_Valued_Procedure;
4548 procedure Set_Is_Visible_Child_Unit (Id : E; V : B := True) is
4550 pragma Assert (Is_Child_Unit (Id));
4551 Set_Flag116 (Id, V);
4552 end Set_Is_Visible_Child_Unit;
4554 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
4556 Set_Flag206 (Id, V);
4557 end Set_Is_Visible_Formal;
4559 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
4561 pragma Assert (Ekind (Id) = E_Exception);
4562 Set_Flag133 (Id, V);
4563 end Set_Is_VMS_Exception;
4565 procedure Set_Is_Volatile (Id : E; V : B := True) is
4567 pragma Assert (Nkind (Id) in N_Entity);
4569 end Set_Is_Volatile;
4571 procedure Set_Itype_Printed (Id : E; V : B := True) is
4573 pragma Assert (Is_Itype (Id));
4574 Set_Flag202 (Id, V);
4575 end Set_Itype_Printed;
4577 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
4580 end Set_Kill_Elaboration_Checks;
4582 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
4585 end Set_Kill_Range_Checks;
4587 procedure Set_Kill_Tag_Checks (Id : E; V : B := True) is
4590 end Set_Kill_Tag_Checks;
4592 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
4594 pragma Assert (Is_Type (Id));
4595 Set_Flag207 (Id, V);
4596 end Set_Known_To_Have_Preelab_Init;
4598 procedure Set_Last_Assignment (Id : E; V : N) is
4600 pragma Assert (Is_Assignable (Id));
4602 end Set_Last_Assignment;
4604 procedure Set_Last_Entity (Id : E; V : E) is
4607 end Set_Last_Entity;
4609 procedure Set_Limited_View (Id : E; V : E) is
4611 pragma Assert (Ekind (Id) = E_Package);
4613 end Set_Limited_View;
4615 procedure Set_Lit_Indexes (Id : E; V : E) is
4617 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4619 end Set_Lit_Indexes;
4621 procedure Set_Lit_Strings (Id : E; V : E) is
4623 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
4625 end Set_Lit_Strings;
4627 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
4629 pragma Assert (Is_Formal (Id));
4630 Set_Flag205 (Id, V);
4631 end Set_Low_Bound_Tested;
4633 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
4635 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4637 end Set_Machine_Radix_10;
4639 procedure Set_Master_Id (Id : E; V : E) is
4641 pragma Assert (Is_Access_Type (Id));
4645 procedure Set_Materialize_Entity (Id : E; V : B := True) is
4647 Set_Flag168 (Id, V);
4648 end Set_Materialize_Entity;
4650 procedure Set_Mechanism (Id : E; V : M) is
4652 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
4653 Set_Uint8 (Id, UI_From_Int (V));
4656 procedure Set_Modulus (Id : E; V : U) is
4658 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
4662 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
4664 pragma Assert (Is_Type (Id));
4665 Set_Flag183 (Id, V);
4666 end Set_Must_Be_On_Byte_Boundary;
4668 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
4670 pragma Assert (Is_Type (Id));
4671 Set_Flag208 (Id, V);
4672 end Set_Must_Have_Preelab_Init;
4674 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
4676 Set_Flag147 (Id, V);
4677 end Set_Needs_Debug_Info;
4679 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
4682 (Is_Overloadable (Id)
4683 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
4685 end Set_Needs_No_Actuals;
4687 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
4689 Set_Flag115 (Id, V);
4690 end Set_Never_Set_In_Source;
4692 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
4695 end Set_Next_Inlined_Subprogram;
4697 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
4699 pragma Assert (Is_Access_Type (Id) and then Id = Base_Type (Id));
4700 Set_Flag131 (Id, V);
4701 end Set_No_Pool_Assigned;
4703 procedure Set_No_Return (Id : E; V : B := True) is
4706 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
4707 Set_Flag113 (Id, V);
4710 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
4712 pragma Assert (Is_Access_Type (Id) and then Id = Base_Type (Id));
4713 Set_Flag136 (Id, V);
4714 end Set_No_Strict_Aliasing;
4716 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
4718 pragma Assert (Is_Type (Id) and then Id = Base_Type (Id));
4720 end Set_Non_Binary_Modulus;
4722 procedure Set_Non_Limited_View (Id : E; V : E) is
4724 pragma Assert (Ekind (Id) in Incomplete_Kind);
4726 end Set_Non_Limited_View;
4728 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
4731 (Root_Type (Id) = Standard_Boolean
4732 and then Ekind (Id) = E_Enumeration_Type);
4733 Set_Flag162 (Id, V);
4734 end Set_Nonzero_Is_True;
4736 procedure Set_Normalized_First_Bit (Id : E; V : U) is
4738 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4740 end Set_Normalized_First_Bit;
4742 procedure Set_Normalized_Position (Id : E; V : U) is
4744 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4746 end Set_Normalized_Position;
4748 procedure Set_Normalized_Position_Max (Id : E; V : U) is
4750 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
4752 end Set_Normalized_Position_Max;
4754 procedure Set_OK_To_Rename (Id : E; V : B := True) is
4756 pragma Assert (Ekind (Id) = E_Variable);
4757 Set_Flag247 (Id, V);
4758 end Set_OK_To_Rename;
4760 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
4763 (Is_Record_Type (Id) and then Id = Base_Type (Id));
4764 Set_Flag239 (Id, V);
4765 end Set_OK_To_Reorder_Components;
4767 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
4770 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
4771 Set_Flag241 (Id, V);
4772 end Set_Optimize_Alignment_Space;
4774 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
4777 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
4778 Set_Flag242 (Id, V);
4779 end Set_Optimize_Alignment_Time;
4781 procedure Set_Original_Array_Type (Id : E; V : E) is
4783 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
4785 end Set_Original_Array_Type;
4787 procedure Set_Original_Record_Component (Id : E; V : E) is
4789 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
4791 end Set_Original_Record_Component;
4793 procedure Set_Overlays_Constant (Id : E; V : B := True) is
4795 Set_Flag243 (Id, V);
4796 end Set_Overlays_Constant;
4798 procedure Set_Overridden_Operation (Id : E; V : E) is
4801 end Set_Overridden_Operation;
4803 procedure Set_Package_Instantiation (Id : E; V : N) is
4805 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
4807 end Set_Package_Instantiation;
4809 procedure Set_Packed_Array_Type (Id : E; V : E) is
4811 pragma Assert (Is_Array_Type (Id));
4813 end Set_Packed_Array_Type;
4815 procedure Set_Parent_Subtype (Id : E; V : E) is
4817 pragma Assert (Ekind (Id) = E_Record_Type);
4819 end Set_Parent_Subtype;
4821 procedure Set_Postcondition_Proc (Id : E; V : E) is
4823 pragma Assert (Ekind (Id) = E_Procedure);
4825 end Set_Postcondition_Proc;
4827 procedure Set_PPC_Wrapper (Id : E; V : E) is
4829 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
4831 end Set_PPC_Wrapper;
4833 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
4836 (Is_Tagged_Type (Id)
4838 (Is_Record_Type (Id)
4840 Is_Incomplete_Type (Id)
4842 Ekind_In (Id, E_Private_Type, E_Private_Subtype)));
4843 Set_Elist15 (Id, V);
4844 end Set_Direct_Primitive_Operations;
4846 procedure Set_Prival (Id : E; V : E) is
4848 pragma Assert (Is_Protected_Component (Id));
4852 procedure Set_Prival_Link (Id : E; V : E) is
4854 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
4856 end Set_Prival_Link;
4858 procedure Set_Private_Dependents (Id : E; V : L) is
4860 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
4861 Set_Elist18 (Id, V);
4862 end Set_Private_Dependents;
4864 procedure Set_Private_View (Id : E; V : N) is
4866 pragma Assert (Is_Private_Type (Id));
4868 end Set_Private_View;
4870 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
4872 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
4874 end Set_Protected_Body_Subprogram;
4876 procedure Set_Protected_Formal (Id : E; V : E) is
4878 pragma Assert (Is_Formal (Id));
4880 end Set_Protected_Formal;
4882 procedure Set_Protection_Object (Id : E; V : E) is
4884 pragma Assert (Ekind_In (Id, E_Entry,
4889 end Set_Protection_Object;
4891 procedure Set_Reachable (Id : E; V : B := True) is
4896 procedure Set_Referenced (Id : E; V : B := True) is
4898 Set_Flag156 (Id, V);
4901 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
4904 end Set_Referenced_As_LHS;
4906 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
4908 Set_Flag227 (Id, V);
4909 end Set_Referenced_As_Out_Parameter;
4911 procedure Set_Referenced_Object (Id : E; V : N) is
4913 pragma Assert (Is_Type (Id));
4915 end Set_Referenced_Object;
4917 procedure Set_Register_Exception_Call (Id : E; V : N) is
4919 pragma Assert (Ekind (Id) = E_Exception);
4921 end Set_Register_Exception_Call;
4923 procedure Set_Related_Array_Object (Id : E; V : E) is
4925 pragma Assert (Is_Array_Type (Id));
4927 end Set_Related_Array_Object;
4929 procedure Set_Related_Expression (Id : E; V : N) is
4931 pragma Assert (Ekind (Id) in Type_Kind
4932 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
4934 end Set_Related_Expression;
4936 procedure Set_Related_Instance (Id : E; V : E) is
4938 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
4940 end Set_Related_Instance;
4942 procedure Set_Related_Type (Id : E; V : E) is
4944 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
4946 end Set_Related_Type;
4948 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
4950 pragma Assert (Is_Task_Type (Id) and then Id = Base_Type (Id));
4952 end Set_Relative_Deadline_Variable;
4954 procedure Set_Renamed_Entity (Id : E; V : N) is
4957 end Set_Renamed_Entity;
4959 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
4961 pragma Assert (Ekind (Id) = E_Package);
4962 Set_Flag231 (Id, V);
4963 end Set_Renamed_In_Spec;
4965 procedure Set_Renamed_Object (Id : E; V : N) is
4968 end Set_Renamed_Object;
4970 procedure Set_Renaming_Map (Id : E; V : U) is
4973 end Set_Renaming_Map;
4975 procedure Set_Requires_Overriding (Id : E; V : B := True) is
4977 pragma Assert (Is_Overloadable (Id));
4978 Set_Flag213 (Id, V);
4979 end Set_Requires_Overriding;
4981 procedure Set_Return_Present (Id : E; V : B := True) is
4984 end Set_Return_Present;
4986 procedure Set_Return_Applies_To (Id : E; V : N) is
4989 end Set_Return_Applies_To;
4991 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
4994 end Set_Returns_By_Ref;
4996 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
4999 (Is_Record_Type (Id) and then Id = Base_Type (Id));
5000 Set_Flag164 (Id, V);
5001 end Set_Reverse_Bit_Order;
5003 procedure Set_RM_Size (Id : E; V : U) is
5005 pragma Assert (Is_Type (Id));
5009 procedure Set_Scalar_Range (Id : E; V : N) is
5012 end Set_Scalar_Range;
5014 procedure Set_Scale_Value (Id : E; V : U) is
5017 end Set_Scale_Value;
5019 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5021 pragma Assert (not Is_Record_Type (Id));
5023 end Set_Scope_Depth_Value;
5025 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5027 Set_Flag167 (Id, V);
5028 end Set_Sec_Stack_Needed_For_Return;
5030 procedure Set_Shadow_Entities (Id : E; V : S) is
5032 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5034 end Set_Shadow_Entities;
5036 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5038 pragma Assert (Ekind (Id) = E_Variable);
5040 end Set_Shared_Var_Procs_Instance;
5042 procedure Set_Size_Check_Code (Id : E; V : N) is
5044 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5046 end Set_Size_Check_Code;
5048 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5050 Set_Flag177 (Id, V);
5051 end Set_Size_Depends_On_Discriminant;
5053 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5056 end Set_Size_Known_At_Compile_Time;
5058 procedure Set_Small_Value (Id : E; V : R) is
5060 pragma Assert (Is_Fixed_Point_Type (Id));
5061 Set_Ureal21 (Id, V);
5062 end Set_Small_Value;
5064 procedure Set_Spec_Entity (Id : E; V : E) is
5066 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5068 end Set_Spec_Entity;
5070 procedure Set_Spec_PPC_List (Id : E; V : N) is
5073 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Void)
5074 or else Is_Subprogram (Id)
5075 or else Is_Generic_Subprogram (Id));
5077 end Set_Spec_PPC_List;
5079 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5081 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5082 pragma Assert (Id = Base_Type (Id));
5084 end Set_Storage_Size_Variable;
5086 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5088 pragma Assert (Ekind (Id) = E_Package);
5090 end Set_Static_Elaboration_Desired;
5092 procedure Set_Static_Initialization (Id : E; V : N) is
5095 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5097 end Set_Static_Initialization;
5099 procedure Set_Stored_Constraint (Id : E; V : L) is
5101 pragma Assert (Nkind (Id) in N_Entity);
5102 Set_Elist23 (Id, V);
5103 end Set_Stored_Constraint;
5105 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5107 pragma Assert (Id = Base_Type (Id));
5108 Set_Flag145 (Id, V);
5109 end Set_Strict_Alignment;
5111 procedure Set_String_Literal_Length (Id : E; V : U) is
5113 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5115 end Set_String_Literal_Length;
5117 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5119 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5121 end Set_String_Literal_Low_Bound;
5123 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5125 Set_Flag148 (Id, V);
5126 end Set_Suppress_Elaboration_Warnings;
5128 procedure Set_Suppress_Init_Proc (Id : E; V : B := True) is
5130 pragma Assert (Id = Base_Type (Id));
5131 Set_Flag105 (Id, V);
5132 end Set_Suppress_Init_Proc;
5134 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5136 Set_Flag165 (Id, V);
5137 end Set_Suppress_Style_Checks;
5139 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5141 Set_Flag217 (Id, V);
5142 end Set_Suppress_Value_Tracking_On_Call;
5144 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5146 pragma Assert (Ekind (Id) in Task_Kind);
5148 end Set_Task_Body_Procedure;
5150 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5153 end Set_Treat_As_Volatile;
5155 procedure Set_Underlying_Full_View (Id : E; V : E) is
5157 pragma Assert (Ekind (Id) in Private_Kind);
5159 end Set_Underlying_Full_View;
5161 procedure Set_Underlying_Record_View (Id : E; V : E) is
5163 pragma Assert (Ekind (Id) = E_Record_Type);
5165 end Set_Underlying_Record_View;
5167 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5169 pragma Assert (Is_Type (Id) and then Id = Base_Type (Id));
5170 Set_Flag216 (Id, V);
5171 end Set_Universal_Aliasing;
5173 procedure Set_Unset_Reference (Id : E; V : N) is
5176 end Set_Unset_Reference;
5178 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5181 end Set_Uses_Sec_Stack;
5183 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5185 Set_Flag222 (Id, V);
5186 end Set_Used_As_Generic_Actual;
5188 procedure Set_Vax_Float (Id : E; V : B := True) is
5190 pragma Assert (Id = Base_Type (Id));
5191 Set_Flag151 (Id, V);
5194 procedure Set_Warnings_Off (Id : E; V : B := True) is
5197 end Set_Warnings_Off;
5199 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
5201 Set_Flag236 (Id, V);
5202 end Set_Warnings_Off_Used;
5204 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
5206 Set_Flag237 (Id, V);
5207 end Set_Warnings_Off_Used_Unmodified;
5209 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
5211 Set_Flag238 (Id, V);
5212 end Set_Warnings_Off_Used_Unreferenced;
5214 procedure Set_Was_Hidden (Id : E; V : B := True) is
5216 Set_Flag196 (Id, V);
5219 procedure Set_Wrapped_Entity (Id : E; V : E) is
5221 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5222 and then Is_Primitive_Wrapper (Id));
5224 end Set_Wrapped_Entity;
5226 -----------------------------------
5227 -- Field Initialization Routines --
5228 -----------------------------------
5230 procedure Init_Alignment (Id : E) is
5232 Set_Uint14 (Id, Uint_0);
5235 procedure Init_Alignment (Id : E; V : Int) is
5237 Set_Uint14 (Id, UI_From_Int (V));
5240 procedure Init_Component_Bit_Offset (Id : E) is
5242 Set_Uint11 (Id, No_Uint);
5243 end Init_Component_Bit_Offset;
5245 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
5247 Set_Uint11 (Id, UI_From_Int (V));
5248 end Init_Component_Bit_Offset;
5250 procedure Init_Component_Size (Id : E) is
5252 Set_Uint22 (Id, Uint_0);
5253 end Init_Component_Size;
5255 procedure Init_Component_Size (Id : E; V : Int) is
5257 Set_Uint22 (Id, UI_From_Int (V));
5258 end Init_Component_Size;
5260 procedure Init_Digits_Value (Id : E) is
5262 Set_Uint17 (Id, Uint_0);
5263 end Init_Digits_Value;
5265 procedure Init_Digits_Value (Id : E; V : Int) is
5267 Set_Uint17 (Id, UI_From_Int (V));
5268 end Init_Digits_Value;
5270 procedure Init_Esize (Id : E) is
5272 Set_Uint12 (Id, Uint_0);
5275 procedure Init_Esize (Id : E; V : Int) is
5277 Set_Uint12 (Id, UI_From_Int (V));
5280 procedure Init_Normalized_First_Bit (Id : E) is
5282 Set_Uint8 (Id, No_Uint);
5283 end Init_Normalized_First_Bit;
5285 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
5287 Set_Uint8 (Id, UI_From_Int (V));
5288 end Init_Normalized_First_Bit;
5290 procedure Init_Normalized_Position (Id : E) is
5292 Set_Uint14 (Id, No_Uint);
5293 end Init_Normalized_Position;
5295 procedure Init_Normalized_Position (Id : E; V : Int) is
5297 Set_Uint14 (Id, UI_From_Int (V));
5298 end Init_Normalized_Position;
5300 procedure Init_Normalized_Position_Max (Id : E) is
5302 Set_Uint10 (Id, No_Uint);
5303 end Init_Normalized_Position_Max;
5305 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
5307 Set_Uint10 (Id, UI_From_Int (V));
5308 end Init_Normalized_Position_Max;
5310 procedure Init_RM_Size (Id : E) is
5312 Set_Uint13 (Id, Uint_0);
5315 procedure Init_RM_Size (Id : E; V : Int) is
5317 Set_Uint13 (Id, UI_From_Int (V));
5320 -----------------------------
5321 -- Init_Component_Location --
5322 -----------------------------
5324 procedure Init_Component_Location (Id : E) is
5326 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
5327 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
5328 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
5329 Set_Uint12 (Id, Uint_0); -- Esize
5330 Set_Uint14 (Id, No_Uint); -- Normalized_Position
5331 end Init_Component_Location;
5337 procedure Init_Size (Id : E; V : Int) is
5339 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
5340 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
5343 ---------------------
5344 -- Init_Size_Align --
5345 ---------------------
5347 procedure Init_Size_Align (Id : E) is
5349 Set_Uint12 (Id, Uint_0); -- Esize
5350 Set_Uint13 (Id, Uint_0); -- RM_Size
5351 Set_Uint14 (Id, Uint_0); -- Alignment
5352 end Init_Size_Align;
5354 ----------------------------------------------
5355 -- Type Representation Attribute Predicates --
5356 ----------------------------------------------
5358 function Known_Alignment (E : Entity_Id) return B is
5360 return Uint14 (E) /= Uint_0
5361 and then Uint14 (E) /= No_Uint;
5362 end Known_Alignment;
5364 function Known_Component_Bit_Offset (E : Entity_Id) return B is
5366 return Uint11 (E) /= No_Uint;
5367 end Known_Component_Bit_Offset;
5369 function Known_Component_Size (E : Entity_Id) return B is
5371 return Uint22 (Base_Type (E)) /= Uint_0
5372 and then Uint22 (Base_Type (E)) /= No_Uint;
5373 end Known_Component_Size;
5375 function Known_Esize (E : Entity_Id) return B is
5377 return Uint12 (E) /= Uint_0
5378 and then Uint12 (E) /= No_Uint;
5381 function Known_Normalized_First_Bit (E : Entity_Id) return B is
5383 return Uint8 (E) /= No_Uint;
5384 end Known_Normalized_First_Bit;
5386 function Known_Normalized_Position (E : Entity_Id) return B is
5388 return Uint14 (E) /= No_Uint;
5389 end Known_Normalized_Position;
5391 function Known_Normalized_Position_Max (E : Entity_Id) return B is
5393 return Uint10 (E) /= No_Uint;
5394 end Known_Normalized_Position_Max;
5396 function Known_RM_Size (E : Entity_Id) return B is
5398 return Uint13 (E) /= No_Uint
5399 and then (Uint13 (E) /= Uint_0
5400 or else Is_Discrete_Type (E)
5401 or else Is_Fixed_Point_Type (E));
5404 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
5406 return Uint11 (E) /= No_Uint
5407 and then Uint11 (E) >= Uint_0;
5408 end Known_Static_Component_Bit_Offset;
5410 function Known_Static_Component_Size (E : Entity_Id) return B is
5412 return Uint22 (Base_Type (E)) > Uint_0;
5413 end Known_Static_Component_Size;
5415 function Known_Static_Esize (E : Entity_Id) return B is
5417 return Uint12 (E) > Uint_0
5418 and then not Is_Generic_Type (E);
5419 end Known_Static_Esize;
5421 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
5423 return Uint8 (E) /= No_Uint
5424 and then Uint8 (E) >= Uint_0;
5425 end Known_Static_Normalized_First_Bit;
5427 function Known_Static_Normalized_Position (E : Entity_Id) return B is
5429 return Uint14 (E) /= No_Uint
5430 and then Uint14 (E) >= Uint_0;
5431 end Known_Static_Normalized_Position;
5433 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
5435 return Uint10 (E) /= No_Uint
5436 and then Uint10 (E) >= Uint_0;
5437 end Known_Static_Normalized_Position_Max;
5439 function Known_Static_RM_Size (E : Entity_Id) return B is
5441 return (Uint13 (E) > Uint_0
5442 or else Is_Discrete_Type (E)
5443 or else Is_Fixed_Point_Type (E))
5444 and then not Is_Generic_Type (E);
5445 end Known_Static_RM_Size;
5447 function Unknown_Alignment (E : Entity_Id) return B is
5449 return Uint14 (E) = Uint_0
5450 or else Uint14 (E) = No_Uint;
5451 end Unknown_Alignment;
5453 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
5455 return Uint11 (E) = No_Uint;
5456 end Unknown_Component_Bit_Offset;
5458 function Unknown_Component_Size (E : Entity_Id) return B is
5460 return Uint22 (Base_Type (E)) = Uint_0
5462 Uint22 (Base_Type (E)) = No_Uint;
5463 end Unknown_Component_Size;
5465 function Unknown_Esize (E : Entity_Id) return B is
5467 return Uint12 (E) = No_Uint
5469 Uint12 (E) = Uint_0;
5472 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
5474 return Uint8 (E) = No_Uint;
5475 end Unknown_Normalized_First_Bit;
5477 function Unknown_Normalized_Position (E : Entity_Id) return B is
5479 return Uint14 (E) = No_Uint;
5480 end Unknown_Normalized_Position;
5482 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
5484 return Uint10 (E) = No_Uint;
5485 end Unknown_Normalized_Position_Max;
5487 function Unknown_RM_Size (E : Entity_Id) return B is
5489 return (Uint13 (E) = Uint_0
5490 and then not Is_Discrete_Type (E)
5491 and then not Is_Fixed_Point_Type (E))
5492 or else Uint13 (E) = No_Uint;
5493 end Unknown_RM_Size;
5495 --------------------
5496 -- Address_Clause --
5497 --------------------
5499 function Address_Clause (Id : E) return N is
5501 return Rep_Clause (Id, Name_Address);
5508 function Aft_Value (Id : E) return U is
5510 Delta_Val : Ureal := Delta_Value (Id);
5512 while Delta_Val < Ureal_Tenth loop
5513 Delta_Val := Delta_Val * Ureal_10;
5514 Result := Result + 1;
5517 return UI_From_Int (Result);
5520 ----------------------
5521 -- Alignment_Clause --
5522 ----------------------
5524 function Alignment_Clause (Id : E) return N is
5526 return Rep_Clause (Id, Name_Alignment);
5527 end Alignment_Clause;
5533 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
5535 if Last_Entity (V) = Empty then
5536 Set_First_Entity (Id => V, V => Id);
5538 Set_Next_Entity (Last_Entity (V), Id);
5541 Set_Next_Entity (Id, Empty);
5543 Set_Last_Entity (Id => V, V => Id);
5550 function Base_Type (Id : E) return E is
5553 when E_Enumeration_Subtype |
5555 E_Signed_Integer_Subtype |
5556 E_Modular_Integer_Subtype |
5557 E_Floating_Point_Subtype |
5558 E_Ordinary_Fixed_Point_Subtype |
5559 E_Decimal_Fixed_Point_Subtype |
5564 E_Record_Subtype_With_Private |
5565 E_Limited_Private_Subtype |
5567 E_Protected_Subtype |
5569 E_String_Literal_Subtype |
5570 E_Class_Wide_Subtype =>
5578 -------------------------
5579 -- Component_Alignment --
5580 -------------------------
5582 -- Component Alignment is encoded using two flags, Flag128/129 as
5583 -- follows. Note that both flags False = Align_Default, so that the
5584 -- default initialization of flags to False initializes component
5585 -- alignment to the default value as required.
5587 -- Flag128 Flag129 Value
5588 -- ------- ------- -----
5589 -- False False Calign_Default
5590 -- False True Calign_Component_Size
5591 -- True False Calign_Component_Size_4
5592 -- True True Calign_Storage_Unit
5594 function Component_Alignment (Id : E) return C is
5595 BT : constant Node_Id := Base_Type (Id);
5598 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
5600 if Flag128 (BT) then
5601 if Flag129 (BT) then
5602 return Calign_Storage_Unit;
5604 return Calign_Component_Size_4;
5608 if Flag129 (BT) then
5609 return Calign_Component_Size;
5611 return Calign_Default;
5614 end Component_Alignment;
5616 ----------------------
5617 -- Declaration_Node --
5618 ----------------------
5620 function Declaration_Node (Id : E) return N is
5624 if Ekind (Id) = E_Incomplete_Type
5625 and then Present (Full_View (Id))
5627 P := Parent (Full_View (Id));
5633 if Nkind (P) /= N_Selected_Component
5634 and then Nkind (P) /= N_Expanded_Name
5636 not (Nkind (P) = N_Defining_Program_Unit_Name
5637 and then Is_Child_Unit (Id))
5644 end Declaration_Node;
5646 ---------------------
5647 -- Designated_Type --
5648 ---------------------
5650 function Designated_Type (Id : E) return E is
5654 Desig_Type := Directly_Designated_Type (Id);
5656 if Ekind (Desig_Type) = E_Incomplete_Type
5657 and then Present (Full_View (Desig_Type))
5659 return Full_View (Desig_Type);
5661 elsif Is_Class_Wide_Type (Desig_Type)
5662 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
5663 and then Present (Full_View (Etype (Desig_Type)))
5664 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
5666 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
5671 end Designated_Type;
5673 ----------------------
5674 -- Entry_Index_Type --
5675 ----------------------
5677 function Entry_Index_Type (Id : E) return N is
5679 pragma Assert (Ekind (Id) = E_Entry_Family);
5680 return Etype (Discrete_Subtype_Definition (Parent (Id)));
5681 end Entry_Index_Type;
5683 ---------------------
5684 -- First_Component --
5685 ---------------------
5687 function First_Component (Id : E) return E is
5692 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5694 Comp_Id := First_Entity (Id);
5695 while Present (Comp_Id) loop
5696 exit when Ekind (Comp_Id) = E_Component;
5697 Comp_Id := Next_Entity (Comp_Id);
5701 end First_Component;
5703 -------------------------------------
5704 -- First_Component_Or_Discriminant --
5705 -------------------------------------
5707 function First_Component_Or_Discriminant (Id : E) return E is
5712 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
5714 Comp_Id := First_Entity (Id);
5715 while Present (Comp_Id) loop
5716 exit when Ekind (Comp_Id) = E_Component
5718 Ekind (Comp_Id) = E_Discriminant;
5719 Comp_Id := Next_Entity (Comp_Id);
5723 end First_Component_Or_Discriminant;
5729 function First_Formal (Id : E) return E is
5734 (Is_Overloadable (Id)
5735 or else Ekind_In (Id, E_Entry_Family,
5737 E_Subprogram_Type));
5739 if Ekind (Id) = E_Enumeration_Literal then
5743 Formal := First_Entity (Id);
5745 if Present (Formal) and then Is_Formal (Formal) then
5753 ------------------------------
5754 -- First_Formal_With_Extras --
5755 ------------------------------
5757 function First_Formal_With_Extras (Id : E) return E is
5762 (Is_Overloadable (Id)
5763 or else Ekind_In (Id, E_Entry_Family,
5765 E_Subprogram_Type));
5767 if Ekind (Id) = E_Enumeration_Literal then
5771 Formal := First_Entity (Id);
5773 if Present (Formal) and then Is_Formal (Formal) then
5776 return Extra_Formals (Id); -- Empty if no extra formals
5779 end First_Formal_With_Extras;
5781 -------------------------------------
5782 -- Get_Attribute_Definition_Clause --
5783 -------------------------------------
5785 function Get_Attribute_Definition_Clause
5787 Id : Attribute_Id) return Node_Id
5792 N := First_Rep_Item (E);
5793 while Present (N) loop
5794 if Nkind (N) = N_Attribute_Definition_Clause
5795 and then Get_Attribute_Id (Chars (N)) = Id
5804 end Get_Attribute_Definition_Clause;
5810 function Get_Full_View (T : Entity_Id) return Entity_Id is
5812 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
5813 return Full_View (T);
5815 elsif Is_Class_Wide_Type (T)
5816 and then Ekind (Root_Type (T)) = E_Incomplete_Type
5817 and then Present (Full_View (Root_Type (T)))
5819 return Class_Wide_Type (Full_View (Root_Type (T)));
5826 --------------------------------------
5827 -- Get_Record_Representation_Clause --
5828 --------------------------------------
5830 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
5834 N := First_Rep_Item (E);
5835 while Present (N) loop
5836 if Nkind (N) = N_Record_Representation_Clause then
5844 end Get_Record_Representation_Clause;
5846 -----------------------------
5847 -- Get_Rep_Item_For_Entity --
5848 -----------------------------
5850 function Get_Rep_Item_For_Entity
5852 Nam : Name_Id) return Node_Id
5858 N := First_Rep_Item (E);
5859 while Present (N) loop
5860 if Nkind (N) = N_Pragma and then Pragma_Name (N) = Nam then
5861 Arg := Get_Pragma_Arg (First (Pragma_Argument_Associations (N)));
5863 if Is_Entity_Name (Arg) and then Entity (Arg) = E then
5867 elsif Nkind (N) = N_Attribute_Definition_Clause
5868 and then Chars (N) = Nam
5869 and then Entity (N) = E
5873 elsif Nkind (N) = N_Aspect_Specification
5874 and then Chars (Identifier (N)) = Nam
5875 and then Entity (N) = E
5884 end Get_Rep_Item_For_Entity;
5886 --------------------
5887 -- Get_Rep_Pragma --
5888 --------------------
5890 function Get_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Node_Id is
5894 N := First_Rep_Item (E);
5895 while Present (N) loop
5896 if Nkind (N) = N_Pragma and then Pragma_Name (N) = Nam then
5906 ------------------------
5907 -- Has_Attach_Handler --
5908 ------------------------
5910 function Has_Attach_Handler (Id : E) return B is
5914 pragma Assert (Is_Protected_Type (Id));
5916 Ritem := First_Rep_Item (Id);
5917 while Present (Ritem) loop
5918 if Nkind (Ritem) = N_Pragma
5919 and then Pragma_Name (Ritem) = Name_Attach_Handler
5923 Ritem := Next_Rep_Item (Ritem);
5928 end Has_Attach_Handler;
5930 -------------------------------------
5931 -- Has_Attribute_Definition_Clause --
5932 -------------------------------------
5934 function Has_Attribute_Definition_Clause
5936 Id : Attribute_Id) return Boolean
5939 return Present (Get_Attribute_Definition_Clause (E, Id));
5940 end Has_Attribute_Definition_Clause;
5946 function Has_Entries (Id : E) return B is
5950 pragma Assert (Is_Concurrent_Type (Id));
5952 Ent := First_Entity (Id);
5953 while Present (Ent) loop
5954 if Is_Entry (Ent) then
5958 Ent := Next_Entity (Ent);
5964 ----------------------------
5965 -- Has_Foreign_Convention --
5966 ----------------------------
5968 function Has_Foreign_Convention (Id : E) return B is
5970 -- While regular Intrinsics such as the Standard operators fit in the
5971 -- "Ada" convention, those with an Interface_Name materialize GCC
5972 -- builtin imports for which Ada special treatments shouldn't apply.
5974 return Convention (Id) in Foreign_Convention
5975 or else (Convention (Id) = Convention_Intrinsic
5976 and then Present (Interface_Name (Id)));
5977 end Has_Foreign_Convention;
5979 ---------------------------
5980 -- Has_Interrupt_Handler --
5981 ---------------------------
5983 function Has_Interrupt_Handler (Id : E) return B is
5987 pragma Assert (Is_Protected_Type (Id));
5989 Ritem := First_Rep_Item (Id);
5990 while Present (Ritem) loop
5991 if Nkind (Ritem) = N_Pragma
5992 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
5996 Ritem := Next_Rep_Item (Ritem);
6001 end Has_Interrupt_Handler;
6003 --------------------------
6004 -- Has_Private_Ancestor --
6005 --------------------------
6007 function Has_Private_Ancestor (Id : E) return B is
6008 R : constant Entity_Id := Root_Type (Id);
6009 T1 : Entity_Id := Id;
6012 if Is_Private_Type (T1) then
6020 end Has_Private_Ancestor;
6022 --------------------
6023 -- Has_Rep_Pragma --
6024 --------------------
6026 function Has_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Boolean is
6028 return Present (Get_Rep_Pragma (E, Nam));
6031 --------------------
6032 -- Has_Unmodified --
6033 --------------------
6035 function Has_Unmodified (E : Entity_Id) return Boolean is
6037 if Has_Pragma_Unmodified (E) then
6039 elsif Warnings_Off (E) then
6040 Set_Warnings_Off_Used_Unmodified (E);
6047 ---------------------
6048 -- Has_Unreferenced --
6049 ---------------------
6051 function Has_Unreferenced (E : Entity_Id) return Boolean is
6053 if Has_Pragma_Unreferenced (E) then
6055 elsif Warnings_Off (E) then
6056 Set_Warnings_Off_Used_Unreferenced (E);
6061 end Has_Unreferenced;
6063 ----------------------
6064 -- Has_Warnings_Off --
6065 ----------------------
6067 function Has_Warnings_Off (E : Entity_Id) return Boolean is
6069 if Warnings_Off (E) then
6070 Set_Warnings_Off_Used (E);
6075 end Has_Warnings_Off;
6077 ------------------------------
6078 -- Implementation_Base_Type --
6079 ------------------------------
6081 function Implementation_Base_Type (Id : E) return E is
6086 Bastyp := Base_Type (Id);
6088 if Is_Incomplete_Or_Private_Type (Bastyp) then
6089 Imptyp := Underlying_Type (Bastyp);
6091 -- If we have an implementation type, then just return it,
6092 -- otherwise we return the Base_Type anyway. This can only
6093 -- happen in error situations and should avoid some error bombs.
6095 if Present (Imptyp) then
6096 return Base_Type (Imptyp);
6104 end Implementation_Base_Type;
6106 ---------------------
6107 -- Is_Boolean_Type --
6108 ---------------------
6110 function Is_Boolean_Type (Id : E) return B is
6112 return Root_Type (Id) = Standard_Boolean;
6113 end Is_Boolean_Type;
6115 ------------------------
6116 -- Is_Constant_Object --
6117 ------------------------
6119 function Is_Constant_Object (Id : E) return B is
6120 K : constant Entity_Kind := Ekind (Id);
6123 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
6124 end Is_Constant_Object;
6126 --------------------
6127 -- Is_Discriminal --
6128 --------------------
6130 function Is_Discriminal (Id : E) return B is
6132 return (Ekind_In (Id, E_Constant, E_In_Parameter)
6133 and then Present (Discriminal_Link (Id)));
6136 ----------------------
6137 -- Is_Dynamic_Scope --
6138 ----------------------
6140 function Is_Dynamic_Scope (Id : E) return B is
6143 Ekind (Id) = E_Block
6145 Ekind (Id) = E_Function
6147 Ekind (Id) = E_Procedure
6149 Ekind (Id) = E_Subprogram_Body
6151 Ekind (Id) = E_Task_Type
6153 (Ekind (Id) = E_Limited_Private_Type
6154 and then Present (Full_View (Id))
6155 and then Ekind (Full_View (Id)) = E_Task_Type)
6157 Ekind (Id) = E_Entry
6159 Ekind (Id) = E_Entry_Family
6161 Ekind (Id) = E_Return_Statement;
6162 end Is_Dynamic_Scope;
6164 --------------------
6165 -- Is_Entity_Name --
6166 --------------------
6168 function Is_Entity_Name (N : Node_Id) return Boolean is
6169 Kind : constant Node_Kind := Nkind (N);
6172 -- Identifiers, operator symbols, expanded names are entity names
6174 return Kind = N_Identifier
6175 or else Kind = N_Operator_Symbol
6176 or else Kind = N_Expanded_Name
6178 -- Attribute references are entity names if they refer to an entity.
6179 -- Note that we don't do this by testing for the presence of the
6180 -- Entity field in the N_Attribute_Reference node, since it may not
6181 -- have been set yet.
6183 or else (Kind = N_Attribute_Reference
6184 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
6187 -----------------------------------
6188 -- Is_Package_Or_Generic_Package --
6189 -----------------------------------
6191 function Is_Package_Or_Generic_Package (Id : E) return B is
6194 Ekind (Id) = E_Package
6196 Ekind (Id) = E_Generic_Package;
6197 end Is_Package_Or_Generic_Package;
6203 function Is_Prival (Id : E) return B is
6205 return (Ekind_In (Id, E_Constant, E_Variable)
6206 and then Present (Prival_Link (Id)));
6209 ----------------------------
6210 -- Is_Protected_Component --
6211 ----------------------------
6213 function Is_Protected_Component (Id : E) return B is
6215 return Ekind (Id) = E_Component
6216 and then Is_Protected_Type (Scope (Id));
6217 end Is_Protected_Component;
6219 ----------------------------
6220 -- Is_Protected_Interface --
6221 ----------------------------
6223 function Is_Protected_Interface (Id : E) return B is
6224 Typ : constant Entity_Id := Base_Type (Id);
6226 if not Is_Interface (Typ) then
6228 elsif Is_Class_Wide_Type (Typ) then
6229 return Is_Protected_Interface (Etype (Typ));
6231 return Protected_Present (Type_Definition (Parent (Typ)));
6233 end Is_Protected_Interface;
6235 ------------------------------
6236 -- Is_Protected_Record_Type --
6237 ------------------------------
6239 function Is_Protected_Record_Type (Id : E) return B is
6242 Is_Concurrent_Record_Type (Id)
6243 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
6244 end Is_Protected_Record_Type;
6246 --------------------------------
6247 -- Is_Standard_Character_Type --
6248 --------------------------------
6250 function Is_Standard_Character_Type (Id : E) return B is
6252 if Is_Type (Id) then
6254 R : constant Entity_Id := Root_Type (Id);
6257 R = Standard_Character
6259 R = Standard_Wide_Character
6261 R = Standard_Wide_Wide_Character;
6267 end Is_Standard_Character_Type;
6269 --------------------
6270 -- Is_String_Type --
6271 --------------------
6273 function Is_String_Type (Id : E) return B is
6275 return Ekind (Id) in String_Kind
6276 or else (Is_Array_Type (Id)
6277 and then Id /= Any_Composite
6278 and then Number_Dimensions (Id) = 1
6279 and then Is_Character_Type (Component_Type (Id)));
6282 -------------------------------
6283 -- Is_Synchronized_Interface --
6284 -------------------------------
6286 function Is_Synchronized_Interface (Id : E) return B is
6287 Typ : constant Entity_Id := Base_Type (Id);
6290 if not Is_Interface (Typ) then
6293 elsif Is_Class_Wide_Type (Typ) then
6294 return Is_Synchronized_Interface (Etype (Typ));
6297 return Protected_Present (Type_Definition (Parent (Typ)))
6298 or else Synchronized_Present (Type_Definition (Parent (Typ)))
6299 or else Task_Present (Type_Definition (Parent (Typ)));
6301 end Is_Synchronized_Interface;
6303 -----------------------
6304 -- Is_Task_Interface --
6305 -----------------------
6307 function Is_Task_Interface (Id : E) return B is
6308 Typ : constant Entity_Id := Base_Type (Id);
6310 if not Is_Interface (Typ) then
6312 elsif Is_Class_Wide_Type (Typ) then
6313 return Is_Task_Interface (Etype (Typ));
6315 return Task_Present (Type_Definition (Parent (Typ)));
6317 end Is_Task_Interface;
6319 -------------------------
6320 -- Is_Task_Record_Type --
6321 -------------------------
6323 function Is_Task_Record_Type (Id : E) return B is
6326 Is_Concurrent_Record_Type (Id)
6327 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
6328 end Is_Task_Record_Type;
6330 ------------------------
6331 -- Is_Wrapper_Package --
6332 ------------------------
6334 function Is_Wrapper_Package (Id : E) return B is
6336 return (Ekind (Id) = E_Package
6337 and then Present (Related_Instance (Id)));
6338 end Is_Wrapper_Package;
6344 function Last_Formal (Id : E) return E is
6349 (Is_Overloadable (Id)
6350 or else Ekind_In (Id, E_Entry_Family,
6352 E_Subprogram_Type));
6354 if Ekind (Id) = E_Enumeration_Literal then
6358 Formal := First_Formal (Id);
6360 if Present (Formal) then
6361 while Present (Next_Formal (Formal)) loop
6362 Formal := Next_Formal (Formal);
6370 --------------------
6371 -- Next_Component --
6372 --------------------
6374 function Next_Component (Id : E) return E is
6378 Comp_Id := Next_Entity (Id);
6379 while Present (Comp_Id) loop
6380 exit when Ekind (Comp_Id) = E_Component;
6381 Comp_Id := Next_Entity (Comp_Id);
6387 ------------------------------------
6388 -- Next_Component_Or_Discriminant --
6389 ------------------------------------
6391 function Next_Component_Or_Discriminant (Id : E) return E is
6395 Comp_Id := Next_Entity (Id);
6396 while Present (Comp_Id) loop
6397 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6398 Comp_Id := Next_Entity (Comp_Id);
6402 end Next_Component_Or_Discriminant;
6404 -----------------------
6405 -- Next_Discriminant --
6406 -----------------------
6408 -- This function actually implements both Next_Discriminant and
6409 -- Next_Stored_Discriminant by making sure that the Discriminant
6410 -- returned is of the same variety as Id.
6412 function Next_Discriminant (Id : E) return E is
6414 -- Derived Tagged types with private extensions look like this...
6416 -- E_Discriminant d1
6417 -- E_Discriminant d2
6419 -- E_Discriminant d1
6420 -- E_Discriminant d2
6423 -- so it is critical not to go past the leading discriminants
6428 pragma Assert (Ekind (Id) = E_Discriminant);
6431 D := Next_Entity (D);
6433 or else (Ekind (D) /= E_Discriminant
6434 and then not Is_Itype (D))
6439 exit when Ekind (D) = E_Discriminant
6440 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
6444 end Next_Discriminant;
6450 function Next_Formal (Id : E) return E is
6454 -- Follow the chain of declared entities as long as the kind of the
6455 -- entity corresponds to a formal parameter. Skip internal entities
6456 -- that may have been created for implicit subtypes, in the process
6457 -- of analyzing default expressions.
6462 P := Next_Entity (P);
6464 if No (P) or else Is_Formal (P) then
6466 elsif not Is_Internal (P) then
6472 -----------------------------
6473 -- Next_Formal_With_Extras --
6474 -----------------------------
6476 function Next_Formal_With_Extras (Id : E) return E is
6478 if Present (Extra_Formal (Id)) then
6479 return Extra_Formal (Id);
6481 return Next_Formal (Id);
6483 end Next_Formal_With_Extras;
6489 function Next_Index (Id : Node_Id) return Node_Id is
6498 function Next_Literal (Id : E) return E is
6500 pragma Assert (Nkind (Id) in N_Entity);
6504 ------------------------------
6505 -- Next_Stored_Discriminant --
6506 ------------------------------
6508 function Next_Stored_Discriminant (Id : E) return E is
6510 -- See comment in Next_Discriminant
6512 return Next_Discriminant (Id);
6513 end Next_Stored_Discriminant;
6515 -----------------------
6516 -- Number_Dimensions --
6517 -----------------------
6519 function Number_Dimensions (Id : E) return Pos is
6524 if Ekind (Id) in String_Kind then
6529 T := First_Index (Id);
6530 while Present (T) loop
6537 end Number_Dimensions;
6539 --------------------
6540 -- Number_Entries --
6541 --------------------
6543 function Number_Entries (Id : E) return Nat is
6548 pragma Assert (Is_Concurrent_Type (Id));
6551 Ent := First_Entity (Id);
6552 while Present (Ent) loop
6553 if Is_Entry (Ent) then
6557 Ent := Next_Entity (Ent);
6563 --------------------
6564 -- Number_Formals --
6565 --------------------
6567 function Number_Formals (Id : E) return Pos is
6573 Formal := First_Formal (Id);
6574 while Present (Formal) loop
6576 Formal := Next_Formal (Formal);
6582 --------------------
6583 -- Parameter_Mode --
6584 --------------------
6586 function Parameter_Mode (Id : E) return Formal_Kind is
6591 --------------------------
6592 -- Primitive_Operations --
6593 --------------------------
6595 function Primitive_Operations (Id : E) return L is
6597 if Is_Concurrent_Type (Id) then
6598 if Present (Corresponding_Record_Type (Id)) then
6599 return Direct_Primitive_Operations
6600 (Corresponding_Record_Type (Id));
6605 return Direct_Primitive_Operations (Id);
6607 end Primitive_Operations;
6609 ---------------------
6610 -- Record_Rep_Item --
6611 ---------------------
6613 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
6615 Set_Next_Rep_Item (N, First_Rep_Item (E));
6616 Set_First_Rep_Item (E, N);
6617 end Record_Rep_Item;
6623 function Root_Type (Id : E) return E is
6627 pragma Assert (Nkind (Id) in N_Entity);
6629 T := Base_Type (Id);
6631 if Ekind (T) = E_Class_Wide_Type then
6634 elsif Ekind (T) = E_Class_Wide_Subtype then
6635 return Etype (Base_Type (T));
6637 -- ??? T comes from Base_Type, how can it be a subtype?
6638 -- Also Base_Type is supposed to be idempotent, so either way
6639 -- this is equivalent to "return Etype (T)" and should be merged
6640 -- with the E_Class_Wide_Type case.
6651 -- Following test catches some error cases resulting from
6654 elsif No (Etyp) then
6657 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
6660 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
6666 -- Return if there is a circularity in the inheritance chain. This
6667 -- happens in some error situations and we do not want to get
6668 -- stuck in this loop.
6670 if T = Base_Type (Id) then
6681 function Scope_Depth (Id : E) return Uint is
6686 while Is_Record_Type (Scop) loop
6687 Scop := Scope (Scop);
6690 return Scope_Depth_Value (Scop);
6693 ---------------------
6694 -- Scope_Depth_Set --
6695 ---------------------
6697 function Scope_Depth_Set (Id : E) return B is
6699 return not Is_Record_Type (Id)
6700 and then Field22 (Id) /= Union_Id (Empty);
6701 end Scope_Depth_Set;
6703 -----------------------------
6704 -- Set_Component_Alignment --
6705 -----------------------------
6707 -- Component Alignment is encoded using two flags, Flag128/129 as
6708 -- follows. Note that both flags False = Align_Default, so that the
6709 -- default initialization of flags to False initializes component
6710 -- alignment to the default value as required.
6712 -- Flag128 Flag129 Value
6713 -- ------- ------- -----
6714 -- False False Calign_Default
6715 -- False True Calign_Component_Size
6716 -- True False Calign_Component_Size_4
6717 -- True True Calign_Storage_Unit
6719 procedure Set_Component_Alignment (Id : E; V : C) is
6721 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
6722 and then Id = Base_Type (Id));
6725 when Calign_Default =>
6726 Set_Flag128 (Id, False);
6727 Set_Flag129 (Id, False);
6729 when Calign_Component_Size =>
6730 Set_Flag128 (Id, False);
6731 Set_Flag129 (Id, True);
6733 when Calign_Component_Size_4 =>
6734 Set_Flag128 (Id, True);
6735 Set_Flag129 (Id, False);
6737 when Calign_Storage_Unit =>
6738 Set_Flag128 (Id, True);
6739 Set_Flag129 (Id, True);
6741 end Set_Component_Alignment;
6747 function Size_Clause (Id : E) return N is
6749 return Rep_Clause (Id, Name_Size);
6752 ------------------------
6753 -- Stream_Size_Clause --
6754 ------------------------
6756 function Stream_Size_Clause (Id : E) return N is
6758 return Rep_Clause (Id, Name_Stream_Size);
6759 end Stream_Size_Clause;
6765 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
6771 Kind := E_Access_Subtype;
6775 Kind := E_Array_Subtype;
6777 when E_Class_Wide_Type |
6778 E_Class_Wide_Subtype =>
6779 Kind := E_Class_Wide_Subtype;
6781 when E_Decimal_Fixed_Point_Type |
6782 E_Decimal_Fixed_Point_Subtype =>
6783 Kind := E_Decimal_Fixed_Point_Subtype;
6785 when E_Ordinary_Fixed_Point_Type |
6786 E_Ordinary_Fixed_Point_Subtype =>
6787 Kind := E_Ordinary_Fixed_Point_Subtype;
6789 when E_Private_Type |
6790 E_Private_Subtype =>
6791 Kind := E_Private_Subtype;
6793 when E_Limited_Private_Type |
6794 E_Limited_Private_Subtype =>
6795 Kind := E_Limited_Private_Subtype;
6797 when E_Record_Type_With_Private |
6798 E_Record_Subtype_With_Private =>
6799 Kind := E_Record_Subtype_With_Private;
6801 when E_Record_Type |
6803 Kind := E_Record_Subtype;
6805 when E_String_Type |
6807 Kind := E_String_Subtype;
6809 when Enumeration_Kind =>
6810 Kind := E_Enumeration_Subtype;
6813 Kind := E_Floating_Point_Subtype;
6815 when Signed_Integer_Kind =>
6816 Kind := E_Signed_Integer_Subtype;
6818 when Modular_Integer_Kind =>
6819 Kind := E_Modular_Integer_Subtype;
6821 when Protected_Kind =>
6822 Kind := E_Protected_Subtype;
6825 Kind := E_Task_Subtype;
6829 raise Program_Error;
6835 ---------------------
6836 -- Type_High_Bound --
6837 ---------------------
6839 function Type_High_Bound (Id : E) return Node_Id is
6840 Rng : constant Node_Id := Scalar_Range (Id);
6842 if Nkind (Rng) = N_Subtype_Indication then
6843 return High_Bound (Range_Expression (Constraint (Rng)));
6845 return High_Bound (Rng);
6847 end Type_High_Bound;
6849 --------------------
6850 -- Type_Low_Bound --
6851 --------------------
6853 function Type_Low_Bound (Id : E) return Node_Id is
6854 Rng : constant Node_Id := Scalar_Range (Id);
6856 if Nkind (Rng) = N_Subtype_Indication then
6857 return Low_Bound (Range_Expression (Constraint (Rng)));
6859 return Low_Bound (Rng);
6863 ---------------------
6864 -- Underlying_Type --
6865 ---------------------
6867 function Underlying_Type (Id : E) return E is
6869 -- For record_with_private the underlying type is always the direct
6870 -- full view. Never try to take the full view of the parent it
6871 -- doesn't make sense.
6873 if Ekind (Id) = E_Record_Type_With_Private then
6874 return Full_View (Id);
6876 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
6878 -- If we have an incomplete or private type with a full view,
6879 -- then we return the Underlying_Type of this full view
6881 if Present (Full_View (Id)) then
6882 if Id = Full_View (Id) then
6884 -- Previous error in declaration
6889 return Underlying_Type (Full_View (Id));
6892 -- If we have an incomplete entity that comes from the limited
6893 -- view then we return the Underlying_Type of its non-limited
6896 elsif From_With_Type (Id)
6897 and then Present (Non_Limited_View (Id))
6899 return Underlying_Type (Non_Limited_View (Id));
6901 -- Otherwise check for the case where we have a derived type or
6902 -- subtype, and if so get the Underlying_Type of the parent type.
6904 elsif Etype (Id) /= Id then
6905 return Underlying_Type (Etype (Id));
6907 -- Otherwise we have an incomplete or private type that has
6908 -- no full view, which means that we have not encountered the
6909 -- completion, so return Empty to indicate the underlying type
6910 -- is not yet known.
6916 -- For non-incomplete, non-private types, return the type itself
6917 -- Also for entities that are not types at all return the entity
6923 end Underlying_Type;
6925 ------------------------
6926 -- Write_Entity_Flags --
6927 ------------------------
6929 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
6931 procedure W (Flag_Name : String; Flag : Boolean);
6932 -- Write out given flag if it is set
6938 procedure W (Flag_Name : String; Flag : Boolean) is
6942 Write_Str (Flag_Name);
6943 Write_Str (" = True");
6948 -- Start of processing for Write_Entity_Flags
6951 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
6952 and then Id = Base_Type (Id)
6955 Write_Str ("Component_Alignment = ");
6957 case Component_Alignment (Id) is
6958 when Calign_Default =>
6959 Write_Str ("Calign_Default");
6961 when Calign_Component_Size =>
6962 Write_Str ("Calign_Component_Size");
6964 when Calign_Component_Size_4 =>
6965 Write_Str ("Calign_Component_Size_4");
6967 when Calign_Storage_Unit =>
6968 Write_Str ("Calign_Storage_Unit");
6974 W ("Address_Taken", Flag104 (Id));
6975 W ("Body_Needed_For_SAL", Flag40 (Id));
6976 W ("C_Pass_By_Copy", Flag125 (Id));
6977 W ("Can_Never_Be_Null", Flag38 (Id));
6978 W ("Checks_May_Be_Suppressed", Flag31 (Id));
6979 W ("Debug_Info_Off", Flag166 (Id));
6980 W ("Default_Expressions_Processed", Flag108 (Id));
6981 W ("Delay_Cleanups", Flag114 (Id));
6982 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
6983 W ("Depends_On_Private", Flag14 (Id));
6984 W ("Discard_Names", Flag88 (Id));
6985 W ("Elaboration_Entity_Required", Flag174 (Id));
6986 W ("Elaborate_Body_Desirable", Flag210 (Id));
6987 W ("Entry_Accepted", Flag152 (Id));
6988 W ("Can_Use_Internal_Rep", Flag229 (Id));
6989 W ("Finalize_Storage_Only", Flag158 (Id));
6990 W ("From_With_Type", Flag159 (Id));
6991 W ("Has_Aliased_Components", Flag135 (Id));
6992 W ("Has_Alignment_Clause", Flag46 (Id));
6993 W ("Has_All_Calls_Remote", Flag79 (Id));
6994 W ("Has_Anon_Block_Suffix", Flag201 (Id));
6995 W ("Has_Atomic_Components", Flag86 (Id));
6996 W ("Has_Biased_Representation", Flag139 (Id));
6997 W ("Has_Completion", Flag26 (Id));
6998 W ("Has_Completion_In_Body", Flag71 (Id));
6999 W ("Has_Complex_Representation", Flag140 (Id));
7000 W ("Has_Component_Size_Clause", Flag68 (Id));
7001 W ("Has_Contiguous_Rep", Flag181 (Id));
7002 W ("Has_Controlled_Component", Flag43 (Id));
7003 W ("Has_Controlling_Result", Flag98 (Id));
7004 W ("Has_Convention_Pragma", Flag119 (Id));
7005 W ("Has_Delayed_Aspects", Flag200 (Id));
7006 W ("Has_Delayed_Freeze", Flag18 (Id));
7007 W ("Has_Discriminants", Flag5 (Id));
7008 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
7009 W ("Has_Exit", Flag47 (Id));
7010 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
7011 W ("Has_Forward_Instantiation", Flag175 (Id));
7012 W ("Has_Fully_Qualified_Name", Flag173 (Id));
7013 W ("Has_Gigi_Rep_Item", Flag82 (Id));
7014 W ("Has_Homonym", Flag56 (Id));
7015 W ("Has_Initial_Value", Flag219 (Id));
7016 W ("Has_Machine_Radix_Clause", Flag83 (Id));
7017 W ("Has_Master_Entity", Flag21 (Id));
7018 W ("Has_Missing_Return", Flag142 (Id));
7019 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
7020 W ("Has_Non_Standard_Rep", Flag75 (Id));
7021 W ("Has_Object_Size_Clause", Flag172 (Id));
7022 W ("Has_Per_Object_Constraint", Flag154 (Id));
7023 W ("Has_Persistent_BSS", Flag188 (Id));
7024 W ("Has_Postconditions", Flag240 (Id));
7025 W ("Has_Pragma_Controlled", Flag27 (Id));
7026 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
7027 W ("Has_Pragma_Inline", Flag157 (Id));
7028 W ("Has_Pragma_Inline_Always", Flag230 (Id));
7029 W ("Has_Pragma_Ordered", Flag198 (Id));
7030 W ("Has_Pragma_Pack", Flag121 (Id));
7031 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
7032 W ("Has_Pragma_Pure", Flag203 (Id));
7033 W ("Has_Pragma_Pure_Function", Flag179 (Id));
7034 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
7035 W ("Has_Pragma_Unmodified", Flag233 (Id));
7036 W ("Has_Pragma_Unreferenced", Flag180 (Id));
7037 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
7038 W ("Has_Primitive_Operations", Flag120 (Id));
7039 W ("Has_Private_Declaration", Flag155 (Id));
7040 W ("Has_Qualified_Name", Flag161 (Id));
7041 W ("Has_RACW", Flag214 (Id));
7042 W ("Has_Record_Rep_Clause", Flag65 (Id));
7043 W ("Has_Recursive_Call", Flag143 (Id));
7044 W ("Has_Size_Clause", Flag29 (Id));
7045 W ("Has_Small_Clause", Flag67 (Id));
7046 W ("Has_Specified_Layout", Flag100 (Id));
7047 W ("Has_Specified_Stream_Input", Flag190 (Id));
7048 W ("Has_Specified_Stream_Output", Flag191 (Id));
7049 W ("Has_Specified_Stream_Read", Flag192 (Id));
7050 W ("Has_Specified_Stream_Write", Flag193 (Id));
7051 W ("Has_Static_Discriminants", Flag211 (Id));
7052 W ("Has_Storage_Size_Clause", Flag23 (Id));
7053 W ("Has_Stream_Size_Clause", Flag184 (Id));
7054 W ("Has_Subprogram_Descriptor", Flag93 (Id));
7055 W ("Has_Task", Flag30 (Id));
7056 W ("Has_Thunks", Flag228 (Id));
7057 W ("Has_Unchecked_Union", Flag123 (Id));
7058 W ("Has_Unknown_Discriminants", Flag72 (Id));
7059 W ("Has_Up_Level_Access", Flag215 (Id));
7060 W ("Has_Volatile_Components", Flag87 (Id));
7061 W ("Has_Xref_Entry", Flag182 (Id));
7062 W ("In_Package_Body", Flag48 (Id));
7063 W ("In_Private_Part", Flag45 (Id));
7064 W ("In_Use", Flag8 (Id));
7065 W ("Is_AST_Entry", Flag132 (Id));
7066 W ("Is_Abstract_Subprogram", Flag19 (Id));
7067 W ("Is_Abstract_Type", Flag146 (Id));
7068 W ("Is_Local_Anonymous_Access", Flag194 (Id));
7069 W ("Is_Access_Constant", Flag69 (Id));
7070 W ("Is_Ada_2005_Only", Flag185 (Id));
7071 W ("Is_Ada_2012_Only", Flag199 (Id));
7072 W ("Is_Aliased", Flag15 (Id));
7073 W ("Is_Asynchronous", Flag81 (Id));
7074 W ("Is_Atomic", Flag85 (Id));
7075 W ("Is_Bit_Packed_Array", Flag122 (Id));
7076 W ("Is_CPP_Class", Flag74 (Id));
7077 W ("Is_Called", Flag102 (Id));
7078 W ("Is_Character_Type", Flag63 (Id));
7079 W ("Is_Child_Unit", Flag73 (Id));
7080 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
7081 W ("Is_Compilation_Unit", Flag149 (Id));
7082 W ("Is_Completely_Hidden", Flag103 (Id));
7083 W ("Is_Concurrent_Record_Type", Flag20 (Id));
7084 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
7085 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
7086 W ("Is_Constrained", Flag12 (Id));
7087 W ("Is_Constructor", Flag76 (Id));
7088 W ("Is_Controlled", Flag42 (Id));
7089 W ("Is_Controlling_Formal", Flag97 (Id));
7090 W ("Is_Descendent_Of_Address", Flag223 (Id));
7091 W ("Is_Discrim_SO_Function", Flag176 (Id));
7092 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
7093 W ("Is_Dispatching_Operation", Flag6 (Id));
7094 W ("Is_Eliminated", Flag124 (Id));
7095 W ("Is_Entry_Formal", Flag52 (Id));
7096 W ("Is_Exported", Flag99 (Id));
7097 W ("Is_First_Subtype", Flag70 (Id));
7098 W ("Is_For_Access_Subtype", Flag118 (Id));
7099 W ("Is_Formal_Subprogram", Flag111 (Id));
7100 W ("Is_Frozen", Flag4 (Id));
7101 W ("Is_Generic_Actual_Type", Flag94 (Id));
7102 W ("Is_Generic_Instance", Flag130 (Id));
7103 W ("Is_Generic_Type", Flag13 (Id));
7104 W ("Is_Hidden", Flag57 (Id));
7105 W ("Is_Hidden_Open_Scope", Flag171 (Id));
7106 W ("Is_Immediately_Visible", Flag7 (Id));
7107 W ("Is_Imported", Flag24 (Id));
7108 W ("Is_Inlined", Flag11 (Id));
7109 W ("Is_Instantiated", Flag126 (Id));
7110 W ("Is_Interface", Flag186 (Id));
7111 W ("Is_Internal", Flag17 (Id));
7112 W ("Is_Interrupt_Handler", Flag89 (Id));
7113 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
7114 W ("Is_Itype", Flag91 (Id));
7115 W ("Is_Known_Non_Null", Flag37 (Id));
7116 W ("Is_Known_Null", Flag204 (Id));
7117 W ("Is_Known_Valid", Flag170 (Id));
7118 W ("Is_Limited_Composite", Flag106 (Id));
7119 W ("Is_Limited_Interface", Flag197 (Id));
7120 W ("Is_Limited_Record", Flag25 (Id));
7121 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
7122 W ("Is_Non_Static_Subtype", Flag109 (Id));
7123 W ("Is_Null_Init_Proc", Flag178 (Id));
7124 W ("Is_Obsolescent", Flag153 (Id));
7125 W ("Is_Only_Out_Parameter", Flag226 (Id));
7126 W ("Is_Optional_Parameter", Flag134 (Id));
7127 W ("Is_Overriding_Operation", Flag39 (Id));
7128 W ("Is_Package_Body_Entity", Flag160 (Id));
7129 W ("Is_Packed", Flag51 (Id));
7130 W ("Is_Packed_Array_Type", Flag138 (Id));
7131 W ("Is_Potentially_Use_Visible", Flag9 (Id));
7132 W ("Is_Preelaborated", Flag59 (Id));
7133 W ("Is_Primitive", Flag218 (Id));
7134 W ("Is_Primitive_Wrapper", Flag195 (Id));
7135 W ("Is_Private_Composite", Flag107 (Id));
7136 W ("Is_Private_Descendant", Flag53 (Id));
7137 W ("Is_Private_Primitive", Flag245 (Id));
7138 W ("Is_Public", Flag10 (Id));
7139 W ("Is_Pure", Flag44 (Id));
7140 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
7141 W ("Is_RACW_Stub_Type", Flag244 (Id));
7142 W ("Is_Raised", Flag224 (Id));
7143 W ("Is_Remote_Call_Interface", Flag62 (Id));
7144 W ("Is_Remote_Types", Flag61 (Id));
7145 W ("Is_Renaming_Of_Object", Flag112 (Id));
7146 W ("Is_Return_Object", Flag209 (Id));
7147 W ("Is_Shared_Passive", Flag60 (Id));
7148 W ("Is_Statically_Allocated", Flag28 (Id));
7149 W ("Is_Tag", Flag78 (Id));
7150 W ("Is_Tagged_Type", Flag55 (Id));
7151 W ("Is_Thunk", Flag225 (Id));
7152 W ("Is_Trivial_Subprogram", Flag235 (Id));
7153 W ("Is_True_Constant", Flag163 (Id));
7154 W ("Is_Unchecked_Union", Flag117 (Id));
7155 W ("Is_Underlying_Record_View", Flag246 (Id));
7156 W ("Is_Unsigned_Type", Flag144 (Id));
7157 W ("Is_VMS_Exception", Flag133 (Id));
7158 W ("Is_Valued_Procedure", Flag127 (Id));
7159 W ("Is_Visible_Child_Unit", Flag116 (Id));
7160 W ("Is_Visible_Formal", Flag206 (Id));
7161 W ("Is_Volatile", Flag16 (Id));
7162 W ("Itype_Printed", Flag202 (Id));
7163 W ("Kill_Elaboration_Checks", Flag32 (Id));
7164 W ("Kill_Range_Checks", Flag33 (Id));
7165 W ("Kill_Tag_Checks", Flag34 (Id));
7166 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
7167 W ("Low_Bound_Tested", Flag205 (Id));
7168 W ("Machine_Radix_10", Flag84 (Id));
7169 W ("Materialize_Entity", Flag168 (Id));
7170 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
7171 W ("Must_Have_Preelab_Init", Flag208 (Id));
7172 W ("Needs_Debug_Info", Flag147 (Id));
7173 W ("Needs_No_Actuals", Flag22 (Id));
7174 W ("Never_Set_In_Source", Flag115 (Id));
7175 W ("No_Pool_Assigned", Flag131 (Id));
7176 W ("No_Return", Flag113 (Id));
7177 W ("No_Strict_Aliasing", Flag136 (Id));
7178 W ("Non_Binary_Modulus", Flag58 (Id));
7179 W ("Nonzero_Is_True", Flag162 (Id));
7180 W ("OK_To_Rename", Flag247 (Id));
7181 W ("OK_To_Reorder_Components", Flag239 (Id));
7182 W ("Optimize_Alignment_Space", Flag241 (Id));
7183 W ("Optimize_Alignment_Time", Flag242 (Id));
7184 W ("Overlays_Constant", Flag243 (Id));
7185 W ("Reachable", Flag49 (Id));
7186 W ("Referenced", Flag156 (Id));
7187 W ("Referenced_As_LHS", Flag36 (Id));
7188 W ("Referenced_As_Out_Parameter", Flag227 (Id));
7189 W ("Renamed_In_Spec", Flag231 (Id));
7190 W ("Requires_Overriding", Flag213 (Id));
7191 W ("Return_Present", Flag54 (Id));
7192 W ("Returns_By_Ref", Flag90 (Id));
7193 W ("Reverse_Bit_Order", Flag164 (Id));
7194 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
7195 W ("Size_Depends_On_Discriminant", Flag177 (Id));
7196 W ("Size_Known_At_Compile_Time", Flag92 (Id));
7197 W ("Static_Elaboration_Desired", Flag77 (Id));
7198 W ("Strict_Alignment", Flag145 (Id));
7199 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
7200 W ("Suppress_Init_Proc", Flag105 (Id));
7201 W ("Suppress_Style_Checks", Flag165 (Id));
7202 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
7203 W ("Treat_As_Volatile", Flag41 (Id));
7204 W ("Universal_Aliasing", Flag216 (Id));
7205 W ("Used_As_Generic_Actual", Flag222 (Id));
7206 W ("Uses_Sec_Stack", Flag95 (Id));
7207 W ("Vax_Float", Flag151 (Id));
7208 W ("Warnings_Off", Flag96 (Id));
7209 W ("Warnings_Off_Used", Flag236 (Id));
7210 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
7211 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
7212 W ("Was_Hidden", Flag196 (Id));
7213 end Write_Entity_Flags;
7215 -----------------------
7216 -- Write_Entity_Info --
7217 -----------------------
7219 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
7221 procedure Write_Attribute (Which : String; Nam : E);
7222 -- Write attribute value with given string name
7224 procedure Write_Kind (Id : Entity_Id);
7225 -- Write Ekind field of entity
7227 ---------------------
7228 -- Write_Attribute --
7229 ---------------------
7231 procedure Write_Attribute (Which : String; Nam : E) is
7235 Write_Int (Int (Nam));
7237 Write_Name (Chars (Nam));
7239 end Write_Attribute;
7245 procedure Write_Kind (Id : Entity_Id) is
7246 K : constant String := Entity_Kind'Image (Ekind (Id));
7250 Write_Str (" Kind ");
7252 if Is_Type (Id) and then Is_Tagged_Type (Id) then
7253 Write_Str ("TAGGED ");
7256 Write_Str (K (3 .. K'Length));
7259 if Is_Type (Id) and then Depends_On_Private (Id) then
7260 Write_Str ("Depends_On_Private ");
7264 -- Start of processing for Write_Entity_Info
7268 Write_Attribute ("Name ", Id);
7269 Write_Int (Int (Id));
7273 Write_Attribute (" Type ", Etype (Id));
7275 Write_Attribute (" Scope ", Scope (Id));
7280 when Discrete_Kind =>
7281 Write_Str ("Bounds: Id = ");
7283 if Present (Scalar_Range (Id)) then
7284 Write_Int (Int (Type_Low_Bound (Id)));
7285 Write_Str (" .. Id = ");
7286 Write_Int (Int (Type_High_Bound (Id)));
7288 Write_Str ("Empty");
7299 (" Component Type ", Component_Type (Id));
7302 Write_Str (" Indices ");
7304 Index := First_Index (Id);
7305 while Present (Index) loop
7306 Write_Attribute (" ", Etype (Index));
7307 Index := Next_Index (Index);
7315 (" Directly Designated Type ",
7316 Directly_Designated_Type (Id));
7319 when Overloadable_Kind =>
7320 if Present (Homonym (Id)) then
7321 Write_Str (" Homonym ");
7322 Write_Name (Chars (Homonym (Id)));
7324 Write_Int (Int (Homonym (Id)));
7331 if Ekind (Scope (Id)) in Record_Kind then
7333 " Original_Record_Component ",
7334 Original_Record_Component (Id));
7335 Write_Int (Int (Original_Record_Component (Id)));
7339 when others => null;
7341 end Write_Entity_Info;
7343 -----------------------
7344 -- Write_Field6_Name --
7345 -----------------------
7347 procedure Write_Field6_Name (Id : Entity_Id) is
7348 pragma Warnings (Off, Id);
7350 Write_Str ("First_Rep_Item");
7351 end Write_Field6_Name;
7353 -----------------------
7354 -- Write_Field7_Name --
7355 -----------------------
7357 procedure Write_Field7_Name (Id : Entity_Id) is
7358 pragma Warnings (Off, Id);
7360 Write_Str ("Freeze_Node");
7361 end Write_Field7_Name;
7363 -----------------------
7364 -- Write_Field8_Name --
7365 -----------------------
7367 procedure Write_Field8_Name (Id : Entity_Id) is
7372 Write_Str ("Normalized_First_Bit");
7376 E_Subprogram_Body =>
7377 Write_Str ("Mechanism");
7380 Write_Str ("Associated_Node_For_Itype");
7383 Write_Str ("First_Exit_Statement");
7386 Write_Str ("Dependent_Instances");
7389 Write_Str ("Postcondition_Proc");
7391 when E_Return_Statement =>
7392 Write_Str ("Return_Applies_To");
7395 Write_Str ("Hiding_Loop_Variable");
7398 Write_Str ("Field8??");
7400 end Write_Field8_Name;
7402 -----------------------
7403 -- Write_Field9_Name --
7404 -----------------------
7406 procedure Write_Field9_Name (Id : Entity_Id) is
7410 Write_Str ("Class_Wide_Type");
7413 E_Generic_Function |
7415 E_Generic_Procedure |
7418 Write_Str ("Renaming_Map");
7421 Write_Str ("Current_Value");
7424 Write_Str ("Field9??");
7426 end Write_Field9_Name;
7428 ------------------------
7429 -- Write_Field10_Name --
7430 ------------------------
7432 procedure Write_Field10_Name (Id : Entity_Id) is
7436 Write_Str ("Referenced_Object");
7438 when E_In_Parameter |
7440 Write_Str ("Discriminal_Link");
7446 Write_Str ("Handler_Records");
7450 Write_Str ("Normalized_Position_Max");
7453 Write_Str ("Field10??");
7455 end Write_Field10_Name;
7457 ------------------------
7458 -- Write_Field11_Name --
7459 ------------------------
7461 procedure Write_Field11_Name (Id : Entity_Id) is
7465 Write_Str ("Entry_Component");
7469 Write_Str ("Component_Bit_Offset");
7472 Write_Str ("Full_View");
7474 when E_Enumeration_Literal =>
7475 Write_Str ("Enumeration_Pos");
7478 Write_Str ("Block_Node");
7484 Write_Str ("Protected_Body_Subprogram");
7486 when E_Generic_Package =>
7487 Write_Str ("Generic_Homonym");
7490 Write_Str ("Full_View");
7493 Write_Str ("Field11??");
7495 end Write_Field11_Name;
7497 ------------------------
7498 -- Write_Field12_Name --
7499 ------------------------
7501 procedure Write_Field12_Name (Id : Entity_Id) is
7505 Write_Str ("Barrier_Function");
7507 when E_Enumeration_Literal =>
7508 Write_Str ("Enumeration_Rep");
7516 E_In_Out_Parameter |
7520 Write_Str ("Esize");
7524 Write_Str ("Next_Inlined_Subprogram");
7527 Write_Str ("Associated_Formal_Package");
7530 Write_Str ("Field12??");
7532 end Write_Field12_Name;
7534 ------------------------
7535 -- Write_Field13_Name --
7536 ------------------------
7538 procedure Write_Field13_Name (Id : Entity_Id) is
7542 Write_Str ("RM_Size");
7546 Write_Str ("Component_Clause");
7549 if not Comes_From_Source (Id)
7551 Chars (Id) = Name_Op_Ne
7553 Write_Str ("Corresponding_Equality");
7555 elsif Comes_From_Source (Id) then
7556 Write_Str ("Elaboration_Entity");
7559 Write_Str ("Field13??");
7564 Write_Str ("Extra_Accessibility");
7568 Generic_Unit_Kind =>
7569 Write_Str ("Elaboration_Entity");
7572 Write_Str ("Field13??");
7574 end Write_Field13_Name;
7576 -----------------------
7577 -- Write_Field14_Name --
7578 -----------------------
7580 procedure Write_Field14_Name (Id : Entity_Id) is
7589 Write_Str ("Alignment");
7593 Write_Str ("Normalized_Position");
7597 Write_Str ("First_Optional_Parameter");
7600 E_Generic_Package =>
7601 Write_Str ("Shadow_Entities");
7604 Write_Str ("Field14??");
7606 end Write_Field14_Name;
7608 ------------------------
7609 -- Write_Field15_Name --
7610 ------------------------
7612 procedure Write_Field15_Name (Id : Entity_Id) is
7617 Write_Str ("Storage_Size_Variable");
7619 when Class_Wide_Kind |
7624 Write_Str ("Direct_Primitive_Operations");
7627 Write_Str ("DT_Entry_Count");
7629 when Decimal_Fixed_Point_Kind =>
7630 Write_Str ("Scale_Value");
7632 when E_Discriminant =>
7633 Write_Str ("Discriminant_Number");
7636 Write_Str ("Extra_Formal");
7640 Write_Str ("DT_Position");
7643 Write_Str ("Entry_Parameters_Type");
7645 when Enumeration_Kind =>
7646 Write_Str ("Lit_Indexes");
7650 Write_Str ("Related_Instance");
7652 when E_Protected_Type =>
7653 Write_Str ("Entry_Bodies_Array");
7655 when E_String_Literal_Subtype =>
7656 Write_Str ("String_Literal_Low_Bound");
7659 Write_Str ("Field15??");
7661 end Write_Field15_Name;
7663 ------------------------
7664 -- Write_Field16_Name --
7665 ------------------------
7667 procedure Write_Field16_Name (Id : Entity_Id) is
7671 Write_Str ("Entry_Formal");
7675 Write_Str ("DTC_Entity");
7680 Write_Str ("First_Private_Entity");
7682 when E_Record_Type |
7683 E_Record_Type_With_Private =>
7684 Write_Str ("Access_Disp_Table");
7686 when E_String_Literal_Subtype =>
7687 Write_Str ("String_Literal_Length");
7689 when Enumeration_Kind =>
7690 Write_Str ("Lit_Strings");
7694 Write_Str ("Unset_Reference");
7696 when E_Record_Subtype |
7697 E_Class_Wide_Subtype =>
7698 Write_Str ("Cloned_Subtype");
7701 Write_Str ("Field16??");
7703 end Write_Field16_Name;
7705 ------------------------
7706 -- Write_Field17_Name --
7707 ------------------------
7709 procedure Write_Field17_Name (Id : Entity_Id) is
7713 Write_Str ("Digits_Value");
7716 Write_Str ("Prival");
7718 when E_Discriminant =>
7719 Write_Str ("Discriminal");
7728 E_Generic_Function |
7730 E_Generic_Procedure |
7738 E_Return_Statement |
7740 E_Subprogram_Type =>
7741 Write_Str ("First_Entity");
7744 Write_Str ("First_Index");
7746 when Enumeration_Kind =>
7747 Write_Str ("First_Literal");
7750 Write_Str ("Master_Id");
7752 when Modular_Integer_Kind =>
7753 Write_Str ("Modulus");
7757 E_Generic_In_Out_Parameter |
7759 Write_Str ("Actual_Subtype");
7761 when E_Incomplete_Type =>
7762 Write_Str ("Non_Limited_View");
7764 when E_Incomplete_Subtype =>
7765 if From_With_Type (Id) then
7766 Write_Str ("Non_Limited_View");
7770 Write_Str ("Field17??");
7772 end Write_Field17_Name;
7774 ------------------------
7775 -- Write_Field18_Name --
7776 ------------------------
7778 procedure Write_Field18_Name (Id : Entity_Id) is
7781 when E_Enumeration_Literal |
7785 Write_Str ("Alias");
7787 when E_Record_Type =>
7788 Write_Str ("Corresponding_Concurrent_Type");
7790 when E_Subprogram_Body =>
7791 Write_Str ("Corresponding_Protected_Entry");
7793 when E_Entry_Index_Parameter =>
7794 Write_Str ("Entry_Index_Constant");
7796 when E_Class_Wide_Subtype |
7797 E_Access_Protected_Subprogram_Type |
7798 E_Anonymous_Access_Protected_Subprogram_Type |
7799 E_Access_Subprogram_Type |
7801 Write_Str ("Equivalent_Type");
7803 when Fixed_Point_Kind =>
7804 Write_Str ("Delta_Value");
7807 Write_Str ("Renamed_Object");
7811 E_Generic_Function |
7812 E_Generic_Procedure |
7813 E_Generic_Package =>
7814 Write_Str ("Renamed_Entity");
7816 when Incomplete_Or_Private_Kind |
7818 Write_Str ("Private_Dependents");
7820 when Concurrent_Kind =>
7821 Write_Str ("Corresponding_Record_Type");
7826 Write_Str ("Enclosing_Scope");
7829 Write_Str ("Field18??");
7831 end Write_Field18_Name;
7833 -----------------------
7834 -- Write_Field19_Name --
7835 -----------------------
7837 procedure Write_Field19_Name (Id : Entity_Id) is
7842 Write_Str ("Related_Array_Object");
7848 E_Return_Statement |
7850 Write_Str ("Finalization_Chain_Entity");
7852 when E_Constant | E_Variable =>
7853 Write_Str ("Size_Check_Code");
7855 when E_Discriminant =>
7856 Write_Str ("Corresponding_Discriminant");
7859 E_Generic_Package =>
7860 Write_Str ("Body_Entity");
7862 when E_Package_Body |
7864 Write_Str ("Spec_Entity");
7866 when Private_Kind =>
7867 Write_Str ("Underlying_Full_View");
7869 when E_Record_Type =>
7870 Write_Str ("Parent_Subtype");
7873 Write_Str ("Field19??");
7875 end Write_Field19_Name;
7877 -----------------------
7878 -- Write_Field20_Name --
7879 -----------------------
7881 procedure Write_Field20_Name (Id : Entity_Id) is
7885 Write_Str ("Component_Type");
7887 when E_In_Parameter |
7888 E_Generic_In_Parameter =>
7889 Write_Str ("Default_Value");
7892 Write_Str ("Directly_Designated_Type");
7895 Write_Str ("Discriminant_Checking_Func");
7899 Write_Str ("Prival_Link");
7901 when E_Discriminant =>
7902 Write_Str ("Discriminant_Default_Value");
7911 E_Generic_Function |
7913 E_Generic_Procedure |
7921 E_Return_Statement |
7923 E_Subprogram_Type =>
7924 Write_Str ("Last_Entity");
7927 Write_Str ("Scalar_Range");
7930 Write_Str ("Register_Exception_Call");
7933 Write_Str ("Field20??");
7935 end Write_Field20_Name;
7937 -----------------------
7938 -- Write_Field21_Name --
7939 -----------------------
7941 procedure Write_Field21_Name (Id : Entity_Id) is
7947 E_Generic_Function |
7949 E_Generic_Procedure |
7951 Write_Str ("Interface_Name");
7953 when Concurrent_Kind |
7954 Incomplete_Or_Private_Kind |
7958 Write_Str ("Discriminant_Constraint");
7961 Write_Str ("Accept_Address");
7963 when Fixed_Point_Kind =>
7964 Write_Str ("Small_Value");
7966 when E_In_Parameter =>
7967 Write_Str ("Default_Expr_Function");
7970 Modular_Integer_Kind =>
7971 Write_Str ("Original_Array_Type");
7974 Write_Str ("Field21??");
7976 end Write_Field21_Name;
7978 -----------------------
7979 -- Write_Field22_Name --
7980 -----------------------
7982 procedure Write_Field22_Name (Id : Entity_Id) is
7986 Write_Str ("Associated_Storage_Pool");
7989 Write_Str ("Component_Size");
7993 Write_Str ("Original_Record_Component");
7995 when E_Enumeration_Literal =>
7996 Write_Str ("Enumeration_Rep_Expr");
7999 Write_Str ("Exception_Code");
8002 Write_Str ("Protected_Formal");
8004 when E_Record_Type =>
8005 Write_Str ("Corresponding_Remote_Type");
8015 E_Generic_Function |
8016 E_Generic_Procedure |
8019 E_Return_Statement |
8022 Write_Str ("Scope_Depth_Value");
8024 when E_Record_Type_With_Private |
8025 E_Record_Subtype_With_Private |
8028 E_Limited_Private_Type |
8029 E_Limited_Private_Subtype =>
8030 Write_Str ("Private_View");
8033 Write_Str ("Shared_Var_Procs_Instance");
8036 Write_Str ("Field22??");
8038 end Write_Field22_Name;
8040 ------------------------
8041 -- Write_Field23_Name --
8042 ------------------------
8044 procedure Write_Field23_Name (Id : Entity_Id) is
8048 Write_Str ("Associated_Final_Chain");
8051 Write_Str ("Packed_Array_Type");
8054 Write_Str ("Entry_Cancel_Parameter");
8056 when E_Discriminant =>
8057 Write_Str ("CR_Discriminant");
8059 when E_Enumeration_Type =>
8060 Write_Str ("Enum_Pos_To_Rep");
8064 Write_Str ("Extra_Constrained");
8066 when E_Generic_Function |
8068 E_Generic_Procedure =>
8069 Write_Str ("Inner_Instances");
8071 when Concurrent_Kind |
8072 Incomplete_Or_Private_Kind |
8076 Write_Str ("Stored_Constraint");
8080 if Present (Scope (Id))
8081 and then Is_Protected_Type (Scope (Id))
8083 Write_Str ("Protection_Object");
8085 Write_Str ("Generic_Renamings");
8089 if Is_Generic_Instance (Id) then
8090 Write_Str ("Generic_Renamings");
8092 Write_Str ("Limited_View");
8096 Write_Str ("Protection_Object");
8099 Write_Str ("Field23??");
8101 end Write_Field23_Name;
8103 ------------------------
8104 -- Write_Field24_Name --
8105 ------------------------
8107 procedure Write_Field24_Name (Id : Entity_Id) is
8110 when Subprogram_Kind =>
8111 Write_Str ("Spec_PPC_List");
8113 when E_Variable | E_Constant | Type_Kind =>
8114 Write_Str ("Related_Expression");
8117 Write_Str ("Field24???");
8119 end Write_Field24_Name;
8121 ------------------------
8122 -- Write_Field25_Name --
8123 ------------------------
8125 procedure Write_Field25_Name (Id : Entity_Id) is
8129 Write_Str ("DT_Offset_To_Top_Func");
8133 Write_Str ("Interface_Alias");
8135 when E_Record_Type |
8137 E_Record_Type_With_Private |
8138 E_Record_Subtype_With_Private =>
8139 Write_Str ("Interfaces");
8142 Write_Str ("Task_Body_Procedure");
8145 Write_Str ("Debug_Renaming_Link");
8149 Write_Str ("PPC_Wrapper");
8152 Write_Str ("Field25??");
8154 end Write_Field25_Name;
8156 ------------------------
8157 -- Write_Field26_Name --
8158 ------------------------
8160 procedure Write_Field26_Name (Id : Entity_Id) is
8163 when E_Generic_Package |
8165 Write_Str ("Package_Instantiation");
8170 if Is_Dispatching_Operation (Id) then
8171 Write_Str ("Overridden_Operation");
8173 Write_Str ("Static_Initialization");
8176 when E_Record_Type |
8177 E_Record_Type_With_Private =>
8178 Write_Str ("Dispatch_Table_Wrappers");
8180 when E_In_Out_Parameter |
8183 Write_Str ("Last_Assignment");
8186 Write_Str ("Relative_Deadline_Variable");
8189 Write_Str ("Field26??");
8191 end Write_Field26_Name;
8193 ------------------------
8194 -- Write_Field27_Name --
8195 ------------------------
8197 procedure Write_Field27_Name (Id : Entity_Id) is
8203 Write_Str ("Related_Type");
8206 Write_Str ("Wrapped_Entity");
8208 when E_Package | Type_Kind =>
8209 Write_Str ("Current_Use_Clause");
8212 Write_Str ("Field27??");
8214 end Write_Field27_Name;
8216 ------------------------
8217 -- Write_Field28_Name --
8218 ------------------------
8220 procedure Write_Field28_Name (Id : Entity_Id) is
8223 when E_Procedure | E_Function | E_Entry =>
8224 Write_Str ("Extra_Formals");
8226 when E_Record_Type =>
8227 Write_Str ("Underlying_Record_View");
8230 Write_Str ("Field28??");
8232 end Write_Field28_Name;
8234 -------------------------
8235 -- Iterator Procedures --
8236 -------------------------
8238 procedure Proc_Next_Component (N : in out Node_Id) is
8240 N := Next_Component (N);
8241 end Proc_Next_Component;
8243 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
8245 N := Next_Entity (N);
8246 while Present (N) loop
8247 exit when Ekind_In (N, E_Component, E_Discriminant);
8248 N := Next_Entity (N);
8250 end Proc_Next_Component_Or_Discriminant;
8252 procedure Proc_Next_Discriminant (N : in out Node_Id) is
8254 N := Next_Discriminant (N);
8255 end Proc_Next_Discriminant;
8257 procedure Proc_Next_Formal (N : in out Node_Id) is
8259 N := Next_Formal (N);
8260 end Proc_Next_Formal;
8262 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
8264 N := Next_Formal_With_Extras (N);
8265 end Proc_Next_Formal_With_Extras;
8267 procedure Proc_Next_Index (N : in out Node_Id) is
8269 N := Next_Index (N);
8270 end Proc_Next_Index;
8272 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
8274 N := Next_Inlined_Subprogram (N);
8275 end Proc_Next_Inlined_Subprogram;
8277 procedure Proc_Next_Literal (N : in out Node_Id) is
8279 N := Next_Literal (N);
8280 end Proc_Next_Literal;
8282 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
8284 N := Next_Stored_Discriminant (N);
8285 end Proc_Next_Stored_Discriminant;