1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2013, 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 -- Integrity_Level Uint8
79 -- Mechanism Uint8 (but returns Mechanism_Type)
80 -- Normalized_First_Bit Uint8
81 -- Postcondition_Proc Node8
82 -- Return_Applies_To Node8
83 -- First_Exit_Statement Node8
85 -- Class_Wide_Type Node9
86 -- Current_Value Node9
87 -- Refined_State Node9
90 -- Direct_Primitive_Operations Elist10
91 -- Discriminal_Link Node10
92 -- Float_Rep Uint10 (but returns Float_Rep_Kind)
93 -- Handler_Records List10
94 -- Normalized_Position_Max Uint10
96 -- Component_Bit_Offset Uint11
98 -- Entry_Component Node11
99 -- Enumeration_Pos Uint11
100 -- Generic_Homonym Node11
101 -- Protected_Body_Subprogram Node11
104 -- Barrier_Function Node12
105 -- Enumeration_Rep Uint12
107 -- Next_Inlined_Subprogram Node12
109 -- Component_Clause Node13
110 -- Elaboration_Entity Node13
111 -- Extra_Accessibility Node13
115 -- First_Optional_Parameter Node14
116 -- Normalized_Position Uint14
117 -- Shadow_Entities List14
119 -- Discriminant_Number Uint15
120 -- DT_Position Uint15
121 -- DT_Entry_Count Uint15
122 -- Entry_Bodies_Array Node15
123 -- Entry_Parameters_Type Node15
124 -- Extra_Formal Node15
125 -- Lit_Indexes Node15
126 -- Related_Instance Node15
127 -- Status_Flag_Or_Transient_Decl Node15
128 -- Scale_Value Uint15
129 -- Storage_Size_Variable Node15
130 -- String_Literal_Low_Bound Node15
132 -- Access_Disp_Table Elist16
133 -- Cloned_Subtype Node16
135 -- Entry_Formal Node16
136 -- First_Private_Entity Node16
137 -- Lit_Strings Node16
138 -- String_Literal_Length Uint16
139 -- Unset_Reference Node16
141 -- Actual_Subtype Node17
142 -- Digits_Value Uint17
143 -- Discriminal Node17
144 -- First_Entity Node17
145 -- First_Index Node17
146 -- First_Literal Node17
149 -- Non_Limited_View Node17
153 -- Corresponding_Concurrent_Type Node18
154 -- Corresponding_Protected_Entry Node18
155 -- Corresponding_Record_Type Node18
156 -- Delta_Value Ureal18
157 -- Enclosing_Scope Node18
158 -- Equivalent_Type Node18
159 -- Private_Dependents Elist18
160 -- Renamed_Entity Node18
161 -- Renamed_Object Node18
163 -- Body_Entity Node19
164 -- Corresponding_Discriminant Node19
165 -- Default_Aspect_Component_Value Node19
166 -- Default_Aspect_Value Node19
167 -- Extra_Accessibility_Of_Result Node19
168 -- Parent_Subtype Node19
169 -- Size_Check_Code Node19
170 -- Spec_Entity Node19
171 -- Underlying_Full_View Node19
173 -- Component_Type Node20
174 -- Default_Value Node20
175 -- Directly_Designated_Type Node20
176 -- Discriminant_Checking_Func Node20
177 -- Discriminant_Default_Value Node20
178 -- Last_Entity Node20
179 -- Prival_Link Node20
180 -- Register_Exception_Call Node20
181 -- Scalar_Range Node20
183 -- Accept_Address Elist21
184 -- Default_Expr_Function Node21
185 -- Discriminant_Constraint Elist21
186 -- Interface_Name Node21
187 -- Original_Array_Type Node21
188 -- Small_Value Ureal21
190 -- Associated_Storage_Pool Node22
191 -- Component_Size Uint22
192 -- Corresponding_Remote_Type Node22
193 -- Enumeration_Rep_Expr Node22
194 -- Exception_Code Uint22
195 -- Original_Record_Component Node22
196 -- Private_View Node22
197 -- Protected_Formal Node22
198 -- Scope_Depth_Value Uint22
199 -- Shared_Var_Procs_Instance Node22
201 -- CR_Discriminant Node23
202 -- Entry_Cancel_Parameter Node23
203 -- Enum_Pos_To_Rep Node23
204 -- Extra_Constrained Node23
205 -- Finalization_Master Node23
206 -- Generic_Renamings Elist23
207 -- Inner_Instances Elist23
208 -- Limited_View Node23
209 -- Packed_Array_Type Node23
210 -- Protection_Object Node23
211 -- Stored_Constraint Elist23
214 -- Related_Expression Node24
217 -- Interface_Alias Node25
218 -- Interfaces Elist25
219 -- Debug_Renaming_Link Node25
220 -- DT_Offset_To_Top_Func Node25
221 -- PPC_Wrapper Node25
222 -- Related_Array_Object Node25
223 -- Static_Predicate List25
224 -- Task_Body_Procedure Node25
226 -- Dispatch_Table_Wrappers Elist26
227 -- Last_Assignment Node26
228 -- Original_Access_Type Node26
229 -- Overridden_Operation Node26
230 -- Package_Instantiation Node26
231 -- Relative_Deadline_Variable Node26
233 -- Current_Use_Clause Node27
234 -- Related_Type Node27
235 -- Wrapped_Entity Node27
237 -- Extra_Formals Node28
238 -- Initialization_Statements Node28
239 -- Underlying_Record_View Node28
241 -- Subprograms_For_Type Node29
243 -- Corresponding_Equality Node30
244 -- Static_Initialization Node30
246 -- Thunk_Entity Node31
256 ---------------------------------------------
257 -- Usage of Flags in Defining Entity Nodes --
258 ---------------------------------------------
260 -- All flags are unique, there is no overlaying, so each flag is physically
261 -- present in every entity. However, for many of the flags, it only makes
262 -- sense for them to be set true for certain subsets of entity kinds. See
263 -- the spec of Einfo for further details.
265 -- Note: Flag1-Flag3 are not used, for historical reasons
268 -- Has_Discriminants Flag5
269 -- Is_Dispatching_Operation Flag6
270 -- Is_Immediately_Visible Flag7
272 -- Is_Potentially_Use_Visible Flag9
276 -- Is_Constrained Flag12
277 -- Is_Generic_Type Flag13
278 -- Depends_On_Private Flag14
280 -- Is_Volatile Flag16
281 -- Is_Internal Flag17
282 -- Has_Delayed_Freeze Flag18
283 -- Is_Abstract_Subprogram Flag19
284 -- Is_Concurrent_Record_Type Flag20
286 -- Has_Master_Entity Flag21
287 -- Needs_No_Actuals Flag22
288 -- Has_Storage_Size_Clause Flag23
289 -- Is_Imported Flag24
290 -- Is_Limited_Record Flag25
291 -- Has_Completion Flag26
292 -- Has_Pragma_Controlled Flag27
293 -- Is_Statically_Allocated Flag28
294 -- Has_Size_Clause Flag29
297 -- Checks_May_Be_Suppressed Flag31
298 -- Kill_Elaboration_Checks Flag32
299 -- Kill_Range_Checks Flag33
300 -- Has_Independent_Components Flag34
301 -- Is_Class_Wide_Equivalent_Type Flag35
302 -- Referenced_As_LHS Flag36
303 -- Is_Known_Non_Null Flag37
304 -- Can_Never_Be_Null Flag38
305 -- Has_Default_Aspect Flag39
306 -- Body_Needed_For_SAL Flag40
308 -- Treat_As_Volatile Flag41
309 -- Is_Controlled Flag42
310 -- Has_Controlled_Component Flag43
312 -- In_Private_Part Flag45
313 -- Has_Alignment_Clause Flag46
315 -- In_Package_Body Flag48
317 -- Delay_Subprogram_Descriptors Flag50
320 -- Is_Entry_Formal Flag52
321 -- Is_Private_Descendant Flag53
322 -- Return_Present Flag54
323 -- Is_Tagged_Type Flag55
324 -- Has_Homonym Flag56
326 -- Non_Binary_Modulus Flag58
327 -- Is_Preelaborated Flag59
328 -- Is_Shared_Passive Flag60
330 -- Is_Remote_Types Flag61
331 -- Is_Remote_Call_Interface Flag62
332 -- Is_Character_Type Flag63
333 -- Is_Intrinsic_Subprogram Flag64
334 -- Has_Record_Rep_Clause Flag65
335 -- Has_Enumeration_Rep_Clause Flag66
336 -- Has_Small_Clause Flag67
337 -- Has_Component_Size_Clause Flag68
338 -- Is_Access_Constant Flag69
339 -- Is_First_Subtype Flag70
341 -- Has_Completion_In_Body Flag71
342 -- Has_Unknown_Discriminants Flag72
343 -- Is_Child_Unit Flag73
344 -- Is_CPP_Class Flag74
345 -- Has_Non_Standard_Rep Flag75
346 -- Is_Constructor Flag76
347 -- Static_Elaboration_Desired Flag77
349 -- Has_All_Calls_Remote Flag79
350 -- Is_Constr_Subt_For_U_Nominal Flag80
352 -- Is_Asynchronous Flag81
353 -- Has_Gigi_Rep_Item Flag82
354 -- Has_Machine_Radix_Clause Flag83
355 -- Machine_Radix_10 Flag84
357 -- Has_Atomic_Components Flag86
358 -- Has_Volatile_Components Flag87
359 -- Discard_Names Flag88
360 -- Is_Interrupt_Handler Flag89
361 -- Returns_By_Ref Flag90
364 -- Size_Known_At_Compile_Time Flag92
365 -- Reverse_Storage_Order Flag93
366 -- Is_Generic_Actual_Type Flag94
367 -- Uses_Sec_Stack Flag95
368 -- Warnings_Off Flag96
369 -- Is_Controlling_Formal Flag97
370 -- Has_Controlling_Result Flag98
371 -- Is_Exported Flag99
372 -- Has_Specified_Layout Flag100
374 -- Has_Nested_Block_With_Handler Flag101
376 -- Is_Completely_Hidden Flag103
377 -- Address_Taken Flag104
378 -- Suppress_Initialization Flag105
379 -- Is_Limited_Composite Flag106
380 -- Is_Private_Composite Flag107
381 -- Default_Expressions_Processed Flag108
382 -- Is_Non_Static_Subtype Flag109
383 -- Has_External_Tag_Rep_Clause Flag110
385 -- Is_Formal_Subprogram Flag111
386 -- Is_Renaming_Of_Object Flag112
388 -- Delay_Cleanups Flag114
389 -- Never_Set_In_Source Flag115
390 -- Is_Visible_Lib_Unit Flag116
391 -- Is_Unchecked_Union Flag117
392 -- Is_For_Access_Subtype Flag118
393 -- Has_Convention_Pragma Flag119
394 -- Has_Primitive_Operations Flag120
396 -- Has_Pragma_Pack Flag121
397 -- Is_Bit_Packed_Array Flag122
398 -- Has_Unchecked_Union Flag123
399 -- Is_Eliminated Flag124
400 -- C_Pass_By_Copy Flag125
401 -- Is_Instantiated Flag126
402 -- Is_Valued_Procedure Flag127
403 -- (used for Component_Alignment) Flag128
404 -- (used for Component_Alignment) Flag129
405 -- Is_Generic_Instance Flag130
407 -- No_Pool_Assigned Flag131
408 -- Is_AST_Entry Flag132
409 -- Is_VMS_Exception Flag133
410 -- Is_Optional_Parameter Flag134
411 -- Has_Aliased_Components Flag135
412 -- No_Strict_Aliasing Flag136
413 -- Is_Machine_Code_Subprogram Flag137
414 -- Is_Packed_Array_Type Flag138
415 -- Has_Biased_Representation Flag139
416 -- Has_Complex_Representation Flag140
418 -- Is_Constr_Subt_For_UN_Aliased Flag141
419 -- Has_Missing_Return Flag142
420 -- Has_Recursive_Call Flag143
421 -- Is_Unsigned_Type Flag144
422 -- Strict_Alignment Flag145
423 -- Is_Abstract_Type Flag146
424 -- Needs_Debug_Info Flag147
425 -- Suppress_Elaboration_Warnings Flag148
426 -- Is_Compilation_Unit Flag149
427 -- Has_Pragma_Elaborate_Body Flag150
429 -- Has_Private_Ancestor Flag151
430 -- Entry_Accepted Flag152
431 -- Is_Obsolescent Flag153
432 -- Has_Per_Object_Constraint Flag154
433 -- Has_Private_Declaration Flag155
434 -- Referenced Flag156
435 -- Has_Pragma_Inline Flag157
436 -- Finalize_Storage_Only Flag158
437 -- From_With_Type Flag159
438 -- Is_Package_Body_Entity Flag160
440 -- Has_Qualified_Name Flag161
441 -- Nonzero_Is_True Flag162
442 -- Is_True_Constant Flag163
443 -- Reverse_Bit_Order Flag164
444 -- Suppress_Style_Checks Flag165
445 -- Debug_Info_Off Flag166
446 -- Sec_Stack_Needed_For_Return Flag167
447 -- Materialize_Entity Flag168
448 -- Has_Pragma_Thread_Local_Storage Flag169
449 -- Is_Known_Valid Flag170
451 -- Is_Hidden_Open_Scope Flag171
452 -- Has_Object_Size_Clause Flag172
453 -- Has_Fully_Qualified_Name Flag173
454 -- Elaboration_Entity_Required Flag174
455 -- Has_Forward_Instantiation Flag175
456 -- Is_Discrim_SO_Function Flag176
457 -- Size_Depends_On_Discriminant Flag177
458 -- Is_Null_Init_Proc Flag178
459 -- Has_Pragma_Pure_Function Flag179
460 -- Has_Pragma_Unreferenced Flag180
462 -- Has_Contiguous_Rep Flag181
463 -- Has_Xref_Entry Flag182
464 -- Must_Be_On_Byte_Boundary Flag183
465 -- Has_Stream_Size_Clause Flag184
466 -- Is_Ada_2005_Only Flag185
467 -- Is_Interface Flag186
468 -- Has_Constrained_Partial_View Flag187
469 -- Uses_Lock_Free Flag188
470 -- Is_Pure_Unit_Access_Type Flag189
471 -- Has_Specified_Stream_Input Flag190
473 -- Has_Specified_Stream_Output Flag191
474 -- Has_Specified_Stream_Read Flag192
475 -- Has_Specified_Stream_Write Flag193
476 -- Is_Local_Anonymous_Access Flag194
477 -- Is_Primitive_Wrapper Flag195
478 -- Was_Hidden Flag196
479 -- Is_Limited_Interface Flag197
480 -- Has_Pragma_Ordered Flag198
481 -- Is_Ada_2012_Only Flag199
483 -- Has_Delayed_Aspects Flag200
484 -- Has_Pragma_No_Inline Flag201
485 -- Itype_Printed Flag202
486 -- Has_Pragma_Pure Flag203
487 -- Is_Known_Null Flag204
488 -- Low_Bound_Tested Flag205
489 -- Is_Visible_Formal Flag206
490 -- Known_To_Have_Preelab_Init Flag207
491 -- Must_Have_Preelab_Init Flag208
492 -- Is_Return_Object Flag209
493 -- Elaborate_Body_Desirable Flag210
495 -- Has_Static_Discriminants Flag211
496 -- Has_Pragma_Unreferenced_Objects Flag212
497 -- Requires_Overriding Flag213
499 -- Has_Up_Level_Access Flag215
500 -- Universal_Aliasing Flag216
501 -- Suppress_Value_Tracking_On_Call Flag217
502 -- Is_Primitive Flag218
503 -- Has_Initial_Value Flag219
504 -- Has_Dispatch_Table Flag220
506 -- Has_Pragma_Preelab_Init Flag221
507 -- Used_As_Generic_Actual Flag222
508 -- Is_Descendent_Of_Address Flag223
511 -- Is_Only_Out_Parameter Flag226
512 -- Referenced_As_Out_Parameter Flag227
513 -- Has_Thunks Flag228
514 -- Can_Use_Internal_Rep Flag229
515 -- Has_Pragma_Inline_Always Flag230
517 -- Renamed_In_Spec Flag231
518 -- Has_Invariants Flag232
519 -- Has_Pragma_Unmodified Flag233
520 -- Is_Dispatch_Table_Entity Flag234
521 -- Is_Trivial_Subprogram Flag235
522 -- Warnings_Off_Used Flag236
523 -- Warnings_Off_Used_Unmodified Flag237
524 -- Warnings_Off_Used_Unreferenced Flag238
525 -- OK_To_Reorder_Components Flag239
526 -- Has_Postconditions Flag240
528 -- Optimize_Alignment_Space Flag241
529 -- Optimize_Alignment_Time Flag242
530 -- Overlays_Constant Flag243
531 -- Is_RACW_Stub_Type Flag244
532 -- Is_Private_Primitive Flag245
533 -- Is_Underlying_Record_View Flag246
534 -- OK_To_Rename Flag247
535 -- Has_Inheritable_Invariants Flag248
536 -- Is_Safe_To_Reevaluate Flag249
537 -- Has_Predicates Flag250
539 -- Has_Implicit_Dereference Flag251
540 -- Is_Processed_Transient Flag252
541 -- Has_Anonymous_Master Flag253
542 -- Is_Implementation_Defined Flag254
543 -- Is_Predicate_Function Flag255
544 -- Is_Predicate_Function_M Flag256
545 -- Is_Invariant_Procedure Flag257
546 -- Has_Dynamic_Predicate_Aspect Flag258
547 -- Has_Static_Predicate_Aspect Flag259
548 -- Has_Loop_Entry_Attributes Flag260
579 -- Note: Flag287-317 are defined in atree.ads/adb, but not yet in atree.h
581 -----------------------
582 -- Local subprograms --
583 -----------------------
585 function Has_Property
587 Prop_Nam : Name_Id) return Boolean;
588 -- Determine whether abstract state State has a particular property denoted
589 -- by the name Prop_Nam.
591 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N;
592 -- Returns the attribute definition clause for Id whose name is Rep_Name.
593 -- Returns Empty if no matching attribute definition clause found for Id.
599 function Float_Rep (Id : E) return F is
600 pragma Assert (Is_Floating_Point_Type (Id));
602 return F'Val (UI_To_Int (Uint10 (Base_Type (Id))));
609 function Has_Property
611 Prop_Nam : Name_Id) return Boolean
613 Par : constant Node_Id := Parent (State);
617 pragma Assert (Ekind (State) = E_Abstract_State);
619 -- States with properties appear as extension aggregates in the tree
621 if Nkind (Par) = N_Extension_Aggregate then
622 if Prop_Nam = Name_Integrity then
623 return Present (Component_Associations (Par));
626 Prop := First (Expressions (Par));
627 while Present (Prop) loop
628 if Chars (Prop) = Prop_Nam then
644 function Rep_Clause (Id : E; Rep_Name : Name_Id) return N is
648 Ritem := First_Rep_Item (Id);
649 while Present (Ritem) loop
650 if Nkind (Ritem) = N_Attribute_Definition_Clause
651 and then Chars (Ritem) = Rep_Name
655 Next_Rep_Item (Ritem);
662 --------------------------------
663 -- Attribute Access Functions --
664 --------------------------------
666 function Abstract_States (Id : E) return L is
668 pragma Assert (Ekind (Id) = E_Package);
672 function Accept_Address (Id : E) return L is
677 function Access_Disp_Table (Id : E) return L is
679 pragma Assert (Ekind_In (Id, E_Record_Type,
681 return Elist16 (Implementation_Base_Type (Id));
682 end Access_Disp_Table;
684 function Actual_Subtype (Id : E) return E is
687 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
688 or else Is_Formal (Id));
692 function Address_Taken (Id : E) return B is
697 function Alias (Id : E) return E is
700 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
704 function Alignment (Id : E) return U is
706 pragma Assert (Is_Type (Id)
707 or else Is_Formal (Id)
708 or else Ekind_In (Id, E_Loop_Parameter,
715 function Associated_Formal_Package (Id : E) return E is
717 pragma Assert (Ekind (Id) = E_Package);
719 end Associated_Formal_Package;
721 function Associated_Node_For_Itype (Id : E) return N is
724 end Associated_Node_For_Itype;
726 function Associated_Storage_Pool (Id : E) return E is
728 pragma Assert (Is_Access_Type (Id));
729 return Node22 (Root_Type (Id));
730 end Associated_Storage_Pool;
732 function Barrier_Function (Id : E) return N is
734 pragma Assert (Is_Entry (Id));
736 end Barrier_Function;
738 function Block_Node (Id : E) return N is
740 pragma Assert (Ekind (Id) = E_Block);
744 function Body_Entity (Id : E) return E is
746 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
750 function Body_Needed_For_SAL (Id : E) return B is
753 (Ekind (Id) = E_Package
754 or else Is_Subprogram (Id)
755 or else Is_Generic_Unit (Id));
757 end Body_Needed_For_SAL;
759 function C_Pass_By_Copy (Id : E) return B is
761 pragma Assert (Is_Record_Type (Id));
762 return Flag125 (Implementation_Base_Type (Id));
765 function Can_Never_Be_Null (Id : E) return B is
768 end Can_Never_Be_Null;
770 function Checks_May_Be_Suppressed (Id : E) return B is
773 end Checks_May_Be_Suppressed;
775 function Class_Wide_Type (Id : E) return E is
777 pragma Assert (Is_Type (Id));
781 function Cloned_Subtype (Id : E) return E is
783 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
787 function Component_Bit_Offset (Id : E) return U is
789 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
791 end Component_Bit_Offset;
793 function Component_Clause (Id : E) return N is
795 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
797 end Component_Clause;
799 function Component_Size (Id : E) return U is
801 pragma Assert (Is_Array_Type (Id));
802 return Uint22 (Implementation_Base_Type (Id));
805 function Component_Type (Id : E) return E is
807 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
808 return Node20 (Implementation_Base_Type (Id));
811 function Corresponding_Concurrent_Type (Id : E) return E is
813 pragma Assert (Ekind (Id) = E_Record_Type);
815 end Corresponding_Concurrent_Type;
817 function Corresponding_Discriminant (Id : E) return E is
819 pragma Assert (Ekind (Id) = E_Discriminant);
821 end Corresponding_Discriminant;
823 function Corresponding_Equality (Id : E) return E is
826 (Ekind (Id) = E_Function
827 and then not Comes_From_Source (Id)
828 and then Chars (Id) = Name_Op_Ne);
830 end Corresponding_Equality;
832 function Corresponding_Protected_Entry (Id : E) return E is
834 pragma Assert (Ekind (Id) = E_Subprogram_Body);
836 end Corresponding_Protected_Entry;
838 function Corresponding_Record_Type (Id : E) return E is
840 pragma Assert (Is_Concurrent_Type (Id));
842 end Corresponding_Record_Type;
844 function Corresponding_Remote_Type (Id : E) return E is
847 end Corresponding_Remote_Type;
849 function Current_Use_Clause (Id : E) return E is
851 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
853 end Current_Use_Clause;
855 function Current_Value (Id : E) return N is
857 pragma Assert (Ekind (Id) in Object_Kind);
861 function CR_Discriminant (Id : E) return E is
866 function Debug_Info_Off (Id : E) return B is
871 function Debug_Renaming_Link (Id : E) return E is
874 end Debug_Renaming_Link;
876 function Default_Aspect_Component_Value (Id : E) return N is
878 pragma Assert (Is_Array_Type (Id));
880 end Default_Aspect_Component_Value;
882 function Default_Aspect_Value (Id : E) return N is
884 pragma Assert (Is_Scalar_Type (Id));
886 end Default_Aspect_Value;
888 function Default_Expr_Function (Id : E) return E is
890 pragma Assert (Is_Formal (Id));
892 end Default_Expr_Function;
894 function Default_Expressions_Processed (Id : E) return B is
897 end Default_Expressions_Processed;
899 function Default_Value (Id : E) return N is
901 pragma Assert (Is_Formal (Id));
905 function Delay_Cleanups (Id : E) return B is
910 function Delay_Subprogram_Descriptors (Id : E) return B is
913 end Delay_Subprogram_Descriptors;
915 function Delta_Value (Id : E) return R is
917 pragma Assert (Is_Fixed_Point_Type (Id));
921 function Dependent_Instances (Id : E) return L is
923 pragma Assert (Is_Generic_Instance (Id));
925 end Dependent_Instances;
927 function Depends_On_Private (Id : E) return B is
929 pragma Assert (Nkind (Id) in N_Entity);
931 end Depends_On_Private;
933 function Digits_Value (Id : E) return U is
936 (Is_Floating_Point_Type (Id)
937 or else Is_Decimal_Fixed_Point_Type (Id));
941 function Direct_Primitive_Operations (Id : E) return L is
943 pragma Assert (Is_Tagged_Type (Id));
945 end Direct_Primitive_Operations;
947 function Directly_Designated_Type (Id : E) return E is
949 pragma Assert (Is_Access_Type (Id));
951 end Directly_Designated_Type;
953 function Discard_Names (Id : E) return B is
958 function Discriminal (Id : E) return E is
960 pragma Assert (Ekind (Id) = E_Discriminant);
964 function Discriminal_Link (Id : E) return N is
967 end Discriminal_Link;
969 function Discriminant_Checking_Func (Id : E) return E is
971 pragma Assert (Ekind (Id) = E_Component);
973 end Discriminant_Checking_Func;
975 function Discriminant_Constraint (Id : E) return L is
977 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
979 end Discriminant_Constraint;
981 function Discriminant_Default_Value (Id : E) return N is
983 pragma Assert (Ekind (Id) = E_Discriminant);
985 end Discriminant_Default_Value;
987 function Discriminant_Number (Id : E) return U is
989 pragma Assert (Ekind (Id) = E_Discriminant);
991 end Discriminant_Number;
993 function Dispatch_Table_Wrappers (Id : E) return L is
995 pragma Assert (Ekind_In (Id, E_Record_Type,
997 return Elist26 (Implementation_Base_Type (Id));
998 end Dispatch_Table_Wrappers;
1000 function DT_Entry_Count (Id : E) return U is
1002 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1006 function DT_Offset_To_Top_Func (Id : E) return E is
1008 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1010 end DT_Offset_To_Top_Func;
1012 function DT_Position (Id : E) return U is
1014 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
1015 and then Present (DTC_Entity (Id)));
1019 function DTC_Entity (Id : E) return E is
1021 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1025 function Elaborate_Body_Desirable (Id : E) return B is
1027 pragma Assert (Ekind (Id) = E_Package);
1028 return Flag210 (Id);
1029 end Elaborate_Body_Desirable;
1031 function Elaboration_Entity (Id : E) return E is
1036 Ekind (Id) = E_Package
1038 Is_Generic_Unit (Id));
1040 end Elaboration_Entity;
1042 function Elaboration_Entity_Required (Id : E) return B is
1047 Ekind (Id) = E_Package
1049 Is_Generic_Unit (Id));
1050 return Flag174 (Id);
1051 end Elaboration_Entity_Required;
1053 function Enclosing_Scope (Id : E) return E is
1056 end Enclosing_Scope;
1058 function Entry_Accepted (Id : E) return B is
1060 pragma Assert (Is_Entry (Id));
1061 return Flag152 (Id);
1064 function Entry_Bodies_Array (Id : E) return E is
1067 end Entry_Bodies_Array;
1069 function Entry_Cancel_Parameter (Id : E) return E is
1072 end Entry_Cancel_Parameter;
1074 function Entry_Component (Id : E) return E is
1077 end Entry_Component;
1079 function Entry_Formal (Id : E) return E is
1084 function Entry_Index_Constant (Id : E) return N is
1086 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
1088 end Entry_Index_Constant;
1090 function Contract (Id : E) return N is
1093 (Ekind_In (Id, E_Entry, E_Entry_Family)
1094 or else Is_Subprogram (Id)
1095 or else Is_Generic_Subprogram (Id));
1099 function Entry_Parameters_Type (Id : E) return E is
1102 end Entry_Parameters_Type;
1104 function Enum_Pos_To_Rep (Id : E) return E is
1106 pragma Assert (Ekind (Id) = E_Enumeration_Type);
1108 end Enum_Pos_To_Rep;
1110 function Enumeration_Pos (Id : E) return Uint is
1112 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1114 end Enumeration_Pos;
1116 function Enumeration_Rep (Id : E) return U is
1118 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1120 end Enumeration_Rep;
1122 function Enumeration_Rep_Expr (Id : E) return N is
1124 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1126 end Enumeration_Rep_Expr;
1128 function Equivalent_Type (Id : E) return E is
1131 (Ekind_In (Id, E_Class_Wide_Type,
1132 E_Class_Wide_Subtype,
1133 E_Access_Protected_Subprogram_Type,
1134 E_Anonymous_Access_Protected_Subprogram_Type,
1135 E_Access_Subprogram_Type,
1138 end Equivalent_Type;
1140 function Esize (Id : E) return Uint is
1145 function Exception_Code (Id : E) return Uint is
1147 pragma Assert (Ekind (Id) = E_Exception);
1151 function Extra_Accessibility (Id : E) return E is
1154 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
1156 end Extra_Accessibility;
1158 function Extra_Accessibility_Of_Result (Id : E) return E is
1160 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
1162 end Extra_Accessibility_Of_Result;
1164 function Extra_Constrained (Id : E) return E is
1166 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1168 end Extra_Constrained;
1170 function Extra_Formal (Id : E) return E is
1175 function Extra_Formals (Id : E) return E is
1178 (Is_Overloadable (Id)
1179 or else Ekind_In (Id, E_Entry_Family,
1181 E_Subprogram_Type));
1185 function Can_Use_Internal_Rep (Id : E) return B is
1187 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1188 return Flag229 (Base_Type (Id));
1189 end Can_Use_Internal_Rep;
1191 function Finalization_Master (Id : E) return E is
1193 pragma Assert (Is_Access_Type (Id));
1194 return Node23 (Root_Type (Id));
1195 end Finalization_Master;
1197 function Finalize_Storage_Only (Id : E) return B is
1199 pragma Assert (Is_Type (Id));
1200 return Flag158 (Base_Type (Id));
1201 end Finalize_Storage_Only;
1203 function Finalizer (Id : E) return E is
1206 (Ekind (Id) = E_Package
1207 or else Ekind (Id) = E_Package_Body);
1211 function First_Entity (Id : E) return E is
1216 function First_Exit_Statement (Id : E) return N is
1218 pragma Assert (Ekind (Id) = E_Loop);
1220 end First_Exit_Statement;
1222 function First_Index (Id : E) return N is
1224 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1228 function First_Literal (Id : E) return E is
1230 pragma Assert (Is_Enumeration_Type (Id));
1234 function First_Optional_Parameter (Id : E) return E is
1236 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1238 end First_Optional_Parameter;
1240 function First_Private_Entity (Id : E) return E is
1242 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1243 or else Ekind (Id) in Concurrent_Kind);
1245 end First_Private_Entity;
1247 function First_Rep_Item (Id : E) return E is
1252 function Freeze_Node (Id : E) return N is
1257 function From_With_Type (Id : E) return B is
1259 return Flag159 (Id);
1262 function Full_View (Id : E) return E is
1264 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1268 function Generic_Homonym (Id : E) return E is
1270 pragma Assert (Ekind (Id) = E_Generic_Package);
1272 end Generic_Homonym;
1274 function Generic_Renamings (Id : E) return L is
1276 return Elist23 (Id);
1277 end Generic_Renamings;
1279 function Handler_Records (Id : E) return S is
1282 end Handler_Records;
1284 function Has_Aliased_Components (Id : E) return B is
1286 return Flag135 (Implementation_Base_Type (Id));
1287 end Has_Aliased_Components;
1289 function Has_Alignment_Clause (Id : E) return B is
1292 end Has_Alignment_Clause;
1294 function Has_All_Calls_Remote (Id : E) return B is
1297 end Has_All_Calls_Remote;
1299 function Has_Anonymous_Master (Id : E) return B is
1302 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
1303 return Flag253 (Id);
1304 end Has_Anonymous_Master;
1306 function Has_Atomic_Components (Id : E) return B is
1308 return Flag86 (Implementation_Base_Type (Id));
1309 end Has_Atomic_Components;
1311 function Has_Biased_Representation (Id : E) return B is
1313 return Flag139 (Id);
1314 end Has_Biased_Representation;
1316 function Has_Completion (Id : E) return B is
1321 function Has_Completion_In_Body (Id : E) return B is
1323 pragma Assert (Is_Type (Id));
1325 end Has_Completion_In_Body;
1327 function Has_Complex_Representation (Id : E) return B is
1329 pragma Assert (Is_Type (Id));
1330 return Flag140 (Implementation_Base_Type (Id));
1331 end Has_Complex_Representation;
1333 function Has_Component_Size_Clause (Id : E) return B is
1335 pragma Assert (Is_Array_Type (Id));
1336 return Flag68 (Implementation_Base_Type (Id));
1337 end Has_Component_Size_Clause;
1339 function Has_Constrained_Partial_View (Id : E) return B is
1341 pragma Assert (Is_Type (Id));
1342 return Flag187 (Id);
1343 end Has_Constrained_Partial_View;
1345 function Has_Controlled_Component (Id : E) return B is
1347 return Flag43 (Base_Type (Id));
1348 end Has_Controlled_Component;
1350 function Has_Contiguous_Rep (Id : E) return B is
1352 return Flag181 (Id);
1353 end Has_Contiguous_Rep;
1355 function Has_Controlling_Result (Id : E) return B is
1358 end Has_Controlling_Result;
1360 function Has_Convention_Pragma (Id : E) return B is
1362 return Flag119 (Id);
1363 end Has_Convention_Pragma;
1365 function Has_Default_Aspect (Id : E) return B is
1367 return Flag39 (Base_Type (Id));
1368 end Has_Default_Aspect;
1370 function Has_Delayed_Aspects (Id : E) return B is
1372 pragma Assert (Nkind (Id) in N_Entity);
1373 return Flag200 (Id);
1374 end Has_Delayed_Aspects;
1376 function Has_Delayed_Freeze (Id : E) return B is
1378 pragma Assert (Nkind (Id) in N_Entity);
1380 end Has_Delayed_Freeze;
1382 function Has_Discriminants (Id : E) return B is
1384 pragma Assert (Nkind (Id) in N_Entity);
1386 end Has_Discriminants;
1388 function Has_Dispatch_Table (Id : E) return B is
1390 pragma Assert (Is_Tagged_Type (Id));
1391 return Flag220 (Id);
1392 end Has_Dispatch_Table;
1394 function Has_Dynamic_Predicate_Aspect (Id : E) return B is
1396 pragma Assert (Is_Type (Id));
1397 return Flag258 (Id);
1398 end Has_Dynamic_Predicate_Aspect;
1400 function Has_Enumeration_Rep_Clause (Id : E) return B is
1402 pragma Assert (Is_Enumeration_Type (Id));
1404 end Has_Enumeration_Rep_Clause;
1406 function Has_Exit (Id : E) return B is
1411 function Has_External_Tag_Rep_Clause (Id : E) return B is
1413 pragma Assert (Is_Tagged_Type (Id));
1414 return Flag110 (Id);
1415 end Has_External_Tag_Rep_Clause;
1417 function Has_Forward_Instantiation (Id : E) return B is
1419 return Flag175 (Id);
1420 end Has_Forward_Instantiation;
1422 function Has_Fully_Qualified_Name (Id : E) return B is
1424 return Flag173 (Id);
1425 end Has_Fully_Qualified_Name;
1427 function Has_Gigi_Rep_Item (Id : E) return B is
1430 end Has_Gigi_Rep_Item;
1432 function Has_Homonym (Id : E) return B is
1437 function Has_Implicit_Dereference (Id : E) return B is
1439 return Flag251 (Id);
1440 end Has_Implicit_Dereference;
1442 function Has_Independent_Components (Id : E) return B is
1444 pragma Assert (Is_Object (Id) or else Is_Type (Id));
1446 end Has_Independent_Components;
1448 function Has_Inheritable_Invariants (Id : E) return B is
1450 pragma Assert (Is_Type (Id));
1451 return Flag248 (Id);
1452 end Has_Inheritable_Invariants;
1454 function Has_Initial_Value (Id : E) return B is
1456 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1457 return Flag219 (Id);
1458 end Has_Initial_Value;
1460 function Has_Invariants (Id : E) return B is
1462 pragma Assert (Is_Type (Id));
1463 return Flag232 (Id);
1466 function Has_Loop_Entry_Attributes (Id : E) return B is
1468 pragma Assert (Ekind (Id) = E_Loop);
1469 return Flag260 (Id);
1470 end Has_Loop_Entry_Attributes;
1472 function Has_Machine_Radix_Clause (Id : E) return B is
1474 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1476 end Has_Machine_Radix_Clause;
1478 function Has_Master_Entity (Id : E) return B is
1481 end Has_Master_Entity;
1483 function Has_Missing_Return (Id : E) return B is
1485 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1486 return Flag142 (Id);
1487 end Has_Missing_Return;
1489 function Has_Nested_Block_With_Handler (Id : E) return B is
1491 return Flag101 (Id);
1492 end Has_Nested_Block_With_Handler;
1494 function Has_Non_Standard_Rep (Id : E) return B is
1496 return Flag75 (Implementation_Base_Type (Id));
1497 end Has_Non_Standard_Rep;
1499 function Has_Object_Size_Clause (Id : E) return B is
1501 pragma Assert (Is_Type (Id));
1502 return Flag172 (Id);
1503 end Has_Object_Size_Clause;
1505 function Has_Per_Object_Constraint (Id : E) return B is
1507 return Flag154 (Id);
1508 end Has_Per_Object_Constraint;
1510 function Has_Postconditions (Id : E) return B is
1512 pragma Assert (Is_Subprogram (Id));
1513 return Flag240 (Id);
1514 end Has_Postconditions;
1516 function Has_Pragma_Controlled (Id : E) return B is
1518 pragma Assert (Is_Access_Type (Id));
1519 return Flag27 (Implementation_Base_Type (Id));
1520 end Has_Pragma_Controlled;
1522 function Has_Pragma_Elaborate_Body (Id : E) return B is
1524 return Flag150 (Id);
1525 end Has_Pragma_Elaborate_Body;
1527 function Has_Pragma_Inline (Id : E) return B is
1529 return Flag157 (Id);
1530 end Has_Pragma_Inline;
1532 function Has_Pragma_Inline_Always (Id : E) return B is
1534 return Flag230 (Id);
1535 end Has_Pragma_Inline_Always;
1537 function Has_Pragma_No_Inline (Id : E) return B is
1539 return Flag201 (Id);
1540 end Has_Pragma_No_Inline;
1542 function Has_Pragma_Ordered (Id : E) return B is
1544 pragma Assert (Is_Enumeration_Type (Id));
1545 return Flag198 (Implementation_Base_Type (Id));
1546 end Has_Pragma_Ordered;
1548 function Has_Pragma_Pack (Id : E) return B is
1550 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1551 return Flag121 (Implementation_Base_Type (Id));
1552 end Has_Pragma_Pack;
1554 function Has_Pragma_Preelab_Init (Id : E) return B is
1556 return Flag221 (Id);
1557 end Has_Pragma_Preelab_Init;
1559 function Has_Pragma_Pure (Id : E) return B is
1561 return Flag203 (Id);
1562 end Has_Pragma_Pure;
1564 function Has_Pragma_Pure_Function (Id : E) return B is
1566 return Flag179 (Id);
1567 end Has_Pragma_Pure_Function;
1569 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1571 return Flag169 (Id);
1572 end Has_Pragma_Thread_Local_Storage;
1574 function Has_Pragma_Unmodified (Id : E) return B is
1576 return Flag233 (Id);
1577 end Has_Pragma_Unmodified;
1579 function Has_Pragma_Unreferenced (Id : E) return B is
1581 return Flag180 (Id);
1582 end Has_Pragma_Unreferenced;
1584 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1586 pragma Assert (Is_Type (Id));
1587 return Flag212 (Id);
1588 end Has_Pragma_Unreferenced_Objects;
1590 function Has_Predicates (Id : E) return B is
1592 pragma Assert (Is_Type (Id));
1593 return Flag250 (Id);
1596 function Has_Primitive_Operations (Id : E) return B is
1598 pragma Assert (Is_Type (Id));
1599 return Flag120 (Base_Type (Id));
1600 end Has_Primitive_Operations;
1602 function Has_Private_Ancestor (Id : E) return B is
1604 return Flag151 (Id);
1605 end Has_Private_Ancestor;
1607 function Has_Private_Declaration (Id : E) return B is
1609 return Flag155 (Id);
1610 end Has_Private_Declaration;
1612 function Has_Qualified_Name (Id : E) return B is
1614 return Flag161 (Id);
1615 end Has_Qualified_Name;
1617 function Has_RACW (Id : E) return B is
1619 pragma Assert (Ekind (Id) = E_Package);
1620 return Flag214 (Id);
1623 function Has_Record_Rep_Clause (Id : E) return B is
1625 pragma Assert (Is_Record_Type (Id));
1626 return Flag65 (Implementation_Base_Type (Id));
1627 end Has_Record_Rep_Clause;
1629 function Has_Recursive_Call (Id : E) return B is
1631 pragma Assert (Is_Subprogram (Id));
1632 return Flag143 (Id);
1633 end Has_Recursive_Call;
1635 function Has_Size_Clause (Id : E) return B is
1638 end Has_Size_Clause;
1640 function Has_Small_Clause (Id : E) return B is
1643 end Has_Small_Clause;
1645 function Has_Specified_Layout (Id : E) return B is
1647 pragma Assert (Is_Type (Id));
1648 return Flag100 (Implementation_Base_Type (Id));
1649 end Has_Specified_Layout;
1651 function Has_Specified_Stream_Input (Id : E) return B is
1653 pragma Assert (Is_Type (Id));
1654 return Flag190 (Id);
1655 end Has_Specified_Stream_Input;
1657 function Has_Specified_Stream_Output (Id : E) return B is
1659 pragma Assert (Is_Type (Id));
1660 return Flag191 (Id);
1661 end Has_Specified_Stream_Output;
1663 function Has_Specified_Stream_Read (Id : E) return B is
1665 pragma Assert (Is_Type (Id));
1666 return Flag192 (Id);
1667 end Has_Specified_Stream_Read;
1669 function Has_Specified_Stream_Write (Id : E) return B is
1671 pragma Assert (Is_Type (Id));
1672 return Flag193 (Id);
1673 end Has_Specified_Stream_Write;
1675 function Has_Static_Discriminants (Id : E) return B is
1677 pragma Assert (Is_Type (Id));
1678 return Flag211 (Id);
1679 end Has_Static_Discriminants;
1681 function Has_Static_Predicate_Aspect (Id : E) return B is
1683 pragma Assert (Is_Type (Id));
1684 return Flag259 (Id);
1685 end Has_Static_Predicate_Aspect;
1687 function Has_Storage_Size_Clause (Id : E) return B is
1689 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1690 return Flag23 (Implementation_Base_Type (Id));
1691 end Has_Storage_Size_Clause;
1693 function Has_Stream_Size_Clause (Id : E) return B is
1695 return Flag184 (Id);
1696 end Has_Stream_Size_Clause;
1698 function Has_Task (Id : E) return B is
1700 return Flag30 (Base_Type (Id));
1703 function Has_Thunks (Id : E) return B is
1705 return Flag228 (Id);
1708 function Has_Unchecked_Union (Id : E) return B is
1710 return Flag123 (Base_Type (Id));
1711 end Has_Unchecked_Union;
1713 function Has_Unknown_Discriminants (Id : E) return B is
1715 pragma Assert (Is_Type (Id));
1717 end Has_Unknown_Discriminants;
1719 function Has_Up_Level_Access (Id : E) return B is
1722 (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
1723 return Flag215 (Id);
1724 end Has_Up_Level_Access;
1726 function Has_Volatile_Components (Id : E) return B is
1728 return Flag87 (Implementation_Base_Type (Id));
1729 end Has_Volatile_Components;
1731 function Has_Xref_Entry (Id : E) return B is
1733 return Flag182 (Id);
1736 function Hiding_Loop_Variable (Id : E) return E is
1738 pragma Assert (Ekind (Id) = E_Variable);
1740 end Hiding_Loop_Variable;
1742 function Homonym (Id : E) return E is
1747 function Interface_Alias (Id : E) return E is
1749 pragma Assert (Is_Subprogram (Id));
1751 end Interface_Alias;
1753 function Interfaces (Id : E) return L is
1755 pragma Assert (Is_Record_Type (Id));
1756 return Elist25 (Id);
1759 function In_Package_Body (Id : E) return B is
1762 end In_Package_Body;
1764 function In_Private_Part (Id : E) return B is
1767 end In_Private_Part;
1769 function In_Use (Id : E) return B is
1771 pragma Assert (Nkind (Id) in N_Entity);
1775 function Initialization_Statements (Id : E) return N is
1777 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
1779 end Initialization_Statements;
1781 function Integrity_Level (Id : E) return U is
1783 pragma Assert (Ekind (Id) = E_Abstract_State);
1785 end Integrity_Level;
1787 function Inner_Instances (Id : E) return L is
1789 return Elist23 (Id);
1790 end Inner_Instances;
1792 function Interface_Name (Id : E) return N is
1797 function Is_Abstract_Subprogram (Id : E) return B is
1799 pragma Assert (Is_Overloadable (Id));
1801 end Is_Abstract_Subprogram;
1803 function Is_Abstract_Type (Id : E) return B is
1805 pragma Assert (Is_Type (Id));
1806 return Flag146 (Id);
1807 end Is_Abstract_Type;
1809 function Is_Local_Anonymous_Access (Id : E) return B is
1811 pragma Assert (Is_Access_Type (Id));
1812 return Flag194 (Id);
1813 end Is_Local_Anonymous_Access;
1815 function Is_Access_Constant (Id : E) return B is
1817 pragma Assert (Is_Access_Type (Id));
1819 end Is_Access_Constant;
1821 function Is_Ada_2005_Only (Id : E) return B is
1823 return Flag185 (Id);
1824 end Is_Ada_2005_Only;
1826 function Is_Ada_2012_Only (Id : E) return B is
1828 return Flag199 (Id);
1829 end Is_Ada_2012_Only;
1831 function Is_Aliased (Id : E) return B is
1833 pragma Assert (Nkind (Id) in N_Entity);
1837 function Is_AST_Entry (Id : E) return B is
1839 pragma Assert (Is_Entry (Id));
1840 return Flag132 (Id);
1843 function Is_Asynchronous (Id : E) return B is
1845 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1847 end Is_Asynchronous;
1849 function Is_Atomic (Id : E) return B is
1854 function Is_Bit_Packed_Array (Id : E) return B is
1856 return Flag122 (Implementation_Base_Type (Id));
1857 end Is_Bit_Packed_Array;
1859 function Is_Called (Id : E) return B is
1861 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1862 return Flag102 (Id);
1865 function Is_Character_Type (Id : E) return B is
1868 end Is_Character_Type;
1870 function Is_Child_Unit (Id : E) return B is
1875 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1878 end Is_Class_Wide_Equivalent_Type;
1880 function Is_Compilation_Unit (Id : E) return B is
1882 return Flag149 (Id);
1883 end Is_Compilation_Unit;
1885 function Is_Completely_Hidden (Id : E) return B is
1887 pragma Assert (Ekind (Id) = E_Discriminant);
1888 return Flag103 (Id);
1889 end Is_Completely_Hidden;
1891 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1894 end Is_Constr_Subt_For_U_Nominal;
1896 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1898 return Flag141 (Id);
1899 end Is_Constr_Subt_For_UN_Aliased;
1901 function Is_Constrained (Id : E) return B is
1903 pragma Assert (Nkind (Id) in N_Entity);
1907 function Is_Constructor (Id : E) return B is
1912 function Is_Controlled (Id : E) return B is
1914 return Flag42 (Base_Type (Id));
1917 function Is_Controlling_Formal (Id : E) return B is
1919 pragma Assert (Is_Formal (Id));
1921 end Is_Controlling_Formal;
1923 function Is_CPP_Class (Id : E) return B is
1928 function Is_Descendent_Of_Address (Id : E) return B is
1930 pragma Assert (Is_Type (Id));
1931 return Flag223 (Id);
1932 end Is_Descendent_Of_Address;
1934 function Is_Discrim_SO_Function (Id : E) return B is
1936 return Flag176 (Id);
1937 end Is_Discrim_SO_Function;
1939 function Is_Dispatch_Table_Entity (Id : E) return B is
1941 return Flag234 (Id);
1942 end Is_Dispatch_Table_Entity;
1944 function Is_Dispatching_Operation (Id : E) return B is
1946 pragma Assert (Nkind (Id) in N_Entity);
1948 end Is_Dispatching_Operation;
1950 function Is_Eliminated (Id : E) return B is
1952 return Flag124 (Id);
1955 function Is_Entry_Formal (Id : E) return B is
1958 end Is_Entry_Formal;
1960 function Is_Exported (Id : E) return B is
1965 function Is_First_Subtype (Id : E) return B is
1968 end Is_First_Subtype;
1970 function Is_For_Access_Subtype (Id : E) return B is
1972 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
1973 return Flag118 (Id);
1974 end Is_For_Access_Subtype;
1976 function Is_Formal_Subprogram (Id : E) return B is
1978 return Flag111 (Id);
1979 end Is_Formal_Subprogram;
1981 function Is_Frozen (Id : E) return B is
1986 function Is_Generic_Actual_Type (Id : E) return B is
1988 pragma Assert (Is_Type (Id));
1990 end Is_Generic_Actual_Type;
1992 function Is_Generic_Instance (Id : E) return B is
1994 return Flag130 (Id);
1995 end Is_Generic_Instance;
1997 function Is_Generic_Type (Id : E) return B is
1999 pragma Assert (Nkind (Id) in N_Entity);
2001 end Is_Generic_Type;
2003 function Is_Hidden (Id : E) return B is
2008 function Is_Hidden_Open_Scope (Id : E) return B is
2010 return Flag171 (Id);
2011 end Is_Hidden_Open_Scope;
2013 function Is_Immediately_Visible (Id : E) return B is
2015 pragma Assert (Nkind (Id) in N_Entity);
2017 end Is_Immediately_Visible;
2019 function Is_Implementation_Defined (Id : E) return B is
2021 return Flag254 (Id);
2022 end Is_Implementation_Defined;
2024 function Is_Imported (Id : E) return B is
2029 function Is_Inlined (Id : E) return B is
2034 function Is_Interface (Id : E) return B is
2036 return Flag186 (Id);
2039 function Is_Instantiated (Id : E) return B is
2041 return Flag126 (Id);
2042 end Is_Instantiated;
2044 function Is_Internal (Id : E) return B is
2046 pragma Assert (Nkind (Id) in N_Entity);
2050 function Is_Interrupt_Handler (Id : E) return B is
2052 pragma Assert (Nkind (Id) in N_Entity);
2054 end Is_Interrupt_Handler;
2056 function Is_Intrinsic_Subprogram (Id : E) return B is
2059 end Is_Intrinsic_Subprogram;
2061 function Is_Invariant_Procedure (Id : E) return B is
2063 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2064 return Flag257 (Id);
2065 end Is_Invariant_Procedure;
2067 function Is_Itype (Id : E) return B is
2072 function Is_Known_Non_Null (Id : E) return B is
2075 end Is_Known_Non_Null;
2077 function Is_Known_Null (Id : E) return B is
2079 return Flag204 (Id);
2082 function Is_Known_Valid (Id : E) return B is
2084 return Flag170 (Id);
2087 function Is_Limited_Composite (Id : E) return B is
2089 return Flag106 (Id);
2090 end Is_Limited_Composite;
2092 function Is_Limited_Interface (Id : E) return B is
2094 return Flag197 (Id);
2095 end Is_Limited_Interface;
2097 function Is_Limited_Record (Id : E) return B is
2100 end Is_Limited_Record;
2102 function Is_Machine_Code_Subprogram (Id : E) return B is
2104 pragma Assert (Is_Subprogram (Id));
2105 return Flag137 (Id);
2106 end Is_Machine_Code_Subprogram;
2108 function Is_Non_Static_Subtype (Id : E) return B is
2110 pragma Assert (Is_Type (Id));
2111 return Flag109 (Id);
2112 end Is_Non_Static_Subtype;
2114 function Is_Null_Init_Proc (Id : E) return B is
2116 pragma Assert (Ekind (Id) = E_Procedure);
2117 return Flag178 (Id);
2118 end Is_Null_Init_Proc;
2120 function Is_Obsolescent (Id : E) return B is
2122 return Flag153 (Id);
2125 function Is_Only_Out_Parameter (Id : E) return B is
2127 pragma Assert (Is_Formal (Id));
2128 return Flag226 (Id);
2129 end Is_Only_Out_Parameter;
2131 function Is_Optional_Parameter (Id : E) return B is
2133 pragma Assert (Is_Formal (Id));
2134 return Flag134 (Id);
2135 end Is_Optional_Parameter;
2137 function Is_Package_Body_Entity (Id : E) return B is
2139 return Flag160 (Id);
2140 end Is_Package_Body_Entity;
2142 function Is_Packed (Id : E) return B is
2144 return Flag51 (Implementation_Base_Type (Id));
2147 function Is_Packed_Array_Type (Id : E) return B is
2149 return Flag138 (Id);
2150 end Is_Packed_Array_Type;
2152 function Is_Potentially_Use_Visible (Id : E) return B is
2154 pragma Assert (Nkind (Id) in N_Entity);
2156 end Is_Potentially_Use_Visible;
2158 function Is_Predicate_Function (Id : E) return B is
2160 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2161 return Flag255 (Id);
2162 end Is_Predicate_Function;
2164 function Is_Predicate_Function_M (Id : E) return B is
2166 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2167 return Flag256 (Id);
2168 end Is_Predicate_Function_M;
2170 function Is_Preelaborated (Id : E) return B is
2173 end Is_Preelaborated;
2175 function Is_Primitive (Id : E) return B is
2178 (Is_Overloadable (Id)
2179 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
2180 return Flag218 (Id);
2183 function Is_Primitive_Wrapper (Id : E) return B is
2185 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2186 return Flag195 (Id);
2187 end Is_Primitive_Wrapper;
2189 function Is_Private_Composite (Id : E) return B is
2191 pragma Assert (Is_Type (Id));
2192 return Flag107 (Id);
2193 end Is_Private_Composite;
2195 function Is_Private_Descendant (Id : E) return B is
2198 end Is_Private_Descendant;
2200 function Is_Private_Primitive (Id : E) return B is
2202 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2203 return Flag245 (Id);
2204 end Is_Private_Primitive;
2206 function Is_Processed_Transient (Id : E) return B is
2208 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2209 return Flag252 (Id);
2210 end Is_Processed_Transient;
2212 function Is_Public (Id : E) return B is
2214 pragma Assert (Nkind (Id) in N_Entity);
2218 function Is_Pure (Id : E) return B is
2223 function Is_Pure_Unit_Access_Type (Id : E) return B is
2225 pragma Assert (Is_Access_Type (Id));
2226 return Flag189 (Id);
2227 end Is_Pure_Unit_Access_Type;
2229 function Is_RACW_Stub_Type (Id : E) return B is
2231 pragma Assert (Is_Type (Id));
2232 return Flag244 (Id);
2233 end Is_RACW_Stub_Type;
2235 function Is_Raised (Id : E) return B is
2237 pragma Assert (Ekind (Id) = E_Exception);
2238 return Flag224 (Id);
2241 function Is_Remote_Call_Interface (Id : E) return B is
2244 end Is_Remote_Call_Interface;
2246 function Is_Remote_Types (Id : E) return B is
2249 end Is_Remote_Types;
2251 function Is_Renaming_Of_Object (Id : E) return B is
2253 return Flag112 (Id);
2254 end Is_Renaming_Of_Object;
2256 function Is_Return_Object (Id : E) return B is
2258 return Flag209 (Id);
2259 end Is_Return_Object;
2261 function Is_Safe_To_Reevaluate (Id : E) return B is
2263 return Flag249 (Id);
2264 end Is_Safe_To_Reevaluate;
2266 function Is_Shared_Passive (Id : E) return B is
2269 end Is_Shared_Passive;
2271 function Is_Statically_Allocated (Id : E) return B is
2274 end Is_Statically_Allocated;
2276 function Is_Tag (Id : E) return B is
2278 pragma Assert (Nkind (Id) in N_Entity);
2282 function Is_Tagged_Type (Id : E) return B is
2287 function Is_Thunk (Id : E) return B is
2289 return Flag225 (Id);
2292 function Is_Trivial_Subprogram (Id : E) return B is
2294 return Flag235 (Id);
2295 end Is_Trivial_Subprogram;
2297 function Is_True_Constant (Id : E) return B is
2299 return Flag163 (Id);
2300 end Is_True_Constant;
2302 function Is_Unchecked_Union (Id : E) return B is
2304 return Flag117 (Implementation_Base_Type (Id));
2305 end Is_Unchecked_Union;
2307 function Is_Underlying_Record_View (Id : E) return B is
2309 return Flag246 (Id);
2310 end Is_Underlying_Record_View;
2312 function Is_Unsigned_Type (Id : E) return B is
2314 pragma Assert (Is_Type (Id));
2315 return Flag144 (Id);
2316 end Is_Unsigned_Type;
2318 function Is_Valued_Procedure (Id : E) return B is
2320 pragma Assert (Ekind (Id) = E_Procedure);
2321 return Flag127 (Id);
2322 end Is_Valued_Procedure;
2324 function Is_Visible_Formal (Id : E) return B is
2326 return Flag206 (Id);
2327 end Is_Visible_Formal;
2329 function Is_Visible_Lib_Unit (Id : E) return B is
2331 return Flag116 (Id);
2332 end Is_Visible_Lib_Unit;
2334 function Is_VMS_Exception (Id : E) return B is
2336 return Flag133 (Id);
2337 end Is_VMS_Exception;
2339 function Is_Volatile (Id : E) return B is
2341 pragma Assert (Nkind (Id) in N_Entity);
2343 if Is_Type (Id) then
2344 return Flag16 (Base_Type (Id));
2350 function Itype_Printed (Id : E) return B is
2352 pragma Assert (Is_Itype (Id));
2353 return Flag202 (Id);
2356 function Kill_Elaboration_Checks (Id : E) return B is
2359 end Kill_Elaboration_Checks;
2361 function Kill_Range_Checks (Id : E) return B is
2364 end Kill_Range_Checks;
2366 function Known_To_Have_Preelab_Init (Id : E) return B is
2368 pragma Assert (Is_Type (Id));
2369 return Flag207 (Id);
2370 end Known_To_Have_Preelab_Init;
2372 function Last_Assignment (Id : E) return N is
2374 pragma Assert (Is_Assignable (Id));
2376 end Last_Assignment;
2378 function Last_Entity (Id : E) return E is
2383 function Limited_View (Id : E) return E is
2385 pragma Assert (Ekind (Id) = E_Package);
2389 function Lit_Indexes (Id : E) return E is
2391 pragma Assert (Is_Enumeration_Type (Id));
2395 function Lit_Strings (Id : E) return E is
2397 pragma Assert (Is_Enumeration_Type (Id));
2401 function Low_Bound_Tested (Id : E) return B is
2403 return Flag205 (Id);
2404 end Low_Bound_Tested;
2406 function Machine_Radix_10 (Id : E) return B is
2408 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2410 end Machine_Radix_10;
2412 function Master_Id (Id : E) return E is
2414 pragma Assert (Is_Access_Type (Id));
2418 function Materialize_Entity (Id : E) return B is
2420 return Flag168 (Id);
2421 end Materialize_Entity;
2423 function Mechanism (Id : E) return M is
2425 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2426 return UI_To_Int (Uint8 (Id));
2429 function Modulus (Id : E) return Uint is
2431 pragma Assert (Is_Modular_Integer_Type (Id));
2432 return Uint17 (Base_Type (Id));
2435 function Must_Be_On_Byte_Boundary (Id : E) return B is
2437 pragma Assert (Is_Type (Id));
2438 return Flag183 (Id);
2439 end Must_Be_On_Byte_Boundary;
2441 function Must_Have_Preelab_Init (Id : E) return B is
2443 pragma Assert (Is_Type (Id));
2444 return Flag208 (Id);
2445 end Must_Have_Preelab_Init;
2447 function Needs_Debug_Info (Id : E) return B is
2449 return Flag147 (Id);
2450 end Needs_Debug_Info;
2452 function Needs_No_Actuals (Id : E) return B is
2455 (Is_Overloadable (Id)
2456 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2458 end Needs_No_Actuals;
2460 function Never_Set_In_Source (Id : E) return B is
2462 return Flag115 (Id);
2463 end Never_Set_In_Source;
2465 function Next_Inlined_Subprogram (Id : E) return E is
2468 end Next_Inlined_Subprogram;
2470 function No_Pool_Assigned (Id : E) return B is
2472 pragma Assert (Is_Access_Type (Id));
2473 return Flag131 (Root_Type (Id));
2474 end No_Pool_Assigned;
2476 function No_Return (Id : E) return B is
2478 return Flag113 (Id);
2481 function No_Strict_Aliasing (Id : E) return B is
2483 pragma Assert (Is_Access_Type (Id));
2484 return Flag136 (Base_Type (Id));
2485 end No_Strict_Aliasing;
2487 function Non_Binary_Modulus (Id : E) return B is
2489 pragma Assert (Is_Type (Id));
2490 return Flag58 (Base_Type (Id));
2491 end Non_Binary_Modulus;
2493 function Non_Limited_View (Id : E) return E is
2495 pragma Assert (Ekind (Id) in Incomplete_Kind);
2497 end Non_Limited_View;
2499 function Nonzero_Is_True (Id : E) return B is
2501 pragma Assert (Root_Type (Id) = Standard_Boolean);
2502 return Flag162 (Base_Type (Id));
2503 end Nonzero_Is_True;
2505 function Normalized_First_Bit (Id : E) return U is
2507 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2509 end Normalized_First_Bit;
2511 function Normalized_Position (Id : E) return U is
2513 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2515 end Normalized_Position;
2517 function Normalized_Position_Max (Id : E) return U is
2519 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2521 end Normalized_Position_Max;
2523 function OK_To_Rename (Id : E) return B is
2525 pragma Assert (Ekind (Id) = E_Variable);
2526 return Flag247 (Id);
2529 function OK_To_Reorder_Components (Id : E) return B is
2531 pragma Assert (Is_Record_Type (Id));
2532 return Flag239 (Base_Type (Id));
2533 end OK_To_Reorder_Components;
2535 function Optimize_Alignment_Space (Id : E) return B is
2538 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2539 return Flag241 (Id);
2540 end Optimize_Alignment_Space;
2542 function Optimize_Alignment_Time (Id : E) return B is
2545 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2546 return Flag242 (Id);
2547 end Optimize_Alignment_Time;
2549 function Original_Access_Type (Id : E) return E is
2551 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2553 end Original_Access_Type;
2555 function Original_Array_Type (Id : E) return E is
2557 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2559 end Original_Array_Type;
2561 function Original_Record_Component (Id : E) return E is
2563 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2565 end Original_Record_Component;
2567 function Overlays_Constant (Id : E) return B is
2569 return Flag243 (Id);
2570 end Overlays_Constant;
2572 function Overridden_Operation (Id : E) return E is
2575 end Overridden_Operation;
2577 function Package_Instantiation (Id : E) return N is
2579 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2581 end Package_Instantiation;
2583 function Packed_Array_Type (Id : E) return E is
2585 pragma Assert (Is_Array_Type (Id));
2587 end Packed_Array_Type;
2589 function Parent_Subtype (Id : E) return E is
2591 pragma Assert (Is_Record_Type (Id));
2592 return Node19 (Base_Type (Id));
2595 function Postcondition_Proc (Id : E) return E is
2597 pragma Assert (Ekind (Id) = E_Procedure);
2599 end Postcondition_Proc;
2601 function PPC_Wrapper (Id : E) return E is
2603 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2607 function Prival (Id : E) return E is
2609 pragma Assert (Is_Protected_Component (Id));
2613 function Prival_Link (Id : E) return E is
2615 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2619 function Private_Dependents (Id : E) return L is
2621 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2622 return Elist18 (Id);
2623 end Private_Dependents;
2625 function Private_View (Id : E) return N is
2627 pragma Assert (Is_Private_Type (Id));
2631 function Protected_Body_Subprogram (Id : E) return E is
2633 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2635 end Protected_Body_Subprogram;
2637 function Protected_Formal (Id : E) return E is
2639 pragma Assert (Is_Formal (Id));
2641 end Protected_Formal;
2643 function Protection_Object (Id : E) return E is
2646 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2648 end Protection_Object;
2650 function Reachable (Id : E) return B is
2655 function Referenced (Id : E) return B is
2657 return Flag156 (Id);
2660 function Referenced_As_LHS (Id : E) return B is
2663 end Referenced_As_LHS;
2665 function Referenced_As_Out_Parameter (Id : E) return B is
2667 return Flag227 (Id);
2668 end Referenced_As_Out_Parameter;
2670 function Refined_State (Id : E) return E is
2672 pragma Assert (Ekind (Id) = E_Abstract_State);
2676 function Register_Exception_Call (Id : E) return N is
2678 pragma Assert (Ekind (Id) = E_Exception);
2680 end Register_Exception_Call;
2682 function Related_Array_Object (Id : E) return E is
2684 pragma Assert (Is_Array_Type (Id));
2686 end Related_Array_Object;
2688 function Related_Expression (Id : E) return N is
2690 pragma Assert (Ekind (Id) in Type_Kind
2691 or else Ekind_In (Id, E_Constant, E_Variable));
2693 end Related_Expression;
2695 function Related_Instance (Id : E) return E is
2697 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2699 end Related_Instance;
2701 function Related_Type (Id : E) return E is
2703 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2707 function Relative_Deadline_Variable (Id : E) return E is
2709 pragma Assert (Is_Task_Type (Id));
2710 return Node26 (Implementation_Base_Type (Id));
2711 end Relative_Deadline_Variable;
2713 function Renamed_Entity (Id : E) return N is
2718 function Renamed_In_Spec (Id : E) return B is
2720 pragma Assert (Ekind (Id) = E_Package);
2721 return Flag231 (Id);
2722 end Renamed_In_Spec;
2724 function Renamed_Object (Id : E) return N is
2729 function Renaming_Map (Id : E) return U is
2734 function Requires_Overriding (Id : E) return B is
2736 pragma Assert (Is_Overloadable (Id));
2737 return Flag213 (Id);
2738 end Requires_Overriding;
2740 function Return_Present (Id : E) return B is
2745 function Return_Applies_To (Id : E) return N is
2748 end Return_Applies_To;
2750 function Returns_By_Ref (Id : E) return B is
2755 function Reverse_Bit_Order (Id : E) return B is
2757 pragma Assert (Is_Record_Type (Id));
2758 return Flag164 (Base_Type (Id));
2759 end Reverse_Bit_Order;
2761 function Reverse_Storage_Order (Id : E) return B is
2763 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
2764 return Flag93 (Base_Type (Id));
2765 end Reverse_Storage_Order;
2767 function RM_Size (Id : E) return U is
2769 pragma Assert (Is_Type (Id));
2773 function Scalar_Range (Id : E) return N is
2778 function Scale_Value (Id : E) return U is
2783 function Scope_Depth_Value (Id : E) return U is
2786 end Scope_Depth_Value;
2788 function Sec_Stack_Needed_For_Return (Id : E) return B is
2790 return Flag167 (Id);
2791 end Sec_Stack_Needed_For_Return;
2793 function Shadow_Entities (Id : E) return S is
2795 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2797 end Shadow_Entities;
2799 function Shared_Var_Procs_Instance (Id : E) return E is
2801 pragma Assert (Ekind (Id) = E_Variable);
2803 end Shared_Var_Procs_Instance;
2805 function Size_Check_Code (Id : E) return N is
2807 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2809 end Size_Check_Code;
2811 function Size_Depends_On_Discriminant (Id : E) return B is
2813 return Flag177 (Id);
2814 end Size_Depends_On_Discriminant;
2816 function Size_Known_At_Compile_Time (Id : E) return B is
2819 end Size_Known_At_Compile_Time;
2821 function Small_Value (Id : E) return R is
2823 pragma Assert (Is_Fixed_Point_Type (Id));
2824 return Ureal21 (Id);
2827 function Spec_Entity (Id : E) return E is
2829 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2833 function Static_Predicate (Id : E) return S is
2835 pragma Assert (Is_Discrete_Type (Id));
2837 end Static_Predicate;
2839 function Status_Flag_Or_Transient_Decl (Id : E) return N is
2841 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2843 end Status_Flag_Or_Transient_Decl;
2845 function Storage_Size_Variable (Id : E) return E is
2847 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2848 return Node15 (Implementation_Base_Type (Id));
2849 end Storage_Size_Variable;
2851 function Static_Elaboration_Desired (Id : E) return B is
2853 pragma Assert (Ekind (Id) = E_Package);
2855 end Static_Elaboration_Desired;
2857 function Static_Initialization (Id : E) return N is
2860 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
2862 end Static_Initialization;
2864 function Stored_Constraint (Id : E) return L is
2867 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
2868 return Elist23 (Id);
2869 end Stored_Constraint;
2871 function Strict_Alignment (Id : E) return B is
2873 return Flag145 (Implementation_Base_Type (Id));
2874 end Strict_Alignment;
2876 function String_Literal_Length (Id : E) return U is
2879 end String_Literal_Length;
2881 function String_Literal_Low_Bound (Id : E) return N is
2884 end String_Literal_Low_Bound;
2886 function Subprograms_For_Type (Id : E) return E is
2888 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
2890 end Subprograms_For_Type;
2892 function Suppress_Elaboration_Warnings (Id : E) return B is
2894 return Flag148 (Id);
2895 end Suppress_Elaboration_Warnings;
2897 function Suppress_Initialization (Id : E) return B is
2899 pragma Assert (Is_Type (Id));
2900 return Flag105 (Id);
2901 end Suppress_Initialization;
2903 function Suppress_Style_Checks (Id : E) return B is
2905 return Flag165 (Id);
2906 end Suppress_Style_Checks;
2908 function Suppress_Value_Tracking_On_Call (Id : E) return B is
2910 return Flag217 (Id);
2911 end Suppress_Value_Tracking_On_Call;
2913 function Task_Body_Procedure (Id : E) return N is
2915 pragma Assert (Ekind (Id) in Task_Kind);
2917 end Task_Body_Procedure;
2919 function Thunk_Entity (Id : E) return E is
2921 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
2922 and then Is_Thunk (Id));
2926 function Treat_As_Volatile (Id : E) return B is
2929 end Treat_As_Volatile;
2931 function Underlying_Full_View (Id : E) return E is
2933 pragma Assert (Ekind (Id) in Private_Kind);
2935 end Underlying_Full_View;
2937 function Underlying_Record_View (Id : E) return E is
2940 end Underlying_Record_View;
2942 function Universal_Aliasing (Id : E) return B is
2944 pragma Assert (Is_Type (Id));
2945 return Flag216 (Implementation_Base_Type (Id));
2946 end Universal_Aliasing;
2948 function Unset_Reference (Id : E) return N is
2951 end Unset_Reference;
2953 function Used_As_Generic_Actual (Id : E) return B is
2955 return Flag222 (Id);
2956 end Used_As_Generic_Actual;
2958 function Uses_Lock_Free (Id : E) return B is
2960 pragma Assert (Is_Protected_Type (Id));
2961 return Flag188 (Id);
2964 function Uses_Sec_Stack (Id : E) return B is
2969 function Warnings_Off (Id : E) return B is
2974 function Warnings_Off_Used (Id : E) return B is
2976 return Flag236 (Id);
2977 end Warnings_Off_Used;
2979 function Warnings_Off_Used_Unmodified (Id : E) return B is
2981 return Flag237 (Id);
2982 end Warnings_Off_Used_Unmodified;
2984 function Warnings_Off_Used_Unreferenced (Id : E) return B is
2986 return Flag238 (Id);
2987 end Warnings_Off_Used_Unreferenced;
2989 function Wrapped_Entity (Id : E) return E is
2991 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
2992 and then Is_Primitive_Wrapper (Id));
2996 function Was_Hidden (Id : E) return B is
2998 return Flag196 (Id);
3001 ------------------------------
3002 -- Classification Functions --
3003 ------------------------------
3005 function Is_Access_Type (Id : E) return B is
3007 return Ekind (Id) in Access_Kind;
3010 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
3012 return Ekind (Id) in Access_Protected_Kind;
3013 end Is_Access_Protected_Subprogram_Type;
3015 function Is_Access_Subprogram_Type (Id : E) return B is
3017 return Ekind (Id) in Access_Subprogram_Kind;
3018 end Is_Access_Subprogram_Type;
3020 function Is_Aggregate_Type (Id : E) return B is
3022 return Ekind (Id) in Aggregate_Kind;
3023 end Is_Aggregate_Type;
3025 function Is_Array_Type (Id : E) return B is
3027 return Ekind (Id) in Array_Kind;
3030 function Is_Assignable (Id : E) return B is
3032 return Ekind (Id) in Assignable_Kind;
3035 function Is_Class_Wide_Type (Id : E) return B is
3037 return Ekind (Id) in Class_Wide_Kind;
3038 end Is_Class_Wide_Type;
3040 function Is_Composite_Type (Id : E) return B is
3042 return Ekind (Id) in Composite_Kind;
3043 end Is_Composite_Type;
3045 function Is_Concurrent_Body (Id : E) return B is
3047 return Ekind (Id) in
3048 Concurrent_Body_Kind;
3049 end Is_Concurrent_Body;
3051 function Is_Concurrent_Record_Type (Id : E) return B is
3054 end Is_Concurrent_Record_Type;
3056 function Is_Concurrent_Type (Id : E) return B is
3058 return Ekind (Id) in Concurrent_Kind;
3059 end Is_Concurrent_Type;
3061 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
3063 return Ekind (Id) in
3064 Decimal_Fixed_Point_Kind;
3065 end Is_Decimal_Fixed_Point_Type;
3067 function Is_Digits_Type (Id : E) return B is
3069 return Ekind (Id) in Digits_Kind;
3072 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
3074 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
3075 end Is_Discrete_Or_Fixed_Point_Type;
3077 function Is_Discrete_Type (Id : E) return B is
3079 return Ekind (Id) in Discrete_Kind;
3080 end Is_Discrete_Type;
3082 function Is_Elementary_Type (Id : E) return B is
3084 return Ekind (Id) in Elementary_Kind;
3085 end Is_Elementary_Type;
3087 function Is_Entry (Id : E) return B is
3089 return Ekind (Id) in Entry_Kind;
3092 function Is_Enumeration_Type (Id : E) return B is
3094 return Ekind (Id) in
3096 end Is_Enumeration_Type;
3098 function Is_Fixed_Point_Type (Id : E) return B is
3100 return Ekind (Id) in
3102 end Is_Fixed_Point_Type;
3104 function Is_Floating_Point_Type (Id : E) return B is
3106 return Ekind (Id) in Float_Kind;
3107 end Is_Floating_Point_Type;
3109 function Is_Formal (Id : E) return B is
3111 return Ekind (Id) in Formal_Kind;
3114 function Is_Formal_Object (Id : E) return B is
3116 return Ekind (Id) in Formal_Object_Kind;
3117 end Is_Formal_Object;
3119 function Is_Generic_Subprogram (Id : E) return B is
3121 return Ekind (Id) in Generic_Subprogram_Kind;
3122 end Is_Generic_Subprogram;
3124 function Is_Generic_Unit (Id : E) return B is
3126 return Ekind (Id) in Generic_Unit_Kind;
3127 end Is_Generic_Unit;
3129 function Is_Incomplete_Or_Private_Type (Id : E) return B is
3131 return Ekind (Id) in
3132 Incomplete_Or_Private_Kind;
3133 end Is_Incomplete_Or_Private_Type;
3135 function Is_Incomplete_Type (Id : E) return B is
3137 return Ekind (Id) in
3139 end Is_Incomplete_Type;
3141 function Is_Integer_Type (Id : E) return B is
3143 return Ekind (Id) in Integer_Kind;
3144 end Is_Integer_Type;
3146 function Is_Modular_Integer_Type (Id : E) return B is
3148 return Ekind (Id) in
3149 Modular_Integer_Kind;
3150 end Is_Modular_Integer_Type;
3152 function Is_Named_Number (Id : E) return B is
3154 return Ekind (Id) in Named_Kind;
3155 end Is_Named_Number;
3157 function Is_Numeric_Type (Id : E) return B is
3159 return Ekind (Id) in Numeric_Kind;
3160 end Is_Numeric_Type;
3162 function Is_Object (Id : E) return B is
3164 return Ekind (Id) in Object_Kind;
3167 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
3169 return Ekind (Id) in
3170 Ordinary_Fixed_Point_Kind;
3171 end Is_Ordinary_Fixed_Point_Type;
3173 function Is_Overloadable (Id : E) return B is
3175 return Ekind (Id) in Overloadable_Kind;
3176 end Is_Overloadable;
3178 function Is_Private_Type (Id : E) return B is
3180 return Ekind (Id) in Private_Kind;
3181 end Is_Private_Type;
3183 function Is_Protected_Type (Id : E) return B is
3185 return Ekind (Id) in Protected_Kind;
3186 end Is_Protected_Type;
3188 function Is_Real_Type (Id : E) return B is
3190 return Ekind (Id) in Real_Kind;
3193 function Is_Record_Type (Id : E) return B is
3195 return Ekind (Id) in Record_Kind;
3198 function Is_Scalar_Type (Id : E) return B is
3200 return Ekind (Id) in Scalar_Kind;
3203 function Is_Signed_Integer_Type (Id : E) return B is
3205 return Ekind (Id) in Signed_Integer_Kind;
3206 end Is_Signed_Integer_Type;
3208 function Is_Subprogram (Id : E) return B is
3210 return Ekind (Id) in Subprogram_Kind;
3213 function Is_Task_Type (Id : E) return B is
3215 return Ekind (Id) in Task_Kind;
3218 function Is_Type (Id : E) return B is
3220 return Ekind (Id) in Type_Kind;
3223 ------------------------------
3224 -- Attribute Set Procedures --
3225 ------------------------------
3227 -- Note: in many of these set procedures an "obvious" assertion is missing.
3228 -- The reason for this is that in many cases, a field is set before the
3229 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3230 -- it is possible to add assertions that specifically include the E_Void
3231 -- possibility, but in some cases, we just omit the assertions.
3233 procedure Set_Abstract_States (Id : E; V : L) is
3235 pragma Assert (Ekind (Id) = E_Package);
3236 Set_Elist25 (Id, V);
3237 end Set_Abstract_States;
3239 procedure Set_Accept_Address (Id : E; V : L) is
3241 Set_Elist21 (Id, V);
3242 end Set_Accept_Address;
3244 procedure Set_Access_Disp_Table (Id : E; V : L) is
3246 pragma Assert (Ekind (Id) = E_Record_Type
3247 and then Id = Implementation_Base_Type (Id));
3248 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3249 Set_Elist16 (Id, V);
3250 end Set_Access_Disp_Table;
3252 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3255 end Set_Associated_Formal_Package;
3257 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3260 end Set_Associated_Node_For_Itype;
3262 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3264 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3266 end Set_Associated_Storage_Pool;
3268 procedure Set_Actual_Subtype (Id : E; V : E) is
3271 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3272 or else Is_Formal (Id));
3274 end Set_Actual_Subtype;
3276 procedure Set_Address_Taken (Id : E; V : B := True) is
3278 Set_Flag104 (Id, V);
3279 end Set_Address_Taken;
3281 procedure Set_Alias (Id : E; V : E) is
3284 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3288 procedure Set_Alignment (Id : E; V : U) is
3290 pragma Assert (Is_Type (Id)
3291 or else Is_Formal (Id)
3292 or else Ekind_In (Id, E_Loop_Parameter,
3299 procedure Set_Barrier_Function (Id : E; V : N) is
3301 pragma Assert (Is_Entry (Id));
3303 end Set_Barrier_Function;
3305 procedure Set_Block_Node (Id : E; V : N) is
3307 pragma Assert (Ekind (Id) = E_Block);
3311 procedure Set_Body_Entity (Id : E; V : E) is
3313 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3315 end Set_Body_Entity;
3317 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3320 (Ekind (Id) = E_Package
3321 or else Is_Subprogram (Id)
3322 or else Is_Generic_Unit (Id));
3324 end Set_Body_Needed_For_SAL;
3326 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3328 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3329 Set_Flag125 (Id, V);
3330 end Set_C_Pass_By_Copy;
3332 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3335 end Set_Can_Never_Be_Null;
3337 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3340 end Set_Checks_May_Be_Suppressed;
3342 procedure Set_Class_Wide_Type (Id : E; V : E) is
3344 pragma Assert (Is_Type (Id));
3346 end Set_Class_Wide_Type;
3348 procedure Set_Cloned_Subtype (Id : E; V : E) is
3350 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3352 end Set_Cloned_Subtype;
3354 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3356 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3358 end Set_Component_Bit_Offset;
3360 procedure Set_Component_Clause (Id : E; V : N) is
3362 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3364 end Set_Component_Clause;
3366 procedure Set_Component_Size (Id : E; V : U) is
3368 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3370 end Set_Component_Size;
3372 procedure Set_Component_Type (Id : E; V : E) is
3374 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3376 end Set_Component_Type;
3378 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3381 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3383 end Set_Corresponding_Concurrent_Type;
3385 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3387 pragma Assert (Ekind (Id) = E_Discriminant);
3389 end Set_Corresponding_Discriminant;
3391 procedure Set_Corresponding_Equality (Id : E; V : E) is
3394 (Ekind (Id) = E_Function
3395 and then not Comes_From_Source (Id)
3396 and then Chars (Id) = Name_Op_Ne);
3398 end Set_Corresponding_Equality;
3400 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3402 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3404 end Set_Corresponding_Protected_Entry;
3406 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3408 pragma Assert (Is_Concurrent_Type (Id));
3410 end Set_Corresponding_Record_Type;
3412 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3415 end Set_Corresponding_Remote_Type;
3417 procedure Set_Current_Use_Clause (Id : E; V : E) is
3419 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3421 end Set_Current_Use_Clause;
3423 procedure Set_Current_Value (Id : E; V : N) is
3425 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3427 end Set_Current_Value;
3429 procedure Set_CR_Discriminant (Id : E; V : E) is
3432 end Set_CR_Discriminant;
3434 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3436 Set_Flag166 (Id, V);
3437 end Set_Debug_Info_Off;
3439 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3442 end Set_Debug_Renaming_Link;
3444 procedure Set_Default_Aspect_Component_Value (Id : E; V : E) is
3446 pragma Assert (Is_Array_Type (Id));
3448 end Set_Default_Aspect_Component_Value;
3450 procedure Set_Default_Aspect_Value (Id : E; V : E) is
3452 pragma Assert (Is_Scalar_Type (Id));
3454 end Set_Default_Aspect_Value;
3456 procedure Set_Default_Expr_Function (Id : E; V : E) is
3458 pragma Assert (Is_Formal (Id));
3460 end Set_Default_Expr_Function;
3462 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3464 Set_Flag108 (Id, V);
3465 end Set_Default_Expressions_Processed;
3467 procedure Set_Default_Value (Id : E; V : N) is
3469 pragma Assert (Is_Formal (Id));
3471 end Set_Default_Value;
3473 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3477 or else Is_Task_Type (Id)
3478 or else Ekind (Id) = E_Block);
3479 Set_Flag114 (Id, V);
3480 end Set_Delay_Cleanups;
3482 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3485 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3488 end Set_Delay_Subprogram_Descriptors;
3490 procedure Set_Delta_Value (Id : E; V : R) is
3492 pragma Assert (Is_Fixed_Point_Type (Id));
3493 Set_Ureal18 (Id, V);
3494 end Set_Delta_Value;
3496 procedure Set_Dependent_Instances (Id : E; V : L) is
3498 pragma Assert (Is_Generic_Instance (Id));
3500 end Set_Dependent_Instances;
3502 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3504 pragma Assert (Nkind (Id) in N_Entity);
3506 end Set_Depends_On_Private;
3508 procedure Set_Digits_Value (Id : E; V : U) is
3511 (Is_Floating_Point_Type (Id)
3512 or else Is_Decimal_Fixed_Point_Type (Id));
3514 end Set_Digits_Value;
3516 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3519 end Set_Directly_Designated_Type;
3521 procedure Set_Discard_Names (Id : E; V : B := True) is
3524 end Set_Discard_Names;
3526 procedure Set_Discriminal (Id : E; V : E) is
3528 pragma Assert (Ekind (Id) = E_Discriminant);
3530 end Set_Discriminal;
3532 procedure Set_Discriminal_Link (Id : E; V : E) is
3535 end Set_Discriminal_Link;
3537 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3539 pragma Assert (Ekind (Id) = E_Component);
3541 end Set_Discriminant_Checking_Func;
3543 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3545 pragma Assert (Nkind (Id) in N_Entity);
3546 Set_Elist21 (Id, V);
3547 end Set_Discriminant_Constraint;
3549 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3552 end Set_Discriminant_Default_Value;
3554 procedure Set_Discriminant_Number (Id : E; V : U) is
3557 end Set_Discriminant_Number;
3559 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3561 pragma Assert (Ekind (Id) = E_Record_Type
3562 and then Id = Implementation_Base_Type (Id));
3563 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3564 Set_Elist26 (Id, V);
3565 end Set_Dispatch_Table_Wrappers;
3567 procedure Set_DT_Entry_Count (Id : E; V : U) is
3569 pragma Assert (Ekind (Id) = E_Component);
3571 end Set_DT_Entry_Count;
3573 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3575 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3577 end Set_DT_Offset_To_Top_Func;
3579 procedure Set_DT_Position (Id : E; V : U) is
3581 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3583 end Set_DT_Position;
3585 procedure Set_DTC_Entity (Id : E; V : E) is
3587 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3591 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3593 pragma Assert (Ekind (Id) = E_Package);
3594 Set_Flag210 (Id, V);
3595 end Set_Elaborate_Body_Desirable;
3597 procedure Set_Elaboration_Entity (Id : E; V : E) is
3602 Ekind (Id) = E_Package
3604 Is_Generic_Unit (Id));
3606 end Set_Elaboration_Entity;
3608 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3613 Ekind (Id) = E_Package
3615 Is_Generic_Unit (Id));
3616 Set_Flag174 (Id, V);
3617 end Set_Elaboration_Entity_Required;
3619 procedure Set_Enclosing_Scope (Id : E; V : E) is
3622 end Set_Enclosing_Scope;
3624 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3626 pragma Assert (Is_Entry (Id));
3627 Set_Flag152 (Id, V);
3628 end Set_Entry_Accepted;
3630 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3633 end Set_Entry_Bodies_Array;
3635 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3638 end Set_Entry_Cancel_Parameter;
3640 procedure Set_Entry_Component (Id : E; V : E) is
3643 end Set_Entry_Component;
3645 procedure Set_Entry_Formal (Id : E; V : E) is
3648 end Set_Entry_Formal;
3650 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3652 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3654 end Set_Entry_Index_Constant;
3656 procedure Set_Contract (Id : E; V : N) is
3659 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Void)
3660 or else Is_Subprogram (Id)
3661 or else Is_Generic_Subprogram (Id));
3665 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3668 end Set_Entry_Parameters_Type;
3670 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3672 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3674 end Set_Enum_Pos_To_Rep;
3676 procedure Set_Enumeration_Pos (Id : E; V : U) is
3678 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3680 end Set_Enumeration_Pos;
3682 procedure Set_Enumeration_Rep (Id : E; V : U) is
3684 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3686 end Set_Enumeration_Rep;
3688 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3690 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3692 end Set_Enumeration_Rep_Expr;
3694 procedure Set_Equivalent_Type (Id : E; V : E) is
3697 (Ekind_In (Id, E_Class_Wide_Type,
3698 E_Class_Wide_Subtype,
3699 E_Access_Protected_Subprogram_Type,
3700 E_Anonymous_Access_Protected_Subprogram_Type,
3701 E_Access_Subprogram_Type,
3704 end Set_Equivalent_Type;
3706 procedure Set_Esize (Id : E; V : U) is
3711 procedure Set_Exception_Code (Id : E; V : U) is
3713 pragma Assert (Ekind (Id) = E_Exception);
3715 end Set_Exception_Code;
3717 procedure Set_Extra_Accessibility (Id : E; V : E) is
3720 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
3722 end Set_Extra_Accessibility;
3724 procedure Set_Extra_Accessibility_Of_Result (Id : E; V : E) is
3726 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
3728 end Set_Extra_Accessibility_Of_Result;
3730 procedure Set_Extra_Constrained (Id : E; V : E) is
3732 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3734 end Set_Extra_Constrained;
3736 procedure Set_Extra_Formal (Id : E; V : E) is
3739 end Set_Extra_Formal;
3741 procedure Set_Extra_Formals (Id : E; V : E) is
3744 (Is_Overloadable (Id)
3745 or else Ekind_In (Id, E_Entry_Family,
3747 E_Subprogram_Type));
3749 end Set_Extra_Formals;
3751 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3754 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3755 Set_Flag229 (Id, V);
3756 end Set_Can_Use_Internal_Rep;
3758 procedure Set_Finalization_Master (Id : E; V : E) is
3760 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3762 end Set_Finalization_Master;
3764 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3766 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3767 Set_Flag158 (Id, V);
3768 end Set_Finalize_Storage_Only;
3770 procedure Set_Finalizer (Id : E; V : E) is
3773 (Ekind (Id) = E_Package
3774 or else Ekind (Id) = E_Package_Body);
3778 procedure Set_First_Entity (Id : E; V : E) is
3781 end Set_First_Entity;
3783 procedure Set_First_Exit_Statement (Id : E; V : N) is
3785 pragma Assert (Ekind (Id) = E_Loop);
3787 end Set_First_Exit_Statement;
3789 procedure Set_First_Index (Id : E; V : N) is
3791 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3793 end Set_First_Index;
3795 procedure Set_First_Literal (Id : E; V : E) is
3797 pragma Assert (Is_Enumeration_Type (Id));
3799 end Set_First_Literal;
3801 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3803 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3805 end Set_First_Optional_Parameter;
3807 procedure Set_First_Private_Entity (Id : E; V : E) is
3809 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
3810 or else Ekind (Id) in Concurrent_Kind);
3812 end Set_First_Private_Entity;
3814 procedure Set_First_Rep_Item (Id : E; V : N) is
3817 end Set_First_Rep_Item;
3819 procedure Set_Float_Rep (Id : E; V : F) is
3820 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
3822 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
3825 procedure Set_Freeze_Node (Id : E; V : N) is
3828 end Set_Freeze_Node;
3830 procedure Set_From_With_Type (Id : E; V : B := True) is
3834 or else Ekind (Id) = E_Package);
3835 Set_Flag159 (Id, V);
3836 end Set_From_With_Type;
3838 procedure Set_Full_View (Id : E; V : E) is
3840 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
3844 procedure Set_Generic_Homonym (Id : E; V : E) is
3847 end Set_Generic_Homonym;
3849 procedure Set_Generic_Renamings (Id : E; V : L) is
3851 Set_Elist23 (Id, V);
3852 end Set_Generic_Renamings;
3854 procedure Set_Handler_Records (Id : E; V : S) is
3857 end Set_Handler_Records;
3859 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
3861 pragma Assert (Id = Base_Type (Id));
3862 Set_Flag135 (Id, V);
3863 end Set_Has_Aliased_Components;
3865 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
3868 end Set_Has_Alignment_Clause;
3870 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
3873 end Set_Has_All_Calls_Remote;
3875 procedure Set_Has_Anonymous_Master (Id : E; V : B := True) is
3878 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
3879 Set_Flag253 (Id, V);
3880 end Set_Has_Anonymous_Master;
3882 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
3884 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
3886 end Set_Has_Atomic_Components;
3888 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
3891 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
3892 Set_Flag139 (Id, V);
3893 end Set_Has_Biased_Representation;
3895 procedure Set_Has_Completion (Id : E; V : B := True) is
3898 end Set_Has_Completion;
3900 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
3902 pragma Assert (Is_Type (Id));
3904 end Set_Has_Completion_In_Body;
3906 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
3908 pragma Assert (Ekind (Id) = E_Record_Type);
3909 Set_Flag140 (Id, V);
3910 end Set_Has_Complex_Representation;
3912 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
3914 pragma Assert (Ekind (Id) = E_Array_Type);
3916 end Set_Has_Component_Size_Clause;
3918 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
3920 pragma Assert (Is_Type (Id));
3921 Set_Flag187 (Id, V);
3922 end Set_Has_Constrained_Partial_View;
3924 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
3926 Set_Flag181 (Id, V);
3927 end Set_Has_Contiguous_Rep;
3929 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
3931 pragma Assert (Id = Base_Type (Id));
3933 end Set_Has_Controlled_Component;
3935 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
3938 end Set_Has_Controlling_Result;
3940 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
3942 Set_Flag119 (Id, V);
3943 end Set_Has_Convention_Pragma;
3945 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
3948 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
3949 and then Is_Base_Type (Id));
3951 end Set_Has_Default_Aspect;
3953 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
3955 pragma Assert (Nkind (Id) in N_Entity);
3956 Set_Flag200 (Id, V);
3957 end Set_Has_Delayed_Aspects;
3959 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
3961 pragma Assert (Nkind (Id) in N_Entity);
3963 end Set_Has_Delayed_Freeze;
3965 procedure Set_Has_Discriminants (Id : E; V : B := True) is
3967 pragma Assert (Nkind (Id) in N_Entity);
3969 end Set_Has_Discriminants;
3971 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
3973 pragma Assert (Ekind (Id) = E_Record_Type
3974 and then Is_Tagged_Type (Id));
3975 Set_Flag220 (Id, V);
3976 end Set_Has_Dispatch_Table;
3978 procedure Set_Has_Dynamic_Predicate_Aspect (Id : E; V : B := True) is
3980 pragma Assert (Is_Type (Id));
3981 Set_Flag258 (Id, V);
3982 end Set_Has_Dynamic_Predicate_Aspect;
3984 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
3986 pragma Assert (Is_Enumeration_Type (Id));
3988 end Set_Has_Enumeration_Rep_Clause;
3990 procedure Set_Has_Exit (Id : E; V : B := True) is
3995 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True) is
3997 pragma Assert (Is_Tagged_Type (Id));
3998 Set_Flag110 (Id, V);
3999 end Set_Has_External_Tag_Rep_Clause;
4001 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
4003 Set_Flag175 (Id, V);
4004 end Set_Has_Forward_Instantiation;
4006 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
4008 Set_Flag173 (Id, V);
4009 end Set_Has_Fully_Qualified_Name;
4011 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
4014 end Set_Has_Gigi_Rep_Item;
4016 procedure Set_Has_Homonym (Id : E; V : B := True) is
4019 end Set_Has_Homonym;
4021 procedure Set_Has_Implicit_Dereference (Id : E; V : B := True) is
4023 Set_Flag251 (Id, V);
4024 end Set_Has_Implicit_Dereference;
4026 procedure Set_Has_Independent_Components (Id : E; V : B := True) is
4028 pragma Assert (Is_Object (Id) or else Is_Type (Id));
4030 end Set_Has_Independent_Components;
4032 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
4034 pragma Assert (Is_Type (Id));
4035 Set_Flag248 (Id, V);
4036 end Set_Has_Inheritable_Invariants;
4038 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
4040 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
4041 Set_Flag219 (Id, V);
4042 end Set_Has_Initial_Value;
4044 procedure Set_Has_Invariants (Id : E; V : B := True) is
4046 pragma Assert (Is_Type (Id));
4047 Set_Flag232 (Id, V);
4048 end Set_Has_Invariants;
4050 procedure Set_Has_Loop_Entry_Attributes (Id : E; V : B := True) is
4052 pragma Assert (Ekind (Id) = E_Loop);
4053 Set_Flag260 (Id, V);
4054 end Set_Has_Loop_Entry_Attributes;
4056 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
4058 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4060 end Set_Has_Machine_Radix_Clause;
4062 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
4065 end Set_Has_Master_Entity;
4067 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
4069 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4070 Set_Flag142 (Id, V);
4071 end Set_Has_Missing_Return;
4073 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
4075 Set_Flag101 (Id, V);
4076 end Set_Has_Nested_Block_With_Handler;
4078 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
4080 pragma Assert (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
4081 Set_Flag215 (Id, V);
4082 end Set_Has_Up_Level_Access;
4084 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
4086 pragma Assert (Id = Base_Type (Id));
4088 end Set_Has_Non_Standard_Rep;
4090 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
4092 pragma Assert (Is_Type (Id));
4093 Set_Flag172 (Id, V);
4094 end Set_Has_Object_Size_Clause;
4096 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
4098 Set_Flag154 (Id, V);
4099 end Set_Has_Per_Object_Constraint;
4101 procedure Set_Has_Postconditions (Id : E; V : B := True) is
4103 pragma Assert (Is_Subprogram (Id));
4104 Set_Flag240 (Id, V);
4105 end Set_Has_Postconditions;
4107 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
4109 pragma Assert (Is_Access_Type (Id));
4110 Set_Flag27 (Base_Type (Id), V);
4111 end Set_Has_Pragma_Controlled;
4113 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
4115 Set_Flag150 (Id, V);
4116 end Set_Has_Pragma_Elaborate_Body;
4118 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
4120 Set_Flag157 (Id, V);
4121 end Set_Has_Pragma_Inline;
4123 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
4125 Set_Flag230 (Id, V);
4126 end Set_Has_Pragma_Inline_Always;
4128 procedure Set_Has_Pragma_No_Inline (Id : E; V : B := True) is
4130 Set_Flag201 (Id, V);
4131 end Set_Has_Pragma_No_Inline;
4133 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
4135 pragma Assert (Is_Enumeration_Type (Id));
4136 pragma Assert (Id = Base_Type (Id));
4137 Set_Flag198 (Id, V);
4138 end Set_Has_Pragma_Ordered;
4140 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
4142 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
4143 pragma Assert (Id = Base_Type (Id));
4144 Set_Flag121 (Id, V);
4145 end Set_Has_Pragma_Pack;
4147 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
4149 Set_Flag221 (Id, V);
4150 end Set_Has_Pragma_Preelab_Init;
4152 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
4154 Set_Flag203 (Id, V);
4155 end Set_Has_Pragma_Pure;
4157 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
4159 Set_Flag179 (Id, V);
4160 end Set_Has_Pragma_Pure_Function;
4162 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
4164 Set_Flag169 (Id, V);
4165 end Set_Has_Pragma_Thread_Local_Storage;
4167 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
4169 Set_Flag233 (Id, V);
4170 end Set_Has_Pragma_Unmodified;
4172 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
4174 Set_Flag180 (Id, V);
4175 end Set_Has_Pragma_Unreferenced;
4177 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
4179 pragma Assert (Is_Type (Id));
4180 Set_Flag212 (Id, V);
4181 end Set_Has_Pragma_Unreferenced_Objects;
4183 procedure Set_Has_Predicates (Id : E; V : B := True) is
4185 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Void);
4186 Set_Flag250 (Id, V);
4187 end Set_Has_Predicates;
4189 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
4191 pragma Assert (Id = Base_Type (Id));
4192 Set_Flag120 (Id, V);
4193 end Set_Has_Primitive_Operations;
4195 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
4197 pragma Assert (Is_Type (Id));
4198 Set_Flag151 (Id, V);
4199 end Set_Has_Private_Ancestor;
4201 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
4203 Set_Flag155 (Id, V);
4204 end Set_Has_Private_Declaration;
4206 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
4208 Set_Flag161 (Id, V);
4209 end Set_Has_Qualified_Name;
4211 procedure Set_Has_RACW (Id : E; V : B := True) is
4213 pragma Assert (Ekind (Id) = E_Package);
4214 Set_Flag214 (Id, V);
4217 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
4219 pragma Assert (Id = Base_Type (Id));
4221 end Set_Has_Record_Rep_Clause;
4223 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
4225 pragma Assert (Is_Subprogram (Id));
4226 Set_Flag143 (Id, V);
4227 end Set_Has_Recursive_Call;
4229 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
4232 end Set_Has_Size_Clause;
4234 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
4237 end Set_Has_Small_Clause;
4239 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
4241 pragma Assert (Id = Base_Type (Id));
4242 Set_Flag100 (Id, V);
4243 end Set_Has_Specified_Layout;
4245 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
4247 pragma Assert (Is_Type (Id));
4248 Set_Flag190 (Id, V);
4249 end Set_Has_Specified_Stream_Input;
4251 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
4253 pragma Assert (Is_Type (Id));
4254 Set_Flag191 (Id, V);
4255 end Set_Has_Specified_Stream_Output;
4257 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
4259 pragma Assert (Is_Type (Id));
4260 Set_Flag192 (Id, V);
4261 end Set_Has_Specified_Stream_Read;
4263 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
4265 pragma Assert (Is_Type (Id));
4266 Set_Flag193 (Id, V);
4267 end Set_Has_Specified_Stream_Write;
4269 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
4271 Set_Flag211 (Id, V);
4272 end Set_Has_Static_Discriminants;
4274 procedure Set_Has_Static_Predicate_Aspect (Id : E; V : B := True) is
4276 pragma Assert (Is_Type (Id));
4277 Set_Flag259 (Id, V);
4278 end Set_Has_Static_Predicate_Aspect;
4280 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
4282 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4283 pragma Assert (Id = Base_Type (Id));
4285 end Set_Has_Storage_Size_Clause;
4287 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4289 pragma Assert (Is_Elementary_Type (Id));
4290 Set_Flag184 (Id, V);
4291 end Set_Has_Stream_Size_Clause;
4293 procedure Set_Has_Task (Id : E; V : B := True) is
4295 pragma Assert (Id = Base_Type (Id));
4299 procedure Set_Has_Thunks (Id : E; V : B := True) is
4301 pragma Assert (Is_Tag (Id));
4302 Set_Flag228 (Id, V);
4305 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4307 pragma Assert (Id = Base_Type (Id));
4308 Set_Flag123 (Id, V);
4309 end Set_Has_Unchecked_Union;
4311 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4313 pragma Assert (Is_Type (Id));
4315 end Set_Has_Unknown_Discriminants;
4317 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4319 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4321 end Set_Has_Volatile_Components;
4323 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4325 Set_Flag182 (Id, V);
4326 end Set_Has_Xref_Entry;
4328 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4330 pragma Assert (Ekind (Id) = E_Variable);
4332 end Set_Hiding_Loop_Variable;
4334 procedure Set_Homonym (Id : E; V : E) is
4336 pragma Assert (Id /= V);
4340 procedure Set_Interface_Alias (Id : E; V : E) is
4344 and then Is_Hidden (Id)
4345 and then (Ekind_In (Id, E_Procedure, E_Function)));
4347 end Set_Interface_Alias;
4349 procedure Set_Interfaces (Id : E; V : L) is
4351 pragma Assert (Is_Record_Type (Id));
4352 Set_Elist25 (Id, V);
4355 procedure Set_In_Package_Body (Id : E; V : B := True) is
4358 end Set_In_Package_Body;
4360 procedure Set_In_Private_Part (Id : E; V : B := True) is
4363 end Set_In_Private_Part;
4365 procedure Set_In_Use (Id : E; V : B := True) is
4367 pragma Assert (Nkind (Id) in N_Entity);
4371 procedure Set_Initialization_Statements (Id : E; V : N) is
4373 -- Tolerate an E_Void entity since this can be called while resolving
4374 -- an aggregate used as the initialization expression for an object
4375 -- declaration, and this occurs before the Ekind for the object is set.
4377 pragma Assert (Ekind_In (Id, E_Void, E_Constant, E_Variable));
4379 end Set_Initialization_Statements;
4381 procedure Set_Integrity_Level (Id : E; V : Uint) is
4383 pragma Assert (Ekind (Id) = E_Abstract_State);
4385 end Set_Integrity_Level;
4387 procedure Set_Inner_Instances (Id : E; V : L) is
4389 Set_Elist23 (Id, V);
4390 end Set_Inner_Instances;
4392 procedure Set_Interface_Name (Id : E; V : N) is
4395 end Set_Interface_Name;
4397 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4399 pragma Assert (Is_Overloadable (Id));
4401 end Set_Is_Abstract_Subprogram;
4403 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4405 pragma Assert (Is_Type (Id));
4406 Set_Flag146 (Id, V);
4407 end Set_Is_Abstract_Type;
4409 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4411 pragma Assert (Is_Access_Type (Id));
4412 Set_Flag194 (Id, V);
4413 end Set_Is_Local_Anonymous_Access;
4415 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4417 pragma Assert (Is_Access_Type (Id));
4419 end Set_Is_Access_Constant;
4421 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4423 Set_Flag185 (Id, V);
4424 end Set_Is_Ada_2005_Only;
4426 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4428 Set_Flag199 (Id, V);
4429 end Set_Is_Ada_2012_Only;
4431 procedure Set_Is_Aliased (Id : E; V : B := True) is
4433 pragma Assert (Nkind (Id) in N_Entity);
4437 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
4439 pragma Assert (Is_Entry (Id));
4440 Set_Flag132 (Id, V);
4441 end Set_Is_AST_Entry;
4443 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4446 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4448 end Set_Is_Asynchronous;
4450 procedure Set_Is_Atomic (Id : E; V : B := True) is
4455 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4457 pragma Assert ((not V)
4458 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4459 Set_Flag122 (Id, V);
4460 end Set_Is_Bit_Packed_Array;
4462 procedure Set_Is_Called (Id : E; V : B := True) is
4464 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4465 Set_Flag102 (Id, V);
4468 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4471 end Set_Is_Character_Type;
4473 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4476 end Set_Is_Child_Unit;
4478 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4481 end Set_Is_Class_Wide_Equivalent_Type;
4483 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4485 Set_Flag149 (Id, V);
4486 end Set_Is_Compilation_Unit;
4488 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4490 pragma Assert (Ekind (Id) = E_Discriminant);
4491 Set_Flag103 (Id, V);
4492 end Set_Is_Completely_Hidden;
4494 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4497 end Set_Is_Concurrent_Record_Type;
4499 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4502 end Set_Is_Constr_Subt_For_U_Nominal;
4504 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4506 Set_Flag141 (Id, V);
4507 end Set_Is_Constr_Subt_For_UN_Aliased;
4509 procedure Set_Is_Constrained (Id : E; V : B := True) is
4511 pragma Assert (Nkind (Id) in N_Entity);
4513 end Set_Is_Constrained;
4515 procedure Set_Is_Constructor (Id : E; V : B := True) is
4518 end Set_Is_Constructor;
4520 procedure Set_Is_Controlled (Id : E; V : B := True) is
4522 pragma Assert (Id = Base_Type (Id));
4524 end Set_Is_Controlled;
4526 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4528 pragma Assert (Is_Formal (Id));
4530 end Set_Is_Controlling_Formal;
4532 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4535 end Set_Is_CPP_Class;
4537 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4539 pragma Assert (Is_Type (Id));
4540 Set_Flag223 (Id, V);
4541 end Set_Is_Descendent_Of_Address;
4543 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4545 Set_Flag176 (Id, V);
4546 end Set_Is_Discrim_SO_Function;
4548 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4550 Set_Flag234 (Id, V);
4551 end Set_Is_Dispatch_Table_Entity;
4553 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4558 Is_Overloadable (Id)
4560 Ekind (Id) = E_Subprogram_Type);
4563 end Set_Is_Dispatching_Operation;
4565 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4567 Set_Flag124 (Id, V);
4568 end Set_Is_Eliminated;
4570 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4573 end Set_Is_Entry_Formal;
4575 procedure Set_Is_Exported (Id : E; V : B := True) is
4578 end Set_Is_Exported;
4580 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4583 end Set_Is_First_Subtype;
4585 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4587 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4588 Set_Flag118 (Id, V);
4589 end Set_Is_For_Access_Subtype;
4591 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4593 Set_Flag111 (Id, V);
4594 end Set_Is_Formal_Subprogram;
4596 procedure Set_Is_Frozen (Id : E; V : B := True) is
4598 pragma Assert (Nkind (Id) in N_Entity);
4602 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4604 pragma Assert (Is_Type (Id));
4606 end Set_Is_Generic_Actual_Type;
4608 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4610 Set_Flag130 (Id, V);
4611 end Set_Is_Generic_Instance;
4613 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4615 pragma Assert (Nkind (Id) in N_Entity);
4617 end Set_Is_Generic_Type;
4619 procedure Set_Is_Hidden (Id : E; V : B := True) is
4624 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4626 Set_Flag171 (Id, V);
4627 end Set_Is_Hidden_Open_Scope;
4629 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4631 pragma Assert (Nkind (Id) in N_Entity);
4633 end Set_Is_Immediately_Visible;
4635 procedure Set_Is_Implementation_Defined (Id : E; V : B := True) is
4637 Set_Flag254 (Id, V);
4638 end Set_Is_Implementation_Defined;
4640 procedure Set_Is_Imported (Id : E; V : B := True) is
4643 end Set_Is_Imported;
4645 procedure Set_Is_Inlined (Id : E; V : B := True) is
4650 procedure Set_Is_Interface (Id : E; V : B := True) is
4652 pragma Assert (Is_Record_Type (Id));
4653 Set_Flag186 (Id, V);
4654 end Set_Is_Interface;
4656 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4658 Set_Flag126 (Id, V);
4659 end Set_Is_Instantiated;
4661 procedure Set_Is_Internal (Id : E; V : B := True) is
4663 pragma Assert (Nkind (Id) in N_Entity);
4665 end Set_Is_Internal;
4667 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4669 pragma Assert (Nkind (Id) in N_Entity);
4671 end Set_Is_Interrupt_Handler;
4673 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4676 end Set_Is_Intrinsic_Subprogram;
4678 procedure Set_Is_Invariant_Procedure (Id : E; V : B := True) is
4680 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4681 Set_Flag257 (Id, V);
4682 end Set_Is_Invariant_Procedure;
4684 procedure Set_Is_Itype (Id : E; V : B := True) is
4689 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4692 end Set_Is_Known_Non_Null;
4694 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4696 Set_Flag204 (Id, V);
4697 end Set_Is_Known_Null;
4699 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4701 Set_Flag170 (Id, V);
4702 end Set_Is_Known_Valid;
4704 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4706 pragma Assert (Is_Type (Id));
4707 Set_Flag106 (Id, V);
4708 end Set_Is_Limited_Composite;
4710 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4712 pragma Assert (Is_Interface (Id));
4713 Set_Flag197 (Id, V);
4714 end Set_Is_Limited_Interface;
4716 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4719 end Set_Is_Limited_Record;
4721 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4723 pragma Assert (Is_Subprogram (Id));
4724 Set_Flag137 (Id, V);
4725 end Set_Is_Machine_Code_Subprogram;
4727 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4729 pragma Assert (Is_Type (Id));
4730 Set_Flag109 (Id, V);
4731 end Set_Is_Non_Static_Subtype;
4733 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4735 pragma Assert (Ekind (Id) = E_Procedure);
4736 Set_Flag178 (Id, V);
4737 end Set_Is_Null_Init_Proc;
4739 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4741 Set_Flag153 (Id, V);
4742 end Set_Is_Obsolescent;
4744 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
4746 pragma Assert (Ekind (Id) = E_Out_Parameter);
4747 Set_Flag226 (Id, V);
4748 end Set_Is_Only_Out_Parameter;
4750 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
4752 pragma Assert (Is_Formal (Id));
4753 Set_Flag134 (Id, V);
4754 end Set_Is_Optional_Parameter;
4756 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
4758 Set_Flag160 (Id, V);
4759 end Set_Is_Package_Body_Entity;
4761 procedure Set_Is_Packed (Id : E; V : B := True) is
4763 pragma Assert (Id = Base_Type (Id));
4767 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
4769 Set_Flag138 (Id, V);
4770 end Set_Is_Packed_Array_Type;
4772 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
4774 pragma Assert (Nkind (Id) in N_Entity);
4776 end Set_Is_Potentially_Use_Visible;
4778 procedure Set_Is_Predicate_Function (Id : E; V : B := True) is
4780 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4781 Set_Flag255 (Id, V);
4782 end Set_Is_Predicate_Function;
4784 procedure Set_Is_Predicate_Function_M (Id : E; V : B := True) is
4786 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4787 Set_Flag256 (Id, V);
4788 end Set_Is_Predicate_Function_M;
4790 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
4793 end Set_Is_Preelaborated;
4795 procedure Set_Is_Primitive (Id : E; V : B := True) is
4798 (Is_Overloadable (Id)
4799 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
4800 Set_Flag218 (Id, V);
4801 end Set_Is_Primitive;
4803 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
4805 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4806 Set_Flag195 (Id, V);
4807 end Set_Is_Primitive_Wrapper;
4809 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
4811 pragma Assert (Is_Type (Id));
4812 Set_Flag107 (Id, V);
4813 end Set_Is_Private_Composite;
4815 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
4818 end Set_Is_Private_Descendant;
4820 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
4822 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4823 Set_Flag245 (Id, V);
4824 end Set_Is_Private_Primitive;
4826 procedure Set_Is_Processed_Transient (Id : E; V : B := True) is
4828 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
4829 Set_Flag252 (Id, V);
4830 end Set_Is_Processed_Transient;
4832 procedure Set_Is_Public (Id : E; V : B := True) is
4834 pragma Assert (Nkind (Id) in N_Entity);
4838 procedure Set_Is_Pure (Id : E; V : B := True) is
4843 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
4845 pragma Assert (Is_Access_Type (Id));
4846 Set_Flag189 (Id, V);
4847 end Set_Is_Pure_Unit_Access_Type;
4849 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
4851 pragma Assert (Is_Type (Id));
4852 Set_Flag244 (Id, V);
4853 end Set_Is_RACW_Stub_Type;
4855 procedure Set_Is_Raised (Id : E; V : B := True) is
4857 pragma Assert (Ekind (Id) = E_Exception);
4858 Set_Flag224 (Id, V);
4861 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
4864 end Set_Is_Remote_Call_Interface;
4866 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
4869 end Set_Is_Remote_Types;
4871 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
4873 Set_Flag112 (Id, V);
4874 end Set_Is_Renaming_Of_Object;
4876 procedure Set_Is_Return_Object (Id : E; V : B := True) is
4878 Set_Flag209 (Id, V);
4879 end Set_Is_Return_Object;
4881 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
4883 pragma Assert (Ekind (Id) = E_Variable);
4884 Set_Flag249 (Id, V);
4885 end Set_Is_Safe_To_Reevaluate;
4887 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
4890 end Set_Is_Shared_Passive;
4892 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
4896 or else Ekind_In (Id, E_Exception,
4901 end Set_Is_Statically_Allocated;
4903 procedure Set_Is_Tag (Id : E; V : B := True) is
4905 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
4909 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
4912 end Set_Is_Tagged_Type;
4914 procedure Set_Is_Thunk (Id : E; V : B := True) is
4916 pragma Assert (Is_Subprogram (Id));
4917 Set_Flag225 (Id, V);
4920 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
4922 Set_Flag235 (Id, V);
4923 end Set_Is_Trivial_Subprogram;
4925 procedure Set_Is_True_Constant (Id : E; V : B := True) is
4927 Set_Flag163 (Id, V);
4928 end Set_Is_True_Constant;
4930 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
4932 pragma Assert (Id = Base_Type (Id));
4933 Set_Flag117 (Id, V);
4934 end Set_Is_Unchecked_Union;
4936 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
4938 pragma Assert (Ekind (Id) = E_Record_Type);
4939 Set_Flag246 (Id, V);
4940 end Set_Is_Underlying_Record_View;
4942 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
4944 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
4945 Set_Flag144 (Id, V);
4946 end Set_Is_Unsigned_Type;
4948 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
4950 pragma Assert (Ekind (Id) = E_Procedure);
4951 Set_Flag127 (Id, V);
4952 end Set_Is_Valued_Procedure;
4954 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
4956 Set_Flag206 (Id, V);
4957 end Set_Is_Visible_Formal;
4959 procedure Set_Is_Visible_Lib_Unit (Id : E; V : B := True) is
4961 Set_Flag116 (Id, V);
4962 end Set_Is_Visible_Lib_Unit;
4964 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
4966 pragma Assert (Ekind (Id) = E_Exception);
4967 Set_Flag133 (Id, V);
4968 end Set_Is_VMS_Exception;
4970 procedure Set_Is_Volatile (Id : E; V : B := True) is
4972 pragma Assert (Nkind (Id) in N_Entity);
4974 end Set_Is_Volatile;
4976 procedure Set_Itype_Printed (Id : E; V : B := True) is
4978 pragma Assert (Is_Itype (Id));
4979 Set_Flag202 (Id, V);
4980 end Set_Itype_Printed;
4982 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
4985 end Set_Kill_Elaboration_Checks;
4987 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
4990 end Set_Kill_Range_Checks;
4992 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
4994 pragma Assert (Is_Type (Id));
4995 Set_Flag207 (Id, V);
4996 end Set_Known_To_Have_Preelab_Init;
4998 procedure Set_Last_Assignment (Id : E; V : N) is
5000 pragma Assert (Is_Assignable (Id));
5002 end Set_Last_Assignment;
5004 procedure Set_Last_Entity (Id : E; V : E) is
5007 end Set_Last_Entity;
5009 procedure Set_Limited_View (Id : E; V : E) is
5011 pragma Assert (Ekind (Id) = E_Package);
5013 end Set_Limited_View;
5015 procedure Set_Lit_Indexes (Id : E; V : E) is
5017 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5019 end Set_Lit_Indexes;
5021 procedure Set_Lit_Strings (Id : E; V : E) is
5023 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5025 end Set_Lit_Strings;
5027 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
5029 pragma Assert (Is_Formal (Id));
5030 Set_Flag205 (Id, V);
5031 end Set_Low_Bound_Tested;
5033 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
5035 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
5037 end Set_Machine_Radix_10;
5039 procedure Set_Master_Id (Id : E; V : E) is
5041 pragma Assert (Is_Access_Type (Id));
5045 procedure Set_Materialize_Entity (Id : E; V : B := True) is
5047 Set_Flag168 (Id, V);
5048 end Set_Materialize_Entity;
5050 procedure Set_Mechanism (Id : E; V : M) is
5052 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
5053 Set_Uint8 (Id, UI_From_Int (V));
5056 procedure Set_Modulus (Id : E; V : U) is
5058 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
5062 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
5064 pragma Assert (Is_Type (Id));
5065 Set_Flag183 (Id, V);
5066 end Set_Must_Be_On_Byte_Boundary;
5068 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
5070 pragma Assert (Is_Type (Id));
5071 Set_Flag208 (Id, V);
5072 end Set_Must_Have_Preelab_Init;
5074 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
5076 Set_Flag147 (Id, V);
5077 end Set_Needs_Debug_Info;
5079 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
5082 (Is_Overloadable (Id)
5083 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
5085 end Set_Needs_No_Actuals;
5087 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
5089 Set_Flag115 (Id, V);
5090 end Set_Never_Set_In_Source;
5092 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
5095 end Set_Next_Inlined_Subprogram;
5097 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
5099 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5100 Set_Flag131 (Id, V);
5101 end Set_No_Pool_Assigned;
5103 procedure Set_No_Return (Id : E; V : B := True) is
5106 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
5107 Set_Flag113 (Id, V);
5110 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
5112 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5113 Set_Flag136 (Id, V);
5114 end Set_No_Strict_Aliasing;
5116 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
5118 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5120 end Set_Non_Binary_Modulus;
5122 procedure Set_Non_Limited_View (Id : E; V : E) is
5124 pragma Assert (Ekind (Id) in Incomplete_Kind);
5126 end Set_Non_Limited_View;
5128 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
5131 (Root_Type (Id) = Standard_Boolean
5132 and then Ekind (Id) = E_Enumeration_Type);
5133 Set_Flag162 (Id, V);
5134 end Set_Nonzero_Is_True;
5136 procedure Set_Normalized_First_Bit (Id : E; V : U) is
5138 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5140 end Set_Normalized_First_Bit;
5142 procedure Set_Normalized_Position (Id : E; V : U) is
5144 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5146 end Set_Normalized_Position;
5148 procedure Set_Normalized_Position_Max (Id : E; V : U) is
5150 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5152 end Set_Normalized_Position_Max;
5154 procedure Set_OK_To_Rename (Id : E; V : B := True) is
5156 pragma Assert (Ekind (Id) = E_Variable);
5157 Set_Flag247 (Id, V);
5158 end Set_OK_To_Rename;
5160 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
5163 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5164 Set_Flag239 (Id, V);
5165 end Set_OK_To_Reorder_Components;
5167 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
5170 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5171 Set_Flag241 (Id, V);
5172 end Set_Optimize_Alignment_Space;
5174 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
5177 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5178 Set_Flag242 (Id, V);
5179 end Set_Optimize_Alignment_Time;
5181 procedure Set_Original_Access_Type (Id : E; V : E) is
5183 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
5185 end Set_Original_Access_Type;
5187 procedure Set_Original_Array_Type (Id : E; V : E) is
5189 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
5191 end Set_Original_Array_Type;
5193 procedure Set_Original_Record_Component (Id : E; V : E) is
5195 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
5197 end Set_Original_Record_Component;
5199 procedure Set_Overlays_Constant (Id : E; V : B := True) is
5201 Set_Flag243 (Id, V);
5202 end Set_Overlays_Constant;
5204 procedure Set_Overridden_Operation (Id : E; V : E) is
5207 end Set_Overridden_Operation;
5209 procedure Set_Package_Instantiation (Id : E; V : N) is
5211 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
5213 end Set_Package_Instantiation;
5215 procedure Set_Packed_Array_Type (Id : E; V : E) is
5217 pragma Assert (Is_Array_Type (Id));
5219 end Set_Packed_Array_Type;
5221 procedure Set_Parent_Subtype (Id : E; V : E) is
5223 pragma Assert (Ekind (Id) = E_Record_Type);
5225 end Set_Parent_Subtype;
5227 procedure Set_Postcondition_Proc (Id : E; V : E) is
5229 pragma Assert (Ekind (Id) = E_Procedure);
5231 end Set_Postcondition_Proc;
5233 procedure Set_PPC_Wrapper (Id : E; V : E) is
5235 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
5237 end Set_PPC_Wrapper;
5239 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
5241 pragma Assert (Is_Tagged_Type (Id));
5242 Set_Elist10 (Id, V);
5243 end Set_Direct_Primitive_Operations;
5245 procedure Set_Prival (Id : E; V : E) is
5247 pragma Assert (Is_Protected_Component (Id));
5251 procedure Set_Prival_Link (Id : E; V : E) is
5253 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5255 end Set_Prival_Link;
5257 procedure Set_Private_Dependents (Id : E; V : L) is
5259 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
5260 Set_Elist18 (Id, V);
5261 end Set_Private_Dependents;
5263 procedure Set_Private_View (Id : E; V : N) is
5265 pragma Assert (Is_Private_Type (Id));
5267 end Set_Private_View;
5269 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
5271 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
5273 end Set_Protected_Body_Subprogram;
5275 procedure Set_Protected_Formal (Id : E; V : E) is
5277 pragma Assert (Is_Formal (Id));
5279 end Set_Protected_Formal;
5281 procedure Set_Protection_Object (Id : E; V : E) is
5283 pragma Assert (Ekind_In (Id, E_Entry,
5288 end Set_Protection_Object;
5290 procedure Set_Reachable (Id : E; V : B := True) is
5295 procedure Set_Referenced (Id : E; V : B := True) is
5297 Set_Flag156 (Id, V);
5300 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
5303 end Set_Referenced_As_LHS;
5305 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
5307 Set_Flag227 (Id, V);
5308 end Set_Referenced_As_Out_Parameter;
5310 procedure Set_Refined_State (Id : E; V : E) is
5312 pragma Assert (Ekind (Id) = E_Abstract_State);
5314 end Set_Refined_State;
5316 procedure Set_Register_Exception_Call (Id : E; V : N) is
5318 pragma Assert (Ekind (Id) = E_Exception);
5320 end Set_Register_Exception_Call;
5322 procedure Set_Related_Array_Object (Id : E; V : E) is
5324 pragma Assert (Is_Array_Type (Id));
5326 end Set_Related_Array_Object;
5328 procedure Set_Related_Expression (Id : E; V : N) is
5330 pragma Assert (Ekind (Id) in Type_Kind
5331 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
5333 end Set_Related_Expression;
5335 procedure Set_Related_Instance (Id : E; V : E) is
5337 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
5339 end Set_Related_Instance;
5341 procedure Set_Related_Type (Id : E; V : E) is
5343 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5345 end Set_Related_Type;
5347 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5349 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
5351 end Set_Relative_Deadline_Variable;
5353 procedure Set_Renamed_Entity (Id : E; V : N) is
5356 end Set_Renamed_Entity;
5358 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5360 pragma Assert (Ekind (Id) = E_Package);
5361 Set_Flag231 (Id, V);
5362 end Set_Renamed_In_Spec;
5364 procedure Set_Renamed_Object (Id : E; V : N) is
5367 end Set_Renamed_Object;
5369 procedure Set_Renaming_Map (Id : E; V : U) is
5372 end Set_Renaming_Map;
5374 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5376 pragma Assert (Is_Overloadable (Id));
5377 Set_Flag213 (Id, V);
5378 end Set_Requires_Overriding;
5380 procedure Set_Return_Present (Id : E; V : B := True) is
5383 end Set_Return_Present;
5385 procedure Set_Return_Applies_To (Id : E; V : N) is
5388 end Set_Return_Applies_To;
5390 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5393 end Set_Returns_By_Ref;
5395 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5398 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5399 Set_Flag164 (Id, V);
5400 end Set_Reverse_Bit_Order;
5402 procedure Set_Reverse_Storage_Order (Id : E; V : B := True) is
5406 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5408 end Set_Reverse_Storage_Order;
5410 procedure Set_RM_Size (Id : E; V : U) is
5412 pragma Assert (Is_Type (Id));
5416 procedure Set_Scalar_Range (Id : E; V : N) is
5419 end Set_Scalar_Range;
5421 procedure Set_Scale_Value (Id : E; V : U) is
5424 end Set_Scale_Value;
5426 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5428 pragma Assert (not Is_Record_Type (Id));
5430 end Set_Scope_Depth_Value;
5432 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5434 Set_Flag167 (Id, V);
5435 end Set_Sec_Stack_Needed_For_Return;
5437 procedure Set_Shadow_Entities (Id : E; V : S) is
5439 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5441 end Set_Shadow_Entities;
5443 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5445 pragma Assert (Ekind (Id) = E_Variable);
5447 end Set_Shared_Var_Procs_Instance;
5449 procedure Set_Size_Check_Code (Id : E; V : N) is
5451 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5453 end Set_Size_Check_Code;
5455 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5457 Set_Flag177 (Id, V);
5458 end Set_Size_Depends_On_Discriminant;
5460 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5463 end Set_Size_Known_At_Compile_Time;
5465 procedure Set_Small_Value (Id : E; V : R) is
5467 pragma Assert (Is_Fixed_Point_Type (Id));
5468 Set_Ureal21 (Id, V);
5469 end Set_Small_Value;
5471 procedure Set_Spec_Entity (Id : E; V : E) is
5473 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5475 end Set_Spec_Entity;
5477 procedure Set_Static_Predicate (Id : E; V : S) is
5480 (Ekind_In (Id, E_Enumeration_Subtype,
5481 E_Modular_Integer_Subtype,
5482 E_Signed_Integer_Subtype)
5483 and then Has_Predicates (Id));
5485 end Set_Static_Predicate;
5487 procedure Set_Status_Flag_Or_Transient_Decl (Id : E; V : E) is
5489 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5491 end Set_Status_Flag_Or_Transient_Decl;
5493 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5495 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5496 pragma Assert (Id = Base_Type (Id));
5498 end Set_Storage_Size_Variable;
5500 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5502 pragma Assert (Ekind (Id) = E_Package);
5504 end Set_Static_Elaboration_Desired;
5506 procedure Set_Static_Initialization (Id : E; V : N) is
5509 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5511 end Set_Static_Initialization;
5513 procedure Set_Stored_Constraint (Id : E; V : L) is
5515 pragma Assert (Nkind (Id) in N_Entity);
5516 Set_Elist23 (Id, V);
5517 end Set_Stored_Constraint;
5519 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5521 pragma Assert (Id = Base_Type (Id));
5522 Set_Flag145 (Id, V);
5523 end Set_Strict_Alignment;
5525 procedure Set_String_Literal_Length (Id : E; V : U) is
5527 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5529 end Set_String_Literal_Length;
5531 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5533 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5535 end Set_String_Literal_Low_Bound;
5537 procedure Set_Subprograms_For_Type (Id : E; V : E) is
5539 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
5541 end Set_Subprograms_For_Type;
5543 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5545 Set_Flag148 (Id, V);
5546 end Set_Suppress_Elaboration_Warnings;
5548 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
5550 pragma Assert (Is_Type (Id));
5551 Set_Flag105 (Id, V);
5552 end Set_Suppress_Initialization;
5554 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5556 Set_Flag165 (Id, V);
5557 end Set_Suppress_Style_Checks;
5559 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5561 Set_Flag217 (Id, V);
5562 end Set_Suppress_Value_Tracking_On_Call;
5564 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5566 pragma Assert (Ekind (Id) in Task_Kind);
5568 end Set_Task_Body_Procedure;
5570 procedure Set_Thunk_Entity (Id : E; V : E) is
5572 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5573 and then Is_Thunk (Id));
5575 end Set_Thunk_Entity;
5577 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5580 end Set_Treat_As_Volatile;
5582 procedure Set_Underlying_Full_View (Id : E; V : E) is
5584 pragma Assert (Ekind (Id) in Private_Kind);
5586 end Set_Underlying_Full_View;
5588 procedure Set_Underlying_Record_View (Id : E; V : E) is
5590 pragma Assert (Ekind (Id) = E_Record_Type);
5592 end Set_Underlying_Record_View;
5594 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5596 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5597 Set_Flag216 (Id, V);
5598 end Set_Universal_Aliasing;
5600 procedure Set_Unset_Reference (Id : E; V : N) is
5603 end Set_Unset_Reference;
5605 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5607 Set_Flag222 (Id, V);
5608 end Set_Used_As_Generic_Actual;
5610 procedure Set_Uses_Lock_Free (Id : E; V : B := True) is
5612 pragma Assert (Ekind (Id) = E_Protected_Type);
5613 Set_Flag188 (Id, V);
5614 end Set_Uses_Lock_Free;
5616 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5619 end Set_Uses_Sec_Stack;
5621 procedure Set_Warnings_Off (Id : E; V : B := True) is
5624 end Set_Warnings_Off;
5626 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
5628 Set_Flag236 (Id, V);
5629 end Set_Warnings_Off_Used;
5631 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
5633 Set_Flag237 (Id, V);
5634 end Set_Warnings_Off_Used_Unmodified;
5636 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
5638 Set_Flag238 (Id, V);
5639 end Set_Warnings_Off_Used_Unreferenced;
5641 procedure Set_Was_Hidden (Id : E; V : B := True) is
5643 Set_Flag196 (Id, V);
5646 procedure Set_Wrapped_Entity (Id : E; V : E) is
5648 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5649 and then Is_Primitive_Wrapper (Id));
5651 end Set_Wrapped_Entity;
5653 -----------------------------------
5654 -- Field Initialization Routines --
5655 -----------------------------------
5657 procedure Init_Alignment (Id : E) is
5659 Set_Uint14 (Id, Uint_0);
5662 procedure Init_Alignment (Id : E; V : Int) is
5664 Set_Uint14 (Id, UI_From_Int (V));
5667 procedure Init_Component_Bit_Offset (Id : E) is
5669 Set_Uint11 (Id, No_Uint);
5670 end Init_Component_Bit_Offset;
5672 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
5674 Set_Uint11 (Id, UI_From_Int (V));
5675 end Init_Component_Bit_Offset;
5677 procedure Init_Component_Size (Id : E) is
5679 Set_Uint22 (Id, Uint_0);
5680 end Init_Component_Size;
5682 procedure Init_Component_Size (Id : E; V : Int) is
5684 Set_Uint22 (Id, UI_From_Int (V));
5685 end Init_Component_Size;
5687 procedure Init_Digits_Value (Id : E) is
5689 Set_Uint17 (Id, Uint_0);
5690 end Init_Digits_Value;
5692 procedure Init_Digits_Value (Id : E; V : Int) is
5694 Set_Uint17 (Id, UI_From_Int (V));
5695 end Init_Digits_Value;
5697 procedure Init_Esize (Id : E) is
5699 Set_Uint12 (Id, Uint_0);
5702 procedure Init_Esize (Id : E; V : Int) is
5704 Set_Uint12 (Id, UI_From_Int (V));
5707 procedure Init_Normalized_First_Bit (Id : E) is
5709 Set_Uint8 (Id, No_Uint);
5710 end Init_Normalized_First_Bit;
5712 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
5714 Set_Uint8 (Id, UI_From_Int (V));
5715 end Init_Normalized_First_Bit;
5717 procedure Init_Normalized_Position (Id : E) is
5719 Set_Uint14 (Id, No_Uint);
5720 end Init_Normalized_Position;
5722 procedure Init_Normalized_Position (Id : E; V : Int) is
5724 Set_Uint14 (Id, UI_From_Int (V));
5725 end Init_Normalized_Position;
5727 procedure Init_Normalized_Position_Max (Id : E) is
5729 Set_Uint10 (Id, No_Uint);
5730 end Init_Normalized_Position_Max;
5732 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
5734 Set_Uint10 (Id, UI_From_Int (V));
5735 end Init_Normalized_Position_Max;
5737 procedure Init_RM_Size (Id : E) is
5739 Set_Uint13 (Id, Uint_0);
5742 procedure Init_RM_Size (Id : E; V : Int) is
5744 Set_Uint13 (Id, UI_From_Int (V));
5747 -----------------------------
5748 -- Init_Component_Location --
5749 -----------------------------
5751 procedure Init_Component_Location (Id : E) is
5753 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
5754 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
5755 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
5756 Set_Uint12 (Id, Uint_0); -- Esize
5757 Set_Uint14 (Id, No_Uint); -- Normalized_Position
5758 end Init_Component_Location;
5760 ----------------------------
5761 -- Init_Object_Size_Align --
5762 ----------------------------
5764 procedure Init_Object_Size_Align (Id : E) is
5766 Set_Uint12 (Id, Uint_0); -- Esize
5767 Set_Uint14 (Id, Uint_0); -- Alignment
5768 end Init_Object_Size_Align;
5774 procedure Init_Size (Id : E; V : Int) is
5776 pragma Assert (not Is_Object (Id));
5777 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
5778 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
5781 ---------------------
5782 -- Init_Size_Align --
5783 ---------------------
5785 procedure Init_Size_Align (Id : E) is
5787 pragma Assert (not Is_Object (Id));
5788 Set_Uint12 (Id, Uint_0); -- Esize
5789 Set_Uint13 (Id, Uint_0); -- RM_Size
5790 Set_Uint14 (Id, Uint_0); -- Alignment
5791 end Init_Size_Align;
5793 ----------------------------------------------
5794 -- Type Representation Attribute Predicates --
5795 ----------------------------------------------
5797 function Known_Alignment (E : Entity_Id) return B is
5799 return Uint14 (E) /= Uint_0
5800 and then Uint14 (E) /= No_Uint;
5801 end Known_Alignment;
5803 function Known_Component_Bit_Offset (E : Entity_Id) return B is
5805 return Uint11 (E) /= No_Uint;
5806 end Known_Component_Bit_Offset;
5808 function Known_Component_Size (E : Entity_Id) return B is
5810 return Uint22 (Base_Type (E)) /= Uint_0
5811 and then Uint22 (Base_Type (E)) /= No_Uint;
5812 end Known_Component_Size;
5814 function Known_Esize (E : Entity_Id) return B is
5816 return Uint12 (E) /= Uint_0
5817 and then Uint12 (E) /= No_Uint;
5820 function Known_Normalized_First_Bit (E : Entity_Id) return B is
5822 return Uint8 (E) /= No_Uint;
5823 end Known_Normalized_First_Bit;
5825 function Known_Normalized_Position (E : Entity_Id) return B is
5827 return Uint14 (E) /= No_Uint;
5828 end Known_Normalized_Position;
5830 function Known_Normalized_Position_Max (E : Entity_Id) return B is
5832 return Uint10 (E) /= No_Uint;
5833 end Known_Normalized_Position_Max;
5835 function Known_RM_Size (E : Entity_Id) return B is
5837 return Uint13 (E) /= No_Uint
5838 and then (Uint13 (E) /= Uint_0
5839 or else Is_Discrete_Type (E)
5840 or else Is_Fixed_Point_Type (E));
5843 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
5845 return Uint11 (E) /= No_Uint
5846 and then Uint11 (E) >= Uint_0;
5847 end Known_Static_Component_Bit_Offset;
5849 function Known_Static_Component_Size (E : Entity_Id) return B is
5851 return Uint22 (Base_Type (E)) > Uint_0;
5852 end Known_Static_Component_Size;
5854 function Known_Static_Esize (E : Entity_Id) return B is
5856 return Uint12 (E) > Uint_0
5857 and then not Is_Generic_Type (E);
5858 end Known_Static_Esize;
5860 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
5862 return Uint8 (E) /= No_Uint
5863 and then Uint8 (E) >= Uint_0;
5864 end Known_Static_Normalized_First_Bit;
5866 function Known_Static_Normalized_Position (E : Entity_Id) return B is
5868 return Uint14 (E) /= No_Uint
5869 and then Uint14 (E) >= Uint_0;
5870 end Known_Static_Normalized_Position;
5872 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
5874 return Uint10 (E) /= No_Uint
5875 and then Uint10 (E) >= Uint_0;
5876 end Known_Static_Normalized_Position_Max;
5878 function Known_Static_RM_Size (E : Entity_Id) return B is
5880 return (Uint13 (E) > Uint_0
5881 or else Is_Discrete_Type (E)
5882 or else Is_Fixed_Point_Type (E))
5883 and then not Is_Generic_Type (E);
5884 end Known_Static_RM_Size;
5886 function Unknown_Alignment (E : Entity_Id) return B is
5888 return Uint14 (E) = Uint_0
5889 or else Uint14 (E) = No_Uint;
5890 end Unknown_Alignment;
5892 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
5894 return Uint11 (E) = No_Uint;
5895 end Unknown_Component_Bit_Offset;
5897 function Unknown_Component_Size (E : Entity_Id) return B is
5899 return Uint22 (Base_Type (E)) = Uint_0
5901 Uint22 (Base_Type (E)) = No_Uint;
5902 end Unknown_Component_Size;
5904 function Unknown_Esize (E : Entity_Id) return B is
5906 return Uint12 (E) = No_Uint
5908 Uint12 (E) = Uint_0;
5911 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
5913 return Uint8 (E) = No_Uint;
5914 end Unknown_Normalized_First_Bit;
5916 function Unknown_Normalized_Position (E : Entity_Id) return B is
5918 return Uint14 (E) = No_Uint;
5919 end Unknown_Normalized_Position;
5921 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
5923 return Uint10 (E) = No_Uint;
5924 end Unknown_Normalized_Position_Max;
5926 function Unknown_RM_Size (E : Entity_Id) return B is
5928 return (Uint13 (E) = Uint_0
5929 and then not Is_Discrete_Type (E)
5930 and then not Is_Fixed_Point_Type (E))
5931 or else Uint13 (E) = No_Uint;
5932 end Unknown_RM_Size;
5934 --------------------
5935 -- Address_Clause --
5936 --------------------
5938 function Address_Clause (Id : E) return N is
5940 return Rep_Clause (Id, Name_Address);
5947 function Aft_Value (Id : E) return U is
5949 Delta_Val : Ureal := Delta_Value (Id);
5951 while Delta_Val < Ureal_Tenth loop
5952 Delta_Val := Delta_Val * Ureal_10;
5953 Result := Result + 1;
5956 return UI_From_Int (Result);
5959 ----------------------
5960 -- Alignment_Clause --
5961 ----------------------
5963 function Alignment_Clause (Id : E) return N is
5965 return Rep_Clause (Id, Name_Alignment);
5966 end Alignment_Clause;
5972 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
5974 if Last_Entity (V) = Empty then
5975 Set_First_Entity (Id => V, V => Id);
5977 Set_Next_Entity (Last_Entity (V), Id);
5980 Set_Next_Entity (Id, Empty);
5982 Set_Last_Entity (Id => V, V => Id);
5989 function Base_Type (Id : E) return E is
5991 if Is_Base_Type (Id) then
5994 pragma Assert (Is_Type (Id));
5999 -------------------------
6000 -- Component_Alignment --
6001 -------------------------
6003 -- Component Alignment is encoded using two flags, Flag128/129 as
6004 -- follows. Note that both flags False = Align_Default, so that the
6005 -- default initialization of flags to False initializes component
6006 -- alignment to the default value as required.
6008 -- Flag128 Flag129 Value
6009 -- ------- ------- -----
6010 -- False False Calign_Default
6011 -- False True Calign_Component_Size
6012 -- True False Calign_Component_Size_4
6013 -- True True Calign_Storage_Unit
6015 function Component_Alignment (Id : E) return C is
6016 BT : constant Node_Id := Base_Type (Id);
6019 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
6021 if Flag128 (BT) then
6022 if Flag129 (BT) then
6023 return Calign_Storage_Unit;
6025 return Calign_Component_Size_4;
6029 if Flag129 (BT) then
6030 return Calign_Component_Size;
6032 return Calign_Default;
6035 end Component_Alignment;
6037 ----------------------
6038 -- Declaration_Node --
6039 ----------------------
6041 function Declaration_Node (Id : E) return N is
6045 if Ekind (Id) = E_Incomplete_Type
6046 and then Present (Full_View (Id))
6048 P := Parent (Full_View (Id));
6054 if Nkind (P) /= N_Selected_Component
6055 and then Nkind (P) /= N_Expanded_Name
6057 not (Nkind (P) = N_Defining_Program_Unit_Name
6058 and then Is_Child_Unit (Id))
6065 end Declaration_Node;
6067 ---------------------
6068 -- Designated_Type --
6069 ---------------------
6071 function Designated_Type (Id : E) return E is
6075 Desig_Type := Directly_Designated_Type (Id);
6077 if Ekind (Desig_Type) = E_Incomplete_Type
6078 and then Present (Full_View (Desig_Type))
6080 return Full_View (Desig_Type);
6082 elsif Is_Class_Wide_Type (Desig_Type)
6083 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
6084 and then Present (Full_View (Etype (Desig_Type)))
6085 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
6087 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
6092 end Designated_Type;
6094 ----------------------
6095 -- Entry_Index_Type --
6096 ----------------------
6098 function Entry_Index_Type (Id : E) return N is
6100 pragma Assert (Ekind (Id) = E_Entry_Family);
6101 return Etype (Discrete_Subtype_Definition (Parent (Id)));
6102 end Entry_Index_Type;
6108 function Find_Pragma (Id : Entity_Id; Name : Name_Id) return Node_Id is
6112 Item := First_Rep_Item (Id);
6113 while Present (Item) loop
6114 if Nkind (Item) = N_Pragma and then Pragma_Name (Item) = Name then
6118 Item := Next_Rep_Item (Item);
6124 ---------------------
6125 -- First_Component --
6126 ---------------------
6128 function First_Component (Id : E) return E is
6133 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
6135 Comp_Id := First_Entity (Id);
6136 while Present (Comp_Id) loop
6137 exit when Ekind (Comp_Id) = E_Component;
6138 Comp_Id := Next_Entity (Comp_Id);
6142 end First_Component;
6144 -------------------------------------
6145 -- First_Component_Or_Discriminant --
6146 -------------------------------------
6148 function First_Component_Or_Discriminant (Id : E) return E is
6153 (Is_Record_Type (Id)
6154 or else Is_Incomplete_Or_Private_Type (Id)
6155 or else Has_Discriminants (Id));
6157 Comp_Id := First_Entity (Id);
6158 while Present (Comp_Id) loop
6159 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6160 Comp_Id := Next_Entity (Comp_Id);
6164 end First_Component_Or_Discriminant;
6170 function First_Formal (Id : E) return E is
6175 (Is_Overloadable (Id)
6176 or else Ekind_In (Id, E_Entry_Family,
6178 E_Subprogram_Type));
6180 if Ekind (Id) = E_Enumeration_Literal then
6184 Formal := First_Entity (Id);
6186 if Present (Formal) and then Is_Formal (Formal) then
6194 ------------------------------
6195 -- First_Formal_With_Extras --
6196 ------------------------------
6198 function First_Formal_With_Extras (Id : E) return E is
6203 (Is_Overloadable (Id)
6204 or else Ekind_In (Id, E_Entry_Family,
6206 E_Subprogram_Type));
6208 if Ekind (Id) = E_Enumeration_Literal then
6212 Formal := First_Entity (Id);
6214 if Present (Formal) and then Is_Formal (Formal) then
6217 return Extra_Formals (Id); -- Empty if no extra formals
6220 end First_Formal_With_Extras;
6222 -------------------------------------
6223 -- Get_Attribute_Definition_Clause --
6224 -------------------------------------
6226 function Get_Attribute_Definition_Clause
6228 Id : Attribute_Id) return Node_Id
6233 N := First_Rep_Item (E);
6234 while Present (N) loop
6235 if Nkind (N) = N_Attribute_Definition_Clause
6236 and then Get_Attribute_Id (Chars (N)) = Id
6245 end Get_Attribute_Definition_Clause;
6251 function Get_Full_View (T : Entity_Id) return Entity_Id is
6253 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
6254 return Full_View (T);
6256 elsif Is_Class_Wide_Type (T)
6257 and then Ekind (Root_Type (T)) = E_Incomplete_Type
6258 and then Present (Full_View (Root_Type (T)))
6260 return Class_Wide_Type (Full_View (Root_Type (T)));
6267 --------------------------------------
6268 -- Get_Record_Representation_Clause --
6269 --------------------------------------
6271 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
6275 N := First_Rep_Item (E);
6276 while Present (N) loop
6277 if Nkind (N) = N_Record_Representation_Clause then
6285 end Get_Record_Representation_Clause;
6287 ------------------------
6288 -- Has_Attach_Handler --
6289 ------------------------
6291 function Has_Attach_Handler (Id : E) return B is
6295 pragma Assert (Is_Protected_Type (Id));
6297 Ritem := First_Rep_Item (Id);
6298 while Present (Ritem) loop
6299 if Nkind (Ritem) = N_Pragma
6300 and then Pragma_Name (Ritem) = Name_Attach_Handler
6304 Next_Rep_Item (Ritem);
6309 end Has_Attach_Handler;
6315 function Has_Entries (Id : E) return B is
6319 pragma Assert (Is_Concurrent_Type (Id));
6321 Ent := First_Entity (Id);
6322 while Present (Ent) loop
6323 if Is_Entry (Ent) then
6327 Ent := Next_Entity (Ent);
6333 ----------------------------
6334 -- Has_Foreign_Convention --
6335 ----------------------------
6337 function Has_Foreign_Convention (Id : E) return B is
6339 -- While regular Intrinsics such as the Standard operators fit in the
6340 -- "Ada" convention, those with an Interface_Name materialize GCC
6341 -- builtin imports for which Ada special treatments shouldn't apply.
6343 return Convention (Id) in Foreign_Convention
6344 or else (Convention (Id) = Convention_Intrinsic
6345 and then Present (Interface_Name (Id)));
6346 end Has_Foreign_Convention;
6348 ---------------------------
6349 -- Has_Interrupt_Handler --
6350 ---------------------------
6352 function Has_Interrupt_Handler (Id : E) return B is
6356 pragma Assert (Is_Protected_Type (Id));
6358 Ritem := First_Rep_Item (Id);
6359 while Present (Ritem) loop
6360 if Nkind (Ritem) = N_Pragma
6361 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6365 Next_Rep_Item (Ritem);
6370 end Has_Interrupt_Handler;
6372 --------------------
6373 -- Has_Unmodified --
6374 --------------------
6376 function Has_Unmodified (E : Entity_Id) return Boolean is
6378 if Has_Pragma_Unmodified (E) then
6380 elsif Warnings_Off (E) then
6381 Set_Warnings_Off_Used_Unmodified (E);
6388 ---------------------
6389 -- Has_Unreferenced --
6390 ---------------------
6392 function Has_Unreferenced (E : Entity_Id) return Boolean is
6394 if Has_Pragma_Unreferenced (E) then
6396 elsif Warnings_Off (E) then
6397 Set_Warnings_Off_Used_Unreferenced (E);
6402 end Has_Unreferenced;
6404 ----------------------
6405 -- Has_Warnings_Off --
6406 ----------------------
6408 function Has_Warnings_Off (E : Entity_Id) return Boolean is
6410 if Warnings_Off (E) then
6411 Set_Warnings_Off_Used (E);
6416 end Has_Warnings_Off;
6418 ------------------------------
6419 -- Implementation_Base_Type --
6420 ------------------------------
6422 function Implementation_Base_Type (Id : E) return E is
6427 Bastyp := Base_Type (Id);
6429 if Is_Incomplete_Or_Private_Type (Bastyp) then
6430 Imptyp := Underlying_Type (Bastyp);
6432 -- If we have an implementation type, then just return it,
6433 -- otherwise we return the Base_Type anyway. This can only
6434 -- happen in error situations and should avoid some error bombs.
6436 if Present (Imptyp) then
6437 return Base_Type (Imptyp);
6445 end Implementation_Base_Type;
6447 -------------------------
6448 -- Invariant_Procedure --
6449 -------------------------
6451 function Invariant_Procedure (Id : E) return E is
6455 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
6457 if No (Subprograms_For_Type (Id)) then
6461 S := Subprograms_For_Type (Id);
6462 while Present (S) loop
6463 if Is_Invariant_Procedure (S) then
6466 S := Subprograms_For_Type (S);
6472 end Invariant_Procedure;
6478 -- Global flag table allowing rapid computation of this function
6480 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
6481 (E_Enumeration_Subtype |
6483 E_Signed_Integer_Subtype |
6484 E_Modular_Integer_Subtype |
6485 E_Floating_Point_Subtype |
6486 E_Ordinary_Fixed_Point_Subtype |
6487 E_Decimal_Fixed_Point_Subtype |
6492 E_Record_Subtype_With_Private |
6493 E_Limited_Private_Subtype |
6495 E_Protected_Subtype |
6497 E_String_Literal_Subtype |
6498 E_Class_Wide_Subtype => False,
6501 function Is_Base_Type (Id : E) return Boolean is
6503 return Entity_Is_Base_Type (Ekind (Id));
6506 ---------------------
6507 -- Is_Boolean_Type --
6508 ---------------------
6510 function Is_Boolean_Type (Id : E) return B is
6512 return Root_Type (Id) = Standard_Boolean;
6513 end Is_Boolean_Type;
6515 ------------------------
6516 -- Is_Constant_Object --
6517 ------------------------
6519 function Is_Constant_Object (Id : E) return B is
6520 K : constant Entity_Kind := Ekind (Id);
6523 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
6524 end Is_Constant_Object;
6526 --------------------
6527 -- Is_Discriminal --
6528 --------------------
6530 function Is_Discriminal (Id : E) return B is
6532 return (Ekind_In (Id, E_Constant, E_In_Parameter)
6533 and then Present (Discriminal_Link (Id)));
6536 ----------------------
6537 -- Is_Dynamic_Scope --
6538 ----------------------
6540 function Is_Dynamic_Scope (Id : E) return B is
6543 Ekind (Id) = E_Block
6545 Ekind (Id) = E_Function
6547 Ekind (Id) = E_Procedure
6549 Ekind (Id) = E_Subprogram_Body
6551 Ekind (Id) = E_Task_Type
6553 (Ekind (Id) = E_Limited_Private_Type
6554 and then Present (Full_View (Id))
6555 and then Ekind (Full_View (Id)) = E_Task_Type)
6557 Ekind (Id) = E_Entry
6559 Ekind (Id) = E_Entry_Family
6561 Ekind (Id) = E_Return_Statement;
6562 end Is_Dynamic_Scope;
6564 --------------------
6565 -- Is_Entity_Name --
6566 --------------------
6568 function Is_Entity_Name (N : Node_Id) return Boolean is
6569 Kind : constant Node_Kind := Nkind (N);
6572 -- Identifiers, operator symbols, expanded names are entity names
6574 return Kind = N_Identifier
6575 or else Kind = N_Operator_Symbol
6576 or else Kind = N_Expanded_Name
6578 -- Attribute references are entity names if they refer to an entity.
6579 -- Note that we don't do this by testing for the presence of the
6580 -- Entity field in the N_Attribute_Reference node, since it may not
6581 -- have been set yet.
6583 or else (Kind = N_Attribute_Reference
6584 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
6591 function Is_Finalizer (Id : E) return B is
6593 return Ekind (Id) = E_Procedure and then Chars (Id) = Name_uFinalizer;
6596 ---------------------
6597 -- Is_Ghost_Entity --
6598 ---------------------
6600 function Is_Ghost_Entity (Id : E) return B is
6602 if Present (Id) and then Ekind (Id) = E_Variable then
6603 return Convention (Id) = Convention_Ghost;
6605 return Is_Ghost_Subprogram (Id);
6607 end Is_Ghost_Entity;
6609 -------------------------
6610 -- Is_Ghost_Subprogram --
6611 -------------------------
6613 function Is_Ghost_Subprogram (Id : E) return B is
6615 if Present (Id) and then Ekind_In (Id, E_Function, E_Procedure) then
6616 return Convention (Id) = Convention_Ghost;
6620 end Is_Ghost_Subprogram;
6622 --------------------
6623 -- Is_Input_State --
6624 --------------------
6626 function Is_Input_State (Id : E) return B is
6629 Ekind (Id) = E_Abstract_State and then Has_Property (Id, Name_Input);
6636 function Is_Null_State (Id : E) return B is
6639 Ekind (Id) = E_Abstract_State and then Nkind (Parent (Id)) = N_Null;
6642 ---------------------
6643 -- Is_Output_State --
6644 ---------------------
6646 function Is_Output_State (Id : E) return B is
6649 Ekind (Id) = E_Abstract_State and then Has_Property (Id, Name_Output);
6650 end Is_Output_State;
6652 -----------------------------------
6653 -- Is_Package_Or_Generic_Package --
6654 -----------------------------------
6656 function Is_Package_Or_Generic_Package (Id : E) return B is
6658 return Ekind_In (Id, E_Generic_Package, E_Package);
6659 end Is_Package_Or_Generic_Package;
6665 function Is_Prival (Id : E) return B is
6667 return (Ekind_In (Id, E_Constant, E_Variable)
6668 and then Present (Prival_Link (Id)));
6671 ----------------------------
6672 -- Is_Protected_Component --
6673 ----------------------------
6675 function Is_Protected_Component (Id : E) return B is
6677 return Ekind (Id) = E_Component and then Is_Protected_Type (Scope (Id));
6678 end Is_Protected_Component;
6680 ----------------------------
6681 -- Is_Protected_Interface --
6682 ----------------------------
6684 function Is_Protected_Interface (Id : E) return B is
6685 Typ : constant Entity_Id := Base_Type (Id);
6687 if not Is_Interface (Typ) then
6689 elsif Is_Class_Wide_Type (Typ) then
6690 return Is_Protected_Interface (Etype (Typ));
6692 return Protected_Present (Type_Definition (Parent (Typ)));
6694 end Is_Protected_Interface;
6696 ------------------------------
6697 -- Is_Protected_Record_Type --
6698 ------------------------------
6700 function Is_Protected_Record_Type (Id : E) return B is
6703 Is_Concurrent_Record_Type (Id)
6704 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
6705 end Is_Protected_Record_Type;
6707 --------------------------------
6708 -- Is_Standard_Character_Type --
6709 --------------------------------
6711 function Is_Standard_Character_Type (Id : E) return B is
6713 if Is_Type (Id) then
6715 R : constant Entity_Id := Root_Type (Id);
6718 R = Standard_Character
6720 R = Standard_Wide_Character
6722 R = Standard_Wide_Wide_Character;
6728 end Is_Standard_Character_Type;
6730 --------------------
6731 -- Is_String_Type --
6732 --------------------
6734 function Is_String_Type (Id : E) return B is
6736 return Ekind (Id) in String_Kind
6737 or else (Is_Array_Type (Id)
6738 and then Id /= Any_Composite
6739 and then Number_Dimensions (Id) = 1
6740 and then Is_Character_Type (Component_Type (Id)));
6743 -------------------------------
6744 -- Is_Synchronized_Interface --
6745 -------------------------------
6747 function Is_Synchronized_Interface (Id : E) return B is
6748 Typ : constant Entity_Id := Base_Type (Id);
6751 if not Is_Interface (Typ) then
6754 elsif Is_Class_Wide_Type (Typ) then
6755 return Is_Synchronized_Interface (Etype (Typ));
6758 return Protected_Present (Type_Definition (Parent (Typ)))
6759 or else Synchronized_Present (Type_Definition (Parent (Typ)))
6760 or else Task_Present (Type_Definition (Parent (Typ)));
6762 end Is_Synchronized_Interface;
6764 -----------------------
6765 -- Is_Task_Interface --
6766 -----------------------
6768 function Is_Task_Interface (Id : E) return B is
6769 Typ : constant Entity_Id := Base_Type (Id);
6771 if not Is_Interface (Typ) then
6773 elsif Is_Class_Wide_Type (Typ) then
6774 return Is_Task_Interface (Etype (Typ));
6776 return Task_Present (Type_Definition (Parent (Typ)));
6778 end Is_Task_Interface;
6780 -------------------------
6781 -- Is_Task_Record_Type --
6782 -------------------------
6784 function Is_Task_Record_Type (Id : E) return B is
6787 Is_Concurrent_Record_Type (Id)
6788 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
6789 end Is_Task_Record_Type;
6791 -----------------------
6792 -- Is_Volatile_State --
6793 -----------------------
6795 function Is_Volatile_State (Id : E) return B is
6798 Ekind (Id) = E_Abstract_State
6799 and then Has_Property (Id, Name_Volatile);
6800 end Is_Volatile_State;
6802 ------------------------
6803 -- Is_Wrapper_Package --
6804 ------------------------
6806 function Is_Wrapper_Package (Id : E) return B is
6808 return (Ekind (Id) = E_Package and then Present (Related_Instance (Id)));
6809 end Is_Wrapper_Package;
6815 function Last_Formal (Id : E) return E is
6820 (Is_Overloadable (Id)
6821 or else Ekind_In (Id, E_Entry_Family,
6823 E_Subprogram_Type));
6825 if Ekind (Id) = E_Enumeration_Literal then
6829 Formal := First_Formal (Id);
6831 if Present (Formal) then
6832 while Present (Next_Formal (Formal)) loop
6833 Formal := Next_Formal (Formal);
6841 function Model_Emin_Value (Id : E) return Uint is
6843 return Machine_Emin_Value (Id);
6844 end Model_Emin_Value;
6846 -------------------------
6847 -- Model_Epsilon_Value --
6848 -------------------------
6850 function Model_Epsilon_Value (Id : E) return Ureal is
6851 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6853 return Radix ** (1 - Model_Mantissa_Value (Id));
6854 end Model_Epsilon_Value;
6856 --------------------------
6857 -- Model_Mantissa_Value --
6858 --------------------------
6860 function Model_Mantissa_Value (Id : E) return Uint is
6862 return Machine_Mantissa_Value (Id);
6863 end Model_Mantissa_Value;
6865 -----------------------
6866 -- Model_Small_Value --
6867 -----------------------
6869 function Model_Small_Value (Id : E) return Ureal is
6870 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6872 return Radix ** (Model_Emin_Value (Id) - 1);
6873 end Model_Small_Value;
6875 ------------------------
6876 -- Machine_Emax_Value --
6877 ------------------------
6879 function Machine_Emax_Value (Id : E) return Uint is
6880 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
6883 case Float_Rep (Id) is
6886 when 1 .. 6 => return Uint_128;
6887 when 7 .. 15 => return 2**10;
6888 when 16 .. 33 => return 2**14;
6889 when others => return No_Uint;
6894 when 1 .. 9 => return 2**7 - 1;
6895 when 10 .. 15 => return 2**10 - 1;
6896 when others => return No_Uint;
6900 return Uint_2 ** Uint_7 - Uint_1;
6902 end Machine_Emax_Value;
6904 ------------------------
6905 -- Machine_Emin_Value --
6906 ------------------------
6908 function Machine_Emin_Value (Id : E) return Uint is
6910 case Float_Rep (Id) is
6911 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
6912 when VAX_Native => return -Machine_Emax_Value (Id);
6913 when AAMP => return -Machine_Emax_Value (Id);
6915 end Machine_Emin_Value;
6917 ----------------------------
6918 -- Machine_Mantissa_Value --
6919 ----------------------------
6921 function Machine_Mantissa_Value (Id : E) return Uint is
6922 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
6925 case Float_Rep (Id) is
6928 when 1 .. 6 => return Uint_24;
6929 when 7 .. 15 => return UI_From_Int (53);
6930 when 16 .. 18 => return Uint_64;
6931 when 19 .. 33 => return UI_From_Int (113);
6932 when others => return No_Uint;
6937 when 1 .. 6 => return Uint_24;
6938 when 7 .. 9 => return UI_From_Int (56);
6939 when 10 .. 15 => return UI_From_Int (53);
6940 when others => return No_Uint;
6945 when 1 .. 6 => return Uint_24;
6946 when 7 .. 9 => return UI_From_Int (40);
6947 when others => return No_Uint;
6950 end Machine_Mantissa_Value;
6952 -------------------------
6953 -- Machine_Radix_Value --
6954 -------------------------
6956 function Machine_Radix_Value (Id : E) return U is
6958 case Float_Rep (Id) is
6959 when IEEE_Binary | VAX_Native | AAMP =>
6962 end Machine_Radix_Value;
6964 --------------------
6965 -- Next_Component --
6966 --------------------
6968 function Next_Component (Id : E) return E is
6972 Comp_Id := Next_Entity (Id);
6973 while Present (Comp_Id) loop
6974 exit when Ekind (Comp_Id) = E_Component;
6975 Comp_Id := Next_Entity (Comp_Id);
6981 ------------------------------------
6982 -- Next_Component_Or_Discriminant --
6983 ------------------------------------
6985 function Next_Component_Or_Discriminant (Id : E) return E is
6989 Comp_Id := Next_Entity (Id);
6990 while Present (Comp_Id) loop
6991 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6992 Comp_Id := Next_Entity (Comp_Id);
6996 end Next_Component_Or_Discriminant;
6998 -----------------------
6999 -- Next_Discriminant --
7000 -----------------------
7002 -- This function actually implements both Next_Discriminant and
7003 -- Next_Stored_Discriminant by making sure that the Discriminant
7004 -- returned is of the same variety as Id.
7006 function Next_Discriminant (Id : E) return E is
7008 -- Derived Tagged types with private extensions look like this...
7010 -- E_Discriminant d1
7011 -- E_Discriminant d2
7013 -- E_Discriminant d1
7014 -- E_Discriminant d2
7017 -- so it is critical not to go past the leading discriminants
7022 pragma Assert (Ekind (Id) = E_Discriminant);
7025 D := Next_Entity (D);
7027 or else (Ekind (D) /= E_Discriminant
7028 and then not Is_Itype (D))
7033 exit when Ekind (D) = E_Discriminant
7034 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
7038 end Next_Discriminant;
7044 function Next_Formal (Id : E) return E is
7048 -- Follow the chain of declared entities as long as the kind of the
7049 -- entity corresponds to a formal parameter. Skip internal entities
7050 -- that may have been created for implicit subtypes, in the process
7051 -- of analyzing default expressions.
7055 P := Next_Entity (P);
7057 if No (P) or else Is_Formal (P) then
7059 elsif not Is_Internal (P) then
7065 -----------------------------
7066 -- Next_Formal_With_Extras --
7067 -----------------------------
7069 function Next_Formal_With_Extras (Id : E) return E is
7071 if Present (Extra_Formal (Id)) then
7072 return Extra_Formal (Id);
7074 return Next_Formal (Id);
7076 end Next_Formal_With_Extras;
7082 function Next_Index (Id : Node_Id) return Node_Id is
7091 function Next_Literal (Id : E) return E is
7093 pragma Assert (Nkind (Id) in N_Entity);
7097 ------------------------------
7098 -- Next_Stored_Discriminant --
7099 ------------------------------
7101 function Next_Stored_Discriminant (Id : E) return E is
7103 -- See comment in Next_Discriminant
7105 return Next_Discriminant (Id);
7106 end Next_Stored_Discriminant;
7108 -----------------------
7109 -- Number_Dimensions --
7110 -----------------------
7112 function Number_Dimensions (Id : E) return Pos is
7117 if Ekind (Id) in String_Kind then
7122 T := First_Index (Id);
7123 while Present (T) loop
7130 end Number_Dimensions;
7132 --------------------
7133 -- Number_Entries --
7134 --------------------
7136 function Number_Entries (Id : E) return Nat is
7141 pragma Assert (Is_Concurrent_Type (Id));
7144 Ent := First_Entity (Id);
7145 while Present (Ent) loop
7146 if Is_Entry (Ent) then
7150 Ent := Next_Entity (Ent);
7156 --------------------
7157 -- Number_Formals --
7158 --------------------
7160 function Number_Formals (Id : E) return Pos is
7166 Formal := First_Formal (Id);
7167 while Present (Formal) loop
7169 Formal := Next_Formal (Formal);
7175 --------------------
7176 -- Parameter_Mode --
7177 --------------------
7179 function Parameter_Mode (Id : E) return Formal_Kind is
7184 ------------------------
7185 -- Predicate_Function --
7186 ------------------------
7188 function Predicate_Function (Id : E) return E is
7193 pragma Assert (Is_Type (Id));
7195 -- If type is private and has a completion, predicate may be defined
7196 -- on the full view.
7198 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7199 T := Full_View (Id);
7204 if No (Subprograms_For_Type (T)) then
7208 S := Subprograms_For_Type (T);
7209 while Present (S) loop
7210 if Is_Predicate_Function (S) then
7213 S := Subprograms_For_Type (S);
7219 end Predicate_Function;
7221 --------------------------
7222 -- Predicate_Function_M --
7223 --------------------------
7225 function Predicate_Function_M (Id : E) return E is
7230 pragma Assert (Is_Type (Id));
7232 -- If type is private and has a completion, predicate may be defined
7233 -- on the full view.
7235 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7236 T := Full_View (Id);
7241 if No (Subprograms_For_Type (T)) then
7245 S := Subprograms_For_Type (T);
7246 while Present (S) loop
7247 if Is_Predicate_Function_M (S) then
7250 S := Subprograms_For_Type (S);
7256 end Predicate_Function_M;
7258 -------------------------
7259 -- Present_In_Rep_Item --
7260 -------------------------
7262 function Present_In_Rep_Item (E : Entity_Id; N : Node_Id) return Boolean is
7266 Ritem := First_Rep_Item (E);
7268 while Present (Ritem) loop
7273 Next_Rep_Item (Ritem);
7277 end Present_In_Rep_Item;
7279 --------------------------
7280 -- Primitive_Operations --
7281 --------------------------
7283 function Primitive_Operations (Id : E) return L is
7285 if Is_Concurrent_Type (Id) then
7286 if Present (Corresponding_Record_Type (Id)) then
7287 return Direct_Primitive_Operations
7288 (Corresponding_Record_Type (Id));
7290 -- If expansion is disabled the corresponding record type is absent,
7291 -- but if the type has ancestors it may have primitive operations.
7293 elsif Is_Tagged_Type (Id) then
7294 return Direct_Primitive_Operations (Id);
7300 return Direct_Primitive_Operations (Id);
7302 end Primitive_Operations;
7304 ---------------------
7305 -- Record_Rep_Item --
7306 ---------------------
7308 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
7310 Set_Next_Rep_Item (N, First_Rep_Item (E));
7311 Set_First_Rep_Item (E, N);
7312 end Record_Rep_Item;
7318 function Root_Type (Id : E) return E is
7322 pragma Assert (Nkind (Id) in N_Entity);
7324 T := Base_Type (Id);
7326 if Ekind (T) = E_Class_Wide_Type then
7338 -- Following test catches some error cases resulting from
7341 elsif No (Etyp) then
7342 Check_Error_Detected;
7345 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
7348 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
7354 -- Return if there is a circularity in the inheritance chain. This
7355 -- happens in some error situations and we do not want to get
7356 -- stuck in this loop.
7358 if T = Base_Type (Id) then
7365 ---------------------
7366 -- Safe_Emax_Value --
7367 ---------------------
7369 function Safe_Emax_Value (Id : E) return Uint is
7371 return Machine_Emax_Value (Id);
7372 end Safe_Emax_Value;
7374 ----------------------
7375 -- Safe_First_Value --
7376 ----------------------
7378 function Safe_First_Value (Id : E) return Ureal is
7380 return -Safe_Last_Value (Id);
7381 end Safe_First_Value;
7383 ---------------------
7384 -- Safe_Last_Value --
7385 ---------------------
7387 function Safe_Last_Value (Id : E) return Ureal is
7388 Radix : constant Uint := Machine_Radix_Value (Id);
7389 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
7390 Emax : constant Uint := Safe_Emax_Value (Id);
7391 Significand : constant Uint := Radix ** Mantissa - 1;
7392 Exponent : constant Uint := Emax - Mantissa;
7398 (Num => Significand * 2 ** (Exponent mod 4),
7399 Den => -Exponent / 4,
7405 (Num => Significand,
7409 end Safe_Last_Value;
7415 function Scope_Depth (Id : E) return Uint is
7420 while Is_Record_Type (Scop) loop
7421 Scop := Scope (Scop);
7424 return Scope_Depth_Value (Scop);
7427 ---------------------
7428 -- Scope_Depth_Set --
7429 ---------------------
7431 function Scope_Depth_Set (Id : E) return B is
7433 return not Is_Record_Type (Id)
7434 and then Field22 (Id) /= Union_Id (Empty);
7435 end Scope_Depth_Set;
7437 -----------------------------
7438 -- Set_Component_Alignment --
7439 -----------------------------
7441 -- Component Alignment is encoded using two flags, Flag128/129 as
7442 -- follows. Note that both flags False = Align_Default, so that the
7443 -- default initialization of flags to False initializes component
7444 -- alignment to the default value as required.
7446 -- Flag128 Flag129 Value
7447 -- ------- ------- -----
7448 -- False False Calign_Default
7449 -- False True Calign_Component_Size
7450 -- True False Calign_Component_Size_4
7451 -- True True Calign_Storage_Unit
7453 procedure Set_Component_Alignment (Id : E; V : C) is
7455 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
7456 and then Is_Base_Type (Id));
7459 when Calign_Default =>
7460 Set_Flag128 (Id, False);
7461 Set_Flag129 (Id, False);
7463 when Calign_Component_Size =>
7464 Set_Flag128 (Id, False);
7465 Set_Flag129 (Id, True);
7467 when Calign_Component_Size_4 =>
7468 Set_Flag128 (Id, True);
7469 Set_Flag129 (Id, False);
7471 when Calign_Storage_Unit =>
7472 Set_Flag128 (Id, True);
7473 Set_Flag129 (Id, True);
7475 end Set_Component_Alignment;
7477 -----------------------------
7478 -- Set_Invariant_Procedure --
7479 -----------------------------
7481 procedure Set_Invariant_Procedure (Id : E; V : E) is
7485 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7487 S := Subprograms_For_Type (Id);
7488 Set_Subprograms_For_Type (Id, V);
7489 Set_Subprograms_For_Type (V, S);
7491 -- Check for duplicate entry
7493 while Present (S) loop
7494 if Is_Invariant_Procedure (S) then
7495 raise Program_Error;
7497 S := Subprograms_For_Type (S);
7500 end Set_Invariant_Procedure;
7502 ----------------------------
7503 -- Set_Predicate_Function --
7504 ----------------------------
7506 procedure Set_Predicate_Function (Id : E; V : E) is
7510 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7512 S := Subprograms_For_Type (Id);
7513 Set_Subprograms_For_Type (Id, V);
7514 Set_Subprograms_For_Type (V, S);
7516 while Present (S) loop
7517 if Is_Predicate_Function (S) then
7518 raise Program_Error;
7520 S := Subprograms_For_Type (S);
7523 end Set_Predicate_Function;
7525 ------------------------------
7526 -- Set_Predicate_Function_M --
7527 ------------------------------
7529 procedure Set_Predicate_Function_M (Id : E; V : E) is
7533 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7535 S := Subprograms_For_Type (Id);
7536 Set_Subprograms_For_Type (Id, V);
7537 Set_Subprograms_For_Type (V, S);
7539 -- Check for duplicates
7541 while Present (S) loop
7542 if Is_Predicate_Function_M (S) then
7543 raise Program_Error;
7545 S := Subprograms_For_Type (S);
7548 end Set_Predicate_Function_M;
7554 function Size_Clause (Id : E) return N is
7556 return Rep_Clause (Id, Name_Size);
7559 ------------------------
7560 -- Stream_Size_Clause --
7561 ------------------------
7563 function Stream_Size_Clause (Id : E) return N is
7565 return Rep_Clause (Id, Name_Stream_Size);
7566 end Stream_Size_Clause;
7572 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
7578 Kind := E_Access_Subtype;
7582 Kind := E_Array_Subtype;
7584 when E_Class_Wide_Type |
7585 E_Class_Wide_Subtype =>
7586 Kind := E_Class_Wide_Subtype;
7588 when E_Decimal_Fixed_Point_Type |
7589 E_Decimal_Fixed_Point_Subtype =>
7590 Kind := E_Decimal_Fixed_Point_Subtype;
7592 when E_Ordinary_Fixed_Point_Type |
7593 E_Ordinary_Fixed_Point_Subtype =>
7594 Kind := E_Ordinary_Fixed_Point_Subtype;
7596 when E_Private_Type |
7597 E_Private_Subtype =>
7598 Kind := E_Private_Subtype;
7600 when E_Limited_Private_Type |
7601 E_Limited_Private_Subtype =>
7602 Kind := E_Limited_Private_Subtype;
7604 when E_Record_Type_With_Private |
7605 E_Record_Subtype_With_Private =>
7606 Kind := E_Record_Subtype_With_Private;
7608 when E_Record_Type |
7610 Kind := E_Record_Subtype;
7612 when E_String_Type |
7614 Kind := E_String_Subtype;
7616 when Enumeration_Kind =>
7617 Kind := E_Enumeration_Subtype;
7620 Kind := E_Floating_Point_Subtype;
7622 when Signed_Integer_Kind =>
7623 Kind := E_Signed_Integer_Subtype;
7625 when Modular_Integer_Kind =>
7626 Kind := E_Modular_Integer_Subtype;
7628 when Protected_Kind =>
7629 Kind := E_Protected_Subtype;
7632 Kind := E_Task_Subtype;
7636 raise Program_Error;
7642 ---------------------
7643 -- Type_High_Bound --
7644 ---------------------
7646 function Type_High_Bound (Id : E) return Node_Id is
7647 Rng : constant Node_Id := Scalar_Range (Id);
7649 if Nkind (Rng) = N_Subtype_Indication then
7650 return High_Bound (Range_Expression (Constraint (Rng)));
7652 return High_Bound (Rng);
7654 end Type_High_Bound;
7656 --------------------
7657 -- Type_Low_Bound --
7658 --------------------
7660 function Type_Low_Bound (Id : E) return Node_Id is
7661 Rng : constant Node_Id := Scalar_Range (Id);
7663 if Nkind (Rng) = N_Subtype_Indication then
7664 return Low_Bound (Range_Expression (Constraint (Rng)));
7666 return Low_Bound (Rng);
7670 ---------------------
7671 -- Underlying_Type --
7672 ---------------------
7674 function Underlying_Type (Id : E) return E is
7676 -- For record_with_private the underlying type is always the direct
7677 -- full view. Never try to take the full view of the parent it
7678 -- doesn't make sense.
7680 if Ekind (Id) = E_Record_Type_With_Private then
7681 return Full_View (Id);
7683 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
7685 -- If we have an incomplete or private type with a full view,
7686 -- then we return the Underlying_Type of this full view
7688 if Present (Full_View (Id)) then
7689 if Id = Full_View (Id) then
7691 -- Previous error in declaration
7696 return Underlying_Type (Full_View (Id));
7699 -- If we have an incomplete entity that comes from the limited
7700 -- view then we return the Underlying_Type of its non-limited
7703 elsif From_With_Type (Id)
7704 and then Present (Non_Limited_View (Id))
7706 return Underlying_Type (Non_Limited_View (Id));
7708 -- Otherwise check for the case where we have a derived type or
7709 -- subtype, and if so get the Underlying_Type of the parent type.
7711 elsif Etype (Id) /= Id then
7712 return Underlying_Type (Etype (Id));
7714 -- Otherwise we have an incomplete or private type that has
7715 -- no full view, which means that we have not encountered the
7716 -- completion, so return Empty to indicate the underlying type
7717 -- is not yet known.
7723 -- For non-incomplete, non-private types, return the type itself
7724 -- Also for entities that are not types at all return the entity
7730 end Underlying_Type;
7736 function Vax_Float (Id : E) return B is
7738 return Is_Floating_Point_Type (Id) and then Float_Rep (Id) = VAX_Native;
7741 ------------------------
7742 -- Write_Entity_Flags --
7743 ------------------------
7745 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
7747 procedure W (Flag_Name : String; Flag : Boolean);
7748 -- Write out given flag if it is set
7754 procedure W (Flag_Name : String; Flag : Boolean) is
7758 Write_Str (Flag_Name);
7759 Write_Str (" = True");
7764 -- Start of processing for Write_Entity_Flags
7767 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
7768 and then Is_Base_Type (Id)
7771 Write_Str ("Component_Alignment = ");
7773 case Component_Alignment (Id) is
7774 when Calign_Default =>
7775 Write_Str ("Calign_Default");
7777 when Calign_Component_Size =>
7778 Write_Str ("Calign_Component_Size");
7780 when Calign_Component_Size_4 =>
7781 Write_Str ("Calign_Component_Size_4");
7783 when Calign_Storage_Unit =>
7784 Write_Str ("Calign_Storage_Unit");
7790 W ("Address_Taken", Flag104 (Id));
7791 W ("Body_Needed_For_SAL", Flag40 (Id));
7792 W ("C_Pass_By_Copy", Flag125 (Id));
7793 W ("Can_Never_Be_Null", Flag38 (Id));
7794 W ("Checks_May_Be_Suppressed", Flag31 (Id));
7795 W ("Debug_Info_Off", Flag166 (Id));
7796 W ("Default_Expressions_Processed", Flag108 (Id));
7797 W ("Delay_Cleanups", Flag114 (Id));
7798 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
7799 W ("Depends_On_Private", Flag14 (Id));
7800 W ("Discard_Names", Flag88 (Id));
7801 W ("Elaboration_Entity_Required", Flag174 (Id));
7802 W ("Elaborate_Body_Desirable", Flag210 (Id));
7803 W ("Entry_Accepted", Flag152 (Id));
7804 W ("Can_Use_Internal_Rep", Flag229 (Id));
7805 W ("Finalize_Storage_Only", Flag158 (Id));
7806 W ("From_With_Type", Flag159 (Id));
7807 W ("Has_Aliased_Components", Flag135 (Id));
7808 W ("Has_Alignment_Clause", Flag46 (Id));
7809 W ("Has_All_Calls_Remote", Flag79 (Id));
7810 W ("Has_Anonymous_Master", Flag253 (Id));
7811 W ("Has_Atomic_Components", Flag86 (Id));
7812 W ("Has_Biased_Representation", Flag139 (Id));
7813 W ("Has_Completion", Flag26 (Id));
7814 W ("Has_Completion_In_Body", Flag71 (Id));
7815 W ("Has_Complex_Representation", Flag140 (Id));
7816 W ("Has_Component_Size_Clause", Flag68 (Id));
7817 W ("Has_Contiguous_Rep", Flag181 (Id));
7818 W ("Has_Controlled_Component", Flag43 (Id));
7819 W ("Has_Controlling_Result", Flag98 (Id));
7820 W ("Has_Convention_Pragma", Flag119 (Id));
7821 W ("Has_Default_Aspect", Flag39 (Id));
7822 W ("Has_Delayed_Aspects", Flag200 (Id));
7823 W ("Has_Delayed_Freeze", Flag18 (Id));
7824 W ("Has_Discriminants", Flag5 (Id));
7825 W ("Has_Dispatch_Table", Flag220 (Id));
7826 W ("Has_Dynamic_Predicate_Aspect", Flag258 (Id));
7827 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
7828 W ("Has_Exit", Flag47 (Id));
7829 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
7830 W ("Has_Forward_Instantiation", Flag175 (Id));
7831 W ("Has_Fully_Qualified_Name", Flag173 (Id));
7832 W ("Has_Gigi_Rep_Item", Flag82 (Id));
7833 W ("Has_Homonym", Flag56 (Id));
7834 W ("Has_Implicit_Dereference", Flag251 (Id));
7835 W ("Has_Inheritable_Invariants", Flag248 (Id));
7836 W ("Has_Initial_Value", Flag219 (Id));
7837 W ("Has_Invariants", Flag232 (Id));
7838 W ("Has_Loop_Entry_Attributes", Flag260 (Id));
7839 W ("Has_Machine_Radix_Clause", Flag83 (Id));
7840 W ("Has_Master_Entity", Flag21 (Id));
7841 W ("Has_Missing_Return", Flag142 (Id));
7842 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
7843 W ("Has_Non_Standard_Rep", Flag75 (Id));
7844 W ("Has_Object_Size_Clause", Flag172 (Id));
7845 W ("Has_Per_Object_Constraint", Flag154 (Id));
7846 W ("Has_Postconditions", Flag240 (Id));
7847 W ("Has_Pragma_Controlled", Flag27 (Id));
7848 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
7849 W ("Has_Pragma_Inline", Flag157 (Id));
7850 W ("Has_Pragma_Inline_Always", Flag230 (Id));
7851 W ("Has_Pragma_No_Inline", Flag201 (Id));
7852 W ("Has_Pragma_Ordered", Flag198 (Id));
7853 W ("Has_Pragma_Pack", Flag121 (Id));
7854 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
7855 W ("Has_Pragma_Pure", Flag203 (Id));
7856 W ("Has_Pragma_Pure_Function", Flag179 (Id));
7857 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
7858 W ("Has_Pragma_Unmodified", Flag233 (Id));
7859 W ("Has_Pragma_Unreferenced", Flag180 (Id));
7860 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
7861 W ("Has_Predicates", Flag250 (Id));
7862 W ("Has_Primitive_Operations", Flag120 (Id));
7863 W ("Has_Private_Ancestor", Flag151 (Id));
7864 W ("Has_Private_Declaration", Flag155 (Id));
7865 W ("Has_Qualified_Name", Flag161 (Id));
7866 W ("Has_RACW", Flag214 (Id));
7867 W ("Has_Record_Rep_Clause", Flag65 (Id));
7868 W ("Has_Recursive_Call", Flag143 (Id));
7869 W ("Has_Size_Clause", Flag29 (Id));
7870 W ("Has_Small_Clause", Flag67 (Id));
7871 W ("Has_Specified_Layout", Flag100 (Id));
7872 W ("Has_Specified_Stream_Input", Flag190 (Id));
7873 W ("Has_Specified_Stream_Output", Flag191 (Id));
7874 W ("Has_Specified_Stream_Read", Flag192 (Id));
7875 W ("Has_Specified_Stream_Write", Flag193 (Id));
7876 W ("Has_Static_Discriminants", Flag211 (Id));
7877 W ("Has_Static_Predicate_Aspect", Flag259 (Id));
7878 W ("Has_Storage_Size_Clause", Flag23 (Id));
7879 W ("Has_Stream_Size_Clause", Flag184 (Id));
7880 W ("Has_Task", Flag30 (Id));
7881 W ("Has_Thunks", Flag228 (Id));
7882 W ("Has_Unchecked_Union", Flag123 (Id));
7883 W ("Has_Unknown_Discriminants", Flag72 (Id));
7884 W ("Has_Up_Level_Access", Flag215 (Id));
7885 W ("Has_Volatile_Components", Flag87 (Id));
7886 W ("Has_Xref_Entry", Flag182 (Id));
7887 W ("In_Package_Body", Flag48 (Id));
7888 W ("In_Private_Part", Flag45 (Id));
7889 W ("In_Use", Flag8 (Id));
7890 W ("Is_AST_Entry", Flag132 (Id));
7891 W ("Is_Abstract_Subprogram", Flag19 (Id));
7892 W ("Is_Abstract_Type", Flag146 (Id));
7893 W ("Is_Local_Anonymous_Access", Flag194 (Id));
7894 W ("Is_Access_Constant", Flag69 (Id));
7895 W ("Is_Ada_2005_Only", Flag185 (Id));
7896 W ("Is_Ada_2012_Only", Flag199 (Id));
7897 W ("Is_Aliased", Flag15 (Id));
7898 W ("Is_Asynchronous", Flag81 (Id));
7899 W ("Is_Atomic", Flag85 (Id));
7900 W ("Is_Bit_Packed_Array", Flag122 (Id));
7901 W ("Is_CPP_Class", Flag74 (Id));
7902 W ("Is_Called", Flag102 (Id));
7903 W ("Is_Character_Type", Flag63 (Id));
7904 W ("Is_Child_Unit", Flag73 (Id));
7905 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
7906 W ("Is_Compilation_Unit", Flag149 (Id));
7907 W ("Is_Completely_Hidden", Flag103 (Id));
7908 W ("Is_Concurrent_Record_Type", Flag20 (Id));
7909 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
7910 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
7911 W ("Is_Constrained", Flag12 (Id));
7912 W ("Is_Constructor", Flag76 (Id));
7913 W ("Is_Controlled", Flag42 (Id));
7914 W ("Is_Controlling_Formal", Flag97 (Id));
7915 W ("Is_Descendent_Of_Address", Flag223 (Id));
7916 W ("Is_Discrim_SO_Function", Flag176 (Id));
7917 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
7918 W ("Is_Dispatching_Operation", Flag6 (Id));
7919 W ("Is_Eliminated", Flag124 (Id));
7920 W ("Is_Entry_Formal", Flag52 (Id));
7921 W ("Is_Exported", Flag99 (Id));
7922 W ("Is_First_Subtype", Flag70 (Id));
7923 W ("Is_For_Access_Subtype", Flag118 (Id));
7924 W ("Is_Formal_Subprogram", Flag111 (Id));
7925 W ("Is_Frozen", Flag4 (Id));
7926 W ("Is_Generic_Actual_Type", Flag94 (Id));
7927 W ("Is_Generic_Instance", Flag130 (Id));
7928 W ("Is_Generic_Type", Flag13 (Id));
7929 W ("Is_Hidden", Flag57 (Id));
7930 W ("Is_Hidden_Open_Scope", Flag171 (Id));
7931 W ("Is_Immediately_Visible", Flag7 (Id));
7932 W ("Is_Implementation_Defined", Flag254 (Id));
7933 W ("Is_Imported", Flag24 (Id));
7934 W ("Is_Inlined", Flag11 (Id));
7935 W ("Is_Instantiated", Flag126 (Id));
7936 W ("Is_Interface", Flag186 (Id));
7937 W ("Is_Internal", Flag17 (Id));
7938 W ("Is_Interrupt_Handler", Flag89 (Id));
7939 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
7940 W ("Is_Invariant_Procedure", Flag257 (Id));
7941 W ("Is_Itype", Flag91 (Id));
7942 W ("Is_Known_Non_Null", Flag37 (Id));
7943 W ("Is_Known_Null", Flag204 (Id));
7944 W ("Is_Known_Valid", Flag170 (Id));
7945 W ("Is_Limited_Composite", Flag106 (Id));
7946 W ("Is_Limited_Interface", Flag197 (Id));
7947 W ("Is_Limited_Record", Flag25 (Id));
7948 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
7949 W ("Is_Non_Static_Subtype", Flag109 (Id));
7950 W ("Is_Null_Init_Proc", Flag178 (Id));
7951 W ("Is_Obsolescent", Flag153 (Id));
7952 W ("Is_Only_Out_Parameter", Flag226 (Id));
7953 W ("Is_Optional_Parameter", Flag134 (Id));
7954 W ("Is_Package_Body_Entity", Flag160 (Id));
7955 W ("Is_Packed", Flag51 (Id));
7956 W ("Is_Packed_Array_Type", Flag138 (Id));
7957 W ("Is_Potentially_Use_Visible", Flag9 (Id));
7958 W ("Is_Predicate_Function", Flag255 (Id));
7959 W ("Is_Predicate_Function_M", Flag256 (Id));
7960 W ("Is_Preelaborated", Flag59 (Id));
7961 W ("Is_Primitive", Flag218 (Id));
7962 W ("Is_Primitive_Wrapper", Flag195 (Id));
7963 W ("Is_Private_Composite", Flag107 (Id));
7964 W ("Is_Private_Descendant", Flag53 (Id));
7965 W ("Is_Private_Primitive", Flag245 (Id));
7966 W ("Is_Processed_Transient", Flag252 (Id));
7967 W ("Is_Public", Flag10 (Id));
7968 W ("Is_Pure", Flag44 (Id));
7969 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
7970 W ("Is_RACW_Stub_Type", Flag244 (Id));
7971 W ("Is_Raised", Flag224 (Id));
7972 W ("Is_Remote_Call_Interface", Flag62 (Id));
7973 W ("Is_Remote_Types", Flag61 (Id));
7974 W ("Is_Renaming_Of_Object", Flag112 (Id));
7975 W ("Is_Return_Object", Flag209 (Id));
7976 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
7977 W ("Is_Shared_Passive", Flag60 (Id));
7978 W ("Is_Statically_Allocated", Flag28 (Id));
7979 W ("Is_Tag", Flag78 (Id));
7980 W ("Is_Tagged_Type", Flag55 (Id));
7981 W ("Is_Thunk", Flag225 (Id));
7982 W ("Is_Trivial_Subprogram", Flag235 (Id));
7983 W ("Is_True_Constant", Flag163 (Id));
7984 W ("Is_Unchecked_Union", Flag117 (Id));
7985 W ("Is_Underlying_Record_View", Flag246 (Id));
7986 W ("Is_Unsigned_Type", Flag144 (Id));
7987 W ("Is_VMS_Exception", Flag133 (Id));
7988 W ("Is_Valued_Procedure", Flag127 (Id));
7989 W ("Is_Visible_Formal", Flag206 (Id));
7990 W ("Is_Visible_Lib_Unit", Flag116 (Id));
7991 W ("Is_Volatile", Flag16 (Id));
7992 W ("Itype_Printed", Flag202 (Id));
7993 W ("Kill_Elaboration_Checks", Flag32 (Id));
7994 W ("Kill_Range_Checks", Flag33 (Id));
7995 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
7996 W ("Low_Bound_Tested", Flag205 (Id));
7997 W ("Machine_Radix_10", Flag84 (Id));
7998 W ("Materialize_Entity", Flag168 (Id));
7999 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
8000 W ("Must_Have_Preelab_Init", Flag208 (Id));
8001 W ("Needs_Debug_Info", Flag147 (Id));
8002 W ("Needs_No_Actuals", Flag22 (Id));
8003 W ("Never_Set_In_Source", Flag115 (Id));
8004 W ("No_Pool_Assigned", Flag131 (Id));
8005 W ("No_Return", Flag113 (Id));
8006 W ("No_Strict_Aliasing", Flag136 (Id));
8007 W ("Non_Binary_Modulus", Flag58 (Id));
8008 W ("Nonzero_Is_True", Flag162 (Id));
8009 W ("OK_To_Rename", Flag247 (Id));
8010 W ("OK_To_Reorder_Components", Flag239 (Id));
8011 W ("Optimize_Alignment_Space", Flag241 (Id));
8012 W ("Optimize_Alignment_Time", Flag242 (Id));
8013 W ("Overlays_Constant", Flag243 (Id));
8014 W ("Reachable", Flag49 (Id));
8015 W ("Referenced", Flag156 (Id));
8016 W ("Referenced_As_LHS", Flag36 (Id));
8017 W ("Referenced_As_Out_Parameter", Flag227 (Id));
8018 W ("Renamed_In_Spec", Flag231 (Id));
8019 W ("Requires_Overriding", Flag213 (Id));
8020 W ("Return_Present", Flag54 (Id));
8021 W ("Returns_By_Ref", Flag90 (Id));
8022 W ("Reverse_Bit_Order", Flag164 (Id));
8023 W ("Reverse_Storage_Order", Flag93 (Id));
8024 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
8025 W ("Size_Depends_On_Discriminant", Flag177 (Id));
8026 W ("Size_Known_At_Compile_Time", Flag92 (Id));
8027 W ("Static_Elaboration_Desired", Flag77 (Id));
8028 W ("Strict_Alignment", Flag145 (Id));
8029 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
8030 W ("Suppress_Initialization", Flag105 (Id));
8031 W ("Suppress_Style_Checks", Flag165 (Id));
8032 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
8033 W ("Treat_As_Volatile", Flag41 (Id));
8034 W ("Universal_Aliasing", Flag216 (Id));
8035 W ("Used_As_Generic_Actual", Flag222 (Id));
8036 W ("Uses_Sec_Stack", Flag95 (Id));
8037 W ("Warnings_Off", Flag96 (Id));
8038 W ("Warnings_Off_Used", Flag236 (Id));
8039 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
8040 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
8041 W ("Was_Hidden", Flag196 (Id));
8042 end Write_Entity_Flags;
8044 -----------------------
8045 -- Write_Entity_Info --
8046 -----------------------
8048 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
8050 procedure Write_Attribute (Which : String; Nam : E);
8051 -- Write attribute value with given string name
8053 procedure Write_Kind (Id : Entity_Id);
8054 -- Write Ekind field of entity
8056 ---------------------
8057 -- Write_Attribute --
8058 ---------------------
8060 procedure Write_Attribute (Which : String; Nam : E) is
8064 Write_Int (Int (Nam));
8066 Write_Name (Chars (Nam));
8068 end Write_Attribute;
8074 procedure Write_Kind (Id : Entity_Id) is
8075 K : constant String := Entity_Kind'Image (Ekind (Id));
8079 Write_Str (" Kind ");
8081 if Is_Type (Id) and then Is_Tagged_Type (Id) then
8082 Write_Str ("TAGGED ");
8085 Write_Str (K (3 .. K'Length));
8088 if Is_Type (Id) and then Depends_On_Private (Id) then
8089 Write_Str ("Depends_On_Private ");
8093 -- Start of processing for Write_Entity_Info
8097 Write_Attribute ("Name ", Id);
8098 Write_Int (Int (Id));
8102 Write_Attribute (" Type ", Etype (Id));
8104 Write_Attribute (" Scope ", Scope (Id));
8109 when Discrete_Kind =>
8110 Write_Str ("Bounds: Id = ");
8112 if Present (Scalar_Range (Id)) then
8113 Write_Int (Int (Type_Low_Bound (Id)));
8114 Write_Str (" .. Id = ");
8115 Write_Int (Int (Type_High_Bound (Id)));
8117 Write_Str ("Empty");
8128 (" Component Type ", Component_Type (Id));
8131 Write_Str (" Indexes ");
8133 Index := First_Index (Id);
8134 while Present (Index) loop
8135 Write_Attribute (" ", Etype (Index));
8136 Index := Next_Index (Index);
8144 (" Directly Designated Type ",
8145 Directly_Designated_Type (Id));
8148 when Overloadable_Kind =>
8149 if Present (Homonym (Id)) then
8150 Write_Str (" Homonym ");
8151 Write_Name (Chars (Homonym (Id)));
8153 Write_Int (Int (Homonym (Id)));
8160 if Ekind (Scope (Id)) in Record_Kind then
8162 " Original_Record_Component ",
8163 Original_Record_Component (Id));
8164 Write_Int (Int (Original_Record_Component (Id)));
8168 when others => null;
8170 end Write_Entity_Info;
8172 -----------------------
8173 -- Write_Field6_Name --
8174 -----------------------
8176 procedure Write_Field6_Name (Id : Entity_Id) is
8177 pragma Warnings (Off, Id);
8179 Write_Str ("First_Rep_Item");
8180 end Write_Field6_Name;
8182 -----------------------
8183 -- Write_Field7_Name --
8184 -----------------------
8186 procedure Write_Field7_Name (Id : Entity_Id) is
8187 pragma Warnings (Off, Id);
8189 Write_Str ("Freeze_Node");
8190 end Write_Field7_Name;
8192 -----------------------
8193 -- Write_Field8_Name --
8194 -----------------------
8196 procedure Write_Field8_Name (Id : Entity_Id) is
8200 Write_Str ("Associated_Node_For_Itype");
8203 Write_Str ("Dependent_Instances");
8206 Write_Str ("First_Exit_Statement");
8209 Write_Str ("Hiding_Loop_Variable");
8211 when E_Abstract_State =>
8212 Write_Str ("Integrity_Level");
8216 E_Subprogram_Body =>
8217 Write_Str ("Mechanism");
8221 Write_Str ("Normalized_First_Bit");
8224 Write_Str ("Postcondition_Proc");
8226 when E_Return_Statement =>
8227 Write_Str ("Return_Applies_To");
8230 Write_Str ("Field8??");
8232 end Write_Field8_Name;
8234 -----------------------
8235 -- Write_Field9_Name --
8236 -----------------------
8238 procedure Write_Field9_Name (Id : Entity_Id) is
8242 Write_Str ("Class_Wide_Type");
8245 Write_Str ("Current_Value");
8247 when E_Abstract_State =>
8248 Write_Str ("Refined_State");
8251 E_Generic_Function |
8253 E_Generic_Procedure |
8256 Write_Str ("Renaming_Map");
8259 Write_Str ("Field9??");
8261 end Write_Field9_Name;
8263 ------------------------
8264 -- Write_Field10_Name --
8265 ------------------------
8267 procedure Write_Field10_Name (Id : Entity_Id) is
8270 when Class_Wide_Kind |
8276 Write_Str ("Direct_Primitive_Operations");
8279 Write_Str ("Float_Rep");
8281 when E_In_Parameter |
8283 Write_Str ("Discriminal_Link");
8289 Write_Str ("Handler_Records");
8293 Write_Str ("Normalized_Position_Max");
8296 Write_Str ("Field10??");
8298 end Write_Field10_Name;
8300 ------------------------
8301 -- Write_Field11_Name --
8302 ------------------------
8304 procedure Write_Field11_Name (Id : Entity_Id) is
8308 Write_Str ("Block_Node");
8312 Write_Str ("Component_Bit_Offset");
8315 Write_Str ("Entry_Component");
8317 when E_Enumeration_Literal =>
8318 Write_Str ("Enumeration_Pos");
8322 Write_Str ("Full_View");
8324 when E_Generic_Package =>
8325 Write_Str ("Generic_Homonym");
8331 Write_Str ("Protected_Body_Subprogram");
8334 Write_Str ("Field11??");
8336 end Write_Field11_Name;
8338 ------------------------
8339 -- Write_Field12_Name --
8340 ------------------------
8342 procedure Write_Field12_Name (Id : Entity_Id) is
8346 Write_Str ("Associated_Formal_Package");
8349 Write_Str ("Barrier_Function");
8351 when E_Enumeration_Literal =>
8352 Write_Str ("Enumeration_Rep");
8360 E_In_Out_Parameter |
8364 Write_Str ("Esize");
8368 Write_Str ("Next_Inlined_Subprogram");
8371 Write_Str ("Field12??");
8373 end Write_Field12_Name;
8375 ------------------------
8376 -- Write_Field13_Name --
8377 ------------------------
8379 procedure Write_Field13_Name (Id : Entity_Id) is
8384 Write_Str ("Component_Clause");
8387 Write_Str ("Elaboration_Entity");
8391 Generic_Unit_Kind =>
8392 Write_Str ("Elaboration_Entity");
8396 Write_Str ("Extra_Accessibility");
8399 Write_Str ("RM_Size");
8402 Write_Str ("Field13??");
8404 end Write_Field13_Name;
8406 -----------------------
8407 -- Write_Field14_Name --
8408 -----------------------
8410 procedure Write_Field14_Name (Id : Entity_Id) is
8419 Write_Str ("Alignment");
8423 Write_Str ("First_Optional_Parameter");
8427 Write_Str ("Normalized_Position");
8430 E_Generic_Package =>
8431 Write_Str ("Shadow_Entities");
8434 Write_Str ("Field14??");
8436 end Write_Field14_Name;
8438 ------------------------
8439 -- Write_Field15_Name --
8440 ------------------------
8442 procedure Write_Field15_Name (Id : Entity_Id) is
8445 when E_Discriminant =>
8446 Write_Str ("Discriminant_Number");
8449 Write_Str ("DT_Entry_Count");
8453 Write_Str ("DT_Position");
8455 when E_Protected_Type =>
8456 Write_Str ("Entry_Bodies_Array");
8459 Write_Str ("Entry_Parameters_Type");
8462 Write_Str ("Extra_Formal");
8464 when Enumeration_Kind =>
8465 Write_Str ("Lit_Indexes");
8469 Write_Str ("Related_Instance");
8471 when Decimal_Fixed_Point_Kind =>
8472 Write_Str ("Scale_Value");
8476 Write_Str ("Status_Flag_Or_Transient_Decl");
8480 Write_Str ("Storage_Size_Variable");
8482 when E_String_Literal_Subtype =>
8483 Write_Str ("String_Literal_Low_Bound");
8486 Write_Str ("Field15??");
8488 end Write_Field15_Name;
8490 ------------------------
8491 -- Write_Field16_Name --
8492 ------------------------
8494 procedure Write_Field16_Name (Id : Entity_Id) is
8497 when E_Record_Type |
8498 E_Record_Type_With_Private =>
8499 Write_Str ("Access_Disp_Table");
8501 when E_Record_Subtype |
8502 E_Class_Wide_Subtype =>
8503 Write_Str ("Cloned_Subtype");
8507 Write_Str ("DTC_Entity");
8510 Write_Str ("Entry_Formal");
8515 Write_Str ("First_Private_Entity");
8517 when Enumeration_Kind =>
8518 Write_Str ("Lit_Strings");
8520 when E_String_Literal_Subtype =>
8521 Write_Str ("String_Literal_Length");
8525 Write_Str ("Unset_Reference");
8528 Write_Str ("Field16??");
8530 end Write_Field16_Name;
8532 ------------------------
8533 -- Write_Field17_Name --
8534 ------------------------
8536 procedure Write_Field17_Name (Id : Entity_Id) is
8541 E_Generic_In_Out_Parameter |
8543 Write_Str ("Actual_Subtype");
8546 Write_Str ("Digits_Value");
8548 when E_Discriminant =>
8549 Write_Str ("Discriminal");
8558 E_Generic_Function |
8560 E_Generic_Procedure |
8568 E_Return_Statement |
8570 E_Subprogram_Type =>
8571 Write_Str ("First_Entity");
8574 Write_Str ("First_Index");
8576 when Enumeration_Kind =>
8577 Write_Str ("First_Literal");
8580 Write_Str ("Master_Id");
8582 when Modular_Integer_Kind =>
8583 Write_Str ("Modulus");
8585 when E_Incomplete_Type =>
8586 Write_Str ("Non_Limited_View");
8588 when E_Incomplete_Subtype =>
8589 if From_With_Type (Id) then
8590 Write_Str ("Non_Limited_View");
8594 Write_Str ("Prival");
8597 Write_Str ("Field17??");
8599 end Write_Field17_Name;
8601 ------------------------
8602 -- Write_Field18_Name --
8603 ------------------------
8605 procedure Write_Field18_Name (Id : Entity_Id) is
8608 when E_Enumeration_Literal |
8612 Write_Str ("Alias");
8614 when E_Record_Type =>
8615 Write_Str ("Corresponding_Concurrent_Type");
8617 when E_Subprogram_Body =>
8618 Write_Str ("Corresponding_Protected_Entry");
8620 when Concurrent_Kind =>
8621 Write_Str ("Corresponding_Record_Type");
8626 Write_Str ("Enclosing_Scope");
8628 when E_Entry_Index_Parameter =>
8629 Write_Str ("Entry_Index_Constant");
8631 when E_Class_Wide_Subtype |
8632 E_Access_Protected_Subprogram_Type |
8633 E_Anonymous_Access_Protected_Subprogram_Type |
8634 E_Access_Subprogram_Type |
8636 Write_Str ("Equivalent_Type");
8638 when Fixed_Point_Kind =>
8639 Write_Str ("Delta_Value");
8641 when Incomplete_Or_Private_Kind |
8643 Write_Str ("Private_Dependents");
8646 Write_Str ("Renamed_Object");
8650 E_Generic_Function |
8651 E_Generic_Procedure |
8652 E_Generic_Package =>
8653 Write_Str ("Renamed_Entity");
8656 Write_Str ("Field18??");
8658 end Write_Field18_Name;
8660 -----------------------
8661 -- Write_Field19_Name --
8662 -----------------------
8664 procedure Write_Field19_Name (Id : Entity_Id) is
8668 E_Generic_Package =>
8669 Write_Str ("Body_Entity");
8671 when E_Discriminant =>
8672 Write_Str ("Corresponding_Discriminant");
8675 Write_Str ("Default_Value");
8677 when E_Array_Type =>
8678 Write_Str ("Default_Component_Value");
8680 when E_Record_Type =>
8681 Write_Str ("Parent_Subtype");
8685 Write_Str ("Size_Check_Code");
8687 when E_Package_Body |
8689 Write_Str ("Spec_Entity");
8691 when Private_Kind =>
8692 Write_Str ("Underlying_Full_View");
8694 when E_Function | E_Operator | E_Subprogram_Type =>
8695 Write_Str ("Extra_Accessibility_Of_Result");
8698 Write_Str ("Field19??");
8700 end Write_Field19_Name;
8702 -----------------------
8703 -- Write_Field20_Name --
8704 -----------------------
8706 procedure Write_Field20_Name (Id : Entity_Id) is
8710 Write_Str ("Component_Type");
8712 when E_In_Parameter |
8713 E_Generic_In_Parameter =>
8714 Write_Str ("Default_Value");
8717 Write_Str ("Directly_Designated_Type");
8720 Write_Str ("Discriminant_Checking_Func");
8722 when E_Discriminant =>
8723 Write_Str ("Discriminant_Default_Value");
8732 E_Generic_Function |
8734 E_Generic_Procedure |
8742 E_Return_Statement |
8744 E_Subprogram_Type =>
8745 Write_Str ("Last_Entity");
8749 Write_Str ("Prival_Link");
8752 Write_Str ("Scalar_Range");
8755 Write_Str ("Register_Exception_Call");
8758 Write_Str ("Field20??");
8760 end Write_Field20_Name;
8762 -----------------------
8763 -- Write_Field21_Name --
8764 -----------------------
8766 procedure Write_Field21_Name (Id : Entity_Id) is
8770 Write_Str ("Accept_Address");
8772 when E_In_Parameter =>
8773 Write_Str ("Default_Expr_Function");
8775 when Concurrent_Kind |
8776 Incomplete_Or_Private_Kind |
8780 Write_Str ("Discriminant_Constraint");
8785 E_Generic_Function |
8787 E_Generic_Procedure |
8789 Write_Str ("Interface_Name");
8792 Modular_Integer_Kind =>
8793 Write_Str ("Original_Array_Type");
8795 when Fixed_Point_Kind =>
8796 Write_Str ("Small_Value");
8799 Write_Str ("Field21??");
8801 end Write_Field21_Name;
8803 -----------------------
8804 -- Write_Field22_Name --
8805 -----------------------
8807 procedure Write_Field22_Name (Id : Entity_Id) is
8811 Write_Str ("Associated_Storage_Pool");
8814 Write_Str ("Component_Size");
8816 when E_Record_Type =>
8817 Write_Str ("Corresponding_Remote_Type");
8821 Write_Str ("Original_Record_Component");
8823 when E_Enumeration_Literal =>
8824 Write_Str ("Enumeration_Rep_Expr");
8827 Write_Str ("Exception_Code");
8829 when E_Record_Type_With_Private |
8830 E_Record_Subtype_With_Private |
8833 E_Limited_Private_Type |
8834 E_Limited_Private_Subtype =>
8835 Write_Str ("Private_View");
8838 Write_Str ("Protected_Formal");
8848 E_Generic_Function |
8849 E_Generic_Procedure |
8852 E_Return_Statement |
8855 Write_Str ("Scope_Depth_Value");
8858 Write_Str ("Shared_Var_Procs_Instance");
8861 Write_Str ("Field22??");
8863 end Write_Field22_Name;
8865 ------------------------
8866 -- Write_Field23_Name --
8867 ------------------------
8869 procedure Write_Field23_Name (Id : Entity_Id) is
8872 when E_Discriminant =>
8873 Write_Str ("CR_Discriminant");
8876 Write_Str ("Entry_Cancel_Parameter");
8878 when E_Enumeration_Type =>
8879 Write_Str ("Enum_Pos_To_Rep");
8883 Write_Str ("Extra_Constrained");
8886 Write_Str ("Finalization_Master");
8888 when E_Generic_Function |
8890 E_Generic_Procedure =>
8891 Write_Str ("Inner_Instances");
8894 Write_Str ("Packed_Array_Type");
8897 Write_Str ("Protection_Object");
8899 when Concurrent_Kind |
8900 Incomplete_Or_Private_Kind |
8904 Write_Str ("Stored_Constraint");
8908 if Present (Scope (Id))
8909 and then Is_Protected_Type (Scope (Id))
8911 Write_Str ("Protection_Object");
8913 Write_Str ("Generic_Renamings");
8917 if Is_Generic_Instance (Id) then
8918 Write_Str ("Generic_Renamings");
8920 Write_Str ("Limited_View");
8924 Write_Str ("Field23??");
8926 end Write_Field23_Name;
8928 ------------------------
8929 -- Write_Field24_Name --
8930 ------------------------
8932 procedure Write_Field24_Name (Id : Entity_Id) is
8937 Write_Str ("Finalizer");
8942 Write_Str ("Related_Expression");
8947 Generic_Subprogram_Kind =>
8948 Write_Str ("Contract");
8951 Write_Str ("Field24???");
8953 end Write_Field24_Name;
8955 ------------------------
8956 -- Write_Field25_Name --
8957 ------------------------
8959 procedure Write_Field25_Name (Id : Entity_Id) is
8963 Write_Str ("Abstract_States");
8966 Write_Str ("Debug_Renaming_Link");
8969 Write_Str ("DT_Offset_To_Top_Func");
8973 Write_Str ("Interface_Alias");
8975 when E_Record_Type |
8977 E_Record_Type_With_Private |
8978 E_Record_Subtype_With_Private =>
8979 Write_Str ("Interfaces");
8983 Write_Str ("Related_Array_Object");
8986 Write_Str ("Task_Body_Procedure");
8990 Write_Str ("PPC_Wrapper");
8992 when E_Enumeration_Subtype |
8993 E_Modular_Integer_Subtype |
8994 E_Signed_Integer_Subtype =>
8995 Write_Str ("Static_Predicate");
8998 Write_Str ("Field25??");
9000 end Write_Field25_Name;
9002 ------------------------
9003 -- Write_Field26_Name --
9004 ------------------------
9006 procedure Write_Field26_Name (Id : Entity_Id) is
9009 when E_Record_Type |
9010 E_Record_Type_With_Private =>
9011 Write_Str ("Dispatch_Table_Wrappers");
9013 when E_In_Out_Parameter |
9016 Write_Str ("Last_Assignment");
9018 when E_Access_Subprogram_Type =>
9019 Write_Str ("Original_Access_Type");
9021 when E_Generic_Package |
9023 Write_Str ("Package_Instantiation");
9027 Write_Str ("Related_Type");
9030 Write_Str ("Relative_Deadline_Variable");
9034 Write_Str ("Overridden_Operation");
9037 Write_Str ("Field26??");
9039 end Write_Field26_Name;
9041 ------------------------
9042 -- Write_Field27_Name --
9043 ------------------------
9045 procedure Write_Field27_Name (Id : Entity_Id) is
9050 Write_Str ("Current_Use_Clause");
9055 Write_Str ("Related_Type");
9059 Write_Str ("Wrapped_Entity");
9062 Write_Str ("Field27??");
9064 end Write_Field27_Name;
9066 ------------------------
9067 -- Write_Field28_Name --
9068 ------------------------
9070 procedure Write_Field28_Name (Id : Entity_Id) is
9078 E_Subprogram_Type =>
9079 Write_Str ("Extra_Formals");
9081 when E_Constant | E_Variable =>
9082 Write_Str ("Initialization_Statements");
9084 when E_Record_Type =>
9085 Write_Str ("Underlying_Record_View");
9088 Write_Str ("Field28??");
9090 end Write_Field28_Name;
9092 ------------------------
9093 -- Write_Field29_Name --
9094 ------------------------
9096 procedure Write_Field29_Name (Id : Entity_Id) is
9100 Write_Str ("Subprograms_For_Type");
9103 Write_Str ("Field29??");
9105 end Write_Field29_Name;
9107 ------------------------
9108 -- Write_Field30_Name --
9109 ------------------------
9111 procedure Write_Field30_Name (Id : Entity_Id) is
9115 Write_Str ("Corresponding_Equality");
9118 Write_Str ("Static_Initialization");
9121 Write_Str ("Field30??");
9123 end Write_Field30_Name;
9125 ------------------------
9126 -- Write_Field31_Name --
9127 ------------------------
9129 procedure Write_Field31_Name (Id : Entity_Id) is
9134 Write_Str ("Thunk_Entity");
9137 Write_Str ("Field31??");
9139 end Write_Field31_Name;
9141 ------------------------
9142 -- Write_Field32_Name --
9143 ------------------------
9145 procedure Write_Field32_Name (Id : Entity_Id) is
9149 Write_Str ("Field32??");
9151 end Write_Field32_Name;
9153 ------------------------
9154 -- Write_Field33_Name --
9155 ------------------------
9157 procedure Write_Field33_Name (Id : Entity_Id) is
9161 Write_Str ("Field33??");
9163 end Write_Field33_Name;
9165 ------------------------
9166 -- Write_Field34_Name --
9167 ------------------------
9169 procedure Write_Field34_Name (Id : Entity_Id) is
9173 Write_Str ("Field34??");
9175 end Write_Field34_Name;
9177 ------------------------
9178 -- Write_Field35_Name --
9179 ------------------------
9181 procedure Write_Field35_Name (Id : Entity_Id) is
9185 Write_Str ("Field35??");
9187 end Write_Field35_Name;
9189 -------------------------
9190 -- Iterator Procedures --
9191 -------------------------
9193 procedure Proc_Next_Component (N : in out Node_Id) is
9195 N := Next_Component (N);
9196 end Proc_Next_Component;
9198 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
9200 N := Next_Entity (N);
9201 while Present (N) loop
9202 exit when Ekind_In (N, E_Component, E_Discriminant);
9203 N := Next_Entity (N);
9205 end Proc_Next_Component_Or_Discriminant;
9207 procedure Proc_Next_Discriminant (N : in out Node_Id) is
9209 N := Next_Discriminant (N);
9210 end Proc_Next_Discriminant;
9212 procedure Proc_Next_Formal (N : in out Node_Id) is
9214 N := Next_Formal (N);
9215 end Proc_Next_Formal;
9217 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
9219 N := Next_Formal_With_Extras (N);
9220 end Proc_Next_Formal_With_Extras;
9222 procedure Proc_Next_Index (N : in out Node_Id) is
9224 N := Next_Index (N);
9225 end Proc_Next_Index;
9227 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
9229 N := Next_Inlined_Subprogram (N);
9230 end Proc_Next_Inlined_Subprogram;
9232 procedure Proc_Next_Literal (N : in out Node_Id) is
9234 N := Next_Literal (N);
9235 end Proc_Next_Literal;
9237 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
9239 N := Next_Stored_Discriminant (N);
9240 end Proc_Next_Stored_Discriminant;