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 Namet; use Namet;
37 with Nlists; use Nlists;
38 with Output; use Output;
39 with Sinfo; use Sinfo;
40 with Stand; use Stand;
44 use Atree.Unchecked_Access;
45 -- This is one of the packages that is allowed direct untyped access to
46 -- the fields in a node, since it provides the next level abstraction
47 -- which incorporates appropriate checks.
49 ----------------------------------------------
50 -- Usage of Fields in Defining Entity Nodes --
51 ----------------------------------------------
53 -- Four of these fields are defined in Sinfo, since they in are the base
54 -- part of the node. The access routines for these four fields and the
55 -- corresponding set procedures are defined in Sinfo. These fields are
56 -- present in all entities. Note that Homonym is also in the base part of
57 -- the node, but has access routines that are more properly part of Einfo,
58 -- which is why they are defined here.
65 -- Remaining fields are present only in extended nodes (i.e. entities)
67 -- The following fields are present in all entities
70 -- First_Rep_Item Node6
73 -- The usage of other fields (and the entity kinds to which it applies)
74 -- depends on the particular field (see Einfo spec for details).
76 -- Associated_Node_For_Itype Node8
77 -- Dependent_Instances Elist8
78 -- Hiding_Loop_Variable Node8
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
248 -- SPARK_Mode_Pragmas Node32
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
550 -- Has_Delayed_Rep_Aspects Flag261
551 -- May_Inherit_Delayed_Rep_Aspects Flag262
580 -- Note: Flag287-317 are defined in atree.ads/adb, but not yet in atree.h
582 -----------------------
583 -- Local subprograms --
584 -----------------------
588 Opt_Nam : Name_Id) return Boolean;
589 -- Determine whether abstract state State has a particular option denoted
590 -- by the name Opt_Nam.
596 function Float_Rep (Id : E) return F is
597 pragma Assert (Is_Floating_Point_Type (Id));
599 return F'Val (UI_To_Int (Uint10 (Base_Type (Id))));
608 Opt_Nam : Name_Id) return Boolean
610 Par : constant Node_Id := Parent (State);
614 pragma Assert (Ekind (State) = E_Abstract_State);
616 -- States with options appear as extension aggregates in the tree
618 if Nkind (Par) = N_Extension_Aggregate then
619 if Opt_Nam = Name_Part_Of then
620 return Present (Component_Associations (Par));
623 Opt := First (Expressions (Par));
624 while Present (Opt) loop
625 if Chars (Opt) = Opt_Nam then
637 --------------------------------
638 -- Attribute Access Functions --
639 --------------------------------
641 function Abstract_States (Id : E) return L is
643 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
647 function Accept_Address (Id : E) return L is
652 function Access_Disp_Table (Id : E) return L is
654 pragma Assert (Ekind_In (Id, E_Record_Type,
656 return Elist16 (Implementation_Base_Type (Id));
657 end Access_Disp_Table;
659 function Actual_Subtype (Id : E) return E is
662 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
663 or else Is_Formal (Id));
667 function Address_Taken (Id : E) return B is
672 function Alias (Id : E) return E is
675 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
679 function Alignment (Id : E) return U is
681 pragma Assert (Is_Type (Id)
682 or else Is_Formal (Id)
683 or else Ekind_In (Id, E_Loop_Parameter,
690 function Associated_Formal_Package (Id : E) return E is
692 pragma Assert (Ekind (Id) = E_Package);
694 end Associated_Formal_Package;
696 function Associated_Node_For_Itype (Id : E) return N is
699 end Associated_Node_For_Itype;
701 function Associated_Storage_Pool (Id : E) return E is
703 pragma Assert (Is_Access_Type (Id));
704 return Node22 (Root_Type (Id));
705 end Associated_Storage_Pool;
707 function Barrier_Function (Id : E) return N is
709 pragma Assert (Is_Entry (Id));
711 end Barrier_Function;
713 function Block_Node (Id : E) return N is
715 pragma Assert (Ekind (Id) = E_Block);
719 function Body_Entity (Id : E) return E is
721 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
725 function Body_Needed_For_SAL (Id : E) return B is
728 (Ekind (Id) = E_Package
729 or else Is_Subprogram (Id)
730 or else Is_Generic_Unit (Id));
732 end Body_Needed_For_SAL;
734 function C_Pass_By_Copy (Id : E) return B is
736 pragma Assert (Is_Record_Type (Id));
737 return Flag125 (Implementation_Base_Type (Id));
740 function Can_Never_Be_Null (Id : E) return B is
743 end Can_Never_Be_Null;
745 function Checks_May_Be_Suppressed (Id : E) return B is
748 end Checks_May_Be_Suppressed;
750 function Class_Wide_Type (Id : E) return E is
752 pragma Assert (Is_Type (Id));
756 function Cloned_Subtype (Id : E) return E is
758 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
762 function Component_Bit_Offset (Id : E) return U is
764 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
766 end Component_Bit_Offset;
768 function Component_Clause (Id : E) return N is
770 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
772 end Component_Clause;
774 function Component_Size (Id : E) return U is
776 pragma Assert (Is_Array_Type (Id));
777 return Uint22 (Implementation_Base_Type (Id));
780 function Component_Type (Id : E) return E is
782 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
783 return Node20 (Implementation_Base_Type (Id));
786 function Corresponding_Concurrent_Type (Id : E) return E is
788 pragma Assert (Ekind (Id) = E_Record_Type);
790 end Corresponding_Concurrent_Type;
792 function Corresponding_Discriminant (Id : E) return E is
794 pragma Assert (Ekind (Id) = E_Discriminant);
796 end Corresponding_Discriminant;
798 function Corresponding_Equality (Id : E) return E is
801 (Ekind (Id) = E_Function
802 and then not Comes_From_Source (Id)
803 and then Chars (Id) = Name_Op_Ne);
805 end Corresponding_Equality;
807 function Corresponding_Protected_Entry (Id : E) return E is
809 pragma Assert (Ekind (Id) = E_Subprogram_Body);
811 end Corresponding_Protected_Entry;
813 function Corresponding_Record_Type (Id : E) return E is
815 pragma Assert (Is_Concurrent_Type (Id));
817 end Corresponding_Record_Type;
819 function Corresponding_Remote_Type (Id : E) return E is
822 end Corresponding_Remote_Type;
824 function Current_Use_Clause (Id : E) return E is
826 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
828 end Current_Use_Clause;
830 function Current_Value (Id : E) return N is
832 pragma Assert (Ekind (Id) in Object_Kind);
836 function CR_Discriminant (Id : E) return E is
841 function Debug_Info_Off (Id : E) return B is
846 function Debug_Renaming_Link (Id : E) return E is
849 end Debug_Renaming_Link;
851 function Default_Aspect_Component_Value (Id : E) return N is
853 pragma Assert (Is_Array_Type (Id));
855 end Default_Aspect_Component_Value;
857 function Default_Aspect_Value (Id : E) return N is
859 pragma Assert (Is_Scalar_Type (Id));
861 end Default_Aspect_Value;
863 function Default_Expr_Function (Id : E) return E is
865 pragma Assert (Is_Formal (Id));
867 end Default_Expr_Function;
869 function Default_Expressions_Processed (Id : E) return B is
872 end Default_Expressions_Processed;
874 function Default_Value (Id : E) return N is
876 pragma Assert (Is_Formal (Id));
880 function Delay_Cleanups (Id : E) return B is
885 function Delay_Subprogram_Descriptors (Id : E) return B is
888 end Delay_Subprogram_Descriptors;
890 function Delta_Value (Id : E) return R is
892 pragma Assert (Is_Fixed_Point_Type (Id));
896 function Dependent_Instances (Id : E) return L is
898 pragma Assert (Is_Generic_Instance (Id));
900 end Dependent_Instances;
902 function Depends_On_Private (Id : E) return B is
904 pragma Assert (Nkind (Id) in N_Entity);
906 end Depends_On_Private;
908 function Digits_Value (Id : E) return U is
911 (Is_Floating_Point_Type (Id)
912 or else Is_Decimal_Fixed_Point_Type (Id));
916 function Direct_Primitive_Operations (Id : E) return L is
918 pragma Assert (Is_Tagged_Type (Id));
920 end Direct_Primitive_Operations;
922 function Directly_Designated_Type (Id : E) return E is
924 pragma Assert (Is_Access_Type (Id));
926 end Directly_Designated_Type;
928 function Discard_Names (Id : E) return B is
933 function Discriminal (Id : E) return E is
935 pragma Assert (Ekind (Id) = E_Discriminant);
939 function Discriminal_Link (Id : E) return N is
942 end Discriminal_Link;
944 function Discriminant_Checking_Func (Id : E) return E is
946 pragma Assert (Ekind (Id) = E_Component);
948 end Discriminant_Checking_Func;
950 function Discriminant_Constraint (Id : E) return L is
952 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
954 end Discriminant_Constraint;
956 function Discriminant_Default_Value (Id : E) return N is
958 pragma Assert (Ekind (Id) = E_Discriminant);
960 end Discriminant_Default_Value;
962 function Discriminant_Number (Id : E) return U is
964 pragma Assert (Ekind (Id) = E_Discriminant);
966 end Discriminant_Number;
968 function Dispatch_Table_Wrappers (Id : E) return L is
970 pragma Assert (Ekind_In (Id, E_Record_Type,
972 return Elist26 (Implementation_Base_Type (Id));
973 end Dispatch_Table_Wrappers;
975 function DT_Entry_Count (Id : E) return U is
977 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
981 function DT_Offset_To_Top_Func (Id : E) return E is
983 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
985 end DT_Offset_To_Top_Func;
987 function DT_Position (Id : E) return U is
989 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
990 and then Present (DTC_Entity (Id)));
994 function DTC_Entity (Id : E) return E is
996 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1000 function Elaborate_Body_Desirable (Id : E) return B is
1002 pragma Assert (Ekind (Id) = E_Package);
1003 return Flag210 (Id);
1004 end Elaborate_Body_Desirable;
1006 function Elaboration_Entity (Id : E) return E is
1011 Ekind (Id) = E_Package
1013 Is_Generic_Unit (Id));
1015 end Elaboration_Entity;
1017 function Elaboration_Entity_Required (Id : E) return B is
1022 Ekind (Id) = E_Package
1024 Is_Generic_Unit (Id));
1025 return Flag174 (Id);
1026 end Elaboration_Entity_Required;
1028 function Enclosing_Scope (Id : E) return E is
1031 end Enclosing_Scope;
1033 function Entry_Accepted (Id : E) return B is
1035 pragma Assert (Is_Entry (Id));
1036 return Flag152 (Id);
1039 function Entry_Bodies_Array (Id : E) return E is
1042 end Entry_Bodies_Array;
1044 function Entry_Cancel_Parameter (Id : E) return E is
1047 end Entry_Cancel_Parameter;
1049 function Entry_Component (Id : E) return E is
1052 end Entry_Component;
1054 function Entry_Formal (Id : E) return E is
1059 function Entry_Index_Constant (Id : E) return N is
1061 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
1063 end Entry_Index_Constant;
1065 function Contract (Id : E) return N is
1068 (Ekind_In (Id, E_Entry, E_Entry_Family)
1069 or else Is_Subprogram (Id)
1070 or else Is_Generic_Subprogram (Id));
1074 function Entry_Parameters_Type (Id : E) return E is
1077 end Entry_Parameters_Type;
1079 function Enum_Pos_To_Rep (Id : E) return E is
1081 pragma Assert (Ekind (Id) = E_Enumeration_Type);
1083 end Enum_Pos_To_Rep;
1085 function Enumeration_Pos (Id : E) return Uint is
1087 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1089 end Enumeration_Pos;
1091 function Enumeration_Rep (Id : E) return U is
1093 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1095 end Enumeration_Rep;
1097 function Enumeration_Rep_Expr (Id : E) return N is
1099 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1101 end Enumeration_Rep_Expr;
1103 function Equivalent_Type (Id : E) return E is
1106 (Ekind_In (Id, E_Class_Wide_Type,
1107 E_Class_Wide_Subtype,
1108 E_Access_Protected_Subprogram_Type,
1109 E_Anonymous_Access_Protected_Subprogram_Type,
1110 E_Access_Subprogram_Type,
1113 end Equivalent_Type;
1115 function Esize (Id : E) return Uint is
1120 function Exception_Code (Id : E) return Uint is
1122 pragma Assert (Ekind (Id) = E_Exception);
1126 function Extra_Accessibility (Id : E) return E is
1129 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
1131 end Extra_Accessibility;
1133 function Extra_Accessibility_Of_Result (Id : E) return E is
1135 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
1137 end Extra_Accessibility_Of_Result;
1139 function Extra_Constrained (Id : E) return E is
1141 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1143 end Extra_Constrained;
1145 function Extra_Formal (Id : E) return E is
1150 function Extra_Formals (Id : E) return E is
1153 (Is_Overloadable (Id)
1154 or else Ekind_In (Id, E_Entry_Family,
1156 E_Subprogram_Type));
1160 function Can_Use_Internal_Rep (Id : E) return B is
1162 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1163 return Flag229 (Base_Type (Id));
1164 end Can_Use_Internal_Rep;
1166 function Finalization_Master (Id : E) return E is
1168 pragma Assert (Is_Access_Type (Id));
1169 return Node23 (Root_Type (Id));
1170 end Finalization_Master;
1172 function Finalize_Storage_Only (Id : E) return B is
1174 pragma Assert (Is_Type (Id));
1175 return Flag158 (Base_Type (Id));
1176 end Finalize_Storage_Only;
1178 function Finalizer (Id : E) return E is
1181 (Ekind (Id) = E_Package
1182 or else Ekind (Id) = E_Package_Body);
1186 function First_Entity (Id : E) return E is
1191 function First_Exit_Statement (Id : E) return N is
1193 pragma Assert (Ekind (Id) = E_Loop);
1195 end First_Exit_Statement;
1197 function First_Index (Id : E) return N is
1199 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1203 function First_Literal (Id : E) return E is
1205 pragma Assert (Is_Enumeration_Type (Id));
1209 function First_Optional_Parameter (Id : E) return E is
1211 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1213 end First_Optional_Parameter;
1215 function First_Private_Entity (Id : E) return E is
1217 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1218 or else Ekind (Id) in Concurrent_Kind);
1220 end First_Private_Entity;
1222 function First_Rep_Item (Id : E) return E is
1227 function Freeze_Node (Id : E) return N is
1232 function From_With_Type (Id : E) return B is
1234 return Flag159 (Id);
1237 function Full_View (Id : E) return E is
1239 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1243 function Generic_Homonym (Id : E) return E is
1245 pragma Assert (Ekind (Id) = E_Generic_Package);
1247 end Generic_Homonym;
1249 function Generic_Renamings (Id : E) return L is
1251 return Elist23 (Id);
1252 end Generic_Renamings;
1254 function Handler_Records (Id : E) return S is
1257 end Handler_Records;
1259 function Has_Aliased_Components (Id : E) return B is
1261 return Flag135 (Implementation_Base_Type (Id));
1262 end Has_Aliased_Components;
1264 function Has_Alignment_Clause (Id : E) return B is
1267 end Has_Alignment_Clause;
1269 function Has_All_Calls_Remote (Id : E) return B is
1272 end Has_All_Calls_Remote;
1274 function Has_Anonymous_Master (Id : E) return B is
1277 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
1278 return Flag253 (Id);
1279 end Has_Anonymous_Master;
1281 function Has_Atomic_Components (Id : E) return B is
1283 return Flag86 (Implementation_Base_Type (Id));
1284 end Has_Atomic_Components;
1286 function Has_Biased_Representation (Id : E) return B is
1288 return Flag139 (Id);
1289 end Has_Biased_Representation;
1291 function Has_Completion (Id : E) return B is
1296 function Has_Completion_In_Body (Id : E) return B is
1298 pragma Assert (Is_Type (Id));
1300 end Has_Completion_In_Body;
1302 function Has_Complex_Representation (Id : E) return B is
1304 pragma Assert (Is_Type (Id));
1305 return Flag140 (Implementation_Base_Type (Id));
1306 end Has_Complex_Representation;
1308 function Has_Component_Size_Clause (Id : E) return B is
1310 pragma Assert (Is_Array_Type (Id));
1311 return Flag68 (Implementation_Base_Type (Id));
1312 end Has_Component_Size_Clause;
1314 function Has_Constrained_Partial_View (Id : E) return B is
1316 pragma Assert (Is_Type (Id));
1317 return Flag187 (Id);
1318 end Has_Constrained_Partial_View;
1320 function Has_Controlled_Component (Id : E) return B is
1322 return Flag43 (Base_Type (Id));
1323 end Has_Controlled_Component;
1325 function Has_Contiguous_Rep (Id : E) return B is
1327 return Flag181 (Id);
1328 end Has_Contiguous_Rep;
1330 function Has_Controlling_Result (Id : E) return B is
1333 end Has_Controlling_Result;
1335 function Has_Convention_Pragma (Id : E) return B is
1337 return Flag119 (Id);
1338 end Has_Convention_Pragma;
1340 function Has_Default_Aspect (Id : E) return B is
1342 return Flag39 (Base_Type (Id));
1343 end Has_Default_Aspect;
1345 function Has_Delayed_Aspects (Id : E) return B is
1347 pragma Assert (Nkind (Id) in N_Entity);
1348 return Flag200 (Id);
1349 end Has_Delayed_Aspects;
1351 function Has_Delayed_Freeze (Id : E) return B is
1353 pragma Assert (Nkind (Id) in N_Entity);
1355 end Has_Delayed_Freeze;
1357 function Has_Delayed_Rep_Aspects (Id : E) return B is
1359 pragma Assert (Nkind (Id) in N_Entity);
1360 return Flag261 (Id);
1361 end Has_Delayed_Rep_Aspects;
1363 function Has_Discriminants (Id : E) return B is
1365 pragma Assert (Nkind (Id) in N_Entity);
1367 end Has_Discriminants;
1369 function Has_Dispatch_Table (Id : E) return B is
1371 pragma Assert (Is_Tagged_Type (Id));
1372 return Flag220 (Id);
1373 end Has_Dispatch_Table;
1375 function Has_Dynamic_Predicate_Aspect (Id : E) return B is
1377 pragma Assert (Is_Type (Id));
1378 return Flag258 (Id);
1379 end Has_Dynamic_Predicate_Aspect;
1381 function Has_Enumeration_Rep_Clause (Id : E) return B is
1383 pragma Assert (Is_Enumeration_Type (Id));
1385 end Has_Enumeration_Rep_Clause;
1387 function Has_Exit (Id : E) return B is
1392 function Has_External_Tag_Rep_Clause (Id : E) return B is
1394 pragma Assert (Is_Tagged_Type (Id));
1395 return Flag110 (Id);
1396 end Has_External_Tag_Rep_Clause;
1398 function Has_Forward_Instantiation (Id : E) return B is
1400 return Flag175 (Id);
1401 end Has_Forward_Instantiation;
1403 function Has_Fully_Qualified_Name (Id : E) return B is
1405 return Flag173 (Id);
1406 end Has_Fully_Qualified_Name;
1408 function Has_Gigi_Rep_Item (Id : E) return B is
1411 end Has_Gigi_Rep_Item;
1413 function Has_Homonym (Id : E) return B is
1418 function Has_Implicit_Dereference (Id : E) return B is
1420 return Flag251 (Id);
1421 end Has_Implicit_Dereference;
1423 function Has_Independent_Components (Id : E) return B is
1425 pragma Assert (Is_Object (Id) or else Is_Type (Id));
1427 end Has_Independent_Components;
1429 function Has_Inheritable_Invariants (Id : E) return B is
1431 pragma Assert (Is_Type (Id));
1432 return Flag248 (Id);
1433 end Has_Inheritable_Invariants;
1435 function Has_Initial_Value (Id : E) return B is
1437 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1438 return Flag219 (Id);
1439 end Has_Initial_Value;
1441 function Has_Invariants (Id : E) return B is
1443 pragma Assert (Is_Type (Id));
1444 return Flag232 (Id);
1447 function Has_Loop_Entry_Attributes (Id : E) return B is
1449 pragma Assert (Ekind (Id) = E_Loop);
1450 return Flag260 (Id);
1451 end Has_Loop_Entry_Attributes;
1453 function Has_Machine_Radix_Clause (Id : E) return B is
1455 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1457 end Has_Machine_Radix_Clause;
1459 function Has_Master_Entity (Id : E) return B is
1462 end Has_Master_Entity;
1464 function Has_Missing_Return (Id : E) return B is
1466 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1467 return Flag142 (Id);
1468 end Has_Missing_Return;
1470 function Has_Nested_Block_With_Handler (Id : E) return B is
1472 return Flag101 (Id);
1473 end Has_Nested_Block_With_Handler;
1475 function Has_Non_Standard_Rep (Id : E) return B is
1477 return Flag75 (Implementation_Base_Type (Id));
1478 end Has_Non_Standard_Rep;
1480 function Has_Object_Size_Clause (Id : E) return B is
1482 pragma Assert (Is_Type (Id));
1483 return Flag172 (Id);
1484 end Has_Object_Size_Clause;
1486 function Has_Per_Object_Constraint (Id : E) return B is
1488 return Flag154 (Id);
1489 end Has_Per_Object_Constraint;
1491 function Has_Postconditions (Id : E) return B is
1493 pragma Assert (Is_Subprogram (Id));
1494 return Flag240 (Id);
1495 end Has_Postconditions;
1497 function Has_Pragma_Controlled (Id : E) return B is
1499 pragma Assert (Is_Access_Type (Id));
1500 return Flag27 (Implementation_Base_Type (Id));
1501 end Has_Pragma_Controlled;
1503 function Has_Pragma_Elaborate_Body (Id : E) return B is
1505 return Flag150 (Id);
1506 end Has_Pragma_Elaborate_Body;
1508 function Has_Pragma_Inline (Id : E) return B is
1510 return Flag157 (Id);
1511 end Has_Pragma_Inline;
1513 function Has_Pragma_Inline_Always (Id : E) return B is
1515 return Flag230 (Id);
1516 end Has_Pragma_Inline_Always;
1518 function Has_Pragma_No_Inline (Id : E) return B is
1520 return Flag201 (Id);
1521 end Has_Pragma_No_Inline;
1523 function Has_Pragma_Ordered (Id : E) return B is
1525 pragma Assert (Is_Enumeration_Type (Id));
1526 return Flag198 (Implementation_Base_Type (Id));
1527 end Has_Pragma_Ordered;
1529 function Has_Pragma_Pack (Id : E) return B is
1531 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1532 return Flag121 (Implementation_Base_Type (Id));
1533 end Has_Pragma_Pack;
1535 function Has_Pragma_Preelab_Init (Id : E) return B is
1537 return Flag221 (Id);
1538 end Has_Pragma_Preelab_Init;
1540 function Has_Pragma_Pure (Id : E) return B is
1542 return Flag203 (Id);
1543 end Has_Pragma_Pure;
1545 function Has_Pragma_Pure_Function (Id : E) return B is
1547 return Flag179 (Id);
1548 end Has_Pragma_Pure_Function;
1550 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1552 return Flag169 (Id);
1553 end Has_Pragma_Thread_Local_Storage;
1555 function Has_Pragma_Unmodified (Id : E) return B is
1557 return Flag233 (Id);
1558 end Has_Pragma_Unmodified;
1560 function Has_Pragma_Unreferenced (Id : E) return B is
1562 return Flag180 (Id);
1563 end Has_Pragma_Unreferenced;
1565 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1567 pragma Assert (Is_Type (Id));
1568 return Flag212 (Id);
1569 end Has_Pragma_Unreferenced_Objects;
1571 function Has_Predicates (Id : E) return B is
1573 pragma Assert (Is_Type (Id));
1574 return Flag250 (Id);
1577 function Has_Primitive_Operations (Id : E) return B is
1579 pragma Assert (Is_Type (Id));
1580 return Flag120 (Base_Type (Id));
1581 end Has_Primitive_Operations;
1583 function Has_Private_Ancestor (Id : E) return B is
1585 return Flag151 (Id);
1586 end Has_Private_Ancestor;
1588 function Has_Private_Declaration (Id : E) return B is
1590 return Flag155 (Id);
1591 end Has_Private_Declaration;
1593 function Has_Qualified_Name (Id : E) return B is
1595 return Flag161 (Id);
1596 end Has_Qualified_Name;
1598 function Has_RACW (Id : E) return B is
1600 pragma Assert (Ekind (Id) = E_Package);
1601 return Flag214 (Id);
1604 function Has_Record_Rep_Clause (Id : E) return B is
1606 pragma Assert (Is_Record_Type (Id));
1607 return Flag65 (Implementation_Base_Type (Id));
1608 end Has_Record_Rep_Clause;
1610 function Has_Recursive_Call (Id : E) return B is
1612 pragma Assert (Is_Subprogram (Id));
1613 return Flag143 (Id);
1614 end Has_Recursive_Call;
1616 function Has_Size_Clause (Id : E) return B is
1619 end Has_Size_Clause;
1621 function Has_Small_Clause (Id : E) return B is
1624 end Has_Small_Clause;
1626 function Has_Specified_Layout (Id : E) return B is
1628 pragma Assert (Is_Type (Id));
1629 return Flag100 (Implementation_Base_Type (Id));
1630 end Has_Specified_Layout;
1632 function Has_Specified_Stream_Input (Id : E) return B is
1634 pragma Assert (Is_Type (Id));
1635 return Flag190 (Id);
1636 end Has_Specified_Stream_Input;
1638 function Has_Specified_Stream_Output (Id : E) return B is
1640 pragma Assert (Is_Type (Id));
1641 return Flag191 (Id);
1642 end Has_Specified_Stream_Output;
1644 function Has_Specified_Stream_Read (Id : E) return B is
1646 pragma Assert (Is_Type (Id));
1647 return Flag192 (Id);
1648 end Has_Specified_Stream_Read;
1650 function Has_Specified_Stream_Write (Id : E) return B is
1652 pragma Assert (Is_Type (Id));
1653 return Flag193 (Id);
1654 end Has_Specified_Stream_Write;
1656 function Has_Static_Discriminants (Id : E) return B is
1658 pragma Assert (Is_Type (Id));
1659 return Flag211 (Id);
1660 end Has_Static_Discriminants;
1662 function Has_Static_Predicate_Aspect (Id : E) return B is
1664 pragma Assert (Is_Type (Id));
1665 return Flag259 (Id);
1666 end Has_Static_Predicate_Aspect;
1668 function Has_Storage_Size_Clause (Id : E) return B is
1670 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1671 return Flag23 (Implementation_Base_Type (Id));
1672 end Has_Storage_Size_Clause;
1674 function Has_Stream_Size_Clause (Id : E) return B is
1676 return Flag184 (Id);
1677 end Has_Stream_Size_Clause;
1679 function Has_Task (Id : E) return B is
1681 return Flag30 (Base_Type (Id));
1684 function Has_Thunks (Id : E) return B is
1686 return Flag228 (Id);
1689 function Has_Unchecked_Union (Id : E) return B is
1691 return Flag123 (Base_Type (Id));
1692 end Has_Unchecked_Union;
1694 function Has_Unknown_Discriminants (Id : E) return B is
1696 pragma Assert (Is_Type (Id));
1698 end Has_Unknown_Discriminants;
1700 function Has_Up_Level_Access (Id : E) return B is
1703 (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
1704 return Flag215 (Id);
1705 end Has_Up_Level_Access;
1707 function Has_Volatile_Components (Id : E) return B is
1709 return Flag87 (Implementation_Base_Type (Id));
1710 end Has_Volatile_Components;
1712 function Has_Xref_Entry (Id : E) return B is
1714 return Flag182 (Id);
1717 function Hiding_Loop_Variable (Id : E) return E is
1719 pragma Assert (Ekind (Id) = E_Variable);
1721 end Hiding_Loop_Variable;
1723 function Homonym (Id : E) return E is
1728 function Interface_Alias (Id : E) return E is
1730 pragma Assert (Is_Subprogram (Id));
1732 end Interface_Alias;
1734 function Interfaces (Id : E) return L is
1736 pragma Assert (Is_Record_Type (Id));
1737 return Elist25 (Id);
1740 function In_Package_Body (Id : E) return B is
1743 end In_Package_Body;
1745 function In_Private_Part (Id : E) return B is
1748 end In_Private_Part;
1750 function In_Use (Id : E) return B is
1752 pragma Assert (Nkind (Id) in N_Entity);
1756 function Initialization_Statements (Id : E) return N is
1758 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
1760 end Initialization_Statements;
1762 function Inner_Instances (Id : E) return L is
1764 return Elist23 (Id);
1765 end Inner_Instances;
1767 function Interface_Name (Id : E) return N is
1772 function Is_Abstract_Subprogram (Id : E) return B is
1774 pragma Assert (Is_Overloadable (Id));
1776 end Is_Abstract_Subprogram;
1778 function Is_Abstract_Type (Id : E) return B is
1780 pragma Assert (Is_Type (Id));
1781 return Flag146 (Id);
1782 end Is_Abstract_Type;
1784 function Is_Local_Anonymous_Access (Id : E) return B is
1786 pragma Assert (Is_Access_Type (Id));
1787 return Flag194 (Id);
1788 end Is_Local_Anonymous_Access;
1790 function Is_Access_Constant (Id : E) return B is
1792 pragma Assert (Is_Access_Type (Id));
1794 end Is_Access_Constant;
1796 function Is_Ada_2005_Only (Id : E) return B is
1798 return Flag185 (Id);
1799 end Is_Ada_2005_Only;
1801 function Is_Ada_2012_Only (Id : E) return B is
1803 return Flag199 (Id);
1804 end Is_Ada_2012_Only;
1806 function Is_Aliased (Id : E) return B is
1808 pragma Assert (Nkind (Id) in N_Entity);
1812 function Is_AST_Entry (Id : E) return B is
1814 pragma Assert (Is_Entry (Id));
1815 return Flag132 (Id);
1818 function Is_Asynchronous (Id : E) return B is
1820 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1822 end Is_Asynchronous;
1824 function Is_Atomic (Id : E) return B is
1829 function Is_Bit_Packed_Array (Id : E) return B is
1831 return Flag122 (Implementation_Base_Type (Id));
1832 end Is_Bit_Packed_Array;
1834 function Is_Called (Id : E) return B is
1836 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1837 return Flag102 (Id);
1840 function Is_Character_Type (Id : E) return B is
1843 end Is_Character_Type;
1845 function Is_Child_Unit (Id : E) return B is
1850 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1853 end Is_Class_Wide_Equivalent_Type;
1855 function Is_Compilation_Unit (Id : E) return B is
1857 return Flag149 (Id);
1858 end Is_Compilation_Unit;
1860 function Is_Completely_Hidden (Id : E) return B is
1862 pragma Assert (Ekind (Id) = E_Discriminant);
1863 return Flag103 (Id);
1864 end Is_Completely_Hidden;
1866 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1869 end Is_Constr_Subt_For_U_Nominal;
1871 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1873 return Flag141 (Id);
1874 end Is_Constr_Subt_For_UN_Aliased;
1876 function Is_Constrained (Id : E) return B is
1878 pragma Assert (Nkind (Id) in N_Entity);
1882 function Is_Constructor (Id : E) return B is
1887 function Is_Controlled (Id : E) return B is
1889 return Flag42 (Base_Type (Id));
1892 function Is_Controlling_Formal (Id : E) return B is
1894 pragma Assert (Is_Formal (Id));
1896 end Is_Controlling_Formal;
1898 function Is_CPP_Class (Id : E) return B is
1903 function Is_Descendent_Of_Address (Id : E) return B is
1905 pragma Assert (Is_Type (Id));
1906 return Flag223 (Id);
1907 end Is_Descendent_Of_Address;
1909 function Is_Discrim_SO_Function (Id : E) return B is
1911 return Flag176 (Id);
1912 end Is_Discrim_SO_Function;
1914 function Is_Dispatch_Table_Entity (Id : E) return B is
1916 return Flag234 (Id);
1917 end Is_Dispatch_Table_Entity;
1919 function Is_Dispatching_Operation (Id : E) return B is
1921 pragma Assert (Nkind (Id) in N_Entity);
1923 end Is_Dispatching_Operation;
1925 function Is_Eliminated (Id : E) return B is
1927 return Flag124 (Id);
1930 function Is_Entry_Formal (Id : E) return B is
1933 end Is_Entry_Formal;
1935 function Is_Exported (Id : E) return B is
1940 function Is_First_Subtype (Id : E) return B is
1943 end Is_First_Subtype;
1945 function Is_For_Access_Subtype (Id : E) return B is
1947 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
1948 return Flag118 (Id);
1949 end Is_For_Access_Subtype;
1951 function Is_Formal_Subprogram (Id : E) return B is
1953 return Flag111 (Id);
1954 end Is_Formal_Subprogram;
1956 function Is_Frozen (Id : E) return B is
1961 function Is_Generic_Actual_Type (Id : E) return B is
1963 pragma Assert (Is_Type (Id));
1965 end Is_Generic_Actual_Type;
1967 function Is_Generic_Instance (Id : E) return B is
1969 return Flag130 (Id);
1970 end Is_Generic_Instance;
1972 function Is_Generic_Type (Id : E) return B is
1974 pragma Assert (Nkind (Id) in N_Entity);
1976 end Is_Generic_Type;
1978 function Is_Hidden (Id : E) return B is
1983 function Is_Hidden_Open_Scope (Id : E) return B is
1985 return Flag171 (Id);
1986 end Is_Hidden_Open_Scope;
1988 function Is_Immediately_Visible (Id : E) return B is
1990 pragma Assert (Nkind (Id) in N_Entity);
1992 end Is_Immediately_Visible;
1994 function Is_Implementation_Defined (Id : E) return B is
1996 return Flag254 (Id);
1997 end Is_Implementation_Defined;
1999 function Is_Imported (Id : E) return B is
2004 function Is_Inlined (Id : E) return B is
2009 function Is_Interface (Id : E) return B is
2011 return Flag186 (Id);
2014 function Is_Instantiated (Id : E) return B is
2016 return Flag126 (Id);
2017 end Is_Instantiated;
2019 function Is_Internal (Id : E) return B is
2021 pragma Assert (Nkind (Id) in N_Entity);
2025 function Is_Interrupt_Handler (Id : E) return B is
2027 pragma Assert (Nkind (Id) in N_Entity);
2029 end Is_Interrupt_Handler;
2031 function Is_Intrinsic_Subprogram (Id : E) return B is
2034 end Is_Intrinsic_Subprogram;
2036 function Is_Invariant_Procedure (Id : E) return B is
2038 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2039 return Flag257 (Id);
2040 end Is_Invariant_Procedure;
2042 function Is_Itype (Id : E) return B is
2047 function Is_Known_Non_Null (Id : E) return B is
2050 end Is_Known_Non_Null;
2052 function Is_Known_Null (Id : E) return B is
2054 return Flag204 (Id);
2057 function Is_Known_Valid (Id : E) return B is
2059 return Flag170 (Id);
2062 function Is_Limited_Composite (Id : E) return B is
2064 return Flag106 (Id);
2065 end Is_Limited_Composite;
2067 function Is_Limited_Interface (Id : E) return B is
2069 return Flag197 (Id);
2070 end Is_Limited_Interface;
2072 function Is_Limited_Record (Id : E) return B is
2075 end Is_Limited_Record;
2077 function Is_Machine_Code_Subprogram (Id : E) return B is
2079 pragma Assert (Is_Subprogram (Id));
2080 return Flag137 (Id);
2081 end Is_Machine_Code_Subprogram;
2083 function Is_Non_Static_Subtype (Id : E) return B is
2085 pragma Assert (Is_Type (Id));
2086 return Flag109 (Id);
2087 end Is_Non_Static_Subtype;
2089 function Is_Null_Init_Proc (Id : E) return B is
2091 pragma Assert (Ekind (Id) = E_Procedure);
2092 return Flag178 (Id);
2093 end Is_Null_Init_Proc;
2095 function Is_Obsolescent (Id : E) return B is
2097 return Flag153 (Id);
2100 function Is_Only_Out_Parameter (Id : E) return B is
2102 pragma Assert (Is_Formal (Id));
2103 return Flag226 (Id);
2104 end Is_Only_Out_Parameter;
2106 function Is_Optional_Parameter (Id : E) return B is
2108 pragma Assert (Is_Formal (Id));
2109 return Flag134 (Id);
2110 end Is_Optional_Parameter;
2112 function Is_Package_Body_Entity (Id : E) return B is
2114 return Flag160 (Id);
2115 end Is_Package_Body_Entity;
2117 function Is_Packed (Id : E) return B is
2119 return Flag51 (Implementation_Base_Type (Id));
2122 function Is_Packed_Array_Type (Id : E) return B is
2124 return Flag138 (Id);
2125 end Is_Packed_Array_Type;
2127 function Is_Potentially_Use_Visible (Id : E) return B is
2129 pragma Assert (Nkind (Id) in N_Entity);
2131 end Is_Potentially_Use_Visible;
2133 function Is_Predicate_Function (Id : E) return B is
2135 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2136 return Flag255 (Id);
2137 end Is_Predicate_Function;
2139 function Is_Predicate_Function_M (Id : E) return B is
2141 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2142 return Flag256 (Id);
2143 end Is_Predicate_Function_M;
2145 function Is_Preelaborated (Id : E) return B is
2148 end Is_Preelaborated;
2150 function Is_Primitive (Id : E) return B is
2153 (Is_Overloadable (Id)
2154 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
2155 return Flag218 (Id);
2158 function Is_Primitive_Wrapper (Id : E) return B is
2160 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2161 return Flag195 (Id);
2162 end Is_Primitive_Wrapper;
2164 function Is_Private_Composite (Id : E) return B is
2166 pragma Assert (Is_Type (Id));
2167 return Flag107 (Id);
2168 end Is_Private_Composite;
2170 function Is_Private_Descendant (Id : E) return B is
2173 end Is_Private_Descendant;
2175 function Is_Private_Primitive (Id : E) return B is
2177 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2178 return Flag245 (Id);
2179 end Is_Private_Primitive;
2181 function Is_Processed_Transient (Id : E) return B is
2183 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2184 return Flag252 (Id);
2185 end Is_Processed_Transient;
2187 function Is_Public (Id : E) return B is
2189 pragma Assert (Nkind (Id) in N_Entity);
2193 function Is_Pure (Id : E) return B is
2198 function Is_Pure_Unit_Access_Type (Id : E) return B is
2200 pragma Assert (Is_Access_Type (Id));
2201 return Flag189 (Id);
2202 end Is_Pure_Unit_Access_Type;
2204 function Is_RACW_Stub_Type (Id : E) return B is
2206 pragma Assert (Is_Type (Id));
2207 return Flag244 (Id);
2208 end Is_RACW_Stub_Type;
2210 function Is_Raised (Id : E) return B is
2212 pragma Assert (Ekind (Id) = E_Exception);
2213 return Flag224 (Id);
2216 function Is_Remote_Call_Interface (Id : E) return B is
2219 end Is_Remote_Call_Interface;
2221 function Is_Remote_Types (Id : E) return B is
2224 end Is_Remote_Types;
2226 function Is_Renaming_Of_Object (Id : E) return B is
2228 return Flag112 (Id);
2229 end Is_Renaming_Of_Object;
2231 function Is_Return_Object (Id : E) return B is
2233 return Flag209 (Id);
2234 end Is_Return_Object;
2236 function Is_Safe_To_Reevaluate (Id : E) return B is
2238 return Flag249 (Id);
2239 end Is_Safe_To_Reevaluate;
2241 function Is_Shared_Passive (Id : E) return B is
2244 end Is_Shared_Passive;
2246 function Is_Statically_Allocated (Id : E) return B is
2249 end Is_Statically_Allocated;
2251 function Is_Tag (Id : E) return B is
2253 pragma Assert (Nkind (Id) in N_Entity);
2257 function Is_Tagged_Type (Id : E) return B is
2262 function Is_Thunk (Id : E) return B is
2264 return Flag225 (Id);
2267 function Is_Trivial_Subprogram (Id : E) return B is
2269 return Flag235 (Id);
2270 end Is_Trivial_Subprogram;
2272 function Is_True_Constant (Id : E) return B is
2274 return Flag163 (Id);
2275 end Is_True_Constant;
2277 function Is_Unchecked_Union (Id : E) return B is
2279 return Flag117 (Implementation_Base_Type (Id));
2280 end Is_Unchecked_Union;
2282 function Is_Underlying_Record_View (Id : E) return B is
2284 return Flag246 (Id);
2285 end Is_Underlying_Record_View;
2287 function Is_Unsigned_Type (Id : E) return B is
2289 pragma Assert (Is_Type (Id));
2290 return Flag144 (Id);
2291 end Is_Unsigned_Type;
2293 function Is_Valued_Procedure (Id : E) return B is
2295 pragma Assert (Ekind (Id) = E_Procedure);
2296 return Flag127 (Id);
2297 end Is_Valued_Procedure;
2299 function Is_Visible_Formal (Id : E) return B is
2301 return Flag206 (Id);
2302 end Is_Visible_Formal;
2304 function Is_Visible_Lib_Unit (Id : E) return B is
2306 return Flag116 (Id);
2307 end Is_Visible_Lib_Unit;
2309 function Is_VMS_Exception (Id : E) return B is
2311 return Flag133 (Id);
2312 end Is_VMS_Exception;
2314 function Is_Volatile (Id : E) return B is
2316 pragma Assert (Nkind (Id) in N_Entity);
2318 if Is_Type (Id) then
2319 return Flag16 (Base_Type (Id));
2325 function Itype_Printed (Id : E) return B is
2327 pragma Assert (Is_Itype (Id));
2328 return Flag202 (Id);
2331 function Kill_Elaboration_Checks (Id : E) return B is
2334 end Kill_Elaboration_Checks;
2336 function Kill_Range_Checks (Id : E) return B is
2339 end Kill_Range_Checks;
2341 function Known_To_Have_Preelab_Init (Id : E) return B is
2343 pragma Assert (Is_Type (Id));
2344 return Flag207 (Id);
2345 end Known_To_Have_Preelab_Init;
2347 function Last_Assignment (Id : E) return N is
2349 pragma Assert (Is_Assignable (Id));
2351 end Last_Assignment;
2353 function Last_Entity (Id : E) return E is
2358 function Limited_View (Id : E) return E is
2360 pragma Assert (Ekind (Id) = E_Package);
2364 function Lit_Indexes (Id : E) return E is
2366 pragma Assert (Is_Enumeration_Type (Id));
2370 function Lit_Strings (Id : E) return E is
2372 pragma Assert (Is_Enumeration_Type (Id));
2376 function Low_Bound_Tested (Id : E) return B is
2378 return Flag205 (Id);
2379 end Low_Bound_Tested;
2381 function Machine_Radix_10 (Id : E) return B is
2383 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2385 end Machine_Radix_10;
2387 function Master_Id (Id : E) return E is
2389 pragma Assert (Is_Access_Type (Id));
2393 function Materialize_Entity (Id : E) return B is
2395 return Flag168 (Id);
2396 end Materialize_Entity;
2398 function May_Inherit_Delayed_Rep_Aspects (Id : E) return B is
2400 return Flag262 (Id);
2401 end May_Inherit_Delayed_Rep_Aspects;
2403 function Mechanism (Id : E) return M is
2405 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2406 return UI_To_Int (Uint8 (Id));
2409 function Modulus (Id : E) return Uint is
2411 pragma Assert (Is_Modular_Integer_Type (Id));
2412 return Uint17 (Base_Type (Id));
2415 function Must_Be_On_Byte_Boundary (Id : E) return B is
2417 pragma Assert (Is_Type (Id));
2418 return Flag183 (Id);
2419 end Must_Be_On_Byte_Boundary;
2421 function Must_Have_Preelab_Init (Id : E) return B is
2423 pragma Assert (Is_Type (Id));
2424 return Flag208 (Id);
2425 end Must_Have_Preelab_Init;
2427 function Needs_Debug_Info (Id : E) return B is
2429 return Flag147 (Id);
2430 end Needs_Debug_Info;
2432 function Needs_No_Actuals (Id : E) return B is
2435 (Is_Overloadable (Id)
2436 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2438 end Needs_No_Actuals;
2440 function Never_Set_In_Source (Id : E) return B is
2442 return Flag115 (Id);
2443 end Never_Set_In_Source;
2445 function Next_Inlined_Subprogram (Id : E) return E is
2448 end Next_Inlined_Subprogram;
2450 function No_Pool_Assigned (Id : E) return B is
2452 pragma Assert (Is_Access_Type (Id));
2453 return Flag131 (Root_Type (Id));
2454 end No_Pool_Assigned;
2456 function No_Return (Id : E) return B is
2458 return Flag113 (Id);
2461 function No_Strict_Aliasing (Id : E) return B is
2463 pragma Assert (Is_Access_Type (Id));
2464 return Flag136 (Base_Type (Id));
2465 end No_Strict_Aliasing;
2467 function Non_Binary_Modulus (Id : E) return B is
2469 pragma Assert (Is_Type (Id));
2470 return Flag58 (Base_Type (Id));
2471 end Non_Binary_Modulus;
2473 function Non_Limited_View (Id : E) return E is
2475 pragma Assert (Ekind (Id) in Incomplete_Kind);
2477 end Non_Limited_View;
2479 function Nonzero_Is_True (Id : E) return B is
2481 pragma Assert (Root_Type (Id) = Standard_Boolean);
2482 return Flag162 (Base_Type (Id));
2483 end Nonzero_Is_True;
2485 function Normalized_First_Bit (Id : E) return U is
2487 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2489 end Normalized_First_Bit;
2491 function Normalized_Position (Id : E) return U is
2493 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2495 end Normalized_Position;
2497 function Normalized_Position_Max (Id : E) return U is
2499 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2501 end Normalized_Position_Max;
2503 function OK_To_Rename (Id : E) return B is
2505 pragma Assert (Ekind (Id) = E_Variable);
2506 return Flag247 (Id);
2509 function OK_To_Reorder_Components (Id : E) return B is
2511 pragma Assert (Is_Record_Type (Id));
2512 return Flag239 (Base_Type (Id));
2513 end OK_To_Reorder_Components;
2515 function Optimize_Alignment_Space (Id : E) return B is
2518 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2519 return Flag241 (Id);
2520 end Optimize_Alignment_Space;
2522 function Optimize_Alignment_Time (Id : E) return B is
2525 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2526 return Flag242 (Id);
2527 end Optimize_Alignment_Time;
2529 function Original_Access_Type (Id : E) return E is
2531 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2533 end Original_Access_Type;
2535 function Original_Array_Type (Id : E) return E is
2537 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2539 end Original_Array_Type;
2541 function Original_Record_Component (Id : E) return E is
2543 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2545 end Original_Record_Component;
2547 function Overlays_Constant (Id : E) return B is
2549 return Flag243 (Id);
2550 end Overlays_Constant;
2552 function Overridden_Operation (Id : E) return E is
2555 end Overridden_Operation;
2557 function Package_Instantiation (Id : E) return N is
2559 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2561 end Package_Instantiation;
2563 function Packed_Array_Type (Id : E) return E is
2565 pragma Assert (Is_Array_Type (Id));
2567 end Packed_Array_Type;
2569 function Parent_Subtype (Id : E) return E is
2571 pragma Assert (Is_Record_Type (Id));
2572 return Node19 (Base_Type (Id));
2575 function Postcondition_Proc (Id : E) return E is
2577 pragma Assert (Ekind (Id) = E_Procedure);
2579 end Postcondition_Proc;
2581 function PPC_Wrapper (Id : E) return E is
2583 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2587 function Prival (Id : E) return E is
2589 pragma Assert (Is_Protected_Component (Id));
2593 function Prival_Link (Id : E) return E is
2595 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2599 function Private_Dependents (Id : E) return L is
2601 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2602 return Elist18 (Id);
2603 end Private_Dependents;
2605 function Private_View (Id : E) return N is
2607 pragma Assert (Is_Private_Type (Id));
2611 function Protected_Body_Subprogram (Id : E) return E is
2613 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2615 end Protected_Body_Subprogram;
2617 function Protected_Formal (Id : E) return E is
2619 pragma Assert (Is_Formal (Id));
2621 end Protected_Formal;
2623 function Protection_Object (Id : E) return E is
2626 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2628 end Protection_Object;
2630 function Reachable (Id : E) return B is
2635 function Referenced (Id : E) return B is
2637 return Flag156 (Id);
2640 function Referenced_As_LHS (Id : E) return B is
2643 end Referenced_As_LHS;
2645 function Referenced_As_Out_Parameter (Id : E) return B is
2647 return Flag227 (Id);
2648 end Referenced_As_Out_Parameter;
2650 function Refined_State (Id : E) return E is
2652 pragma Assert (Ekind (Id) = E_Abstract_State);
2656 function Register_Exception_Call (Id : E) return N is
2658 pragma Assert (Ekind (Id) = E_Exception);
2660 end Register_Exception_Call;
2662 function Related_Array_Object (Id : E) return E is
2664 pragma Assert (Is_Array_Type (Id));
2666 end Related_Array_Object;
2668 function Related_Expression (Id : E) return N is
2670 pragma Assert (Ekind (Id) in Type_Kind
2671 or else Ekind_In (Id, E_Constant, E_Variable));
2673 end Related_Expression;
2675 function Related_Instance (Id : E) return E is
2677 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2679 end Related_Instance;
2681 function Related_Type (Id : E) return E is
2683 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2687 function Relative_Deadline_Variable (Id : E) return E is
2689 pragma Assert (Is_Task_Type (Id));
2690 return Node26 (Implementation_Base_Type (Id));
2691 end Relative_Deadline_Variable;
2693 function Renamed_Entity (Id : E) return N is
2698 function Renamed_In_Spec (Id : E) return B is
2700 pragma Assert (Ekind (Id) = E_Package);
2701 return Flag231 (Id);
2702 end Renamed_In_Spec;
2704 function Renamed_Object (Id : E) return N is
2709 function Renaming_Map (Id : E) return U is
2714 function Requires_Overriding (Id : E) return B is
2716 pragma Assert (Is_Overloadable (Id));
2717 return Flag213 (Id);
2718 end Requires_Overriding;
2720 function Return_Present (Id : E) return B is
2725 function Return_Applies_To (Id : E) return N is
2728 end Return_Applies_To;
2730 function Returns_By_Ref (Id : E) return B is
2735 function Reverse_Bit_Order (Id : E) return B is
2737 pragma Assert (Is_Record_Type (Id));
2738 return Flag164 (Base_Type (Id));
2739 end Reverse_Bit_Order;
2741 function Reverse_Storage_Order (Id : E) return B is
2743 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
2744 return Flag93 (Base_Type (Id));
2745 end Reverse_Storage_Order;
2747 function RM_Size (Id : E) return U is
2749 pragma Assert (Is_Type (Id));
2753 function Scalar_Range (Id : E) return N is
2758 function Scale_Value (Id : E) return U is
2763 function Scope_Depth_Value (Id : E) return U is
2766 end Scope_Depth_Value;
2768 function Sec_Stack_Needed_For_Return (Id : E) return B is
2770 return Flag167 (Id);
2771 end Sec_Stack_Needed_For_Return;
2773 function Shadow_Entities (Id : E) return S is
2775 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2777 end Shadow_Entities;
2779 function Shared_Var_Procs_Instance (Id : E) return E is
2781 pragma Assert (Ekind (Id) = E_Variable);
2783 end Shared_Var_Procs_Instance;
2785 function Size_Check_Code (Id : E) return N is
2787 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2789 end Size_Check_Code;
2791 function Size_Depends_On_Discriminant (Id : E) return B is
2793 return Flag177 (Id);
2794 end Size_Depends_On_Discriminant;
2796 function Size_Known_At_Compile_Time (Id : E) return B is
2799 end Size_Known_At_Compile_Time;
2801 function Small_Value (Id : E) return R is
2803 pragma Assert (Is_Fixed_Point_Type (Id));
2804 return Ureal21 (Id);
2807 function SPARK_Mode_Pragmas (Id : E) return N is
2810 (Ekind_In (Id, E_Function, -- subprogram variants
2812 E_Generic_Procedure,
2816 Ekind_In (Id, E_Generic_Package, -- package variants
2820 end SPARK_Mode_Pragmas;
2822 function Spec_Entity (Id : E) return E is
2824 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2828 function Static_Predicate (Id : E) return S is
2830 pragma Assert (Is_Discrete_Type (Id));
2832 end Static_Predicate;
2834 function Status_Flag_Or_Transient_Decl (Id : E) return N is
2836 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2838 end Status_Flag_Or_Transient_Decl;
2840 function Storage_Size_Variable (Id : E) return E is
2842 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2843 return Node15 (Implementation_Base_Type (Id));
2844 end Storage_Size_Variable;
2846 function Static_Elaboration_Desired (Id : E) return B is
2848 pragma Assert (Ekind (Id) = E_Package);
2850 end Static_Elaboration_Desired;
2852 function Static_Initialization (Id : E) return N is
2855 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
2857 end Static_Initialization;
2859 function Stored_Constraint (Id : E) return L is
2862 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
2863 return Elist23 (Id);
2864 end Stored_Constraint;
2866 function Strict_Alignment (Id : E) return B is
2868 return Flag145 (Implementation_Base_Type (Id));
2869 end Strict_Alignment;
2871 function String_Literal_Length (Id : E) return U is
2874 end String_Literal_Length;
2876 function String_Literal_Low_Bound (Id : E) return N is
2879 end String_Literal_Low_Bound;
2881 function Subprograms_For_Type (Id : E) return E is
2883 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
2885 end Subprograms_For_Type;
2887 function Suppress_Elaboration_Warnings (Id : E) return B is
2889 return Flag148 (Id);
2890 end Suppress_Elaboration_Warnings;
2892 function Suppress_Initialization (Id : E) return B is
2894 pragma Assert (Is_Type (Id));
2895 return Flag105 (Id);
2896 end Suppress_Initialization;
2898 function Suppress_Style_Checks (Id : E) return B is
2900 return Flag165 (Id);
2901 end Suppress_Style_Checks;
2903 function Suppress_Value_Tracking_On_Call (Id : E) return B is
2905 return Flag217 (Id);
2906 end Suppress_Value_Tracking_On_Call;
2908 function Task_Body_Procedure (Id : E) return N is
2910 pragma Assert (Ekind (Id) in Task_Kind);
2912 end Task_Body_Procedure;
2914 function Thunk_Entity (Id : E) return E is
2916 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
2917 and then Is_Thunk (Id));
2921 function Treat_As_Volatile (Id : E) return B is
2924 end Treat_As_Volatile;
2926 function Underlying_Full_View (Id : E) return E is
2928 pragma Assert (Ekind (Id) in Private_Kind);
2930 end Underlying_Full_View;
2932 function Underlying_Record_View (Id : E) return E is
2935 end Underlying_Record_View;
2937 function Universal_Aliasing (Id : E) return B is
2939 pragma Assert (Is_Type (Id));
2940 return Flag216 (Implementation_Base_Type (Id));
2941 end Universal_Aliasing;
2943 function Unset_Reference (Id : E) return N is
2946 end Unset_Reference;
2948 function Used_As_Generic_Actual (Id : E) return B is
2950 return Flag222 (Id);
2951 end Used_As_Generic_Actual;
2953 function Uses_Lock_Free (Id : E) return B is
2955 pragma Assert (Is_Protected_Type (Id));
2956 return Flag188 (Id);
2959 function Uses_Sec_Stack (Id : E) return B is
2964 function Warnings_Off (Id : E) return B is
2969 function Warnings_Off_Used (Id : E) return B is
2971 return Flag236 (Id);
2972 end Warnings_Off_Used;
2974 function Warnings_Off_Used_Unmodified (Id : E) return B is
2976 return Flag237 (Id);
2977 end Warnings_Off_Used_Unmodified;
2979 function Warnings_Off_Used_Unreferenced (Id : E) return B is
2981 return Flag238 (Id);
2982 end Warnings_Off_Used_Unreferenced;
2984 function Wrapped_Entity (Id : E) return E is
2986 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
2987 and then Is_Primitive_Wrapper (Id));
2991 function Was_Hidden (Id : E) return B is
2993 return Flag196 (Id);
2996 ------------------------------
2997 -- Classification Functions --
2998 ------------------------------
3000 function Is_Access_Type (Id : E) return B is
3002 return Ekind (Id) in Access_Kind;
3005 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
3007 return Ekind (Id) in Access_Protected_Kind;
3008 end Is_Access_Protected_Subprogram_Type;
3010 function Is_Access_Subprogram_Type (Id : E) return B is
3012 return Ekind (Id) in Access_Subprogram_Kind;
3013 end Is_Access_Subprogram_Type;
3015 function Is_Aggregate_Type (Id : E) return B is
3017 return Ekind (Id) in Aggregate_Kind;
3018 end Is_Aggregate_Type;
3020 function Is_Array_Type (Id : E) return B is
3022 return Ekind (Id) in Array_Kind;
3025 function Is_Assignable (Id : E) return B is
3027 return Ekind (Id) in Assignable_Kind;
3030 function Is_Class_Wide_Type (Id : E) return B is
3032 return Ekind (Id) in Class_Wide_Kind;
3033 end Is_Class_Wide_Type;
3035 function Is_Composite_Type (Id : E) return B is
3037 return Ekind (Id) in Composite_Kind;
3038 end Is_Composite_Type;
3040 function Is_Concurrent_Body (Id : E) return B is
3042 return Ekind (Id) in
3043 Concurrent_Body_Kind;
3044 end Is_Concurrent_Body;
3046 function Is_Concurrent_Record_Type (Id : E) return B is
3049 end Is_Concurrent_Record_Type;
3051 function Is_Concurrent_Type (Id : E) return B is
3053 return Ekind (Id) in Concurrent_Kind;
3054 end Is_Concurrent_Type;
3056 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
3058 return Ekind (Id) in
3059 Decimal_Fixed_Point_Kind;
3060 end Is_Decimal_Fixed_Point_Type;
3062 function Is_Digits_Type (Id : E) return B is
3064 return Ekind (Id) in Digits_Kind;
3067 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
3069 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
3070 end Is_Discrete_Or_Fixed_Point_Type;
3072 function Is_Discrete_Type (Id : E) return B is
3074 return Ekind (Id) in Discrete_Kind;
3075 end Is_Discrete_Type;
3077 function Is_Elementary_Type (Id : E) return B is
3079 return Ekind (Id) in Elementary_Kind;
3080 end Is_Elementary_Type;
3082 function Is_Entry (Id : E) return B is
3084 return Ekind (Id) in Entry_Kind;
3087 function Is_Enumeration_Type (Id : E) return B is
3089 return Ekind (Id) in
3091 end Is_Enumeration_Type;
3093 function Is_Fixed_Point_Type (Id : E) return B is
3095 return Ekind (Id) in
3097 end Is_Fixed_Point_Type;
3099 function Is_Floating_Point_Type (Id : E) return B is
3101 return Ekind (Id) in Float_Kind;
3102 end Is_Floating_Point_Type;
3104 function Is_Formal (Id : E) return B is
3106 return Ekind (Id) in Formal_Kind;
3109 function Is_Formal_Object (Id : E) return B is
3111 return Ekind (Id) in Formal_Object_Kind;
3112 end Is_Formal_Object;
3114 function Is_Generic_Subprogram (Id : E) return B is
3116 return Ekind (Id) in Generic_Subprogram_Kind;
3117 end Is_Generic_Subprogram;
3119 function Is_Generic_Unit (Id : E) return B is
3121 return Ekind (Id) in Generic_Unit_Kind;
3122 end Is_Generic_Unit;
3124 function Is_Incomplete_Or_Private_Type (Id : E) return B is
3126 return Ekind (Id) in
3127 Incomplete_Or_Private_Kind;
3128 end Is_Incomplete_Or_Private_Type;
3130 function Is_Incomplete_Type (Id : E) return B is
3132 return Ekind (Id) in
3134 end Is_Incomplete_Type;
3136 function Is_Integer_Type (Id : E) return B is
3138 return Ekind (Id) in Integer_Kind;
3139 end Is_Integer_Type;
3141 function Is_Modular_Integer_Type (Id : E) return B is
3143 return Ekind (Id) in
3144 Modular_Integer_Kind;
3145 end Is_Modular_Integer_Type;
3147 function Is_Named_Number (Id : E) return B is
3149 return Ekind (Id) in Named_Kind;
3150 end Is_Named_Number;
3152 function Is_Numeric_Type (Id : E) return B is
3154 return Ekind (Id) in Numeric_Kind;
3155 end Is_Numeric_Type;
3157 function Is_Object (Id : E) return B is
3159 return Ekind (Id) in Object_Kind;
3162 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
3164 return Ekind (Id) in
3165 Ordinary_Fixed_Point_Kind;
3166 end Is_Ordinary_Fixed_Point_Type;
3168 function Is_Overloadable (Id : E) return B is
3170 return Ekind (Id) in Overloadable_Kind;
3171 end Is_Overloadable;
3173 function Is_Private_Type (Id : E) return B is
3175 return Ekind (Id) in Private_Kind;
3176 end Is_Private_Type;
3178 function Is_Protected_Type (Id : E) return B is
3180 return Ekind (Id) in Protected_Kind;
3181 end Is_Protected_Type;
3183 function Is_Real_Type (Id : E) return B is
3185 return Ekind (Id) in Real_Kind;
3188 function Is_Record_Type (Id : E) return B is
3190 return Ekind (Id) in Record_Kind;
3193 function Is_Scalar_Type (Id : E) return B is
3195 return Ekind (Id) in Scalar_Kind;
3198 function Is_Signed_Integer_Type (Id : E) return B is
3200 return Ekind (Id) in Signed_Integer_Kind;
3201 end Is_Signed_Integer_Type;
3203 function Is_Subprogram (Id : E) return B is
3205 return Ekind (Id) in Subprogram_Kind;
3208 function Is_Task_Type (Id : E) return B is
3210 return Ekind (Id) in Task_Kind;
3213 function Is_Type (Id : E) return B is
3215 return Ekind (Id) in Type_Kind;
3218 ------------------------------
3219 -- Attribute Set Procedures --
3220 ------------------------------
3222 -- Note: in many of these set procedures an "obvious" assertion is missing.
3223 -- The reason for this is that in many cases, a field is set before the
3224 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3225 -- it is possible to add assertions that specifically include the E_Void
3226 -- possibility, but in some cases, we just omit the assertions.
3228 procedure Set_Abstract_States (Id : E; V : L) is
3230 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
3231 Set_Elist25 (Id, V);
3232 end Set_Abstract_States;
3234 procedure Set_Accept_Address (Id : E; V : L) is
3236 Set_Elist21 (Id, V);
3237 end Set_Accept_Address;
3239 procedure Set_Access_Disp_Table (Id : E; V : L) is
3241 pragma Assert (Ekind (Id) = E_Record_Type
3242 and then Id = Implementation_Base_Type (Id));
3243 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3244 Set_Elist16 (Id, V);
3245 end Set_Access_Disp_Table;
3247 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3250 end Set_Associated_Formal_Package;
3252 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3255 end Set_Associated_Node_For_Itype;
3257 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3259 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3261 end Set_Associated_Storage_Pool;
3263 procedure Set_Actual_Subtype (Id : E; V : E) is
3266 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3267 or else Is_Formal (Id));
3269 end Set_Actual_Subtype;
3271 procedure Set_Address_Taken (Id : E; V : B := True) is
3273 Set_Flag104 (Id, V);
3274 end Set_Address_Taken;
3276 procedure Set_Alias (Id : E; V : E) is
3279 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3283 procedure Set_Alignment (Id : E; V : U) is
3285 pragma Assert (Is_Type (Id)
3286 or else Is_Formal (Id)
3287 or else Ekind_In (Id, E_Loop_Parameter,
3294 procedure Set_Barrier_Function (Id : E; V : N) is
3296 pragma Assert (Is_Entry (Id));
3298 end Set_Barrier_Function;
3300 procedure Set_Block_Node (Id : E; V : N) is
3302 pragma Assert (Ekind (Id) = E_Block);
3306 procedure Set_Body_Entity (Id : E; V : E) is
3308 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3310 end Set_Body_Entity;
3312 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3315 (Ekind (Id) = E_Package
3316 or else Is_Subprogram (Id)
3317 or else Is_Generic_Unit (Id));
3319 end Set_Body_Needed_For_SAL;
3321 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3323 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3324 Set_Flag125 (Id, V);
3325 end Set_C_Pass_By_Copy;
3327 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3330 end Set_Can_Never_Be_Null;
3332 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3335 end Set_Checks_May_Be_Suppressed;
3337 procedure Set_Class_Wide_Type (Id : E; V : E) is
3339 pragma Assert (Is_Type (Id));
3341 end Set_Class_Wide_Type;
3343 procedure Set_Cloned_Subtype (Id : E; V : E) is
3345 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3347 end Set_Cloned_Subtype;
3349 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3351 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3353 end Set_Component_Bit_Offset;
3355 procedure Set_Component_Clause (Id : E; V : N) is
3357 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3359 end Set_Component_Clause;
3361 procedure Set_Component_Size (Id : E; V : U) is
3363 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3365 end Set_Component_Size;
3367 procedure Set_Component_Type (Id : E; V : E) is
3369 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3371 end Set_Component_Type;
3373 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3376 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3378 end Set_Corresponding_Concurrent_Type;
3380 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3382 pragma Assert (Ekind (Id) = E_Discriminant);
3384 end Set_Corresponding_Discriminant;
3386 procedure Set_Corresponding_Equality (Id : E; V : E) is
3389 (Ekind (Id) = E_Function
3390 and then not Comes_From_Source (Id)
3391 and then Chars (Id) = Name_Op_Ne);
3393 end Set_Corresponding_Equality;
3395 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3397 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3399 end Set_Corresponding_Protected_Entry;
3401 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3403 pragma Assert (Is_Concurrent_Type (Id));
3405 end Set_Corresponding_Record_Type;
3407 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3410 end Set_Corresponding_Remote_Type;
3412 procedure Set_Current_Use_Clause (Id : E; V : E) is
3414 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3416 end Set_Current_Use_Clause;
3418 procedure Set_Current_Value (Id : E; V : N) is
3420 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3422 end Set_Current_Value;
3424 procedure Set_CR_Discriminant (Id : E; V : E) is
3427 end Set_CR_Discriminant;
3429 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3431 Set_Flag166 (Id, V);
3432 end Set_Debug_Info_Off;
3434 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3437 end Set_Debug_Renaming_Link;
3439 procedure Set_Default_Aspect_Component_Value (Id : E; V : E) is
3441 pragma Assert (Is_Array_Type (Id));
3443 end Set_Default_Aspect_Component_Value;
3445 procedure Set_Default_Aspect_Value (Id : E; V : E) is
3447 pragma Assert (Is_Scalar_Type (Id));
3449 end Set_Default_Aspect_Value;
3451 procedure Set_Default_Expr_Function (Id : E; V : E) is
3453 pragma Assert (Is_Formal (Id));
3455 end Set_Default_Expr_Function;
3457 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3459 Set_Flag108 (Id, V);
3460 end Set_Default_Expressions_Processed;
3462 procedure Set_Default_Value (Id : E; V : N) is
3464 pragma Assert (Is_Formal (Id));
3466 end Set_Default_Value;
3468 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3472 or else Is_Task_Type (Id)
3473 or else Ekind (Id) = E_Block);
3474 Set_Flag114 (Id, V);
3475 end Set_Delay_Cleanups;
3477 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3480 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3483 end Set_Delay_Subprogram_Descriptors;
3485 procedure Set_Delta_Value (Id : E; V : R) is
3487 pragma Assert (Is_Fixed_Point_Type (Id));
3488 Set_Ureal18 (Id, V);
3489 end Set_Delta_Value;
3491 procedure Set_Dependent_Instances (Id : E; V : L) is
3493 pragma Assert (Is_Generic_Instance (Id));
3495 end Set_Dependent_Instances;
3497 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3499 pragma Assert (Nkind (Id) in N_Entity);
3501 end Set_Depends_On_Private;
3503 procedure Set_Digits_Value (Id : E; V : U) is
3506 (Is_Floating_Point_Type (Id)
3507 or else Is_Decimal_Fixed_Point_Type (Id));
3509 end Set_Digits_Value;
3511 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3514 end Set_Directly_Designated_Type;
3516 procedure Set_Discard_Names (Id : E; V : B := True) is
3519 end Set_Discard_Names;
3521 procedure Set_Discriminal (Id : E; V : E) is
3523 pragma Assert (Ekind (Id) = E_Discriminant);
3525 end Set_Discriminal;
3527 procedure Set_Discriminal_Link (Id : E; V : E) is
3530 end Set_Discriminal_Link;
3532 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3534 pragma Assert (Ekind (Id) = E_Component);
3536 end Set_Discriminant_Checking_Func;
3538 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3540 pragma Assert (Nkind (Id) in N_Entity);
3541 Set_Elist21 (Id, V);
3542 end Set_Discriminant_Constraint;
3544 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3547 end Set_Discriminant_Default_Value;
3549 procedure Set_Discriminant_Number (Id : E; V : U) is
3552 end Set_Discriminant_Number;
3554 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3556 pragma Assert (Ekind (Id) = E_Record_Type
3557 and then Id = Implementation_Base_Type (Id));
3558 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3559 Set_Elist26 (Id, V);
3560 end Set_Dispatch_Table_Wrappers;
3562 procedure Set_DT_Entry_Count (Id : E; V : U) is
3564 pragma Assert (Ekind (Id) = E_Component);
3566 end Set_DT_Entry_Count;
3568 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3570 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3572 end Set_DT_Offset_To_Top_Func;
3574 procedure Set_DT_Position (Id : E; V : U) is
3576 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3578 end Set_DT_Position;
3580 procedure Set_DTC_Entity (Id : E; V : E) is
3582 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3586 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3588 pragma Assert (Ekind (Id) = E_Package);
3589 Set_Flag210 (Id, V);
3590 end Set_Elaborate_Body_Desirable;
3592 procedure Set_Elaboration_Entity (Id : E; V : E) is
3597 Ekind (Id) = E_Package
3599 Is_Generic_Unit (Id));
3601 end Set_Elaboration_Entity;
3603 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3608 Ekind (Id) = E_Package
3610 Is_Generic_Unit (Id));
3611 Set_Flag174 (Id, V);
3612 end Set_Elaboration_Entity_Required;
3614 procedure Set_Enclosing_Scope (Id : E; V : E) is
3617 end Set_Enclosing_Scope;
3619 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3621 pragma Assert (Is_Entry (Id));
3622 Set_Flag152 (Id, V);
3623 end Set_Entry_Accepted;
3625 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3628 end Set_Entry_Bodies_Array;
3630 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3633 end Set_Entry_Cancel_Parameter;
3635 procedure Set_Entry_Component (Id : E; V : E) is
3638 end Set_Entry_Component;
3640 procedure Set_Entry_Formal (Id : E; V : E) is
3643 end Set_Entry_Formal;
3645 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3647 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3649 end Set_Entry_Index_Constant;
3651 procedure Set_Contract (Id : E; V : N) is
3654 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Void)
3655 or else Is_Subprogram (Id)
3656 or else Is_Generic_Subprogram (Id));
3660 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3663 end Set_Entry_Parameters_Type;
3665 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3667 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3669 end Set_Enum_Pos_To_Rep;
3671 procedure Set_Enumeration_Pos (Id : E; V : U) is
3673 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3675 end Set_Enumeration_Pos;
3677 procedure Set_Enumeration_Rep (Id : E; V : U) is
3679 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3681 end Set_Enumeration_Rep;
3683 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3685 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3687 end Set_Enumeration_Rep_Expr;
3689 procedure Set_Equivalent_Type (Id : E; V : E) is
3692 (Ekind_In (Id, E_Class_Wide_Type,
3693 E_Class_Wide_Subtype,
3694 E_Access_Protected_Subprogram_Type,
3695 E_Anonymous_Access_Protected_Subprogram_Type,
3696 E_Access_Subprogram_Type,
3699 end Set_Equivalent_Type;
3701 procedure Set_Esize (Id : E; V : U) is
3706 procedure Set_Exception_Code (Id : E; V : U) is
3708 pragma Assert (Ekind (Id) = E_Exception);
3710 end Set_Exception_Code;
3712 procedure Set_Extra_Accessibility (Id : E; V : E) is
3715 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
3717 end Set_Extra_Accessibility;
3719 procedure Set_Extra_Accessibility_Of_Result (Id : E; V : E) is
3721 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
3723 end Set_Extra_Accessibility_Of_Result;
3725 procedure Set_Extra_Constrained (Id : E; V : E) is
3727 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3729 end Set_Extra_Constrained;
3731 procedure Set_Extra_Formal (Id : E; V : E) is
3734 end Set_Extra_Formal;
3736 procedure Set_Extra_Formals (Id : E; V : E) is
3739 (Is_Overloadable (Id)
3740 or else Ekind_In (Id, E_Entry_Family,
3742 E_Subprogram_Type));
3744 end Set_Extra_Formals;
3746 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3749 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3750 Set_Flag229 (Id, V);
3751 end Set_Can_Use_Internal_Rep;
3753 procedure Set_Finalization_Master (Id : E; V : E) is
3755 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3757 end Set_Finalization_Master;
3759 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3761 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3762 Set_Flag158 (Id, V);
3763 end Set_Finalize_Storage_Only;
3765 procedure Set_Finalizer (Id : E; V : E) is
3768 (Ekind (Id) = E_Package
3769 or else Ekind (Id) = E_Package_Body);
3773 procedure Set_First_Entity (Id : E; V : E) is
3776 end Set_First_Entity;
3778 procedure Set_First_Exit_Statement (Id : E; V : N) is
3780 pragma Assert (Ekind (Id) = E_Loop);
3782 end Set_First_Exit_Statement;
3784 procedure Set_First_Index (Id : E; V : N) is
3786 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3788 end Set_First_Index;
3790 procedure Set_First_Literal (Id : E; V : E) is
3792 pragma Assert (Is_Enumeration_Type (Id));
3794 end Set_First_Literal;
3796 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3798 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3800 end Set_First_Optional_Parameter;
3802 procedure Set_First_Private_Entity (Id : E; V : E) is
3804 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
3805 or else Ekind (Id) in Concurrent_Kind);
3807 end Set_First_Private_Entity;
3809 procedure Set_First_Rep_Item (Id : E; V : N) is
3812 end Set_First_Rep_Item;
3814 procedure Set_Float_Rep (Id : E; V : F) is
3815 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
3817 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
3820 procedure Set_Freeze_Node (Id : E; V : N) is
3823 end Set_Freeze_Node;
3825 procedure Set_From_With_Type (Id : E; V : B := True) is
3829 or else Ekind (Id) = E_Package);
3830 Set_Flag159 (Id, V);
3831 end Set_From_With_Type;
3833 procedure Set_Full_View (Id : E; V : E) is
3835 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
3839 procedure Set_Generic_Homonym (Id : E; V : E) is
3842 end Set_Generic_Homonym;
3844 procedure Set_Generic_Renamings (Id : E; V : L) is
3846 Set_Elist23 (Id, V);
3847 end Set_Generic_Renamings;
3849 procedure Set_Handler_Records (Id : E; V : S) is
3852 end Set_Handler_Records;
3854 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
3856 pragma Assert (Id = Base_Type (Id));
3857 Set_Flag135 (Id, V);
3858 end Set_Has_Aliased_Components;
3860 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
3863 end Set_Has_Alignment_Clause;
3865 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
3868 end Set_Has_All_Calls_Remote;
3870 procedure Set_Has_Anonymous_Master (Id : E; V : B := True) is
3873 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
3874 Set_Flag253 (Id, V);
3875 end Set_Has_Anonymous_Master;
3877 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
3879 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
3881 end Set_Has_Atomic_Components;
3883 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
3886 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
3887 Set_Flag139 (Id, V);
3888 end Set_Has_Biased_Representation;
3890 procedure Set_Has_Completion (Id : E; V : B := True) is
3893 end Set_Has_Completion;
3895 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
3897 pragma Assert (Is_Type (Id));
3899 end Set_Has_Completion_In_Body;
3901 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
3903 pragma Assert (Ekind (Id) = E_Record_Type);
3904 Set_Flag140 (Id, V);
3905 end Set_Has_Complex_Representation;
3907 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
3909 pragma Assert (Ekind (Id) = E_Array_Type);
3911 end Set_Has_Component_Size_Clause;
3913 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
3915 pragma Assert (Is_Type (Id));
3916 Set_Flag187 (Id, V);
3917 end Set_Has_Constrained_Partial_View;
3919 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
3921 Set_Flag181 (Id, V);
3922 end Set_Has_Contiguous_Rep;
3924 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
3926 pragma Assert (Id = Base_Type (Id));
3928 end Set_Has_Controlled_Component;
3930 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
3933 end Set_Has_Controlling_Result;
3935 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
3937 Set_Flag119 (Id, V);
3938 end Set_Has_Convention_Pragma;
3940 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
3943 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
3944 and then Is_Base_Type (Id));
3946 end Set_Has_Default_Aspect;
3948 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
3950 pragma Assert (Nkind (Id) in N_Entity);
3951 Set_Flag200 (Id, V);
3952 end Set_Has_Delayed_Aspects;
3954 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
3956 pragma Assert (Nkind (Id) in N_Entity);
3958 end Set_Has_Delayed_Freeze;
3960 procedure Set_Has_Delayed_Rep_Aspects (Id : E; V : B := True) is
3962 pragma Assert (Nkind (Id) in N_Entity);
3963 Set_Flag261 (Id, V);
3964 end Set_Has_Delayed_Rep_Aspects;
3966 procedure Set_Has_Discriminants (Id : E; V : B := True) is
3968 pragma Assert (Nkind (Id) in N_Entity);
3970 end Set_Has_Discriminants;
3972 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
3974 pragma Assert (Ekind (Id) = E_Record_Type
3975 and then Is_Tagged_Type (Id));
3976 Set_Flag220 (Id, V);
3977 end Set_Has_Dispatch_Table;
3979 procedure Set_Has_Dynamic_Predicate_Aspect (Id : E; V : B := True) is
3981 pragma Assert (Is_Type (Id));
3982 Set_Flag258 (Id, V);
3983 end Set_Has_Dynamic_Predicate_Aspect;
3985 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
3987 pragma Assert (Is_Enumeration_Type (Id));
3989 end Set_Has_Enumeration_Rep_Clause;
3991 procedure Set_Has_Exit (Id : E; V : B := True) is
3996 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True) is
3998 pragma Assert (Is_Tagged_Type (Id));
3999 Set_Flag110 (Id, V);
4000 end Set_Has_External_Tag_Rep_Clause;
4002 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
4004 Set_Flag175 (Id, V);
4005 end Set_Has_Forward_Instantiation;
4007 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
4009 Set_Flag173 (Id, V);
4010 end Set_Has_Fully_Qualified_Name;
4012 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
4015 end Set_Has_Gigi_Rep_Item;
4017 procedure Set_Has_Homonym (Id : E; V : B := True) is
4020 end Set_Has_Homonym;
4022 procedure Set_Has_Implicit_Dereference (Id : E; V : B := True) is
4024 Set_Flag251 (Id, V);
4025 end Set_Has_Implicit_Dereference;
4027 procedure Set_Has_Independent_Components (Id : E; V : B := True) is
4029 pragma Assert (Is_Object (Id) or else Is_Type (Id));
4031 end Set_Has_Independent_Components;
4033 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
4035 pragma Assert (Is_Type (Id));
4036 Set_Flag248 (Id, V);
4037 end Set_Has_Inheritable_Invariants;
4039 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
4041 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
4042 Set_Flag219 (Id, V);
4043 end Set_Has_Initial_Value;
4045 procedure Set_Has_Invariants (Id : E; V : B := True) is
4047 pragma Assert (Is_Type (Id));
4048 Set_Flag232 (Id, V);
4049 end Set_Has_Invariants;
4051 procedure Set_Has_Loop_Entry_Attributes (Id : E; V : B := True) is
4053 pragma Assert (Ekind (Id) = E_Loop);
4054 Set_Flag260 (Id, V);
4055 end Set_Has_Loop_Entry_Attributes;
4057 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
4059 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4061 end Set_Has_Machine_Radix_Clause;
4063 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
4066 end Set_Has_Master_Entity;
4068 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
4070 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4071 Set_Flag142 (Id, V);
4072 end Set_Has_Missing_Return;
4074 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
4076 Set_Flag101 (Id, V);
4077 end Set_Has_Nested_Block_With_Handler;
4079 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
4081 pragma Assert (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
4082 Set_Flag215 (Id, V);
4083 end Set_Has_Up_Level_Access;
4085 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
4087 pragma Assert (Id = Base_Type (Id));
4089 end Set_Has_Non_Standard_Rep;
4091 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
4093 pragma Assert (Is_Type (Id));
4094 Set_Flag172 (Id, V);
4095 end Set_Has_Object_Size_Clause;
4097 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
4099 Set_Flag154 (Id, V);
4100 end Set_Has_Per_Object_Constraint;
4102 procedure Set_Has_Postconditions (Id : E; V : B := True) is
4104 pragma Assert (Is_Subprogram (Id));
4105 Set_Flag240 (Id, V);
4106 end Set_Has_Postconditions;
4108 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
4110 pragma Assert (Is_Access_Type (Id));
4111 Set_Flag27 (Base_Type (Id), V);
4112 end Set_Has_Pragma_Controlled;
4114 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
4116 Set_Flag150 (Id, V);
4117 end Set_Has_Pragma_Elaborate_Body;
4119 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
4121 Set_Flag157 (Id, V);
4122 end Set_Has_Pragma_Inline;
4124 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
4126 Set_Flag230 (Id, V);
4127 end Set_Has_Pragma_Inline_Always;
4129 procedure Set_Has_Pragma_No_Inline (Id : E; V : B := True) is
4131 Set_Flag201 (Id, V);
4132 end Set_Has_Pragma_No_Inline;
4134 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
4136 pragma Assert (Is_Enumeration_Type (Id));
4137 pragma Assert (Id = Base_Type (Id));
4138 Set_Flag198 (Id, V);
4139 end Set_Has_Pragma_Ordered;
4141 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
4143 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
4144 pragma Assert (Id = Base_Type (Id));
4145 Set_Flag121 (Id, V);
4146 end Set_Has_Pragma_Pack;
4148 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
4150 Set_Flag221 (Id, V);
4151 end Set_Has_Pragma_Preelab_Init;
4153 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
4155 Set_Flag203 (Id, V);
4156 end Set_Has_Pragma_Pure;
4158 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
4160 Set_Flag179 (Id, V);
4161 end Set_Has_Pragma_Pure_Function;
4163 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
4165 Set_Flag169 (Id, V);
4166 end Set_Has_Pragma_Thread_Local_Storage;
4168 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
4170 Set_Flag233 (Id, V);
4171 end Set_Has_Pragma_Unmodified;
4173 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
4175 Set_Flag180 (Id, V);
4176 end Set_Has_Pragma_Unreferenced;
4178 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
4180 pragma Assert (Is_Type (Id));
4181 Set_Flag212 (Id, V);
4182 end Set_Has_Pragma_Unreferenced_Objects;
4184 procedure Set_Has_Predicates (Id : E; V : B := True) is
4186 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Void);
4187 Set_Flag250 (Id, V);
4188 end Set_Has_Predicates;
4190 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
4192 pragma Assert (Id = Base_Type (Id));
4193 Set_Flag120 (Id, V);
4194 end Set_Has_Primitive_Operations;
4196 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
4198 pragma Assert (Is_Type (Id));
4199 Set_Flag151 (Id, V);
4200 end Set_Has_Private_Ancestor;
4202 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
4204 Set_Flag155 (Id, V);
4205 end Set_Has_Private_Declaration;
4207 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
4209 Set_Flag161 (Id, V);
4210 end Set_Has_Qualified_Name;
4212 procedure Set_Has_RACW (Id : E; V : B := True) is
4214 pragma Assert (Ekind (Id) = E_Package);
4215 Set_Flag214 (Id, V);
4218 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
4220 pragma Assert (Id = Base_Type (Id));
4222 end Set_Has_Record_Rep_Clause;
4224 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
4226 pragma Assert (Is_Subprogram (Id));
4227 Set_Flag143 (Id, V);
4228 end Set_Has_Recursive_Call;
4230 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
4233 end Set_Has_Size_Clause;
4235 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
4238 end Set_Has_Small_Clause;
4240 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
4242 pragma Assert (Id = Base_Type (Id));
4243 Set_Flag100 (Id, V);
4244 end Set_Has_Specified_Layout;
4246 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
4248 pragma Assert (Is_Type (Id));
4249 Set_Flag190 (Id, V);
4250 end Set_Has_Specified_Stream_Input;
4252 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
4254 pragma Assert (Is_Type (Id));
4255 Set_Flag191 (Id, V);
4256 end Set_Has_Specified_Stream_Output;
4258 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
4260 pragma Assert (Is_Type (Id));
4261 Set_Flag192 (Id, V);
4262 end Set_Has_Specified_Stream_Read;
4264 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
4266 pragma Assert (Is_Type (Id));
4267 Set_Flag193 (Id, V);
4268 end Set_Has_Specified_Stream_Write;
4270 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
4272 Set_Flag211 (Id, V);
4273 end Set_Has_Static_Discriminants;
4275 procedure Set_Has_Static_Predicate_Aspect (Id : E; V : B := True) is
4277 pragma Assert (Is_Type (Id));
4278 Set_Flag259 (Id, V);
4279 end Set_Has_Static_Predicate_Aspect;
4281 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
4283 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4284 pragma Assert (Id = Base_Type (Id));
4286 end Set_Has_Storage_Size_Clause;
4288 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4290 pragma Assert (Is_Elementary_Type (Id));
4291 Set_Flag184 (Id, V);
4292 end Set_Has_Stream_Size_Clause;
4294 procedure Set_Has_Task (Id : E; V : B := True) is
4296 pragma Assert (Id = Base_Type (Id));
4300 procedure Set_Has_Thunks (Id : E; V : B := True) is
4302 pragma Assert (Is_Tag (Id));
4303 Set_Flag228 (Id, V);
4306 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4308 pragma Assert (Id = Base_Type (Id));
4309 Set_Flag123 (Id, V);
4310 end Set_Has_Unchecked_Union;
4312 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4314 pragma Assert (Is_Type (Id));
4316 end Set_Has_Unknown_Discriminants;
4318 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4320 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4322 end Set_Has_Volatile_Components;
4324 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4326 Set_Flag182 (Id, V);
4327 end Set_Has_Xref_Entry;
4329 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4331 pragma Assert (Ekind (Id) = E_Variable);
4333 end Set_Hiding_Loop_Variable;
4335 procedure Set_Homonym (Id : E; V : E) is
4337 pragma Assert (Id /= V);
4341 procedure Set_Interface_Alias (Id : E; V : E) is
4345 and then Is_Hidden (Id)
4346 and then (Ekind_In (Id, E_Procedure, E_Function)));
4348 end Set_Interface_Alias;
4350 procedure Set_Interfaces (Id : E; V : L) is
4352 pragma Assert (Is_Record_Type (Id));
4353 Set_Elist25 (Id, V);
4356 procedure Set_In_Package_Body (Id : E; V : B := True) is
4359 end Set_In_Package_Body;
4361 procedure Set_In_Private_Part (Id : E; V : B := True) is
4364 end Set_In_Private_Part;
4366 procedure Set_In_Use (Id : E; V : B := True) is
4368 pragma Assert (Nkind (Id) in N_Entity);
4372 procedure Set_Initialization_Statements (Id : E; V : N) is
4374 -- Tolerate an E_Void entity since this can be called while resolving
4375 -- an aggregate used as the initialization expression for an object
4376 -- declaration, and this occurs before the Ekind for the object is set.
4378 pragma Assert (Ekind_In (Id, E_Void, E_Constant, E_Variable));
4380 end Set_Initialization_Statements;
4382 procedure Set_Inner_Instances (Id : E; V : L) is
4384 Set_Elist23 (Id, V);
4385 end Set_Inner_Instances;
4387 procedure Set_Interface_Name (Id : E; V : N) is
4390 end Set_Interface_Name;
4392 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4394 pragma Assert (Is_Overloadable (Id));
4396 end Set_Is_Abstract_Subprogram;
4398 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4400 pragma Assert (Is_Type (Id));
4401 Set_Flag146 (Id, V);
4402 end Set_Is_Abstract_Type;
4404 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4406 pragma Assert (Is_Access_Type (Id));
4407 Set_Flag194 (Id, V);
4408 end Set_Is_Local_Anonymous_Access;
4410 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4412 pragma Assert (Is_Access_Type (Id));
4414 end Set_Is_Access_Constant;
4416 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4418 Set_Flag185 (Id, V);
4419 end Set_Is_Ada_2005_Only;
4421 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4423 Set_Flag199 (Id, V);
4424 end Set_Is_Ada_2012_Only;
4426 procedure Set_Is_Aliased (Id : E; V : B := True) is
4428 pragma Assert (Nkind (Id) in N_Entity);
4432 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
4434 pragma Assert (Is_Entry (Id));
4435 Set_Flag132 (Id, V);
4436 end Set_Is_AST_Entry;
4438 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4441 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4443 end Set_Is_Asynchronous;
4445 procedure Set_Is_Atomic (Id : E; V : B := True) is
4450 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4452 pragma Assert ((not V)
4453 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4454 Set_Flag122 (Id, V);
4455 end Set_Is_Bit_Packed_Array;
4457 procedure Set_Is_Called (Id : E; V : B := True) is
4459 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4460 Set_Flag102 (Id, V);
4463 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4466 end Set_Is_Character_Type;
4468 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4471 end Set_Is_Child_Unit;
4473 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4476 end Set_Is_Class_Wide_Equivalent_Type;
4478 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4480 Set_Flag149 (Id, V);
4481 end Set_Is_Compilation_Unit;
4483 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4485 pragma Assert (Ekind (Id) = E_Discriminant);
4486 Set_Flag103 (Id, V);
4487 end Set_Is_Completely_Hidden;
4489 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4492 end Set_Is_Concurrent_Record_Type;
4494 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4497 end Set_Is_Constr_Subt_For_U_Nominal;
4499 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4501 Set_Flag141 (Id, V);
4502 end Set_Is_Constr_Subt_For_UN_Aliased;
4504 procedure Set_Is_Constrained (Id : E; V : B := True) is
4506 pragma Assert (Nkind (Id) in N_Entity);
4508 end Set_Is_Constrained;
4510 procedure Set_Is_Constructor (Id : E; V : B := True) is
4513 end Set_Is_Constructor;
4515 procedure Set_Is_Controlled (Id : E; V : B := True) is
4517 pragma Assert (Id = Base_Type (Id));
4519 end Set_Is_Controlled;
4521 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4523 pragma Assert (Is_Formal (Id));
4525 end Set_Is_Controlling_Formal;
4527 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4530 end Set_Is_CPP_Class;
4532 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4534 pragma Assert (Is_Type (Id));
4535 Set_Flag223 (Id, V);
4536 end Set_Is_Descendent_Of_Address;
4538 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4540 Set_Flag176 (Id, V);
4541 end Set_Is_Discrim_SO_Function;
4543 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4545 Set_Flag234 (Id, V);
4546 end Set_Is_Dispatch_Table_Entity;
4548 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4553 Is_Overloadable (Id)
4555 Ekind (Id) = E_Subprogram_Type);
4558 end Set_Is_Dispatching_Operation;
4560 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4562 Set_Flag124 (Id, V);
4563 end Set_Is_Eliminated;
4565 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4568 end Set_Is_Entry_Formal;
4570 procedure Set_Is_Exported (Id : E; V : B := True) is
4573 end Set_Is_Exported;
4575 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4578 end Set_Is_First_Subtype;
4580 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4582 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4583 Set_Flag118 (Id, V);
4584 end Set_Is_For_Access_Subtype;
4586 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4588 Set_Flag111 (Id, V);
4589 end Set_Is_Formal_Subprogram;
4591 procedure Set_Is_Frozen (Id : E; V : B := True) is
4593 pragma Assert (Nkind (Id) in N_Entity);
4597 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4599 pragma Assert (Is_Type (Id));
4601 end Set_Is_Generic_Actual_Type;
4603 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4605 Set_Flag130 (Id, V);
4606 end Set_Is_Generic_Instance;
4608 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4610 pragma Assert (Nkind (Id) in N_Entity);
4612 end Set_Is_Generic_Type;
4614 procedure Set_Is_Hidden (Id : E; V : B := True) is
4619 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4621 Set_Flag171 (Id, V);
4622 end Set_Is_Hidden_Open_Scope;
4624 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4626 pragma Assert (Nkind (Id) in N_Entity);
4628 end Set_Is_Immediately_Visible;
4630 procedure Set_Is_Implementation_Defined (Id : E; V : B := True) is
4632 Set_Flag254 (Id, V);
4633 end Set_Is_Implementation_Defined;
4635 procedure Set_Is_Imported (Id : E; V : B := True) is
4638 end Set_Is_Imported;
4640 procedure Set_Is_Inlined (Id : E; V : B := True) is
4645 procedure Set_Is_Interface (Id : E; V : B := True) is
4647 pragma Assert (Is_Record_Type (Id));
4648 Set_Flag186 (Id, V);
4649 end Set_Is_Interface;
4651 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4653 Set_Flag126 (Id, V);
4654 end Set_Is_Instantiated;
4656 procedure Set_Is_Internal (Id : E; V : B := True) is
4658 pragma Assert (Nkind (Id) in N_Entity);
4660 end Set_Is_Internal;
4662 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4664 pragma Assert (Nkind (Id) in N_Entity);
4666 end Set_Is_Interrupt_Handler;
4668 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4671 end Set_Is_Intrinsic_Subprogram;
4673 procedure Set_Is_Invariant_Procedure (Id : E; V : B := True) is
4675 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4676 Set_Flag257 (Id, V);
4677 end Set_Is_Invariant_Procedure;
4679 procedure Set_Is_Itype (Id : E; V : B := True) is
4684 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4687 end Set_Is_Known_Non_Null;
4689 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4691 Set_Flag204 (Id, V);
4692 end Set_Is_Known_Null;
4694 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4696 Set_Flag170 (Id, V);
4697 end Set_Is_Known_Valid;
4699 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4701 pragma Assert (Is_Type (Id));
4702 Set_Flag106 (Id, V);
4703 end Set_Is_Limited_Composite;
4705 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4707 pragma Assert (Is_Interface (Id));
4708 Set_Flag197 (Id, V);
4709 end Set_Is_Limited_Interface;
4711 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4714 end Set_Is_Limited_Record;
4716 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4718 pragma Assert (Is_Subprogram (Id));
4719 Set_Flag137 (Id, V);
4720 end Set_Is_Machine_Code_Subprogram;
4722 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4724 pragma Assert (Is_Type (Id));
4725 Set_Flag109 (Id, V);
4726 end Set_Is_Non_Static_Subtype;
4728 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4730 pragma Assert (Ekind (Id) = E_Procedure);
4731 Set_Flag178 (Id, V);
4732 end Set_Is_Null_Init_Proc;
4734 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4736 Set_Flag153 (Id, V);
4737 end Set_Is_Obsolescent;
4739 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
4741 pragma Assert (Ekind (Id) = E_Out_Parameter);
4742 Set_Flag226 (Id, V);
4743 end Set_Is_Only_Out_Parameter;
4745 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
4747 pragma Assert (Is_Formal (Id));
4748 Set_Flag134 (Id, V);
4749 end Set_Is_Optional_Parameter;
4751 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
4753 Set_Flag160 (Id, V);
4754 end Set_Is_Package_Body_Entity;
4756 procedure Set_Is_Packed (Id : E; V : B := True) is
4758 pragma Assert (Id = Base_Type (Id));
4762 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
4764 Set_Flag138 (Id, V);
4765 end Set_Is_Packed_Array_Type;
4767 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
4769 pragma Assert (Nkind (Id) in N_Entity);
4771 end Set_Is_Potentially_Use_Visible;
4773 procedure Set_Is_Predicate_Function (Id : E; V : B := True) is
4775 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4776 Set_Flag255 (Id, V);
4777 end Set_Is_Predicate_Function;
4779 procedure Set_Is_Predicate_Function_M (Id : E; V : B := True) is
4781 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4782 Set_Flag256 (Id, V);
4783 end Set_Is_Predicate_Function_M;
4785 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
4788 end Set_Is_Preelaborated;
4790 procedure Set_Is_Primitive (Id : E; V : B := True) is
4793 (Is_Overloadable (Id)
4794 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
4795 Set_Flag218 (Id, V);
4796 end Set_Is_Primitive;
4798 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
4800 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4801 Set_Flag195 (Id, V);
4802 end Set_Is_Primitive_Wrapper;
4804 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
4806 pragma Assert (Is_Type (Id));
4807 Set_Flag107 (Id, V);
4808 end Set_Is_Private_Composite;
4810 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
4813 end Set_Is_Private_Descendant;
4815 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
4817 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4818 Set_Flag245 (Id, V);
4819 end Set_Is_Private_Primitive;
4821 procedure Set_Is_Processed_Transient (Id : E; V : B := True) is
4823 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
4824 Set_Flag252 (Id, V);
4825 end Set_Is_Processed_Transient;
4827 procedure Set_Is_Public (Id : E; V : B := True) is
4829 pragma Assert (Nkind (Id) in N_Entity);
4833 procedure Set_Is_Pure (Id : E; V : B := True) is
4838 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
4840 pragma Assert (Is_Access_Type (Id));
4841 Set_Flag189 (Id, V);
4842 end Set_Is_Pure_Unit_Access_Type;
4844 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
4846 pragma Assert (Is_Type (Id));
4847 Set_Flag244 (Id, V);
4848 end Set_Is_RACW_Stub_Type;
4850 procedure Set_Is_Raised (Id : E; V : B := True) is
4852 pragma Assert (Ekind (Id) = E_Exception);
4853 Set_Flag224 (Id, V);
4856 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
4859 end Set_Is_Remote_Call_Interface;
4861 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
4864 end Set_Is_Remote_Types;
4866 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
4868 Set_Flag112 (Id, V);
4869 end Set_Is_Renaming_Of_Object;
4871 procedure Set_Is_Return_Object (Id : E; V : B := True) is
4873 Set_Flag209 (Id, V);
4874 end Set_Is_Return_Object;
4876 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
4878 pragma Assert (Ekind (Id) = E_Variable);
4879 Set_Flag249 (Id, V);
4880 end Set_Is_Safe_To_Reevaluate;
4882 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
4885 end Set_Is_Shared_Passive;
4887 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
4891 or else Ekind_In (Id, E_Exception,
4896 end Set_Is_Statically_Allocated;
4898 procedure Set_Is_Tag (Id : E; V : B := True) is
4900 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
4904 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
4907 end Set_Is_Tagged_Type;
4909 procedure Set_Is_Thunk (Id : E; V : B := True) is
4911 pragma Assert (Is_Subprogram (Id));
4912 Set_Flag225 (Id, V);
4915 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
4917 Set_Flag235 (Id, V);
4918 end Set_Is_Trivial_Subprogram;
4920 procedure Set_Is_True_Constant (Id : E; V : B := True) is
4922 Set_Flag163 (Id, V);
4923 end Set_Is_True_Constant;
4925 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
4927 pragma Assert (Id = Base_Type (Id));
4928 Set_Flag117 (Id, V);
4929 end Set_Is_Unchecked_Union;
4931 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
4933 pragma Assert (Ekind (Id) = E_Record_Type);
4934 Set_Flag246 (Id, V);
4935 end Set_Is_Underlying_Record_View;
4937 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
4939 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
4940 Set_Flag144 (Id, V);
4941 end Set_Is_Unsigned_Type;
4943 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
4945 pragma Assert (Ekind (Id) = E_Procedure);
4946 Set_Flag127 (Id, V);
4947 end Set_Is_Valued_Procedure;
4949 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
4951 Set_Flag206 (Id, V);
4952 end Set_Is_Visible_Formal;
4954 procedure Set_Is_Visible_Lib_Unit (Id : E; V : B := True) is
4956 Set_Flag116 (Id, V);
4957 end Set_Is_Visible_Lib_Unit;
4959 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
4961 pragma Assert (Ekind (Id) = E_Exception);
4962 Set_Flag133 (Id, V);
4963 end Set_Is_VMS_Exception;
4965 procedure Set_Is_Volatile (Id : E; V : B := True) is
4967 pragma Assert (Nkind (Id) in N_Entity);
4969 end Set_Is_Volatile;
4971 procedure Set_Itype_Printed (Id : E; V : B := True) is
4973 pragma Assert (Is_Itype (Id));
4974 Set_Flag202 (Id, V);
4975 end Set_Itype_Printed;
4977 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
4980 end Set_Kill_Elaboration_Checks;
4982 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
4985 end Set_Kill_Range_Checks;
4987 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
4989 pragma Assert (Is_Type (Id));
4990 Set_Flag207 (Id, V);
4991 end Set_Known_To_Have_Preelab_Init;
4993 procedure Set_Last_Assignment (Id : E; V : N) is
4995 pragma Assert (Is_Assignable (Id));
4997 end Set_Last_Assignment;
4999 procedure Set_Last_Entity (Id : E; V : E) is
5002 end Set_Last_Entity;
5004 procedure Set_Limited_View (Id : E; V : E) is
5006 pragma Assert (Ekind (Id) = E_Package);
5008 end Set_Limited_View;
5010 procedure Set_Lit_Indexes (Id : E; V : E) is
5012 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5014 end Set_Lit_Indexes;
5016 procedure Set_Lit_Strings (Id : E; V : E) is
5018 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5020 end Set_Lit_Strings;
5022 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
5024 pragma Assert (Is_Formal (Id));
5025 Set_Flag205 (Id, V);
5026 end Set_Low_Bound_Tested;
5028 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
5030 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
5032 end Set_Machine_Radix_10;
5034 procedure Set_Master_Id (Id : E; V : E) is
5036 pragma Assert (Is_Access_Type (Id));
5040 procedure Set_Materialize_Entity (Id : E; V : B := True) is
5042 Set_Flag168 (Id, V);
5043 end Set_Materialize_Entity;
5045 procedure Set_May_Inherit_Delayed_Rep_Aspects (Id : E; V : B := True) is
5047 Set_Flag262 (Id, V);
5048 end Set_May_Inherit_Delayed_Rep_Aspects;
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_SPARK_Mode_Pragmas (Id : E; V : N) is
5474 (Ekind_In (Id, E_Function, -- subprogram variants
5476 E_Generic_Procedure,
5480 Ekind_In (Id, E_Generic_Package, -- package variants
5485 end Set_SPARK_Mode_Pragmas;
5487 procedure Set_Spec_Entity (Id : E; V : E) is
5489 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5491 end Set_Spec_Entity;
5493 procedure Set_Static_Predicate (Id : E; V : S) is
5496 (Ekind_In (Id, E_Enumeration_Subtype,
5497 E_Modular_Integer_Subtype,
5498 E_Signed_Integer_Subtype)
5499 and then Has_Predicates (Id));
5501 end Set_Static_Predicate;
5503 procedure Set_Status_Flag_Or_Transient_Decl (Id : E; V : E) is
5505 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5507 end Set_Status_Flag_Or_Transient_Decl;
5509 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5511 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5512 pragma Assert (Id = Base_Type (Id));
5514 end Set_Storage_Size_Variable;
5516 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5518 pragma Assert (Ekind (Id) = E_Package);
5520 end Set_Static_Elaboration_Desired;
5522 procedure Set_Static_Initialization (Id : E; V : N) is
5525 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5527 end Set_Static_Initialization;
5529 procedure Set_Stored_Constraint (Id : E; V : L) is
5531 pragma Assert (Nkind (Id) in N_Entity);
5532 Set_Elist23 (Id, V);
5533 end Set_Stored_Constraint;
5535 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5537 pragma Assert (Id = Base_Type (Id));
5538 Set_Flag145 (Id, V);
5539 end Set_Strict_Alignment;
5541 procedure Set_String_Literal_Length (Id : E; V : U) is
5543 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5545 end Set_String_Literal_Length;
5547 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5549 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5551 end Set_String_Literal_Low_Bound;
5553 procedure Set_Subprograms_For_Type (Id : E; V : E) is
5555 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
5557 end Set_Subprograms_For_Type;
5559 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5561 Set_Flag148 (Id, V);
5562 end Set_Suppress_Elaboration_Warnings;
5564 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
5566 pragma Assert (Is_Type (Id));
5567 Set_Flag105 (Id, V);
5568 end Set_Suppress_Initialization;
5570 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5572 Set_Flag165 (Id, V);
5573 end Set_Suppress_Style_Checks;
5575 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5577 Set_Flag217 (Id, V);
5578 end Set_Suppress_Value_Tracking_On_Call;
5580 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5582 pragma Assert (Ekind (Id) in Task_Kind);
5584 end Set_Task_Body_Procedure;
5586 procedure Set_Thunk_Entity (Id : E; V : E) is
5588 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5589 and then Is_Thunk (Id));
5591 end Set_Thunk_Entity;
5593 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5596 end Set_Treat_As_Volatile;
5598 procedure Set_Underlying_Full_View (Id : E; V : E) is
5600 pragma Assert (Ekind (Id) in Private_Kind);
5602 end Set_Underlying_Full_View;
5604 procedure Set_Underlying_Record_View (Id : E; V : E) is
5606 pragma Assert (Ekind (Id) = E_Record_Type);
5608 end Set_Underlying_Record_View;
5610 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5612 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5613 Set_Flag216 (Id, V);
5614 end Set_Universal_Aliasing;
5616 procedure Set_Unset_Reference (Id : E; V : N) is
5619 end Set_Unset_Reference;
5621 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5623 Set_Flag222 (Id, V);
5624 end Set_Used_As_Generic_Actual;
5626 procedure Set_Uses_Lock_Free (Id : E; V : B := True) is
5628 pragma Assert (Ekind (Id) = E_Protected_Type);
5629 Set_Flag188 (Id, V);
5630 end Set_Uses_Lock_Free;
5632 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5635 end Set_Uses_Sec_Stack;
5637 procedure Set_Warnings_Off (Id : E; V : B := True) is
5640 end Set_Warnings_Off;
5642 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
5644 Set_Flag236 (Id, V);
5645 end Set_Warnings_Off_Used;
5647 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
5649 Set_Flag237 (Id, V);
5650 end Set_Warnings_Off_Used_Unmodified;
5652 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
5654 Set_Flag238 (Id, V);
5655 end Set_Warnings_Off_Used_Unreferenced;
5657 procedure Set_Was_Hidden (Id : E; V : B := True) is
5659 Set_Flag196 (Id, V);
5662 procedure Set_Wrapped_Entity (Id : E; V : E) is
5664 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5665 and then Is_Primitive_Wrapper (Id));
5667 end Set_Wrapped_Entity;
5669 -----------------------------------
5670 -- Field Initialization Routines --
5671 -----------------------------------
5673 procedure Init_Alignment (Id : E) is
5675 Set_Uint14 (Id, Uint_0);
5678 procedure Init_Alignment (Id : E; V : Int) is
5680 Set_Uint14 (Id, UI_From_Int (V));
5683 procedure Init_Component_Bit_Offset (Id : E) is
5685 Set_Uint11 (Id, No_Uint);
5686 end Init_Component_Bit_Offset;
5688 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
5690 Set_Uint11 (Id, UI_From_Int (V));
5691 end Init_Component_Bit_Offset;
5693 procedure Init_Component_Size (Id : E) is
5695 Set_Uint22 (Id, Uint_0);
5696 end Init_Component_Size;
5698 procedure Init_Component_Size (Id : E; V : Int) is
5700 Set_Uint22 (Id, UI_From_Int (V));
5701 end Init_Component_Size;
5703 procedure Init_Digits_Value (Id : E) is
5705 Set_Uint17 (Id, Uint_0);
5706 end Init_Digits_Value;
5708 procedure Init_Digits_Value (Id : E; V : Int) is
5710 Set_Uint17 (Id, UI_From_Int (V));
5711 end Init_Digits_Value;
5713 procedure Init_Esize (Id : E) is
5715 Set_Uint12 (Id, Uint_0);
5718 procedure Init_Esize (Id : E; V : Int) is
5720 Set_Uint12 (Id, UI_From_Int (V));
5723 procedure Init_Normalized_First_Bit (Id : E) is
5725 Set_Uint8 (Id, No_Uint);
5726 end Init_Normalized_First_Bit;
5728 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
5730 Set_Uint8 (Id, UI_From_Int (V));
5731 end Init_Normalized_First_Bit;
5733 procedure Init_Normalized_Position (Id : E) is
5735 Set_Uint14 (Id, No_Uint);
5736 end Init_Normalized_Position;
5738 procedure Init_Normalized_Position (Id : E; V : Int) is
5740 Set_Uint14 (Id, UI_From_Int (V));
5741 end Init_Normalized_Position;
5743 procedure Init_Normalized_Position_Max (Id : E) is
5745 Set_Uint10 (Id, No_Uint);
5746 end Init_Normalized_Position_Max;
5748 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
5750 Set_Uint10 (Id, UI_From_Int (V));
5751 end Init_Normalized_Position_Max;
5753 procedure Init_RM_Size (Id : E) is
5755 Set_Uint13 (Id, Uint_0);
5758 procedure Init_RM_Size (Id : E; V : Int) is
5760 Set_Uint13 (Id, UI_From_Int (V));
5763 -----------------------------
5764 -- Init_Component_Location --
5765 -----------------------------
5767 procedure Init_Component_Location (Id : E) is
5769 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
5770 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
5771 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
5772 Set_Uint12 (Id, Uint_0); -- Esize
5773 Set_Uint14 (Id, No_Uint); -- Normalized_Position
5774 end Init_Component_Location;
5776 ----------------------------
5777 -- Init_Object_Size_Align --
5778 ----------------------------
5780 procedure Init_Object_Size_Align (Id : E) is
5782 Set_Uint12 (Id, Uint_0); -- Esize
5783 Set_Uint14 (Id, Uint_0); -- Alignment
5784 end Init_Object_Size_Align;
5790 procedure Init_Size (Id : E; V : Int) is
5792 pragma Assert (not Is_Object (Id));
5793 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
5794 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
5797 ---------------------
5798 -- Init_Size_Align --
5799 ---------------------
5801 procedure Init_Size_Align (Id : E) is
5803 pragma Assert (not Is_Object (Id));
5804 Set_Uint12 (Id, Uint_0); -- Esize
5805 Set_Uint13 (Id, Uint_0); -- RM_Size
5806 Set_Uint14 (Id, Uint_0); -- Alignment
5807 end Init_Size_Align;
5809 ----------------------------------------------
5810 -- Type Representation Attribute Predicates --
5811 ----------------------------------------------
5813 function Known_Alignment (E : Entity_Id) return B is
5815 return Uint14 (E) /= Uint_0
5816 and then Uint14 (E) /= No_Uint;
5817 end Known_Alignment;
5819 function Known_Component_Bit_Offset (E : Entity_Id) return B is
5821 return Uint11 (E) /= No_Uint;
5822 end Known_Component_Bit_Offset;
5824 function Known_Component_Size (E : Entity_Id) return B is
5826 return Uint22 (Base_Type (E)) /= Uint_0
5827 and then Uint22 (Base_Type (E)) /= No_Uint;
5828 end Known_Component_Size;
5830 function Known_Esize (E : Entity_Id) return B is
5832 return Uint12 (E) /= Uint_0
5833 and then Uint12 (E) /= No_Uint;
5836 function Known_Normalized_First_Bit (E : Entity_Id) return B is
5838 return Uint8 (E) /= No_Uint;
5839 end Known_Normalized_First_Bit;
5841 function Known_Normalized_Position (E : Entity_Id) return B is
5843 return Uint14 (E) /= No_Uint;
5844 end Known_Normalized_Position;
5846 function Known_Normalized_Position_Max (E : Entity_Id) return B is
5848 return Uint10 (E) /= No_Uint;
5849 end Known_Normalized_Position_Max;
5851 function Known_RM_Size (E : Entity_Id) return B is
5853 return Uint13 (E) /= No_Uint
5854 and then (Uint13 (E) /= Uint_0
5855 or else Is_Discrete_Type (E)
5856 or else Is_Fixed_Point_Type (E));
5859 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
5861 return Uint11 (E) /= No_Uint
5862 and then Uint11 (E) >= Uint_0;
5863 end Known_Static_Component_Bit_Offset;
5865 function Known_Static_Component_Size (E : Entity_Id) return B is
5867 return Uint22 (Base_Type (E)) > Uint_0;
5868 end Known_Static_Component_Size;
5870 function Known_Static_Esize (E : Entity_Id) return B is
5872 return Uint12 (E) > Uint_0
5873 and then not Is_Generic_Type (E);
5874 end Known_Static_Esize;
5876 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
5878 return Uint8 (E) /= No_Uint
5879 and then Uint8 (E) >= Uint_0;
5880 end Known_Static_Normalized_First_Bit;
5882 function Known_Static_Normalized_Position (E : Entity_Id) return B is
5884 return Uint14 (E) /= No_Uint
5885 and then Uint14 (E) >= Uint_0;
5886 end Known_Static_Normalized_Position;
5888 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
5890 return Uint10 (E) /= No_Uint
5891 and then Uint10 (E) >= Uint_0;
5892 end Known_Static_Normalized_Position_Max;
5894 function Known_Static_RM_Size (E : Entity_Id) return B is
5896 return (Uint13 (E) > Uint_0
5897 or else Is_Discrete_Type (E)
5898 or else Is_Fixed_Point_Type (E))
5899 and then not Is_Generic_Type (E);
5900 end Known_Static_RM_Size;
5902 function Unknown_Alignment (E : Entity_Id) return B is
5904 return Uint14 (E) = Uint_0
5905 or else Uint14 (E) = No_Uint;
5906 end Unknown_Alignment;
5908 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
5910 return Uint11 (E) = No_Uint;
5911 end Unknown_Component_Bit_Offset;
5913 function Unknown_Component_Size (E : Entity_Id) return B is
5915 return Uint22 (Base_Type (E)) = Uint_0
5917 Uint22 (Base_Type (E)) = No_Uint;
5918 end Unknown_Component_Size;
5920 function Unknown_Esize (E : Entity_Id) return B is
5922 return Uint12 (E) = No_Uint
5924 Uint12 (E) = Uint_0;
5927 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
5929 return Uint8 (E) = No_Uint;
5930 end Unknown_Normalized_First_Bit;
5932 function Unknown_Normalized_Position (E : Entity_Id) return B is
5934 return Uint14 (E) = No_Uint;
5935 end Unknown_Normalized_Position;
5937 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
5939 return Uint10 (E) = No_Uint;
5940 end Unknown_Normalized_Position_Max;
5942 function Unknown_RM_Size (E : Entity_Id) return B is
5944 return (Uint13 (E) = Uint_0
5945 and then not Is_Discrete_Type (E)
5946 and then not Is_Fixed_Point_Type (E))
5947 or else Uint13 (E) = No_Uint;
5948 end Unknown_RM_Size;
5950 --------------------
5951 -- Address_Clause --
5952 --------------------
5954 function Address_Clause (Id : E) return N is
5956 return Get_Attribute_Definition_Clause (Id, Attribute_Address);
5963 function Aft_Value (Id : E) return U is
5965 Delta_Val : Ureal := Delta_Value (Id);
5967 while Delta_Val < Ureal_Tenth loop
5968 Delta_Val := Delta_Val * Ureal_10;
5969 Result := Result + 1;
5972 return UI_From_Int (Result);
5975 ----------------------
5976 -- Alignment_Clause --
5977 ----------------------
5979 function Alignment_Clause (Id : E) return N is
5981 return Get_Attribute_Definition_Clause (Id, Attribute_Alignment);
5982 end Alignment_Clause;
5988 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
5990 if Last_Entity (V) = Empty then
5991 Set_First_Entity (Id => V, V => Id);
5993 Set_Next_Entity (Last_Entity (V), Id);
5996 Set_Next_Entity (Id, Empty);
5998 Set_Last_Entity (Id => V, V => Id);
6005 function Base_Type (Id : E) return E is
6007 if Is_Base_Type (Id) then
6010 pragma Assert (Is_Type (Id));
6015 -------------------------
6016 -- Component_Alignment --
6017 -------------------------
6019 -- Component Alignment is encoded using two flags, Flag128/129 as
6020 -- follows. Note that both flags False = Align_Default, so that the
6021 -- default initialization of flags to False initializes component
6022 -- alignment to the default value as required.
6024 -- Flag128 Flag129 Value
6025 -- ------- ------- -----
6026 -- False False Calign_Default
6027 -- False True Calign_Component_Size
6028 -- True False Calign_Component_Size_4
6029 -- True True Calign_Storage_Unit
6031 function Component_Alignment (Id : E) return C is
6032 BT : constant Node_Id := Base_Type (Id);
6035 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
6037 if Flag128 (BT) then
6038 if Flag129 (BT) then
6039 return Calign_Storage_Unit;
6041 return Calign_Component_Size_4;
6045 if Flag129 (BT) then
6046 return Calign_Component_Size;
6048 return Calign_Default;
6051 end Component_Alignment;
6053 ----------------------
6054 -- Declaration_Node --
6055 ----------------------
6057 function Declaration_Node (Id : E) return N is
6061 if Ekind (Id) = E_Incomplete_Type
6062 and then Present (Full_View (Id))
6064 P := Parent (Full_View (Id));
6070 if Nkind (P) /= N_Selected_Component
6071 and then Nkind (P) /= N_Expanded_Name
6073 not (Nkind (P) = N_Defining_Program_Unit_Name
6074 and then Is_Child_Unit (Id))
6081 end Declaration_Node;
6083 ---------------------
6084 -- Designated_Type --
6085 ---------------------
6087 function Designated_Type (Id : E) return E is
6091 Desig_Type := Directly_Designated_Type (Id);
6093 if Ekind (Desig_Type) = E_Incomplete_Type
6094 and then Present (Full_View (Desig_Type))
6096 return Full_View (Desig_Type);
6098 elsif Is_Class_Wide_Type (Desig_Type)
6099 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
6100 and then Present (Full_View (Etype (Desig_Type)))
6101 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
6103 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
6108 end Designated_Type;
6110 ----------------------
6111 -- Entry_Index_Type --
6112 ----------------------
6114 function Entry_Index_Type (Id : E) return N is
6116 pragma Assert (Ekind (Id) = E_Entry_Family);
6117 return Etype (Discrete_Subtype_Definition (Parent (Id)));
6118 end Entry_Index_Type;
6120 ---------------------
6121 -- First_Component --
6122 ---------------------
6124 function First_Component (Id : E) return E is
6129 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
6131 Comp_Id := First_Entity (Id);
6132 while Present (Comp_Id) loop
6133 exit when Ekind (Comp_Id) = E_Component;
6134 Comp_Id := Next_Entity (Comp_Id);
6138 end First_Component;
6140 -------------------------------------
6141 -- First_Component_Or_Discriminant --
6142 -------------------------------------
6144 function First_Component_Or_Discriminant (Id : E) return E is
6149 (Is_Record_Type (Id)
6150 or else Is_Incomplete_Or_Private_Type (Id)
6151 or else Has_Discriminants (Id));
6153 Comp_Id := First_Entity (Id);
6154 while Present (Comp_Id) loop
6155 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6156 Comp_Id := Next_Entity (Comp_Id);
6160 end First_Component_Or_Discriminant;
6166 function First_Formal (Id : E) return E is
6171 (Is_Overloadable (Id)
6172 or else Ekind_In (Id, E_Entry_Family,
6174 E_Subprogram_Type));
6176 if Ekind (Id) = E_Enumeration_Literal then
6180 Formal := First_Entity (Id);
6182 if Present (Formal) and then Is_Formal (Formal) then
6190 ------------------------------
6191 -- First_Formal_With_Extras --
6192 ------------------------------
6194 function First_Formal_With_Extras (Id : E) return E is
6199 (Is_Overloadable (Id)
6200 or else Ekind_In (Id, E_Entry_Family,
6202 E_Subprogram_Type));
6204 if Ekind (Id) = E_Enumeration_Literal then
6208 Formal := First_Entity (Id);
6210 if Present (Formal) and then Is_Formal (Formal) then
6213 return Extra_Formals (Id); -- Empty if no extra formals
6216 end First_Formal_With_Extras;
6218 -------------------------------------
6219 -- Get_Attribute_Definition_Clause --
6220 -------------------------------------
6222 function Get_Attribute_Definition_Clause
6224 Id : Attribute_Id) return Node_Id
6229 N := First_Rep_Item (E);
6230 while Present (N) loop
6231 if Nkind (N) = N_Attribute_Definition_Clause
6232 and then Get_Attribute_Id (Chars (N)) = Id
6241 end Get_Attribute_Definition_Clause;
6247 function Get_Full_View (T : Entity_Id) return Entity_Id is
6249 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
6250 return Full_View (T);
6252 elsif Is_Class_Wide_Type (T)
6253 and then Ekind (Root_Type (T)) = E_Incomplete_Type
6254 and then Present (Full_View (Root_Type (T)))
6256 return Class_Wide_Type (Full_View (Root_Type (T)));
6267 function Get_Pragma (E : Entity_Id; Id : Pragma_Id) return Node_Id is
6268 Is_CDG : constant Boolean :=
6269 Id = Pragma_Depends or else Id = Pragma_Global;
6270 Is_CTC : constant Boolean :=
6271 Id = Pragma_Contract_Cases or else Id = Pragma_Test_Case;
6272 Is_PPC : constant Boolean :=
6273 Id = Pragma_Precondition or else Id = Pragma_Postcondition;
6274 Delayed : constant Boolean := Is_CDG or Is_CTC or Is_PPC;
6279 -- Handle delayed pragmas that appear in N_Contract nodes. Those have to
6280 -- be extracted from their specialized list.
6283 Items := Contract (E);
6289 Item := Classifications (Items);
6292 Item := Contract_Test_Cases (Items);
6295 Item := Pre_Post_Conditions (Items);
6301 Item := First_Rep_Item (E);
6304 while Present (Item) loop
6305 if Nkind (Item) = N_Pragma
6306 and then Get_Pragma_Id (Pragma_Name (Item)) = Id
6310 -- All nodes in N_Contract are chained using Next_Pragma
6313 Item := Next_Pragma (Item);
6318 Next_Rep_Item (Item);
6325 --------------------------------------
6326 -- Get_Record_Representation_Clause --
6327 --------------------------------------
6329 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
6333 N := First_Rep_Item (E);
6334 while Present (N) loop
6335 if Nkind (N) = N_Record_Representation_Clause then
6343 end Get_Record_Representation_Clause;
6345 ------------------------
6346 -- Has_Attach_Handler --
6347 ------------------------
6349 function Has_Attach_Handler (Id : E) return B is
6353 pragma Assert (Is_Protected_Type (Id));
6355 Ritem := First_Rep_Item (Id);
6356 while Present (Ritem) loop
6357 if Nkind (Ritem) = N_Pragma
6358 and then Pragma_Name (Ritem) = Name_Attach_Handler
6362 Next_Rep_Item (Ritem);
6367 end Has_Attach_Handler;
6373 function Has_Entries (Id : E) return B is
6377 pragma Assert (Is_Concurrent_Type (Id));
6379 Ent := First_Entity (Id);
6380 while Present (Ent) loop
6381 if Is_Entry (Ent) then
6385 Ent := Next_Entity (Ent);
6391 ----------------------------
6392 -- Has_Foreign_Convention --
6393 ----------------------------
6395 function Has_Foreign_Convention (Id : E) return B is
6397 -- While regular Intrinsics such as the Standard operators fit in the
6398 -- "Ada" convention, those with an Interface_Name materialize GCC
6399 -- builtin imports for which Ada special treatments shouldn't apply.
6401 return Convention (Id) in Foreign_Convention
6402 or else (Convention (Id) = Convention_Intrinsic
6403 and then Present (Interface_Name (Id)));
6404 end Has_Foreign_Convention;
6406 ---------------------------
6407 -- Has_Interrupt_Handler --
6408 ---------------------------
6410 function Has_Interrupt_Handler (Id : E) return B is
6414 pragma Assert (Is_Protected_Type (Id));
6416 Ritem := First_Rep_Item (Id);
6417 while Present (Ritem) loop
6418 if Nkind (Ritem) = N_Pragma
6419 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6423 Next_Rep_Item (Ritem);
6428 end Has_Interrupt_Handler;
6430 --------------------
6431 -- Has_Unmodified --
6432 --------------------
6434 function Has_Unmodified (E : Entity_Id) return Boolean is
6436 if Has_Pragma_Unmodified (E) then
6438 elsif Warnings_Off (E) then
6439 Set_Warnings_Off_Used_Unmodified (E);
6446 ---------------------
6447 -- Has_Unreferenced --
6448 ---------------------
6450 function Has_Unreferenced (E : Entity_Id) return Boolean is
6452 if Has_Pragma_Unreferenced (E) then
6454 elsif Warnings_Off (E) then
6455 Set_Warnings_Off_Used_Unreferenced (E);
6460 end Has_Unreferenced;
6462 ----------------------
6463 -- Has_Warnings_Off --
6464 ----------------------
6466 function Has_Warnings_Off (E : Entity_Id) return Boolean is
6468 if Warnings_Off (E) then
6469 Set_Warnings_Off_Used (E);
6474 end Has_Warnings_Off;
6476 ------------------------------
6477 -- Implementation_Base_Type --
6478 ------------------------------
6480 function Implementation_Base_Type (Id : E) return E is
6485 Bastyp := Base_Type (Id);
6487 if Is_Incomplete_Or_Private_Type (Bastyp) then
6488 Imptyp := Underlying_Type (Bastyp);
6490 -- If we have an implementation type, then just return it,
6491 -- otherwise we return the Base_Type anyway. This can only
6492 -- happen in error situations and should avoid some error bombs.
6494 if Present (Imptyp) then
6495 return Base_Type (Imptyp);
6503 end Implementation_Base_Type;
6505 -------------------------
6506 -- Invariant_Procedure --
6507 -------------------------
6509 function Invariant_Procedure (Id : E) return E is
6513 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
6515 if No (Subprograms_For_Type (Id)) then
6519 S := Subprograms_For_Type (Id);
6520 while Present (S) loop
6521 if Is_Invariant_Procedure (S) then
6524 S := Subprograms_For_Type (S);
6530 end Invariant_Procedure;
6536 -- Global flag table allowing rapid computation of this function
6538 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
6539 (E_Enumeration_Subtype |
6541 E_Signed_Integer_Subtype |
6542 E_Modular_Integer_Subtype |
6543 E_Floating_Point_Subtype |
6544 E_Ordinary_Fixed_Point_Subtype |
6545 E_Decimal_Fixed_Point_Subtype |
6550 E_Record_Subtype_With_Private |
6551 E_Limited_Private_Subtype |
6553 E_Protected_Subtype |
6555 E_String_Literal_Subtype |
6556 E_Class_Wide_Subtype => False,
6559 function Is_Base_Type (Id : E) return Boolean is
6561 return Entity_Is_Base_Type (Ekind (Id));
6564 ---------------------
6565 -- Is_Boolean_Type --
6566 ---------------------
6568 function Is_Boolean_Type (Id : E) return B is
6570 return Root_Type (Id) = Standard_Boolean;
6571 end Is_Boolean_Type;
6573 ------------------------
6574 -- Is_Constant_Object --
6575 ------------------------
6577 function Is_Constant_Object (Id : E) return B is
6578 K : constant Entity_Kind := Ekind (Id);
6581 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
6582 end Is_Constant_Object;
6584 --------------------
6585 -- Is_Discriminal --
6586 --------------------
6588 function Is_Discriminal (Id : E) return B is
6590 return (Ekind_In (Id, E_Constant, E_In_Parameter)
6591 and then Present (Discriminal_Link (Id)));
6594 ----------------------
6595 -- Is_Dynamic_Scope --
6596 ----------------------
6598 function Is_Dynamic_Scope (Id : E) return B is
6601 Ekind (Id) = E_Block
6603 Ekind (Id) = E_Function
6605 Ekind (Id) = E_Procedure
6607 Ekind (Id) = E_Subprogram_Body
6609 Ekind (Id) = E_Task_Type
6611 (Ekind (Id) = E_Limited_Private_Type
6612 and then Present (Full_View (Id))
6613 and then Ekind (Full_View (Id)) = E_Task_Type)
6615 Ekind (Id) = E_Entry
6617 Ekind (Id) = E_Entry_Family
6619 Ekind (Id) = E_Return_Statement;
6620 end Is_Dynamic_Scope;
6622 --------------------
6623 -- Is_Entity_Name --
6624 --------------------
6626 function Is_Entity_Name (N : Node_Id) return Boolean is
6627 Kind : constant Node_Kind := Nkind (N);
6630 -- Identifiers, operator symbols, expanded names are entity names
6632 return Kind = N_Identifier
6633 or else Kind = N_Operator_Symbol
6634 or else Kind = N_Expanded_Name
6636 -- Attribute references are entity names if they refer to an entity.
6637 -- Note that we don't do this by testing for the presence of the
6638 -- Entity field in the N_Attribute_Reference node, since it may not
6639 -- have been set yet.
6641 or else (Kind = N_Attribute_Reference
6642 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
6645 -----------------------
6646 -- Is_External_State --
6647 -----------------------
6649 function Is_External_State (Id : E) return B is
6652 Ekind (Id) = E_Abstract_State and then Has_Option (Id, Name_External);
6653 end Is_External_State;
6659 function Is_Finalizer (Id : E) return B is
6661 return Ekind (Id) = E_Procedure and then Chars (Id) = Name_uFinalizer;
6664 ---------------------
6665 -- Is_Ghost_Entity --
6666 ---------------------
6668 function Is_Ghost_Entity (Id : E) return B is
6670 if Present (Id) and then Ekind (Id) = E_Variable then
6671 return Convention (Id) = Convention_Ghost;
6673 return Is_Ghost_Subprogram (Id);
6675 end Is_Ghost_Entity;
6677 -------------------------
6678 -- Is_Ghost_Subprogram --
6679 -------------------------
6681 function Is_Ghost_Subprogram (Id : E) return B is
6683 if Present (Id) and then Ekind_In (Id, E_Function, E_Procedure) then
6684 return Convention (Id) = Convention_Ghost;
6688 end Is_Ghost_Subprogram;
6690 -------------------------
6691 -- Is_Input_Only_State --
6692 -------------------------
6694 function Is_Input_Only_State (Id : E) return B is
6697 Ekind (Id) = E_Abstract_State
6698 and then Has_Option (Id, Name_Input_Only);
6699 end Is_Input_Only_State;
6705 function Is_Null_State (Id : E) return B is
6708 Ekind (Id) = E_Abstract_State and then Nkind (Parent (Id)) = N_Null;
6711 ---------------------
6712 -- Is_Output_State --
6713 ---------------------
6715 function Is_Output_Only_State (Id : E) return B is
6718 Ekind (Id) = E_Abstract_State
6719 and then Has_Option (Id, Name_Output_Only);
6720 end Is_Output_Only_State;
6722 -----------------------------------
6723 -- Is_Package_Or_Generic_Package --
6724 -----------------------------------
6726 function Is_Package_Or_Generic_Package (Id : E) return B is
6728 return Ekind_In (Id, E_Generic_Package, E_Package);
6729 end Is_Package_Or_Generic_Package;
6735 function Is_Prival (Id : E) return B is
6737 return (Ekind_In (Id, E_Constant, E_Variable)
6738 and then Present (Prival_Link (Id)));
6741 ----------------------------
6742 -- Is_Protected_Component --
6743 ----------------------------
6745 function Is_Protected_Component (Id : E) return B is
6747 return Ekind (Id) = E_Component and then Is_Protected_Type (Scope (Id));
6748 end Is_Protected_Component;
6750 ----------------------------
6751 -- Is_Protected_Interface --
6752 ----------------------------
6754 function Is_Protected_Interface (Id : E) return B is
6755 Typ : constant Entity_Id := Base_Type (Id);
6757 if not Is_Interface (Typ) then
6759 elsif Is_Class_Wide_Type (Typ) then
6760 return Is_Protected_Interface (Etype (Typ));
6762 return Protected_Present (Type_Definition (Parent (Typ)));
6764 end Is_Protected_Interface;
6766 ------------------------------
6767 -- Is_Protected_Record_Type --
6768 ------------------------------
6770 function Is_Protected_Record_Type (Id : E) return B is
6773 Is_Concurrent_Record_Type (Id)
6774 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
6775 end Is_Protected_Record_Type;
6777 --------------------------------
6778 -- Is_Standard_Character_Type --
6779 --------------------------------
6781 function Is_Standard_Character_Type (Id : E) return B is
6783 if Is_Type (Id) then
6785 R : constant Entity_Id := Root_Type (Id);
6788 R = Standard_Character
6790 R = Standard_Wide_Character
6792 R = Standard_Wide_Wide_Character;
6798 end Is_Standard_Character_Type;
6800 --------------------
6801 -- Is_String_Type --
6802 --------------------
6804 function Is_String_Type (Id : E) return B is
6806 return Ekind (Id) in String_Kind
6807 or else (Is_Array_Type (Id)
6808 and then Id /= Any_Composite
6809 and then Number_Dimensions (Id) = 1
6810 and then Is_Character_Type (Component_Type (Id)));
6813 -------------------------------
6814 -- Is_Synchronized_Interface --
6815 -------------------------------
6817 function Is_Synchronized_Interface (Id : E) return B is
6818 Typ : constant Entity_Id := Base_Type (Id);
6821 if not Is_Interface (Typ) then
6824 elsif Is_Class_Wide_Type (Typ) then
6825 return Is_Synchronized_Interface (Etype (Typ));
6828 return Protected_Present (Type_Definition (Parent (Typ)))
6829 or else Synchronized_Present (Type_Definition (Parent (Typ)))
6830 or else Task_Present (Type_Definition (Parent (Typ)));
6832 end Is_Synchronized_Interface;
6834 -----------------------
6835 -- Is_Task_Interface --
6836 -----------------------
6838 function Is_Task_Interface (Id : E) return B is
6839 Typ : constant Entity_Id := Base_Type (Id);
6841 if not Is_Interface (Typ) then
6843 elsif Is_Class_Wide_Type (Typ) then
6844 return Is_Task_Interface (Etype (Typ));
6846 return Task_Present (Type_Definition (Parent (Typ)));
6848 end Is_Task_Interface;
6850 -------------------------
6851 -- Is_Task_Record_Type --
6852 -------------------------
6854 function Is_Task_Record_Type (Id : E) return B is
6857 Is_Concurrent_Record_Type (Id)
6858 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
6859 end Is_Task_Record_Type;
6861 -----------------------
6862 -- Is_Volatile_State --
6863 -----------------------
6865 function Is_Volatile_State (Id : E) return B is
6868 Ekind (Id) = E_Abstract_State
6869 and then Has_Option (Id, Name_Volatile);
6870 end Is_Volatile_State;
6872 ------------------------
6873 -- Is_Wrapper_Package --
6874 ------------------------
6876 function Is_Wrapper_Package (Id : E) return B is
6878 return (Ekind (Id) = E_Package and then Present (Related_Instance (Id)));
6879 end Is_Wrapper_Package;
6885 function Last_Formal (Id : E) return E is
6890 (Is_Overloadable (Id)
6891 or else Ekind_In (Id, E_Entry_Family,
6893 E_Subprogram_Type));
6895 if Ekind (Id) = E_Enumeration_Literal then
6899 Formal := First_Formal (Id);
6901 if Present (Formal) then
6902 while Present (Next_Formal (Formal)) loop
6903 Formal := Next_Formal (Formal);
6911 function Model_Emin_Value (Id : E) return Uint is
6913 return Machine_Emin_Value (Id);
6914 end Model_Emin_Value;
6916 -------------------------
6917 -- Model_Epsilon_Value --
6918 -------------------------
6920 function Model_Epsilon_Value (Id : E) return Ureal is
6921 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6923 return Radix ** (1 - Model_Mantissa_Value (Id));
6924 end Model_Epsilon_Value;
6926 --------------------------
6927 -- Model_Mantissa_Value --
6928 --------------------------
6930 function Model_Mantissa_Value (Id : E) return Uint is
6932 return Machine_Mantissa_Value (Id);
6933 end Model_Mantissa_Value;
6935 -----------------------
6936 -- Model_Small_Value --
6937 -----------------------
6939 function Model_Small_Value (Id : E) return Ureal is
6940 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6942 return Radix ** (Model_Emin_Value (Id) - 1);
6943 end Model_Small_Value;
6945 ------------------------
6946 -- Machine_Emax_Value --
6947 ------------------------
6949 function Machine_Emax_Value (Id : E) return Uint is
6950 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
6953 case Float_Rep (Id) is
6956 when 1 .. 6 => return Uint_128;
6957 when 7 .. 15 => return 2**10;
6958 when 16 .. 33 => return 2**14;
6959 when others => return No_Uint;
6964 when 1 .. 9 => return 2**7 - 1;
6965 when 10 .. 15 => return 2**10 - 1;
6966 when others => return No_Uint;
6970 return Uint_2 ** Uint_7 - Uint_1;
6972 end Machine_Emax_Value;
6974 ------------------------
6975 -- Machine_Emin_Value --
6976 ------------------------
6978 function Machine_Emin_Value (Id : E) return Uint is
6980 case Float_Rep (Id) is
6981 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
6982 when VAX_Native => return -Machine_Emax_Value (Id);
6983 when AAMP => return -Machine_Emax_Value (Id);
6985 end Machine_Emin_Value;
6987 ----------------------------
6988 -- Machine_Mantissa_Value --
6989 ----------------------------
6991 function Machine_Mantissa_Value (Id : E) return Uint is
6992 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
6995 case Float_Rep (Id) is
6998 when 1 .. 6 => return Uint_24;
6999 when 7 .. 15 => return UI_From_Int (53);
7000 when 16 .. 18 => return Uint_64;
7001 when 19 .. 33 => return UI_From_Int (113);
7002 when others => return No_Uint;
7007 when 1 .. 6 => return Uint_24;
7008 when 7 .. 9 => return UI_From_Int (56);
7009 when 10 .. 15 => return UI_From_Int (53);
7010 when others => return No_Uint;
7015 when 1 .. 6 => return Uint_24;
7016 when 7 .. 9 => return UI_From_Int (40);
7017 when others => return No_Uint;
7020 end Machine_Mantissa_Value;
7022 -------------------------
7023 -- Machine_Radix_Value --
7024 -------------------------
7026 function Machine_Radix_Value (Id : E) return U is
7028 case Float_Rep (Id) is
7029 when IEEE_Binary | VAX_Native | AAMP =>
7032 end Machine_Radix_Value;
7034 --------------------
7035 -- Next_Component --
7036 --------------------
7038 function Next_Component (Id : E) return E is
7042 Comp_Id := Next_Entity (Id);
7043 while Present (Comp_Id) loop
7044 exit when Ekind (Comp_Id) = E_Component;
7045 Comp_Id := Next_Entity (Comp_Id);
7051 ------------------------------------
7052 -- Next_Component_Or_Discriminant --
7053 ------------------------------------
7055 function Next_Component_Or_Discriminant (Id : E) return E is
7059 Comp_Id := Next_Entity (Id);
7060 while Present (Comp_Id) loop
7061 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
7062 Comp_Id := Next_Entity (Comp_Id);
7066 end Next_Component_Or_Discriminant;
7068 -----------------------
7069 -- Next_Discriminant --
7070 -----------------------
7072 -- This function actually implements both Next_Discriminant and
7073 -- Next_Stored_Discriminant by making sure that the Discriminant
7074 -- returned is of the same variety as Id.
7076 function Next_Discriminant (Id : E) return E is
7078 -- Derived Tagged types with private extensions look like this...
7080 -- E_Discriminant d1
7081 -- E_Discriminant d2
7083 -- E_Discriminant d1
7084 -- E_Discriminant d2
7087 -- so it is critical not to go past the leading discriminants
7092 pragma Assert (Ekind (Id) = E_Discriminant);
7095 D := Next_Entity (D);
7097 or else (Ekind (D) /= E_Discriminant
7098 and then not Is_Itype (D))
7103 exit when Ekind (D) = E_Discriminant
7104 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
7108 end Next_Discriminant;
7114 function Next_Formal (Id : E) return E is
7118 -- Follow the chain of declared entities as long as the kind of the
7119 -- entity corresponds to a formal parameter. Skip internal entities
7120 -- that may have been created for implicit subtypes, in the process
7121 -- of analyzing default expressions.
7125 P := Next_Entity (P);
7127 if No (P) or else Is_Formal (P) then
7129 elsif not Is_Internal (P) then
7135 -----------------------------
7136 -- Next_Formal_With_Extras --
7137 -----------------------------
7139 function Next_Formal_With_Extras (Id : E) return E is
7141 if Present (Extra_Formal (Id)) then
7142 return Extra_Formal (Id);
7144 return Next_Formal (Id);
7146 end Next_Formal_With_Extras;
7152 function Next_Index (Id : Node_Id) return Node_Id is
7161 function Next_Literal (Id : E) return E is
7163 pragma Assert (Nkind (Id) in N_Entity);
7167 ------------------------------
7168 -- Next_Stored_Discriminant --
7169 ------------------------------
7171 function Next_Stored_Discriminant (Id : E) return E is
7173 -- See comment in Next_Discriminant
7175 return Next_Discriminant (Id);
7176 end Next_Stored_Discriminant;
7178 -----------------------
7179 -- Number_Dimensions --
7180 -----------------------
7182 function Number_Dimensions (Id : E) return Pos is
7187 if Ekind (Id) in String_Kind then
7192 T := First_Index (Id);
7193 while Present (T) loop
7200 end Number_Dimensions;
7202 --------------------
7203 -- Number_Entries --
7204 --------------------
7206 function Number_Entries (Id : E) return Nat is
7211 pragma Assert (Is_Concurrent_Type (Id));
7214 Ent := First_Entity (Id);
7215 while Present (Ent) loop
7216 if Is_Entry (Ent) then
7220 Ent := Next_Entity (Ent);
7226 --------------------
7227 -- Number_Formals --
7228 --------------------
7230 function Number_Formals (Id : E) return Pos is
7236 Formal := First_Formal (Id);
7237 while Present (Formal) loop
7239 Formal := Next_Formal (Formal);
7245 --------------------
7246 -- Parameter_Mode --
7247 --------------------
7249 function Parameter_Mode (Id : E) return Formal_Kind is
7254 ------------------------
7255 -- Predicate_Function --
7256 ------------------------
7258 function Predicate_Function (Id : E) return E is
7263 pragma Assert (Is_Type (Id));
7265 -- If type is private and has a completion, predicate may be defined
7266 -- on the full view.
7268 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7269 T := Full_View (Id);
7274 if No (Subprograms_For_Type (T)) then
7278 S := Subprograms_For_Type (T);
7279 while Present (S) loop
7280 if Is_Predicate_Function (S) then
7283 S := Subprograms_For_Type (S);
7289 end Predicate_Function;
7291 --------------------------
7292 -- Predicate_Function_M --
7293 --------------------------
7295 function Predicate_Function_M (Id : E) return E is
7300 pragma Assert (Is_Type (Id));
7302 -- If type is private and has a completion, predicate may be defined
7303 -- on the full view.
7305 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7306 T := Full_View (Id);
7311 if No (Subprograms_For_Type (T)) then
7315 S := Subprograms_For_Type (T);
7316 while Present (S) loop
7317 if Is_Predicate_Function_M (S) then
7320 S := Subprograms_For_Type (S);
7326 end Predicate_Function_M;
7328 -------------------------
7329 -- Present_In_Rep_Item --
7330 -------------------------
7332 function Present_In_Rep_Item (E : Entity_Id; N : Node_Id) return Boolean is
7336 Ritem := First_Rep_Item (E);
7338 while Present (Ritem) loop
7343 Next_Rep_Item (Ritem);
7347 end Present_In_Rep_Item;
7349 --------------------------
7350 -- Primitive_Operations --
7351 --------------------------
7353 function Primitive_Operations (Id : E) return L is
7355 if Is_Concurrent_Type (Id) then
7356 if Present (Corresponding_Record_Type (Id)) then
7357 return Direct_Primitive_Operations
7358 (Corresponding_Record_Type (Id));
7360 -- If expansion is disabled the corresponding record type is absent,
7361 -- but if the type has ancestors it may have primitive operations.
7363 elsif Is_Tagged_Type (Id) then
7364 return Direct_Primitive_Operations (Id);
7370 return Direct_Primitive_Operations (Id);
7372 end Primitive_Operations;
7374 ---------------------
7375 -- Record_Rep_Item --
7376 ---------------------
7378 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
7380 Set_Next_Rep_Item (N, First_Rep_Item (E));
7381 Set_First_Rep_Item (E, N);
7382 end Record_Rep_Item;
7388 function Root_Type (Id : E) return E is
7392 pragma Assert (Nkind (Id) in N_Entity);
7394 T := Base_Type (Id);
7396 if Ekind (T) = E_Class_Wide_Type then
7408 -- Following test catches some error cases resulting from
7411 elsif No (Etyp) then
7412 Check_Error_Detected;
7415 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
7418 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
7424 -- Return if there is a circularity in the inheritance chain. This
7425 -- happens in some error situations and we do not want to get
7426 -- stuck in this loop.
7428 if T = Base_Type (Id) then
7435 ---------------------
7436 -- Safe_Emax_Value --
7437 ---------------------
7439 function Safe_Emax_Value (Id : E) return Uint is
7441 return Machine_Emax_Value (Id);
7442 end Safe_Emax_Value;
7444 ----------------------
7445 -- Safe_First_Value --
7446 ----------------------
7448 function Safe_First_Value (Id : E) return Ureal is
7450 return -Safe_Last_Value (Id);
7451 end Safe_First_Value;
7453 ---------------------
7454 -- Safe_Last_Value --
7455 ---------------------
7457 function Safe_Last_Value (Id : E) return Ureal is
7458 Radix : constant Uint := Machine_Radix_Value (Id);
7459 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
7460 Emax : constant Uint := Safe_Emax_Value (Id);
7461 Significand : constant Uint := Radix ** Mantissa - 1;
7462 Exponent : constant Uint := Emax - Mantissa;
7468 (Num => Significand * 2 ** (Exponent mod 4),
7469 Den => -Exponent / 4,
7475 (Num => Significand,
7479 end Safe_Last_Value;
7485 function Scope_Depth (Id : E) return Uint is
7490 while Is_Record_Type (Scop) loop
7491 Scop := Scope (Scop);
7494 return Scope_Depth_Value (Scop);
7497 ---------------------
7498 -- Scope_Depth_Set --
7499 ---------------------
7501 function Scope_Depth_Set (Id : E) return B is
7503 return not Is_Record_Type (Id)
7504 and then Field22 (Id) /= Union_Id (Empty);
7505 end Scope_Depth_Set;
7507 -----------------------------
7508 -- Set_Component_Alignment --
7509 -----------------------------
7511 -- Component Alignment is encoded using two flags, Flag128/129 as
7512 -- follows. Note that both flags False = Align_Default, so that the
7513 -- default initialization of flags to False initializes component
7514 -- alignment to the default value as required.
7516 -- Flag128 Flag129 Value
7517 -- ------- ------- -----
7518 -- False False Calign_Default
7519 -- False True Calign_Component_Size
7520 -- True False Calign_Component_Size_4
7521 -- True True Calign_Storage_Unit
7523 procedure Set_Component_Alignment (Id : E; V : C) is
7525 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
7526 and then Is_Base_Type (Id));
7529 when Calign_Default =>
7530 Set_Flag128 (Id, False);
7531 Set_Flag129 (Id, False);
7533 when Calign_Component_Size =>
7534 Set_Flag128 (Id, False);
7535 Set_Flag129 (Id, True);
7537 when Calign_Component_Size_4 =>
7538 Set_Flag128 (Id, True);
7539 Set_Flag129 (Id, False);
7541 when Calign_Storage_Unit =>
7542 Set_Flag128 (Id, True);
7543 Set_Flag129 (Id, True);
7545 end Set_Component_Alignment;
7547 -----------------------------
7548 -- Set_Invariant_Procedure --
7549 -----------------------------
7551 procedure Set_Invariant_Procedure (Id : E; V : E) is
7555 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7557 S := Subprograms_For_Type (Id);
7558 Set_Subprograms_For_Type (Id, V);
7559 Set_Subprograms_For_Type (V, S);
7561 -- Check for duplicate entry
7563 while Present (S) loop
7564 if Is_Invariant_Procedure (S) then
7565 raise Program_Error;
7567 S := Subprograms_For_Type (S);
7570 end Set_Invariant_Procedure;
7572 ----------------------------
7573 -- Set_Predicate_Function --
7574 ----------------------------
7576 procedure Set_Predicate_Function (Id : E; V : E) is
7580 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7582 S := Subprograms_For_Type (Id);
7583 Set_Subprograms_For_Type (Id, V);
7584 Set_Subprograms_For_Type (V, S);
7586 while Present (S) loop
7587 if Is_Predicate_Function (S) then
7588 raise Program_Error;
7590 S := Subprograms_For_Type (S);
7593 end Set_Predicate_Function;
7595 ------------------------------
7596 -- Set_Predicate_Function_M --
7597 ------------------------------
7599 procedure Set_Predicate_Function_M (Id : E; V : E) is
7603 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7605 S := Subprograms_For_Type (Id);
7606 Set_Subprograms_For_Type (Id, V);
7607 Set_Subprograms_For_Type (V, S);
7609 -- Check for duplicates
7611 while Present (S) loop
7612 if Is_Predicate_Function_M (S) then
7613 raise Program_Error;
7615 S := Subprograms_For_Type (S);
7618 end Set_Predicate_Function_M;
7624 function Size_Clause (Id : E) return N is
7626 return Get_Attribute_Definition_Clause (Id, Attribute_Size);
7629 ------------------------
7630 -- Stream_Size_Clause --
7631 ------------------------
7633 function Stream_Size_Clause (Id : E) return N is
7635 return Get_Attribute_Definition_Clause (Id, Attribute_Stream_Size);
7636 end Stream_Size_Clause;
7642 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
7648 Kind := E_Access_Subtype;
7652 Kind := E_Array_Subtype;
7654 when E_Class_Wide_Type |
7655 E_Class_Wide_Subtype =>
7656 Kind := E_Class_Wide_Subtype;
7658 when E_Decimal_Fixed_Point_Type |
7659 E_Decimal_Fixed_Point_Subtype =>
7660 Kind := E_Decimal_Fixed_Point_Subtype;
7662 when E_Ordinary_Fixed_Point_Type |
7663 E_Ordinary_Fixed_Point_Subtype =>
7664 Kind := E_Ordinary_Fixed_Point_Subtype;
7666 when E_Private_Type |
7667 E_Private_Subtype =>
7668 Kind := E_Private_Subtype;
7670 when E_Limited_Private_Type |
7671 E_Limited_Private_Subtype =>
7672 Kind := E_Limited_Private_Subtype;
7674 when E_Record_Type_With_Private |
7675 E_Record_Subtype_With_Private =>
7676 Kind := E_Record_Subtype_With_Private;
7678 when E_Record_Type |
7680 Kind := E_Record_Subtype;
7682 when E_String_Type |
7684 Kind := E_String_Subtype;
7686 when Enumeration_Kind =>
7687 Kind := E_Enumeration_Subtype;
7690 Kind := E_Floating_Point_Subtype;
7692 when Signed_Integer_Kind =>
7693 Kind := E_Signed_Integer_Subtype;
7695 when Modular_Integer_Kind =>
7696 Kind := E_Modular_Integer_Subtype;
7698 when Protected_Kind =>
7699 Kind := E_Protected_Subtype;
7702 Kind := E_Task_Subtype;
7706 raise Program_Error;
7712 ---------------------
7713 -- Type_High_Bound --
7714 ---------------------
7716 function Type_High_Bound (Id : E) return Node_Id is
7717 Rng : constant Node_Id := Scalar_Range (Id);
7719 if Nkind (Rng) = N_Subtype_Indication then
7720 return High_Bound (Range_Expression (Constraint (Rng)));
7722 return High_Bound (Rng);
7724 end Type_High_Bound;
7726 --------------------
7727 -- Type_Low_Bound --
7728 --------------------
7730 function Type_Low_Bound (Id : E) return Node_Id is
7731 Rng : constant Node_Id := Scalar_Range (Id);
7733 if Nkind (Rng) = N_Subtype_Indication then
7734 return Low_Bound (Range_Expression (Constraint (Rng)));
7736 return Low_Bound (Rng);
7740 ---------------------
7741 -- Underlying_Type --
7742 ---------------------
7744 function Underlying_Type (Id : E) return E is
7746 -- For record_with_private the underlying type is always the direct
7747 -- full view. Never try to take the full view of the parent it
7748 -- doesn't make sense.
7750 if Ekind (Id) = E_Record_Type_With_Private then
7751 return Full_View (Id);
7753 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
7755 -- If we have an incomplete or private type with a full view,
7756 -- then we return the Underlying_Type of this full view
7758 if Present (Full_View (Id)) then
7759 if Id = Full_View (Id) then
7761 -- Previous error in declaration
7766 return Underlying_Type (Full_View (Id));
7769 -- If we have an incomplete entity that comes from the limited
7770 -- view then we return the Underlying_Type of its non-limited
7773 elsif From_With_Type (Id)
7774 and then Present (Non_Limited_View (Id))
7776 return Underlying_Type (Non_Limited_View (Id));
7778 -- Otherwise check for the case where we have a derived type or
7779 -- subtype, and if so get the Underlying_Type of the parent type.
7781 elsif Etype (Id) /= Id then
7782 return Underlying_Type (Etype (Id));
7784 -- Otherwise we have an incomplete or private type that has
7785 -- no full view, which means that we have not encountered the
7786 -- completion, so return Empty to indicate the underlying type
7787 -- is not yet known.
7793 -- For non-incomplete, non-private types, return the type itself
7794 -- Also for entities that are not types at all return the entity
7800 end Underlying_Type;
7806 function Vax_Float (Id : E) return B is
7808 return Is_Floating_Point_Type (Id) and then Float_Rep (Id) = VAX_Native;
7811 ------------------------
7812 -- Write_Entity_Flags --
7813 ------------------------
7815 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
7817 procedure W (Flag_Name : String; Flag : Boolean);
7818 -- Write out given flag if it is set
7824 procedure W (Flag_Name : String; Flag : Boolean) is
7828 Write_Str (Flag_Name);
7829 Write_Str (" = True");
7834 -- Start of processing for Write_Entity_Flags
7837 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
7838 and then Is_Base_Type (Id)
7841 Write_Str ("Component_Alignment = ");
7843 case Component_Alignment (Id) is
7844 when Calign_Default =>
7845 Write_Str ("Calign_Default");
7847 when Calign_Component_Size =>
7848 Write_Str ("Calign_Component_Size");
7850 when Calign_Component_Size_4 =>
7851 Write_Str ("Calign_Component_Size_4");
7853 when Calign_Storage_Unit =>
7854 Write_Str ("Calign_Storage_Unit");
7860 W ("Address_Taken", Flag104 (Id));
7861 W ("Body_Needed_For_SAL", Flag40 (Id));
7862 W ("C_Pass_By_Copy", Flag125 (Id));
7863 W ("Can_Never_Be_Null", Flag38 (Id));
7864 W ("Checks_May_Be_Suppressed", Flag31 (Id));
7865 W ("Debug_Info_Off", Flag166 (Id));
7866 W ("Default_Expressions_Processed", Flag108 (Id));
7867 W ("Delay_Cleanups", Flag114 (Id));
7868 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
7869 W ("Depends_On_Private", Flag14 (Id));
7870 W ("Discard_Names", Flag88 (Id));
7871 W ("Elaboration_Entity_Required", Flag174 (Id));
7872 W ("Elaborate_Body_Desirable", Flag210 (Id));
7873 W ("Entry_Accepted", Flag152 (Id));
7874 W ("Can_Use_Internal_Rep", Flag229 (Id));
7875 W ("Finalize_Storage_Only", Flag158 (Id));
7876 W ("From_With_Type", Flag159 (Id));
7877 W ("Has_Aliased_Components", Flag135 (Id));
7878 W ("Has_Alignment_Clause", Flag46 (Id));
7879 W ("Has_All_Calls_Remote", Flag79 (Id));
7880 W ("Has_Anonymous_Master", Flag253 (Id));
7881 W ("Has_Atomic_Components", Flag86 (Id));
7882 W ("Has_Biased_Representation", Flag139 (Id));
7883 W ("Has_Completion", Flag26 (Id));
7884 W ("Has_Completion_In_Body", Flag71 (Id));
7885 W ("Has_Complex_Representation", Flag140 (Id));
7886 W ("Has_Component_Size_Clause", Flag68 (Id));
7887 W ("Has_Contiguous_Rep", Flag181 (Id));
7888 W ("Has_Controlled_Component", Flag43 (Id));
7889 W ("Has_Controlling_Result", Flag98 (Id));
7890 W ("Has_Convention_Pragma", Flag119 (Id));
7891 W ("Has_Default_Aspect", Flag39 (Id));
7892 W ("Has_Delayed_Aspects", Flag200 (Id));
7893 W ("Has_Delayed_Freeze", Flag18 (Id));
7894 W ("Has_Delayed_Rep_Aspects", Flag261 (Id));
7895 W ("Has_Discriminants", Flag5 (Id));
7896 W ("Has_Dispatch_Table", Flag220 (Id));
7897 W ("Has_Dynamic_Predicate_Aspect", Flag258 (Id));
7898 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
7899 W ("Has_Exit", Flag47 (Id));
7900 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
7901 W ("Has_Forward_Instantiation", Flag175 (Id));
7902 W ("Has_Fully_Qualified_Name", Flag173 (Id));
7903 W ("Has_Gigi_Rep_Item", Flag82 (Id));
7904 W ("Has_Homonym", Flag56 (Id));
7905 W ("Has_Implicit_Dereference", Flag251 (Id));
7906 W ("Has_Inheritable_Invariants", Flag248 (Id));
7907 W ("Has_Initial_Value", Flag219 (Id));
7908 W ("Has_Invariants", Flag232 (Id));
7909 W ("Has_Loop_Entry_Attributes", Flag260 (Id));
7910 W ("Has_Machine_Radix_Clause", Flag83 (Id));
7911 W ("Has_Master_Entity", Flag21 (Id));
7912 W ("Has_Missing_Return", Flag142 (Id));
7913 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
7914 W ("Has_Non_Standard_Rep", Flag75 (Id));
7915 W ("Has_Object_Size_Clause", Flag172 (Id));
7916 W ("Has_Per_Object_Constraint", Flag154 (Id));
7917 W ("Has_Postconditions", Flag240 (Id));
7918 W ("Has_Pragma_Controlled", Flag27 (Id));
7919 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
7920 W ("Has_Pragma_Inline", Flag157 (Id));
7921 W ("Has_Pragma_Inline_Always", Flag230 (Id));
7922 W ("Has_Pragma_No_Inline", Flag201 (Id));
7923 W ("Has_Pragma_Ordered", Flag198 (Id));
7924 W ("Has_Pragma_Pack", Flag121 (Id));
7925 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
7926 W ("Has_Pragma_Pure", Flag203 (Id));
7927 W ("Has_Pragma_Pure_Function", Flag179 (Id));
7928 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
7929 W ("Has_Pragma_Unmodified", Flag233 (Id));
7930 W ("Has_Pragma_Unreferenced", Flag180 (Id));
7931 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
7932 W ("Has_Predicates", Flag250 (Id));
7933 W ("Has_Primitive_Operations", Flag120 (Id));
7934 W ("Has_Private_Ancestor", Flag151 (Id));
7935 W ("Has_Private_Declaration", Flag155 (Id));
7936 W ("Has_Qualified_Name", Flag161 (Id));
7937 W ("Has_RACW", Flag214 (Id));
7938 W ("Has_Record_Rep_Clause", Flag65 (Id));
7939 W ("Has_Recursive_Call", Flag143 (Id));
7940 W ("Has_Size_Clause", Flag29 (Id));
7941 W ("Has_Small_Clause", Flag67 (Id));
7942 W ("Has_Specified_Layout", Flag100 (Id));
7943 W ("Has_Specified_Stream_Input", Flag190 (Id));
7944 W ("Has_Specified_Stream_Output", Flag191 (Id));
7945 W ("Has_Specified_Stream_Read", Flag192 (Id));
7946 W ("Has_Specified_Stream_Write", Flag193 (Id));
7947 W ("Has_Static_Discriminants", Flag211 (Id));
7948 W ("Has_Static_Predicate_Aspect", Flag259 (Id));
7949 W ("Has_Storage_Size_Clause", Flag23 (Id));
7950 W ("Has_Stream_Size_Clause", Flag184 (Id));
7951 W ("Has_Task", Flag30 (Id));
7952 W ("Has_Thunks", Flag228 (Id));
7953 W ("Has_Unchecked_Union", Flag123 (Id));
7954 W ("Has_Unknown_Discriminants", Flag72 (Id));
7955 W ("Has_Up_Level_Access", Flag215 (Id));
7956 W ("Has_Volatile_Components", Flag87 (Id));
7957 W ("Has_Xref_Entry", Flag182 (Id));
7958 W ("In_Package_Body", Flag48 (Id));
7959 W ("In_Private_Part", Flag45 (Id));
7960 W ("In_Use", Flag8 (Id));
7961 W ("Is_AST_Entry", Flag132 (Id));
7962 W ("Is_Abstract_Subprogram", Flag19 (Id));
7963 W ("Is_Abstract_Type", Flag146 (Id));
7964 W ("Is_Local_Anonymous_Access", Flag194 (Id));
7965 W ("Is_Access_Constant", Flag69 (Id));
7966 W ("Is_Ada_2005_Only", Flag185 (Id));
7967 W ("Is_Ada_2012_Only", Flag199 (Id));
7968 W ("Is_Aliased", Flag15 (Id));
7969 W ("Is_Asynchronous", Flag81 (Id));
7970 W ("Is_Atomic", Flag85 (Id));
7971 W ("Is_Bit_Packed_Array", Flag122 (Id));
7972 W ("Is_CPP_Class", Flag74 (Id));
7973 W ("Is_Called", Flag102 (Id));
7974 W ("Is_Character_Type", Flag63 (Id));
7975 W ("Is_Child_Unit", Flag73 (Id));
7976 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
7977 W ("Is_Compilation_Unit", Flag149 (Id));
7978 W ("Is_Completely_Hidden", Flag103 (Id));
7979 W ("Is_Concurrent_Record_Type", Flag20 (Id));
7980 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
7981 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
7982 W ("Is_Constrained", Flag12 (Id));
7983 W ("Is_Constructor", Flag76 (Id));
7984 W ("Is_Controlled", Flag42 (Id));
7985 W ("Is_Controlling_Formal", Flag97 (Id));
7986 W ("Is_Descendent_Of_Address", Flag223 (Id));
7987 W ("Is_Discrim_SO_Function", Flag176 (Id));
7988 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
7989 W ("Is_Dispatching_Operation", Flag6 (Id));
7990 W ("Is_Eliminated", Flag124 (Id));
7991 W ("Is_Entry_Formal", Flag52 (Id));
7992 W ("Is_Exported", Flag99 (Id));
7993 W ("Is_First_Subtype", Flag70 (Id));
7994 W ("Is_For_Access_Subtype", Flag118 (Id));
7995 W ("Is_Formal_Subprogram", Flag111 (Id));
7996 W ("Is_Frozen", Flag4 (Id));
7997 W ("Is_Generic_Actual_Type", Flag94 (Id));
7998 W ("Is_Generic_Instance", Flag130 (Id));
7999 W ("Is_Generic_Type", Flag13 (Id));
8000 W ("Is_Hidden", Flag57 (Id));
8001 W ("Is_Hidden_Open_Scope", Flag171 (Id));
8002 W ("Is_Immediately_Visible", Flag7 (Id));
8003 W ("Is_Implementation_Defined", Flag254 (Id));
8004 W ("Is_Imported", Flag24 (Id));
8005 W ("Is_Inlined", Flag11 (Id));
8006 W ("Is_Instantiated", Flag126 (Id));
8007 W ("Is_Interface", Flag186 (Id));
8008 W ("Is_Internal", Flag17 (Id));
8009 W ("Is_Interrupt_Handler", Flag89 (Id));
8010 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
8011 W ("Is_Invariant_Procedure", Flag257 (Id));
8012 W ("Is_Itype", Flag91 (Id));
8013 W ("Is_Known_Non_Null", Flag37 (Id));
8014 W ("Is_Known_Null", Flag204 (Id));
8015 W ("Is_Known_Valid", Flag170 (Id));
8016 W ("Is_Limited_Composite", Flag106 (Id));
8017 W ("Is_Limited_Interface", Flag197 (Id));
8018 W ("Is_Limited_Record", Flag25 (Id));
8019 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
8020 W ("Is_Non_Static_Subtype", Flag109 (Id));
8021 W ("Is_Null_Init_Proc", Flag178 (Id));
8022 W ("Is_Obsolescent", Flag153 (Id));
8023 W ("Is_Only_Out_Parameter", Flag226 (Id));
8024 W ("Is_Optional_Parameter", Flag134 (Id));
8025 W ("Is_Package_Body_Entity", Flag160 (Id));
8026 W ("Is_Packed", Flag51 (Id));
8027 W ("Is_Packed_Array_Type", Flag138 (Id));
8028 W ("Is_Potentially_Use_Visible", Flag9 (Id));
8029 W ("Is_Predicate_Function", Flag255 (Id));
8030 W ("Is_Predicate_Function_M", Flag256 (Id));
8031 W ("Is_Preelaborated", Flag59 (Id));
8032 W ("Is_Primitive", Flag218 (Id));
8033 W ("Is_Primitive_Wrapper", Flag195 (Id));
8034 W ("Is_Private_Composite", Flag107 (Id));
8035 W ("Is_Private_Descendant", Flag53 (Id));
8036 W ("Is_Private_Primitive", Flag245 (Id));
8037 W ("Is_Processed_Transient", Flag252 (Id));
8038 W ("Is_Public", Flag10 (Id));
8039 W ("Is_Pure", Flag44 (Id));
8040 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
8041 W ("Is_RACW_Stub_Type", Flag244 (Id));
8042 W ("Is_Raised", Flag224 (Id));
8043 W ("Is_Remote_Call_Interface", Flag62 (Id));
8044 W ("Is_Remote_Types", Flag61 (Id));
8045 W ("Is_Renaming_Of_Object", Flag112 (Id));
8046 W ("Is_Return_Object", Flag209 (Id));
8047 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
8048 W ("Is_Shared_Passive", Flag60 (Id));
8049 W ("Is_Statically_Allocated", Flag28 (Id));
8050 W ("Is_Tag", Flag78 (Id));
8051 W ("Is_Tagged_Type", Flag55 (Id));
8052 W ("Is_Thunk", Flag225 (Id));
8053 W ("Is_Trivial_Subprogram", Flag235 (Id));
8054 W ("Is_True_Constant", Flag163 (Id));
8055 W ("Is_Unchecked_Union", Flag117 (Id));
8056 W ("Is_Underlying_Record_View", Flag246 (Id));
8057 W ("Is_Unsigned_Type", Flag144 (Id));
8058 W ("Is_VMS_Exception", Flag133 (Id));
8059 W ("Is_Valued_Procedure", Flag127 (Id));
8060 W ("Is_Visible_Formal", Flag206 (Id));
8061 W ("Is_Visible_Lib_Unit", Flag116 (Id));
8062 W ("Is_Volatile", Flag16 (Id));
8063 W ("Itype_Printed", Flag202 (Id));
8064 W ("Kill_Elaboration_Checks", Flag32 (Id));
8065 W ("Kill_Range_Checks", Flag33 (Id));
8066 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
8067 W ("Low_Bound_Tested", Flag205 (Id));
8068 W ("Machine_Radix_10", Flag84 (Id));
8069 W ("Materialize_Entity", Flag168 (Id));
8070 W ("May_Inherit_Delayed_Rep_Aspects", Flag262 (Id));
8071 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
8072 W ("Must_Have_Preelab_Init", Flag208 (Id));
8073 W ("Needs_Debug_Info", Flag147 (Id));
8074 W ("Needs_No_Actuals", Flag22 (Id));
8075 W ("Never_Set_In_Source", Flag115 (Id));
8076 W ("No_Pool_Assigned", Flag131 (Id));
8077 W ("No_Return", Flag113 (Id));
8078 W ("No_Strict_Aliasing", Flag136 (Id));
8079 W ("Non_Binary_Modulus", Flag58 (Id));
8080 W ("Nonzero_Is_True", Flag162 (Id));
8081 W ("OK_To_Rename", Flag247 (Id));
8082 W ("OK_To_Reorder_Components", Flag239 (Id));
8083 W ("Optimize_Alignment_Space", Flag241 (Id));
8084 W ("Optimize_Alignment_Time", Flag242 (Id));
8085 W ("Overlays_Constant", Flag243 (Id));
8086 W ("Reachable", Flag49 (Id));
8087 W ("Referenced", Flag156 (Id));
8088 W ("Referenced_As_LHS", Flag36 (Id));
8089 W ("Referenced_As_Out_Parameter", Flag227 (Id));
8090 W ("Renamed_In_Spec", Flag231 (Id));
8091 W ("Requires_Overriding", Flag213 (Id));
8092 W ("Return_Present", Flag54 (Id));
8093 W ("Returns_By_Ref", Flag90 (Id));
8094 W ("Reverse_Bit_Order", Flag164 (Id));
8095 W ("Reverse_Storage_Order", Flag93 (Id));
8096 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
8097 W ("Size_Depends_On_Discriminant", Flag177 (Id));
8098 W ("Size_Known_At_Compile_Time", Flag92 (Id));
8099 W ("Static_Elaboration_Desired", Flag77 (Id));
8100 W ("Strict_Alignment", Flag145 (Id));
8101 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
8102 W ("Suppress_Initialization", Flag105 (Id));
8103 W ("Suppress_Style_Checks", Flag165 (Id));
8104 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
8105 W ("Treat_As_Volatile", Flag41 (Id));
8106 W ("Universal_Aliasing", Flag216 (Id));
8107 W ("Used_As_Generic_Actual", Flag222 (Id));
8108 W ("Uses_Sec_Stack", Flag95 (Id));
8109 W ("Warnings_Off", Flag96 (Id));
8110 W ("Warnings_Off_Used", Flag236 (Id));
8111 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
8112 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
8113 W ("Was_Hidden", Flag196 (Id));
8114 end Write_Entity_Flags;
8116 -----------------------
8117 -- Write_Entity_Info --
8118 -----------------------
8120 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
8122 procedure Write_Attribute (Which : String; Nam : E);
8123 -- Write attribute value with given string name
8125 procedure Write_Kind (Id : Entity_Id);
8126 -- Write Ekind field of entity
8128 ---------------------
8129 -- Write_Attribute --
8130 ---------------------
8132 procedure Write_Attribute (Which : String; Nam : E) is
8136 Write_Int (Int (Nam));
8138 Write_Name (Chars (Nam));
8140 end Write_Attribute;
8146 procedure Write_Kind (Id : Entity_Id) is
8147 K : constant String := Entity_Kind'Image (Ekind (Id));
8151 Write_Str (" Kind ");
8153 if Is_Type (Id) and then Is_Tagged_Type (Id) then
8154 Write_Str ("TAGGED ");
8157 Write_Str (K (3 .. K'Length));
8160 if Is_Type (Id) and then Depends_On_Private (Id) then
8161 Write_Str ("Depends_On_Private ");
8165 -- Start of processing for Write_Entity_Info
8169 Write_Attribute ("Name ", Id);
8170 Write_Int (Int (Id));
8174 Write_Attribute (" Type ", Etype (Id));
8176 Write_Attribute (" Scope ", Scope (Id));
8181 when Discrete_Kind =>
8182 Write_Str ("Bounds: Id = ");
8184 if Present (Scalar_Range (Id)) then
8185 Write_Int (Int (Type_Low_Bound (Id)));
8186 Write_Str (" .. Id = ");
8187 Write_Int (Int (Type_High_Bound (Id)));
8189 Write_Str ("Empty");
8200 (" Component Type ", Component_Type (Id));
8203 Write_Str (" Indexes ");
8205 Index := First_Index (Id);
8206 while Present (Index) loop
8207 Write_Attribute (" ", Etype (Index));
8208 Index := Next_Index (Index);
8216 (" Directly Designated Type ",
8217 Directly_Designated_Type (Id));
8220 when Overloadable_Kind =>
8221 if Present (Homonym (Id)) then
8222 Write_Str (" Homonym ");
8223 Write_Name (Chars (Homonym (Id)));
8225 Write_Int (Int (Homonym (Id)));
8232 if Ekind (Scope (Id)) in Record_Kind then
8234 " Original_Record_Component ",
8235 Original_Record_Component (Id));
8236 Write_Int (Int (Original_Record_Component (Id)));
8240 when others => null;
8242 end Write_Entity_Info;
8244 -----------------------
8245 -- Write_Field6_Name --
8246 -----------------------
8248 procedure Write_Field6_Name (Id : Entity_Id) is
8249 pragma Warnings (Off, Id);
8251 Write_Str ("First_Rep_Item");
8252 end Write_Field6_Name;
8254 -----------------------
8255 -- Write_Field7_Name --
8256 -----------------------
8258 procedure Write_Field7_Name (Id : Entity_Id) is
8259 pragma Warnings (Off, Id);
8261 Write_Str ("Freeze_Node");
8262 end Write_Field7_Name;
8264 -----------------------
8265 -- Write_Field8_Name --
8266 -----------------------
8268 procedure Write_Field8_Name (Id : Entity_Id) is
8272 Write_Str ("Associated_Node_For_Itype");
8275 Write_Str ("Dependent_Instances");
8278 Write_Str ("First_Exit_Statement");
8281 Write_Str ("Hiding_Loop_Variable");
8285 E_Subprogram_Body =>
8286 Write_Str ("Mechanism");
8290 Write_Str ("Normalized_First_Bit");
8293 Write_Str ("Postcondition_Proc");
8295 when E_Return_Statement =>
8296 Write_Str ("Return_Applies_To");
8299 Write_Str ("Field8??");
8301 end Write_Field8_Name;
8303 -----------------------
8304 -- Write_Field9_Name --
8305 -----------------------
8307 procedure Write_Field9_Name (Id : Entity_Id) is
8311 Write_Str ("Class_Wide_Type");
8314 Write_Str ("Current_Value");
8316 when E_Abstract_State =>
8317 Write_Str ("Refined_State");
8320 E_Generic_Function |
8322 E_Generic_Procedure |
8325 Write_Str ("Renaming_Map");
8328 Write_Str ("Field9??");
8330 end Write_Field9_Name;
8332 ------------------------
8333 -- Write_Field10_Name --
8334 ------------------------
8336 procedure Write_Field10_Name (Id : Entity_Id) is
8339 when Class_Wide_Kind |
8345 Write_Str ("Direct_Primitive_Operations");
8348 Write_Str ("Float_Rep");
8350 when E_In_Parameter |
8352 Write_Str ("Discriminal_Link");
8358 Write_Str ("Handler_Records");
8362 Write_Str ("Normalized_Position_Max");
8365 Write_Str ("Field10??");
8367 end Write_Field10_Name;
8369 ------------------------
8370 -- Write_Field11_Name --
8371 ------------------------
8373 procedure Write_Field11_Name (Id : Entity_Id) is
8377 Write_Str ("Block_Node");
8381 Write_Str ("Component_Bit_Offset");
8384 Write_Str ("Entry_Component");
8386 when E_Enumeration_Literal =>
8387 Write_Str ("Enumeration_Pos");
8391 Write_Str ("Full_View");
8393 when E_Generic_Package =>
8394 Write_Str ("Generic_Homonym");
8400 Write_Str ("Protected_Body_Subprogram");
8403 Write_Str ("Field11??");
8405 end Write_Field11_Name;
8407 ------------------------
8408 -- Write_Field12_Name --
8409 ------------------------
8411 procedure Write_Field12_Name (Id : Entity_Id) is
8415 Write_Str ("Associated_Formal_Package");
8418 Write_Str ("Barrier_Function");
8420 when E_Enumeration_Literal =>
8421 Write_Str ("Enumeration_Rep");
8429 E_In_Out_Parameter |
8433 Write_Str ("Esize");
8437 Write_Str ("Next_Inlined_Subprogram");
8440 Write_Str ("Field12??");
8442 end Write_Field12_Name;
8444 ------------------------
8445 -- Write_Field13_Name --
8446 ------------------------
8448 procedure Write_Field13_Name (Id : Entity_Id) is
8453 Write_Str ("Component_Clause");
8456 Write_Str ("Elaboration_Entity");
8460 Generic_Unit_Kind =>
8461 Write_Str ("Elaboration_Entity");
8465 Write_Str ("Extra_Accessibility");
8468 Write_Str ("RM_Size");
8471 Write_Str ("Field13??");
8473 end Write_Field13_Name;
8475 -----------------------
8476 -- Write_Field14_Name --
8477 -----------------------
8479 procedure Write_Field14_Name (Id : Entity_Id) is
8488 Write_Str ("Alignment");
8492 Write_Str ("First_Optional_Parameter");
8496 Write_Str ("Normalized_Position");
8499 E_Generic_Package =>
8500 Write_Str ("Shadow_Entities");
8503 Write_Str ("Field14??");
8505 end Write_Field14_Name;
8507 ------------------------
8508 -- Write_Field15_Name --
8509 ------------------------
8511 procedure Write_Field15_Name (Id : Entity_Id) is
8514 when E_Discriminant =>
8515 Write_Str ("Discriminant_Number");
8518 Write_Str ("DT_Entry_Count");
8522 Write_Str ("DT_Position");
8524 when E_Protected_Type =>
8525 Write_Str ("Entry_Bodies_Array");
8528 Write_Str ("Entry_Parameters_Type");
8531 Write_Str ("Extra_Formal");
8533 when Enumeration_Kind =>
8534 Write_Str ("Lit_Indexes");
8538 Write_Str ("Related_Instance");
8540 when Decimal_Fixed_Point_Kind =>
8541 Write_Str ("Scale_Value");
8545 Write_Str ("Status_Flag_Or_Transient_Decl");
8549 Write_Str ("Storage_Size_Variable");
8551 when E_String_Literal_Subtype =>
8552 Write_Str ("String_Literal_Low_Bound");
8555 Write_Str ("Field15??");
8557 end Write_Field15_Name;
8559 ------------------------
8560 -- Write_Field16_Name --
8561 ------------------------
8563 procedure Write_Field16_Name (Id : Entity_Id) is
8566 when E_Record_Type |
8567 E_Record_Type_With_Private =>
8568 Write_Str ("Access_Disp_Table");
8570 when E_Record_Subtype |
8571 E_Class_Wide_Subtype =>
8572 Write_Str ("Cloned_Subtype");
8576 Write_Str ("DTC_Entity");
8579 Write_Str ("Entry_Formal");
8584 Write_Str ("First_Private_Entity");
8586 when Enumeration_Kind =>
8587 Write_Str ("Lit_Strings");
8589 when E_String_Literal_Subtype =>
8590 Write_Str ("String_Literal_Length");
8594 Write_Str ("Unset_Reference");
8597 Write_Str ("Field16??");
8599 end Write_Field16_Name;
8601 ------------------------
8602 -- Write_Field17_Name --
8603 ------------------------
8605 procedure Write_Field17_Name (Id : Entity_Id) is
8610 E_Generic_In_Out_Parameter |
8612 Write_Str ("Actual_Subtype");
8615 Write_Str ("Digits_Value");
8617 when E_Discriminant =>
8618 Write_Str ("Discriminal");
8627 E_Generic_Function |
8629 E_Generic_Procedure |
8637 E_Return_Statement |
8639 E_Subprogram_Type =>
8640 Write_Str ("First_Entity");
8643 Write_Str ("First_Index");
8645 when Enumeration_Kind =>
8646 Write_Str ("First_Literal");
8649 Write_Str ("Master_Id");
8651 when Modular_Integer_Kind =>
8652 Write_Str ("Modulus");
8654 when E_Incomplete_Type =>
8655 Write_Str ("Non_Limited_View");
8657 when E_Incomplete_Subtype =>
8658 if From_With_Type (Id) then
8659 Write_Str ("Non_Limited_View");
8663 Write_Str ("Prival");
8666 Write_Str ("Field17??");
8668 end Write_Field17_Name;
8670 ------------------------
8671 -- Write_Field18_Name --
8672 ------------------------
8674 procedure Write_Field18_Name (Id : Entity_Id) is
8677 when E_Enumeration_Literal |
8681 Write_Str ("Alias");
8683 when E_Record_Type =>
8684 Write_Str ("Corresponding_Concurrent_Type");
8686 when E_Subprogram_Body =>
8687 Write_Str ("Corresponding_Protected_Entry");
8689 when Concurrent_Kind =>
8690 Write_Str ("Corresponding_Record_Type");
8695 Write_Str ("Enclosing_Scope");
8697 when E_Entry_Index_Parameter =>
8698 Write_Str ("Entry_Index_Constant");
8700 when E_Class_Wide_Subtype |
8701 E_Access_Protected_Subprogram_Type |
8702 E_Anonymous_Access_Protected_Subprogram_Type |
8703 E_Access_Subprogram_Type |
8705 Write_Str ("Equivalent_Type");
8707 when Fixed_Point_Kind =>
8708 Write_Str ("Delta_Value");
8710 when Incomplete_Or_Private_Kind |
8712 Write_Str ("Private_Dependents");
8715 Write_Str ("Renamed_Object");
8719 E_Generic_Function |
8720 E_Generic_Procedure |
8721 E_Generic_Package =>
8722 Write_Str ("Renamed_Entity");
8725 Write_Str ("Field18??");
8727 end Write_Field18_Name;
8729 -----------------------
8730 -- Write_Field19_Name --
8731 -----------------------
8733 procedure Write_Field19_Name (Id : Entity_Id) is
8737 E_Generic_Package =>
8738 Write_Str ("Body_Entity");
8740 when E_Discriminant =>
8741 Write_Str ("Corresponding_Discriminant");
8744 Write_Str ("Default_Value");
8746 when E_Array_Type =>
8747 Write_Str ("Default_Component_Value");
8749 when E_Record_Type =>
8750 Write_Str ("Parent_Subtype");
8754 Write_Str ("Size_Check_Code");
8756 when E_Package_Body |
8758 Write_Str ("Spec_Entity");
8760 when Private_Kind =>
8761 Write_Str ("Underlying_Full_View");
8763 when E_Function | E_Operator | E_Subprogram_Type =>
8764 Write_Str ("Extra_Accessibility_Of_Result");
8767 Write_Str ("Field19??");
8769 end Write_Field19_Name;
8771 -----------------------
8772 -- Write_Field20_Name --
8773 -----------------------
8775 procedure Write_Field20_Name (Id : Entity_Id) is
8779 Write_Str ("Component_Type");
8781 when E_In_Parameter |
8782 E_Generic_In_Parameter =>
8783 Write_Str ("Default_Value");
8786 Write_Str ("Directly_Designated_Type");
8789 Write_Str ("Discriminant_Checking_Func");
8791 when E_Discriminant =>
8792 Write_Str ("Discriminant_Default_Value");
8801 E_Generic_Function |
8803 E_Generic_Procedure |
8811 E_Return_Statement |
8813 E_Subprogram_Type =>
8814 Write_Str ("Last_Entity");
8818 Write_Str ("Prival_Link");
8821 Write_Str ("Scalar_Range");
8824 Write_Str ("Register_Exception_Call");
8827 Write_Str ("Field20??");
8829 end Write_Field20_Name;
8831 -----------------------
8832 -- Write_Field21_Name --
8833 -----------------------
8835 procedure Write_Field21_Name (Id : Entity_Id) is
8839 Write_Str ("Accept_Address");
8841 when E_In_Parameter =>
8842 Write_Str ("Default_Expr_Function");
8844 when Concurrent_Kind |
8845 Incomplete_Or_Private_Kind |
8849 Write_Str ("Discriminant_Constraint");
8854 E_Generic_Function |
8856 E_Generic_Procedure |
8858 Write_Str ("Interface_Name");
8861 Modular_Integer_Kind =>
8862 Write_Str ("Original_Array_Type");
8864 when Fixed_Point_Kind =>
8865 Write_Str ("Small_Value");
8868 Write_Str ("Field21??");
8870 end Write_Field21_Name;
8872 -----------------------
8873 -- Write_Field22_Name --
8874 -----------------------
8876 procedure Write_Field22_Name (Id : Entity_Id) is
8880 Write_Str ("Associated_Storage_Pool");
8883 Write_Str ("Component_Size");
8885 when E_Record_Type =>
8886 Write_Str ("Corresponding_Remote_Type");
8890 Write_Str ("Original_Record_Component");
8892 when E_Enumeration_Literal =>
8893 Write_Str ("Enumeration_Rep_Expr");
8896 Write_Str ("Exception_Code");
8898 when E_Record_Type_With_Private |
8899 E_Record_Subtype_With_Private |
8902 E_Limited_Private_Type |
8903 E_Limited_Private_Subtype =>
8904 Write_Str ("Private_View");
8907 Write_Str ("Protected_Formal");
8917 E_Generic_Function |
8918 E_Generic_Procedure |
8921 E_Return_Statement |
8924 Write_Str ("Scope_Depth_Value");
8927 Write_Str ("Shared_Var_Procs_Instance");
8930 Write_Str ("Field22??");
8932 end Write_Field22_Name;
8934 ------------------------
8935 -- Write_Field23_Name --
8936 ------------------------
8938 procedure Write_Field23_Name (Id : Entity_Id) is
8941 when E_Discriminant =>
8942 Write_Str ("CR_Discriminant");
8945 Write_Str ("Entry_Cancel_Parameter");
8947 when E_Enumeration_Type =>
8948 Write_Str ("Enum_Pos_To_Rep");
8952 Write_Str ("Extra_Constrained");
8955 Write_Str ("Finalization_Master");
8957 when E_Generic_Function |
8959 E_Generic_Procedure =>
8960 Write_Str ("Inner_Instances");
8963 Write_Str ("Packed_Array_Type");
8966 Write_Str ("Protection_Object");
8968 when Concurrent_Kind |
8969 Incomplete_Or_Private_Kind |
8973 Write_Str ("Stored_Constraint");
8977 if Present (Scope (Id))
8978 and then Is_Protected_Type (Scope (Id))
8980 Write_Str ("Protection_Object");
8982 Write_Str ("Generic_Renamings");
8986 if Is_Generic_Instance (Id) then
8987 Write_Str ("Generic_Renamings");
8989 Write_Str ("Limited_View");
8993 Write_Str ("Field23??");
8995 end Write_Field23_Name;
8997 ------------------------
8998 -- Write_Field24_Name --
8999 ------------------------
9001 procedure Write_Field24_Name (Id : Entity_Id) is
9006 Write_Str ("Finalizer");
9011 Write_Str ("Related_Expression");
9016 Generic_Subprogram_Kind =>
9017 Write_Str ("Contract");
9020 Write_Str ("Field24???");
9022 end Write_Field24_Name;
9024 ------------------------
9025 -- Write_Field25_Name --
9026 ------------------------
9028 procedure Write_Field25_Name (Id : Entity_Id) is
9032 Write_Str ("Abstract_States");
9035 Write_Str ("Debug_Renaming_Link");
9038 Write_Str ("DT_Offset_To_Top_Func");
9042 Write_Str ("Interface_Alias");
9044 when E_Record_Type |
9046 E_Record_Type_With_Private |
9047 E_Record_Subtype_With_Private =>
9048 Write_Str ("Interfaces");
9052 Write_Str ("Related_Array_Object");
9055 Write_Str ("Task_Body_Procedure");
9059 Write_Str ("PPC_Wrapper");
9061 when E_Enumeration_Subtype |
9062 E_Modular_Integer_Subtype |
9063 E_Signed_Integer_Subtype =>
9064 Write_Str ("Static_Predicate");
9067 Write_Str ("Field25??");
9069 end Write_Field25_Name;
9071 ------------------------
9072 -- Write_Field26_Name --
9073 ------------------------
9075 procedure Write_Field26_Name (Id : Entity_Id) is
9078 when E_Record_Type |
9079 E_Record_Type_With_Private =>
9080 Write_Str ("Dispatch_Table_Wrappers");
9082 when E_In_Out_Parameter |
9085 Write_Str ("Last_Assignment");
9087 when E_Access_Subprogram_Type =>
9088 Write_Str ("Original_Access_Type");
9090 when E_Generic_Package |
9092 Write_Str ("Package_Instantiation");
9096 Write_Str ("Related_Type");
9099 Write_Str ("Relative_Deadline_Variable");
9103 Write_Str ("Overridden_Operation");
9106 Write_Str ("Field26??");
9108 end Write_Field26_Name;
9110 ------------------------
9111 -- Write_Field27_Name --
9112 ------------------------
9114 procedure Write_Field27_Name (Id : Entity_Id) is
9119 Write_Str ("Current_Use_Clause");
9124 Write_Str ("Related_Type");
9128 Write_Str ("Wrapped_Entity");
9131 Write_Str ("Field27??");
9133 end Write_Field27_Name;
9135 ------------------------
9136 -- Write_Field28_Name --
9137 ------------------------
9139 procedure Write_Field28_Name (Id : Entity_Id) is
9147 E_Subprogram_Type =>
9148 Write_Str ("Extra_Formals");
9150 when E_Constant | E_Variable =>
9151 Write_Str ("Initialization_Statements");
9153 when E_Record_Type =>
9154 Write_Str ("Underlying_Record_View");
9157 Write_Str ("Field28??");
9159 end Write_Field28_Name;
9161 ------------------------
9162 -- Write_Field29_Name --
9163 ------------------------
9165 procedure Write_Field29_Name (Id : Entity_Id) is
9169 Write_Str ("Subprograms_For_Type");
9172 Write_Str ("Field29??");
9174 end Write_Field29_Name;
9176 ------------------------
9177 -- Write_Field30_Name --
9178 ------------------------
9180 procedure Write_Field30_Name (Id : Entity_Id) is
9184 Write_Str ("Corresponding_Equality");
9187 Write_Str ("Static_Initialization");
9190 Write_Str ("Field30??");
9192 end Write_Field30_Name;
9194 ------------------------
9195 -- Write_Field31_Name --
9196 ------------------------
9198 procedure Write_Field31_Name (Id : Entity_Id) is
9203 Write_Str ("Thunk_Entity");
9206 Write_Str ("Field31??");
9208 end Write_Field31_Name;
9210 ------------------------
9211 -- Write_Field32_Name --
9212 ------------------------
9214 procedure Write_Field32_Name (Id : Entity_Id) is
9218 E_Generic_Function |
9220 E_Generic_Procedure |
9224 E_Subprogram_Body =>
9225 Write_Str ("SPARK_Mode_Pragmas");
9228 Write_Str ("Field32??");
9230 end Write_Field32_Name;
9232 ------------------------
9233 -- Write_Field33_Name --
9234 ------------------------
9236 procedure Write_Field33_Name (Id : Entity_Id) is
9240 Write_Str ("Field33??");
9242 end Write_Field33_Name;
9244 ------------------------
9245 -- Write_Field34_Name --
9246 ------------------------
9248 procedure Write_Field34_Name (Id : Entity_Id) is
9252 Write_Str ("Field34??");
9254 end Write_Field34_Name;
9256 ------------------------
9257 -- Write_Field35_Name --
9258 ------------------------
9260 procedure Write_Field35_Name (Id : Entity_Id) is
9264 Write_Str ("Field35??");
9266 end Write_Field35_Name;
9268 -------------------------
9269 -- Iterator Procedures --
9270 -------------------------
9272 procedure Proc_Next_Component (N : in out Node_Id) is
9274 N := Next_Component (N);
9275 end Proc_Next_Component;
9277 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
9279 N := Next_Entity (N);
9280 while Present (N) loop
9281 exit when Ekind_In (N, E_Component, E_Discriminant);
9282 N := Next_Entity (N);
9284 end Proc_Next_Component_Or_Discriminant;
9286 procedure Proc_Next_Discriminant (N : in out Node_Id) is
9288 N := Next_Discriminant (N);
9289 end Proc_Next_Discriminant;
9291 procedure Proc_Next_Formal (N : in out Node_Id) is
9293 N := Next_Formal (N);
9294 end Proc_Next_Formal;
9296 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
9298 N := Next_Formal_With_Extras (N);
9299 end Proc_Next_Formal_With_Extras;
9301 procedure Proc_Next_Index (N : in out Node_Id) is
9303 N := Next_Index (N);
9304 end Proc_Next_Index;
9306 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
9308 N := Next_Inlined_Subprogram (N);
9309 end Proc_Next_Inlined_Subprogram;
9311 procedure Proc_Next_Literal (N : in out Node_Id) is
9313 N := Next_Literal (N);
9314 end Proc_Next_Literal;
9316 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
9318 N := Next_Stored_Discriminant (N);
9319 end Proc_Next_Stored_Discriminant;