1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2014, 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
89 -- Part_Of_Constituents Elist9
92 -- Encapsulating_State Node10
93 -- Direct_Primitive_Operations Elist10
94 -- Discriminal_Link Node10
95 -- Float_Rep Uint10 (but returns Float_Rep_Kind)
96 -- Handler_Records List10
97 -- Normalized_Position_Max Uint10
99 -- Component_Bit_Offset Uint11
101 -- Entry_Component Node11
102 -- Enumeration_Pos Uint11
103 -- Generic_Homonym Node11
104 -- Protected_Body_Subprogram Node11
107 -- Barrier_Function Node12
108 -- Enumeration_Rep Uint12
110 -- Next_Inlined_Subprogram Node12
112 -- Component_Clause Node13
113 -- Elaboration_Entity Node13
114 -- Extra_Accessibility Node13
118 -- First_Optional_Parameter Node14
119 -- Normalized_Position Uint14
120 -- Shadow_Entities List14
122 -- Discriminant_Number Uint15
123 -- DT_Position Uint15
124 -- DT_Entry_Count Uint15
125 -- Entry_Bodies_Array Node15
126 -- Entry_Parameters_Type Node15
127 -- Extra_Formal Node15
128 -- Lit_Indexes Node15
129 -- Related_Instance Node15
130 -- Status_Flag_Or_Transient_Decl Node15
131 -- Scale_Value Uint15
132 -- Storage_Size_Variable Node15
133 -- String_Literal_Low_Bound Node15
135 -- Access_Disp_Table Elist16
136 -- Body_References Elist16
137 -- Cloned_Subtype Node16
139 -- Entry_Formal Node16
140 -- First_Private_Entity Node16
141 -- Lit_Strings Node16
142 -- String_Literal_Length Uint16
143 -- Unset_Reference Node16
145 -- Actual_Subtype Node17
146 -- Digits_Value Uint17
147 -- Discriminal Node17
148 -- First_Entity Node17
149 -- First_Index Node17
150 -- First_Literal Node17
153 -- Non_Limited_View Node17
157 -- Corresponding_Concurrent_Type Node18
158 -- Corresponding_Protected_Entry Node18
159 -- Corresponding_Record_Type Node18
160 -- Delta_Value Ureal18
161 -- Enclosing_Scope Node18
162 -- Equivalent_Type Node18
163 -- Private_Dependents Elist18
164 -- Renamed_Entity Node18
165 -- Renamed_Object Node18
167 -- Body_Entity Node19
168 -- Corresponding_Discriminant Node19
169 -- Default_Aspect_Component_Value Node19
170 -- Default_Aspect_Value Node19
171 -- Extra_Accessibility_Of_Result Node19
172 -- Parent_Subtype Node19
173 -- Size_Check_Code Node19
174 -- Spec_Entity Node19
175 -- Underlying_Full_View Node19
177 -- Component_Type Node20
178 -- Default_Value Node20
179 -- Directly_Designated_Type Node20
180 -- Discriminant_Checking_Func Node20
181 -- Discriminant_Default_Value Node20
182 -- Last_Entity Node20
183 -- Prival_Link Node20
184 -- Register_Exception_Call Node20
185 -- Scalar_Range Node20
187 -- Accept_Address Elist21
188 -- Default_Expr_Function Node21
189 -- Discriminant_Constraint Elist21
190 -- Interface_Name Node21
191 -- Original_Array_Type Node21
192 -- Small_Value Ureal21
194 -- Associated_Storage_Pool Node22
195 -- Component_Size Uint22
196 -- Corresponding_Remote_Type Node22
197 -- Enumeration_Rep_Expr Node22
198 -- Exception_Code Uint22
199 -- Original_Record_Component Node22
200 -- Private_View Node22
201 -- Protected_Formal Node22
202 -- Scope_Depth_Value Uint22
203 -- Shared_Var_Procs_Instance Node22
205 -- CR_Discriminant Node23
206 -- Entry_Cancel_Parameter Node23
207 -- Enum_Pos_To_Rep Node23
208 -- Extra_Constrained Node23
209 -- Finalization_Master Node23
210 -- Generic_Renamings Elist23
211 -- Inner_Instances Elist23
212 -- Limited_View Node23
213 -- Packed_Array_Impl_Type Node23
214 -- Protection_Object Node23
215 -- Stored_Constraint Elist23
217 -- Related_Expression Node24
219 -- Interface_Alias Node25
220 -- Interfaces Elist25
221 -- Debug_Renaming_Link Node25
222 -- DT_Offset_To_Top_Func Node25
223 -- PPC_Wrapper Node25
224 -- Related_Array_Object Node25
225 -- Static_Predicate List25
226 -- Task_Body_Procedure Node25
228 -- Dispatch_Table_Wrappers Elist26
229 -- Last_Assignment Node26
230 -- Original_Access_Type Node26
231 -- Overridden_Operation Node26
232 -- Package_Instantiation Node26
233 -- Relative_Deadline_Variable Node26
235 -- Current_Use_Clause Node27
236 -- Related_Type Node27
237 -- Wrapped_Entity Node27
239 -- Extra_Formals Node28
241 -- Initialization_Statements Node28
242 -- Underlying_Record_View Node28
244 -- BIP_Initialization_Call Node29
245 -- Subprograms_For_Type Node29
247 -- Corresponding_Equality Node30
248 -- Last_Aggregate_Assignment Node30
249 -- Static_Initialization Node30
251 -- Thunk_Entity Node31
253 -- SPARK_Pragma Node32
255 -- Linker_Section_Pragma Node33
256 -- SPARK_Aux_Pragma Node33
260 -- Import_Pragma Node35
262 ---------------------------------------------
263 -- Usage of Flags in Defining Entity Nodes --
264 ---------------------------------------------
266 -- All flags are unique, there is no overlaying, so each flag is physically
267 -- present in every entity. However, for many of the flags, it only makes
268 -- sense for them to be set true for certain subsets of entity kinds. See
269 -- the spec of Einfo for further details.
272 -- Has_Discriminants Flag5
273 -- Is_Dispatching_Operation Flag6
274 -- Is_Immediately_Visible Flag7
276 -- Is_Potentially_Use_Visible Flag9
280 -- Is_Constrained Flag12
281 -- Is_Generic_Type Flag13
282 -- Depends_On_Private Flag14
284 -- Is_Volatile Flag16
285 -- Is_Internal Flag17
286 -- Has_Delayed_Freeze Flag18
287 -- Is_Abstract_Subprogram Flag19
288 -- Is_Concurrent_Record_Type Flag20
290 -- Has_Master_Entity Flag21
291 -- Needs_No_Actuals Flag22
292 -- Has_Storage_Size_Clause Flag23
293 -- Is_Imported Flag24
294 -- Is_Limited_Record Flag25
295 -- Has_Completion Flag26
296 -- Has_Pragma_Controlled Flag27
297 -- Is_Statically_Allocated Flag28
298 -- Has_Size_Clause Flag29
301 -- Checks_May_Be_Suppressed Flag31
302 -- Kill_Elaboration_Checks Flag32
303 -- Kill_Range_Checks Flag33
304 -- Has_Independent_Components Flag34
305 -- Is_Class_Wide_Equivalent_Type Flag35
306 -- Referenced_As_LHS Flag36
307 -- Is_Known_Non_Null Flag37
308 -- Can_Never_Be_Null Flag38
309 -- Has_Default_Aspect Flag39
310 -- Body_Needed_For_SAL Flag40
312 -- Treat_As_Volatile Flag41
313 -- Is_Controlled Flag42
314 -- Has_Controlled_Component Flag43
316 -- In_Private_Part Flag45
317 -- Has_Alignment_Clause Flag46
319 -- In_Package_Body Flag48
321 -- Delay_Subprogram_Descriptors Flag50
324 -- Is_Entry_Formal Flag52
325 -- Is_Private_Descendant Flag53
326 -- Return_Present Flag54
327 -- Is_Tagged_Type Flag55
328 -- Has_Homonym Flag56
330 -- Non_Binary_Modulus Flag58
331 -- Is_Preelaborated Flag59
332 -- Is_Shared_Passive Flag60
334 -- Is_Remote_Types Flag61
335 -- Is_Remote_Call_Interface Flag62
336 -- Is_Character_Type Flag63
337 -- Is_Intrinsic_Subprogram Flag64
338 -- Has_Record_Rep_Clause Flag65
339 -- Has_Enumeration_Rep_Clause Flag66
340 -- Has_Small_Clause Flag67
341 -- Has_Component_Size_Clause Flag68
342 -- Is_Access_Constant Flag69
343 -- Is_First_Subtype Flag70
345 -- Has_Completion_In_Body Flag71
346 -- Has_Unknown_Discriminants Flag72
347 -- Is_Child_Unit Flag73
348 -- Is_CPP_Class Flag74
349 -- Has_Non_Standard_Rep Flag75
350 -- Is_Constructor Flag76
351 -- Static_Elaboration_Desired Flag77
353 -- Has_All_Calls_Remote Flag79
354 -- Is_Constr_Subt_For_U_Nominal Flag80
356 -- Is_Asynchronous Flag81
357 -- Has_Gigi_Rep_Item Flag82
358 -- Has_Machine_Radix_Clause Flag83
359 -- Machine_Radix_10 Flag84
361 -- Has_Atomic_Components Flag86
362 -- Has_Volatile_Components Flag87
363 -- Discard_Names Flag88
364 -- Is_Interrupt_Handler Flag89
365 -- Returns_By_Ref Flag90
368 -- Size_Known_At_Compile_Time Flag92
369 -- Reverse_Storage_Order Flag93
370 -- Is_Generic_Actual_Type Flag94
371 -- Uses_Sec_Stack Flag95
372 -- Warnings_Off Flag96
373 -- Is_Controlling_Formal Flag97
374 -- Has_Controlling_Result Flag98
375 -- Is_Exported Flag99
376 -- Has_Specified_Layout Flag100
378 -- Has_Nested_Block_With_Handler Flag101
380 -- Is_Completely_Hidden Flag103
381 -- Address_Taken Flag104
382 -- Suppress_Initialization Flag105
383 -- Is_Limited_Composite Flag106
384 -- Is_Private_Composite Flag107
385 -- Default_Expressions_Processed Flag108
386 -- Is_Non_Static_Subtype Flag109
387 -- Has_Out_Or_In_Out_Parameter Flag110
389 -- Is_Formal_Subprogram Flag111
390 -- Is_Renaming_Of_Object Flag112
392 -- Delay_Cleanups Flag114
393 -- Never_Set_In_Source Flag115
394 -- Is_Visible_Lib_Unit Flag116
395 -- Is_Unchecked_Union Flag117
396 -- Is_For_Access_Subtype Flag118
397 -- Has_Convention_Pragma Flag119
398 -- Has_Primitive_Operations Flag120
400 -- Has_Pragma_Pack Flag121
401 -- Is_Bit_Packed_Array Flag122
402 -- Has_Unchecked_Union Flag123
403 -- Is_Eliminated Flag124
404 -- C_Pass_By_Copy Flag125
405 -- Is_Instantiated Flag126
406 -- Is_Valued_Procedure Flag127
407 -- (used for Component_Alignment) Flag128
408 -- (used for Component_Alignment) Flag129
409 -- Is_Generic_Instance Flag130
411 -- No_Pool_Assigned Flag131
412 -- Is_AST_Entry Flag132
413 -- Is_VMS_Exception Flag133
414 -- Is_Optional_Parameter Flag134
415 -- Has_Aliased_Components Flag135
416 -- No_Strict_Aliasing Flag136
417 -- Is_Machine_Code_Subprogram Flag137
418 -- Is_Packed_Array_Impl_Type Flag138
419 -- Has_Biased_Representation Flag139
420 -- Has_Complex_Representation Flag140
422 -- Is_Constr_Subt_For_UN_Aliased Flag141
423 -- Has_Missing_Return Flag142
424 -- Has_Recursive_Call Flag143
425 -- Is_Unsigned_Type Flag144
426 -- Strict_Alignment Flag145
427 -- Is_Abstract_Type Flag146
428 -- Needs_Debug_Info Flag147
429 -- Suppress_Elaboration_Warnings Flag148
430 -- Is_Compilation_Unit Flag149
431 -- Has_Pragma_Elaborate_Body Flag150
433 -- Has_Private_Ancestor Flag151
434 -- Entry_Accepted Flag152
435 -- Is_Obsolescent Flag153
436 -- Has_Per_Object_Constraint Flag154
437 -- Has_Private_Declaration Flag155
438 -- Referenced Flag156
439 -- Has_Pragma_Inline Flag157
440 -- Finalize_Storage_Only Flag158
441 -- From_Limited_With Flag159
442 -- Is_Package_Body_Entity Flag160
444 -- Has_Qualified_Name Flag161
445 -- Nonzero_Is_True Flag162
446 -- Is_True_Constant Flag163
447 -- Reverse_Bit_Order Flag164
448 -- Suppress_Style_Checks Flag165
449 -- Debug_Info_Off Flag166
450 -- Sec_Stack_Needed_For_Return Flag167
451 -- Materialize_Entity Flag168
452 -- Has_Pragma_Thread_Local_Storage Flag169
453 -- Is_Known_Valid Flag170
455 -- Is_Hidden_Open_Scope Flag171
456 -- Has_Object_Size_Clause Flag172
457 -- Has_Fully_Qualified_Name Flag173
458 -- Elaboration_Entity_Required Flag174
459 -- Has_Forward_Instantiation Flag175
460 -- Is_Discrim_SO_Function Flag176
461 -- Size_Depends_On_Discriminant Flag177
462 -- Is_Null_Init_Proc Flag178
463 -- Has_Pragma_Pure_Function Flag179
464 -- Has_Pragma_Unreferenced Flag180
466 -- Has_Contiguous_Rep Flag181
467 -- Has_Xref_Entry Flag182
468 -- Must_Be_On_Byte_Boundary Flag183
469 -- Has_Stream_Size_Clause Flag184
470 -- Is_Ada_2005_Only Flag185
471 -- Is_Interface Flag186
472 -- Has_Constrained_Partial_View Flag187
473 -- Uses_Lock_Free Flag188
474 -- Is_Pure_Unit_Access_Type Flag189
475 -- Has_Specified_Stream_Input Flag190
477 -- Has_Specified_Stream_Output Flag191
478 -- Has_Specified_Stream_Read Flag192
479 -- Has_Specified_Stream_Write Flag193
480 -- Is_Local_Anonymous_Access Flag194
481 -- Is_Primitive_Wrapper Flag195
482 -- Was_Hidden Flag196
483 -- Is_Limited_Interface Flag197
484 -- Has_Pragma_Ordered Flag198
485 -- Is_Ada_2012_Only Flag199
487 -- Has_Delayed_Aspects Flag200
488 -- Has_Pragma_No_Inline Flag201
489 -- Itype_Printed Flag202
490 -- Has_Pragma_Pure Flag203
491 -- Is_Known_Null Flag204
492 -- Low_Bound_Tested Flag205
493 -- Is_Visible_Formal Flag206
494 -- Known_To_Have_Preelab_Init Flag207
495 -- Must_Have_Preelab_Init Flag208
496 -- Is_Return_Object Flag209
497 -- Elaborate_Body_Desirable Flag210
499 -- Has_Static_Discriminants Flag211
500 -- Has_Pragma_Unreferenced_Objects Flag212
501 -- Requires_Overriding Flag213
503 -- Has_Up_Level_Access Flag215
504 -- Universal_Aliasing Flag216
505 -- Suppress_Value_Tracking_On_Call Flag217
506 -- Is_Primitive Flag218
507 -- Has_Initial_Value Flag219
508 -- Has_Dispatch_Table Flag220
510 -- Has_Pragma_Preelab_Init Flag221
511 -- Used_As_Generic_Actual Flag222
512 -- Is_Descendent_Of_Address Flag223
515 -- Is_Only_Out_Parameter Flag226
516 -- Referenced_As_Out_Parameter Flag227
517 -- Has_Thunks Flag228
518 -- Can_Use_Internal_Rep Flag229
519 -- Has_Pragma_Inline_Always Flag230
521 -- Renamed_In_Spec Flag231
522 -- Has_Invariants Flag232
523 -- Has_Pragma_Unmodified Flag233
524 -- Is_Dispatch_Table_Entity Flag234
525 -- Is_Trivial_Subprogram Flag235
526 -- Warnings_Off_Used Flag236
527 -- Warnings_Off_Used_Unmodified Flag237
528 -- Warnings_Off_Used_Unreferenced Flag238
529 -- OK_To_Reorder_Components Flag239
530 -- Has_Postconditions Flag240
532 -- Optimize_Alignment_Space Flag241
533 -- Optimize_Alignment_Time Flag242
534 -- Overlays_Constant Flag243
535 -- Is_RACW_Stub_Type Flag244
536 -- Is_Private_Primitive Flag245
537 -- Is_Underlying_Record_View Flag246
538 -- OK_To_Rename Flag247
539 -- Has_Inheritable_Invariants Flag248
540 -- Is_Safe_To_Reevaluate Flag249
541 -- Has_Predicates Flag250
543 -- Has_Implicit_Dereference Flag251
544 -- Is_Processed_Transient Flag252
545 -- Has_Anonymous_Master Flag253
546 -- Is_Implementation_Defined Flag254
547 -- Is_Predicate_Function Flag255
548 -- Is_Predicate_Function_M Flag256
549 -- Is_Invariant_Procedure Flag257
550 -- Has_Dynamic_Predicate_Aspect Flag258
551 -- Has_Static_Predicate_Aspect Flag259
552 -- Has_Loop_Entry_Attributes Flag260
554 -- Has_Delayed_Rep_Aspects Flag261
555 -- May_Inherit_Delayed_Rep_Aspects Flag262
556 -- Has_Visible_Refinement Flag263
557 -- Is_Discriminant_Check_Function Flag264
558 -- SPARK_Pragma_Inherited Flag265
559 -- SPARK_Aux_Pragma_Inherited Flag266
560 -- Has_Shift_Operator Flag267
561 -- Is_Independent Flag268
562 -- Has_Static_Predicate Flag269
563 -- Stores_Attribute_Old_Prefix Flag270
587 -- Note: Flag287-317 are defined in atree.ads/adb, but not yet in atree.h
589 -----------------------
590 -- Local subprograms --
591 -----------------------
594 (State_Id : Entity_Id;
595 Option_Nam : Name_Id) return Boolean;
596 -- Determine whether abstract state State_Id has particular option denoted
597 -- by the name Option_Nam.
603 function Float_Rep (Id : E) return F is
604 pragma Assert (Is_Floating_Point_Type (Id));
606 return F'Val (UI_To_Int (Uint10 (Base_Type (Id))));
614 (State_Id : Entity_Id;
615 Option_Nam : Name_Id) return Boolean
617 Decl : constant Node_Id := Parent (State_Id);
622 pragma Assert (Ekind (State_Id) = E_Abstract_State);
624 -- The declaration of abstract states with options appear as an
625 -- extension aggregate. If this is not the case, the option is not
628 if Nkind (Decl) /= N_Extension_Aggregate then
634 Opt := First (Expressions (Decl));
635 while Present (Opt) loop
637 -- Currently the only simple option allowed is External
639 if Nkind (Opt) = N_Identifier
640 and then Chars (Opt) = Name_External
641 and then Chars (Opt) = Option_Nam
649 -- Complex options with various specifiers
651 Opt := First (Component_Associations (Decl));
652 while Present (Opt) loop
653 Opt_Nam := First (Choices (Opt));
655 if Nkind (Opt_Nam) = N_Identifier
656 and then Chars (Opt_Nam) = Option_Nam
667 --------------------------------
668 -- Attribute Access Functions --
669 --------------------------------
671 function Abstract_States (Id : E) return L is
673 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
677 function Accept_Address (Id : E) return L is
682 function Access_Disp_Table (Id : E) return L is
684 pragma Assert (Ekind_In (Id, E_Record_Type,
686 return Elist16 (Implementation_Base_Type (Id));
687 end Access_Disp_Table;
689 function Actual_Subtype (Id : E) return E is
692 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
693 or else Is_Formal (Id));
697 function Address_Taken (Id : E) return B is
702 function Alias (Id : E) return E is
705 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
709 function Alignment (Id : E) return U is
711 pragma Assert (Is_Type (Id)
712 or else Is_Formal (Id)
713 or else Ekind_In (Id, E_Loop_Parameter,
720 function Associated_Formal_Package (Id : E) return E is
722 pragma Assert (Ekind (Id) = E_Package);
724 end Associated_Formal_Package;
726 function Associated_Node_For_Itype (Id : E) return N is
729 end Associated_Node_For_Itype;
731 function Associated_Storage_Pool (Id : E) return E is
733 pragma Assert (Is_Access_Type (Id));
734 return Node22 (Root_Type (Id));
735 end Associated_Storage_Pool;
737 function Barrier_Function (Id : E) return N is
739 pragma Assert (Is_Entry (Id));
741 end Barrier_Function;
743 function Block_Node (Id : E) return N is
745 pragma Assert (Ekind (Id) = E_Block);
749 function Body_Entity (Id : E) return E is
751 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
755 function Body_Needed_For_SAL (Id : E) return B is
758 (Ekind (Id) = E_Package
759 or else Is_Subprogram (Id)
760 or else Is_Generic_Unit (Id));
762 end Body_Needed_For_SAL;
764 function Body_References (Id : E) return L is
766 pragma Assert (Ekind (Id) = E_Abstract_State);
770 function BIP_Initialization_Call (Id : E) return N is
772 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
774 end BIP_Initialization_Call;
776 function C_Pass_By_Copy (Id : E) return B is
778 pragma Assert (Is_Record_Type (Id));
779 return Flag125 (Implementation_Base_Type (Id));
782 function Can_Never_Be_Null (Id : E) return B is
785 end Can_Never_Be_Null;
787 function Checks_May_Be_Suppressed (Id : E) return B is
790 end Checks_May_Be_Suppressed;
792 function Class_Wide_Type (Id : E) return E is
794 pragma Assert (Is_Type (Id));
798 function Cloned_Subtype (Id : E) return E is
800 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
804 function Component_Bit_Offset (Id : E) return U is
806 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
808 end Component_Bit_Offset;
810 function Component_Clause (Id : E) return N is
812 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
814 end Component_Clause;
816 function Component_Size (Id : E) return U is
818 pragma Assert (Is_Array_Type (Id));
819 return Uint22 (Implementation_Base_Type (Id));
822 function Component_Type (Id : E) return E is
824 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
825 return Node20 (Implementation_Base_Type (Id));
828 function Corresponding_Concurrent_Type (Id : E) return E is
830 pragma Assert (Ekind (Id) = E_Record_Type);
832 end Corresponding_Concurrent_Type;
834 function Corresponding_Discriminant (Id : E) return E is
836 pragma Assert (Ekind (Id) = E_Discriminant);
838 end Corresponding_Discriminant;
840 function Corresponding_Equality (Id : E) return E is
843 (Ekind (Id) = E_Function
844 and then not Comes_From_Source (Id)
845 and then Chars (Id) = Name_Op_Ne);
847 end Corresponding_Equality;
849 function Corresponding_Protected_Entry (Id : E) return E is
851 pragma Assert (Ekind (Id) = E_Subprogram_Body);
853 end Corresponding_Protected_Entry;
855 function Corresponding_Record_Type (Id : E) return E is
857 pragma Assert (Is_Concurrent_Type (Id));
859 end Corresponding_Record_Type;
861 function Corresponding_Remote_Type (Id : E) return E is
864 end Corresponding_Remote_Type;
866 function Current_Use_Clause (Id : E) return E is
868 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
870 end Current_Use_Clause;
872 function Current_Value (Id : E) return N is
874 pragma Assert (Ekind (Id) in Object_Kind);
878 function CR_Discriminant (Id : E) return E is
883 function Debug_Info_Off (Id : E) return B is
888 function Debug_Renaming_Link (Id : E) return E is
891 end Debug_Renaming_Link;
893 function Default_Aspect_Component_Value (Id : E) return N is
895 pragma Assert (Is_Array_Type (Id));
896 return Node19 (Base_Type (Id));
897 end Default_Aspect_Component_Value;
899 function Default_Aspect_Value (Id : E) return N is
901 pragma Assert (Is_Scalar_Type (Id));
902 return Node19 (Base_Type (Id));
903 end Default_Aspect_Value;
905 function Default_Expr_Function (Id : E) return E is
907 pragma Assert (Is_Formal (Id));
909 end Default_Expr_Function;
911 function Default_Expressions_Processed (Id : E) return B is
914 end Default_Expressions_Processed;
916 function Default_Value (Id : E) return N is
918 pragma Assert (Is_Formal (Id));
922 function Delay_Cleanups (Id : E) return B is
927 function Delay_Subprogram_Descriptors (Id : E) return B is
930 end Delay_Subprogram_Descriptors;
932 function Delta_Value (Id : E) return R is
934 pragma Assert (Is_Fixed_Point_Type (Id));
938 function Dependent_Instances (Id : E) return L is
940 pragma Assert (Is_Generic_Instance (Id));
942 end Dependent_Instances;
944 function Depends_On_Private (Id : E) return B is
946 pragma Assert (Nkind (Id) in N_Entity);
948 end Depends_On_Private;
950 function Digits_Value (Id : E) return U is
953 (Is_Floating_Point_Type (Id)
954 or else Is_Decimal_Fixed_Point_Type (Id));
958 function Direct_Primitive_Operations (Id : E) return L is
960 pragma Assert (Is_Tagged_Type (Id));
962 end Direct_Primitive_Operations;
964 function Directly_Designated_Type (Id : E) return E is
966 pragma Assert (Is_Access_Type (Id));
968 end Directly_Designated_Type;
970 function Discard_Names (Id : E) return B is
975 function Discriminal (Id : E) return E is
977 pragma Assert (Ekind (Id) = E_Discriminant);
981 function Discriminal_Link (Id : E) return N is
984 end Discriminal_Link;
986 function Discriminant_Checking_Func (Id : E) return E is
988 pragma Assert (Ekind (Id) = E_Component);
990 end Discriminant_Checking_Func;
992 function Discriminant_Constraint (Id : E) return L is
994 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
996 end Discriminant_Constraint;
998 function Discriminant_Default_Value (Id : E) return N is
1000 pragma Assert (Ekind (Id) = E_Discriminant);
1002 end Discriminant_Default_Value;
1004 function Discriminant_Number (Id : E) return U is
1006 pragma Assert (Ekind (Id) = E_Discriminant);
1008 end Discriminant_Number;
1010 function Dispatch_Table_Wrappers (Id : E) return L is
1012 pragma Assert (Ekind_In (Id, E_Record_Type,
1014 return Elist26 (Implementation_Base_Type (Id));
1015 end Dispatch_Table_Wrappers;
1017 function DT_Entry_Count (Id : E) return U is
1019 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1023 function DT_Offset_To_Top_Func (Id : E) return E is
1025 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1027 end DT_Offset_To_Top_Func;
1029 function DT_Position (Id : E) return U is
1031 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
1032 and then Present (DTC_Entity (Id)));
1036 function DTC_Entity (Id : E) return E is
1038 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1042 function Elaborate_Body_Desirable (Id : E) return B is
1044 pragma Assert (Ekind (Id) = E_Package);
1045 return Flag210 (Id);
1046 end Elaborate_Body_Desirable;
1048 function Elaboration_Entity (Id : E) return E is
1053 Ekind (Id) = E_Package
1055 Is_Generic_Unit (Id));
1057 end Elaboration_Entity;
1059 function Elaboration_Entity_Required (Id : E) return B is
1064 Ekind (Id) = E_Package
1066 Is_Generic_Unit (Id));
1067 return Flag174 (Id);
1068 end Elaboration_Entity_Required;
1070 function Encapsulating_State (Id : E) return N is
1072 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
1074 end Encapsulating_State;
1076 function Enclosing_Scope (Id : E) return E is
1079 end Enclosing_Scope;
1081 function Entry_Accepted (Id : E) return B is
1083 pragma Assert (Is_Entry (Id));
1084 return Flag152 (Id);
1087 function Entry_Bodies_Array (Id : E) return E is
1090 end Entry_Bodies_Array;
1092 function Entry_Cancel_Parameter (Id : E) return E is
1095 end Entry_Cancel_Parameter;
1097 function Entry_Component (Id : E) return E is
1100 end Entry_Component;
1102 function Entry_Formal (Id : E) return E is
1107 function Entry_Index_Constant (Id : E) return N is
1109 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
1111 end Entry_Index_Constant;
1113 function Contract (Id : E) return N is
1116 (Ekind_In (Id, E_Entry,
1123 or else Is_Generic_Subprogram (Id)
1124 or else Is_Subprogram (Id));
1128 function Entry_Parameters_Type (Id : E) return E is
1131 end Entry_Parameters_Type;
1133 function Enum_Pos_To_Rep (Id : E) return E is
1135 pragma Assert (Ekind (Id) = E_Enumeration_Type);
1137 end Enum_Pos_To_Rep;
1139 function Enumeration_Pos (Id : E) return Uint is
1141 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1143 end Enumeration_Pos;
1145 function Enumeration_Rep (Id : E) return U is
1147 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1149 end Enumeration_Rep;
1151 function Enumeration_Rep_Expr (Id : E) return N is
1153 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1155 end Enumeration_Rep_Expr;
1157 function Equivalent_Type (Id : E) return E is
1160 (Ekind_In (Id, E_Class_Wide_Type,
1161 E_Class_Wide_Subtype,
1162 E_Access_Subprogram_Type,
1163 E_Access_Protected_Subprogram_Type,
1164 E_Anonymous_Access_Protected_Subprogram_Type,
1165 E_Access_Subprogram_Type,
1168 end Equivalent_Type;
1170 function Esize (Id : E) return Uint is
1175 function Exception_Code (Id : E) return Uint is
1177 pragma Assert (Ekind (Id) = E_Exception);
1181 function Extra_Accessibility (Id : E) return E is
1184 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
1186 end Extra_Accessibility;
1188 function Extra_Accessibility_Of_Result (Id : E) return E is
1190 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
1192 end Extra_Accessibility_Of_Result;
1194 function Extra_Constrained (Id : E) return E is
1196 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1198 end Extra_Constrained;
1200 function Extra_Formal (Id : E) return E is
1205 function Extra_Formals (Id : E) return E is
1208 (Is_Overloadable (Id)
1209 or else Ekind_In (Id, E_Entry_Family,
1211 E_Subprogram_Type));
1215 function Can_Use_Internal_Rep (Id : E) return B is
1217 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1218 return Flag229 (Base_Type (Id));
1219 end Can_Use_Internal_Rep;
1221 function Finalization_Master (Id : E) return E is
1223 pragma Assert (Is_Access_Type (Id));
1224 return Node23 (Root_Type (Id));
1225 end Finalization_Master;
1227 function Finalize_Storage_Only (Id : E) return B is
1229 pragma Assert (Is_Type (Id));
1230 return Flag158 (Base_Type (Id));
1231 end Finalize_Storage_Only;
1233 function Finalizer (Id : E) return E is
1235 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
1239 function First_Entity (Id : E) return E is
1244 function First_Exit_Statement (Id : E) return N is
1246 pragma Assert (Ekind (Id) = E_Loop);
1248 end First_Exit_Statement;
1250 function First_Index (Id : E) return N is
1252 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1256 function First_Literal (Id : E) return E is
1258 pragma Assert (Is_Enumeration_Type (Id));
1262 function First_Optional_Parameter (Id : E) return E is
1264 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1266 end First_Optional_Parameter;
1268 function First_Private_Entity (Id : E) return E is
1270 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1271 or else Ekind (Id) in Concurrent_Kind);
1273 end First_Private_Entity;
1275 function First_Rep_Item (Id : E) return E is
1280 function Freeze_Node (Id : E) return N is
1285 function From_Limited_With (Id : E) return B is
1287 return Flag159 (Id);
1288 end From_Limited_With;
1290 function Full_View (Id : E) return E is
1292 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1296 function Generic_Homonym (Id : E) return E is
1298 pragma Assert (Ekind (Id) = E_Generic_Package);
1300 end Generic_Homonym;
1302 function Generic_Renamings (Id : E) return L is
1304 return Elist23 (Id);
1305 end Generic_Renamings;
1307 function Handler_Records (Id : E) return S is
1310 end Handler_Records;
1312 function Has_Aliased_Components (Id : E) return B is
1314 return Flag135 (Implementation_Base_Type (Id));
1315 end Has_Aliased_Components;
1317 function Has_Alignment_Clause (Id : E) return B is
1320 end Has_Alignment_Clause;
1322 function Has_All_Calls_Remote (Id : E) return B is
1325 end Has_All_Calls_Remote;
1327 function Has_Anonymous_Master (Id : E) return B is
1330 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
1331 return Flag253 (Id);
1332 end Has_Anonymous_Master;
1334 function Has_Atomic_Components (Id : E) return B is
1336 return Flag86 (Implementation_Base_Type (Id));
1337 end Has_Atomic_Components;
1339 function Has_Biased_Representation (Id : E) return B is
1341 return Flag139 (Id);
1342 end Has_Biased_Representation;
1344 function Has_Completion (Id : E) return B is
1349 function Has_Completion_In_Body (Id : E) return B is
1351 pragma Assert (Is_Type (Id));
1353 end Has_Completion_In_Body;
1355 function Has_Complex_Representation (Id : E) return B is
1357 pragma Assert (Is_Type (Id));
1358 return Flag140 (Implementation_Base_Type (Id));
1359 end Has_Complex_Representation;
1361 function Has_Component_Size_Clause (Id : E) return B is
1363 pragma Assert (Is_Array_Type (Id));
1364 return Flag68 (Implementation_Base_Type (Id));
1365 end Has_Component_Size_Clause;
1367 function Has_Constrained_Partial_View (Id : E) return B is
1369 pragma Assert (Is_Type (Id));
1370 return Flag187 (Id);
1371 end Has_Constrained_Partial_View;
1373 function Has_Controlled_Component (Id : E) return B is
1375 return Flag43 (Base_Type (Id));
1376 end Has_Controlled_Component;
1378 function Has_Contiguous_Rep (Id : E) return B is
1380 return Flag181 (Id);
1381 end Has_Contiguous_Rep;
1383 function Has_Controlling_Result (Id : E) return B is
1386 end Has_Controlling_Result;
1388 function Has_Convention_Pragma (Id : E) return B is
1390 return Flag119 (Id);
1391 end Has_Convention_Pragma;
1393 function Has_Default_Aspect (Id : E) return B is
1395 return Flag39 (Base_Type (Id));
1396 end Has_Default_Aspect;
1398 function Has_Delayed_Aspects (Id : E) return B is
1400 pragma Assert (Nkind (Id) in N_Entity);
1401 return Flag200 (Id);
1402 end Has_Delayed_Aspects;
1404 function Has_Delayed_Freeze (Id : E) return B is
1406 pragma Assert (Nkind (Id) in N_Entity);
1408 end Has_Delayed_Freeze;
1410 function Has_Delayed_Rep_Aspects (Id : E) return B is
1412 pragma Assert (Nkind (Id) in N_Entity);
1413 return Flag261 (Id);
1414 end Has_Delayed_Rep_Aspects;
1416 function Has_Discriminants (Id : E) return B is
1418 pragma Assert (Nkind (Id) in N_Entity);
1420 end Has_Discriminants;
1422 function Has_Dispatch_Table (Id : E) return B is
1424 pragma Assert (Is_Tagged_Type (Id));
1425 return Flag220 (Id);
1426 end Has_Dispatch_Table;
1428 function Has_Dynamic_Predicate_Aspect (Id : E) return B is
1430 pragma Assert (Is_Type (Id));
1431 return Flag258 (Id);
1432 end Has_Dynamic_Predicate_Aspect;
1434 function Has_Enumeration_Rep_Clause (Id : E) return B is
1436 pragma Assert (Is_Enumeration_Type (Id));
1438 end Has_Enumeration_Rep_Clause;
1440 function Has_Exit (Id : E) return B is
1445 function Has_Forward_Instantiation (Id : E) return B is
1447 return Flag175 (Id);
1448 end Has_Forward_Instantiation;
1450 function Has_Fully_Qualified_Name (Id : E) return B is
1452 return Flag173 (Id);
1453 end Has_Fully_Qualified_Name;
1455 function Has_Gigi_Rep_Item (Id : E) return B is
1458 end Has_Gigi_Rep_Item;
1460 function Has_Homonym (Id : E) return B is
1465 function Has_Implicit_Dereference (Id : E) return B is
1467 return Flag251 (Id);
1468 end Has_Implicit_Dereference;
1470 function Has_Independent_Components (Id : E) return B is
1472 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
1473 return Flag34 (Base_Type (Id));
1474 end Has_Independent_Components;
1476 function Has_Inheritable_Invariants (Id : E) return B is
1478 pragma Assert (Is_Type (Id));
1479 return Flag248 (Id);
1480 end Has_Inheritable_Invariants;
1482 function Has_Initial_Value (Id : E) return B is
1484 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1485 return Flag219 (Id);
1486 end Has_Initial_Value;
1488 function Has_Invariants (Id : E) return B is
1490 pragma Assert (Is_Type (Id));
1491 return Flag232 (Id);
1494 function Has_Loop_Entry_Attributes (Id : E) return B is
1496 pragma Assert (Ekind (Id) = E_Loop);
1497 return Flag260 (Id);
1498 end Has_Loop_Entry_Attributes;
1500 function Has_Machine_Radix_Clause (Id : E) return B is
1502 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1504 end Has_Machine_Radix_Clause;
1506 function Has_Master_Entity (Id : E) return B is
1509 end Has_Master_Entity;
1511 function Has_Missing_Return (Id : E) return B is
1513 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1514 return Flag142 (Id);
1515 end Has_Missing_Return;
1517 function Has_Nested_Block_With_Handler (Id : E) return B is
1519 return Flag101 (Id);
1520 end Has_Nested_Block_With_Handler;
1522 function Has_Non_Standard_Rep (Id : E) return B is
1524 return Flag75 (Implementation_Base_Type (Id));
1525 end Has_Non_Standard_Rep;
1527 function Has_Object_Size_Clause (Id : E) return B is
1529 pragma Assert (Is_Type (Id));
1530 return Flag172 (Id);
1531 end Has_Object_Size_Clause;
1533 function Has_Out_Or_In_Out_Parameter (Id : E) return B is
1535 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1536 return Flag110 (Id);
1537 end Has_Out_Or_In_Out_Parameter;
1539 function Has_Per_Object_Constraint (Id : E) return B is
1541 return Flag154 (Id);
1542 end Has_Per_Object_Constraint;
1544 function Has_Postconditions (Id : E) return B is
1546 pragma Assert (Is_Subprogram (Id));
1547 return Flag240 (Id);
1548 end Has_Postconditions;
1550 function Has_Pragma_Controlled (Id : E) return B is
1552 pragma Assert (Is_Access_Type (Id));
1553 return Flag27 (Implementation_Base_Type (Id));
1554 end Has_Pragma_Controlled;
1556 function Has_Pragma_Elaborate_Body (Id : E) return B is
1558 return Flag150 (Id);
1559 end Has_Pragma_Elaborate_Body;
1561 function Has_Pragma_Inline (Id : E) return B is
1563 return Flag157 (Id);
1564 end Has_Pragma_Inline;
1566 function Has_Pragma_Inline_Always (Id : E) return B is
1568 return Flag230 (Id);
1569 end Has_Pragma_Inline_Always;
1571 function Has_Pragma_No_Inline (Id : E) return B is
1573 return Flag201 (Id);
1574 end Has_Pragma_No_Inline;
1576 function Has_Pragma_Ordered (Id : E) return B is
1578 pragma Assert (Is_Enumeration_Type (Id));
1579 return Flag198 (Implementation_Base_Type (Id));
1580 end Has_Pragma_Ordered;
1582 function Has_Pragma_Pack (Id : E) return B is
1584 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1585 return Flag121 (Implementation_Base_Type (Id));
1586 end Has_Pragma_Pack;
1588 function Has_Pragma_Preelab_Init (Id : E) return B is
1590 return Flag221 (Id);
1591 end Has_Pragma_Preelab_Init;
1593 function Has_Pragma_Pure (Id : E) return B is
1595 return Flag203 (Id);
1596 end Has_Pragma_Pure;
1598 function Has_Pragma_Pure_Function (Id : E) return B is
1600 return Flag179 (Id);
1601 end Has_Pragma_Pure_Function;
1603 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1605 return Flag169 (Id);
1606 end Has_Pragma_Thread_Local_Storage;
1608 function Has_Pragma_Unmodified (Id : E) return B is
1610 return Flag233 (Id);
1611 end Has_Pragma_Unmodified;
1613 function Has_Pragma_Unreferenced (Id : E) return B is
1615 return Flag180 (Id);
1616 end Has_Pragma_Unreferenced;
1618 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1620 pragma Assert (Is_Type (Id));
1621 return Flag212 (Id);
1622 end Has_Pragma_Unreferenced_Objects;
1624 function Has_Predicates (Id : E) return B is
1626 pragma Assert (Is_Type (Id));
1627 return Flag250 (Id);
1630 function Has_Primitive_Operations (Id : E) return B is
1632 pragma Assert (Is_Type (Id));
1633 return Flag120 (Base_Type (Id));
1634 end Has_Primitive_Operations;
1636 function Has_Private_Ancestor (Id : E) return B is
1638 return Flag151 (Id);
1639 end Has_Private_Ancestor;
1641 function Has_Private_Declaration (Id : E) return B is
1643 return Flag155 (Id);
1644 end Has_Private_Declaration;
1646 function Has_Qualified_Name (Id : E) return B is
1648 return Flag161 (Id);
1649 end Has_Qualified_Name;
1651 function Has_RACW (Id : E) return B is
1653 pragma Assert (Ekind (Id) = E_Package);
1654 return Flag214 (Id);
1657 function Has_Record_Rep_Clause (Id : E) return B is
1659 pragma Assert (Is_Record_Type (Id));
1660 return Flag65 (Implementation_Base_Type (Id));
1661 end Has_Record_Rep_Clause;
1663 function Has_Recursive_Call (Id : E) return B is
1665 pragma Assert (Is_Subprogram (Id));
1666 return Flag143 (Id);
1667 end Has_Recursive_Call;
1669 function Has_Shift_Operator (Id : E) return B is
1671 pragma Assert (Is_Integer_Type (Id));
1672 return Flag267 (Base_Type (Id));
1673 end Has_Shift_Operator;
1675 function Has_Size_Clause (Id : E) return B is
1678 end Has_Size_Clause;
1680 function Has_Small_Clause (Id : E) return B is
1683 end Has_Small_Clause;
1685 function Has_Specified_Layout (Id : E) return B is
1687 pragma Assert (Is_Type (Id));
1688 return Flag100 (Implementation_Base_Type (Id));
1689 end Has_Specified_Layout;
1691 function Has_Specified_Stream_Input (Id : E) return B is
1693 pragma Assert (Is_Type (Id));
1694 return Flag190 (Id);
1695 end Has_Specified_Stream_Input;
1697 function Has_Specified_Stream_Output (Id : E) return B is
1699 pragma Assert (Is_Type (Id));
1700 return Flag191 (Id);
1701 end Has_Specified_Stream_Output;
1703 function Has_Specified_Stream_Read (Id : E) return B is
1705 pragma Assert (Is_Type (Id));
1706 return Flag192 (Id);
1707 end Has_Specified_Stream_Read;
1709 function Has_Specified_Stream_Write (Id : E) return B is
1711 pragma Assert (Is_Type (Id));
1712 return Flag193 (Id);
1713 end Has_Specified_Stream_Write;
1715 function Has_Static_Discriminants (Id : E) return B is
1717 pragma Assert (Is_Type (Id));
1718 return Flag211 (Id);
1719 end Has_Static_Discriminants;
1721 function Has_Static_Predicate (Id : E) return B is
1723 pragma Assert (Is_Type (Id));
1724 return Flag269 (Id);
1725 end Has_Static_Predicate;
1727 function Has_Static_Predicate_Aspect (Id : E) return B is
1729 pragma Assert (Is_Type (Id));
1730 return Flag259 (Id);
1731 end Has_Static_Predicate_Aspect;
1733 function Has_Storage_Size_Clause (Id : E) return B is
1735 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1736 return Flag23 (Implementation_Base_Type (Id));
1737 end Has_Storage_Size_Clause;
1739 function Has_Stream_Size_Clause (Id : E) return B is
1741 return Flag184 (Id);
1742 end Has_Stream_Size_Clause;
1744 function Has_Task (Id : E) return B is
1746 return Flag30 (Base_Type (Id));
1749 function Has_Thunks (Id : E) return B is
1751 return Flag228 (Id);
1754 function Has_Unchecked_Union (Id : E) return B is
1756 return Flag123 (Base_Type (Id));
1757 end Has_Unchecked_Union;
1759 function Has_Unknown_Discriminants (Id : E) return B is
1761 pragma Assert (Is_Type (Id));
1763 end Has_Unknown_Discriminants;
1765 function Has_Up_Level_Access (Id : E) return B is
1768 (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
1769 return Flag215 (Id);
1770 end Has_Up_Level_Access;
1772 function Has_Visible_Refinement (Id : E) return B is
1774 pragma Assert (Ekind (Id) = E_Abstract_State);
1775 return Flag263 (Id);
1776 end Has_Visible_Refinement;
1778 function Has_Volatile_Components (Id : E) return B is
1780 return Flag87 (Implementation_Base_Type (Id));
1781 end Has_Volatile_Components;
1783 function Has_Xref_Entry (Id : E) return B is
1785 return Flag182 (Id);
1788 function Hiding_Loop_Variable (Id : E) return E is
1790 pragma Assert (Ekind (Id) = E_Variable);
1792 end Hiding_Loop_Variable;
1794 function Homonym (Id : E) return E is
1799 function Import_Pragma (Id : E) return E is
1801 pragma Assert (Is_Subprogram (Id));
1805 function Interface_Alias (Id : E) return E is
1807 pragma Assert (Is_Subprogram (Id));
1809 end Interface_Alias;
1811 function Interfaces (Id : E) return L is
1813 pragma Assert (Is_Record_Type (Id));
1814 return Elist25 (Id);
1817 function In_Package_Body (Id : E) return B is
1820 end In_Package_Body;
1822 function In_Private_Part (Id : E) return B is
1825 end In_Private_Part;
1827 function In_Use (Id : E) return B is
1829 pragma Assert (Nkind (Id) in N_Entity);
1833 function Initialization_Statements (Id : E) return N is
1835 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
1837 end Initialization_Statements;
1839 function Inner_Instances (Id : E) return L is
1841 return Elist23 (Id);
1842 end Inner_Instances;
1844 function Interface_Name (Id : E) return N is
1849 function Is_Abstract_Subprogram (Id : E) return B is
1851 pragma Assert (Is_Overloadable (Id));
1853 end Is_Abstract_Subprogram;
1855 function Is_Abstract_Type (Id : E) return B is
1857 pragma Assert (Is_Type (Id));
1858 return Flag146 (Id);
1859 end Is_Abstract_Type;
1861 function Is_Local_Anonymous_Access (Id : E) return B is
1863 pragma Assert (Is_Access_Type (Id));
1864 return Flag194 (Id);
1865 end Is_Local_Anonymous_Access;
1867 function Is_Access_Constant (Id : E) return B is
1869 pragma Assert (Is_Access_Type (Id));
1871 end Is_Access_Constant;
1873 function Is_Ada_2005_Only (Id : E) return B is
1875 return Flag185 (Id);
1876 end Is_Ada_2005_Only;
1878 function Is_Ada_2012_Only (Id : E) return B is
1880 return Flag199 (Id);
1881 end Is_Ada_2012_Only;
1883 function Is_Aliased (Id : E) return B is
1885 pragma Assert (Nkind (Id) in N_Entity);
1889 function Is_AST_Entry (Id : E) return B is
1891 pragma Assert (Is_Entry (Id));
1892 return Flag132 (Id);
1895 function Is_Asynchronous (Id : E) return B is
1897 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1899 end Is_Asynchronous;
1901 function Is_Atomic (Id : E) return B is
1906 function Is_Bit_Packed_Array (Id : E) return B is
1908 return Flag122 (Implementation_Base_Type (Id));
1909 end Is_Bit_Packed_Array;
1911 function Is_Called (Id : E) return B is
1913 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1914 return Flag102 (Id);
1917 function Is_Character_Type (Id : E) return B is
1920 end Is_Character_Type;
1922 function Is_Child_Unit (Id : E) return B is
1927 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1930 end Is_Class_Wide_Equivalent_Type;
1932 function Is_Compilation_Unit (Id : E) return B is
1934 return Flag149 (Id);
1935 end Is_Compilation_Unit;
1937 function Is_Completely_Hidden (Id : E) return B is
1939 pragma Assert (Ekind (Id) = E_Discriminant);
1940 return Flag103 (Id);
1941 end Is_Completely_Hidden;
1943 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1946 end Is_Constr_Subt_For_U_Nominal;
1948 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1950 return Flag141 (Id);
1951 end Is_Constr_Subt_For_UN_Aliased;
1953 function Is_Constrained (Id : E) return B is
1955 pragma Assert (Nkind (Id) in N_Entity);
1959 function Is_Constructor (Id : E) return B is
1964 function Is_Controlled (Id : E) return B is
1966 return Flag42 (Base_Type (Id));
1969 function Is_Controlling_Formal (Id : E) return B is
1971 pragma Assert (Is_Formal (Id));
1973 end Is_Controlling_Formal;
1975 function Is_CPP_Class (Id : E) return B is
1980 function Is_Descendent_Of_Address (Id : E) return B is
1982 return Flag223 (Id);
1983 end Is_Descendent_Of_Address;
1985 function Is_Discrim_SO_Function (Id : E) return B is
1987 return Flag176 (Id);
1988 end Is_Discrim_SO_Function;
1990 function Is_Discriminant_Check_Function (Id : E) return B is
1992 return Flag264 (Id);
1993 end Is_Discriminant_Check_Function;
1995 function Is_Dispatch_Table_Entity (Id : E) return B is
1997 return Flag234 (Id);
1998 end Is_Dispatch_Table_Entity;
2000 function Is_Dispatching_Operation (Id : E) return B is
2002 pragma Assert (Nkind (Id) in N_Entity);
2004 end Is_Dispatching_Operation;
2006 function Is_Eliminated (Id : E) return B is
2008 return Flag124 (Id);
2011 function Is_Entry_Formal (Id : E) return B is
2014 end Is_Entry_Formal;
2016 function Is_Exported (Id : E) return B is
2021 function Is_First_Subtype (Id : E) return B is
2024 end Is_First_Subtype;
2026 function Is_For_Access_Subtype (Id : E) return B is
2028 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
2029 return Flag118 (Id);
2030 end Is_For_Access_Subtype;
2032 function Is_Formal_Subprogram (Id : E) return B is
2034 return Flag111 (Id);
2035 end Is_Formal_Subprogram;
2037 function Is_Frozen (Id : E) return B is
2042 function Is_Generic_Actual_Type (Id : E) return B is
2044 pragma Assert (Is_Type (Id));
2046 end Is_Generic_Actual_Type;
2048 function Is_Generic_Instance (Id : E) return B is
2050 return Flag130 (Id);
2051 end Is_Generic_Instance;
2053 function Is_Generic_Type (Id : E) return B is
2055 pragma Assert (Nkind (Id) in N_Entity);
2057 end Is_Generic_Type;
2059 function Is_Hidden (Id : E) return B is
2064 function Is_Hidden_Open_Scope (Id : E) return B is
2066 return Flag171 (Id);
2067 end Is_Hidden_Open_Scope;
2069 function Is_Immediately_Visible (Id : E) return B is
2071 pragma Assert (Nkind (Id) in N_Entity);
2073 end Is_Immediately_Visible;
2075 function Is_Implementation_Defined (Id : E) return B is
2077 return Flag254 (Id);
2078 end Is_Implementation_Defined;
2080 function Is_Imported (Id : E) return B is
2085 function Is_Independent (Id : E) return B is
2087 pragma Assert (Ekind (Id) = E_Component);
2088 return Flag268 (Id);
2091 function Is_Inlined (Id : E) return B is
2096 function Is_Interface (Id : E) return B is
2098 return Flag186 (Id);
2101 function Is_Instantiated (Id : E) return B is
2103 return Flag126 (Id);
2104 end Is_Instantiated;
2106 function Is_Internal (Id : E) return B is
2108 pragma Assert (Nkind (Id) in N_Entity);
2112 function Is_Interrupt_Handler (Id : E) return B is
2114 pragma Assert (Nkind (Id) in N_Entity);
2116 end Is_Interrupt_Handler;
2118 function Is_Intrinsic_Subprogram (Id : E) return B is
2121 end Is_Intrinsic_Subprogram;
2123 function Is_Invariant_Procedure (Id : E) return B is
2125 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2126 return Flag257 (Id);
2127 end Is_Invariant_Procedure;
2129 function Is_Itype (Id : E) return B is
2134 function Is_Known_Non_Null (Id : E) return B is
2137 end Is_Known_Non_Null;
2139 function Is_Known_Null (Id : E) return B is
2141 return Flag204 (Id);
2144 function Is_Known_Valid (Id : E) return B is
2146 return Flag170 (Id);
2149 function Is_Limited_Composite (Id : E) return B is
2151 return Flag106 (Id);
2152 end Is_Limited_Composite;
2154 function Is_Limited_Interface (Id : E) return B is
2156 return Flag197 (Id);
2157 end Is_Limited_Interface;
2159 function Is_Limited_Record (Id : E) return B is
2162 end Is_Limited_Record;
2164 function Is_Machine_Code_Subprogram (Id : E) return B is
2166 pragma Assert (Is_Subprogram (Id));
2167 return Flag137 (Id);
2168 end Is_Machine_Code_Subprogram;
2170 function Is_Non_Static_Subtype (Id : E) return B is
2172 pragma Assert (Is_Type (Id));
2173 return Flag109 (Id);
2174 end Is_Non_Static_Subtype;
2176 function Is_Null_Init_Proc (Id : E) return B is
2178 pragma Assert (Ekind (Id) = E_Procedure);
2179 return Flag178 (Id);
2180 end Is_Null_Init_Proc;
2182 function Is_Obsolescent (Id : E) return B is
2184 return Flag153 (Id);
2187 function Is_Only_Out_Parameter (Id : E) return B is
2189 pragma Assert (Is_Formal (Id));
2190 return Flag226 (Id);
2191 end Is_Only_Out_Parameter;
2193 function Is_Optional_Parameter (Id : E) return B is
2195 pragma Assert (Is_Formal (Id));
2196 return Flag134 (Id);
2197 end Is_Optional_Parameter;
2199 function Is_Package_Body_Entity (Id : E) return B is
2201 return Flag160 (Id);
2202 end Is_Package_Body_Entity;
2204 function Is_Packed (Id : E) return B is
2206 return Flag51 (Implementation_Base_Type (Id));
2209 function Is_Packed_Array_Impl_Type (Id : E) return B is
2211 return Flag138 (Id);
2212 end Is_Packed_Array_Impl_Type;
2214 function Is_Potentially_Use_Visible (Id : E) return B is
2216 pragma Assert (Nkind (Id) in N_Entity);
2218 end Is_Potentially_Use_Visible;
2220 function Is_Predicate_Function (Id : E) return B is
2222 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2223 return Flag255 (Id);
2224 end Is_Predicate_Function;
2226 function Is_Predicate_Function_M (Id : E) return B is
2228 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2229 return Flag256 (Id);
2230 end Is_Predicate_Function_M;
2232 function Is_Preelaborated (Id : E) return B is
2235 end Is_Preelaborated;
2237 function Is_Primitive (Id : E) return B is
2240 (Is_Overloadable (Id)
2241 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
2242 return Flag218 (Id);
2245 function Is_Primitive_Wrapper (Id : E) return B is
2247 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2248 return Flag195 (Id);
2249 end Is_Primitive_Wrapper;
2251 function Is_Private_Composite (Id : E) return B is
2253 pragma Assert (Is_Type (Id));
2254 return Flag107 (Id);
2255 end Is_Private_Composite;
2257 function Is_Private_Descendant (Id : E) return B is
2260 end Is_Private_Descendant;
2262 function Is_Private_Primitive (Id : E) return B is
2264 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2265 return Flag245 (Id);
2266 end Is_Private_Primitive;
2268 function Is_Processed_Transient (Id : E) return B is
2270 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2271 return Flag252 (Id);
2272 end Is_Processed_Transient;
2274 function Is_Public (Id : E) return B is
2276 pragma Assert (Nkind (Id) in N_Entity);
2280 function Is_Pure (Id : E) return B is
2285 function Is_Pure_Unit_Access_Type (Id : E) return B is
2287 pragma Assert (Is_Access_Type (Id));
2288 return Flag189 (Id);
2289 end Is_Pure_Unit_Access_Type;
2291 function Is_RACW_Stub_Type (Id : E) return B is
2293 pragma Assert (Is_Type (Id));
2294 return Flag244 (Id);
2295 end Is_RACW_Stub_Type;
2297 function Is_Raised (Id : E) return B is
2299 pragma Assert (Ekind (Id) = E_Exception);
2300 return Flag224 (Id);
2303 function Is_Remote_Call_Interface (Id : E) return B is
2306 end Is_Remote_Call_Interface;
2308 function Is_Remote_Types (Id : E) return B is
2311 end Is_Remote_Types;
2313 function Is_Renaming_Of_Object (Id : E) return B is
2315 return Flag112 (Id);
2316 end Is_Renaming_Of_Object;
2318 function Is_Return_Object (Id : E) return B is
2320 return Flag209 (Id);
2321 end Is_Return_Object;
2323 function Is_Safe_To_Reevaluate (Id : E) return B is
2325 return Flag249 (Id);
2326 end Is_Safe_To_Reevaluate;
2328 function Is_Shared_Passive (Id : E) return B is
2331 end Is_Shared_Passive;
2333 function Is_Statically_Allocated (Id : E) return B is
2336 end Is_Statically_Allocated;
2338 function Is_Tag (Id : E) return B is
2340 pragma Assert (Nkind (Id) in N_Entity);
2344 function Is_Tagged_Type (Id : E) return B is
2349 function Is_Thunk (Id : E) return B is
2351 return Flag225 (Id);
2354 function Is_Trivial_Subprogram (Id : E) return B is
2356 return Flag235 (Id);
2357 end Is_Trivial_Subprogram;
2359 function Is_True_Constant (Id : E) return B is
2361 return Flag163 (Id);
2362 end Is_True_Constant;
2364 function Is_Unchecked_Union (Id : E) return B is
2366 return Flag117 (Implementation_Base_Type (Id));
2367 end Is_Unchecked_Union;
2369 function Is_Underlying_Record_View (Id : E) return B is
2371 return Flag246 (Id);
2372 end Is_Underlying_Record_View;
2374 function Is_Unsigned_Type (Id : E) return B is
2376 pragma Assert (Is_Type (Id));
2377 return Flag144 (Id);
2378 end Is_Unsigned_Type;
2380 function Is_Valued_Procedure (Id : E) return B is
2382 pragma Assert (Ekind (Id) = E_Procedure);
2383 return Flag127 (Id);
2384 end Is_Valued_Procedure;
2386 function Is_Visible_Formal (Id : E) return B is
2388 return Flag206 (Id);
2389 end Is_Visible_Formal;
2391 function Is_Visible_Lib_Unit (Id : E) return B is
2393 return Flag116 (Id);
2394 end Is_Visible_Lib_Unit;
2396 function Is_VMS_Exception (Id : E) return B is
2398 return Flag133 (Id);
2399 end Is_VMS_Exception;
2401 function Is_Volatile (Id : E) return B is
2403 pragma Assert (Nkind (Id) in N_Entity);
2405 if Is_Type (Id) then
2406 return Flag16 (Base_Type (Id));
2412 function Itype_Printed (Id : E) return B is
2414 pragma Assert (Is_Itype (Id));
2415 return Flag202 (Id);
2418 function Kill_Elaboration_Checks (Id : E) return B is
2421 end Kill_Elaboration_Checks;
2423 function Kill_Range_Checks (Id : E) return B is
2426 end Kill_Range_Checks;
2428 function Known_To_Have_Preelab_Init (Id : E) return B is
2430 pragma Assert (Is_Type (Id));
2431 return Flag207 (Id);
2432 end Known_To_Have_Preelab_Init;
2434 function Last_Aggregate_Assignment (Id : E) return N is
2436 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2438 end Last_Aggregate_Assignment;
2440 function Last_Assignment (Id : E) return N is
2442 pragma Assert (Is_Assignable (Id));
2444 end Last_Assignment;
2446 function Last_Entity (Id : E) return E is
2451 function Limited_View (Id : E) return E is
2453 pragma Assert (Ekind (Id) = E_Package);
2457 function Linker_Section_Pragma (Id : E) return N is
2460 (Is_Type (Id) or else Is_Object (Id) or else Is_Subprogram (Id));
2462 end Linker_Section_Pragma;
2464 function Lit_Indexes (Id : E) return E is
2466 pragma Assert (Is_Enumeration_Type (Id));
2470 function Lit_Strings (Id : E) return E is
2472 pragma Assert (Is_Enumeration_Type (Id));
2476 function Low_Bound_Tested (Id : E) return B is
2478 return Flag205 (Id);
2479 end Low_Bound_Tested;
2481 function Machine_Radix_10 (Id : E) return B is
2483 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2485 end Machine_Radix_10;
2487 function Master_Id (Id : E) return E is
2489 pragma Assert (Is_Access_Type (Id));
2493 function Materialize_Entity (Id : E) return B is
2495 return Flag168 (Id);
2496 end Materialize_Entity;
2498 function May_Inherit_Delayed_Rep_Aspects (Id : E) return B is
2500 return Flag262 (Id);
2501 end May_Inherit_Delayed_Rep_Aspects;
2503 function Mechanism (Id : E) return M is
2505 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2506 return UI_To_Int (Uint8 (Id));
2509 function Modulus (Id : E) return Uint is
2511 pragma Assert (Is_Modular_Integer_Type (Id));
2512 return Uint17 (Base_Type (Id));
2515 function Must_Be_On_Byte_Boundary (Id : E) return B is
2517 pragma Assert (Is_Type (Id));
2518 return Flag183 (Id);
2519 end Must_Be_On_Byte_Boundary;
2521 function Must_Have_Preelab_Init (Id : E) return B is
2523 pragma Assert (Is_Type (Id));
2524 return Flag208 (Id);
2525 end Must_Have_Preelab_Init;
2527 function Needs_Debug_Info (Id : E) return B is
2529 return Flag147 (Id);
2530 end Needs_Debug_Info;
2532 function Needs_No_Actuals (Id : E) return B is
2535 (Is_Overloadable (Id)
2536 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2538 end Needs_No_Actuals;
2540 function Never_Set_In_Source (Id : E) return B is
2542 return Flag115 (Id);
2543 end Never_Set_In_Source;
2545 function Next_Inlined_Subprogram (Id : E) return E is
2548 end Next_Inlined_Subprogram;
2550 function No_Pool_Assigned (Id : E) return B is
2552 pragma Assert (Is_Access_Type (Id));
2553 return Flag131 (Root_Type (Id));
2554 end No_Pool_Assigned;
2556 function No_Return (Id : E) return B is
2558 return Flag113 (Id);
2561 function No_Strict_Aliasing (Id : E) return B is
2563 pragma Assert (Is_Access_Type (Id));
2564 return Flag136 (Base_Type (Id));
2565 end No_Strict_Aliasing;
2567 function Non_Binary_Modulus (Id : E) return B is
2569 pragma Assert (Is_Type (Id));
2570 return Flag58 (Base_Type (Id));
2571 end Non_Binary_Modulus;
2573 function Non_Limited_View (Id : E) return E is
2576 (Ekind (Id) in Incomplete_Kind or else Ekind (Id) = E_Abstract_State);
2578 end Non_Limited_View;
2580 function Nonzero_Is_True (Id : E) return B is
2582 pragma Assert (Root_Type (Id) = Standard_Boolean);
2583 return Flag162 (Base_Type (Id));
2584 end Nonzero_Is_True;
2586 function Normalized_First_Bit (Id : E) return U is
2588 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2590 end Normalized_First_Bit;
2592 function Normalized_Position (Id : E) return U is
2594 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2596 end Normalized_Position;
2598 function Normalized_Position_Max (Id : E) return U is
2600 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2602 end Normalized_Position_Max;
2604 function OK_To_Rename (Id : E) return B is
2606 pragma Assert (Ekind (Id) = E_Variable);
2607 return Flag247 (Id);
2610 function OK_To_Reorder_Components (Id : E) return B is
2612 pragma Assert (Is_Record_Type (Id));
2613 return Flag239 (Base_Type (Id));
2614 end OK_To_Reorder_Components;
2616 function Optimize_Alignment_Space (Id : E) return B is
2619 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2620 return Flag241 (Id);
2621 end Optimize_Alignment_Space;
2623 function Optimize_Alignment_Time (Id : E) return B is
2626 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2627 return Flag242 (Id);
2628 end Optimize_Alignment_Time;
2630 function Original_Access_Type (Id : E) return E is
2632 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2634 end Original_Access_Type;
2636 function Original_Array_Type (Id : E) return E is
2638 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2640 end Original_Array_Type;
2642 function Original_Record_Component (Id : E) return E is
2644 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2646 end Original_Record_Component;
2648 function Overlays_Constant (Id : E) return B is
2650 return Flag243 (Id);
2651 end Overlays_Constant;
2653 function Overridden_Operation (Id : E) return E is
2656 end Overridden_Operation;
2658 function Package_Instantiation (Id : E) return N is
2660 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2662 end Package_Instantiation;
2664 function Packed_Array_Impl_Type (Id : E) return E is
2666 pragma Assert (Is_Array_Type (Id));
2668 end Packed_Array_Impl_Type;
2670 function Parent_Subtype (Id : E) return E is
2672 pragma Assert (Is_Record_Type (Id));
2673 return Node19 (Base_Type (Id));
2676 function Part_Of_Constituents (Id : E) return L is
2678 pragma Assert (Ekind (Id) = E_Abstract_State);
2680 end Part_Of_Constituents;
2682 function Postcondition_Proc (Id : E) return E is
2684 pragma Assert (Ekind (Id) = E_Procedure);
2686 end Postcondition_Proc;
2688 function PPC_Wrapper (Id : E) return E is
2690 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2694 function Prival (Id : E) return E is
2696 pragma Assert (Is_Protected_Component (Id));
2700 function Prival_Link (Id : E) return E is
2702 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2706 function Private_Dependents (Id : E) return L is
2708 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2709 return Elist18 (Id);
2710 end Private_Dependents;
2712 function Private_View (Id : E) return N is
2714 pragma Assert (Is_Private_Type (Id));
2718 function Protected_Body_Subprogram (Id : E) return E is
2720 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2722 end Protected_Body_Subprogram;
2724 function Protected_Formal (Id : E) return E is
2726 pragma Assert (Is_Formal (Id));
2728 end Protected_Formal;
2730 function Protection_Object (Id : E) return E is
2733 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2735 end Protection_Object;
2737 function Reachable (Id : E) return B is
2742 function Referenced (Id : E) return B is
2744 return Flag156 (Id);
2747 function Referenced_As_LHS (Id : E) return B is
2750 end Referenced_As_LHS;
2752 function Referenced_As_Out_Parameter (Id : E) return B is
2754 return Flag227 (Id);
2755 end Referenced_As_Out_Parameter;
2757 function Refinement_Constituents (Id : E) return L is
2759 pragma Assert (Ekind (Id) = E_Abstract_State);
2761 end Refinement_Constituents;
2763 function Register_Exception_Call (Id : E) return N is
2765 pragma Assert (Ekind (Id) = E_Exception);
2767 end Register_Exception_Call;
2769 function Related_Array_Object (Id : E) return E is
2771 pragma Assert (Is_Array_Type (Id));
2773 end Related_Array_Object;
2775 function Related_Expression (Id : E) return N is
2777 pragma Assert (Ekind (Id) in Type_Kind
2778 or else Ekind_In (Id, E_Constant, E_Variable));
2780 end Related_Expression;
2782 function Related_Instance (Id : E) return E is
2784 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2786 end Related_Instance;
2788 function Related_Type (Id : E) return E is
2790 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2794 function Relative_Deadline_Variable (Id : E) return E is
2796 pragma Assert (Is_Task_Type (Id));
2797 return Node26 (Implementation_Base_Type (Id));
2798 end Relative_Deadline_Variable;
2800 function Renamed_Entity (Id : E) return N is
2805 function Renamed_In_Spec (Id : E) return B is
2807 pragma Assert (Ekind (Id) = E_Package);
2808 return Flag231 (Id);
2809 end Renamed_In_Spec;
2811 function Renamed_Object (Id : E) return N is
2816 function Renaming_Map (Id : E) return U is
2821 function Requires_Overriding (Id : E) return B is
2823 pragma Assert (Is_Overloadable (Id));
2824 return Flag213 (Id);
2825 end Requires_Overriding;
2827 function Return_Present (Id : E) return B is
2832 function Return_Applies_To (Id : E) return N is
2835 end Return_Applies_To;
2837 function Returns_By_Ref (Id : E) return B is
2842 function Reverse_Bit_Order (Id : E) return B is
2844 pragma Assert (Is_Record_Type (Id));
2845 return Flag164 (Base_Type (Id));
2846 end Reverse_Bit_Order;
2848 function Reverse_Storage_Order (Id : E) return B is
2850 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
2851 return Flag93 (Base_Type (Id));
2852 end Reverse_Storage_Order;
2854 function RM_Size (Id : E) return U is
2856 pragma Assert (Is_Type (Id));
2860 function Scalar_Range (Id : E) return N is
2865 function Scale_Value (Id : E) return U is
2870 function Scope_Depth_Value (Id : E) return U is
2873 end Scope_Depth_Value;
2875 function Sec_Stack_Needed_For_Return (Id : E) return B is
2877 return Flag167 (Id);
2878 end Sec_Stack_Needed_For_Return;
2880 function Shadow_Entities (Id : E) return S is
2882 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2884 end Shadow_Entities;
2886 function Shared_Var_Procs_Instance (Id : E) return E is
2888 pragma Assert (Ekind (Id) = E_Variable);
2890 end Shared_Var_Procs_Instance;
2892 function Size_Check_Code (Id : E) return N is
2894 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2896 end Size_Check_Code;
2898 function Size_Depends_On_Discriminant (Id : E) return B is
2900 return Flag177 (Id);
2901 end Size_Depends_On_Discriminant;
2903 function Size_Known_At_Compile_Time (Id : E) return B is
2906 end Size_Known_At_Compile_Time;
2908 function Small_Value (Id : E) return R is
2910 pragma Assert (Is_Fixed_Point_Type (Id));
2911 return Ureal21 (Id);
2914 function SPARK_Aux_Pragma (Id : E) return N is
2917 (Ekind_In (Id, E_Generic_Package, -- package variants
2921 end SPARK_Aux_Pragma;
2923 function SPARK_Aux_Pragma_Inherited (Id : E) return B is
2926 (Ekind_In (Id, E_Generic_Package, -- package variants
2929 return Flag266 (Id);
2930 end SPARK_Aux_Pragma_Inherited;
2932 function SPARK_Pragma (Id : E) return N is
2935 (Ekind_In (Id, E_Function, -- subprogram variants
2937 E_Generic_Procedure,
2941 Ekind_In (Id, E_Generic_Package, -- package variants
2947 function SPARK_Pragma_Inherited (Id : E) return B is
2950 (Ekind_In (Id, E_Function, -- subprogram variants
2952 E_Generic_Procedure,
2956 Ekind_In (Id, E_Generic_Package, -- package variants
2959 return Flag265 (Id);
2960 end SPARK_Pragma_Inherited;
2962 function Spec_Entity (Id : E) return E is
2964 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2968 function Static_Predicate (Id : E) return S is
2970 pragma Assert (Is_Discrete_Type (Id));
2972 end Static_Predicate;
2974 function Status_Flag_Or_Transient_Decl (Id : E) return N is
2976 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2978 end Status_Flag_Or_Transient_Decl;
2980 function Storage_Size_Variable (Id : E) return E is
2982 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2983 return Node15 (Implementation_Base_Type (Id));
2984 end Storage_Size_Variable;
2986 function Static_Elaboration_Desired (Id : E) return B is
2988 pragma Assert (Ekind (Id) = E_Package);
2990 end Static_Elaboration_Desired;
2992 function Static_Initialization (Id : E) return N is
2995 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
2997 end Static_Initialization;
2999 function Stored_Constraint (Id : E) return L is
3002 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
3003 return Elist23 (Id);
3004 end Stored_Constraint;
3006 function Stores_Attribute_Old_Prefix (Id : E) return B is
3008 return Flag270 (Id);
3009 end Stores_Attribute_Old_Prefix;
3011 function Strict_Alignment (Id : E) return B is
3013 return Flag145 (Implementation_Base_Type (Id));
3014 end Strict_Alignment;
3016 function String_Literal_Length (Id : E) return U is
3019 end String_Literal_Length;
3021 function String_Literal_Low_Bound (Id : E) return N is
3024 end String_Literal_Low_Bound;
3026 function Subprograms_For_Type (Id : E) return E is
3028 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
3030 end Subprograms_For_Type;
3032 function Suppress_Elaboration_Warnings (Id : E) return B is
3034 return Flag148 (Id);
3035 end Suppress_Elaboration_Warnings;
3037 function Suppress_Initialization (Id : E) return B is
3039 pragma Assert (Is_Type (Id));
3040 return Flag105 (Id);
3041 end Suppress_Initialization;
3043 function Suppress_Style_Checks (Id : E) return B is
3045 return Flag165 (Id);
3046 end Suppress_Style_Checks;
3048 function Suppress_Value_Tracking_On_Call (Id : E) return B is
3050 return Flag217 (Id);
3051 end Suppress_Value_Tracking_On_Call;
3053 function Task_Body_Procedure (Id : E) return N is
3055 pragma Assert (Ekind (Id) in Task_Kind);
3057 end Task_Body_Procedure;
3059 function Thunk_Entity (Id : E) return E is
3061 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3062 and then Is_Thunk (Id));
3066 function Treat_As_Volatile (Id : E) return B is
3069 end Treat_As_Volatile;
3071 function Underlying_Full_View (Id : E) return E is
3073 pragma Assert (Ekind (Id) in Private_Kind);
3075 end Underlying_Full_View;
3077 function Underlying_Record_View (Id : E) return E is
3080 end Underlying_Record_View;
3082 function Universal_Aliasing (Id : E) return B is
3084 pragma Assert (Is_Type (Id));
3085 return Flag216 (Implementation_Base_Type (Id));
3086 end Universal_Aliasing;
3088 function Unset_Reference (Id : E) return N is
3091 end Unset_Reference;
3093 function Used_As_Generic_Actual (Id : E) return B is
3095 return Flag222 (Id);
3096 end Used_As_Generic_Actual;
3098 function Uses_Lock_Free (Id : E) return B is
3100 pragma Assert (Is_Protected_Type (Id));
3101 return Flag188 (Id);
3104 function Uses_Sec_Stack (Id : E) return B is
3109 function Warnings_Off (Id : E) return B is
3114 function Warnings_Off_Used (Id : E) return B is
3116 return Flag236 (Id);
3117 end Warnings_Off_Used;
3119 function Warnings_Off_Used_Unmodified (Id : E) return B is
3121 return Flag237 (Id);
3122 end Warnings_Off_Used_Unmodified;
3124 function Warnings_Off_Used_Unreferenced (Id : E) return B is
3126 return Flag238 (Id);
3127 end Warnings_Off_Used_Unreferenced;
3129 function Wrapped_Entity (Id : E) return E is
3131 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3132 and then Is_Primitive_Wrapper (Id));
3136 function Was_Hidden (Id : E) return B is
3138 return Flag196 (Id);
3141 ------------------------------
3142 -- Classification Functions --
3143 ------------------------------
3145 function Is_Access_Type (Id : E) return B is
3147 return Ekind (Id) in Access_Kind;
3150 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
3152 return Ekind (Id) in Access_Protected_Kind;
3153 end Is_Access_Protected_Subprogram_Type;
3155 function Is_Access_Subprogram_Type (Id : E) return B is
3157 return Ekind (Id) in Access_Subprogram_Kind;
3158 end Is_Access_Subprogram_Type;
3160 function Is_Aggregate_Type (Id : E) return B is
3162 return Ekind (Id) in Aggregate_Kind;
3163 end Is_Aggregate_Type;
3165 function Is_Array_Type (Id : E) return B is
3167 return Ekind (Id) in Array_Kind;
3170 function Is_Assignable (Id : E) return B is
3172 return Ekind (Id) in Assignable_Kind;
3175 function Is_Class_Wide_Type (Id : E) return B is
3177 return Ekind (Id) in Class_Wide_Kind;
3178 end Is_Class_Wide_Type;
3180 function Is_Composite_Type (Id : E) return B is
3182 return Ekind (Id) in Composite_Kind;
3183 end Is_Composite_Type;
3185 function Is_Concurrent_Body (Id : E) return B is
3187 return Ekind (Id) in
3188 Concurrent_Body_Kind;
3189 end Is_Concurrent_Body;
3191 function Is_Concurrent_Record_Type (Id : E) return B is
3194 end Is_Concurrent_Record_Type;
3196 function Is_Concurrent_Type (Id : E) return B is
3198 return Ekind (Id) in Concurrent_Kind;
3199 end Is_Concurrent_Type;
3201 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
3203 return Ekind (Id) in
3204 Decimal_Fixed_Point_Kind;
3205 end Is_Decimal_Fixed_Point_Type;
3207 function Is_Digits_Type (Id : E) return B is
3209 return Ekind (Id) in Digits_Kind;
3212 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
3214 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
3215 end Is_Discrete_Or_Fixed_Point_Type;
3217 function Is_Discrete_Type (Id : E) return B is
3219 return Ekind (Id) in Discrete_Kind;
3220 end Is_Discrete_Type;
3222 function Is_Elementary_Type (Id : E) return B is
3224 return Ekind (Id) in Elementary_Kind;
3225 end Is_Elementary_Type;
3227 function Is_Entry (Id : E) return B is
3229 return Ekind (Id) in Entry_Kind;
3232 function Is_Enumeration_Type (Id : E) return B is
3234 return Ekind (Id) in
3236 end Is_Enumeration_Type;
3238 function Is_Fixed_Point_Type (Id : E) return B is
3240 return Ekind (Id) in
3242 end Is_Fixed_Point_Type;
3244 function Is_Floating_Point_Type (Id : E) return B is
3246 return Ekind (Id) in Float_Kind;
3247 end Is_Floating_Point_Type;
3249 function Is_Formal (Id : E) return B is
3251 return Ekind (Id) in Formal_Kind;
3254 function Is_Formal_Object (Id : E) return B is
3256 return Ekind (Id) in Formal_Object_Kind;
3257 end Is_Formal_Object;
3259 function Is_Generic_Subprogram (Id : E) return B is
3261 return Ekind (Id) in Generic_Subprogram_Kind;
3262 end Is_Generic_Subprogram;
3264 function Is_Generic_Unit (Id : E) return B is
3266 return Ekind (Id) in Generic_Unit_Kind;
3267 end Is_Generic_Unit;
3269 function Is_Incomplete_Or_Private_Type (Id : E) return B is
3271 return Ekind (Id) in
3272 Incomplete_Or_Private_Kind;
3273 end Is_Incomplete_Or_Private_Type;
3275 function Is_Incomplete_Type (Id : E) return B is
3277 return Ekind (Id) in
3279 end Is_Incomplete_Type;
3281 function Is_Integer_Type (Id : E) return B is
3283 return Ekind (Id) in Integer_Kind;
3284 end Is_Integer_Type;
3286 function Is_Modular_Integer_Type (Id : E) return B is
3288 return Ekind (Id) in
3289 Modular_Integer_Kind;
3290 end Is_Modular_Integer_Type;
3292 function Is_Named_Number (Id : E) return B is
3294 return Ekind (Id) in Named_Kind;
3295 end Is_Named_Number;
3297 function Is_Numeric_Type (Id : E) return B is
3299 return Ekind (Id) in Numeric_Kind;
3300 end Is_Numeric_Type;
3302 function Is_Object (Id : E) return B is
3304 return Ekind (Id) in Object_Kind;
3307 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
3309 return Ekind (Id) in
3310 Ordinary_Fixed_Point_Kind;
3311 end Is_Ordinary_Fixed_Point_Type;
3313 function Is_Overloadable (Id : E) return B is
3315 return Ekind (Id) in Overloadable_Kind;
3316 end Is_Overloadable;
3318 function Is_Private_Type (Id : E) return B is
3320 return Ekind (Id) in Private_Kind;
3321 end Is_Private_Type;
3323 function Is_Protected_Type (Id : E) return B is
3325 return Ekind (Id) in Protected_Kind;
3326 end Is_Protected_Type;
3328 function Is_Real_Type (Id : E) return B is
3330 return Ekind (Id) in Real_Kind;
3333 function Is_Record_Type (Id : E) return B is
3335 return Ekind (Id) in Record_Kind;
3338 function Is_Scalar_Type (Id : E) return B is
3340 return Ekind (Id) in Scalar_Kind;
3343 function Is_Signed_Integer_Type (Id : E) return B is
3345 return Ekind (Id) in Signed_Integer_Kind;
3346 end Is_Signed_Integer_Type;
3348 function Is_Subprogram (Id : E) return B is
3350 return Ekind (Id) in Subprogram_Kind;
3353 function Is_Task_Type (Id : E) return B is
3355 return Ekind (Id) in Task_Kind;
3358 function Is_Type (Id : E) return B is
3360 return Ekind (Id) in Type_Kind;
3363 ------------------------------
3364 -- Attribute Set Procedures --
3365 ------------------------------
3367 -- Note: in many of these set procedures an "obvious" assertion is missing.
3368 -- The reason for this is that in many cases, a field is set before the
3369 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3370 -- it is possible to add assertions that specifically include the E_Void
3371 -- possibility, but in some cases, we just omit the assertions.
3373 procedure Set_Abstract_States (Id : E; V : L) is
3375 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
3376 Set_Elist25 (Id, V);
3377 end Set_Abstract_States;
3379 procedure Set_Accept_Address (Id : E; V : L) is
3381 Set_Elist21 (Id, V);
3382 end Set_Accept_Address;
3384 procedure Set_Access_Disp_Table (Id : E; V : L) is
3386 pragma Assert (Ekind (Id) = E_Record_Type
3387 and then Id = Implementation_Base_Type (Id));
3388 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3389 Set_Elist16 (Id, V);
3390 end Set_Access_Disp_Table;
3392 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3395 end Set_Associated_Formal_Package;
3397 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3400 end Set_Associated_Node_For_Itype;
3402 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3404 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3406 end Set_Associated_Storage_Pool;
3408 procedure Set_Actual_Subtype (Id : E; V : E) is
3411 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3412 or else Is_Formal (Id));
3414 end Set_Actual_Subtype;
3416 procedure Set_Address_Taken (Id : E; V : B := True) is
3418 Set_Flag104 (Id, V);
3419 end Set_Address_Taken;
3421 procedure Set_Alias (Id : E; V : E) is
3424 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3428 procedure Set_Alignment (Id : E; V : U) is
3430 pragma Assert (Is_Type (Id)
3431 or else Is_Formal (Id)
3432 or else Ekind_In (Id, E_Loop_Parameter,
3439 procedure Set_Barrier_Function (Id : E; V : N) is
3441 pragma Assert (Is_Entry (Id));
3443 end Set_Barrier_Function;
3445 procedure Set_Block_Node (Id : E; V : N) is
3447 pragma Assert (Ekind (Id) = E_Block);
3451 procedure Set_Body_Entity (Id : E; V : E) is
3453 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3455 end Set_Body_Entity;
3457 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3460 (Ekind (Id) = E_Package
3461 or else Is_Subprogram (Id)
3462 or else Is_Generic_Unit (Id));
3464 end Set_Body_Needed_For_SAL;
3466 procedure Set_Body_References (Id : E; V : L) is
3468 pragma Assert (Ekind (Id) = E_Abstract_State);
3469 Set_Elist16 (Id, V);
3470 end Set_Body_References;
3472 procedure Set_BIP_Initialization_Call (Id : E; V : N) is
3474 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3476 end Set_BIP_Initialization_Call;
3478 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3480 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3481 Set_Flag125 (Id, V);
3482 end Set_C_Pass_By_Copy;
3484 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3487 end Set_Can_Never_Be_Null;
3489 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3492 end Set_Checks_May_Be_Suppressed;
3494 procedure Set_Class_Wide_Type (Id : E; V : E) is
3496 pragma Assert (Is_Type (Id));
3498 end Set_Class_Wide_Type;
3500 procedure Set_Cloned_Subtype (Id : E; V : E) is
3502 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3504 end Set_Cloned_Subtype;
3506 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3508 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3510 end Set_Component_Bit_Offset;
3512 procedure Set_Component_Clause (Id : E; V : N) is
3514 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3516 end Set_Component_Clause;
3518 procedure Set_Component_Size (Id : E; V : U) is
3520 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3522 end Set_Component_Size;
3524 procedure Set_Component_Type (Id : E; V : E) is
3526 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3528 end Set_Component_Type;
3530 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3533 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3535 end Set_Corresponding_Concurrent_Type;
3537 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3539 pragma Assert (Ekind (Id) = E_Discriminant);
3541 end Set_Corresponding_Discriminant;
3543 procedure Set_Corresponding_Equality (Id : E; V : E) is
3546 (Ekind (Id) = E_Function
3547 and then not Comes_From_Source (Id)
3548 and then Chars (Id) = Name_Op_Ne);
3550 end Set_Corresponding_Equality;
3552 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3554 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3556 end Set_Corresponding_Protected_Entry;
3558 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3560 pragma Assert (Is_Concurrent_Type (Id));
3562 end Set_Corresponding_Record_Type;
3564 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3567 end Set_Corresponding_Remote_Type;
3569 procedure Set_Current_Use_Clause (Id : E; V : E) is
3571 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3573 end Set_Current_Use_Clause;
3575 procedure Set_Current_Value (Id : E; V : N) is
3577 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3579 end Set_Current_Value;
3581 procedure Set_CR_Discriminant (Id : E; V : E) is
3584 end Set_CR_Discriminant;
3586 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3588 Set_Flag166 (Id, V);
3589 end Set_Debug_Info_Off;
3591 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3594 end Set_Debug_Renaming_Link;
3596 procedure Set_Default_Aspect_Component_Value (Id : E; V : E) is
3598 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3600 end Set_Default_Aspect_Component_Value;
3602 procedure Set_Default_Aspect_Value (Id : E; V : E) is
3604 pragma Assert (Is_Scalar_Type (Id) and then Is_Base_Type (Id));
3606 end Set_Default_Aspect_Value;
3608 procedure Set_Default_Expr_Function (Id : E; V : E) is
3610 pragma Assert (Is_Formal (Id));
3612 end Set_Default_Expr_Function;
3614 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3616 Set_Flag108 (Id, V);
3617 end Set_Default_Expressions_Processed;
3619 procedure Set_Default_Value (Id : E; V : N) is
3621 pragma Assert (Is_Formal (Id));
3623 end Set_Default_Value;
3625 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3629 or else Is_Task_Type (Id)
3630 or else Ekind (Id) = E_Block);
3631 Set_Flag114 (Id, V);
3632 end Set_Delay_Cleanups;
3634 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3637 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3640 end Set_Delay_Subprogram_Descriptors;
3642 procedure Set_Delta_Value (Id : E; V : R) is
3644 pragma Assert (Is_Fixed_Point_Type (Id));
3645 Set_Ureal18 (Id, V);
3646 end Set_Delta_Value;
3648 procedure Set_Dependent_Instances (Id : E; V : L) is
3650 pragma Assert (Is_Generic_Instance (Id));
3652 end Set_Dependent_Instances;
3654 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3656 pragma Assert (Nkind (Id) in N_Entity);
3658 end Set_Depends_On_Private;
3660 procedure Set_Digits_Value (Id : E; V : U) is
3663 (Is_Floating_Point_Type (Id)
3664 or else Is_Decimal_Fixed_Point_Type (Id));
3666 end Set_Digits_Value;
3668 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3671 end Set_Directly_Designated_Type;
3673 procedure Set_Discard_Names (Id : E; V : B := True) is
3676 end Set_Discard_Names;
3678 procedure Set_Discriminal (Id : E; V : E) is
3680 pragma Assert (Ekind (Id) = E_Discriminant);
3682 end Set_Discriminal;
3684 procedure Set_Discriminal_Link (Id : E; V : E) is
3687 end Set_Discriminal_Link;
3689 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3691 pragma Assert (Ekind (Id) = E_Component);
3693 end Set_Discriminant_Checking_Func;
3695 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3697 pragma Assert (Nkind (Id) in N_Entity);
3698 Set_Elist21 (Id, V);
3699 end Set_Discriminant_Constraint;
3701 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3704 end Set_Discriminant_Default_Value;
3706 procedure Set_Discriminant_Number (Id : E; V : U) is
3709 end Set_Discriminant_Number;
3711 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3713 pragma Assert (Ekind (Id) = E_Record_Type
3714 and then Id = Implementation_Base_Type (Id));
3715 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3716 Set_Elist26 (Id, V);
3717 end Set_Dispatch_Table_Wrappers;
3719 procedure Set_DT_Entry_Count (Id : E; V : U) is
3721 pragma Assert (Ekind (Id) = E_Component);
3723 end Set_DT_Entry_Count;
3725 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3727 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3729 end Set_DT_Offset_To_Top_Func;
3731 procedure Set_DT_Position (Id : E; V : U) is
3733 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3735 end Set_DT_Position;
3737 procedure Set_DTC_Entity (Id : E; V : E) is
3739 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3743 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3745 pragma Assert (Ekind (Id) = E_Package);
3746 Set_Flag210 (Id, V);
3747 end Set_Elaborate_Body_Desirable;
3749 procedure Set_Elaboration_Entity (Id : E; V : E) is
3754 Ekind (Id) = E_Package
3756 Is_Generic_Unit (Id));
3758 end Set_Elaboration_Entity;
3760 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3765 Ekind (Id) = E_Package
3767 Is_Generic_Unit (Id));
3768 Set_Flag174 (Id, V);
3769 end Set_Elaboration_Entity_Required;
3771 procedure Set_Encapsulating_State (Id : E; V : E) is
3773 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
3775 end Set_Encapsulating_State;
3777 procedure Set_Enclosing_Scope (Id : E; V : E) is
3780 end Set_Enclosing_Scope;
3782 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3784 pragma Assert (Is_Entry (Id));
3785 Set_Flag152 (Id, V);
3786 end Set_Entry_Accepted;
3788 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3791 end Set_Entry_Bodies_Array;
3793 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3796 end Set_Entry_Cancel_Parameter;
3798 procedure Set_Entry_Component (Id : E; V : E) is
3801 end Set_Entry_Component;
3803 procedure Set_Entry_Formal (Id : E; V : E) is
3806 end Set_Entry_Formal;
3808 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3810 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3812 end Set_Entry_Index_Constant;
3814 procedure Set_Contract (Id : E; V : N) is
3817 (Ekind_In (Id, E_Entry,
3825 or else Is_Generic_Subprogram (Id)
3826 or else Is_Subprogram (Id));
3830 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3833 end Set_Entry_Parameters_Type;
3835 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3837 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3839 end Set_Enum_Pos_To_Rep;
3841 procedure Set_Enumeration_Pos (Id : E; V : U) is
3843 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3845 end Set_Enumeration_Pos;
3847 procedure Set_Enumeration_Rep (Id : E; V : U) is
3849 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3851 end Set_Enumeration_Rep;
3853 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3855 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3857 end Set_Enumeration_Rep_Expr;
3859 procedure Set_Equivalent_Type (Id : E; V : E) is
3862 (Ekind_In (Id, E_Class_Wide_Type,
3863 E_Class_Wide_Subtype,
3864 E_Access_Protected_Subprogram_Type,
3865 E_Anonymous_Access_Protected_Subprogram_Type,
3866 E_Access_Subprogram_Type,
3869 end Set_Equivalent_Type;
3871 procedure Set_Esize (Id : E; V : U) is
3876 procedure Set_Exception_Code (Id : E; V : U) is
3878 pragma Assert (Ekind (Id) = E_Exception);
3880 end Set_Exception_Code;
3882 procedure Set_Extra_Accessibility (Id : E; V : E) is
3885 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
3887 end Set_Extra_Accessibility;
3889 procedure Set_Extra_Accessibility_Of_Result (Id : E; V : E) is
3891 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
3893 end Set_Extra_Accessibility_Of_Result;
3895 procedure Set_Extra_Constrained (Id : E; V : E) is
3897 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3899 end Set_Extra_Constrained;
3901 procedure Set_Extra_Formal (Id : E; V : E) is
3904 end Set_Extra_Formal;
3906 procedure Set_Extra_Formals (Id : E; V : E) is
3909 (Is_Overloadable (Id)
3910 or else Ekind_In (Id, E_Entry_Family,
3912 E_Subprogram_Type));
3914 end Set_Extra_Formals;
3916 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3919 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3920 Set_Flag229 (Id, V);
3921 end Set_Can_Use_Internal_Rep;
3923 procedure Set_Finalization_Master (Id : E; V : E) is
3925 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3927 end Set_Finalization_Master;
3929 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3931 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3932 Set_Flag158 (Id, V);
3933 end Set_Finalize_Storage_Only;
3935 procedure Set_Finalizer (Id : E; V : E) is
3937 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
3941 procedure Set_First_Entity (Id : E; V : E) is
3944 end Set_First_Entity;
3946 procedure Set_First_Exit_Statement (Id : E; V : N) is
3948 pragma Assert (Ekind (Id) = E_Loop);
3950 end Set_First_Exit_Statement;
3952 procedure Set_First_Index (Id : E; V : N) is
3954 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3956 end Set_First_Index;
3958 procedure Set_First_Literal (Id : E; V : E) is
3960 pragma Assert (Is_Enumeration_Type (Id));
3962 end Set_First_Literal;
3964 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3966 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3968 end Set_First_Optional_Parameter;
3970 procedure Set_First_Private_Entity (Id : E; V : E) is
3972 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
3973 or else Ekind (Id) in Concurrent_Kind);
3975 end Set_First_Private_Entity;
3977 procedure Set_First_Rep_Item (Id : E; V : N) is
3980 end Set_First_Rep_Item;
3982 procedure Set_Float_Rep (Id : E; V : F) is
3983 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
3985 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
3988 procedure Set_Freeze_Node (Id : E; V : N) is
3991 end Set_Freeze_Node;
3993 procedure Set_From_Limited_With (Id : E; V : B := True) is
3996 (Is_Type (Id) or else Ekind_In (Id, E_Abstract_State, E_Package));
3997 Set_Flag159 (Id, V);
3998 end Set_From_Limited_With;
4000 procedure Set_Full_View (Id : E; V : E) is
4002 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
4006 procedure Set_Generic_Homonym (Id : E; V : E) is
4009 end Set_Generic_Homonym;
4011 procedure Set_Generic_Renamings (Id : E; V : L) is
4013 Set_Elist23 (Id, V);
4014 end Set_Generic_Renamings;
4016 procedure Set_Handler_Records (Id : E; V : S) is
4019 end Set_Handler_Records;
4021 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
4023 pragma Assert (Id = Base_Type (Id));
4024 Set_Flag135 (Id, V);
4025 end Set_Has_Aliased_Components;
4027 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
4030 end Set_Has_Alignment_Clause;
4032 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
4035 end Set_Has_All_Calls_Remote;
4037 procedure Set_Has_Anonymous_Master (Id : E; V : B := True) is
4040 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
4041 Set_Flag253 (Id, V);
4042 end Set_Has_Anonymous_Master;
4044 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
4046 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4048 end Set_Has_Atomic_Components;
4050 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
4053 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
4054 Set_Flag139 (Id, V);
4055 end Set_Has_Biased_Representation;
4057 procedure Set_Has_Completion (Id : E; V : B := True) is
4060 end Set_Has_Completion;
4062 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
4064 pragma Assert (Is_Type (Id));
4066 end Set_Has_Completion_In_Body;
4068 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
4070 pragma Assert (Ekind (Id) = E_Record_Type);
4071 Set_Flag140 (Id, V);
4072 end Set_Has_Complex_Representation;
4074 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
4076 pragma Assert (Ekind (Id) = E_Array_Type);
4078 end Set_Has_Component_Size_Clause;
4080 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
4082 pragma Assert (Is_Type (Id));
4083 Set_Flag187 (Id, V);
4084 end Set_Has_Constrained_Partial_View;
4086 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
4088 Set_Flag181 (Id, V);
4089 end Set_Has_Contiguous_Rep;
4091 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
4093 pragma Assert (Id = Base_Type (Id));
4095 end Set_Has_Controlled_Component;
4097 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
4100 end Set_Has_Controlling_Result;
4102 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
4104 Set_Flag119 (Id, V);
4105 end Set_Has_Convention_Pragma;
4107 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
4110 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
4111 and then Is_Base_Type (Id));
4113 end Set_Has_Default_Aspect;
4115 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
4117 pragma Assert (Nkind (Id) in N_Entity);
4118 Set_Flag200 (Id, V);
4119 end Set_Has_Delayed_Aspects;
4121 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
4123 pragma Assert (Nkind (Id) in N_Entity);
4125 end Set_Has_Delayed_Freeze;
4127 procedure Set_Has_Delayed_Rep_Aspects (Id : E; V : B := True) is
4129 pragma Assert (Nkind (Id) in N_Entity);
4130 Set_Flag261 (Id, V);
4131 end Set_Has_Delayed_Rep_Aspects;
4133 procedure Set_Has_Discriminants (Id : E; V : B := True) is
4135 pragma Assert (Nkind (Id) in N_Entity);
4137 end Set_Has_Discriminants;
4139 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
4141 pragma Assert (Ekind (Id) = E_Record_Type
4142 and then Is_Tagged_Type (Id));
4143 Set_Flag220 (Id, V);
4144 end Set_Has_Dispatch_Table;
4146 procedure Set_Has_Dynamic_Predicate_Aspect (Id : E; V : B := True) is
4148 pragma Assert (Is_Type (Id));
4149 Set_Flag258 (Id, V);
4150 end Set_Has_Dynamic_Predicate_Aspect;
4152 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
4154 pragma Assert (Is_Enumeration_Type (Id));
4156 end Set_Has_Enumeration_Rep_Clause;
4158 procedure Set_Has_Exit (Id : E; V : B := True) is
4163 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
4165 Set_Flag175 (Id, V);
4166 end Set_Has_Forward_Instantiation;
4168 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
4170 Set_Flag173 (Id, V);
4171 end Set_Has_Fully_Qualified_Name;
4173 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
4176 end Set_Has_Gigi_Rep_Item;
4178 procedure Set_Has_Homonym (Id : E; V : B := True) is
4181 end Set_Has_Homonym;
4183 procedure Set_Has_Implicit_Dereference (Id : E; V : B := True) is
4185 Set_Flag251 (Id, V);
4186 end Set_Has_Implicit_Dereference;
4188 procedure Set_Has_Independent_Components (Id : E; V : B := True) is
4190 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
4191 and then Is_Base_Type (Id));
4193 end Set_Has_Independent_Components;
4195 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
4197 pragma Assert (Is_Type (Id));
4198 Set_Flag248 (Id, V);
4199 end Set_Has_Inheritable_Invariants;
4201 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
4203 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
4204 Set_Flag219 (Id, V);
4205 end Set_Has_Initial_Value;
4207 procedure Set_Has_Invariants (Id : E; V : B := True) is
4209 pragma Assert (Is_Type (Id));
4210 Set_Flag232 (Id, V);
4211 end Set_Has_Invariants;
4213 procedure Set_Has_Loop_Entry_Attributes (Id : E; V : B := True) is
4215 pragma Assert (Ekind (Id) = E_Loop);
4216 Set_Flag260 (Id, V);
4217 end Set_Has_Loop_Entry_Attributes;
4219 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
4221 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4223 end Set_Has_Machine_Radix_Clause;
4225 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
4228 end Set_Has_Master_Entity;
4230 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
4232 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4233 Set_Flag142 (Id, V);
4234 end Set_Has_Missing_Return;
4236 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
4238 Set_Flag101 (Id, V);
4239 end Set_Has_Nested_Block_With_Handler;
4241 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
4243 pragma Assert (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
4244 Set_Flag215 (Id, V);
4245 end Set_Has_Up_Level_Access;
4247 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
4249 pragma Assert (Id = Base_Type (Id));
4251 end Set_Has_Non_Standard_Rep;
4253 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
4255 pragma Assert (Is_Type (Id));
4256 Set_Flag172 (Id, V);
4257 end Set_Has_Object_Size_Clause;
4259 procedure Set_Has_Out_Or_In_Out_Parameter (Id : E; V : B := True) is
4261 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4262 Set_Flag110 (Id, V);
4263 end Set_Has_Out_Or_In_Out_Parameter;
4265 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
4267 Set_Flag154 (Id, V);
4268 end Set_Has_Per_Object_Constraint;
4270 procedure Set_Has_Postconditions (Id : E; V : B := True) is
4272 pragma Assert (Is_Subprogram (Id));
4273 Set_Flag240 (Id, V);
4274 end Set_Has_Postconditions;
4276 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
4278 pragma Assert (Is_Access_Type (Id));
4279 Set_Flag27 (Base_Type (Id), V);
4280 end Set_Has_Pragma_Controlled;
4282 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
4284 Set_Flag150 (Id, V);
4285 end Set_Has_Pragma_Elaborate_Body;
4287 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
4289 Set_Flag157 (Id, V);
4290 end Set_Has_Pragma_Inline;
4292 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
4294 Set_Flag230 (Id, V);
4295 end Set_Has_Pragma_Inline_Always;
4297 procedure Set_Has_Pragma_No_Inline (Id : E; V : B := True) is
4299 Set_Flag201 (Id, V);
4300 end Set_Has_Pragma_No_Inline;
4302 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
4304 pragma Assert (Is_Enumeration_Type (Id));
4305 pragma Assert (Id = Base_Type (Id));
4306 Set_Flag198 (Id, V);
4307 end Set_Has_Pragma_Ordered;
4309 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
4311 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
4312 pragma Assert (Id = Base_Type (Id));
4313 Set_Flag121 (Id, V);
4314 end Set_Has_Pragma_Pack;
4316 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
4318 Set_Flag221 (Id, V);
4319 end Set_Has_Pragma_Preelab_Init;
4321 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
4323 Set_Flag203 (Id, V);
4324 end Set_Has_Pragma_Pure;
4326 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
4328 Set_Flag179 (Id, V);
4329 end Set_Has_Pragma_Pure_Function;
4331 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
4333 Set_Flag169 (Id, V);
4334 end Set_Has_Pragma_Thread_Local_Storage;
4336 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
4338 Set_Flag233 (Id, V);
4339 end Set_Has_Pragma_Unmodified;
4341 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
4343 Set_Flag180 (Id, V);
4344 end Set_Has_Pragma_Unreferenced;
4346 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
4348 pragma Assert (Is_Type (Id));
4349 Set_Flag212 (Id, V);
4350 end Set_Has_Pragma_Unreferenced_Objects;
4352 procedure Set_Has_Predicates (Id : E; V : B := True) is
4354 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Void);
4355 Set_Flag250 (Id, V);
4356 end Set_Has_Predicates;
4358 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
4360 pragma Assert (Id = Base_Type (Id));
4361 Set_Flag120 (Id, V);
4362 end Set_Has_Primitive_Operations;
4364 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
4366 pragma Assert (Is_Type (Id));
4367 Set_Flag151 (Id, V);
4368 end Set_Has_Private_Ancestor;
4370 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
4372 Set_Flag155 (Id, V);
4373 end Set_Has_Private_Declaration;
4375 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
4377 Set_Flag161 (Id, V);
4378 end Set_Has_Qualified_Name;
4380 procedure Set_Has_RACW (Id : E; V : B := True) is
4382 pragma Assert (Ekind (Id) = E_Package);
4383 Set_Flag214 (Id, V);
4386 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
4388 pragma Assert (Id = Base_Type (Id));
4390 end Set_Has_Record_Rep_Clause;
4392 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
4394 pragma Assert (Is_Subprogram (Id));
4395 Set_Flag143 (Id, V);
4396 end Set_Has_Recursive_Call;
4398 procedure Set_Has_Shift_Operator (Id : E; V : B := True) is
4400 pragma Assert (Is_Integer_Type (Id) and then Is_Base_Type (Id));
4401 Set_Flag267 (Id, V);
4402 end Set_Has_Shift_Operator;
4404 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
4407 end Set_Has_Size_Clause;
4409 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
4412 end Set_Has_Small_Clause;
4414 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
4416 pragma Assert (Id = Base_Type (Id));
4417 Set_Flag100 (Id, V);
4418 end Set_Has_Specified_Layout;
4420 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
4422 pragma Assert (Is_Type (Id));
4423 Set_Flag190 (Id, V);
4424 end Set_Has_Specified_Stream_Input;
4426 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
4428 pragma Assert (Is_Type (Id));
4429 Set_Flag191 (Id, V);
4430 end Set_Has_Specified_Stream_Output;
4432 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
4434 pragma Assert (Is_Type (Id));
4435 Set_Flag192 (Id, V);
4436 end Set_Has_Specified_Stream_Read;
4438 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
4440 pragma Assert (Is_Type (Id));
4441 Set_Flag193 (Id, V);
4442 end Set_Has_Specified_Stream_Write;
4444 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
4446 Set_Flag211 (Id, V);
4447 end Set_Has_Static_Discriminants;
4449 procedure Set_Has_Static_Predicate (Id : E; V : B := True) is
4451 pragma Assert (Is_Type (Id));
4452 Set_Flag269 (Id, V);
4453 end Set_Has_Static_Predicate;
4455 procedure Set_Has_Static_Predicate_Aspect (Id : E; V : B := True) is
4457 pragma Assert (Is_Type (Id));
4458 Set_Flag259 (Id, V);
4459 end Set_Has_Static_Predicate_Aspect;
4461 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
4463 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4464 pragma Assert (Id = Base_Type (Id));
4466 end Set_Has_Storage_Size_Clause;
4468 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4470 pragma Assert (Is_Elementary_Type (Id));
4471 Set_Flag184 (Id, V);
4472 end Set_Has_Stream_Size_Clause;
4474 procedure Set_Has_Task (Id : E; V : B := True) is
4476 pragma Assert (Id = Base_Type (Id));
4480 procedure Set_Has_Thunks (Id : E; V : B := True) is
4482 pragma Assert (Is_Tag (Id));
4483 Set_Flag228 (Id, V);
4486 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4488 pragma Assert (Id = Base_Type (Id));
4489 Set_Flag123 (Id, V);
4490 end Set_Has_Unchecked_Union;
4492 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4494 pragma Assert (Is_Type (Id));
4496 end Set_Has_Unknown_Discriminants;
4498 procedure Set_Has_Visible_Refinement (Id : E; V : B := True) is
4500 pragma Assert (Ekind (Id) = E_Abstract_State);
4501 Set_Flag263 (Id, V);
4502 end Set_Has_Visible_Refinement;
4504 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4506 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4508 end Set_Has_Volatile_Components;
4510 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4512 Set_Flag182 (Id, V);
4513 end Set_Has_Xref_Entry;
4515 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4517 pragma Assert (Ekind (Id) = E_Variable);
4519 end Set_Hiding_Loop_Variable;
4521 procedure Set_Homonym (Id : E; V : E) is
4523 pragma Assert (Id /= V);
4527 procedure Set_Import_Pragma (Id : E; V : E) is
4529 pragma Assert (Is_Subprogram (Id));
4531 end Set_Import_Pragma;
4533 procedure Set_Interface_Alias (Id : E; V : E) is
4537 and then Is_Hidden (Id)
4538 and then (Ekind_In (Id, E_Procedure, E_Function)));
4540 end Set_Interface_Alias;
4542 procedure Set_Interfaces (Id : E; V : L) is
4544 pragma Assert (Is_Record_Type (Id));
4545 Set_Elist25 (Id, V);
4548 procedure Set_In_Package_Body (Id : E; V : B := True) is
4551 end Set_In_Package_Body;
4553 procedure Set_In_Private_Part (Id : E; V : B := True) is
4556 end Set_In_Private_Part;
4558 procedure Set_In_Use (Id : E; V : B := True) is
4560 pragma Assert (Nkind (Id) in N_Entity);
4564 procedure Set_Initialization_Statements (Id : E; V : N) is
4566 -- Tolerate an E_Void entity since this can be called while resolving
4567 -- an aggregate used as the initialization expression for an object
4568 -- declaration, and this occurs before the Ekind for the object is set.
4570 pragma Assert (Ekind_In (Id, E_Void, E_Constant, E_Variable));
4572 end Set_Initialization_Statements;
4574 procedure Set_Inner_Instances (Id : E; V : L) is
4576 Set_Elist23 (Id, V);
4577 end Set_Inner_Instances;
4579 procedure Set_Interface_Name (Id : E; V : N) is
4582 end Set_Interface_Name;
4584 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4586 pragma Assert (Is_Overloadable (Id));
4588 end Set_Is_Abstract_Subprogram;
4590 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4592 pragma Assert (Is_Type (Id));
4593 Set_Flag146 (Id, V);
4594 end Set_Is_Abstract_Type;
4596 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4598 pragma Assert (Is_Access_Type (Id));
4599 Set_Flag194 (Id, V);
4600 end Set_Is_Local_Anonymous_Access;
4602 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4604 pragma Assert (Is_Access_Type (Id));
4606 end Set_Is_Access_Constant;
4608 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4610 Set_Flag185 (Id, V);
4611 end Set_Is_Ada_2005_Only;
4613 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4615 Set_Flag199 (Id, V);
4616 end Set_Is_Ada_2012_Only;
4618 procedure Set_Is_Aliased (Id : E; V : B := True) is
4620 pragma Assert (Nkind (Id) in N_Entity);
4624 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
4626 pragma Assert (Is_Entry (Id));
4627 Set_Flag132 (Id, V);
4628 end Set_Is_AST_Entry;
4630 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4633 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4635 end Set_Is_Asynchronous;
4637 procedure Set_Is_Atomic (Id : E; V : B := True) is
4642 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4644 pragma Assert ((not V)
4645 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4646 Set_Flag122 (Id, V);
4647 end Set_Is_Bit_Packed_Array;
4649 procedure Set_Is_Called (Id : E; V : B := True) is
4651 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4652 Set_Flag102 (Id, V);
4655 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4658 end Set_Is_Character_Type;
4660 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4663 end Set_Is_Child_Unit;
4665 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4668 end Set_Is_Class_Wide_Equivalent_Type;
4670 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4672 Set_Flag149 (Id, V);
4673 end Set_Is_Compilation_Unit;
4675 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4677 pragma Assert (Ekind (Id) = E_Discriminant);
4678 Set_Flag103 (Id, V);
4679 end Set_Is_Completely_Hidden;
4681 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4684 end Set_Is_Concurrent_Record_Type;
4686 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4689 end Set_Is_Constr_Subt_For_U_Nominal;
4691 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4693 Set_Flag141 (Id, V);
4694 end Set_Is_Constr_Subt_For_UN_Aliased;
4696 procedure Set_Is_Constrained (Id : E; V : B := True) is
4698 pragma Assert (Nkind (Id) in N_Entity);
4700 end Set_Is_Constrained;
4702 procedure Set_Is_Constructor (Id : E; V : B := True) is
4705 end Set_Is_Constructor;
4707 procedure Set_Is_Controlled (Id : E; V : B := True) is
4709 pragma Assert (Id = Base_Type (Id));
4711 end Set_Is_Controlled;
4713 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4715 pragma Assert (Is_Formal (Id));
4717 end Set_Is_Controlling_Formal;
4719 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4722 end Set_Is_CPP_Class;
4724 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4726 pragma Assert (Is_Type (Id));
4727 Set_Flag223 (Id, V);
4728 end Set_Is_Descendent_Of_Address;
4730 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4732 Set_Flag176 (Id, V);
4733 end Set_Is_Discrim_SO_Function;
4735 procedure Set_Is_Discriminant_Check_Function (Id : E; V : B := True) is
4737 Set_Flag264 (Id, V);
4738 end Set_Is_Discriminant_Check_Function;
4740 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4742 Set_Flag234 (Id, V);
4743 end Set_Is_Dispatch_Table_Entity;
4745 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4750 Is_Overloadable (Id)
4752 Ekind (Id) = E_Subprogram_Type);
4755 end Set_Is_Dispatching_Operation;
4757 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4759 Set_Flag124 (Id, V);
4760 end Set_Is_Eliminated;
4762 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4765 end Set_Is_Entry_Formal;
4767 procedure Set_Is_Exported (Id : E; V : B := True) is
4770 end Set_Is_Exported;
4772 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4775 end Set_Is_First_Subtype;
4777 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4779 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4780 Set_Flag118 (Id, V);
4781 end Set_Is_For_Access_Subtype;
4783 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4785 Set_Flag111 (Id, V);
4786 end Set_Is_Formal_Subprogram;
4788 procedure Set_Is_Frozen (Id : E; V : B := True) is
4790 pragma Assert (Nkind (Id) in N_Entity);
4794 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4796 pragma Assert (Is_Type (Id));
4798 end Set_Is_Generic_Actual_Type;
4800 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4802 Set_Flag130 (Id, V);
4803 end Set_Is_Generic_Instance;
4805 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4807 pragma Assert (Nkind (Id) in N_Entity);
4809 end Set_Is_Generic_Type;
4811 procedure Set_Is_Hidden (Id : E; V : B := True) is
4816 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4818 Set_Flag171 (Id, V);
4819 end Set_Is_Hidden_Open_Scope;
4821 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4823 pragma Assert (Nkind (Id) in N_Entity);
4825 end Set_Is_Immediately_Visible;
4827 procedure Set_Is_Implementation_Defined (Id : E; V : B := True) is
4829 Set_Flag254 (Id, V);
4830 end Set_Is_Implementation_Defined;
4832 procedure Set_Is_Imported (Id : E; V : B := True) is
4835 end Set_Is_Imported;
4837 procedure Set_Is_Independent (Id : E; V : B := True) is
4839 pragma Assert (Ekind_In (Id, E_Component, E_Void));
4840 Set_Flag268 (Id, V);
4841 end Set_Is_Independent;
4843 procedure Set_Is_Inlined (Id : E; V : B := True) is
4848 procedure Set_Is_Interface (Id : E; V : B := True) is
4850 pragma Assert (Is_Record_Type (Id));
4851 Set_Flag186 (Id, V);
4852 end Set_Is_Interface;
4854 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4856 Set_Flag126 (Id, V);
4857 end Set_Is_Instantiated;
4859 procedure Set_Is_Internal (Id : E; V : B := True) is
4861 pragma Assert (Nkind (Id) in N_Entity);
4863 end Set_Is_Internal;
4865 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4867 pragma Assert (Nkind (Id) in N_Entity);
4869 end Set_Is_Interrupt_Handler;
4871 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4874 end Set_Is_Intrinsic_Subprogram;
4876 procedure Set_Is_Invariant_Procedure (Id : E; V : B := True) is
4878 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4879 Set_Flag257 (Id, V);
4880 end Set_Is_Invariant_Procedure;
4882 procedure Set_Is_Itype (Id : E; V : B := True) is
4887 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4890 end Set_Is_Known_Non_Null;
4892 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4894 Set_Flag204 (Id, V);
4895 end Set_Is_Known_Null;
4897 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4899 Set_Flag170 (Id, V);
4900 end Set_Is_Known_Valid;
4902 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4904 pragma Assert (Is_Type (Id));
4905 Set_Flag106 (Id, V);
4906 end Set_Is_Limited_Composite;
4908 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4910 pragma Assert (Is_Interface (Id));
4911 Set_Flag197 (Id, V);
4912 end Set_Is_Limited_Interface;
4914 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4917 end Set_Is_Limited_Record;
4919 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4921 pragma Assert (Is_Subprogram (Id));
4922 Set_Flag137 (Id, V);
4923 end Set_Is_Machine_Code_Subprogram;
4925 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4927 pragma Assert (Is_Type (Id));
4928 Set_Flag109 (Id, V);
4929 end Set_Is_Non_Static_Subtype;
4931 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4933 pragma Assert (Ekind (Id) = E_Procedure);
4934 Set_Flag178 (Id, V);
4935 end Set_Is_Null_Init_Proc;
4937 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4939 Set_Flag153 (Id, V);
4940 end Set_Is_Obsolescent;
4942 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
4944 pragma Assert (Ekind (Id) = E_Out_Parameter);
4945 Set_Flag226 (Id, V);
4946 end Set_Is_Only_Out_Parameter;
4948 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
4950 pragma Assert (Is_Formal (Id));
4951 Set_Flag134 (Id, V);
4952 end Set_Is_Optional_Parameter;
4954 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
4956 Set_Flag160 (Id, V);
4957 end Set_Is_Package_Body_Entity;
4959 procedure Set_Is_Packed (Id : E; V : B := True) is
4961 pragma Assert (Id = Base_Type (Id));
4965 procedure Set_Is_Packed_Array_Impl_Type (Id : E; V : B := True) is
4967 Set_Flag138 (Id, V);
4968 end Set_Is_Packed_Array_Impl_Type;
4970 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
4972 pragma Assert (Nkind (Id) in N_Entity);
4974 end Set_Is_Potentially_Use_Visible;
4976 procedure Set_Is_Predicate_Function (Id : E; V : B := True) is
4978 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4979 Set_Flag255 (Id, V);
4980 end Set_Is_Predicate_Function;
4982 procedure Set_Is_Predicate_Function_M (Id : E; V : B := True) is
4984 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4985 Set_Flag256 (Id, V);
4986 end Set_Is_Predicate_Function_M;
4988 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
4991 end Set_Is_Preelaborated;
4993 procedure Set_Is_Primitive (Id : E; V : B := True) is
4996 (Is_Overloadable (Id)
4997 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
4998 Set_Flag218 (Id, V);
4999 end Set_Is_Primitive;
5001 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
5003 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5004 Set_Flag195 (Id, V);
5005 end Set_Is_Primitive_Wrapper;
5007 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
5009 pragma Assert (Is_Type (Id));
5010 Set_Flag107 (Id, V);
5011 end Set_Is_Private_Composite;
5013 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
5016 end Set_Is_Private_Descendant;
5018 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
5020 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5021 Set_Flag245 (Id, V);
5022 end Set_Is_Private_Primitive;
5024 procedure Set_Is_Processed_Transient (Id : E; V : B := True) is
5026 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5027 Set_Flag252 (Id, V);
5028 end Set_Is_Processed_Transient;
5030 procedure Set_Is_Public (Id : E; V : B := True) is
5032 pragma Assert (Nkind (Id) in N_Entity);
5036 procedure Set_Is_Pure (Id : E; V : B := True) is
5041 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
5043 pragma Assert (Is_Access_Type (Id));
5044 Set_Flag189 (Id, V);
5045 end Set_Is_Pure_Unit_Access_Type;
5047 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
5049 pragma Assert (Is_Type (Id));
5050 Set_Flag244 (Id, V);
5051 end Set_Is_RACW_Stub_Type;
5053 procedure Set_Is_Raised (Id : E; V : B := True) is
5055 pragma Assert (Ekind (Id) = E_Exception);
5056 Set_Flag224 (Id, V);
5059 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
5062 end Set_Is_Remote_Call_Interface;
5064 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
5067 end Set_Is_Remote_Types;
5069 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
5071 Set_Flag112 (Id, V);
5072 end Set_Is_Renaming_Of_Object;
5074 procedure Set_Is_Return_Object (Id : E; V : B := True) is
5076 Set_Flag209 (Id, V);
5077 end Set_Is_Return_Object;
5079 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
5081 pragma Assert (Ekind (Id) = E_Variable);
5082 Set_Flag249 (Id, V);
5083 end Set_Is_Safe_To_Reevaluate;
5085 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
5088 end Set_Is_Shared_Passive;
5090 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
5094 or else Ekind_In (Id, E_Exception,
5099 end Set_Is_Statically_Allocated;
5101 procedure Set_Is_Tag (Id : E; V : B := True) is
5103 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5107 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
5110 end Set_Is_Tagged_Type;
5112 procedure Set_Is_Thunk (Id : E; V : B := True) is
5114 pragma Assert (Is_Subprogram (Id));
5115 Set_Flag225 (Id, V);
5118 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
5120 Set_Flag235 (Id, V);
5121 end Set_Is_Trivial_Subprogram;
5123 procedure Set_Is_True_Constant (Id : E; V : B := True) is
5125 Set_Flag163 (Id, V);
5126 end Set_Is_True_Constant;
5128 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
5130 pragma Assert (Id = Base_Type (Id));
5131 Set_Flag117 (Id, V);
5132 end Set_Is_Unchecked_Union;
5134 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
5136 pragma Assert (Ekind (Id) = E_Record_Type);
5137 Set_Flag246 (Id, V);
5138 end Set_Is_Underlying_Record_View;
5140 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
5142 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
5143 Set_Flag144 (Id, V);
5144 end Set_Is_Unsigned_Type;
5146 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
5148 pragma Assert (Ekind (Id) = E_Procedure);
5149 Set_Flag127 (Id, V);
5150 end Set_Is_Valued_Procedure;
5152 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
5154 Set_Flag206 (Id, V);
5155 end Set_Is_Visible_Formal;
5157 procedure Set_Is_Visible_Lib_Unit (Id : E; V : B := True) is
5159 Set_Flag116 (Id, V);
5160 end Set_Is_Visible_Lib_Unit;
5162 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
5164 pragma Assert (Ekind (Id) = E_Exception);
5165 Set_Flag133 (Id, V);
5166 end Set_Is_VMS_Exception;
5168 procedure Set_Is_Volatile (Id : E; V : B := True) is
5170 pragma Assert (Nkind (Id) in N_Entity);
5172 end Set_Is_Volatile;
5174 procedure Set_Itype_Printed (Id : E; V : B := True) is
5176 pragma Assert (Is_Itype (Id));
5177 Set_Flag202 (Id, V);
5178 end Set_Itype_Printed;
5180 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
5183 end Set_Kill_Elaboration_Checks;
5185 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
5188 end Set_Kill_Range_Checks;
5190 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
5192 pragma Assert (Is_Type (Id));
5193 Set_Flag207 (Id, V);
5194 end Set_Known_To_Have_Preelab_Init;
5196 procedure Set_Last_Aggregate_Assignment (Id : E; V : N) is
5198 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5200 end Set_Last_Aggregate_Assignment;
5202 procedure Set_Last_Assignment (Id : E; V : N) is
5204 pragma Assert (Is_Assignable (Id));
5206 end Set_Last_Assignment;
5208 procedure Set_Last_Entity (Id : E; V : E) is
5211 end Set_Last_Entity;
5213 procedure Set_Limited_View (Id : E; V : E) is
5215 pragma Assert (Ekind (Id) = E_Package);
5217 end Set_Limited_View;
5219 procedure Set_Linker_Section_Pragma (Id : E; V : N) is
5221 pragma Assert (Is_Type (Id)
5222 or else Ekind_In (Id, E_Constant, E_Variable)
5223 or else Is_Subprogram (Id));
5225 end Set_Linker_Section_Pragma;
5227 procedure Set_Lit_Indexes (Id : E; V : E) is
5229 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5231 end Set_Lit_Indexes;
5233 procedure Set_Lit_Strings (Id : E; V : E) is
5235 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5237 end Set_Lit_Strings;
5239 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
5241 pragma Assert (Is_Formal (Id));
5242 Set_Flag205 (Id, V);
5243 end Set_Low_Bound_Tested;
5245 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
5247 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
5249 end Set_Machine_Radix_10;
5251 procedure Set_Master_Id (Id : E; V : E) is
5253 pragma Assert (Is_Access_Type (Id));
5257 procedure Set_Materialize_Entity (Id : E; V : B := True) is
5259 Set_Flag168 (Id, V);
5260 end Set_Materialize_Entity;
5262 procedure Set_May_Inherit_Delayed_Rep_Aspects (Id : E; V : B := True) is
5264 Set_Flag262 (Id, V);
5265 end Set_May_Inherit_Delayed_Rep_Aspects;
5267 procedure Set_Mechanism (Id : E; V : M) is
5269 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
5270 Set_Uint8 (Id, UI_From_Int (V));
5273 procedure Set_Modulus (Id : E; V : U) is
5275 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
5279 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
5281 pragma Assert (Is_Type (Id));
5282 Set_Flag183 (Id, V);
5283 end Set_Must_Be_On_Byte_Boundary;
5285 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
5287 pragma Assert (Is_Type (Id));
5288 Set_Flag208 (Id, V);
5289 end Set_Must_Have_Preelab_Init;
5291 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
5293 Set_Flag147 (Id, V);
5294 end Set_Needs_Debug_Info;
5296 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
5299 (Is_Overloadable (Id)
5300 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
5302 end Set_Needs_No_Actuals;
5304 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
5306 Set_Flag115 (Id, V);
5307 end Set_Never_Set_In_Source;
5309 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
5312 end Set_Next_Inlined_Subprogram;
5314 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
5316 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5317 Set_Flag131 (Id, V);
5318 end Set_No_Pool_Assigned;
5320 procedure Set_No_Return (Id : E; V : B := True) is
5323 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
5324 Set_Flag113 (Id, V);
5327 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
5329 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5330 Set_Flag136 (Id, V);
5331 end Set_No_Strict_Aliasing;
5333 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
5335 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5337 end Set_Non_Binary_Modulus;
5339 procedure Set_Non_Limited_View (Id : E; V : E) is
5342 (Ekind (Id) in Incomplete_Kind or else Ekind (Id) = E_Abstract_State);
5344 end Set_Non_Limited_View;
5346 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
5349 (Root_Type (Id) = Standard_Boolean
5350 and then Ekind (Id) = E_Enumeration_Type);
5351 Set_Flag162 (Id, V);
5352 end Set_Nonzero_Is_True;
5354 procedure Set_Normalized_First_Bit (Id : E; V : U) is
5356 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5358 end Set_Normalized_First_Bit;
5360 procedure Set_Normalized_Position (Id : E; V : U) is
5362 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5364 end Set_Normalized_Position;
5366 procedure Set_Normalized_Position_Max (Id : E; V : U) is
5368 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5370 end Set_Normalized_Position_Max;
5372 procedure Set_OK_To_Rename (Id : E; V : B := True) is
5374 pragma Assert (Ekind (Id) = E_Variable);
5375 Set_Flag247 (Id, V);
5376 end Set_OK_To_Rename;
5378 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
5381 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5382 Set_Flag239 (Id, V);
5383 end Set_OK_To_Reorder_Components;
5385 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
5388 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5389 Set_Flag241 (Id, V);
5390 end Set_Optimize_Alignment_Space;
5392 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
5395 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5396 Set_Flag242 (Id, V);
5397 end Set_Optimize_Alignment_Time;
5399 procedure Set_Original_Access_Type (Id : E; V : E) is
5401 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
5403 end Set_Original_Access_Type;
5405 procedure Set_Original_Array_Type (Id : E; V : E) is
5407 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
5409 end Set_Original_Array_Type;
5411 procedure Set_Original_Record_Component (Id : E; V : E) is
5413 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
5415 end Set_Original_Record_Component;
5417 procedure Set_Overlays_Constant (Id : E; V : B := True) is
5419 Set_Flag243 (Id, V);
5420 end Set_Overlays_Constant;
5422 procedure Set_Overridden_Operation (Id : E; V : E) is
5425 end Set_Overridden_Operation;
5427 procedure Set_Package_Instantiation (Id : E; V : N) is
5429 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
5431 end Set_Package_Instantiation;
5433 procedure Set_Packed_Array_Impl_Type (Id : E; V : E) is
5435 pragma Assert (Is_Array_Type (Id));
5437 end Set_Packed_Array_Impl_Type;
5439 procedure Set_Parent_Subtype (Id : E; V : E) is
5441 pragma Assert (Ekind (Id) = E_Record_Type);
5443 end Set_Parent_Subtype;
5445 procedure Set_Part_Of_Constituents (Id : E; V : L) is
5447 pragma Assert (Ekind (Id) = E_Abstract_State);
5449 end Set_Part_Of_Constituents;
5451 procedure Set_Postcondition_Proc (Id : E; V : E) is
5453 pragma Assert (Ekind (Id) = E_Procedure);
5455 end Set_Postcondition_Proc;
5457 procedure Set_PPC_Wrapper (Id : E; V : E) is
5459 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
5461 end Set_PPC_Wrapper;
5463 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
5465 pragma Assert (Is_Tagged_Type (Id));
5466 Set_Elist10 (Id, V);
5467 end Set_Direct_Primitive_Operations;
5469 procedure Set_Prival (Id : E; V : E) is
5471 pragma Assert (Is_Protected_Component (Id));
5475 procedure Set_Prival_Link (Id : E; V : E) is
5477 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5479 end Set_Prival_Link;
5481 procedure Set_Private_Dependents (Id : E; V : L) is
5483 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
5484 Set_Elist18 (Id, V);
5485 end Set_Private_Dependents;
5487 procedure Set_Private_View (Id : E; V : N) is
5489 pragma Assert (Is_Private_Type (Id));
5491 end Set_Private_View;
5493 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
5495 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
5497 end Set_Protected_Body_Subprogram;
5499 procedure Set_Protected_Formal (Id : E; V : E) is
5501 pragma Assert (Is_Formal (Id));
5503 end Set_Protected_Formal;
5505 procedure Set_Protection_Object (Id : E; V : E) is
5507 pragma Assert (Ekind_In (Id, E_Entry,
5512 end Set_Protection_Object;
5514 procedure Set_Reachable (Id : E; V : B := True) is
5519 procedure Set_Referenced (Id : E; V : B := True) is
5521 Set_Flag156 (Id, V);
5524 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
5527 end Set_Referenced_As_LHS;
5529 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
5531 Set_Flag227 (Id, V);
5532 end Set_Referenced_As_Out_Parameter;
5534 procedure Set_Refinement_Constituents (Id : E; V : L) is
5536 pragma Assert (Ekind (Id) = E_Abstract_State);
5538 end Set_Refinement_Constituents;
5540 procedure Set_Register_Exception_Call (Id : E; V : N) is
5542 pragma Assert (Ekind (Id) = E_Exception);
5544 end Set_Register_Exception_Call;
5546 procedure Set_Related_Array_Object (Id : E; V : E) is
5548 pragma Assert (Is_Array_Type (Id));
5550 end Set_Related_Array_Object;
5552 procedure Set_Related_Expression (Id : E; V : N) is
5554 pragma Assert (Ekind (Id) in Type_Kind
5555 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
5557 end Set_Related_Expression;
5559 procedure Set_Related_Instance (Id : E; V : E) is
5561 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
5563 end Set_Related_Instance;
5565 procedure Set_Related_Type (Id : E; V : E) is
5567 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5569 end Set_Related_Type;
5571 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5573 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
5575 end Set_Relative_Deadline_Variable;
5577 procedure Set_Renamed_Entity (Id : E; V : N) is
5580 end Set_Renamed_Entity;
5582 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5584 pragma Assert (Ekind (Id) = E_Package);
5585 Set_Flag231 (Id, V);
5586 end Set_Renamed_In_Spec;
5588 procedure Set_Renamed_Object (Id : E; V : N) is
5591 end Set_Renamed_Object;
5593 procedure Set_Renaming_Map (Id : E; V : U) is
5596 end Set_Renaming_Map;
5598 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5600 pragma Assert (Is_Overloadable (Id));
5601 Set_Flag213 (Id, V);
5602 end Set_Requires_Overriding;
5604 procedure Set_Return_Present (Id : E; V : B := True) is
5607 end Set_Return_Present;
5609 procedure Set_Return_Applies_To (Id : E; V : N) is
5612 end Set_Return_Applies_To;
5614 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5617 end Set_Returns_By_Ref;
5619 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5622 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5623 Set_Flag164 (Id, V);
5624 end Set_Reverse_Bit_Order;
5626 procedure Set_Reverse_Storage_Order (Id : E; V : B := True) is
5630 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5632 end Set_Reverse_Storage_Order;
5634 procedure Set_RM_Size (Id : E; V : U) is
5636 pragma Assert (Is_Type (Id));
5640 procedure Set_Scalar_Range (Id : E; V : N) is
5643 end Set_Scalar_Range;
5645 procedure Set_Scale_Value (Id : E; V : U) is
5648 end Set_Scale_Value;
5650 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5652 pragma Assert (not Is_Record_Type (Id));
5654 end Set_Scope_Depth_Value;
5656 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5658 Set_Flag167 (Id, V);
5659 end Set_Sec_Stack_Needed_For_Return;
5661 procedure Set_Shadow_Entities (Id : E; V : S) is
5663 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5665 end Set_Shadow_Entities;
5667 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5669 pragma Assert (Ekind (Id) = E_Variable);
5671 end Set_Shared_Var_Procs_Instance;
5673 procedure Set_Size_Check_Code (Id : E; V : N) is
5675 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5677 end Set_Size_Check_Code;
5679 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5681 Set_Flag177 (Id, V);
5682 end Set_Size_Depends_On_Discriminant;
5684 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5687 end Set_Size_Known_At_Compile_Time;
5689 procedure Set_Small_Value (Id : E; V : R) is
5691 pragma Assert (Is_Fixed_Point_Type (Id));
5692 Set_Ureal21 (Id, V);
5693 end Set_Small_Value;
5695 procedure Set_SPARK_Aux_Pragma (Id : E; V : N) is
5698 (Ekind_In (Id, E_Generic_Package, -- package variants
5703 end Set_SPARK_Aux_Pragma;
5705 procedure Set_SPARK_Aux_Pragma_Inherited (Id : E; V : B := True) is
5708 (Ekind_In (Id, E_Generic_Package, -- package variants
5712 Set_Flag266 (Id, V);
5713 end Set_SPARK_Aux_Pragma_Inherited;
5715 procedure Set_SPARK_Pragma (Id : E; V : N) is
5718 (Ekind_In (Id, E_Function, -- subprogram variants
5720 E_Generic_Procedure,
5724 Ekind_In (Id, E_Generic_Package, -- package variants
5729 end Set_SPARK_Pragma;
5731 procedure Set_SPARK_Pragma_Inherited (Id : E; V : B := True) is
5734 (Ekind_In (Id, E_Function, -- subprogram variants
5736 E_Generic_Procedure,
5740 Ekind_In (Id, E_Generic_Package, -- package variants
5744 Set_Flag265 (Id, V);
5745 end Set_SPARK_Pragma_Inherited;
5747 procedure Set_Spec_Entity (Id : E; V : E) is
5749 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5751 end Set_Spec_Entity;
5753 procedure Set_Static_Predicate (Id : E; V : S) is
5755 pragma Assert (Is_Discrete_Type (Id) and then Has_Predicates (Id));
5757 end Set_Static_Predicate;
5759 procedure Set_Status_Flag_Or_Transient_Decl (Id : E; V : E) is
5761 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5763 end Set_Status_Flag_Or_Transient_Decl;
5765 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5767 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5768 pragma Assert (Id = Base_Type (Id));
5770 end Set_Storage_Size_Variable;
5772 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5774 pragma Assert (Ekind (Id) = E_Package);
5776 end Set_Static_Elaboration_Desired;
5778 procedure Set_Static_Initialization (Id : E; V : N) is
5781 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5783 end Set_Static_Initialization;
5785 procedure Set_Stored_Constraint (Id : E; V : L) is
5787 pragma Assert (Nkind (Id) in N_Entity);
5788 Set_Elist23 (Id, V);
5789 end Set_Stored_Constraint;
5791 procedure Set_Stores_Attribute_Old_Prefix (Id : E; V : B := True) is
5793 pragma Assert (Ekind (Id) = E_Constant);
5794 Set_Flag270 (Id, V);
5795 end Set_Stores_Attribute_Old_Prefix;
5797 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5799 pragma Assert (Id = Base_Type (Id));
5800 Set_Flag145 (Id, V);
5801 end Set_Strict_Alignment;
5803 procedure Set_String_Literal_Length (Id : E; V : U) is
5805 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5807 end Set_String_Literal_Length;
5809 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5811 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5813 end Set_String_Literal_Low_Bound;
5815 procedure Set_Subprograms_For_Type (Id : E; V : E) is
5817 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
5819 end Set_Subprograms_For_Type;
5821 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5823 Set_Flag148 (Id, V);
5824 end Set_Suppress_Elaboration_Warnings;
5826 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
5828 pragma Assert (Is_Type (Id));
5829 Set_Flag105 (Id, V);
5830 end Set_Suppress_Initialization;
5832 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5834 Set_Flag165 (Id, V);
5835 end Set_Suppress_Style_Checks;
5837 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5839 Set_Flag217 (Id, V);
5840 end Set_Suppress_Value_Tracking_On_Call;
5842 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5844 pragma Assert (Ekind (Id) in Task_Kind);
5846 end Set_Task_Body_Procedure;
5848 procedure Set_Thunk_Entity (Id : E; V : E) is
5850 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5851 and then Is_Thunk (Id));
5853 end Set_Thunk_Entity;
5855 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5858 end Set_Treat_As_Volatile;
5860 procedure Set_Underlying_Full_View (Id : E; V : E) is
5862 pragma Assert (Ekind (Id) in Private_Kind);
5864 end Set_Underlying_Full_View;
5866 procedure Set_Underlying_Record_View (Id : E; V : E) is
5868 pragma Assert (Ekind (Id) = E_Record_Type);
5870 end Set_Underlying_Record_View;
5872 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5874 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5875 Set_Flag216 (Id, V);
5876 end Set_Universal_Aliasing;
5878 procedure Set_Unset_Reference (Id : E; V : N) is
5881 end Set_Unset_Reference;
5883 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5885 Set_Flag222 (Id, V);
5886 end Set_Used_As_Generic_Actual;
5888 procedure Set_Uses_Lock_Free (Id : E; V : B := True) is
5890 pragma Assert (Ekind (Id) = E_Protected_Type);
5891 Set_Flag188 (Id, V);
5892 end Set_Uses_Lock_Free;
5894 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5897 end Set_Uses_Sec_Stack;
5899 procedure Set_Warnings_Off (Id : E; V : B := True) is
5902 end Set_Warnings_Off;
5904 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
5906 Set_Flag236 (Id, V);
5907 end Set_Warnings_Off_Used;
5909 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
5911 Set_Flag237 (Id, V);
5912 end Set_Warnings_Off_Used_Unmodified;
5914 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
5916 Set_Flag238 (Id, V);
5917 end Set_Warnings_Off_Used_Unreferenced;
5919 procedure Set_Was_Hidden (Id : E; V : B := True) is
5921 Set_Flag196 (Id, V);
5924 procedure Set_Wrapped_Entity (Id : E; V : E) is
5926 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5927 and then Is_Primitive_Wrapper (Id));
5929 end Set_Wrapped_Entity;
5931 -----------------------------------
5932 -- Field Initialization Routines --
5933 -----------------------------------
5935 procedure Init_Alignment (Id : E) is
5937 Set_Uint14 (Id, Uint_0);
5940 procedure Init_Alignment (Id : E; V : Int) is
5942 Set_Uint14 (Id, UI_From_Int (V));
5945 procedure Init_Component_Bit_Offset (Id : E) is
5947 Set_Uint11 (Id, No_Uint);
5948 end Init_Component_Bit_Offset;
5950 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
5952 Set_Uint11 (Id, UI_From_Int (V));
5953 end Init_Component_Bit_Offset;
5955 procedure Init_Component_Size (Id : E) is
5957 Set_Uint22 (Id, Uint_0);
5958 end Init_Component_Size;
5960 procedure Init_Component_Size (Id : E; V : Int) is
5962 Set_Uint22 (Id, UI_From_Int (V));
5963 end Init_Component_Size;
5965 procedure Init_Digits_Value (Id : E) is
5967 Set_Uint17 (Id, Uint_0);
5968 end Init_Digits_Value;
5970 procedure Init_Digits_Value (Id : E; V : Int) is
5972 Set_Uint17 (Id, UI_From_Int (V));
5973 end Init_Digits_Value;
5975 procedure Init_Esize (Id : E) is
5977 Set_Uint12 (Id, Uint_0);
5980 procedure Init_Esize (Id : E; V : Int) is
5982 Set_Uint12 (Id, UI_From_Int (V));
5985 procedure Init_Normalized_First_Bit (Id : E) is
5987 Set_Uint8 (Id, No_Uint);
5988 end Init_Normalized_First_Bit;
5990 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
5992 Set_Uint8 (Id, UI_From_Int (V));
5993 end Init_Normalized_First_Bit;
5995 procedure Init_Normalized_Position (Id : E) is
5997 Set_Uint14 (Id, No_Uint);
5998 end Init_Normalized_Position;
6000 procedure Init_Normalized_Position (Id : E; V : Int) is
6002 Set_Uint14 (Id, UI_From_Int (V));
6003 end Init_Normalized_Position;
6005 procedure Init_Normalized_Position_Max (Id : E) is
6007 Set_Uint10 (Id, No_Uint);
6008 end Init_Normalized_Position_Max;
6010 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
6012 Set_Uint10 (Id, UI_From_Int (V));
6013 end Init_Normalized_Position_Max;
6015 procedure Init_RM_Size (Id : E) is
6017 Set_Uint13 (Id, Uint_0);
6020 procedure Init_RM_Size (Id : E; V : Int) is
6022 Set_Uint13 (Id, UI_From_Int (V));
6025 -----------------------------
6026 -- Init_Component_Location --
6027 -----------------------------
6029 procedure Init_Component_Location (Id : E) is
6031 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
6032 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
6033 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
6034 Set_Uint12 (Id, Uint_0); -- Esize
6035 Set_Uint14 (Id, No_Uint); -- Normalized_Position
6036 end Init_Component_Location;
6038 ----------------------------
6039 -- Init_Object_Size_Align --
6040 ----------------------------
6042 procedure Init_Object_Size_Align (Id : E) is
6044 Set_Uint12 (Id, Uint_0); -- Esize
6045 Set_Uint14 (Id, Uint_0); -- Alignment
6046 end Init_Object_Size_Align;
6052 procedure Init_Size (Id : E; V : Int) is
6054 pragma Assert (not Is_Object (Id));
6055 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
6056 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
6059 ---------------------
6060 -- Init_Size_Align --
6061 ---------------------
6063 procedure Init_Size_Align (Id : E) is
6065 pragma Assert (not Is_Object (Id));
6066 Set_Uint12 (Id, Uint_0); -- Esize
6067 Set_Uint13 (Id, Uint_0); -- RM_Size
6068 Set_Uint14 (Id, Uint_0); -- Alignment
6069 end Init_Size_Align;
6071 ----------------------------------------------
6072 -- Type Representation Attribute Predicates --
6073 ----------------------------------------------
6075 function Known_Alignment (E : Entity_Id) return B is
6077 return Uint14 (E) /= Uint_0
6078 and then Uint14 (E) /= No_Uint;
6079 end Known_Alignment;
6081 function Known_Component_Bit_Offset (E : Entity_Id) return B is
6083 return Uint11 (E) /= No_Uint;
6084 end Known_Component_Bit_Offset;
6086 function Known_Component_Size (E : Entity_Id) return B is
6088 return Uint22 (Base_Type (E)) /= Uint_0
6089 and then Uint22 (Base_Type (E)) /= No_Uint;
6090 end Known_Component_Size;
6092 function Known_Esize (E : Entity_Id) return B is
6094 return Uint12 (E) /= Uint_0
6095 and then Uint12 (E) /= No_Uint;
6098 function Known_Normalized_First_Bit (E : Entity_Id) return B is
6100 return Uint8 (E) /= No_Uint;
6101 end Known_Normalized_First_Bit;
6103 function Known_Normalized_Position (E : Entity_Id) return B is
6105 return Uint14 (E) /= No_Uint;
6106 end Known_Normalized_Position;
6108 function Known_Normalized_Position_Max (E : Entity_Id) return B is
6110 return Uint10 (E) /= No_Uint;
6111 end Known_Normalized_Position_Max;
6113 function Known_RM_Size (E : Entity_Id) return B is
6115 return Uint13 (E) /= No_Uint
6116 and then (Uint13 (E) /= Uint_0
6117 or else Is_Discrete_Type (E)
6118 or else Is_Fixed_Point_Type (E));
6121 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
6123 return Uint11 (E) /= No_Uint
6124 and then Uint11 (E) >= Uint_0;
6125 end Known_Static_Component_Bit_Offset;
6127 function Known_Static_Component_Size (E : Entity_Id) return B is
6129 return Uint22 (Base_Type (E)) > Uint_0;
6130 end Known_Static_Component_Size;
6132 function Known_Static_Esize (E : Entity_Id) return B is
6134 return Uint12 (E) > Uint_0
6135 and then not Is_Generic_Type (E);
6136 end Known_Static_Esize;
6138 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
6140 return Uint8 (E) /= No_Uint
6141 and then Uint8 (E) >= Uint_0;
6142 end Known_Static_Normalized_First_Bit;
6144 function Known_Static_Normalized_Position (E : Entity_Id) return B is
6146 return Uint14 (E) /= No_Uint
6147 and then Uint14 (E) >= Uint_0;
6148 end Known_Static_Normalized_Position;
6150 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
6152 return Uint10 (E) /= No_Uint
6153 and then Uint10 (E) >= Uint_0;
6154 end Known_Static_Normalized_Position_Max;
6156 function Known_Static_RM_Size (E : Entity_Id) return B is
6158 return (Uint13 (E) > Uint_0
6159 or else Is_Discrete_Type (E)
6160 or else Is_Fixed_Point_Type (E))
6161 and then not Is_Generic_Type (E);
6162 end Known_Static_RM_Size;
6164 function Unknown_Alignment (E : Entity_Id) return B is
6166 return Uint14 (E) = Uint_0
6167 or else Uint14 (E) = No_Uint;
6168 end Unknown_Alignment;
6170 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
6172 return Uint11 (E) = No_Uint;
6173 end Unknown_Component_Bit_Offset;
6175 function Unknown_Component_Size (E : Entity_Id) return B is
6177 return Uint22 (Base_Type (E)) = Uint_0
6179 Uint22 (Base_Type (E)) = No_Uint;
6180 end Unknown_Component_Size;
6182 function Unknown_Esize (E : Entity_Id) return B is
6184 return Uint12 (E) = No_Uint
6186 Uint12 (E) = Uint_0;
6189 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
6191 return Uint8 (E) = No_Uint;
6192 end Unknown_Normalized_First_Bit;
6194 function Unknown_Normalized_Position (E : Entity_Id) return B is
6196 return Uint14 (E) = No_Uint;
6197 end Unknown_Normalized_Position;
6199 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
6201 return Uint10 (E) = No_Uint;
6202 end Unknown_Normalized_Position_Max;
6204 function Unknown_RM_Size (E : Entity_Id) return B is
6206 return (Uint13 (E) = Uint_0
6207 and then not Is_Discrete_Type (E)
6208 and then not Is_Fixed_Point_Type (E))
6209 or else Uint13 (E) = No_Uint;
6210 end Unknown_RM_Size;
6212 --------------------
6213 -- Address_Clause --
6214 --------------------
6216 function Address_Clause (Id : E) return N is
6218 return Get_Attribute_Definition_Clause (Id, Attribute_Address);
6225 function Aft_Value (Id : E) return U is
6227 Delta_Val : Ureal := Delta_Value (Id);
6229 while Delta_Val < Ureal_Tenth loop
6230 Delta_Val := Delta_Val * Ureal_10;
6231 Result := Result + 1;
6234 return UI_From_Int (Result);
6237 ----------------------
6238 -- Alignment_Clause --
6239 ----------------------
6241 function Alignment_Clause (Id : E) return N is
6243 return Get_Attribute_Definition_Clause (Id, Attribute_Alignment);
6244 end Alignment_Clause;
6250 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
6252 if Last_Entity (V) = Empty then
6253 Set_First_Entity (Id => V, V => Id);
6255 Set_Next_Entity (Last_Entity (V), Id);
6258 Set_Next_Entity (Id, Empty);
6260 Set_Last_Entity (Id => V, V => Id);
6267 function Base_Type (Id : E) return E is
6269 if Is_Base_Type (Id) then
6272 pragma Assert (Is_Type (Id));
6277 -------------------------
6278 -- Component_Alignment --
6279 -------------------------
6281 -- Component Alignment is encoded using two flags, Flag128/129 as
6282 -- follows. Note that both flags False = Align_Default, so that the
6283 -- default initialization of flags to False initializes component
6284 -- alignment to the default value as required.
6286 -- Flag128 Flag129 Value
6287 -- ------- ------- -----
6288 -- False False Calign_Default
6289 -- False True Calign_Component_Size
6290 -- True False Calign_Component_Size_4
6291 -- True True Calign_Storage_Unit
6293 function Component_Alignment (Id : E) return C is
6294 BT : constant Node_Id := Base_Type (Id);
6297 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
6299 if Flag128 (BT) then
6300 if Flag129 (BT) then
6301 return Calign_Storage_Unit;
6303 return Calign_Component_Size_4;
6307 if Flag129 (BT) then
6308 return Calign_Component_Size;
6310 return Calign_Default;
6313 end Component_Alignment;
6315 ----------------------
6316 -- Declaration_Node --
6317 ----------------------
6319 function Declaration_Node (Id : E) return N is
6323 if Ekind (Id) = E_Incomplete_Type
6324 and then Present (Full_View (Id))
6326 P := Parent (Full_View (Id));
6332 if Nkind (P) /= N_Selected_Component
6333 and then Nkind (P) /= N_Expanded_Name
6335 not (Nkind (P) = N_Defining_Program_Unit_Name
6336 and then Is_Child_Unit (Id))
6343 end Declaration_Node;
6345 ---------------------
6346 -- Designated_Type --
6347 ---------------------
6349 function Designated_Type (Id : E) return E is
6353 Desig_Type := Directly_Designated_Type (Id);
6355 if Ekind (Desig_Type) = E_Incomplete_Type
6356 and then Present (Full_View (Desig_Type))
6358 return Full_View (Desig_Type);
6360 elsif Is_Class_Wide_Type (Desig_Type)
6361 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
6362 and then Present (Full_View (Etype (Desig_Type)))
6363 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
6365 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
6370 end Designated_Type;
6372 ----------------------
6373 -- Entry_Index_Type --
6374 ----------------------
6376 function Entry_Index_Type (Id : E) return N is
6378 pragma Assert (Ekind (Id) = E_Entry_Family);
6379 return Etype (Discrete_Subtype_Definition (Parent (Id)));
6380 end Entry_Index_Type;
6382 ---------------------
6383 -- First_Component --
6384 ---------------------
6386 function First_Component (Id : E) return E is
6391 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
6393 Comp_Id := First_Entity (Id);
6394 while Present (Comp_Id) loop
6395 exit when Ekind (Comp_Id) = E_Component;
6396 Comp_Id := Next_Entity (Comp_Id);
6400 end First_Component;
6402 -------------------------------------
6403 -- First_Component_Or_Discriminant --
6404 -------------------------------------
6406 function First_Component_Or_Discriminant (Id : E) return E is
6411 (Is_Record_Type (Id)
6412 or else Is_Incomplete_Or_Private_Type (Id)
6413 or else Has_Discriminants (Id));
6415 Comp_Id := First_Entity (Id);
6416 while Present (Comp_Id) loop
6417 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6418 Comp_Id := Next_Entity (Comp_Id);
6422 end First_Component_Or_Discriminant;
6428 function First_Formal (Id : E) return E is
6433 (Is_Overloadable (Id)
6434 or else Ekind_In (Id, E_Entry_Family,
6436 E_Subprogram_Type));
6438 if Ekind (Id) = E_Enumeration_Literal then
6442 Formal := First_Entity (Id);
6444 if Present (Formal) and then Is_Formal (Formal) then
6452 ------------------------------
6453 -- First_Formal_With_Extras --
6454 ------------------------------
6456 function First_Formal_With_Extras (Id : E) return E is
6461 (Is_Overloadable (Id)
6462 or else Ekind_In (Id, E_Entry_Family,
6464 E_Subprogram_Type));
6466 if Ekind (Id) = E_Enumeration_Literal then
6470 Formal := First_Entity (Id);
6472 if Present (Formal) and then Is_Formal (Formal) then
6475 return Extra_Formals (Id); -- Empty if no extra formals
6478 end First_Formal_With_Extras;
6480 -------------------------------------
6481 -- Get_Attribute_Definition_Clause --
6482 -------------------------------------
6484 function Get_Attribute_Definition_Clause
6486 Id : Attribute_Id) return Node_Id
6491 N := First_Rep_Item (E);
6492 while Present (N) loop
6493 if Nkind (N) = N_Attribute_Definition_Clause
6494 and then Get_Attribute_Id (Chars (N)) = Id
6503 end Get_Attribute_Definition_Clause;
6509 function Get_Full_View (T : Entity_Id) return Entity_Id is
6511 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
6512 return Full_View (T);
6514 elsif Is_Class_Wide_Type (T)
6515 and then Ekind (Root_Type (T)) = E_Incomplete_Type
6516 and then Present (Full_View (Root_Type (T)))
6518 return Class_Wide_Type (Full_View (Root_Type (T)));
6529 function Get_Pragma (E : Entity_Id; Id : Pragma_Id) return Node_Id is
6530 Is_CDG : constant Boolean :=
6531 Id = Pragma_Abstract_State or else
6532 Id = Pragma_Async_Readers or else
6533 Id = Pragma_Async_Writers or else
6534 Id = Pragma_Depends or else
6535 Id = Pragma_Effective_Reads or else
6536 Id = Pragma_Effective_Writes or else
6537 Id = Pragma_Global or else
6538 Id = Pragma_Initial_Condition or else
6539 Id = Pragma_Initializes or else
6540 Id = Pragma_Part_Of or else
6541 Id = Pragma_Refined_Depends or else
6542 Id = Pragma_Refined_Global or else
6543 Id = Pragma_Refined_State;
6544 Is_CTC : constant Boolean :=
6545 Id = Pragma_Contract_Cases or else
6546 Id = Pragma_Test_Case;
6547 Is_PPC : constant Boolean :=
6548 Id = Pragma_Precondition or else
6549 Id = Pragma_Postcondition or else
6550 Id = Pragma_Refined_Post;
6552 In_Contract : constant Boolean := Is_CDG or Is_CTC or Is_PPC;
6558 -- Handle pragmas that appear in N_Contract nodes. Those have to be
6559 -- extracted from their specialized list.
6562 Items := Contract (E);
6568 Item := Classifications (Items);
6571 Item := Contract_Test_Cases (Items);
6574 Item := Pre_Post_Conditions (Items);
6580 Item := First_Rep_Item (E);
6583 while Present (Item) loop
6584 if Nkind (Item) = N_Pragma
6585 and then Get_Pragma_Id (Pragma_Name (Item)) = Id
6589 -- All nodes in N_Contract are chained using Next_Pragma
6591 elsif In_Contract then
6592 Item := Next_Pragma (Item);
6597 Next_Rep_Item (Item);
6604 --------------------------------------
6605 -- Get_Record_Representation_Clause --
6606 --------------------------------------
6608 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
6612 N := First_Rep_Item (E);
6613 while Present (N) loop
6614 if Nkind (N) = N_Record_Representation_Clause then
6622 end Get_Record_Representation_Clause;
6624 ------------------------
6625 -- Has_Attach_Handler --
6626 ------------------------
6628 function Has_Attach_Handler (Id : E) return B is
6632 pragma Assert (Is_Protected_Type (Id));
6634 Ritem := First_Rep_Item (Id);
6635 while Present (Ritem) loop
6636 if Nkind (Ritem) = N_Pragma
6637 and then Pragma_Name (Ritem) = Name_Attach_Handler
6641 Next_Rep_Item (Ritem);
6646 end Has_Attach_Handler;
6652 function Has_Entries (Id : E) return B is
6656 pragma Assert (Is_Concurrent_Type (Id));
6658 Ent := First_Entity (Id);
6659 while Present (Ent) loop
6660 if Is_Entry (Ent) then
6664 Ent := Next_Entity (Ent);
6670 ----------------------------
6671 -- Has_Foreign_Convention --
6672 ----------------------------
6674 function Has_Foreign_Convention (Id : E) return B is
6676 -- While regular Intrinsics such as the Standard operators fit in the
6677 -- "Ada" convention, those with an Interface_Name materialize GCC
6678 -- builtin imports for which Ada special treatments shouldn't apply.
6680 return Convention (Id) in Foreign_Convention
6681 or else (Convention (Id) = Convention_Intrinsic
6682 and then Present (Interface_Name (Id)));
6683 end Has_Foreign_Convention;
6685 ---------------------------
6686 -- Has_Interrupt_Handler --
6687 ---------------------------
6689 function Has_Interrupt_Handler (Id : E) return B is
6693 pragma Assert (Is_Protected_Type (Id));
6695 Ritem := First_Rep_Item (Id);
6696 while Present (Ritem) loop
6697 if Nkind (Ritem) = N_Pragma
6698 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6702 Next_Rep_Item (Ritem);
6707 end Has_Interrupt_Handler;
6709 -----------------------------
6710 -- Has_Non_Null_Refinement --
6711 -----------------------------
6713 function Has_Non_Null_Refinement (Id : E) return B is
6715 -- "Refinement" is a concept applicable only to abstract states
6717 pragma Assert (Ekind (Id) = E_Abstract_State);
6719 if Has_Visible_Refinement (Id) then
6720 pragma Assert (Present (Refinement_Constituents (Id)));
6722 -- For a refinement to be non-null, the first constituent must be
6723 -- anything other than null.
6726 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) /= N_Null;
6730 end Has_Non_Null_Refinement;
6732 -----------------------------
6733 -- Has_Null_Abstract_State --
6734 -----------------------------
6736 function Has_Null_Abstract_State (Id : E) return B is
6738 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
6741 Present (Abstract_States (Id))
6742 and then Is_Null_State (Node (First_Elmt (Abstract_States (Id))));
6743 end Has_Null_Abstract_State;
6745 -------------------------
6746 -- Has_Null_Refinement --
6747 -------------------------
6749 function Has_Null_Refinement (Id : E) return B is
6751 -- "Refinement" is a concept applicable only to abstract states
6753 pragma Assert (Ekind (Id) = E_Abstract_State);
6755 if Has_Visible_Refinement (Id) then
6756 pragma Assert (Present (Refinement_Constituents (Id)));
6758 -- For a refinement to be null, the state's sole constituent must be
6762 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) = N_Null;
6766 end Has_Null_Refinement;
6768 --------------------
6769 -- Has_Unmodified --
6770 --------------------
6772 function Has_Unmodified (E : Entity_Id) return Boolean is
6774 if Has_Pragma_Unmodified (E) then
6776 elsif Warnings_Off (E) then
6777 Set_Warnings_Off_Used_Unmodified (E);
6784 ---------------------
6785 -- Has_Unreferenced --
6786 ---------------------
6788 function Has_Unreferenced (E : Entity_Id) return Boolean is
6790 if Has_Pragma_Unreferenced (E) then
6792 elsif Warnings_Off (E) then
6793 Set_Warnings_Off_Used_Unreferenced (E);
6798 end Has_Unreferenced;
6800 ----------------------
6801 -- Has_Warnings_Off --
6802 ----------------------
6804 function Has_Warnings_Off (E : Entity_Id) return Boolean is
6806 if Warnings_Off (E) then
6807 Set_Warnings_Off_Used (E);
6812 end Has_Warnings_Off;
6814 ------------------------------
6815 -- Implementation_Base_Type --
6816 ------------------------------
6818 function Implementation_Base_Type (Id : E) return E is
6823 Bastyp := Base_Type (Id);
6825 if Is_Incomplete_Or_Private_Type (Bastyp) then
6826 Imptyp := Underlying_Type (Bastyp);
6828 -- If we have an implementation type, then just return it,
6829 -- otherwise we return the Base_Type anyway. This can only
6830 -- happen in error situations and should avoid some error bombs.
6832 if Present (Imptyp) then
6833 return Base_Type (Imptyp);
6841 end Implementation_Base_Type;
6843 -------------------------
6844 -- Invariant_Procedure --
6845 -------------------------
6847 function Invariant_Procedure (Id : E) return E is
6851 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
6853 if No (Subprograms_For_Type (Id)) then
6857 S := Subprograms_For_Type (Id);
6858 while Present (S) loop
6859 if Is_Invariant_Procedure (S) then
6862 S := Subprograms_For_Type (S);
6868 end Invariant_Procedure;
6874 -- Global flag table allowing rapid computation of this function
6876 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
6877 (E_Enumeration_Subtype |
6879 E_Signed_Integer_Subtype |
6880 E_Modular_Integer_Subtype |
6881 E_Floating_Point_Subtype |
6882 E_Ordinary_Fixed_Point_Subtype |
6883 E_Decimal_Fixed_Point_Subtype |
6888 E_Record_Subtype_With_Private |
6889 E_Limited_Private_Subtype |
6891 E_Protected_Subtype |
6893 E_String_Literal_Subtype |
6894 E_Class_Wide_Subtype => False,
6897 function Is_Base_Type (Id : E) return Boolean is
6899 return Entity_Is_Base_Type (Ekind (Id));
6902 ---------------------
6903 -- Is_Boolean_Type --
6904 ---------------------
6906 function Is_Boolean_Type (Id : E) return B is
6908 return Root_Type (Id) = Standard_Boolean;
6909 end Is_Boolean_Type;
6911 ------------------------
6912 -- Is_Constant_Object --
6913 ------------------------
6915 function Is_Constant_Object (Id : E) return B is
6916 K : constant Entity_Kind := Ekind (Id);
6919 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
6920 end Is_Constant_Object;
6922 --------------------
6923 -- Is_Discriminal --
6924 --------------------
6926 function Is_Discriminal (Id : E) return B is
6928 return (Ekind_In (Id, E_Constant, E_In_Parameter)
6929 and then Present (Discriminal_Link (Id)));
6932 ----------------------
6933 -- Is_Dynamic_Scope --
6934 ----------------------
6936 function Is_Dynamic_Scope (Id : E) return B is
6939 Ekind (Id) = E_Block
6941 Ekind (Id) = E_Function
6943 Ekind (Id) = E_Procedure
6945 Ekind (Id) = E_Subprogram_Body
6947 Ekind (Id) = E_Task_Type
6949 (Ekind (Id) = E_Limited_Private_Type
6950 and then Present (Full_View (Id))
6951 and then Ekind (Full_View (Id)) = E_Task_Type)
6953 Ekind (Id) = E_Entry
6955 Ekind (Id) = E_Entry_Family
6957 Ekind (Id) = E_Return_Statement;
6958 end Is_Dynamic_Scope;
6960 --------------------
6961 -- Is_Entity_Name --
6962 --------------------
6964 function Is_Entity_Name (N : Node_Id) return Boolean is
6965 Kind : constant Node_Kind := Nkind (N);
6968 -- Identifiers, operator symbols, expanded names are entity names
6970 return Kind = N_Identifier
6971 or else Kind = N_Operator_Symbol
6972 or else Kind = N_Expanded_Name
6974 -- Attribute references are entity names if they refer to an entity.
6975 -- Note that we don't do this by testing for the presence of the
6976 -- Entity field in the N_Attribute_Reference node, since it may not
6977 -- have been set yet.
6979 or else (Kind = N_Attribute_Reference
6980 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
6983 -----------------------
6984 -- Is_External_State --
6985 -----------------------
6987 function Is_External_State (Id : E) return B is
6990 Ekind (Id) = E_Abstract_State and then Has_Option (Id, Name_External);
6991 end Is_External_State;
6997 function Is_Finalizer (Id : E) return B is
6999 return Ekind (Id) = E_Procedure and then Chars (Id) = Name_uFinalizer;
7002 ---------------------
7003 -- Is_Ghost_Entity --
7004 ---------------------
7006 -- Note: coding below allows for ghost variables. They are not currently
7007 -- implemented, so we will always get False for variables, but that is
7008 -- expected to change in the future.
7010 function Is_Ghost_Entity (Id : E) return B is
7012 if Present (Id) and then Ekind (Id) = E_Variable then
7013 return Convention (Id) = Convention_Ghost;
7015 return Is_Ghost_Subprogram (Id);
7017 end Is_Ghost_Entity;
7019 -------------------------
7020 -- Is_Ghost_Subprogram --
7021 -------------------------
7023 function Is_Ghost_Subprogram (Id : E) return B is
7025 if Present (Id) and then Ekind_In (Id, E_Function, E_Procedure) then
7026 return Convention (Id) = Convention_Ghost;
7030 end Is_Ghost_Subprogram;
7036 function Is_Null_State (Id : E) return B is
7039 Ekind (Id) = E_Abstract_State and then Nkind (Parent (Id)) = N_Null;
7042 ---------------------
7043 -- Is_Packed_Array --
7044 ---------------------
7046 function Is_Packed_Array (Id : E) return B is
7048 return Is_Array_Type (Id) and then Is_Packed (Id);
7049 end Is_Packed_Array;
7051 -----------------------------------
7052 -- Is_Package_Or_Generic_Package --
7053 -----------------------------------
7055 function Is_Package_Or_Generic_Package (Id : E) return B is
7057 return Ekind_In (Id, E_Generic_Package, E_Package);
7058 end Is_Package_Or_Generic_Package;
7064 function Is_Prival (Id : E) return B is
7066 return (Ekind_In (Id, E_Constant, E_Variable)
7067 and then Present (Prival_Link (Id)));
7070 ----------------------------
7071 -- Is_Protected_Component --
7072 ----------------------------
7074 function Is_Protected_Component (Id : E) return B is
7076 return Ekind (Id) = E_Component and then Is_Protected_Type (Scope (Id));
7077 end Is_Protected_Component;
7079 ----------------------------
7080 -- Is_Protected_Interface --
7081 ----------------------------
7083 function Is_Protected_Interface (Id : E) return B is
7084 Typ : constant Entity_Id := Base_Type (Id);
7086 if not Is_Interface (Typ) then
7088 elsif Is_Class_Wide_Type (Typ) then
7089 return Is_Protected_Interface (Etype (Typ));
7091 return Protected_Present (Type_Definition (Parent (Typ)));
7093 end Is_Protected_Interface;
7095 ------------------------------
7096 -- Is_Protected_Record_Type --
7097 ------------------------------
7099 function Is_Protected_Record_Type (Id : E) return B is
7102 Is_Concurrent_Record_Type (Id)
7103 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
7104 end Is_Protected_Record_Type;
7106 --------------------------------
7107 -- Is_Standard_Character_Type --
7108 --------------------------------
7110 function Is_Standard_Character_Type (Id : E) return B is
7112 if Is_Type (Id) then
7114 R : constant Entity_Id := Root_Type (Id);
7117 R = Standard_Character
7119 R = Standard_Wide_Character
7121 R = Standard_Wide_Wide_Character;
7127 end Is_Standard_Character_Type;
7129 --------------------
7130 -- Is_String_Type --
7131 --------------------
7133 function Is_String_Type (Id : E) return B is
7135 return Ekind (Id) in String_Kind
7136 or else (Is_Array_Type (Id)
7137 and then Id /= Any_Composite
7138 and then Number_Dimensions (Id) = 1
7139 and then Is_Character_Type (Component_Type (Id)));
7142 -------------------------------
7143 -- Is_Synchronized_Interface --
7144 -------------------------------
7146 function Is_Synchronized_Interface (Id : E) return B is
7147 Typ : constant Entity_Id := Base_Type (Id);
7150 if not Is_Interface (Typ) then
7153 elsif Is_Class_Wide_Type (Typ) then
7154 return Is_Synchronized_Interface (Etype (Typ));
7157 return Protected_Present (Type_Definition (Parent (Typ)))
7158 or else Synchronized_Present (Type_Definition (Parent (Typ)))
7159 or else Task_Present (Type_Definition (Parent (Typ)));
7161 end Is_Synchronized_Interface;
7163 -----------------------
7164 -- Is_Task_Interface --
7165 -----------------------
7167 function Is_Task_Interface (Id : E) return B is
7168 Typ : constant Entity_Id := Base_Type (Id);
7170 if not Is_Interface (Typ) then
7172 elsif Is_Class_Wide_Type (Typ) then
7173 return Is_Task_Interface (Etype (Typ));
7175 return Task_Present (Type_Definition (Parent (Typ)));
7177 end Is_Task_Interface;
7179 -------------------------
7180 -- Is_Task_Record_Type --
7181 -------------------------
7183 function Is_Task_Record_Type (Id : E) return B is
7186 Is_Concurrent_Record_Type (Id)
7187 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
7188 end Is_Task_Record_Type;
7190 ------------------------
7191 -- Is_Wrapper_Package --
7192 ------------------------
7194 function Is_Wrapper_Package (Id : E) return B is
7196 return (Ekind (Id) = E_Package and then Present (Related_Instance (Id)));
7197 end Is_Wrapper_Package;
7203 function Last_Formal (Id : E) return E is
7208 (Is_Overloadable (Id)
7209 or else Ekind_In (Id, E_Entry_Family,
7211 E_Subprogram_Type));
7213 if Ekind (Id) = E_Enumeration_Literal then
7217 Formal := First_Formal (Id);
7219 if Present (Formal) then
7220 while Present (Next_Formal (Formal)) loop
7221 Formal := Next_Formal (Formal);
7229 function Model_Emin_Value (Id : E) return Uint is
7231 return Machine_Emin_Value (Id);
7232 end Model_Emin_Value;
7234 -------------------------
7235 -- Model_Epsilon_Value --
7236 -------------------------
7238 function Model_Epsilon_Value (Id : E) return Ureal is
7239 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7241 return Radix ** (1 - Model_Mantissa_Value (Id));
7242 end Model_Epsilon_Value;
7244 --------------------------
7245 -- Model_Mantissa_Value --
7246 --------------------------
7248 function Model_Mantissa_Value (Id : E) return Uint is
7250 return Machine_Mantissa_Value (Id);
7251 end Model_Mantissa_Value;
7253 -----------------------
7254 -- Model_Small_Value --
7255 -----------------------
7257 function Model_Small_Value (Id : E) return Ureal is
7258 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7260 return Radix ** (Model_Emin_Value (Id) - 1);
7261 end Model_Small_Value;
7263 ------------------------
7264 -- Machine_Emax_Value --
7265 ------------------------
7267 function Machine_Emax_Value (Id : E) return Uint is
7268 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7271 case Float_Rep (Id) is
7274 when 1 .. 6 => return Uint_128;
7275 when 7 .. 15 => return 2**10;
7276 when 16 .. 33 => return 2**14;
7277 when others => return No_Uint;
7282 when 1 .. 9 => return 2**7 - 1;
7283 when 10 .. 15 => return 2**10 - 1;
7284 when others => return No_Uint;
7288 return Uint_2 ** Uint_7 - Uint_1;
7290 end Machine_Emax_Value;
7292 ------------------------
7293 -- Machine_Emin_Value --
7294 ------------------------
7296 function Machine_Emin_Value (Id : E) return Uint is
7298 case Float_Rep (Id) is
7299 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
7300 when VAX_Native => return -Machine_Emax_Value (Id);
7301 when AAMP => return -Machine_Emax_Value (Id);
7303 end Machine_Emin_Value;
7305 ----------------------------
7306 -- Machine_Mantissa_Value --
7307 ----------------------------
7309 function Machine_Mantissa_Value (Id : E) return Uint is
7310 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7313 case Float_Rep (Id) is
7316 when 1 .. 6 => return Uint_24;
7317 when 7 .. 15 => return UI_From_Int (53);
7318 when 16 .. 18 => return Uint_64;
7319 when 19 .. 33 => return UI_From_Int (113);
7320 when others => return No_Uint;
7325 when 1 .. 6 => return Uint_24;
7326 when 7 .. 9 => return UI_From_Int (56);
7327 when 10 .. 15 => return UI_From_Int (53);
7328 when others => return No_Uint;
7333 when 1 .. 6 => return Uint_24;
7334 when 7 .. 9 => return UI_From_Int (40);
7335 when others => return No_Uint;
7338 end Machine_Mantissa_Value;
7340 -------------------------
7341 -- Machine_Radix_Value --
7342 -------------------------
7344 function Machine_Radix_Value (Id : E) return U is
7346 case Float_Rep (Id) is
7347 when IEEE_Binary | VAX_Native | AAMP =>
7350 end Machine_Radix_Value;
7352 --------------------
7353 -- Next_Component --
7354 --------------------
7356 function Next_Component (Id : E) return E is
7360 Comp_Id := Next_Entity (Id);
7361 while Present (Comp_Id) loop
7362 exit when Ekind (Comp_Id) = E_Component;
7363 Comp_Id := Next_Entity (Comp_Id);
7369 ------------------------------------
7370 -- Next_Component_Or_Discriminant --
7371 ------------------------------------
7373 function Next_Component_Or_Discriminant (Id : E) return E is
7377 Comp_Id := Next_Entity (Id);
7378 while Present (Comp_Id) loop
7379 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
7380 Comp_Id := Next_Entity (Comp_Id);
7384 end Next_Component_Or_Discriminant;
7386 -----------------------
7387 -- Next_Discriminant --
7388 -----------------------
7390 -- This function actually implements both Next_Discriminant and
7391 -- Next_Stored_Discriminant by making sure that the Discriminant
7392 -- returned is of the same variety as Id.
7394 function Next_Discriminant (Id : E) return E is
7396 -- Derived Tagged types with private extensions look like this...
7398 -- E_Discriminant d1
7399 -- E_Discriminant d2
7401 -- E_Discriminant d1
7402 -- E_Discriminant d2
7405 -- so it is critical not to go past the leading discriminants
7410 pragma Assert (Ekind (Id) = E_Discriminant);
7413 D := Next_Entity (D);
7415 or else (Ekind (D) /= E_Discriminant
7416 and then not Is_Itype (D))
7421 exit when Ekind (D) = E_Discriminant
7422 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
7426 end Next_Discriminant;
7432 function Next_Formal (Id : E) return E is
7436 -- Follow the chain of declared entities as long as the kind of the
7437 -- entity corresponds to a formal parameter. Skip internal entities
7438 -- that may have been created for implicit subtypes, in the process
7439 -- of analyzing default expressions.
7443 P := Next_Entity (P);
7445 if No (P) or else Is_Formal (P) then
7447 elsif not Is_Internal (P) then
7453 -----------------------------
7454 -- Next_Formal_With_Extras --
7455 -----------------------------
7457 function Next_Formal_With_Extras (Id : E) return E is
7459 if Present (Extra_Formal (Id)) then
7460 return Extra_Formal (Id);
7462 return Next_Formal (Id);
7464 end Next_Formal_With_Extras;
7470 function Next_Index (Id : Node_Id) return Node_Id is
7479 function Next_Literal (Id : E) return E is
7481 pragma Assert (Nkind (Id) in N_Entity);
7485 ------------------------------
7486 -- Next_Stored_Discriminant --
7487 ------------------------------
7489 function Next_Stored_Discriminant (Id : E) return E is
7491 -- See comment in Next_Discriminant
7493 return Next_Discriminant (Id);
7494 end Next_Stored_Discriminant;
7496 -----------------------
7497 -- Number_Dimensions --
7498 -----------------------
7500 function Number_Dimensions (Id : E) return Pos is
7505 if Ekind (Id) in String_Kind then
7510 T := First_Index (Id);
7511 while Present (T) loop
7518 end Number_Dimensions;
7520 --------------------
7521 -- Number_Entries --
7522 --------------------
7524 function Number_Entries (Id : E) return Nat is
7529 pragma Assert (Is_Concurrent_Type (Id));
7532 Ent := First_Entity (Id);
7533 while Present (Ent) loop
7534 if Is_Entry (Ent) then
7538 Ent := Next_Entity (Ent);
7544 --------------------
7545 -- Number_Formals --
7546 --------------------
7548 function Number_Formals (Id : E) return Pos is
7554 Formal := First_Formal (Id);
7555 while Present (Formal) loop
7557 Formal := Next_Formal (Formal);
7563 --------------------
7564 -- Parameter_Mode --
7565 --------------------
7567 function Parameter_Mode (Id : E) return Formal_Kind is
7572 ------------------------
7573 -- Predicate_Function --
7574 ------------------------
7576 function Predicate_Function (Id : E) return E is
7581 pragma Assert (Is_Type (Id));
7583 -- If type is private and has a completion, predicate may be defined
7584 -- on the full view.
7586 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7587 T := Full_View (Id);
7592 if No (Subprograms_For_Type (T)) then
7596 S := Subprograms_For_Type (T);
7597 while Present (S) loop
7598 if Is_Predicate_Function (S) then
7601 S := Subprograms_For_Type (S);
7607 end Predicate_Function;
7609 --------------------------
7610 -- Predicate_Function_M --
7611 --------------------------
7613 function Predicate_Function_M (Id : E) return E is
7618 pragma Assert (Is_Type (Id));
7620 -- If type is private and has a completion, predicate may be defined
7621 -- on the full view.
7623 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7624 T := Full_View (Id);
7629 if No (Subprograms_For_Type (T)) then
7633 S := Subprograms_For_Type (T);
7634 while Present (S) loop
7635 if Is_Predicate_Function_M (S) then
7638 S := Subprograms_For_Type (S);
7644 end Predicate_Function_M;
7646 -------------------------
7647 -- Present_In_Rep_Item --
7648 -------------------------
7650 function Present_In_Rep_Item (E : Entity_Id; N : Node_Id) return Boolean is
7654 Ritem := First_Rep_Item (E);
7656 while Present (Ritem) loop
7661 Next_Rep_Item (Ritem);
7665 end Present_In_Rep_Item;
7667 --------------------------
7668 -- Primitive_Operations --
7669 --------------------------
7671 function Primitive_Operations (Id : E) return L is
7673 if Is_Concurrent_Type (Id) then
7674 if Present (Corresponding_Record_Type (Id)) then
7675 return Direct_Primitive_Operations
7676 (Corresponding_Record_Type (Id));
7678 -- If expansion is disabled the corresponding record type is absent,
7679 -- but if the type has ancestors it may have primitive operations.
7681 elsif Is_Tagged_Type (Id) then
7682 return Direct_Primitive_Operations (Id);
7688 return Direct_Primitive_Operations (Id);
7690 end Primitive_Operations;
7692 ---------------------
7693 -- Record_Rep_Item --
7694 ---------------------
7696 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
7698 Set_Next_Rep_Item (N, First_Rep_Item (E));
7699 Set_First_Rep_Item (E, N);
7700 end Record_Rep_Item;
7706 function Root_Type (Id : E) return E is
7710 pragma Assert (Nkind (Id) in N_Entity);
7712 T := Base_Type (Id);
7714 if Ekind (T) = E_Class_Wide_Type then
7726 -- Following test catches some error cases resulting from
7729 elsif No (Etyp) then
7730 Check_Error_Detected;
7733 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
7736 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
7742 -- Return if there is a circularity in the inheritance chain. This
7743 -- happens in some error situations and we do not want to get
7744 -- stuck in this loop.
7746 if T = Base_Type (Id) then
7753 ---------------------
7754 -- Safe_Emax_Value --
7755 ---------------------
7757 function Safe_Emax_Value (Id : E) return Uint is
7759 return Machine_Emax_Value (Id);
7760 end Safe_Emax_Value;
7762 ----------------------
7763 -- Safe_First_Value --
7764 ----------------------
7766 function Safe_First_Value (Id : E) return Ureal is
7768 return -Safe_Last_Value (Id);
7769 end Safe_First_Value;
7771 ---------------------
7772 -- Safe_Last_Value --
7773 ---------------------
7775 function Safe_Last_Value (Id : E) return Ureal is
7776 Radix : constant Uint := Machine_Radix_Value (Id);
7777 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
7778 Emax : constant Uint := Safe_Emax_Value (Id);
7779 Significand : constant Uint := Radix ** Mantissa - 1;
7780 Exponent : constant Uint := Emax - Mantissa;
7786 (Num => Significand * 2 ** (Exponent mod 4),
7787 Den => -Exponent / 4,
7793 (Num => Significand,
7797 end Safe_Last_Value;
7803 function Scope_Depth (Id : E) return Uint is
7808 while Is_Record_Type (Scop) loop
7809 Scop := Scope (Scop);
7812 return Scope_Depth_Value (Scop);
7815 ---------------------
7816 -- Scope_Depth_Set --
7817 ---------------------
7819 function Scope_Depth_Set (Id : E) return B is
7821 return not Is_Record_Type (Id)
7822 and then Field22 (Id) /= Union_Id (Empty);
7823 end Scope_Depth_Set;
7825 -----------------------------
7826 -- Set_Component_Alignment --
7827 -----------------------------
7829 -- Component Alignment is encoded using two flags, Flag128/129 as
7830 -- follows. Note that both flags False = Align_Default, so that the
7831 -- default initialization of flags to False initializes component
7832 -- alignment to the default value as required.
7834 -- Flag128 Flag129 Value
7835 -- ------- ------- -----
7836 -- False False Calign_Default
7837 -- False True Calign_Component_Size
7838 -- True False Calign_Component_Size_4
7839 -- True True Calign_Storage_Unit
7841 procedure Set_Component_Alignment (Id : E; V : C) is
7843 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
7844 and then Is_Base_Type (Id));
7847 when Calign_Default =>
7848 Set_Flag128 (Id, False);
7849 Set_Flag129 (Id, False);
7851 when Calign_Component_Size =>
7852 Set_Flag128 (Id, False);
7853 Set_Flag129 (Id, True);
7855 when Calign_Component_Size_4 =>
7856 Set_Flag128 (Id, True);
7857 Set_Flag129 (Id, False);
7859 when Calign_Storage_Unit =>
7860 Set_Flag128 (Id, True);
7861 Set_Flag129 (Id, True);
7863 end Set_Component_Alignment;
7865 -----------------------------
7866 -- Set_Invariant_Procedure --
7867 -----------------------------
7869 procedure Set_Invariant_Procedure (Id : E; V : E) is
7873 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7875 S := Subprograms_For_Type (Id);
7876 Set_Subprograms_For_Type (Id, V);
7877 Set_Subprograms_For_Type (V, S);
7879 -- Check for duplicate entry
7881 while Present (S) loop
7882 if Is_Invariant_Procedure (S) then
7883 raise Program_Error;
7885 S := Subprograms_For_Type (S);
7888 end Set_Invariant_Procedure;
7890 ----------------------------
7891 -- Set_Predicate_Function --
7892 ----------------------------
7894 procedure Set_Predicate_Function (Id : E; V : E) is
7898 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7900 S := Subprograms_For_Type (Id);
7901 Set_Subprograms_For_Type (Id, V);
7902 Set_Subprograms_For_Type (V, S);
7904 while Present (S) loop
7905 if Is_Predicate_Function (S) then
7906 raise Program_Error;
7908 S := Subprograms_For_Type (S);
7911 end Set_Predicate_Function;
7913 ------------------------------
7914 -- Set_Predicate_Function_M --
7915 ------------------------------
7917 procedure Set_Predicate_Function_M (Id : E; V : E) is
7921 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7923 S := Subprograms_For_Type (Id);
7924 Set_Subprograms_For_Type (Id, V);
7925 Set_Subprograms_For_Type (V, S);
7927 -- Check for duplicates
7929 while Present (S) loop
7930 if Is_Predicate_Function_M (S) then
7931 raise Program_Error;
7933 S := Subprograms_For_Type (S);
7936 end Set_Predicate_Function_M;
7942 function Size_Clause (Id : E) return N is
7944 return Get_Attribute_Definition_Clause (Id, Attribute_Size);
7947 ------------------------
7948 -- Stream_Size_Clause --
7949 ------------------------
7951 function Stream_Size_Clause (Id : E) return N is
7953 return Get_Attribute_Definition_Clause (Id, Attribute_Stream_Size);
7954 end Stream_Size_Clause;
7960 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
7966 Kind := E_Access_Subtype;
7970 Kind := E_Array_Subtype;
7972 when E_Class_Wide_Type |
7973 E_Class_Wide_Subtype =>
7974 Kind := E_Class_Wide_Subtype;
7976 when E_Decimal_Fixed_Point_Type |
7977 E_Decimal_Fixed_Point_Subtype =>
7978 Kind := E_Decimal_Fixed_Point_Subtype;
7980 when E_Ordinary_Fixed_Point_Type |
7981 E_Ordinary_Fixed_Point_Subtype =>
7982 Kind := E_Ordinary_Fixed_Point_Subtype;
7984 when E_Private_Type |
7985 E_Private_Subtype =>
7986 Kind := E_Private_Subtype;
7988 when E_Limited_Private_Type |
7989 E_Limited_Private_Subtype =>
7990 Kind := E_Limited_Private_Subtype;
7992 when E_Record_Type_With_Private |
7993 E_Record_Subtype_With_Private =>
7994 Kind := E_Record_Subtype_With_Private;
7996 when E_Record_Type |
7998 Kind := E_Record_Subtype;
8000 when E_String_Type |
8002 Kind := E_String_Subtype;
8004 when Enumeration_Kind =>
8005 Kind := E_Enumeration_Subtype;
8008 Kind := E_Floating_Point_Subtype;
8010 when Signed_Integer_Kind =>
8011 Kind := E_Signed_Integer_Subtype;
8013 when Modular_Integer_Kind =>
8014 Kind := E_Modular_Integer_Subtype;
8016 when Protected_Kind =>
8017 Kind := E_Protected_Subtype;
8020 Kind := E_Task_Subtype;
8024 raise Program_Error;
8030 ---------------------
8031 -- Type_High_Bound --
8032 ---------------------
8034 function Type_High_Bound (Id : E) return Node_Id is
8035 Rng : constant Node_Id := Scalar_Range (Id);
8037 if Nkind (Rng) = N_Subtype_Indication then
8038 return High_Bound (Range_Expression (Constraint (Rng)));
8040 return High_Bound (Rng);
8042 end Type_High_Bound;
8044 --------------------
8045 -- Type_Low_Bound --
8046 --------------------
8048 function Type_Low_Bound (Id : E) return Node_Id is
8049 Rng : constant Node_Id := Scalar_Range (Id);
8051 if Nkind (Rng) = N_Subtype_Indication then
8052 return Low_Bound (Range_Expression (Constraint (Rng)));
8054 return Low_Bound (Rng);
8058 ---------------------
8059 -- Underlying_Type --
8060 ---------------------
8062 function Underlying_Type (Id : E) return E is
8064 -- For record_with_private the underlying type is always the direct
8065 -- full view. Never try to take the full view of the parent it
8066 -- doesn't make sense.
8068 if Ekind (Id) = E_Record_Type_With_Private then
8069 return Full_View (Id);
8071 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
8073 -- If we have an incomplete or private type with a full view,
8074 -- then we return the Underlying_Type of this full view
8076 if Present (Full_View (Id)) then
8077 if Id = Full_View (Id) then
8079 -- Previous error in declaration
8084 return Underlying_Type (Full_View (Id));
8087 -- If we have an incomplete entity that comes from the limited
8088 -- view then we return the Underlying_Type of its non-limited
8091 elsif From_Limited_With (Id)
8092 and then Present (Non_Limited_View (Id))
8094 return Underlying_Type (Non_Limited_View (Id));
8096 -- Otherwise check for the case where we have a derived type or
8097 -- subtype, and if so get the Underlying_Type of the parent type.
8099 elsif Etype (Id) /= Id then
8100 return Underlying_Type (Etype (Id));
8102 -- Otherwise we have an incomplete or private type that has
8103 -- no full view, which means that we have not encountered the
8104 -- completion, so return Empty to indicate the underlying type
8105 -- is not yet known.
8111 -- For non-incomplete, non-private types, return the type itself
8112 -- Also for entities that are not types at all return the entity
8118 end Underlying_Type;
8124 function Vax_Float (Id : E) return B is
8126 return Is_Floating_Point_Type (Id) and then Float_Rep (Id) = VAX_Native;
8129 ------------------------
8130 -- Write_Entity_Flags --
8131 ------------------------
8133 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
8135 procedure W (Flag_Name : String; Flag : Boolean);
8136 -- Write out given flag if it is set
8142 procedure W (Flag_Name : String; Flag : Boolean) is
8146 Write_Str (Flag_Name);
8147 Write_Str (" = True");
8152 -- Start of processing for Write_Entity_Flags
8155 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
8156 and then Is_Base_Type (Id)
8159 Write_Str ("Component_Alignment = ");
8161 case Component_Alignment (Id) is
8162 when Calign_Default =>
8163 Write_Str ("Calign_Default");
8165 when Calign_Component_Size =>
8166 Write_Str ("Calign_Component_Size");
8168 when Calign_Component_Size_4 =>
8169 Write_Str ("Calign_Component_Size_4");
8171 when Calign_Storage_Unit =>
8172 Write_Str ("Calign_Storage_Unit");
8178 W ("Address_Taken", Flag104 (Id));
8179 W ("Body_Needed_For_SAL", Flag40 (Id));
8180 W ("C_Pass_By_Copy", Flag125 (Id));
8181 W ("Can_Never_Be_Null", Flag38 (Id));
8182 W ("Checks_May_Be_Suppressed", Flag31 (Id));
8183 W ("Debug_Info_Off", Flag166 (Id));
8184 W ("Default_Expressions_Processed", Flag108 (Id));
8185 W ("Delay_Cleanups", Flag114 (Id));
8186 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
8187 W ("Depends_On_Private", Flag14 (Id));
8188 W ("Discard_Names", Flag88 (Id));
8189 W ("Elaboration_Entity_Required", Flag174 (Id));
8190 W ("Elaborate_Body_Desirable", Flag210 (Id));
8191 W ("Entry_Accepted", Flag152 (Id));
8192 W ("Can_Use_Internal_Rep", Flag229 (Id));
8193 W ("Finalize_Storage_Only", Flag158 (Id));
8194 W ("From_Limited_With", Flag159 (Id));
8195 W ("Has_Aliased_Components", Flag135 (Id));
8196 W ("Has_Alignment_Clause", Flag46 (Id));
8197 W ("Has_All_Calls_Remote", Flag79 (Id));
8198 W ("Has_Anonymous_Master", Flag253 (Id));
8199 W ("Has_Atomic_Components", Flag86 (Id));
8200 W ("Has_Biased_Representation", Flag139 (Id));
8201 W ("Has_Completion", Flag26 (Id));
8202 W ("Has_Completion_In_Body", Flag71 (Id));
8203 W ("Has_Complex_Representation", Flag140 (Id));
8204 W ("Has_Component_Size_Clause", Flag68 (Id));
8205 W ("Has_Contiguous_Rep", Flag181 (Id));
8206 W ("Has_Controlled_Component", Flag43 (Id));
8207 W ("Has_Controlling_Result", Flag98 (Id));
8208 W ("Has_Convention_Pragma", Flag119 (Id));
8209 W ("Has_Default_Aspect", Flag39 (Id));
8210 W ("Has_Delayed_Aspects", Flag200 (Id));
8211 W ("Has_Delayed_Freeze", Flag18 (Id));
8212 W ("Has_Delayed_Rep_Aspects", Flag261 (Id));
8213 W ("Has_Discriminants", Flag5 (Id));
8214 W ("Has_Dispatch_Table", Flag220 (Id));
8215 W ("Has_Dynamic_Predicate_Aspect", Flag258 (Id));
8216 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
8217 W ("Has_Exit", Flag47 (Id));
8218 W ("Has_Forward_Instantiation", Flag175 (Id));
8219 W ("Has_Fully_Qualified_Name", Flag173 (Id));
8220 W ("Has_Gigi_Rep_Item", Flag82 (Id));
8221 W ("Has_Homonym", Flag56 (Id));
8222 W ("Has_Implicit_Dereference", Flag251 (Id));
8223 W ("Has_Independent_Components", Flag34 (Id));
8224 W ("Has_Inheritable_Invariants", Flag248 (Id));
8225 W ("Has_Initial_Value", Flag219 (Id));
8226 W ("Has_Invariants", Flag232 (Id));
8227 W ("Has_Loop_Entry_Attributes", Flag260 (Id));
8228 W ("Has_Machine_Radix_Clause", Flag83 (Id));
8229 W ("Has_Master_Entity", Flag21 (Id));
8230 W ("Has_Missing_Return", Flag142 (Id));
8231 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
8232 W ("Has_Non_Standard_Rep", Flag75 (Id));
8233 W ("Has_Out_Or_In_Out_Parameter", Flag110 (Id));
8234 W ("Has_Object_Size_Clause", Flag172 (Id));
8235 W ("Has_Per_Object_Constraint", Flag154 (Id));
8236 W ("Has_Postconditions", Flag240 (Id));
8237 W ("Has_Pragma_Controlled", Flag27 (Id));
8238 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
8239 W ("Has_Pragma_Inline", Flag157 (Id));
8240 W ("Has_Pragma_Inline_Always", Flag230 (Id));
8241 W ("Has_Pragma_No_Inline", Flag201 (Id));
8242 W ("Has_Pragma_Ordered", Flag198 (Id));
8243 W ("Has_Pragma_Pack", Flag121 (Id));
8244 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
8245 W ("Has_Pragma_Pure", Flag203 (Id));
8246 W ("Has_Pragma_Pure_Function", Flag179 (Id));
8247 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
8248 W ("Has_Pragma_Unmodified", Flag233 (Id));
8249 W ("Has_Pragma_Unreferenced", Flag180 (Id));
8250 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
8251 W ("Has_Predicates", Flag250 (Id));
8252 W ("Has_Primitive_Operations", Flag120 (Id));
8253 W ("Has_Private_Ancestor", Flag151 (Id));
8254 W ("Has_Private_Declaration", Flag155 (Id));
8255 W ("Has_Qualified_Name", Flag161 (Id));
8256 W ("Has_RACW", Flag214 (Id));
8257 W ("Has_Record_Rep_Clause", Flag65 (Id));
8258 W ("Has_Recursive_Call", Flag143 (Id));
8259 W ("Has_Shift_Operator", Flag267 (Id));
8260 W ("Has_Size_Clause", Flag29 (Id));
8261 W ("Has_Small_Clause", Flag67 (Id));
8262 W ("Has_Specified_Layout", Flag100 (Id));
8263 W ("Has_Specified_Stream_Input", Flag190 (Id));
8264 W ("Has_Specified_Stream_Output", Flag191 (Id));
8265 W ("Has_Specified_Stream_Read", Flag192 (Id));
8266 W ("Has_Specified_Stream_Write", Flag193 (Id));
8267 W ("Has_Static_Discriminants", Flag211 (Id));
8268 W ("Has_Static_Predicate", Flag269 (Id));
8269 W ("Has_Static_Predicate_Aspect", Flag259 (Id));
8270 W ("Has_Storage_Size_Clause", Flag23 (Id));
8271 W ("Has_Stream_Size_Clause", Flag184 (Id));
8272 W ("Has_Task", Flag30 (Id));
8273 W ("Has_Thunks", Flag228 (Id));
8274 W ("Has_Unchecked_Union", Flag123 (Id));
8275 W ("Has_Unknown_Discriminants", Flag72 (Id));
8276 W ("Has_Up_Level_Access", Flag215 (Id));
8277 W ("Has_Visible_Refinement", Flag263 (Id));
8278 W ("Has_Volatile_Components", Flag87 (Id));
8279 W ("Has_Xref_Entry", Flag182 (Id));
8280 W ("In_Package_Body", Flag48 (Id));
8281 W ("In_Private_Part", Flag45 (Id));
8282 W ("In_Use", Flag8 (Id));
8283 W ("Is_AST_Entry", Flag132 (Id));
8284 W ("Is_Abstract_Subprogram", Flag19 (Id));
8285 W ("Is_Abstract_Type", Flag146 (Id));
8286 W ("Is_Local_Anonymous_Access", Flag194 (Id));
8287 W ("Is_Access_Constant", Flag69 (Id));
8288 W ("Is_Ada_2005_Only", Flag185 (Id));
8289 W ("Is_Ada_2012_Only", Flag199 (Id));
8290 W ("Is_Aliased", Flag15 (Id));
8291 W ("Is_Asynchronous", Flag81 (Id));
8292 W ("Is_Atomic", Flag85 (Id));
8293 W ("Is_Bit_Packed_Array", Flag122 (Id));
8294 W ("Is_CPP_Class", Flag74 (Id));
8295 W ("Is_Called", Flag102 (Id));
8296 W ("Is_Character_Type", Flag63 (Id));
8297 W ("Is_Child_Unit", Flag73 (Id));
8298 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
8299 W ("Is_Compilation_Unit", Flag149 (Id));
8300 W ("Is_Completely_Hidden", Flag103 (Id));
8301 W ("Is_Concurrent_Record_Type", Flag20 (Id));
8302 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
8303 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
8304 W ("Is_Constrained", Flag12 (Id));
8305 W ("Is_Constructor", Flag76 (Id));
8306 W ("Is_Controlled", Flag42 (Id));
8307 W ("Is_Controlling_Formal", Flag97 (Id));
8308 W ("Is_Descendent_Of_Address", Flag223 (Id));
8309 W ("Is_Discrim_SO_Function", Flag176 (Id));
8310 W ("Is_Discriminant_Check_Function", Flag264 (Id));
8311 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
8312 W ("Is_Dispatching_Operation", Flag6 (Id));
8313 W ("Is_Eliminated", Flag124 (Id));
8314 W ("Is_Entry_Formal", Flag52 (Id));
8315 W ("Is_Exported", Flag99 (Id));
8316 W ("Is_First_Subtype", Flag70 (Id));
8317 W ("Is_For_Access_Subtype", Flag118 (Id));
8318 W ("Is_Formal_Subprogram", Flag111 (Id));
8319 W ("Is_Frozen", Flag4 (Id));
8320 W ("Is_Generic_Actual_Type", Flag94 (Id));
8321 W ("Is_Generic_Instance", Flag130 (Id));
8322 W ("Is_Generic_Type", Flag13 (Id));
8323 W ("Is_Hidden", Flag57 (Id));
8324 W ("Is_Hidden_Open_Scope", Flag171 (Id));
8325 W ("Is_Immediately_Visible", Flag7 (Id));
8326 W ("Is_Implementation_Defined", Flag254 (Id));
8327 W ("Is_Imported", Flag24 (Id));
8328 W ("Is_Independent", Flag268 (Id));
8329 W ("Is_Inlined", Flag11 (Id));
8330 W ("Is_Instantiated", Flag126 (Id));
8331 W ("Is_Interface", Flag186 (Id));
8332 W ("Is_Internal", Flag17 (Id));
8333 W ("Is_Interrupt_Handler", Flag89 (Id));
8334 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
8335 W ("Is_Invariant_Procedure", Flag257 (Id));
8336 W ("Is_Itype", Flag91 (Id));
8337 W ("Is_Known_Non_Null", Flag37 (Id));
8338 W ("Is_Known_Null", Flag204 (Id));
8339 W ("Is_Known_Valid", Flag170 (Id));
8340 W ("Is_Limited_Composite", Flag106 (Id));
8341 W ("Is_Limited_Interface", Flag197 (Id));
8342 W ("Is_Limited_Record", Flag25 (Id));
8343 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
8344 W ("Is_Non_Static_Subtype", Flag109 (Id));
8345 W ("Is_Null_Init_Proc", Flag178 (Id));
8346 W ("Is_Obsolescent", Flag153 (Id));
8347 W ("Is_Only_Out_Parameter", Flag226 (Id));
8348 W ("Is_Optional_Parameter", Flag134 (Id));
8349 W ("Is_Package_Body_Entity", Flag160 (Id));
8350 W ("Is_Packed", Flag51 (Id));
8351 W ("Is_Packed_Array_Impl_Type", Flag138 (Id));
8352 W ("Is_Potentially_Use_Visible", Flag9 (Id));
8353 W ("Is_Predicate_Function", Flag255 (Id));
8354 W ("Is_Predicate_Function_M", Flag256 (Id));
8355 W ("Is_Preelaborated", Flag59 (Id));
8356 W ("Is_Primitive", Flag218 (Id));
8357 W ("Is_Primitive_Wrapper", Flag195 (Id));
8358 W ("Is_Private_Composite", Flag107 (Id));
8359 W ("Is_Private_Descendant", Flag53 (Id));
8360 W ("Is_Private_Primitive", Flag245 (Id));
8361 W ("Is_Processed_Transient", Flag252 (Id));
8362 W ("Is_Public", Flag10 (Id));
8363 W ("Is_Pure", Flag44 (Id));
8364 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
8365 W ("Is_RACW_Stub_Type", Flag244 (Id));
8366 W ("Is_Raised", Flag224 (Id));
8367 W ("Is_Remote_Call_Interface", Flag62 (Id));
8368 W ("Is_Remote_Types", Flag61 (Id));
8369 W ("Is_Renaming_Of_Object", Flag112 (Id));
8370 W ("Is_Return_Object", Flag209 (Id));
8371 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
8372 W ("Is_Shared_Passive", Flag60 (Id));
8373 W ("Is_Statically_Allocated", Flag28 (Id));
8374 W ("Is_Tag", Flag78 (Id));
8375 W ("Is_Tagged_Type", Flag55 (Id));
8376 W ("Is_Thunk", Flag225 (Id));
8377 W ("Is_Trivial_Subprogram", Flag235 (Id));
8378 W ("Is_True_Constant", Flag163 (Id));
8379 W ("Is_Unchecked_Union", Flag117 (Id));
8380 W ("Is_Underlying_Record_View", Flag246 (Id));
8381 W ("Is_Unsigned_Type", Flag144 (Id));
8382 W ("Is_VMS_Exception", Flag133 (Id));
8383 W ("Is_Valued_Procedure", Flag127 (Id));
8384 W ("Is_Visible_Formal", Flag206 (Id));
8385 W ("Is_Visible_Lib_Unit", Flag116 (Id));
8386 W ("Is_Volatile", Flag16 (Id));
8387 W ("Itype_Printed", Flag202 (Id));
8388 W ("Kill_Elaboration_Checks", Flag32 (Id));
8389 W ("Kill_Range_Checks", Flag33 (Id));
8390 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
8391 W ("Low_Bound_Tested", Flag205 (Id));
8392 W ("Machine_Radix_10", Flag84 (Id));
8393 W ("Materialize_Entity", Flag168 (Id));
8394 W ("May_Inherit_Delayed_Rep_Aspects", Flag262 (Id));
8395 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
8396 W ("Must_Have_Preelab_Init", Flag208 (Id));
8397 W ("Needs_Debug_Info", Flag147 (Id));
8398 W ("Needs_No_Actuals", Flag22 (Id));
8399 W ("Never_Set_In_Source", Flag115 (Id));
8400 W ("No_Pool_Assigned", Flag131 (Id));
8401 W ("No_Return", Flag113 (Id));
8402 W ("No_Strict_Aliasing", Flag136 (Id));
8403 W ("Non_Binary_Modulus", Flag58 (Id));
8404 W ("Nonzero_Is_True", Flag162 (Id));
8405 W ("OK_To_Rename", Flag247 (Id));
8406 W ("OK_To_Reorder_Components", Flag239 (Id));
8407 W ("Optimize_Alignment_Space", Flag241 (Id));
8408 W ("Optimize_Alignment_Time", Flag242 (Id));
8409 W ("Overlays_Constant", Flag243 (Id));
8410 W ("Reachable", Flag49 (Id));
8411 W ("Referenced", Flag156 (Id));
8412 W ("Referenced_As_LHS", Flag36 (Id));
8413 W ("Referenced_As_Out_Parameter", Flag227 (Id));
8414 W ("Renamed_In_Spec", Flag231 (Id));
8415 W ("Requires_Overriding", Flag213 (Id));
8416 W ("Return_Present", Flag54 (Id));
8417 W ("Returns_By_Ref", Flag90 (Id));
8418 W ("Reverse_Bit_Order", Flag164 (Id));
8419 W ("Reverse_Storage_Order", Flag93 (Id));
8420 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
8421 W ("Size_Depends_On_Discriminant", Flag177 (Id));
8422 W ("Size_Known_At_Compile_Time", Flag92 (Id));
8423 W ("SPARK_Aux_Pragma_Inherited", Flag266 (Id));
8424 W ("SPARK_Pragma_Inherited", Flag265 (Id));
8425 W ("Static_Elaboration_Desired", Flag77 (Id));
8426 W ("Stores_Attribute_Old_Prefix", Flag270 (Id));
8427 W ("Strict_Alignment", Flag145 (Id));
8428 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
8429 W ("Suppress_Initialization", Flag105 (Id));
8430 W ("Suppress_Style_Checks", Flag165 (Id));
8431 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
8432 W ("Treat_As_Volatile", Flag41 (Id));
8433 W ("Universal_Aliasing", Flag216 (Id));
8434 W ("Used_As_Generic_Actual", Flag222 (Id));
8435 W ("Uses_Sec_Stack", Flag95 (Id));
8436 W ("Warnings_Off", Flag96 (Id));
8437 W ("Warnings_Off_Used", Flag236 (Id));
8438 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
8439 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
8440 W ("Was_Hidden", Flag196 (Id));
8441 end Write_Entity_Flags;
8443 -----------------------
8444 -- Write_Entity_Info --
8445 -----------------------
8447 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
8449 procedure Write_Attribute (Which : String; Nam : E);
8450 -- Write attribute value with given string name
8452 procedure Write_Kind (Id : Entity_Id);
8453 -- Write Ekind field of entity
8455 ---------------------
8456 -- Write_Attribute --
8457 ---------------------
8459 procedure Write_Attribute (Which : String; Nam : E) is
8463 Write_Int (Int (Nam));
8465 Write_Name (Chars (Nam));
8467 end Write_Attribute;
8473 procedure Write_Kind (Id : Entity_Id) is
8474 K : constant String := Entity_Kind'Image (Ekind (Id));
8478 Write_Str (" Kind ");
8480 if Is_Type (Id) and then Is_Tagged_Type (Id) then
8481 Write_Str ("TAGGED ");
8484 Write_Str (K (3 .. K'Length));
8487 if Is_Type (Id) and then Depends_On_Private (Id) then
8488 Write_Str ("Depends_On_Private ");
8492 -- Start of processing for Write_Entity_Info
8496 Write_Attribute ("Name ", Id);
8497 Write_Int (Int (Id));
8501 Write_Attribute (" Type ", Etype (Id));
8503 Write_Attribute (" Scope ", Scope (Id));
8508 when Discrete_Kind =>
8509 Write_Str ("Bounds: Id = ");
8511 if Present (Scalar_Range (Id)) then
8512 Write_Int (Int (Type_Low_Bound (Id)));
8513 Write_Str (" .. Id = ");
8514 Write_Int (Int (Type_High_Bound (Id)));
8516 Write_Str ("Empty");
8527 (" Component Type ", Component_Type (Id));
8530 Write_Str (" Indexes ");
8532 Index := First_Index (Id);
8533 while Present (Index) loop
8534 Write_Attribute (" ", Etype (Index));
8535 Index := Next_Index (Index);
8543 (" Directly Designated Type ",
8544 Directly_Designated_Type (Id));
8547 when Overloadable_Kind =>
8548 if Present (Homonym (Id)) then
8549 Write_Str (" Homonym ");
8550 Write_Name (Chars (Homonym (Id)));
8552 Write_Int (Int (Homonym (Id)));
8559 if Ekind (Scope (Id)) in Record_Kind then
8561 " Original_Record_Component ",
8562 Original_Record_Component (Id));
8563 Write_Int (Int (Original_Record_Component (Id)));
8567 when others => null;
8569 end Write_Entity_Info;
8571 -----------------------
8572 -- Write_Field6_Name --
8573 -----------------------
8575 procedure Write_Field6_Name (Id : Entity_Id) is
8576 pragma Warnings (Off, Id);
8578 Write_Str ("First_Rep_Item");
8579 end Write_Field6_Name;
8581 -----------------------
8582 -- Write_Field7_Name --
8583 -----------------------
8585 procedure Write_Field7_Name (Id : Entity_Id) is
8586 pragma Warnings (Off, Id);
8588 Write_Str ("Freeze_Node");
8589 end Write_Field7_Name;
8591 -----------------------
8592 -- Write_Field8_Name --
8593 -----------------------
8595 procedure Write_Field8_Name (Id : Entity_Id) is
8599 Write_Str ("Associated_Node_For_Itype");
8602 Write_Str ("Dependent_Instances");
8605 Write_Str ("First_Exit_Statement");
8608 Write_Str ("Hiding_Loop_Variable");
8612 E_Subprogram_Body =>
8613 Write_Str ("Mechanism");
8617 Write_Str ("Normalized_First_Bit");
8620 Write_Str ("Postcondition_Proc");
8622 when E_Abstract_State =>
8623 Write_Str ("Refinement_Constituents");
8625 when E_Return_Statement =>
8626 Write_Str ("Return_Applies_To");
8629 Write_Str ("Field8??");
8631 end Write_Field8_Name;
8633 -----------------------
8634 -- Write_Field9_Name --
8635 -----------------------
8637 procedure Write_Field9_Name (Id : Entity_Id) is
8641 Write_Str ("Class_Wide_Type");
8644 Write_Str ("Current_Value");
8646 when E_Abstract_State =>
8647 Write_Str ("Part_Of_Constituents");
8650 E_Generic_Function |
8652 E_Generic_Procedure |
8655 Write_Str ("Renaming_Map");
8658 Write_Str ("Field9??");
8660 end Write_Field9_Name;
8662 ------------------------
8663 -- Write_Field10_Name --
8664 ------------------------
8666 procedure Write_Field10_Name (Id : Entity_Id) is
8669 when E_Abstract_State |
8671 Write_Str ("Encapsulating_State");
8673 when Class_Wide_Kind |
8679 Write_Str ("Direct_Primitive_Operations");
8682 Write_Str ("Float_Rep");
8684 when E_In_Parameter |
8686 Write_Str ("Discriminal_Link");
8692 Write_Str ("Handler_Records");
8696 Write_Str ("Normalized_Position_Max");
8699 Write_Str ("Field10??");
8701 end Write_Field10_Name;
8703 ------------------------
8704 -- Write_Field11_Name --
8705 ------------------------
8707 procedure Write_Field11_Name (Id : Entity_Id) is
8711 Write_Str ("Block_Node");
8715 Write_Str ("Component_Bit_Offset");
8718 Write_Str ("Entry_Component");
8720 when E_Enumeration_Literal =>
8721 Write_Str ("Enumeration_Pos");
8725 Write_Str ("Full_View");
8727 when E_Generic_Package =>
8728 Write_Str ("Generic_Homonym");
8734 Write_Str ("Protected_Body_Subprogram");
8737 Write_Str ("Field11??");
8739 end Write_Field11_Name;
8741 ------------------------
8742 -- Write_Field12_Name --
8743 ------------------------
8745 procedure Write_Field12_Name (Id : Entity_Id) is
8749 Write_Str ("Associated_Formal_Package");
8752 Write_Str ("Barrier_Function");
8754 when E_Enumeration_Literal =>
8755 Write_Str ("Enumeration_Rep");
8763 E_In_Out_Parameter |
8767 Write_Str ("Esize");
8771 Write_Str ("Next_Inlined_Subprogram");
8774 Write_Str ("Field12??");
8776 end Write_Field12_Name;
8778 ------------------------
8779 -- Write_Field13_Name --
8780 ------------------------
8782 procedure Write_Field13_Name (Id : Entity_Id) is
8787 Write_Str ("Component_Clause");
8790 Write_Str ("Elaboration_Entity");
8794 Generic_Unit_Kind =>
8795 Write_Str ("Elaboration_Entity");
8799 Write_Str ("Extra_Accessibility");
8802 Write_Str ("RM_Size");
8805 Write_Str ("Field13??");
8807 end Write_Field13_Name;
8809 -----------------------
8810 -- Write_Field14_Name --
8811 -----------------------
8813 procedure Write_Field14_Name (Id : Entity_Id) is
8822 Write_Str ("Alignment");
8826 Write_Str ("First_Optional_Parameter");
8830 Write_Str ("Normalized_Position");
8833 E_Generic_Package =>
8834 Write_Str ("Shadow_Entities");
8837 Write_Str ("Field14??");
8839 end Write_Field14_Name;
8841 ------------------------
8842 -- Write_Field15_Name --
8843 ------------------------
8845 procedure Write_Field15_Name (Id : Entity_Id) is
8848 when E_Discriminant =>
8849 Write_Str ("Discriminant_Number");
8852 Write_Str ("DT_Entry_Count");
8856 Write_Str ("DT_Position");
8858 when E_Protected_Type =>
8859 Write_Str ("Entry_Bodies_Array");
8862 Write_Str ("Entry_Parameters_Type");
8865 Write_Str ("Extra_Formal");
8867 when Enumeration_Kind =>
8868 Write_Str ("Lit_Indexes");
8872 Write_Str ("Related_Instance");
8874 when Decimal_Fixed_Point_Kind =>
8875 Write_Str ("Scale_Value");
8879 Write_Str ("Status_Flag_Or_Transient_Decl");
8883 Write_Str ("Storage_Size_Variable");
8885 when E_String_Literal_Subtype =>
8886 Write_Str ("String_Literal_Low_Bound");
8889 Write_Str ("Field15??");
8891 end Write_Field15_Name;
8893 ------------------------
8894 -- Write_Field16_Name --
8895 ------------------------
8897 procedure Write_Field16_Name (Id : Entity_Id) is
8900 when E_Record_Type |
8901 E_Record_Type_With_Private =>
8902 Write_Str ("Access_Disp_Table");
8904 when E_Abstract_State =>
8905 Write_Str ("Body_References");
8907 when E_Record_Subtype |
8908 E_Class_Wide_Subtype =>
8909 Write_Str ("Cloned_Subtype");
8913 Write_Str ("DTC_Entity");
8916 Write_Str ("Entry_Formal");
8921 Write_Str ("First_Private_Entity");
8923 when Enumeration_Kind =>
8924 Write_Str ("Lit_Strings");
8926 when E_String_Literal_Subtype =>
8927 Write_Str ("String_Literal_Length");
8931 Write_Str ("Unset_Reference");
8934 Write_Str ("Field16??");
8936 end Write_Field16_Name;
8938 ------------------------
8939 -- Write_Field17_Name --
8940 ------------------------
8942 procedure Write_Field17_Name (Id : Entity_Id) is
8947 E_Generic_In_Out_Parameter |
8949 Write_Str ("Actual_Subtype");
8952 Write_Str ("Digits_Value");
8954 when E_Discriminant =>
8955 Write_Str ("Discriminal");
8964 E_Generic_Function |
8966 E_Generic_Procedure |
8974 E_Return_Statement |
8976 E_Subprogram_Type =>
8977 Write_Str ("First_Entity");
8980 Write_Str ("First_Index");
8982 when Enumeration_Kind =>
8983 Write_Str ("First_Literal");
8986 Write_Str ("Master_Id");
8988 when Modular_Integer_Kind =>
8989 Write_Str ("Modulus");
8991 when E_Abstract_State |
8992 E_Incomplete_Type =>
8993 Write_Str ("Non_Limited_View");
8995 when E_Incomplete_Subtype =>
8996 if From_Limited_With (Id) then
8997 Write_Str ("Non_Limited_View");
9001 Write_Str ("Prival");
9004 Write_Str ("Field17??");
9006 end Write_Field17_Name;
9008 ------------------------
9009 -- Write_Field18_Name --
9010 ------------------------
9012 procedure Write_Field18_Name (Id : Entity_Id) is
9015 when E_Enumeration_Literal |
9019 Write_Str ("Alias");
9021 when E_Record_Type =>
9022 Write_Str ("Corresponding_Concurrent_Type");
9024 when E_Subprogram_Body =>
9025 Write_Str ("Corresponding_Protected_Entry");
9027 when Concurrent_Kind =>
9028 Write_Str ("Corresponding_Record_Type");
9033 Write_Str ("Enclosing_Scope");
9035 when E_Entry_Index_Parameter =>
9036 Write_Str ("Entry_Index_Constant");
9038 when E_Class_Wide_Subtype |
9039 E_Access_Protected_Subprogram_Type |
9040 E_Anonymous_Access_Protected_Subprogram_Type |
9041 E_Access_Subprogram_Type |
9043 Write_Str ("Equivalent_Type");
9045 when Fixed_Point_Kind =>
9046 Write_Str ("Delta_Value");
9048 when Incomplete_Or_Private_Kind |
9050 Write_Str ("Private_Dependents");
9053 Write_Str ("Renamed_Object");
9057 E_Generic_Function |
9058 E_Generic_Procedure |
9059 E_Generic_Package =>
9060 Write_Str ("Renamed_Entity");
9063 Write_Str ("Field18??");
9065 end Write_Field18_Name;
9067 -----------------------
9068 -- Write_Field19_Name --
9069 -----------------------
9071 procedure Write_Field19_Name (Id : Entity_Id) is
9075 E_Generic_Package =>
9076 Write_Str ("Body_Entity");
9078 when E_Discriminant =>
9079 Write_Str ("Corresponding_Discriminant");
9082 Write_Str ("Default_Aspect_Value");
9084 when E_Array_Type =>
9085 Write_Str ("Default_Component_Value");
9087 when E_Record_Type =>
9088 Write_Str ("Parent_Subtype");
9092 Write_Str ("Size_Check_Code");
9094 when E_Package_Body |
9096 Write_Str ("Spec_Entity");
9098 when Private_Kind =>
9099 Write_Str ("Underlying_Full_View");
9101 when E_Function | E_Operator | E_Subprogram_Type =>
9102 Write_Str ("Extra_Accessibility_Of_Result");
9105 Write_Str ("Field19??");
9107 end Write_Field19_Name;
9109 -----------------------
9110 -- Write_Field20_Name --
9111 -----------------------
9113 procedure Write_Field20_Name (Id : Entity_Id) is
9117 Write_Str ("Component_Type");
9119 when E_In_Parameter |
9120 E_Generic_In_Parameter =>
9121 Write_Str ("Default_Value");
9124 Write_Str ("Directly_Designated_Type");
9127 Write_Str ("Discriminant_Checking_Func");
9129 when E_Discriminant =>
9130 Write_Str ("Discriminant_Default_Value");
9139 E_Generic_Function |
9141 E_Generic_Procedure |
9149 E_Return_Statement |
9151 E_Subprogram_Type =>
9152 Write_Str ("Last_Entity");
9156 Write_Str ("Prival_Link");
9159 Write_Str ("Scalar_Range");
9162 Write_Str ("Register_Exception_Call");
9165 Write_Str ("Field20??");
9167 end Write_Field20_Name;
9169 -----------------------
9170 -- Write_Field21_Name --
9171 -----------------------
9173 procedure Write_Field21_Name (Id : Entity_Id) is
9177 Write_Str ("Accept_Address");
9179 when E_In_Parameter =>
9180 Write_Str ("Default_Expr_Function");
9182 when Concurrent_Kind |
9183 Incomplete_Or_Private_Kind |
9187 Write_Str ("Discriminant_Constraint");
9192 E_Generic_Function |
9194 E_Generic_Procedure |
9196 Write_Str ("Interface_Name");
9199 Modular_Integer_Kind =>
9200 Write_Str ("Original_Array_Type");
9202 when Fixed_Point_Kind =>
9203 Write_Str ("Small_Value");
9206 Write_Str ("Field21??");
9208 end Write_Field21_Name;
9210 -----------------------
9211 -- Write_Field22_Name --
9212 -----------------------
9214 procedure Write_Field22_Name (Id : Entity_Id) is
9218 Write_Str ("Associated_Storage_Pool");
9221 Write_Str ("Component_Size");
9223 when E_Record_Type =>
9224 Write_Str ("Corresponding_Remote_Type");
9228 Write_Str ("Original_Record_Component");
9230 when E_Enumeration_Literal =>
9231 Write_Str ("Enumeration_Rep_Expr");
9234 Write_Str ("Exception_Code");
9236 when E_Record_Type_With_Private |
9237 E_Record_Subtype_With_Private |
9240 E_Limited_Private_Type |
9241 E_Limited_Private_Subtype =>
9242 Write_Str ("Private_View");
9245 Write_Str ("Protected_Formal");
9255 E_Generic_Function |
9256 E_Generic_Procedure |
9259 E_Return_Statement |
9262 Write_Str ("Scope_Depth_Value");
9265 Write_Str ("Shared_Var_Procs_Instance");
9268 Write_Str ("Field22??");
9270 end Write_Field22_Name;
9272 ------------------------
9273 -- Write_Field23_Name --
9274 ------------------------
9276 procedure Write_Field23_Name (Id : Entity_Id) is
9279 when E_Discriminant =>
9280 Write_Str ("CR_Discriminant");
9283 Write_Str ("Entry_Cancel_Parameter");
9285 when E_Enumeration_Type =>
9286 Write_Str ("Enum_Pos_To_Rep");
9290 Write_Str ("Extra_Constrained");
9293 Write_Str ("Finalization_Master");
9295 when E_Generic_Function |
9297 E_Generic_Procedure =>
9298 Write_Str ("Inner_Instances");
9301 Write_Str ("Packed_Array_Impl_Type");
9304 Write_Str ("Protection_Object");
9306 when Concurrent_Kind |
9307 Incomplete_Or_Private_Kind |
9311 Write_Str ("Stored_Constraint");
9315 if Present (Scope (Id))
9316 and then Is_Protected_Type (Scope (Id))
9318 Write_Str ("Protection_Object");
9320 Write_Str ("Generic_Renamings");
9324 if Is_Generic_Instance (Id) then
9325 Write_Str ("Generic_Renamings");
9327 Write_Str ("Limited_View");
9331 Write_Str ("Field23??");
9333 end Write_Field23_Name;
9335 ------------------------
9336 -- Write_Field24_Name --
9337 ------------------------
9339 procedure Write_Field24_Name (Id : Entity_Id) is
9345 Write_Str ("Related_Expression");
9348 Write_Str ("Field24???");
9350 end Write_Field24_Name;
9352 ------------------------
9353 -- Write_Field25_Name --
9354 ------------------------
9356 procedure Write_Field25_Name (Id : Entity_Id) is
9359 when E_Generic_Package |
9361 Write_Str ("Abstract_States");
9364 Write_Str ("Debug_Renaming_Link");
9367 Write_Str ("DT_Offset_To_Top_Func");
9371 Write_Str ("Interface_Alias");
9373 when E_Record_Type |
9375 E_Record_Type_With_Private |
9376 E_Record_Subtype_With_Private =>
9377 Write_Str ("Interfaces");
9381 Write_Str ("Related_Array_Object");
9384 Write_Str ("Task_Body_Procedure");
9388 Write_Str ("PPC_Wrapper");
9390 when E_Enumeration_Type |
9391 E_Enumeration_Subtype |
9392 E_Modular_Integer_Type |
9393 E_Modular_Integer_Subtype |
9394 E_Signed_Integer_Subtype =>
9395 Write_Str ("Static_Predicate");
9398 Write_Str ("Field25??");
9400 end Write_Field25_Name;
9402 ------------------------
9403 -- Write_Field26_Name --
9404 ------------------------
9406 procedure Write_Field26_Name (Id : Entity_Id) is
9409 when E_Record_Type |
9410 E_Record_Type_With_Private =>
9411 Write_Str ("Dispatch_Table_Wrappers");
9413 when E_In_Out_Parameter |
9416 Write_Str ("Last_Assignment");
9418 when E_Access_Subprogram_Type =>
9419 Write_Str ("Original_Access_Type");
9421 when E_Generic_Package |
9423 Write_Str ("Package_Instantiation");
9427 Write_Str ("Related_Type");
9430 Write_Str ("Relative_Deadline_Variable");
9434 Write_Str ("Overridden_Operation");
9437 Write_Str ("Field26??");
9439 end Write_Field26_Name;
9441 ------------------------
9442 -- Write_Field27_Name --
9443 ------------------------
9445 procedure Write_Field27_Name (Id : Entity_Id) is
9450 Write_Str ("Current_Use_Clause");
9455 Write_Str ("Related_Type");
9459 Write_Str ("Wrapped_Entity");
9462 Write_Str ("Field27??");
9464 end Write_Field27_Name;
9466 ------------------------
9467 -- Write_Field28_Name --
9468 ------------------------
9470 procedure Write_Field28_Name (Id : Entity_Id) is
9478 E_Subprogram_Type =>
9479 Write_Str ("Extra_Formals");
9483 Write_Str ("Finalizer");
9487 Write_Str ("Initialization_Statements");
9489 when E_Record_Type =>
9490 Write_Str ("Underlying_Record_View");
9493 Write_Str ("Field28??");
9495 end Write_Field28_Name;
9497 ------------------------
9498 -- Write_Field29_Name --
9499 ------------------------
9501 procedure Write_Field29_Name (Id : Entity_Id) is
9506 Write_Str ("BIP_Initialization_Call");
9509 Write_Str ("Subprograms_For_Type");
9512 Write_Str ("Field29??");
9514 end Write_Field29_Name;
9516 ------------------------
9517 -- Write_Field30_Name --
9518 ------------------------
9520 procedure Write_Field30_Name (Id : Entity_Id) is
9524 Write_Str ("Corresponding_Equality");
9528 Write_Str ("Last_Aggregate_Assignment");
9531 Write_Str ("Static_Initialization");
9534 Write_Str ("Field30??");
9536 end Write_Field30_Name;
9538 ------------------------
9539 -- Write_Field31_Name --
9540 ------------------------
9542 procedure Write_Field31_Name (Id : Entity_Id) is
9547 Write_Str ("Thunk_Entity");
9550 Write_Str ("Field31??");
9552 end Write_Field31_Name;
9554 ------------------------
9555 -- Write_Field32_Name --
9556 ------------------------
9558 procedure Write_Field32_Name (Id : Entity_Id) is
9562 E_Generic_Function |
9564 E_Generic_Procedure |
9568 E_Subprogram_Body =>
9569 Write_Str ("SPARK_Pragma");
9572 Write_Str ("Field32??");
9574 end Write_Field32_Name;
9576 ------------------------
9577 -- Write_Field33_Name --
9578 ------------------------
9580 procedure Write_Field33_Name (Id : Entity_Id) is
9583 when E_Generic_Package |
9586 Write_Str ("SPARK_Aux_Pragma");
9592 Write_Str ("Linker_Section_Pragma");
9595 Write_Str ("Field33??");
9597 end Write_Field33_Name;
9599 ------------------------
9600 -- Write_Field34_Name --
9601 ------------------------
9603 procedure Write_Field34_Name (Id : Entity_Id) is
9613 Generic_Subprogram_Kind |
9615 Write_Str ("Contract");
9618 Write_Str ("Field34??");
9620 end Write_Field34_Name;
9622 ------------------------
9623 -- Write_Field35_Name --
9624 ------------------------
9626 procedure Write_Field35_Name (Id : Entity_Id) is
9629 when Subprogram_Kind =>
9630 Write_Str ("Import_Pragma");
9632 Write_Str ("Field35??");
9634 end Write_Field35_Name;
9636 -------------------------
9637 -- Iterator Procedures --
9638 -------------------------
9640 procedure Proc_Next_Component (N : in out Node_Id) is
9642 N := Next_Component (N);
9643 end Proc_Next_Component;
9645 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
9647 N := Next_Entity (N);
9648 while Present (N) loop
9649 exit when Ekind_In (N, E_Component, E_Discriminant);
9650 N := Next_Entity (N);
9652 end Proc_Next_Component_Or_Discriminant;
9654 procedure Proc_Next_Discriminant (N : in out Node_Id) is
9656 N := Next_Discriminant (N);
9657 end Proc_Next_Discriminant;
9659 procedure Proc_Next_Formal (N : in out Node_Id) is
9661 N := Next_Formal (N);
9662 end Proc_Next_Formal;
9664 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
9666 N := Next_Formal_With_Extras (N);
9667 end Proc_Next_Formal_With_Extras;
9669 procedure Proc_Next_Index (N : in out Node_Id) is
9671 N := Next_Index (N);
9672 end Proc_Next_Index;
9674 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
9676 N := Next_Inlined_Subprogram (N);
9677 end Proc_Next_Inlined_Subprogram;
9679 procedure Proc_Next_Literal (N : in out Node_Id) is
9681 N := Next_Literal (N);
9682 end Proc_Next_Literal;
9684 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
9686 N := Next_Stored_Discriminant (N);
9687 end Proc_Next_Stored_Discriminant;