1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2005, 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 2, 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. See the GNU General Public License --
17 -- for more details. You should have received a copy of the GNU General --
18 -- Public License distributed with GNAT; see file COPYING. If not, write --
19 -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
20 -- Boston, MA 02110-1301, USA. --
22 -- As a special exception, if other files instantiate generics from this --
23 -- unit, or you link this unit with other files to produce an executable, --
24 -- this unit does not by itself cause the resulting executable to be --
25 -- covered by the GNU General Public License. This exception does not --
26 -- however invalidate any other reasons why the executable file might be --
27 -- covered by the GNU Public License. --
29 -- GNAT was originally developed by the GNAT team at New York University. --
30 -- Extensive contributions were provided by Ada Core Technologies Inc. --
32 ------------------------------------------------------------------------------
34 pragma Style_Checks
(All_Checks
);
35 -- Turn off subprogram ordering, not used for this unit
37 with Atree
; use Atree
;
38 with Namet
; use Namet
;
39 with Nlists
; use Nlists
;
40 with Sinfo
; use Sinfo
;
41 with Stand
; use Stand
;
42 with Output
; use Output
;
46 use Atree
.Unchecked_Access
;
47 -- This is one of the packages that is allowed direct untyped access to
48 -- the fields in a node, since it provides the next level abstraction
49 -- which incorporates appropriate checks.
51 ----------------------------------------------
52 -- Usage of Fields in Defining Entity Nodes --
53 ----------------------------------------------
55 -- Four of these fields are defined in Sinfo, since they in are the
56 -- base part of the node. The access routines for these fields and
57 -- the corresponding set procedures are defined in Sinfo. These fields
58 -- are present in all entities. Note that Homonym is also in the base
59 -- part of the node, but has access routines that are more properly
60 -- part of Einfo, which is why they are defined here.
67 -- Remaining fields are present only in extended nodes (i.e. entities)
69 -- The following fields are present in all entities
72 -- First_Rep_Item Node6
75 -- The usage of each field (and the entity kinds to which it applies)
76 -- depends on the particular field (see Einfo spec for details).
78 -- Associated_Node_For_Itype Node8
79 -- Dependent_Instances Elist8
80 -- Hiding_Loop_Variable Node8
81 -- Mechanism Uint8 (but returns Mechanism_Type)
82 -- Normalized_First_Bit Uint8
84 -- Class_Wide_Type Node9
85 -- Current_Value Node9
88 -- Discriminal_Link Node10
89 -- Handler_Records List10
90 -- Normalized_Position_Max Uint10
91 -- Referenced_Object Node10
93 -- Component_Bit_Offset Uint11
95 -- Entry_Component Node11
96 -- Enumeration_Pos Uint11
97 -- Generic_Homonym Node11
98 -- Protected_Body_Subprogram Node11
101 -- Barrier_Function Node12
102 -- Enumeration_Rep Uint12
104 -- Next_Inlined_Subprogram Node12
106 -- Corresponding_Equality Node13
107 -- Component_Clause Node13
108 -- Debug_Renaming_Link Node13
109 -- Elaboration_Entity Node13
110 -- Extra_Accessibility Node13
114 -- First_Optional_Parameter Node14
115 -- Normalized_Position Uint14
116 -- Shadow_Entities List14
118 -- Discriminant_Number Uint15
119 -- DT_Position Uint15
120 -- DT_Entry_Count Uint15
121 -- Entry_Bodies_Array Node15
122 -- Entry_Parameters_Type Node15
123 -- Extra_Formal Node15
124 -- Lit_Indexes Node15
125 -- Primitive_Operations Elist15
126 -- Related_Instance Node15
127 -- Scale_Value Uint15
128 -- Storage_Size_Variable Node15
129 -- String_Literal_Low_Bound Node15
130 -- Shared_Var_Read_Proc Node15
132 -- Access_Disp_Table Elist16
133 -- Cloned_Subtype Node16
135 -- Entry_Formal Node16
136 -- First_Private_Entity Node16
137 -- Lit_Strings Node16
138 -- String_Literal_Length Uint16
139 -- Unset_Reference Node16
141 -- Actual_Subtype Node17
142 -- Digits_Value Uint17
143 -- Discriminal Node17
144 -- First_Entity Node17
145 -- First_Index Node17
146 -- First_Literal Node17
149 -- Non_Limited_View Node17
154 -- Corresponding_Concurrent_Type Node18
155 -- Corresponding_Record_Type Node18
156 -- Delta_Value Ureal18
157 -- Enclosing_Scope Node18
158 -- Equivalent_Type Node18
159 -- Private_Dependents Elist18
160 -- Renamed_Entity Node18
161 -- Renamed_Object Node18
163 -- Body_Entity Node19
164 -- Corresponding_Discriminant Node19
165 -- Finalization_Chain_Entity Node19
166 -- Parent_Subtype Node19
167 -- Related_Array_Object Node19
168 -- Size_Check_Code Node19
169 -- Spec_Entity Node19
170 -- Underlying_Full_View Node19
172 -- Component_Type Node20
173 -- Default_Value Node20
174 -- Directly_Designated_Type Node20
175 -- Discriminant_Checking_Func Node20
176 -- Discriminant_Default_Value Node20
177 -- Last_Entity Node20
178 -- Register_Exception_Call Node20
179 -- Scalar_Range Node20
181 -- Accept_Address Elist21
182 -- Default_Expr_Function Node21
183 -- Discriminant_Constraint Elist21
184 -- Interface_Name Node21
185 -- Original_Array_Type Node21
186 -- Small_Value Ureal21
188 -- Associated_Storage_Pool Node22
189 -- Component_Size Uint22
190 -- Corresponding_Remote_Type Node22
191 -- Enumeration_Rep_Expr Node22
192 -- Exception_Code Uint22
193 -- Original_Record_Component Node22
194 -- Private_View Node22
195 -- Protected_Formal Node22
196 -- Scope_Depth_Value Uint22
197 -- Shared_Var_Assign_Proc Node22
199 -- Associated_Final_Chain Node23
200 -- CR_Discriminant Node23
201 -- Stored_Constraint Elist23
202 -- Entry_Cancel_Parameter Node23
203 -- Extra_Constrained Node23
204 -- Generic_Renamings Elist23
205 -- Inner_Instances Elist23
206 -- Enum_Pos_To_Rep Node23
207 -- Packed_Array_Type Node23
208 -- Limited_View Node23
209 -- Privals_Chain Elist23
210 -- Protected_Operation Node23
212 -- Obsolescent_Warning Node24
213 -- Task_Body_Procedure Node24
214 -- Abstract_Interfaces Elist24
216 -- Abstract_Interface_Alias Node25
222 ---------------------------------------------
223 -- Usage of Flags in Defining Entity Nodes --
224 ---------------------------------------------
226 -- All flags are unique, there is no overlaying, so each flag is physically
227 -- present in every entity. However, for many of the flags, it only makes
228 -- sense for them to be set true for certain subsets of entity kinds. See
229 -- the spec of Einfo for further details.
231 -- Note: Flag1-Flag3 are absent from this list, since these flag positions
232 -- are used for the flags Analyzed, Comes_From_Source, and Error_Posted,
233 -- which are common to all nodes, including entity nodes.
236 -- Has_Discriminants Flag5
237 -- Is_Dispatching_Operation Flag6
238 -- Is_Immediately_Visible Flag7
240 -- Is_Potentially_Use_Visible Flag9
244 -- Is_Constrained Flag12
245 -- Is_Generic_Type Flag13
246 -- Depends_On_Private Flag14
248 -- Is_Volatile Flag16
249 -- Is_Internal Flag17
250 -- Has_Delayed_Freeze Flag18
251 -- Is_Abstract Flag19
252 -- Is_Concurrent_Record_Type Flag20
254 -- Has_Master_Entity Flag21
255 -- Needs_No_Actuals Flag22
256 -- Has_Storage_Size_Clause Flag23
257 -- Is_Imported Flag24
258 -- Is_Limited_Record Flag25
259 -- Has_Completion Flag26
260 -- Has_Pragma_Controlled Flag27
261 -- Is_Statically_Allocated Flag28
262 -- Has_Size_Clause Flag29
265 -- Checks_May_Be_Suppressed Flag31
266 -- Kill_Elaboration_Checks Flag32
267 -- Kill_Range_Checks Flag33
268 -- Kill_Tag_Checks Flag34
269 -- Is_Class_Wide_Equivalent_Type Flag35
270 -- Referenced_As_LHS Flag36
271 -- Is_Known_Non_Null Flag37
272 -- Can_Never_Be_Null Flag38
273 -- Is_Overriding_Operation Flag39
274 -- Body_Needed_For_SAL Flag40
276 -- Treat_As_Volatile Flag41
277 -- Is_Controlled Flag42
278 -- Has_Controlled_Component Flag43
280 -- In_Private_Part Flag45
281 -- Has_Alignment_Clause Flag46
283 -- In_Package_Body Flag48
285 -- Delay_Subprogram_Descriptors Flag50
288 -- Is_Entry_Formal Flag52
289 -- Is_Private_Descendant Flag53
290 -- Return_Present Flag54
291 -- Is_Tagged_Type Flag55
292 -- Has_Homonym Flag56
294 -- Non_Binary_Modulus Flag58
295 -- Is_Preelaborated Flag59
296 -- Is_Shared_Passive Flag60
298 -- Is_Remote_Types Flag61
299 -- Is_Remote_Call_Interface Flag62
300 -- Is_Character_Type Flag63
301 -- Is_Intrinsic_Subprogram Flag64
302 -- Has_Record_Rep_Clause Flag65
303 -- Has_Enumeration_Rep_Clause Flag66
304 -- Has_Small_Clause Flag67
305 -- Has_Component_Size_Clause Flag68
306 -- Is_Access_Constant Flag69
307 -- Is_First_Subtype Flag70
309 -- Has_Completion_In_Body Flag71
310 -- Has_Unknown_Discriminants Flag72
311 -- Is_Child_Unit Flag73
312 -- Is_CPP_Class Flag74
313 -- Has_Non_Standard_Rep Flag75
314 -- Is_Constructor Flag76
315 -- Is_Thread_Body Flag77
317 -- Has_All_Calls_Remote Flag79
318 -- Is_Constr_Subt_For_U_Nominal Flag80
320 -- Is_Asynchronous Flag81
321 -- Has_Gigi_Rep_Item Flag82
322 -- Has_Machine_Radix_Clause Flag83
323 -- Machine_Radix_10 Flag84
325 -- Has_Atomic_Components Flag86
326 -- Has_Volatile_Components Flag87
327 -- Discard_Names Flag88
328 -- Is_Interrupt_Handler Flag89
329 -- Returns_By_Ref Flag90
332 -- Size_Known_At_Compile_Time Flag92
333 -- Has_Subprogram_Descriptor Flag93
334 -- Is_Generic_Actual_Type Flag94
335 -- Uses_Sec_Stack Flag95
336 -- Warnings_Off Flag96
337 -- Is_Controlling_Formal Flag97
338 -- Has_Controlling_Result Flag98
339 -- Is_Exported Flag99
340 -- Has_Specified_Layout Flag100
342 -- Has_Nested_Block_With_Handler Flag101
344 -- Is_Completely_Hidden Flag103
345 -- Address_Taken Flag104
346 -- Suppress_Init_Proc Flag105
347 -- Is_Limited_Composite Flag106
348 -- Is_Private_Composite Flag107
349 -- Default_Expressions_Processed Flag108
350 -- Is_Non_Static_Subtype Flag109
351 -- Has_External_Tag_Rep_Clause Flag110
353 -- Is_Formal_Subprogram Flag111
354 -- Is_Renaming_Of_Object Flag112
356 -- Delay_Cleanups Flag114
357 -- Never_Set_In_Source Flag115
358 -- Is_Visible_Child_Unit Flag116
359 -- Is_Unchecked_Union Flag117
360 -- Is_For_Access_Subtype Flag118
361 -- Has_Convention_Pragma Flag119
362 -- Has_Primitive_Operations Flag120
364 -- Has_Pragma_Pack Flag121
365 -- Is_Bit_Packed_Array Flag122
366 -- Has_Unchecked_Union Flag123
367 -- Is_Eliminated Flag124
368 -- C_Pass_By_Copy Flag125
369 -- Is_Instantiated Flag126
370 -- Is_Valued_Procedure Flag127
371 -- (used for Component_Alignment) Flag128
372 -- (used for Component_Alignment) Flag129
373 -- Is_Generic_Instance Flag130
375 -- No_Pool_Assigned Flag131
376 -- Is_AST_Entry Flag132
377 -- Is_VMS_Exception Flag133
378 -- Is_Optional_Parameter Flag134
379 -- Has_Aliased_Components Flag135
380 -- No_Strict_Aliasing Flag136
381 -- Is_Machine_Code_Subprogram Flag137
382 -- Is_Packed_Array_Type Flag138
383 -- Has_Biased_Representation Flag139
384 -- Has_Complex_Representation Flag140
386 -- Is_Constr_Subt_For_UN_Aliased Flag141
387 -- Has_Missing_Return Flag142
388 -- Has_Recursive_Call Flag143
389 -- Is_Unsigned_Type Flag144
390 -- Strict_Alignment Flag145
391 -- Elaborate_All_Desirable Flag146
392 -- Needs_Debug_Info Flag147
393 -- Suppress_Elaboration_Warnings Flag148
394 -- Is_Compilation_Unit Flag149
395 -- Has_Pragma_Elaborate_Body Flag150
398 -- Entry_Accepted Flag152
399 -- Is_Obsolescent Flag153
400 -- Has_Per_Object_Constraint Flag154
401 -- Has_Private_Declaration Flag155
402 -- Referenced Flag156
403 -- Has_Pragma_Inline Flag157
404 -- Finalize_Storage_Only Flag158
405 -- From_With_Type Flag159
406 -- Is_Package_Body_Entity Flag160
408 -- Has_Qualified_Name Flag161
409 -- Nonzero_Is_True Flag162
410 -- Is_True_Constant Flag163
411 -- Reverse_Bit_Order Flag164
412 -- Suppress_Style_Checks Flag165
413 -- Debug_Info_Off Flag166
414 -- Sec_Stack_Needed_For_Return Flag167
415 -- Materialize_Entity Flag168
416 -- Function_Returns_With_DSP Flag169
417 -- Is_Known_Valid Flag170
419 -- Is_Hidden_Open_Scope Flag171
420 -- Has_Object_Size_Clause Flag172
421 -- Has_Fully_Qualified_Name Flag173
422 -- Elaboration_Entity_Required Flag174
423 -- Has_Forward_Instantiation Flag175
424 -- Is_Discrim_SO_Function Flag176
425 -- Size_Depends_On_Discriminant Flag177
426 -- Is_Null_Init_Proc Flag178
427 -- Has_Pragma_Pure_Function Flag179
428 -- Has_Pragma_Unreferenced Flag180
430 -- Has_Contiguous_Rep Flag181
431 -- Has_Xref_Entry Flag182
432 -- Must_Be_On_Byte_Boundary Flag183
433 -- Has_Stream_Size_Clause Flag184
434 -- Is_Ada_2005 Flag185
435 -- Is_Interface Flag186
436 -- Has_Constrained_Partial_View Flag187
437 -- Has_Persistent_BSS Flag188
438 -- Is_Pure_Unit_Access_Type Flag189
439 -- Has_Specified_Stream_Input Flag190
441 -- Has_Specified_Stream_Output Flag191
442 -- Has_Specified_Stream_Read Flag192
443 -- Has_Specified_Stream_Write Flag193
444 -- Is_Local_Anonymous_Access Flag194
468 -----------------------
469 -- Local subprograms --
470 -----------------------
472 function Rep_Clause
(Id
: E
; Rep_Name
: Name_Id
) return N
;
473 -- Returns the attribute definition clause whose name is Rep_Name. Returns
474 -- Empty if not found.
480 function Rep_Clause
(Id
: E
; Rep_Name
: Name_Id
) return N
is
484 Ritem
:= First_Rep_Item
(Id
);
485 while Present
(Ritem
) loop
486 if Nkind
(Ritem
) = N_Attribute_Definition_Clause
487 and then Chars
(Ritem
) = Rep_Name
491 Ritem
:= Next_Rep_Item
(Ritem
);
498 --------------------------------
499 -- Attribute Access Functions --
500 --------------------------------
502 function Abstract_Interfaces
(Id
: E
) return L
is
505 (Ekind
(Id
) = E_Record_Type
506 or else Ekind
(Id
) = E_Record_Subtype
507 or else Ekind
(Id
) = E_Record_Type_With_Private
508 or else Ekind
(Id
) = E_Record_Subtype_With_Private
509 or else Ekind
(Id
) = E_Class_Wide_Type
);
511 end Abstract_Interfaces
;
513 function Abstract_Interface_Alias
(Id
: E
) return E
is
516 (Ekind
(Id
) = E_Procedure
or Ekind
(Id
) = E_Function
);
518 end Abstract_Interface_Alias
;
520 function Accept_Address
(Id
: E
) return L
is
525 function Access_Disp_Table
(Id
: E
) return L
is
527 pragma Assert
(Is_Tagged_Type
(Id
));
528 return Elist16
(Implementation_Base_Type
(Id
));
529 end Access_Disp_Table
;
531 function Actual_Subtype
(Id
: E
) return E
is
534 (Ekind
(Id
) = E_Constant
535 or else Ekind
(Id
) = E_Variable
536 or else Ekind
(Id
) = E_Generic_In_Out_Parameter
537 or else Ekind
(Id
) in E_In_Parameter
.. E_In_Out_Parameter
);
541 function Address_Taken
(Id
: E
) return B
is
546 function Alias
(Id
: E
) return E
is
549 (Is_Overloadable
(Id
) or else Ekind
(Id
) = E_Subprogram_Type
);
553 function Alignment
(Id
: E
) return U
is
555 pragma Assert
(Is_Type
(Id
)
556 or else Is_Formal
(Id
)
557 or else Ekind
(Id
) = E_Loop_Parameter
558 or else Ekind
(Id
) = E_Constant
559 or else Ekind
(Id
) = E_Exception
560 or else Ekind
(Id
) = E_Variable
);
564 function Associated_Final_Chain
(Id
: E
) return E
is
566 pragma Assert
(Is_Access_Type
(Id
));
568 end Associated_Final_Chain
;
570 function Associated_Formal_Package
(Id
: E
) return E
is
572 pragma Assert
(Ekind
(Id
) = E_Package
);
574 end Associated_Formal_Package
;
576 function Associated_Node_For_Itype
(Id
: E
) return N
is
579 end Associated_Node_For_Itype
;
581 function Associated_Storage_Pool
(Id
: E
) return E
is
583 pragma Assert
(Is_Access_Type
(Id
));
584 return Node22
(Root_Type
(Id
));
585 end Associated_Storage_Pool
;
587 function Barrier_Function
(Id
: E
) return N
is
589 pragma Assert
(Is_Entry
(Id
));
591 end Barrier_Function
;
593 function Block_Node
(Id
: E
) return N
is
595 pragma Assert
(Ekind
(Id
) = E_Block
);
599 function Body_Entity
(Id
: E
) return E
is
602 (Ekind
(Id
) = E_Package
or else Ekind
(Id
) = E_Generic_Package
);
606 function Body_Needed_For_SAL
(Id
: E
) return B
is
609 (Ekind
(Id
) = E_Package
610 or else Is_Subprogram
(Id
)
611 or else Is_Generic_Unit
(Id
));
613 end Body_Needed_For_SAL
;
615 function C_Pass_By_Copy
(Id
: E
) return B
is
617 pragma Assert
(Is_Record_Type
(Id
));
618 return Flag125
(Implementation_Base_Type
(Id
));
621 function Can_Never_Be_Null
(Id
: E
) return B
is
624 end Can_Never_Be_Null
;
626 function Checks_May_Be_Suppressed
(Id
: E
) return B
is
629 end Checks_May_Be_Suppressed
;
631 function Class_Wide_Type
(Id
: E
) return E
is
633 pragma Assert
(Is_Type
(Id
));
637 function Cloned_Subtype
(Id
: E
) return E
is
640 (Ekind
(Id
) = E_Record_Subtype
641 or else Ekind
(Id
) = E_Class_Wide_Subtype
);
645 function Component_Bit_Offset
(Id
: E
) return U
is
648 (Ekind
(Id
) = E_Component
or else Ekind
(Id
) = E_Discriminant
);
650 end Component_Bit_Offset
;
652 function Component_Clause
(Id
: E
) return N
is
655 (Ekind
(Id
) = E_Component
or else Ekind
(Id
) = E_Discriminant
);
657 end Component_Clause
;
659 function Component_Size
(Id
: E
) return U
is
661 pragma Assert
(Is_Array_Type
(Id
));
662 return Uint22
(Implementation_Base_Type
(Id
));
665 function Component_Type
(Id
: E
) return E
is
667 return Node20
(Implementation_Base_Type
(Id
));
670 function Corresponding_Concurrent_Type
(Id
: E
) return E
is
672 pragma Assert
(Ekind
(Id
) = E_Record_Type
);
674 end Corresponding_Concurrent_Type
;
676 function Corresponding_Discriminant
(Id
: E
) return E
is
678 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
680 end Corresponding_Discriminant
;
682 function Corresponding_Equality
(Id
: E
) return E
is
685 (Ekind
(Id
) = E_Function
686 and then not Comes_From_Source
(Id
)
687 and then Chars
(Id
) = Name_Op_Ne
);
689 end Corresponding_Equality
;
691 function Corresponding_Record_Type
(Id
: E
) return E
is
693 pragma Assert
(Is_Concurrent_Type
(Id
));
695 end Corresponding_Record_Type
;
697 function Corresponding_Remote_Type
(Id
: E
) return E
is
700 end Corresponding_Remote_Type
;
702 function Current_Value
(Id
: E
) return N
is
704 pragma Assert
(Ekind
(Id
) in Object_Kind
);
708 function CR_Discriminant
(Id
: E
) return E
is
713 function Debug_Info_Off
(Id
: E
) return B
is
718 function Debug_Renaming_Link
(Id
: E
) return E
is
721 end Debug_Renaming_Link
;
723 function Default_Expr_Function
(Id
: E
) return E
is
725 pragma Assert
(Is_Formal
(Id
));
727 end Default_Expr_Function
;
729 function Default_Expressions_Processed
(Id
: E
) return B
is
732 end Default_Expressions_Processed
;
734 function Default_Value
(Id
: E
) return N
is
736 pragma Assert
(Is_Formal
(Id
));
740 function Delay_Cleanups
(Id
: E
) return B
is
745 function Delay_Subprogram_Descriptors
(Id
: E
) return B
is
748 end Delay_Subprogram_Descriptors
;
750 function Delta_Value
(Id
: E
) return R
is
752 pragma Assert
(Is_Fixed_Point_Type
(Id
));
756 function Dependent_Instances
(Id
: E
) return L
is
758 pragma Assert
(Is_Generic_Instance
(Id
));
760 end Dependent_Instances
;
762 function Depends_On_Private
(Id
: E
) return B
is
764 pragma Assert
(Nkind
(Id
) in N_Entity
);
766 end Depends_On_Private
;
768 function Digits_Value
(Id
: E
) return U
is
771 (Is_Floating_Point_Type
(Id
)
772 or else Is_Decimal_Fixed_Point_Type
(Id
));
776 function Directly_Designated_Type
(Id
: E
) return E
is
779 end Directly_Designated_Type
;
781 function Discard_Names
(Id
: E
) return B
is
786 function Discriminal
(Id
: E
) return E
is
788 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
792 function Discriminal_Link
(Id
: E
) return N
is
795 end Discriminal_Link
;
797 function Discriminant_Checking_Func
(Id
: E
) return E
is
799 pragma Assert
(Ekind
(Id
) = E_Component
);
801 end Discriminant_Checking_Func
;
803 function Discriminant_Constraint
(Id
: E
) return L
is
805 pragma Assert
(Is_Composite_Type
(Id
) and then Has_Discriminants
(Id
));
807 end Discriminant_Constraint
;
809 function Discriminant_Default_Value
(Id
: E
) return N
is
811 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
813 end Discriminant_Default_Value
;
815 function Discriminant_Number
(Id
: E
) return U
is
817 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
819 end Discriminant_Number
;
821 function DT_Entry_Count
(Id
: E
) return U
is
823 pragma Assert
(Ekind
(Id
) = E_Component
and then Is_Tag
(Id
));
827 function DT_Position
(Id
: E
) return U
is
830 ((Ekind
(Id
) = E_Function
831 or else Ekind
(Id
) = E_Procedure
)
832 and then Present
(DTC_Entity
(Id
)));
836 function DTC_Entity
(Id
: E
) return E
is
839 (Ekind
(Id
) = E_Function
or else Ekind
(Id
) = E_Procedure
);
843 function Elaborate_All_Desirable
(Id
: E
) return B
is
846 end Elaborate_All_Desirable
;
848 function Elaboration_Entity
(Id
: E
) return E
is
853 Ekind
(Id
) = E_Package
855 Is_Generic_Unit
(Id
));
857 end Elaboration_Entity
;
859 function Elaboration_Entity_Required
(Id
: E
) return B
is
864 Ekind
(Id
) = E_Package
866 Is_Generic_Unit
(Id
));
868 end Elaboration_Entity_Required
;
870 function Enclosing_Scope
(Id
: E
) return E
is
875 function Entry_Accepted
(Id
: E
) return B
is
877 pragma Assert
(Is_Entry
(Id
));
881 function Entry_Bodies_Array
(Id
: E
) return E
is
884 end Entry_Bodies_Array
;
886 function Entry_Cancel_Parameter
(Id
: E
) return E
is
889 end Entry_Cancel_Parameter
;
891 function Entry_Component
(Id
: E
) return E
is
896 function Entry_Formal
(Id
: E
) return E
is
901 function Entry_Index_Constant
(Id
: E
) return N
is
903 pragma Assert
(Ekind
(Id
) = E_Entry_Index_Parameter
);
905 end Entry_Index_Constant
;
907 function Entry_Parameters_Type
(Id
: E
) return E
is
910 end Entry_Parameters_Type
;
912 function Enum_Pos_To_Rep
(Id
: E
) return E
is
914 pragma Assert
(Ekind
(Id
) = E_Enumeration_Type
);
918 function Enumeration_Pos
(Id
: E
) return Uint
is
920 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
924 function Enumeration_Rep
(Id
: E
) return U
is
926 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
930 function Enumeration_Rep_Expr
(Id
: E
) return N
is
932 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
934 end Enumeration_Rep_Expr
;
936 function Equivalent_Type
(Id
: E
) return E
is
939 (Ekind
(Id
) = E_Class_Wide_Subtype
or else
940 Ekind
(Id
) = E_Access_Protected_Subprogram_Type
or else
941 Ekind
(Id
) = E_Access_Subprogram_Type
or else
942 Ekind
(Id
) = E_Exception_Type
);
946 function Esize
(Id
: E
) return Uint
is
951 function Exception_Code
(Id
: E
) return Uint
is
953 pragma Assert
(Ekind
(Id
) = E_Exception
);
957 function Extra_Accessibility
(Id
: E
) return E
is
959 pragma Assert
(Is_Formal
(Id
) or else Ekind
(Id
) = E_Variable
);
961 end Extra_Accessibility
;
963 function Extra_Constrained
(Id
: E
) return E
is
965 pragma Assert
(Is_Formal
(Id
) or else Ekind
(Id
) = E_Variable
);
967 end Extra_Constrained
;
969 function Extra_Formal
(Id
: E
) return E
is
974 function Finalization_Chain_Entity
(Id
: E
) return E
is
977 end Finalization_Chain_Entity
;
979 function Finalize_Storage_Only
(Id
: E
) return B
is
981 pragma Assert
(Is_Type
(Id
));
982 return Flag158
(Base_Type
(Id
));
983 end Finalize_Storage_Only
;
985 function First_Entity
(Id
: E
) return E
is
990 function First_Index
(Id
: E
) return N
is
995 function First_Literal
(Id
: E
) return E
is
1000 function First_Optional_Parameter
(Id
: E
) return E
is
1003 (Ekind
(Id
) = E_Function
or else Ekind
(Id
) = E_Procedure
);
1005 end First_Optional_Parameter
;
1007 function First_Private_Entity
(Id
: E
) return E
is
1009 pragma Assert
(Ekind
(Id
) = E_Package
1010 or else Ekind
(Id
) = E_Generic_Package
1011 or else Ekind
(Id
) = E_Protected_Type
1012 or else Ekind
(Id
) = E_Protected_Subtype
1013 or else Ekind
(Id
) = E_Task_Type
1014 or else Ekind
(Id
) = E_Task_Subtype
);
1016 end First_Private_Entity
;
1018 function First_Rep_Item
(Id
: E
) return E
is
1023 function Freeze_Node
(Id
: E
) return N
is
1028 function From_With_Type
(Id
: E
) return B
is
1030 return Flag159
(Id
);
1033 function Full_View
(Id
: E
) return E
is
1035 pragma Assert
(Is_Type
(Id
) or else Ekind
(Id
) = E_Constant
);
1039 function Function_Returns_With_DSP
(Id
: E
) return B
is
1042 (Is_Subprogram
(Id
) or else Ekind
(Id
) = E_Subprogram_Type
);
1043 return Flag169
(Id
);
1044 end Function_Returns_With_DSP
;
1046 function Generic_Homonym
(Id
: E
) return E
is
1048 pragma Assert
(Ekind
(Id
) = E_Generic_Package
);
1050 end Generic_Homonym
;
1052 function Generic_Renamings
(Id
: E
) return L
is
1054 return Elist23
(Id
);
1055 end Generic_Renamings
;
1057 function Handler_Records
(Id
: E
) return S
is
1060 end Handler_Records
;
1062 function Has_Aliased_Components
(Id
: E
) return B
is
1064 return Flag135
(Implementation_Base_Type
(Id
));
1065 end Has_Aliased_Components
;
1067 function Has_Alignment_Clause
(Id
: E
) return B
is
1070 end Has_Alignment_Clause
;
1072 function Has_All_Calls_Remote
(Id
: E
) return B
is
1075 end Has_All_Calls_Remote
;
1077 function Has_Atomic_Components
(Id
: E
) return B
is
1079 return Flag86
(Implementation_Base_Type
(Id
));
1080 end Has_Atomic_Components
;
1082 function Has_Biased_Representation
(Id
: E
) return B
is
1084 return Flag139
(Id
);
1085 end Has_Biased_Representation
;
1087 function Has_Completion
(Id
: E
) return B
is
1092 function Has_Completion_In_Body
(Id
: E
) return B
is
1094 pragma Assert
(Is_Type
(Id
));
1096 end Has_Completion_In_Body
;
1098 function Has_Complex_Representation
(Id
: E
) return B
is
1100 pragma Assert
(Is_Type
(Id
));
1101 return Flag140
(Implementation_Base_Type
(Id
));
1102 end Has_Complex_Representation
;
1104 function Has_Component_Size_Clause
(Id
: E
) return B
is
1106 pragma Assert
(Is_Array_Type
(Id
));
1107 return Flag68
(Implementation_Base_Type
(Id
));
1108 end Has_Component_Size_Clause
;
1110 function Has_Constrained_Partial_View
(Id
: E
) return B
is
1112 pragma Assert
(Is_Type
(Id
));
1113 return Flag187
(Id
);
1114 end Has_Constrained_Partial_View
;
1116 function Has_Controlled_Component
(Id
: E
) return B
is
1118 return Flag43
(Base_Type
(Id
));
1119 end Has_Controlled_Component
;
1121 function Has_Contiguous_Rep
(Id
: E
) return B
is
1123 return Flag181
(Id
);
1124 end Has_Contiguous_Rep
;
1126 function Has_Controlling_Result
(Id
: E
) return B
is
1129 end Has_Controlling_Result
;
1131 function Has_Convention_Pragma
(Id
: E
) return B
is
1133 return Flag119
(Id
);
1134 end Has_Convention_Pragma
;
1136 function Has_Delayed_Freeze
(Id
: E
) return B
is
1138 pragma Assert
(Nkind
(Id
) in N_Entity
);
1140 end Has_Delayed_Freeze
;
1142 function Has_Discriminants
(Id
: E
) return B
is
1144 pragma Assert
(Nkind
(Id
) in N_Entity
);
1146 end Has_Discriminants
;
1148 function Has_Enumeration_Rep_Clause
(Id
: E
) return B
is
1150 pragma Assert
(Is_Enumeration_Type
(Id
));
1152 end Has_Enumeration_Rep_Clause
;
1154 function Has_Exit
(Id
: E
) return B
is
1159 function Has_External_Tag_Rep_Clause
(Id
: E
) return B
is
1161 pragma Assert
(Is_Tagged_Type
(Id
));
1162 return Flag110
(Id
);
1163 end Has_External_Tag_Rep_Clause
;
1165 function Has_Forward_Instantiation
(Id
: E
) return B
is
1167 return Flag175
(Id
);
1168 end Has_Forward_Instantiation
;
1170 function Has_Fully_Qualified_Name
(Id
: E
) return B
is
1172 return Flag173
(Id
);
1173 end Has_Fully_Qualified_Name
;
1175 function Has_Gigi_Rep_Item
(Id
: E
) return B
is
1178 end Has_Gigi_Rep_Item
;
1180 function Has_Homonym
(Id
: E
) return B
is
1185 function Has_Machine_Radix_Clause
(Id
: E
) return B
is
1187 pragma Assert
(Is_Decimal_Fixed_Point_Type
(Id
));
1189 end Has_Machine_Radix_Clause
;
1191 function Has_Master_Entity
(Id
: E
) return B
is
1194 end Has_Master_Entity
;
1196 function Has_Missing_Return
(Id
: E
) return B
is
1199 (Ekind
(Id
) = E_Function
or else Ekind
(Id
) = E_Generic_Function
);
1200 return Flag142
(Id
);
1201 end Has_Missing_Return
;
1203 function Has_Nested_Block_With_Handler
(Id
: E
) return B
is
1205 return Flag101
(Id
);
1206 end Has_Nested_Block_With_Handler
;
1208 function Has_Non_Standard_Rep
(Id
: E
) return B
is
1210 return Flag75
(Implementation_Base_Type
(Id
));
1211 end Has_Non_Standard_Rep
;
1213 function Has_Object_Size_Clause
(Id
: E
) return B
is
1215 pragma Assert
(Is_Type
(Id
));
1216 return Flag172
(Id
);
1217 end Has_Object_Size_Clause
;
1219 function Has_Per_Object_Constraint
(Id
: E
) return B
is
1221 return Flag154
(Id
);
1222 end Has_Per_Object_Constraint
;
1224 function Has_Persistent_BSS
(Id
: E
) return B
is
1226 return Flag188
(Id
);
1227 end Has_Persistent_BSS
;
1229 function Has_Pragma_Controlled
(Id
: E
) return B
is
1231 pragma Assert
(Is_Access_Type
(Id
));
1232 return Flag27
(Implementation_Base_Type
(Id
));
1233 end Has_Pragma_Controlled
;
1235 function Has_Pragma_Elaborate_Body
(Id
: E
) return B
is
1237 return Flag150
(Id
);
1238 end Has_Pragma_Elaborate_Body
;
1240 function Has_Pragma_Inline
(Id
: E
) return B
is
1242 return Flag157
(Id
);
1243 end Has_Pragma_Inline
;
1245 function Has_Pragma_Pack
(Id
: E
) return B
is
1247 pragma Assert
(Is_Record_Type
(Id
) or else Is_Array_Type
(Id
));
1248 return Flag121
(Implementation_Base_Type
(Id
));
1249 end Has_Pragma_Pack
;
1251 function Has_Pragma_Pure_Function
(Id
: E
) return B
is
1253 pragma Assert
(Is_Subprogram
(Id
));
1254 return Flag179
(Id
);
1255 end Has_Pragma_Pure_Function
;
1257 function Has_Pragma_Unreferenced
(Id
: E
) return B
is
1259 return Flag180
(Id
);
1260 end Has_Pragma_Unreferenced
;
1262 function Has_Primitive_Operations
(Id
: E
) return B
is
1264 pragma Assert
(Is_Type
(Id
));
1265 return Flag120
(Base_Type
(Id
));
1266 end Has_Primitive_Operations
;
1268 function Has_Private_Declaration
(Id
: E
) return B
is
1270 return Flag155
(Id
);
1271 end Has_Private_Declaration
;
1273 function Has_Qualified_Name
(Id
: E
) return B
is
1275 return Flag161
(Id
);
1276 end Has_Qualified_Name
;
1278 function Has_Record_Rep_Clause
(Id
: E
) return B
is
1280 pragma Assert
(Is_Record_Type
(Id
));
1281 return Flag65
(Implementation_Base_Type
(Id
));
1282 end Has_Record_Rep_Clause
;
1284 function Has_Recursive_Call
(Id
: E
) return B
is
1286 pragma Assert
(Is_Subprogram
(Id
));
1287 return Flag143
(Id
);
1288 end Has_Recursive_Call
;
1290 function Has_Size_Clause
(Id
: E
) return B
is
1293 end Has_Size_Clause
;
1295 function Has_Small_Clause
(Id
: E
) return B
is
1298 end Has_Small_Clause
;
1300 function Has_Specified_Layout
(Id
: E
) return B
is
1302 pragma Assert
(Is_Type
(Id
));
1303 return Flag100
(Implementation_Base_Type
(Id
));
1304 end Has_Specified_Layout
;
1306 function Has_Specified_Stream_Input
(Id
: E
) return B
is
1308 pragma Assert
(Is_Type
(Id
));
1309 return Flag190
(Id
);
1310 end Has_Specified_Stream_Input
;
1312 function Has_Specified_Stream_Output
(Id
: E
) return B
is
1314 pragma Assert
(Is_Type
(Id
));
1315 return Flag191
(Id
);
1316 end Has_Specified_Stream_Output
;
1318 function Has_Specified_Stream_Read
(Id
: E
) return B
is
1320 pragma Assert
(Is_Type
(Id
));
1321 return Flag192
(Id
);
1322 end Has_Specified_Stream_Read
;
1324 function Has_Specified_Stream_Write
(Id
: E
) return B
is
1326 pragma Assert
(Is_Type
(Id
));
1327 return Flag193
(Id
);
1328 end Has_Specified_Stream_Write
;
1330 function Has_Storage_Size_Clause
(Id
: E
) return B
is
1332 pragma Assert
(Is_Access_Type
(Id
) or else Is_Task_Type
(Id
));
1333 return Flag23
(Implementation_Base_Type
(Id
));
1334 end Has_Storage_Size_Clause
;
1336 function Has_Stream_Size_Clause
(Id
: E
) return B
is
1338 pragma Assert
(Is_Elementary_Type
(Id
));
1339 return Flag184
(Id
);
1340 end Has_Stream_Size_Clause
;
1342 function Has_Subprogram_Descriptor
(Id
: E
) return B
is
1345 end Has_Subprogram_Descriptor
;
1347 function Has_Task
(Id
: E
) return B
is
1349 return Flag30
(Base_Type
(Id
));
1352 function Has_Unchecked_Union
(Id
: E
) return B
is
1354 return Flag123
(Base_Type
(Id
));
1355 end Has_Unchecked_Union
;
1357 function Has_Unknown_Discriminants
(Id
: E
) return B
is
1359 pragma Assert
(Is_Type
(Id
));
1361 end Has_Unknown_Discriminants
;
1363 function Has_Volatile_Components
(Id
: E
) return B
is
1365 return Flag87
(Implementation_Base_Type
(Id
));
1366 end Has_Volatile_Components
;
1368 function Has_Xref_Entry
(Id
: E
) return B
is
1370 return Flag182
(Implementation_Base_Type
(Id
));
1373 function Hiding_Loop_Variable
(Id
: E
) return E
is
1375 pragma Assert
(Ekind
(Id
) = E_Variable
);
1377 end Hiding_Loop_Variable
;
1379 function Homonym
(Id
: E
) return E
is
1384 function In_Package_Body
(Id
: E
) return B
is
1387 end In_Package_Body
;
1389 function In_Private_Part
(Id
: E
) return B
is
1392 end In_Private_Part
;
1394 function In_Use
(Id
: E
) return B
is
1396 pragma Assert
(Nkind
(Id
) in N_Entity
);
1400 function Inner_Instances
(Id
: E
) return L
is
1402 return Elist23
(Id
);
1403 end Inner_Instances
;
1405 function Interface_Name
(Id
: E
) return N
is
1410 function Is_Abstract
(Id
: E
) return B
is
1415 function Is_Local_Anonymous_Access
(Id
: E
) return B
is
1417 pragma Assert
(Is_Access_Type
(Id
));
1418 return Flag194
(Id
);
1419 end Is_Local_Anonymous_Access
;
1421 function Is_Access_Constant
(Id
: E
) return B
is
1423 pragma Assert
(Is_Access_Type
(Id
));
1425 end Is_Access_Constant
;
1427 function Is_Ada_2005
(Id
: E
) return B
is
1429 return Flag185
(Id
);
1432 function Is_Aliased
(Id
: E
) return B
is
1434 pragma Assert
(Nkind
(Id
) in N_Entity
);
1438 function Is_AST_Entry
(Id
: E
) return B
is
1440 pragma Assert
(Is_Entry
(Id
));
1441 return Flag132
(Id
);
1444 function Is_Asynchronous
(Id
: E
) return B
is
1447 (Ekind
(Id
) = E_Procedure
or else Is_Type
(Id
));
1449 end Is_Asynchronous
;
1451 function Is_Atomic
(Id
: E
) return B
is
1456 function Is_Bit_Packed_Array
(Id
: E
) return B
is
1458 return Flag122
(Implementation_Base_Type
(Id
));
1459 end Is_Bit_Packed_Array
;
1461 function Is_Called
(Id
: E
) return B
is
1464 (Ekind
(Id
) = E_Procedure
or else Ekind
(Id
) = E_Function
);
1465 return Flag102
(Id
);
1468 function Is_Character_Type
(Id
: E
) return B
is
1471 end Is_Character_Type
;
1473 function Is_Child_Unit
(Id
: E
) return B
is
1478 function Is_Class_Wide_Equivalent_Type
(Id
: E
) return B
is
1481 end Is_Class_Wide_Equivalent_Type
;
1483 function Is_Compilation_Unit
(Id
: E
) return B
is
1485 return Flag149
(Id
);
1486 end Is_Compilation_Unit
;
1488 function Is_Completely_Hidden
(Id
: E
) return B
is
1490 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
1491 return Flag103
(Id
);
1492 end Is_Completely_Hidden
;
1494 function Is_Constr_Subt_For_U_Nominal
(Id
: E
) return B
is
1497 end Is_Constr_Subt_For_U_Nominal
;
1499 function Is_Constr_Subt_For_UN_Aliased
(Id
: E
) return B
is
1501 return Flag141
(Id
);
1502 end Is_Constr_Subt_For_UN_Aliased
;
1504 function Is_Constrained
(Id
: E
) return B
is
1506 pragma Assert
(Nkind
(Id
) in N_Entity
);
1510 function Is_Constructor
(Id
: E
) return B
is
1515 function Is_Controlled
(Id
: E
) return B
is
1517 return Flag42
(Base_Type
(Id
));
1520 function Is_Controlling_Formal
(Id
: E
) return B
is
1522 pragma Assert
(Is_Formal
(Id
));
1524 end Is_Controlling_Formal
;
1526 function Is_CPP_Class
(Id
: E
) return B
is
1531 function Is_Discrim_SO_Function
(Id
: E
) return B
is
1533 return Flag176
(Id
);
1534 end Is_Discrim_SO_Function
;
1536 function Is_Dispatching_Operation
(Id
: E
) return B
is
1538 pragma Assert
(Nkind
(Id
) in N_Entity
);
1540 end Is_Dispatching_Operation
;
1542 function Is_Eliminated
(Id
: E
) return B
is
1544 return Flag124
(Id
);
1547 function Is_Entry_Formal
(Id
: E
) return B
is
1550 end Is_Entry_Formal
;
1552 function Is_Exported
(Id
: E
) return B
is
1557 function Is_First_Subtype
(Id
: E
) return B
is
1560 end Is_First_Subtype
;
1562 function Is_For_Access_Subtype
(Id
: E
) return B
is
1565 (Ekind
(Id
) = E_Record_Subtype
1567 Ekind
(Id
) = E_Private_Subtype
);
1568 return Flag118
(Id
);
1569 end Is_For_Access_Subtype
;
1571 function Is_Formal_Subprogram
(Id
: E
) return B
is
1573 return Flag111
(Id
);
1574 end Is_Formal_Subprogram
;
1576 function Is_Frozen
(Id
: E
) return B
is
1581 function Is_Generic_Actual_Type
(Id
: E
) return B
is
1583 pragma Assert
(Is_Type
(Id
));
1585 end Is_Generic_Actual_Type
;
1587 function Is_Generic_Instance
(Id
: E
) return B
is
1589 return Flag130
(Id
);
1590 end Is_Generic_Instance
;
1592 function Is_Generic_Type
(Id
: E
) return B
is
1594 pragma Assert
(Nkind
(Id
) in N_Entity
);
1596 end Is_Generic_Type
;
1598 function Is_Hidden
(Id
: E
) return B
is
1603 function Is_Hidden_Open_Scope
(Id
: E
) return B
is
1605 return Flag171
(Id
);
1606 end Is_Hidden_Open_Scope
;
1608 function Is_Immediately_Visible
(Id
: E
) return B
is
1610 pragma Assert
(Nkind
(Id
) in N_Entity
);
1612 end Is_Immediately_Visible
;
1614 function Is_Imported
(Id
: E
) return B
is
1619 function Is_Inlined
(Id
: E
) return B
is
1624 function Is_Interface
(Id
: E
) return B
is
1626 return Flag186
(Id
);
1629 function Is_Instantiated
(Id
: E
) return B
is
1631 return Flag126
(Id
);
1632 end Is_Instantiated
;
1634 function Is_Internal
(Id
: E
) return B
is
1636 pragma Assert
(Nkind
(Id
) in N_Entity
);
1640 function Is_Interrupt_Handler
(Id
: E
) return B
is
1642 pragma Assert
(Nkind
(Id
) in N_Entity
);
1644 end Is_Interrupt_Handler
;
1646 function Is_Intrinsic_Subprogram
(Id
: E
) return B
is
1649 end Is_Intrinsic_Subprogram
;
1651 function Is_Itype
(Id
: E
) return B
is
1656 function Is_Known_Non_Null
(Id
: E
) return B
is
1659 end Is_Known_Non_Null
;
1661 function Is_Known_Valid
(Id
: E
) return B
is
1663 return Flag170
(Id
);
1666 function Is_Limited_Composite
(Id
: E
) return B
is
1668 return Flag106
(Id
);
1669 end Is_Limited_Composite
;
1671 function Is_Limited_Record
(Id
: E
) return B
is
1674 end Is_Limited_Record
;
1676 function Is_Machine_Code_Subprogram
(Id
: E
) return B
is
1678 pragma Assert
(Is_Subprogram
(Id
));
1679 return Flag137
(Id
);
1680 end Is_Machine_Code_Subprogram
;
1682 function Is_Non_Static_Subtype
(Id
: E
) return B
is
1684 pragma Assert
(Is_Type
(Id
));
1685 return Flag109
(Id
);
1686 end Is_Non_Static_Subtype
;
1688 function Is_Null_Init_Proc
(Id
: E
) return B
is
1690 pragma Assert
(Ekind
(Id
) = E_Procedure
);
1691 return Flag178
(Id
);
1692 end Is_Null_Init_Proc
;
1694 function Is_Obsolescent
(Id
: E
) return B
is
1696 return Flag153
(Id
);
1699 function Is_Optional_Parameter
(Id
: E
) return B
is
1701 pragma Assert
(Is_Formal
(Id
));
1702 return Flag134
(Id
);
1703 end Is_Optional_Parameter
;
1705 function Is_Overriding_Operation
(Id
: E
) return B
is
1707 pragma Assert
(Is_Subprogram
(Id
));
1709 end Is_Overriding_Operation
;
1711 function Is_Package_Body_Entity
(Id
: E
) return B
is
1713 return Flag160
(Id
);
1714 end Is_Package_Body_Entity
;
1716 function Is_Packed
(Id
: E
) return B
is
1718 return Flag51
(Implementation_Base_Type
(Id
));
1721 function Is_Packed_Array_Type
(Id
: E
) return B
is
1723 return Flag138
(Id
);
1724 end Is_Packed_Array_Type
;
1726 function Is_Potentially_Use_Visible
(Id
: E
) return B
is
1728 pragma Assert
(Nkind
(Id
) in N_Entity
);
1730 end Is_Potentially_Use_Visible
;
1732 function Is_Preelaborated
(Id
: E
) return B
is
1735 end Is_Preelaborated
;
1737 function Is_Private_Composite
(Id
: E
) return B
is
1739 pragma Assert
(Is_Type
(Id
));
1740 return Flag107
(Id
);
1741 end Is_Private_Composite
;
1743 function Is_Private_Descendant
(Id
: E
) return B
is
1746 end Is_Private_Descendant
;
1748 function Is_Public
(Id
: E
) return B
is
1750 pragma Assert
(Nkind
(Id
) in N_Entity
);
1754 function Is_Pure
(Id
: E
) return B
is
1759 function Is_Pure_Unit_Access_Type
(Id
: E
) return B
is
1761 pragma Assert
(Is_Access_Type
(Id
));
1762 return Flag189
(Id
);
1763 end Is_Pure_Unit_Access_Type
;
1765 function Is_Remote_Call_Interface
(Id
: E
) return B
is
1768 end Is_Remote_Call_Interface
;
1770 function Is_Remote_Types
(Id
: E
) return B
is
1773 end Is_Remote_Types
;
1775 function Is_Renaming_Of_Object
(Id
: E
) return B
is
1777 return Flag112
(Id
);
1778 end Is_Renaming_Of_Object
;
1780 function Is_Shared_Passive
(Id
: E
) return B
is
1783 end Is_Shared_Passive
;
1785 function Is_Statically_Allocated
(Id
: E
) return B
is
1788 end Is_Statically_Allocated
;
1790 function Is_Tag
(Id
: E
) return B
is
1792 pragma Assert
(Nkind
(Id
) in N_Entity
);
1796 function Is_Tagged_Type
(Id
: E
) return B
is
1801 function Is_Thread_Body
(Id
: E
) return B
is
1806 function Is_True_Constant
(Id
: E
) return B
is
1808 return Flag163
(Id
);
1809 end Is_True_Constant
;
1811 function Is_Unchecked_Union
(Id
: E
) return B
is
1813 return Flag117
(Id
);
1814 end Is_Unchecked_Union
;
1816 function Is_Unsigned_Type
(Id
: E
) return B
is
1818 pragma Assert
(Is_Type
(Id
));
1819 return Flag144
(Id
);
1820 end Is_Unsigned_Type
;
1822 function Is_Valued_Procedure
(Id
: E
) return B
is
1824 pragma Assert
(Ekind
(Id
) = E_Procedure
);
1825 return Flag127
(Id
);
1826 end Is_Valued_Procedure
;
1828 function Is_Visible_Child_Unit
(Id
: E
) return B
is
1830 pragma Assert
(Is_Child_Unit
(Id
));
1831 return Flag116
(Id
);
1832 end Is_Visible_Child_Unit
;
1834 function Is_VMS_Exception
(Id
: E
) return B
is
1836 return Flag133
(Id
);
1837 end Is_VMS_Exception
;
1839 function Is_Volatile
(Id
: E
) return B
is
1841 pragma Assert
(Nkind
(Id
) in N_Entity
);
1842 if Is_Type
(Id
) then
1843 return Flag16
(Base_Type
(Id
));
1849 function Kill_Elaboration_Checks
(Id
: E
) return B
is
1852 end Kill_Elaboration_Checks
;
1854 function Kill_Range_Checks
(Id
: E
) return B
is
1857 end Kill_Range_Checks
;
1859 function Kill_Tag_Checks
(Id
: E
) return B
is
1862 end Kill_Tag_Checks
;
1864 function Last_Entity
(Id
: E
) return E
is
1869 function Limited_View
(Id
: E
) return E
is
1871 pragma Assert
(Ekind
(Id
) = E_Package
);
1875 function Lit_Indexes
(Id
: E
) return E
is
1877 pragma Assert
(Is_Enumeration_Type
(Id
));
1881 function Lit_Strings
(Id
: E
) return E
is
1883 pragma Assert
(Is_Enumeration_Type
(Id
));
1887 function Machine_Radix_10
(Id
: E
) return B
is
1889 pragma Assert
(Is_Decimal_Fixed_Point_Type
(Id
));
1891 end Machine_Radix_10
;
1893 function Master_Id
(Id
: E
) return E
is
1898 function Materialize_Entity
(Id
: E
) return B
is
1900 return Flag168
(Id
);
1901 end Materialize_Entity
;
1903 function Mechanism
(Id
: E
) return M
is
1905 pragma Assert
(Ekind
(Id
) = E_Function
or else Is_Formal
(Id
));
1906 return UI_To_Int
(Uint8
(Id
));
1909 function Modulus
(Id
: E
) return Uint
is
1911 pragma Assert
(Is_Modular_Integer_Type
(Id
));
1912 return Uint17
(Base_Type
(Id
));
1915 function Must_Be_On_Byte_Boundary
(Id
: E
) return B
is
1917 pragma Assert
(Is_Type
(Id
));
1918 return Flag183
(Id
);
1919 end Must_Be_On_Byte_Boundary
;
1921 function Needs_Debug_Info
(Id
: E
) return B
is
1923 return Flag147
(Id
);
1924 end Needs_Debug_Info
;
1926 function Needs_No_Actuals
(Id
: E
) return B
is
1929 (Is_Overloadable
(Id
)
1930 or else Ekind
(Id
) = E_Subprogram_Type
1931 or else Ekind
(Id
) = E_Entry_Family
);
1933 end Needs_No_Actuals
;
1935 function Never_Set_In_Source
(Id
: E
) return B
is
1937 return Flag115
(Id
);
1938 end Never_Set_In_Source
;
1940 function Next_Inlined_Subprogram
(Id
: E
) return E
is
1943 end Next_Inlined_Subprogram
;
1945 function No_Pool_Assigned
(Id
: E
) return B
is
1947 pragma Assert
(Is_Access_Type
(Id
));
1948 return Flag131
(Root_Type
(Id
));
1949 end No_Pool_Assigned
;
1951 function No_Return
(Id
: E
) return B
is
1955 or else Ekind
(Id
) = E_Procedure
1956 or else Ekind
(Id
) = E_Generic_Procedure
);
1957 return Flag113
(Id
);
1960 function No_Strict_Aliasing
(Id
: E
) return B
is
1962 pragma Assert
(Is_Access_Type
(Id
));
1963 return Flag136
(Base_Type
(Id
));
1964 end No_Strict_Aliasing
;
1966 function Non_Binary_Modulus
(Id
: E
) return B
is
1968 pragma Assert
(Is_Modular_Integer_Type
(Id
));
1969 return Flag58
(Base_Type
(Id
));
1970 end Non_Binary_Modulus
;
1972 function Non_Limited_View
(Id
: E
) return E
is
1974 pragma Assert
(False
1975 or else Ekind
(Id
) = E_Incomplete_Type
);
1977 end Non_Limited_View
;
1979 function Nonzero_Is_True
(Id
: E
) return B
is
1981 pragma Assert
(Root_Type
(Id
) = Standard_Boolean
);
1982 return Flag162
(Base_Type
(Id
));
1983 end Nonzero_Is_True
;
1985 function Normalized_First_Bit
(Id
: E
) return U
is
1988 (Ekind
(Id
) = E_Component
or else Ekind
(Id
) = E_Discriminant
);
1990 end Normalized_First_Bit
;
1992 function Normalized_Position
(Id
: E
) return U
is
1995 (Ekind
(Id
) = E_Component
or else Ekind
(Id
) = E_Discriminant
);
1997 end Normalized_Position
;
1999 function Normalized_Position_Max
(Id
: E
) return U
is
2002 (Ekind
(Id
) = E_Component
or else Ekind
(Id
) = E_Discriminant
);
2004 end Normalized_Position_Max
;
2006 function Object_Ref
(Id
: E
) return E
is
2008 pragma Assert
(Ekind
(Id
) = E_Protected_Body
);
2012 function Obsolescent_Warning
(Id
: E
) return N
is
2014 pragma Assert
(Is_Subprogram
(Id
));
2016 end Obsolescent_Warning
;
2018 function Original_Access_Type
(Id
: E
) return E
is
2021 (Ekind
(Id
) = E_Access_Subprogram_Type
2022 or else Ekind
(Id
) = E_Access_Protected_Subprogram_Type
);
2024 end Original_Access_Type
;
2026 function Original_Array_Type
(Id
: E
) return E
is
2028 pragma Assert
(Is_Array_Type
(Id
) or else Is_Modular_Integer_Type
(Id
));
2030 end Original_Array_Type
;
2032 function Original_Record_Component
(Id
: E
) return E
is
2035 (Ekind
(Id
) = E_Void
2036 or else Ekind
(Id
) = E_Component
2037 or else Ekind
(Id
) = E_Discriminant
);
2039 end Original_Record_Component
;
2041 function Packed_Array_Type
(Id
: E
) return E
is
2043 pragma Assert
(Is_Array_Type
(Id
));
2045 end Packed_Array_Type
;
2047 function Parent_Subtype
(Id
: E
) return E
is
2049 pragma Assert
(Ekind
(Id
) = E_Record_Type
);
2053 function Primitive_Operations
(Id
: E
) return L
is
2055 pragma Assert
(Is_Tagged_Type
(Id
));
2056 return Elist15
(Id
);
2057 end Primitive_Operations
;
2059 function Prival
(Id
: E
) return E
is
2061 pragma Assert
(Is_Protected_Private
(Id
));
2065 function Privals_Chain
(Id
: E
) return L
is
2067 pragma Assert
(Is_Overloadable
(Id
)
2068 or else Ekind
(Id
) = E_Entry_Family
);
2069 return Elist23
(Id
);
2072 function Private_Dependents
(Id
: E
) return L
is
2074 pragma Assert
(Is_Incomplete_Or_Private_Type
(Id
));
2075 return Elist18
(Id
);
2076 end Private_Dependents
;
2078 function Private_View
(Id
: E
) return N
is
2080 pragma Assert
(Is_Private_Type
(Id
));
2084 function Protected_Body_Subprogram
(Id
: E
) return E
is
2086 pragma Assert
(Is_Subprogram
(Id
) or else Is_Entry
(Id
));
2088 end Protected_Body_Subprogram
;
2090 function Protected_Formal
(Id
: E
) return E
is
2092 pragma Assert
(Is_Formal
(Id
));
2094 end Protected_Formal
;
2096 function Protected_Operation
(Id
: E
) return N
is
2098 pragma Assert
(Is_Protected_Private
(Id
));
2100 end Protected_Operation
;
2102 function Reachable
(Id
: E
) return B
is
2107 function Referenced
(Id
: E
) return B
is
2109 return Flag156
(Id
);
2112 function Referenced_As_LHS
(Id
: E
) return B
is
2115 end Referenced_As_LHS
;
2117 function Referenced_Object
(Id
: E
) return N
is
2119 pragma Assert
(Is_Type
(Id
));
2121 end Referenced_Object
;
2123 function Register_Exception_Call
(Id
: E
) return N
is
2125 pragma Assert
(Ekind
(Id
) = E_Exception
);
2127 end Register_Exception_Call
;
2129 function Related_Array_Object
(Id
: E
) return E
is
2131 pragma Assert
(Is_Array_Type
(Id
));
2133 end Related_Array_Object
;
2135 function Related_Instance
(Id
: E
) return E
is
2138 (Ekind
(Id
) = E_Package
or else Ekind
(Id
) = E_Package_Body
);
2140 end Related_Instance
;
2142 function Renamed_Entity
(Id
: E
) return N
is
2147 function Renamed_Object
(Id
: E
) return N
is
2152 function Renaming_Map
(Id
: E
) return U
is
2157 function Return_Present
(Id
: E
) return B
is
2162 function Returns_By_Ref
(Id
: E
) return B
is
2167 function Reverse_Bit_Order
(Id
: E
) return B
is
2169 pragma Assert
(Is_Record_Type
(Id
));
2170 return Flag164
(Base_Type
(Id
));
2171 end Reverse_Bit_Order
;
2173 function RM_Size
(Id
: E
) return U
is
2175 pragma Assert
(Is_Type
(Id
));
2179 function Scalar_Range
(Id
: E
) return N
is
2184 function Scale_Value
(Id
: E
) return U
is
2189 function Scope_Depth_Value
(Id
: E
) return U
is
2192 end Scope_Depth_Value
;
2194 function Sec_Stack_Needed_For_Return
(Id
: E
) return B
is
2196 return Flag167
(Id
);
2197 end Sec_Stack_Needed_For_Return
;
2199 function Shadow_Entities
(Id
: E
) return S
is
2202 (Ekind
(Id
) = E_Package
or else Ekind
(Id
) = E_Generic_Package
);
2204 end Shadow_Entities
;
2206 function Shared_Var_Assign_Proc
(Id
: E
) return E
is
2208 pragma Assert
(Ekind
(Id
) = E_Variable
);
2210 end Shared_Var_Assign_Proc
;
2212 function Shared_Var_Read_Proc
(Id
: E
) return E
is
2214 pragma Assert
(Ekind
(Id
) = E_Variable
);
2216 end Shared_Var_Read_Proc
;
2218 function Size_Check_Code
(Id
: E
) return N
is
2220 pragma Assert
(Ekind
(Id
) = E_Constant
or else Ekind
(Id
) = E_Variable
);
2222 end Size_Check_Code
;
2224 function Size_Depends_On_Discriminant
(Id
: E
) return B
is
2226 return Flag177
(Id
);
2227 end Size_Depends_On_Discriminant
;
2229 function Size_Known_At_Compile_Time
(Id
: E
) return B
is
2232 end Size_Known_At_Compile_Time
;
2234 function Small_Value
(Id
: E
) return R
is
2236 pragma Assert
(Is_Fixed_Point_Type
(Id
));
2237 return Ureal21
(Id
);
2240 function Spec_Entity
(Id
: E
) return E
is
2243 (Ekind
(Id
) = E_Package_Body
or else Is_Formal
(Id
));
2247 function Storage_Size_Variable
(Id
: E
) return E
is
2249 pragma Assert
(Is_Access_Type
(Id
) or else Is_Task_Type
(Id
));
2250 return Node15
(Implementation_Base_Type
(Id
));
2251 end Storage_Size_Variable
;
2253 function Stored_Constraint
(Id
: E
) return L
is
2256 (Is_Composite_Type
(Id
) and then not Is_Array_Type
(Id
));
2257 return Elist23
(Id
);
2258 end Stored_Constraint
;
2260 function Strict_Alignment
(Id
: E
) return B
is
2262 return Flag145
(Implementation_Base_Type
(Id
));
2263 end Strict_Alignment
;
2265 function String_Literal_Length
(Id
: E
) return U
is
2268 end String_Literal_Length
;
2270 function String_Literal_Low_Bound
(Id
: E
) return N
is
2273 end String_Literal_Low_Bound
;
2275 function Suppress_Elaboration_Warnings
(Id
: E
) return B
is
2277 return Flag148
(Id
);
2278 end Suppress_Elaboration_Warnings
;
2280 function Suppress_Init_Proc
(Id
: E
) return B
is
2282 return Flag105
(Base_Type
(Id
));
2283 end Suppress_Init_Proc
;
2285 function Suppress_Style_Checks
(Id
: E
) return B
is
2287 return Flag165
(Id
);
2288 end Suppress_Style_Checks
;
2290 function Task_Body_Procedure
(Id
: E
) return N
is
2292 pragma Assert
(Ekind
(Id
) = E_Task_Type
2293 or else Ekind
(Id
) = E_Task_Subtype
);
2295 end Task_Body_Procedure
;
2297 function Treat_As_Volatile
(Id
: E
) return B
is
2300 end Treat_As_Volatile
;
2302 function Underlying_Full_View
(Id
: E
) return E
is
2304 pragma Assert
(Ekind
(Id
) in Private_Kind
);
2306 end Underlying_Full_View
;
2308 function Unset_Reference
(Id
: E
) return N
is
2311 end Unset_Reference
;
2313 function Uses_Sec_Stack
(Id
: E
) return B
is
2318 function Vax_Float
(Id
: E
) return B
is
2320 return Flag151
(Base_Type
(Id
));
2323 function Warnings_Off
(Id
: E
) return B
is
2328 ------------------------------
2329 -- Classification Functions --
2330 ------------------------------
2332 function Is_Access_Type
(Id
: E
) return B
is
2334 return Ekind
(Id
) in Access_Kind
;
2337 function Is_Array_Type
(Id
: E
) return B
is
2339 return Ekind
(Id
) in Array_Kind
;
2342 function Is_Class_Wide_Type
(Id
: E
) return B
is
2344 return Ekind
(Id
) in Class_Wide_Kind
;
2345 end Is_Class_Wide_Type
;
2347 function Is_Composite_Type
(Id
: E
) return B
is
2349 return Ekind
(Id
) in Composite_Kind
;
2350 end Is_Composite_Type
;
2352 function Is_Concurrent_Body
(Id
: E
) return B
is
2354 return Ekind
(Id
) in
2355 Concurrent_Body_Kind
;
2356 end Is_Concurrent_Body
;
2358 function Is_Concurrent_Record_Type
(Id
: E
) return B
is
2361 end Is_Concurrent_Record_Type
;
2363 function Is_Concurrent_Type
(Id
: E
) return B
is
2365 return Ekind
(Id
) in Concurrent_Kind
;
2366 end Is_Concurrent_Type
;
2368 function Is_Decimal_Fixed_Point_Type
(Id
: E
) return B
is
2370 return Ekind
(Id
) in
2371 Decimal_Fixed_Point_Kind
;
2372 end Is_Decimal_Fixed_Point_Type
;
2374 function Is_Digits_Type
(Id
: E
) return B
is
2376 return Ekind
(Id
) in Digits_Kind
;
2379 function Is_Discrete_Or_Fixed_Point_Type
(Id
: E
) return B
is
2381 return Ekind
(Id
) in Discrete_Or_Fixed_Point_Kind
;
2382 end Is_Discrete_Or_Fixed_Point_Type
;
2384 function Is_Discrete_Type
(Id
: E
) return B
is
2386 return Ekind
(Id
) in Discrete_Kind
;
2387 end Is_Discrete_Type
;
2389 function Is_Elementary_Type
(Id
: E
) return B
is
2391 return Ekind
(Id
) in Elementary_Kind
;
2392 end Is_Elementary_Type
;
2394 function Is_Entry
(Id
: E
) return B
is
2396 return Ekind
(Id
) in Entry_Kind
;
2399 function Is_Enumeration_Type
(Id
: E
) return B
is
2401 return Ekind
(Id
) in
2403 end Is_Enumeration_Type
;
2405 function Is_Fixed_Point_Type
(Id
: E
) return B
is
2407 return Ekind
(Id
) in
2409 end Is_Fixed_Point_Type
;
2411 function Is_Floating_Point_Type
(Id
: E
) return B
is
2413 return Ekind
(Id
) in Float_Kind
;
2414 end Is_Floating_Point_Type
;
2416 function Is_Formal
(Id
: E
) return B
is
2418 return Ekind
(Id
) in Formal_Kind
;
2421 function Is_Generic_Subprogram
(Id
: E
) return B
is
2423 return Ekind
(Id
) in Generic_Subprogram_Kind
;
2424 end Is_Generic_Subprogram
;
2426 function Is_Generic_Unit
(Id
: E
) return B
is
2428 return Ekind
(Id
) in Generic_Unit_Kind
;
2429 end Is_Generic_Unit
;
2431 function Is_Incomplete_Or_Private_Type
(Id
: E
) return B
is
2433 return Ekind
(Id
) in
2434 Incomplete_Or_Private_Kind
;
2435 end Is_Incomplete_Or_Private_Type
;
2437 function Is_Integer_Type
(Id
: E
) return B
is
2439 return Ekind
(Id
) in Integer_Kind
;
2440 end Is_Integer_Type
;
2442 function Is_Modular_Integer_Type
(Id
: E
) return B
is
2444 return Ekind
(Id
) in
2445 Modular_Integer_Kind
;
2446 end Is_Modular_Integer_Type
;
2448 function Is_Named_Number
(Id
: E
) return B
is
2450 return Ekind
(Id
) in Named_Kind
;
2451 end Is_Named_Number
;
2453 function Is_Numeric_Type
(Id
: E
) return B
is
2455 return Ekind
(Id
) in Numeric_Kind
;
2456 end Is_Numeric_Type
;
2458 function Is_Object
(Id
: E
) return B
is
2460 return Ekind
(Id
) in Object_Kind
;
2463 function Is_Ordinary_Fixed_Point_Type
(Id
: E
) return B
is
2465 return Ekind
(Id
) in
2466 Ordinary_Fixed_Point_Kind
;
2467 end Is_Ordinary_Fixed_Point_Type
;
2469 function Is_Overloadable
(Id
: E
) return B
is
2471 return Ekind
(Id
) in Overloadable_Kind
;
2472 end Is_Overloadable
;
2474 function Is_Private_Type
(Id
: E
) return B
is
2476 return Ekind
(Id
) in Private_Kind
;
2477 end Is_Private_Type
;
2479 function Is_Protected_Type
(Id
: E
) return B
is
2481 return Ekind
(Id
) in Protected_Kind
;
2482 end Is_Protected_Type
;
2484 function Is_Real_Type
(Id
: E
) return B
is
2486 return Ekind
(Id
) in Real_Kind
;
2489 function Is_Record_Type
(Id
: E
) return B
is
2491 return Ekind
(Id
) in Record_Kind
;
2494 function Is_Scalar_Type
(Id
: E
) return B
is
2496 return Ekind
(Id
) in Scalar_Kind
;
2499 function Is_Signed_Integer_Type
(Id
: E
) return B
is
2501 return Ekind
(Id
) in
2502 Signed_Integer_Kind
;
2503 end Is_Signed_Integer_Type
;
2505 function Is_Subprogram
(Id
: E
) return B
is
2507 return Ekind
(Id
) in Subprogram_Kind
;
2510 function Is_Task_Type
(Id
: E
) return B
is
2512 return Ekind
(Id
) in Task_Kind
;
2515 function Is_Type
(Id
: E
) return B
is
2517 return Ekind
(Id
) in Type_Kind
;
2520 ------------------------------
2521 -- Attribute Set Procedures --
2522 ------------------------------
2524 procedure Set_Abstract_Interfaces
(Id
: E
; V
: L
) is
2527 (Ekind
(Id
) = E_Record_Type
2528 or else Ekind
(Id
) = E_Record_Subtype
2529 or else Ekind
(Id
) = E_Record_Type_With_Private
2530 or else Ekind
(Id
) = E_Record_Subtype_With_Private
2531 or else Ekind
(Id
) = E_Class_Wide_Type
);
2532 Set_Elist24
(Id
, V
);
2533 end Set_Abstract_Interfaces
;
2535 procedure Set_Abstract_Interface_Alias
(Id
: E
; V
: E
) is
2538 (Ekind
(Id
) = E_Procedure
or Ekind
(Id
) = E_Function
);
2540 end Set_Abstract_Interface_Alias
;
2542 procedure Set_Accept_Address
(Id
: E
; V
: L
) is
2544 Set_Elist21
(Id
, V
);
2545 end Set_Accept_Address
;
2547 procedure Set_Access_Disp_Table
(Id
: E
; V
: L
) is
2549 pragma Assert
(Is_Tagged_Type
(Id
) and then Id
= Base_Type
(Id
));
2550 Set_Elist16
(Id
, V
);
2551 end Set_Access_Disp_Table
;
2553 procedure Set_Associated_Final_Chain
(Id
: E
; V
: E
) is
2555 pragma Assert
(Is_Access_Type
(Id
));
2557 end Set_Associated_Final_Chain
;
2559 procedure Set_Associated_Formal_Package
(Id
: E
; V
: E
) is
2562 end Set_Associated_Formal_Package
;
2564 procedure Set_Associated_Node_For_Itype
(Id
: E
; V
: E
) is
2567 end Set_Associated_Node_For_Itype
;
2569 procedure Set_Associated_Storage_Pool
(Id
: E
; V
: E
) is
2571 pragma Assert
(Is_Access_Type
(Id
) and then Id
= Base_Type
(Id
));
2573 end Set_Associated_Storage_Pool
;
2575 procedure Set_Actual_Subtype
(Id
: E
; V
: E
) is
2578 (Ekind
(Id
) = E_Constant
2579 or else Ekind
(Id
) = E_Variable
2580 or else Ekind
(Id
) = E_Generic_In_Out_Parameter
2581 or else Ekind
(Id
) in E_In_Parameter
.. E_In_Out_Parameter
);
2583 end Set_Actual_Subtype
;
2585 procedure Set_Address_Taken
(Id
: E
; V
: B
:= True) is
2587 Set_Flag104
(Id
, V
);
2588 end Set_Address_Taken
;
2590 procedure Set_Alias
(Id
: E
; V
: E
) is
2593 (Is_Overloadable
(Id
) or else Ekind
(Id
) = E_Subprogram_Type
);
2597 procedure Set_Alignment
(Id
: E
; V
: U
) is
2599 pragma Assert
(Is_Type
(Id
)
2600 or else Is_Formal
(Id
)
2601 or else Ekind
(Id
) = E_Loop_Parameter
2602 or else Ekind
(Id
) = E_Constant
2603 or else Ekind
(Id
) = E_Exception
2604 or else Ekind
(Id
) = E_Variable
);
2608 procedure Set_Barrier_Function
(Id
: E
; V
: N
) is
2610 pragma Assert
(Is_Entry
(Id
));
2612 end Set_Barrier_Function
;
2614 procedure Set_Block_Node
(Id
: E
; V
: N
) is
2616 pragma Assert
(Ekind
(Id
) = E_Block
);
2620 procedure Set_Body_Entity
(Id
: E
; V
: E
) is
2623 (Ekind
(Id
) = E_Package
or else Ekind
(Id
) = E_Generic_Package
);
2625 end Set_Body_Entity
;
2627 procedure Set_Body_Needed_For_SAL
(Id
: E
; V
: B
:= True) is
2630 (Ekind
(Id
) = E_Package
2631 or else Is_Subprogram
(Id
)
2632 or else Is_Generic_Unit
(Id
));
2634 end Set_Body_Needed_For_SAL
;
2636 procedure Set_C_Pass_By_Copy
(Id
: E
; V
: B
:= True) is
2638 pragma Assert
(Is_Record_Type
(Id
) and then Id
= Base_Type
(Id
));
2639 Set_Flag125
(Id
, V
);
2640 end Set_C_Pass_By_Copy
;
2642 procedure Set_Can_Never_Be_Null
(Id
: E
; V
: B
:= True) is
2645 end Set_Can_Never_Be_Null
;
2647 procedure Set_Checks_May_Be_Suppressed
(Id
: E
; V
: B
:= True) is
2650 end Set_Checks_May_Be_Suppressed
;
2652 procedure Set_Class_Wide_Type
(Id
: E
; V
: E
) is
2654 pragma Assert
(Is_Type
(Id
));
2656 end Set_Class_Wide_Type
;
2658 procedure Set_Cloned_Subtype
(Id
: E
; V
: E
) is
2661 (Ekind
(Id
) = E_Record_Subtype
2662 or else Ekind
(Id
) = E_Class_Wide_Subtype
);
2664 end Set_Cloned_Subtype
;
2666 procedure Set_Component_Bit_Offset
(Id
: E
; V
: U
) is
2669 (Ekind
(Id
) = E_Component
or else Ekind
(Id
) = E_Discriminant
);
2671 end Set_Component_Bit_Offset
;
2673 procedure Set_Component_Clause
(Id
: E
; V
: N
) is
2676 (Ekind
(Id
) = E_Component
or else Ekind
(Id
) = E_Discriminant
);
2678 end Set_Component_Clause
;
2680 procedure Set_Component_Size
(Id
: E
; V
: U
) is
2682 pragma Assert
(Is_Array_Type
(Id
) and then Id
= Base_Type
(Id
));
2684 end Set_Component_Size
;
2686 procedure Set_Component_Type
(Id
: E
; V
: E
) is
2688 pragma Assert
(Is_Array_Type
(Id
) and then Id
= Base_Type
(Id
));
2690 end Set_Component_Type
;
2692 procedure Set_Corresponding_Concurrent_Type
(Id
: E
; V
: E
) is
2695 (Ekind
(Id
) = E_Record_Type
and then Is_Concurrent_Type
(V
));
2697 end Set_Corresponding_Concurrent_Type
;
2699 procedure Set_Corresponding_Discriminant
(Id
: E
; V
: E
) is
2701 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
2703 end Set_Corresponding_Discriminant
;
2705 procedure Set_Corresponding_Equality
(Id
: E
; V
: E
) is
2708 (Ekind
(Id
) = E_Function
2709 and then not Comes_From_Source
(Id
)
2710 and then Chars
(Id
) = Name_Op_Ne
);
2712 end Set_Corresponding_Equality
;
2714 procedure Set_Corresponding_Record_Type
(Id
: E
; V
: E
) is
2716 pragma Assert
(Is_Concurrent_Type
(Id
));
2718 end Set_Corresponding_Record_Type
;
2720 procedure Set_Corresponding_Remote_Type
(Id
: E
; V
: E
) is
2723 end Set_Corresponding_Remote_Type
;
2725 procedure Set_Current_Value
(Id
: E
; V
: E
) is
2727 pragma Assert
(Ekind
(Id
) in Object_Kind
or else Ekind
(Id
) = E_Void
);
2729 end Set_Current_Value
;
2731 procedure Set_CR_Discriminant
(Id
: E
; V
: E
) is
2734 end Set_CR_Discriminant
;
2736 procedure Set_Debug_Info_Off
(Id
: E
; V
: B
:= True) is
2738 Set_Flag166
(Id
, V
);
2739 end Set_Debug_Info_Off
;
2741 procedure Set_Debug_Renaming_Link
(Id
: E
; V
: E
) is
2744 end Set_Debug_Renaming_Link
;
2746 procedure Set_Default_Expr_Function
(Id
: E
; V
: E
) is
2748 pragma Assert
(Is_Formal
(Id
));
2750 end Set_Default_Expr_Function
;
2752 procedure Set_Default_Expressions_Processed
(Id
: E
; V
: B
:= True) is
2754 Set_Flag108
(Id
, V
);
2755 end Set_Default_Expressions_Processed
;
2757 procedure Set_Default_Value
(Id
: E
; V
: N
) is
2759 pragma Assert
(Is_Formal
(Id
));
2761 end Set_Default_Value
;
2763 procedure Set_Delay_Cleanups
(Id
: E
; V
: B
:= True) is
2767 or else Is_Task_Type
(Id
)
2768 or else Ekind
(Id
) = E_Block
);
2769 Set_Flag114
(Id
, V
);
2770 end Set_Delay_Cleanups
;
2772 procedure Set_Delay_Subprogram_Descriptors
(Id
: E
; V
: B
:= True) is
2776 or else Ekind
(Id
) = E_Package
2777 or else Ekind
(Id
) = E_Package_Body
);
2779 end Set_Delay_Subprogram_Descriptors
;
2781 procedure Set_Delta_Value
(Id
: E
; V
: R
) is
2783 pragma Assert
(Is_Fixed_Point_Type
(Id
));
2784 Set_Ureal18
(Id
, V
);
2785 end Set_Delta_Value
;
2787 procedure Set_Dependent_Instances
(Id
: E
; V
: L
) is
2789 pragma Assert
(Is_Generic_Instance
(Id
));
2791 end Set_Dependent_Instances
;
2793 procedure Set_Depends_On_Private
(Id
: E
; V
: B
:= True) is
2795 pragma Assert
(Nkind
(Id
) in N_Entity
);
2797 end Set_Depends_On_Private
;
2799 procedure Set_Digits_Value
(Id
: E
; V
: U
) is
2802 (Is_Floating_Point_Type
(Id
)
2803 or else Is_Decimal_Fixed_Point_Type
(Id
));
2805 end Set_Digits_Value
;
2807 procedure Set_Directly_Designated_Type
(Id
: E
; V
: E
) is
2810 end Set_Directly_Designated_Type
;
2812 procedure Set_Discard_Names
(Id
: E
; V
: B
:= True) is
2815 end Set_Discard_Names
;
2817 procedure Set_Discriminal
(Id
: E
; V
: E
) is
2819 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
2821 end Set_Discriminal
;
2823 procedure Set_Discriminal_Link
(Id
: E
; V
: E
) is
2826 end Set_Discriminal_Link
;
2828 procedure Set_Discriminant_Checking_Func
(Id
: E
; V
: E
) is
2830 pragma Assert
(Ekind
(Id
) = E_Component
);
2832 end Set_Discriminant_Checking_Func
;
2834 procedure Set_Discriminant_Constraint
(Id
: E
; V
: L
) is
2836 pragma Assert
(Nkind
(Id
) in N_Entity
);
2837 Set_Elist21
(Id
, V
);
2838 end Set_Discriminant_Constraint
;
2840 procedure Set_Discriminant_Default_Value
(Id
: E
; V
: N
) is
2843 end Set_Discriminant_Default_Value
;
2845 procedure Set_Discriminant_Number
(Id
: E
; V
: U
) is
2848 end Set_Discriminant_Number
;
2850 procedure Set_DT_Entry_Count
(Id
: E
; V
: U
) is
2852 pragma Assert
(Ekind
(Id
) = E_Component
);
2854 end Set_DT_Entry_Count
;
2856 procedure Set_DT_Position
(Id
: E
; V
: U
) is
2858 pragma Assert
(Ekind
(Id
) = E_Function
or else Ekind
(Id
) = E_Procedure
);
2860 end Set_DT_Position
;
2862 procedure Set_DTC_Entity
(Id
: E
; V
: E
) is
2865 (Ekind
(Id
) = E_Function
or else Ekind
(Id
) = E_Procedure
);
2869 procedure Set_Elaborate_All_Desirable
(Id
: E
; V
: B
:= True) is
2871 Set_Flag146
(Id
, V
);
2872 end Set_Elaborate_All_Desirable
;
2874 procedure Set_Elaboration_Entity
(Id
: E
; V
: E
) is
2879 Ekind
(Id
) = E_Package
2881 Is_Generic_Unit
(Id
));
2883 end Set_Elaboration_Entity
;
2885 procedure Set_Elaboration_Entity_Required
(Id
: E
; V
: B
:= True) is
2890 Ekind
(Id
) = E_Package
2892 Is_Generic_Unit
(Id
));
2893 Set_Flag174
(Id
, V
);
2894 end Set_Elaboration_Entity_Required
;
2896 procedure Set_Enclosing_Scope
(Id
: E
; V
: E
) is
2899 end Set_Enclosing_Scope
;
2901 procedure Set_Entry_Accepted
(Id
: E
; V
: B
:= True) is
2903 pragma Assert
(Is_Entry
(Id
));
2904 Set_Flag152
(Id
, V
);
2905 end Set_Entry_Accepted
;
2907 procedure Set_Entry_Bodies_Array
(Id
: E
; V
: E
) is
2910 end Set_Entry_Bodies_Array
;
2912 procedure Set_Entry_Cancel_Parameter
(Id
: E
; V
: E
) is
2915 end Set_Entry_Cancel_Parameter
;
2917 procedure Set_Entry_Component
(Id
: E
; V
: E
) is
2920 end Set_Entry_Component
;
2922 procedure Set_Entry_Formal
(Id
: E
; V
: E
) is
2925 end Set_Entry_Formal
;
2927 procedure Set_Entry_Index_Constant
(Id
: E
; V
: E
) is
2929 pragma Assert
(Ekind
(Id
) = E_Entry_Index_Parameter
);
2931 end Set_Entry_Index_Constant
;
2933 procedure Set_Entry_Parameters_Type
(Id
: E
; V
: E
) is
2936 end Set_Entry_Parameters_Type
;
2938 procedure Set_Enum_Pos_To_Rep
(Id
: E
; V
: E
) is
2940 pragma Assert
(Ekind
(Id
) = E_Enumeration_Type
);
2942 end Set_Enum_Pos_To_Rep
;
2944 procedure Set_Enumeration_Pos
(Id
: E
; V
: U
) is
2946 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
2948 end Set_Enumeration_Pos
;
2950 procedure Set_Enumeration_Rep
(Id
: E
; V
: U
) is
2952 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
2954 end Set_Enumeration_Rep
;
2956 procedure Set_Enumeration_Rep_Expr
(Id
: E
; V
: N
) is
2958 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
2960 end Set_Enumeration_Rep_Expr
;
2962 procedure Set_Equivalent_Type
(Id
: E
; V
: E
) is
2965 (Ekind
(Id
) = E_Class_Wide_Type
or else
2966 Ekind
(Id
) = E_Class_Wide_Subtype
or else
2967 Ekind
(Id
) = E_Access_Protected_Subprogram_Type
or else
2968 Ekind
(Id
) = E_Access_Subprogram_Type
or else
2969 Ekind
(Id
) = E_Exception_Type
);
2971 end Set_Equivalent_Type
;
2973 procedure Set_Esize
(Id
: E
; V
: U
) is
2978 procedure Set_Exception_Code
(Id
: E
; V
: U
) is
2980 pragma Assert
(Ekind
(Id
) = E_Exception
);
2982 end Set_Exception_Code
;
2984 procedure Set_Extra_Accessibility
(Id
: E
; V
: E
) is
2986 pragma Assert
(Is_Formal
(Id
) or else Ekind
(Id
) = E_Variable
);
2988 end Set_Extra_Accessibility
;
2990 procedure Set_Extra_Constrained
(Id
: E
; V
: E
) is
2992 pragma Assert
(Is_Formal
(Id
) or else Ekind
(Id
) = E_Variable
);
2994 end Set_Extra_Constrained
;
2996 procedure Set_Extra_Formal
(Id
: E
; V
: E
) is
2999 end Set_Extra_Formal
;
3001 procedure Set_Finalization_Chain_Entity
(Id
: E
; V
: E
) is
3004 end Set_Finalization_Chain_Entity
;
3006 procedure Set_Finalize_Storage_Only
(Id
: E
; V
: B
:= True) is
3008 pragma Assert
(Is_Type
(Id
) and then Id
= Base_Type
(Id
));
3009 Set_Flag158
(Id
, V
);
3010 end Set_Finalize_Storage_Only
;
3012 procedure Set_First_Entity
(Id
: E
; V
: E
) is
3015 end Set_First_Entity
;
3017 procedure Set_First_Index
(Id
: E
; V
: N
) is
3020 end Set_First_Index
;
3022 procedure Set_First_Literal
(Id
: E
; V
: E
) is
3025 end Set_First_Literal
;
3027 procedure Set_First_Optional_Parameter
(Id
: E
; V
: E
) is
3030 (Ekind
(Id
) = E_Function
or else Ekind
(Id
) = E_Procedure
);
3032 end Set_First_Optional_Parameter
;
3034 procedure Set_First_Private_Entity
(Id
: E
; V
: E
) is
3036 pragma Assert
(Ekind
(Id
) = E_Package
3037 or else Ekind
(Id
) = E_Generic_Package
3038 or else Ekind
(Id
) = E_Protected_Type
3039 or else Ekind
(Id
) = E_Protected_Subtype
3040 or else Ekind
(Id
) = E_Task_Type
3041 or else Ekind
(Id
) = E_Task_Subtype
);
3043 end Set_First_Private_Entity
;
3045 procedure Set_First_Rep_Item
(Id
: E
; V
: N
) is
3048 end Set_First_Rep_Item
;
3050 procedure Set_Freeze_Node
(Id
: E
; V
: N
) is
3053 end Set_Freeze_Node
;
3055 procedure Set_From_With_Type
(Id
: E
; V
: B
:= True) is
3059 or else Ekind
(Id
) = E_Package
);
3060 Set_Flag159
(Id
, V
);
3061 end Set_From_With_Type
;
3063 procedure Set_Full_View
(Id
: E
; V
: E
) is
3065 pragma Assert
(Is_Type
(Id
) or else Ekind
(Id
) = E_Constant
);
3069 procedure Set_Function_Returns_With_DSP
(Id
: E
; V
: B
:= True) is
3072 (Is_Subprogram
(Id
) or else Ekind
(Id
) = E_Subprogram_Type
);
3073 Set_Flag169
(Id
, V
);
3074 end Set_Function_Returns_With_DSP
;
3076 procedure Set_Generic_Homonym
(Id
: E
; V
: E
) is
3079 end Set_Generic_Homonym
;
3081 procedure Set_Generic_Renamings
(Id
: E
; V
: L
) is
3083 Set_Elist23
(Id
, V
);
3084 end Set_Generic_Renamings
;
3086 procedure Set_Handler_Records
(Id
: E
; V
: S
) is
3089 end Set_Handler_Records
;
3091 procedure Set_Has_Aliased_Components
(Id
: E
; V
: B
:= True) is
3093 pragma Assert
(Base_Type
(Id
) = Id
);
3094 Set_Flag135
(Id
, V
);
3095 end Set_Has_Aliased_Components
;
3097 procedure Set_Has_Alignment_Clause
(Id
: E
; V
: B
:= True) is
3100 end Set_Has_Alignment_Clause
;
3102 procedure Set_Has_All_Calls_Remote
(Id
: E
; V
: B
:= True) is
3105 end Set_Has_All_Calls_Remote
;
3107 procedure Set_Has_Atomic_Components
(Id
: E
; V
: B
:= True) is
3109 pragma Assert
(not Is_Type
(Id
) or else Base_Type
(Id
) = Id
);
3111 end Set_Has_Atomic_Components
;
3113 procedure Set_Has_Biased_Representation
(Id
: E
; V
: B
:= True) is
3116 ((V
= False) or else (Is_Discrete_Type
(Id
) or Is_Object
(Id
)));
3117 Set_Flag139
(Id
, V
);
3118 end Set_Has_Biased_Representation
;
3120 procedure Set_Has_Completion
(Id
: E
; V
: B
:= True) is
3123 end Set_Has_Completion
;
3125 procedure Set_Has_Completion_In_Body
(Id
: E
; V
: B
:= True) is
3127 pragma Assert
(Ekind
(Id
) = E_Incomplete_Type
);
3129 end Set_Has_Completion_In_Body
;
3131 procedure Set_Has_Complex_Representation
(Id
: E
; V
: B
:= True) is
3133 pragma Assert
(Ekind
(Id
) = E_Record_Type
);
3134 Set_Flag140
(Id
, V
);
3135 end Set_Has_Complex_Representation
;
3137 procedure Set_Has_Component_Size_Clause
(Id
: E
; V
: B
:= True) is
3139 pragma Assert
(Ekind
(Id
) = E_Array_Type
);
3141 end Set_Has_Component_Size_Clause
;
3143 procedure Set_Has_Constrained_Partial_View
(Id
: E
; V
: B
:= True) is
3145 pragma Assert
(Is_Type
(Id
));
3146 Set_Flag187
(Id
, V
);
3147 end Set_Has_Constrained_Partial_View
;
3149 procedure Set_Has_Contiguous_Rep
(Id
: E
; V
: B
:= True) is
3151 Set_Flag181
(Id
, V
);
3152 end Set_Has_Contiguous_Rep
;
3154 procedure Set_Has_Controlled_Component
(Id
: E
; V
: B
:= True) is
3156 pragma Assert
(Base_Type
(Id
) = Id
);
3158 end Set_Has_Controlled_Component
;
3160 procedure Set_Has_Controlling_Result
(Id
: E
; V
: B
:= True) is
3163 end Set_Has_Controlling_Result
;
3165 procedure Set_Has_Convention_Pragma
(Id
: E
; V
: B
:= True) is
3167 Set_Flag119
(Id
, V
);
3168 end Set_Has_Convention_Pragma
;
3170 procedure Set_Has_Delayed_Freeze
(Id
: E
; V
: B
:= True) is
3172 pragma Assert
(Nkind
(Id
) in N_Entity
);
3174 end Set_Has_Delayed_Freeze
;
3176 procedure Set_Has_Discriminants
(Id
: E
; V
: B
:= True) is
3178 pragma Assert
(Nkind
(Id
) in N_Entity
);
3180 end Set_Has_Discriminants
;
3182 procedure Set_Has_Enumeration_Rep_Clause
(Id
: E
; V
: B
:= True) is
3184 pragma Assert
(Is_Enumeration_Type
(Id
));
3186 end Set_Has_Enumeration_Rep_Clause
;
3188 procedure Set_Has_Exit
(Id
: E
; V
: B
:= True) is
3193 procedure Set_Has_External_Tag_Rep_Clause
(Id
: E
; V
: B
:= True) is
3195 pragma Assert
(Is_Tagged_Type
(Id
));
3196 Set_Flag110
(Id
, V
);
3197 end Set_Has_External_Tag_Rep_Clause
;
3199 procedure Set_Has_Forward_Instantiation
(Id
: E
; V
: B
:= True) is
3201 Set_Flag175
(Id
, V
);
3202 end Set_Has_Forward_Instantiation
;
3204 procedure Set_Has_Fully_Qualified_Name
(Id
: E
; V
: B
:= True) is
3206 Set_Flag173
(Id
, V
);
3207 end Set_Has_Fully_Qualified_Name
;
3209 procedure Set_Has_Gigi_Rep_Item
(Id
: E
; V
: B
:= True) is
3212 end Set_Has_Gigi_Rep_Item
;
3214 procedure Set_Has_Homonym
(Id
: E
; V
: B
:= True) is
3217 end Set_Has_Homonym
;
3219 procedure Set_Has_Machine_Radix_Clause
(Id
: E
; V
: B
:= True) is
3221 pragma Assert
(Is_Decimal_Fixed_Point_Type
(Id
));
3223 end Set_Has_Machine_Radix_Clause
;
3225 procedure Set_Has_Master_Entity
(Id
: E
; V
: B
:= True) is
3228 end Set_Has_Master_Entity
;
3230 procedure Set_Has_Missing_Return
(Id
: E
; V
: B
:= True) is
3233 (Ekind
(Id
) = E_Function
or else Ekind
(Id
) = E_Generic_Function
);
3234 Set_Flag142
(Id
, V
);
3235 end Set_Has_Missing_Return
;
3237 procedure Set_Has_Nested_Block_With_Handler
(Id
: E
; V
: B
:= True) is
3239 Set_Flag101
(Id
, V
);
3240 end Set_Has_Nested_Block_With_Handler
;
3242 procedure Set_Has_Non_Standard_Rep
(Id
: E
; V
: B
:= True) is
3244 pragma Assert
(Base_Type
(Id
) = Id
);
3246 end Set_Has_Non_Standard_Rep
;
3248 procedure Set_Has_Object_Size_Clause
(Id
: E
; V
: B
:= True) is
3250 pragma Assert
(Is_Type
(Id
));
3251 Set_Flag172
(Id
, V
);
3252 end Set_Has_Object_Size_Clause
;
3254 procedure Set_Has_Per_Object_Constraint
(Id
: E
; V
: B
:= True) is
3256 Set_Flag154
(Id
, V
);
3257 end Set_Has_Per_Object_Constraint
;
3259 procedure Set_Has_Persistent_BSS
(Id
: E
; V
: B
:= True) is
3261 Set_Flag188
(Id
, V
);
3262 end Set_Has_Persistent_BSS
;
3264 procedure Set_Has_Pragma_Controlled
(Id
: E
; V
: B
:= True) is
3266 pragma Assert
(Is_Access_Type
(Id
));
3267 Set_Flag27
(Base_Type
(Id
), V
);
3268 end Set_Has_Pragma_Controlled
;
3270 procedure Set_Has_Pragma_Elaborate_Body
(Id
: E
; V
: B
:= True) is
3272 Set_Flag150
(Id
, V
);
3273 end Set_Has_Pragma_Elaborate_Body
;
3275 procedure Set_Has_Pragma_Inline
(Id
: E
; V
: B
:= True) is
3277 Set_Flag157
(Id
, V
);
3278 end Set_Has_Pragma_Inline
;
3280 procedure Set_Has_Pragma_Pack
(Id
: E
; V
: B
:= True) is
3282 pragma Assert
(Is_Array_Type
(Id
) or else Is_Record_Type
(Id
));
3283 pragma Assert
(Id
= Base_Type
(Id
));
3284 Set_Flag121
(Id
, V
);
3285 end Set_Has_Pragma_Pack
;
3287 procedure Set_Has_Pragma_Pure_Function
(Id
: E
; V
: B
:= True) is
3289 pragma Assert
(Is_Subprogram
(Id
));
3290 Set_Flag179
(Id
, V
);
3291 end Set_Has_Pragma_Pure_Function
;
3293 procedure Set_Has_Pragma_Unreferenced
(Id
: E
; V
: B
:= True) is
3295 Set_Flag180
(Id
, V
);
3296 end Set_Has_Pragma_Unreferenced
;
3298 procedure Set_Has_Primitive_Operations
(Id
: E
; V
: B
:= True) is
3300 pragma Assert
(Id
= Base_Type
(Id
));
3301 Set_Flag120
(Id
, V
);
3302 end Set_Has_Primitive_Operations
;
3304 procedure Set_Has_Private_Declaration
(Id
: E
; V
: B
:= True) is
3306 Set_Flag155
(Id
, V
);
3307 end Set_Has_Private_Declaration
;
3309 procedure Set_Has_Qualified_Name
(Id
: E
; V
: B
:= True) is
3311 Set_Flag161
(Id
, V
);
3312 end Set_Has_Qualified_Name
;
3314 procedure Set_Has_Record_Rep_Clause
(Id
: E
; V
: B
:= True) is
3316 pragma Assert
(Id
= Base_Type
(Id
));
3318 end Set_Has_Record_Rep_Clause
;
3320 procedure Set_Has_Recursive_Call
(Id
: E
; V
: B
:= True) is
3322 pragma Assert
(Is_Subprogram
(Id
));
3323 Set_Flag143
(Id
, V
);
3324 end Set_Has_Recursive_Call
;
3326 procedure Set_Has_Size_Clause
(Id
: E
; V
: B
:= True) is
3329 end Set_Has_Size_Clause
;
3331 procedure Set_Has_Small_Clause
(Id
: E
; V
: B
:= True) is
3334 end Set_Has_Small_Clause
;
3336 procedure Set_Has_Specified_Layout
(Id
: E
; V
: B
:= True) is
3338 pragma Assert
(Id
= Base_Type
(Id
));
3339 Set_Flag100
(Id
, V
);
3340 end Set_Has_Specified_Layout
;
3342 procedure Set_Has_Specified_Stream_Input
(Id
: E
; V
: B
:= True) is
3344 pragma Assert
(Is_Type
(Id
));
3345 Set_Flag190
(Id
, V
);
3346 end Set_Has_Specified_Stream_Input
;
3348 procedure Set_Has_Specified_Stream_Output
(Id
: E
; V
: B
:= True) is
3350 pragma Assert
(Is_Type
(Id
));
3351 Set_Flag191
(Id
, V
);
3352 end Set_Has_Specified_Stream_Output
;
3354 procedure Set_Has_Specified_Stream_Read
(Id
: E
; V
: B
:= True) is
3356 pragma Assert
(Is_Type
(Id
));
3357 Set_Flag192
(Id
, V
);
3358 end Set_Has_Specified_Stream_Read
;
3360 procedure Set_Has_Specified_Stream_Write
(Id
: E
; V
: B
:= True) is
3362 pragma Assert
(Is_Type
(Id
));
3363 Set_Flag193
(Id
, V
);
3364 end Set_Has_Specified_Stream_Write
;
3366 procedure Set_Has_Storage_Size_Clause
(Id
: E
; V
: B
:= True) is
3368 pragma Assert
(Is_Access_Type
(Id
) or else Is_Task_Type
(Id
));
3369 pragma Assert
(Base_Type
(Id
) = Id
);
3371 end Set_Has_Storage_Size_Clause
;
3373 procedure Set_Has_Stream_Size_Clause
(Id
: E
; V
: B
:= True) is
3375 pragma Assert
(Is_Elementary_Type
(Id
));
3376 Set_Flag184
(Id
, V
);
3377 end Set_Has_Stream_Size_Clause
;
3379 procedure Set_Has_Subprogram_Descriptor
(Id
: E
; V
: B
:= True) is
3382 end Set_Has_Subprogram_Descriptor
;
3384 procedure Set_Has_Task
(Id
: E
; V
: B
:= True) is
3386 pragma Assert
(Base_Type
(Id
) = Id
);
3390 procedure Set_Has_Unchecked_Union
(Id
: E
; V
: B
:= True) is
3392 pragma Assert
(Base_Type
(Id
) = Id
);
3393 Set_Flag123
(Id
, V
);
3394 end Set_Has_Unchecked_Union
;
3396 procedure Set_Has_Unknown_Discriminants
(Id
: E
; V
: B
:= True) is
3398 pragma Assert
(Is_Type
(Id
));
3400 end Set_Has_Unknown_Discriminants
;
3402 procedure Set_Has_Volatile_Components
(Id
: E
; V
: B
:= True) is
3404 pragma Assert
(not Is_Type
(Id
) or else Base_Type
(Id
) = Id
);
3406 end Set_Has_Volatile_Components
;
3408 procedure Set_Has_Xref_Entry
(Id
: E
; V
: B
:= True) is
3410 Set_Flag182
(Id
, V
);
3411 end Set_Has_Xref_Entry
;
3413 procedure Set_Hiding_Loop_Variable
(Id
: E
; V
: E
) is
3415 pragma Assert
(Ekind
(Id
) = E_Variable
);
3417 end Set_Hiding_Loop_Variable
;
3419 procedure Set_Homonym
(Id
: E
; V
: E
) is
3421 pragma Assert
(Id
/= V
);
3425 procedure Set_In_Package_Body
(Id
: E
; V
: B
:= True) is
3428 end Set_In_Package_Body
;
3430 procedure Set_In_Private_Part
(Id
: E
; V
: B
:= True) is
3433 end Set_In_Private_Part
;
3435 procedure Set_In_Use
(Id
: E
; V
: B
:= True) is
3437 pragma Assert
(Nkind
(Id
) in N_Entity
);
3441 procedure Set_Inner_Instances
(Id
: E
; V
: L
) is
3443 Set_Elist23
(Id
, V
);
3444 end Set_Inner_Instances
;
3446 procedure Set_Interface_Name
(Id
: E
; V
: N
) is
3449 end Set_Interface_Name
;
3451 procedure Set_Is_Abstract
(Id
: E
; V
: B
:= True) is
3454 end Set_Is_Abstract
;
3456 procedure Set_Is_Local_Anonymous_Access
(Id
: E
; V
: B
:= True) is
3458 pragma Assert
(Is_Access_Type
(Id
));
3459 Set_Flag194
(Id
, V
);
3460 end Set_Is_Local_Anonymous_Access
;
3462 procedure Set_Is_Access_Constant
(Id
: E
; V
: B
:= True) is
3464 pragma Assert
(Is_Access_Type
(Id
));
3466 end Set_Is_Access_Constant
;
3468 procedure Set_Is_Ada_2005
(Id
: E
; V
: B
:= True) is
3470 Set_Flag185
(Id
, V
);
3471 end Set_Is_Ada_2005
;
3473 procedure Set_Is_Aliased
(Id
: E
; V
: B
:= True) is
3475 pragma Assert
(Nkind
(Id
) in N_Entity
);
3479 procedure Set_Is_AST_Entry
(Id
: E
; V
: B
:= True) is
3481 pragma Assert
(Is_Entry
(Id
));
3482 Set_Flag132
(Id
, V
);
3483 end Set_Is_AST_Entry
;
3485 procedure Set_Is_Asynchronous
(Id
: E
; V
: B
:= True) is
3488 (Ekind
(Id
) = E_Procedure
or else Is_Type
(Id
));
3490 end Set_Is_Asynchronous
;
3492 procedure Set_Is_Atomic
(Id
: E
; V
: B
:= True) is
3497 procedure Set_Is_Bit_Packed_Array
(Id
: E
; V
: B
:= True) is
3499 pragma Assert
((not V
)
3500 or else (Is_Array_Type
(Id
) and then Id
= Base_Type
(Id
)));
3502 Set_Flag122
(Id
, V
);
3503 end Set_Is_Bit_Packed_Array
;
3505 procedure Set_Is_Called
(Id
: E
; V
: B
:= True) is
3508 (Ekind
(Id
) = E_Procedure
or else Ekind
(Id
) = E_Function
);
3509 Set_Flag102
(Id
, V
);
3512 procedure Set_Is_Character_Type
(Id
: E
; V
: B
:= True) is
3515 end Set_Is_Character_Type
;
3517 procedure Set_Is_Child_Unit
(Id
: E
; V
: B
:= True) is
3520 end Set_Is_Child_Unit
;
3522 procedure Set_Is_Class_Wide_Equivalent_Type
(Id
: E
; V
: B
:= True) is
3525 end Set_Is_Class_Wide_Equivalent_Type
;
3527 procedure Set_Is_Compilation_Unit
(Id
: E
; V
: B
:= True) is
3529 Set_Flag149
(Id
, V
);
3530 end Set_Is_Compilation_Unit
;
3532 procedure Set_Is_Completely_Hidden
(Id
: E
; V
: B
:= True) is
3534 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
3535 Set_Flag103
(Id
, V
);
3536 end Set_Is_Completely_Hidden
;
3538 procedure Set_Is_Concurrent_Record_Type
(Id
: E
; V
: B
:= True) is
3541 end Set_Is_Concurrent_Record_Type
;
3543 procedure Set_Is_Constr_Subt_For_U_Nominal
(Id
: E
; V
: B
:= True) is
3546 end Set_Is_Constr_Subt_For_U_Nominal
;
3548 procedure Set_Is_Constr_Subt_For_UN_Aliased
(Id
: E
; V
: B
:= True) is
3550 Set_Flag141
(Id
, V
);
3551 end Set_Is_Constr_Subt_For_UN_Aliased
;
3553 procedure Set_Is_Constrained
(Id
: E
; V
: B
:= True) is
3555 pragma Assert
(Nkind
(Id
) in N_Entity
);
3557 end Set_Is_Constrained
;
3559 procedure Set_Is_Constructor
(Id
: E
; V
: B
:= True) is
3562 end Set_Is_Constructor
;
3564 procedure Set_Is_Controlled
(Id
: E
; V
: B
:= True) is
3566 pragma Assert
(Id
= Base_Type
(Id
));
3568 end Set_Is_Controlled
;
3570 procedure Set_Is_Controlling_Formal
(Id
: E
; V
: B
:= True) is
3572 pragma Assert
(Is_Formal
(Id
));
3574 end Set_Is_Controlling_Formal
;
3576 procedure Set_Is_CPP_Class
(Id
: E
; V
: B
:= True) is
3579 end Set_Is_CPP_Class
;
3581 procedure Set_Is_Discrim_SO_Function
(Id
: E
; V
: B
:= True) is
3583 Set_Flag176
(Id
, V
);
3584 end Set_Is_Discrim_SO_Function
;
3586 procedure Set_Is_Dispatching_Operation
(Id
: E
; V
: B
:= True) is
3591 Is_Overloadable
(Id
)
3593 Ekind
(Id
) = E_Subprogram_Type
);
3596 end Set_Is_Dispatching_Operation
;
3598 procedure Set_Is_Eliminated
(Id
: E
; V
: B
:= True) is
3600 Set_Flag124
(Id
, V
);
3601 end Set_Is_Eliminated
;
3603 procedure Set_Is_Entry_Formal
(Id
: E
; V
: B
:= True) is
3606 end Set_Is_Entry_Formal
;
3608 procedure Set_Is_Exported
(Id
: E
; V
: B
:= True) is
3611 end Set_Is_Exported
;
3613 procedure Set_Is_First_Subtype
(Id
: E
; V
: B
:= True) is
3616 end Set_Is_First_Subtype
;
3618 procedure Set_Is_For_Access_Subtype
(Id
: E
; V
: B
:= True) is
3621 (Ekind
(Id
) = E_Record_Subtype
3623 Ekind
(Id
) = E_Private_Subtype
);
3624 Set_Flag118
(Id
, V
);
3625 end Set_Is_For_Access_Subtype
;
3627 procedure Set_Is_Formal_Subprogram
(Id
: E
; V
: B
:= True) is
3629 Set_Flag111
(Id
, V
);
3630 end Set_Is_Formal_Subprogram
;
3632 procedure Set_Is_Frozen
(Id
: E
; V
: B
:= True) is
3634 pragma Assert
(Nkind
(Id
) in N_Entity
);
3638 procedure Set_Is_Generic_Actual_Type
(Id
: E
; V
: B
:= True) is
3640 pragma Assert
(Is_Type
(Id
));
3642 end Set_Is_Generic_Actual_Type
;
3644 procedure Set_Is_Generic_Instance
(Id
: E
; V
: B
:= True) is
3646 Set_Flag130
(Id
, V
);
3647 end Set_Is_Generic_Instance
;
3649 procedure Set_Is_Generic_Type
(Id
: E
; V
: B
:= True) is
3651 pragma Assert
(Nkind
(Id
) in N_Entity
);
3653 end Set_Is_Generic_Type
;
3655 procedure Set_Is_Hidden
(Id
: E
; V
: B
:= True) is
3660 procedure Set_Is_Hidden_Open_Scope
(Id
: E
; V
: B
:= True) is
3662 Set_Flag171
(Id
, V
);
3663 end Set_Is_Hidden_Open_Scope
;
3665 procedure Set_Is_Immediately_Visible
(Id
: E
; V
: B
:= True) is
3667 pragma Assert
(Nkind
(Id
) in N_Entity
);
3669 end Set_Is_Immediately_Visible
;
3671 procedure Set_Is_Imported
(Id
: E
; V
: B
:= True) is
3674 end Set_Is_Imported
;
3676 procedure Set_Is_Inlined
(Id
: E
; V
: B
:= True) is
3681 procedure Set_Is_Interface
(Id
: E
; V
: B
:= True) is
3684 (Ekind
(Id
) = E_Record_Type
3685 or else Ekind
(Id
) = E_Record_Subtype
3686 or else Ekind
(Id
) = E_Record_Type_With_Private
3687 or else Ekind
(Id
) = E_Record_Subtype_With_Private
3688 or else Ekind
(Id
) = E_Class_Wide_Type
);
3689 Set_Flag186
(Id
, V
);
3690 end Set_Is_Interface
;
3692 procedure Set_Is_Instantiated
(Id
: E
; V
: B
:= True) is
3694 Set_Flag126
(Id
, V
);
3695 end Set_Is_Instantiated
;
3697 procedure Set_Is_Internal
(Id
: E
; V
: B
:= True) is
3699 pragma Assert
(Nkind
(Id
) in N_Entity
);
3701 end Set_Is_Internal
;
3703 procedure Set_Is_Interrupt_Handler
(Id
: E
; V
: B
:= True) is
3705 pragma Assert
(Nkind
(Id
) in N_Entity
);
3707 end Set_Is_Interrupt_Handler
;
3709 procedure Set_Is_Intrinsic_Subprogram
(Id
: E
; V
: B
:= True) is
3712 end Set_Is_Intrinsic_Subprogram
;
3714 procedure Set_Is_Itype
(Id
: E
; V
: B
:= True) is
3719 procedure Set_Is_Known_Non_Null
(Id
: E
; V
: B
:= True) is
3722 end Set_Is_Known_Non_Null
;
3724 procedure Set_Is_Known_Valid
(Id
: E
; V
: B
:= True) is
3726 Set_Flag170
(Id
, V
);
3727 end Set_Is_Known_Valid
;
3729 procedure Set_Is_Limited_Composite
(Id
: E
; V
: B
:= True) is
3731 pragma Assert
(Is_Type
(Id
));
3732 Set_Flag106
(Id
, V
);
3733 end Set_Is_Limited_Composite
;
3735 procedure Set_Is_Limited_Record
(Id
: E
; V
: B
:= True) is
3738 end Set_Is_Limited_Record
;
3740 procedure Set_Is_Machine_Code_Subprogram
(Id
: E
; V
: B
:= True) is
3742 pragma Assert
(Is_Subprogram
(Id
));
3743 Set_Flag137
(Id
, V
);
3744 end Set_Is_Machine_Code_Subprogram
;
3746 procedure Set_Is_Non_Static_Subtype
(Id
: E
; V
: B
:= True) is
3748 pragma Assert
(Is_Type
(Id
));
3749 Set_Flag109
(Id
, V
);
3750 end Set_Is_Non_Static_Subtype
;
3752 procedure Set_Is_Null_Init_Proc
(Id
: E
; V
: B
:= True) is
3754 pragma Assert
(Ekind
(Id
) = E_Procedure
);
3755 Set_Flag178
(Id
, V
);
3756 end Set_Is_Null_Init_Proc
;
3758 procedure Set_Is_Obsolescent
(Id
: E
; V
: B
:= True) is
3760 Set_Flag153
(Id
, V
);
3761 end Set_Is_Obsolescent
;
3763 procedure Set_Is_Optional_Parameter
(Id
: E
; V
: B
:= True) is
3765 pragma Assert
(Is_Formal
(Id
));
3766 Set_Flag134
(Id
, V
);
3767 end Set_Is_Optional_Parameter
;
3769 procedure Set_Is_Overriding_Operation
(Id
: E
; V
: B
:= True) is
3771 pragma Assert
(Is_Subprogram
(Id
));
3773 end Set_Is_Overriding_Operation
;
3775 procedure Set_Is_Package_Body_Entity
(Id
: E
; V
: B
:= True) is
3777 Set_Flag160
(Id
, V
);
3778 end Set_Is_Package_Body_Entity
;
3780 procedure Set_Is_Packed
(Id
: E
; V
: B
:= True) is
3782 pragma Assert
(Base_Type
(Id
) = Id
);
3786 procedure Set_Is_Packed_Array_Type
(Id
: E
; V
: B
:= True) is
3788 Set_Flag138
(Id
, V
);
3789 end Set_Is_Packed_Array_Type
;
3791 procedure Set_Is_Potentially_Use_Visible
(Id
: E
; V
: B
:= True) is
3793 pragma Assert
(Nkind
(Id
) in N_Entity
);
3795 end Set_Is_Potentially_Use_Visible
;
3797 procedure Set_Is_Preelaborated
(Id
: E
; V
: B
:= True) is
3800 end Set_Is_Preelaborated
;
3802 procedure Set_Is_Private_Composite
(Id
: E
; V
: B
:= True) is
3804 pragma Assert
(Is_Type
(Id
));
3805 Set_Flag107
(Id
, V
);
3806 end Set_Is_Private_Composite
;
3808 procedure Set_Is_Private_Descendant
(Id
: E
; V
: B
:= True) is
3811 end Set_Is_Private_Descendant
;
3813 procedure Set_Is_Public
(Id
: E
; V
: B
:= True) is
3815 pragma Assert
(Nkind
(Id
) in N_Entity
);
3819 procedure Set_Is_Pure
(Id
: E
; V
: B
:= True) is
3824 procedure Set_Is_Pure_Unit_Access_Type
(Id
: E
; V
: B
:= True) is
3826 pragma Assert
(Is_Access_Type
(Id
));
3827 Set_Flag189
(Id
, V
);
3828 end Set_Is_Pure_Unit_Access_Type
;
3830 procedure Set_Is_Remote_Call_Interface
(Id
: E
; V
: B
:= True) is
3833 end Set_Is_Remote_Call_Interface
;
3835 procedure Set_Is_Remote_Types
(Id
: E
; V
: B
:= True) is
3838 end Set_Is_Remote_Types
;
3840 procedure Set_Is_Renaming_Of_Object
(Id
: E
; V
: B
:= True) is
3842 Set_Flag112
(Id
, V
);
3843 end Set_Is_Renaming_Of_Object
;
3845 procedure Set_Is_Shared_Passive
(Id
: E
; V
: B
:= True) is
3848 end Set_Is_Shared_Passive
;
3850 procedure Set_Is_Statically_Allocated
(Id
: E
; V
: B
:= True) is
3853 (Ekind
(Id
) = E_Exception
3854 or else Ekind
(Id
) = E_Variable
3855 or else Ekind
(Id
) = E_Constant
3856 or else Is_Type
(Id
)
3857 or else Ekind
(Id
) = E_Void
);
3859 end Set_Is_Statically_Allocated
;
3861 procedure Set_Is_Tag
(Id
: E
; V
: B
:= True) is
3863 pragma Assert
(Nkind
(Id
) in N_Entity
);
3867 procedure Set_Is_Tagged_Type
(Id
: E
; V
: B
:= True) is
3870 end Set_Is_Tagged_Type
;
3872 procedure Set_Is_Thread_Body
(Id
: E
; V
: B
:= True) is
3875 end Set_Is_Thread_Body
;
3877 procedure Set_Is_True_Constant
(Id
: E
; V
: B
:= True) is
3879 Set_Flag163
(Id
, V
);
3880 end Set_Is_True_Constant
;
3882 procedure Set_Is_Unchecked_Union
(Id
: E
; V
: B
:= True) is
3884 pragma Assert
(Base_Type
(Id
) = Id
);
3885 Set_Flag117
(Id
, V
);
3886 end Set_Is_Unchecked_Union
;
3888 procedure Set_Is_Unsigned_Type
(Id
: E
; V
: B
:= True) is
3890 pragma Assert
(Is_Discrete_Or_Fixed_Point_Type
(Id
));
3891 Set_Flag144
(Id
, V
);
3892 end Set_Is_Unsigned_Type
;
3894 procedure Set_Is_Valued_Procedure
(Id
: E
; V
: B
:= True) is
3896 pragma Assert
(Ekind
(Id
) = E_Procedure
);
3897 Set_Flag127
(Id
, V
);
3898 end Set_Is_Valued_Procedure
;
3900 procedure Set_Is_Visible_Child_Unit
(Id
: E
; V
: B
:= True) is
3902 pragma Assert
(Is_Child_Unit
(Id
));
3903 Set_Flag116
(Id
, V
);
3904 end Set_Is_Visible_Child_Unit
;
3906 procedure Set_Is_VMS_Exception
(Id
: E
; V
: B
:= True) is
3908 pragma Assert
(Ekind
(Id
) = E_Exception
);
3909 Set_Flag133
(Id
, V
);
3910 end Set_Is_VMS_Exception
;
3912 procedure Set_Is_Volatile
(Id
: E
; V
: B
:= True) is
3914 pragma Assert
(Nkind
(Id
) in N_Entity
);
3916 end Set_Is_Volatile
;
3918 procedure Set_Kill_Elaboration_Checks
(Id
: E
; V
: B
:= True) is
3921 end Set_Kill_Elaboration_Checks
;
3923 procedure Set_Kill_Range_Checks
(Id
: E
; V
: B
:= True) is
3926 end Set_Kill_Range_Checks
;
3928 procedure Set_Kill_Tag_Checks
(Id
: E
; V
: B
:= True) is
3931 end Set_Kill_Tag_Checks
;
3933 procedure Set_Last_Entity
(Id
: E
; V
: E
) is
3936 end Set_Last_Entity
;
3938 procedure Set_Limited_View
(Id
: E
; V
: E
) is
3940 pragma Assert
(Ekind
(Id
) = E_Package
);
3942 end Set_Limited_View
;
3944 procedure Set_Lit_Indexes
(Id
: E
; V
: E
) is
3946 pragma Assert
(Is_Enumeration_Type
(Id
) and then Root_Type
(Id
) = Id
);
3948 end Set_Lit_Indexes
;
3950 procedure Set_Lit_Strings
(Id
: E
; V
: E
) is
3952 pragma Assert
(Is_Enumeration_Type
(Id
) and then Root_Type
(Id
) = Id
);
3954 end Set_Lit_Strings
;
3956 procedure Set_Machine_Radix_10
(Id
: E
; V
: B
:= True) is
3958 pragma Assert
(Is_Decimal_Fixed_Point_Type
(Id
));
3960 end Set_Machine_Radix_10
;
3962 procedure Set_Master_Id
(Id
: E
; V
: E
) is
3967 procedure Set_Materialize_Entity
(Id
: E
; V
: B
:= True) is
3969 Set_Flag168
(Id
, V
);
3970 end Set_Materialize_Entity
;
3972 procedure Set_Mechanism
(Id
: E
; V
: M
) is
3974 pragma Assert
(Ekind
(Id
) = E_Function
or else Is_Formal
(Id
));
3975 Set_Uint8
(Id
, UI_From_Int
(V
));
3978 procedure Set_Modulus
(Id
: E
; V
: U
) is
3980 pragma Assert
(Ekind
(Id
) = E_Modular_Integer_Type
);
3984 procedure Set_Must_Be_On_Byte_Boundary
(Id
: E
; V
: B
:= True) is
3986 pragma Assert
(Is_Type
(Id
));
3987 Set_Flag183
(Id
, V
);
3988 end Set_Must_Be_On_Byte_Boundary
;
3990 procedure Set_Needs_Debug_Info
(Id
: E
; V
: B
:= True) is
3992 Set_Flag147
(Id
, V
);
3993 end Set_Needs_Debug_Info
;
3995 procedure Set_Needs_No_Actuals
(Id
: E
; V
: B
:= True) is
3998 (Is_Overloadable
(Id
)
3999 or else Ekind
(Id
) = E_Subprogram_Type
4000 or else Ekind
(Id
) = E_Entry_Family
);
4002 end Set_Needs_No_Actuals
;
4004 procedure Set_Never_Set_In_Source
(Id
: E
; V
: B
:= True) is
4006 Set_Flag115
(Id
, V
);
4007 end Set_Never_Set_In_Source
;
4009 procedure Set_Next_Inlined_Subprogram
(Id
: E
; V
: E
) is
4012 end Set_Next_Inlined_Subprogram
;
4014 procedure Set_No_Pool_Assigned
(Id
: E
; V
: B
:= True) is
4016 pragma Assert
(Is_Access_Type
(Id
) and then Base_Type
(Id
) = Id
);
4017 Set_Flag131
(Id
, V
);
4018 end Set_No_Pool_Assigned
;
4020 procedure Set_No_Return
(Id
: E
; V
: B
:= True) is
4023 (Ekind
(Id
) = E_Procedure
or else Ekind
(Id
) = E_Generic_Procedure
);
4024 Set_Flag113
(Id
, V
);
4027 procedure Set_No_Strict_Aliasing
(Id
: E
; V
: B
:= True) is
4029 pragma Assert
(Is_Access_Type
(Id
) and then Base_Type
(Id
) = Id
);
4030 Set_Flag136
(Id
, V
);
4031 end Set_No_Strict_Aliasing
;
4033 procedure Set_Non_Binary_Modulus
(Id
: E
; V
: B
:= True) is
4035 pragma Assert
(Ekind
(Id
) = E_Modular_Integer_Type
);
4037 end Set_Non_Binary_Modulus
;
4039 procedure Set_Non_Limited_View
(Id
: E
; V
: E
) is
4040 pragma Assert
(False
4041 or else Ekind
(Id
) = E_Incomplete_Type
);
4044 end Set_Non_Limited_View
;
4046 procedure Set_Nonzero_Is_True
(Id
: E
; V
: B
:= True) is
4049 (Root_Type
(Id
) = Standard_Boolean
4050 and then Ekind
(Id
) = E_Enumeration_Type
);
4051 Set_Flag162
(Id
, V
);
4052 end Set_Nonzero_Is_True
;
4054 procedure Set_Normalized_First_Bit
(Id
: E
; V
: U
) is
4057 (Ekind
(Id
) = E_Component
or else Ekind
(Id
) = E_Discriminant
);
4059 end Set_Normalized_First_Bit
;
4061 procedure Set_Normalized_Position
(Id
: E
; V
: U
) is
4064 (Ekind
(Id
) = E_Component
or else Ekind
(Id
) = E_Discriminant
);
4066 end Set_Normalized_Position
;
4068 procedure Set_Normalized_Position_Max
(Id
: E
; V
: U
) is
4071 (Ekind
(Id
) = E_Component
or else Ekind
(Id
) = E_Discriminant
);
4073 end Set_Normalized_Position_Max
;
4075 procedure Set_Object_Ref
(Id
: E
; V
: E
) is
4077 pragma Assert
(Ekind
(Id
) = E_Protected_Body
);
4081 procedure Set_Obsolescent_Warning
(Id
: E
; V
: N
) is
4083 pragma Assert
(Is_Subprogram
(Id
));
4085 end Set_Obsolescent_Warning
;
4087 procedure Set_Original_Access_Type
(Id
: E
; V
: E
) is
4090 (Ekind
(Id
) = E_Access_Subprogram_Type
4091 or else Ekind
(Id
) = E_Access_Protected_Subprogram_Type
);
4093 end Set_Original_Access_Type
;
4095 procedure Set_Original_Array_Type
(Id
: E
; V
: E
) is
4097 pragma Assert
(Is_Array_Type
(Id
) or else Is_Modular_Integer_Type
(Id
));
4099 end Set_Original_Array_Type
;
4101 procedure Set_Original_Record_Component
(Id
: E
; V
: E
) is
4104 (Ekind
(Id
) = E_Void
4105 or else Ekind
(Id
) = E_Component
4106 or else Ekind
(Id
) = E_Discriminant
);
4108 end Set_Original_Record_Component
;
4110 procedure Set_Packed_Array_Type
(Id
: E
; V
: E
) is
4112 pragma Assert
(Is_Array_Type
(Id
));
4114 end Set_Packed_Array_Type
;
4116 procedure Set_Parent_Subtype
(Id
: E
; V
: E
) is
4118 pragma Assert
(Ekind
(Id
) = E_Record_Type
);
4120 end Set_Parent_Subtype
;
4122 procedure Set_Primitive_Operations
(Id
: E
; V
: L
) is
4124 pragma Assert
(Is_Tagged_Type
(Id
));
4125 Set_Elist15
(Id
, V
);
4126 end Set_Primitive_Operations
;
4128 procedure Set_Prival
(Id
: E
; V
: E
) is
4130 pragma Assert
(Is_Protected_Private
(Id
));
4134 procedure Set_Privals_Chain
(Id
: E
; V
: L
) is
4136 pragma Assert
(Is_Overloadable
(Id
)
4137 or else Ekind
(Id
) = E_Entry_Family
);
4138 Set_Elist23
(Id
, V
);
4139 end Set_Privals_Chain
;
4141 procedure Set_Private_Dependents
(Id
: E
; V
: L
) is
4143 pragma Assert
(Is_Incomplete_Or_Private_Type
(Id
));
4144 Set_Elist18
(Id
, V
);
4145 end Set_Private_Dependents
;
4147 procedure Set_Private_View
(Id
: E
; V
: N
) is
4149 pragma Assert
(Is_Private_Type
(Id
));
4151 end Set_Private_View
;
4153 procedure Set_Protected_Body_Subprogram
(Id
: E
; V
: E
) is
4155 pragma Assert
(Is_Subprogram
(Id
) or else Is_Entry
(Id
));
4157 end Set_Protected_Body_Subprogram
;
4159 procedure Set_Protected_Formal
(Id
: E
; V
: E
) is
4161 pragma Assert
(Is_Formal
(Id
));
4163 end Set_Protected_Formal
;
4165 procedure Set_Protected_Operation
(Id
: E
; V
: N
) is
4167 pragma Assert
(Is_Protected_Private
(Id
));
4169 end Set_Protected_Operation
;
4171 procedure Set_Reachable
(Id
: E
; V
: B
:= True) is
4176 procedure Set_Referenced
(Id
: E
; V
: B
:= True) is
4178 Set_Flag156
(Id
, V
);
4181 procedure Set_Referenced_As_LHS
(Id
: E
; V
: B
:= True) is
4184 end Set_Referenced_As_LHS
;
4186 procedure Set_Referenced_Object
(Id
: E
; V
: N
) is
4188 pragma Assert
(Is_Type
(Id
));
4190 end Set_Referenced_Object
;
4192 procedure Set_Register_Exception_Call
(Id
: E
; V
: N
) is
4194 pragma Assert
(Ekind
(Id
) = E_Exception
);
4196 end Set_Register_Exception_Call
;
4198 procedure Set_Related_Array_Object
(Id
: E
; V
: E
) is
4200 pragma Assert
(Is_Array_Type
(Id
));
4202 end Set_Related_Array_Object
;
4204 procedure Set_Related_Instance
(Id
: E
; V
: E
) is
4207 (Ekind
(Id
) = E_Package
or else Ekind
(Id
) = E_Package_Body
);
4209 end Set_Related_Instance
;
4211 procedure Set_Renamed_Entity
(Id
: E
; V
: N
) is
4214 end Set_Renamed_Entity
;
4216 procedure Set_Renamed_Object
(Id
: E
; V
: N
) is
4219 end Set_Renamed_Object
;
4221 procedure Set_Renaming_Map
(Id
: E
; V
: U
) is
4224 end Set_Renaming_Map
;
4226 procedure Set_Return_Present
(Id
: E
; V
: B
:= True) is
4229 end Set_Return_Present
;
4231 procedure Set_Returns_By_Ref
(Id
: E
; V
: B
:= True) is
4234 end Set_Returns_By_Ref
;
4236 procedure Set_Reverse_Bit_Order
(Id
: E
; V
: B
:= True) is
4239 (Is_Record_Type
(Id
) and then Id
= Base_Type
(Id
));
4240 Set_Flag164
(Id
, V
);
4241 end Set_Reverse_Bit_Order
;
4243 procedure Set_RM_Size
(Id
: E
; V
: U
) is
4245 pragma Assert
(Is_Type
(Id
));
4249 procedure Set_Scalar_Range
(Id
: E
; V
: N
) is
4252 end Set_Scalar_Range
;
4254 procedure Set_Scale_Value
(Id
: E
; V
: U
) is
4257 end Set_Scale_Value
;
4259 procedure Set_Scope_Depth_Value
(Id
: E
; V
: U
) is
4261 pragma Assert
(not Is_Record_Type
(Id
));
4263 end Set_Scope_Depth_Value
;
4265 procedure Set_Sec_Stack_Needed_For_Return
(Id
: E
; V
: B
:= True) is
4267 Set_Flag167
(Id
, V
);
4268 end Set_Sec_Stack_Needed_For_Return
;
4270 procedure Set_Shadow_Entities
(Id
: E
; V
: S
) is
4273 (Ekind
(Id
) = E_Package
or else Ekind
(Id
) = E_Generic_Package
);
4275 end Set_Shadow_Entities
;
4277 procedure Set_Shared_Var_Assign_Proc
(Id
: E
; V
: E
) is
4279 pragma Assert
(Ekind
(Id
) = E_Variable
);
4281 end Set_Shared_Var_Assign_Proc
;
4283 procedure Set_Shared_Var_Read_Proc
(Id
: E
; V
: E
) is
4285 pragma Assert
(Ekind
(Id
) = E_Variable
);
4287 end Set_Shared_Var_Read_Proc
;
4289 procedure Set_Size_Check_Code
(Id
: E
; V
: N
) is
4291 pragma Assert
(Ekind
(Id
) = E_Constant
or else Ekind
(Id
) = E_Variable
);
4293 end Set_Size_Check_Code
;
4295 procedure Set_Size_Depends_On_Discriminant
(Id
: E
; V
: B
:= True) is
4297 Set_Flag177
(Id
, V
);
4298 end Set_Size_Depends_On_Discriminant
;
4300 procedure Set_Size_Known_At_Compile_Time
(Id
: E
; V
: B
:= True) is
4303 end Set_Size_Known_At_Compile_Time
;
4305 procedure Set_Small_Value
(Id
: E
; V
: R
) is
4307 pragma Assert
(Is_Fixed_Point_Type
(Id
));
4308 Set_Ureal21
(Id
, V
);
4309 end Set_Small_Value
;
4311 procedure Set_Spec_Entity
(Id
: E
; V
: E
) is
4313 pragma Assert
(Ekind
(Id
) = E_Package_Body
or else Is_Formal
(Id
));
4315 end Set_Spec_Entity
;
4317 procedure Set_Storage_Size_Variable
(Id
: E
; V
: E
) is
4319 pragma Assert
(Is_Access_Type
(Id
) or else Is_Task_Type
(Id
));
4320 pragma Assert
(Base_Type
(Id
) = Id
);
4322 end Set_Storage_Size_Variable
;
4324 procedure Set_Stored_Constraint
(Id
: E
; V
: L
) is
4326 pragma Assert
(Nkind
(Id
) in N_Entity
);
4327 Set_Elist23
(Id
, V
);
4328 end Set_Stored_Constraint
;
4330 procedure Set_Strict_Alignment
(Id
: E
; V
: B
:= True) is
4332 pragma Assert
(Base_Type
(Id
) = Id
);
4333 Set_Flag145
(Id
, V
);
4334 end Set_Strict_Alignment
;
4336 procedure Set_String_Literal_Length
(Id
: E
; V
: U
) is
4338 pragma Assert
(Ekind
(Id
) = E_String_Literal_Subtype
);
4340 end Set_String_Literal_Length
;
4342 procedure Set_String_Literal_Low_Bound
(Id
: E
; V
: N
) is
4344 pragma Assert
(Ekind
(Id
) = E_String_Literal_Subtype
);
4346 end Set_String_Literal_Low_Bound
;
4348 procedure Set_Suppress_Elaboration_Warnings
(Id
: E
; V
: B
:= True) is
4350 Set_Flag148
(Id
, V
);
4351 end Set_Suppress_Elaboration_Warnings
;
4353 procedure Set_Suppress_Init_Proc
(Id
: E
; V
: B
:= True) is
4355 pragma Assert
(Id
= Base_Type
(Id
));
4356 Set_Flag105
(Id
, V
);
4357 end Set_Suppress_Init_Proc
;
4359 procedure Set_Suppress_Style_Checks
(Id
: E
; V
: B
:= True) is
4361 Set_Flag165
(Id
, V
);
4362 end Set_Suppress_Style_Checks
;
4364 procedure Set_Task_Body_Procedure
(Id
: E
; V
: N
) is
4366 pragma Assert
(Ekind
(Id
) = E_Task_Type
4367 or else Ekind
(Id
) = E_Task_Subtype
);
4369 end Set_Task_Body_Procedure
;
4371 procedure Set_Treat_As_Volatile
(Id
: E
; V
: B
:= True) is
4374 end Set_Treat_As_Volatile
;
4376 procedure Set_Underlying_Full_View
(Id
: E
; V
: E
) is
4378 pragma Assert
(Ekind
(Id
) in Private_Kind
);
4380 end Set_Underlying_Full_View
;
4382 procedure Set_Unset_Reference
(Id
: E
; V
: N
) is
4385 end Set_Unset_Reference
;
4387 procedure Set_Uses_Sec_Stack
(Id
: E
; V
: B
:= True) is
4390 end Set_Uses_Sec_Stack
;
4392 procedure Set_Vax_Float
(Id
: E
; V
: B
:= True) is
4394 pragma Assert
(Id
= Base_Type
(Id
));
4395 Set_Flag151
(Id
, V
);
4398 procedure Set_Warnings_Off
(Id
: E
; V
: B
:= True) is
4401 end Set_Warnings_Off
;
4403 -----------------------------------
4404 -- Field Initialization Routines --
4405 -----------------------------------
4407 procedure Init_Alignment
(Id
: E
) is
4409 Set_Uint14
(Id
, Uint_0
);
4412 procedure Init_Alignment
(Id
: E
; V
: Int
) is
4414 Set_Uint14
(Id
, UI_From_Int
(V
));
4417 procedure Init_Component_Bit_Offset
(Id
: E
) is
4419 Set_Uint11
(Id
, No_Uint
);
4420 end Init_Component_Bit_Offset
;
4422 procedure Init_Component_Bit_Offset
(Id
: E
; V
: Int
) is
4424 Set_Uint11
(Id
, UI_From_Int
(V
));
4425 end Init_Component_Bit_Offset
;
4427 procedure Init_Component_Size
(Id
: E
) is
4429 Set_Uint22
(Id
, Uint_0
);
4430 end Init_Component_Size
;
4432 procedure Init_Component_Size
(Id
: E
; V
: Int
) is
4434 Set_Uint22
(Id
, UI_From_Int
(V
));
4435 end Init_Component_Size
;
4437 procedure Init_Digits_Value
(Id
: E
) is
4439 Set_Uint17
(Id
, Uint_0
);
4440 end Init_Digits_Value
;
4442 procedure Init_Digits_Value
(Id
: E
; V
: Int
) is
4444 Set_Uint17
(Id
, UI_From_Int
(V
));
4445 end Init_Digits_Value
;
4447 procedure Init_Esize
(Id
: E
) is
4449 Set_Uint12
(Id
, Uint_0
);
4452 procedure Init_Esize
(Id
: E
; V
: Int
) is
4454 Set_Uint12
(Id
, UI_From_Int
(V
));
4457 procedure Init_Normalized_First_Bit
(Id
: E
) is
4459 Set_Uint8
(Id
, No_Uint
);
4460 end Init_Normalized_First_Bit
;
4462 procedure Init_Normalized_First_Bit
(Id
: E
; V
: Int
) is
4464 Set_Uint8
(Id
, UI_From_Int
(V
));
4465 end Init_Normalized_First_Bit
;
4467 procedure Init_Normalized_Position
(Id
: E
) is
4469 Set_Uint14
(Id
, No_Uint
);
4470 end Init_Normalized_Position
;
4472 procedure Init_Normalized_Position
(Id
: E
; V
: Int
) is
4474 Set_Uint14
(Id
, UI_From_Int
(V
));
4475 end Init_Normalized_Position
;
4477 procedure Init_Normalized_Position_Max
(Id
: E
) is
4479 Set_Uint10
(Id
, No_Uint
);
4480 end Init_Normalized_Position_Max
;
4482 procedure Init_Normalized_Position_Max
(Id
: E
; V
: Int
) is
4484 Set_Uint10
(Id
, UI_From_Int
(V
));
4485 end Init_Normalized_Position_Max
;
4487 procedure Init_RM_Size
(Id
: E
) is
4489 Set_Uint13
(Id
, Uint_0
);
4492 procedure Init_RM_Size
(Id
: E
; V
: Int
) is
4494 Set_Uint13
(Id
, UI_From_Int
(V
));
4497 -----------------------------
4498 -- Init_Component_Location --
4499 -----------------------------
4501 procedure Init_Component_Location
(Id
: E
) is
4503 Set_Uint8
(Id
, No_Uint
); -- Normalized_First_Bit
4504 Set_Uint10
(Id
, No_Uint
); -- Normalized_Position_Max
4505 Set_Uint11
(Id
, No_Uint
); -- Component_First_Bit
4506 Set_Uint12
(Id
, Uint_0
); -- Esize
4507 Set_Uint14
(Id
, No_Uint
); -- Normalized_Position
4508 end Init_Component_Location
;
4514 procedure Init_Size
(Id
: E
; V
: Int
) is
4516 Set_Uint12
(Id
, UI_From_Int
(V
)); -- Esize
4517 Set_Uint13
(Id
, UI_From_Int
(V
)); -- RM_Size
4520 ---------------------
4521 -- Init_Size_Align --
4522 ---------------------
4524 procedure Init_Size_Align
(Id
: E
) is
4526 Set_Uint12
(Id
, Uint_0
); -- Esize
4527 Set_Uint13
(Id
, Uint_0
); -- RM_Size
4528 Set_Uint14
(Id
, Uint_0
); -- Alignment
4529 end Init_Size_Align
;
4531 ----------------------------------------------
4532 -- Type Representation Attribute Predicates --
4533 ----------------------------------------------
4535 function Known_Alignment
(E
: Entity_Id
) return B
is
4537 return Uint14
(E
) /= Uint_0
4538 and then Uint14
(E
) /= No_Uint
;
4539 end Known_Alignment
;
4541 function Known_Component_Bit_Offset
(E
: Entity_Id
) return B
is
4543 return Uint11
(E
) /= No_Uint
;
4544 end Known_Component_Bit_Offset
;
4546 function Known_Component_Size
(E
: Entity_Id
) return B
is
4548 return Uint22
(Base_Type
(E
)) /= Uint_0
4549 and then Uint22
(Base_Type
(E
)) /= No_Uint
;
4550 end Known_Component_Size
;
4552 function Known_Esize
(E
: Entity_Id
) return B
is
4554 return Uint12
(E
) /= Uint_0
4555 and then Uint12
(E
) /= No_Uint
;
4558 function Known_Normalized_First_Bit
(E
: Entity_Id
) return B
is
4560 return Uint8
(E
) /= No_Uint
;
4561 end Known_Normalized_First_Bit
;
4563 function Known_Normalized_Position
(E
: Entity_Id
) return B
is
4565 return Uint14
(E
) /= No_Uint
;
4566 end Known_Normalized_Position
;
4568 function Known_Normalized_Position_Max
(E
: Entity_Id
) return B
is
4570 return Uint10
(E
) /= No_Uint
;
4571 end Known_Normalized_Position_Max
;
4573 function Known_RM_Size
(E
: Entity_Id
) return B
is
4575 return Uint13
(E
) /= No_Uint
4576 and then (Uint13
(E
) /= Uint_0
4577 or else Is_Discrete_Type
(E
)
4578 or else Is_Fixed_Point_Type
(E
));
4581 function Known_Static_Component_Bit_Offset
(E
: Entity_Id
) return B
is
4583 return Uint11
(E
) /= No_Uint
4584 and then Uint11
(E
) >= Uint_0
;
4585 end Known_Static_Component_Bit_Offset
;
4587 function Known_Static_Component_Size
(E
: Entity_Id
) return B
is
4589 return Uint22
(Base_Type
(E
)) > Uint_0
;
4590 end Known_Static_Component_Size
;
4592 function Known_Static_Esize
(E
: Entity_Id
) return B
is
4594 return Uint12
(E
) > Uint_0
;
4595 end Known_Static_Esize
;
4597 function Known_Static_Normalized_First_Bit
(E
: Entity_Id
) return B
is
4599 return Uint8
(E
) /= No_Uint
4600 and then Uint8
(E
) >= Uint_0
;
4601 end Known_Static_Normalized_First_Bit
;
4603 function Known_Static_Normalized_Position
(E
: Entity_Id
) return B
is
4605 return Uint14
(E
) /= No_Uint
4606 and then Uint14
(E
) >= Uint_0
;
4607 end Known_Static_Normalized_Position
;
4609 function Known_Static_Normalized_Position_Max
(E
: Entity_Id
) return B
is
4611 return Uint10
(E
) /= No_Uint
4612 and then Uint10
(E
) >= Uint_0
;
4613 end Known_Static_Normalized_Position_Max
;
4615 function Known_Static_RM_Size
(E
: Entity_Id
) return B
is
4617 return Uint13
(E
) > Uint_0
4618 or else Is_Discrete_Type
(E
)
4619 or else Is_Fixed_Point_Type
(E
);
4620 end Known_Static_RM_Size
;
4622 function Unknown_Alignment
(E
: Entity_Id
) return B
is
4624 return Uint14
(E
) = Uint_0
4625 or else Uint14
(E
) = No_Uint
;
4626 end Unknown_Alignment
;
4628 function Unknown_Component_Bit_Offset
(E
: Entity_Id
) return B
is
4630 return Uint11
(E
) = No_Uint
;
4631 end Unknown_Component_Bit_Offset
;
4633 function Unknown_Component_Size
(E
: Entity_Id
) return B
is
4635 return Uint22
(Base_Type
(E
)) = Uint_0
4637 Uint22
(Base_Type
(E
)) = No_Uint
;
4638 end Unknown_Component_Size
;
4640 function Unknown_Esize
(E
: Entity_Id
) return B
is
4642 return Uint12
(E
) = No_Uint
4644 Uint12
(E
) = Uint_0
;
4647 function Unknown_Normalized_First_Bit
(E
: Entity_Id
) return B
is
4649 return Uint8
(E
) = No_Uint
;
4650 end Unknown_Normalized_First_Bit
;
4652 function Unknown_Normalized_Position
(E
: Entity_Id
) return B
is
4654 return Uint14
(E
) = No_Uint
;
4655 end Unknown_Normalized_Position
;
4657 function Unknown_Normalized_Position_Max
(E
: Entity_Id
) return B
is
4659 return Uint10
(E
) = No_Uint
;
4660 end Unknown_Normalized_Position_Max
;
4662 function Unknown_RM_Size
(E
: Entity_Id
) return B
is
4664 return (Uint13
(E
) = Uint_0
4665 and then not Is_Discrete_Type
(E
)
4666 and then not Is_Fixed_Point_Type
(E
))
4667 or else Uint13
(E
) = No_Uint
;
4668 end Unknown_RM_Size
;
4670 --------------------
4671 -- Address_Clause --
4672 --------------------
4674 function Address_Clause
(Id
: E
) return N
is
4676 return Rep_Clause
(Id
, Name_Address
);
4679 ----------------------
4680 -- Alignment_Clause --
4681 ----------------------
4683 function Alignment_Clause
(Id
: E
) return N
is
4685 return Rep_Clause
(Id
, Name_Alignment
);
4686 end Alignment_Clause
;
4688 ----------------------
4689 -- Ancestor_Subtype --
4690 ----------------------
4692 function Ancestor_Subtype
(Id
: E
) return E
is
4694 -- If this is first subtype, or is a base type, then there is no
4695 -- ancestor subtype, so we return Empty to indicate this fact.
4697 if Is_First_Subtype
(Id
) or else Id
= Base_Type
(Id
) then
4702 D
: constant Node_Id
:= Declaration_Node
(Id
);
4705 -- If we have a subtype declaration, get the ancestor subtype
4707 if Nkind
(D
) = N_Subtype_Declaration
then
4708 if Nkind
(Subtype_Indication
(D
)) = N_Subtype_Indication
then
4709 return Entity
(Subtype_Mark
(Subtype_Indication
(D
)));
4711 return Entity
(Subtype_Indication
(D
));
4714 -- If not, then no subtype indication is available
4720 end Ancestor_Subtype
;
4726 procedure Append_Entity
(Id
: Entity_Id
; V
: Entity_Id
) is
4728 if Last_Entity
(V
) = Empty
then
4729 Set_First_Entity
(V
, Id
);
4731 Set_Next_Entity
(Last_Entity
(V
), Id
);
4734 Set_Next_Entity
(Id
, Empty
);
4736 Set_Last_Entity
(V
, Id
);
4743 function Base_Type
(Id
: E
) return E
is
4746 when E_Enumeration_Subtype |
4748 E_Signed_Integer_Subtype |
4749 E_Modular_Integer_Subtype |
4750 E_Floating_Point_Subtype |
4751 E_Ordinary_Fixed_Point_Subtype |
4752 E_Decimal_Fixed_Point_Subtype |
4757 E_Record_Subtype_With_Private |
4758 E_Limited_Private_Subtype |
4760 E_Protected_Subtype |
4762 E_String_Literal_Subtype |
4763 E_Class_Wide_Subtype
=>
4771 -------------------------
4772 -- Component_Alignment --
4773 -------------------------
4775 -- Component Alignment is encoded using two flags, Flag128/129 as
4776 -- follows. Note that both flags False = Align_Default, so that the
4777 -- default initialization of flags to False initializes component
4778 -- alignment to the default value as required.
4780 -- Flag128 Flag129 Value
4781 -- ------- ------- -----
4782 -- False False Calign_Default
4783 -- False True Calign_Component_Size
4784 -- True False Calign_Component_Size_4
4785 -- True True Calign_Storage_Unit
4787 function Component_Alignment
(Id
: E
) return C
is
4788 BT
: constant Node_Id
:= Base_Type
(Id
);
4791 pragma Assert
(Is_Array_Type
(Id
) or else Is_Record_Type
(Id
));
4793 if Flag128
(BT
) then
4794 if Flag129
(BT
) then
4795 return Calign_Storage_Unit
;
4797 return Calign_Component_Size_4
;
4801 if Flag129
(BT
) then
4802 return Calign_Component_Size
;
4804 return Calign_Default
;
4807 end Component_Alignment
;
4809 --------------------
4810 -- Constant_Value --
4811 --------------------
4813 function Constant_Value
(Id
: E
) return N
is
4814 D
: constant Node_Id
:= Declaration_Node
(Id
);
4818 -- If we have no declaration node, then return no constant value.
4819 -- Not clear how this can happen, but it does sometimes ???
4820 -- To investigate, remove this check and compile discrim_po.adb.
4825 -- Normal case where a declaration node is present
4827 elsif Nkind
(D
) = N_Object_Renaming_Declaration
then
4828 return Renamed_Object
(Id
);
4830 -- If this is a component declaration whose entity is constant, it
4831 -- is a prival within a protected function. It does not have
4832 -- a constant value.
4834 elsif Nkind
(D
) = N_Component_Declaration
then
4837 -- If there is an expression, return it
4839 elsif Present
(Expression
(D
)) then
4840 return (Expression
(D
));
4842 -- For a constant, see if we have a full view
4844 elsif Ekind
(Id
) = E_Constant
4845 and then Present
(Full_View
(Id
))
4847 Full_D
:= Parent
(Full_View
(Id
));
4849 -- The full view may have been rewritten as an object renaming
4851 if Nkind
(Full_D
) = N_Object_Renaming_Declaration
then
4852 return Name
(Full_D
);
4854 return Expression
(Full_D
);
4857 -- Otherwise we have no expression to return
4864 ----------------------
4865 -- Declaration_Node --
4866 ----------------------
4868 function Declaration_Node
(Id
: E
) return N
is
4872 if Ekind
(Id
) = E_Incomplete_Type
4873 and then Present
(Full_View
(Id
))
4875 P
:= Parent
(Full_View
(Id
));
4881 if Nkind
(P
) /= N_Selected_Component
4882 and then Nkind
(P
) /= N_Expanded_Name
4884 not (Nkind
(P
) = N_Defining_Program_Unit_Name
4885 and then Is_Child_Unit
(Id
))
4893 end Declaration_Node
;
4895 ---------------------
4896 -- Designated_Type --
4897 ---------------------
4899 function Designated_Type
(Id
: E
) return E
is
4903 Desig_Type
:= Directly_Designated_Type
(Id
);
4905 if Ekind
(Desig_Type
) = E_Incomplete_Type
4906 and then Present
(Full_View
(Desig_Type
))
4908 return Full_View
(Desig_Type
);
4910 elsif Is_Class_Wide_Type
(Desig_Type
)
4911 and then Ekind
(Etype
(Desig_Type
)) = E_Incomplete_Type
4912 and then Present
(Full_View
(Etype
(Desig_Type
)))
4913 and then Present
(Class_Wide_Type
(Full_View
(Etype
(Desig_Type
))))
4915 return Class_Wide_Type
(Full_View
(Etype
(Desig_Type
)));
4920 end Designated_Type
;
4922 -----------------------------
4923 -- Enclosing_Dynamic_Scope --
4924 -----------------------------
4926 function Enclosing_Dynamic_Scope
(Id
: E
) return E
is
4930 -- The following test is an error defense against some syntax
4931 -- errors that can leave scopes very messed up.
4933 if Id
= Standard_Standard
then
4937 -- Normal case, search enclosing scopes
4940 while S
/= Standard_Standard
4941 and then not Is_Dynamic_Scope
(S
)
4947 end Enclosing_Dynamic_Scope
;
4949 ----------------------
4950 -- Entry_Index_Type --
4951 ----------------------
4953 function Entry_Index_Type
(Id
: E
) return N
is
4955 pragma Assert
(Ekind
(Id
) = E_Entry_Family
);
4956 return Etype
(Discrete_Subtype_Definition
(Parent
(Id
)));
4957 end Entry_Index_Type
;
4959 ---------------------
4961 ---------------------
4963 function First_Component
(Id
: E
) return E
is
4968 (Is_Record_Type
(Id
) or else Is_Incomplete_Or_Private_Type
(Id
));
4970 Comp_Id
:= First_Entity
(Id
);
4971 while Present
(Comp_Id
) loop
4972 exit when Ekind
(Comp_Id
) = E_Component
;
4973 Comp_Id
:= Next_Entity
(Comp_Id
);
4977 end First_Component
;
4979 ------------------------
4980 -- First_Discriminant --
4981 ------------------------
4983 function First_Discriminant
(Id
: E
) return E
is
4988 (Has_Discriminants
(Id
)
4989 or else Has_Unknown_Discriminants
(Id
));
4991 Ent
:= First_Entity
(Id
);
4993 -- The discriminants are not necessarily contiguous, because access
4994 -- discriminants will generate itypes. They are not the first entities
4995 -- either, because tag and controller record must be ahead of them.
4997 if Chars
(Ent
) = Name_uTag
then
4998 Ent
:= Next_Entity
(Ent
);
5001 if Chars
(Ent
) = Name_uController
then
5002 Ent
:= Next_Entity
(Ent
);
5005 -- Skip all hidden stored discriminants if any
5007 while Present
(Ent
) loop
5008 exit when Ekind
(Ent
) = E_Discriminant
5009 and then not Is_Completely_Hidden
(Ent
);
5011 Ent
:= Next_Entity
(Ent
);
5014 pragma Assert
(Ekind
(Ent
) = E_Discriminant
);
5017 end First_Discriminant
;
5023 function First_Formal
(Id
: E
) return E
is
5028 (Is_Overloadable
(Id
)
5029 or else Ekind
(Id
) = E_Entry_Family
5030 or else Ekind
(Id
) = E_Subprogram_Body
5031 or else Ekind
(Id
) = E_Subprogram_Type
);
5033 if Ekind
(Id
) = E_Enumeration_Literal
then
5037 Formal
:= First_Entity
(Id
);
5039 if Present
(Formal
) and then Is_Formal
(Formal
) then
5047 -------------------------------
5048 -- First_Stored_Discriminant --
5049 -------------------------------
5051 function First_Stored_Discriminant
(Id
: E
) return E
is
5054 function Has_Completely_Hidden_Discriminant
(Id
: E
) return Boolean;
5055 -- Scans the Discriminants to see whether any are Completely_Hidden
5056 -- (the mechanism for describing non-specified stored discriminants)
5058 ----------------------------------------
5059 -- Has_Completely_Hidden_Discriminant --
5060 ----------------------------------------
5062 function Has_Completely_Hidden_Discriminant
(Id
: E
) return Boolean is
5063 Ent
: Entity_Id
:= Id
;
5066 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
5068 while Present
(Ent
) and then Ekind
(Ent
) = E_Discriminant
loop
5069 if Is_Completely_Hidden
(Ent
) then
5073 Ent
:= Next_Entity
(Ent
);
5077 end Has_Completely_Hidden_Discriminant
;
5079 -- Start of processing for First_Stored_Discriminant
5083 (Has_Discriminants
(Id
)
5084 or else Has_Unknown_Discriminants
(Id
));
5086 Ent
:= First_Entity
(Id
);
5088 if Chars
(Ent
) = Name_uTag
then
5089 Ent
:= Next_Entity
(Ent
);
5092 if Chars
(Ent
) = Name_uController
then
5093 Ent
:= Next_Entity
(Ent
);
5096 if Has_Completely_Hidden_Discriminant
(Ent
) then
5098 while Present
(Ent
) loop
5099 exit when Is_Completely_Hidden
(Ent
);
5100 Ent
:= Next_Entity
(Ent
);
5105 pragma Assert
(Ekind
(Ent
) = E_Discriminant
);
5108 end First_Stored_Discriminant
;
5114 function First_Subtype
(Id
: E
) return E
is
5115 B
: constant Entity_Id
:= Base_Type
(Id
);
5116 F
: constant Node_Id
:= Freeze_Node
(B
);
5120 -- If the base type has no freeze node, it is a type in standard,
5121 -- and always acts as its own first subtype unless it is one of
5122 -- the predefined integer types. If the type is formal, it is also
5123 -- a first subtype, and its base type has no freeze node. On the other
5124 -- hand, a subtype of a generic formal is not its own first_subtype.
5125 -- Its base type, if anonymous, is attached to the formal type decl.
5126 -- from which the first subtype is obtained.
5130 if B
= Base_Type
(Standard_Integer
) then
5131 return Standard_Integer
;
5133 elsif B
= Base_Type
(Standard_Long_Integer
) then
5134 return Standard_Long_Integer
;
5136 elsif B
= Base_Type
(Standard_Short_Short_Integer
) then
5137 return Standard_Short_Short_Integer
;
5139 elsif B
= Base_Type
(Standard_Short_Integer
) then
5140 return Standard_Short_Integer
;
5142 elsif B
= Base_Type
(Standard_Long_Long_Integer
) then
5143 return Standard_Long_Long_Integer
;
5145 elsif Is_Generic_Type
(Id
) then
5146 if Present
(Parent
(B
)) then
5147 return Defining_Identifier
(Parent
(B
));
5149 return Defining_Identifier
(Associated_Node_For_Itype
(B
));
5156 -- Otherwise we check the freeze node, if it has a First_Subtype_Link
5157 -- then we use that link, otherwise (happens with some Itypes), we use
5158 -- the base type itself.
5161 Ent
:= First_Subtype_Link
(F
);
5163 if Present
(Ent
) then
5171 -------------------------------------
5172 -- Get_Attribute_Definition_Clause --
5173 -------------------------------------
5175 function Get_Attribute_Definition_Clause
5177 Id
: Attribute_Id
) return Node_Id
5182 N
:= First_Rep_Item
(E
);
5183 while Present
(N
) loop
5184 if Nkind
(N
) = N_Attribute_Definition_Clause
5185 and then Get_Attribute_Id
(Chars
(N
)) = Id
5194 end Get_Attribute_Definition_Clause
;
5196 --------------------
5197 -- Get_Rep_Pragma --
5198 --------------------
5200 function Get_Rep_Pragma
(E
: Entity_Id
; Nam
: Name_Id
) return Node_Id
is
5204 N
:= First_Rep_Item
(E
);
5205 while Present
(N
) loop
5206 if Nkind
(N
) = N_Pragma
and then Chars
(N
) = Nam
then
5216 ------------------------
5217 -- Has_Attach_Handler --
5218 ------------------------
5220 function Has_Attach_Handler
(Id
: E
) return B
is
5224 pragma Assert
(Is_Protected_Type
(Id
));
5226 Ritem
:= First_Rep_Item
(Id
);
5227 while Present
(Ritem
) loop
5228 if Nkind
(Ritem
) = N_Pragma
5229 and then Chars
(Ritem
) = Name_Attach_Handler
5233 Ritem
:= Next_Rep_Item
(Ritem
);
5238 end Has_Attach_Handler
;
5240 -------------------------------------
5241 -- Has_Attribute_Definition_Clause --
5242 -------------------------------------
5244 function Has_Attribute_Definition_Clause
5246 Id
: Attribute_Id
) return Boolean
5249 return Present
(Get_Attribute_Definition_Clause
(E
, Id
));
5250 end Has_Attribute_Definition_Clause
;
5256 function Has_Entries
(Id
: E
) return B
is
5257 Result
: Boolean := False;
5261 pragma Assert
(Is_Concurrent_Type
(Id
));
5263 Ent
:= First_Entity
(Id
);
5264 while Present
(Ent
) loop
5265 if Is_Entry
(Ent
) then
5270 Ent
:= Next_Entity
(Ent
);
5276 ----------------------------
5277 -- Has_Foreign_Convention --
5278 ----------------------------
5280 function Has_Foreign_Convention
(Id
: E
) return B
is
5282 return Convention
(Id
) >= Foreign_Convention
'First;
5283 end Has_Foreign_Convention
;
5285 ---------------------------
5286 -- Has_Interrupt_Handler --
5287 ---------------------------
5289 function Has_Interrupt_Handler
(Id
: E
) return B
is
5293 pragma Assert
(Is_Protected_Type
(Id
));
5295 Ritem
:= First_Rep_Item
(Id
);
5296 while Present
(Ritem
) loop
5297 if Nkind
(Ritem
) = N_Pragma
5298 and then Chars
(Ritem
) = Name_Interrupt_Handler
5302 Ritem
:= Next_Rep_Item
(Ritem
);
5307 end Has_Interrupt_Handler
;
5309 --------------------------
5310 -- Has_Private_Ancestor --
5311 --------------------------
5313 function Has_Private_Ancestor
(Id
: E
) return B
is
5314 R
: constant Entity_Id
:= Root_Type
(Id
);
5315 T1
: Entity_Id
:= Id
;
5319 if Is_Private_Type
(T1
) then
5329 end Has_Private_Ancestor
;
5331 --------------------
5332 -- Has_Rep_Pragma --
5333 --------------------
5335 function Has_Rep_Pragma
(E
: Entity_Id
; Nam
: Name_Id
) return Boolean is
5337 return Present
(Get_Rep_Pragma
(E
, Nam
));
5340 ------------------------------
5341 -- Implementation_Base_Type --
5342 ------------------------------
5344 function Implementation_Base_Type
(Id
: E
) return E
is
5349 Bastyp
:= Base_Type
(Id
);
5351 if Is_Incomplete_Or_Private_Type
(Bastyp
) then
5352 Imptyp
:= Underlying_Type
(Bastyp
);
5354 -- If we have an implementation type, then just return it,
5355 -- otherwise we return the Base_Type anyway. This can only
5356 -- happen in error situations and should avoid some error bombs.
5358 if Present
(Imptyp
) then
5359 return Base_Type
(Imptyp
);
5367 end Implementation_Base_Type
;
5369 -----------------------
5370 -- Is_Always_Inlined --
5371 -----------------------
5373 function Is_Always_Inlined
(Id
: E
) return B
is
5377 Item
:= First_Rep_Item
(Id
);
5378 while Present
(Item
) loop
5379 if Nkind
(Item
) = N_Pragma
5380 and then Get_Pragma_Id
(Chars
(Item
)) = Pragma_Inline_Always
5385 Next_Rep_Item
(Item
);
5389 end Is_Always_Inlined
;
5391 ---------------------
5392 -- Is_Boolean_Type --
5393 ---------------------
5395 function Is_Boolean_Type
(Id
: E
) return B
is
5397 return Root_Type
(Id
) = Standard_Boolean
;
5398 end Is_Boolean_Type
;
5400 ---------------------
5401 -- Is_By_Copy_Type --
5402 ---------------------
5404 function Is_By_Copy_Type
(Id
: E
) return B
is
5406 -- If Id is a private type whose full declaration has not been seen,
5407 -- we assume for now that it is not a By_Copy type. Clearly this
5408 -- attribute should not be used before the type is frozen, but it is
5409 -- needed to build the associated record of a protected type. Another
5410 -- place where some lookahead for a full view is needed ???
5413 Is_Elementary_Type
(Id
)
5414 or else (Is_Private_Type
(Id
)
5415 and then Present
(Underlying_Type
(Id
))
5416 and then Is_Elementary_Type
(Underlying_Type
(Id
)));
5417 end Is_By_Copy_Type
;
5419 --------------------------
5420 -- Is_By_Reference_Type --
5421 --------------------------
5423 function Is_By_Reference_Type
(Id
: E
) return B
is
5424 Btype
: constant Entity_Id
:= Base_Type
(Id
);
5427 if Error_Posted
(Id
)
5428 or else Error_Posted
(Btype
)
5432 elsif Is_Private_Type
(Btype
) then
5434 Utyp
: constant Entity_Id
:= Underlying_Type
(Btype
);
5440 return Is_By_Reference_Type
(Utyp
);
5444 elsif Is_Concurrent_Type
(Btype
) then
5447 elsif Is_Record_Type
(Btype
) then
5448 if Is_Limited_Record
(Btype
)
5449 or else Is_Tagged_Type
(Btype
)
5450 or else Is_Volatile
(Btype
)
5459 C
:= First_Component
(Btype
);
5460 while Present
(C
) loop
5461 if Is_By_Reference_Type
(Etype
(C
))
5462 or else Is_Volatile
(Etype
(C
))
5467 C
:= Next_Component
(C
);
5474 elsif Is_Array_Type
(Btype
) then
5477 or else Is_By_Reference_Type
(Component_Type
(Btype
))
5478 or else Is_Volatile
(Component_Type
(Btype
))
5479 or else Has_Volatile_Components
(Btype
);
5484 end Is_By_Reference_Type
;
5486 ---------------------
5487 -- Is_Derived_Type --
5488 ---------------------
5490 function Is_Derived_Type
(Id
: E
) return B
is
5494 if Base_Type
(Id
) /= Root_Type
(Id
)
5495 and then not Is_Generic_Type
(Id
)
5496 and then not Is_Class_Wide_Type
(Id
)
5498 if not Is_Numeric_Type
(Root_Type
(Id
)) then
5502 Par
:= Parent
(First_Subtype
(Id
));
5504 return Present
(Par
)
5505 and then Nkind
(Par
) = N_Full_Type_Declaration
5506 and then Nkind
(Type_Definition
(Par
))
5507 = N_Derived_Type_Definition
;
5513 end Is_Derived_Type
;
5515 ----------------------
5516 -- Is_Dynamic_Scope --
5517 ----------------------
5519 function Is_Dynamic_Scope
(Id
: E
) return B
is
5522 Ekind
(Id
) = E_Block
5524 Ekind
(Id
) = E_Function
5526 Ekind
(Id
) = E_Procedure
5528 Ekind
(Id
) = E_Subprogram_Body
5530 Ekind
(Id
) = E_Task_Type
5532 Ekind
(Id
) = E_Entry
5534 Ekind
(Id
) = E_Entry_Family
;
5535 end Is_Dynamic_Scope
;
5537 --------------------
5538 -- Is_Entity_Name --
5539 --------------------
5541 function Is_Entity_Name
(N
: Node_Id
) return Boolean is
5542 Kind
: constant Node_Kind
:= Nkind
(N
);
5545 -- Identifiers, operator symbols, expanded names are entity names
5547 return Kind
= N_Identifier
5548 or else Kind
= N_Operator_Symbol
5549 or else Kind
= N_Expanded_Name
5551 -- Attribute references are entity names if they refer to an entity.
5552 -- Note that we don't do this by testing for the presence of the
5553 -- Entity field in the N_Attribute_Reference node, since it may not
5554 -- have been set yet.
5556 or else (Kind
= N_Attribute_Reference
5557 and then Is_Entity_Attribute_Name
(Attribute_Name
(N
)));
5560 ---------------------------
5561 -- Is_Indefinite_Subtype --
5562 ---------------------------
5564 function Is_Indefinite_Subtype
(Id
: Entity_Id
) return B
is
5565 K
: constant Entity_Kind
:= Ekind
(Id
);
5568 if Is_Constrained
(Id
) then
5571 elsif K
in Array_Kind
5572 or else K
in Class_Wide_Kind
5573 or else Has_Unknown_Discriminants
(Id
)
5577 -- Known discriminants: indefinite if there are no default values
5579 elsif K
in Record_Kind
5580 or else Is_Incomplete_Or_Private_Type
(Id
)
5581 or else Is_Concurrent_Type
(Id
)
5583 return (Has_Discriminants
(Id
)
5584 and then No
(Discriminant_Default_Value
(First_Discriminant
(Id
))));
5589 end Is_Indefinite_Subtype
;
5591 ---------------------
5592 -- Is_Limited_Type --
5593 ---------------------
5595 function Is_Limited_Type
(Id
: E
) return B
is
5596 Btype
: constant E
:= Base_Type
(Id
);
5599 if not Is_Type
(Id
) then
5602 elsif Ekind
(Btype
) = E_Limited_Private_Type
5603 or else Is_Limited_Composite
(Btype
)
5607 elsif Is_Concurrent_Type
(Btype
) then
5610 -- Otherwise we will look around to see if there is some other reason
5611 -- for it to be limited, except that if an error was posted on the
5612 -- entity, then just assume it is non-limited, because it can cause
5613 -- trouble to recurse into a murky erroneous entity!
5615 elsif Error_Posted
(Id
) then
5618 elsif Is_Record_Type
(Btype
) then
5619 if Is_Limited_Record
(Root_Type
(Btype
)) then
5622 elsif Is_Class_Wide_Type
(Btype
) then
5623 return Is_Limited_Type
(Root_Type
(Btype
));
5630 C
:= First_Component
(Btype
);
5631 while Present
(C
) loop
5632 if Is_Limited_Type
(Etype
(C
)) then
5636 C
:= Next_Component
(C
);
5643 elsif Is_Array_Type
(Btype
) then
5644 return Is_Limited_Type
(Component_Type
(Btype
));
5649 end Is_Limited_Type
;
5655 function Is_Package
(Id
: E
) return B
is
5658 Ekind
(Id
) = E_Package
5660 Ekind
(Id
) = E_Generic_Package
;
5663 --------------------------
5664 -- Is_Protected_Private --
5665 --------------------------
5667 function Is_Protected_Private
(Id
: E
) return B
is
5669 pragma Assert
(Ekind
(Id
) = E_Component
);
5670 return Is_Protected_Type
(Scope
(Id
));
5671 end Is_Protected_Private
;
5673 ------------------------------
5674 -- Is_Protected_Record_Type --
5675 ------------------------------
5677 function Is_Protected_Record_Type
(Id
: E
) return B
is
5680 Is_Concurrent_Record_Type
(Id
)
5681 and then Is_Protected_Type
(Corresponding_Concurrent_Type
(Id
));
5682 end Is_Protected_Record_Type
;
5684 ---------------------------------
5685 -- Is_Return_By_Reference_Type --
5686 ---------------------------------
5688 function Is_Return_By_Reference_Type
(Id
: E
) return B
is
5689 Btype
: constant Entity_Id
:= Base_Type
(Id
);
5692 if Is_Private_Type
(Btype
) then
5694 Utyp
: constant Entity_Id
:= Underlying_Type
(Btype
);
5700 return Is_Return_By_Reference_Type
(Utyp
);
5704 elsif Is_Concurrent_Type
(Btype
) then
5707 elsif Is_Record_Type
(Btype
) then
5708 if Is_Limited_Record
(Btype
) then
5711 elsif Is_Class_Wide_Type
(Btype
) then
5712 return Is_Return_By_Reference_Type
(Root_Type
(Btype
));
5719 C
:= First_Component
(Btype
);
5720 while Present
(C
) loop
5721 if Is_Return_By_Reference_Type
(Etype
(C
)) then
5725 C
:= Next_Component
(C
);
5732 elsif Is_Array_Type
(Btype
) then
5733 return Is_Return_By_Reference_Type
(Component_Type
(Btype
));
5738 end Is_Return_By_Reference_Type
;
5740 --------------------
5741 -- Is_String_Type --
5742 --------------------
5744 function Is_String_Type
(Id
: E
) return B
is
5746 return Ekind
(Id
) in String_Kind
5747 or else (Is_Array_Type
(Id
)
5748 and then Number_Dimensions
(Id
) = 1
5749 and then Is_Character_Type
(Component_Type
(Id
)));
5752 -------------------------
5753 -- Is_Task_Record_Type --
5754 -------------------------
5756 function Is_Task_Record_Type
(Id
: E
) return B
is
5759 Is_Concurrent_Record_Type
(Id
)
5760 and then Is_Task_Type
(Corresponding_Concurrent_Type
(Id
));
5761 end Is_Task_Record_Type
;
5763 ------------------------
5764 -- Is_Wrapper_Package --
5765 ------------------------
5767 function Is_Wrapper_Package
(Id
: E
) return B
is
5769 return (Ekind
(Id
) = E_Package
5770 and then Present
(Related_Instance
(Id
)));
5771 end Is_Wrapper_Package
;
5773 --------------------
5774 -- Next_Component --
5775 --------------------
5777 function Next_Component
(Id
: E
) return E
is
5781 Comp_Id
:= Next_Entity
(Id
);
5782 while Present
(Comp_Id
) loop
5783 exit when Ekind
(Comp_Id
) = E_Component
;
5784 Comp_Id
:= Next_Entity
(Comp_Id
);
5790 -----------------------
5791 -- Next_Discriminant --
5792 -----------------------
5794 -- This function actually implements both Next_Discriminant and
5795 -- Next_Stored_Discriminant by making sure that the Discriminant
5796 -- returned is of the same variety as Id.
5798 function Next_Discriminant
(Id
: E
) return E
is
5800 -- Derived Tagged types with private extensions look like this...
5802 -- E_Discriminant d1
5803 -- E_Discriminant d2
5805 -- E_Discriminant d1
5806 -- E_Discriminant d2
5809 -- so it is critical not to go past the leading discriminants
5814 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
5817 D
:= Next_Entity
(D
);
5819 or else (Ekind
(D
) /= E_Discriminant
5820 and then not Is_Itype
(D
))
5825 exit when Ekind
(D
) = E_Discriminant
5826 and then (Is_Completely_Hidden
(D
) = Is_Completely_Hidden
(Id
));
5830 end Next_Discriminant
;
5836 function Next_Formal
(Id
: E
) return E
is
5840 -- Follow the chain of declared entities as long as the kind of
5841 -- the entity corresponds to a formal parameter. Skip internal
5842 -- entities that may have been created for implicit subtypes,
5843 -- in the process of analyzing default expressions.
5848 P
:= Next_Entity
(P
);
5850 if No
(P
) or else Is_Formal
(P
) then
5852 elsif not Is_Internal
(P
) then
5858 -----------------------------
5859 -- Next_Formal_With_Extras --
5860 -----------------------------
5862 function Next_Formal_With_Extras
(Id
: E
) return E
is
5864 if Present
(Extra_Formal
(Id
)) then
5865 return Extra_Formal
(Id
);
5867 return Next_Formal
(Id
);
5869 end Next_Formal_With_Extras
;
5875 function Next_Index
(Id
: Node_Id
) return Node_Id
is
5884 function Next_Literal
(Id
: E
) return E
is
5886 pragma Assert
(Nkind
(Id
) in N_Entity
);
5890 ------------------------------
5891 -- Next_Stored_Discriminant --
5892 ------------------------------
5894 function Next_Stored_Discriminant
(Id
: E
) return E
is
5896 -- See comment in Next_Discriminant
5898 return Next_Discriminant
(Id
);
5899 end Next_Stored_Discriminant
;
5901 -----------------------
5902 -- Number_Dimensions --
5903 -----------------------
5905 function Number_Dimensions
(Id
: E
) return Pos
is
5910 if Ekind
(Id
) in String_Kind
then
5915 T
:= First_Index
(Id
);
5916 while Present
(T
) loop
5923 end Number_Dimensions
;
5925 --------------------------
5926 -- Number_Discriminants --
5927 --------------------------
5929 function Number_Discriminants
(Id
: E
) return Pos
is
5935 Discr
:= First_Discriminant
(Id
);
5936 while Present
(Discr
) loop
5938 Discr
:= Next_Discriminant
(Discr
);
5942 end Number_Discriminants
;
5944 --------------------
5945 -- Number_Entries --
5946 --------------------
5948 function Number_Entries
(Id
: E
) return Nat
is
5953 pragma Assert
(Is_Concurrent_Type
(Id
));
5956 Ent
:= First_Entity
(Id
);
5957 while Present
(Ent
) loop
5958 if Is_Entry
(Ent
) then
5962 Ent
:= Next_Entity
(Ent
);
5968 --------------------
5969 -- Number_Formals --
5970 --------------------
5972 function Number_Formals
(Id
: E
) return Pos
is
5978 Formal
:= First_Formal
(Id
);
5979 while Present
(Formal
) loop
5981 Formal
:= Next_Formal
(Formal
);
5987 --------------------
5988 -- Parameter_Mode --
5989 --------------------
5991 function Parameter_Mode
(Id
: E
) return Formal_Kind
is
5996 ---------------------
5997 -- Record_Rep_Item --
5998 ---------------------
6000 procedure Record_Rep_Item
(E
: Entity_Id
; N
: Node_Id
) is
6002 Set_Next_Rep_Item
(N
, First_Rep_Item
(E
));
6003 Set_First_Rep_Item
(E
, N
);
6004 end Record_Rep_Item
;
6010 function Root_Type
(Id
: E
) return E
is
6014 pragma Assert
(Nkind
(Id
) in N_Entity
);
6016 T
:= Base_Type
(Id
);
6018 if Ekind
(T
) = E_Class_Wide_Type
then
6030 -- Following test catches some error cases resulting from
6033 elsif No
(Etyp
) then
6036 elsif Is_Private_Type
(T
) and then Etyp
= Full_View
(T
) then
6039 elsif Is_Private_Type
(Etyp
) and then Full_View
(Etyp
) = T
then
6045 -- Return if there is a circularity in the inheritance chain.
6046 -- This happens in some error situations and we do not want
6047 -- to get stuck in this loop.
6049 if T
= Base_Type
(Id
) then
6055 raise Program_Error
;
6062 function Scope_Depth
(Id
: E
) return Uint
is
6067 while Is_Record_Type
(Scop
) loop
6068 Scop
:= Scope
(Scop
);
6071 return Scope_Depth_Value
(Scop
);
6074 ---------------------
6075 -- Scope_Depth_Set --
6076 ---------------------
6078 function Scope_Depth_Set
(Id
: E
) return B
is
6080 return not Is_Record_Type
(Id
)
6081 and then Field22
(Id
) /= Union_Id
(Empty
);
6082 end Scope_Depth_Set
;
6084 -----------------------------
6085 -- Set_Component_Alignment --
6086 -----------------------------
6088 -- Component Alignment is encoded using two flags, Flag128/129 as
6089 -- follows. Note that both flags False = Align_Default, so that the
6090 -- default initialization of flags to False initializes component
6091 -- alignment to the default value as required.
6093 -- Flag128 Flag129 Value
6094 -- ------- ------- -----
6095 -- False False Calign_Default
6096 -- False True Calign_Component_Size
6097 -- True False Calign_Component_Size_4
6098 -- True True Calign_Storage_Unit
6100 procedure Set_Component_Alignment
(Id
: E
; V
: C
) is
6102 pragma Assert
((Is_Array_Type
(Id
) or else Is_Record_Type
(Id
))
6103 and then Id
= Base_Type
(Id
));
6106 when Calign_Default
=>
6107 Set_Flag128
(Id
, False);
6108 Set_Flag129
(Id
, False);
6110 when Calign_Component_Size
=>
6111 Set_Flag128
(Id
, False);
6112 Set_Flag129
(Id
, True);
6114 when Calign_Component_Size_4
=>
6115 Set_Flag128
(Id
, True);
6116 Set_Flag129
(Id
, False);
6118 when Calign_Storage_Unit
=>
6119 Set_Flag128
(Id
, True);
6120 Set_Flag129
(Id
, True);
6122 end Set_Component_Alignment
;
6128 function Size_Clause
(Id
: E
) return N
is
6130 return Rep_Clause
(Id
, Name_Size
);
6133 ------------------------
6134 -- Stream_Size_Clause --
6135 ------------------------
6137 function Stream_Size_Clause
(Id
: E
) return N
is
6139 return Rep_Clause
(Id
, Name_Stream_Size
);
6140 end Stream_Size_Clause
;
6146 function Subtype_Kind
(K
: Entity_Kind
) return Entity_Kind
is
6152 Kind
:= E_Access_Subtype
;
6156 Kind
:= E_Array_Subtype
;
6158 when E_Class_Wide_Type |
6159 E_Class_Wide_Subtype
=>
6160 Kind
:= E_Class_Wide_Subtype
;
6162 when E_Decimal_Fixed_Point_Type |
6163 E_Decimal_Fixed_Point_Subtype
=>
6164 Kind
:= E_Decimal_Fixed_Point_Subtype
;
6166 when E_Ordinary_Fixed_Point_Type |
6167 E_Ordinary_Fixed_Point_Subtype
=>
6168 Kind
:= E_Ordinary_Fixed_Point_Subtype
;
6170 when E_Private_Type |
6171 E_Private_Subtype
=>
6172 Kind
:= E_Private_Subtype
;
6174 when E_Limited_Private_Type |
6175 E_Limited_Private_Subtype
=>
6176 Kind
:= E_Limited_Private_Subtype
;
6178 when E_Record_Type_With_Private |
6179 E_Record_Subtype_With_Private
=>
6180 Kind
:= E_Record_Subtype_With_Private
;
6182 when E_Record_Type |
6184 Kind
:= E_Record_Subtype
;
6186 when E_String_Type |
6188 Kind
:= E_String_Subtype
;
6190 when Enumeration_Kind
=>
6191 Kind
:= E_Enumeration_Subtype
;
6194 Kind
:= E_Floating_Point_Subtype
;
6196 when Signed_Integer_Kind
=>
6197 Kind
:= E_Signed_Integer_Subtype
;
6199 when Modular_Integer_Kind
=>
6200 Kind
:= E_Modular_Integer_Subtype
;
6202 when Protected_Kind
=>
6203 Kind
:= E_Protected_Subtype
;
6206 Kind
:= E_Task_Subtype
;
6210 raise Program_Error
;
6216 -------------------------
6217 -- First_Tag_Component --
6218 -------------------------
6220 function First_Tag_Component
(Id
: E
) return E
is
6222 Typ
: Entity_Id
:= Id
;
6225 pragma Assert
(Is_Tagged_Type
(Typ
));
6227 if Is_Class_Wide_Type
(Typ
) then
6228 Typ
:= Root_Type
(Typ
);
6231 if Is_Private_Type
(Typ
) then
6232 Typ
:= Underlying_Type
(Typ
);
6235 Comp
:= First_Entity
(Typ
);
6236 while Present
(Comp
) loop
6237 if Is_Tag
(Comp
) then
6241 Comp
:= Next_Entity
(Comp
);
6244 -- No tag component found
6247 end First_Tag_Component
;
6249 ------------------------
6250 -- Next_Tag_Component --
6251 ------------------------
6253 function Next_Tag_Component
(Id
: E
) return E
is
6255 Typ
: constant Entity_Id
:= Scope
(Id
);
6258 pragma Assert
(Ekind
(Id
) = E_Component
6259 and then Is_Tagged_Type
(Typ
));
6261 Comp
:= Next_Entity
(Id
);
6262 while Present
(Comp
) loop
6263 if Is_Tag
(Comp
) then
6264 pragma Assert
(Chars
(Comp
) /= Name_uTag
);
6268 Comp
:= Next_Entity
(Comp
);
6271 -- No tag component found
6274 end Next_Tag_Component
;
6276 ---------------------
6277 -- Type_High_Bound --
6278 ---------------------
6280 function Type_High_Bound
(Id
: E
) return Node_Id
is
6282 if Nkind
(Scalar_Range
(Id
)) = N_Subtype_Indication
then
6283 return High_Bound
(Range_Expression
(Constraint
(Scalar_Range
(Id
))));
6285 return High_Bound
(Scalar_Range
(Id
));
6287 end Type_High_Bound
;
6289 --------------------
6290 -- Type_Low_Bound --
6291 --------------------
6293 function Type_Low_Bound
(Id
: E
) return Node_Id
is
6295 if Nkind
(Scalar_Range
(Id
)) = N_Subtype_Indication
then
6296 return Low_Bound
(Range_Expression
(Constraint
(Scalar_Range
(Id
))));
6298 return Low_Bound
(Scalar_Range
(Id
));
6302 ---------------------
6303 -- Underlying_Type --
6304 ---------------------
6306 function Underlying_Type
(Id
: E
) return E
is
6308 -- For record_with_private the underlying type is always the direct
6309 -- full view. Never try to take the full view of the parent it
6310 -- doesn't make sense.
6312 if Ekind
(Id
) = E_Record_Type_With_Private
then
6313 return Full_View
(Id
);
6315 elsif Ekind
(Id
) in Incomplete_Or_Private_Kind
then
6317 -- If we have an incomplete or private type with a full view,
6318 -- then we return the Underlying_Type of this full view
6320 if Present
(Full_View
(Id
)) then
6321 if Id
= Full_View
(Id
) then
6323 -- Previous error in declaration
6328 return Underlying_Type
(Full_View
(Id
));
6331 -- Otherwise check for the case where we have a derived type or
6332 -- subtype, and if so get the Underlying_Type of the parent type.
6334 elsif Etype
(Id
) /= Id
then
6335 return Underlying_Type
(Etype
(Id
));
6337 -- Otherwise we have an incomplete or private type that has
6338 -- no full view, which means that we have not encountered the
6339 -- completion, so return Empty to indicate the underlying type
6340 -- is not yet known.
6346 -- For non-incomplete, non-private types, return the type itself
6347 -- Also for entities that are not types at all return the entity
6353 end Underlying_Type
;
6355 ------------------------
6356 -- Write_Entity_Flags --
6357 ------------------------
6359 procedure Write_Entity_Flags
(Id
: Entity_Id
; Prefix
: String) is
6361 procedure W
(Flag_Name
: String; Flag
: Boolean);
6362 -- Write out given flag if it is set
6368 procedure W
(Flag_Name
: String; Flag
: Boolean) is
6372 Write_Str
(Flag_Name
);
6373 Write_Str
(" = True");
6378 -- Start of processing for Write_Entity_Flags
6381 if (Is_Array_Type
(Id
) or else Is_Record_Type
(Id
))
6382 and then Base_Type
(Id
) = Id
6385 Write_Str
("Component_Alignment = ");
6387 case Component_Alignment
(Id
) is
6388 when Calign_Default
=>
6389 Write_Str
("Calign_Default");
6391 when Calign_Component_Size
=>
6392 Write_Str
("Calign_Component_Size");
6394 when Calign_Component_Size_4
=>
6395 Write_Str
("Calign_Component_Size_4");
6397 when Calign_Storage_Unit
=>
6398 Write_Str
("Calign_Storage_Unit");
6404 W
("Address_Taken", Flag104
(Id
));
6405 W
("Body_Needed_For_SAL", Flag40
(Id
));
6406 W
("C_Pass_By_Copy", Flag125
(Id
));
6407 W
("Can_Never_Be_Null", Flag38
(Id
));
6408 W
("Checks_May_Be_Suppressed", Flag31
(Id
));
6409 W
("Debug_Info_Off", Flag166
(Id
));
6410 W
("Default_Expressions_Processed", Flag108
(Id
));
6411 W
("Delay_Cleanups", Flag114
(Id
));
6412 W
("Delay_Subprogram_Descriptors", Flag50
(Id
));
6413 W
("Depends_On_Private", Flag14
(Id
));
6414 W
("Discard_Names", Flag88
(Id
));
6415 W
("Elaborate_All_Desirable", Flag146
(Id
));
6416 W
("Elaboration_Entity_Required", Flag174
(Id
));
6417 W
("Entry_Accepted", Flag152
(Id
));
6418 W
("Finalize_Storage_Only", Flag158
(Id
));
6419 W
("From_With_Type", Flag159
(Id
));
6420 W
("Function_Returns_With_DSP", Flag169
(Id
));
6421 W
("Has_Aliased_Components", Flag135
(Id
));
6422 W
("Has_Alignment_Clause", Flag46
(Id
));
6423 W
("Has_All_Calls_Remote", Flag79
(Id
));
6424 W
("Has_Atomic_Components", Flag86
(Id
));
6425 W
("Has_Biased_Representation", Flag139
(Id
));
6426 W
("Has_Completion", Flag26
(Id
));
6427 W
("Has_Completion_In_Body", Flag71
(Id
));
6428 W
("Has_Complex_Representation", Flag140
(Id
));
6429 W
("Has_Component_Size_Clause", Flag68
(Id
));
6430 W
("Has_Contiguous_Rep", Flag181
(Id
));
6431 W
("Has_Controlled_Component", Flag43
(Id
));
6432 W
("Has_Controlling_Result", Flag98
(Id
));
6433 W
("Has_Convention_Pragma", Flag119
(Id
));
6434 W
("Has_Delayed_Freeze", Flag18
(Id
));
6435 W
("Has_Discriminants", Flag5
(Id
));
6436 W
("Has_Enumeration_Rep_Clause", Flag66
(Id
));
6437 W
("Has_Exit", Flag47
(Id
));
6438 W
("Has_External_Tag_Rep_Clause", Flag110
(Id
));
6439 W
("Has_Forward_Instantiation", Flag175
(Id
));
6440 W
("Has_Fully_Qualified_Name", Flag173
(Id
));
6441 W
("Has_Gigi_Rep_Item", Flag82
(Id
));
6442 W
("Has_Homonym", Flag56
(Id
));
6443 W
("Has_Machine_Radix_Clause", Flag83
(Id
));
6444 W
("Has_Master_Entity", Flag21
(Id
));
6445 W
("Has_Missing_Return", Flag142
(Id
));
6446 W
("Has_Nested_Block_With_Handler", Flag101
(Id
));
6447 W
("Has_Non_Standard_Rep", Flag75
(Id
));
6448 W
("Has_Object_Size_Clause", Flag172
(Id
));
6449 W
("Has_Per_Object_Constraint", Flag154
(Id
));
6450 W
("Has_Persistent_BSS", Flag188
(Id
));
6451 W
("Has_Pragma_Controlled", Flag27
(Id
));
6452 W
("Has_Pragma_Elaborate_Body", Flag150
(Id
));
6453 W
("Has_Pragma_Inline", Flag157
(Id
));
6454 W
("Has_Pragma_Pack", Flag121
(Id
));
6455 W
("Has_Pragma_Pure_Function", Flag179
(Id
));
6456 W
("Has_Pragma_Unreferenced", Flag180
(Id
));
6457 W
("Has_Primitive_Operations", Flag120
(Id
));
6458 W
("Has_Private_Declaration", Flag155
(Id
));
6459 W
("Has_Qualified_Name", Flag161
(Id
));
6460 W
("Has_Record_Rep_Clause", Flag65
(Id
));
6461 W
("Has_Recursive_Call", Flag143
(Id
));
6462 W
("Has_Size_Clause", Flag29
(Id
));
6463 W
("Has_Small_Clause", Flag67
(Id
));
6464 W
("Has_Specified_Layout", Flag100
(Id
));
6465 W
("Has_Specified_Stream_Input", Flag190
(Id
));
6466 W
("Has_Specified_Stream_Output", Flag191
(Id
));
6467 W
("Has_Specified_Stream_Read", Flag192
(Id
));
6468 W
("Has_Specified_Stream_Write", Flag193
(Id
));
6469 W
("Has_Storage_Size_Clause", Flag23
(Id
));
6470 W
("Has_Stream_Size_Clause", Flag184
(Id
));
6471 W
("Has_Subprogram_Descriptor", Flag93
(Id
));
6472 W
("Has_Task", Flag30
(Id
));
6473 W
("Has_Unchecked_Union", Flag123
(Id
));
6474 W
("Has_Unknown_Discriminants", Flag72
(Id
));
6475 W
("Has_Volatile_Components", Flag87
(Id
));
6476 W
("Has_Xref_Entry", Flag182
(Id
));
6477 W
("In_Package_Body", Flag48
(Id
));
6478 W
("In_Private_Part", Flag45
(Id
));
6479 W
("In_Use", Flag8
(Id
));
6480 W
("Is_AST_Entry", Flag132
(Id
));
6481 W
("Is_Abstract", Flag19
(Id
));
6482 W
("Is_Local_Anonymous_Access", Flag194
(Id
));
6483 W
("Is_Access_Constant", Flag69
(Id
));
6484 W
("Is_Ada_2005", Flag185
(Id
));
6485 W
("Is_Aliased", Flag15
(Id
));
6486 W
("Is_Asynchronous", Flag81
(Id
));
6487 W
("Is_Atomic", Flag85
(Id
));
6488 W
("Is_Bit_Packed_Array", Flag122
(Id
));
6489 W
("Is_CPP_Class", Flag74
(Id
));
6490 W
("Is_Called", Flag102
(Id
));
6491 W
("Is_Character_Type", Flag63
(Id
));
6492 W
("Is_Child_Unit", Flag73
(Id
));
6493 W
("Is_Class_Wide_Equivalent_Type", Flag35
(Id
));
6494 W
("Is_Compilation_Unit", Flag149
(Id
));
6495 W
("Is_Completely_Hidden", Flag103
(Id
));
6496 W
("Is_Concurrent_Record_Type", Flag20
(Id
));
6497 W
("Is_Constr_Subt_For_UN_Aliased", Flag141
(Id
));
6498 W
("Is_Constr_Subt_For_U_Nominal", Flag80
(Id
));
6499 W
("Is_Constrained", Flag12
(Id
));
6500 W
("Is_Constructor", Flag76
(Id
));
6501 W
("Is_Controlled", Flag42
(Id
));
6502 W
("Is_Controlling_Formal", Flag97
(Id
));
6503 W
("Is_Discrim_SO_Function", Flag176
(Id
));
6504 W
("Is_Dispatching_Operation", Flag6
(Id
));
6505 W
("Is_Eliminated", Flag124
(Id
));
6506 W
("Is_Entry_Formal", Flag52
(Id
));
6507 W
("Is_Exported", Flag99
(Id
));
6508 W
("Is_First_Subtype", Flag70
(Id
));
6509 W
("Is_For_Access_Subtype", Flag118
(Id
));
6510 W
("Is_Formal_Subprogram", Flag111
(Id
));
6511 W
("Is_Frozen", Flag4
(Id
));
6512 W
("Is_Generic_Actual_Type", Flag94
(Id
));
6513 W
("Is_Generic_Instance", Flag130
(Id
));
6514 W
("Is_Generic_Type", Flag13
(Id
));
6515 W
("Is_Hidden", Flag57
(Id
));
6516 W
("Is_Hidden_Open_Scope", Flag171
(Id
));
6517 W
("Is_Immediately_Visible", Flag7
(Id
));
6518 W
("Is_Imported", Flag24
(Id
));
6519 W
("Is_Inlined", Flag11
(Id
));
6520 W
("Is_Instantiated", Flag126
(Id
));
6521 W
("Is_Interface", Flag186
(Id
));
6522 W
("Is_Internal", Flag17
(Id
));
6523 W
("Is_Interrupt_Handler", Flag89
(Id
));
6524 W
("Is_Intrinsic_Subprogram", Flag64
(Id
));
6525 W
("Is_Itype", Flag91
(Id
));
6526 W
("Is_Known_Valid", Flag37
(Id
));
6527 W
("Is_Known_Valid", Flag170
(Id
));
6528 W
("Is_Limited_Composite", Flag106
(Id
));
6529 W
("Is_Limited_Record", Flag25
(Id
));
6530 W
("Is_Machine_Code_Subprogram", Flag137
(Id
));
6531 W
("Is_Non_Static_Subtype", Flag109
(Id
));
6532 W
("Is_Null_Init_Proc", Flag178
(Id
));
6533 W
("Is_Obsolescent", Flag153
(Id
));
6534 W
("Is_Optional_Parameter", Flag134
(Id
));
6535 W
("Is_Overriding_Operation", Flag39
(Id
));
6536 W
("Is_Package_Body_Entity", Flag160
(Id
));
6537 W
("Is_Packed", Flag51
(Id
));
6538 W
("Is_Packed_Array_Type", Flag138
(Id
));
6539 W
("Is_Potentially_Use_Visible", Flag9
(Id
));
6540 W
("Is_Preelaborated", Flag59
(Id
));
6541 W
("Is_Private_Composite", Flag107
(Id
));
6542 W
("Is_Private_Descendant", Flag53
(Id
));
6543 W
("Is_Public", Flag10
(Id
));
6544 W
("Is_Pure", Flag44
(Id
));
6545 W
("Is_Pure_Unit_Access_Type", Flag189
(Id
));
6546 W
("Is_Remote_Call_Interface", Flag62
(Id
));
6547 W
("Is_Remote_Types", Flag61
(Id
));
6548 W
("Is_Renaming_Of_Object", Flag112
(Id
));
6549 W
("Is_Shared_Passive", Flag60
(Id
));
6550 W
("Is_Statically_Allocated", Flag28
(Id
));
6551 W
("Is_Tag", Flag78
(Id
));
6552 W
("Is_Tagged_Type", Flag55
(Id
));
6553 W
("Is_Thread_Body", Flag77
(Id
));
6554 W
("Is_True_Constant", Flag163
(Id
));
6555 W
("Is_Unchecked_Union", Flag117
(Id
));
6556 W
("Is_Unsigned_Type", Flag144
(Id
));
6557 W
("Is_VMS_Exception", Flag133
(Id
));
6558 W
("Is_Valued_Procedure", Flag127
(Id
));
6559 W
("Is_Visible_Child_Unit", Flag116
(Id
));
6560 W
("Is_Volatile", Flag16
(Id
));
6561 W
("Kill_Elaboration_Checks", Flag32
(Id
));
6562 W
("Kill_Range_Checks", Flag33
(Id
));
6563 W
("Kill_Tag_Checks", Flag34
(Id
));
6564 W
("Machine_Radix_10", Flag84
(Id
));
6565 W
("Materialize_Entity", Flag168
(Id
));
6566 W
("Must_Be_On_Byte_Boundary", Flag183
(Id
));
6567 W
("Needs_Debug_Info", Flag147
(Id
));
6568 W
("Needs_No_Actuals", Flag22
(Id
));
6569 W
("Never_Set_In_Source", Flag115
(Id
));
6570 W
("No_Pool_Assigned", Flag131
(Id
));
6571 W
("No_Return", Flag113
(Id
));
6572 W
("No_Strict_Aliasing", Flag136
(Id
));
6573 W
("Non_Binary_Modulus", Flag58
(Id
));
6574 W
("Nonzero_Is_True", Flag162
(Id
));
6575 W
("Reachable", Flag49
(Id
));
6576 W
("Referenced", Flag156
(Id
));
6577 W
("Referenced_As_LHS", Flag36
(Id
));
6578 W
("Return_Present", Flag54
(Id
));
6579 W
("Returns_By_Ref", Flag90
(Id
));
6580 W
("Reverse_Bit_Order", Flag164
(Id
));
6581 W
("Sec_Stack_Needed_For_Return", Flag167
(Id
));
6582 W
("Size_Depends_On_Discriminant", Flag177
(Id
));
6583 W
("Size_Known_At_Compile_Time", Flag92
(Id
));
6584 W
("Strict_Alignment", Flag145
(Id
));
6585 W
("Suppress_Elaboration_Warnings", Flag148
(Id
));
6586 W
("Suppress_Init_Proc", Flag105
(Id
));
6587 W
("Suppress_Style_Checks", Flag165
(Id
));
6588 W
("Treat_As_Volatile", Flag41
(Id
));
6589 W
("Uses_Sec_Stack", Flag95
(Id
));
6590 W
("Vax_Float", Flag151
(Id
));
6591 W
("Warnings_Off", Flag96
(Id
));
6592 end Write_Entity_Flags
;
6594 -----------------------
6595 -- Write_Entity_Info --
6596 -----------------------
6598 procedure Write_Entity_Info
(Id
: Entity_Id
; Prefix
: String) is
6600 procedure Write_Attribute
(Which
: String; Nam
: E
);
6601 -- Write attribute value with given string name
6603 procedure Write_Kind
(Id
: Entity_Id
);
6604 -- Write Ekind field of entity
6606 procedure Write_Attribute
(Which
: String; Nam
: E
) is
6610 Write_Int
(Int
(Nam
));
6612 Write_Name
(Chars
(Nam
));
6614 end Write_Attribute
;
6616 procedure Write_Kind
(Id
: Entity_Id
) is
6617 K
: constant String := Entity_Kind
'Image (Ekind
(Id
));
6621 Write_Str
(" Kind ");
6623 if Is_Type
(Id
) and then Is_Tagged_Type
(Id
) then
6624 Write_Str
("TAGGED ");
6627 Write_Str
(K
(3 .. K
'Length));
6630 if Is_Type
(Id
) and then Depends_On_Private
(Id
) then
6631 Write_Str
("Depends_On_Private ");
6635 -- Start of processing for Write_Entity_Info
6639 Write_Attribute
("Name ", Id
);
6640 Write_Int
(Int
(Id
));
6644 Write_Attribute
(" Type ", Etype
(Id
));
6646 Write_Attribute
(" Scope ", Scope
(Id
));
6651 when Discrete_Kind
=>
6652 Write_Str
("Bounds: Id = ");
6654 if Present
(Scalar_Range
(Id
)) then
6655 Write_Int
(Int
(Type_Low_Bound
(Id
)));
6656 Write_Str
(" .. Id = ");
6657 Write_Int
(Int
(Type_High_Bound
(Id
)));
6659 Write_Str
("Empty");
6670 (" Component Type ", Component_Type
(Id
));
6673 Write_Str
(" Indices ");
6675 Index
:= First_Index
(Id
);
6676 while Present
(Index
) loop
6677 Write_Attribute
(" ", Etype
(Index
));
6678 Index
:= Next_Index
(Index
);
6686 (" Directly Designated Type ",
6687 Directly_Designated_Type
(Id
));
6690 when Overloadable_Kind
=>
6691 if Present
(Homonym
(Id
)) then
6692 Write_Str
(" Homonym ");
6693 Write_Name
(Chars
(Homonym
(Id
)));
6695 Write_Int
(Int
(Homonym
(Id
)));
6702 if Ekind
(Scope
(Id
)) in Record_Kind
then
6704 " Original_Record_Component ",
6705 Original_Record_Component
(Id
));
6706 Write_Int
(Int
(Original_Record_Component
(Id
)));
6710 when others => null;
6712 end Write_Entity_Info
;
6714 -----------------------
6715 -- Write_Field6_Name --
6716 -----------------------
6718 procedure Write_Field6_Name
(Id
: Entity_Id
) is
6719 pragma Warnings
(Off
, Id
);
6722 Write_Str
("First_Rep_Item");
6723 end Write_Field6_Name
;
6725 -----------------------
6726 -- Write_Field7_Name --
6727 -----------------------
6729 procedure Write_Field7_Name
(Id
: Entity_Id
) is
6730 pragma Warnings
(Off
, Id
);
6733 Write_Str
("Freeze_Node");
6734 end Write_Field7_Name
;
6736 -----------------------
6737 -- Write_Field8_Name --
6738 -----------------------
6740 procedure Write_Field8_Name
(Id
: Entity_Id
) is
6745 Write_Str
("Normalized_First_Bit");
6749 E_Subprogram_Body
=>
6750 Write_Str
("Mechanism");
6753 Write_Str
("Associated_Node_For_Itype");
6756 Write_Str
("Dependent_Instances");
6759 Write_Str
("Hiding_Loop_Variable");
6762 Write_Str
("Field8??");
6764 end Write_Field8_Name
;
6766 -----------------------
6767 -- Write_Field9_Name --
6768 -----------------------
6770 procedure Write_Field9_Name
(Id
: Entity_Id
) is
6774 Write_Str
("Class_Wide_Type");
6777 E_Generic_Function |
6779 E_Generic_Procedure |
6782 Write_Str
("Renaming_Map");
6785 Write_Str
("Current_Value");
6788 Write_Str
("Field9??");
6790 end Write_Field9_Name
;
6792 ------------------------
6793 -- Write_Field10_Name --
6794 ------------------------
6796 procedure Write_Field10_Name
(Id
: Entity_Id
) is
6800 Write_Str
("Referenced_Object");
6802 when E_In_Parameter |
6804 Write_Str
("Discriminal_Link");
6810 Write_Str
("Handler_Records");
6814 Write_Str
("Normalized_Position_Max");
6817 Write_Str
("Field10??");
6819 end Write_Field10_Name
;
6821 ------------------------
6822 -- Write_Field11_Name --
6823 ------------------------
6825 procedure Write_Field11_Name
(Id
: Entity_Id
) is
6829 Write_Str
("Entry_Component");
6833 Write_Str
("Component_Bit_Offset");
6836 Write_Str
("Full_View");
6838 when E_Enumeration_Literal
=>
6839 Write_Str
("Enumeration_Pos");
6842 Write_Str
("Block_Node");
6848 Write_Str
("Protected_Body_Subprogram");
6850 when E_Generic_Package
=>
6851 Write_Str
("Generic_Homonym");
6854 Write_Str
("Full_View");
6857 Write_Str
("Field11??");
6859 end Write_Field11_Name
;
6861 ------------------------
6862 -- Write_Field12_Name --
6863 ------------------------
6865 procedure Write_Field12_Name
(Id
: Entity_Id
) is
6869 Write_Str
("Barrier_Function");
6871 when E_Enumeration_Literal
=>
6872 Write_Str
("Enumeration_Rep");
6879 E_In_Out_Parameter |
6883 Write_Str
("Esize");
6887 Write_Str
("Next_Inlined_Subprogram");
6890 Write_Str
("Associated_Formal_Package");
6893 Write_Str
("Field12??");
6895 end Write_Field12_Name
;
6897 ------------------------
6898 -- Write_Field13_Name --
6899 ------------------------
6901 procedure Write_Field13_Name
(Id
: Entity_Id
) is
6905 Write_Str
("RM_Size");
6909 Write_Str
("Component_Clause");
6911 when E_Enumeration_Literal
=>
6912 Write_Str
("Debug_Renaming_Link");
6915 if not Comes_From_Source
(Id
)
6917 Chars
(Id
) = Name_Op_Ne
6919 Write_Str
("Corresponding_Equality");
6921 elsif Comes_From_Source
(Id
) then
6922 Write_Str
("Elaboration_Entity");
6925 Write_Str
("Field13??");
6930 Write_Str
("Extra_Accessibility");
6934 Generic_Unit_Kind
=>
6935 Write_Str
("Elaboration_Entity");
6938 Write_Str
("Field13??");
6940 end Write_Field13_Name
;
6942 -----------------------
6943 -- Write_Field14_Name --
6944 -----------------------
6946 procedure Write_Field14_Name
(Id
: Entity_Id
) is
6954 Write_Str
("Alignment");
6958 Write_Str
("Normalized_Position");
6962 Write_Str
("First_Optional_Parameter");
6965 E_Generic_Package
=>
6966 Write_Str
("Shadow_Entities");
6969 Write_Str
("Field14??");
6971 end Write_Field14_Name
;
6973 ------------------------
6974 -- Write_Field15_Name --
6975 ------------------------
6977 procedure Write_Field15_Name
(Id
: Entity_Id
) is
6982 Write_Str
("Storage_Size_Variable");
6984 when Class_Wide_Kind |
6988 Write_Str
("Primitive_Operations");
6991 Write_Str
("DT_Entry_Count");
6993 when Decimal_Fixed_Point_Kind
=>
6994 Write_Str
("Scale_Value");
6996 when E_Discriminant
=>
6997 Write_Str
("Discriminant_Number");
7000 Write_Str
("Extra_Formal");
7004 Write_Str
("DT_Position");
7007 Write_Str
("Entry_Parameters_Type");
7009 when Enumeration_Kind
=>
7010 Write_Str
("Lit_Indexes");
7014 Write_Str
("Related_Instance");
7016 when E_Protected_Type
=>
7017 Write_Str
("Entry_Bodies_Array");
7019 when E_String_Literal_Subtype
=>
7020 Write_Str
("String_Literal_Low_Bound");
7023 Write_Str
("Shared_Var_Read_Proc");
7026 Write_Str
("Field15??");
7028 end Write_Field15_Name
;
7030 ------------------------
7031 -- Write_Field16_Name --
7032 ------------------------
7034 procedure Write_Field16_Name
(Id
: Entity_Id
) is
7038 Write_Str
("Entry_Formal");
7042 Write_Str
("DTC_Entity");
7047 Write_Str
("First_Private_Entity");
7049 when E_Record_Type |
7050 E_Record_Type_With_Private
=>
7051 Write_Str
("Access_Disp_Table");
7053 when E_String_Literal_Subtype
=>
7054 Write_Str
("String_Literal_Length");
7056 when Enumeration_Kind
=>
7057 Write_Str
("Lit_Strings");
7061 Write_Str
("Unset_Reference");
7063 when E_Record_Subtype |
7064 E_Class_Wide_Subtype
=>
7065 Write_Str
("Cloned_Subtype");
7068 Write_Str
("Field16??");
7070 end Write_Field16_Name
;
7072 ------------------------
7073 -- Write_Field17_Name --
7074 ------------------------
7076 procedure Write_Field17_Name
(Id
: Entity_Id
) is
7080 Write_Str
("Digits_Value");
7083 Write_Str
("Prival");
7085 when E_Discriminant
=>
7086 Write_Str
("Discriminal");
7095 E_Generic_Function |
7097 E_Generic_Procedure |
7106 E_Subprogram_Type
=>
7107 Write_Str
("First_Entity");
7110 Write_Str
("First_Index");
7112 when E_Protected_Body
=>
7113 Write_Str
("Object_Ref");
7115 when Enumeration_Kind
=>
7116 Write_Str
("First_Literal");
7119 Write_Str
("Master_Id");
7121 when Modular_Integer_Kind
=>
7122 Write_Str
("Modulus");
7126 E_Generic_In_Out_Parameter |
7128 Write_Str
("Actual_Subtype");
7130 when E_Incomplete_Type
=>
7131 Write_Str
("Non-limited view");
7134 Write_Str
("Field17??");
7136 end Write_Field17_Name
;
7138 -----------------------
7139 -- Write_Field18_Name --
7140 -----------------------
7142 procedure Write_Field18_Name
(Id
: Entity_Id
) is
7145 when E_Enumeration_Literal |
7149 Write_Str
("Alias");
7151 when E_Record_Type
=>
7152 Write_Str
("Corresponding_Concurrent_Type");
7154 when E_Entry_Index_Parameter
=>
7155 Write_Str
("Entry_Index_Constant");
7157 when E_Class_Wide_Subtype |
7158 E_Access_Protected_Subprogram_Type |
7159 E_Access_Subprogram_Type |
7161 Write_Str
("Equivalent_Type");
7163 when Fixed_Point_Kind
=>
7164 Write_Str
("Delta_Value");
7168 Write_Str
("Renamed_Object");
7172 E_Generic_Function |
7173 E_Generic_Procedure |
7174 E_Generic_Package
=>
7175 Write_Str
("Renamed_Entity");
7177 when Incomplete_Or_Private_Kind
=>
7178 Write_Str
("Private_Dependents");
7180 when Concurrent_Kind
=>
7181 Write_Str
("Corresponding_Record_Type");
7186 Write_Str
("Enclosing_Scope");
7189 Write_Str
("Field18??");
7191 end Write_Field18_Name
;
7193 -----------------------
7194 -- Write_Field19_Name --
7195 -----------------------
7197 procedure Write_Field19_Name
(Id
: Entity_Id
) is
7202 Write_Str
("Related_Array_Object");
7209 Write_Str
("Finalization_Chain_Entity");
7211 when E_Constant | E_Variable
=>
7212 Write_Str
("Size_Check_Code");
7214 when E_Discriminant
=>
7215 Write_Str
("Corresponding_Discriminant");
7218 E_Generic_Package
=>
7219 Write_Str
("Body_Entity");
7221 when E_Package_Body |
7223 Write_Str
("Spec_Entity");
7225 when Private_Kind
=>
7226 Write_Str
("Underlying_Full_View");
7228 when E_Record_Type
=>
7229 Write_Str
("Parent_Subtype");
7232 Write_Str
("Field19??");
7234 end Write_Field19_Name
;
7236 -----------------------
7237 -- Write_Field20_Name --
7238 -----------------------
7240 procedure Write_Field20_Name
(Id
: Entity_Id
) is
7244 Write_Str
("Component_Type");
7246 when E_In_Parameter |
7247 E_Generic_In_Parameter
=>
7248 Write_Str
("Default_Value");
7251 Write_Str
("Directly_Designated_Type");
7254 Write_Str
("Discriminant_Checking_Func");
7256 when E_Discriminant
=>
7257 Write_Str
("Discriminant_Default_Value");
7266 E_Generic_Function |
7268 E_Generic_Procedure |
7277 E_Subprogram_Type
=>
7279 Write_Str
("Last_Entity");
7282 Write_Str
("Scalar_Range");
7285 Write_Str
("Register_Exception_Call");
7288 Write_Str
("Field20??");
7290 end Write_Field20_Name
;
7292 -----------------------
7293 -- Write_Field21_Name --
7294 -----------------------
7296 procedure Write_Field21_Name
(Id
: Entity_Id
) is
7302 E_Generic_Function |
7304 E_Generic_Procedure |
7306 Write_Str
("Interface_Name");
7308 when Concurrent_Kind |
7309 Incomplete_Or_Private_Kind |
7313 Write_Str
("Discriminant_Constraint");
7316 Write_Str
("Accept_Address");
7318 when Fixed_Point_Kind
=>
7319 Write_Str
("Small_Value");
7321 when E_In_Parameter
=>
7322 Write_Str
("Default_Expr_Function");
7325 Modular_Integer_Kind
=>
7326 Write_Str
("Original_Array_Type");
7328 when E_Access_Subprogram_Type |
7329 E_Access_Protected_Subprogram_Type
=>
7330 Write_Str
("Original_Access_Type");
7333 Write_Str
("Field21??");
7335 end Write_Field21_Name
;
7337 -----------------------
7338 -- Write_Field22_Name --
7339 -----------------------
7341 procedure Write_Field22_Name
(Id
: Entity_Id
) is
7345 Write_Str
("Associated_Storage_Pool");
7348 Write_Str
("Component_Size");
7352 Write_Str
("Original_Record_Component");
7354 when E_Enumeration_Literal
=>
7355 Write_Str
("Enumeration_Rep_Expr");
7358 Write_Str
("Exception_Code");
7361 Write_Str
("Protected_Formal");
7363 when E_Record_Type
=>
7364 Write_Str
("Corresponding_Remote_Type");
7374 E_Generic_Function |
7375 E_Generic_Procedure |
7380 Write_Str
("Scope_Depth_Value");
7382 when E_Record_Type_With_Private |
7383 E_Record_Subtype_With_Private |
7386 E_Limited_Private_Type |
7387 E_Limited_Private_Subtype
=>
7388 Write_Str
("Private_View");
7391 Write_Str
("Shared_Var_Assign_Proc");
7394 Write_Str
("Field22??");
7396 end Write_Field22_Name
;
7398 ------------------------
7399 -- Write_Field23_Name --
7400 ------------------------
7402 procedure Write_Field23_Name
(Id
: Entity_Id
) is
7406 Write_Str
("Associated_Final_Chain");
7409 Write_Str
("Packed_Array_Type");
7412 Write_Str
("Entry_Cancel_Parameter");
7415 Write_Str
("Protected_Operation");
7417 when E_Discriminant
=>
7418 Write_Str
("CR_Discriminant");
7420 when E_Enumeration_Type
=>
7421 Write_Str
("Enum_Pos_To_Rep");
7425 Write_Str
("Extra_Constrained");
7427 when E_Generic_Function |
7429 E_Generic_Procedure
=>
7430 Write_Str
("Inner_Instances");
7432 when Concurrent_Kind |
7433 Incomplete_Or_Private_Kind |
7437 Write_Str
("Stored_Constraint");
7441 Write_Str
("Generic_Renamings");
7444 if Is_Generic_Instance
(Id
) then
7445 Write_Str
("Generic_Renamings");
7447 Write_Str
("Limited Views");
7450 -- What about Privals_Chain for protected operations ???
7453 Write_Str
("Privals_Chain");
7456 Write_Str
("Field23??");
7458 end Write_Field23_Name
;
7460 ------------------------
7461 -- Write_Field24_Name --
7462 ------------------------
7464 procedure Write_Field24_Name
(Id
: Entity_Id
) is
7467 when E_Record_Type |
7469 E_Record_Type_With_Private |
7470 E_Record_Subtype_With_Private
=>
7471 Write_Str
("Abstract_Interfaces");
7473 when Subprogram_Kind
=>
7474 Write_Str
("Obsolescent_Warning");
7477 Write_Str
("Task_Body_Procedure");
7480 Write_Str
("Field24??");
7482 end Write_Field24_Name
;
7484 ------------------------
7485 -- Write_Field25_Name --
7486 ------------------------
7488 procedure Write_Field25_Name
(Id
: Entity_Id
) is
7493 Write_Str
("Abstract_Interface_Alias");
7496 Write_Str
("Field25??");
7498 end Write_Field25_Name
;
7500 ------------------------
7501 -- Write_Field26_Name --
7502 ------------------------
7504 procedure Write_Field26_Name
(Id
: Entity_Id
) is
7508 Write_Str
("Field26??");
7510 end Write_Field26_Name
;
7512 ------------------------
7513 -- Write_Field27_Name --
7514 ------------------------
7516 procedure Write_Field27_Name
(Id
: Entity_Id
) is
7520 Write_Str
("Field27??");
7522 end Write_Field27_Name
;
7524 -------------------------
7525 -- Iterator Procedures --
7526 -------------------------
7528 procedure Proc_Next_Component
(N
: in out Node_Id
) is
7530 N
:= Next_Component
(N
);
7531 end Proc_Next_Component
;
7533 procedure Proc_Next_Discriminant
(N
: in out Node_Id
) is
7535 N
:= Next_Discriminant
(N
);
7536 end Proc_Next_Discriminant
;
7538 procedure Proc_Next_Formal
(N
: in out Node_Id
) is
7540 N
:= Next_Formal
(N
);
7541 end Proc_Next_Formal
;
7543 procedure Proc_Next_Formal_With_Extras
(N
: in out Node_Id
) is
7545 N
:= Next_Formal_With_Extras
(N
);
7546 end Proc_Next_Formal_With_Extras
;
7548 procedure Proc_Next_Index
(N
: in out Node_Id
) is
7550 N
:= Next_Index
(N
);
7551 end Proc_Next_Index
;
7553 procedure Proc_Next_Inlined_Subprogram
(N
: in out Node_Id
) is
7555 N
:= Next_Inlined_Subprogram
(N
);
7556 end Proc_Next_Inlined_Subprogram
;
7558 procedure Proc_Next_Literal
(N
: in out Node_Id
) is
7560 N
:= Next_Literal
(N
);
7561 end Proc_Next_Literal
;
7563 procedure Proc_Next_Stored_Discriminant
(N
: in out Node_Id
) is
7565 N
:= Next_Stored_Discriminant
(N
);
7566 end Proc_Next_Stored_Discriminant
;