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
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_Machine_Code_Subprogram
(Id
: E
) return B
is
2491 pragma Assert
(Is_Subprogram
(Id
));
2492 return Flag137
(Id
);
2493 end Is_Machine_Code_Subprogram
;
2495 function Is_Non_Static_Subtype
(Id
: E
) return B
is
2497 pragma Assert
(Is_Type
(Id
));
2498 return Flag109
(Id
);
2499 end Is_Non_Static_Subtype
;
2501 function Is_Null_Init_Proc
(Id
: E
) return B
is
2503 pragma Assert
(Ekind
(Id
) = E_Procedure
);
2504 return Flag178
(Id
);
2505 end Is_Null_Init_Proc
;
2507 function Is_Obsolescent
(Id
: E
) return B
is
2509 return Flag153
(Id
);
2512 function Is_Only_Out_Parameter
(Id
: E
) return B
is
2514 pragma Assert
(Is_Formal
(Id
));
2515 return Flag226
(Id
);
2516 end Is_Only_Out_Parameter
;
2518 function Is_Package_Body_Entity
(Id
: E
) return B
is
2520 return Flag160
(Id
);
2521 end Is_Package_Body_Entity
;
2523 function Is_Packed
(Id
: E
) return B
is
2525 return Flag51
(Implementation_Base_Type
(Id
));
2528 function Is_Packed_Array_Impl_Type
(Id
: E
) return B
is
2530 return Flag138
(Id
);
2531 end Is_Packed_Array_Impl_Type
;
2533 function Is_Param_Block_Component_Type
(Id
: E
) return B
is
2535 pragma Assert
(Is_Access_Type
(Id
));
2536 return Flag215
(Base_Type
(Id
));
2537 end Is_Param_Block_Component_Type
;
2539 function Is_Partial_Invariant_Procedure
(Id
: E
) return B
is
2541 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
2542 return Flag292
(Id
);
2543 end Is_Partial_Invariant_Procedure
;
2545 function Is_Potentially_Use_Visible
(Id
: E
) return B
is
2547 pragma Assert
(Nkind
(Id
) in N_Entity
);
2549 end Is_Potentially_Use_Visible
;
2551 function Is_Predicate_Function
(Id
: E
) return B
is
2553 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
2554 return Flag255
(Id
);
2555 end Is_Predicate_Function
;
2557 function Is_Predicate_Function_M
(Id
: E
) return B
is
2559 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
2560 return Flag256
(Id
);
2561 end Is_Predicate_Function_M
;
2563 function Is_Preelaborated
(Id
: E
) return B
is
2566 end Is_Preelaborated
;
2568 function Is_Primitive
(Id
: E
) return B
is
2571 (Is_Overloadable
(Id
)
2572 or else Ekind_In
(Id
, E_Generic_Function
, E_Generic_Procedure
));
2573 return Flag218
(Id
);
2576 function Is_Primitive_Wrapper
(Id
: E
) return B
is
2578 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
2579 return Flag195
(Id
);
2580 end Is_Primitive_Wrapper
;
2582 function Is_Private_Composite
(Id
: E
) return B
is
2584 pragma Assert
(Is_Type
(Id
));
2585 return Flag107
(Id
);
2586 end Is_Private_Composite
;
2588 function Is_Private_Descendant
(Id
: E
) return B
is
2591 end Is_Private_Descendant
;
2593 function Is_Private_Primitive
(Id
: E
) return B
is
2595 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
2596 return Flag245
(Id
);
2597 end Is_Private_Primitive
;
2599 function Is_Public
(Id
: E
) return B
is
2601 pragma Assert
(Nkind
(Id
) in N_Entity
);
2605 function Is_Pure
(Id
: E
) return B
is
2610 function Is_Pure_Unit_Access_Type
(Id
: E
) return B
is
2612 pragma Assert
(Is_Access_Type
(Id
));
2613 return Flag189
(Id
);
2614 end Is_Pure_Unit_Access_Type
;
2616 function Is_RACW_Stub_Type
(Id
: E
) return B
is
2618 pragma Assert
(Is_Type
(Id
));
2619 return Flag244
(Id
);
2620 end Is_RACW_Stub_Type
;
2622 function Is_Raised
(Id
: E
) return B
is
2624 pragma Assert
(Ekind
(Id
) = E_Exception
);
2625 return Flag224
(Id
);
2628 function Is_Remote_Call_Interface
(Id
: E
) return B
is
2631 end Is_Remote_Call_Interface
;
2633 function Is_Remote_Types
(Id
: E
) return B
is
2636 end Is_Remote_Types
;
2638 function Is_Renaming_Of_Object
(Id
: E
) return B
is
2640 return Flag112
(Id
);
2641 end Is_Renaming_Of_Object
;
2643 function Is_Return_Object
(Id
: E
) return B
is
2645 return Flag209
(Id
);
2646 end Is_Return_Object
;
2648 function Is_Safe_To_Reevaluate
(Id
: E
) return B
is
2650 return Flag249
(Id
);
2651 end Is_Safe_To_Reevaluate
;
2653 function Is_Shared_Passive
(Id
: E
) return B
is
2656 end Is_Shared_Passive
;
2658 function Is_Static_Type
(Id
: E
) return B
is
2660 return Flag281
(Id
);
2663 function Is_Statically_Allocated
(Id
: E
) return B
is
2666 end Is_Statically_Allocated
;
2668 function Is_Tag
(Id
: E
) return B
is
2670 pragma Assert
(Nkind
(Id
) in N_Entity
);
2674 function Is_Tagged_Type
(Id
: E
) return B
is
2679 function Is_Thunk
(Id
: E
) return B
is
2681 return Flag225
(Id
);
2684 function Is_Trivial_Subprogram
(Id
: E
) return B
is
2686 return Flag235
(Id
);
2687 end Is_Trivial_Subprogram
;
2689 function Is_True_Constant
(Id
: E
) return B
is
2691 return Flag163
(Id
);
2692 end Is_True_Constant
;
2694 function Is_Unchecked_Union
(Id
: E
) return B
is
2696 return Flag117
(Implementation_Base_Type
(Id
));
2697 end Is_Unchecked_Union
;
2699 function Is_Underlying_Full_View
(Id
: E
) return B
is
2701 return Flag298
(Id
);
2702 end Is_Underlying_Full_View
;
2704 function Is_Underlying_Record_View
(Id
: E
) return B
is
2706 return Flag246
(Id
);
2707 end Is_Underlying_Record_View
;
2709 function Is_Unimplemented
(Id
: E
) return B
is
2711 return Flag284
(Id
);
2712 end Is_Unimplemented
;
2714 function Is_Unsigned_Type
(Id
: E
) return B
is
2716 pragma Assert
(Is_Type
(Id
));
2717 return Flag144
(Id
);
2718 end Is_Unsigned_Type
;
2720 function Is_Uplevel_Referenced_Entity
(Id
: E
) return B
is
2722 return Flag283
(Id
);
2723 end Is_Uplevel_Referenced_Entity
;
2725 function Is_Valued_Procedure
(Id
: E
) return B
is
2727 pragma Assert
(Ekind
(Id
) = E_Procedure
);
2728 return Flag127
(Id
);
2729 end Is_Valued_Procedure
;
2731 function Is_Visible_Formal
(Id
: E
) return B
is
2733 return Flag206
(Id
);
2734 end Is_Visible_Formal
;
2736 function Is_Visible_Lib_Unit
(Id
: E
) return B
is
2738 return Flag116
(Id
);
2739 end Is_Visible_Lib_Unit
;
2741 function Is_Volatile
(Id
: E
) return B
is
2743 pragma Assert
(Nkind
(Id
) in N_Entity
);
2745 if Is_Type
(Id
) then
2746 return Flag16
(Base_Type
(Id
));
2752 function Is_Volatile_Full_Access
(Id
: E
) return B
is
2754 return Flag285
(Id
);
2755 end Is_Volatile_Full_Access
;
2757 function Itype_Printed
(Id
: E
) return B
is
2759 pragma Assert
(Is_Itype
(Id
));
2760 return Flag202
(Id
);
2763 function Kill_Elaboration_Checks
(Id
: E
) return B
is
2766 end Kill_Elaboration_Checks
;
2768 function Kill_Range_Checks
(Id
: E
) return B
is
2771 end Kill_Range_Checks
;
2773 function Known_To_Have_Preelab_Init
(Id
: E
) return B
is
2775 pragma Assert
(Is_Type
(Id
));
2776 return Flag207
(Id
);
2777 end Known_To_Have_Preelab_Init
;
2779 function Last_Aggregate_Assignment
(Id
: E
) return N
is
2781 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
2783 end Last_Aggregate_Assignment
;
2785 function Last_Assignment
(Id
: E
) return N
is
2787 pragma Assert
(Is_Assignable
(Id
));
2789 end Last_Assignment
;
2791 function Last_Entity
(Id
: E
) return E
is
2796 function Limited_View
(Id
: E
) return E
is
2798 pragma Assert
(Ekind
(Id
) = E_Package
);
2802 function Linker_Section_Pragma
(Id
: E
) return N
is
2805 (Is_Object
(Id
) or else Is_Subprogram
(Id
) or else Is_Type
(Id
));
2807 end Linker_Section_Pragma
;
2809 function Lit_Indexes
(Id
: E
) return E
is
2811 pragma Assert
(Is_Enumeration_Type
(Id
));
2815 function Lit_Strings
(Id
: E
) return E
is
2817 pragma Assert
(Is_Enumeration_Type
(Id
));
2821 function Low_Bound_Tested
(Id
: E
) return B
is
2823 return Flag205
(Id
);
2824 end Low_Bound_Tested
;
2826 function Machine_Radix_10
(Id
: E
) return B
is
2828 pragma Assert
(Is_Decimal_Fixed_Point_Type
(Id
));
2830 end Machine_Radix_10
;
2832 function Master_Id
(Id
: E
) return E
is
2834 pragma Assert
(Is_Access_Type
(Id
));
2838 function Materialize_Entity
(Id
: E
) return B
is
2840 return Flag168
(Id
);
2841 end Materialize_Entity
;
2843 function May_Inherit_Delayed_Rep_Aspects
(Id
: E
) return B
is
2845 return Flag262
(Id
);
2846 end May_Inherit_Delayed_Rep_Aspects
;
2848 function Mechanism
(Id
: E
) return M
is
2850 pragma Assert
(Ekind
(Id
) = E_Function
or else Is_Formal
(Id
));
2851 return UI_To_Int
(Uint8
(Id
));
2854 function Modulus
(Id
: E
) return Uint
is
2856 pragma Assert
(Is_Modular_Integer_Type
(Id
));
2857 return Uint17
(Base_Type
(Id
));
2860 function Must_Be_On_Byte_Boundary
(Id
: E
) return B
is
2862 pragma Assert
(Is_Type
(Id
));
2863 return Flag183
(Id
);
2864 end Must_Be_On_Byte_Boundary
;
2866 function Must_Have_Preelab_Init
(Id
: E
) return B
is
2868 pragma Assert
(Is_Type
(Id
));
2869 return Flag208
(Id
);
2870 end Must_Have_Preelab_Init
;
2872 function Needs_Activation_Record
(Id
: E
) return B
is
2874 return Flag306
(Id
);
2875 end Needs_Activation_Record
;
2877 function Needs_Debug_Info
(Id
: E
) return B
is
2879 return Flag147
(Id
);
2880 end Needs_Debug_Info
;
2882 function Needs_No_Actuals
(Id
: E
) return B
is
2885 (Is_Overloadable
(Id
)
2886 or else Ekind_In
(Id
, E_Subprogram_Type
, E_Entry_Family
));
2888 end Needs_No_Actuals
;
2890 function Never_Set_In_Source
(Id
: E
) return B
is
2892 return Flag115
(Id
);
2893 end Never_Set_In_Source
;
2895 function Next_Inlined_Subprogram
(Id
: E
) return E
is
2898 end Next_Inlined_Subprogram
;
2900 function No_Dynamic_Predicate_On_Actual
(Id
: E
) return Boolean is
2902 pragma Assert
(Is_Discrete_Type
(Id
));
2903 return Flag276
(Id
);
2904 end No_Dynamic_Predicate_On_Actual
;
2906 function No_Pool_Assigned
(Id
: E
) return B
is
2908 pragma Assert
(Is_Access_Type
(Id
));
2909 return Flag131
(Root_Type
(Id
));
2910 end No_Pool_Assigned
;
2912 function No_Predicate_On_Actual
(Id
: E
) return Boolean is
2914 pragma Assert
(Is_Discrete_Type
(Id
));
2915 return Flag275
(Id
);
2916 end No_Predicate_On_Actual
;
2918 function No_Reordering
(Id
: E
) return B
is
2920 pragma Assert
(Is_Record_Type
(Id
));
2921 return Flag239
(Implementation_Base_Type
(Id
));
2924 function No_Return
(Id
: E
) return B
is
2926 return Flag113
(Id
);
2929 function No_Strict_Aliasing
(Id
: E
) return B
is
2931 pragma Assert
(Is_Access_Type
(Id
));
2932 return Flag136
(Base_Type
(Id
));
2933 end No_Strict_Aliasing
;
2935 function No_Tagged_Streams_Pragma
(Id
: E
) return N
is
2937 pragma Assert
(Is_Tagged_Type
(Id
));
2939 end No_Tagged_Streams_Pragma
;
2941 function Non_Binary_Modulus
(Id
: E
) return B
is
2943 pragma Assert
(Is_Type
(Id
));
2944 return Flag58
(Base_Type
(Id
));
2945 end Non_Binary_Modulus
;
2947 function Non_Limited_View
(Id
: E
) return E
is
2950 (Ekind
(Id
) in Incomplete_Kind
2952 Ekind
(Id
) in Class_Wide_Kind
2954 Ekind
(Id
) = E_Abstract_State
);
2956 end Non_Limited_View
;
2958 function Nonzero_Is_True
(Id
: E
) return B
is
2960 pragma Assert
(Root_Type
(Id
) = Standard_Boolean
);
2961 return Flag162
(Base_Type
(Id
));
2962 end Nonzero_Is_True
;
2964 function Normalized_First_Bit
(Id
: E
) return U
is
2966 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
2968 end Normalized_First_Bit
;
2970 function Normalized_Position
(Id
: E
) return U
is
2972 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
2974 end Normalized_Position
;
2976 function Normalized_Position_Max
(Id
: E
) return U
is
2978 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
2980 end Normalized_Position_Max
;
2982 function OK_To_Rename
(Id
: E
) return B
is
2984 pragma Assert
(Ekind
(Id
) = E_Variable
);
2985 return Flag247
(Id
);
2988 function Optimize_Alignment_Space
(Id
: E
) return B
is
2991 (Is_Type
(Id
) or else Ekind_In
(Id
, E_Constant
, E_Variable
));
2992 return Flag241
(Id
);
2993 end Optimize_Alignment_Space
;
2995 function Optimize_Alignment_Time
(Id
: E
) return B
is
2998 (Is_Type
(Id
) or else Ekind_In
(Id
, E_Constant
, E_Variable
));
2999 return Flag242
(Id
);
3000 end Optimize_Alignment_Time
;
3002 function Original_Access_Type
(Id
: E
) return E
is
3004 pragma Assert
(Ekind
(Id
) = E_Access_Subprogram_Type
);
3006 end Original_Access_Type
;
3008 function Original_Array_Type
(Id
: E
) return E
is
3010 pragma Assert
(Is_Array_Type
(Id
) or else Is_Modular_Integer_Type
(Id
));
3012 end Original_Array_Type
;
3014 function Original_Protected_Subprogram
(Id
: E
) return N
is
3017 end Original_Protected_Subprogram
;
3019 function Original_Record_Component
(Id
: E
) return E
is
3021 pragma Assert
(Ekind_In
(Id
, E_Void
, E_Component
, E_Discriminant
));
3023 end Original_Record_Component
;
3025 function Overlays_Constant
(Id
: E
) return B
is
3027 return Flag243
(Id
);
3028 end Overlays_Constant
;
3030 function Overridden_Operation
(Id
: E
) return E
is
3032 pragma Assert
(Is_Subprogram
(Id
) or else Is_Generic_Subprogram
(Id
));
3034 end Overridden_Operation
;
3036 function Package_Instantiation
(Id
: E
) return N
is
3038 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Generic_Package
));
3040 end Package_Instantiation
;
3042 function Packed_Array_Impl_Type
(Id
: E
) return E
is
3044 pragma Assert
(Is_Array_Type
(Id
));
3046 end Packed_Array_Impl_Type
;
3048 function Parent_Subtype
(Id
: E
) return E
is
3050 pragma Assert
(Is_Record_Type
(Id
));
3051 return Node19
(Base_Type
(Id
));
3054 function Part_Of_Constituents
(Id
: E
) return L
is
3056 pragma Assert
(Ekind_In
(Id
, E_Abstract_State
, E_Variable
));
3057 return Elist10
(Id
);
3058 end Part_Of_Constituents
;
3060 function Part_Of_References
(Id
: E
) return L
is
3062 pragma Assert
(Ekind
(Id
) = E_Variable
);
3063 return Elist11
(Id
);
3064 end Part_Of_References
;
3066 function Partial_View_Has_Unknown_Discr
(Id
: E
) return B
is
3068 pragma Assert
(Is_Type
(Id
));
3069 return Flag280
(Id
);
3070 end Partial_View_Has_Unknown_Discr
;
3072 function Pending_Access_Types
(Id
: E
) return L
is
3074 pragma Assert
(Is_Type
(Id
));
3075 return Elist15
(Id
);
3076 end Pending_Access_Types
;
3078 function Postconditions_Proc
(Id
: E
) return E
is
3080 pragma Assert
(Ekind_In
(Id
, E_Entry
,
3085 end Postconditions_Proc
;
3087 function Predicated_Parent
(Id
: E
) return E
is
3089 pragma Assert
(Ekind_In
(Id
, E_Array_Subtype
,
3091 E_Record_Subtype_With_Private
));
3093 end Predicated_Parent
;
3095 function Predicates_Ignored
(Id
: E
) return B
is
3097 pragma Assert
(Is_Type
(Id
));
3098 return Flag288
(Id
);
3099 end Predicates_Ignored
;
3101 function Prev_Entity
(Id
: E
) return E
is
3106 function Prival
(Id
: E
) return E
is
3108 pragma Assert
(Is_Protected_Component
(Id
));
3112 function Prival_Link
(Id
: E
) return E
is
3114 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
3118 function Private_Dependents
(Id
: E
) return L
is
3120 pragma Assert
(Is_Incomplete_Or_Private_Type
(Id
));
3121 return Elist18
(Id
);
3122 end Private_Dependents
;
3124 function Private_View
(Id
: E
) return N
is
3126 pragma Assert
(Is_Private_Type
(Id
));
3130 function Protected_Body_Subprogram
(Id
: E
) return E
is
3132 pragma Assert
(Is_Subprogram
(Id
) or else Is_Entry
(Id
));
3134 end Protected_Body_Subprogram
;
3136 function Protected_Formal
(Id
: E
) return E
is
3138 pragma Assert
(Is_Formal
(Id
));
3140 end Protected_Formal
;
3142 function Protected_Subprogram
(Id
: E
) return N
is
3144 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
3146 end Protected_Subprogram
;
3148 function Protection_Object
(Id
: E
) return E
is
3150 pragma Assert
(Ekind_In
(Id
, E_Entry
,
3155 end Protection_Object
;
3157 function Reachable
(Id
: E
) return B
is
3162 function Receiving_Entry
(Id
: E
) return E
is
3164 pragma Assert
(Ekind
(Id
) = E_Procedure
);
3166 end Receiving_Entry
;
3168 function Referenced
(Id
: E
) return B
is
3170 return Flag156
(Id
);
3173 function Referenced_As_LHS
(Id
: E
) return B
is
3176 end Referenced_As_LHS
;
3178 function Referenced_As_Out_Parameter
(Id
: E
) return B
is
3180 return Flag227
(Id
);
3181 end Referenced_As_Out_Parameter
;
3183 function Refinement_Constituents
(Id
: E
) return L
is
3185 pragma Assert
(Ekind
(Id
) = E_Abstract_State
);
3187 end Refinement_Constituents
;
3189 function Register_Exception_Call
(Id
: E
) return N
is
3191 pragma Assert
(Ekind
(Id
) = E_Exception
);
3193 end Register_Exception_Call
;
3195 function Related_Array_Object
(Id
: E
) return E
is
3197 pragma Assert
(Is_Array_Type
(Id
));
3199 end Related_Array_Object
;
3201 function Related_Expression
(Id
: E
) return N
is
3203 pragma Assert
(Ekind
(Id
) in Type_Kind
3204 or else Ekind_In
(Id
, E_Constant
, E_Variable
));
3206 end Related_Expression
;
3208 function Related_Instance
(Id
: E
) return E
is
3210 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Package_Body
));
3212 end Related_Instance
;
3214 function Related_Type
(Id
: E
) return E
is
3216 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Constant
, E_Variable
));
3220 function Relative_Deadline_Variable
(Id
: E
) return E
is
3222 pragma Assert
(Is_Task_Type
(Id
));
3223 return Node28
(Implementation_Base_Type
(Id
));
3224 end Relative_Deadline_Variable
;
3226 function Renamed_Entity
(Id
: E
) return N
is
3231 function Renamed_In_Spec
(Id
: E
) return B
is
3233 pragma Assert
(Ekind
(Id
) = E_Package
);
3234 return Flag231
(Id
);
3235 end Renamed_In_Spec
;
3237 function Renamed_Object
(Id
: E
) return N
is
3242 function Renaming_Map
(Id
: E
) return U
is
3247 function Requires_Overriding
(Id
: E
) return B
is
3249 pragma Assert
(Is_Overloadable
(Id
));
3250 return Flag213
(Id
);
3251 end Requires_Overriding
;
3253 function Return_Present
(Id
: E
) return B
is
3258 function Return_Applies_To
(Id
: E
) return N
is
3261 end Return_Applies_To
;
3263 function Returns_By_Ref
(Id
: E
) return B
is
3268 function Reverse_Bit_Order
(Id
: E
) return B
is
3270 pragma Assert
(Is_Record_Type
(Id
));
3271 return Flag164
(Base_Type
(Id
));
3272 end Reverse_Bit_Order
;
3274 function Reverse_Storage_Order
(Id
: E
) return B
is
3276 pragma Assert
(Is_Record_Type
(Id
) or else Is_Array_Type
(Id
));
3277 return Flag93
(Base_Type
(Id
));
3278 end Reverse_Storage_Order
;
3280 function Rewritten_For_C
(Id
: E
) return B
is
3282 pragma Assert
(Ekind
(Id
) = E_Function
);
3283 return Flag287
(Id
);
3284 end Rewritten_For_C
;
3286 function RM_Size
(Id
: E
) return U
is
3288 pragma Assert
(Is_Type
(Id
));
3292 function Scalar_Range
(Id
: E
) return N
is
3297 function Scale_Value
(Id
: E
) return U
is
3302 function Scope_Depth_Value
(Id
: E
) return U
is
3305 end Scope_Depth_Value
;
3307 function Sec_Stack_Needed_For_Return
(Id
: E
) return B
is
3309 return Flag167
(Id
);
3310 end Sec_Stack_Needed_For_Return
;
3312 function Shadow_Entities
(Id
: E
) return S
is
3314 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Generic_Package
));
3316 end Shadow_Entities
;
3318 function Shared_Var_Procs_Instance
(Id
: E
) return E
is
3320 pragma Assert
(Ekind
(Id
) = E_Variable
);
3322 end Shared_Var_Procs_Instance
;
3324 function Size_Check_Code
(Id
: E
) return N
is
3326 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
3328 end Size_Check_Code
;
3330 function Size_Depends_On_Discriminant
(Id
: E
) return B
is
3332 return Flag177
(Id
);
3333 end Size_Depends_On_Discriminant
;
3335 function Size_Known_At_Compile_Time
(Id
: E
) return B
is
3338 end Size_Known_At_Compile_Time
;
3340 function Small_Value
(Id
: E
) return R
is
3342 pragma Assert
(Is_Fixed_Point_Type
(Id
));
3343 return Ureal21
(Id
);
3346 function SPARK_Aux_Pragma
(Id
: E
) return N
is
3349 (Ekind_In
(Id
, E_Protected_Type
, -- concurrent types
3352 Ekind_In
(Id
, E_Generic_Package
, -- packages
3356 end SPARK_Aux_Pragma
;
3358 function SPARK_Aux_Pragma_Inherited
(Id
: E
) return B
is
3361 (Ekind_In
(Id
, E_Protected_Type
, -- concurrent types
3364 Ekind_In
(Id
, E_Generic_Package
, -- packages
3367 return Flag266
(Id
);
3368 end SPARK_Aux_Pragma_Inherited
;
3370 function SPARK_Pragma
(Id
: E
) return N
is
3373 (Ekind_In
(Id
, E_Constant
, -- objects
3376 Ekind_In
(Id
, E_Abstract_State
, -- overloadable
3381 E_Generic_Procedure
,
3386 Ekind_In
(Id
, E_Generic_Package
, -- packages
3390 Ekind
(Id
) = E_Void
-- special purpose
3392 Ekind_In
(Id
, E_Protected_Body
, -- types
3399 function SPARK_Pragma_Inherited
(Id
: E
) return B
is
3402 (Ekind_In
(Id
, E_Constant
, -- objects
3405 Ekind_In
(Id
, E_Abstract_State
, -- overloadable
3410 E_Generic_Procedure
,
3415 Ekind_In
(Id
, E_Generic_Package
, -- packages
3419 Ekind
(Id
) = E_Void
-- special purpose
3421 Ekind_In
(Id
, E_Protected_Body
, -- types
3425 return Flag265
(Id
);
3426 end SPARK_Pragma_Inherited
;
3428 function Spec_Entity
(Id
: E
) return E
is
3430 pragma Assert
(Ekind
(Id
) = E_Package_Body
or else Is_Formal
(Id
));
3434 function SSO_Set_High_By_Default
(Id
: E
) return B
is
3436 pragma Assert
(Is_Record_Type
(Id
) or else Is_Array_Type
(Id
));
3437 return Flag273
(Base_Type
(Id
));
3438 end SSO_Set_High_By_Default
;
3440 function SSO_Set_Low_By_Default
(Id
: E
) return B
is
3442 pragma Assert
(Is_Record_Type
(Id
) or else Is_Array_Type
(Id
));
3443 return Flag272
(Base_Type
(Id
));
3444 end SSO_Set_Low_By_Default
;
3446 function Static_Discrete_Predicate
(Id
: E
) return S
is
3448 pragma Assert
(Is_Discrete_Type
(Id
));
3450 end Static_Discrete_Predicate
;
3452 function Static_Real_Or_String_Predicate
(Id
: E
) return N
is
3454 pragma Assert
(Is_Real_Type
(Id
) or else Is_String_Type
(Id
));
3456 end Static_Real_Or_String_Predicate
;
3458 function Status_Flag_Or_Transient_Decl
(Id
: E
) return N
is
3460 pragma Assert
(Ekind_In
(Id
, E_Constant
,
3464 end Status_Flag_Or_Transient_Decl
;
3466 function Storage_Size_Variable
(Id
: E
) return E
is
3468 pragma Assert
(Is_Access_Type
(Id
) or else Is_Task_Type
(Id
));
3469 return Node26
(Implementation_Base_Type
(Id
));
3470 end Storage_Size_Variable
;
3472 function Static_Elaboration_Desired
(Id
: E
) return B
is
3474 pragma Assert
(Ekind
(Id
) = E_Package
);
3476 end Static_Elaboration_Desired
;
3478 function Static_Initialization
(Id
: E
) return N
is
3481 (Ekind
(Id
) = E_Procedure
and then not Is_Dispatching_Operation
(Id
));
3483 end Static_Initialization
;
3485 function Stored_Constraint
(Id
: E
) return L
is
3488 (Is_Composite_Type
(Id
) and then not Is_Array_Type
(Id
));
3489 return Elist23
(Id
);
3490 end Stored_Constraint
;
3492 function Stores_Attribute_Old_Prefix
(Id
: E
) return B
is
3494 return Flag270
(Id
);
3495 end Stores_Attribute_Old_Prefix
;
3497 function Strict_Alignment
(Id
: E
) return B
is
3499 return Flag145
(Implementation_Base_Type
(Id
));
3500 end Strict_Alignment
;
3502 function String_Literal_Length
(Id
: E
) return U
is
3505 end String_Literal_Length
;
3507 function String_Literal_Low_Bound
(Id
: E
) return N
is
3510 end String_Literal_Low_Bound
;
3512 function Subprograms_For_Type
(Id
: E
) return L
is
3514 pragma Assert
(Is_Type
(Id
));
3515 return Elist29
(Id
);
3516 end Subprograms_For_Type
;
3518 function Subps_Index
(Id
: E
) return U
is
3520 pragma Assert
(Is_Subprogram
(Id
));
3524 function Suppress_Elaboration_Warnings
(Id
: E
) return B
is
3526 return Flag303
(Id
);
3527 end Suppress_Elaboration_Warnings
;
3529 function Suppress_Initialization
(Id
: E
) return B
is
3531 pragma Assert
(Is_Type
(Id
) or else Ekind
(Id
) = E_Variable
);
3532 return Flag105
(Id
);
3533 end Suppress_Initialization
;
3535 function Suppress_Style_Checks
(Id
: E
) return B
is
3537 return Flag165
(Id
);
3538 end Suppress_Style_Checks
;
3540 function Suppress_Value_Tracking_On_Call
(Id
: E
) return B
is
3542 return Flag217
(Id
);
3543 end Suppress_Value_Tracking_On_Call
;
3545 function Task_Body_Procedure
(Id
: E
) return N
is
3547 pragma Assert
(Ekind
(Id
) in Task_Kind
);
3549 end Task_Body_Procedure
;
3551 function Thunk_Entity
(Id
: E
) return E
is
3553 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
)
3554 and then Is_Thunk
(Id
));
3558 function Treat_As_Volatile
(Id
: E
) return B
is
3561 end Treat_As_Volatile
;
3563 function Underlying_Full_View
(Id
: E
) return E
is
3565 pragma Assert
(Ekind
(Id
) in Private_Kind
);
3567 end Underlying_Full_View
;
3569 function Underlying_Record_View
(Id
: E
) return E
is
3572 end Underlying_Record_View
;
3574 function Universal_Aliasing
(Id
: E
) return B
is
3576 pragma Assert
(Is_Type
(Id
));
3577 return Flag216
(Implementation_Base_Type
(Id
));
3578 end Universal_Aliasing
;
3580 function Unset_Reference
(Id
: E
) return N
is
3583 end Unset_Reference
;
3585 function Used_As_Generic_Actual
(Id
: E
) return B
is
3587 return Flag222
(Id
);
3588 end Used_As_Generic_Actual
;
3590 function Uses_Lock_Free
(Id
: E
) return B
is
3592 pragma Assert
(Is_Protected_Type
(Id
));
3593 return Flag188
(Id
);
3596 function Uses_Sec_Stack
(Id
: E
) return B
is
3601 function Validated_Object
(Id
: E
) return N
is
3603 pragma Assert
(Ekind
(Id
) = E_Variable
);
3605 end Validated_Object
;
3607 function Warnings_Off
(Id
: E
) return B
is
3612 function Warnings_Off_Used
(Id
: E
) return B
is
3614 return Flag236
(Id
);
3615 end Warnings_Off_Used
;
3617 function Warnings_Off_Used_Unmodified
(Id
: E
) return B
is
3619 return Flag237
(Id
);
3620 end Warnings_Off_Used_Unmodified
;
3622 function Warnings_Off_Used_Unreferenced
(Id
: E
) return B
is
3624 return Flag238
(Id
);
3625 end Warnings_Off_Used_Unreferenced
;
3627 function Wrapped_Entity
(Id
: E
) return E
is
3629 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
)
3630 and then Is_Primitive_Wrapper
(Id
));
3634 function Was_Hidden
(Id
: E
) return B
is
3636 return Flag196
(Id
);
3639 ------------------------------
3640 -- Classification Functions --
3641 ------------------------------
3643 function Is_Access_Type
(Id
: E
) return B
is
3645 return Ekind
(Id
) in Access_Kind
;
3648 function Is_Access_Protected_Subprogram_Type
(Id
: E
) return B
is
3650 return Ekind
(Id
) in Access_Protected_Kind
;
3651 end Is_Access_Protected_Subprogram_Type
;
3653 function Is_Access_Subprogram_Type
(Id
: E
) return B
is
3655 return Ekind
(Id
) in Access_Subprogram_Kind
;
3656 end Is_Access_Subprogram_Type
;
3658 function Is_Aggregate_Type
(Id
: E
) return B
is
3660 return Ekind
(Id
) in Aggregate_Kind
;
3661 end Is_Aggregate_Type
;
3663 function Is_Anonymous_Access_Type
(Id
: E
) return B
is
3665 return Ekind
(Id
) in Anonymous_Access_Kind
;
3666 end Is_Anonymous_Access_Type
;
3668 function Is_Array_Type
(Id
: E
) return B
is
3670 return Ekind
(Id
) in Array_Kind
;
3673 function Is_Assignable
(Id
: E
) return B
is
3675 return Ekind
(Id
) in Assignable_Kind
;
3678 function Is_Class_Wide_Type
(Id
: E
) return B
is
3680 return Ekind
(Id
) in Class_Wide_Kind
;
3681 end Is_Class_Wide_Type
;
3683 function Is_Composite_Type
(Id
: E
) return B
is
3685 return Ekind
(Id
) in Composite_Kind
;
3686 end Is_Composite_Type
;
3688 function Is_Concurrent_Body
(Id
: E
) return B
is
3690 return Ekind
(Id
) in Concurrent_Body_Kind
;
3691 end Is_Concurrent_Body
;
3693 function Is_Concurrent_Record_Type
(Id
: E
) return B
is
3696 end Is_Concurrent_Record_Type
;
3698 function Is_Concurrent_Type
(Id
: E
) return B
is
3700 return Ekind
(Id
) in Concurrent_Kind
;
3701 end Is_Concurrent_Type
;
3703 function Is_Decimal_Fixed_Point_Type
(Id
: E
) return B
is
3705 return Ekind
(Id
) in Decimal_Fixed_Point_Kind
;
3706 end Is_Decimal_Fixed_Point_Type
;
3708 function Is_Digits_Type
(Id
: E
) return B
is
3710 return Ekind
(Id
) in Digits_Kind
;
3713 function Is_Discrete_Or_Fixed_Point_Type
(Id
: E
) return B
is
3715 return Ekind
(Id
) in Discrete_Or_Fixed_Point_Kind
;
3716 end Is_Discrete_Or_Fixed_Point_Type
;
3718 function Is_Discrete_Type
(Id
: E
) return B
is
3720 return Ekind
(Id
) in Discrete_Kind
;
3721 end Is_Discrete_Type
;
3723 function Is_Elementary_Type
(Id
: E
) return B
is
3725 return Ekind
(Id
) in Elementary_Kind
;
3726 end Is_Elementary_Type
;
3728 function Is_Entry
(Id
: E
) return B
is
3730 return Ekind
(Id
) in Entry_Kind
;
3733 function Is_Enumeration_Type
(Id
: E
) return B
is
3735 return Ekind
(Id
) in Enumeration_Kind
;
3736 end Is_Enumeration_Type
;
3738 function Is_Fixed_Point_Type
(Id
: E
) return B
is
3740 return Ekind
(Id
) in Fixed_Point_Kind
;
3741 end Is_Fixed_Point_Type
;
3743 function Is_Floating_Point_Type
(Id
: E
) return B
is
3745 return Ekind
(Id
) in Float_Kind
;
3746 end Is_Floating_Point_Type
;
3748 function Is_Formal
(Id
: E
) return B
is
3750 return Ekind
(Id
) in Formal_Kind
;
3753 function Is_Formal_Object
(Id
: E
) return B
is
3755 return Ekind
(Id
) in Formal_Object_Kind
;
3756 end Is_Formal_Object
;
3758 function Is_Generic_Subprogram
(Id
: E
) return B
is
3760 return Ekind
(Id
) in Generic_Subprogram_Kind
;
3761 end Is_Generic_Subprogram
;
3763 function Is_Generic_Unit
(Id
: E
) return B
is
3765 return Ekind
(Id
) in Generic_Unit_Kind
;
3766 end Is_Generic_Unit
;
3768 function Is_Ghost_Entity
(Id
: Entity_Id
) return Boolean is
3770 return Is_Checked_Ghost_Entity
(Id
) or else Is_Ignored_Ghost_Entity
(Id
);
3771 end Is_Ghost_Entity
;
3773 function Is_Incomplete_Or_Private_Type
(Id
: E
) return B
is
3775 return Ekind
(Id
) in Incomplete_Or_Private_Kind
;
3776 end Is_Incomplete_Or_Private_Type
;
3778 function Is_Incomplete_Type
(Id
: E
) return B
is
3780 return Ekind
(Id
) in Incomplete_Kind
;
3781 end Is_Incomplete_Type
;
3783 function Is_Integer_Type
(Id
: E
) return B
is
3785 return Ekind
(Id
) in Integer_Kind
;
3786 end Is_Integer_Type
;
3788 function Is_Modular_Integer_Type
(Id
: E
) return B
is
3790 return Ekind
(Id
) in Modular_Integer_Kind
;
3791 end Is_Modular_Integer_Type
;
3793 function Is_Named_Number
(Id
: E
) return B
is
3795 return Ekind
(Id
) in Named_Kind
;
3796 end Is_Named_Number
;
3798 function Is_Numeric_Type
(Id
: E
) return B
is
3800 return Ekind
(Id
) in Numeric_Kind
;
3801 end Is_Numeric_Type
;
3803 function Is_Object
(Id
: E
) return B
is
3805 return Ekind
(Id
) in Object_Kind
;
3808 function Is_Ordinary_Fixed_Point_Type
(Id
: E
) return B
is
3810 return Ekind
(Id
) in Ordinary_Fixed_Point_Kind
;
3811 end Is_Ordinary_Fixed_Point_Type
;
3813 function Is_Overloadable
(Id
: E
) return B
is
3815 return Ekind
(Id
) in Overloadable_Kind
;
3816 end Is_Overloadable
;
3818 function Is_Private_Type
(Id
: E
) return B
is
3820 return Ekind
(Id
) in Private_Kind
;
3821 end Is_Private_Type
;
3823 function Is_Protected_Type
(Id
: E
) return B
is
3825 return Ekind
(Id
) in Protected_Kind
;
3826 end Is_Protected_Type
;
3828 function Is_Real_Type
(Id
: E
) return B
is
3830 return Ekind
(Id
) in Real_Kind
;
3833 function Is_Record_Type
(Id
: E
) return B
is
3835 return Ekind
(Id
) in Record_Kind
;
3838 function Is_Scalar_Type
(Id
: E
) return B
is
3840 return Ekind
(Id
) in Scalar_Kind
;
3843 function Is_Signed_Integer_Type
(Id
: E
) return B
is
3845 return Ekind
(Id
) in Signed_Integer_Kind
;
3846 end Is_Signed_Integer_Type
;
3848 function Is_Subprogram
(Id
: E
) return B
is
3850 return Ekind
(Id
) in Subprogram_Kind
;
3853 function Is_Subprogram_Or_Entry
(Id
: E
) return B
is
3855 return Ekind
(Id
) in Subprogram_Kind
3857 Ekind
(Id
) in Entry_Kind
;
3858 end Is_Subprogram_Or_Entry
;
3860 function Is_Subprogram_Or_Generic_Subprogram
(Id
: E
) return B
is
3862 return Ekind
(Id
) in Subprogram_Kind
3864 Ekind
(Id
) in Generic_Subprogram_Kind
;
3865 end Is_Subprogram_Or_Generic_Subprogram
;
3867 function Is_Task_Type
(Id
: E
) return B
is
3869 return Ekind
(Id
) in Task_Kind
;
3872 function Is_Type
(Id
: E
) return B
is
3874 return Ekind
(Id
) in Type_Kind
;
3877 ------------------------------
3878 -- Attribute Set Procedures --
3879 ------------------------------
3881 -- Note: in many of these set procedures an "obvious" assertion is missing.
3882 -- The reason for this is that in many cases, a field is set before the
3883 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3884 -- it is possible to add assertions that specifically include the E_Void
3885 -- possibility, but in some cases, we just omit the assertions.
3887 procedure Set_Abstract_States
(Id
: E
; V
: L
) is
3889 pragma Assert
(Ekind_In
(Id
, E_Generic_Package
, E_Package
));
3890 Set_Elist25
(Id
, V
);
3891 end Set_Abstract_States
;
3893 procedure Set_Accept_Address
(Id
: E
; V
: L
) is
3895 Set_Elist21
(Id
, V
);
3896 end Set_Accept_Address
;
3898 procedure Set_Access_Disp_Table
(Id
: E
; V
: L
) is
3900 pragma Assert
(Ekind
(Id
) = E_Record_Type
3901 and then Id
= Implementation_Base_Type
(Id
));
3902 pragma Assert
(V
= No_Elist
or else Is_Tagged_Type
(Id
));
3903 Set_Elist16
(Id
, V
);
3904 end Set_Access_Disp_Table
;
3906 procedure Set_Access_Disp_Table_Elab_Flag
(Id
: E
; V
: E
) is
3908 pragma Assert
(Ekind
(Id
) = E_Record_Type
3909 and then Id
= Implementation_Base_Type
(Id
));
3910 pragma Assert
(Is_Tagged_Type
(Id
));
3912 end Set_Access_Disp_Table_Elab_Flag
;
3914 procedure Set_Anonymous_Designated_Type
(Id
: E
; V
: E
) is
3916 pragma Assert
(Ekind
(Id
) = E_Variable
);
3918 end Set_Anonymous_Designated_Type
;
3920 procedure Set_Anonymous_Masters
(Id
: E
; V
: L
) is
3922 pragma Assert
(Ekind_In
(Id
, E_Function
,
3925 E_Subprogram_Body
));
3926 Set_Elist29
(Id
, V
);
3927 end Set_Anonymous_Masters
;
3929 procedure Set_Anonymous_Object
(Id
: E
; V
: E
) is
3931 pragma Assert
(Ekind_In
(Id
, E_Protected_Type
, E_Task_Type
));
3933 end Set_Anonymous_Object
;
3935 procedure Set_Associated_Entity
(Id
: E
; V
: E
) is
3938 end Set_Associated_Entity
;
3940 procedure Set_Associated_Formal_Package
(Id
: E
; V
: E
) is
3943 end Set_Associated_Formal_Package
;
3945 procedure Set_Associated_Node_For_Itype
(Id
: E
; V
: E
) is
3948 end Set_Associated_Node_For_Itype
;
3950 procedure Set_Associated_Storage_Pool
(Id
: E
; V
: E
) is
3952 pragma Assert
(Is_Access_Type
(Id
) and then Is_Base_Type
(Id
));
3954 end Set_Associated_Storage_Pool
;
3956 procedure Set_Activation_Record_Component
(Id
: E
; V
: E
) is
3958 pragma Assert
(Ekind_In
(Id
, E_Constant
,
3965 end Set_Activation_Record_Component
;
3967 procedure Set_Actual_Subtype
(Id
: E
; V
: E
) is
3970 (Ekind_In
(Id
, E_Constant
, E_Variable
, E_Generic_In_Out_Parameter
)
3971 or else Is_Formal
(Id
));
3973 end Set_Actual_Subtype
;
3975 procedure Set_Address_Taken
(Id
: E
; V
: B
:= True) is
3977 Set_Flag104
(Id
, V
);
3978 end Set_Address_Taken
;
3980 procedure Set_Alias
(Id
: E
; V
: E
) is
3983 (Is_Overloadable
(Id
) or else Ekind
(Id
) = E_Subprogram_Type
);
3987 procedure Set_Alignment
(Id
: E
; V
: U
) is
3989 pragma Assert
(Is_Type
(Id
)
3990 or else Is_Formal
(Id
)
3991 or else Ekind_In
(Id
, E_Loop_Parameter
,
3998 procedure Set_Barrier_Function
(Id
: E
; V
: N
) is
4000 pragma Assert
(Is_Entry
(Id
));
4002 end Set_Barrier_Function
;
4004 procedure Set_Block_Node
(Id
: E
; V
: N
) is
4006 pragma Assert
(Ekind
(Id
) = E_Block
);
4010 procedure Set_Body_Entity
(Id
: E
; V
: E
) is
4012 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Generic_Package
));
4014 end Set_Body_Entity
;
4016 procedure Set_Body_Needed_For_Inlining
(Id
: E
; V
: B
:= True) is
4018 pragma Assert
(Ekind
(Id
) = E_Package
);
4019 Set_Flag299
(Id
, V
);
4020 end Set_Body_Needed_For_Inlining
;
4022 procedure Set_Body_Needed_For_SAL
(Id
: E
; V
: B
:= True) is
4025 (Ekind
(Id
) = E_Package
4026 or else Is_Subprogram
(Id
)
4027 or else Is_Generic_Unit
(Id
));
4029 end Set_Body_Needed_For_SAL
;
4031 procedure Set_Body_References
(Id
: E
; V
: L
) is
4033 pragma Assert
(Ekind
(Id
) = E_Abstract_State
);
4034 Set_Elist16
(Id
, V
);
4035 end Set_Body_References
;
4037 procedure Set_BIP_Initialization_Call
(Id
: E
; V
: N
) is
4039 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
4041 end Set_BIP_Initialization_Call
;
4043 procedure Set_C_Pass_By_Copy
(Id
: E
; V
: B
:= True) is
4045 pragma Assert
(Is_Record_Type
(Id
) and then Is_Base_Type
(Id
));
4046 Set_Flag125
(Id
, V
);
4047 end Set_C_Pass_By_Copy
;
4049 procedure Set_Can_Never_Be_Null
(Id
: E
; V
: B
:= True) is
4052 end Set_Can_Never_Be_Null
;
4054 procedure Set_Can_Use_Internal_Rep
(Id
: E
; V
: B
:= True) is
4057 (Is_Access_Subprogram_Type
(Id
) and then Is_Base_Type
(Id
));
4058 Set_Flag229
(Id
, V
);
4059 end Set_Can_Use_Internal_Rep
;
4061 procedure Set_Checks_May_Be_Suppressed
(Id
: E
; V
: B
:= True) is
4064 end Set_Checks_May_Be_Suppressed
;
4066 procedure Set_Class_Wide_Clone
(Id
: E
; V
: E
) is
4068 pragma Assert
(Is_Subprogram
(Id
));
4070 end Set_Class_Wide_Clone
;
4072 procedure Set_Class_Wide_Type
(Id
: E
; V
: E
) is
4074 pragma Assert
(Is_Type
(Id
));
4076 end Set_Class_Wide_Type
;
4078 procedure Set_Cloned_Subtype
(Id
: E
; V
: E
) is
4080 pragma Assert
(Ekind_In
(Id
, E_Record_Subtype
, E_Class_Wide_Subtype
));
4082 end Set_Cloned_Subtype
;
4084 procedure Set_Component_Bit_Offset
(Id
: E
; V
: U
) is
4086 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
4088 end Set_Component_Bit_Offset
;
4090 procedure Set_Component_Clause
(Id
: E
; V
: N
) is
4092 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
4094 end Set_Component_Clause
;
4096 procedure Set_Component_Size
(Id
: E
; V
: U
) is
4098 pragma Assert
(Is_Array_Type
(Id
) and then Is_Base_Type
(Id
));
4100 end Set_Component_Size
;
4102 procedure Set_Component_Type
(Id
: E
; V
: E
) is
4104 pragma Assert
(Is_Array_Type
(Id
) and then Is_Base_Type
(Id
));
4106 end Set_Component_Type
;
4108 procedure Set_Contains_Ignored_Ghost_Code
(Id
: E
; V
: B
:= True) is
4111 (Ekind_In
(Id
, E_Block
,
4115 E_Generic_Procedure
,
4119 E_Subprogram_Body
));
4120 Set_Flag279
(Id
, V
);
4121 end Set_Contains_Ignored_Ghost_Code
;
4123 procedure Set_Contract
(Id
: E
; V
: N
) is
4126 (Ekind_In
(Id
, E_Protected_Type
, -- concurrent types
4130 Ekind_In
(Id
, E_Constant
, -- objects
4133 Ekind_In
(Id
, E_Entry
, -- overloadable
4137 E_Generic_Procedure
,
4142 Ekind_In
(Id
, E_Generic_Package
, -- packages
4146 Ekind
(Id
) = E_Void
); -- special purpose
4150 procedure Set_Contract_Wrapper
(Id
: E
; V
: E
) is
4152 pragma Assert
(Ekind_In
(Id
, E_Entry
, E_Entry_Family
));
4154 end Set_Contract_Wrapper
;
4156 procedure Set_Corresponding_Concurrent_Type
(Id
: E
; V
: E
) is
4159 (Ekind
(Id
) = E_Record_Type
and then Is_Concurrent_Type
(V
));
4161 end Set_Corresponding_Concurrent_Type
;
4163 procedure Set_Corresponding_Discriminant
(Id
: E
; V
: E
) is
4165 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
4167 end Set_Corresponding_Discriminant
;
4169 procedure Set_Corresponding_Equality
(Id
: E
; V
: E
) is
4172 (Ekind
(Id
) = E_Function
4173 and then not Comes_From_Source
(Id
)
4174 and then Chars
(Id
) = Name_Op_Ne
);
4176 end Set_Corresponding_Equality
;
4178 procedure Set_Corresponding_Function
(Id
: E
; V
: E
) is
4180 pragma Assert
(Ekind
(Id
) = E_Procedure
and then Rewritten_For_C
(V
));
4182 end Set_Corresponding_Function
;
4184 procedure Set_Corresponding_Procedure
(Id
: E
; V
: E
) is
4186 pragma Assert
(Ekind
(Id
) = E_Function
and then Rewritten_For_C
(Id
));
4188 end Set_Corresponding_Procedure
;
4190 procedure Set_Corresponding_Protected_Entry
(Id
: E
; V
: E
) is
4192 pragma Assert
(Ekind_In
(Id
, E_Void
, E_Subprogram_Body
));
4194 end Set_Corresponding_Protected_Entry
;
4196 procedure Set_Corresponding_Record_Component
(Id
: E
; V
: E
) is
4198 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
4200 end Set_Corresponding_Record_Component
;
4202 procedure Set_Corresponding_Record_Type
(Id
: E
; V
: E
) is
4204 pragma Assert
(Is_Concurrent_Type
(Id
));
4206 end Set_Corresponding_Record_Type
;
4208 procedure Set_Corresponding_Remote_Type
(Id
: E
; V
: E
) is
4211 end Set_Corresponding_Remote_Type
;
4213 procedure Set_Current_Use_Clause
(Id
: E
; V
: E
) is
4215 pragma Assert
(Ekind
(Id
) = E_Package
or else Is_Type
(Id
));
4217 end Set_Current_Use_Clause
;
4219 procedure Set_Current_Value
(Id
: E
; V
: N
) is
4221 pragma Assert
(Ekind
(Id
) in Object_Kind
or else Ekind
(Id
) = E_Void
);
4223 end Set_Current_Value
;
4225 procedure Set_CR_Discriminant
(Id
: E
; V
: E
) is
4228 end Set_CR_Discriminant
;
4230 procedure Set_Debug_Info_Off
(Id
: E
; V
: B
:= True) is
4232 Set_Flag166
(Id
, V
);
4233 end Set_Debug_Info_Off
;
4235 procedure Set_Debug_Renaming_Link
(Id
: E
; V
: E
) is
4238 end Set_Debug_Renaming_Link
;
4240 procedure Set_Default_Aspect_Component_Value
(Id
: E
; V
: E
) is
4242 pragma Assert
(Is_Array_Type
(Id
) and then Is_Base_Type
(Id
));
4244 end Set_Default_Aspect_Component_Value
;
4246 procedure Set_Default_Aspect_Value
(Id
: E
; V
: E
) is
4248 pragma Assert
(Is_Scalar_Type
(Id
) and then Is_Base_Type
(Id
));
4250 end Set_Default_Aspect_Value
;
4252 procedure Set_Default_Expr_Function
(Id
: E
; V
: E
) is
4254 pragma Assert
(Is_Formal
(Id
));
4256 end Set_Default_Expr_Function
;
4258 procedure Set_Default_Expressions_Processed
(Id
: E
; V
: B
:= True) is
4260 Set_Flag108
(Id
, V
);
4261 end Set_Default_Expressions_Processed
;
4263 procedure Set_Default_Value
(Id
: E
; V
: N
) is
4265 pragma Assert
(Is_Formal
(Id
));
4267 end Set_Default_Value
;
4269 procedure Set_Delay_Cleanups
(Id
: E
; V
: B
:= True) is
4273 or else Is_Task_Type
(Id
)
4274 or else Ekind
(Id
) = E_Block
);
4275 Set_Flag114
(Id
, V
);
4276 end Set_Delay_Cleanups
;
4278 procedure Set_Delay_Subprogram_Descriptors
(Id
: E
; V
: B
:= True) is
4281 (Is_Subprogram
(Id
) or else Ekind_In
(Id
, E_Package
, E_Package_Body
));
4284 end Set_Delay_Subprogram_Descriptors
;
4286 procedure Set_Delta_Value
(Id
: E
; V
: R
) is
4288 pragma Assert
(Is_Fixed_Point_Type
(Id
));
4289 Set_Ureal18
(Id
, V
);
4290 end Set_Delta_Value
;
4292 procedure Set_Dependent_Instances
(Id
: E
; V
: L
) is
4294 pragma Assert
(Is_Generic_Instance
(Id
));
4296 end Set_Dependent_Instances
;
4298 procedure Set_Depends_On_Private
(Id
: E
; V
: B
:= True) is
4300 pragma Assert
(Nkind
(Id
) in N_Entity
);
4302 end Set_Depends_On_Private
;
4304 procedure Set_Derived_Type_Link
(Id
: E
; V
: E
) is
4306 pragma Assert
(Is_Type
(Id
) and then Is_Base_Type
(Id
));
4308 end Set_Derived_Type_Link
;
4310 procedure Set_Digits_Value
(Id
: E
; V
: U
) is
4313 (Is_Floating_Point_Type
(Id
)
4314 or else Is_Decimal_Fixed_Point_Type
(Id
));
4316 end Set_Digits_Value
;
4318 procedure Set_Directly_Designated_Type
(Id
: E
; V
: E
) is
4321 end Set_Directly_Designated_Type
;
4323 procedure Set_Disable_Controlled
(Id
: E
; V
: B
:= True) is
4325 pragma Assert
(Is_Type
(Id
) and then Is_Base_Type
(Id
));
4326 Set_Flag253
(Id
, V
);
4327 end Set_Disable_Controlled
;
4329 procedure Set_Discard_Names
(Id
: E
; V
: B
:= True) is
4332 end Set_Discard_Names
;
4334 procedure Set_Discriminal
(Id
: E
; V
: E
) is
4336 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
4338 end Set_Discriminal
;
4340 procedure Set_Discriminal_Link
(Id
: E
; V
: E
) is
4343 end Set_Discriminal_Link
;
4345 procedure Set_Discriminant_Checking_Func
(Id
: E
; V
: E
) is
4347 pragma Assert
(Ekind
(Id
) = E_Component
);
4349 end Set_Discriminant_Checking_Func
;
4351 procedure Set_Discriminant_Constraint
(Id
: E
; V
: L
) is
4353 pragma Assert
(Nkind
(Id
) in N_Entity
);
4354 Set_Elist21
(Id
, V
);
4355 end Set_Discriminant_Constraint
;
4357 procedure Set_Discriminant_Default_Value
(Id
: E
; V
: N
) is
4360 end Set_Discriminant_Default_Value
;
4362 procedure Set_Discriminant_Number
(Id
: E
; V
: U
) is
4365 end Set_Discriminant_Number
;
4367 procedure Set_Dispatch_Table_Wrappers
(Id
: E
; V
: L
) is
4369 pragma Assert
(Ekind
(Id
) = E_Record_Type
4370 and then Id
= Implementation_Base_Type
(Id
));
4371 pragma Assert
(V
= No_Elist
or else Is_Tagged_Type
(Id
));
4372 Set_Elist26
(Id
, V
);
4373 end Set_Dispatch_Table_Wrappers
;
4375 procedure Set_DT_Entry_Count
(Id
: E
; V
: U
) is
4377 pragma Assert
(Ekind
(Id
) = E_Component
);
4379 end Set_DT_Entry_Count
;
4381 procedure Set_DT_Offset_To_Top_Func
(Id
: E
; V
: E
) is
4383 pragma Assert
(Ekind
(Id
) = E_Component
and then Is_Tag
(Id
));
4385 end Set_DT_Offset_To_Top_Func
;
4387 procedure Set_DT_Position
(Id
: E
; V
: U
) is
4389 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
4391 end Set_DT_Position
;
4393 procedure Set_DTC_Entity
(Id
: E
; V
: E
) is
4395 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
4399 procedure Set_Elaborate_Body_Desirable
(Id
: E
; V
: B
:= True) is
4401 pragma Assert
(Ekind
(Id
) = E_Package
);
4402 Set_Flag210
(Id
, V
);
4403 end Set_Elaborate_Body_Desirable
;
4405 procedure Set_Elaboration_Entity
(Id
: E
; V
: E
) is
4410 Ekind
(Id
) = E_Package
4412 Is_Generic_Unit
(Id
));
4414 end Set_Elaboration_Entity
;
4416 procedure Set_Elaboration_Entity_Required
(Id
: E
; V
: B
:= True) is
4421 Ekind
(Id
) = E_Package
4423 Is_Generic_Unit
(Id
));
4424 Set_Flag174
(Id
, V
);
4425 end Set_Elaboration_Entity_Required
;
4427 procedure Set_Encapsulating_State
(Id
: E
; V
: E
) is
4429 pragma Assert
(Ekind_In
(Id
, E_Abstract_State
, E_Constant
, E_Variable
));
4431 end Set_Encapsulating_State
;
4433 procedure Set_Enclosing_Scope
(Id
: E
; V
: E
) is
4436 end Set_Enclosing_Scope
;
4438 procedure Set_Entry_Accepted
(Id
: E
; V
: B
:= True) is
4440 pragma Assert
(Is_Entry
(Id
));
4441 Set_Flag152
(Id
, V
);
4442 end Set_Entry_Accepted
;
4444 procedure Set_Entry_Bodies_Array
(Id
: E
; V
: E
) is
4447 end Set_Entry_Bodies_Array
;
4449 procedure Set_Entry_Cancel_Parameter
(Id
: E
; V
: E
) is
4452 end Set_Entry_Cancel_Parameter
;
4454 procedure Set_Entry_Component
(Id
: E
; V
: E
) is
4457 end Set_Entry_Component
;
4459 procedure Set_Entry_Formal
(Id
: E
; V
: E
) is
4462 end Set_Entry_Formal
;
4464 procedure Set_Entry_Index_Constant
(Id
: E
; V
: E
) is
4466 pragma Assert
(Ekind
(Id
) = E_Entry_Index_Parameter
);
4468 end Set_Entry_Index_Constant
;
4470 procedure Set_Entry_Max_Queue_Lengths_Array
(Id
: E
; V
: E
) is
4472 pragma Assert
(Ekind
(Id
) = E_Protected_Type
);
4474 end Set_Entry_Max_Queue_Lengths_Array
;
4476 procedure Set_Entry_Parameters_Type
(Id
: E
; V
: E
) is
4479 end Set_Entry_Parameters_Type
;
4481 procedure Set_Enum_Pos_To_Rep
(Id
: E
; V
: E
) is
4483 pragma Assert
(Ekind
(Id
) = E_Enumeration_Type
);
4485 end Set_Enum_Pos_To_Rep
;
4487 procedure Set_Enumeration_Pos
(Id
: E
; V
: U
) is
4489 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
4491 end Set_Enumeration_Pos
;
4493 procedure Set_Enumeration_Rep
(Id
: E
; V
: U
) is
4495 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
4497 end Set_Enumeration_Rep
;
4499 procedure Set_Enumeration_Rep_Expr
(Id
: E
; V
: N
) is
4501 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
4503 end Set_Enumeration_Rep_Expr
;
4505 procedure Set_Equivalent_Type
(Id
: E
; V
: E
) is
4508 (Ekind_In
(Id
, E_Class_Wide_Type
,
4509 E_Class_Wide_Subtype
,
4510 E_Access_Protected_Subprogram_Type
,
4511 E_Anonymous_Access_Protected_Subprogram_Type
,
4512 E_Access_Subprogram_Type
,
4515 end Set_Equivalent_Type
;
4517 procedure Set_Esize
(Id
: E
; V
: U
) is
4522 procedure Set_Extra_Accessibility
(Id
: E
; V
: E
) is
4525 (Is_Formal
(Id
) or else Ekind_In
(Id
, E_Variable
, E_Constant
));
4527 end Set_Extra_Accessibility
;
4529 procedure Set_Extra_Accessibility_Of_Result
(Id
: E
; V
: E
) is
4531 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Operator
, E_Subprogram_Type
));
4533 end Set_Extra_Accessibility_Of_Result
;
4535 procedure Set_Extra_Constrained
(Id
: E
; V
: E
) is
4537 pragma Assert
(Is_Formal
(Id
) or else Ekind
(Id
) = E_Variable
);
4539 end Set_Extra_Constrained
;
4541 procedure Set_Extra_Formal
(Id
: E
; V
: E
) is
4544 end Set_Extra_Formal
;
4546 procedure Set_Extra_Formals
(Id
: E
; V
: E
) is
4549 (Is_Overloadable
(Id
)
4550 or else Ekind_In
(Id
, E_Entry_Family
,
4552 E_Subprogram_Type
));
4554 end Set_Extra_Formals
;
4556 procedure Set_Finalization_Master
(Id
: E
; V
: E
) is
4558 pragma Assert
(Is_Access_Type
(Id
) and then Is_Base_Type
(Id
));
4560 end Set_Finalization_Master
;
4562 procedure Set_Finalize_Storage_Only
(Id
: E
; V
: B
:= True) is
4564 pragma Assert
(Is_Type
(Id
) and then Is_Base_Type
(Id
));
4565 Set_Flag158
(Id
, V
);
4566 end Set_Finalize_Storage_Only
;
4568 procedure Set_Finalizer
(Id
: E
; V
: E
) is
4570 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Package_Body
));
4574 procedure Set_First_Entity
(Id
: E
; V
: E
) is
4577 end Set_First_Entity
;
4579 procedure Set_First_Exit_Statement
(Id
: E
; V
: N
) is
4581 pragma Assert
(Ekind
(Id
) = E_Loop
);
4583 end Set_First_Exit_Statement
;
4585 procedure Set_First_Index
(Id
: E
; V
: N
) is
4587 pragma Assert
(Is_Array_Type
(Id
));
4589 end Set_First_Index
;
4591 procedure Set_First_Literal
(Id
: E
; V
: E
) is
4593 pragma Assert
(Is_Enumeration_Type
(Id
));
4595 end Set_First_Literal
;
4597 procedure Set_First_Private_Entity
(Id
: E
; V
: E
) is
4599 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Generic_Package
)
4600 or else Ekind
(Id
) in Concurrent_Kind
);
4602 end Set_First_Private_Entity
;
4604 procedure Set_First_Rep_Item
(Id
: E
; V
: N
) is
4607 end Set_First_Rep_Item
;
4609 procedure Set_Float_Rep
(Id
: E
; V
: F
) is
4610 pragma Assert
(Ekind
(Id
) = E_Floating_Point_Type
);
4612 Set_Uint10
(Id
, UI_From_Int
(F
'Pos (V
)));
4615 procedure Set_Freeze_Node
(Id
: E
; V
: N
) is
4618 end Set_Freeze_Node
;
4620 procedure Set_From_Limited_With
(Id
: E
; V
: B
:= True) is
4623 (Is_Type
(Id
) or else Ekind_In
(Id
, E_Abstract_State
, E_Package
));
4624 Set_Flag159
(Id
, V
);
4625 end Set_From_Limited_With
;
4627 procedure Set_Full_View
(Id
: E
; V
: E
) is
4629 pragma Assert
(Is_Type
(Id
) or else Ekind
(Id
) = E_Constant
);
4633 procedure Set_Generic_Homonym
(Id
: E
; V
: E
) is
4636 end Set_Generic_Homonym
;
4638 procedure Set_Generic_Renamings
(Id
: E
; V
: L
) is
4640 Set_Elist23
(Id
, V
);
4641 end Set_Generic_Renamings
;
4643 procedure Set_Handler_Records
(Id
: E
; V
: S
) is
4646 end Set_Handler_Records
;
4648 procedure Set_Has_Aliased_Components
(Id
: E
; V
: B
:= True) is
4650 pragma Assert
(Id
= Base_Type
(Id
));
4651 Set_Flag135
(Id
, V
);
4652 end Set_Has_Aliased_Components
;
4654 procedure Set_Has_Alignment_Clause
(Id
: E
; V
: B
:= True) is
4657 end Set_Has_Alignment_Clause
;
4659 procedure Set_Has_All_Calls_Remote
(Id
: E
; V
: B
:= True) is
4662 end Set_Has_All_Calls_Remote
;
4664 procedure Set_Has_Atomic_Components
(Id
: E
; V
: B
:= True) is
4666 pragma Assert
(not Is_Type
(Id
) or else Is_Base_Type
(Id
));
4668 end Set_Has_Atomic_Components
;
4670 procedure Set_Has_Biased_Representation
(Id
: E
; V
: B
:= True) is
4673 ((V
= False) or else (Is_Discrete_Type
(Id
) or else Is_Object
(Id
)));
4674 Set_Flag139
(Id
, V
);
4675 end Set_Has_Biased_Representation
;
4677 procedure Set_Has_Completion
(Id
: E
; V
: B
:= True) is
4680 end Set_Has_Completion
;
4682 procedure Set_Has_Completion_In_Body
(Id
: E
; V
: B
:= True) is
4684 pragma Assert
(Is_Type
(Id
));
4686 end Set_Has_Completion_In_Body
;
4688 procedure Set_Has_Complex_Representation
(Id
: E
; V
: B
:= True) is
4690 pragma Assert
(Is_Record_Type
(Id
) and then Is_Base_Type
(Id
));
4691 Set_Flag140
(Id
, V
);
4692 end Set_Has_Complex_Representation
;
4694 procedure Set_Has_Component_Size_Clause
(Id
: E
; V
: B
:= True) is
4696 pragma Assert
(Ekind
(Id
) = E_Array_Type
);
4698 end Set_Has_Component_Size_Clause
;
4700 procedure Set_Has_Constrained_Partial_View
(Id
: E
; V
: B
:= True) is
4702 pragma Assert
(Is_Type
(Id
));
4703 Set_Flag187
(Id
, V
);
4704 end Set_Has_Constrained_Partial_View
;
4706 procedure Set_Has_Contiguous_Rep
(Id
: E
; V
: B
:= True) is
4708 Set_Flag181
(Id
, V
);
4709 end Set_Has_Contiguous_Rep
;
4711 procedure Set_Has_Controlled_Component
(Id
: E
; V
: B
:= True) is
4713 pragma Assert
(Id
= Base_Type
(Id
));
4715 end Set_Has_Controlled_Component
;
4717 procedure Set_Has_Controlling_Result
(Id
: E
; V
: B
:= True) is
4720 end Set_Has_Controlling_Result
;
4722 procedure Set_Has_Convention_Pragma
(Id
: E
; V
: B
:= True) is
4724 Set_Flag119
(Id
, V
);
4725 end Set_Has_Convention_Pragma
;
4727 procedure Set_Has_Default_Aspect
(Id
: E
; V
: B
:= True) is
4730 ((Is_Scalar_Type
(Id
) or else Is_Array_Type
(Id
))
4731 and then Is_Base_Type
(Id
));
4733 end Set_Has_Default_Aspect
;
4735 procedure Set_Has_Delayed_Aspects
(Id
: E
; V
: B
:= True) is
4737 pragma Assert
(Nkind
(Id
) in N_Entity
);
4738 Set_Flag200
(Id
, V
);
4739 end Set_Has_Delayed_Aspects
;
4741 procedure Set_Has_Delayed_Freeze
(Id
: E
; V
: B
:= True) is
4743 pragma Assert
(Nkind
(Id
) in N_Entity
);
4745 end Set_Has_Delayed_Freeze
;
4747 procedure Set_Has_Delayed_Rep_Aspects
(Id
: E
; V
: B
:= True) is
4749 pragma Assert
(Nkind
(Id
) in N_Entity
);
4750 Set_Flag261
(Id
, V
);
4751 end Set_Has_Delayed_Rep_Aspects
;
4753 procedure Set_Has_Discriminants
(Id
: E
; V
: B
:= True) is
4755 pragma Assert
(Is_Type
(Id
));
4757 end Set_Has_Discriminants
;
4759 procedure Set_Has_Dispatch_Table
(Id
: E
; V
: B
:= True) is
4761 pragma Assert
(Ekind
(Id
) = E_Record_Type
4762 and then Is_Tagged_Type
(Id
));
4763 Set_Flag220
(Id
, V
);
4764 end Set_Has_Dispatch_Table
;
4766 procedure Set_Has_Dynamic_Predicate_Aspect
(Id
: E
; V
: B
:= True) is
4768 pragma Assert
(Is_Type
(Id
));
4769 Set_Flag258
(Id
, V
);
4770 end Set_Has_Dynamic_Predicate_Aspect
;
4772 procedure Set_Has_Enumeration_Rep_Clause
(Id
: E
; V
: B
:= True) is
4774 pragma Assert
(Is_Enumeration_Type
(Id
));
4776 end Set_Has_Enumeration_Rep_Clause
;
4778 procedure Set_Has_Exit
(Id
: E
; V
: B
:= True) is
4783 procedure Set_Has_Expanded_Contract
(Id
: E
; V
: B
:= True) is
4785 pragma Assert
(Ekind_In
(Id
, E_Entry
,
4789 Set_Flag240
(Id
, V
);
4790 end Set_Has_Expanded_Contract
;
4792 procedure Set_Has_Forward_Instantiation
(Id
: E
; V
: B
:= True) is
4794 Set_Flag175
(Id
, V
);
4795 end Set_Has_Forward_Instantiation
;
4797 procedure Set_Has_Fully_Qualified_Name
(Id
: E
; V
: B
:= True) is
4799 Set_Flag173
(Id
, V
);
4800 end Set_Has_Fully_Qualified_Name
;
4802 procedure Set_Has_Gigi_Rep_Item
(Id
: E
; V
: B
:= True) is
4805 end Set_Has_Gigi_Rep_Item
;
4807 procedure Set_Has_Homonym
(Id
: E
; V
: B
:= True) is
4810 end Set_Has_Homonym
;
4812 procedure Set_Has_Implicit_Dereference
(Id
: E
; V
: B
:= True) is
4814 Set_Flag251
(Id
, V
);
4815 end Set_Has_Implicit_Dereference
;
4817 procedure Set_Has_Independent_Components
(Id
: E
; V
: B
:= True) is
4819 pragma Assert
(not Is_Type
(Id
) or else Is_Base_Type
(Id
));
4821 end Set_Has_Independent_Components
;
4823 procedure Set_Has_Inheritable_Invariants
(Id
: E
; V
: B
:= True) is
4825 pragma Assert
(Is_Type
(Id
));
4826 Set_Flag248
(Base_Type
(Id
), V
);
4827 end Set_Has_Inheritable_Invariants
;
4829 procedure Set_Has_Inherited_DIC
(Id
: E
; V
: B
:= True) is
4831 pragma Assert
(Is_Type
(Id
));
4832 Set_Flag133
(Base_Type
(Id
), V
);
4833 end Set_Has_Inherited_DIC
;
4835 procedure Set_Has_Inherited_Invariants
(Id
: E
; V
: B
:= True) is
4837 pragma Assert
(Is_Type
(Id
));
4838 Set_Flag291
(Base_Type
(Id
), V
);
4839 end Set_Has_Inherited_Invariants
;
4841 procedure Set_Has_Initial_Value
(Id
: E
; V
: B
:= True) is
4843 pragma Assert
(Ekind_In
(Id
, E_Variable
, E_Out_Parameter
));
4844 Set_Flag219
(Id
, V
);
4845 end Set_Has_Initial_Value
;
4847 procedure Set_Has_Loop_Entry_Attributes
(Id
: E
; V
: B
:= True) is
4849 pragma Assert
(Ekind
(Id
) = E_Loop
);
4850 Set_Flag260
(Id
, V
);
4851 end Set_Has_Loop_Entry_Attributes
;
4853 procedure Set_Has_Machine_Radix_Clause
(Id
: E
; V
: B
:= True) is
4855 pragma Assert
(Is_Decimal_Fixed_Point_Type
(Id
));
4857 end Set_Has_Machine_Radix_Clause
;
4859 procedure Set_Has_Master_Entity
(Id
: E
; V
: B
:= True) is
4862 end Set_Has_Master_Entity
;
4864 procedure Set_Has_Missing_Return
(Id
: E
; V
: B
:= True) is
4866 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Generic_Function
));
4867 Set_Flag142
(Id
, V
);
4868 end Set_Has_Missing_Return
;
4870 procedure Set_Has_Nested_Block_With_Handler
(Id
: E
; V
: B
:= True) is
4872 Set_Flag101
(Id
, V
);
4873 end Set_Has_Nested_Block_With_Handler
;
4875 procedure Set_Has_Nested_Subprogram
(Id
: E
; V
: B
:= True) is
4877 pragma Assert
(Is_Subprogram
(Id
));
4878 Set_Flag282
(Id
, V
);
4879 end Set_Has_Nested_Subprogram
;
4881 procedure Set_Has_Non_Standard_Rep
(Id
: E
; V
: B
:= True) is
4883 pragma Assert
(Id
= Base_Type
(Id
));
4885 end Set_Has_Non_Standard_Rep
;
4887 procedure Set_Has_Object_Size_Clause
(Id
: E
; V
: B
:= True) is
4889 pragma Assert
(Is_Type
(Id
));
4890 Set_Flag172
(Id
, V
);
4891 end Set_Has_Object_Size_Clause
;
4893 procedure Set_Has_Out_Or_In_Out_Parameter
(Id
: E
; V
: B
:= True) is
4896 (Ekind_In
(Id
, E_Entry
, E_Entry_Family
)
4897 or else Is_Subprogram_Or_Generic_Subprogram
(Id
));
4898 Set_Flag110
(Id
, V
);
4899 end Set_Has_Out_Or_In_Out_Parameter
;
4901 procedure Set_Has_Own_DIC
(Id
: E
; V
: B
:= True) is
4903 pragma Assert
(Is_Type
(Id
));
4904 Set_Flag3
(Base_Type
(Id
), V
);
4905 end Set_Has_Own_DIC
;
4907 procedure Set_Has_Own_Invariants
(Id
: E
; V
: B
:= True) is
4909 pragma Assert
(Is_Type
(Id
));
4910 Set_Flag232
(Base_Type
(Id
), V
);
4911 end Set_Has_Own_Invariants
;
4913 procedure Set_Has_Partial_Visible_Refinement
(Id
: E
; V
: B
:= True) is
4915 pragma Assert
(Ekind
(Id
) = E_Abstract_State
);
4916 Set_Flag296
(Id
, V
);
4917 end Set_Has_Partial_Visible_Refinement
;
4919 procedure Set_Has_Per_Object_Constraint
(Id
: E
; V
: B
:= True) is
4921 Set_Flag154
(Id
, V
);
4922 end Set_Has_Per_Object_Constraint
;
4924 procedure Set_Has_Pragma_Controlled
(Id
: E
; V
: B
:= True) is
4926 pragma Assert
(Is_Access_Type
(Id
));
4927 Set_Flag27
(Base_Type
(Id
), V
);
4928 end Set_Has_Pragma_Controlled
;
4930 procedure Set_Has_Pragma_Elaborate_Body
(Id
: E
; V
: B
:= True) is
4932 Set_Flag150
(Id
, V
);
4933 end Set_Has_Pragma_Elaborate_Body
;
4935 procedure Set_Has_Pragma_Inline
(Id
: E
; V
: B
:= True) is
4937 Set_Flag157
(Id
, V
);
4938 end Set_Has_Pragma_Inline
;
4940 procedure Set_Has_Pragma_Inline_Always
(Id
: E
; V
: B
:= True) is
4942 Set_Flag230
(Id
, V
);
4943 end Set_Has_Pragma_Inline_Always
;
4945 procedure Set_Has_Pragma_No_Inline
(Id
: E
; V
: B
:= True) is
4947 Set_Flag201
(Id
, V
);
4948 end Set_Has_Pragma_No_Inline
;
4950 procedure Set_Has_Pragma_Ordered
(Id
: E
; V
: B
:= True) is
4952 pragma Assert
(Is_Enumeration_Type
(Id
));
4953 pragma Assert
(Id
= Base_Type
(Id
));
4954 Set_Flag198
(Id
, V
);
4955 end Set_Has_Pragma_Ordered
;
4957 procedure Set_Has_Pragma_Pack
(Id
: E
; V
: B
:= True) is
4959 pragma Assert
(Is_Array_Type
(Id
) or else Is_Record_Type
(Id
));
4960 pragma Assert
(Id
= Base_Type
(Id
));
4961 Set_Flag121
(Id
, V
);
4962 end Set_Has_Pragma_Pack
;
4964 procedure Set_Has_Pragma_Preelab_Init
(Id
: E
; V
: B
:= True) is
4966 Set_Flag221
(Id
, V
);
4967 end Set_Has_Pragma_Preelab_Init
;
4969 procedure Set_Has_Pragma_Pure
(Id
: E
; V
: B
:= True) is
4971 Set_Flag203
(Id
, V
);
4972 end Set_Has_Pragma_Pure
;
4974 procedure Set_Has_Pragma_Pure_Function
(Id
: E
; V
: B
:= True) is
4976 Set_Flag179
(Id
, V
);
4977 end Set_Has_Pragma_Pure_Function
;
4979 procedure Set_Has_Pragma_Thread_Local_Storage
(Id
: E
; V
: B
:= True) is
4981 Set_Flag169
(Id
, V
);
4982 end Set_Has_Pragma_Thread_Local_Storage
;
4984 procedure Set_Has_Pragma_Unmodified
(Id
: E
; V
: B
:= True) is
4986 Set_Flag233
(Id
, V
);
4987 end Set_Has_Pragma_Unmodified
;
4989 procedure Set_Has_Pragma_Unreferenced
(Id
: E
; V
: B
:= True) is
4991 Set_Flag180
(Id
, V
);
4992 end Set_Has_Pragma_Unreferenced
;
4994 procedure Set_Has_Pragma_Unreferenced_Objects
(Id
: E
; V
: B
:= True) is
4996 pragma Assert
(Is_Type
(Id
));
4997 Set_Flag212
(Id
, V
);
4998 end Set_Has_Pragma_Unreferenced_Objects
;
5000 procedure Set_Has_Pragma_Unused
(Id
: E
; V
: B
:= True) is
5002 Set_Flag294
(Id
, V
);
5003 end Set_Has_Pragma_Unused
;
5005 procedure Set_Has_Predicates
(Id
: E
; V
: B
:= True) is
5007 pragma Assert
(Is_Type
(Id
) or else Ekind
(Id
) = E_Void
);
5008 Set_Flag250
(Id
, V
);
5009 end Set_Has_Predicates
;
5011 procedure Set_Has_Primitive_Operations
(Id
: E
; V
: B
:= True) is
5013 pragma Assert
(Id
= Base_Type
(Id
));
5014 Set_Flag120
(Id
, V
);
5015 end Set_Has_Primitive_Operations
;
5017 procedure Set_Has_Private_Ancestor
(Id
: E
; V
: B
:= True) is
5019 pragma Assert
(Is_Type
(Id
));
5020 Set_Flag151
(Id
, V
);
5021 end Set_Has_Private_Ancestor
;
5023 procedure Set_Has_Private_Declaration
(Id
: E
; V
: B
:= True) is
5025 Set_Flag155
(Id
, V
);
5026 end Set_Has_Private_Declaration
;
5028 procedure Set_Has_Private_Extension
(Id
: E
; V
: B
:= True) is
5030 pragma Assert
(Is_Tagged_Type
(Id
));
5031 Set_Flag300
(Id
, V
);
5032 end Set_Has_Private_Extension
;
5034 procedure Set_Has_Protected
(Id
: E
; V
: B
:= True) is
5036 Set_Flag271
(Id
, V
);
5037 end Set_Has_Protected
;
5039 procedure Set_Has_Qualified_Name
(Id
: E
; V
: B
:= True) is
5041 Set_Flag161
(Id
, V
);
5042 end Set_Has_Qualified_Name
;
5044 procedure Set_Has_RACW
(Id
: E
; V
: B
:= True) is
5046 pragma Assert
(Ekind
(Id
) = E_Package
);
5047 Set_Flag214
(Id
, V
);
5050 procedure Set_Has_Record_Rep_Clause
(Id
: E
; V
: B
:= True) is
5052 pragma Assert
(Id
= Base_Type
(Id
));
5054 end Set_Has_Record_Rep_Clause
;
5056 procedure Set_Has_Recursive_Call
(Id
: E
; V
: B
:= True) is
5058 pragma Assert
(Is_Subprogram
(Id
));
5059 Set_Flag143
(Id
, V
);
5060 end Set_Has_Recursive_Call
;
5062 procedure Set_Has_Shift_Operator
(Id
: E
; V
: B
:= True) is
5064 pragma Assert
(Is_Integer_Type
(Id
) and then Is_Base_Type
(Id
));
5065 Set_Flag267
(Id
, V
);
5066 end Set_Has_Shift_Operator
;
5068 procedure Set_Has_Size_Clause
(Id
: E
; V
: B
:= True) is
5071 end Set_Has_Size_Clause
;
5073 procedure Set_Has_Small_Clause
(Id
: E
; V
: B
:= True) is
5075 pragma Assert
(Is_Ordinary_Fixed_Point_Type
(Id
));
5077 end Set_Has_Small_Clause
;
5079 procedure Set_Has_Specified_Layout
(Id
: E
; V
: B
:= True) is
5081 pragma Assert
(Id
= Base_Type
(Id
));
5082 Set_Flag100
(Id
, V
);
5083 end Set_Has_Specified_Layout
;
5085 procedure Set_Has_Specified_Stream_Input
(Id
: E
; V
: B
:= True) is
5087 pragma Assert
(Is_Type
(Id
));
5088 Set_Flag190
(Id
, V
);
5089 end Set_Has_Specified_Stream_Input
;
5091 procedure Set_Has_Specified_Stream_Output
(Id
: E
; V
: B
:= True) is
5093 pragma Assert
(Is_Type
(Id
));
5094 Set_Flag191
(Id
, V
);
5095 end Set_Has_Specified_Stream_Output
;
5097 procedure Set_Has_Specified_Stream_Read
(Id
: E
; V
: B
:= True) is
5099 pragma Assert
(Is_Type
(Id
));
5100 Set_Flag192
(Id
, V
);
5101 end Set_Has_Specified_Stream_Read
;
5103 procedure Set_Has_Specified_Stream_Write
(Id
: E
; V
: B
:= True) is
5105 pragma Assert
(Is_Type
(Id
));
5106 Set_Flag193
(Id
, V
);
5107 end Set_Has_Specified_Stream_Write
;
5109 procedure Set_Has_Static_Discriminants
(Id
: E
; V
: B
:= True) is
5111 Set_Flag211
(Id
, V
);
5112 end Set_Has_Static_Discriminants
;
5114 procedure Set_Has_Static_Predicate
(Id
: E
; V
: B
:= True) is
5116 pragma Assert
(Is_Type
(Id
));
5117 Set_Flag269
(Id
, V
);
5118 end Set_Has_Static_Predicate
;
5120 procedure Set_Has_Static_Predicate_Aspect
(Id
: E
; V
: B
:= True) is
5122 pragma Assert
(Is_Type
(Id
));
5123 Set_Flag259
(Id
, V
);
5124 end Set_Has_Static_Predicate_Aspect
;
5126 procedure Set_Has_Storage_Size_Clause
(Id
: E
; V
: B
:= True) is
5128 pragma Assert
(Is_Access_Type
(Id
) or else Is_Task_Type
(Id
));
5129 pragma Assert
(Id
= Base_Type
(Id
));
5131 end Set_Has_Storage_Size_Clause
;
5133 procedure Set_Has_Stream_Size_Clause
(Id
: E
; V
: B
:= True) is
5135 pragma Assert
(Is_Elementary_Type
(Id
));
5136 Set_Flag184
(Id
, V
);
5137 end Set_Has_Stream_Size_Clause
;
5139 procedure Set_Has_Task
(Id
: E
; V
: B
:= True) is
5141 pragma Assert
(Id
= Base_Type
(Id
));
5145 procedure Set_Has_Thunks
(Id
: E
; V
: B
:= True) is
5147 pragma Assert
(Is_Tag
(Id
));
5148 Set_Flag228
(Id
, V
);
5151 procedure Set_Has_Timing_Event
(Id
: E
; V
: B
:= True) is
5153 pragma Assert
(Id
= Base_Type
(Id
));
5154 Set_Flag289
(Id
, V
);
5155 end Set_Has_Timing_Event
;
5157 procedure Set_Has_Unchecked_Union
(Id
: E
; V
: B
:= True) is
5159 pragma Assert
(Id
= Base_Type
(Id
));
5160 Set_Flag123
(Id
, V
);
5161 end Set_Has_Unchecked_Union
;
5163 procedure Set_Has_Unknown_Discriminants
(Id
: E
; V
: B
:= True) is
5165 pragma Assert
(Is_Type
(Id
));
5167 end Set_Has_Unknown_Discriminants
;
5169 procedure Set_Has_Visible_Refinement
(Id
: E
; V
: B
:= True) is
5171 pragma Assert
(Ekind
(Id
) = E_Abstract_State
);
5172 Set_Flag263
(Id
, V
);
5173 end Set_Has_Visible_Refinement
;
5175 procedure Set_Has_Volatile_Components
(Id
: E
; V
: B
:= True) is
5177 pragma Assert
(not Is_Type
(Id
) or else Is_Base_Type
(Id
));
5179 end Set_Has_Volatile_Components
;
5181 procedure Set_Has_Xref_Entry
(Id
: E
; V
: B
:= True) is
5183 Set_Flag182
(Id
, V
);
5184 end Set_Has_Xref_Entry
;
5186 procedure Set_Hiding_Loop_Variable
(Id
: E
; V
: E
) is
5188 pragma Assert
(Ekind
(Id
) = E_Variable
);
5190 end Set_Hiding_Loop_Variable
;
5192 procedure Set_Hidden_In_Formal_Instance
(Id
: E
; V
: L
) is
5194 pragma Assert
(Ekind
(Id
) = E_Package
);
5195 Set_Elist30
(Id
, V
);
5196 end Set_Hidden_In_Formal_Instance
;
5198 procedure Set_Homonym
(Id
: E
; V
: E
) is
5200 pragma Assert
(Id
/= V
);
5204 procedure Set_Incomplete_Actuals
(Id
: E
; V
: L
) is
5206 pragma Assert
(Ekind
(Id
) = E_Package
);
5207 Set_Elist24
(Id
, V
);
5208 end Set_Incomplete_Actuals
;
5210 procedure Set_Ignore_SPARK_Mode_Pragmas
(Id
: E
; V
: B
:= True) is
5213 (Ekind_In
(Id
, E_Protected_Body
, -- concurrent types
5218 Ekind_In
(Id
, E_Entry
, -- overloadable
5222 E_Generic_Procedure
,
5227 Ekind_In
(Id
, E_Generic_Package
, -- packages
5230 Set_Flag301
(Id
, V
);
5231 end Set_Ignore_SPARK_Mode_Pragmas
;
5233 procedure Set_Import_Pragma
(Id
: E
; V
: E
) is
5235 pragma Assert
(Is_Subprogram
(Id
));
5237 end Set_Import_Pragma
;
5239 procedure Set_Interface_Alias
(Id
: E
; V
: E
) is
5243 and then Is_Hidden
(Id
)
5244 and then (Ekind_In
(Id
, E_Procedure
, E_Function
)));
5246 end Set_Interface_Alias
;
5248 procedure Set_Interfaces
(Id
: E
; V
: L
) is
5250 pragma Assert
(Is_Record_Type
(Id
));
5251 Set_Elist25
(Id
, V
);
5254 procedure Set_In_Package_Body
(Id
: E
; V
: B
:= True) is
5257 end Set_In_Package_Body
;
5259 procedure Set_In_Private_Part
(Id
: E
; V
: B
:= True) is
5262 end Set_In_Private_Part
;
5264 procedure Set_In_Use
(Id
: E
; V
: B
:= True) is
5266 pragma Assert
(Nkind
(Id
) in N_Entity
);
5270 procedure Set_Initialization_Statements
(Id
: E
; V
: N
) is
5272 -- Tolerate an E_Void entity since this can be called while resolving
5273 -- an aggregate used as the initialization expression for an object
5274 -- declaration, and this occurs before the Ekind for the object is set.
5276 pragma Assert
(Ekind_In
(Id
, E_Void
, E_Constant
, E_Variable
));
5278 end Set_Initialization_Statements
;
5280 procedure Set_Inner_Instances
(Id
: E
; V
: L
) is
5282 Set_Elist23
(Id
, V
);
5283 end Set_Inner_Instances
;
5285 procedure Set_Interface_Name
(Id
: E
; V
: N
) is
5288 end Set_Interface_Name
;
5290 procedure Set_Is_Abstract_Subprogram
(Id
: E
; V
: B
:= True) is
5292 pragma Assert
(Is_Overloadable
(Id
));
5294 end Set_Is_Abstract_Subprogram
;
5296 procedure Set_Is_Abstract_Type
(Id
: E
; V
: B
:= True) is
5298 pragma Assert
(Is_Type
(Id
));
5299 Set_Flag146
(Id
, V
);
5300 end Set_Is_Abstract_Type
;
5302 procedure Set_Is_Local_Anonymous_Access
(Id
: E
; V
: B
:= True) is
5304 pragma Assert
(Is_Access_Type
(Id
));
5305 Set_Flag194
(Id
, V
);
5306 end Set_Is_Local_Anonymous_Access
;
5308 procedure Set_Is_Access_Constant
(Id
: E
; V
: B
:= True) is
5310 pragma Assert
(Is_Access_Type
(Id
));
5312 end Set_Is_Access_Constant
;
5314 procedure Set_Is_Activation_Record
(Id
: E
; V
: B
:= True) is
5316 pragma Assert
(Ekind
(Id
) = E_In_Parameter
);
5317 Set_Flag305
(Id
, V
);
5318 end Set_Is_Activation_Record
;
5320 procedure Set_Is_Actual_Subtype
(Id
: E
; V
: B
:= True) is
5322 pragma Assert
(Is_Type
(Id
));
5323 Set_Flag293
(Id
, V
);
5324 end Set_Is_Actual_Subtype
;
5326 procedure Set_Is_Ada_2005_Only
(Id
: E
; V
: B
:= True) is
5328 Set_Flag185
(Id
, V
);
5329 end Set_Is_Ada_2005_Only
;
5331 procedure Set_Is_Ada_2012_Only
(Id
: E
; V
: B
:= True) is
5333 Set_Flag199
(Id
, V
);
5334 end Set_Is_Ada_2012_Only
;
5336 procedure Set_Is_Aliased
(Id
: E
; V
: B
:= True) is
5338 pragma Assert
(Nkind
(Id
) in N_Entity
);
5342 procedure Set_Is_Asynchronous
(Id
: E
; V
: B
:= True) is
5345 (Ekind
(Id
) = E_Procedure
or else Is_Type
(Id
));
5347 end Set_Is_Asynchronous
;
5349 procedure Set_Is_Atomic
(Id
: E
; V
: B
:= True) is
5354 procedure Set_Is_Bit_Packed_Array
(Id
: E
; V
: B
:= True) is
5356 pragma Assert
((not V
)
5357 or else (Is_Array_Type
(Id
) and then Is_Base_Type
(Id
)));
5358 Set_Flag122
(Id
, V
);
5359 end Set_Is_Bit_Packed_Array
;
5361 procedure Set_Is_Called
(Id
: E
; V
: B
:= True) is
5363 pragma Assert
(Ekind_In
(Id
, E_Procedure
, E_Function
));
5364 Set_Flag102
(Id
, V
);
5367 procedure Set_Is_Character_Type
(Id
: E
; V
: B
:= True) is
5370 end Set_Is_Character_Type
;
5372 procedure Set_Is_Checked_Ghost_Entity
(Id
: E
; V
: B
:= True) is
5374 -- Allow this attribute to appear on unanalyzed entities
5376 pragma Assert
(Nkind
(Id
) in N_Entity
5377 or else Ekind
(Id
) = E_Void
);
5378 Set_Flag277
(Id
, V
);
5379 end Set_Is_Checked_Ghost_Entity
;
5381 procedure Set_Is_Child_Unit
(Id
: E
; V
: B
:= True) is
5384 end Set_Is_Child_Unit
;
5386 procedure Set_Is_Class_Wide_Clone
(Id
: E
; V
: B
:= True) is
5388 Set_Flag290
(Id
, V
);
5389 end Set_Is_Class_Wide_Clone
;
5391 procedure Set_Is_Class_Wide_Equivalent_Type
(Id
: E
; V
: B
:= True) is
5394 end Set_Is_Class_Wide_Equivalent_Type
;
5396 procedure Set_Is_Compilation_Unit
(Id
: E
; V
: B
:= True) is
5398 Set_Flag149
(Id
, V
);
5399 end Set_Is_Compilation_Unit
;
5401 procedure Set_Is_Completely_Hidden
(Id
: E
; V
: B
:= True) is
5403 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
5404 Set_Flag103
(Id
, V
);
5405 end Set_Is_Completely_Hidden
;
5407 procedure Set_Is_Concurrent_Record_Type
(Id
: E
; V
: B
:= True) is
5410 end Set_Is_Concurrent_Record_Type
;
5412 procedure Set_Is_Constr_Subt_For_U_Nominal
(Id
: E
; V
: B
:= True) is
5415 end Set_Is_Constr_Subt_For_U_Nominal
;
5417 procedure Set_Is_Constr_Subt_For_UN_Aliased
(Id
: E
; V
: B
:= True) is
5419 Set_Flag141
(Id
, V
);
5420 end Set_Is_Constr_Subt_For_UN_Aliased
;
5422 procedure Set_Is_Constrained
(Id
: E
; V
: B
:= True) is
5424 pragma Assert
(Nkind
(Id
) in N_Entity
);
5426 end Set_Is_Constrained
;
5428 procedure Set_Is_Constructor
(Id
: E
; V
: B
:= True) is
5431 end Set_Is_Constructor
;
5433 procedure Set_Is_Controlled_Active
(Id
: E
; V
: B
:= True) is
5435 pragma Assert
(Id
= Base_Type
(Id
));
5437 end Set_Is_Controlled_Active
;
5439 procedure Set_Is_Controlling_Formal
(Id
: E
; V
: B
:= True) is
5441 pragma Assert
(Is_Formal
(Id
));
5443 end Set_Is_Controlling_Formal
;
5445 procedure Set_Is_CPP_Class
(Id
: E
; V
: B
:= True) is
5448 end Set_Is_CPP_Class
;
5450 procedure Set_Is_DIC_Procedure
(Id
: E
; V
: B
:= True) is
5452 pragma Assert
(Ekind
(Id
) = E_Procedure
);
5453 Set_Flag132
(Id
, V
);
5454 end Set_Is_DIC_Procedure
;
5456 procedure Set_Is_Descendant_Of_Address
(Id
: E
; V
: B
:= True) is
5458 pragma Assert
(Is_Type
(Id
));
5459 Set_Flag223
(Id
, V
);
5460 end Set_Is_Descendant_Of_Address
;
5462 procedure Set_Is_Discrim_SO_Function
(Id
: E
; V
: B
:= True) is
5464 Set_Flag176
(Id
, V
);
5465 end Set_Is_Discrim_SO_Function
;
5467 procedure Set_Is_Discriminant_Check_Function
(Id
: E
; V
: B
:= True) is
5469 Set_Flag264
(Id
, V
);
5470 end Set_Is_Discriminant_Check_Function
;
5472 procedure Set_Is_Dispatch_Table_Entity
(Id
: E
; V
: B
:= True) is
5474 Set_Flag234
(Id
, V
);
5475 end Set_Is_Dispatch_Table_Entity
;
5477 procedure Set_Is_Dispatching_Operation
(Id
: E
; V
: B
:= True) is
5482 Is_Overloadable
(Id
)
5484 Ekind
(Id
) = E_Subprogram_Type
);
5487 end Set_Is_Dispatching_Operation
;
5489 procedure Set_Is_Elaboration_Checks_OK_Id
(Id
: E
; V
: B
:= True) is
5491 pragma Assert
(Is_Elaboration_Target
(Id
));
5492 Set_Flag148
(Id
, V
);
5493 end Set_Is_Elaboration_Checks_OK_Id
;
5495 procedure Set_Is_Elaboration_Warnings_OK_Id
(Id
: E
; V
: B
:= True) is
5497 pragma Assert
(Is_Elaboration_Target
(Id
));
5498 Set_Flag304
(Id
, V
);
5499 end Set_Is_Elaboration_Warnings_OK_Id
;
5501 procedure Set_Is_Eliminated
(Id
: E
; V
: B
:= True) is
5503 Set_Flag124
(Id
, V
);
5504 end Set_Is_Eliminated
;
5506 procedure Set_Is_Entry_Formal
(Id
: E
; V
: B
:= True) is
5509 end Set_Is_Entry_Formal
;
5511 procedure Set_Is_Entry_Wrapper
(Id
: E
; V
: B
:= True) is
5513 Set_Flag297
(Id
, V
);
5514 end Set_Is_Entry_Wrapper
;
5516 procedure Set_Is_Exception_Handler
(Id
: E
; V
: B
:= True) is
5518 pragma Assert
(Ekind
(Id
) = E_Block
);
5519 Set_Flag286
(Id
, V
);
5520 end Set_Is_Exception_Handler
;
5522 procedure Set_Is_Exported
(Id
: E
; V
: B
:= True) is
5525 end Set_Is_Exported
;
5527 procedure Set_Is_Finalized_Transient
(Id
: E
; V
: B
:= True) is
5529 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Loop_Parameter
, E_Variable
));
5530 Set_Flag252
(Id
, V
);
5531 end Set_Is_Finalized_Transient
;
5533 procedure Set_Is_First_Subtype
(Id
: E
; V
: B
:= True) is
5536 end Set_Is_First_Subtype
;
5538 procedure Set_Is_For_Access_Subtype
(Id
: E
; V
: B
:= True) is
5540 pragma Assert
(Ekind_In
(Id
, E_Record_Subtype
, E_Private_Subtype
));
5541 Set_Flag118
(Id
, V
);
5542 end Set_Is_For_Access_Subtype
;
5544 procedure Set_Is_Formal_Subprogram
(Id
: E
; V
: B
:= True) is
5546 Set_Flag111
(Id
, V
);
5547 end Set_Is_Formal_Subprogram
;
5549 procedure Set_Is_Frozen
(Id
: E
; V
: B
:= True) is
5551 pragma Assert
(Nkind
(Id
) in N_Entity
);
5555 procedure Set_Is_Generic_Actual_Subprogram
(Id
: E
; V
: B
:= True) is
5557 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
5558 Set_Flag274
(Id
, V
);
5559 end Set_Is_Generic_Actual_Subprogram
;
5561 procedure Set_Is_Generic_Actual_Type
(Id
: E
; V
: B
:= True) is
5563 pragma Assert
(Is_Type
(Id
));
5565 end Set_Is_Generic_Actual_Type
;
5567 procedure Set_Is_Generic_Instance
(Id
: E
; V
: B
:= True) is
5569 Set_Flag130
(Id
, V
);
5570 end Set_Is_Generic_Instance
;
5572 procedure Set_Is_Generic_Type
(Id
: E
; V
: B
:= True) is
5574 pragma Assert
(Nkind
(Id
) in N_Entity
);
5576 end Set_Is_Generic_Type
;
5578 procedure Set_Is_Hidden
(Id
: E
; V
: B
:= True) is
5583 procedure Set_Is_Hidden_Non_Overridden_Subpgm
(Id
: E
; V
: B
:= True) is
5585 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
5587 end Set_Is_Hidden_Non_Overridden_Subpgm
;
5589 procedure Set_Is_Hidden_Open_Scope
(Id
: E
; V
: B
:= True) is
5591 Set_Flag171
(Id
, V
);
5592 end Set_Is_Hidden_Open_Scope
;
5594 procedure Set_Is_Ignored_Ghost_Entity
(Id
: E
; V
: B
:= True) is
5596 -- Allow this attribute to appear on unanalyzed entities
5598 pragma Assert
(Nkind
(Id
) in N_Entity
5599 or else Ekind
(Id
) = E_Void
);
5600 Set_Flag278
(Id
, V
);
5601 end Set_Is_Ignored_Ghost_Entity
;
5603 procedure Set_Is_Ignored_Transient
(Id
: E
; V
: B
:= True) is
5605 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Loop_Parameter
, E_Variable
));
5606 Set_Flag295
(Id
, V
);
5607 end Set_Is_Ignored_Transient
;
5609 procedure Set_Is_Immediately_Visible
(Id
: E
; V
: B
:= True) is
5611 pragma Assert
(Nkind
(Id
) in N_Entity
);
5613 end Set_Is_Immediately_Visible
;
5615 procedure Set_Is_Implementation_Defined
(Id
: E
; V
: B
:= True) is
5617 Set_Flag254
(Id
, V
);
5618 end Set_Is_Implementation_Defined
;
5620 procedure Set_Is_Imported
(Id
: E
; V
: B
:= True) is
5623 end Set_Is_Imported
;
5625 procedure Set_Is_Independent
(Id
: E
; V
: B
:= True) is
5627 Set_Flag268
(Id
, V
);
5628 end Set_Is_Independent
;
5630 procedure Set_Is_Initial_Condition_Procedure
(Id
: E
; V
: B
:= True) is
5632 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
5633 Set_Flag302
(Id
, V
);
5634 end Set_Is_Initial_Condition_Procedure
;
5636 procedure Set_Is_Inlined
(Id
: E
; V
: B
:= True) is
5641 procedure Set_Is_Inlined_Always
(Id
: E
; V
: B
:= True) is
5643 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
5645 end Set_Is_Inlined_Always
;
5647 procedure Set_Is_Interface
(Id
: E
; V
: B
:= True) is
5649 pragma Assert
(Is_Record_Type
(Id
));
5650 Set_Flag186
(Id
, V
);
5651 end Set_Is_Interface
;
5653 procedure Set_Is_Instantiated
(Id
: E
; V
: B
:= True) is
5655 Set_Flag126
(Id
, V
);
5656 end Set_Is_Instantiated
;
5658 procedure Set_Is_Internal
(Id
: E
; V
: B
:= True) is
5660 pragma Assert
(Nkind
(Id
) in N_Entity
);
5662 end Set_Is_Internal
;
5664 procedure Set_Is_Interrupt_Handler
(Id
: E
; V
: B
:= True) is
5666 pragma Assert
(Nkind
(Id
) in N_Entity
);
5668 end Set_Is_Interrupt_Handler
;
5670 procedure Set_Is_Intrinsic_Subprogram
(Id
: E
; V
: B
:= True) is
5673 end Set_Is_Intrinsic_Subprogram
;
5675 procedure Set_Is_Invariant_Procedure
(Id
: E
; V
: B
:= True) is
5677 pragma Assert
(Ekind
(Id
) = E_Procedure
);
5678 Set_Flag257
(Id
, V
);
5679 end Set_Is_Invariant_Procedure
;
5681 procedure Set_Is_Itype
(Id
: E
; V
: B
:= True) is
5686 procedure Set_Is_Known_Non_Null
(Id
: E
; V
: B
:= True) is
5689 end Set_Is_Known_Non_Null
;
5691 procedure Set_Is_Known_Null
(Id
: E
; V
: B
:= True) is
5693 Set_Flag204
(Id
, V
);
5694 end Set_Is_Known_Null
;
5696 procedure Set_Is_Known_Valid
(Id
: E
; V
: B
:= True) is
5698 Set_Flag170
(Id
, V
);
5699 end Set_Is_Known_Valid
;
5701 procedure Set_Is_Limited_Composite
(Id
: E
; V
: B
:= True) is
5703 pragma Assert
(Is_Type
(Id
));
5704 Set_Flag106
(Id
, V
);
5705 end Set_Is_Limited_Composite
;
5707 procedure Set_Is_Limited_Interface
(Id
: E
; V
: B
:= True) is
5709 pragma Assert
(Is_Interface
(Id
));
5710 Set_Flag197
(Id
, V
);
5711 end Set_Is_Limited_Interface
;
5713 procedure Set_Is_Limited_Record
(Id
: E
; V
: B
:= True) is
5716 end Set_Is_Limited_Record
;
5718 procedure Set_Is_Machine_Code_Subprogram
(Id
: E
; V
: B
:= True) is
5720 pragma Assert
(Is_Subprogram
(Id
));
5721 Set_Flag137
(Id
, V
);
5722 end Set_Is_Machine_Code_Subprogram
;
5724 procedure Set_Is_Non_Static_Subtype
(Id
: E
; V
: B
:= True) is
5726 pragma Assert
(Is_Type
(Id
));
5727 Set_Flag109
(Id
, V
);
5728 end Set_Is_Non_Static_Subtype
;
5730 procedure Set_Is_Null_Init_Proc
(Id
: E
; V
: B
:= True) is
5732 pragma Assert
(Ekind
(Id
) = E_Procedure
);
5733 Set_Flag178
(Id
, V
);
5734 end Set_Is_Null_Init_Proc
;
5736 procedure Set_Is_Obsolescent
(Id
: E
; V
: B
:= True) is
5738 Set_Flag153
(Id
, V
);
5739 end Set_Is_Obsolescent
;
5741 procedure Set_Is_Only_Out_Parameter
(Id
: E
; V
: B
:= True) is
5743 pragma Assert
(Ekind
(Id
) = E_Out_Parameter
);
5744 Set_Flag226
(Id
, V
);
5745 end Set_Is_Only_Out_Parameter
;
5747 procedure Set_Is_Package_Body_Entity
(Id
: E
; V
: B
:= True) is
5749 Set_Flag160
(Id
, V
);
5750 end Set_Is_Package_Body_Entity
;
5752 procedure Set_Is_Packed
(Id
: E
; V
: B
:= True) is
5754 pragma Assert
(Id
= Base_Type
(Id
));
5758 procedure Set_Is_Packed_Array_Impl_Type
(Id
: E
; V
: B
:= True) is
5760 Set_Flag138
(Id
, V
);
5761 end Set_Is_Packed_Array_Impl_Type
;
5763 procedure Set_Is_Param_Block_Component_Type
(Id
: E
; V
: B
:= True) is
5765 pragma Assert
(Ekind_In
(Id
, E_Void
, E_General_Access_Type
));
5766 Set_Flag215
(Id
, V
);
5767 end Set_Is_Param_Block_Component_Type
;
5769 procedure Set_Is_Partial_Invariant_Procedure
(Id
: E
; V
: B
:= True) is
5771 pragma Assert
(Ekind
(Id
) = E_Procedure
);
5772 Set_Flag292
(Id
, V
);
5773 end Set_Is_Partial_Invariant_Procedure
;
5775 procedure Set_Is_Potentially_Use_Visible
(Id
: E
; V
: B
:= True) is
5777 pragma Assert
(Nkind
(Id
) in N_Entity
);
5779 end Set_Is_Potentially_Use_Visible
;
5781 procedure Set_Is_Predicate_Function
(Id
: E
; V
: B
:= True) is
5783 pragma Assert
(Ekind
(Id
) = E_Function
);
5784 Set_Flag255
(Id
, V
);
5785 end Set_Is_Predicate_Function
;
5787 procedure Set_Is_Predicate_Function_M
(Id
: E
; V
: B
:= True) is
5789 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
5790 Set_Flag256
(Id
, V
);
5791 end Set_Is_Predicate_Function_M
;
5793 procedure Set_Is_Preelaborated
(Id
: E
; V
: B
:= True) is
5796 end Set_Is_Preelaborated
;
5798 procedure Set_Is_Primitive
(Id
: E
; V
: B
:= True) is
5801 (Is_Overloadable
(Id
)
5802 or else Ekind_In
(Id
, E_Generic_Function
, E_Generic_Procedure
));
5803 Set_Flag218
(Id
, V
);
5804 end Set_Is_Primitive
;
5806 procedure Set_Is_Primitive_Wrapper
(Id
: E
; V
: B
:= True) is
5808 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
5809 Set_Flag195
(Id
, V
);
5810 end Set_Is_Primitive_Wrapper
;
5812 procedure Set_Is_Private_Composite
(Id
: E
; V
: B
:= True) is
5814 pragma Assert
(Is_Type
(Id
));
5815 Set_Flag107
(Id
, V
);
5816 end Set_Is_Private_Composite
;
5818 procedure Set_Is_Private_Descendant
(Id
: E
; V
: B
:= True) is
5821 end Set_Is_Private_Descendant
;
5823 procedure Set_Is_Private_Primitive
(Id
: E
; V
: B
:= True) is
5825 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
5826 Set_Flag245
(Id
, V
);
5827 end Set_Is_Private_Primitive
;
5829 procedure Set_Is_Public
(Id
: E
; V
: B
:= True) is
5831 pragma Assert
(Nkind
(Id
) in N_Entity
);
5835 procedure Set_Is_Pure
(Id
: E
; V
: B
:= True) is
5840 procedure Set_Is_Pure_Unit_Access_Type
(Id
: E
; V
: B
:= True) is
5842 pragma Assert
(Is_Access_Type
(Id
));
5843 Set_Flag189
(Id
, V
);
5844 end Set_Is_Pure_Unit_Access_Type
;
5846 procedure Set_Is_RACW_Stub_Type
(Id
: E
; V
: B
:= True) is
5848 pragma Assert
(Is_Type
(Id
));
5849 Set_Flag244
(Id
, V
);
5850 end Set_Is_RACW_Stub_Type
;
5852 procedure Set_Is_Raised
(Id
: E
; V
: B
:= True) is
5854 pragma Assert
(Ekind
(Id
) = E_Exception
);
5855 Set_Flag224
(Id
, V
);
5858 procedure Set_Is_Remote_Call_Interface
(Id
: E
; V
: B
:= True) is
5861 end Set_Is_Remote_Call_Interface
;
5863 procedure Set_Is_Remote_Types
(Id
: E
; V
: B
:= True) is
5866 end Set_Is_Remote_Types
;
5868 procedure Set_Is_Renaming_Of_Object
(Id
: E
; V
: B
:= True) is
5870 Set_Flag112
(Id
, V
);
5871 end Set_Is_Renaming_Of_Object
;
5873 procedure Set_Is_Return_Object
(Id
: E
; V
: B
:= True) is
5875 Set_Flag209
(Id
, V
);
5876 end Set_Is_Return_Object
;
5878 procedure Set_Is_Safe_To_Reevaluate
(Id
: E
; V
: B
:= True) is
5880 pragma Assert
(Ekind
(Id
) = E_Variable
);
5881 Set_Flag249
(Id
, V
);
5882 end Set_Is_Safe_To_Reevaluate
;
5884 procedure Set_Is_Shared_Passive
(Id
: E
; V
: B
:= True) is
5887 end Set_Is_Shared_Passive
;
5889 procedure Set_Is_Static_Type
(Id
: E
; V
: B
:= True) is
5891 pragma Assert
(Is_Type
(Id
));
5892 Set_Flag281
(Id
, V
);
5893 end Set_Is_Static_Type
;
5895 procedure Set_Is_Statically_Allocated
(Id
: E
; V
: B
:= True) is
5899 or else Ekind_In
(Id
, E_Exception
,
5904 end Set_Is_Statically_Allocated
;
5906 procedure Set_Is_Tag
(Id
: E
; V
: B
:= True) is
5908 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Constant
, E_Variable
));
5912 procedure Set_Is_Tagged_Type
(Id
: E
; V
: B
:= True) is
5915 end Set_Is_Tagged_Type
;
5917 procedure Set_Is_Thunk
(Id
: E
; V
: B
:= True) is
5919 pragma Assert
(Is_Subprogram
(Id
));
5920 Set_Flag225
(Id
, V
);
5923 procedure Set_Is_Trivial_Subprogram
(Id
: E
; V
: B
:= True) is
5925 Set_Flag235
(Id
, V
);
5926 end Set_Is_Trivial_Subprogram
;
5928 procedure Set_Is_True_Constant
(Id
: E
; V
: B
:= True) is
5930 Set_Flag163
(Id
, V
);
5931 end Set_Is_True_Constant
;
5933 procedure Set_Is_Unchecked_Union
(Id
: E
; V
: B
:= True) is
5935 pragma Assert
(Id
= Base_Type
(Id
));
5936 Set_Flag117
(Id
, V
);
5937 end Set_Is_Unchecked_Union
;
5939 procedure Set_Is_Underlying_Full_View
(Id
: E
; V
: B
:= True) is
5941 pragma Assert
(Is_Type
(Id
));
5942 Set_Flag298
(Id
, V
);
5943 end Set_Is_Underlying_Full_View
;
5945 procedure Set_Is_Underlying_Record_View
(Id
: E
; V
: B
:= True) is
5947 pragma Assert
(Ekind
(Id
) = E_Record_Type
);
5948 Set_Flag246
(Id
, V
);
5949 end Set_Is_Underlying_Record_View
;
5951 procedure Set_Is_Unimplemented
(Id
: E
; V
: B
:= True) is
5953 Set_Flag284
(Id
, V
);
5954 end Set_Is_Unimplemented
;
5956 procedure Set_Is_Unsigned_Type
(Id
: E
; V
: B
:= True) is
5958 pragma Assert
(Is_Discrete_Or_Fixed_Point_Type
(Id
));
5959 Set_Flag144
(Id
, V
);
5960 end Set_Is_Unsigned_Type
;
5962 procedure Set_Is_Uplevel_Referenced_Entity
(Id
: E
; V
: B
:= True) is
5965 (Ekind_In
(Id
, E_Constant
, E_Variable
, E_Discriminant
)
5966 or else Is_Formal
(Id
)
5967 or else Is_Type
(Id
));
5968 Set_Flag283
(Id
, V
);
5969 end Set_Is_Uplevel_Referenced_Entity
;
5971 procedure Set_Is_Valued_Procedure
(Id
: E
; V
: B
:= True) is
5973 pragma Assert
(Ekind
(Id
) = E_Procedure
);
5974 Set_Flag127
(Id
, V
);
5975 end Set_Is_Valued_Procedure
;
5977 procedure Set_Is_Visible_Formal
(Id
: E
; V
: B
:= True) is
5979 Set_Flag206
(Id
, V
);
5980 end Set_Is_Visible_Formal
;
5982 procedure Set_Is_Visible_Lib_Unit
(Id
: E
; V
: B
:= True) is
5984 Set_Flag116
(Id
, V
);
5985 end Set_Is_Visible_Lib_Unit
;
5987 procedure Set_Is_Volatile
(Id
: E
; V
: B
:= True) is
5989 pragma Assert
(Nkind
(Id
) in N_Entity
);
5991 end Set_Is_Volatile
;
5993 procedure Set_Is_Volatile_Full_Access
(Id
: E
; V
: B
:= True) is
5995 Set_Flag285
(Id
, V
);
5996 end Set_Is_Volatile_Full_Access
;
5998 procedure Set_Itype_Printed
(Id
: E
; V
: B
:= True) is
6000 pragma Assert
(Is_Itype
(Id
));
6001 Set_Flag202
(Id
, V
);
6002 end Set_Itype_Printed
;
6004 procedure Set_Kill_Elaboration_Checks
(Id
: E
; V
: B
:= True) is
6007 end Set_Kill_Elaboration_Checks
;
6009 procedure Set_Kill_Range_Checks
(Id
: E
; V
: B
:= True) is
6012 end Set_Kill_Range_Checks
;
6014 procedure Set_Known_To_Have_Preelab_Init
(Id
: E
; V
: B
:= True) is
6016 pragma Assert
(Is_Type
(Id
));
6017 Set_Flag207
(Id
, V
);
6018 end Set_Known_To_Have_Preelab_Init
;
6020 procedure Set_Last_Aggregate_Assignment
(Id
: E
; V
: N
) is
6022 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
6024 end Set_Last_Aggregate_Assignment
;
6026 procedure Set_Last_Assignment
(Id
: E
; V
: N
) is
6028 pragma Assert
(Is_Assignable
(Id
));
6030 end Set_Last_Assignment
;
6032 procedure Set_Last_Entity
(Id
: E
; V
: E
) is
6035 end Set_Last_Entity
;
6037 procedure Set_Limited_View
(Id
: E
; V
: E
) is
6039 pragma Assert
(Ekind
(Id
) = E_Package
);
6041 end Set_Limited_View
;
6043 procedure Set_Linker_Section_Pragma
(Id
: E
; V
: N
) is
6046 (Is_Object
(Id
) or else Is_Subprogram
(Id
) or else Is_Type
(Id
));
6048 end Set_Linker_Section_Pragma
;
6050 procedure Set_Lit_Indexes
(Id
: E
; V
: E
) is
6052 pragma Assert
(Is_Enumeration_Type
(Id
) and then Root_Type
(Id
) = Id
);
6054 end Set_Lit_Indexes
;
6056 procedure Set_Lit_Strings
(Id
: E
; V
: E
) is
6058 pragma Assert
(Is_Enumeration_Type
(Id
) and then Root_Type
(Id
) = Id
);
6060 end Set_Lit_Strings
;
6062 procedure Set_Low_Bound_Tested
(Id
: E
; V
: B
:= True) is
6064 pragma Assert
(Is_Formal
(Id
));
6065 Set_Flag205
(Id
, V
);
6066 end Set_Low_Bound_Tested
;
6068 procedure Set_Machine_Radix_10
(Id
: E
; V
: B
:= True) is
6070 pragma Assert
(Is_Decimal_Fixed_Point_Type
(Id
));
6072 end Set_Machine_Radix_10
;
6074 procedure Set_Master_Id
(Id
: E
; V
: E
) is
6076 pragma Assert
(Is_Access_Type
(Id
));
6080 procedure Set_Materialize_Entity
(Id
: E
; V
: B
:= True) is
6082 Set_Flag168
(Id
, V
);
6083 end Set_Materialize_Entity
;
6085 procedure Set_May_Inherit_Delayed_Rep_Aspects
(Id
: E
; V
: B
:= True) is
6087 Set_Flag262
(Id
, V
);
6088 end Set_May_Inherit_Delayed_Rep_Aspects
;
6090 procedure Set_Mechanism
(Id
: E
; V
: M
) is
6092 pragma Assert
(Ekind
(Id
) = E_Function
or else Is_Formal
(Id
));
6093 Set_Uint8
(Id
, UI_From_Int
(V
));
6096 procedure Set_Modulus
(Id
: E
; V
: U
) is
6098 pragma Assert
(Ekind
(Id
) = E_Modular_Integer_Type
);
6102 procedure Set_Must_Be_On_Byte_Boundary
(Id
: E
; V
: B
:= True) is
6104 pragma Assert
(Is_Type
(Id
));
6105 Set_Flag183
(Id
, V
);
6106 end Set_Must_Be_On_Byte_Boundary
;
6108 procedure Set_Must_Have_Preelab_Init
(Id
: E
; V
: B
:= True) is
6110 pragma Assert
(Is_Type
(Id
));
6111 Set_Flag208
(Id
, V
);
6112 end Set_Must_Have_Preelab_Init
;
6114 procedure Set_Needs_Activation_Record
(Id
: E
; V
: B
:= True) is
6116 Set_Flag306
(Id
, V
);
6117 end Set_Needs_Activation_Record
;
6119 procedure Set_Needs_Debug_Info
(Id
: E
; V
: B
:= True) is
6121 Set_Flag147
(Id
, V
);
6122 end Set_Needs_Debug_Info
;
6124 procedure Set_Needs_No_Actuals
(Id
: E
; V
: B
:= True) is
6127 (Is_Overloadable
(Id
)
6128 or else Ekind_In
(Id
, E_Subprogram_Type
, E_Entry_Family
));
6130 end Set_Needs_No_Actuals
;
6132 procedure Set_Never_Set_In_Source
(Id
: E
; V
: B
:= True) is
6134 Set_Flag115
(Id
, V
);
6135 end Set_Never_Set_In_Source
;
6137 procedure Set_Next_Inlined_Subprogram
(Id
: E
; V
: E
) is
6140 end Set_Next_Inlined_Subprogram
;
6142 procedure Set_No_Dynamic_Predicate_On_Actual
(Id
: E
; V
: B
:= True) is
6144 pragma Assert
(Is_Discrete_Type
(Id
));
6145 Set_Flag276
(Id
, V
);
6146 end Set_No_Dynamic_Predicate_On_Actual
;
6148 procedure Set_No_Pool_Assigned
(Id
: E
; V
: B
:= True) is
6150 pragma Assert
(Is_Access_Type
(Id
) and then Is_Base_Type
(Id
));
6151 Set_Flag131
(Id
, V
);
6152 end Set_No_Pool_Assigned
;
6154 procedure Set_No_Predicate_On_Actual
(Id
: E
; V
: B
:= True) is
6156 pragma Assert
(Is_Discrete_Type
(Id
));
6157 Set_Flag275
(Id
, V
);
6158 end Set_No_Predicate_On_Actual
;
6160 procedure Set_No_Reordering
(Id
: E
; V
: B
:= True) is
6162 pragma Assert
(Is_Record_Type
(Id
) and then Is_Base_Type
(Id
));
6163 Set_Flag239
(Id
, V
);
6164 end Set_No_Reordering
;
6166 procedure Set_No_Return
(Id
: E
; V
: B
:= True) is
6169 (V
= False or else Ekind_In
(Id
, E_Procedure
, E_Generic_Procedure
));
6170 Set_Flag113
(Id
, V
);
6173 procedure Set_No_Strict_Aliasing
(Id
: E
; V
: B
:= True) is
6175 pragma Assert
(Is_Access_Type
(Id
) and then Is_Base_Type
(Id
));
6176 Set_Flag136
(Id
, V
);
6177 end Set_No_Strict_Aliasing
;
6179 procedure Set_No_Tagged_Streams_Pragma
(Id
: E
; V
: E
) is
6181 pragma Assert
(Is_Tagged_Type
(Id
));
6183 end Set_No_Tagged_Streams_Pragma
;
6185 procedure Set_Non_Binary_Modulus
(Id
: E
; V
: B
:= True) is
6187 pragma Assert
(Is_Type
(Id
) and then Is_Base_Type
(Id
));
6189 end Set_Non_Binary_Modulus
;
6191 procedure Set_Non_Limited_View
(Id
: E
; V
: E
) is
6194 (Ekind
(Id
) in Incomplete_Kind
6195 or else Ekind_In
(Id
, E_Abstract_State
, E_Class_Wide_Type
));
6197 end Set_Non_Limited_View
;
6199 procedure Set_Nonzero_Is_True
(Id
: E
; V
: B
:= True) is
6202 (Root_Type
(Id
) = Standard_Boolean
6203 and then Ekind
(Id
) = E_Enumeration_Type
);
6204 Set_Flag162
(Id
, V
);
6205 end Set_Nonzero_Is_True
;
6207 procedure Set_Normalized_First_Bit
(Id
: E
; V
: U
) is
6209 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
6211 end Set_Normalized_First_Bit
;
6213 procedure Set_Normalized_Position
(Id
: E
; V
: U
) is
6215 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
6217 end Set_Normalized_Position
;
6219 procedure Set_Normalized_Position_Max
(Id
: E
; V
: U
) is
6221 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
6223 end Set_Normalized_Position_Max
;
6225 procedure Set_OK_To_Rename
(Id
: E
; V
: B
:= True) is
6227 pragma Assert
(Ekind
(Id
) = E_Variable
);
6228 Set_Flag247
(Id
, V
);
6229 end Set_OK_To_Rename
;
6231 procedure Set_Optimize_Alignment_Space
(Id
: E
; V
: B
:= True) is
6234 (Is_Type
(Id
) or else Ekind_In
(Id
, E_Constant
, E_Variable
));
6235 Set_Flag241
(Id
, V
);
6236 end Set_Optimize_Alignment_Space
;
6238 procedure Set_Optimize_Alignment_Time
(Id
: E
; V
: B
:= True) is
6241 (Is_Type
(Id
) or else Ekind_In
(Id
, E_Constant
, E_Variable
));
6242 Set_Flag242
(Id
, V
);
6243 end Set_Optimize_Alignment_Time
;
6245 procedure Set_Original_Access_Type
(Id
: E
; V
: E
) is
6247 pragma Assert
(Ekind
(Id
) = E_Access_Subprogram_Type
);
6249 end Set_Original_Access_Type
;
6251 procedure Set_Original_Array_Type
(Id
: E
; V
: E
) is
6253 pragma Assert
(Is_Array_Type
(Id
) or else Is_Modular_Integer_Type
(Id
));
6255 end Set_Original_Array_Type
;
6257 procedure Set_Original_Protected_Subprogram
(Id
: E
; V
: N
) is
6259 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
6261 end Set_Original_Protected_Subprogram
;
6263 procedure Set_Original_Record_Component
(Id
: E
; V
: E
) is
6265 pragma Assert
(Ekind_In
(Id
, E_Void
, E_Component
, E_Discriminant
));
6267 end Set_Original_Record_Component
;
6269 procedure Set_Overlays_Constant
(Id
: E
; V
: B
:= True) is
6271 Set_Flag243
(Id
, V
);
6272 end Set_Overlays_Constant
;
6274 procedure Set_Overridden_Operation
(Id
: E
; V
: E
) is
6276 pragma Assert
(Is_Subprogram
(Id
) or else Is_Generic_Subprogram
(Id
));
6278 end Set_Overridden_Operation
;
6280 procedure Set_Package_Instantiation
(Id
: E
; V
: N
) is
6282 pragma Assert
(Ekind_In
(Id
, E_Void
, E_Generic_Package
, E_Package
));
6284 end Set_Package_Instantiation
;
6286 procedure Set_Packed_Array_Impl_Type
(Id
: E
; V
: E
) is
6288 pragma Assert
(Is_Array_Type
(Id
));
6290 end Set_Packed_Array_Impl_Type
;
6292 procedure Set_Parent_Subtype
(Id
: E
; V
: E
) is
6294 pragma Assert
(Ekind
(Id
) = E_Record_Type
);
6296 end Set_Parent_Subtype
;
6298 procedure Set_Part_Of_Constituents
(Id
: E
; V
: L
) is
6300 pragma Assert
(Ekind_In
(Id
, E_Abstract_State
, E_Variable
));
6301 Set_Elist10
(Id
, V
);
6302 end Set_Part_Of_Constituents
;
6304 procedure Set_Part_Of_References
(Id
: E
; V
: L
) is
6306 pragma Assert
(Ekind
(Id
) = E_Variable
);
6307 Set_Elist11
(Id
, V
);
6308 end Set_Part_Of_References
;
6310 procedure Set_Partial_View_Has_Unknown_Discr
(Id
: E
; V
: B
:= True) is
6312 pragma Assert
(Is_Type
(Id
));
6313 Set_Flag280
(Id
, V
);
6314 end Set_Partial_View_Has_Unknown_Discr
;
6316 procedure Set_Pending_Access_Types
(Id
: E
; V
: L
) is
6318 pragma Assert
(Is_Type
(Id
));
6319 Set_Elist15
(Id
, V
);
6320 end Set_Pending_Access_Types
;
6322 procedure Set_Postconditions_Proc
(Id
: E
; V
: E
) is
6324 pragma Assert
(Ekind_In
(Id
, E_Entry
,
6329 end Set_Postconditions_Proc
;
6331 procedure Set_Predicated_Parent
(Id
: E
; V
: E
) is
6333 pragma Assert
(Ekind_In
(Id
, E_Array_Subtype
,
6335 E_Record_Subtype_With_Private
));
6337 end Set_Predicated_Parent
;
6339 procedure Set_Predicates_Ignored
(Id
: E
; V
: B
) is
6341 pragma Assert
(Is_Type
(Id
));
6342 Set_Flag288
(Id
, V
);
6343 end Set_Predicates_Ignored
;
6345 procedure Set_Direct_Primitive_Operations
(Id
: E
; V
: L
) is
6347 pragma Assert
(Is_Tagged_Type
(Id
));
6348 Set_Elist10
(Id
, V
);
6349 end Set_Direct_Primitive_Operations
;
6351 procedure Set_Prival
(Id
: E
; V
: E
) is
6353 pragma Assert
(Is_Protected_Component
(Id
));
6357 procedure Set_Prival_Link
(Id
: E
; V
: E
) is
6359 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
6361 end Set_Prival_Link
;
6363 procedure Set_Private_Dependents
(Id
: E
; V
: L
) is
6365 pragma Assert
(Is_Incomplete_Or_Private_Type
(Id
));
6366 Set_Elist18
(Id
, V
);
6367 end Set_Private_Dependents
;
6369 procedure Set_Private_View
(Id
: E
; V
: N
) is
6371 pragma Assert
(Is_Private_Type
(Id
));
6373 end Set_Private_View
;
6375 procedure Set_Prev_Entity
(Id
: E
; V
: E
) is
6378 end Set_Prev_Entity
;
6380 procedure Set_Protected_Body_Subprogram
(Id
: E
; V
: E
) is
6382 pragma Assert
(Is_Subprogram
(Id
) or else Is_Entry
(Id
));
6384 end Set_Protected_Body_Subprogram
;
6386 procedure Set_Protected_Formal
(Id
: E
; V
: E
) is
6388 pragma Assert
(Is_Formal
(Id
));
6390 end Set_Protected_Formal
;
6392 procedure Set_Protected_Subprogram
(Id
: E
; V
: E
) is
6394 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
6396 end Set_Protected_Subprogram
;
6398 procedure Set_Protection_Object
(Id
: E
; V
: E
) is
6400 pragma Assert
(Ekind_In
(Id
, E_Entry
,
6405 end Set_Protection_Object
;
6407 procedure Set_Reachable
(Id
: E
; V
: B
:= True) is
6412 procedure Set_Receiving_Entry
(Id
: E
; V
: E
) is
6414 pragma Assert
(Ekind
(Id
) = E_Procedure
);
6416 end Set_Receiving_Entry
;
6418 procedure Set_Referenced
(Id
: E
; V
: B
:= True) is
6420 Set_Flag156
(Id
, V
);
6423 procedure Set_Referenced_As_LHS
(Id
: E
; V
: B
:= True) is
6426 end Set_Referenced_As_LHS
;
6428 procedure Set_Referenced_As_Out_Parameter
(Id
: E
; V
: B
:= True) is
6430 Set_Flag227
(Id
, V
);
6431 end Set_Referenced_As_Out_Parameter
;
6433 procedure Set_Refinement_Constituents
(Id
: E
; V
: L
) is
6435 pragma Assert
(Ekind
(Id
) = E_Abstract_State
);
6437 end Set_Refinement_Constituents
;
6439 procedure Set_Register_Exception_Call
(Id
: E
; V
: N
) is
6441 pragma Assert
(Ekind
(Id
) = E_Exception
);
6443 end Set_Register_Exception_Call
;
6445 procedure Set_Related_Array_Object
(Id
: E
; V
: E
) is
6447 pragma Assert
(Is_Array_Type
(Id
));
6449 end Set_Related_Array_Object
;
6451 procedure Set_Related_Expression
(Id
: E
; V
: N
) is
6453 pragma Assert
(Ekind
(Id
) in Type_Kind
6454 or else Ekind_In
(Id
, E_Constant
, E_Variable
, E_Void
));
6456 end Set_Related_Expression
;
6458 procedure Set_Related_Instance
(Id
: E
; V
: E
) is
6460 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Package_Body
));
6462 end Set_Related_Instance
;
6464 procedure Set_Related_Type
(Id
: E
; V
: E
) is
6466 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Constant
, E_Variable
));
6468 end Set_Related_Type
;
6470 procedure Set_Relative_Deadline_Variable
(Id
: E
; V
: E
) is
6472 pragma Assert
(Is_Task_Type
(Id
) and then Is_Base_Type
(Id
));
6474 end Set_Relative_Deadline_Variable
;
6476 procedure Set_Renamed_Entity
(Id
: E
; V
: N
) is
6479 end Set_Renamed_Entity
;
6481 procedure Set_Renamed_In_Spec
(Id
: E
; V
: B
:= True) is
6483 pragma Assert
(Ekind
(Id
) = E_Package
);
6484 Set_Flag231
(Id
, V
);
6485 end Set_Renamed_In_Spec
;
6487 procedure Set_Renamed_Object
(Id
: E
; V
: N
) is
6490 end Set_Renamed_Object
;
6492 procedure Set_Renaming_Map
(Id
: E
; V
: U
) is
6495 end Set_Renaming_Map
;
6497 procedure Set_Requires_Overriding
(Id
: E
; V
: B
:= True) is
6499 pragma Assert
(Is_Overloadable
(Id
));
6500 Set_Flag213
(Id
, V
);
6501 end Set_Requires_Overriding
;
6503 procedure Set_Return_Present
(Id
: E
; V
: B
:= True) is
6506 end Set_Return_Present
;
6508 procedure Set_Return_Applies_To
(Id
: E
; V
: N
) is
6511 end Set_Return_Applies_To
;
6513 procedure Set_Returns_By_Ref
(Id
: E
; V
: B
:= True) is
6516 end Set_Returns_By_Ref
;
6518 procedure Set_Reverse_Bit_Order
(Id
: E
; V
: B
:= True) is
6521 (Is_Record_Type
(Id
) and then Is_Base_Type
(Id
));
6522 Set_Flag164
(Id
, V
);
6523 end Set_Reverse_Bit_Order
;
6525 procedure Set_Reverse_Storage_Order
(Id
: E
; V
: B
:= True) is
6529 and then (Is_Record_Type
(Id
) or else Is_Array_Type
(Id
)));
6531 end Set_Reverse_Storage_Order
;
6533 procedure Set_Rewritten_For_C
(Id
: E
; V
: B
:= True) is
6535 pragma Assert
(Ekind
(Id
) = E_Function
);
6536 Set_Flag287
(Id
, V
);
6537 end Set_Rewritten_For_C
;
6539 procedure Set_RM_Size
(Id
: E
; V
: U
) is
6541 pragma Assert
(Is_Type
(Id
));
6545 procedure Set_Scalar_Range
(Id
: E
; V
: N
) is
6548 end Set_Scalar_Range
;
6550 procedure Set_Scale_Value
(Id
: E
; V
: U
) is
6553 end Set_Scale_Value
;
6555 procedure Set_Scope_Depth_Value
(Id
: E
; V
: U
) is
6557 pragma Assert
(not Is_Record_Type
(Id
));
6559 end Set_Scope_Depth_Value
;
6561 procedure Set_Sec_Stack_Needed_For_Return
(Id
: E
; V
: B
:= True) is
6563 Set_Flag167
(Id
, V
);
6564 end Set_Sec_Stack_Needed_For_Return
;
6566 procedure Set_Shadow_Entities
(Id
: E
; V
: S
) is
6568 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Generic_Package
));
6570 end Set_Shadow_Entities
;
6572 procedure Set_Shared_Var_Procs_Instance
(Id
: E
; V
: E
) is
6574 pragma Assert
(Ekind
(Id
) = E_Variable
);
6576 end Set_Shared_Var_Procs_Instance
;
6578 procedure Set_Size_Check_Code
(Id
: E
; V
: N
) is
6580 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
6582 end Set_Size_Check_Code
;
6584 procedure Set_Size_Depends_On_Discriminant
(Id
: E
; V
: B
:= True) is
6586 Set_Flag177
(Id
, V
);
6587 end Set_Size_Depends_On_Discriminant
;
6589 procedure Set_Size_Known_At_Compile_Time
(Id
: E
; V
: B
:= True) is
6592 end Set_Size_Known_At_Compile_Time
;
6594 procedure Set_Small_Value
(Id
: E
; V
: R
) is
6596 pragma Assert
(Is_Fixed_Point_Type
(Id
));
6597 Set_Ureal21
(Id
, V
);
6598 end Set_Small_Value
;
6600 procedure Set_SPARK_Aux_Pragma
(Id
: E
; V
: N
) is
6603 (Ekind_In
(Id
, E_Protected_Type
, -- concurrent types
6606 Ekind_In
(Id
, E_Generic_Package
, -- packages
6610 end Set_SPARK_Aux_Pragma
;
6612 procedure Set_SPARK_Aux_Pragma_Inherited
(Id
: E
; V
: B
:= True) is
6615 (Ekind_In
(Id
, E_Protected_Type
, -- concurrent types
6618 Ekind_In
(Id
, E_Generic_Package
, -- packages
6621 Set_Flag266
(Id
, V
);
6622 end Set_SPARK_Aux_Pragma_Inherited
;
6624 procedure Set_SPARK_Pragma
(Id
: E
; V
: N
) is
6627 (Ekind_In
(Id
, E_Constant
, -- objects
6630 Ekind_In
(Id
, E_Abstract_State
, -- overloadable
6635 E_Generic_Procedure
,
6640 Ekind_In
(Id
, E_Generic_Package
, -- packages
6644 Ekind
(Id
) = E_Void
-- special purpose
6646 Ekind_In
(Id
, E_Protected_Body
, -- types
6651 end Set_SPARK_Pragma
;
6653 procedure Set_SPARK_Pragma_Inherited
(Id
: E
; V
: B
:= True) is
6656 (Ekind_In
(Id
, E_Constant
, -- objects
6659 Ekind_In
(Id
, E_Abstract_State
, -- overloadable
6664 E_Generic_Procedure
,
6669 Ekind_In
(Id
, E_Generic_Package
, -- packages
6673 Ekind
(Id
) = E_Void
-- special purpose
6675 Ekind_In
(Id
, E_Protected_Body
, -- types
6679 Set_Flag265
(Id
, V
);
6680 end Set_SPARK_Pragma_Inherited
;
6682 procedure Set_Spec_Entity
(Id
: E
; V
: E
) is
6684 pragma Assert
(Ekind
(Id
) = E_Package_Body
or else Is_Formal
(Id
));
6686 end Set_Spec_Entity
;
6688 procedure Set_SSO_Set_High_By_Default
(Id
: E
; V
: B
:= True) is
6692 and then (Is_Record_Type
(Id
) or else Is_Array_Type
(Id
)));
6693 Set_Flag273
(Id
, V
);
6694 end Set_SSO_Set_High_By_Default
;
6696 procedure Set_SSO_Set_Low_By_Default
(Id
: E
; V
: B
:= True) is
6700 and then (Is_Record_Type
(Id
) or else Is_Array_Type
(Id
)));
6701 Set_Flag272
(Id
, V
);
6702 end Set_SSO_Set_Low_By_Default
;
6704 procedure Set_Static_Discrete_Predicate
(Id
: E
; V
: S
) is
6706 pragma Assert
(Is_Discrete_Type
(Id
) and then Has_Predicates
(Id
));
6708 end Set_Static_Discrete_Predicate
;
6710 procedure Set_Static_Real_Or_String_Predicate
(Id
: E
; V
: N
) is
6712 pragma Assert
((Is_Real_Type
(Id
) or else Is_String_Type
(Id
))
6713 and then Has_Predicates
(Id
));
6715 end Set_Static_Real_Or_String_Predicate
;
6717 procedure Set_Status_Flag_Or_Transient_Decl
(Id
: E
; V
: E
) is
6719 pragma Assert
(Ekind_In
(Id
, E_Constant
,
6723 end Set_Status_Flag_Or_Transient_Decl
;
6725 procedure Set_Storage_Size_Variable
(Id
: E
; V
: E
) is
6727 pragma Assert
(Is_Access_Type
(Id
) or else Is_Task_Type
(Id
));
6728 pragma Assert
(Id
= Base_Type
(Id
));
6730 end Set_Storage_Size_Variable
;
6732 procedure Set_Static_Elaboration_Desired
(Id
: E
; V
: B
) is
6734 pragma Assert
(Ekind
(Id
) = E_Package
);
6736 end Set_Static_Elaboration_Desired
;
6738 procedure Set_Static_Initialization
(Id
: E
; V
: N
) is
6741 (Ekind
(Id
) = E_Procedure
and then not Is_Dispatching_Operation
(Id
));
6743 end Set_Static_Initialization
;
6745 procedure Set_Stored_Constraint
(Id
: E
; V
: L
) is
6747 pragma Assert
(Nkind
(Id
) in N_Entity
);
6748 Set_Elist23
(Id
, V
);
6749 end Set_Stored_Constraint
;
6751 procedure Set_Stores_Attribute_Old_Prefix
(Id
: E
; V
: B
:= True) is
6753 pragma Assert
(Ekind
(Id
) = E_Constant
);
6754 Set_Flag270
(Id
, V
);
6755 end Set_Stores_Attribute_Old_Prefix
;
6757 procedure Set_Strict_Alignment
(Id
: E
; V
: B
:= True) is
6759 pragma Assert
(Id
= Base_Type
(Id
));
6760 Set_Flag145
(Id
, V
);
6761 end Set_Strict_Alignment
;
6763 procedure Set_String_Literal_Length
(Id
: E
; V
: U
) is
6765 pragma Assert
(Ekind
(Id
) = E_String_Literal_Subtype
);
6767 end Set_String_Literal_Length
;
6769 procedure Set_String_Literal_Low_Bound
(Id
: E
; V
: N
) is
6771 pragma Assert
(Ekind
(Id
) = E_String_Literal_Subtype
);
6773 end Set_String_Literal_Low_Bound
;
6775 procedure Set_Subprograms_For_Type
(Id
: E
; V
: L
) is
6777 pragma Assert
(Is_Type
(Id
));
6778 Set_Elist29
(Id
, V
);
6779 end Set_Subprograms_For_Type
;
6781 procedure Set_Subps_Index
(Id
: E
; V
: U
) is
6783 pragma Assert
(Is_Subprogram
(Id
));
6785 end Set_Subps_Index
;
6787 procedure Set_Suppress_Elaboration_Warnings
(Id
: E
; V
: B
:= True) is
6789 Set_Flag303
(Id
, V
);
6790 end Set_Suppress_Elaboration_Warnings
;
6792 procedure Set_Suppress_Initialization
(Id
: E
; V
: B
:= True) is
6794 pragma Assert
(Is_Type
(Id
) or else Ekind
(Id
) = E_Variable
);
6795 Set_Flag105
(Id
, V
);
6796 end Set_Suppress_Initialization
;
6798 procedure Set_Suppress_Style_Checks
(Id
: E
; V
: B
:= True) is
6800 Set_Flag165
(Id
, V
);
6801 end Set_Suppress_Style_Checks
;
6803 procedure Set_Suppress_Value_Tracking_On_Call
(Id
: E
; V
: B
:= True) is
6805 Set_Flag217
(Id
, V
);
6806 end Set_Suppress_Value_Tracking_On_Call
;
6808 procedure Set_Task_Body_Procedure
(Id
: E
; V
: N
) is
6810 pragma Assert
(Ekind
(Id
) in Task_Kind
);
6812 end Set_Task_Body_Procedure
;
6814 procedure Set_Thunk_Entity
(Id
: E
; V
: E
) is
6816 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
)
6817 and then Is_Thunk
(Id
));
6819 end Set_Thunk_Entity
;
6821 procedure Set_Treat_As_Volatile
(Id
: E
; V
: B
:= True) is
6824 end Set_Treat_As_Volatile
;
6826 procedure Set_Underlying_Full_View
(Id
: E
; V
: E
) is
6828 pragma Assert
(Ekind
(Id
) in Private_Kind
);
6830 end Set_Underlying_Full_View
;
6832 procedure Set_Underlying_Record_View
(Id
: E
; V
: E
) is
6834 pragma Assert
(Ekind
(Id
) = E_Record_Type
);
6836 end Set_Underlying_Record_View
;
6838 procedure Set_Universal_Aliasing
(Id
: E
; V
: B
:= True) is
6840 pragma Assert
(Is_Type
(Id
) and then Is_Base_Type
(Id
));
6841 Set_Flag216
(Id
, V
);
6842 end Set_Universal_Aliasing
;
6844 procedure Set_Unset_Reference
(Id
: E
; V
: N
) is
6847 end Set_Unset_Reference
;
6849 procedure Set_Used_As_Generic_Actual
(Id
: E
; V
: B
:= True) is
6851 Set_Flag222
(Id
, V
);
6852 end Set_Used_As_Generic_Actual
;
6854 procedure Set_Uses_Lock_Free
(Id
: E
; V
: B
:= True) is
6856 pragma Assert
(Ekind
(Id
) = E_Protected_Type
);
6857 Set_Flag188
(Id
, V
);
6858 end Set_Uses_Lock_Free
;
6860 procedure Set_Uses_Sec_Stack
(Id
: E
; V
: B
:= True) is
6863 end Set_Uses_Sec_Stack
;
6865 procedure Set_Validated_Object
(Id
: E
; V
: N
) is
6867 pragma Assert
(Ekind
(Id
) = E_Variable
);
6869 end Set_Validated_Object
;
6871 procedure Set_Warnings_Off
(Id
: E
; V
: B
:= True) is
6874 end Set_Warnings_Off
;
6876 procedure Set_Warnings_Off_Used
(Id
: E
; V
: B
:= True) is
6878 Set_Flag236
(Id
, V
);
6879 end Set_Warnings_Off_Used
;
6881 procedure Set_Warnings_Off_Used_Unmodified
(Id
: E
; V
: B
:= True) is
6883 Set_Flag237
(Id
, V
);
6884 end Set_Warnings_Off_Used_Unmodified
;
6886 procedure Set_Warnings_Off_Used_Unreferenced
(Id
: E
; V
: B
:= True) is
6888 Set_Flag238
(Id
, V
);
6889 end Set_Warnings_Off_Used_Unreferenced
;
6891 procedure Set_Was_Hidden
(Id
: E
; V
: B
:= True) is
6893 Set_Flag196
(Id
, V
);
6896 procedure Set_Wrapped_Entity
(Id
: E
; V
: E
) is
6898 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
)
6899 and then Is_Primitive_Wrapper
(Id
));
6901 end Set_Wrapped_Entity
;
6903 -----------------------------------
6904 -- Field Initialization Routines --
6905 -----------------------------------
6907 procedure Init_Alignment
(Id
: E
) is
6909 Set_Uint14
(Id
, Uint_0
);
6912 procedure Init_Alignment
(Id
: E
; V
: Int
) is
6914 Set_Uint14
(Id
, UI_From_Int
(V
));
6917 procedure Init_Component_Bit_Offset
(Id
: E
) is
6919 Set_Uint11
(Id
, No_Uint
);
6920 end Init_Component_Bit_Offset
;
6922 procedure Init_Component_Bit_Offset
(Id
: E
; V
: Int
) is
6924 Set_Uint11
(Id
, UI_From_Int
(V
));
6925 end Init_Component_Bit_Offset
;
6927 procedure Init_Component_Size
(Id
: E
) is
6929 Set_Uint22
(Id
, Uint_0
);
6930 end Init_Component_Size
;
6932 procedure Init_Component_Size
(Id
: E
; V
: Int
) is
6934 Set_Uint22
(Id
, UI_From_Int
(V
));
6935 end Init_Component_Size
;
6937 procedure Init_Digits_Value
(Id
: E
) is
6939 Set_Uint17
(Id
, Uint_0
);
6940 end Init_Digits_Value
;
6942 procedure Init_Digits_Value
(Id
: E
; V
: Int
) is
6944 Set_Uint17
(Id
, UI_From_Int
(V
));
6945 end Init_Digits_Value
;
6947 procedure Init_Esize
(Id
: E
) is
6949 Set_Uint12
(Id
, Uint_0
);
6952 procedure Init_Esize
(Id
: E
; V
: Int
) is
6954 Set_Uint12
(Id
, UI_From_Int
(V
));
6957 procedure Init_Normalized_First_Bit
(Id
: E
) is
6959 Set_Uint8
(Id
, No_Uint
);
6960 end Init_Normalized_First_Bit
;
6962 procedure Init_Normalized_First_Bit
(Id
: E
; V
: Int
) is
6964 Set_Uint8
(Id
, UI_From_Int
(V
));
6965 end Init_Normalized_First_Bit
;
6967 procedure Init_Normalized_Position
(Id
: E
) is
6969 Set_Uint14
(Id
, No_Uint
);
6970 end Init_Normalized_Position
;
6972 procedure Init_Normalized_Position
(Id
: E
; V
: Int
) is
6974 Set_Uint14
(Id
, UI_From_Int
(V
));
6975 end Init_Normalized_Position
;
6977 procedure Init_Normalized_Position_Max
(Id
: E
) is
6979 Set_Uint10
(Id
, No_Uint
);
6980 end Init_Normalized_Position_Max
;
6982 procedure Init_Normalized_Position_Max
(Id
: E
; V
: Int
) is
6984 Set_Uint10
(Id
, UI_From_Int
(V
));
6985 end Init_Normalized_Position_Max
;
6987 procedure Init_RM_Size
(Id
: E
) is
6989 Set_Uint13
(Id
, Uint_0
);
6992 procedure Init_RM_Size
(Id
: E
; V
: Int
) is
6994 Set_Uint13
(Id
, UI_From_Int
(V
));
6997 -----------------------------
6998 -- Init_Component_Location --
6999 -----------------------------
7001 procedure Init_Component_Location
(Id
: E
) is
7003 Set_Uint8
(Id
, No_Uint
); -- Normalized_First_Bit
7004 Set_Uint10
(Id
, No_Uint
); -- Normalized_Position_Max
7005 Set_Uint11
(Id
, No_Uint
); -- Component_Bit_Offset
7006 Set_Uint12
(Id
, Uint_0
); -- Esize
7007 Set_Uint14
(Id
, No_Uint
); -- Normalized_Position
7008 end Init_Component_Location
;
7010 ----------------------------
7011 -- Init_Object_Size_Align --
7012 ----------------------------
7014 procedure Init_Object_Size_Align
(Id
: E
) is
7016 Set_Uint12
(Id
, Uint_0
); -- Esize
7017 Set_Uint14
(Id
, Uint_0
); -- Alignment
7018 end Init_Object_Size_Align
;
7024 procedure Init_Size
(Id
: E
; V
: Int
) is
7026 pragma Assert
(not Is_Object
(Id
));
7027 Set_Uint12
(Id
, UI_From_Int
(V
)); -- Esize
7028 Set_Uint13
(Id
, UI_From_Int
(V
)); -- RM_Size
7031 ---------------------
7032 -- Init_Size_Align --
7033 ---------------------
7035 procedure Init_Size_Align
(Id
: E
) is
7037 pragma Assert
(not Is_Object
(Id
));
7038 Set_Uint12
(Id
, Uint_0
); -- Esize
7039 Set_Uint13
(Id
, Uint_0
); -- RM_Size
7040 Set_Uint14
(Id
, Uint_0
); -- Alignment
7041 end Init_Size_Align
;
7043 ----------------------------------------------
7044 -- Type Representation Attribute Predicates --
7045 ----------------------------------------------
7047 function Known_Alignment
(E
: Entity_Id
) return B
is
7049 return Uint14
(E
) /= Uint_0
7050 and then Uint14
(E
) /= No_Uint
;
7051 end Known_Alignment
;
7053 function Known_Component_Bit_Offset
(E
: Entity_Id
) return B
is
7055 return Uint11
(E
) /= No_Uint
;
7056 end Known_Component_Bit_Offset
;
7058 function Known_Component_Size
(E
: Entity_Id
) return B
is
7060 return Uint22
(Base_Type
(E
)) /= Uint_0
7061 and then Uint22
(Base_Type
(E
)) /= No_Uint
;
7062 end Known_Component_Size
;
7064 function Known_Esize
(E
: Entity_Id
) return B
is
7066 return Uint12
(E
) /= Uint_0
7067 and then Uint12
(E
) /= No_Uint
;
7070 function Known_Normalized_First_Bit
(E
: Entity_Id
) return B
is
7072 return Uint8
(E
) /= No_Uint
;
7073 end Known_Normalized_First_Bit
;
7075 function Known_Normalized_Position
(E
: Entity_Id
) return B
is
7077 return Uint14
(E
) /= No_Uint
;
7078 end Known_Normalized_Position
;
7080 function Known_Normalized_Position_Max
(E
: Entity_Id
) return B
is
7082 return Uint10
(E
) /= No_Uint
;
7083 end Known_Normalized_Position_Max
;
7085 function Known_RM_Size
(E
: Entity_Id
) return B
is
7087 return Uint13
(E
) /= No_Uint
7088 and then (Uint13
(E
) /= Uint_0
7089 or else Is_Discrete_Type
(E
)
7090 or else Is_Fixed_Point_Type
(E
));
7093 function Known_Static_Component_Bit_Offset
(E
: Entity_Id
) return B
is
7095 return Uint11
(E
) /= No_Uint
7096 and then Uint11
(E
) >= Uint_0
;
7097 end Known_Static_Component_Bit_Offset
;
7099 function Known_Static_Component_Size
(E
: Entity_Id
) return B
is
7101 return Uint22
(Base_Type
(E
)) > Uint_0
;
7102 end Known_Static_Component_Size
;
7104 function Known_Static_Esize
(E
: Entity_Id
) return B
is
7106 return Uint12
(E
) > Uint_0
7107 and then not Is_Generic_Type
(E
);
7108 end Known_Static_Esize
;
7110 function Known_Static_Normalized_First_Bit
(E
: Entity_Id
) return B
is
7112 return Uint8
(E
) /= No_Uint
7113 and then Uint8
(E
) >= Uint_0
;
7114 end Known_Static_Normalized_First_Bit
;
7116 function Known_Static_Normalized_Position
(E
: Entity_Id
) return B
is
7118 return Uint14
(E
) /= No_Uint
7119 and then Uint14
(E
) >= Uint_0
;
7120 end Known_Static_Normalized_Position
;
7122 function Known_Static_Normalized_Position_Max
(E
: Entity_Id
) return B
is
7124 return Uint10
(E
) /= No_Uint
7125 and then Uint10
(E
) >= Uint_0
;
7126 end Known_Static_Normalized_Position_Max
;
7128 function Known_Static_RM_Size
(E
: Entity_Id
) return B
is
7130 return (Uint13
(E
) > Uint_0
7131 or else Is_Discrete_Type
(E
)
7132 or else Is_Fixed_Point_Type
(E
))
7133 and then not Is_Generic_Type
(E
);
7134 end Known_Static_RM_Size
;
7136 function Unknown_Alignment
(E
: Entity_Id
) return B
is
7138 return Uint14
(E
) = Uint_0
7139 or else Uint14
(E
) = No_Uint
;
7140 end Unknown_Alignment
;
7142 function Unknown_Component_Bit_Offset
(E
: Entity_Id
) return B
is
7144 return Uint11
(E
) = No_Uint
;
7145 end Unknown_Component_Bit_Offset
;
7147 function Unknown_Component_Size
(E
: Entity_Id
) return B
is
7149 return Uint22
(Base_Type
(E
)) = Uint_0
7151 Uint22
(Base_Type
(E
)) = No_Uint
;
7152 end Unknown_Component_Size
;
7154 function Unknown_Esize
(E
: Entity_Id
) return B
is
7156 return Uint12
(E
) = No_Uint
7158 Uint12
(E
) = Uint_0
;
7161 function Unknown_Normalized_First_Bit
(E
: Entity_Id
) return B
is
7163 return Uint8
(E
) = No_Uint
;
7164 end Unknown_Normalized_First_Bit
;
7166 function Unknown_Normalized_Position
(E
: Entity_Id
) return B
is
7168 return Uint14
(E
) = No_Uint
;
7169 end Unknown_Normalized_Position
;
7171 function Unknown_Normalized_Position_Max
(E
: Entity_Id
) return B
is
7173 return Uint10
(E
) = No_Uint
;
7174 end Unknown_Normalized_Position_Max
;
7176 function Unknown_RM_Size
(E
: Entity_Id
) return B
is
7178 return (Uint13
(E
) = Uint_0
7179 and then not Is_Discrete_Type
(E
)
7180 and then not Is_Fixed_Point_Type
(E
))
7181 or else Uint13
(E
) = No_Uint
;
7182 end Unknown_RM_Size
;
7184 --------------------
7185 -- Address_Clause --
7186 --------------------
7188 function Address_Clause
(Id
: E
) return N
is
7190 return Get_Attribute_Definition_Clause
(Id
, Attribute_Address
);
7197 function Aft_Value
(Id
: E
) return U
is
7199 Delta_Val
: Ureal
:= Delta_Value
(Id
);
7201 while Delta_Val
< Ureal_Tenth
loop
7202 Delta_Val
:= Delta_Val
* Ureal_10
;
7203 Result
:= Result
+ 1;
7206 return UI_From_Int
(Result
);
7209 ----------------------
7210 -- Alignment_Clause --
7211 ----------------------
7213 function Alignment_Clause
(Id
: E
) return N
is
7215 return Get_Attribute_Definition_Clause
(Id
, Attribute_Alignment
);
7216 end Alignment_Clause
;
7222 procedure Append_Entity
(Id
: Entity_Id
; Scop
: Entity_Id
) is
7223 Last
: constant Entity_Id
:= Last_Entity
(Scop
);
7226 Set_Scope
(Id
, Scop
);
7227 Set_Prev_Entity
(Id
, Empty
); -- Empty <-- Id
7229 -- The entity chain is empty
7232 Set_First_Entity
(Scop
, Id
);
7234 -- Otherwise the entity chain has at least one element
7237 Link_Entities
(Last
, Id
); -- Last <-- Id, Last --> Id
7240 -- NOTE: The setting of the Next_Entity attribute of Id must happen
7241 -- here as opposed to at the beginning of the routine because doing
7242 -- so causes the binder to hang. It is not clear why ???
7244 Set_Next_Entity
(Id
, Empty
); -- Id --> Empty
7246 Set_Last_Entity
(Scop
, Id
);
7253 function Base_Type
(Id
: E
) return E
is
7255 if Is_Base_Type
(Id
) then
7258 pragma Assert
(Is_Type
(Id
));
7263 -------------------------
7264 -- Component_Alignment --
7265 -------------------------
7267 -- Component Alignment is encoded using two flags, Flag128/129 as
7268 -- follows. Note that both flags False = Align_Default, so that the
7269 -- default initialization of flags to False initializes component
7270 -- alignment to the default value as required.
7272 -- Flag128 Flag129 Value
7273 -- ------- ------- -----
7274 -- False False Calign_Default
7275 -- False True Calign_Component_Size
7276 -- True False Calign_Component_Size_4
7277 -- True True Calign_Storage_Unit
7279 function Component_Alignment
(Id
: E
) return C
is
7280 BT
: constant Node_Id
:= Base_Type
(Id
);
7283 pragma Assert
(Is_Array_Type
(Id
) or else Is_Record_Type
(Id
));
7285 if Flag128
(BT
) then
7286 if Flag129
(BT
) then
7287 return Calign_Storage_Unit
;
7289 return Calign_Component_Size_4
;
7293 if Flag129
(BT
) then
7294 return Calign_Component_Size
;
7296 return Calign_Default
;
7299 end Component_Alignment
;
7301 ----------------------
7302 -- Declaration_Node --
7303 ----------------------
7305 function Declaration_Node
(Id
: E
) return N
is
7309 if Ekind
(Id
) = E_Incomplete_Type
7310 and then Present
(Full_View
(Id
))
7312 P
:= Parent
(Full_View
(Id
));
7318 if Nkind_In
(P
, N_Selected_Component
, N_Expanded_Name
)
7319 or else (Nkind
(P
) = N_Defining_Program_Unit_Name
7320 and then Is_Child_Unit
(Id
))
7327 end Declaration_Node
;
7329 ---------------------
7330 -- Designated_Type --
7331 ---------------------
7333 function Designated_Type
(Id
: E
) return E
is
7337 Desig_Type
:= Directly_Designated_Type
(Id
);
7339 if Is_Incomplete_Type
(Desig_Type
)
7340 and then Present
(Full_View
(Desig_Type
))
7342 return Full_View
(Desig_Type
);
7344 elsif Is_Class_Wide_Type
(Desig_Type
)
7345 and then Is_Incomplete_Type
(Etype
(Desig_Type
))
7346 and then Present
(Full_View
(Etype
(Desig_Type
)))
7347 and then Present
(Class_Wide_Type
(Full_View
(Etype
(Desig_Type
))))
7349 return Class_Wide_Type
(Full_View
(Etype
(Desig_Type
)));
7354 end Designated_Type
;
7360 function DIC_Procedure
(Id
: E
) return E
is
7361 Subp_Elmt
: Elmt_Id
;
7362 Subp_Id
: Entity_Id
;
7366 pragma Assert
(Is_Type
(Id
));
7368 Subps
:= Subprograms_For_Type
(Base_Type
(Id
));
7370 if Present
(Subps
) then
7371 Subp_Elmt
:= First_Elmt
(Subps
);
7372 while Present
(Subp_Elmt
) loop
7373 Subp_Id
:= Node
(Subp_Elmt
);
7375 if Is_DIC_Procedure
(Subp_Id
) then
7379 Next_Elmt
(Subp_Elmt
);
7386 ----------------------
7387 -- Entry_Index_Type --
7388 ----------------------
7390 function Entry_Index_Type
(Id
: E
) return N
is
7392 pragma Assert
(Ekind
(Id
) = E_Entry_Family
);
7393 return Etype
(Discrete_Subtype_Definition
(Parent
(Id
)));
7394 end Entry_Index_Type
;
7396 ---------------------
7397 -- First_Component --
7398 ---------------------
7400 function First_Component
(Id
: E
) return E
is
7405 (Is_Concurrent_Type
(Id
)
7406 or else Is_Incomplete_Or_Private_Type
(Id
)
7407 or else Is_Record_Type
(Id
));
7409 Comp_Id
:= First_Entity
(Id
);
7410 while Present
(Comp_Id
) loop
7411 exit when Ekind
(Comp_Id
) = E_Component
;
7412 Comp_Id
:= Next_Entity
(Comp_Id
);
7416 end First_Component
;
7418 -------------------------------------
7419 -- First_Component_Or_Discriminant --
7420 -------------------------------------
7422 function First_Component_Or_Discriminant
(Id
: E
) return E
is
7427 (Is_Concurrent_Type
(Id
)
7428 or else Is_Incomplete_Or_Private_Type
(Id
)
7429 or else Is_Record_Type
(Id
)
7430 or else Has_Discriminants
(Id
));
7432 Comp_Id
:= First_Entity
(Id
);
7433 while Present
(Comp_Id
) loop
7434 exit when Ekind_In
(Comp_Id
, E_Component
, E_Discriminant
);
7435 Comp_Id
:= Next_Entity
(Comp_Id
);
7439 end First_Component_Or_Discriminant
;
7445 function First_Formal
(Id
: E
) return E
is
7450 (Is_Generic_Subprogram
(Id
)
7451 or else Is_Overloadable
(Id
)
7452 or else Ekind_In
(Id
, E_Entry_Family
,
7454 E_Subprogram_Type
));
7456 if Ekind
(Id
) = E_Enumeration_Literal
then
7460 Formal
:= First_Entity
(Id
);
7462 -- Deal with the common, non-generic case first
7464 if No
(Formal
) or else Is_Formal
(Formal
) then
7468 -- The first/next entity chain of a generic subprogram contains all
7469 -- generic formal parameters, followed by the formal parameters.
7471 if Is_Generic_Subprogram
(Id
) then
7472 while Present
(Formal
) and then not Is_Formal
(Formal
) loop
7473 Next_Entity
(Formal
);
7482 ------------------------------
7483 -- First_Formal_With_Extras --
7484 ------------------------------
7486 function First_Formal_With_Extras
(Id
: E
) return E
is
7491 (Is_Generic_Subprogram
(Id
)
7492 or else Is_Overloadable
(Id
)
7493 or else Ekind_In
(Id
, E_Entry_Family
,
7495 E_Subprogram_Type
));
7497 if Ekind
(Id
) = E_Enumeration_Literal
then
7501 Formal
:= First_Entity
(Id
);
7503 -- The first/next entity chain of a generic subprogram contains all
7504 -- generic formal parameters, followed by the formal parameters. Go
7505 -- directly to the parameters by skipping the formal part.
7507 if Is_Generic_Subprogram
(Id
) then
7508 while Present
(Formal
) and then not Is_Formal
(Formal
) loop
7509 Next_Entity
(Formal
);
7513 if Present
(Formal
) and then Is_Formal
(Formal
) then
7516 return Extra_Formals
(Id
); -- Empty if no extra formals
7519 end First_Formal_With_Extras
;
7521 -------------------------------------
7522 -- Get_Attribute_Definition_Clause --
7523 -------------------------------------
7525 function Get_Attribute_Definition_Clause
7527 Id
: Attribute_Id
) return Node_Id
7532 N
:= First_Rep_Item
(E
);
7533 while Present
(N
) loop
7534 if Nkind
(N
) = N_Attribute_Definition_Clause
7535 and then Get_Attribute_Id
(Chars
(N
)) = Id
7544 end Get_Attribute_Definition_Clause
;
7546 ---------------------------
7547 -- Get_Class_Wide_Pragma --
7548 ---------------------------
7550 function Get_Class_Wide_Pragma
7552 Id
: Pragma_Id
) return Node_Id
7558 Items
:= Contract
(E
);
7564 Item
:= Pre_Post_Conditions
(Items
);
7565 while Present
(Item
) loop
7566 if Nkind
(Item
) = N_Pragma
7567 and then Get_Pragma_Id
(Pragma_Name_Unmapped
(Item
)) = Id
7568 and then Class_Present
(Item
)
7573 Item
:= Next_Pragma
(Item
);
7577 end Get_Class_Wide_Pragma
;
7583 function Get_Full_View
(T
: Entity_Id
) return Entity_Id
is
7585 if Is_Incomplete_Type
(T
) and then Present
(Full_View
(T
)) then
7586 return Full_View
(T
);
7588 elsif Is_Class_Wide_Type
(T
)
7589 and then Is_Incomplete_Type
(Root_Type
(T
))
7590 and then Present
(Full_View
(Root_Type
(T
)))
7592 return Class_Wide_Type
(Full_View
(Root_Type
(T
)));
7603 function Get_Pragma
(E
: Entity_Id
; Id
: Pragma_Id
) return Node_Id
is
7605 -- Classification pragmas
7607 Is_CLS
: constant Boolean :=
7608 Id
= Pragma_Abstract_State
or else
7609 Id
= Pragma_Attach_Handler
or else
7610 Id
= Pragma_Async_Readers
or else
7611 Id
= Pragma_Async_Writers
or else
7612 Id
= Pragma_Constant_After_Elaboration
or else
7613 Id
= Pragma_Depends
or else
7614 Id
= Pragma_Effective_Reads
or else
7615 Id
= Pragma_Effective_Writes
or else
7616 Id
= Pragma_Extensions_Visible
or else
7617 Id
= Pragma_Global
or else
7618 Id
= Pragma_Initial_Condition
or else
7619 Id
= Pragma_Initializes
or else
7620 Id
= Pragma_Interrupt_Handler
or else
7621 Id
= Pragma_Part_Of
or else
7622 Id
= Pragma_Refined_Depends
or else
7623 Id
= Pragma_Refined_Global
or else
7624 Id
= Pragma_Refined_State
or else
7625 Id
= Pragma_Volatile_Function
;
7627 -- Contract / test case pragmas
7629 Is_CTC
: constant Boolean :=
7630 Id
= Pragma_Contract_Cases
or else
7631 Id
= Pragma_Test_Case
;
7633 -- Pre / postcondition pragmas
7635 Is_PPC
: constant Boolean :=
7636 Id
= Pragma_Precondition
or else
7637 Id
= Pragma_Postcondition
or else
7638 Id
= Pragma_Refined_Post
;
7640 In_Contract
: constant Boolean := Is_CLS
or Is_CTC
or Is_PPC
;
7646 -- Handle pragmas that appear in N_Contract nodes. Those have to be
7647 -- extracted from their specialized list.
7650 Items
:= Contract
(E
);
7656 Item
:= Classifications
(Items
);
7659 Item
:= Contract_Test_Cases
(Items
);
7662 Item
:= Pre_Post_Conditions
(Items
);
7668 Item
:= First_Rep_Item
(E
);
7671 while Present
(Item
) loop
7672 if Nkind
(Item
) = N_Pragma
7673 and then Get_Pragma_Id
(Pragma_Name_Unmapped
(Item
)) = Id
7677 -- All nodes in N_Contract are chained using Next_Pragma
7679 elsif In_Contract
then
7680 Item
:= Next_Pragma
(Item
);
7685 Next_Rep_Item
(Item
);
7692 --------------------------------------
7693 -- Get_Record_Representation_Clause --
7694 --------------------------------------
7696 function Get_Record_Representation_Clause
(E
: Entity_Id
) return Node_Id
is
7700 N
:= First_Rep_Item
(E
);
7701 while Present
(N
) loop
7702 if Nkind
(N
) = N_Record_Representation_Clause
then
7710 end Get_Record_Representation_Clause
;
7712 ------------------------
7713 -- Has_Attach_Handler --
7714 ------------------------
7716 function Has_Attach_Handler
(Id
: E
) return B
is
7720 pragma Assert
(Is_Protected_Type
(Id
));
7722 Ritem
:= First_Rep_Item
(Id
);
7723 while Present
(Ritem
) loop
7724 if Nkind
(Ritem
) = N_Pragma
7725 and then Pragma_Name
(Ritem
) = Name_Attach_Handler
7729 Next_Rep_Item
(Ritem
);
7734 end Has_Attach_Handler
;
7740 function Has_DIC
(Id
: E
) return B
is
7742 return Has_Own_DIC
(Id
) or else Has_Inherited_DIC
(Id
);
7749 function Has_Entries
(Id
: E
) return B
is
7753 pragma Assert
(Is_Concurrent_Type
(Id
));
7755 Ent
:= First_Entity
(Id
);
7756 while Present
(Ent
) loop
7757 if Is_Entry
(Ent
) then
7761 Ent
:= Next_Entity
(Ent
);
7767 ----------------------------
7768 -- Has_Foreign_Convention --
7769 ----------------------------
7771 function Has_Foreign_Convention
(Id
: E
) return B
is
7773 -- While regular Intrinsics such as the Standard operators fit in the
7774 -- "Ada" convention, those with an Interface_Name materialize GCC
7775 -- builtin imports for which Ada special treatments shouldn't apply.
7777 return Convention
(Id
) in Foreign_Convention
7778 or else (Convention
(Id
) = Convention_Intrinsic
7779 and then Present
(Interface_Name
(Id
)));
7780 end Has_Foreign_Convention
;
7782 ---------------------------
7783 -- Has_Interrupt_Handler --
7784 ---------------------------
7786 function Has_Interrupt_Handler
(Id
: E
) return B
is
7790 pragma Assert
(Is_Protected_Type
(Id
));
7792 Ritem
:= First_Rep_Item
(Id
);
7793 while Present
(Ritem
) loop
7794 if Nkind
(Ritem
) = N_Pragma
7795 and then Pragma_Name
(Ritem
) = Name_Interrupt_Handler
7799 Next_Rep_Item
(Ritem
);
7804 end Has_Interrupt_Handler
;
7806 --------------------
7807 -- Has_Invariants --
7808 --------------------
7810 function Has_Invariants
(Id
: E
) return B
is
7812 return Has_Own_Invariants
(Id
) or else Has_Inherited_Invariants
(Id
);
7815 --------------------------
7816 -- Has_Non_Limited_View --
7817 --------------------------
7819 function Has_Non_Limited_View
(Id
: E
) return B
is
7821 return (Ekind
(Id
) in Incomplete_Kind
7822 or else Ekind
(Id
) in Class_Wide_Kind
7823 or else Ekind
(Id
) = E_Abstract_State
)
7824 and then Present
(Non_Limited_View
(Id
));
7825 end Has_Non_Limited_View
;
7827 ---------------------------------
7828 -- Has_Non_Null_Abstract_State --
7829 ---------------------------------
7831 function Has_Non_Null_Abstract_State
(Id
: E
) return B
is
7833 pragma Assert
(Ekind_In
(Id
, E_Generic_Package
, E_Package
));
7836 Present
(Abstract_States
(Id
))
7838 not Is_Null_State
(Node
(First_Elmt
(Abstract_States
(Id
))));
7839 end Has_Non_Null_Abstract_State
;
7841 -------------------------------------
7842 -- Has_Non_Null_Visible_Refinement --
7843 -------------------------------------
7845 function Has_Non_Null_Visible_Refinement
(Id
: E
) return B
is
7846 Constits
: Elist_Id
;
7849 -- "Refinement" is a concept applicable only to abstract states
7851 pragma Assert
(Ekind
(Id
) = E_Abstract_State
);
7852 Constits
:= Refinement_Constituents
(Id
);
7854 -- A partial refinement is always non-null. For a full refinement to be
7855 -- non-null, the first constituent must be anything other than null.
7858 Has_Partial_Visible_Refinement
(Id
)
7859 or else (Has_Visible_Refinement
(Id
)
7860 and then Present
(Constits
)
7861 and then Nkind
(Node
(First_Elmt
(Constits
))) /= N_Null
);
7862 end Has_Non_Null_Visible_Refinement
;
7864 -----------------------------
7865 -- Has_Null_Abstract_State --
7866 -----------------------------
7868 function Has_Null_Abstract_State
(Id
: E
) return B
is
7869 pragma Assert
(Ekind_In
(Id
, E_Generic_Package
, E_Package
));
7871 States
: constant Elist_Id
:= Abstract_States
(Id
);
7874 -- Check first available state of related package. A null abstract
7875 -- state always appears as the sole element of the state list.
7879 and then Is_Null_State
(Node
(First_Elmt
(States
)));
7880 end Has_Null_Abstract_State
;
7882 ---------------------------------
7883 -- Has_Null_Visible_Refinement --
7884 ---------------------------------
7886 function Has_Null_Visible_Refinement
(Id
: E
) return B
is
7887 Constits
: Elist_Id
;
7890 -- "Refinement" is a concept applicable only to abstract states
7892 pragma Assert
(Ekind
(Id
) = E_Abstract_State
);
7893 Constits
:= Refinement_Constituents
(Id
);
7895 -- For a refinement to be null, the state's sole constituent must be a
7899 Has_Visible_Refinement
(Id
)
7900 and then Present
(Constits
)
7901 and then Nkind
(Node
(First_Elmt
(Constits
))) = N_Null
;
7902 end Has_Null_Visible_Refinement
;
7904 --------------------
7905 -- Has_Unmodified --
7906 --------------------
7908 function Has_Unmodified
(E
: Entity_Id
) return Boolean is
7910 if Has_Pragma_Unmodified
(E
) then
7912 elsif Warnings_Off
(E
) then
7913 Set_Warnings_Off_Used_Unmodified
(E
);
7920 ---------------------
7921 -- Has_Unreferenced --
7922 ---------------------
7924 function Has_Unreferenced
(E
: Entity_Id
) return Boolean is
7926 if Has_Pragma_Unreferenced
(E
) then
7928 elsif Warnings_Off
(E
) then
7929 Set_Warnings_Off_Used_Unreferenced
(E
);
7934 end Has_Unreferenced
;
7936 ----------------------
7937 -- Has_Warnings_Off --
7938 ----------------------
7940 function Has_Warnings_Off
(E
: Entity_Id
) return Boolean is
7942 if Warnings_Off
(E
) then
7943 Set_Warnings_Off_Used
(E
);
7948 end Has_Warnings_Off
;
7950 ------------------------------
7951 -- Implementation_Base_Type --
7952 ------------------------------
7954 function Implementation_Base_Type
(Id
: E
) return E
is
7959 Bastyp
:= Base_Type
(Id
);
7961 if Is_Incomplete_Or_Private_Type
(Bastyp
) then
7962 Imptyp
:= Underlying_Type
(Bastyp
);
7964 -- If we have an implementation type, then just return it,
7965 -- otherwise we return the Base_Type anyway. This can only
7966 -- happen in error situations and should avoid some error bombs.
7968 if Present
(Imptyp
) then
7969 return Base_Type
(Imptyp
);
7977 end Implementation_Base_Type
;
7979 -------------------------
7980 -- Invariant_Procedure --
7981 -------------------------
7983 function Invariant_Procedure
(Id
: E
) return E
is
7984 Subp_Elmt
: Elmt_Id
;
7985 Subp_Id
: Entity_Id
;
7989 pragma Assert
(Is_Type
(Id
));
7991 Subps
:= Subprograms_For_Type
(Base_Type
(Id
));
7993 if Present
(Subps
) then
7994 Subp_Elmt
:= First_Elmt
(Subps
);
7995 while Present
(Subp_Elmt
) loop
7996 Subp_Id
:= Node
(Subp_Elmt
);
7998 if Is_Invariant_Procedure
(Subp_Id
) then
8002 Next_Elmt
(Subp_Elmt
);
8007 end Invariant_Procedure
;
8009 ----------------------
8010 -- Is_Atomic_Or_VFA --
8011 ----------------------
8013 function Is_Atomic_Or_VFA
(Id
: E
) return B
is
8015 return Is_Atomic
(Id
) or else Is_Volatile_Full_Access
(Id
);
8016 end Is_Atomic_Or_VFA
;
8022 -- Global flag table allowing rapid computation of this function
8024 Entity_Is_Base_Type
: constant array (Entity_Kind
) of Boolean :=
8025 (E_Enumeration_Subtype |
8026 E_Incomplete_Subtype |
8027 E_Signed_Integer_Subtype |
8028 E_Modular_Integer_Subtype |
8029 E_Floating_Point_Subtype |
8030 E_Ordinary_Fixed_Point_Subtype |
8031 E_Decimal_Fixed_Point_Subtype |
8035 E_Record_Subtype_With_Private |
8036 E_Limited_Private_Subtype |
8038 E_Protected_Subtype |
8040 E_String_Literal_Subtype |
8041 E_Class_Wide_Subtype
=> False,
8044 function Is_Base_Type
(Id
: E
) return Boolean is
8046 return Entity_Is_Base_Type
(Ekind
(Id
));
8049 ---------------------
8050 -- Is_Boolean_Type --
8051 ---------------------
8053 function Is_Boolean_Type
(Id
: E
) return B
is
8055 return Root_Type
(Id
) = Standard_Boolean
;
8056 end Is_Boolean_Type
;
8058 ------------------------
8059 -- Is_Constant_Object --
8060 ------------------------
8062 function Is_Constant_Object
(Id
: E
) return B
is
8063 K
: constant Entity_Kind
:= Ekind
(Id
);
8066 K
= E_Constant
or else K
= E_In_Parameter
or else K
= E_Loop_Parameter
;
8067 end Is_Constant_Object
;
8073 function Is_Controlled
(Id
: E
) return B
is
8075 return Is_Controlled_Active
(Id
) and then not Disable_Controlled
(Id
);
8078 --------------------
8079 -- Is_Discriminal --
8080 --------------------
8082 function Is_Discriminal
(Id
: E
) return B
is
8084 return (Ekind_In
(Id
, E_Constant
, E_In_Parameter
)
8085 and then Present
(Discriminal_Link
(Id
)));
8088 ----------------------
8089 -- Is_Dynamic_Scope --
8090 ----------------------
8092 function Is_Dynamic_Scope
(Id
: E
) return B
is
8095 Ekind
(Id
) = E_Block
8097 Ekind
(Id
) = E_Function
8099 Ekind
(Id
) = E_Procedure
8101 Ekind
(Id
) = E_Subprogram_Body
8103 Ekind
(Id
) = E_Task_Type
8105 (Ekind
(Id
) = E_Limited_Private_Type
8106 and then Present
(Full_View
(Id
))
8107 and then Ekind
(Full_View
(Id
)) = E_Task_Type
)
8109 Ekind
(Id
) = E_Entry
8111 Ekind
(Id
) = E_Entry_Family
8113 Ekind
(Id
) = E_Return_Statement
;
8114 end Is_Dynamic_Scope
;
8116 --------------------
8117 -- Is_Entity_Name --
8118 --------------------
8120 function Is_Entity_Name
(N
: Node_Id
) return Boolean is
8121 Kind
: constant Node_Kind
:= Nkind
(N
);
8124 -- Identifiers, operator symbols, expanded names are entity names
8126 return Kind
= N_Identifier
8127 or else Kind
= N_Operator_Symbol
8128 or else Kind
= N_Expanded_Name
8130 -- Attribute references are entity names if they refer to an entity.
8131 -- Note that we don't do this by testing for the presence of the
8132 -- Entity field in the N_Attribute_Reference node, since it may not
8133 -- have been set yet.
8135 or else (Kind
= N_Attribute_Reference
8136 and then Is_Entity_Attribute_Name
(Attribute_Name
(N
)));
8139 ---------------------------
8140 -- Is_Elaboration_Target --
8141 ---------------------------
8143 function Is_Elaboration_Target
(Id
: Entity_Id
) return Boolean is
8146 Ekind_In
(Id
, E_Constant
, E_Variable
)
8147 or else Is_Entry
(Id
)
8148 or else Is_Generic_Unit
(Id
)
8149 or else Is_Subprogram
(Id
)
8150 or else Is_Task_Type
(Id
);
8151 end Is_Elaboration_Target
;
8153 -----------------------
8154 -- Is_External_State --
8155 -----------------------
8157 function Is_External_State
(Id
: E
) return B
is
8159 -- To qualify, the abstract state must appear with option "external" or
8160 -- "synchronous" (SPARK RM 7.1.4(8) and (10)).
8163 Ekind
(Id
) = E_Abstract_State
8164 and then (Has_Option
(Id
, Name_External
)
8166 Has_Option
(Id
, Name_Synchronous
));
8167 end Is_External_State
;
8173 function Is_Finalizer
(Id
: E
) return B
is
8175 return Ekind
(Id
) = E_Procedure
and then Chars
(Id
) = Name_uFinalizer
;
8182 function Is_Null_State
(Id
: E
) return B
is
8185 Ekind
(Id
) = E_Abstract_State
and then Nkind
(Parent
(Id
)) = N_Null
;
8188 ---------------------
8189 -- Is_Packed_Array --
8190 ---------------------
8192 function Is_Packed_Array
(Id
: E
) return B
is
8194 return Is_Array_Type
(Id
) and then Is_Packed
(Id
);
8195 end Is_Packed_Array
;
8197 -----------------------------------
8198 -- Is_Package_Or_Generic_Package --
8199 -----------------------------------
8201 function Is_Package_Or_Generic_Package
(Id
: E
) return B
is
8203 return Ekind_In
(Id
, E_Generic_Package
, E_Package
);
8204 end Is_Package_Or_Generic_Package
;
8210 function Is_Prival
(Id
: E
) return B
is
8212 return (Ekind_In
(Id
, E_Constant
, E_Variable
)
8213 and then Present
(Prival_Link
(Id
)));
8216 ----------------------------
8217 -- Is_Protected_Component --
8218 ----------------------------
8220 function Is_Protected_Component
(Id
: E
) return B
is
8222 return Ekind
(Id
) = E_Component
and then Is_Protected_Type
(Scope
(Id
));
8223 end Is_Protected_Component
;
8225 ----------------------------
8226 -- Is_Protected_Interface --
8227 ----------------------------
8229 function Is_Protected_Interface
(Id
: E
) return B
is
8230 Typ
: constant Entity_Id
:= Base_Type
(Id
);
8232 if not Is_Interface
(Typ
) then
8234 elsif Is_Class_Wide_Type
(Typ
) then
8235 return Is_Protected_Interface
(Etype
(Typ
));
8237 return Protected_Present
(Type_Definition
(Parent
(Typ
)));
8239 end Is_Protected_Interface
;
8241 ------------------------------
8242 -- Is_Protected_Record_Type --
8243 ------------------------------
8245 function Is_Protected_Record_Type
(Id
: E
) return B
is
8248 Is_Concurrent_Record_Type
(Id
)
8249 and then Is_Protected_Type
(Corresponding_Concurrent_Type
(Id
));
8250 end Is_Protected_Record_Type
;
8252 --------------------------------
8253 -- Is_Standard_Character_Type --
8254 --------------------------------
8256 function Is_Standard_Character_Type
(Id
: E
) return B
is
8258 if Is_Type
(Id
) then
8260 R
: constant Entity_Id
:= Root_Type
(Id
);
8263 R
= Standard_Character
8265 R
= Standard_Wide_Character
8267 R
= Standard_Wide_Wide_Character
;
8273 end Is_Standard_Character_Type
;
8275 -----------------------------
8276 -- Is_Standard_String_Type --
8277 -----------------------------
8279 function Is_Standard_String_Type
(Id
: E
) return B
is
8281 if Is_Type
(Id
) then
8283 R
: constant Entity_Id
:= Root_Type
(Id
);
8288 R
= Standard_Wide_String
8290 R
= Standard_Wide_Wide_String
;
8296 end Is_Standard_String_Type
;
8298 --------------------
8299 -- Is_String_Type --
8300 --------------------
8302 function Is_String_Type
(Id
: E
) return B
is
8304 return Is_Array_Type
(Id
)
8305 and then Id
/= Any_Composite
8306 and then Number_Dimensions
(Id
) = 1
8307 and then Is_Character_Type
(Component_Type
(Id
));
8310 -------------------------------
8311 -- Is_Synchronized_Interface --
8312 -------------------------------
8314 function Is_Synchronized_Interface
(Id
: E
) return B
is
8315 Typ
: constant Entity_Id
:= Base_Type
(Id
);
8318 if not Is_Interface
(Typ
) then
8321 elsif Is_Class_Wide_Type
(Typ
) then
8322 return Is_Synchronized_Interface
(Etype
(Typ
));
8325 return Protected_Present
(Type_Definition
(Parent
(Typ
)))
8326 or else Synchronized_Present
(Type_Definition
(Parent
(Typ
)))
8327 or else Task_Present
(Type_Definition
(Parent
(Typ
)));
8329 end Is_Synchronized_Interface
;
8331 ---------------------------
8332 -- Is_Synchronized_State --
8333 ---------------------------
8335 function Is_Synchronized_State
(Id
: E
) return B
is
8337 -- To qualify, the abstract state must appear with simple option
8338 -- "synchronous" (SPARK RM 7.1.4(10)).
8341 Ekind
(Id
) = E_Abstract_State
8342 and then Has_Option
(Id
, Name_Synchronous
);
8343 end Is_Synchronized_State
;
8345 -----------------------
8346 -- Is_Task_Interface --
8347 -----------------------
8349 function Is_Task_Interface
(Id
: E
) return B
is
8350 Typ
: constant Entity_Id
:= Base_Type
(Id
);
8352 if not Is_Interface
(Typ
) then
8354 elsif Is_Class_Wide_Type
(Typ
) then
8355 return Is_Task_Interface
(Etype
(Typ
));
8357 return Task_Present
(Type_Definition
(Parent
(Typ
)));
8359 end Is_Task_Interface
;
8361 -------------------------
8362 -- Is_Task_Record_Type --
8363 -------------------------
8365 function Is_Task_Record_Type
(Id
: E
) return B
is
8368 Is_Concurrent_Record_Type
(Id
)
8369 and then Is_Task_Type
(Corresponding_Concurrent_Type
(Id
));
8370 end Is_Task_Record_Type
;
8372 ------------------------
8373 -- Is_Wrapper_Package --
8374 ------------------------
8376 function Is_Wrapper_Package
(Id
: E
) return B
is
8378 return (Ekind
(Id
) = E_Package
and then Present
(Related_Instance
(Id
)));
8379 end Is_Wrapper_Package
;
8385 function Last_Formal
(Id
: E
) return E
is
8390 (Is_Overloadable
(Id
)
8391 or else Ekind_In
(Id
, E_Entry_Family
,
8393 E_Subprogram_Type
));
8395 if Ekind
(Id
) = E_Enumeration_Literal
then
8399 Formal
:= First_Formal
(Id
);
8401 if Present
(Formal
) then
8402 while Present
(Next_Formal
(Formal
)) loop
8403 Formal
:= Next_Formal
(Formal
);
8415 procedure Link_Entities
(First
: Entity_Id
; Second
: Node_Id
) is
8417 if Present
(Second
) then
8418 Set_Prev_Entity
(Second
, First
); -- First <-- Second
8421 Set_Next_Entity
(First
, Second
); -- First --> Second
8424 ----------------------
8425 -- Model_Emin_Value --
8426 ----------------------
8428 function Model_Emin_Value
(Id
: E
) return Uint
is
8430 return Machine_Emin_Value
(Id
);
8431 end Model_Emin_Value
;
8433 -------------------------
8434 -- Model_Epsilon_Value --
8435 -------------------------
8437 function Model_Epsilon_Value
(Id
: E
) return Ureal
is
8438 Radix
: constant Ureal
:= UR_From_Uint
(Machine_Radix_Value
(Id
));
8440 return Radix
** (1 - Model_Mantissa_Value
(Id
));
8441 end Model_Epsilon_Value
;
8443 --------------------------
8444 -- Model_Mantissa_Value --
8445 --------------------------
8447 function Model_Mantissa_Value
(Id
: E
) return Uint
is
8449 return Machine_Mantissa_Value
(Id
);
8450 end Model_Mantissa_Value
;
8452 -----------------------
8453 -- Model_Small_Value --
8454 -----------------------
8456 function Model_Small_Value
(Id
: E
) return Ureal
is
8457 Radix
: constant Ureal
:= UR_From_Uint
(Machine_Radix_Value
(Id
));
8459 return Radix
** (Model_Emin_Value
(Id
) - 1);
8460 end Model_Small_Value
;
8462 ------------------------
8463 -- Machine_Emax_Value --
8464 ------------------------
8466 function Machine_Emax_Value
(Id
: E
) return Uint
is
8467 Digs
: constant Pos
:= UI_To_Int
(Digits_Value
(Base_Type
(Id
)));
8470 case Float_Rep
(Id
) is
8473 when 1 .. 6 => return Uint_128
;
8474 when 7 .. 15 => return 2**10;
8475 when 16 .. 33 => return 2**14;
8476 when others => return No_Uint
;
8480 return Uint_2
** Uint_7
- Uint_1
;
8482 end Machine_Emax_Value
;
8484 ------------------------
8485 -- Machine_Emin_Value --
8486 ------------------------
8488 function Machine_Emin_Value
(Id
: E
) return Uint
is
8490 case Float_Rep
(Id
) is
8491 when IEEE_Binary
=> return Uint_3
- Machine_Emax_Value
(Id
);
8492 when AAMP
=> return -Machine_Emax_Value
(Id
);
8494 end Machine_Emin_Value
;
8496 ----------------------------
8497 -- Machine_Mantissa_Value --
8498 ----------------------------
8500 function Machine_Mantissa_Value
(Id
: E
) return Uint
is
8501 Digs
: constant Pos
:= UI_To_Int
(Digits_Value
(Base_Type
(Id
)));
8504 case Float_Rep
(Id
) is
8507 when 1 .. 6 => return Uint_24
;
8508 when 7 .. 15 => return UI_From_Int
(53);
8509 when 16 .. 18 => return Uint_64
;
8510 when 19 .. 33 => return UI_From_Int
(113);
8511 when others => return No_Uint
;
8516 when 1 .. 6 => return Uint_24
;
8517 when 7 .. 9 => return UI_From_Int
(40);
8518 when others => return No_Uint
;
8521 end Machine_Mantissa_Value
;
8523 -------------------------
8524 -- Machine_Radix_Value --
8525 -------------------------
8527 function Machine_Radix_Value
(Id
: E
) return U
is
8529 case Float_Rep
(Id
) is
8535 end Machine_Radix_Value
;
8537 --------------------
8538 -- Next_Component --
8539 --------------------
8541 function Next_Component
(Id
: E
) return E
is
8545 Comp_Id
:= Next_Entity
(Id
);
8546 while Present
(Comp_Id
) loop
8547 exit when Ekind
(Comp_Id
) = E_Component
;
8548 Comp_Id
:= Next_Entity
(Comp_Id
);
8554 ------------------------------------
8555 -- Next_Component_Or_Discriminant --
8556 ------------------------------------
8558 function Next_Component_Or_Discriminant
(Id
: E
) return E
is
8562 Comp_Id
:= Next_Entity
(Id
);
8563 while Present
(Comp_Id
) loop
8564 exit when Ekind_In
(Comp_Id
, E_Component
, E_Discriminant
);
8565 Comp_Id
:= Next_Entity
(Comp_Id
);
8569 end Next_Component_Or_Discriminant
;
8571 -----------------------
8572 -- Next_Discriminant --
8573 -----------------------
8575 -- This function actually implements both Next_Discriminant and
8576 -- Next_Stored_Discriminant by making sure that the Discriminant
8577 -- returned is of the same variety as Id.
8579 function Next_Discriminant
(Id
: E
) return E
is
8581 -- Derived Tagged types with private extensions look like this...
8583 -- E_Discriminant d1
8584 -- E_Discriminant d2
8586 -- E_Discriminant d1
8587 -- E_Discriminant d2
8590 -- so it is critical not to go past the leading discriminants
8595 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
8598 D
:= Next_Entity
(D
);
8600 or else (Ekind
(D
) /= E_Discriminant
8601 and then not Is_Itype
(D
))
8606 exit when Ekind
(D
) = E_Discriminant
8607 and then (Is_Completely_Hidden
(D
) = Is_Completely_Hidden
(Id
));
8611 end Next_Discriminant
;
8617 function Next_Formal
(Id
: E
) return E
is
8621 -- Follow the chain of declared entities as long as the kind of the
8622 -- entity corresponds to a formal parameter. Skip internal entities
8623 -- that may have been created for implicit subtypes, in the process
8624 -- of analyzing default expressions.
8630 if No
(P
) or else Is_Formal
(P
) then
8632 elsif not Is_Internal
(P
) then
8638 -----------------------------
8639 -- Next_Formal_With_Extras --
8640 -----------------------------
8642 function Next_Formal_With_Extras
(Id
: E
) return E
is
8644 if Present
(Extra_Formal
(Id
)) then
8645 return Extra_Formal
(Id
);
8647 return Next_Formal
(Id
);
8649 end Next_Formal_With_Extras
;
8655 function Next_Index
(Id
: Node_Id
) return Node_Id
is
8664 function Next_Literal
(Id
: E
) return E
is
8666 pragma Assert
(Nkind
(Id
) in N_Entity
);
8670 ------------------------------
8671 -- Next_Stored_Discriminant --
8672 ------------------------------
8674 function Next_Stored_Discriminant
(Id
: E
) return E
is
8676 -- See comment in Next_Discriminant
8678 return Next_Discriminant
(Id
);
8679 end Next_Stored_Discriminant
;
8681 -----------------------
8682 -- Number_Dimensions --
8683 -----------------------
8685 function Number_Dimensions
(Id
: E
) return Pos
is
8690 if Ekind
(Id
) = E_String_Literal_Subtype
then
8695 T
:= First_Index
(Id
);
8696 while Present
(T
) loop
8703 end Number_Dimensions
;
8705 --------------------
8706 -- Number_Entries --
8707 --------------------
8709 function Number_Entries
(Id
: E
) return Nat
is
8714 pragma Assert
(Is_Concurrent_Type
(Id
));
8717 Ent
:= First_Entity
(Id
);
8718 while Present
(Ent
) loop
8719 if Is_Entry
(Ent
) then
8723 Ent
:= Next_Entity
(Ent
);
8729 --------------------
8730 -- Number_Formals --
8731 --------------------
8733 function Number_Formals
(Id
: E
) return Pos
is
8739 Formal
:= First_Formal
(Id
);
8740 while Present
(Formal
) loop
8742 Formal
:= Next_Formal
(Formal
);
8748 --------------------
8749 -- Parameter_Mode --
8750 --------------------
8752 function Parameter_Mode
(Id
: E
) return Formal_Kind
is
8757 ---------------------------------
8758 -- Partial_Invariant_Procedure --
8759 ---------------------------------
8761 function Partial_Invariant_Procedure
(Id
: E
) return E
is
8762 Subp_Elmt
: Elmt_Id
;
8763 Subp_Id
: Entity_Id
;
8767 pragma Assert
(Is_Type
(Id
));
8769 Subps
:= Subprograms_For_Type
(Base_Type
(Id
));
8771 if Present
(Subps
) then
8772 Subp_Elmt
:= First_Elmt
(Subps
);
8773 while Present
(Subp_Elmt
) loop
8774 Subp_Id
:= Node
(Subp_Elmt
);
8776 if Is_Partial_Invariant_Procedure
(Subp_Id
) then
8780 Next_Elmt
(Subp_Elmt
);
8785 end Partial_Invariant_Procedure
;
8787 -------------------------------------
8788 -- Partial_Refinement_Constituents --
8789 -------------------------------------
8791 function Partial_Refinement_Constituents
(Id
: E
) return L
is
8792 Constits
: Elist_Id
:= No_Elist
;
8794 procedure Add_Usable_Constituents
(Item
: E
);
8795 -- Add global item Item and/or its constituents to list Constits when
8796 -- they can be used in a global refinement within the current scope. The
8798 -- 1) If Item is an abstract state with full refinement visible, add
8799 -- its constituents.
8800 -- 2) If Item is an abstract state with only partial refinement
8801 -- visible, add both Item and its constituents.
8802 -- 3) If Item is an abstract state without a visible refinement, add
8804 -- 4) If Id is not an abstract state, add it.
8806 procedure Add_Usable_Constituents
(List
: Elist_Id
);
8807 -- Apply Add_Usable_Constituents to every constituent in List
8809 -----------------------------
8810 -- Add_Usable_Constituents --
8811 -----------------------------
8813 procedure Add_Usable_Constituents
(Item
: E
) is
8815 if Ekind
(Item
) = E_Abstract_State
then
8816 if Has_Visible_Refinement
(Item
) then
8817 Add_Usable_Constituents
(Refinement_Constituents
(Item
));
8819 elsif Has_Partial_Visible_Refinement
(Item
) then
8820 Append_New_Elmt
(Item
, Constits
);
8821 Add_Usable_Constituents
(Part_Of_Constituents
(Item
));
8824 Append_New_Elmt
(Item
, Constits
);
8828 Append_New_Elmt
(Item
, Constits
);
8830 end Add_Usable_Constituents
;
8832 procedure Add_Usable_Constituents
(List
: Elist_Id
) is
8833 Constit_Elmt
: Elmt_Id
;
8835 if Present
(List
) then
8836 Constit_Elmt
:= First_Elmt
(List
);
8837 while Present
(Constit_Elmt
) loop
8838 Add_Usable_Constituents
(Node
(Constit_Elmt
));
8839 Next_Elmt
(Constit_Elmt
);
8842 end Add_Usable_Constituents
;
8844 -- Start of processing for Partial_Refinement_Constituents
8847 -- "Refinement" is a concept applicable only to abstract states
8849 pragma Assert
(Ekind
(Id
) = E_Abstract_State
);
8851 if Has_Visible_Refinement
(Id
) then
8852 Constits
:= Refinement_Constituents
(Id
);
8854 -- A refinement may be partially visible when objects declared in the
8855 -- private part of a package are subject to a Part_Of indicator.
8857 elsif Has_Partial_Visible_Refinement
(Id
) then
8858 Add_Usable_Constituents
(Part_Of_Constituents
(Id
));
8860 -- Function should only be called when full or partial refinement is
8864 raise Program_Error
;
8868 end Partial_Refinement_Constituents
;
8870 ------------------------
8871 -- Predicate_Function --
8872 ------------------------
8874 function Predicate_Function
(Id
: E
) return E
is
8875 Subp_Elmt
: Elmt_Id
;
8876 Subp_Id
: Entity_Id
;
8881 pragma Assert
(Is_Type
(Id
));
8883 -- If type is private and has a completion, predicate may be defined on
8886 if Is_Private_Type
(Id
)
8888 (not Has_Predicates
(Id
) or else No
(Subprograms_For_Type
(Id
)))
8889 and then Present
(Full_View
(Id
))
8891 Typ
:= Full_View
(Id
);
8893 elsif Ekind_In
(Id
, E_Array_Subtype
,
8895 E_Record_Subtype_With_Private
)
8896 and then Present
(Predicated_Parent
(Id
))
8898 Typ
:= Predicated_Parent
(Id
);
8904 Subps
:= Subprograms_For_Type
(Typ
);
8906 if Present
(Subps
) then
8907 Subp_Elmt
:= First_Elmt
(Subps
);
8908 while Present
(Subp_Elmt
) loop
8909 Subp_Id
:= Node
(Subp_Elmt
);
8911 if Ekind
(Subp_Id
) = E_Function
8912 and then Is_Predicate_Function
(Subp_Id
)
8917 Next_Elmt
(Subp_Elmt
);
8922 end Predicate_Function
;
8924 --------------------------
8925 -- Predicate_Function_M --
8926 --------------------------
8928 function Predicate_Function_M
(Id
: E
) return E
is
8929 Subp_Elmt
: Elmt_Id
;
8930 Subp_Id
: Entity_Id
;
8935 pragma Assert
(Is_Type
(Id
));
8937 -- If type is private and has a completion, predicate may be defined on
8940 if Is_Private_Type
(Id
)
8942 (not Has_Predicates
(Id
) or else No
(Subprograms_For_Type
(Id
)))
8943 and then Present
(Full_View
(Id
))
8945 Typ
:= Full_View
(Id
);
8951 Subps
:= Subprograms_For_Type
(Typ
);
8953 if Present
(Subps
) then
8954 Subp_Elmt
:= First_Elmt
(Subps
);
8955 while Present
(Subp_Elmt
) loop
8956 Subp_Id
:= Node
(Subp_Elmt
);
8958 if Ekind
(Subp_Id
) = E_Function
8959 and then Is_Predicate_Function_M
(Subp_Id
)
8964 Next_Elmt
(Subp_Elmt
);
8969 end Predicate_Function_M
;
8971 -------------------------
8972 -- Present_In_Rep_Item --
8973 -------------------------
8975 function Present_In_Rep_Item
(E
: Entity_Id
; N
: Node_Id
) return Boolean is
8979 Ritem
:= First_Rep_Item
(E
);
8981 while Present
(Ritem
) loop
8986 Next_Rep_Item
(Ritem
);
8990 end Present_In_Rep_Item
;
8992 --------------------------
8993 -- Primitive_Operations --
8994 --------------------------
8996 function Primitive_Operations
(Id
: E
) return L
is
8998 if Is_Concurrent_Type
(Id
) then
8999 if Present
(Corresponding_Record_Type
(Id
)) then
9000 return Direct_Primitive_Operations
9001 (Corresponding_Record_Type
(Id
));
9003 -- If expansion is disabled the corresponding record type is absent,
9004 -- but if the type has ancestors it may have primitive operations.
9006 elsif Is_Tagged_Type
(Id
) then
9007 return Direct_Primitive_Operations
(Id
);
9013 return Direct_Primitive_Operations
(Id
);
9015 end Primitive_Operations
;
9017 ---------------------
9018 -- Record_Rep_Item --
9019 ---------------------
9021 procedure Record_Rep_Item
(E
: Entity_Id
; N
: Node_Id
) is
9023 Set_Next_Rep_Item
(N
, First_Rep_Item
(E
));
9024 Set_First_Rep_Item
(E
, N
);
9025 end Record_Rep_Item
;
9031 procedure Remove_Entity
(Id
: Entity_Id
) is
9032 Next
: constant Entity_Id
:= Next_Entity
(Id
);
9033 Prev
: constant Entity_Id
:= Prev_Entity
(Id
);
9034 Scop
: constant Entity_Id
:= Scope
(Id
);
9035 First
: constant Entity_Id
:= First_Entity
(Scop
);
9036 Last
: constant Entity_Id
:= Last_Entity
(Scop
);
9039 -- Eliminate any existing linkages from the entity
9041 Set_Prev_Entity
(Id
, Empty
); -- Empty <-- Id
9042 Set_Next_Entity
(Id
, Empty
); -- Id --> Empty
9044 -- The eliminated entity was the only element in the entity chain
9046 if Id
= First
and then Id
= Last
then
9047 Set_First_Entity
(Scop
, Empty
);
9048 Set_Last_Entity
(Scop
, Empty
);
9050 -- The eliminated entity was the head of the entity chain
9052 elsif Id
= First
then
9053 Set_First_Entity
(Scop
, Next
);
9055 -- The eliminated entity was the tail of the entity chain
9057 elsif Id
= Last
then
9058 Set_Last_Entity
(Scop
, Prev
);
9060 -- Otherwise the eliminated entity comes from the middle of the entity
9064 Link_Entities
(Prev
, Next
); -- Prev <-- Next, Prev --> Next
9072 function Root_Type
(Id
: E
) return E
is
9076 pragma Assert
(Nkind
(Id
) in N_Entity
);
9078 T
:= Base_Type
(Id
);
9080 if Ekind
(T
) = E_Class_Wide_Type
then
9092 -- Following test catches some error cases resulting from
9095 elsif No
(Etyp
) then
9096 Check_Error_Detected
;
9099 elsif Is_Private_Type
(T
) and then Etyp
= Full_View
(T
) then
9102 elsif Is_Private_Type
(Etyp
) and then Full_View
(Etyp
) = T
then
9108 -- Return if there is a circularity in the inheritance chain. This
9109 -- happens in some error situations and we do not want to get
9110 -- stuck in this loop.
9112 if T
= Base_Type
(Id
) then
9119 ---------------------
9120 -- Safe_Emax_Value --
9121 ---------------------
9123 function Safe_Emax_Value
(Id
: E
) return Uint
is
9125 return Machine_Emax_Value
(Id
);
9126 end Safe_Emax_Value
;
9128 ----------------------
9129 -- Safe_First_Value --
9130 ----------------------
9132 function Safe_First_Value
(Id
: E
) return Ureal
is
9134 return -Safe_Last_Value
(Id
);
9135 end Safe_First_Value
;
9137 ---------------------
9138 -- Safe_Last_Value --
9139 ---------------------
9141 function Safe_Last_Value
(Id
: E
) return Ureal
is
9142 Radix
: constant Uint
:= Machine_Radix_Value
(Id
);
9143 Mantissa
: constant Uint
:= Machine_Mantissa_Value
(Id
);
9144 Emax
: constant Uint
:= Safe_Emax_Value
(Id
);
9145 Significand
: constant Uint
:= Radix
** Mantissa
- 1;
9146 Exponent
: constant Uint
:= Emax
- Mantissa
;
9152 (Num
=> Significand
* 2 ** (Exponent
mod 4),
9153 Den
=> -Exponent
/ 4,
9158 (Num
=> Significand
,
9162 end Safe_Last_Value
;
9168 function Scope_Depth
(Id
: E
) return Uint
is
9173 while Is_Record_Type
(Scop
) loop
9174 Scop
:= Scope
(Scop
);
9177 return Scope_Depth_Value
(Scop
);
9180 ---------------------
9181 -- Scope_Depth_Set --
9182 ---------------------
9184 function Scope_Depth_Set
(Id
: E
) return B
is
9186 return not Is_Record_Type
(Id
)
9187 and then Field22
(Id
) /= Union_Id
(Empty
);
9188 end Scope_Depth_Set
;
9190 -----------------------------
9191 -- Set_Component_Alignment --
9192 -----------------------------
9194 -- Component Alignment is encoded using two flags, Flag128/129 as
9195 -- follows. Note that both flags False = Align_Default, so that the
9196 -- default initialization of flags to False initializes component
9197 -- alignment to the default value as required.
9199 -- Flag128 Flag129 Value
9200 -- ------- ------- -----
9201 -- False False Calign_Default
9202 -- False True Calign_Component_Size
9203 -- True False Calign_Component_Size_4
9204 -- True True Calign_Storage_Unit
9206 procedure Set_Component_Alignment
(Id
: E
; V
: C
) is
9208 pragma Assert
((Is_Array_Type
(Id
) or else Is_Record_Type
(Id
))
9209 and then Is_Base_Type
(Id
));
9212 when Calign_Default
=>
9213 Set_Flag128
(Id
, False);
9214 Set_Flag129
(Id
, False);
9216 when Calign_Component_Size
=>
9217 Set_Flag128
(Id
, False);
9218 Set_Flag129
(Id
, True);
9220 when Calign_Component_Size_4
=>
9221 Set_Flag128
(Id
, True);
9222 Set_Flag129
(Id
, False);
9224 when Calign_Storage_Unit
=>
9225 Set_Flag128
(Id
, True);
9226 Set_Flag129
(Id
, True);
9228 end Set_Component_Alignment
;
9230 -----------------------
9231 -- Set_DIC_Procedure --
9232 -----------------------
9234 procedure Set_DIC_Procedure
(Id
: E
; V
: E
) is
9235 Base_Typ
: Entity_Id
;
9236 Subp_Elmt
: Elmt_Id
;
9237 Subp_Id
: Entity_Id
;
9241 pragma Assert
(Is_Type
(Id
));
9243 Base_Typ
:= Base_Type
(Id
);
9244 Subps
:= Subprograms_For_Type
(Base_Typ
);
9247 Subps
:= New_Elmt_List
;
9248 Set_Subprograms_For_Type
(Base_Typ
, Subps
);
9251 Subp_Elmt
:= First_Elmt
(Subps
);
9252 Prepend_Elmt
(V
, Subps
);
9254 -- Check for a duplicate default initial condition procedure
9256 while Present
(Subp_Elmt
) loop
9257 Subp_Id
:= Node
(Subp_Elmt
);
9259 if Is_DIC_Procedure
(Subp_Id
) then
9260 raise Program_Error
;
9263 Next_Elmt
(Subp_Elmt
);
9265 end Set_DIC_Procedure
;
9267 -----------------------------
9268 -- Set_Invariant_Procedure --
9269 -----------------------------
9271 procedure Set_Invariant_Procedure
(Id
: E
; V
: E
) is
9272 Base_Typ
: Entity_Id
;
9273 Subp_Elmt
: Elmt_Id
;
9274 Subp_Id
: Entity_Id
;
9278 pragma Assert
(Is_Type
(Id
));
9280 Base_Typ
:= Base_Type
(Id
);
9281 Subps
:= Subprograms_For_Type
(Base_Typ
);
9284 Subps
:= New_Elmt_List
;
9285 Set_Subprograms_For_Type
(Base_Typ
, Subps
);
9288 Subp_Elmt
:= First_Elmt
(Subps
);
9289 Prepend_Elmt
(V
, Subps
);
9291 -- Check for a duplicate invariant procedure
9293 while Present
(Subp_Elmt
) loop
9294 Subp_Id
:= Node
(Subp_Elmt
);
9296 if Is_Invariant_Procedure
(Subp_Id
) then
9297 raise Program_Error
;
9300 Next_Elmt
(Subp_Elmt
);
9302 end Set_Invariant_Procedure
;
9304 -------------------------------------
9305 -- Set_Partial_Invariant_Procedure --
9306 -------------------------------------
9308 procedure Set_Partial_Invariant_Procedure
(Id
: E
; V
: E
) is
9309 Base_Typ
: Entity_Id
;
9310 Subp_Elmt
: Elmt_Id
;
9311 Subp_Id
: Entity_Id
;
9315 pragma Assert
(Is_Type
(Id
));
9317 Base_Typ
:= Base_Type
(Id
);
9318 Subps
:= Subprograms_For_Type
(Base_Typ
);
9321 Subps
:= New_Elmt_List
;
9322 Set_Subprograms_For_Type
(Base_Typ
, Subps
);
9325 Subp_Elmt
:= First_Elmt
(Subps
);
9326 Prepend_Elmt
(V
, Subps
);
9328 -- Check for a duplicate partial invariant procedure
9330 while Present
(Subp_Elmt
) loop
9331 Subp_Id
:= Node
(Subp_Elmt
);
9333 if Is_Partial_Invariant_Procedure
(Subp_Id
) then
9334 raise Program_Error
;
9337 Next_Elmt
(Subp_Elmt
);
9339 end Set_Partial_Invariant_Procedure
;
9341 ----------------------------
9342 -- Set_Predicate_Function --
9343 ----------------------------
9345 procedure Set_Predicate_Function
(Id
: E
; V
: E
) is
9346 Subp_Elmt
: Elmt_Id
;
9347 Subp_Id
: Entity_Id
;
9351 pragma Assert
(Is_Type
(Id
) and then Has_Predicates
(Id
));
9353 Subps
:= Subprograms_For_Type
(Id
);
9356 Subps
:= New_Elmt_List
;
9357 Set_Subprograms_For_Type
(Id
, Subps
);
9360 Subp_Elmt
:= First_Elmt
(Subps
);
9361 Prepend_Elmt
(V
, Subps
);
9363 -- Check for a duplicate predication function
9365 while Present
(Subp_Elmt
) loop
9366 Subp_Id
:= Node
(Subp_Elmt
);
9368 if Ekind
(Subp_Id
) = E_Function
9369 and then Is_Predicate_Function
(Subp_Id
)
9371 raise Program_Error
;
9374 Next_Elmt
(Subp_Elmt
);
9376 end Set_Predicate_Function
;
9378 ------------------------------
9379 -- Set_Predicate_Function_M --
9380 ------------------------------
9382 procedure Set_Predicate_Function_M
(Id
: E
; V
: E
) is
9383 Subp_Elmt
: Elmt_Id
;
9384 Subp_Id
: Entity_Id
;
9388 pragma Assert
(Is_Type
(Id
) and then Has_Predicates
(Id
));
9390 Subps
:= Subprograms_For_Type
(Id
);
9393 Subps
:= New_Elmt_List
;
9394 Set_Subprograms_For_Type
(Id
, Subps
);
9397 Subp_Elmt
:= First_Elmt
(Subps
);
9398 Prepend_Elmt
(V
, Subps
);
9400 -- Check for a duplicate predication function
9402 while Present
(Subp_Elmt
) loop
9403 Subp_Id
:= Node
(Subp_Elmt
);
9405 if Ekind
(Subp_Id
) = E_Function
9406 and then Is_Predicate_Function_M
(Subp_Id
)
9408 raise Program_Error
;
9411 Next_Elmt
(Subp_Elmt
);
9413 end Set_Predicate_Function_M
;
9419 function Size_Clause
(Id
: E
) return N
is
9421 return Get_Attribute_Definition_Clause
(Id
, Attribute_Size
);
9424 ------------------------
9425 -- Stream_Size_Clause --
9426 ------------------------
9428 function Stream_Size_Clause
(Id
: E
) return N
is
9430 return Get_Attribute_Definition_Clause
(Id
, Attribute_Stream_Size
);
9431 end Stream_Size_Clause
;
9437 function Subtype_Kind
(K
: Entity_Kind
) return Entity_Kind
is
9443 Kind
:= E_Access_Subtype
;
9445 when E_Array_Subtype
9448 Kind
:= E_Array_Subtype
;
9450 when E_Class_Wide_Subtype
9453 Kind
:= E_Class_Wide_Subtype
;
9455 when E_Decimal_Fixed_Point_Subtype
9456 | E_Decimal_Fixed_Point_Type
9458 Kind
:= E_Decimal_Fixed_Point_Subtype
;
9460 when E_Ordinary_Fixed_Point_Subtype
9461 | E_Ordinary_Fixed_Point_Type
9463 Kind
:= E_Ordinary_Fixed_Point_Subtype
;
9465 when E_Private_Subtype
9468 Kind
:= E_Private_Subtype
;
9470 when E_Limited_Private_Subtype
9471 | E_Limited_Private_Type
9473 Kind
:= E_Limited_Private_Subtype
;
9475 when E_Record_Subtype_With_Private
9476 | E_Record_Type_With_Private
9478 Kind
:= E_Record_Subtype_With_Private
;
9480 when E_Record_Subtype
9483 Kind
:= E_Record_Subtype
;
9485 when Enumeration_Kind
=>
9486 Kind
:= E_Enumeration_Subtype
;
9488 when E_Incomplete_Type
=>
9489 Kind
:= E_Incomplete_Subtype
;
9492 Kind
:= E_Floating_Point_Subtype
;
9494 when Signed_Integer_Kind
=>
9495 Kind
:= E_Signed_Integer_Subtype
;
9497 when Modular_Integer_Kind
=>
9498 Kind
:= E_Modular_Integer_Subtype
;
9500 when Protected_Kind
=>
9501 Kind
:= E_Protected_Subtype
;
9504 Kind
:= E_Task_Subtype
;
9508 raise Program_Error
;
9514 ---------------------
9515 -- Type_High_Bound --
9516 ---------------------
9518 function Type_High_Bound
(Id
: E
) return Node_Id
is
9519 Rng
: constant Node_Id
:= Scalar_Range
(Id
);
9521 if Nkind
(Rng
) = N_Subtype_Indication
then
9522 return High_Bound
(Range_Expression
(Constraint
(Rng
)));
9524 return High_Bound
(Rng
);
9526 end Type_High_Bound
;
9528 --------------------
9529 -- Type_Low_Bound --
9530 --------------------
9532 function Type_Low_Bound
(Id
: E
) return Node_Id
is
9533 Rng
: constant Node_Id
:= Scalar_Range
(Id
);
9535 if Nkind
(Rng
) = N_Subtype_Indication
then
9536 return Low_Bound
(Range_Expression
(Constraint
(Rng
)));
9538 return Low_Bound
(Rng
);
9542 ---------------------
9543 -- Underlying_Type --
9544 ---------------------
9546 function Underlying_Type
(Id
: E
) return E
is
9548 -- For record_with_private the underlying type is always the direct full
9549 -- view. Never try to take the full view of the parent it does not make
9552 if Ekind
(Id
) = E_Record_Type_With_Private
then
9553 return Full_View
(Id
);
9555 -- If we have a class-wide type that comes from the limited view then we
9556 -- return the Underlying_Type of its nonlimited view.
9558 elsif Ekind
(Id
) = E_Class_Wide_Type
9559 and then From_Limited_With
(Id
)
9560 and then Present
(Non_Limited_View
(Id
))
9562 return Underlying_Type
(Non_Limited_View
(Id
));
9564 elsif Ekind
(Id
) in Incomplete_Or_Private_Kind
then
9566 -- If we have an incomplete or private type with a full view, then we
9567 -- return the Underlying_Type of this full view.
9569 if Present
(Full_View
(Id
)) then
9570 if Id
= Full_View
(Id
) then
9572 -- Previous error in declaration
9577 return Underlying_Type
(Full_View
(Id
));
9580 -- If we have a private type with an underlying full view, then we
9581 -- return the Underlying_Type of this underlying full view.
9583 elsif Ekind
(Id
) in Private_Kind
9584 and then Present
(Underlying_Full_View
(Id
))
9586 return Underlying_Type
(Underlying_Full_View
(Id
));
9588 -- If we have an incomplete entity that comes from the limited view
9589 -- then we return the Underlying_Type of its nonlimited view.
9591 elsif From_Limited_With
(Id
)
9592 and then Present
(Non_Limited_View
(Id
))
9594 return Underlying_Type
(Non_Limited_View
(Id
));
9596 -- Otherwise check for the case where we have a derived type or
9597 -- subtype, and if so get the Underlying_Type of the parent type.
9599 elsif Etype
(Id
) /= Id
then
9600 return Underlying_Type
(Etype
(Id
));
9602 -- Otherwise we have an incomplete or private type that has no full
9603 -- view, which means that we have not encountered the completion, so
9604 -- return Empty to indicate the underlying type is not yet known.
9610 -- For non-incomplete, non-private types, return the type itself Also
9611 -- for entities that are not types at all return the entity itself.
9616 end Underlying_Type
;
9618 ------------------------
9619 -- Unlink_Next_Entity --
9620 ------------------------
9622 procedure Unlink_Next_Entity
(Id
: Entity_Id
) is
9623 Next
: constant Entity_Id
:= Next_Entity
(Id
);
9626 if Present
(Next
) then
9627 Set_Prev_Entity
(Next
, Empty
); -- Empty <-- Next
9630 Set_Next_Entity
(Id
, Empty
); -- Id --> Empty
9631 end Unlink_Next_Entity
;
9633 ------------------------
9634 -- Write_Entity_Flags --
9635 ------------------------
9637 procedure Write_Entity_Flags
(Id
: Entity_Id
; Prefix
: String) is
9639 procedure W
(Flag_Name
: String; Flag
: Boolean);
9640 -- Write out given flag if it is set
9646 procedure W
(Flag_Name
: String; Flag
: Boolean) is
9650 Write_Str
(Flag_Name
);
9651 Write_Str
(" = True");
9656 -- Start of processing for Write_Entity_Flags
9659 if (Is_Array_Type
(Id
) or else Is_Record_Type
(Id
))
9660 and then Is_Base_Type
(Id
)
9663 Write_Str
("Component_Alignment = ");
9665 case Component_Alignment
(Id
) is
9666 when Calign_Default
=>
9667 Write_Str
("Calign_Default");
9669 when Calign_Component_Size
=>
9670 Write_Str
("Calign_Component_Size");
9672 when Calign_Component_Size_4
=>
9673 Write_Str
("Calign_Component_Size_4");
9675 when Calign_Storage_Unit
=>
9676 Write_Str
("Calign_Storage_Unit");
9682 W
("Address_Taken", Flag104
(Id
));
9683 W
("Body_Needed_For_Inlining", Flag299
(Id
));
9684 W
("Body_Needed_For_SAL", Flag40
(Id
));
9685 W
("C_Pass_By_Copy", Flag125
(Id
));
9686 W
("Can_Never_Be_Null", Flag38
(Id
));
9687 W
("Checks_May_Be_Suppressed", Flag31
(Id
));
9688 W
("Contains_Ignored_Ghost_Code", Flag279
(Id
));
9689 W
("Debug_Info_Off", Flag166
(Id
));
9690 W
("Default_Expressions_Processed", Flag108
(Id
));
9691 W
("Delay_Cleanups", Flag114
(Id
));
9692 W
("Delay_Subprogram_Descriptors", Flag50
(Id
));
9693 W
("Depends_On_Private", Flag14
(Id
));
9694 W
("Discard_Names", Flag88
(Id
));
9695 W
("Elaboration_Entity_Required", Flag174
(Id
));
9696 W
("Elaborate_Body_Desirable", Flag210
(Id
));
9697 W
("Entry_Accepted", Flag152
(Id
));
9698 W
("Can_Use_Internal_Rep", Flag229
(Id
));
9699 W
("Finalize_Storage_Only", Flag158
(Id
));
9700 W
("From_Limited_With", Flag159
(Id
));
9701 W
("Has_Aliased_Components", Flag135
(Id
));
9702 W
("Has_Alignment_Clause", Flag46
(Id
));
9703 W
("Has_All_Calls_Remote", Flag79
(Id
));
9704 W
("Has_Atomic_Components", Flag86
(Id
));
9705 W
("Has_Biased_Representation", Flag139
(Id
));
9706 W
("Has_Completion", Flag26
(Id
));
9707 W
("Has_Completion_In_Body", Flag71
(Id
));
9708 W
("Has_Complex_Representation", Flag140
(Id
));
9709 W
("Has_Component_Size_Clause", Flag68
(Id
));
9710 W
("Has_Contiguous_Rep", Flag181
(Id
));
9711 W
("Has_Controlled_Component", Flag43
(Id
));
9712 W
("Has_Controlling_Result", Flag98
(Id
));
9713 W
("Has_Convention_Pragma", Flag119
(Id
));
9714 W
("Has_Default_Aspect", Flag39
(Id
));
9715 W
("Has_Delayed_Aspects", Flag200
(Id
));
9716 W
("Has_Delayed_Freeze", Flag18
(Id
));
9717 W
("Has_Delayed_Rep_Aspects", Flag261
(Id
));
9718 W
("Has_Discriminants", Flag5
(Id
));
9719 W
("Has_Dispatch_Table", Flag220
(Id
));
9720 W
("Has_Dynamic_Predicate_Aspect", Flag258
(Id
));
9721 W
("Has_Enumeration_Rep_Clause", Flag66
(Id
));
9722 W
("Has_Exit", Flag47
(Id
));
9723 W
("Has_Expanded_Contract", Flag240
(Id
));
9724 W
("Has_Forward_Instantiation", Flag175
(Id
));
9725 W
("Has_Fully_Qualified_Name", Flag173
(Id
));
9726 W
("Has_Gigi_Rep_Item", Flag82
(Id
));
9727 W
("Has_Homonym", Flag56
(Id
));
9728 W
("Has_Implicit_Dereference", Flag251
(Id
));
9729 W
("Has_Independent_Components", Flag34
(Id
));
9730 W
("Has_Inheritable_Invariants", Flag248
(Id
));
9731 W
("Has_Inherited_DIC", Flag133
(Id
));
9732 W
("Has_Inherited_Invariants", Flag291
(Id
));
9733 W
("Has_Initial_Value", Flag219
(Id
));
9734 W
("Has_Loop_Entry_Attributes", Flag260
(Id
));
9735 W
("Has_Machine_Radix_Clause", Flag83
(Id
));
9736 W
("Has_Master_Entity", Flag21
(Id
));
9737 W
("Has_Missing_Return", Flag142
(Id
));
9738 W
("Has_Nested_Block_With_Handler", Flag101
(Id
));
9739 W
("Has_Nested_Subprogram", Flag282
(Id
));
9740 W
("Has_Non_Standard_Rep", Flag75
(Id
));
9741 W
("Has_Out_Or_In_Out_Parameter", Flag110
(Id
));
9742 W
("Has_Object_Size_Clause", Flag172
(Id
));
9743 W
("Has_Own_DIC", Flag3
(Id
));
9744 W
("Has_Own_Invariants", Flag232
(Id
));
9745 W
("Has_Per_Object_Constraint", Flag154
(Id
));
9746 W
("Has_Pragma_Controlled", Flag27
(Id
));
9747 W
("Has_Pragma_Elaborate_Body", Flag150
(Id
));
9748 W
("Has_Pragma_Inline", Flag157
(Id
));
9749 W
("Has_Pragma_Inline_Always", Flag230
(Id
));
9750 W
("Has_Pragma_No_Inline", Flag201
(Id
));
9751 W
("Has_Pragma_Ordered", Flag198
(Id
));
9752 W
("Has_Pragma_Pack", Flag121
(Id
));
9753 W
("Has_Pragma_Preelab_Init", Flag221
(Id
));
9754 W
("Has_Pragma_Pure", Flag203
(Id
));
9755 W
("Has_Pragma_Pure_Function", Flag179
(Id
));
9756 W
("Has_Pragma_Thread_Local_Storage", Flag169
(Id
));
9757 W
("Has_Pragma_Unmodified", Flag233
(Id
));
9758 W
("Has_Pragma_Unreferenced", Flag180
(Id
));
9759 W
("Has_Pragma_Unreferenced_Objects", Flag212
(Id
));
9760 W
("Has_Pragma_Unused", Flag294
(Id
));
9761 W
("Has_Predicates", Flag250
(Id
));
9762 W
("Has_Primitive_Operations", Flag120
(Id
));
9763 W
("Has_Private_Ancestor", Flag151
(Id
));
9764 W
("Has_Private_Declaration", Flag155
(Id
));
9765 W
("Has_Private_Extension", Flag300
(Id
));
9766 W
("Has_Protected", Flag271
(Id
));
9767 W
("Has_Qualified_Name", Flag161
(Id
));
9768 W
("Has_RACW", Flag214
(Id
));
9769 W
("Has_Record_Rep_Clause", Flag65
(Id
));
9770 W
("Has_Recursive_Call", Flag143
(Id
));
9771 W
("Has_Shift_Operator", Flag267
(Id
));
9772 W
("Has_Size_Clause", Flag29
(Id
));
9773 W
("Has_Small_Clause", Flag67
(Id
));
9774 W
("Has_Specified_Layout", Flag100
(Id
));
9775 W
("Has_Specified_Stream_Input", Flag190
(Id
));
9776 W
("Has_Specified_Stream_Output", Flag191
(Id
));
9777 W
("Has_Specified_Stream_Read", Flag192
(Id
));
9778 W
("Has_Specified_Stream_Write", Flag193
(Id
));
9779 W
("Has_Static_Discriminants", Flag211
(Id
));
9780 W
("Has_Static_Predicate", Flag269
(Id
));
9781 W
("Has_Static_Predicate_Aspect", Flag259
(Id
));
9782 W
("Has_Storage_Size_Clause", Flag23
(Id
));
9783 W
("Has_Stream_Size_Clause", Flag184
(Id
));
9784 W
("Has_Task", Flag30
(Id
));
9785 W
("Has_Timing_Event", Flag289
(Id
));
9786 W
("Has_Thunks", Flag228
(Id
));
9787 W
("Has_Unchecked_Union", Flag123
(Id
));
9788 W
("Has_Unknown_Discriminants", Flag72
(Id
));
9789 W
("Has_Visible_Refinement", Flag263
(Id
));
9790 W
("Has_Volatile_Components", Flag87
(Id
));
9791 W
("Has_Xref_Entry", Flag182
(Id
));
9792 W
("Ignore_SPARK_Mode_Pragmas", Flag301
(Id
));
9793 W
("In_Package_Body", Flag48
(Id
));
9794 W
("In_Private_Part", Flag45
(Id
));
9795 W
("In_Use", Flag8
(Id
));
9796 W
("Is_Abstract_Subprogram", Flag19
(Id
));
9797 W
("Is_Abstract_Type", Flag146
(Id
));
9798 W
("Is_Access_Constant", Flag69
(Id
));
9799 W
("Is_Actual_Subtype", Flag293
(Id
));
9800 W
("Is_Ada_2005_Only", Flag185
(Id
));
9801 W
("Is_Ada_2012_Only", Flag199
(Id
));
9802 W
("Is_Aliased", Flag15
(Id
));
9803 W
("Is_Asynchronous", Flag81
(Id
));
9804 W
("Is_Atomic", Flag85
(Id
));
9805 W
("Is_Bit_Packed_Array", Flag122
(Id
));
9806 W
("Is_CPP_Class", Flag74
(Id
));
9807 W
("Is_Called", Flag102
(Id
));
9808 W
("Is_Character_Type", Flag63
(Id
));
9809 W
("Is_Checked_Ghost_Entity", Flag277
(Id
));
9810 W
("Is_Child_Unit", Flag73
(Id
));
9811 W
("Is_Class_Wide_Equivalent_Type", Flag35
(Id
));
9812 W
("Is_Compilation_Unit", Flag149
(Id
));
9813 W
("Is_Completely_Hidden", Flag103
(Id
));
9814 W
("Is_Concurrent_Record_Type", Flag20
(Id
));
9815 W
("Is_Constr_Subt_For_UN_Aliased", Flag141
(Id
));
9816 W
("Is_Constr_Subt_For_U_Nominal", Flag80
(Id
));
9817 W
("Is_Constrained", Flag12
(Id
));
9818 W
("Is_Constructor", Flag76
(Id
));
9819 W
("Is_Controlled_Active", Flag42
(Id
));
9820 W
("Is_Controlling_Formal", Flag97
(Id
));
9821 W
("Is_Descendant_Of_Address", Flag223
(Id
));
9822 W
("Is_DIC_Procedure", Flag132
(Id
));
9823 W
("Is_Discrim_SO_Function", Flag176
(Id
));
9824 W
("Is_Discriminant_Check_Function", Flag264
(Id
));
9825 W
("Is_Dispatch_Table_Entity", Flag234
(Id
));
9826 W
("Is_Dispatching_Operation", Flag6
(Id
));
9827 W
("Is_Elaboration_Checks_OK_Id", Flag148
(Id
));
9828 W
("Is_Elaboration_Warnings_OK_Id", Flag304
(Id
));
9829 W
("Is_Eliminated", Flag124
(Id
));
9830 W
("Is_Entry_Formal", Flag52
(Id
));
9831 W
("Is_Exception_Handler", Flag286
(Id
));
9832 W
("Is_Exported", Flag99
(Id
));
9833 W
("Is_Finalized_Transient", Flag252
(Id
));
9834 W
("Is_First_Subtype", Flag70
(Id
));
9835 W
("Is_For_Access_Subtype", Flag118
(Id
));
9836 W
("Is_Formal_Subprogram", Flag111
(Id
));
9837 W
("Is_Frozen", Flag4
(Id
));
9838 W
("Is_Generic_Actual_Subprogram", Flag274
(Id
));
9839 W
("Is_Generic_Actual_Type", Flag94
(Id
));
9840 W
("Is_Generic_Instance", Flag130
(Id
));
9841 W
("Is_Generic_Type", Flag13
(Id
));
9842 W
("Is_Hidden", Flag57
(Id
));
9843 W
("Is_Hidden_Non_Overridden_Subpgm", Flag2
(Id
));
9844 W
("Is_Hidden_Open_Scope", Flag171
(Id
));
9845 W
("Is_Ignored_Ghost_Entity", Flag278
(Id
));
9846 W
("Is_Ignored_Transient", Flag295
(Id
));
9847 W
("Is_Immediately_Visible", Flag7
(Id
));
9848 W
("Is_Implementation_Defined", Flag254
(Id
));
9849 W
("Is_Imported", Flag24
(Id
));
9850 W
("Is_Independent", Flag268
(Id
));
9851 W
("Is_Initial_Condition_Procedure", Flag302
(Id
));
9852 W
("Is_Inlined", Flag11
(Id
));
9853 W
("Is_Inlined_Always", Flag1
(Id
));
9854 W
("Is_Instantiated", Flag126
(Id
));
9855 W
("Is_Interface", Flag186
(Id
));
9856 W
("Is_Internal", Flag17
(Id
));
9857 W
("Is_Interrupt_Handler", Flag89
(Id
));
9858 W
("Is_Intrinsic_Subprogram", Flag64
(Id
));
9859 W
("Is_Invariant_Procedure", Flag257
(Id
));
9860 W
("Is_Itype", Flag91
(Id
));
9861 W
("Is_Known_Non_Null", Flag37
(Id
));
9862 W
("Is_Known_Null", Flag204
(Id
));
9863 W
("Is_Known_Valid", Flag170
(Id
));
9864 W
("Is_Limited_Composite", Flag106
(Id
));
9865 W
("Is_Limited_Interface", Flag197
(Id
));
9866 W
("Is_Limited_Record", Flag25
(Id
));
9867 W
("Is_Local_Anonymous_Access", Flag194
(Id
));
9868 W
("Is_Machine_Code_Subprogram", Flag137
(Id
));
9869 W
("Is_Non_Static_Subtype", Flag109
(Id
));
9870 W
("Is_Null_Init_Proc", Flag178
(Id
));
9871 W
("Is_Obsolescent", Flag153
(Id
));
9872 W
("Is_Only_Out_Parameter", Flag226
(Id
));
9873 W
("Is_Package_Body_Entity", Flag160
(Id
));
9874 W
("Is_Packed", Flag51
(Id
));
9875 W
("Is_Packed_Array_Impl_Type", Flag138
(Id
));
9876 W
("Is_Param_Block_Component_Type", Flag215
(Id
));
9877 W
("Is_Partial_Invariant_Procedure", Flag292
(Id
));
9878 W
("Is_Potentially_Use_Visible", Flag9
(Id
));
9879 W
("Is_Predicate_Function", Flag255
(Id
));
9880 W
("Is_Predicate_Function_M", Flag256
(Id
));
9881 W
("Is_Preelaborated", Flag59
(Id
));
9882 W
("Is_Primitive", Flag218
(Id
));
9883 W
("Is_Primitive_Wrapper", Flag195
(Id
));
9884 W
("Is_Private_Composite", Flag107
(Id
));
9885 W
("Is_Private_Descendant", Flag53
(Id
));
9886 W
("Is_Private_Primitive", Flag245
(Id
));
9887 W
("Is_Public", Flag10
(Id
));
9888 W
("Is_Pure", Flag44
(Id
));
9889 W
("Is_Pure_Unit_Access_Type", Flag189
(Id
));
9890 W
("Is_RACW_Stub_Type", Flag244
(Id
));
9891 W
("Is_Raised", Flag224
(Id
));
9892 W
("Is_Remote_Call_Interface", Flag62
(Id
));
9893 W
("Is_Remote_Types", Flag61
(Id
));
9894 W
("Is_Renaming_Of_Object", Flag112
(Id
));
9895 W
("Is_Return_Object", Flag209
(Id
));
9896 W
("Is_Safe_To_Reevaluate", Flag249
(Id
));
9897 W
("Is_Shared_Passive", Flag60
(Id
));
9898 W
("Is_Static_Type", Flag281
(Id
));
9899 W
("Is_Statically_Allocated", Flag28
(Id
));
9900 W
("Is_Tag", Flag78
(Id
));
9901 W
("Is_Tagged_Type", Flag55
(Id
));
9902 W
("Is_Thunk", Flag225
(Id
));
9903 W
("Is_Trivial_Subprogram", Flag235
(Id
));
9904 W
("Is_True_Constant", Flag163
(Id
));
9905 W
("Is_Unchecked_Union", Flag117
(Id
));
9906 W
("Is_Underlying_Full_View", Flag298
(Id
));
9907 W
("Is_Underlying_Record_View", Flag246
(Id
));
9908 W
("Is_Unimplemented", Flag284
(Id
));
9909 W
("Is_Unsigned_Type", Flag144
(Id
));
9910 W
("Is_Uplevel_Referenced_Entity", Flag283
(Id
));
9911 W
("Is_Valued_Procedure", Flag127
(Id
));
9912 W
("Is_Visible_Formal", Flag206
(Id
));
9913 W
("Is_Visible_Lib_Unit", Flag116
(Id
));
9914 W
("Is_Volatile", Flag16
(Id
));
9915 W
("Is_Volatile_Full_Access", Flag285
(Id
));
9916 W
("Itype_Printed", Flag202
(Id
));
9917 W
("Kill_Elaboration_Checks", Flag32
(Id
));
9918 W
("Kill_Range_Checks", Flag33
(Id
));
9919 W
("Known_To_Have_Preelab_Init", Flag207
(Id
));
9920 W
("Low_Bound_Tested", Flag205
(Id
));
9921 W
("Machine_Radix_10", Flag84
(Id
));
9922 W
("Materialize_Entity", Flag168
(Id
));
9923 W
("May_Inherit_Delayed_Rep_Aspects", Flag262
(Id
));
9924 W
("Must_Be_On_Byte_Boundary", Flag183
(Id
));
9925 W
("Must_Have_Preelab_Init", Flag208
(Id
));
9926 W
("Needs_Activation_Record", Flag306
(Id
));
9927 W
("Needs_Debug_Info", Flag147
(Id
));
9928 W
("Needs_No_Actuals", Flag22
(Id
));
9929 W
("Never_Set_In_Source", Flag115
(Id
));
9930 W
("No_Dynamic_Predicate_On_actual", Flag276
(Id
));
9931 W
("No_Pool_Assigned", Flag131
(Id
));
9932 W
("No_Predicate_On_actual", Flag275
(Id
));
9933 W
("No_Reordering", Flag239
(Id
));
9934 W
("No_Return", Flag113
(Id
));
9935 W
("No_Strict_Aliasing", Flag136
(Id
));
9936 W
("Non_Binary_Modulus", Flag58
(Id
));
9937 W
("Nonzero_Is_True", Flag162
(Id
));
9938 W
("OK_To_Rename", Flag247
(Id
));
9939 W
("Optimize_Alignment_Space", Flag241
(Id
));
9940 W
("Optimize_Alignment_Time", Flag242
(Id
));
9941 W
("Overlays_Constant", Flag243
(Id
));
9942 W
("Partial_View_Has_Unknown_Discr", Flag280
(Id
));
9943 W
("Reachable", Flag49
(Id
));
9944 W
("Referenced", Flag156
(Id
));
9945 W
("Referenced_As_LHS", Flag36
(Id
));
9946 W
("Referenced_As_Out_Parameter", Flag227
(Id
));
9947 W
("Renamed_In_Spec", Flag231
(Id
));
9948 W
("Requires_Overriding", Flag213
(Id
));
9949 W
("Return_Present", Flag54
(Id
));
9950 W
("Returns_By_Ref", Flag90
(Id
));
9951 W
("Reverse_Bit_Order", Flag164
(Id
));
9952 W
("Reverse_Storage_Order", Flag93
(Id
));
9953 W
("Rewritten_For_C", Flag287
(Id
));
9954 W
("Predicates_Ignored", Flag288
(Id
));
9955 W
("Sec_Stack_Needed_For_Return", Flag167
(Id
));
9956 W
("Size_Depends_On_Discriminant", Flag177
(Id
));
9957 W
("Size_Known_At_Compile_Time", Flag92
(Id
));
9958 W
("SPARK_Aux_Pragma_Inherited", Flag266
(Id
));
9959 W
("SPARK_Pragma_Inherited", Flag265
(Id
));
9960 W
("SSO_Set_High_By_Default", Flag273
(Id
));
9961 W
("SSO_Set_Low_By_Default", Flag272
(Id
));
9962 W
("Static_Elaboration_Desired", Flag77
(Id
));
9963 W
("Stores_Attribute_Old_Prefix", Flag270
(Id
));
9964 W
("Strict_Alignment", Flag145
(Id
));
9965 W
("Suppress_Elaboration_Warnings", Flag303
(Id
));
9966 W
("Suppress_Initialization", Flag105
(Id
));
9967 W
("Suppress_Style_Checks", Flag165
(Id
));
9968 W
("Suppress_Value_Tracking_On_Call", Flag217
(Id
));
9969 W
("Treat_As_Volatile", Flag41
(Id
));
9970 W
("Universal_Aliasing", Flag216
(Id
));
9971 W
("Used_As_Generic_Actual", Flag222
(Id
));
9972 W
("Uses_Sec_Stack", Flag95
(Id
));
9973 W
("Warnings_Off", Flag96
(Id
));
9974 W
("Warnings_Off_Used", Flag236
(Id
));
9975 W
("Warnings_Off_Used_Unmodified", Flag237
(Id
));
9976 W
("Warnings_Off_Used_Unreferenced", Flag238
(Id
));
9977 W
("Was_Hidden", Flag196
(Id
));
9978 end Write_Entity_Flags
;
9980 -----------------------
9981 -- Write_Entity_Info --
9982 -----------------------
9984 procedure Write_Entity_Info
(Id
: Entity_Id
; Prefix
: String) is
9986 procedure Write_Attribute
(Which
: String; Nam
: E
);
9987 -- Write attribute value with given string name
9989 procedure Write_Kind
(Id
: Entity_Id
);
9990 -- Write Ekind field of entity
9992 ---------------------
9993 -- Write_Attribute --
9994 ---------------------
9996 procedure Write_Attribute
(Which
: String; Nam
: E
) is
10000 Write_Int
(Int
(Nam
));
10002 Write_Name
(Chars
(Nam
));
10004 end Write_Attribute
;
10010 procedure Write_Kind
(Id
: Entity_Id
) is
10011 K
: constant String := Entity_Kind
'Image (Ekind
(Id
));
10014 Write_Str
(Prefix
);
10015 Write_Str
(" Kind ");
10017 if Is_Type
(Id
) and then Is_Tagged_Type
(Id
) then
10018 Write_Str
("TAGGED ");
10021 Write_Str
(K
(3 .. K
'Length));
10024 if Is_Type
(Id
) and then Depends_On_Private
(Id
) then
10025 Write_Str
("Depends_On_Private ");
10029 -- Start of processing for Write_Entity_Info
10033 Write_Attribute
("Name ", Id
);
10034 Write_Int
(Int
(Id
));
10038 Write_Attribute
(" Type ", Etype
(Id
));
10040 Write_Attribute
(" Scope ", Scope
(Id
));
10044 when Discrete_Kind
=>
10045 Write_Str
("Bounds: Id = ");
10047 if Present
(Scalar_Range
(Id
)) then
10048 Write_Int
(Int
(Type_Low_Bound
(Id
)));
10049 Write_Str
(" .. Id = ");
10050 Write_Int
(Int
(Type_High_Bound
(Id
)));
10052 Write_Str
("Empty");
10063 (" Component Type ", Component_Type
(Id
));
10065 Write_Str
(Prefix
);
10066 Write_Str
(" Indexes ");
10068 Index
:= First_Index
(Id
);
10069 while Present
(Index
) loop
10070 Write_Attribute
(" ", Etype
(Index
));
10071 Index
:= Next_Index
(Index
);
10077 when Access_Kind
=>
10079 (" Directly Designated Type ",
10080 Directly_Designated_Type
(Id
));
10083 when Overloadable_Kind
=>
10084 if Present
(Homonym
(Id
)) then
10085 Write_Str
(" Homonym ");
10086 Write_Name
(Chars
(Homonym
(Id
)));
10088 Write_Int
(Int
(Homonym
(Id
)));
10094 when E_Component
=>
10095 if Ekind
(Scope
(Id
)) in Record_Kind
then
10097 " Original_Record_Component ",
10098 Original_Record_Component
(Id
));
10099 Write_Int
(Int
(Original_Record_Component
(Id
)));
10106 end Write_Entity_Info
;
10108 -----------------------
10109 -- Write_Field6_Name --
10110 -----------------------
10112 procedure Write_Field6_Name
(Id
: Entity_Id
) is
10113 pragma Unreferenced
(Id
);
10115 Write_Str
("First_Rep_Item");
10116 end Write_Field6_Name
;
10118 -----------------------
10119 -- Write_Field7_Name --
10120 -----------------------
10122 procedure Write_Field7_Name
(Id
: Entity_Id
) is
10123 pragma Unreferenced
(Id
);
10125 Write_Str
("Freeze_Node");
10126 end Write_Field7_Name
;
10128 -----------------------
10129 -- Write_Field8_Name --
10130 -----------------------
10132 procedure Write_Field8_Name
(Id
: Entity_Id
) is
10136 Write_Str
("Associated_Node_For_Itype");
10139 Write_Str
("Dependent_Instances");
10142 Write_Str
("First_Exit_Statement");
10145 Write_Str
("Hiding_Loop_Variable");
10149 | E_Subprogram_Body
10151 Write_Str
("Mechanism");
10156 Write_Str
("Normalized_First_Bit");
10158 when E_Abstract_State
=>
10159 Write_Str
("Refinement_Constituents");
10161 when E_Return_Statement
=>
10162 Write_Str
("Return_Applies_To");
10165 Write_Str
("Field8??");
10167 end Write_Field8_Name
;
10169 -----------------------
10170 -- Write_Field9_Name --
10171 -----------------------
10173 procedure Write_Field9_Name
(Id
: Entity_Id
) is
10177 Write_Str
("Class_Wide_Type");
10179 when Object_Kind
=>
10180 Write_Str
("Current_Value");
10183 | E_Generic_Function
10184 | E_Generic_Package
10185 | E_Generic_Procedure
10189 Write_Str
("Renaming_Map");
10192 Write_Str
("Field9??");
10194 end Write_Field9_Name
;
10196 ------------------------
10197 -- Write_Field10_Name --
10198 ------------------------
10200 procedure Write_Field10_Name
(Id
: Entity_Id
) is
10203 when Class_Wide_Kind
10210 Write_Str
("Direct_Primitive_Operations");
10215 Write_Str
("Discriminal_Link");
10218 Write_Str
("Float_Rep");
10225 Write_Str
("Handler_Records");
10230 Write_Str
("Normalized_Position_Max");
10232 when E_Abstract_State
10235 Write_Str
("Part_Of_Constituents");
10238 Write_Str
("Field10??");
10240 end Write_Field10_Name
;
10242 ------------------------
10243 -- Write_Field11_Name --
10244 ------------------------
10246 procedure Write_Field11_Name
(Id
: Entity_Id
) is
10250 Write_Str
("Block_Node");
10255 Write_Str
("Component_Bit_Offset");
10257 when Formal_Kind
=>
10258 Write_Str
("Entry_Component");
10260 when E_Enumeration_Literal
=>
10261 Write_Str
("Enumeration_Pos");
10266 Write_Str
("Full_View");
10268 when E_Generic_Package
=>
10269 Write_Str
("Generic_Homonym");
10272 Write_Str
("Part_Of_References");
10279 Write_Str
("Protected_Body_Subprogram");
10282 Write_Str
("Field11??");
10284 end Write_Field11_Name
;
10286 ------------------------
10287 -- Write_Field12_Name --
10288 ------------------------
10290 procedure Write_Field12_Name
(Id
: Entity_Id
) is
10294 Write_Str
("Associated_Formal_Package");
10297 Write_Str
("Barrier_Function");
10299 when E_Enumeration_Literal
=>
10300 Write_Str
("Enumeration_Rep");
10308 | E_In_Out_Parameter
10313 Write_Str
("Esize");
10318 Write_Str
("Next_Inlined_Subprogram");
10321 Write_Str
("Field12??");
10323 end Write_Field12_Name
;
10325 ------------------------
10326 -- Write_Field13_Name --
10327 ------------------------
10329 procedure Write_Field13_Name
(Id
: Entity_Id
) is
10335 Write_Str
("Component_Clause");
10340 | Generic_Unit_Kind
10342 Write_Str
("Elaboration_Entity");
10347 Write_Str
("Extra_Accessibility");
10350 Write_Str
("RM_Size");
10353 Write_Str
("Field13??");
10355 end Write_Field13_Name
;
10357 -----------------------
10358 -- Write_Field14_Name --
10359 -----------------------
10361 procedure Write_Field14_Name
(Id
: Entity_Id
) is
10371 Write_Str
("Alignment");
10376 Write_Str
("Normalized_Position");
10383 Write_Str
("Postconditions_Proc");
10385 when E_Generic_Package
10388 Write_Str
("Shadow_Entities");
10391 Write_Str
("Field14??");
10393 end Write_Field14_Name
;
10395 ------------------------
10396 -- Write_Field15_Name --
10397 ------------------------
10399 procedure Write_Field15_Name
(Id
: Entity_Id
) is
10402 when E_Discriminant
=>
10403 Write_Str
("Discriminant_Number");
10405 when E_Component
=>
10406 Write_Str
("DT_Entry_Count");
10411 Write_Str
("DT_Position");
10414 Write_Str
("Entry_Parameters_Type");
10416 when Formal_Kind
=>
10417 Write_Str
("Extra_Formal");
10420 Write_Str
("Pending_Access_Types");
10425 Write_Str
("Related_Instance");
10431 Write_Str
("Status_Flag_Or_Transient_Decl");
10434 Write_Str
("Field15??");
10436 end Write_Field15_Name
;
10438 ------------------------
10439 -- Write_Field16_Name --
10440 ------------------------
10442 procedure Write_Field16_Name
(Id
: Entity_Id
) is
10446 | E_Record_Type_With_Private
10448 Write_Str
("Access_Disp_Table");
10450 when E_Abstract_State
=>
10451 Write_Str
("Body_References");
10453 when E_Class_Wide_Subtype
10456 Write_Str
("Cloned_Subtype");
10461 Write_Str
("DTC_Entity");
10463 when E_Component
=>
10464 Write_Str
("Entry_Formal");
10466 when Concurrent_Kind
10467 | E_Generic_Package
10470 Write_Str
("First_Private_Entity");
10472 when Enumeration_Kind
=>
10473 Write_Str
("Lit_Strings");
10475 when Decimal_Fixed_Point_Kind
=>
10476 Write_Str
("Scale_Value");
10478 when E_String_Literal_Subtype
=>
10479 Write_Str
("String_Literal_Length");
10481 when E_Out_Parameter
10484 Write_Str
("Unset_Reference");
10487 Write_Str
("Field16??");
10489 end Write_Field16_Name
;
10491 ------------------------
10492 -- Write_Field17_Name --
10493 ------------------------
10495 procedure Write_Field17_Name
(Id
: Entity_Id
) is
10500 | E_Generic_In_Out_Parameter
10503 Write_Str
("Actual_Subtype");
10505 when Digits_Kind
=>
10506 Write_Str
("Digits_Value");
10508 when E_Discriminant
=>
10509 Write_Str
("Discriminal");
10511 when Class_Wide_Kind
10518 | E_Generic_Function
10519 | E_Generic_Package
10520 | E_Generic_Procedure
10528 | E_Return_Statement
10529 | E_Subprogram_Body
10530 | E_Subprogram_Type
10532 Write_Str
("First_Entity");
10535 Write_Str
("First_Index");
10537 when Enumeration_Kind
=>
10538 Write_Str
("First_Literal");
10540 when Access_Kind
=>
10541 Write_Str
("Master_Id");
10543 when Modular_Integer_Kind
=>
10544 Write_Str
("Modulus");
10546 when E_Component
=>
10547 Write_Str
("Prival");
10550 Write_Str
("Field17??");
10552 end Write_Field17_Name
;
10554 ------------------------
10555 -- Write_Field18_Name --
10556 ------------------------
10558 procedure Write_Field18_Name
(Id
: Entity_Id
) is
10561 when E_Enumeration_Literal
10566 Write_Str
("Alias");
10568 when E_Record_Type
=>
10569 Write_Str
("Corresponding_Concurrent_Type");
10571 when E_Subprogram_Body
=>
10572 Write_Str
("Corresponding_Protected_Entry");
10574 when Concurrent_Kind
=>
10575 Write_Str
("Corresponding_Record_Type");
10581 Write_Str
("Enclosing_Scope");
10583 when E_Entry_Index_Parameter
=>
10584 Write_Str
("Entry_Index_Constant");
10586 when E_Access_Protected_Subprogram_Type
10587 | E_Access_Subprogram_Type
10588 | E_Anonymous_Access_Protected_Subprogram_Type
10590 | E_Class_Wide_Subtype
10592 Write_Str
("Equivalent_Type");
10594 when Fixed_Point_Kind
=>
10595 Write_Str
("Delta_Value");
10597 when Enumeration_Kind
=>
10598 Write_Str
("Lit_Indexes");
10600 when Incomplete_Or_Private_Kind
10603 Write_Str
("Private_Dependents");
10606 | E_Generic_Function
10607 | E_Generic_Package
10608 | E_Generic_Procedure
10611 Write_Str
("Renamed_Entity");
10613 when Object_Kind
=>
10614 Write_Str
("Renamed_Object");
10616 when E_String_Literal_Subtype
=>
10617 Write_Str
("String_Literal_Low_Bound");
10620 Write_Str
("Field18??");
10622 end Write_Field18_Name
;
10624 -----------------------
10625 -- Write_Field19_Name --
10626 -----------------------
10628 procedure Write_Field19_Name
(Id
: Entity_Id
) is
10631 when E_Generic_Package
10634 Write_Str
("Body_Entity");
10636 when E_Discriminant
=>
10637 Write_Str
("Corresponding_Discriminant");
10639 when Scalar_Kind
=>
10640 Write_Str
("Default_Aspect_Value");
10642 when E_Array_Type
=>
10643 Write_Str
("Default_Component_Value");
10645 when E_Protected_Type
=>
10646 Write_Str
("Entry_Bodies_Array");
10650 | E_Subprogram_Type
10652 Write_Str
("Extra_Accessibility_Of_Result");
10654 when E_Abstract_State
10655 | E_Class_Wide_Type
10656 | E_Incomplete_Type
10658 Write_Str
("Non_Limited_View");
10660 when E_Incomplete_Subtype
=>
10661 if From_Limited_With
(Id
) then
10662 Write_Str
("Non_Limited_View");
10665 when E_Record_Type
=>
10666 Write_Str
("Parent_Subtype");
10668 when E_Procedure
=>
10669 Write_Str
("Receiving_Entry");
10674 Write_Str
("Size_Check_Code");
10679 Write_Str
("Spec_Entity");
10681 when Private_Kind
=>
10682 Write_Str
("Underlying_Full_View");
10685 Write_Str
("Field19??");
10687 end Write_Field19_Name
;
10689 -----------------------
10690 -- Write_Field20_Name --
10691 -----------------------
10693 procedure Write_Field20_Name
(Id
: Entity_Id
) is
10697 Write_Str
("Component_Type");
10699 when E_Generic_In_Parameter
10702 Write_Str
("Default_Value");
10704 when Access_Kind
=>
10705 Write_Str
("Directly_Designated_Type");
10707 when E_Component
=>
10708 Write_Str
("Discriminant_Checking_Func");
10710 when E_Discriminant
=>
10711 Write_Str
("Discriminant_Default_Value");
10713 when Class_Wide_Kind
10720 | E_Generic_Function
10721 | E_Generic_Package
10722 | E_Generic_Procedure
10730 | E_Return_Statement
10731 | E_Subprogram_Body
10732 | E_Subprogram_Type
10734 Write_Str
("Last_Entity");
10739 Write_Str
("Prival_Link");
10741 when E_Exception
=>
10742 Write_Str
("Register_Exception_Call");
10744 when Scalar_Kind
=>
10745 Write_Str
("Scalar_Range");
10748 Write_Str
("Field20??");
10750 end Write_Field20_Name
;
10752 -----------------------
10753 -- Write_Field21_Name --
10754 -----------------------
10756 procedure Write_Field21_Name
(Id
: Entity_Id
) is
10760 Write_Str
("Accept_Address");
10765 Write_Str
("Corresponding_Record_Component");
10767 when E_In_Parameter
=>
10768 Write_Str
("Default_Expr_Function");
10770 when Concurrent_Kind
10771 | Incomplete_Or_Private_Kind
10776 Write_Str
("Discriminant_Constraint");
10781 | E_Generic_Function
10782 | E_Generic_Procedure
10786 Write_Str
("Interface_Name");
10789 | Modular_Integer_Kind
10791 Write_Str
("Original_Array_Type");
10793 when Fixed_Point_Kind
=>
10794 Write_Str
("Small_Value");
10797 Write_Str
("Field21??");
10799 end Write_Field21_Name
;
10801 -----------------------
10802 -- Write_Field22_Name --
10803 -----------------------
10805 procedure Write_Field22_Name
(Id
: Entity_Id
) is
10808 when Access_Kind
=>
10809 Write_Str
("Associated_Storage_Pool");
10812 Write_Str
("Component_Size");
10814 when E_Record_Type
=>
10815 Write_Str
("Corresponding_Remote_Type");
10820 Write_Str
("Original_Record_Component");
10822 when E_Enumeration_Literal
=>
10823 Write_Str
("Enumeration_Rep_Expr");
10825 when E_Limited_Private_Subtype
10826 | E_Limited_Private_Type
10827 | E_Private_Subtype
10829 | E_Record_Subtype_With_Private
10830 | E_Record_Type_With_Private
10832 Write_Str
("Private_View");
10834 when Formal_Kind
=>
10835 Write_Str
("Protected_Formal");
10841 | E_Generic_Function
10842 | E_Generic_Package
10843 | E_Generic_Procedure
10849 | E_Return_Statement
10850 | E_Subprogram_Body
10853 Write_Str
("Scope_Depth_Value");
10856 Write_Str
("Shared_Var_Procs_Instance");
10859 Write_Str
("Field22??");
10861 end Write_Field22_Name
;
10863 ------------------------
10864 -- Write_Field23_Name --
10865 ------------------------
10867 procedure Write_Field23_Name
(Id
: Entity_Id
) is
10870 when E_Discriminant
=>
10871 Write_Str
("CR_Discriminant");
10874 Write_Str
("Entry_Cancel_Parameter");
10876 when E_Enumeration_Type
=>
10877 Write_Str
("Enum_Pos_To_Rep");
10882 Write_Str
("Extra_Constrained");
10884 when Access_Kind
=>
10885 Write_Str
("Finalization_Master");
10887 when E_Generic_Function
10888 | E_Generic_Package
10889 | E_Generic_Procedure
10891 Write_Str
("Inner_Instances");
10894 Write_Str
("Packed_Array_Impl_Type");
10897 Write_Str
("Protection_Object");
10899 when Class_Wide_Kind
10901 | Incomplete_Or_Private_Kind
10905 Write_Str
("Stored_Constraint");
10910 if Present
(Scope
(Id
))
10911 and then Is_Protected_Type
(Scope
(Id
))
10913 Write_Str
("Protection_Object");
10915 Write_Str
("Generic_Renamings");
10919 if Is_Generic_Instance
(Id
) then
10920 Write_Str
("Generic_Renamings");
10922 Write_Str
("Limited_View");
10926 Write_Str
("Field23??");
10928 end Write_Field23_Name
;
10930 ------------------------
10931 -- Write_Field24_Name --
10932 ------------------------
10934 procedure Write_Field24_Name
(Id
: Entity_Id
) is
10938 Write_Str
("Incomplete_Actuals");
10944 Write_Str
("Related_Expression");
10950 Write_Str
("Subps_Index");
10953 Write_Str
("Field24???");
10955 end Write_Field24_Name
;
10957 ------------------------
10958 -- Write_Field25_Name --
10959 ------------------------
10961 procedure Write_Field25_Name
(Id
: Entity_Id
) is
10964 when E_Generic_Package
10967 Write_Str
("Abstract_States");
10972 Write_Str
("Contract_Wrapper");
10975 Write_Str
("Debug_Renaming_Link");
10977 when E_Component
=>
10978 Write_Str
("DT_Offset_To_Top_Func");
10983 Write_Str
("Interface_Alias");
10985 when E_Record_Subtype
10986 | E_Record_Subtype_With_Private
10988 | E_Record_Type_With_Private
10990 Write_Str
("Interfaces");
10992 when E_Array_Subtype
10995 Write_Str
("Related_Array_Object");
10997 when Discrete_Kind
=>
10998 Write_Str
("Static_Discrete_Predicate");
11001 Write_Str
("Static_Real_Or_String_Predicate");
11004 Write_Str
("Task_Body_Procedure");
11007 Write_Str
("Field25??");
11009 end Write_Field25_Name
;
11011 ------------------------
11012 -- Write_Field26_Name --
11013 ------------------------
11015 procedure Write_Field26_Name
(Id
: Entity_Id
) is
11019 | E_Record_Type_With_Private
11021 Write_Str
("Dispatch_Table_Wrappers");
11023 when E_In_Out_Parameter
11027 Write_Str
("Last_Assignment");
11032 Write_Str
("Overridden_Operation");
11034 when E_Generic_Package
11037 Write_Str
("Package_Instantiation");
11042 Write_Str
("Related_Type");
11047 Write_Str
("Storage_Size_Variable");
11050 Write_Str
("Field26??");
11052 end Write_Field26_Name
;
11054 ------------------------
11055 -- Write_Field27_Name --
11056 ------------------------
11058 procedure Write_Field27_Name
(Id
: Entity_Id
) is
11064 Write_Str
("Current_Use_Clause");
11070 Write_Str
("Related_Type");
11075 Write_Str
("Wrapped_Entity");
11078 Write_Str
("Field27??");
11080 end Write_Field27_Name
;
11082 ------------------------
11083 -- Write_Field28_Name --
11084 ------------------------
11086 procedure Write_Field28_Name
(Id
: Entity_Id
) is
11093 | E_Subprogram_Body
11094 | E_Subprogram_Type
11096 Write_Str
("Extra_Formals");
11101 Write_Str
("Finalizer");
11106 Write_Str
("Initialization_Statements");
11108 when E_Access_Subprogram_Type
=>
11109 Write_Str
("Original_Access_Type");
11112 Write_Str
("Relative_Deadline_Variable");
11114 when E_Record_Type
=>
11115 Write_Str
("Underlying_Record_View");
11118 Write_Str
("Field28??");
11120 end Write_Field28_Name
;
11122 ------------------------
11123 -- Write_Field29_Name --
11124 ------------------------
11126 procedure Write_Field29_Name
(Id
: Entity_Id
) is
11132 | E_Subprogram_Body
11134 Write_Str
("Anonymous_Masters");
11139 Write_Str
("BIP_Initialization_Call");
11142 Write_Str
("Subprograms_For_Type");
11145 Write_Str
("Field29??");
11147 end Write_Field29_Name
;
11149 ------------------------
11150 -- Write_Field30_Name --
11151 ------------------------
11153 procedure Write_Field30_Name
(Id
: Entity_Id
) is
11157 | E_Record_Type_With_Private
11159 Write_Str
("Access_Disp_Table_Elab_Flag");
11161 when E_Protected_Type
11164 Write_Str
("Anonymous_Object");
11167 Write_Str
("Corresponding_Equality");
11172 Write_Str
("Last_Aggregate_Assignment");
11174 when E_Procedure
=>
11175 Write_Str
("Static_Initialization");
11178 Write_Str
("Field30??");
11180 end Write_Field30_Name
;
11182 ------------------------
11183 -- Write_Field31_Name --
11184 ------------------------
11186 procedure Write_Field31_Name
(Id
: Entity_Id
) is
11191 | E_In_Out_Parameter
11196 Write_Str
("Activation_Record_Component");
11199 Write_Str
("Derived_Type_Link");
11204 Write_Str
("Thunk_Entity");
11207 Write_Str
("Field31??");
11209 end Write_Field31_Name
;
11211 ------------------------
11212 -- Write_Field32_Name --
11213 ------------------------
11215 procedure Write_Field32_Name
(Id
: Entity_Id
) is
11218 when E_Procedure
=>
11219 Write_Str
("Corresponding_Function");
11222 Write_Str
("Corresponding_Procedure");
11224 when E_Abstract_State
11228 Write_Str
("Encapsulating_State");
11231 Write_Str
("No_Tagged_Streams_Pragma");
11234 Write_Str
("Field32??");
11236 end Write_Field32_Name
;
11238 ------------------------
11239 -- Write_Field33_Name --
11240 ------------------------
11242 procedure Write_Field33_Name
(Id
: Entity_Id
) is
11245 when Subprogram_Kind
11250 Write_Str
("Linker_Section_Pragma");
11253 Write_Str
("Field33??");
11255 end Write_Field33_Name
;
11257 ------------------------
11258 -- Write_Field34_Name --
11259 ------------------------
11261 procedure Write_Field34_Name
(Id
: Entity_Id
) is
11268 | E_Generic_Function
11269 | E_Generic_Package
11270 | E_Generic_Procedure
11276 | E_Subprogram_Body
11282 Write_Str
("Contract");
11285 Write_Str
("Field34??");
11287 end Write_Field34_Name
;
11289 ------------------------
11290 -- Write_Field35_Name --
11291 ------------------------
11293 procedure Write_Field35_Name
(Id
: Entity_Id
) is
11297 Write_Str
("Anonymous_Designated_Type");
11302 Write_Str
("Entry_Max_Queue_Lenghts_Array");
11304 when Subprogram_Kind
=>
11305 Write_Str
("Import_Pragma");
11308 Write_Str
("Field35??");
11310 end Write_Field35_Name
;
11312 ------------------------
11313 -- Write_Field36_Name --
11314 ------------------------
11316 procedure Write_Field36_Name
(Id
: Entity_Id
) is
11317 pragma Unreferenced
(Id
);
11319 Write_Str
("Prev_Entity");
11320 end Write_Field36_Name
;
11322 ------------------------
11323 -- Write_Field37_Name --
11324 ------------------------
11326 procedure Write_Field37_Name
(Id
: Entity_Id
) is
11327 pragma Unreferenced
(Id
);
11329 Write_Str
("Associated_Entity");
11330 end Write_Field37_Name
;
11332 ------------------------
11333 -- Write_Field38_Name --
11334 ------------------------
11336 procedure Write_Field38_Name
(Id
: Entity_Id
) is
11342 Write_Str
("Class_Wide_Clone");
11344 when E_Array_Subtype
11346 | E_Record_Subtype_With_Private
11348 Write_Str
("Predicated_Parent");
11351 Write_Str
("Validated_Object");
11354 Write_Str
("Field38??");
11356 end Write_Field38_Name
;
11358 ------------------------
11359 -- Write_Field39_Name --
11360 ------------------------
11362 procedure Write_Field39_Name
(Id
: Entity_Id
) is
11368 Write_Str
("Protected_Subprogram");
11371 Write_Str
("Field39??");
11373 end Write_Field39_Name
;
11375 ------------------------
11376 -- Write_Field40_Name --
11377 ------------------------
11379 procedure Write_Field40_Name
(Id
: Entity_Id
) is
11382 when E_Abstract_State
11387 | E_Generic_Function
11388 | E_Generic_Package
11389 | E_Generic_Procedure
11395 | E_Subprogram_Body
11401 Write_Str
("SPARK_Pragma");
11404 Write_Str
("Field40??");
11406 end Write_Field40_Name
;
11408 ------------------------
11409 -- Write_Field41_Name --
11410 ------------------------
11412 procedure Write_Field41_Name
(Id
: Entity_Id
) is
11418 Write_Str
("Original_Protected_Subprogram");
11420 when E_Generic_Package
11426 Write_Str
("SPARK_Aux_Pragma");
11429 Write_Str
("Field41??");
11431 end Write_Field41_Name
;
11433 -------------------------
11434 -- Iterator Procedures --
11435 -------------------------
11437 procedure Proc_Next_Component
(N
: in out Node_Id
) is
11439 N
:= Next_Component
(N
);
11440 end Proc_Next_Component
;
11442 procedure Proc_Next_Component_Or_Discriminant
(N
: in out Node_Id
) is
11444 N
:= Next_Entity
(N
);
11445 while Present
(N
) loop
11446 exit when Ekind_In
(N
, E_Component
, E_Discriminant
);
11447 N
:= Next_Entity
(N
);
11449 end Proc_Next_Component_Or_Discriminant
;
11451 procedure Proc_Next_Discriminant
(N
: in out Node_Id
) is
11453 N
:= Next_Discriminant
(N
);
11454 end Proc_Next_Discriminant
;
11456 procedure Proc_Next_Formal
(N
: in out Node_Id
) is
11458 N
:= Next_Formal
(N
);
11459 end Proc_Next_Formal
;
11461 procedure Proc_Next_Formal_With_Extras
(N
: in out Node_Id
) is
11463 N
:= Next_Formal_With_Extras
(N
);
11464 end Proc_Next_Formal_With_Extras
;
11466 procedure Proc_Next_Index
(N
: in out Node_Id
) is
11468 N
:= Next_Index
(N
);
11469 end Proc_Next_Index
;
11471 procedure Proc_Next_Inlined_Subprogram
(N
: in out Node_Id
) is
11473 N
:= Next_Inlined_Subprogram
(N
);
11474 end Proc_Next_Inlined_Subprogram
;
11476 procedure Proc_Next_Literal
(N
: in out Node_Id
) is
11478 N
:= Next_Literal
(N
);
11479 end Proc_Next_Literal
;
11481 procedure Proc_Next_Stored_Discriminant
(N
: in out Node_Id
) is
11483 N
:= Next_Stored_Discriminant
(N
);
11484 end Proc_Next_Stored_Discriminant
;