1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2012, 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 -- Loop_Entry_Attributes Elist10
96 -- Normalized_Position_Max Uint10
98 -- Component_Bit_Offset Uint11
100 -- Entry_Component Node11
101 -- Enumeration_Pos Uint11
102 -- Generic_Homonym Node11
103 -- Protected_Body_Subprogram Node11
106 -- Barrier_Function Node12
107 -- Enumeration_Rep Uint12
109 -- Next_Inlined_Subprogram Node12
111 -- Component_Clause Node13
112 -- Elaboration_Entity Node13
113 -- Extra_Accessibility Node13
117 -- First_Optional_Parameter Node14
118 -- Normalized_Position Uint14
119 -- Shadow_Entities List14
121 -- Discriminant_Number Uint15
122 -- DT_Position Uint15
123 -- DT_Entry_Count Uint15
124 -- Entry_Bodies_Array Node15
125 -- Entry_Parameters_Type Node15
126 -- Extra_Formal Node15
127 -- Lit_Indexes Node15
128 -- Related_Instance Node15
129 -- Status_Flag_Or_Transient_Decl Node15
130 -- Scale_Value Uint15
131 -- Storage_Size_Variable Node15
132 -- String_Literal_Low_Bound Node15
134 -- Access_Disp_Table Elist16
135 -- Cloned_Subtype Node16
137 -- Entry_Formal Node16
138 -- First_Private_Entity Node16
139 -- Lit_Strings Node16
140 -- String_Literal_Length Uint16
141 -- Unset_Reference Node16
143 -- Actual_Subtype Node17
144 -- Digits_Value Uint17
145 -- Discriminal Node17
146 -- First_Entity Node17
147 -- First_Index Node17
148 -- First_Literal Node17
151 -- Non_Limited_View Node17
155 -- Corresponding_Concurrent_Type Node18
156 -- Corresponding_Protected_Entry Node18
157 -- Corresponding_Record_Type Node18
158 -- Delta_Value Ureal18
159 -- Enclosing_Scope Node18
160 -- Equivalent_Type Node18
161 -- Private_Dependents Elist18
162 -- Renamed_Entity Node18
163 -- Renamed_Object Node18
165 -- Body_Entity Node19
166 -- Corresponding_Discriminant Node19
167 -- Default_Aspect_Component_Value Node19
168 -- Default_Aspect_Value Node19
169 -- Extra_Accessibility_Of_Result Node19
170 -- Parent_Subtype Node19
171 -- Size_Check_Code Node19
172 -- Spec_Entity Node19
173 -- Underlying_Full_View Node19
175 -- Component_Type Node20
176 -- Default_Value Node20
177 -- Directly_Designated_Type Node20
178 -- Discriminant_Checking_Func Node20
179 -- Discriminant_Default_Value Node20
180 -- Last_Entity Node20
181 -- Prival_Link Node20
182 -- Register_Exception_Call Node20
183 -- Scalar_Range Node20
185 -- Accept_Address Elist21
186 -- Default_Expr_Function Node21
187 -- Discriminant_Constraint Elist21
188 -- Interface_Name Node21
189 -- Original_Array_Type Node21
190 -- Small_Value Ureal21
192 -- Associated_Storage_Pool Node22
193 -- Component_Size Uint22
194 -- Corresponding_Remote_Type Node22
195 -- Enumeration_Rep_Expr Node22
196 -- Exception_Code Uint22
197 -- Original_Record_Component Node22
198 -- Private_View Node22
199 -- Protected_Formal Node22
200 -- Scope_Depth_Value Uint22
201 -- Shared_Var_Procs_Instance Node22
203 -- CR_Discriminant Node23
204 -- Entry_Cancel_Parameter Node23
205 -- Enum_Pos_To_Rep Node23
206 -- Extra_Constrained Node23
207 -- Finalization_Master Node23
208 -- Generic_Renamings Elist23
209 -- Inner_Instances Elist23
210 -- Limited_View Node23
211 -- Packed_Array_Type Node23
212 -- Protection_Object Node23
213 -- Stored_Constraint Elist23
216 -- Related_Expression Node24
219 -- Interface_Alias Node25
220 -- Interfaces Elist25
221 -- Debug_Renaming_Link Node25
222 -- DT_Offset_To_Top_Func Node25
223 -- PPC_Wrapper Node25
224 -- Related_Array_Object Node25
225 -- Static_Predicate List25
226 -- Task_Body_Procedure Node25
228 -- Dispatch_Table_Wrappers Elist26
229 -- Last_Assignment Node26
230 -- Original_Access_Type Node26
231 -- Overridden_Operation Node26
232 -- Package_Instantiation Node26
233 -- Relative_Deadline_Variable Node26
235 -- Current_Use_Clause Node27
236 -- Related_Type Node27
237 -- Wrapped_Entity Node27
239 -- Extra_Formals Node28
240 -- Initialization_Statements Node28
241 -- Underlying_Record_View Node28
243 -- Subprograms_For_Type Node29
245 -- Corresponding_Equality Node30
246 -- Static_Initialization Node30
258 ---------------------------------------------
259 -- Usage of Flags in Defining Entity Nodes --
260 ---------------------------------------------
262 -- All flags are unique, there is no overlaying, so each flag is physically
263 -- present in every entity. However, for many of the flags, it only makes
264 -- sense for them to be set true for certain subsets of entity kinds. See
265 -- the spec of Einfo for further details.
267 -- Note: Flag1-Flag3 are not used, for historical reasons
270 -- Has_Discriminants Flag5
271 -- Is_Dispatching_Operation Flag6
272 -- Is_Immediately_Visible Flag7
274 -- Is_Potentially_Use_Visible Flag9
278 -- Is_Constrained Flag12
279 -- Is_Generic_Type Flag13
280 -- Depends_On_Private Flag14
282 -- Is_Volatile Flag16
283 -- Is_Internal Flag17
284 -- Has_Delayed_Freeze Flag18
285 -- Is_Abstract_Subprogram Flag19
286 -- Is_Concurrent_Record_Type Flag20
288 -- Has_Master_Entity Flag21
289 -- Needs_No_Actuals Flag22
290 -- Has_Storage_Size_Clause Flag23
291 -- Is_Imported Flag24
292 -- Is_Limited_Record Flag25
293 -- Has_Completion Flag26
294 -- Has_Pragma_Controlled Flag27
295 -- Is_Statically_Allocated Flag28
296 -- Has_Size_Clause Flag29
299 -- Checks_May_Be_Suppressed Flag31
300 -- Kill_Elaboration_Checks Flag32
301 -- Kill_Range_Checks Flag33
302 -- Has_Independent_Components Flag34
303 -- Is_Class_Wide_Equivalent_Type Flag35
304 -- Referenced_As_LHS Flag36
305 -- Is_Known_Non_Null Flag37
306 -- Can_Never_Be_Null Flag38
307 -- Has_Default_Aspect Flag39
308 -- Body_Needed_For_SAL Flag40
310 -- Treat_As_Volatile Flag41
311 -- Is_Controlled Flag42
312 -- Has_Controlled_Component Flag43
314 -- In_Private_Part Flag45
315 -- Has_Alignment_Clause Flag46
317 -- In_Package_Body Flag48
319 -- Delay_Subprogram_Descriptors Flag50
322 -- Is_Entry_Formal Flag52
323 -- Is_Private_Descendant Flag53
324 -- Return_Present Flag54
325 -- Is_Tagged_Type Flag55
326 -- Has_Homonym Flag56
328 -- Non_Binary_Modulus Flag58
329 -- Is_Preelaborated Flag59
330 -- Is_Shared_Passive Flag60
332 -- Is_Remote_Types Flag61
333 -- Is_Remote_Call_Interface Flag62
334 -- Is_Character_Type Flag63
335 -- Is_Intrinsic_Subprogram Flag64
336 -- Has_Record_Rep_Clause Flag65
337 -- Has_Enumeration_Rep_Clause Flag66
338 -- Has_Small_Clause Flag67
339 -- Has_Component_Size_Clause Flag68
340 -- Is_Access_Constant Flag69
341 -- Is_First_Subtype Flag70
343 -- Has_Completion_In_Body Flag71
344 -- Has_Unknown_Discriminants Flag72
345 -- Is_Child_Unit Flag73
346 -- Is_CPP_Class Flag74
347 -- Has_Non_Standard_Rep Flag75
348 -- Is_Constructor Flag76
349 -- Static_Elaboration_Desired Flag77
351 -- Has_All_Calls_Remote Flag79
352 -- Is_Constr_Subt_For_U_Nominal Flag80
354 -- Is_Asynchronous Flag81
355 -- Has_Gigi_Rep_Item Flag82
356 -- Has_Machine_Radix_Clause Flag83
357 -- Machine_Radix_10 Flag84
359 -- Has_Atomic_Components Flag86
360 -- Has_Volatile_Components Flag87
361 -- Discard_Names Flag88
362 -- Is_Interrupt_Handler Flag89
363 -- Returns_By_Ref Flag90
366 -- Size_Known_At_Compile_Time Flag92
367 -- Reverse_Storage_Order Flag93
368 -- Is_Generic_Actual_Type Flag94
369 -- Uses_Sec_Stack Flag95
370 -- Warnings_Off Flag96
371 -- Is_Controlling_Formal Flag97
372 -- Has_Controlling_Result Flag98
373 -- Is_Exported Flag99
374 -- Has_Specified_Layout Flag100
376 -- Has_Nested_Block_With_Handler Flag101
378 -- Is_Completely_Hidden Flag103
379 -- Address_Taken Flag104
380 -- Suppress_Initialization Flag105
381 -- Is_Limited_Composite Flag106
382 -- Is_Private_Composite Flag107
383 -- Default_Expressions_Processed Flag108
384 -- Is_Non_Static_Subtype Flag109
385 -- Has_External_Tag_Rep_Clause Flag110
387 -- Is_Formal_Subprogram Flag111
388 -- Is_Renaming_Of_Object Flag112
390 -- Delay_Cleanups Flag114
391 -- Never_Set_In_Source Flag115
392 -- Is_Visible_Lib_Unit Flag116
393 -- Is_Unchecked_Union Flag117
394 -- Is_For_Access_Subtype Flag118
395 -- Has_Convention_Pragma Flag119
396 -- Has_Primitive_Operations Flag120
398 -- Has_Pragma_Pack Flag121
399 -- Is_Bit_Packed_Array Flag122
400 -- Has_Unchecked_Union Flag123
401 -- Is_Eliminated Flag124
402 -- C_Pass_By_Copy Flag125
403 -- Is_Instantiated Flag126
404 -- Is_Valued_Procedure Flag127
405 -- (used for Component_Alignment) Flag128
406 -- (used for Component_Alignment) Flag129
407 -- Is_Generic_Instance Flag130
409 -- No_Pool_Assigned Flag131
410 -- Is_AST_Entry Flag132
411 -- Is_VMS_Exception Flag133
412 -- Is_Optional_Parameter Flag134
413 -- Has_Aliased_Components Flag135
414 -- No_Strict_Aliasing Flag136
415 -- Is_Machine_Code_Subprogram Flag137
416 -- Is_Packed_Array_Type Flag138
417 -- Has_Biased_Representation Flag139
418 -- Has_Complex_Representation Flag140
420 -- Is_Constr_Subt_For_UN_Aliased Flag141
421 -- Has_Missing_Return Flag142
422 -- Has_Recursive_Call Flag143
423 -- Is_Unsigned_Type Flag144
424 -- Strict_Alignment Flag145
425 -- Is_Abstract_Type Flag146
426 -- Needs_Debug_Info Flag147
427 -- Suppress_Elaboration_Warnings Flag148
428 -- Is_Compilation_Unit Flag149
429 -- Has_Pragma_Elaborate_Body Flag150
431 -- Has_Private_Ancestor Flag151
432 -- Entry_Accepted Flag152
433 -- Is_Obsolescent Flag153
434 -- Has_Per_Object_Constraint Flag154
435 -- Has_Private_Declaration Flag155
436 -- Referenced Flag156
437 -- Has_Pragma_Inline Flag157
438 -- Finalize_Storage_Only Flag158
439 -- From_With_Type Flag159
440 -- Is_Package_Body_Entity Flag160
442 -- Has_Qualified_Name Flag161
443 -- Nonzero_Is_True Flag162
444 -- Is_True_Constant Flag163
445 -- Reverse_Bit_Order Flag164
446 -- Suppress_Style_Checks Flag165
447 -- Debug_Info_Off Flag166
448 -- Sec_Stack_Needed_For_Return Flag167
449 -- Materialize_Entity Flag168
450 -- Has_Pragma_Thread_Local_Storage Flag169
451 -- Is_Known_Valid Flag170
453 -- Is_Hidden_Open_Scope Flag171
454 -- Has_Object_Size_Clause Flag172
455 -- Has_Fully_Qualified_Name Flag173
456 -- Elaboration_Entity_Required Flag174
457 -- Has_Forward_Instantiation Flag175
458 -- Is_Discrim_SO_Function Flag176
459 -- Size_Depends_On_Discriminant Flag177
460 -- Is_Null_Init_Proc Flag178
461 -- Has_Pragma_Pure_Function Flag179
462 -- Has_Pragma_Unreferenced Flag180
464 -- Has_Contiguous_Rep Flag181
465 -- Has_Xref_Entry Flag182
466 -- Must_Be_On_Byte_Boundary Flag183
467 -- Has_Stream_Size_Clause Flag184
468 -- Is_Ada_2005_Only Flag185
469 -- Is_Interface Flag186
470 -- Has_Constrained_Partial_View Flag187
471 -- Uses_Lock_Free Flag188
472 -- Is_Pure_Unit_Access_Type Flag189
473 -- Has_Specified_Stream_Input Flag190
475 -- Has_Specified_Stream_Output Flag191
476 -- Has_Specified_Stream_Read Flag192
477 -- Has_Specified_Stream_Write Flag193
478 -- Is_Local_Anonymous_Access Flag194
479 -- Is_Primitive_Wrapper Flag195
480 -- Was_Hidden Flag196
481 -- Is_Limited_Interface Flag197
482 -- Has_Pragma_Ordered Flag198
483 -- Is_Ada_2012_Only Flag199
485 -- Has_Delayed_Aspects Flag200
486 -- 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
617 -----------------------
618 -- Local subprograms --
619 -----------------------
621 function Has_Property
623 Prop_Nam
: Name_Id
) return Boolean;
624 -- Determine whether abstract state State has a particular property denoted
625 -- by the name Prop_Nam.
627 function Rep_Clause
(Id
: E
; Rep_Name
: Name_Id
) return N
;
628 -- Returns the attribute definition clause for Id whose name is Rep_Name.
629 -- Returns Empty if no matching attribute definition clause found for Id.
635 function Float_Rep
(Id
: E
) return F
is
636 pragma Assert
(Is_Floating_Point_Type
(Id
));
638 return F
'Val (UI_To_Int
(Uint10
(Base_Type
(Id
))));
645 function Has_Property
647 Prop_Nam
: Name_Id
) return Boolean
649 Par
: constant Node_Id
:= Parent
(State
);
653 pragma Assert
(Ekind
(State
) = E_Abstract_State
);
655 -- States with properties appear as extension aggregates in the tree
657 if Nkind
(Par
) = N_Extension_Aggregate
then
658 if Prop_Nam
= Name_Integrity
then
659 return Present
(Component_Associations
(Par
));
662 Prop
:= First
(Expressions
(Par
));
663 while Present
(Prop
) loop
664 if Chars
(Prop
) = Prop_Nam
then
680 function Rep_Clause
(Id
: E
; Rep_Name
: Name_Id
) return N
is
684 Ritem
:= First_Rep_Item
(Id
);
685 while Present
(Ritem
) loop
686 if Nkind
(Ritem
) = N_Attribute_Definition_Clause
687 and then Chars
(Ritem
) = Rep_Name
691 Next_Rep_Item
(Ritem
);
698 --------------------------------
699 -- Attribute Access Functions --
700 --------------------------------
702 function Abstract_States
(Id
: E
) return L
is
704 pragma Assert
(Ekind
(Id
) = E_Package
);
708 function Accept_Address
(Id
: E
) return L
is
713 function Access_Disp_Table
(Id
: E
) return L
is
715 pragma Assert
(Ekind_In
(Id
, E_Record_Type
,
717 return Elist16
(Implementation_Base_Type
(Id
));
718 end Access_Disp_Table
;
720 function Actual_Subtype
(Id
: E
) return E
is
723 (Ekind_In
(Id
, E_Constant
, E_Variable
, E_Generic_In_Out_Parameter
)
724 or else Is_Formal
(Id
));
728 function Address_Taken
(Id
: E
) return B
is
733 function Alias
(Id
: E
) return E
is
736 (Is_Overloadable
(Id
) or else Ekind
(Id
) = E_Subprogram_Type
);
740 function Alignment
(Id
: E
) return U
is
742 pragma Assert
(Is_Type
(Id
)
743 or else Is_Formal
(Id
)
744 or else Ekind_In
(Id
, E_Loop_Parameter
,
751 function Associated_Formal_Package
(Id
: E
) return E
is
753 pragma Assert
(Ekind
(Id
) = E_Package
);
755 end Associated_Formal_Package
;
757 function Associated_Node_For_Itype
(Id
: E
) return N
is
760 end Associated_Node_For_Itype
;
762 function Associated_Storage_Pool
(Id
: E
) return E
is
764 pragma Assert
(Is_Access_Type
(Id
));
765 return Node22
(Root_Type
(Id
));
766 end Associated_Storage_Pool
;
768 function Barrier_Function
(Id
: E
) return N
is
770 pragma Assert
(Is_Entry
(Id
));
772 end Barrier_Function
;
774 function Block_Node
(Id
: E
) return N
is
776 pragma Assert
(Ekind
(Id
) = E_Block
);
780 function Body_Entity
(Id
: E
) return E
is
782 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Generic_Package
));
786 function Body_Needed_For_SAL
(Id
: E
) return B
is
789 (Ekind
(Id
) = E_Package
790 or else Is_Subprogram
(Id
)
791 or else Is_Generic_Unit
(Id
));
793 end Body_Needed_For_SAL
;
795 function C_Pass_By_Copy
(Id
: E
) return B
is
797 pragma Assert
(Is_Record_Type
(Id
));
798 return Flag125
(Implementation_Base_Type
(Id
));
801 function Can_Never_Be_Null
(Id
: E
) return B
is
804 end Can_Never_Be_Null
;
806 function Checks_May_Be_Suppressed
(Id
: E
) return B
is
809 end Checks_May_Be_Suppressed
;
811 function Class_Wide_Type
(Id
: E
) return E
is
813 pragma Assert
(Is_Type
(Id
));
817 function Cloned_Subtype
(Id
: E
) return E
is
819 pragma Assert
(Ekind_In
(Id
, E_Record_Subtype
, E_Class_Wide_Subtype
));
823 function Component_Bit_Offset
(Id
: E
) return U
is
825 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
827 end Component_Bit_Offset
;
829 function Component_Clause
(Id
: E
) return N
is
831 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
833 end Component_Clause
;
835 function Component_Size
(Id
: E
) return U
is
837 pragma Assert
(Is_Array_Type
(Id
));
838 return Uint22
(Implementation_Base_Type
(Id
));
841 function Component_Type
(Id
: E
) return E
is
843 pragma Assert
(Is_Array_Type
(Id
) or else Is_String_Type
(Id
));
844 return Node20
(Implementation_Base_Type
(Id
));
847 function Corresponding_Concurrent_Type
(Id
: E
) return E
is
849 pragma Assert
(Ekind
(Id
) = E_Record_Type
);
851 end Corresponding_Concurrent_Type
;
853 function Corresponding_Discriminant
(Id
: E
) return E
is
855 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
857 end Corresponding_Discriminant
;
859 function Corresponding_Equality
(Id
: E
) return E
is
862 (Ekind
(Id
) = E_Function
863 and then not Comes_From_Source
(Id
)
864 and then Chars
(Id
) = Name_Op_Ne
);
866 end Corresponding_Equality
;
868 function Corresponding_Protected_Entry
(Id
: E
) return E
is
870 pragma Assert
(Ekind
(Id
) = E_Subprogram_Body
);
872 end Corresponding_Protected_Entry
;
874 function Corresponding_Record_Type
(Id
: E
) return E
is
876 pragma Assert
(Is_Concurrent_Type
(Id
));
878 end Corresponding_Record_Type
;
880 function Corresponding_Remote_Type
(Id
: E
) return E
is
883 end Corresponding_Remote_Type
;
885 function Current_Use_Clause
(Id
: E
) return E
is
887 pragma Assert
(Ekind
(Id
) = E_Package
or else Is_Type
(Id
));
889 end Current_Use_Clause
;
891 function Current_Value
(Id
: E
) return N
is
893 pragma Assert
(Ekind
(Id
) in Object_Kind
);
897 function CR_Discriminant
(Id
: E
) return E
is
902 function Debug_Info_Off
(Id
: E
) return B
is
907 function Debug_Renaming_Link
(Id
: E
) return E
is
910 end Debug_Renaming_Link
;
912 function Default_Aspect_Component_Value
(Id
: E
) return N
is
914 pragma Assert
(Is_Array_Type
(Id
));
916 end Default_Aspect_Component_Value
;
918 function Default_Aspect_Value
(Id
: E
) return N
is
920 pragma Assert
(Is_Scalar_Type
(Id
));
922 end Default_Aspect_Value
;
924 function Default_Expr_Function
(Id
: E
) return E
is
926 pragma Assert
(Is_Formal
(Id
));
928 end Default_Expr_Function
;
930 function Default_Expressions_Processed
(Id
: E
) return B
is
933 end Default_Expressions_Processed
;
935 function Default_Value
(Id
: E
) return N
is
937 pragma Assert
(Is_Formal
(Id
));
941 function Delay_Cleanups
(Id
: E
) return B
is
946 function Delay_Subprogram_Descriptors
(Id
: E
) return B
is
949 end Delay_Subprogram_Descriptors
;
951 function Delta_Value
(Id
: E
) return R
is
953 pragma Assert
(Is_Fixed_Point_Type
(Id
));
957 function Dependent_Instances
(Id
: E
) return L
is
959 pragma Assert
(Is_Generic_Instance
(Id
));
961 end Dependent_Instances
;
963 function Depends_On_Private
(Id
: E
) return B
is
965 pragma Assert
(Nkind
(Id
) in N_Entity
);
967 end Depends_On_Private
;
969 function Digits_Value
(Id
: E
) return U
is
972 (Is_Floating_Point_Type
(Id
)
973 or else Is_Decimal_Fixed_Point_Type
(Id
));
977 function Direct_Primitive_Operations
(Id
: E
) return L
is
979 pragma Assert
(Is_Tagged_Type
(Id
));
981 end Direct_Primitive_Operations
;
983 function Directly_Designated_Type
(Id
: E
) return E
is
985 pragma Assert
(Is_Access_Type
(Id
));
987 end Directly_Designated_Type
;
989 function Discard_Names
(Id
: E
) return B
is
994 function Discriminal
(Id
: E
) return E
is
996 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
1000 function Discriminal_Link
(Id
: E
) return N
is
1003 end Discriminal_Link
;
1005 function Discriminant_Checking_Func
(Id
: E
) return E
is
1007 pragma Assert
(Ekind
(Id
) = E_Component
);
1009 end Discriminant_Checking_Func
;
1011 function Discriminant_Constraint
(Id
: E
) return L
is
1013 pragma Assert
(Is_Composite_Type
(Id
) and then Has_Discriminants
(Id
));
1014 return Elist21
(Id
);
1015 end Discriminant_Constraint
;
1017 function Discriminant_Default_Value
(Id
: E
) return N
is
1019 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
1021 end Discriminant_Default_Value
;
1023 function Discriminant_Number
(Id
: E
) return U
is
1025 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
1027 end Discriminant_Number
;
1029 function Dispatch_Table_Wrappers
(Id
: E
) return L
is
1031 pragma Assert
(Ekind_In
(Id
, E_Record_Type
,
1033 return Elist26
(Implementation_Base_Type
(Id
));
1034 end Dispatch_Table_Wrappers
;
1036 function DT_Entry_Count
(Id
: E
) return U
is
1038 pragma Assert
(Ekind
(Id
) = E_Component
and then Is_Tag
(Id
));
1042 function DT_Offset_To_Top_Func
(Id
: E
) return E
is
1044 pragma Assert
(Ekind
(Id
) = E_Component
and then Is_Tag
(Id
));
1046 end DT_Offset_To_Top_Func
;
1048 function DT_Position
(Id
: E
) return U
is
1050 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
)
1051 and then Present
(DTC_Entity
(Id
)));
1055 function DTC_Entity
(Id
: E
) return E
is
1057 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
1061 function Elaborate_Body_Desirable
(Id
: E
) return B
is
1063 pragma Assert
(Ekind
(Id
) = E_Package
);
1064 return Flag210
(Id
);
1065 end Elaborate_Body_Desirable
;
1067 function Elaboration_Entity
(Id
: E
) return E
is
1072 Ekind
(Id
) = E_Package
1074 Is_Generic_Unit
(Id
));
1076 end Elaboration_Entity
;
1078 function Elaboration_Entity_Required
(Id
: E
) return B
is
1083 Ekind
(Id
) = E_Package
1085 Is_Generic_Unit
(Id
));
1086 return Flag174
(Id
);
1087 end Elaboration_Entity_Required
;
1089 function Enclosing_Scope
(Id
: E
) return E
is
1092 end Enclosing_Scope
;
1094 function Entry_Accepted
(Id
: E
) return B
is
1096 pragma Assert
(Is_Entry
(Id
));
1097 return Flag152
(Id
);
1100 function Entry_Bodies_Array
(Id
: E
) return E
is
1103 end Entry_Bodies_Array
;
1105 function Entry_Cancel_Parameter
(Id
: E
) return E
is
1108 end Entry_Cancel_Parameter
;
1110 function Entry_Component
(Id
: E
) return E
is
1113 end Entry_Component
;
1115 function Entry_Formal
(Id
: E
) return E
is
1120 function Entry_Index_Constant
(Id
: E
) return N
is
1122 pragma Assert
(Ekind
(Id
) = E_Entry_Index_Parameter
);
1124 end Entry_Index_Constant
;
1126 function Contract
(Id
: E
) return N
is
1129 (Ekind_In
(Id
, E_Entry
, E_Entry_Family
)
1130 or else Is_Subprogram
(Id
)
1131 or else Is_Generic_Subprogram
(Id
));
1135 function Entry_Parameters_Type
(Id
: E
) return E
is
1138 end Entry_Parameters_Type
;
1140 function Enum_Pos_To_Rep
(Id
: E
) return E
is
1142 pragma Assert
(Ekind
(Id
) = E_Enumeration_Type
);
1144 end Enum_Pos_To_Rep
;
1146 function Enumeration_Pos
(Id
: E
) return Uint
is
1148 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
1150 end Enumeration_Pos
;
1152 function Enumeration_Rep
(Id
: E
) return U
is
1154 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
1156 end Enumeration_Rep
;
1158 function Enumeration_Rep_Expr
(Id
: E
) return N
is
1160 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
1162 end Enumeration_Rep_Expr
;
1164 function Equivalent_Type
(Id
: E
) return E
is
1167 (Ekind_In
(Id
, E_Class_Wide_Type
,
1168 E_Class_Wide_Subtype
,
1169 E_Access_Protected_Subprogram_Type
,
1170 E_Anonymous_Access_Protected_Subprogram_Type
,
1171 E_Access_Subprogram_Type
,
1174 end Equivalent_Type
;
1176 function Esize
(Id
: E
) return Uint
is
1181 function Exception_Code
(Id
: E
) return Uint
is
1183 pragma Assert
(Ekind
(Id
) = E_Exception
);
1187 function Extra_Accessibility
(Id
: E
) return E
is
1190 (Is_Formal
(Id
) or else Ekind_In
(Id
, E_Variable
, E_Constant
));
1192 end Extra_Accessibility
;
1194 function Extra_Accessibility_Of_Result
(Id
: E
) return E
is
1196 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Operator
, E_Subprogram_Type
));
1198 end Extra_Accessibility_Of_Result
;
1200 function Extra_Constrained
(Id
: E
) return E
is
1202 pragma Assert
(Is_Formal
(Id
) or else Ekind
(Id
) = E_Variable
);
1204 end Extra_Constrained
;
1206 function Extra_Formal
(Id
: E
) return E
is
1211 function Extra_Formals
(Id
: E
) return E
is
1214 (Is_Overloadable
(Id
)
1215 or else Ekind_In
(Id
, E_Entry_Family
,
1217 E_Subprogram_Type
));
1221 function Can_Use_Internal_Rep
(Id
: E
) return B
is
1223 pragma Assert
(Is_Access_Subprogram_Type
(Base_Type
(Id
)));
1224 return Flag229
(Base_Type
(Id
));
1225 end Can_Use_Internal_Rep
;
1227 function Finalization_Master
(Id
: E
) return E
is
1229 pragma Assert
(Is_Access_Type
(Id
));
1230 return Node23
(Root_Type
(Id
));
1231 end Finalization_Master
;
1233 function Finalize_Storage_Only
(Id
: E
) return B
is
1235 pragma Assert
(Is_Type
(Id
));
1236 return Flag158
(Base_Type
(Id
));
1237 end Finalize_Storage_Only
;
1239 function Finalizer
(Id
: E
) return E
is
1242 (Ekind
(Id
) = E_Package
1243 or else Ekind
(Id
) = E_Package_Body
);
1247 function First_Entity
(Id
: E
) return E
is
1252 function First_Exit_Statement
(Id
: E
) return N
is
1254 pragma Assert
(Ekind
(Id
) = E_Loop
);
1256 end First_Exit_Statement
;
1258 function First_Index
(Id
: E
) return N
is
1260 pragma Assert
(Is_Array_Type
(Id
) or else Is_String_Type
(Id
));
1264 function First_Literal
(Id
: E
) return E
is
1266 pragma Assert
(Is_Enumeration_Type
(Id
));
1270 function First_Optional_Parameter
(Id
: E
) return E
is
1272 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
1274 end First_Optional_Parameter
;
1276 function First_Private_Entity
(Id
: E
) return E
is
1278 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Generic_Package
)
1279 or else Ekind
(Id
) in Concurrent_Kind
);
1281 end First_Private_Entity
;
1283 function First_Rep_Item
(Id
: E
) return E
is
1288 function Freeze_Node
(Id
: E
) return N
is
1293 function From_With_Type
(Id
: E
) return B
is
1295 return Flag159
(Id
);
1298 function Full_View
(Id
: E
) return E
is
1300 pragma Assert
(Is_Type
(Id
) or else Ekind
(Id
) = E_Constant
);
1304 function Generic_Homonym
(Id
: E
) return E
is
1306 pragma Assert
(Ekind
(Id
) = E_Generic_Package
);
1308 end Generic_Homonym
;
1310 function Generic_Renamings
(Id
: E
) return L
is
1312 return Elist23
(Id
);
1313 end Generic_Renamings
;
1315 function Handler_Records
(Id
: E
) return S
is
1318 end Handler_Records
;
1320 function Has_Aliased_Components
(Id
: E
) return B
is
1322 return Flag135
(Implementation_Base_Type
(Id
));
1323 end Has_Aliased_Components
;
1325 function Has_Alignment_Clause
(Id
: E
) return B
is
1328 end Has_Alignment_Clause
;
1330 function Has_All_Calls_Remote
(Id
: E
) return B
is
1333 end Has_All_Calls_Remote
;
1335 function Has_Anonymous_Master
(Id
: E
) return B
is
1338 (Ekind_In
(Id
, E_Function
, E_Package
, E_Package_Body
, E_Procedure
));
1339 return Flag253
(Id
);
1340 end Has_Anonymous_Master
;
1342 function Has_Atomic_Components
(Id
: E
) return B
is
1344 return Flag86
(Implementation_Base_Type
(Id
));
1345 end Has_Atomic_Components
;
1347 function Has_Biased_Representation
(Id
: E
) return B
is
1349 return Flag139
(Id
);
1350 end Has_Biased_Representation
;
1352 function Has_Completion
(Id
: E
) return B
is
1357 function Has_Completion_In_Body
(Id
: E
) return B
is
1359 pragma Assert
(Is_Type
(Id
));
1361 end Has_Completion_In_Body
;
1363 function Has_Complex_Representation
(Id
: E
) return B
is
1365 pragma Assert
(Is_Type
(Id
));
1366 return Flag140
(Implementation_Base_Type
(Id
));
1367 end Has_Complex_Representation
;
1369 function Has_Component_Size_Clause
(Id
: E
) return B
is
1371 pragma Assert
(Is_Array_Type
(Id
));
1372 return Flag68
(Implementation_Base_Type
(Id
));
1373 end Has_Component_Size_Clause
;
1375 function Has_Constrained_Partial_View
(Id
: E
) return B
is
1377 pragma Assert
(Is_Type
(Id
));
1378 return Flag187
(Id
);
1379 end Has_Constrained_Partial_View
;
1381 function Has_Controlled_Component
(Id
: E
) return B
is
1383 return Flag43
(Base_Type
(Id
));
1384 end Has_Controlled_Component
;
1386 function Has_Contiguous_Rep
(Id
: E
) return B
is
1388 return Flag181
(Id
);
1389 end Has_Contiguous_Rep
;
1391 function Has_Controlling_Result
(Id
: E
) return B
is
1394 end Has_Controlling_Result
;
1396 function Has_Convention_Pragma
(Id
: E
) return B
is
1398 return Flag119
(Id
);
1399 end Has_Convention_Pragma
;
1401 function Has_Default_Aspect
(Id
: E
) return B
is
1403 return Flag39
(Base_Type
(Id
));
1404 end Has_Default_Aspect
;
1406 function Has_Delayed_Aspects
(Id
: E
) return B
is
1408 pragma Assert
(Nkind
(Id
) in N_Entity
);
1409 return Flag200
(Id
);
1410 end Has_Delayed_Aspects
;
1412 function Has_Delayed_Freeze
(Id
: E
) return B
is
1414 pragma Assert
(Nkind
(Id
) in N_Entity
);
1416 end Has_Delayed_Freeze
;
1418 function Has_Discriminants
(Id
: E
) return B
is
1420 pragma Assert
(Nkind
(Id
) in N_Entity
);
1422 end Has_Discriminants
;
1424 function Has_Dispatch_Table
(Id
: E
) return B
is
1426 pragma Assert
(Is_Tagged_Type
(Id
));
1427 return Flag220
(Id
);
1428 end Has_Dispatch_Table
;
1430 function Has_Enumeration_Rep_Clause
(Id
: E
) return B
is
1432 pragma Assert
(Is_Enumeration_Type
(Id
));
1434 end Has_Enumeration_Rep_Clause
;
1436 function Has_Exit
(Id
: E
) return B
is
1441 function Has_External_Tag_Rep_Clause
(Id
: E
) return B
is
1443 pragma Assert
(Is_Tagged_Type
(Id
));
1444 return Flag110
(Id
);
1445 end Has_External_Tag_Rep_Clause
;
1447 function Has_Forward_Instantiation
(Id
: E
) return B
is
1449 return Flag175
(Id
);
1450 end Has_Forward_Instantiation
;
1452 function Has_Fully_Qualified_Name
(Id
: E
) return B
is
1454 return Flag173
(Id
);
1455 end Has_Fully_Qualified_Name
;
1457 function Has_Gigi_Rep_Item
(Id
: E
) return B
is
1460 end Has_Gigi_Rep_Item
;
1462 function Has_Homonym
(Id
: E
) return B
is
1467 function Has_Implicit_Dereference
(Id
: E
) return B
is
1469 return Flag251
(Id
);
1470 end Has_Implicit_Dereference
;
1472 function Has_Independent_Components
(Id
: E
) return B
is
1474 pragma Assert
(Is_Object
(Id
) or else Is_Type
(Id
));
1476 end Has_Independent_Components
;
1478 function Has_Inheritable_Invariants
(Id
: E
) return B
is
1480 pragma Assert
(Is_Type
(Id
));
1481 return Flag248
(Id
);
1482 end Has_Inheritable_Invariants
;
1484 function Has_Initial_Value
(Id
: E
) return B
is
1486 pragma Assert
(Ekind
(Id
) = E_Variable
or else Is_Formal
(Id
));
1487 return Flag219
(Id
);
1488 end Has_Initial_Value
;
1490 function Has_Invariants
(Id
: E
) return B
is
1492 pragma Assert
(Is_Type
(Id
)
1493 or else Ekind
(Id
) = E_Procedure
1494 or else Ekind
(Id
) = E_Generic_Procedure
);
1495 return Flag232
(Id
);
1498 function Has_Machine_Radix_Clause
(Id
: E
) return B
is
1500 pragma Assert
(Is_Decimal_Fixed_Point_Type
(Id
));
1502 end Has_Machine_Radix_Clause
;
1504 function Has_Master_Entity
(Id
: E
) return B
is
1507 end Has_Master_Entity
;
1509 function Has_Missing_Return
(Id
: E
) return B
is
1511 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Generic_Function
));
1512 return Flag142
(Id
);
1513 end Has_Missing_Return
;
1515 function Has_Nested_Block_With_Handler
(Id
: E
) return B
is
1517 return Flag101
(Id
);
1518 end Has_Nested_Block_With_Handler
;
1520 function Has_Non_Standard_Rep
(Id
: E
) return B
is
1522 return Flag75
(Implementation_Base_Type
(Id
));
1523 end Has_Non_Standard_Rep
;
1525 function Has_Object_Size_Clause
(Id
: E
) return B
is
1527 pragma Assert
(Is_Type
(Id
));
1528 return Flag172
(Id
);
1529 end Has_Object_Size_Clause
;
1531 function Has_Per_Object_Constraint
(Id
: E
) return B
is
1533 return Flag154
(Id
);
1534 end Has_Per_Object_Constraint
;
1536 function Has_Postconditions
(Id
: E
) return B
is
1538 pragma Assert
(Is_Subprogram
(Id
));
1539 return Flag240
(Id
);
1540 end Has_Postconditions
;
1542 function Has_Pragma_Controlled
(Id
: E
) return B
is
1544 pragma Assert
(Is_Access_Type
(Id
));
1545 return Flag27
(Implementation_Base_Type
(Id
));
1546 end Has_Pragma_Controlled
;
1548 function Has_Pragma_Elaborate_Body
(Id
: E
) return B
is
1550 return Flag150
(Id
);
1551 end Has_Pragma_Elaborate_Body
;
1553 function Has_Pragma_Inline
(Id
: E
) return B
is
1555 return Flag157
(Id
);
1556 end Has_Pragma_Inline
;
1558 function Has_Pragma_Inline_Always
(Id
: E
) return B
is
1560 return Flag230
(Id
);
1561 end Has_Pragma_Inline_Always
;
1563 function Has_Pragma_Ordered
(Id
: E
) return B
is
1565 pragma Assert
(Is_Enumeration_Type
(Id
));
1566 return Flag198
(Implementation_Base_Type
(Id
));
1567 end Has_Pragma_Ordered
;
1569 function Has_Pragma_Pack
(Id
: E
) return B
is
1571 pragma Assert
(Is_Record_Type
(Id
) or else Is_Array_Type
(Id
));
1572 return Flag121
(Implementation_Base_Type
(Id
));
1573 end Has_Pragma_Pack
;
1575 function Has_Pragma_Preelab_Init
(Id
: E
) return B
is
1577 return Flag221
(Id
);
1578 end Has_Pragma_Preelab_Init
;
1580 function Has_Pragma_Pure
(Id
: E
) return B
is
1582 return Flag203
(Id
);
1583 end Has_Pragma_Pure
;
1585 function Has_Pragma_Pure_Function
(Id
: E
) return B
is
1587 return Flag179
(Id
);
1588 end Has_Pragma_Pure_Function
;
1590 function Has_Pragma_Thread_Local_Storage
(Id
: E
) return B
is
1592 return Flag169
(Id
);
1593 end Has_Pragma_Thread_Local_Storage
;
1595 function Has_Pragma_Unmodified
(Id
: E
) return B
is
1597 return Flag233
(Id
);
1598 end Has_Pragma_Unmodified
;
1600 function Has_Pragma_Unreferenced
(Id
: E
) return B
is
1602 return Flag180
(Id
);
1603 end Has_Pragma_Unreferenced
;
1605 function Has_Pragma_Unreferenced_Objects
(Id
: E
) return B
is
1607 pragma Assert
(Is_Type
(Id
));
1608 return Flag212
(Id
);
1609 end Has_Pragma_Unreferenced_Objects
;
1611 function Has_Predicates
(Id
: E
) return B
is
1613 return Flag250
(Id
);
1616 function Has_Primitive_Operations
(Id
: E
) return B
is
1618 pragma Assert
(Is_Type
(Id
));
1619 return Flag120
(Base_Type
(Id
));
1620 end Has_Primitive_Operations
;
1622 function Has_Private_Ancestor
(Id
: E
) return B
is
1624 return Flag151
(Id
);
1625 end Has_Private_Ancestor
;
1627 function Has_Private_Declaration
(Id
: E
) return B
is
1629 return Flag155
(Id
);
1630 end Has_Private_Declaration
;
1632 function Has_Qualified_Name
(Id
: E
) return B
is
1634 return Flag161
(Id
);
1635 end Has_Qualified_Name
;
1637 function Has_RACW
(Id
: E
) return B
is
1639 pragma Assert
(Ekind
(Id
) = E_Package
);
1640 return Flag214
(Id
);
1643 function Has_Record_Rep_Clause
(Id
: E
) return B
is
1645 pragma Assert
(Is_Record_Type
(Id
));
1646 return Flag65
(Implementation_Base_Type
(Id
));
1647 end Has_Record_Rep_Clause
;
1649 function Has_Recursive_Call
(Id
: E
) return B
is
1651 pragma Assert
(Is_Subprogram
(Id
));
1652 return Flag143
(Id
);
1653 end Has_Recursive_Call
;
1655 function Has_Size_Clause
(Id
: E
) return B
is
1658 end Has_Size_Clause
;
1660 function Has_Small_Clause
(Id
: E
) return B
is
1663 end Has_Small_Clause
;
1665 function Has_Specified_Layout
(Id
: E
) return B
is
1667 pragma Assert
(Is_Type
(Id
));
1668 return Flag100
(Implementation_Base_Type
(Id
));
1669 end Has_Specified_Layout
;
1671 function Has_Specified_Stream_Input
(Id
: E
) return B
is
1673 pragma Assert
(Is_Type
(Id
));
1674 return Flag190
(Id
);
1675 end Has_Specified_Stream_Input
;
1677 function Has_Specified_Stream_Output
(Id
: E
) return B
is
1679 pragma Assert
(Is_Type
(Id
));
1680 return Flag191
(Id
);
1681 end Has_Specified_Stream_Output
;
1683 function Has_Specified_Stream_Read
(Id
: E
) return B
is
1685 pragma Assert
(Is_Type
(Id
));
1686 return Flag192
(Id
);
1687 end Has_Specified_Stream_Read
;
1689 function Has_Specified_Stream_Write
(Id
: E
) return B
is
1691 pragma Assert
(Is_Type
(Id
));
1692 return Flag193
(Id
);
1693 end Has_Specified_Stream_Write
;
1695 function Has_Static_Discriminants
(Id
: E
) return B
is
1697 pragma Assert
(Is_Type
(Id
));
1698 return Flag211
(Id
);
1699 end Has_Static_Discriminants
;
1701 function Has_Storage_Size_Clause
(Id
: E
) return B
is
1703 pragma Assert
(Is_Access_Type
(Id
) or else Is_Task_Type
(Id
));
1704 return Flag23
(Implementation_Base_Type
(Id
));
1705 end Has_Storage_Size_Clause
;
1707 function Has_Stream_Size_Clause
(Id
: E
) return B
is
1709 return Flag184
(Id
);
1710 end Has_Stream_Size_Clause
;
1712 function Has_Task
(Id
: E
) return B
is
1714 return Flag30
(Base_Type
(Id
));
1717 function Has_Thunks
(Id
: E
) return B
is
1719 return Flag228
(Id
);
1722 function Has_Unchecked_Union
(Id
: E
) return B
is
1724 return Flag123
(Base_Type
(Id
));
1725 end Has_Unchecked_Union
;
1727 function Has_Unknown_Discriminants
(Id
: E
) return B
is
1729 pragma Assert
(Is_Type
(Id
));
1731 end Has_Unknown_Discriminants
;
1733 function Has_Up_Level_Access
(Id
: E
) return B
is
1736 (Ekind_In
(Id
, E_Variable
, E_Constant
, E_Loop_Parameter
));
1737 return Flag215
(Id
);
1738 end Has_Up_Level_Access
;
1740 function Has_Volatile_Components
(Id
: E
) return B
is
1742 return Flag87
(Implementation_Base_Type
(Id
));
1743 end Has_Volatile_Components
;
1745 function Has_Xref_Entry
(Id
: E
) return B
is
1747 return Flag182
(Id
);
1750 function Hiding_Loop_Variable
(Id
: E
) return E
is
1752 pragma Assert
(Ekind
(Id
) = E_Variable
);
1754 end Hiding_Loop_Variable
;
1756 function Homonym
(Id
: E
) return E
is
1761 function Interface_Alias
(Id
: E
) return E
is
1763 pragma Assert
(Is_Subprogram
(Id
));
1765 end Interface_Alias
;
1767 function Interfaces
(Id
: E
) return L
is
1769 pragma Assert
(Is_Record_Type
(Id
));
1770 return Elist25
(Id
);
1773 function In_Package_Body
(Id
: E
) return B
is
1776 end In_Package_Body
;
1778 function In_Private_Part
(Id
: E
) return B
is
1781 end In_Private_Part
;
1783 function In_Use
(Id
: E
) return B
is
1785 pragma Assert
(Nkind
(Id
) in N_Entity
);
1789 function Initialization_Statements
(Id
: E
) return N
is
1791 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
1793 end Initialization_Statements
;
1795 function Integrity_Level
(Id
: E
) return U
is
1797 pragma Assert
(Ekind
(Id
) = E_Abstract_State
);
1799 end Integrity_Level
;
1801 function Inner_Instances
(Id
: E
) return L
is
1803 return Elist23
(Id
);
1804 end Inner_Instances
;
1806 function Interface_Name
(Id
: E
) return N
is
1811 function Is_Abstract_Subprogram
(Id
: E
) return B
is
1813 pragma Assert
(Is_Overloadable
(Id
));
1815 end Is_Abstract_Subprogram
;
1817 function Is_Abstract_Type
(Id
: E
) return B
is
1819 pragma Assert
(Is_Type
(Id
));
1820 return Flag146
(Id
);
1821 end Is_Abstract_Type
;
1823 function Is_Local_Anonymous_Access
(Id
: E
) return B
is
1825 pragma Assert
(Is_Access_Type
(Id
));
1826 return Flag194
(Id
);
1827 end Is_Local_Anonymous_Access
;
1829 function Is_Access_Constant
(Id
: E
) return B
is
1831 pragma Assert
(Is_Access_Type
(Id
));
1833 end Is_Access_Constant
;
1835 function Is_Ada_2005_Only
(Id
: E
) return B
is
1837 return Flag185
(Id
);
1838 end Is_Ada_2005_Only
;
1840 function Is_Ada_2012_Only
(Id
: E
) return B
is
1842 return Flag199
(Id
);
1843 end Is_Ada_2012_Only
;
1845 function Is_Aliased
(Id
: E
) return B
is
1847 pragma Assert
(Nkind
(Id
) in N_Entity
);
1851 function Is_AST_Entry
(Id
: E
) return B
is
1853 pragma Assert
(Is_Entry
(Id
));
1854 return Flag132
(Id
);
1857 function Is_Asynchronous
(Id
: E
) return B
is
1859 pragma Assert
(Ekind
(Id
) = E_Procedure
or else Is_Type
(Id
));
1861 end Is_Asynchronous
;
1863 function Is_Atomic
(Id
: E
) return B
is
1868 function Is_Bit_Packed_Array
(Id
: E
) return B
is
1870 return Flag122
(Implementation_Base_Type
(Id
));
1871 end Is_Bit_Packed_Array
;
1873 function Is_Called
(Id
: E
) return B
is
1875 pragma Assert
(Ekind_In
(Id
, E_Procedure
, E_Function
));
1876 return Flag102
(Id
);
1879 function Is_Character_Type
(Id
: E
) return B
is
1882 end Is_Character_Type
;
1884 function Is_Child_Unit
(Id
: E
) return B
is
1889 function Is_Class_Wide_Equivalent_Type
(Id
: E
) return B
is
1892 end Is_Class_Wide_Equivalent_Type
;
1894 function Is_Compilation_Unit
(Id
: E
) return B
is
1896 return Flag149
(Id
);
1897 end Is_Compilation_Unit
;
1899 function Is_Completely_Hidden
(Id
: E
) return B
is
1901 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
1902 return Flag103
(Id
);
1903 end Is_Completely_Hidden
;
1905 function Is_Constr_Subt_For_U_Nominal
(Id
: E
) return B
is
1908 end Is_Constr_Subt_For_U_Nominal
;
1910 function Is_Constr_Subt_For_UN_Aliased
(Id
: E
) return B
is
1912 return Flag141
(Id
);
1913 end Is_Constr_Subt_For_UN_Aliased
;
1915 function Is_Constrained
(Id
: E
) return B
is
1917 pragma Assert
(Nkind
(Id
) in N_Entity
);
1921 function Is_Constructor
(Id
: E
) return B
is
1926 function Is_Controlled
(Id
: E
) return B
is
1928 return Flag42
(Base_Type
(Id
));
1931 function Is_Controlling_Formal
(Id
: E
) return B
is
1933 pragma Assert
(Is_Formal
(Id
));
1935 end Is_Controlling_Formal
;
1937 function Is_CPP_Class
(Id
: E
) return B
is
1942 function Is_Descendent_Of_Address
(Id
: E
) return B
is
1944 pragma Assert
(Is_Type
(Id
));
1945 return Flag223
(Id
);
1946 end Is_Descendent_Of_Address
;
1948 function Is_Discrim_SO_Function
(Id
: E
) return B
is
1950 return Flag176
(Id
);
1951 end Is_Discrim_SO_Function
;
1953 function Is_Dispatch_Table_Entity
(Id
: E
) return B
is
1955 return Flag234
(Id
);
1956 end Is_Dispatch_Table_Entity
;
1958 function Is_Dispatching_Operation
(Id
: E
) return B
is
1960 pragma Assert
(Nkind
(Id
) in N_Entity
);
1962 end Is_Dispatching_Operation
;
1964 function Is_Eliminated
(Id
: E
) return B
is
1966 return Flag124
(Id
);
1969 function Is_Entry_Formal
(Id
: E
) return B
is
1972 end Is_Entry_Formal
;
1974 function Is_Exported
(Id
: E
) return B
is
1979 function Is_First_Subtype
(Id
: E
) return B
is
1982 end Is_First_Subtype
;
1984 function Is_For_Access_Subtype
(Id
: E
) return B
is
1986 pragma Assert
(Ekind_In
(Id
, E_Record_Subtype
, E_Private_Subtype
));
1987 return Flag118
(Id
);
1988 end Is_For_Access_Subtype
;
1990 function Is_Formal_Subprogram
(Id
: E
) return B
is
1992 return Flag111
(Id
);
1993 end Is_Formal_Subprogram
;
1995 function Is_Frozen
(Id
: E
) return B
is
2000 function Is_Generic_Actual_Type
(Id
: E
) return B
is
2002 pragma Assert
(Is_Type
(Id
));
2004 end Is_Generic_Actual_Type
;
2006 function Is_Generic_Instance
(Id
: E
) return B
is
2008 return Flag130
(Id
);
2009 end Is_Generic_Instance
;
2011 function Is_Generic_Type
(Id
: E
) return B
is
2013 pragma Assert
(Nkind
(Id
) in N_Entity
);
2015 end Is_Generic_Type
;
2017 function Is_Hidden
(Id
: E
) return B
is
2022 function Is_Hidden_Open_Scope
(Id
: E
) return B
is
2024 return Flag171
(Id
);
2025 end Is_Hidden_Open_Scope
;
2027 function Is_Immediately_Visible
(Id
: E
) return B
is
2029 pragma Assert
(Nkind
(Id
) in N_Entity
);
2031 end Is_Immediately_Visible
;
2033 function Is_Implementation_Defined
(Id
: E
) return B
is
2035 return Flag254
(Id
);
2036 end Is_Implementation_Defined
;
2038 function Is_Imported
(Id
: E
) return B
is
2043 function Is_Inlined
(Id
: E
) return B
is
2048 function Is_Interface
(Id
: E
) return B
is
2050 return Flag186
(Id
);
2053 function Is_Instantiated
(Id
: E
) return B
is
2055 return Flag126
(Id
);
2056 end Is_Instantiated
;
2058 function Is_Internal
(Id
: E
) return B
is
2060 pragma Assert
(Nkind
(Id
) in N_Entity
);
2064 function Is_Interrupt_Handler
(Id
: E
) return B
is
2066 pragma Assert
(Nkind
(Id
) in N_Entity
);
2068 end Is_Interrupt_Handler
;
2070 function Is_Intrinsic_Subprogram
(Id
: E
) return B
is
2073 end Is_Intrinsic_Subprogram
;
2075 function Is_Itype
(Id
: E
) return B
is
2080 function Is_Known_Non_Null
(Id
: E
) return B
is
2083 end Is_Known_Non_Null
;
2085 function Is_Known_Null
(Id
: E
) return B
is
2087 return Flag204
(Id
);
2090 function Is_Known_Valid
(Id
: E
) return B
is
2092 return Flag170
(Id
);
2095 function Is_Limited_Composite
(Id
: E
) return B
is
2097 return Flag106
(Id
);
2098 end Is_Limited_Composite
;
2100 function Is_Limited_Interface
(Id
: E
) return B
is
2102 return Flag197
(Id
);
2103 end Is_Limited_Interface
;
2105 function Is_Limited_Record
(Id
: E
) return B
is
2108 end Is_Limited_Record
;
2110 function Is_Machine_Code_Subprogram
(Id
: E
) return B
is
2112 pragma Assert
(Is_Subprogram
(Id
));
2113 return Flag137
(Id
);
2114 end Is_Machine_Code_Subprogram
;
2116 function Is_Non_Static_Subtype
(Id
: E
) return B
is
2118 pragma Assert
(Is_Type
(Id
));
2119 return Flag109
(Id
);
2120 end Is_Non_Static_Subtype
;
2122 function Is_Null_Init_Proc
(Id
: E
) return B
is
2124 pragma Assert
(Ekind
(Id
) = E_Procedure
);
2125 return Flag178
(Id
);
2126 end Is_Null_Init_Proc
;
2128 function Is_Obsolescent
(Id
: E
) return B
is
2130 return Flag153
(Id
);
2133 function Is_Only_Out_Parameter
(Id
: E
) return B
is
2135 pragma Assert
(Is_Formal
(Id
));
2136 return Flag226
(Id
);
2137 end Is_Only_Out_Parameter
;
2139 function Is_Optional_Parameter
(Id
: E
) return B
is
2141 pragma Assert
(Is_Formal
(Id
));
2142 return Flag134
(Id
);
2143 end Is_Optional_Parameter
;
2145 function Is_Package_Body_Entity
(Id
: E
) return B
is
2147 return Flag160
(Id
);
2148 end Is_Package_Body_Entity
;
2150 function Is_Packed
(Id
: E
) return B
is
2152 return Flag51
(Implementation_Base_Type
(Id
));
2155 function Is_Packed_Array_Type
(Id
: E
) return B
is
2157 return Flag138
(Id
);
2158 end Is_Packed_Array_Type
;
2160 function Is_Potentially_Use_Visible
(Id
: E
) return B
is
2162 pragma Assert
(Nkind
(Id
) in N_Entity
);
2164 end Is_Potentially_Use_Visible
;
2166 function Is_Preelaborated
(Id
: E
) return B
is
2169 end Is_Preelaborated
;
2171 function Is_Primitive
(Id
: E
) return B
is
2174 (Is_Overloadable
(Id
)
2175 or else Ekind_In
(Id
, E_Generic_Function
, E_Generic_Procedure
));
2176 return Flag218
(Id
);
2179 function Is_Primitive_Wrapper
(Id
: E
) return B
is
2181 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
2182 return Flag195
(Id
);
2183 end Is_Primitive_Wrapper
;
2185 function Is_Private_Composite
(Id
: E
) return B
is
2187 pragma Assert
(Is_Type
(Id
));
2188 return Flag107
(Id
);
2189 end Is_Private_Composite
;
2191 function Is_Private_Descendant
(Id
: E
) return B
is
2194 end Is_Private_Descendant
;
2196 function Is_Private_Primitive
(Id
: E
) return B
is
2198 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
2199 return Flag245
(Id
);
2200 end Is_Private_Primitive
;
2202 function Is_Processed_Transient
(Id
: E
) return B
is
2204 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
2205 return Flag252
(Id
);
2206 end Is_Processed_Transient
;
2208 function Is_Public
(Id
: E
) return B
is
2210 pragma Assert
(Nkind
(Id
) in N_Entity
);
2214 function Is_Pure
(Id
: E
) return B
is
2219 function Is_Pure_Unit_Access_Type
(Id
: E
) return B
is
2221 pragma Assert
(Is_Access_Type
(Id
));
2222 return Flag189
(Id
);
2223 end Is_Pure_Unit_Access_Type
;
2225 function Is_RACW_Stub_Type
(Id
: E
) return B
is
2227 pragma Assert
(Is_Type
(Id
));
2228 return Flag244
(Id
);
2229 end Is_RACW_Stub_Type
;
2231 function Is_Raised
(Id
: E
) return B
is
2233 pragma Assert
(Ekind
(Id
) = E_Exception
);
2234 return Flag224
(Id
);
2237 function Is_Remote_Call_Interface
(Id
: E
) return B
is
2240 end Is_Remote_Call_Interface
;
2242 function Is_Remote_Types
(Id
: E
) return B
is
2245 end Is_Remote_Types
;
2247 function Is_Renaming_Of_Object
(Id
: E
) return B
is
2249 return Flag112
(Id
);
2250 end Is_Renaming_Of_Object
;
2252 function Is_Return_Object
(Id
: E
) return B
is
2254 return Flag209
(Id
);
2255 end Is_Return_Object
;
2257 function Is_Safe_To_Reevaluate
(Id
: E
) return B
is
2259 return Flag249
(Id
);
2260 end Is_Safe_To_Reevaluate
;
2262 function Is_Shared_Passive
(Id
: E
) return B
is
2265 end Is_Shared_Passive
;
2267 function Is_Statically_Allocated
(Id
: E
) return B
is
2270 end Is_Statically_Allocated
;
2272 function Is_Tag
(Id
: E
) return B
is
2274 pragma Assert
(Nkind
(Id
) in N_Entity
);
2278 function Is_Tagged_Type
(Id
: E
) return B
is
2283 function Is_Thunk
(Id
: E
) return B
is
2285 pragma Assert
(Is_Subprogram
(Id
));
2286 return Flag225
(Id
);
2289 function Is_Trivial_Subprogram
(Id
: E
) return B
is
2291 return Flag235
(Id
);
2292 end Is_Trivial_Subprogram
;
2294 function Is_True_Constant
(Id
: E
) return B
is
2296 return Flag163
(Id
);
2297 end Is_True_Constant
;
2299 function Is_Unchecked_Union
(Id
: E
) return B
is
2301 return Flag117
(Implementation_Base_Type
(Id
));
2302 end Is_Unchecked_Union
;
2304 function Is_Underlying_Record_View
(Id
: E
) return B
is
2306 return Flag246
(Id
);
2307 end Is_Underlying_Record_View
;
2309 function Is_Unsigned_Type
(Id
: E
) return B
is
2311 pragma Assert
(Is_Type
(Id
));
2312 return Flag144
(Id
);
2313 end Is_Unsigned_Type
;
2315 function Is_Valued_Procedure
(Id
: E
) return B
is
2317 pragma Assert
(Ekind
(Id
) = E_Procedure
);
2318 return Flag127
(Id
);
2319 end Is_Valued_Procedure
;
2321 function Is_Visible_Formal
(Id
: E
) return B
is
2323 return Flag206
(Id
);
2324 end Is_Visible_Formal
;
2326 function Is_Visible_Lib_Unit
(Id
: E
) return B
is
2328 return Flag116
(Id
);
2329 end Is_Visible_Lib_Unit
;
2331 function Is_VMS_Exception
(Id
: E
) return B
is
2333 return Flag133
(Id
);
2334 end Is_VMS_Exception
;
2336 function Is_Volatile
(Id
: E
) return B
is
2338 pragma Assert
(Nkind
(Id
) in N_Entity
);
2340 if Is_Type
(Id
) then
2341 return Flag16
(Base_Type
(Id
));
2347 function Itype_Printed
(Id
: E
) return B
is
2349 pragma Assert
(Is_Itype
(Id
));
2350 return Flag202
(Id
);
2353 function Kill_Elaboration_Checks
(Id
: E
) return B
is
2356 end Kill_Elaboration_Checks
;
2358 function Kill_Range_Checks
(Id
: E
) return B
is
2361 end Kill_Range_Checks
;
2363 function Known_To_Have_Preelab_Init
(Id
: E
) return B
is
2365 pragma Assert
(Is_Type
(Id
));
2366 return Flag207
(Id
);
2367 end Known_To_Have_Preelab_Init
;
2369 function Last_Assignment
(Id
: E
) return N
is
2371 pragma Assert
(Is_Assignable
(Id
));
2373 end Last_Assignment
;
2375 function Last_Entity
(Id
: E
) return E
is
2380 function Limited_View
(Id
: E
) return E
is
2382 pragma Assert
(Ekind
(Id
) = E_Package
);
2386 function Lit_Indexes
(Id
: E
) return E
is
2388 pragma Assert
(Is_Enumeration_Type
(Id
));
2392 function Lit_Strings
(Id
: E
) return E
is
2394 pragma Assert
(Is_Enumeration_Type
(Id
));
2398 function Loop_Entry_Attributes
(Id
: E
) return L
is
2400 pragma Assert
(Ekind
(Id
) = E_Loop
);
2401 return Elist10
(Id
);
2402 end Loop_Entry_Attributes
;
2404 function Low_Bound_Tested
(Id
: E
) return B
is
2406 return Flag205
(Id
);
2407 end Low_Bound_Tested
;
2409 function Machine_Radix_10
(Id
: E
) return B
is
2411 pragma Assert
(Is_Decimal_Fixed_Point_Type
(Id
));
2413 end Machine_Radix_10
;
2415 function Master_Id
(Id
: E
) return E
is
2417 pragma Assert
(Is_Access_Type
(Id
));
2421 function Materialize_Entity
(Id
: E
) return B
is
2423 return Flag168
(Id
);
2424 end Materialize_Entity
;
2426 function Mechanism
(Id
: E
) return M
is
2428 pragma Assert
(Ekind
(Id
) = E_Function
or else Is_Formal
(Id
));
2429 return UI_To_Int
(Uint8
(Id
));
2432 function Modulus
(Id
: E
) return Uint
is
2434 pragma Assert
(Is_Modular_Integer_Type
(Id
));
2435 return Uint17
(Base_Type
(Id
));
2438 function Must_Be_On_Byte_Boundary
(Id
: E
) return B
is
2440 pragma Assert
(Is_Type
(Id
));
2441 return Flag183
(Id
);
2442 end Must_Be_On_Byte_Boundary
;
2444 function Must_Have_Preelab_Init
(Id
: E
) return B
is
2446 pragma Assert
(Is_Type
(Id
));
2447 return Flag208
(Id
);
2448 end Must_Have_Preelab_Init
;
2450 function Needs_Debug_Info
(Id
: E
) return B
is
2452 return Flag147
(Id
);
2453 end Needs_Debug_Info
;
2455 function Needs_No_Actuals
(Id
: E
) return B
is
2458 (Is_Overloadable
(Id
)
2459 or else Ekind_In
(Id
, E_Subprogram_Type
, E_Entry_Family
));
2461 end Needs_No_Actuals
;
2463 function Never_Set_In_Source
(Id
: E
) return B
is
2465 return Flag115
(Id
);
2466 end Never_Set_In_Source
;
2468 function Next_Inlined_Subprogram
(Id
: E
) return E
is
2471 end Next_Inlined_Subprogram
;
2473 function No_Pool_Assigned
(Id
: E
) return B
is
2475 pragma Assert
(Is_Access_Type
(Id
));
2476 return Flag131
(Root_Type
(Id
));
2477 end No_Pool_Assigned
;
2479 function No_Return
(Id
: E
) return B
is
2481 return Flag113
(Id
);
2484 function No_Strict_Aliasing
(Id
: E
) return B
is
2486 pragma Assert
(Is_Access_Type
(Id
));
2487 return Flag136
(Base_Type
(Id
));
2488 end No_Strict_Aliasing
;
2490 function Non_Binary_Modulus
(Id
: E
) return B
is
2492 pragma Assert
(Is_Type
(Id
));
2493 return Flag58
(Base_Type
(Id
));
2494 end Non_Binary_Modulus
;
2496 function Non_Limited_View
(Id
: E
) return E
is
2498 pragma Assert
(Ekind
(Id
) in Incomplete_Kind
);
2500 end Non_Limited_View
;
2502 function Nonzero_Is_True
(Id
: E
) return B
is
2504 pragma Assert
(Root_Type
(Id
) = Standard_Boolean
);
2505 return Flag162
(Base_Type
(Id
));
2506 end Nonzero_Is_True
;
2508 function Normalized_First_Bit
(Id
: E
) return U
is
2510 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
2512 end Normalized_First_Bit
;
2514 function Normalized_Position
(Id
: E
) return U
is
2516 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
2518 end Normalized_Position
;
2520 function Normalized_Position_Max
(Id
: E
) return U
is
2522 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
2524 end Normalized_Position_Max
;
2526 function OK_To_Rename
(Id
: E
) return B
is
2528 pragma Assert
(Ekind
(Id
) = E_Variable
);
2529 return Flag247
(Id
);
2532 function OK_To_Reorder_Components
(Id
: E
) return B
is
2534 pragma Assert
(Is_Record_Type
(Id
));
2535 return Flag239
(Base_Type
(Id
));
2536 end OK_To_Reorder_Components
;
2538 function Optimize_Alignment_Space
(Id
: E
) return B
is
2541 (Is_Type
(Id
) or else Ekind_In
(Id
, E_Constant
, E_Variable
));
2542 return Flag241
(Id
);
2543 end Optimize_Alignment_Space
;
2545 function Optimize_Alignment_Time
(Id
: E
) return B
is
2548 (Is_Type
(Id
) or else Ekind_In
(Id
, E_Constant
, E_Variable
));
2549 return Flag242
(Id
);
2550 end Optimize_Alignment_Time
;
2552 function Original_Access_Type
(Id
: E
) return E
is
2554 pragma Assert
(Ekind
(Id
) = E_Access_Subprogram_Type
);
2556 end Original_Access_Type
;
2558 function Original_Array_Type
(Id
: E
) return E
is
2560 pragma Assert
(Is_Array_Type
(Id
) or else Is_Modular_Integer_Type
(Id
));
2562 end Original_Array_Type
;
2564 function Original_Record_Component
(Id
: E
) return E
is
2566 pragma Assert
(Ekind_In
(Id
, E_Void
, E_Component
, E_Discriminant
));
2568 end Original_Record_Component
;
2570 function Overlays_Constant
(Id
: E
) return B
is
2572 return Flag243
(Id
);
2573 end Overlays_Constant
;
2575 function Overridden_Operation
(Id
: E
) return E
is
2578 end Overridden_Operation
;
2580 function Package_Instantiation
(Id
: E
) return N
is
2582 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Generic_Package
));
2584 end Package_Instantiation
;
2586 function Packed_Array_Type
(Id
: E
) return E
is
2588 pragma Assert
(Is_Array_Type
(Id
));
2590 end Packed_Array_Type
;
2592 function Parent_Subtype
(Id
: E
) return E
is
2594 pragma Assert
(Is_Record_Type
(Id
));
2595 return Node19
(Base_Type
(Id
));
2598 function Postcondition_Proc
(Id
: E
) return E
is
2600 pragma Assert
(Ekind
(Id
) = E_Procedure
);
2602 end Postcondition_Proc
;
2604 function PPC_Wrapper
(Id
: E
) return E
is
2606 pragma Assert
(Ekind_In
(Id
, E_Entry
, E_Entry_Family
));
2610 function Prival
(Id
: E
) return E
is
2612 pragma Assert
(Is_Protected_Component
(Id
));
2616 function Prival_Link
(Id
: E
) return E
is
2618 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
2622 function Private_Dependents
(Id
: E
) return L
is
2624 pragma Assert
(Is_Incomplete_Or_Private_Type
(Id
));
2625 return Elist18
(Id
);
2626 end Private_Dependents
;
2628 function Private_View
(Id
: E
) return N
is
2630 pragma Assert
(Is_Private_Type
(Id
));
2634 function Protected_Body_Subprogram
(Id
: E
) return E
is
2636 pragma Assert
(Is_Subprogram
(Id
) or else Is_Entry
(Id
));
2638 end Protected_Body_Subprogram
;
2640 function Protected_Formal
(Id
: E
) return E
is
2642 pragma Assert
(Is_Formal
(Id
));
2644 end Protected_Formal
;
2646 function Protection_Object
(Id
: E
) return E
is
2649 (Ekind_In
(Id
, E_Entry
, E_Entry_Family
, E_Function
, E_Procedure
));
2651 end Protection_Object
;
2653 function Reachable
(Id
: E
) return B
is
2658 function Referenced
(Id
: E
) return B
is
2660 return Flag156
(Id
);
2663 function Referenced_As_LHS
(Id
: E
) return B
is
2666 end Referenced_As_LHS
;
2668 function Referenced_As_Out_Parameter
(Id
: E
) return B
is
2670 return Flag227
(Id
);
2671 end Referenced_As_Out_Parameter
;
2673 function Refined_State
(Id
: E
) return E
is
2675 pragma Assert
(Ekind
(Id
) = E_Abstract_State
);
2679 function Register_Exception_Call
(Id
: E
) return N
is
2681 pragma Assert
(Ekind
(Id
) = E_Exception
);
2683 end Register_Exception_Call
;
2685 function Related_Array_Object
(Id
: E
) return E
is
2687 pragma Assert
(Is_Array_Type
(Id
));
2689 end Related_Array_Object
;
2691 function Related_Expression
(Id
: E
) return N
is
2693 pragma Assert
(Ekind
(Id
) in Type_Kind
2694 or else Ekind_In
(Id
, E_Constant
, E_Variable
));
2696 end Related_Expression
;
2698 function Related_Instance
(Id
: E
) return E
is
2700 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Package_Body
));
2702 end Related_Instance
;
2704 function Related_Type
(Id
: E
) return E
is
2706 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Constant
, E_Variable
));
2710 function Relative_Deadline_Variable
(Id
: E
) return E
is
2712 pragma Assert
(Is_Task_Type
(Id
));
2713 return Node26
(Implementation_Base_Type
(Id
));
2714 end Relative_Deadline_Variable
;
2716 function Renamed_Entity
(Id
: E
) return N
is
2721 function Renamed_In_Spec
(Id
: E
) return B
is
2723 pragma Assert
(Ekind
(Id
) = E_Package
);
2724 return Flag231
(Id
);
2725 end Renamed_In_Spec
;
2727 function Renamed_Object
(Id
: E
) return N
is
2732 function Renaming_Map
(Id
: E
) return U
is
2737 function Requires_Overriding
(Id
: E
) return B
is
2739 pragma Assert
(Is_Overloadable
(Id
));
2740 return Flag213
(Id
);
2741 end Requires_Overriding
;
2743 function Return_Present
(Id
: E
) return B
is
2748 function Return_Applies_To
(Id
: E
) return N
is
2751 end Return_Applies_To
;
2753 function Returns_By_Ref
(Id
: E
) return B
is
2758 function Reverse_Bit_Order
(Id
: E
) return B
is
2760 pragma Assert
(Is_Record_Type
(Id
));
2761 return Flag164
(Base_Type
(Id
));
2762 end Reverse_Bit_Order
;
2764 function Reverse_Storage_Order
(Id
: E
) return B
is
2766 pragma Assert
(Is_Record_Type
(Id
) or else Is_Array_Type
(Id
));
2767 return Flag93
(Base_Type
(Id
));
2768 end Reverse_Storage_Order
;
2770 function RM_Size
(Id
: E
) return U
is
2772 pragma Assert
(Is_Type
(Id
));
2776 function Scalar_Range
(Id
: E
) return N
is
2781 function Scale_Value
(Id
: E
) return U
is
2786 function Scope_Depth_Value
(Id
: E
) return U
is
2789 end Scope_Depth_Value
;
2791 function Sec_Stack_Needed_For_Return
(Id
: E
) return B
is
2793 return Flag167
(Id
);
2794 end Sec_Stack_Needed_For_Return
;
2796 function Shadow_Entities
(Id
: E
) return S
is
2798 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Generic_Package
));
2800 end Shadow_Entities
;
2802 function Shared_Var_Procs_Instance
(Id
: E
) return E
is
2804 pragma Assert
(Ekind
(Id
) = E_Variable
);
2806 end Shared_Var_Procs_Instance
;
2808 function Size_Check_Code
(Id
: E
) return N
is
2810 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
2812 end Size_Check_Code
;
2814 function Size_Depends_On_Discriminant
(Id
: E
) return B
is
2816 return Flag177
(Id
);
2817 end Size_Depends_On_Discriminant
;
2819 function Size_Known_At_Compile_Time
(Id
: E
) return B
is
2822 end Size_Known_At_Compile_Time
;
2824 function Small_Value
(Id
: E
) return R
is
2826 pragma Assert
(Is_Fixed_Point_Type
(Id
));
2827 return Ureal21
(Id
);
2830 function Spec_Entity
(Id
: E
) return E
is
2832 pragma Assert
(Ekind
(Id
) = E_Package_Body
or else Is_Formal
(Id
));
2836 function Static_Predicate
(Id
: E
) return S
is
2838 pragma Assert
(Is_Discrete_Type
(Id
));
2840 end Static_Predicate
;
2842 function Status_Flag_Or_Transient_Decl
(Id
: E
) return N
is
2844 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
2846 end Status_Flag_Or_Transient_Decl
;
2848 function Storage_Size_Variable
(Id
: E
) return E
is
2850 pragma Assert
(Is_Access_Type
(Id
) or else Is_Task_Type
(Id
));
2851 return Node15
(Implementation_Base_Type
(Id
));
2852 end Storage_Size_Variable
;
2854 function Static_Elaboration_Desired
(Id
: E
) return B
is
2856 pragma Assert
(Ekind
(Id
) = E_Package
);
2858 end Static_Elaboration_Desired
;
2860 function Static_Initialization
(Id
: E
) return N
is
2863 (Ekind
(Id
) = E_Procedure
and then not Is_Dispatching_Operation
(Id
));
2865 end Static_Initialization
;
2867 function Stored_Constraint
(Id
: E
) return L
is
2870 (Is_Composite_Type
(Id
) and then not Is_Array_Type
(Id
));
2871 return Elist23
(Id
);
2872 end Stored_Constraint
;
2874 function Strict_Alignment
(Id
: E
) return B
is
2876 return Flag145
(Implementation_Base_Type
(Id
));
2877 end Strict_Alignment
;
2879 function String_Literal_Length
(Id
: E
) return U
is
2882 end String_Literal_Length
;
2884 function String_Literal_Low_Bound
(Id
: E
) return N
is
2887 end String_Literal_Low_Bound
;
2889 function Subprograms_For_Type
(Id
: E
) return E
is
2891 pragma Assert
(Is_Type
(Id
) or else Is_Subprogram
(Id
));
2893 end Subprograms_For_Type
;
2895 function Suppress_Elaboration_Warnings
(Id
: E
) return B
is
2897 return Flag148
(Id
);
2898 end Suppress_Elaboration_Warnings
;
2900 function Suppress_Initialization
(Id
: E
) return B
is
2902 pragma Assert
(Is_Type
(Id
));
2903 return Flag105
(Id
);
2904 end Suppress_Initialization
;
2906 function Suppress_Style_Checks
(Id
: E
) return B
is
2908 return Flag165
(Id
);
2909 end Suppress_Style_Checks
;
2911 function Suppress_Value_Tracking_On_Call
(Id
: E
) return B
is
2913 return Flag217
(Id
);
2914 end Suppress_Value_Tracking_On_Call
;
2916 function Task_Body_Procedure
(Id
: E
) return N
is
2918 pragma Assert
(Ekind
(Id
) in Task_Kind
);
2920 end Task_Body_Procedure
;
2922 function Treat_As_Volatile
(Id
: E
) return B
is
2925 end Treat_As_Volatile
;
2927 function Underlying_Full_View
(Id
: E
) return E
is
2929 pragma Assert
(Ekind
(Id
) in Private_Kind
);
2931 end Underlying_Full_View
;
2933 function Underlying_Record_View
(Id
: E
) return E
is
2936 end Underlying_Record_View
;
2938 function Universal_Aliasing
(Id
: E
) return B
is
2940 pragma Assert
(Is_Type
(Id
));
2941 return Flag216
(Implementation_Base_Type
(Id
));
2942 end Universal_Aliasing
;
2944 function Unset_Reference
(Id
: E
) return N
is
2947 end Unset_Reference
;
2949 function Used_As_Generic_Actual
(Id
: E
) return B
is
2951 return Flag222
(Id
);
2952 end Used_As_Generic_Actual
;
2954 function Uses_Lock_Free
(Id
: E
) return B
is
2956 pragma Assert
(Is_Protected_Type
(Id
));
2957 return Flag188
(Id
);
2960 function Uses_Sec_Stack
(Id
: E
) return B
is
2965 function Warnings_Off
(Id
: E
) return B
is
2970 function Warnings_Off_Used
(Id
: E
) return B
is
2972 return Flag236
(Id
);
2973 end Warnings_Off_Used
;
2975 function Warnings_Off_Used_Unmodified
(Id
: E
) return B
is
2977 return Flag237
(Id
);
2978 end Warnings_Off_Used_Unmodified
;
2980 function Warnings_Off_Used_Unreferenced
(Id
: E
) return B
is
2982 return Flag238
(Id
);
2983 end Warnings_Off_Used_Unreferenced
;
2985 function Wrapped_Entity
(Id
: E
) return E
is
2987 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
)
2988 and then Is_Primitive_Wrapper
(Id
));
2992 function Was_Hidden
(Id
: E
) return B
is
2994 return Flag196
(Id
);
2997 ------------------------------
2998 -- Classification Functions --
2999 ------------------------------
3001 function Is_Access_Type
(Id
: E
) return B
is
3003 return Ekind
(Id
) in Access_Kind
;
3006 function Is_Access_Protected_Subprogram_Type
(Id
: E
) return B
is
3008 return Ekind
(Id
) in Access_Protected_Kind
;
3009 end Is_Access_Protected_Subprogram_Type
;
3011 function Is_Access_Subprogram_Type
(Id
: E
) return B
is
3013 return Ekind
(Id
) in Access_Subprogram_Kind
;
3014 end Is_Access_Subprogram_Type
;
3016 function Is_Aggregate_Type
(Id
: E
) return B
is
3018 return Ekind
(Id
) in Aggregate_Kind
;
3019 end Is_Aggregate_Type
;
3021 function Is_Array_Type
(Id
: E
) return B
is
3023 return Ekind
(Id
) in Array_Kind
;
3026 function Is_Assignable
(Id
: E
) return B
is
3028 return Ekind
(Id
) in Assignable_Kind
;
3031 function Is_Class_Wide_Type
(Id
: E
) return B
is
3033 return Ekind
(Id
) in Class_Wide_Kind
;
3034 end Is_Class_Wide_Type
;
3036 function Is_Composite_Type
(Id
: E
) return B
is
3038 return Ekind
(Id
) in Composite_Kind
;
3039 end Is_Composite_Type
;
3041 function Is_Concurrent_Body
(Id
: E
) return B
is
3043 return Ekind
(Id
) in
3044 Concurrent_Body_Kind
;
3045 end Is_Concurrent_Body
;
3047 function Is_Concurrent_Record_Type
(Id
: E
) return B
is
3050 end Is_Concurrent_Record_Type
;
3052 function Is_Concurrent_Type
(Id
: E
) return B
is
3054 return Ekind
(Id
) in Concurrent_Kind
;
3055 end Is_Concurrent_Type
;
3057 function Is_Decimal_Fixed_Point_Type
(Id
: E
) return B
is
3059 return Ekind
(Id
) in
3060 Decimal_Fixed_Point_Kind
;
3061 end Is_Decimal_Fixed_Point_Type
;
3063 function Is_Digits_Type
(Id
: E
) return B
is
3065 return Ekind
(Id
) in Digits_Kind
;
3068 function Is_Discrete_Or_Fixed_Point_Type
(Id
: E
) return B
is
3070 return Ekind
(Id
) in Discrete_Or_Fixed_Point_Kind
;
3071 end Is_Discrete_Or_Fixed_Point_Type
;
3073 function Is_Discrete_Type
(Id
: E
) return B
is
3075 return Ekind
(Id
) in Discrete_Kind
;
3076 end Is_Discrete_Type
;
3078 function Is_Elementary_Type
(Id
: E
) return B
is
3080 return Ekind
(Id
) in Elementary_Kind
;
3081 end Is_Elementary_Type
;
3083 function Is_Entry
(Id
: E
) return B
is
3085 return Ekind
(Id
) in Entry_Kind
;
3088 function Is_Enumeration_Type
(Id
: E
) return B
is
3090 return Ekind
(Id
) in
3092 end Is_Enumeration_Type
;
3094 function Is_Fixed_Point_Type
(Id
: E
) return B
is
3096 return Ekind
(Id
) in
3098 end Is_Fixed_Point_Type
;
3100 function Is_Floating_Point_Type
(Id
: E
) return B
is
3102 return Ekind
(Id
) in Float_Kind
;
3103 end Is_Floating_Point_Type
;
3105 function Is_Formal
(Id
: E
) return B
is
3107 return Ekind
(Id
) in Formal_Kind
;
3110 function Is_Formal_Object
(Id
: E
) return B
is
3112 return Ekind
(Id
) in Formal_Object_Kind
;
3113 end Is_Formal_Object
;
3115 function Is_Generic_Subprogram
(Id
: E
) return B
is
3117 return Ekind
(Id
) in Generic_Subprogram_Kind
;
3118 end Is_Generic_Subprogram
;
3120 function Is_Generic_Unit
(Id
: E
) return B
is
3122 return Ekind
(Id
) in Generic_Unit_Kind
;
3123 end Is_Generic_Unit
;
3125 function Is_Incomplete_Or_Private_Type
(Id
: E
) return B
is
3127 return Ekind
(Id
) in
3128 Incomplete_Or_Private_Kind
;
3129 end Is_Incomplete_Or_Private_Type
;
3131 function Is_Incomplete_Type
(Id
: E
) return B
is
3133 return Ekind
(Id
) in
3135 end Is_Incomplete_Type
;
3137 function Is_Integer_Type
(Id
: E
) return B
is
3139 return Ekind
(Id
) in Integer_Kind
;
3140 end Is_Integer_Type
;
3142 function Is_Modular_Integer_Type
(Id
: E
) return B
is
3144 return Ekind
(Id
) in
3145 Modular_Integer_Kind
;
3146 end Is_Modular_Integer_Type
;
3148 function Is_Named_Number
(Id
: E
) return B
is
3150 return Ekind
(Id
) in Named_Kind
;
3151 end Is_Named_Number
;
3153 function Is_Numeric_Type
(Id
: E
) return B
is
3155 return Ekind
(Id
) in Numeric_Kind
;
3156 end Is_Numeric_Type
;
3158 function Is_Object
(Id
: E
) return B
is
3160 return Ekind
(Id
) in Object_Kind
;
3163 function Is_Ordinary_Fixed_Point_Type
(Id
: E
) return B
is
3165 return Ekind
(Id
) in
3166 Ordinary_Fixed_Point_Kind
;
3167 end Is_Ordinary_Fixed_Point_Type
;
3169 function Is_Overloadable
(Id
: E
) return B
is
3171 return Ekind
(Id
) in Overloadable_Kind
;
3172 end Is_Overloadable
;
3174 function Is_Private_Type
(Id
: E
) return B
is
3176 return Ekind
(Id
) in Private_Kind
;
3177 end Is_Private_Type
;
3179 function Is_Protected_Type
(Id
: E
) return B
is
3181 return Ekind
(Id
) in Protected_Kind
;
3182 end Is_Protected_Type
;
3184 function Is_Real_Type
(Id
: E
) return B
is
3186 return Ekind
(Id
) in Real_Kind
;
3189 function Is_Record_Type
(Id
: E
) return B
is
3191 return Ekind
(Id
) in Record_Kind
;
3194 function Is_Scalar_Type
(Id
: E
) return B
is
3196 return Ekind
(Id
) in Scalar_Kind
;
3199 function Is_Signed_Integer_Type
(Id
: E
) return B
is
3201 return Ekind
(Id
) in Signed_Integer_Kind
;
3202 end Is_Signed_Integer_Type
;
3204 function Is_Subprogram
(Id
: E
) return B
is
3206 return Ekind
(Id
) in Subprogram_Kind
;
3209 function Is_Task_Type
(Id
: E
) return B
is
3211 return Ekind
(Id
) in Task_Kind
;
3214 function Is_Type
(Id
: E
) return B
is
3216 return Ekind
(Id
) in Type_Kind
;
3219 ------------------------------
3220 -- Attribute Set Procedures --
3221 ------------------------------
3223 -- Note: in many of these set procedures an "obvious" assertion is missing.
3224 -- The reason for this is that in many cases, a field is set before the
3225 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3226 -- it is possible to add assertions that specifically include the E_Void
3227 -- possibility, but in some cases, we just omit the assertions.
3229 procedure Set_Abstract_States
(Id
: E
; V
: L
) is
3231 pragma Assert
(Ekind
(Id
) = E_Package
);
3232 Set_Elist25
(Id
, V
);
3233 end Set_Abstract_States
;
3235 procedure Set_Accept_Address
(Id
: E
; V
: L
) is
3237 Set_Elist21
(Id
, V
);
3238 end Set_Accept_Address
;
3240 procedure Set_Access_Disp_Table
(Id
: E
; V
: L
) is
3242 pragma Assert
(Ekind
(Id
) = E_Record_Type
3243 and then Id
= Implementation_Base_Type
(Id
));
3244 pragma Assert
(V
= No_Elist
or else Is_Tagged_Type
(Id
));
3245 Set_Elist16
(Id
, V
);
3246 end Set_Access_Disp_Table
;
3248 procedure Set_Associated_Formal_Package
(Id
: E
; V
: E
) is
3251 end Set_Associated_Formal_Package
;
3253 procedure Set_Associated_Node_For_Itype
(Id
: E
; V
: E
) is
3256 end Set_Associated_Node_For_Itype
;
3258 procedure Set_Associated_Storage_Pool
(Id
: E
; V
: E
) is
3260 pragma Assert
(Is_Access_Type
(Id
) and then Is_Base_Type
(Id
));
3262 end Set_Associated_Storage_Pool
;
3264 procedure Set_Actual_Subtype
(Id
: E
; V
: E
) is
3267 (Ekind_In
(Id
, E_Constant
, E_Variable
, E_Generic_In_Out_Parameter
)
3268 or else Is_Formal
(Id
));
3270 end Set_Actual_Subtype
;
3272 procedure Set_Address_Taken
(Id
: E
; V
: B
:= True) is
3274 Set_Flag104
(Id
, V
);
3275 end Set_Address_Taken
;
3277 procedure Set_Alias
(Id
: E
; V
: E
) is
3280 (Is_Overloadable
(Id
) or else Ekind
(Id
) = E_Subprogram_Type
);
3284 procedure Set_Alignment
(Id
: E
; V
: U
) is
3286 pragma Assert
(Is_Type
(Id
)
3287 or else Is_Formal
(Id
)
3288 or else Ekind_In
(Id
, E_Loop_Parameter
,
3295 procedure Set_Barrier_Function
(Id
: E
; V
: N
) is
3297 pragma Assert
(Is_Entry
(Id
));
3299 end Set_Barrier_Function
;
3301 procedure Set_Block_Node
(Id
: E
; V
: N
) is
3303 pragma Assert
(Ekind
(Id
) = E_Block
);
3307 procedure Set_Body_Entity
(Id
: E
; V
: E
) is
3309 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Generic_Package
));
3311 end Set_Body_Entity
;
3313 procedure Set_Body_Needed_For_SAL
(Id
: E
; V
: B
:= True) is
3316 (Ekind
(Id
) = E_Package
3317 or else Is_Subprogram
(Id
)
3318 or else Is_Generic_Unit
(Id
));
3320 end Set_Body_Needed_For_SAL
;
3322 procedure Set_C_Pass_By_Copy
(Id
: E
; V
: B
:= True) is
3324 pragma Assert
(Is_Record_Type
(Id
) and then Is_Base_Type
(Id
));
3325 Set_Flag125
(Id
, V
);
3326 end Set_C_Pass_By_Copy
;
3328 procedure Set_Can_Never_Be_Null
(Id
: E
; V
: B
:= True) is
3331 end Set_Can_Never_Be_Null
;
3333 procedure Set_Checks_May_Be_Suppressed
(Id
: E
; V
: B
:= True) is
3336 end Set_Checks_May_Be_Suppressed
;
3338 procedure Set_Class_Wide_Type
(Id
: E
; V
: E
) is
3340 pragma Assert
(Is_Type
(Id
));
3342 end Set_Class_Wide_Type
;
3344 procedure Set_Cloned_Subtype
(Id
: E
; V
: E
) is
3346 pragma Assert
(Ekind_In
(Id
, E_Record_Subtype
, E_Class_Wide_Subtype
));
3348 end Set_Cloned_Subtype
;
3350 procedure Set_Component_Bit_Offset
(Id
: E
; V
: U
) is
3352 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
3354 end Set_Component_Bit_Offset
;
3356 procedure Set_Component_Clause
(Id
: E
; V
: N
) is
3358 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
3360 end Set_Component_Clause
;
3362 procedure Set_Component_Size
(Id
: E
; V
: U
) is
3364 pragma Assert
(Is_Array_Type
(Id
) and then Is_Base_Type
(Id
));
3366 end Set_Component_Size
;
3368 procedure Set_Component_Type
(Id
: E
; V
: E
) is
3370 pragma Assert
(Is_Array_Type
(Id
) and then Is_Base_Type
(Id
));
3372 end Set_Component_Type
;
3374 procedure Set_Corresponding_Concurrent_Type
(Id
: E
; V
: E
) is
3377 (Ekind
(Id
) = E_Record_Type
and then Is_Concurrent_Type
(V
));
3379 end Set_Corresponding_Concurrent_Type
;
3381 procedure Set_Corresponding_Discriminant
(Id
: E
; V
: E
) is
3383 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
3385 end Set_Corresponding_Discriminant
;
3387 procedure Set_Corresponding_Equality
(Id
: E
; V
: E
) is
3390 (Ekind
(Id
) = E_Function
3391 and then not Comes_From_Source
(Id
)
3392 and then Chars
(Id
) = Name_Op_Ne
);
3394 end Set_Corresponding_Equality
;
3396 procedure Set_Corresponding_Protected_Entry
(Id
: E
; V
: E
) is
3398 pragma Assert
(Ekind_In
(Id
, E_Void
, E_Subprogram_Body
));
3400 end Set_Corresponding_Protected_Entry
;
3402 procedure Set_Corresponding_Record_Type
(Id
: E
; V
: E
) is
3404 pragma Assert
(Is_Concurrent_Type
(Id
));
3406 end Set_Corresponding_Record_Type
;
3408 procedure Set_Corresponding_Remote_Type
(Id
: E
; V
: E
) is
3411 end Set_Corresponding_Remote_Type
;
3413 procedure Set_Current_Use_Clause
(Id
: E
; V
: E
) is
3415 pragma Assert
(Ekind
(Id
) = E_Package
or else Is_Type
(Id
));
3417 end Set_Current_Use_Clause
;
3419 procedure Set_Current_Value
(Id
: E
; V
: N
) is
3421 pragma Assert
(Ekind
(Id
) in Object_Kind
or else Ekind
(Id
) = E_Void
);
3423 end Set_Current_Value
;
3425 procedure Set_CR_Discriminant
(Id
: E
; V
: E
) is
3428 end Set_CR_Discriminant
;
3430 procedure Set_Debug_Info_Off
(Id
: E
; V
: B
:= True) is
3432 Set_Flag166
(Id
, V
);
3433 end Set_Debug_Info_Off
;
3435 procedure Set_Debug_Renaming_Link
(Id
: E
; V
: E
) is
3438 end Set_Debug_Renaming_Link
;
3440 procedure Set_Default_Aspect_Component_Value
(Id
: E
; V
: E
) is
3442 pragma Assert
(Is_Array_Type
(Id
));
3444 end Set_Default_Aspect_Component_Value
;
3446 procedure Set_Default_Aspect_Value
(Id
: E
; V
: E
) is
3448 pragma Assert
(Is_Scalar_Type
(Id
));
3450 end Set_Default_Aspect_Value
;
3452 procedure Set_Default_Expr_Function
(Id
: E
; V
: E
) is
3454 pragma Assert
(Is_Formal
(Id
));
3456 end Set_Default_Expr_Function
;
3458 procedure Set_Default_Expressions_Processed
(Id
: E
; V
: B
:= True) is
3460 Set_Flag108
(Id
, V
);
3461 end Set_Default_Expressions_Processed
;
3463 procedure Set_Default_Value
(Id
: E
; V
: N
) is
3465 pragma Assert
(Is_Formal
(Id
));
3467 end Set_Default_Value
;
3469 procedure Set_Delay_Cleanups
(Id
: E
; V
: B
:= True) is
3473 or else Is_Task_Type
(Id
)
3474 or else Ekind
(Id
) = E_Block
);
3475 Set_Flag114
(Id
, V
);
3476 end Set_Delay_Cleanups
;
3478 procedure Set_Delay_Subprogram_Descriptors
(Id
: E
; V
: B
:= True) is
3481 (Is_Subprogram
(Id
) or else Ekind_In
(Id
, E_Package
, E_Package_Body
));
3484 end Set_Delay_Subprogram_Descriptors
;
3486 procedure Set_Delta_Value
(Id
: E
; V
: R
) is
3488 pragma Assert
(Is_Fixed_Point_Type
(Id
));
3489 Set_Ureal18
(Id
, V
);
3490 end Set_Delta_Value
;
3492 procedure Set_Dependent_Instances
(Id
: E
; V
: L
) is
3494 pragma Assert
(Is_Generic_Instance
(Id
));
3496 end Set_Dependent_Instances
;
3498 procedure Set_Depends_On_Private
(Id
: E
; V
: B
:= True) is
3500 pragma Assert
(Nkind
(Id
) in N_Entity
);
3502 end Set_Depends_On_Private
;
3504 procedure Set_Digits_Value
(Id
: E
; V
: U
) is
3507 (Is_Floating_Point_Type
(Id
)
3508 or else Is_Decimal_Fixed_Point_Type
(Id
));
3510 end Set_Digits_Value
;
3512 procedure Set_Directly_Designated_Type
(Id
: E
; V
: E
) is
3515 end Set_Directly_Designated_Type
;
3517 procedure Set_Discard_Names
(Id
: E
; V
: B
:= True) is
3520 end Set_Discard_Names
;
3522 procedure Set_Discriminal
(Id
: E
; V
: E
) is
3524 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
3526 end Set_Discriminal
;
3528 procedure Set_Discriminal_Link
(Id
: E
; V
: E
) is
3531 end Set_Discriminal_Link
;
3533 procedure Set_Discriminant_Checking_Func
(Id
: E
; V
: E
) is
3535 pragma Assert
(Ekind
(Id
) = E_Component
);
3537 end Set_Discriminant_Checking_Func
;
3539 procedure Set_Discriminant_Constraint
(Id
: E
; V
: L
) is
3541 pragma Assert
(Nkind
(Id
) in N_Entity
);
3542 Set_Elist21
(Id
, V
);
3543 end Set_Discriminant_Constraint
;
3545 procedure Set_Discriminant_Default_Value
(Id
: E
; V
: N
) is
3548 end Set_Discriminant_Default_Value
;
3550 procedure Set_Discriminant_Number
(Id
: E
; V
: U
) is
3553 end Set_Discriminant_Number
;
3555 procedure Set_Dispatch_Table_Wrappers
(Id
: E
; V
: L
) is
3557 pragma Assert
(Ekind
(Id
) = E_Record_Type
3558 and then Id
= Implementation_Base_Type
(Id
));
3559 pragma Assert
(V
= No_Elist
or else Is_Tagged_Type
(Id
));
3560 Set_Elist26
(Id
, V
);
3561 end Set_Dispatch_Table_Wrappers
;
3563 procedure Set_DT_Entry_Count
(Id
: E
; V
: U
) is
3565 pragma Assert
(Ekind
(Id
) = E_Component
);
3567 end Set_DT_Entry_Count
;
3569 procedure Set_DT_Offset_To_Top_Func
(Id
: E
; V
: E
) is
3571 pragma Assert
(Ekind
(Id
) = E_Component
and then Is_Tag
(Id
));
3573 end Set_DT_Offset_To_Top_Func
;
3575 procedure Set_DT_Position
(Id
: E
; V
: U
) is
3577 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
3579 end Set_DT_Position
;
3581 procedure Set_DTC_Entity
(Id
: E
; V
: E
) is
3583 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
3587 procedure Set_Elaborate_Body_Desirable
(Id
: E
; V
: B
:= True) is
3589 pragma Assert
(Ekind
(Id
) = E_Package
);
3590 Set_Flag210
(Id
, V
);
3591 end Set_Elaborate_Body_Desirable
;
3593 procedure Set_Elaboration_Entity
(Id
: E
; V
: E
) is
3598 Ekind
(Id
) = E_Package
3600 Is_Generic_Unit
(Id
));
3602 end Set_Elaboration_Entity
;
3604 procedure Set_Elaboration_Entity_Required
(Id
: E
; V
: B
:= True) is
3609 Ekind
(Id
) = E_Package
3611 Is_Generic_Unit
(Id
));
3612 Set_Flag174
(Id
, V
);
3613 end Set_Elaboration_Entity_Required
;
3615 procedure Set_Enclosing_Scope
(Id
: E
; V
: E
) is
3618 end Set_Enclosing_Scope
;
3620 procedure Set_Entry_Accepted
(Id
: E
; V
: B
:= True) is
3622 pragma Assert
(Is_Entry
(Id
));
3623 Set_Flag152
(Id
, V
);
3624 end Set_Entry_Accepted
;
3626 procedure Set_Entry_Bodies_Array
(Id
: E
; V
: E
) is
3629 end Set_Entry_Bodies_Array
;
3631 procedure Set_Entry_Cancel_Parameter
(Id
: E
; V
: E
) is
3634 end Set_Entry_Cancel_Parameter
;
3636 procedure Set_Entry_Component
(Id
: E
; V
: E
) is
3639 end Set_Entry_Component
;
3641 procedure Set_Entry_Formal
(Id
: E
; V
: E
) is
3644 end Set_Entry_Formal
;
3646 procedure Set_Entry_Index_Constant
(Id
: E
; V
: E
) is
3648 pragma Assert
(Ekind
(Id
) = E_Entry_Index_Parameter
);
3650 end Set_Entry_Index_Constant
;
3652 procedure Set_Contract
(Id
: E
; V
: N
) is
3655 (Ekind_In
(Id
, E_Entry
, E_Entry_Family
, E_Void
)
3656 or else Is_Subprogram
(Id
)
3657 or else Is_Generic_Subprogram
(Id
));
3661 procedure Set_Entry_Parameters_Type
(Id
: E
; V
: E
) is
3664 end Set_Entry_Parameters_Type
;
3666 procedure Set_Enum_Pos_To_Rep
(Id
: E
; V
: E
) is
3668 pragma Assert
(Ekind
(Id
) = E_Enumeration_Type
);
3670 end Set_Enum_Pos_To_Rep
;
3672 procedure Set_Enumeration_Pos
(Id
: E
; V
: U
) is
3674 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
3676 end Set_Enumeration_Pos
;
3678 procedure Set_Enumeration_Rep
(Id
: E
; V
: U
) is
3680 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
3682 end Set_Enumeration_Rep
;
3684 procedure Set_Enumeration_Rep_Expr
(Id
: E
; V
: N
) is
3686 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
3688 end Set_Enumeration_Rep_Expr
;
3690 procedure Set_Equivalent_Type
(Id
: E
; V
: E
) is
3693 (Ekind_In
(Id
, E_Class_Wide_Type
,
3694 E_Class_Wide_Subtype
,
3695 E_Access_Protected_Subprogram_Type
,
3696 E_Anonymous_Access_Protected_Subprogram_Type
,
3697 E_Access_Subprogram_Type
,
3700 end Set_Equivalent_Type
;
3702 procedure Set_Esize
(Id
: E
; V
: U
) is
3707 procedure Set_Exception_Code
(Id
: E
; V
: U
) is
3709 pragma Assert
(Ekind
(Id
) = E_Exception
);
3711 end Set_Exception_Code
;
3713 procedure Set_Extra_Accessibility
(Id
: E
; V
: E
) is
3716 (Is_Formal
(Id
) or else Ekind_In
(Id
, E_Variable
, E_Constant
));
3718 end Set_Extra_Accessibility
;
3720 procedure Set_Extra_Accessibility_Of_Result
(Id
: E
; V
: E
) is
3722 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Operator
, E_Subprogram_Type
));
3724 end Set_Extra_Accessibility_Of_Result
;
3726 procedure Set_Extra_Constrained
(Id
: E
; V
: E
) is
3728 pragma Assert
(Is_Formal
(Id
) or else Ekind
(Id
) = E_Variable
);
3730 end Set_Extra_Constrained
;
3732 procedure Set_Extra_Formal
(Id
: E
; V
: E
) is
3735 end Set_Extra_Formal
;
3737 procedure Set_Extra_Formals
(Id
: E
; V
: E
) is
3740 (Is_Overloadable
(Id
)
3741 or else Ekind_In
(Id
, E_Entry_Family
,
3743 E_Subprogram_Type
));
3745 end Set_Extra_Formals
;
3747 procedure Set_Can_Use_Internal_Rep
(Id
: E
; V
: B
:= True) is
3750 (Is_Access_Subprogram_Type
(Id
) and then Is_Base_Type
(Id
));
3751 Set_Flag229
(Id
, V
);
3752 end Set_Can_Use_Internal_Rep
;
3754 procedure Set_Finalization_Master
(Id
: E
; V
: E
) is
3756 pragma Assert
(Is_Access_Type
(Id
) and then Is_Base_Type
(Id
));
3758 end Set_Finalization_Master
;
3760 procedure Set_Finalize_Storage_Only
(Id
: E
; V
: B
:= True) is
3762 pragma Assert
(Is_Type
(Id
) and then Is_Base_Type
(Id
));
3763 Set_Flag158
(Id
, V
);
3764 end Set_Finalize_Storage_Only
;
3766 procedure Set_Finalizer
(Id
: E
; V
: E
) is
3769 (Ekind
(Id
) = E_Package
3770 or else Ekind
(Id
) = E_Package_Body
);
3774 procedure Set_First_Entity
(Id
: E
; V
: E
) is
3777 end Set_First_Entity
;
3779 procedure Set_First_Exit_Statement
(Id
: E
; V
: N
) is
3781 pragma Assert
(Ekind
(Id
) = E_Loop
);
3783 end Set_First_Exit_Statement
;
3785 procedure Set_First_Index
(Id
: E
; V
: N
) is
3787 pragma Assert
(Is_Array_Type
(Id
) or else Is_String_Type
(Id
));
3789 end Set_First_Index
;
3791 procedure Set_First_Literal
(Id
: E
; V
: E
) is
3793 pragma Assert
(Is_Enumeration_Type
(Id
));
3795 end Set_First_Literal
;
3797 procedure Set_First_Optional_Parameter
(Id
: E
; V
: E
) is
3799 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
3801 end Set_First_Optional_Parameter
;
3803 procedure Set_First_Private_Entity
(Id
: E
; V
: E
) is
3805 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Generic_Package
)
3806 or else Ekind
(Id
) in Concurrent_Kind
);
3808 end Set_First_Private_Entity
;
3810 procedure Set_First_Rep_Item
(Id
: E
; V
: N
) is
3813 end Set_First_Rep_Item
;
3815 procedure Set_Float_Rep
(Id
: E
; V
: F
) is
3816 pragma Assert
(Ekind
(Id
) = E_Floating_Point_Type
);
3818 Set_Uint10
(Id
, UI_From_Int
(F
'Pos (V
)));
3821 procedure Set_Freeze_Node
(Id
: E
; V
: N
) is
3824 end Set_Freeze_Node
;
3826 procedure Set_From_With_Type
(Id
: E
; V
: B
:= True) is
3830 or else Ekind
(Id
) = E_Package
);
3831 Set_Flag159
(Id
, V
);
3832 end Set_From_With_Type
;
3834 procedure Set_Full_View
(Id
: E
; V
: E
) is
3836 pragma Assert
(Is_Type
(Id
) or else Ekind
(Id
) = E_Constant
);
3840 procedure Set_Generic_Homonym
(Id
: E
; V
: E
) is
3843 end Set_Generic_Homonym
;
3845 procedure Set_Generic_Renamings
(Id
: E
; V
: L
) is
3847 Set_Elist23
(Id
, V
);
3848 end Set_Generic_Renamings
;
3850 procedure Set_Handler_Records
(Id
: E
; V
: S
) is
3853 end Set_Handler_Records
;
3855 procedure Set_Has_Aliased_Components
(Id
: E
; V
: B
:= True) is
3857 pragma Assert
(Id
= Base_Type
(Id
));
3858 Set_Flag135
(Id
, V
);
3859 end Set_Has_Aliased_Components
;
3861 procedure Set_Has_Alignment_Clause
(Id
: E
; V
: B
:= True) is
3864 end Set_Has_Alignment_Clause
;
3866 procedure Set_Has_All_Calls_Remote
(Id
: E
; V
: B
:= True) is
3869 end Set_Has_All_Calls_Remote
;
3871 procedure Set_Has_Anonymous_Master
(Id
: E
; V
: B
:= True) is
3874 (Ekind_In
(Id
, E_Function
, E_Package
, E_Package_Body
, E_Procedure
));
3875 Set_Flag253
(Id
, V
);
3876 end Set_Has_Anonymous_Master
;
3878 procedure Set_Has_Atomic_Components
(Id
: E
; V
: B
:= True) is
3880 pragma Assert
(not Is_Type
(Id
) or else Is_Base_Type
(Id
));
3882 end Set_Has_Atomic_Components
;
3884 procedure Set_Has_Biased_Representation
(Id
: E
; V
: B
:= True) is
3887 ((V
= False) or else (Is_Discrete_Type
(Id
) or else Is_Object
(Id
)));
3888 Set_Flag139
(Id
, V
);
3889 end Set_Has_Biased_Representation
;
3891 procedure Set_Has_Completion
(Id
: E
; V
: B
:= True) is
3894 end Set_Has_Completion
;
3896 procedure Set_Has_Completion_In_Body
(Id
: E
; V
: B
:= True) is
3898 pragma Assert
(Is_Type
(Id
));
3900 end Set_Has_Completion_In_Body
;
3902 procedure Set_Has_Complex_Representation
(Id
: E
; V
: B
:= True) is
3904 pragma Assert
(Ekind
(Id
) = E_Record_Type
);
3905 Set_Flag140
(Id
, V
);
3906 end Set_Has_Complex_Representation
;
3908 procedure Set_Has_Component_Size_Clause
(Id
: E
; V
: B
:= True) is
3910 pragma Assert
(Ekind
(Id
) = E_Array_Type
);
3912 end Set_Has_Component_Size_Clause
;
3914 procedure Set_Has_Constrained_Partial_View
(Id
: E
; V
: B
:= True) is
3916 pragma Assert
(Is_Type
(Id
));
3917 Set_Flag187
(Id
, V
);
3918 end Set_Has_Constrained_Partial_View
;
3920 procedure Set_Has_Contiguous_Rep
(Id
: E
; V
: B
:= True) is
3922 Set_Flag181
(Id
, V
);
3923 end Set_Has_Contiguous_Rep
;
3925 procedure Set_Has_Controlled_Component
(Id
: E
; V
: B
:= True) is
3927 pragma Assert
(Id
= Base_Type
(Id
));
3929 end Set_Has_Controlled_Component
;
3931 procedure Set_Has_Controlling_Result
(Id
: E
; V
: B
:= True) is
3934 end Set_Has_Controlling_Result
;
3936 procedure Set_Has_Convention_Pragma
(Id
: E
; V
: B
:= True) is
3938 Set_Flag119
(Id
, V
);
3939 end Set_Has_Convention_Pragma
;
3941 procedure Set_Has_Default_Aspect
(Id
: E
; V
: B
:= True) is
3944 ((Is_Scalar_Type
(Id
) or else Is_Array_Type
(Id
))
3945 and then Is_Base_Type
(Id
));
3947 end Set_Has_Default_Aspect
;
3949 procedure Set_Has_Delayed_Aspects
(Id
: E
; V
: B
:= True) is
3951 pragma Assert
(Nkind
(Id
) in N_Entity
);
3952 Set_Flag200
(Id
, V
);
3953 end Set_Has_Delayed_Aspects
;
3955 procedure Set_Has_Delayed_Freeze
(Id
: E
; V
: B
:= True) is
3957 pragma Assert
(Nkind
(Id
) in N_Entity
);
3959 end Set_Has_Delayed_Freeze
;
3961 procedure Set_Has_Discriminants
(Id
: E
; V
: B
:= True) is
3963 pragma Assert
(Nkind
(Id
) in N_Entity
);
3965 end Set_Has_Discriminants
;
3967 procedure Set_Has_Dispatch_Table
(Id
: E
; V
: B
:= True) is
3969 pragma Assert
(Ekind
(Id
) = E_Record_Type
3970 and then Is_Tagged_Type
(Id
));
3971 Set_Flag220
(Id
, V
);
3972 end Set_Has_Dispatch_Table
;
3974 procedure Set_Has_Enumeration_Rep_Clause
(Id
: E
; V
: B
:= True) is
3976 pragma Assert
(Is_Enumeration_Type
(Id
));
3978 end Set_Has_Enumeration_Rep_Clause
;
3980 procedure Set_Has_Exit
(Id
: E
; V
: B
:= True) is
3985 procedure Set_Has_External_Tag_Rep_Clause
(Id
: E
; V
: B
:= True) is
3987 pragma Assert
(Is_Tagged_Type
(Id
));
3988 Set_Flag110
(Id
, V
);
3989 end Set_Has_External_Tag_Rep_Clause
;
3991 procedure Set_Has_Forward_Instantiation
(Id
: E
; V
: B
:= True) is
3993 Set_Flag175
(Id
, V
);
3994 end Set_Has_Forward_Instantiation
;
3996 procedure Set_Has_Fully_Qualified_Name
(Id
: E
; V
: B
:= True) is
3998 Set_Flag173
(Id
, V
);
3999 end Set_Has_Fully_Qualified_Name
;
4001 procedure Set_Has_Gigi_Rep_Item
(Id
: E
; V
: B
:= True) is
4004 end Set_Has_Gigi_Rep_Item
;
4006 procedure Set_Has_Homonym
(Id
: E
; V
: B
:= True) is
4009 end Set_Has_Homonym
;
4011 procedure Set_Has_Implicit_Dereference
(Id
: E
; V
: B
:= True) is
4013 Set_Flag251
(Id
, V
);
4014 end Set_Has_Implicit_Dereference
;
4016 procedure Set_Has_Independent_Components
(Id
: E
; V
: B
:= True) is
4018 pragma Assert
(Is_Object
(Id
) or else Is_Type
(Id
));
4020 end Set_Has_Independent_Components
;
4022 procedure Set_Has_Inheritable_Invariants
(Id
: E
; V
: B
:= True) is
4024 pragma Assert
(Is_Type
(Id
));
4025 Set_Flag248
(Id
, V
);
4026 end Set_Has_Inheritable_Invariants
;
4028 procedure Set_Has_Initial_Value
(Id
: E
; V
: B
:= True) is
4030 pragma Assert
(Ekind_In
(Id
, E_Variable
, E_Out_Parameter
));
4031 Set_Flag219
(Id
, V
);
4032 end Set_Has_Initial_Value
;
4034 procedure Set_Has_Invariants
(Id
: E
; V
: B
:= True) is
4036 pragma Assert
(Is_Type
(Id
)
4037 or else Ekind
(Id
) = E_Procedure
4038 or else Ekind
(Id
) = E_Void
);
4039 Set_Flag232
(Id
, V
);
4040 end Set_Has_Invariants
;
4042 procedure Set_Has_Machine_Radix_Clause
(Id
: E
; V
: B
:= True) is
4044 pragma Assert
(Is_Decimal_Fixed_Point_Type
(Id
));
4046 end Set_Has_Machine_Radix_Clause
;
4048 procedure Set_Has_Master_Entity
(Id
: E
; V
: B
:= True) is
4051 end Set_Has_Master_Entity
;
4053 procedure Set_Has_Missing_Return
(Id
: E
; V
: B
:= True) is
4055 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Generic_Function
));
4056 Set_Flag142
(Id
, V
);
4057 end Set_Has_Missing_Return
;
4059 procedure Set_Has_Nested_Block_With_Handler
(Id
: E
; V
: B
:= True) is
4061 Set_Flag101
(Id
, V
);
4062 end Set_Has_Nested_Block_With_Handler
;
4064 procedure Set_Has_Up_Level_Access
(Id
: E
; V
: B
:= True) is
4066 pragma Assert
(Ekind_In
(Id
, E_Variable
, E_Constant
, E_Loop_Parameter
));
4067 Set_Flag215
(Id
, V
);
4068 end Set_Has_Up_Level_Access
;
4070 procedure Set_Has_Non_Standard_Rep
(Id
: E
; V
: B
:= True) is
4072 pragma Assert
(Id
= Base_Type
(Id
));
4074 end Set_Has_Non_Standard_Rep
;
4076 procedure Set_Has_Object_Size_Clause
(Id
: E
; V
: B
:= True) is
4078 pragma Assert
(Is_Type
(Id
));
4079 Set_Flag172
(Id
, V
);
4080 end Set_Has_Object_Size_Clause
;
4082 procedure Set_Has_Per_Object_Constraint
(Id
: E
; V
: B
:= True) is
4084 Set_Flag154
(Id
, V
);
4085 end Set_Has_Per_Object_Constraint
;
4087 procedure Set_Has_Postconditions
(Id
: E
; V
: B
:= True) is
4089 pragma Assert
(Is_Subprogram
(Id
));
4090 Set_Flag240
(Id
, V
);
4091 end Set_Has_Postconditions
;
4093 procedure Set_Has_Pragma_Controlled
(Id
: E
; V
: B
:= True) is
4095 pragma Assert
(Is_Access_Type
(Id
));
4096 Set_Flag27
(Base_Type
(Id
), V
);
4097 end Set_Has_Pragma_Controlled
;
4099 procedure Set_Has_Pragma_Elaborate_Body
(Id
: E
; V
: B
:= True) is
4101 Set_Flag150
(Id
, V
);
4102 end Set_Has_Pragma_Elaborate_Body
;
4104 procedure Set_Has_Pragma_Inline
(Id
: E
; V
: B
:= True) is
4106 Set_Flag157
(Id
, V
);
4107 end Set_Has_Pragma_Inline
;
4109 procedure Set_Has_Pragma_Inline_Always
(Id
: E
; V
: B
:= True) is
4111 Set_Flag230
(Id
, V
);
4112 end Set_Has_Pragma_Inline_Always
;
4114 procedure Set_Has_Pragma_Ordered
(Id
: E
; V
: B
:= True) is
4116 pragma Assert
(Is_Enumeration_Type
(Id
));
4117 pragma Assert
(Id
= Base_Type
(Id
));
4118 Set_Flag198
(Id
, V
);
4119 end Set_Has_Pragma_Ordered
;
4121 procedure Set_Has_Pragma_Pack
(Id
: E
; V
: B
:= True) is
4123 pragma Assert
(Is_Array_Type
(Id
) or else Is_Record_Type
(Id
));
4124 pragma Assert
(Id
= Base_Type
(Id
));
4125 Set_Flag121
(Id
, V
);
4126 end Set_Has_Pragma_Pack
;
4128 procedure Set_Has_Pragma_Preelab_Init
(Id
: E
; V
: B
:= True) is
4130 Set_Flag221
(Id
, V
);
4131 end Set_Has_Pragma_Preelab_Init
;
4133 procedure Set_Has_Pragma_Pure
(Id
: E
; V
: B
:= True) is
4135 Set_Flag203
(Id
, V
);
4136 end Set_Has_Pragma_Pure
;
4138 procedure Set_Has_Pragma_Pure_Function
(Id
: E
; V
: B
:= True) is
4140 Set_Flag179
(Id
, V
);
4141 end Set_Has_Pragma_Pure_Function
;
4143 procedure Set_Has_Pragma_Thread_Local_Storage
(Id
: E
; V
: B
:= True) is
4145 Set_Flag169
(Id
, V
);
4146 end Set_Has_Pragma_Thread_Local_Storage
;
4148 procedure Set_Has_Pragma_Unmodified
(Id
: E
; V
: B
:= True) is
4150 Set_Flag233
(Id
, V
);
4151 end Set_Has_Pragma_Unmodified
;
4153 procedure Set_Has_Pragma_Unreferenced
(Id
: E
; V
: B
:= True) is
4155 Set_Flag180
(Id
, V
);
4156 end Set_Has_Pragma_Unreferenced
;
4158 procedure Set_Has_Pragma_Unreferenced_Objects
(Id
: E
; V
: B
:= True) is
4160 pragma Assert
(Is_Type
(Id
));
4161 Set_Flag212
(Id
, V
);
4162 end Set_Has_Pragma_Unreferenced_Objects
;
4164 procedure Set_Has_Predicates
(Id
: E
; V
: B
:= True) is
4166 Set_Flag250
(Id
, V
);
4167 end Set_Has_Predicates
;
4169 procedure Set_Has_Primitive_Operations
(Id
: E
; V
: B
:= True) is
4171 pragma Assert
(Id
= Base_Type
(Id
));
4172 Set_Flag120
(Id
, V
);
4173 end Set_Has_Primitive_Operations
;
4175 procedure Set_Has_Private_Ancestor
(Id
: E
; V
: B
:= True) is
4177 pragma Assert
(Is_Type
(Id
));
4178 Set_Flag151
(Id
, V
);
4179 end Set_Has_Private_Ancestor
;
4181 procedure Set_Has_Private_Declaration
(Id
: E
; V
: B
:= True) is
4183 Set_Flag155
(Id
, V
);
4184 end Set_Has_Private_Declaration
;
4186 procedure Set_Has_Qualified_Name
(Id
: E
; V
: B
:= True) is
4188 Set_Flag161
(Id
, V
);
4189 end Set_Has_Qualified_Name
;
4191 procedure Set_Has_RACW
(Id
: E
; V
: B
:= True) is
4193 pragma Assert
(Ekind
(Id
) = E_Package
);
4194 Set_Flag214
(Id
, V
);
4197 procedure Set_Has_Record_Rep_Clause
(Id
: E
; V
: B
:= True) is
4199 pragma Assert
(Id
= Base_Type
(Id
));
4201 end Set_Has_Record_Rep_Clause
;
4203 procedure Set_Has_Recursive_Call
(Id
: E
; V
: B
:= True) is
4205 pragma Assert
(Is_Subprogram
(Id
));
4206 Set_Flag143
(Id
, V
);
4207 end Set_Has_Recursive_Call
;
4209 procedure Set_Has_Size_Clause
(Id
: E
; V
: B
:= True) is
4212 end Set_Has_Size_Clause
;
4214 procedure Set_Has_Small_Clause
(Id
: E
; V
: B
:= True) is
4217 end Set_Has_Small_Clause
;
4219 procedure Set_Has_Specified_Layout
(Id
: E
; V
: B
:= True) is
4221 pragma Assert
(Id
= Base_Type
(Id
));
4222 Set_Flag100
(Id
, V
);
4223 end Set_Has_Specified_Layout
;
4225 procedure Set_Has_Specified_Stream_Input
(Id
: E
; V
: B
:= True) is
4227 pragma Assert
(Is_Type
(Id
));
4228 Set_Flag190
(Id
, V
);
4229 end Set_Has_Specified_Stream_Input
;
4231 procedure Set_Has_Specified_Stream_Output
(Id
: E
; V
: B
:= True) is
4233 pragma Assert
(Is_Type
(Id
));
4234 Set_Flag191
(Id
, V
);
4235 end Set_Has_Specified_Stream_Output
;
4237 procedure Set_Has_Specified_Stream_Read
(Id
: E
; V
: B
:= True) is
4239 pragma Assert
(Is_Type
(Id
));
4240 Set_Flag192
(Id
, V
);
4241 end Set_Has_Specified_Stream_Read
;
4243 procedure Set_Has_Specified_Stream_Write
(Id
: E
; V
: B
:= True) is
4245 pragma Assert
(Is_Type
(Id
));
4246 Set_Flag193
(Id
, V
);
4247 end Set_Has_Specified_Stream_Write
;
4249 procedure Set_Has_Static_Discriminants
(Id
: E
; V
: B
:= True) is
4251 Set_Flag211
(Id
, V
);
4252 end Set_Has_Static_Discriminants
;
4254 procedure Set_Has_Storage_Size_Clause
(Id
: E
; V
: B
:= True) is
4256 pragma Assert
(Is_Access_Type
(Id
) or else Is_Task_Type
(Id
));
4257 pragma Assert
(Id
= Base_Type
(Id
));
4259 end Set_Has_Storage_Size_Clause
;
4261 procedure Set_Has_Stream_Size_Clause
(Id
: E
; V
: B
:= True) is
4263 pragma Assert
(Is_Elementary_Type
(Id
));
4264 Set_Flag184
(Id
, V
);
4265 end Set_Has_Stream_Size_Clause
;
4267 procedure Set_Has_Task
(Id
: E
; V
: B
:= True) is
4269 pragma Assert
(Id
= Base_Type
(Id
));
4273 procedure Set_Has_Thunks
(Id
: E
; V
: B
:= True) is
4275 pragma Assert
(Is_Tag
(Id
));
4276 Set_Flag228
(Id
, V
);
4279 procedure Set_Has_Unchecked_Union
(Id
: E
; V
: B
:= True) is
4281 pragma Assert
(Id
= Base_Type
(Id
));
4282 Set_Flag123
(Id
, V
);
4283 end Set_Has_Unchecked_Union
;
4285 procedure Set_Has_Unknown_Discriminants
(Id
: E
; V
: B
:= True) is
4287 pragma Assert
(Is_Type
(Id
));
4289 end Set_Has_Unknown_Discriminants
;
4291 procedure Set_Has_Volatile_Components
(Id
: E
; V
: B
:= True) is
4293 pragma Assert
(not Is_Type
(Id
) or else Is_Base_Type
(Id
));
4295 end Set_Has_Volatile_Components
;
4297 procedure Set_Has_Xref_Entry
(Id
: E
; V
: B
:= True) is
4299 Set_Flag182
(Id
, V
);
4300 end Set_Has_Xref_Entry
;
4302 procedure Set_Hiding_Loop_Variable
(Id
: E
; V
: E
) is
4304 pragma Assert
(Ekind
(Id
) = E_Variable
);
4306 end Set_Hiding_Loop_Variable
;
4308 procedure Set_Homonym
(Id
: E
; V
: E
) is
4310 pragma Assert
(Id
/= V
);
4314 procedure Set_Interface_Alias
(Id
: E
; V
: E
) is
4318 and then Is_Hidden
(Id
)
4319 and then (Ekind_In
(Id
, E_Procedure
, E_Function
)));
4321 end Set_Interface_Alias
;
4323 procedure Set_Interfaces
(Id
: E
; V
: L
) is
4325 pragma Assert
(Is_Record_Type
(Id
));
4326 Set_Elist25
(Id
, V
);
4329 procedure Set_In_Package_Body
(Id
: E
; V
: B
:= True) is
4332 end Set_In_Package_Body
;
4334 procedure Set_In_Private_Part
(Id
: E
; V
: B
:= True) is
4337 end Set_In_Private_Part
;
4339 procedure Set_In_Use
(Id
: E
; V
: B
:= True) is
4341 pragma Assert
(Nkind
(Id
) in N_Entity
);
4345 procedure Set_Initialization_Statements
(Id
: E
; V
: N
) is
4347 -- Tolerate an E_Void entity since this can be called while resolving
4348 -- an aggregate used as the initialization expression for an object
4349 -- declaration, and this occurs before the Ekind for the object is set.
4351 pragma Assert
(Ekind_In
(Id
, E_Void
, E_Constant
, E_Variable
));
4353 end Set_Initialization_Statements
;
4355 procedure Set_Integrity_Level
(Id
: E
; V
: Uint
) is
4357 pragma Assert
(Ekind
(Id
) = E_Abstract_State
);
4359 end Set_Integrity_Level
;
4361 procedure Set_Inner_Instances
(Id
: E
; V
: L
) is
4363 Set_Elist23
(Id
, V
);
4364 end Set_Inner_Instances
;
4366 procedure Set_Interface_Name
(Id
: E
; V
: N
) is
4369 end Set_Interface_Name
;
4371 procedure Set_Is_Abstract_Subprogram
(Id
: E
; V
: B
:= True) is
4373 pragma Assert
(Is_Overloadable
(Id
));
4375 end Set_Is_Abstract_Subprogram
;
4377 procedure Set_Is_Abstract_Type
(Id
: E
; V
: B
:= True) is
4379 pragma Assert
(Is_Type
(Id
));
4380 Set_Flag146
(Id
, V
);
4381 end Set_Is_Abstract_Type
;
4383 procedure Set_Is_Local_Anonymous_Access
(Id
: E
; V
: B
:= True) is
4385 pragma Assert
(Is_Access_Type
(Id
));
4386 Set_Flag194
(Id
, V
);
4387 end Set_Is_Local_Anonymous_Access
;
4389 procedure Set_Is_Access_Constant
(Id
: E
; V
: B
:= True) is
4391 pragma Assert
(Is_Access_Type
(Id
));
4393 end Set_Is_Access_Constant
;
4395 procedure Set_Is_Ada_2005_Only
(Id
: E
; V
: B
:= True) is
4397 Set_Flag185
(Id
, V
);
4398 end Set_Is_Ada_2005_Only
;
4400 procedure Set_Is_Ada_2012_Only
(Id
: E
; V
: B
:= True) is
4402 Set_Flag199
(Id
, V
);
4403 end Set_Is_Ada_2012_Only
;
4405 procedure Set_Is_Aliased
(Id
: E
; V
: B
:= True) is
4407 pragma Assert
(Nkind
(Id
) in N_Entity
);
4411 procedure Set_Is_AST_Entry
(Id
: E
; V
: B
:= True) is
4413 pragma Assert
(Is_Entry
(Id
));
4414 Set_Flag132
(Id
, V
);
4415 end Set_Is_AST_Entry
;
4417 procedure Set_Is_Asynchronous
(Id
: E
; V
: B
:= True) is
4420 (Ekind
(Id
) = E_Procedure
or else Is_Type
(Id
));
4422 end Set_Is_Asynchronous
;
4424 procedure Set_Is_Atomic
(Id
: E
; V
: B
:= True) is
4429 procedure Set_Is_Bit_Packed_Array
(Id
: E
; V
: B
:= True) is
4431 pragma Assert
((not V
)
4432 or else (Is_Array_Type
(Id
) and then Is_Base_Type
(Id
)));
4433 Set_Flag122
(Id
, V
);
4434 end Set_Is_Bit_Packed_Array
;
4436 procedure Set_Is_Called
(Id
: E
; V
: B
:= True) is
4438 pragma Assert
(Ekind_In
(Id
, E_Procedure
, E_Function
));
4439 Set_Flag102
(Id
, V
);
4442 procedure Set_Is_Character_Type
(Id
: E
; V
: B
:= True) is
4445 end Set_Is_Character_Type
;
4447 procedure Set_Is_Child_Unit
(Id
: E
; V
: B
:= True) is
4450 end Set_Is_Child_Unit
;
4452 procedure Set_Is_Class_Wide_Equivalent_Type
(Id
: E
; V
: B
:= True) is
4455 end Set_Is_Class_Wide_Equivalent_Type
;
4457 procedure Set_Is_Compilation_Unit
(Id
: E
; V
: B
:= True) is
4459 Set_Flag149
(Id
, V
);
4460 end Set_Is_Compilation_Unit
;
4462 procedure Set_Is_Completely_Hidden
(Id
: E
; V
: B
:= True) is
4464 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
4465 Set_Flag103
(Id
, V
);
4466 end Set_Is_Completely_Hidden
;
4468 procedure Set_Is_Concurrent_Record_Type
(Id
: E
; V
: B
:= True) is
4471 end Set_Is_Concurrent_Record_Type
;
4473 procedure Set_Is_Constr_Subt_For_U_Nominal
(Id
: E
; V
: B
:= True) is
4476 end Set_Is_Constr_Subt_For_U_Nominal
;
4478 procedure Set_Is_Constr_Subt_For_UN_Aliased
(Id
: E
; V
: B
:= True) is
4480 Set_Flag141
(Id
, V
);
4481 end Set_Is_Constr_Subt_For_UN_Aliased
;
4483 procedure Set_Is_Constrained
(Id
: E
; V
: B
:= True) is
4485 pragma Assert
(Nkind
(Id
) in N_Entity
);
4487 end Set_Is_Constrained
;
4489 procedure Set_Is_Constructor
(Id
: E
; V
: B
:= True) is
4492 end Set_Is_Constructor
;
4494 procedure Set_Is_Controlled
(Id
: E
; V
: B
:= True) is
4496 pragma Assert
(Id
= Base_Type
(Id
));
4498 end Set_Is_Controlled
;
4500 procedure Set_Is_Controlling_Formal
(Id
: E
; V
: B
:= True) is
4502 pragma Assert
(Is_Formal
(Id
));
4504 end Set_Is_Controlling_Formal
;
4506 procedure Set_Is_CPP_Class
(Id
: E
; V
: B
:= True) is
4509 end Set_Is_CPP_Class
;
4511 procedure Set_Is_Descendent_Of_Address
(Id
: E
; V
: B
:= True) is
4513 pragma Assert
(Is_Type
(Id
));
4514 Set_Flag223
(Id
, V
);
4515 end Set_Is_Descendent_Of_Address
;
4517 procedure Set_Is_Discrim_SO_Function
(Id
: E
; V
: B
:= True) is
4519 Set_Flag176
(Id
, V
);
4520 end Set_Is_Discrim_SO_Function
;
4522 procedure Set_Is_Dispatch_Table_Entity
(Id
: E
; V
: B
:= True) is
4524 Set_Flag234
(Id
, V
);
4525 end Set_Is_Dispatch_Table_Entity
;
4527 procedure Set_Is_Dispatching_Operation
(Id
: E
; V
: B
:= True) is
4532 Is_Overloadable
(Id
)
4534 Ekind
(Id
) = E_Subprogram_Type
);
4537 end Set_Is_Dispatching_Operation
;
4539 procedure Set_Is_Eliminated
(Id
: E
; V
: B
:= True) is
4541 Set_Flag124
(Id
, V
);
4542 end Set_Is_Eliminated
;
4544 procedure Set_Is_Entry_Formal
(Id
: E
; V
: B
:= True) is
4547 end Set_Is_Entry_Formal
;
4549 procedure Set_Is_Exported
(Id
: E
; V
: B
:= True) is
4552 end Set_Is_Exported
;
4554 procedure Set_Is_First_Subtype
(Id
: E
; V
: B
:= True) is
4557 end Set_Is_First_Subtype
;
4559 procedure Set_Is_For_Access_Subtype
(Id
: E
; V
: B
:= True) is
4561 pragma Assert
(Ekind_In
(Id
, E_Record_Subtype
, E_Private_Subtype
));
4562 Set_Flag118
(Id
, V
);
4563 end Set_Is_For_Access_Subtype
;
4565 procedure Set_Is_Formal_Subprogram
(Id
: E
; V
: B
:= True) is
4567 Set_Flag111
(Id
, V
);
4568 end Set_Is_Formal_Subprogram
;
4570 procedure Set_Is_Frozen
(Id
: E
; V
: B
:= True) is
4572 pragma Assert
(Nkind
(Id
) in N_Entity
);
4576 procedure Set_Is_Generic_Actual_Type
(Id
: E
; V
: B
:= True) is
4578 pragma Assert
(Is_Type
(Id
));
4580 end Set_Is_Generic_Actual_Type
;
4582 procedure Set_Is_Generic_Instance
(Id
: E
; V
: B
:= True) is
4584 Set_Flag130
(Id
, V
);
4585 end Set_Is_Generic_Instance
;
4587 procedure Set_Is_Generic_Type
(Id
: E
; V
: B
:= True) is
4589 pragma Assert
(Nkind
(Id
) in N_Entity
);
4591 end Set_Is_Generic_Type
;
4593 procedure Set_Is_Hidden
(Id
: E
; V
: B
:= True) is
4598 procedure Set_Is_Hidden_Open_Scope
(Id
: E
; V
: B
:= True) is
4600 Set_Flag171
(Id
, V
);
4601 end Set_Is_Hidden_Open_Scope
;
4603 procedure Set_Is_Immediately_Visible
(Id
: E
; V
: B
:= True) is
4605 pragma Assert
(Nkind
(Id
) in N_Entity
);
4607 end Set_Is_Immediately_Visible
;
4609 procedure Set_Is_Implementation_Defined
(Id
: E
; V
: B
:= True) is
4611 Set_Flag254
(Id
, V
);
4612 end Set_Is_Implementation_Defined
;
4614 procedure Set_Is_Imported
(Id
: E
; V
: B
:= True) is
4617 end Set_Is_Imported
;
4619 procedure Set_Is_Inlined
(Id
: E
; V
: B
:= True) is
4624 procedure Set_Is_Interface
(Id
: E
; V
: B
:= True) is
4626 pragma Assert
(Is_Record_Type
(Id
));
4627 Set_Flag186
(Id
, V
);
4628 end Set_Is_Interface
;
4630 procedure Set_Is_Instantiated
(Id
: E
; V
: B
:= True) is
4632 Set_Flag126
(Id
, V
);
4633 end Set_Is_Instantiated
;
4635 procedure Set_Is_Internal
(Id
: E
; V
: B
:= True) is
4637 pragma Assert
(Nkind
(Id
) in N_Entity
);
4639 end Set_Is_Internal
;
4641 procedure Set_Is_Interrupt_Handler
(Id
: E
; V
: B
:= True) is
4643 pragma Assert
(Nkind
(Id
) in N_Entity
);
4645 end Set_Is_Interrupt_Handler
;
4647 procedure Set_Is_Intrinsic_Subprogram
(Id
: E
; V
: B
:= True) is
4650 end Set_Is_Intrinsic_Subprogram
;
4652 procedure Set_Is_Itype
(Id
: E
; V
: B
:= True) is
4657 procedure Set_Is_Known_Non_Null
(Id
: E
; V
: B
:= True) is
4660 end Set_Is_Known_Non_Null
;
4662 procedure Set_Is_Known_Null
(Id
: E
; V
: B
:= True) is
4664 Set_Flag204
(Id
, V
);
4665 end Set_Is_Known_Null
;
4667 procedure Set_Is_Known_Valid
(Id
: E
; V
: B
:= True) is
4669 Set_Flag170
(Id
, V
);
4670 end Set_Is_Known_Valid
;
4672 procedure Set_Is_Limited_Composite
(Id
: E
; V
: B
:= True) is
4674 pragma Assert
(Is_Type
(Id
));
4675 Set_Flag106
(Id
, V
);
4676 end Set_Is_Limited_Composite
;
4678 procedure Set_Is_Limited_Interface
(Id
: E
; V
: B
:= True) is
4680 pragma Assert
(Is_Interface
(Id
));
4681 Set_Flag197
(Id
, V
);
4682 end Set_Is_Limited_Interface
;
4684 procedure Set_Is_Limited_Record
(Id
: E
; V
: B
:= True) is
4687 end Set_Is_Limited_Record
;
4689 procedure Set_Is_Machine_Code_Subprogram
(Id
: E
; V
: B
:= True) is
4691 pragma Assert
(Is_Subprogram
(Id
));
4692 Set_Flag137
(Id
, V
);
4693 end Set_Is_Machine_Code_Subprogram
;
4695 procedure Set_Is_Non_Static_Subtype
(Id
: E
; V
: B
:= True) is
4697 pragma Assert
(Is_Type
(Id
));
4698 Set_Flag109
(Id
, V
);
4699 end Set_Is_Non_Static_Subtype
;
4701 procedure Set_Is_Null_Init_Proc
(Id
: E
; V
: B
:= True) is
4703 pragma Assert
(Ekind
(Id
) = E_Procedure
);
4704 Set_Flag178
(Id
, V
);
4705 end Set_Is_Null_Init_Proc
;
4707 procedure Set_Is_Obsolescent
(Id
: E
; V
: B
:= True) is
4709 Set_Flag153
(Id
, V
);
4710 end Set_Is_Obsolescent
;
4712 procedure Set_Is_Only_Out_Parameter
(Id
: E
; V
: B
:= True) is
4714 pragma Assert
(Ekind
(Id
) = E_Out_Parameter
);
4715 Set_Flag226
(Id
, V
);
4716 end Set_Is_Only_Out_Parameter
;
4718 procedure Set_Is_Optional_Parameter
(Id
: E
; V
: B
:= True) is
4720 pragma Assert
(Is_Formal
(Id
));
4721 Set_Flag134
(Id
, V
);
4722 end Set_Is_Optional_Parameter
;
4724 procedure Set_Is_Package_Body_Entity
(Id
: E
; V
: B
:= True) is
4726 Set_Flag160
(Id
, V
);
4727 end Set_Is_Package_Body_Entity
;
4729 procedure Set_Is_Packed
(Id
: E
; V
: B
:= True) is
4731 pragma Assert
(Id
= Base_Type
(Id
));
4735 procedure Set_Is_Packed_Array_Type
(Id
: E
; V
: B
:= True) is
4737 Set_Flag138
(Id
, V
);
4738 end Set_Is_Packed_Array_Type
;
4740 procedure Set_Is_Potentially_Use_Visible
(Id
: E
; V
: B
:= True) is
4742 pragma Assert
(Nkind
(Id
) in N_Entity
);
4744 end Set_Is_Potentially_Use_Visible
;
4746 procedure Set_Is_Preelaborated
(Id
: E
; V
: B
:= True) is
4749 end Set_Is_Preelaborated
;
4751 procedure Set_Is_Primitive
(Id
: E
; V
: B
:= True) is
4754 (Is_Overloadable
(Id
)
4755 or else Ekind_In
(Id
, E_Generic_Function
, E_Generic_Procedure
));
4756 Set_Flag218
(Id
, V
);
4757 end Set_Is_Primitive
;
4759 procedure Set_Is_Primitive_Wrapper
(Id
: E
; V
: B
:= True) is
4761 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
4762 Set_Flag195
(Id
, V
);
4763 end Set_Is_Primitive_Wrapper
;
4765 procedure Set_Is_Private_Composite
(Id
: E
; V
: B
:= True) is
4767 pragma Assert
(Is_Type
(Id
));
4768 Set_Flag107
(Id
, V
);
4769 end Set_Is_Private_Composite
;
4771 procedure Set_Is_Private_Descendant
(Id
: E
; V
: B
:= True) is
4774 end Set_Is_Private_Descendant
;
4776 procedure Set_Is_Private_Primitive
(Id
: E
; V
: B
:= True) is
4778 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
4779 Set_Flag245
(Id
, V
);
4780 end Set_Is_Private_Primitive
;
4782 procedure Set_Is_Processed_Transient
(Id
: E
; V
: B
:= True) is
4784 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
4785 Set_Flag252
(Id
, V
);
4786 end Set_Is_Processed_Transient
;
4788 procedure Set_Is_Public
(Id
: E
; V
: B
:= True) is
4790 pragma Assert
(Nkind
(Id
) in N_Entity
);
4794 procedure Set_Is_Pure
(Id
: E
; V
: B
:= True) is
4799 procedure Set_Is_Pure_Unit_Access_Type
(Id
: E
; V
: B
:= True) is
4801 pragma Assert
(Is_Access_Type
(Id
));
4802 Set_Flag189
(Id
, V
);
4803 end Set_Is_Pure_Unit_Access_Type
;
4805 procedure Set_Is_RACW_Stub_Type
(Id
: E
; V
: B
:= True) is
4807 pragma Assert
(Is_Type
(Id
));
4808 Set_Flag244
(Id
, V
);
4809 end Set_Is_RACW_Stub_Type
;
4811 procedure Set_Is_Raised
(Id
: E
; V
: B
:= True) is
4813 pragma Assert
(Ekind
(Id
) = E_Exception
);
4814 Set_Flag224
(Id
, V
);
4817 procedure Set_Is_Remote_Call_Interface
(Id
: E
; V
: B
:= True) is
4820 end Set_Is_Remote_Call_Interface
;
4822 procedure Set_Is_Remote_Types
(Id
: E
; V
: B
:= True) is
4825 end Set_Is_Remote_Types
;
4827 procedure Set_Is_Renaming_Of_Object
(Id
: E
; V
: B
:= True) is
4829 Set_Flag112
(Id
, V
);
4830 end Set_Is_Renaming_Of_Object
;
4832 procedure Set_Is_Return_Object
(Id
: E
; V
: B
:= True) is
4834 Set_Flag209
(Id
, V
);
4835 end Set_Is_Return_Object
;
4837 procedure Set_Is_Safe_To_Reevaluate
(Id
: E
; V
: B
:= True) is
4839 pragma Assert
(Ekind
(Id
) = E_Variable
);
4840 Set_Flag249
(Id
, V
);
4841 end Set_Is_Safe_To_Reevaluate
;
4843 procedure Set_Is_Shared_Passive
(Id
: E
; V
: B
:= True) is
4846 end Set_Is_Shared_Passive
;
4848 procedure Set_Is_Statically_Allocated
(Id
: E
; V
: B
:= True) is
4852 or else Ekind_In
(Id
, E_Exception
,
4857 end Set_Is_Statically_Allocated
;
4859 procedure Set_Is_Tag
(Id
: E
; V
: B
:= True) is
4861 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Constant
, E_Variable
));
4865 procedure Set_Is_Tagged_Type
(Id
: E
; V
: B
:= True) is
4868 end Set_Is_Tagged_Type
;
4870 procedure Set_Is_Thunk
(Id
: E
; V
: B
:= True) is
4872 Set_Flag225
(Id
, V
);
4875 procedure Set_Is_Trivial_Subprogram
(Id
: E
; V
: B
:= True) is
4877 Set_Flag235
(Id
, V
);
4878 end Set_Is_Trivial_Subprogram
;
4880 procedure Set_Is_True_Constant
(Id
: E
; V
: B
:= True) is
4882 Set_Flag163
(Id
, V
);
4883 end Set_Is_True_Constant
;
4885 procedure Set_Is_Unchecked_Union
(Id
: E
; V
: B
:= True) is
4887 pragma Assert
(Id
= Base_Type
(Id
));
4888 Set_Flag117
(Id
, V
);
4889 end Set_Is_Unchecked_Union
;
4891 procedure Set_Is_Underlying_Record_View
(Id
: E
; V
: B
:= True) is
4893 pragma Assert
(Ekind
(Id
) = E_Record_Type
);
4894 Set_Flag246
(Id
, V
);
4895 end Set_Is_Underlying_Record_View
;
4897 procedure Set_Is_Unsigned_Type
(Id
: E
; V
: B
:= True) is
4899 pragma Assert
(Is_Discrete_Or_Fixed_Point_Type
(Id
));
4900 Set_Flag144
(Id
, V
);
4901 end Set_Is_Unsigned_Type
;
4903 procedure Set_Is_Valued_Procedure
(Id
: E
; V
: B
:= True) is
4905 pragma Assert
(Ekind
(Id
) = E_Procedure
);
4906 Set_Flag127
(Id
, V
);
4907 end Set_Is_Valued_Procedure
;
4909 procedure Set_Is_Visible_Formal
(Id
: E
; V
: B
:= True) is
4911 Set_Flag206
(Id
, V
);
4912 end Set_Is_Visible_Formal
;
4914 procedure Set_Is_Visible_Lib_Unit
(Id
: E
; V
: B
:= True) is
4916 Set_Flag116
(Id
, V
);
4917 end Set_Is_Visible_Lib_Unit
;
4919 procedure Set_Is_VMS_Exception
(Id
: E
; V
: B
:= True) is
4921 pragma Assert
(Ekind
(Id
) = E_Exception
);
4922 Set_Flag133
(Id
, V
);
4923 end Set_Is_VMS_Exception
;
4925 procedure Set_Is_Volatile
(Id
: E
; V
: B
:= True) is
4927 pragma Assert
(Nkind
(Id
) in N_Entity
);
4929 end Set_Is_Volatile
;
4931 procedure Set_Itype_Printed
(Id
: E
; V
: B
:= True) is
4933 pragma Assert
(Is_Itype
(Id
));
4934 Set_Flag202
(Id
, V
);
4935 end Set_Itype_Printed
;
4937 procedure Set_Kill_Elaboration_Checks
(Id
: E
; V
: B
:= True) is
4940 end Set_Kill_Elaboration_Checks
;
4942 procedure Set_Kill_Range_Checks
(Id
: E
; V
: B
:= True) is
4945 end Set_Kill_Range_Checks
;
4947 procedure Set_Known_To_Have_Preelab_Init
(Id
: E
; V
: B
:= True) is
4949 pragma Assert
(Is_Type
(Id
));
4950 Set_Flag207
(Id
, V
);
4951 end Set_Known_To_Have_Preelab_Init
;
4953 procedure Set_Last_Assignment
(Id
: E
; V
: N
) is
4955 pragma Assert
(Is_Assignable
(Id
));
4957 end Set_Last_Assignment
;
4959 procedure Set_Last_Entity
(Id
: E
; V
: E
) is
4962 end Set_Last_Entity
;
4964 procedure Set_Limited_View
(Id
: E
; V
: E
) is
4966 pragma Assert
(Ekind
(Id
) = E_Package
);
4968 end Set_Limited_View
;
4970 procedure Set_Lit_Indexes
(Id
: E
; V
: E
) is
4972 pragma Assert
(Is_Enumeration_Type
(Id
) and then Root_Type
(Id
) = Id
);
4974 end Set_Lit_Indexes
;
4976 procedure Set_Lit_Strings
(Id
: E
; V
: E
) is
4978 pragma Assert
(Is_Enumeration_Type
(Id
) and then Root_Type
(Id
) = Id
);
4980 end Set_Lit_Strings
;
4982 procedure Set_Loop_Entry_Attributes
(Id
: E
; V
: L
) is
4984 pragma Assert
(Ekind
(Id
) = E_Loop
);
4985 Set_Elist10
(Id
, V
);
4986 end Set_Loop_Entry_Attributes
;
4988 procedure Set_Low_Bound_Tested
(Id
: E
; V
: B
:= True) is
4990 pragma Assert
(Is_Formal
(Id
));
4991 Set_Flag205
(Id
, V
);
4992 end Set_Low_Bound_Tested
;
4994 procedure Set_Machine_Radix_10
(Id
: E
; V
: B
:= True) is
4996 pragma Assert
(Is_Decimal_Fixed_Point_Type
(Id
));
4998 end Set_Machine_Radix_10
;
5000 procedure Set_Master_Id
(Id
: E
; V
: E
) is
5002 pragma Assert
(Is_Access_Type
(Id
));
5006 procedure Set_Materialize_Entity
(Id
: E
; V
: B
:= True) is
5008 Set_Flag168
(Id
, V
);
5009 end Set_Materialize_Entity
;
5011 procedure Set_Mechanism
(Id
: E
; V
: M
) is
5013 pragma Assert
(Ekind
(Id
) = E_Function
or else Is_Formal
(Id
));
5014 Set_Uint8
(Id
, UI_From_Int
(V
));
5017 procedure Set_Modulus
(Id
: E
; V
: U
) is
5019 pragma Assert
(Ekind
(Id
) = E_Modular_Integer_Type
);
5023 procedure Set_Must_Be_On_Byte_Boundary
(Id
: E
; V
: B
:= True) is
5025 pragma Assert
(Is_Type
(Id
));
5026 Set_Flag183
(Id
, V
);
5027 end Set_Must_Be_On_Byte_Boundary
;
5029 procedure Set_Must_Have_Preelab_Init
(Id
: E
; V
: B
:= True) is
5031 pragma Assert
(Is_Type
(Id
));
5032 Set_Flag208
(Id
, V
);
5033 end Set_Must_Have_Preelab_Init
;
5035 procedure Set_Needs_Debug_Info
(Id
: E
; V
: B
:= True) is
5037 Set_Flag147
(Id
, V
);
5038 end Set_Needs_Debug_Info
;
5040 procedure Set_Needs_No_Actuals
(Id
: E
; V
: B
:= True) is
5043 (Is_Overloadable
(Id
)
5044 or else Ekind_In
(Id
, E_Subprogram_Type
, E_Entry_Family
));
5046 end Set_Needs_No_Actuals
;
5048 procedure Set_Never_Set_In_Source
(Id
: E
; V
: B
:= True) is
5050 Set_Flag115
(Id
, V
);
5051 end Set_Never_Set_In_Source
;
5053 procedure Set_Next_Inlined_Subprogram
(Id
: E
; V
: E
) is
5056 end Set_Next_Inlined_Subprogram
;
5058 procedure Set_No_Pool_Assigned
(Id
: E
; V
: B
:= True) is
5060 pragma Assert
(Is_Access_Type
(Id
) and then Is_Base_Type
(Id
));
5061 Set_Flag131
(Id
, V
);
5062 end Set_No_Pool_Assigned
;
5064 procedure Set_No_Return
(Id
: E
; V
: B
:= True) is
5067 (V
= False or else Ekind_In
(Id
, E_Procedure
, E_Generic_Procedure
));
5068 Set_Flag113
(Id
, V
);
5071 procedure Set_No_Strict_Aliasing
(Id
: E
; V
: B
:= True) is
5073 pragma Assert
(Is_Access_Type
(Id
) and then Is_Base_Type
(Id
));
5074 Set_Flag136
(Id
, V
);
5075 end Set_No_Strict_Aliasing
;
5077 procedure Set_Non_Binary_Modulus
(Id
: E
; V
: B
:= True) is
5079 pragma Assert
(Is_Type
(Id
) and then Is_Base_Type
(Id
));
5081 end Set_Non_Binary_Modulus
;
5083 procedure Set_Non_Limited_View
(Id
: E
; V
: E
) is
5085 pragma Assert
(Ekind
(Id
) in Incomplete_Kind
);
5087 end Set_Non_Limited_View
;
5089 procedure Set_Nonzero_Is_True
(Id
: E
; V
: B
:= True) is
5092 (Root_Type
(Id
) = Standard_Boolean
5093 and then Ekind
(Id
) = E_Enumeration_Type
);
5094 Set_Flag162
(Id
, V
);
5095 end Set_Nonzero_Is_True
;
5097 procedure Set_Normalized_First_Bit
(Id
: E
; V
: U
) is
5099 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
5101 end Set_Normalized_First_Bit
;
5103 procedure Set_Normalized_Position
(Id
: E
; V
: U
) is
5105 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
5107 end Set_Normalized_Position
;
5109 procedure Set_Normalized_Position_Max
(Id
: E
; V
: U
) is
5111 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
5113 end Set_Normalized_Position_Max
;
5115 procedure Set_OK_To_Rename
(Id
: E
; V
: B
:= True) is
5117 pragma Assert
(Ekind
(Id
) = E_Variable
);
5118 Set_Flag247
(Id
, V
);
5119 end Set_OK_To_Rename
;
5121 procedure Set_OK_To_Reorder_Components
(Id
: E
; V
: B
:= True) is
5124 (Is_Record_Type
(Id
) and then Is_Base_Type
(Id
));
5125 Set_Flag239
(Id
, V
);
5126 end Set_OK_To_Reorder_Components
;
5128 procedure Set_Optimize_Alignment_Space
(Id
: E
; V
: B
:= True) is
5131 (Is_Type
(Id
) or else Ekind_In
(Id
, E_Constant
, E_Variable
));
5132 Set_Flag241
(Id
, V
);
5133 end Set_Optimize_Alignment_Space
;
5135 procedure Set_Optimize_Alignment_Time
(Id
: E
; V
: B
:= True) is
5138 (Is_Type
(Id
) or else Ekind_In
(Id
, E_Constant
, E_Variable
));
5139 Set_Flag242
(Id
, V
);
5140 end Set_Optimize_Alignment_Time
;
5142 procedure Set_Original_Access_Type
(Id
: E
; V
: E
) is
5144 pragma Assert
(Ekind
(Id
) = E_Access_Subprogram_Type
);
5146 end Set_Original_Access_Type
;
5148 procedure Set_Original_Array_Type
(Id
: E
; V
: E
) is
5150 pragma Assert
(Is_Array_Type
(Id
) or else Is_Modular_Integer_Type
(Id
));
5152 end Set_Original_Array_Type
;
5154 procedure Set_Original_Record_Component
(Id
: E
; V
: E
) is
5156 pragma Assert
(Ekind_In
(Id
, E_Void
, E_Component
, E_Discriminant
));
5158 end Set_Original_Record_Component
;
5160 procedure Set_Overlays_Constant
(Id
: E
; V
: B
:= True) is
5162 Set_Flag243
(Id
, V
);
5163 end Set_Overlays_Constant
;
5165 procedure Set_Overridden_Operation
(Id
: E
; V
: E
) is
5168 end Set_Overridden_Operation
;
5170 procedure Set_Package_Instantiation
(Id
: E
; V
: N
) is
5172 pragma Assert
(Ekind_In
(Id
, E_Void
, E_Generic_Package
, E_Package
));
5174 end Set_Package_Instantiation
;
5176 procedure Set_Packed_Array_Type
(Id
: E
; V
: E
) is
5178 pragma Assert
(Is_Array_Type
(Id
));
5180 end Set_Packed_Array_Type
;
5182 procedure Set_Parent_Subtype
(Id
: E
; V
: E
) is
5184 pragma Assert
(Ekind
(Id
) = E_Record_Type
);
5186 end Set_Parent_Subtype
;
5188 procedure Set_Postcondition_Proc
(Id
: E
; V
: E
) is
5190 pragma Assert
(Ekind
(Id
) = E_Procedure
);
5192 end Set_Postcondition_Proc
;
5194 procedure Set_PPC_Wrapper
(Id
: E
; V
: E
) is
5196 pragma Assert
(Ekind_In
(Id
, E_Entry
, E_Entry_Family
));
5198 end Set_PPC_Wrapper
;
5200 procedure Set_Direct_Primitive_Operations
(Id
: E
; V
: L
) is
5202 pragma Assert
(Is_Tagged_Type
(Id
));
5203 Set_Elist10
(Id
, V
);
5204 end Set_Direct_Primitive_Operations
;
5206 procedure Set_Prival
(Id
: E
; V
: E
) is
5208 pragma Assert
(Is_Protected_Component
(Id
));
5212 procedure Set_Prival_Link
(Id
: E
; V
: E
) is
5214 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
5216 end Set_Prival_Link
;
5218 procedure Set_Private_Dependents
(Id
: E
; V
: L
) is
5220 pragma Assert
(Is_Incomplete_Or_Private_Type
(Id
));
5221 Set_Elist18
(Id
, V
);
5222 end Set_Private_Dependents
;
5224 procedure Set_Private_View
(Id
: E
; V
: N
) is
5226 pragma Assert
(Is_Private_Type
(Id
));
5228 end Set_Private_View
;
5230 procedure Set_Protected_Body_Subprogram
(Id
: E
; V
: E
) is
5232 pragma Assert
(Is_Subprogram
(Id
) or else Is_Entry
(Id
));
5234 end Set_Protected_Body_Subprogram
;
5236 procedure Set_Protected_Formal
(Id
: E
; V
: E
) is
5238 pragma Assert
(Is_Formal
(Id
));
5240 end Set_Protected_Formal
;
5242 procedure Set_Protection_Object
(Id
: E
; V
: E
) is
5244 pragma Assert
(Ekind_In
(Id
, E_Entry
,
5249 end Set_Protection_Object
;
5251 procedure Set_Reachable
(Id
: E
; V
: B
:= True) is
5256 procedure Set_Referenced
(Id
: E
; V
: B
:= True) is
5258 Set_Flag156
(Id
, V
);
5261 procedure Set_Referenced_As_LHS
(Id
: E
; V
: B
:= True) is
5264 end Set_Referenced_As_LHS
;
5266 procedure Set_Referenced_As_Out_Parameter
(Id
: E
; V
: B
:= True) is
5268 Set_Flag227
(Id
, V
);
5269 end Set_Referenced_As_Out_Parameter
;
5271 procedure Set_Refined_State
(Id
: E
; V
: E
) is
5273 pragma Assert
(Ekind
(Id
) = E_Abstract_State
);
5275 end Set_Refined_State
;
5277 procedure Set_Register_Exception_Call
(Id
: E
; V
: N
) is
5279 pragma Assert
(Ekind
(Id
) = E_Exception
);
5281 end Set_Register_Exception_Call
;
5283 procedure Set_Related_Array_Object
(Id
: E
; V
: E
) is
5285 pragma Assert
(Is_Array_Type
(Id
));
5287 end Set_Related_Array_Object
;
5289 procedure Set_Related_Expression
(Id
: E
; V
: N
) is
5291 pragma Assert
(Ekind
(Id
) in Type_Kind
5292 or else Ekind_In
(Id
, E_Constant
, E_Variable
, E_Void
));
5294 end Set_Related_Expression
;
5296 procedure Set_Related_Instance
(Id
: E
; V
: E
) is
5298 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Package_Body
));
5300 end Set_Related_Instance
;
5302 procedure Set_Related_Type
(Id
: E
; V
: E
) is
5304 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Constant
, E_Variable
));
5306 end Set_Related_Type
;
5308 procedure Set_Relative_Deadline_Variable
(Id
: E
; V
: E
) is
5310 pragma Assert
(Is_Task_Type
(Id
) and then Is_Base_Type
(Id
));
5312 end Set_Relative_Deadline_Variable
;
5314 procedure Set_Renamed_Entity
(Id
: E
; V
: N
) is
5317 end Set_Renamed_Entity
;
5319 procedure Set_Renamed_In_Spec
(Id
: E
; V
: B
:= True) is
5321 pragma Assert
(Ekind
(Id
) = E_Package
);
5322 Set_Flag231
(Id
, V
);
5323 end Set_Renamed_In_Spec
;
5325 procedure Set_Renamed_Object
(Id
: E
; V
: N
) is
5328 end Set_Renamed_Object
;
5330 procedure Set_Renaming_Map
(Id
: E
; V
: U
) is
5333 end Set_Renaming_Map
;
5335 procedure Set_Requires_Overriding
(Id
: E
; V
: B
:= True) is
5337 pragma Assert
(Is_Overloadable
(Id
));
5338 Set_Flag213
(Id
, V
);
5339 end Set_Requires_Overriding
;
5341 procedure Set_Return_Present
(Id
: E
; V
: B
:= True) is
5344 end Set_Return_Present
;
5346 procedure Set_Return_Applies_To
(Id
: E
; V
: N
) is
5349 end Set_Return_Applies_To
;
5351 procedure Set_Returns_By_Ref
(Id
: E
; V
: B
:= True) is
5354 end Set_Returns_By_Ref
;
5356 procedure Set_Reverse_Bit_Order
(Id
: E
; V
: B
:= True) is
5359 (Is_Record_Type
(Id
) and then Is_Base_Type
(Id
));
5360 Set_Flag164
(Id
, V
);
5361 end Set_Reverse_Bit_Order
;
5363 procedure Set_Reverse_Storage_Order
(Id
: E
; V
: B
:= True) is
5367 and then (Is_Record_Type
(Id
) or else Is_Array_Type
(Id
)));
5369 end Set_Reverse_Storage_Order
;
5371 procedure Set_RM_Size
(Id
: E
; V
: U
) is
5373 pragma Assert
(Is_Type
(Id
));
5377 procedure Set_Scalar_Range
(Id
: E
; V
: N
) is
5380 end Set_Scalar_Range
;
5382 procedure Set_Scale_Value
(Id
: E
; V
: U
) is
5385 end Set_Scale_Value
;
5387 procedure Set_Scope_Depth_Value
(Id
: E
; V
: U
) is
5389 pragma Assert
(not Is_Record_Type
(Id
));
5391 end Set_Scope_Depth_Value
;
5393 procedure Set_Sec_Stack_Needed_For_Return
(Id
: E
; V
: B
:= True) is
5395 Set_Flag167
(Id
, V
);
5396 end Set_Sec_Stack_Needed_For_Return
;
5398 procedure Set_Shadow_Entities
(Id
: E
; V
: S
) is
5400 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Generic_Package
));
5402 end Set_Shadow_Entities
;
5404 procedure Set_Shared_Var_Procs_Instance
(Id
: E
; V
: E
) is
5406 pragma Assert
(Ekind
(Id
) = E_Variable
);
5408 end Set_Shared_Var_Procs_Instance
;
5410 procedure Set_Size_Check_Code
(Id
: E
; V
: N
) is
5412 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
5414 end Set_Size_Check_Code
;
5416 procedure Set_Size_Depends_On_Discriminant
(Id
: E
; V
: B
:= True) is
5418 Set_Flag177
(Id
, V
);
5419 end Set_Size_Depends_On_Discriminant
;
5421 procedure Set_Size_Known_At_Compile_Time
(Id
: E
; V
: B
:= True) is
5424 end Set_Size_Known_At_Compile_Time
;
5426 procedure Set_Small_Value
(Id
: E
; V
: R
) is
5428 pragma Assert
(Is_Fixed_Point_Type
(Id
));
5429 Set_Ureal21
(Id
, V
);
5430 end Set_Small_Value
;
5432 procedure Set_Spec_Entity
(Id
: E
; V
: E
) is
5434 pragma Assert
(Ekind
(Id
) = E_Package_Body
or else Is_Formal
(Id
));
5436 end Set_Spec_Entity
;
5438 procedure Set_Static_Predicate
(Id
: E
; V
: S
) is
5441 (Ekind_In
(Id
, E_Enumeration_Subtype
,
5442 E_Modular_Integer_Subtype
,
5443 E_Signed_Integer_Subtype
)
5444 and then Has_Predicates
(Id
));
5446 end Set_Static_Predicate
;
5448 procedure Set_Status_Flag_Or_Transient_Decl
(Id
: E
; V
: E
) is
5450 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
5452 end Set_Status_Flag_Or_Transient_Decl
;
5454 procedure Set_Storage_Size_Variable
(Id
: E
; V
: E
) is
5456 pragma Assert
(Is_Access_Type
(Id
) or else Is_Task_Type
(Id
));
5457 pragma Assert
(Id
= Base_Type
(Id
));
5459 end Set_Storage_Size_Variable
;
5461 procedure Set_Static_Elaboration_Desired
(Id
: E
; V
: B
) is
5463 pragma Assert
(Ekind
(Id
) = E_Package
);
5465 end Set_Static_Elaboration_Desired
;
5467 procedure Set_Static_Initialization
(Id
: E
; V
: N
) is
5470 (Ekind
(Id
) = E_Procedure
and then not Is_Dispatching_Operation
(Id
));
5472 end Set_Static_Initialization
;
5474 procedure Set_Stored_Constraint
(Id
: E
; V
: L
) is
5476 pragma Assert
(Nkind
(Id
) in N_Entity
);
5477 Set_Elist23
(Id
, V
);
5478 end Set_Stored_Constraint
;
5480 procedure Set_Strict_Alignment
(Id
: E
; V
: B
:= True) is
5482 pragma Assert
(Id
= Base_Type
(Id
));
5483 Set_Flag145
(Id
, V
);
5484 end Set_Strict_Alignment
;
5486 procedure Set_String_Literal_Length
(Id
: E
; V
: U
) is
5488 pragma Assert
(Ekind
(Id
) = E_String_Literal_Subtype
);
5490 end Set_String_Literal_Length
;
5492 procedure Set_String_Literal_Low_Bound
(Id
: E
; V
: N
) is
5494 pragma Assert
(Ekind
(Id
) = E_String_Literal_Subtype
);
5496 end Set_String_Literal_Low_Bound
;
5498 procedure Set_Subprograms_For_Type
(Id
: E
; V
: E
) is
5500 pragma Assert
(Is_Type
(Id
) or else Is_Subprogram
(Id
));
5502 end Set_Subprograms_For_Type
;
5504 procedure Set_Suppress_Elaboration_Warnings
(Id
: E
; V
: B
:= True) is
5506 Set_Flag148
(Id
, V
);
5507 end Set_Suppress_Elaboration_Warnings
;
5509 procedure Set_Suppress_Initialization
(Id
: E
; V
: B
:= True) is
5511 pragma Assert
(Is_Type
(Id
));
5512 Set_Flag105
(Id
, V
);
5513 end Set_Suppress_Initialization
;
5515 procedure Set_Suppress_Style_Checks
(Id
: E
; V
: B
:= True) is
5517 Set_Flag165
(Id
, V
);
5518 end Set_Suppress_Style_Checks
;
5520 procedure Set_Suppress_Value_Tracking_On_Call
(Id
: E
; V
: B
:= True) is
5522 Set_Flag217
(Id
, V
);
5523 end Set_Suppress_Value_Tracking_On_Call
;
5525 procedure Set_Task_Body_Procedure
(Id
: E
; V
: N
) is
5527 pragma Assert
(Ekind
(Id
) in Task_Kind
);
5529 end Set_Task_Body_Procedure
;
5531 procedure Set_Treat_As_Volatile
(Id
: E
; V
: B
:= True) is
5534 end Set_Treat_As_Volatile
;
5536 procedure Set_Underlying_Full_View
(Id
: E
; V
: E
) is
5538 pragma Assert
(Ekind
(Id
) in Private_Kind
);
5540 end Set_Underlying_Full_View
;
5542 procedure Set_Underlying_Record_View
(Id
: E
; V
: E
) is
5544 pragma Assert
(Ekind
(Id
) = E_Record_Type
);
5546 end Set_Underlying_Record_View
;
5548 procedure Set_Universal_Aliasing
(Id
: E
; V
: B
:= True) is
5550 pragma Assert
(Is_Type
(Id
) and then Is_Base_Type
(Id
));
5551 Set_Flag216
(Id
, V
);
5552 end Set_Universal_Aliasing
;
5554 procedure Set_Unset_Reference
(Id
: E
; V
: N
) is
5557 end Set_Unset_Reference
;
5559 procedure Set_Used_As_Generic_Actual
(Id
: E
; V
: B
:= True) is
5561 Set_Flag222
(Id
, V
);
5562 end Set_Used_As_Generic_Actual
;
5564 procedure Set_Uses_Lock_Free
(Id
: E
; V
: B
:= True) is
5566 pragma Assert
(Ekind
(Id
) = E_Protected_Type
);
5567 Set_Flag188
(Id
, V
);
5568 end Set_Uses_Lock_Free
;
5570 procedure Set_Uses_Sec_Stack
(Id
: E
; V
: B
:= True) is
5573 end Set_Uses_Sec_Stack
;
5575 procedure Set_Warnings_Off
(Id
: E
; V
: B
:= True) is
5578 end Set_Warnings_Off
;
5580 procedure Set_Warnings_Off_Used
(Id
: E
; V
: B
:= True) is
5582 Set_Flag236
(Id
, V
);
5583 end Set_Warnings_Off_Used
;
5585 procedure Set_Warnings_Off_Used_Unmodified
(Id
: E
; V
: B
:= True) is
5587 Set_Flag237
(Id
, V
);
5588 end Set_Warnings_Off_Used_Unmodified
;
5590 procedure Set_Warnings_Off_Used_Unreferenced
(Id
: E
; V
: B
:= True) is
5592 Set_Flag238
(Id
, V
);
5593 end Set_Warnings_Off_Used_Unreferenced
;
5595 procedure Set_Was_Hidden
(Id
: E
; V
: B
:= True) is
5597 Set_Flag196
(Id
, V
);
5600 procedure Set_Wrapped_Entity
(Id
: E
; V
: E
) is
5602 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
)
5603 and then Is_Primitive_Wrapper
(Id
));
5605 end Set_Wrapped_Entity
;
5607 -----------------------------------
5608 -- Field Initialization Routines --
5609 -----------------------------------
5611 procedure Init_Alignment
(Id
: E
) is
5613 Set_Uint14
(Id
, Uint_0
);
5616 procedure Init_Alignment
(Id
: E
; V
: Int
) is
5618 Set_Uint14
(Id
, UI_From_Int
(V
));
5621 procedure Init_Component_Bit_Offset
(Id
: E
) is
5623 Set_Uint11
(Id
, No_Uint
);
5624 end Init_Component_Bit_Offset
;
5626 procedure Init_Component_Bit_Offset
(Id
: E
; V
: Int
) is
5628 Set_Uint11
(Id
, UI_From_Int
(V
));
5629 end Init_Component_Bit_Offset
;
5631 procedure Init_Component_Size
(Id
: E
) is
5633 Set_Uint22
(Id
, Uint_0
);
5634 end Init_Component_Size
;
5636 procedure Init_Component_Size
(Id
: E
; V
: Int
) is
5638 Set_Uint22
(Id
, UI_From_Int
(V
));
5639 end Init_Component_Size
;
5641 procedure Init_Digits_Value
(Id
: E
) is
5643 Set_Uint17
(Id
, Uint_0
);
5644 end Init_Digits_Value
;
5646 procedure Init_Digits_Value
(Id
: E
; V
: Int
) is
5648 Set_Uint17
(Id
, UI_From_Int
(V
));
5649 end Init_Digits_Value
;
5651 procedure Init_Esize
(Id
: E
) is
5653 Set_Uint12
(Id
, Uint_0
);
5656 procedure Init_Esize
(Id
: E
; V
: Int
) is
5658 Set_Uint12
(Id
, UI_From_Int
(V
));
5661 procedure Init_Normalized_First_Bit
(Id
: E
) is
5663 Set_Uint8
(Id
, No_Uint
);
5664 end Init_Normalized_First_Bit
;
5666 procedure Init_Normalized_First_Bit
(Id
: E
; V
: Int
) is
5668 Set_Uint8
(Id
, UI_From_Int
(V
));
5669 end Init_Normalized_First_Bit
;
5671 procedure Init_Normalized_Position
(Id
: E
) is
5673 Set_Uint14
(Id
, No_Uint
);
5674 end Init_Normalized_Position
;
5676 procedure Init_Normalized_Position
(Id
: E
; V
: Int
) is
5678 Set_Uint14
(Id
, UI_From_Int
(V
));
5679 end Init_Normalized_Position
;
5681 procedure Init_Normalized_Position_Max
(Id
: E
) is
5683 Set_Uint10
(Id
, No_Uint
);
5684 end Init_Normalized_Position_Max
;
5686 procedure Init_Normalized_Position_Max
(Id
: E
; V
: Int
) is
5688 Set_Uint10
(Id
, UI_From_Int
(V
));
5689 end Init_Normalized_Position_Max
;
5691 procedure Init_RM_Size
(Id
: E
) is
5693 Set_Uint13
(Id
, Uint_0
);
5696 procedure Init_RM_Size
(Id
: E
; V
: Int
) is
5698 Set_Uint13
(Id
, UI_From_Int
(V
));
5701 -----------------------------
5702 -- Init_Component_Location --
5703 -----------------------------
5705 procedure Init_Component_Location
(Id
: E
) is
5707 Set_Uint8
(Id
, No_Uint
); -- Normalized_First_Bit
5708 Set_Uint10
(Id
, No_Uint
); -- Normalized_Position_Max
5709 Set_Uint11
(Id
, No_Uint
); -- Component_Bit_Offset
5710 Set_Uint12
(Id
, Uint_0
); -- Esize
5711 Set_Uint14
(Id
, No_Uint
); -- Normalized_Position
5712 end Init_Component_Location
;
5714 ----------------------------
5715 -- Init_Object_Size_Align --
5716 ----------------------------
5718 procedure Init_Object_Size_Align
(Id
: E
) is
5720 Set_Uint12
(Id
, Uint_0
); -- Esize
5721 Set_Uint14
(Id
, Uint_0
); -- Alignment
5722 end Init_Object_Size_Align
;
5728 procedure Init_Size
(Id
: E
; V
: Int
) is
5730 pragma Assert
(not Is_Object
(Id
));
5731 Set_Uint12
(Id
, UI_From_Int
(V
)); -- Esize
5732 Set_Uint13
(Id
, UI_From_Int
(V
)); -- RM_Size
5735 ---------------------
5736 -- Init_Size_Align --
5737 ---------------------
5739 procedure Init_Size_Align
(Id
: E
) is
5741 pragma Assert
(not Is_Object
(Id
));
5742 Set_Uint12
(Id
, Uint_0
); -- Esize
5743 Set_Uint13
(Id
, Uint_0
); -- RM_Size
5744 Set_Uint14
(Id
, Uint_0
); -- Alignment
5745 end Init_Size_Align
;
5747 ----------------------------------------------
5748 -- Type Representation Attribute Predicates --
5749 ----------------------------------------------
5751 function Known_Alignment
(E
: Entity_Id
) return B
is
5753 return Uint14
(E
) /= Uint_0
5754 and then Uint14
(E
) /= No_Uint
;
5755 end Known_Alignment
;
5757 function Known_Component_Bit_Offset
(E
: Entity_Id
) return B
is
5759 return Uint11
(E
) /= No_Uint
;
5760 end Known_Component_Bit_Offset
;
5762 function Known_Component_Size
(E
: Entity_Id
) return B
is
5764 return Uint22
(Base_Type
(E
)) /= Uint_0
5765 and then Uint22
(Base_Type
(E
)) /= No_Uint
;
5766 end Known_Component_Size
;
5768 function Known_Esize
(E
: Entity_Id
) return B
is
5770 return Uint12
(E
) /= Uint_0
5771 and then Uint12
(E
) /= No_Uint
;
5774 function Known_Normalized_First_Bit
(E
: Entity_Id
) return B
is
5776 return Uint8
(E
) /= No_Uint
;
5777 end Known_Normalized_First_Bit
;
5779 function Known_Normalized_Position
(E
: Entity_Id
) return B
is
5781 return Uint14
(E
) /= No_Uint
;
5782 end Known_Normalized_Position
;
5784 function Known_Normalized_Position_Max
(E
: Entity_Id
) return B
is
5786 return Uint10
(E
) /= No_Uint
;
5787 end Known_Normalized_Position_Max
;
5789 function Known_RM_Size
(E
: Entity_Id
) return B
is
5791 return Uint13
(E
) /= No_Uint
5792 and then (Uint13
(E
) /= Uint_0
5793 or else Is_Discrete_Type
(E
)
5794 or else Is_Fixed_Point_Type
(E
));
5797 function Known_Static_Component_Bit_Offset
(E
: Entity_Id
) return B
is
5799 return Uint11
(E
) /= No_Uint
5800 and then Uint11
(E
) >= Uint_0
;
5801 end Known_Static_Component_Bit_Offset
;
5803 function Known_Static_Component_Size
(E
: Entity_Id
) return B
is
5805 return Uint22
(Base_Type
(E
)) > Uint_0
;
5806 end Known_Static_Component_Size
;
5808 function Known_Static_Esize
(E
: Entity_Id
) return B
is
5810 return Uint12
(E
) > Uint_0
5811 and then not Is_Generic_Type
(E
);
5812 end Known_Static_Esize
;
5814 function Known_Static_Normalized_First_Bit
(E
: Entity_Id
) return B
is
5816 return Uint8
(E
) /= No_Uint
5817 and then Uint8
(E
) >= Uint_0
;
5818 end Known_Static_Normalized_First_Bit
;
5820 function Known_Static_Normalized_Position
(E
: Entity_Id
) return B
is
5822 return Uint14
(E
) /= No_Uint
5823 and then Uint14
(E
) >= Uint_0
;
5824 end Known_Static_Normalized_Position
;
5826 function Known_Static_Normalized_Position_Max
(E
: Entity_Id
) return B
is
5828 return Uint10
(E
) /= No_Uint
5829 and then Uint10
(E
) >= Uint_0
;
5830 end Known_Static_Normalized_Position_Max
;
5832 function Known_Static_RM_Size
(E
: Entity_Id
) return B
is
5834 return (Uint13
(E
) > Uint_0
5835 or else Is_Discrete_Type
(E
)
5836 or else Is_Fixed_Point_Type
(E
))
5837 and then not Is_Generic_Type
(E
);
5838 end Known_Static_RM_Size
;
5840 function Unknown_Alignment
(E
: Entity_Id
) return B
is
5842 return Uint14
(E
) = Uint_0
5843 or else Uint14
(E
) = No_Uint
;
5844 end Unknown_Alignment
;
5846 function Unknown_Component_Bit_Offset
(E
: Entity_Id
) return B
is
5848 return Uint11
(E
) = No_Uint
;
5849 end Unknown_Component_Bit_Offset
;
5851 function Unknown_Component_Size
(E
: Entity_Id
) return B
is
5853 return Uint22
(Base_Type
(E
)) = Uint_0
5855 Uint22
(Base_Type
(E
)) = No_Uint
;
5856 end Unknown_Component_Size
;
5858 function Unknown_Esize
(E
: Entity_Id
) return B
is
5860 return Uint12
(E
) = No_Uint
5862 Uint12
(E
) = Uint_0
;
5865 function Unknown_Normalized_First_Bit
(E
: Entity_Id
) return B
is
5867 return Uint8
(E
) = No_Uint
;
5868 end Unknown_Normalized_First_Bit
;
5870 function Unknown_Normalized_Position
(E
: Entity_Id
) return B
is
5872 return Uint14
(E
) = No_Uint
;
5873 end Unknown_Normalized_Position
;
5875 function Unknown_Normalized_Position_Max
(E
: Entity_Id
) return B
is
5877 return Uint10
(E
) = No_Uint
;
5878 end Unknown_Normalized_Position_Max
;
5880 function Unknown_RM_Size
(E
: Entity_Id
) return B
is
5882 return (Uint13
(E
) = Uint_0
5883 and then not Is_Discrete_Type
(E
)
5884 and then not Is_Fixed_Point_Type
(E
))
5885 or else Uint13
(E
) = No_Uint
;
5886 end Unknown_RM_Size
;
5888 --------------------
5889 -- Address_Clause --
5890 --------------------
5892 function Address_Clause
(Id
: E
) return N
is
5894 return Rep_Clause
(Id
, Name_Address
);
5901 function Aft_Value
(Id
: E
) return U
is
5903 Delta_Val
: Ureal
:= Delta_Value
(Id
);
5905 while Delta_Val
< Ureal_Tenth
loop
5906 Delta_Val
:= Delta_Val
* Ureal_10
;
5907 Result
:= Result
+ 1;
5910 return UI_From_Int
(Result
);
5913 ----------------------
5914 -- Alignment_Clause --
5915 ----------------------
5917 function Alignment_Clause
(Id
: E
) return N
is
5919 return Rep_Clause
(Id
, Name_Alignment
);
5920 end Alignment_Clause
;
5926 procedure Append_Entity
(Id
: Entity_Id
; V
: Entity_Id
) is
5928 if Last_Entity
(V
) = Empty
then
5929 Set_First_Entity
(Id
=> V
, V
=> Id
);
5931 Set_Next_Entity
(Last_Entity
(V
), Id
);
5934 Set_Next_Entity
(Id
, Empty
);
5936 Set_Last_Entity
(Id
=> V
, V
=> Id
);
5943 function Base_Type
(Id
: E
) return E
is
5945 if Is_Base_Type
(Id
) then
5948 pragma Assert
(Is_Type
(Id
));
5953 -------------------------
5954 -- Component_Alignment --
5955 -------------------------
5957 -- Component Alignment is encoded using two flags, Flag128/129 as
5958 -- follows. Note that both flags False = Align_Default, so that the
5959 -- default initialization of flags to False initializes component
5960 -- alignment to the default value as required.
5962 -- Flag128 Flag129 Value
5963 -- ------- ------- -----
5964 -- False False Calign_Default
5965 -- False True Calign_Component_Size
5966 -- True False Calign_Component_Size_4
5967 -- True True Calign_Storage_Unit
5969 function Component_Alignment
(Id
: E
) return C
is
5970 BT
: constant Node_Id
:= Base_Type
(Id
);
5973 pragma Assert
(Is_Array_Type
(Id
) or else Is_Record_Type
(Id
));
5975 if Flag128
(BT
) then
5976 if Flag129
(BT
) then
5977 return Calign_Storage_Unit
;
5979 return Calign_Component_Size_4
;
5983 if Flag129
(BT
) then
5984 return Calign_Component_Size
;
5986 return Calign_Default
;
5989 end Component_Alignment
;
5991 ----------------------
5992 -- Declaration_Node --
5993 ----------------------
5995 function Declaration_Node
(Id
: E
) return N
is
5999 if Ekind
(Id
) = E_Incomplete_Type
6000 and then Present
(Full_View
(Id
))
6002 P
:= Parent
(Full_View
(Id
));
6008 if Nkind
(P
) /= N_Selected_Component
6009 and then Nkind
(P
) /= N_Expanded_Name
6011 not (Nkind
(P
) = N_Defining_Program_Unit_Name
6012 and then Is_Child_Unit
(Id
))
6019 end Declaration_Node
;
6021 ---------------------
6022 -- Designated_Type --
6023 ---------------------
6025 function Designated_Type
(Id
: E
) return E
is
6029 Desig_Type
:= Directly_Designated_Type
(Id
);
6031 if Ekind
(Desig_Type
) = E_Incomplete_Type
6032 and then Present
(Full_View
(Desig_Type
))
6034 return Full_View
(Desig_Type
);
6036 elsif Is_Class_Wide_Type
(Desig_Type
)
6037 and then Ekind
(Etype
(Desig_Type
)) = E_Incomplete_Type
6038 and then Present
(Full_View
(Etype
(Desig_Type
)))
6039 and then Present
(Class_Wide_Type
(Full_View
(Etype
(Desig_Type
))))
6041 return Class_Wide_Type
(Full_View
(Etype
(Desig_Type
)));
6046 end Designated_Type
;
6048 ----------------------
6049 -- Entry_Index_Type --
6050 ----------------------
6052 function Entry_Index_Type
(Id
: E
) return N
is
6054 pragma Assert
(Ekind
(Id
) = E_Entry_Family
);
6055 return Etype
(Discrete_Subtype_Definition
(Parent
(Id
)));
6056 end Entry_Index_Type
;
6058 ---------------------
6059 -- First_Component --
6060 ---------------------
6062 function First_Component
(Id
: E
) return E
is
6067 (Is_Record_Type
(Id
) or else Is_Incomplete_Or_Private_Type
(Id
));
6069 Comp_Id
:= First_Entity
(Id
);
6070 while Present
(Comp_Id
) loop
6071 exit when Ekind
(Comp_Id
) = E_Component
;
6072 Comp_Id
:= Next_Entity
(Comp_Id
);
6076 end First_Component
;
6078 -------------------------------------
6079 -- First_Component_Or_Discriminant --
6080 -------------------------------------
6082 function First_Component_Or_Discriminant
(Id
: E
) return E
is
6087 (Is_Record_Type
(Id
)
6088 or else Is_Incomplete_Or_Private_Type
(Id
)
6089 or else Has_Discriminants
(Id
));
6091 Comp_Id
:= First_Entity
(Id
);
6092 while Present
(Comp_Id
) loop
6093 exit when Ekind_In
(Comp_Id
, E_Component
, E_Discriminant
);
6094 Comp_Id
:= Next_Entity
(Comp_Id
);
6098 end First_Component_Or_Discriminant
;
6104 function First_Formal
(Id
: E
) return E
is
6109 (Is_Overloadable
(Id
)
6110 or else Ekind_In
(Id
, E_Entry_Family
,
6112 E_Subprogram_Type
));
6114 if Ekind
(Id
) = E_Enumeration_Literal
then
6118 Formal
:= First_Entity
(Id
);
6120 if Present
(Formal
) and then Is_Formal
(Formal
) then
6128 ------------------------------
6129 -- First_Formal_With_Extras --
6130 ------------------------------
6132 function First_Formal_With_Extras
(Id
: E
) return E
is
6137 (Is_Overloadable
(Id
)
6138 or else Ekind_In
(Id
, E_Entry_Family
,
6140 E_Subprogram_Type
));
6142 if Ekind
(Id
) = E_Enumeration_Literal
then
6146 Formal
:= First_Entity
(Id
);
6148 if Present
(Formal
) and then Is_Formal
(Formal
) then
6151 return Extra_Formals
(Id
); -- Empty if no extra formals
6154 end First_Formal_With_Extras
;
6156 -------------------------------------
6157 -- Get_Attribute_Definition_Clause --
6158 -------------------------------------
6160 function Get_Attribute_Definition_Clause
6162 Id
: Attribute_Id
) return Node_Id
6167 N
:= First_Rep_Item
(E
);
6168 while Present
(N
) loop
6169 if Nkind
(N
) = N_Attribute_Definition_Clause
6170 and then Get_Attribute_Id
(Chars
(N
)) = Id
6179 end Get_Attribute_Definition_Clause
;
6185 function Get_Full_View
(T
: Entity_Id
) return Entity_Id
is
6187 if Ekind
(T
) = E_Incomplete_Type
and then Present
(Full_View
(T
)) then
6188 return Full_View
(T
);
6190 elsif Is_Class_Wide_Type
(T
)
6191 and then Ekind
(Root_Type
(T
)) = E_Incomplete_Type
6192 and then Present
(Full_View
(Root_Type
(T
)))
6194 return Class_Wide_Type
(Full_View
(Root_Type
(T
)));
6201 --------------------------------------
6202 -- Get_Record_Representation_Clause --
6203 --------------------------------------
6205 function Get_Record_Representation_Clause
(E
: Entity_Id
) return Node_Id
is
6209 N
:= First_Rep_Item
(E
);
6210 while Present
(N
) loop
6211 if Nkind
(N
) = N_Record_Representation_Clause
then
6219 end Get_Record_Representation_Clause
;
6221 ------------------------
6222 -- Has_Attach_Handler --
6223 ------------------------
6225 function Has_Attach_Handler
(Id
: E
) return B
is
6229 pragma Assert
(Is_Protected_Type
(Id
));
6231 Ritem
:= First_Rep_Item
(Id
);
6232 while Present
(Ritem
) loop
6233 if Nkind
(Ritem
) = N_Pragma
6234 and then Pragma_Name
(Ritem
) = Name_Attach_Handler
6238 Next_Rep_Item
(Ritem
);
6243 end Has_Attach_Handler
;
6249 function Has_Entries
(Id
: E
) return B
is
6253 pragma Assert
(Is_Concurrent_Type
(Id
));
6255 Ent
:= First_Entity
(Id
);
6256 while Present
(Ent
) loop
6257 if Is_Entry
(Ent
) then
6261 Ent
:= Next_Entity
(Ent
);
6267 ----------------------------
6268 -- Has_Foreign_Convention --
6269 ----------------------------
6271 function Has_Foreign_Convention
(Id
: E
) return B
is
6273 -- While regular Intrinsics such as the Standard operators fit in the
6274 -- "Ada" convention, those with an Interface_Name materialize GCC
6275 -- builtin imports for which Ada special treatments shouldn't apply.
6277 return Convention
(Id
) in Foreign_Convention
6278 or else (Convention
(Id
) = Convention_Intrinsic
6279 and then Present
(Interface_Name
(Id
)));
6280 end Has_Foreign_Convention
;
6282 ---------------------------
6283 -- Has_Interrupt_Handler --
6284 ---------------------------
6286 function Has_Interrupt_Handler
(Id
: E
) return B
is
6290 pragma Assert
(Is_Protected_Type
(Id
));
6292 Ritem
:= First_Rep_Item
(Id
);
6293 while Present
(Ritem
) loop
6294 if Nkind
(Ritem
) = N_Pragma
6295 and then Pragma_Name
(Ritem
) = Name_Interrupt_Handler
6299 Next_Rep_Item
(Ritem
);
6304 end Has_Interrupt_Handler
;
6306 --------------------
6307 -- Has_Unmodified --
6308 --------------------
6310 function Has_Unmodified
(E
: Entity_Id
) return Boolean is
6312 if Has_Pragma_Unmodified
(E
) then
6314 elsif Warnings_Off
(E
) then
6315 Set_Warnings_Off_Used_Unmodified
(E
);
6322 ---------------------
6323 -- Has_Unreferenced --
6324 ---------------------
6326 function Has_Unreferenced
(E
: Entity_Id
) return Boolean is
6328 if Has_Pragma_Unreferenced
(E
) then
6330 elsif Warnings_Off
(E
) then
6331 Set_Warnings_Off_Used_Unreferenced
(E
);
6336 end Has_Unreferenced
;
6338 ----------------------
6339 -- Has_Warnings_Off --
6340 ----------------------
6342 function Has_Warnings_Off
(E
: Entity_Id
) return Boolean is
6344 if Warnings_Off
(E
) then
6345 Set_Warnings_Off_Used
(E
);
6350 end Has_Warnings_Off
;
6352 ------------------------------
6353 -- Implementation_Base_Type --
6354 ------------------------------
6356 function Implementation_Base_Type
(Id
: E
) return E
is
6361 Bastyp
:= Base_Type
(Id
);
6363 if Is_Incomplete_Or_Private_Type
(Bastyp
) then
6364 Imptyp
:= Underlying_Type
(Bastyp
);
6366 -- If we have an implementation type, then just return it,
6367 -- otherwise we return the Base_Type anyway. This can only
6368 -- happen in error situations and should avoid some error bombs.
6370 if Present
(Imptyp
) then
6371 return Base_Type
(Imptyp
);
6379 end Implementation_Base_Type
;
6381 -------------------------
6382 -- Invariant_Procedure --
6383 -------------------------
6385 function Invariant_Procedure
(Id
: E
) return E
is
6389 pragma Assert
(Is_Type
(Id
) and then Has_Invariants
(Id
));
6391 if No
(Subprograms_For_Type
(Id
)) then
6395 S
:= Subprograms_For_Type
(Id
);
6396 while Present
(S
) loop
6397 if Has_Invariants
(S
) then
6400 S
:= Subprograms_For_Type
(S
);
6406 end Invariant_Procedure
;
6412 -- Global flag table allowing rapid computation of this function
6414 Entity_Is_Base_Type
: constant array (Entity_Kind
) of Boolean :=
6415 (E_Enumeration_Subtype |
6417 E_Signed_Integer_Subtype |
6418 E_Modular_Integer_Subtype |
6419 E_Floating_Point_Subtype |
6420 E_Ordinary_Fixed_Point_Subtype |
6421 E_Decimal_Fixed_Point_Subtype |
6426 E_Record_Subtype_With_Private |
6427 E_Limited_Private_Subtype |
6429 E_Protected_Subtype |
6431 E_String_Literal_Subtype |
6432 E_Class_Wide_Subtype
=> False,
6435 function Is_Base_Type
(Id
: E
) return Boolean is
6437 return Entity_Is_Base_Type
(Ekind
(Id
));
6440 ---------------------
6441 -- Is_Boolean_Type --
6442 ---------------------
6444 function Is_Boolean_Type
(Id
: E
) return B
is
6446 return Root_Type
(Id
) = Standard_Boolean
;
6447 end Is_Boolean_Type
;
6449 ------------------------
6450 -- Is_Constant_Object --
6451 ------------------------
6453 function Is_Constant_Object
(Id
: E
) return B
is
6454 K
: constant Entity_Kind
:= Ekind
(Id
);
6457 K
= E_Constant
or else K
= E_In_Parameter
or else K
= E_Loop_Parameter
;
6458 end Is_Constant_Object
;
6460 --------------------
6461 -- Is_Discriminal --
6462 --------------------
6464 function Is_Discriminal
(Id
: E
) return B
is
6466 return (Ekind_In
(Id
, E_Constant
, E_In_Parameter
)
6467 and then Present
(Discriminal_Link
(Id
)));
6470 ----------------------
6471 -- Is_Dynamic_Scope --
6472 ----------------------
6474 function Is_Dynamic_Scope
(Id
: E
) return B
is
6477 Ekind
(Id
) = E_Block
6479 Ekind
(Id
) = E_Function
6481 Ekind
(Id
) = E_Procedure
6483 Ekind
(Id
) = E_Subprogram_Body
6485 Ekind
(Id
) = E_Task_Type
6487 (Ekind
(Id
) = E_Limited_Private_Type
6488 and then Present
(Full_View
(Id
))
6489 and then Ekind
(Full_View
(Id
)) = E_Task_Type
)
6491 Ekind
(Id
) = E_Entry
6493 Ekind
(Id
) = E_Entry_Family
6495 Ekind
(Id
) = E_Return_Statement
;
6496 end Is_Dynamic_Scope
;
6498 --------------------
6499 -- Is_Entity_Name --
6500 --------------------
6502 function Is_Entity_Name
(N
: Node_Id
) return Boolean is
6503 Kind
: constant Node_Kind
:= Nkind
(N
);
6506 -- Identifiers, operator symbols, expanded names are entity names
6508 return Kind
= N_Identifier
6509 or else Kind
= N_Operator_Symbol
6510 or else Kind
= N_Expanded_Name
6512 -- Attribute references are entity names if they refer to an entity.
6513 -- Note that we don't do this by testing for the presence of the
6514 -- Entity field in the N_Attribute_Reference node, since it may not
6515 -- have been set yet.
6517 or else (Kind
= N_Attribute_Reference
6518 and then Is_Entity_Attribute_Name
(Attribute_Name
(N
)));
6525 function Is_Finalizer
(Id
: E
) return B
is
6527 return Ekind
(Id
) = E_Procedure
6528 and then Chars
(Id
) = Name_uFinalizer
;
6531 --------------------
6532 -- Is_Input_State --
6533 --------------------
6535 function Is_Input_State
(Id
: E
) return B
is
6538 Ekind
(Id
) = E_Abstract_State
and then Has_Property
(Id
, Name_Input
);
6545 function Is_Null_State
(Id
: E
) return B
is
6548 Ekind
(Id
) = E_Abstract_State
6549 and then Nkind
(Parent
(Id
)) = N_Null
;
6552 ---------------------
6553 -- Is_Output_State --
6554 ---------------------
6556 function Is_Output_State
(Id
: E
) return B
is
6559 Ekind
(Id
) = E_Abstract_State
and then Has_Property
(Id
, Name_Output
);
6560 end Is_Output_State
;
6562 -----------------------------------
6563 -- Is_Package_Or_Generic_Package --
6564 -----------------------------------
6566 function Is_Package_Or_Generic_Package
(Id
: E
) return B
is
6569 Ekind
(Id
) = E_Package
6571 Ekind
(Id
) = E_Generic_Package
;
6572 end Is_Package_Or_Generic_Package
;
6578 function Is_Prival
(Id
: E
) return B
is
6580 return (Ekind_In
(Id
, E_Constant
, E_Variable
)
6581 and then Present
(Prival_Link
(Id
)));
6584 ----------------------------
6585 -- Is_Protected_Component --
6586 ----------------------------
6588 function Is_Protected_Component
(Id
: E
) return B
is
6590 return Ekind
(Id
) = E_Component
6591 and then Is_Protected_Type
(Scope
(Id
));
6592 end Is_Protected_Component
;
6594 ----------------------------
6595 -- Is_Protected_Interface --
6596 ----------------------------
6598 function Is_Protected_Interface
(Id
: E
) return B
is
6599 Typ
: constant Entity_Id
:= Base_Type
(Id
);
6601 if not Is_Interface
(Typ
) then
6603 elsif Is_Class_Wide_Type
(Typ
) then
6604 return Is_Protected_Interface
(Etype
(Typ
));
6606 return Protected_Present
(Type_Definition
(Parent
(Typ
)));
6608 end Is_Protected_Interface
;
6610 ------------------------------
6611 -- Is_Protected_Record_Type --
6612 ------------------------------
6614 function Is_Protected_Record_Type
(Id
: E
) return B
is
6617 Is_Concurrent_Record_Type
(Id
)
6618 and then Is_Protected_Type
(Corresponding_Concurrent_Type
(Id
));
6619 end Is_Protected_Record_Type
;
6621 --------------------------------
6622 -- Is_Standard_Character_Type --
6623 --------------------------------
6625 function Is_Standard_Character_Type
(Id
: E
) return B
is
6627 if Is_Type
(Id
) then
6629 R
: constant Entity_Id
:= Root_Type
(Id
);
6632 R
= Standard_Character
6634 R
= Standard_Wide_Character
6636 R
= Standard_Wide_Wide_Character
;
6642 end Is_Standard_Character_Type
;
6644 --------------------
6645 -- Is_String_Type --
6646 --------------------
6648 function Is_String_Type
(Id
: E
) return B
is
6650 return Ekind
(Id
) in String_Kind
6651 or else (Is_Array_Type
(Id
)
6652 and then Id
/= Any_Composite
6653 and then Number_Dimensions
(Id
) = 1
6654 and then Is_Character_Type
(Component_Type
(Id
)));
6657 -------------------------------
6658 -- Is_Synchronized_Interface --
6659 -------------------------------
6661 function Is_Synchronized_Interface
(Id
: E
) return B
is
6662 Typ
: constant Entity_Id
:= Base_Type
(Id
);
6665 if not Is_Interface
(Typ
) then
6668 elsif Is_Class_Wide_Type
(Typ
) then
6669 return Is_Synchronized_Interface
(Etype
(Typ
));
6672 return Protected_Present
(Type_Definition
(Parent
(Typ
)))
6673 or else Synchronized_Present
(Type_Definition
(Parent
(Typ
)))
6674 or else Task_Present
(Type_Definition
(Parent
(Typ
)));
6676 end Is_Synchronized_Interface
;
6678 -----------------------
6679 -- Is_Task_Interface --
6680 -----------------------
6682 function Is_Task_Interface
(Id
: E
) return B
is
6683 Typ
: constant Entity_Id
:= Base_Type
(Id
);
6685 if not Is_Interface
(Typ
) then
6687 elsif Is_Class_Wide_Type
(Typ
) then
6688 return Is_Task_Interface
(Etype
(Typ
));
6690 return Task_Present
(Type_Definition
(Parent
(Typ
)));
6692 end Is_Task_Interface
;
6694 -------------------------
6695 -- Is_Task_Record_Type --
6696 -------------------------
6698 function Is_Task_Record_Type
(Id
: E
) return B
is
6701 Is_Concurrent_Record_Type
(Id
)
6702 and then Is_Task_Type
(Corresponding_Concurrent_Type
(Id
));
6703 end Is_Task_Record_Type
;
6705 -----------------------
6706 -- Is_Volatile_State --
6707 -----------------------
6709 function Is_Volatile_State
(Id
: E
) return B
is
6712 Ekind
(Id
) = E_Abstract_State
6713 and then Has_Property
(Id
, Name_Volatile
);
6714 end Is_Volatile_State
;
6716 ------------------------
6717 -- Is_Wrapper_Package --
6718 ------------------------
6720 function Is_Wrapper_Package
(Id
: E
) return B
is
6722 return (Ekind
(Id
) = E_Package
6723 and then Present
(Related_Instance
(Id
)));
6724 end Is_Wrapper_Package
;
6730 function Last_Formal
(Id
: E
) return E
is
6735 (Is_Overloadable
(Id
)
6736 or else Ekind_In
(Id
, E_Entry_Family
,
6738 E_Subprogram_Type
));
6740 if Ekind
(Id
) = E_Enumeration_Literal
then
6744 Formal
:= First_Formal
(Id
);
6746 if Present
(Formal
) then
6747 while Present
(Next_Formal
(Formal
)) loop
6748 Formal
:= Next_Formal
(Formal
);
6756 function Model_Emin_Value
(Id
: E
) return Uint
is
6758 return Machine_Emin_Value
(Id
);
6759 end Model_Emin_Value
;
6761 -------------------------
6762 -- Model_Epsilon_Value --
6763 -------------------------
6765 function Model_Epsilon_Value
(Id
: E
) return Ureal
is
6766 Radix
: constant Ureal
:= UR_From_Uint
(Machine_Radix_Value
(Id
));
6768 return Radix
** (1 - Model_Mantissa_Value
(Id
));
6769 end Model_Epsilon_Value
;
6771 --------------------------
6772 -- Model_Mantissa_Value --
6773 --------------------------
6775 function Model_Mantissa_Value
(Id
: E
) return Uint
is
6777 return Machine_Mantissa_Value
(Id
);
6778 end Model_Mantissa_Value
;
6780 -----------------------
6781 -- Model_Small_Value --
6782 -----------------------
6784 function Model_Small_Value
(Id
: E
) return Ureal
is
6785 Radix
: constant Ureal
:= UR_From_Uint
(Machine_Radix_Value
(Id
));
6787 return Radix
** (Model_Emin_Value
(Id
) - 1);
6788 end Model_Small_Value
;
6790 ------------------------
6791 -- Machine_Emax_Value --
6792 ------------------------
6794 function Machine_Emax_Value
(Id
: E
) return Uint
is
6795 Digs
: constant Pos
:= UI_To_Int
(Digits_Value
(Base_Type
(Id
)));
6798 case Float_Rep
(Id
) is
6801 when 1 .. 6 => return Uint_128
;
6802 when 7 .. 15 => return 2**10;
6803 when 16 .. 33 => return 2**14;
6804 when others => return No_Uint
;
6809 when 1 .. 9 => return 2**7 - 1;
6810 when 10 .. 15 => return 2**10 - 1;
6811 when others => return No_Uint
;
6815 return Uint_2
** Uint_7
- Uint_1
;
6817 end Machine_Emax_Value
;
6819 ------------------------
6820 -- Machine_Emin_Value --
6821 ------------------------
6823 function Machine_Emin_Value
(Id
: E
) return Uint
is
6825 case Float_Rep
(Id
) is
6826 when IEEE_Binary
=> return Uint_3
- Machine_Emax_Value
(Id
);
6827 when VAX_Native
=> return -Machine_Emax_Value
(Id
);
6828 when AAMP
=> return -Machine_Emax_Value
(Id
);
6830 end Machine_Emin_Value
;
6832 ----------------------------
6833 -- Machine_Mantissa_Value --
6834 ----------------------------
6836 function Machine_Mantissa_Value
(Id
: E
) return Uint
is
6837 Digs
: constant Pos
:= UI_To_Int
(Digits_Value
(Base_Type
(Id
)));
6840 case Float_Rep
(Id
) is
6843 when 1 .. 6 => return Uint_24
;
6844 when 7 .. 15 => return UI_From_Int
(53);
6845 when 16 .. 18 => return Uint_64
;
6846 when 19 .. 33 => return UI_From_Int
(113);
6847 when others => return No_Uint
;
6852 when 1 .. 6 => return Uint_24
;
6853 when 7 .. 9 => return UI_From_Int
(56);
6854 when 10 .. 15 => return UI_From_Int
(53);
6855 when others => return No_Uint
;
6860 when 1 .. 6 => return Uint_24
;
6861 when 7 .. 9 => return UI_From_Int
(40);
6862 when others => return No_Uint
;
6865 end Machine_Mantissa_Value
;
6867 -------------------------
6868 -- Machine_Radix_Value --
6869 -------------------------
6871 function Machine_Radix_Value
(Id
: E
) return U
is
6873 case Float_Rep
(Id
) is
6874 when IEEE_Binary | VAX_Native | AAMP
=>
6877 end Machine_Radix_Value
;
6879 --------------------
6880 -- Next_Component --
6881 --------------------
6883 function Next_Component
(Id
: E
) return E
is
6887 Comp_Id
:= Next_Entity
(Id
);
6888 while Present
(Comp_Id
) loop
6889 exit when Ekind
(Comp_Id
) = E_Component
;
6890 Comp_Id
:= Next_Entity
(Comp_Id
);
6896 ------------------------------------
6897 -- Next_Component_Or_Discriminant --
6898 ------------------------------------
6900 function Next_Component_Or_Discriminant
(Id
: E
) return E
is
6904 Comp_Id
:= Next_Entity
(Id
);
6905 while Present
(Comp_Id
) loop
6906 exit when Ekind_In
(Comp_Id
, E_Component
, E_Discriminant
);
6907 Comp_Id
:= Next_Entity
(Comp_Id
);
6911 end Next_Component_Or_Discriminant
;
6913 -----------------------
6914 -- Next_Discriminant --
6915 -----------------------
6917 -- This function actually implements both Next_Discriminant and
6918 -- Next_Stored_Discriminant by making sure that the Discriminant
6919 -- returned is of the same variety as Id.
6921 function Next_Discriminant
(Id
: E
) return E
is
6923 -- Derived Tagged types with private extensions look like this...
6925 -- E_Discriminant d1
6926 -- E_Discriminant d2
6928 -- E_Discriminant d1
6929 -- E_Discriminant d2
6932 -- so it is critical not to go past the leading discriminants
6937 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
6940 D
:= Next_Entity
(D
);
6942 or else (Ekind
(D
) /= E_Discriminant
6943 and then not Is_Itype
(D
))
6948 exit when Ekind
(D
) = E_Discriminant
6949 and then (Is_Completely_Hidden
(D
) = Is_Completely_Hidden
(Id
));
6953 end Next_Discriminant
;
6959 function Next_Formal
(Id
: E
) return E
is
6963 -- Follow the chain of declared entities as long as the kind of the
6964 -- entity corresponds to a formal parameter. Skip internal entities
6965 -- that may have been created for implicit subtypes, in the process
6966 -- of analyzing default expressions.
6970 P
:= Next_Entity
(P
);
6972 if No
(P
) or else Is_Formal
(P
) then
6974 elsif not Is_Internal
(P
) then
6980 -----------------------------
6981 -- Next_Formal_With_Extras --
6982 -----------------------------
6984 function Next_Formal_With_Extras
(Id
: E
) return E
is
6986 if Present
(Extra_Formal
(Id
)) then
6987 return Extra_Formal
(Id
);
6989 return Next_Formal
(Id
);
6991 end Next_Formal_With_Extras
;
6997 function Next_Index
(Id
: Node_Id
) return Node_Id
is
7006 function Next_Literal
(Id
: E
) return E
is
7008 pragma Assert
(Nkind
(Id
) in N_Entity
);
7012 ------------------------------
7013 -- Next_Stored_Discriminant --
7014 ------------------------------
7016 function Next_Stored_Discriminant
(Id
: E
) return E
is
7018 -- See comment in Next_Discriminant
7020 return Next_Discriminant
(Id
);
7021 end Next_Stored_Discriminant
;
7023 -----------------------
7024 -- Number_Dimensions --
7025 -----------------------
7027 function Number_Dimensions
(Id
: E
) return Pos
is
7032 if Ekind
(Id
) in String_Kind
then
7037 T
:= First_Index
(Id
);
7038 while Present
(T
) loop
7045 end Number_Dimensions
;
7047 --------------------
7048 -- Number_Entries --
7049 --------------------
7051 function Number_Entries
(Id
: E
) return Nat
is
7056 pragma Assert
(Is_Concurrent_Type
(Id
));
7059 Ent
:= First_Entity
(Id
);
7060 while Present
(Ent
) loop
7061 if Is_Entry
(Ent
) then
7065 Ent
:= Next_Entity
(Ent
);
7071 --------------------
7072 -- Number_Formals --
7073 --------------------
7075 function Number_Formals
(Id
: E
) return Pos
is
7081 Formal
:= First_Formal
(Id
);
7082 while Present
(Formal
) loop
7084 Formal
:= Next_Formal
(Formal
);
7090 --------------------
7091 -- Parameter_Mode --
7092 --------------------
7094 function Parameter_Mode
(Id
: E
) return Formal_Kind
is
7099 ------------------------
7100 -- Predicate_Function --
7101 ------------------------
7103 function Predicate_Function
(Id
: E
) return E
is
7107 pragma Assert
(Is_Type
(Id
));
7109 if No
(Subprograms_For_Type
(Id
)) then
7113 S
:= Subprograms_For_Type
(Id
);
7114 while Present
(S
) loop
7115 if Has_Predicates
(S
) then
7118 S
:= Subprograms_For_Type
(S
);
7124 end Predicate_Function
;
7126 -------------------------
7127 -- Present_In_Rep_Item --
7128 -------------------------
7130 function Present_In_Rep_Item
(E
: Entity_Id
; N
: Node_Id
) return Boolean is
7134 Ritem
:= First_Rep_Item
(E
);
7136 while Present
(Ritem
) loop
7141 Next_Rep_Item
(Ritem
);
7145 end Present_In_Rep_Item
;
7147 --------------------------
7148 -- Primitive_Operations --
7149 --------------------------
7151 function Primitive_Operations
(Id
: E
) return L
is
7153 if Is_Concurrent_Type
(Id
) then
7154 if Present
(Corresponding_Record_Type
(Id
)) then
7155 return Direct_Primitive_Operations
7156 (Corresponding_Record_Type
(Id
));
7158 -- If expansion is disabled the corresponding record type is absent,
7159 -- but if the type has ancestors it may have primitive operations.
7161 elsif Is_Tagged_Type
(Id
) then
7162 return Direct_Primitive_Operations
(Id
);
7168 return Direct_Primitive_Operations
(Id
);
7170 end Primitive_Operations
;
7172 ---------------------
7173 -- Record_Rep_Item --
7174 ---------------------
7176 procedure Record_Rep_Item
(E
: Entity_Id
; N
: Node_Id
) is
7178 Set_Next_Rep_Item
(N
, First_Rep_Item
(E
));
7179 Set_First_Rep_Item
(E
, N
);
7180 end Record_Rep_Item
;
7186 function Root_Type
(Id
: E
) return E
is
7190 pragma Assert
(Nkind
(Id
) in N_Entity
);
7192 T
:= Base_Type
(Id
);
7194 if Ekind
(T
) = E_Class_Wide_Type
then
7206 -- Following test catches some error cases resulting from
7209 elsif No
(Etyp
) then
7210 Check_Error_Detected
;
7213 elsif Is_Private_Type
(T
) and then Etyp
= Full_View
(T
) then
7216 elsif Is_Private_Type
(Etyp
) and then Full_View
(Etyp
) = T
then
7222 -- Return if there is a circularity in the inheritance chain. This
7223 -- happens in some error situations and we do not want to get
7224 -- stuck in this loop.
7226 if T
= Base_Type
(Id
) then
7233 ---------------------
7234 -- Safe_Emax_Value --
7235 ---------------------
7237 function Safe_Emax_Value
(Id
: E
) return Uint
is
7239 return Machine_Emax_Value
(Id
);
7240 end Safe_Emax_Value
;
7242 ----------------------
7243 -- Safe_First_Value --
7244 ----------------------
7246 function Safe_First_Value
(Id
: E
) return Ureal
is
7248 return -Safe_Last_Value
(Id
);
7249 end Safe_First_Value
;
7251 ---------------------
7252 -- Safe_Last_Value --
7253 ---------------------
7255 function Safe_Last_Value
(Id
: E
) return Ureal
is
7256 Radix
: constant Uint
:= Machine_Radix_Value
(Id
);
7257 Mantissa
: constant Uint
:= Machine_Mantissa_Value
(Id
);
7258 Emax
: constant Uint
:= Safe_Emax_Value
(Id
);
7259 Significand
: constant Uint
:= Radix
** Mantissa
- 1;
7260 Exponent
: constant Uint
:= Emax
- Mantissa
;
7266 (Num
=> Significand
* 2 ** (Exponent
mod 4),
7267 Den
=> -Exponent
/ 4,
7273 (Num
=> Significand
,
7277 end Safe_Last_Value
;
7283 function Scope_Depth
(Id
: E
) return Uint
is
7288 while Is_Record_Type
(Scop
) loop
7289 Scop
:= Scope
(Scop
);
7292 return Scope_Depth_Value
(Scop
);
7295 ---------------------
7296 -- Scope_Depth_Set --
7297 ---------------------
7299 function Scope_Depth_Set
(Id
: E
) return B
is
7301 return not Is_Record_Type
(Id
)
7302 and then Field22
(Id
) /= Union_Id
(Empty
);
7303 end Scope_Depth_Set
;
7305 -----------------------------
7306 -- Set_Component_Alignment --
7307 -----------------------------
7309 -- Component Alignment is encoded using two flags, Flag128/129 as
7310 -- follows. Note that both flags False = Align_Default, so that the
7311 -- default initialization of flags to False initializes component
7312 -- alignment to the default value as required.
7314 -- Flag128 Flag129 Value
7315 -- ------- ------- -----
7316 -- False False Calign_Default
7317 -- False True Calign_Component_Size
7318 -- True False Calign_Component_Size_4
7319 -- True True Calign_Storage_Unit
7321 procedure Set_Component_Alignment
(Id
: E
; V
: C
) is
7323 pragma Assert
((Is_Array_Type
(Id
) or else Is_Record_Type
(Id
))
7324 and then Is_Base_Type
(Id
));
7327 when Calign_Default
=>
7328 Set_Flag128
(Id
, False);
7329 Set_Flag129
(Id
, False);
7331 when Calign_Component_Size
=>
7332 Set_Flag128
(Id
, False);
7333 Set_Flag129
(Id
, True);
7335 when Calign_Component_Size_4
=>
7336 Set_Flag128
(Id
, True);
7337 Set_Flag129
(Id
, False);
7339 when Calign_Storage_Unit
=>
7340 Set_Flag128
(Id
, True);
7341 Set_Flag129
(Id
, True);
7343 end Set_Component_Alignment
;
7345 -----------------------------
7346 -- Set_Invariant_Procedure --
7347 -----------------------------
7349 procedure Set_Invariant_Procedure
(Id
: E
; V
: E
) is
7353 pragma Assert
(Is_Type
(Id
) and then Has_Invariants
(Id
));
7355 S
:= Subprograms_For_Type
(Id
);
7356 Set_Subprograms_For_Type
(Id
, V
);
7357 Set_Subprograms_For_Type
(V
, S
);
7359 while Present
(S
) loop
7360 if Has_Invariants
(S
) then
7361 raise Program_Error
;
7363 S
:= Subprograms_For_Type
(S
);
7366 end Set_Invariant_Procedure
;
7368 ----------------------------
7369 -- Set_Predicate_Function --
7370 ----------------------------
7372 procedure Set_Predicate_Function
(Id
: E
; V
: E
) is
7376 pragma Assert
(Is_Type
(Id
) and then Has_Predicates
(Id
));
7378 S
:= Subprograms_For_Type
(Id
);
7379 Set_Subprograms_For_Type
(Id
, V
);
7380 Set_Subprograms_For_Type
(V
, S
);
7382 while Present
(S
) loop
7383 if Has_Predicates
(S
) then
7384 raise Program_Error
;
7386 S
:= Subprograms_For_Type
(S
);
7389 end Set_Predicate_Function
;
7395 function Size_Clause
(Id
: E
) return N
is
7397 return Rep_Clause
(Id
, Name_Size
);
7400 ------------------------
7401 -- Stream_Size_Clause --
7402 ------------------------
7404 function Stream_Size_Clause
(Id
: E
) return N
is
7406 return Rep_Clause
(Id
, Name_Stream_Size
);
7407 end Stream_Size_Clause
;
7413 function Subtype_Kind
(K
: Entity_Kind
) return Entity_Kind
is
7419 Kind
:= E_Access_Subtype
;
7423 Kind
:= E_Array_Subtype
;
7425 when E_Class_Wide_Type |
7426 E_Class_Wide_Subtype
=>
7427 Kind
:= E_Class_Wide_Subtype
;
7429 when E_Decimal_Fixed_Point_Type |
7430 E_Decimal_Fixed_Point_Subtype
=>
7431 Kind
:= E_Decimal_Fixed_Point_Subtype
;
7433 when E_Ordinary_Fixed_Point_Type |
7434 E_Ordinary_Fixed_Point_Subtype
=>
7435 Kind
:= E_Ordinary_Fixed_Point_Subtype
;
7437 when E_Private_Type |
7438 E_Private_Subtype
=>
7439 Kind
:= E_Private_Subtype
;
7441 when E_Limited_Private_Type |
7442 E_Limited_Private_Subtype
=>
7443 Kind
:= E_Limited_Private_Subtype
;
7445 when E_Record_Type_With_Private |
7446 E_Record_Subtype_With_Private
=>
7447 Kind
:= E_Record_Subtype_With_Private
;
7449 when E_Record_Type |
7451 Kind
:= E_Record_Subtype
;
7453 when E_String_Type |
7455 Kind
:= E_String_Subtype
;
7457 when Enumeration_Kind
=>
7458 Kind
:= E_Enumeration_Subtype
;
7461 Kind
:= E_Floating_Point_Subtype
;
7463 when Signed_Integer_Kind
=>
7464 Kind
:= E_Signed_Integer_Subtype
;
7466 when Modular_Integer_Kind
=>
7467 Kind
:= E_Modular_Integer_Subtype
;
7469 when Protected_Kind
=>
7470 Kind
:= E_Protected_Subtype
;
7473 Kind
:= E_Task_Subtype
;
7477 raise Program_Error
;
7483 ---------------------
7484 -- Type_High_Bound --
7485 ---------------------
7487 function Type_High_Bound
(Id
: E
) return Node_Id
is
7488 Rng
: constant Node_Id
:= Scalar_Range
(Id
);
7490 if Nkind
(Rng
) = N_Subtype_Indication
then
7491 return High_Bound
(Range_Expression
(Constraint
(Rng
)));
7493 return High_Bound
(Rng
);
7495 end Type_High_Bound
;
7497 --------------------
7498 -- Type_Low_Bound --
7499 --------------------
7501 function Type_Low_Bound
(Id
: E
) return Node_Id
is
7502 Rng
: constant Node_Id
:= Scalar_Range
(Id
);
7504 if Nkind
(Rng
) = N_Subtype_Indication
then
7505 return Low_Bound
(Range_Expression
(Constraint
(Rng
)));
7507 return Low_Bound
(Rng
);
7511 ---------------------
7512 -- Underlying_Type --
7513 ---------------------
7515 function Underlying_Type
(Id
: E
) return E
is
7517 -- For record_with_private the underlying type is always the direct
7518 -- full view. Never try to take the full view of the parent it
7519 -- doesn't make sense.
7521 if Ekind
(Id
) = E_Record_Type_With_Private
then
7522 return Full_View
(Id
);
7524 elsif Ekind
(Id
) in Incomplete_Or_Private_Kind
then
7526 -- If we have an incomplete or private type with a full view,
7527 -- then we return the Underlying_Type of this full view
7529 if Present
(Full_View
(Id
)) then
7530 if Id
= Full_View
(Id
) then
7532 -- Previous error in declaration
7537 return Underlying_Type
(Full_View
(Id
));
7540 -- If we have an incomplete entity that comes from the limited
7541 -- view then we return the Underlying_Type of its non-limited
7544 elsif From_With_Type
(Id
)
7545 and then Present
(Non_Limited_View
(Id
))
7547 return Underlying_Type
(Non_Limited_View
(Id
));
7549 -- Otherwise check for the case where we have a derived type or
7550 -- subtype, and if so get the Underlying_Type of the parent type.
7552 elsif Etype
(Id
) /= Id
then
7553 return Underlying_Type
(Etype
(Id
));
7555 -- Otherwise we have an incomplete or private type that has
7556 -- no full view, which means that we have not encountered the
7557 -- completion, so return Empty to indicate the underlying type
7558 -- is not yet known.
7564 -- For non-incomplete, non-private types, return the type itself
7565 -- Also for entities that are not types at all return the entity
7571 end Underlying_Type
;
7577 function Vax_Float
(Id
: E
) return B
is
7579 return Is_Floating_Point_Type
(Id
) and then Float_Rep
(Id
) = VAX_Native
;
7582 ------------------------
7583 -- Write_Entity_Flags --
7584 ------------------------
7586 procedure Write_Entity_Flags
(Id
: Entity_Id
; Prefix
: String) is
7588 procedure W
(Flag_Name
: String; Flag
: Boolean);
7589 -- Write out given flag if it is set
7595 procedure W
(Flag_Name
: String; Flag
: Boolean) is
7599 Write_Str
(Flag_Name
);
7600 Write_Str
(" = True");
7605 -- Start of processing for Write_Entity_Flags
7608 if (Is_Array_Type
(Id
) or else Is_Record_Type
(Id
))
7609 and then Is_Base_Type
(Id
)
7612 Write_Str
("Component_Alignment = ");
7614 case Component_Alignment
(Id
) is
7615 when Calign_Default
=>
7616 Write_Str
("Calign_Default");
7618 when Calign_Component_Size
=>
7619 Write_Str
("Calign_Component_Size");
7621 when Calign_Component_Size_4
=>
7622 Write_Str
("Calign_Component_Size_4");
7624 when Calign_Storage_Unit
=>
7625 Write_Str
("Calign_Storage_Unit");
7631 W
("Address_Taken", Flag104
(Id
));
7632 W
("Body_Needed_For_SAL", Flag40
(Id
));
7633 W
("C_Pass_By_Copy", Flag125
(Id
));
7634 W
("Can_Never_Be_Null", Flag38
(Id
));
7635 W
("Checks_May_Be_Suppressed", Flag31
(Id
));
7636 W
("Debug_Info_Off", Flag166
(Id
));
7637 W
("Default_Expressions_Processed", Flag108
(Id
));
7638 W
("Delay_Cleanups", Flag114
(Id
));
7639 W
("Delay_Subprogram_Descriptors", Flag50
(Id
));
7640 W
("Depends_On_Private", Flag14
(Id
));
7641 W
("Discard_Names", Flag88
(Id
));
7642 W
("Elaboration_Entity_Required", Flag174
(Id
));
7643 W
("Elaborate_Body_Desirable", Flag210
(Id
));
7644 W
("Entry_Accepted", Flag152
(Id
));
7645 W
("Can_Use_Internal_Rep", Flag229
(Id
));
7646 W
("Finalize_Storage_Only", Flag158
(Id
));
7647 W
("From_With_Type", Flag159
(Id
));
7648 W
("Has_Aliased_Components", Flag135
(Id
));
7649 W
("Has_Alignment_Clause", Flag46
(Id
));
7650 W
("Has_All_Calls_Remote", Flag79
(Id
));
7651 W
("Has_Anonymous_Master", Flag253
(Id
));
7652 W
("Has_Atomic_Components", Flag86
(Id
));
7653 W
("Has_Biased_Representation", Flag139
(Id
));
7654 W
("Has_Completion", Flag26
(Id
));
7655 W
("Has_Completion_In_Body", Flag71
(Id
));
7656 W
("Has_Complex_Representation", Flag140
(Id
));
7657 W
("Has_Component_Size_Clause", Flag68
(Id
));
7658 W
("Has_Contiguous_Rep", Flag181
(Id
));
7659 W
("Has_Controlled_Component", Flag43
(Id
));
7660 W
("Has_Controlling_Result", Flag98
(Id
));
7661 W
("Has_Convention_Pragma", Flag119
(Id
));
7662 W
("Has_Default_Aspect", Flag39
(Id
));
7663 W
("Has_Delayed_Aspects", Flag200
(Id
));
7664 W
("Has_Delayed_Freeze", Flag18
(Id
));
7665 W
("Has_Discriminants", Flag5
(Id
));
7666 W
("Has_Enumeration_Rep_Clause", Flag66
(Id
));
7667 W
("Has_Exit", Flag47
(Id
));
7668 W
("Has_External_Tag_Rep_Clause", Flag110
(Id
));
7669 W
("Has_Forward_Instantiation", Flag175
(Id
));
7670 W
("Has_Fully_Qualified_Name", Flag173
(Id
));
7671 W
("Has_Gigi_Rep_Item", Flag82
(Id
));
7672 W
("Has_Homonym", Flag56
(Id
));
7673 W
("Has_Implicit_Dereference", Flag251
(Id
));
7674 W
("Has_Inheritable_Invariants", Flag248
(Id
));
7675 W
("Has_Initial_Value", Flag219
(Id
));
7676 W
("Has_Invariants", Flag232
(Id
));
7677 W
("Has_Machine_Radix_Clause", Flag83
(Id
));
7678 W
("Has_Master_Entity", Flag21
(Id
));
7679 W
("Has_Missing_Return", Flag142
(Id
));
7680 W
("Has_Nested_Block_With_Handler", Flag101
(Id
));
7681 W
("Has_Non_Standard_Rep", Flag75
(Id
));
7682 W
("Has_Object_Size_Clause", Flag172
(Id
));
7683 W
("Has_Per_Object_Constraint", Flag154
(Id
));
7684 W
("Has_Postconditions", Flag240
(Id
));
7685 W
("Has_Pragma_Controlled", Flag27
(Id
));
7686 W
("Has_Pragma_Elaborate_Body", Flag150
(Id
));
7687 W
("Has_Pragma_Inline", Flag157
(Id
));
7688 W
("Has_Pragma_Inline_Always", Flag230
(Id
));
7689 W
("Has_Pragma_Ordered", Flag198
(Id
));
7690 W
("Has_Pragma_Pack", Flag121
(Id
));
7691 W
("Has_Pragma_Preelab_Init", Flag221
(Id
));
7692 W
("Has_Pragma_Pure", Flag203
(Id
));
7693 W
("Has_Pragma_Pure_Function", Flag179
(Id
));
7694 W
("Has_Pragma_Thread_Local_Storage", Flag169
(Id
));
7695 W
("Has_Pragma_Unmodified", Flag233
(Id
));
7696 W
("Has_Pragma_Unreferenced", Flag180
(Id
));
7697 W
("Has_Pragma_Unreferenced_Objects", Flag212
(Id
));
7698 W
("Has_Predicates", Flag250
(Id
));
7699 W
("Has_Primitive_Operations", Flag120
(Id
));
7700 W
("Has_Private_Ancestor", Flag151
(Id
));
7701 W
("Has_Private_Declaration", Flag155
(Id
));
7702 W
("Has_Qualified_Name", Flag161
(Id
));
7703 W
("Has_RACW", Flag214
(Id
));
7704 W
("Has_Record_Rep_Clause", Flag65
(Id
));
7705 W
("Has_Recursive_Call", Flag143
(Id
));
7706 W
("Has_Size_Clause", Flag29
(Id
));
7707 W
("Has_Small_Clause", Flag67
(Id
));
7708 W
("Has_Specified_Layout", Flag100
(Id
));
7709 W
("Has_Specified_Stream_Input", Flag190
(Id
));
7710 W
("Has_Specified_Stream_Output", Flag191
(Id
));
7711 W
("Has_Specified_Stream_Read", Flag192
(Id
));
7712 W
("Has_Specified_Stream_Write", Flag193
(Id
));
7713 W
("Has_Static_Discriminants", Flag211
(Id
));
7714 W
("Has_Storage_Size_Clause", Flag23
(Id
));
7715 W
("Has_Stream_Size_Clause", Flag184
(Id
));
7716 W
("Has_Task", Flag30
(Id
));
7717 W
("Has_Thunks", Flag228
(Id
));
7718 W
("Has_Unchecked_Union", Flag123
(Id
));
7719 W
("Has_Unknown_Discriminants", Flag72
(Id
));
7720 W
("Has_Up_Level_Access", Flag215
(Id
));
7721 W
("Has_Volatile_Components", Flag87
(Id
));
7722 W
("Has_Xref_Entry", Flag182
(Id
));
7723 W
("In_Package_Body", Flag48
(Id
));
7724 W
("In_Private_Part", Flag45
(Id
));
7725 W
("In_Use", Flag8
(Id
));
7726 W
("Is_AST_Entry", Flag132
(Id
));
7727 W
("Is_Abstract_Subprogram", Flag19
(Id
));
7728 W
("Is_Abstract_Type", Flag146
(Id
));
7729 W
("Is_Local_Anonymous_Access", Flag194
(Id
));
7730 W
("Is_Access_Constant", Flag69
(Id
));
7731 W
("Is_Ada_2005_Only", Flag185
(Id
));
7732 W
("Is_Ada_2012_Only", Flag199
(Id
));
7733 W
("Is_Aliased", Flag15
(Id
));
7734 W
("Is_Asynchronous", Flag81
(Id
));
7735 W
("Is_Atomic", Flag85
(Id
));
7736 W
("Is_Bit_Packed_Array", Flag122
(Id
));
7737 W
("Is_CPP_Class", Flag74
(Id
));
7738 W
("Is_Called", Flag102
(Id
));
7739 W
("Is_Character_Type", Flag63
(Id
));
7740 W
("Is_Child_Unit", Flag73
(Id
));
7741 W
("Is_Class_Wide_Equivalent_Type", Flag35
(Id
));
7742 W
("Is_Compilation_Unit", Flag149
(Id
));
7743 W
("Is_Completely_Hidden", Flag103
(Id
));
7744 W
("Is_Concurrent_Record_Type", Flag20
(Id
));
7745 W
("Is_Constr_Subt_For_UN_Aliased", Flag141
(Id
));
7746 W
("Is_Constr_Subt_For_U_Nominal", Flag80
(Id
));
7747 W
("Is_Constrained", Flag12
(Id
));
7748 W
("Is_Constructor", Flag76
(Id
));
7749 W
("Is_Controlled", Flag42
(Id
));
7750 W
("Is_Controlling_Formal", Flag97
(Id
));
7751 W
("Is_Descendent_Of_Address", Flag223
(Id
));
7752 W
("Is_Discrim_SO_Function", Flag176
(Id
));
7753 W
("Is_Dispatch_Table_Entity", Flag234
(Id
));
7754 W
("Is_Dispatching_Operation", Flag6
(Id
));
7755 W
("Is_Eliminated", Flag124
(Id
));
7756 W
("Is_Entry_Formal", Flag52
(Id
));
7757 W
("Is_Exported", Flag99
(Id
));
7758 W
("Is_First_Subtype", Flag70
(Id
));
7759 W
("Is_For_Access_Subtype", Flag118
(Id
));
7760 W
("Is_Formal_Subprogram", Flag111
(Id
));
7761 W
("Is_Frozen", Flag4
(Id
));
7762 W
("Is_Generic_Actual_Type", Flag94
(Id
));
7763 W
("Is_Generic_Instance", Flag130
(Id
));
7764 W
("Is_Generic_Type", Flag13
(Id
));
7765 W
("Is_Hidden", Flag57
(Id
));
7766 W
("Is_Hidden_Open_Scope", Flag171
(Id
));
7767 W
("Is_Immediately_Visible", Flag7
(Id
));
7768 W
("Is_Implementation_Defined", Flag254
(Id
));
7769 W
("Is_Imported", Flag24
(Id
));
7770 W
("Is_Inlined", Flag11
(Id
));
7771 W
("Is_Instantiated", Flag126
(Id
));
7772 W
("Is_Interface", Flag186
(Id
));
7773 W
("Is_Internal", Flag17
(Id
));
7774 W
("Is_Interrupt_Handler", Flag89
(Id
));
7775 W
("Is_Intrinsic_Subprogram", Flag64
(Id
));
7776 W
("Is_Itype", Flag91
(Id
));
7777 W
("Is_Known_Non_Null", Flag37
(Id
));
7778 W
("Is_Known_Null", Flag204
(Id
));
7779 W
("Is_Known_Valid", Flag170
(Id
));
7780 W
("Is_Limited_Composite", Flag106
(Id
));
7781 W
("Is_Limited_Interface", Flag197
(Id
));
7782 W
("Is_Limited_Record", Flag25
(Id
));
7783 W
("Is_Machine_Code_Subprogram", Flag137
(Id
));
7784 W
("Is_Non_Static_Subtype", Flag109
(Id
));
7785 W
("Is_Null_Init_Proc", Flag178
(Id
));
7786 W
("Is_Obsolescent", Flag153
(Id
));
7787 W
("Is_Only_Out_Parameter", Flag226
(Id
));
7788 W
("Is_Optional_Parameter", Flag134
(Id
));
7789 W
("Is_Package_Body_Entity", Flag160
(Id
));
7790 W
("Is_Packed", Flag51
(Id
));
7791 W
("Is_Packed_Array_Type", Flag138
(Id
));
7792 W
("Is_Potentially_Use_Visible", Flag9
(Id
));
7793 W
("Is_Preelaborated", Flag59
(Id
));
7794 W
("Is_Primitive", Flag218
(Id
));
7795 W
("Is_Primitive_Wrapper", Flag195
(Id
));
7796 W
("Is_Private_Composite", Flag107
(Id
));
7797 W
("Is_Private_Descendant", Flag53
(Id
));
7798 W
("Is_Private_Primitive", Flag245
(Id
));
7799 W
("Is_Processed_Transient", Flag252
(Id
));
7800 W
("Is_Public", Flag10
(Id
));
7801 W
("Is_Pure", Flag44
(Id
));
7802 W
("Is_Pure_Unit_Access_Type", Flag189
(Id
));
7803 W
("Is_RACW_Stub_Type", Flag244
(Id
));
7804 W
("Is_Raised", Flag224
(Id
));
7805 W
("Is_Remote_Call_Interface", Flag62
(Id
));
7806 W
("Is_Remote_Types", Flag61
(Id
));
7807 W
("Is_Renaming_Of_Object", Flag112
(Id
));
7808 W
("Is_Return_Object", Flag209
(Id
));
7809 W
("Is_Safe_To_Reevaluate", Flag249
(Id
));
7810 W
("Is_Shared_Passive", Flag60
(Id
));
7811 W
("Is_Statically_Allocated", Flag28
(Id
));
7812 W
("Is_Tag", Flag78
(Id
));
7813 W
("Is_Tagged_Type", Flag55
(Id
));
7814 W
("Is_Thunk", Flag225
(Id
));
7815 W
("Is_Trivial_Subprogram", Flag235
(Id
));
7816 W
("Is_True_Constant", Flag163
(Id
));
7817 W
("Is_Unchecked_Union", Flag117
(Id
));
7818 W
("Is_Underlying_Record_View", Flag246
(Id
));
7819 W
("Is_Unsigned_Type", Flag144
(Id
));
7820 W
("Is_VMS_Exception", Flag133
(Id
));
7821 W
("Is_Valued_Procedure", Flag127
(Id
));
7822 W
("Is_Visible_Formal", Flag206
(Id
));
7823 W
("Is_Visible_Lib_Unit", Flag116
(Id
));
7824 W
("Is_Volatile", Flag16
(Id
));
7825 W
("Itype_Printed", Flag202
(Id
));
7826 W
("Kill_Elaboration_Checks", Flag32
(Id
));
7827 W
("Kill_Range_Checks", Flag33
(Id
));
7828 W
("Known_To_Have_Preelab_Init", Flag207
(Id
));
7829 W
("Low_Bound_Tested", Flag205
(Id
));
7830 W
("Machine_Radix_10", Flag84
(Id
));
7831 W
("Materialize_Entity", Flag168
(Id
));
7832 W
("Must_Be_On_Byte_Boundary", Flag183
(Id
));
7833 W
("Must_Have_Preelab_Init", Flag208
(Id
));
7834 W
("Needs_Debug_Info", Flag147
(Id
));
7835 W
("Needs_No_Actuals", Flag22
(Id
));
7836 W
("Never_Set_In_Source", Flag115
(Id
));
7837 W
("No_Pool_Assigned", Flag131
(Id
));
7838 W
("No_Return", Flag113
(Id
));
7839 W
("No_Strict_Aliasing", Flag136
(Id
));
7840 W
("Non_Binary_Modulus", Flag58
(Id
));
7841 W
("Nonzero_Is_True", Flag162
(Id
));
7842 W
("OK_To_Rename", Flag247
(Id
));
7843 W
("OK_To_Reorder_Components", Flag239
(Id
));
7844 W
("Optimize_Alignment_Space", Flag241
(Id
));
7845 W
("Optimize_Alignment_Time", Flag242
(Id
));
7846 W
("Overlays_Constant", Flag243
(Id
));
7847 W
("Reachable", Flag49
(Id
));
7848 W
("Referenced", Flag156
(Id
));
7849 W
("Referenced_As_LHS", Flag36
(Id
));
7850 W
("Referenced_As_Out_Parameter", Flag227
(Id
));
7851 W
("Renamed_In_Spec", Flag231
(Id
));
7852 W
("Requires_Overriding", Flag213
(Id
));
7853 W
("Return_Present", Flag54
(Id
));
7854 W
("Returns_By_Ref", Flag90
(Id
));
7855 W
("Reverse_Bit_Order", Flag164
(Id
));
7856 W
("Reverse_Storage_Order", Flag93
(Id
));
7857 W
("Sec_Stack_Needed_For_Return", Flag167
(Id
));
7858 W
("Size_Depends_On_Discriminant", Flag177
(Id
));
7859 W
("Size_Known_At_Compile_Time", Flag92
(Id
));
7860 W
("Static_Elaboration_Desired", Flag77
(Id
));
7861 W
("Strict_Alignment", Flag145
(Id
));
7862 W
("Suppress_Elaboration_Warnings", Flag148
(Id
));
7863 W
("Suppress_Initialization", Flag105
(Id
));
7864 W
("Suppress_Style_Checks", Flag165
(Id
));
7865 W
("Suppress_Value_Tracking_On_Call", Flag217
(Id
));
7866 W
("Treat_As_Volatile", Flag41
(Id
));
7867 W
("Universal_Aliasing", Flag216
(Id
));
7868 W
("Used_As_Generic_Actual", Flag222
(Id
));
7869 W
("Uses_Sec_Stack", Flag95
(Id
));
7870 W
("Warnings_Off", Flag96
(Id
));
7871 W
("Warnings_Off_Used", Flag236
(Id
));
7872 W
("Warnings_Off_Used_Unmodified", Flag237
(Id
));
7873 W
("Warnings_Off_Used_Unreferenced", Flag238
(Id
));
7874 W
("Was_Hidden", Flag196
(Id
));
7875 end Write_Entity_Flags
;
7877 -----------------------
7878 -- Write_Entity_Info --
7879 -----------------------
7881 procedure Write_Entity_Info
(Id
: Entity_Id
; Prefix
: String) is
7883 procedure Write_Attribute
(Which
: String; Nam
: E
);
7884 -- Write attribute value with given string name
7886 procedure Write_Kind
(Id
: Entity_Id
);
7887 -- Write Ekind field of entity
7889 ---------------------
7890 -- Write_Attribute --
7891 ---------------------
7893 procedure Write_Attribute
(Which
: String; Nam
: E
) is
7897 Write_Int
(Int
(Nam
));
7899 Write_Name
(Chars
(Nam
));
7901 end Write_Attribute
;
7907 procedure Write_Kind
(Id
: Entity_Id
) is
7908 K
: constant String := Entity_Kind
'Image (Ekind
(Id
));
7912 Write_Str
(" Kind ");
7914 if Is_Type
(Id
) and then Is_Tagged_Type
(Id
) then
7915 Write_Str
("TAGGED ");
7918 Write_Str
(K
(3 .. K
'Length));
7921 if Is_Type
(Id
) and then Depends_On_Private
(Id
) then
7922 Write_Str
("Depends_On_Private ");
7926 -- Start of processing for Write_Entity_Info
7930 Write_Attribute
("Name ", Id
);
7931 Write_Int
(Int
(Id
));
7935 Write_Attribute
(" Type ", Etype
(Id
));
7937 Write_Attribute
(" Scope ", Scope
(Id
));
7942 when Discrete_Kind
=>
7943 Write_Str
("Bounds: Id = ");
7945 if Present
(Scalar_Range
(Id
)) then
7946 Write_Int
(Int
(Type_Low_Bound
(Id
)));
7947 Write_Str
(" .. Id = ");
7948 Write_Int
(Int
(Type_High_Bound
(Id
)));
7950 Write_Str
("Empty");
7961 (" Component Type ", Component_Type
(Id
));
7964 Write_Str
(" Indexes ");
7966 Index
:= First_Index
(Id
);
7967 while Present
(Index
) loop
7968 Write_Attribute
(" ", Etype
(Index
));
7969 Index
:= Next_Index
(Index
);
7977 (" Directly Designated Type ",
7978 Directly_Designated_Type
(Id
));
7981 when Overloadable_Kind
=>
7982 if Present
(Homonym
(Id
)) then
7983 Write_Str
(" Homonym ");
7984 Write_Name
(Chars
(Homonym
(Id
)));
7986 Write_Int
(Int
(Homonym
(Id
)));
7993 if Ekind
(Scope
(Id
)) in Record_Kind
then
7995 " Original_Record_Component ",
7996 Original_Record_Component
(Id
));
7997 Write_Int
(Int
(Original_Record_Component
(Id
)));
8001 when others => null;
8003 end Write_Entity_Info
;
8005 -----------------------
8006 -- Write_Field6_Name --
8007 -----------------------
8009 procedure Write_Field6_Name
(Id
: Entity_Id
) is
8010 pragma Warnings
(Off
, Id
);
8012 Write_Str
("First_Rep_Item");
8013 end Write_Field6_Name
;
8015 -----------------------
8016 -- Write_Field7_Name --
8017 -----------------------
8019 procedure Write_Field7_Name
(Id
: Entity_Id
) is
8020 pragma Warnings
(Off
, Id
);
8022 Write_Str
("Freeze_Node");
8023 end Write_Field7_Name
;
8025 -----------------------
8026 -- Write_Field8_Name --
8027 -----------------------
8029 procedure Write_Field8_Name
(Id
: Entity_Id
) is
8033 Write_Str
("Associated_Node_For_Itype");
8036 Write_Str
("Dependent_Instances");
8039 Write_Str
("First_Exit_Statement");
8042 Write_Str
("Hiding_Loop_Variable");
8044 when E_Abstract_State
=>
8045 Write_Str
("Integrity_Level");
8049 E_Subprogram_Body
=>
8050 Write_Str
("Mechanism");
8054 Write_Str
("Normalized_First_Bit");
8057 Write_Str
("Postcondition_Proc");
8059 when E_Return_Statement
=>
8060 Write_Str
("Return_Applies_To");
8063 Write_Str
("Field8??");
8065 end Write_Field8_Name
;
8067 -----------------------
8068 -- Write_Field9_Name --
8069 -----------------------
8071 procedure Write_Field9_Name
(Id
: Entity_Id
) is
8075 Write_Str
("Class_Wide_Type");
8078 Write_Str
("Current_Value");
8080 when E_Abstract_State
=>
8081 Write_Str
("Refined_State");
8084 E_Generic_Function |
8086 E_Generic_Procedure |
8089 Write_Str
("Renaming_Map");
8092 Write_Str
("Field9??");
8094 end Write_Field9_Name
;
8096 ------------------------
8097 -- Write_Field10_Name --
8098 ------------------------
8100 procedure Write_Field10_Name
(Id
: Entity_Id
) is
8103 when Class_Wide_Kind |
8109 Write_Str
("Direct_Primitive_Operations");
8112 Write_Str
("Float_Rep");
8114 when E_In_Parameter |
8116 Write_Str
("Discriminal_Link");
8122 Write_Str
("Handler_Records");
8125 Write_Str
("Loop_Entry_Attributes");
8129 Write_Str
("Normalized_Position_Max");
8132 Write_Str
("Field10??");
8134 end Write_Field10_Name
;
8136 ------------------------
8137 -- Write_Field11_Name --
8138 ------------------------
8140 procedure Write_Field11_Name
(Id
: Entity_Id
) is
8144 Write_Str
("Block_Node");
8148 Write_Str
("Component_Bit_Offset");
8151 Write_Str
("Entry_Component");
8153 when E_Enumeration_Literal
=>
8154 Write_Str
("Enumeration_Pos");
8158 Write_Str
("Full_View");
8160 when E_Generic_Package
=>
8161 Write_Str
("Generic_Homonym");
8167 Write_Str
("Protected_Body_Subprogram");
8170 Write_Str
("Field11??");
8172 end Write_Field11_Name
;
8174 ------------------------
8175 -- Write_Field12_Name --
8176 ------------------------
8178 procedure Write_Field12_Name
(Id
: Entity_Id
) is
8182 Write_Str
("Associated_Formal_Package");
8185 Write_Str
("Barrier_Function");
8187 when E_Enumeration_Literal
=>
8188 Write_Str
("Enumeration_Rep");
8196 E_In_Out_Parameter |
8200 Write_Str
("Esize");
8204 Write_Str
("Next_Inlined_Subprogram");
8207 Write_Str
("Field12??");
8209 end Write_Field12_Name
;
8211 ------------------------
8212 -- Write_Field13_Name --
8213 ------------------------
8215 procedure Write_Field13_Name
(Id
: Entity_Id
) is
8220 Write_Str
("Component_Clause");
8223 Write_Str
("Elaboration_Entity");
8227 Generic_Unit_Kind
=>
8228 Write_Str
("Elaboration_Entity");
8232 Write_Str
("Extra_Accessibility");
8235 Write_Str
("RM_Size");
8238 Write_Str
("Field13??");
8240 end Write_Field13_Name
;
8242 -----------------------
8243 -- Write_Field14_Name --
8244 -----------------------
8246 procedure Write_Field14_Name
(Id
: Entity_Id
) is
8255 Write_Str
("Alignment");
8259 Write_Str
("First_Optional_Parameter");
8263 Write_Str
("Normalized_Position");
8266 E_Generic_Package
=>
8267 Write_Str
("Shadow_Entities");
8270 Write_Str
("Field14??");
8272 end Write_Field14_Name
;
8274 ------------------------
8275 -- Write_Field15_Name --
8276 ------------------------
8278 procedure Write_Field15_Name
(Id
: Entity_Id
) is
8281 when E_Discriminant
=>
8282 Write_Str
("Discriminant_Number");
8285 Write_Str
("DT_Entry_Count");
8289 Write_Str
("DT_Position");
8291 when E_Protected_Type
=>
8292 Write_Str
("Entry_Bodies_Array");
8295 Write_Str
("Entry_Parameters_Type");
8298 Write_Str
("Extra_Formal");
8300 when Enumeration_Kind
=>
8301 Write_Str
("Lit_Indexes");
8305 Write_Str
("Related_Instance");
8307 when Decimal_Fixed_Point_Kind
=>
8308 Write_Str
("Scale_Value");
8312 Write_Str
("Status_Flag_Or_Transient_Decl");
8316 Write_Str
("Storage_Size_Variable");
8318 when E_String_Literal_Subtype
=>
8319 Write_Str
("String_Literal_Low_Bound");
8322 Write_Str
("Field15??");
8324 end Write_Field15_Name
;
8326 ------------------------
8327 -- Write_Field16_Name --
8328 ------------------------
8330 procedure Write_Field16_Name
(Id
: Entity_Id
) is
8333 when E_Record_Type |
8334 E_Record_Type_With_Private
=>
8335 Write_Str
("Access_Disp_Table");
8337 when E_Record_Subtype |
8338 E_Class_Wide_Subtype
=>
8339 Write_Str
("Cloned_Subtype");
8343 Write_Str
("DTC_Entity");
8346 Write_Str
("Entry_Formal");
8351 Write_Str
("First_Private_Entity");
8353 when Enumeration_Kind
=>
8354 Write_Str
("Lit_Strings");
8356 when E_String_Literal_Subtype
=>
8357 Write_Str
("String_Literal_Length");
8361 Write_Str
("Unset_Reference");
8364 Write_Str
("Field16??");
8366 end Write_Field16_Name
;
8368 ------------------------
8369 -- Write_Field17_Name --
8370 ------------------------
8372 procedure Write_Field17_Name
(Id
: Entity_Id
) is
8377 E_Generic_In_Out_Parameter |
8379 Write_Str
("Actual_Subtype");
8382 Write_Str
("Digits_Value");
8384 when E_Discriminant
=>
8385 Write_Str
("Discriminal");
8394 E_Generic_Function |
8396 E_Generic_Procedure |
8404 E_Return_Statement |
8406 E_Subprogram_Type
=>
8407 Write_Str
("First_Entity");
8410 Write_Str
("First_Index");
8412 when Enumeration_Kind
=>
8413 Write_Str
("First_Literal");
8416 Write_Str
("Master_Id");
8418 when Modular_Integer_Kind
=>
8419 Write_Str
("Modulus");
8421 when E_Incomplete_Type
=>
8422 Write_Str
("Non_Limited_View");
8424 when E_Incomplete_Subtype
=>
8425 if From_With_Type
(Id
) then
8426 Write_Str
("Non_Limited_View");
8430 Write_Str
("Prival");
8433 Write_Str
("Field17??");
8435 end Write_Field17_Name
;
8437 ------------------------
8438 -- Write_Field18_Name --
8439 ------------------------
8441 procedure Write_Field18_Name
(Id
: Entity_Id
) is
8444 when E_Enumeration_Literal |
8448 Write_Str
("Alias");
8450 when E_Record_Type
=>
8451 Write_Str
("Corresponding_Concurrent_Type");
8453 when E_Subprogram_Body
=>
8454 Write_Str
("Corresponding_Protected_Entry");
8456 when Concurrent_Kind
=>
8457 Write_Str
("Corresponding_Record_Type");
8462 Write_Str
("Enclosing_Scope");
8464 when E_Entry_Index_Parameter
=>
8465 Write_Str
("Entry_Index_Constant");
8467 when E_Class_Wide_Subtype |
8468 E_Access_Protected_Subprogram_Type |
8469 E_Anonymous_Access_Protected_Subprogram_Type |
8470 E_Access_Subprogram_Type |
8472 Write_Str
("Equivalent_Type");
8474 when Fixed_Point_Kind
=>
8475 Write_Str
("Delta_Value");
8477 when Incomplete_Or_Private_Kind |
8479 Write_Str
("Private_Dependents");
8482 Write_Str
("Renamed_Object");
8486 E_Generic_Function |
8487 E_Generic_Procedure |
8488 E_Generic_Package
=>
8489 Write_Str
("Renamed_Entity");
8492 Write_Str
("Field18??");
8494 end Write_Field18_Name
;
8496 -----------------------
8497 -- Write_Field19_Name --
8498 -----------------------
8500 procedure Write_Field19_Name
(Id
: Entity_Id
) is
8504 E_Generic_Package
=>
8505 Write_Str
("Body_Entity");
8507 when E_Discriminant
=>
8508 Write_Str
("Corresponding_Discriminant");
8511 Write_Str
("Default_Value");
8513 when E_Array_Type
=>
8514 Write_Str
("Default_Component_Value");
8516 when E_Record_Type
=>
8517 Write_Str
("Parent_Subtype");
8521 Write_Str
("Size_Check_Code");
8523 when E_Package_Body |
8525 Write_Str
("Spec_Entity");
8527 when Private_Kind
=>
8528 Write_Str
("Underlying_Full_View");
8530 when E_Function | E_Operator | E_Subprogram_Type
=>
8531 Write_Str
("Extra_Accessibility_Of_Result");
8534 Write_Str
("Field19??");
8536 end Write_Field19_Name
;
8538 -----------------------
8539 -- Write_Field20_Name --
8540 -----------------------
8542 procedure Write_Field20_Name
(Id
: Entity_Id
) is
8546 Write_Str
("Component_Type");
8548 when E_In_Parameter |
8549 E_Generic_In_Parameter
=>
8550 Write_Str
("Default_Value");
8553 Write_Str
("Directly_Designated_Type");
8556 Write_Str
("Discriminant_Checking_Func");
8558 when E_Discriminant
=>
8559 Write_Str
("Discriminant_Default_Value");
8568 E_Generic_Function |
8570 E_Generic_Procedure |
8578 E_Return_Statement |
8580 E_Subprogram_Type
=>
8581 Write_Str
("Last_Entity");
8585 Write_Str
("Prival_Link");
8588 Write_Str
("Scalar_Range");
8591 Write_Str
("Register_Exception_Call");
8594 Write_Str
("Field20??");
8596 end Write_Field20_Name
;
8598 -----------------------
8599 -- Write_Field21_Name --
8600 -----------------------
8602 procedure Write_Field21_Name
(Id
: Entity_Id
) is
8606 Write_Str
("Accept_Address");
8608 when E_In_Parameter
=>
8609 Write_Str
("Default_Expr_Function");
8611 when Concurrent_Kind |
8612 Incomplete_Or_Private_Kind |
8616 Write_Str
("Discriminant_Constraint");
8621 E_Generic_Function |
8623 E_Generic_Procedure |
8625 Write_Str
("Interface_Name");
8628 Modular_Integer_Kind
=>
8629 Write_Str
("Original_Array_Type");
8631 when Fixed_Point_Kind
=>
8632 Write_Str
("Small_Value");
8635 Write_Str
("Field21??");
8637 end Write_Field21_Name
;
8639 -----------------------
8640 -- Write_Field22_Name --
8641 -----------------------
8643 procedure Write_Field22_Name
(Id
: Entity_Id
) is
8647 Write_Str
("Associated_Storage_Pool");
8650 Write_Str
("Component_Size");
8652 when E_Record_Type
=>
8653 Write_Str
("Corresponding_Remote_Type");
8657 Write_Str
("Original_Record_Component");
8659 when E_Enumeration_Literal
=>
8660 Write_Str
("Enumeration_Rep_Expr");
8663 Write_Str
("Exception_Code");
8665 when E_Record_Type_With_Private |
8666 E_Record_Subtype_With_Private |
8669 E_Limited_Private_Type |
8670 E_Limited_Private_Subtype
=>
8671 Write_Str
("Private_View");
8674 Write_Str
("Protected_Formal");
8684 E_Generic_Function |
8685 E_Generic_Procedure |
8688 E_Return_Statement |
8691 Write_Str
("Scope_Depth_Value");
8694 Write_Str
("Shared_Var_Procs_Instance");
8697 Write_Str
("Field22??");
8699 end Write_Field22_Name
;
8701 ------------------------
8702 -- Write_Field23_Name --
8703 ------------------------
8705 procedure Write_Field23_Name
(Id
: Entity_Id
) is
8708 when E_Discriminant
=>
8709 Write_Str
("CR_Discriminant");
8712 Write_Str
("Entry_Cancel_Parameter");
8714 when E_Enumeration_Type
=>
8715 Write_Str
("Enum_Pos_To_Rep");
8719 Write_Str
("Extra_Constrained");
8722 Write_Str
("Finalization_Master");
8724 when E_Generic_Function |
8726 E_Generic_Procedure
=>
8727 Write_Str
("Inner_Instances");
8730 Write_Str
("Packed_Array_Type");
8733 Write_Str
("Protection_Object");
8735 when Concurrent_Kind |
8736 Incomplete_Or_Private_Kind |
8740 Write_Str
("Stored_Constraint");
8744 if Present
(Scope
(Id
))
8745 and then Is_Protected_Type
(Scope
(Id
))
8747 Write_Str
("Protection_Object");
8749 Write_Str
("Generic_Renamings");
8753 if Is_Generic_Instance
(Id
) then
8754 Write_Str
("Generic_Renamings");
8756 Write_Str
("Limited_View");
8760 Write_Str
("Field23??");
8762 end Write_Field23_Name
;
8764 ------------------------
8765 -- Write_Field24_Name --
8766 ------------------------
8768 procedure Write_Field24_Name
(Id
: Entity_Id
) is
8773 Write_Str
("Finalizer");
8778 Write_Str
("Related_Expression");
8783 Generic_Subprogram_Kind
=>
8784 Write_Str
("Contract");
8787 Write_Str
("Field24???");
8789 end Write_Field24_Name
;
8791 ------------------------
8792 -- Write_Field25_Name --
8793 ------------------------
8795 procedure Write_Field25_Name
(Id
: Entity_Id
) is
8799 Write_Str
("Abstract_States");
8802 Write_Str
("Debug_Renaming_Link");
8805 Write_Str
("DT_Offset_To_Top_Func");
8809 Write_Str
("Interface_Alias");
8811 when E_Record_Type |
8813 E_Record_Type_With_Private |
8814 E_Record_Subtype_With_Private
=>
8815 Write_Str
("Interfaces");
8819 Write_Str
("Related_Array_Object");
8822 Write_Str
("Task_Body_Procedure");
8826 Write_Str
("PPC_Wrapper");
8828 when E_Enumeration_Subtype |
8829 E_Modular_Integer_Subtype |
8830 E_Signed_Integer_Subtype
=>
8831 Write_Str
("Static_Predicate");
8834 Write_Str
("Field25??");
8836 end Write_Field25_Name
;
8838 ------------------------
8839 -- Write_Field26_Name --
8840 ------------------------
8842 procedure Write_Field26_Name
(Id
: Entity_Id
) is
8845 when E_Record_Type |
8846 E_Record_Type_With_Private
=>
8847 Write_Str
("Dispatch_Table_Wrappers");
8849 when E_In_Out_Parameter |
8852 Write_Str
("Last_Assignment");
8854 when E_Access_Subprogram_Type
=>
8855 Write_Str
("Original_Access_Type");
8857 when E_Generic_Package |
8859 Write_Str
("Package_Instantiation");
8863 Write_Str
("Related_Type");
8866 Write_Str
("Relative_Deadline_Variable");
8870 Write_Str
("Overridden_Operation");
8873 Write_Str
("Field26??");
8875 end Write_Field26_Name
;
8877 ------------------------
8878 -- Write_Field27_Name --
8879 ------------------------
8881 procedure Write_Field27_Name
(Id
: Entity_Id
) is
8886 Write_Str
("Current_Use_Clause");
8891 Write_Str
("Related_Type");
8894 Write_Str
("Wrapped_Entity");
8897 Write_Str
("Field27??");
8899 end Write_Field27_Name
;
8901 ------------------------
8902 -- Write_Field28_Name --
8903 ------------------------
8905 procedure Write_Field28_Name
(Id
: Entity_Id
) is
8913 E_Subprogram_Type
=>
8914 Write_Str
("Extra_Formals");
8916 when E_Constant | E_Variable
=>
8917 Write_Str
("Initialization_Statements");
8919 when E_Record_Type
=>
8920 Write_Str
("Underlying_Record_View");
8923 Write_Str
("Field28??");
8925 end Write_Field28_Name
;
8927 ------------------------
8928 -- Write_Field29_Name --
8929 ------------------------
8931 procedure Write_Field29_Name
(Id
: Entity_Id
) is
8935 Write_Str
("Subprograms_For_Type");
8938 Write_Str
("Field29??");
8940 end Write_Field29_Name
;
8942 ------------------------
8943 -- Write_Field30_Name --
8944 ------------------------
8946 procedure Write_Field30_Name
(Id
: Entity_Id
) is
8950 Write_Str
("Corresponding_Equality");
8953 Write_Str
("Static_Initialization");
8956 Write_Str
("Field30??");
8958 end Write_Field30_Name
;
8960 ------------------------
8961 -- Write_Field31_Name --
8962 ------------------------
8964 procedure Write_Field31_Name
(Id
: Entity_Id
) is
8968 Write_Str
("Field31??");
8970 end Write_Field31_Name
;
8972 ------------------------
8973 -- Write_Field32_Name --
8974 ------------------------
8976 procedure Write_Field32_Name
(Id
: Entity_Id
) is
8980 Write_Str
("Field32??");
8982 end Write_Field32_Name
;
8984 ------------------------
8985 -- Write_Field33_Name --
8986 ------------------------
8988 procedure Write_Field33_Name
(Id
: Entity_Id
) is
8992 Write_Str
("Field33??");
8994 end Write_Field33_Name
;
8996 ------------------------
8997 -- Write_Field34_Name --
8998 ------------------------
9000 procedure Write_Field34_Name
(Id
: Entity_Id
) is
9004 Write_Str
("Field34??");
9006 end Write_Field34_Name
;
9008 ------------------------
9009 -- Write_Field35_Name --
9010 ------------------------
9012 procedure Write_Field35_Name
(Id
: Entity_Id
) is
9016 Write_Str
("Field35??");
9018 end Write_Field35_Name
;
9020 -------------------------
9021 -- Iterator Procedures --
9022 -------------------------
9024 procedure Proc_Next_Component
(N
: in out Node_Id
) is
9026 N
:= Next_Component
(N
);
9027 end Proc_Next_Component
;
9029 procedure Proc_Next_Component_Or_Discriminant
(N
: in out Node_Id
) is
9031 N
:= Next_Entity
(N
);
9032 while Present
(N
) loop
9033 exit when Ekind_In
(N
, E_Component
, E_Discriminant
);
9034 N
:= Next_Entity
(N
);
9036 end Proc_Next_Component_Or_Discriminant
;
9038 procedure Proc_Next_Discriminant
(N
: in out Node_Id
) is
9040 N
:= Next_Discriminant
(N
);
9041 end Proc_Next_Discriminant
;
9043 procedure Proc_Next_Formal
(N
: in out Node_Id
) is
9045 N
:= Next_Formal
(N
);
9046 end Proc_Next_Formal
;
9048 procedure Proc_Next_Formal_With_Extras
(N
: in out Node_Id
) is
9050 N
:= Next_Formal_With_Extras
(N
);
9051 end Proc_Next_Formal_With_Extras
;
9053 procedure Proc_Next_Index
(N
: in out Node_Id
) is
9055 N
:= Next_Index
(N
);
9056 end Proc_Next_Index
;
9058 procedure Proc_Next_Inlined_Subprogram
(N
: in out Node_Id
) is
9060 N
:= Next_Inlined_Subprogram
(N
);
9061 end Proc_Next_Inlined_Subprogram
;
9063 procedure Proc_Next_Literal
(N
: in out Node_Id
) is
9065 N
:= Next_Literal
(N
);
9066 end Proc_Next_Literal
;
9068 procedure Proc_Next_Stored_Discriminant
(N
: in out Node_Id
) is
9070 N
:= Next_Stored_Discriminant
(N
);
9071 end Proc_Next_Stored_Discriminant
;