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 Elists; use Elists;
37 with Namet; use Namet;
38 with Nlists; use Nlists;
39 with Output; use Output;
40 with Sinfo; use Sinfo;
41 with Stand; use Stand;
45 use Atree.Unchecked_Access;
46 -- This is one of the packages that is allowed direct untyped access to
47 -- the fields in a node, since it provides the next level abstraction
48 -- which incorporates appropriate checks.
50 ----------------------------------------------
51 -- Usage of Fields in Defining Entity Nodes --
52 ----------------------------------------------
54 -- Four of these fields are defined in Sinfo, since they in are the base
55 -- part of the node. The access routines for these four fields and the
56 -- corresponding set procedures are defined in Sinfo. These fields are
57 -- present in all entities. Note that Homonym is also in the base part of
58 -- the node, but has access routines that are more properly part of Einfo,
59 -- which is why they are defined here.
66 -- Remaining fields are present only in extended nodes (i.e. entities)
68 -- The following fields are present in all entities
71 -- First_Rep_Item Node6
74 -- The usage of other fields (and the entity kinds to which it applies)
75 -- depends on the particular field (see Einfo spec for details).
77 -- Associated_Node_For_Itype Node8
78 -- Dependent_Instances Elist8
79 -- Hiding_Loop_Variable Node8
80 -- Mechanism Uint8 (but returns Mechanism_Type)
81 -- Normalized_First_Bit Uint8
82 -- Postcondition_Proc Node8
83 -- Refinement_Constituents Elist8
84 -- Return_Applies_To Node8
85 -- First_Exit_Statement Node8
87 -- Class_Wide_Type Node9
88 -- Current_Value Node9
91 -- Direct_Primitive_Operations Elist10
92 -- Discriminal_Link Node10
93 -- Float_Rep Uint10 (but returns Float_Rep_Kind)
94 -- Handler_Records List10
95 -- Normalized_Position_Max Uint10
96 -- Refined_State Node10
98 -- Component_Bit_Offset Uint11
100 -- Entry_Component Node11
101 -- Enumeration_Pos Uint11
102 -- Generic_Homonym Node11
103 -- Protected_Body_Subprogram Node11
106 -- Barrier_Function Node12
107 -- Enumeration_Rep Uint12
109 -- Next_Inlined_Subprogram Node12
111 -- Component_Clause Node13
112 -- Elaboration_Entity Node13
113 -- Extra_Accessibility Node13
117 -- First_Optional_Parameter Node14
118 -- Normalized_Position Uint14
119 -- Shadow_Entities List14
121 -- Discriminant_Number Uint15
122 -- DT_Position Uint15
123 -- DT_Entry_Count Uint15
124 -- Entry_Bodies_Array Node15
125 -- Entry_Parameters_Type Node15
126 -- Extra_Formal Node15
127 -- Lit_Indexes Node15
128 -- Related_Instance Node15
129 -- Status_Flag_Or_Transient_Decl Node15
130 -- Scale_Value Uint15
131 -- Storage_Size_Variable Node15
132 -- String_Literal_Low_Bound Node15
134 -- Access_Disp_Table Elist16
135 -- Cloned_Subtype Node16
137 -- Entry_Formal Node16
138 -- First_Private_Entity Node16
139 -- Lit_Strings Node16
140 -- String_Literal_Length Uint16
141 -- Unset_Reference Node16
143 -- Actual_Subtype Node17
144 -- Digits_Value Uint17
145 -- Discriminal Node17
146 -- First_Entity Node17
147 -- First_Index Node17
148 -- First_Literal Node17
151 -- Non_Limited_View Node17
155 -- Corresponding_Concurrent_Type Node18
156 -- Corresponding_Protected_Entry Node18
157 -- Corresponding_Record_Type Node18
158 -- Delta_Value Ureal18
159 -- Enclosing_Scope Node18
160 -- Equivalent_Type Node18
161 -- Private_Dependents Elist18
162 -- Renamed_Entity Node18
163 -- Renamed_Object Node18
165 -- Body_Entity Node19
166 -- Corresponding_Discriminant Node19
167 -- Default_Aspect_Component_Value Node19
168 -- Default_Aspect_Value Node19
169 -- Extra_Accessibility_Of_Result Node19
170 -- Parent_Subtype Node19
171 -- Size_Check_Code Node19
172 -- Spec_Entity Node19
173 -- Underlying_Full_View Node19
175 -- Component_Type Node20
176 -- Default_Value Node20
177 -- Directly_Designated_Type Node20
178 -- Discriminant_Checking_Func Node20
179 -- Discriminant_Default_Value Node20
180 -- Last_Entity Node20
181 -- Prival_Link Node20
182 -- Register_Exception_Call Node20
183 -- Scalar_Range Node20
185 -- Accept_Address Elist21
186 -- Default_Expr_Function Node21
187 -- Discriminant_Constraint Elist21
188 -- Interface_Name Node21
189 -- Original_Array_Type Node21
190 -- Small_Value Ureal21
192 -- Associated_Storage_Pool Node22
193 -- Component_Size Uint22
194 -- Corresponding_Remote_Type Node22
195 -- Enumeration_Rep_Expr Node22
196 -- Exception_Code Uint22
197 -- Original_Record_Component Node22
198 -- Private_View Node22
199 -- Protected_Formal Node22
200 -- Scope_Depth_Value Uint22
201 -- Shared_Var_Procs_Instance Node22
203 -- CR_Discriminant Node23
204 -- Entry_Cancel_Parameter Node23
205 -- Enum_Pos_To_Rep Node23
206 -- Extra_Constrained Node23
207 -- Finalization_Master Node23
208 -- Generic_Renamings Elist23
209 -- Inner_Instances Elist23
210 -- Limited_View Node23
211 -- Packed_Array_Type Node23
212 -- Protection_Object Node23
213 -- Stored_Constraint Elist23
215 -- Related_Expression Node24
218 -- Interface_Alias Node25
219 -- Interfaces Elist25
220 -- Debug_Renaming_Link Node25
221 -- DT_Offset_To_Top_Func Node25
222 -- PPC_Wrapper Node25
223 -- Related_Array_Object Node25
224 -- Static_Predicate List25
225 -- Task_Body_Procedure Node25
227 -- Dispatch_Table_Wrappers Elist26
228 -- Last_Assignment Node26
229 -- Original_Access_Type Node26
230 -- Overridden_Operation Node26
231 -- Package_Instantiation Node26
232 -- Relative_Deadline_Variable Node26
234 -- Current_Use_Clause Node27
235 -- Related_Type Node27
236 -- Wrapped_Entity Node27
238 -- Extra_Formals Node28
240 -- Initialization_Statements Node28
241 -- Underlying_Record_View Node28
243 -- Subprograms_For_Type Node29
245 -- Corresponding_Equality Node30
246 -- Static_Initialization Node30
248 -- Thunk_Entity Node31
250 -- SPARK_Mode_Pragmas Node32
258 ---------------------------------------------
259 -- Usage of Flags in Defining Entity Nodes --
260 ---------------------------------------------
262 -- All flags are unique, there is no overlaying, so each flag is physically
263 -- present in every entity. However, for many of the flags, it only makes
264 -- sense for them to be set true for certain subsets of entity kinds. See
265 -- the spec of Einfo for further details.
267 -- Note: Flag1-Flag3 are not used, for historical reasons
270 -- Has_Discriminants Flag5
271 -- Is_Dispatching_Operation Flag6
272 -- Is_Immediately_Visible Flag7
274 -- Is_Potentially_Use_Visible Flag9
278 -- Is_Constrained Flag12
279 -- Is_Generic_Type Flag13
280 -- Depends_On_Private Flag14
282 -- Is_Volatile Flag16
283 -- Is_Internal Flag17
284 -- Has_Delayed_Freeze Flag18
285 -- Is_Abstract_Subprogram Flag19
286 -- Is_Concurrent_Record_Type Flag20
288 -- Has_Master_Entity Flag21
289 -- Needs_No_Actuals Flag22
290 -- Has_Storage_Size_Clause Flag23
291 -- Is_Imported Flag24
292 -- Is_Limited_Record Flag25
293 -- Has_Completion Flag26
294 -- Has_Pragma_Controlled Flag27
295 -- Is_Statically_Allocated Flag28
296 -- Has_Size_Clause Flag29
299 -- Checks_May_Be_Suppressed Flag31
300 -- Kill_Elaboration_Checks Flag32
301 -- Kill_Range_Checks Flag33
302 -- Has_Independent_Components Flag34
303 -- Is_Class_Wide_Equivalent_Type Flag35
304 -- Referenced_As_LHS Flag36
305 -- Is_Known_Non_Null Flag37
306 -- Can_Never_Be_Null Flag38
307 -- Has_Default_Aspect Flag39
308 -- Body_Needed_For_SAL Flag40
310 -- Treat_As_Volatile Flag41
311 -- Is_Controlled Flag42
312 -- Has_Controlled_Component Flag43
314 -- In_Private_Part Flag45
315 -- Has_Alignment_Clause Flag46
317 -- In_Package_Body Flag48
319 -- Delay_Subprogram_Descriptors Flag50
322 -- Is_Entry_Formal Flag52
323 -- Is_Private_Descendant Flag53
324 -- Return_Present Flag54
325 -- Is_Tagged_Type Flag55
326 -- Has_Homonym Flag56
328 -- Non_Binary_Modulus Flag58
329 -- Is_Preelaborated Flag59
330 -- Is_Shared_Passive Flag60
332 -- Is_Remote_Types Flag61
333 -- Is_Remote_Call_Interface Flag62
334 -- Is_Character_Type Flag63
335 -- Is_Intrinsic_Subprogram Flag64
336 -- Has_Record_Rep_Clause Flag65
337 -- Has_Enumeration_Rep_Clause Flag66
338 -- Has_Small_Clause Flag67
339 -- Has_Component_Size_Clause Flag68
340 -- Is_Access_Constant Flag69
341 -- Is_First_Subtype Flag70
343 -- Has_Completion_In_Body Flag71
344 -- Has_Unknown_Discriminants Flag72
345 -- Is_Child_Unit Flag73
346 -- Is_CPP_Class Flag74
347 -- Has_Non_Standard_Rep Flag75
348 -- Is_Constructor Flag76
349 -- Static_Elaboration_Desired Flag77
351 -- Has_All_Calls_Remote Flag79
352 -- Is_Constr_Subt_For_U_Nominal Flag80
354 -- Is_Asynchronous Flag81
355 -- Has_Gigi_Rep_Item Flag82
356 -- Has_Machine_Radix_Clause Flag83
357 -- Machine_Radix_10 Flag84
359 -- Has_Atomic_Components Flag86
360 -- Has_Volatile_Components Flag87
361 -- Discard_Names Flag88
362 -- Is_Interrupt_Handler Flag89
363 -- Returns_By_Ref Flag90
366 -- Size_Known_At_Compile_Time Flag92
367 -- Reverse_Storage_Order Flag93
368 -- Is_Generic_Actual_Type Flag94
369 -- Uses_Sec_Stack Flag95
370 -- Warnings_Off Flag96
371 -- Is_Controlling_Formal Flag97
372 -- Has_Controlling_Result Flag98
373 -- Is_Exported Flag99
374 -- Has_Specified_Layout Flag100
376 -- Has_Nested_Block_With_Handler Flag101
378 -- Is_Completely_Hidden Flag103
379 -- Address_Taken Flag104
380 -- Suppress_Initialization Flag105
381 -- Is_Limited_Composite Flag106
382 -- Is_Private_Composite Flag107
383 -- Default_Expressions_Processed Flag108
384 -- Is_Non_Static_Subtype Flag109
385 -- Has_External_Tag_Rep_Clause Flag110
387 -- Is_Formal_Subprogram Flag111
388 -- Is_Renaming_Of_Object Flag112
390 -- Delay_Cleanups Flag114
391 -- Never_Set_In_Source Flag115
392 -- Is_Visible_Lib_Unit Flag116
393 -- Is_Unchecked_Union Flag117
394 -- Is_For_Access_Subtype Flag118
395 -- Has_Convention_Pragma Flag119
396 -- Has_Primitive_Operations Flag120
398 -- Has_Pragma_Pack Flag121
399 -- Is_Bit_Packed_Array Flag122
400 -- Has_Unchecked_Union Flag123
401 -- Is_Eliminated Flag124
402 -- C_Pass_By_Copy Flag125
403 -- Is_Instantiated Flag126
404 -- Is_Valued_Procedure Flag127
405 -- (used for Component_Alignment) Flag128
406 -- (used for Component_Alignment) Flag129
407 -- Is_Generic_Instance Flag130
409 -- No_Pool_Assigned Flag131
410 -- Is_AST_Entry Flag132
411 -- Is_VMS_Exception Flag133
412 -- Is_Optional_Parameter Flag134
413 -- Has_Aliased_Components Flag135
414 -- No_Strict_Aliasing Flag136
415 -- Is_Machine_Code_Subprogram Flag137
416 -- Is_Packed_Array_Type Flag138
417 -- Has_Biased_Representation Flag139
418 -- Has_Complex_Representation Flag140
420 -- Is_Constr_Subt_For_UN_Aliased Flag141
421 -- Has_Missing_Return Flag142
422 -- Has_Recursive_Call Flag143
423 -- Is_Unsigned_Type Flag144
424 -- Strict_Alignment Flag145
425 -- Is_Abstract_Type Flag146
426 -- Needs_Debug_Info Flag147
427 -- Suppress_Elaboration_Warnings Flag148
428 -- Is_Compilation_Unit Flag149
429 -- Has_Pragma_Elaborate_Body Flag150
431 -- Has_Private_Ancestor Flag151
432 -- Entry_Accepted Flag152
433 -- Is_Obsolescent Flag153
434 -- Has_Per_Object_Constraint Flag154
435 -- Has_Private_Declaration Flag155
436 -- Referenced Flag156
437 -- Has_Pragma_Inline Flag157
438 -- Finalize_Storage_Only Flag158
439 -- From_With_Type Flag159
440 -- Is_Package_Body_Entity Flag160
442 -- Has_Qualified_Name Flag161
443 -- Nonzero_Is_True Flag162
444 -- Is_True_Constant Flag163
445 -- Reverse_Bit_Order Flag164
446 -- Suppress_Style_Checks Flag165
447 -- Debug_Info_Off Flag166
448 -- Sec_Stack_Needed_For_Return Flag167
449 -- Materialize_Entity Flag168
450 -- Has_Pragma_Thread_Local_Storage Flag169
451 -- Is_Known_Valid Flag170
453 -- Is_Hidden_Open_Scope Flag171
454 -- Has_Object_Size_Clause Flag172
455 -- Has_Fully_Qualified_Name Flag173
456 -- Elaboration_Entity_Required Flag174
457 -- Has_Forward_Instantiation Flag175
458 -- Is_Discrim_SO_Function Flag176
459 -- Size_Depends_On_Discriminant Flag177
460 -- Is_Null_Init_Proc Flag178
461 -- Has_Pragma_Pure_Function Flag179
462 -- Has_Pragma_Unreferenced Flag180
464 -- Has_Contiguous_Rep Flag181
465 -- Has_Xref_Entry Flag182
466 -- Must_Be_On_Byte_Boundary Flag183
467 -- Has_Stream_Size_Clause Flag184
468 -- Is_Ada_2005_Only Flag185
469 -- Is_Interface Flag186
470 -- Has_Constrained_Partial_View Flag187
471 -- Uses_Lock_Free Flag188
472 -- Is_Pure_Unit_Access_Type Flag189
473 -- Has_Specified_Stream_Input Flag190
475 -- Has_Specified_Stream_Output Flag191
476 -- Has_Specified_Stream_Read Flag192
477 -- Has_Specified_Stream_Write Flag193
478 -- Is_Local_Anonymous_Access Flag194
479 -- Is_Primitive_Wrapper Flag195
480 -- Was_Hidden Flag196
481 -- Is_Limited_Interface Flag197
482 -- Has_Pragma_Ordered Flag198
483 -- Is_Ada_2012_Only Flag199
485 -- Has_Delayed_Aspects Flag200
486 -- Has_Pragma_No_Inline Flag201
487 -- Itype_Printed Flag202
488 -- Has_Pragma_Pure Flag203
489 -- Is_Known_Null Flag204
490 -- Low_Bound_Tested Flag205
491 -- Is_Visible_Formal Flag206
492 -- Known_To_Have_Preelab_Init Flag207
493 -- Must_Have_Preelab_Init Flag208
494 -- Is_Return_Object Flag209
495 -- Elaborate_Body_Desirable Flag210
497 -- Has_Static_Discriminants Flag211
498 -- Has_Pragma_Unreferenced_Objects Flag212
499 -- Requires_Overriding Flag213
501 -- Has_Up_Level_Access Flag215
502 -- Universal_Aliasing Flag216
503 -- Suppress_Value_Tracking_On_Call Flag217
504 -- Is_Primitive Flag218
505 -- Has_Initial_Value Flag219
506 -- Has_Dispatch_Table Flag220
508 -- Has_Pragma_Preelab_Init Flag221
509 -- Used_As_Generic_Actual Flag222
510 -- Is_Descendent_Of_Address Flag223
513 -- Is_Only_Out_Parameter Flag226
514 -- Referenced_As_Out_Parameter Flag227
515 -- Has_Thunks Flag228
516 -- Can_Use_Internal_Rep Flag229
517 -- Has_Pragma_Inline_Always Flag230
519 -- Renamed_In_Spec Flag231
520 -- Has_Invariants Flag232
521 -- Has_Pragma_Unmodified Flag233
522 -- Is_Dispatch_Table_Entity Flag234
523 -- Is_Trivial_Subprogram Flag235
524 -- Warnings_Off_Used Flag236
525 -- Warnings_Off_Used_Unmodified Flag237
526 -- Warnings_Off_Used_Unreferenced Flag238
527 -- OK_To_Reorder_Components Flag239
528 -- Has_Postconditions Flag240
530 -- Optimize_Alignment_Space Flag241
531 -- Optimize_Alignment_Time Flag242
532 -- Overlays_Constant Flag243
533 -- Is_RACW_Stub_Type Flag244
534 -- Is_Private_Primitive Flag245
535 -- Is_Underlying_Record_View Flag246
536 -- OK_To_Rename Flag247
537 -- Has_Inheritable_Invariants Flag248
538 -- Is_Safe_To_Reevaluate Flag249
539 -- Has_Predicates Flag250
541 -- Has_Implicit_Dereference Flag251
542 -- Is_Processed_Transient Flag252
543 -- Has_Anonymous_Master Flag253
544 -- Is_Implementation_Defined Flag254
545 -- Is_Predicate_Function Flag255
546 -- Is_Predicate_Function_M Flag256
547 -- Is_Invariant_Procedure Flag257
548 -- Has_Dynamic_Predicate_Aspect Flag258
549 -- Has_Static_Predicate_Aspect Flag259
550 -- Has_Loop_Entry_Attributes Flag260
552 -- Has_Delayed_Rep_Aspects Flag261
553 -- May_Inherit_Delayed_Rep_Aspects Flag262
554 -- Has_Null_Refinement Flag263
582 -- Note: Flag287-317 are defined in atree.ads/adb, but not yet in atree.h
584 -----------------------
585 -- Local subprograms --
586 -----------------------
590 Opt_Nam : Name_Id) return Boolean;
591 -- Determine whether abstract state State has a particular option denoted
592 -- by the name Opt_Nam.
598 function Float_Rep (Id : E) return F is
599 pragma Assert (Is_Floating_Point_Type (Id));
601 return F'Val (UI_To_Int (Uint10 (Base_Type (Id))));
610 Opt_Nam : Name_Id) return Boolean
612 Par : constant Node_Id := Parent (State);
616 pragma Assert (Ekind (State) = E_Abstract_State);
618 -- States with options appear as extension aggregates in the tree
620 if Nkind (Par) = N_Extension_Aggregate then
621 if Opt_Nam = Name_Part_Of then
622 return Present (Component_Associations (Par));
625 Opt := First (Expressions (Par));
626 while Present (Opt) loop
627 if Chars (Opt) = Opt_Nam then
639 --------------------------------
640 -- Attribute Access Functions --
641 --------------------------------
643 function Abstract_States (Id : E) return L is
645 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
649 function Accept_Address (Id : E) return L is
654 function Access_Disp_Table (Id : E) return L is
656 pragma Assert (Ekind_In (Id, E_Record_Type,
658 return Elist16 (Implementation_Base_Type (Id));
659 end Access_Disp_Table;
661 function Actual_Subtype (Id : E) return E is
664 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
665 or else Is_Formal (Id));
669 function Address_Taken (Id : E) return B is
674 function Alias (Id : E) return E is
677 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
681 function Alignment (Id : E) return U is
683 pragma Assert (Is_Type (Id)
684 or else Is_Formal (Id)
685 or else Ekind_In (Id, E_Loop_Parameter,
692 function Associated_Formal_Package (Id : E) return E is
694 pragma Assert (Ekind (Id) = E_Package);
696 end Associated_Formal_Package;
698 function Associated_Node_For_Itype (Id : E) return N is
701 end Associated_Node_For_Itype;
703 function Associated_Storage_Pool (Id : E) return E is
705 pragma Assert (Is_Access_Type (Id));
706 return Node22 (Root_Type (Id));
707 end Associated_Storage_Pool;
709 function Barrier_Function (Id : E) return N is
711 pragma Assert (Is_Entry (Id));
713 end Barrier_Function;
715 function Block_Node (Id : E) return N is
717 pragma Assert (Ekind (Id) = E_Block);
721 function Body_Entity (Id : E) return E is
723 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
727 function Body_Needed_For_SAL (Id : E) return B is
730 (Ekind (Id) = E_Package
731 or else Is_Subprogram (Id)
732 or else Is_Generic_Unit (Id));
734 end Body_Needed_For_SAL;
736 function C_Pass_By_Copy (Id : E) return B is
738 pragma Assert (Is_Record_Type (Id));
739 return Flag125 (Implementation_Base_Type (Id));
742 function Can_Never_Be_Null (Id : E) return B is
745 end Can_Never_Be_Null;
747 function Checks_May_Be_Suppressed (Id : E) return B is
750 end Checks_May_Be_Suppressed;
752 function Class_Wide_Type (Id : E) return E is
754 pragma Assert (Is_Type (Id));
758 function Cloned_Subtype (Id : E) return E is
760 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
764 function Component_Bit_Offset (Id : E) return U is
766 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
768 end Component_Bit_Offset;
770 function Component_Clause (Id : E) return N is
772 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
774 end Component_Clause;
776 function Component_Size (Id : E) return U is
778 pragma Assert (Is_Array_Type (Id));
779 return Uint22 (Implementation_Base_Type (Id));
782 function Component_Type (Id : E) return E is
784 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
785 return Node20 (Implementation_Base_Type (Id));
788 function Corresponding_Concurrent_Type (Id : E) return E is
790 pragma Assert (Ekind (Id) = E_Record_Type);
792 end Corresponding_Concurrent_Type;
794 function Corresponding_Discriminant (Id : E) return E is
796 pragma Assert (Ekind (Id) = E_Discriminant);
798 end Corresponding_Discriminant;
800 function Corresponding_Equality (Id : E) return E is
803 (Ekind (Id) = E_Function
804 and then not Comes_From_Source (Id)
805 and then Chars (Id) = Name_Op_Ne);
807 end Corresponding_Equality;
809 function Corresponding_Protected_Entry (Id : E) return E is
811 pragma Assert (Ekind (Id) = E_Subprogram_Body);
813 end Corresponding_Protected_Entry;
815 function Corresponding_Record_Type (Id : E) return E is
817 pragma Assert (Is_Concurrent_Type (Id));
819 end Corresponding_Record_Type;
821 function Corresponding_Remote_Type (Id : E) return E is
824 end Corresponding_Remote_Type;
826 function Current_Use_Clause (Id : E) return E is
828 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
830 end Current_Use_Clause;
832 function Current_Value (Id : E) return N is
834 pragma Assert (Ekind (Id) in Object_Kind);
838 function CR_Discriminant (Id : E) return E is
843 function Debug_Info_Off (Id : E) return B is
848 function Debug_Renaming_Link (Id : E) return E is
851 end Debug_Renaming_Link;
853 function Default_Aspect_Component_Value (Id : E) return N is
855 pragma Assert (Is_Array_Type (Id));
857 end Default_Aspect_Component_Value;
859 function Default_Aspect_Value (Id : E) return N is
861 pragma Assert (Is_Scalar_Type (Id));
863 end Default_Aspect_Value;
865 function Default_Expr_Function (Id : E) return E is
867 pragma Assert (Is_Formal (Id));
869 end Default_Expr_Function;
871 function Default_Expressions_Processed (Id : E) return B is
874 end Default_Expressions_Processed;
876 function Default_Value (Id : E) return N is
878 pragma Assert (Is_Formal (Id));
882 function Delay_Cleanups (Id : E) return B is
887 function Delay_Subprogram_Descriptors (Id : E) return B is
890 end Delay_Subprogram_Descriptors;
892 function Delta_Value (Id : E) return R is
894 pragma Assert (Is_Fixed_Point_Type (Id));
898 function Dependent_Instances (Id : E) return L is
900 pragma Assert (Is_Generic_Instance (Id));
902 end Dependent_Instances;
904 function Depends_On_Private (Id : E) return B is
906 pragma Assert (Nkind (Id) in N_Entity);
908 end Depends_On_Private;
910 function Digits_Value (Id : E) return U is
913 (Is_Floating_Point_Type (Id)
914 or else Is_Decimal_Fixed_Point_Type (Id));
918 function Direct_Primitive_Operations (Id : E) return L is
920 pragma Assert (Is_Tagged_Type (Id));
922 end Direct_Primitive_Operations;
924 function Directly_Designated_Type (Id : E) return E is
926 pragma Assert (Is_Access_Type (Id));
928 end Directly_Designated_Type;
930 function Discard_Names (Id : E) return B is
935 function Discriminal (Id : E) return E is
937 pragma Assert (Ekind (Id) = E_Discriminant);
941 function Discriminal_Link (Id : E) return N is
944 end Discriminal_Link;
946 function Discriminant_Checking_Func (Id : E) return E is
948 pragma Assert (Ekind (Id) = E_Component);
950 end Discriminant_Checking_Func;
952 function Discriminant_Constraint (Id : E) return L is
954 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
956 end Discriminant_Constraint;
958 function Discriminant_Default_Value (Id : E) return N is
960 pragma Assert (Ekind (Id) = E_Discriminant);
962 end Discriminant_Default_Value;
964 function Discriminant_Number (Id : E) return U is
966 pragma Assert (Ekind (Id) = E_Discriminant);
968 end Discriminant_Number;
970 function Dispatch_Table_Wrappers (Id : E) return L is
972 pragma Assert (Ekind_In (Id, E_Record_Type,
974 return Elist26 (Implementation_Base_Type (Id));
975 end Dispatch_Table_Wrappers;
977 function DT_Entry_Count (Id : E) return U is
979 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
983 function DT_Offset_To_Top_Func (Id : E) return E is
985 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
987 end DT_Offset_To_Top_Func;
989 function DT_Position (Id : E) return U is
991 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
992 and then Present (DTC_Entity (Id)));
996 function DTC_Entity (Id : E) return E is
998 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1002 function Elaborate_Body_Desirable (Id : E) return B is
1004 pragma Assert (Ekind (Id) = E_Package);
1005 return Flag210 (Id);
1006 end Elaborate_Body_Desirable;
1008 function Elaboration_Entity (Id : E) return E is
1013 Ekind (Id) = E_Package
1015 Is_Generic_Unit (Id));
1017 end Elaboration_Entity;
1019 function Elaboration_Entity_Required (Id : E) return B is
1024 Ekind (Id) = E_Package
1026 Is_Generic_Unit (Id));
1027 return Flag174 (Id);
1028 end Elaboration_Entity_Required;
1030 function Enclosing_Scope (Id : E) return E is
1033 end Enclosing_Scope;
1035 function Entry_Accepted (Id : E) return B is
1037 pragma Assert (Is_Entry (Id));
1038 return Flag152 (Id);
1041 function Entry_Bodies_Array (Id : E) return E is
1044 end Entry_Bodies_Array;
1046 function Entry_Cancel_Parameter (Id : E) return E is
1049 end Entry_Cancel_Parameter;
1051 function Entry_Component (Id : E) return E is
1054 end Entry_Component;
1056 function Entry_Formal (Id : E) return E is
1061 function Entry_Index_Constant (Id : E) return N is
1063 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
1065 end Entry_Index_Constant;
1067 function Contract (Id : E) return N is
1070 (Ekind_In (Id, E_Entry,
1076 or else Is_Generic_Subprogram (Id)
1077 or else Is_Subprogram (Id));
1081 function Entry_Parameters_Type (Id : E) return E is
1084 end Entry_Parameters_Type;
1086 function Enum_Pos_To_Rep (Id : E) return E is
1088 pragma Assert (Ekind (Id) = E_Enumeration_Type);
1090 end Enum_Pos_To_Rep;
1092 function Enumeration_Pos (Id : E) return Uint is
1094 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1096 end Enumeration_Pos;
1098 function Enumeration_Rep (Id : E) return U is
1100 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1102 end Enumeration_Rep;
1104 function Enumeration_Rep_Expr (Id : E) return N is
1106 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1108 end Enumeration_Rep_Expr;
1110 function Equivalent_Type (Id : E) return E is
1113 (Ekind_In (Id, E_Class_Wide_Type,
1114 E_Class_Wide_Subtype,
1115 E_Access_Subprogram_Type,
1116 E_Access_Protected_Subprogram_Type,
1117 E_Anonymous_Access_Protected_Subprogram_Type,
1118 E_Access_Subprogram_Type,
1121 end Equivalent_Type;
1123 function Esize (Id : E) return Uint is
1128 function Exception_Code (Id : E) return Uint is
1130 pragma Assert (Ekind (Id) = E_Exception);
1134 function Extra_Accessibility (Id : E) return E is
1137 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
1139 end Extra_Accessibility;
1141 function Extra_Accessibility_Of_Result (Id : E) return E is
1143 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
1145 end Extra_Accessibility_Of_Result;
1147 function Extra_Constrained (Id : E) return E is
1149 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1151 end Extra_Constrained;
1153 function Extra_Formal (Id : E) return E is
1158 function Extra_Formals (Id : E) return E is
1161 (Is_Overloadable (Id)
1162 or else Ekind_In (Id, E_Entry_Family,
1164 E_Subprogram_Type));
1168 function Can_Use_Internal_Rep (Id : E) return B is
1170 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1171 return Flag229 (Base_Type (Id));
1172 end Can_Use_Internal_Rep;
1174 function Finalization_Master (Id : E) return E is
1176 pragma Assert (Is_Access_Type (Id));
1177 return Node23 (Root_Type (Id));
1178 end Finalization_Master;
1180 function Finalize_Storage_Only (Id : E) return B is
1182 pragma Assert (Is_Type (Id));
1183 return Flag158 (Base_Type (Id));
1184 end Finalize_Storage_Only;
1186 function Finalizer (Id : E) return E is
1188 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
1192 function First_Entity (Id : E) return E is
1197 function First_Exit_Statement (Id : E) return N is
1199 pragma Assert (Ekind (Id) = E_Loop);
1201 end First_Exit_Statement;
1203 function First_Index (Id : E) return N is
1205 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1209 function First_Literal (Id : E) return E is
1211 pragma Assert (Is_Enumeration_Type (Id));
1215 function First_Optional_Parameter (Id : E) return E is
1217 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1219 end First_Optional_Parameter;
1221 function First_Private_Entity (Id : E) return E is
1223 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1224 or else Ekind (Id) in Concurrent_Kind);
1226 end First_Private_Entity;
1228 function First_Rep_Item (Id : E) return E is
1233 function Freeze_Node (Id : E) return N is
1238 function From_With_Type (Id : E) return B is
1240 return Flag159 (Id);
1243 function Full_View (Id : E) return E is
1245 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1249 function Generic_Homonym (Id : E) return E is
1251 pragma Assert (Ekind (Id) = E_Generic_Package);
1253 end Generic_Homonym;
1255 function Generic_Renamings (Id : E) return L is
1257 return Elist23 (Id);
1258 end Generic_Renamings;
1260 function Handler_Records (Id : E) return S is
1263 end Handler_Records;
1265 function Has_Aliased_Components (Id : E) return B is
1267 return Flag135 (Implementation_Base_Type (Id));
1268 end Has_Aliased_Components;
1270 function Has_Alignment_Clause (Id : E) return B is
1273 end Has_Alignment_Clause;
1275 function Has_All_Calls_Remote (Id : E) return B is
1278 end Has_All_Calls_Remote;
1280 function Has_Anonymous_Master (Id : E) return B is
1283 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
1284 return Flag253 (Id);
1285 end Has_Anonymous_Master;
1287 function Has_Atomic_Components (Id : E) return B is
1289 return Flag86 (Implementation_Base_Type (Id));
1290 end Has_Atomic_Components;
1292 function Has_Biased_Representation (Id : E) return B is
1294 return Flag139 (Id);
1295 end Has_Biased_Representation;
1297 function Has_Completion (Id : E) return B is
1302 function Has_Completion_In_Body (Id : E) return B is
1304 pragma Assert (Is_Type (Id));
1306 end Has_Completion_In_Body;
1308 function Has_Complex_Representation (Id : E) return B is
1310 pragma Assert (Is_Type (Id));
1311 return Flag140 (Implementation_Base_Type (Id));
1312 end Has_Complex_Representation;
1314 function Has_Component_Size_Clause (Id : E) return B is
1316 pragma Assert (Is_Array_Type (Id));
1317 return Flag68 (Implementation_Base_Type (Id));
1318 end Has_Component_Size_Clause;
1320 function Has_Constrained_Partial_View (Id : E) return B is
1322 pragma Assert (Is_Type (Id));
1323 return Flag187 (Id);
1324 end Has_Constrained_Partial_View;
1326 function Has_Controlled_Component (Id : E) return B is
1328 return Flag43 (Base_Type (Id));
1329 end Has_Controlled_Component;
1331 function Has_Contiguous_Rep (Id : E) return B is
1333 return Flag181 (Id);
1334 end Has_Contiguous_Rep;
1336 function Has_Controlling_Result (Id : E) return B is
1339 end Has_Controlling_Result;
1341 function Has_Convention_Pragma (Id : E) return B is
1343 return Flag119 (Id);
1344 end Has_Convention_Pragma;
1346 function Has_Default_Aspect (Id : E) return B is
1348 return Flag39 (Base_Type (Id));
1349 end Has_Default_Aspect;
1351 function Has_Delayed_Aspects (Id : E) return B is
1353 pragma Assert (Nkind (Id) in N_Entity);
1354 return Flag200 (Id);
1355 end Has_Delayed_Aspects;
1357 function Has_Delayed_Freeze (Id : E) return B is
1359 pragma Assert (Nkind (Id) in N_Entity);
1361 end Has_Delayed_Freeze;
1363 function Has_Delayed_Rep_Aspects (Id : E) return B is
1365 pragma Assert (Nkind (Id) in N_Entity);
1366 return Flag261 (Id);
1367 end Has_Delayed_Rep_Aspects;
1369 function Has_Discriminants (Id : E) return B is
1371 pragma Assert (Nkind (Id) in N_Entity);
1373 end Has_Discriminants;
1375 function Has_Dispatch_Table (Id : E) return B is
1377 pragma Assert (Is_Tagged_Type (Id));
1378 return Flag220 (Id);
1379 end Has_Dispatch_Table;
1381 function Has_Dynamic_Predicate_Aspect (Id : E) return B is
1383 pragma Assert (Is_Type (Id));
1384 return Flag258 (Id);
1385 end Has_Dynamic_Predicate_Aspect;
1387 function Has_Enumeration_Rep_Clause (Id : E) return B is
1389 pragma Assert (Is_Enumeration_Type (Id));
1391 end Has_Enumeration_Rep_Clause;
1393 function Has_Exit (Id : E) return B is
1398 function Has_External_Tag_Rep_Clause (Id : E) return B is
1400 pragma Assert (Is_Tagged_Type (Id));
1401 return Flag110 (Id);
1402 end Has_External_Tag_Rep_Clause;
1404 function Has_Forward_Instantiation (Id : E) return B is
1406 return Flag175 (Id);
1407 end Has_Forward_Instantiation;
1409 function Has_Fully_Qualified_Name (Id : E) return B is
1411 return Flag173 (Id);
1412 end Has_Fully_Qualified_Name;
1414 function Has_Gigi_Rep_Item (Id : E) return B is
1417 end Has_Gigi_Rep_Item;
1419 function Has_Homonym (Id : E) return B is
1424 function Has_Implicit_Dereference (Id : E) return B is
1426 return Flag251 (Id);
1427 end Has_Implicit_Dereference;
1429 function Has_Independent_Components (Id : E) return B is
1431 pragma Assert (Is_Object (Id) or else Is_Type (Id));
1433 end Has_Independent_Components;
1435 function Has_Inheritable_Invariants (Id : E) return B is
1437 pragma Assert (Is_Type (Id));
1438 return Flag248 (Id);
1439 end Has_Inheritable_Invariants;
1441 function Has_Initial_Value (Id : E) return B is
1443 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1444 return Flag219 (Id);
1445 end Has_Initial_Value;
1447 function Has_Invariants (Id : E) return B is
1449 pragma Assert (Is_Type (Id));
1450 return Flag232 (Id);
1453 function Has_Loop_Entry_Attributes (Id : E) return B is
1455 pragma Assert (Ekind (Id) = E_Loop);
1456 return Flag260 (Id);
1457 end Has_Loop_Entry_Attributes;
1459 function Has_Machine_Radix_Clause (Id : E) return B is
1461 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1463 end Has_Machine_Radix_Clause;
1465 function Has_Master_Entity (Id : E) return B is
1468 end Has_Master_Entity;
1470 function Has_Missing_Return (Id : E) return B is
1472 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1473 return Flag142 (Id);
1474 end Has_Missing_Return;
1476 function Has_Nested_Block_With_Handler (Id : E) return B is
1478 return Flag101 (Id);
1479 end Has_Nested_Block_With_Handler;
1481 function Has_Non_Standard_Rep (Id : E) return B is
1483 return Flag75 (Implementation_Base_Type (Id));
1484 end Has_Non_Standard_Rep;
1486 function Has_Null_Refinement (Id : E) return B is
1488 pragma Assert (Ekind (Id) = E_Abstract_State);
1489 return Flag263 (Id);
1490 end Has_Null_Refinement;
1492 function Has_Object_Size_Clause (Id : E) return B is
1494 pragma Assert (Is_Type (Id));
1495 return Flag172 (Id);
1496 end Has_Object_Size_Clause;
1498 function Has_Per_Object_Constraint (Id : E) return B is
1500 return Flag154 (Id);
1501 end Has_Per_Object_Constraint;
1503 function Has_Postconditions (Id : E) return B is
1505 pragma Assert (Is_Subprogram (Id));
1506 return Flag240 (Id);
1507 end Has_Postconditions;
1509 function Has_Pragma_Controlled (Id : E) return B is
1511 pragma Assert (Is_Access_Type (Id));
1512 return Flag27 (Implementation_Base_Type (Id));
1513 end Has_Pragma_Controlled;
1515 function Has_Pragma_Elaborate_Body (Id : E) return B is
1517 return Flag150 (Id);
1518 end Has_Pragma_Elaborate_Body;
1520 function Has_Pragma_Inline (Id : E) return B is
1522 return Flag157 (Id);
1523 end Has_Pragma_Inline;
1525 function Has_Pragma_Inline_Always (Id : E) return B is
1527 return Flag230 (Id);
1528 end Has_Pragma_Inline_Always;
1530 function Has_Pragma_No_Inline (Id : E) return B is
1532 return Flag201 (Id);
1533 end Has_Pragma_No_Inline;
1535 function Has_Pragma_Ordered (Id : E) return B is
1537 pragma Assert (Is_Enumeration_Type (Id));
1538 return Flag198 (Implementation_Base_Type (Id));
1539 end Has_Pragma_Ordered;
1541 function Has_Pragma_Pack (Id : E) return B is
1543 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1544 return Flag121 (Implementation_Base_Type (Id));
1545 end Has_Pragma_Pack;
1547 function Has_Pragma_Preelab_Init (Id : E) return B is
1549 return Flag221 (Id);
1550 end Has_Pragma_Preelab_Init;
1552 function Has_Pragma_Pure (Id : E) return B is
1554 return Flag203 (Id);
1555 end Has_Pragma_Pure;
1557 function Has_Pragma_Pure_Function (Id : E) return B is
1559 return Flag179 (Id);
1560 end Has_Pragma_Pure_Function;
1562 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1564 return Flag169 (Id);
1565 end Has_Pragma_Thread_Local_Storage;
1567 function Has_Pragma_Unmodified (Id : E) return B is
1569 return Flag233 (Id);
1570 end Has_Pragma_Unmodified;
1572 function Has_Pragma_Unreferenced (Id : E) return B is
1574 return Flag180 (Id);
1575 end Has_Pragma_Unreferenced;
1577 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1579 pragma Assert (Is_Type (Id));
1580 return Flag212 (Id);
1581 end Has_Pragma_Unreferenced_Objects;
1583 function Has_Predicates (Id : E) return B is
1585 pragma Assert (Is_Type (Id));
1586 return Flag250 (Id);
1589 function Has_Primitive_Operations (Id : E) return B is
1591 pragma Assert (Is_Type (Id));
1592 return Flag120 (Base_Type (Id));
1593 end Has_Primitive_Operations;
1595 function Has_Private_Ancestor (Id : E) return B is
1597 return Flag151 (Id);
1598 end Has_Private_Ancestor;
1600 function Has_Private_Declaration (Id : E) return B is
1602 return Flag155 (Id);
1603 end Has_Private_Declaration;
1605 function Has_Qualified_Name (Id : E) return B is
1607 return Flag161 (Id);
1608 end Has_Qualified_Name;
1610 function Has_RACW (Id : E) return B is
1612 pragma Assert (Ekind (Id) = E_Package);
1613 return Flag214 (Id);
1616 function Has_Record_Rep_Clause (Id : E) return B is
1618 pragma Assert (Is_Record_Type (Id));
1619 return Flag65 (Implementation_Base_Type (Id));
1620 end Has_Record_Rep_Clause;
1622 function Has_Recursive_Call (Id : E) return B is
1624 pragma Assert (Is_Subprogram (Id));
1625 return Flag143 (Id);
1626 end Has_Recursive_Call;
1628 function Has_Size_Clause (Id : E) return B is
1631 end Has_Size_Clause;
1633 function Has_Small_Clause (Id : E) return B is
1636 end Has_Small_Clause;
1638 function Has_Specified_Layout (Id : E) return B is
1640 pragma Assert (Is_Type (Id));
1641 return Flag100 (Implementation_Base_Type (Id));
1642 end Has_Specified_Layout;
1644 function Has_Specified_Stream_Input (Id : E) return B is
1646 pragma Assert (Is_Type (Id));
1647 return Flag190 (Id);
1648 end Has_Specified_Stream_Input;
1650 function Has_Specified_Stream_Output (Id : E) return B is
1652 pragma Assert (Is_Type (Id));
1653 return Flag191 (Id);
1654 end Has_Specified_Stream_Output;
1656 function Has_Specified_Stream_Read (Id : E) return B is
1658 pragma Assert (Is_Type (Id));
1659 return Flag192 (Id);
1660 end Has_Specified_Stream_Read;
1662 function Has_Specified_Stream_Write (Id : E) return B is
1664 pragma Assert (Is_Type (Id));
1665 return Flag193 (Id);
1666 end Has_Specified_Stream_Write;
1668 function Has_Static_Discriminants (Id : E) return B is
1670 pragma Assert (Is_Type (Id));
1671 return Flag211 (Id);
1672 end Has_Static_Discriminants;
1674 function Has_Static_Predicate_Aspect (Id : E) return B is
1676 pragma Assert (Is_Type (Id));
1677 return Flag259 (Id);
1678 end Has_Static_Predicate_Aspect;
1680 function Has_Storage_Size_Clause (Id : E) return B is
1682 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1683 return Flag23 (Implementation_Base_Type (Id));
1684 end Has_Storage_Size_Clause;
1686 function Has_Stream_Size_Clause (Id : E) return B is
1688 return Flag184 (Id);
1689 end Has_Stream_Size_Clause;
1691 function Has_Task (Id : E) return B is
1693 return Flag30 (Base_Type (Id));
1696 function Has_Thunks (Id : E) return B is
1698 return Flag228 (Id);
1701 function Has_Unchecked_Union (Id : E) return B is
1703 return Flag123 (Base_Type (Id));
1704 end Has_Unchecked_Union;
1706 function Has_Unknown_Discriminants (Id : E) return B is
1708 pragma Assert (Is_Type (Id));
1710 end Has_Unknown_Discriminants;
1712 function Has_Up_Level_Access (Id : E) return B is
1715 (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
1716 return Flag215 (Id);
1717 end Has_Up_Level_Access;
1719 function Has_Volatile_Components (Id : E) return B is
1721 return Flag87 (Implementation_Base_Type (Id));
1722 end Has_Volatile_Components;
1724 function Has_Xref_Entry (Id : E) return B is
1726 return Flag182 (Id);
1729 function Hiding_Loop_Variable (Id : E) return E is
1731 pragma Assert (Ekind (Id) = E_Variable);
1733 end Hiding_Loop_Variable;
1735 function Homonym (Id : E) return E is
1740 function Interface_Alias (Id : E) return E is
1742 pragma Assert (Is_Subprogram (Id));
1744 end Interface_Alias;
1746 function Interfaces (Id : E) return L is
1748 pragma Assert (Is_Record_Type (Id));
1749 return Elist25 (Id);
1752 function In_Package_Body (Id : E) return B is
1755 end In_Package_Body;
1757 function In_Private_Part (Id : E) return B is
1760 end In_Private_Part;
1762 function In_Use (Id : E) return B is
1764 pragma Assert (Nkind (Id) in N_Entity);
1768 function Initialization_Statements (Id : E) return N is
1770 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
1772 end Initialization_Statements;
1774 function Inner_Instances (Id : E) return L is
1776 return Elist23 (Id);
1777 end Inner_Instances;
1779 function Interface_Name (Id : E) return N is
1784 function Is_Abstract_Subprogram (Id : E) return B is
1786 pragma Assert (Is_Overloadable (Id));
1788 end Is_Abstract_Subprogram;
1790 function Is_Abstract_Type (Id : E) return B is
1792 pragma Assert (Is_Type (Id));
1793 return Flag146 (Id);
1794 end Is_Abstract_Type;
1796 function Is_Local_Anonymous_Access (Id : E) return B is
1798 pragma Assert (Is_Access_Type (Id));
1799 return Flag194 (Id);
1800 end Is_Local_Anonymous_Access;
1802 function Is_Access_Constant (Id : E) return B is
1804 pragma Assert (Is_Access_Type (Id));
1806 end Is_Access_Constant;
1808 function Is_Ada_2005_Only (Id : E) return B is
1810 return Flag185 (Id);
1811 end Is_Ada_2005_Only;
1813 function Is_Ada_2012_Only (Id : E) return B is
1815 return Flag199 (Id);
1816 end Is_Ada_2012_Only;
1818 function Is_Aliased (Id : E) return B is
1820 pragma Assert (Nkind (Id) in N_Entity);
1824 function Is_AST_Entry (Id : E) return B is
1826 pragma Assert (Is_Entry (Id));
1827 return Flag132 (Id);
1830 function Is_Asynchronous (Id : E) return B is
1832 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1834 end Is_Asynchronous;
1836 function Is_Atomic (Id : E) return B is
1841 function Is_Bit_Packed_Array (Id : E) return B is
1843 return Flag122 (Implementation_Base_Type (Id));
1844 end Is_Bit_Packed_Array;
1846 function Is_Called (Id : E) return B is
1848 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1849 return Flag102 (Id);
1852 function Is_Character_Type (Id : E) return B is
1855 end Is_Character_Type;
1857 function Is_Child_Unit (Id : E) return B is
1862 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1865 end Is_Class_Wide_Equivalent_Type;
1867 function Is_Compilation_Unit (Id : E) return B is
1869 return Flag149 (Id);
1870 end Is_Compilation_Unit;
1872 function Is_Completely_Hidden (Id : E) return B is
1874 pragma Assert (Ekind (Id) = E_Discriminant);
1875 return Flag103 (Id);
1876 end Is_Completely_Hidden;
1878 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1881 end Is_Constr_Subt_For_U_Nominal;
1883 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1885 return Flag141 (Id);
1886 end Is_Constr_Subt_For_UN_Aliased;
1888 function Is_Constrained (Id : E) return B is
1890 pragma Assert (Nkind (Id) in N_Entity);
1894 function Is_Constructor (Id : E) return B is
1899 function Is_Controlled (Id : E) return B is
1901 return Flag42 (Base_Type (Id));
1904 function Is_Controlling_Formal (Id : E) return B is
1906 pragma Assert (Is_Formal (Id));
1908 end Is_Controlling_Formal;
1910 function Is_CPP_Class (Id : E) return B is
1915 function Is_Descendent_Of_Address (Id : E) return B is
1917 pragma Assert (Is_Type (Id));
1918 return Flag223 (Id);
1919 end Is_Descendent_Of_Address;
1921 function Is_Discrim_SO_Function (Id : E) return B is
1923 return Flag176 (Id);
1924 end Is_Discrim_SO_Function;
1926 function Is_Dispatch_Table_Entity (Id : E) return B is
1928 return Flag234 (Id);
1929 end Is_Dispatch_Table_Entity;
1931 function Is_Dispatching_Operation (Id : E) return B is
1933 pragma Assert (Nkind (Id) in N_Entity);
1935 end Is_Dispatching_Operation;
1937 function Is_Eliminated (Id : E) return B is
1939 return Flag124 (Id);
1942 function Is_Entry_Formal (Id : E) return B is
1945 end Is_Entry_Formal;
1947 function Is_Exported (Id : E) return B is
1952 function Is_First_Subtype (Id : E) return B is
1955 end Is_First_Subtype;
1957 function Is_For_Access_Subtype (Id : E) return B is
1959 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
1960 return Flag118 (Id);
1961 end Is_For_Access_Subtype;
1963 function Is_Formal_Subprogram (Id : E) return B is
1965 return Flag111 (Id);
1966 end Is_Formal_Subprogram;
1968 function Is_Frozen (Id : E) return B is
1973 function Is_Generic_Actual_Type (Id : E) return B is
1975 pragma Assert (Is_Type (Id));
1977 end Is_Generic_Actual_Type;
1979 function Is_Generic_Instance (Id : E) return B is
1981 return Flag130 (Id);
1982 end Is_Generic_Instance;
1984 function Is_Generic_Type (Id : E) return B is
1986 pragma Assert (Nkind (Id) in N_Entity);
1988 end Is_Generic_Type;
1990 function Is_Hidden (Id : E) return B is
1995 function Is_Hidden_Open_Scope (Id : E) return B is
1997 return Flag171 (Id);
1998 end Is_Hidden_Open_Scope;
2000 function Is_Immediately_Visible (Id : E) return B is
2002 pragma Assert (Nkind (Id) in N_Entity);
2004 end Is_Immediately_Visible;
2006 function Is_Implementation_Defined (Id : E) return B is
2008 return Flag254 (Id);
2009 end Is_Implementation_Defined;
2011 function Is_Imported (Id : E) return B is
2016 function Is_Inlined (Id : E) return B is
2021 function Is_Interface (Id : E) return B is
2023 return Flag186 (Id);
2026 function Is_Instantiated (Id : E) return B is
2028 return Flag126 (Id);
2029 end Is_Instantiated;
2031 function Is_Internal (Id : E) return B is
2033 pragma Assert (Nkind (Id) in N_Entity);
2037 function Is_Interrupt_Handler (Id : E) return B is
2039 pragma Assert (Nkind (Id) in N_Entity);
2041 end Is_Interrupt_Handler;
2043 function Is_Intrinsic_Subprogram (Id : E) return B is
2046 end Is_Intrinsic_Subprogram;
2048 function Is_Invariant_Procedure (Id : E) return B is
2050 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2051 return Flag257 (Id);
2052 end Is_Invariant_Procedure;
2054 function Is_Itype (Id : E) return B is
2059 function Is_Known_Non_Null (Id : E) return B is
2062 end Is_Known_Non_Null;
2064 function Is_Known_Null (Id : E) return B is
2066 return Flag204 (Id);
2069 function Is_Known_Valid (Id : E) return B is
2071 return Flag170 (Id);
2074 function Is_Limited_Composite (Id : E) return B is
2076 return Flag106 (Id);
2077 end Is_Limited_Composite;
2079 function Is_Limited_Interface (Id : E) return B is
2081 return Flag197 (Id);
2082 end Is_Limited_Interface;
2084 function Is_Limited_Record (Id : E) return B is
2087 end Is_Limited_Record;
2089 function Is_Machine_Code_Subprogram (Id : E) return B is
2091 pragma Assert (Is_Subprogram (Id));
2092 return Flag137 (Id);
2093 end Is_Machine_Code_Subprogram;
2095 function Is_Non_Static_Subtype (Id : E) return B is
2097 pragma Assert (Is_Type (Id));
2098 return Flag109 (Id);
2099 end Is_Non_Static_Subtype;
2101 function Is_Null_Init_Proc (Id : E) return B is
2103 pragma Assert (Ekind (Id) = E_Procedure);
2104 return Flag178 (Id);
2105 end Is_Null_Init_Proc;
2107 function Is_Obsolescent (Id : E) return B is
2109 return Flag153 (Id);
2112 function Is_Only_Out_Parameter (Id : E) return B is
2114 pragma Assert (Is_Formal (Id));
2115 return Flag226 (Id);
2116 end Is_Only_Out_Parameter;
2118 function Is_Optional_Parameter (Id : E) return B is
2120 pragma Assert (Is_Formal (Id));
2121 return Flag134 (Id);
2122 end Is_Optional_Parameter;
2124 function Is_Package_Body_Entity (Id : E) return B is
2126 return Flag160 (Id);
2127 end Is_Package_Body_Entity;
2129 function Is_Packed (Id : E) return B is
2131 return Flag51 (Implementation_Base_Type (Id));
2134 function Is_Packed_Array_Type (Id : E) return B is
2136 return Flag138 (Id);
2137 end Is_Packed_Array_Type;
2139 function Is_Potentially_Use_Visible (Id : E) return B is
2141 pragma Assert (Nkind (Id) in N_Entity);
2143 end Is_Potentially_Use_Visible;
2145 function Is_Predicate_Function (Id : E) return B is
2147 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2148 return Flag255 (Id);
2149 end Is_Predicate_Function;
2151 function Is_Predicate_Function_M (Id : E) return B is
2153 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2154 return Flag256 (Id);
2155 end Is_Predicate_Function_M;
2157 function Is_Preelaborated (Id : E) return B is
2160 end Is_Preelaborated;
2162 function Is_Primitive (Id : E) return B is
2165 (Is_Overloadable (Id)
2166 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
2167 return Flag218 (Id);
2170 function Is_Primitive_Wrapper (Id : E) return B is
2172 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2173 return Flag195 (Id);
2174 end Is_Primitive_Wrapper;
2176 function Is_Private_Composite (Id : E) return B is
2178 pragma Assert (Is_Type (Id));
2179 return Flag107 (Id);
2180 end Is_Private_Composite;
2182 function Is_Private_Descendant (Id : E) return B is
2185 end Is_Private_Descendant;
2187 function Is_Private_Primitive (Id : E) return B is
2189 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2190 return Flag245 (Id);
2191 end Is_Private_Primitive;
2193 function Is_Processed_Transient (Id : E) return B is
2195 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2196 return Flag252 (Id);
2197 end Is_Processed_Transient;
2199 function Is_Public (Id : E) return B is
2201 pragma Assert (Nkind (Id) in N_Entity);
2205 function Is_Pure (Id : E) return B is
2210 function Is_Pure_Unit_Access_Type (Id : E) return B is
2212 pragma Assert (Is_Access_Type (Id));
2213 return Flag189 (Id);
2214 end Is_Pure_Unit_Access_Type;
2216 function Is_RACW_Stub_Type (Id : E) return B is
2218 pragma Assert (Is_Type (Id));
2219 return Flag244 (Id);
2220 end Is_RACW_Stub_Type;
2222 function Is_Raised (Id : E) return B is
2224 pragma Assert (Ekind (Id) = E_Exception);
2225 return Flag224 (Id);
2228 function Is_Remote_Call_Interface (Id : E) return B is
2231 end Is_Remote_Call_Interface;
2233 function Is_Remote_Types (Id : E) return B is
2236 end Is_Remote_Types;
2238 function Is_Renaming_Of_Object (Id : E) return B is
2240 return Flag112 (Id);
2241 end Is_Renaming_Of_Object;
2243 function Is_Return_Object (Id : E) return B is
2245 return Flag209 (Id);
2246 end Is_Return_Object;
2248 function Is_Safe_To_Reevaluate (Id : E) return B is
2250 return Flag249 (Id);
2251 end Is_Safe_To_Reevaluate;
2253 function Is_Shared_Passive (Id : E) return B is
2256 end Is_Shared_Passive;
2258 function Is_Statically_Allocated (Id : E) return B is
2261 end Is_Statically_Allocated;
2263 function Is_Tag (Id : E) return B is
2265 pragma Assert (Nkind (Id) in N_Entity);
2269 function Is_Tagged_Type (Id : E) return B is
2274 function Is_Thunk (Id : E) return B is
2276 return Flag225 (Id);
2279 function Is_Trivial_Subprogram (Id : E) return B is
2281 return Flag235 (Id);
2282 end Is_Trivial_Subprogram;
2284 function Is_True_Constant (Id : E) return B is
2286 return Flag163 (Id);
2287 end Is_True_Constant;
2289 function Is_Unchecked_Union (Id : E) return B is
2291 return Flag117 (Implementation_Base_Type (Id));
2292 end Is_Unchecked_Union;
2294 function Is_Underlying_Record_View (Id : E) return B is
2296 return Flag246 (Id);
2297 end Is_Underlying_Record_View;
2299 function Is_Unsigned_Type (Id : E) return B is
2301 pragma Assert (Is_Type (Id));
2302 return Flag144 (Id);
2303 end Is_Unsigned_Type;
2305 function Is_Valued_Procedure (Id : E) return B is
2307 pragma Assert (Ekind (Id) = E_Procedure);
2308 return Flag127 (Id);
2309 end Is_Valued_Procedure;
2311 function Is_Visible_Formal (Id : E) return B is
2313 return Flag206 (Id);
2314 end Is_Visible_Formal;
2316 function Is_Visible_Lib_Unit (Id : E) return B is
2318 return Flag116 (Id);
2319 end Is_Visible_Lib_Unit;
2321 function Is_VMS_Exception (Id : E) return B is
2323 return Flag133 (Id);
2324 end Is_VMS_Exception;
2326 function Is_Volatile (Id : E) return B is
2328 pragma Assert (Nkind (Id) in N_Entity);
2330 if Is_Type (Id) then
2331 return Flag16 (Base_Type (Id));
2337 function Itype_Printed (Id : E) return B is
2339 pragma Assert (Is_Itype (Id));
2340 return Flag202 (Id);
2343 function Kill_Elaboration_Checks (Id : E) return B is
2346 end Kill_Elaboration_Checks;
2348 function Kill_Range_Checks (Id : E) return B is
2351 end Kill_Range_Checks;
2353 function Known_To_Have_Preelab_Init (Id : E) return B is
2355 pragma Assert (Is_Type (Id));
2356 return Flag207 (Id);
2357 end Known_To_Have_Preelab_Init;
2359 function Last_Assignment (Id : E) return N is
2361 pragma Assert (Is_Assignable (Id));
2363 end Last_Assignment;
2365 function Last_Entity (Id : E) return E is
2370 function Limited_View (Id : E) return E is
2372 pragma Assert (Ekind (Id) = E_Package);
2376 function Lit_Indexes (Id : E) return E is
2378 pragma Assert (Is_Enumeration_Type (Id));
2382 function Lit_Strings (Id : E) return E is
2384 pragma Assert (Is_Enumeration_Type (Id));
2388 function Low_Bound_Tested (Id : E) return B is
2390 return Flag205 (Id);
2391 end Low_Bound_Tested;
2393 function Machine_Radix_10 (Id : E) return B is
2395 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2397 end Machine_Radix_10;
2399 function Master_Id (Id : E) return E is
2401 pragma Assert (Is_Access_Type (Id));
2405 function Materialize_Entity (Id : E) return B is
2407 return Flag168 (Id);
2408 end Materialize_Entity;
2410 function May_Inherit_Delayed_Rep_Aspects (Id : E) return B is
2412 return Flag262 (Id);
2413 end May_Inherit_Delayed_Rep_Aspects;
2415 function Mechanism (Id : E) return M is
2417 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2418 return UI_To_Int (Uint8 (Id));
2421 function Modulus (Id : E) return Uint is
2423 pragma Assert (Is_Modular_Integer_Type (Id));
2424 return Uint17 (Base_Type (Id));
2427 function Must_Be_On_Byte_Boundary (Id : E) return B is
2429 pragma Assert (Is_Type (Id));
2430 return Flag183 (Id);
2431 end Must_Be_On_Byte_Boundary;
2433 function Must_Have_Preelab_Init (Id : E) return B is
2435 pragma Assert (Is_Type (Id));
2436 return Flag208 (Id);
2437 end Must_Have_Preelab_Init;
2439 function Needs_Debug_Info (Id : E) return B is
2441 return Flag147 (Id);
2442 end Needs_Debug_Info;
2444 function Needs_No_Actuals (Id : E) return B is
2447 (Is_Overloadable (Id)
2448 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2450 end Needs_No_Actuals;
2452 function Never_Set_In_Source (Id : E) return B is
2454 return Flag115 (Id);
2455 end Never_Set_In_Source;
2457 function Next_Inlined_Subprogram (Id : E) return E is
2460 end Next_Inlined_Subprogram;
2462 function No_Pool_Assigned (Id : E) return B is
2464 pragma Assert (Is_Access_Type (Id));
2465 return Flag131 (Root_Type (Id));
2466 end No_Pool_Assigned;
2468 function No_Return (Id : E) return B is
2470 return Flag113 (Id);
2473 function No_Strict_Aliasing (Id : E) return B is
2475 pragma Assert (Is_Access_Type (Id));
2476 return Flag136 (Base_Type (Id));
2477 end No_Strict_Aliasing;
2479 function Non_Binary_Modulus (Id : E) return B is
2481 pragma Assert (Is_Type (Id));
2482 return Flag58 (Base_Type (Id));
2483 end Non_Binary_Modulus;
2485 function Non_Limited_View (Id : E) return E is
2487 pragma Assert (Ekind (Id) in Incomplete_Kind);
2489 end Non_Limited_View;
2491 function Nonzero_Is_True (Id : E) return B is
2493 pragma Assert (Root_Type (Id) = Standard_Boolean);
2494 return Flag162 (Base_Type (Id));
2495 end Nonzero_Is_True;
2497 function Normalized_First_Bit (Id : E) return U is
2499 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2501 end Normalized_First_Bit;
2503 function Normalized_Position (Id : E) return U is
2505 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2507 end Normalized_Position;
2509 function Normalized_Position_Max (Id : E) return U is
2511 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2513 end Normalized_Position_Max;
2515 function OK_To_Rename (Id : E) return B is
2517 pragma Assert (Ekind (Id) = E_Variable);
2518 return Flag247 (Id);
2521 function OK_To_Reorder_Components (Id : E) return B is
2523 pragma Assert (Is_Record_Type (Id));
2524 return Flag239 (Base_Type (Id));
2525 end OK_To_Reorder_Components;
2527 function Optimize_Alignment_Space (Id : E) return B is
2530 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2531 return Flag241 (Id);
2532 end Optimize_Alignment_Space;
2534 function Optimize_Alignment_Time (Id : E) return B is
2537 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2538 return Flag242 (Id);
2539 end Optimize_Alignment_Time;
2541 function Original_Access_Type (Id : E) return E is
2543 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2545 end Original_Access_Type;
2547 function Original_Array_Type (Id : E) return E is
2549 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2551 end Original_Array_Type;
2553 function Original_Record_Component (Id : E) return E is
2555 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2557 end Original_Record_Component;
2559 function Overlays_Constant (Id : E) return B is
2561 return Flag243 (Id);
2562 end Overlays_Constant;
2564 function Overridden_Operation (Id : E) return E is
2567 end Overridden_Operation;
2569 function Package_Instantiation (Id : E) return N is
2571 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2573 end Package_Instantiation;
2575 function Packed_Array_Type (Id : E) return E is
2577 pragma Assert (Is_Array_Type (Id));
2579 end Packed_Array_Type;
2581 function Parent_Subtype (Id : E) return E is
2583 pragma Assert (Is_Record_Type (Id));
2584 return Node19 (Base_Type (Id));
2587 function Postcondition_Proc (Id : E) return E is
2589 pragma Assert (Ekind (Id) = E_Procedure);
2591 end Postcondition_Proc;
2593 function PPC_Wrapper (Id : E) return E is
2595 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2599 function Prival (Id : E) return E is
2601 pragma Assert (Is_Protected_Component (Id));
2605 function Prival_Link (Id : E) return E is
2607 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2611 function Private_Dependents (Id : E) return L is
2613 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2614 return Elist18 (Id);
2615 end Private_Dependents;
2617 function Private_View (Id : E) return N is
2619 pragma Assert (Is_Private_Type (Id));
2623 function Protected_Body_Subprogram (Id : E) return E is
2625 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2627 end Protected_Body_Subprogram;
2629 function Protected_Formal (Id : E) return E is
2631 pragma Assert (Is_Formal (Id));
2633 end Protected_Formal;
2635 function Protection_Object (Id : E) return E is
2638 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2640 end Protection_Object;
2642 function Reachable (Id : E) return B is
2647 function Referenced (Id : E) return B is
2649 return Flag156 (Id);
2652 function Referenced_As_LHS (Id : E) return B is
2655 end Referenced_As_LHS;
2657 function Referenced_As_Out_Parameter (Id : E) return B is
2659 return Flag227 (Id);
2660 end Referenced_As_Out_Parameter;
2662 function Refined_State (Id : E) return N is
2664 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
2668 function Refinement_Constituents (Id : E) return L is
2670 pragma Assert (Ekind (Id) = E_Abstract_State);
2672 end Refinement_Constituents;
2674 function Register_Exception_Call (Id : E) return N is
2676 pragma Assert (Ekind (Id) = E_Exception);
2678 end Register_Exception_Call;
2680 function Related_Array_Object (Id : E) return E is
2682 pragma Assert (Is_Array_Type (Id));
2684 end Related_Array_Object;
2686 function Related_Expression (Id : E) return N is
2688 pragma Assert (Ekind (Id) in Type_Kind
2689 or else Ekind_In (Id, E_Constant, E_Variable));
2691 end Related_Expression;
2693 function Related_Instance (Id : E) return E is
2695 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2697 end Related_Instance;
2699 function Related_Type (Id : E) return E is
2701 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2705 function Relative_Deadline_Variable (Id : E) return E is
2707 pragma Assert (Is_Task_Type (Id));
2708 return Node26 (Implementation_Base_Type (Id));
2709 end Relative_Deadline_Variable;
2711 function Renamed_Entity (Id : E) return N is
2716 function Renamed_In_Spec (Id : E) return B is
2718 pragma Assert (Ekind (Id) = E_Package);
2719 return Flag231 (Id);
2720 end Renamed_In_Spec;
2722 function Renamed_Object (Id : E) return N is
2727 function Renaming_Map (Id : E) return U is
2732 function Requires_Overriding (Id : E) return B is
2734 pragma Assert (Is_Overloadable (Id));
2735 return Flag213 (Id);
2736 end Requires_Overriding;
2738 function Return_Present (Id : E) return B is
2743 function Return_Applies_To (Id : E) return N is
2746 end Return_Applies_To;
2748 function Returns_By_Ref (Id : E) return B is
2753 function Reverse_Bit_Order (Id : E) return B is
2755 pragma Assert (Is_Record_Type (Id));
2756 return Flag164 (Base_Type (Id));
2757 end Reverse_Bit_Order;
2759 function Reverse_Storage_Order (Id : E) return B is
2761 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
2762 return Flag93 (Base_Type (Id));
2763 end Reverse_Storage_Order;
2765 function RM_Size (Id : E) return U is
2767 pragma Assert (Is_Type (Id));
2771 function Scalar_Range (Id : E) return N is
2776 function Scale_Value (Id : E) return U is
2781 function Scope_Depth_Value (Id : E) return U is
2784 end Scope_Depth_Value;
2786 function Sec_Stack_Needed_For_Return (Id : E) return B is
2788 return Flag167 (Id);
2789 end Sec_Stack_Needed_For_Return;
2791 function Shadow_Entities (Id : E) return S is
2793 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2795 end Shadow_Entities;
2797 function Shared_Var_Procs_Instance (Id : E) return E is
2799 pragma Assert (Ekind (Id) = E_Variable);
2801 end Shared_Var_Procs_Instance;
2803 function Size_Check_Code (Id : E) return N is
2805 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2807 end Size_Check_Code;
2809 function Size_Depends_On_Discriminant (Id : E) return B is
2811 return Flag177 (Id);
2812 end Size_Depends_On_Discriminant;
2814 function Size_Known_At_Compile_Time (Id : E) return B is
2817 end Size_Known_At_Compile_Time;
2819 function Small_Value (Id : E) return R is
2821 pragma Assert (Is_Fixed_Point_Type (Id));
2822 return Ureal21 (Id);
2825 function SPARK_Mode_Pragmas (Id : E) return N is
2828 (Ekind_In (Id, E_Function, -- subprogram variants
2830 E_Generic_Procedure,
2834 Ekind_In (Id, E_Generic_Package, -- package variants
2838 end SPARK_Mode_Pragmas;
2840 function Spec_Entity (Id : E) return E is
2842 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2846 function Static_Predicate (Id : E) return S is
2848 pragma Assert (Is_Discrete_Type (Id));
2850 end Static_Predicate;
2852 function Status_Flag_Or_Transient_Decl (Id : E) return N is
2854 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2856 end Status_Flag_Or_Transient_Decl;
2858 function Storage_Size_Variable (Id : E) return E is
2860 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2861 return Node15 (Implementation_Base_Type (Id));
2862 end Storage_Size_Variable;
2864 function Static_Elaboration_Desired (Id : E) return B is
2866 pragma Assert (Ekind (Id) = E_Package);
2868 end Static_Elaboration_Desired;
2870 function Static_Initialization (Id : E) return N is
2873 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
2875 end Static_Initialization;
2877 function Stored_Constraint (Id : E) return L is
2880 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
2881 return Elist23 (Id);
2882 end Stored_Constraint;
2884 function Strict_Alignment (Id : E) return B is
2886 return Flag145 (Implementation_Base_Type (Id));
2887 end Strict_Alignment;
2889 function String_Literal_Length (Id : E) return U is
2892 end String_Literal_Length;
2894 function String_Literal_Low_Bound (Id : E) return N is
2897 end String_Literal_Low_Bound;
2899 function Subprograms_For_Type (Id : E) return E is
2901 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
2903 end Subprograms_For_Type;
2905 function Suppress_Elaboration_Warnings (Id : E) return B is
2907 return Flag148 (Id);
2908 end Suppress_Elaboration_Warnings;
2910 function Suppress_Initialization (Id : E) return B is
2912 pragma Assert (Is_Type (Id));
2913 return Flag105 (Id);
2914 end Suppress_Initialization;
2916 function Suppress_Style_Checks (Id : E) return B is
2918 return Flag165 (Id);
2919 end Suppress_Style_Checks;
2921 function Suppress_Value_Tracking_On_Call (Id : E) return B is
2923 return Flag217 (Id);
2924 end Suppress_Value_Tracking_On_Call;
2926 function Task_Body_Procedure (Id : E) return N is
2928 pragma Assert (Ekind (Id) in Task_Kind);
2930 end Task_Body_Procedure;
2932 function Thunk_Entity (Id : E) return E is
2934 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
2935 and then Is_Thunk (Id));
2939 function Treat_As_Volatile (Id : E) return B is
2942 end Treat_As_Volatile;
2944 function Underlying_Full_View (Id : E) return E is
2946 pragma Assert (Ekind (Id) in Private_Kind);
2948 end Underlying_Full_View;
2950 function Underlying_Record_View (Id : E) return E is
2953 end Underlying_Record_View;
2955 function Universal_Aliasing (Id : E) return B is
2957 pragma Assert (Is_Type (Id));
2958 return Flag216 (Implementation_Base_Type (Id));
2959 end Universal_Aliasing;
2961 function Unset_Reference (Id : E) return N is
2964 end Unset_Reference;
2966 function Used_As_Generic_Actual (Id : E) return B is
2968 return Flag222 (Id);
2969 end Used_As_Generic_Actual;
2971 function Uses_Lock_Free (Id : E) return B is
2973 pragma Assert (Is_Protected_Type (Id));
2974 return Flag188 (Id);
2977 function Uses_Sec_Stack (Id : E) return B is
2982 function Warnings_Off (Id : E) return B is
2987 function Warnings_Off_Used (Id : E) return B is
2989 return Flag236 (Id);
2990 end Warnings_Off_Used;
2992 function Warnings_Off_Used_Unmodified (Id : E) return B is
2994 return Flag237 (Id);
2995 end Warnings_Off_Used_Unmodified;
2997 function Warnings_Off_Used_Unreferenced (Id : E) return B is
2999 return Flag238 (Id);
3000 end Warnings_Off_Used_Unreferenced;
3002 function Wrapped_Entity (Id : E) return E is
3004 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3005 and then Is_Primitive_Wrapper (Id));
3009 function Was_Hidden (Id : E) return B is
3011 return Flag196 (Id);
3014 ------------------------------
3015 -- Classification Functions --
3016 ------------------------------
3018 function Is_Access_Type (Id : E) return B is
3020 return Ekind (Id) in Access_Kind;
3023 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
3025 return Ekind (Id) in Access_Protected_Kind;
3026 end Is_Access_Protected_Subprogram_Type;
3028 function Is_Access_Subprogram_Type (Id : E) return B is
3030 return Ekind (Id) in Access_Subprogram_Kind;
3031 end Is_Access_Subprogram_Type;
3033 function Is_Aggregate_Type (Id : E) return B is
3035 return Ekind (Id) in Aggregate_Kind;
3036 end Is_Aggregate_Type;
3038 function Is_Array_Type (Id : E) return B is
3040 return Ekind (Id) in Array_Kind;
3043 function Is_Assignable (Id : E) return B is
3045 return Ekind (Id) in Assignable_Kind;
3048 function Is_Class_Wide_Type (Id : E) return B is
3050 return Ekind (Id) in Class_Wide_Kind;
3051 end Is_Class_Wide_Type;
3053 function Is_Composite_Type (Id : E) return B is
3055 return Ekind (Id) in Composite_Kind;
3056 end Is_Composite_Type;
3058 function Is_Concurrent_Body (Id : E) return B is
3060 return Ekind (Id) in
3061 Concurrent_Body_Kind;
3062 end Is_Concurrent_Body;
3064 function Is_Concurrent_Record_Type (Id : E) return B is
3067 end Is_Concurrent_Record_Type;
3069 function Is_Concurrent_Type (Id : E) return B is
3071 return Ekind (Id) in Concurrent_Kind;
3072 end Is_Concurrent_Type;
3074 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
3076 return Ekind (Id) in
3077 Decimal_Fixed_Point_Kind;
3078 end Is_Decimal_Fixed_Point_Type;
3080 function Is_Digits_Type (Id : E) return B is
3082 return Ekind (Id) in Digits_Kind;
3085 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
3087 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
3088 end Is_Discrete_Or_Fixed_Point_Type;
3090 function Is_Discrete_Type (Id : E) return B is
3092 return Ekind (Id) in Discrete_Kind;
3093 end Is_Discrete_Type;
3095 function Is_Elementary_Type (Id : E) return B is
3097 return Ekind (Id) in Elementary_Kind;
3098 end Is_Elementary_Type;
3100 function Is_Entry (Id : E) return B is
3102 return Ekind (Id) in Entry_Kind;
3105 function Is_Enumeration_Type (Id : E) return B is
3107 return Ekind (Id) in
3109 end Is_Enumeration_Type;
3111 function Is_Fixed_Point_Type (Id : E) return B is
3113 return Ekind (Id) in
3115 end Is_Fixed_Point_Type;
3117 function Is_Floating_Point_Type (Id : E) return B is
3119 return Ekind (Id) in Float_Kind;
3120 end Is_Floating_Point_Type;
3122 function Is_Formal (Id : E) return B is
3124 return Ekind (Id) in Formal_Kind;
3127 function Is_Formal_Object (Id : E) return B is
3129 return Ekind (Id) in Formal_Object_Kind;
3130 end Is_Formal_Object;
3132 function Is_Generic_Subprogram (Id : E) return B is
3134 return Ekind (Id) in Generic_Subprogram_Kind;
3135 end Is_Generic_Subprogram;
3137 function Is_Generic_Unit (Id : E) return B is
3139 return Ekind (Id) in Generic_Unit_Kind;
3140 end Is_Generic_Unit;
3142 function Is_Incomplete_Or_Private_Type (Id : E) return B is
3144 return Ekind (Id) in
3145 Incomplete_Or_Private_Kind;
3146 end Is_Incomplete_Or_Private_Type;
3148 function Is_Incomplete_Type (Id : E) return B is
3150 return Ekind (Id) in
3152 end Is_Incomplete_Type;
3154 function Is_Integer_Type (Id : E) return B is
3156 return Ekind (Id) in Integer_Kind;
3157 end Is_Integer_Type;
3159 function Is_Modular_Integer_Type (Id : E) return B is
3161 return Ekind (Id) in
3162 Modular_Integer_Kind;
3163 end Is_Modular_Integer_Type;
3165 function Is_Named_Number (Id : E) return B is
3167 return Ekind (Id) in Named_Kind;
3168 end Is_Named_Number;
3170 function Is_Numeric_Type (Id : E) return B is
3172 return Ekind (Id) in Numeric_Kind;
3173 end Is_Numeric_Type;
3175 function Is_Object (Id : E) return B is
3177 return Ekind (Id) in Object_Kind;
3180 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
3182 return Ekind (Id) in
3183 Ordinary_Fixed_Point_Kind;
3184 end Is_Ordinary_Fixed_Point_Type;
3186 function Is_Overloadable (Id : E) return B is
3188 return Ekind (Id) in Overloadable_Kind;
3189 end Is_Overloadable;
3191 function Is_Private_Type (Id : E) return B is
3193 return Ekind (Id) in Private_Kind;
3194 end Is_Private_Type;
3196 function Is_Protected_Type (Id : E) return B is
3198 return Ekind (Id) in Protected_Kind;
3199 end Is_Protected_Type;
3201 function Is_Real_Type (Id : E) return B is
3203 return Ekind (Id) in Real_Kind;
3206 function Is_Record_Type (Id : E) return B is
3208 return Ekind (Id) in Record_Kind;
3211 function Is_Scalar_Type (Id : E) return B is
3213 return Ekind (Id) in Scalar_Kind;
3216 function Is_Signed_Integer_Type (Id : E) return B is
3218 return Ekind (Id) in Signed_Integer_Kind;
3219 end Is_Signed_Integer_Type;
3221 function Is_Subprogram (Id : E) return B is
3223 return Ekind (Id) in Subprogram_Kind;
3226 function Is_Task_Type (Id : E) return B is
3228 return Ekind (Id) in Task_Kind;
3231 function Is_Type (Id : E) return B is
3233 return Ekind (Id) in Type_Kind;
3236 ------------------------------
3237 -- Attribute Set Procedures --
3238 ------------------------------
3240 -- Note: in many of these set procedures an "obvious" assertion is missing.
3241 -- The reason for this is that in many cases, a field is set before the
3242 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3243 -- it is possible to add assertions that specifically include the E_Void
3244 -- possibility, but in some cases, we just omit the assertions.
3246 procedure Set_Abstract_States (Id : E; V : L) is
3248 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
3249 Set_Elist25 (Id, V);
3250 end Set_Abstract_States;
3252 procedure Set_Accept_Address (Id : E; V : L) is
3254 Set_Elist21 (Id, V);
3255 end Set_Accept_Address;
3257 procedure Set_Access_Disp_Table (Id : E; V : L) is
3259 pragma Assert (Ekind (Id) = E_Record_Type
3260 and then Id = Implementation_Base_Type (Id));
3261 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3262 Set_Elist16 (Id, V);
3263 end Set_Access_Disp_Table;
3265 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3268 end Set_Associated_Formal_Package;
3270 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3273 end Set_Associated_Node_For_Itype;
3275 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3277 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3279 end Set_Associated_Storage_Pool;
3281 procedure Set_Actual_Subtype (Id : E; V : E) is
3284 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3285 or else Is_Formal (Id));
3287 end Set_Actual_Subtype;
3289 procedure Set_Address_Taken (Id : E; V : B := True) is
3291 Set_Flag104 (Id, V);
3292 end Set_Address_Taken;
3294 procedure Set_Alias (Id : E; V : E) is
3297 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3301 procedure Set_Alignment (Id : E; V : U) is
3303 pragma Assert (Is_Type (Id)
3304 or else Is_Formal (Id)
3305 or else Ekind_In (Id, E_Loop_Parameter,
3312 procedure Set_Barrier_Function (Id : E; V : N) is
3314 pragma Assert (Is_Entry (Id));
3316 end Set_Barrier_Function;
3318 procedure Set_Block_Node (Id : E; V : N) is
3320 pragma Assert (Ekind (Id) = E_Block);
3324 procedure Set_Body_Entity (Id : E; V : E) is
3326 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3328 end Set_Body_Entity;
3330 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3333 (Ekind (Id) = E_Package
3334 or else Is_Subprogram (Id)
3335 or else Is_Generic_Unit (Id));
3337 end Set_Body_Needed_For_SAL;
3339 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3341 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3342 Set_Flag125 (Id, V);
3343 end Set_C_Pass_By_Copy;
3345 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3348 end Set_Can_Never_Be_Null;
3350 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3353 end Set_Checks_May_Be_Suppressed;
3355 procedure Set_Class_Wide_Type (Id : E; V : E) is
3357 pragma Assert (Is_Type (Id));
3359 end Set_Class_Wide_Type;
3361 procedure Set_Cloned_Subtype (Id : E; V : E) is
3363 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3365 end Set_Cloned_Subtype;
3367 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3369 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3371 end Set_Component_Bit_Offset;
3373 procedure Set_Component_Clause (Id : E; V : N) is
3375 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3377 end Set_Component_Clause;
3379 procedure Set_Component_Size (Id : E; V : U) is
3381 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3383 end Set_Component_Size;
3385 procedure Set_Component_Type (Id : E; V : E) is
3387 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3389 end Set_Component_Type;
3391 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3394 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3396 end Set_Corresponding_Concurrent_Type;
3398 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3400 pragma Assert (Ekind (Id) = E_Discriminant);
3402 end Set_Corresponding_Discriminant;
3404 procedure Set_Corresponding_Equality (Id : E; V : E) is
3407 (Ekind (Id) = E_Function
3408 and then not Comes_From_Source (Id)
3409 and then Chars (Id) = Name_Op_Ne);
3411 end Set_Corresponding_Equality;
3413 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3415 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3417 end Set_Corresponding_Protected_Entry;
3419 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3421 pragma Assert (Is_Concurrent_Type (Id));
3423 end Set_Corresponding_Record_Type;
3425 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3428 end Set_Corresponding_Remote_Type;
3430 procedure Set_Current_Use_Clause (Id : E; V : E) is
3432 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3434 end Set_Current_Use_Clause;
3436 procedure Set_Current_Value (Id : E; V : N) is
3438 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3440 end Set_Current_Value;
3442 procedure Set_CR_Discriminant (Id : E; V : E) is
3445 end Set_CR_Discriminant;
3447 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3449 Set_Flag166 (Id, V);
3450 end Set_Debug_Info_Off;
3452 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3455 end Set_Debug_Renaming_Link;
3457 procedure Set_Default_Aspect_Component_Value (Id : E; V : E) is
3459 pragma Assert (Is_Array_Type (Id));
3461 end Set_Default_Aspect_Component_Value;
3463 procedure Set_Default_Aspect_Value (Id : E; V : E) is
3465 pragma Assert (Is_Scalar_Type (Id));
3467 end Set_Default_Aspect_Value;
3469 procedure Set_Default_Expr_Function (Id : E; V : E) is
3471 pragma Assert (Is_Formal (Id));
3473 end Set_Default_Expr_Function;
3475 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3477 Set_Flag108 (Id, V);
3478 end Set_Default_Expressions_Processed;
3480 procedure Set_Default_Value (Id : E; V : N) is
3482 pragma Assert (Is_Formal (Id));
3484 end Set_Default_Value;
3486 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3490 or else Is_Task_Type (Id)
3491 or else Ekind (Id) = E_Block);
3492 Set_Flag114 (Id, V);
3493 end Set_Delay_Cleanups;
3495 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3498 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3501 end Set_Delay_Subprogram_Descriptors;
3503 procedure Set_Delta_Value (Id : E; V : R) is
3505 pragma Assert (Is_Fixed_Point_Type (Id));
3506 Set_Ureal18 (Id, V);
3507 end Set_Delta_Value;
3509 procedure Set_Dependent_Instances (Id : E; V : L) is
3511 pragma Assert (Is_Generic_Instance (Id));
3513 end Set_Dependent_Instances;
3515 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3517 pragma Assert (Nkind (Id) in N_Entity);
3519 end Set_Depends_On_Private;
3521 procedure Set_Digits_Value (Id : E; V : U) is
3524 (Is_Floating_Point_Type (Id)
3525 or else Is_Decimal_Fixed_Point_Type (Id));
3527 end Set_Digits_Value;
3529 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3532 end Set_Directly_Designated_Type;
3534 procedure Set_Discard_Names (Id : E; V : B := True) is
3537 end Set_Discard_Names;
3539 procedure Set_Discriminal (Id : E; V : E) is
3541 pragma Assert (Ekind (Id) = E_Discriminant);
3543 end Set_Discriminal;
3545 procedure Set_Discriminal_Link (Id : E; V : E) is
3548 end Set_Discriminal_Link;
3550 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3552 pragma Assert (Ekind (Id) = E_Component);
3554 end Set_Discriminant_Checking_Func;
3556 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3558 pragma Assert (Nkind (Id) in N_Entity);
3559 Set_Elist21 (Id, V);
3560 end Set_Discriminant_Constraint;
3562 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3565 end Set_Discriminant_Default_Value;
3567 procedure Set_Discriminant_Number (Id : E; V : U) is
3570 end Set_Discriminant_Number;
3572 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3574 pragma Assert (Ekind (Id) = E_Record_Type
3575 and then Id = Implementation_Base_Type (Id));
3576 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3577 Set_Elist26 (Id, V);
3578 end Set_Dispatch_Table_Wrappers;
3580 procedure Set_DT_Entry_Count (Id : E; V : U) is
3582 pragma Assert (Ekind (Id) = E_Component);
3584 end Set_DT_Entry_Count;
3586 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3588 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3590 end Set_DT_Offset_To_Top_Func;
3592 procedure Set_DT_Position (Id : E; V : U) is
3594 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3596 end Set_DT_Position;
3598 procedure Set_DTC_Entity (Id : E; V : E) is
3600 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3604 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3606 pragma Assert (Ekind (Id) = E_Package);
3607 Set_Flag210 (Id, V);
3608 end Set_Elaborate_Body_Desirable;
3610 procedure Set_Elaboration_Entity (Id : E; V : E) is
3615 Ekind (Id) = E_Package
3617 Is_Generic_Unit (Id));
3619 end Set_Elaboration_Entity;
3621 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3626 Ekind (Id) = E_Package
3628 Is_Generic_Unit (Id));
3629 Set_Flag174 (Id, V);
3630 end Set_Elaboration_Entity_Required;
3632 procedure Set_Enclosing_Scope (Id : E; V : E) is
3635 end Set_Enclosing_Scope;
3637 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3639 pragma Assert (Is_Entry (Id));
3640 Set_Flag152 (Id, V);
3641 end Set_Entry_Accepted;
3643 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3646 end Set_Entry_Bodies_Array;
3648 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3651 end Set_Entry_Cancel_Parameter;
3653 procedure Set_Entry_Component (Id : E; V : E) is
3656 end Set_Entry_Component;
3658 procedure Set_Entry_Formal (Id : E; V : E) is
3661 end Set_Entry_Formal;
3663 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3665 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3667 end Set_Entry_Index_Constant;
3669 procedure Set_Contract (Id : E; V : N) is
3672 (Ekind_In (Id, E_Entry,
3679 or else Is_Generic_Subprogram (Id)
3680 or else Is_Subprogram (Id));
3684 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3687 end Set_Entry_Parameters_Type;
3689 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3691 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3693 end Set_Enum_Pos_To_Rep;
3695 procedure Set_Enumeration_Pos (Id : E; V : U) is
3697 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3699 end Set_Enumeration_Pos;
3701 procedure Set_Enumeration_Rep (Id : E; V : U) is
3703 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3705 end Set_Enumeration_Rep;
3707 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3709 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3711 end Set_Enumeration_Rep_Expr;
3713 procedure Set_Equivalent_Type (Id : E; V : E) is
3716 (Ekind_In (Id, E_Class_Wide_Type,
3717 E_Class_Wide_Subtype,
3718 E_Access_Protected_Subprogram_Type,
3719 E_Anonymous_Access_Protected_Subprogram_Type,
3720 E_Access_Subprogram_Type,
3723 end Set_Equivalent_Type;
3725 procedure Set_Esize (Id : E; V : U) is
3730 procedure Set_Exception_Code (Id : E; V : U) is
3732 pragma Assert (Ekind (Id) = E_Exception);
3734 end Set_Exception_Code;
3736 procedure Set_Extra_Accessibility (Id : E; V : E) is
3739 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
3741 end Set_Extra_Accessibility;
3743 procedure Set_Extra_Accessibility_Of_Result (Id : E; V : E) is
3745 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
3747 end Set_Extra_Accessibility_Of_Result;
3749 procedure Set_Extra_Constrained (Id : E; V : E) is
3751 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3753 end Set_Extra_Constrained;
3755 procedure Set_Extra_Formal (Id : E; V : E) is
3758 end Set_Extra_Formal;
3760 procedure Set_Extra_Formals (Id : E; V : E) is
3763 (Is_Overloadable (Id)
3764 or else Ekind_In (Id, E_Entry_Family,
3766 E_Subprogram_Type));
3768 end Set_Extra_Formals;
3770 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3773 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3774 Set_Flag229 (Id, V);
3775 end Set_Can_Use_Internal_Rep;
3777 procedure Set_Finalization_Master (Id : E; V : E) is
3779 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3781 end Set_Finalization_Master;
3783 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3785 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3786 Set_Flag158 (Id, V);
3787 end Set_Finalize_Storage_Only;
3789 procedure Set_Finalizer (Id : E; V : E) is
3791 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
3795 procedure Set_First_Entity (Id : E; V : E) is
3798 end Set_First_Entity;
3800 procedure Set_First_Exit_Statement (Id : E; V : N) is
3802 pragma Assert (Ekind (Id) = E_Loop);
3804 end Set_First_Exit_Statement;
3806 procedure Set_First_Index (Id : E; V : N) is
3808 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3810 end Set_First_Index;
3812 procedure Set_First_Literal (Id : E; V : E) is
3814 pragma Assert (Is_Enumeration_Type (Id));
3816 end Set_First_Literal;
3818 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3820 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3822 end Set_First_Optional_Parameter;
3824 procedure Set_First_Private_Entity (Id : E; V : E) is
3826 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
3827 or else Ekind (Id) in Concurrent_Kind);
3829 end Set_First_Private_Entity;
3831 procedure Set_First_Rep_Item (Id : E; V : N) is
3834 end Set_First_Rep_Item;
3836 procedure Set_Float_Rep (Id : E; V : F) is
3837 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
3839 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
3842 procedure Set_Freeze_Node (Id : E; V : N) is
3845 end Set_Freeze_Node;
3847 procedure Set_From_With_Type (Id : E; V : B := True) is
3851 or else Ekind (Id) = E_Package);
3852 Set_Flag159 (Id, V);
3853 end Set_From_With_Type;
3855 procedure Set_Full_View (Id : E; V : E) is
3857 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
3861 procedure Set_Generic_Homonym (Id : E; V : E) is
3864 end Set_Generic_Homonym;
3866 procedure Set_Generic_Renamings (Id : E; V : L) is
3868 Set_Elist23 (Id, V);
3869 end Set_Generic_Renamings;
3871 procedure Set_Handler_Records (Id : E; V : S) is
3874 end Set_Handler_Records;
3876 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
3878 pragma Assert (Id = Base_Type (Id));
3879 Set_Flag135 (Id, V);
3880 end Set_Has_Aliased_Components;
3882 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
3885 end Set_Has_Alignment_Clause;
3887 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
3890 end Set_Has_All_Calls_Remote;
3892 procedure Set_Has_Anonymous_Master (Id : E; V : B := True) is
3895 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
3896 Set_Flag253 (Id, V);
3897 end Set_Has_Anonymous_Master;
3899 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
3901 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
3903 end Set_Has_Atomic_Components;
3905 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
3908 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
3909 Set_Flag139 (Id, V);
3910 end Set_Has_Biased_Representation;
3912 procedure Set_Has_Completion (Id : E; V : B := True) is
3915 end Set_Has_Completion;
3917 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
3919 pragma Assert (Is_Type (Id));
3921 end Set_Has_Completion_In_Body;
3923 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
3925 pragma Assert (Ekind (Id) = E_Record_Type);
3926 Set_Flag140 (Id, V);
3927 end Set_Has_Complex_Representation;
3929 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
3931 pragma Assert (Ekind (Id) = E_Array_Type);
3933 end Set_Has_Component_Size_Clause;
3935 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
3937 pragma Assert (Is_Type (Id));
3938 Set_Flag187 (Id, V);
3939 end Set_Has_Constrained_Partial_View;
3941 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
3943 Set_Flag181 (Id, V);
3944 end Set_Has_Contiguous_Rep;
3946 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
3948 pragma Assert (Id = Base_Type (Id));
3950 end Set_Has_Controlled_Component;
3952 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
3955 end Set_Has_Controlling_Result;
3957 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
3959 Set_Flag119 (Id, V);
3960 end Set_Has_Convention_Pragma;
3962 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
3965 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
3966 and then Is_Base_Type (Id));
3968 end Set_Has_Default_Aspect;
3970 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
3972 pragma Assert (Nkind (Id) in N_Entity);
3973 Set_Flag200 (Id, V);
3974 end Set_Has_Delayed_Aspects;
3976 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
3978 pragma Assert (Nkind (Id) in N_Entity);
3980 end Set_Has_Delayed_Freeze;
3982 procedure Set_Has_Delayed_Rep_Aspects (Id : E; V : B := True) is
3984 pragma Assert (Nkind (Id) in N_Entity);
3985 Set_Flag261 (Id, V);
3986 end Set_Has_Delayed_Rep_Aspects;
3988 procedure Set_Has_Discriminants (Id : E; V : B := True) is
3990 pragma Assert (Nkind (Id) in N_Entity);
3992 end Set_Has_Discriminants;
3994 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
3996 pragma Assert (Ekind (Id) = E_Record_Type
3997 and then Is_Tagged_Type (Id));
3998 Set_Flag220 (Id, V);
3999 end Set_Has_Dispatch_Table;
4001 procedure Set_Has_Dynamic_Predicate_Aspect (Id : E; V : B := True) is
4003 pragma Assert (Is_Type (Id));
4004 Set_Flag258 (Id, V);
4005 end Set_Has_Dynamic_Predicate_Aspect;
4007 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
4009 pragma Assert (Is_Enumeration_Type (Id));
4011 end Set_Has_Enumeration_Rep_Clause;
4013 procedure Set_Has_Exit (Id : E; V : B := True) is
4018 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True) is
4020 pragma Assert (Is_Tagged_Type (Id));
4021 Set_Flag110 (Id, V);
4022 end Set_Has_External_Tag_Rep_Clause;
4024 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
4026 Set_Flag175 (Id, V);
4027 end Set_Has_Forward_Instantiation;
4029 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
4031 Set_Flag173 (Id, V);
4032 end Set_Has_Fully_Qualified_Name;
4034 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
4037 end Set_Has_Gigi_Rep_Item;
4039 procedure Set_Has_Homonym (Id : E; V : B := True) is
4042 end Set_Has_Homonym;
4044 procedure Set_Has_Implicit_Dereference (Id : E; V : B := True) is
4046 Set_Flag251 (Id, V);
4047 end Set_Has_Implicit_Dereference;
4049 procedure Set_Has_Independent_Components (Id : E; V : B := True) is
4051 pragma Assert (Is_Object (Id) or else Is_Type (Id));
4053 end Set_Has_Independent_Components;
4055 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
4057 pragma Assert (Is_Type (Id));
4058 Set_Flag248 (Id, V);
4059 end Set_Has_Inheritable_Invariants;
4061 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
4063 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
4064 Set_Flag219 (Id, V);
4065 end Set_Has_Initial_Value;
4067 procedure Set_Has_Invariants (Id : E; V : B := True) is
4069 pragma Assert (Is_Type (Id));
4070 Set_Flag232 (Id, V);
4071 end Set_Has_Invariants;
4073 procedure Set_Has_Loop_Entry_Attributes (Id : E; V : B := True) is
4075 pragma Assert (Ekind (Id) = E_Loop);
4076 Set_Flag260 (Id, V);
4077 end Set_Has_Loop_Entry_Attributes;
4079 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
4081 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4083 end Set_Has_Machine_Radix_Clause;
4085 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
4088 end Set_Has_Master_Entity;
4090 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
4092 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4093 Set_Flag142 (Id, V);
4094 end Set_Has_Missing_Return;
4096 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
4098 Set_Flag101 (Id, V);
4099 end Set_Has_Nested_Block_With_Handler;
4101 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
4103 pragma Assert (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
4104 Set_Flag215 (Id, V);
4105 end Set_Has_Up_Level_Access;
4107 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
4109 pragma Assert (Id = Base_Type (Id));
4111 end Set_Has_Non_Standard_Rep;
4113 procedure Set_Has_Null_Refinement (Id : E; V : B := True) is
4115 pragma Assert (Ekind (Id) = E_Abstract_State);
4116 Set_Flag263 (Id, V);
4117 end Set_Has_Null_Refinement;
4119 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
4121 pragma Assert (Is_Type (Id));
4122 Set_Flag172 (Id, V);
4123 end Set_Has_Object_Size_Clause;
4125 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
4127 Set_Flag154 (Id, V);
4128 end Set_Has_Per_Object_Constraint;
4130 procedure Set_Has_Postconditions (Id : E; V : B := True) is
4132 pragma Assert (Is_Subprogram (Id));
4133 Set_Flag240 (Id, V);
4134 end Set_Has_Postconditions;
4136 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
4138 pragma Assert (Is_Access_Type (Id));
4139 Set_Flag27 (Base_Type (Id), V);
4140 end Set_Has_Pragma_Controlled;
4142 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
4144 Set_Flag150 (Id, V);
4145 end Set_Has_Pragma_Elaborate_Body;
4147 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
4149 Set_Flag157 (Id, V);
4150 end Set_Has_Pragma_Inline;
4152 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
4154 Set_Flag230 (Id, V);
4155 end Set_Has_Pragma_Inline_Always;
4157 procedure Set_Has_Pragma_No_Inline (Id : E; V : B := True) is
4159 Set_Flag201 (Id, V);
4160 end Set_Has_Pragma_No_Inline;
4162 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
4164 pragma Assert (Is_Enumeration_Type (Id));
4165 pragma Assert (Id = Base_Type (Id));
4166 Set_Flag198 (Id, V);
4167 end Set_Has_Pragma_Ordered;
4169 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
4171 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
4172 pragma Assert (Id = Base_Type (Id));
4173 Set_Flag121 (Id, V);
4174 end Set_Has_Pragma_Pack;
4176 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
4178 Set_Flag221 (Id, V);
4179 end Set_Has_Pragma_Preelab_Init;
4181 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
4183 Set_Flag203 (Id, V);
4184 end Set_Has_Pragma_Pure;
4186 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
4188 Set_Flag179 (Id, V);
4189 end Set_Has_Pragma_Pure_Function;
4191 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
4193 Set_Flag169 (Id, V);
4194 end Set_Has_Pragma_Thread_Local_Storage;
4196 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
4198 Set_Flag233 (Id, V);
4199 end Set_Has_Pragma_Unmodified;
4201 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
4203 Set_Flag180 (Id, V);
4204 end Set_Has_Pragma_Unreferenced;
4206 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
4208 pragma Assert (Is_Type (Id));
4209 Set_Flag212 (Id, V);
4210 end Set_Has_Pragma_Unreferenced_Objects;
4212 procedure Set_Has_Predicates (Id : E; V : B := True) is
4214 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Void);
4215 Set_Flag250 (Id, V);
4216 end Set_Has_Predicates;
4218 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
4220 pragma Assert (Id = Base_Type (Id));
4221 Set_Flag120 (Id, V);
4222 end Set_Has_Primitive_Operations;
4224 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
4226 pragma Assert (Is_Type (Id));
4227 Set_Flag151 (Id, V);
4228 end Set_Has_Private_Ancestor;
4230 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
4232 Set_Flag155 (Id, V);
4233 end Set_Has_Private_Declaration;
4235 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
4237 Set_Flag161 (Id, V);
4238 end Set_Has_Qualified_Name;
4240 procedure Set_Has_RACW (Id : E; V : B := True) is
4242 pragma Assert (Ekind (Id) = E_Package);
4243 Set_Flag214 (Id, V);
4246 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
4248 pragma Assert (Id = Base_Type (Id));
4250 end Set_Has_Record_Rep_Clause;
4252 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
4254 pragma Assert (Is_Subprogram (Id));
4255 Set_Flag143 (Id, V);
4256 end Set_Has_Recursive_Call;
4258 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
4261 end Set_Has_Size_Clause;
4263 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
4266 end Set_Has_Small_Clause;
4268 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
4270 pragma Assert (Id = Base_Type (Id));
4271 Set_Flag100 (Id, V);
4272 end Set_Has_Specified_Layout;
4274 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
4276 pragma Assert (Is_Type (Id));
4277 Set_Flag190 (Id, V);
4278 end Set_Has_Specified_Stream_Input;
4280 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
4282 pragma Assert (Is_Type (Id));
4283 Set_Flag191 (Id, V);
4284 end Set_Has_Specified_Stream_Output;
4286 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
4288 pragma Assert (Is_Type (Id));
4289 Set_Flag192 (Id, V);
4290 end Set_Has_Specified_Stream_Read;
4292 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
4294 pragma Assert (Is_Type (Id));
4295 Set_Flag193 (Id, V);
4296 end Set_Has_Specified_Stream_Write;
4298 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
4300 Set_Flag211 (Id, V);
4301 end Set_Has_Static_Discriminants;
4303 procedure Set_Has_Static_Predicate_Aspect (Id : E; V : B := True) is
4305 pragma Assert (Is_Type (Id));
4306 Set_Flag259 (Id, V);
4307 end Set_Has_Static_Predicate_Aspect;
4309 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
4311 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4312 pragma Assert (Id = Base_Type (Id));
4314 end Set_Has_Storage_Size_Clause;
4316 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4318 pragma Assert (Is_Elementary_Type (Id));
4319 Set_Flag184 (Id, V);
4320 end Set_Has_Stream_Size_Clause;
4322 procedure Set_Has_Task (Id : E; V : B := True) is
4324 pragma Assert (Id = Base_Type (Id));
4328 procedure Set_Has_Thunks (Id : E; V : B := True) is
4330 pragma Assert (Is_Tag (Id));
4331 Set_Flag228 (Id, V);
4334 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4336 pragma Assert (Id = Base_Type (Id));
4337 Set_Flag123 (Id, V);
4338 end Set_Has_Unchecked_Union;
4340 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4342 pragma Assert (Is_Type (Id));
4344 end Set_Has_Unknown_Discriminants;
4346 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4348 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4350 end Set_Has_Volatile_Components;
4352 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4354 Set_Flag182 (Id, V);
4355 end Set_Has_Xref_Entry;
4357 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4359 pragma Assert (Ekind (Id) = E_Variable);
4361 end Set_Hiding_Loop_Variable;
4363 procedure Set_Homonym (Id : E; V : E) is
4365 pragma Assert (Id /= V);
4369 procedure Set_Interface_Alias (Id : E; V : E) is
4373 and then Is_Hidden (Id)
4374 and then (Ekind_In (Id, E_Procedure, E_Function)));
4376 end Set_Interface_Alias;
4378 procedure Set_Interfaces (Id : E; V : L) is
4380 pragma Assert (Is_Record_Type (Id));
4381 Set_Elist25 (Id, V);
4384 procedure Set_In_Package_Body (Id : E; V : B := True) is
4387 end Set_In_Package_Body;
4389 procedure Set_In_Private_Part (Id : E; V : B := True) is
4392 end Set_In_Private_Part;
4394 procedure Set_In_Use (Id : E; V : B := True) is
4396 pragma Assert (Nkind (Id) in N_Entity);
4400 procedure Set_Initialization_Statements (Id : E; V : N) is
4402 -- Tolerate an E_Void entity since this can be called while resolving
4403 -- an aggregate used as the initialization expression for an object
4404 -- declaration, and this occurs before the Ekind for the object is set.
4406 pragma Assert (Ekind_In (Id, E_Void, E_Constant, E_Variable));
4408 end Set_Initialization_Statements;
4410 procedure Set_Inner_Instances (Id : E; V : L) is
4412 Set_Elist23 (Id, V);
4413 end Set_Inner_Instances;
4415 procedure Set_Interface_Name (Id : E; V : N) is
4418 end Set_Interface_Name;
4420 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4422 pragma Assert (Is_Overloadable (Id));
4424 end Set_Is_Abstract_Subprogram;
4426 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4428 pragma Assert (Is_Type (Id));
4429 Set_Flag146 (Id, V);
4430 end Set_Is_Abstract_Type;
4432 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4434 pragma Assert (Is_Access_Type (Id));
4435 Set_Flag194 (Id, V);
4436 end Set_Is_Local_Anonymous_Access;
4438 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4440 pragma Assert (Is_Access_Type (Id));
4442 end Set_Is_Access_Constant;
4444 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4446 Set_Flag185 (Id, V);
4447 end Set_Is_Ada_2005_Only;
4449 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4451 Set_Flag199 (Id, V);
4452 end Set_Is_Ada_2012_Only;
4454 procedure Set_Is_Aliased (Id : E; V : B := True) is
4456 pragma Assert (Nkind (Id) in N_Entity);
4460 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
4462 pragma Assert (Is_Entry (Id));
4463 Set_Flag132 (Id, V);
4464 end Set_Is_AST_Entry;
4466 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4469 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4471 end Set_Is_Asynchronous;
4473 procedure Set_Is_Atomic (Id : E; V : B := True) is
4478 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4480 pragma Assert ((not V)
4481 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4482 Set_Flag122 (Id, V);
4483 end Set_Is_Bit_Packed_Array;
4485 procedure Set_Is_Called (Id : E; V : B := True) is
4487 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4488 Set_Flag102 (Id, V);
4491 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4494 end Set_Is_Character_Type;
4496 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4499 end Set_Is_Child_Unit;
4501 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4504 end Set_Is_Class_Wide_Equivalent_Type;
4506 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4508 Set_Flag149 (Id, V);
4509 end Set_Is_Compilation_Unit;
4511 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4513 pragma Assert (Ekind (Id) = E_Discriminant);
4514 Set_Flag103 (Id, V);
4515 end Set_Is_Completely_Hidden;
4517 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4520 end Set_Is_Concurrent_Record_Type;
4522 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4525 end Set_Is_Constr_Subt_For_U_Nominal;
4527 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4529 Set_Flag141 (Id, V);
4530 end Set_Is_Constr_Subt_For_UN_Aliased;
4532 procedure Set_Is_Constrained (Id : E; V : B := True) is
4534 pragma Assert (Nkind (Id) in N_Entity);
4536 end Set_Is_Constrained;
4538 procedure Set_Is_Constructor (Id : E; V : B := True) is
4541 end Set_Is_Constructor;
4543 procedure Set_Is_Controlled (Id : E; V : B := True) is
4545 pragma Assert (Id = Base_Type (Id));
4547 end Set_Is_Controlled;
4549 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4551 pragma Assert (Is_Formal (Id));
4553 end Set_Is_Controlling_Formal;
4555 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4558 end Set_Is_CPP_Class;
4560 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4562 pragma Assert (Is_Type (Id));
4563 Set_Flag223 (Id, V);
4564 end Set_Is_Descendent_Of_Address;
4566 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4568 Set_Flag176 (Id, V);
4569 end Set_Is_Discrim_SO_Function;
4571 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4573 Set_Flag234 (Id, V);
4574 end Set_Is_Dispatch_Table_Entity;
4576 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4581 Is_Overloadable (Id)
4583 Ekind (Id) = E_Subprogram_Type);
4586 end Set_Is_Dispatching_Operation;
4588 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4590 Set_Flag124 (Id, V);
4591 end Set_Is_Eliminated;
4593 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4596 end Set_Is_Entry_Formal;
4598 procedure Set_Is_Exported (Id : E; V : B := True) is
4601 end Set_Is_Exported;
4603 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4606 end Set_Is_First_Subtype;
4608 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4610 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4611 Set_Flag118 (Id, V);
4612 end Set_Is_For_Access_Subtype;
4614 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4616 Set_Flag111 (Id, V);
4617 end Set_Is_Formal_Subprogram;
4619 procedure Set_Is_Frozen (Id : E; V : B := True) is
4621 pragma Assert (Nkind (Id) in N_Entity);
4625 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4627 pragma Assert (Is_Type (Id));
4629 end Set_Is_Generic_Actual_Type;
4631 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4633 Set_Flag130 (Id, V);
4634 end Set_Is_Generic_Instance;
4636 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4638 pragma Assert (Nkind (Id) in N_Entity);
4640 end Set_Is_Generic_Type;
4642 procedure Set_Is_Hidden (Id : E; V : B := True) is
4647 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4649 Set_Flag171 (Id, V);
4650 end Set_Is_Hidden_Open_Scope;
4652 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4654 pragma Assert (Nkind (Id) in N_Entity);
4656 end Set_Is_Immediately_Visible;
4658 procedure Set_Is_Implementation_Defined (Id : E; V : B := True) is
4660 Set_Flag254 (Id, V);
4661 end Set_Is_Implementation_Defined;
4663 procedure Set_Is_Imported (Id : E; V : B := True) is
4666 end Set_Is_Imported;
4668 procedure Set_Is_Inlined (Id : E; V : B := True) is
4673 procedure Set_Is_Interface (Id : E; V : B := True) is
4675 pragma Assert (Is_Record_Type (Id));
4676 Set_Flag186 (Id, V);
4677 end Set_Is_Interface;
4679 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4681 Set_Flag126 (Id, V);
4682 end Set_Is_Instantiated;
4684 procedure Set_Is_Internal (Id : E; V : B := True) is
4686 pragma Assert (Nkind (Id) in N_Entity);
4688 end Set_Is_Internal;
4690 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4692 pragma Assert (Nkind (Id) in N_Entity);
4694 end Set_Is_Interrupt_Handler;
4696 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4699 end Set_Is_Intrinsic_Subprogram;
4701 procedure Set_Is_Invariant_Procedure (Id : E; V : B := True) is
4703 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4704 Set_Flag257 (Id, V);
4705 end Set_Is_Invariant_Procedure;
4707 procedure Set_Is_Itype (Id : E; V : B := True) is
4712 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4715 end Set_Is_Known_Non_Null;
4717 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4719 Set_Flag204 (Id, V);
4720 end Set_Is_Known_Null;
4722 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4724 Set_Flag170 (Id, V);
4725 end Set_Is_Known_Valid;
4727 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4729 pragma Assert (Is_Type (Id));
4730 Set_Flag106 (Id, V);
4731 end Set_Is_Limited_Composite;
4733 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4735 pragma Assert (Is_Interface (Id));
4736 Set_Flag197 (Id, V);
4737 end Set_Is_Limited_Interface;
4739 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4742 end Set_Is_Limited_Record;
4744 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4746 pragma Assert (Is_Subprogram (Id));
4747 Set_Flag137 (Id, V);
4748 end Set_Is_Machine_Code_Subprogram;
4750 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4752 pragma Assert (Is_Type (Id));
4753 Set_Flag109 (Id, V);
4754 end Set_Is_Non_Static_Subtype;
4756 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4758 pragma Assert (Ekind (Id) = E_Procedure);
4759 Set_Flag178 (Id, V);
4760 end Set_Is_Null_Init_Proc;
4762 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4764 Set_Flag153 (Id, V);
4765 end Set_Is_Obsolescent;
4767 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
4769 pragma Assert (Ekind (Id) = E_Out_Parameter);
4770 Set_Flag226 (Id, V);
4771 end Set_Is_Only_Out_Parameter;
4773 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
4775 pragma Assert (Is_Formal (Id));
4776 Set_Flag134 (Id, V);
4777 end Set_Is_Optional_Parameter;
4779 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
4781 Set_Flag160 (Id, V);
4782 end Set_Is_Package_Body_Entity;
4784 procedure Set_Is_Packed (Id : E; V : B := True) is
4786 pragma Assert (Id = Base_Type (Id));
4790 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
4792 Set_Flag138 (Id, V);
4793 end Set_Is_Packed_Array_Type;
4795 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
4797 pragma Assert (Nkind (Id) in N_Entity);
4799 end Set_Is_Potentially_Use_Visible;
4801 procedure Set_Is_Predicate_Function (Id : E; V : B := True) is
4803 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4804 Set_Flag255 (Id, V);
4805 end Set_Is_Predicate_Function;
4807 procedure Set_Is_Predicate_Function_M (Id : E; V : B := True) is
4809 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4810 Set_Flag256 (Id, V);
4811 end Set_Is_Predicate_Function_M;
4813 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
4816 end Set_Is_Preelaborated;
4818 procedure Set_Is_Primitive (Id : E; V : B := True) is
4821 (Is_Overloadable (Id)
4822 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
4823 Set_Flag218 (Id, V);
4824 end Set_Is_Primitive;
4826 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
4828 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4829 Set_Flag195 (Id, V);
4830 end Set_Is_Primitive_Wrapper;
4832 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
4834 pragma Assert (Is_Type (Id));
4835 Set_Flag107 (Id, V);
4836 end Set_Is_Private_Composite;
4838 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
4841 end Set_Is_Private_Descendant;
4843 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
4845 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4846 Set_Flag245 (Id, V);
4847 end Set_Is_Private_Primitive;
4849 procedure Set_Is_Processed_Transient (Id : E; V : B := True) is
4851 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
4852 Set_Flag252 (Id, V);
4853 end Set_Is_Processed_Transient;
4855 procedure Set_Is_Public (Id : E; V : B := True) is
4857 pragma Assert (Nkind (Id) in N_Entity);
4861 procedure Set_Is_Pure (Id : E; V : B := True) is
4866 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
4868 pragma Assert (Is_Access_Type (Id));
4869 Set_Flag189 (Id, V);
4870 end Set_Is_Pure_Unit_Access_Type;
4872 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
4874 pragma Assert (Is_Type (Id));
4875 Set_Flag244 (Id, V);
4876 end Set_Is_RACW_Stub_Type;
4878 procedure Set_Is_Raised (Id : E; V : B := True) is
4880 pragma Assert (Ekind (Id) = E_Exception);
4881 Set_Flag224 (Id, V);
4884 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
4887 end Set_Is_Remote_Call_Interface;
4889 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
4892 end Set_Is_Remote_Types;
4894 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
4896 Set_Flag112 (Id, V);
4897 end Set_Is_Renaming_Of_Object;
4899 procedure Set_Is_Return_Object (Id : E; V : B := True) is
4901 Set_Flag209 (Id, V);
4902 end Set_Is_Return_Object;
4904 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
4906 pragma Assert (Ekind (Id) = E_Variable);
4907 Set_Flag249 (Id, V);
4908 end Set_Is_Safe_To_Reevaluate;
4910 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
4913 end Set_Is_Shared_Passive;
4915 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
4919 or else Ekind_In (Id, E_Exception,
4924 end Set_Is_Statically_Allocated;
4926 procedure Set_Is_Tag (Id : E; V : B := True) is
4928 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
4932 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
4935 end Set_Is_Tagged_Type;
4937 procedure Set_Is_Thunk (Id : E; V : B := True) is
4939 pragma Assert (Is_Subprogram (Id));
4940 Set_Flag225 (Id, V);
4943 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
4945 Set_Flag235 (Id, V);
4946 end Set_Is_Trivial_Subprogram;
4948 procedure Set_Is_True_Constant (Id : E; V : B := True) is
4950 Set_Flag163 (Id, V);
4951 end Set_Is_True_Constant;
4953 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
4955 pragma Assert (Id = Base_Type (Id));
4956 Set_Flag117 (Id, V);
4957 end Set_Is_Unchecked_Union;
4959 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
4961 pragma Assert (Ekind (Id) = E_Record_Type);
4962 Set_Flag246 (Id, V);
4963 end Set_Is_Underlying_Record_View;
4965 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
4967 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
4968 Set_Flag144 (Id, V);
4969 end Set_Is_Unsigned_Type;
4971 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
4973 pragma Assert (Ekind (Id) = E_Procedure);
4974 Set_Flag127 (Id, V);
4975 end Set_Is_Valued_Procedure;
4977 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
4979 Set_Flag206 (Id, V);
4980 end Set_Is_Visible_Formal;
4982 procedure Set_Is_Visible_Lib_Unit (Id : E; V : B := True) is
4984 Set_Flag116 (Id, V);
4985 end Set_Is_Visible_Lib_Unit;
4987 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
4989 pragma Assert (Ekind (Id) = E_Exception);
4990 Set_Flag133 (Id, V);
4991 end Set_Is_VMS_Exception;
4993 procedure Set_Is_Volatile (Id : E; V : B := True) is
4995 pragma Assert (Nkind (Id) in N_Entity);
4997 end Set_Is_Volatile;
4999 procedure Set_Itype_Printed (Id : E; V : B := True) is
5001 pragma Assert (Is_Itype (Id));
5002 Set_Flag202 (Id, V);
5003 end Set_Itype_Printed;
5005 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
5008 end Set_Kill_Elaboration_Checks;
5010 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
5013 end Set_Kill_Range_Checks;
5015 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
5017 pragma Assert (Is_Type (Id));
5018 Set_Flag207 (Id, V);
5019 end Set_Known_To_Have_Preelab_Init;
5021 procedure Set_Last_Assignment (Id : E; V : N) is
5023 pragma Assert (Is_Assignable (Id));
5025 end Set_Last_Assignment;
5027 procedure Set_Last_Entity (Id : E; V : E) is
5030 end Set_Last_Entity;
5032 procedure Set_Limited_View (Id : E; V : E) is
5034 pragma Assert (Ekind (Id) = E_Package);
5036 end Set_Limited_View;
5038 procedure Set_Lit_Indexes (Id : E; V : E) is
5040 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5042 end Set_Lit_Indexes;
5044 procedure Set_Lit_Strings (Id : E; V : E) is
5046 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5048 end Set_Lit_Strings;
5050 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
5052 pragma Assert (Is_Formal (Id));
5053 Set_Flag205 (Id, V);
5054 end Set_Low_Bound_Tested;
5056 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
5058 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
5060 end Set_Machine_Radix_10;
5062 procedure Set_Master_Id (Id : E; V : E) is
5064 pragma Assert (Is_Access_Type (Id));
5068 procedure Set_Materialize_Entity (Id : E; V : B := True) is
5070 Set_Flag168 (Id, V);
5071 end Set_Materialize_Entity;
5073 procedure Set_May_Inherit_Delayed_Rep_Aspects (Id : E; V : B := True) is
5075 Set_Flag262 (Id, V);
5076 end Set_May_Inherit_Delayed_Rep_Aspects;
5078 procedure Set_Mechanism (Id : E; V : M) is
5080 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
5081 Set_Uint8 (Id, UI_From_Int (V));
5084 procedure Set_Modulus (Id : E; V : U) is
5086 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
5090 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
5092 pragma Assert (Is_Type (Id));
5093 Set_Flag183 (Id, V);
5094 end Set_Must_Be_On_Byte_Boundary;
5096 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
5098 pragma Assert (Is_Type (Id));
5099 Set_Flag208 (Id, V);
5100 end Set_Must_Have_Preelab_Init;
5102 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
5104 Set_Flag147 (Id, V);
5105 end Set_Needs_Debug_Info;
5107 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
5110 (Is_Overloadable (Id)
5111 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
5113 end Set_Needs_No_Actuals;
5115 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
5117 Set_Flag115 (Id, V);
5118 end Set_Never_Set_In_Source;
5120 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
5123 end Set_Next_Inlined_Subprogram;
5125 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
5127 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5128 Set_Flag131 (Id, V);
5129 end Set_No_Pool_Assigned;
5131 procedure Set_No_Return (Id : E; V : B := True) is
5134 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
5135 Set_Flag113 (Id, V);
5138 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
5140 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5141 Set_Flag136 (Id, V);
5142 end Set_No_Strict_Aliasing;
5144 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
5146 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5148 end Set_Non_Binary_Modulus;
5150 procedure Set_Non_Limited_View (Id : E; V : E) is
5152 pragma Assert (Ekind (Id) in Incomplete_Kind);
5154 end Set_Non_Limited_View;
5156 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
5159 (Root_Type (Id) = Standard_Boolean
5160 and then Ekind (Id) = E_Enumeration_Type);
5161 Set_Flag162 (Id, V);
5162 end Set_Nonzero_Is_True;
5164 procedure Set_Normalized_First_Bit (Id : E; V : U) is
5166 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5168 end Set_Normalized_First_Bit;
5170 procedure Set_Normalized_Position (Id : E; V : U) is
5172 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5174 end Set_Normalized_Position;
5176 procedure Set_Normalized_Position_Max (Id : E; V : U) is
5178 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5180 end Set_Normalized_Position_Max;
5182 procedure Set_OK_To_Rename (Id : E; V : B := True) is
5184 pragma Assert (Ekind (Id) = E_Variable);
5185 Set_Flag247 (Id, V);
5186 end Set_OK_To_Rename;
5188 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
5191 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5192 Set_Flag239 (Id, V);
5193 end Set_OK_To_Reorder_Components;
5195 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
5198 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5199 Set_Flag241 (Id, V);
5200 end Set_Optimize_Alignment_Space;
5202 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
5205 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5206 Set_Flag242 (Id, V);
5207 end Set_Optimize_Alignment_Time;
5209 procedure Set_Original_Access_Type (Id : E; V : E) is
5211 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
5213 end Set_Original_Access_Type;
5215 procedure Set_Original_Array_Type (Id : E; V : E) is
5217 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
5219 end Set_Original_Array_Type;
5221 procedure Set_Original_Record_Component (Id : E; V : E) is
5223 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
5225 end Set_Original_Record_Component;
5227 procedure Set_Overlays_Constant (Id : E; V : B := True) is
5229 Set_Flag243 (Id, V);
5230 end Set_Overlays_Constant;
5232 procedure Set_Overridden_Operation (Id : E; V : E) is
5235 end Set_Overridden_Operation;
5237 procedure Set_Package_Instantiation (Id : E; V : N) is
5239 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
5241 end Set_Package_Instantiation;
5243 procedure Set_Packed_Array_Type (Id : E; V : E) is
5245 pragma Assert (Is_Array_Type (Id));
5247 end Set_Packed_Array_Type;
5249 procedure Set_Parent_Subtype (Id : E; V : E) is
5251 pragma Assert (Ekind (Id) = E_Record_Type);
5253 end Set_Parent_Subtype;
5255 procedure Set_Postcondition_Proc (Id : E; V : E) is
5257 pragma Assert (Ekind (Id) = E_Procedure);
5259 end Set_Postcondition_Proc;
5261 procedure Set_PPC_Wrapper (Id : E; V : E) is
5263 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
5265 end Set_PPC_Wrapper;
5267 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
5269 pragma Assert (Is_Tagged_Type (Id));
5270 Set_Elist10 (Id, V);
5271 end Set_Direct_Primitive_Operations;
5273 procedure Set_Prival (Id : E; V : E) is
5275 pragma Assert (Is_Protected_Component (Id));
5279 procedure Set_Prival_Link (Id : E; V : E) is
5281 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5283 end Set_Prival_Link;
5285 procedure Set_Private_Dependents (Id : E; V : L) is
5287 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
5288 Set_Elist18 (Id, V);
5289 end Set_Private_Dependents;
5291 procedure Set_Private_View (Id : E; V : N) is
5293 pragma Assert (Is_Private_Type (Id));
5295 end Set_Private_View;
5297 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
5299 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
5301 end Set_Protected_Body_Subprogram;
5303 procedure Set_Protected_Formal (Id : E; V : E) is
5305 pragma Assert (Is_Formal (Id));
5307 end Set_Protected_Formal;
5309 procedure Set_Protection_Object (Id : E; V : E) is
5311 pragma Assert (Ekind_In (Id, E_Entry,
5316 end Set_Protection_Object;
5318 procedure Set_Reachable (Id : E; V : B := True) is
5323 procedure Set_Referenced (Id : E; V : B := True) is
5325 Set_Flag156 (Id, V);
5328 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
5331 end Set_Referenced_As_LHS;
5333 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
5335 Set_Flag227 (Id, V);
5336 end Set_Referenced_As_Out_Parameter;
5338 procedure Set_Refined_State (Id : E; V : E) is
5340 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
5342 end Set_Refined_State;
5344 procedure Set_Refinement_Constituents (Id : E; V : L) is
5346 pragma Assert (Ekind (Id) = E_Abstract_State);
5348 end Set_Refinement_Constituents;
5350 procedure Set_Register_Exception_Call (Id : E; V : N) is
5352 pragma Assert (Ekind (Id) = E_Exception);
5354 end Set_Register_Exception_Call;
5356 procedure Set_Related_Array_Object (Id : E; V : E) is
5358 pragma Assert (Is_Array_Type (Id));
5360 end Set_Related_Array_Object;
5362 procedure Set_Related_Expression (Id : E; V : N) is
5364 pragma Assert (Ekind (Id) in Type_Kind
5365 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
5367 end Set_Related_Expression;
5369 procedure Set_Related_Instance (Id : E; V : E) is
5371 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
5373 end Set_Related_Instance;
5375 procedure Set_Related_Type (Id : E; V : E) is
5377 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5379 end Set_Related_Type;
5381 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5383 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
5385 end Set_Relative_Deadline_Variable;
5387 procedure Set_Renamed_Entity (Id : E; V : N) is
5390 end Set_Renamed_Entity;
5392 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5394 pragma Assert (Ekind (Id) = E_Package);
5395 Set_Flag231 (Id, V);
5396 end Set_Renamed_In_Spec;
5398 procedure Set_Renamed_Object (Id : E; V : N) is
5401 end Set_Renamed_Object;
5403 procedure Set_Renaming_Map (Id : E; V : U) is
5406 end Set_Renaming_Map;
5408 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5410 pragma Assert (Is_Overloadable (Id));
5411 Set_Flag213 (Id, V);
5412 end Set_Requires_Overriding;
5414 procedure Set_Return_Present (Id : E; V : B := True) is
5417 end Set_Return_Present;
5419 procedure Set_Return_Applies_To (Id : E; V : N) is
5422 end Set_Return_Applies_To;
5424 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5427 end Set_Returns_By_Ref;
5429 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5432 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5433 Set_Flag164 (Id, V);
5434 end Set_Reverse_Bit_Order;
5436 procedure Set_Reverse_Storage_Order (Id : E; V : B := True) is
5440 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5442 end Set_Reverse_Storage_Order;
5444 procedure Set_RM_Size (Id : E; V : U) is
5446 pragma Assert (Is_Type (Id));
5450 procedure Set_Scalar_Range (Id : E; V : N) is
5453 end Set_Scalar_Range;
5455 procedure Set_Scale_Value (Id : E; V : U) is
5458 end Set_Scale_Value;
5460 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5462 pragma Assert (not Is_Record_Type (Id));
5464 end Set_Scope_Depth_Value;
5466 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5468 Set_Flag167 (Id, V);
5469 end Set_Sec_Stack_Needed_For_Return;
5471 procedure Set_Shadow_Entities (Id : E; V : S) is
5473 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5475 end Set_Shadow_Entities;
5477 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5479 pragma Assert (Ekind (Id) = E_Variable);
5481 end Set_Shared_Var_Procs_Instance;
5483 procedure Set_Size_Check_Code (Id : E; V : N) is
5485 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5487 end Set_Size_Check_Code;
5489 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5491 Set_Flag177 (Id, V);
5492 end Set_Size_Depends_On_Discriminant;
5494 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5497 end Set_Size_Known_At_Compile_Time;
5499 procedure Set_Small_Value (Id : E; V : R) is
5501 pragma Assert (Is_Fixed_Point_Type (Id));
5502 Set_Ureal21 (Id, V);
5503 end Set_Small_Value;
5505 procedure Set_SPARK_Mode_Pragmas (Id : E; V : N) is
5508 (Ekind_In (Id, E_Function, -- subprogram variants
5510 E_Generic_Procedure,
5514 Ekind_In (Id, E_Generic_Package, -- package variants
5519 end Set_SPARK_Mode_Pragmas;
5521 procedure Set_Spec_Entity (Id : E; V : E) is
5523 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5525 end Set_Spec_Entity;
5527 procedure Set_Static_Predicate (Id : E; V : S) is
5530 (Ekind_In (Id, E_Enumeration_Subtype,
5531 E_Modular_Integer_Subtype,
5532 E_Signed_Integer_Subtype)
5533 and then Has_Predicates (Id));
5535 end Set_Static_Predicate;
5537 procedure Set_Status_Flag_Or_Transient_Decl (Id : E; V : E) is
5539 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5541 end Set_Status_Flag_Or_Transient_Decl;
5543 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5545 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5546 pragma Assert (Id = Base_Type (Id));
5548 end Set_Storage_Size_Variable;
5550 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5552 pragma Assert (Ekind (Id) = E_Package);
5554 end Set_Static_Elaboration_Desired;
5556 procedure Set_Static_Initialization (Id : E; V : N) is
5559 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5561 end Set_Static_Initialization;
5563 procedure Set_Stored_Constraint (Id : E; V : L) is
5565 pragma Assert (Nkind (Id) in N_Entity);
5566 Set_Elist23 (Id, V);
5567 end Set_Stored_Constraint;
5569 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5571 pragma Assert (Id = Base_Type (Id));
5572 Set_Flag145 (Id, V);
5573 end Set_Strict_Alignment;
5575 procedure Set_String_Literal_Length (Id : E; V : U) is
5577 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5579 end Set_String_Literal_Length;
5581 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5583 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5585 end Set_String_Literal_Low_Bound;
5587 procedure Set_Subprograms_For_Type (Id : E; V : E) is
5589 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
5591 end Set_Subprograms_For_Type;
5593 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5595 Set_Flag148 (Id, V);
5596 end Set_Suppress_Elaboration_Warnings;
5598 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
5600 pragma Assert (Is_Type (Id));
5601 Set_Flag105 (Id, V);
5602 end Set_Suppress_Initialization;
5604 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5606 Set_Flag165 (Id, V);
5607 end Set_Suppress_Style_Checks;
5609 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5611 Set_Flag217 (Id, V);
5612 end Set_Suppress_Value_Tracking_On_Call;
5614 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5616 pragma Assert (Ekind (Id) in Task_Kind);
5618 end Set_Task_Body_Procedure;
5620 procedure Set_Thunk_Entity (Id : E; V : E) is
5622 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5623 and then Is_Thunk (Id));
5625 end Set_Thunk_Entity;
5627 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5630 end Set_Treat_As_Volatile;
5632 procedure Set_Underlying_Full_View (Id : E; V : E) is
5634 pragma Assert (Ekind (Id) in Private_Kind);
5636 end Set_Underlying_Full_View;
5638 procedure Set_Underlying_Record_View (Id : E; V : E) is
5640 pragma Assert (Ekind (Id) = E_Record_Type);
5642 end Set_Underlying_Record_View;
5644 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5646 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5647 Set_Flag216 (Id, V);
5648 end Set_Universal_Aliasing;
5650 procedure Set_Unset_Reference (Id : E; V : N) is
5653 end Set_Unset_Reference;
5655 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5657 Set_Flag222 (Id, V);
5658 end Set_Used_As_Generic_Actual;
5660 procedure Set_Uses_Lock_Free (Id : E; V : B := True) is
5662 pragma Assert (Ekind (Id) = E_Protected_Type);
5663 Set_Flag188 (Id, V);
5664 end Set_Uses_Lock_Free;
5666 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5669 end Set_Uses_Sec_Stack;
5671 procedure Set_Warnings_Off (Id : E; V : B := True) is
5674 end Set_Warnings_Off;
5676 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
5678 Set_Flag236 (Id, V);
5679 end Set_Warnings_Off_Used;
5681 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
5683 Set_Flag237 (Id, V);
5684 end Set_Warnings_Off_Used_Unmodified;
5686 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
5688 Set_Flag238 (Id, V);
5689 end Set_Warnings_Off_Used_Unreferenced;
5691 procedure Set_Was_Hidden (Id : E; V : B := True) is
5693 Set_Flag196 (Id, V);
5696 procedure Set_Wrapped_Entity (Id : E; V : E) is
5698 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5699 and then Is_Primitive_Wrapper (Id));
5701 end Set_Wrapped_Entity;
5703 -----------------------------------
5704 -- Field Initialization Routines --
5705 -----------------------------------
5707 procedure Init_Alignment (Id : E) is
5709 Set_Uint14 (Id, Uint_0);
5712 procedure Init_Alignment (Id : E; V : Int) is
5714 Set_Uint14 (Id, UI_From_Int (V));
5717 procedure Init_Component_Bit_Offset (Id : E) is
5719 Set_Uint11 (Id, No_Uint);
5720 end Init_Component_Bit_Offset;
5722 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
5724 Set_Uint11 (Id, UI_From_Int (V));
5725 end Init_Component_Bit_Offset;
5727 procedure Init_Component_Size (Id : E) is
5729 Set_Uint22 (Id, Uint_0);
5730 end Init_Component_Size;
5732 procedure Init_Component_Size (Id : E; V : Int) is
5734 Set_Uint22 (Id, UI_From_Int (V));
5735 end Init_Component_Size;
5737 procedure Init_Digits_Value (Id : E) is
5739 Set_Uint17 (Id, Uint_0);
5740 end Init_Digits_Value;
5742 procedure Init_Digits_Value (Id : E; V : Int) is
5744 Set_Uint17 (Id, UI_From_Int (V));
5745 end Init_Digits_Value;
5747 procedure Init_Esize (Id : E) is
5749 Set_Uint12 (Id, Uint_0);
5752 procedure Init_Esize (Id : E; V : Int) is
5754 Set_Uint12 (Id, UI_From_Int (V));
5757 procedure Init_Normalized_First_Bit (Id : E) is
5759 Set_Uint8 (Id, No_Uint);
5760 end Init_Normalized_First_Bit;
5762 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
5764 Set_Uint8 (Id, UI_From_Int (V));
5765 end Init_Normalized_First_Bit;
5767 procedure Init_Normalized_Position (Id : E) is
5769 Set_Uint14 (Id, No_Uint);
5770 end Init_Normalized_Position;
5772 procedure Init_Normalized_Position (Id : E; V : Int) is
5774 Set_Uint14 (Id, UI_From_Int (V));
5775 end Init_Normalized_Position;
5777 procedure Init_Normalized_Position_Max (Id : E) is
5779 Set_Uint10 (Id, No_Uint);
5780 end Init_Normalized_Position_Max;
5782 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
5784 Set_Uint10 (Id, UI_From_Int (V));
5785 end Init_Normalized_Position_Max;
5787 procedure Init_RM_Size (Id : E) is
5789 Set_Uint13 (Id, Uint_0);
5792 procedure Init_RM_Size (Id : E; V : Int) is
5794 Set_Uint13 (Id, UI_From_Int (V));
5797 -----------------------------
5798 -- Init_Component_Location --
5799 -----------------------------
5801 procedure Init_Component_Location (Id : E) is
5803 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
5804 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
5805 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
5806 Set_Uint12 (Id, Uint_0); -- Esize
5807 Set_Uint14 (Id, No_Uint); -- Normalized_Position
5808 end Init_Component_Location;
5810 ----------------------------
5811 -- Init_Object_Size_Align --
5812 ----------------------------
5814 procedure Init_Object_Size_Align (Id : E) is
5816 Set_Uint12 (Id, Uint_0); -- Esize
5817 Set_Uint14 (Id, Uint_0); -- Alignment
5818 end Init_Object_Size_Align;
5824 procedure Init_Size (Id : E; V : Int) is
5826 pragma Assert (not Is_Object (Id));
5827 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
5828 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
5831 ---------------------
5832 -- Init_Size_Align --
5833 ---------------------
5835 procedure Init_Size_Align (Id : E) is
5837 pragma Assert (not Is_Object (Id));
5838 Set_Uint12 (Id, Uint_0); -- Esize
5839 Set_Uint13 (Id, Uint_0); -- RM_Size
5840 Set_Uint14 (Id, Uint_0); -- Alignment
5841 end Init_Size_Align;
5843 ----------------------------------------------
5844 -- Type Representation Attribute Predicates --
5845 ----------------------------------------------
5847 function Known_Alignment (E : Entity_Id) return B is
5849 return Uint14 (E) /= Uint_0
5850 and then Uint14 (E) /= No_Uint;
5851 end Known_Alignment;
5853 function Known_Component_Bit_Offset (E : Entity_Id) return B is
5855 return Uint11 (E) /= No_Uint;
5856 end Known_Component_Bit_Offset;
5858 function Known_Component_Size (E : Entity_Id) return B is
5860 return Uint22 (Base_Type (E)) /= Uint_0
5861 and then Uint22 (Base_Type (E)) /= No_Uint;
5862 end Known_Component_Size;
5864 function Known_Esize (E : Entity_Id) return B is
5866 return Uint12 (E) /= Uint_0
5867 and then Uint12 (E) /= No_Uint;
5870 function Known_Normalized_First_Bit (E : Entity_Id) return B is
5872 return Uint8 (E) /= No_Uint;
5873 end Known_Normalized_First_Bit;
5875 function Known_Normalized_Position (E : Entity_Id) return B is
5877 return Uint14 (E) /= No_Uint;
5878 end Known_Normalized_Position;
5880 function Known_Normalized_Position_Max (E : Entity_Id) return B is
5882 return Uint10 (E) /= No_Uint;
5883 end Known_Normalized_Position_Max;
5885 function Known_RM_Size (E : Entity_Id) return B is
5887 return Uint13 (E) /= No_Uint
5888 and then (Uint13 (E) /= Uint_0
5889 or else Is_Discrete_Type (E)
5890 or else Is_Fixed_Point_Type (E));
5893 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
5895 return Uint11 (E) /= No_Uint
5896 and then Uint11 (E) >= Uint_0;
5897 end Known_Static_Component_Bit_Offset;
5899 function Known_Static_Component_Size (E : Entity_Id) return B is
5901 return Uint22 (Base_Type (E)) > Uint_0;
5902 end Known_Static_Component_Size;
5904 function Known_Static_Esize (E : Entity_Id) return B is
5906 return Uint12 (E) > Uint_0
5907 and then not Is_Generic_Type (E);
5908 end Known_Static_Esize;
5910 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
5912 return Uint8 (E) /= No_Uint
5913 and then Uint8 (E) >= Uint_0;
5914 end Known_Static_Normalized_First_Bit;
5916 function Known_Static_Normalized_Position (E : Entity_Id) return B is
5918 return Uint14 (E) /= No_Uint
5919 and then Uint14 (E) >= Uint_0;
5920 end Known_Static_Normalized_Position;
5922 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
5924 return Uint10 (E) /= No_Uint
5925 and then Uint10 (E) >= Uint_0;
5926 end Known_Static_Normalized_Position_Max;
5928 function Known_Static_RM_Size (E : Entity_Id) return B is
5930 return (Uint13 (E) > Uint_0
5931 or else Is_Discrete_Type (E)
5932 or else Is_Fixed_Point_Type (E))
5933 and then not Is_Generic_Type (E);
5934 end Known_Static_RM_Size;
5936 function Unknown_Alignment (E : Entity_Id) return B is
5938 return Uint14 (E) = Uint_0
5939 or else Uint14 (E) = No_Uint;
5940 end Unknown_Alignment;
5942 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
5944 return Uint11 (E) = No_Uint;
5945 end Unknown_Component_Bit_Offset;
5947 function Unknown_Component_Size (E : Entity_Id) return B is
5949 return Uint22 (Base_Type (E)) = Uint_0
5951 Uint22 (Base_Type (E)) = No_Uint;
5952 end Unknown_Component_Size;
5954 function Unknown_Esize (E : Entity_Id) return B is
5956 return Uint12 (E) = No_Uint
5958 Uint12 (E) = Uint_0;
5961 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
5963 return Uint8 (E) = No_Uint;
5964 end Unknown_Normalized_First_Bit;
5966 function Unknown_Normalized_Position (E : Entity_Id) return B is
5968 return Uint14 (E) = No_Uint;
5969 end Unknown_Normalized_Position;
5971 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
5973 return Uint10 (E) = No_Uint;
5974 end Unknown_Normalized_Position_Max;
5976 function Unknown_RM_Size (E : Entity_Id) return B is
5978 return (Uint13 (E) = Uint_0
5979 and then not Is_Discrete_Type (E)
5980 and then not Is_Fixed_Point_Type (E))
5981 or else Uint13 (E) = No_Uint;
5982 end Unknown_RM_Size;
5984 --------------------
5985 -- Address_Clause --
5986 --------------------
5988 function Address_Clause (Id : E) return N is
5990 return Get_Attribute_Definition_Clause (Id, Attribute_Address);
5997 function Aft_Value (Id : E) return U is
5999 Delta_Val : Ureal := Delta_Value (Id);
6001 while Delta_Val < Ureal_Tenth loop
6002 Delta_Val := Delta_Val * Ureal_10;
6003 Result := Result + 1;
6006 return UI_From_Int (Result);
6009 ----------------------
6010 -- Alignment_Clause --
6011 ----------------------
6013 function Alignment_Clause (Id : E) return N is
6015 return Get_Attribute_Definition_Clause (Id, Attribute_Alignment);
6016 end Alignment_Clause;
6022 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
6024 if Last_Entity (V) = Empty then
6025 Set_First_Entity (Id => V, V => Id);
6027 Set_Next_Entity (Last_Entity (V), Id);
6030 Set_Next_Entity (Id, Empty);
6032 Set_Last_Entity (Id => V, V => Id);
6039 function Base_Type (Id : E) return E is
6041 if Is_Base_Type (Id) then
6044 pragma Assert (Is_Type (Id));
6049 -------------------------
6050 -- Component_Alignment --
6051 -------------------------
6053 -- Component Alignment is encoded using two flags, Flag128/129 as
6054 -- follows. Note that both flags False = Align_Default, so that the
6055 -- default initialization of flags to False initializes component
6056 -- alignment to the default value as required.
6058 -- Flag128 Flag129 Value
6059 -- ------- ------- -----
6060 -- False False Calign_Default
6061 -- False True Calign_Component_Size
6062 -- True False Calign_Component_Size_4
6063 -- True True Calign_Storage_Unit
6065 function Component_Alignment (Id : E) return C is
6066 BT : constant Node_Id := Base_Type (Id);
6069 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
6071 if Flag128 (BT) then
6072 if Flag129 (BT) then
6073 return Calign_Storage_Unit;
6075 return Calign_Component_Size_4;
6079 if Flag129 (BT) then
6080 return Calign_Component_Size;
6082 return Calign_Default;
6085 end Component_Alignment;
6087 ----------------------
6088 -- Declaration_Node --
6089 ----------------------
6091 function Declaration_Node (Id : E) return N is
6095 if Ekind (Id) = E_Incomplete_Type
6096 and then Present (Full_View (Id))
6098 P := Parent (Full_View (Id));
6104 if Nkind (P) /= N_Selected_Component
6105 and then Nkind (P) /= N_Expanded_Name
6107 not (Nkind (P) = N_Defining_Program_Unit_Name
6108 and then Is_Child_Unit (Id))
6115 end Declaration_Node;
6117 ---------------------
6118 -- Designated_Type --
6119 ---------------------
6121 function Designated_Type (Id : E) return E is
6125 Desig_Type := Directly_Designated_Type (Id);
6127 if Ekind (Desig_Type) = E_Incomplete_Type
6128 and then Present (Full_View (Desig_Type))
6130 return Full_View (Desig_Type);
6132 elsif Is_Class_Wide_Type (Desig_Type)
6133 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
6134 and then Present (Full_View (Etype (Desig_Type)))
6135 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
6137 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
6142 end Designated_Type;
6144 ----------------------
6145 -- Entry_Index_Type --
6146 ----------------------
6148 function Entry_Index_Type (Id : E) return N is
6150 pragma Assert (Ekind (Id) = E_Entry_Family);
6151 return Etype (Discrete_Subtype_Definition (Parent (Id)));
6152 end Entry_Index_Type;
6154 ---------------------
6155 -- First_Component --
6156 ---------------------
6158 function First_Component (Id : E) return E is
6163 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
6165 Comp_Id := First_Entity (Id);
6166 while Present (Comp_Id) loop
6167 exit when Ekind (Comp_Id) = E_Component;
6168 Comp_Id := Next_Entity (Comp_Id);
6172 end First_Component;
6174 -------------------------------------
6175 -- First_Component_Or_Discriminant --
6176 -------------------------------------
6178 function First_Component_Or_Discriminant (Id : E) return E is
6183 (Is_Record_Type (Id)
6184 or else Is_Incomplete_Or_Private_Type (Id)
6185 or else Has_Discriminants (Id));
6187 Comp_Id := First_Entity (Id);
6188 while Present (Comp_Id) loop
6189 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6190 Comp_Id := Next_Entity (Comp_Id);
6194 end First_Component_Or_Discriminant;
6200 function First_Formal (Id : E) return E is
6205 (Is_Overloadable (Id)
6206 or else Ekind_In (Id, E_Entry_Family,
6208 E_Subprogram_Type));
6210 if Ekind (Id) = E_Enumeration_Literal then
6214 Formal := First_Entity (Id);
6216 if Present (Formal) and then Is_Formal (Formal) then
6224 ------------------------------
6225 -- First_Formal_With_Extras --
6226 ------------------------------
6228 function First_Formal_With_Extras (Id : E) return E is
6233 (Is_Overloadable (Id)
6234 or else Ekind_In (Id, E_Entry_Family,
6236 E_Subprogram_Type));
6238 if Ekind (Id) = E_Enumeration_Literal then
6242 Formal := First_Entity (Id);
6244 if Present (Formal) and then Is_Formal (Formal) then
6247 return Extra_Formals (Id); -- Empty if no extra formals
6250 end First_Formal_With_Extras;
6252 -------------------------------------
6253 -- Get_Attribute_Definition_Clause --
6254 -------------------------------------
6256 function Get_Attribute_Definition_Clause
6258 Id : Attribute_Id) return Node_Id
6263 N := First_Rep_Item (E);
6264 while Present (N) loop
6265 if Nkind (N) = N_Attribute_Definition_Clause
6266 and then Get_Attribute_Id (Chars (N)) = Id
6275 end Get_Attribute_Definition_Clause;
6281 function Get_Full_View (T : Entity_Id) return Entity_Id is
6283 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
6284 return Full_View (T);
6286 elsif Is_Class_Wide_Type (T)
6287 and then Ekind (Root_Type (T)) = E_Incomplete_Type
6288 and then Present (Full_View (Root_Type (T)))
6290 return Class_Wide_Type (Full_View (Root_Type (T)));
6301 function Get_Pragma (E : Entity_Id; Id : Pragma_Id) return Node_Id is
6302 Is_CDG : constant Boolean :=
6303 Id = Pragma_Abstract_State or else
6304 Id = Pragma_Depends or else
6305 Id = Pragma_Global or else
6306 Id = Pragma_Initializes or else
6307 Id = Pragma_Refined_Depends or else
6308 Id = Pragma_Refined_Global or else
6309 Id = Pragma_Refined_State;
6310 Is_CTC : constant Boolean :=
6311 Id = Pragma_Contract_Cases or else
6312 Id = Pragma_Test_Case;
6313 Is_PPC : constant Boolean :=
6314 Id = Pragma_Precondition or else
6315 Id = Pragma_Postcondition;
6317 In_Contract : constant Boolean := Is_CDG or Is_CTC or Is_PPC;
6323 -- Handle pragmas that appear in N_Contract nodes. Those have to be
6324 -- extracted from their specialized list.
6327 Items := Contract (E);
6333 Item := Classifications (Items);
6336 Item := Contract_Test_Cases (Items);
6339 Item := Pre_Post_Conditions (Items);
6345 Item := First_Rep_Item (E);
6348 while Present (Item) loop
6349 if Nkind (Item) = N_Pragma
6350 and then Get_Pragma_Id (Pragma_Name (Item)) = Id
6354 -- All nodes in N_Contract are chained using Next_Pragma
6356 elsif In_Contract then
6357 Item := Next_Pragma (Item);
6362 Next_Rep_Item (Item);
6369 --------------------------------------
6370 -- Get_Record_Representation_Clause --
6371 --------------------------------------
6373 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
6377 N := First_Rep_Item (E);
6378 while Present (N) loop
6379 if Nkind (N) = N_Record_Representation_Clause then
6387 end Get_Record_Representation_Clause;
6389 ------------------------
6390 -- Has_Attach_Handler --
6391 ------------------------
6393 function Has_Attach_Handler (Id : E) return B is
6397 pragma Assert (Is_Protected_Type (Id));
6399 Ritem := First_Rep_Item (Id);
6400 while Present (Ritem) loop
6401 if Nkind (Ritem) = N_Pragma
6402 and then Pragma_Name (Ritem) = Name_Attach_Handler
6406 Next_Rep_Item (Ritem);
6411 end Has_Attach_Handler;
6417 function Has_Entries (Id : E) return B is
6421 pragma Assert (Is_Concurrent_Type (Id));
6423 Ent := First_Entity (Id);
6424 while Present (Ent) loop
6425 if Is_Entry (Ent) then
6429 Ent := Next_Entity (Ent);
6435 ----------------------------
6436 -- Has_Foreign_Convention --
6437 ----------------------------
6439 function Has_Foreign_Convention (Id : E) return B is
6441 -- While regular Intrinsics such as the Standard operators fit in the
6442 -- "Ada" convention, those with an Interface_Name materialize GCC
6443 -- builtin imports for which Ada special treatments shouldn't apply.
6445 return Convention (Id) in Foreign_Convention
6446 or else (Convention (Id) = Convention_Intrinsic
6447 and then Present (Interface_Name (Id)));
6448 end Has_Foreign_Convention;
6450 ---------------------------
6451 -- Has_Interrupt_Handler --
6452 ---------------------------
6454 function Has_Interrupt_Handler (Id : E) return B is
6458 pragma Assert (Is_Protected_Type (Id));
6460 Ritem := First_Rep_Item (Id);
6461 while Present (Ritem) loop
6462 if Nkind (Ritem) = N_Pragma
6463 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6467 Next_Rep_Item (Ritem);
6472 end Has_Interrupt_Handler;
6474 -----------------------------
6475 -- Has_Null_Abstract_State --
6476 -----------------------------
6478 function Has_Null_Abstract_State (Id : E) return B is
6480 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
6483 Present (Abstract_States (Id))
6484 and then Is_Null_State (Node (First_Elmt (Abstract_States (Id))));
6485 end Has_Null_Abstract_State;
6487 --------------------
6488 -- Has_Unmodified --
6489 --------------------
6491 function Has_Unmodified (E : Entity_Id) return Boolean is
6493 if Has_Pragma_Unmodified (E) then
6495 elsif Warnings_Off (E) then
6496 Set_Warnings_Off_Used_Unmodified (E);
6503 ---------------------
6504 -- Has_Unreferenced --
6505 ---------------------
6507 function Has_Unreferenced (E : Entity_Id) return Boolean is
6509 if Has_Pragma_Unreferenced (E) then
6511 elsif Warnings_Off (E) then
6512 Set_Warnings_Off_Used_Unreferenced (E);
6517 end Has_Unreferenced;
6519 ----------------------
6520 -- Has_Warnings_Off --
6521 ----------------------
6523 function Has_Warnings_Off (E : Entity_Id) return Boolean is
6525 if Warnings_Off (E) then
6526 Set_Warnings_Off_Used (E);
6531 end Has_Warnings_Off;
6533 ------------------------------
6534 -- Implementation_Base_Type --
6535 ------------------------------
6537 function Implementation_Base_Type (Id : E) return E is
6542 Bastyp := Base_Type (Id);
6544 if Is_Incomplete_Or_Private_Type (Bastyp) then
6545 Imptyp := Underlying_Type (Bastyp);
6547 -- If we have an implementation type, then just return it,
6548 -- otherwise we return the Base_Type anyway. This can only
6549 -- happen in error situations and should avoid some error bombs.
6551 if Present (Imptyp) then
6552 return Base_Type (Imptyp);
6560 end Implementation_Base_Type;
6562 -------------------------
6563 -- Invariant_Procedure --
6564 -------------------------
6566 function Invariant_Procedure (Id : E) return E is
6570 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
6572 if No (Subprograms_For_Type (Id)) then
6576 S := Subprograms_For_Type (Id);
6577 while Present (S) loop
6578 if Is_Invariant_Procedure (S) then
6581 S := Subprograms_For_Type (S);
6587 end Invariant_Procedure;
6593 -- Global flag table allowing rapid computation of this function
6595 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
6596 (E_Enumeration_Subtype |
6598 E_Signed_Integer_Subtype |
6599 E_Modular_Integer_Subtype |
6600 E_Floating_Point_Subtype |
6601 E_Ordinary_Fixed_Point_Subtype |
6602 E_Decimal_Fixed_Point_Subtype |
6607 E_Record_Subtype_With_Private |
6608 E_Limited_Private_Subtype |
6610 E_Protected_Subtype |
6612 E_String_Literal_Subtype |
6613 E_Class_Wide_Subtype => False,
6616 function Is_Base_Type (Id : E) return Boolean is
6618 return Entity_Is_Base_Type (Ekind (Id));
6621 ---------------------
6622 -- Is_Boolean_Type --
6623 ---------------------
6625 function Is_Boolean_Type (Id : E) return B is
6627 return Root_Type (Id) = Standard_Boolean;
6628 end Is_Boolean_Type;
6630 ------------------------
6631 -- Is_Constant_Object --
6632 ------------------------
6634 function Is_Constant_Object (Id : E) return B is
6635 K : constant Entity_Kind := Ekind (Id);
6638 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
6639 end Is_Constant_Object;
6641 --------------------
6642 -- Is_Discriminal --
6643 --------------------
6645 function Is_Discriminal (Id : E) return B is
6647 return (Ekind_In (Id, E_Constant, E_In_Parameter)
6648 and then Present (Discriminal_Link (Id)));
6651 ----------------------
6652 -- Is_Dynamic_Scope --
6653 ----------------------
6655 function Is_Dynamic_Scope (Id : E) return B is
6658 Ekind (Id) = E_Block
6660 Ekind (Id) = E_Function
6662 Ekind (Id) = E_Procedure
6664 Ekind (Id) = E_Subprogram_Body
6666 Ekind (Id) = E_Task_Type
6668 (Ekind (Id) = E_Limited_Private_Type
6669 and then Present (Full_View (Id))
6670 and then Ekind (Full_View (Id)) = E_Task_Type)
6672 Ekind (Id) = E_Entry
6674 Ekind (Id) = E_Entry_Family
6676 Ekind (Id) = E_Return_Statement;
6677 end Is_Dynamic_Scope;
6679 --------------------
6680 -- Is_Entity_Name --
6681 --------------------
6683 function Is_Entity_Name (N : Node_Id) return Boolean is
6684 Kind : constant Node_Kind := Nkind (N);
6687 -- Identifiers, operator symbols, expanded names are entity names
6689 return Kind = N_Identifier
6690 or else Kind = N_Operator_Symbol
6691 or else Kind = N_Expanded_Name
6693 -- Attribute references are entity names if they refer to an entity.
6694 -- Note that we don't do this by testing for the presence of the
6695 -- Entity field in the N_Attribute_Reference node, since it may not
6696 -- have been set yet.
6698 or else (Kind = N_Attribute_Reference
6699 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
6702 -----------------------
6703 -- Is_External_State --
6704 -----------------------
6706 function Is_External_State (Id : E) return B is
6709 Ekind (Id) = E_Abstract_State and then Has_Option (Id, Name_External);
6710 end Is_External_State;
6716 function Is_Finalizer (Id : E) return B is
6718 return Ekind (Id) = E_Procedure and then Chars (Id) = Name_uFinalizer;
6721 ---------------------
6722 -- Is_Ghost_Entity --
6723 ---------------------
6725 function Is_Ghost_Entity (Id : E) return B is
6727 if Present (Id) and then Ekind (Id) = E_Variable then
6728 return Convention (Id) = Convention_Ghost;
6730 return Is_Ghost_Subprogram (Id);
6732 end Is_Ghost_Entity;
6734 -------------------------
6735 -- Is_Ghost_Subprogram --
6736 -------------------------
6738 function Is_Ghost_Subprogram (Id : E) return B is
6740 if Present (Id) and then Ekind_In (Id, E_Function, E_Procedure) then
6741 return Convention (Id) = Convention_Ghost;
6745 end Is_Ghost_Subprogram;
6747 -------------------------
6748 -- Is_Input_Only_State --
6749 -------------------------
6751 function Is_Input_Only_State (Id : E) return B is
6754 Ekind (Id) = E_Abstract_State
6755 and then Has_Option (Id, Name_Input_Only);
6756 end Is_Input_Only_State;
6758 ---------------------------
6759 -- Is_Non_Volatile_State --
6760 ---------------------------
6762 function Is_Non_Volatile_State (Id : E) return B is
6765 Ekind (Id) = E_Abstract_State
6766 and then Has_Option (Id, Name_Non_Volatile);
6767 end Is_Non_Volatile_State;
6773 function Is_Null_State (Id : E) return B is
6776 Ekind (Id) = E_Abstract_State and then Nkind (Parent (Id)) = N_Null;
6779 ---------------------
6780 -- Is_Output_State --
6781 ---------------------
6783 function Is_Output_Only_State (Id : E) return B is
6786 Ekind (Id) = E_Abstract_State
6787 and then Has_Option (Id, Name_Output_Only);
6788 end Is_Output_Only_State;
6790 -----------------------------------
6791 -- Is_Package_Or_Generic_Package --
6792 -----------------------------------
6794 function Is_Package_Or_Generic_Package (Id : E) return B is
6796 return Ekind_In (Id, E_Generic_Package, E_Package);
6797 end Is_Package_Or_Generic_Package;
6803 function Is_Prival (Id : E) return B is
6805 return (Ekind_In (Id, E_Constant, E_Variable)
6806 and then Present (Prival_Link (Id)));
6809 ----------------------------
6810 -- Is_Protected_Component --
6811 ----------------------------
6813 function Is_Protected_Component (Id : E) return B is
6815 return Ekind (Id) = E_Component and then Is_Protected_Type (Scope (Id));
6816 end Is_Protected_Component;
6818 ----------------------------
6819 -- Is_Protected_Interface --
6820 ----------------------------
6822 function Is_Protected_Interface (Id : E) return B is
6823 Typ : constant Entity_Id := Base_Type (Id);
6825 if not Is_Interface (Typ) then
6827 elsif Is_Class_Wide_Type (Typ) then
6828 return Is_Protected_Interface (Etype (Typ));
6830 return Protected_Present (Type_Definition (Parent (Typ)));
6832 end Is_Protected_Interface;
6834 ------------------------------
6835 -- Is_Protected_Record_Type --
6836 ------------------------------
6838 function Is_Protected_Record_Type (Id : E) return B is
6841 Is_Concurrent_Record_Type (Id)
6842 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
6843 end Is_Protected_Record_Type;
6845 --------------------------------
6846 -- Is_Standard_Character_Type --
6847 --------------------------------
6849 function Is_Standard_Character_Type (Id : E) return B is
6851 if Is_Type (Id) then
6853 R : constant Entity_Id := Root_Type (Id);
6856 R = Standard_Character
6858 R = Standard_Wide_Character
6860 R = Standard_Wide_Wide_Character;
6866 end Is_Standard_Character_Type;
6868 --------------------
6869 -- Is_String_Type --
6870 --------------------
6872 function Is_String_Type (Id : E) return B is
6874 return Ekind (Id) in String_Kind
6875 or else (Is_Array_Type (Id)
6876 and then Id /= Any_Composite
6877 and then Number_Dimensions (Id) = 1
6878 and then Is_Character_Type (Component_Type (Id)));
6881 -------------------------------
6882 -- Is_Synchronized_Interface --
6883 -------------------------------
6885 function Is_Synchronized_Interface (Id : E) return B is
6886 Typ : constant Entity_Id := Base_Type (Id);
6889 if not Is_Interface (Typ) then
6892 elsif Is_Class_Wide_Type (Typ) then
6893 return Is_Synchronized_Interface (Etype (Typ));
6896 return Protected_Present (Type_Definition (Parent (Typ)))
6897 or else Synchronized_Present (Type_Definition (Parent (Typ)))
6898 or else Task_Present (Type_Definition (Parent (Typ)));
6900 end Is_Synchronized_Interface;
6902 -----------------------
6903 -- Is_Task_Interface --
6904 -----------------------
6906 function Is_Task_Interface (Id : E) return B is
6907 Typ : constant Entity_Id := Base_Type (Id);
6909 if not Is_Interface (Typ) then
6911 elsif Is_Class_Wide_Type (Typ) then
6912 return Is_Task_Interface (Etype (Typ));
6914 return Task_Present (Type_Definition (Parent (Typ)));
6916 end Is_Task_Interface;
6918 -------------------------
6919 -- Is_Task_Record_Type --
6920 -------------------------
6922 function Is_Task_Record_Type (Id : E) return B is
6925 Is_Concurrent_Record_Type (Id)
6926 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
6927 end Is_Task_Record_Type;
6929 ------------------------
6930 -- Is_Wrapper_Package --
6931 ------------------------
6933 function Is_Wrapper_Package (Id : E) return B is
6935 return (Ekind (Id) = E_Package and then Present (Related_Instance (Id)));
6936 end Is_Wrapper_Package;
6942 function Last_Formal (Id : E) return E is
6947 (Is_Overloadable (Id)
6948 or else Ekind_In (Id, E_Entry_Family,
6950 E_Subprogram_Type));
6952 if Ekind (Id) = E_Enumeration_Literal then
6956 Formal := First_Formal (Id);
6958 if Present (Formal) then
6959 while Present (Next_Formal (Formal)) loop
6960 Formal := Next_Formal (Formal);
6968 function Model_Emin_Value (Id : E) return Uint is
6970 return Machine_Emin_Value (Id);
6971 end Model_Emin_Value;
6973 -------------------------
6974 -- Model_Epsilon_Value --
6975 -------------------------
6977 function Model_Epsilon_Value (Id : E) return Ureal is
6978 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6980 return Radix ** (1 - Model_Mantissa_Value (Id));
6981 end Model_Epsilon_Value;
6983 --------------------------
6984 -- Model_Mantissa_Value --
6985 --------------------------
6987 function Model_Mantissa_Value (Id : E) return Uint is
6989 return Machine_Mantissa_Value (Id);
6990 end Model_Mantissa_Value;
6992 -----------------------
6993 -- Model_Small_Value --
6994 -----------------------
6996 function Model_Small_Value (Id : E) return Ureal is
6997 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
6999 return Radix ** (Model_Emin_Value (Id) - 1);
7000 end Model_Small_Value;
7002 ------------------------
7003 -- Machine_Emax_Value --
7004 ------------------------
7006 function Machine_Emax_Value (Id : E) return Uint is
7007 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7010 case Float_Rep (Id) is
7013 when 1 .. 6 => return Uint_128;
7014 when 7 .. 15 => return 2**10;
7015 when 16 .. 33 => return 2**14;
7016 when others => return No_Uint;
7021 when 1 .. 9 => return 2**7 - 1;
7022 when 10 .. 15 => return 2**10 - 1;
7023 when others => return No_Uint;
7027 return Uint_2 ** Uint_7 - Uint_1;
7029 end Machine_Emax_Value;
7031 ------------------------
7032 -- Machine_Emin_Value --
7033 ------------------------
7035 function Machine_Emin_Value (Id : E) return Uint is
7037 case Float_Rep (Id) is
7038 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
7039 when VAX_Native => return -Machine_Emax_Value (Id);
7040 when AAMP => return -Machine_Emax_Value (Id);
7042 end Machine_Emin_Value;
7044 ----------------------------
7045 -- Machine_Mantissa_Value --
7046 ----------------------------
7048 function Machine_Mantissa_Value (Id : E) return Uint is
7049 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7052 case Float_Rep (Id) is
7055 when 1 .. 6 => return Uint_24;
7056 when 7 .. 15 => return UI_From_Int (53);
7057 when 16 .. 18 => return Uint_64;
7058 when 19 .. 33 => return UI_From_Int (113);
7059 when others => return No_Uint;
7064 when 1 .. 6 => return Uint_24;
7065 when 7 .. 9 => return UI_From_Int (56);
7066 when 10 .. 15 => return UI_From_Int (53);
7067 when others => return No_Uint;
7072 when 1 .. 6 => return Uint_24;
7073 when 7 .. 9 => return UI_From_Int (40);
7074 when others => return No_Uint;
7077 end Machine_Mantissa_Value;
7079 -------------------------
7080 -- Machine_Radix_Value --
7081 -------------------------
7083 function Machine_Radix_Value (Id : E) return U is
7085 case Float_Rep (Id) is
7086 when IEEE_Binary | VAX_Native | AAMP =>
7089 end Machine_Radix_Value;
7091 --------------------
7092 -- Next_Component --
7093 --------------------
7095 function Next_Component (Id : E) return E is
7099 Comp_Id := Next_Entity (Id);
7100 while Present (Comp_Id) loop
7101 exit when Ekind (Comp_Id) = E_Component;
7102 Comp_Id := Next_Entity (Comp_Id);
7108 ------------------------------------
7109 -- Next_Component_Or_Discriminant --
7110 ------------------------------------
7112 function Next_Component_Or_Discriminant (Id : E) return E is
7116 Comp_Id := Next_Entity (Id);
7117 while Present (Comp_Id) loop
7118 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
7119 Comp_Id := Next_Entity (Comp_Id);
7123 end Next_Component_Or_Discriminant;
7125 -----------------------
7126 -- Next_Discriminant --
7127 -----------------------
7129 -- This function actually implements both Next_Discriminant and
7130 -- Next_Stored_Discriminant by making sure that the Discriminant
7131 -- returned is of the same variety as Id.
7133 function Next_Discriminant (Id : E) return E is
7135 -- Derived Tagged types with private extensions look like this...
7137 -- E_Discriminant d1
7138 -- E_Discriminant d2
7140 -- E_Discriminant d1
7141 -- E_Discriminant d2
7144 -- so it is critical not to go past the leading discriminants
7149 pragma Assert (Ekind (Id) = E_Discriminant);
7152 D := Next_Entity (D);
7154 or else (Ekind (D) /= E_Discriminant
7155 and then not Is_Itype (D))
7160 exit when Ekind (D) = E_Discriminant
7161 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
7165 end Next_Discriminant;
7171 function Next_Formal (Id : E) return E is
7175 -- Follow the chain of declared entities as long as the kind of the
7176 -- entity corresponds to a formal parameter. Skip internal entities
7177 -- that may have been created for implicit subtypes, in the process
7178 -- of analyzing default expressions.
7182 P := Next_Entity (P);
7184 if No (P) or else Is_Formal (P) then
7186 elsif not Is_Internal (P) then
7192 -----------------------------
7193 -- Next_Formal_With_Extras --
7194 -----------------------------
7196 function Next_Formal_With_Extras (Id : E) return E is
7198 if Present (Extra_Formal (Id)) then
7199 return Extra_Formal (Id);
7201 return Next_Formal (Id);
7203 end Next_Formal_With_Extras;
7209 function Next_Index (Id : Node_Id) return Node_Id is
7218 function Next_Literal (Id : E) return E is
7220 pragma Assert (Nkind (Id) in N_Entity);
7224 ------------------------------
7225 -- Next_Stored_Discriminant --
7226 ------------------------------
7228 function Next_Stored_Discriminant (Id : E) return E is
7230 -- See comment in Next_Discriminant
7232 return Next_Discriminant (Id);
7233 end Next_Stored_Discriminant;
7235 -----------------------
7236 -- Number_Dimensions --
7237 -----------------------
7239 function Number_Dimensions (Id : E) return Pos is
7244 if Ekind (Id) in String_Kind then
7249 T := First_Index (Id);
7250 while Present (T) loop
7257 end Number_Dimensions;
7259 --------------------
7260 -- Number_Entries --
7261 --------------------
7263 function Number_Entries (Id : E) return Nat is
7268 pragma Assert (Is_Concurrent_Type (Id));
7271 Ent := First_Entity (Id);
7272 while Present (Ent) loop
7273 if Is_Entry (Ent) then
7277 Ent := Next_Entity (Ent);
7283 --------------------
7284 -- Number_Formals --
7285 --------------------
7287 function Number_Formals (Id : E) return Pos is
7293 Formal := First_Formal (Id);
7294 while Present (Formal) loop
7296 Formal := Next_Formal (Formal);
7302 --------------------
7303 -- Parameter_Mode --
7304 --------------------
7306 function Parameter_Mode (Id : E) return Formal_Kind is
7311 ------------------------
7312 -- Predicate_Function --
7313 ------------------------
7315 function Predicate_Function (Id : E) return E is
7320 pragma Assert (Is_Type (Id));
7322 -- If type is private and has a completion, predicate may be defined
7323 -- on the full view.
7325 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7326 T := Full_View (Id);
7331 if No (Subprograms_For_Type (T)) then
7335 S := Subprograms_For_Type (T);
7336 while Present (S) loop
7337 if Is_Predicate_Function (S) then
7340 S := Subprograms_For_Type (S);
7346 end Predicate_Function;
7348 --------------------------
7349 -- Predicate_Function_M --
7350 --------------------------
7352 function Predicate_Function_M (Id : E) return E is
7357 pragma Assert (Is_Type (Id));
7359 -- If type is private and has a completion, predicate may be defined
7360 -- on the full view.
7362 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7363 T := Full_View (Id);
7368 if No (Subprograms_For_Type (T)) then
7372 S := Subprograms_For_Type (T);
7373 while Present (S) loop
7374 if Is_Predicate_Function_M (S) then
7377 S := Subprograms_For_Type (S);
7383 end Predicate_Function_M;
7385 -------------------------
7386 -- Present_In_Rep_Item --
7387 -------------------------
7389 function Present_In_Rep_Item (E : Entity_Id; N : Node_Id) return Boolean is
7393 Ritem := First_Rep_Item (E);
7395 while Present (Ritem) loop
7400 Next_Rep_Item (Ritem);
7404 end Present_In_Rep_Item;
7406 --------------------------
7407 -- Primitive_Operations --
7408 --------------------------
7410 function Primitive_Operations (Id : E) return L is
7412 if Is_Concurrent_Type (Id) then
7413 if Present (Corresponding_Record_Type (Id)) then
7414 return Direct_Primitive_Operations
7415 (Corresponding_Record_Type (Id));
7417 -- If expansion is disabled the corresponding record type is absent,
7418 -- but if the type has ancestors it may have primitive operations.
7420 elsif Is_Tagged_Type (Id) then
7421 return Direct_Primitive_Operations (Id);
7427 return Direct_Primitive_Operations (Id);
7429 end Primitive_Operations;
7431 ---------------------
7432 -- Record_Rep_Item --
7433 ---------------------
7435 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
7437 Set_Next_Rep_Item (N, First_Rep_Item (E));
7438 Set_First_Rep_Item (E, N);
7439 end Record_Rep_Item;
7445 function Root_Type (Id : E) return E is
7449 pragma Assert (Nkind (Id) in N_Entity);
7451 T := Base_Type (Id);
7453 if Ekind (T) = E_Class_Wide_Type then
7465 -- Following test catches some error cases resulting from
7468 elsif No (Etyp) then
7469 Check_Error_Detected;
7472 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
7475 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
7481 -- Return if there is a circularity in the inheritance chain. This
7482 -- happens in some error situations and we do not want to get
7483 -- stuck in this loop.
7485 if T = Base_Type (Id) then
7492 ---------------------
7493 -- Safe_Emax_Value --
7494 ---------------------
7496 function Safe_Emax_Value (Id : E) return Uint is
7498 return Machine_Emax_Value (Id);
7499 end Safe_Emax_Value;
7501 ----------------------
7502 -- Safe_First_Value --
7503 ----------------------
7505 function Safe_First_Value (Id : E) return Ureal is
7507 return -Safe_Last_Value (Id);
7508 end Safe_First_Value;
7510 ---------------------
7511 -- Safe_Last_Value --
7512 ---------------------
7514 function Safe_Last_Value (Id : E) return Ureal is
7515 Radix : constant Uint := Machine_Radix_Value (Id);
7516 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
7517 Emax : constant Uint := Safe_Emax_Value (Id);
7518 Significand : constant Uint := Radix ** Mantissa - 1;
7519 Exponent : constant Uint := Emax - Mantissa;
7525 (Num => Significand * 2 ** (Exponent mod 4),
7526 Den => -Exponent / 4,
7532 (Num => Significand,
7536 end Safe_Last_Value;
7542 function Scope_Depth (Id : E) return Uint is
7547 while Is_Record_Type (Scop) loop
7548 Scop := Scope (Scop);
7551 return Scope_Depth_Value (Scop);
7554 ---------------------
7555 -- Scope_Depth_Set --
7556 ---------------------
7558 function Scope_Depth_Set (Id : E) return B is
7560 return not Is_Record_Type (Id)
7561 and then Field22 (Id) /= Union_Id (Empty);
7562 end Scope_Depth_Set;
7564 -----------------------------
7565 -- Set_Component_Alignment --
7566 -----------------------------
7568 -- Component Alignment is encoded using two flags, Flag128/129 as
7569 -- follows. Note that both flags False = Align_Default, so that the
7570 -- default initialization of flags to False initializes component
7571 -- alignment to the default value as required.
7573 -- Flag128 Flag129 Value
7574 -- ------- ------- -----
7575 -- False False Calign_Default
7576 -- False True Calign_Component_Size
7577 -- True False Calign_Component_Size_4
7578 -- True True Calign_Storage_Unit
7580 procedure Set_Component_Alignment (Id : E; V : C) is
7582 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
7583 and then Is_Base_Type (Id));
7586 when Calign_Default =>
7587 Set_Flag128 (Id, False);
7588 Set_Flag129 (Id, False);
7590 when Calign_Component_Size =>
7591 Set_Flag128 (Id, False);
7592 Set_Flag129 (Id, True);
7594 when Calign_Component_Size_4 =>
7595 Set_Flag128 (Id, True);
7596 Set_Flag129 (Id, False);
7598 when Calign_Storage_Unit =>
7599 Set_Flag128 (Id, True);
7600 Set_Flag129 (Id, True);
7602 end Set_Component_Alignment;
7604 -----------------------------
7605 -- Set_Invariant_Procedure --
7606 -----------------------------
7608 procedure Set_Invariant_Procedure (Id : E; V : E) is
7612 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7614 S := Subprograms_For_Type (Id);
7615 Set_Subprograms_For_Type (Id, V);
7616 Set_Subprograms_For_Type (V, S);
7618 -- Check for duplicate entry
7620 while Present (S) loop
7621 if Is_Invariant_Procedure (S) then
7622 raise Program_Error;
7624 S := Subprograms_For_Type (S);
7627 end Set_Invariant_Procedure;
7629 ----------------------------
7630 -- Set_Predicate_Function --
7631 ----------------------------
7633 procedure Set_Predicate_Function (Id : E; V : E) is
7637 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7639 S := Subprograms_For_Type (Id);
7640 Set_Subprograms_For_Type (Id, V);
7641 Set_Subprograms_For_Type (V, S);
7643 while Present (S) loop
7644 if Is_Predicate_Function (S) then
7645 raise Program_Error;
7647 S := Subprograms_For_Type (S);
7650 end Set_Predicate_Function;
7652 ------------------------------
7653 -- Set_Predicate_Function_M --
7654 ------------------------------
7656 procedure Set_Predicate_Function_M (Id : E; V : E) is
7660 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7662 S := Subprograms_For_Type (Id);
7663 Set_Subprograms_For_Type (Id, V);
7664 Set_Subprograms_For_Type (V, S);
7666 -- Check for duplicates
7668 while Present (S) loop
7669 if Is_Predicate_Function_M (S) then
7670 raise Program_Error;
7672 S := Subprograms_For_Type (S);
7675 end Set_Predicate_Function_M;
7681 function Size_Clause (Id : E) return N is
7683 return Get_Attribute_Definition_Clause (Id, Attribute_Size);
7686 ------------------------
7687 -- Stream_Size_Clause --
7688 ------------------------
7690 function Stream_Size_Clause (Id : E) return N is
7692 return Get_Attribute_Definition_Clause (Id, Attribute_Stream_Size);
7693 end Stream_Size_Clause;
7699 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
7705 Kind := E_Access_Subtype;
7709 Kind := E_Array_Subtype;
7711 when E_Class_Wide_Type |
7712 E_Class_Wide_Subtype =>
7713 Kind := E_Class_Wide_Subtype;
7715 when E_Decimal_Fixed_Point_Type |
7716 E_Decimal_Fixed_Point_Subtype =>
7717 Kind := E_Decimal_Fixed_Point_Subtype;
7719 when E_Ordinary_Fixed_Point_Type |
7720 E_Ordinary_Fixed_Point_Subtype =>
7721 Kind := E_Ordinary_Fixed_Point_Subtype;
7723 when E_Private_Type |
7724 E_Private_Subtype =>
7725 Kind := E_Private_Subtype;
7727 when E_Limited_Private_Type |
7728 E_Limited_Private_Subtype =>
7729 Kind := E_Limited_Private_Subtype;
7731 when E_Record_Type_With_Private |
7732 E_Record_Subtype_With_Private =>
7733 Kind := E_Record_Subtype_With_Private;
7735 when E_Record_Type |
7737 Kind := E_Record_Subtype;
7739 when E_String_Type |
7741 Kind := E_String_Subtype;
7743 when Enumeration_Kind =>
7744 Kind := E_Enumeration_Subtype;
7747 Kind := E_Floating_Point_Subtype;
7749 when Signed_Integer_Kind =>
7750 Kind := E_Signed_Integer_Subtype;
7752 when Modular_Integer_Kind =>
7753 Kind := E_Modular_Integer_Subtype;
7755 when Protected_Kind =>
7756 Kind := E_Protected_Subtype;
7759 Kind := E_Task_Subtype;
7763 raise Program_Error;
7769 ---------------------
7770 -- Type_High_Bound --
7771 ---------------------
7773 function Type_High_Bound (Id : E) return Node_Id is
7774 Rng : constant Node_Id := Scalar_Range (Id);
7776 if Nkind (Rng) = N_Subtype_Indication then
7777 return High_Bound (Range_Expression (Constraint (Rng)));
7779 return High_Bound (Rng);
7781 end Type_High_Bound;
7783 --------------------
7784 -- Type_Low_Bound --
7785 --------------------
7787 function Type_Low_Bound (Id : E) return Node_Id is
7788 Rng : constant Node_Id := Scalar_Range (Id);
7790 if Nkind (Rng) = N_Subtype_Indication then
7791 return Low_Bound (Range_Expression (Constraint (Rng)));
7793 return Low_Bound (Rng);
7797 ---------------------
7798 -- Underlying_Type --
7799 ---------------------
7801 function Underlying_Type (Id : E) return E is
7803 -- For record_with_private the underlying type is always the direct
7804 -- full view. Never try to take the full view of the parent it
7805 -- doesn't make sense.
7807 if Ekind (Id) = E_Record_Type_With_Private then
7808 return Full_View (Id);
7810 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
7812 -- If we have an incomplete or private type with a full view,
7813 -- then we return the Underlying_Type of this full view
7815 if Present (Full_View (Id)) then
7816 if Id = Full_View (Id) then
7818 -- Previous error in declaration
7823 return Underlying_Type (Full_View (Id));
7826 -- If we have an incomplete entity that comes from the limited
7827 -- view then we return the Underlying_Type of its non-limited
7830 elsif From_With_Type (Id)
7831 and then Present (Non_Limited_View (Id))
7833 return Underlying_Type (Non_Limited_View (Id));
7835 -- Otherwise check for the case where we have a derived type or
7836 -- subtype, and if so get the Underlying_Type of the parent type.
7838 elsif Etype (Id) /= Id then
7839 return Underlying_Type (Etype (Id));
7841 -- Otherwise we have an incomplete or private type that has
7842 -- no full view, which means that we have not encountered the
7843 -- completion, so return Empty to indicate the underlying type
7844 -- is not yet known.
7850 -- For non-incomplete, non-private types, return the type itself
7851 -- Also for entities that are not types at all return the entity
7857 end Underlying_Type;
7863 function Vax_Float (Id : E) return B is
7865 return Is_Floating_Point_Type (Id) and then Float_Rep (Id) = VAX_Native;
7868 ------------------------
7869 -- Write_Entity_Flags --
7870 ------------------------
7872 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
7874 procedure W (Flag_Name : String; Flag : Boolean);
7875 -- Write out given flag if it is set
7881 procedure W (Flag_Name : String; Flag : Boolean) is
7885 Write_Str (Flag_Name);
7886 Write_Str (" = True");
7891 -- Start of processing for Write_Entity_Flags
7894 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
7895 and then Is_Base_Type (Id)
7898 Write_Str ("Component_Alignment = ");
7900 case Component_Alignment (Id) is
7901 when Calign_Default =>
7902 Write_Str ("Calign_Default");
7904 when Calign_Component_Size =>
7905 Write_Str ("Calign_Component_Size");
7907 when Calign_Component_Size_4 =>
7908 Write_Str ("Calign_Component_Size_4");
7910 when Calign_Storage_Unit =>
7911 Write_Str ("Calign_Storage_Unit");
7917 W ("Address_Taken", Flag104 (Id));
7918 W ("Body_Needed_For_SAL", Flag40 (Id));
7919 W ("C_Pass_By_Copy", Flag125 (Id));
7920 W ("Can_Never_Be_Null", Flag38 (Id));
7921 W ("Checks_May_Be_Suppressed", Flag31 (Id));
7922 W ("Debug_Info_Off", Flag166 (Id));
7923 W ("Default_Expressions_Processed", Flag108 (Id));
7924 W ("Delay_Cleanups", Flag114 (Id));
7925 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
7926 W ("Depends_On_Private", Flag14 (Id));
7927 W ("Discard_Names", Flag88 (Id));
7928 W ("Elaboration_Entity_Required", Flag174 (Id));
7929 W ("Elaborate_Body_Desirable", Flag210 (Id));
7930 W ("Entry_Accepted", Flag152 (Id));
7931 W ("Can_Use_Internal_Rep", Flag229 (Id));
7932 W ("Finalize_Storage_Only", Flag158 (Id));
7933 W ("From_With_Type", Flag159 (Id));
7934 W ("Has_Aliased_Components", Flag135 (Id));
7935 W ("Has_Alignment_Clause", Flag46 (Id));
7936 W ("Has_All_Calls_Remote", Flag79 (Id));
7937 W ("Has_Anonymous_Master", Flag253 (Id));
7938 W ("Has_Atomic_Components", Flag86 (Id));
7939 W ("Has_Biased_Representation", Flag139 (Id));
7940 W ("Has_Completion", Flag26 (Id));
7941 W ("Has_Completion_In_Body", Flag71 (Id));
7942 W ("Has_Complex_Representation", Flag140 (Id));
7943 W ("Has_Component_Size_Clause", Flag68 (Id));
7944 W ("Has_Contiguous_Rep", Flag181 (Id));
7945 W ("Has_Controlled_Component", Flag43 (Id));
7946 W ("Has_Controlling_Result", Flag98 (Id));
7947 W ("Has_Convention_Pragma", Flag119 (Id));
7948 W ("Has_Default_Aspect", Flag39 (Id));
7949 W ("Has_Delayed_Aspects", Flag200 (Id));
7950 W ("Has_Delayed_Freeze", Flag18 (Id));
7951 W ("Has_Delayed_Rep_Aspects", Flag261 (Id));
7952 W ("Has_Discriminants", Flag5 (Id));
7953 W ("Has_Dispatch_Table", Flag220 (Id));
7954 W ("Has_Dynamic_Predicate_Aspect", Flag258 (Id));
7955 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
7956 W ("Has_Exit", Flag47 (Id));
7957 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
7958 W ("Has_Forward_Instantiation", Flag175 (Id));
7959 W ("Has_Fully_Qualified_Name", Flag173 (Id));
7960 W ("Has_Gigi_Rep_Item", Flag82 (Id));
7961 W ("Has_Homonym", Flag56 (Id));
7962 W ("Has_Implicit_Dereference", Flag251 (Id));
7963 W ("Has_Inheritable_Invariants", Flag248 (Id));
7964 W ("Has_Initial_Value", Flag219 (Id));
7965 W ("Has_Invariants", Flag232 (Id));
7966 W ("Has_Loop_Entry_Attributes", Flag260 (Id));
7967 W ("Has_Machine_Radix_Clause", Flag83 (Id));
7968 W ("Has_Master_Entity", Flag21 (Id));
7969 W ("Has_Missing_Return", Flag142 (Id));
7970 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
7971 W ("Has_Non_Standard_Rep", Flag75 (Id));
7972 W ("Has_Null_Refinement", Flag263 (Id));
7973 W ("Has_Object_Size_Clause", Flag172 (Id));
7974 W ("Has_Per_Object_Constraint", Flag154 (Id));
7975 W ("Has_Postconditions", Flag240 (Id));
7976 W ("Has_Pragma_Controlled", Flag27 (Id));
7977 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
7978 W ("Has_Pragma_Inline", Flag157 (Id));
7979 W ("Has_Pragma_Inline_Always", Flag230 (Id));
7980 W ("Has_Pragma_No_Inline", Flag201 (Id));
7981 W ("Has_Pragma_Ordered", Flag198 (Id));
7982 W ("Has_Pragma_Pack", Flag121 (Id));
7983 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
7984 W ("Has_Pragma_Pure", Flag203 (Id));
7985 W ("Has_Pragma_Pure_Function", Flag179 (Id));
7986 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
7987 W ("Has_Pragma_Unmodified", Flag233 (Id));
7988 W ("Has_Pragma_Unreferenced", Flag180 (Id));
7989 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
7990 W ("Has_Predicates", Flag250 (Id));
7991 W ("Has_Primitive_Operations", Flag120 (Id));
7992 W ("Has_Private_Ancestor", Flag151 (Id));
7993 W ("Has_Private_Declaration", Flag155 (Id));
7994 W ("Has_Qualified_Name", Flag161 (Id));
7995 W ("Has_RACW", Flag214 (Id));
7996 W ("Has_Record_Rep_Clause", Flag65 (Id));
7997 W ("Has_Recursive_Call", Flag143 (Id));
7998 W ("Has_Size_Clause", Flag29 (Id));
7999 W ("Has_Small_Clause", Flag67 (Id));
8000 W ("Has_Specified_Layout", Flag100 (Id));
8001 W ("Has_Specified_Stream_Input", Flag190 (Id));
8002 W ("Has_Specified_Stream_Output", Flag191 (Id));
8003 W ("Has_Specified_Stream_Read", Flag192 (Id));
8004 W ("Has_Specified_Stream_Write", Flag193 (Id));
8005 W ("Has_Static_Discriminants", Flag211 (Id));
8006 W ("Has_Static_Predicate_Aspect", Flag259 (Id));
8007 W ("Has_Storage_Size_Clause", Flag23 (Id));
8008 W ("Has_Stream_Size_Clause", Flag184 (Id));
8009 W ("Has_Task", Flag30 (Id));
8010 W ("Has_Thunks", Flag228 (Id));
8011 W ("Has_Unchecked_Union", Flag123 (Id));
8012 W ("Has_Unknown_Discriminants", Flag72 (Id));
8013 W ("Has_Up_Level_Access", Flag215 (Id));
8014 W ("Has_Volatile_Components", Flag87 (Id));
8015 W ("Has_Xref_Entry", Flag182 (Id));
8016 W ("In_Package_Body", Flag48 (Id));
8017 W ("In_Private_Part", Flag45 (Id));
8018 W ("In_Use", Flag8 (Id));
8019 W ("Is_AST_Entry", Flag132 (Id));
8020 W ("Is_Abstract_Subprogram", Flag19 (Id));
8021 W ("Is_Abstract_Type", Flag146 (Id));
8022 W ("Is_Local_Anonymous_Access", Flag194 (Id));
8023 W ("Is_Access_Constant", Flag69 (Id));
8024 W ("Is_Ada_2005_Only", Flag185 (Id));
8025 W ("Is_Ada_2012_Only", Flag199 (Id));
8026 W ("Is_Aliased", Flag15 (Id));
8027 W ("Is_Asynchronous", Flag81 (Id));
8028 W ("Is_Atomic", Flag85 (Id));
8029 W ("Is_Bit_Packed_Array", Flag122 (Id));
8030 W ("Is_CPP_Class", Flag74 (Id));
8031 W ("Is_Called", Flag102 (Id));
8032 W ("Is_Character_Type", Flag63 (Id));
8033 W ("Is_Child_Unit", Flag73 (Id));
8034 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
8035 W ("Is_Compilation_Unit", Flag149 (Id));
8036 W ("Is_Completely_Hidden", Flag103 (Id));
8037 W ("Is_Concurrent_Record_Type", Flag20 (Id));
8038 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
8039 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
8040 W ("Is_Constrained", Flag12 (Id));
8041 W ("Is_Constructor", Flag76 (Id));
8042 W ("Is_Controlled", Flag42 (Id));
8043 W ("Is_Controlling_Formal", Flag97 (Id));
8044 W ("Is_Descendent_Of_Address", Flag223 (Id));
8045 W ("Is_Discrim_SO_Function", Flag176 (Id));
8046 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
8047 W ("Is_Dispatching_Operation", Flag6 (Id));
8048 W ("Is_Eliminated", Flag124 (Id));
8049 W ("Is_Entry_Formal", Flag52 (Id));
8050 W ("Is_Exported", Flag99 (Id));
8051 W ("Is_First_Subtype", Flag70 (Id));
8052 W ("Is_For_Access_Subtype", Flag118 (Id));
8053 W ("Is_Formal_Subprogram", Flag111 (Id));
8054 W ("Is_Frozen", Flag4 (Id));
8055 W ("Is_Generic_Actual_Type", Flag94 (Id));
8056 W ("Is_Generic_Instance", Flag130 (Id));
8057 W ("Is_Generic_Type", Flag13 (Id));
8058 W ("Is_Hidden", Flag57 (Id));
8059 W ("Is_Hidden_Open_Scope", Flag171 (Id));
8060 W ("Is_Immediately_Visible", Flag7 (Id));
8061 W ("Is_Implementation_Defined", Flag254 (Id));
8062 W ("Is_Imported", Flag24 (Id));
8063 W ("Is_Inlined", Flag11 (Id));
8064 W ("Is_Instantiated", Flag126 (Id));
8065 W ("Is_Interface", Flag186 (Id));
8066 W ("Is_Internal", Flag17 (Id));
8067 W ("Is_Interrupt_Handler", Flag89 (Id));
8068 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
8069 W ("Is_Invariant_Procedure", Flag257 (Id));
8070 W ("Is_Itype", Flag91 (Id));
8071 W ("Is_Known_Non_Null", Flag37 (Id));
8072 W ("Is_Known_Null", Flag204 (Id));
8073 W ("Is_Known_Valid", Flag170 (Id));
8074 W ("Is_Limited_Composite", Flag106 (Id));
8075 W ("Is_Limited_Interface", Flag197 (Id));
8076 W ("Is_Limited_Record", Flag25 (Id));
8077 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
8078 W ("Is_Non_Static_Subtype", Flag109 (Id));
8079 W ("Is_Null_Init_Proc", Flag178 (Id));
8080 W ("Is_Obsolescent", Flag153 (Id));
8081 W ("Is_Only_Out_Parameter", Flag226 (Id));
8082 W ("Is_Optional_Parameter", Flag134 (Id));
8083 W ("Is_Package_Body_Entity", Flag160 (Id));
8084 W ("Is_Packed", Flag51 (Id));
8085 W ("Is_Packed_Array_Type", Flag138 (Id));
8086 W ("Is_Potentially_Use_Visible", Flag9 (Id));
8087 W ("Is_Predicate_Function", Flag255 (Id));
8088 W ("Is_Predicate_Function_M", Flag256 (Id));
8089 W ("Is_Preelaborated", Flag59 (Id));
8090 W ("Is_Primitive", Flag218 (Id));
8091 W ("Is_Primitive_Wrapper", Flag195 (Id));
8092 W ("Is_Private_Composite", Flag107 (Id));
8093 W ("Is_Private_Descendant", Flag53 (Id));
8094 W ("Is_Private_Primitive", Flag245 (Id));
8095 W ("Is_Processed_Transient", Flag252 (Id));
8096 W ("Is_Public", Flag10 (Id));
8097 W ("Is_Pure", Flag44 (Id));
8098 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
8099 W ("Is_RACW_Stub_Type", Flag244 (Id));
8100 W ("Is_Raised", Flag224 (Id));
8101 W ("Is_Remote_Call_Interface", Flag62 (Id));
8102 W ("Is_Remote_Types", Flag61 (Id));
8103 W ("Is_Renaming_Of_Object", Flag112 (Id));
8104 W ("Is_Return_Object", Flag209 (Id));
8105 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
8106 W ("Is_Shared_Passive", Flag60 (Id));
8107 W ("Is_Statically_Allocated", Flag28 (Id));
8108 W ("Is_Tag", Flag78 (Id));
8109 W ("Is_Tagged_Type", Flag55 (Id));
8110 W ("Is_Thunk", Flag225 (Id));
8111 W ("Is_Trivial_Subprogram", Flag235 (Id));
8112 W ("Is_True_Constant", Flag163 (Id));
8113 W ("Is_Unchecked_Union", Flag117 (Id));
8114 W ("Is_Underlying_Record_View", Flag246 (Id));
8115 W ("Is_Unsigned_Type", Flag144 (Id));
8116 W ("Is_VMS_Exception", Flag133 (Id));
8117 W ("Is_Valued_Procedure", Flag127 (Id));
8118 W ("Is_Visible_Formal", Flag206 (Id));
8119 W ("Is_Visible_Lib_Unit", Flag116 (Id));
8120 W ("Is_Volatile", Flag16 (Id));
8121 W ("Itype_Printed", Flag202 (Id));
8122 W ("Kill_Elaboration_Checks", Flag32 (Id));
8123 W ("Kill_Range_Checks", Flag33 (Id));
8124 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
8125 W ("Low_Bound_Tested", Flag205 (Id));
8126 W ("Machine_Radix_10", Flag84 (Id));
8127 W ("Materialize_Entity", Flag168 (Id));
8128 W ("May_Inherit_Delayed_Rep_Aspects", Flag262 (Id));
8129 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
8130 W ("Must_Have_Preelab_Init", Flag208 (Id));
8131 W ("Needs_Debug_Info", Flag147 (Id));
8132 W ("Needs_No_Actuals", Flag22 (Id));
8133 W ("Never_Set_In_Source", Flag115 (Id));
8134 W ("No_Pool_Assigned", Flag131 (Id));
8135 W ("No_Return", Flag113 (Id));
8136 W ("No_Strict_Aliasing", Flag136 (Id));
8137 W ("Non_Binary_Modulus", Flag58 (Id));
8138 W ("Nonzero_Is_True", Flag162 (Id));
8139 W ("OK_To_Rename", Flag247 (Id));
8140 W ("OK_To_Reorder_Components", Flag239 (Id));
8141 W ("Optimize_Alignment_Space", Flag241 (Id));
8142 W ("Optimize_Alignment_Time", Flag242 (Id));
8143 W ("Overlays_Constant", Flag243 (Id));
8144 W ("Reachable", Flag49 (Id));
8145 W ("Referenced", Flag156 (Id));
8146 W ("Referenced_As_LHS", Flag36 (Id));
8147 W ("Referenced_As_Out_Parameter", Flag227 (Id));
8148 W ("Renamed_In_Spec", Flag231 (Id));
8149 W ("Requires_Overriding", Flag213 (Id));
8150 W ("Return_Present", Flag54 (Id));
8151 W ("Returns_By_Ref", Flag90 (Id));
8152 W ("Reverse_Bit_Order", Flag164 (Id));
8153 W ("Reverse_Storage_Order", Flag93 (Id));
8154 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
8155 W ("Size_Depends_On_Discriminant", Flag177 (Id));
8156 W ("Size_Known_At_Compile_Time", Flag92 (Id));
8157 W ("Static_Elaboration_Desired", Flag77 (Id));
8158 W ("Strict_Alignment", Flag145 (Id));
8159 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
8160 W ("Suppress_Initialization", Flag105 (Id));
8161 W ("Suppress_Style_Checks", Flag165 (Id));
8162 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
8163 W ("Treat_As_Volatile", Flag41 (Id));
8164 W ("Universal_Aliasing", Flag216 (Id));
8165 W ("Used_As_Generic_Actual", Flag222 (Id));
8166 W ("Uses_Sec_Stack", Flag95 (Id));
8167 W ("Warnings_Off", Flag96 (Id));
8168 W ("Warnings_Off_Used", Flag236 (Id));
8169 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
8170 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
8171 W ("Was_Hidden", Flag196 (Id));
8172 end Write_Entity_Flags;
8174 -----------------------
8175 -- Write_Entity_Info --
8176 -----------------------
8178 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
8180 procedure Write_Attribute (Which : String; Nam : E);
8181 -- Write attribute value with given string name
8183 procedure Write_Kind (Id : Entity_Id);
8184 -- Write Ekind field of entity
8186 ---------------------
8187 -- Write_Attribute --
8188 ---------------------
8190 procedure Write_Attribute (Which : String; Nam : E) is
8194 Write_Int (Int (Nam));
8196 Write_Name (Chars (Nam));
8198 end Write_Attribute;
8204 procedure Write_Kind (Id : Entity_Id) is
8205 K : constant String := Entity_Kind'Image (Ekind (Id));
8209 Write_Str (" Kind ");
8211 if Is_Type (Id) and then Is_Tagged_Type (Id) then
8212 Write_Str ("TAGGED ");
8215 Write_Str (K (3 .. K'Length));
8218 if Is_Type (Id) and then Depends_On_Private (Id) then
8219 Write_Str ("Depends_On_Private ");
8223 -- Start of processing for Write_Entity_Info
8227 Write_Attribute ("Name ", Id);
8228 Write_Int (Int (Id));
8232 Write_Attribute (" Type ", Etype (Id));
8234 Write_Attribute (" Scope ", Scope (Id));
8239 when Discrete_Kind =>
8240 Write_Str ("Bounds: Id = ");
8242 if Present (Scalar_Range (Id)) then
8243 Write_Int (Int (Type_Low_Bound (Id)));
8244 Write_Str (" .. Id = ");
8245 Write_Int (Int (Type_High_Bound (Id)));
8247 Write_Str ("Empty");
8258 (" Component Type ", Component_Type (Id));
8261 Write_Str (" Indexes ");
8263 Index := First_Index (Id);
8264 while Present (Index) loop
8265 Write_Attribute (" ", Etype (Index));
8266 Index := Next_Index (Index);
8274 (" Directly Designated Type ",
8275 Directly_Designated_Type (Id));
8278 when Overloadable_Kind =>
8279 if Present (Homonym (Id)) then
8280 Write_Str (" Homonym ");
8281 Write_Name (Chars (Homonym (Id)));
8283 Write_Int (Int (Homonym (Id)));
8290 if Ekind (Scope (Id)) in Record_Kind then
8292 " Original_Record_Component ",
8293 Original_Record_Component (Id));
8294 Write_Int (Int (Original_Record_Component (Id)));
8298 when others => null;
8300 end Write_Entity_Info;
8302 -----------------------
8303 -- Write_Field6_Name --
8304 -----------------------
8306 procedure Write_Field6_Name (Id : Entity_Id) is
8307 pragma Warnings (Off, Id);
8309 Write_Str ("First_Rep_Item");
8310 end Write_Field6_Name;
8312 -----------------------
8313 -- Write_Field7_Name --
8314 -----------------------
8316 procedure Write_Field7_Name (Id : Entity_Id) is
8317 pragma Warnings (Off, Id);
8319 Write_Str ("Freeze_Node");
8320 end Write_Field7_Name;
8322 -----------------------
8323 -- Write_Field8_Name --
8324 -----------------------
8326 procedure Write_Field8_Name (Id : Entity_Id) is
8330 Write_Str ("Associated_Node_For_Itype");
8333 Write_Str ("Dependent_Instances");
8336 Write_Str ("First_Exit_Statement");
8339 Write_Str ("Hiding_Loop_Variable");
8343 E_Subprogram_Body =>
8344 Write_Str ("Mechanism");
8348 Write_Str ("Normalized_First_Bit");
8351 Write_Str ("Postcondition_Proc");
8353 when E_Abstract_State =>
8354 Write_Str ("Refinement_Constituents");
8356 when E_Return_Statement =>
8357 Write_Str ("Return_Applies_To");
8360 Write_Str ("Field8??");
8362 end Write_Field8_Name;
8364 -----------------------
8365 -- Write_Field9_Name --
8366 -----------------------
8368 procedure Write_Field9_Name (Id : Entity_Id) is
8372 Write_Str ("Class_Wide_Type");
8375 Write_Str ("Current_Value");
8378 E_Generic_Function |
8380 E_Generic_Procedure |
8383 Write_Str ("Renaming_Map");
8386 Write_Str ("Field9??");
8388 end Write_Field9_Name;
8390 ------------------------
8391 -- Write_Field10_Name --
8392 ------------------------
8394 procedure Write_Field10_Name (Id : Entity_Id) is
8397 when Class_Wide_Kind |
8403 Write_Str ("Direct_Primitive_Operations");
8406 Write_Str ("Float_Rep");
8408 when E_In_Parameter |
8410 Write_Str ("Discriminal_Link");
8416 Write_Str ("Handler_Records");
8420 Write_Str ("Normalized_Position_Max");
8422 when E_Abstract_State |
8424 Write_Str ("Refined_State");
8427 Write_Str ("Field10??");
8429 end Write_Field10_Name;
8431 ------------------------
8432 -- Write_Field11_Name --
8433 ------------------------
8435 procedure Write_Field11_Name (Id : Entity_Id) is
8439 Write_Str ("Block_Node");
8443 Write_Str ("Component_Bit_Offset");
8446 Write_Str ("Entry_Component");
8448 when E_Enumeration_Literal =>
8449 Write_Str ("Enumeration_Pos");
8453 Write_Str ("Full_View");
8455 when E_Generic_Package =>
8456 Write_Str ("Generic_Homonym");
8462 Write_Str ("Protected_Body_Subprogram");
8465 Write_Str ("Field11??");
8467 end Write_Field11_Name;
8469 ------------------------
8470 -- Write_Field12_Name --
8471 ------------------------
8473 procedure Write_Field12_Name (Id : Entity_Id) is
8477 Write_Str ("Associated_Formal_Package");
8480 Write_Str ("Barrier_Function");
8482 when E_Enumeration_Literal =>
8483 Write_Str ("Enumeration_Rep");
8491 E_In_Out_Parameter |
8495 Write_Str ("Esize");
8499 Write_Str ("Next_Inlined_Subprogram");
8502 Write_Str ("Field12??");
8504 end Write_Field12_Name;
8506 ------------------------
8507 -- Write_Field13_Name --
8508 ------------------------
8510 procedure Write_Field13_Name (Id : Entity_Id) is
8515 Write_Str ("Component_Clause");
8518 Write_Str ("Elaboration_Entity");
8522 Generic_Unit_Kind =>
8523 Write_Str ("Elaboration_Entity");
8527 Write_Str ("Extra_Accessibility");
8530 Write_Str ("RM_Size");
8533 Write_Str ("Field13??");
8535 end Write_Field13_Name;
8537 -----------------------
8538 -- Write_Field14_Name --
8539 -----------------------
8541 procedure Write_Field14_Name (Id : Entity_Id) is
8550 Write_Str ("Alignment");
8554 Write_Str ("First_Optional_Parameter");
8558 Write_Str ("Normalized_Position");
8561 E_Generic_Package =>
8562 Write_Str ("Shadow_Entities");
8565 Write_Str ("Field14??");
8567 end Write_Field14_Name;
8569 ------------------------
8570 -- Write_Field15_Name --
8571 ------------------------
8573 procedure Write_Field15_Name (Id : Entity_Id) is
8576 when E_Discriminant =>
8577 Write_Str ("Discriminant_Number");
8580 Write_Str ("DT_Entry_Count");
8584 Write_Str ("DT_Position");
8586 when E_Protected_Type =>
8587 Write_Str ("Entry_Bodies_Array");
8590 Write_Str ("Entry_Parameters_Type");
8593 Write_Str ("Extra_Formal");
8595 when Enumeration_Kind =>
8596 Write_Str ("Lit_Indexes");
8600 Write_Str ("Related_Instance");
8602 when Decimal_Fixed_Point_Kind =>
8603 Write_Str ("Scale_Value");
8607 Write_Str ("Status_Flag_Or_Transient_Decl");
8611 Write_Str ("Storage_Size_Variable");
8613 when E_String_Literal_Subtype =>
8614 Write_Str ("String_Literal_Low_Bound");
8617 Write_Str ("Field15??");
8619 end Write_Field15_Name;
8621 ------------------------
8622 -- Write_Field16_Name --
8623 ------------------------
8625 procedure Write_Field16_Name (Id : Entity_Id) is
8628 when E_Record_Type |
8629 E_Record_Type_With_Private =>
8630 Write_Str ("Access_Disp_Table");
8632 when E_Record_Subtype |
8633 E_Class_Wide_Subtype =>
8634 Write_Str ("Cloned_Subtype");
8638 Write_Str ("DTC_Entity");
8641 Write_Str ("Entry_Formal");
8646 Write_Str ("First_Private_Entity");
8648 when Enumeration_Kind =>
8649 Write_Str ("Lit_Strings");
8651 when E_String_Literal_Subtype =>
8652 Write_Str ("String_Literal_Length");
8656 Write_Str ("Unset_Reference");
8659 Write_Str ("Field16??");
8661 end Write_Field16_Name;
8663 ------------------------
8664 -- Write_Field17_Name --
8665 ------------------------
8667 procedure Write_Field17_Name (Id : Entity_Id) is
8672 E_Generic_In_Out_Parameter |
8674 Write_Str ("Actual_Subtype");
8677 Write_Str ("Digits_Value");
8679 when E_Discriminant =>
8680 Write_Str ("Discriminal");
8689 E_Generic_Function |
8691 E_Generic_Procedure |
8699 E_Return_Statement |
8701 E_Subprogram_Type =>
8702 Write_Str ("First_Entity");
8705 Write_Str ("First_Index");
8707 when Enumeration_Kind =>
8708 Write_Str ("First_Literal");
8711 Write_Str ("Master_Id");
8713 when Modular_Integer_Kind =>
8714 Write_Str ("Modulus");
8716 when E_Incomplete_Type =>
8717 Write_Str ("Non_Limited_View");
8719 when E_Incomplete_Subtype =>
8720 if From_With_Type (Id) then
8721 Write_Str ("Non_Limited_View");
8725 Write_Str ("Prival");
8728 Write_Str ("Field17??");
8730 end Write_Field17_Name;
8732 ------------------------
8733 -- Write_Field18_Name --
8734 ------------------------
8736 procedure Write_Field18_Name (Id : Entity_Id) is
8739 when E_Enumeration_Literal |
8743 Write_Str ("Alias");
8745 when E_Record_Type =>
8746 Write_Str ("Corresponding_Concurrent_Type");
8748 when E_Subprogram_Body =>
8749 Write_Str ("Corresponding_Protected_Entry");
8751 when Concurrent_Kind =>
8752 Write_Str ("Corresponding_Record_Type");
8757 Write_Str ("Enclosing_Scope");
8759 when E_Entry_Index_Parameter =>
8760 Write_Str ("Entry_Index_Constant");
8762 when E_Class_Wide_Subtype |
8763 E_Access_Protected_Subprogram_Type |
8764 E_Anonymous_Access_Protected_Subprogram_Type |
8765 E_Access_Subprogram_Type |
8767 Write_Str ("Equivalent_Type");
8769 when Fixed_Point_Kind =>
8770 Write_Str ("Delta_Value");
8772 when Incomplete_Or_Private_Kind |
8774 Write_Str ("Private_Dependents");
8777 Write_Str ("Renamed_Object");
8781 E_Generic_Function |
8782 E_Generic_Procedure |
8783 E_Generic_Package =>
8784 Write_Str ("Renamed_Entity");
8787 Write_Str ("Field18??");
8789 end Write_Field18_Name;
8791 -----------------------
8792 -- Write_Field19_Name --
8793 -----------------------
8795 procedure Write_Field19_Name (Id : Entity_Id) is
8799 E_Generic_Package =>
8800 Write_Str ("Body_Entity");
8802 when E_Discriminant =>
8803 Write_Str ("Corresponding_Discriminant");
8806 Write_Str ("Default_Aspect_Value");
8808 when E_Array_Type =>
8809 Write_Str ("Default_Component_Value");
8811 when E_Record_Type =>
8812 Write_Str ("Parent_Subtype");
8816 Write_Str ("Size_Check_Code");
8818 when E_Package_Body |
8820 Write_Str ("Spec_Entity");
8822 when Private_Kind =>
8823 Write_Str ("Underlying_Full_View");
8825 when E_Function | E_Operator | E_Subprogram_Type =>
8826 Write_Str ("Extra_Accessibility_Of_Result");
8829 Write_Str ("Field19??");
8831 end Write_Field19_Name;
8833 -----------------------
8834 -- Write_Field20_Name --
8835 -----------------------
8837 procedure Write_Field20_Name (Id : Entity_Id) is
8841 Write_Str ("Component_Type");
8843 when E_In_Parameter |
8844 E_Generic_In_Parameter =>
8845 Write_Str ("Default_Value");
8848 Write_Str ("Directly_Designated_Type");
8851 Write_Str ("Discriminant_Checking_Func");
8853 when E_Discriminant =>
8854 Write_Str ("Discriminant_Default_Value");
8863 E_Generic_Function |
8865 E_Generic_Procedure |
8873 E_Return_Statement |
8875 E_Subprogram_Type =>
8876 Write_Str ("Last_Entity");
8880 Write_Str ("Prival_Link");
8883 Write_Str ("Scalar_Range");
8886 Write_Str ("Register_Exception_Call");
8889 Write_Str ("Field20??");
8891 end Write_Field20_Name;
8893 -----------------------
8894 -- Write_Field21_Name --
8895 -----------------------
8897 procedure Write_Field21_Name (Id : Entity_Id) is
8901 Write_Str ("Accept_Address");
8903 when E_In_Parameter =>
8904 Write_Str ("Default_Expr_Function");
8906 when Concurrent_Kind |
8907 Incomplete_Or_Private_Kind |
8911 Write_Str ("Discriminant_Constraint");
8916 E_Generic_Function |
8918 E_Generic_Procedure |
8920 Write_Str ("Interface_Name");
8923 Modular_Integer_Kind =>
8924 Write_Str ("Original_Array_Type");
8926 when Fixed_Point_Kind =>
8927 Write_Str ("Small_Value");
8930 Write_Str ("Field21??");
8932 end Write_Field21_Name;
8934 -----------------------
8935 -- Write_Field22_Name --
8936 -----------------------
8938 procedure Write_Field22_Name (Id : Entity_Id) is
8942 Write_Str ("Associated_Storage_Pool");
8945 Write_Str ("Component_Size");
8947 when E_Record_Type =>
8948 Write_Str ("Corresponding_Remote_Type");
8952 Write_Str ("Original_Record_Component");
8954 when E_Enumeration_Literal =>
8955 Write_Str ("Enumeration_Rep_Expr");
8958 Write_Str ("Exception_Code");
8960 when E_Record_Type_With_Private |
8961 E_Record_Subtype_With_Private |
8964 E_Limited_Private_Type |
8965 E_Limited_Private_Subtype =>
8966 Write_Str ("Private_View");
8969 Write_Str ("Protected_Formal");
8979 E_Generic_Function |
8980 E_Generic_Procedure |
8983 E_Return_Statement |
8986 Write_Str ("Scope_Depth_Value");
8989 Write_Str ("Shared_Var_Procs_Instance");
8992 Write_Str ("Field22??");
8994 end Write_Field22_Name;
8996 ------------------------
8997 -- Write_Field23_Name --
8998 ------------------------
9000 procedure Write_Field23_Name (Id : Entity_Id) is
9003 when E_Discriminant =>
9004 Write_Str ("CR_Discriminant");
9007 Write_Str ("Entry_Cancel_Parameter");
9009 when E_Enumeration_Type =>
9010 Write_Str ("Enum_Pos_To_Rep");
9014 Write_Str ("Extra_Constrained");
9017 Write_Str ("Finalization_Master");
9019 when E_Generic_Function |
9021 E_Generic_Procedure =>
9022 Write_Str ("Inner_Instances");
9025 Write_Str ("Packed_Array_Type");
9028 Write_Str ("Protection_Object");
9030 when Concurrent_Kind |
9031 Incomplete_Or_Private_Kind |
9035 Write_Str ("Stored_Constraint");
9039 if Present (Scope (Id))
9040 and then Is_Protected_Type (Scope (Id))
9042 Write_Str ("Protection_Object");
9044 Write_Str ("Generic_Renamings");
9048 if Is_Generic_Instance (Id) then
9049 Write_Str ("Generic_Renamings");
9051 Write_Str ("Limited_View");
9055 Write_Str ("Field23??");
9057 end Write_Field23_Name;
9059 ------------------------
9060 -- Write_Field24_Name --
9061 ------------------------
9063 procedure Write_Field24_Name (Id : Entity_Id) is
9069 Write_Str ("Related_Expression");
9077 Generic_Subprogram_Kind |
9079 Write_Str ("Contract");
9082 Write_Str ("Field24???");
9084 end Write_Field24_Name;
9086 ------------------------
9087 -- Write_Field25_Name --
9088 ------------------------
9090 procedure Write_Field25_Name (Id : Entity_Id) is
9094 Write_Str ("Abstract_States");
9097 Write_Str ("Debug_Renaming_Link");
9100 Write_Str ("DT_Offset_To_Top_Func");
9104 Write_Str ("Interface_Alias");
9106 when E_Record_Type |
9108 E_Record_Type_With_Private |
9109 E_Record_Subtype_With_Private =>
9110 Write_Str ("Interfaces");
9114 Write_Str ("Related_Array_Object");
9117 Write_Str ("Task_Body_Procedure");
9121 Write_Str ("PPC_Wrapper");
9123 when E_Enumeration_Subtype |
9124 E_Modular_Integer_Subtype |
9125 E_Signed_Integer_Subtype =>
9126 Write_Str ("Static_Predicate");
9129 Write_Str ("Field25??");
9131 end Write_Field25_Name;
9133 ------------------------
9134 -- Write_Field26_Name --
9135 ------------------------
9137 procedure Write_Field26_Name (Id : Entity_Id) is
9140 when E_Record_Type |
9141 E_Record_Type_With_Private =>
9142 Write_Str ("Dispatch_Table_Wrappers");
9144 when E_In_Out_Parameter |
9147 Write_Str ("Last_Assignment");
9149 when E_Access_Subprogram_Type =>
9150 Write_Str ("Original_Access_Type");
9152 when E_Generic_Package |
9154 Write_Str ("Package_Instantiation");
9158 Write_Str ("Related_Type");
9161 Write_Str ("Relative_Deadline_Variable");
9165 Write_Str ("Overridden_Operation");
9168 Write_Str ("Field26??");
9170 end Write_Field26_Name;
9172 ------------------------
9173 -- Write_Field27_Name --
9174 ------------------------
9176 procedure Write_Field27_Name (Id : Entity_Id) is
9181 Write_Str ("Current_Use_Clause");
9186 Write_Str ("Related_Type");
9190 Write_Str ("Wrapped_Entity");
9193 Write_Str ("Field27??");
9195 end Write_Field27_Name;
9197 ------------------------
9198 -- Write_Field28_Name --
9199 ------------------------
9201 procedure Write_Field28_Name (Id : Entity_Id) is
9209 E_Subprogram_Type =>
9210 Write_Str ("Extra_Formals");
9214 Write_Str ("Finalizer");
9218 Write_Str ("Initialization_Statements");
9220 when E_Record_Type =>
9221 Write_Str ("Underlying_Record_View");
9224 Write_Str ("Field28??");
9226 end Write_Field28_Name;
9228 ------------------------
9229 -- Write_Field29_Name --
9230 ------------------------
9232 procedure Write_Field29_Name (Id : Entity_Id) is
9236 Write_Str ("Subprograms_For_Type");
9239 Write_Str ("Field29??");
9241 end Write_Field29_Name;
9243 ------------------------
9244 -- Write_Field30_Name --
9245 ------------------------
9247 procedure Write_Field30_Name (Id : Entity_Id) is
9251 Write_Str ("Corresponding_Equality");
9254 Write_Str ("Static_Initialization");
9257 Write_Str ("Field30??");
9259 end Write_Field30_Name;
9261 ------------------------
9262 -- Write_Field31_Name --
9263 ------------------------
9265 procedure Write_Field31_Name (Id : Entity_Id) is
9270 Write_Str ("Thunk_Entity");
9273 Write_Str ("Field31??");
9275 end Write_Field31_Name;
9277 ------------------------
9278 -- Write_Field32_Name --
9279 ------------------------
9281 procedure Write_Field32_Name (Id : Entity_Id) is
9285 E_Generic_Function |
9287 E_Generic_Procedure |
9291 E_Subprogram_Body =>
9292 Write_Str ("SPARK_Mode_Pragmas");
9295 Write_Str ("Field32??");
9297 end Write_Field32_Name;
9299 ------------------------
9300 -- Write_Field33_Name --
9301 ------------------------
9303 procedure Write_Field33_Name (Id : Entity_Id) is
9307 Write_Str ("Field33??");
9309 end Write_Field33_Name;
9311 ------------------------
9312 -- Write_Field34_Name --
9313 ------------------------
9315 procedure Write_Field34_Name (Id : Entity_Id) is
9319 Write_Str ("Field34??");
9321 end Write_Field34_Name;
9323 ------------------------
9324 -- Write_Field35_Name --
9325 ------------------------
9327 procedure Write_Field35_Name (Id : Entity_Id) is
9331 Write_Str ("Field35??");
9333 end Write_Field35_Name;
9335 -------------------------
9336 -- Iterator Procedures --
9337 -------------------------
9339 procedure Proc_Next_Component (N : in out Node_Id) is
9341 N := Next_Component (N);
9342 end Proc_Next_Component;
9344 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
9346 N := Next_Entity (N);
9347 while Present (N) loop
9348 exit when Ekind_In (N, E_Component, E_Discriminant);
9349 N := Next_Entity (N);
9351 end Proc_Next_Component_Or_Discriminant;
9353 procedure Proc_Next_Discriminant (N : in out Node_Id) is
9355 N := Next_Discriminant (N);
9356 end Proc_Next_Discriminant;
9358 procedure Proc_Next_Formal (N : in out Node_Id) is
9360 N := Next_Formal (N);
9361 end Proc_Next_Formal;
9363 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
9365 N := Next_Formal_With_Extras (N);
9366 end Proc_Next_Formal_With_Extras;
9368 procedure Proc_Next_Index (N : in out Node_Id) is
9370 N := Next_Index (N);
9371 end Proc_Next_Index;
9373 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
9375 N := Next_Inlined_Subprogram (N);
9376 end Proc_Next_Inlined_Subprogram;
9378 procedure Proc_Next_Literal (N : in out Node_Id) is
9380 N := Next_Literal (N);
9381 end Proc_Next_Literal;
9383 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
9385 N := Next_Stored_Discriminant (N);
9386 end Proc_Next_Stored_Discriminant;