1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. --
18 -- As a special exception under Section 7 of GPL version 3, you are granted --
19 -- additional permissions described in the GCC Runtime Library Exception, --
20 -- version 3.1, as published by the Free Software Foundation. --
22 -- You should have received a copy of the GNU General Public License and --
23 -- a copy of the GCC Runtime Library Exception along with this program; --
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
25 -- <http://www.gnu.org/licenses/>. --
27 -- GNAT was originally developed by the GNAT team at New York University. --
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
30 ------------------------------------------------------------------------------
32 pragma Style_Checks (All_Checks);
33 -- Turn off subprogram ordering, not used for this unit
35 with Atree; use Atree;
36 with Elists; use Elists;
37 with Namet; use Namet;
38 with Nlists; use Nlists;
39 with Output; use Output;
40 with Sinfo; use Sinfo;
41 with Stand; use Stand;
45 use Atree.Unchecked_Access;
46 -- This is one of the packages that is allowed direct untyped access to
47 -- the fields in a node, since it provides the next level abstraction
48 -- which incorporates appropriate checks.
50 ----------------------------------------------
51 -- Usage of Fields in Defining Entity Nodes --
52 ----------------------------------------------
54 -- Four of these fields are defined in Sinfo, since they in are the base
55 -- part of the node. The access routines for these four fields and the
56 -- corresponding set procedures are defined in Sinfo. These fields are
57 -- present in all entities. Note that Homonym is also in the base part of
58 -- the node, but has access routines that are more properly part of Einfo,
59 -- which is why they are defined here.
66 -- Remaining fields are present only in extended nodes (i.e. entities)
68 -- The following fields are present in all entities
71 -- First_Rep_Item Node6
74 -- The usage of other fields (and the entity kinds to which it applies)
75 -- depends on the particular field (see Einfo spec for details).
77 -- Associated_Node_For_Itype Node8
78 -- Dependent_Instances Elist8
79 -- Hiding_Loop_Variable Node8
80 -- Mechanism Uint8 (but returns Mechanism_Type)
81 -- Normalized_First_Bit Uint8
82 -- Postcondition_Proc Node8
83 -- Refinement_Constituents Elist8
84 -- Return_Applies_To Node8
85 -- First_Exit_Statement Node8
87 -- Class_Wide_Type Node9
88 -- Current_Value Node9
91 -- Direct_Primitive_Operations Elist10
92 -- Discriminal_Link Node10
93 -- Float_Rep Uint10 (but returns Float_Rep_Kind)
94 -- Handler_Records List10
95 -- Normalized_Position_Max Uint10
96 -- Refined_State Node10
98 -- Component_Bit_Offset Uint11
100 -- Entry_Component Node11
101 -- Enumeration_Pos Uint11
102 -- Generic_Homonym Node11
103 -- Protected_Body_Subprogram Node11
106 -- Barrier_Function Node12
107 -- Enumeration_Rep Uint12
109 -- Next_Inlined_Subprogram Node12
111 -- Component_Clause Node13
112 -- Elaboration_Entity Node13
113 -- Extra_Accessibility Node13
117 -- First_Optional_Parameter Node14
118 -- Normalized_Position Uint14
119 -- Shadow_Entities List14
121 -- Discriminant_Number Uint15
122 -- DT_Position Uint15
123 -- DT_Entry_Count Uint15
124 -- Entry_Bodies_Array Node15
125 -- Entry_Parameters_Type Node15
126 -- Extra_Formal Node15
127 -- Lit_Indexes Node15
128 -- Related_Instance Node15
129 -- Status_Flag_Or_Transient_Decl Node15
130 -- Scale_Value Uint15
131 -- Storage_Size_Variable Node15
132 -- String_Literal_Low_Bound Node15
134 -- Access_Disp_Table Elist16
135 -- Body_References Elist16
136 -- Cloned_Subtype Node16
138 -- Entry_Formal Node16
139 -- First_Private_Entity Node16
140 -- Lit_Strings Node16
141 -- String_Literal_Length Uint16
142 -- Unset_Reference Node16
144 -- Actual_Subtype Node17
145 -- Digits_Value Uint17
146 -- Discriminal Node17
147 -- First_Entity Node17
148 -- First_Index Node17
149 -- First_Literal Node17
152 -- Non_Limited_View Node17
156 -- Corresponding_Concurrent_Type Node18
157 -- Corresponding_Protected_Entry Node18
158 -- Corresponding_Record_Type Node18
159 -- Delta_Value Ureal18
160 -- Enclosing_Scope Node18
161 -- Equivalent_Type Node18
162 -- Private_Dependents Elist18
163 -- Renamed_Entity Node18
164 -- Renamed_Object Node18
166 -- Body_Entity Node19
167 -- Corresponding_Discriminant Node19
168 -- Default_Aspect_Component_Value Node19
169 -- Default_Aspect_Value Node19
170 -- Extra_Accessibility_Of_Result Node19
171 -- Parent_Subtype Node19
172 -- Size_Check_Code Node19
173 -- Spec_Entity Node19
174 -- Underlying_Full_View Node19
176 -- Component_Type Node20
177 -- Default_Value Node20
178 -- Directly_Designated_Type Node20
179 -- Discriminant_Checking_Func Node20
180 -- Discriminant_Default_Value Node20
181 -- Last_Entity Node20
182 -- Prival_Link Node20
183 -- Register_Exception_Call Node20
184 -- Scalar_Range Node20
186 -- Accept_Address Elist21
187 -- Default_Expr_Function Node21
188 -- Discriminant_Constraint Elist21
189 -- Interface_Name Node21
190 -- Original_Array_Type Node21
191 -- Small_Value Ureal21
193 -- Associated_Storage_Pool Node22
194 -- Component_Size Uint22
195 -- Corresponding_Remote_Type Node22
196 -- Enumeration_Rep_Expr Node22
197 -- Exception_Code Uint22
198 -- Original_Record_Component Node22
199 -- Private_View Node22
200 -- Protected_Formal Node22
201 -- Scope_Depth_Value Uint22
202 -- Shared_Var_Procs_Instance Node22
204 -- CR_Discriminant Node23
205 -- Entry_Cancel_Parameter Node23
206 -- Enum_Pos_To_Rep Node23
207 -- Extra_Constrained Node23
208 -- Finalization_Master Node23
209 -- Generic_Renamings Elist23
210 -- Inner_Instances Elist23
211 -- Limited_View Node23
212 -- Packed_Array_Type Node23
213 -- Protection_Object Node23
214 -- Stored_Constraint Elist23
216 -- Related_Expression Node24
218 -- Interface_Alias Node25
219 -- Interfaces Elist25
220 -- Debug_Renaming_Link Node25
221 -- DT_Offset_To_Top_Func Node25
222 -- PPC_Wrapper Node25
223 -- Related_Array_Object Node25
224 -- Static_Predicate List25
225 -- Task_Body_Procedure Node25
227 -- Dispatch_Table_Wrappers Elist26
228 -- Last_Assignment Node26
229 -- Original_Access_Type Node26
230 -- Overridden_Operation Node26
231 -- Package_Instantiation Node26
232 -- Relative_Deadline_Variable Node26
234 -- Current_Use_Clause Node27
235 -- Related_Type Node27
236 -- Wrapped_Entity Node27
238 -- Extra_Formals Node28
240 -- Initialization_Statements Node28
241 -- Underlying_Record_View Node28
243 -- Subprograms_For_Type Node29
245 -- Corresponding_Equality Node30
246 -- Static_Initialization Node30
248 -- Thunk_Entity Node31
250 -- SPARK_Pragma Node32
252 -- SPARK_Aux_Pragma Node33
258 ---------------------------------------------
259 -- Usage of Flags in Defining Entity Nodes --
260 ---------------------------------------------
262 -- All flags are unique, there is no overlaying, so each flag is physically
263 -- present in every entity. However, for many of the flags, it only makes
264 -- sense for them to be set true for certain subsets of entity kinds. See
265 -- the spec of Einfo for further details.
268 -- Has_Discriminants Flag5
269 -- Is_Dispatching_Operation Flag6
270 -- Is_Immediately_Visible Flag7
272 -- Is_Potentially_Use_Visible Flag9
276 -- Is_Constrained Flag12
277 -- Is_Generic_Type Flag13
278 -- Depends_On_Private Flag14
280 -- Is_Volatile Flag16
281 -- Is_Internal Flag17
282 -- Has_Delayed_Freeze Flag18
283 -- Is_Abstract_Subprogram Flag19
284 -- Is_Concurrent_Record_Type Flag20
286 -- Has_Master_Entity Flag21
287 -- Needs_No_Actuals Flag22
288 -- Has_Storage_Size_Clause Flag23
289 -- Is_Imported Flag24
290 -- Is_Limited_Record Flag25
291 -- Has_Completion Flag26
292 -- Has_Pragma_Controlled Flag27
293 -- Is_Statically_Allocated Flag28
294 -- Has_Size_Clause Flag29
297 -- Checks_May_Be_Suppressed Flag31
298 -- Kill_Elaboration_Checks Flag32
299 -- Kill_Range_Checks Flag33
300 -- Has_Independent_Components Flag34
301 -- Is_Class_Wide_Equivalent_Type Flag35
302 -- Referenced_As_LHS Flag36
303 -- Is_Known_Non_Null Flag37
304 -- Can_Never_Be_Null Flag38
305 -- Has_Default_Aspect Flag39
306 -- Body_Needed_For_SAL Flag40
308 -- Treat_As_Volatile Flag41
309 -- Is_Controlled Flag42
310 -- Has_Controlled_Component Flag43
312 -- In_Private_Part Flag45
313 -- Has_Alignment_Clause Flag46
315 -- In_Package_Body Flag48
317 -- Delay_Subprogram_Descriptors Flag50
320 -- Is_Entry_Formal Flag52
321 -- Is_Private_Descendant Flag53
322 -- Return_Present Flag54
323 -- Is_Tagged_Type Flag55
324 -- Has_Homonym Flag56
326 -- Non_Binary_Modulus Flag58
327 -- Is_Preelaborated Flag59
328 -- Is_Shared_Passive Flag60
330 -- Is_Remote_Types Flag61
331 -- Is_Remote_Call_Interface Flag62
332 -- Is_Character_Type Flag63
333 -- Is_Intrinsic_Subprogram Flag64
334 -- Has_Record_Rep_Clause Flag65
335 -- Has_Enumeration_Rep_Clause Flag66
336 -- Has_Small_Clause Flag67
337 -- Has_Component_Size_Clause Flag68
338 -- Is_Access_Constant Flag69
339 -- Is_First_Subtype Flag70
341 -- Has_Completion_In_Body Flag71
342 -- Has_Unknown_Discriminants Flag72
343 -- Is_Child_Unit Flag73
344 -- Is_CPP_Class Flag74
345 -- Has_Non_Standard_Rep Flag75
346 -- Is_Constructor Flag76
347 -- Static_Elaboration_Desired Flag77
349 -- Has_All_Calls_Remote Flag79
350 -- Is_Constr_Subt_For_U_Nominal Flag80
352 -- Is_Asynchronous Flag81
353 -- Has_Gigi_Rep_Item Flag82
354 -- Has_Machine_Radix_Clause Flag83
355 -- Machine_Radix_10 Flag84
357 -- Has_Atomic_Components Flag86
358 -- Has_Volatile_Components Flag87
359 -- Discard_Names Flag88
360 -- Is_Interrupt_Handler Flag89
361 -- Returns_By_Ref Flag90
364 -- Size_Known_At_Compile_Time Flag92
365 -- Reverse_Storage_Order Flag93
366 -- Is_Generic_Actual_Type Flag94
367 -- Uses_Sec_Stack Flag95
368 -- Warnings_Off Flag96
369 -- Is_Controlling_Formal Flag97
370 -- Has_Controlling_Result Flag98
371 -- Is_Exported Flag99
372 -- Has_Specified_Layout Flag100
374 -- Has_Nested_Block_With_Handler Flag101
376 -- Is_Completely_Hidden Flag103
377 -- Address_Taken Flag104
378 -- Suppress_Initialization Flag105
379 -- Is_Limited_Composite Flag106
380 -- Is_Private_Composite Flag107
381 -- Default_Expressions_Processed Flag108
382 -- Is_Non_Static_Subtype Flag109
383 -- Has_External_Tag_Rep_Clause Flag110
385 -- Is_Formal_Subprogram Flag111
386 -- Is_Renaming_Of_Object Flag112
388 -- Delay_Cleanups Flag114
389 -- Never_Set_In_Source Flag115
390 -- Is_Visible_Lib_Unit Flag116
391 -- Is_Unchecked_Union Flag117
392 -- Is_For_Access_Subtype Flag118
393 -- Has_Convention_Pragma Flag119
394 -- Has_Primitive_Operations Flag120
396 -- Has_Pragma_Pack Flag121
397 -- Is_Bit_Packed_Array Flag122
398 -- Has_Unchecked_Union Flag123
399 -- Is_Eliminated Flag124
400 -- C_Pass_By_Copy Flag125
401 -- Is_Instantiated Flag126
402 -- Is_Valued_Procedure Flag127
403 -- (used for Component_Alignment) Flag128
404 -- (used for Component_Alignment) Flag129
405 -- Is_Generic_Instance Flag130
407 -- No_Pool_Assigned Flag131
408 -- Is_AST_Entry Flag132
409 -- Is_VMS_Exception Flag133
410 -- Is_Optional_Parameter Flag134
411 -- Has_Aliased_Components Flag135
412 -- No_Strict_Aliasing Flag136
413 -- Is_Machine_Code_Subprogram Flag137
414 -- Is_Packed_Array_Type Flag138
415 -- Has_Biased_Representation Flag139
416 -- Has_Complex_Representation Flag140
418 -- Is_Constr_Subt_For_UN_Aliased Flag141
419 -- Has_Missing_Return Flag142
420 -- Has_Recursive_Call Flag143
421 -- Is_Unsigned_Type Flag144
422 -- Strict_Alignment Flag145
423 -- Is_Abstract_Type Flag146
424 -- Needs_Debug_Info Flag147
425 -- Suppress_Elaboration_Warnings Flag148
426 -- Is_Compilation_Unit Flag149
427 -- Has_Pragma_Elaborate_Body Flag150
429 -- Has_Private_Ancestor Flag151
430 -- Entry_Accepted Flag152
431 -- Is_Obsolescent Flag153
432 -- Has_Per_Object_Constraint Flag154
433 -- Has_Private_Declaration Flag155
434 -- Referenced Flag156
435 -- Has_Pragma_Inline Flag157
436 -- Finalize_Storage_Only Flag158
437 -- From_Limited_With Flag159
438 -- Is_Package_Body_Entity Flag160
440 -- Has_Qualified_Name Flag161
441 -- Nonzero_Is_True Flag162
442 -- Is_True_Constant Flag163
443 -- Reverse_Bit_Order Flag164
444 -- Suppress_Style_Checks Flag165
445 -- Debug_Info_Off Flag166
446 -- Sec_Stack_Needed_For_Return Flag167
447 -- Materialize_Entity Flag168
448 -- Has_Pragma_Thread_Local_Storage Flag169
449 -- Is_Known_Valid Flag170
451 -- Is_Hidden_Open_Scope Flag171
452 -- Has_Object_Size_Clause Flag172
453 -- Has_Fully_Qualified_Name Flag173
454 -- Elaboration_Entity_Required Flag174
455 -- Has_Forward_Instantiation Flag175
456 -- Is_Discrim_SO_Function Flag176
457 -- Size_Depends_On_Discriminant Flag177
458 -- Is_Null_Init_Proc Flag178
459 -- Has_Pragma_Pure_Function Flag179
460 -- Has_Pragma_Unreferenced Flag180
462 -- Has_Contiguous_Rep Flag181
463 -- Has_Xref_Entry Flag182
464 -- Must_Be_On_Byte_Boundary Flag183
465 -- Has_Stream_Size_Clause Flag184
466 -- Is_Ada_2005_Only Flag185
467 -- Is_Interface Flag186
468 -- Has_Constrained_Partial_View Flag187
469 -- Uses_Lock_Free Flag188
470 -- Is_Pure_Unit_Access_Type Flag189
471 -- Has_Specified_Stream_Input Flag190
473 -- Has_Specified_Stream_Output Flag191
474 -- Has_Specified_Stream_Read Flag192
475 -- Has_Specified_Stream_Write Flag193
476 -- Is_Local_Anonymous_Access Flag194
477 -- Is_Primitive_Wrapper Flag195
478 -- Was_Hidden Flag196
479 -- Is_Limited_Interface Flag197
480 -- Has_Pragma_Ordered Flag198
481 -- Is_Ada_2012_Only Flag199
483 -- Has_Delayed_Aspects Flag200
484 -- Has_Pragma_No_Inline Flag201
485 -- Itype_Printed Flag202
486 -- Has_Pragma_Pure Flag203
487 -- Is_Known_Null Flag204
488 -- Low_Bound_Tested Flag205
489 -- Is_Visible_Formal Flag206
490 -- Known_To_Have_Preelab_Init Flag207
491 -- Must_Have_Preelab_Init Flag208
492 -- Is_Return_Object Flag209
493 -- Elaborate_Body_Desirable Flag210
495 -- Has_Static_Discriminants Flag211
496 -- Has_Pragma_Unreferenced_Objects Flag212
497 -- Requires_Overriding Flag213
499 -- Has_Up_Level_Access Flag215
500 -- Universal_Aliasing Flag216
501 -- Suppress_Value_Tracking_On_Call Flag217
502 -- Is_Primitive Flag218
503 -- Has_Initial_Value Flag219
504 -- Has_Dispatch_Table Flag220
506 -- Has_Pragma_Preelab_Init Flag221
507 -- Used_As_Generic_Actual Flag222
508 -- Is_Descendent_Of_Address Flag223
511 -- Is_Only_Out_Parameter Flag226
512 -- Referenced_As_Out_Parameter Flag227
513 -- Has_Thunks Flag228
514 -- Can_Use_Internal_Rep Flag229
515 -- Has_Pragma_Inline_Always Flag230
517 -- Renamed_In_Spec Flag231
518 -- Has_Invariants Flag232
519 -- Has_Pragma_Unmodified Flag233
520 -- Is_Dispatch_Table_Entity Flag234
521 -- Is_Trivial_Subprogram Flag235
522 -- Warnings_Off_Used Flag236
523 -- Warnings_Off_Used_Unmodified Flag237
524 -- Warnings_Off_Used_Unreferenced Flag238
525 -- OK_To_Reorder_Components Flag239
526 -- Has_Postconditions Flag240
528 -- Optimize_Alignment_Space Flag241
529 -- Optimize_Alignment_Time Flag242
530 -- Overlays_Constant Flag243
531 -- Is_RACW_Stub_Type Flag244
532 -- Is_Private_Primitive Flag245
533 -- Is_Underlying_Record_View Flag246
534 -- OK_To_Rename Flag247
535 -- Has_Inheritable_Invariants Flag248
536 -- Is_Safe_To_Reevaluate Flag249
537 -- Has_Predicates Flag250
539 -- Has_Implicit_Dereference Flag251
540 -- Is_Processed_Transient Flag252
541 -- Has_Anonymous_Master Flag253
542 -- Is_Implementation_Defined Flag254
543 -- Is_Predicate_Function Flag255
544 -- Is_Predicate_Function_M Flag256
545 -- Is_Invariant_Procedure Flag257
546 -- Has_Dynamic_Predicate_Aspect Flag258
547 -- Has_Static_Predicate_Aspect Flag259
548 -- Has_Loop_Entry_Attributes Flag260
550 -- Has_Delayed_Rep_Aspects Flag261
551 -- May_Inherit_Delayed_Rep_Aspects Flag262
552 -- Has_Visible_Refinement Flag263
553 -- Has_Body_References Flag264
554 -- SPARK_Pragma_Inherited Flag265
555 -- SPARK_Aux_Pragma_Inherited Flag266
584 -- Note: Flag287-317 are defined in atree.ads/adb, but not yet in atree.h
586 -----------------------
587 -- Local subprograms --
588 -----------------------
592 Opt_Nam : Name_Id) return Boolean;
593 -- Determine whether abstract state State has a particular option denoted
594 -- by the name Opt_Nam.
600 function Float_Rep (Id : E) return F is
601 pragma Assert (Is_Floating_Point_Type (Id));
603 return F'Val (UI_To_Int (Uint10 (Base_Type (Id))));
612 Opt_Nam : Name_Id) return Boolean
614 Par : constant Node_Id := Parent (State);
618 pragma Assert (Ekind (State) = E_Abstract_State);
620 -- States with options appear as extension aggregates in the tree
622 if Nkind (Par) = N_Extension_Aggregate then
623 if Opt_Nam = Name_Part_Of then
624 return Present (Component_Associations (Par));
627 Opt := First (Expressions (Par));
628 while Present (Opt) loop
629 if Chars (Opt) = Opt_Nam then
641 --------------------------------
642 -- Attribute Access Functions --
643 --------------------------------
645 function Abstract_States (Id : E) return L is
647 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
651 function Accept_Address (Id : E) return L is
656 function Access_Disp_Table (Id : E) return L is
658 pragma Assert (Ekind_In (Id, E_Record_Type,
660 return Elist16 (Implementation_Base_Type (Id));
661 end Access_Disp_Table;
663 function Actual_Subtype (Id : E) return E is
666 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
667 or else Is_Formal (Id));
671 function Address_Taken (Id : E) return B is
676 function Alias (Id : E) return E is
679 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
683 function Alignment (Id : E) return U is
685 pragma Assert (Is_Type (Id)
686 or else Is_Formal (Id)
687 or else Ekind_In (Id, E_Loop_Parameter,
694 function Associated_Formal_Package (Id : E) return E is
696 pragma Assert (Ekind (Id) = E_Package);
698 end Associated_Formal_Package;
700 function Associated_Node_For_Itype (Id : E) return N is
703 end Associated_Node_For_Itype;
705 function Associated_Storage_Pool (Id : E) return E is
707 pragma Assert (Is_Access_Type (Id));
708 return Node22 (Root_Type (Id));
709 end Associated_Storage_Pool;
711 function Barrier_Function (Id : E) return N is
713 pragma Assert (Is_Entry (Id));
715 end Barrier_Function;
717 function Block_Node (Id : E) return N is
719 pragma Assert (Ekind (Id) = E_Block);
723 function Body_Entity (Id : E) return E is
725 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
729 function Body_Needed_For_SAL (Id : E) return B is
732 (Ekind (Id) = E_Package
733 or else Is_Subprogram (Id)
734 or else Is_Generic_Unit (Id));
736 end Body_Needed_For_SAL;
738 function Body_References (Id : E) return L is
740 pragma Assert (Ekind (Id) = E_Abstract_State);
744 function C_Pass_By_Copy (Id : E) return B is
746 pragma Assert (Is_Record_Type (Id));
747 return Flag125 (Implementation_Base_Type (Id));
750 function Can_Never_Be_Null (Id : E) return B is
753 end Can_Never_Be_Null;
755 function Checks_May_Be_Suppressed (Id : E) return B is
758 end Checks_May_Be_Suppressed;
760 function Class_Wide_Type (Id : E) return E is
762 pragma Assert (Is_Type (Id));
766 function Cloned_Subtype (Id : E) return E is
768 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
772 function Component_Bit_Offset (Id : E) return U is
774 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
776 end Component_Bit_Offset;
778 function Component_Clause (Id : E) return N is
780 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
782 end Component_Clause;
784 function Component_Size (Id : E) return U is
786 pragma Assert (Is_Array_Type (Id));
787 return Uint22 (Implementation_Base_Type (Id));
790 function Component_Type (Id : E) return E is
792 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
793 return Node20 (Implementation_Base_Type (Id));
796 function Corresponding_Concurrent_Type (Id : E) return E is
798 pragma Assert (Ekind (Id) = E_Record_Type);
800 end Corresponding_Concurrent_Type;
802 function Corresponding_Discriminant (Id : E) return E is
804 pragma Assert (Ekind (Id) = E_Discriminant);
806 end Corresponding_Discriminant;
808 function Corresponding_Equality (Id : E) return E is
811 (Ekind (Id) = E_Function
812 and then not Comes_From_Source (Id)
813 and then Chars (Id) = Name_Op_Ne);
815 end Corresponding_Equality;
817 function Corresponding_Protected_Entry (Id : E) return E is
819 pragma Assert (Ekind (Id) = E_Subprogram_Body);
821 end Corresponding_Protected_Entry;
823 function Corresponding_Record_Type (Id : E) return E is
825 pragma Assert (Is_Concurrent_Type (Id));
827 end Corresponding_Record_Type;
829 function Corresponding_Remote_Type (Id : E) return E is
832 end Corresponding_Remote_Type;
834 function Current_Use_Clause (Id : E) return E is
836 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
838 end Current_Use_Clause;
840 function Current_Value (Id : E) return N is
842 pragma Assert (Ekind (Id) in Object_Kind);
846 function CR_Discriminant (Id : E) return E is
851 function Debug_Info_Off (Id : E) return B is
856 function Debug_Renaming_Link (Id : E) return E is
859 end Debug_Renaming_Link;
861 function Default_Aspect_Component_Value (Id : E) return N is
863 pragma Assert (Is_Array_Type (Id));
864 return Node19 (Base_Type (Id));
865 end Default_Aspect_Component_Value;
867 function Default_Aspect_Value (Id : E) return N is
869 pragma Assert (Is_Scalar_Type (Id));
870 return Node19 (Base_Type (Id));
871 end Default_Aspect_Value;
873 function Default_Expr_Function (Id : E) return E is
875 pragma Assert (Is_Formal (Id));
877 end Default_Expr_Function;
879 function Default_Expressions_Processed (Id : E) return B is
882 end Default_Expressions_Processed;
884 function Default_Value (Id : E) return N is
886 pragma Assert (Is_Formal (Id));
890 function Delay_Cleanups (Id : E) return B is
895 function Delay_Subprogram_Descriptors (Id : E) return B is
898 end Delay_Subprogram_Descriptors;
900 function Delta_Value (Id : E) return R is
902 pragma Assert (Is_Fixed_Point_Type (Id));
906 function Dependent_Instances (Id : E) return L is
908 pragma Assert (Is_Generic_Instance (Id));
910 end Dependent_Instances;
912 function Depends_On_Private (Id : E) return B is
914 pragma Assert (Nkind (Id) in N_Entity);
916 end Depends_On_Private;
918 function Digits_Value (Id : E) return U is
921 (Is_Floating_Point_Type (Id)
922 or else Is_Decimal_Fixed_Point_Type (Id));
926 function Direct_Primitive_Operations (Id : E) return L is
928 pragma Assert (Is_Tagged_Type (Id));
930 end Direct_Primitive_Operations;
932 function Directly_Designated_Type (Id : E) return E is
934 pragma Assert (Is_Access_Type (Id));
936 end Directly_Designated_Type;
938 function Discard_Names (Id : E) return B is
943 function Discriminal (Id : E) return E is
945 pragma Assert (Ekind (Id) = E_Discriminant);
949 function Discriminal_Link (Id : E) return N is
952 end Discriminal_Link;
954 function Discriminant_Checking_Func (Id : E) return E is
956 pragma Assert (Ekind (Id) = E_Component);
958 end Discriminant_Checking_Func;
960 function Discriminant_Constraint (Id : E) return L is
962 pragma Assert (Is_Composite_Type (Id) and then Has_Discriminants (Id));
964 end Discriminant_Constraint;
966 function Discriminant_Default_Value (Id : E) return N is
968 pragma Assert (Ekind (Id) = E_Discriminant);
970 end Discriminant_Default_Value;
972 function Discriminant_Number (Id : E) return U is
974 pragma Assert (Ekind (Id) = E_Discriminant);
976 end Discriminant_Number;
978 function Dispatch_Table_Wrappers (Id : E) return L is
980 pragma Assert (Ekind_In (Id, E_Record_Type,
982 return Elist26 (Implementation_Base_Type (Id));
983 end Dispatch_Table_Wrappers;
985 function DT_Entry_Count (Id : E) return U is
987 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
991 function DT_Offset_To_Top_Func (Id : E) return E is
993 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
995 end DT_Offset_To_Top_Func;
997 function DT_Position (Id : E) return U is
999 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
1000 and then Present (DTC_Entity (Id)));
1004 function DTC_Entity (Id : E) return E is
1006 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1010 function Elaborate_Body_Desirable (Id : E) return B is
1012 pragma Assert (Ekind (Id) = E_Package);
1013 return Flag210 (Id);
1014 end Elaborate_Body_Desirable;
1016 function Elaboration_Entity (Id : E) return E is
1021 Ekind (Id) = E_Package
1023 Is_Generic_Unit (Id));
1025 end Elaboration_Entity;
1027 function Elaboration_Entity_Required (Id : E) return B is
1032 Ekind (Id) = E_Package
1034 Is_Generic_Unit (Id));
1035 return Flag174 (Id);
1036 end Elaboration_Entity_Required;
1038 function Enclosing_Scope (Id : E) return E is
1041 end Enclosing_Scope;
1043 function Entry_Accepted (Id : E) return B is
1045 pragma Assert (Is_Entry (Id));
1046 return Flag152 (Id);
1049 function Entry_Bodies_Array (Id : E) return E is
1052 end Entry_Bodies_Array;
1054 function Entry_Cancel_Parameter (Id : E) return E is
1057 end Entry_Cancel_Parameter;
1059 function Entry_Component (Id : E) return E is
1062 end Entry_Component;
1064 function Entry_Formal (Id : E) return E is
1069 function Entry_Index_Constant (Id : E) return N is
1071 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
1073 end Entry_Index_Constant;
1075 function Contract (Id : E) return N is
1078 (Ekind_In (Id, E_Entry,
1085 or else Is_Generic_Subprogram (Id)
1086 or else Is_Subprogram (Id));
1090 function Entry_Parameters_Type (Id : E) return E is
1093 end Entry_Parameters_Type;
1095 function Enum_Pos_To_Rep (Id : E) return E is
1097 pragma Assert (Ekind (Id) = E_Enumeration_Type);
1099 end Enum_Pos_To_Rep;
1101 function Enumeration_Pos (Id : E) return Uint is
1103 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1105 end Enumeration_Pos;
1107 function Enumeration_Rep (Id : E) return U is
1109 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1111 end Enumeration_Rep;
1113 function Enumeration_Rep_Expr (Id : E) return N is
1115 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
1117 end Enumeration_Rep_Expr;
1119 function Equivalent_Type (Id : E) return E is
1122 (Ekind_In (Id, E_Class_Wide_Type,
1123 E_Class_Wide_Subtype,
1124 E_Access_Subprogram_Type,
1125 E_Access_Protected_Subprogram_Type,
1126 E_Anonymous_Access_Protected_Subprogram_Type,
1127 E_Access_Subprogram_Type,
1130 end Equivalent_Type;
1132 function Esize (Id : E) return Uint is
1137 function Exception_Code (Id : E) return Uint is
1139 pragma Assert (Ekind (Id) = E_Exception);
1143 function Extra_Accessibility (Id : E) return E is
1146 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
1148 end Extra_Accessibility;
1150 function Extra_Accessibility_Of_Result (Id : E) return E is
1152 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
1154 end Extra_Accessibility_Of_Result;
1156 function Extra_Constrained (Id : E) return E is
1158 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
1160 end Extra_Constrained;
1162 function Extra_Formal (Id : E) return E is
1167 function Extra_Formals (Id : E) return E is
1170 (Is_Overloadable (Id)
1171 or else Ekind_In (Id, E_Entry_Family,
1173 E_Subprogram_Type));
1177 function Can_Use_Internal_Rep (Id : E) return B is
1179 pragma Assert (Is_Access_Subprogram_Type (Base_Type (Id)));
1180 return Flag229 (Base_Type (Id));
1181 end Can_Use_Internal_Rep;
1183 function Finalization_Master (Id : E) return E is
1185 pragma Assert (Is_Access_Type (Id));
1186 return Node23 (Root_Type (Id));
1187 end Finalization_Master;
1189 function Finalize_Storage_Only (Id : E) return B is
1191 pragma Assert (Is_Type (Id));
1192 return Flag158 (Base_Type (Id));
1193 end Finalize_Storage_Only;
1195 function Finalizer (Id : E) return E is
1197 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
1201 function First_Entity (Id : E) return E is
1206 function First_Exit_Statement (Id : E) return N is
1208 pragma Assert (Ekind (Id) = E_Loop);
1210 end First_Exit_Statement;
1212 function First_Index (Id : E) return N is
1214 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
1218 function First_Literal (Id : E) return E is
1220 pragma Assert (Is_Enumeration_Type (Id));
1224 function First_Optional_Parameter (Id : E) return E is
1226 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
1228 end First_Optional_Parameter;
1230 function First_Private_Entity (Id : E) return E is
1232 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
1233 or else Ekind (Id) in Concurrent_Kind);
1235 end First_Private_Entity;
1237 function First_Rep_Item (Id : E) return E is
1242 function Freeze_Node (Id : E) return N is
1247 function From_Limited_With (Id : E) return B is
1249 return Flag159 (Id);
1250 end From_Limited_With;
1252 function Full_View (Id : E) return E is
1254 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
1258 function Generic_Homonym (Id : E) return E is
1260 pragma Assert (Ekind (Id) = E_Generic_Package);
1262 end Generic_Homonym;
1264 function Generic_Renamings (Id : E) return L is
1266 return Elist23 (Id);
1267 end Generic_Renamings;
1269 function Handler_Records (Id : E) return S is
1272 end Handler_Records;
1274 function Has_Aliased_Components (Id : E) return B is
1276 return Flag135 (Implementation_Base_Type (Id));
1277 end Has_Aliased_Components;
1279 function Has_Alignment_Clause (Id : E) return B is
1282 end Has_Alignment_Clause;
1284 function Has_All_Calls_Remote (Id : E) return B is
1287 end Has_All_Calls_Remote;
1289 function Has_Anonymous_Master (Id : E) return B is
1292 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
1293 return Flag253 (Id);
1294 end Has_Anonymous_Master;
1296 function Has_Atomic_Components (Id : E) return B is
1298 return Flag86 (Implementation_Base_Type (Id));
1299 end Has_Atomic_Components;
1301 function Has_Biased_Representation (Id : E) return B is
1303 return Flag139 (Id);
1304 end Has_Biased_Representation;
1306 function Has_Body_References (Id : E) return B is
1308 pragma Assert (Ekind (Id) = E_Abstract_State);
1309 return Flag264 (Id);
1310 end Has_Body_References;
1312 function Has_Completion (Id : E) return B is
1317 function Has_Completion_In_Body (Id : E) return B is
1319 pragma Assert (Is_Type (Id));
1321 end Has_Completion_In_Body;
1323 function Has_Complex_Representation (Id : E) return B is
1325 pragma Assert (Is_Type (Id));
1326 return Flag140 (Implementation_Base_Type (Id));
1327 end Has_Complex_Representation;
1329 function Has_Component_Size_Clause (Id : E) return B is
1331 pragma Assert (Is_Array_Type (Id));
1332 return Flag68 (Implementation_Base_Type (Id));
1333 end Has_Component_Size_Clause;
1335 function Has_Constrained_Partial_View (Id : E) return B is
1337 pragma Assert (Is_Type (Id));
1338 return Flag187 (Id);
1339 end Has_Constrained_Partial_View;
1341 function Has_Controlled_Component (Id : E) return B is
1343 return Flag43 (Base_Type (Id));
1344 end Has_Controlled_Component;
1346 function Has_Contiguous_Rep (Id : E) return B is
1348 return Flag181 (Id);
1349 end Has_Contiguous_Rep;
1351 function Has_Controlling_Result (Id : E) return B is
1354 end Has_Controlling_Result;
1356 function Has_Convention_Pragma (Id : E) return B is
1358 return Flag119 (Id);
1359 end Has_Convention_Pragma;
1361 function Has_Default_Aspect (Id : E) return B is
1363 return Flag39 (Base_Type (Id));
1364 end Has_Default_Aspect;
1366 function Has_Delayed_Aspects (Id : E) return B is
1368 pragma Assert (Nkind (Id) in N_Entity);
1369 return Flag200 (Id);
1370 end Has_Delayed_Aspects;
1372 function Has_Delayed_Freeze (Id : E) return B is
1374 pragma Assert (Nkind (Id) in N_Entity);
1376 end Has_Delayed_Freeze;
1378 function Has_Delayed_Rep_Aspects (Id : E) return B is
1380 pragma Assert (Nkind (Id) in N_Entity);
1381 return Flag261 (Id);
1382 end Has_Delayed_Rep_Aspects;
1384 function Has_Discriminants (Id : E) return B is
1386 pragma Assert (Nkind (Id) in N_Entity);
1388 end Has_Discriminants;
1390 function Has_Dispatch_Table (Id : E) return B is
1392 pragma Assert (Is_Tagged_Type (Id));
1393 return Flag220 (Id);
1394 end Has_Dispatch_Table;
1396 function Has_Dynamic_Predicate_Aspect (Id : E) return B is
1398 pragma Assert (Is_Type (Id));
1399 return Flag258 (Id);
1400 end Has_Dynamic_Predicate_Aspect;
1402 function Has_Enumeration_Rep_Clause (Id : E) return B is
1404 pragma Assert (Is_Enumeration_Type (Id));
1406 end Has_Enumeration_Rep_Clause;
1408 function Has_Exit (Id : E) return B is
1413 function Has_External_Tag_Rep_Clause (Id : E) return B is
1415 pragma Assert (Is_Tagged_Type (Id));
1416 return Flag110 (Id);
1417 end Has_External_Tag_Rep_Clause;
1419 function Has_Forward_Instantiation (Id : E) return B is
1421 return Flag175 (Id);
1422 end Has_Forward_Instantiation;
1424 function Has_Fully_Qualified_Name (Id : E) return B is
1426 return Flag173 (Id);
1427 end Has_Fully_Qualified_Name;
1429 function Has_Gigi_Rep_Item (Id : E) return B is
1432 end Has_Gigi_Rep_Item;
1434 function Has_Homonym (Id : E) return B is
1439 function Has_Implicit_Dereference (Id : E) return B is
1441 return Flag251 (Id);
1442 end Has_Implicit_Dereference;
1444 function Has_Independent_Components (Id : E) return B is
1446 pragma Assert (Is_Object (Id) or else Is_Type (Id));
1448 end Has_Independent_Components;
1450 function Has_Inheritable_Invariants (Id : E) return B is
1452 pragma Assert (Is_Type (Id));
1453 return Flag248 (Id);
1454 end Has_Inheritable_Invariants;
1456 function Has_Initial_Value (Id : E) return B is
1458 pragma Assert (Ekind (Id) = E_Variable or else Is_Formal (Id));
1459 return Flag219 (Id);
1460 end Has_Initial_Value;
1462 function Has_Invariants (Id : E) return B is
1464 pragma Assert (Is_Type (Id));
1465 return Flag232 (Id);
1468 function Has_Loop_Entry_Attributes (Id : E) return B is
1470 pragma Assert (Ekind (Id) = E_Loop);
1471 return Flag260 (Id);
1472 end Has_Loop_Entry_Attributes;
1474 function Has_Machine_Radix_Clause (Id : E) return B is
1476 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
1478 end Has_Machine_Radix_Clause;
1480 function Has_Master_Entity (Id : E) return B is
1483 end Has_Master_Entity;
1485 function Has_Missing_Return (Id : E) return B is
1487 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
1488 return Flag142 (Id);
1489 end Has_Missing_Return;
1491 function Has_Nested_Block_With_Handler (Id : E) return B is
1493 return Flag101 (Id);
1494 end Has_Nested_Block_With_Handler;
1496 function Has_Non_Standard_Rep (Id : E) return B is
1498 return Flag75 (Implementation_Base_Type (Id));
1499 end Has_Non_Standard_Rep;
1501 function Has_Object_Size_Clause (Id : E) return B is
1503 pragma Assert (Is_Type (Id));
1504 return Flag172 (Id);
1505 end Has_Object_Size_Clause;
1507 function Has_Per_Object_Constraint (Id : E) return B is
1509 return Flag154 (Id);
1510 end Has_Per_Object_Constraint;
1512 function Has_Postconditions (Id : E) return B is
1514 pragma Assert (Is_Subprogram (Id));
1515 return Flag240 (Id);
1516 end Has_Postconditions;
1518 function Has_Pragma_Controlled (Id : E) return B is
1520 pragma Assert (Is_Access_Type (Id));
1521 return Flag27 (Implementation_Base_Type (Id));
1522 end Has_Pragma_Controlled;
1524 function Has_Pragma_Elaborate_Body (Id : E) return B is
1526 return Flag150 (Id);
1527 end Has_Pragma_Elaborate_Body;
1529 function Has_Pragma_Inline (Id : E) return B is
1531 return Flag157 (Id);
1532 end Has_Pragma_Inline;
1534 function Has_Pragma_Inline_Always (Id : E) return B is
1536 return Flag230 (Id);
1537 end Has_Pragma_Inline_Always;
1539 function Has_Pragma_No_Inline (Id : E) return B is
1541 return Flag201 (Id);
1542 end Has_Pragma_No_Inline;
1544 function Has_Pragma_Ordered (Id : E) return B is
1546 pragma Assert (Is_Enumeration_Type (Id));
1547 return Flag198 (Implementation_Base_Type (Id));
1548 end Has_Pragma_Ordered;
1550 function Has_Pragma_Pack (Id : E) return B is
1552 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
1553 return Flag121 (Implementation_Base_Type (Id));
1554 end Has_Pragma_Pack;
1556 function Has_Pragma_Preelab_Init (Id : E) return B is
1558 return Flag221 (Id);
1559 end Has_Pragma_Preelab_Init;
1561 function Has_Pragma_Pure (Id : E) return B is
1563 return Flag203 (Id);
1564 end Has_Pragma_Pure;
1566 function Has_Pragma_Pure_Function (Id : E) return B is
1568 return Flag179 (Id);
1569 end Has_Pragma_Pure_Function;
1571 function Has_Pragma_Thread_Local_Storage (Id : E) return B is
1573 return Flag169 (Id);
1574 end Has_Pragma_Thread_Local_Storage;
1576 function Has_Pragma_Unmodified (Id : E) return B is
1578 return Flag233 (Id);
1579 end Has_Pragma_Unmodified;
1581 function Has_Pragma_Unreferenced (Id : E) return B is
1583 return Flag180 (Id);
1584 end Has_Pragma_Unreferenced;
1586 function Has_Pragma_Unreferenced_Objects (Id : E) return B is
1588 pragma Assert (Is_Type (Id));
1589 return Flag212 (Id);
1590 end Has_Pragma_Unreferenced_Objects;
1592 function Has_Predicates (Id : E) return B is
1594 pragma Assert (Is_Type (Id));
1595 return Flag250 (Id);
1598 function Has_Primitive_Operations (Id : E) return B is
1600 pragma Assert (Is_Type (Id));
1601 return Flag120 (Base_Type (Id));
1602 end Has_Primitive_Operations;
1604 function Has_Private_Ancestor (Id : E) return B is
1606 return Flag151 (Id);
1607 end Has_Private_Ancestor;
1609 function Has_Private_Declaration (Id : E) return B is
1611 return Flag155 (Id);
1612 end Has_Private_Declaration;
1614 function Has_Qualified_Name (Id : E) return B is
1616 return Flag161 (Id);
1617 end Has_Qualified_Name;
1619 function Has_RACW (Id : E) return B is
1621 pragma Assert (Ekind (Id) = E_Package);
1622 return Flag214 (Id);
1625 function Has_Record_Rep_Clause (Id : E) return B is
1627 pragma Assert (Is_Record_Type (Id));
1628 return Flag65 (Implementation_Base_Type (Id));
1629 end Has_Record_Rep_Clause;
1631 function Has_Recursive_Call (Id : E) return B is
1633 pragma Assert (Is_Subprogram (Id));
1634 return Flag143 (Id);
1635 end Has_Recursive_Call;
1637 function Has_Size_Clause (Id : E) return B is
1640 end Has_Size_Clause;
1642 function Has_Small_Clause (Id : E) return B is
1645 end Has_Small_Clause;
1647 function Has_Specified_Layout (Id : E) return B is
1649 pragma Assert (Is_Type (Id));
1650 return Flag100 (Implementation_Base_Type (Id));
1651 end Has_Specified_Layout;
1653 function Has_Specified_Stream_Input (Id : E) return B is
1655 pragma Assert (Is_Type (Id));
1656 return Flag190 (Id);
1657 end Has_Specified_Stream_Input;
1659 function Has_Specified_Stream_Output (Id : E) return B is
1661 pragma Assert (Is_Type (Id));
1662 return Flag191 (Id);
1663 end Has_Specified_Stream_Output;
1665 function Has_Specified_Stream_Read (Id : E) return B is
1667 pragma Assert (Is_Type (Id));
1668 return Flag192 (Id);
1669 end Has_Specified_Stream_Read;
1671 function Has_Specified_Stream_Write (Id : E) return B is
1673 pragma Assert (Is_Type (Id));
1674 return Flag193 (Id);
1675 end Has_Specified_Stream_Write;
1677 function Has_Static_Discriminants (Id : E) return B is
1679 pragma Assert (Is_Type (Id));
1680 return Flag211 (Id);
1681 end Has_Static_Discriminants;
1683 function Has_Static_Predicate_Aspect (Id : E) return B is
1685 pragma Assert (Is_Type (Id));
1686 return Flag259 (Id);
1687 end Has_Static_Predicate_Aspect;
1689 function Has_Storage_Size_Clause (Id : E) return B is
1691 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
1692 return Flag23 (Implementation_Base_Type (Id));
1693 end Has_Storage_Size_Clause;
1695 function Has_Stream_Size_Clause (Id : E) return B is
1697 return Flag184 (Id);
1698 end Has_Stream_Size_Clause;
1700 function Has_Task (Id : E) return B is
1702 return Flag30 (Base_Type (Id));
1705 function Has_Thunks (Id : E) return B is
1707 return Flag228 (Id);
1710 function Has_Unchecked_Union (Id : E) return B is
1712 return Flag123 (Base_Type (Id));
1713 end Has_Unchecked_Union;
1715 function Has_Unknown_Discriminants (Id : E) return B is
1717 pragma Assert (Is_Type (Id));
1719 end Has_Unknown_Discriminants;
1721 function Has_Up_Level_Access (Id : E) return B is
1724 (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
1725 return Flag215 (Id);
1726 end Has_Up_Level_Access;
1728 function Has_Visible_Refinement (Id : E) return B is
1730 pragma Assert (Ekind (Id) = E_Abstract_State);
1731 return Flag263 (Id);
1732 end Has_Visible_Refinement;
1734 function Has_Volatile_Components (Id : E) return B is
1736 return Flag87 (Implementation_Base_Type (Id));
1737 end Has_Volatile_Components;
1739 function Has_Xref_Entry (Id : E) return B is
1741 return Flag182 (Id);
1744 function Hiding_Loop_Variable (Id : E) return E is
1746 pragma Assert (Ekind (Id) = E_Variable);
1748 end Hiding_Loop_Variable;
1750 function Homonym (Id : E) return E is
1755 function Interface_Alias (Id : E) return E is
1757 pragma Assert (Is_Subprogram (Id));
1759 end Interface_Alias;
1761 function Interfaces (Id : E) return L is
1763 pragma Assert (Is_Record_Type (Id));
1764 return Elist25 (Id);
1767 function In_Package_Body (Id : E) return B is
1770 end In_Package_Body;
1772 function In_Private_Part (Id : E) return B is
1775 end In_Private_Part;
1777 function In_Use (Id : E) return B is
1779 pragma Assert (Nkind (Id) in N_Entity);
1783 function Initialization_Statements (Id : E) return N is
1785 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
1787 end Initialization_Statements;
1789 function Inner_Instances (Id : E) return L is
1791 return Elist23 (Id);
1792 end Inner_Instances;
1794 function Interface_Name (Id : E) return N is
1799 function Is_Abstract_Subprogram (Id : E) return B is
1801 pragma Assert (Is_Overloadable (Id));
1803 end Is_Abstract_Subprogram;
1805 function Is_Abstract_Type (Id : E) return B is
1807 pragma Assert (Is_Type (Id));
1808 return Flag146 (Id);
1809 end Is_Abstract_Type;
1811 function Is_Local_Anonymous_Access (Id : E) return B is
1813 pragma Assert (Is_Access_Type (Id));
1814 return Flag194 (Id);
1815 end Is_Local_Anonymous_Access;
1817 function Is_Access_Constant (Id : E) return B is
1819 pragma Assert (Is_Access_Type (Id));
1821 end Is_Access_Constant;
1823 function Is_Ada_2005_Only (Id : E) return B is
1825 return Flag185 (Id);
1826 end Is_Ada_2005_Only;
1828 function Is_Ada_2012_Only (Id : E) return B is
1830 return Flag199 (Id);
1831 end Is_Ada_2012_Only;
1833 function Is_Aliased (Id : E) return B is
1835 pragma Assert (Nkind (Id) in N_Entity);
1839 function Is_AST_Entry (Id : E) return B is
1841 pragma Assert (Is_Entry (Id));
1842 return Flag132 (Id);
1845 function Is_Asynchronous (Id : E) return B is
1847 pragma Assert (Ekind (Id) = E_Procedure or else Is_Type (Id));
1849 end Is_Asynchronous;
1851 function Is_Atomic (Id : E) return B is
1856 function Is_Bit_Packed_Array (Id : E) return B is
1858 return Flag122 (Implementation_Base_Type (Id));
1859 end Is_Bit_Packed_Array;
1861 function Is_Called (Id : E) return B is
1863 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
1864 return Flag102 (Id);
1867 function Is_Character_Type (Id : E) return B is
1870 end Is_Character_Type;
1872 function Is_Child_Unit (Id : E) return B is
1877 function Is_Class_Wide_Equivalent_Type (Id : E) return B is
1880 end Is_Class_Wide_Equivalent_Type;
1882 function Is_Compilation_Unit (Id : E) return B is
1884 return Flag149 (Id);
1885 end Is_Compilation_Unit;
1887 function Is_Completely_Hidden (Id : E) return B is
1889 pragma Assert (Ekind (Id) = E_Discriminant);
1890 return Flag103 (Id);
1891 end Is_Completely_Hidden;
1893 function Is_Constr_Subt_For_U_Nominal (Id : E) return B is
1896 end Is_Constr_Subt_For_U_Nominal;
1898 function Is_Constr_Subt_For_UN_Aliased (Id : E) return B is
1900 return Flag141 (Id);
1901 end Is_Constr_Subt_For_UN_Aliased;
1903 function Is_Constrained (Id : E) return B is
1905 pragma Assert (Nkind (Id) in N_Entity);
1909 function Is_Constructor (Id : E) return B is
1914 function Is_Controlled (Id : E) return B is
1916 return Flag42 (Base_Type (Id));
1919 function Is_Controlling_Formal (Id : E) return B is
1921 pragma Assert (Is_Formal (Id));
1923 end Is_Controlling_Formal;
1925 function Is_CPP_Class (Id : E) return B is
1930 function Is_Descendent_Of_Address (Id : E) return B is
1932 return Flag223 (Id);
1933 end Is_Descendent_Of_Address;
1935 function Is_Discrim_SO_Function (Id : E) return B is
1937 return Flag176 (Id);
1938 end Is_Discrim_SO_Function;
1940 function Is_Dispatch_Table_Entity (Id : E) return B is
1942 return Flag234 (Id);
1943 end Is_Dispatch_Table_Entity;
1945 function Is_Dispatching_Operation (Id : E) return B is
1947 pragma Assert (Nkind (Id) in N_Entity);
1949 end Is_Dispatching_Operation;
1951 function Is_Eliminated (Id : E) return B is
1953 return Flag124 (Id);
1956 function Is_Entry_Formal (Id : E) return B is
1959 end Is_Entry_Formal;
1961 function Is_Exported (Id : E) return B is
1966 function Is_First_Subtype (Id : E) return B is
1969 end Is_First_Subtype;
1971 function Is_For_Access_Subtype (Id : E) return B is
1973 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
1974 return Flag118 (Id);
1975 end Is_For_Access_Subtype;
1977 function Is_Formal_Subprogram (Id : E) return B is
1979 return Flag111 (Id);
1980 end Is_Formal_Subprogram;
1982 function Is_Frozen (Id : E) return B is
1987 function Is_Generic_Actual_Type (Id : E) return B is
1989 pragma Assert (Is_Type (Id));
1991 end Is_Generic_Actual_Type;
1993 function Is_Generic_Instance (Id : E) return B is
1995 return Flag130 (Id);
1996 end Is_Generic_Instance;
1998 function Is_Generic_Type (Id : E) return B is
2000 pragma Assert (Nkind (Id) in N_Entity);
2002 end Is_Generic_Type;
2004 function Is_Hidden (Id : E) return B is
2009 function Is_Hidden_Open_Scope (Id : E) return B is
2011 return Flag171 (Id);
2012 end Is_Hidden_Open_Scope;
2014 function Is_Immediately_Visible (Id : E) return B is
2016 pragma Assert (Nkind (Id) in N_Entity);
2018 end Is_Immediately_Visible;
2020 function Is_Implementation_Defined (Id : E) return B is
2022 return Flag254 (Id);
2023 end Is_Implementation_Defined;
2025 function Is_Imported (Id : E) return B is
2030 function Is_Inlined (Id : E) return B is
2035 function Is_Interface (Id : E) return B is
2037 return Flag186 (Id);
2040 function Is_Instantiated (Id : E) return B is
2042 return Flag126 (Id);
2043 end Is_Instantiated;
2045 function Is_Internal (Id : E) return B is
2047 pragma Assert (Nkind (Id) in N_Entity);
2051 function Is_Interrupt_Handler (Id : E) return B is
2053 pragma Assert (Nkind (Id) in N_Entity);
2055 end Is_Interrupt_Handler;
2057 function Is_Intrinsic_Subprogram (Id : E) return B is
2060 end Is_Intrinsic_Subprogram;
2062 function Is_Invariant_Procedure (Id : E) return B is
2064 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2065 return Flag257 (Id);
2066 end Is_Invariant_Procedure;
2068 function Is_Itype (Id : E) return B is
2073 function Is_Known_Non_Null (Id : E) return B is
2076 end Is_Known_Non_Null;
2078 function Is_Known_Null (Id : E) return B is
2080 return Flag204 (Id);
2083 function Is_Known_Valid (Id : E) return B is
2085 return Flag170 (Id);
2088 function Is_Limited_Composite (Id : E) return B is
2090 return Flag106 (Id);
2091 end Is_Limited_Composite;
2093 function Is_Limited_Interface (Id : E) return B is
2095 return Flag197 (Id);
2096 end Is_Limited_Interface;
2098 function Is_Limited_Record (Id : E) return B is
2101 end Is_Limited_Record;
2103 function Is_Machine_Code_Subprogram (Id : E) return B is
2105 pragma Assert (Is_Subprogram (Id));
2106 return Flag137 (Id);
2107 end Is_Machine_Code_Subprogram;
2109 function Is_Non_Static_Subtype (Id : E) return B is
2111 pragma Assert (Is_Type (Id));
2112 return Flag109 (Id);
2113 end Is_Non_Static_Subtype;
2115 function Is_Null_Init_Proc (Id : E) return B is
2117 pragma Assert (Ekind (Id) = E_Procedure);
2118 return Flag178 (Id);
2119 end Is_Null_Init_Proc;
2121 function Is_Obsolescent (Id : E) return B is
2123 return Flag153 (Id);
2126 function Is_Only_Out_Parameter (Id : E) return B is
2128 pragma Assert (Is_Formal (Id));
2129 return Flag226 (Id);
2130 end Is_Only_Out_Parameter;
2132 function Is_Optional_Parameter (Id : E) return B is
2134 pragma Assert (Is_Formal (Id));
2135 return Flag134 (Id);
2136 end Is_Optional_Parameter;
2138 function Is_Package_Body_Entity (Id : E) return B is
2140 return Flag160 (Id);
2141 end Is_Package_Body_Entity;
2143 function Is_Packed (Id : E) return B is
2145 return Flag51 (Implementation_Base_Type (Id));
2148 function Is_Packed_Array_Type (Id : E) return B is
2150 return Flag138 (Id);
2151 end Is_Packed_Array_Type;
2153 function Is_Potentially_Use_Visible (Id : E) return B is
2155 pragma Assert (Nkind (Id) in N_Entity);
2157 end Is_Potentially_Use_Visible;
2159 function Is_Predicate_Function (Id : E) return B is
2161 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2162 return Flag255 (Id);
2163 end Is_Predicate_Function;
2165 function Is_Predicate_Function_M (Id : E) return B is
2167 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
2168 return Flag256 (Id);
2169 end Is_Predicate_Function_M;
2171 function Is_Preelaborated (Id : E) return B is
2174 end Is_Preelaborated;
2176 function Is_Primitive (Id : E) return B is
2179 (Is_Overloadable (Id)
2180 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
2181 return Flag218 (Id);
2184 function Is_Primitive_Wrapper (Id : E) return B is
2186 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2187 return Flag195 (Id);
2188 end Is_Primitive_Wrapper;
2190 function Is_Private_Composite (Id : E) return B is
2192 pragma Assert (Is_Type (Id));
2193 return Flag107 (Id);
2194 end Is_Private_Composite;
2196 function Is_Private_Descendant (Id : E) return B is
2199 end Is_Private_Descendant;
2201 function Is_Private_Primitive (Id : E) return B is
2203 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
2204 return Flag245 (Id);
2205 end Is_Private_Primitive;
2207 function Is_Processed_Transient (Id : E) return B is
2209 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2210 return Flag252 (Id);
2211 end Is_Processed_Transient;
2213 function Is_Public (Id : E) return B is
2215 pragma Assert (Nkind (Id) in N_Entity);
2219 function Is_Pure (Id : E) return B is
2224 function Is_Pure_Unit_Access_Type (Id : E) return B is
2226 pragma Assert (Is_Access_Type (Id));
2227 return Flag189 (Id);
2228 end Is_Pure_Unit_Access_Type;
2230 function Is_RACW_Stub_Type (Id : E) return B is
2232 pragma Assert (Is_Type (Id));
2233 return Flag244 (Id);
2234 end Is_RACW_Stub_Type;
2236 function Is_Raised (Id : E) return B is
2238 pragma Assert (Ekind (Id) = E_Exception);
2239 return Flag224 (Id);
2242 function Is_Remote_Call_Interface (Id : E) return B is
2245 end Is_Remote_Call_Interface;
2247 function Is_Remote_Types (Id : E) return B is
2250 end Is_Remote_Types;
2252 function Is_Renaming_Of_Object (Id : E) return B is
2254 return Flag112 (Id);
2255 end Is_Renaming_Of_Object;
2257 function Is_Return_Object (Id : E) return B is
2259 return Flag209 (Id);
2260 end Is_Return_Object;
2262 function Is_Safe_To_Reevaluate (Id : E) return B is
2264 return Flag249 (Id);
2265 end Is_Safe_To_Reevaluate;
2267 function Is_Shared_Passive (Id : E) return B is
2270 end Is_Shared_Passive;
2272 function Is_Statically_Allocated (Id : E) return B is
2275 end Is_Statically_Allocated;
2277 function Is_Tag (Id : E) return B is
2279 pragma Assert (Nkind (Id) in N_Entity);
2283 function Is_Tagged_Type (Id : E) return B is
2288 function Is_Thunk (Id : E) return B is
2290 return Flag225 (Id);
2293 function Is_Trivial_Subprogram (Id : E) return B is
2295 return Flag235 (Id);
2296 end Is_Trivial_Subprogram;
2298 function Is_True_Constant (Id : E) return B is
2300 return Flag163 (Id);
2301 end Is_True_Constant;
2303 function Is_Unchecked_Union (Id : E) return B is
2305 return Flag117 (Implementation_Base_Type (Id));
2306 end Is_Unchecked_Union;
2308 function Is_Underlying_Record_View (Id : E) return B is
2310 return Flag246 (Id);
2311 end Is_Underlying_Record_View;
2313 function Is_Unsigned_Type (Id : E) return B is
2315 pragma Assert (Is_Type (Id));
2316 return Flag144 (Id);
2317 end Is_Unsigned_Type;
2319 function Is_Valued_Procedure (Id : E) return B is
2321 pragma Assert (Ekind (Id) = E_Procedure);
2322 return Flag127 (Id);
2323 end Is_Valued_Procedure;
2325 function Is_Visible_Formal (Id : E) return B is
2327 return Flag206 (Id);
2328 end Is_Visible_Formal;
2330 function Is_Visible_Lib_Unit (Id : E) return B is
2332 return Flag116 (Id);
2333 end Is_Visible_Lib_Unit;
2335 function Is_VMS_Exception (Id : E) return B is
2337 return Flag133 (Id);
2338 end Is_VMS_Exception;
2340 function Is_Volatile (Id : E) return B is
2342 pragma Assert (Nkind (Id) in N_Entity);
2344 if Is_Type (Id) then
2345 return Flag16 (Base_Type (Id));
2351 function Itype_Printed (Id : E) return B is
2353 pragma Assert (Is_Itype (Id));
2354 return Flag202 (Id);
2357 function Kill_Elaboration_Checks (Id : E) return B is
2360 end Kill_Elaboration_Checks;
2362 function Kill_Range_Checks (Id : E) return B is
2365 end Kill_Range_Checks;
2367 function Known_To_Have_Preelab_Init (Id : E) return B is
2369 pragma Assert (Is_Type (Id));
2370 return Flag207 (Id);
2371 end Known_To_Have_Preelab_Init;
2373 function Last_Assignment (Id : E) return N is
2375 pragma Assert (Is_Assignable (Id));
2377 end Last_Assignment;
2379 function Last_Entity (Id : E) return E is
2384 function Limited_View (Id : E) return E is
2386 pragma Assert (Ekind (Id) = E_Package);
2390 function Lit_Indexes (Id : E) return E is
2392 pragma Assert (Is_Enumeration_Type (Id));
2396 function Lit_Strings (Id : E) return E is
2398 pragma Assert (Is_Enumeration_Type (Id));
2402 function Low_Bound_Tested (Id : E) return B is
2404 return Flag205 (Id);
2405 end Low_Bound_Tested;
2407 function Machine_Radix_10 (Id : E) return B is
2409 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
2411 end Machine_Radix_10;
2413 function Master_Id (Id : E) return E is
2415 pragma Assert (Is_Access_Type (Id));
2419 function Materialize_Entity (Id : E) return B is
2421 return Flag168 (Id);
2422 end Materialize_Entity;
2424 function May_Inherit_Delayed_Rep_Aspects (Id : E) return B is
2426 return Flag262 (Id);
2427 end May_Inherit_Delayed_Rep_Aspects;
2429 function Mechanism (Id : E) return M is
2431 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
2432 return UI_To_Int (Uint8 (Id));
2435 function Modulus (Id : E) return Uint is
2437 pragma Assert (Is_Modular_Integer_Type (Id));
2438 return Uint17 (Base_Type (Id));
2441 function Must_Be_On_Byte_Boundary (Id : E) return B is
2443 pragma Assert (Is_Type (Id));
2444 return Flag183 (Id);
2445 end Must_Be_On_Byte_Boundary;
2447 function Must_Have_Preelab_Init (Id : E) return B is
2449 pragma Assert (Is_Type (Id));
2450 return Flag208 (Id);
2451 end Must_Have_Preelab_Init;
2453 function Needs_Debug_Info (Id : E) return B is
2455 return Flag147 (Id);
2456 end Needs_Debug_Info;
2458 function Needs_No_Actuals (Id : E) return B is
2461 (Is_Overloadable (Id)
2462 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
2464 end Needs_No_Actuals;
2466 function Never_Set_In_Source (Id : E) return B is
2468 return Flag115 (Id);
2469 end Never_Set_In_Source;
2471 function Next_Inlined_Subprogram (Id : E) return E is
2474 end Next_Inlined_Subprogram;
2476 function No_Pool_Assigned (Id : E) return B is
2478 pragma Assert (Is_Access_Type (Id));
2479 return Flag131 (Root_Type (Id));
2480 end No_Pool_Assigned;
2482 function No_Return (Id : E) return B is
2484 return Flag113 (Id);
2487 function No_Strict_Aliasing (Id : E) return B is
2489 pragma Assert (Is_Access_Type (Id));
2490 return Flag136 (Base_Type (Id));
2491 end No_Strict_Aliasing;
2493 function Non_Binary_Modulus (Id : E) return B is
2495 pragma Assert (Is_Type (Id));
2496 return Flag58 (Base_Type (Id));
2497 end Non_Binary_Modulus;
2499 function Non_Limited_View (Id : E) return E is
2502 (Ekind (Id) in Incomplete_Kind or else Ekind (Id) = E_Abstract_State);
2504 end Non_Limited_View;
2506 function Nonzero_Is_True (Id : E) return B is
2508 pragma Assert (Root_Type (Id) = Standard_Boolean);
2509 return Flag162 (Base_Type (Id));
2510 end Nonzero_Is_True;
2512 function Normalized_First_Bit (Id : E) return U is
2514 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2516 end Normalized_First_Bit;
2518 function Normalized_Position (Id : E) return U is
2520 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2522 end Normalized_Position;
2524 function Normalized_Position_Max (Id : E) return U is
2526 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
2528 end Normalized_Position_Max;
2530 function OK_To_Rename (Id : E) return B is
2532 pragma Assert (Ekind (Id) = E_Variable);
2533 return Flag247 (Id);
2536 function OK_To_Reorder_Components (Id : E) return B is
2538 pragma Assert (Is_Record_Type (Id));
2539 return Flag239 (Base_Type (Id));
2540 end OK_To_Reorder_Components;
2542 function Optimize_Alignment_Space (Id : E) return B is
2545 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2546 return Flag241 (Id);
2547 end Optimize_Alignment_Space;
2549 function Optimize_Alignment_Time (Id : E) return B is
2552 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
2553 return Flag242 (Id);
2554 end Optimize_Alignment_Time;
2556 function Original_Access_Type (Id : E) return E is
2558 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
2560 end Original_Access_Type;
2562 function Original_Array_Type (Id : E) return E is
2564 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
2566 end Original_Array_Type;
2568 function Original_Record_Component (Id : E) return E is
2570 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
2572 end Original_Record_Component;
2574 function Overlays_Constant (Id : E) return B is
2576 return Flag243 (Id);
2577 end Overlays_Constant;
2579 function Overridden_Operation (Id : E) return E is
2582 end Overridden_Operation;
2584 function Package_Instantiation (Id : E) return N is
2586 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2588 end Package_Instantiation;
2590 function Packed_Array_Type (Id : E) return E is
2592 pragma Assert (Is_Array_Type (Id));
2594 end Packed_Array_Type;
2596 function Parent_Subtype (Id : E) return E is
2598 pragma Assert (Is_Record_Type (Id));
2599 return Node19 (Base_Type (Id));
2602 function Postcondition_Proc (Id : E) return E is
2604 pragma Assert (Ekind (Id) = E_Procedure);
2606 end Postcondition_Proc;
2608 function PPC_Wrapper (Id : E) return E is
2610 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
2614 function Prival (Id : E) return E is
2616 pragma Assert (Is_Protected_Component (Id));
2620 function Prival_Link (Id : E) return E is
2622 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2626 function Private_Dependents (Id : E) return L is
2628 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
2629 return Elist18 (Id);
2630 end Private_Dependents;
2632 function Private_View (Id : E) return N is
2634 pragma Assert (Is_Private_Type (Id));
2638 function Protected_Body_Subprogram (Id : E) return E is
2640 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
2642 end Protected_Body_Subprogram;
2644 function Protected_Formal (Id : E) return E is
2646 pragma Assert (Is_Formal (Id));
2648 end Protected_Formal;
2650 function Protection_Object (Id : E) return E is
2653 (Ekind_In (Id, E_Entry, E_Entry_Family, E_Function, E_Procedure));
2655 end Protection_Object;
2657 function Reachable (Id : E) return B is
2662 function Referenced (Id : E) return B is
2664 return Flag156 (Id);
2667 function Referenced_As_LHS (Id : E) return B is
2670 end Referenced_As_LHS;
2672 function Referenced_As_Out_Parameter (Id : E) return B is
2674 return Flag227 (Id);
2675 end Referenced_As_Out_Parameter;
2677 function Refined_State (Id : E) return N is
2679 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
2683 function Refinement_Constituents (Id : E) return L is
2685 pragma Assert (Ekind (Id) = E_Abstract_State);
2687 end Refinement_Constituents;
2689 function Register_Exception_Call (Id : E) return N is
2691 pragma Assert (Ekind (Id) = E_Exception);
2693 end Register_Exception_Call;
2695 function Related_Array_Object (Id : E) return E is
2697 pragma Assert (Is_Array_Type (Id));
2699 end Related_Array_Object;
2701 function Related_Expression (Id : E) return N is
2703 pragma Assert (Ekind (Id) in Type_Kind
2704 or else Ekind_In (Id, E_Constant, E_Variable));
2706 end Related_Expression;
2708 function Related_Instance (Id : E) return E is
2710 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
2712 end Related_Instance;
2714 function Related_Type (Id : E) return E is
2716 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
2720 function Relative_Deadline_Variable (Id : E) return E is
2722 pragma Assert (Is_Task_Type (Id));
2723 return Node26 (Implementation_Base_Type (Id));
2724 end Relative_Deadline_Variable;
2726 function Renamed_Entity (Id : E) return N is
2731 function Renamed_In_Spec (Id : E) return B is
2733 pragma Assert (Ekind (Id) = E_Package);
2734 return Flag231 (Id);
2735 end Renamed_In_Spec;
2737 function Renamed_Object (Id : E) return N is
2742 function Renaming_Map (Id : E) return U is
2747 function Requires_Overriding (Id : E) return B is
2749 pragma Assert (Is_Overloadable (Id));
2750 return Flag213 (Id);
2751 end Requires_Overriding;
2753 function Return_Present (Id : E) return B is
2758 function Return_Applies_To (Id : E) return N is
2761 end Return_Applies_To;
2763 function Returns_By_Ref (Id : E) return B is
2768 function Reverse_Bit_Order (Id : E) return B is
2770 pragma Assert (Is_Record_Type (Id));
2771 return Flag164 (Base_Type (Id));
2772 end Reverse_Bit_Order;
2774 function Reverse_Storage_Order (Id : E) return B is
2776 pragma Assert (Is_Record_Type (Id) or else Is_Array_Type (Id));
2777 return Flag93 (Base_Type (Id));
2778 end Reverse_Storage_Order;
2780 function RM_Size (Id : E) return U is
2782 pragma Assert (Is_Type (Id));
2786 function Scalar_Range (Id : E) return N is
2791 function Scale_Value (Id : E) return U is
2796 function Scope_Depth_Value (Id : E) return U is
2799 end Scope_Depth_Value;
2801 function Sec_Stack_Needed_For_Return (Id : E) return B is
2803 return Flag167 (Id);
2804 end Sec_Stack_Needed_For_Return;
2806 function Shadow_Entities (Id : E) return S is
2808 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
2810 end Shadow_Entities;
2812 function Shared_Var_Procs_Instance (Id : E) return E is
2814 pragma Assert (Ekind (Id) = E_Variable);
2816 end Shared_Var_Procs_Instance;
2818 function Size_Check_Code (Id : E) return N is
2820 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2822 end Size_Check_Code;
2824 function Size_Depends_On_Discriminant (Id : E) return B is
2826 return Flag177 (Id);
2827 end Size_Depends_On_Discriminant;
2829 function Size_Known_At_Compile_Time (Id : E) return B is
2832 end Size_Known_At_Compile_Time;
2834 function Small_Value (Id : E) return R is
2836 pragma Assert (Is_Fixed_Point_Type (Id));
2837 return Ureal21 (Id);
2840 function SPARK_Aux_Pragma (Id : E) return N is
2843 (Ekind_In (Id, E_Generic_Package, -- package variants
2847 end SPARK_Aux_Pragma;
2849 function SPARK_Aux_Pragma_Inherited (Id : E) return B is
2852 (Ekind_In (Id, E_Generic_Package, -- package variants
2855 return Flag266 (Id);
2856 end SPARK_Aux_Pragma_Inherited;
2858 function SPARK_Pragma (Id : E) return N is
2861 (Ekind_In (Id, E_Function, -- subprogram variants
2863 E_Generic_Procedure,
2867 Ekind_In (Id, E_Generic_Package, -- package variants
2873 function SPARK_Pragma_Inherited (Id : E) return B is
2876 (Ekind_In (Id, E_Function, -- subprogram variants
2878 E_Generic_Procedure,
2882 Ekind_In (Id, E_Generic_Package, -- package variants
2885 return Flag265 (Id);
2886 end SPARK_Pragma_Inherited;
2888 function Spec_Entity (Id : E) return E is
2890 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
2894 function Static_Predicate (Id : E) return S is
2896 pragma Assert (Is_Discrete_Type (Id));
2898 end Static_Predicate;
2900 function Status_Flag_Or_Transient_Decl (Id : E) return N is
2902 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
2904 end Status_Flag_Or_Transient_Decl;
2906 function Storage_Size_Variable (Id : E) return E is
2908 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
2909 return Node15 (Implementation_Base_Type (Id));
2910 end Storage_Size_Variable;
2912 function Static_Elaboration_Desired (Id : E) return B is
2914 pragma Assert (Ekind (Id) = E_Package);
2916 end Static_Elaboration_Desired;
2918 function Static_Initialization (Id : E) return N is
2921 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
2923 end Static_Initialization;
2925 function Stored_Constraint (Id : E) return L is
2928 (Is_Composite_Type (Id) and then not Is_Array_Type (Id));
2929 return Elist23 (Id);
2930 end Stored_Constraint;
2932 function Strict_Alignment (Id : E) return B is
2934 return Flag145 (Implementation_Base_Type (Id));
2935 end Strict_Alignment;
2937 function String_Literal_Length (Id : E) return U is
2940 end String_Literal_Length;
2942 function String_Literal_Low_Bound (Id : E) return N is
2945 end String_Literal_Low_Bound;
2947 function Subprograms_For_Type (Id : E) return E is
2949 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
2951 end Subprograms_For_Type;
2953 function Suppress_Elaboration_Warnings (Id : E) return B is
2955 return Flag148 (Id);
2956 end Suppress_Elaboration_Warnings;
2958 function Suppress_Initialization (Id : E) return B is
2960 pragma Assert (Is_Type (Id));
2961 return Flag105 (Id);
2962 end Suppress_Initialization;
2964 function Suppress_Style_Checks (Id : E) return B is
2966 return Flag165 (Id);
2967 end Suppress_Style_Checks;
2969 function Suppress_Value_Tracking_On_Call (Id : E) return B is
2971 return Flag217 (Id);
2972 end Suppress_Value_Tracking_On_Call;
2974 function Task_Body_Procedure (Id : E) return N is
2976 pragma Assert (Ekind (Id) in Task_Kind);
2978 end Task_Body_Procedure;
2980 function Thunk_Entity (Id : E) return E is
2982 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
2983 and then Is_Thunk (Id));
2987 function Treat_As_Volatile (Id : E) return B is
2990 end Treat_As_Volatile;
2992 function Underlying_Full_View (Id : E) return E is
2994 pragma Assert (Ekind (Id) in Private_Kind);
2996 end Underlying_Full_View;
2998 function Underlying_Record_View (Id : E) return E is
3001 end Underlying_Record_View;
3003 function Universal_Aliasing (Id : E) return B is
3005 pragma Assert (Is_Type (Id));
3006 return Flag216 (Implementation_Base_Type (Id));
3007 end Universal_Aliasing;
3009 function Unset_Reference (Id : E) return N is
3012 end Unset_Reference;
3014 function Used_As_Generic_Actual (Id : E) return B is
3016 return Flag222 (Id);
3017 end Used_As_Generic_Actual;
3019 function Uses_Lock_Free (Id : E) return B is
3021 pragma Assert (Is_Protected_Type (Id));
3022 return Flag188 (Id);
3025 function Uses_Sec_Stack (Id : E) return B is
3030 function Warnings_Off (Id : E) return B is
3035 function Warnings_Off_Used (Id : E) return B is
3037 return Flag236 (Id);
3038 end Warnings_Off_Used;
3040 function Warnings_Off_Used_Unmodified (Id : E) return B is
3042 return Flag237 (Id);
3043 end Warnings_Off_Used_Unmodified;
3045 function Warnings_Off_Used_Unreferenced (Id : E) return B is
3047 return Flag238 (Id);
3048 end Warnings_Off_Used_Unreferenced;
3050 function Wrapped_Entity (Id : E) return E is
3052 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
3053 and then Is_Primitive_Wrapper (Id));
3057 function Was_Hidden (Id : E) return B is
3059 return Flag196 (Id);
3062 ------------------------------
3063 -- Classification Functions --
3064 ------------------------------
3066 function Is_Access_Type (Id : E) return B is
3068 return Ekind (Id) in Access_Kind;
3071 function Is_Access_Protected_Subprogram_Type (Id : E) return B is
3073 return Ekind (Id) in Access_Protected_Kind;
3074 end Is_Access_Protected_Subprogram_Type;
3076 function Is_Access_Subprogram_Type (Id : E) return B is
3078 return Ekind (Id) in Access_Subprogram_Kind;
3079 end Is_Access_Subprogram_Type;
3081 function Is_Aggregate_Type (Id : E) return B is
3083 return Ekind (Id) in Aggregate_Kind;
3084 end Is_Aggregate_Type;
3086 function Is_Array_Type (Id : E) return B is
3088 return Ekind (Id) in Array_Kind;
3091 function Is_Assignable (Id : E) return B is
3093 return Ekind (Id) in Assignable_Kind;
3096 function Is_Class_Wide_Type (Id : E) return B is
3098 return Ekind (Id) in Class_Wide_Kind;
3099 end Is_Class_Wide_Type;
3101 function Is_Composite_Type (Id : E) return B is
3103 return Ekind (Id) in Composite_Kind;
3104 end Is_Composite_Type;
3106 function Is_Concurrent_Body (Id : E) return B is
3108 return Ekind (Id) in
3109 Concurrent_Body_Kind;
3110 end Is_Concurrent_Body;
3112 function Is_Concurrent_Record_Type (Id : E) return B is
3115 end Is_Concurrent_Record_Type;
3117 function Is_Concurrent_Type (Id : E) return B is
3119 return Ekind (Id) in Concurrent_Kind;
3120 end Is_Concurrent_Type;
3122 function Is_Decimal_Fixed_Point_Type (Id : E) return B is
3124 return Ekind (Id) in
3125 Decimal_Fixed_Point_Kind;
3126 end Is_Decimal_Fixed_Point_Type;
3128 function Is_Digits_Type (Id : E) return B is
3130 return Ekind (Id) in Digits_Kind;
3133 function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B is
3135 return Ekind (Id) in Discrete_Or_Fixed_Point_Kind;
3136 end Is_Discrete_Or_Fixed_Point_Type;
3138 function Is_Discrete_Type (Id : E) return B is
3140 return Ekind (Id) in Discrete_Kind;
3141 end Is_Discrete_Type;
3143 function Is_Elementary_Type (Id : E) return B is
3145 return Ekind (Id) in Elementary_Kind;
3146 end Is_Elementary_Type;
3148 function Is_Entry (Id : E) return B is
3150 return Ekind (Id) in Entry_Kind;
3153 function Is_Enumeration_Type (Id : E) return B is
3155 return Ekind (Id) in
3157 end Is_Enumeration_Type;
3159 function Is_Fixed_Point_Type (Id : E) return B is
3161 return Ekind (Id) in
3163 end Is_Fixed_Point_Type;
3165 function Is_Floating_Point_Type (Id : E) return B is
3167 return Ekind (Id) in Float_Kind;
3168 end Is_Floating_Point_Type;
3170 function Is_Formal (Id : E) return B is
3172 return Ekind (Id) in Formal_Kind;
3175 function Is_Formal_Object (Id : E) return B is
3177 return Ekind (Id) in Formal_Object_Kind;
3178 end Is_Formal_Object;
3180 function Is_Generic_Subprogram (Id : E) return B is
3182 return Ekind (Id) in Generic_Subprogram_Kind;
3183 end Is_Generic_Subprogram;
3185 function Is_Generic_Unit (Id : E) return B is
3187 return Ekind (Id) in Generic_Unit_Kind;
3188 end Is_Generic_Unit;
3190 function Is_Incomplete_Or_Private_Type (Id : E) return B is
3192 return Ekind (Id) in
3193 Incomplete_Or_Private_Kind;
3194 end Is_Incomplete_Or_Private_Type;
3196 function Is_Incomplete_Type (Id : E) return B is
3198 return Ekind (Id) in
3200 end Is_Incomplete_Type;
3202 function Is_Integer_Type (Id : E) return B is
3204 return Ekind (Id) in Integer_Kind;
3205 end Is_Integer_Type;
3207 function Is_Modular_Integer_Type (Id : E) return B is
3209 return Ekind (Id) in
3210 Modular_Integer_Kind;
3211 end Is_Modular_Integer_Type;
3213 function Is_Named_Number (Id : E) return B is
3215 return Ekind (Id) in Named_Kind;
3216 end Is_Named_Number;
3218 function Is_Numeric_Type (Id : E) return B is
3220 return Ekind (Id) in Numeric_Kind;
3221 end Is_Numeric_Type;
3223 function Is_Object (Id : E) return B is
3225 return Ekind (Id) in Object_Kind;
3228 function Is_Ordinary_Fixed_Point_Type (Id : E) return B is
3230 return Ekind (Id) in
3231 Ordinary_Fixed_Point_Kind;
3232 end Is_Ordinary_Fixed_Point_Type;
3234 function Is_Overloadable (Id : E) return B is
3236 return Ekind (Id) in Overloadable_Kind;
3237 end Is_Overloadable;
3239 function Is_Private_Type (Id : E) return B is
3241 return Ekind (Id) in Private_Kind;
3242 end Is_Private_Type;
3244 function Is_Protected_Type (Id : E) return B is
3246 return Ekind (Id) in Protected_Kind;
3247 end Is_Protected_Type;
3249 function Is_Real_Type (Id : E) return B is
3251 return Ekind (Id) in Real_Kind;
3254 function Is_Record_Type (Id : E) return B is
3256 return Ekind (Id) in Record_Kind;
3259 function Is_Scalar_Type (Id : E) return B is
3261 return Ekind (Id) in Scalar_Kind;
3264 function Is_Signed_Integer_Type (Id : E) return B is
3266 return Ekind (Id) in Signed_Integer_Kind;
3267 end Is_Signed_Integer_Type;
3269 function Is_Subprogram (Id : E) return B is
3271 return Ekind (Id) in Subprogram_Kind;
3274 function Is_Task_Type (Id : E) return B is
3276 return Ekind (Id) in Task_Kind;
3279 function Is_Type (Id : E) return B is
3281 return Ekind (Id) in Type_Kind;
3284 ------------------------------
3285 -- Attribute Set Procedures --
3286 ------------------------------
3288 -- Note: in many of these set procedures an "obvious" assertion is missing.
3289 -- The reason for this is that in many cases, a field is set before the
3290 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3291 -- it is possible to add assertions that specifically include the E_Void
3292 -- possibility, but in some cases, we just omit the assertions.
3294 procedure Set_Abstract_States (Id : E; V : L) is
3296 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
3297 Set_Elist25 (Id, V);
3298 end Set_Abstract_States;
3300 procedure Set_Accept_Address (Id : E; V : L) is
3302 Set_Elist21 (Id, V);
3303 end Set_Accept_Address;
3305 procedure Set_Access_Disp_Table (Id : E; V : L) is
3307 pragma Assert (Ekind (Id) = E_Record_Type
3308 and then Id = Implementation_Base_Type (Id));
3309 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3310 Set_Elist16 (Id, V);
3311 end Set_Access_Disp_Table;
3313 procedure Set_Associated_Formal_Package (Id : E; V : E) is
3316 end Set_Associated_Formal_Package;
3318 procedure Set_Associated_Node_For_Itype (Id : E; V : E) is
3321 end Set_Associated_Node_For_Itype;
3323 procedure Set_Associated_Storage_Pool (Id : E; V : E) is
3325 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3327 end Set_Associated_Storage_Pool;
3329 procedure Set_Actual_Subtype (Id : E; V : E) is
3332 (Ekind_In (Id, E_Constant, E_Variable, E_Generic_In_Out_Parameter)
3333 or else Is_Formal (Id));
3335 end Set_Actual_Subtype;
3337 procedure Set_Address_Taken (Id : E; V : B := True) is
3339 Set_Flag104 (Id, V);
3340 end Set_Address_Taken;
3342 procedure Set_Alias (Id : E; V : E) is
3345 (Is_Overloadable (Id) or else Ekind (Id) = E_Subprogram_Type);
3349 procedure Set_Alignment (Id : E; V : U) is
3351 pragma Assert (Is_Type (Id)
3352 or else Is_Formal (Id)
3353 or else Ekind_In (Id, E_Loop_Parameter,
3360 procedure Set_Barrier_Function (Id : E; V : N) is
3362 pragma Assert (Is_Entry (Id));
3364 end Set_Barrier_Function;
3366 procedure Set_Block_Node (Id : E; V : N) is
3368 pragma Assert (Ekind (Id) = E_Block);
3372 procedure Set_Body_Entity (Id : E; V : E) is
3374 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
3376 end Set_Body_Entity;
3378 procedure Set_Body_Needed_For_SAL (Id : E; V : B := True) is
3381 (Ekind (Id) = E_Package
3382 or else Is_Subprogram (Id)
3383 or else Is_Generic_Unit (Id));
3385 end Set_Body_Needed_For_SAL;
3387 procedure Set_Body_References (Id : E; V : L) is
3389 pragma Assert (Ekind (Id) = E_Abstract_State);
3390 Set_Elist16 (Id, V);
3391 end Set_Body_References;
3393 procedure Set_C_Pass_By_Copy (Id : E; V : B := True) is
3395 pragma Assert (Is_Record_Type (Id) and then Is_Base_Type (Id));
3396 Set_Flag125 (Id, V);
3397 end Set_C_Pass_By_Copy;
3399 procedure Set_Can_Never_Be_Null (Id : E; V : B := True) is
3402 end Set_Can_Never_Be_Null;
3404 procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True) is
3407 end Set_Checks_May_Be_Suppressed;
3409 procedure Set_Class_Wide_Type (Id : E; V : E) is
3411 pragma Assert (Is_Type (Id));
3413 end Set_Class_Wide_Type;
3415 procedure Set_Cloned_Subtype (Id : E; V : E) is
3417 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Class_Wide_Subtype));
3419 end Set_Cloned_Subtype;
3421 procedure Set_Component_Bit_Offset (Id : E; V : U) is
3423 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3425 end Set_Component_Bit_Offset;
3427 procedure Set_Component_Clause (Id : E; V : N) is
3429 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
3431 end Set_Component_Clause;
3433 procedure Set_Component_Size (Id : E; V : U) is
3435 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3437 end Set_Component_Size;
3439 procedure Set_Component_Type (Id : E; V : E) is
3441 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3443 end Set_Component_Type;
3445 procedure Set_Corresponding_Concurrent_Type (Id : E; V : E) is
3448 (Ekind (Id) = E_Record_Type and then Is_Concurrent_Type (V));
3450 end Set_Corresponding_Concurrent_Type;
3452 procedure Set_Corresponding_Discriminant (Id : E; V : E) is
3454 pragma Assert (Ekind (Id) = E_Discriminant);
3456 end Set_Corresponding_Discriminant;
3458 procedure Set_Corresponding_Equality (Id : E; V : E) is
3461 (Ekind (Id) = E_Function
3462 and then not Comes_From_Source (Id)
3463 and then Chars (Id) = Name_Op_Ne);
3465 end Set_Corresponding_Equality;
3467 procedure Set_Corresponding_Protected_Entry (Id : E; V : E) is
3469 pragma Assert (Ekind_In (Id, E_Void, E_Subprogram_Body));
3471 end Set_Corresponding_Protected_Entry;
3473 procedure Set_Corresponding_Record_Type (Id : E; V : E) is
3475 pragma Assert (Is_Concurrent_Type (Id));
3477 end Set_Corresponding_Record_Type;
3479 procedure Set_Corresponding_Remote_Type (Id : E; V : E) is
3482 end Set_Corresponding_Remote_Type;
3484 procedure Set_Current_Use_Clause (Id : E; V : E) is
3486 pragma Assert (Ekind (Id) = E_Package or else Is_Type (Id));
3488 end Set_Current_Use_Clause;
3490 procedure Set_Current_Value (Id : E; V : N) is
3492 pragma Assert (Ekind (Id) in Object_Kind or else Ekind (Id) = E_Void);
3494 end Set_Current_Value;
3496 procedure Set_CR_Discriminant (Id : E; V : E) is
3499 end Set_CR_Discriminant;
3501 procedure Set_Debug_Info_Off (Id : E; V : B := True) is
3503 Set_Flag166 (Id, V);
3504 end Set_Debug_Info_Off;
3506 procedure Set_Debug_Renaming_Link (Id : E; V : E) is
3509 end Set_Debug_Renaming_Link;
3511 procedure Set_Default_Aspect_Component_Value (Id : E; V : E) is
3513 pragma Assert (Is_Array_Type (Id) and then Is_Base_Type (Id));
3515 end Set_Default_Aspect_Component_Value;
3517 procedure Set_Default_Aspect_Value (Id : E; V : E) is
3519 pragma Assert (Is_Scalar_Type (Id) and then Is_Base_Type (Id));
3521 end Set_Default_Aspect_Value;
3523 procedure Set_Default_Expr_Function (Id : E; V : E) is
3525 pragma Assert (Is_Formal (Id));
3527 end Set_Default_Expr_Function;
3529 procedure Set_Default_Expressions_Processed (Id : E; V : B := True) is
3531 Set_Flag108 (Id, V);
3532 end Set_Default_Expressions_Processed;
3534 procedure Set_Default_Value (Id : E; V : N) is
3536 pragma Assert (Is_Formal (Id));
3538 end Set_Default_Value;
3540 procedure Set_Delay_Cleanups (Id : E; V : B := True) is
3544 or else Is_Task_Type (Id)
3545 or else Ekind (Id) = E_Block);
3546 Set_Flag114 (Id, V);
3547 end Set_Delay_Cleanups;
3549 procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True) is
3552 (Is_Subprogram (Id) or else Ekind_In (Id, E_Package, E_Package_Body));
3555 end Set_Delay_Subprogram_Descriptors;
3557 procedure Set_Delta_Value (Id : E; V : R) is
3559 pragma Assert (Is_Fixed_Point_Type (Id));
3560 Set_Ureal18 (Id, V);
3561 end Set_Delta_Value;
3563 procedure Set_Dependent_Instances (Id : E; V : L) is
3565 pragma Assert (Is_Generic_Instance (Id));
3567 end Set_Dependent_Instances;
3569 procedure Set_Depends_On_Private (Id : E; V : B := True) is
3571 pragma Assert (Nkind (Id) in N_Entity);
3573 end Set_Depends_On_Private;
3575 procedure Set_Digits_Value (Id : E; V : U) is
3578 (Is_Floating_Point_Type (Id)
3579 or else Is_Decimal_Fixed_Point_Type (Id));
3581 end Set_Digits_Value;
3583 procedure Set_Directly_Designated_Type (Id : E; V : E) is
3586 end Set_Directly_Designated_Type;
3588 procedure Set_Discard_Names (Id : E; V : B := True) is
3591 end Set_Discard_Names;
3593 procedure Set_Discriminal (Id : E; V : E) is
3595 pragma Assert (Ekind (Id) = E_Discriminant);
3597 end Set_Discriminal;
3599 procedure Set_Discriminal_Link (Id : E; V : E) is
3602 end Set_Discriminal_Link;
3604 procedure Set_Discriminant_Checking_Func (Id : E; V : E) is
3606 pragma Assert (Ekind (Id) = E_Component);
3608 end Set_Discriminant_Checking_Func;
3610 procedure Set_Discriminant_Constraint (Id : E; V : L) is
3612 pragma Assert (Nkind (Id) in N_Entity);
3613 Set_Elist21 (Id, V);
3614 end Set_Discriminant_Constraint;
3616 procedure Set_Discriminant_Default_Value (Id : E; V : N) is
3619 end Set_Discriminant_Default_Value;
3621 procedure Set_Discriminant_Number (Id : E; V : U) is
3624 end Set_Discriminant_Number;
3626 procedure Set_Dispatch_Table_Wrappers (Id : E; V : L) is
3628 pragma Assert (Ekind (Id) = E_Record_Type
3629 and then Id = Implementation_Base_Type (Id));
3630 pragma Assert (V = No_Elist or else Is_Tagged_Type (Id));
3631 Set_Elist26 (Id, V);
3632 end Set_Dispatch_Table_Wrappers;
3634 procedure Set_DT_Entry_Count (Id : E; V : U) is
3636 pragma Assert (Ekind (Id) = E_Component);
3638 end Set_DT_Entry_Count;
3640 procedure Set_DT_Offset_To_Top_Func (Id : E; V : E) is
3642 pragma Assert (Ekind (Id) = E_Component and then Is_Tag (Id));
3644 end Set_DT_Offset_To_Top_Func;
3646 procedure Set_DT_Position (Id : E; V : U) is
3648 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3650 end Set_DT_Position;
3652 procedure Set_DTC_Entity (Id : E; V : E) is
3654 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3658 procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True) is
3660 pragma Assert (Ekind (Id) = E_Package);
3661 Set_Flag210 (Id, V);
3662 end Set_Elaborate_Body_Desirable;
3664 procedure Set_Elaboration_Entity (Id : E; V : E) is
3669 Ekind (Id) = E_Package
3671 Is_Generic_Unit (Id));
3673 end Set_Elaboration_Entity;
3675 procedure Set_Elaboration_Entity_Required (Id : E; V : B := True) is
3680 Ekind (Id) = E_Package
3682 Is_Generic_Unit (Id));
3683 Set_Flag174 (Id, V);
3684 end Set_Elaboration_Entity_Required;
3686 procedure Set_Enclosing_Scope (Id : E; V : E) is
3689 end Set_Enclosing_Scope;
3691 procedure Set_Entry_Accepted (Id : E; V : B := True) is
3693 pragma Assert (Is_Entry (Id));
3694 Set_Flag152 (Id, V);
3695 end Set_Entry_Accepted;
3697 procedure Set_Entry_Bodies_Array (Id : E; V : E) is
3700 end Set_Entry_Bodies_Array;
3702 procedure Set_Entry_Cancel_Parameter (Id : E; V : E) is
3705 end Set_Entry_Cancel_Parameter;
3707 procedure Set_Entry_Component (Id : E; V : E) is
3710 end Set_Entry_Component;
3712 procedure Set_Entry_Formal (Id : E; V : E) is
3715 end Set_Entry_Formal;
3717 procedure Set_Entry_Index_Constant (Id : E; V : E) is
3719 pragma Assert (Ekind (Id) = E_Entry_Index_Parameter);
3721 end Set_Entry_Index_Constant;
3723 procedure Set_Contract (Id : E; V : N) is
3726 (Ekind_In (Id, E_Entry,
3734 or else Is_Generic_Subprogram (Id)
3735 or else Is_Subprogram (Id));
3739 procedure Set_Entry_Parameters_Type (Id : E; V : E) is
3742 end Set_Entry_Parameters_Type;
3744 procedure Set_Enum_Pos_To_Rep (Id : E; V : E) is
3746 pragma Assert (Ekind (Id) = E_Enumeration_Type);
3748 end Set_Enum_Pos_To_Rep;
3750 procedure Set_Enumeration_Pos (Id : E; V : U) is
3752 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3754 end Set_Enumeration_Pos;
3756 procedure Set_Enumeration_Rep (Id : E; V : U) is
3758 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3760 end Set_Enumeration_Rep;
3762 procedure Set_Enumeration_Rep_Expr (Id : E; V : N) is
3764 pragma Assert (Ekind (Id) = E_Enumeration_Literal);
3766 end Set_Enumeration_Rep_Expr;
3768 procedure Set_Equivalent_Type (Id : E; V : E) is
3771 (Ekind_In (Id, E_Class_Wide_Type,
3772 E_Class_Wide_Subtype,
3773 E_Access_Protected_Subprogram_Type,
3774 E_Anonymous_Access_Protected_Subprogram_Type,
3775 E_Access_Subprogram_Type,
3778 end Set_Equivalent_Type;
3780 procedure Set_Esize (Id : E; V : U) is
3785 procedure Set_Exception_Code (Id : E; V : U) is
3787 pragma Assert (Ekind (Id) = E_Exception);
3789 end Set_Exception_Code;
3791 procedure Set_Extra_Accessibility (Id : E; V : E) is
3794 (Is_Formal (Id) or else Ekind_In (Id, E_Variable, E_Constant));
3796 end Set_Extra_Accessibility;
3798 procedure Set_Extra_Accessibility_Of_Result (Id : E; V : E) is
3800 pragma Assert (Ekind_In (Id, E_Function, E_Operator, E_Subprogram_Type));
3802 end Set_Extra_Accessibility_Of_Result;
3804 procedure Set_Extra_Constrained (Id : E; V : E) is
3806 pragma Assert (Is_Formal (Id) or else Ekind (Id) = E_Variable);
3808 end Set_Extra_Constrained;
3810 procedure Set_Extra_Formal (Id : E; V : E) is
3813 end Set_Extra_Formal;
3815 procedure Set_Extra_Formals (Id : E; V : E) is
3818 (Is_Overloadable (Id)
3819 or else Ekind_In (Id, E_Entry_Family,
3821 E_Subprogram_Type));
3823 end Set_Extra_Formals;
3825 procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True) is
3828 (Is_Access_Subprogram_Type (Id) and then Is_Base_Type (Id));
3829 Set_Flag229 (Id, V);
3830 end Set_Can_Use_Internal_Rep;
3832 procedure Set_Finalization_Master (Id : E; V : E) is
3834 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
3836 end Set_Finalization_Master;
3838 procedure Set_Finalize_Storage_Only (Id : E; V : B := True) is
3840 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
3841 Set_Flag158 (Id, V);
3842 end Set_Finalize_Storage_Only;
3844 procedure Set_Finalizer (Id : E; V : E) is
3846 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
3850 procedure Set_First_Entity (Id : E; V : E) is
3853 end Set_First_Entity;
3855 procedure Set_First_Exit_Statement (Id : E; V : N) is
3857 pragma Assert (Ekind (Id) = E_Loop);
3859 end Set_First_Exit_Statement;
3861 procedure Set_First_Index (Id : E; V : N) is
3863 pragma Assert (Is_Array_Type (Id) or else Is_String_Type (Id));
3865 end Set_First_Index;
3867 procedure Set_First_Literal (Id : E; V : E) is
3869 pragma Assert (Is_Enumeration_Type (Id));
3871 end Set_First_Literal;
3873 procedure Set_First_Optional_Parameter (Id : E; V : E) is
3875 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
3877 end Set_First_Optional_Parameter;
3879 procedure Set_First_Private_Entity (Id : E; V : E) is
3881 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package)
3882 or else Ekind (Id) in Concurrent_Kind);
3884 end Set_First_Private_Entity;
3886 procedure Set_First_Rep_Item (Id : E; V : N) is
3889 end Set_First_Rep_Item;
3891 procedure Set_Float_Rep (Id : E; V : F) is
3892 pragma Assert (Ekind (Id) = E_Floating_Point_Type);
3894 Set_Uint10 (Id, UI_From_Int (F'Pos (V)));
3897 procedure Set_Freeze_Node (Id : E; V : N) is
3900 end Set_Freeze_Node;
3902 procedure Set_From_Limited_With (Id : E; V : B := True) is
3905 (Is_Type (Id) or else Ekind_In (Id, E_Abstract_State, E_Package));
3906 Set_Flag159 (Id, V);
3907 end Set_From_Limited_With;
3909 procedure Set_Full_View (Id : E; V : E) is
3911 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Constant);
3915 procedure Set_Generic_Homonym (Id : E; V : E) is
3918 end Set_Generic_Homonym;
3920 procedure Set_Generic_Renamings (Id : E; V : L) is
3922 Set_Elist23 (Id, V);
3923 end Set_Generic_Renamings;
3925 procedure Set_Handler_Records (Id : E; V : S) is
3928 end Set_Handler_Records;
3930 procedure Set_Has_Aliased_Components (Id : E; V : B := True) is
3932 pragma Assert (Id = Base_Type (Id));
3933 Set_Flag135 (Id, V);
3934 end Set_Has_Aliased_Components;
3936 procedure Set_Has_Alignment_Clause (Id : E; V : B := True) is
3939 end Set_Has_Alignment_Clause;
3941 procedure Set_Has_All_Calls_Remote (Id : E; V : B := True) is
3944 end Set_Has_All_Calls_Remote;
3946 procedure Set_Has_Anonymous_Master (Id : E; V : B := True) is
3949 (Ekind_In (Id, E_Function, E_Package, E_Package_Body, E_Procedure));
3950 Set_Flag253 (Id, V);
3951 end Set_Has_Anonymous_Master;
3953 procedure Set_Has_Atomic_Components (Id : E; V : B := True) is
3955 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
3957 end Set_Has_Atomic_Components;
3959 procedure Set_Has_Biased_Representation (Id : E; V : B := True) is
3962 ((V = False) or else (Is_Discrete_Type (Id) or else Is_Object (Id)));
3963 Set_Flag139 (Id, V);
3964 end Set_Has_Biased_Representation;
3966 procedure Set_Has_Body_References (Id : E; V : B := True) is
3968 pragma Assert (Ekind (Id) = E_Abstract_State);
3969 Set_Flag264 (Id, V);
3970 end Set_Has_Body_References;
3972 procedure Set_Has_Completion (Id : E; V : B := True) is
3975 end Set_Has_Completion;
3977 procedure Set_Has_Completion_In_Body (Id : E; V : B := True) is
3979 pragma Assert (Is_Type (Id));
3981 end Set_Has_Completion_In_Body;
3983 procedure Set_Has_Complex_Representation (Id : E; V : B := True) is
3985 pragma Assert (Ekind (Id) = E_Record_Type);
3986 Set_Flag140 (Id, V);
3987 end Set_Has_Complex_Representation;
3989 procedure Set_Has_Component_Size_Clause (Id : E; V : B := True) is
3991 pragma Assert (Ekind (Id) = E_Array_Type);
3993 end Set_Has_Component_Size_Clause;
3995 procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True) is
3997 pragma Assert (Is_Type (Id));
3998 Set_Flag187 (Id, V);
3999 end Set_Has_Constrained_Partial_View;
4001 procedure Set_Has_Contiguous_Rep (Id : E; V : B := True) is
4003 Set_Flag181 (Id, V);
4004 end Set_Has_Contiguous_Rep;
4006 procedure Set_Has_Controlled_Component (Id : E; V : B := True) is
4008 pragma Assert (Id = Base_Type (Id));
4010 end Set_Has_Controlled_Component;
4012 procedure Set_Has_Controlling_Result (Id : E; V : B := True) is
4015 end Set_Has_Controlling_Result;
4017 procedure Set_Has_Convention_Pragma (Id : E; V : B := True) is
4019 Set_Flag119 (Id, V);
4020 end Set_Has_Convention_Pragma;
4022 procedure Set_Has_Default_Aspect (Id : E; V : B := True) is
4025 ((Is_Scalar_Type (Id) or else Is_Array_Type (Id))
4026 and then Is_Base_Type (Id));
4028 end Set_Has_Default_Aspect;
4030 procedure Set_Has_Delayed_Aspects (Id : E; V : B := True) is
4032 pragma Assert (Nkind (Id) in N_Entity);
4033 Set_Flag200 (Id, V);
4034 end Set_Has_Delayed_Aspects;
4036 procedure Set_Has_Delayed_Freeze (Id : E; V : B := True) is
4038 pragma Assert (Nkind (Id) in N_Entity);
4040 end Set_Has_Delayed_Freeze;
4042 procedure Set_Has_Delayed_Rep_Aspects (Id : E; V : B := True) is
4044 pragma Assert (Nkind (Id) in N_Entity);
4045 Set_Flag261 (Id, V);
4046 end Set_Has_Delayed_Rep_Aspects;
4048 procedure Set_Has_Discriminants (Id : E; V : B := True) is
4050 pragma Assert (Nkind (Id) in N_Entity);
4052 end Set_Has_Discriminants;
4054 procedure Set_Has_Dispatch_Table (Id : E; V : B := True) is
4056 pragma Assert (Ekind (Id) = E_Record_Type
4057 and then Is_Tagged_Type (Id));
4058 Set_Flag220 (Id, V);
4059 end Set_Has_Dispatch_Table;
4061 procedure Set_Has_Dynamic_Predicate_Aspect (Id : E; V : B := True) is
4063 pragma Assert (Is_Type (Id));
4064 Set_Flag258 (Id, V);
4065 end Set_Has_Dynamic_Predicate_Aspect;
4067 procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True) is
4069 pragma Assert (Is_Enumeration_Type (Id));
4071 end Set_Has_Enumeration_Rep_Clause;
4073 procedure Set_Has_Exit (Id : E; V : B := True) is
4078 procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True) is
4080 pragma Assert (Is_Tagged_Type (Id));
4081 Set_Flag110 (Id, V);
4082 end Set_Has_External_Tag_Rep_Clause;
4084 procedure Set_Has_Forward_Instantiation (Id : E; V : B := True) is
4086 Set_Flag175 (Id, V);
4087 end Set_Has_Forward_Instantiation;
4089 procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True) is
4091 Set_Flag173 (Id, V);
4092 end Set_Has_Fully_Qualified_Name;
4094 procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True) is
4097 end Set_Has_Gigi_Rep_Item;
4099 procedure Set_Has_Homonym (Id : E; V : B := True) is
4102 end Set_Has_Homonym;
4104 procedure Set_Has_Implicit_Dereference (Id : E; V : B := True) is
4106 Set_Flag251 (Id, V);
4107 end Set_Has_Implicit_Dereference;
4109 procedure Set_Has_Independent_Components (Id : E; V : B := True) is
4111 pragma Assert (Is_Object (Id) or else Is_Type (Id));
4113 end Set_Has_Independent_Components;
4115 procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True) is
4117 pragma Assert (Is_Type (Id));
4118 Set_Flag248 (Id, V);
4119 end Set_Has_Inheritable_Invariants;
4121 procedure Set_Has_Initial_Value (Id : E; V : B := True) is
4123 pragma Assert (Ekind_In (Id, E_Variable, E_Out_Parameter));
4124 Set_Flag219 (Id, V);
4125 end Set_Has_Initial_Value;
4127 procedure Set_Has_Invariants (Id : E; V : B := True) is
4129 pragma Assert (Is_Type (Id));
4130 Set_Flag232 (Id, V);
4131 end Set_Has_Invariants;
4133 procedure Set_Has_Loop_Entry_Attributes (Id : E; V : B := True) is
4135 pragma Assert (Ekind (Id) = E_Loop);
4136 Set_Flag260 (Id, V);
4137 end Set_Has_Loop_Entry_Attributes;
4139 procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True) is
4141 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
4143 end Set_Has_Machine_Radix_Clause;
4145 procedure Set_Has_Master_Entity (Id : E; V : B := True) is
4148 end Set_Has_Master_Entity;
4150 procedure Set_Has_Missing_Return (Id : E; V : B := True) is
4152 pragma Assert (Ekind_In (Id, E_Function, E_Generic_Function));
4153 Set_Flag142 (Id, V);
4154 end Set_Has_Missing_Return;
4156 procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True) is
4158 Set_Flag101 (Id, V);
4159 end Set_Has_Nested_Block_With_Handler;
4161 procedure Set_Has_Up_Level_Access (Id : E; V : B := True) is
4163 pragma Assert (Ekind_In (Id, E_Variable, E_Constant, E_Loop_Parameter));
4164 Set_Flag215 (Id, V);
4165 end Set_Has_Up_Level_Access;
4167 procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True) is
4169 pragma Assert (Id = Base_Type (Id));
4171 end Set_Has_Non_Standard_Rep;
4173 procedure Set_Has_Object_Size_Clause (Id : E; V : B := True) is
4175 pragma Assert (Is_Type (Id));
4176 Set_Flag172 (Id, V);
4177 end Set_Has_Object_Size_Clause;
4179 procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True) is
4181 Set_Flag154 (Id, V);
4182 end Set_Has_Per_Object_Constraint;
4184 procedure Set_Has_Postconditions (Id : E; V : B := True) is
4186 pragma Assert (Is_Subprogram (Id));
4187 Set_Flag240 (Id, V);
4188 end Set_Has_Postconditions;
4190 procedure Set_Has_Pragma_Controlled (Id : E; V : B := True) is
4192 pragma Assert (Is_Access_Type (Id));
4193 Set_Flag27 (Base_Type (Id), V);
4194 end Set_Has_Pragma_Controlled;
4196 procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True) is
4198 Set_Flag150 (Id, V);
4199 end Set_Has_Pragma_Elaborate_Body;
4201 procedure Set_Has_Pragma_Inline (Id : E; V : B := True) is
4203 Set_Flag157 (Id, V);
4204 end Set_Has_Pragma_Inline;
4206 procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True) is
4208 Set_Flag230 (Id, V);
4209 end Set_Has_Pragma_Inline_Always;
4211 procedure Set_Has_Pragma_No_Inline (Id : E; V : B := True) is
4213 Set_Flag201 (Id, V);
4214 end Set_Has_Pragma_No_Inline;
4216 procedure Set_Has_Pragma_Ordered (Id : E; V : B := True) is
4218 pragma Assert (Is_Enumeration_Type (Id));
4219 pragma Assert (Id = Base_Type (Id));
4220 Set_Flag198 (Id, V);
4221 end Set_Has_Pragma_Ordered;
4223 procedure Set_Has_Pragma_Pack (Id : E; V : B := True) is
4225 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
4226 pragma Assert (Id = Base_Type (Id));
4227 Set_Flag121 (Id, V);
4228 end Set_Has_Pragma_Pack;
4230 procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True) is
4232 Set_Flag221 (Id, V);
4233 end Set_Has_Pragma_Preelab_Init;
4235 procedure Set_Has_Pragma_Pure (Id : E; V : B := True) is
4237 Set_Flag203 (Id, V);
4238 end Set_Has_Pragma_Pure;
4240 procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True) is
4242 Set_Flag179 (Id, V);
4243 end Set_Has_Pragma_Pure_Function;
4245 procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True) is
4247 Set_Flag169 (Id, V);
4248 end Set_Has_Pragma_Thread_Local_Storage;
4250 procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True) is
4252 Set_Flag233 (Id, V);
4253 end Set_Has_Pragma_Unmodified;
4255 procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True) is
4257 Set_Flag180 (Id, V);
4258 end Set_Has_Pragma_Unreferenced;
4260 procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True) is
4262 pragma Assert (Is_Type (Id));
4263 Set_Flag212 (Id, V);
4264 end Set_Has_Pragma_Unreferenced_Objects;
4266 procedure Set_Has_Predicates (Id : E; V : B := True) is
4268 pragma Assert (Is_Type (Id) or else Ekind (Id) = E_Void);
4269 Set_Flag250 (Id, V);
4270 end Set_Has_Predicates;
4272 procedure Set_Has_Primitive_Operations (Id : E; V : B := True) is
4274 pragma Assert (Id = Base_Type (Id));
4275 Set_Flag120 (Id, V);
4276 end Set_Has_Primitive_Operations;
4278 procedure Set_Has_Private_Ancestor (Id : E; V : B := True) is
4280 pragma Assert (Is_Type (Id));
4281 Set_Flag151 (Id, V);
4282 end Set_Has_Private_Ancestor;
4284 procedure Set_Has_Private_Declaration (Id : E; V : B := True) is
4286 Set_Flag155 (Id, V);
4287 end Set_Has_Private_Declaration;
4289 procedure Set_Has_Qualified_Name (Id : E; V : B := True) is
4291 Set_Flag161 (Id, V);
4292 end Set_Has_Qualified_Name;
4294 procedure Set_Has_RACW (Id : E; V : B := True) is
4296 pragma Assert (Ekind (Id) = E_Package);
4297 Set_Flag214 (Id, V);
4300 procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True) is
4302 pragma Assert (Id = Base_Type (Id));
4304 end Set_Has_Record_Rep_Clause;
4306 procedure Set_Has_Recursive_Call (Id : E; V : B := True) is
4308 pragma Assert (Is_Subprogram (Id));
4309 Set_Flag143 (Id, V);
4310 end Set_Has_Recursive_Call;
4312 procedure Set_Has_Size_Clause (Id : E; V : B := True) is
4315 end Set_Has_Size_Clause;
4317 procedure Set_Has_Small_Clause (Id : E; V : B := True) is
4320 end Set_Has_Small_Clause;
4322 procedure Set_Has_Specified_Layout (Id : E; V : B := True) is
4324 pragma Assert (Id = Base_Type (Id));
4325 Set_Flag100 (Id, V);
4326 end Set_Has_Specified_Layout;
4328 procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True) is
4330 pragma Assert (Is_Type (Id));
4331 Set_Flag190 (Id, V);
4332 end Set_Has_Specified_Stream_Input;
4334 procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True) is
4336 pragma Assert (Is_Type (Id));
4337 Set_Flag191 (Id, V);
4338 end Set_Has_Specified_Stream_Output;
4340 procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True) is
4342 pragma Assert (Is_Type (Id));
4343 Set_Flag192 (Id, V);
4344 end Set_Has_Specified_Stream_Read;
4346 procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True) is
4348 pragma Assert (Is_Type (Id));
4349 Set_Flag193 (Id, V);
4350 end Set_Has_Specified_Stream_Write;
4352 procedure Set_Has_Static_Discriminants (Id : E; V : B := True) is
4354 Set_Flag211 (Id, V);
4355 end Set_Has_Static_Discriminants;
4357 procedure Set_Has_Static_Predicate_Aspect (Id : E; V : B := True) is
4359 pragma Assert (Is_Type (Id));
4360 Set_Flag259 (Id, V);
4361 end Set_Has_Static_Predicate_Aspect;
4363 procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True) is
4365 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
4366 pragma Assert (Id = Base_Type (Id));
4368 end Set_Has_Storage_Size_Clause;
4370 procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True) is
4372 pragma Assert (Is_Elementary_Type (Id));
4373 Set_Flag184 (Id, V);
4374 end Set_Has_Stream_Size_Clause;
4376 procedure Set_Has_Task (Id : E; V : B := True) is
4378 pragma Assert (Id = Base_Type (Id));
4382 procedure Set_Has_Thunks (Id : E; V : B := True) is
4384 pragma Assert (Is_Tag (Id));
4385 Set_Flag228 (Id, V);
4388 procedure Set_Has_Unchecked_Union (Id : E; V : B := True) is
4390 pragma Assert (Id = Base_Type (Id));
4391 Set_Flag123 (Id, V);
4392 end Set_Has_Unchecked_Union;
4394 procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True) is
4396 pragma Assert (Is_Type (Id));
4398 end Set_Has_Unknown_Discriminants;
4400 procedure Set_Has_Visible_Refinement (Id : E; V : B := True) is
4402 pragma Assert (Ekind (Id) = E_Abstract_State);
4403 Set_Flag263 (Id, V);
4404 end Set_Has_Visible_Refinement;
4406 procedure Set_Has_Volatile_Components (Id : E; V : B := True) is
4408 pragma Assert (not Is_Type (Id) or else Is_Base_Type (Id));
4410 end Set_Has_Volatile_Components;
4412 procedure Set_Has_Xref_Entry (Id : E; V : B := True) is
4414 Set_Flag182 (Id, V);
4415 end Set_Has_Xref_Entry;
4417 procedure Set_Hiding_Loop_Variable (Id : E; V : E) is
4419 pragma Assert (Ekind (Id) = E_Variable);
4421 end Set_Hiding_Loop_Variable;
4423 procedure Set_Homonym (Id : E; V : E) is
4425 pragma Assert (Id /= V);
4429 procedure Set_Interface_Alias (Id : E; V : E) is
4433 and then Is_Hidden (Id)
4434 and then (Ekind_In (Id, E_Procedure, E_Function)));
4436 end Set_Interface_Alias;
4438 procedure Set_Interfaces (Id : E; V : L) is
4440 pragma Assert (Is_Record_Type (Id));
4441 Set_Elist25 (Id, V);
4444 procedure Set_In_Package_Body (Id : E; V : B := True) is
4447 end Set_In_Package_Body;
4449 procedure Set_In_Private_Part (Id : E; V : B := True) is
4452 end Set_In_Private_Part;
4454 procedure Set_In_Use (Id : E; V : B := True) is
4456 pragma Assert (Nkind (Id) in N_Entity);
4460 procedure Set_Initialization_Statements (Id : E; V : N) is
4462 -- Tolerate an E_Void entity since this can be called while resolving
4463 -- an aggregate used as the initialization expression for an object
4464 -- declaration, and this occurs before the Ekind for the object is set.
4466 pragma Assert (Ekind_In (Id, E_Void, E_Constant, E_Variable));
4468 end Set_Initialization_Statements;
4470 procedure Set_Inner_Instances (Id : E; V : L) is
4472 Set_Elist23 (Id, V);
4473 end Set_Inner_Instances;
4475 procedure Set_Interface_Name (Id : E; V : N) is
4478 end Set_Interface_Name;
4480 procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True) is
4482 pragma Assert (Is_Overloadable (Id));
4484 end Set_Is_Abstract_Subprogram;
4486 procedure Set_Is_Abstract_Type (Id : E; V : B := True) is
4488 pragma Assert (Is_Type (Id));
4489 Set_Flag146 (Id, V);
4490 end Set_Is_Abstract_Type;
4492 procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True) is
4494 pragma Assert (Is_Access_Type (Id));
4495 Set_Flag194 (Id, V);
4496 end Set_Is_Local_Anonymous_Access;
4498 procedure Set_Is_Access_Constant (Id : E; V : B := True) is
4500 pragma Assert (Is_Access_Type (Id));
4502 end Set_Is_Access_Constant;
4504 procedure Set_Is_Ada_2005_Only (Id : E; V : B := True) is
4506 Set_Flag185 (Id, V);
4507 end Set_Is_Ada_2005_Only;
4509 procedure Set_Is_Ada_2012_Only (Id : E; V : B := True) is
4511 Set_Flag199 (Id, V);
4512 end Set_Is_Ada_2012_Only;
4514 procedure Set_Is_Aliased (Id : E; V : B := True) is
4516 pragma Assert (Nkind (Id) in N_Entity);
4520 procedure Set_Is_AST_Entry (Id : E; V : B := True) is
4522 pragma Assert (Is_Entry (Id));
4523 Set_Flag132 (Id, V);
4524 end Set_Is_AST_Entry;
4526 procedure Set_Is_Asynchronous (Id : E; V : B := True) is
4529 (Ekind (Id) = E_Procedure or else Is_Type (Id));
4531 end Set_Is_Asynchronous;
4533 procedure Set_Is_Atomic (Id : E; V : B := True) is
4538 procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True) is
4540 pragma Assert ((not V)
4541 or else (Is_Array_Type (Id) and then Is_Base_Type (Id)));
4542 Set_Flag122 (Id, V);
4543 end Set_Is_Bit_Packed_Array;
4545 procedure Set_Is_Called (Id : E; V : B := True) is
4547 pragma Assert (Ekind_In (Id, E_Procedure, E_Function));
4548 Set_Flag102 (Id, V);
4551 procedure Set_Is_Character_Type (Id : E; V : B := True) is
4554 end Set_Is_Character_Type;
4556 procedure Set_Is_Child_Unit (Id : E; V : B := True) is
4559 end Set_Is_Child_Unit;
4561 procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True) is
4564 end Set_Is_Class_Wide_Equivalent_Type;
4566 procedure Set_Is_Compilation_Unit (Id : E; V : B := True) is
4568 Set_Flag149 (Id, V);
4569 end Set_Is_Compilation_Unit;
4571 procedure Set_Is_Completely_Hidden (Id : E; V : B := True) is
4573 pragma Assert (Ekind (Id) = E_Discriminant);
4574 Set_Flag103 (Id, V);
4575 end Set_Is_Completely_Hidden;
4577 procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True) is
4580 end Set_Is_Concurrent_Record_Type;
4582 procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True) is
4585 end Set_Is_Constr_Subt_For_U_Nominal;
4587 procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True) is
4589 Set_Flag141 (Id, V);
4590 end Set_Is_Constr_Subt_For_UN_Aliased;
4592 procedure Set_Is_Constrained (Id : E; V : B := True) is
4594 pragma Assert (Nkind (Id) in N_Entity);
4596 end Set_Is_Constrained;
4598 procedure Set_Is_Constructor (Id : E; V : B := True) is
4601 end Set_Is_Constructor;
4603 procedure Set_Is_Controlled (Id : E; V : B := True) is
4605 pragma Assert (Id = Base_Type (Id));
4607 end Set_Is_Controlled;
4609 procedure Set_Is_Controlling_Formal (Id : E; V : B := True) is
4611 pragma Assert (Is_Formal (Id));
4613 end Set_Is_Controlling_Formal;
4615 procedure Set_Is_CPP_Class (Id : E; V : B := True) is
4618 end Set_Is_CPP_Class;
4620 procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True) is
4622 pragma Assert (Is_Type (Id));
4623 Set_Flag223 (Id, V);
4624 end Set_Is_Descendent_Of_Address;
4626 procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True) is
4628 Set_Flag176 (Id, V);
4629 end Set_Is_Discrim_SO_Function;
4631 procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True) is
4633 Set_Flag234 (Id, V);
4634 end Set_Is_Dispatch_Table_Entity;
4636 procedure Set_Is_Dispatching_Operation (Id : E; V : B := True) is
4641 Is_Overloadable (Id)
4643 Ekind (Id) = E_Subprogram_Type);
4646 end Set_Is_Dispatching_Operation;
4648 procedure Set_Is_Eliminated (Id : E; V : B := True) is
4650 Set_Flag124 (Id, V);
4651 end Set_Is_Eliminated;
4653 procedure Set_Is_Entry_Formal (Id : E; V : B := True) is
4656 end Set_Is_Entry_Formal;
4658 procedure Set_Is_Exported (Id : E; V : B := True) is
4661 end Set_Is_Exported;
4663 procedure Set_Is_First_Subtype (Id : E; V : B := True) is
4666 end Set_Is_First_Subtype;
4668 procedure Set_Is_For_Access_Subtype (Id : E; V : B := True) is
4670 pragma Assert (Ekind_In (Id, E_Record_Subtype, E_Private_Subtype));
4671 Set_Flag118 (Id, V);
4672 end Set_Is_For_Access_Subtype;
4674 procedure Set_Is_Formal_Subprogram (Id : E; V : B := True) is
4676 Set_Flag111 (Id, V);
4677 end Set_Is_Formal_Subprogram;
4679 procedure Set_Is_Frozen (Id : E; V : B := True) is
4681 pragma Assert (Nkind (Id) in N_Entity);
4685 procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True) is
4687 pragma Assert (Is_Type (Id));
4689 end Set_Is_Generic_Actual_Type;
4691 procedure Set_Is_Generic_Instance (Id : E; V : B := True) is
4693 Set_Flag130 (Id, V);
4694 end Set_Is_Generic_Instance;
4696 procedure Set_Is_Generic_Type (Id : E; V : B := True) is
4698 pragma Assert (Nkind (Id) in N_Entity);
4700 end Set_Is_Generic_Type;
4702 procedure Set_Is_Hidden (Id : E; V : B := True) is
4707 procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True) is
4709 Set_Flag171 (Id, V);
4710 end Set_Is_Hidden_Open_Scope;
4712 procedure Set_Is_Immediately_Visible (Id : E; V : B := True) is
4714 pragma Assert (Nkind (Id) in N_Entity);
4716 end Set_Is_Immediately_Visible;
4718 procedure Set_Is_Implementation_Defined (Id : E; V : B := True) is
4720 Set_Flag254 (Id, V);
4721 end Set_Is_Implementation_Defined;
4723 procedure Set_Is_Imported (Id : E; V : B := True) is
4726 end Set_Is_Imported;
4728 procedure Set_Is_Inlined (Id : E; V : B := True) is
4733 procedure Set_Is_Interface (Id : E; V : B := True) is
4735 pragma Assert (Is_Record_Type (Id));
4736 Set_Flag186 (Id, V);
4737 end Set_Is_Interface;
4739 procedure Set_Is_Instantiated (Id : E; V : B := True) is
4741 Set_Flag126 (Id, V);
4742 end Set_Is_Instantiated;
4744 procedure Set_Is_Internal (Id : E; V : B := True) is
4746 pragma Assert (Nkind (Id) in N_Entity);
4748 end Set_Is_Internal;
4750 procedure Set_Is_Interrupt_Handler (Id : E; V : B := True) is
4752 pragma Assert (Nkind (Id) in N_Entity);
4754 end Set_Is_Interrupt_Handler;
4756 procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True) is
4759 end Set_Is_Intrinsic_Subprogram;
4761 procedure Set_Is_Invariant_Procedure (Id : E; V : B := True) is
4763 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4764 Set_Flag257 (Id, V);
4765 end Set_Is_Invariant_Procedure;
4767 procedure Set_Is_Itype (Id : E; V : B := True) is
4772 procedure Set_Is_Known_Non_Null (Id : E; V : B := True) is
4775 end Set_Is_Known_Non_Null;
4777 procedure Set_Is_Known_Null (Id : E; V : B := True) is
4779 Set_Flag204 (Id, V);
4780 end Set_Is_Known_Null;
4782 procedure Set_Is_Known_Valid (Id : E; V : B := True) is
4784 Set_Flag170 (Id, V);
4785 end Set_Is_Known_Valid;
4787 procedure Set_Is_Limited_Composite (Id : E; V : B := True) is
4789 pragma Assert (Is_Type (Id));
4790 Set_Flag106 (Id, V);
4791 end Set_Is_Limited_Composite;
4793 procedure Set_Is_Limited_Interface (Id : E; V : B := True) is
4795 pragma Assert (Is_Interface (Id));
4796 Set_Flag197 (Id, V);
4797 end Set_Is_Limited_Interface;
4799 procedure Set_Is_Limited_Record (Id : E; V : B := True) is
4802 end Set_Is_Limited_Record;
4804 procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True) is
4806 pragma Assert (Is_Subprogram (Id));
4807 Set_Flag137 (Id, V);
4808 end Set_Is_Machine_Code_Subprogram;
4810 procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True) is
4812 pragma Assert (Is_Type (Id));
4813 Set_Flag109 (Id, V);
4814 end Set_Is_Non_Static_Subtype;
4816 procedure Set_Is_Null_Init_Proc (Id : E; V : B := True) is
4818 pragma Assert (Ekind (Id) = E_Procedure);
4819 Set_Flag178 (Id, V);
4820 end Set_Is_Null_Init_Proc;
4822 procedure Set_Is_Obsolescent (Id : E; V : B := True) is
4824 Set_Flag153 (Id, V);
4825 end Set_Is_Obsolescent;
4827 procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True) is
4829 pragma Assert (Ekind (Id) = E_Out_Parameter);
4830 Set_Flag226 (Id, V);
4831 end Set_Is_Only_Out_Parameter;
4833 procedure Set_Is_Optional_Parameter (Id : E; V : B := True) is
4835 pragma Assert (Is_Formal (Id));
4836 Set_Flag134 (Id, V);
4837 end Set_Is_Optional_Parameter;
4839 procedure Set_Is_Package_Body_Entity (Id : E; V : B := True) is
4841 Set_Flag160 (Id, V);
4842 end Set_Is_Package_Body_Entity;
4844 procedure Set_Is_Packed (Id : E; V : B := True) is
4846 pragma Assert (Id = Base_Type (Id));
4850 procedure Set_Is_Packed_Array_Type (Id : E; V : B := True) is
4852 Set_Flag138 (Id, V);
4853 end Set_Is_Packed_Array_Type;
4855 procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True) is
4857 pragma Assert (Nkind (Id) in N_Entity);
4859 end Set_Is_Potentially_Use_Visible;
4861 procedure Set_Is_Predicate_Function (Id : E; V : B := True) is
4863 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4864 Set_Flag255 (Id, V);
4865 end Set_Is_Predicate_Function;
4867 procedure Set_Is_Predicate_Function_M (Id : E; V : B := True) is
4869 pragma Assert (Ekind (Id) = E_Function or else Ekind (Id) = E_Procedure);
4870 Set_Flag256 (Id, V);
4871 end Set_Is_Predicate_Function_M;
4873 procedure Set_Is_Preelaborated (Id : E; V : B := True) is
4876 end Set_Is_Preelaborated;
4878 procedure Set_Is_Primitive (Id : E; V : B := True) is
4881 (Is_Overloadable (Id)
4882 or else Ekind_In (Id, E_Generic_Function, E_Generic_Procedure));
4883 Set_Flag218 (Id, V);
4884 end Set_Is_Primitive;
4886 procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True) is
4888 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4889 Set_Flag195 (Id, V);
4890 end Set_Is_Primitive_Wrapper;
4892 procedure Set_Is_Private_Composite (Id : E; V : B := True) is
4894 pragma Assert (Is_Type (Id));
4895 Set_Flag107 (Id, V);
4896 end Set_Is_Private_Composite;
4898 procedure Set_Is_Private_Descendant (Id : E; V : B := True) is
4901 end Set_Is_Private_Descendant;
4903 procedure Set_Is_Private_Primitive (Id : E; V : B := True) is
4905 pragma Assert (Ekind_In (Id, E_Function, E_Procedure));
4906 Set_Flag245 (Id, V);
4907 end Set_Is_Private_Primitive;
4909 procedure Set_Is_Processed_Transient (Id : E; V : B := True) is
4911 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
4912 Set_Flag252 (Id, V);
4913 end Set_Is_Processed_Transient;
4915 procedure Set_Is_Public (Id : E; V : B := True) is
4917 pragma Assert (Nkind (Id) in N_Entity);
4921 procedure Set_Is_Pure (Id : E; V : B := True) is
4926 procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True) is
4928 pragma Assert (Is_Access_Type (Id));
4929 Set_Flag189 (Id, V);
4930 end Set_Is_Pure_Unit_Access_Type;
4932 procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True) is
4934 pragma Assert (Is_Type (Id));
4935 Set_Flag244 (Id, V);
4936 end Set_Is_RACW_Stub_Type;
4938 procedure Set_Is_Raised (Id : E; V : B := True) is
4940 pragma Assert (Ekind (Id) = E_Exception);
4941 Set_Flag224 (Id, V);
4944 procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True) is
4947 end Set_Is_Remote_Call_Interface;
4949 procedure Set_Is_Remote_Types (Id : E; V : B := True) is
4952 end Set_Is_Remote_Types;
4954 procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True) is
4956 Set_Flag112 (Id, V);
4957 end Set_Is_Renaming_Of_Object;
4959 procedure Set_Is_Return_Object (Id : E; V : B := True) is
4961 Set_Flag209 (Id, V);
4962 end Set_Is_Return_Object;
4964 procedure Set_Is_Safe_To_Reevaluate (Id : E; V : B := True) is
4966 pragma Assert (Ekind (Id) = E_Variable);
4967 Set_Flag249 (Id, V);
4968 end Set_Is_Safe_To_Reevaluate;
4970 procedure Set_Is_Shared_Passive (Id : E; V : B := True) is
4973 end Set_Is_Shared_Passive;
4975 procedure Set_Is_Statically_Allocated (Id : E; V : B := True) is
4979 or else Ekind_In (Id, E_Exception,
4984 end Set_Is_Statically_Allocated;
4986 procedure Set_Is_Tag (Id : E; V : B := True) is
4988 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
4992 procedure Set_Is_Tagged_Type (Id : E; V : B := True) is
4995 end Set_Is_Tagged_Type;
4997 procedure Set_Is_Thunk (Id : E; V : B := True) is
4999 pragma Assert (Is_Subprogram (Id));
5000 Set_Flag225 (Id, V);
5003 procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True) is
5005 Set_Flag235 (Id, V);
5006 end Set_Is_Trivial_Subprogram;
5008 procedure Set_Is_True_Constant (Id : E; V : B := True) is
5010 Set_Flag163 (Id, V);
5011 end Set_Is_True_Constant;
5013 procedure Set_Is_Unchecked_Union (Id : E; V : B := True) is
5015 pragma Assert (Id = Base_Type (Id));
5016 Set_Flag117 (Id, V);
5017 end Set_Is_Unchecked_Union;
5019 procedure Set_Is_Underlying_Record_View (Id : E; V : B := True) is
5021 pragma Assert (Ekind (Id) = E_Record_Type);
5022 Set_Flag246 (Id, V);
5023 end Set_Is_Underlying_Record_View;
5025 procedure Set_Is_Unsigned_Type (Id : E; V : B := True) is
5027 pragma Assert (Is_Discrete_Or_Fixed_Point_Type (Id));
5028 Set_Flag144 (Id, V);
5029 end Set_Is_Unsigned_Type;
5031 procedure Set_Is_Valued_Procedure (Id : E; V : B := True) is
5033 pragma Assert (Ekind (Id) = E_Procedure);
5034 Set_Flag127 (Id, V);
5035 end Set_Is_Valued_Procedure;
5037 procedure Set_Is_Visible_Formal (Id : E; V : B := True) is
5039 Set_Flag206 (Id, V);
5040 end Set_Is_Visible_Formal;
5042 procedure Set_Is_Visible_Lib_Unit (Id : E; V : B := True) is
5044 Set_Flag116 (Id, V);
5045 end Set_Is_Visible_Lib_Unit;
5047 procedure Set_Is_VMS_Exception (Id : E; V : B := True) is
5049 pragma Assert (Ekind (Id) = E_Exception);
5050 Set_Flag133 (Id, V);
5051 end Set_Is_VMS_Exception;
5053 procedure Set_Is_Volatile (Id : E; V : B := True) is
5055 pragma Assert (Nkind (Id) in N_Entity);
5057 end Set_Is_Volatile;
5059 procedure Set_Itype_Printed (Id : E; V : B := True) is
5061 pragma Assert (Is_Itype (Id));
5062 Set_Flag202 (Id, V);
5063 end Set_Itype_Printed;
5065 procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True) is
5068 end Set_Kill_Elaboration_Checks;
5070 procedure Set_Kill_Range_Checks (Id : E; V : B := True) is
5073 end Set_Kill_Range_Checks;
5075 procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True) is
5077 pragma Assert (Is_Type (Id));
5078 Set_Flag207 (Id, V);
5079 end Set_Known_To_Have_Preelab_Init;
5081 procedure Set_Last_Assignment (Id : E; V : N) is
5083 pragma Assert (Is_Assignable (Id));
5085 end Set_Last_Assignment;
5087 procedure Set_Last_Entity (Id : E; V : E) is
5090 end Set_Last_Entity;
5092 procedure Set_Limited_View (Id : E; V : E) is
5094 pragma Assert (Ekind (Id) = E_Package);
5096 end Set_Limited_View;
5098 procedure Set_Lit_Indexes (Id : E; V : E) is
5100 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5102 end Set_Lit_Indexes;
5104 procedure Set_Lit_Strings (Id : E; V : E) is
5106 pragma Assert (Is_Enumeration_Type (Id) and then Root_Type (Id) = Id);
5108 end Set_Lit_Strings;
5110 procedure Set_Low_Bound_Tested (Id : E; V : B := True) is
5112 pragma Assert (Is_Formal (Id));
5113 Set_Flag205 (Id, V);
5114 end Set_Low_Bound_Tested;
5116 procedure Set_Machine_Radix_10 (Id : E; V : B := True) is
5118 pragma Assert (Is_Decimal_Fixed_Point_Type (Id));
5120 end Set_Machine_Radix_10;
5122 procedure Set_Master_Id (Id : E; V : E) is
5124 pragma Assert (Is_Access_Type (Id));
5128 procedure Set_Materialize_Entity (Id : E; V : B := True) is
5130 Set_Flag168 (Id, V);
5131 end Set_Materialize_Entity;
5133 procedure Set_May_Inherit_Delayed_Rep_Aspects (Id : E; V : B := True) is
5135 Set_Flag262 (Id, V);
5136 end Set_May_Inherit_Delayed_Rep_Aspects;
5138 procedure Set_Mechanism (Id : E; V : M) is
5140 pragma Assert (Ekind (Id) = E_Function or else Is_Formal (Id));
5141 Set_Uint8 (Id, UI_From_Int (V));
5144 procedure Set_Modulus (Id : E; V : U) is
5146 pragma Assert (Ekind (Id) = E_Modular_Integer_Type);
5150 procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True) is
5152 pragma Assert (Is_Type (Id));
5153 Set_Flag183 (Id, V);
5154 end Set_Must_Be_On_Byte_Boundary;
5156 procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True) is
5158 pragma Assert (Is_Type (Id));
5159 Set_Flag208 (Id, V);
5160 end Set_Must_Have_Preelab_Init;
5162 procedure Set_Needs_Debug_Info (Id : E; V : B := True) is
5164 Set_Flag147 (Id, V);
5165 end Set_Needs_Debug_Info;
5167 procedure Set_Needs_No_Actuals (Id : E; V : B := True) is
5170 (Is_Overloadable (Id)
5171 or else Ekind_In (Id, E_Subprogram_Type, E_Entry_Family));
5173 end Set_Needs_No_Actuals;
5175 procedure Set_Never_Set_In_Source (Id : E; V : B := True) is
5177 Set_Flag115 (Id, V);
5178 end Set_Never_Set_In_Source;
5180 procedure Set_Next_Inlined_Subprogram (Id : E; V : E) is
5183 end Set_Next_Inlined_Subprogram;
5185 procedure Set_No_Pool_Assigned (Id : E; V : B := True) is
5187 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5188 Set_Flag131 (Id, V);
5189 end Set_No_Pool_Assigned;
5191 procedure Set_No_Return (Id : E; V : B := True) is
5194 (V = False or else Ekind_In (Id, E_Procedure, E_Generic_Procedure));
5195 Set_Flag113 (Id, V);
5198 procedure Set_No_Strict_Aliasing (Id : E; V : B := True) is
5200 pragma Assert (Is_Access_Type (Id) and then Is_Base_Type (Id));
5201 Set_Flag136 (Id, V);
5202 end Set_No_Strict_Aliasing;
5204 procedure Set_Non_Binary_Modulus (Id : E; V : B := True) is
5206 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5208 end Set_Non_Binary_Modulus;
5210 procedure Set_Non_Limited_View (Id : E; V : E) is
5213 (Ekind (Id) in Incomplete_Kind or else Ekind (Id) = E_Abstract_State);
5215 end Set_Non_Limited_View;
5217 procedure Set_Nonzero_Is_True (Id : E; V : B := True) is
5220 (Root_Type (Id) = Standard_Boolean
5221 and then Ekind (Id) = E_Enumeration_Type);
5222 Set_Flag162 (Id, V);
5223 end Set_Nonzero_Is_True;
5225 procedure Set_Normalized_First_Bit (Id : E; V : U) is
5227 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5229 end Set_Normalized_First_Bit;
5231 procedure Set_Normalized_Position (Id : E; V : U) is
5233 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5235 end Set_Normalized_Position;
5237 procedure Set_Normalized_Position_Max (Id : E; V : U) is
5239 pragma Assert (Ekind_In (Id, E_Component, E_Discriminant));
5241 end Set_Normalized_Position_Max;
5243 procedure Set_OK_To_Rename (Id : E; V : B := True) is
5245 pragma Assert (Ekind (Id) = E_Variable);
5246 Set_Flag247 (Id, V);
5247 end Set_OK_To_Rename;
5249 procedure Set_OK_To_Reorder_Components (Id : E; V : B := True) is
5252 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5253 Set_Flag239 (Id, V);
5254 end Set_OK_To_Reorder_Components;
5256 procedure Set_Optimize_Alignment_Space (Id : E; V : B := True) is
5259 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5260 Set_Flag241 (Id, V);
5261 end Set_Optimize_Alignment_Space;
5263 procedure Set_Optimize_Alignment_Time (Id : E; V : B := True) is
5266 (Is_Type (Id) or else Ekind_In (Id, E_Constant, E_Variable));
5267 Set_Flag242 (Id, V);
5268 end Set_Optimize_Alignment_Time;
5270 procedure Set_Original_Access_Type (Id : E; V : E) is
5272 pragma Assert (Ekind (Id) = E_Access_Subprogram_Type);
5274 end Set_Original_Access_Type;
5276 procedure Set_Original_Array_Type (Id : E; V : E) is
5278 pragma Assert (Is_Array_Type (Id) or else Is_Modular_Integer_Type (Id));
5280 end Set_Original_Array_Type;
5282 procedure Set_Original_Record_Component (Id : E; V : E) is
5284 pragma Assert (Ekind_In (Id, E_Void, E_Component, E_Discriminant));
5286 end Set_Original_Record_Component;
5288 procedure Set_Overlays_Constant (Id : E; V : B := True) is
5290 Set_Flag243 (Id, V);
5291 end Set_Overlays_Constant;
5293 procedure Set_Overridden_Operation (Id : E; V : E) is
5296 end Set_Overridden_Operation;
5298 procedure Set_Package_Instantiation (Id : E; V : N) is
5300 pragma Assert (Ekind_In (Id, E_Void, E_Generic_Package, E_Package));
5302 end Set_Package_Instantiation;
5304 procedure Set_Packed_Array_Type (Id : E; V : E) is
5306 pragma Assert (Is_Array_Type (Id));
5308 end Set_Packed_Array_Type;
5310 procedure Set_Parent_Subtype (Id : E; V : E) is
5312 pragma Assert (Ekind (Id) = E_Record_Type);
5314 end Set_Parent_Subtype;
5316 procedure Set_Postcondition_Proc (Id : E; V : E) is
5318 pragma Assert (Ekind (Id) = E_Procedure);
5320 end Set_Postcondition_Proc;
5322 procedure Set_PPC_Wrapper (Id : E; V : E) is
5324 pragma Assert (Ekind_In (Id, E_Entry, E_Entry_Family));
5326 end Set_PPC_Wrapper;
5328 procedure Set_Direct_Primitive_Operations (Id : E; V : L) is
5330 pragma Assert (Is_Tagged_Type (Id));
5331 Set_Elist10 (Id, V);
5332 end Set_Direct_Primitive_Operations;
5334 procedure Set_Prival (Id : E; V : E) is
5336 pragma Assert (Is_Protected_Component (Id));
5340 procedure Set_Prival_Link (Id : E; V : E) is
5342 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5344 end Set_Prival_Link;
5346 procedure Set_Private_Dependents (Id : E; V : L) is
5348 pragma Assert (Is_Incomplete_Or_Private_Type (Id));
5349 Set_Elist18 (Id, V);
5350 end Set_Private_Dependents;
5352 procedure Set_Private_View (Id : E; V : N) is
5354 pragma Assert (Is_Private_Type (Id));
5356 end Set_Private_View;
5358 procedure Set_Protected_Body_Subprogram (Id : E; V : E) is
5360 pragma Assert (Is_Subprogram (Id) or else Is_Entry (Id));
5362 end Set_Protected_Body_Subprogram;
5364 procedure Set_Protected_Formal (Id : E; V : E) is
5366 pragma Assert (Is_Formal (Id));
5368 end Set_Protected_Formal;
5370 procedure Set_Protection_Object (Id : E; V : E) is
5372 pragma Assert (Ekind_In (Id, E_Entry,
5377 end Set_Protection_Object;
5379 procedure Set_Reachable (Id : E; V : B := True) is
5384 procedure Set_Referenced (Id : E; V : B := True) is
5386 Set_Flag156 (Id, V);
5389 procedure Set_Referenced_As_LHS (Id : E; V : B := True) is
5392 end Set_Referenced_As_LHS;
5394 procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True) is
5396 Set_Flag227 (Id, V);
5397 end Set_Referenced_As_Out_Parameter;
5399 procedure Set_Refined_State (Id : E; V : E) is
5401 pragma Assert (Ekind_In (Id, E_Abstract_State, E_Variable));
5403 end Set_Refined_State;
5405 procedure Set_Refinement_Constituents (Id : E; V : L) is
5407 pragma Assert (Ekind (Id) = E_Abstract_State);
5409 end Set_Refinement_Constituents;
5411 procedure Set_Register_Exception_Call (Id : E; V : N) is
5413 pragma Assert (Ekind (Id) = E_Exception);
5415 end Set_Register_Exception_Call;
5417 procedure Set_Related_Array_Object (Id : E; V : E) is
5419 pragma Assert (Is_Array_Type (Id));
5421 end Set_Related_Array_Object;
5423 procedure Set_Related_Expression (Id : E; V : N) is
5425 pragma Assert (Ekind (Id) in Type_Kind
5426 or else Ekind_In (Id, E_Constant, E_Variable, E_Void));
5428 end Set_Related_Expression;
5430 procedure Set_Related_Instance (Id : E; V : E) is
5432 pragma Assert (Ekind_In (Id, E_Package, E_Package_Body));
5434 end Set_Related_Instance;
5436 procedure Set_Related_Type (Id : E; V : E) is
5438 pragma Assert (Ekind_In (Id, E_Component, E_Constant, E_Variable));
5440 end Set_Related_Type;
5442 procedure Set_Relative_Deadline_Variable (Id : E; V : E) is
5444 pragma Assert (Is_Task_Type (Id) and then Is_Base_Type (Id));
5446 end Set_Relative_Deadline_Variable;
5448 procedure Set_Renamed_Entity (Id : E; V : N) is
5451 end Set_Renamed_Entity;
5453 procedure Set_Renamed_In_Spec (Id : E; V : B := True) is
5455 pragma Assert (Ekind (Id) = E_Package);
5456 Set_Flag231 (Id, V);
5457 end Set_Renamed_In_Spec;
5459 procedure Set_Renamed_Object (Id : E; V : N) is
5462 end Set_Renamed_Object;
5464 procedure Set_Renaming_Map (Id : E; V : U) is
5467 end Set_Renaming_Map;
5469 procedure Set_Requires_Overriding (Id : E; V : B := True) is
5471 pragma Assert (Is_Overloadable (Id));
5472 Set_Flag213 (Id, V);
5473 end Set_Requires_Overriding;
5475 procedure Set_Return_Present (Id : E; V : B := True) is
5478 end Set_Return_Present;
5480 procedure Set_Return_Applies_To (Id : E; V : N) is
5483 end Set_Return_Applies_To;
5485 procedure Set_Returns_By_Ref (Id : E; V : B := True) is
5488 end Set_Returns_By_Ref;
5490 procedure Set_Reverse_Bit_Order (Id : E; V : B := True) is
5493 (Is_Record_Type (Id) and then Is_Base_Type (Id));
5494 Set_Flag164 (Id, V);
5495 end Set_Reverse_Bit_Order;
5497 procedure Set_Reverse_Storage_Order (Id : E; V : B := True) is
5501 and then (Is_Record_Type (Id) or else Is_Array_Type (Id)));
5503 end Set_Reverse_Storage_Order;
5505 procedure Set_RM_Size (Id : E; V : U) is
5507 pragma Assert (Is_Type (Id));
5511 procedure Set_Scalar_Range (Id : E; V : N) is
5514 end Set_Scalar_Range;
5516 procedure Set_Scale_Value (Id : E; V : U) is
5519 end Set_Scale_Value;
5521 procedure Set_Scope_Depth_Value (Id : E; V : U) is
5523 pragma Assert (not Is_Record_Type (Id));
5525 end Set_Scope_Depth_Value;
5527 procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True) is
5529 Set_Flag167 (Id, V);
5530 end Set_Sec_Stack_Needed_For_Return;
5532 procedure Set_Shadow_Entities (Id : E; V : S) is
5534 pragma Assert (Ekind_In (Id, E_Package, E_Generic_Package));
5536 end Set_Shadow_Entities;
5538 procedure Set_Shared_Var_Procs_Instance (Id : E; V : E) is
5540 pragma Assert (Ekind (Id) = E_Variable);
5542 end Set_Shared_Var_Procs_Instance;
5544 procedure Set_Size_Check_Code (Id : E; V : N) is
5546 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5548 end Set_Size_Check_Code;
5550 procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True) is
5552 Set_Flag177 (Id, V);
5553 end Set_Size_Depends_On_Discriminant;
5555 procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True) is
5558 end Set_Size_Known_At_Compile_Time;
5560 procedure Set_Small_Value (Id : E; V : R) is
5562 pragma Assert (Is_Fixed_Point_Type (Id));
5563 Set_Ureal21 (Id, V);
5564 end Set_Small_Value;
5566 procedure Set_SPARK_Aux_Pragma (Id : E; V : N) is
5569 (Ekind_In (Id, E_Generic_Package, -- package variants
5574 end Set_SPARK_Aux_Pragma;
5576 procedure Set_SPARK_Aux_Pragma_Inherited (Id : E; V : B := True) is
5579 (Ekind_In (Id, E_Generic_Package, -- package variants
5583 Set_Flag266 (Id, V);
5584 end Set_SPARK_Aux_Pragma_Inherited;
5586 procedure Set_SPARK_Pragma (Id : E; V : N) is
5589 (Ekind_In (Id, E_Function, -- subprogram variants
5591 E_Generic_Procedure,
5595 Ekind_In (Id, E_Generic_Package, -- package variants
5600 end Set_SPARK_Pragma;
5602 procedure Set_SPARK_Pragma_Inherited (Id : E; V : B := True) is
5605 (Ekind_In (Id, E_Function, -- subprogram variants
5607 E_Generic_Procedure,
5611 Ekind_In (Id, E_Generic_Package, -- package variants
5615 Set_Flag265 (Id, V);
5616 end Set_SPARK_Pragma_Inherited;
5618 procedure Set_Spec_Entity (Id : E; V : E) is
5620 pragma Assert (Ekind (Id) = E_Package_Body or else Is_Formal (Id));
5622 end Set_Spec_Entity;
5624 procedure Set_Static_Predicate (Id : E; V : S) is
5627 (Ekind_In (Id, E_Enumeration_Subtype,
5628 E_Modular_Integer_Subtype,
5629 E_Signed_Integer_Subtype)
5630 and then Has_Predicates (Id));
5632 end Set_Static_Predicate;
5634 procedure Set_Status_Flag_Or_Transient_Decl (Id : E; V : E) is
5636 pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
5638 end Set_Status_Flag_Or_Transient_Decl;
5640 procedure Set_Storage_Size_Variable (Id : E; V : E) is
5642 pragma Assert (Is_Access_Type (Id) or else Is_Task_Type (Id));
5643 pragma Assert (Id = Base_Type (Id));
5645 end Set_Storage_Size_Variable;
5647 procedure Set_Static_Elaboration_Desired (Id : E; V : B) is
5649 pragma Assert (Ekind (Id) = E_Package);
5651 end Set_Static_Elaboration_Desired;
5653 procedure Set_Static_Initialization (Id : E; V : N) is
5656 (Ekind (Id) = E_Procedure and then not Is_Dispatching_Operation (Id));
5658 end Set_Static_Initialization;
5660 procedure Set_Stored_Constraint (Id : E; V : L) is
5662 pragma Assert (Nkind (Id) in N_Entity);
5663 Set_Elist23 (Id, V);
5664 end Set_Stored_Constraint;
5666 procedure Set_Strict_Alignment (Id : E; V : B := True) is
5668 pragma Assert (Id = Base_Type (Id));
5669 Set_Flag145 (Id, V);
5670 end Set_Strict_Alignment;
5672 procedure Set_String_Literal_Length (Id : E; V : U) is
5674 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5676 end Set_String_Literal_Length;
5678 procedure Set_String_Literal_Low_Bound (Id : E; V : N) is
5680 pragma Assert (Ekind (Id) = E_String_Literal_Subtype);
5682 end Set_String_Literal_Low_Bound;
5684 procedure Set_Subprograms_For_Type (Id : E; V : E) is
5686 pragma Assert (Is_Type (Id) or else Is_Subprogram (Id));
5688 end Set_Subprograms_For_Type;
5690 procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True) is
5692 Set_Flag148 (Id, V);
5693 end Set_Suppress_Elaboration_Warnings;
5695 procedure Set_Suppress_Initialization (Id : E; V : B := True) is
5697 pragma Assert (Is_Type (Id));
5698 Set_Flag105 (Id, V);
5699 end Set_Suppress_Initialization;
5701 procedure Set_Suppress_Style_Checks (Id : E; V : B := True) is
5703 Set_Flag165 (Id, V);
5704 end Set_Suppress_Style_Checks;
5706 procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True) is
5708 Set_Flag217 (Id, V);
5709 end Set_Suppress_Value_Tracking_On_Call;
5711 procedure Set_Task_Body_Procedure (Id : E; V : N) is
5713 pragma Assert (Ekind (Id) in Task_Kind);
5715 end Set_Task_Body_Procedure;
5717 procedure Set_Thunk_Entity (Id : E; V : E) is
5719 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5720 and then Is_Thunk (Id));
5722 end Set_Thunk_Entity;
5724 procedure Set_Treat_As_Volatile (Id : E; V : B := True) is
5727 end Set_Treat_As_Volatile;
5729 procedure Set_Underlying_Full_View (Id : E; V : E) is
5731 pragma Assert (Ekind (Id) in Private_Kind);
5733 end Set_Underlying_Full_View;
5735 procedure Set_Underlying_Record_View (Id : E; V : E) is
5737 pragma Assert (Ekind (Id) = E_Record_Type);
5739 end Set_Underlying_Record_View;
5741 procedure Set_Universal_Aliasing (Id : E; V : B := True) is
5743 pragma Assert (Is_Type (Id) and then Is_Base_Type (Id));
5744 Set_Flag216 (Id, V);
5745 end Set_Universal_Aliasing;
5747 procedure Set_Unset_Reference (Id : E; V : N) is
5750 end Set_Unset_Reference;
5752 procedure Set_Used_As_Generic_Actual (Id : E; V : B := True) is
5754 Set_Flag222 (Id, V);
5755 end Set_Used_As_Generic_Actual;
5757 procedure Set_Uses_Lock_Free (Id : E; V : B := True) is
5759 pragma Assert (Ekind (Id) = E_Protected_Type);
5760 Set_Flag188 (Id, V);
5761 end Set_Uses_Lock_Free;
5763 procedure Set_Uses_Sec_Stack (Id : E; V : B := True) is
5766 end Set_Uses_Sec_Stack;
5768 procedure Set_Warnings_Off (Id : E; V : B := True) is
5771 end Set_Warnings_Off;
5773 procedure Set_Warnings_Off_Used (Id : E; V : B := True) is
5775 Set_Flag236 (Id, V);
5776 end Set_Warnings_Off_Used;
5778 procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True) is
5780 Set_Flag237 (Id, V);
5781 end Set_Warnings_Off_Used_Unmodified;
5783 procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True) is
5785 Set_Flag238 (Id, V);
5786 end Set_Warnings_Off_Used_Unreferenced;
5788 procedure Set_Was_Hidden (Id : E; V : B := True) is
5790 Set_Flag196 (Id, V);
5793 procedure Set_Wrapped_Entity (Id : E; V : E) is
5795 pragma Assert (Ekind_In (Id, E_Function, E_Procedure)
5796 and then Is_Primitive_Wrapper (Id));
5798 end Set_Wrapped_Entity;
5800 -----------------------------------
5801 -- Field Initialization Routines --
5802 -----------------------------------
5804 procedure Init_Alignment (Id : E) is
5806 Set_Uint14 (Id, Uint_0);
5809 procedure Init_Alignment (Id : E; V : Int) is
5811 Set_Uint14 (Id, UI_From_Int (V));
5814 procedure Init_Component_Bit_Offset (Id : E) is
5816 Set_Uint11 (Id, No_Uint);
5817 end Init_Component_Bit_Offset;
5819 procedure Init_Component_Bit_Offset (Id : E; V : Int) is
5821 Set_Uint11 (Id, UI_From_Int (V));
5822 end Init_Component_Bit_Offset;
5824 procedure Init_Component_Size (Id : E) is
5826 Set_Uint22 (Id, Uint_0);
5827 end Init_Component_Size;
5829 procedure Init_Component_Size (Id : E; V : Int) is
5831 Set_Uint22 (Id, UI_From_Int (V));
5832 end Init_Component_Size;
5834 procedure Init_Digits_Value (Id : E) is
5836 Set_Uint17 (Id, Uint_0);
5837 end Init_Digits_Value;
5839 procedure Init_Digits_Value (Id : E; V : Int) is
5841 Set_Uint17 (Id, UI_From_Int (V));
5842 end Init_Digits_Value;
5844 procedure Init_Esize (Id : E) is
5846 Set_Uint12 (Id, Uint_0);
5849 procedure Init_Esize (Id : E; V : Int) is
5851 Set_Uint12 (Id, UI_From_Int (V));
5854 procedure Init_Normalized_First_Bit (Id : E) is
5856 Set_Uint8 (Id, No_Uint);
5857 end Init_Normalized_First_Bit;
5859 procedure Init_Normalized_First_Bit (Id : E; V : Int) is
5861 Set_Uint8 (Id, UI_From_Int (V));
5862 end Init_Normalized_First_Bit;
5864 procedure Init_Normalized_Position (Id : E) is
5866 Set_Uint14 (Id, No_Uint);
5867 end Init_Normalized_Position;
5869 procedure Init_Normalized_Position (Id : E; V : Int) is
5871 Set_Uint14 (Id, UI_From_Int (V));
5872 end Init_Normalized_Position;
5874 procedure Init_Normalized_Position_Max (Id : E) is
5876 Set_Uint10 (Id, No_Uint);
5877 end Init_Normalized_Position_Max;
5879 procedure Init_Normalized_Position_Max (Id : E; V : Int) is
5881 Set_Uint10 (Id, UI_From_Int (V));
5882 end Init_Normalized_Position_Max;
5884 procedure Init_RM_Size (Id : E) is
5886 Set_Uint13 (Id, Uint_0);
5889 procedure Init_RM_Size (Id : E; V : Int) is
5891 Set_Uint13 (Id, UI_From_Int (V));
5894 -----------------------------
5895 -- Init_Component_Location --
5896 -----------------------------
5898 procedure Init_Component_Location (Id : E) is
5900 Set_Uint8 (Id, No_Uint); -- Normalized_First_Bit
5901 Set_Uint10 (Id, No_Uint); -- Normalized_Position_Max
5902 Set_Uint11 (Id, No_Uint); -- Component_Bit_Offset
5903 Set_Uint12 (Id, Uint_0); -- Esize
5904 Set_Uint14 (Id, No_Uint); -- Normalized_Position
5905 end Init_Component_Location;
5907 ----------------------------
5908 -- Init_Object_Size_Align --
5909 ----------------------------
5911 procedure Init_Object_Size_Align (Id : E) is
5913 Set_Uint12 (Id, Uint_0); -- Esize
5914 Set_Uint14 (Id, Uint_0); -- Alignment
5915 end Init_Object_Size_Align;
5921 procedure Init_Size (Id : E; V : Int) is
5923 pragma Assert (not Is_Object (Id));
5924 Set_Uint12 (Id, UI_From_Int (V)); -- Esize
5925 Set_Uint13 (Id, UI_From_Int (V)); -- RM_Size
5928 ---------------------
5929 -- Init_Size_Align --
5930 ---------------------
5932 procedure Init_Size_Align (Id : E) is
5934 pragma Assert (not Is_Object (Id));
5935 Set_Uint12 (Id, Uint_0); -- Esize
5936 Set_Uint13 (Id, Uint_0); -- RM_Size
5937 Set_Uint14 (Id, Uint_0); -- Alignment
5938 end Init_Size_Align;
5940 ----------------------------------------------
5941 -- Type Representation Attribute Predicates --
5942 ----------------------------------------------
5944 function Known_Alignment (E : Entity_Id) return B is
5946 return Uint14 (E) /= Uint_0
5947 and then Uint14 (E) /= No_Uint;
5948 end Known_Alignment;
5950 function Known_Component_Bit_Offset (E : Entity_Id) return B is
5952 return Uint11 (E) /= No_Uint;
5953 end Known_Component_Bit_Offset;
5955 function Known_Component_Size (E : Entity_Id) return B is
5957 return Uint22 (Base_Type (E)) /= Uint_0
5958 and then Uint22 (Base_Type (E)) /= No_Uint;
5959 end Known_Component_Size;
5961 function Known_Esize (E : Entity_Id) return B is
5963 return Uint12 (E) /= Uint_0
5964 and then Uint12 (E) /= No_Uint;
5967 function Known_Normalized_First_Bit (E : Entity_Id) return B is
5969 return Uint8 (E) /= No_Uint;
5970 end Known_Normalized_First_Bit;
5972 function Known_Normalized_Position (E : Entity_Id) return B is
5974 return Uint14 (E) /= No_Uint;
5975 end Known_Normalized_Position;
5977 function Known_Normalized_Position_Max (E : Entity_Id) return B is
5979 return Uint10 (E) /= No_Uint;
5980 end Known_Normalized_Position_Max;
5982 function Known_RM_Size (E : Entity_Id) return B is
5984 return Uint13 (E) /= No_Uint
5985 and then (Uint13 (E) /= Uint_0
5986 or else Is_Discrete_Type (E)
5987 or else Is_Fixed_Point_Type (E));
5990 function Known_Static_Component_Bit_Offset (E : Entity_Id) return B is
5992 return Uint11 (E) /= No_Uint
5993 and then Uint11 (E) >= Uint_0;
5994 end Known_Static_Component_Bit_Offset;
5996 function Known_Static_Component_Size (E : Entity_Id) return B is
5998 return Uint22 (Base_Type (E)) > Uint_0;
5999 end Known_Static_Component_Size;
6001 function Known_Static_Esize (E : Entity_Id) return B is
6003 return Uint12 (E) > Uint_0
6004 and then not Is_Generic_Type (E);
6005 end Known_Static_Esize;
6007 function Known_Static_Normalized_First_Bit (E : Entity_Id) return B is
6009 return Uint8 (E) /= No_Uint
6010 and then Uint8 (E) >= Uint_0;
6011 end Known_Static_Normalized_First_Bit;
6013 function Known_Static_Normalized_Position (E : Entity_Id) return B is
6015 return Uint14 (E) /= No_Uint
6016 and then Uint14 (E) >= Uint_0;
6017 end Known_Static_Normalized_Position;
6019 function Known_Static_Normalized_Position_Max (E : Entity_Id) return B is
6021 return Uint10 (E) /= No_Uint
6022 and then Uint10 (E) >= Uint_0;
6023 end Known_Static_Normalized_Position_Max;
6025 function Known_Static_RM_Size (E : Entity_Id) return B is
6027 return (Uint13 (E) > Uint_0
6028 or else Is_Discrete_Type (E)
6029 or else Is_Fixed_Point_Type (E))
6030 and then not Is_Generic_Type (E);
6031 end Known_Static_RM_Size;
6033 function Unknown_Alignment (E : Entity_Id) return B is
6035 return Uint14 (E) = Uint_0
6036 or else Uint14 (E) = No_Uint;
6037 end Unknown_Alignment;
6039 function Unknown_Component_Bit_Offset (E : Entity_Id) return B is
6041 return Uint11 (E) = No_Uint;
6042 end Unknown_Component_Bit_Offset;
6044 function Unknown_Component_Size (E : Entity_Id) return B is
6046 return Uint22 (Base_Type (E)) = Uint_0
6048 Uint22 (Base_Type (E)) = No_Uint;
6049 end Unknown_Component_Size;
6051 function Unknown_Esize (E : Entity_Id) return B is
6053 return Uint12 (E) = No_Uint
6055 Uint12 (E) = Uint_0;
6058 function Unknown_Normalized_First_Bit (E : Entity_Id) return B is
6060 return Uint8 (E) = No_Uint;
6061 end Unknown_Normalized_First_Bit;
6063 function Unknown_Normalized_Position (E : Entity_Id) return B is
6065 return Uint14 (E) = No_Uint;
6066 end Unknown_Normalized_Position;
6068 function Unknown_Normalized_Position_Max (E : Entity_Id) return B is
6070 return Uint10 (E) = No_Uint;
6071 end Unknown_Normalized_Position_Max;
6073 function Unknown_RM_Size (E : Entity_Id) return B is
6075 return (Uint13 (E) = Uint_0
6076 and then not Is_Discrete_Type (E)
6077 and then not Is_Fixed_Point_Type (E))
6078 or else Uint13 (E) = No_Uint;
6079 end Unknown_RM_Size;
6081 --------------------
6082 -- Address_Clause --
6083 --------------------
6085 function Address_Clause (Id : E) return N is
6087 return Get_Attribute_Definition_Clause (Id, Attribute_Address);
6094 function Aft_Value (Id : E) return U is
6096 Delta_Val : Ureal := Delta_Value (Id);
6098 while Delta_Val < Ureal_Tenth loop
6099 Delta_Val := Delta_Val * Ureal_10;
6100 Result := Result + 1;
6103 return UI_From_Int (Result);
6106 ----------------------
6107 -- Alignment_Clause --
6108 ----------------------
6110 function Alignment_Clause (Id : E) return N is
6112 return Get_Attribute_Definition_Clause (Id, Attribute_Alignment);
6113 end Alignment_Clause;
6119 procedure Append_Entity (Id : Entity_Id; V : Entity_Id) is
6121 if Last_Entity (V) = Empty then
6122 Set_First_Entity (Id => V, V => Id);
6124 Set_Next_Entity (Last_Entity (V), Id);
6127 Set_Next_Entity (Id, Empty);
6129 Set_Last_Entity (Id => V, V => Id);
6136 function Base_Type (Id : E) return E is
6138 if Is_Base_Type (Id) then
6141 pragma Assert (Is_Type (Id));
6146 -------------------------
6147 -- Component_Alignment --
6148 -------------------------
6150 -- Component Alignment is encoded using two flags, Flag128/129 as
6151 -- follows. Note that both flags False = Align_Default, so that the
6152 -- default initialization of flags to False initializes component
6153 -- alignment to the default value as required.
6155 -- Flag128 Flag129 Value
6156 -- ------- ------- -----
6157 -- False False Calign_Default
6158 -- False True Calign_Component_Size
6159 -- True False Calign_Component_Size_4
6160 -- True True Calign_Storage_Unit
6162 function Component_Alignment (Id : E) return C is
6163 BT : constant Node_Id := Base_Type (Id);
6166 pragma Assert (Is_Array_Type (Id) or else Is_Record_Type (Id));
6168 if Flag128 (BT) then
6169 if Flag129 (BT) then
6170 return Calign_Storage_Unit;
6172 return Calign_Component_Size_4;
6176 if Flag129 (BT) then
6177 return Calign_Component_Size;
6179 return Calign_Default;
6182 end Component_Alignment;
6184 ----------------------
6185 -- Declaration_Node --
6186 ----------------------
6188 function Declaration_Node (Id : E) return N is
6192 if Ekind (Id) = E_Incomplete_Type
6193 and then Present (Full_View (Id))
6195 P := Parent (Full_View (Id));
6201 if Nkind (P) /= N_Selected_Component
6202 and then Nkind (P) /= N_Expanded_Name
6204 not (Nkind (P) = N_Defining_Program_Unit_Name
6205 and then Is_Child_Unit (Id))
6212 end Declaration_Node;
6214 ---------------------
6215 -- Designated_Type --
6216 ---------------------
6218 function Designated_Type (Id : E) return E is
6222 Desig_Type := Directly_Designated_Type (Id);
6224 if Ekind (Desig_Type) = E_Incomplete_Type
6225 and then Present (Full_View (Desig_Type))
6227 return Full_View (Desig_Type);
6229 elsif Is_Class_Wide_Type (Desig_Type)
6230 and then Ekind (Etype (Desig_Type)) = E_Incomplete_Type
6231 and then Present (Full_View (Etype (Desig_Type)))
6232 and then Present (Class_Wide_Type (Full_View (Etype (Desig_Type))))
6234 return Class_Wide_Type (Full_View (Etype (Desig_Type)));
6239 end Designated_Type;
6241 ----------------------
6242 -- Entry_Index_Type --
6243 ----------------------
6245 function Entry_Index_Type (Id : E) return N is
6247 pragma Assert (Ekind (Id) = E_Entry_Family);
6248 return Etype (Discrete_Subtype_Definition (Parent (Id)));
6249 end Entry_Index_Type;
6251 ---------------------
6252 -- First_Component --
6253 ---------------------
6255 function First_Component (Id : E) return E is
6260 (Is_Record_Type (Id) or else Is_Incomplete_Or_Private_Type (Id));
6262 Comp_Id := First_Entity (Id);
6263 while Present (Comp_Id) loop
6264 exit when Ekind (Comp_Id) = E_Component;
6265 Comp_Id := Next_Entity (Comp_Id);
6269 end First_Component;
6271 -------------------------------------
6272 -- First_Component_Or_Discriminant --
6273 -------------------------------------
6275 function First_Component_Or_Discriminant (Id : E) return E is
6280 (Is_Record_Type (Id)
6281 or else Is_Incomplete_Or_Private_Type (Id)
6282 or else Has_Discriminants (Id));
6284 Comp_Id := First_Entity (Id);
6285 while Present (Comp_Id) loop
6286 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
6287 Comp_Id := Next_Entity (Comp_Id);
6291 end First_Component_Or_Discriminant;
6297 function First_Formal (Id : E) return E is
6302 (Is_Overloadable (Id)
6303 or else Ekind_In (Id, E_Entry_Family,
6305 E_Subprogram_Type));
6307 if Ekind (Id) = E_Enumeration_Literal then
6311 Formal := First_Entity (Id);
6313 if Present (Formal) and then Is_Formal (Formal) then
6321 ------------------------------
6322 -- First_Formal_With_Extras --
6323 ------------------------------
6325 function First_Formal_With_Extras (Id : E) return E is
6330 (Is_Overloadable (Id)
6331 or else Ekind_In (Id, E_Entry_Family,
6333 E_Subprogram_Type));
6335 if Ekind (Id) = E_Enumeration_Literal then
6339 Formal := First_Entity (Id);
6341 if Present (Formal) and then Is_Formal (Formal) then
6344 return Extra_Formals (Id); -- Empty if no extra formals
6347 end First_Formal_With_Extras;
6349 -------------------------------------
6350 -- Get_Attribute_Definition_Clause --
6351 -------------------------------------
6353 function Get_Attribute_Definition_Clause
6355 Id : Attribute_Id) return Node_Id
6360 N := First_Rep_Item (E);
6361 while Present (N) loop
6362 if Nkind (N) = N_Attribute_Definition_Clause
6363 and then Get_Attribute_Id (Chars (N)) = Id
6372 end Get_Attribute_Definition_Clause;
6378 function Get_Full_View (T : Entity_Id) return Entity_Id is
6380 if Ekind (T) = E_Incomplete_Type and then Present (Full_View (T)) then
6381 return Full_View (T);
6383 elsif Is_Class_Wide_Type (T)
6384 and then Ekind (Root_Type (T)) = E_Incomplete_Type
6385 and then Present (Full_View (Root_Type (T)))
6387 return Class_Wide_Type (Full_View (Root_Type (T)));
6398 function Get_Pragma (E : Entity_Id; Id : Pragma_Id) return Node_Id is
6399 Is_CDG : constant Boolean :=
6400 Id = Pragma_Abstract_State or else
6401 Id = Pragma_Async_Readers or else
6402 Id = Pragma_Async_Writers or else
6403 Id = Pragma_Depends or else
6404 Id = Pragma_Effective_Reads or else
6405 Id = Pragma_Effective_Writes or else
6406 Id = Pragma_Global or else
6407 Id = Pragma_Initial_Condition or else
6408 Id = Pragma_Initializes or else
6409 Id = Pragma_Refined_Depends or else
6410 Id = Pragma_Refined_Global or else
6411 Id = Pragma_Refined_State;
6412 Is_CTC : constant Boolean :=
6413 Id = Pragma_Contract_Cases or else
6414 Id = Pragma_Test_Case;
6415 Is_PPC : constant Boolean :=
6416 Id = Pragma_Precondition or else
6417 Id = Pragma_Postcondition;
6419 In_Contract : constant Boolean := Is_CDG or Is_CTC or Is_PPC;
6425 -- Handle pragmas that appear in N_Contract nodes. Those have to be
6426 -- extracted from their specialized list.
6429 Items := Contract (E);
6435 Item := Classifications (Items);
6438 Item := Contract_Test_Cases (Items);
6441 Item := Pre_Post_Conditions (Items);
6447 Item := First_Rep_Item (E);
6450 while Present (Item) loop
6451 if Nkind (Item) = N_Pragma
6452 and then Get_Pragma_Id (Pragma_Name (Item)) = Id
6456 -- All nodes in N_Contract are chained using Next_Pragma
6458 elsif In_Contract then
6459 Item := Next_Pragma (Item);
6464 Next_Rep_Item (Item);
6471 --------------------------------------
6472 -- Get_Record_Representation_Clause --
6473 --------------------------------------
6475 function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id is
6479 N := First_Rep_Item (E);
6480 while Present (N) loop
6481 if Nkind (N) = N_Record_Representation_Clause then
6489 end Get_Record_Representation_Clause;
6491 ------------------------
6492 -- Has_Attach_Handler --
6493 ------------------------
6495 function Has_Attach_Handler (Id : E) return B is
6499 pragma Assert (Is_Protected_Type (Id));
6501 Ritem := First_Rep_Item (Id);
6502 while Present (Ritem) loop
6503 if Nkind (Ritem) = N_Pragma
6504 and then Pragma_Name (Ritem) = Name_Attach_Handler
6508 Next_Rep_Item (Ritem);
6513 end Has_Attach_Handler;
6519 function Has_Entries (Id : E) return B is
6523 pragma Assert (Is_Concurrent_Type (Id));
6525 Ent := First_Entity (Id);
6526 while Present (Ent) loop
6527 if Is_Entry (Ent) then
6531 Ent := Next_Entity (Ent);
6537 ----------------------------
6538 -- Has_Foreign_Convention --
6539 ----------------------------
6541 function Has_Foreign_Convention (Id : E) return B is
6543 -- While regular Intrinsics such as the Standard operators fit in the
6544 -- "Ada" convention, those with an Interface_Name materialize GCC
6545 -- builtin imports for which Ada special treatments shouldn't apply.
6547 return Convention (Id) in Foreign_Convention
6548 or else (Convention (Id) = Convention_Intrinsic
6549 and then Present (Interface_Name (Id)));
6550 end Has_Foreign_Convention;
6552 ---------------------------
6553 -- Has_Interrupt_Handler --
6554 ---------------------------
6556 function Has_Interrupt_Handler (Id : E) return B is
6560 pragma Assert (Is_Protected_Type (Id));
6562 Ritem := First_Rep_Item (Id);
6563 while Present (Ritem) loop
6564 if Nkind (Ritem) = N_Pragma
6565 and then Pragma_Name (Ritem) = Name_Interrupt_Handler
6569 Next_Rep_Item (Ritem);
6574 end Has_Interrupt_Handler;
6576 -----------------------------
6577 -- Has_Non_Null_Refinement --
6578 -----------------------------
6580 function Has_Non_Null_Refinement (Id : E) return B is
6582 -- "Refinement" is a concept applicable only to abstract states
6584 pragma Assert (Ekind (Id) = E_Abstract_State);
6586 if Has_Visible_Refinement (Id) then
6587 pragma Assert (Present (Refinement_Constituents (Id)));
6589 -- For a refinement to be non-null, the first constituent must be
6590 -- anything other than null.
6593 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) /= N_Null;
6597 end Has_Non_Null_Refinement;
6599 -----------------------------
6600 -- Has_Null_Abstract_State --
6601 -----------------------------
6603 function Has_Null_Abstract_State (Id : E) return B is
6605 pragma Assert (Ekind_In (Id, E_Generic_Package, E_Package));
6608 Present (Abstract_States (Id))
6609 and then Is_Null_State (Node (First_Elmt (Abstract_States (Id))));
6610 end Has_Null_Abstract_State;
6612 -------------------------
6613 -- Has_Null_Refinement --
6614 -------------------------
6616 function Has_Null_Refinement (Id : E) return B is
6618 -- "Refinement" is a concept applicable only to abstract states
6620 pragma Assert (Ekind (Id) = E_Abstract_State);
6622 if Has_Visible_Refinement (Id) then
6623 pragma Assert (Present (Refinement_Constituents (Id)));
6625 -- For a refinement to be null, the state's sole constituent must be
6629 Nkind (Node (First_Elmt (Refinement_Constituents (Id)))) = N_Null;
6633 end Has_Null_Refinement;
6635 --------------------
6636 -- Has_Unmodified --
6637 --------------------
6639 function Has_Unmodified (E : Entity_Id) return Boolean is
6641 if Has_Pragma_Unmodified (E) then
6643 elsif Warnings_Off (E) then
6644 Set_Warnings_Off_Used_Unmodified (E);
6651 ---------------------
6652 -- Has_Unreferenced --
6653 ---------------------
6655 function Has_Unreferenced (E : Entity_Id) return Boolean is
6657 if Has_Pragma_Unreferenced (E) then
6659 elsif Warnings_Off (E) then
6660 Set_Warnings_Off_Used_Unreferenced (E);
6665 end Has_Unreferenced;
6667 ----------------------
6668 -- Has_Warnings_Off --
6669 ----------------------
6671 function Has_Warnings_Off (E : Entity_Id) return Boolean is
6673 if Warnings_Off (E) then
6674 Set_Warnings_Off_Used (E);
6679 end Has_Warnings_Off;
6681 ------------------------------
6682 -- Implementation_Base_Type --
6683 ------------------------------
6685 function Implementation_Base_Type (Id : E) return E is
6690 Bastyp := Base_Type (Id);
6692 if Is_Incomplete_Or_Private_Type (Bastyp) then
6693 Imptyp := Underlying_Type (Bastyp);
6695 -- If we have an implementation type, then just return it,
6696 -- otherwise we return the Base_Type anyway. This can only
6697 -- happen in error situations and should avoid some error bombs.
6699 if Present (Imptyp) then
6700 return Base_Type (Imptyp);
6708 end Implementation_Base_Type;
6710 -------------------------
6711 -- Invariant_Procedure --
6712 -------------------------
6714 function Invariant_Procedure (Id : E) return E is
6718 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
6720 if No (Subprograms_For_Type (Id)) then
6724 S := Subprograms_For_Type (Id);
6725 while Present (S) loop
6726 if Is_Invariant_Procedure (S) then
6729 S := Subprograms_For_Type (S);
6735 end Invariant_Procedure;
6741 -- Global flag table allowing rapid computation of this function
6743 Entity_Is_Base_Type : constant array (Entity_Kind) of Boolean :=
6744 (E_Enumeration_Subtype |
6746 E_Signed_Integer_Subtype |
6747 E_Modular_Integer_Subtype |
6748 E_Floating_Point_Subtype |
6749 E_Ordinary_Fixed_Point_Subtype |
6750 E_Decimal_Fixed_Point_Subtype |
6755 E_Record_Subtype_With_Private |
6756 E_Limited_Private_Subtype |
6758 E_Protected_Subtype |
6760 E_String_Literal_Subtype |
6761 E_Class_Wide_Subtype => False,
6764 function Is_Base_Type (Id : E) return Boolean is
6766 return Entity_Is_Base_Type (Ekind (Id));
6769 ---------------------
6770 -- Is_Boolean_Type --
6771 ---------------------
6773 function Is_Boolean_Type (Id : E) return B is
6775 return Root_Type (Id) = Standard_Boolean;
6776 end Is_Boolean_Type;
6778 ------------------------
6779 -- Is_Constant_Object --
6780 ------------------------
6782 function Is_Constant_Object (Id : E) return B is
6783 K : constant Entity_Kind := Ekind (Id);
6786 K = E_Constant or else K = E_In_Parameter or else K = E_Loop_Parameter;
6787 end Is_Constant_Object;
6789 --------------------
6790 -- Is_Discriminal --
6791 --------------------
6793 function Is_Discriminal (Id : E) return B is
6795 return (Ekind_In (Id, E_Constant, E_In_Parameter)
6796 and then Present (Discriminal_Link (Id)));
6799 ----------------------
6800 -- Is_Dynamic_Scope --
6801 ----------------------
6803 function Is_Dynamic_Scope (Id : E) return B is
6806 Ekind (Id) = E_Block
6808 Ekind (Id) = E_Function
6810 Ekind (Id) = E_Procedure
6812 Ekind (Id) = E_Subprogram_Body
6814 Ekind (Id) = E_Task_Type
6816 (Ekind (Id) = E_Limited_Private_Type
6817 and then Present (Full_View (Id))
6818 and then Ekind (Full_View (Id)) = E_Task_Type)
6820 Ekind (Id) = E_Entry
6822 Ekind (Id) = E_Entry_Family
6824 Ekind (Id) = E_Return_Statement;
6825 end Is_Dynamic_Scope;
6827 --------------------
6828 -- Is_Entity_Name --
6829 --------------------
6831 function Is_Entity_Name (N : Node_Id) return Boolean is
6832 Kind : constant Node_Kind := Nkind (N);
6835 -- Identifiers, operator symbols, expanded names are entity names
6837 return Kind = N_Identifier
6838 or else Kind = N_Operator_Symbol
6839 or else Kind = N_Expanded_Name
6841 -- Attribute references are entity names if they refer to an entity.
6842 -- Note that we don't do this by testing for the presence of the
6843 -- Entity field in the N_Attribute_Reference node, since it may not
6844 -- have been set yet.
6846 or else (Kind = N_Attribute_Reference
6847 and then Is_Entity_Attribute_Name (Attribute_Name (N)));
6850 -----------------------
6851 -- Is_External_State --
6852 -----------------------
6854 function Is_External_State (Id : E) return B is
6857 Ekind (Id) = E_Abstract_State and then Has_Option (Id, Name_External);
6858 end Is_External_State;
6864 function Is_Finalizer (Id : E) return B is
6866 return Ekind (Id) = E_Procedure and then Chars (Id) = Name_uFinalizer;
6869 ---------------------
6870 -- Is_Ghost_Entity --
6871 ---------------------
6873 function Is_Ghost_Entity (Id : E) return B is
6875 if Present (Id) and then Ekind (Id) = E_Variable then
6876 return Convention (Id) = Convention_Ghost;
6878 return Is_Ghost_Subprogram (Id);
6880 end Is_Ghost_Entity;
6882 -------------------------
6883 -- Is_Ghost_Subprogram --
6884 -------------------------
6886 function Is_Ghost_Subprogram (Id : E) return B is
6888 if Present (Id) and then Ekind_In (Id, E_Function, E_Procedure) then
6889 return Convention (Id) = Convention_Ghost;
6893 end Is_Ghost_Subprogram;
6895 -------------------------
6896 -- Is_Input_Only_State --
6897 -------------------------
6899 function Is_Input_Only_State (Id : E) return B is
6902 Ekind (Id) = E_Abstract_State
6903 and then Has_Option (Id, Name_Input_Only);
6904 end Is_Input_Only_State;
6906 ---------------------------
6907 -- Is_Non_Volatile_State --
6908 ---------------------------
6910 function Is_Non_Volatile_State (Id : E) return B is
6913 Ekind (Id) = E_Abstract_State
6914 and then Has_Option (Id, Name_Non_Volatile);
6915 end Is_Non_Volatile_State;
6921 function Is_Null_State (Id : E) return B is
6924 Ekind (Id) = E_Abstract_State and then Nkind (Parent (Id)) = N_Null;
6927 ---------------------
6928 -- Is_Output_State --
6929 ---------------------
6931 function Is_Output_Only_State (Id : E) return B is
6934 Ekind (Id) = E_Abstract_State
6935 and then Has_Option (Id, Name_Output_Only);
6936 end Is_Output_Only_State;
6938 -----------------------------------
6939 -- Is_Package_Or_Generic_Package --
6940 -----------------------------------
6942 function Is_Package_Or_Generic_Package (Id : E) return B is
6944 return Ekind_In (Id, E_Generic_Package, E_Package);
6945 end Is_Package_Or_Generic_Package;
6951 function Is_Prival (Id : E) return B is
6953 return (Ekind_In (Id, E_Constant, E_Variable)
6954 and then Present (Prival_Link (Id)));
6957 ----------------------------
6958 -- Is_Protected_Component --
6959 ----------------------------
6961 function Is_Protected_Component (Id : E) return B is
6963 return Ekind (Id) = E_Component and then Is_Protected_Type (Scope (Id));
6964 end Is_Protected_Component;
6966 ----------------------------
6967 -- Is_Protected_Interface --
6968 ----------------------------
6970 function Is_Protected_Interface (Id : E) return B is
6971 Typ : constant Entity_Id := Base_Type (Id);
6973 if not Is_Interface (Typ) then
6975 elsif Is_Class_Wide_Type (Typ) then
6976 return Is_Protected_Interface (Etype (Typ));
6978 return Protected_Present (Type_Definition (Parent (Typ)));
6980 end Is_Protected_Interface;
6982 ------------------------------
6983 -- Is_Protected_Record_Type --
6984 ------------------------------
6986 function Is_Protected_Record_Type (Id : E) return B is
6989 Is_Concurrent_Record_Type (Id)
6990 and then Is_Protected_Type (Corresponding_Concurrent_Type (Id));
6991 end Is_Protected_Record_Type;
6993 --------------------------------
6994 -- Is_Standard_Character_Type --
6995 --------------------------------
6997 function Is_Standard_Character_Type (Id : E) return B is
6999 if Is_Type (Id) then
7001 R : constant Entity_Id := Root_Type (Id);
7004 R = Standard_Character
7006 R = Standard_Wide_Character
7008 R = Standard_Wide_Wide_Character;
7014 end Is_Standard_Character_Type;
7016 --------------------
7017 -- Is_String_Type --
7018 --------------------
7020 function Is_String_Type (Id : E) return B is
7022 return Ekind (Id) in String_Kind
7023 or else (Is_Array_Type (Id)
7024 and then Id /= Any_Composite
7025 and then Number_Dimensions (Id) = 1
7026 and then Is_Character_Type (Component_Type (Id)));
7029 -------------------------------
7030 -- Is_Synchronized_Interface --
7031 -------------------------------
7033 function Is_Synchronized_Interface (Id : E) return B is
7034 Typ : constant Entity_Id := Base_Type (Id);
7037 if not Is_Interface (Typ) then
7040 elsif Is_Class_Wide_Type (Typ) then
7041 return Is_Synchronized_Interface (Etype (Typ));
7044 return Protected_Present (Type_Definition (Parent (Typ)))
7045 or else Synchronized_Present (Type_Definition (Parent (Typ)))
7046 or else Task_Present (Type_Definition (Parent (Typ)));
7048 end Is_Synchronized_Interface;
7050 -----------------------
7051 -- Is_Task_Interface --
7052 -----------------------
7054 function Is_Task_Interface (Id : E) return B is
7055 Typ : constant Entity_Id := Base_Type (Id);
7057 if not Is_Interface (Typ) then
7059 elsif Is_Class_Wide_Type (Typ) then
7060 return Is_Task_Interface (Etype (Typ));
7062 return Task_Present (Type_Definition (Parent (Typ)));
7064 end Is_Task_Interface;
7066 -------------------------
7067 -- Is_Task_Record_Type --
7068 -------------------------
7070 function Is_Task_Record_Type (Id : E) return B is
7073 Is_Concurrent_Record_Type (Id)
7074 and then Is_Task_Type (Corresponding_Concurrent_Type (Id));
7075 end Is_Task_Record_Type;
7077 ------------------------
7078 -- Is_Wrapper_Package --
7079 ------------------------
7081 function Is_Wrapper_Package (Id : E) return B is
7083 return (Ekind (Id) = E_Package and then Present (Related_Instance (Id)));
7084 end Is_Wrapper_Package;
7090 function Last_Formal (Id : E) return E is
7095 (Is_Overloadable (Id)
7096 or else Ekind_In (Id, E_Entry_Family,
7098 E_Subprogram_Type));
7100 if Ekind (Id) = E_Enumeration_Literal then
7104 Formal := First_Formal (Id);
7106 if Present (Formal) then
7107 while Present (Next_Formal (Formal)) loop
7108 Formal := Next_Formal (Formal);
7116 function Model_Emin_Value (Id : E) return Uint is
7118 return Machine_Emin_Value (Id);
7119 end Model_Emin_Value;
7121 -------------------------
7122 -- Model_Epsilon_Value --
7123 -------------------------
7125 function Model_Epsilon_Value (Id : E) return Ureal is
7126 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7128 return Radix ** (1 - Model_Mantissa_Value (Id));
7129 end Model_Epsilon_Value;
7131 --------------------------
7132 -- Model_Mantissa_Value --
7133 --------------------------
7135 function Model_Mantissa_Value (Id : E) return Uint is
7137 return Machine_Mantissa_Value (Id);
7138 end Model_Mantissa_Value;
7140 -----------------------
7141 -- Model_Small_Value --
7142 -----------------------
7144 function Model_Small_Value (Id : E) return Ureal is
7145 Radix : constant Ureal := UR_From_Uint (Machine_Radix_Value (Id));
7147 return Radix ** (Model_Emin_Value (Id) - 1);
7148 end Model_Small_Value;
7150 ------------------------
7151 -- Machine_Emax_Value --
7152 ------------------------
7154 function Machine_Emax_Value (Id : E) return Uint is
7155 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7158 case Float_Rep (Id) is
7161 when 1 .. 6 => return Uint_128;
7162 when 7 .. 15 => return 2**10;
7163 when 16 .. 33 => return 2**14;
7164 when others => return No_Uint;
7169 when 1 .. 9 => return 2**7 - 1;
7170 when 10 .. 15 => return 2**10 - 1;
7171 when others => return No_Uint;
7175 return Uint_2 ** Uint_7 - Uint_1;
7177 end Machine_Emax_Value;
7179 ------------------------
7180 -- Machine_Emin_Value --
7181 ------------------------
7183 function Machine_Emin_Value (Id : E) return Uint is
7185 case Float_Rep (Id) is
7186 when IEEE_Binary => return Uint_3 - Machine_Emax_Value (Id);
7187 when VAX_Native => return -Machine_Emax_Value (Id);
7188 when AAMP => return -Machine_Emax_Value (Id);
7190 end Machine_Emin_Value;
7192 ----------------------------
7193 -- Machine_Mantissa_Value --
7194 ----------------------------
7196 function Machine_Mantissa_Value (Id : E) return Uint is
7197 Digs : constant Pos := UI_To_Int (Digits_Value (Base_Type (Id)));
7200 case Float_Rep (Id) is
7203 when 1 .. 6 => return Uint_24;
7204 when 7 .. 15 => return UI_From_Int (53);
7205 when 16 .. 18 => return Uint_64;
7206 when 19 .. 33 => return UI_From_Int (113);
7207 when others => return No_Uint;
7212 when 1 .. 6 => return Uint_24;
7213 when 7 .. 9 => return UI_From_Int (56);
7214 when 10 .. 15 => return UI_From_Int (53);
7215 when others => return No_Uint;
7220 when 1 .. 6 => return Uint_24;
7221 when 7 .. 9 => return UI_From_Int (40);
7222 when others => return No_Uint;
7225 end Machine_Mantissa_Value;
7227 -------------------------
7228 -- Machine_Radix_Value --
7229 -------------------------
7231 function Machine_Radix_Value (Id : E) return U is
7233 case Float_Rep (Id) is
7234 when IEEE_Binary | VAX_Native | AAMP =>
7237 end Machine_Radix_Value;
7239 --------------------
7240 -- Next_Component --
7241 --------------------
7243 function Next_Component (Id : E) return E is
7247 Comp_Id := Next_Entity (Id);
7248 while Present (Comp_Id) loop
7249 exit when Ekind (Comp_Id) = E_Component;
7250 Comp_Id := Next_Entity (Comp_Id);
7256 ------------------------------------
7257 -- Next_Component_Or_Discriminant --
7258 ------------------------------------
7260 function Next_Component_Or_Discriminant (Id : E) return E is
7264 Comp_Id := Next_Entity (Id);
7265 while Present (Comp_Id) loop
7266 exit when Ekind_In (Comp_Id, E_Component, E_Discriminant);
7267 Comp_Id := Next_Entity (Comp_Id);
7271 end Next_Component_Or_Discriminant;
7273 -----------------------
7274 -- Next_Discriminant --
7275 -----------------------
7277 -- This function actually implements both Next_Discriminant and
7278 -- Next_Stored_Discriminant by making sure that the Discriminant
7279 -- returned is of the same variety as Id.
7281 function Next_Discriminant (Id : E) return E is
7283 -- Derived Tagged types with private extensions look like this...
7285 -- E_Discriminant d1
7286 -- E_Discriminant d2
7288 -- E_Discriminant d1
7289 -- E_Discriminant d2
7292 -- so it is critical not to go past the leading discriminants
7297 pragma Assert (Ekind (Id) = E_Discriminant);
7300 D := Next_Entity (D);
7302 or else (Ekind (D) /= E_Discriminant
7303 and then not Is_Itype (D))
7308 exit when Ekind (D) = E_Discriminant
7309 and then (Is_Completely_Hidden (D) = Is_Completely_Hidden (Id));
7313 end Next_Discriminant;
7319 function Next_Formal (Id : E) return E is
7323 -- Follow the chain of declared entities as long as the kind of the
7324 -- entity corresponds to a formal parameter. Skip internal entities
7325 -- that may have been created for implicit subtypes, in the process
7326 -- of analyzing default expressions.
7330 P := Next_Entity (P);
7332 if No (P) or else Is_Formal (P) then
7334 elsif not Is_Internal (P) then
7340 -----------------------------
7341 -- Next_Formal_With_Extras --
7342 -----------------------------
7344 function Next_Formal_With_Extras (Id : E) return E is
7346 if Present (Extra_Formal (Id)) then
7347 return Extra_Formal (Id);
7349 return Next_Formal (Id);
7351 end Next_Formal_With_Extras;
7357 function Next_Index (Id : Node_Id) return Node_Id is
7366 function Next_Literal (Id : E) return E is
7368 pragma Assert (Nkind (Id) in N_Entity);
7372 ------------------------------
7373 -- Next_Stored_Discriminant --
7374 ------------------------------
7376 function Next_Stored_Discriminant (Id : E) return E is
7378 -- See comment in Next_Discriminant
7380 return Next_Discriminant (Id);
7381 end Next_Stored_Discriminant;
7383 -----------------------
7384 -- Number_Dimensions --
7385 -----------------------
7387 function Number_Dimensions (Id : E) return Pos is
7392 if Ekind (Id) in String_Kind then
7397 T := First_Index (Id);
7398 while Present (T) loop
7405 end Number_Dimensions;
7407 --------------------
7408 -- Number_Entries --
7409 --------------------
7411 function Number_Entries (Id : E) return Nat is
7416 pragma Assert (Is_Concurrent_Type (Id));
7419 Ent := First_Entity (Id);
7420 while Present (Ent) loop
7421 if Is_Entry (Ent) then
7425 Ent := Next_Entity (Ent);
7431 --------------------
7432 -- Number_Formals --
7433 --------------------
7435 function Number_Formals (Id : E) return Pos is
7441 Formal := First_Formal (Id);
7442 while Present (Formal) loop
7444 Formal := Next_Formal (Formal);
7450 --------------------
7451 -- Parameter_Mode --
7452 --------------------
7454 function Parameter_Mode (Id : E) return Formal_Kind is
7459 ------------------------
7460 -- Predicate_Function --
7461 ------------------------
7463 function Predicate_Function (Id : E) return E is
7468 pragma Assert (Is_Type (Id));
7470 -- If type is private and has a completion, predicate may be defined
7471 -- on the full view.
7473 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7474 T := Full_View (Id);
7479 if No (Subprograms_For_Type (T)) then
7483 S := Subprograms_For_Type (T);
7484 while Present (S) loop
7485 if Is_Predicate_Function (S) then
7488 S := Subprograms_For_Type (S);
7494 end Predicate_Function;
7496 --------------------------
7497 -- Predicate_Function_M --
7498 --------------------------
7500 function Predicate_Function_M (Id : E) return E is
7505 pragma Assert (Is_Type (Id));
7507 -- If type is private and has a completion, predicate may be defined
7508 -- on the full view.
7510 if Is_Private_Type (Id) and then Present (Full_View (Id)) then
7511 T := Full_View (Id);
7516 if No (Subprograms_For_Type (T)) then
7520 S := Subprograms_For_Type (T);
7521 while Present (S) loop
7522 if Is_Predicate_Function_M (S) then
7525 S := Subprograms_For_Type (S);
7531 end Predicate_Function_M;
7533 -------------------------
7534 -- Present_In_Rep_Item --
7535 -------------------------
7537 function Present_In_Rep_Item (E : Entity_Id; N : Node_Id) return Boolean is
7541 Ritem := First_Rep_Item (E);
7543 while Present (Ritem) loop
7548 Next_Rep_Item (Ritem);
7552 end Present_In_Rep_Item;
7554 --------------------------
7555 -- Primitive_Operations --
7556 --------------------------
7558 function Primitive_Operations (Id : E) return L is
7560 if Is_Concurrent_Type (Id) then
7561 if Present (Corresponding_Record_Type (Id)) then
7562 return Direct_Primitive_Operations
7563 (Corresponding_Record_Type (Id));
7565 -- If expansion is disabled the corresponding record type is absent,
7566 -- but if the type has ancestors it may have primitive operations.
7568 elsif Is_Tagged_Type (Id) then
7569 return Direct_Primitive_Operations (Id);
7575 return Direct_Primitive_Operations (Id);
7577 end Primitive_Operations;
7579 ---------------------
7580 -- Record_Rep_Item --
7581 ---------------------
7583 procedure Record_Rep_Item (E : Entity_Id; N : Node_Id) is
7585 Set_Next_Rep_Item (N, First_Rep_Item (E));
7586 Set_First_Rep_Item (E, N);
7587 end Record_Rep_Item;
7593 function Root_Type (Id : E) return E is
7597 pragma Assert (Nkind (Id) in N_Entity);
7599 T := Base_Type (Id);
7601 if Ekind (T) = E_Class_Wide_Type then
7613 -- Following test catches some error cases resulting from
7616 elsif No (Etyp) then
7617 Check_Error_Detected;
7620 elsif Is_Private_Type (T) and then Etyp = Full_View (T) then
7623 elsif Is_Private_Type (Etyp) and then Full_View (Etyp) = T then
7629 -- Return if there is a circularity in the inheritance chain. This
7630 -- happens in some error situations and we do not want to get
7631 -- stuck in this loop.
7633 if T = Base_Type (Id) then
7640 ---------------------
7641 -- Safe_Emax_Value --
7642 ---------------------
7644 function Safe_Emax_Value (Id : E) return Uint is
7646 return Machine_Emax_Value (Id);
7647 end Safe_Emax_Value;
7649 ----------------------
7650 -- Safe_First_Value --
7651 ----------------------
7653 function Safe_First_Value (Id : E) return Ureal is
7655 return -Safe_Last_Value (Id);
7656 end Safe_First_Value;
7658 ---------------------
7659 -- Safe_Last_Value --
7660 ---------------------
7662 function Safe_Last_Value (Id : E) return Ureal is
7663 Radix : constant Uint := Machine_Radix_Value (Id);
7664 Mantissa : constant Uint := Machine_Mantissa_Value (Id);
7665 Emax : constant Uint := Safe_Emax_Value (Id);
7666 Significand : constant Uint := Radix ** Mantissa - 1;
7667 Exponent : constant Uint := Emax - Mantissa;
7673 (Num => Significand * 2 ** (Exponent mod 4),
7674 Den => -Exponent / 4,
7680 (Num => Significand,
7684 end Safe_Last_Value;
7690 function Scope_Depth (Id : E) return Uint is
7695 while Is_Record_Type (Scop) loop
7696 Scop := Scope (Scop);
7699 return Scope_Depth_Value (Scop);
7702 ---------------------
7703 -- Scope_Depth_Set --
7704 ---------------------
7706 function Scope_Depth_Set (Id : E) return B is
7708 return not Is_Record_Type (Id)
7709 and then Field22 (Id) /= Union_Id (Empty);
7710 end Scope_Depth_Set;
7712 -----------------------------
7713 -- Set_Component_Alignment --
7714 -----------------------------
7716 -- Component Alignment is encoded using two flags, Flag128/129 as
7717 -- follows. Note that both flags False = Align_Default, so that the
7718 -- default initialization of flags to False initializes component
7719 -- alignment to the default value as required.
7721 -- Flag128 Flag129 Value
7722 -- ------- ------- -----
7723 -- False False Calign_Default
7724 -- False True Calign_Component_Size
7725 -- True False Calign_Component_Size_4
7726 -- True True Calign_Storage_Unit
7728 procedure Set_Component_Alignment (Id : E; V : C) is
7730 pragma Assert ((Is_Array_Type (Id) or else Is_Record_Type (Id))
7731 and then Is_Base_Type (Id));
7734 when Calign_Default =>
7735 Set_Flag128 (Id, False);
7736 Set_Flag129 (Id, False);
7738 when Calign_Component_Size =>
7739 Set_Flag128 (Id, False);
7740 Set_Flag129 (Id, True);
7742 when Calign_Component_Size_4 =>
7743 Set_Flag128 (Id, True);
7744 Set_Flag129 (Id, False);
7746 when Calign_Storage_Unit =>
7747 Set_Flag128 (Id, True);
7748 Set_Flag129 (Id, True);
7750 end Set_Component_Alignment;
7752 -----------------------------
7753 -- Set_Invariant_Procedure --
7754 -----------------------------
7756 procedure Set_Invariant_Procedure (Id : E; V : E) is
7760 pragma Assert (Is_Type (Id) and then Has_Invariants (Id));
7762 S := Subprograms_For_Type (Id);
7763 Set_Subprograms_For_Type (Id, V);
7764 Set_Subprograms_For_Type (V, S);
7766 -- Check for duplicate entry
7768 while Present (S) loop
7769 if Is_Invariant_Procedure (S) then
7770 raise Program_Error;
7772 S := Subprograms_For_Type (S);
7775 end Set_Invariant_Procedure;
7777 ----------------------------
7778 -- Set_Predicate_Function --
7779 ----------------------------
7781 procedure Set_Predicate_Function (Id : E; V : E) is
7785 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7787 S := Subprograms_For_Type (Id);
7788 Set_Subprograms_For_Type (Id, V);
7789 Set_Subprograms_For_Type (V, S);
7791 while Present (S) loop
7792 if Is_Predicate_Function (S) then
7793 raise Program_Error;
7795 S := Subprograms_For_Type (S);
7798 end Set_Predicate_Function;
7800 ------------------------------
7801 -- Set_Predicate_Function_M --
7802 ------------------------------
7804 procedure Set_Predicate_Function_M (Id : E; V : E) is
7808 pragma Assert (Is_Type (Id) and then Has_Predicates (Id));
7810 S := Subprograms_For_Type (Id);
7811 Set_Subprograms_For_Type (Id, V);
7812 Set_Subprograms_For_Type (V, S);
7814 -- Check for duplicates
7816 while Present (S) loop
7817 if Is_Predicate_Function_M (S) then
7818 raise Program_Error;
7820 S := Subprograms_For_Type (S);
7823 end Set_Predicate_Function_M;
7829 function Size_Clause (Id : E) return N is
7831 return Get_Attribute_Definition_Clause (Id, Attribute_Size);
7834 ------------------------
7835 -- Stream_Size_Clause --
7836 ------------------------
7838 function Stream_Size_Clause (Id : E) return N is
7840 return Get_Attribute_Definition_Clause (Id, Attribute_Stream_Size);
7841 end Stream_Size_Clause;
7847 function Subtype_Kind (K : Entity_Kind) return Entity_Kind is
7853 Kind := E_Access_Subtype;
7857 Kind := E_Array_Subtype;
7859 when E_Class_Wide_Type |
7860 E_Class_Wide_Subtype =>
7861 Kind := E_Class_Wide_Subtype;
7863 when E_Decimal_Fixed_Point_Type |
7864 E_Decimal_Fixed_Point_Subtype =>
7865 Kind := E_Decimal_Fixed_Point_Subtype;
7867 when E_Ordinary_Fixed_Point_Type |
7868 E_Ordinary_Fixed_Point_Subtype =>
7869 Kind := E_Ordinary_Fixed_Point_Subtype;
7871 when E_Private_Type |
7872 E_Private_Subtype =>
7873 Kind := E_Private_Subtype;
7875 when E_Limited_Private_Type |
7876 E_Limited_Private_Subtype =>
7877 Kind := E_Limited_Private_Subtype;
7879 when E_Record_Type_With_Private |
7880 E_Record_Subtype_With_Private =>
7881 Kind := E_Record_Subtype_With_Private;
7883 when E_Record_Type |
7885 Kind := E_Record_Subtype;
7887 when E_String_Type |
7889 Kind := E_String_Subtype;
7891 when Enumeration_Kind =>
7892 Kind := E_Enumeration_Subtype;
7895 Kind := E_Floating_Point_Subtype;
7897 when Signed_Integer_Kind =>
7898 Kind := E_Signed_Integer_Subtype;
7900 when Modular_Integer_Kind =>
7901 Kind := E_Modular_Integer_Subtype;
7903 when Protected_Kind =>
7904 Kind := E_Protected_Subtype;
7907 Kind := E_Task_Subtype;
7911 raise Program_Error;
7917 ---------------------
7918 -- Type_High_Bound --
7919 ---------------------
7921 function Type_High_Bound (Id : E) return Node_Id is
7922 Rng : constant Node_Id := Scalar_Range (Id);
7924 if Nkind (Rng) = N_Subtype_Indication then
7925 return High_Bound (Range_Expression (Constraint (Rng)));
7927 return High_Bound (Rng);
7929 end Type_High_Bound;
7931 --------------------
7932 -- Type_Low_Bound --
7933 --------------------
7935 function Type_Low_Bound (Id : E) return Node_Id is
7936 Rng : constant Node_Id := Scalar_Range (Id);
7938 if Nkind (Rng) = N_Subtype_Indication then
7939 return Low_Bound (Range_Expression (Constraint (Rng)));
7941 return Low_Bound (Rng);
7945 ---------------------
7946 -- Underlying_Type --
7947 ---------------------
7949 function Underlying_Type (Id : E) return E is
7951 -- For record_with_private the underlying type is always the direct
7952 -- full view. Never try to take the full view of the parent it
7953 -- doesn't make sense.
7955 if Ekind (Id) = E_Record_Type_With_Private then
7956 return Full_View (Id);
7958 elsif Ekind (Id) in Incomplete_Or_Private_Kind then
7960 -- If we have an incomplete or private type with a full view,
7961 -- then we return the Underlying_Type of this full view
7963 if Present (Full_View (Id)) then
7964 if Id = Full_View (Id) then
7966 -- Previous error in declaration
7971 return Underlying_Type (Full_View (Id));
7974 -- If we have an incomplete entity that comes from the limited
7975 -- view then we return the Underlying_Type of its non-limited
7978 elsif From_Limited_With (Id)
7979 and then Present (Non_Limited_View (Id))
7981 return Underlying_Type (Non_Limited_View (Id));
7983 -- Otherwise check for the case where we have a derived type or
7984 -- subtype, and if so get the Underlying_Type of the parent type.
7986 elsif Etype (Id) /= Id then
7987 return Underlying_Type (Etype (Id));
7989 -- Otherwise we have an incomplete or private type that has
7990 -- no full view, which means that we have not encountered the
7991 -- completion, so return Empty to indicate the underlying type
7992 -- is not yet known.
7998 -- For non-incomplete, non-private types, return the type itself
7999 -- Also for entities that are not types at all return the entity
8005 end Underlying_Type;
8011 function Vax_Float (Id : E) return B is
8013 return Is_Floating_Point_Type (Id) and then Float_Rep (Id) = VAX_Native;
8016 ------------------------
8017 -- Write_Entity_Flags --
8018 ------------------------
8020 procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String) is
8022 procedure W (Flag_Name : String; Flag : Boolean);
8023 -- Write out given flag if it is set
8029 procedure W (Flag_Name : String; Flag : Boolean) is
8033 Write_Str (Flag_Name);
8034 Write_Str (" = True");
8039 -- Start of processing for Write_Entity_Flags
8042 if (Is_Array_Type (Id) or else Is_Record_Type (Id))
8043 and then Is_Base_Type (Id)
8046 Write_Str ("Component_Alignment = ");
8048 case Component_Alignment (Id) is
8049 when Calign_Default =>
8050 Write_Str ("Calign_Default");
8052 when Calign_Component_Size =>
8053 Write_Str ("Calign_Component_Size");
8055 when Calign_Component_Size_4 =>
8056 Write_Str ("Calign_Component_Size_4");
8058 when Calign_Storage_Unit =>
8059 Write_Str ("Calign_Storage_Unit");
8065 W ("Address_Taken", Flag104 (Id));
8066 W ("Body_Needed_For_SAL", Flag40 (Id));
8067 W ("C_Pass_By_Copy", Flag125 (Id));
8068 W ("Can_Never_Be_Null", Flag38 (Id));
8069 W ("Checks_May_Be_Suppressed", Flag31 (Id));
8070 W ("Debug_Info_Off", Flag166 (Id));
8071 W ("Default_Expressions_Processed", Flag108 (Id));
8072 W ("Delay_Cleanups", Flag114 (Id));
8073 W ("Delay_Subprogram_Descriptors", Flag50 (Id));
8074 W ("Depends_On_Private", Flag14 (Id));
8075 W ("Discard_Names", Flag88 (Id));
8076 W ("Elaboration_Entity_Required", Flag174 (Id));
8077 W ("Elaborate_Body_Desirable", Flag210 (Id));
8078 W ("Entry_Accepted", Flag152 (Id));
8079 W ("Can_Use_Internal_Rep", Flag229 (Id));
8080 W ("Finalize_Storage_Only", Flag158 (Id));
8081 W ("From_Limited_With", Flag159 (Id));
8082 W ("Has_Aliased_Components", Flag135 (Id));
8083 W ("Has_Alignment_Clause", Flag46 (Id));
8084 W ("Has_All_Calls_Remote", Flag79 (Id));
8085 W ("Has_Anonymous_Master", Flag253 (Id));
8086 W ("Has_Atomic_Components", Flag86 (Id));
8087 W ("Has_Biased_Representation", Flag139 (Id));
8088 W ("Has_Body_References", Flag264 (Id));
8089 W ("Has_Completion", Flag26 (Id));
8090 W ("Has_Completion_In_Body", Flag71 (Id));
8091 W ("Has_Complex_Representation", Flag140 (Id));
8092 W ("Has_Component_Size_Clause", Flag68 (Id));
8093 W ("Has_Contiguous_Rep", Flag181 (Id));
8094 W ("Has_Controlled_Component", Flag43 (Id));
8095 W ("Has_Controlling_Result", Flag98 (Id));
8096 W ("Has_Convention_Pragma", Flag119 (Id));
8097 W ("Has_Default_Aspect", Flag39 (Id));
8098 W ("Has_Delayed_Aspects", Flag200 (Id));
8099 W ("Has_Delayed_Freeze", Flag18 (Id));
8100 W ("Has_Delayed_Rep_Aspects", Flag261 (Id));
8101 W ("Has_Discriminants", Flag5 (Id));
8102 W ("Has_Dispatch_Table", Flag220 (Id));
8103 W ("Has_Dynamic_Predicate_Aspect", Flag258 (Id));
8104 W ("Has_Enumeration_Rep_Clause", Flag66 (Id));
8105 W ("Has_Exit", Flag47 (Id));
8106 W ("Has_External_Tag_Rep_Clause", Flag110 (Id));
8107 W ("Has_Forward_Instantiation", Flag175 (Id));
8108 W ("Has_Fully_Qualified_Name", Flag173 (Id));
8109 W ("Has_Gigi_Rep_Item", Flag82 (Id));
8110 W ("Has_Homonym", Flag56 (Id));
8111 W ("Has_Implicit_Dereference", Flag251 (Id));
8112 W ("Has_Inheritable_Invariants", Flag248 (Id));
8113 W ("Has_Initial_Value", Flag219 (Id));
8114 W ("Has_Invariants", Flag232 (Id));
8115 W ("Has_Loop_Entry_Attributes", Flag260 (Id));
8116 W ("Has_Machine_Radix_Clause", Flag83 (Id));
8117 W ("Has_Master_Entity", Flag21 (Id));
8118 W ("Has_Missing_Return", Flag142 (Id));
8119 W ("Has_Nested_Block_With_Handler", Flag101 (Id));
8120 W ("Has_Non_Standard_Rep", Flag75 (Id));
8121 W ("Has_Object_Size_Clause", Flag172 (Id));
8122 W ("Has_Per_Object_Constraint", Flag154 (Id));
8123 W ("Has_Postconditions", Flag240 (Id));
8124 W ("Has_Pragma_Controlled", Flag27 (Id));
8125 W ("Has_Pragma_Elaborate_Body", Flag150 (Id));
8126 W ("Has_Pragma_Inline", Flag157 (Id));
8127 W ("Has_Pragma_Inline_Always", Flag230 (Id));
8128 W ("Has_Pragma_No_Inline", Flag201 (Id));
8129 W ("Has_Pragma_Ordered", Flag198 (Id));
8130 W ("Has_Pragma_Pack", Flag121 (Id));
8131 W ("Has_Pragma_Preelab_Init", Flag221 (Id));
8132 W ("Has_Pragma_Pure", Flag203 (Id));
8133 W ("Has_Pragma_Pure_Function", Flag179 (Id));
8134 W ("Has_Pragma_Thread_Local_Storage", Flag169 (Id));
8135 W ("Has_Pragma_Unmodified", Flag233 (Id));
8136 W ("Has_Pragma_Unreferenced", Flag180 (Id));
8137 W ("Has_Pragma_Unreferenced_Objects", Flag212 (Id));
8138 W ("Has_Predicates", Flag250 (Id));
8139 W ("Has_Primitive_Operations", Flag120 (Id));
8140 W ("Has_Private_Ancestor", Flag151 (Id));
8141 W ("Has_Private_Declaration", Flag155 (Id));
8142 W ("Has_Qualified_Name", Flag161 (Id));
8143 W ("Has_RACW", Flag214 (Id));
8144 W ("Has_Record_Rep_Clause", Flag65 (Id));
8145 W ("Has_Recursive_Call", Flag143 (Id));
8146 W ("Has_Size_Clause", Flag29 (Id));
8147 W ("Has_Small_Clause", Flag67 (Id));
8148 W ("Has_Specified_Layout", Flag100 (Id));
8149 W ("Has_Specified_Stream_Input", Flag190 (Id));
8150 W ("Has_Specified_Stream_Output", Flag191 (Id));
8151 W ("Has_Specified_Stream_Read", Flag192 (Id));
8152 W ("Has_Specified_Stream_Write", Flag193 (Id));
8153 W ("Has_Static_Discriminants", Flag211 (Id));
8154 W ("Has_Static_Predicate_Aspect", Flag259 (Id));
8155 W ("Has_Storage_Size_Clause", Flag23 (Id));
8156 W ("Has_Stream_Size_Clause", Flag184 (Id));
8157 W ("Has_Task", Flag30 (Id));
8158 W ("Has_Thunks", Flag228 (Id));
8159 W ("Has_Unchecked_Union", Flag123 (Id));
8160 W ("Has_Unknown_Discriminants", Flag72 (Id));
8161 W ("Has_Up_Level_Access", Flag215 (Id));
8162 W ("Has_Visible_Refinement", Flag263 (Id));
8163 W ("Has_Volatile_Components", Flag87 (Id));
8164 W ("Has_Xref_Entry", Flag182 (Id));
8165 W ("In_Package_Body", Flag48 (Id));
8166 W ("In_Private_Part", Flag45 (Id));
8167 W ("In_Use", Flag8 (Id));
8168 W ("Is_AST_Entry", Flag132 (Id));
8169 W ("Is_Abstract_Subprogram", Flag19 (Id));
8170 W ("Is_Abstract_Type", Flag146 (Id));
8171 W ("Is_Local_Anonymous_Access", Flag194 (Id));
8172 W ("Is_Access_Constant", Flag69 (Id));
8173 W ("Is_Ada_2005_Only", Flag185 (Id));
8174 W ("Is_Ada_2012_Only", Flag199 (Id));
8175 W ("Is_Aliased", Flag15 (Id));
8176 W ("Is_Asynchronous", Flag81 (Id));
8177 W ("Is_Atomic", Flag85 (Id));
8178 W ("Is_Bit_Packed_Array", Flag122 (Id));
8179 W ("Is_CPP_Class", Flag74 (Id));
8180 W ("Is_Called", Flag102 (Id));
8181 W ("Is_Character_Type", Flag63 (Id));
8182 W ("Is_Child_Unit", Flag73 (Id));
8183 W ("Is_Class_Wide_Equivalent_Type", Flag35 (Id));
8184 W ("Is_Compilation_Unit", Flag149 (Id));
8185 W ("Is_Completely_Hidden", Flag103 (Id));
8186 W ("Is_Concurrent_Record_Type", Flag20 (Id));
8187 W ("Is_Constr_Subt_For_UN_Aliased", Flag141 (Id));
8188 W ("Is_Constr_Subt_For_U_Nominal", Flag80 (Id));
8189 W ("Is_Constrained", Flag12 (Id));
8190 W ("Is_Constructor", Flag76 (Id));
8191 W ("Is_Controlled", Flag42 (Id));
8192 W ("Is_Controlling_Formal", Flag97 (Id));
8193 W ("Is_Descendent_Of_Address", Flag223 (Id));
8194 W ("Is_Discrim_SO_Function", Flag176 (Id));
8195 W ("Is_Dispatch_Table_Entity", Flag234 (Id));
8196 W ("Is_Dispatching_Operation", Flag6 (Id));
8197 W ("Is_Eliminated", Flag124 (Id));
8198 W ("Is_Entry_Formal", Flag52 (Id));
8199 W ("Is_Exported", Flag99 (Id));
8200 W ("Is_First_Subtype", Flag70 (Id));
8201 W ("Is_For_Access_Subtype", Flag118 (Id));
8202 W ("Is_Formal_Subprogram", Flag111 (Id));
8203 W ("Is_Frozen", Flag4 (Id));
8204 W ("Is_Generic_Actual_Type", Flag94 (Id));
8205 W ("Is_Generic_Instance", Flag130 (Id));
8206 W ("Is_Generic_Type", Flag13 (Id));
8207 W ("Is_Hidden", Flag57 (Id));
8208 W ("Is_Hidden_Open_Scope", Flag171 (Id));
8209 W ("Is_Immediately_Visible", Flag7 (Id));
8210 W ("Is_Implementation_Defined", Flag254 (Id));
8211 W ("Is_Imported", Flag24 (Id));
8212 W ("Is_Inlined", Flag11 (Id));
8213 W ("Is_Instantiated", Flag126 (Id));
8214 W ("Is_Interface", Flag186 (Id));
8215 W ("Is_Internal", Flag17 (Id));
8216 W ("Is_Interrupt_Handler", Flag89 (Id));
8217 W ("Is_Intrinsic_Subprogram", Flag64 (Id));
8218 W ("Is_Invariant_Procedure", Flag257 (Id));
8219 W ("Is_Itype", Flag91 (Id));
8220 W ("Is_Known_Non_Null", Flag37 (Id));
8221 W ("Is_Known_Null", Flag204 (Id));
8222 W ("Is_Known_Valid", Flag170 (Id));
8223 W ("Is_Limited_Composite", Flag106 (Id));
8224 W ("Is_Limited_Interface", Flag197 (Id));
8225 W ("Is_Limited_Record", Flag25 (Id));
8226 W ("Is_Machine_Code_Subprogram", Flag137 (Id));
8227 W ("Is_Non_Static_Subtype", Flag109 (Id));
8228 W ("Is_Null_Init_Proc", Flag178 (Id));
8229 W ("Is_Obsolescent", Flag153 (Id));
8230 W ("Is_Only_Out_Parameter", Flag226 (Id));
8231 W ("Is_Optional_Parameter", Flag134 (Id));
8232 W ("Is_Package_Body_Entity", Flag160 (Id));
8233 W ("Is_Packed", Flag51 (Id));
8234 W ("Is_Packed_Array_Type", Flag138 (Id));
8235 W ("Is_Potentially_Use_Visible", Flag9 (Id));
8236 W ("Is_Predicate_Function", Flag255 (Id));
8237 W ("Is_Predicate_Function_M", Flag256 (Id));
8238 W ("Is_Preelaborated", Flag59 (Id));
8239 W ("Is_Primitive", Flag218 (Id));
8240 W ("Is_Primitive_Wrapper", Flag195 (Id));
8241 W ("Is_Private_Composite", Flag107 (Id));
8242 W ("Is_Private_Descendant", Flag53 (Id));
8243 W ("Is_Private_Primitive", Flag245 (Id));
8244 W ("Is_Processed_Transient", Flag252 (Id));
8245 W ("Is_Public", Flag10 (Id));
8246 W ("Is_Pure", Flag44 (Id));
8247 W ("Is_Pure_Unit_Access_Type", Flag189 (Id));
8248 W ("Is_RACW_Stub_Type", Flag244 (Id));
8249 W ("Is_Raised", Flag224 (Id));
8250 W ("Is_Remote_Call_Interface", Flag62 (Id));
8251 W ("Is_Remote_Types", Flag61 (Id));
8252 W ("Is_Renaming_Of_Object", Flag112 (Id));
8253 W ("Is_Return_Object", Flag209 (Id));
8254 W ("Is_Safe_To_Reevaluate", Flag249 (Id));
8255 W ("Is_Shared_Passive", Flag60 (Id));
8256 W ("Is_Statically_Allocated", Flag28 (Id));
8257 W ("Is_Tag", Flag78 (Id));
8258 W ("Is_Tagged_Type", Flag55 (Id));
8259 W ("Is_Thunk", Flag225 (Id));
8260 W ("Is_Trivial_Subprogram", Flag235 (Id));
8261 W ("Is_True_Constant", Flag163 (Id));
8262 W ("Is_Unchecked_Union", Flag117 (Id));
8263 W ("Is_Underlying_Record_View", Flag246 (Id));
8264 W ("Is_Unsigned_Type", Flag144 (Id));
8265 W ("Is_VMS_Exception", Flag133 (Id));
8266 W ("Is_Valued_Procedure", Flag127 (Id));
8267 W ("Is_Visible_Formal", Flag206 (Id));
8268 W ("Is_Visible_Lib_Unit", Flag116 (Id));
8269 W ("Is_Volatile", Flag16 (Id));
8270 W ("Itype_Printed", Flag202 (Id));
8271 W ("Kill_Elaboration_Checks", Flag32 (Id));
8272 W ("Kill_Range_Checks", Flag33 (Id));
8273 W ("Known_To_Have_Preelab_Init", Flag207 (Id));
8274 W ("Low_Bound_Tested", Flag205 (Id));
8275 W ("Machine_Radix_10", Flag84 (Id));
8276 W ("Materialize_Entity", Flag168 (Id));
8277 W ("May_Inherit_Delayed_Rep_Aspects", Flag262 (Id));
8278 W ("Must_Be_On_Byte_Boundary", Flag183 (Id));
8279 W ("Must_Have_Preelab_Init", Flag208 (Id));
8280 W ("Needs_Debug_Info", Flag147 (Id));
8281 W ("Needs_No_Actuals", Flag22 (Id));
8282 W ("Never_Set_In_Source", Flag115 (Id));
8283 W ("No_Pool_Assigned", Flag131 (Id));
8284 W ("No_Return", Flag113 (Id));
8285 W ("No_Strict_Aliasing", Flag136 (Id));
8286 W ("Non_Binary_Modulus", Flag58 (Id));
8287 W ("Nonzero_Is_True", Flag162 (Id));
8288 W ("OK_To_Rename", Flag247 (Id));
8289 W ("OK_To_Reorder_Components", Flag239 (Id));
8290 W ("Optimize_Alignment_Space", Flag241 (Id));
8291 W ("Optimize_Alignment_Time", Flag242 (Id));
8292 W ("Overlays_Constant", Flag243 (Id));
8293 W ("Reachable", Flag49 (Id));
8294 W ("Referenced", Flag156 (Id));
8295 W ("Referenced_As_LHS", Flag36 (Id));
8296 W ("Referenced_As_Out_Parameter", Flag227 (Id));
8297 W ("Renamed_In_Spec", Flag231 (Id));
8298 W ("Requires_Overriding", Flag213 (Id));
8299 W ("Return_Present", Flag54 (Id));
8300 W ("Returns_By_Ref", Flag90 (Id));
8301 W ("Reverse_Bit_Order", Flag164 (Id));
8302 W ("Reverse_Storage_Order", Flag93 (Id));
8303 W ("Sec_Stack_Needed_For_Return", Flag167 (Id));
8304 W ("Size_Depends_On_Discriminant", Flag177 (Id));
8305 W ("Size_Known_At_Compile_Time", Flag92 (Id));
8306 W ("SPARK_Aux_Pragma_Inherited", Flag266 (Id));
8307 W ("SPARK_Pragma_Inherited", Flag265 (Id));
8308 W ("Static_Elaboration_Desired", Flag77 (Id));
8309 W ("Strict_Alignment", Flag145 (Id));
8310 W ("Suppress_Elaboration_Warnings", Flag148 (Id));
8311 W ("Suppress_Initialization", Flag105 (Id));
8312 W ("Suppress_Style_Checks", Flag165 (Id));
8313 W ("Suppress_Value_Tracking_On_Call", Flag217 (Id));
8314 W ("Treat_As_Volatile", Flag41 (Id));
8315 W ("Universal_Aliasing", Flag216 (Id));
8316 W ("Used_As_Generic_Actual", Flag222 (Id));
8317 W ("Uses_Sec_Stack", Flag95 (Id));
8318 W ("Warnings_Off", Flag96 (Id));
8319 W ("Warnings_Off_Used", Flag236 (Id));
8320 W ("Warnings_Off_Used_Unmodified", Flag237 (Id));
8321 W ("Warnings_Off_Used_Unreferenced", Flag238 (Id));
8322 W ("Was_Hidden", Flag196 (Id));
8323 end Write_Entity_Flags;
8325 -----------------------
8326 -- Write_Entity_Info --
8327 -----------------------
8329 procedure Write_Entity_Info (Id : Entity_Id; Prefix : String) is
8331 procedure Write_Attribute (Which : String; Nam : E);
8332 -- Write attribute value with given string name
8334 procedure Write_Kind (Id : Entity_Id);
8335 -- Write Ekind field of entity
8337 ---------------------
8338 -- Write_Attribute --
8339 ---------------------
8341 procedure Write_Attribute (Which : String; Nam : E) is
8345 Write_Int (Int (Nam));
8347 Write_Name (Chars (Nam));
8349 end Write_Attribute;
8355 procedure Write_Kind (Id : Entity_Id) is
8356 K : constant String := Entity_Kind'Image (Ekind (Id));
8360 Write_Str (" Kind ");
8362 if Is_Type (Id) and then Is_Tagged_Type (Id) then
8363 Write_Str ("TAGGED ");
8366 Write_Str (K (3 .. K'Length));
8369 if Is_Type (Id) and then Depends_On_Private (Id) then
8370 Write_Str ("Depends_On_Private ");
8374 -- Start of processing for Write_Entity_Info
8378 Write_Attribute ("Name ", Id);
8379 Write_Int (Int (Id));
8383 Write_Attribute (" Type ", Etype (Id));
8385 Write_Attribute (" Scope ", Scope (Id));
8390 when Discrete_Kind =>
8391 Write_Str ("Bounds: Id = ");
8393 if Present (Scalar_Range (Id)) then
8394 Write_Int (Int (Type_Low_Bound (Id)));
8395 Write_Str (" .. Id = ");
8396 Write_Int (Int (Type_High_Bound (Id)));
8398 Write_Str ("Empty");
8409 (" Component Type ", Component_Type (Id));
8412 Write_Str (" Indexes ");
8414 Index := First_Index (Id);
8415 while Present (Index) loop
8416 Write_Attribute (" ", Etype (Index));
8417 Index := Next_Index (Index);
8425 (" Directly Designated Type ",
8426 Directly_Designated_Type (Id));
8429 when Overloadable_Kind =>
8430 if Present (Homonym (Id)) then
8431 Write_Str (" Homonym ");
8432 Write_Name (Chars (Homonym (Id)));
8434 Write_Int (Int (Homonym (Id)));
8441 if Ekind (Scope (Id)) in Record_Kind then
8443 " Original_Record_Component ",
8444 Original_Record_Component (Id));
8445 Write_Int (Int (Original_Record_Component (Id)));
8449 when others => null;
8451 end Write_Entity_Info;
8453 -----------------------
8454 -- Write_Field6_Name --
8455 -----------------------
8457 procedure Write_Field6_Name (Id : Entity_Id) is
8458 pragma Warnings (Off, Id);
8460 Write_Str ("First_Rep_Item");
8461 end Write_Field6_Name;
8463 -----------------------
8464 -- Write_Field7_Name --
8465 -----------------------
8467 procedure Write_Field7_Name (Id : Entity_Id) is
8468 pragma Warnings (Off, Id);
8470 Write_Str ("Freeze_Node");
8471 end Write_Field7_Name;
8473 -----------------------
8474 -- Write_Field8_Name --
8475 -----------------------
8477 procedure Write_Field8_Name (Id : Entity_Id) is
8481 Write_Str ("Associated_Node_For_Itype");
8484 Write_Str ("Dependent_Instances");
8487 Write_Str ("First_Exit_Statement");
8490 Write_Str ("Hiding_Loop_Variable");
8494 E_Subprogram_Body =>
8495 Write_Str ("Mechanism");
8499 Write_Str ("Normalized_First_Bit");
8502 Write_Str ("Postcondition_Proc");
8504 when E_Abstract_State =>
8505 Write_Str ("Refinement_Constituents");
8507 when E_Return_Statement =>
8508 Write_Str ("Return_Applies_To");
8511 Write_Str ("Field8??");
8513 end Write_Field8_Name;
8515 -----------------------
8516 -- Write_Field9_Name --
8517 -----------------------
8519 procedure Write_Field9_Name (Id : Entity_Id) is
8523 Write_Str ("Class_Wide_Type");
8526 Write_Str ("Current_Value");
8529 E_Generic_Function |
8531 E_Generic_Procedure |
8534 Write_Str ("Renaming_Map");
8537 Write_Str ("Field9??");
8539 end Write_Field9_Name;
8541 ------------------------
8542 -- Write_Field10_Name --
8543 ------------------------
8545 procedure Write_Field10_Name (Id : Entity_Id) is
8548 when Class_Wide_Kind |
8554 Write_Str ("Direct_Primitive_Operations");
8557 Write_Str ("Float_Rep");
8559 when E_In_Parameter |
8561 Write_Str ("Discriminal_Link");
8567 Write_Str ("Handler_Records");
8571 Write_Str ("Normalized_Position_Max");
8573 when E_Abstract_State |
8575 Write_Str ("Refined_State");
8578 Write_Str ("Field10??");
8580 end Write_Field10_Name;
8582 ------------------------
8583 -- Write_Field11_Name --
8584 ------------------------
8586 procedure Write_Field11_Name (Id : Entity_Id) is
8590 Write_Str ("Block_Node");
8594 Write_Str ("Component_Bit_Offset");
8597 Write_Str ("Entry_Component");
8599 when E_Enumeration_Literal =>
8600 Write_Str ("Enumeration_Pos");
8604 Write_Str ("Full_View");
8606 when E_Generic_Package =>
8607 Write_Str ("Generic_Homonym");
8613 Write_Str ("Protected_Body_Subprogram");
8616 Write_Str ("Field11??");
8618 end Write_Field11_Name;
8620 ------------------------
8621 -- Write_Field12_Name --
8622 ------------------------
8624 procedure Write_Field12_Name (Id : Entity_Id) is
8628 Write_Str ("Associated_Formal_Package");
8631 Write_Str ("Barrier_Function");
8633 when E_Enumeration_Literal =>
8634 Write_Str ("Enumeration_Rep");
8642 E_In_Out_Parameter |
8646 Write_Str ("Esize");
8650 Write_Str ("Next_Inlined_Subprogram");
8653 Write_Str ("Field12??");
8655 end Write_Field12_Name;
8657 ------------------------
8658 -- Write_Field13_Name --
8659 ------------------------
8661 procedure Write_Field13_Name (Id : Entity_Id) is
8666 Write_Str ("Component_Clause");
8669 Write_Str ("Elaboration_Entity");
8673 Generic_Unit_Kind =>
8674 Write_Str ("Elaboration_Entity");
8678 Write_Str ("Extra_Accessibility");
8681 Write_Str ("RM_Size");
8684 Write_Str ("Field13??");
8686 end Write_Field13_Name;
8688 -----------------------
8689 -- Write_Field14_Name --
8690 -----------------------
8692 procedure Write_Field14_Name (Id : Entity_Id) is
8701 Write_Str ("Alignment");
8705 Write_Str ("First_Optional_Parameter");
8709 Write_Str ("Normalized_Position");
8712 E_Generic_Package =>
8713 Write_Str ("Shadow_Entities");
8716 Write_Str ("Field14??");
8718 end Write_Field14_Name;
8720 ------------------------
8721 -- Write_Field15_Name --
8722 ------------------------
8724 procedure Write_Field15_Name (Id : Entity_Id) is
8727 when E_Discriminant =>
8728 Write_Str ("Discriminant_Number");
8731 Write_Str ("DT_Entry_Count");
8735 Write_Str ("DT_Position");
8737 when E_Protected_Type =>
8738 Write_Str ("Entry_Bodies_Array");
8741 Write_Str ("Entry_Parameters_Type");
8744 Write_Str ("Extra_Formal");
8746 when Enumeration_Kind =>
8747 Write_Str ("Lit_Indexes");
8751 Write_Str ("Related_Instance");
8753 when Decimal_Fixed_Point_Kind =>
8754 Write_Str ("Scale_Value");
8758 Write_Str ("Status_Flag_Or_Transient_Decl");
8762 Write_Str ("Storage_Size_Variable");
8764 when E_String_Literal_Subtype =>
8765 Write_Str ("String_Literal_Low_Bound");
8768 Write_Str ("Field15??");
8770 end Write_Field15_Name;
8772 ------------------------
8773 -- Write_Field16_Name --
8774 ------------------------
8776 procedure Write_Field16_Name (Id : Entity_Id) is
8779 when E_Record_Type |
8780 E_Record_Type_With_Private =>
8781 Write_Str ("Access_Disp_Table");
8783 when E_Abstract_State =>
8784 Write_Str ("Body_References");
8786 when E_Record_Subtype |
8787 E_Class_Wide_Subtype =>
8788 Write_Str ("Cloned_Subtype");
8792 Write_Str ("DTC_Entity");
8795 Write_Str ("Entry_Formal");
8800 Write_Str ("First_Private_Entity");
8802 when Enumeration_Kind =>
8803 Write_Str ("Lit_Strings");
8805 when E_String_Literal_Subtype =>
8806 Write_Str ("String_Literal_Length");
8810 Write_Str ("Unset_Reference");
8813 Write_Str ("Field16??");
8815 end Write_Field16_Name;
8817 ------------------------
8818 -- Write_Field17_Name --
8819 ------------------------
8821 procedure Write_Field17_Name (Id : Entity_Id) is
8826 E_Generic_In_Out_Parameter |
8828 Write_Str ("Actual_Subtype");
8831 Write_Str ("Digits_Value");
8833 when E_Discriminant =>
8834 Write_Str ("Discriminal");
8843 E_Generic_Function |
8845 E_Generic_Procedure |
8853 E_Return_Statement |
8855 E_Subprogram_Type =>
8856 Write_Str ("First_Entity");
8859 Write_Str ("First_Index");
8861 when Enumeration_Kind =>
8862 Write_Str ("First_Literal");
8865 Write_Str ("Master_Id");
8867 when Modular_Integer_Kind =>
8868 Write_Str ("Modulus");
8870 when E_Abstract_State |
8871 E_Incomplete_Type =>
8872 Write_Str ("Non_Limited_View");
8874 when E_Incomplete_Subtype =>
8875 if From_Limited_With (Id) then
8876 Write_Str ("Non_Limited_View");
8880 Write_Str ("Prival");
8883 Write_Str ("Field17??");
8885 end Write_Field17_Name;
8887 ------------------------
8888 -- Write_Field18_Name --
8889 ------------------------
8891 procedure Write_Field18_Name (Id : Entity_Id) is
8894 when E_Enumeration_Literal |
8898 Write_Str ("Alias");
8900 when E_Record_Type =>
8901 Write_Str ("Corresponding_Concurrent_Type");
8903 when E_Subprogram_Body =>
8904 Write_Str ("Corresponding_Protected_Entry");
8906 when Concurrent_Kind =>
8907 Write_Str ("Corresponding_Record_Type");
8912 Write_Str ("Enclosing_Scope");
8914 when E_Entry_Index_Parameter =>
8915 Write_Str ("Entry_Index_Constant");
8917 when E_Class_Wide_Subtype |
8918 E_Access_Protected_Subprogram_Type |
8919 E_Anonymous_Access_Protected_Subprogram_Type |
8920 E_Access_Subprogram_Type |
8922 Write_Str ("Equivalent_Type");
8924 when Fixed_Point_Kind =>
8925 Write_Str ("Delta_Value");
8927 when Incomplete_Or_Private_Kind |
8929 Write_Str ("Private_Dependents");
8932 Write_Str ("Renamed_Object");
8936 E_Generic_Function |
8937 E_Generic_Procedure |
8938 E_Generic_Package =>
8939 Write_Str ("Renamed_Entity");
8942 Write_Str ("Field18??");
8944 end Write_Field18_Name;
8946 -----------------------
8947 -- Write_Field19_Name --
8948 -----------------------
8950 procedure Write_Field19_Name (Id : Entity_Id) is
8954 E_Generic_Package =>
8955 Write_Str ("Body_Entity");
8957 when E_Discriminant =>
8958 Write_Str ("Corresponding_Discriminant");
8961 Write_Str ("Default_Aspect_Value");
8963 when E_Array_Type =>
8964 Write_Str ("Default_Component_Value");
8966 when E_Record_Type =>
8967 Write_Str ("Parent_Subtype");
8971 Write_Str ("Size_Check_Code");
8973 when E_Package_Body |
8975 Write_Str ("Spec_Entity");
8977 when Private_Kind =>
8978 Write_Str ("Underlying_Full_View");
8980 when E_Function | E_Operator | E_Subprogram_Type =>
8981 Write_Str ("Extra_Accessibility_Of_Result");
8984 Write_Str ("Field19??");
8986 end Write_Field19_Name;
8988 -----------------------
8989 -- Write_Field20_Name --
8990 -----------------------
8992 procedure Write_Field20_Name (Id : Entity_Id) is
8996 Write_Str ("Component_Type");
8998 when E_In_Parameter |
8999 E_Generic_In_Parameter =>
9000 Write_Str ("Default_Value");
9003 Write_Str ("Directly_Designated_Type");
9006 Write_Str ("Discriminant_Checking_Func");
9008 when E_Discriminant =>
9009 Write_Str ("Discriminant_Default_Value");
9018 E_Generic_Function |
9020 E_Generic_Procedure |
9028 E_Return_Statement |
9030 E_Subprogram_Type =>
9031 Write_Str ("Last_Entity");
9035 Write_Str ("Prival_Link");
9038 Write_Str ("Scalar_Range");
9041 Write_Str ("Register_Exception_Call");
9044 Write_Str ("Field20??");
9046 end Write_Field20_Name;
9048 -----------------------
9049 -- Write_Field21_Name --
9050 -----------------------
9052 procedure Write_Field21_Name (Id : Entity_Id) is
9056 Write_Str ("Accept_Address");
9058 when E_In_Parameter =>
9059 Write_Str ("Default_Expr_Function");
9061 when Concurrent_Kind |
9062 Incomplete_Or_Private_Kind |
9066 Write_Str ("Discriminant_Constraint");
9071 E_Generic_Function |
9073 E_Generic_Procedure |
9075 Write_Str ("Interface_Name");
9078 Modular_Integer_Kind =>
9079 Write_Str ("Original_Array_Type");
9081 when Fixed_Point_Kind =>
9082 Write_Str ("Small_Value");
9085 Write_Str ("Field21??");
9087 end Write_Field21_Name;
9089 -----------------------
9090 -- Write_Field22_Name --
9091 -----------------------
9093 procedure Write_Field22_Name (Id : Entity_Id) is
9097 Write_Str ("Associated_Storage_Pool");
9100 Write_Str ("Component_Size");
9102 when E_Record_Type =>
9103 Write_Str ("Corresponding_Remote_Type");
9107 Write_Str ("Original_Record_Component");
9109 when E_Enumeration_Literal =>
9110 Write_Str ("Enumeration_Rep_Expr");
9113 Write_Str ("Exception_Code");
9115 when E_Record_Type_With_Private |
9116 E_Record_Subtype_With_Private |
9119 E_Limited_Private_Type |
9120 E_Limited_Private_Subtype =>
9121 Write_Str ("Private_View");
9124 Write_Str ("Protected_Formal");
9134 E_Generic_Function |
9135 E_Generic_Procedure |
9138 E_Return_Statement |
9141 Write_Str ("Scope_Depth_Value");
9144 Write_Str ("Shared_Var_Procs_Instance");
9147 Write_Str ("Field22??");
9149 end Write_Field22_Name;
9151 ------------------------
9152 -- Write_Field23_Name --
9153 ------------------------
9155 procedure Write_Field23_Name (Id : Entity_Id) is
9158 when E_Discriminant =>
9159 Write_Str ("CR_Discriminant");
9162 Write_Str ("Entry_Cancel_Parameter");
9164 when E_Enumeration_Type =>
9165 Write_Str ("Enum_Pos_To_Rep");
9169 Write_Str ("Extra_Constrained");
9172 Write_Str ("Finalization_Master");
9174 when E_Generic_Function |
9176 E_Generic_Procedure =>
9177 Write_Str ("Inner_Instances");
9180 Write_Str ("Packed_Array_Type");
9183 Write_Str ("Protection_Object");
9185 when Concurrent_Kind |
9186 Incomplete_Or_Private_Kind |
9190 Write_Str ("Stored_Constraint");
9194 if Present (Scope (Id))
9195 and then Is_Protected_Type (Scope (Id))
9197 Write_Str ("Protection_Object");
9199 Write_Str ("Generic_Renamings");
9203 if Is_Generic_Instance (Id) then
9204 Write_Str ("Generic_Renamings");
9206 Write_Str ("Limited_View");
9210 Write_Str ("Field23??");
9212 end Write_Field23_Name;
9214 ------------------------
9215 -- Write_Field24_Name --
9216 ------------------------
9218 procedure Write_Field24_Name (Id : Entity_Id) is
9224 Write_Str ("Related_Expression");
9227 Write_Str ("Field24???");
9229 end Write_Field24_Name;
9231 ------------------------
9232 -- Write_Field25_Name --
9233 ------------------------
9235 procedure Write_Field25_Name (Id : Entity_Id) is
9239 Write_Str ("Abstract_States");
9242 Write_Str ("Debug_Renaming_Link");
9245 Write_Str ("DT_Offset_To_Top_Func");
9249 Write_Str ("Interface_Alias");
9251 when E_Record_Type |
9253 E_Record_Type_With_Private |
9254 E_Record_Subtype_With_Private =>
9255 Write_Str ("Interfaces");
9259 Write_Str ("Related_Array_Object");
9262 Write_Str ("Task_Body_Procedure");
9266 Write_Str ("PPC_Wrapper");
9268 when E_Enumeration_Subtype |
9269 E_Modular_Integer_Subtype |
9270 E_Signed_Integer_Subtype =>
9271 Write_Str ("Static_Predicate");
9274 Write_Str ("Field25??");
9276 end Write_Field25_Name;
9278 ------------------------
9279 -- Write_Field26_Name --
9280 ------------------------
9282 procedure Write_Field26_Name (Id : Entity_Id) is
9285 when E_Record_Type |
9286 E_Record_Type_With_Private =>
9287 Write_Str ("Dispatch_Table_Wrappers");
9289 when E_In_Out_Parameter |
9292 Write_Str ("Last_Assignment");
9294 when E_Access_Subprogram_Type =>
9295 Write_Str ("Original_Access_Type");
9297 when E_Generic_Package |
9299 Write_Str ("Package_Instantiation");
9303 Write_Str ("Related_Type");
9306 Write_Str ("Relative_Deadline_Variable");
9310 Write_Str ("Overridden_Operation");
9313 Write_Str ("Field26??");
9315 end Write_Field26_Name;
9317 ------------------------
9318 -- Write_Field27_Name --
9319 ------------------------
9321 procedure Write_Field27_Name (Id : Entity_Id) is
9326 Write_Str ("Current_Use_Clause");
9331 Write_Str ("Related_Type");
9335 Write_Str ("Wrapped_Entity");
9338 Write_Str ("Field27??");
9340 end Write_Field27_Name;
9342 ------------------------
9343 -- Write_Field28_Name --
9344 ------------------------
9346 procedure Write_Field28_Name (Id : Entity_Id) is
9354 E_Subprogram_Type =>
9355 Write_Str ("Extra_Formals");
9359 Write_Str ("Finalizer");
9363 Write_Str ("Initialization_Statements");
9365 when E_Record_Type =>
9366 Write_Str ("Underlying_Record_View");
9369 Write_Str ("Field28??");
9371 end Write_Field28_Name;
9373 ------------------------
9374 -- Write_Field29_Name --
9375 ------------------------
9377 procedure Write_Field29_Name (Id : Entity_Id) is
9381 Write_Str ("Subprograms_For_Type");
9384 Write_Str ("Field29??");
9386 end Write_Field29_Name;
9388 ------------------------
9389 -- Write_Field30_Name --
9390 ------------------------
9392 procedure Write_Field30_Name (Id : Entity_Id) is
9396 Write_Str ("Corresponding_Equality");
9399 Write_Str ("Static_Initialization");
9402 Write_Str ("Field30??");
9404 end Write_Field30_Name;
9406 ------------------------
9407 -- Write_Field31_Name --
9408 ------------------------
9410 procedure Write_Field31_Name (Id : Entity_Id) is
9415 Write_Str ("Thunk_Entity");
9418 Write_Str ("Field31??");
9420 end Write_Field31_Name;
9422 ------------------------
9423 -- Write_Field32_Name --
9424 ------------------------
9426 procedure Write_Field32_Name (Id : Entity_Id) is
9430 E_Generic_Function |
9432 E_Generic_Procedure |
9436 E_Subprogram_Body =>
9437 Write_Str ("SPARK_Pragma");
9440 Write_Str ("Field32??");
9442 end Write_Field32_Name;
9444 ------------------------
9445 -- Write_Field33_Name --
9446 ------------------------
9448 procedure Write_Field33_Name (Id : Entity_Id) is
9451 when E_Generic_Package |
9454 Write_Str ("SPARK_Aux_Pragma");
9457 Write_Str ("Field33??");
9459 end Write_Field33_Name;
9461 ------------------------
9462 -- Write_Field34_Name --
9463 ------------------------
9465 procedure Write_Field34_Name (Id : Entity_Id) is
9475 Generic_Subprogram_Kind |
9477 Write_Str ("Contract");
9480 Write_Str ("Field34??");
9482 end Write_Field34_Name;
9484 ------------------------
9485 -- Write_Field35_Name --
9486 ------------------------
9488 procedure Write_Field35_Name (Id : Entity_Id) is
9492 Write_Str ("Field35??");
9494 end Write_Field35_Name;
9496 -------------------------
9497 -- Iterator Procedures --
9498 -------------------------
9500 procedure Proc_Next_Component (N : in out Node_Id) is
9502 N := Next_Component (N);
9503 end Proc_Next_Component;
9505 procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
9507 N := Next_Entity (N);
9508 while Present (N) loop
9509 exit when Ekind_In (N, E_Component, E_Discriminant);
9510 N := Next_Entity (N);
9512 end Proc_Next_Component_Or_Discriminant;
9514 procedure Proc_Next_Discriminant (N : in out Node_Id) is
9516 N := Next_Discriminant (N);
9517 end Proc_Next_Discriminant;
9519 procedure Proc_Next_Formal (N : in out Node_Id) is
9521 N := Next_Formal (N);
9522 end Proc_Next_Formal;
9524 procedure Proc_Next_Formal_With_Extras (N : in out Node_Id) is
9526 N := Next_Formal_With_Extras (N);
9527 end Proc_Next_Formal_With_Extras;
9529 procedure Proc_Next_Index (N : in out Node_Id) is
9531 N := Next_Index (N);
9532 end Proc_Next_Index;
9534 procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id) is
9536 N := Next_Inlined_Subprogram (N);
9537 end Proc_Next_Inlined_Subprogram;
9539 procedure Proc_Next_Literal (N : in out Node_Id) is
9541 N := Next_Literal (N);
9542 end Proc_Next_Literal;
9544 procedure Proc_Next_Stored_Discriminant (N : in out Node_Id) is
9546 N := Next_Stored_Discriminant (N);
9547 end Proc_Next_Stored_Discriminant;