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 -- Last_Aggregate_Assignment Node11
105 -- Protected_Body_Subprogram Node11
108 -- Barrier_Function Node12
109 -- Enumeration_Rep Uint12
111 -- Next_Inlined_Subprogram Node12
113 -- Component_Clause Node13
114 -- Elaboration_Entity Node13
115 -- Extra_Accessibility Node13
119 -- First_Optional_Parameter Node14
120 -- Normalized_Position Uint14
121 -- Shadow_Entities List14
123 -- Discriminant_Number Uint15
124 -- DT_Position Uint15
125 -- DT_Entry_Count Uint15
126 -- Entry_Bodies_Array Node15
127 -- Entry_Parameters_Type Node15
128 -- Extra_Formal Node15
129 -- Lit_Indexes Node15
130 -- Related_Instance Node15
131 -- Status_Flag_Or_Transient_Decl Node15
132 -- Scale_Value Uint15
133 -- Storage_Size_Variable Node15
134 -- String_Literal_Low_Bound Node15
136 -- Access_Disp_Table Elist16
137 -- Body_References Elist16
138 -- Cloned_Subtype Node16
140 -- Entry_Formal Node16
141 -- First_Private_Entity Node16
142 -- Lit_Strings Node16
143 -- String_Literal_Length Uint16
144 -- Unset_Reference Node16
146 -- Actual_Subtype Node17
147 -- Digits_Value Uint17
148 -- Discriminal Node17
149 -- First_Entity Node17
150 -- First_Index Node17
151 -- First_Literal Node17
154 -- Non_Limited_View Node17
158 -- Corresponding_Concurrent_Type Node18
159 -- Corresponding_Protected_Entry Node18
160 -- Corresponding_Record_Type Node18
161 -- Delta_Value Ureal18
162 -- Enclosing_Scope Node18
163 -- Equivalent_Type Node18
164 -- Private_Dependents Elist18
165 -- Renamed_Entity Node18
166 -- Renamed_Object Node18
168 -- Body_Entity Node19
169 -- Corresponding_Discriminant Node19
170 -- Default_Aspect_Component_Value Node19
171 -- Default_Aspect_Value Node19
172 -- Extra_Accessibility_Of_Result Node19
173 -- Parent_Subtype Node19
174 -- Size_Check_Code Node19
175 -- Spec_Entity Node19
176 -- Underlying_Full_View Node19
178 -- Component_Type Node20
179 -- Default_Value Node20
180 -- Directly_Designated_Type Node20
181 -- Discriminant_Checking_Func Node20
182 -- Discriminant_Default_Value Node20
183 -- Last_Entity Node20
184 -- Prival_Link Node20
185 -- Register_Exception_Call Node20
186 -- Scalar_Range Node20
188 -- Accept_Address Elist21
189 -- Default_Expr_Function Node21
190 -- Discriminant_Constraint Elist21
191 -- Interface_Name Node21
192 -- Original_Array_Type Node21
193 -- Small_Value Ureal21
195 -- Associated_Storage_Pool Node22
196 -- Component_Size Uint22
197 -- Corresponding_Remote_Type Node22
198 -- Enumeration_Rep_Expr Node22
199 -- Exception_Code Uint22
200 -- Original_Record_Component Node22
201 -- Private_View Node22
202 -- Protected_Formal Node22
203 -- Scope_Depth_Value Uint22
204 -- Shared_Var_Procs_Instance Node22
206 -- CR_Discriminant Node23
207 -- Entry_Cancel_Parameter Node23
208 -- Enum_Pos_To_Rep Node23
209 -- Extra_Constrained Node23
210 -- Finalization_Master Node23
211 -- Generic_Renamings Elist23
212 -- Inner_Instances Elist23
213 -- Limited_View Node23
214 -- Packed_Array_Type Node23
215 -- Protection_Object Node23
216 -- Stored_Constraint Elist23
218 -- Related_Expression Node24
220 -- Interface_Alias Node25
221 -- Interfaces Elist25
222 -- Debug_Renaming_Link Node25
223 -- DT_Offset_To_Top_Func Node25
224 -- PPC_Wrapper Node25
225 -- Related_Array_Object Node25
226 -- Static_Predicate List25
227 -- Task_Body_Procedure Node25
229 -- Dispatch_Table_Wrappers Elist26
230 -- Last_Assignment Node26
231 -- Original_Access_Type Node26
232 -- Overridden_Operation Node26
233 -- Package_Instantiation Node26
234 -- Relative_Deadline_Variable Node26
236 -- Current_Use_Clause Node27
237 -- Related_Type Node27
238 -- Wrapped_Entity Node27
240 -- Extra_Formals Node28
242 -- Initialization_Statements Node28
243 -- Underlying_Record_View Node28
245 -- BIP_Initialization_Call Node29
246 -- Subprograms_For_Type Node29
248 -- Corresponding_Equality 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_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
588 -- Note: Flag287-317 are defined in atree.ads/adb, but not yet in atree.h
590 -----------------------
591 -- Local subprograms --
592 -----------------------
595 (State_Id : Entity_Id;
596 Option_Nam : Name_Id) return Boolean;
597 -- Determine whether abstract state State_Id has particular option denoted
598 -- by the name Option_Nam.
604 function Float_Rep (Id : E) return F is
605 pragma Assert (Is_Floating_Point_Type (Id));
607 return F'Val (UI_To_Int (Uint10 (Base_Type (Id))));
615 (State_Id : Entity_Id;
616 Option_Nam : Name_Id) return Boolean
618 Decl : constant Node_Id := Parent (State_Id);
623 pragma Assert (Ekind (State_Id) = E_Abstract_State);
625 -- The declaration of abstract states with options appear as an
626 -- extension aggregate. If this is not the case, the option is not
629 if Nkind (Decl) /= N_Extension_Aggregate then
635 Opt := First (Expressions (Decl));
636 while Present (Opt) loop
638 -- Currently the only simple option allowed is External
640 if Nkind (Opt) = N_Identifier
641 and then Chars (Opt) = Name_External
642 and then Chars (Opt) = Option_Nam
650 -- Complex options with various specifiers
652 Opt := First (Component_Associations (Decl));
653 while Present (Opt) loop
654 Opt_Nam := First (Choices (Opt));
656 if Nkind (Opt_Nam) = N_Identifier
657 and then Chars (Opt_Nam) = Option_Nam
668 --------------------------------
669 -- Attribute Access Functions --
670 --------------------------------
672 function Abstract_States (Id : E) return L is
674 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
678 function Accept_Address (Id : E) return L is
683 function Access_Disp_Table (Id : E) return L is
685 pragma Assert (Ekind_In (Id, E_Record_Type,
687 return Elist16 (Implementation_Base_Type (Id));
688 end Access_Disp_Table;
690 function Actual_Subtype (Id : E) return E is
693 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
694 or else Is_Formal (Id));
698 function Address_Taken (Id : E) return B is
703 function Alias (Id : E) return E is
706 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
710 function Alignment (Id : E) return U is
712 pragma Assert (Is_Type (Id)
713 or else Is_Formal (Id)
714 or else Ekind_In (Id, E_Loop_Parameter,
721 function Associated_Formal_Package (Id : E) return E is
723 pragma Assert (Ekind (Id) = E_Package);
725 end Associated_Formal_Package;
727 function Associated_Node_For_Itype (Id : E) return N is
730 end Associated_Node_For_Itype;
732 function Associated_Storage_Pool (Id : E) return E is
734 pragma Assert (Is_Access_Type (Id));
735 return Node22 (Root_Type (Id));
736 end Associated_Storage_Pool;
738 function Barrier_Function (Id : E) return N is
740 pragma Assert (Is_Entry (Id));
742 end Barrier_Function;
744 function Block_Node (Id : E) return N is
746 pragma Assert (Ekind (Id) = E_Block);
750 function Body_Entity (Id : E) return E is
752 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
756 function Body_Needed_For_SAL (Id : E) return B is
759 (Ekind (Id) = E_Package
760 or else Is_Subprogram (Id)
761 or else Is_Generic_Unit (Id));
763 end Body_Needed_For_SAL;
765 function Body_References (Id : E) return L is
767 pragma Assert (Ekind (Id) = E_Abstract_State);
771 function BIP_Initialization_Call (Id : E) return N is
773 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
775 end BIP_Initialization_Call;
777 function C_Pass_By_Copy (Id : E) return B is
779 pragma Assert (Is_Record_Type (Id));
780 return Flag125 (Implementation_Base_Type (Id));
783 function Can_Never_Be_Null (Id : E) return B is
786 end Can_Never_Be_Null;
788 function Checks_May_Be_Suppressed (Id : E) return B is
791 end Checks_May_Be_Suppressed;
793 function Class_Wide_Type (Id : E) return E is
795 pragma Assert (Is_Type (Id));
799 function Cloned_Subtype (Id : E) return E is
801 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
805 function Component_Bit_Offset (Id : E) return U is
807 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
809 end Component_Bit_Offset;
811 function Component_Clause (Id : E) return N is
813 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
815 end Component_Clause;
817 function Component_Size (Id : E) return U is
819 pragma Assert (Is_Array_Type (Id));
820 return Uint22 (Implementation_Base_Type (Id));
823 function Component_Type (Id : E) return E is
825 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
826 return Node20 (Implementation_Base_Type (Id));
829 function Corresponding_Concurrent_Type (Id : E) return E is
831 pragma Assert (Ekind (Id) = E_Record_Type);
833 end Corresponding_Concurrent_Type;
835 function Corresponding_Discriminant (Id : E) return E is
837 pragma Assert (Ekind (Id) = E_Discriminant);
839 end Corresponding_Discriminant;
841 function Corresponding_Equality (Id : E) return E is
844 (Ekind (Id) = E_Function
845 and then not Comes_From_Source (Id)
846 and then Chars (Id) = Name_Op_Ne);
848 end Corresponding_Equality;
850 function Corresponding_Protected_Entry (Id : E) return E is
852 pragma Assert (Ekind (Id) = E_Subprogram_Body);
854 end Corresponding_Protected_Entry;
856 function Corresponding_Record_Type (Id : E) return E is
858 pragma Assert (Is_Concurrent_Type (Id));
860 end Corresponding_Record_Type;
862 function Corresponding_Remote_Type (Id : E) return E is
865 end Corresponding_Remote_Type;
867 function Current_Use_Clause (Id : E) return E is
869 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
871 end Current_Use_Clause;
873 function Current_Value (Id : E) return N is
875 pragma Assert (Ekind (Id) in Object_Kind);
879 function CR_Discriminant (Id : E) return E is
884 function Debug_Info_Off (Id : E) return B is
889 function Debug_Renaming_Link (Id : E) return E is
892 end Debug_Renaming_Link;
894 function Default_Aspect_Component_Value (Id : E) return N is
896 pragma Assert (Is_Array_Type (Id));
897 return Node19 (Base_Type (Id));
898 end Default_Aspect_Component_Value;
900 function Default_Aspect_Value (Id : E) return N is
902 pragma Assert (Is_Scalar_Type (Id));
903 return Node19 (Base_Type (Id));
904 end Default_Aspect_Value;
906 function Default_Expr_Function (Id : E) return E is
908 pragma Assert (Is_Formal (Id));
910 end Default_Expr_Function;
912 function Default_Expressions_Processed (Id : E) return B is
915 end Default_Expressions_Processed;
917 function Default_Value (Id : E) return N is
919 pragma Assert (Is_Formal (Id));
923 function Delay_Cleanups (Id : E) return B is
928 function Delay_Subprogram_Descriptors (Id : E) return B is
931 end Delay_Subprogram_Descriptors;
933 function Delta_Value (Id : E) return R is
935 pragma Assert (Is_Fixed_Point_Type (Id));
939 function Dependent_Instances (Id : E) return L is
941 pragma Assert (Is_Generic_Instance (Id));
943 end Dependent_Instances;
945 function Depends_On_Private (Id : E) return B is
947 pragma Assert (Nkind (Id) in N_Entity);
949 end Depends_On_Private;
951 function Digits_Value (Id : E) return U is
954 (Is_Floating_Point_Type (Id)
955 or else Is_Decimal_Fixed_Point_Type (Id));
959 function Direct_Primitive_Operations (Id : E) return L is
961 pragma Assert (Is_Tagged_Type (Id));
963 end Direct_Primitive_Operations;
965 function Directly_Designated_Type (Id : E) return E is
967 pragma Assert (Is_Access_Type (Id));
969 end Directly_Designated_Type;
971 function Discard_Names (Id : E) return B is
976 function Discriminal (Id : E) return E is
978 pragma Assert (Ekind (Id) = E_Discriminant);
982 function Discriminal_Link (Id : E) return N is
985 end Discriminal_Link;
987 function Discriminant_Checking_Func (Id : E) return E is
989 pragma Assert (Ekind (Id) = E_Component);
991 end Discriminant_Checking_Func;
993 function Discriminant_Constraint (Id : E) return L is
995 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
997 end Discriminant_Constraint;
999 function Discriminant_Default_Value (Id : E) return N is
1001 pragma Assert (Ekind (Id) = E_Discriminant);
1003 end Discriminant_Default_Value;
1005 function Discriminant_Number (Id : E) return U is
1007 pragma Assert (Ekind (Id) = E_Discriminant);
1009 end Discriminant_Number;
1011 function Dispatch_Table_Wrappers (Id : E) return L is
1013 pragma Assert (Ekind_In (Id, E_Record_Type,
1015 return Elist26 (Implementation_Base_Type (Id));
1016 end Dispatch_Table_Wrappers;
1018 function DT_Entry_Count (Id : E) return U is
1020 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1024 function DT_Offset_To_Top_Func (Id : E) return E is
1026 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
1028 end DT_Offset_To_Top_Func;
1030 function DT_Position (Id : E) return U is
1032 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
1033 and then Present (DTC_Entity (Id)));
1037 function DTC_Entity (Id : E) return E is
1039 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1043 function Elaborate_Body_Desirable (Id : E) return B is
1045 pragma Assert (Ekind (Id) = E_Package);
1046 return Flag210 (Id);
1047 end Elaborate_Body_Desirable;
1049 function Elaboration_Entity (Id : E) return E is
1054 Ekind (Id) = E_Package
1056 Is_Generic_Unit (Id));
1058 end Elaboration_Entity;
1060 function Elaboration_Entity_Required (Id : E) return B is
1065 Ekind (Id) = E_Package
1067 Is_Generic_Unit (Id));
1068 return Flag174 (Id);
1069 end Elaboration_Entity_Required;
1071 function Encapsulating_State (Id : E) return N is
1073 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
1075 end Encapsulating_State;
1077 function Enclosing_Scope (Id : E) return E is
1080 end Enclosing_Scope;
1082 function Entry_Accepted (Id : E) return B is
1084 pragma Assert (Is_Entry (Id));
1085 return Flag152 (Id);
1088 function Entry_Bodies_Array (Id : E) return E is
1091 end Entry_Bodies_Array;
1093 function Entry_Cancel_Parameter (Id : E) return E is
1096 end Entry_Cancel_Parameter;
1098 function Entry_Component (Id : E) return E is
1101 end Entry_Component;
1103 function Entry_Formal (Id : E) return E is
1108 function Entry_Index_Constant (Id : E) return N is
1110 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
1112 end Entry_Index_Constant;
1114 function Contract (Id : E) return N is
1117 (Ekind_In (Id, E_Entry,
1124 or else Is_Generic_Subprogram (Id)
1125 or else Is_Subprogram (Id));
1129 function Entry_Parameters_Type (Id : E) return E is
1132 end Entry_Parameters_Type;
1134 function Enum_Pos_To_Rep (Id : E) return E is
1136 pragma Assert (Ekind (Id) = E_Enumeration_Type);
1138 end Enum_Pos_To_Rep;
1140 function Enumeration_Pos (Id : E) return Uint is
1142 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1144 end Enumeration_Pos;
1146 function Enumeration_Rep (Id : E) return U is
1148 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1150 end Enumeration_Rep;
1152 function Enumeration_Rep_Expr (Id : E) return N is
1154 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1156 end Enumeration_Rep_Expr;
1158 function Equivalent_Type (Id : E) return E is
1161 (Ekind_In (Id, E_Class_Wide_Type,
1162 E_Class_Wide_Subtype,
1163 E_Access_Subprogram_Type,
1164 E_Access_Protected_Subprogram_Type,
1165 E_Anonymous_Access_Protected_Subprogram_Type,
1166 E_Access_Subprogram_Type,
1169 end Equivalent_Type;
1171 function Esize (Id : E) return Uint is
1176 function Exception_Code (Id : E) return Uint is
1178 pragma Assert (Ekind (Id) = E_Exception);
1182 function Extra_Accessibility (Id : E) return E is
1185 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
1187 end Extra_Accessibility;
1189 function Extra_Accessibility_Of_Result (Id : E) return E is
1191 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
1193 end Extra_Accessibility_Of_Result;
1195 function Extra_Constrained (Id : E) return E is
1197 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1199 end Extra_Constrained;
1201 function Extra_Formal (Id : E) return E is
1206 function Extra_Formals (Id : E) return E is
1209 (Is_Overloadable (Id)
1210 or else Ekind_In (Id, E_Entry_Family,
1212 E_Subprogram_Type));
1216 function Can_Use_Internal_Rep (Id : E) return B is
1218 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1219 return Flag229 (Base_Type (Id));
1220 end Can_Use_Internal_Rep;
1222 function Finalization_Master (Id : E) return E is
1224 pragma Assert (Is_Access_Type (Id));
1225 return Node23 (Root_Type (Id));
1226 end Finalization_Master;
1228 function Finalize_Storage_Only (Id : E) return B is
1230 pragma Assert (Is_Type (Id));
1231 return Flag158 (Base_Type (Id));
1232 end Finalize_Storage_Only;
1234 function Finalizer (Id : E) return E is
1236 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
1240 function First_Entity (Id : E) return E is
1245 function First_Exit_Statement (Id : E) return N is
1247 pragma Assert (Ekind (Id) = E_Loop);
1249 end First_Exit_Statement;
1251 function First_Index (Id : E) return N is
1253 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1257 function First_Literal (Id : E) return E is
1259 pragma Assert (Is_Enumeration_Type (Id));
1263 function First_Optional_Parameter (Id : E) return E is
1265 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1267 end First_Optional_Parameter;
1269 function First_Private_Entity (Id : E) return E is
1271 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1272 or else Ekind (Id) in Concurrent_Kind);
1274 end First_Private_Entity;
1276 function First_Rep_Item (Id : E) return E is
1281 function Freeze_Node (Id : E) return N is
1286 function From_Limited_With (Id : E) return B is
1288 return Flag159 (Id);
1289 end From_Limited_With;
1291 function Full_View (Id : E) return E is
1293 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1297 function Generic_Homonym (Id : E) return E is
1299 pragma Assert (Ekind (Id) = E_Generic_Package);
1301 end Generic_Homonym;
1303 function Generic_Renamings (Id : E) return L is
1305 return Elist23 (Id);
1306 end Generic_Renamings;
1308 function Handler_Records (Id : E) return S is
1311 end Handler_Records;
1313 function Has_Aliased_Components (Id : E) return B is
1315 return Flag135 (Implementation_Base_Type (Id));
1316 end Has_Aliased_Components;
1318 function Has_Alignment_Clause (Id : E) return B is
1321 end Has_Alignment_Clause;
1323 function Has_All_Calls_Remote (Id : E) return B is
1326 end Has_All_Calls_Remote;
1328 function Has_Anonymous_Master (Id : E) return B is
1331 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
1332 return Flag253 (Id);
1333 end Has_Anonymous_Master;
1335 function Has_Atomic_Components (Id : E) return B is
1337 return Flag86 (Implementation_Base_Type (Id));
1338 end Has_Atomic_Components;
1340 function Has_Biased_Representation (Id : E) return B is
1342 return Flag139 (Id);
1343 end Has_Biased_Representation;
1345 function Has_Completion (Id : E) return B is
1350 function Has_Completion_In_Body (Id : E) return B is
1352 pragma Assert (Is_Type (Id));
1354 end Has_Completion_In_Body;
1356 function Has_Complex_Representation (Id : E) return B is
1358 pragma Assert (Is_Type (Id));
1359 return Flag140 (Implementation_Base_Type (Id));
1360 end Has_Complex_Representation;
1362 function Has_Component_Size_Clause (Id : E) return B is
1364 pragma Assert (Is_Array_Type (Id));
1365 return Flag68 (Implementation_Base_Type (Id));
1366 end Has_Component_Size_Clause;
1368 function Has_Constrained_Partial_View (Id : E) return B is
1370 pragma Assert (Is_Type (Id));
1371 return Flag187 (Id);
1372 end Has_Constrained_Partial_View;
1374 function Has_Controlled_Component (Id : E) return B is
1376 return Flag43 (Base_Type (Id));
1377 end Has_Controlled_Component;
1379 function Has_Contiguous_Rep (Id : E) return B is
1381 return Flag181 (Id);
1382 end Has_Contiguous_Rep;
1384 function Has_Controlling_Result (Id : E) return B is
1387 end Has_Controlling_Result;
1389 function Has_Convention_Pragma (Id : E) return B is
1391 return Flag119 (Id);
1392 end Has_Convention_Pragma;
1394 function Has_Default_Aspect (Id : E) return B is
1396 return Flag39 (Base_Type (Id));
1397 end Has_Default_Aspect;
1399 function Has_Delayed_Aspects (Id : E) return B is
1401 pragma Assert (Nkind (Id) in N_Entity);
1402 return Flag200 (Id);
1403 end Has_Delayed_Aspects;
1405 function Has_Delayed_Freeze (Id : E) return B is
1407 pragma Assert (Nkind (Id) in N_Entity);
1409 end Has_Delayed_Freeze;
1411 function Has_Delayed_Rep_Aspects (Id : E) return B is
1413 pragma Assert (Nkind (Id) in N_Entity);
1414 return Flag261 (Id);
1415 end Has_Delayed_Rep_Aspects;
1417 function Has_Discriminants (Id : E) return B is
1419 pragma Assert (Nkind (Id) in N_Entity);
1421 end Has_Discriminants;
1423 function Has_Dispatch_Table (Id : E) return B is
1425 pragma Assert (Is_Tagged_Type (Id));
1426 return Flag220 (Id);
1427 end Has_Dispatch_Table;
1429 function Has_Dynamic_Predicate_Aspect (Id : E) return B is
1431 pragma Assert (Is_Type (Id));
1432 return Flag258 (Id);
1433 end Has_Dynamic_Predicate_Aspect;
1435 function Has_Enumeration_Rep_Clause (Id : E) return B is
1437 pragma Assert (Is_Enumeration_Type (Id));
1439 end Has_Enumeration_Rep_Clause;
1441 function Has_Exit (Id : E) return B is
1446 function Has_Forward_Instantiation (Id : E) return B is
1448 return Flag175 (Id);
1449 end Has_Forward_Instantiation;
1451 function Has_Fully_Qualified_Name (Id : E) return B is
1453 return Flag173 (Id);
1454 end Has_Fully_Qualified_Name;
1456 function Has_Gigi_Rep_Item (Id : E) return B is
1459 end Has_Gigi_Rep_Item;
1461 function Has_Homonym (Id : E) return B is
1466 function Has_Implicit_Dereference (Id : E) return B is
1468 return Flag251 (Id);
1469 end Has_Implicit_Dereference;
1471 function Has_Independent_Components (Id : E) return B is
1473 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
1474 return Flag34 (Base_Type (Id));
1475 end Has_Independent_Components;
1477 function Has_Inheritable_Invariants (Id : E) return B is
1479 pragma Assert (Is_Type (Id));
1480 return Flag248 (Id);
1481 end Has_Inheritable_Invariants;
1483 function Has_Initial_Value (Id : E) return B is
1485 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1486 return Flag219 (Id);
1487 end Has_Initial_Value;
1489 function Has_Invariants (Id : E) return B is
1491 pragma Assert (Is_Type (Id));
1492 return Flag232 (Id);
1495 function Has_Loop_Entry_Attributes (Id : E) return B is
1497 pragma Assert (Ekind (Id) = E_Loop);
1498 return Flag260 (Id);
1499 end Has_Loop_Entry_Attributes;
1501 function Has_Machine_Radix_Clause (Id : E) return B is
1503 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1505 end Has_Machine_Radix_Clause;
1507 function Has_Master_Entity (Id : E) return B is
1510 end Has_Master_Entity;
1512 function Has_Missing_Return (Id : E) return B is
1514 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1515 return Flag142 (Id);
1516 end Has_Missing_Return;
1518 function Has_Nested_Block_With_Handler (Id : E) return B is
1520 return Flag101 (Id);
1521 end Has_Nested_Block_With_Handler;
1523 function Has_Non_Standard_Rep (Id : E) return B is
1525 return Flag75 (Implementation_Base_Type (Id));
1526 end Has_Non_Standard_Rep;
1528 function Has_Object_Size_Clause (Id : E) return B is
1530 pragma Assert (Is_Type (Id));
1531 return Flag172 (Id);
1532 end Has_Object_Size_Clause;
1534 function Has_Out_Or_In_Out_Parameter (Id : E) return B is
1536 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1537 return Flag110 (Id);
1538 end Has_Out_Or_In_Out_Parameter;
1540 function Has_Per_Object_Constraint (Id : E) return B is
1542 return Flag154 (Id);
1543 end Has_Per_Object_Constraint;
1545 function Has_Postconditions (Id : E) return B is
1547 pragma Assert (Is_Subprogram (Id));
1548 return Flag240 (Id);
1549 end Has_Postconditions;
1551 function Has_Pragma_Controlled (Id : E) return B is
1553 pragma Assert (Is_Access_Type (Id));
1554 return Flag27 (Implementation_Base_Type (Id));
1555 end Has_Pragma_Controlled;
1557 function Has_Pragma_Elaborate_Body (Id : E) return B is
1559 return Flag150 (Id);
1560 end Has_Pragma_Elaborate_Body;
1562 function Has_Pragma_Inline (Id : E) return B is
1564 return Flag157 (Id);
1565 end Has_Pragma_Inline;
1567 function Has_Pragma_Inline_Always (Id : E) return B is
1569 return Flag230 (Id);
1570 end Has_Pragma_Inline_Always;
1572 function Has_Pragma_No_Inline (Id : E) return B is
1574 return Flag201 (Id);
1575 end Has_Pragma_No_Inline;
1577 function Has_Pragma_Ordered (Id : E) return B is
1579 pragma Assert (Is_Enumeration_Type (Id));
1580 return Flag198 (Implementation_Base_Type (Id));
1581 end Has_Pragma_Ordered;
1583 function Has_Pragma_Pack (Id : E) return B is
1585 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1586 return Flag121 (Implementation_Base_Type (Id));
1587 end Has_Pragma_Pack;
1589 function Has_Pragma_Preelab_Init (Id : E) return B is
1591 return Flag221 (Id);
1592 end Has_Pragma_Preelab_Init;
1594 function Has_Pragma_Pure (Id : E) return B is
1596 return Flag203 (Id);
1597 end Has_Pragma_Pure;
1599 function Has_Pragma_Pure_Function (Id : E) return B is
1601 return Flag179 (Id);
1602 end Has_Pragma_Pure_Function;
1604 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1606 return Flag169 (Id);
1607 end Has_Pragma_Thread_Local_Storage;
1609 function Has_Pragma_Unmodified (Id : E) return B is
1611 return Flag233 (Id);
1612 end Has_Pragma_Unmodified;
1614 function Has_Pragma_Unreferenced (Id : E) return B is
1616 return Flag180 (Id);
1617 end Has_Pragma_Unreferenced;
1619 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1621 pragma Assert (Is_Type (Id));
1622 return Flag212 (Id);
1623 end Has_Pragma_Unreferenced_Objects;
1625 function Has_Predicates (Id : E) return B is
1627 pragma Assert (Is_Type (Id));
1628 return Flag250 (Id);
1631 function Has_Primitive_Operations (Id : E) return B is
1633 pragma Assert (Is_Type (Id));
1634 return Flag120 (Base_Type (Id));
1635 end Has_Primitive_Operations;
1637 function Has_Private_Ancestor (Id : E) return B is
1639 return Flag151 (Id);
1640 end Has_Private_Ancestor;
1642 function Has_Private_Declaration (Id : E) return B is
1644 return Flag155 (Id);
1645 end Has_Private_Declaration;
1647 function Has_Qualified_Name (Id : E) return B is
1649 return Flag161 (Id);
1650 end Has_Qualified_Name;
1652 function Has_RACW (Id : E) return B is
1654 pragma Assert (Ekind (Id) = E_Package);
1655 return Flag214 (Id);
1658 function Has_Record_Rep_Clause (Id : E) return B is
1660 pragma Assert (Is_Record_Type (Id));
1661 return Flag65 (Implementation_Base_Type (Id));
1662 end Has_Record_Rep_Clause;
1664 function Has_Recursive_Call (Id : E) return B is
1666 pragma Assert (Is_Subprogram (Id));
1667 return Flag143 (Id);
1668 end Has_Recursive_Call;
1670 function Has_Shift_Operator (Id : E) return B is
1672 pragma Assert (Is_Integer_Type (Id));
1673 return Flag267 (Base_Type (Id));
1674 end Has_Shift_Operator;
1676 function Has_Size_Clause (Id : E) return B is
1679 end Has_Size_Clause;
1681 function Has_Small_Clause (Id : E) return B is
1684 end Has_Small_Clause;
1686 function Has_Specified_Layout (Id : E) return B is
1688 pragma Assert (Is_Type (Id));
1689 return Flag100 (Implementation_Base_Type (Id));
1690 end Has_Specified_Layout;
1692 function Has_Specified_Stream_Input (Id : E) return B is
1694 pragma Assert (Is_Type (Id));
1695 return Flag190 (Id);
1696 end Has_Specified_Stream_Input;
1698 function Has_Specified_Stream_Output (Id : E) return B is
1700 pragma Assert (Is_Type (Id));
1701 return Flag191 (Id);
1702 end Has_Specified_Stream_Output;
1704 function Has_Specified_Stream_Read (Id : E) return B is
1706 pragma Assert (Is_Type (Id));
1707 return Flag192 (Id);
1708 end Has_Specified_Stream_Read;
1710 function Has_Specified_Stream_Write (Id : E) return B is
1712 pragma Assert (Is_Type (Id));
1713 return Flag193 (Id);
1714 end Has_Specified_Stream_Write;
1716 function Has_Static_Discriminants (Id : E) return B is
1718 pragma Assert (Is_Type (Id));
1719 return Flag211 (Id);
1720 end Has_Static_Discriminants;
1722 function Has_Static_Predicate_Aspect (Id : E) return B is
1724 pragma Assert (Is_Type (Id));
1725 return Flag259 (Id);
1726 end Has_Static_Predicate_Aspect;
1728 function Has_Storage_Size_Clause (Id : E) return B is
1730 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1731 return Flag23 (Implementation_Base_Type (Id));
1732 end Has_Storage_Size_Clause;
1734 function Has_Stream_Size_Clause (Id : E) return B is
1736 return Flag184 (Id);
1737 end Has_Stream_Size_Clause;
1739 function Has_Task (Id : E) return B is
1741 return Flag30 (Base_Type (Id));
1744 function Has_Thunks (Id : E) return B is
1746 return Flag228 (Id);
1749 function Has_Unchecked_Union (Id : E) return B is
1751 return Flag123 (Base_Type (Id));
1752 end Has_Unchecked_Union;
1754 function Has_Unknown_Discriminants (Id : E) return B is
1756 pragma Assert (Is_Type (Id));
1758 end Has_Unknown_Discriminants;
1760 function Has_Up_Level_Access (Id : E) return B is
1763 (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
1764 return Flag215 (Id);
1765 end Has_Up_Level_Access;
1767 function Has_Visible_Refinement (Id : E) return B is
1769 pragma Assert (Ekind (Id) = E_Abstract_State);
1770 return Flag263 (Id);
1771 end Has_Visible_Refinement;
1773 function Has_Volatile_Components (Id : E) return B is
1775 return Flag87 (Implementation_Base_Type (Id));
1776 end Has_Volatile_Components;
1778 function Has_Xref_Entry (Id : E) return B is
1780 return Flag182 (Id);
1783 function Hiding_Loop_Variable (Id : E) return E is
1785 pragma Assert (Ekind (Id) = E_Variable);
1787 end Hiding_Loop_Variable;
1789 function Homonym (Id : E) return E is
1794 function Import_Pragma (Id : E) return E is
1796 pragma Assert (Is_Subprogram (Id));
1800 function Interface_Alias (Id : E) return E is
1802 pragma Assert (Is_Subprogram (Id));
1804 end Interface_Alias;
1806 function Interfaces (Id : E) return L is
1808 pragma Assert (Is_Record_Type (Id));
1809 return Elist25 (Id);
1812 function In_Package_Body (Id : E) return B is
1815 end In_Package_Body;
1817 function In_Private_Part (Id : E) return B is
1820 end In_Private_Part;
1822 function In_Use (Id : E) return B is
1824 pragma Assert (Nkind (Id) in N_Entity);
1828 function Initialization_Statements (Id : E) return N is
1830 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
1832 end Initialization_Statements;
1834 function Inner_Instances (Id : E) return L is
1836 return Elist23 (Id);
1837 end Inner_Instances;
1839 function Interface_Name (Id : E) return N is
1844 function Is_Abstract_Subprogram (Id : E) return B is
1846 pragma Assert (Is_Overloadable (Id));
1848 end Is_Abstract_Subprogram;
1850 function Is_Abstract_Type (Id : E) return B is
1852 pragma Assert (Is_Type (Id));
1853 return Flag146 (Id);
1854 end Is_Abstract_Type;
1856 function Is_Local_Anonymous_Access (Id : E) return B is
1858 pragma Assert (Is_Access_Type (Id));
1859 return Flag194 (Id);
1860 end Is_Local_Anonymous_Access;
1862 function Is_Access_Constant (Id : E) return B is
1864 pragma Assert (Is_Access_Type (Id));
1866 end Is_Access_Constant;
1868 function Is_Ada_2005_Only (Id : E) return B is
1870 return Flag185 (Id);
1871 end Is_Ada_2005_Only;
1873 function Is_Ada_2012_Only (Id : E) return B is
1875 return Flag199 (Id);
1876 end Is_Ada_2012_Only;
1878 function Is_Aliased (Id : E) return B is
1880 pragma Assert (Nkind (Id) in N_Entity);
1884 function Is_AST_Entry (Id : E) return B is
1886 pragma Assert (Is_Entry (Id));
1887 return Flag132 (Id);
1890 function Is_Asynchronous (Id : E) return B is
1892 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1894 end Is_Asynchronous;
1896 function Is_Atomic (Id : E) return B is
1901 function Is_Bit_Packed_Array (Id : E) return B is
1903 return Flag122 (Implementation_Base_Type (Id));
1904 end Is_Bit_Packed_Array;
1906 function Is_Called (Id : E) return B is
1908 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1909 return Flag102 (Id);
1912 function Is_Character_Type (Id : E) return B is
1915 end Is_Character_Type;
1917 function Is_Child_Unit (Id : E) return B is
1922 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1925 end Is_Class_Wide_Equivalent_Type;
1927 function Is_Compilation_Unit (Id : E) return B is
1929 return Flag149 (Id);
1930 end Is_Compilation_Unit;
1932 function Is_Completely_Hidden (Id : E) return B is
1934 pragma Assert (Ekind (Id) = E_Discriminant);
1935 return Flag103 (Id);
1936 end Is_Completely_Hidden;
1938 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1941 end Is_Constr_Subt_For_U_Nominal;
1943 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1945 return Flag141 (Id);
1946 end Is_Constr_Subt_For_UN_Aliased;
1948 function Is_Constrained (Id : E) return B is
1950 pragma Assert (Nkind (Id) in N_Entity);
1954 function Is_Constructor (Id : E) return B is
1959 function Is_Controlled (Id : E) return B is
1961 return Flag42 (Base_Type (Id));
1964 function Is_Controlling_Formal (Id : E) return B is
1966 pragma Assert (Is_Formal (Id));
1968 end Is_Controlling_Formal;
1970 function Is_CPP_Class (Id : E) return B is
1975 function Is_Descendent_Of_Address (Id : E) return B is
1977 return Flag223 (Id);
1978 end Is_Descendent_Of_Address;
1980 function Is_Discrim_SO_Function (Id : E) return B is
1982 return Flag176 (Id);
1983 end Is_Discrim_SO_Function;
1985 function Is_Discriminant_Check_Function (Id : E) return B is
1987 return Flag264 (Id);
1988 end Is_Discriminant_Check_Function;
1990 function Is_Dispatch_Table_Entity (Id : E) return B is
1992 return Flag234 (Id);
1993 end Is_Dispatch_Table_Entity;
1995 function Is_Dispatching_Operation (Id : E) return B is
1997 pragma Assert (Nkind (Id) in N_Entity);
1999 end Is_Dispatching_Operation;
2001 function Is_Eliminated (Id : E) return B is
2003 return Flag124 (Id);
2006 function Is_Entry_Formal (Id : E) return B is
2009 end Is_Entry_Formal;
2011 function Is_Exported (Id : E) return B is
2016 function Is_First_Subtype (Id : E) return B is
2019 end Is_First_Subtype;
2021 function Is_For_Access_Subtype (Id : E) return B is
2023 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
2024 return Flag118 (Id);
2025 end Is_For_Access_Subtype;
2027 function Is_Formal_Subprogram (Id : E) return B is
2029 return Flag111 (Id);
2030 end Is_Formal_Subprogram;
2032 function Is_Frozen (Id : E) return B is
2037 function Is_Generic_Actual_Type (Id : E) return B is
2039 pragma Assert (Is_Type (Id));
2041 end Is_Generic_Actual_Type;
2043 function Is_Generic_Instance (Id : E) return B is
2045 return Flag130 (Id);
2046 end Is_Generic_Instance;
2048 function Is_Generic_Type (Id : E) return B is
2050 pragma Assert (Nkind (Id) in N_Entity);
2052 end Is_Generic_Type;
2054 function Is_Hidden (Id : E) return B is
2059 function Is_Hidden_Open_Scope (Id : E) return B is
2061 return Flag171 (Id);
2062 end Is_Hidden_Open_Scope;
2064 function Is_Immediately_Visible (Id : E) return B is
2066 pragma Assert (Nkind (Id) in N_Entity);
2068 end Is_Immediately_Visible;
2070 function Is_Implementation_Defined (Id : E) return B is
2072 return Flag254 (Id);
2073 end Is_Implementation_Defined;
2075 function Is_Imported (Id : E) return B is
2080 function Is_Independent (Id : E) return B is
2082 pragma Assert (Ekind (Id) = E_Component);
2083 return Flag268 (Id);
2086 function Is_Inlined (Id : E) return B is
2091 function Is_Interface (Id : E) return B is
2093 return Flag186 (Id);
2096 function Is_Instantiated (Id : E) return B is
2098 return Flag126 (Id);
2099 end Is_Instantiated;
2101 function Is_Internal (Id : E) return B is
2103 pragma Assert (Nkind (Id) in N_Entity);
2107 function Is_Interrupt_Handler (Id : E) return B is
2109 pragma Assert (Nkind (Id) in N_Entity);
2111 end Is_Interrupt_Handler;
2113 function Is_Intrinsic_Subprogram (Id : E) return B is
2116 end Is_Intrinsic_Subprogram;
2118 function Is_Invariant_Procedure (Id : E) return B is
2120 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2121 return Flag257 (Id);
2122 end Is_Invariant_Procedure;
2124 function Is_Itype (Id : E) return B is
2129 function Is_Known_Non_Null (Id : E) return B is
2132 end Is_Known_Non_Null;
2134 function Is_Known_Null (Id : E) return B is
2136 return Flag204 (Id);
2139 function Is_Known_Valid (Id : E) return B is
2141 return Flag170 (Id);
2144 function Is_Limited_Composite (Id : E) return B is
2146 return Flag106 (Id);
2147 end Is_Limited_Composite;
2149 function Is_Limited_Interface (Id : E) return B is
2151 return Flag197 (Id);
2152 end Is_Limited_Interface;
2154 function Is_Limited_Record (Id : E) return B is
2157 end Is_Limited_Record;
2159 function Is_Machine_Code_Subprogram (Id : E) return B is
2161 pragma Assert (Is_Subprogram (Id));
2162 return Flag137 (Id);
2163 end Is_Machine_Code_Subprogram;
2165 function Is_Non_Static_Subtype (Id : E) return B is
2167 pragma Assert (Is_Type (Id));
2168 return Flag109 (Id);
2169 end Is_Non_Static_Subtype;
2171 function Is_Null_Init_Proc (Id : E) return B is
2173 pragma Assert (Ekind (Id) = E_Procedure);
2174 return Flag178 (Id);
2175 end Is_Null_Init_Proc;
2177 function Is_Obsolescent (Id : E) return B is
2179 return Flag153 (Id);
2182 function Is_Only_Out_Parameter (Id : E) return B is
2184 pragma Assert (Is_Formal (Id));
2185 return Flag226 (Id);
2186 end Is_Only_Out_Parameter;
2188 function Is_Optional_Parameter (Id : E) return B is
2190 pragma Assert (Is_Formal (Id));
2191 return Flag134 (Id);
2192 end Is_Optional_Parameter;
2194 function Is_Package_Body_Entity (Id : E) return B is
2196 return Flag160 (Id);
2197 end Is_Package_Body_Entity;
2199 function Is_Packed (Id : E) return B is
2201 return Flag51 (Implementation_Base_Type (Id));
2204 function Is_Packed_Array_Type (Id : E) return B is
2206 return Flag138 (Id);
2207 end Is_Packed_Array_Type;
2209 function Is_Potentially_Use_Visible (Id : E) return B is
2211 pragma Assert (Nkind (Id) in N_Entity);
2213 end Is_Potentially_Use_Visible;
2215 function Is_Predicate_Function (Id : E) return B is
2217 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2218 return Flag255 (Id);
2219 end Is_Predicate_Function;
2221 function Is_Predicate_Function_M (Id : E) return B is
2223 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2224 return Flag256 (Id);
2225 end Is_Predicate_Function_M;
2227 function Is_Preelaborated (Id : E) return B is
2230 end Is_Preelaborated;
2232 function Is_Primitive (Id : E) return B is
2235 (Is_Overloadable (Id)
2236 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
2237 return Flag218 (Id);
2240 function Is_Primitive_Wrapper (Id : E) return B is
2242 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2243 return Flag195 (Id);
2244 end Is_Primitive_Wrapper;
2246 function Is_Private_Composite (Id : E) return B is
2248 pragma Assert (Is_Type (Id));
2249 return Flag107 (Id);
2250 end Is_Private_Composite;
2252 function Is_Private_Descendant (Id : E) return B is
2255 end Is_Private_Descendant;
2257 function Is_Private_Primitive (Id : E) return B is
2259 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2260 return Flag245 (Id);
2261 end Is_Private_Primitive;
2263 function Is_Processed_Transient (Id : E) return B is
2265 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2266 return Flag252 (Id);
2267 end Is_Processed_Transient;
2269 function Is_Public (Id : E) return B is
2271 pragma Assert (Nkind (Id) in N_Entity);
2275 function Is_Pure (Id : E) return B is
2280 function Is_Pure_Unit_Access_Type (Id : E) return B is
2282 pragma Assert (Is_Access_Type (Id));
2283 return Flag189 (Id);
2284 end Is_Pure_Unit_Access_Type;
2286 function Is_RACW_Stub_Type (Id : E) return B is
2288 pragma Assert (Is_Type (Id));
2289 return Flag244 (Id);
2290 end Is_RACW_Stub_Type;
2292 function Is_Raised (Id : E) return B is
2294 pragma Assert (Ekind (Id) = E_Exception);
2295 return Flag224 (Id);
2298 function Is_Remote_Call_Interface (Id : E) return B is
2301 end Is_Remote_Call_Interface;
2303 function Is_Remote_Types (Id : E) return B is
2306 end Is_Remote_Types;
2308 function Is_Renaming_Of_Object (Id : E) return B is
2310 return Flag112 (Id);
2311 end Is_Renaming_Of_Object;
2313 function Is_Return_Object (Id : E) return B is
2315 return Flag209 (Id);
2316 end Is_Return_Object;
2318 function Is_Safe_To_Reevaluate (Id : E) return B is
2320 return Flag249 (Id);
2321 end Is_Safe_To_Reevaluate;
2323 function Is_Shared_Passive (Id : E) return B is
2326 end Is_Shared_Passive;
2328 function Is_Statically_Allocated (Id : E) return B is
2331 end Is_Statically_Allocated;
2333 function Is_Tag (Id : E) return B is
2335 pragma Assert (Nkind (Id) in N_Entity);
2339 function Is_Tagged_Type (Id : E) return B is
2344 function Is_Thunk (Id : E) return B is
2346 return Flag225 (Id);
2349 function Is_Trivial_Subprogram (Id : E) return B is
2351 return Flag235 (Id);
2352 end Is_Trivial_Subprogram;
2354 function Is_True_Constant (Id : E) return B is
2356 return Flag163 (Id);
2357 end Is_True_Constant;
2359 function Is_Unchecked_Union (Id : E) return B is
2361 return Flag117 (Implementation_Base_Type (Id));
2362 end Is_Unchecked_Union;
2364 function Is_Underlying_Record_View (Id : E) return B is
2366 return Flag246 (Id);
2367 end Is_Underlying_Record_View;
2369 function Is_Unsigned_Type (Id : E) return B is
2371 pragma Assert (Is_Type (Id));
2372 return Flag144 (Id);
2373 end Is_Unsigned_Type;
2375 function Is_Valued_Procedure (Id : E) return B is
2377 pragma Assert (Ekind (Id) = E_Procedure);
2378 return Flag127 (Id);
2379 end Is_Valued_Procedure;
2381 function Is_Visible_Formal (Id : E) return B is
2383 return Flag206 (Id);
2384 end Is_Visible_Formal;
2386 function Is_Visible_Lib_Unit (Id : E) return B is
2388 return Flag116 (Id);
2389 end Is_Visible_Lib_Unit;
2391 function Is_VMS_Exception (Id : E) return B is
2393 return Flag133 (Id);
2394 end Is_VMS_Exception;
2396 function Is_Volatile (Id : E) return B is
2398 pragma Assert (Nkind (Id) in N_Entity);
2400 if Is_Type (Id) then
2401 return Flag16 (Base_Type (Id));
2407 function Itype_Printed (Id : E) return B is
2409 pragma Assert (Is_Itype (Id));
2410 return Flag202 (Id);
2413 function Kill_Elaboration_Checks (Id : E) return B is
2416 end Kill_Elaboration_Checks;
2418 function Kill_Range_Checks (Id : E) return B is
2421 end Kill_Range_Checks;
2423 function Known_To_Have_Preelab_Init (Id : E) return B is
2425 pragma Assert (Is_Type (Id));
2426 return Flag207 (Id);
2427 end Known_To_Have_Preelab_Init;
2429 function Last_Aggregate_Assignment (Id : E) return N is
2431 pragma Assert (Ekind (Id) = E_Variable);
2433 end Last_Aggregate_Assignment;
2435 function Last_Assignment (Id : E) return N is
2437 pragma Assert (Is_Assignable (Id));
2439 end Last_Assignment;
2441 function Last_Entity (Id : E) return E is
2446 function Limited_View (Id : E) return E is
2448 pragma Assert (Ekind (Id) = E_Package);
2452 function Linker_Section_Pragma (Id : E) return N is
2455 (Is_Type (Id) or else Is_Object (Id) or else Is_Subprogram (Id));
2457 end Linker_Section_Pragma;
2459 function Lit_Indexes (Id : E) return E is
2461 pragma Assert (Is_Enumeration_Type (Id));
2465 function Lit_Strings (Id : E) return E is
2467 pragma Assert (Is_Enumeration_Type (Id));
2471 function Low_Bound_Tested (Id : E) return B is
2473 return Flag205 (Id);
2474 end Low_Bound_Tested;
2476 function Machine_Radix_10 (Id : E) return B is
2478 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2480 end Machine_Radix_10;
2482 function Master_Id (Id : E) return E is
2484 pragma Assert (Is_Access_Type (Id));
2488 function Materialize_Entity (Id : E) return B is
2490 return Flag168 (Id);
2491 end Materialize_Entity;
2493 function May_Inherit_Delayed_Rep_Aspects (Id : E) return B is
2495 return Flag262 (Id);
2496 end May_Inherit_Delayed_Rep_Aspects;
2498 function Mechanism (Id : E) return M is
2500 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2501 return UI_To_Int (Uint8 (Id));
2504 function Modulus (Id : E) return Uint is
2506 pragma Assert (Is_Modular_Integer_Type (Id));
2507 return Uint17 (Base_Type (Id));
2510 function Must_Be_On_Byte_Boundary (Id : E) return B is
2512 pragma Assert (Is_Type (Id));
2513 return Flag183 (Id);
2514 end Must_Be_On_Byte_Boundary;
2516 function Must_Have_Preelab_Init (Id : E) return B is
2518 pragma Assert (Is_Type (Id));
2519 return Flag208 (Id);
2520 end Must_Have_Preelab_Init;
2522 function Needs_Debug_Info (Id : E) return B is
2524 return Flag147 (Id);
2525 end Needs_Debug_Info;
2527 function Needs_No_Actuals (Id : E) return B is
2530 (Is_Overloadable (Id)
2531 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2533 end Needs_No_Actuals;
2535 function Never_Set_In_Source (Id : E) return B is
2537 return Flag115 (Id);
2538 end Never_Set_In_Source;
2540 function Next_Inlined_Subprogram (Id : E) return E is
2543 end Next_Inlined_Subprogram;
2545 function No_Pool_Assigned (Id : E) return B is
2547 pragma Assert (Is_Access_Type (Id));
2548 return Flag131 (Root_Type (Id));
2549 end No_Pool_Assigned;
2551 function No_Return (Id : E) return B is
2553 return Flag113 (Id);
2556 function No_Strict_Aliasing (Id : E) return B is
2558 pragma Assert (Is_Access_Type (Id));
2559 return Flag136 (Base_Type (Id));
2560 end No_Strict_Aliasing;
2562 function Non_Binary_Modulus (Id : E) return B is
2564 pragma Assert (Is_Type (Id));
2565 return Flag58 (Base_Type (Id));
2566 end Non_Binary_Modulus;
2568 function Non_Limited_View (Id : E) return E is
2571 (Ekind (Id) in Incomplete_Kind or else Ekind (Id) = E_Abstract_State);
2573 end Non_Limited_View;
2575 function Nonzero_Is_True (Id : E) return B is
2577 pragma Assert (Root_Type (Id) = Standard_Boolean);
2578 return Flag162 (Base_Type (Id));
2579 end Nonzero_Is_True;
2581 function Normalized_First_Bit (Id : E) return U is
2583 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2585 end Normalized_First_Bit;
2587 function Normalized_Position (Id : E) return U is
2589 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2591 end Normalized_Position;
2593 function Normalized_Position_Max (Id : E) return U is
2595 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2597 end Normalized_Position_Max;
2599 function OK_To_Rename (Id : E) return B is
2601 pragma Assert (Ekind (Id) = E_Variable);
2602 return Flag247 (Id);
2605 function OK_To_Reorder_Components (Id : E) return B is
2607 pragma Assert (Is_Record_Type (Id));
2608 return Flag239 (Base_Type (Id));
2609 end OK_To_Reorder_Components;
2611 function Optimize_Alignment_Space (Id : E) return B is
2614 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2615 return Flag241 (Id);
2616 end Optimize_Alignment_Space;
2618 function Optimize_Alignment_Time (Id : E) return B is
2621 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2622 return Flag242 (Id);
2623 end Optimize_Alignment_Time;
2625 function Original_Access_Type (Id : E) return E is
2627 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2629 end Original_Access_Type;
2631 function Original_Array_Type (Id : E) return E is
2633 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2635 end Original_Array_Type;
2637 function Original_Record_Component (Id : E) return E is
2639 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2641 end Original_Record_Component;
2643 function Overlays_Constant (Id : E) return B is
2645 return Flag243 (Id);
2646 end Overlays_Constant;
2648 function Overridden_Operation (Id : E) return E is
2651 end Overridden_Operation;
2653 function Package_Instantiation (Id : E) return N is
2655 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2657 end Package_Instantiation;
2659 function Packed_Array_Type (Id : E) return E is
2661 pragma Assert (Is_Array_Type (Id));
2663 end Packed_Array_Type;
2665 function Parent_Subtype (Id : E) return E is
2667 pragma Assert (Is_Record_Type (Id));
2668 return Node19 (Base_Type (Id));
2671 function Part_Of_Constituents (Id : E) return L is
2673 pragma Assert (Ekind (Id) = E_Abstract_State);
2675 end Part_Of_Constituents;
2677 function Postcondition_Proc (Id : E) return E is
2679 pragma Assert (Ekind (Id) = E_Procedure);
2681 end Postcondition_Proc;
2683 function PPC_Wrapper (Id : E) return E is
2685 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2689 function Prival (Id : E) return E is
2691 pragma Assert (Is_Protected_Component (Id));
2695 function Prival_Link (Id : E) return E is
2697 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2701 function Private_Dependents (Id : E) return L is
2703 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2704 return Elist18 (Id);
2705 end Private_Dependents;
2707 function Private_View (Id : E) return N is
2709 pragma Assert (Is_Private_Type (Id));
2713 function Protected_Body_Subprogram (Id : E) return E is
2715 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2717 end Protected_Body_Subprogram;
2719 function Protected_Formal (Id : E) return E is
2721 pragma Assert (Is_Formal (Id));
2723 end Protected_Formal;
2725 function Protection_Object (Id : E) return E is
2728 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2730 end Protection_Object;
2732 function Reachable (Id : E) return B is
2737 function Referenced (Id : E) return B is
2739 return Flag156 (Id);
2742 function Referenced_As_LHS (Id : E) return B is
2745 end Referenced_As_LHS;
2747 function Referenced_As_Out_Parameter (Id : E) return B is
2749 return Flag227 (Id);
2750 end Referenced_As_Out_Parameter;
2752 function Refinement_Constituents (Id : E) return L is
2754 pragma Assert (Ekind (Id) = E_Abstract_State);
2756 end Refinement_Constituents;
2758 function Register_Exception_Call (Id : E) return N is
2760 pragma Assert (Ekind (Id) = E_Exception);
2762 end Register_Exception_Call;
2764 function Related_Array_Object (Id : E) return E is
2766 pragma Assert (Is_Array_Type (Id));
2768 end Related_Array_Object;
2770 function Related_Expression (Id : E) return N is
2772 pragma Assert (Ekind (Id) in Type_Kind
2773 or else Ekind_In (Id, E_Constant, E_Variable));
2775 end Related_Expression;
2777 function Related_Instance (Id : E) return E is
2779 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2781 end Related_Instance;
2783 function Related_Type (Id : E) return E is
2785 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2789 function Relative_Deadline_Variable (Id : E) return E is
2791 pragma Assert (Is_Task_Type (Id));
2792 return Node26 (Implementation_Base_Type (Id));
2793 end Relative_Deadline_Variable;
2795 function Renamed_Entity (Id : E) return N is
2800 function Renamed_In_Spec (Id : E) return B is
2802 pragma Assert (Ekind (Id) = E_Package);
2803 return Flag231 (Id);
2804 end Renamed_In_Spec;
2806 function Renamed_Object (Id : E) return N is
2811 function Renaming_Map (Id : E) return U is
2816 function Requires_Overriding (Id : E) return B is
2818 pragma Assert (Is_Overloadable (Id));
2819 return Flag213 (Id);
2820 end Requires_Overriding;
2822 function Return_Present (Id : E) return B is
2827 function Return_Applies_To (Id : E) return N is
2830 end Return_Applies_To;
2832 function Returns_By_Ref (Id : E) return B is
2837 function Reverse_Bit_Order (Id : E) return B is
2839 pragma Assert (Is_Record_Type (Id));
2840 return Flag164 (Base_Type (Id));
2841 end Reverse_Bit_Order;
2843 function Reverse_Storage_Order (Id : E) return B is
2845 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
2846 return Flag93 (Base_Type (Id));
2847 end Reverse_Storage_Order;
2849 function RM_Size (Id : E) return U is
2851 pragma Assert (Is_Type (Id));
2855 function Scalar_Range (Id : E) return N is
2860 function Scale_Value (Id : E) return U is
2865 function Scope_Depth_Value (Id : E) return U is
2868 end Scope_Depth_Value;
2870 function Sec_Stack_Needed_For_Return (Id : E) return B is
2872 return Flag167 (Id);
2873 end Sec_Stack_Needed_For_Return;
2875 function Shadow_Entities (Id : E) return S is
2877 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2879 end Shadow_Entities;
2881 function Shared_Var_Procs_Instance (Id : E) return E is
2883 pragma Assert (Ekind (Id) = E_Variable);
2885 end Shared_Var_Procs_Instance;
2887 function Size_Check_Code (Id : E) return N is
2889 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2891 end Size_Check_Code;
2893 function Size_Depends_On_Discriminant (Id : E) return B is
2895 return Flag177 (Id);
2896 end Size_Depends_On_Discriminant;
2898 function Size_Known_At_Compile_Time (Id : E) return B is
2901 end Size_Known_At_Compile_Time;
2903 function Small_Value (Id : E) return R is
2905 pragma Assert (Is_Fixed_Point_Type (Id));
2906 return Ureal21 (Id);
2909 function SPARK_Aux_Pragma (Id : E) return N is
2912 (Ekind_In (Id, E_Generic_Package, -- package variants
2916 end SPARK_Aux_Pragma;
2918 function SPARK_Aux_Pragma_Inherited (Id : E) return B is
2921 (Ekind_In (Id, E_Generic_Package, -- package variants
2924 return Flag266 (Id);
2925 end SPARK_Aux_Pragma_Inherited;
2927 function SPARK_Pragma (Id : E) return N is
2930 (Ekind_In (Id, E_Function, -- subprogram variants
2932 E_Generic_Procedure,
2936 Ekind_In (Id, E_Generic_Package, -- package variants
2942 function SPARK_Pragma_Inherited (Id : E) return B is
2945 (Ekind_In (Id, E_Function, -- subprogram variants
2947 E_Generic_Procedure,
2951 Ekind_In (Id, E_Generic_Package, -- package variants
2954 return Flag265 (Id);
2955 end SPARK_Pragma_Inherited;
2957 function Spec_Entity (Id : E) return E is
2959 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2963 function Static_Predicate (Id : E) return S is
2965 pragma Assert (Is_Discrete_Type (Id));
2967 end Static_Predicate;
2969 function Status_Flag_Or_Transient_Decl (Id : E) return N is
2971 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2973 end Status_Flag_Or_Transient_Decl;
2975 function Storage_Size_Variable (Id : E) return E is
2977 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2978 return Node15 (Implementation_Base_Type (Id));
2979 end Storage_Size_Variable;
2981 function Static_Elaboration_Desired (Id : E) return B is
2983 pragma Assert (Ekind (Id) = E_Package);
2985 end Static_Elaboration_Desired;
2987 function Static_Initialization (Id : E) return N is
2990 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
2992 end Static_Initialization;
2994 function Stored_Constraint (Id : E) return L is
2997 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
2998 return Elist23 (Id);
2999 end Stored_Constraint;
3001 function Strict_Alignment (Id : E) return B is
3003 return Flag145 (Implementation_Base_Type (Id));
3004 end Strict_Alignment;
3006 function String_Literal_Length (Id : E) return U is
3009 end String_Literal_Length;
3011 function String_Literal_Low_Bound (Id : E) return N is
3014 end String_Literal_Low_Bound;
3016 function Subprograms_For_Type (Id : E) return E is
3018 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
3020 end Subprograms_For_Type;
3022 function Suppress_Elaboration_Warnings (Id : E) return B is
3024 return Flag148 (Id);
3025 end Suppress_Elaboration_Warnings;
3027 function Suppress_Initialization (Id : E) return B is
3029 pragma Assert (Is_Type (Id));
3030 return Flag105 (Id);
3031 end Suppress_Initialization;
3033 function Suppress_Style_Checks (Id : E) return B is
3035 return Flag165 (Id);
3036 end Suppress_Style_Checks;
3038 function Suppress_Value_Tracking_On_Call (Id : E) return B is
3040 return Flag217 (Id);
3041 end Suppress_Value_Tracking_On_Call;
3043 function Task_Body_Procedure (Id : E) return N is
3045 pragma Assert (Ekind (Id) in Task_Kind);
3047 end Task_Body_Procedure;
3049 function Thunk_Entity (Id : E) return E is
3051 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3052 and then Is_Thunk (Id));
3056 function Treat_As_Volatile (Id : E) return B is
3059 end Treat_As_Volatile;
3061 function Underlying_Full_View (Id : E) return E is
3063 pragma Assert (Ekind (Id) in Private_Kind);
3065 end Underlying_Full_View;
3067 function Underlying_Record_View (Id : E) return E is
3070 end Underlying_Record_View;
3072 function Universal_Aliasing (Id : E) return B is
3074 pragma Assert (Is_Type (Id));
3075 return Flag216 (Implementation_Base_Type (Id));
3076 end Universal_Aliasing;
3078 function Unset_Reference (Id : E) return N is
3081 end Unset_Reference;
3083 function Used_As_Generic_Actual (Id : E) return B is
3085 return Flag222 (Id);
3086 end Used_As_Generic_Actual;
3088 function Uses_Lock_Free (Id : E) return B is
3090 pragma Assert (Is_Protected_Type (Id));
3091 return Flag188 (Id);
3094 function Uses_Sec_Stack (Id : E) return B is
3099 function Warnings_Off (Id : E) return B is
3104 function Warnings_Off_Used (Id : E) return B is
3106 return Flag236 (Id);
3107 end Warnings_Off_Used;
3109 function Warnings_Off_Used_Unmodified (Id : E) return B is
3111 return Flag237 (Id);
3112 end Warnings_Off_Used_Unmodified;
3114 function Warnings_Off_Used_Unreferenced (Id : E) return B is
3116 return Flag238 (Id);
3117 end Warnings_Off_Used_Unreferenced;
3119 function Wrapped_Entity (Id : E) return E is
3121 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3122 and then Is_Primitive_Wrapper (Id));
3126 function Was_Hidden (Id : E) return B is
3128 return Flag196 (Id);
3131 ------------------------------
3132 -- Classification Functions --
3133 ------------------------------
3135 function Is_Access_Type (Id : E) return B is
3137 return Ekind (Id) in Access_Kind;
3140 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
3142 return Ekind (Id) in Access_Protected_Kind;
3143 end Is_Access_Protected_Subprogram_Type;
3145 function Is_Access_Subprogram_Type (Id : E) return B is
3147 return Ekind (Id) in Access_Subprogram_Kind;
3148 end Is_Access_Subprogram_Type;
3150 function Is_Aggregate_Type (Id : E) return B is
3152 return Ekind (Id) in Aggregate_Kind;
3153 end Is_Aggregate_Type;
3155 function Is_Array_Type (Id : E) return B is
3157 return Ekind (Id) in Array_Kind;
3160 function Is_Assignable (Id : E) return B is
3162 return Ekind (Id) in Assignable_Kind;
3165 function Is_Class_Wide_Type (Id : E) return B is
3167 return Ekind (Id) in Class_Wide_Kind;
3168 end Is_Class_Wide_Type;
3170 function Is_Composite_Type (Id : E) return B is
3172 return Ekind (Id) in Composite_Kind;
3173 end Is_Composite_Type;
3175 function Is_Concurrent_Body (Id : E) return B is
3177 return Ekind (Id) in
3178 Concurrent_Body_Kind;
3179 end Is_Concurrent_Body;
3181 function Is_Concurrent_Record_Type (Id : E) return B is
3184 end Is_Concurrent_Record_Type;
3186 function Is_Concurrent_Type (Id : E) return B is
3188 return Ekind (Id) in Concurrent_Kind;
3189 end Is_Concurrent_Type;
3191 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
3193 return Ekind (Id) in
3194 Decimal_Fixed_Point_Kind;
3195 end Is_Decimal_Fixed_Point_Type;
3197 function Is_Digits_Type (Id : E) return B is
3199 return Ekind (Id) in Digits_Kind;
3202 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
3204 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
3205 end Is_Discrete_Or_Fixed_Point_Type;
3207 function Is_Discrete_Type (Id : E) return B is
3209 return Ekind (Id) in Discrete_Kind;
3210 end Is_Discrete_Type;
3212 function Is_Elementary_Type (Id : E) return B is
3214 return Ekind (Id) in Elementary_Kind;
3215 end Is_Elementary_Type;
3217 function Is_Entry (Id : E) return B is
3219 return Ekind (Id) in Entry_Kind;
3222 function Is_Enumeration_Type (Id : E) return B is
3224 return Ekind (Id) in
3226 end Is_Enumeration_Type;
3228 function Is_Fixed_Point_Type (Id : E) return B is
3230 return Ekind (Id) in
3232 end Is_Fixed_Point_Type;
3234 function Is_Floating_Point_Type (Id : E) return B is
3236 return Ekind (Id) in Float_Kind;
3237 end Is_Floating_Point_Type;
3239 function Is_Formal (Id : E) return B is
3241 return Ekind (Id) in Formal_Kind;
3244 function Is_Formal_Object (Id : E) return B is
3246 return Ekind (Id) in Formal_Object_Kind;
3247 end Is_Formal_Object;
3249 function Is_Generic_Subprogram (Id : E) return B is
3251 return Ekind (Id) in Generic_Subprogram_Kind;
3252 end Is_Generic_Subprogram;
3254 function Is_Generic_Unit (Id : E) return B is
3256 return Ekind (Id) in Generic_Unit_Kind;
3257 end Is_Generic_Unit;
3259 function Is_Incomplete_Or_Private_Type (Id : E) return B is
3261 return Ekind (Id) in
3262 Incomplete_Or_Private_Kind;
3263 end Is_Incomplete_Or_Private_Type;
3265 function Is_Incomplete_Type (Id : E) return B is
3267 return Ekind (Id) in
3269 end Is_Incomplete_Type;
3271 function Is_Integer_Type (Id : E) return B is
3273 return Ekind (Id) in Integer_Kind;
3274 end Is_Integer_Type;
3276 function Is_Modular_Integer_Type (Id : E) return B is
3278 return Ekind (Id) in
3279 Modular_Integer_Kind;
3280 end Is_Modular_Integer_Type;
3282 function Is_Named_Number (Id : E) return B is
3284 return Ekind (Id) in Named_Kind;
3285 end Is_Named_Number;
3287 function Is_Numeric_Type (Id : E) return B is
3289 return Ekind (Id) in Numeric_Kind;
3290 end Is_Numeric_Type;
3292 function Is_Object (Id : E) return B is
3294 return Ekind (Id) in Object_Kind;
3297 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
3299 return Ekind (Id) in
3300 Ordinary_Fixed_Point_Kind;
3301 end Is_Ordinary_Fixed_Point_Type;
3303 function Is_Overloadable (Id : E) return B is
3305 return Ekind (Id) in Overloadable_Kind;
3306 end Is_Overloadable;
3308 function Is_Private_Type (Id : E) return B is
3310 return Ekind (Id) in Private_Kind;
3311 end Is_Private_Type;
3313 function Is_Protected_Type (Id : E) return B is
3315 return Ekind (Id) in Protected_Kind;
3316 end Is_Protected_Type;
3318 function Is_Real_Type (Id : E) return B is
3320 return Ekind (Id) in Real_Kind;
3323 function Is_Record_Type (Id : E) return B is
3325 return Ekind (Id) in Record_Kind;
3328 function Is_Scalar_Type (Id : E) return B is
3330 return Ekind (Id) in Scalar_Kind;
3333 function Is_Signed_Integer_Type (Id : E) return B is
3335 return Ekind (Id) in Signed_Integer_Kind;
3336 end Is_Signed_Integer_Type;
3338 function Is_Subprogram (Id : E) return B is
3340 return Ekind (Id) in Subprogram_Kind;
3343 function Is_Task_Type (Id : E) return B is
3345 return Ekind (Id) in Task_Kind;
3348 function Is_Type (Id : E) return B is
3350 return Ekind (Id) in Type_Kind;
3353 ------------------------------
3354 -- Attribute Set Procedures --
3355 ------------------------------
3357 -- Note: in many of these set procedures an "obvious" assertion is missing.
3358 -- The reason for this is that in many cases, a field is set before the
3359 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3360 -- it is possible to add assertions that specifically include the E_Void
3361 -- possibility, but in some cases, we just omit the assertions.
3363 procedure Set_Abstract_States (Id : E; V : L) is
3365 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
3366 Set_Elist25 (Id, V);
3367 end Set_Abstract_States;
3369 procedure Set_Accept_Address (Id : E; V : L) is
3371 Set_Elist21 (Id, V);
3372 end Set_Accept_Address;
3374 procedure Set_Access_Disp_Table (Id : E; V : L) is
3376 pragma Assert (Ekind (Id) = E_Record_Type
3377 and then Id = Implementation_Base_Type (Id));
3378 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3379 Set_Elist16 (Id, V);
3380 end Set_Access_Disp_Table;
3382 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3385 end Set_Associated_Formal_Package;
3387 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3390 end Set_Associated_Node_For_Itype;
3392 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3394 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3396 end Set_Associated_Storage_Pool;
3398 procedure Set_Actual_Subtype (Id : E; V : E) is
3401 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3402 or else Is_Formal (Id));
3404 end Set_Actual_Subtype;
3406 procedure Set_Address_Taken (Id : E; V : B := True) is
3408 Set_Flag104 (Id, V);
3409 end Set_Address_Taken;
3411 procedure Set_Alias (Id : E; V : E) is
3414 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3418 procedure Set_Alignment (Id : E; V : U) is
3420 pragma Assert (Is_Type (Id)
3421 or else Is_Formal (Id)
3422 or else Ekind_In (Id, E_Loop_Parameter,
3429 procedure Set_Barrier_Function (Id : E; V : N) is
3431 pragma Assert (Is_Entry (Id));
3433 end Set_Barrier_Function;
3435 procedure Set_Block_Node (Id : E; V : N) is
3437 pragma Assert (Ekind (Id) = E_Block);
3441 procedure Set_Body_Entity (Id : E; V : E) is
3443 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3445 end Set_Body_Entity;
3447 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3450 (Ekind (Id) = E_Package
3451 or else Is_Subprogram (Id)
3452 or else Is_Generic_Unit (Id));
3454 end Set_Body_Needed_For_SAL;
3456 procedure Set_Body_References (Id : E; V : L) is
3458 pragma Assert (Ekind (Id) = E_Abstract_State);
3459 Set_Elist16 (Id, V);
3460 end Set_Body_References;
3462 procedure Set_BIP_Initialization_Call (Id : E; V : N) is
3464 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
3466 end Set_BIP_Initialization_Call;
3468 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3470 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3471 Set_Flag125 (Id, V);
3472 end Set_C_Pass_By_Copy;
3474 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3477 end Set_Can_Never_Be_Null;
3479 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3482 end Set_Checks_May_Be_Suppressed;
3484 procedure Set_Class_Wide_Type (Id : E; V : E) is
3486 pragma Assert (Is_Type (Id));
3488 end Set_Class_Wide_Type;
3490 procedure Set_Cloned_Subtype (Id : E; V : E) is
3492 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3494 end Set_Cloned_Subtype;
3496 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3498 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3500 end Set_Component_Bit_Offset;
3502 procedure Set_Component_Clause (Id : E; V : N) is
3504 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3506 end Set_Component_Clause;
3508 procedure Set_Component_Size (Id : E; V : U) is
3510 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3512 end Set_Component_Size;
3514 procedure Set_Component_Type (Id : E; V : E) is
3516 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3518 end Set_Component_Type;
3520 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3523 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3525 end Set_Corresponding_Concurrent_Type;
3527 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3529 pragma Assert (Ekind (Id) = E_Discriminant);
3531 end Set_Corresponding_Discriminant;
3533 procedure Set_Corresponding_Equality (Id : E; V : E) is
3536 (Ekind (Id) = E_Function
3537 and then not Comes_From_Source (Id)
3538 and then Chars (Id) = Name_Op_Ne);
3540 end Set_Corresponding_Equality;
3542 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3544 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3546 end Set_Corresponding_Protected_Entry;
3548 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3550 pragma Assert (Is_Concurrent_Type (Id));
3552 end Set_Corresponding_Record_Type;
3554 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3557 end Set_Corresponding_Remote_Type;
3559 procedure Set_Current_Use_Clause (Id : E; V : E) is
3561 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3563 end Set_Current_Use_Clause;
3565 procedure Set_Current_Value (Id : E; V : N) is
3567 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3569 end Set_Current_Value;
3571 procedure Set_CR_Discriminant (Id : E; V : E) is
3574 end Set_CR_Discriminant;
3576 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3578 Set_Flag166 (Id, V);
3579 end Set_Debug_Info_Off;
3581 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3584 end Set_Debug_Renaming_Link;
3586 procedure Set_Default_Aspect_Component_Value (Id : E; V : E) is
3588 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3590 end Set_Default_Aspect_Component_Value;
3592 procedure Set_Default_Aspect_Value (Id : E; V : E) is
3594 pragma Assert (Is_Scalar_Type (Id) and then Is_Base_Type (Id));
3596 end Set_Default_Aspect_Value;
3598 procedure Set_Default_Expr_Function (Id : E; V : E) is
3600 pragma Assert (Is_Formal (Id));
3602 end Set_Default_Expr_Function;
3604 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3606 Set_Flag108 (Id, V);
3607 end Set_Default_Expressions_Processed;
3609 procedure Set_Default_Value (Id : E; V : N) is
3611 pragma Assert (Is_Formal (Id));
3613 end Set_Default_Value;
3615 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3619 or else Is_Task_Type (Id)
3620 or else Ekind (Id) = E_Block);
3621 Set_Flag114 (Id, V);
3622 end Set_Delay_Cleanups;
3624 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3627 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3630 end Set_Delay_Subprogram_Descriptors;
3632 procedure Set_Delta_Value (Id : E; V : R) is
3634 pragma Assert (Is_Fixed_Point_Type (Id));
3635 Set_Ureal18 (Id, V);
3636 end Set_Delta_Value;
3638 procedure Set_Dependent_Instances (Id : E; V : L) is
3640 pragma Assert (Is_Generic_Instance (Id));
3642 end Set_Dependent_Instances;
3644 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3646 pragma Assert (Nkind (Id) in N_Entity);
3648 end Set_Depends_On_Private;
3650 procedure Set_Digits_Value (Id : E; V : U) is
3653 (Is_Floating_Point_Type (Id)
3654 or else Is_Decimal_Fixed_Point_Type (Id));
3656 end Set_Digits_Value;
3658 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3661 end Set_Directly_Designated_Type;
3663 procedure Set_Discard_Names (Id : E; V : B := True) is
3666 end Set_Discard_Names;
3668 procedure Set_Discriminal (Id : E; V : E) is
3670 pragma Assert (Ekind (Id) = E_Discriminant);
3672 end Set_Discriminal;
3674 procedure Set_Discriminal_Link (Id : E; V : E) is
3677 end Set_Discriminal_Link;
3679 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3681 pragma Assert (Ekind (Id) = E_Component);
3683 end Set_Discriminant_Checking_Func;
3685 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3687 pragma Assert (Nkind (Id) in N_Entity);
3688 Set_Elist21 (Id, V);
3689 end Set_Discriminant_Constraint;
3691 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3694 end Set_Discriminant_Default_Value;
3696 procedure Set_Discriminant_Number (Id : E; V : U) is
3699 end Set_Discriminant_Number;
3701 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3703 pragma Assert (Ekind (Id) = E_Record_Type
3704 and then Id = Implementation_Base_Type (Id));
3705 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3706 Set_Elist26 (Id, V);
3707 end Set_Dispatch_Table_Wrappers;
3709 procedure Set_DT_Entry_Count (Id : E; V : U) is
3711 pragma Assert (Ekind (Id) = E_Component);
3713 end Set_DT_Entry_Count;
3715 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3717 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3719 end Set_DT_Offset_To_Top_Func;
3721 procedure Set_DT_Position (Id : E; V : U) is
3723 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3725 end Set_DT_Position;
3727 procedure Set_DTC_Entity (Id : E; V : E) is
3729 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3733 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3735 pragma Assert (Ekind (Id) = E_Package);
3736 Set_Flag210 (Id, V);
3737 end Set_Elaborate_Body_Desirable;
3739 procedure Set_Elaboration_Entity (Id : E; V : E) is
3744 Ekind (Id) = E_Package
3746 Is_Generic_Unit (Id));
3748 end Set_Elaboration_Entity;
3750 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3755 Ekind (Id) = E_Package
3757 Is_Generic_Unit (Id));
3758 Set_Flag174 (Id, V);
3759 end Set_Elaboration_Entity_Required;
3761 procedure Set_Encapsulating_State (Id : E; V : E) is
3763 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
3765 end Set_Encapsulating_State;
3767 procedure Set_Enclosing_Scope (Id : E; V : E) is
3770 end Set_Enclosing_Scope;
3772 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3774 pragma Assert (Is_Entry (Id));
3775 Set_Flag152 (Id, V);
3776 end Set_Entry_Accepted;
3778 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3781 end Set_Entry_Bodies_Array;
3783 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3786 end Set_Entry_Cancel_Parameter;
3788 procedure Set_Entry_Component (Id : E; V : E) is
3791 end Set_Entry_Component;
3793 procedure Set_Entry_Formal (Id : E; V : E) is
3796 end Set_Entry_Formal;
3798 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3800 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3802 end Set_Entry_Index_Constant;
3804 procedure Set_Contract (Id : E; V : N) is
3807 (Ekind_In (Id, E_Entry,
3815 or else Is_Generic_Subprogram (Id)
3816 or else Is_Subprogram (Id));
3820 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3823 end Set_Entry_Parameters_Type;
3825 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3827 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3829 end Set_Enum_Pos_To_Rep;
3831 procedure Set_Enumeration_Pos (Id : E; V : U) is
3833 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3835 end Set_Enumeration_Pos;
3837 procedure Set_Enumeration_Rep (Id : E; V : U) is
3839 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3841 end Set_Enumeration_Rep;
3843 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3845 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3847 end Set_Enumeration_Rep_Expr;
3849 procedure Set_Equivalent_Type (Id : E; V : E) is
3852 (Ekind_In (Id, E_Class_Wide_Type,
3853 E_Class_Wide_Subtype,
3854 E_Access_Protected_Subprogram_Type,
3855 E_Anonymous_Access_Protected_Subprogram_Type,
3856 E_Access_Subprogram_Type,
3859 end Set_Equivalent_Type;
3861 procedure Set_Esize (Id : E; V : U) is
3866 procedure Set_Exception_Code (Id : E; V : U) is
3868 pragma Assert (Ekind (Id) = E_Exception);
3870 end Set_Exception_Code;
3872 procedure Set_Extra_Accessibility (Id : E; V : E) is
3875 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
3877 end Set_Extra_Accessibility;
3879 procedure Set_Extra_Accessibility_Of_Result (Id : E; V : E) is
3881 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
3883 end Set_Extra_Accessibility_Of_Result;
3885 procedure Set_Extra_Constrained (Id : E; V : E) is
3887 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3889 end Set_Extra_Constrained;
3891 procedure Set_Extra_Formal (Id : E; V : E) is
3894 end Set_Extra_Formal;
3896 procedure Set_Extra_Formals (Id : E; V : E) is
3899 (Is_Overloadable (Id)
3900 or else Ekind_In (Id, E_Entry_Family,
3902 E_Subprogram_Type));
3904 end Set_Extra_Formals;
3906 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3909 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3910 Set_Flag229 (Id, V);
3911 end Set_Can_Use_Internal_Rep;
3913 procedure Set_Finalization_Master (Id : E; V : E) is
3915 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3917 end Set_Finalization_Master;
3919 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3921 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3922 Set_Flag158 (Id, V);
3923 end Set_Finalize_Storage_Only;
3925 procedure Set_Finalizer (Id : E; V : E) is
3927 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
3931 procedure Set_First_Entity (Id : E; V : E) is
3934 end Set_First_Entity;
3936 procedure Set_First_Exit_Statement (Id : E; V : N) is
3938 pragma Assert (Ekind (Id) = E_Loop);
3940 end Set_First_Exit_Statement;
3942 procedure Set_First_Index (Id : E; V : N) is
3944 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3946 end Set_First_Index;
3948 procedure Set_First_Literal (Id : E; V : E) is
3950 pragma Assert (Is_Enumeration_Type (Id));
3952 end Set_First_Literal;
3954 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3956 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3958 end Set_First_Optional_Parameter;
3960 procedure Set_First_Private_Entity (Id : E; V : E) is
3962 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
3963 or else Ekind (Id) in Concurrent_Kind);
3965 end Set_First_Private_Entity;
3967 procedure Set_First_Rep_Item (Id : E; V : N) is
3970 end Set_First_Rep_Item;
3972 procedure Set_Float_Rep (Id : E; V : F) is
3973 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
3975 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
3978 procedure Set_Freeze_Node (Id : E; V : N) is
3981 end Set_Freeze_Node;
3983 procedure Set_From_Limited_With (Id : E; V : B := True) is
3986 (Is_Type (Id) or else Ekind_In (Id, E_Abstract_State, E_Package));
3987 Set_Flag159 (Id, V);
3988 end Set_From_Limited_With;
3990 procedure Set_Full_View (Id : E; V : E) is
3992 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
3996 procedure Set_Generic_Homonym (Id : E; V : E) is
3999 end Set_Generic_Homonym;
4001 procedure Set_Generic_Renamings (Id : E; V : L) is
4003 Set_Elist23 (Id, V);
4004 end Set_Generic_Renamings;
4006 procedure Set_Handler_Records (Id : E; V : S) is
4009 end Set_Handler_Records;
4011 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
4013 pragma Assert (Id = Base_Type (Id));
4014 Set_Flag135 (Id, V);
4015 end Set_Has_Aliased_Components;
4017 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
4020 end Set_Has_Alignment_Clause;
4022 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
4025 end Set_Has_All_Calls_Remote;
4027 procedure Set_Has_Anonymous_Master (Id : E; V : B := True) is
4030 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
4031 Set_Flag253 (Id, V);
4032 end Set_Has_Anonymous_Master;
4034 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
4036 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4038 end Set_Has_Atomic_Components;
4040 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
4043 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
4044 Set_Flag139 (Id, V);
4045 end Set_Has_Biased_Representation;
4047 procedure Set_Has_Completion (Id : E; V : B := True) is
4050 end Set_Has_Completion;
4052 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
4054 pragma Assert (Is_Type (Id));
4056 end Set_Has_Completion_In_Body;
4058 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
4060 pragma Assert (Ekind (Id) = E_Record_Type);
4061 Set_Flag140 (Id, V);
4062 end Set_Has_Complex_Representation;
4064 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
4066 pragma Assert (Ekind (Id) = E_Array_Type);
4068 end Set_Has_Component_Size_Clause;
4070 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
4072 pragma Assert (Is_Type (Id));
4073 Set_Flag187 (Id, V);
4074 end Set_Has_Constrained_Partial_View;
4076 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
4078 Set_Flag181 (Id, V);
4079 end Set_Has_Contiguous_Rep;
4081 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
4083 pragma Assert (Id = Base_Type (Id));
4085 end Set_Has_Controlled_Component;
4087 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
4090 end Set_Has_Controlling_Result;
4092 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
4094 Set_Flag119 (Id, V);
4095 end Set_Has_Convention_Pragma;
4097 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
4100 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
4101 and then Is_Base_Type (Id));
4103 end Set_Has_Default_Aspect;
4105 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
4107 pragma Assert (Nkind (Id) in N_Entity);
4108 Set_Flag200 (Id, V);
4109 end Set_Has_Delayed_Aspects;
4111 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
4113 pragma Assert (Nkind (Id) in N_Entity);
4115 end Set_Has_Delayed_Freeze;
4117 procedure Set_Has_Delayed_Rep_Aspects (Id : E; V : B := True) is
4119 pragma Assert (Nkind (Id) in N_Entity);
4120 Set_Flag261 (Id, V);
4121 end Set_Has_Delayed_Rep_Aspects;
4123 procedure Set_Has_Discriminants (Id : E; V : B := True) is
4125 pragma Assert (Nkind (Id) in N_Entity);
4127 end Set_Has_Discriminants;
4129 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
4131 pragma Assert (Ekind (Id) = E_Record_Type
4132 and then Is_Tagged_Type (Id));
4133 Set_Flag220 (Id, V);
4134 end Set_Has_Dispatch_Table;
4136 procedure Set_Has_Dynamic_Predicate_Aspect (Id : E; V : B := True) is
4138 pragma Assert (Is_Type (Id));
4139 Set_Flag258 (Id, V);
4140 end Set_Has_Dynamic_Predicate_Aspect;
4142 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
4144 pragma Assert (Is_Enumeration_Type (Id));
4146 end Set_Has_Enumeration_Rep_Clause;
4148 procedure Set_Has_Exit (Id : E; V : B := True) is
4153 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
4155 Set_Flag175 (Id, V);
4156 end Set_Has_Forward_Instantiation;
4158 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
4160 Set_Flag173 (Id, V);
4161 end Set_Has_Fully_Qualified_Name;
4163 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
4166 end Set_Has_Gigi_Rep_Item;
4168 procedure Set_Has_Homonym (Id : E; V : B := True) is
4171 end Set_Has_Homonym;
4173 procedure Set_Has_Implicit_Dereference (Id : E; V : B := True) is
4175 Set_Flag251 (Id, V);
4176 end Set_Has_Implicit_Dereference;
4178 procedure Set_Has_Independent_Components (Id : E; V : B := True) is
4180 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
4181 and then Is_Base_Type (Id));
4183 end Set_Has_Independent_Components;
4185 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
4187 pragma Assert (Is_Type (Id));
4188 Set_Flag248 (Id, V);
4189 end Set_Has_Inheritable_Invariants;
4191 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
4193 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
4194 Set_Flag219 (Id, V);
4195 end Set_Has_Initial_Value;
4197 procedure Set_Has_Invariants (Id : E; V : B := True) is
4199 pragma Assert (Is_Type (Id));
4200 Set_Flag232 (Id, V);
4201 end Set_Has_Invariants;
4203 procedure Set_Has_Loop_Entry_Attributes (Id : E; V : B := True) is
4205 pragma Assert (Ekind (Id) = E_Loop);
4206 Set_Flag260 (Id, V);
4207 end Set_Has_Loop_Entry_Attributes;
4209 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
4211 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4213 end Set_Has_Machine_Radix_Clause;
4215 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
4218 end Set_Has_Master_Entity;
4220 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
4222 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4223 Set_Flag142 (Id, V);
4224 end Set_Has_Missing_Return;
4226 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
4228 Set_Flag101 (Id, V);
4229 end Set_Has_Nested_Block_With_Handler;
4231 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
4233 pragma Assert (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
4234 Set_Flag215 (Id, V);
4235 end Set_Has_Up_Level_Access;
4237 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
4239 pragma Assert (Id = Base_Type (Id));
4241 end Set_Has_Non_Standard_Rep;
4243 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
4245 pragma Assert (Is_Type (Id));
4246 Set_Flag172 (Id, V);
4247 end Set_Has_Object_Size_Clause;
4249 procedure Set_Has_Out_Or_In_Out_Parameter (Id : E; V : B := True) is
4251 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4252 Set_Flag110 (Id, V);
4253 end Set_Has_Out_Or_In_Out_Parameter;
4255 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
4257 Set_Flag154 (Id, V);
4258 end Set_Has_Per_Object_Constraint;
4260 procedure Set_Has_Postconditions (Id : E; V : B := True) is
4262 pragma Assert (Is_Subprogram (Id));
4263 Set_Flag240 (Id, V);
4264 end Set_Has_Postconditions;
4266 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
4268 pragma Assert (Is_Access_Type (Id));
4269 Set_Flag27 (Base_Type (Id), V);
4270 end Set_Has_Pragma_Controlled;
4272 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
4274 Set_Flag150 (Id, V);
4275 end Set_Has_Pragma_Elaborate_Body;
4277 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
4279 Set_Flag157 (Id, V);
4280 end Set_Has_Pragma_Inline;
4282 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
4284 Set_Flag230 (Id, V);
4285 end Set_Has_Pragma_Inline_Always;
4287 procedure Set_Has_Pragma_No_Inline (Id : E; V : B := True) is
4289 Set_Flag201 (Id, V);
4290 end Set_Has_Pragma_No_Inline;
4292 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
4294 pragma Assert (Is_Enumeration_Type (Id));
4295 pragma Assert (Id = Base_Type (Id));
4296 Set_Flag198 (Id, V);
4297 end Set_Has_Pragma_Ordered;
4299 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
4301 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
4302 pragma Assert (Id = Base_Type (Id));
4303 Set_Flag121 (Id, V);
4304 end Set_Has_Pragma_Pack;
4306 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
4308 Set_Flag221 (Id, V);
4309 end Set_Has_Pragma_Preelab_Init;
4311 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
4313 Set_Flag203 (Id, V);
4314 end Set_Has_Pragma_Pure;
4316 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
4318 Set_Flag179 (Id, V);
4319 end Set_Has_Pragma_Pure_Function;
4321 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
4323 Set_Flag169 (Id, V);
4324 end Set_Has_Pragma_Thread_Local_Storage;
4326 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
4328 Set_Flag233 (Id, V);
4329 end Set_Has_Pragma_Unmodified;
4331 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
4333 Set_Flag180 (Id, V);
4334 end Set_Has_Pragma_Unreferenced;
4336 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
4338 pragma Assert (Is_Type (Id));
4339 Set_Flag212 (Id, V);
4340 end Set_Has_Pragma_Unreferenced_Objects;
4342 procedure Set_Has_Predicates (Id : E; V : B := True) is
4344 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Void);
4345 Set_Flag250 (Id, V);
4346 end Set_Has_Predicates;
4348 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
4350 pragma Assert (Id = Base_Type (Id));
4351 Set_Flag120 (Id, V);
4352 end Set_Has_Primitive_Operations;
4354 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
4356 pragma Assert (Is_Type (Id));
4357 Set_Flag151 (Id, V);
4358 end Set_Has_Private_Ancestor;
4360 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
4362 Set_Flag155 (Id, V);
4363 end Set_Has_Private_Declaration;
4365 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
4367 Set_Flag161 (Id, V);
4368 end Set_Has_Qualified_Name;
4370 procedure Set_Has_RACW (Id : E; V : B := True) is
4372 pragma Assert (Ekind (Id) = E_Package);
4373 Set_Flag214 (Id, V);
4376 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
4378 pragma Assert (Id = Base_Type (Id));
4380 end Set_Has_Record_Rep_Clause;
4382 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
4384 pragma Assert (Is_Subprogram (Id));
4385 Set_Flag143 (Id, V);
4386 end Set_Has_Recursive_Call;
4388 procedure Set_Has_Shift_Operator (Id : E; V : B := True) is
4390 pragma Assert (Is_Integer_Type (Id) and then Is_Base_Type (Id));
4391 Set_Flag267 (Id, V);
4392 end Set_Has_Shift_Operator;
4394 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
4397 end Set_Has_Size_Clause;
4399 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
4402 end Set_Has_Small_Clause;
4404 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
4406 pragma Assert (Id = Base_Type (Id));
4407 Set_Flag100 (Id, V);
4408 end Set_Has_Specified_Layout;
4410 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
4412 pragma Assert (Is_Type (Id));
4413 Set_Flag190 (Id, V);
4414 end Set_Has_Specified_Stream_Input;
4416 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
4418 pragma Assert (Is_Type (Id));
4419 Set_Flag191 (Id, V);
4420 end Set_Has_Specified_Stream_Output;
4422 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
4424 pragma Assert (Is_Type (Id));
4425 Set_Flag192 (Id, V);
4426 end Set_Has_Specified_Stream_Read;
4428 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
4430 pragma Assert (Is_Type (Id));
4431 Set_Flag193 (Id, V);
4432 end Set_Has_Specified_Stream_Write;
4434 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
4436 Set_Flag211 (Id, V);
4437 end Set_Has_Static_Discriminants;
4439 procedure Set_Has_Static_Predicate_Aspect (Id : E; V : B := True) is
4441 pragma Assert (Is_Type (Id));
4442 Set_Flag259 (Id, V);
4443 end Set_Has_Static_Predicate_Aspect;
4445 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
4447 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4448 pragma Assert (Id = Base_Type (Id));
4450 end Set_Has_Storage_Size_Clause;
4452 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4454 pragma Assert (Is_Elementary_Type (Id));
4455 Set_Flag184 (Id, V);
4456 end Set_Has_Stream_Size_Clause;
4458 procedure Set_Has_Task (Id : E; V : B := True) is
4460 pragma Assert (Id = Base_Type (Id));
4464 procedure Set_Has_Thunks (Id : E; V : B := True) is
4466 pragma Assert (Is_Tag (Id));
4467 Set_Flag228 (Id, V);
4470 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4472 pragma Assert (Id = Base_Type (Id));
4473 Set_Flag123 (Id, V);
4474 end Set_Has_Unchecked_Union;
4476 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4478 pragma Assert (Is_Type (Id));
4480 end Set_Has_Unknown_Discriminants;
4482 procedure Set_Has_Visible_Refinement (Id : E; V : B := True) is
4484 pragma Assert (Ekind (Id) = E_Abstract_State);
4485 Set_Flag263 (Id, V);
4486 end Set_Has_Visible_Refinement;
4488 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4490 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4492 end Set_Has_Volatile_Components;
4494 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4496 Set_Flag182 (Id, V);
4497 end Set_Has_Xref_Entry;
4499 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4501 pragma Assert (Ekind (Id) = E_Variable);
4503 end Set_Hiding_Loop_Variable;
4505 procedure Set_Homonym (Id : E; V : E) is
4507 pragma Assert (Id /= V);
4511 procedure Set_Import_Pragma (Id : E; V : E) is
4513 pragma Assert (Is_Subprogram (Id));
4515 end Set_Import_Pragma;
4517 procedure Set_Interface_Alias (Id : E; V : E) is
4521 and then Is_Hidden (Id)
4522 and then (Ekind_In (Id, E_Procedure, E_Function)));
4524 end Set_Interface_Alias;
4526 procedure Set_Interfaces (Id : E; V : L) is
4528 pragma Assert (Is_Record_Type (Id));
4529 Set_Elist25 (Id, V);
4532 procedure Set_In_Package_Body (Id : E; V : B := True) is
4535 end Set_In_Package_Body;
4537 procedure Set_In_Private_Part (Id : E; V : B := True) is
4540 end Set_In_Private_Part;
4542 procedure Set_In_Use (Id : E; V : B := True) is
4544 pragma Assert (Nkind (Id) in N_Entity);
4548 procedure Set_Initialization_Statements (Id : E; V : N) is
4550 -- Tolerate an E_Void entity since this can be called while resolving
4551 -- an aggregate used as the initialization expression for an object
4552 -- declaration, and this occurs before the Ekind for the object is set.
4554 pragma Assert (Ekind_In (Id, E_Void, E_Constant, E_Variable));
4556 end Set_Initialization_Statements;
4558 procedure Set_Inner_Instances (Id : E; V : L) is
4560 Set_Elist23 (Id, V);
4561 end Set_Inner_Instances;
4563 procedure Set_Interface_Name (Id : E; V : N) is
4566 end Set_Interface_Name;
4568 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4570 pragma Assert (Is_Overloadable (Id));
4572 end Set_Is_Abstract_Subprogram;
4574 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4576 pragma Assert (Is_Type (Id));
4577 Set_Flag146 (Id, V);
4578 end Set_Is_Abstract_Type;
4580 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4582 pragma Assert (Is_Access_Type (Id));
4583 Set_Flag194 (Id, V);
4584 end Set_Is_Local_Anonymous_Access;
4586 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4588 pragma Assert (Is_Access_Type (Id));
4590 end Set_Is_Access_Constant;
4592 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4594 Set_Flag185 (Id, V);
4595 end Set_Is_Ada_2005_Only;
4597 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4599 Set_Flag199 (Id, V);
4600 end Set_Is_Ada_2012_Only;
4602 procedure Set_Is_Aliased (Id : E; V : B := True) is
4604 pragma Assert (Nkind (Id) in N_Entity);
4608 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
4610 pragma Assert (Is_Entry (Id));
4611 Set_Flag132 (Id, V);
4612 end Set_Is_AST_Entry;
4614 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4617 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4619 end Set_Is_Asynchronous;
4621 procedure Set_Is_Atomic (Id : E; V : B := True) is
4626 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4628 pragma Assert ((not V)
4629 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4630 Set_Flag122 (Id, V);
4631 end Set_Is_Bit_Packed_Array;
4633 procedure Set_Is_Called (Id : E; V : B := True) is
4635 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4636 Set_Flag102 (Id, V);
4639 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4642 end Set_Is_Character_Type;
4644 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4647 end Set_Is_Child_Unit;
4649 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4652 end Set_Is_Class_Wide_Equivalent_Type;
4654 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4656 Set_Flag149 (Id, V);
4657 end Set_Is_Compilation_Unit;
4659 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4661 pragma Assert (Ekind (Id) = E_Discriminant);
4662 Set_Flag103 (Id, V);
4663 end Set_Is_Completely_Hidden;
4665 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4668 end Set_Is_Concurrent_Record_Type;
4670 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4673 end Set_Is_Constr_Subt_For_U_Nominal;
4675 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4677 Set_Flag141 (Id, V);
4678 end Set_Is_Constr_Subt_For_UN_Aliased;
4680 procedure Set_Is_Constrained (Id : E; V : B := True) is
4682 pragma Assert (Nkind (Id) in N_Entity);
4684 end Set_Is_Constrained;
4686 procedure Set_Is_Constructor (Id : E; V : B := True) is
4689 end Set_Is_Constructor;
4691 procedure Set_Is_Controlled (Id : E; V : B := True) is
4693 pragma Assert (Id = Base_Type (Id));
4695 end Set_Is_Controlled;
4697 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4699 pragma Assert (Is_Formal (Id));
4701 end Set_Is_Controlling_Formal;
4703 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4706 end Set_Is_CPP_Class;
4708 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4710 pragma Assert (Is_Type (Id));
4711 Set_Flag223 (Id, V);
4712 end Set_Is_Descendent_Of_Address;
4714 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4716 Set_Flag176 (Id, V);
4717 end Set_Is_Discrim_SO_Function;
4719 procedure Set_Is_Discriminant_Check_Function (Id : E; V : B := True) is
4721 Set_Flag264 (Id, V);
4722 end Set_Is_Discriminant_Check_Function;
4724 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4726 Set_Flag234 (Id, V);
4727 end Set_Is_Dispatch_Table_Entity;
4729 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4734 Is_Overloadable (Id)
4736 Ekind (Id) = E_Subprogram_Type);
4739 end Set_Is_Dispatching_Operation;
4741 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4743 Set_Flag124 (Id, V);
4744 end Set_Is_Eliminated;
4746 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4749 end Set_Is_Entry_Formal;
4751 procedure Set_Is_Exported (Id : E; V : B := True) is
4754 end Set_Is_Exported;
4756 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4759 end Set_Is_First_Subtype;
4761 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4763 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4764 Set_Flag118 (Id, V);
4765 end Set_Is_For_Access_Subtype;
4767 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4769 Set_Flag111 (Id, V);
4770 end Set_Is_Formal_Subprogram;
4772 procedure Set_Is_Frozen (Id : E; V : B := True) is
4774 pragma Assert (Nkind (Id) in N_Entity);
4778 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4780 pragma Assert (Is_Type (Id));
4782 end Set_Is_Generic_Actual_Type;
4784 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4786 Set_Flag130 (Id, V);
4787 end Set_Is_Generic_Instance;
4789 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4791 pragma Assert (Nkind (Id) in N_Entity);
4793 end Set_Is_Generic_Type;
4795 procedure Set_Is_Hidden (Id : E; V : B := True) is
4800 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4802 Set_Flag171 (Id, V);
4803 end Set_Is_Hidden_Open_Scope;
4805 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4807 pragma Assert (Nkind (Id) in N_Entity);
4809 end Set_Is_Immediately_Visible;
4811 procedure Set_Is_Implementation_Defined (Id : E; V : B := True) is
4813 Set_Flag254 (Id, V);
4814 end Set_Is_Implementation_Defined;
4816 procedure Set_Is_Imported (Id : E; V : B := True) is
4819 end Set_Is_Imported;
4821 procedure Set_Is_Independent (Id : E; V : B := True) is
4823 pragma Assert (Ekind_In (Id, E_Component, E_Void));
4824 Set_Flag268 (Id, V);
4825 end Set_Is_Independent;
4827 procedure Set_Is_Inlined (Id : E; V : B := True) is
4832 procedure Set_Is_Interface (Id : E; V : B := True) is
4834 pragma Assert (Is_Record_Type (Id));
4835 Set_Flag186 (Id, V);
4836 end Set_Is_Interface;
4838 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4840 Set_Flag126 (Id, V);
4841 end Set_Is_Instantiated;
4843 procedure Set_Is_Internal (Id : E; V : B := True) is
4845 pragma Assert (Nkind (Id) in N_Entity);
4847 end Set_Is_Internal;
4849 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4851 pragma Assert (Nkind (Id) in N_Entity);
4853 end Set_Is_Interrupt_Handler;
4855 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4858 end Set_Is_Intrinsic_Subprogram;
4860 procedure Set_Is_Invariant_Procedure (Id : E; V : B := True) is
4862 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4863 Set_Flag257 (Id, V);
4864 end Set_Is_Invariant_Procedure;
4866 procedure Set_Is_Itype (Id : E; V : B := True) is
4871 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4874 end Set_Is_Known_Non_Null;
4876 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4878 Set_Flag204 (Id, V);
4879 end Set_Is_Known_Null;
4881 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4883 Set_Flag170 (Id, V);
4884 end Set_Is_Known_Valid;
4886 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4888 pragma Assert (Is_Type (Id));
4889 Set_Flag106 (Id, V);
4890 end Set_Is_Limited_Composite;
4892 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4894 pragma Assert (Is_Interface (Id));
4895 Set_Flag197 (Id, V);
4896 end Set_Is_Limited_Interface;
4898 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4901 end Set_Is_Limited_Record;
4903 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4905 pragma Assert (Is_Subprogram (Id));
4906 Set_Flag137 (Id, V);
4907 end Set_Is_Machine_Code_Subprogram;
4909 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4911 pragma Assert (Is_Type (Id));
4912 Set_Flag109 (Id, V);
4913 end Set_Is_Non_Static_Subtype;
4915 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4917 pragma Assert (Ekind (Id) = E_Procedure);
4918 Set_Flag178 (Id, V);
4919 end Set_Is_Null_Init_Proc;
4921 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4923 Set_Flag153 (Id, V);
4924 end Set_Is_Obsolescent;
4926 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
4928 pragma Assert (Ekind (Id) = E_Out_Parameter);
4929 Set_Flag226 (Id, V);
4930 end Set_Is_Only_Out_Parameter;
4932 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
4934 pragma Assert (Is_Formal (Id));
4935 Set_Flag134 (Id, V);
4936 end Set_Is_Optional_Parameter;
4938 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
4940 Set_Flag160 (Id, V);
4941 end Set_Is_Package_Body_Entity;
4943 procedure Set_Is_Packed (Id : E; V : B := True) is
4945 pragma Assert (Id = Base_Type (Id));
4949 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
4951 Set_Flag138 (Id, V);
4952 end Set_Is_Packed_Array_Type;
4954 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
4956 pragma Assert (Nkind (Id) in N_Entity);
4958 end Set_Is_Potentially_Use_Visible;
4960 procedure Set_Is_Predicate_Function (Id : E; V : B := True) is
4962 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4963 Set_Flag255 (Id, V);
4964 end Set_Is_Predicate_Function;
4966 procedure Set_Is_Predicate_Function_M (Id : E; V : B := True) is
4968 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4969 Set_Flag256 (Id, V);
4970 end Set_Is_Predicate_Function_M;
4972 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
4975 end Set_Is_Preelaborated;
4977 procedure Set_Is_Primitive (Id : E; V : B := True) is
4980 (Is_Overloadable (Id)
4981 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
4982 Set_Flag218 (Id, V);
4983 end Set_Is_Primitive;
4985 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
4987 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4988 Set_Flag195 (Id, V);
4989 end Set_Is_Primitive_Wrapper;
4991 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
4993 pragma Assert (Is_Type (Id));
4994 Set_Flag107 (Id, V);
4995 end Set_Is_Private_Composite;
4997 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
5000 end Set_Is_Private_Descendant;
5002 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
5004 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
5005 Set_Flag245 (Id, V);
5006 end Set_Is_Private_Primitive;
5008 procedure Set_Is_Processed_Transient (Id : E; V : B := True) is
5010 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5011 Set_Flag252 (Id, V);
5012 end Set_Is_Processed_Transient;
5014 procedure Set_Is_Public (Id : E; V : B := True) is
5016 pragma Assert (Nkind (Id) in N_Entity);
5020 procedure Set_Is_Pure (Id : E; V : B := True) is
5025 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
5027 pragma Assert (Is_Access_Type (Id));
5028 Set_Flag189 (Id, V);
5029 end Set_Is_Pure_Unit_Access_Type;
5031 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
5033 pragma Assert (Is_Type (Id));
5034 Set_Flag244 (Id, V);
5035 end Set_Is_RACW_Stub_Type;
5037 procedure Set_Is_Raised (Id : E; V : B := True) is
5039 pragma Assert (Ekind (Id) = E_Exception);
5040 Set_Flag224 (Id, V);
5043 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
5046 end Set_Is_Remote_Call_Interface;
5048 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
5051 end Set_Is_Remote_Types;
5053 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
5055 Set_Flag112 (Id, V);
5056 end Set_Is_Renaming_Of_Object;
5058 procedure Set_Is_Return_Object (Id : E; V : B := True) is
5060 Set_Flag209 (Id, V);
5061 end Set_Is_Return_Object;
5063 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
5065 pragma Assert (Ekind (Id) = E_Variable);
5066 Set_Flag249 (Id, V);
5067 end Set_Is_Safe_To_Reevaluate;
5069 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
5072 end Set_Is_Shared_Passive;
5074 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
5078 or else Ekind_In (Id, E_Exception,
5083 end Set_Is_Statically_Allocated;
5085 procedure Set_Is_Tag (Id : E; V : B := True) is
5087 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5091 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
5094 end Set_Is_Tagged_Type;
5096 procedure Set_Is_Thunk (Id : E; V : B := True) is
5098 pragma Assert (Is_Subprogram (Id));
5099 Set_Flag225 (Id, V);
5102 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
5104 Set_Flag235 (Id, V);
5105 end Set_Is_Trivial_Subprogram;
5107 procedure Set_Is_True_Constant (Id : E; V : B := True) is
5109 Set_Flag163 (Id, V);
5110 end Set_Is_True_Constant;
5112 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
5114 pragma Assert (Id = Base_Type (Id));
5115 Set_Flag117 (Id, V);
5116 end Set_Is_Unchecked_Union;
5118 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
5120 pragma Assert (Ekind (Id) = E_Record_Type);
5121 Set_Flag246 (Id, V);
5122 end Set_Is_Underlying_Record_View;
5124 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
5126 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
5127 Set_Flag144 (Id, V);
5128 end Set_Is_Unsigned_Type;
5130 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
5132 pragma Assert (Ekind (Id) = E_Procedure);
5133 Set_Flag127 (Id, V);
5134 end Set_Is_Valued_Procedure;
5136 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
5138 Set_Flag206 (Id, V);
5139 end Set_Is_Visible_Formal;
5141 procedure Set_Is_Visible_Lib_Unit (Id : E; V : B := True) is
5143 Set_Flag116 (Id, V);
5144 end Set_Is_Visible_Lib_Unit;
5146 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
5148 pragma Assert (Ekind (Id) = E_Exception);
5149 Set_Flag133 (Id, V);
5150 end Set_Is_VMS_Exception;
5152 procedure Set_Is_Volatile (Id : E; V : B := True) is
5154 pragma Assert (Nkind (Id) in N_Entity);
5156 end Set_Is_Volatile;
5158 procedure Set_Itype_Printed (Id : E; V : B := True) is
5160 pragma Assert (Is_Itype (Id));
5161 Set_Flag202 (Id, V);
5162 end Set_Itype_Printed;
5164 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
5167 end Set_Kill_Elaboration_Checks;
5169 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
5172 end Set_Kill_Range_Checks;
5174 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
5176 pragma Assert (Is_Type (Id));
5177 Set_Flag207 (Id, V);
5178 end Set_Known_To_Have_Preelab_Init;
5180 procedure Set_Last_Aggregate_Assignment (Id : E; V : N) is
5182 pragma Assert (Ekind (Id) = E_Variable);
5184 end Set_Last_Aggregate_Assignment;
5186 procedure Set_Last_Assignment (Id : E; V : N) is
5188 pragma Assert (Is_Assignable (Id));
5190 end Set_Last_Assignment;
5192 procedure Set_Last_Entity (Id : E; V : E) is
5195 end Set_Last_Entity;
5197 procedure Set_Limited_View (Id : E; V : E) is
5199 pragma Assert (Ekind (Id) = E_Package);
5201 end Set_Limited_View;
5203 procedure Set_Linker_Section_Pragma (Id : E; V : N) is
5205 pragma Assert (Is_Type (Id)
5206 or else Ekind_In (Id, E_Constant, E_Variable)
5207 or else Is_Subprogram (Id));
5209 end Set_Linker_Section_Pragma;
5211 procedure Set_Lit_Indexes (Id : E; V : E) is
5213 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5215 end Set_Lit_Indexes;
5217 procedure Set_Lit_Strings (Id : E; V : E) is
5219 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5221 end Set_Lit_Strings;
5223 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
5225 pragma Assert (Is_Formal (Id));
5226 Set_Flag205 (Id, V);
5227 end Set_Low_Bound_Tested;
5229 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
5231 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
5233 end Set_Machine_Radix_10;
5235 procedure Set_Master_Id (Id : E; V : E) is
5237 pragma Assert (Is_Access_Type (Id));
5241 procedure Set_Materialize_Entity (Id : E; V : B := True) is
5243 Set_Flag168 (Id, V);
5244 end Set_Materialize_Entity;
5246 procedure Set_May_Inherit_Delayed_Rep_Aspects (Id : E; V : B := True) is
5248 Set_Flag262 (Id, V);
5249 end Set_May_Inherit_Delayed_Rep_Aspects;
5251 procedure Set_Mechanism (Id : E; V : M) is
5253 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
5254 Set_Uint8 (Id, UI_From_Int (V));
5257 procedure Set_Modulus (Id : E; V : U) is
5259 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
5263 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
5265 pragma Assert (Is_Type (Id));
5266 Set_Flag183 (Id, V);
5267 end Set_Must_Be_On_Byte_Boundary;
5269 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
5271 pragma Assert (Is_Type (Id));
5272 Set_Flag208 (Id, V);
5273 end Set_Must_Have_Preelab_Init;
5275 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
5277 Set_Flag147 (Id, V);
5278 end Set_Needs_Debug_Info;
5280 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
5283 (Is_Overloadable (Id)
5284 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
5286 end Set_Needs_No_Actuals;
5288 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
5290 Set_Flag115 (Id, V);
5291 end Set_Never_Set_In_Source;
5293 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
5296 end Set_Next_Inlined_Subprogram;
5298 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
5300 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5301 Set_Flag131 (Id, V);
5302 end Set_No_Pool_Assigned;
5304 procedure Set_No_Return (Id : E; V : B := True) is
5307 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
5308 Set_Flag113 (Id, V);
5311 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
5313 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5314 Set_Flag136 (Id, V);
5315 end Set_No_Strict_Aliasing;
5317 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
5319 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5321 end Set_Non_Binary_Modulus;
5323 procedure Set_Non_Limited_View (Id : E; V : E) is
5326 (Ekind (Id) in Incomplete_Kind or else Ekind (Id) = E_Abstract_State);
5328 end Set_Non_Limited_View;
5330 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
5333 (Root_Type (Id) = Standard_Boolean
5334 and then Ekind (Id) = E_Enumeration_Type);
5335 Set_Flag162 (Id, V);
5336 end Set_Nonzero_Is_True;
5338 procedure Set_Normalized_First_Bit (Id : E; V : U) is
5340 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5342 end Set_Normalized_First_Bit;
5344 procedure Set_Normalized_Position (Id : E; V : U) is
5346 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5348 end Set_Normalized_Position;
5350 procedure Set_Normalized_Position_Max (Id : E; V : U) is
5352 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5354 end Set_Normalized_Position_Max;
5356 procedure Set_OK_To_Rename (Id : E; V : B := True) is
5358 pragma Assert (Ekind (Id) = E_Variable);
5359 Set_Flag247 (Id, V);
5360 end Set_OK_To_Rename;
5362 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
5365 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5366 Set_Flag239 (Id, V);
5367 end Set_OK_To_Reorder_Components;
5369 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
5372 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5373 Set_Flag241 (Id, V);
5374 end Set_Optimize_Alignment_Space;
5376 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
5379 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5380 Set_Flag242 (Id, V);
5381 end Set_Optimize_Alignment_Time;
5383 procedure Set_Original_Access_Type (Id : E; V : E) is
5385 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
5387 end Set_Original_Access_Type;
5389 procedure Set_Original_Array_Type (Id : E; V : E) is
5391 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
5393 end Set_Original_Array_Type;
5395 procedure Set_Original_Record_Component (Id : E; V : E) is
5397 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
5399 end Set_Original_Record_Component;
5401 procedure Set_Overlays_Constant (Id : E; V : B := True) is
5403 Set_Flag243 (Id, V);
5404 end Set_Overlays_Constant;
5406 procedure Set_Overridden_Operation (Id : E; V : E) is
5409 end Set_Overridden_Operation;
5411 procedure Set_Package_Instantiation (Id : E; V : N) is
5413 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
5415 end Set_Package_Instantiation;
5417 procedure Set_Packed_Array_Type (Id : E; V : E) is
5419 pragma Assert (Is_Array_Type (Id));
5421 end Set_Packed_Array_Type;
5423 procedure Set_Parent_Subtype (Id : E; V : E) is
5425 pragma Assert (Ekind (Id) = E_Record_Type);
5427 end Set_Parent_Subtype;
5429 procedure Set_Part_Of_Constituents (Id : E; V : L) is
5431 pragma Assert (Ekind (Id) = E_Abstract_State);
5433 end Set_Part_Of_Constituents;
5435 procedure Set_Postcondition_Proc (Id : E; V : E) is
5437 pragma Assert (Ekind (Id) = E_Procedure);
5439 end Set_Postcondition_Proc;
5441 procedure Set_PPC_Wrapper (Id : E; V : E) is
5443 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
5445 end Set_PPC_Wrapper;
5447 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
5449 pragma Assert (Is_Tagged_Type (Id));
5450 Set_Elist10 (Id, V);
5451 end Set_Direct_Primitive_Operations;
5453 procedure Set_Prival (Id : E; V : E) is
5455 pragma Assert (Is_Protected_Component (Id));
5459 procedure Set_Prival_Link (Id : E; V : E) is
5461 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5463 end Set_Prival_Link;
5465 procedure Set_Private_Dependents (Id : E; V : L) is
5467 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
5468 Set_Elist18 (Id, V);
5469 end Set_Private_Dependents;
5471 procedure Set_Private_View (Id : E; V : N) is
5473 pragma Assert (Is_Private_Type (Id));
5475 end Set_Private_View;
5477 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
5479 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
5481 end Set_Protected_Body_Subprogram;
5483 procedure Set_Protected_Formal (Id : E; V : E) is
5485 pragma Assert (Is_Formal (Id));
5487 end Set_Protected_Formal;
5489 procedure Set_Protection_Object (Id : E; V : E) is
5491 pragma Assert (Ekind_In (Id, E_Entry,
5496 end Set_Protection_Object;
5498 procedure Set_Reachable (Id : E; V : B := True) is
5503 procedure Set_Referenced (Id : E; V : B := True) is
5505 Set_Flag156 (Id, V);
5508 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
5511 end Set_Referenced_As_LHS;
5513 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
5515 Set_Flag227 (Id, V);
5516 end Set_Referenced_As_Out_Parameter;
5518 procedure Set_Refinement_Constituents (Id : E; V : L) is
5520 pragma Assert (Ekind (Id) = E_Abstract_State);
5522 end Set_Refinement_Constituents;
5524 procedure Set_Register_Exception_Call (Id : E; V : N) is
5526 pragma Assert (Ekind (Id) = E_Exception);
5528 end Set_Register_Exception_Call;
5530 procedure Set_Related_Array_Object (Id : E; V : E) is
5532 pragma Assert (Is_Array_Type (Id));
5534 end Set_Related_Array_Object;
5536 procedure Set_Related_Expression (Id : E; V : N) is
5538 pragma Assert (Ekind (Id) in Type_Kind
5539 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
5541 end Set_Related_Expression;
5543 procedure Set_Related_Instance (Id : E; V : E) is
5545 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
5547 end Set_Related_Instance;
5549 procedure Set_Related_Type (Id : E; V : E) is
5551 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5553 end Set_Related_Type;
5555 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5557 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
5559 end Set_Relative_Deadline_Variable;
5561 procedure Set_Renamed_Entity (Id : E; V : N) is
5564 end Set_Renamed_Entity;
5566 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5568 pragma Assert (Ekind (Id) = E_Package);
5569 Set_Flag231 (Id, V);
5570 end Set_Renamed_In_Spec;
5572 procedure Set_Renamed_Object (Id : E; V : N) is
5575 end Set_Renamed_Object;
5577 procedure Set_Renaming_Map (Id : E; V : U) is
5580 end Set_Renaming_Map;
5582 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5584 pragma Assert (Is_Overloadable (Id));
5585 Set_Flag213 (Id, V);
5586 end Set_Requires_Overriding;
5588 procedure Set_Return_Present (Id : E; V : B := True) is
5591 end Set_Return_Present;
5593 procedure Set_Return_Applies_To (Id : E; V : N) is
5596 end Set_Return_Applies_To;
5598 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5601 end Set_Returns_By_Ref;
5603 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5606 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5607 Set_Flag164 (Id, V);
5608 end Set_Reverse_Bit_Order;
5610 procedure Set_Reverse_Storage_Order (Id : E; V : B := True) is
5614 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5616 end Set_Reverse_Storage_Order;
5618 procedure Set_RM_Size (Id : E; V : U) is
5620 pragma Assert (Is_Type (Id));
5624 procedure Set_Scalar_Range (Id : E; V : N) is
5627 end Set_Scalar_Range;
5629 procedure Set_Scale_Value (Id : E; V : U) is
5632 end Set_Scale_Value;
5634 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5636 pragma Assert (not Is_Record_Type (Id));
5638 end Set_Scope_Depth_Value;
5640 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5642 Set_Flag167 (Id, V);
5643 end Set_Sec_Stack_Needed_For_Return;
5645 procedure Set_Shadow_Entities (Id : E; V : S) is
5647 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5649 end Set_Shadow_Entities;
5651 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5653 pragma Assert (Ekind (Id) = E_Variable);
5655 end Set_Shared_Var_Procs_Instance;
5657 procedure Set_Size_Check_Code (Id : E; V : N) is
5659 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5661 end Set_Size_Check_Code;
5663 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5665 Set_Flag177 (Id, V);
5666 end Set_Size_Depends_On_Discriminant;
5668 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5671 end Set_Size_Known_At_Compile_Time;
5673 procedure Set_Small_Value (Id : E; V : R) is
5675 pragma Assert (Is_Fixed_Point_Type (Id));
5676 Set_Ureal21 (Id, V);
5677 end Set_Small_Value;
5679 procedure Set_SPARK_Aux_Pragma (Id : E; V : N) is
5682 (Ekind_In (Id, E_Generic_Package, -- package variants
5687 end Set_SPARK_Aux_Pragma;
5689 procedure Set_SPARK_Aux_Pragma_Inherited (Id : E; V : B := True) is
5692 (Ekind_In (Id, E_Generic_Package, -- package variants
5696 Set_Flag266 (Id, V);
5697 end Set_SPARK_Aux_Pragma_Inherited;
5699 procedure Set_SPARK_Pragma (Id : E; V : N) is
5702 (Ekind_In (Id, E_Function, -- subprogram variants
5704 E_Generic_Procedure,
5708 Ekind_In (Id, E_Generic_Package, -- package variants
5713 end Set_SPARK_Pragma;
5715 procedure Set_SPARK_Pragma_Inherited (Id : E; V : B := True) is
5718 (Ekind_In (Id, E_Function, -- subprogram variants
5720 E_Generic_Procedure,
5724 Ekind_In (Id, E_Generic_Package, -- package variants
5728 Set_Flag265 (Id, V);
5729 end Set_SPARK_Pragma_Inherited;
5731 procedure Set_Spec_Entity (Id : E; V : E) is
5733 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5735 end Set_Spec_Entity;
5737 procedure Set_Static_Predicate (Id : E; V : S) is
5739 pragma Assert (Is_Discrete_Type (Id) and then Has_Predicates (Id));
5741 end Set_Static_Predicate;
5743 procedure Set_Status_Flag_Or_Transient_Decl (Id : E; V : E) is
5745 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5747 end Set_Status_Flag_Or_Transient_Decl;
5749 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5751 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5752 pragma Assert (Id = Base_Type (Id));
5754 end Set_Storage_Size_Variable;
5756 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5758 pragma Assert (Ekind (Id) = E_Package);
5760 end Set_Static_Elaboration_Desired;
5762 procedure Set_Static_Initialization (Id : E; V : N) is
5765 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5767 end Set_Static_Initialization;
5769 procedure Set_Stored_Constraint (Id : E; V : L) is
5771 pragma Assert (Nkind (Id) in N_Entity);
5772 Set_Elist23 (Id, V);
5773 end Set_Stored_Constraint;
5775 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5777 pragma Assert (Id = Base_Type (Id));
5778 Set_Flag145 (Id, V);
5779 end Set_Strict_Alignment;
5781 procedure Set_String_Literal_Length (Id : E; V : U) is
5783 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5785 end Set_String_Literal_Length;
5787 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5789 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5791 end Set_String_Literal_Low_Bound;
5793 procedure Set_Subprograms_For_Type (Id : E; V : E) is
5795 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
5797 end Set_Subprograms_For_Type;
5799 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5801 Set_Flag148 (Id, V);
5802 end Set_Suppress_Elaboration_Warnings;
5804 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
5806 pragma Assert (Is_Type (Id));
5807 Set_Flag105 (Id, V);
5808 end Set_Suppress_Initialization;
5810 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5812 Set_Flag165 (Id, V);
5813 end Set_Suppress_Style_Checks;
5815 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5817 Set_Flag217 (Id, V);
5818 end Set_Suppress_Value_Tracking_On_Call;
5820 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5822 pragma Assert (Ekind (Id) in Task_Kind);
5824 end Set_Task_Body_Procedure;
5826 procedure Set_Thunk_Entity (Id : E; V : E) is
5828 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5829 and then Is_Thunk (Id));
5831 end Set_Thunk_Entity;
5833 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5836 end Set_Treat_As_Volatile;
5838 procedure Set_Underlying_Full_View (Id : E; V : E) is
5840 pragma Assert (Ekind (Id) in Private_Kind);
5842 end Set_Underlying_Full_View;
5844 procedure Set_Underlying_Record_View (Id : E; V : E) is
5846 pragma Assert (Ekind (Id) = E_Record_Type);
5848 end Set_Underlying_Record_View;
5850 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5852 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5853 Set_Flag216 (Id, V);
5854 end Set_Universal_Aliasing;
5856 procedure Set_Unset_Reference (Id : E; V : N) is
5859 end Set_Unset_Reference;
5861 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5863 Set_Flag222 (Id, V);
5864 end Set_Used_As_Generic_Actual;
5866 procedure Set_Uses_Lock_Free (Id : E; V : B := True) is
5868 pragma Assert (Ekind (Id) = E_Protected_Type);
5869 Set_Flag188 (Id, V);
5870 end Set_Uses_Lock_Free;
5872 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5875 end Set_Uses_Sec_Stack;
5877 procedure Set_Warnings_Off (Id : E; V : B := True) is
5880 end Set_Warnings_Off;
5882 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
5884 Set_Flag236 (Id, V);
5885 end Set_Warnings_Off_Used;
5887 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
5889 Set_Flag237 (Id, V);
5890 end Set_Warnings_Off_Used_Unmodified;
5892 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
5894 Set_Flag238 (Id, V);
5895 end Set_Warnings_Off_Used_Unreferenced;
5897 procedure Set_Was_Hidden (Id : E; V : B := True) is
5899 Set_Flag196 (Id, V);
5902 procedure Set_Wrapped_Entity (Id : E; V : E) is
5904 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5905 and then Is_Primitive_Wrapper (Id));
5907 end Set_Wrapped_Entity;
5909 -----------------------------------
5910 -- Field Initialization Routines --
5911 -----------------------------------
5913 procedure Init_Alignment (Id : E) is
5915 Set_Uint14 (Id, Uint_0);
5918 procedure Init_Alignment (Id : E; V : Int) is
5920 Set_Uint14 (Id, UI_From_Int (V));
5923 procedure Init_Component_Bit_Offset (Id : E) is
5925 Set_Uint11 (Id, No_Uint);
5926 end Init_Component_Bit_Offset;
5928 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
5930 Set_Uint11 (Id, UI_From_Int (V));
5931 end Init_Component_Bit_Offset;
5933 procedure Init_Component_Size (Id : E) is
5935 Set_Uint22 (Id, Uint_0);
5936 end Init_Component_Size;
5938 procedure Init_Component_Size (Id : E; V : Int) is
5940 Set_Uint22 (Id, UI_From_Int (V));
5941 end Init_Component_Size;
5943 procedure Init_Digits_Value (Id : E) is
5945 Set_Uint17 (Id, Uint_0);
5946 end Init_Digits_Value;
5948 procedure Init_Digits_Value (Id : E; V : Int) is
5950 Set_Uint17 (Id, UI_From_Int (V));
5951 end Init_Digits_Value;
5953 procedure Init_Esize (Id : E) is
5955 Set_Uint12 (Id, Uint_0);
5958 procedure Init_Esize (Id : E; V : Int) is
5960 Set_Uint12 (Id, UI_From_Int (V));
5963 procedure Init_Normalized_First_Bit (Id : E) is
5965 Set_Uint8 (Id, No_Uint);
5966 end Init_Normalized_First_Bit;
5968 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
5970 Set_Uint8 (Id, UI_From_Int (V));
5971 end Init_Normalized_First_Bit;
5973 procedure Init_Normalized_Position (Id : E) is
5975 Set_Uint14 (Id, No_Uint);
5976 end Init_Normalized_Position;
5978 procedure Init_Normalized_Position (Id : E; V : Int) is
5980 Set_Uint14 (Id, UI_From_Int (V));
5981 end Init_Normalized_Position;
5983 procedure Init_Normalized_Position_Max (Id : E) is
5985 Set_Uint10 (Id, No_Uint);
5986 end Init_Normalized_Position_Max;
5988 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
5990 Set_Uint10 (Id, UI_From_Int (V));
5991 end Init_Normalized_Position_Max;
5993 procedure Init_RM_Size (Id : E) is
5995 Set_Uint13 (Id, Uint_0);
5998 procedure Init_RM_Size (Id : E; V : Int) is
6000 Set_Uint13 (Id, UI_From_Int (V));
6003 -----------------------------
6004 -- Init_Component_Location --
6005 -----------------------------
6007 procedure Init_Component_Location (Id : E) is
6009 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
6010 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
6011 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
6012 Set_Uint12 (Id, Uint_0); -- Esize
6013 Set_Uint14 (Id, No_Uint); -- Normalized_Position
6014 end Init_Component_Location;
6016 ----------------------------
6017 -- Init_Object_Size_Align --
6018 ----------------------------
6020 procedure Init_Object_Size_Align (Id : E) is
6022 Set_Uint12 (Id, Uint_0); -- Esize
6023 Set_Uint14 (Id, Uint_0); -- Alignment
6024 end Init_Object_Size_Align;
6030 procedure Init_Size (Id : E; V : Int) is
6032 pragma Assert (not Is_Object (Id));
6033 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
6034 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
6037 ---------------------
6038 -- Init_Size_Align --
6039 ---------------------
6041 procedure Init_Size_Align (Id : E) is
6043 pragma Assert (not Is_Object (Id));
6044 Set_Uint12 (Id, Uint_0); -- Esize
6045 Set_Uint13 (Id, Uint_0); -- RM_Size
6046 Set_Uint14 (Id, Uint_0); -- Alignment
6047 end Init_Size_Align;
6049 ----------------------------------------------
6050 -- Type Representation Attribute Predicates --
6051 ----------------------------------------------
6053 function Known_Alignment (E : Entity_Id) return B is
6055 return Uint14 (E) /= Uint_0
6056 and then Uint14 (E) /= No_Uint;
6057 end Known_Alignment;
6059 function Known_Component_Bit_Offset (E : Entity_Id) return B is
6061 return Uint11 (E) /= No_Uint;
6062 end Known_Component_Bit_Offset;
6064 function Known_Component_Size (E : Entity_Id) return B is
6066 return Uint22 (Base_Type (E)) /= Uint_0
6067 and then Uint22 (Base_Type (E)) /= No_Uint;
6068 end Known_Component_Size;
6070 function Known_Esize (E : Entity_Id) return B is
6072 return Uint12 (E) /= Uint_0
6073 and then Uint12 (E) /= No_Uint;
6076 function Known_Normalized_First_Bit (E : Entity_Id) return B is
6078 return Uint8 (E) /= No_Uint;
6079 end Known_Normalized_First_Bit;
6081 function Known_Normalized_Position (E : Entity_Id) return B is
6083 return Uint14 (E) /= No_Uint;
6084 end Known_Normalized_Position;
6086 function Known_Normalized_Position_Max (E : Entity_Id) return B is
6088 return Uint10 (E) /= No_Uint;
6089 end Known_Normalized_Position_Max;
6091 function Known_RM_Size (E : Entity_Id) return B is
6093 return Uint13 (E) /= No_Uint
6094 and then (Uint13 (E) /= Uint_0
6095 or else Is_Discrete_Type (E)
6096 or else Is_Fixed_Point_Type (E));
6099 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
6101 return Uint11 (E) /= No_Uint
6102 and then Uint11 (E) >= Uint_0;
6103 end Known_Static_Component_Bit_Offset;
6105 function Known_Static_Component_Size (E : Entity_Id) return B is
6107 return Uint22 (Base_Type (E)) > Uint_0;
6108 end Known_Static_Component_Size;
6110 function Known_Static_Esize (E : Entity_Id) return B is
6112 return Uint12 (E) > Uint_0
6113 and then not Is_Generic_Type (E);
6114 end Known_Static_Esize;
6116 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
6118 return Uint8 (E) /= No_Uint
6119 and then Uint8 (E) >= Uint_0;
6120 end Known_Static_Normalized_First_Bit;
6122 function Known_Static_Normalized_Position (E : Entity_Id) return B is
6124 return Uint14 (E) /= No_Uint
6125 and then Uint14 (E) >= Uint_0;
6126 end Known_Static_Normalized_Position;
6128 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
6130 return Uint10 (E) /= No_Uint
6131 and then Uint10 (E) >= Uint_0;
6132 end Known_Static_Normalized_Position_Max;
6134 function Known_Static_RM_Size (E : Entity_Id) return B is
6136 return (Uint13 (E) > Uint_0
6137 or else Is_Discrete_Type (E)
6138 or else Is_Fixed_Point_Type (E))
6139 and then not Is_Generic_Type (E);
6140 end Known_Static_RM_Size;
6142 function Unknown_Alignment (E : Entity_Id) return B is
6144 return Uint14 (E) = Uint_0
6145 or else Uint14 (E) = No_Uint;
6146 end Unknown_Alignment;
6148 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
6150 return Uint11 (E) = No_Uint;
6151 end Unknown_Component_Bit_Offset;
6153 function Unknown_Component_Size (E : Entity_Id) return B is
6155 return Uint22 (Base_Type (E)) = Uint_0
6157 Uint22 (Base_Type (E)) = No_Uint;
6158 end Unknown_Component_Size;
6160 function Unknown_Esize (E : Entity_Id) return B is
6162 return Uint12 (E) = No_Uint
6164 Uint12 (E) = Uint_0;
6167 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
6169 return Uint8 (E) = No_Uint;
6170 end Unknown_Normalized_First_Bit;
6172 function Unknown_Normalized_Position (E : Entity_Id) return B is
6174 return Uint14 (E) = No_Uint;
6175 end Unknown_Normalized_Position;
6177 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
6179 return Uint10 (E) = No_Uint;
6180 end Unknown_Normalized_Position_Max;
6182 function Unknown_RM_Size (E : Entity_Id) return B is
6184 return (Uint13 (E) = Uint_0
6185 and then not Is_Discrete_Type (E)
6186 and then not Is_Fixed_Point_Type (E))
6187 or else Uint13 (E) = No_Uint;
6188 end Unknown_RM_Size;
6190 --------------------
6191 -- Address_Clause --
6192 --------------------
6194 function Address_Clause (Id : E) return N is
6196 return Get_Attribute_Definition_Clause (Id, Attribute_Address);
6203 function Aft_Value (Id : E) return U is
6205 Delta_Val : Ureal := Delta_Value (Id);
6207 while Delta_Val < Ureal_Tenth loop
6208 Delta_Val := Delta_Val * Ureal_10;
6209 Result := Result + 1;
6212 return UI_From_Int (Result);
6215 ----------------------
6216 -- Alignment_Clause --
6217 ----------------------
6219 function Alignment_Clause (Id : E) return N is
6221 return Get_Attribute_Definition_Clause (Id, Attribute_Alignment);
6222 end Alignment_Clause;
6228 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
6230 if Last_Entity (V) = Empty then
6231 Set_First_Entity (Id => V, V => Id);
6233 Set_Next_Entity (Last_Entity (V), Id);
6236 Set_Next_Entity (Id, Empty);
6238 Set_Last_Entity (Id => V, V => Id);
6245 function Base_Type (Id : E) return E is
6247 if Is_Base_Type (Id) then
6250 pragma Assert (Is_Type (Id));
6255 -------------------------
6256 -- Component_Alignment --
6257 -------------------------
6259 -- Component Alignment is encoded using two flags, Flag128/129 as
6260 -- follows. Note that both flags False = Align_Default, so that the
6261 -- default initialization of flags to False initializes component
6262 -- alignment to the default value as required.
6264 -- Flag128 Flag129 Value
6265 -- ------- ------- -----
6266 -- False False Calign_Default
6267 -- False True Calign_Component_Size
6268 -- True False Calign_Component_Size_4
6269 -- True True Calign_Storage_Unit
6271 function Component_Alignment (Id : E) return C is
6272 BT : constant Node_Id := Base_Type (Id);
6275 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
6277 if Flag128 (BT) then
6278 if Flag129 (BT) then
6279 return Calign_Storage_Unit;
6281 return Calign_Component_Size_4;
6285 if Flag129 (BT) then
6286 return Calign_Component_Size;
6288 return Calign_Default;
6291 end Component_Alignment;
6293 ----------------------
6294 -- Declaration_Node --
6295 ----------------------
6297 function Declaration_Node (Id : E) return N is
6301 if Ekind (Id) = E_Incomplete_Type
6302 and then Present (Full_View (Id))
6304 P := Parent (Full_View (Id));
6310 if Nkind (P) /= N_Selected_Component
6311 and then Nkind (P) /= N_Expanded_Name
6313 not (Nkind (P) = N_Defining_Program_Unit_Name
6314 and then Is_Child_Unit (Id))
6321 end Declaration_Node;
6323 ---------------------
6324 -- Designated_Type --
6325 ---------------------
6327 function Designated_Type (Id : E) return E is
6331 Desig_Type := Directly_Designated_Type (Id);
6333 if Ekind (Desig_Type) = E_Incomplete_Type
6334 and then Present (Full_View (Desig_Type))
6336 return Full_View (Desig_Type);
6338 elsif Is_Class_Wide_Type (Desig_Type)
6339 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
6340 and then Present (Full_View (Etype (Desig_Type)))
6341 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
6343 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
6348 end Designated_Type;
6350 ----------------------
6351 -- Entry_Index_Type --
6352 ----------------------
6354 function Entry_Index_Type (Id : E) return N is
6356 pragma Assert (Ekind (Id) = E_Entry_Family);
6357 return Etype (Discrete_Subtype_Definition (Parent (Id)));
6358 end Entry_Index_Type;
6360 ---------------------
6361 -- First_Component --
6362 ---------------------
6364 function First_Component (Id : E) return E is
6369 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
6371 Comp_Id := First_Entity (Id);
6372 while Present (Comp_Id) loop
6373 exit when Ekind (Comp_Id) = E_Component;
6374 Comp_Id := Next_Entity (Comp_Id);
6378 end First_Component;
6380 -------------------------------------
6381 -- First_Component_Or_Discriminant --
6382 -------------------------------------
6384 function First_Component_Or_Discriminant (Id : E) return E is
6389 (Is_Record_Type (Id)
6390 or else Is_Incomplete_Or_Private_Type (Id)
6391 or else Has_Discriminants (Id));
6393 Comp_Id := First_Entity (Id);
6394 while Present (Comp_Id) loop
6395 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6396 Comp_Id := Next_Entity (Comp_Id);
6400 end First_Component_Or_Discriminant;
6406 function First_Formal (Id : E) return E is
6411 (Is_Overloadable (Id)
6412 or else Ekind_In (Id, E_Entry_Family,
6414 E_Subprogram_Type));
6416 if Ekind (Id) = E_Enumeration_Literal then
6420 Formal := First_Entity (Id);
6422 if Present (Formal) and then Is_Formal (Formal) then
6430 ------------------------------
6431 -- First_Formal_With_Extras --
6432 ------------------------------
6434 function First_Formal_With_Extras (Id : E) return E is
6439 (Is_Overloadable (Id)
6440 or else Ekind_In (Id, E_Entry_Family,
6442 E_Subprogram_Type));
6444 if Ekind (Id) = E_Enumeration_Literal then
6448 Formal := First_Entity (Id);
6450 if Present (Formal) and then Is_Formal (Formal) then
6453 return Extra_Formals (Id); -- Empty if no extra formals
6456 end First_Formal_With_Extras;
6458 -------------------------------------
6459 -- Get_Attribute_Definition_Clause --
6460 -------------------------------------
6462 function Get_Attribute_Definition_Clause
6464 Id : Attribute_Id) return Node_Id
6469 N := First_Rep_Item (E);
6470 while Present (N) loop
6471 if Nkind (N) = N_Attribute_Definition_Clause
6472 and then Get_Attribute_Id (Chars (N)) = Id
6481 end Get_Attribute_Definition_Clause;
6487 function Get_Full_View (T : Entity_Id) return Entity_Id is
6489 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
6490 return Full_View (T);
6492 elsif Is_Class_Wide_Type (T)
6493 and then Ekind (Root_Type (T)) = E_Incomplete_Type
6494 and then Present (Full_View (Root_Type (T)))
6496 return Class_Wide_Type (Full_View (Root_Type (T)));
6507 function Get_Pragma (E : Entity_Id; Id : Pragma_Id) return Node_Id is
6508 Is_CDG : constant Boolean :=
6509 Id = Pragma_Abstract_State or else
6510 Id = Pragma_Async_Readers or else
6511 Id = Pragma_Async_Writers or else
6512 Id = Pragma_Depends or else
6513 Id = Pragma_Effective_Reads or else
6514 Id = Pragma_Effective_Writes or else
6515 Id = Pragma_Global or else
6516 Id = Pragma_Initial_Condition or else
6517 Id = Pragma_Initializes or else
6518 Id = Pragma_Part_Of or else
6519 Id = Pragma_Refined_Depends or else
6520 Id = Pragma_Refined_Global or else
6521 Id = Pragma_Refined_State;
6522 Is_CTC : constant Boolean :=
6523 Id = Pragma_Contract_Cases or else
6524 Id = Pragma_Test_Case;
6525 Is_PPC : constant Boolean :=
6526 Id = Pragma_Precondition or else
6527 Id = Pragma_Postcondition or else
6528 Id = Pragma_Refined_Post;
6530 In_Contract : constant Boolean := Is_CDG or Is_CTC or Is_PPC;
6536 -- Handle pragmas that appear in N_Contract nodes. Those have to be
6537 -- extracted from their specialized list.
6540 Items := Contract (E);
6546 Item := Classifications (Items);
6549 Item := Contract_Test_Cases (Items);
6552 Item := Pre_Post_Conditions (Items);
6558 Item := First_Rep_Item (E);
6561 while Present (Item) loop
6562 if Nkind (Item) = N_Pragma
6563 and then Get_Pragma_Id (Pragma_Name (Item)) = Id
6567 -- All nodes in N_Contract are chained using Next_Pragma
6569 elsif In_Contract then
6570 Item := Next_Pragma (Item);
6575 Next_Rep_Item (Item);
6582 --------------------------------------
6583 -- Get_Record_Representation_Clause --
6584 --------------------------------------
6586 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
6590 N := First_Rep_Item (E);
6591 while Present (N) loop
6592 if Nkind (N) = N_Record_Representation_Clause then
6600 end Get_Record_Representation_Clause;
6602 ------------------------
6603 -- Has_Attach_Handler --
6604 ------------------------
6606 function Has_Attach_Handler (Id : E) return B is
6610 pragma Assert (Is_Protected_Type (Id));
6612 Ritem := First_Rep_Item (Id);
6613 while Present (Ritem) loop
6614 if Nkind (Ritem) = N_Pragma
6615 and then Pragma_Name (Ritem) = Name_Attach_Handler
6619 Next_Rep_Item (Ritem);
6624 end Has_Attach_Handler;
6630 function Has_Entries (Id : E) return B is
6634 pragma Assert (Is_Concurrent_Type (Id));
6636 Ent := First_Entity (Id);
6637 while Present (Ent) loop
6638 if Is_Entry (Ent) then
6642 Ent := Next_Entity (Ent);
6648 ----------------------------
6649 -- Has_Foreign_Convention --
6650 ----------------------------
6652 function Has_Foreign_Convention (Id : E) return B is
6654 -- While regular Intrinsics such as the Standard operators fit in the
6655 -- "Ada" convention, those with an Interface_Name materialize GCC
6656 -- builtin imports for which Ada special treatments shouldn't apply.
6658 return Convention (Id) in Foreign_Convention
6659 or else (Convention (Id) = Convention_Intrinsic
6660 and then Present (Interface_Name (Id)));
6661 end Has_Foreign_Convention;
6663 ---------------------------
6664 -- Has_Interrupt_Handler --
6665 ---------------------------
6667 function Has_Interrupt_Handler (Id : E) return B is
6671 pragma Assert (Is_Protected_Type (Id));
6673 Ritem := First_Rep_Item (Id);
6674 while Present (Ritem) loop
6675 if Nkind (Ritem) = N_Pragma
6676 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6680 Next_Rep_Item (Ritem);
6685 end Has_Interrupt_Handler;
6687 -----------------------------
6688 -- Has_Non_Null_Refinement --
6689 -----------------------------
6691 function Has_Non_Null_Refinement (Id : E) return B is
6693 -- "Refinement" is a concept applicable only to abstract states
6695 pragma Assert (Ekind (Id) = E_Abstract_State);
6697 if Has_Visible_Refinement (Id) then
6698 pragma Assert (Present (Refinement_Constituents (Id)));
6700 -- For a refinement to be non-null, the first constituent must be
6701 -- anything other than null.
6704 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) /= N_Null;
6708 end Has_Non_Null_Refinement;
6710 -----------------------------
6711 -- Has_Null_Abstract_State --
6712 -----------------------------
6714 function Has_Null_Abstract_State (Id : E) return B is
6716 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
6719 Present (Abstract_States (Id))
6720 and then Is_Null_State (Node (First_Elmt (Abstract_States (Id))));
6721 end Has_Null_Abstract_State;
6723 -------------------------
6724 -- Has_Null_Refinement --
6725 -------------------------
6727 function Has_Null_Refinement (Id : E) return B is
6729 -- "Refinement" is a concept applicable only to abstract states
6731 pragma Assert (Ekind (Id) = E_Abstract_State);
6733 if Has_Visible_Refinement (Id) then
6734 pragma Assert (Present (Refinement_Constituents (Id)));
6736 -- For a refinement to be null, the state's sole constituent must be
6740 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) = N_Null;
6744 end Has_Null_Refinement;
6746 --------------------
6747 -- Has_Unmodified --
6748 --------------------
6750 function Has_Unmodified (E : Entity_Id) return Boolean is
6752 if Has_Pragma_Unmodified (E) then
6754 elsif Warnings_Off (E) then
6755 Set_Warnings_Off_Used_Unmodified (E);
6762 ---------------------
6763 -- Has_Unreferenced --
6764 ---------------------
6766 function Has_Unreferenced (E : Entity_Id) return Boolean is
6768 if Has_Pragma_Unreferenced (E) then
6770 elsif Warnings_Off (E) then
6771 Set_Warnings_Off_Used_Unreferenced (E);
6776 end Has_Unreferenced;
6778 ----------------------
6779 -- Has_Warnings_Off --
6780 ----------------------
6782 function Has_Warnings_Off (E : Entity_Id) return Boolean is
6784 if Warnings_Off (E) then
6785 Set_Warnings_Off_Used (E);
6790 end Has_Warnings_Off;
6792 ------------------------------
6793 -- Implementation_Base_Type --
6794 ------------------------------
6796 function Implementation_Base_Type (Id : E) return E is
6801 Bastyp := Base_Type (Id);
6803 if Is_Incomplete_Or_Private_Type (Bastyp) then
6804 Imptyp := Underlying_Type (Bastyp);
6806 -- If we have an implementation type, then just return it,
6807 -- otherwise we return the Base_Type anyway. This can only
6808 -- happen in error situations and should avoid some error bombs.
6810 if Present (Imptyp) then
6811 return Base_Type (Imptyp);
6819 end Implementation_Base_Type;
6821 -------------------------
6822 -- Invariant_Procedure --
6823 -------------------------
6825 function Invariant_Procedure (Id : E) return E is
6829 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
6831 if No (Subprograms_For_Type (Id)) then
6835 S := Subprograms_For_Type (Id);
6836 while Present (S) loop
6837 if Is_Invariant_Procedure (S) then
6840 S := Subprograms_For_Type (S);
6846 end Invariant_Procedure;
6852 -- Global flag table allowing rapid computation of this function
6854 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
6855 (E_Enumeration_Subtype |
6857 E_Signed_Integer_Subtype |
6858 E_Modular_Integer_Subtype |
6859 E_Floating_Point_Subtype |
6860 E_Ordinary_Fixed_Point_Subtype |
6861 E_Decimal_Fixed_Point_Subtype |
6866 E_Record_Subtype_With_Private |
6867 E_Limited_Private_Subtype |
6869 E_Protected_Subtype |
6871 E_String_Literal_Subtype |
6872 E_Class_Wide_Subtype => False,
6875 function Is_Base_Type (Id : E) return Boolean is
6877 return Entity_Is_Base_Type (Ekind (Id));
6880 ---------------------
6881 -- Is_Boolean_Type --
6882 ---------------------
6884 function Is_Boolean_Type (Id : E) return B is
6886 return Root_Type (Id) = Standard_Boolean;
6887 end Is_Boolean_Type;
6889 ------------------------
6890 -- Is_Constant_Object --
6891 ------------------------
6893 function Is_Constant_Object (Id : E) return B is
6894 K : constant Entity_Kind := Ekind (Id);
6897 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
6898 end Is_Constant_Object;
6900 --------------------
6901 -- Is_Discriminal --
6902 --------------------
6904 function Is_Discriminal (Id : E) return B is
6906 return (Ekind_In (Id, E_Constant, E_In_Parameter)
6907 and then Present (Discriminal_Link (Id)));
6910 ----------------------
6911 -- Is_Dynamic_Scope --
6912 ----------------------
6914 function Is_Dynamic_Scope (Id : E) return B is
6917 Ekind (Id) = E_Block
6919 Ekind (Id) = E_Function
6921 Ekind (Id) = E_Procedure
6923 Ekind (Id) = E_Subprogram_Body
6925 Ekind (Id) = E_Task_Type
6927 (Ekind (Id) = E_Limited_Private_Type
6928 and then Present (Full_View (Id))
6929 and then Ekind (Full_View (Id)) = E_Task_Type)
6931 Ekind (Id) = E_Entry
6933 Ekind (Id) = E_Entry_Family
6935 Ekind (Id) = E_Return_Statement;
6936 end Is_Dynamic_Scope;
6938 --------------------
6939 -- Is_Entity_Name --
6940 --------------------
6942 function Is_Entity_Name (N : Node_Id) return Boolean is
6943 Kind : constant Node_Kind := Nkind (N);
6946 -- Identifiers, operator symbols, expanded names are entity names
6948 return Kind = N_Identifier
6949 or else Kind = N_Operator_Symbol
6950 or else Kind = N_Expanded_Name
6952 -- Attribute references are entity names if they refer to an entity.
6953 -- Note that we don't do this by testing for the presence of the
6954 -- Entity field in the N_Attribute_Reference node, since it may not
6955 -- have been set yet.
6957 or else (Kind = N_Attribute_Reference
6958 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
6961 -----------------------
6962 -- Is_External_State --
6963 -----------------------
6965 function Is_External_State (Id : E) return B is
6968 Ekind (Id) = E_Abstract_State and then Has_Option (Id, Name_External);
6969 end Is_External_State;
6975 function Is_Finalizer (Id : E) return B is
6977 return Ekind (Id) = E_Procedure and then Chars (Id) = Name_uFinalizer;
6980 ---------------------
6981 -- Is_Ghost_Entity --
6982 ---------------------
6984 -- Note: coding below allows for ghost variables. They are not currently
6985 -- implemented, so we will always get False for variables, but that is
6986 -- expected to change in the future.
6988 function Is_Ghost_Entity (Id : E) return B is
6990 if Present (Id) and then Ekind (Id) = E_Variable then
6991 return Convention (Id) = Convention_Ghost;
6993 return Is_Ghost_Subprogram (Id);
6995 end Is_Ghost_Entity;
6997 -------------------------
6998 -- Is_Ghost_Subprogram --
6999 -------------------------
7001 function Is_Ghost_Subprogram (Id : E) return B is
7003 if Present (Id) and then Ekind_In (Id, E_Function, E_Procedure) then
7004 return Convention (Id) = Convention_Ghost;
7008 end Is_Ghost_Subprogram;
7014 function Is_Null_State (Id : E) return B is
7017 Ekind (Id) = E_Abstract_State and then Nkind (Parent (Id)) = N_Null;
7020 ---------------------
7021 -- Is_Packed_Array --
7022 ---------------------
7024 function Is_Packed_Array (Id : E) return B is
7026 return Is_Array_Type (Id) and then Is_Packed (Id);
7027 end Is_Packed_Array;
7029 -----------------------------------
7030 -- Is_Package_Or_Generic_Package --
7031 -----------------------------------
7033 function Is_Package_Or_Generic_Package (Id : E) return B is
7035 return Ekind_In (Id, E_Generic_Package, E_Package);
7036 end Is_Package_Or_Generic_Package;
7042 function Is_Prival (Id : E) return B is
7044 return (Ekind_In (Id, E_Constant, E_Variable)
7045 and then Present (Prival_Link (Id)));
7048 ----------------------------
7049 -- Is_Protected_Component --
7050 ----------------------------
7052 function Is_Protected_Component (Id : E) return B is
7054 return Ekind (Id) = E_Component and then Is_Protected_Type (Scope (Id));
7055 end Is_Protected_Component;
7057 ----------------------------
7058 -- Is_Protected_Interface --
7059 ----------------------------
7061 function Is_Protected_Interface (Id : E) return B is
7062 Typ : constant Entity_Id := Base_Type (Id);
7064 if not Is_Interface (Typ) then
7066 elsif Is_Class_Wide_Type (Typ) then
7067 return Is_Protected_Interface (Etype (Typ));
7069 return Protected_Present (Type_Definition (Parent (Typ)));
7071 end Is_Protected_Interface;
7073 ------------------------------
7074 -- Is_Protected_Record_Type --
7075 ------------------------------
7077 function Is_Protected_Record_Type (Id : E) return B is
7080 Is_Concurrent_Record_Type (Id)
7081 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
7082 end Is_Protected_Record_Type;
7084 --------------------------------
7085 -- Is_Standard_Character_Type --
7086 --------------------------------
7088 function Is_Standard_Character_Type (Id : E) return B is
7090 if Is_Type (Id) then
7092 R : constant Entity_Id := Root_Type (Id);
7095 R = Standard_Character
7097 R = Standard_Wide_Character
7099 R = Standard_Wide_Wide_Character;
7105 end Is_Standard_Character_Type;
7107 --------------------
7108 -- Is_String_Type --
7109 --------------------
7111 function Is_String_Type (Id : E) return B is
7113 return Ekind (Id) in String_Kind
7114 or else (Is_Array_Type (Id)
7115 and then Id /= Any_Composite
7116 and then Number_Dimensions (Id) = 1
7117 and then Is_Character_Type (Component_Type (Id)));
7120 -------------------------------
7121 -- Is_Synchronized_Interface --
7122 -------------------------------
7124 function Is_Synchronized_Interface (Id : E) return B is
7125 Typ : constant Entity_Id := Base_Type (Id);
7128 if not Is_Interface (Typ) then
7131 elsif Is_Class_Wide_Type (Typ) then
7132 return Is_Synchronized_Interface (Etype (Typ));
7135 return Protected_Present (Type_Definition (Parent (Typ)))
7136 or else Synchronized_Present (Type_Definition (Parent (Typ)))
7137 or else Task_Present (Type_Definition (Parent (Typ)));
7139 end Is_Synchronized_Interface;
7141 -----------------------
7142 -- Is_Task_Interface --
7143 -----------------------
7145 function Is_Task_Interface (Id : E) return B is
7146 Typ : constant Entity_Id := Base_Type (Id);
7148 if not Is_Interface (Typ) then
7150 elsif Is_Class_Wide_Type (Typ) then
7151 return Is_Task_Interface (Etype (Typ));
7153 return Task_Present (Type_Definition (Parent (Typ)));
7155 end Is_Task_Interface;
7157 -------------------------
7158 -- Is_Task_Record_Type --
7159 -------------------------
7161 function Is_Task_Record_Type (Id : E) return B is
7164 Is_Concurrent_Record_Type (Id)
7165 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
7166 end Is_Task_Record_Type;
7168 ------------------------
7169 -- Is_Wrapper_Package --
7170 ------------------------
7172 function Is_Wrapper_Package (Id : E) return B is
7174 return (Ekind (Id) = E_Package and then Present (Related_Instance (Id)));
7175 end Is_Wrapper_Package;
7181 function Last_Formal (Id : E) return E is
7186 (Is_Overloadable (Id)
7187 or else Ekind_In (Id, E_Entry_Family,
7189 E_Subprogram_Type));
7191 if Ekind (Id) = E_Enumeration_Literal then
7195 Formal := First_Formal (Id);
7197 if Present (Formal) then
7198 while Present (Next_Formal (Formal)) loop
7199 Formal := Next_Formal (Formal);
7207 function Model_Emin_Value (Id : E) return Uint is
7209 return Machine_Emin_Value (Id);
7210 end Model_Emin_Value;
7212 -------------------------
7213 -- Model_Epsilon_Value --
7214 -------------------------
7216 function Model_Epsilon_Value (Id : E) return Ureal is
7217 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7219 return Radix ** (1 - Model_Mantissa_Value (Id));
7220 end Model_Epsilon_Value;
7222 --------------------------
7223 -- Model_Mantissa_Value --
7224 --------------------------
7226 function Model_Mantissa_Value (Id : E) return Uint is
7228 return Machine_Mantissa_Value (Id);
7229 end Model_Mantissa_Value;
7231 -----------------------
7232 -- Model_Small_Value --
7233 -----------------------
7235 function Model_Small_Value (Id : E) return Ureal is
7236 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7238 return Radix ** (Model_Emin_Value (Id) - 1);
7239 end Model_Small_Value;
7241 ------------------------
7242 -- Machine_Emax_Value --
7243 ------------------------
7245 function Machine_Emax_Value (Id : E) return Uint is
7246 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7249 case Float_Rep (Id) is
7252 when 1 .. 6 => return Uint_128;
7253 when 7 .. 15 => return 2**10;
7254 when 16 .. 33 => return 2**14;
7255 when others => return No_Uint;
7260 when 1 .. 9 => return 2**7 - 1;
7261 when 10 .. 15 => return 2**10 - 1;
7262 when others => return No_Uint;
7266 return Uint_2 ** Uint_7 - Uint_1;
7268 end Machine_Emax_Value;
7270 ------------------------
7271 -- Machine_Emin_Value --
7272 ------------------------
7274 function Machine_Emin_Value (Id : E) return Uint is
7276 case Float_Rep (Id) is
7277 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
7278 when VAX_Native => return -Machine_Emax_Value (Id);
7279 when AAMP => return -Machine_Emax_Value (Id);
7281 end Machine_Emin_Value;
7283 ----------------------------
7284 -- Machine_Mantissa_Value --
7285 ----------------------------
7287 function Machine_Mantissa_Value (Id : E) return Uint is
7288 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7291 case Float_Rep (Id) is
7294 when 1 .. 6 => return Uint_24;
7295 when 7 .. 15 => return UI_From_Int (53);
7296 when 16 .. 18 => return Uint_64;
7297 when 19 .. 33 => return UI_From_Int (113);
7298 when others => return No_Uint;
7303 when 1 .. 6 => return Uint_24;
7304 when 7 .. 9 => return UI_From_Int (56);
7305 when 10 .. 15 => return UI_From_Int (53);
7306 when others => return No_Uint;
7311 when 1 .. 6 => return Uint_24;
7312 when 7 .. 9 => return UI_From_Int (40);
7313 when others => return No_Uint;
7316 end Machine_Mantissa_Value;
7318 -------------------------
7319 -- Machine_Radix_Value --
7320 -------------------------
7322 function Machine_Radix_Value (Id : E) return U is
7324 case Float_Rep (Id) is
7325 when IEEE_Binary | VAX_Native | AAMP =>
7328 end Machine_Radix_Value;
7330 --------------------
7331 -- Next_Component --
7332 --------------------
7334 function Next_Component (Id : E) return E is
7338 Comp_Id := Next_Entity (Id);
7339 while Present (Comp_Id) loop
7340 exit when Ekind (Comp_Id) = E_Component;
7341 Comp_Id := Next_Entity (Comp_Id);
7347 ------------------------------------
7348 -- Next_Component_Or_Discriminant --
7349 ------------------------------------
7351 function Next_Component_Or_Discriminant (Id : E) return E is
7355 Comp_Id := Next_Entity (Id);
7356 while Present (Comp_Id) loop
7357 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
7358 Comp_Id := Next_Entity (Comp_Id);
7362 end Next_Component_Or_Discriminant;
7364 -----------------------
7365 -- Next_Discriminant --
7366 -----------------------
7368 -- This function actually implements both Next_Discriminant and
7369 -- Next_Stored_Discriminant by making sure that the Discriminant
7370 -- returned is of the same variety as Id.
7372 function Next_Discriminant (Id : E) return E is
7374 -- Derived Tagged types with private extensions look like this...
7376 -- E_Discriminant d1
7377 -- E_Discriminant d2
7379 -- E_Discriminant d1
7380 -- E_Discriminant d2
7383 -- so it is critical not to go past the leading discriminants
7388 pragma Assert (Ekind (Id) = E_Discriminant);
7391 D := Next_Entity (D);
7393 or else (Ekind (D) /= E_Discriminant
7394 and then not Is_Itype (D))
7399 exit when Ekind (D) = E_Discriminant
7400 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
7404 end Next_Discriminant;
7410 function Next_Formal (Id : E) return E is
7414 -- Follow the chain of declared entities as long as the kind of the
7415 -- entity corresponds to a formal parameter. Skip internal entities
7416 -- that may have been created for implicit subtypes, in the process
7417 -- of analyzing default expressions.
7421 P := Next_Entity (P);
7423 if No (P) or else Is_Formal (P) then
7425 elsif not Is_Internal (P) then
7431 -----------------------------
7432 -- Next_Formal_With_Extras --
7433 -----------------------------
7435 function Next_Formal_With_Extras (Id : E) return E is
7437 if Present (Extra_Formal (Id)) then
7438 return Extra_Formal (Id);
7440 return Next_Formal (Id);
7442 end Next_Formal_With_Extras;
7448 function Next_Index (Id : Node_Id) return Node_Id is
7457 function Next_Literal (Id : E) return E is
7459 pragma Assert (Nkind (Id) in N_Entity);
7463 ------------------------------
7464 -- Next_Stored_Discriminant --
7465 ------------------------------
7467 function Next_Stored_Discriminant (Id : E) return E is
7469 -- See comment in Next_Discriminant
7471 return Next_Discriminant (Id);
7472 end Next_Stored_Discriminant;
7474 -----------------------
7475 -- Number_Dimensions --
7476 -----------------------
7478 function Number_Dimensions (Id : E) return Pos is
7483 if Ekind (Id) in String_Kind then
7488 T := First_Index (Id);
7489 while Present (T) loop
7496 end Number_Dimensions;
7498 --------------------
7499 -- Number_Entries --
7500 --------------------
7502 function Number_Entries (Id : E) return Nat is
7507 pragma Assert (Is_Concurrent_Type (Id));
7510 Ent := First_Entity (Id);
7511 while Present (Ent) loop
7512 if Is_Entry (Ent) then
7516 Ent := Next_Entity (Ent);
7522 --------------------
7523 -- Number_Formals --
7524 --------------------
7526 function Number_Formals (Id : E) return Pos is
7532 Formal := First_Formal (Id);
7533 while Present (Formal) loop
7535 Formal := Next_Formal (Formal);
7541 --------------------
7542 -- Parameter_Mode --
7543 --------------------
7545 function Parameter_Mode (Id : E) return Formal_Kind is
7550 ------------------------
7551 -- Predicate_Function --
7552 ------------------------
7554 function Predicate_Function (Id : E) return E is
7559 pragma Assert (Is_Type (Id));
7561 -- If type is private and has a completion, predicate may be defined
7562 -- on the full view.
7564 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7565 T := Full_View (Id);
7570 if No (Subprograms_For_Type (T)) then
7574 S := Subprograms_For_Type (T);
7575 while Present (S) loop
7576 if Is_Predicate_Function (S) then
7579 S := Subprograms_For_Type (S);
7585 end Predicate_Function;
7587 --------------------------
7588 -- Predicate_Function_M --
7589 --------------------------
7591 function Predicate_Function_M (Id : E) return E is
7596 pragma Assert (Is_Type (Id));
7598 -- If type is private and has a completion, predicate may be defined
7599 -- on the full view.
7601 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7602 T := Full_View (Id);
7607 if No (Subprograms_For_Type (T)) then
7611 S := Subprograms_For_Type (T);
7612 while Present (S) loop
7613 if Is_Predicate_Function_M (S) then
7616 S := Subprograms_For_Type (S);
7622 end Predicate_Function_M;
7624 -------------------------
7625 -- Present_In_Rep_Item --
7626 -------------------------
7628 function Present_In_Rep_Item (E : Entity_Id; N : Node_Id) return Boolean is
7632 Ritem := First_Rep_Item (E);
7634 while Present (Ritem) loop
7639 Next_Rep_Item (Ritem);
7643 end Present_In_Rep_Item;
7645 --------------------------
7646 -- Primitive_Operations --
7647 --------------------------
7649 function Primitive_Operations (Id : E) return L is
7651 if Is_Concurrent_Type (Id) then
7652 if Present (Corresponding_Record_Type (Id)) then
7653 return Direct_Primitive_Operations
7654 (Corresponding_Record_Type (Id));
7656 -- If expansion is disabled the corresponding record type is absent,
7657 -- but if the type has ancestors it may have primitive operations.
7659 elsif Is_Tagged_Type (Id) then
7660 return Direct_Primitive_Operations (Id);
7666 return Direct_Primitive_Operations (Id);
7668 end Primitive_Operations;
7670 ---------------------
7671 -- Record_Rep_Item --
7672 ---------------------
7674 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
7676 Set_Next_Rep_Item (N, First_Rep_Item (E));
7677 Set_First_Rep_Item (E, N);
7678 end Record_Rep_Item;
7684 function Root_Type (Id : E) return E is
7688 pragma Assert (Nkind (Id) in N_Entity);
7690 T := Base_Type (Id);
7692 if Ekind (T) = E_Class_Wide_Type then
7704 -- Following test catches some error cases resulting from
7707 elsif No (Etyp) then
7708 Check_Error_Detected;
7711 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
7714 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
7720 -- Return if there is a circularity in the inheritance chain. This
7721 -- happens in some error situations and we do not want to get
7722 -- stuck in this loop.
7724 if T = Base_Type (Id) then
7731 ---------------------
7732 -- Safe_Emax_Value --
7733 ---------------------
7735 function Safe_Emax_Value (Id : E) return Uint is
7737 return Machine_Emax_Value (Id);
7738 end Safe_Emax_Value;
7740 ----------------------
7741 -- Safe_First_Value --
7742 ----------------------
7744 function Safe_First_Value (Id : E) return Ureal is
7746 return -Safe_Last_Value (Id);
7747 end Safe_First_Value;
7749 ---------------------
7750 -- Safe_Last_Value --
7751 ---------------------
7753 function Safe_Last_Value (Id : E) return Ureal is
7754 Radix : constant Uint := Machine_Radix_Value (Id);
7755 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
7756 Emax : constant Uint := Safe_Emax_Value (Id);
7757 Significand : constant Uint := Radix ** Mantissa - 1;
7758 Exponent : constant Uint := Emax - Mantissa;
7764 (Num => Significand * 2 ** (Exponent mod 4),
7765 Den => -Exponent / 4,
7771 (Num => Significand,
7775 end Safe_Last_Value;
7781 function Scope_Depth (Id : E) return Uint is
7786 while Is_Record_Type (Scop) loop
7787 Scop := Scope (Scop);
7790 return Scope_Depth_Value (Scop);
7793 ---------------------
7794 -- Scope_Depth_Set --
7795 ---------------------
7797 function Scope_Depth_Set (Id : E) return B is
7799 return not Is_Record_Type (Id)
7800 and then Field22 (Id) /= Union_Id (Empty);
7801 end Scope_Depth_Set;
7803 -----------------------------
7804 -- Set_Component_Alignment --
7805 -----------------------------
7807 -- Component Alignment is encoded using two flags, Flag128/129 as
7808 -- follows. Note that both flags False = Align_Default, so that the
7809 -- default initialization of flags to False initializes component
7810 -- alignment to the default value as required.
7812 -- Flag128 Flag129 Value
7813 -- ------- ------- -----
7814 -- False False Calign_Default
7815 -- False True Calign_Component_Size
7816 -- True False Calign_Component_Size_4
7817 -- True True Calign_Storage_Unit
7819 procedure Set_Component_Alignment (Id : E; V : C) is
7821 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
7822 and then Is_Base_Type (Id));
7825 when Calign_Default =>
7826 Set_Flag128 (Id, False);
7827 Set_Flag129 (Id, False);
7829 when Calign_Component_Size =>
7830 Set_Flag128 (Id, False);
7831 Set_Flag129 (Id, True);
7833 when Calign_Component_Size_4 =>
7834 Set_Flag128 (Id, True);
7835 Set_Flag129 (Id, False);
7837 when Calign_Storage_Unit =>
7838 Set_Flag128 (Id, True);
7839 Set_Flag129 (Id, True);
7841 end Set_Component_Alignment;
7843 -----------------------------
7844 -- Set_Invariant_Procedure --
7845 -----------------------------
7847 procedure Set_Invariant_Procedure (Id : E; V : E) is
7851 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7853 S := Subprograms_For_Type (Id);
7854 Set_Subprograms_For_Type (Id, V);
7855 Set_Subprograms_For_Type (V, S);
7857 -- Check for duplicate entry
7859 while Present (S) loop
7860 if Is_Invariant_Procedure (S) then
7861 raise Program_Error;
7863 S := Subprograms_For_Type (S);
7866 end Set_Invariant_Procedure;
7868 ----------------------------
7869 -- Set_Predicate_Function --
7870 ----------------------------
7872 procedure Set_Predicate_Function (Id : E; V : E) is
7876 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7878 S := Subprograms_For_Type (Id);
7879 Set_Subprograms_For_Type (Id, V);
7880 Set_Subprograms_For_Type (V, S);
7882 while Present (S) loop
7883 if Is_Predicate_Function (S) then
7884 raise Program_Error;
7886 S := Subprograms_For_Type (S);
7889 end Set_Predicate_Function;
7891 ------------------------------
7892 -- Set_Predicate_Function_M --
7893 ------------------------------
7895 procedure Set_Predicate_Function_M (Id : E; V : E) is
7899 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7901 S := Subprograms_For_Type (Id);
7902 Set_Subprograms_For_Type (Id, V);
7903 Set_Subprograms_For_Type (V, S);
7905 -- Check for duplicates
7907 while Present (S) loop
7908 if Is_Predicate_Function_M (S) then
7909 raise Program_Error;
7911 S := Subprograms_For_Type (S);
7914 end Set_Predicate_Function_M;
7920 function Size_Clause (Id : E) return N is
7922 return Get_Attribute_Definition_Clause (Id, Attribute_Size);
7925 ------------------------
7926 -- Stream_Size_Clause --
7927 ------------------------
7929 function Stream_Size_Clause (Id : E) return N is
7931 return Get_Attribute_Definition_Clause (Id, Attribute_Stream_Size);
7932 end Stream_Size_Clause;
7938 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
7944 Kind := E_Access_Subtype;
7948 Kind := E_Array_Subtype;
7950 when E_Class_Wide_Type |
7951 E_Class_Wide_Subtype =>
7952 Kind := E_Class_Wide_Subtype;
7954 when E_Decimal_Fixed_Point_Type |
7955 E_Decimal_Fixed_Point_Subtype =>
7956 Kind := E_Decimal_Fixed_Point_Subtype;
7958 when E_Ordinary_Fixed_Point_Type |
7959 E_Ordinary_Fixed_Point_Subtype =>
7960 Kind := E_Ordinary_Fixed_Point_Subtype;
7962 when E_Private_Type |
7963 E_Private_Subtype =>
7964 Kind := E_Private_Subtype;
7966 when E_Limited_Private_Type |
7967 E_Limited_Private_Subtype =>
7968 Kind := E_Limited_Private_Subtype;
7970 when E_Record_Type_With_Private |
7971 E_Record_Subtype_With_Private =>
7972 Kind := E_Record_Subtype_With_Private;
7974 when E_Record_Type |
7976 Kind := E_Record_Subtype;
7978 when E_String_Type |
7980 Kind := E_String_Subtype;
7982 when Enumeration_Kind =>
7983 Kind := E_Enumeration_Subtype;
7986 Kind := E_Floating_Point_Subtype;
7988 when Signed_Integer_Kind =>
7989 Kind := E_Signed_Integer_Subtype;
7991 when Modular_Integer_Kind =>
7992 Kind := E_Modular_Integer_Subtype;
7994 when Protected_Kind =>
7995 Kind := E_Protected_Subtype;
7998 Kind := E_Task_Subtype;
8002 raise Program_Error;
8008 ---------------------
8009 -- Type_High_Bound --
8010 ---------------------
8012 function Type_High_Bound (Id : E) return Node_Id is
8013 Rng : constant Node_Id := Scalar_Range (Id);
8015 if Nkind (Rng) = N_Subtype_Indication then
8016 return High_Bound (Range_Expression (Constraint (Rng)));
8018 return High_Bound (Rng);
8020 end Type_High_Bound;
8022 --------------------
8023 -- Type_Low_Bound --
8024 --------------------
8026 function Type_Low_Bound (Id : E) return Node_Id is
8027 Rng : constant Node_Id := Scalar_Range (Id);
8029 if Nkind (Rng) = N_Subtype_Indication then
8030 return Low_Bound (Range_Expression (Constraint (Rng)));
8032 return Low_Bound (Rng);
8036 ---------------------
8037 -- Underlying_Type --
8038 ---------------------
8040 function Underlying_Type (Id : E) return E is
8042 -- For record_with_private the underlying type is always the direct
8043 -- full view. Never try to take the full view of the parent it
8044 -- doesn't make sense.
8046 if Ekind (Id) = E_Record_Type_With_Private then
8047 return Full_View (Id);
8049 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
8051 -- If we have an incomplete or private type with a full view,
8052 -- then we return the Underlying_Type of this full view
8054 if Present (Full_View (Id)) then
8055 if Id = Full_View (Id) then
8057 -- Previous error in declaration
8062 return Underlying_Type (Full_View (Id));
8065 -- If we have an incomplete entity that comes from the limited
8066 -- view then we return the Underlying_Type of its non-limited
8069 elsif From_Limited_With (Id)
8070 and then Present (Non_Limited_View (Id))
8072 return Underlying_Type (Non_Limited_View (Id));
8074 -- Otherwise check for the case where we have a derived type or
8075 -- subtype, and if so get the Underlying_Type of the parent type.
8077 elsif Etype (Id) /= Id then
8078 return Underlying_Type (Etype (Id));
8080 -- Otherwise we have an incomplete or private type that has
8081 -- no full view, which means that we have not encountered the
8082 -- completion, so return Empty to indicate the underlying type
8083 -- is not yet known.
8089 -- For non-incomplete, non-private types, return the type itself
8090 -- Also for entities that are not types at all return the entity
8096 end Underlying_Type;
8102 function Vax_Float (Id : E) return B is
8104 return Is_Floating_Point_Type (Id) and then Float_Rep (Id) = VAX_Native;
8107 ------------------------
8108 -- Write_Entity_Flags --
8109 ------------------------
8111 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
8113 procedure W (Flag_Name : String; Flag : Boolean);
8114 -- Write out given flag if it is set
8120 procedure W (Flag_Name : String; Flag : Boolean) is
8124 Write_Str (Flag_Name);
8125 Write_Str (" = True");
8130 -- Start of processing for Write_Entity_Flags
8133 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
8134 and then Is_Base_Type (Id)
8137 Write_Str ("Component_Alignment = ");
8139 case Component_Alignment (Id) is
8140 when Calign_Default =>
8141 Write_Str ("Calign_Default");
8143 when Calign_Component_Size =>
8144 Write_Str ("Calign_Component_Size");
8146 when Calign_Component_Size_4 =>
8147 Write_Str ("Calign_Component_Size_4");
8149 when Calign_Storage_Unit =>
8150 Write_Str ("Calign_Storage_Unit");
8156 W ("Address_Taken", Flag104 (Id));
8157 W ("Body_Needed_For_SAL", Flag40 (Id));
8158 W ("C_Pass_By_Copy", Flag125 (Id));
8159 W ("Can_Never_Be_Null", Flag38 (Id));
8160 W ("Checks_May_Be_Suppressed", Flag31 (Id));
8161 W ("Debug_Info_Off", Flag166 (Id));
8162 W ("Default_Expressions_Processed", Flag108 (Id));
8163 W ("Delay_Cleanups", Flag114 (Id));
8164 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
8165 W ("Depends_On_Private", Flag14 (Id));
8166 W ("Discard_Names", Flag88 (Id));
8167 W ("Elaboration_Entity_Required", Flag174 (Id));
8168 W ("Elaborate_Body_Desirable", Flag210 (Id));
8169 W ("Entry_Accepted", Flag152 (Id));
8170 W ("Can_Use_Internal_Rep", Flag229 (Id));
8171 W ("Finalize_Storage_Only", Flag158 (Id));
8172 W ("From_Limited_With", Flag159 (Id));
8173 W ("Has_Aliased_Components", Flag135 (Id));
8174 W ("Has_Alignment_Clause", Flag46 (Id));
8175 W ("Has_All_Calls_Remote", Flag79 (Id));
8176 W ("Has_Anonymous_Master", Flag253 (Id));
8177 W ("Has_Atomic_Components", Flag86 (Id));
8178 W ("Has_Biased_Representation", Flag139 (Id));
8179 W ("Has_Completion", Flag26 (Id));
8180 W ("Has_Completion_In_Body", Flag71 (Id));
8181 W ("Has_Complex_Representation", Flag140 (Id));
8182 W ("Has_Component_Size_Clause", Flag68 (Id));
8183 W ("Has_Contiguous_Rep", Flag181 (Id));
8184 W ("Has_Controlled_Component", Flag43 (Id));
8185 W ("Has_Controlling_Result", Flag98 (Id));
8186 W ("Has_Convention_Pragma", Flag119 (Id));
8187 W ("Has_Default_Aspect", Flag39 (Id));
8188 W ("Has_Delayed_Aspects", Flag200 (Id));
8189 W ("Has_Delayed_Freeze", Flag18 (Id));
8190 W ("Has_Delayed_Rep_Aspects", Flag261 (Id));
8191 W ("Has_Discriminants", Flag5 (Id));
8192 W ("Has_Dispatch_Table", Flag220 (Id));
8193 W ("Has_Dynamic_Predicate_Aspect", Flag258 (Id));
8194 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
8195 W ("Has_Exit", Flag47 (Id));
8196 W ("Has_Forward_Instantiation", Flag175 (Id));
8197 W ("Has_Fully_Qualified_Name", Flag173 (Id));
8198 W ("Has_Gigi_Rep_Item", Flag82 (Id));
8199 W ("Has_Homonym", Flag56 (Id));
8200 W ("Has_Implicit_Dereference", Flag251 (Id));
8201 W ("Has_Independent_Components", Flag34 (Id));
8202 W ("Has_Inheritable_Invariants", Flag248 (Id));
8203 W ("Has_Initial_Value", Flag219 (Id));
8204 W ("Has_Invariants", Flag232 (Id));
8205 W ("Has_Loop_Entry_Attributes", Flag260 (Id));
8206 W ("Has_Machine_Radix_Clause", Flag83 (Id));
8207 W ("Has_Master_Entity", Flag21 (Id));
8208 W ("Has_Missing_Return", Flag142 (Id));
8209 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
8210 W ("Has_Non_Standard_Rep", Flag75 (Id));
8211 W ("Has_Out_Or_In_Out_Parameter", Flag110 (Id));
8212 W ("Has_Object_Size_Clause", Flag172 (Id));
8213 W ("Has_Per_Object_Constraint", Flag154 (Id));
8214 W ("Has_Postconditions", Flag240 (Id));
8215 W ("Has_Pragma_Controlled", Flag27 (Id));
8216 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
8217 W ("Has_Pragma_Inline", Flag157 (Id));
8218 W ("Has_Pragma_Inline_Always", Flag230 (Id));
8219 W ("Has_Pragma_No_Inline", Flag201 (Id));
8220 W ("Has_Pragma_Ordered", Flag198 (Id));
8221 W ("Has_Pragma_Pack", Flag121 (Id));
8222 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
8223 W ("Has_Pragma_Pure", Flag203 (Id));
8224 W ("Has_Pragma_Pure_Function", Flag179 (Id));
8225 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
8226 W ("Has_Pragma_Unmodified", Flag233 (Id));
8227 W ("Has_Pragma_Unreferenced", Flag180 (Id));
8228 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
8229 W ("Has_Predicates", Flag250 (Id));
8230 W ("Has_Primitive_Operations", Flag120 (Id));
8231 W ("Has_Private_Ancestor", Flag151 (Id));
8232 W ("Has_Private_Declaration", Flag155 (Id));
8233 W ("Has_Qualified_Name", Flag161 (Id));
8234 W ("Has_RACW", Flag214 (Id));
8235 W ("Has_Record_Rep_Clause", Flag65 (Id));
8236 W ("Has_Recursive_Call", Flag143 (Id));
8237 W ("Has_Shift_Operator", Flag267 (Id));
8238 W ("Has_Size_Clause", Flag29 (Id));
8239 W ("Has_Small_Clause", Flag67 (Id));
8240 W ("Has_Specified_Layout", Flag100 (Id));
8241 W ("Has_Specified_Stream_Input", Flag190 (Id));
8242 W ("Has_Specified_Stream_Output", Flag191 (Id));
8243 W ("Has_Specified_Stream_Read", Flag192 (Id));
8244 W ("Has_Specified_Stream_Write", Flag193 (Id));
8245 W ("Has_Static_Discriminants", Flag211 (Id));
8246 W ("Has_Static_Predicate_Aspect", Flag259 (Id));
8247 W ("Has_Storage_Size_Clause", Flag23 (Id));
8248 W ("Has_Stream_Size_Clause", Flag184 (Id));
8249 W ("Has_Task", Flag30 (Id));
8250 W ("Has_Thunks", Flag228 (Id));
8251 W ("Has_Unchecked_Union", Flag123 (Id));
8252 W ("Has_Unknown_Discriminants", Flag72 (Id));
8253 W ("Has_Up_Level_Access", Flag215 (Id));
8254 W ("Has_Visible_Refinement", Flag263 (Id));
8255 W ("Has_Volatile_Components", Flag87 (Id));
8256 W ("Has_Xref_Entry", Flag182 (Id));
8257 W ("In_Package_Body", Flag48 (Id));
8258 W ("In_Private_Part", Flag45 (Id));
8259 W ("In_Use", Flag8 (Id));
8260 W ("Is_AST_Entry", Flag132 (Id));
8261 W ("Is_Abstract_Subprogram", Flag19 (Id));
8262 W ("Is_Abstract_Type", Flag146 (Id));
8263 W ("Is_Local_Anonymous_Access", Flag194 (Id));
8264 W ("Is_Access_Constant", Flag69 (Id));
8265 W ("Is_Ada_2005_Only", Flag185 (Id));
8266 W ("Is_Ada_2012_Only", Flag199 (Id));
8267 W ("Is_Aliased", Flag15 (Id));
8268 W ("Is_Asynchronous", Flag81 (Id));
8269 W ("Is_Atomic", Flag85 (Id));
8270 W ("Is_Bit_Packed_Array", Flag122 (Id));
8271 W ("Is_CPP_Class", Flag74 (Id));
8272 W ("Is_Called", Flag102 (Id));
8273 W ("Is_Character_Type", Flag63 (Id));
8274 W ("Is_Child_Unit", Flag73 (Id));
8275 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
8276 W ("Is_Compilation_Unit", Flag149 (Id));
8277 W ("Is_Completely_Hidden", Flag103 (Id));
8278 W ("Is_Concurrent_Record_Type", Flag20 (Id));
8279 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
8280 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
8281 W ("Is_Constrained", Flag12 (Id));
8282 W ("Is_Constructor", Flag76 (Id));
8283 W ("Is_Controlled", Flag42 (Id));
8284 W ("Is_Controlling_Formal", Flag97 (Id));
8285 W ("Is_Descendent_Of_Address", Flag223 (Id));
8286 W ("Is_Discrim_SO_Function", Flag176 (Id));
8287 W ("Is_Discriminant_Check_Function", Flag264 (Id));
8288 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
8289 W ("Is_Dispatching_Operation", Flag6 (Id));
8290 W ("Is_Eliminated", Flag124 (Id));
8291 W ("Is_Entry_Formal", Flag52 (Id));
8292 W ("Is_Exported", Flag99 (Id));
8293 W ("Is_First_Subtype", Flag70 (Id));
8294 W ("Is_For_Access_Subtype", Flag118 (Id));
8295 W ("Is_Formal_Subprogram", Flag111 (Id));
8296 W ("Is_Frozen", Flag4 (Id));
8297 W ("Is_Generic_Actual_Type", Flag94 (Id));
8298 W ("Is_Generic_Instance", Flag130 (Id));
8299 W ("Is_Generic_Type", Flag13 (Id));
8300 W ("Is_Hidden", Flag57 (Id));
8301 W ("Is_Hidden_Open_Scope", Flag171 (Id));
8302 W ("Is_Immediately_Visible", Flag7 (Id));
8303 W ("Is_Implementation_Defined", Flag254 (Id));
8304 W ("Is_Imported", Flag24 (Id));
8305 W ("Is_Independent", Flag268 (Id));
8306 W ("Is_Inlined", Flag11 (Id));
8307 W ("Is_Instantiated", Flag126 (Id));
8308 W ("Is_Interface", Flag186 (Id));
8309 W ("Is_Internal", Flag17 (Id));
8310 W ("Is_Interrupt_Handler", Flag89 (Id));
8311 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
8312 W ("Is_Invariant_Procedure", Flag257 (Id));
8313 W ("Is_Itype", Flag91 (Id));
8314 W ("Is_Known_Non_Null", Flag37 (Id));
8315 W ("Is_Known_Null", Flag204 (Id));
8316 W ("Is_Known_Valid", Flag170 (Id));
8317 W ("Is_Limited_Composite", Flag106 (Id));
8318 W ("Is_Limited_Interface", Flag197 (Id));
8319 W ("Is_Limited_Record", Flag25 (Id));
8320 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
8321 W ("Is_Non_Static_Subtype", Flag109 (Id));
8322 W ("Is_Null_Init_Proc", Flag178 (Id));
8323 W ("Is_Obsolescent", Flag153 (Id));
8324 W ("Is_Only_Out_Parameter", Flag226 (Id));
8325 W ("Is_Optional_Parameter", Flag134 (Id));
8326 W ("Is_Package_Body_Entity", Flag160 (Id));
8327 W ("Is_Packed", Flag51 (Id));
8328 W ("Is_Packed_Array_Type", Flag138 (Id));
8329 W ("Is_Potentially_Use_Visible", Flag9 (Id));
8330 W ("Is_Predicate_Function", Flag255 (Id));
8331 W ("Is_Predicate_Function_M", Flag256 (Id));
8332 W ("Is_Preelaborated", Flag59 (Id));
8333 W ("Is_Primitive", Flag218 (Id));
8334 W ("Is_Primitive_Wrapper", Flag195 (Id));
8335 W ("Is_Private_Composite", Flag107 (Id));
8336 W ("Is_Private_Descendant", Flag53 (Id));
8337 W ("Is_Private_Primitive", Flag245 (Id));
8338 W ("Is_Processed_Transient", Flag252 (Id));
8339 W ("Is_Public", Flag10 (Id));
8340 W ("Is_Pure", Flag44 (Id));
8341 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
8342 W ("Is_RACW_Stub_Type", Flag244 (Id));
8343 W ("Is_Raised", Flag224 (Id));
8344 W ("Is_Remote_Call_Interface", Flag62 (Id));
8345 W ("Is_Remote_Types", Flag61 (Id));
8346 W ("Is_Renaming_Of_Object", Flag112 (Id));
8347 W ("Is_Return_Object", Flag209 (Id));
8348 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
8349 W ("Is_Shared_Passive", Flag60 (Id));
8350 W ("Is_Statically_Allocated", Flag28 (Id));
8351 W ("Is_Tag", Flag78 (Id));
8352 W ("Is_Tagged_Type", Flag55 (Id));
8353 W ("Is_Thunk", Flag225 (Id));
8354 W ("Is_Trivial_Subprogram", Flag235 (Id));
8355 W ("Is_True_Constant", Flag163 (Id));
8356 W ("Is_Unchecked_Union", Flag117 (Id));
8357 W ("Is_Underlying_Record_View", Flag246 (Id));
8358 W ("Is_Unsigned_Type", Flag144 (Id));
8359 W ("Is_VMS_Exception", Flag133 (Id));
8360 W ("Is_Valued_Procedure", Flag127 (Id));
8361 W ("Is_Visible_Formal", Flag206 (Id));
8362 W ("Is_Visible_Lib_Unit", Flag116 (Id));
8363 W ("Is_Volatile", Flag16 (Id));
8364 W ("Itype_Printed", Flag202 (Id));
8365 W ("Kill_Elaboration_Checks", Flag32 (Id));
8366 W ("Kill_Range_Checks", Flag33 (Id));
8367 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
8368 W ("Low_Bound_Tested", Flag205 (Id));
8369 W ("Machine_Radix_10", Flag84 (Id));
8370 W ("Materialize_Entity", Flag168 (Id));
8371 W ("May_Inherit_Delayed_Rep_Aspects", Flag262 (Id));
8372 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
8373 W ("Must_Have_Preelab_Init", Flag208 (Id));
8374 W ("Needs_Debug_Info", Flag147 (Id));
8375 W ("Needs_No_Actuals", Flag22 (Id));
8376 W ("Never_Set_In_Source", Flag115 (Id));
8377 W ("No_Pool_Assigned", Flag131 (Id));
8378 W ("No_Return", Flag113 (Id));
8379 W ("No_Strict_Aliasing", Flag136 (Id));
8380 W ("Non_Binary_Modulus", Flag58 (Id));
8381 W ("Nonzero_Is_True", Flag162 (Id));
8382 W ("OK_To_Rename", Flag247 (Id));
8383 W ("OK_To_Reorder_Components", Flag239 (Id));
8384 W ("Optimize_Alignment_Space", Flag241 (Id));
8385 W ("Optimize_Alignment_Time", Flag242 (Id));
8386 W ("Overlays_Constant", Flag243 (Id));
8387 W ("Reachable", Flag49 (Id));
8388 W ("Referenced", Flag156 (Id));
8389 W ("Referenced_As_LHS", Flag36 (Id));
8390 W ("Referenced_As_Out_Parameter", Flag227 (Id));
8391 W ("Renamed_In_Spec", Flag231 (Id));
8392 W ("Requires_Overriding", Flag213 (Id));
8393 W ("Return_Present", Flag54 (Id));
8394 W ("Returns_By_Ref", Flag90 (Id));
8395 W ("Reverse_Bit_Order", Flag164 (Id));
8396 W ("Reverse_Storage_Order", Flag93 (Id));
8397 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
8398 W ("Size_Depends_On_Discriminant", Flag177 (Id));
8399 W ("Size_Known_At_Compile_Time", Flag92 (Id));
8400 W ("SPARK_Aux_Pragma_Inherited", Flag266 (Id));
8401 W ("SPARK_Pragma_Inherited", Flag265 (Id));
8402 W ("Static_Elaboration_Desired", Flag77 (Id));
8403 W ("Strict_Alignment", Flag145 (Id));
8404 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
8405 W ("Suppress_Initialization", Flag105 (Id));
8406 W ("Suppress_Style_Checks", Flag165 (Id));
8407 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
8408 W ("Treat_As_Volatile", Flag41 (Id));
8409 W ("Universal_Aliasing", Flag216 (Id));
8410 W ("Used_As_Generic_Actual", Flag222 (Id));
8411 W ("Uses_Sec_Stack", Flag95 (Id));
8412 W ("Warnings_Off", Flag96 (Id));
8413 W ("Warnings_Off_Used", Flag236 (Id));
8414 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
8415 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
8416 W ("Was_Hidden", Flag196 (Id));
8417 end Write_Entity_Flags;
8419 -----------------------
8420 -- Write_Entity_Info --
8421 -----------------------
8423 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
8425 procedure Write_Attribute (Which : String; Nam : E);
8426 -- Write attribute value with given string name
8428 procedure Write_Kind (Id : Entity_Id);
8429 -- Write Ekind field of entity
8431 ---------------------
8432 -- Write_Attribute --
8433 ---------------------
8435 procedure Write_Attribute (Which : String; Nam : E) is
8439 Write_Int (Int (Nam));
8441 Write_Name (Chars (Nam));
8443 end Write_Attribute;
8449 procedure Write_Kind (Id : Entity_Id) is
8450 K : constant String := Entity_Kind'Image (Ekind (Id));
8454 Write_Str (" Kind ");
8456 if Is_Type (Id) and then Is_Tagged_Type (Id) then
8457 Write_Str ("TAGGED ");
8460 Write_Str (K (3 .. K'Length));
8463 if Is_Type (Id) and then Depends_On_Private (Id) then
8464 Write_Str ("Depends_On_Private ");
8468 -- Start of processing for Write_Entity_Info
8472 Write_Attribute ("Name ", Id);
8473 Write_Int (Int (Id));
8477 Write_Attribute (" Type ", Etype (Id));
8479 Write_Attribute (" Scope ", Scope (Id));
8484 when Discrete_Kind =>
8485 Write_Str ("Bounds: Id = ");
8487 if Present (Scalar_Range (Id)) then
8488 Write_Int (Int (Type_Low_Bound (Id)));
8489 Write_Str (" .. Id = ");
8490 Write_Int (Int (Type_High_Bound (Id)));
8492 Write_Str ("Empty");
8503 (" Component Type ", Component_Type (Id));
8506 Write_Str (" Indexes ");
8508 Index := First_Index (Id);
8509 while Present (Index) loop
8510 Write_Attribute (" ", Etype (Index));
8511 Index := Next_Index (Index);
8519 (" Directly Designated Type ",
8520 Directly_Designated_Type (Id));
8523 when Overloadable_Kind =>
8524 if Present (Homonym (Id)) then
8525 Write_Str (" Homonym ");
8526 Write_Name (Chars (Homonym (Id)));
8528 Write_Int (Int (Homonym (Id)));
8535 if Ekind (Scope (Id)) in Record_Kind then
8537 " Original_Record_Component ",
8538 Original_Record_Component (Id));
8539 Write_Int (Int (Original_Record_Component (Id)));
8543 when others => null;
8545 end Write_Entity_Info;
8547 -----------------------
8548 -- Write_Field6_Name --
8549 -----------------------
8551 procedure Write_Field6_Name (Id : Entity_Id) is
8552 pragma Warnings (Off, Id);
8554 Write_Str ("First_Rep_Item");
8555 end Write_Field6_Name;
8557 -----------------------
8558 -- Write_Field7_Name --
8559 -----------------------
8561 procedure Write_Field7_Name (Id : Entity_Id) is
8562 pragma Warnings (Off, Id);
8564 Write_Str ("Freeze_Node");
8565 end Write_Field7_Name;
8567 -----------------------
8568 -- Write_Field8_Name --
8569 -----------------------
8571 procedure Write_Field8_Name (Id : Entity_Id) is
8575 Write_Str ("Associated_Node_For_Itype");
8578 Write_Str ("Dependent_Instances");
8581 Write_Str ("First_Exit_Statement");
8584 Write_Str ("Hiding_Loop_Variable");
8588 E_Subprogram_Body =>
8589 Write_Str ("Mechanism");
8593 Write_Str ("Normalized_First_Bit");
8596 Write_Str ("Postcondition_Proc");
8598 when E_Abstract_State =>
8599 Write_Str ("Refinement_Constituents");
8601 when E_Return_Statement =>
8602 Write_Str ("Return_Applies_To");
8605 Write_Str ("Field8??");
8607 end Write_Field8_Name;
8609 -----------------------
8610 -- Write_Field9_Name --
8611 -----------------------
8613 procedure Write_Field9_Name (Id : Entity_Id) is
8617 Write_Str ("Class_Wide_Type");
8620 Write_Str ("Current_Value");
8622 when E_Abstract_State =>
8623 Write_Str ("Part_Of_Constituents");
8626 E_Generic_Function |
8628 E_Generic_Procedure |
8631 Write_Str ("Renaming_Map");
8634 Write_Str ("Field9??");
8636 end Write_Field9_Name;
8638 ------------------------
8639 -- Write_Field10_Name --
8640 ------------------------
8642 procedure Write_Field10_Name (Id : Entity_Id) is
8645 when E_Abstract_State |
8647 Write_Str ("Encapsulating_State");
8649 when Class_Wide_Kind |
8655 Write_Str ("Direct_Primitive_Operations");
8658 Write_Str ("Float_Rep");
8660 when E_In_Parameter |
8662 Write_Str ("Discriminal_Link");
8668 Write_Str ("Handler_Records");
8672 Write_Str ("Normalized_Position_Max");
8675 Write_Str ("Field10??");
8677 end Write_Field10_Name;
8679 ------------------------
8680 -- Write_Field11_Name --
8681 ------------------------
8683 procedure Write_Field11_Name (Id : Entity_Id) is
8687 Write_Str ("Block_Node");
8691 Write_Str ("Component_Bit_Offset");
8694 Write_Str ("Entry_Component");
8696 when E_Enumeration_Literal =>
8697 Write_Str ("Enumeration_Pos");
8701 Write_Str ("Full_View");
8703 when E_Generic_Package =>
8704 Write_Str ("Generic_Homonym");
8707 Write_Str ("Last_Aggregate_Assignment");
8713 Write_Str ("Protected_Body_Subprogram");
8716 Write_Str ("Field11??");
8718 end Write_Field11_Name;
8720 ------------------------
8721 -- Write_Field12_Name --
8722 ------------------------
8724 procedure Write_Field12_Name (Id : Entity_Id) is
8728 Write_Str ("Associated_Formal_Package");
8731 Write_Str ("Barrier_Function");
8733 when E_Enumeration_Literal =>
8734 Write_Str ("Enumeration_Rep");
8742 E_In_Out_Parameter |
8746 Write_Str ("Esize");
8750 Write_Str ("Next_Inlined_Subprogram");
8753 Write_Str ("Field12??");
8755 end Write_Field12_Name;
8757 ------------------------
8758 -- Write_Field13_Name --
8759 ------------------------
8761 procedure Write_Field13_Name (Id : Entity_Id) is
8766 Write_Str ("Component_Clause");
8769 Write_Str ("Elaboration_Entity");
8773 Generic_Unit_Kind =>
8774 Write_Str ("Elaboration_Entity");
8778 Write_Str ("Extra_Accessibility");
8781 Write_Str ("RM_Size");
8784 Write_Str ("Field13??");
8786 end Write_Field13_Name;
8788 -----------------------
8789 -- Write_Field14_Name --
8790 -----------------------
8792 procedure Write_Field14_Name (Id : Entity_Id) is
8801 Write_Str ("Alignment");
8805 Write_Str ("First_Optional_Parameter");
8809 Write_Str ("Normalized_Position");
8812 E_Generic_Package =>
8813 Write_Str ("Shadow_Entities");
8816 Write_Str ("Field14??");
8818 end Write_Field14_Name;
8820 ------------------------
8821 -- Write_Field15_Name --
8822 ------------------------
8824 procedure Write_Field15_Name (Id : Entity_Id) is
8827 when E_Discriminant =>
8828 Write_Str ("Discriminant_Number");
8831 Write_Str ("DT_Entry_Count");
8835 Write_Str ("DT_Position");
8837 when E_Protected_Type =>
8838 Write_Str ("Entry_Bodies_Array");
8841 Write_Str ("Entry_Parameters_Type");
8844 Write_Str ("Extra_Formal");
8846 when Enumeration_Kind =>
8847 Write_Str ("Lit_Indexes");
8851 Write_Str ("Related_Instance");
8853 when Decimal_Fixed_Point_Kind =>
8854 Write_Str ("Scale_Value");
8858 Write_Str ("Status_Flag_Or_Transient_Decl");
8862 Write_Str ("Storage_Size_Variable");
8864 when E_String_Literal_Subtype =>
8865 Write_Str ("String_Literal_Low_Bound");
8868 Write_Str ("Field15??");
8870 end Write_Field15_Name;
8872 ------------------------
8873 -- Write_Field16_Name --
8874 ------------------------
8876 procedure Write_Field16_Name (Id : Entity_Id) is
8879 when E_Record_Type |
8880 E_Record_Type_With_Private =>
8881 Write_Str ("Access_Disp_Table");
8883 when E_Abstract_State =>
8884 Write_Str ("Body_References");
8886 when E_Record_Subtype |
8887 E_Class_Wide_Subtype =>
8888 Write_Str ("Cloned_Subtype");
8892 Write_Str ("DTC_Entity");
8895 Write_Str ("Entry_Formal");
8900 Write_Str ("First_Private_Entity");
8902 when Enumeration_Kind =>
8903 Write_Str ("Lit_Strings");
8905 when E_String_Literal_Subtype =>
8906 Write_Str ("String_Literal_Length");
8910 Write_Str ("Unset_Reference");
8913 Write_Str ("Field16??");
8915 end Write_Field16_Name;
8917 ------------------------
8918 -- Write_Field17_Name --
8919 ------------------------
8921 procedure Write_Field17_Name (Id : Entity_Id) is
8926 E_Generic_In_Out_Parameter |
8928 Write_Str ("Actual_Subtype");
8931 Write_Str ("Digits_Value");
8933 when E_Discriminant =>
8934 Write_Str ("Discriminal");
8943 E_Generic_Function |
8945 E_Generic_Procedure |
8953 E_Return_Statement |
8955 E_Subprogram_Type =>
8956 Write_Str ("First_Entity");
8959 Write_Str ("First_Index");
8961 when Enumeration_Kind =>
8962 Write_Str ("First_Literal");
8965 Write_Str ("Master_Id");
8967 when Modular_Integer_Kind =>
8968 Write_Str ("Modulus");
8970 when E_Abstract_State |
8971 E_Incomplete_Type =>
8972 Write_Str ("Non_Limited_View");
8974 when E_Incomplete_Subtype =>
8975 if From_Limited_With (Id) then
8976 Write_Str ("Non_Limited_View");
8980 Write_Str ("Prival");
8983 Write_Str ("Field17??");
8985 end Write_Field17_Name;
8987 ------------------------
8988 -- Write_Field18_Name --
8989 ------------------------
8991 procedure Write_Field18_Name (Id : Entity_Id) is
8994 when E_Enumeration_Literal |
8998 Write_Str ("Alias");
9000 when E_Record_Type =>
9001 Write_Str ("Corresponding_Concurrent_Type");
9003 when E_Subprogram_Body =>
9004 Write_Str ("Corresponding_Protected_Entry");
9006 when Concurrent_Kind =>
9007 Write_Str ("Corresponding_Record_Type");
9012 Write_Str ("Enclosing_Scope");
9014 when E_Entry_Index_Parameter =>
9015 Write_Str ("Entry_Index_Constant");
9017 when E_Class_Wide_Subtype |
9018 E_Access_Protected_Subprogram_Type |
9019 E_Anonymous_Access_Protected_Subprogram_Type |
9020 E_Access_Subprogram_Type |
9022 Write_Str ("Equivalent_Type");
9024 when Fixed_Point_Kind =>
9025 Write_Str ("Delta_Value");
9027 when Incomplete_Or_Private_Kind |
9029 Write_Str ("Private_Dependents");
9032 Write_Str ("Renamed_Object");
9036 E_Generic_Function |
9037 E_Generic_Procedure |
9038 E_Generic_Package =>
9039 Write_Str ("Renamed_Entity");
9042 Write_Str ("Field18??");
9044 end Write_Field18_Name;
9046 -----------------------
9047 -- Write_Field19_Name --
9048 -----------------------
9050 procedure Write_Field19_Name (Id : Entity_Id) is
9054 E_Generic_Package =>
9055 Write_Str ("Body_Entity");
9057 when E_Discriminant =>
9058 Write_Str ("Corresponding_Discriminant");
9061 Write_Str ("Default_Aspect_Value");
9063 when E_Array_Type =>
9064 Write_Str ("Default_Component_Value");
9066 when E_Record_Type =>
9067 Write_Str ("Parent_Subtype");
9071 Write_Str ("Size_Check_Code");
9073 when E_Package_Body |
9075 Write_Str ("Spec_Entity");
9077 when Private_Kind =>
9078 Write_Str ("Underlying_Full_View");
9080 when E_Function | E_Operator | E_Subprogram_Type =>
9081 Write_Str ("Extra_Accessibility_Of_Result");
9084 Write_Str ("Field19??");
9086 end Write_Field19_Name;
9088 -----------------------
9089 -- Write_Field20_Name --
9090 -----------------------
9092 procedure Write_Field20_Name (Id : Entity_Id) is
9096 Write_Str ("Component_Type");
9098 when E_In_Parameter |
9099 E_Generic_In_Parameter =>
9100 Write_Str ("Default_Value");
9103 Write_Str ("Directly_Designated_Type");
9106 Write_Str ("Discriminant_Checking_Func");
9108 when E_Discriminant =>
9109 Write_Str ("Discriminant_Default_Value");
9118 E_Generic_Function |
9120 E_Generic_Procedure |
9128 E_Return_Statement |
9130 E_Subprogram_Type =>
9131 Write_Str ("Last_Entity");
9135 Write_Str ("Prival_Link");
9138 Write_Str ("Scalar_Range");
9141 Write_Str ("Register_Exception_Call");
9144 Write_Str ("Field20??");
9146 end Write_Field20_Name;
9148 -----------------------
9149 -- Write_Field21_Name --
9150 -----------------------
9152 procedure Write_Field21_Name (Id : Entity_Id) is
9156 Write_Str ("Accept_Address");
9158 when E_In_Parameter =>
9159 Write_Str ("Default_Expr_Function");
9161 when Concurrent_Kind |
9162 Incomplete_Or_Private_Kind |
9166 Write_Str ("Discriminant_Constraint");
9171 E_Generic_Function |
9173 E_Generic_Procedure |
9175 Write_Str ("Interface_Name");
9178 Modular_Integer_Kind =>
9179 Write_Str ("Original_Array_Type");
9181 when Fixed_Point_Kind =>
9182 Write_Str ("Small_Value");
9185 Write_Str ("Field21??");
9187 end Write_Field21_Name;
9189 -----------------------
9190 -- Write_Field22_Name --
9191 -----------------------
9193 procedure Write_Field22_Name (Id : Entity_Id) is
9197 Write_Str ("Associated_Storage_Pool");
9200 Write_Str ("Component_Size");
9202 when E_Record_Type =>
9203 Write_Str ("Corresponding_Remote_Type");
9207 Write_Str ("Original_Record_Component");
9209 when E_Enumeration_Literal =>
9210 Write_Str ("Enumeration_Rep_Expr");
9213 Write_Str ("Exception_Code");
9215 when E_Record_Type_With_Private |
9216 E_Record_Subtype_With_Private |
9219 E_Limited_Private_Type |
9220 E_Limited_Private_Subtype =>
9221 Write_Str ("Private_View");
9224 Write_Str ("Protected_Formal");
9234 E_Generic_Function |
9235 E_Generic_Procedure |
9238 E_Return_Statement |
9241 Write_Str ("Scope_Depth_Value");
9244 Write_Str ("Shared_Var_Procs_Instance");
9247 Write_Str ("Field22??");
9249 end Write_Field22_Name;
9251 ------------------------
9252 -- Write_Field23_Name --
9253 ------------------------
9255 procedure Write_Field23_Name (Id : Entity_Id) is
9258 when E_Discriminant =>
9259 Write_Str ("CR_Discriminant");
9262 Write_Str ("Entry_Cancel_Parameter");
9264 when E_Enumeration_Type =>
9265 Write_Str ("Enum_Pos_To_Rep");
9269 Write_Str ("Extra_Constrained");
9272 Write_Str ("Finalization_Master");
9274 when E_Generic_Function |
9276 E_Generic_Procedure =>
9277 Write_Str ("Inner_Instances");
9280 Write_Str ("Packed_Array_Type");
9283 Write_Str ("Protection_Object");
9285 when Concurrent_Kind |
9286 Incomplete_Or_Private_Kind |
9290 Write_Str ("Stored_Constraint");
9294 if Present (Scope (Id))
9295 and then Is_Protected_Type (Scope (Id))
9297 Write_Str ("Protection_Object");
9299 Write_Str ("Generic_Renamings");
9303 if Is_Generic_Instance (Id) then
9304 Write_Str ("Generic_Renamings");
9306 Write_Str ("Limited_View");
9310 Write_Str ("Field23??");
9312 end Write_Field23_Name;
9314 ------------------------
9315 -- Write_Field24_Name --
9316 ------------------------
9318 procedure Write_Field24_Name (Id : Entity_Id) is
9324 Write_Str ("Related_Expression");
9327 Write_Str ("Field24???");
9329 end Write_Field24_Name;
9331 ------------------------
9332 -- Write_Field25_Name --
9333 ------------------------
9335 procedure Write_Field25_Name (Id : Entity_Id) is
9338 when E_Generic_Package |
9340 Write_Str ("Abstract_States");
9343 Write_Str ("Debug_Renaming_Link");
9346 Write_Str ("DT_Offset_To_Top_Func");
9350 Write_Str ("Interface_Alias");
9352 when E_Record_Type |
9354 E_Record_Type_With_Private |
9355 E_Record_Subtype_With_Private =>
9356 Write_Str ("Interfaces");
9360 Write_Str ("Related_Array_Object");
9363 Write_Str ("Task_Body_Procedure");
9367 Write_Str ("PPC_Wrapper");
9369 when E_Enumeration_Type |
9370 E_Enumeration_Subtype |
9371 E_Modular_Integer_Type |
9372 E_Modular_Integer_Subtype |
9373 E_Signed_Integer_Subtype =>
9374 Write_Str ("Static_Predicate");
9377 Write_Str ("Field25??");
9379 end Write_Field25_Name;
9381 ------------------------
9382 -- Write_Field26_Name --
9383 ------------------------
9385 procedure Write_Field26_Name (Id : Entity_Id) is
9388 when E_Record_Type |
9389 E_Record_Type_With_Private =>
9390 Write_Str ("Dispatch_Table_Wrappers");
9392 when E_In_Out_Parameter |
9395 Write_Str ("Last_Assignment");
9397 when E_Access_Subprogram_Type =>
9398 Write_Str ("Original_Access_Type");
9400 when E_Generic_Package |
9402 Write_Str ("Package_Instantiation");
9406 Write_Str ("Related_Type");
9409 Write_Str ("Relative_Deadline_Variable");
9413 Write_Str ("Overridden_Operation");
9416 Write_Str ("Field26??");
9418 end Write_Field26_Name;
9420 ------------------------
9421 -- Write_Field27_Name --
9422 ------------------------
9424 procedure Write_Field27_Name (Id : Entity_Id) is
9429 Write_Str ("Current_Use_Clause");
9434 Write_Str ("Related_Type");
9438 Write_Str ("Wrapped_Entity");
9441 Write_Str ("Field27??");
9443 end Write_Field27_Name;
9445 ------------------------
9446 -- Write_Field28_Name --
9447 ------------------------
9449 procedure Write_Field28_Name (Id : Entity_Id) is
9457 E_Subprogram_Type =>
9458 Write_Str ("Extra_Formals");
9462 Write_Str ("Finalizer");
9466 Write_Str ("Initialization_Statements");
9468 when E_Record_Type =>
9469 Write_Str ("Underlying_Record_View");
9472 Write_Str ("Field28??");
9474 end Write_Field28_Name;
9476 ------------------------
9477 -- Write_Field29_Name --
9478 ------------------------
9480 procedure Write_Field29_Name (Id : Entity_Id) is
9485 Write_Str ("BIP_Initialization_Call");
9488 Write_Str ("Subprograms_For_Type");
9491 Write_Str ("Field29??");
9493 end Write_Field29_Name;
9495 ------------------------
9496 -- Write_Field30_Name --
9497 ------------------------
9499 procedure Write_Field30_Name (Id : Entity_Id) is
9503 Write_Str ("Corresponding_Equality");
9506 Write_Str ("Static_Initialization");
9509 Write_Str ("Field30??");
9511 end Write_Field30_Name;
9513 ------------------------
9514 -- Write_Field31_Name --
9515 ------------------------
9517 procedure Write_Field31_Name (Id : Entity_Id) is
9522 Write_Str ("Thunk_Entity");
9525 Write_Str ("Field31??");
9527 end Write_Field31_Name;
9529 ------------------------
9530 -- Write_Field32_Name --
9531 ------------------------
9533 procedure Write_Field32_Name (Id : Entity_Id) is
9537 E_Generic_Function |
9539 E_Generic_Procedure |
9543 E_Subprogram_Body =>
9544 Write_Str ("SPARK_Pragma");
9547 Write_Str ("Field32??");
9549 end Write_Field32_Name;
9551 ------------------------
9552 -- Write_Field33_Name --
9553 ------------------------
9555 procedure Write_Field33_Name (Id : Entity_Id) is
9558 when E_Generic_Package |
9561 Write_Str ("SPARK_Aux_Pragma");
9567 Write_Str ("Linker_Section_Pragma");
9570 Write_Str ("Field33??");
9572 end Write_Field33_Name;
9574 ------------------------
9575 -- Write_Field34_Name --
9576 ------------------------
9578 procedure Write_Field34_Name (Id : Entity_Id) is
9588 Generic_Subprogram_Kind |
9590 Write_Str ("Contract");
9593 Write_Str ("Field34??");
9595 end Write_Field34_Name;
9597 ------------------------
9598 -- Write_Field35_Name --
9599 ------------------------
9601 procedure Write_Field35_Name (Id : Entity_Id) is
9604 when Subprogram_Kind =>
9605 Write_Str ("Import_Pragma");
9607 Write_Str ("Field35??");
9609 end Write_Field35_Name;
9611 -------------------------
9612 -- Iterator Procedures --
9613 -------------------------
9615 procedure Proc_Next_Component (N : in out Node_Id) is
9617 N := Next_Component (N);
9618 end Proc_Next_Component;
9620 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
9622 N := Next_Entity (N);
9623 while Present (N) loop
9624 exit when Ekind_In (N, E_Component, E_Discriminant);
9625 N := Next_Entity (N);
9627 end Proc_Next_Component_Or_Discriminant;
9629 procedure Proc_Next_Discriminant (N : in out Node_Id) is
9631 N := Next_Discriminant (N);
9632 end Proc_Next_Discriminant;
9634 procedure Proc_Next_Formal (N : in out Node_Id) is
9636 N := Next_Formal (N);
9637 end Proc_Next_Formal;
9639 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
9641 N := Next_Formal_With_Extras (N);
9642 end Proc_Next_Formal_With_Extras;
9644 procedure Proc_Next_Index (N : in out Node_Id) is
9646 N := Next_Index (N);
9647 end Proc_Next_Index;
9649 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
9651 N := Next_Inlined_Subprogram (N);
9652 end Proc_Next_Inlined_Subprogram;
9654 procedure Proc_Next_Literal (N : in out Node_Id) is
9656 N := Next_Literal (N);
9657 end Proc_Next_Literal;
9659 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
9661 N := Next_Stored_Discriminant (N);
9662 end Proc_Next_Stored_Discriminant;