1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. --
18 -- As a special exception under Section 7 of GPL version 3, you are granted --
19 -- additional permissions described in the GCC Runtime Library Exception, --
20 -- version 3.1, as published by the Free Software Foundation. --
22 -- You should have received a copy of the GNU General Public License and --
23 -- a copy of the GCC Runtime Library Exception along with this program; --
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
25 -- <http://www.gnu.org/licenses/>. --
27 -- GNAT was originally developed by the GNAT team at New York University. --
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
30 ------------------------------------------------------------------------------
32 pragma Style_Checks
(All_Checks
);
33 -- Turn off subprogram ordering, not used for this unit
35 with Atree
; use Atree
;
36 with Namet
; use Namet
;
37 with Nlists
; use Nlists
;
38 with Output
; use Output
;
39 with Sinfo
; use Sinfo
;
40 with Stand
; use Stand
;
44 use Atree
.Unchecked_Access
;
45 -- This is one of the packages that is allowed direct untyped access to
46 -- the fields in a node, since it provides the next level abstraction
47 -- which incorporates appropriate checks.
49 ----------------------------------------------
50 -- Usage of Fields in Defining Entity Nodes --
51 ----------------------------------------------
53 -- Four of these fields are defined in Sinfo, since they in are the base
54 -- part of the node. The access routines for these four fields and the
55 -- corresponding set procedures are defined in Sinfo. These fields are
56 -- present in all entities. Note that Homonym is also in the base part of
57 -- the node, but has access routines that are more properly part of Einfo,
58 -- which is why they are defined here.
65 -- Remaining fields are present only in extended nodes (i.e. entities)
67 -- The following fields are present in all entities
70 -- First_Rep_Item Node6
73 -- The usage of other fields (and the entity kinds to which it applies)
74 -- depends on the particular field (see Einfo spec for details).
76 -- Associated_Node_For_Itype Node8
77 -- Dependent_Instances Elist8
78 -- Hiding_Loop_Variable Node8
79 -- Integrity_Level Uint8
80 -- Mechanism Uint8 (but returns Mechanism_Type)
81 -- Normalized_First_Bit Uint8
82 -- Postcondition_Proc Node8
83 -- Return_Applies_To Node8
84 -- First_Exit_Statement Node8
86 -- Class_Wide_Type Node9
87 -- Current_Value Node9
88 -- Refined_State 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
97 -- Component_Bit_Offset Uint11
99 -- Entry_Component Node11
100 -- Enumeration_Pos Uint11
101 -- Generic_Homonym Node11
102 -- Protected_Body_Subprogram Node11
105 -- Barrier_Function Node12
106 -- Enumeration_Rep Uint12
108 -- Next_Inlined_Subprogram Node12
110 -- Component_Clause Node13
111 -- Elaboration_Entity Node13
112 -- Extra_Accessibility Node13
116 -- First_Optional_Parameter Node14
117 -- Normalized_Position Uint14
118 -- Shadow_Entities List14
120 -- Discriminant_Number Uint15
121 -- DT_Position Uint15
122 -- DT_Entry_Count Uint15
123 -- Entry_Bodies_Array Node15
124 -- Entry_Parameters_Type Node15
125 -- Extra_Formal Node15
126 -- Lit_Indexes Node15
127 -- Related_Instance Node15
128 -- Status_Flag_Or_Transient_Decl Node15
129 -- Scale_Value Uint15
130 -- Storage_Size_Variable Node15
131 -- String_Literal_Low_Bound Node15
133 -- Access_Disp_Table Elist16
134 -- Cloned_Subtype Node16
136 -- Entry_Formal Node16
137 -- First_Private_Entity Node16
138 -- Lit_Strings Node16
139 -- String_Literal_Length Uint16
140 -- Unset_Reference Node16
142 -- Actual_Subtype Node17
143 -- Digits_Value Uint17
144 -- Discriminal Node17
145 -- First_Entity Node17
146 -- First_Index Node17
147 -- First_Literal Node17
150 -- Non_Limited_View Node17
154 -- Corresponding_Concurrent_Type Node18
155 -- Corresponding_Protected_Entry Node18
156 -- Corresponding_Record_Type Node18
157 -- Delta_Value Ureal18
158 -- Enclosing_Scope Node18
159 -- Equivalent_Type Node18
160 -- Private_Dependents Elist18
161 -- Renamed_Entity Node18
162 -- Renamed_Object Node18
164 -- Body_Entity Node19
165 -- Corresponding_Discriminant Node19
166 -- Default_Aspect_Component_Value Node19
167 -- Default_Aspect_Value Node19
168 -- Extra_Accessibility_Of_Result Node19
169 -- Parent_Subtype Node19
170 -- Size_Check_Code Node19
171 -- Spec_Entity Node19
172 -- Underlying_Full_View Node19
174 -- Component_Type Node20
175 -- Default_Value Node20
176 -- Directly_Designated_Type Node20
177 -- Discriminant_Checking_Func Node20
178 -- Discriminant_Default_Value Node20
179 -- Last_Entity Node20
180 -- Prival_Link Node20
181 -- Register_Exception_Call Node20
182 -- Scalar_Range Node20
184 -- Accept_Address Elist21
185 -- Default_Expr_Function Node21
186 -- Discriminant_Constraint Elist21
187 -- Interface_Name Node21
188 -- Original_Array_Type Node21
189 -- Small_Value Ureal21
191 -- Associated_Storage_Pool Node22
192 -- Component_Size Uint22
193 -- Corresponding_Remote_Type Node22
194 -- Enumeration_Rep_Expr Node22
195 -- Exception_Code Uint22
196 -- Original_Record_Component Node22
197 -- Private_View Node22
198 -- Protected_Formal Node22
199 -- Scope_Depth_Value Uint22
200 -- Shared_Var_Procs_Instance Node22
202 -- CR_Discriminant Node23
203 -- Entry_Cancel_Parameter Node23
204 -- Enum_Pos_To_Rep Node23
205 -- Extra_Constrained Node23
206 -- Finalization_Master Node23
207 -- Generic_Renamings Elist23
208 -- Inner_Instances Elist23
209 -- Limited_View Node23
210 -- Packed_Array_Type Node23
211 -- Protection_Object Node23
212 -- Stored_Constraint Elist23
215 -- Related_Expression Node24
218 -- Interface_Alias Node25
219 -- Interfaces Elist25
220 -- Debug_Renaming_Link Node25
221 -- DT_Offset_To_Top_Func Node25
222 -- PPC_Wrapper Node25
223 -- Related_Array_Object Node25
224 -- Static_Predicate List25
225 -- Task_Body_Procedure Node25
227 -- Dispatch_Table_Wrappers Elist26
228 -- Last_Assignment Node26
229 -- Original_Access_Type Node26
230 -- Overridden_Operation Node26
231 -- Package_Instantiation Node26
232 -- Relative_Deadline_Variable Node26
234 -- Current_Use_Clause Node27
235 -- Related_Type Node27
236 -- Wrapped_Entity Node27
238 -- Extra_Formals Node28
239 -- Initialization_Statements Node28
240 -- Underlying_Record_View Node28
242 -- Subprograms_For_Type Node29
244 -- Corresponding_Equality Node30
245 -- Static_Initialization Node30
247 -- Thunk_Entity Node31
249 -- SPARK_Mode_Pragmas Node32
257 ---------------------------------------------
258 -- Usage of Flags in Defining Entity Nodes --
259 ---------------------------------------------
261 -- All flags are unique, there is no overlaying, so each flag is physically
262 -- present in every entity. However, for many of the flags, it only makes
263 -- sense for them to be set true for certain subsets of entity kinds. See
264 -- the spec of Einfo for further details.
266 -- Note: Flag1-Flag3 are not used, for historical reasons
269 -- Has_Discriminants Flag5
270 -- Is_Dispatching_Operation Flag6
271 -- Is_Immediately_Visible Flag7
273 -- Is_Potentially_Use_Visible Flag9
277 -- Is_Constrained Flag12
278 -- Is_Generic_Type Flag13
279 -- Depends_On_Private Flag14
281 -- Is_Volatile Flag16
282 -- Is_Internal Flag17
283 -- Has_Delayed_Freeze Flag18
284 -- Is_Abstract_Subprogram Flag19
285 -- Is_Concurrent_Record_Type Flag20
287 -- Has_Master_Entity Flag21
288 -- Needs_No_Actuals Flag22
289 -- Has_Storage_Size_Clause Flag23
290 -- Is_Imported Flag24
291 -- Is_Limited_Record Flag25
292 -- Has_Completion Flag26
293 -- Has_Pragma_Controlled Flag27
294 -- Is_Statically_Allocated Flag28
295 -- Has_Size_Clause Flag29
298 -- Checks_May_Be_Suppressed Flag31
299 -- Kill_Elaboration_Checks Flag32
300 -- Kill_Range_Checks Flag33
301 -- Has_Independent_Components Flag34
302 -- Is_Class_Wide_Equivalent_Type Flag35
303 -- Referenced_As_LHS Flag36
304 -- Is_Known_Non_Null Flag37
305 -- Can_Never_Be_Null Flag38
306 -- Has_Default_Aspect Flag39
307 -- Body_Needed_For_SAL Flag40
309 -- Treat_As_Volatile Flag41
310 -- Is_Controlled Flag42
311 -- Has_Controlled_Component Flag43
313 -- In_Private_Part Flag45
314 -- Has_Alignment_Clause Flag46
316 -- In_Package_Body Flag48
318 -- Delay_Subprogram_Descriptors Flag50
321 -- Is_Entry_Formal Flag52
322 -- Is_Private_Descendant Flag53
323 -- Return_Present Flag54
324 -- Is_Tagged_Type Flag55
325 -- Has_Homonym Flag56
327 -- Non_Binary_Modulus Flag58
328 -- Is_Preelaborated Flag59
329 -- Is_Shared_Passive Flag60
331 -- Is_Remote_Types Flag61
332 -- Is_Remote_Call_Interface Flag62
333 -- Is_Character_Type Flag63
334 -- Is_Intrinsic_Subprogram Flag64
335 -- Has_Record_Rep_Clause Flag65
336 -- Has_Enumeration_Rep_Clause Flag66
337 -- Has_Small_Clause Flag67
338 -- Has_Component_Size_Clause Flag68
339 -- Is_Access_Constant Flag69
340 -- Is_First_Subtype Flag70
342 -- Has_Completion_In_Body Flag71
343 -- Has_Unknown_Discriminants Flag72
344 -- Is_Child_Unit Flag73
345 -- Is_CPP_Class Flag74
346 -- Has_Non_Standard_Rep Flag75
347 -- Is_Constructor Flag76
348 -- Static_Elaboration_Desired Flag77
350 -- Has_All_Calls_Remote Flag79
351 -- Is_Constr_Subt_For_U_Nominal Flag80
353 -- Is_Asynchronous Flag81
354 -- Has_Gigi_Rep_Item Flag82
355 -- Has_Machine_Radix_Clause Flag83
356 -- Machine_Radix_10 Flag84
358 -- Has_Atomic_Components Flag86
359 -- Has_Volatile_Components Flag87
360 -- Discard_Names Flag88
361 -- Is_Interrupt_Handler Flag89
362 -- Returns_By_Ref Flag90
365 -- Size_Known_At_Compile_Time Flag92
366 -- Reverse_Storage_Order Flag93
367 -- Is_Generic_Actual_Type Flag94
368 -- Uses_Sec_Stack Flag95
369 -- Warnings_Off Flag96
370 -- Is_Controlling_Formal Flag97
371 -- Has_Controlling_Result Flag98
372 -- Is_Exported Flag99
373 -- Has_Specified_Layout Flag100
375 -- Has_Nested_Block_With_Handler Flag101
377 -- Is_Completely_Hidden Flag103
378 -- Address_Taken Flag104
379 -- Suppress_Initialization Flag105
380 -- Is_Limited_Composite Flag106
381 -- Is_Private_Composite Flag107
382 -- Default_Expressions_Processed Flag108
383 -- Is_Non_Static_Subtype Flag109
384 -- Has_External_Tag_Rep_Clause Flag110
386 -- Is_Formal_Subprogram Flag111
387 -- Is_Renaming_Of_Object Flag112
389 -- Delay_Cleanups Flag114
390 -- Never_Set_In_Source Flag115
391 -- Is_Visible_Lib_Unit Flag116
392 -- Is_Unchecked_Union Flag117
393 -- Is_For_Access_Subtype Flag118
394 -- Has_Convention_Pragma Flag119
395 -- Has_Primitive_Operations Flag120
397 -- Has_Pragma_Pack Flag121
398 -- Is_Bit_Packed_Array Flag122
399 -- Has_Unchecked_Union Flag123
400 -- Is_Eliminated Flag124
401 -- C_Pass_By_Copy Flag125
402 -- Is_Instantiated Flag126
403 -- Is_Valued_Procedure Flag127
404 -- (used for Component_Alignment) Flag128
405 -- (used for Component_Alignment) Flag129
406 -- Is_Generic_Instance Flag130
408 -- No_Pool_Assigned Flag131
409 -- Is_AST_Entry Flag132
410 -- Is_VMS_Exception Flag133
411 -- Is_Optional_Parameter Flag134
412 -- Has_Aliased_Components Flag135
413 -- No_Strict_Aliasing Flag136
414 -- Is_Machine_Code_Subprogram Flag137
415 -- Is_Packed_Array_Type Flag138
416 -- Has_Biased_Representation Flag139
417 -- Has_Complex_Representation Flag140
419 -- Is_Constr_Subt_For_UN_Aliased Flag141
420 -- Has_Missing_Return Flag142
421 -- Has_Recursive_Call Flag143
422 -- Is_Unsigned_Type Flag144
423 -- Strict_Alignment Flag145
424 -- Is_Abstract_Type Flag146
425 -- Needs_Debug_Info Flag147
426 -- Suppress_Elaboration_Warnings Flag148
427 -- Is_Compilation_Unit Flag149
428 -- Has_Pragma_Elaborate_Body Flag150
430 -- Has_Private_Ancestor Flag151
431 -- Entry_Accepted Flag152
432 -- Is_Obsolescent Flag153
433 -- Has_Per_Object_Constraint Flag154
434 -- Has_Private_Declaration Flag155
435 -- Referenced Flag156
436 -- Has_Pragma_Inline Flag157
437 -- Finalize_Storage_Only Flag158
438 -- From_With_Type Flag159
439 -- Is_Package_Body_Entity Flag160
441 -- Has_Qualified_Name Flag161
442 -- Nonzero_Is_True Flag162
443 -- Is_True_Constant Flag163
444 -- Reverse_Bit_Order Flag164
445 -- Suppress_Style_Checks Flag165
446 -- Debug_Info_Off Flag166
447 -- Sec_Stack_Needed_For_Return Flag167
448 -- Materialize_Entity Flag168
449 -- Has_Pragma_Thread_Local_Storage Flag169
450 -- Is_Known_Valid Flag170
452 -- Is_Hidden_Open_Scope Flag171
453 -- Has_Object_Size_Clause Flag172
454 -- Has_Fully_Qualified_Name Flag173
455 -- Elaboration_Entity_Required Flag174
456 -- Has_Forward_Instantiation Flag175
457 -- Is_Discrim_SO_Function Flag176
458 -- Size_Depends_On_Discriminant Flag177
459 -- Is_Null_Init_Proc Flag178
460 -- Has_Pragma_Pure_Function Flag179
461 -- Has_Pragma_Unreferenced Flag180
463 -- Has_Contiguous_Rep Flag181
464 -- Has_Xref_Entry Flag182
465 -- Must_Be_On_Byte_Boundary Flag183
466 -- Has_Stream_Size_Clause Flag184
467 -- Is_Ada_2005_Only Flag185
468 -- Is_Interface Flag186
469 -- Has_Constrained_Partial_View Flag187
470 -- Uses_Lock_Free Flag188
471 -- Is_Pure_Unit_Access_Type Flag189
472 -- Has_Specified_Stream_Input Flag190
474 -- Has_Specified_Stream_Output Flag191
475 -- Has_Specified_Stream_Read Flag192
476 -- Has_Specified_Stream_Write Flag193
477 -- Is_Local_Anonymous_Access Flag194
478 -- Is_Primitive_Wrapper Flag195
479 -- Was_Hidden Flag196
480 -- Is_Limited_Interface Flag197
481 -- Has_Pragma_Ordered Flag198
482 -- Is_Ada_2012_Only Flag199
484 -- Has_Delayed_Aspects Flag200
485 -- Has_Pragma_No_Inline Flag201
486 -- Itype_Printed Flag202
487 -- Has_Pragma_Pure Flag203
488 -- Is_Known_Null Flag204
489 -- Low_Bound_Tested Flag205
490 -- Is_Visible_Formal Flag206
491 -- Known_To_Have_Preelab_Init Flag207
492 -- Must_Have_Preelab_Init Flag208
493 -- Is_Return_Object Flag209
494 -- Elaborate_Body_Desirable Flag210
496 -- Has_Static_Discriminants Flag211
497 -- Has_Pragma_Unreferenced_Objects Flag212
498 -- Requires_Overriding Flag213
500 -- Has_Up_Level_Access Flag215
501 -- Universal_Aliasing Flag216
502 -- Suppress_Value_Tracking_On_Call Flag217
503 -- Is_Primitive Flag218
504 -- Has_Initial_Value Flag219
505 -- Has_Dispatch_Table Flag220
507 -- Has_Pragma_Preelab_Init Flag221
508 -- Used_As_Generic_Actual Flag222
509 -- Is_Descendent_Of_Address Flag223
512 -- Is_Only_Out_Parameter Flag226
513 -- Referenced_As_Out_Parameter Flag227
514 -- Has_Thunks Flag228
515 -- Can_Use_Internal_Rep Flag229
516 -- Has_Pragma_Inline_Always Flag230
518 -- Renamed_In_Spec Flag231
519 -- Has_Invariants Flag232
520 -- Has_Pragma_Unmodified Flag233
521 -- Is_Dispatch_Table_Entity Flag234
522 -- Is_Trivial_Subprogram Flag235
523 -- Warnings_Off_Used Flag236
524 -- Warnings_Off_Used_Unmodified Flag237
525 -- Warnings_Off_Used_Unreferenced Flag238
526 -- OK_To_Reorder_Components Flag239
527 -- Has_Postconditions Flag240
529 -- Optimize_Alignment_Space Flag241
530 -- Optimize_Alignment_Time Flag242
531 -- Overlays_Constant Flag243
532 -- Is_RACW_Stub_Type Flag244
533 -- Is_Private_Primitive Flag245
534 -- Is_Underlying_Record_View Flag246
535 -- OK_To_Rename Flag247
536 -- Has_Inheritable_Invariants Flag248
537 -- Is_Safe_To_Reevaluate Flag249
538 -- Has_Predicates Flag250
540 -- Has_Implicit_Dereference Flag251
541 -- Is_Processed_Transient Flag252
542 -- Has_Anonymous_Master Flag253
543 -- Is_Implementation_Defined Flag254
544 -- Is_Predicate_Function Flag255
545 -- Is_Predicate_Function_M Flag256
546 -- Is_Invariant_Procedure Flag257
547 -- Has_Dynamic_Predicate_Aspect Flag258
548 -- Has_Static_Predicate_Aspect Flag259
549 -- Has_Loop_Entry_Attributes Flag260
580 -- Note: Flag287-317 are defined in atree.ads/adb, but not yet in atree.h
582 -----------------------
583 -- Local subprograms --
584 -----------------------
586 function Has_Property
588 Prop_Nam
: Name_Id
) return Boolean;
589 -- Determine whether abstract state State has a particular property denoted
590 -- by the name Prop_Nam.
592 function Rep_Clause
(Id
: E
; Rep_Name
: Name_Id
) return N
;
593 -- Returns the attribute definition clause for Id whose name is Rep_Name.
594 -- Returns Empty if no matching attribute definition clause found for Id.
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
))));
610 function Has_Property
612 Prop_Nam
: Name_Id
) return Boolean
614 Par
: constant Node_Id
:= Parent
(State
);
618 pragma Assert
(Ekind
(State
) = E_Abstract_State
);
620 -- States with properties appear as extension aggregates in the tree
622 if Nkind
(Par
) = N_Extension_Aggregate
then
623 if Prop_Nam
= Name_Integrity
then
624 return Present
(Component_Associations
(Par
));
627 Prop
:= First
(Expressions
(Par
));
628 while Present
(Prop
) loop
629 if Chars
(Prop
) = Prop_Nam
then
645 function Rep_Clause
(Id
: E
; Rep_Name
: Name_Id
) return N
is
649 Ritem
:= First_Rep_Item
(Id
);
650 while Present
(Ritem
) loop
651 if Nkind
(Ritem
) = N_Attribute_Definition_Clause
652 and then Chars
(Ritem
) = Rep_Name
656 Next_Rep_Item
(Ritem
);
663 --------------------------------
664 -- Attribute Access Functions --
665 --------------------------------
667 function Abstract_States
(Id
: E
) return L
is
669 pragma Assert
(Ekind_In
(Id
, E_Generic_Package
, E_Package
));
673 function Accept_Address
(Id
: E
) return L
is
678 function Access_Disp_Table
(Id
: E
) return L
is
680 pragma Assert
(Ekind_In
(Id
, E_Record_Type
,
682 return Elist16
(Implementation_Base_Type
(Id
));
683 end Access_Disp_Table
;
685 function Actual_Subtype
(Id
: E
) return E
is
688 (Ekind_In
(Id
, E_Constant
, E_Variable
, E_Generic_In_Out_Parameter
)
689 or else Is_Formal
(Id
));
693 function Address_Taken
(Id
: E
) return B
is
698 function Alias
(Id
: E
) return E
is
701 (Is_Overloadable
(Id
) or else Ekind
(Id
) = E_Subprogram_Type
);
705 function Alignment
(Id
: E
) return U
is
707 pragma Assert
(Is_Type
(Id
)
708 or else Is_Formal
(Id
)
709 or else Ekind_In
(Id
, E_Loop_Parameter
,
716 function Associated_Formal_Package
(Id
: E
) return E
is
718 pragma Assert
(Ekind
(Id
) = E_Package
);
720 end Associated_Formal_Package
;
722 function Associated_Node_For_Itype
(Id
: E
) return N
is
725 end Associated_Node_For_Itype
;
727 function Associated_Storage_Pool
(Id
: E
) return E
is
729 pragma Assert
(Is_Access_Type
(Id
));
730 return Node22
(Root_Type
(Id
));
731 end Associated_Storage_Pool
;
733 function Barrier_Function
(Id
: E
) return N
is
735 pragma Assert
(Is_Entry
(Id
));
737 end Barrier_Function
;
739 function Block_Node
(Id
: E
) return N
is
741 pragma Assert
(Ekind
(Id
) = E_Block
);
745 function Body_Entity
(Id
: E
) return E
is
747 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Generic_Package
));
751 function Body_Needed_For_SAL
(Id
: E
) return B
is
754 (Ekind
(Id
) = E_Package
755 or else Is_Subprogram
(Id
)
756 or else Is_Generic_Unit
(Id
));
758 end Body_Needed_For_SAL
;
760 function C_Pass_By_Copy
(Id
: E
) return B
is
762 pragma Assert
(Is_Record_Type
(Id
));
763 return Flag125
(Implementation_Base_Type
(Id
));
766 function Can_Never_Be_Null
(Id
: E
) return B
is
769 end Can_Never_Be_Null
;
771 function Checks_May_Be_Suppressed
(Id
: E
) return B
is
774 end Checks_May_Be_Suppressed
;
776 function Class_Wide_Type
(Id
: E
) return E
is
778 pragma Assert
(Is_Type
(Id
));
782 function Cloned_Subtype
(Id
: E
) return E
is
784 pragma Assert
(Ekind_In
(Id
, E_Record_Subtype
, E_Class_Wide_Subtype
));
788 function Component_Bit_Offset
(Id
: E
) return U
is
790 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
792 end Component_Bit_Offset
;
794 function Component_Clause
(Id
: E
) return N
is
796 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
798 end Component_Clause
;
800 function Component_Size
(Id
: E
) return U
is
802 pragma Assert
(Is_Array_Type
(Id
));
803 return Uint22
(Implementation_Base_Type
(Id
));
806 function Component_Type
(Id
: E
) return E
is
808 pragma Assert
(Is_Array_Type
(Id
) or else Is_String_Type
(Id
));
809 return Node20
(Implementation_Base_Type
(Id
));
812 function Corresponding_Concurrent_Type
(Id
: E
) return E
is
814 pragma Assert
(Ekind
(Id
) = E_Record_Type
);
816 end Corresponding_Concurrent_Type
;
818 function Corresponding_Discriminant
(Id
: E
) return E
is
820 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
822 end Corresponding_Discriminant
;
824 function Corresponding_Equality
(Id
: E
) return E
is
827 (Ekind
(Id
) = E_Function
828 and then not Comes_From_Source
(Id
)
829 and then Chars
(Id
) = Name_Op_Ne
);
831 end Corresponding_Equality
;
833 function Corresponding_Protected_Entry
(Id
: E
) return E
is
835 pragma Assert
(Ekind
(Id
) = E_Subprogram_Body
);
837 end Corresponding_Protected_Entry
;
839 function Corresponding_Record_Type
(Id
: E
) return E
is
841 pragma Assert
(Is_Concurrent_Type
(Id
));
843 end Corresponding_Record_Type
;
845 function Corresponding_Remote_Type
(Id
: E
) return E
is
848 end Corresponding_Remote_Type
;
850 function Current_Use_Clause
(Id
: E
) return E
is
852 pragma Assert
(Ekind
(Id
) = E_Package
or else Is_Type
(Id
));
854 end Current_Use_Clause
;
856 function Current_Value
(Id
: E
) return N
is
858 pragma Assert
(Ekind
(Id
) in Object_Kind
);
862 function CR_Discriminant
(Id
: E
) return E
is
867 function Debug_Info_Off
(Id
: E
) return B
is
872 function Debug_Renaming_Link
(Id
: E
) return E
is
875 end Debug_Renaming_Link
;
877 function Default_Aspect_Component_Value
(Id
: E
) return N
is
879 pragma Assert
(Is_Array_Type
(Id
));
881 end Default_Aspect_Component_Value
;
883 function Default_Aspect_Value
(Id
: E
) return N
is
885 pragma Assert
(Is_Scalar_Type
(Id
));
887 end Default_Aspect_Value
;
889 function Default_Expr_Function
(Id
: E
) return E
is
891 pragma Assert
(Is_Formal
(Id
));
893 end Default_Expr_Function
;
895 function Default_Expressions_Processed
(Id
: E
) return B
is
898 end Default_Expressions_Processed
;
900 function Default_Value
(Id
: E
) return N
is
902 pragma Assert
(Is_Formal
(Id
));
906 function Delay_Cleanups
(Id
: E
) return B
is
911 function Delay_Subprogram_Descriptors
(Id
: E
) return B
is
914 end Delay_Subprogram_Descriptors
;
916 function Delta_Value
(Id
: E
) return R
is
918 pragma Assert
(Is_Fixed_Point_Type
(Id
));
922 function Dependent_Instances
(Id
: E
) return L
is
924 pragma Assert
(Is_Generic_Instance
(Id
));
926 end Dependent_Instances
;
928 function Depends_On_Private
(Id
: E
) return B
is
930 pragma Assert
(Nkind
(Id
) in N_Entity
);
932 end Depends_On_Private
;
934 function Digits_Value
(Id
: E
) return U
is
937 (Is_Floating_Point_Type
(Id
)
938 or else Is_Decimal_Fixed_Point_Type
(Id
));
942 function Direct_Primitive_Operations
(Id
: E
) return L
is
944 pragma Assert
(Is_Tagged_Type
(Id
));
946 end Direct_Primitive_Operations
;
948 function Directly_Designated_Type
(Id
: E
) return E
is
950 pragma Assert
(Is_Access_Type
(Id
));
952 end Directly_Designated_Type
;
954 function Discard_Names
(Id
: E
) return B
is
959 function Discriminal
(Id
: E
) return E
is
961 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
965 function Discriminal_Link
(Id
: E
) return N
is
968 end Discriminal_Link
;
970 function Discriminant_Checking_Func
(Id
: E
) return E
is
972 pragma Assert
(Ekind
(Id
) = E_Component
);
974 end Discriminant_Checking_Func
;
976 function Discriminant_Constraint
(Id
: E
) return L
is
978 pragma Assert
(Is_Composite_Type
(Id
) and then Has_Discriminants
(Id
));
980 end Discriminant_Constraint
;
982 function Discriminant_Default_Value
(Id
: E
) return N
is
984 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
986 end Discriminant_Default_Value
;
988 function Discriminant_Number
(Id
: E
) return U
is
990 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
992 end Discriminant_Number
;
994 function Dispatch_Table_Wrappers
(Id
: E
) return L
is
996 pragma Assert
(Ekind_In
(Id
, E_Record_Type
,
998 return Elist26
(Implementation_Base_Type
(Id
));
999 end Dispatch_Table_Wrappers
;
1001 function DT_Entry_Count
(Id
: E
) return U
is
1003 pragma Assert
(Ekind
(Id
) = E_Component
and then Is_Tag
(Id
));
1007 function DT_Offset_To_Top_Func
(Id
: E
) return E
is
1009 pragma Assert
(Ekind
(Id
) = E_Component
and then Is_Tag
(Id
));
1011 end DT_Offset_To_Top_Func
;
1013 function DT_Position
(Id
: E
) return U
is
1015 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
)
1016 and then Present
(DTC_Entity
(Id
)));
1020 function DTC_Entity
(Id
: E
) return E
is
1022 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
1026 function Elaborate_Body_Desirable
(Id
: E
) return B
is
1028 pragma Assert
(Ekind
(Id
) = E_Package
);
1029 return Flag210
(Id
);
1030 end Elaborate_Body_Desirable
;
1032 function Elaboration_Entity
(Id
: E
) return E
is
1037 Ekind
(Id
) = E_Package
1039 Is_Generic_Unit
(Id
));
1041 end Elaboration_Entity
;
1043 function Elaboration_Entity_Required
(Id
: E
) return B
is
1048 Ekind
(Id
) = E_Package
1050 Is_Generic_Unit
(Id
));
1051 return Flag174
(Id
);
1052 end Elaboration_Entity_Required
;
1054 function Enclosing_Scope
(Id
: E
) return E
is
1057 end Enclosing_Scope
;
1059 function Entry_Accepted
(Id
: E
) return B
is
1061 pragma Assert
(Is_Entry
(Id
));
1062 return Flag152
(Id
);
1065 function Entry_Bodies_Array
(Id
: E
) return E
is
1068 end Entry_Bodies_Array
;
1070 function Entry_Cancel_Parameter
(Id
: E
) return E
is
1073 end Entry_Cancel_Parameter
;
1075 function Entry_Component
(Id
: E
) return E
is
1078 end Entry_Component
;
1080 function Entry_Formal
(Id
: E
) return E
is
1085 function Entry_Index_Constant
(Id
: E
) return N
is
1087 pragma Assert
(Ekind
(Id
) = E_Entry_Index_Parameter
);
1089 end Entry_Index_Constant
;
1091 function Contract
(Id
: E
) return N
is
1094 (Ekind_In
(Id
, E_Entry
, E_Entry_Family
)
1095 or else Is_Subprogram
(Id
)
1096 or else Is_Generic_Subprogram
(Id
));
1100 function Entry_Parameters_Type
(Id
: E
) return E
is
1103 end Entry_Parameters_Type
;
1105 function Enum_Pos_To_Rep
(Id
: E
) return E
is
1107 pragma Assert
(Ekind
(Id
) = E_Enumeration_Type
);
1109 end Enum_Pos_To_Rep
;
1111 function Enumeration_Pos
(Id
: E
) return Uint
is
1113 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
1115 end Enumeration_Pos
;
1117 function Enumeration_Rep
(Id
: E
) return U
is
1119 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
1121 end Enumeration_Rep
;
1123 function Enumeration_Rep_Expr
(Id
: E
) return N
is
1125 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
1127 end Enumeration_Rep_Expr
;
1129 function Equivalent_Type
(Id
: E
) return E
is
1132 (Ekind_In
(Id
, E_Class_Wide_Type
,
1133 E_Class_Wide_Subtype
,
1134 E_Access_Protected_Subprogram_Type
,
1135 E_Anonymous_Access_Protected_Subprogram_Type
,
1136 E_Access_Subprogram_Type
,
1139 end Equivalent_Type
;
1141 function Esize
(Id
: E
) return Uint
is
1146 function Exception_Code
(Id
: E
) return Uint
is
1148 pragma Assert
(Ekind
(Id
) = E_Exception
);
1152 function Extra_Accessibility
(Id
: E
) return E
is
1155 (Is_Formal
(Id
) or else Ekind_In
(Id
, E_Variable
, E_Constant
));
1157 end Extra_Accessibility
;
1159 function Extra_Accessibility_Of_Result
(Id
: E
) return E
is
1161 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Operator
, E_Subprogram_Type
));
1163 end Extra_Accessibility_Of_Result
;
1165 function Extra_Constrained
(Id
: E
) return E
is
1167 pragma Assert
(Is_Formal
(Id
) or else Ekind
(Id
) = E_Variable
);
1169 end Extra_Constrained
;
1171 function Extra_Formal
(Id
: E
) return E
is
1176 function Extra_Formals
(Id
: E
) return E
is
1179 (Is_Overloadable
(Id
)
1180 or else Ekind_In
(Id
, E_Entry_Family
,
1182 E_Subprogram_Type
));
1186 function Can_Use_Internal_Rep
(Id
: E
) return B
is
1188 pragma Assert
(Is_Access_Subprogram_Type
(Base_Type
(Id
)));
1189 return Flag229
(Base_Type
(Id
));
1190 end Can_Use_Internal_Rep
;
1192 function Finalization_Master
(Id
: E
) return E
is
1194 pragma Assert
(Is_Access_Type
(Id
));
1195 return Node23
(Root_Type
(Id
));
1196 end Finalization_Master
;
1198 function Finalize_Storage_Only
(Id
: E
) return B
is
1200 pragma Assert
(Is_Type
(Id
));
1201 return Flag158
(Base_Type
(Id
));
1202 end Finalize_Storage_Only
;
1204 function Finalizer
(Id
: E
) return E
is
1207 (Ekind
(Id
) = E_Package
1208 or else Ekind
(Id
) = E_Package_Body
);
1212 function First_Entity
(Id
: E
) return E
is
1217 function First_Exit_Statement
(Id
: E
) return N
is
1219 pragma Assert
(Ekind
(Id
) = E_Loop
);
1221 end First_Exit_Statement
;
1223 function First_Index
(Id
: E
) return N
is
1225 pragma Assert
(Is_Array_Type
(Id
) or else Is_String_Type
(Id
));
1229 function First_Literal
(Id
: E
) return E
is
1231 pragma Assert
(Is_Enumeration_Type
(Id
));
1235 function First_Optional_Parameter
(Id
: E
) return E
is
1237 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
1239 end First_Optional_Parameter
;
1241 function First_Private_Entity
(Id
: E
) return E
is
1243 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Generic_Package
)
1244 or else Ekind
(Id
) in Concurrent_Kind
);
1246 end First_Private_Entity
;
1248 function First_Rep_Item
(Id
: E
) return E
is
1253 function Freeze_Node
(Id
: E
) return N
is
1258 function From_With_Type
(Id
: E
) return B
is
1260 return Flag159
(Id
);
1263 function Full_View
(Id
: E
) return E
is
1265 pragma Assert
(Is_Type
(Id
) or else Ekind
(Id
) = E_Constant
);
1269 function Generic_Homonym
(Id
: E
) return E
is
1271 pragma Assert
(Ekind
(Id
) = E_Generic_Package
);
1273 end Generic_Homonym
;
1275 function Generic_Renamings
(Id
: E
) return L
is
1277 return Elist23
(Id
);
1278 end Generic_Renamings
;
1280 function Handler_Records
(Id
: E
) return S
is
1283 end Handler_Records
;
1285 function Has_Aliased_Components
(Id
: E
) return B
is
1287 return Flag135
(Implementation_Base_Type
(Id
));
1288 end Has_Aliased_Components
;
1290 function Has_Alignment_Clause
(Id
: E
) return B
is
1293 end Has_Alignment_Clause
;
1295 function Has_All_Calls_Remote
(Id
: E
) return B
is
1298 end Has_All_Calls_Remote
;
1300 function Has_Anonymous_Master
(Id
: E
) return B
is
1303 (Ekind_In
(Id
, E_Function
, E_Package
, E_Package_Body
, E_Procedure
));
1304 return Flag253
(Id
);
1305 end Has_Anonymous_Master
;
1307 function Has_Atomic_Components
(Id
: E
) return B
is
1309 return Flag86
(Implementation_Base_Type
(Id
));
1310 end Has_Atomic_Components
;
1312 function Has_Biased_Representation
(Id
: E
) return B
is
1314 return Flag139
(Id
);
1315 end Has_Biased_Representation
;
1317 function Has_Completion
(Id
: E
) return B
is
1322 function Has_Completion_In_Body
(Id
: E
) return B
is
1324 pragma Assert
(Is_Type
(Id
));
1326 end Has_Completion_In_Body
;
1328 function Has_Complex_Representation
(Id
: E
) return B
is
1330 pragma Assert
(Is_Type
(Id
));
1331 return Flag140
(Implementation_Base_Type
(Id
));
1332 end Has_Complex_Representation
;
1334 function Has_Component_Size_Clause
(Id
: E
) return B
is
1336 pragma Assert
(Is_Array_Type
(Id
));
1337 return Flag68
(Implementation_Base_Type
(Id
));
1338 end Has_Component_Size_Clause
;
1340 function Has_Constrained_Partial_View
(Id
: E
) return B
is
1342 pragma Assert
(Is_Type
(Id
));
1343 return Flag187
(Id
);
1344 end Has_Constrained_Partial_View
;
1346 function Has_Controlled_Component
(Id
: E
) return B
is
1348 return Flag43
(Base_Type
(Id
));
1349 end Has_Controlled_Component
;
1351 function Has_Contiguous_Rep
(Id
: E
) return B
is
1353 return Flag181
(Id
);
1354 end Has_Contiguous_Rep
;
1356 function Has_Controlling_Result
(Id
: E
) return B
is
1359 end Has_Controlling_Result
;
1361 function Has_Convention_Pragma
(Id
: E
) return B
is
1363 return Flag119
(Id
);
1364 end Has_Convention_Pragma
;
1366 function Has_Default_Aspect
(Id
: E
) return B
is
1368 return Flag39
(Base_Type
(Id
));
1369 end Has_Default_Aspect
;
1371 function Has_Delayed_Aspects
(Id
: E
) return B
is
1373 pragma Assert
(Nkind
(Id
) in N_Entity
);
1374 return Flag200
(Id
);
1375 end Has_Delayed_Aspects
;
1377 function Has_Delayed_Freeze
(Id
: E
) return B
is
1379 pragma Assert
(Nkind
(Id
) in N_Entity
);
1381 end Has_Delayed_Freeze
;
1383 function Has_Discriminants
(Id
: E
) return B
is
1385 pragma Assert
(Nkind
(Id
) in N_Entity
);
1387 end Has_Discriminants
;
1389 function Has_Dispatch_Table
(Id
: E
) return B
is
1391 pragma Assert
(Is_Tagged_Type
(Id
));
1392 return Flag220
(Id
);
1393 end Has_Dispatch_Table
;
1395 function Has_Dynamic_Predicate_Aspect
(Id
: E
) return B
is
1397 pragma Assert
(Is_Type
(Id
));
1398 return Flag258
(Id
);
1399 end Has_Dynamic_Predicate_Aspect
;
1401 function Has_Enumeration_Rep_Clause
(Id
: E
) return B
is
1403 pragma Assert
(Is_Enumeration_Type
(Id
));
1405 end Has_Enumeration_Rep_Clause
;
1407 function Has_Exit
(Id
: E
) return B
is
1412 function Has_External_Tag_Rep_Clause
(Id
: E
) return B
is
1414 pragma Assert
(Is_Tagged_Type
(Id
));
1415 return Flag110
(Id
);
1416 end Has_External_Tag_Rep_Clause
;
1418 function Has_Forward_Instantiation
(Id
: E
) return B
is
1420 return Flag175
(Id
);
1421 end Has_Forward_Instantiation
;
1423 function Has_Fully_Qualified_Name
(Id
: E
) return B
is
1425 return Flag173
(Id
);
1426 end Has_Fully_Qualified_Name
;
1428 function Has_Gigi_Rep_Item
(Id
: E
) return B
is
1431 end Has_Gigi_Rep_Item
;
1433 function Has_Homonym
(Id
: E
) return B
is
1438 function Has_Implicit_Dereference
(Id
: E
) return B
is
1440 return Flag251
(Id
);
1441 end Has_Implicit_Dereference
;
1443 function Has_Independent_Components
(Id
: E
) return B
is
1445 pragma Assert
(Is_Object
(Id
) or else Is_Type
(Id
));
1447 end Has_Independent_Components
;
1449 function Has_Inheritable_Invariants
(Id
: E
) return B
is
1451 pragma Assert
(Is_Type
(Id
));
1452 return Flag248
(Id
);
1453 end Has_Inheritable_Invariants
;
1455 function Has_Initial_Value
(Id
: E
) return B
is
1457 pragma Assert
(Ekind
(Id
) = E_Variable
or else Is_Formal
(Id
));
1458 return Flag219
(Id
);
1459 end Has_Initial_Value
;
1461 function Has_Invariants
(Id
: E
) return B
is
1463 pragma Assert
(Is_Type
(Id
));
1464 return Flag232
(Id
);
1467 function Has_Loop_Entry_Attributes
(Id
: E
) return B
is
1469 pragma Assert
(Ekind
(Id
) = E_Loop
);
1470 return Flag260
(Id
);
1471 end Has_Loop_Entry_Attributes
;
1473 function Has_Machine_Radix_Clause
(Id
: E
) return B
is
1475 pragma Assert
(Is_Decimal_Fixed_Point_Type
(Id
));
1477 end Has_Machine_Radix_Clause
;
1479 function Has_Master_Entity
(Id
: E
) return B
is
1482 end Has_Master_Entity
;
1484 function Has_Missing_Return
(Id
: E
) return B
is
1486 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Generic_Function
));
1487 return Flag142
(Id
);
1488 end Has_Missing_Return
;
1490 function Has_Nested_Block_With_Handler
(Id
: E
) return B
is
1492 return Flag101
(Id
);
1493 end Has_Nested_Block_With_Handler
;
1495 function Has_Non_Standard_Rep
(Id
: E
) return B
is
1497 return Flag75
(Implementation_Base_Type
(Id
));
1498 end Has_Non_Standard_Rep
;
1500 function Has_Object_Size_Clause
(Id
: E
) return B
is
1502 pragma Assert
(Is_Type
(Id
));
1503 return Flag172
(Id
);
1504 end Has_Object_Size_Clause
;
1506 function Has_Per_Object_Constraint
(Id
: E
) return B
is
1508 return Flag154
(Id
);
1509 end Has_Per_Object_Constraint
;
1511 function Has_Postconditions
(Id
: E
) return B
is
1513 pragma Assert
(Is_Subprogram
(Id
));
1514 return Flag240
(Id
);
1515 end Has_Postconditions
;
1517 function Has_Pragma_Controlled
(Id
: E
) return B
is
1519 pragma Assert
(Is_Access_Type
(Id
));
1520 return Flag27
(Implementation_Base_Type
(Id
));
1521 end Has_Pragma_Controlled
;
1523 function Has_Pragma_Elaborate_Body
(Id
: E
) return B
is
1525 return Flag150
(Id
);
1526 end Has_Pragma_Elaborate_Body
;
1528 function Has_Pragma_Inline
(Id
: E
) return B
is
1530 return Flag157
(Id
);
1531 end Has_Pragma_Inline
;
1533 function Has_Pragma_Inline_Always
(Id
: E
) return B
is
1535 return Flag230
(Id
);
1536 end Has_Pragma_Inline_Always
;
1538 function Has_Pragma_No_Inline
(Id
: E
) return B
is
1540 return Flag201
(Id
);
1541 end Has_Pragma_No_Inline
;
1543 function Has_Pragma_Ordered
(Id
: E
) return B
is
1545 pragma Assert
(Is_Enumeration_Type
(Id
));
1546 return Flag198
(Implementation_Base_Type
(Id
));
1547 end Has_Pragma_Ordered
;
1549 function Has_Pragma_Pack
(Id
: E
) return B
is
1551 pragma Assert
(Is_Record_Type
(Id
) or else Is_Array_Type
(Id
));
1552 return Flag121
(Implementation_Base_Type
(Id
));
1553 end Has_Pragma_Pack
;
1555 function Has_Pragma_Preelab_Init
(Id
: E
) return B
is
1557 return Flag221
(Id
);
1558 end Has_Pragma_Preelab_Init
;
1560 function Has_Pragma_Pure
(Id
: E
) return B
is
1562 return Flag203
(Id
);
1563 end Has_Pragma_Pure
;
1565 function Has_Pragma_Pure_Function
(Id
: E
) return B
is
1567 return Flag179
(Id
);
1568 end Has_Pragma_Pure_Function
;
1570 function Has_Pragma_Thread_Local_Storage
(Id
: E
) return B
is
1572 return Flag169
(Id
);
1573 end Has_Pragma_Thread_Local_Storage
;
1575 function Has_Pragma_Unmodified
(Id
: E
) return B
is
1577 return Flag233
(Id
);
1578 end Has_Pragma_Unmodified
;
1580 function Has_Pragma_Unreferenced
(Id
: E
) return B
is
1582 return Flag180
(Id
);
1583 end Has_Pragma_Unreferenced
;
1585 function Has_Pragma_Unreferenced_Objects
(Id
: E
) return B
is
1587 pragma Assert
(Is_Type
(Id
));
1588 return Flag212
(Id
);
1589 end Has_Pragma_Unreferenced_Objects
;
1591 function Has_Predicates
(Id
: E
) return B
is
1593 pragma Assert
(Is_Type
(Id
));
1594 return Flag250
(Id
);
1597 function Has_Primitive_Operations
(Id
: E
) return B
is
1599 pragma Assert
(Is_Type
(Id
));
1600 return Flag120
(Base_Type
(Id
));
1601 end Has_Primitive_Operations
;
1603 function Has_Private_Ancestor
(Id
: E
) return B
is
1605 return Flag151
(Id
);
1606 end Has_Private_Ancestor
;
1608 function Has_Private_Declaration
(Id
: E
) return B
is
1610 return Flag155
(Id
);
1611 end Has_Private_Declaration
;
1613 function Has_Qualified_Name
(Id
: E
) return B
is
1615 return Flag161
(Id
);
1616 end Has_Qualified_Name
;
1618 function Has_RACW
(Id
: E
) return B
is
1620 pragma Assert
(Ekind
(Id
) = E_Package
);
1621 return Flag214
(Id
);
1624 function Has_Record_Rep_Clause
(Id
: E
) return B
is
1626 pragma Assert
(Is_Record_Type
(Id
));
1627 return Flag65
(Implementation_Base_Type
(Id
));
1628 end Has_Record_Rep_Clause
;
1630 function Has_Recursive_Call
(Id
: E
) return B
is
1632 pragma Assert
(Is_Subprogram
(Id
));
1633 return Flag143
(Id
);
1634 end Has_Recursive_Call
;
1636 function Has_Size_Clause
(Id
: E
) return B
is
1639 end Has_Size_Clause
;
1641 function Has_Small_Clause
(Id
: E
) return B
is
1644 end Has_Small_Clause
;
1646 function Has_Specified_Layout
(Id
: E
) return B
is
1648 pragma Assert
(Is_Type
(Id
));
1649 return Flag100
(Implementation_Base_Type
(Id
));
1650 end Has_Specified_Layout
;
1652 function Has_Specified_Stream_Input
(Id
: E
) return B
is
1654 pragma Assert
(Is_Type
(Id
));
1655 return Flag190
(Id
);
1656 end Has_Specified_Stream_Input
;
1658 function Has_Specified_Stream_Output
(Id
: E
) return B
is
1660 pragma Assert
(Is_Type
(Id
));
1661 return Flag191
(Id
);
1662 end Has_Specified_Stream_Output
;
1664 function Has_Specified_Stream_Read
(Id
: E
) return B
is
1666 pragma Assert
(Is_Type
(Id
));
1667 return Flag192
(Id
);
1668 end Has_Specified_Stream_Read
;
1670 function Has_Specified_Stream_Write
(Id
: E
) return B
is
1672 pragma Assert
(Is_Type
(Id
));
1673 return Flag193
(Id
);
1674 end Has_Specified_Stream_Write
;
1676 function Has_Static_Discriminants
(Id
: E
) return B
is
1678 pragma Assert
(Is_Type
(Id
));
1679 return Flag211
(Id
);
1680 end Has_Static_Discriminants
;
1682 function Has_Static_Predicate_Aspect
(Id
: E
) return B
is
1684 pragma Assert
(Is_Type
(Id
));
1685 return Flag259
(Id
);
1686 end Has_Static_Predicate_Aspect
;
1688 function Has_Storage_Size_Clause
(Id
: E
) return B
is
1690 pragma Assert
(Is_Access_Type
(Id
) or else Is_Task_Type
(Id
));
1691 return Flag23
(Implementation_Base_Type
(Id
));
1692 end Has_Storage_Size_Clause
;
1694 function Has_Stream_Size_Clause
(Id
: E
) return B
is
1696 return Flag184
(Id
);
1697 end Has_Stream_Size_Clause
;
1699 function Has_Task
(Id
: E
) return B
is
1701 return Flag30
(Base_Type
(Id
));
1704 function Has_Thunks
(Id
: E
) return B
is
1706 return Flag228
(Id
);
1709 function Has_Unchecked_Union
(Id
: E
) return B
is
1711 return Flag123
(Base_Type
(Id
));
1712 end Has_Unchecked_Union
;
1714 function Has_Unknown_Discriminants
(Id
: E
) return B
is
1716 pragma Assert
(Is_Type
(Id
));
1718 end Has_Unknown_Discriminants
;
1720 function Has_Up_Level_Access
(Id
: E
) return B
is
1723 (Ekind_In
(Id
, E_Variable
, E_Constant
, E_Loop_Parameter
));
1724 return Flag215
(Id
);
1725 end Has_Up_Level_Access
;
1727 function Has_Volatile_Components
(Id
: E
) return B
is
1729 return Flag87
(Implementation_Base_Type
(Id
));
1730 end Has_Volatile_Components
;
1732 function Has_Xref_Entry
(Id
: E
) return B
is
1734 return Flag182
(Id
);
1737 function Hiding_Loop_Variable
(Id
: E
) return E
is
1739 pragma Assert
(Ekind
(Id
) = E_Variable
);
1741 end Hiding_Loop_Variable
;
1743 function Homonym
(Id
: E
) return E
is
1748 function Interface_Alias
(Id
: E
) return E
is
1750 pragma Assert
(Is_Subprogram
(Id
));
1752 end Interface_Alias
;
1754 function Interfaces
(Id
: E
) return L
is
1756 pragma Assert
(Is_Record_Type
(Id
));
1757 return Elist25
(Id
);
1760 function In_Package_Body
(Id
: E
) return B
is
1763 end In_Package_Body
;
1765 function In_Private_Part
(Id
: E
) return B
is
1768 end In_Private_Part
;
1770 function In_Use
(Id
: E
) return B
is
1772 pragma Assert
(Nkind
(Id
) in N_Entity
);
1776 function Initialization_Statements
(Id
: E
) return N
is
1778 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
1780 end Initialization_Statements
;
1782 function Integrity_Level
(Id
: E
) return U
is
1784 pragma Assert
(Ekind
(Id
) = E_Abstract_State
);
1786 end Integrity_Level
;
1788 function Inner_Instances
(Id
: E
) return L
is
1790 return Elist23
(Id
);
1791 end Inner_Instances
;
1793 function Interface_Name
(Id
: E
) return N
is
1798 function Is_Abstract_Subprogram
(Id
: E
) return B
is
1800 pragma Assert
(Is_Overloadable
(Id
));
1802 end Is_Abstract_Subprogram
;
1804 function Is_Abstract_Type
(Id
: E
) return B
is
1806 pragma Assert
(Is_Type
(Id
));
1807 return Flag146
(Id
);
1808 end Is_Abstract_Type
;
1810 function Is_Local_Anonymous_Access
(Id
: E
) return B
is
1812 pragma Assert
(Is_Access_Type
(Id
));
1813 return Flag194
(Id
);
1814 end Is_Local_Anonymous_Access
;
1816 function Is_Access_Constant
(Id
: E
) return B
is
1818 pragma Assert
(Is_Access_Type
(Id
));
1820 end Is_Access_Constant
;
1822 function Is_Ada_2005_Only
(Id
: E
) return B
is
1824 return Flag185
(Id
);
1825 end Is_Ada_2005_Only
;
1827 function Is_Ada_2012_Only
(Id
: E
) return B
is
1829 return Flag199
(Id
);
1830 end Is_Ada_2012_Only
;
1832 function Is_Aliased
(Id
: E
) return B
is
1834 pragma Assert
(Nkind
(Id
) in N_Entity
);
1838 function Is_AST_Entry
(Id
: E
) return B
is
1840 pragma Assert
(Is_Entry
(Id
));
1841 return Flag132
(Id
);
1844 function Is_Asynchronous
(Id
: E
) return B
is
1846 pragma Assert
(Ekind
(Id
) = E_Procedure
or else Is_Type
(Id
));
1848 end Is_Asynchronous
;
1850 function Is_Atomic
(Id
: E
) return B
is
1855 function Is_Bit_Packed_Array
(Id
: E
) return B
is
1857 return Flag122
(Implementation_Base_Type
(Id
));
1858 end Is_Bit_Packed_Array
;
1860 function Is_Called
(Id
: E
) return B
is
1862 pragma Assert
(Ekind_In
(Id
, E_Procedure
, E_Function
));
1863 return Flag102
(Id
);
1866 function Is_Character_Type
(Id
: E
) return B
is
1869 end Is_Character_Type
;
1871 function Is_Child_Unit
(Id
: E
) return B
is
1876 function Is_Class_Wide_Equivalent_Type
(Id
: E
) return B
is
1879 end Is_Class_Wide_Equivalent_Type
;
1881 function Is_Compilation_Unit
(Id
: E
) return B
is
1883 return Flag149
(Id
);
1884 end Is_Compilation_Unit
;
1886 function Is_Completely_Hidden
(Id
: E
) return B
is
1888 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
1889 return Flag103
(Id
);
1890 end Is_Completely_Hidden
;
1892 function Is_Constr_Subt_For_U_Nominal
(Id
: E
) return B
is
1895 end Is_Constr_Subt_For_U_Nominal
;
1897 function Is_Constr_Subt_For_UN_Aliased
(Id
: E
) return B
is
1899 return Flag141
(Id
);
1900 end Is_Constr_Subt_For_UN_Aliased
;
1902 function Is_Constrained
(Id
: E
) return B
is
1904 pragma Assert
(Nkind
(Id
) in N_Entity
);
1908 function Is_Constructor
(Id
: E
) return B
is
1913 function Is_Controlled
(Id
: E
) return B
is
1915 return Flag42
(Base_Type
(Id
));
1918 function Is_Controlling_Formal
(Id
: E
) return B
is
1920 pragma Assert
(Is_Formal
(Id
));
1922 end Is_Controlling_Formal
;
1924 function Is_CPP_Class
(Id
: E
) return B
is
1929 function Is_Descendent_Of_Address
(Id
: E
) return B
is
1931 pragma Assert
(Is_Type
(Id
));
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 Mechanism
(Id
: E
) return M
is
2426 pragma Assert
(Ekind
(Id
) = E_Function
or else Is_Formal
(Id
));
2427 return UI_To_Int
(Uint8
(Id
));
2430 function Modulus
(Id
: E
) return Uint
is
2432 pragma Assert
(Is_Modular_Integer_Type
(Id
));
2433 return Uint17
(Base_Type
(Id
));
2436 function Must_Be_On_Byte_Boundary
(Id
: E
) return B
is
2438 pragma Assert
(Is_Type
(Id
));
2439 return Flag183
(Id
);
2440 end Must_Be_On_Byte_Boundary
;
2442 function Must_Have_Preelab_Init
(Id
: E
) return B
is
2444 pragma Assert
(Is_Type
(Id
));
2445 return Flag208
(Id
);
2446 end Must_Have_Preelab_Init
;
2448 function Needs_Debug_Info
(Id
: E
) return B
is
2450 return Flag147
(Id
);
2451 end Needs_Debug_Info
;
2453 function Needs_No_Actuals
(Id
: E
) return B
is
2456 (Is_Overloadable
(Id
)
2457 or else Ekind_In
(Id
, E_Subprogram_Type
, E_Entry_Family
));
2459 end Needs_No_Actuals
;
2461 function Never_Set_In_Source
(Id
: E
) return B
is
2463 return Flag115
(Id
);
2464 end Never_Set_In_Source
;
2466 function Next_Inlined_Subprogram
(Id
: E
) return E
is
2469 end Next_Inlined_Subprogram
;
2471 function No_Pool_Assigned
(Id
: E
) return B
is
2473 pragma Assert
(Is_Access_Type
(Id
));
2474 return Flag131
(Root_Type
(Id
));
2475 end No_Pool_Assigned
;
2477 function No_Return
(Id
: E
) return B
is
2479 return Flag113
(Id
);
2482 function No_Strict_Aliasing
(Id
: E
) return B
is
2484 pragma Assert
(Is_Access_Type
(Id
));
2485 return Flag136
(Base_Type
(Id
));
2486 end No_Strict_Aliasing
;
2488 function Non_Binary_Modulus
(Id
: E
) return B
is
2490 pragma Assert
(Is_Type
(Id
));
2491 return Flag58
(Base_Type
(Id
));
2492 end Non_Binary_Modulus
;
2494 function Non_Limited_View
(Id
: E
) return E
is
2496 pragma Assert
(Ekind
(Id
) in Incomplete_Kind
);
2498 end Non_Limited_View
;
2500 function Nonzero_Is_True
(Id
: E
) return B
is
2502 pragma Assert
(Root_Type
(Id
) = Standard_Boolean
);
2503 return Flag162
(Base_Type
(Id
));
2504 end Nonzero_Is_True
;
2506 function Normalized_First_Bit
(Id
: E
) return U
is
2508 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
2510 end Normalized_First_Bit
;
2512 function Normalized_Position
(Id
: E
) return U
is
2514 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
2516 end Normalized_Position
;
2518 function Normalized_Position_Max
(Id
: E
) return U
is
2520 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
2522 end Normalized_Position_Max
;
2524 function OK_To_Rename
(Id
: E
) return B
is
2526 pragma Assert
(Ekind
(Id
) = E_Variable
);
2527 return Flag247
(Id
);
2530 function OK_To_Reorder_Components
(Id
: E
) return B
is
2532 pragma Assert
(Is_Record_Type
(Id
));
2533 return Flag239
(Base_Type
(Id
));
2534 end OK_To_Reorder_Components
;
2536 function Optimize_Alignment_Space
(Id
: E
) return B
is
2539 (Is_Type
(Id
) or else Ekind_In
(Id
, E_Constant
, E_Variable
));
2540 return Flag241
(Id
);
2541 end Optimize_Alignment_Space
;
2543 function Optimize_Alignment_Time
(Id
: E
) return B
is
2546 (Is_Type
(Id
) or else Ekind_In
(Id
, E_Constant
, E_Variable
));
2547 return Flag242
(Id
);
2548 end Optimize_Alignment_Time
;
2550 function Original_Access_Type
(Id
: E
) return E
is
2552 pragma Assert
(Ekind
(Id
) = E_Access_Subprogram_Type
);
2554 end Original_Access_Type
;
2556 function Original_Array_Type
(Id
: E
) return E
is
2558 pragma Assert
(Is_Array_Type
(Id
) or else Is_Modular_Integer_Type
(Id
));
2560 end Original_Array_Type
;
2562 function Original_Record_Component
(Id
: E
) return E
is
2564 pragma Assert
(Ekind_In
(Id
, E_Void
, E_Component
, E_Discriminant
));
2566 end Original_Record_Component
;
2568 function Overlays_Constant
(Id
: E
) return B
is
2570 return Flag243
(Id
);
2571 end Overlays_Constant
;
2573 function Overridden_Operation
(Id
: E
) return E
is
2576 end Overridden_Operation
;
2578 function Package_Instantiation
(Id
: E
) return N
is
2580 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Generic_Package
));
2582 end Package_Instantiation
;
2584 function Packed_Array_Type
(Id
: E
) return E
is
2586 pragma Assert
(Is_Array_Type
(Id
));
2588 end Packed_Array_Type
;
2590 function Parent_Subtype
(Id
: E
) return E
is
2592 pragma Assert
(Is_Record_Type
(Id
));
2593 return Node19
(Base_Type
(Id
));
2596 function Postcondition_Proc
(Id
: E
) return E
is
2598 pragma Assert
(Ekind
(Id
) = E_Procedure
);
2600 end Postcondition_Proc
;
2602 function PPC_Wrapper
(Id
: E
) return E
is
2604 pragma Assert
(Ekind_In
(Id
, E_Entry
, E_Entry_Family
));
2608 function Prival
(Id
: E
) return E
is
2610 pragma Assert
(Is_Protected_Component
(Id
));
2614 function Prival_Link
(Id
: E
) return E
is
2616 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
2620 function Private_Dependents
(Id
: E
) return L
is
2622 pragma Assert
(Is_Incomplete_Or_Private_Type
(Id
));
2623 return Elist18
(Id
);
2624 end Private_Dependents
;
2626 function Private_View
(Id
: E
) return N
is
2628 pragma Assert
(Is_Private_Type
(Id
));
2632 function Protected_Body_Subprogram
(Id
: E
) return E
is
2634 pragma Assert
(Is_Subprogram
(Id
) or else Is_Entry
(Id
));
2636 end Protected_Body_Subprogram
;
2638 function Protected_Formal
(Id
: E
) return E
is
2640 pragma Assert
(Is_Formal
(Id
));
2642 end Protected_Formal
;
2644 function Protection_Object
(Id
: E
) return E
is
2647 (Ekind_In
(Id
, E_Entry
, E_Entry_Family
, E_Function
, E_Procedure
));
2649 end Protection_Object
;
2651 function Reachable
(Id
: E
) return B
is
2656 function Referenced
(Id
: E
) return B
is
2658 return Flag156
(Id
);
2661 function Referenced_As_LHS
(Id
: E
) return B
is
2664 end Referenced_As_LHS
;
2666 function Referenced_As_Out_Parameter
(Id
: E
) return B
is
2668 return Flag227
(Id
);
2669 end Referenced_As_Out_Parameter
;
2671 function Refined_State
(Id
: E
) return E
is
2673 pragma Assert
(Ekind
(Id
) = E_Abstract_State
);
2677 function Register_Exception_Call
(Id
: E
) return N
is
2679 pragma Assert
(Ekind
(Id
) = E_Exception
);
2681 end Register_Exception_Call
;
2683 function Related_Array_Object
(Id
: E
) return E
is
2685 pragma Assert
(Is_Array_Type
(Id
));
2687 end Related_Array_Object
;
2689 function Related_Expression
(Id
: E
) return N
is
2691 pragma Assert
(Ekind
(Id
) in Type_Kind
2692 or else Ekind_In
(Id
, E_Constant
, E_Variable
));
2694 end Related_Expression
;
2696 function Related_Instance
(Id
: E
) return E
is
2698 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Package_Body
));
2700 end Related_Instance
;
2702 function Related_Type
(Id
: E
) return E
is
2704 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Constant
, E_Variable
));
2708 function Relative_Deadline_Variable
(Id
: E
) return E
is
2710 pragma Assert
(Is_Task_Type
(Id
));
2711 return Node26
(Implementation_Base_Type
(Id
));
2712 end Relative_Deadline_Variable
;
2714 function Renamed_Entity
(Id
: E
) return N
is
2719 function Renamed_In_Spec
(Id
: E
) return B
is
2721 pragma Assert
(Ekind
(Id
) = E_Package
);
2722 return Flag231
(Id
);
2723 end Renamed_In_Spec
;
2725 function Renamed_Object
(Id
: E
) return N
is
2730 function Renaming_Map
(Id
: E
) return U
is
2735 function Requires_Overriding
(Id
: E
) return B
is
2737 pragma Assert
(Is_Overloadable
(Id
));
2738 return Flag213
(Id
);
2739 end Requires_Overriding
;
2741 function Return_Present
(Id
: E
) return B
is
2746 function Return_Applies_To
(Id
: E
) return N
is
2749 end Return_Applies_To
;
2751 function Returns_By_Ref
(Id
: E
) return B
is
2756 function Reverse_Bit_Order
(Id
: E
) return B
is
2758 pragma Assert
(Is_Record_Type
(Id
));
2759 return Flag164
(Base_Type
(Id
));
2760 end Reverse_Bit_Order
;
2762 function Reverse_Storage_Order
(Id
: E
) return B
is
2764 pragma Assert
(Is_Record_Type
(Id
) or else Is_Array_Type
(Id
));
2765 return Flag93
(Base_Type
(Id
));
2766 end Reverse_Storage_Order
;
2768 function RM_Size
(Id
: E
) return U
is
2770 pragma Assert
(Is_Type
(Id
));
2774 function Scalar_Range
(Id
: E
) return N
is
2779 function Scale_Value
(Id
: E
) return U
is
2784 function Scope_Depth_Value
(Id
: E
) return U
is
2787 end Scope_Depth_Value
;
2789 function Sec_Stack_Needed_For_Return
(Id
: E
) return B
is
2791 return Flag167
(Id
);
2792 end Sec_Stack_Needed_For_Return
;
2794 function Shadow_Entities
(Id
: E
) return S
is
2796 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Generic_Package
));
2798 end Shadow_Entities
;
2800 function Shared_Var_Procs_Instance
(Id
: E
) return E
is
2802 pragma Assert
(Ekind
(Id
) = E_Variable
);
2804 end Shared_Var_Procs_Instance
;
2806 function Size_Check_Code
(Id
: E
) return N
is
2808 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
2810 end Size_Check_Code
;
2812 function Size_Depends_On_Discriminant
(Id
: E
) return B
is
2814 return Flag177
(Id
);
2815 end Size_Depends_On_Discriminant
;
2817 function Size_Known_At_Compile_Time
(Id
: E
) return B
is
2820 end Size_Known_At_Compile_Time
;
2822 function Small_Value
(Id
: E
) return R
is
2824 pragma Assert
(Is_Fixed_Point_Type
(Id
));
2825 return Ureal21
(Id
);
2828 function SPARK_Mode_Pragmas
(Id
: E
) return N
is
2831 (Ekind_In
(Id
, E_Function
, -- subprogram variants
2833 E_Generic_Procedure
,
2837 Ekind_In
(Id
, E_Generic_Package
, -- package variants
2841 end SPARK_Mode_Pragmas
;
2843 function Spec_Entity
(Id
: E
) return E
is
2845 pragma Assert
(Ekind
(Id
) = E_Package_Body
or else Is_Formal
(Id
));
2849 function Static_Predicate
(Id
: E
) return S
is
2851 pragma Assert
(Is_Discrete_Type
(Id
));
2853 end Static_Predicate
;
2855 function Status_Flag_Or_Transient_Decl
(Id
: E
) return N
is
2857 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
2859 end Status_Flag_Or_Transient_Decl
;
2861 function Storage_Size_Variable
(Id
: E
) return E
is
2863 pragma Assert
(Is_Access_Type
(Id
) or else Is_Task_Type
(Id
));
2864 return Node15
(Implementation_Base_Type
(Id
));
2865 end Storage_Size_Variable
;
2867 function Static_Elaboration_Desired
(Id
: E
) return B
is
2869 pragma Assert
(Ekind
(Id
) = E_Package
);
2871 end Static_Elaboration_Desired
;
2873 function Static_Initialization
(Id
: E
) return N
is
2876 (Ekind
(Id
) = E_Procedure
and then not Is_Dispatching_Operation
(Id
));
2878 end Static_Initialization
;
2880 function Stored_Constraint
(Id
: E
) return L
is
2883 (Is_Composite_Type
(Id
) and then not Is_Array_Type
(Id
));
2884 return Elist23
(Id
);
2885 end Stored_Constraint
;
2887 function Strict_Alignment
(Id
: E
) return B
is
2889 return Flag145
(Implementation_Base_Type
(Id
));
2890 end Strict_Alignment
;
2892 function String_Literal_Length
(Id
: E
) return U
is
2895 end String_Literal_Length
;
2897 function String_Literal_Low_Bound
(Id
: E
) return N
is
2900 end String_Literal_Low_Bound
;
2902 function Subprograms_For_Type
(Id
: E
) return E
is
2904 pragma Assert
(Is_Type
(Id
) or else Is_Subprogram
(Id
));
2906 end Subprograms_For_Type
;
2908 function Suppress_Elaboration_Warnings
(Id
: E
) return B
is
2910 return Flag148
(Id
);
2911 end Suppress_Elaboration_Warnings
;
2913 function Suppress_Initialization
(Id
: E
) return B
is
2915 pragma Assert
(Is_Type
(Id
));
2916 return Flag105
(Id
);
2917 end Suppress_Initialization
;
2919 function Suppress_Style_Checks
(Id
: E
) return B
is
2921 return Flag165
(Id
);
2922 end Suppress_Style_Checks
;
2924 function Suppress_Value_Tracking_On_Call
(Id
: E
) return B
is
2926 return Flag217
(Id
);
2927 end Suppress_Value_Tracking_On_Call
;
2929 function Task_Body_Procedure
(Id
: E
) return N
is
2931 pragma Assert
(Ekind
(Id
) in Task_Kind
);
2933 end Task_Body_Procedure
;
2935 function Thunk_Entity
(Id
: E
) return E
is
2937 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
)
2938 and then Is_Thunk
(Id
));
2942 function Treat_As_Volatile
(Id
: E
) return B
is
2945 end Treat_As_Volatile
;
2947 function Underlying_Full_View
(Id
: E
) return E
is
2949 pragma Assert
(Ekind
(Id
) in Private_Kind
);
2951 end Underlying_Full_View
;
2953 function Underlying_Record_View
(Id
: E
) return E
is
2956 end Underlying_Record_View
;
2958 function Universal_Aliasing
(Id
: E
) return B
is
2960 pragma Assert
(Is_Type
(Id
));
2961 return Flag216
(Implementation_Base_Type
(Id
));
2962 end Universal_Aliasing
;
2964 function Unset_Reference
(Id
: E
) return N
is
2967 end Unset_Reference
;
2969 function Used_As_Generic_Actual
(Id
: E
) return B
is
2971 return Flag222
(Id
);
2972 end Used_As_Generic_Actual
;
2974 function Uses_Lock_Free
(Id
: E
) return B
is
2976 pragma Assert
(Is_Protected_Type
(Id
));
2977 return Flag188
(Id
);
2980 function Uses_Sec_Stack
(Id
: E
) return B
is
2985 function Warnings_Off
(Id
: E
) return B
is
2990 function Warnings_Off_Used
(Id
: E
) return B
is
2992 return Flag236
(Id
);
2993 end Warnings_Off_Used
;
2995 function Warnings_Off_Used_Unmodified
(Id
: E
) return B
is
2997 return Flag237
(Id
);
2998 end Warnings_Off_Used_Unmodified
;
3000 function Warnings_Off_Used_Unreferenced
(Id
: E
) return B
is
3002 return Flag238
(Id
);
3003 end Warnings_Off_Used_Unreferenced
;
3005 function Wrapped_Entity
(Id
: E
) return E
is
3007 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
)
3008 and then Is_Primitive_Wrapper
(Id
));
3012 function Was_Hidden
(Id
: E
) return B
is
3014 return Flag196
(Id
);
3017 ------------------------------
3018 -- Classification Functions --
3019 ------------------------------
3021 function Is_Access_Type
(Id
: E
) return B
is
3023 return Ekind
(Id
) in Access_Kind
;
3026 function Is_Access_Protected_Subprogram_Type
(Id
: E
) return B
is
3028 return Ekind
(Id
) in Access_Protected_Kind
;
3029 end Is_Access_Protected_Subprogram_Type
;
3031 function Is_Access_Subprogram_Type
(Id
: E
) return B
is
3033 return Ekind
(Id
) in Access_Subprogram_Kind
;
3034 end Is_Access_Subprogram_Type
;
3036 function Is_Aggregate_Type
(Id
: E
) return B
is
3038 return Ekind
(Id
) in Aggregate_Kind
;
3039 end Is_Aggregate_Type
;
3041 function Is_Array_Type
(Id
: E
) return B
is
3043 return Ekind
(Id
) in Array_Kind
;
3046 function Is_Assignable
(Id
: E
) return B
is
3048 return Ekind
(Id
) in Assignable_Kind
;
3051 function Is_Class_Wide_Type
(Id
: E
) return B
is
3053 return Ekind
(Id
) in Class_Wide_Kind
;
3054 end Is_Class_Wide_Type
;
3056 function Is_Composite_Type
(Id
: E
) return B
is
3058 return Ekind
(Id
) in Composite_Kind
;
3059 end Is_Composite_Type
;
3061 function Is_Concurrent_Body
(Id
: E
) return B
is
3063 return Ekind
(Id
) in
3064 Concurrent_Body_Kind
;
3065 end Is_Concurrent_Body
;
3067 function Is_Concurrent_Record_Type
(Id
: E
) return B
is
3070 end Is_Concurrent_Record_Type
;
3072 function Is_Concurrent_Type
(Id
: E
) return B
is
3074 return Ekind
(Id
) in Concurrent_Kind
;
3075 end Is_Concurrent_Type
;
3077 function Is_Decimal_Fixed_Point_Type
(Id
: E
) return B
is
3079 return Ekind
(Id
) in
3080 Decimal_Fixed_Point_Kind
;
3081 end Is_Decimal_Fixed_Point_Type
;
3083 function Is_Digits_Type
(Id
: E
) return B
is
3085 return Ekind
(Id
) in Digits_Kind
;
3088 function Is_Discrete_Or_Fixed_Point_Type
(Id
: E
) return B
is
3090 return Ekind
(Id
) in Discrete_Or_Fixed_Point_Kind
;
3091 end Is_Discrete_Or_Fixed_Point_Type
;
3093 function Is_Discrete_Type
(Id
: E
) return B
is
3095 return Ekind
(Id
) in Discrete_Kind
;
3096 end Is_Discrete_Type
;
3098 function Is_Elementary_Type
(Id
: E
) return B
is
3100 return Ekind
(Id
) in Elementary_Kind
;
3101 end Is_Elementary_Type
;
3103 function Is_Entry
(Id
: E
) return B
is
3105 return Ekind
(Id
) in Entry_Kind
;
3108 function Is_Enumeration_Type
(Id
: E
) return B
is
3110 return Ekind
(Id
) in
3112 end Is_Enumeration_Type
;
3114 function Is_Fixed_Point_Type
(Id
: E
) return B
is
3116 return Ekind
(Id
) in
3118 end Is_Fixed_Point_Type
;
3120 function Is_Floating_Point_Type
(Id
: E
) return B
is
3122 return Ekind
(Id
) in Float_Kind
;
3123 end Is_Floating_Point_Type
;
3125 function Is_Formal
(Id
: E
) return B
is
3127 return Ekind
(Id
) in Formal_Kind
;
3130 function Is_Formal_Object
(Id
: E
) return B
is
3132 return Ekind
(Id
) in Formal_Object_Kind
;
3133 end Is_Formal_Object
;
3135 function Is_Generic_Subprogram
(Id
: E
) return B
is
3137 return Ekind
(Id
) in Generic_Subprogram_Kind
;
3138 end Is_Generic_Subprogram
;
3140 function Is_Generic_Unit
(Id
: E
) return B
is
3142 return Ekind
(Id
) in Generic_Unit_Kind
;
3143 end Is_Generic_Unit
;
3145 function Is_Incomplete_Or_Private_Type
(Id
: E
) return B
is
3147 return Ekind
(Id
) in
3148 Incomplete_Or_Private_Kind
;
3149 end Is_Incomplete_Or_Private_Type
;
3151 function Is_Incomplete_Type
(Id
: E
) return B
is
3153 return Ekind
(Id
) in
3155 end Is_Incomplete_Type
;
3157 function Is_Integer_Type
(Id
: E
) return B
is
3159 return Ekind
(Id
) in Integer_Kind
;
3160 end Is_Integer_Type
;
3162 function Is_Modular_Integer_Type
(Id
: E
) return B
is
3164 return Ekind
(Id
) in
3165 Modular_Integer_Kind
;
3166 end Is_Modular_Integer_Type
;
3168 function Is_Named_Number
(Id
: E
) return B
is
3170 return Ekind
(Id
) in Named_Kind
;
3171 end Is_Named_Number
;
3173 function Is_Numeric_Type
(Id
: E
) return B
is
3175 return Ekind
(Id
) in Numeric_Kind
;
3176 end Is_Numeric_Type
;
3178 function Is_Object
(Id
: E
) return B
is
3180 return Ekind
(Id
) in Object_Kind
;
3183 function Is_Ordinary_Fixed_Point_Type
(Id
: E
) return B
is
3185 return Ekind
(Id
) in
3186 Ordinary_Fixed_Point_Kind
;
3187 end Is_Ordinary_Fixed_Point_Type
;
3189 function Is_Overloadable
(Id
: E
) return B
is
3191 return Ekind
(Id
) in Overloadable_Kind
;
3192 end Is_Overloadable
;
3194 function Is_Private_Type
(Id
: E
) return B
is
3196 return Ekind
(Id
) in Private_Kind
;
3197 end Is_Private_Type
;
3199 function Is_Protected_Type
(Id
: E
) return B
is
3201 return Ekind
(Id
) in Protected_Kind
;
3202 end Is_Protected_Type
;
3204 function Is_Real_Type
(Id
: E
) return B
is
3206 return Ekind
(Id
) in Real_Kind
;
3209 function Is_Record_Type
(Id
: E
) return B
is
3211 return Ekind
(Id
) in Record_Kind
;
3214 function Is_Scalar_Type
(Id
: E
) return B
is
3216 return Ekind
(Id
) in Scalar_Kind
;
3219 function Is_Signed_Integer_Type
(Id
: E
) return B
is
3221 return Ekind
(Id
) in Signed_Integer_Kind
;
3222 end Is_Signed_Integer_Type
;
3224 function Is_Subprogram
(Id
: E
) return B
is
3226 return Ekind
(Id
) in Subprogram_Kind
;
3229 function Is_Task_Type
(Id
: E
) return B
is
3231 return Ekind
(Id
) in Task_Kind
;
3234 function Is_Type
(Id
: E
) return B
is
3236 return Ekind
(Id
) in Type_Kind
;
3239 ------------------------------
3240 -- Attribute Set Procedures --
3241 ------------------------------
3243 -- Note: in many of these set procedures an "obvious" assertion is missing.
3244 -- The reason for this is that in many cases, a field is set before the
3245 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3246 -- it is possible to add assertions that specifically include the E_Void
3247 -- possibility, but in some cases, we just omit the assertions.
3249 procedure Set_Abstract_States
(Id
: E
; V
: L
) is
3251 pragma Assert
(Ekind_In
(Id
, E_Generic_Package
, E_Package
));
3252 Set_Elist25
(Id
, V
);
3253 end Set_Abstract_States
;
3255 procedure Set_Accept_Address
(Id
: E
; V
: L
) is
3257 Set_Elist21
(Id
, V
);
3258 end Set_Accept_Address
;
3260 procedure Set_Access_Disp_Table
(Id
: E
; V
: L
) is
3262 pragma Assert
(Ekind
(Id
) = E_Record_Type
3263 and then Id
= Implementation_Base_Type
(Id
));
3264 pragma Assert
(V
= No_Elist
or else Is_Tagged_Type
(Id
));
3265 Set_Elist16
(Id
, V
);
3266 end Set_Access_Disp_Table
;
3268 procedure Set_Associated_Formal_Package
(Id
: E
; V
: E
) is
3271 end Set_Associated_Formal_Package
;
3273 procedure Set_Associated_Node_For_Itype
(Id
: E
; V
: E
) is
3276 end Set_Associated_Node_For_Itype
;
3278 procedure Set_Associated_Storage_Pool
(Id
: E
; V
: E
) is
3280 pragma Assert
(Is_Access_Type
(Id
) and then Is_Base_Type
(Id
));
3282 end Set_Associated_Storage_Pool
;
3284 procedure Set_Actual_Subtype
(Id
: E
; V
: E
) is
3287 (Ekind_In
(Id
, E_Constant
, E_Variable
, E_Generic_In_Out_Parameter
)
3288 or else Is_Formal
(Id
));
3290 end Set_Actual_Subtype
;
3292 procedure Set_Address_Taken
(Id
: E
; V
: B
:= True) is
3294 Set_Flag104
(Id
, V
);
3295 end Set_Address_Taken
;
3297 procedure Set_Alias
(Id
: E
; V
: E
) is
3300 (Is_Overloadable
(Id
) or else Ekind
(Id
) = E_Subprogram_Type
);
3304 procedure Set_Alignment
(Id
: E
; V
: U
) is
3306 pragma Assert
(Is_Type
(Id
)
3307 or else Is_Formal
(Id
)
3308 or else Ekind_In
(Id
, E_Loop_Parameter
,
3315 procedure Set_Barrier_Function
(Id
: E
; V
: N
) is
3317 pragma Assert
(Is_Entry
(Id
));
3319 end Set_Barrier_Function
;
3321 procedure Set_Block_Node
(Id
: E
; V
: N
) is
3323 pragma Assert
(Ekind
(Id
) = E_Block
);
3327 procedure Set_Body_Entity
(Id
: E
; V
: E
) is
3329 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Generic_Package
));
3331 end Set_Body_Entity
;
3333 procedure Set_Body_Needed_For_SAL
(Id
: E
; V
: B
:= True) is
3336 (Ekind
(Id
) = E_Package
3337 or else Is_Subprogram
(Id
)
3338 or else Is_Generic_Unit
(Id
));
3340 end Set_Body_Needed_For_SAL
;
3342 procedure Set_C_Pass_By_Copy
(Id
: E
; V
: B
:= True) is
3344 pragma Assert
(Is_Record_Type
(Id
) and then Is_Base_Type
(Id
));
3345 Set_Flag125
(Id
, V
);
3346 end Set_C_Pass_By_Copy
;
3348 procedure Set_Can_Never_Be_Null
(Id
: E
; V
: B
:= True) is
3351 end Set_Can_Never_Be_Null
;
3353 procedure Set_Checks_May_Be_Suppressed
(Id
: E
; V
: B
:= True) is
3356 end Set_Checks_May_Be_Suppressed
;
3358 procedure Set_Class_Wide_Type
(Id
: E
; V
: E
) is
3360 pragma Assert
(Is_Type
(Id
));
3362 end Set_Class_Wide_Type
;
3364 procedure Set_Cloned_Subtype
(Id
: E
; V
: E
) is
3366 pragma Assert
(Ekind_In
(Id
, E_Record_Subtype
, E_Class_Wide_Subtype
));
3368 end Set_Cloned_Subtype
;
3370 procedure Set_Component_Bit_Offset
(Id
: E
; V
: U
) is
3372 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
3374 end Set_Component_Bit_Offset
;
3376 procedure Set_Component_Clause
(Id
: E
; V
: N
) is
3378 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
3380 end Set_Component_Clause
;
3382 procedure Set_Component_Size
(Id
: E
; V
: U
) is
3384 pragma Assert
(Is_Array_Type
(Id
) and then Is_Base_Type
(Id
));
3386 end Set_Component_Size
;
3388 procedure Set_Component_Type
(Id
: E
; V
: E
) is
3390 pragma Assert
(Is_Array_Type
(Id
) and then Is_Base_Type
(Id
));
3392 end Set_Component_Type
;
3394 procedure Set_Corresponding_Concurrent_Type
(Id
: E
; V
: E
) is
3397 (Ekind
(Id
) = E_Record_Type
and then Is_Concurrent_Type
(V
));
3399 end Set_Corresponding_Concurrent_Type
;
3401 procedure Set_Corresponding_Discriminant
(Id
: E
; V
: E
) is
3403 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
3405 end Set_Corresponding_Discriminant
;
3407 procedure Set_Corresponding_Equality
(Id
: E
; V
: E
) is
3410 (Ekind
(Id
) = E_Function
3411 and then not Comes_From_Source
(Id
)
3412 and then Chars
(Id
) = Name_Op_Ne
);
3414 end Set_Corresponding_Equality
;
3416 procedure Set_Corresponding_Protected_Entry
(Id
: E
; V
: E
) is
3418 pragma Assert
(Ekind_In
(Id
, E_Void
, E_Subprogram_Body
));
3420 end Set_Corresponding_Protected_Entry
;
3422 procedure Set_Corresponding_Record_Type
(Id
: E
; V
: E
) is
3424 pragma Assert
(Is_Concurrent_Type
(Id
));
3426 end Set_Corresponding_Record_Type
;
3428 procedure Set_Corresponding_Remote_Type
(Id
: E
; V
: E
) is
3431 end Set_Corresponding_Remote_Type
;
3433 procedure Set_Current_Use_Clause
(Id
: E
; V
: E
) is
3435 pragma Assert
(Ekind
(Id
) = E_Package
or else Is_Type
(Id
));
3437 end Set_Current_Use_Clause
;
3439 procedure Set_Current_Value
(Id
: E
; V
: N
) is
3441 pragma Assert
(Ekind
(Id
) in Object_Kind
or else Ekind
(Id
) = E_Void
);
3443 end Set_Current_Value
;
3445 procedure Set_CR_Discriminant
(Id
: E
; V
: E
) is
3448 end Set_CR_Discriminant
;
3450 procedure Set_Debug_Info_Off
(Id
: E
; V
: B
:= True) is
3452 Set_Flag166
(Id
, V
);
3453 end Set_Debug_Info_Off
;
3455 procedure Set_Debug_Renaming_Link
(Id
: E
; V
: E
) is
3458 end Set_Debug_Renaming_Link
;
3460 procedure Set_Default_Aspect_Component_Value
(Id
: E
; V
: E
) is
3462 pragma Assert
(Is_Array_Type
(Id
));
3464 end Set_Default_Aspect_Component_Value
;
3466 procedure Set_Default_Aspect_Value
(Id
: E
; V
: E
) is
3468 pragma Assert
(Is_Scalar_Type
(Id
));
3470 end Set_Default_Aspect_Value
;
3472 procedure Set_Default_Expr_Function
(Id
: E
; V
: E
) is
3474 pragma Assert
(Is_Formal
(Id
));
3476 end Set_Default_Expr_Function
;
3478 procedure Set_Default_Expressions_Processed
(Id
: E
; V
: B
:= True) is
3480 Set_Flag108
(Id
, V
);
3481 end Set_Default_Expressions_Processed
;
3483 procedure Set_Default_Value
(Id
: E
; V
: N
) is
3485 pragma Assert
(Is_Formal
(Id
));
3487 end Set_Default_Value
;
3489 procedure Set_Delay_Cleanups
(Id
: E
; V
: B
:= True) is
3493 or else Is_Task_Type
(Id
)
3494 or else Ekind
(Id
) = E_Block
);
3495 Set_Flag114
(Id
, V
);
3496 end Set_Delay_Cleanups
;
3498 procedure Set_Delay_Subprogram_Descriptors
(Id
: E
; V
: B
:= True) is
3501 (Is_Subprogram
(Id
) or else Ekind_In
(Id
, E_Package
, E_Package_Body
));
3504 end Set_Delay_Subprogram_Descriptors
;
3506 procedure Set_Delta_Value
(Id
: E
; V
: R
) is
3508 pragma Assert
(Is_Fixed_Point_Type
(Id
));
3509 Set_Ureal18
(Id
, V
);
3510 end Set_Delta_Value
;
3512 procedure Set_Dependent_Instances
(Id
: E
; V
: L
) is
3514 pragma Assert
(Is_Generic_Instance
(Id
));
3516 end Set_Dependent_Instances
;
3518 procedure Set_Depends_On_Private
(Id
: E
; V
: B
:= True) is
3520 pragma Assert
(Nkind
(Id
) in N_Entity
);
3522 end Set_Depends_On_Private
;
3524 procedure Set_Digits_Value
(Id
: E
; V
: U
) is
3527 (Is_Floating_Point_Type
(Id
)
3528 or else Is_Decimal_Fixed_Point_Type
(Id
));
3530 end Set_Digits_Value
;
3532 procedure Set_Directly_Designated_Type
(Id
: E
; V
: E
) is
3535 end Set_Directly_Designated_Type
;
3537 procedure Set_Discard_Names
(Id
: E
; V
: B
:= True) is
3540 end Set_Discard_Names
;
3542 procedure Set_Discriminal
(Id
: E
; V
: E
) is
3544 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
3546 end Set_Discriminal
;
3548 procedure Set_Discriminal_Link
(Id
: E
; V
: E
) is
3551 end Set_Discriminal_Link
;
3553 procedure Set_Discriminant_Checking_Func
(Id
: E
; V
: E
) is
3555 pragma Assert
(Ekind
(Id
) = E_Component
);
3557 end Set_Discriminant_Checking_Func
;
3559 procedure Set_Discriminant_Constraint
(Id
: E
; V
: L
) is
3561 pragma Assert
(Nkind
(Id
) in N_Entity
);
3562 Set_Elist21
(Id
, V
);
3563 end Set_Discriminant_Constraint
;
3565 procedure Set_Discriminant_Default_Value
(Id
: E
; V
: N
) is
3568 end Set_Discriminant_Default_Value
;
3570 procedure Set_Discriminant_Number
(Id
: E
; V
: U
) is
3573 end Set_Discriminant_Number
;
3575 procedure Set_Dispatch_Table_Wrappers
(Id
: E
; V
: L
) is
3577 pragma Assert
(Ekind
(Id
) = E_Record_Type
3578 and then Id
= Implementation_Base_Type
(Id
));
3579 pragma Assert
(V
= No_Elist
or else Is_Tagged_Type
(Id
));
3580 Set_Elist26
(Id
, V
);
3581 end Set_Dispatch_Table_Wrappers
;
3583 procedure Set_DT_Entry_Count
(Id
: E
; V
: U
) is
3585 pragma Assert
(Ekind
(Id
) = E_Component
);
3587 end Set_DT_Entry_Count
;
3589 procedure Set_DT_Offset_To_Top_Func
(Id
: E
; V
: E
) is
3591 pragma Assert
(Ekind
(Id
) = E_Component
and then Is_Tag
(Id
));
3593 end Set_DT_Offset_To_Top_Func
;
3595 procedure Set_DT_Position
(Id
: E
; V
: U
) is
3597 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
3599 end Set_DT_Position
;
3601 procedure Set_DTC_Entity
(Id
: E
; V
: E
) is
3603 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
3607 procedure Set_Elaborate_Body_Desirable
(Id
: E
; V
: B
:= True) is
3609 pragma Assert
(Ekind
(Id
) = E_Package
);
3610 Set_Flag210
(Id
, V
);
3611 end Set_Elaborate_Body_Desirable
;
3613 procedure Set_Elaboration_Entity
(Id
: E
; V
: E
) is
3618 Ekind
(Id
) = E_Package
3620 Is_Generic_Unit
(Id
));
3622 end Set_Elaboration_Entity
;
3624 procedure Set_Elaboration_Entity_Required
(Id
: E
; V
: B
:= True) is
3629 Ekind
(Id
) = E_Package
3631 Is_Generic_Unit
(Id
));
3632 Set_Flag174
(Id
, V
);
3633 end Set_Elaboration_Entity_Required
;
3635 procedure Set_Enclosing_Scope
(Id
: E
; V
: E
) is
3638 end Set_Enclosing_Scope
;
3640 procedure Set_Entry_Accepted
(Id
: E
; V
: B
:= True) is
3642 pragma Assert
(Is_Entry
(Id
));
3643 Set_Flag152
(Id
, V
);
3644 end Set_Entry_Accepted
;
3646 procedure Set_Entry_Bodies_Array
(Id
: E
; V
: E
) is
3649 end Set_Entry_Bodies_Array
;
3651 procedure Set_Entry_Cancel_Parameter
(Id
: E
; V
: E
) is
3654 end Set_Entry_Cancel_Parameter
;
3656 procedure Set_Entry_Component
(Id
: E
; V
: E
) is
3659 end Set_Entry_Component
;
3661 procedure Set_Entry_Formal
(Id
: E
; V
: E
) is
3664 end Set_Entry_Formal
;
3666 procedure Set_Entry_Index_Constant
(Id
: E
; V
: E
) is
3668 pragma Assert
(Ekind
(Id
) = E_Entry_Index_Parameter
);
3670 end Set_Entry_Index_Constant
;
3672 procedure Set_Contract
(Id
: E
; V
: N
) is
3675 (Ekind_In
(Id
, E_Entry
, E_Entry_Family
, E_Void
)
3676 or else Is_Subprogram
(Id
)
3677 or else Is_Generic_Subprogram
(Id
));
3681 procedure Set_Entry_Parameters_Type
(Id
: E
; V
: E
) is
3684 end Set_Entry_Parameters_Type
;
3686 procedure Set_Enum_Pos_To_Rep
(Id
: E
; V
: E
) is
3688 pragma Assert
(Ekind
(Id
) = E_Enumeration_Type
);
3690 end Set_Enum_Pos_To_Rep
;
3692 procedure Set_Enumeration_Pos
(Id
: E
; V
: U
) is
3694 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
3696 end Set_Enumeration_Pos
;
3698 procedure Set_Enumeration_Rep
(Id
: E
; V
: U
) is
3700 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
3702 end Set_Enumeration_Rep
;
3704 procedure Set_Enumeration_Rep_Expr
(Id
: E
; V
: N
) is
3706 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
3708 end Set_Enumeration_Rep_Expr
;
3710 procedure Set_Equivalent_Type
(Id
: E
; V
: E
) is
3713 (Ekind_In
(Id
, E_Class_Wide_Type
,
3714 E_Class_Wide_Subtype
,
3715 E_Access_Protected_Subprogram_Type
,
3716 E_Anonymous_Access_Protected_Subprogram_Type
,
3717 E_Access_Subprogram_Type
,
3720 end Set_Equivalent_Type
;
3722 procedure Set_Esize
(Id
: E
; V
: U
) is
3727 procedure Set_Exception_Code
(Id
: E
; V
: U
) is
3729 pragma Assert
(Ekind
(Id
) = E_Exception
);
3731 end Set_Exception_Code
;
3733 procedure Set_Extra_Accessibility
(Id
: E
; V
: E
) is
3736 (Is_Formal
(Id
) or else Ekind_In
(Id
, E_Variable
, E_Constant
));
3738 end Set_Extra_Accessibility
;
3740 procedure Set_Extra_Accessibility_Of_Result
(Id
: E
; V
: E
) is
3742 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Operator
, E_Subprogram_Type
));
3744 end Set_Extra_Accessibility_Of_Result
;
3746 procedure Set_Extra_Constrained
(Id
: E
; V
: E
) is
3748 pragma Assert
(Is_Formal
(Id
) or else Ekind
(Id
) = E_Variable
);
3750 end Set_Extra_Constrained
;
3752 procedure Set_Extra_Formal
(Id
: E
; V
: E
) is
3755 end Set_Extra_Formal
;
3757 procedure Set_Extra_Formals
(Id
: E
; V
: E
) is
3760 (Is_Overloadable
(Id
)
3761 or else Ekind_In
(Id
, E_Entry_Family
,
3763 E_Subprogram_Type
));
3765 end Set_Extra_Formals
;
3767 procedure Set_Can_Use_Internal_Rep
(Id
: E
; V
: B
:= True) is
3770 (Is_Access_Subprogram_Type
(Id
) and then Is_Base_Type
(Id
));
3771 Set_Flag229
(Id
, V
);
3772 end Set_Can_Use_Internal_Rep
;
3774 procedure Set_Finalization_Master
(Id
: E
; V
: E
) is
3776 pragma Assert
(Is_Access_Type
(Id
) and then Is_Base_Type
(Id
));
3778 end Set_Finalization_Master
;
3780 procedure Set_Finalize_Storage_Only
(Id
: E
; V
: B
:= True) is
3782 pragma Assert
(Is_Type
(Id
) and then Is_Base_Type
(Id
));
3783 Set_Flag158
(Id
, V
);
3784 end Set_Finalize_Storage_Only
;
3786 procedure Set_Finalizer
(Id
: E
; V
: E
) is
3789 (Ekind
(Id
) = E_Package
3790 or else Ekind
(Id
) = E_Package_Body
);
3794 procedure Set_First_Entity
(Id
: E
; V
: E
) is
3797 end Set_First_Entity
;
3799 procedure Set_First_Exit_Statement
(Id
: E
; V
: N
) is
3801 pragma Assert
(Ekind
(Id
) = E_Loop
);
3803 end Set_First_Exit_Statement
;
3805 procedure Set_First_Index
(Id
: E
; V
: N
) is
3807 pragma Assert
(Is_Array_Type
(Id
) or else Is_String_Type
(Id
));
3809 end Set_First_Index
;
3811 procedure Set_First_Literal
(Id
: E
; V
: E
) is
3813 pragma Assert
(Is_Enumeration_Type
(Id
));
3815 end Set_First_Literal
;
3817 procedure Set_First_Optional_Parameter
(Id
: E
; V
: E
) is
3819 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
3821 end Set_First_Optional_Parameter
;
3823 procedure Set_First_Private_Entity
(Id
: E
; V
: E
) is
3825 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Generic_Package
)
3826 or else Ekind
(Id
) in Concurrent_Kind
);
3828 end Set_First_Private_Entity
;
3830 procedure Set_First_Rep_Item
(Id
: E
; V
: N
) is
3833 end Set_First_Rep_Item
;
3835 procedure Set_Float_Rep
(Id
: E
; V
: F
) is
3836 pragma Assert
(Ekind
(Id
) = E_Floating_Point_Type
);
3838 Set_Uint10
(Id
, UI_From_Int
(F
'Pos (V
)));
3841 procedure Set_Freeze_Node
(Id
: E
; V
: N
) is
3844 end Set_Freeze_Node
;
3846 procedure Set_From_With_Type
(Id
: E
; V
: B
:= True) is
3850 or else Ekind
(Id
) = E_Package
);
3851 Set_Flag159
(Id
, V
);
3852 end Set_From_With_Type
;
3854 procedure Set_Full_View
(Id
: E
; V
: E
) is
3856 pragma Assert
(Is_Type
(Id
) or else Ekind
(Id
) = E_Constant
);
3860 procedure Set_Generic_Homonym
(Id
: E
; V
: E
) is
3863 end Set_Generic_Homonym
;
3865 procedure Set_Generic_Renamings
(Id
: E
; V
: L
) is
3867 Set_Elist23
(Id
, V
);
3868 end Set_Generic_Renamings
;
3870 procedure Set_Handler_Records
(Id
: E
; V
: S
) is
3873 end Set_Handler_Records
;
3875 procedure Set_Has_Aliased_Components
(Id
: E
; V
: B
:= True) is
3877 pragma Assert
(Id
= Base_Type
(Id
));
3878 Set_Flag135
(Id
, V
);
3879 end Set_Has_Aliased_Components
;
3881 procedure Set_Has_Alignment_Clause
(Id
: E
; V
: B
:= True) is
3884 end Set_Has_Alignment_Clause
;
3886 procedure Set_Has_All_Calls_Remote
(Id
: E
; V
: B
:= True) is
3889 end Set_Has_All_Calls_Remote
;
3891 procedure Set_Has_Anonymous_Master
(Id
: E
; V
: B
:= True) is
3894 (Ekind_In
(Id
, E_Function
, E_Package
, E_Package_Body
, E_Procedure
));
3895 Set_Flag253
(Id
, V
);
3896 end Set_Has_Anonymous_Master
;
3898 procedure Set_Has_Atomic_Components
(Id
: E
; V
: B
:= True) is
3900 pragma Assert
(not Is_Type
(Id
) or else Is_Base_Type
(Id
));
3902 end Set_Has_Atomic_Components
;
3904 procedure Set_Has_Biased_Representation
(Id
: E
; V
: B
:= True) is
3907 ((V
= False) or else (Is_Discrete_Type
(Id
) or else Is_Object
(Id
)));
3908 Set_Flag139
(Id
, V
);
3909 end Set_Has_Biased_Representation
;
3911 procedure Set_Has_Completion
(Id
: E
; V
: B
:= True) is
3914 end Set_Has_Completion
;
3916 procedure Set_Has_Completion_In_Body
(Id
: E
; V
: B
:= True) is
3918 pragma Assert
(Is_Type
(Id
));
3920 end Set_Has_Completion_In_Body
;
3922 procedure Set_Has_Complex_Representation
(Id
: E
; V
: B
:= True) is
3924 pragma Assert
(Ekind
(Id
) = E_Record_Type
);
3925 Set_Flag140
(Id
, V
);
3926 end Set_Has_Complex_Representation
;
3928 procedure Set_Has_Component_Size_Clause
(Id
: E
; V
: B
:= True) is
3930 pragma Assert
(Ekind
(Id
) = E_Array_Type
);
3932 end Set_Has_Component_Size_Clause
;
3934 procedure Set_Has_Constrained_Partial_View
(Id
: E
; V
: B
:= True) is
3936 pragma Assert
(Is_Type
(Id
));
3937 Set_Flag187
(Id
, V
);
3938 end Set_Has_Constrained_Partial_View
;
3940 procedure Set_Has_Contiguous_Rep
(Id
: E
; V
: B
:= True) is
3942 Set_Flag181
(Id
, V
);
3943 end Set_Has_Contiguous_Rep
;
3945 procedure Set_Has_Controlled_Component
(Id
: E
; V
: B
:= True) is
3947 pragma Assert
(Id
= Base_Type
(Id
));
3949 end Set_Has_Controlled_Component
;
3951 procedure Set_Has_Controlling_Result
(Id
: E
; V
: B
:= True) is
3954 end Set_Has_Controlling_Result
;
3956 procedure Set_Has_Convention_Pragma
(Id
: E
; V
: B
:= True) is
3958 Set_Flag119
(Id
, V
);
3959 end Set_Has_Convention_Pragma
;
3961 procedure Set_Has_Default_Aspect
(Id
: E
; V
: B
:= True) is
3964 ((Is_Scalar_Type
(Id
) or else Is_Array_Type
(Id
))
3965 and then Is_Base_Type
(Id
));
3967 end Set_Has_Default_Aspect
;
3969 procedure Set_Has_Delayed_Aspects
(Id
: E
; V
: B
:= True) is
3971 pragma Assert
(Nkind
(Id
) in N_Entity
);
3972 Set_Flag200
(Id
, V
);
3973 end Set_Has_Delayed_Aspects
;
3975 procedure Set_Has_Delayed_Freeze
(Id
: E
; V
: B
:= True) is
3977 pragma Assert
(Nkind
(Id
) in N_Entity
);
3979 end Set_Has_Delayed_Freeze
;
3981 procedure Set_Has_Discriminants
(Id
: E
; V
: B
:= True) is
3983 pragma Assert
(Nkind
(Id
) in N_Entity
);
3985 end Set_Has_Discriminants
;
3987 procedure Set_Has_Dispatch_Table
(Id
: E
; V
: B
:= True) is
3989 pragma Assert
(Ekind
(Id
) = E_Record_Type
3990 and then Is_Tagged_Type
(Id
));
3991 Set_Flag220
(Id
, V
);
3992 end Set_Has_Dispatch_Table
;
3994 procedure Set_Has_Dynamic_Predicate_Aspect
(Id
: E
; V
: B
:= True) is
3996 pragma Assert
(Is_Type
(Id
));
3997 Set_Flag258
(Id
, V
);
3998 end Set_Has_Dynamic_Predicate_Aspect
;
4000 procedure Set_Has_Enumeration_Rep_Clause
(Id
: E
; V
: B
:= True) is
4002 pragma Assert
(Is_Enumeration_Type
(Id
));
4004 end Set_Has_Enumeration_Rep_Clause
;
4006 procedure Set_Has_Exit
(Id
: E
; V
: B
:= True) is
4011 procedure Set_Has_External_Tag_Rep_Clause
(Id
: E
; V
: B
:= True) is
4013 pragma Assert
(Is_Tagged_Type
(Id
));
4014 Set_Flag110
(Id
, V
);
4015 end Set_Has_External_Tag_Rep_Clause
;
4017 procedure Set_Has_Forward_Instantiation
(Id
: E
; V
: B
:= True) is
4019 Set_Flag175
(Id
, V
);
4020 end Set_Has_Forward_Instantiation
;
4022 procedure Set_Has_Fully_Qualified_Name
(Id
: E
; V
: B
:= True) is
4024 Set_Flag173
(Id
, V
);
4025 end Set_Has_Fully_Qualified_Name
;
4027 procedure Set_Has_Gigi_Rep_Item
(Id
: E
; V
: B
:= True) is
4030 end Set_Has_Gigi_Rep_Item
;
4032 procedure Set_Has_Homonym
(Id
: E
; V
: B
:= True) is
4035 end Set_Has_Homonym
;
4037 procedure Set_Has_Implicit_Dereference
(Id
: E
; V
: B
:= True) is
4039 Set_Flag251
(Id
, V
);
4040 end Set_Has_Implicit_Dereference
;
4042 procedure Set_Has_Independent_Components
(Id
: E
; V
: B
:= True) is
4044 pragma Assert
(Is_Object
(Id
) or else Is_Type
(Id
));
4046 end Set_Has_Independent_Components
;
4048 procedure Set_Has_Inheritable_Invariants
(Id
: E
; V
: B
:= True) is
4050 pragma Assert
(Is_Type
(Id
));
4051 Set_Flag248
(Id
, V
);
4052 end Set_Has_Inheritable_Invariants
;
4054 procedure Set_Has_Initial_Value
(Id
: E
; V
: B
:= True) is
4056 pragma Assert
(Ekind_In
(Id
, E_Variable
, E_Out_Parameter
));
4057 Set_Flag219
(Id
, V
);
4058 end Set_Has_Initial_Value
;
4060 procedure Set_Has_Invariants
(Id
: E
; V
: B
:= True) is
4062 pragma Assert
(Is_Type
(Id
));
4063 Set_Flag232
(Id
, V
);
4064 end Set_Has_Invariants
;
4066 procedure Set_Has_Loop_Entry_Attributes
(Id
: E
; V
: B
:= True) is
4068 pragma Assert
(Ekind
(Id
) = E_Loop
);
4069 Set_Flag260
(Id
, V
);
4070 end Set_Has_Loop_Entry_Attributes
;
4072 procedure Set_Has_Machine_Radix_Clause
(Id
: E
; V
: B
:= True) is
4074 pragma Assert
(Is_Decimal_Fixed_Point_Type
(Id
));
4076 end Set_Has_Machine_Radix_Clause
;
4078 procedure Set_Has_Master_Entity
(Id
: E
; V
: B
:= True) is
4081 end Set_Has_Master_Entity
;
4083 procedure Set_Has_Missing_Return
(Id
: E
; V
: B
:= True) is
4085 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Generic_Function
));
4086 Set_Flag142
(Id
, V
);
4087 end Set_Has_Missing_Return
;
4089 procedure Set_Has_Nested_Block_With_Handler
(Id
: E
; V
: B
:= True) is
4091 Set_Flag101
(Id
, V
);
4092 end Set_Has_Nested_Block_With_Handler
;
4094 procedure Set_Has_Up_Level_Access
(Id
: E
; V
: B
:= True) is
4096 pragma Assert
(Ekind_In
(Id
, E_Variable
, E_Constant
, E_Loop_Parameter
));
4097 Set_Flag215
(Id
, V
);
4098 end Set_Has_Up_Level_Access
;
4100 procedure Set_Has_Non_Standard_Rep
(Id
: E
; V
: B
:= True) is
4102 pragma Assert
(Id
= Base_Type
(Id
));
4104 end Set_Has_Non_Standard_Rep
;
4106 procedure Set_Has_Object_Size_Clause
(Id
: E
; V
: B
:= True) is
4108 pragma Assert
(Is_Type
(Id
));
4109 Set_Flag172
(Id
, V
);
4110 end Set_Has_Object_Size_Clause
;
4112 procedure Set_Has_Per_Object_Constraint
(Id
: E
; V
: B
:= True) is
4114 Set_Flag154
(Id
, V
);
4115 end Set_Has_Per_Object_Constraint
;
4117 procedure Set_Has_Postconditions
(Id
: E
; V
: B
:= True) is
4119 pragma Assert
(Is_Subprogram
(Id
));
4120 Set_Flag240
(Id
, V
);
4121 end Set_Has_Postconditions
;
4123 procedure Set_Has_Pragma_Controlled
(Id
: E
; V
: B
:= True) is
4125 pragma Assert
(Is_Access_Type
(Id
));
4126 Set_Flag27
(Base_Type
(Id
), V
);
4127 end Set_Has_Pragma_Controlled
;
4129 procedure Set_Has_Pragma_Elaborate_Body
(Id
: E
; V
: B
:= True) is
4131 Set_Flag150
(Id
, V
);
4132 end Set_Has_Pragma_Elaborate_Body
;
4134 procedure Set_Has_Pragma_Inline
(Id
: E
; V
: B
:= True) is
4136 Set_Flag157
(Id
, V
);
4137 end Set_Has_Pragma_Inline
;
4139 procedure Set_Has_Pragma_Inline_Always
(Id
: E
; V
: B
:= True) is
4141 Set_Flag230
(Id
, V
);
4142 end Set_Has_Pragma_Inline_Always
;
4144 procedure Set_Has_Pragma_No_Inline
(Id
: E
; V
: B
:= True) is
4146 Set_Flag201
(Id
, V
);
4147 end Set_Has_Pragma_No_Inline
;
4149 procedure Set_Has_Pragma_Ordered
(Id
: E
; V
: B
:= True) is
4151 pragma Assert
(Is_Enumeration_Type
(Id
));
4152 pragma Assert
(Id
= Base_Type
(Id
));
4153 Set_Flag198
(Id
, V
);
4154 end Set_Has_Pragma_Ordered
;
4156 procedure Set_Has_Pragma_Pack
(Id
: E
; V
: B
:= True) is
4158 pragma Assert
(Is_Array_Type
(Id
) or else Is_Record_Type
(Id
));
4159 pragma Assert
(Id
= Base_Type
(Id
));
4160 Set_Flag121
(Id
, V
);
4161 end Set_Has_Pragma_Pack
;
4163 procedure Set_Has_Pragma_Preelab_Init
(Id
: E
; V
: B
:= True) is
4165 Set_Flag221
(Id
, V
);
4166 end Set_Has_Pragma_Preelab_Init
;
4168 procedure Set_Has_Pragma_Pure
(Id
: E
; V
: B
:= True) is
4170 Set_Flag203
(Id
, V
);
4171 end Set_Has_Pragma_Pure
;
4173 procedure Set_Has_Pragma_Pure_Function
(Id
: E
; V
: B
:= True) is
4175 Set_Flag179
(Id
, V
);
4176 end Set_Has_Pragma_Pure_Function
;
4178 procedure Set_Has_Pragma_Thread_Local_Storage
(Id
: E
; V
: B
:= True) is
4180 Set_Flag169
(Id
, V
);
4181 end Set_Has_Pragma_Thread_Local_Storage
;
4183 procedure Set_Has_Pragma_Unmodified
(Id
: E
; V
: B
:= True) is
4185 Set_Flag233
(Id
, V
);
4186 end Set_Has_Pragma_Unmodified
;
4188 procedure Set_Has_Pragma_Unreferenced
(Id
: E
; V
: B
:= True) is
4190 Set_Flag180
(Id
, V
);
4191 end Set_Has_Pragma_Unreferenced
;
4193 procedure Set_Has_Pragma_Unreferenced_Objects
(Id
: E
; V
: B
:= True) is
4195 pragma Assert
(Is_Type
(Id
));
4196 Set_Flag212
(Id
, V
);
4197 end Set_Has_Pragma_Unreferenced_Objects
;
4199 procedure Set_Has_Predicates
(Id
: E
; V
: B
:= True) is
4201 pragma Assert
(Is_Type
(Id
) or else Ekind
(Id
) = E_Void
);
4202 Set_Flag250
(Id
, V
);
4203 end Set_Has_Predicates
;
4205 procedure Set_Has_Primitive_Operations
(Id
: E
; V
: B
:= True) is
4207 pragma Assert
(Id
= Base_Type
(Id
));
4208 Set_Flag120
(Id
, V
);
4209 end Set_Has_Primitive_Operations
;
4211 procedure Set_Has_Private_Ancestor
(Id
: E
; V
: B
:= True) is
4213 pragma Assert
(Is_Type
(Id
));
4214 Set_Flag151
(Id
, V
);
4215 end Set_Has_Private_Ancestor
;
4217 procedure Set_Has_Private_Declaration
(Id
: E
; V
: B
:= True) is
4219 Set_Flag155
(Id
, V
);
4220 end Set_Has_Private_Declaration
;
4222 procedure Set_Has_Qualified_Name
(Id
: E
; V
: B
:= True) is
4224 Set_Flag161
(Id
, V
);
4225 end Set_Has_Qualified_Name
;
4227 procedure Set_Has_RACW
(Id
: E
; V
: B
:= True) is
4229 pragma Assert
(Ekind
(Id
) = E_Package
);
4230 Set_Flag214
(Id
, V
);
4233 procedure Set_Has_Record_Rep_Clause
(Id
: E
; V
: B
:= True) is
4235 pragma Assert
(Id
= Base_Type
(Id
));
4237 end Set_Has_Record_Rep_Clause
;
4239 procedure Set_Has_Recursive_Call
(Id
: E
; V
: B
:= True) is
4241 pragma Assert
(Is_Subprogram
(Id
));
4242 Set_Flag143
(Id
, V
);
4243 end Set_Has_Recursive_Call
;
4245 procedure Set_Has_Size_Clause
(Id
: E
; V
: B
:= True) is
4248 end Set_Has_Size_Clause
;
4250 procedure Set_Has_Small_Clause
(Id
: E
; V
: B
:= True) is
4253 end Set_Has_Small_Clause
;
4255 procedure Set_Has_Specified_Layout
(Id
: E
; V
: B
:= True) is
4257 pragma Assert
(Id
= Base_Type
(Id
));
4258 Set_Flag100
(Id
, V
);
4259 end Set_Has_Specified_Layout
;
4261 procedure Set_Has_Specified_Stream_Input
(Id
: E
; V
: B
:= True) is
4263 pragma Assert
(Is_Type
(Id
));
4264 Set_Flag190
(Id
, V
);
4265 end Set_Has_Specified_Stream_Input
;
4267 procedure Set_Has_Specified_Stream_Output
(Id
: E
; V
: B
:= True) is
4269 pragma Assert
(Is_Type
(Id
));
4270 Set_Flag191
(Id
, V
);
4271 end Set_Has_Specified_Stream_Output
;
4273 procedure Set_Has_Specified_Stream_Read
(Id
: E
; V
: B
:= True) is
4275 pragma Assert
(Is_Type
(Id
));
4276 Set_Flag192
(Id
, V
);
4277 end Set_Has_Specified_Stream_Read
;
4279 procedure Set_Has_Specified_Stream_Write
(Id
: E
; V
: B
:= True) is
4281 pragma Assert
(Is_Type
(Id
));
4282 Set_Flag193
(Id
, V
);
4283 end Set_Has_Specified_Stream_Write
;
4285 procedure Set_Has_Static_Discriminants
(Id
: E
; V
: B
:= True) is
4287 Set_Flag211
(Id
, V
);
4288 end Set_Has_Static_Discriminants
;
4290 procedure Set_Has_Static_Predicate_Aspect
(Id
: E
; V
: B
:= True) is
4292 pragma Assert
(Is_Type
(Id
));
4293 Set_Flag259
(Id
, V
);
4294 end Set_Has_Static_Predicate_Aspect
;
4296 procedure Set_Has_Storage_Size_Clause
(Id
: E
; V
: B
:= True) is
4298 pragma Assert
(Is_Access_Type
(Id
) or else Is_Task_Type
(Id
));
4299 pragma Assert
(Id
= Base_Type
(Id
));
4301 end Set_Has_Storage_Size_Clause
;
4303 procedure Set_Has_Stream_Size_Clause
(Id
: E
; V
: B
:= True) is
4305 pragma Assert
(Is_Elementary_Type
(Id
));
4306 Set_Flag184
(Id
, V
);
4307 end Set_Has_Stream_Size_Clause
;
4309 procedure Set_Has_Task
(Id
: E
; V
: B
:= True) is
4311 pragma Assert
(Id
= Base_Type
(Id
));
4315 procedure Set_Has_Thunks
(Id
: E
; V
: B
:= True) is
4317 pragma Assert
(Is_Tag
(Id
));
4318 Set_Flag228
(Id
, V
);
4321 procedure Set_Has_Unchecked_Union
(Id
: E
; V
: B
:= True) is
4323 pragma Assert
(Id
= Base_Type
(Id
));
4324 Set_Flag123
(Id
, V
);
4325 end Set_Has_Unchecked_Union
;
4327 procedure Set_Has_Unknown_Discriminants
(Id
: E
; V
: B
:= True) is
4329 pragma Assert
(Is_Type
(Id
));
4331 end Set_Has_Unknown_Discriminants
;
4333 procedure Set_Has_Volatile_Components
(Id
: E
; V
: B
:= True) is
4335 pragma Assert
(not Is_Type
(Id
) or else Is_Base_Type
(Id
));
4337 end Set_Has_Volatile_Components
;
4339 procedure Set_Has_Xref_Entry
(Id
: E
; V
: B
:= True) is
4341 Set_Flag182
(Id
, V
);
4342 end Set_Has_Xref_Entry
;
4344 procedure Set_Hiding_Loop_Variable
(Id
: E
; V
: E
) is
4346 pragma Assert
(Ekind
(Id
) = E_Variable
);
4348 end Set_Hiding_Loop_Variable
;
4350 procedure Set_Homonym
(Id
: E
; V
: E
) is
4352 pragma Assert
(Id
/= V
);
4356 procedure Set_Interface_Alias
(Id
: E
; V
: E
) is
4360 and then Is_Hidden
(Id
)
4361 and then (Ekind_In
(Id
, E_Procedure
, E_Function
)));
4363 end Set_Interface_Alias
;
4365 procedure Set_Interfaces
(Id
: E
; V
: L
) is
4367 pragma Assert
(Is_Record_Type
(Id
));
4368 Set_Elist25
(Id
, V
);
4371 procedure Set_In_Package_Body
(Id
: E
; V
: B
:= True) is
4374 end Set_In_Package_Body
;
4376 procedure Set_In_Private_Part
(Id
: E
; V
: B
:= True) is
4379 end Set_In_Private_Part
;
4381 procedure Set_In_Use
(Id
: E
; V
: B
:= True) is
4383 pragma Assert
(Nkind
(Id
) in N_Entity
);
4387 procedure Set_Initialization_Statements
(Id
: E
; V
: N
) is
4389 -- Tolerate an E_Void entity since this can be called while resolving
4390 -- an aggregate used as the initialization expression for an object
4391 -- declaration, and this occurs before the Ekind for the object is set.
4393 pragma Assert
(Ekind_In
(Id
, E_Void
, E_Constant
, E_Variable
));
4395 end Set_Initialization_Statements
;
4397 procedure Set_Integrity_Level
(Id
: E
; V
: Uint
) is
4399 pragma Assert
(Ekind
(Id
) = E_Abstract_State
);
4401 end Set_Integrity_Level
;
4403 procedure Set_Inner_Instances
(Id
: E
; V
: L
) is
4405 Set_Elist23
(Id
, V
);
4406 end Set_Inner_Instances
;
4408 procedure Set_Interface_Name
(Id
: E
; V
: N
) is
4411 end Set_Interface_Name
;
4413 procedure Set_Is_Abstract_Subprogram
(Id
: E
; V
: B
:= True) is
4415 pragma Assert
(Is_Overloadable
(Id
));
4417 end Set_Is_Abstract_Subprogram
;
4419 procedure Set_Is_Abstract_Type
(Id
: E
; V
: B
:= True) is
4421 pragma Assert
(Is_Type
(Id
));
4422 Set_Flag146
(Id
, V
);
4423 end Set_Is_Abstract_Type
;
4425 procedure Set_Is_Local_Anonymous_Access
(Id
: E
; V
: B
:= True) is
4427 pragma Assert
(Is_Access_Type
(Id
));
4428 Set_Flag194
(Id
, V
);
4429 end Set_Is_Local_Anonymous_Access
;
4431 procedure Set_Is_Access_Constant
(Id
: E
; V
: B
:= True) is
4433 pragma Assert
(Is_Access_Type
(Id
));
4435 end Set_Is_Access_Constant
;
4437 procedure Set_Is_Ada_2005_Only
(Id
: E
; V
: B
:= True) is
4439 Set_Flag185
(Id
, V
);
4440 end Set_Is_Ada_2005_Only
;
4442 procedure Set_Is_Ada_2012_Only
(Id
: E
; V
: B
:= True) is
4444 Set_Flag199
(Id
, V
);
4445 end Set_Is_Ada_2012_Only
;
4447 procedure Set_Is_Aliased
(Id
: E
; V
: B
:= True) is
4449 pragma Assert
(Nkind
(Id
) in N_Entity
);
4453 procedure Set_Is_AST_Entry
(Id
: E
; V
: B
:= True) is
4455 pragma Assert
(Is_Entry
(Id
));
4456 Set_Flag132
(Id
, V
);
4457 end Set_Is_AST_Entry
;
4459 procedure Set_Is_Asynchronous
(Id
: E
; V
: B
:= True) is
4462 (Ekind
(Id
) = E_Procedure
or else Is_Type
(Id
));
4464 end Set_Is_Asynchronous
;
4466 procedure Set_Is_Atomic
(Id
: E
; V
: B
:= True) is
4471 procedure Set_Is_Bit_Packed_Array
(Id
: E
; V
: B
:= True) is
4473 pragma Assert
((not V
)
4474 or else (Is_Array_Type
(Id
) and then Is_Base_Type
(Id
)));
4475 Set_Flag122
(Id
, V
);
4476 end Set_Is_Bit_Packed_Array
;
4478 procedure Set_Is_Called
(Id
: E
; V
: B
:= True) is
4480 pragma Assert
(Ekind_In
(Id
, E_Procedure
, E_Function
));
4481 Set_Flag102
(Id
, V
);
4484 procedure Set_Is_Character_Type
(Id
: E
; V
: B
:= True) is
4487 end Set_Is_Character_Type
;
4489 procedure Set_Is_Child_Unit
(Id
: E
; V
: B
:= True) is
4492 end Set_Is_Child_Unit
;
4494 procedure Set_Is_Class_Wide_Equivalent_Type
(Id
: E
; V
: B
:= True) is
4497 end Set_Is_Class_Wide_Equivalent_Type
;
4499 procedure Set_Is_Compilation_Unit
(Id
: E
; V
: B
:= True) is
4501 Set_Flag149
(Id
, V
);
4502 end Set_Is_Compilation_Unit
;
4504 procedure Set_Is_Completely_Hidden
(Id
: E
; V
: B
:= True) is
4506 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
4507 Set_Flag103
(Id
, V
);
4508 end Set_Is_Completely_Hidden
;
4510 procedure Set_Is_Concurrent_Record_Type
(Id
: E
; V
: B
:= True) is
4513 end Set_Is_Concurrent_Record_Type
;
4515 procedure Set_Is_Constr_Subt_For_U_Nominal
(Id
: E
; V
: B
:= True) is
4518 end Set_Is_Constr_Subt_For_U_Nominal
;
4520 procedure Set_Is_Constr_Subt_For_UN_Aliased
(Id
: E
; V
: B
:= True) is
4522 Set_Flag141
(Id
, V
);
4523 end Set_Is_Constr_Subt_For_UN_Aliased
;
4525 procedure Set_Is_Constrained
(Id
: E
; V
: B
:= True) is
4527 pragma Assert
(Nkind
(Id
) in N_Entity
);
4529 end Set_Is_Constrained
;
4531 procedure Set_Is_Constructor
(Id
: E
; V
: B
:= True) is
4534 end Set_Is_Constructor
;
4536 procedure Set_Is_Controlled
(Id
: E
; V
: B
:= True) is
4538 pragma Assert
(Id
= Base_Type
(Id
));
4540 end Set_Is_Controlled
;
4542 procedure Set_Is_Controlling_Formal
(Id
: E
; V
: B
:= True) is
4544 pragma Assert
(Is_Formal
(Id
));
4546 end Set_Is_Controlling_Formal
;
4548 procedure Set_Is_CPP_Class
(Id
: E
; V
: B
:= True) is
4551 end Set_Is_CPP_Class
;
4553 procedure Set_Is_Descendent_Of_Address
(Id
: E
; V
: B
:= True) is
4555 pragma Assert
(Is_Type
(Id
));
4556 Set_Flag223
(Id
, V
);
4557 end Set_Is_Descendent_Of_Address
;
4559 procedure Set_Is_Discrim_SO_Function
(Id
: E
; V
: B
:= True) is
4561 Set_Flag176
(Id
, V
);
4562 end Set_Is_Discrim_SO_Function
;
4564 procedure Set_Is_Dispatch_Table_Entity
(Id
: E
; V
: B
:= True) is
4566 Set_Flag234
(Id
, V
);
4567 end Set_Is_Dispatch_Table_Entity
;
4569 procedure Set_Is_Dispatching_Operation
(Id
: E
; V
: B
:= True) is
4574 Is_Overloadable
(Id
)
4576 Ekind
(Id
) = E_Subprogram_Type
);
4579 end Set_Is_Dispatching_Operation
;
4581 procedure Set_Is_Eliminated
(Id
: E
; V
: B
:= True) is
4583 Set_Flag124
(Id
, V
);
4584 end Set_Is_Eliminated
;
4586 procedure Set_Is_Entry_Formal
(Id
: E
; V
: B
:= True) is
4589 end Set_Is_Entry_Formal
;
4591 procedure Set_Is_Exported
(Id
: E
; V
: B
:= True) is
4594 end Set_Is_Exported
;
4596 procedure Set_Is_First_Subtype
(Id
: E
; V
: B
:= True) is
4599 end Set_Is_First_Subtype
;
4601 procedure Set_Is_For_Access_Subtype
(Id
: E
; V
: B
:= True) is
4603 pragma Assert
(Ekind_In
(Id
, E_Record_Subtype
, E_Private_Subtype
));
4604 Set_Flag118
(Id
, V
);
4605 end Set_Is_For_Access_Subtype
;
4607 procedure Set_Is_Formal_Subprogram
(Id
: E
; V
: B
:= True) is
4609 Set_Flag111
(Id
, V
);
4610 end Set_Is_Formal_Subprogram
;
4612 procedure Set_Is_Frozen
(Id
: E
; V
: B
:= True) is
4614 pragma Assert
(Nkind
(Id
) in N_Entity
);
4618 procedure Set_Is_Generic_Actual_Type
(Id
: E
; V
: B
:= True) is
4620 pragma Assert
(Is_Type
(Id
));
4622 end Set_Is_Generic_Actual_Type
;
4624 procedure Set_Is_Generic_Instance
(Id
: E
; V
: B
:= True) is
4626 Set_Flag130
(Id
, V
);
4627 end Set_Is_Generic_Instance
;
4629 procedure Set_Is_Generic_Type
(Id
: E
; V
: B
:= True) is
4631 pragma Assert
(Nkind
(Id
) in N_Entity
);
4633 end Set_Is_Generic_Type
;
4635 procedure Set_Is_Hidden
(Id
: E
; V
: B
:= True) is
4640 procedure Set_Is_Hidden_Open_Scope
(Id
: E
; V
: B
:= True) is
4642 Set_Flag171
(Id
, V
);
4643 end Set_Is_Hidden_Open_Scope
;
4645 procedure Set_Is_Immediately_Visible
(Id
: E
; V
: B
:= True) is
4647 pragma Assert
(Nkind
(Id
) in N_Entity
);
4649 end Set_Is_Immediately_Visible
;
4651 procedure Set_Is_Implementation_Defined
(Id
: E
; V
: B
:= True) is
4653 Set_Flag254
(Id
, V
);
4654 end Set_Is_Implementation_Defined
;
4656 procedure Set_Is_Imported
(Id
: E
; V
: B
:= True) is
4659 end Set_Is_Imported
;
4661 procedure Set_Is_Inlined
(Id
: E
; V
: B
:= True) is
4666 procedure Set_Is_Interface
(Id
: E
; V
: B
:= True) is
4668 pragma Assert
(Is_Record_Type
(Id
));
4669 Set_Flag186
(Id
, V
);
4670 end Set_Is_Interface
;
4672 procedure Set_Is_Instantiated
(Id
: E
; V
: B
:= True) is
4674 Set_Flag126
(Id
, V
);
4675 end Set_Is_Instantiated
;
4677 procedure Set_Is_Internal
(Id
: E
; V
: B
:= True) is
4679 pragma Assert
(Nkind
(Id
) in N_Entity
);
4681 end Set_Is_Internal
;
4683 procedure Set_Is_Interrupt_Handler
(Id
: E
; V
: B
:= True) is
4685 pragma Assert
(Nkind
(Id
) in N_Entity
);
4687 end Set_Is_Interrupt_Handler
;
4689 procedure Set_Is_Intrinsic_Subprogram
(Id
: E
; V
: B
:= True) is
4692 end Set_Is_Intrinsic_Subprogram
;
4694 procedure Set_Is_Invariant_Procedure
(Id
: E
; V
: B
:= True) is
4696 pragma Assert
(Ekind
(Id
) = E_Function
or else Ekind
(Id
) = E_Procedure
);
4697 Set_Flag257
(Id
, V
);
4698 end Set_Is_Invariant_Procedure
;
4700 procedure Set_Is_Itype
(Id
: E
; V
: B
:= True) is
4705 procedure Set_Is_Known_Non_Null
(Id
: E
; V
: B
:= True) is
4708 end Set_Is_Known_Non_Null
;
4710 procedure Set_Is_Known_Null
(Id
: E
; V
: B
:= True) is
4712 Set_Flag204
(Id
, V
);
4713 end Set_Is_Known_Null
;
4715 procedure Set_Is_Known_Valid
(Id
: E
; V
: B
:= True) is
4717 Set_Flag170
(Id
, V
);
4718 end Set_Is_Known_Valid
;
4720 procedure Set_Is_Limited_Composite
(Id
: E
; V
: B
:= True) is
4722 pragma Assert
(Is_Type
(Id
));
4723 Set_Flag106
(Id
, V
);
4724 end Set_Is_Limited_Composite
;
4726 procedure Set_Is_Limited_Interface
(Id
: E
; V
: B
:= True) is
4728 pragma Assert
(Is_Interface
(Id
));
4729 Set_Flag197
(Id
, V
);
4730 end Set_Is_Limited_Interface
;
4732 procedure Set_Is_Limited_Record
(Id
: E
; V
: B
:= True) is
4735 end Set_Is_Limited_Record
;
4737 procedure Set_Is_Machine_Code_Subprogram
(Id
: E
; V
: B
:= True) is
4739 pragma Assert
(Is_Subprogram
(Id
));
4740 Set_Flag137
(Id
, V
);
4741 end Set_Is_Machine_Code_Subprogram
;
4743 procedure Set_Is_Non_Static_Subtype
(Id
: E
; V
: B
:= True) is
4745 pragma Assert
(Is_Type
(Id
));
4746 Set_Flag109
(Id
, V
);
4747 end Set_Is_Non_Static_Subtype
;
4749 procedure Set_Is_Null_Init_Proc
(Id
: E
; V
: B
:= True) is
4751 pragma Assert
(Ekind
(Id
) = E_Procedure
);
4752 Set_Flag178
(Id
, V
);
4753 end Set_Is_Null_Init_Proc
;
4755 procedure Set_Is_Obsolescent
(Id
: E
; V
: B
:= True) is
4757 Set_Flag153
(Id
, V
);
4758 end Set_Is_Obsolescent
;
4760 procedure Set_Is_Only_Out_Parameter
(Id
: E
; V
: B
:= True) is
4762 pragma Assert
(Ekind
(Id
) = E_Out_Parameter
);
4763 Set_Flag226
(Id
, V
);
4764 end Set_Is_Only_Out_Parameter
;
4766 procedure Set_Is_Optional_Parameter
(Id
: E
; V
: B
:= True) is
4768 pragma Assert
(Is_Formal
(Id
));
4769 Set_Flag134
(Id
, V
);
4770 end Set_Is_Optional_Parameter
;
4772 procedure Set_Is_Package_Body_Entity
(Id
: E
; V
: B
:= True) is
4774 Set_Flag160
(Id
, V
);
4775 end Set_Is_Package_Body_Entity
;
4777 procedure Set_Is_Packed
(Id
: E
; V
: B
:= True) is
4779 pragma Assert
(Id
= Base_Type
(Id
));
4783 procedure Set_Is_Packed_Array_Type
(Id
: E
; V
: B
:= True) is
4785 Set_Flag138
(Id
, V
);
4786 end Set_Is_Packed_Array_Type
;
4788 procedure Set_Is_Potentially_Use_Visible
(Id
: E
; V
: B
:= True) is
4790 pragma Assert
(Nkind
(Id
) in N_Entity
);
4792 end Set_Is_Potentially_Use_Visible
;
4794 procedure Set_Is_Predicate_Function
(Id
: E
; V
: B
:= True) is
4796 pragma Assert
(Ekind
(Id
) = E_Function
or else Ekind
(Id
) = E_Procedure
);
4797 Set_Flag255
(Id
, V
);
4798 end Set_Is_Predicate_Function
;
4800 procedure Set_Is_Predicate_Function_M
(Id
: E
; V
: B
:= True) is
4802 pragma Assert
(Ekind
(Id
) = E_Function
or else Ekind
(Id
) = E_Procedure
);
4803 Set_Flag256
(Id
, V
);
4804 end Set_Is_Predicate_Function_M
;
4806 procedure Set_Is_Preelaborated
(Id
: E
; V
: B
:= True) is
4809 end Set_Is_Preelaborated
;
4811 procedure Set_Is_Primitive
(Id
: E
; V
: B
:= True) is
4814 (Is_Overloadable
(Id
)
4815 or else Ekind_In
(Id
, E_Generic_Function
, E_Generic_Procedure
));
4816 Set_Flag218
(Id
, V
);
4817 end Set_Is_Primitive
;
4819 procedure Set_Is_Primitive_Wrapper
(Id
: E
; V
: B
:= True) is
4821 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
4822 Set_Flag195
(Id
, V
);
4823 end Set_Is_Primitive_Wrapper
;
4825 procedure Set_Is_Private_Composite
(Id
: E
; V
: B
:= True) is
4827 pragma Assert
(Is_Type
(Id
));
4828 Set_Flag107
(Id
, V
);
4829 end Set_Is_Private_Composite
;
4831 procedure Set_Is_Private_Descendant
(Id
: E
; V
: B
:= True) is
4834 end Set_Is_Private_Descendant
;
4836 procedure Set_Is_Private_Primitive
(Id
: E
; V
: B
:= True) is
4838 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
4839 Set_Flag245
(Id
, V
);
4840 end Set_Is_Private_Primitive
;
4842 procedure Set_Is_Processed_Transient
(Id
: E
; V
: B
:= True) is
4844 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
4845 Set_Flag252
(Id
, V
);
4846 end Set_Is_Processed_Transient
;
4848 procedure Set_Is_Public
(Id
: E
; V
: B
:= True) is
4850 pragma Assert
(Nkind
(Id
) in N_Entity
);
4854 procedure Set_Is_Pure
(Id
: E
; V
: B
:= True) is
4859 procedure Set_Is_Pure_Unit_Access_Type
(Id
: E
; V
: B
:= True) is
4861 pragma Assert
(Is_Access_Type
(Id
));
4862 Set_Flag189
(Id
, V
);
4863 end Set_Is_Pure_Unit_Access_Type
;
4865 procedure Set_Is_RACW_Stub_Type
(Id
: E
; V
: B
:= True) is
4867 pragma Assert
(Is_Type
(Id
));
4868 Set_Flag244
(Id
, V
);
4869 end Set_Is_RACW_Stub_Type
;
4871 procedure Set_Is_Raised
(Id
: E
; V
: B
:= True) is
4873 pragma Assert
(Ekind
(Id
) = E_Exception
);
4874 Set_Flag224
(Id
, V
);
4877 procedure Set_Is_Remote_Call_Interface
(Id
: E
; V
: B
:= True) is
4880 end Set_Is_Remote_Call_Interface
;
4882 procedure Set_Is_Remote_Types
(Id
: E
; V
: B
:= True) is
4885 end Set_Is_Remote_Types
;
4887 procedure Set_Is_Renaming_Of_Object
(Id
: E
; V
: B
:= True) is
4889 Set_Flag112
(Id
, V
);
4890 end Set_Is_Renaming_Of_Object
;
4892 procedure Set_Is_Return_Object
(Id
: E
; V
: B
:= True) is
4894 Set_Flag209
(Id
, V
);
4895 end Set_Is_Return_Object
;
4897 procedure Set_Is_Safe_To_Reevaluate
(Id
: E
; V
: B
:= True) is
4899 pragma Assert
(Ekind
(Id
) = E_Variable
);
4900 Set_Flag249
(Id
, V
);
4901 end Set_Is_Safe_To_Reevaluate
;
4903 procedure Set_Is_Shared_Passive
(Id
: E
; V
: B
:= True) is
4906 end Set_Is_Shared_Passive
;
4908 procedure Set_Is_Statically_Allocated
(Id
: E
; V
: B
:= True) is
4912 or else Ekind_In
(Id
, E_Exception
,
4917 end Set_Is_Statically_Allocated
;
4919 procedure Set_Is_Tag
(Id
: E
; V
: B
:= True) is
4921 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Constant
, E_Variable
));
4925 procedure Set_Is_Tagged_Type
(Id
: E
; V
: B
:= True) is
4928 end Set_Is_Tagged_Type
;
4930 procedure Set_Is_Thunk
(Id
: E
; V
: B
:= True) is
4932 pragma Assert
(Is_Subprogram
(Id
));
4933 Set_Flag225
(Id
, V
);
4936 procedure Set_Is_Trivial_Subprogram
(Id
: E
; V
: B
:= True) is
4938 Set_Flag235
(Id
, V
);
4939 end Set_Is_Trivial_Subprogram
;
4941 procedure Set_Is_True_Constant
(Id
: E
; V
: B
:= True) is
4943 Set_Flag163
(Id
, V
);
4944 end Set_Is_True_Constant
;
4946 procedure Set_Is_Unchecked_Union
(Id
: E
; V
: B
:= True) is
4948 pragma Assert
(Id
= Base_Type
(Id
));
4949 Set_Flag117
(Id
, V
);
4950 end Set_Is_Unchecked_Union
;
4952 procedure Set_Is_Underlying_Record_View
(Id
: E
; V
: B
:= True) is
4954 pragma Assert
(Ekind
(Id
) = E_Record_Type
);
4955 Set_Flag246
(Id
, V
);
4956 end Set_Is_Underlying_Record_View
;
4958 procedure Set_Is_Unsigned_Type
(Id
: E
; V
: B
:= True) is
4960 pragma Assert
(Is_Discrete_Or_Fixed_Point_Type
(Id
));
4961 Set_Flag144
(Id
, V
);
4962 end Set_Is_Unsigned_Type
;
4964 procedure Set_Is_Valued_Procedure
(Id
: E
; V
: B
:= True) is
4966 pragma Assert
(Ekind
(Id
) = E_Procedure
);
4967 Set_Flag127
(Id
, V
);
4968 end Set_Is_Valued_Procedure
;
4970 procedure Set_Is_Visible_Formal
(Id
: E
; V
: B
:= True) is
4972 Set_Flag206
(Id
, V
);
4973 end Set_Is_Visible_Formal
;
4975 procedure Set_Is_Visible_Lib_Unit
(Id
: E
; V
: B
:= True) is
4977 Set_Flag116
(Id
, V
);
4978 end Set_Is_Visible_Lib_Unit
;
4980 procedure Set_Is_VMS_Exception
(Id
: E
; V
: B
:= True) is
4982 pragma Assert
(Ekind
(Id
) = E_Exception
);
4983 Set_Flag133
(Id
, V
);
4984 end Set_Is_VMS_Exception
;
4986 procedure Set_Is_Volatile
(Id
: E
; V
: B
:= True) is
4988 pragma Assert
(Nkind
(Id
) in N_Entity
);
4990 end Set_Is_Volatile
;
4992 procedure Set_Itype_Printed
(Id
: E
; V
: B
:= True) is
4994 pragma Assert
(Is_Itype
(Id
));
4995 Set_Flag202
(Id
, V
);
4996 end Set_Itype_Printed
;
4998 procedure Set_Kill_Elaboration_Checks
(Id
: E
; V
: B
:= True) is
5001 end Set_Kill_Elaboration_Checks
;
5003 procedure Set_Kill_Range_Checks
(Id
: E
; V
: B
:= True) is
5006 end Set_Kill_Range_Checks
;
5008 procedure Set_Known_To_Have_Preelab_Init
(Id
: E
; V
: B
:= True) is
5010 pragma Assert
(Is_Type
(Id
));
5011 Set_Flag207
(Id
, V
);
5012 end Set_Known_To_Have_Preelab_Init
;
5014 procedure Set_Last_Assignment
(Id
: E
; V
: N
) is
5016 pragma Assert
(Is_Assignable
(Id
));
5018 end Set_Last_Assignment
;
5020 procedure Set_Last_Entity
(Id
: E
; V
: E
) is
5023 end Set_Last_Entity
;
5025 procedure Set_Limited_View
(Id
: E
; V
: E
) is
5027 pragma Assert
(Ekind
(Id
) = E_Package
);
5029 end Set_Limited_View
;
5031 procedure Set_Lit_Indexes
(Id
: E
; V
: E
) is
5033 pragma Assert
(Is_Enumeration_Type
(Id
) and then Root_Type
(Id
) = Id
);
5035 end Set_Lit_Indexes
;
5037 procedure Set_Lit_Strings
(Id
: E
; V
: E
) is
5039 pragma Assert
(Is_Enumeration_Type
(Id
) and then Root_Type
(Id
) = Id
);
5041 end Set_Lit_Strings
;
5043 procedure Set_Low_Bound_Tested
(Id
: E
; V
: B
:= True) is
5045 pragma Assert
(Is_Formal
(Id
));
5046 Set_Flag205
(Id
, V
);
5047 end Set_Low_Bound_Tested
;
5049 procedure Set_Machine_Radix_10
(Id
: E
; V
: B
:= True) is
5051 pragma Assert
(Is_Decimal_Fixed_Point_Type
(Id
));
5053 end Set_Machine_Radix_10
;
5055 procedure Set_Master_Id
(Id
: E
; V
: E
) is
5057 pragma Assert
(Is_Access_Type
(Id
));
5061 procedure Set_Materialize_Entity
(Id
: E
; V
: B
:= True) is
5063 Set_Flag168
(Id
, V
);
5064 end Set_Materialize_Entity
;
5066 procedure Set_Mechanism
(Id
: E
; V
: M
) is
5068 pragma Assert
(Ekind
(Id
) = E_Function
or else Is_Formal
(Id
));
5069 Set_Uint8
(Id
, UI_From_Int
(V
));
5072 procedure Set_Modulus
(Id
: E
; V
: U
) is
5074 pragma Assert
(Ekind
(Id
) = E_Modular_Integer_Type
);
5078 procedure Set_Must_Be_On_Byte_Boundary
(Id
: E
; V
: B
:= True) is
5080 pragma Assert
(Is_Type
(Id
));
5081 Set_Flag183
(Id
, V
);
5082 end Set_Must_Be_On_Byte_Boundary
;
5084 procedure Set_Must_Have_Preelab_Init
(Id
: E
; V
: B
:= True) is
5086 pragma Assert
(Is_Type
(Id
));
5087 Set_Flag208
(Id
, V
);
5088 end Set_Must_Have_Preelab_Init
;
5090 procedure Set_Needs_Debug_Info
(Id
: E
; V
: B
:= True) is
5092 Set_Flag147
(Id
, V
);
5093 end Set_Needs_Debug_Info
;
5095 procedure Set_Needs_No_Actuals
(Id
: E
; V
: B
:= True) is
5098 (Is_Overloadable
(Id
)
5099 or else Ekind_In
(Id
, E_Subprogram_Type
, E_Entry_Family
));
5101 end Set_Needs_No_Actuals
;
5103 procedure Set_Never_Set_In_Source
(Id
: E
; V
: B
:= True) is
5105 Set_Flag115
(Id
, V
);
5106 end Set_Never_Set_In_Source
;
5108 procedure Set_Next_Inlined_Subprogram
(Id
: E
; V
: E
) is
5111 end Set_Next_Inlined_Subprogram
;
5113 procedure Set_No_Pool_Assigned
(Id
: E
; V
: B
:= True) is
5115 pragma Assert
(Is_Access_Type
(Id
) and then Is_Base_Type
(Id
));
5116 Set_Flag131
(Id
, V
);
5117 end Set_No_Pool_Assigned
;
5119 procedure Set_No_Return
(Id
: E
; V
: B
:= True) is
5122 (V
= False or else Ekind_In
(Id
, E_Procedure
, E_Generic_Procedure
));
5123 Set_Flag113
(Id
, V
);
5126 procedure Set_No_Strict_Aliasing
(Id
: E
; V
: B
:= True) is
5128 pragma Assert
(Is_Access_Type
(Id
) and then Is_Base_Type
(Id
));
5129 Set_Flag136
(Id
, V
);
5130 end Set_No_Strict_Aliasing
;
5132 procedure Set_Non_Binary_Modulus
(Id
: E
; V
: B
:= True) is
5134 pragma Assert
(Is_Type
(Id
) and then Is_Base_Type
(Id
));
5136 end Set_Non_Binary_Modulus
;
5138 procedure Set_Non_Limited_View
(Id
: E
; V
: E
) is
5140 pragma Assert
(Ekind
(Id
) in Incomplete_Kind
);
5142 end Set_Non_Limited_View
;
5144 procedure Set_Nonzero_Is_True
(Id
: E
; V
: B
:= True) is
5147 (Root_Type
(Id
) = Standard_Boolean
5148 and then Ekind
(Id
) = E_Enumeration_Type
);
5149 Set_Flag162
(Id
, V
);
5150 end Set_Nonzero_Is_True
;
5152 procedure Set_Normalized_First_Bit
(Id
: E
; V
: U
) is
5154 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
5156 end Set_Normalized_First_Bit
;
5158 procedure Set_Normalized_Position
(Id
: E
; V
: U
) is
5160 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
5162 end Set_Normalized_Position
;
5164 procedure Set_Normalized_Position_Max
(Id
: E
; V
: U
) is
5166 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
5168 end Set_Normalized_Position_Max
;
5170 procedure Set_OK_To_Rename
(Id
: E
; V
: B
:= True) is
5172 pragma Assert
(Ekind
(Id
) = E_Variable
);
5173 Set_Flag247
(Id
, V
);
5174 end Set_OK_To_Rename
;
5176 procedure Set_OK_To_Reorder_Components
(Id
: E
; V
: B
:= True) is
5179 (Is_Record_Type
(Id
) and then Is_Base_Type
(Id
));
5180 Set_Flag239
(Id
, V
);
5181 end Set_OK_To_Reorder_Components
;
5183 procedure Set_Optimize_Alignment_Space
(Id
: E
; V
: B
:= True) is
5186 (Is_Type
(Id
) or else Ekind_In
(Id
, E_Constant
, E_Variable
));
5187 Set_Flag241
(Id
, V
);
5188 end Set_Optimize_Alignment_Space
;
5190 procedure Set_Optimize_Alignment_Time
(Id
: E
; V
: B
:= True) is
5193 (Is_Type
(Id
) or else Ekind_In
(Id
, E_Constant
, E_Variable
));
5194 Set_Flag242
(Id
, V
);
5195 end Set_Optimize_Alignment_Time
;
5197 procedure Set_Original_Access_Type
(Id
: E
; V
: E
) is
5199 pragma Assert
(Ekind
(Id
) = E_Access_Subprogram_Type
);
5201 end Set_Original_Access_Type
;
5203 procedure Set_Original_Array_Type
(Id
: E
; V
: E
) is
5205 pragma Assert
(Is_Array_Type
(Id
) or else Is_Modular_Integer_Type
(Id
));
5207 end Set_Original_Array_Type
;
5209 procedure Set_Original_Record_Component
(Id
: E
; V
: E
) is
5211 pragma Assert
(Ekind_In
(Id
, E_Void
, E_Component
, E_Discriminant
));
5213 end Set_Original_Record_Component
;
5215 procedure Set_Overlays_Constant
(Id
: E
; V
: B
:= True) is
5217 Set_Flag243
(Id
, V
);
5218 end Set_Overlays_Constant
;
5220 procedure Set_Overridden_Operation
(Id
: E
; V
: E
) is
5223 end Set_Overridden_Operation
;
5225 procedure Set_Package_Instantiation
(Id
: E
; V
: N
) is
5227 pragma Assert
(Ekind_In
(Id
, E_Void
, E_Generic_Package
, E_Package
));
5229 end Set_Package_Instantiation
;
5231 procedure Set_Packed_Array_Type
(Id
: E
; V
: E
) is
5233 pragma Assert
(Is_Array_Type
(Id
));
5235 end Set_Packed_Array_Type
;
5237 procedure Set_Parent_Subtype
(Id
: E
; V
: E
) is
5239 pragma Assert
(Ekind
(Id
) = E_Record_Type
);
5241 end Set_Parent_Subtype
;
5243 procedure Set_Postcondition_Proc
(Id
: E
; V
: E
) is
5245 pragma Assert
(Ekind
(Id
) = E_Procedure
);
5247 end Set_Postcondition_Proc
;
5249 procedure Set_PPC_Wrapper
(Id
: E
; V
: E
) is
5251 pragma Assert
(Ekind_In
(Id
, E_Entry
, E_Entry_Family
));
5253 end Set_PPC_Wrapper
;
5255 procedure Set_Direct_Primitive_Operations
(Id
: E
; V
: L
) is
5257 pragma Assert
(Is_Tagged_Type
(Id
));
5258 Set_Elist10
(Id
, V
);
5259 end Set_Direct_Primitive_Operations
;
5261 procedure Set_Prival
(Id
: E
; V
: E
) is
5263 pragma Assert
(Is_Protected_Component
(Id
));
5267 procedure Set_Prival_Link
(Id
: E
; V
: E
) is
5269 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
5271 end Set_Prival_Link
;
5273 procedure Set_Private_Dependents
(Id
: E
; V
: L
) is
5275 pragma Assert
(Is_Incomplete_Or_Private_Type
(Id
));
5276 Set_Elist18
(Id
, V
);
5277 end Set_Private_Dependents
;
5279 procedure Set_Private_View
(Id
: E
; V
: N
) is
5281 pragma Assert
(Is_Private_Type
(Id
));
5283 end Set_Private_View
;
5285 procedure Set_Protected_Body_Subprogram
(Id
: E
; V
: E
) is
5287 pragma Assert
(Is_Subprogram
(Id
) or else Is_Entry
(Id
));
5289 end Set_Protected_Body_Subprogram
;
5291 procedure Set_Protected_Formal
(Id
: E
; V
: E
) is
5293 pragma Assert
(Is_Formal
(Id
));
5295 end Set_Protected_Formal
;
5297 procedure Set_Protection_Object
(Id
: E
; V
: E
) is
5299 pragma Assert
(Ekind_In
(Id
, E_Entry
,
5304 end Set_Protection_Object
;
5306 procedure Set_Reachable
(Id
: E
; V
: B
:= True) is
5311 procedure Set_Referenced
(Id
: E
; V
: B
:= True) is
5313 Set_Flag156
(Id
, V
);
5316 procedure Set_Referenced_As_LHS
(Id
: E
; V
: B
:= True) is
5319 end Set_Referenced_As_LHS
;
5321 procedure Set_Referenced_As_Out_Parameter
(Id
: E
; V
: B
:= True) is
5323 Set_Flag227
(Id
, V
);
5324 end Set_Referenced_As_Out_Parameter
;
5326 procedure Set_Refined_State
(Id
: E
; V
: E
) is
5328 pragma Assert
(Ekind
(Id
) = E_Abstract_State
);
5330 end Set_Refined_State
;
5332 procedure Set_Register_Exception_Call
(Id
: E
; V
: N
) is
5334 pragma Assert
(Ekind
(Id
) = E_Exception
);
5336 end Set_Register_Exception_Call
;
5338 procedure Set_Related_Array_Object
(Id
: E
; V
: E
) is
5340 pragma Assert
(Is_Array_Type
(Id
));
5342 end Set_Related_Array_Object
;
5344 procedure Set_Related_Expression
(Id
: E
; V
: N
) is
5346 pragma Assert
(Ekind
(Id
) in Type_Kind
5347 or else Ekind_In
(Id
, E_Constant
, E_Variable
, E_Void
));
5349 end Set_Related_Expression
;
5351 procedure Set_Related_Instance
(Id
: E
; V
: E
) is
5353 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Package_Body
));
5355 end Set_Related_Instance
;
5357 procedure Set_Related_Type
(Id
: E
; V
: E
) is
5359 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Constant
, E_Variable
));
5361 end Set_Related_Type
;
5363 procedure Set_Relative_Deadline_Variable
(Id
: E
; V
: E
) is
5365 pragma Assert
(Is_Task_Type
(Id
) and then Is_Base_Type
(Id
));
5367 end Set_Relative_Deadline_Variable
;
5369 procedure Set_Renamed_Entity
(Id
: E
; V
: N
) is
5372 end Set_Renamed_Entity
;
5374 procedure Set_Renamed_In_Spec
(Id
: E
; V
: B
:= True) is
5376 pragma Assert
(Ekind
(Id
) = E_Package
);
5377 Set_Flag231
(Id
, V
);
5378 end Set_Renamed_In_Spec
;
5380 procedure Set_Renamed_Object
(Id
: E
; V
: N
) is
5383 end Set_Renamed_Object
;
5385 procedure Set_Renaming_Map
(Id
: E
; V
: U
) is
5388 end Set_Renaming_Map
;
5390 procedure Set_Requires_Overriding
(Id
: E
; V
: B
:= True) is
5392 pragma Assert
(Is_Overloadable
(Id
));
5393 Set_Flag213
(Id
, V
);
5394 end Set_Requires_Overriding
;
5396 procedure Set_Return_Present
(Id
: E
; V
: B
:= True) is
5399 end Set_Return_Present
;
5401 procedure Set_Return_Applies_To
(Id
: E
; V
: N
) is
5404 end Set_Return_Applies_To
;
5406 procedure Set_Returns_By_Ref
(Id
: E
; V
: B
:= True) is
5409 end Set_Returns_By_Ref
;
5411 procedure Set_Reverse_Bit_Order
(Id
: E
; V
: B
:= True) is
5414 (Is_Record_Type
(Id
) and then Is_Base_Type
(Id
));
5415 Set_Flag164
(Id
, V
);
5416 end Set_Reverse_Bit_Order
;
5418 procedure Set_Reverse_Storage_Order
(Id
: E
; V
: B
:= True) is
5422 and then (Is_Record_Type
(Id
) or else Is_Array_Type
(Id
)));
5424 end Set_Reverse_Storage_Order
;
5426 procedure Set_RM_Size
(Id
: E
; V
: U
) is
5428 pragma Assert
(Is_Type
(Id
));
5432 procedure Set_Scalar_Range
(Id
: E
; V
: N
) is
5435 end Set_Scalar_Range
;
5437 procedure Set_Scale_Value
(Id
: E
; V
: U
) is
5440 end Set_Scale_Value
;
5442 procedure Set_Scope_Depth_Value
(Id
: E
; V
: U
) is
5444 pragma Assert
(not Is_Record_Type
(Id
));
5446 end Set_Scope_Depth_Value
;
5448 procedure Set_Sec_Stack_Needed_For_Return
(Id
: E
; V
: B
:= True) is
5450 Set_Flag167
(Id
, V
);
5451 end Set_Sec_Stack_Needed_For_Return
;
5453 procedure Set_Shadow_Entities
(Id
: E
; V
: S
) is
5455 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Generic_Package
));
5457 end Set_Shadow_Entities
;
5459 procedure Set_Shared_Var_Procs_Instance
(Id
: E
; V
: E
) is
5461 pragma Assert
(Ekind
(Id
) = E_Variable
);
5463 end Set_Shared_Var_Procs_Instance
;
5465 procedure Set_Size_Check_Code
(Id
: E
; V
: N
) is
5467 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
5469 end Set_Size_Check_Code
;
5471 procedure Set_Size_Depends_On_Discriminant
(Id
: E
; V
: B
:= True) is
5473 Set_Flag177
(Id
, V
);
5474 end Set_Size_Depends_On_Discriminant
;
5476 procedure Set_Size_Known_At_Compile_Time
(Id
: E
; V
: B
:= True) is
5479 end Set_Size_Known_At_Compile_Time
;
5481 procedure Set_Small_Value
(Id
: E
; V
: R
) is
5483 pragma Assert
(Is_Fixed_Point_Type
(Id
));
5484 Set_Ureal21
(Id
, V
);
5485 end Set_Small_Value
;
5487 procedure Set_SPARK_Mode_Pragmas
(Id
: E
; V
: N
) is
5490 (Ekind_In
(Id
, E_Function
, -- subprogram variants
5492 E_Generic_Procedure
,
5496 Ekind_In
(Id
, E_Generic_Package
, -- package variants
5501 end Set_SPARK_Mode_Pragmas
;
5503 procedure Set_Spec_Entity
(Id
: E
; V
: E
) is
5505 pragma Assert
(Ekind
(Id
) = E_Package_Body
or else Is_Formal
(Id
));
5507 end Set_Spec_Entity
;
5509 procedure Set_Static_Predicate
(Id
: E
; V
: S
) is
5512 (Ekind_In
(Id
, E_Enumeration_Subtype
,
5513 E_Modular_Integer_Subtype
,
5514 E_Signed_Integer_Subtype
)
5515 and then Has_Predicates
(Id
));
5517 end Set_Static_Predicate
;
5519 procedure Set_Status_Flag_Or_Transient_Decl
(Id
: E
; V
: E
) is
5521 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
5523 end Set_Status_Flag_Or_Transient_Decl
;
5525 procedure Set_Storage_Size_Variable
(Id
: E
; V
: E
) is
5527 pragma Assert
(Is_Access_Type
(Id
) or else Is_Task_Type
(Id
));
5528 pragma Assert
(Id
= Base_Type
(Id
));
5530 end Set_Storage_Size_Variable
;
5532 procedure Set_Static_Elaboration_Desired
(Id
: E
; V
: B
) is
5534 pragma Assert
(Ekind
(Id
) = E_Package
);
5536 end Set_Static_Elaboration_Desired
;
5538 procedure Set_Static_Initialization
(Id
: E
; V
: N
) is
5541 (Ekind
(Id
) = E_Procedure
and then not Is_Dispatching_Operation
(Id
));
5543 end Set_Static_Initialization
;
5545 procedure Set_Stored_Constraint
(Id
: E
; V
: L
) is
5547 pragma Assert
(Nkind
(Id
) in N_Entity
);
5548 Set_Elist23
(Id
, V
);
5549 end Set_Stored_Constraint
;
5551 procedure Set_Strict_Alignment
(Id
: E
; V
: B
:= True) is
5553 pragma Assert
(Id
= Base_Type
(Id
));
5554 Set_Flag145
(Id
, V
);
5555 end Set_Strict_Alignment
;
5557 procedure Set_String_Literal_Length
(Id
: E
; V
: U
) is
5559 pragma Assert
(Ekind
(Id
) = E_String_Literal_Subtype
);
5561 end Set_String_Literal_Length
;
5563 procedure Set_String_Literal_Low_Bound
(Id
: E
; V
: N
) is
5565 pragma Assert
(Ekind
(Id
) = E_String_Literal_Subtype
);
5567 end Set_String_Literal_Low_Bound
;
5569 procedure Set_Subprograms_For_Type
(Id
: E
; V
: E
) is
5571 pragma Assert
(Is_Type
(Id
) or else Is_Subprogram
(Id
));
5573 end Set_Subprograms_For_Type
;
5575 procedure Set_Suppress_Elaboration_Warnings
(Id
: E
; V
: B
:= True) is
5577 Set_Flag148
(Id
, V
);
5578 end Set_Suppress_Elaboration_Warnings
;
5580 procedure Set_Suppress_Initialization
(Id
: E
; V
: B
:= True) is
5582 pragma Assert
(Is_Type
(Id
));
5583 Set_Flag105
(Id
, V
);
5584 end Set_Suppress_Initialization
;
5586 procedure Set_Suppress_Style_Checks
(Id
: E
; V
: B
:= True) is
5588 Set_Flag165
(Id
, V
);
5589 end Set_Suppress_Style_Checks
;
5591 procedure Set_Suppress_Value_Tracking_On_Call
(Id
: E
; V
: B
:= True) is
5593 Set_Flag217
(Id
, V
);
5594 end Set_Suppress_Value_Tracking_On_Call
;
5596 procedure Set_Task_Body_Procedure
(Id
: E
; V
: N
) is
5598 pragma Assert
(Ekind
(Id
) in Task_Kind
);
5600 end Set_Task_Body_Procedure
;
5602 procedure Set_Thunk_Entity
(Id
: E
; V
: E
) is
5604 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
)
5605 and then Is_Thunk
(Id
));
5607 end Set_Thunk_Entity
;
5609 procedure Set_Treat_As_Volatile
(Id
: E
; V
: B
:= True) is
5612 end Set_Treat_As_Volatile
;
5614 procedure Set_Underlying_Full_View
(Id
: E
; V
: E
) is
5616 pragma Assert
(Ekind
(Id
) in Private_Kind
);
5618 end Set_Underlying_Full_View
;
5620 procedure Set_Underlying_Record_View
(Id
: E
; V
: E
) is
5622 pragma Assert
(Ekind
(Id
) = E_Record_Type
);
5624 end Set_Underlying_Record_View
;
5626 procedure Set_Universal_Aliasing
(Id
: E
; V
: B
:= True) is
5628 pragma Assert
(Is_Type
(Id
) and then Is_Base_Type
(Id
));
5629 Set_Flag216
(Id
, V
);
5630 end Set_Universal_Aliasing
;
5632 procedure Set_Unset_Reference
(Id
: E
; V
: N
) is
5635 end Set_Unset_Reference
;
5637 procedure Set_Used_As_Generic_Actual
(Id
: E
; V
: B
:= True) is
5639 Set_Flag222
(Id
, V
);
5640 end Set_Used_As_Generic_Actual
;
5642 procedure Set_Uses_Lock_Free
(Id
: E
; V
: B
:= True) is
5644 pragma Assert
(Ekind
(Id
) = E_Protected_Type
);
5645 Set_Flag188
(Id
, V
);
5646 end Set_Uses_Lock_Free
;
5648 procedure Set_Uses_Sec_Stack
(Id
: E
; V
: B
:= True) is
5651 end Set_Uses_Sec_Stack
;
5653 procedure Set_Warnings_Off
(Id
: E
; V
: B
:= True) is
5656 end Set_Warnings_Off
;
5658 procedure Set_Warnings_Off_Used
(Id
: E
; V
: B
:= True) is
5660 Set_Flag236
(Id
, V
);
5661 end Set_Warnings_Off_Used
;
5663 procedure Set_Warnings_Off_Used_Unmodified
(Id
: E
; V
: B
:= True) is
5665 Set_Flag237
(Id
, V
);
5666 end Set_Warnings_Off_Used_Unmodified
;
5668 procedure Set_Warnings_Off_Used_Unreferenced
(Id
: E
; V
: B
:= True) is
5670 Set_Flag238
(Id
, V
);
5671 end Set_Warnings_Off_Used_Unreferenced
;
5673 procedure Set_Was_Hidden
(Id
: E
; V
: B
:= True) is
5675 Set_Flag196
(Id
, V
);
5678 procedure Set_Wrapped_Entity
(Id
: E
; V
: E
) is
5680 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
)
5681 and then Is_Primitive_Wrapper
(Id
));
5683 end Set_Wrapped_Entity
;
5685 -----------------------------------
5686 -- Field Initialization Routines --
5687 -----------------------------------
5689 procedure Init_Alignment
(Id
: E
) is
5691 Set_Uint14
(Id
, Uint_0
);
5694 procedure Init_Alignment
(Id
: E
; V
: Int
) is
5696 Set_Uint14
(Id
, UI_From_Int
(V
));
5699 procedure Init_Component_Bit_Offset
(Id
: E
) is
5701 Set_Uint11
(Id
, No_Uint
);
5702 end Init_Component_Bit_Offset
;
5704 procedure Init_Component_Bit_Offset
(Id
: E
; V
: Int
) is
5706 Set_Uint11
(Id
, UI_From_Int
(V
));
5707 end Init_Component_Bit_Offset
;
5709 procedure Init_Component_Size
(Id
: E
) is
5711 Set_Uint22
(Id
, Uint_0
);
5712 end Init_Component_Size
;
5714 procedure Init_Component_Size
(Id
: E
; V
: Int
) is
5716 Set_Uint22
(Id
, UI_From_Int
(V
));
5717 end Init_Component_Size
;
5719 procedure Init_Digits_Value
(Id
: E
) is
5721 Set_Uint17
(Id
, Uint_0
);
5722 end Init_Digits_Value
;
5724 procedure Init_Digits_Value
(Id
: E
; V
: Int
) is
5726 Set_Uint17
(Id
, UI_From_Int
(V
));
5727 end Init_Digits_Value
;
5729 procedure Init_Esize
(Id
: E
) is
5731 Set_Uint12
(Id
, Uint_0
);
5734 procedure Init_Esize
(Id
: E
; V
: Int
) is
5736 Set_Uint12
(Id
, UI_From_Int
(V
));
5739 procedure Init_Normalized_First_Bit
(Id
: E
) is
5741 Set_Uint8
(Id
, No_Uint
);
5742 end Init_Normalized_First_Bit
;
5744 procedure Init_Normalized_First_Bit
(Id
: E
; V
: Int
) is
5746 Set_Uint8
(Id
, UI_From_Int
(V
));
5747 end Init_Normalized_First_Bit
;
5749 procedure Init_Normalized_Position
(Id
: E
) is
5751 Set_Uint14
(Id
, No_Uint
);
5752 end Init_Normalized_Position
;
5754 procedure Init_Normalized_Position
(Id
: E
; V
: Int
) is
5756 Set_Uint14
(Id
, UI_From_Int
(V
));
5757 end Init_Normalized_Position
;
5759 procedure Init_Normalized_Position_Max
(Id
: E
) is
5761 Set_Uint10
(Id
, No_Uint
);
5762 end Init_Normalized_Position_Max
;
5764 procedure Init_Normalized_Position_Max
(Id
: E
; V
: Int
) is
5766 Set_Uint10
(Id
, UI_From_Int
(V
));
5767 end Init_Normalized_Position_Max
;
5769 procedure Init_RM_Size
(Id
: E
) is
5771 Set_Uint13
(Id
, Uint_0
);
5774 procedure Init_RM_Size
(Id
: E
; V
: Int
) is
5776 Set_Uint13
(Id
, UI_From_Int
(V
));
5779 -----------------------------
5780 -- Init_Component_Location --
5781 -----------------------------
5783 procedure Init_Component_Location
(Id
: E
) is
5785 Set_Uint8
(Id
, No_Uint
); -- Normalized_First_Bit
5786 Set_Uint10
(Id
, No_Uint
); -- Normalized_Position_Max
5787 Set_Uint11
(Id
, No_Uint
); -- Component_Bit_Offset
5788 Set_Uint12
(Id
, Uint_0
); -- Esize
5789 Set_Uint14
(Id
, No_Uint
); -- Normalized_Position
5790 end Init_Component_Location
;
5792 ----------------------------
5793 -- Init_Object_Size_Align --
5794 ----------------------------
5796 procedure Init_Object_Size_Align
(Id
: E
) is
5798 Set_Uint12
(Id
, Uint_0
); -- Esize
5799 Set_Uint14
(Id
, Uint_0
); -- Alignment
5800 end Init_Object_Size_Align
;
5806 procedure Init_Size
(Id
: E
; V
: Int
) is
5808 pragma Assert
(not Is_Object
(Id
));
5809 Set_Uint12
(Id
, UI_From_Int
(V
)); -- Esize
5810 Set_Uint13
(Id
, UI_From_Int
(V
)); -- RM_Size
5813 ---------------------
5814 -- Init_Size_Align --
5815 ---------------------
5817 procedure Init_Size_Align
(Id
: E
) is
5819 pragma Assert
(not Is_Object
(Id
));
5820 Set_Uint12
(Id
, Uint_0
); -- Esize
5821 Set_Uint13
(Id
, Uint_0
); -- RM_Size
5822 Set_Uint14
(Id
, Uint_0
); -- Alignment
5823 end Init_Size_Align
;
5825 ----------------------------------------------
5826 -- Type Representation Attribute Predicates --
5827 ----------------------------------------------
5829 function Known_Alignment
(E
: Entity_Id
) return B
is
5831 return Uint14
(E
) /= Uint_0
5832 and then Uint14
(E
) /= No_Uint
;
5833 end Known_Alignment
;
5835 function Known_Component_Bit_Offset
(E
: Entity_Id
) return B
is
5837 return Uint11
(E
) /= No_Uint
;
5838 end Known_Component_Bit_Offset
;
5840 function Known_Component_Size
(E
: Entity_Id
) return B
is
5842 return Uint22
(Base_Type
(E
)) /= Uint_0
5843 and then Uint22
(Base_Type
(E
)) /= No_Uint
;
5844 end Known_Component_Size
;
5846 function Known_Esize
(E
: Entity_Id
) return B
is
5848 return Uint12
(E
) /= Uint_0
5849 and then Uint12
(E
) /= No_Uint
;
5852 function Known_Normalized_First_Bit
(E
: Entity_Id
) return B
is
5854 return Uint8
(E
) /= No_Uint
;
5855 end Known_Normalized_First_Bit
;
5857 function Known_Normalized_Position
(E
: Entity_Id
) return B
is
5859 return Uint14
(E
) /= No_Uint
;
5860 end Known_Normalized_Position
;
5862 function Known_Normalized_Position_Max
(E
: Entity_Id
) return B
is
5864 return Uint10
(E
) /= No_Uint
;
5865 end Known_Normalized_Position_Max
;
5867 function Known_RM_Size
(E
: Entity_Id
) return B
is
5869 return Uint13
(E
) /= No_Uint
5870 and then (Uint13
(E
) /= Uint_0
5871 or else Is_Discrete_Type
(E
)
5872 or else Is_Fixed_Point_Type
(E
));
5875 function Known_Static_Component_Bit_Offset
(E
: Entity_Id
) return B
is
5877 return Uint11
(E
) /= No_Uint
5878 and then Uint11
(E
) >= Uint_0
;
5879 end Known_Static_Component_Bit_Offset
;
5881 function Known_Static_Component_Size
(E
: Entity_Id
) return B
is
5883 return Uint22
(Base_Type
(E
)) > Uint_0
;
5884 end Known_Static_Component_Size
;
5886 function Known_Static_Esize
(E
: Entity_Id
) return B
is
5888 return Uint12
(E
) > Uint_0
5889 and then not Is_Generic_Type
(E
);
5890 end Known_Static_Esize
;
5892 function Known_Static_Normalized_First_Bit
(E
: Entity_Id
) return B
is
5894 return Uint8
(E
) /= No_Uint
5895 and then Uint8
(E
) >= Uint_0
;
5896 end Known_Static_Normalized_First_Bit
;
5898 function Known_Static_Normalized_Position
(E
: Entity_Id
) return B
is
5900 return Uint14
(E
) /= No_Uint
5901 and then Uint14
(E
) >= Uint_0
;
5902 end Known_Static_Normalized_Position
;
5904 function Known_Static_Normalized_Position_Max
(E
: Entity_Id
) return B
is
5906 return Uint10
(E
) /= No_Uint
5907 and then Uint10
(E
) >= Uint_0
;
5908 end Known_Static_Normalized_Position_Max
;
5910 function Known_Static_RM_Size
(E
: Entity_Id
) return B
is
5912 return (Uint13
(E
) > Uint_0
5913 or else Is_Discrete_Type
(E
)
5914 or else Is_Fixed_Point_Type
(E
))
5915 and then not Is_Generic_Type
(E
);
5916 end Known_Static_RM_Size
;
5918 function Unknown_Alignment
(E
: Entity_Id
) return B
is
5920 return Uint14
(E
) = Uint_0
5921 or else Uint14
(E
) = No_Uint
;
5922 end Unknown_Alignment
;
5924 function Unknown_Component_Bit_Offset
(E
: Entity_Id
) return B
is
5926 return Uint11
(E
) = No_Uint
;
5927 end Unknown_Component_Bit_Offset
;
5929 function Unknown_Component_Size
(E
: Entity_Id
) return B
is
5931 return Uint22
(Base_Type
(E
)) = Uint_0
5933 Uint22
(Base_Type
(E
)) = No_Uint
;
5934 end Unknown_Component_Size
;
5936 function Unknown_Esize
(E
: Entity_Id
) return B
is
5938 return Uint12
(E
) = No_Uint
5940 Uint12
(E
) = Uint_0
;
5943 function Unknown_Normalized_First_Bit
(E
: Entity_Id
) return B
is
5945 return Uint8
(E
) = No_Uint
;
5946 end Unknown_Normalized_First_Bit
;
5948 function Unknown_Normalized_Position
(E
: Entity_Id
) return B
is
5950 return Uint14
(E
) = No_Uint
;
5951 end Unknown_Normalized_Position
;
5953 function Unknown_Normalized_Position_Max
(E
: Entity_Id
) return B
is
5955 return Uint10
(E
) = No_Uint
;
5956 end Unknown_Normalized_Position_Max
;
5958 function Unknown_RM_Size
(E
: Entity_Id
) return B
is
5960 return (Uint13
(E
) = Uint_0
5961 and then not Is_Discrete_Type
(E
)
5962 and then not Is_Fixed_Point_Type
(E
))
5963 or else Uint13
(E
) = No_Uint
;
5964 end Unknown_RM_Size
;
5966 --------------------
5967 -- Address_Clause --
5968 --------------------
5970 function Address_Clause
(Id
: E
) return N
is
5972 return Rep_Clause
(Id
, Name_Address
);
5979 function Aft_Value
(Id
: E
) return U
is
5981 Delta_Val
: Ureal
:= Delta_Value
(Id
);
5983 while Delta_Val
< Ureal_Tenth
loop
5984 Delta_Val
:= Delta_Val
* Ureal_10
;
5985 Result
:= Result
+ 1;
5988 return UI_From_Int
(Result
);
5991 ----------------------
5992 -- Alignment_Clause --
5993 ----------------------
5995 function Alignment_Clause
(Id
: E
) return N
is
5997 return Rep_Clause
(Id
, Name_Alignment
);
5998 end Alignment_Clause
;
6004 procedure Append_Entity
(Id
: Entity_Id
; V
: Entity_Id
) is
6006 if Last_Entity
(V
) = Empty
then
6007 Set_First_Entity
(Id
=> V
, V
=> Id
);
6009 Set_Next_Entity
(Last_Entity
(V
), Id
);
6012 Set_Next_Entity
(Id
, Empty
);
6014 Set_Last_Entity
(Id
=> V
, V
=> Id
);
6021 function Base_Type
(Id
: E
) return E
is
6023 if Is_Base_Type
(Id
) then
6026 pragma Assert
(Is_Type
(Id
));
6031 -------------------------
6032 -- Component_Alignment --
6033 -------------------------
6035 -- Component Alignment is encoded using two flags, Flag128/129 as
6036 -- follows. Note that both flags False = Align_Default, so that the
6037 -- default initialization of flags to False initializes component
6038 -- alignment to the default value as required.
6040 -- Flag128 Flag129 Value
6041 -- ------- ------- -----
6042 -- False False Calign_Default
6043 -- False True Calign_Component_Size
6044 -- True False Calign_Component_Size_4
6045 -- True True Calign_Storage_Unit
6047 function Component_Alignment
(Id
: E
) return C
is
6048 BT
: constant Node_Id
:= Base_Type
(Id
);
6051 pragma Assert
(Is_Array_Type
(Id
) or else Is_Record_Type
(Id
));
6053 if Flag128
(BT
) then
6054 if Flag129
(BT
) then
6055 return Calign_Storage_Unit
;
6057 return Calign_Component_Size_4
;
6061 if Flag129
(BT
) then
6062 return Calign_Component_Size
;
6064 return Calign_Default
;
6067 end Component_Alignment
;
6069 ----------------------
6070 -- Declaration_Node --
6071 ----------------------
6073 function Declaration_Node
(Id
: E
) return N
is
6077 if Ekind
(Id
) = E_Incomplete_Type
6078 and then Present
(Full_View
(Id
))
6080 P
:= Parent
(Full_View
(Id
));
6086 if Nkind
(P
) /= N_Selected_Component
6087 and then Nkind
(P
) /= N_Expanded_Name
6089 not (Nkind
(P
) = N_Defining_Program_Unit_Name
6090 and then Is_Child_Unit
(Id
))
6097 end Declaration_Node
;
6099 ---------------------
6100 -- Designated_Type --
6101 ---------------------
6103 function Designated_Type
(Id
: E
) return E
is
6107 Desig_Type
:= Directly_Designated_Type
(Id
);
6109 if Ekind
(Desig_Type
) = E_Incomplete_Type
6110 and then Present
(Full_View
(Desig_Type
))
6112 return Full_View
(Desig_Type
);
6114 elsif Is_Class_Wide_Type
(Desig_Type
)
6115 and then Ekind
(Etype
(Desig_Type
)) = E_Incomplete_Type
6116 and then Present
(Full_View
(Etype
(Desig_Type
)))
6117 and then Present
(Class_Wide_Type
(Full_View
(Etype
(Desig_Type
))))
6119 return Class_Wide_Type
(Full_View
(Etype
(Desig_Type
)));
6124 end Designated_Type
;
6126 ----------------------
6127 -- Entry_Index_Type --
6128 ----------------------
6130 function Entry_Index_Type
(Id
: E
) return N
is
6132 pragma Assert
(Ekind
(Id
) = E_Entry_Family
);
6133 return Etype
(Discrete_Subtype_Definition
(Parent
(Id
)));
6134 end Entry_Index_Type
;
6136 ---------------------
6137 -- First_Component --
6138 ---------------------
6140 function First_Component
(Id
: E
) return E
is
6145 (Is_Record_Type
(Id
) or else Is_Incomplete_Or_Private_Type
(Id
));
6147 Comp_Id
:= First_Entity
(Id
);
6148 while Present
(Comp_Id
) loop
6149 exit when Ekind
(Comp_Id
) = E_Component
;
6150 Comp_Id
:= Next_Entity
(Comp_Id
);
6154 end First_Component
;
6156 -------------------------------------
6157 -- First_Component_Or_Discriminant --
6158 -------------------------------------
6160 function First_Component_Or_Discriminant
(Id
: E
) return E
is
6165 (Is_Record_Type
(Id
)
6166 or else Is_Incomplete_Or_Private_Type
(Id
)
6167 or else Has_Discriminants
(Id
));
6169 Comp_Id
:= First_Entity
(Id
);
6170 while Present
(Comp_Id
) loop
6171 exit when Ekind_In
(Comp_Id
, E_Component
, E_Discriminant
);
6172 Comp_Id
:= Next_Entity
(Comp_Id
);
6176 end First_Component_Or_Discriminant
;
6182 function First_Formal
(Id
: E
) return E
is
6187 (Is_Overloadable
(Id
)
6188 or else Ekind_In
(Id
, E_Entry_Family
,
6190 E_Subprogram_Type
));
6192 if Ekind
(Id
) = E_Enumeration_Literal
then
6196 Formal
:= First_Entity
(Id
);
6198 if Present
(Formal
) and then Is_Formal
(Formal
) then
6206 ------------------------------
6207 -- First_Formal_With_Extras --
6208 ------------------------------
6210 function First_Formal_With_Extras
(Id
: E
) return E
is
6215 (Is_Overloadable
(Id
)
6216 or else Ekind_In
(Id
, E_Entry_Family
,
6218 E_Subprogram_Type
));
6220 if Ekind
(Id
) = E_Enumeration_Literal
then
6224 Formal
:= First_Entity
(Id
);
6226 if Present
(Formal
) and then Is_Formal
(Formal
) then
6229 return Extra_Formals
(Id
); -- Empty if no extra formals
6232 end First_Formal_With_Extras
;
6234 -------------------------------------
6235 -- Get_Attribute_Definition_Clause --
6236 -------------------------------------
6238 function Get_Attribute_Definition_Clause
6240 Id
: Attribute_Id
) return Node_Id
6245 N
:= First_Rep_Item
(E
);
6246 while Present
(N
) loop
6247 if Nkind
(N
) = N_Attribute_Definition_Clause
6248 and then Get_Attribute_Id
(Chars
(N
)) = Id
6257 end Get_Attribute_Definition_Clause
;
6263 function Get_Full_View
(T
: Entity_Id
) return Entity_Id
is
6265 if Ekind
(T
) = E_Incomplete_Type
and then Present
(Full_View
(T
)) then
6266 return Full_View
(T
);
6268 elsif Is_Class_Wide_Type
(T
)
6269 and then Ekind
(Root_Type
(T
)) = E_Incomplete_Type
6270 and then Present
(Full_View
(Root_Type
(T
)))
6272 return Class_Wide_Type
(Full_View
(Root_Type
(T
)));
6283 function Get_Pragma
(E
: Entity_Id
; Id
: Pragma_Id
) return Node_Id
is
6284 Is_CDG
: constant Boolean :=
6285 Id
= Pragma_Depends
or else Id
= Pragma_Global
;
6286 Is_CTC
: constant Boolean :=
6287 Id
= Pragma_Contract_Cases
or else Id
= Pragma_Test_Case
;
6288 Is_PPC
: constant Boolean :=
6289 Id
= Pragma_Precondition
or else Id
= Pragma_Postcondition
;
6290 Delayed
: constant Boolean := Is_CDG
or else Is_CTC
or else Is_PPC
;
6295 -- Handle delayed pragmas that appear in N_Contract nodes. Those have to
6296 -- be extracted from their specialized list.
6299 Items
:= Contract
(E
);
6305 Item
:= Classifications
(Items
);
6308 Item
:= Contract_Test_Cases
(Items
);
6311 Item
:= Pre_Post_Conditions
(Items
);
6317 Item
:= First_Rep_Item
(E
);
6320 while Present
(Item
) loop
6321 if Nkind
(Item
) = N_Pragma
6322 and then Get_Pragma_Id
(Pragma_Name
(Item
)) = Id
6326 -- All nodes in N_Contract are chained using Next_Pragma
6329 Item
:= Next_Pragma
(Item
);
6334 Next_Rep_Item
(Item
);
6341 --------------------------------------
6342 -- Get_Record_Representation_Clause --
6343 --------------------------------------
6345 function Get_Record_Representation_Clause
(E
: Entity_Id
) return Node_Id
is
6349 N
:= First_Rep_Item
(E
);
6350 while Present
(N
) loop
6351 if Nkind
(N
) = N_Record_Representation_Clause
then
6359 end Get_Record_Representation_Clause
;
6361 ------------------------
6362 -- Has_Attach_Handler --
6363 ------------------------
6365 function Has_Attach_Handler
(Id
: E
) return B
is
6369 pragma Assert
(Is_Protected_Type
(Id
));
6371 Ritem
:= First_Rep_Item
(Id
);
6372 while Present
(Ritem
) loop
6373 if Nkind
(Ritem
) = N_Pragma
6374 and then Pragma_Name
(Ritem
) = Name_Attach_Handler
6378 Next_Rep_Item
(Ritem
);
6383 end Has_Attach_Handler
;
6389 function Has_Entries
(Id
: E
) return B
is
6393 pragma Assert
(Is_Concurrent_Type
(Id
));
6395 Ent
:= First_Entity
(Id
);
6396 while Present
(Ent
) loop
6397 if Is_Entry
(Ent
) then
6401 Ent
:= Next_Entity
(Ent
);
6407 ----------------------------
6408 -- Has_Foreign_Convention --
6409 ----------------------------
6411 function Has_Foreign_Convention
(Id
: E
) return B
is
6413 -- While regular Intrinsics such as the Standard operators fit in the
6414 -- "Ada" convention, those with an Interface_Name materialize GCC
6415 -- builtin imports for which Ada special treatments shouldn't apply.
6417 return Convention
(Id
) in Foreign_Convention
6418 or else (Convention
(Id
) = Convention_Intrinsic
6419 and then Present
(Interface_Name
(Id
)));
6420 end Has_Foreign_Convention
;
6422 ---------------------------
6423 -- Has_Interrupt_Handler --
6424 ---------------------------
6426 function Has_Interrupt_Handler
(Id
: E
) return B
is
6430 pragma Assert
(Is_Protected_Type
(Id
));
6432 Ritem
:= First_Rep_Item
(Id
);
6433 while Present
(Ritem
) loop
6434 if Nkind
(Ritem
) = N_Pragma
6435 and then Pragma_Name
(Ritem
) = Name_Interrupt_Handler
6439 Next_Rep_Item
(Ritem
);
6444 end Has_Interrupt_Handler
;
6446 --------------------
6447 -- Has_Unmodified --
6448 --------------------
6450 function Has_Unmodified
(E
: Entity_Id
) return Boolean is
6452 if Has_Pragma_Unmodified
(E
) then
6454 elsif Warnings_Off
(E
) then
6455 Set_Warnings_Off_Used_Unmodified
(E
);
6462 ---------------------
6463 -- Has_Unreferenced --
6464 ---------------------
6466 function Has_Unreferenced
(E
: Entity_Id
) return Boolean is
6468 if Has_Pragma_Unreferenced
(E
) then
6470 elsif Warnings_Off
(E
) then
6471 Set_Warnings_Off_Used_Unreferenced
(E
);
6476 end Has_Unreferenced
;
6478 ----------------------
6479 -- Has_Warnings_Off --
6480 ----------------------
6482 function Has_Warnings_Off
(E
: Entity_Id
) return Boolean is
6484 if Warnings_Off
(E
) then
6485 Set_Warnings_Off_Used
(E
);
6490 end Has_Warnings_Off
;
6492 ------------------------------
6493 -- Implementation_Base_Type --
6494 ------------------------------
6496 function Implementation_Base_Type
(Id
: E
) return E
is
6501 Bastyp
:= Base_Type
(Id
);
6503 if Is_Incomplete_Or_Private_Type
(Bastyp
) then
6504 Imptyp
:= Underlying_Type
(Bastyp
);
6506 -- If we have an implementation type, then just return it,
6507 -- otherwise we return the Base_Type anyway. This can only
6508 -- happen in error situations and should avoid some error bombs.
6510 if Present
(Imptyp
) then
6511 return Base_Type
(Imptyp
);
6519 end Implementation_Base_Type
;
6521 -------------------------
6522 -- Invariant_Procedure --
6523 -------------------------
6525 function Invariant_Procedure
(Id
: E
) return E
is
6529 pragma Assert
(Is_Type
(Id
) and then Has_Invariants
(Id
));
6531 if No
(Subprograms_For_Type
(Id
)) then
6535 S
:= Subprograms_For_Type
(Id
);
6536 while Present
(S
) loop
6537 if Is_Invariant_Procedure
(S
) then
6540 S
:= Subprograms_For_Type
(S
);
6546 end Invariant_Procedure
;
6552 -- Global flag table allowing rapid computation of this function
6554 Entity_Is_Base_Type
: constant array (Entity_Kind
) of Boolean :=
6555 (E_Enumeration_Subtype |
6557 E_Signed_Integer_Subtype |
6558 E_Modular_Integer_Subtype |
6559 E_Floating_Point_Subtype |
6560 E_Ordinary_Fixed_Point_Subtype |
6561 E_Decimal_Fixed_Point_Subtype |
6566 E_Record_Subtype_With_Private |
6567 E_Limited_Private_Subtype |
6569 E_Protected_Subtype |
6571 E_String_Literal_Subtype |
6572 E_Class_Wide_Subtype
=> False,
6575 function Is_Base_Type
(Id
: E
) return Boolean is
6577 return Entity_Is_Base_Type
(Ekind
(Id
));
6580 ---------------------
6581 -- Is_Boolean_Type --
6582 ---------------------
6584 function Is_Boolean_Type
(Id
: E
) return B
is
6586 return Root_Type
(Id
) = Standard_Boolean
;
6587 end Is_Boolean_Type
;
6589 ------------------------
6590 -- Is_Constant_Object --
6591 ------------------------
6593 function Is_Constant_Object
(Id
: E
) return B
is
6594 K
: constant Entity_Kind
:= Ekind
(Id
);
6597 K
= E_Constant
or else K
= E_In_Parameter
or else K
= E_Loop_Parameter
;
6598 end Is_Constant_Object
;
6600 --------------------
6601 -- Is_Discriminal --
6602 --------------------
6604 function Is_Discriminal
(Id
: E
) return B
is
6606 return (Ekind_In
(Id
, E_Constant
, E_In_Parameter
)
6607 and then Present
(Discriminal_Link
(Id
)));
6610 ----------------------
6611 -- Is_Dynamic_Scope --
6612 ----------------------
6614 function Is_Dynamic_Scope
(Id
: E
) return B
is
6617 Ekind
(Id
) = E_Block
6619 Ekind
(Id
) = E_Function
6621 Ekind
(Id
) = E_Procedure
6623 Ekind
(Id
) = E_Subprogram_Body
6625 Ekind
(Id
) = E_Task_Type
6627 (Ekind
(Id
) = E_Limited_Private_Type
6628 and then Present
(Full_View
(Id
))
6629 and then Ekind
(Full_View
(Id
)) = E_Task_Type
)
6631 Ekind
(Id
) = E_Entry
6633 Ekind
(Id
) = E_Entry_Family
6635 Ekind
(Id
) = E_Return_Statement
;
6636 end Is_Dynamic_Scope
;
6638 --------------------
6639 -- Is_Entity_Name --
6640 --------------------
6642 function Is_Entity_Name
(N
: Node_Id
) return Boolean is
6643 Kind
: constant Node_Kind
:= Nkind
(N
);
6646 -- Identifiers, operator symbols, expanded names are entity names
6648 return Kind
= N_Identifier
6649 or else Kind
= N_Operator_Symbol
6650 or else Kind
= N_Expanded_Name
6652 -- Attribute references are entity names if they refer to an entity.
6653 -- Note that we don't do this by testing for the presence of the
6654 -- Entity field in the N_Attribute_Reference node, since it may not
6655 -- have been set yet.
6657 or else (Kind
= N_Attribute_Reference
6658 and then Is_Entity_Attribute_Name
(Attribute_Name
(N
)));
6665 function Is_Finalizer
(Id
: E
) return B
is
6667 return Ekind
(Id
) = E_Procedure
and then Chars
(Id
) = Name_uFinalizer
;
6670 ---------------------
6671 -- Is_Ghost_Entity --
6672 ---------------------
6674 function Is_Ghost_Entity
(Id
: E
) return B
is
6676 if Present
(Id
) and then Ekind
(Id
) = E_Variable
then
6677 return Convention
(Id
) = Convention_Ghost
;
6679 return Is_Ghost_Subprogram
(Id
);
6681 end Is_Ghost_Entity
;
6683 -------------------------
6684 -- Is_Ghost_Subprogram --
6685 -------------------------
6687 function Is_Ghost_Subprogram
(Id
: E
) return B
is
6689 if Present
(Id
) and then Ekind_In
(Id
, E_Function
, E_Procedure
) then
6690 return Convention
(Id
) = Convention_Ghost
;
6694 end Is_Ghost_Subprogram
;
6696 --------------------
6697 -- Is_Input_State --
6698 --------------------
6700 function Is_Input_State
(Id
: E
) return B
is
6703 Ekind
(Id
) = E_Abstract_State
and then Has_Property
(Id
, Name_Input
);
6710 function Is_Null_State
(Id
: E
) return B
is
6713 Ekind
(Id
) = E_Abstract_State
and then Nkind
(Parent
(Id
)) = N_Null
;
6716 ---------------------
6717 -- Is_Output_State --
6718 ---------------------
6720 function Is_Output_State
(Id
: E
) return B
is
6723 Ekind
(Id
) = E_Abstract_State
and then Has_Property
(Id
, Name_Output
);
6724 end Is_Output_State
;
6726 -----------------------------------
6727 -- Is_Package_Or_Generic_Package --
6728 -----------------------------------
6730 function Is_Package_Or_Generic_Package
(Id
: E
) return B
is
6732 return Ekind_In
(Id
, E_Generic_Package
, E_Package
);
6733 end Is_Package_Or_Generic_Package
;
6739 function Is_Prival
(Id
: E
) return B
is
6741 return (Ekind_In
(Id
, E_Constant
, E_Variable
)
6742 and then Present
(Prival_Link
(Id
)));
6745 ----------------------------
6746 -- Is_Protected_Component --
6747 ----------------------------
6749 function Is_Protected_Component
(Id
: E
) return B
is
6751 return Ekind
(Id
) = E_Component
and then Is_Protected_Type
(Scope
(Id
));
6752 end Is_Protected_Component
;
6754 ----------------------------
6755 -- Is_Protected_Interface --
6756 ----------------------------
6758 function Is_Protected_Interface
(Id
: E
) return B
is
6759 Typ
: constant Entity_Id
:= Base_Type
(Id
);
6761 if not Is_Interface
(Typ
) then
6763 elsif Is_Class_Wide_Type
(Typ
) then
6764 return Is_Protected_Interface
(Etype
(Typ
));
6766 return Protected_Present
(Type_Definition
(Parent
(Typ
)));
6768 end Is_Protected_Interface
;
6770 ------------------------------
6771 -- Is_Protected_Record_Type --
6772 ------------------------------
6774 function Is_Protected_Record_Type
(Id
: E
) return B
is
6777 Is_Concurrent_Record_Type
(Id
)
6778 and then Is_Protected_Type
(Corresponding_Concurrent_Type
(Id
));
6779 end Is_Protected_Record_Type
;
6781 --------------------------------
6782 -- Is_Standard_Character_Type --
6783 --------------------------------
6785 function Is_Standard_Character_Type
(Id
: E
) return B
is
6787 if Is_Type
(Id
) then
6789 R
: constant Entity_Id
:= Root_Type
(Id
);
6792 R
= Standard_Character
6794 R
= Standard_Wide_Character
6796 R
= Standard_Wide_Wide_Character
;
6802 end Is_Standard_Character_Type
;
6804 --------------------
6805 -- Is_String_Type --
6806 --------------------
6808 function Is_String_Type
(Id
: E
) return B
is
6810 return Ekind
(Id
) in String_Kind
6811 or else (Is_Array_Type
(Id
)
6812 and then Id
/= Any_Composite
6813 and then Number_Dimensions
(Id
) = 1
6814 and then Is_Character_Type
(Component_Type
(Id
)));
6817 -------------------------------
6818 -- Is_Synchronized_Interface --
6819 -------------------------------
6821 function Is_Synchronized_Interface
(Id
: E
) return B
is
6822 Typ
: constant Entity_Id
:= Base_Type
(Id
);
6825 if not Is_Interface
(Typ
) then
6828 elsif Is_Class_Wide_Type
(Typ
) then
6829 return Is_Synchronized_Interface
(Etype
(Typ
));
6832 return Protected_Present
(Type_Definition
(Parent
(Typ
)))
6833 or else Synchronized_Present
(Type_Definition
(Parent
(Typ
)))
6834 or else Task_Present
(Type_Definition
(Parent
(Typ
)));
6836 end Is_Synchronized_Interface
;
6838 -----------------------
6839 -- Is_Task_Interface --
6840 -----------------------
6842 function Is_Task_Interface
(Id
: E
) return B
is
6843 Typ
: constant Entity_Id
:= Base_Type
(Id
);
6845 if not Is_Interface
(Typ
) then
6847 elsif Is_Class_Wide_Type
(Typ
) then
6848 return Is_Task_Interface
(Etype
(Typ
));
6850 return Task_Present
(Type_Definition
(Parent
(Typ
)));
6852 end Is_Task_Interface
;
6854 -------------------------
6855 -- Is_Task_Record_Type --
6856 -------------------------
6858 function Is_Task_Record_Type
(Id
: E
) return B
is
6861 Is_Concurrent_Record_Type
(Id
)
6862 and then Is_Task_Type
(Corresponding_Concurrent_Type
(Id
));
6863 end Is_Task_Record_Type
;
6865 -----------------------
6866 -- Is_Volatile_State --
6867 -----------------------
6869 function Is_Volatile_State
(Id
: E
) return B
is
6872 Ekind
(Id
) = E_Abstract_State
6873 and then Has_Property
(Id
, Name_Volatile
);
6874 end Is_Volatile_State
;
6876 ------------------------
6877 -- Is_Wrapper_Package --
6878 ------------------------
6880 function Is_Wrapper_Package
(Id
: E
) return B
is
6882 return (Ekind
(Id
) = E_Package
and then Present
(Related_Instance
(Id
)));
6883 end Is_Wrapper_Package
;
6889 function Last_Formal
(Id
: E
) return E
is
6894 (Is_Overloadable
(Id
)
6895 or else Ekind_In
(Id
, E_Entry_Family
,
6897 E_Subprogram_Type
));
6899 if Ekind
(Id
) = E_Enumeration_Literal
then
6903 Formal
:= First_Formal
(Id
);
6905 if Present
(Formal
) then
6906 while Present
(Next_Formal
(Formal
)) loop
6907 Formal
:= Next_Formal
(Formal
);
6915 function Model_Emin_Value
(Id
: E
) return Uint
is
6917 return Machine_Emin_Value
(Id
);
6918 end Model_Emin_Value
;
6920 -------------------------
6921 -- Model_Epsilon_Value --
6922 -------------------------
6924 function Model_Epsilon_Value
(Id
: E
) return Ureal
is
6925 Radix
: constant Ureal
:= UR_From_Uint
(Machine_Radix_Value
(Id
));
6927 return Radix
** (1 - Model_Mantissa_Value
(Id
));
6928 end Model_Epsilon_Value
;
6930 --------------------------
6931 -- Model_Mantissa_Value --
6932 --------------------------
6934 function Model_Mantissa_Value
(Id
: E
) return Uint
is
6936 return Machine_Mantissa_Value
(Id
);
6937 end Model_Mantissa_Value
;
6939 -----------------------
6940 -- Model_Small_Value --
6941 -----------------------
6943 function Model_Small_Value
(Id
: E
) return Ureal
is
6944 Radix
: constant Ureal
:= UR_From_Uint
(Machine_Radix_Value
(Id
));
6946 return Radix
** (Model_Emin_Value
(Id
) - 1);
6947 end Model_Small_Value
;
6949 ------------------------
6950 -- Machine_Emax_Value --
6951 ------------------------
6953 function Machine_Emax_Value
(Id
: E
) return Uint
is
6954 Digs
: constant Pos
:= UI_To_Int
(Digits_Value
(Base_Type
(Id
)));
6957 case Float_Rep
(Id
) is
6960 when 1 .. 6 => return Uint_128
;
6961 when 7 .. 15 => return 2**10;
6962 when 16 .. 33 => return 2**14;
6963 when others => return No_Uint
;
6968 when 1 .. 9 => return 2**7 - 1;
6969 when 10 .. 15 => return 2**10 - 1;
6970 when others => return No_Uint
;
6974 return Uint_2
** Uint_7
- Uint_1
;
6976 end Machine_Emax_Value
;
6978 ------------------------
6979 -- Machine_Emin_Value --
6980 ------------------------
6982 function Machine_Emin_Value
(Id
: E
) return Uint
is
6984 case Float_Rep
(Id
) is
6985 when IEEE_Binary
=> return Uint_3
- Machine_Emax_Value
(Id
);
6986 when VAX_Native
=> return -Machine_Emax_Value
(Id
);
6987 when AAMP
=> return -Machine_Emax_Value
(Id
);
6989 end Machine_Emin_Value
;
6991 ----------------------------
6992 -- Machine_Mantissa_Value --
6993 ----------------------------
6995 function Machine_Mantissa_Value
(Id
: E
) return Uint
is
6996 Digs
: constant Pos
:= UI_To_Int
(Digits_Value
(Base_Type
(Id
)));
6999 case Float_Rep
(Id
) is
7002 when 1 .. 6 => return Uint_24
;
7003 when 7 .. 15 => return UI_From_Int
(53);
7004 when 16 .. 18 => return Uint_64
;
7005 when 19 .. 33 => return UI_From_Int
(113);
7006 when others => return No_Uint
;
7011 when 1 .. 6 => return Uint_24
;
7012 when 7 .. 9 => return UI_From_Int
(56);
7013 when 10 .. 15 => return UI_From_Int
(53);
7014 when others => return No_Uint
;
7019 when 1 .. 6 => return Uint_24
;
7020 when 7 .. 9 => return UI_From_Int
(40);
7021 when others => return No_Uint
;
7024 end Machine_Mantissa_Value
;
7026 -------------------------
7027 -- Machine_Radix_Value --
7028 -------------------------
7030 function Machine_Radix_Value
(Id
: E
) return U
is
7032 case Float_Rep
(Id
) is
7033 when IEEE_Binary | VAX_Native | AAMP
=>
7036 end Machine_Radix_Value
;
7038 --------------------
7039 -- Next_Component --
7040 --------------------
7042 function Next_Component
(Id
: E
) return E
is
7046 Comp_Id
:= Next_Entity
(Id
);
7047 while Present
(Comp_Id
) loop
7048 exit when Ekind
(Comp_Id
) = E_Component
;
7049 Comp_Id
:= Next_Entity
(Comp_Id
);
7055 ------------------------------------
7056 -- Next_Component_Or_Discriminant --
7057 ------------------------------------
7059 function Next_Component_Or_Discriminant
(Id
: E
) return E
is
7063 Comp_Id
:= Next_Entity
(Id
);
7064 while Present
(Comp_Id
) loop
7065 exit when Ekind_In
(Comp_Id
, E_Component
, E_Discriminant
);
7066 Comp_Id
:= Next_Entity
(Comp_Id
);
7070 end Next_Component_Or_Discriminant
;
7072 -----------------------
7073 -- Next_Discriminant --
7074 -----------------------
7076 -- This function actually implements both Next_Discriminant and
7077 -- Next_Stored_Discriminant by making sure that the Discriminant
7078 -- returned is of the same variety as Id.
7080 function Next_Discriminant
(Id
: E
) return E
is
7082 -- Derived Tagged types with private extensions look like this...
7084 -- E_Discriminant d1
7085 -- E_Discriminant d2
7087 -- E_Discriminant d1
7088 -- E_Discriminant d2
7091 -- so it is critical not to go past the leading discriminants
7096 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
7099 D
:= Next_Entity
(D
);
7101 or else (Ekind
(D
) /= E_Discriminant
7102 and then not Is_Itype
(D
))
7107 exit when Ekind
(D
) = E_Discriminant
7108 and then (Is_Completely_Hidden
(D
) = Is_Completely_Hidden
(Id
));
7112 end Next_Discriminant
;
7118 function Next_Formal
(Id
: E
) return E
is
7122 -- Follow the chain of declared entities as long as the kind of the
7123 -- entity corresponds to a formal parameter. Skip internal entities
7124 -- that may have been created for implicit subtypes, in the process
7125 -- of analyzing default expressions.
7129 P
:= Next_Entity
(P
);
7131 if No
(P
) or else Is_Formal
(P
) then
7133 elsif not Is_Internal
(P
) then
7139 -----------------------------
7140 -- Next_Formal_With_Extras --
7141 -----------------------------
7143 function Next_Formal_With_Extras
(Id
: E
) return E
is
7145 if Present
(Extra_Formal
(Id
)) then
7146 return Extra_Formal
(Id
);
7148 return Next_Formal
(Id
);
7150 end Next_Formal_With_Extras
;
7156 function Next_Index
(Id
: Node_Id
) return Node_Id
is
7165 function Next_Literal
(Id
: E
) return E
is
7167 pragma Assert
(Nkind
(Id
) in N_Entity
);
7171 ------------------------------
7172 -- Next_Stored_Discriminant --
7173 ------------------------------
7175 function Next_Stored_Discriminant
(Id
: E
) return E
is
7177 -- See comment in Next_Discriminant
7179 return Next_Discriminant
(Id
);
7180 end Next_Stored_Discriminant
;
7182 -----------------------
7183 -- Number_Dimensions --
7184 -----------------------
7186 function Number_Dimensions
(Id
: E
) return Pos
is
7191 if Ekind
(Id
) in String_Kind
then
7196 T
:= First_Index
(Id
);
7197 while Present
(T
) loop
7204 end Number_Dimensions
;
7206 --------------------
7207 -- Number_Entries --
7208 --------------------
7210 function Number_Entries
(Id
: E
) return Nat
is
7215 pragma Assert
(Is_Concurrent_Type
(Id
));
7218 Ent
:= First_Entity
(Id
);
7219 while Present
(Ent
) loop
7220 if Is_Entry
(Ent
) then
7224 Ent
:= Next_Entity
(Ent
);
7230 --------------------
7231 -- Number_Formals --
7232 --------------------
7234 function Number_Formals
(Id
: E
) return Pos
is
7240 Formal
:= First_Formal
(Id
);
7241 while Present
(Formal
) loop
7243 Formal
:= Next_Formal
(Formal
);
7249 --------------------
7250 -- Parameter_Mode --
7251 --------------------
7253 function Parameter_Mode
(Id
: E
) return Formal_Kind
is
7258 ------------------------
7259 -- Predicate_Function --
7260 ------------------------
7262 function Predicate_Function
(Id
: E
) return E
is
7267 pragma Assert
(Is_Type
(Id
));
7269 -- If type is private and has a completion, predicate may be defined
7270 -- on the full view.
7272 if Is_Private_Type
(Id
) and then Present
(Full_View
(Id
)) then
7273 T
:= Full_View
(Id
);
7278 if No
(Subprograms_For_Type
(T
)) then
7282 S
:= Subprograms_For_Type
(T
);
7283 while Present
(S
) loop
7284 if Is_Predicate_Function
(S
) then
7287 S
:= Subprograms_For_Type
(S
);
7293 end Predicate_Function
;
7295 --------------------------
7296 -- Predicate_Function_M --
7297 --------------------------
7299 function Predicate_Function_M
(Id
: E
) return E
is
7304 pragma Assert
(Is_Type
(Id
));
7306 -- If type is private and has a completion, predicate may be defined
7307 -- on the full view.
7309 if Is_Private_Type
(Id
) and then Present
(Full_View
(Id
)) then
7310 T
:= Full_View
(Id
);
7315 if No
(Subprograms_For_Type
(T
)) then
7319 S
:= Subprograms_For_Type
(T
);
7320 while Present
(S
) loop
7321 if Is_Predicate_Function_M
(S
) then
7324 S
:= Subprograms_For_Type
(S
);
7330 end Predicate_Function_M
;
7332 -------------------------
7333 -- Present_In_Rep_Item --
7334 -------------------------
7336 function Present_In_Rep_Item
(E
: Entity_Id
; N
: Node_Id
) return Boolean is
7340 Ritem
:= First_Rep_Item
(E
);
7342 while Present
(Ritem
) loop
7347 Next_Rep_Item
(Ritem
);
7351 end Present_In_Rep_Item
;
7353 --------------------------
7354 -- Primitive_Operations --
7355 --------------------------
7357 function Primitive_Operations
(Id
: E
) return L
is
7359 if Is_Concurrent_Type
(Id
) then
7360 if Present
(Corresponding_Record_Type
(Id
)) then
7361 return Direct_Primitive_Operations
7362 (Corresponding_Record_Type
(Id
));
7364 -- If expansion is disabled the corresponding record type is absent,
7365 -- but if the type has ancestors it may have primitive operations.
7367 elsif Is_Tagged_Type
(Id
) then
7368 return Direct_Primitive_Operations
(Id
);
7374 return Direct_Primitive_Operations
(Id
);
7376 end Primitive_Operations
;
7378 ---------------------
7379 -- Record_Rep_Item --
7380 ---------------------
7382 procedure Record_Rep_Item
(E
: Entity_Id
; N
: Node_Id
) is
7384 Set_Next_Rep_Item
(N
, First_Rep_Item
(E
));
7385 Set_First_Rep_Item
(E
, N
);
7386 end Record_Rep_Item
;
7392 function Root_Type
(Id
: E
) return E
is
7396 pragma Assert
(Nkind
(Id
) in N_Entity
);
7398 T
:= Base_Type
(Id
);
7400 if Ekind
(T
) = E_Class_Wide_Type
then
7412 -- Following test catches some error cases resulting from
7415 elsif No
(Etyp
) then
7416 Check_Error_Detected
;
7419 elsif Is_Private_Type
(T
) and then Etyp
= Full_View
(T
) then
7422 elsif Is_Private_Type
(Etyp
) and then Full_View
(Etyp
) = T
then
7428 -- Return if there is a circularity in the inheritance chain. This
7429 -- happens in some error situations and we do not want to get
7430 -- stuck in this loop.
7432 if T
= Base_Type
(Id
) then
7439 ---------------------
7440 -- Safe_Emax_Value --
7441 ---------------------
7443 function Safe_Emax_Value
(Id
: E
) return Uint
is
7445 return Machine_Emax_Value
(Id
);
7446 end Safe_Emax_Value
;
7448 ----------------------
7449 -- Safe_First_Value --
7450 ----------------------
7452 function Safe_First_Value
(Id
: E
) return Ureal
is
7454 return -Safe_Last_Value
(Id
);
7455 end Safe_First_Value
;
7457 ---------------------
7458 -- Safe_Last_Value --
7459 ---------------------
7461 function Safe_Last_Value
(Id
: E
) return Ureal
is
7462 Radix
: constant Uint
:= Machine_Radix_Value
(Id
);
7463 Mantissa
: constant Uint
:= Machine_Mantissa_Value
(Id
);
7464 Emax
: constant Uint
:= Safe_Emax_Value
(Id
);
7465 Significand
: constant Uint
:= Radix
** Mantissa
- 1;
7466 Exponent
: constant Uint
:= Emax
- Mantissa
;
7472 (Num
=> Significand
* 2 ** (Exponent
mod 4),
7473 Den
=> -Exponent
/ 4,
7479 (Num
=> Significand
,
7483 end Safe_Last_Value
;
7489 function Scope_Depth
(Id
: E
) return Uint
is
7494 while Is_Record_Type
(Scop
) loop
7495 Scop
:= Scope
(Scop
);
7498 return Scope_Depth_Value
(Scop
);
7501 ---------------------
7502 -- Scope_Depth_Set --
7503 ---------------------
7505 function Scope_Depth_Set
(Id
: E
) return B
is
7507 return not Is_Record_Type
(Id
)
7508 and then Field22
(Id
) /= Union_Id
(Empty
);
7509 end Scope_Depth_Set
;
7511 -----------------------------
7512 -- Set_Component_Alignment --
7513 -----------------------------
7515 -- Component Alignment is encoded using two flags, Flag128/129 as
7516 -- follows. Note that both flags False = Align_Default, so that the
7517 -- default initialization of flags to False initializes component
7518 -- alignment to the default value as required.
7520 -- Flag128 Flag129 Value
7521 -- ------- ------- -----
7522 -- False False Calign_Default
7523 -- False True Calign_Component_Size
7524 -- True False Calign_Component_Size_4
7525 -- True True Calign_Storage_Unit
7527 procedure Set_Component_Alignment
(Id
: E
; V
: C
) is
7529 pragma Assert
((Is_Array_Type
(Id
) or else Is_Record_Type
(Id
))
7530 and then Is_Base_Type
(Id
));
7533 when Calign_Default
=>
7534 Set_Flag128
(Id
, False);
7535 Set_Flag129
(Id
, False);
7537 when Calign_Component_Size
=>
7538 Set_Flag128
(Id
, False);
7539 Set_Flag129
(Id
, True);
7541 when Calign_Component_Size_4
=>
7542 Set_Flag128
(Id
, True);
7543 Set_Flag129
(Id
, False);
7545 when Calign_Storage_Unit
=>
7546 Set_Flag128
(Id
, True);
7547 Set_Flag129
(Id
, True);
7549 end Set_Component_Alignment
;
7551 -----------------------------
7552 -- Set_Invariant_Procedure --
7553 -----------------------------
7555 procedure Set_Invariant_Procedure
(Id
: E
; V
: E
) is
7559 pragma Assert
(Is_Type
(Id
) and then Has_Invariants
(Id
));
7561 S
:= Subprograms_For_Type
(Id
);
7562 Set_Subprograms_For_Type
(Id
, V
);
7563 Set_Subprograms_For_Type
(V
, S
);
7565 -- Check for duplicate entry
7567 while Present
(S
) loop
7568 if Is_Invariant_Procedure
(S
) then
7569 raise Program_Error
;
7571 S
:= Subprograms_For_Type
(S
);
7574 end Set_Invariant_Procedure
;
7576 ----------------------------
7577 -- Set_Predicate_Function --
7578 ----------------------------
7580 procedure Set_Predicate_Function
(Id
: E
; V
: E
) is
7584 pragma Assert
(Is_Type
(Id
) and then Has_Predicates
(Id
));
7586 S
:= Subprograms_For_Type
(Id
);
7587 Set_Subprograms_For_Type
(Id
, V
);
7588 Set_Subprograms_For_Type
(V
, S
);
7590 while Present
(S
) loop
7591 if Is_Predicate_Function
(S
) then
7592 raise Program_Error
;
7594 S
:= Subprograms_For_Type
(S
);
7597 end Set_Predicate_Function
;
7599 ------------------------------
7600 -- Set_Predicate_Function_M --
7601 ------------------------------
7603 procedure Set_Predicate_Function_M
(Id
: E
; V
: E
) is
7607 pragma Assert
(Is_Type
(Id
) and then Has_Predicates
(Id
));
7609 S
:= Subprograms_For_Type
(Id
);
7610 Set_Subprograms_For_Type
(Id
, V
);
7611 Set_Subprograms_For_Type
(V
, S
);
7613 -- Check for duplicates
7615 while Present
(S
) loop
7616 if Is_Predicate_Function_M
(S
) then
7617 raise Program_Error
;
7619 S
:= Subprograms_For_Type
(S
);
7622 end Set_Predicate_Function_M
;
7628 function Size_Clause
(Id
: E
) return N
is
7630 return Rep_Clause
(Id
, Name_Size
);
7633 ------------------------
7634 -- Stream_Size_Clause --
7635 ------------------------
7637 function Stream_Size_Clause
(Id
: E
) return N
is
7639 return Rep_Clause
(Id
, Name_Stream_Size
);
7640 end Stream_Size_Clause
;
7646 function Subtype_Kind
(K
: Entity_Kind
) return Entity_Kind
is
7652 Kind
:= E_Access_Subtype
;
7656 Kind
:= E_Array_Subtype
;
7658 when E_Class_Wide_Type |
7659 E_Class_Wide_Subtype
=>
7660 Kind
:= E_Class_Wide_Subtype
;
7662 when E_Decimal_Fixed_Point_Type |
7663 E_Decimal_Fixed_Point_Subtype
=>
7664 Kind
:= E_Decimal_Fixed_Point_Subtype
;
7666 when E_Ordinary_Fixed_Point_Type |
7667 E_Ordinary_Fixed_Point_Subtype
=>
7668 Kind
:= E_Ordinary_Fixed_Point_Subtype
;
7670 when E_Private_Type |
7671 E_Private_Subtype
=>
7672 Kind
:= E_Private_Subtype
;
7674 when E_Limited_Private_Type |
7675 E_Limited_Private_Subtype
=>
7676 Kind
:= E_Limited_Private_Subtype
;
7678 when E_Record_Type_With_Private |
7679 E_Record_Subtype_With_Private
=>
7680 Kind
:= E_Record_Subtype_With_Private
;
7682 when E_Record_Type |
7684 Kind
:= E_Record_Subtype
;
7686 when E_String_Type |
7688 Kind
:= E_String_Subtype
;
7690 when Enumeration_Kind
=>
7691 Kind
:= E_Enumeration_Subtype
;
7694 Kind
:= E_Floating_Point_Subtype
;
7696 when Signed_Integer_Kind
=>
7697 Kind
:= E_Signed_Integer_Subtype
;
7699 when Modular_Integer_Kind
=>
7700 Kind
:= E_Modular_Integer_Subtype
;
7702 when Protected_Kind
=>
7703 Kind
:= E_Protected_Subtype
;
7706 Kind
:= E_Task_Subtype
;
7710 raise Program_Error
;
7716 ---------------------
7717 -- Type_High_Bound --
7718 ---------------------
7720 function Type_High_Bound
(Id
: E
) return Node_Id
is
7721 Rng
: constant Node_Id
:= Scalar_Range
(Id
);
7723 if Nkind
(Rng
) = N_Subtype_Indication
then
7724 return High_Bound
(Range_Expression
(Constraint
(Rng
)));
7726 return High_Bound
(Rng
);
7728 end Type_High_Bound
;
7730 --------------------
7731 -- Type_Low_Bound --
7732 --------------------
7734 function Type_Low_Bound
(Id
: E
) return Node_Id
is
7735 Rng
: constant Node_Id
:= Scalar_Range
(Id
);
7737 if Nkind
(Rng
) = N_Subtype_Indication
then
7738 return Low_Bound
(Range_Expression
(Constraint
(Rng
)));
7740 return Low_Bound
(Rng
);
7744 ---------------------
7745 -- Underlying_Type --
7746 ---------------------
7748 function Underlying_Type
(Id
: E
) return E
is
7750 -- For record_with_private the underlying type is always the direct
7751 -- full view. Never try to take the full view of the parent it
7752 -- doesn't make sense.
7754 if Ekind
(Id
) = E_Record_Type_With_Private
then
7755 return Full_View
(Id
);
7757 elsif Ekind
(Id
) in Incomplete_Or_Private_Kind
then
7759 -- If we have an incomplete or private type with a full view,
7760 -- then we return the Underlying_Type of this full view
7762 if Present
(Full_View
(Id
)) then
7763 if Id
= Full_View
(Id
) then
7765 -- Previous error in declaration
7770 return Underlying_Type
(Full_View
(Id
));
7773 -- If we have an incomplete entity that comes from the limited
7774 -- view then we return the Underlying_Type of its non-limited
7777 elsif From_With_Type
(Id
)
7778 and then Present
(Non_Limited_View
(Id
))
7780 return Underlying_Type
(Non_Limited_View
(Id
));
7782 -- Otherwise check for the case where we have a derived type or
7783 -- subtype, and if so get the Underlying_Type of the parent type.
7785 elsif Etype
(Id
) /= Id
then
7786 return Underlying_Type
(Etype
(Id
));
7788 -- Otherwise we have an incomplete or private type that has
7789 -- no full view, which means that we have not encountered the
7790 -- completion, so return Empty to indicate the underlying type
7791 -- is not yet known.
7797 -- For non-incomplete, non-private types, return the type itself
7798 -- Also for entities that are not types at all return the entity
7804 end Underlying_Type
;
7810 function Vax_Float
(Id
: E
) return B
is
7812 return Is_Floating_Point_Type
(Id
) and then Float_Rep
(Id
) = VAX_Native
;
7815 ------------------------
7816 -- Write_Entity_Flags --
7817 ------------------------
7819 procedure Write_Entity_Flags
(Id
: Entity_Id
; Prefix
: String) is
7821 procedure W
(Flag_Name
: String; Flag
: Boolean);
7822 -- Write out given flag if it is set
7828 procedure W
(Flag_Name
: String; Flag
: Boolean) is
7832 Write_Str
(Flag_Name
);
7833 Write_Str
(" = True");
7838 -- Start of processing for Write_Entity_Flags
7841 if (Is_Array_Type
(Id
) or else Is_Record_Type
(Id
))
7842 and then Is_Base_Type
(Id
)
7845 Write_Str
("Component_Alignment = ");
7847 case Component_Alignment
(Id
) is
7848 when Calign_Default
=>
7849 Write_Str
("Calign_Default");
7851 when Calign_Component_Size
=>
7852 Write_Str
("Calign_Component_Size");
7854 when Calign_Component_Size_4
=>
7855 Write_Str
("Calign_Component_Size_4");
7857 when Calign_Storage_Unit
=>
7858 Write_Str
("Calign_Storage_Unit");
7864 W
("Address_Taken", Flag104
(Id
));
7865 W
("Body_Needed_For_SAL", Flag40
(Id
));
7866 W
("C_Pass_By_Copy", Flag125
(Id
));
7867 W
("Can_Never_Be_Null", Flag38
(Id
));
7868 W
("Checks_May_Be_Suppressed", Flag31
(Id
));
7869 W
("Debug_Info_Off", Flag166
(Id
));
7870 W
("Default_Expressions_Processed", Flag108
(Id
));
7871 W
("Delay_Cleanups", Flag114
(Id
));
7872 W
("Delay_Subprogram_Descriptors", Flag50
(Id
));
7873 W
("Depends_On_Private", Flag14
(Id
));
7874 W
("Discard_Names", Flag88
(Id
));
7875 W
("Elaboration_Entity_Required", Flag174
(Id
));
7876 W
("Elaborate_Body_Desirable", Flag210
(Id
));
7877 W
("Entry_Accepted", Flag152
(Id
));
7878 W
("Can_Use_Internal_Rep", Flag229
(Id
));
7879 W
("Finalize_Storage_Only", Flag158
(Id
));
7880 W
("From_With_Type", Flag159
(Id
));
7881 W
("Has_Aliased_Components", Flag135
(Id
));
7882 W
("Has_Alignment_Clause", Flag46
(Id
));
7883 W
("Has_All_Calls_Remote", Flag79
(Id
));
7884 W
("Has_Anonymous_Master", Flag253
(Id
));
7885 W
("Has_Atomic_Components", Flag86
(Id
));
7886 W
("Has_Biased_Representation", Flag139
(Id
));
7887 W
("Has_Completion", Flag26
(Id
));
7888 W
("Has_Completion_In_Body", Flag71
(Id
));
7889 W
("Has_Complex_Representation", Flag140
(Id
));
7890 W
("Has_Component_Size_Clause", Flag68
(Id
));
7891 W
("Has_Contiguous_Rep", Flag181
(Id
));
7892 W
("Has_Controlled_Component", Flag43
(Id
));
7893 W
("Has_Controlling_Result", Flag98
(Id
));
7894 W
("Has_Convention_Pragma", Flag119
(Id
));
7895 W
("Has_Default_Aspect", Flag39
(Id
));
7896 W
("Has_Delayed_Aspects", Flag200
(Id
));
7897 W
("Has_Delayed_Freeze", Flag18
(Id
));
7898 W
("Has_Discriminants", Flag5
(Id
));
7899 W
("Has_Dispatch_Table", Flag220
(Id
));
7900 W
("Has_Dynamic_Predicate_Aspect", Flag258
(Id
));
7901 W
("Has_Enumeration_Rep_Clause", Flag66
(Id
));
7902 W
("Has_Exit", Flag47
(Id
));
7903 W
("Has_External_Tag_Rep_Clause", Flag110
(Id
));
7904 W
("Has_Forward_Instantiation", Flag175
(Id
));
7905 W
("Has_Fully_Qualified_Name", Flag173
(Id
));
7906 W
("Has_Gigi_Rep_Item", Flag82
(Id
));
7907 W
("Has_Homonym", Flag56
(Id
));
7908 W
("Has_Implicit_Dereference", Flag251
(Id
));
7909 W
("Has_Inheritable_Invariants", Flag248
(Id
));
7910 W
("Has_Initial_Value", Flag219
(Id
));
7911 W
("Has_Invariants", Flag232
(Id
));
7912 W
("Has_Loop_Entry_Attributes", Flag260
(Id
));
7913 W
("Has_Machine_Radix_Clause", Flag83
(Id
));
7914 W
("Has_Master_Entity", Flag21
(Id
));
7915 W
("Has_Missing_Return", Flag142
(Id
));
7916 W
("Has_Nested_Block_With_Handler", Flag101
(Id
));
7917 W
("Has_Non_Standard_Rep", Flag75
(Id
));
7918 W
("Has_Object_Size_Clause", Flag172
(Id
));
7919 W
("Has_Per_Object_Constraint", Flag154
(Id
));
7920 W
("Has_Postconditions", Flag240
(Id
));
7921 W
("Has_Pragma_Controlled", Flag27
(Id
));
7922 W
("Has_Pragma_Elaborate_Body", Flag150
(Id
));
7923 W
("Has_Pragma_Inline", Flag157
(Id
));
7924 W
("Has_Pragma_Inline_Always", Flag230
(Id
));
7925 W
("Has_Pragma_No_Inline", Flag201
(Id
));
7926 W
("Has_Pragma_Ordered", Flag198
(Id
));
7927 W
("Has_Pragma_Pack", Flag121
(Id
));
7928 W
("Has_Pragma_Preelab_Init", Flag221
(Id
));
7929 W
("Has_Pragma_Pure", Flag203
(Id
));
7930 W
("Has_Pragma_Pure_Function", Flag179
(Id
));
7931 W
("Has_Pragma_Thread_Local_Storage", Flag169
(Id
));
7932 W
("Has_Pragma_Unmodified", Flag233
(Id
));
7933 W
("Has_Pragma_Unreferenced", Flag180
(Id
));
7934 W
("Has_Pragma_Unreferenced_Objects", Flag212
(Id
));
7935 W
("Has_Predicates", Flag250
(Id
));
7936 W
("Has_Primitive_Operations", Flag120
(Id
));
7937 W
("Has_Private_Ancestor", Flag151
(Id
));
7938 W
("Has_Private_Declaration", Flag155
(Id
));
7939 W
("Has_Qualified_Name", Flag161
(Id
));
7940 W
("Has_RACW", Flag214
(Id
));
7941 W
("Has_Record_Rep_Clause", Flag65
(Id
));
7942 W
("Has_Recursive_Call", Flag143
(Id
));
7943 W
("Has_Size_Clause", Flag29
(Id
));
7944 W
("Has_Small_Clause", Flag67
(Id
));
7945 W
("Has_Specified_Layout", Flag100
(Id
));
7946 W
("Has_Specified_Stream_Input", Flag190
(Id
));
7947 W
("Has_Specified_Stream_Output", Flag191
(Id
));
7948 W
("Has_Specified_Stream_Read", Flag192
(Id
));
7949 W
("Has_Specified_Stream_Write", Flag193
(Id
));
7950 W
("Has_Static_Discriminants", Flag211
(Id
));
7951 W
("Has_Static_Predicate_Aspect", Flag259
(Id
));
7952 W
("Has_Storage_Size_Clause", Flag23
(Id
));
7953 W
("Has_Stream_Size_Clause", Flag184
(Id
));
7954 W
("Has_Task", Flag30
(Id
));
7955 W
("Has_Thunks", Flag228
(Id
));
7956 W
("Has_Unchecked_Union", Flag123
(Id
));
7957 W
("Has_Unknown_Discriminants", Flag72
(Id
));
7958 W
("Has_Up_Level_Access", Flag215
(Id
));
7959 W
("Has_Volatile_Components", Flag87
(Id
));
7960 W
("Has_Xref_Entry", Flag182
(Id
));
7961 W
("In_Package_Body", Flag48
(Id
));
7962 W
("In_Private_Part", Flag45
(Id
));
7963 W
("In_Use", Flag8
(Id
));
7964 W
("Is_AST_Entry", Flag132
(Id
));
7965 W
("Is_Abstract_Subprogram", Flag19
(Id
));
7966 W
("Is_Abstract_Type", Flag146
(Id
));
7967 W
("Is_Local_Anonymous_Access", Flag194
(Id
));
7968 W
("Is_Access_Constant", Flag69
(Id
));
7969 W
("Is_Ada_2005_Only", Flag185
(Id
));
7970 W
("Is_Ada_2012_Only", Flag199
(Id
));
7971 W
("Is_Aliased", Flag15
(Id
));
7972 W
("Is_Asynchronous", Flag81
(Id
));
7973 W
("Is_Atomic", Flag85
(Id
));
7974 W
("Is_Bit_Packed_Array", Flag122
(Id
));
7975 W
("Is_CPP_Class", Flag74
(Id
));
7976 W
("Is_Called", Flag102
(Id
));
7977 W
("Is_Character_Type", Flag63
(Id
));
7978 W
("Is_Child_Unit", Flag73
(Id
));
7979 W
("Is_Class_Wide_Equivalent_Type", Flag35
(Id
));
7980 W
("Is_Compilation_Unit", Flag149
(Id
));
7981 W
("Is_Completely_Hidden", Flag103
(Id
));
7982 W
("Is_Concurrent_Record_Type", Flag20
(Id
));
7983 W
("Is_Constr_Subt_For_UN_Aliased", Flag141
(Id
));
7984 W
("Is_Constr_Subt_For_U_Nominal", Flag80
(Id
));
7985 W
("Is_Constrained", Flag12
(Id
));
7986 W
("Is_Constructor", Flag76
(Id
));
7987 W
("Is_Controlled", Flag42
(Id
));
7988 W
("Is_Controlling_Formal", Flag97
(Id
));
7989 W
("Is_Descendent_Of_Address", Flag223
(Id
));
7990 W
("Is_Discrim_SO_Function", Flag176
(Id
));
7991 W
("Is_Dispatch_Table_Entity", Flag234
(Id
));
7992 W
("Is_Dispatching_Operation", Flag6
(Id
));
7993 W
("Is_Eliminated", Flag124
(Id
));
7994 W
("Is_Entry_Formal", Flag52
(Id
));
7995 W
("Is_Exported", Flag99
(Id
));
7996 W
("Is_First_Subtype", Flag70
(Id
));
7997 W
("Is_For_Access_Subtype", Flag118
(Id
));
7998 W
("Is_Formal_Subprogram", Flag111
(Id
));
7999 W
("Is_Frozen", Flag4
(Id
));
8000 W
("Is_Generic_Actual_Type", Flag94
(Id
));
8001 W
("Is_Generic_Instance", Flag130
(Id
));
8002 W
("Is_Generic_Type", Flag13
(Id
));
8003 W
("Is_Hidden", Flag57
(Id
));
8004 W
("Is_Hidden_Open_Scope", Flag171
(Id
));
8005 W
("Is_Immediately_Visible", Flag7
(Id
));
8006 W
("Is_Implementation_Defined", Flag254
(Id
));
8007 W
("Is_Imported", Flag24
(Id
));
8008 W
("Is_Inlined", Flag11
(Id
));
8009 W
("Is_Instantiated", Flag126
(Id
));
8010 W
("Is_Interface", Flag186
(Id
));
8011 W
("Is_Internal", Flag17
(Id
));
8012 W
("Is_Interrupt_Handler", Flag89
(Id
));
8013 W
("Is_Intrinsic_Subprogram", Flag64
(Id
));
8014 W
("Is_Invariant_Procedure", Flag257
(Id
));
8015 W
("Is_Itype", Flag91
(Id
));
8016 W
("Is_Known_Non_Null", Flag37
(Id
));
8017 W
("Is_Known_Null", Flag204
(Id
));
8018 W
("Is_Known_Valid", Flag170
(Id
));
8019 W
("Is_Limited_Composite", Flag106
(Id
));
8020 W
("Is_Limited_Interface", Flag197
(Id
));
8021 W
("Is_Limited_Record", Flag25
(Id
));
8022 W
("Is_Machine_Code_Subprogram", Flag137
(Id
));
8023 W
("Is_Non_Static_Subtype", Flag109
(Id
));
8024 W
("Is_Null_Init_Proc", Flag178
(Id
));
8025 W
("Is_Obsolescent", Flag153
(Id
));
8026 W
("Is_Only_Out_Parameter", Flag226
(Id
));
8027 W
("Is_Optional_Parameter", Flag134
(Id
));
8028 W
("Is_Package_Body_Entity", Flag160
(Id
));
8029 W
("Is_Packed", Flag51
(Id
));
8030 W
("Is_Packed_Array_Type", Flag138
(Id
));
8031 W
("Is_Potentially_Use_Visible", Flag9
(Id
));
8032 W
("Is_Predicate_Function", Flag255
(Id
));
8033 W
("Is_Predicate_Function_M", Flag256
(Id
));
8034 W
("Is_Preelaborated", Flag59
(Id
));
8035 W
("Is_Primitive", Flag218
(Id
));
8036 W
("Is_Primitive_Wrapper", Flag195
(Id
));
8037 W
("Is_Private_Composite", Flag107
(Id
));
8038 W
("Is_Private_Descendant", Flag53
(Id
));
8039 W
("Is_Private_Primitive", Flag245
(Id
));
8040 W
("Is_Processed_Transient", Flag252
(Id
));
8041 W
("Is_Public", Flag10
(Id
));
8042 W
("Is_Pure", Flag44
(Id
));
8043 W
("Is_Pure_Unit_Access_Type", Flag189
(Id
));
8044 W
("Is_RACW_Stub_Type", Flag244
(Id
));
8045 W
("Is_Raised", Flag224
(Id
));
8046 W
("Is_Remote_Call_Interface", Flag62
(Id
));
8047 W
("Is_Remote_Types", Flag61
(Id
));
8048 W
("Is_Renaming_Of_Object", Flag112
(Id
));
8049 W
("Is_Return_Object", Flag209
(Id
));
8050 W
("Is_Safe_To_Reevaluate", Flag249
(Id
));
8051 W
("Is_Shared_Passive", Flag60
(Id
));
8052 W
("Is_Statically_Allocated", Flag28
(Id
));
8053 W
("Is_Tag", Flag78
(Id
));
8054 W
("Is_Tagged_Type", Flag55
(Id
));
8055 W
("Is_Thunk", Flag225
(Id
));
8056 W
("Is_Trivial_Subprogram", Flag235
(Id
));
8057 W
("Is_True_Constant", Flag163
(Id
));
8058 W
("Is_Unchecked_Union", Flag117
(Id
));
8059 W
("Is_Underlying_Record_View", Flag246
(Id
));
8060 W
("Is_Unsigned_Type", Flag144
(Id
));
8061 W
("Is_VMS_Exception", Flag133
(Id
));
8062 W
("Is_Valued_Procedure", Flag127
(Id
));
8063 W
("Is_Visible_Formal", Flag206
(Id
));
8064 W
("Is_Visible_Lib_Unit", Flag116
(Id
));
8065 W
("Is_Volatile", Flag16
(Id
));
8066 W
("Itype_Printed", Flag202
(Id
));
8067 W
("Kill_Elaboration_Checks", Flag32
(Id
));
8068 W
("Kill_Range_Checks", Flag33
(Id
));
8069 W
("Known_To_Have_Preelab_Init", Flag207
(Id
));
8070 W
("Low_Bound_Tested", Flag205
(Id
));
8071 W
("Machine_Radix_10", Flag84
(Id
));
8072 W
("Materialize_Entity", Flag168
(Id
));
8073 W
("Must_Be_On_Byte_Boundary", Flag183
(Id
));
8074 W
("Must_Have_Preelab_Init", Flag208
(Id
));
8075 W
("Needs_Debug_Info", Flag147
(Id
));
8076 W
("Needs_No_Actuals", Flag22
(Id
));
8077 W
("Never_Set_In_Source", Flag115
(Id
));
8078 W
("No_Pool_Assigned", Flag131
(Id
));
8079 W
("No_Return", Flag113
(Id
));
8080 W
("No_Strict_Aliasing", Flag136
(Id
));
8081 W
("Non_Binary_Modulus", Flag58
(Id
));
8082 W
("Nonzero_Is_True", Flag162
(Id
));
8083 W
("OK_To_Rename", Flag247
(Id
));
8084 W
("OK_To_Reorder_Components", Flag239
(Id
));
8085 W
("Optimize_Alignment_Space", Flag241
(Id
));
8086 W
("Optimize_Alignment_Time", Flag242
(Id
));
8087 W
("Overlays_Constant", Flag243
(Id
));
8088 W
("Reachable", Flag49
(Id
));
8089 W
("Referenced", Flag156
(Id
));
8090 W
("Referenced_As_LHS", Flag36
(Id
));
8091 W
("Referenced_As_Out_Parameter", Flag227
(Id
));
8092 W
("Renamed_In_Spec", Flag231
(Id
));
8093 W
("Requires_Overriding", Flag213
(Id
));
8094 W
("Return_Present", Flag54
(Id
));
8095 W
("Returns_By_Ref", Flag90
(Id
));
8096 W
("Reverse_Bit_Order", Flag164
(Id
));
8097 W
("Reverse_Storage_Order", Flag93
(Id
));
8098 W
("Sec_Stack_Needed_For_Return", Flag167
(Id
));
8099 W
("Size_Depends_On_Discriminant", Flag177
(Id
));
8100 W
("Size_Known_At_Compile_Time", Flag92
(Id
));
8101 W
("Static_Elaboration_Desired", Flag77
(Id
));
8102 W
("Strict_Alignment", Flag145
(Id
));
8103 W
("Suppress_Elaboration_Warnings", Flag148
(Id
));
8104 W
("Suppress_Initialization", Flag105
(Id
));
8105 W
("Suppress_Style_Checks", Flag165
(Id
));
8106 W
("Suppress_Value_Tracking_On_Call", Flag217
(Id
));
8107 W
("Treat_As_Volatile", Flag41
(Id
));
8108 W
("Universal_Aliasing", Flag216
(Id
));
8109 W
("Used_As_Generic_Actual", Flag222
(Id
));
8110 W
("Uses_Sec_Stack", Flag95
(Id
));
8111 W
("Warnings_Off", Flag96
(Id
));
8112 W
("Warnings_Off_Used", Flag236
(Id
));
8113 W
("Warnings_Off_Used_Unmodified", Flag237
(Id
));
8114 W
("Warnings_Off_Used_Unreferenced", Flag238
(Id
));
8115 W
("Was_Hidden", Flag196
(Id
));
8116 end Write_Entity_Flags
;
8118 -----------------------
8119 -- Write_Entity_Info --
8120 -----------------------
8122 procedure Write_Entity_Info
(Id
: Entity_Id
; Prefix
: String) is
8124 procedure Write_Attribute
(Which
: String; Nam
: E
);
8125 -- Write attribute value with given string name
8127 procedure Write_Kind
(Id
: Entity_Id
);
8128 -- Write Ekind field of entity
8130 ---------------------
8131 -- Write_Attribute --
8132 ---------------------
8134 procedure Write_Attribute
(Which
: String; Nam
: E
) is
8138 Write_Int
(Int
(Nam
));
8140 Write_Name
(Chars
(Nam
));
8142 end Write_Attribute
;
8148 procedure Write_Kind
(Id
: Entity_Id
) is
8149 K
: constant String := Entity_Kind
'Image (Ekind
(Id
));
8153 Write_Str
(" Kind ");
8155 if Is_Type
(Id
) and then Is_Tagged_Type
(Id
) then
8156 Write_Str
("TAGGED ");
8159 Write_Str
(K
(3 .. K
'Length));
8162 if Is_Type
(Id
) and then Depends_On_Private
(Id
) then
8163 Write_Str
("Depends_On_Private ");
8167 -- Start of processing for Write_Entity_Info
8171 Write_Attribute
("Name ", Id
);
8172 Write_Int
(Int
(Id
));
8176 Write_Attribute
(" Type ", Etype
(Id
));
8178 Write_Attribute
(" Scope ", Scope
(Id
));
8183 when Discrete_Kind
=>
8184 Write_Str
("Bounds: Id = ");
8186 if Present
(Scalar_Range
(Id
)) then
8187 Write_Int
(Int
(Type_Low_Bound
(Id
)));
8188 Write_Str
(" .. Id = ");
8189 Write_Int
(Int
(Type_High_Bound
(Id
)));
8191 Write_Str
("Empty");
8202 (" Component Type ", Component_Type
(Id
));
8205 Write_Str
(" Indexes ");
8207 Index
:= First_Index
(Id
);
8208 while Present
(Index
) loop
8209 Write_Attribute
(" ", Etype
(Index
));
8210 Index
:= Next_Index
(Index
);
8218 (" Directly Designated Type ",
8219 Directly_Designated_Type
(Id
));
8222 when Overloadable_Kind
=>
8223 if Present
(Homonym
(Id
)) then
8224 Write_Str
(" Homonym ");
8225 Write_Name
(Chars
(Homonym
(Id
)));
8227 Write_Int
(Int
(Homonym
(Id
)));
8234 if Ekind
(Scope
(Id
)) in Record_Kind
then
8236 " Original_Record_Component ",
8237 Original_Record_Component
(Id
));
8238 Write_Int
(Int
(Original_Record_Component
(Id
)));
8242 when others => null;
8244 end Write_Entity_Info
;
8246 -----------------------
8247 -- Write_Field6_Name --
8248 -----------------------
8250 procedure Write_Field6_Name
(Id
: Entity_Id
) is
8251 pragma Warnings
(Off
, Id
);
8253 Write_Str
("First_Rep_Item");
8254 end Write_Field6_Name
;
8256 -----------------------
8257 -- Write_Field7_Name --
8258 -----------------------
8260 procedure Write_Field7_Name
(Id
: Entity_Id
) is
8261 pragma Warnings
(Off
, Id
);
8263 Write_Str
("Freeze_Node");
8264 end Write_Field7_Name
;
8266 -----------------------
8267 -- Write_Field8_Name --
8268 -----------------------
8270 procedure Write_Field8_Name
(Id
: Entity_Id
) is
8274 Write_Str
("Associated_Node_For_Itype");
8277 Write_Str
("Dependent_Instances");
8280 Write_Str
("First_Exit_Statement");
8283 Write_Str
("Hiding_Loop_Variable");
8285 when E_Abstract_State
=>
8286 Write_Str
("Integrity_Level");
8290 E_Subprogram_Body
=>
8291 Write_Str
("Mechanism");
8295 Write_Str
("Normalized_First_Bit");
8298 Write_Str
("Postcondition_Proc");
8300 when E_Return_Statement
=>
8301 Write_Str
("Return_Applies_To");
8304 Write_Str
("Field8??");
8306 end Write_Field8_Name
;
8308 -----------------------
8309 -- Write_Field9_Name --
8310 -----------------------
8312 procedure Write_Field9_Name
(Id
: Entity_Id
) is
8316 Write_Str
("Class_Wide_Type");
8319 Write_Str
("Current_Value");
8321 when E_Abstract_State
=>
8322 Write_Str
("Refined_State");
8325 E_Generic_Function |
8327 E_Generic_Procedure |
8330 Write_Str
("Renaming_Map");
8333 Write_Str
("Field9??");
8335 end Write_Field9_Name
;
8337 ------------------------
8338 -- Write_Field10_Name --
8339 ------------------------
8341 procedure Write_Field10_Name
(Id
: Entity_Id
) is
8344 when Class_Wide_Kind |
8350 Write_Str
("Direct_Primitive_Operations");
8353 Write_Str
("Float_Rep");
8355 when E_In_Parameter |
8357 Write_Str
("Discriminal_Link");
8363 Write_Str
("Handler_Records");
8367 Write_Str
("Normalized_Position_Max");
8370 Write_Str
("Field10??");
8372 end Write_Field10_Name
;
8374 ------------------------
8375 -- Write_Field11_Name --
8376 ------------------------
8378 procedure Write_Field11_Name
(Id
: Entity_Id
) is
8382 Write_Str
("Block_Node");
8386 Write_Str
("Component_Bit_Offset");
8389 Write_Str
("Entry_Component");
8391 when E_Enumeration_Literal
=>
8392 Write_Str
("Enumeration_Pos");
8396 Write_Str
("Full_View");
8398 when E_Generic_Package
=>
8399 Write_Str
("Generic_Homonym");
8405 Write_Str
("Protected_Body_Subprogram");
8408 Write_Str
("Field11??");
8410 end Write_Field11_Name
;
8412 ------------------------
8413 -- Write_Field12_Name --
8414 ------------------------
8416 procedure Write_Field12_Name
(Id
: Entity_Id
) is
8420 Write_Str
("Associated_Formal_Package");
8423 Write_Str
("Barrier_Function");
8425 when E_Enumeration_Literal
=>
8426 Write_Str
("Enumeration_Rep");
8434 E_In_Out_Parameter |
8438 Write_Str
("Esize");
8442 Write_Str
("Next_Inlined_Subprogram");
8445 Write_Str
("Field12??");
8447 end Write_Field12_Name
;
8449 ------------------------
8450 -- Write_Field13_Name --
8451 ------------------------
8453 procedure Write_Field13_Name
(Id
: Entity_Id
) is
8458 Write_Str
("Component_Clause");
8461 Write_Str
("Elaboration_Entity");
8465 Generic_Unit_Kind
=>
8466 Write_Str
("Elaboration_Entity");
8470 Write_Str
("Extra_Accessibility");
8473 Write_Str
("RM_Size");
8476 Write_Str
("Field13??");
8478 end Write_Field13_Name
;
8480 -----------------------
8481 -- Write_Field14_Name --
8482 -----------------------
8484 procedure Write_Field14_Name
(Id
: Entity_Id
) is
8493 Write_Str
("Alignment");
8497 Write_Str
("First_Optional_Parameter");
8501 Write_Str
("Normalized_Position");
8504 E_Generic_Package
=>
8505 Write_Str
("Shadow_Entities");
8508 Write_Str
("Field14??");
8510 end Write_Field14_Name
;
8512 ------------------------
8513 -- Write_Field15_Name --
8514 ------------------------
8516 procedure Write_Field15_Name
(Id
: Entity_Id
) is
8519 when E_Discriminant
=>
8520 Write_Str
("Discriminant_Number");
8523 Write_Str
("DT_Entry_Count");
8527 Write_Str
("DT_Position");
8529 when E_Protected_Type
=>
8530 Write_Str
("Entry_Bodies_Array");
8533 Write_Str
("Entry_Parameters_Type");
8536 Write_Str
("Extra_Formal");
8538 when Enumeration_Kind
=>
8539 Write_Str
("Lit_Indexes");
8543 Write_Str
("Related_Instance");
8545 when Decimal_Fixed_Point_Kind
=>
8546 Write_Str
("Scale_Value");
8550 Write_Str
("Status_Flag_Or_Transient_Decl");
8554 Write_Str
("Storage_Size_Variable");
8556 when E_String_Literal_Subtype
=>
8557 Write_Str
("String_Literal_Low_Bound");
8560 Write_Str
("Field15??");
8562 end Write_Field15_Name
;
8564 ------------------------
8565 -- Write_Field16_Name --
8566 ------------------------
8568 procedure Write_Field16_Name
(Id
: Entity_Id
) is
8571 when E_Record_Type |
8572 E_Record_Type_With_Private
=>
8573 Write_Str
("Access_Disp_Table");
8575 when E_Record_Subtype |
8576 E_Class_Wide_Subtype
=>
8577 Write_Str
("Cloned_Subtype");
8581 Write_Str
("DTC_Entity");
8584 Write_Str
("Entry_Formal");
8589 Write_Str
("First_Private_Entity");
8591 when Enumeration_Kind
=>
8592 Write_Str
("Lit_Strings");
8594 when E_String_Literal_Subtype
=>
8595 Write_Str
("String_Literal_Length");
8599 Write_Str
("Unset_Reference");
8602 Write_Str
("Field16??");
8604 end Write_Field16_Name
;
8606 ------------------------
8607 -- Write_Field17_Name --
8608 ------------------------
8610 procedure Write_Field17_Name
(Id
: Entity_Id
) is
8615 E_Generic_In_Out_Parameter |
8617 Write_Str
("Actual_Subtype");
8620 Write_Str
("Digits_Value");
8622 when E_Discriminant
=>
8623 Write_Str
("Discriminal");
8632 E_Generic_Function |
8634 E_Generic_Procedure |
8642 E_Return_Statement |
8644 E_Subprogram_Type
=>
8645 Write_Str
("First_Entity");
8648 Write_Str
("First_Index");
8650 when Enumeration_Kind
=>
8651 Write_Str
("First_Literal");
8654 Write_Str
("Master_Id");
8656 when Modular_Integer_Kind
=>
8657 Write_Str
("Modulus");
8659 when E_Incomplete_Type
=>
8660 Write_Str
("Non_Limited_View");
8662 when E_Incomplete_Subtype
=>
8663 if From_With_Type
(Id
) then
8664 Write_Str
("Non_Limited_View");
8668 Write_Str
("Prival");
8671 Write_Str
("Field17??");
8673 end Write_Field17_Name
;
8675 ------------------------
8676 -- Write_Field18_Name --
8677 ------------------------
8679 procedure Write_Field18_Name
(Id
: Entity_Id
) is
8682 when E_Enumeration_Literal |
8686 Write_Str
("Alias");
8688 when E_Record_Type
=>
8689 Write_Str
("Corresponding_Concurrent_Type");
8691 when E_Subprogram_Body
=>
8692 Write_Str
("Corresponding_Protected_Entry");
8694 when Concurrent_Kind
=>
8695 Write_Str
("Corresponding_Record_Type");
8700 Write_Str
("Enclosing_Scope");
8702 when E_Entry_Index_Parameter
=>
8703 Write_Str
("Entry_Index_Constant");
8705 when E_Class_Wide_Subtype |
8706 E_Access_Protected_Subprogram_Type |
8707 E_Anonymous_Access_Protected_Subprogram_Type |
8708 E_Access_Subprogram_Type |
8710 Write_Str
("Equivalent_Type");
8712 when Fixed_Point_Kind
=>
8713 Write_Str
("Delta_Value");
8715 when Incomplete_Or_Private_Kind |
8717 Write_Str
("Private_Dependents");
8720 Write_Str
("Renamed_Object");
8724 E_Generic_Function |
8725 E_Generic_Procedure |
8726 E_Generic_Package
=>
8727 Write_Str
("Renamed_Entity");
8730 Write_Str
("Field18??");
8732 end Write_Field18_Name
;
8734 -----------------------
8735 -- Write_Field19_Name --
8736 -----------------------
8738 procedure Write_Field19_Name
(Id
: Entity_Id
) is
8742 E_Generic_Package
=>
8743 Write_Str
("Body_Entity");
8745 when E_Discriminant
=>
8746 Write_Str
("Corresponding_Discriminant");
8749 Write_Str
("Default_Value");
8751 when E_Array_Type
=>
8752 Write_Str
("Default_Component_Value");
8754 when E_Record_Type
=>
8755 Write_Str
("Parent_Subtype");
8759 Write_Str
("Size_Check_Code");
8761 when E_Package_Body |
8763 Write_Str
("Spec_Entity");
8765 when Private_Kind
=>
8766 Write_Str
("Underlying_Full_View");
8768 when E_Function | E_Operator | E_Subprogram_Type
=>
8769 Write_Str
("Extra_Accessibility_Of_Result");
8772 Write_Str
("Field19??");
8774 end Write_Field19_Name
;
8776 -----------------------
8777 -- Write_Field20_Name --
8778 -----------------------
8780 procedure Write_Field20_Name
(Id
: Entity_Id
) is
8784 Write_Str
("Component_Type");
8786 when E_In_Parameter |
8787 E_Generic_In_Parameter
=>
8788 Write_Str
("Default_Value");
8791 Write_Str
("Directly_Designated_Type");
8794 Write_Str
("Discriminant_Checking_Func");
8796 when E_Discriminant
=>
8797 Write_Str
("Discriminant_Default_Value");
8806 E_Generic_Function |
8808 E_Generic_Procedure |
8816 E_Return_Statement |
8818 E_Subprogram_Type
=>
8819 Write_Str
("Last_Entity");
8823 Write_Str
("Prival_Link");
8826 Write_Str
("Scalar_Range");
8829 Write_Str
("Register_Exception_Call");
8832 Write_Str
("Field20??");
8834 end Write_Field20_Name
;
8836 -----------------------
8837 -- Write_Field21_Name --
8838 -----------------------
8840 procedure Write_Field21_Name
(Id
: Entity_Id
) is
8844 Write_Str
("Accept_Address");
8846 when E_In_Parameter
=>
8847 Write_Str
("Default_Expr_Function");
8849 when Concurrent_Kind |
8850 Incomplete_Or_Private_Kind |
8854 Write_Str
("Discriminant_Constraint");
8859 E_Generic_Function |
8861 E_Generic_Procedure |
8863 Write_Str
("Interface_Name");
8866 Modular_Integer_Kind
=>
8867 Write_Str
("Original_Array_Type");
8869 when Fixed_Point_Kind
=>
8870 Write_Str
("Small_Value");
8873 Write_Str
("Field21??");
8875 end Write_Field21_Name
;
8877 -----------------------
8878 -- Write_Field22_Name --
8879 -----------------------
8881 procedure Write_Field22_Name
(Id
: Entity_Id
) is
8885 Write_Str
("Associated_Storage_Pool");
8888 Write_Str
("Component_Size");
8890 when E_Record_Type
=>
8891 Write_Str
("Corresponding_Remote_Type");
8895 Write_Str
("Original_Record_Component");
8897 when E_Enumeration_Literal
=>
8898 Write_Str
("Enumeration_Rep_Expr");
8901 Write_Str
("Exception_Code");
8903 when E_Record_Type_With_Private |
8904 E_Record_Subtype_With_Private |
8907 E_Limited_Private_Type |
8908 E_Limited_Private_Subtype
=>
8909 Write_Str
("Private_View");
8912 Write_Str
("Protected_Formal");
8922 E_Generic_Function |
8923 E_Generic_Procedure |
8926 E_Return_Statement |
8929 Write_Str
("Scope_Depth_Value");
8932 Write_Str
("Shared_Var_Procs_Instance");
8935 Write_Str
("Field22??");
8937 end Write_Field22_Name
;
8939 ------------------------
8940 -- Write_Field23_Name --
8941 ------------------------
8943 procedure Write_Field23_Name
(Id
: Entity_Id
) is
8946 when E_Discriminant
=>
8947 Write_Str
("CR_Discriminant");
8950 Write_Str
("Entry_Cancel_Parameter");
8952 when E_Enumeration_Type
=>
8953 Write_Str
("Enum_Pos_To_Rep");
8957 Write_Str
("Extra_Constrained");
8960 Write_Str
("Finalization_Master");
8962 when E_Generic_Function |
8964 E_Generic_Procedure
=>
8965 Write_Str
("Inner_Instances");
8968 Write_Str
("Packed_Array_Type");
8971 Write_Str
("Protection_Object");
8973 when Concurrent_Kind |
8974 Incomplete_Or_Private_Kind |
8978 Write_Str
("Stored_Constraint");
8982 if Present
(Scope
(Id
))
8983 and then Is_Protected_Type
(Scope
(Id
))
8985 Write_Str
("Protection_Object");
8987 Write_Str
("Generic_Renamings");
8991 if Is_Generic_Instance
(Id
) then
8992 Write_Str
("Generic_Renamings");
8994 Write_Str
("Limited_View");
8998 Write_Str
("Field23??");
9000 end Write_Field23_Name
;
9002 ------------------------
9003 -- Write_Field24_Name --
9004 ------------------------
9006 procedure Write_Field24_Name
(Id
: Entity_Id
) is
9011 Write_Str
("Finalizer");
9016 Write_Str
("Related_Expression");
9021 Generic_Subprogram_Kind
=>
9022 Write_Str
("Contract");
9025 Write_Str
("Field24???");
9027 end Write_Field24_Name
;
9029 ------------------------
9030 -- Write_Field25_Name --
9031 ------------------------
9033 procedure Write_Field25_Name
(Id
: Entity_Id
) is
9037 Write_Str
("Abstract_States");
9040 Write_Str
("Debug_Renaming_Link");
9043 Write_Str
("DT_Offset_To_Top_Func");
9047 Write_Str
("Interface_Alias");
9049 when E_Record_Type |
9051 E_Record_Type_With_Private |
9052 E_Record_Subtype_With_Private
=>
9053 Write_Str
("Interfaces");
9057 Write_Str
("Related_Array_Object");
9060 Write_Str
("Task_Body_Procedure");
9064 Write_Str
("PPC_Wrapper");
9066 when E_Enumeration_Subtype |
9067 E_Modular_Integer_Subtype |
9068 E_Signed_Integer_Subtype
=>
9069 Write_Str
("Static_Predicate");
9072 Write_Str
("Field25??");
9074 end Write_Field25_Name
;
9076 ------------------------
9077 -- Write_Field26_Name --
9078 ------------------------
9080 procedure Write_Field26_Name
(Id
: Entity_Id
) is
9083 when E_Record_Type |
9084 E_Record_Type_With_Private
=>
9085 Write_Str
("Dispatch_Table_Wrappers");
9087 when E_In_Out_Parameter |
9090 Write_Str
("Last_Assignment");
9092 when E_Access_Subprogram_Type
=>
9093 Write_Str
("Original_Access_Type");
9095 when E_Generic_Package |
9097 Write_Str
("Package_Instantiation");
9101 Write_Str
("Related_Type");
9104 Write_Str
("Relative_Deadline_Variable");
9108 Write_Str
("Overridden_Operation");
9111 Write_Str
("Field26??");
9113 end Write_Field26_Name
;
9115 ------------------------
9116 -- Write_Field27_Name --
9117 ------------------------
9119 procedure Write_Field27_Name
(Id
: Entity_Id
) is
9124 Write_Str
("Current_Use_Clause");
9129 Write_Str
("Related_Type");
9133 Write_Str
("Wrapped_Entity");
9136 Write_Str
("Field27??");
9138 end Write_Field27_Name
;
9140 ------------------------
9141 -- Write_Field28_Name --
9142 ------------------------
9144 procedure Write_Field28_Name
(Id
: Entity_Id
) is
9152 E_Subprogram_Type
=>
9153 Write_Str
("Extra_Formals");
9155 when E_Constant | E_Variable
=>
9156 Write_Str
("Initialization_Statements");
9158 when E_Record_Type
=>
9159 Write_Str
("Underlying_Record_View");
9162 Write_Str
("Field28??");
9164 end Write_Field28_Name
;
9166 ------------------------
9167 -- Write_Field29_Name --
9168 ------------------------
9170 procedure Write_Field29_Name
(Id
: Entity_Id
) is
9174 Write_Str
("Subprograms_For_Type");
9177 Write_Str
("Field29??");
9179 end Write_Field29_Name
;
9181 ------------------------
9182 -- Write_Field30_Name --
9183 ------------------------
9185 procedure Write_Field30_Name
(Id
: Entity_Id
) is
9189 Write_Str
("Corresponding_Equality");
9192 Write_Str
("Static_Initialization");
9195 Write_Str
("Field30??");
9197 end Write_Field30_Name
;
9199 ------------------------
9200 -- Write_Field31_Name --
9201 ------------------------
9203 procedure Write_Field31_Name
(Id
: Entity_Id
) is
9208 Write_Str
("Thunk_Entity");
9211 Write_Str
("Field31??");
9213 end Write_Field31_Name
;
9215 ------------------------
9216 -- Write_Field32_Name --
9217 ------------------------
9219 procedure Write_Field32_Name
(Id
: Entity_Id
) is
9223 E_Generic_Function |
9225 E_Generic_Procedure |
9229 E_Subprogram_Body
=>
9230 Write_Str
("SPARK_Mode_Pragmas");
9233 Write_Str
("Field32??");
9235 end Write_Field32_Name
;
9237 ------------------------
9238 -- Write_Field33_Name --
9239 ------------------------
9241 procedure Write_Field33_Name
(Id
: Entity_Id
) is
9245 Write_Str
("Field33??");
9247 end Write_Field33_Name
;
9249 ------------------------
9250 -- Write_Field34_Name --
9251 ------------------------
9253 procedure Write_Field34_Name
(Id
: Entity_Id
) is
9257 Write_Str
("Field34??");
9259 end Write_Field34_Name
;
9261 ------------------------
9262 -- Write_Field35_Name --
9263 ------------------------
9265 procedure Write_Field35_Name
(Id
: Entity_Id
) is
9269 Write_Str
("Field35??");
9271 end Write_Field35_Name
;
9273 -------------------------
9274 -- Iterator Procedures --
9275 -------------------------
9277 procedure Proc_Next_Component
(N
: in out Node_Id
) is
9279 N
:= Next_Component
(N
);
9280 end Proc_Next_Component
;
9282 procedure Proc_Next_Component_Or_Discriminant
(N
: in out Node_Id
) is
9284 N
:= Next_Entity
(N
);
9285 while Present
(N
) loop
9286 exit when Ekind_In
(N
, E_Component
, E_Discriminant
);
9287 N
:= Next_Entity
(N
);
9289 end Proc_Next_Component_Or_Discriminant
;
9291 procedure Proc_Next_Discriminant
(N
: in out Node_Id
) is
9293 N
:= Next_Discriminant
(N
);
9294 end Proc_Next_Discriminant
;
9296 procedure Proc_Next_Formal
(N
: in out Node_Id
) is
9298 N
:= Next_Formal
(N
);
9299 end Proc_Next_Formal
;
9301 procedure Proc_Next_Formal_With_Extras
(N
: in out Node_Id
) is
9303 N
:= Next_Formal_With_Extras
(N
);
9304 end Proc_Next_Formal_With_Extras
;
9306 procedure Proc_Next_Index
(N
: in out Node_Id
) is
9308 N
:= Next_Index
(N
);
9309 end Proc_Next_Index
;
9311 procedure Proc_Next_Inlined_Subprogram
(N
: in out Node_Id
) is
9313 N
:= Next_Inlined_Subprogram
(N
);
9314 end Proc_Next_Inlined_Subprogram
;
9316 procedure Proc_Next_Literal
(N
: in out Node_Id
) is
9318 N
:= Next_Literal
(N
);
9319 end Proc_Next_Literal
;
9321 procedure Proc_Next_Stored_Discriminant
(N
: in out Node_Id
) is
9323 N
:= Next_Stored_Discriminant
(N
);
9324 end Proc_Next_Stored_Discriminant
;