1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2018, Free Software Foundation, Inc. --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. --
18 -- As a special exception under Section 7 of GPL version 3, you are granted --
19 -- additional permissions described in the GCC Runtime Library Exception, --
20 -- version 3.1, as published by the Free Software Foundation. --
22 -- You should have received a copy of the GNU General Public License and --
23 -- a copy of the GCC Runtime Library Exception along with this program; --
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
25 -- <http://www.gnu.org/licenses/>. --
27 -- GNAT was originally developed by the GNAT team at New York University. --
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
30 ------------------------------------------------------------------------------
32 pragma Style_Checks
(All_Checks
);
33 -- Turn off subprogram ordering, not used for this unit
35 with Atree
; use Atree
;
36 with Elists
; use Elists
;
37 with Namet
; use Namet
;
38 with Nlists
; use Nlists
;
39 with Output
; use Output
;
40 with Sinfo
; use Sinfo
;
41 with Stand
; use Stand
;
45 use Atree
.Unchecked_Access
;
46 -- This is one of the packages that is allowed direct untyped access to
47 -- the fields in a node, since it provides the next level abstraction
48 -- which incorporates appropriate checks.
50 ----------------------------------------------
51 -- Usage of Fields in Defining Entity Nodes --
52 ----------------------------------------------
54 -- Four of these fields are defined in Sinfo, since they in are the base
55 -- part of the node. The access routines for these four fields and the
56 -- corresponding set procedures are defined in Sinfo. These fields are
57 -- present in all entities. Note that Homonym is also in the base part of
58 -- the node, but has access routines that are more properly part of Einfo,
59 -- which is why they are defined here.
66 -- Remaining fields are present only in extended nodes (i.e. entities).
68 -- The following fields are present in all entities
71 -- First_Rep_Item Node6
74 -- Associated_Entity Node37
76 -- The usage of other fields (and the entity kinds to which it applies)
77 -- depends on the particular field (see Einfo spec for details).
79 -- Associated_Node_For_Itype Node8
80 -- Dependent_Instances Elist8
81 -- Hiding_Loop_Variable Node8
82 -- Mechanism Uint8 (but returns Mechanism_Type)
83 -- Normalized_First_Bit Uint8
84 -- Refinement_Constituents Elist8
85 -- Return_Applies_To Node8
86 -- First_Exit_Statement Node8
88 -- Class_Wide_Type Node9
89 -- Current_Value Node9
92 -- Direct_Primitive_Operations Elist10
93 -- Discriminal_Link Node10
94 -- Float_Rep Uint10 (but returns Float_Rep_Kind)
95 -- Handler_Records List10
96 -- Normalized_Position_Max Uint10
97 -- Part_Of_Constituents Elist10
100 -- Component_Bit_Offset Uint11
102 -- Entry_Component Node11
103 -- Enumeration_Pos Uint11
104 -- Generic_Homonym Node11
105 -- Part_Of_References Elist11
106 -- Protected_Body_Subprogram Node11
108 -- Barrier_Function Node12
109 -- Enumeration_Rep Uint12
111 -- Next_Inlined_Subprogram Node12
113 -- Component_Clause Node13
114 -- Elaboration_Entity Node13
115 -- Extra_Accessibility Node13
119 -- Normalized_Position Uint14
120 -- Postconditions_Proc Node14
121 -- Shadow_Entities List14
123 -- Discriminant_Number Uint15
124 -- DT_Position Uint15
125 -- DT_Entry_Count Uint15
126 -- Entry_Parameters_Type Node15
127 -- Extra_Formal Node15
128 -- Pending_Access_Types Elist15
129 -- Related_Instance Node15
130 -- Status_Flag_Or_Transient_Decl Node15
132 -- Access_Disp_Table Elist16
133 -- Body_References Elist16
134 -- Cloned_Subtype Node16
136 -- Entry_Formal Node16
137 -- First_Private_Entity Node16
138 -- Lit_Strings Node16
139 -- Scale_Value Uint16
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
154 -- Corresponding_Concurrent_Type Node18
155 -- Corresponding_Protected_Entry Node18
156 -- Corresponding_Record_Type Node18
157 -- Delta_Value Ureal18
158 -- Enclosing_Scope Node18
159 -- Equivalent_Type Node18
160 -- Lit_Indexes Node18
161 -- Private_Dependents Elist18
162 -- Renamed_Entity Node18
163 -- Renamed_Object Node18
164 -- String_Literal_Low_Bound Node18
166 -- Body_Entity Node19
167 -- Corresponding_Discriminant Node19
168 -- Default_Aspect_Component_Value Node19
169 -- Default_Aspect_Value Node19
170 -- Entry_Bodies_Array Node19
171 -- Extra_Accessibility_Of_Result Node19
172 -- Non_Limited_View Node19
173 -- Parent_Subtype Node19
174 -- Receiving_Entry Node19
175 -- Size_Check_Code Node19
176 -- Spec_Entity Node19
177 -- Underlying_Full_View Node19
179 -- Component_Type Node20
180 -- Default_Value Node20
181 -- Directly_Designated_Type Node20
182 -- Discriminant_Checking_Func Node20
183 -- Discriminant_Default_Value Node20
184 -- Last_Entity Node20
185 -- Prival_Link Node20
186 -- Register_Exception_Call Node20
187 -- Scalar_Range Node20
189 -- Accept_Address Elist21
190 -- Corresponding_Record_Component Node21
191 -- Default_Expr_Function Node21
192 -- Discriminant_Constraint Elist21
193 -- Interface_Name Node21
194 -- Original_Array_Type Node21
195 -- Small_Value Ureal21
197 -- Associated_Storage_Pool Node22
198 -- Component_Size Uint22
199 -- Corresponding_Remote_Type Node22
200 -- Enumeration_Rep_Expr Node22
201 -- Original_Record_Component Node22
202 -- Private_View Node22
203 -- Protected_Formal Node22
204 -- Scope_Depth_Value Uint22
205 -- Shared_Var_Procs_Instance Node22
207 -- CR_Discriminant Node23
208 -- Entry_Cancel_Parameter Node23
209 -- Enum_Pos_To_Rep Node23
210 -- Extra_Constrained Node23
211 -- Finalization_Master Node23
212 -- Generic_Renamings Elist23
213 -- Inner_Instances Elist23
214 -- Limited_View Node23
215 -- Packed_Array_Impl_Type Node23
216 -- Protection_Object Node23
217 -- Stored_Constraint Elist23
219 -- Incomplete_Actuals Elist24
220 -- Related_Expression Node24
221 -- Subps_Index Uint24
223 -- Contract_Wrapper Node25
224 -- Debug_Renaming_Link Node25
225 -- DT_Offset_To_Top_Func Node25
226 -- Interface_Alias Node25
227 -- Interfaces Elist25
228 -- Related_Array_Object Node25
229 -- Static_Discrete_Predicate List25
230 -- Static_Real_Or_String_Predicate Node25
231 -- Task_Body_Procedure Node25
233 -- Dispatch_Table_Wrappers Elist26
234 -- Last_Assignment Node26
235 -- Overridden_Operation Node26
236 -- Package_Instantiation Node26
237 -- Storage_Size_Variable Node26
239 -- Current_Use_Clause Node27
240 -- Related_Type Node27
241 -- Wrapped_Entity Node27
243 -- Extra_Formals Node28
245 -- Initialization_Statements Node28
246 -- Original_Access_Type Node28
247 -- Relative_Deadline_Variable Node28
248 -- Underlying_Record_View Node28
250 -- Anonymous_Masters Elist29
251 -- BIP_Initialization_Call Node29
252 -- Subprograms_For_Type Elist29
254 -- Access_Disp_Table_Elab_Flag Node30
255 -- Anonymous_Object Node30
256 -- Corresponding_Equality Node30
257 -- Hidden_In_Formal_Instance Elist30
258 -- Last_Aggregate_Assignment Node30
259 -- Static_Initialization Node30
261 -- Activation_Record_Component Node31
262 -- Derived_Type_Link Node31
263 -- Thunk_Entity Node31
265 -- Corresponding_Function Node32
266 -- Corresponding_Procedure Node32
267 -- Encapsulating_State Node32
268 -- No_Tagged_Streams_Pragma Node32
270 -- Linker_Section_Pragma Node33
274 -- Anonymous_Designated_Type Node35
275 -- Entry_Max_Queue_Lengths_Array Node35
276 -- Import_Pragma Node35
278 -- Validated_Object Node38
279 -- Predicated_Parent Node38
280 -- Class_Wide_Clone Node38
282 -- Protected_Subprogram Node39
284 -- SPARK_Pragma Node40
286 -- Original_Protected_Subprogram Node41
287 -- SPARK_Aux_Pragma Node41
289 ---------------------------------------------
290 -- Usage of Flags in Defining Entity Nodes --
291 ---------------------------------------------
293 -- All flags are unique, there is no overlaying, so each flag is physically
294 -- present in every entity. However, for many of the flags, it only makes
295 -- sense for them to be set true for certain subsets of entity kinds. See
296 -- the spec of Einfo for further details.
298 -- Is_Inlined_Always Flag1
299 -- Is_Hidden_Non_Overridden_Subpgm Flag2
302 -- Has_Discriminants Flag5
303 -- Is_Dispatching_Operation Flag6
304 -- Is_Immediately_Visible Flag7
306 -- Is_Potentially_Use_Visible Flag9
310 -- Is_Constrained Flag12
311 -- Is_Generic_Type Flag13
312 -- Depends_On_Private Flag14
314 -- Is_Volatile Flag16
315 -- Is_Internal Flag17
316 -- Has_Delayed_Freeze Flag18
317 -- Is_Abstract_Subprogram Flag19
318 -- Is_Concurrent_Record_Type Flag20
320 -- Has_Master_Entity Flag21
321 -- Needs_No_Actuals Flag22
322 -- Has_Storage_Size_Clause Flag23
323 -- Is_Imported Flag24
324 -- Is_Limited_Record Flag25
325 -- Has_Completion Flag26
326 -- Has_Pragma_Controlled Flag27
327 -- Is_Statically_Allocated Flag28
328 -- Has_Size_Clause Flag29
331 -- Checks_May_Be_Suppressed Flag31
332 -- Kill_Elaboration_Checks Flag32
333 -- Kill_Range_Checks Flag33
334 -- Has_Independent_Components Flag34
335 -- Is_Class_Wide_Equivalent_Type Flag35
336 -- Referenced_As_LHS Flag36
337 -- Is_Known_Non_Null Flag37
338 -- Can_Never_Be_Null Flag38
339 -- Has_Default_Aspect Flag39
340 -- Body_Needed_For_SAL Flag40
342 -- Treat_As_Volatile Flag41
343 -- Is_Controlled_Active Flag42
344 -- Has_Controlled_Component Flag43
346 -- In_Private_Part Flag45
347 -- Has_Alignment_Clause Flag46
349 -- In_Package_Body Flag48
351 -- Delay_Subprogram_Descriptors Flag50
354 -- Is_Entry_Formal Flag52
355 -- Is_Private_Descendant Flag53
356 -- Return_Present Flag54
357 -- Is_Tagged_Type Flag55
358 -- Has_Homonym Flag56
360 -- Non_Binary_Modulus Flag58
361 -- Is_Preelaborated Flag59
362 -- Is_Shared_Passive Flag60
364 -- Is_Remote_Types Flag61
365 -- Is_Remote_Call_Interface Flag62
366 -- Is_Character_Type Flag63
367 -- Is_Intrinsic_Subprogram Flag64
368 -- Has_Record_Rep_Clause Flag65
369 -- Has_Enumeration_Rep_Clause Flag66
370 -- Has_Small_Clause Flag67
371 -- Has_Component_Size_Clause Flag68
372 -- Is_Access_Constant Flag69
373 -- Is_First_Subtype Flag70
375 -- Has_Completion_In_Body Flag71
376 -- Has_Unknown_Discriminants Flag72
377 -- Is_Child_Unit Flag73
378 -- Is_CPP_Class Flag74
379 -- Has_Non_Standard_Rep Flag75
380 -- Is_Constructor Flag76
381 -- Static_Elaboration_Desired Flag77
383 -- Has_All_Calls_Remote Flag79
384 -- Is_Constr_Subt_For_U_Nominal Flag80
386 -- Is_Asynchronous Flag81
387 -- Has_Gigi_Rep_Item Flag82
388 -- Has_Machine_Radix_Clause Flag83
389 -- Machine_Radix_10 Flag84
391 -- Has_Atomic_Components Flag86
392 -- Has_Volatile_Components Flag87
393 -- Discard_Names Flag88
394 -- Is_Interrupt_Handler Flag89
395 -- Returns_By_Ref Flag90
398 -- Size_Known_At_Compile_Time Flag92
399 -- Reverse_Storage_Order Flag93
400 -- Is_Generic_Actual_Type Flag94
401 -- Uses_Sec_Stack Flag95
402 -- Warnings_Off Flag96
403 -- Is_Controlling_Formal Flag97
404 -- Has_Controlling_Result Flag98
405 -- Is_Exported Flag99
406 -- Has_Specified_Layout Flag100
408 -- Has_Nested_Block_With_Handler Flag101
410 -- Is_Completely_Hidden Flag103
411 -- Address_Taken Flag104
412 -- Suppress_Initialization Flag105
413 -- Is_Limited_Composite Flag106
414 -- Is_Private_Composite Flag107
415 -- Default_Expressions_Processed Flag108
416 -- Is_Non_Static_Subtype Flag109
417 -- Has_Out_Or_In_Out_Parameter Flag110
419 -- Is_Formal_Subprogram Flag111
420 -- Is_Renaming_Of_Object Flag112
422 -- Delay_Cleanups Flag114
423 -- Never_Set_In_Source Flag115
424 -- Is_Visible_Lib_Unit Flag116
425 -- Is_Unchecked_Union Flag117
426 -- Is_For_Access_Subtype Flag118
427 -- Has_Convention_Pragma Flag119
428 -- Has_Primitive_Operations Flag120
430 -- Has_Pragma_Pack Flag121
431 -- Is_Bit_Packed_Array Flag122
432 -- Has_Unchecked_Union Flag123
433 -- Is_Eliminated Flag124
434 -- C_Pass_By_Copy Flag125
435 -- Is_Instantiated Flag126
436 -- Is_Valued_Procedure Flag127
437 -- (used for Component_Alignment) Flag128
438 -- (used for Component_Alignment) Flag129
439 -- Is_Generic_Instance Flag130
441 -- No_Pool_Assigned Flag131
442 -- Is_DIC_Procedure Flag132
443 -- Has_Inherited_DIC Flag133
444 -- Has_Aliased_Components Flag135
445 -- No_Strict_Aliasing Flag136
446 -- Is_Machine_Code_Subprogram Flag137
447 -- Is_Packed_Array_Impl_Type Flag138
448 -- Has_Biased_Representation Flag139
449 -- Has_Complex_Representation Flag140
451 -- Is_Constr_Subt_For_UN_Aliased Flag141
452 -- Has_Missing_Return Flag142
453 -- Has_Recursive_Call Flag143
454 -- Is_Unsigned_Type Flag144
455 -- Strict_Alignment Flag145
456 -- Is_Abstract_Type Flag146
457 -- Needs_Debug_Info Flag147
458 -- Is_Elaboration_Checks_OK_Id Flag148
459 -- Is_Compilation_Unit Flag149
460 -- Has_Pragma_Elaborate_Body Flag150
462 -- Has_Private_Ancestor Flag151
463 -- Entry_Accepted Flag152
464 -- Is_Obsolescent Flag153
465 -- Has_Per_Object_Constraint Flag154
466 -- Has_Private_Declaration Flag155
467 -- Referenced Flag156
468 -- Has_Pragma_Inline Flag157
469 -- Finalize_Storage_Only Flag158
470 -- From_Limited_With Flag159
471 -- Is_Package_Body_Entity Flag160
473 -- Has_Qualified_Name Flag161
474 -- Nonzero_Is_True Flag162
475 -- Is_True_Constant Flag163
476 -- Reverse_Bit_Order Flag164
477 -- Suppress_Style_Checks Flag165
478 -- Debug_Info_Off Flag166
479 -- Sec_Stack_Needed_For_Return Flag167
480 -- Materialize_Entity Flag168
481 -- Has_Pragma_Thread_Local_Storage Flag169
482 -- Is_Known_Valid Flag170
484 -- Is_Hidden_Open_Scope Flag171
485 -- Has_Object_Size_Clause Flag172
486 -- Has_Fully_Qualified_Name Flag173
487 -- Elaboration_Entity_Required Flag174
488 -- Has_Forward_Instantiation Flag175
489 -- Is_Discrim_SO_Function Flag176
490 -- Size_Depends_On_Discriminant Flag177
491 -- Is_Null_Init_Proc Flag178
492 -- Has_Pragma_Pure_Function Flag179
493 -- Has_Pragma_Unreferenced Flag180
495 -- Has_Contiguous_Rep Flag181
496 -- Has_Xref_Entry Flag182
497 -- Must_Be_On_Byte_Boundary Flag183
498 -- Has_Stream_Size_Clause Flag184
499 -- Is_Ada_2005_Only Flag185
500 -- Is_Interface Flag186
501 -- Has_Constrained_Partial_View Flag187
502 -- Uses_Lock_Free Flag188
503 -- Is_Pure_Unit_Access_Type Flag189
504 -- Has_Specified_Stream_Input Flag190
506 -- Has_Specified_Stream_Output Flag191
507 -- Has_Specified_Stream_Read Flag192
508 -- Has_Specified_Stream_Write Flag193
509 -- Is_Local_Anonymous_Access Flag194
510 -- Is_Primitive_Wrapper Flag195
511 -- Was_Hidden Flag196
512 -- Is_Limited_Interface Flag197
513 -- Has_Pragma_Ordered Flag198
514 -- Is_Ada_2012_Only Flag199
516 -- Has_Delayed_Aspects Flag200
517 -- Has_Pragma_No_Inline Flag201
518 -- Itype_Printed Flag202
519 -- Has_Pragma_Pure Flag203
520 -- Is_Known_Null Flag204
521 -- Low_Bound_Tested Flag205
522 -- Is_Visible_Formal Flag206
523 -- Known_To_Have_Preelab_Init Flag207
524 -- Must_Have_Preelab_Init Flag208
525 -- Is_Return_Object Flag209
526 -- Elaborate_Body_Desirable Flag210
528 -- Has_Static_Discriminants Flag211
529 -- Has_Pragma_Unreferenced_Objects Flag212
530 -- Requires_Overriding Flag213
532 -- Is_Param_Block_Component_Type Flag215
533 -- Universal_Aliasing Flag216
534 -- Suppress_Value_Tracking_On_Call Flag217
535 -- Is_Primitive Flag218
536 -- Has_Initial_Value Flag219
537 -- Has_Dispatch_Table Flag220
539 -- Has_Pragma_Preelab_Init Flag221
540 -- Used_As_Generic_Actual Flag222
541 -- Is_Descendant_Of_Address Flag223
544 -- Is_Only_Out_Parameter Flag226
545 -- Referenced_As_Out_Parameter Flag227
546 -- Has_Thunks Flag228
547 -- Can_Use_Internal_Rep Flag229
548 -- Has_Pragma_Inline_Always Flag230
550 -- Renamed_In_Spec Flag231
551 -- Has_Own_Invariants Flag232
552 -- Has_Pragma_Unmodified Flag233
553 -- Is_Dispatch_Table_Entity Flag234
554 -- Is_Trivial_Subprogram Flag235
555 -- Warnings_Off_Used Flag236
556 -- Warnings_Off_Used_Unmodified Flag237
557 -- Warnings_Off_Used_Unreferenced Flag238
558 -- No_Reordering Flag239
559 -- Has_Expanded_Contract Flag240
561 -- Optimize_Alignment_Space Flag241
562 -- Optimize_Alignment_Time Flag242
563 -- Overlays_Constant Flag243
564 -- Is_RACW_Stub_Type Flag244
565 -- Is_Private_Primitive Flag245
566 -- Is_Underlying_Record_View Flag246
567 -- OK_To_Rename Flag247
568 -- Has_Inheritable_Invariants Flag248
569 -- Is_Safe_To_Reevaluate Flag249
570 -- Has_Predicates Flag250
572 -- Has_Implicit_Dereference Flag251
573 -- Is_Finalized_Transient Flag252
574 -- Disable_Controlled Flag253
575 -- Is_Implementation_Defined Flag254
576 -- Is_Predicate_Function Flag255
577 -- Is_Predicate_Function_M Flag256
578 -- Is_Invariant_Procedure Flag257
579 -- Has_Dynamic_Predicate_Aspect Flag258
580 -- Has_Static_Predicate_Aspect Flag259
581 -- Has_Loop_Entry_Attributes Flag260
583 -- Has_Delayed_Rep_Aspects Flag261
584 -- May_Inherit_Delayed_Rep_Aspects Flag262
585 -- Has_Visible_Refinement Flag263
586 -- Is_Discriminant_Check_Function Flag264
587 -- SPARK_Pragma_Inherited Flag265
588 -- SPARK_Aux_Pragma_Inherited Flag266
589 -- Has_Shift_Operator Flag267
590 -- Is_Independent Flag268
591 -- Has_Static_Predicate Flag269
592 -- Stores_Attribute_Old_Prefix Flag270
594 -- Has_Protected Flag271
595 -- SSO_Set_Low_By_Default Flag272
596 -- SSO_Set_High_By_Default Flag273
597 -- Is_Generic_Actual_Subprogram Flag274
598 -- No_Predicate_On_Actual Flag275
599 -- No_Dynamic_Predicate_On_Actual Flag276
600 -- Is_Checked_Ghost_Entity Flag277
601 -- Is_Ignored_Ghost_Entity Flag278
602 -- Contains_Ignored_Ghost_Code Flag279
603 -- Partial_View_Has_Unknown_Discr Flag280
605 -- Is_Static_Type Flag281
606 -- Has_Nested_Subprogram Flag282
607 -- Is_Uplevel_Referenced_Entity Flag283
608 -- Is_Unimplemented Flag284
609 -- Is_Volatile_Full_Access Flag285
610 -- Is_Exception_Handler Flag286
611 -- Rewritten_For_C Flag287
612 -- Predicates_Ignored Flag288
613 -- Has_Timing_Event Flag289
614 -- Is_Class_Wide_Clone Flag290
616 -- Has_Inherited_Invariants Flag291
617 -- Is_Partial_Invariant_Procedure Flag292
618 -- Is_Actual_Subtype Flag293
619 -- Has_Pragma_Unused Flag294
620 -- Is_Ignored_Transient Flag295
621 -- Has_Partial_Visible_Refinement Flag296
622 -- Is_Entry_Wrapper Flag297
623 -- Is_Underlying_Full_View Flag298
624 -- Body_Needed_For_Inlining Flag299
625 -- Has_Private_Extension Flag300
627 -- Ignore_SPARK_Mode_Pragmas Flag301
628 -- Is_Initial_Condition_Procedure Flag302
629 -- Suppress_Elaboration_Warnings Flag303
630 -- Is_Elaboration_Warnings_OK_Id Flag304
631 -- Is_Activation_Record Flag305
632 -- Needs_Activation_Record Flag306
633 -- Is_Loop_Parameter Flag307
638 -- Note: Flag310-317 are defined in atree.ads/adb, but not yet in atree.h
640 -----------------------
641 -- Local subprograms --
642 -----------------------
645 (State_Id
: Entity_Id
;
646 Option_Nam
: Name_Id
) return Boolean;
647 -- Determine whether abstract state State_Id has particular option denoted
648 -- by the name Option_Nam.
654 function Float_Rep
(Id
: E
) return F
is
655 pragma Assert
(Is_Floating_Point_Type
(Id
));
657 return F
'Val (UI_To_Int
(Uint10
(Base_Type
(Id
))));
665 (State_Id
: Entity_Id
;
666 Option_Nam
: Name_Id
) return Boolean
668 Decl
: constant Node_Id
:= Parent
(State_Id
);
673 pragma Assert
(Ekind
(State_Id
) = E_Abstract_State
);
675 -- The declaration of abstract states with options appear as an
676 -- extension aggregate. If this is not the case, the option is not
679 if Nkind
(Decl
) /= N_Extension_Aggregate
then
685 Opt
:= First
(Expressions
(Decl
));
686 while Present
(Opt
) loop
687 if Nkind
(Opt
) = N_Identifier
and then Chars
(Opt
) = Option_Nam
then
694 -- Complex options with various specifiers
696 Opt
:= First
(Component_Associations
(Decl
));
697 while Present
(Opt
) loop
698 Opt_Nam
:= First
(Choices
(Opt
));
700 if Nkind
(Opt_Nam
) = N_Identifier
701 and then Chars
(Opt_Nam
) = Option_Nam
712 --------------------------------
713 -- Attribute Access Functions --
714 --------------------------------
716 function Abstract_States
(Id
: E
) return L
is
718 pragma Assert
(Ekind_In
(Id
, E_Generic_Package
, E_Package
));
722 function Accept_Address
(Id
: E
) return L
is
727 function Access_Disp_Table
(Id
: E
) return L
is
729 pragma Assert
(Ekind_In
(Id
, E_Record_Subtype
,
731 E_Record_Type_With_Private
));
732 return Elist16
(Implementation_Base_Type
(Id
));
733 end Access_Disp_Table
;
735 function Access_Disp_Table_Elab_Flag
(Id
: E
) return E
is
737 pragma Assert
(Ekind_In
(Id
, E_Record_Subtype
,
739 E_Record_Type_With_Private
));
740 return Node30
(Implementation_Base_Type
(Id
));
741 end Access_Disp_Table_Elab_Flag
;
743 function Activation_Record_Component
(Id
: E
) return E
is
745 pragma Assert
(Ekind_In
(Id
, E_Constant
,
752 end Activation_Record_Component
;
754 function Actual_Subtype
(Id
: E
) return E
is
757 (Ekind_In
(Id
, E_Constant
, E_Variable
, E_Generic_In_Out_Parameter
)
758 or else Is_Formal
(Id
));
762 function Address_Taken
(Id
: E
) return B
is
767 function Alias
(Id
: E
) return E
is
770 (Is_Overloadable
(Id
) or else Ekind
(Id
) = E_Subprogram_Type
);
774 function Alignment
(Id
: E
) return U
is
776 pragma Assert
(Is_Type
(Id
)
777 or else Is_Formal
(Id
)
778 or else Ekind_In
(Id
, E_Loop_Parameter
,
785 function Anonymous_Designated_Type
(Id
: E
) return E
is
787 pragma Assert
(Ekind
(Id
) = E_Variable
);
789 end Anonymous_Designated_Type
;
791 function Anonymous_Masters
(Id
: E
) return L
is
793 pragma Assert
(Ekind_In
(Id
, E_Function
,
798 end Anonymous_Masters
;
800 function Anonymous_Object
(Id
: E
) return E
is
802 pragma Assert
(Ekind_In
(Id
, E_Protected_Type
, E_Task_Type
));
804 end Anonymous_Object
;
806 function Associated_Entity
(Id
: E
) return E
is
809 end Associated_Entity
;
811 function Associated_Formal_Package
(Id
: E
) return E
is
813 pragma Assert
(Ekind
(Id
) = E_Package
);
815 end Associated_Formal_Package
;
817 function Associated_Node_For_Itype
(Id
: E
) return N
is
820 end Associated_Node_For_Itype
;
822 function Associated_Storage_Pool
(Id
: E
) return E
is
824 pragma Assert
(Is_Access_Type
(Id
));
825 return Node22
(Root_Type
(Id
));
826 end Associated_Storage_Pool
;
828 function Barrier_Function
(Id
: E
) return N
is
830 pragma Assert
(Is_Entry
(Id
));
832 end Barrier_Function
;
834 function Block_Node
(Id
: E
) return N
is
836 pragma Assert
(Ekind
(Id
) = E_Block
);
840 function Body_Entity
(Id
: E
) return E
is
842 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Generic_Package
));
846 function Body_Needed_For_Inlining
(Id
: E
) return B
is
848 pragma Assert
(Ekind
(Id
) = E_Package
);
850 end Body_Needed_For_Inlining
;
852 function Body_Needed_For_SAL
(Id
: E
) return B
is
855 (Ekind
(Id
) = E_Package
856 or else Is_Subprogram
(Id
)
857 or else Is_Generic_Unit
(Id
));
859 end Body_Needed_For_SAL
;
861 function Body_References
(Id
: E
) return L
is
863 pragma Assert
(Ekind
(Id
) = E_Abstract_State
);
867 function BIP_Initialization_Call
(Id
: E
) return N
is
869 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
871 end BIP_Initialization_Call
;
873 function C_Pass_By_Copy
(Id
: E
) return B
is
875 pragma Assert
(Is_Record_Type
(Id
));
876 return Flag125
(Implementation_Base_Type
(Id
));
879 function Can_Never_Be_Null
(Id
: E
) return B
is
882 end Can_Never_Be_Null
;
884 function Checks_May_Be_Suppressed
(Id
: E
) return B
is
887 end Checks_May_Be_Suppressed
;
889 function Class_Wide_Clone
(Id
: E
) return E
is
891 pragma Assert
(Is_Subprogram
(Id
));
893 end Class_Wide_Clone
;
895 function Class_Wide_Type
(Id
: E
) return E
is
897 pragma Assert
(Is_Type
(Id
));
901 function Cloned_Subtype
(Id
: E
) return E
is
903 pragma Assert
(Ekind_In
(Id
, E_Record_Subtype
, E_Class_Wide_Subtype
));
907 function Component_Bit_Offset
(Id
: E
) return U
is
909 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
911 end Component_Bit_Offset
;
913 function Component_Clause
(Id
: E
) return N
is
915 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
917 end Component_Clause
;
919 function Component_Size
(Id
: E
) return U
is
921 pragma Assert
(Is_Array_Type
(Id
));
922 return Uint22
(Implementation_Base_Type
(Id
));
925 function Component_Type
(Id
: E
) return E
is
927 pragma Assert
(Is_Array_Type
(Id
));
928 return Node20
(Implementation_Base_Type
(Id
));
931 function Corresponding_Concurrent_Type
(Id
: E
) return E
is
933 pragma Assert
(Ekind
(Id
) = E_Record_Type
);
935 end Corresponding_Concurrent_Type
;
937 function Corresponding_Discriminant
(Id
: E
) return E
is
939 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
941 end Corresponding_Discriminant
;
943 function Corresponding_Equality
(Id
: E
) return E
is
946 (Ekind
(Id
) = E_Function
947 and then not Comes_From_Source
(Id
)
948 and then Chars
(Id
) = Name_Op_Ne
);
950 end Corresponding_Equality
;
952 function Corresponding_Function
(Id
: E
) return E
is
954 pragma Assert
(Ekind
(Id
) = E_Procedure
);
956 end Corresponding_Function
;
958 function Corresponding_Procedure
(Id
: E
) return E
is
960 pragma Assert
(Ekind
(Id
) = E_Function
);
962 end Corresponding_Procedure
;
964 function Corresponding_Protected_Entry
(Id
: E
) return E
is
966 pragma Assert
(Ekind
(Id
) = E_Subprogram_Body
);
968 end Corresponding_Protected_Entry
;
970 function Corresponding_Record_Component
(Id
: E
) return E
is
972 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
974 end Corresponding_Record_Component
;
976 function Corresponding_Record_Type
(Id
: E
) return E
is
978 pragma Assert
(Is_Concurrent_Type
(Id
));
980 end Corresponding_Record_Type
;
982 function Corresponding_Remote_Type
(Id
: E
) return E
is
985 end Corresponding_Remote_Type
;
987 function Current_Use_Clause
(Id
: E
) return E
is
989 pragma Assert
(Ekind
(Id
) = E_Package
or else Is_Type
(Id
));
991 end Current_Use_Clause
;
993 function Current_Value
(Id
: E
) return N
is
995 pragma Assert
(Ekind
(Id
) in Object_Kind
);
999 function CR_Discriminant
(Id
: E
) return E
is
1002 end CR_Discriminant
;
1004 function Debug_Info_Off
(Id
: E
) return B
is
1006 return Flag166
(Id
);
1009 function Debug_Renaming_Link
(Id
: E
) return E
is
1012 end Debug_Renaming_Link
;
1014 function Default_Aspect_Component_Value
(Id
: E
) return N
is
1016 pragma Assert
(Is_Array_Type
(Id
));
1017 return Node19
(Base_Type
(Id
));
1018 end Default_Aspect_Component_Value
;
1020 function Default_Aspect_Value
(Id
: E
) return N
is
1022 pragma Assert
(Is_Scalar_Type
(Id
));
1023 return Node19
(Base_Type
(Id
));
1024 end Default_Aspect_Value
;
1026 function Default_Expr_Function
(Id
: E
) return E
is
1028 pragma Assert
(Is_Formal
(Id
));
1030 end Default_Expr_Function
;
1032 function Default_Expressions_Processed
(Id
: E
) return B
is
1034 return Flag108
(Id
);
1035 end Default_Expressions_Processed
;
1037 function Default_Value
(Id
: E
) return N
is
1039 pragma Assert
(Is_Formal
(Id
));
1043 function Delay_Cleanups
(Id
: E
) return B
is
1045 return Flag114
(Id
);
1048 function Delay_Subprogram_Descriptors
(Id
: E
) return B
is
1051 end Delay_Subprogram_Descriptors
;
1053 function Delta_Value
(Id
: E
) return R
is
1055 pragma Assert
(Is_Fixed_Point_Type
(Id
));
1056 return Ureal18
(Id
);
1059 function Dependent_Instances
(Id
: E
) return L
is
1061 pragma Assert
(Is_Generic_Instance
(Id
));
1063 end Dependent_Instances
;
1065 function Depends_On_Private
(Id
: E
) return B
is
1067 pragma Assert
(Nkind
(Id
) in N_Entity
);
1069 end Depends_On_Private
;
1071 function Derived_Type_Link
(Id
: E
) return E
is
1073 pragma Assert
(Is_Type
(Id
));
1074 return Node31
(Base_Type
(Id
));
1075 end Derived_Type_Link
;
1077 function Digits_Value
(Id
: E
) return U
is
1080 (Is_Floating_Point_Type
(Id
)
1081 or else Is_Decimal_Fixed_Point_Type
(Id
));
1085 function Direct_Primitive_Operations
(Id
: E
) return L
is
1087 pragma Assert
(Is_Tagged_Type
(Id
));
1088 return Elist10
(Id
);
1089 end Direct_Primitive_Operations
;
1091 function Directly_Designated_Type
(Id
: E
) return E
is
1093 pragma Assert
(Is_Access_Type
(Id
));
1095 end Directly_Designated_Type
;
1097 function Disable_Controlled
(Id
: E
) return B
is
1099 return Flag253
(Base_Type
(Id
));
1100 end Disable_Controlled
;
1102 function Discard_Names
(Id
: E
) return B
is
1107 function Discriminal
(Id
: E
) return E
is
1109 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
1113 function Discriminal_Link
(Id
: E
) return N
is
1116 end Discriminal_Link
;
1118 function Discriminant_Checking_Func
(Id
: E
) return E
is
1120 pragma Assert
(Ekind
(Id
) = E_Component
);
1122 end Discriminant_Checking_Func
;
1124 function Discriminant_Constraint
(Id
: E
) return L
is
1126 pragma Assert
(Is_Composite_Type
(Id
) and then Has_Discriminants
(Id
));
1127 return Elist21
(Id
);
1128 end Discriminant_Constraint
;
1130 function Discriminant_Default_Value
(Id
: E
) return N
is
1132 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
1134 end Discriminant_Default_Value
;
1136 function Discriminant_Number
(Id
: E
) return U
is
1138 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
1140 end Discriminant_Number
;
1142 function Dispatch_Table_Wrappers
(Id
: E
) return L
is
1144 pragma Assert
(Ekind_In
(Id
, E_Record_Type
,
1146 return Elist26
(Implementation_Base_Type
(Id
));
1147 end Dispatch_Table_Wrappers
;
1149 function DT_Entry_Count
(Id
: E
) return U
is
1151 pragma Assert
(Ekind
(Id
) = E_Component
and then Is_Tag
(Id
));
1155 function DT_Offset_To_Top_Func
(Id
: E
) return E
is
1157 pragma Assert
(Ekind
(Id
) = E_Component
and then Is_Tag
(Id
));
1159 end DT_Offset_To_Top_Func
;
1161 function DT_Position
(Id
: E
) return U
is
1163 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
)
1164 and then Present
(DTC_Entity
(Id
)));
1168 function DTC_Entity
(Id
: E
) return E
is
1170 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
1174 function Elaborate_Body_Desirable
(Id
: E
) return B
is
1176 pragma Assert
(Ekind
(Id
) = E_Package
);
1177 return Flag210
(Id
);
1178 end Elaborate_Body_Desirable
;
1180 function Elaboration_Entity
(Id
: E
) return E
is
1185 Ekind
(Id
) = E_Package
1187 Is_Generic_Unit
(Id
));
1189 end Elaboration_Entity
;
1191 function Elaboration_Entity_Required
(Id
: E
) return B
is
1196 Ekind
(Id
) = E_Package
1198 Is_Generic_Unit
(Id
));
1199 return Flag174
(Id
);
1200 end Elaboration_Entity_Required
;
1202 function Encapsulating_State
(Id
: E
) return N
is
1204 pragma Assert
(Ekind_In
(Id
, E_Abstract_State
, E_Constant
, E_Variable
));
1206 end Encapsulating_State
;
1208 function Enclosing_Scope
(Id
: E
) return E
is
1211 end Enclosing_Scope
;
1213 function Entry_Accepted
(Id
: E
) return B
is
1215 pragma Assert
(Is_Entry
(Id
));
1216 return Flag152
(Id
);
1219 function Entry_Bodies_Array
(Id
: E
) return E
is
1222 end Entry_Bodies_Array
;
1224 function Entry_Cancel_Parameter
(Id
: E
) return E
is
1227 end Entry_Cancel_Parameter
;
1229 function Entry_Component
(Id
: E
) return E
is
1232 end Entry_Component
;
1234 function Entry_Formal
(Id
: E
) return E
is
1239 function Entry_Index_Constant
(Id
: E
) return N
is
1241 pragma Assert
(Ekind
(Id
) = E_Entry_Index_Parameter
);
1243 end Entry_Index_Constant
;
1245 function Entry_Max_Queue_Lengths_Array
(Id
: E
) return N
is
1247 pragma Assert
(Ekind
(Id
) = E_Protected_Type
);
1249 end Entry_Max_Queue_Lengths_Array
;
1251 function Contains_Ignored_Ghost_Code
(Id
: E
) return B
is
1254 (Ekind_In
(Id
, E_Block
,
1258 E_Generic_Procedure
,
1262 E_Subprogram_Body
));
1263 return Flag279
(Id
);
1264 end Contains_Ignored_Ghost_Code
;
1266 function Contract
(Id
: E
) return N
is
1269 (Ekind_In
(Id
, E_Protected_Type
, -- concurrent types
1273 Ekind_In
(Id
, E_Constant
, -- objects
1276 Ekind_In
(Id
, E_Entry
, -- overloadable
1280 E_Generic_Procedure
,
1285 Ekind_In
(Id
, E_Generic_Package
, -- packages
1289 Ekind
(Id
) = E_Void
); -- special purpose
1293 function Contract_Wrapper
(Id
: E
) return E
is
1295 pragma Assert
(Ekind_In
(Id
, E_Entry
, E_Entry_Family
));
1297 end Contract_Wrapper
;
1299 function Entry_Parameters_Type
(Id
: E
) return E
is
1302 end Entry_Parameters_Type
;
1304 function Enum_Pos_To_Rep
(Id
: E
) return E
is
1306 pragma Assert
(Ekind
(Id
) = E_Enumeration_Type
);
1308 end Enum_Pos_To_Rep
;
1310 function Enumeration_Pos
(Id
: E
) return Uint
is
1312 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
1314 end Enumeration_Pos
;
1316 function Enumeration_Rep
(Id
: E
) return U
is
1318 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
1320 end Enumeration_Rep
;
1322 function Enumeration_Rep_Expr
(Id
: E
) return N
is
1324 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
1326 end Enumeration_Rep_Expr
;
1328 function Equivalent_Type
(Id
: E
) return E
is
1331 (Ekind_In
(Id
, E_Class_Wide_Type
,
1332 E_Class_Wide_Subtype
,
1333 E_Access_Subprogram_Type
,
1334 E_Access_Protected_Subprogram_Type
,
1335 E_Anonymous_Access_Protected_Subprogram_Type
,
1336 E_Access_Subprogram_Type
,
1339 end Equivalent_Type
;
1341 function Esize
(Id
: E
) return Uint
is
1346 function Extra_Accessibility
(Id
: E
) return E
is
1349 (Is_Formal
(Id
) or else Ekind_In
(Id
, E_Variable
, E_Constant
));
1351 end Extra_Accessibility
;
1353 function Extra_Accessibility_Of_Result
(Id
: E
) return E
is
1355 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Operator
, E_Subprogram_Type
));
1357 end Extra_Accessibility_Of_Result
;
1359 function Extra_Constrained
(Id
: E
) return E
is
1361 pragma Assert
(Is_Formal
(Id
) or else Ekind
(Id
) = E_Variable
);
1363 end Extra_Constrained
;
1365 function Extra_Formal
(Id
: E
) return E
is
1370 function Extra_Formals
(Id
: E
) return E
is
1373 (Is_Overloadable
(Id
)
1374 or else Ekind_In
(Id
, E_Entry_Family
,
1376 E_Subprogram_Type
));
1380 function Can_Use_Internal_Rep
(Id
: E
) return B
is
1382 pragma Assert
(Is_Access_Subprogram_Type
(Base_Type
(Id
)));
1383 return Flag229
(Base_Type
(Id
));
1384 end Can_Use_Internal_Rep
;
1386 function Finalization_Master
(Id
: E
) return E
is
1388 pragma Assert
(Is_Access_Type
(Id
));
1389 return Node23
(Root_Type
(Id
));
1390 end Finalization_Master
;
1392 function Finalize_Storage_Only
(Id
: E
) return B
is
1394 pragma Assert
(Is_Type
(Id
));
1395 return Flag158
(Base_Type
(Id
));
1396 end Finalize_Storage_Only
;
1398 function Finalizer
(Id
: E
) return E
is
1400 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Package_Body
));
1404 function First_Entity
(Id
: E
) return E
is
1409 function First_Exit_Statement
(Id
: E
) return N
is
1411 pragma Assert
(Ekind
(Id
) = E_Loop
);
1413 end First_Exit_Statement
;
1415 function First_Index
(Id
: E
) return N
is
1417 pragma Assert
(Is_Array_Type
(Id
));
1421 function First_Literal
(Id
: E
) return E
is
1423 pragma Assert
(Is_Enumeration_Type
(Id
));
1427 function First_Private_Entity
(Id
: E
) return E
is
1429 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Generic_Package
)
1430 or else Ekind
(Id
) in Concurrent_Kind
);
1432 end First_Private_Entity
;
1434 function First_Rep_Item
(Id
: E
) return E
is
1439 function Freeze_Node
(Id
: E
) return N
is
1444 function From_Limited_With
(Id
: E
) return B
is
1446 return Flag159
(Id
);
1447 end From_Limited_With
;
1449 function Full_View
(Id
: E
) return E
is
1451 pragma Assert
(Is_Type
(Id
) or else Ekind
(Id
) = E_Constant
);
1455 function Generic_Homonym
(Id
: E
) return E
is
1457 pragma Assert
(Ekind
(Id
) = E_Generic_Package
);
1459 end Generic_Homonym
;
1461 function Generic_Renamings
(Id
: E
) return L
is
1463 return Elist23
(Id
);
1464 end Generic_Renamings
;
1466 function Handler_Records
(Id
: E
) return S
is
1469 end Handler_Records
;
1471 function Has_Aliased_Components
(Id
: E
) return B
is
1473 return Flag135
(Implementation_Base_Type
(Id
));
1474 end Has_Aliased_Components
;
1476 function Has_Alignment_Clause
(Id
: E
) return B
is
1479 end Has_Alignment_Clause
;
1481 function Has_All_Calls_Remote
(Id
: E
) return B
is
1484 end Has_All_Calls_Remote
;
1486 function Has_Atomic_Components
(Id
: E
) return B
is
1488 return Flag86
(Implementation_Base_Type
(Id
));
1489 end Has_Atomic_Components
;
1491 function Has_Biased_Representation
(Id
: E
) return B
is
1493 return Flag139
(Id
);
1494 end Has_Biased_Representation
;
1496 function Has_Completion
(Id
: E
) return B
is
1501 function Has_Completion_In_Body
(Id
: E
) return B
is
1503 pragma Assert
(Is_Type
(Id
));
1505 end Has_Completion_In_Body
;
1507 function Has_Complex_Representation
(Id
: E
) return B
is
1509 pragma Assert
(Is_Record_Type
(Id
));
1510 return Flag140
(Implementation_Base_Type
(Id
));
1511 end Has_Complex_Representation
;
1513 function Has_Component_Size_Clause
(Id
: E
) return B
is
1515 pragma Assert
(Is_Array_Type
(Id
));
1516 return Flag68
(Implementation_Base_Type
(Id
));
1517 end Has_Component_Size_Clause
;
1519 function Has_Constrained_Partial_View
(Id
: E
) return B
is
1521 pragma Assert
(Is_Type
(Id
));
1522 return Flag187
(Id
);
1523 end Has_Constrained_Partial_View
;
1525 function Has_Controlled_Component
(Id
: E
) return B
is
1527 return Flag43
(Base_Type
(Id
));
1528 end Has_Controlled_Component
;
1530 function Has_Contiguous_Rep
(Id
: E
) return B
is
1532 return Flag181
(Id
);
1533 end Has_Contiguous_Rep
;
1535 function Has_Controlling_Result
(Id
: E
) return B
is
1538 end Has_Controlling_Result
;
1540 function Has_Convention_Pragma
(Id
: E
) return B
is
1542 return Flag119
(Id
);
1543 end Has_Convention_Pragma
;
1545 function Has_Default_Aspect
(Id
: E
) return B
is
1547 return Flag39
(Base_Type
(Id
));
1548 end Has_Default_Aspect
;
1550 function Has_Delayed_Aspects
(Id
: E
) return B
is
1552 pragma Assert
(Nkind
(Id
) in N_Entity
);
1553 return Flag200
(Id
);
1554 end Has_Delayed_Aspects
;
1556 function Has_Delayed_Freeze
(Id
: E
) return B
is
1558 pragma Assert
(Nkind
(Id
) in N_Entity
);
1560 end Has_Delayed_Freeze
;
1562 function Has_Delayed_Rep_Aspects
(Id
: E
) return B
is
1564 pragma Assert
(Nkind
(Id
) in N_Entity
);
1565 return Flag261
(Id
);
1566 end Has_Delayed_Rep_Aspects
;
1568 function Has_Discriminants
(Id
: E
) return B
is
1570 pragma Assert
(Is_Type
(Id
));
1572 end Has_Discriminants
;
1574 function Has_Dispatch_Table
(Id
: E
) return B
is
1576 pragma Assert
(Is_Tagged_Type
(Id
));
1577 return Flag220
(Id
);
1578 end Has_Dispatch_Table
;
1580 function Has_Dynamic_Predicate_Aspect
(Id
: E
) return B
is
1582 pragma Assert
(Is_Type
(Id
));
1583 return Flag258
(Id
);
1584 end Has_Dynamic_Predicate_Aspect
;
1586 function Has_Enumeration_Rep_Clause
(Id
: E
) return B
is
1588 pragma Assert
(Is_Enumeration_Type
(Id
));
1590 end Has_Enumeration_Rep_Clause
;
1592 function Has_Exit
(Id
: E
) return B
is
1597 function Has_Expanded_Contract
(Id
: E
) return B
is
1599 pragma Assert
(Is_Subprogram
(Id
));
1600 return Flag240
(Id
);
1601 end Has_Expanded_Contract
;
1603 function Has_Forward_Instantiation
(Id
: E
) return B
is
1605 return Flag175
(Id
);
1606 end Has_Forward_Instantiation
;
1608 function Has_Fully_Qualified_Name
(Id
: E
) return B
is
1610 return Flag173
(Id
);
1611 end Has_Fully_Qualified_Name
;
1613 function Has_Gigi_Rep_Item
(Id
: E
) return B
is
1616 end Has_Gigi_Rep_Item
;
1618 function Has_Homonym
(Id
: E
) return B
is
1623 function Has_Implicit_Dereference
(Id
: E
) return B
is
1625 return Flag251
(Id
);
1626 end Has_Implicit_Dereference
;
1628 function Has_Independent_Components
(Id
: E
) return B
is
1630 return Flag34
(Implementation_Base_Type
(Id
));
1631 end Has_Independent_Components
;
1633 function Has_Inheritable_Invariants
(Id
: E
) return B
is
1635 pragma Assert
(Is_Type
(Id
));
1636 return Flag248
(Base_Type
(Id
));
1637 end Has_Inheritable_Invariants
;
1639 function Has_Inherited_DIC
(Id
: E
) return B
is
1641 pragma Assert
(Is_Type
(Id
));
1642 return Flag133
(Base_Type
(Id
));
1643 end Has_Inherited_DIC
;
1645 function Has_Inherited_Invariants
(Id
: E
) return B
is
1647 pragma Assert
(Is_Type
(Id
));
1648 return Flag291
(Base_Type
(Id
));
1649 end Has_Inherited_Invariants
;
1651 function Has_Initial_Value
(Id
: E
) return B
is
1653 pragma Assert
(Ekind
(Id
) = E_Variable
or else Is_Formal
(Id
));
1654 return Flag219
(Id
);
1655 end Has_Initial_Value
;
1657 function Has_Loop_Entry_Attributes
(Id
: E
) return B
is
1659 pragma Assert
(Ekind
(Id
) = E_Loop
);
1660 return Flag260
(Id
);
1661 end Has_Loop_Entry_Attributes
;
1663 function Has_Machine_Radix_Clause
(Id
: E
) return B
is
1665 pragma Assert
(Is_Decimal_Fixed_Point_Type
(Id
));
1667 end Has_Machine_Radix_Clause
;
1669 function Has_Master_Entity
(Id
: E
) return B
is
1672 end Has_Master_Entity
;
1674 function Has_Missing_Return
(Id
: E
) return B
is
1676 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Generic_Function
));
1677 return Flag142
(Id
);
1678 end Has_Missing_Return
;
1680 function Has_Nested_Block_With_Handler
(Id
: E
) return B
is
1682 return Flag101
(Id
);
1683 end Has_Nested_Block_With_Handler
;
1685 function Has_Nested_Subprogram
(Id
: E
) return B
is
1687 pragma Assert
(Is_Subprogram
(Id
));
1688 return Flag282
(Id
);
1689 end Has_Nested_Subprogram
;
1691 function Has_Non_Standard_Rep
(Id
: E
) return B
is
1693 return Flag75
(Implementation_Base_Type
(Id
));
1694 end Has_Non_Standard_Rep
;
1696 function Has_Object_Size_Clause
(Id
: E
) return B
is
1698 pragma Assert
(Is_Type
(Id
));
1699 return Flag172
(Id
);
1700 end Has_Object_Size_Clause
;
1702 function Has_Out_Or_In_Out_Parameter
(Id
: E
) return B
is
1705 (Ekind_In
(Id
, E_Entry
, E_Entry_Family
)
1706 or else Is_Subprogram_Or_Generic_Subprogram
(Id
));
1707 return Flag110
(Id
);
1708 end Has_Out_Or_In_Out_Parameter
;
1710 function Has_Own_DIC
(Id
: E
) return B
is
1712 pragma Assert
(Is_Type
(Id
));
1713 return Flag3
(Base_Type
(Id
));
1716 function Has_Own_Invariants
(Id
: E
) return B
is
1718 pragma Assert
(Is_Type
(Id
));
1719 return Flag232
(Base_Type
(Id
));
1720 end Has_Own_Invariants
;
1722 function Has_Partial_Visible_Refinement
(Id
: E
) return B
is
1724 pragma Assert
(Ekind
(Id
) = E_Abstract_State
);
1725 return Flag296
(Id
);
1726 end Has_Partial_Visible_Refinement
;
1728 function Has_Per_Object_Constraint
(Id
: E
) return B
is
1730 return Flag154
(Id
);
1731 end Has_Per_Object_Constraint
;
1733 function Has_Pragma_Controlled
(Id
: E
) return B
is
1735 pragma Assert
(Is_Access_Type
(Id
));
1736 return Flag27
(Implementation_Base_Type
(Id
));
1737 end Has_Pragma_Controlled
;
1739 function Has_Pragma_Elaborate_Body
(Id
: E
) return B
is
1741 return Flag150
(Id
);
1742 end Has_Pragma_Elaborate_Body
;
1744 function Has_Pragma_Inline
(Id
: E
) return B
is
1746 return Flag157
(Id
);
1747 end Has_Pragma_Inline
;
1749 function Has_Pragma_Inline_Always
(Id
: E
) return B
is
1751 return Flag230
(Id
);
1752 end Has_Pragma_Inline_Always
;
1754 function Has_Pragma_No_Inline
(Id
: E
) return B
is
1756 return Flag201
(Id
);
1757 end Has_Pragma_No_Inline
;
1759 function Has_Pragma_Ordered
(Id
: E
) return B
is
1761 pragma Assert
(Is_Enumeration_Type
(Id
));
1762 return Flag198
(Implementation_Base_Type
(Id
));
1763 end Has_Pragma_Ordered
;
1765 function Has_Pragma_Pack
(Id
: E
) return B
is
1767 pragma Assert
(Is_Record_Type
(Id
) or else Is_Array_Type
(Id
));
1768 return Flag121
(Implementation_Base_Type
(Id
));
1769 end Has_Pragma_Pack
;
1771 function Has_Pragma_Preelab_Init
(Id
: E
) return B
is
1773 return Flag221
(Id
);
1774 end Has_Pragma_Preelab_Init
;
1776 function Has_Pragma_Pure
(Id
: E
) return B
is
1778 return Flag203
(Id
);
1779 end Has_Pragma_Pure
;
1781 function Has_Pragma_Pure_Function
(Id
: E
) return B
is
1783 return Flag179
(Id
);
1784 end Has_Pragma_Pure_Function
;
1786 function Has_Pragma_Thread_Local_Storage
(Id
: E
) return B
is
1788 return Flag169
(Id
);
1789 end Has_Pragma_Thread_Local_Storage
;
1791 function Has_Pragma_Unmodified
(Id
: E
) return B
is
1793 return Flag233
(Id
);
1794 end Has_Pragma_Unmodified
;
1796 function Has_Pragma_Unreferenced
(Id
: E
) return B
is
1798 return Flag180
(Id
);
1799 end Has_Pragma_Unreferenced
;
1801 function Has_Pragma_Unreferenced_Objects
(Id
: E
) return B
is
1803 pragma Assert
(Is_Type
(Id
));
1804 return Flag212
(Id
);
1805 end Has_Pragma_Unreferenced_Objects
;
1807 function Has_Pragma_Unused
(Id
: E
) return B
is
1809 return Flag294
(Id
);
1810 end Has_Pragma_Unused
;
1812 function Has_Predicates
(Id
: E
) return B
is
1814 pragma Assert
(Is_Type
(Id
));
1815 return Flag250
(Id
);
1818 function Has_Primitive_Operations
(Id
: E
) return B
is
1820 pragma Assert
(Is_Type
(Id
));
1821 return Flag120
(Base_Type
(Id
));
1822 end Has_Primitive_Operations
;
1824 function Has_Private_Ancestor
(Id
: E
) return B
is
1826 return Flag151
(Id
);
1827 end Has_Private_Ancestor
;
1829 function Has_Private_Declaration
(Id
: E
) return B
is
1831 return Flag155
(Id
);
1832 end Has_Private_Declaration
;
1834 function Has_Private_Extension
(Id
: E
) return B
is
1836 pragma Assert
(Is_Tagged_Type
(Id
));
1837 return Flag300
(Id
);
1838 end Has_Private_Extension
;
1840 function Has_Protected
(Id
: E
) return B
is
1842 return Flag271
(Base_Type
(Id
));
1845 function Has_Qualified_Name
(Id
: E
) return B
is
1847 return Flag161
(Id
);
1848 end Has_Qualified_Name
;
1850 function Has_RACW
(Id
: E
) return B
is
1852 pragma Assert
(Ekind
(Id
) = E_Package
);
1853 return Flag214
(Id
);
1856 function Has_Record_Rep_Clause
(Id
: E
) return B
is
1858 pragma Assert
(Is_Record_Type
(Id
));
1859 return Flag65
(Implementation_Base_Type
(Id
));
1860 end Has_Record_Rep_Clause
;
1862 function Has_Recursive_Call
(Id
: E
) return B
is
1864 pragma Assert
(Is_Subprogram
(Id
));
1865 return Flag143
(Id
);
1866 end Has_Recursive_Call
;
1868 function Has_Shift_Operator
(Id
: E
) return B
is
1870 pragma Assert
(Is_Integer_Type
(Id
));
1871 return Flag267
(Base_Type
(Id
));
1872 end Has_Shift_Operator
;
1874 function Has_Size_Clause
(Id
: E
) return B
is
1877 end Has_Size_Clause
;
1879 function Has_Small_Clause
(Id
: E
) return B
is
1881 pragma Assert
(Is_Ordinary_Fixed_Point_Type
(Id
));
1883 end Has_Small_Clause
;
1885 function Has_Specified_Layout
(Id
: E
) return B
is
1887 pragma Assert
(Is_Type
(Id
));
1888 return Flag100
(Implementation_Base_Type
(Id
));
1889 end Has_Specified_Layout
;
1891 function Has_Specified_Stream_Input
(Id
: E
) return B
is
1893 pragma Assert
(Is_Type
(Id
));
1894 return Flag190
(Id
);
1895 end Has_Specified_Stream_Input
;
1897 function Has_Specified_Stream_Output
(Id
: E
) return B
is
1899 pragma Assert
(Is_Type
(Id
));
1900 return Flag191
(Id
);
1901 end Has_Specified_Stream_Output
;
1903 function Has_Specified_Stream_Read
(Id
: E
) return B
is
1905 pragma Assert
(Is_Type
(Id
));
1906 return Flag192
(Id
);
1907 end Has_Specified_Stream_Read
;
1909 function Has_Specified_Stream_Write
(Id
: E
) return B
is
1911 pragma Assert
(Is_Type
(Id
));
1912 return Flag193
(Id
);
1913 end Has_Specified_Stream_Write
;
1915 function Has_Static_Discriminants
(Id
: E
) return B
is
1917 pragma Assert
(Is_Type
(Id
));
1918 return Flag211
(Id
);
1919 end Has_Static_Discriminants
;
1921 function Has_Static_Predicate
(Id
: E
) return B
is
1923 pragma Assert
(Is_Type
(Id
));
1924 return Flag269
(Id
);
1925 end Has_Static_Predicate
;
1927 function Has_Static_Predicate_Aspect
(Id
: E
) return B
is
1929 pragma Assert
(Is_Type
(Id
));
1930 return Flag259
(Id
);
1931 end Has_Static_Predicate_Aspect
;
1933 function Has_Storage_Size_Clause
(Id
: E
) return B
is
1935 pragma Assert
(Is_Access_Type
(Id
) or else Is_Task_Type
(Id
));
1936 return Flag23
(Implementation_Base_Type
(Id
));
1937 end Has_Storage_Size_Clause
;
1939 function Has_Stream_Size_Clause
(Id
: E
) return B
is
1941 return Flag184
(Id
);
1942 end Has_Stream_Size_Clause
;
1944 function Has_Task
(Id
: E
) return B
is
1946 return Flag30
(Base_Type
(Id
));
1949 function Has_Thunks
(Id
: E
) return B
is
1951 return Flag228
(Id
);
1954 function Has_Timing_Event
(Id
: E
) return B
is
1956 return Flag289
(Base_Type
(Id
));
1957 end Has_Timing_Event
;
1959 function Has_Unchecked_Union
(Id
: E
) return B
is
1961 return Flag123
(Base_Type
(Id
));
1962 end Has_Unchecked_Union
;
1964 function Has_Unknown_Discriminants
(Id
: E
) return B
is
1966 pragma Assert
(Is_Type
(Id
));
1968 end Has_Unknown_Discriminants
;
1970 function Has_Visible_Refinement
(Id
: E
) return B
is
1972 pragma Assert
(Ekind
(Id
) = E_Abstract_State
);
1973 return Flag263
(Id
);
1974 end Has_Visible_Refinement
;
1976 function Has_Volatile_Components
(Id
: E
) return B
is
1978 return Flag87
(Implementation_Base_Type
(Id
));
1979 end Has_Volatile_Components
;
1981 function Has_Xref_Entry
(Id
: E
) return B
is
1983 return Flag182
(Id
);
1986 function Hiding_Loop_Variable
(Id
: E
) return E
is
1988 pragma Assert
(Ekind
(Id
) = E_Variable
);
1990 end Hiding_Loop_Variable
;
1992 function Hidden_In_Formal_Instance
(Id
: E
) return L
is
1994 pragma Assert
(Ekind
(Id
) = E_Package
);
1995 return Elist30
(Id
);
1996 end Hidden_In_Formal_Instance
;
1998 function Homonym
(Id
: E
) return E
is
2003 function Ignore_SPARK_Mode_Pragmas
(Id
: E
) return B
is
2006 (Ekind_In
(Id
, E_Protected_Body
, -- concurrent types
2011 Ekind_In
(Id
, E_Entry
, -- overloadable
2015 E_Generic_Procedure
,
2020 Ekind_In
(Id
, E_Generic_Package
, -- packages
2023 return Flag301
(Id
);
2024 end Ignore_SPARK_Mode_Pragmas
;
2026 function Import_Pragma
(Id
: E
) return E
is
2028 pragma Assert
(Is_Subprogram
(Id
));
2032 function Incomplete_Actuals
(Id
: E
) return L
is
2034 pragma Assert
(Ekind
(Id
) = E_Package
);
2035 return Elist24
(Id
);
2036 end Incomplete_Actuals
;
2038 function Interface_Alias
(Id
: E
) return E
is
2040 pragma Assert
(Is_Subprogram
(Id
));
2042 end Interface_Alias
;
2044 function Interfaces
(Id
: E
) return L
is
2046 pragma Assert
(Is_Record_Type
(Id
));
2047 return Elist25
(Id
);
2050 function In_Package_Body
(Id
: E
) return B
is
2053 end In_Package_Body
;
2055 function In_Private_Part
(Id
: E
) return B
is
2058 end In_Private_Part
;
2060 function In_Use
(Id
: E
) return B
is
2062 pragma Assert
(Nkind
(Id
) in N_Entity
);
2066 function Initialization_Statements
(Id
: E
) return N
is
2068 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
2070 end Initialization_Statements
;
2072 function Inner_Instances
(Id
: E
) return L
is
2074 return Elist23
(Id
);
2075 end Inner_Instances
;
2077 function Interface_Name
(Id
: E
) return N
is
2082 function Is_Abstract_Subprogram
(Id
: E
) return B
is
2084 pragma Assert
(Is_Overloadable
(Id
));
2086 end Is_Abstract_Subprogram
;
2088 function Is_Abstract_Type
(Id
: E
) return B
is
2090 pragma Assert
(Is_Type
(Id
));
2091 return Flag146
(Id
);
2092 end Is_Abstract_Type
;
2094 function Is_Access_Constant
(Id
: E
) return B
is
2096 pragma Assert
(Is_Access_Type
(Id
));
2098 end Is_Access_Constant
;
2100 function Is_Activation_Record
(Id
: E
) return B
is
2102 pragma Assert
(Ekind
(Id
) = E_In_Parameter
);
2103 return Flag305
(Id
);
2104 end Is_Activation_Record
;
2106 function Is_Actual_Subtype
(Id
: E
) return B
is
2108 pragma Assert
(Is_Type
(Id
));
2109 return Flag293
(Id
);
2110 end Is_Actual_Subtype
;
2112 function Is_Ada_2005_Only
(Id
: E
) return B
is
2114 return Flag185
(Id
);
2115 end Is_Ada_2005_Only
;
2117 function Is_Ada_2012_Only
(Id
: E
) return B
is
2119 return Flag199
(Id
);
2120 end Is_Ada_2012_Only
;
2122 function Is_Aliased
(Id
: E
) return B
is
2124 pragma Assert
(Nkind
(Id
) in N_Entity
);
2128 function Is_Asynchronous
(Id
: E
) return B
is
2130 pragma Assert
(Ekind
(Id
) = E_Procedure
or else Is_Type
(Id
));
2132 end Is_Asynchronous
;
2134 function Is_Atomic
(Id
: E
) return B
is
2139 function Is_Bit_Packed_Array
(Id
: E
) return B
is
2141 return Flag122
(Implementation_Base_Type
(Id
));
2142 end Is_Bit_Packed_Array
;
2144 function Is_Called
(Id
: E
) return B
is
2146 pragma Assert
(Ekind_In
(Id
, E_Procedure
, E_Function
));
2147 return Flag102
(Id
);
2150 function Is_Character_Type
(Id
: E
) return B
is
2153 end Is_Character_Type
;
2155 function Is_Checked_Ghost_Entity
(Id
: E
) return B
is
2157 -- Allow this attribute to appear on unanalyzed entities
2159 pragma Assert
(Nkind
(Id
) in N_Entity
2160 or else Ekind
(Id
) = E_Void
);
2161 return Flag277
(Id
);
2162 end Is_Checked_Ghost_Entity
;
2164 function Is_Child_Unit
(Id
: E
) return B
is
2169 function Is_Class_Wide_Clone
(Id
: E
) return B
is
2171 return Flag290
(Id
);
2172 end Is_Class_Wide_Clone
;
2174 function Is_Class_Wide_Equivalent_Type
(Id
: E
) return B
is
2177 end Is_Class_Wide_Equivalent_Type
;
2179 function Is_Compilation_Unit
(Id
: E
) return B
is
2181 return Flag149
(Id
);
2182 end Is_Compilation_Unit
;
2184 function Is_Completely_Hidden
(Id
: E
) return B
is
2186 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
2187 return Flag103
(Id
);
2188 end Is_Completely_Hidden
;
2190 function Is_Constr_Subt_For_U_Nominal
(Id
: E
) return B
is
2193 end Is_Constr_Subt_For_U_Nominal
;
2195 function Is_Constr_Subt_For_UN_Aliased
(Id
: E
) return B
is
2197 return Flag141
(Id
);
2198 end Is_Constr_Subt_For_UN_Aliased
;
2200 function Is_Constrained
(Id
: E
) return B
is
2202 pragma Assert
(Nkind
(Id
) in N_Entity
);
2206 function Is_Constructor
(Id
: E
) return B
is
2211 function Is_Controlled_Active
(Id
: E
) return B
is
2213 return Flag42
(Base_Type
(Id
));
2214 end Is_Controlled_Active
;
2216 function Is_Controlling_Formal
(Id
: E
) return B
is
2218 pragma Assert
(Is_Formal
(Id
));
2220 end Is_Controlling_Formal
;
2222 function Is_CPP_Class
(Id
: E
) return B
is
2227 function Is_DIC_Procedure
(Id
: E
) return B
is
2229 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
2230 return Flag132
(Id
);
2231 end Is_DIC_Procedure
;
2233 function Is_Descendant_Of_Address
(Id
: E
) return B
is
2235 return Flag223
(Id
);
2236 end Is_Descendant_Of_Address
;
2238 function Is_Discrim_SO_Function
(Id
: E
) return B
is
2240 return Flag176
(Id
);
2241 end Is_Discrim_SO_Function
;
2243 function Is_Discriminant_Check_Function
(Id
: E
) return B
is
2245 return Flag264
(Id
);
2246 end Is_Discriminant_Check_Function
;
2248 function Is_Dispatch_Table_Entity
(Id
: E
) return B
is
2250 return Flag234
(Id
);
2251 end Is_Dispatch_Table_Entity
;
2253 function Is_Dispatching_Operation
(Id
: E
) return B
is
2255 pragma Assert
(Nkind
(Id
) in N_Entity
);
2257 end Is_Dispatching_Operation
;
2259 function Is_Elaboration_Checks_OK_Id
(Id
: E
) return B
is
2261 pragma Assert
(Is_Elaboration_Target
(Id
));
2262 return Flag148
(Id
);
2263 end Is_Elaboration_Checks_OK_Id
;
2265 function Is_Elaboration_Warnings_OK_Id
(Id
: E
) return B
is
2267 pragma Assert
(Is_Elaboration_Target
(Id
) or else Ekind
(Id
) = E_Void
);
2268 return Flag304
(Id
);
2269 end Is_Elaboration_Warnings_OK_Id
;
2271 function Is_Eliminated
(Id
: E
) return B
is
2273 return Flag124
(Id
);
2276 function Is_Entry_Formal
(Id
: E
) return B
is
2279 end Is_Entry_Formal
;
2281 function Is_Entry_Wrapper
(Id
: E
) return B
is
2283 return Flag297
(Id
);
2284 end Is_Entry_Wrapper
;
2286 function Is_Exception_Handler
(Id
: E
) return B
is
2288 pragma Assert
(Ekind
(Id
) = E_Block
);
2289 return Flag286
(Id
);
2290 end Is_Exception_Handler
;
2292 function Is_Exported
(Id
: E
) return B
is
2297 function Is_Finalized_Transient
(Id
: E
) return B
is
2299 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Loop_Parameter
, E_Variable
));
2300 return Flag252
(Id
);
2301 end Is_Finalized_Transient
;
2303 function Is_First_Subtype
(Id
: E
) return B
is
2306 end Is_First_Subtype
;
2308 function Is_For_Access_Subtype
(Id
: E
) return B
is
2310 pragma Assert
(Ekind_In
(Id
, E_Record_Subtype
, E_Private_Subtype
));
2311 return Flag118
(Id
);
2312 end Is_For_Access_Subtype
;
2314 function Is_Formal_Subprogram
(Id
: E
) return B
is
2316 return Flag111
(Id
);
2317 end Is_Formal_Subprogram
;
2319 function Is_Frozen
(Id
: E
) return B
is
2324 function Is_Generic_Actual_Subprogram
(Id
: E
) return B
is
2326 pragma Assert
(Ekind
(Id
) = E_Function
or else Ekind
(Id
) = E_Procedure
);
2327 return Flag274
(Id
);
2328 end Is_Generic_Actual_Subprogram
;
2330 function Is_Generic_Actual_Type
(Id
: E
) return B
is
2332 pragma Assert
(Is_Type
(Id
));
2334 end Is_Generic_Actual_Type
;
2336 function Is_Generic_Instance
(Id
: E
) return B
is
2338 return Flag130
(Id
);
2339 end Is_Generic_Instance
;
2341 function Is_Generic_Type
(Id
: E
) return B
is
2343 pragma Assert
(Nkind
(Id
) in N_Entity
);
2345 end Is_Generic_Type
;
2347 function Is_Hidden
(Id
: E
) return B
is
2352 function Is_Hidden_Non_Overridden_Subpgm
(Id
: E
) return B
is
2355 end Is_Hidden_Non_Overridden_Subpgm
;
2357 function Is_Hidden_Open_Scope
(Id
: E
) return B
is
2359 return Flag171
(Id
);
2360 end Is_Hidden_Open_Scope
;
2362 function Is_Ignored_Ghost_Entity
(Id
: E
) return B
is
2364 -- Allow this attribute to appear on unanalyzed entities
2366 pragma Assert
(Nkind
(Id
) in N_Entity
2367 or else Ekind
(Id
) = E_Void
);
2368 return Flag278
(Id
);
2369 end Is_Ignored_Ghost_Entity
;
2371 function Is_Ignored_Transient
(Id
: E
) return B
is
2373 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Loop_Parameter
, E_Variable
));
2374 return Flag295
(Id
);
2375 end Is_Ignored_Transient
;
2377 function Is_Immediately_Visible
(Id
: E
) return B
is
2379 pragma Assert
(Nkind
(Id
) in N_Entity
);
2381 end Is_Immediately_Visible
;
2383 function Is_Implementation_Defined
(Id
: E
) return B
is
2385 return Flag254
(Id
);
2386 end Is_Implementation_Defined
;
2388 function Is_Imported
(Id
: E
) return B
is
2393 function Is_Independent
(Id
: E
) return B
is
2395 return Flag268
(Id
);
2398 function Is_Initial_Condition_Procedure
(Id
: E
) return B
is
2400 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
2401 return Flag302
(Id
);
2402 end Is_Initial_Condition_Procedure
;
2404 function Is_Inlined
(Id
: E
) return B
is
2409 function Is_Inlined_Always
(Id
: E
) return B
is
2411 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
2413 end Is_Inlined_Always
;
2415 function Is_Interface
(Id
: E
) return B
is
2417 return Flag186
(Id
);
2420 function Is_Instantiated
(Id
: E
) return B
is
2422 return Flag126
(Id
);
2423 end Is_Instantiated
;
2425 function Is_Internal
(Id
: E
) return B
is
2427 pragma Assert
(Nkind
(Id
) in N_Entity
);
2431 function Is_Interrupt_Handler
(Id
: E
) return B
is
2433 pragma Assert
(Nkind
(Id
) in N_Entity
);
2435 end Is_Interrupt_Handler
;
2437 function Is_Intrinsic_Subprogram
(Id
: E
) return B
is
2440 end Is_Intrinsic_Subprogram
;
2442 function Is_Invariant_Procedure
(Id
: E
) return B
is
2444 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
2445 return Flag257
(Id
);
2446 end Is_Invariant_Procedure
;
2448 function Is_Itype
(Id
: E
) return B
is
2453 function Is_Known_Non_Null
(Id
: E
) return B
is
2456 end Is_Known_Non_Null
;
2458 function Is_Known_Null
(Id
: E
) return B
is
2460 return Flag204
(Id
);
2463 function Is_Known_Valid
(Id
: E
) return B
is
2465 return Flag170
(Id
);
2468 function Is_Limited_Composite
(Id
: E
) return B
is
2470 return Flag106
(Id
);
2471 end Is_Limited_Composite
;
2473 function Is_Limited_Interface
(Id
: E
) return B
is
2475 return Flag197
(Id
);
2476 end Is_Limited_Interface
;
2478 function Is_Limited_Record
(Id
: E
) return B
is
2481 end Is_Limited_Record
;
2483 function Is_Local_Anonymous_Access
(Id
: E
) return B
is
2485 pragma Assert
(Is_Access_Type
(Id
));
2486 return Flag194
(Id
);
2487 end Is_Local_Anonymous_Access
;
2489 function Is_Loop_Parameter
(Id
: E
) return B
is
2491 return Flag307
(Id
);
2492 end Is_Loop_Parameter
;
2494 function Is_Machine_Code_Subprogram
(Id
: E
) return B
is
2496 pragma Assert
(Is_Subprogram
(Id
));
2497 return Flag137
(Id
);
2498 end Is_Machine_Code_Subprogram
;
2500 function Is_Non_Static_Subtype
(Id
: E
) return B
is
2502 pragma Assert
(Is_Type
(Id
));
2503 return Flag109
(Id
);
2504 end Is_Non_Static_Subtype
;
2506 function Is_Null_Init_Proc
(Id
: E
) return B
is
2508 pragma Assert
(Ekind
(Id
) = E_Procedure
);
2509 return Flag178
(Id
);
2510 end Is_Null_Init_Proc
;
2512 function Is_Obsolescent
(Id
: E
) return B
is
2514 return Flag153
(Id
);
2517 function Is_Only_Out_Parameter
(Id
: E
) return B
is
2519 pragma Assert
(Is_Formal
(Id
));
2520 return Flag226
(Id
);
2521 end Is_Only_Out_Parameter
;
2523 function Is_Package_Body_Entity
(Id
: E
) return B
is
2525 return Flag160
(Id
);
2526 end Is_Package_Body_Entity
;
2528 function Is_Packed
(Id
: E
) return B
is
2530 return Flag51
(Implementation_Base_Type
(Id
));
2533 function Is_Packed_Array_Impl_Type
(Id
: E
) return B
is
2535 return Flag138
(Id
);
2536 end Is_Packed_Array_Impl_Type
;
2538 function Is_Param_Block_Component_Type
(Id
: E
) return B
is
2540 pragma Assert
(Is_Access_Type
(Id
));
2541 return Flag215
(Base_Type
(Id
));
2542 end Is_Param_Block_Component_Type
;
2544 function Is_Partial_Invariant_Procedure
(Id
: E
) return B
is
2546 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
2547 return Flag292
(Id
);
2548 end Is_Partial_Invariant_Procedure
;
2550 function Is_Potentially_Use_Visible
(Id
: E
) return B
is
2552 pragma Assert
(Nkind
(Id
) in N_Entity
);
2554 end Is_Potentially_Use_Visible
;
2556 function Is_Predicate_Function
(Id
: E
) return B
is
2558 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
2559 return Flag255
(Id
);
2560 end Is_Predicate_Function
;
2562 function Is_Predicate_Function_M
(Id
: E
) return B
is
2564 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
2565 return Flag256
(Id
);
2566 end Is_Predicate_Function_M
;
2568 function Is_Preelaborated
(Id
: E
) return B
is
2571 end Is_Preelaborated
;
2573 function Is_Primitive
(Id
: E
) return B
is
2576 (Is_Overloadable
(Id
)
2577 or else Ekind_In
(Id
, E_Generic_Function
, E_Generic_Procedure
));
2578 return Flag218
(Id
);
2581 function Is_Primitive_Wrapper
(Id
: E
) return B
is
2583 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
2584 return Flag195
(Id
);
2585 end Is_Primitive_Wrapper
;
2587 function Is_Private_Composite
(Id
: E
) return B
is
2589 pragma Assert
(Is_Type
(Id
));
2590 return Flag107
(Id
);
2591 end Is_Private_Composite
;
2593 function Is_Private_Descendant
(Id
: E
) return B
is
2596 end Is_Private_Descendant
;
2598 function Is_Private_Primitive
(Id
: E
) return B
is
2600 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
2601 return Flag245
(Id
);
2602 end Is_Private_Primitive
;
2604 function Is_Public
(Id
: E
) return B
is
2606 pragma Assert
(Nkind
(Id
) in N_Entity
);
2610 function Is_Pure
(Id
: E
) return B
is
2615 function Is_Pure_Unit_Access_Type
(Id
: E
) return B
is
2617 pragma Assert
(Is_Access_Type
(Id
));
2618 return Flag189
(Id
);
2619 end Is_Pure_Unit_Access_Type
;
2621 function Is_RACW_Stub_Type
(Id
: E
) return B
is
2623 pragma Assert
(Is_Type
(Id
));
2624 return Flag244
(Id
);
2625 end Is_RACW_Stub_Type
;
2627 function Is_Raised
(Id
: E
) return B
is
2629 pragma Assert
(Ekind
(Id
) = E_Exception
);
2630 return Flag224
(Id
);
2633 function Is_Remote_Call_Interface
(Id
: E
) return B
is
2636 end Is_Remote_Call_Interface
;
2638 function Is_Remote_Types
(Id
: E
) return B
is
2641 end Is_Remote_Types
;
2643 function Is_Renaming_Of_Object
(Id
: E
) return B
is
2645 return Flag112
(Id
);
2646 end Is_Renaming_Of_Object
;
2648 function Is_Return_Object
(Id
: E
) return B
is
2650 return Flag209
(Id
);
2651 end Is_Return_Object
;
2653 function Is_Safe_To_Reevaluate
(Id
: E
) return B
is
2655 return Flag249
(Id
);
2656 end Is_Safe_To_Reevaluate
;
2658 function Is_Shared_Passive
(Id
: E
) return B
is
2661 end Is_Shared_Passive
;
2663 function Is_Static_Type
(Id
: E
) return B
is
2665 return Flag281
(Id
);
2668 function Is_Statically_Allocated
(Id
: E
) return B
is
2671 end Is_Statically_Allocated
;
2673 function Is_Tag
(Id
: E
) return B
is
2675 pragma Assert
(Nkind
(Id
) in N_Entity
);
2679 function Is_Tagged_Type
(Id
: E
) return B
is
2684 function Is_Thunk
(Id
: E
) return B
is
2686 return Flag225
(Id
);
2689 function Is_Trivial_Subprogram
(Id
: E
) return B
is
2691 return Flag235
(Id
);
2692 end Is_Trivial_Subprogram
;
2694 function Is_True_Constant
(Id
: E
) return B
is
2696 return Flag163
(Id
);
2697 end Is_True_Constant
;
2699 function Is_Unchecked_Union
(Id
: E
) return B
is
2701 return Flag117
(Implementation_Base_Type
(Id
));
2702 end Is_Unchecked_Union
;
2704 function Is_Underlying_Full_View
(Id
: E
) return B
is
2706 return Flag298
(Id
);
2707 end Is_Underlying_Full_View
;
2709 function Is_Underlying_Record_View
(Id
: E
) return B
is
2711 return Flag246
(Id
);
2712 end Is_Underlying_Record_View
;
2714 function Is_Unimplemented
(Id
: E
) return B
is
2716 return Flag284
(Id
);
2717 end Is_Unimplemented
;
2719 function Is_Unsigned_Type
(Id
: E
) return B
is
2721 pragma Assert
(Is_Type
(Id
));
2722 return Flag144
(Id
);
2723 end Is_Unsigned_Type
;
2725 function Is_Uplevel_Referenced_Entity
(Id
: E
) return B
is
2727 return Flag283
(Id
);
2728 end Is_Uplevel_Referenced_Entity
;
2730 function Is_Valued_Procedure
(Id
: E
) return B
is
2732 pragma Assert
(Ekind
(Id
) = E_Procedure
);
2733 return Flag127
(Id
);
2734 end Is_Valued_Procedure
;
2736 function Is_Visible_Formal
(Id
: E
) return B
is
2738 return Flag206
(Id
);
2739 end Is_Visible_Formal
;
2741 function Is_Visible_Lib_Unit
(Id
: E
) return B
is
2743 return Flag116
(Id
);
2744 end Is_Visible_Lib_Unit
;
2746 function Is_Volatile
(Id
: E
) return B
is
2748 pragma Assert
(Nkind
(Id
) in N_Entity
);
2750 if Is_Type
(Id
) then
2751 return Flag16
(Base_Type
(Id
));
2757 function Is_Volatile_Full_Access
(Id
: E
) return B
is
2759 return Flag285
(Id
);
2760 end Is_Volatile_Full_Access
;
2762 function Itype_Printed
(Id
: E
) return B
is
2764 pragma Assert
(Is_Itype
(Id
));
2765 return Flag202
(Id
);
2768 function Kill_Elaboration_Checks
(Id
: E
) return B
is
2771 end Kill_Elaboration_Checks
;
2773 function Kill_Range_Checks
(Id
: E
) return B
is
2776 end Kill_Range_Checks
;
2778 function Known_To_Have_Preelab_Init
(Id
: E
) return B
is
2780 pragma Assert
(Is_Type
(Id
));
2781 return Flag207
(Id
);
2782 end Known_To_Have_Preelab_Init
;
2784 function Last_Aggregate_Assignment
(Id
: E
) return N
is
2786 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
2788 end Last_Aggregate_Assignment
;
2790 function Last_Assignment
(Id
: E
) return N
is
2792 pragma Assert
(Is_Assignable
(Id
));
2794 end Last_Assignment
;
2796 function Last_Entity
(Id
: E
) return E
is
2801 function Limited_View
(Id
: E
) return E
is
2803 pragma Assert
(Ekind
(Id
) = E_Package
);
2807 function Linker_Section_Pragma
(Id
: E
) return N
is
2810 (Is_Object
(Id
) or else Is_Subprogram
(Id
) or else Is_Type
(Id
));
2812 end Linker_Section_Pragma
;
2814 function Lit_Indexes
(Id
: E
) return E
is
2816 pragma Assert
(Is_Enumeration_Type
(Id
));
2820 function Lit_Strings
(Id
: E
) return E
is
2822 pragma Assert
(Is_Enumeration_Type
(Id
));
2826 function Low_Bound_Tested
(Id
: E
) return B
is
2828 return Flag205
(Id
);
2829 end Low_Bound_Tested
;
2831 function Machine_Radix_10
(Id
: E
) return B
is
2833 pragma Assert
(Is_Decimal_Fixed_Point_Type
(Id
));
2835 end Machine_Radix_10
;
2837 function Master_Id
(Id
: E
) return E
is
2839 pragma Assert
(Is_Access_Type
(Id
));
2843 function Materialize_Entity
(Id
: E
) return B
is
2845 return Flag168
(Id
);
2846 end Materialize_Entity
;
2848 function May_Inherit_Delayed_Rep_Aspects
(Id
: E
) return B
is
2850 return Flag262
(Id
);
2851 end May_Inherit_Delayed_Rep_Aspects
;
2853 function Mechanism
(Id
: E
) return M
is
2855 pragma Assert
(Ekind
(Id
) = E_Function
or else Is_Formal
(Id
));
2856 return UI_To_Int
(Uint8
(Id
));
2859 function Modulus
(Id
: E
) return Uint
is
2861 pragma Assert
(Is_Modular_Integer_Type
(Id
));
2862 return Uint17
(Base_Type
(Id
));
2865 function Must_Be_On_Byte_Boundary
(Id
: E
) return B
is
2867 pragma Assert
(Is_Type
(Id
));
2868 return Flag183
(Id
);
2869 end Must_Be_On_Byte_Boundary
;
2871 function Must_Have_Preelab_Init
(Id
: E
) return B
is
2873 pragma Assert
(Is_Type
(Id
));
2874 return Flag208
(Id
);
2875 end Must_Have_Preelab_Init
;
2877 function Needs_Activation_Record
(Id
: E
) return B
is
2879 return Flag306
(Id
);
2880 end Needs_Activation_Record
;
2882 function Needs_Debug_Info
(Id
: E
) return B
is
2884 return Flag147
(Id
);
2885 end Needs_Debug_Info
;
2887 function Needs_No_Actuals
(Id
: E
) return B
is
2890 (Is_Overloadable
(Id
)
2891 or else Ekind_In
(Id
, E_Subprogram_Type
, E_Entry_Family
));
2893 end Needs_No_Actuals
;
2895 function Never_Set_In_Source
(Id
: E
) return B
is
2897 return Flag115
(Id
);
2898 end Never_Set_In_Source
;
2900 function Next_Inlined_Subprogram
(Id
: E
) return E
is
2903 end Next_Inlined_Subprogram
;
2905 function No_Dynamic_Predicate_On_Actual
(Id
: E
) return Boolean is
2907 pragma Assert
(Is_Discrete_Type
(Id
));
2908 return Flag276
(Id
);
2909 end No_Dynamic_Predicate_On_Actual
;
2911 function No_Pool_Assigned
(Id
: E
) return B
is
2913 pragma Assert
(Is_Access_Type
(Id
));
2914 return Flag131
(Root_Type
(Id
));
2915 end No_Pool_Assigned
;
2917 function No_Predicate_On_Actual
(Id
: E
) return Boolean is
2919 pragma Assert
(Is_Discrete_Type
(Id
));
2920 return Flag275
(Id
);
2921 end No_Predicate_On_Actual
;
2923 function No_Reordering
(Id
: E
) return B
is
2925 pragma Assert
(Is_Record_Type
(Id
));
2926 return Flag239
(Implementation_Base_Type
(Id
));
2929 function No_Return
(Id
: E
) return B
is
2931 return Flag113
(Id
);
2934 function No_Strict_Aliasing
(Id
: E
) return B
is
2936 pragma Assert
(Is_Access_Type
(Id
));
2937 return Flag136
(Base_Type
(Id
));
2938 end No_Strict_Aliasing
;
2940 function No_Tagged_Streams_Pragma
(Id
: E
) return N
is
2942 pragma Assert
(Is_Tagged_Type
(Id
));
2944 end No_Tagged_Streams_Pragma
;
2946 function Non_Binary_Modulus
(Id
: E
) return B
is
2948 pragma Assert
(Is_Type
(Id
));
2949 return Flag58
(Base_Type
(Id
));
2950 end Non_Binary_Modulus
;
2952 function Non_Limited_View
(Id
: E
) return E
is
2955 (Ekind
(Id
) in Incomplete_Kind
2957 Ekind
(Id
) in Class_Wide_Kind
2959 Ekind
(Id
) = E_Abstract_State
);
2961 end Non_Limited_View
;
2963 function Nonzero_Is_True
(Id
: E
) return B
is
2965 pragma Assert
(Root_Type
(Id
) = Standard_Boolean
);
2966 return Flag162
(Base_Type
(Id
));
2967 end Nonzero_Is_True
;
2969 function Normalized_First_Bit
(Id
: E
) return U
is
2971 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
2973 end Normalized_First_Bit
;
2975 function Normalized_Position
(Id
: E
) return U
is
2977 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
2979 end Normalized_Position
;
2981 function Normalized_Position_Max
(Id
: E
) return U
is
2983 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
2985 end Normalized_Position_Max
;
2987 function OK_To_Rename
(Id
: E
) return B
is
2989 pragma Assert
(Ekind
(Id
) = E_Variable
);
2990 return Flag247
(Id
);
2993 function Optimize_Alignment_Space
(Id
: E
) return B
is
2996 (Is_Type
(Id
) or else Ekind_In
(Id
, E_Constant
, E_Variable
));
2997 return Flag241
(Id
);
2998 end Optimize_Alignment_Space
;
3000 function Optimize_Alignment_Time
(Id
: E
) return B
is
3003 (Is_Type
(Id
) or else Ekind_In
(Id
, E_Constant
, E_Variable
));
3004 return Flag242
(Id
);
3005 end Optimize_Alignment_Time
;
3007 function Original_Access_Type
(Id
: E
) return E
is
3009 pragma Assert
(Ekind
(Id
) = E_Access_Subprogram_Type
);
3011 end Original_Access_Type
;
3013 function Original_Array_Type
(Id
: E
) return E
is
3015 pragma Assert
(Is_Array_Type
(Id
) or else Is_Modular_Integer_Type
(Id
));
3017 end Original_Array_Type
;
3019 function Original_Protected_Subprogram
(Id
: E
) return N
is
3022 end Original_Protected_Subprogram
;
3024 function Original_Record_Component
(Id
: E
) return E
is
3026 pragma Assert
(Ekind_In
(Id
, E_Void
, E_Component
, E_Discriminant
));
3028 end Original_Record_Component
;
3030 function Overlays_Constant
(Id
: E
) return B
is
3032 return Flag243
(Id
);
3033 end Overlays_Constant
;
3035 function Overridden_Operation
(Id
: E
) return E
is
3037 pragma Assert
(Is_Subprogram
(Id
) or else Is_Generic_Subprogram
(Id
));
3039 end Overridden_Operation
;
3041 function Package_Instantiation
(Id
: E
) return N
is
3043 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Generic_Package
));
3045 end Package_Instantiation
;
3047 function Packed_Array_Impl_Type
(Id
: E
) return E
is
3049 pragma Assert
(Is_Array_Type
(Id
));
3051 end Packed_Array_Impl_Type
;
3053 function Parent_Subtype
(Id
: E
) return E
is
3055 pragma Assert
(Is_Record_Type
(Id
));
3056 return Node19
(Base_Type
(Id
));
3059 function Part_Of_Constituents
(Id
: E
) return L
is
3061 pragma Assert
(Ekind_In
(Id
, E_Abstract_State
, E_Variable
));
3062 return Elist10
(Id
);
3063 end Part_Of_Constituents
;
3065 function Part_Of_References
(Id
: E
) return L
is
3067 pragma Assert
(Ekind
(Id
) = E_Variable
);
3068 return Elist11
(Id
);
3069 end Part_Of_References
;
3071 function Partial_View_Has_Unknown_Discr
(Id
: E
) return B
is
3073 pragma Assert
(Is_Type
(Id
));
3074 return Flag280
(Id
);
3075 end Partial_View_Has_Unknown_Discr
;
3077 function Pending_Access_Types
(Id
: E
) return L
is
3079 pragma Assert
(Is_Type
(Id
));
3080 return Elist15
(Id
);
3081 end Pending_Access_Types
;
3083 function Postconditions_Proc
(Id
: E
) return E
is
3085 pragma Assert
(Ekind_In
(Id
, E_Entry
,
3090 end Postconditions_Proc
;
3092 function Predicated_Parent
(Id
: E
) return E
is
3094 pragma Assert
(Ekind_In
(Id
, E_Array_Subtype
,
3096 E_Record_Subtype_With_Private
));
3098 end Predicated_Parent
;
3100 function Predicates_Ignored
(Id
: E
) return B
is
3102 pragma Assert
(Is_Type
(Id
));
3103 return Flag288
(Id
);
3104 end Predicates_Ignored
;
3106 function Prev_Entity
(Id
: E
) return E
is
3111 function Prival
(Id
: E
) return E
is
3113 pragma Assert
(Is_Protected_Component
(Id
));
3117 function Prival_Link
(Id
: E
) return E
is
3119 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
3123 function Private_Dependents
(Id
: E
) return L
is
3125 pragma Assert
(Is_Incomplete_Or_Private_Type
(Id
));
3126 return Elist18
(Id
);
3127 end Private_Dependents
;
3129 function Private_View
(Id
: E
) return N
is
3131 pragma Assert
(Is_Private_Type
(Id
));
3135 function Protected_Body_Subprogram
(Id
: E
) return E
is
3137 pragma Assert
(Is_Subprogram
(Id
) or else Is_Entry
(Id
));
3139 end Protected_Body_Subprogram
;
3141 function Protected_Formal
(Id
: E
) return E
is
3143 pragma Assert
(Is_Formal
(Id
));
3145 end Protected_Formal
;
3147 function Protected_Subprogram
(Id
: E
) return N
is
3149 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
3151 end Protected_Subprogram
;
3153 function Protection_Object
(Id
: E
) return E
is
3155 pragma Assert
(Ekind_In
(Id
, E_Entry
,
3160 end Protection_Object
;
3162 function Reachable
(Id
: E
) return B
is
3167 function Receiving_Entry
(Id
: E
) return E
is
3169 pragma Assert
(Ekind
(Id
) = E_Procedure
);
3171 end Receiving_Entry
;
3173 function Referenced
(Id
: E
) return B
is
3175 return Flag156
(Id
);
3178 function Referenced_As_LHS
(Id
: E
) return B
is
3181 end Referenced_As_LHS
;
3183 function Referenced_As_Out_Parameter
(Id
: E
) return B
is
3185 return Flag227
(Id
);
3186 end Referenced_As_Out_Parameter
;
3188 function Refinement_Constituents
(Id
: E
) return L
is
3190 pragma Assert
(Ekind
(Id
) = E_Abstract_State
);
3192 end Refinement_Constituents
;
3194 function Register_Exception_Call
(Id
: E
) return N
is
3196 pragma Assert
(Ekind
(Id
) = E_Exception
);
3198 end Register_Exception_Call
;
3200 function Related_Array_Object
(Id
: E
) return E
is
3202 pragma Assert
(Is_Array_Type
(Id
));
3204 end Related_Array_Object
;
3206 function Related_Expression
(Id
: E
) return N
is
3208 pragma Assert
(Ekind
(Id
) in Type_Kind
3209 or else Ekind_In
(Id
, E_Constant
, E_Variable
));
3211 end Related_Expression
;
3213 function Related_Instance
(Id
: E
) return E
is
3215 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Package_Body
));
3217 end Related_Instance
;
3219 function Related_Type
(Id
: E
) return E
is
3221 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Constant
, E_Variable
));
3225 function Relative_Deadline_Variable
(Id
: E
) return E
is
3227 pragma Assert
(Is_Task_Type
(Id
));
3228 return Node28
(Implementation_Base_Type
(Id
));
3229 end Relative_Deadline_Variable
;
3231 function Renamed_Entity
(Id
: E
) return N
is
3236 function Renamed_In_Spec
(Id
: E
) return B
is
3238 pragma Assert
(Ekind
(Id
) = E_Package
);
3239 return Flag231
(Id
);
3240 end Renamed_In_Spec
;
3242 function Renamed_Object
(Id
: E
) return N
is
3247 function Renaming_Map
(Id
: E
) return U
is
3252 function Requires_Overriding
(Id
: E
) return B
is
3254 pragma Assert
(Is_Overloadable
(Id
));
3255 return Flag213
(Id
);
3256 end Requires_Overriding
;
3258 function Return_Present
(Id
: E
) return B
is
3263 function Return_Applies_To
(Id
: E
) return N
is
3266 end Return_Applies_To
;
3268 function Returns_By_Ref
(Id
: E
) return B
is
3273 function Reverse_Bit_Order
(Id
: E
) return B
is
3275 pragma Assert
(Is_Record_Type
(Id
));
3276 return Flag164
(Base_Type
(Id
));
3277 end Reverse_Bit_Order
;
3279 function Reverse_Storage_Order
(Id
: E
) return B
is
3281 pragma Assert
(Is_Record_Type
(Id
) or else Is_Array_Type
(Id
));
3282 return Flag93
(Base_Type
(Id
));
3283 end Reverse_Storage_Order
;
3285 function Rewritten_For_C
(Id
: E
) return B
is
3287 pragma Assert
(Ekind
(Id
) = E_Function
);
3288 return Flag287
(Id
);
3289 end Rewritten_For_C
;
3291 function RM_Size
(Id
: E
) return U
is
3293 pragma Assert
(Is_Type
(Id
));
3297 function Scalar_Range
(Id
: E
) return N
is
3302 function Scale_Value
(Id
: E
) return U
is
3307 function Scope_Depth_Value
(Id
: E
) return U
is
3310 end Scope_Depth_Value
;
3312 function Sec_Stack_Needed_For_Return
(Id
: E
) return B
is
3314 return Flag167
(Id
);
3315 end Sec_Stack_Needed_For_Return
;
3317 function Shadow_Entities
(Id
: E
) return S
is
3319 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Generic_Package
));
3321 end Shadow_Entities
;
3323 function Shared_Var_Procs_Instance
(Id
: E
) return E
is
3325 pragma Assert
(Ekind
(Id
) = E_Variable
);
3327 end Shared_Var_Procs_Instance
;
3329 function Size_Check_Code
(Id
: E
) return N
is
3331 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
3333 end Size_Check_Code
;
3335 function Size_Depends_On_Discriminant
(Id
: E
) return B
is
3337 return Flag177
(Id
);
3338 end Size_Depends_On_Discriminant
;
3340 function Size_Known_At_Compile_Time
(Id
: E
) return B
is
3343 end Size_Known_At_Compile_Time
;
3345 function Small_Value
(Id
: E
) return R
is
3347 pragma Assert
(Is_Fixed_Point_Type
(Id
));
3348 return Ureal21
(Id
);
3351 function SPARK_Aux_Pragma
(Id
: E
) return N
is
3354 (Ekind_In
(Id
, E_Protected_Type
, -- concurrent types
3357 Ekind_In
(Id
, E_Generic_Package
, -- packages
3361 end SPARK_Aux_Pragma
;
3363 function SPARK_Aux_Pragma_Inherited
(Id
: E
) return B
is
3366 (Ekind_In
(Id
, E_Protected_Type
, -- concurrent types
3369 Ekind_In
(Id
, E_Generic_Package
, -- packages
3372 return Flag266
(Id
);
3373 end SPARK_Aux_Pragma_Inherited
;
3375 function SPARK_Pragma
(Id
: E
) return N
is
3378 (Ekind_In
(Id
, E_Constant
, -- objects
3381 Ekind_In
(Id
, E_Abstract_State
, -- overloadable
3386 E_Generic_Procedure
,
3391 Ekind_In
(Id
, E_Generic_Package
, -- packages
3395 Ekind
(Id
) = E_Void
-- special purpose
3397 Ekind_In
(Id
, E_Protected_Body
, -- types
3404 function SPARK_Pragma_Inherited
(Id
: E
) return B
is
3407 (Ekind_In
(Id
, E_Constant
, -- objects
3410 Ekind_In
(Id
, E_Abstract_State
, -- overloadable
3415 E_Generic_Procedure
,
3420 Ekind_In
(Id
, E_Generic_Package
, -- packages
3424 Ekind
(Id
) = E_Void
-- special purpose
3426 Ekind_In
(Id
, E_Protected_Body
, -- types
3430 return Flag265
(Id
);
3431 end SPARK_Pragma_Inherited
;
3433 function Spec_Entity
(Id
: E
) return E
is
3435 pragma Assert
(Ekind
(Id
) = E_Package_Body
or else Is_Formal
(Id
));
3439 function SSO_Set_High_By_Default
(Id
: E
) return B
is
3441 pragma Assert
(Is_Record_Type
(Id
) or else Is_Array_Type
(Id
));
3442 return Flag273
(Base_Type
(Id
));
3443 end SSO_Set_High_By_Default
;
3445 function SSO_Set_Low_By_Default
(Id
: E
) return B
is
3447 pragma Assert
(Is_Record_Type
(Id
) or else Is_Array_Type
(Id
));
3448 return Flag272
(Base_Type
(Id
));
3449 end SSO_Set_Low_By_Default
;
3451 function Static_Discrete_Predicate
(Id
: E
) return S
is
3453 pragma Assert
(Is_Discrete_Type
(Id
));
3455 end Static_Discrete_Predicate
;
3457 function Static_Real_Or_String_Predicate
(Id
: E
) return N
is
3459 pragma Assert
(Is_Real_Type
(Id
) or else Is_String_Type
(Id
));
3461 end Static_Real_Or_String_Predicate
;
3463 function Status_Flag_Or_Transient_Decl
(Id
: E
) return N
is
3465 pragma Assert
(Ekind_In
(Id
, E_Constant
,
3469 end Status_Flag_Or_Transient_Decl
;
3471 function Storage_Size_Variable
(Id
: E
) return E
is
3473 pragma Assert
(Is_Access_Type
(Id
) or else Is_Task_Type
(Id
));
3474 return Node26
(Implementation_Base_Type
(Id
));
3475 end Storage_Size_Variable
;
3477 function Static_Elaboration_Desired
(Id
: E
) return B
is
3479 pragma Assert
(Ekind
(Id
) = E_Package
);
3481 end Static_Elaboration_Desired
;
3483 function Static_Initialization
(Id
: E
) return N
is
3486 (Ekind
(Id
) = E_Procedure
and then not Is_Dispatching_Operation
(Id
));
3488 end Static_Initialization
;
3490 function Stored_Constraint
(Id
: E
) return L
is
3493 (Is_Composite_Type
(Id
) and then not Is_Array_Type
(Id
));
3494 return Elist23
(Id
);
3495 end Stored_Constraint
;
3497 function Stores_Attribute_Old_Prefix
(Id
: E
) return B
is
3499 return Flag270
(Id
);
3500 end Stores_Attribute_Old_Prefix
;
3502 function Strict_Alignment
(Id
: E
) return B
is
3504 return Flag145
(Implementation_Base_Type
(Id
));
3505 end Strict_Alignment
;
3507 function String_Literal_Length
(Id
: E
) return U
is
3510 end String_Literal_Length
;
3512 function String_Literal_Low_Bound
(Id
: E
) return N
is
3515 end String_Literal_Low_Bound
;
3517 function Subprograms_For_Type
(Id
: E
) return L
is
3519 pragma Assert
(Is_Type
(Id
));
3520 return Elist29
(Id
);
3521 end Subprograms_For_Type
;
3523 function Subps_Index
(Id
: E
) return U
is
3525 pragma Assert
(Is_Subprogram
(Id
));
3529 function Suppress_Elaboration_Warnings
(Id
: E
) return B
is
3531 return Flag303
(Id
);
3532 end Suppress_Elaboration_Warnings
;
3534 function Suppress_Initialization
(Id
: E
) return B
is
3536 pragma Assert
(Is_Type
(Id
) or else Ekind
(Id
) = E_Variable
);
3537 return Flag105
(Id
);
3538 end Suppress_Initialization
;
3540 function Suppress_Style_Checks
(Id
: E
) return B
is
3542 return Flag165
(Id
);
3543 end Suppress_Style_Checks
;
3545 function Suppress_Value_Tracking_On_Call
(Id
: E
) return B
is
3547 return Flag217
(Id
);
3548 end Suppress_Value_Tracking_On_Call
;
3550 function Task_Body_Procedure
(Id
: E
) return N
is
3552 pragma Assert
(Ekind
(Id
) in Task_Kind
);
3554 end Task_Body_Procedure
;
3556 function Thunk_Entity
(Id
: E
) return E
is
3558 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
)
3559 and then Is_Thunk
(Id
));
3563 function Treat_As_Volatile
(Id
: E
) return B
is
3566 end Treat_As_Volatile
;
3568 function Underlying_Full_View
(Id
: E
) return E
is
3570 pragma Assert
(Ekind
(Id
) in Private_Kind
);
3572 end Underlying_Full_View
;
3574 function Underlying_Record_View
(Id
: E
) return E
is
3577 end Underlying_Record_View
;
3579 function Universal_Aliasing
(Id
: E
) return B
is
3581 pragma Assert
(Is_Type
(Id
));
3582 return Flag216
(Implementation_Base_Type
(Id
));
3583 end Universal_Aliasing
;
3585 function Unset_Reference
(Id
: E
) return N
is
3588 end Unset_Reference
;
3590 function Used_As_Generic_Actual
(Id
: E
) return B
is
3592 return Flag222
(Id
);
3593 end Used_As_Generic_Actual
;
3595 function Uses_Lock_Free
(Id
: E
) return B
is
3597 pragma Assert
(Is_Protected_Type
(Id
));
3598 return Flag188
(Id
);
3601 function Uses_Sec_Stack
(Id
: E
) return B
is
3606 function Validated_Object
(Id
: E
) return N
is
3608 pragma Assert
(Ekind
(Id
) = E_Variable
);
3610 end Validated_Object
;
3612 function Warnings_Off
(Id
: E
) return B
is
3617 function Warnings_Off_Used
(Id
: E
) return B
is
3619 return Flag236
(Id
);
3620 end Warnings_Off_Used
;
3622 function Warnings_Off_Used_Unmodified
(Id
: E
) return B
is
3624 return Flag237
(Id
);
3625 end Warnings_Off_Used_Unmodified
;
3627 function Warnings_Off_Used_Unreferenced
(Id
: E
) return B
is
3629 return Flag238
(Id
);
3630 end Warnings_Off_Used_Unreferenced
;
3632 function Wrapped_Entity
(Id
: E
) return E
is
3634 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
)
3635 and then Is_Primitive_Wrapper
(Id
));
3639 function Was_Hidden
(Id
: E
) return B
is
3641 return Flag196
(Id
);
3644 ------------------------------
3645 -- Classification Functions --
3646 ------------------------------
3648 function Is_Access_Type
(Id
: E
) return B
is
3650 return Ekind
(Id
) in Access_Kind
;
3653 function Is_Access_Protected_Subprogram_Type
(Id
: E
) return B
is
3655 return Ekind
(Id
) in Access_Protected_Kind
;
3656 end Is_Access_Protected_Subprogram_Type
;
3658 function Is_Access_Subprogram_Type
(Id
: E
) return B
is
3660 return Ekind
(Id
) in Access_Subprogram_Kind
;
3661 end Is_Access_Subprogram_Type
;
3663 function Is_Aggregate_Type
(Id
: E
) return B
is
3665 return Ekind
(Id
) in Aggregate_Kind
;
3666 end Is_Aggregate_Type
;
3668 function Is_Anonymous_Access_Type
(Id
: E
) return B
is
3670 return Ekind
(Id
) in Anonymous_Access_Kind
;
3671 end Is_Anonymous_Access_Type
;
3673 function Is_Array_Type
(Id
: E
) return B
is
3675 return Ekind
(Id
) in Array_Kind
;
3678 function Is_Assignable
(Id
: E
) return B
is
3680 return Ekind
(Id
) in Assignable_Kind
;
3683 function Is_Class_Wide_Type
(Id
: E
) return B
is
3685 return Ekind
(Id
) in Class_Wide_Kind
;
3686 end Is_Class_Wide_Type
;
3688 function Is_Composite_Type
(Id
: E
) return B
is
3690 return Ekind
(Id
) in Composite_Kind
;
3691 end Is_Composite_Type
;
3693 function Is_Concurrent_Body
(Id
: E
) return B
is
3695 return Ekind
(Id
) in Concurrent_Body_Kind
;
3696 end Is_Concurrent_Body
;
3698 function Is_Concurrent_Record_Type
(Id
: E
) return B
is
3701 end Is_Concurrent_Record_Type
;
3703 function Is_Concurrent_Type
(Id
: E
) return B
is
3705 return Ekind
(Id
) in Concurrent_Kind
;
3706 end Is_Concurrent_Type
;
3708 function Is_Decimal_Fixed_Point_Type
(Id
: E
) return B
is
3710 return Ekind
(Id
) in Decimal_Fixed_Point_Kind
;
3711 end Is_Decimal_Fixed_Point_Type
;
3713 function Is_Digits_Type
(Id
: E
) return B
is
3715 return Ekind
(Id
) in Digits_Kind
;
3718 function Is_Discrete_Or_Fixed_Point_Type
(Id
: E
) return B
is
3720 return Ekind
(Id
) in Discrete_Or_Fixed_Point_Kind
;
3721 end Is_Discrete_Or_Fixed_Point_Type
;
3723 function Is_Discrete_Type
(Id
: E
) return B
is
3725 return Ekind
(Id
) in Discrete_Kind
;
3726 end Is_Discrete_Type
;
3728 function Is_Elementary_Type
(Id
: E
) return B
is
3730 return Ekind
(Id
) in Elementary_Kind
;
3731 end Is_Elementary_Type
;
3733 function Is_Entry
(Id
: E
) return B
is
3735 return Ekind
(Id
) in Entry_Kind
;
3738 function Is_Enumeration_Type
(Id
: E
) return B
is
3740 return Ekind
(Id
) in Enumeration_Kind
;
3741 end Is_Enumeration_Type
;
3743 function Is_Fixed_Point_Type
(Id
: E
) return B
is
3745 return Ekind
(Id
) in Fixed_Point_Kind
;
3746 end Is_Fixed_Point_Type
;
3748 function Is_Floating_Point_Type
(Id
: E
) return B
is
3750 return Ekind
(Id
) in Float_Kind
;
3751 end Is_Floating_Point_Type
;
3753 function Is_Formal
(Id
: E
) return B
is
3755 return Ekind
(Id
) in Formal_Kind
;
3758 function Is_Formal_Object
(Id
: E
) return B
is
3760 return Ekind
(Id
) in Formal_Object_Kind
;
3761 end Is_Formal_Object
;
3763 function Is_Generic_Subprogram
(Id
: E
) return B
is
3765 return Ekind
(Id
) in Generic_Subprogram_Kind
;
3766 end Is_Generic_Subprogram
;
3768 function Is_Generic_Unit
(Id
: E
) return B
is
3770 return Ekind
(Id
) in Generic_Unit_Kind
;
3771 end Is_Generic_Unit
;
3773 function Is_Ghost_Entity
(Id
: Entity_Id
) return Boolean is
3775 return Is_Checked_Ghost_Entity
(Id
) or else Is_Ignored_Ghost_Entity
(Id
);
3776 end Is_Ghost_Entity
;
3778 function Is_Incomplete_Or_Private_Type
(Id
: E
) return B
is
3780 return Ekind
(Id
) in Incomplete_Or_Private_Kind
;
3781 end Is_Incomplete_Or_Private_Type
;
3783 function Is_Incomplete_Type
(Id
: E
) return B
is
3785 return Ekind
(Id
) in Incomplete_Kind
;
3786 end Is_Incomplete_Type
;
3788 function Is_Integer_Type
(Id
: E
) return B
is
3790 return Ekind
(Id
) in Integer_Kind
;
3791 end Is_Integer_Type
;
3793 function Is_Modular_Integer_Type
(Id
: E
) return B
is
3795 return Ekind
(Id
) in Modular_Integer_Kind
;
3796 end Is_Modular_Integer_Type
;
3798 function Is_Named_Number
(Id
: E
) return B
is
3800 return Ekind
(Id
) in Named_Kind
;
3801 end Is_Named_Number
;
3803 function Is_Numeric_Type
(Id
: E
) return B
is
3805 return Ekind
(Id
) in Numeric_Kind
;
3806 end Is_Numeric_Type
;
3808 function Is_Object
(Id
: E
) return B
is
3810 return Ekind
(Id
) in Object_Kind
;
3813 function Is_Ordinary_Fixed_Point_Type
(Id
: E
) return B
is
3815 return Ekind
(Id
) in Ordinary_Fixed_Point_Kind
;
3816 end Is_Ordinary_Fixed_Point_Type
;
3818 function Is_Overloadable
(Id
: E
) return B
is
3820 return Ekind
(Id
) in Overloadable_Kind
;
3821 end Is_Overloadable
;
3823 function Is_Private_Type
(Id
: E
) return B
is
3825 return Ekind
(Id
) in Private_Kind
;
3826 end Is_Private_Type
;
3828 function Is_Protected_Type
(Id
: E
) return B
is
3830 return Ekind
(Id
) in Protected_Kind
;
3831 end Is_Protected_Type
;
3833 function Is_Real_Type
(Id
: E
) return B
is
3835 return Ekind
(Id
) in Real_Kind
;
3838 function Is_Record_Type
(Id
: E
) return B
is
3840 return Ekind
(Id
) in Record_Kind
;
3843 function Is_Scalar_Type
(Id
: E
) return B
is
3845 return Ekind
(Id
) in Scalar_Kind
;
3848 function Is_Signed_Integer_Type
(Id
: E
) return B
is
3850 return Ekind
(Id
) in Signed_Integer_Kind
;
3851 end Is_Signed_Integer_Type
;
3853 function Is_Subprogram
(Id
: E
) return B
is
3855 return Ekind
(Id
) in Subprogram_Kind
;
3858 function Is_Subprogram_Or_Entry
(Id
: E
) return B
is
3860 return Ekind
(Id
) in Subprogram_Kind
3862 Ekind
(Id
) in Entry_Kind
;
3863 end Is_Subprogram_Or_Entry
;
3865 function Is_Subprogram_Or_Generic_Subprogram
(Id
: E
) return B
is
3867 return Ekind
(Id
) in Subprogram_Kind
3869 Ekind
(Id
) in Generic_Subprogram_Kind
;
3870 end Is_Subprogram_Or_Generic_Subprogram
;
3872 function Is_Task_Type
(Id
: E
) return B
is
3874 return Ekind
(Id
) in Task_Kind
;
3877 function Is_Type
(Id
: E
) return B
is
3879 return Ekind
(Id
) in Type_Kind
;
3882 ------------------------------
3883 -- Attribute Set Procedures --
3884 ------------------------------
3886 -- Note: in many of these set procedures an "obvious" assertion is missing.
3887 -- The reason for this is that in many cases, a field is set before the
3888 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3889 -- it is possible to add assertions that specifically include the E_Void
3890 -- possibility, but in some cases, we just omit the assertions.
3892 procedure Set_Abstract_States
(Id
: E
; V
: L
) is
3894 pragma Assert
(Ekind_In
(Id
, E_Generic_Package
, E_Package
));
3895 Set_Elist25
(Id
, V
);
3896 end Set_Abstract_States
;
3898 procedure Set_Accept_Address
(Id
: E
; V
: L
) is
3900 Set_Elist21
(Id
, V
);
3901 end Set_Accept_Address
;
3903 procedure Set_Access_Disp_Table
(Id
: E
; V
: L
) is
3905 pragma Assert
(Ekind
(Id
) = E_Record_Type
3906 and then Id
= Implementation_Base_Type
(Id
));
3907 pragma Assert
(V
= No_Elist
or else Is_Tagged_Type
(Id
));
3908 Set_Elist16
(Id
, V
);
3909 end Set_Access_Disp_Table
;
3911 procedure Set_Access_Disp_Table_Elab_Flag
(Id
: E
; V
: E
) is
3913 pragma Assert
(Ekind
(Id
) = E_Record_Type
3914 and then Id
= Implementation_Base_Type
(Id
));
3915 pragma Assert
(Is_Tagged_Type
(Id
));
3917 end Set_Access_Disp_Table_Elab_Flag
;
3919 procedure Set_Anonymous_Designated_Type
(Id
: E
; V
: E
) is
3921 pragma Assert
(Ekind
(Id
) = E_Variable
);
3923 end Set_Anonymous_Designated_Type
;
3925 procedure Set_Anonymous_Masters
(Id
: E
; V
: L
) is
3927 pragma Assert
(Ekind_In
(Id
, E_Function
,
3930 E_Subprogram_Body
));
3931 Set_Elist29
(Id
, V
);
3932 end Set_Anonymous_Masters
;
3934 procedure Set_Anonymous_Object
(Id
: E
; V
: E
) is
3936 pragma Assert
(Ekind_In
(Id
, E_Protected_Type
, E_Task_Type
));
3938 end Set_Anonymous_Object
;
3940 procedure Set_Associated_Entity
(Id
: E
; V
: E
) is
3943 end Set_Associated_Entity
;
3945 procedure Set_Associated_Formal_Package
(Id
: E
; V
: E
) is
3948 end Set_Associated_Formal_Package
;
3950 procedure Set_Associated_Node_For_Itype
(Id
: E
; V
: E
) is
3953 end Set_Associated_Node_For_Itype
;
3955 procedure Set_Associated_Storage_Pool
(Id
: E
; V
: E
) is
3957 pragma Assert
(Is_Access_Type
(Id
) and then Is_Base_Type
(Id
));
3959 end Set_Associated_Storage_Pool
;
3961 procedure Set_Activation_Record_Component
(Id
: E
; V
: E
) is
3963 pragma Assert
(Ekind_In
(Id
, E_Constant
,
3970 end Set_Activation_Record_Component
;
3972 procedure Set_Actual_Subtype
(Id
: E
; V
: E
) is
3975 (Ekind_In
(Id
, E_Constant
, E_Variable
, E_Generic_In_Out_Parameter
)
3976 or else Is_Formal
(Id
));
3978 end Set_Actual_Subtype
;
3980 procedure Set_Address_Taken
(Id
: E
; V
: B
:= True) is
3982 Set_Flag104
(Id
, V
);
3983 end Set_Address_Taken
;
3985 procedure Set_Alias
(Id
: E
; V
: E
) is
3988 (Is_Overloadable
(Id
) or else Ekind
(Id
) = E_Subprogram_Type
);
3992 procedure Set_Alignment
(Id
: E
; V
: U
) is
3994 pragma Assert
(Is_Type
(Id
)
3995 or else Is_Formal
(Id
)
3996 or else Ekind_In
(Id
, E_Loop_Parameter
,
4003 procedure Set_Barrier_Function
(Id
: E
; V
: N
) is
4005 pragma Assert
(Is_Entry
(Id
));
4007 end Set_Barrier_Function
;
4009 procedure Set_Block_Node
(Id
: E
; V
: N
) is
4011 pragma Assert
(Ekind
(Id
) = E_Block
);
4015 procedure Set_Body_Entity
(Id
: E
; V
: E
) is
4017 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Generic_Package
));
4019 end Set_Body_Entity
;
4021 procedure Set_Body_Needed_For_Inlining
(Id
: E
; V
: B
:= True) is
4023 pragma Assert
(Ekind
(Id
) = E_Package
);
4024 Set_Flag299
(Id
, V
);
4025 end Set_Body_Needed_For_Inlining
;
4027 procedure Set_Body_Needed_For_SAL
(Id
: E
; V
: B
:= True) is
4030 (Ekind
(Id
) = E_Package
4031 or else Is_Subprogram
(Id
)
4032 or else Is_Generic_Unit
(Id
));
4034 end Set_Body_Needed_For_SAL
;
4036 procedure Set_Body_References
(Id
: E
; V
: L
) is
4038 pragma Assert
(Ekind
(Id
) = E_Abstract_State
);
4039 Set_Elist16
(Id
, V
);
4040 end Set_Body_References
;
4042 procedure Set_BIP_Initialization_Call
(Id
: E
; V
: N
) is
4044 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
4046 end Set_BIP_Initialization_Call
;
4048 procedure Set_C_Pass_By_Copy
(Id
: E
; V
: B
:= True) is
4050 pragma Assert
(Is_Record_Type
(Id
) and then Is_Base_Type
(Id
));
4051 Set_Flag125
(Id
, V
);
4052 end Set_C_Pass_By_Copy
;
4054 procedure Set_Can_Never_Be_Null
(Id
: E
; V
: B
:= True) is
4057 end Set_Can_Never_Be_Null
;
4059 procedure Set_Can_Use_Internal_Rep
(Id
: E
; V
: B
:= True) is
4062 (Is_Access_Subprogram_Type
(Id
) and then Is_Base_Type
(Id
));
4063 Set_Flag229
(Id
, V
);
4064 end Set_Can_Use_Internal_Rep
;
4066 procedure Set_Checks_May_Be_Suppressed
(Id
: E
; V
: B
:= True) is
4069 end Set_Checks_May_Be_Suppressed
;
4071 procedure Set_Class_Wide_Clone
(Id
: E
; V
: E
) is
4073 pragma Assert
(Is_Subprogram
(Id
));
4075 end Set_Class_Wide_Clone
;
4077 procedure Set_Class_Wide_Type
(Id
: E
; V
: E
) is
4079 pragma Assert
(Is_Type
(Id
));
4081 end Set_Class_Wide_Type
;
4083 procedure Set_Cloned_Subtype
(Id
: E
; V
: E
) is
4085 pragma Assert
(Ekind_In
(Id
, E_Record_Subtype
, E_Class_Wide_Subtype
));
4087 end Set_Cloned_Subtype
;
4089 procedure Set_Component_Bit_Offset
(Id
: E
; V
: U
) is
4091 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
4093 end Set_Component_Bit_Offset
;
4095 procedure Set_Component_Clause
(Id
: E
; V
: N
) is
4097 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
4099 end Set_Component_Clause
;
4101 procedure Set_Component_Size
(Id
: E
; V
: U
) is
4103 pragma Assert
(Is_Array_Type
(Id
) and then Is_Base_Type
(Id
));
4105 end Set_Component_Size
;
4107 procedure Set_Component_Type
(Id
: E
; V
: E
) is
4109 pragma Assert
(Is_Array_Type
(Id
) and then Is_Base_Type
(Id
));
4111 end Set_Component_Type
;
4113 procedure Set_Contains_Ignored_Ghost_Code
(Id
: E
; V
: B
:= True) is
4116 (Ekind_In
(Id
, E_Block
,
4120 E_Generic_Procedure
,
4124 E_Subprogram_Body
));
4125 Set_Flag279
(Id
, V
);
4126 end Set_Contains_Ignored_Ghost_Code
;
4128 procedure Set_Contract
(Id
: E
; V
: N
) is
4131 (Ekind_In
(Id
, E_Protected_Type
, -- concurrent types
4135 Ekind_In
(Id
, E_Constant
, -- objects
4138 Ekind_In
(Id
, E_Entry
, -- overloadable
4142 E_Generic_Procedure
,
4147 Ekind_In
(Id
, E_Generic_Package
, -- packages
4151 Ekind
(Id
) = E_Void
); -- special purpose
4155 procedure Set_Contract_Wrapper
(Id
: E
; V
: E
) is
4157 pragma Assert
(Ekind_In
(Id
, E_Entry
, E_Entry_Family
));
4159 end Set_Contract_Wrapper
;
4161 procedure Set_Corresponding_Concurrent_Type
(Id
: E
; V
: E
) is
4164 (Ekind
(Id
) = E_Record_Type
and then Is_Concurrent_Type
(V
));
4166 end Set_Corresponding_Concurrent_Type
;
4168 procedure Set_Corresponding_Discriminant
(Id
: E
; V
: E
) is
4170 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
4172 end Set_Corresponding_Discriminant
;
4174 procedure Set_Corresponding_Equality
(Id
: E
; V
: E
) is
4177 (Ekind
(Id
) = E_Function
4178 and then not Comes_From_Source
(Id
)
4179 and then Chars
(Id
) = Name_Op_Ne
);
4181 end Set_Corresponding_Equality
;
4183 procedure Set_Corresponding_Function
(Id
: E
; V
: E
) is
4185 pragma Assert
(Ekind
(Id
) = E_Procedure
and then Rewritten_For_C
(V
));
4187 end Set_Corresponding_Function
;
4189 procedure Set_Corresponding_Procedure
(Id
: E
; V
: E
) is
4191 pragma Assert
(Ekind
(Id
) = E_Function
and then Rewritten_For_C
(Id
));
4193 end Set_Corresponding_Procedure
;
4195 procedure Set_Corresponding_Protected_Entry
(Id
: E
; V
: E
) is
4197 pragma Assert
(Ekind_In
(Id
, E_Void
, E_Subprogram_Body
));
4199 end Set_Corresponding_Protected_Entry
;
4201 procedure Set_Corresponding_Record_Component
(Id
: E
; V
: E
) is
4203 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
4205 end Set_Corresponding_Record_Component
;
4207 procedure Set_Corresponding_Record_Type
(Id
: E
; V
: E
) is
4209 pragma Assert
(Is_Concurrent_Type
(Id
));
4211 end Set_Corresponding_Record_Type
;
4213 procedure Set_Corresponding_Remote_Type
(Id
: E
; V
: E
) is
4216 end Set_Corresponding_Remote_Type
;
4218 procedure Set_Current_Use_Clause
(Id
: E
; V
: E
) is
4220 pragma Assert
(Ekind
(Id
) = E_Package
or else Is_Type
(Id
));
4222 end Set_Current_Use_Clause
;
4224 procedure Set_Current_Value
(Id
: E
; V
: N
) is
4226 pragma Assert
(Ekind
(Id
) in Object_Kind
or else Ekind
(Id
) = E_Void
);
4228 end Set_Current_Value
;
4230 procedure Set_CR_Discriminant
(Id
: E
; V
: E
) is
4233 end Set_CR_Discriminant
;
4235 procedure Set_Debug_Info_Off
(Id
: E
; V
: B
:= True) is
4237 Set_Flag166
(Id
, V
);
4238 end Set_Debug_Info_Off
;
4240 procedure Set_Debug_Renaming_Link
(Id
: E
; V
: E
) is
4243 end Set_Debug_Renaming_Link
;
4245 procedure Set_Default_Aspect_Component_Value
(Id
: E
; V
: E
) is
4247 pragma Assert
(Is_Array_Type
(Id
) and then Is_Base_Type
(Id
));
4249 end Set_Default_Aspect_Component_Value
;
4251 procedure Set_Default_Aspect_Value
(Id
: E
; V
: E
) is
4253 pragma Assert
(Is_Scalar_Type
(Id
) and then Is_Base_Type
(Id
));
4255 end Set_Default_Aspect_Value
;
4257 procedure Set_Default_Expr_Function
(Id
: E
; V
: E
) is
4259 pragma Assert
(Is_Formal
(Id
));
4261 end Set_Default_Expr_Function
;
4263 procedure Set_Default_Expressions_Processed
(Id
: E
; V
: B
:= True) is
4265 Set_Flag108
(Id
, V
);
4266 end Set_Default_Expressions_Processed
;
4268 procedure Set_Default_Value
(Id
: E
; V
: N
) is
4270 pragma Assert
(Is_Formal
(Id
));
4272 end Set_Default_Value
;
4274 procedure Set_Delay_Cleanups
(Id
: E
; V
: B
:= True) is
4278 or else Is_Task_Type
(Id
)
4279 or else Ekind
(Id
) = E_Block
);
4280 Set_Flag114
(Id
, V
);
4281 end Set_Delay_Cleanups
;
4283 procedure Set_Delay_Subprogram_Descriptors
(Id
: E
; V
: B
:= True) is
4286 (Is_Subprogram
(Id
) or else Ekind_In
(Id
, E_Package
, E_Package_Body
));
4289 end Set_Delay_Subprogram_Descriptors
;
4291 procedure Set_Delta_Value
(Id
: E
; V
: R
) is
4293 pragma Assert
(Is_Fixed_Point_Type
(Id
));
4294 Set_Ureal18
(Id
, V
);
4295 end Set_Delta_Value
;
4297 procedure Set_Dependent_Instances
(Id
: E
; V
: L
) is
4299 pragma Assert
(Is_Generic_Instance
(Id
));
4301 end Set_Dependent_Instances
;
4303 procedure Set_Depends_On_Private
(Id
: E
; V
: B
:= True) is
4305 pragma Assert
(Nkind
(Id
) in N_Entity
);
4307 end Set_Depends_On_Private
;
4309 procedure Set_Derived_Type_Link
(Id
: E
; V
: E
) is
4311 pragma Assert
(Is_Type
(Id
) and then Is_Base_Type
(Id
));
4313 end Set_Derived_Type_Link
;
4315 procedure Set_Digits_Value
(Id
: E
; V
: U
) is
4318 (Is_Floating_Point_Type
(Id
)
4319 or else Is_Decimal_Fixed_Point_Type
(Id
));
4321 end Set_Digits_Value
;
4323 procedure Set_Directly_Designated_Type
(Id
: E
; V
: E
) is
4326 end Set_Directly_Designated_Type
;
4328 procedure Set_Disable_Controlled
(Id
: E
; V
: B
:= True) is
4330 pragma Assert
(Is_Type
(Id
) and then Is_Base_Type
(Id
));
4331 Set_Flag253
(Id
, V
);
4332 end Set_Disable_Controlled
;
4334 procedure Set_Discard_Names
(Id
: E
; V
: B
:= True) is
4337 end Set_Discard_Names
;
4339 procedure Set_Discriminal
(Id
: E
; V
: E
) is
4341 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
4343 end Set_Discriminal
;
4345 procedure Set_Discriminal_Link
(Id
: E
; V
: E
) is
4348 end Set_Discriminal_Link
;
4350 procedure Set_Discriminant_Checking_Func
(Id
: E
; V
: E
) is
4352 pragma Assert
(Ekind
(Id
) = E_Component
);
4354 end Set_Discriminant_Checking_Func
;
4356 procedure Set_Discriminant_Constraint
(Id
: E
; V
: L
) is
4358 pragma Assert
(Nkind
(Id
) in N_Entity
);
4359 Set_Elist21
(Id
, V
);
4360 end Set_Discriminant_Constraint
;
4362 procedure Set_Discriminant_Default_Value
(Id
: E
; V
: N
) is
4365 end Set_Discriminant_Default_Value
;
4367 procedure Set_Discriminant_Number
(Id
: E
; V
: U
) is
4370 end Set_Discriminant_Number
;
4372 procedure Set_Dispatch_Table_Wrappers
(Id
: E
; V
: L
) is
4374 pragma Assert
(Ekind
(Id
) = E_Record_Type
4375 and then Id
= Implementation_Base_Type
(Id
));
4376 pragma Assert
(V
= No_Elist
or else Is_Tagged_Type
(Id
));
4377 Set_Elist26
(Id
, V
);
4378 end Set_Dispatch_Table_Wrappers
;
4380 procedure Set_DT_Entry_Count
(Id
: E
; V
: U
) is
4382 pragma Assert
(Ekind
(Id
) = E_Component
);
4384 end Set_DT_Entry_Count
;
4386 procedure Set_DT_Offset_To_Top_Func
(Id
: E
; V
: E
) is
4388 pragma Assert
(Ekind
(Id
) = E_Component
and then Is_Tag
(Id
));
4390 end Set_DT_Offset_To_Top_Func
;
4392 procedure Set_DT_Position
(Id
: E
; V
: U
) is
4394 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
4396 end Set_DT_Position
;
4398 procedure Set_DTC_Entity
(Id
: E
; V
: E
) is
4400 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
4404 procedure Set_Elaborate_Body_Desirable
(Id
: E
; V
: B
:= True) is
4406 pragma Assert
(Ekind
(Id
) = E_Package
);
4407 Set_Flag210
(Id
, V
);
4408 end Set_Elaborate_Body_Desirable
;
4410 procedure Set_Elaboration_Entity
(Id
: E
; V
: E
) is
4415 Ekind
(Id
) = E_Package
4417 Is_Generic_Unit
(Id
));
4419 end Set_Elaboration_Entity
;
4421 procedure Set_Elaboration_Entity_Required
(Id
: E
; V
: B
:= True) is
4426 Ekind
(Id
) = E_Package
4428 Is_Generic_Unit
(Id
));
4429 Set_Flag174
(Id
, V
);
4430 end Set_Elaboration_Entity_Required
;
4432 procedure Set_Encapsulating_State
(Id
: E
; V
: E
) is
4434 pragma Assert
(Ekind_In
(Id
, E_Abstract_State
, E_Constant
, E_Variable
));
4436 end Set_Encapsulating_State
;
4438 procedure Set_Enclosing_Scope
(Id
: E
; V
: E
) is
4441 end Set_Enclosing_Scope
;
4443 procedure Set_Entry_Accepted
(Id
: E
; V
: B
:= True) is
4445 pragma Assert
(Is_Entry
(Id
));
4446 Set_Flag152
(Id
, V
);
4447 end Set_Entry_Accepted
;
4449 procedure Set_Entry_Bodies_Array
(Id
: E
; V
: E
) is
4452 end Set_Entry_Bodies_Array
;
4454 procedure Set_Entry_Cancel_Parameter
(Id
: E
; V
: E
) is
4457 end Set_Entry_Cancel_Parameter
;
4459 procedure Set_Entry_Component
(Id
: E
; V
: E
) is
4462 end Set_Entry_Component
;
4464 procedure Set_Entry_Formal
(Id
: E
; V
: E
) is
4467 end Set_Entry_Formal
;
4469 procedure Set_Entry_Index_Constant
(Id
: E
; V
: E
) is
4471 pragma Assert
(Ekind
(Id
) = E_Entry_Index_Parameter
);
4473 end Set_Entry_Index_Constant
;
4475 procedure Set_Entry_Max_Queue_Lengths_Array
(Id
: E
; V
: E
) is
4477 pragma Assert
(Ekind
(Id
) = E_Protected_Type
);
4479 end Set_Entry_Max_Queue_Lengths_Array
;
4481 procedure Set_Entry_Parameters_Type
(Id
: E
; V
: E
) is
4484 end Set_Entry_Parameters_Type
;
4486 procedure Set_Enum_Pos_To_Rep
(Id
: E
; V
: E
) is
4488 pragma Assert
(Ekind
(Id
) = E_Enumeration_Type
);
4490 end Set_Enum_Pos_To_Rep
;
4492 procedure Set_Enumeration_Pos
(Id
: E
; V
: U
) is
4494 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
4496 end Set_Enumeration_Pos
;
4498 procedure Set_Enumeration_Rep
(Id
: E
; V
: U
) is
4500 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
4502 end Set_Enumeration_Rep
;
4504 procedure Set_Enumeration_Rep_Expr
(Id
: E
; V
: N
) is
4506 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
4508 end Set_Enumeration_Rep_Expr
;
4510 procedure Set_Equivalent_Type
(Id
: E
; V
: E
) is
4513 (Ekind_In
(Id
, E_Class_Wide_Type
,
4514 E_Class_Wide_Subtype
,
4515 E_Access_Protected_Subprogram_Type
,
4516 E_Anonymous_Access_Protected_Subprogram_Type
,
4517 E_Access_Subprogram_Type
,
4520 end Set_Equivalent_Type
;
4522 procedure Set_Esize
(Id
: E
; V
: U
) is
4527 procedure Set_Extra_Accessibility
(Id
: E
; V
: E
) is
4530 (Is_Formal
(Id
) or else Ekind_In
(Id
, E_Variable
, E_Constant
));
4532 end Set_Extra_Accessibility
;
4534 procedure Set_Extra_Accessibility_Of_Result
(Id
: E
; V
: E
) is
4536 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Operator
, E_Subprogram_Type
));
4538 end Set_Extra_Accessibility_Of_Result
;
4540 procedure Set_Extra_Constrained
(Id
: E
; V
: E
) is
4542 pragma Assert
(Is_Formal
(Id
) or else Ekind
(Id
) = E_Variable
);
4544 end Set_Extra_Constrained
;
4546 procedure Set_Extra_Formal
(Id
: E
; V
: E
) is
4549 end Set_Extra_Formal
;
4551 procedure Set_Extra_Formals
(Id
: E
; V
: E
) is
4554 (Is_Overloadable
(Id
)
4555 or else Ekind_In
(Id
, E_Entry_Family
,
4557 E_Subprogram_Type
));
4559 end Set_Extra_Formals
;
4561 procedure Set_Finalization_Master
(Id
: E
; V
: E
) is
4563 pragma Assert
(Is_Access_Type
(Id
) and then Is_Base_Type
(Id
));
4565 end Set_Finalization_Master
;
4567 procedure Set_Finalize_Storage_Only
(Id
: E
; V
: B
:= True) is
4569 pragma Assert
(Is_Type
(Id
) and then Is_Base_Type
(Id
));
4570 Set_Flag158
(Id
, V
);
4571 end Set_Finalize_Storage_Only
;
4573 procedure Set_Finalizer
(Id
: E
; V
: E
) is
4575 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Package_Body
));
4579 procedure Set_First_Entity
(Id
: E
; V
: E
) is
4582 end Set_First_Entity
;
4584 procedure Set_First_Exit_Statement
(Id
: E
; V
: N
) is
4586 pragma Assert
(Ekind
(Id
) = E_Loop
);
4588 end Set_First_Exit_Statement
;
4590 procedure Set_First_Index
(Id
: E
; V
: N
) is
4592 pragma Assert
(Is_Array_Type
(Id
));
4594 end Set_First_Index
;
4596 procedure Set_First_Literal
(Id
: E
; V
: E
) is
4598 pragma Assert
(Is_Enumeration_Type
(Id
));
4600 end Set_First_Literal
;
4602 procedure Set_First_Private_Entity
(Id
: E
; V
: E
) is
4604 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Generic_Package
)
4605 or else Ekind
(Id
) in Concurrent_Kind
);
4607 end Set_First_Private_Entity
;
4609 procedure Set_First_Rep_Item
(Id
: E
; V
: N
) is
4612 end Set_First_Rep_Item
;
4614 procedure Set_Float_Rep
(Id
: E
; V
: F
) is
4615 pragma Assert
(Ekind
(Id
) = E_Floating_Point_Type
);
4617 Set_Uint10
(Id
, UI_From_Int
(F
'Pos (V
)));
4620 procedure Set_Freeze_Node
(Id
: E
; V
: N
) is
4623 end Set_Freeze_Node
;
4625 procedure Set_From_Limited_With
(Id
: E
; V
: B
:= True) is
4628 (Is_Type
(Id
) or else Ekind_In
(Id
, E_Abstract_State
, E_Package
));
4629 Set_Flag159
(Id
, V
);
4630 end Set_From_Limited_With
;
4632 procedure Set_Full_View
(Id
: E
; V
: E
) is
4634 pragma Assert
(Is_Type
(Id
) or else Ekind
(Id
) = E_Constant
);
4638 procedure Set_Generic_Homonym
(Id
: E
; V
: E
) is
4641 end Set_Generic_Homonym
;
4643 procedure Set_Generic_Renamings
(Id
: E
; V
: L
) is
4645 Set_Elist23
(Id
, V
);
4646 end Set_Generic_Renamings
;
4648 procedure Set_Handler_Records
(Id
: E
; V
: S
) is
4651 end Set_Handler_Records
;
4653 procedure Set_Has_Aliased_Components
(Id
: E
; V
: B
:= True) is
4655 pragma Assert
(Id
= Base_Type
(Id
));
4656 Set_Flag135
(Id
, V
);
4657 end Set_Has_Aliased_Components
;
4659 procedure Set_Has_Alignment_Clause
(Id
: E
; V
: B
:= True) is
4662 end Set_Has_Alignment_Clause
;
4664 procedure Set_Has_All_Calls_Remote
(Id
: E
; V
: B
:= True) is
4667 end Set_Has_All_Calls_Remote
;
4669 procedure Set_Has_Atomic_Components
(Id
: E
; V
: B
:= True) is
4671 pragma Assert
(not Is_Type
(Id
) or else Is_Base_Type
(Id
));
4673 end Set_Has_Atomic_Components
;
4675 procedure Set_Has_Biased_Representation
(Id
: E
; V
: B
:= True) is
4678 ((V
= False) or else (Is_Discrete_Type
(Id
) or else Is_Object
(Id
)));
4679 Set_Flag139
(Id
, V
);
4680 end Set_Has_Biased_Representation
;
4682 procedure Set_Has_Completion
(Id
: E
; V
: B
:= True) is
4685 end Set_Has_Completion
;
4687 procedure Set_Has_Completion_In_Body
(Id
: E
; V
: B
:= True) is
4689 pragma Assert
(Is_Type
(Id
));
4691 end Set_Has_Completion_In_Body
;
4693 procedure Set_Has_Complex_Representation
(Id
: E
; V
: B
:= True) is
4695 pragma Assert
(Is_Record_Type
(Id
) and then Is_Base_Type
(Id
));
4696 Set_Flag140
(Id
, V
);
4697 end Set_Has_Complex_Representation
;
4699 procedure Set_Has_Component_Size_Clause
(Id
: E
; V
: B
:= True) is
4701 pragma Assert
(Ekind
(Id
) = E_Array_Type
);
4703 end Set_Has_Component_Size_Clause
;
4705 procedure Set_Has_Constrained_Partial_View
(Id
: E
; V
: B
:= True) is
4707 pragma Assert
(Is_Type
(Id
));
4708 Set_Flag187
(Id
, V
);
4709 end Set_Has_Constrained_Partial_View
;
4711 procedure Set_Has_Contiguous_Rep
(Id
: E
; V
: B
:= True) is
4713 Set_Flag181
(Id
, V
);
4714 end Set_Has_Contiguous_Rep
;
4716 procedure Set_Has_Controlled_Component
(Id
: E
; V
: B
:= True) is
4718 pragma Assert
(Id
= Base_Type
(Id
));
4720 end Set_Has_Controlled_Component
;
4722 procedure Set_Has_Controlling_Result
(Id
: E
; V
: B
:= True) is
4725 end Set_Has_Controlling_Result
;
4727 procedure Set_Has_Convention_Pragma
(Id
: E
; V
: B
:= True) is
4729 Set_Flag119
(Id
, V
);
4730 end Set_Has_Convention_Pragma
;
4732 procedure Set_Has_Default_Aspect
(Id
: E
; V
: B
:= True) is
4735 ((Is_Scalar_Type
(Id
) or else Is_Array_Type
(Id
))
4736 and then Is_Base_Type
(Id
));
4738 end Set_Has_Default_Aspect
;
4740 procedure Set_Has_Delayed_Aspects
(Id
: E
; V
: B
:= True) is
4742 pragma Assert
(Nkind
(Id
) in N_Entity
);
4743 Set_Flag200
(Id
, V
);
4744 end Set_Has_Delayed_Aspects
;
4746 procedure Set_Has_Delayed_Freeze
(Id
: E
; V
: B
:= True) is
4748 pragma Assert
(Nkind
(Id
) in N_Entity
);
4750 end Set_Has_Delayed_Freeze
;
4752 procedure Set_Has_Delayed_Rep_Aspects
(Id
: E
; V
: B
:= True) is
4754 pragma Assert
(Nkind
(Id
) in N_Entity
);
4755 Set_Flag261
(Id
, V
);
4756 end Set_Has_Delayed_Rep_Aspects
;
4758 procedure Set_Has_Discriminants
(Id
: E
; V
: B
:= True) is
4760 pragma Assert
(Is_Type
(Id
));
4762 end Set_Has_Discriminants
;
4764 procedure Set_Has_Dispatch_Table
(Id
: E
; V
: B
:= True) is
4766 pragma Assert
(Ekind
(Id
) = E_Record_Type
4767 and then Is_Tagged_Type
(Id
));
4768 Set_Flag220
(Id
, V
);
4769 end Set_Has_Dispatch_Table
;
4771 procedure Set_Has_Dynamic_Predicate_Aspect
(Id
: E
; V
: B
:= True) is
4773 pragma Assert
(Is_Type
(Id
));
4774 Set_Flag258
(Id
, V
);
4775 end Set_Has_Dynamic_Predicate_Aspect
;
4777 procedure Set_Has_Enumeration_Rep_Clause
(Id
: E
; V
: B
:= True) is
4779 pragma Assert
(Is_Enumeration_Type
(Id
));
4781 end Set_Has_Enumeration_Rep_Clause
;
4783 procedure Set_Has_Exit
(Id
: E
; V
: B
:= True) is
4788 procedure Set_Has_Expanded_Contract
(Id
: E
; V
: B
:= True) is
4790 pragma Assert
(Ekind_In
(Id
, E_Entry
,
4794 Set_Flag240
(Id
, V
);
4795 end Set_Has_Expanded_Contract
;
4797 procedure Set_Has_Forward_Instantiation
(Id
: E
; V
: B
:= True) is
4799 Set_Flag175
(Id
, V
);
4800 end Set_Has_Forward_Instantiation
;
4802 procedure Set_Has_Fully_Qualified_Name
(Id
: E
; V
: B
:= True) is
4804 Set_Flag173
(Id
, V
);
4805 end Set_Has_Fully_Qualified_Name
;
4807 procedure Set_Has_Gigi_Rep_Item
(Id
: E
; V
: B
:= True) is
4810 end Set_Has_Gigi_Rep_Item
;
4812 procedure Set_Has_Homonym
(Id
: E
; V
: B
:= True) is
4815 end Set_Has_Homonym
;
4817 procedure Set_Has_Implicit_Dereference
(Id
: E
; V
: B
:= True) is
4819 Set_Flag251
(Id
, V
);
4820 end Set_Has_Implicit_Dereference
;
4822 procedure Set_Has_Independent_Components
(Id
: E
; V
: B
:= True) is
4824 pragma Assert
(not Is_Type
(Id
) or else Is_Base_Type
(Id
));
4826 end Set_Has_Independent_Components
;
4828 procedure Set_Has_Inheritable_Invariants
(Id
: E
; V
: B
:= True) is
4830 pragma Assert
(Is_Type
(Id
));
4831 Set_Flag248
(Base_Type
(Id
), V
);
4832 end Set_Has_Inheritable_Invariants
;
4834 procedure Set_Has_Inherited_DIC
(Id
: E
; V
: B
:= True) is
4836 pragma Assert
(Is_Type
(Id
));
4837 Set_Flag133
(Base_Type
(Id
), V
);
4838 end Set_Has_Inherited_DIC
;
4840 procedure Set_Has_Inherited_Invariants
(Id
: E
; V
: B
:= True) is
4842 pragma Assert
(Is_Type
(Id
));
4843 Set_Flag291
(Base_Type
(Id
), V
);
4844 end Set_Has_Inherited_Invariants
;
4846 procedure Set_Has_Initial_Value
(Id
: E
; V
: B
:= True) is
4848 pragma Assert
(Ekind_In
(Id
, E_Variable
, E_Out_Parameter
));
4849 Set_Flag219
(Id
, V
);
4850 end Set_Has_Initial_Value
;
4852 procedure Set_Has_Loop_Entry_Attributes
(Id
: E
; V
: B
:= True) is
4854 pragma Assert
(Ekind
(Id
) = E_Loop
);
4855 Set_Flag260
(Id
, V
);
4856 end Set_Has_Loop_Entry_Attributes
;
4858 procedure Set_Has_Machine_Radix_Clause
(Id
: E
; V
: B
:= True) is
4860 pragma Assert
(Is_Decimal_Fixed_Point_Type
(Id
));
4862 end Set_Has_Machine_Radix_Clause
;
4864 procedure Set_Has_Master_Entity
(Id
: E
; V
: B
:= True) is
4867 end Set_Has_Master_Entity
;
4869 procedure Set_Has_Missing_Return
(Id
: E
; V
: B
:= True) is
4871 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Generic_Function
));
4872 Set_Flag142
(Id
, V
);
4873 end Set_Has_Missing_Return
;
4875 procedure Set_Has_Nested_Block_With_Handler
(Id
: E
; V
: B
:= True) is
4877 Set_Flag101
(Id
, V
);
4878 end Set_Has_Nested_Block_With_Handler
;
4880 procedure Set_Has_Nested_Subprogram
(Id
: E
; V
: B
:= True) is
4882 pragma Assert
(Is_Subprogram
(Id
));
4883 Set_Flag282
(Id
, V
);
4884 end Set_Has_Nested_Subprogram
;
4886 procedure Set_Has_Non_Standard_Rep
(Id
: E
; V
: B
:= True) is
4888 pragma Assert
(Id
= Base_Type
(Id
));
4890 end Set_Has_Non_Standard_Rep
;
4892 procedure Set_Has_Object_Size_Clause
(Id
: E
; V
: B
:= True) is
4894 pragma Assert
(Is_Type
(Id
));
4895 Set_Flag172
(Id
, V
);
4896 end Set_Has_Object_Size_Clause
;
4898 procedure Set_Has_Out_Or_In_Out_Parameter
(Id
: E
; V
: B
:= True) is
4901 (Ekind_In
(Id
, E_Entry
, E_Entry_Family
)
4902 or else Is_Subprogram_Or_Generic_Subprogram
(Id
));
4903 Set_Flag110
(Id
, V
);
4904 end Set_Has_Out_Or_In_Out_Parameter
;
4906 procedure Set_Has_Own_DIC
(Id
: E
; V
: B
:= True) is
4908 pragma Assert
(Is_Type
(Id
));
4909 Set_Flag3
(Base_Type
(Id
), V
);
4910 end Set_Has_Own_DIC
;
4912 procedure Set_Has_Own_Invariants
(Id
: E
; V
: B
:= True) is
4914 pragma Assert
(Is_Type
(Id
));
4915 Set_Flag232
(Base_Type
(Id
), V
);
4916 end Set_Has_Own_Invariants
;
4918 procedure Set_Has_Partial_Visible_Refinement
(Id
: E
; V
: B
:= True) is
4920 pragma Assert
(Ekind
(Id
) = E_Abstract_State
);
4921 Set_Flag296
(Id
, V
);
4922 end Set_Has_Partial_Visible_Refinement
;
4924 procedure Set_Has_Per_Object_Constraint
(Id
: E
; V
: B
:= True) is
4926 Set_Flag154
(Id
, V
);
4927 end Set_Has_Per_Object_Constraint
;
4929 procedure Set_Has_Pragma_Controlled
(Id
: E
; V
: B
:= True) is
4931 pragma Assert
(Is_Access_Type
(Id
));
4932 Set_Flag27
(Base_Type
(Id
), V
);
4933 end Set_Has_Pragma_Controlled
;
4935 procedure Set_Has_Pragma_Elaborate_Body
(Id
: E
; V
: B
:= True) is
4937 Set_Flag150
(Id
, V
);
4938 end Set_Has_Pragma_Elaborate_Body
;
4940 procedure Set_Has_Pragma_Inline
(Id
: E
; V
: B
:= True) is
4942 Set_Flag157
(Id
, V
);
4943 end Set_Has_Pragma_Inline
;
4945 procedure Set_Has_Pragma_Inline_Always
(Id
: E
; V
: B
:= True) is
4947 Set_Flag230
(Id
, V
);
4948 end Set_Has_Pragma_Inline_Always
;
4950 procedure Set_Has_Pragma_No_Inline
(Id
: E
; V
: B
:= True) is
4952 Set_Flag201
(Id
, V
);
4953 end Set_Has_Pragma_No_Inline
;
4955 procedure Set_Has_Pragma_Ordered
(Id
: E
; V
: B
:= True) is
4957 pragma Assert
(Is_Enumeration_Type
(Id
));
4958 pragma Assert
(Id
= Base_Type
(Id
));
4959 Set_Flag198
(Id
, V
);
4960 end Set_Has_Pragma_Ordered
;
4962 procedure Set_Has_Pragma_Pack
(Id
: E
; V
: B
:= True) is
4964 pragma Assert
(Is_Array_Type
(Id
) or else Is_Record_Type
(Id
));
4965 pragma Assert
(Id
= Base_Type
(Id
));
4966 Set_Flag121
(Id
, V
);
4967 end Set_Has_Pragma_Pack
;
4969 procedure Set_Has_Pragma_Preelab_Init
(Id
: E
; V
: B
:= True) is
4971 Set_Flag221
(Id
, V
);
4972 end Set_Has_Pragma_Preelab_Init
;
4974 procedure Set_Has_Pragma_Pure
(Id
: E
; V
: B
:= True) is
4976 Set_Flag203
(Id
, V
);
4977 end Set_Has_Pragma_Pure
;
4979 procedure Set_Has_Pragma_Pure_Function
(Id
: E
; V
: B
:= True) is
4981 Set_Flag179
(Id
, V
);
4982 end Set_Has_Pragma_Pure_Function
;
4984 procedure Set_Has_Pragma_Thread_Local_Storage
(Id
: E
; V
: B
:= True) is
4986 Set_Flag169
(Id
, V
);
4987 end Set_Has_Pragma_Thread_Local_Storage
;
4989 procedure Set_Has_Pragma_Unmodified
(Id
: E
; V
: B
:= True) is
4991 Set_Flag233
(Id
, V
);
4992 end Set_Has_Pragma_Unmodified
;
4994 procedure Set_Has_Pragma_Unreferenced
(Id
: E
; V
: B
:= True) is
4996 Set_Flag180
(Id
, V
);
4997 end Set_Has_Pragma_Unreferenced
;
4999 procedure Set_Has_Pragma_Unreferenced_Objects
(Id
: E
; V
: B
:= True) is
5001 pragma Assert
(Is_Type
(Id
));
5002 Set_Flag212
(Id
, V
);
5003 end Set_Has_Pragma_Unreferenced_Objects
;
5005 procedure Set_Has_Pragma_Unused
(Id
: E
; V
: B
:= True) is
5007 Set_Flag294
(Id
, V
);
5008 end Set_Has_Pragma_Unused
;
5010 procedure Set_Has_Predicates
(Id
: E
; V
: B
:= True) is
5012 pragma Assert
(Is_Type
(Id
) or else Ekind
(Id
) = E_Void
);
5013 Set_Flag250
(Id
, V
);
5014 end Set_Has_Predicates
;
5016 procedure Set_Has_Primitive_Operations
(Id
: E
; V
: B
:= True) is
5018 pragma Assert
(Id
= Base_Type
(Id
));
5019 Set_Flag120
(Id
, V
);
5020 end Set_Has_Primitive_Operations
;
5022 procedure Set_Has_Private_Ancestor
(Id
: E
; V
: B
:= True) is
5024 pragma Assert
(Is_Type
(Id
));
5025 Set_Flag151
(Id
, V
);
5026 end Set_Has_Private_Ancestor
;
5028 procedure Set_Has_Private_Declaration
(Id
: E
; V
: B
:= True) is
5030 Set_Flag155
(Id
, V
);
5031 end Set_Has_Private_Declaration
;
5033 procedure Set_Has_Private_Extension
(Id
: E
; V
: B
:= True) is
5035 pragma Assert
(Is_Tagged_Type
(Id
));
5036 Set_Flag300
(Id
, V
);
5037 end Set_Has_Private_Extension
;
5039 procedure Set_Has_Protected
(Id
: E
; V
: B
:= True) is
5041 Set_Flag271
(Id
, V
);
5042 end Set_Has_Protected
;
5044 procedure Set_Has_Qualified_Name
(Id
: E
; V
: B
:= True) is
5046 Set_Flag161
(Id
, V
);
5047 end Set_Has_Qualified_Name
;
5049 procedure Set_Has_RACW
(Id
: E
; V
: B
:= True) is
5051 pragma Assert
(Ekind
(Id
) = E_Package
);
5052 Set_Flag214
(Id
, V
);
5055 procedure Set_Has_Record_Rep_Clause
(Id
: E
; V
: B
:= True) is
5057 pragma Assert
(Id
= Base_Type
(Id
));
5059 end Set_Has_Record_Rep_Clause
;
5061 procedure Set_Has_Recursive_Call
(Id
: E
; V
: B
:= True) is
5063 pragma Assert
(Is_Subprogram
(Id
));
5064 Set_Flag143
(Id
, V
);
5065 end Set_Has_Recursive_Call
;
5067 procedure Set_Has_Shift_Operator
(Id
: E
; V
: B
:= True) is
5069 pragma Assert
(Is_Integer_Type
(Id
) and then Is_Base_Type
(Id
));
5070 Set_Flag267
(Id
, V
);
5071 end Set_Has_Shift_Operator
;
5073 procedure Set_Has_Size_Clause
(Id
: E
; V
: B
:= True) is
5076 end Set_Has_Size_Clause
;
5078 procedure Set_Has_Small_Clause
(Id
: E
; V
: B
:= True) is
5080 pragma Assert
(Is_Ordinary_Fixed_Point_Type
(Id
));
5082 end Set_Has_Small_Clause
;
5084 procedure Set_Has_Specified_Layout
(Id
: E
; V
: B
:= True) is
5086 pragma Assert
(Id
= Base_Type
(Id
));
5087 Set_Flag100
(Id
, V
);
5088 end Set_Has_Specified_Layout
;
5090 procedure Set_Has_Specified_Stream_Input
(Id
: E
; V
: B
:= True) is
5092 pragma Assert
(Is_Type
(Id
));
5093 Set_Flag190
(Id
, V
);
5094 end Set_Has_Specified_Stream_Input
;
5096 procedure Set_Has_Specified_Stream_Output
(Id
: E
; V
: B
:= True) is
5098 pragma Assert
(Is_Type
(Id
));
5099 Set_Flag191
(Id
, V
);
5100 end Set_Has_Specified_Stream_Output
;
5102 procedure Set_Has_Specified_Stream_Read
(Id
: E
; V
: B
:= True) is
5104 pragma Assert
(Is_Type
(Id
));
5105 Set_Flag192
(Id
, V
);
5106 end Set_Has_Specified_Stream_Read
;
5108 procedure Set_Has_Specified_Stream_Write
(Id
: E
; V
: B
:= True) is
5110 pragma Assert
(Is_Type
(Id
));
5111 Set_Flag193
(Id
, V
);
5112 end Set_Has_Specified_Stream_Write
;
5114 procedure Set_Has_Static_Discriminants
(Id
: E
; V
: B
:= True) is
5116 Set_Flag211
(Id
, V
);
5117 end Set_Has_Static_Discriminants
;
5119 procedure Set_Has_Static_Predicate
(Id
: E
; V
: B
:= True) is
5121 pragma Assert
(Is_Type
(Id
));
5122 Set_Flag269
(Id
, V
);
5123 end Set_Has_Static_Predicate
;
5125 procedure Set_Has_Static_Predicate_Aspect
(Id
: E
; V
: B
:= True) is
5127 pragma Assert
(Is_Type
(Id
));
5128 Set_Flag259
(Id
, V
);
5129 end Set_Has_Static_Predicate_Aspect
;
5131 procedure Set_Has_Storage_Size_Clause
(Id
: E
; V
: B
:= True) is
5133 pragma Assert
(Is_Access_Type
(Id
) or else Is_Task_Type
(Id
));
5134 pragma Assert
(Id
= Base_Type
(Id
));
5136 end Set_Has_Storage_Size_Clause
;
5138 procedure Set_Has_Stream_Size_Clause
(Id
: E
; V
: B
:= True) is
5140 pragma Assert
(Is_Elementary_Type
(Id
));
5141 Set_Flag184
(Id
, V
);
5142 end Set_Has_Stream_Size_Clause
;
5144 procedure Set_Has_Task
(Id
: E
; V
: B
:= True) is
5146 pragma Assert
(Id
= Base_Type
(Id
));
5150 procedure Set_Has_Thunks
(Id
: E
; V
: B
:= True) is
5152 pragma Assert
(Is_Tag
(Id
));
5153 Set_Flag228
(Id
, V
);
5156 procedure Set_Has_Timing_Event
(Id
: E
; V
: B
:= True) is
5158 pragma Assert
(Id
= Base_Type
(Id
));
5159 Set_Flag289
(Id
, V
);
5160 end Set_Has_Timing_Event
;
5162 procedure Set_Has_Unchecked_Union
(Id
: E
; V
: B
:= True) is
5164 pragma Assert
(Id
= Base_Type
(Id
));
5165 Set_Flag123
(Id
, V
);
5166 end Set_Has_Unchecked_Union
;
5168 procedure Set_Has_Unknown_Discriminants
(Id
: E
; V
: B
:= True) is
5170 pragma Assert
(Is_Type
(Id
));
5172 end Set_Has_Unknown_Discriminants
;
5174 procedure Set_Has_Visible_Refinement
(Id
: E
; V
: B
:= True) is
5176 pragma Assert
(Ekind
(Id
) = E_Abstract_State
);
5177 Set_Flag263
(Id
, V
);
5178 end Set_Has_Visible_Refinement
;
5180 procedure Set_Has_Volatile_Components
(Id
: E
; V
: B
:= True) is
5182 pragma Assert
(not Is_Type
(Id
) or else Is_Base_Type
(Id
));
5184 end Set_Has_Volatile_Components
;
5186 procedure Set_Has_Xref_Entry
(Id
: E
; V
: B
:= True) is
5188 Set_Flag182
(Id
, V
);
5189 end Set_Has_Xref_Entry
;
5191 procedure Set_Hiding_Loop_Variable
(Id
: E
; V
: E
) is
5193 pragma Assert
(Ekind
(Id
) = E_Variable
);
5195 end Set_Hiding_Loop_Variable
;
5197 procedure Set_Hidden_In_Formal_Instance
(Id
: E
; V
: L
) is
5199 pragma Assert
(Ekind
(Id
) = E_Package
);
5200 Set_Elist30
(Id
, V
);
5201 end Set_Hidden_In_Formal_Instance
;
5203 procedure Set_Homonym
(Id
: E
; V
: E
) is
5205 pragma Assert
(Id
/= V
);
5209 procedure Set_Incomplete_Actuals
(Id
: E
; V
: L
) is
5211 pragma Assert
(Ekind
(Id
) = E_Package
);
5212 Set_Elist24
(Id
, V
);
5213 end Set_Incomplete_Actuals
;
5215 procedure Set_Ignore_SPARK_Mode_Pragmas
(Id
: E
; V
: B
:= True) is
5218 (Ekind_In
(Id
, E_Protected_Body
, -- concurrent types
5223 Ekind_In
(Id
, E_Entry
, -- overloadable
5227 E_Generic_Procedure
,
5232 Ekind_In
(Id
, E_Generic_Package
, -- packages
5235 Set_Flag301
(Id
, V
);
5236 end Set_Ignore_SPARK_Mode_Pragmas
;
5238 procedure Set_Import_Pragma
(Id
: E
; V
: E
) is
5240 pragma Assert
(Is_Subprogram
(Id
));
5242 end Set_Import_Pragma
;
5244 procedure Set_Interface_Alias
(Id
: E
; V
: E
) is
5248 and then Is_Hidden
(Id
)
5249 and then (Ekind_In
(Id
, E_Procedure
, E_Function
)));
5251 end Set_Interface_Alias
;
5253 procedure Set_Interfaces
(Id
: E
; V
: L
) is
5255 pragma Assert
(Is_Record_Type
(Id
));
5256 Set_Elist25
(Id
, V
);
5259 procedure Set_In_Package_Body
(Id
: E
; V
: B
:= True) is
5262 end Set_In_Package_Body
;
5264 procedure Set_In_Private_Part
(Id
: E
; V
: B
:= True) is
5267 end Set_In_Private_Part
;
5269 procedure Set_In_Use
(Id
: E
; V
: B
:= True) is
5271 pragma Assert
(Nkind
(Id
) in N_Entity
);
5275 procedure Set_Initialization_Statements
(Id
: E
; V
: N
) is
5277 -- Tolerate an E_Void entity since this can be called while resolving
5278 -- an aggregate used as the initialization expression for an object
5279 -- declaration, and this occurs before the Ekind for the object is set.
5281 pragma Assert
(Ekind_In
(Id
, E_Void
, E_Constant
, E_Variable
));
5283 end Set_Initialization_Statements
;
5285 procedure Set_Inner_Instances
(Id
: E
; V
: L
) is
5287 Set_Elist23
(Id
, V
);
5288 end Set_Inner_Instances
;
5290 procedure Set_Interface_Name
(Id
: E
; V
: N
) is
5293 end Set_Interface_Name
;
5295 procedure Set_Is_Abstract_Subprogram
(Id
: E
; V
: B
:= True) is
5297 pragma Assert
(Is_Overloadable
(Id
));
5299 end Set_Is_Abstract_Subprogram
;
5301 procedure Set_Is_Abstract_Type
(Id
: E
; V
: B
:= True) is
5303 pragma Assert
(Is_Type
(Id
));
5304 Set_Flag146
(Id
, V
);
5305 end Set_Is_Abstract_Type
;
5307 procedure Set_Is_Local_Anonymous_Access
(Id
: E
; V
: B
:= True) is
5309 pragma Assert
(Is_Access_Type
(Id
));
5310 Set_Flag194
(Id
, V
);
5311 end Set_Is_Local_Anonymous_Access
;
5313 procedure Set_Is_Access_Constant
(Id
: E
; V
: B
:= True) is
5315 pragma Assert
(Is_Access_Type
(Id
));
5317 end Set_Is_Access_Constant
;
5319 procedure Set_Is_Activation_Record
(Id
: E
; V
: B
:= True) is
5321 pragma Assert
(Ekind
(Id
) = E_In_Parameter
);
5322 Set_Flag305
(Id
, V
);
5323 end Set_Is_Activation_Record
;
5325 procedure Set_Is_Actual_Subtype
(Id
: E
; V
: B
:= True) is
5327 pragma Assert
(Is_Type
(Id
));
5328 Set_Flag293
(Id
, V
);
5329 end Set_Is_Actual_Subtype
;
5331 procedure Set_Is_Ada_2005_Only
(Id
: E
; V
: B
:= True) is
5333 Set_Flag185
(Id
, V
);
5334 end Set_Is_Ada_2005_Only
;
5336 procedure Set_Is_Ada_2012_Only
(Id
: E
; V
: B
:= True) is
5338 Set_Flag199
(Id
, V
);
5339 end Set_Is_Ada_2012_Only
;
5341 procedure Set_Is_Aliased
(Id
: E
; V
: B
:= True) is
5343 pragma Assert
(Nkind
(Id
) in N_Entity
);
5347 procedure Set_Is_Asynchronous
(Id
: E
; V
: B
:= True) is
5350 (Ekind
(Id
) = E_Procedure
or else Is_Type
(Id
));
5352 end Set_Is_Asynchronous
;
5354 procedure Set_Is_Atomic
(Id
: E
; V
: B
:= True) is
5359 procedure Set_Is_Bit_Packed_Array
(Id
: E
; V
: B
:= True) is
5361 pragma Assert
((not V
)
5362 or else (Is_Array_Type
(Id
) and then Is_Base_Type
(Id
)));
5363 Set_Flag122
(Id
, V
);
5364 end Set_Is_Bit_Packed_Array
;
5366 procedure Set_Is_Called
(Id
: E
; V
: B
:= True) is
5368 pragma Assert
(Ekind_In
(Id
, E_Procedure
, E_Function
));
5369 Set_Flag102
(Id
, V
);
5372 procedure Set_Is_Character_Type
(Id
: E
; V
: B
:= True) is
5375 end Set_Is_Character_Type
;
5377 procedure Set_Is_Checked_Ghost_Entity
(Id
: E
; V
: B
:= True) is
5379 -- Allow this attribute to appear on unanalyzed entities
5381 pragma Assert
(Nkind
(Id
) in N_Entity
5382 or else Ekind
(Id
) = E_Void
);
5383 Set_Flag277
(Id
, V
);
5384 end Set_Is_Checked_Ghost_Entity
;
5386 procedure Set_Is_Child_Unit
(Id
: E
; V
: B
:= True) is
5389 end Set_Is_Child_Unit
;
5391 procedure Set_Is_Class_Wide_Clone
(Id
: E
; V
: B
:= True) is
5393 Set_Flag290
(Id
, V
);
5394 end Set_Is_Class_Wide_Clone
;
5396 procedure Set_Is_Class_Wide_Equivalent_Type
(Id
: E
; V
: B
:= True) is
5399 end Set_Is_Class_Wide_Equivalent_Type
;
5401 procedure Set_Is_Compilation_Unit
(Id
: E
; V
: B
:= True) is
5403 Set_Flag149
(Id
, V
);
5404 end Set_Is_Compilation_Unit
;
5406 procedure Set_Is_Completely_Hidden
(Id
: E
; V
: B
:= True) is
5408 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
5409 Set_Flag103
(Id
, V
);
5410 end Set_Is_Completely_Hidden
;
5412 procedure Set_Is_Concurrent_Record_Type
(Id
: E
; V
: B
:= True) is
5415 end Set_Is_Concurrent_Record_Type
;
5417 procedure Set_Is_Constr_Subt_For_U_Nominal
(Id
: E
; V
: B
:= True) is
5420 end Set_Is_Constr_Subt_For_U_Nominal
;
5422 procedure Set_Is_Constr_Subt_For_UN_Aliased
(Id
: E
; V
: B
:= True) is
5424 Set_Flag141
(Id
, V
);
5425 end Set_Is_Constr_Subt_For_UN_Aliased
;
5427 procedure Set_Is_Constrained
(Id
: E
; V
: B
:= True) is
5429 pragma Assert
(Nkind
(Id
) in N_Entity
);
5431 end Set_Is_Constrained
;
5433 procedure Set_Is_Constructor
(Id
: E
; V
: B
:= True) is
5436 end Set_Is_Constructor
;
5438 procedure Set_Is_Controlled_Active
(Id
: E
; V
: B
:= True) is
5440 pragma Assert
(Id
= Base_Type
(Id
));
5442 end Set_Is_Controlled_Active
;
5444 procedure Set_Is_Controlling_Formal
(Id
: E
; V
: B
:= True) is
5446 pragma Assert
(Is_Formal
(Id
));
5448 end Set_Is_Controlling_Formal
;
5450 procedure Set_Is_CPP_Class
(Id
: E
; V
: B
:= True) is
5453 end Set_Is_CPP_Class
;
5455 procedure Set_Is_DIC_Procedure
(Id
: E
; V
: B
:= True) is
5457 pragma Assert
(Ekind
(Id
) = E_Procedure
);
5458 Set_Flag132
(Id
, V
);
5459 end Set_Is_DIC_Procedure
;
5461 procedure Set_Is_Descendant_Of_Address
(Id
: E
; V
: B
:= True) is
5463 pragma Assert
(Is_Type
(Id
));
5464 Set_Flag223
(Id
, V
);
5465 end Set_Is_Descendant_Of_Address
;
5467 procedure Set_Is_Discrim_SO_Function
(Id
: E
; V
: B
:= True) is
5469 Set_Flag176
(Id
, V
);
5470 end Set_Is_Discrim_SO_Function
;
5472 procedure Set_Is_Discriminant_Check_Function
(Id
: E
; V
: B
:= True) is
5474 Set_Flag264
(Id
, V
);
5475 end Set_Is_Discriminant_Check_Function
;
5477 procedure Set_Is_Dispatch_Table_Entity
(Id
: E
; V
: B
:= True) is
5479 Set_Flag234
(Id
, V
);
5480 end Set_Is_Dispatch_Table_Entity
;
5482 procedure Set_Is_Dispatching_Operation
(Id
: E
; V
: B
:= True) is
5487 Is_Overloadable
(Id
)
5489 Ekind
(Id
) = E_Subprogram_Type
);
5492 end Set_Is_Dispatching_Operation
;
5494 procedure Set_Is_Elaboration_Checks_OK_Id
(Id
: E
; V
: B
:= True) is
5496 pragma Assert
(Is_Elaboration_Target
(Id
));
5497 Set_Flag148
(Id
, V
);
5498 end Set_Is_Elaboration_Checks_OK_Id
;
5500 procedure Set_Is_Elaboration_Warnings_OK_Id
(Id
: E
; V
: B
:= True) is
5502 pragma Assert
(Is_Elaboration_Target
(Id
));
5503 Set_Flag304
(Id
, V
);
5504 end Set_Is_Elaboration_Warnings_OK_Id
;
5506 procedure Set_Is_Eliminated
(Id
: E
; V
: B
:= True) is
5508 Set_Flag124
(Id
, V
);
5509 end Set_Is_Eliminated
;
5511 procedure Set_Is_Entry_Formal
(Id
: E
; V
: B
:= True) is
5514 end Set_Is_Entry_Formal
;
5516 procedure Set_Is_Entry_Wrapper
(Id
: E
; V
: B
:= True) is
5518 Set_Flag297
(Id
, V
);
5519 end Set_Is_Entry_Wrapper
;
5521 procedure Set_Is_Exception_Handler
(Id
: E
; V
: B
:= True) is
5523 pragma Assert
(Ekind
(Id
) = E_Block
);
5524 Set_Flag286
(Id
, V
);
5525 end Set_Is_Exception_Handler
;
5527 procedure Set_Is_Exported
(Id
: E
; V
: B
:= True) is
5530 end Set_Is_Exported
;
5532 procedure Set_Is_Finalized_Transient
(Id
: E
; V
: B
:= True) is
5534 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Loop_Parameter
, E_Variable
));
5535 Set_Flag252
(Id
, V
);
5536 end Set_Is_Finalized_Transient
;
5538 procedure Set_Is_First_Subtype
(Id
: E
; V
: B
:= True) is
5541 end Set_Is_First_Subtype
;
5543 procedure Set_Is_For_Access_Subtype
(Id
: E
; V
: B
:= True) is
5545 pragma Assert
(Ekind_In
(Id
, E_Record_Subtype
, E_Private_Subtype
));
5546 Set_Flag118
(Id
, V
);
5547 end Set_Is_For_Access_Subtype
;
5549 procedure Set_Is_Formal_Subprogram
(Id
: E
; V
: B
:= True) is
5551 Set_Flag111
(Id
, V
);
5552 end Set_Is_Formal_Subprogram
;
5554 procedure Set_Is_Frozen
(Id
: E
; V
: B
:= True) is
5556 pragma Assert
(Nkind
(Id
) in N_Entity
);
5560 procedure Set_Is_Generic_Actual_Subprogram
(Id
: E
; V
: B
:= True) is
5562 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
5563 Set_Flag274
(Id
, V
);
5564 end Set_Is_Generic_Actual_Subprogram
;
5566 procedure Set_Is_Generic_Actual_Type
(Id
: E
; V
: B
:= True) is
5568 pragma Assert
(Is_Type
(Id
));
5570 end Set_Is_Generic_Actual_Type
;
5572 procedure Set_Is_Generic_Instance
(Id
: E
; V
: B
:= True) is
5574 Set_Flag130
(Id
, V
);
5575 end Set_Is_Generic_Instance
;
5577 procedure Set_Is_Generic_Type
(Id
: E
; V
: B
:= True) is
5579 pragma Assert
(Nkind
(Id
) in N_Entity
);
5581 end Set_Is_Generic_Type
;
5583 procedure Set_Is_Hidden
(Id
: E
; V
: B
:= True) is
5588 procedure Set_Is_Hidden_Non_Overridden_Subpgm
(Id
: E
; V
: B
:= True) is
5590 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
5592 end Set_Is_Hidden_Non_Overridden_Subpgm
;
5594 procedure Set_Is_Hidden_Open_Scope
(Id
: E
; V
: B
:= True) is
5596 Set_Flag171
(Id
, V
);
5597 end Set_Is_Hidden_Open_Scope
;
5599 procedure Set_Is_Ignored_Ghost_Entity
(Id
: E
; V
: B
:= True) is
5601 -- Allow this attribute to appear on unanalyzed entities
5603 pragma Assert
(Nkind
(Id
) in N_Entity
5604 or else Ekind
(Id
) = E_Void
);
5605 Set_Flag278
(Id
, V
);
5606 end Set_Is_Ignored_Ghost_Entity
;
5608 procedure Set_Is_Ignored_Transient
(Id
: E
; V
: B
:= True) is
5610 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Loop_Parameter
, E_Variable
));
5611 Set_Flag295
(Id
, V
);
5612 end Set_Is_Ignored_Transient
;
5614 procedure Set_Is_Immediately_Visible
(Id
: E
; V
: B
:= True) is
5616 pragma Assert
(Nkind
(Id
) in N_Entity
);
5618 end Set_Is_Immediately_Visible
;
5620 procedure Set_Is_Implementation_Defined
(Id
: E
; V
: B
:= True) is
5622 Set_Flag254
(Id
, V
);
5623 end Set_Is_Implementation_Defined
;
5625 procedure Set_Is_Imported
(Id
: E
; V
: B
:= True) is
5628 end Set_Is_Imported
;
5630 procedure Set_Is_Independent
(Id
: E
; V
: B
:= True) is
5632 Set_Flag268
(Id
, V
);
5633 end Set_Is_Independent
;
5635 procedure Set_Is_Initial_Condition_Procedure
(Id
: E
; V
: B
:= True) is
5637 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
5638 Set_Flag302
(Id
, V
);
5639 end Set_Is_Initial_Condition_Procedure
;
5641 procedure Set_Is_Inlined
(Id
: E
; V
: B
:= True) is
5646 procedure Set_Is_Inlined_Always
(Id
: E
; V
: B
:= True) is
5648 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
5650 end Set_Is_Inlined_Always
;
5652 procedure Set_Is_Interface
(Id
: E
; V
: B
:= True) is
5654 pragma Assert
(Is_Record_Type
(Id
));
5655 Set_Flag186
(Id
, V
);
5656 end Set_Is_Interface
;
5658 procedure Set_Is_Instantiated
(Id
: E
; V
: B
:= True) is
5660 Set_Flag126
(Id
, V
);
5661 end Set_Is_Instantiated
;
5663 procedure Set_Is_Internal
(Id
: E
; V
: B
:= True) is
5665 pragma Assert
(Nkind
(Id
) in N_Entity
);
5667 end Set_Is_Internal
;
5669 procedure Set_Is_Interrupt_Handler
(Id
: E
; V
: B
:= True) is
5671 pragma Assert
(Nkind
(Id
) in N_Entity
);
5673 end Set_Is_Interrupt_Handler
;
5675 procedure Set_Is_Intrinsic_Subprogram
(Id
: E
; V
: B
:= True) is
5678 end Set_Is_Intrinsic_Subprogram
;
5680 procedure Set_Is_Invariant_Procedure
(Id
: E
; V
: B
:= True) is
5682 pragma Assert
(Ekind
(Id
) = E_Procedure
);
5683 Set_Flag257
(Id
, V
);
5684 end Set_Is_Invariant_Procedure
;
5686 procedure Set_Is_Itype
(Id
: E
; V
: B
:= True) is
5691 procedure Set_Is_Known_Non_Null
(Id
: E
; V
: B
:= True) is
5694 end Set_Is_Known_Non_Null
;
5696 procedure Set_Is_Known_Null
(Id
: E
; V
: B
:= True) is
5698 Set_Flag204
(Id
, V
);
5699 end Set_Is_Known_Null
;
5701 procedure Set_Is_Known_Valid
(Id
: E
; V
: B
:= True) is
5703 Set_Flag170
(Id
, V
);
5704 end Set_Is_Known_Valid
;
5706 procedure Set_Is_Limited_Composite
(Id
: E
; V
: B
:= True) is
5708 pragma Assert
(Is_Type
(Id
));
5709 Set_Flag106
(Id
, V
);
5710 end Set_Is_Limited_Composite
;
5712 procedure Set_Is_Limited_Interface
(Id
: E
; V
: B
:= True) is
5714 pragma Assert
(Is_Interface
(Id
));
5715 Set_Flag197
(Id
, V
);
5716 end Set_Is_Limited_Interface
;
5718 procedure Set_Is_Limited_Record
(Id
: E
; V
: B
:= True) is
5721 end Set_Is_Limited_Record
;
5723 procedure Set_Is_Loop_Parameter
(Id
: E
; V
: B
:= True) is
5725 Set_Flag307
(Id
, V
);
5726 end Set_Is_Loop_Parameter
;
5728 procedure Set_Is_Machine_Code_Subprogram
(Id
: E
; V
: B
:= True) is
5730 pragma Assert
(Is_Subprogram
(Id
));
5731 Set_Flag137
(Id
, V
);
5732 end Set_Is_Machine_Code_Subprogram
;
5734 procedure Set_Is_Non_Static_Subtype
(Id
: E
; V
: B
:= True) is
5736 pragma Assert
(Is_Type
(Id
));
5737 Set_Flag109
(Id
, V
);
5738 end Set_Is_Non_Static_Subtype
;
5740 procedure Set_Is_Null_Init_Proc
(Id
: E
; V
: B
:= True) is
5742 pragma Assert
(Ekind
(Id
) = E_Procedure
);
5743 Set_Flag178
(Id
, V
);
5744 end Set_Is_Null_Init_Proc
;
5746 procedure Set_Is_Obsolescent
(Id
: E
; V
: B
:= True) is
5748 Set_Flag153
(Id
, V
);
5749 end Set_Is_Obsolescent
;
5751 procedure Set_Is_Only_Out_Parameter
(Id
: E
; V
: B
:= True) is
5753 pragma Assert
(Ekind
(Id
) = E_Out_Parameter
);
5754 Set_Flag226
(Id
, V
);
5755 end Set_Is_Only_Out_Parameter
;
5757 procedure Set_Is_Package_Body_Entity
(Id
: E
; V
: B
:= True) is
5759 Set_Flag160
(Id
, V
);
5760 end Set_Is_Package_Body_Entity
;
5762 procedure Set_Is_Packed
(Id
: E
; V
: B
:= True) is
5764 pragma Assert
(Id
= Base_Type
(Id
));
5768 procedure Set_Is_Packed_Array_Impl_Type
(Id
: E
; V
: B
:= True) is
5770 Set_Flag138
(Id
, V
);
5771 end Set_Is_Packed_Array_Impl_Type
;
5773 procedure Set_Is_Param_Block_Component_Type
(Id
: E
; V
: B
:= True) is
5775 pragma Assert
(Ekind_In
(Id
, E_Void
, E_General_Access_Type
));
5776 Set_Flag215
(Id
, V
);
5777 end Set_Is_Param_Block_Component_Type
;
5779 procedure Set_Is_Partial_Invariant_Procedure
(Id
: E
; V
: B
:= True) is
5781 pragma Assert
(Ekind
(Id
) = E_Procedure
);
5782 Set_Flag292
(Id
, V
);
5783 end Set_Is_Partial_Invariant_Procedure
;
5785 procedure Set_Is_Potentially_Use_Visible
(Id
: E
; V
: B
:= True) is
5787 pragma Assert
(Nkind
(Id
) in N_Entity
);
5789 end Set_Is_Potentially_Use_Visible
;
5791 procedure Set_Is_Predicate_Function
(Id
: E
; V
: B
:= True) is
5793 pragma Assert
(Ekind
(Id
) = E_Function
);
5794 Set_Flag255
(Id
, V
);
5795 end Set_Is_Predicate_Function
;
5797 procedure Set_Is_Predicate_Function_M
(Id
: E
; V
: B
:= True) is
5799 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
5800 Set_Flag256
(Id
, V
);
5801 end Set_Is_Predicate_Function_M
;
5803 procedure Set_Is_Preelaborated
(Id
: E
; V
: B
:= True) is
5806 end Set_Is_Preelaborated
;
5808 procedure Set_Is_Primitive
(Id
: E
; V
: B
:= True) is
5811 (Is_Overloadable
(Id
)
5812 or else Ekind_In
(Id
, E_Generic_Function
, E_Generic_Procedure
));
5813 Set_Flag218
(Id
, V
);
5814 end Set_Is_Primitive
;
5816 procedure Set_Is_Primitive_Wrapper
(Id
: E
; V
: B
:= True) is
5818 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
5819 Set_Flag195
(Id
, V
);
5820 end Set_Is_Primitive_Wrapper
;
5822 procedure Set_Is_Private_Composite
(Id
: E
; V
: B
:= True) is
5824 pragma Assert
(Is_Type
(Id
));
5825 Set_Flag107
(Id
, V
);
5826 end Set_Is_Private_Composite
;
5828 procedure Set_Is_Private_Descendant
(Id
: E
; V
: B
:= True) is
5831 end Set_Is_Private_Descendant
;
5833 procedure Set_Is_Private_Primitive
(Id
: E
; V
: B
:= True) is
5835 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
5836 Set_Flag245
(Id
, V
);
5837 end Set_Is_Private_Primitive
;
5839 procedure Set_Is_Public
(Id
: E
; V
: B
:= True) is
5841 pragma Assert
(Nkind
(Id
) in N_Entity
);
5845 procedure Set_Is_Pure
(Id
: E
; V
: B
:= True) is
5850 procedure Set_Is_Pure_Unit_Access_Type
(Id
: E
; V
: B
:= True) is
5852 pragma Assert
(Is_Access_Type
(Id
));
5853 Set_Flag189
(Id
, V
);
5854 end Set_Is_Pure_Unit_Access_Type
;
5856 procedure Set_Is_RACW_Stub_Type
(Id
: E
; V
: B
:= True) is
5858 pragma Assert
(Is_Type
(Id
));
5859 Set_Flag244
(Id
, V
);
5860 end Set_Is_RACW_Stub_Type
;
5862 procedure Set_Is_Raised
(Id
: E
; V
: B
:= True) is
5864 pragma Assert
(Ekind
(Id
) = E_Exception
);
5865 Set_Flag224
(Id
, V
);
5868 procedure Set_Is_Remote_Call_Interface
(Id
: E
; V
: B
:= True) is
5871 end Set_Is_Remote_Call_Interface
;
5873 procedure Set_Is_Remote_Types
(Id
: E
; V
: B
:= True) is
5876 end Set_Is_Remote_Types
;
5878 procedure Set_Is_Renaming_Of_Object
(Id
: E
; V
: B
:= True) is
5880 Set_Flag112
(Id
, V
);
5881 end Set_Is_Renaming_Of_Object
;
5883 procedure Set_Is_Return_Object
(Id
: E
; V
: B
:= True) is
5885 Set_Flag209
(Id
, V
);
5886 end Set_Is_Return_Object
;
5888 procedure Set_Is_Safe_To_Reevaluate
(Id
: E
; V
: B
:= True) is
5890 pragma Assert
(Ekind
(Id
) = E_Variable
);
5891 Set_Flag249
(Id
, V
);
5892 end Set_Is_Safe_To_Reevaluate
;
5894 procedure Set_Is_Shared_Passive
(Id
: E
; V
: B
:= True) is
5897 end Set_Is_Shared_Passive
;
5899 procedure Set_Is_Static_Type
(Id
: E
; V
: B
:= True) is
5901 pragma Assert
(Is_Type
(Id
));
5902 Set_Flag281
(Id
, V
);
5903 end Set_Is_Static_Type
;
5905 procedure Set_Is_Statically_Allocated
(Id
: E
; V
: B
:= True) is
5909 or else Ekind_In
(Id
, E_Exception
,
5914 end Set_Is_Statically_Allocated
;
5916 procedure Set_Is_Tag
(Id
: E
; V
: B
:= True) is
5918 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Constant
, E_Variable
));
5922 procedure Set_Is_Tagged_Type
(Id
: E
; V
: B
:= True) is
5925 end Set_Is_Tagged_Type
;
5927 procedure Set_Is_Thunk
(Id
: E
; V
: B
:= True) is
5929 pragma Assert
(Is_Subprogram
(Id
));
5930 Set_Flag225
(Id
, V
);
5933 procedure Set_Is_Trivial_Subprogram
(Id
: E
; V
: B
:= True) is
5935 Set_Flag235
(Id
, V
);
5936 end Set_Is_Trivial_Subprogram
;
5938 procedure Set_Is_True_Constant
(Id
: E
; V
: B
:= True) is
5940 Set_Flag163
(Id
, V
);
5941 end Set_Is_True_Constant
;
5943 procedure Set_Is_Unchecked_Union
(Id
: E
; V
: B
:= True) is
5945 pragma Assert
(Id
= Base_Type
(Id
));
5946 Set_Flag117
(Id
, V
);
5947 end Set_Is_Unchecked_Union
;
5949 procedure Set_Is_Underlying_Full_View
(Id
: E
; V
: B
:= True) is
5951 pragma Assert
(Is_Type
(Id
));
5952 Set_Flag298
(Id
, V
);
5953 end Set_Is_Underlying_Full_View
;
5955 procedure Set_Is_Underlying_Record_View
(Id
: E
; V
: B
:= True) is
5957 pragma Assert
(Ekind
(Id
) = E_Record_Type
);
5958 Set_Flag246
(Id
, V
);
5959 end Set_Is_Underlying_Record_View
;
5961 procedure Set_Is_Unimplemented
(Id
: E
; V
: B
:= True) is
5963 Set_Flag284
(Id
, V
);
5964 end Set_Is_Unimplemented
;
5966 procedure Set_Is_Unsigned_Type
(Id
: E
; V
: B
:= True) is
5968 pragma Assert
(Is_Discrete_Or_Fixed_Point_Type
(Id
));
5969 Set_Flag144
(Id
, V
);
5970 end Set_Is_Unsigned_Type
;
5972 procedure Set_Is_Uplevel_Referenced_Entity
(Id
: E
; V
: B
:= True) is
5975 (Ekind_In
(Id
, E_Constant
, E_Loop_Parameter
, E_Variable
)
5976 or else Is_Formal
(Id
)
5977 or else Is_Type
(Id
));
5978 Set_Flag283
(Id
, V
);
5979 end Set_Is_Uplevel_Referenced_Entity
;
5981 procedure Set_Is_Valued_Procedure
(Id
: E
; V
: B
:= True) is
5983 pragma Assert
(Ekind
(Id
) = E_Procedure
);
5984 Set_Flag127
(Id
, V
);
5985 end Set_Is_Valued_Procedure
;
5987 procedure Set_Is_Visible_Formal
(Id
: E
; V
: B
:= True) is
5989 Set_Flag206
(Id
, V
);
5990 end Set_Is_Visible_Formal
;
5992 procedure Set_Is_Visible_Lib_Unit
(Id
: E
; V
: B
:= True) is
5994 Set_Flag116
(Id
, V
);
5995 end Set_Is_Visible_Lib_Unit
;
5997 procedure Set_Is_Volatile
(Id
: E
; V
: B
:= True) is
5999 pragma Assert
(Nkind
(Id
) in N_Entity
);
6001 end Set_Is_Volatile
;
6003 procedure Set_Is_Volatile_Full_Access
(Id
: E
; V
: B
:= True) is
6005 Set_Flag285
(Id
, V
);
6006 end Set_Is_Volatile_Full_Access
;
6008 procedure Set_Itype_Printed
(Id
: E
; V
: B
:= True) is
6010 pragma Assert
(Is_Itype
(Id
));
6011 Set_Flag202
(Id
, V
);
6012 end Set_Itype_Printed
;
6014 procedure Set_Kill_Elaboration_Checks
(Id
: E
; V
: B
:= True) is
6017 end Set_Kill_Elaboration_Checks
;
6019 procedure Set_Kill_Range_Checks
(Id
: E
; V
: B
:= True) is
6022 end Set_Kill_Range_Checks
;
6024 procedure Set_Known_To_Have_Preelab_Init
(Id
: E
; V
: B
:= True) is
6026 pragma Assert
(Is_Type
(Id
));
6027 Set_Flag207
(Id
, V
);
6028 end Set_Known_To_Have_Preelab_Init
;
6030 procedure Set_Last_Aggregate_Assignment
(Id
: E
; V
: N
) is
6032 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
6034 end Set_Last_Aggregate_Assignment
;
6036 procedure Set_Last_Assignment
(Id
: E
; V
: N
) is
6038 pragma Assert
(Is_Assignable
(Id
));
6040 end Set_Last_Assignment
;
6042 procedure Set_Last_Entity
(Id
: E
; V
: E
) is
6045 end Set_Last_Entity
;
6047 procedure Set_Limited_View
(Id
: E
; V
: E
) is
6049 pragma Assert
(Ekind
(Id
) = E_Package
);
6051 end Set_Limited_View
;
6053 procedure Set_Linker_Section_Pragma
(Id
: E
; V
: N
) is
6056 (Is_Object
(Id
) or else Is_Subprogram
(Id
) or else Is_Type
(Id
));
6058 end Set_Linker_Section_Pragma
;
6060 procedure Set_Lit_Indexes
(Id
: E
; V
: E
) is
6062 pragma Assert
(Is_Enumeration_Type
(Id
) and then Root_Type
(Id
) = Id
);
6064 end Set_Lit_Indexes
;
6066 procedure Set_Lit_Strings
(Id
: E
; V
: E
) is
6068 pragma Assert
(Is_Enumeration_Type
(Id
) and then Root_Type
(Id
) = Id
);
6070 end Set_Lit_Strings
;
6072 procedure Set_Low_Bound_Tested
(Id
: E
; V
: B
:= True) is
6074 pragma Assert
(Is_Formal
(Id
));
6075 Set_Flag205
(Id
, V
);
6076 end Set_Low_Bound_Tested
;
6078 procedure Set_Machine_Radix_10
(Id
: E
; V
: B
:= True) is
6080 pragma Assert
(Is_Decimal_Fixed_Point_Type
(Id
));
6082 end Set_Machine_Radix_10
;
6084 procedure Set_Master_Id
(Id
: E
; V
: E
) is
6086 pragma Assert
(Is_Access_Type
(Id
));
6090 procedure Set_Materialize_Entity
(Id
: E
; V
: B
:= True) is
6092 Set_Flag168
(Id
, V
);
6093 end Set_Materialize_Entity
;
6095 procedure Set_May_Inherit_Delayed_Rep_Aspects
(Id
: E
; V
: B
:= True) is
6097 Set_Flag262
(Id
, V
);
6098 end Set_May_Inherit_Delayed_Rep_Aspects
;
6100 procedure Set_Mechanism
(Id
: E
; V
: M
) is
6102 pragma Assert
(Ekind
(Id
) = E_Function
or else Is_Formal
(Id
));
6103 Set_Uint8
(Id
, UI_From_Int
(V
));
6106 procedure Set_Modulus
(Id
: E
; V
: U
) is
6108 pragma Assert
(Ekind
(Id
) = E_Modular_Integer_Type
);
6112 procedure Set_Must_Be_On_Byte_Boundary
(Id
: E
; V
: B
:= True) is
6114 pragma Assert
(Is_Type
(Id
));
6115 Set_Flag183
(Id
, V
);
6116 end Set_Must_Be_On_Byte_Boundary
;
6118 procedure Set_Must_Have_Preelab_Init
(Id
: E
; V
: B
:= True) is
6120 pragma Assert
(Is_Type
(Id
));
6121 Set_Flag208
(Id
, V
);
6122 end Set_Must_Have_Preelab_Init
;
6124 procedure Set_Needs_Activation_Record
(Id
: E
; V
: B
:= True) is
6126 Set_Flag306
(Id
, V
);
6127 end Set_Needs_Activation_Record
;
6129 procedure Set_Needs_Debug_Info
(Id
: E
; V
: B
:= True) is
6131 Set_Flag147
(Id
, V
);
6132 end Set_Needs_Debug_Info
;
6134 procedure Set_Needs_No_Actuals
(Id
: E
; V
: B
:= True) is
6137 (Is_Overloadable
(Id
)
6138 or else Ekind_In
(Id
, E_Subprogram_Type
, E_Entry_Family
));
6140 end Set_Needs_No_Actuals
;
6142 procedure Set_Never_Set_In_Source
(Id
: E
; V
: B
:= True) is
6144 Set_Flag115
(Id
, V
);
6145 end Set_Never_Set_In_Source
;
6147 procedure Set_Next_Inlined_Subprogram
(Id
: E
; V
: E
) is
6150 end Set_Next_Inlined_Subprogram
;
6152 procedure Set_No_Dynamic_Predicate_On_Actual
(Id
: E
; V
: B
:= True) is
6154 pragma Assert
(Is_Discrete_Type
(Id
));
6155 Set_Flag276
(Id
, V
);
6156 end Set_No_Dynamic_Predicate_On_Actual
;
6158 procedure Set_No_Pool_Assigned
(Id
: E
; V
: B
:= True) is
6160 pragma Assert
(Is_Access_Type
(Id
) and then Is_Base_Type
(Id
));
6161 Set_Flag131
(Id
, V
);
6162 end Set_No_Pool_Assigned
;
6164 procedure Set_No_Predicate_On_Actual
(Id
: E
; V
: B
:= True) is
6166 pragma Assert
(Is_Discrete_Type
(Id
));
6167 Set_Flag275
(Id
, V
);
6168 end Set_No_Predicate_On_Actual
;
6170 procedure Set_No_Reordering
(Id
: E
; V
: B
:= True) is
6172 pragma Assert
(Is_Record_Type
(Id
) and then Is_Base_Type
(Id
));
6173 Set_Flag239
(Id
, V
);
6174 end Set_No_Reordering
;
6176 procedure Set_No_Return
(Id
: E
; V
: B
:= True) is
6179 (V
= False or else Ekind_In
(Id
, E_Procedure
, E_Generic_Procedure
));
6180 Set_Flag113
(Id
, V
);
6183 procedure Set_No_Strict_Aliasing
(Id
: E
; V
: B
:= True) is
6185 pragma Assert
(Is_Access_Type
(Id
) and then Is_Base_Type
(Id
));
6186 Set_Flag136
(Id
, V
);
6187 end Set_No_Strict_Aliasing
;
6189 procedure Set_No_Tagged_Streams_Pragma
(Id
: E
; V
: E
) is
6191 pragma Assert
(Is_Tagged_Type
(Id
));
6193 end Set_No_Tagged_Streams_Pragma
;
6195 procedure Set_Non_Binary_Modulus
(Id
: E
; V
: B
:= True) is
6197 pragma Assert
(Is_Type
(Id
) and then Is_Base_Type
(Id
));
6199 end Set_Non_Binary_Modulus
;
6201 procedure Set_Non_Limited_View
(Id
: E
; V
: E
) is
6204 (Ekind
(Id
) in Incomplete_Kind
6205 or else Ekind_In
(Id
, E_Abstract_State
, E_Class_Wide_Type
));
6207 end Set_Non_Limited_View
;
6209 procedure Set_Nonzero_Is_True
(Id
: E
; V
: B
:= True) is
6212 (Root_Type
(Id
) = Standard_Boolean
6213 and then Ekind
(Id
) = E_Enumeration_Type
);
6214 Set_Flag162
(Id
, V
);
6215 end Set_Nonzero_Is_True
;
6217 procedure Set_Normalized_First_Bit
(Id
: E
; V
: U
) is
6219 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
6221 end Set_Normalized_First_Bit
;
6223 procedure Set_Normalized_Position
(Id
: E
; V
: U
) is
6225 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
6227 end Set_Normalized_Position
;
6229 procedure Set_Normalized_Position_Max
(Id
: E
; V
: U
) is
6231 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
6233 end Set_Normalized_Position_Max
;
6235 procedure Set_OK_To_Rename
(Id
: E
; V
: B
:= True) is
6237 pragma Assert
(Ekind
(Id
) = E_Variable
);
6238 Set_Flag247
(Id
, V
);
6239 end Set_OK_To_Rename
;
6241 procedure Set_Optimize_Alignment_Space
(Id
: E
; V
: B
:= True) is
6244 (Is_Type
(Id
) or else Ekind_In
(Id
, E_Constant
, E_Variable
));
6245 Set_Flag241
(Id
, V
);
6246 end Set_Optimize_Alignment_Space
;
6248 procedure Set_Optimize_Alignment_Time
(Id
: E
; V
: B
:= True) is
6251 (Is_Type
(Id
) or else Ekind_In
(Id
, E_Constant
, E_Variable
));
6252 Set_Flag242
(Id
, V
);
6253 end Set_Optimize_Alignment_Time
;
6255 procedure Set_Original_Access_Type
(Id
: E
; V
: E
) is
6257 pragma Assert
(Ekind
(Id
) = E_Access_Subprogram_Type
);
6259 end Set_Original_Access_Type
;
6261 procedure Set_Original_Array_Type
(Id
: E
; V
: E
) is
6263 pragma Assert
(Is_Array_Type
(Id
) or else Is_Modular_Integer_Type
(Id
));
6265 end Set_Original_Array_Type
;
6267 procedure Set_Original_Protected_Subprogram
(Id
: E
; V
: N
) is
6269 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
6271 end Set_Original_Protected_Subprogram
;
6273 procedure Set_Original_Record_Component
(Id
: E
; V
: E
) is
6275 pragma Assert
(Ekind_In
(Id
, E_Void
, E_Component
, E_Discriminant
));
6277 end Set_Original_Record_Component
;
6279 procedure Set_Overlays_Constant
(Id
: E
; V
: B
:= True) is
6281 Set_Flag243
(Id
, V
);
6282 end Set_Overlays_Constant
;
6284 procedure Set_Overridden_Operation
(Id
: E
; V
: E
) is
6286 pragma Assert
(Is_Subprogram
(Id
) or else Is_Generic_Subprogram
(Id
));
6288 end Set_Overridden_Operation
;
6290 procedure Set_Package_Instantiation
(Id
: E
; V
: N
) is
6292 pragma Assert
(Ekind_In
(Id
, E_Void
, E_Generic_Package
, E_Package
));
6294 end Set_Package_Instantiation
;
6296 procedure Set_Packed_Array_Impl_Type
(Id
: E
; V
: E
) is
6298 pragma Assert
(Is_Array_Type
(Id
));
6300 end Set_Packed_Array_Impl_Type
;
6302 procedure Set_Parent_Subtype
(Id
: E
; V
: E
) is
6304 pragma Assert
(Ekind
(Id
) = E_Record_Type
);
6306 end Set_Parent_Subtype
;
6308 procedure Set_Part_Of_Constituents
(Id
: E
; V
: L
) is
6310 pragma Assert
(Ekind_In
(Id
, E_Abstract_State
, E_Variable
));
6311 Set_Elist10
(Id
, V
);
6312 end Set_Part_Of_Constituents
;
6314 procedure Set_Part_Of_References
(Id
: E
; V
: L
) is
6316 pragma Assert
(Ekind
(Id
) = E_Variable
);
6317 Set_Elist11
(Id
, V
);
6318 end Set_Part_Of_References
;
6320 procedure Set_Partial_View_Has_Unknown_Discr
(Id
: E
; V
: B
:= True) is
6322 pragma Assert
(Is_Type
(Id
));
6323 Set_Flag280
(Id
, V
);
6324 end Set_Partial_View_Has_Unknown_Discr
;
6326 procedure Set_Pending_Access_Types
(Id
: E
; V
: L
) is
6328 pragma Assert
(Is_Type
(Id
));
6329 Set_Elist15
(Id
, V
);
6330 end Set_Pending_Access_Types
;
6332 procedure Set_Postconditions_Proc
(Id
: E
; V
: E
) is
6334 pragma Assert
(Ekind_In
(Id
, E_Entry
,
6339 end Set_Postconditions_Proc
;
6341 procedure Set_Predicated_Parent
(Id
: E
; V
: E
) is
6343 pragma Assert
(Ekind_In
(Id
, E_Array_Subtype
,
6345 E_Record_Subtype_With_Private
));
6347 end Set_Predicated_Parent
;
6349 procedure Set_Predicates_Ignored
(Id
: E
; V
: B
) is
6351 pragma Assert
(Is_Type
(Id
));
6352 Set_Flag288
(Id
, V
);
6353 end Set_Predicates_Ignored
;
6355 procedure Set_Direct_Primitive_Operations
(Id
: E
; V
: L
) is
6357 pragma Assert
(Is_Tagged_Type
(Id
));
6358 Set_Elist10
(Id
, V
);
6359 end Set_Direct_Primitive_Operations
;
6361 procedure Set_Prival
(Id
: E
; V
: E
) is
6363 pragma Assert
(Is_Protected_Component
(Id
));
6367 procedure Set_Prival_Link
(Id
: E
; V
: E
) is
6369 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
6371 end Set_Prival_Link
;
6373 procedure Set_Private_Dependents
(Id
: E
; V
: L
) is
6375 pragma Assert
(Is_Incomplete_Or_Private_Type
(Id
));
6376 Set_Elist18
(Id
, V
);
6377 end Set_Private_Dependents
;
6379 procedure Set_Private_View
(Id
: E
; V
: N
) is
6381 pragma Assert
(Is_Private_Type
(Id
));
6383 end Set_Private_View
;
6385 procedure Set_Prev_Entity
(Id
: E
; V
: E
) is
6388 end Set_Prev_Entity
;
6390 procedure Set_Protected_Body_Subprogram
(Id
: E
; V
: E
) is
6392 pragma Assert
(Is_Subprogram
(Id
) or else Is_Entry
(Id
));
6394 end Set_Protected_Body_Subprogram
;
6396 procedure Set_Protected_Formal
(Id
: E
; V
: E
) is
6398 pragma Assert
(Is_Formal
(Id
));
6400 end Set_Protected_Formal
;
6402 procedure Set_Protected_Subprogram
(Id
: E
; V
: E
) is
6404 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
6406 end Set_Protected_Subprogram
;
6408 procedure Set_Protection_Object
(Id
: E
; V
: E
) is
6410 pragma Assert
(Ekind_In
(Id
, E_Entry
,
6415 end Set_Protection_Object
;
6417 procedure Set_Reachable
(Id
: E
; V
: B
:= True) is
6422 procedure Set_Receiving_Entry
(Id
: E
; V
: E
) is
6424 pragma Assert
(Ekind
(Id
) = E_Procedure
);
6426 end Set_Receiving_Entry
;
6428 procedure Set_Referenced
(Id
: E
; V
: B
:= True) is
6430 Set_Flag156
(Id
, V
);
6433 procedure Set_Referenced_As_LHS
(Id
: E
; V
: B
:= True) is
6436 end Set_Referenced_As_LHS
;
6438 procedure Set_Referenced_As_Out_Parameter
(Id
: E
; V
: B
:= True) is
6440 Set_Flag227
(Id
, V
);
6441 end Set_Referenced_As_Out_Parameter
;
6443 procedure Set_Refinement_Constituents
(Id
: E
; V
: L
) is
6445 pragma Assert
(Ekind
(Id
) = E_Abstract_State
);
6447 end Set_Refinement_Constituents
;
6449 procedure Set_Register_Exception_Call
(Id
: E
; V
: N
) is
6451 pragma Assert
(Ekind
(Id
) = E_Exception
);
6453 end Set_Register_Exception_Call
;
6455 procedure Set_Related_Array_Object
(Id
: E
; V
: E
) is
6457 pragma Assert
(Is_Array_Type
(Id
));
6459 end Set_Related_Array_Object
;
6461 procedure Set_Related_Expression
(Id
: E
; V
: N
) is
6463 pragma Assert
(Ekind
(Id
) in Type_Kind
6464 or else Ekind_In
(Id
, E_Constant
, E_Variable
, E_Void
));
6466 end Set_Related_Expression
;
6468 procedure Set_Related_Instance
(Id
: E
; V
: E
) is
6470 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Package_Body
));
6472 end Set_Related_Instance
;
6474 procedure Set_Related_Type
(Id
: E
; V
: E
) is
6476 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Constant
, E_Variable
));
6478 end Set_Related_Type
;
6480 procedure Set_Relative_Deadline_Variable
(Id
: E
; V
: E
) is
6482 pragma Assert
(Is_Task_Type
(Id
) and then Is_Base_Type
(Id
));
6484 end Set_Relative_Deadline_Variable
;
6486 procedure Set_Renamed_Entity
(Id
: E
; V
: N
) is
6489 end Set_Renamed_Entity
;
6491 procedure Set_Renamed_In_Spec
(Id
: E
; V
: B
:= True) is
6493 pragma Assert
(Ekind
(Id
) = E_Package
);
6494 Set_Flag231
(Id
, V
);
6495 end Set_Renamed_In_Spec
;
6497 procedure Set_Renamed_Object
(Id
: E
; V
: N
) is
6500 end Set_Renamed_Object
;
6502 procedure Set_Renaming_Map
(Id
: E
; V
: U
) is
6505 end Set_Renaming_Map
;
6507 procedure Set_Requires_Overriding
(Id
: E
; V
: B
:= True) is
6509 pragma Assert
(Is_Overloadable
(Id
));
6510 Set_Flag213
(Id
, V
);
6511 end Set_Requires_Overriding
;
6513 procedure Set_Return_Present
(Id
: E
; V
: B
:= True) is
6516 end Set_Return_Present
;
6518 procedure Set_Return_Applies_To
(Id
: E
; V
: N
) is
6521 end Set_Return_Applies_To
;
6523 procedure Set_Returns_By_Ref
(Id
: E
; V
: B
:= True) is
6526 end Set_Returns_By_Ref
;
6528 procedure Set_Reverse_Bit_Order
(Id
: E
; V
: B
:= True) is
6531 (Is_Record_Type
(Id
) and then Is_Base_Type
(Id
));
6532 Set_Flag164
(Id
, V
);
6533 end Set_Reverse_Bit_Order
;
6535 procedure Set_Reverse_Storage_Order
(Id
: E
; V
: B
:= True) is
6539 and then (Is_Record_Type
(Id
) or else Is_Array_Type
(Id
)));
6541 end Set_Reverse_Storage_Order
;
6543 procedure Set_Rewritten_For_C
(Id
: E
; V
: B
:= True) is
6545 pragma Assert
(Ekind
(Id
) = E_Function
);
6546 Set_Flag287
(Id
, V
);
6547 end Set_Rewritten_For_C
;
6549 procedure Set_RM_Size
(Id
: E
; V
: U
) is
6551 pragma Assert
(Is_Type
(Id
));
6555 procedure Set_Scalar_Range
(Id
: E
; V
: N
) is
6558 end Set_Scalar_Range
;
6560 procedure Set_Scale_Value
(Id
: E
; V
: U
) is
6563 end Set_Scale_Value
;
6565 procedure Set_Scope_Depth_Value
(Id
: E
; V
: U
) is
6567 pragma Assert
(not Is_Record_Type
(Id
));
6569 end Set_Scope_Depth_Value
;
6571 procedure Set_Sec_Stack_Needed_For_Return
(Id
: E
; V
: B
:= True) is
6573 Set_Flag167
(Id
, V
);
6574 end Set_Sec_Stack_Needed_For_Return
;
6576 procedure Set_Shadow_Entities
(Id
: E
; V
: S
) is
6578 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Generic_Package
));
6580 end Set_Shadow_Entities
;
6582 procedure Set_Shared_Var_Procs_Instance
(Id
: E
; V
: E
) is
6584 pragma Assert
(Ekind
(Id
) = E_Variable
);
6586 end Set_Shared_Var_Procs_Instance
;
6588 procedure Set_Size_Check_Code
(Id
: E
; V
: N
) is
6590 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
6592 end Set_Size_Check_Code
;
6594 procedure Set_Size_Depends_On_Discriminant
(Id
: E
; V
: B
:= True) is
6596 Set_Flag177
(Id
, V
);
6597 end Set_Size_Depends_On_Discriminant
;
6599 procedure Set_Size_Known_At_Compile_Time
(Id
: E
; V
: B
:= True) is
6602 end Set_Size_Known_At_Compile_Time
;
6604 procedure Set_Small_Value
(Id
: E
; V
: R
) is
6606 pragma Assert
(Is_Fixed_Point_Type
(Id
));
6607 Set_Ureal21
(Id
, V
);
6608 end Set_Small_Value
;
6610 procedure Set_SPARK_Aux_Pragma
(Id
: E
; V
: N
) is
6613 (Ekind_In
(Id
, E_Protected_Type
, -- concurrent types
6616 Ekind_In
(Id
, E_Generic_Package
, -- packages
6620 end Set_SPARK_Aux_Pragma
;
6622 procedure Set_SPARK_Aux_Pragma_Inherited
(Id
: E
; V
: B
:= True) is
6625 (Ekind_In
(Id
, E_Protected_Type
, -- concurrent types
6628 Ekind_In
(Id
, E_Generic_Package
, -- packages
6631 Set_Flag266
(Id
, V
);
6632 end Set_SPARK_Aux_Pragma_Inherited
;
6634 procedure Set_SPARK_Pragma
(Id
: E
; V
: N
) is
6637 (Ekind_In
(Id
, E_Constant
, -- objects
6640 Ekind_In
(Id
, E_Abstract_State
, -- overloadable
6645 E_Generic_Procedure
,
6650 Ekind_In
(Id
, E_Generic_Package
, -- packages
6654 Ekind
(Id
) = E_Void
-- special purpose
6656 Ekind_In
(Id
, E_Protected_Body
, -- types
6661 end Set_SPARK_Pragma
;
6663 procedure Set_SPARK_Pragma_Inherited
(Id
: E
; V
: B
:= True) is
6666 (Ekind_In
(Id
, E_Constant
, -- objects
6669 Ekind_In
(Id
, E_Abstract_State
, -- overloadable
6674 E_Generic_Procedure
,
6679 Ekind_In
(Id
, E_Generic_Package
, -- packages
6683 Ekind
(Id
) = E_Void
-- special purpose
6685 Ekind_In
(Id
, E_Protected_Body
, -- types
6689 Set_Flag265
(Id
, V
);
6690 end Set_SPARK_Pragma_Inherited
;
6692 procedure Set_Spec_Entity
(Id
: E
; V
: E
) is
6694 pragma Assert
(Ekind
(Id
) = E_Package_Body
or else Is_Formal
(Id
));
6696 end Set_Spec_Entity
;
6698 procedure Set_SSO_Set_High_By_Default
(Id
: E
; V
: B
:= True) is
6702 and then (Is_Record_Type
(Id
) or else Is_Array_Type
(Id
)));
6703 Set_Flag273
(Id
, V
);
6704 end Set_SSO_Set_High_By_Default
;
6706 procedure Set_SSO_Set_Low_By_Default
(Id
: E
; V
: B
:= True) is
6710 and then (Is_Record_Type
(Id
) or else Is_Array_Type
(Id
)));
6711 Set_Flag272
(Id
, V
);
6712 end Set_SSO_Set_Low_By_Default
;
6714 procedure Set_Static_Discrete_Predicate
(Id
: E
; V
: S
) is
6716 pragma Assert
(Is_Discrete_Type
(Id
) and then Has_Predicates
(Id
));
6718 end Set_Static_Discrete_Predicate
;
6720 procedure Set_Static_Real_Or_String_Predicate
(Id
: E
; V
: N
) is
6722 pragma Assert
((Is_Real_Type
(Id
) or else Is_String_Type
(Id
))
6723 and then Has_Predicates
(Id
));
6725 end Set_Static_Real_Or_String_Predicate
;
6727 procedure Set_Status_Flag_Or_Transient_Decl
(Id
: E
; V
: E
) is
6729 pragma Assert
(Ekind_In
(Id
, E_Constant
,
6733 end Set_Status_Flag_Or_Transient_Decl
;
6735 procedure Set_Storage_Size_Variable
(Id
: E
; V
: E
) is
6737 pragma Assert
(Is_Access_Type
(Id
) or else Is_Task_Type
(Id
));
6738 pragma Assert
(Id
= Base_Type
(Id
));
6740 end Set_Storage_Size_Variable
;
6742 procedure Set_Static_Elaboration_Desired
(Id
: E
; V
: B
) is
6744 pragma Assert
(Ekind
(Id
) = E_Package
);
6746 end Set_Static_Elaboration_Desired
;
6748 procedure Set_Static_Initialization
(Id
: E
; V
: N
) is
6751 (Ekind
(Id
) = E_Procedure
and then not Is_Dispatching_Operation
(Id
));
6753 end Set_Static_Initialization
;
6755 procedure Set_Stored_Constraint
(Id
: E
; V
: L
) is
6757 pragma Assert
(Nkind
(Id
) in N_Entity
);
6758 Set_Elist23
(Id
, V
);
6759 end Set_Stored_Constraint
;
6761 procedure Set_Stores_Attribute_Old_Prefix
(Id
: E
; V
: B
:= True) is
6763 pragma Assert
(Ekind
(Id
) = E_Constant
);
6764 Set_Flag270
(Id
, V
);
6765 end Set_Stores_Attribute_Old_Prefix
;
6767 procedure Set_Strict_Alignment
(Id
: E
; V
: B
:= True) is
6769 pragma Assert
(Id
= Base_Type
(Id
));
6770 Set_Flag145
(Id
, V
);
6771 end Set_Strict_Alignment
;
6773 procedure Set_String_Literal_Length
(Id
: E
; V
: U
) is
6775 pragma Assert
(Ekind
(Id
) = E_String_Literal_Subtype
);
6777 end Set_String_Literal_Length
;
6779 procedure Set_String_Literal_Low_Bound
(Id
: E
; V
: N
) is
6781 pragma Assert
(Ekind
(Id
) = E_String_Literal_Subtype
);
6783 end Set_String_Literal_Low_Bound
;
6785 procedure Set_Subprograms_For_Type
(Id
: E
; V
: L
) is
6787 pragma Assert
(Is_Type
(Id
));
6788 Set_Elist29
(Id
, V
);
6789 end Set_Subprograms_For_Type
;
6791 procedure Set_Subps_Index
(Id
: E
; V
: U
) is
6793 pragma Assert
(Is_Subprogram
(Id
));
6795 end Set_Subps_Index
;
6797 procedure Set_Suppress_Elaboration_Warnings
(Id
: E
; V
: B
:= True) is
6799 Set_Flag303
(Id
, V
);
6800 end Set_Suppress_Elaboration_Warnings
;
6802 procedure Set_Suppress_Initialization
(Id
: E
; V
: B
:= True) is
6804 pragma Assert
(Is_Type
(Id
) or else Ekind
(Id
) = E_Variable
);
6805 Set_Flag105
(Id
, V
);
6806 end Set_Suppress_Initialization
;
6808 procedure Set_Suppress_Style_Checks
(Id
: E
; V
: B
:= True) is
6810 Set_Flag165
(Id
, V
);
6811 end Set_Suppress_Style_Checks
;
6813 procedure Set_Suppress_Value_Tracking_On_Call
(Id
: E
; V
: B
:= True) is
6815 Set_Flag217
(Id
, V
);
6816 end Set_Suppress_Value_Tracking_On_Call
;
6818 procedure Set_Task_Body_Procedure
(Id
: E
; V
: N
) is
6820 pragma Assert
(Ekind
(Id
) in Task_Kind
);
6822 end Set_Task_Body_Procedure
;
6824 procedure Set_Thunk_Entity
(Id
: E
; V
: E
) is
6826 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
)
6827 and then Is_Thunk
(Id
));
6829 end Set_Thunk_Entity
;
6831 procedure Set_Treat_As_Volatile
(Id
: E
; V
: B
:= True) is
6834 end Set_Treat_As_Volatile
;
6836 procedure Set_Underlying_Full_View
(Id
: E
; V
: E
) is
6838 pragma Assert
(Ekind
(Id
) in Private_Kind
);
6840 end Set_Underlying_Full_View
;
6842 procedure Set_Underlying_Record_View
(Id
: E
; V
: E
) is
6844 pragma Assert
(Ekind
(Id
) = E_Record_Type
);
6846 end Set_Underlying_Record_View
;
6848 procedure Set_Universal_Aliasing
(Id
: E
; V
: B
:= True) is
6850 pragma Assert
(Is_Type
(Id
) and then Is_Base_Type
(Id
));
6851 Set_Flag216
(Id
, V
);
6852 end Set_Universal_Aliasing
;
6854 procedure Set_Unset_Reference
(Id
: E
; V
: N
) is
6857 end Set_Unset_Reference
;
6859 procedure Set_Used_As_Generic_Actual
(Id
: E
; V
: B
:= True) is
6861 Set_Flag222
(Id
, V
);
6862 end Set_Used_As_Generic_Actual
;
6864 procedure Set_Uses_Lock_Free
(Id
: E
; V
: B
:= True) is
6866 pragma Assert
(Ekind
(Id
) = E_Protected_Type
);
6867 Set_Flag188
(Id
, V
);
6868 end Set_Uses_Lock_Free
;
6870 procedure Set_Uses_Sec_Stack
(Id
: E
; V
: B
:= True) is
6873 end Set_Uses_Sec_Stack
;
6875 procedure Set_Validated_Object
(Id
: E
; V
: N
) is
6877 pragma Assert
(Ekind
(Id
) = E_Variable
);
6879 end Set_Validated_Object
;
6881 procedure Set_Warnings_Off
(Id
: E
; V
: B
:= True) is
6884 end Set_Warnings_Off
;
6886 procedure Set_Warnings_Off_Used
(Id
: E
; V
: B
:= True) is
6888 Set_Flag236
(Id
, V
);
6889 end Set_Warnings_Off_Used
;
6891 procedure Set_Warnings_Off_Used_Unmodified
(Id
: E
; V
: B
:= True) is
6893 Set_Flag237
(Id
, V
);
6894 end Set_Warnings_Off_Used_Unmodified
;
6896 procedure Set_Warnings_Off_Used_Unreferenced
(Id
: E
; V
: B
:= True) is
6898 Set_Flag238
(Id
, V
);
6899 end Set_Warnings_Off_Used_Unreferenced
;
6901 procedure Set_Was_Hidden
(Id
: E
; V
: B
:= True) is
6903 Set_Flag196
(Id
, V
);
6906 procedure Set_Wrapped_Entity
(Id
: E
; V
: E
) is
6908 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
)
6909 and then Is_Primitive_Wrapper
(Id
));
6911 end Set_Wrapped_Entity
;
6913 -----------------------------------
6914 -- Field Initialization Routines --
6915 -----------------------------------
6917 procedure Init_Alignment
(Id
: E
) is
6919 Set_Uint14
(Id
, Uint_0
);
6922 procedure Init_Alignment
(Id
: E
; V
: Int
) is
6924 Set_Uint14
(Id
, UI_From_Int
(V
));
6927 procedure Init_Component_Bit_Offset
(Id
: E
) is
6929 Set_Uint11
(Id
, No_Uint
);
6930 end Init_Component_Bit_Offset
;
6932 procedure Init_Component_Bit_Offset
(Id
: E
; V
: Int
) is
6934 Set_Uint11
(Id
, UI_From_Int
(V
));
6935 end Init_Component_Bit_Offset
;
6937 procedure Init_Component_Size
(Id
: E
) is
6939 Set_Uint22
(Id
, Uint_0
);
6940 end Init_Component_Size
;
6942 procedure Init_Component_Size
(Id
: E
; V
: Int
) is
6944 Set_Uint22
(Id
, UI_From_Int
(V
));
6945 end Init_Component_Size
;
6947 procedure Init_Digits_Value
(Id
: E
) is
6949 Set_Uint17
(Id
, Uint_0
);
6950 end Init_Digits_Value
;
6952 procedure Init_Digits_Value
(Id
: E
; V
: Int
) is
6954 Set_Uint17
(Id
, UI_From_Int
(V
));
6955 end Init_Digits_Value
;
6957 procedure Init_Esize
(Id
: E
) is
6959 Set_Uint12
(Id
, Uint_0
);
6962 procedure Init_Esize
(Id
: E
; V
: Int
) is
6964 Set_Uint12
(Id
, UI_From_Int
(V
));
6967 procedure Init_Normalized_First_Bit
(Id
: E
) is
6969 Set_Uint8
(Id
, No_Uint
);
6970 end Init_Normalized_First_Bit
;
6972 procedure Init_Normalized_First_Bit
(Id
: E
; V
: Int
) is
6974 Set_Uint8
(Id
, UI_From_Int
(V
));
6975 end Init_Normalized_First_Bit
;
6977 procedure Init_Normalized_Position
(Id
: E
) is
6979 Set_Uint14
(Id
, No_Uint
);
6980 end Init_Normalized_Position
;
6982 procedure Init_Normalized_Position
(Id
: E
; V
: Int
) is
6984 Set_Uint14
(Id
, UI_From_Int
(V
));
6985 end Init_Normalized_Position
;
6987 procedure Init_Normalized_Position_Max
(Id
: E
) is
6989 Set_Uint10
(Id
, No_Uint
);
6990 end Init_Normalized_Position_Max
;
6992 procedure Init_Normalized_Position_Max
(Id
: E
; V
: Int
) is
6994 Set_Uint10
(Id
, UI_From_Int
(V
));
6995 end Init_Normalized_Position_Max
;
6997 procedure Init_RM_Size
(Id
: E
) is
6999 Set_Uint13
(Id
, Uint_0
);
7002 procedure Init_RM_Size
(Id
: E
; V
: Int
) is
7004 Set_Uint13
(Id
, UI_From_Int
(V
));
7007 -----------------------------
7008 -- Init_Component_Location --
7009 -----------------------------
7011 procedure Init_Component_Location
(Id
: E
) is
7013 Set_Uint8
(Id
, No_Uint
); -- Normalized_First_Bit
7014 Set_Uint10
(Id
, No_Uint
); -- Normalized_Position_Max
7015 Set_Uint11
(Id
, No_Uint
); -- Component_Bit_Offset
7016 Set_Uint12
(Id
, Uint_0
); -- Esize
7017 Set_Uint14
(Id
, No_Uint
); -- Normalized_Position
7018 end Init_Component_Location
;
7020 ----------------------------
7021 -- Init_Object_Size_Align --
7022 ----------------------------
7024 procedure Init_Object_Size_Align
(Id
: E
) is
7026 Set_Uint12
(Id
, Uint_0
); -- Esize
7027 Set_Uint14
(Id
, Uint_0
); -- Alignment
7028 end Init_Object_Size_Align
;
7034 procedure Init_Size
(Id
: E
; V
: Int
) is
7036 pragma Assert
(not Is_Object
(Id
));
7037 Set_Uint12
(Id
, UI_From_Int
(V
)); -- Esize
7038 Set_Uint13
(Id
, UI_From_Int
(V
)); -- RM_Size
7041 ---------------------
7042 -- Init_Size_Align --
7043 ---------------------
7045 procedure Init_Size_Align
(Id
: E
) is
7047 pragma Assert
(not Is_Object
(Id
));
7048 Set_Uint12
(Id
, Uint_0
); -- Esize
7049 Set_Uint13
(Id
, Uint_0
); -- RM_Size
7050 Set_Uint14
(Id
, Uint_0
); -- Alignment
7051 end Init_Size_Align
;
7053 ----------------------------------------------
7054 -- Type Representation Attribute Predicates --
7055 ----------------------------------------------
7057 function Known_Alignment
(E
: Entity_Id
) return B
is
7059 return Uint14
(E
) /= Uint_0
7060 and then Uint14
(E
) /= No_Uint
;
7061 end Known_Alignment
;
7063 function Known_Component_Bit_Offset
(E
: Entity_Id
) return B
is
7065 return Uint11
(E
) /= No_Uint
;
7066 end Known_Component_Bit_Offset
;
7068 function Known_Component_Size
(E
: Entity_Id
) return B
is
7070 return Uint22
(Base_Type
(E
)) /= Uint_0
7071 and then Uint22
(Base_Type
(E
)) /= No_Uint
;
7072 end Known_Component_Size
;
7074 function Known_Esize
(E
: Entity_Id
) return B
is
7076 return Uint12
(E
) /= Uint_0
7077 and then Uint12
(E
) /= No_Uint
;
7080 function Known_Normalized_First_Bit
(E
: Entity_Id
) return B
is
7082 return Uint8
(E
) /= No_Uint
;
7083 end Known_Normalized_First_Bit
;
7085 function Known_Normalized_Position
(E
: Entity_Id
) return B
is
7087 return Uint14
(E
) /= No_Uint
;
7088 end Known_Normalized_Position
;
7090 function Known_Normalized_Position_Max
(E
: Entity_Id
) return B
is
7092 return Uint10
(E
) /= No_Uint
;
7093 end Known_Normalized_Position_Max
;
7095 function Known_RM_Size
(E
: Entity_Id
) return B
is
7097 return Uint13
(E
) /= No_Uint
7098 and then (Uint13
(E
) /= Uint_0
7099 or else Is_Discrete_Type
(E
)
7100 or else Is_Fixed_Point_Type
(E
));
7103 function Known_Static_Component_Bit_Offset
(E
: Entity_Id
) return B
is
7105 return Uint11
(E
) /= No_Uint
7106 and then Uint11
(E
) >= Uint_0
;
7107 end Known_Static_Component_Bit_Offset
;
7109 function Known_Static_Component_Size
(E
: Entity_Id
) return B
is
7111 return Uint22
(Base_Type
(E
)) > Uint_0
;
7112 end Known_Static_Component_Size
;
7114 function Known_Static_Esize
(E
: Entity_Id
) return B
is
7116 return Uint12
(E
) > Uint_0
7117 and then not Is_Generic_Type
(E
);
7118 end Known_Static_Esize
;
7120 function Known_Static_Normalized_First_Bit
(E
: Entity_Id
) return B
is
7122 return Uint8
(E
) /= No_Uint
7123 and then Uint8
(E
) >= Uint_0
;
7124 end Known_Static_Normalized_First_Bit
;
7126 function Known_Static_Normalized_Position
(E
: Entity_Id
) return B
is
7128 return Uint14
(E
) /= No_Uint
7129 and then Uint14
(E
) >= Uint_0
;
7130 end Known_Static_Normalized_Position
;
7132 function Known_Static_Normalized_Position_Max
(E
: Entity_Id
) return B
is
7134 return Uint10
(E
) /= No_Uint
7135 and then Uint10
(E
) >= Uint_0
;
7136 end Known_Static_Normalized_Position_Max
;
7138 function Known_Static_RM_Size
(E
: Entity_Id
) return B
is
7140 return (Uint13
(E
) > Uint_0
7141 or else Is_Discrete_Type
(E
)
7142 or else Is_Fixed_Point_Type
(E
))
7143 and then not Is_Generic_Type
(E
);
7144 end Known_Static_RM_Size
;
7146 function Unknown_Alignment
(E
: Entity_Id
) return B
is
7148 return Uint14
(E
) = Uint_0
7149 or else Uint14
(E
) = No_Uint
;
7150 end Unknown_Alignment
;
7152 function Unknown_Component_Bit_Offset
(E
: Entity_Id
) return B
is
7154 return Uint11
(E
) = No_Uint
;
7155 end Unknown_Component_Bit_Offset
;
7157 function Unknown_Component_Size
(E
: Entity_Id
) return B
is
7159 return Uint22
(Base_Type
(E
)) = Uint_0
7161 Uint22
(Base_Type
(E
)) = No_Uint
;
7162 end Unknown_Component_Size
;
7164 function Unknown_Esize
(E
: Entity_Id
) return B
is
7166 return Uint12
(E
) = No_Uint
7168 Uint12
(E
) = Uint_0
;
7171 function Unknown_Normalized_First_Bit
(E
: Entity_Id
) return B
is
7173 return Uint8
(E
) = No_Uint
;
7174 end Unknown_Normalized_First_Bit
;
7176 function Unknown_Normalized_Position
(E
: Entity_Id
) return B
is
7178 return Uint14
(E
) = No_Uint
;
7179 end Unknown_Normalized_Position
;
7181 function Unknown_Normalized_Position_Max
(E
: Entity_Id
) return B
is
7183 return Uint10
(E
) = No_Uint
;
7184 end Unknown_Normalized_Position_Max
;
7186 function Unknown_RM_Size
(E
: Entity_Id
) return B
is
7188 return (Uint13
(E
) = Uint_0
7189 and then not Is_Discrete_Type
(E
)
7190 and then not Is_Fixed_Point_Type
(E
))
7191 or else Uint13
(E
) = No_Uint
;
7192 end Unknown_RM_Size
;
7194 --------------------
7195 -- Address_Clause --
7196 --------------------
7198 function Address_Clause
(Id
: E
) return N
is
7200 return Get_Attribute_Definition_Clause
(Id
, Attribute_Address
);
7207 function Aft_Value
(Id
: E
) return U
is
7209 Delta_Val
: Ureal
:= Delta_Value
(Id
);
7211 while Delta_Val
< Ureal_Tenth
loop
7212 Delta_Val
:= Delta_Val
* Ureal_10
;
7213 Result
:= Result
+ 1;
7216 return UI_From_Int
(Result
);
7219 ----------------------
7220 -- Alignment_Clause --
7221 ----------------------
7223 function Alignment_Clause
(Id
: E
) return N
is
7225 return Get_Attribute_Definition_Clause
(Id
, Attribute_Alignment
);
7226 end Alignment_Clause
;
7232 procedure Append_Entity
(Id
: Entity_Id
; Scop
: Entity_Id
) is
7233 Last
: constant Entity_Id
:= Last_Entity
(Scop
);
7236 Set_Scope
(Id
, Scop
);
7237 Set_Prev_Entity
(Id
, Empty
); -- Empty <-- Id
7239 -- The entity chain is empty
7242 Set_First_Entity
(Scop
, Id
);
7244 -- Otherwise the entity chain has at least one element
7247 Link_Entities
(Last
, Id
); -- Last <-- Id, Last --> Id
7250 -- NOTE: The setting of the Next_Entity attribute of Id must happen
7251 -- here as opposed to at the beginning of the routine because doing
7252 -- so causes the binder to hang. It is not clear why ???
7254 Set_Next_Entity
(Id
, Empty
); -- Id --> Empty
7256 Set_Last_Entity
(Scop
, Id
);
7263 function Base_Type
(Id
: E
) return E
is
7265 if Is_Base_Type
(Id
) then
7268 pragma Assert
(Is_Type
(Id
));
7273 -------------------------
7274 -- Component_Alignment --
7275 -------------------------
7277 -- Component Alignment is encoded using two flags, Flag128/129 as
7278 -- follows. Note that both flags False = Align_Default, so that the
7279 -- default initialization of flags to False initializes component
7280 -- alignment to the default value as required.
7282 -- Flag128 Flag129 Value
7283 -- ------- ------- -----
7284 -- False False Calign_Default
7285 -- False True Calign_Component_Size
7286 -- True False Calign_Component_Size_4
7287 -- True True Calign_Storage_Unit
7289 function Component_Alignment
(Id
: E
) return C
is
7290 BT
: constant Node_Id
:= Base_Type
(Id
);
7293 pragma Assert
(Is_Array_Type
(Id
) or else Is_Record_Type
(Id
));
7295 if Flag128
(BT
) then
7296 if Flag129
(BT
) then
7297 return Calign_Storage_Unit
;
7299 return Calign_Component_Size_4
;
7303 if Flag129
(BT
) then
7304 return Calign_Component_Size
;
7306 return Calign_Default
;
7309 end Component_Alignment
;
7311 ----------------------
7312 -- Declaration_Node --
7313 ----------------------
7315 function Declaration_Node
(Id
: E
) return N
is
7319 if Ekind
(Id
) = E_Incomplete_Type
7320 and then Present
(Full_View
(Id
))
7322 P
:= Parent
(Full_View
(Id
));
7328 if Nkind_In
(P
, N_Selected_Component
, N_Expanded_Name
)
7329 or else (Nkind
(P
) = N_Defining_Program_Unit_Name
7330 and then Is_Child_Unit
(Id
))
7337 end Declaration_Node
;
7339 ---------------------
7340 -- Designated_Type --
7341 ---------------------
7343 function Designated_Type
(Id
: E
) return E
is
7347 Desig_Type
:= Directly_Designated_Type
(Id
);
7349 if Is_Incomplete_Type
(Desig_Type
)
7350 and then Present
(Full_View
(Desig_Type
))
7352 return Full_View
(Desig_Type
);
7354 elsif Is_Class_Wide_Type
(Desig_Type
)
7355 and then Is_Incomplete_Type
(Etype
(Desig_Type
))
7356 and then Present
(Full_View
(Etype
(Desig_Type
)))
7357 and then Present
(Class_Wide_Type
(Full_View
(Etype
(Desig_Type
))))
7359 return Class_Wide_Type
(Full_View
(Etype
(Desig_Type
)));
7364 end Designated_Type
;
7370 function DIC_Procedure
(Id
: E
) return E
is
7371 Subp_Elmt
: Elmt_Id
;
7372 Subp_Id
: Entity_Id
;
7376 pragma Assert
(Is_Type
(Id
));
7378 Subps
:= Subprograms_For_Type
(Base_Type
(Id
));
7380 if Present
(Subps
) then
7381 Subp_Elmt
:= First_Elmt
(Subps
);
7382 while Present
(Subp_Elmt
) loop
7383 Subp_Id
:= Node
(Subp_Elmt
);
7385 if Is_DIC_Procedure
(Subp_Id
) then
7389 Next_Elmt
(Subp_Elmt
);
7396 ----------------------
7397 -- Entry_Index_Type --
7398 ----------------------
7400 function Entry_Index_Type
(Id
: E
) return N
is
7402 pragma Assert
(Ekind
(Id
) = E_Entry_Family
);
7403 return Etype
(Discrete_Subtype_Definition
(Parent
(Id
)));
7404 end Entry_Index_Type
;
7406 ---------------------
7407 -- First_Component --
7408 ---------------------
7410 function First_Component
(Id
: E
) return E
is
7415 (Is_Concurrent_Type
(Id
)
7416 or else Is_Incomplete_Or_Private_Type
(Id
)
7417 or else Is_Record_Type
(Id
));
7419 Comp_Id
:= First_Entity
(Id
);
7420 while Present
(Comp_Id
) loop
7421 exit when Ekind
(Comp_Id
) = E_Component
;
7422 Comp_Id
:= Next_Entity
(Comp_Id
);
7426 end First_Component
;
7428 -------------------------------------
7429 -- First_Component_Or_Discriminant --
7430 -------------------------------------
7432 function First_Component_Or_Discriminant
(Id
: E
) return E
is
7437 (Is_Concurrent_Type
(Id
)
7438 or else Is_Incomplete_Or_Private_Type
(Id
)
7439 or else Is_Record_Type
(Id
)
7440 or else Has_Discriminants
(Id
));
7442 Comp_Id
:= First_Entity
(Id
);
7443 while Present
(Comp_Id
) loop
7444 exit when Ekind_In
(Comp_Id
, E_Component
, E_Discriminant
);
7445 Comp_Id
:= Next_Entity
(Comp_Id
);
7449 end First_Component_Or_Discriminant
;
7455 function First_Formal
(Id
: E
) return E
is
7460 (Is_Generic_Subprogram
(Id
)
7461 or else Is_Overloadable
(Id
)
7462 or else Ekind_In
(Id
, E_Entry_Family
,
7464 E_Subprogram_Type
));
7466 if Ekind
(Id
) = E_Enumeration_Literal
then
7470 Formal
:= First_Entity
(Id
);
7472 -- Deal with the common, non-generic case first
7474 if No
(Formal
) or else Is_Formal
(Formal
) then
7478 -- The first/next entity chain of a generic subprogram contains all
7479 -- generic formal parameters, followed by the formal parameters.
7481 if Is_Generic_Subprogram
(Id
) then
7482 while Present
(Formal
) and then not Is_Formal
(Formal
) loop
7483 Next_Entity
(Formal
);
7492 ------------------------------
7493 -- First_Formal_With_Extras --
7494 ------------------------------
7496 function First_Formal_With_Extras
(Id
: E
) return E
is
7501 (Is_Generic_Subprogram
(Id
)
7502 or else Is_Overloadable
(Id
)
7503 or else Ekind_In
(Id
, E_Entry_Family
,
7505 E_Subprogram_Type
));
7507 if Ekind
(Id
) = E_Enumeration_Literal
then
7511 Formal
:= First_Entity
(Id
);
7513 -- The first/next entity chain of a generic subprogram contains all
7514 -- generic formal parameters, followed by the formal parameters. Go
7515 -- directly to the parameters by skipping the formal part.
7517 if Is_Generic_Subprogram
(Id
) then
7518 while Present
(Formal
) and then not Is_Formal
(Formal
) loop
7519 Next_Entity
(Formal
);
7523 if Present
(Formal
) and then Is_Formal
(Formal
) then
7526 return Extra_Formals
(Id
); -- Empty if no extra formals
7529 end First_Formal_With_Extras
;
7531 -------------------------------------
7532 -- Get_Attribute_Definition_Clause --
7533 -------------------------------------
7535 function Get_Attribute_Definition_Clause
7537 Id
: Attribute_Id
) return Node_Id
7542 N
:= First_Rep_Item
(E
);
7543 while Present
(N
) loop
7544 if Nkind
(N
) = N_Attribute_Definition_Clause
7545 and then Get_Attribute_Id
(Chars
(N
)) = Id
7554 end Get_Attribute_Definition_Clause
;
7556 ---------------------------
7557 -- Get_Class_Wide_Pragma --
7558 ---------------------------
7560 function Get_Class_Wide_Pragma
7562 Id
: Pragma_Id
) return Node_Id
7568 Items
:= Contract
(E
);
7574 Item
:= Pre_Post_Conditions
(Items
);
7575 while Present
(Item
) loop
7576 if Nkind
(Item
) = N_Pragma
7577 and then Get_Pragma_Id
(Pragma_Name_Unmapped
(Item
)) = Id
7578 and then Class_Present
(Item
)
7583 Item
:= Next_Pragma
(Item
);
7587 end Get_Class_Wide_Pragma
;
7593 function Get_Full_View
(T
: Entity_Id
) return Entity_Id
is
7595 if Is_Incomplete_Type
(T
) and then Present
(Full_View
(T
)) then
7596 return Full_View
(T
);
7598 elsif Is_Class_Wide_Type
(T
)
7599 and then Is_Incomplete_Type
(Root_Type
(T
))
7600 and then Present
(Full_View
(Root_Type
(T
)))
7602 return Class_Wide_Type
(Full_View
(Root_Type
(T
)));
7613 function Get_Pragma
(E
: Entity_Id
; Id
: Pragma_Id
) return Node_Id
is
7615 -- Classification pragmas
7617 Is_CLS
: constant Boolean :=
7618 Id
= Pragma_Abstract_State
or else
7619 Id
= Pragma_Attach_Handler
or else
7620 Id
= Pragma_Async_Readers
or else
7621 Id
= Pragma_Async_Writers
or else
7622 Id
= Pragma_Constant_After_Elaboration
or else
7623 Id
= Pragma_Depends
or else
7624 Id
= Pragma_Effective_Reads
or else
7625 Id
= Pragma_Effective_Writes
or else
7626 Id
= Pragma_Extensions_Visible
or else
7627 Id
= Pragma_Global
or else
7628 Id
= Pragma_Initial_Condition
or else
7629 Id
= Pragma_Initializes
or else
7630 Id
= Pragma_Interrupt_Handler
or else
7631 Id
= Pragma_Part_Of
or else
7632 Id
= Pragma_Refined_Depends
or else
7633 Id
= Pragma_Refined_Global
or else
7634 Id
= Pragma_Refined_State
or else
7635 Id
= Pragma_Volatile_Function
;
7637 -- Contract / test case pragmas
7639 Is_CTC
: constant Boolean :=
7640 Id
= Pragma_Contract_Cases
or else
7641 Id
= Pragma_Test_Case
;
7643 -- Pre / postcondition pragmas
7645 Is_PPC
: constant Boolean :=
7646 Id
= Pragma_Precondition
or else
7647 Id
= Pragma_Postcondition
or else
7648 Id
= Pragma_Refined_Post
;
7650 In_Contract
: constant Boolean := Is_CLS
or Is_CTC
or Is_PPC
;
7656 -- Handle pragmas that appear in N_Contract nodes. Those have to be
7657 -- extracted from their specialized list.
7660 Items
:= Contract
(E
);
7666 Item
:= Classifications
(Items
);
7669 Item
:= Contract_Test_Cases
(Items
);
7672 Item
:= Pre_Post_Conditions
(Items
);
7678 Item
:= First_Rep_Item
(E
);
7681 while Present
(Item
) loop
7682 if Nkind
(Item
) = N_Pragma
7683 and then Get_Pragma_Id
(Pragma_Name_Unmapped
(Item
)) = Id
7687 -- All nodes in N_Contract are chained using Next_Pragma
7689 elsif In_Contract
then
7690 Item
:= Next_Pragma
(Item
);
7695 Next_Rep_Item
(Item
);
7702 --------------------------------------
7703 -- Get_Record_Representation_Clause --
7704 --------------------------------------
7706 function Get_Record_Representation_Clause
(E
: Entity_Id
) return Node_Id
is
7710 N
:= First_Rep_Item
(E
);
7711 while Present
(N
) loop
7712 if Nkind
(N
) = N_Record_Representation_Clause
then
7720 end Get_Record_Representation_Clause
;
7722 ------------------------
7723 -- Has_Attach_Handler --
7724 ------------------------
7726 function Has_Attach_Handler
(Id
: E
) return B
is
7730 pragma Assert
(Is_Protected_Type
(Id
));
7732 Ritem
:= First_Rep_Item
(Id
);
7733 while Present
(Ritem
) loop
7734 if Nkind
(Ritem
) = N_Pragma
7735 and then Pragma_Name
(Ritem
) = Name_Attach_Handler
7739 Next_Rep_Item
(Ritem
);
7744 end Has_Attach_Handler
;
7750 function Has_DIC
(Id
: E
) return B
is
7752 return Has_Own_DIC
(Id
) or else Has_Inherited_DIC
(Id
);
7759 function Has_Entries
(Id
: E
) return B
is
7763 pragma Assert
(Is_Concurrent_Type
(Id
));
7765 Ent
:= First_Entity
(Id
);
7766 while Present
(Ent
) loop
7767 if Is_Entry
(Ent
) then
7771 Ent
:= Next_Entity
(Ent
);
7777 ----------------------------
7778 -- Has_Foreign_Convention --
7779 ----------------------------
7781 function Has_Foreign_Convention
(Id
: E
) return B
is
7783 -- While regular Intrinsics such as the Standard operators fit in the
7784 -- "Ada" convention, those with an Interface_Name materialize GCC
7785 -- builtin imports for which Ada special treatments shouldn't apply.
7787 return Convention
(Id
) in Foreign_Convention
7788 or else (Convention
(Id
) = Convention_Intrinsic
7789 and then Present
(Interface_Name
(Id
)));
7790 end Has_Foreign_Convention
;
7792 ---------------------------
7793 -- Has_Interrupt_Handler --
7794 ---------------------------
7796 function Has_Interrupt_Handler
(Id
: E
) return B
is
7800 pragma Assert
(Is_Protected_Type
(Id
));
7802 Ritem
:= First_Rep_Item
(Id
);
7803 while Present
(Ritem
) loop
7804 if Nkind
(Ritem
) = N_Pragma
7805 and then Pragma_Name
(Ritem
) = Name_Interrupt_Handler
7809 Next_Rep_Item
(Ritem
);
7814 end Has_Interrupt_Handler
;
7816 --------------------
7817 -- Has_Invariants --
7818 --------------------
7820 function Has_Invariants
(Id
: E
) return B
is
7822 return Has_Own_Invariants
(Id
) or else Has_Inherited_Invariants
(Id
);
7825 --------------------------
7826 -- Has_Non_Limited_View --
7827 --------------------------
7829 function Has_Non_Limited_View
(Id
: E
) return B
is
7831 return (Ekind
(Id
) in Incomplete_Kind
7832 or else Ekind
(Id
) in Class_Wide_Kind
7833 or else Ekind
(Id
) = E_Abstract_State
)
7834 and then Present
(Non_Limited_View
(Id
));
7835 end Has_Non_Limited_View
;
7837 ---------------------------------
7838 -- Has_Non_Null_Abstract_State --
7839 ---------------------------------
7841 function Has_Non_Null_Abstract_State
(Id
: E
) return B
is
7843 pragma Assert
(Ekind_In
(Id
, E_Generic_Package
, E_Package
));
7846 Present
(Abstract_States
(Id
))
7848 not Is_Null_State
(Node
(First_Elmt
(Abstract_States
(Id
))));
7849 end Has_Non_Null_Abstract_State
;
7851 -------------------------------------
7852 -- Has_Non_Null_Visible_Refinement --
7853 -------------------------------------
7855 function Has_Non_Null_Visible_Refinement
(Id
: E
) return B
is
7856 Constits
: Elist_Id
;
7859 -- "Refinement" is a concept applicable only to abstract states
7861 pragma Assert
(Ekind
(Id
) = E_Abstract_State
);
7862 Constits
:= Refinement_Constituents
(Id
);
7864 -- A partial refinement is always non-null. For a full refinement to be
7865 -- non-null, the first constituent must be anything other than null.
7868 Has_Partial_Visible_Refinement
(Id
)
7869 or else (Has_Visible_Refinement
(Id
)
7870 and then Present
(Constits
)
7871 and then Nkind
(Node
(First_Elmt
(Constits
))) /= N_Null
);
7872 end Has_Non_Null_Visible_Refinement
;
7874 -----------------------------
7875 -- Has_Null_Abstract_State --
7876 -----------------------------
7878 function Has_Null_Abstract_State
(Id
: E
) return B
is
7879 pragma Assert
(Ekind_In
(Id
, E_Generic_Package
, E_Package
));
7881 States
: constant Elist_Id
:= Abstract_States
(Id
);
7884 -- Check first available state of related package. A null abstract
7885 -- state always appears as the sole element of the state list.
7889 and then Is_Null_State
(Node
(First_Elmt
(States
)));
7890 end Has_Null_Abstract_State
;
7892 ---------------------------------
7893 -- Has_Null_Visible_Refinement --
7894 ---------------------------------
7896 function Has_Null_Visible_Refinement
(Id
: E
) return B
is
7897 Constits
: Elist_Id
;
7900 -- "Refinement" is a concept applicable only to abstract states
7902 pragma Assert
(Ekind
(Id
) = E_Abstract_State
);
7903 Constits
:= Refinement_Constituents
(Id
);
7905 -- For a refinement to be null, the state's sole constituent must be a
7909 Has_Visible_Refinement
(Id
)
7910 and then Present
(Constits
)
7911 and then Nkind
(Node
(First_Elmt
(Constits
))) = N_Null
;
7912 end Has_Null_Visible_Refinement
;
7914 --------------------
7915 -- Has_Unmodified --
7916 --------------------
7918 function Has_Unmodified
(E
: Entity_Id
) return Boolean is
7920 if Has_Pragma_Unmodified
(E
) then
7922 elsif Warnings_Off
(E
) then
7923 Set_Warnings_Off_Used_Unmodified
(E
);
7930 ---------------------
7931 -- Has_Unreferenced --
7932 ---------------------
7934 function Has_Unreferenced
(E
: Entity_Id
) return Boolean is
7936 if Has_Pragma_Unreferenced
(E
) then
7938 elsif Warnings_Off
(E
) then
7939 Set_Warnings_Off_Used_Unreferenced
(E
);
7944 end Has_Unreferenced
;
7946 ----------------------
7947 -- Has_Warnings_Off --
7948 ----------------------
7950 function Has_Warnings_Off
(E
: Entity_Id
) return Boolean is
7952 if Warnings_Off
(E
) then
7953 Set_Warnings_Off_Used
(E
);
7958 end Has_Warnings_Off
;
7960 ------------------------------
7961 -- Implementation_Base_Type --
7962 ------------------------------
7964 function Implementation_Base_Type
(Id
: E
) return E
is
7969 Bastyp
:= Base_Type
(Id
);
7971 if Is_Incomplete_Or_Private_Type
(Bastyp
) then
7972 Imptyp
:= Underlying_Type
(Bastyp
);
7974 -- If we have an implementation type, then just return it,
7975 -- otherwise we return the Base_Type anyway. This can only
7976 -- happen in error situations and should avoid some error bombs.
7978 if Present
(Imptyp
) then
7979 return Base_Type
(Imptyp
);
7987 end Implementation_Base_Type
;
7989 -------------------------
7990 -- Invariant_Procedure --
7991 -------------------------
7993 function Invariant_Procedure
(Id
: E
) return E
is
7994 Subp_Elmt
: Elmt_Id
;
7995 Subp_Id
: Entity_Id
;
7999 pragma Assert
(Is_Type
(Id
));
8001 Subps
:= Subprograms_For_Type
(Base_Type
(Id
));
8003 if Present
(Subps
) then
8004 Subp_Elmt
:= First_Elmt
(Subps
);
8005 while Present
(Subp_Elmt
) loop
8006 Subp_Id
:= Node
(Subp_Elmt
);
8008 if Is_Invariant_Procedure
(Subp_Id
) then
8012 Next_Elmt
(Subp_Elmt
);
8017 end Invariant_Procedure
;
8019 ----------------------
8020 -- Is_Atomic_Or_VFA --
8021 ----------------------
8023 function Is_Atomic_Or_VFA
(Id
: E
) return B
is
8025 return Is_Atomic
(Id
) or else Is_Volatile_Full_Access
(Id
);
8026 end Is_Atomic_Or_VFA
;
8032 -- Global flag table allowing rapid computation of this function
8034 Entity_Is_Base_Type
: constant array (Entity_Kind
) of Boolean :=
8035 (E_Enumeration_Subtype |
8036 E_Incomplete_Subtype |
8037 E_Signed_Integer_Subtype |
8038 E_Modular_Integer_Subtype |
8039 E_Floating_Point_Subtype |
8040 E_Ordinary_Fixed_Point_Subtype |
8041 E_Decimal_Fixed_Point_Subtype |
8045 E_Record_Subtype_With_Private |
8046 E_Limited_Private_Subtype |
8048 E_Protected_Subtype |
8050 E_String_Literal_Subtype |
8051 E_Class_Wide_Subtype
=> False,
8054 function Is_Base_Type
(Id
: E
) return Boolean is
8056 return Entity_Is_Base_Type
(Ekind
(Id
));
8059 ---------------------
8060 -- Is_Boolean_Type --
8061 ---------------------
8063 function Is_Boolean_Type
(Id
: E
) return B
is
8065 return Root_Type
(Id
) = Standard_Boolean
;
8066 end Is_Boolean_Type
;
8068 ------------------------
8069 -- Is_Constant_Object --
8070 ------------------------
8072 function Is_Constant_Object
(Id
: E
) return B
is
8073 K
: constant Entity_Kind
:= Ekind
(Id
);
8076 K
= E_Constant
or else K
= E_In_Parameter
or else K
= E_Loop_Parameter
;
8077 end Is_Constant_Object
;
8083 function Is_Controlled
(Id
: E
) return B
is
8085 return Is_Controlled_Active
(Id
) and then not Disable_Controlled
(Id
);
8088 --------------------
8089 -- Is_Discriminal --
8090 --------------------
8092 function Is_Discriminal
(Id
: E
) return B
is
8094 return (Ekind_In
(Id
, E_Constant
, E_In_Parameter
)
8095 and then Present
(Discriminal_Link
(Id
)));
8098 ----------------------
8099 -- Is_Dynamic_Scope --
8100 ----------------------
8102 function Is_Dynamic_Scope
(Id
: E
) return B
is
8105 Ekind
(Id
) = E_Block
8107 Ekind
(Id
) = E_Function
8109 Ekind
(Id
) = E_Procedure
8111 Ekind
(Id
) = E_Subprogram_Body
8113 Ekind
(Id
) = E_Task_Type
8115 (Ekind
(Id
) = E_Limited_Private_Type
8116 and then Present
(Full_View
(Id
))
8117 and then Ekind
(Full_View
(Id
)) = E_Task_Type
)
8119 Ekind
(Id
) = E_Entry
8121 Ekind
(Id
) = E_Entry_Family
8123 Ekind
(Id
) = E_Return_Statement
;
8124 end Is_Dynamic_Scope
;
8126 --------------------
8127 -- Is_Entity_Name --
8128 --------------------
8130 function Is_Entity_Name
(N
: Node_Id
) return Boolean is
8131 Kind
: constant Node_Kind
:= Nkind
(N
);
8134 -- Identifiers, operator symbols, expanded names are entity names
8136 return Kind
= N_Identifier
8137 or else Kind
= N_Operator_Symbol
8138 or else Kind
= N_Expanded_Name
8140 -- Attribute references are entity names if they refer to an entity.
8141 -- Note that we don't do this by testing for the presence of the
8142 -- Entity field in the N_Attribute_Reference node, since it may not
8143 -- have been set yet.
8145 or else (Kind
= N_Attribute_Reference
8146 and then Is_Entity_Attribute_Name
(Attribute_Name
(N
)));
8149 ---------------------------
8150 -- Is_Elaboration_Target --
8151 ---------------------------
8153 function Is_Elaboration_Target
(Id
: Entity_Id
) return Boolean is
8156 Ekind_In
(Id
, E_Constant
, E_Variable
)
8157 or else Is_Entry
(Id
)
8158 or else Is_Generic_Unit
(Id
)
8159 or else Is_Subprogram
(Id
)
8160 or else Is_Task_Type
(Id
);
8161 end Is_Elaboration_Target
;
8163 -----------------------
8164 -- Is_External_State --
8165 -----------------------
8167 function Is_External_State
(Id
: E
) return B
is
8169 -- To qualify, the abstract state must appear with option "external" or
8170 -- "synchronous" (SPARK RM 7.1.4(8) and (10)).
8173 Ekind
(Id
) = E_Abstract_State
8174 and then (Has_Option
(Id
, Name_External
)
8176 Has_Option
(Id
, Name_Synchronous
));
8177 end Is_External_State
;
8183 function Is_Finalizer
(Id
: E
) return B
is
8185 return Ekind
(Id
) = E_Procedure
and then Chars
(Id
) = Name_uFinalizer
;
8192 function Is_Null_State
(Id
: E
) return B
is
8195 Ekind
(Id
) = E_Abstract_State
and then Nkind
(Parent
(Id
)) = N_Null
;
8198 ---------------------
8199 -- Is_Packed_Array --
8200 ---------------------
8202 function Is_Packed_Array
(Id
: E
) return B
is
8204 return Is_Array_Type
(Id
) and then Is_Packed
(Id
);
8205 end Is_Packed_Array
;
8207 -----------------------------------
8208 -- Is_Package_Or_Generic_Package --
8209 -----------------------------------
8211 function Is_Package_Or_Generic_Package
(Id
: E
) return B
is
8213 return Ekind_In
(Id
, E_Generic_Package
, E_Package
);
8214 end Is_Package_Or_Generic_Package
;
8220 function Is_Prival
(Id
: E
) return B
is
8222 return (Ekind_In
(Id
, E_Constant
, E_Variable
)
8223 and then Present
(Prival_Link
(Id
)));
8226 ----------------------------
8227 -- Is_Protected_Component --
8228 ----------------------------
8230 function Is_Protected_Component
(Id
: E
) return B
is
8232 return Ekind
(Id
) = E_Component
and then Is_Protected_Type
(Scope
(Id
));
8233 end Is_Protected_Component
;
8235 ----------------------------
8236 -- Is_Protected_Interface --
8237 ----------------------------
8239 function Is_Protected_Interface
(Id
: E
) return B
is
8240 Typ
: constant Entity_Id
:= Base_Type
(Id
);
8242 if not Is_Interface
(Typ
) then
8244 elsif Is_Class_Wide_Type
(Typ
) then
8245 return Is_Protected_Interface
(Etype
(Typ
));
8247 return Protected_Present
(Type_Definition
(Parent
(Typ
)));
8249 end Is_Protected_Interface
;
8251 ------------------------------
8252 -- Is_Protected_Record_Type --
8253 ------------------------------
8255 function Is_Protected_Record_Type
(Id
: E
) return B
is
8258 Is_Concurrent_Record_Type
(Id
)
8259 and then Is_Protected_Type
(Corresponding_Concurrent_Type
(Id
));
8260 end Is_Protected_Record_Type
;
8262 --------------------------------
8263 -- Is_Standard_Character_Type --
8264 --------------------------------
8266 function Is_Standard_Character_Type
(Id
: E
) return B
is
8268 if Is_Type
(Id
) then
8270 R
: constant Entity_Id
:= Root_Type
(Id
);
8273 R
= Standard_Character
8275 R
= Standard_Wide_Character
8277 R
= Standard_Wide_Wide_Character
;
8283 end Is_Standard_Character_Type
;
8285 -----------------------------
8286 -- Is_Standard_String_Type --
8287 -----------------------------
8289 function Is_Standard_String_Type
(Id
: E
) return B
is
8291 if Is_Type
(Id
) then
8293 R
: constant Entity_Id
:= Root_Type
(Id
);
8298 R
= Standard_Wide_String
8300 R
= Standard_Wide_Wide_String
;
8306 end Is_Standard_String_Type
;
8308 --------------------
8309 -- Is_String_Type --
8310 --------------------
8312 function Is_String_Type
(Id
: E
) return B
is
8314 return Is_Array_Type
(Id
)
8315 and then Id
/= Any_Composite
8316 and then Number_Dimensions
(Id
) = 1
8317 and then Is_Character_Type
(Component_Type
(Id
));
8320 -------------------------------
8321 -- Is_Synchronized_Interface --
8322 -------------------------------
8324 function Is_Synchronized_Interface
(Id
: E
) return B
is
8325 Typ
: constant Entity_Id
:= Base_Type
(Id
);
8328 if not Is_Interface
(Typ
) then
8331 elsif Is_Class_Wide_Type
(Typ
) then
8332 return Is_Synchronized_Interface
(Etype
(Typ
));
8335 return Protected_Present
(Type_Definition
(Parent
(Typ
)))
8336 or else Synchronized_Present
(Type_Definition
(Parent
(Typ
)))
8337 or else Task_Present
(Type_Definition
(Parent
(Typ
)));
8339 end Is_Synchronized_Interface
;
8341 ---------------------------
8342 -- Is_Synchronized_State --
8343 ---------------------------
8345 function Is_Synchronized_State
(Id
: E
) return B
is
8347 -- To qualify, the abstract state must appear with simple option
8348 -- "synchronous" (SPARK RM 7.1.4(10)).
8351 Ekind
(Id
) = E_Abstract_State
8352 and then Has_Option
(Id
, Name_Synchronous
);
8353 end Is_Synchronized_State
;
8355 -----------------------
8356 -- Is_Task_Interface --
8357 -----------------------
8359 function Is_Task_Interface
(Id
: E
) return B
is
8360 Typ
: constant Entity_Id
:= Base_Type
(Id
);
8362 if not Is_Interface
(Typ
) then
8364 elsif Is_Class_Wide_Type
(Typ
) then
8365 return Is_Task_Interface
(Etype
(Typ
));
8367 return Task_Present
(Type_Definition
(Parent
(Typ
)));
8369 end Is_Task_Interface
;
8371 -------------------------
8372 -- Is_Task_Record_Type --
8373 -------------------------
8375 function Is_Task_Record_Type
(Id
: E
) return B
is
8378 Is_Concurrent_Record_Type
(Id
)
8379 and then Is_Task_Type
(Corresponding_Concurrent_Type
(Id
));
8380 end Is_Task_Record_Type
;
8382 ------------------------
8383 -- Is_Wrapper_Package --
8384 ------------------------
8386 function Is_Wrapper_Package
(Id
: E
) return B
is
8388 return Ekind
(Id
) = E_Package
and then Present
(Related_Instance
(Id
));
8389 end Is_Wrapper_Package
;
8395 function Last_Formal
(Id
: E
) return E
is
8400 (Is_Overloadable
(Id
)
8401 or else Ekind_In
(Id
, E_Entry_Family
,
8403 E_Subprogram_Type
));
8405 if Ekind
(Id
) = E_Enumeration_Literal
then
8409 Formal
:= First_Formal
(Id
);
8411 if Present
(Formal
) then
8412 while Present
(Next_Formal
(Formal
)) loop
8413 Formal
:= Next_Formal
(Formal
);
8425 procedure Link_Entities
(First
: Entity_Id
; Second
: Node_Id
) is
8427 if Present
(Second
) then
8428 Set_Prev_Entity
(Second
, First
); -- First <-- Second
8431 Set_Next_Entity
(First
, Second
); -- First --> Second
8434 ----------------------
8435 -- Model_Emin_Value --
8436 ----------------------
8438 function Model_Emin_Value
(Id
: E
) return Uint
is
8440 return Machine_Emin_Value
(Id
);
8441 end Model_Emin_Value
;
8443 -------------------------
8444 -- Model_Epsilon_Value --
8445 -------------------------
8447 function Model_Epsilon_Value
(Id
: E
) return Ureal
is
8448 Radix
: constant Ureal
:= UR_From_Uint
(Machine_Radix_Value
(Id
));
8450 return Radix
** (1 - Model_Mantissa_Value
(Id
));
8451 end Model_Epsilon_Value
;
8453 --------------------------
8454 -- Model_Mantissa_Value --
8455 --------------------------
8457 function Model_Mantissa_Value
(Id
: E
) return Uint
is
8459 return Machine_Mantissa_Value
(Id
);
8460 end Model_Mantissa_Value
;
8462 -----------------------
8463 -- Model_Small_Value --
8464 -----------------------
8466 function Model_Small_Value
(Id
: E
) return Ureal
is
8467 Radix
: constant Ureal
:= UR_From_Uint
(Machine_Radix_Value
(Id
));
8469 return Radix
** (Model_Emin_Value
(Id
) - 1);
8470 end Model_Small_Value
;
8472 ------------------------
8473 -- Machine_Emax_Value --
8474 ------------------------
8476 function Machine_Emax_Value
(Id
: E
) return Uint
is
8477 Digs
: constant Pos
:= UI_To_Int
(Digits_Value
(Base_Type
(Id
)));
8480 case Float_Rep
(Id
) is
8483 when 1 .. 6 => return Uint_128
;
8484 when 7 .. 15 => return 2**10;
8485 when 16 .. 33 => return 2**14;
8486 when others => return No_Uint
;
8490 return Uint_2
** Uint_7
- Uint_1
;
8492 end Machine_Emax_Value
;
8494 ------------------------
8495 -- Machine_Emin_Value --
8496 ------------------------
8498 function Machine_Emin_Value
(Id
: E
) return Uint
is
8500 case Float_Rep
(Id
) is
8501 when IEEE_Binary
=> return Uint_3
- Machine_Emax_Value
(Id
);
8502 when AAMP
=> return -Machine_Emax_Value
(Id
);
8504 end Machine_Emin_Value
;
8506 ----------------------------
8507 -- Machine_Mantissa_Value --
8508 ----------------------------
8510 function Machine_Mantissa_Value
(Id
: E
) return Uint
is
8511 Digs
: constant Pos
:= UI_To_Int
(Digits_Value
(Base_Type
(Id
)));
8514 case Float_Rep
(Id
) is
8517 when 1 .. 6 => return Uint_24
;
8518 when 7 .. 15 => return UI_From_Int
(53);
8519 when 16 .. 18 => return Uint_64
;
8520 when 19 .. 33 => return UI_From_Int
(113);
8521 when others => return No_Uint
;
8526 when 1 .. 6 => return Uint_24
;
8527 when 7 .. 9 => return UI_From_Int
(40);
8528 when others => return No_Uint
;
8531 end Machine_Mantissa_Value
;
8533 -------------------------
8534 -- Machine_Radix_Value --
8535 -------------------------
8537 function Machine_Radix_Value
(Id
: E
) return U
is
8539 case Float_Rep
(Id
) is
8545 end Machine_Radix_Value
;
8547 --------------------
8548 -- Next_Component --
8549 --------------------
8551 function Next_Component
(Id
: E
) return E
is
8555 Comp_Id
:= Next_Entity
(Id
);
8556 while Present
(Comp_Id
) loop
8557 exit when Ekind
(Comp_Id
) = E_Component
;
8558 Comp_Id
:= Next_Entity
(Comp_Id
);
8564 ------------------------------------
8565 -- Next_Component_Or_Discriminant --
8566 ------------------------------------
8568 function Next_Component_Or_Discriminant
(Id
: E
) return E
is
8572 Comp_Id
:= Next_Entity
(Id
);
8573 while Present
(Comp_Id
) loop
8574 exit when Ekind_In
(Comp_Id
, E_Component
, E_Discriminant
);
8575 Comp_Id
:= Next_Entity
(Comp_Id
);
8579 end Next_Component_Or_Discriminant
;
8581 -----------------------
8582 -- Next_Discriminant --
8583 -----------------------
8585 -- This function actually implements both Next_Discriminant and
8586 -- Next_Stored_Discriminant by making sure that the Discriminant
8587 -- returned is of the same variety as Id.
8589 function Next_Discriminant
(Id
: E
) return E
is
8591 -- Derived Tagged types with private extensions look like this...
8593 -- E_Discriminant d1
8594 -- E_Discriminant d2
8596 -- E_Discriminant d1
8597 -- E_Discriminant d2
8600 -- so it is critical not to go past the leading discriminants
8605 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
8608 D
:= Next_Entity
(D
);
8610 or else (Ekind
(D
) /= E_Discriminant
8611 and then not Is_Itype
(D
))
8616 exit when Ekind
(D
) = E_Discriminant
8617 and then (Is_Completely_Hidden
(D
) = Is_Completely_Hidden
(Id
));
8621 end Next_Discriminant
;
8627 function Next_Formal
(Id
: E
) return E
is
8631 -- Follow the chain of declared entities as long as the kind of the
8632 -- entity corresponds to a formal parameter. Skip internal entities
8633 -- that may have been created for implicit subtypes, in the process
8634 -- of analyzing default expressions.
8640 if No
(P
) or else Is_Formal
(P
) then
8642 elsif not Is_Internal
(P
) then
8648 -----------------------------
8649 -- Next_Formal_With_Extras --
8650 -----------------------------
8652 function Next_Formal_With_Extras
(Id
: E
) return E
is
8654 if Present
(Extra_Formal
(Id
)) then
8655 return Extra_Formal
(Id
);
8657 return Next_Formal
(Id
);
8659 end Next_Formal_With_Extras
;
8665 function Next_Index
(Id
: Node_Id
) return Node_Id
is
8674 function Next_Literal
(Id
: E
) return E
is
8676 pragma Assert
(Nkind
(Id
) in N_Entity
);
8680 ------------------------------
8681 -- Next_Stored_Discriminant --
8682 ------------------------------
8684 function Next_Stored_Discriminant
(Id
: E
) return E
is
8686 -- See comment in Next_Discriminant
8688 return Next_Discriminant
(Id
);
8689 end Next_Stored_Discriminant
;
8691 -----------------------
8692 -- Number_Dimensions --
8693 -----------------------
8695 function Number_Dimensions
(Id
: E
) return Pos
is
8700 if Ekind
(Id
) = E_String_Literal_Subtype
then
8705 T
:= First_Index
(Id
);
8706 while Present
(T
) loop
8713 end Number_Dimensions
;
8715 --------------------
8716 -- Number_Entries --
8717 --------------------
8719 function Number_Entries
(Id
: E
) return Nat
is
8724 pragma Assert
(Is_Concurrent_Type
(Id
));
8727 Ent
:= First_Entity
(Id
);
8728 while Present
(Ent
) loop
8729 if Is_Entry
(Ent
) then
8733 Ent
:= Next_Entity
(Ent
);
8739 --------------------
8740 -- Number_Formals --
8741 --------------------
8743 function Number_Formals
(Id
: E
) return Pos
is
8749 Formal
:= First_Formal
(Id
);
8750 while Present
(Formal
) loop
8752 Formal
:= Next_Formal
(Formal
);
8758 ------------------------
8759 -- Object_Size_Clause --
8760 ------------------------
8762 function Object_Size_Clause
(Id
: E
) return N
is
8764 return Get_Attribute_Definition_Clause
(Id
, Attribute_Object_Size
);
8765 end Object_Size_Clause
;
8767 --------------------
8768 -- Parameter_Mode --
8769 --------------------
8771 function Parameter_Mode
(Id
: E
) return Formal_Kind
is
8776 ---------------------------------
8777 -- Partial_Invariant_Procedure --
8778 ---------------------------------
8780 function Partial_Invariant_Procedure
(Id
: E
) return E
is
8781 Subp_Elmt
: Elmt_Id
;
8782 Subp_Id
: Entity_Id
;
8786 pragma Assert
(Is_Type
(Id
));
8788 Subps
:= Subprograms_For_Type
(Base_Type
(Id
));
8790 if Present
(Subps
) then
8791 Subp_Elmt
:= First_Elmt
(Subps
);
8792 while Present
(Subp_Elmt
) loop
8793 Subp_Id
:= Node
(Subp_Elmt
);
8795 if Is_Partial_Invariant_Procedure
(Subp_Id
) then
8799 Next_Elmt
(Subp_Elmt
);
8804 end Partial_Invariant_Procedure
;
8806 -------------------------------------
8807 -- Partial_Refinement_Constituents --
8808 -------------------------------------
8810 function Partial_Refinement_Constituents
(Id
: E
) return L
is
8811 Constits
: Elist_Id
:= No_Elist
;
8813 procedure Add_Usable_Constituents
(Item
: E
);
8814 -- Add global item Item and/or its constituents to list Constits when
8815 -- they can be used in a global refinement within the current scope. The
8817 -- 1) If Item is an abstract state with full refinement visible, add
8818 -- its constituents.
8819 -- 2) If Item is an abstract state with only partial refinement
8820 -- visible, add both Item and its constituents.
8821 -- 3) If Item is an abstract state without a visible refinement, add
8823 -- 4) If Id is not an abstract state, add it.
8825 procedure Add_Usable_Constituents
(List
: Elist_Id
);
8826 -- Apply Add_Usable_Constituents to every constituent in List
8828 -----------------------------
8829 -- Add_Usable_Constituents --
8830 -----------------------------
8832 procedure Add_Usable_Constituents
(Item
: E
) is
8834 if Ekind
(Item
) = E_Abstract_State
then
8835 if Has_Visible_Refinement
(Item
) then
8836 Add_Usable_Constituents
(Refinement_Constituents
(Item
));
8838 elsif Has_Partial_Visible_Refinement
(Item
) then
8839 Append_New_Elmt
(Item
, Constits
);
8840 Add_Usable_Constituents
(Part_Of_Constituents
(Item
));
8843 Append_New_Elmt
(Item
, Constits
);
8847 Append_New_Elmt
(Item
, Constits
);
8849 end Add_Usable_Constituents
;
8851 procedure Add_Usable_Constituents
(List
: Elist_Id
) is
8852 Constit_Elmt
: Elmt_Id
;
8854 if Present
(List
) then
8855 Constit_Elmt
:= First_Elmt
(List
);
8856 while Present
(Constit_Elmt
) loop
8857 Add_Usable_Constituents
(Node
(Constit_Elmt
));
8858 Next_Elmt
(Constit_Elmt
);
8861 end Add_Usable_Constituents
;
8863 -- Start of processing for Partial_Refinement_Constituents
8866 -- "Refinement" is a concept applicable only to abstract states
8868 pragma Assert
(Ekind
(Id
) = E_Abstract_State
);
8870 if Has_Visible_Refinement
(Id
) then
8871 Constits
:= Refinement_Constituents
(Id
);
8873 -- A refinement may be partially visible when objects declared in the
8874 -- private part of a package are subject to a Part_Of indicator.
8876 elsif Has_Partial_Visible_Refinement
(Id
) then
8877 Add_Usable_Constituents
(Part_Of_Constituents
(Id
));
8879 -- Function should only be called when full or partial refinement is
8883 raise Program_Error
;
8887 end Partial_Refinement_Constituents
;
8889 ------------------------
8890 -- Predicate_Function --
8891 ------------------------
8893 function Predicate_Function
(Id
: E
) return E
is
8894 Subp_Elmt
: Elmt_Id
;
8895 Subp_Id
: Entity_Id
;
8900 pragma Assert
(Is_Type
(Id
));
8902 -- If type is private and has a completion, predicate may be defined on
8905 if Is_Private_Type
(Id
)
8907 (not Has_Predicates
(Id
) or else No
(Subprograms_For_Type
(Id
)))
8908 and then Present
(Full_View
(Id
))
8910 Typ
:= Full_View
(Id
);
8912 elsif Ekind_In
(Id
, E_Array_Subtype
,
8914 E_Record_Subtype_With_Private
)
8915 and then Present
(Predicated_Parent
(Id
))
8917 Typ
:= Predicated_Parent
(Id
);
8923 Subps
:= Subprograms_For_Type
(Typ
);
8925 if Present
(Subps
) then
8926 Subp_Elmt
:= First_Elmt
(Subps
);
8927 while Present
(Subp_Elmt
) loop
8928 Subp_Id
:= Node
(Subp_Elmt
);
8930 if Ekind
(Subp_Id
) = E_Function
8931 and then Is_Predicate_Function
(Subp_Id
)
8936 Next_Elmt
(Subp_Elmt
);
8941 end Predicate_Function
;
8943 --------------------------
8944 -- Predicate_Function_M --
8945 --------------------------
8947 function Predicate_Function_M
(Id
: E
) return E
is
8948 Subp_Elmt
: Elmt_Id
;
8949 Subp_Id
: Entity_Id
;
8954 pragma Assert
(Is_Type
(Id
));
8956 -- If type is private and has a completion, predicate may be defined on
8959 if Is_Private_Type
(Id
)
8961 (not Has_Predicates
(Id
) or else No
(Subprograms_For_Type
(Id
)))
8962 and then Present
(Full_View
(Id
))
8964 Typ
:= Full_View
(Id
);
8970 Subps
:= Subprograms_For_Type
(Typ
);
8972 if Present
(Subps
) then
8973 Subp_Elmt
:= First_Elmt
(Subps
);
8974 while Present
(Subp_Elmt
) loop
8975 Subp_Id
:= Node
(Subp_Elmt
);
8977 if Ekind
(Subp_Id
) = E_Function
8978 and then Is_Predicate_Function_M
(Subp_Id
)
8983 Next_Elmt
(Subp_Elmt
);
8988 end Predicate_Function_M
;
8990 -------------------------
8991 -- Present_In_Rep_Item --
8992 -------------------------
8994 function Present_In_Rep_Item
(E
: Entity_Id
; N
: Node_Id
) return Boolean is
8998 Ritem
:= First_Rep_Item
(E
);
9000 while Present
(Ritem
) loop
9005 Next_Rep_Item
(Ritem
);
9009 end Present_In_Rep_Item
;
9011 --------------------------
9012 -- Primitive_Operations --
9013 --------------------------
9015 function Primitive_Operations
(Id
: E
) return L
is
9017 if Is_Concurrent_Type
(Id
) then
9018 if Present
(Corresponding_Record_Type
(Id
)) then
9019 return Direct_Primitive_Operations
9020 (Corresponding_Record_Type
(Id
));
9022 -- If expansion is disabled the corresponding record type is absent,
9023 -- but if the type has ancestors it may have primitive operations.
9025 elsif Is_Tagged_Type
(Id
) then
9026 return Direct_Primitive_Operations
(Id
);
9032 return Direct_Primitive_Operations
(Id
);
9034 end Primitive_Operations
;
9036 ---------------------
9037 -- Record_Rep_Item --
9038 ---------------------
9040 procedure Record_Rep_Item
(E
: Entity_Id
; N
: Node_Id
) is
9042 Set_Next_Rep_Item
(N
, First_Rep_Item
(E
));
9043 Set_First_Rep_Item
(E
, N
);
9044 end Record_Rep_Item
;
9050 procedure Remove_Entity
(Id
: Entity_Id
) is
9051 Next
: constant Entity_Id
:= Next_Entity
(Id
);
9052 Prev
: constant Entity_Id
:= Prev_Entity
(Id
);
9053 Scop
: constant Entity_Id
:= Scope
(Id
);
9054 First
: constant Entity_Id
:= First_Entity
(Scop
);
9055 Last
: constant Entity_Id
:= Last_Entity
(Scop
);
9058 -- Eliminate any existing linkages from the entity
9060 Set_Prev_Entity
(Id
, Empty
); -- Empty <-- Id
9061 Set_Next_Entity
(Id
, Empty
); -- Id --> Empty
9063 -- The eliminated entity was the only element in the entity chain
9065 if Id
= First
and then Id
= Last
then
9066 Set_First_Entity
(Scop
, Empty
);
9067 Set_Last_Entity
(Scop
, Empty
);
9069 -- The eliminated entity was the head of the entity chain
9071 elsif Id
= First
then
9072 Set_First_Entity
(Scop
, Next
);
9074 -- The eliminated entity was the tail of the entity chain
9076 elsif Id
= Last
then
9077 Set_Last_Entity
(Scop
, Prev
);
9079 -- Otherwise the eliminated entity comes from the middle of the entity
9083 Link_Entities
(Prev
, Next
); -- Prev <-- Next, Prev --> Next
9091 function Root_Type
(Id
: E
) return E
is
9095 pragma Assert
(Nkind
(Id
) in N_Entity
);
9097 T
:= Base_Type
(Id
);
9099 if Ekind
(T
) = E_Class_Wide_Type
then
9111 -- Following test catches some error cases resulting from
9114 elsif No
(Etyp
) then
9115 Check_Error_Detected
;
9118 elsif Is_Private_Type
(T
) and then Etyp
= Full_View
(T
) then
9121 elsif Is_Private_Type
(Etyp
) and then Full_View
(Etyp
) = T
then
9127 -- Return if there is a circularity in the inheritance chain. This
9128 -- happens in some error situations and we do not want to get
9129 -- stuck in this loop.
9131 if T
= Base_Type
(Id
) then
9138 ---------------------
9139 -- Safe_Emax_Value --
9140 ---------------------
9142 function Safe_Emax_Value
(Id
: E
) return Uint
is
9144 return Machine_Emax_Value
(Id
);
9145 end Safe_Emax_Value
;
9147 ----------------------
9148 -- Safe_First_Value --
9149 ----------------------
9151 function Safe_First_Value
(Id
: E
) return Ureal
is
9153 return -Safe_Last_Value
(Id
);
9154 end Safe_First_Value
;
9156 ---------------------
9157 -- Safe_Last_Value --
9158 ---------------------
9160 function Safe_Last_Value
(Id
: E
) return Ureal
is
9161 Radix
: constant Uint
:= Machine_Radix_Value
(Id
);
9162 Mantissa
: constant Uint
:= Machine_Mantissa_Value
(Id
);
9163 Emax
: constant Uint
:= Safe_Emax_Value
(Id
);
9164 Significand
: constant Uint
:= Radix
** Mantissa
- 1;
9165 Exponent
: constant Uint
:= Emax
- Mantissa
;
9171 (Num
=> Significand
* 2 ** (Exponent
mod 4),
9172 Den
=> -Exponent
/ 4,
9177 (Num
=> Significand
,
9181 end Safe_Last_Value
;
9187 function Scope_Depth
(Id
: E
) return Uint
is
9192 while Is_Record_Type
(Scop
) loop
9193 Scop
:= Scope
(Scop
);
9196 return Scope_Depth_Value
(Scop
);
9199 ---------------------
9200 -- Scope_Depth_Set --
9201 ---------------------
9203 function Scope_Depth_Set
(Id
: E
) return B
is
9205 return not Is_Record_Type
(Id
)
9206 and then Field22
(Id
) /= Union_Id
(Empty
);
9207 end Scope_Depth_Set
;
9209 -----------------------------
9210 -- Set_Component_Alignment --
9211 -----------------------------
9213 -- Component Alignment is encoded using two flags, Flag128/129 as
9214 -- follows. Note that both flags False = Align_Default, so that the
9215 -- default initialization of flags to False initializes component
9216 -- alignment to the default value as required.
9218 -- Flag128 Flag129 Value
9219 -- ------- ------- -----
9220 -- False False Calign_Default
9221 -- False True Calign_Component_Size
9222 -- True False Calign_Component_Size_4
9223 -- True True Calign_Storage_Unit
9225 procedure Set_Component_Alignment
(Id
: E
; V
: C
) is
9227 pragma Assert
((Is_Array_Type
(Id
) or else Is_Record_Type
(Id
))
9228 and then Is_Base_Type
(Id
));
9231 when Calign_Default
=>
9232 Set_Flag128
(Id
, False);
9233 Set_Flag129
(Id
, False);
9235 when Calign_Component_Size
=>
9236 Set_Flag128
(Id
, False);
9237 Set_Flag129
(Id
, True);
9239 when Calign_Component_Size_4
=>
9240 Set_Flag128
(Id
, True);
9241 Set_Flag129
(Id
, False);
9243 when Calign_Storage_Unit
=>
9244 Set_Flag128
(Id
, True);
9245 Set_Flag129
(Id
, True);
9247 end Set_Component_Alignment
;
9249 -----------------------
9250 -- Set_DIC_Procedure --
9251 -----------------------
9253 procedure Set_DIC_Procedure
(Id
: E
; V
: E
) is
9254 Base_Typ
: Entity_Id
;
9255 Subp_Elmt
: Elmt_Id
;
9256 Subp_Id
: Entity_Id
;
9260 pragma Assert
(Is_Type
(Id
));
9262 Base_Typ
:= Base_Type
(Id
);
9263 Subps
:= Subprograms_For_Type
(Base_Typ
);
9266 Subps
:= New_Elmt_List
;
9267 Set_Subprograms_For_Type
(Base_Typ
, Subps
);
9270 Subp_Elmt
:= First_Elmt
(Subps
);
9271 Prepend_Elmt
(V
, Subps
);
9273 -- Check for a duplicate default initial condition procedure
9275 while Present
(Subp_Elmt
) loop
9276 Subp_Id
:= Node
(Subp_Elmt
);
9278 if Is_DIC_Procedure
(Subp_Id
) then
9279 raise Program_Error
;
9282 Next_Elmt
(Subp_Elmt
);
9284 end Set_DIC_Procedure
;
9286 -----------------------------
9287 -- Set_Invariant_Procedure --
9288 -----------------------------
9290 procedure Set_Invariant_Procedure
(Id
: E
; V
: E
) is
9291 Base_Typ
: Entity_Id
;
9292 Subp_Elmt
: Elmt_Id
;
9293 Subp_Id
: Entity_Id
;
9297 pragma Assert
(Is_Type
(Id
));
9299 Base_Typ
:= Base_Type
(Id
);
9300 Subps
:= Subprograms_For_Type
(Base_Typ
);
9303 Subps
:= New_Elmt_List
;
9304 Set_Subprograms_For_Type
(Base_Typ
, Subps
);
9307 Subp_Elmt
:= First_Elmt
(Subps
);
9308 Prepend_Elmt
(V
, Subps
);
9310 -- Check for a duplicate invariant procedure
9312 while Present
(Subp_Elmt
) loop
9313 Subp_Id
:= Node
(Subp_Elmt
);
9315 if Is_Invariant_Procedure
(Subp_Id
) then
9316 raise Program_Error
;
9319 Next_Elmt
(Subp_Elmt
);
9321 end Set_Invariant_Procedure
;
9323 -------------------------------------
9324 -- Set_Partial_Invariant_Procedure --
9325 -------------------------------------
9327 procedure Set_Partial_Invariant_Procedure
(Id
: E
; V
: E
) is
9328 Base_Typ
: Entity_Id
;
9329 Subp_Elmt
: Elmt_Id
;
9330 Subp_Id
: Entity_Id
;
9334 pragma Assert
(Is_Type
(Id
));
9336 Base_Typ
:= Base_Type
(Id
);
9337 Subps
:= Subprograms_For_Type
(Base_Typ
);
9340 Subps
:= New_Elmt_List
;
9341 Set_Subprograms_For_Type
(Base_Typ
, Subps
);
9344 Subp_Elmt
:= First_Elmt
(Subps
);
9345 Prepend_Elmt
(V
, Subps
);
9347 -- Check for a duplicate partial invariant procedure
9349 while Present
(Subp_Elmt
) loop
9350 Subp_Id
:= Node
(Subp_Elmt
);
9352 if Is_Partial_Invariant_Procedure
(Subp_Id
) then
9353 raise Program_Error
;
9356 Next_Elmt
(Subp_Elmt
);
9358 end Set_Partial_Invariant_Procedure
;
9360 ----------------------------
9361 -- Set_Predicate_Function --
9362 ----------------------------
9364 procedure Set_Predicate_Function
(Id
: E
; V
: E
) is
9365 Subp_Elmt
: Elmt_Id
;
9366 Subp_Id
: Entity_Id
;
9370 pragma Assert
(Is_Type
(Id
) and then Has_Predicates
(Id
));
9372 Subps
:= Subprograms_For_Type
(Id
);
9375 Subps
:= New_Elmt_List
;
9376 Set_Subprograms_For_Type
(Id
, Subps
);
9379 Subp_Elmt
:= First_Elmt
(Subps
);
9380 Prepend_Elmt
(V
, Subps
);
9382 -- Check for a duplicate predication function
9384 while Present
(Subp_Elmt
) loop
9385 Subp_Id
:= Node
(Subp_Elmt
);
9387 if Ekind
(Subp_Id
) = E_Function
9388 and then Is_Predicate_Function
(Subp_Id
)
9390 raise Program_Error
;
9393 Next_Elmt
(Subp_Elmt
);
9395 end Set_Predicate_Function
;
9397 ------------------------------
9398 -- Set_Predicate_Function_M --
9399 ------------------------------
9401 procedure Set_Predicate_Function_M
(Id
: E
; V
: E
) is
9402 Subp_Elmt
: Elmt_Id
;
9403 Subp_Id
: Entity_Id
;
9407 pragma Assert
(Is_Type
(Id
) and then Has_Predicates
(Id
));
9409 Subps
:= Subprograms_For_Type
(Id
);
9412 Subps
:= New_Elmt_List
;
9413 Set_Subprograms_For_Type
(Id
, Subps
);
9416 Subp_Elmt
:= First_Elmt
(Subps
);
9417 Prepend_Elmt
(V
, Subps
);
9419 -- Check for a duplicate predication function
9421 while Present
(Subp_Elmt
) loop
9422 Subp_Id
:= Node
(Subp_Elmt
);
9424 if Ekind
(Subp_Id
) = E_Function
9425 and then Is_Predicate_Function_M
(Subp_Id
)
9427 raise Program_Error
;
9430 Next_Elmt
(Subp_Elmt
);
9432 end Set_Predicate_Function_M
;
9438 function Size_Clause
(Id
: E
) return N
is
9440 return Get_Attribute_Definition_Clause
(Id
, Attribute_Size
);
9443 ------------------------
9444 -- Stream_Size_Clause --
9445 ------------------------
9447 function Stream_Size_Clause
(Id
: E
) return N
is
9449 return Get_Attribute_Definition_Clause
(Id
, Attribute_Stream_Size
);
9450 end Stream_Size_Clause
;
9456 function Subtype_Kind
(K
: Entity_Kind
) return Entity_Kind
is
9462 Kind
:= E_Access_Subtype
;
9464 when E_Array_Subtype
9467 Kind
:= E_Array_Subtype
;
9469 when E_Class_Wide_Subtype
9472 Kind
:= E_Class_Wide_Subtype
;
9474 when E_Decimal_Fixed_Point_Subtype
9475 | E_Decimal_Fixed_Point_Type
9477 Kind
:= E_Decimal_Fixed_Point_Subtype
;
9479 when E_Ordinary_Fixed_Point_Subtype
9480 | E_Ordinary_Fixed_Point_Type
9482 Kind
:= E_Ordinary_Fixed_Point_Subtype
;
9484 when E_Private_Subtype
9487 Kind
:= E_Private_Subtype
;
9489 when E_Limited_Private_Subtype
9490 | E_Limited_Private_Type
9492 Kind
:= E_Limited_Private_Subtype
;
9494 when E_Record_Subtype_With_Private
9495 | E_Record_Type_With_Private
9497 Kind
:= E_Record_Subtype_With_Private
;
9499 when E_Record_Subtype
9502 Kind
:= E_Record_Subtype
;
9504 when Enumeration_Kind
=>
9505 Kind
:= E_Enumeration_Subtype
;
9507 when E_Incomplete_Type
=>
9508 Kind
:= E_Incomplete_Subtype
;
9511 Kind
:= E_Floating_Point_Subtype
;
9513 when Signed_Integer_Kind
=>
9514 Kind
:= E_Signed_Integer_Subtype
;
9516 when Modular_Integer_Kind
=>
9517 Kind
:= E_Modular_Integer_Subtype
;
9519 when Protected_Kind
=>
9520 Kind
:= E_Protected_Subtype
;
9523 Kind
:= E_Task_Subtype
;
9527 raise Program_Error
;
9533 ---------------------
9534 -- Type_High_Bound --
9535 ---------------------
9537 function Type_High_Bound
(Id
: E
) return Node_Id
is
9538 Rng
: constant Node_Id
:= Scalar_Range
(Id
);
9540 if Nkind
(Rng
) = N_Subtype_Indication
then
9541 return High_Bound
(Range_Expression
(Constraint
(Rng
)));
9543 return High_Bound
(Rng
);
9545 end Type_High_Bound
;
9547 --------------------
9548 -- Type_Low_Bound --
9549 --------------------
9551 function Type_Low_Bound
(Id
: E
) return Node_Id
is
9552 Rng
: constant Node_Id
:= Scalar_Range
(Id
);
9554 if Nkind
(Rng
) = N_Subtype_Indication
then
9555 return Low_Bound
(Range_Expression
(Constraint
(Rng
)));
9557 return Low_Bound
(Rng
);
9561 ---------------------
9562 -- Underlying_Type --
9563 ---------------------
9565 function Underlying_Type
(Id
: E
) return E
is
9567 -- For record_with_private the underlying type is always the direct full
9568 -- view. Never try to take the full view of the parent it does not make
9571 if Ekind
(Id
) = E_Record_Type_With_Private
then
9572 return Full_View
(Id
);
9574 -- If we have a class-wide type that comes from the limited view then we
9575 -- return the Underlying_Type of its nonlimited view.
9577 elsif Ekind
(Id
) = E_Class_Wide_Type
9578 and then From_Limited_With
(Id
)
9579 and then Present
(Non_Limited_View
(Id
))
9581 return Underlying_Type
(Non_Limited_View
(Id
));
9583 elsif Ekind
(Id
) in Incomplete_Or_Private_Kind
then
9585 -- If we have an incomplete or private type with a full view, then we
9586 -- return the Underlying_Type of this full view.
9588 if Present
(Full_View
(Id
)) then
9589 if Id
= Full_View
(Id
) then
9591 -- Previous error in declaration
9596 return Underlying_Type
(Full_View
(Id
));
9599 -- If we have a private type with an underlying full view, then we
9600 -- return the Underlying_Type of this underlying full view.
9602 elsif Ekind
(Id
) in Private_Kind
9603 and then Present
(Underlying_Full_View
(Id
))
9605 return Underlying_Type
(Underlying_Full_View
(Id
));
9607 -- If we have an incomplete entity that comes from the limited view
9608 -- then we return the Underlying_Type of its nonlimited view.
9610 elsif From_Limited_With
(Id
)
9611 and then Present
(Non_Limited_View
(Id
))
9613 return Underlying_Type
(Non_Limited_View
(Id
));
9615 -- Otherwise check for the case where we have a derived type or
9616 -- subtype, and if so get the Underlying_Type of the parent type.
9618 elsif Etype
(Id
) /= Id
then
9619 return Underlying_Type
(Etype
(Id
));
9621 -- Otherwise we have an incomplete or private type that has no full
9622 -- view, which means that we have not encountered the completion, so
9623 -- return Empty to indicate the underlying type is not yet known.
9629 -- For non-incomplete, non-private types, return the type itself Also
9630 -- for entities that are not types at all return the entity itself.
9635 end Underlying_Type
;
9637 ------------------------
9638 -- Unlink_Next_Entity --
9639 ------------------------
9641 procedure Unlink_Next_Entity
(Id
: Entity_Id
) is
9642 Next
: constant Entity_Id
:= Next_Entity
(Id
);
9645 if Present
(Next
) then
9646 Set_Prev_Entity
(Next
, Empty
); -- Empty <-- Next
9649 Set_Next_Entity
(Id
, Empty
); -- Id --> Empty
9650 end Unlink_Next_Entity
;
9652 ------------------------
9653 -- Write_Entity_Flags --
9654 ------------------------
9656 procedure Write_Entity_Flags
(Id
: Entity_Id
; Prefix
: String) is
9658 procedure W
(Flag_Name
: String; Flag
: Boolean);
9659 -- Write out given flag if it is set
9665 procedure W
(Flag_Name
: String; Flag
: Boolean) is
9669 Write_Str
(Flag_Name
);
9670 Write_Str
(" = True");
9675 -- Start of processing for Write_Entity_Flags
9678 if (Is_Array_Type
(Id
) or else Is_Record_Type
(Id
))
9679 and then Is_Base_Type
(Id
)
9682 Write_Str
("Component_Alignment = ");
9684 case Component_Alignment
(Id
) is
9685 when Calign_Default
=>
9686 Write_Str
("Calign_Default");
9688 when Calign_Component_Size
=>
9689 Write_Str
("Calign_Component_Size");
9691 when Calign_Component_Size_4
=>
9692 Write_Str
("Calign_Component_Size_4");
9694 when Calign_Storage_Unit
=>
9695 Write_Str
("Calign_Storage_Unit");
9701 W
("Address_Taken", Flag104
(Id
));
9702 W
("Body_Needed_For_Inlining", Flag299
(Id
));
9703 W
("Body_Needed_For_SAL", Flag40
(Id
));
9704 W
("C_Pass_By_Copy", Flag125
(Id
));
9705 W
("Can_Never_Be_Null", Flag38
(Id
));
9706 W
("Checks_May_Be_Suppressed", Flag31
(Id
));
9707 W
("Contains_Ignored_Ghost_Code", Flag279
(Id
));
9708 W
("Debug_Info_Off", Flag166
(Id
));
9709 W
("Default_Expressions_Processed", Flag108
(Id
));
9710 W
("Delay_Cleanups", Flag114
(Id
));
9711 W
("Delay_Subprogram_Descriptors", Flag50
(Id
));
9712 W
("Depends_On_Private", Flag14
(Id
));
9713 W
("Discard_Names", Flag88
(Id
));
9714 W
("Elaboration_Entity_Required", Flag174
(Id
));
9715 W
("Elaborate_Body_Desirable", Flag210
(Id
));
9716 W
("Entry_Accepted", Flag152
(Id
));
9717 W
("Can_Use_Internal_Rep", Flag229
(Id
));
9718 W
("Finalize_Storage_Only", Flag158
(Id
));
9719 W
("From_Limited_With", Flag159
(Id
));
9720 W
("Has_Aliased_Components", Flag135
(Id
));
9721 W
("Has_Alignment_Clause", Flag46
(Id
));
9722 W
("Has_All_Calls_Remote", Flag79
(Id
));
9723 W
("Has_Atomic_Components", Flag86
(Id
));
9724 W
("Has_Biased_Representation", Flag139
(Id
));
9725 W
("Has_Completion", Flag26
(Id
));
9726 W
("Has_Completion_In_Body", Flag71
(Id
));
9727 W
("Has_Complex_Representation", Flag140
(Id
));
9728 W
("Has_Component_Size_Clause", Flag68
(Id
));
9729 W
("Has_Contiguous_Rep", Flag181
(Id
));
9730 W
("Has_Controlled_Component", Flag43
(Id
));
9731 W
("Has_Controlling_Result", Flag98
(Id
));
9732 W
("Has_Convention_Pragma", Flag119
(Id
));
9733 W
("Has_Default_Aspect", Flag39
(Id
));
9734 W
("Has_Delayed_Aspects", Flag200
(Id
));
9735 W
("Has_Delayed_Freeze", Flag18
(Id
));
9736 W
("Has_Delayed_Rep_Aspects", Flag261
(Id
));
9737 W
("Has_Discriminants", Flag5
(Id
));
9738 W
("Has_Dispatch_Table", Flag220
(Id
));
9739 W
("Has_Dynamic_Predicate_Aspect", Flag258
(Id
));
9740 W
("Has_Enumeration_Rep_Clause", Flag66
(Id
));
9741 W
("Has_Exit", Flag47
(Id
));
9742 W
("Has_Expanded_Contract", Flag240
(Id
));
9743 W
("Has_Forward_Instantiation", Flag175
(Id
));
9744 W
("Has_Fully_Qualified_Name", Flag173
(Id
));
9745 W
("Has_Gigi_Rep_Item", Flag82
(Id
));
9746 W
("Has_Homonym", Flag56
(Id
));
9747 W
("Has_Implicit_Dereference", Flag251
(Id
));
9748 W
("Has_Independent_Components", Flag34
(Id
));
9749 W
("Has_Inheritable_Invariants", Flag248
(Id
));
9750 W
("Has_Inherited_DIC", Flag133
(Id
));
9751 W
("Has_Inherited_Invariants", Flag291
(Id
));
9752 W
("Has_Initial_Value", Flag219
(Id
));
9753 W
("Has_Loop_Entry_Attributes", Flag260
(Id
));
9754 W
("Has_Machine_Radix_Clause", Flag83
(Id
));
9755 W
("Has_Master_Entity", Flag21
(Id
));
9756 W
("Has_Missing_Return", Flag142
(Id
));
9757 W
("Has_Nested_Block_With_Handler", Flag101
(Id
));
9758 W
("Has_Nested_Subprogram", Flag282
(Id
));
9759 W
("Has_Non_Standard_Rep", Flag75
(Id
));
9760 W
("Has_Out_Or_In_Out_Parameter", Flag110
(Id
));
9761 W
("Has_Object_Size_Clause", Flag172
(Id
));
9762 W
("Has_Own_DIC", Flag3
(Id
));
9763 W
("Has_Own_Invariants", Flag232
(Id
));
9764 W
("Has_Per_Object_Constraint", Flag154
(Id
));
9765 W
("Has_Pragma_Controlled", Flag27
(Id
));
9766 W
("Has_Pragma_Elaborate_Body", Flag150
(Id
));
9767 W
("Has_Pragma_Inline", Flag157
(Id
));
9768 W
("Has_Pragma_Inline_Always", Flag230
(Id
));
9769 W
("Has_Pragma_No_Inline", Flag201
(Id
));
9770 W
("Has_Pragma_Ordered", Flag198
(Id
));
9771 W
("Has_Pragma_Pack", Flag121
(Id
));
9772 W
("Has_Pragma_Preelab_Init", Flag221
(Id
));
9773 W
("Has_Pragma_Pure", Flag203
(Id
));
9774 W
("Has_Pragma_Pure_Function", Flag179
(Id
));
9775 W
("Has_Pragma_Thread_Local_Storage", Flag169
(Id
));
9776 W
("Has_Pragma_Unmodified", Flag233
(Id
));
9777 W
("Has_Pragma_Unreferenced", Flag180
(Id
));
9778 W
("Has_Pragma_Unreferenced_Objects", Flag212
(Id
));
9779 W
("Has_Pragma_Unused", Flag294
(Id
));
9780 W
("Has_Predicates", Flag250
(Id
));
9781 W
("Has_Primitive_Operations", Flag120
(Id
));
9782 W
("Has_Private_Ancestor", Flag151
(Id
));
9783 W
("Has_Private_Declaration", Flag155
(Id
));
9784 W
("Has_Private_Extension", Flag300
(Id
));
9785 W
("Has_Protected", Flag271
(Id
));
9786 W
("Has_Qualified_Name", Flag161
(Id
));
9787 W
("Has_RACW", Flag214
(Id
));
9788 W
("Has_Record_Rep_Clause", Flag65
(Id
));
9789 W
("Has_Recursive_Call", Flag143
(Id
));
9790 W
("Has_Shift_Operator", Flag267
(Id
));
9791 W
("Has_Size_Clause", Flag29
(Id
));
9792 W
("Has_Small_Clause", Flag67
(Id
));
9793 W
("Has_Specified_Layout", Flag100
(Id
));
9794 W
("Has_Specified_Stream_Input", Flag190
(Id
));
9795 W
("Has_Specified_Stream_Output", Flag191
(Id
));
9796 W
("Has_Specified_Stream_Read", Flag192
(Id
));
9797 W
("Has_Specified_Stream_Write", Flag193
(Id
));
9798 W
("Has_Static_Discriminants", Flag211
(Id
));
9799 W
("Has_Static_Predicate", Flag269
(Id
));
9800 W
("Has_Static_Predicate_Aspect", Flag259
(Id
));
9801 W
("Has_Storage_Size_Clause", Flag23
(Id
));
9802 W
("Has_Stream_Size_Clause", Flag184
(Id
));
9803 W
("Has_Task", Flag30
(Id
));
9804 W
("Has_Timing_Event", Flag289
(Id
));
9805 W
("Has_Thunks", Flag228
(Id
));
9806 W
("Has_Unchecked_Union", Flag123
(Id
));
9807 W
("Has_Unknown_Discriminants", Flag72
(Id
));
9808 W
("Has_Visible_Refinement", Flag263
(Id
));
9809 W
("Has_Volatile_Components", Flag87
(Id
));
9810 W
("Has_Xref_Entry", Flag182
(Id
));
9811 W
("Ignore_SPARK_Mode_Pragmas", Flag301
(Id
));
9812 W
("In_Package_Body", Flag48
(Id
));
9813 W
("In_Private_Part", Flag45
(Id
));
9814 W
("In_Use", Flag8
(Id
));
9815 W
("Is_Abstract_Subprogram", Flag19
(Id
));
9816 W
("Is_Abstract_Type", Flag146
(Id
));
9817 W
("Is_Access_Constant", Flag69
(Id
));
9818 W
("Is_Actual_Subtype", Flag293
(Id
));
9819 W
("Is_Ada_2005_Only", Flag185
(Id
));
9820 W
("Is_Ada_2012_Only", Flag199
(Id
));
9821 W
("Is_Aliased", Flag15
(Id
));
9822 W
("Is_Asynchronous", Flag81
(Id
));
9823 W
("Is_Atomic", Flag85
(Id
));
9824 W
("Is_Bit_Packed_Array", Flag122
(Id
));
9825 W
("Is_CPP_Class", Flag74
(Id
));
9826 W
("Is_Called", Flag102
(Id
));
9827 W
("Is_Character_Type", Flag63
(Id
));
9828 W
("Is_Checked_Ghost_Entity", Flag277
(Id
));
9829 W
("Is_Child_Unit", Flag73
(Id
));
9830 W
("Is_Class_Wide_Equivalent_Type", Flag35
(Id
));
9831 W
("Is_Compilation_Unit", Flag149
(Id
));
9832 W
("Is_Completely_Hidden", Flag103
(Id
));
9833 W
("Is_Concurrent_Record_Type", Flag20
(Id
));
9834 W
("Is_Constr_Subt_For_UN_Aliased", Flag141
(Id
));
9835 W
("Is_Constr_Subt_For_U_Nominal", Flag80
(Id
));
9836 W
("Is_Constrained", Flag12
(Id
));
9837 W
("Is_Constructor", Flag76
(Id
));
9838 W
("Is_Controlled_Active", Flag42
(Id
));
9839 W
("Is_Controlling_Formal", Flag97
(Id
));
9840 W
("Is_Descendant_Of_Address", Flag223
(Id
));
9841 W
("Is_DIC_Procedure", Flag132
(Id
));
9842 W
("Is_Discrim_SO_Function", Flag176
(Id
));
9843 W
("Is_Discriminant_Check_Function", Flag264
(Id
));
9844 W
("Is_Dispatch_Table_Entity", Flag234
(Id
));
9845 W
("Is_Dispatching_Operation", Flag6
(Id
));
9846 W
("Is_Elaboration_Checks_OK_Id", Flag148
(Id
));
9847 W
("Is_Elaboration_Warnings_OK_Id", Flag304
(Id
));
9848 W
("Is_Eliminated", Flag124
(Id
));
9849 W
("Is_Entry_Formal", Flag52
(Id
));
9850 W
("Is_Exception_Handler", Flag286
(Id
));
9851 W
("Is_Exported", Flag99
(Id
));
9852 W
("Is_Finalized_Transient", Flag252
(Id
));
9853 W
("Is_First_Subtype", Flag70
(Id
));
9854 W
("Is_For_Access_Subtype", Flag118
(Id
));
9855 W
("Is_Formal_Subprogram", Flag111
(Id
));
9856 W
("Is_Frozen", Flag4
(Id
));
9857 W
("Is_Generic_Actual_Subprogram", Flag274
(Id
));
9858 W
("Is_Generic_Actual_Type", Flag94
(Id
));
9859 W
("Is_Generic_Instance", Flag130
(Id
));
9860 W
("Is_Generic_Type", Flag13
(Id
));
9861 W
("Is_Hidden", Flag57
(Id
));
9862 W
("Is_Hidden_Non_Overridden_Subpgm", Flag2
(Id
));
9863 W
("Is_Hidden_Open_Scope", Flag171
(Id
));
9864 W
("Is_Ignored_Ghost_Entity", Flag278
(Id
));
9865 W
("Is_Ignored_Transient", Flag295
(Id
));
9866 W
("Is_Immediately_Visible", Flag7
(Id
));
9867 W
("Is_Implementation_Defined", Flag254
(Id
));
9868 W
("Is_Imported", Flag24
(Id
));
9869 W
("Is_Independent", Flag268
(Id
));
9870 W
("Is_Initial_Condition_Procedure", Flag302
(Id
));
9871 W
("Is_Inlined", Flag11
(Id
));
9872 W
("Is_Inlined_Always", Flag1
(Id
));
9873 W
("Is_Instantiated", Flag126
(Id
));
9874 W
("Is_Interface", Flag186
(Id
));
9875 W
("Is_Internal", Flag17
(Id
));
9876 W
("Is_Interrupt_Handler", Flag89
(Id
));
9877 W
("Is_Intrinsic_Subprogram", Flag64
(Id
));
9878 W
("Is_Invariant_Procedure", Flag257
(Id
));
9879 W
("Is_Itype", Flag91
(Id
));
9880 W
("Is_Known_Non_Null", Flag37
(Id
));
9881 W
("Is_Known_Null", Flag204
(Id
));
9882 W
("Is_Known_Valid", Flag170
(Id
));
9883 W
("Is_Limited_Composite", Flag106
(Id
));
9884 W
("Is_Limited_Interface", Flag197
(Id
));
9885 W
("Is_Limited_Record", Flag25
(Id
));
9886 W
("Is_Local_Anonymous_Access", Flag194
(Id
));
9887 W
("Is_Loop_Parameter", Flag307
(Id
));
9888 W
("Is_Machine_Code_Subprogram", Flag137
(Id
));
9889 W
("Is_Non_Static_Subtype", Flag109
(Id
));
9890 W
("Is_Null_Init_Proc", Flag178
(Id
));
9891 W
("Is_Obsolescent", Flag153
(Id
));
9892 W
("Is_Only_Out_Parameter", Flag226
(Id
));
9893 W
("Is_Package_Body_Entity", Flag160
(Id
));
9894 W
("Is_Packed", Flag51
(Id
));
9895 W
("Is_Packed_Array_Impl_Type", Flag138
(Id
));
9896 W
("Is_Param_Block_Component_Type", Flag215
(Id
));
9897 W
("Is_Partial_Invariant_Procedure", Flag292
(Id
));
9898 W
("Is_Potentially_Use_Visible", Flag9
(Id
));
9899 W
("Is_Predicate_Function", Flag255
(Id
));
9900 W
("Is_Predicate_Function_M", Flag256
(Id
));
9901 W
("Is_Preelaborated", Flag59
(Id
));
9902 W
("Is_Primitive", Flag218
(Id
));
9903 W
("Is_Primitive_Wrapper", Flag195
(Id
));
9904 W
("Is_Private_Composite", Flag107
(Id
));
9905 W
("Is_Private_Descendant", Flag53
(Id
));
9906 W
("Is_Private_Primitive", Flag245
(Id
));
9907 W
("Is_Public", Flag10
(Id
));
9908 W
("Is_Pure", Flag44
(Id
));
9909 W
("Is_Pure_Unit_Access_Type", Flag189
(Id
));
9910 W
("Is_RACW_Stub_Type", Flag244
(Id
));
9911 W
("Is_Raised", Flag224
(Id
));
9912 W
("Is_Remote_Call_Interface", Flag62
(Id
));
9913 W
("Is_Remote_Types", Flag61
(Id
));
9914 W
("Is_Renaming_Of_Object", Flag112
(Id
));
9915 W
("Is_Return_Object", Flag209
(Id
));
9916 W
("Is_Safe_To_Reevaluate", Flag249
(Id
));
9917 W
("Is_Shared_Passive", Flag60
(Id
));
9918 W
("Is_Static_Type", Flag281
(Id
));
9919 W
("Is_Statically_Allocated", Flag28
(Id
));
9920 W
("Is_Tag", Flag78
(Id
));
9921 W
("Is_Tagged_Type", Flag55
(Id
));
9922 W
("Is_Thunk", Flag225
(Id
));
9923 W
("Is_Trivial_Subprogram", Flag235
(Id
));
9924 W
("Is_True_Constant", Flag163
(Id
));
9925 W
("Is_Unchecked_Union", Flag117
(Id
));
9926 W
("Is_Underlying_Full_View", Flag298
(Id
));
9927 W
("Is_Underlying_Record_View", Flag246
(Id
));
9928 W
("Is_Unimplemented", Flag284
(Id
));
9929 W
("Is_Unsigned_Type", Flag144
(Id
));
9930 W
("Is_Uplevel_Referenced_Entity", Flag283
(Id
));
9931 W
("Is_Valued_Procedure", Flag127
(Id
));
9932 W
("Is_Visible_Formal", Flag206
(Id
));
9933 W
("Is_Visible_Lib_Unit", Flag116
(Id
));
9934 W
("Is_Volatile", Flag16
(Id
));
9935 W
("Is_Volatile_Full_Access", Flag285
(Id
));
9936 W
("Itype_Printed", Flag202
(Id
));
9937 W
("Kill_Elaboration_Checks", Flag32
(Id
));
9938 W
("Kill_Range_Checks", Flag33
(Id
));
9939 W
("Known_To_Have_Preelab_Init", Flag207
(Id
));
9940 W
("Low_Bound_Tested", Flag205
(Id
));
9941 W
("Machine_Radix_10", Flag84
(Id
));
9942 W
("Materialize_Entity", Flag168
(Id
));
9943 W
("May_Inherit_Delayed_Rep_Aspects", Flag262
(Id
));
9944 W
("Must_Be_On_Byte_Boundary", Flag183
(Id
));
9945 W
("Must_Have_Preelab_Init", Flag208
(Id
));
9946 W
("Needs_Activation_Record", Flag306
(Id
));
9947 W
("Needs_Debug_Info", Flag147
(Id
));
9948 W
("Needs_No_Actuals", Flag22
(Id
));
9949 W
("Never_Set_In_Source", Flag115
(Id
));
9950 W
("No_Dynamic_Predicate_On_actual", Flag276
(Id
));
9951 W
("No_Pool_Assigned", Flag131
(Id
));
9952 W
("No_Predicate_On_actual", Flag275
(Id
));
9953 W
("No_Reordering", Flag239
(Id
));
9954 W
("No_Return", Flag113
(Id
));
9955 W
("No_Strict_Aliasing", Flag136
(Id
));
9956 W
("Non_Binary_Modulus", Flag58
(Id
));
9957 W
("Nonzero_Is_True", Flag162
(Id
));
9958 W
("OK_To_Rename", Flag247
(Id
));
9959 W
("Optimize_Alignment_Space", Flag241
(Id
));
9960 W
("Optimize_Alignment_Time", Flag242
(Id
));
9961 W
("Overlays_Constant", Flag243
(Id
));
9962 W
("Partial_View_Has_Unknown_Discr", Flag280
(Id
));
9963 W
("Reachable", Flag49
(Id
));
9964 W
("Referenced", Flag156
(Id
));
9965 W
("Referenced_As_LHS", Flag36
(Id
));
9966 W
("Referenced_As_Out_Parameter", Flag227
(Id
));
9967 W
("Renamed_In_Spec", Flag231
(Id
));
9968 W
("Requires_Overriding", Flag213
(Id
));
9969 W
("Return_Present", Flag54
(Id
));
9970 W
("Returns_By_Ref", Flag90
(Id
));
9971 W
("Reverse_Bit_Order", Flag164
(Id
));
9972 W
("Reverse_Storage_Order", Flag93
(Id
));
9973 W
("Rewritten_For_C", Flag287
(Id
));
9974 W
("Predicates_Ignored", Flag288
(Id
));
9975 W
("Sec_Stack_Needed_For_Return", Flag167
(Id
));
9976 W
("Size_Depends_On_Discriminant", Flag177
(Id
));
9977 W
("Size_Known_At_Compile_Time", Flag92
(Id
));
9978 W
("SPARK_Aux_Pragma_Inherited", Flag266
(Id
));
9979 W
("SPARK_Pragma_Inherited", Flag265
(Id
));
9980 W
("SSO_Set_High_By_Default", Flag273
(Id
));
9981 W
("SSO_Set_Low_By_Default", Flag272
(Id
));
9982 W
("Static_Elaboration_Desired", Flag77
(Id
));
9983 W
("Stores_Attribute_Old_Prefix", Flag270
(Id
));
9984 W
("Strict_Alignment", Flag145
(Id
));
9985 W
("Suppress_Elaboration_Warnings", Flag303
(Id
));
9986 W
("Suppress_Initialization", Flag105
(Id
));
9987 W
("Suppress_Style_Checks", Flag165
(Id
));
9988 W
("Suppress_Value_Tracking_On_Call", Flag217
(Id
));
9989 W
("Treat_As_Volatile", Flag41
(Id
));
9990 W
("Universal_Aliasing", Flag216
(Id
));
9991 W
("Used_As_Generic_Actual", Flag222
(Id
));
9992 W
("Uses_Sec_Stack", Flag95
(Id
));
9993 W
("Warnings_Off", Flag96
(Id
));
9994 W
("Warnings_Off_Used", Flag236
(Id
));
9995 W
("Warnings_Off_Used_Unmodified", Flag237
(Id
));
9996 W
("Warnings_Off_Used_Unreferenced", Flag238
(Id
));
9997 W
("Was_Hidden", Flag196
(Id
));
9998 end Write_Entity_Flags
;
10000 -----------------------
10001 -- Write_Entity_Info --
10002 -----------------------
10004 procedure Write_Entity_Info
(Id
: Entity_Id
; Prefix
: String) is
10006 procedure Write_Attribute
(Which
: String; Nam
: E
);
10007 -- Write attribute value with given string name
10009 procedure Write_Kind
(Id
: Entity_Id
);
10010 -- Write Ekind field of entity
10012 ---------------------
10013 -- Write_Attribute --
10014 ---------------------
10016 procedure Write_Attribute
(Which
: String; Nam
: E
) is
10018 Write_Str
(Prefix
);
10020 Write_Int
(Int
(Nam
));
10022 Write_Name
(Chars
(Nam
));
10024 end Write_Attribute
;
10030 procedure Write_Kind
(Id
: Entity_Id
) is
10031 K
: constant String := Entity_Kind
'Image (Ekind
(Id
));
10034 Write_Str
(Prefix
);
10035 Write_Str
(" Kind ");
10037 if Is_Type
(Id
) and then Is_Tagged_Type
(Id
) then
10038 Write_Str
("TAGGED ");
10041 Write_Str
(K
(3 .. K
'Length));
10044 if Is_Type
(Id
) and then Depends_On_Private
(Id
) then
10045 Write_Str
("Depends_On_Private ");
10049 -- Start of processing for Write_Entity_Info
10053 Write_Attribute
("Name ", Id
);
10054 Write_Int
(Int
(Id
));
10058 Write_Attribute
(" Type ", Etype
(Id
));
10060 Write_Attribute
(" Scope ", Scope
(Id
));
10064 when Discrete_Kind
=>
10065 Write_Str
("Bounds: Id = ");
10067 if Present
(Scalar_Range
(Id
)) then
10068 Write_Int
(Int
(Type_Low_Bound
(Id
)));
10069 Write_Str
(" .. Id = ");
10070 Write_Int
(Int
(Type_High_Bound
(Id
)));
10072 Write_Str
("Empty");
10083 (" Component Type ", Component_Type
(Id
));
10085 Write_Str
(Prefix
);
10086 Write_Str
(" Indexes ");
10088 Index
:= First_Index
(Id
);
10089 while Present
(Index
) loop
10090 Write_Attribute
(" ", Etype
(Index
));
10091 Index
:= Next_Index
(Index
);
10097 when Access_Kind
=>
10099 (" Directly Designated Type ",
10100 Directly_Designated_Type
(Id
));
10103 when Overloadable_Kind
=>
10104 if Present
(Homonym
(Id
)) then
10105 Write_Str
(" Homonym ");
10106 Write_Name
(Chars
(Homonym
(Id
)));
10108 Write_Int
(Int
(Homonym
(Id
)));
10114 when E_Component
=>
10115 if Ekind
(Scope
(Id
)) in Record_Kind
then
10117 " Original_Record_Component ",
10118 Original_Record_Component
(Id
));
10119 Write_Int
(Int
(Original_Record_Component
(Id
)));
10126 end Write_Entity_Info
;
10128 -----------------------
10129 -- Write_Field6_Name --
10130 -----------------------
10132 procedure Write_Field6_Name
(Id
: Entity_Id
) is
10133 pragma Unreferenced
(Id
);
10135 Write_Str
("First_Rep_Item");
10136 end Write_Field6_Name
;
10138 -----------------------
10139 -- Write_Field7_Name --
10140 -----------------------
10142 procedure Write_Field7_Name
(Id
: Entity_Id
) is
10143 pragma Unreferenced
(Id
);
10145 Write_Str
("Freeze_Node");
10146 end Write_Field7_Name
;
10148 -----------------------
10149 -- Write_Field8_Name --
10150 -----------------------
10152 procedure Write_Field8_Name
(Id
: Entity_Id
) is
10156 Write_Str
("Associated_Node_For_Itype");
10159 Write_Str
("Dependent_Instances");
10162 Write_Str
("First_Exit_Statement");
10165 Write_Str
("Hiding_Loop_Variable");
10169 | E_Subprogram_Body
10171 Write_Str
("Mechanism");
10176 Write_Str
("Normalized_First_Bit");
10178 when E_Abstract_State
=>
10179 Write_Str
("Refinement_Constituents");
10181 when E_Return_Statement
=>
10182 Write_Str
("Return_Applies_To");
10185 Write_Str
("Field8??");
10187 end Write_Field8_Name
;
10189 -----------------------
10190 -- Write_Field9_Name --
10191 -----------------------
10193 procedure Write_Field9_Name
(Id
: Entity_Id
) is
10197 Write_Str
("Class_Wide_Type");
10199 when Object_Kind
=>
10200 Write_Str
("Current_Value");
10203 | E_Generic_Function
10204 | E_Generic_Package
10205 | E_Generic_Procedure
10209 Write_Str
("Renaming_Map");
10212 Write_Str
("Field9??");
10214 end Write_Field9_Name
;
10216 ------------------------
10217 -- Write_Field10_Name --
10218 ------------------------
10220 procedure Write_Field10_Name
(Id
: Entity_Id
) is
10223 when Class_Wide_Kind
10230 Write_Str
("Direct_Primitive_Operations");
10235 Write_Str
("Discriminal_Link");
10238 Write_Str
("Float_Rep");
10245 Write_Str
("Handler_Records");
10250 Write_Str
("Normalized_Position_Max");
10252 when E_Abstract_State
10255 Write_Str
("Part_Of_Constituents");
10258 Write_Str
("Field10??");
10260 end Write_Field10_Name
;
10262 ------------------------
10263 -- Write_Field11_Name --
10264 ------------------------
10266 procedure Write_Field11_Name
(Id
: Entity_Id
) is
10270 Write_Str
("Block_Node");
10275 Write_Str
("Component_Bit_Offset");
10277 when Formal_Kind
=>
10278 Write_Str
("Entry_Component");
10280 when E_Enumeration_Literal
=>
10281 Write_Str
("Enumeration_Pos");
10286 Write_Str
("Full_View");
10288 when E_Generic_Package
=>
10289 Write_Str
("Generic_Homonym");
10292 Write_Str
("Part_Of_References");
10299 Write_Str
("Protected_Body_Subprogram");
10302 Write_Str
("Field11??");
10304 end Write_Field11_Name
;
10306 ------------------------
10307 -- Write_Field12_Name --
10308 ------------------------
10310 procedure Write_Field12_Name
(Id
: Entity_Id
) is
10314 Write_Str
("Associated_Formal_Package");
10317 Write_Str
("Barrier_Function");
10319 when E_Enumeration_Literal
=>
10320 Write_Str
("Enumeration_Rep");
10328 | E_In_Out_Parameter
10333 Write_Str
("Esize");
10338 Write_Str
("Next_Inlined_Subprogram");
10341 Write_Str
("Field12??");
10343 end Write_Field12_Name
;
10345 ------------------------
10346 -- Write_Field13_Name --
10347 ------------------------
10349 procedure Write_Field13_Name
(Id
: Entity_Id
) is
10355 Write_Str
("Component_Clause");
10360 | Generic_Unit_Kind
10362 Write_Str
("Elaboration_Entity");
10367 Write_Str
("Extra_Accessibility");
10370 Write_Str
("RM_Size");
10373 Write_Str
("Field13??");
10375 end Write_Field13_Name
;
10377 -----------------------
10378 -- Write_Field14_Name --
10379 -----------------------
10381 procedure Write_Field14_Name
(Id
: Entity_Id
) is
10391 Write_Str
("Alignment");
10396 Write_Str
("Normalized_Position");
10403 Write_Str
("Postconditions_Proc");
10405 when E_Generic_Package
10408 Write_Str
("Shadow_Entities");
10411 Write_Str
("Field14??");
10413 end Write_Field14_Name
;
10415 ------------------------
10416 -- Write_Field15_Name --
10417 ------------------------
10419 procedure Write_Field15_Name
(Id
: Entity_Id
) is
10422 when E_Discriminant
=>
10423 Write_Str
("Discriminant_Number");
10425 when E_Component
=>
10426 Write_Str
("DT_Entry_Count");
10431 Write_Str
("DT_Position");
10434 Write_Str
("Entry_Parameters_Type");
10436 when Formal_Kind
=>
10437 Write_Str
("Extra_Formal");
10440 Write_Str
("Pending_Access_Types");
10445 Write_Str
("Related_Instance");
10451 Write_Str
("Status_Flag_Or_Transient_Decl");
10454 Write_Str
("Field15??");
10456 end Write_Field15_Name
;
10458 ------------------------
10459 -- Write_Field16_Name --
10460 ------------------------
10462 procedure Write_Field16_Name
(Id
: Entity_Id
) is
10466 | E_Record_Type_With_Private
10468 Write_Str
("Access_Disp_Table");
10470 when E_Abstract_State
=>
10471 Write_Str
("Body_References");
10473 when E_Class_Wide_Subtype
10476 Write_Str
("Cloned_Subtype");
10481 Write_Str
("DTC_Entity");
10483 when E_Component
=>
10484 Write_Str
("Entry_Formal");
10486 when Concurrent_Kind
10487 | E_Generic_Package
10490 Write_Str
("First_Private_Entity");
10492 when Enumeration_Kind
=>
10493 Write_Str
("Lit_Strings");
10495 when Decimal_Fixed_Point_Kind
=>
10496 Write_Str
("Scale_Value");
10498 when E_String_Literal_Subtype
=>
10499 Write_Str
("String_Literal_Length");
10501 when E_Out_Parameter
10504 Write_Str
("Unset_Reference");
10507 Write_Str
("Field16??");
10509 end Write_Field16_Name
;
10511 ------------------------
10512 -- Write_Field17_Name --
10513 ------------------------
10515 procedure Write_Field17_Name
(Id
: Entity_Id
) is
10520 | E_Generic_In_Out_Parameter
10523 Write_Str
("Actual_Subtype");
10525 when Digits_Kind
=>
10526 Write_Str
("Digits_Value");
10528 when E_Discriminant
=>
10529 Write_Str
("Discriminal");
10531 when Class_Wide_Kind
10538 | E_Generic_Function
10539 | E_Generic_Package
10540 | E_Generic_Procedure
10548 | E_Return_Statement
10549 | E_Subprogram_Body
10550 | E_Subprogram_Type
10552 Write_Str
("First_Entity");
10555 Write_Str
("First_Index");
10557 when Enumeration_Kind
=>
10558 Write_Str
("First_Literal");
10560 when Access_Kind
=>
10561 Write_Str
("Master_Id");
10563 when Modular_Integer_Kind
=>
10564 Write_Str
("Modulus");
10566 when E_Component
=>
10567 Write_Str
("Prival");
10570 Write_Str
("Field17??");
10572 end Write_Field17_Name
;
10574 ------------------------
10575 -- Write_Field18_Name --
10576 ------------------------
10578 procedure Write_Field18_Name
(Id
: Entity_Id
) is
10581 when E_Enumeration_Literal
10586 Write_Str
("Alias");
10588 when E_Record_Type
=>
10589 Write_Str
("Corresponding_Concurrent_Type");
10591 when E_Subprogram_Body
=>
10592 Write_Str
("Corresponding_Protected_Entry");
10594 when Concurrent_Kind
=>
10595 Write_Str
("Corresponding_Record_Type");
10601 Write_Str
("Enclosing_Scope");
10603 when E_Entry_Index_Parameter
=>
10604 Write_Str
("Entry_Index_Constant");
10606 when E_Access_Protected_Subprogram_Type
10607 | E_Access_Subprogram_Type
10608 | E_Anonymous_Access_Protected_Subprogram_Type
10610 | E_Class_Wide_Subtype
10612 Write_Str
("Equivalent_Type");
10614 when Fixed_Point_Kind
=>
10615 Write_Str
("Delta_Value");
10617 when Enumeration_Kind
=>
10618 Write_Str
("Lit_Indexes");
10620 when Incomplete_Or_Private_Kind
10623 Write_Str
("Private_Dependents");
10626 | E_Generic_Function
10627 | E_Generic_Package
10628 | E_Generic_Procedure
10631 Write_Str
("Renamed_Entity");
10633 when Object_Kind
=>
10634 Write_Str
("Renamed_Object");
10636 when E_String_Literal_Subtype
=>
10637 Write_Str
("String_Literal_Low_Bound");
10640 Write_Str
("Field18??");
10642 end Write_Field18_Name
;
10644 -----------------------
10645 -- Write_Field19_Name --
10646 -----------------------
10648 procedure Write_Field19_Name
(Id
: Entity_Id
) is
10651 when E_Generic_Package
10654 Write_Str
("Body_Entity");
10656 when E_Discriminant
=>
10657 Write_Str
("Corresponding_Discriminant");
10659 when Scalar_Kind
=>
10660 Write_Str
("Default_Aspect_Value");
10662 when E_Array_Type
=>
10663 Write_Str
("Default_Component_Value");
10665 when E_Protected_Type
=>
10666 Write_Str
("Entry_Bodies_Array");
10670 | E_Subprogram_Type
10672 Write_Str
("Extra_Accessibility_Of_Result");
10674 when E_Abstract_State
10675 | E_Class_Wide_Type
10676 | E_Incomplete_Type
10678 Write_Str
("Non_Limited_View");
10680 when E_Incomplete_Subtype
=>
10681 if From_Limited_With
(Id
) then
10682 Write_Str
("Non_Limited_View");
10685 when E_Record_Type
=>
10686 Write_Str
("Parent_Subtype");
10688 when E_Procedure
=>
10689 Write_Str
("Receiving_Entry");
10694 Write_Str
("Size_Check_Code");
10699 Write_Str
("Spec_Entity");
10701 when Private_Kind
=>
10702 Write_Str
("Underlying_Full_View");
10705 Write_Str
("Field19??");
10707 end Write_Field19_Name
;
10709 -----------------------
10710 -- Write_Field20_Name --
10711 -----------------------
10713 procedure Write_Field20_Name
(Id
: Entity_Id
) is
10717 Write_Str
("Component_Type");
10719 when E_Generic_In_Parameter
10722 Write_Str
("Default_Value");
10724 when Access_Kind
=>
10725 Write_Str
("Directly_Designated_Type");
10727 when E_Component
=>
10728 Write_Str
("Discriminant_Checking_Func");
10730 when E_Discriminant
=>
10731 Write_Str
("Discriminant_Default_Value");
10733 when Class_Wide_Kind
10740 | E_Generic_Function
10741 | E_Generic_Package
10742 | E_Generic_Procedure
10750 | E_Return_Statement
10751 | E_Subprogram_Body
10752 | E_Subprogram_Type
10754 Write_Str
("Last_Entity");
10759 Write_Str
("Prival_Link");
10761 when E_Exception
=>
10762 Write_Str
("Register_Exception_Call");
10764 when Scalar_Kind
=>
10765 Write_Str
("Scalar_Range");
10768 Write_Str
("Field20??");
10770 end Write_Field20_Name
;
10772 -----------------------
10773 -- Write_Field21_Name --
10774 -----------------------
10776 procedure Write_Field21_Name
(Id
: Entity_Id
) is
10780 Write_Str
("Accept_Address");
10785 Write_Str
("Corresponding_Record_Component");
10787 when E_In_Parameter
=>
10788 Write_Str
("Default_Expr_Function");
10790 when Concurrent_Kind
10791 | Incomplete_Or_Private_Kind
10796 Write_Str
("Discriminant_Constraint");
10801 | E_Generic_Function
10802 | E_Generic_Procedure
10806 Write_Str
("Interface_Name");
10809 | Modular_Integer_Kind
10811 Write_Str
("Original_Array_Type");
10813 when Fixed_Point_Kind
=>
10814 Write_Str
("Small_Value");
10817 Write_Str
("Field21??");
10819 end Write_Field21_Name
;
10821 -----------------------
10822 -- Write_Field22_Name --
10823 -----------------------
10825 procedure Write_Field22_Name
(Id
: Entity_Id
) is
10828 when Access_Kind
=>
10829 Write_Str
("Associated_Storage_Pool");
10832 Write_Str
("Component_Size");
10834 when E_Record_Type
=>
10835 Write_Str
("Corresponding_Remote_Type");
10840 Write_Str
("Original_Record_Component");
10842 when E_Enumeration_Literal
=>
10843 Write_Str
("Enumeration_Rep_Expr");
10845 when E_Limited_Private_Subtype
10846 | E_Limited_Private_Type
10847 | E_Private_Subtype
10849 | E_Record_Subtype_With_Private
10850 | E_Record_Type_With_Private
10852 Write_Str
("Private_View");
10854 when Formal_Kind
=>
10855 Write_Str
("Protected_Formal");
10861 | E_Generic_Function
10862 | E_Generic_Package
10863 | E_Generic_Procedure
10869 | E_Return_Statement
10870 | E_Subprogram_Body
10873 Write_Str
("Scope_Depth_Value");
10876 Write_Str
("Shared_Var_Procs_Instance");
10879 Write_Str
("Field22??");
10881 end Write_Field22_Name
;
10883 ------------------------
10884 -- Write_Field23_Name --
10885 ------------------------
10887 procedure Write_Field23_Name
(Id
: Entity_Id
) is
10890 when E_Discriminant
=>
10891 Write_Str
("CR_Discriminant");
10894 Write_Str
("Entry_Cancel_Parameter");
10896 when E_Enumeration_Type
=>
10897 Write_Str
("Enum_Pos_To_Rep");
10902 Write_Str
("Extra_Constrained");
10904 when Access_Kind
=>
10905 Write_Str
("Finalization_Master");
10907 when E_Generic_Function
10908 | E_Generic_Package
10909 | E_Generic_Procedure
10911 Write_Str
("Inner_Instances");
10914 Write_Str
("Packed_Array_Impl_Type");
10917 Write_Str
("Protection_Object");
10919 when Class_Wide_Kind
10921 | Incomplete_Or_Private_Kind
10925 Write_Str
("Stored_Constraint");
10930 if Present
(Scope
(Id
))
10931 and then Is_Protected_Type
(Scope
(Id
))
10933 Write_Str
("Protection_Object");
10935 Write_Str
("Generic_Renamings");
10939 if Is_Generic_Instance
(Id
) then
10940 Write_Str
("Generic_Renamings");
10942 Write_Str
("Limited_View");
10946 Write_Str
("Field23??");
10948 end Write_Field23_Name
;
10950 ------------------------
10951 -- Write_Field24_Name --
10952 ------------------------
10954 procedure Write_Field24_Name
(Id
: Entity_Id
) is
10958 Write_Str
("Incomplete_Actuals");
10964 Write_Str
("Related_Expression");
10970 Write_Str
("Subps_Index");
10973 Write_Str
("Field24???");
10975 end Write_Field24_Name
;
10977 ------------------------
10978 -- Write_Field25_Name --
10979 ------------------------
10981 procedure Write_Field25_Name
(Id
: Entity_Id
) is
10984 when E_Generic_Package
10987 Write_Str
("Abstract_States");
10992 Write_Str
("Contract_Wrapper");
10995 Write_Str
("Debug_Renaming_Link");
10997 when E_Component
=>
10998 Write_Str
("DT_Offset_To_Top_Func");
11003 Write_Str
("Interface_Alias");
11005 when E_Record_Subtype
11006 | E_Record_Subtype_With_Private
11008 | E_Record_Type_With_Private
11010 Write_Str
("Interfaces");
11012 when E_Array_Subtype
11015 Write_Str
("Related_Array_Object");
11017 when Discrete_Kind
=>
11018 Write_Str
("Static_Discrete_Predicate");
11021 Write_Str
("Static_Real_Or_String_Predicate");
11024 Write_Str
("Task_Body_Procedure");
11027 Write_Str
("Field25??");
11029 end Write_Field25_Name
;
11031 ------------------------
11032 -- Write_Field26_Name --
11033 ------------------------
11035 procedure Write_Field26_Name
(Id
: Entity_Id
) is
11039 | E_Record_Type_With_Private
11041 Write_Str
("Dispatch_Table_Wrappers");
11043 when E_In_Out_Parameter
11047 Write_Str
("Last_Assignment");
11052 Write_Str
("Overridden_Operation");
11054 when E_Generic_Package
11057 Write_Str
("Package_Instantiation");
11062 Write_Str
("Related_Type");
11067 Write_Str
("Storage_Size_Variable");
11070 Write_Str
("Field26??");
11072 end Write_Field26_Name
;
11074 ------------------------
11075 -- Write_Field27_Name --
11076 ------------------------
11078 procedure Write_Field27_Name
(Id
: Entity_Id
) is
11084 Write_Str
("Current_Use_Clause");
11090 Write_Str
("Related_Type");
11095 Write_Str
("Wrapped_Entity");
11098 Write_Str
("Field27??");
11100 end Write_Field27_Name
;
11102 ------------------------
11103 -- Write_Field28_Name --
11104 ------------------------
11106 procedure Write_Field28_Name
(Id
: Entity_Id
) is
11113 | E_Subprogram_Body
11114 | E_Subprogram_Type
11116 Write_Str
("Extra_Formals");
11121 Write_Str
("Finalizer");
11126 Write_Str
("Initialization_Statements");
11128 when E_Access_Subprogram_Type
=>
11129 Write_Str
("Original_Access_Type");
11132 Write_Str
("Relative_Deadline_Variable");
11134 when E_Record_Type
=>
11135 Write_Str
("Underlying_Record_View");
11138 Write_Str
("Field28??");
11140 end Write_Field28_Name
;
11142 ------------------------
11143 -- Write_Field29_Name --
11144 ------------------------
11146 procedure Write_Field29_Name
(Id
: Entity_Id
) is
11152 | E_Subprogram_Body
11154 Write_Str
("Anonymous_Masters");
11159 Write_Str
("BIP_Initialization_Call");
11162 Write_Str
("Subprograms_For_Type");
11165 Write_Str
("Field29??");
11167 end Write_Field29_Name
;
11169 ------------------------
11170 -- Write_Field30_Name --
11171 ------------------------
11173 procedure Write_Field30_Name
(Id
: Entity_Id
) is
11177 | E_Record_Type_With_Private
11179 Write_Str
("Access_Disp_Table_Elab_Flag");
11181 when E_Protected_Type
11184 Write_Str
("Anonymous_Object");
11187 Write_Str
("Corresponding_Equality");
11192 Write_Str
("Last_Aggregate_Assignment");
11194 when E_Procedure
=>
11195 Write_Str
("Static_Initialization");
11198 Write_Str
("Field30??");
11200 end Write_Field30_Name
;
11202 ------------------------
11203 -- Write_Field31_Name --
11204 ------------------------
11206 procedure Write_Field31_Name
(Id
: Entity_Id
) is
11211 | E_In_Out_Parameter
11216 Write_Str
("Activation_Record_Component");
11219 Write_Str
("Derived_Type_Link");
11224 Write_Str
("Thunk_Entity");
11227 Write_Str
("Field31??");
11229 end Write_Field31_Name
;
11231 ------------------------
11232 -- Write_Field32_Name --
11233 ------------------------
11235 procedure Write_Field32_Name
(Id
: Entity_Id
) is
11238 when E_Procedure
=>
11239 Write_Str
("Corresponding_Function");
11242 Write_Str
("Corresponding_Procedure");
11244 when E_Abstract_State
11248 Write_Str
("Encapsulating_State");
11251 Write_Str
("No_Tagged_Streams_Pragma");
11254 Write_Str
("Field32??");
11256 end Write_Field32_Name
;
11258 ------------------------
11259 -- Write_Field33_Name --
11260 ------------------------
11262 procedure Write_Field33_Name
(Id
: Entity_Id
) is
11265 when Subprogram_Kind
11270 Write_Str
("Linker_Section_Pragma");
11273 Write_Str
("Field33??");
11275 end Write_Field33_Name
;
11277 ------------------------
11278 -- Write_Field34_Name --
11279 ------------------------
11281 procedure Write_Field34_Name
(Id
: Entity_Id
) is
11288 | E_Generic_Function
11289 | E_Generic_Package
11290 | E_Generic_Procedure
11296 | E_Subprogram_Body
11302 Write_Str
("Contract");
11305 Write_Str
("Field34??");
11307 end Write_Field34_Name
;
11309 ------------------------
11310 -- Write_Field35_Name --
11311 ------------------------
11313 procedure Write_Field35_Name
(Id
: Entity_Id
) is
11317 Write_Str
("Anonymous_Designated_Type");
11322 Write_Str
("Entry_Max_Queue_Lenghts_Array");
11324 when Subprogram_Kind
=>
11325 Write_Str
("Import_Pragma");
11328 Write_Str
("Field35??");
11330 end Write_Field35_Name
;
11332 ------------------------
11333 -- Write_Field36_Name --
11334 ------------------------
11336 procedure Write_Field36_Name
(Id
: Entity_Id
) is
11337 pragma Unreferenced
(Id
);
11339 Write_Str
("Prev_Entity");
11340 end Write_Field36_Name
;
11342 ------------------------
11343 -- Write_Field37_Name --
11344 ------------------------
11346 procedure Write_Field37_Name
(Id
: Entity_Id
) is
11347 pragma Unreferenced
(Id
);
11349 Write_Str
("Associated_Entity");
11350 end Write_Field37_Name
;
11352 ------------------------
11353 -- Write_Field38_Name --
11354 ------------------------
11356 procedure Write_Field38_Name
(Id
: Entity_Id
) is
11362 Write_Str
("Class_Wide_Clone");
11364 when E_Array_Subtype
11366 | E_Record_Subtype_With_Private
11368 Write_Str
("Predicated_Parent");
11371 Write_Str
("Validated_Object");
11374 Write_Str
("Field38??");
11376 end Write_Field38_Name
;
11378 ------------------------
11379 -- Write_Field39_Name --
11380 ------------------------
11382 procedure Write_Field39_Name
(Id
: Entity_Id
) is
11388 Write_Str
("Protected_Subprogram");
11391 Write_Str
("Field39??");
11393 end Write_Field39_Name
;
11395 ------------------------
11396 -- Write_Field40_Name --
11397 ------------------------
11399 procedure Write_Field40_Name
(Id
: Entity_Id
) is
11402 when E_Abstract_State
11407 | E_Generic_Function
11408 | E_Generic_Package
11409 | E_Generic_Procedure
11415 | E_Subprogram_Body
11421 Write_Str
("SPARK_Pragma");
11424 Write_Str
("Field40??");
11426 end Write_Field40_Name
;
11428 ------------------------
11429 -- Write_Field41_Name --
11430 ------------------------
11432 procedure Write_Field41_Name
(Id
: Entity_Id
) is
11438 Write_Str
("Original_Protected_Subprogram");
11440 when E_Generic_Package
11446 Write_Str
("SPARK_Aux_Pragma");
11449 Write_Str
("Field41??");
11451 end Write_Field41_Name
;
11453 -------------------------
11454 -- Iterator Procedures --
11455 -------------------------
11457 procedure Proc_Next_Component
(N
: in out Node_Id
) is
11459 N
:= Next_Component
(N
);
11460 end Proc_Next_Component
;
11462 procedure Proc_Next_Component_Or_Discriminant
(N
: in out Node_Id
) is
11464 N
:= Next_Entity
(N
);
11465 while Present
(N
) loop
11466 exit when Ekind_In
(N
, E_Component
, E_Discriminant
);
11467 N
:= Next_Entity
(N
);
11469 end Proc_Next_Component_Or_Discriminant
;
11471 procedure Proc_Next_Discriminant
(N
: in out Node_Id
) is
11473 N
:= Next_Discriminant
(N
);
11474 end Proc_Next_Discriminant
;
11476 procedure Proc_Next_Formal
(N
: in out Node_Id
) is
11478 N
:= Next_Formal
(N
);
11479 end Proc_Next_Formal
;
11481 procedure Proc_Next_Formal_With_Extras
(N
: in out Node_Id
) is
11483 N
:= Next_Formal_With_Extras
(N
);
11484 end Proc_Next_Formal_With_Extras
;
11486 procedure Proc_Next_Index
(N
: in out Node_Id
) is
11488 N
:= Next_Index
(N
);
11489 end Proc_Next_Index
;
11491 procedure Proc_Next_Inlined_Subprogram
(N
: in out Node_Id
) is
11493 N
:= Next_Inlined_Subprogram
(N
);
11494 end Proc_Next_Inlined_Subprogram
;
11496 procedure Proc_Next_Literal
(N
: in out Node_Id
) is
11498 N
:= Next_Literal
(N
);
11499 end Proc_Next_Literal
;
11501 procedure Proc_Next_Stored_Discriminant
(N
: in out Node_Id
) is
11503 N
:= Next_Stored_Discriminant
(N
);
11504 end Proc_Next_Stored_Discriminant
;