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, 59 Temple Place - Suite 330, Boston, --
20 -- MA 02111-1307, 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 Node16
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
218 ---------------------------------------------
219 -- Usage of Flags in Defining Entity Nodes --
220 ---------------------------------------------
222 -- All flags are unique, there is no overlaying, so each flag is physically
223 -- present in every entity. However, for many of the flags, it only makes
224 -- sense for them to be set true for certain subsets of entity kinds. See
225 -- the spec of Einfo for further details.
227 -- Note: Flag1-Flag3 are absent from this list, since these flag positions
228 -- are used for the flags Analyzed, Comes_From_Source, and Error_Posted,
229 -- which are common to all nodes, including entity nodes.
232 -- Has_Discriminants Flag5
233 -- Is_Dispatching_Operation Flag6
234 -- Is_Immediately_Visible Flag7
236 -- Is_Potentially_Use_Visible Flag9
240 -- Is_Constrained Flag12
241 -- Is_Generic_Type Flag13
242 -- Depends_On_Private Flag14
244 -- Is_Volatile Flag16
245 -- Is_Internal Flag17
246 -- Has_Delayed_Freeze Flag18
247 -- Is_Abstract Flag19
248 -- Is_Concurrent_Record_Type Flag20
250 -- Has_Master_Entity Flag21
251 -- Needs_No_Actuals Flag22
252 -- Has_Storage_Size_Clause Flag23
253 -- Is_Imported Flag24
254 -- Is_Limited_Record Flag25
255 -- Has_Completion Flag26
256 -- Has_Pragma_Controlled Flag27
257 -- Is_Statically_Allocated Flag28
258 -- Has_Size_Clause Flag29
261 -- Checks_May_Be_Suppressed Flag31
262 -- Kill_Elaboration_Checks Flag32
263 -- Kill_Range_Checks Flag33
264 -- Kill_Tag_Checks Flag34
265 -- Is_Class_Wide_Equivalent_Type Flag35
266 -- Referenced_As_LHS Flag36
267 -- Is_Known_Non_Null Flag37
268 -- Can_Never_Be_Null Flag38
269 -- Is_Overriding_Operation Flag39
270 -- Body_Needed_For_SAL Flag40
272 -- Treat_As_Volatile Flag41
273 -- Is_Controlled Flag42
274 -- Has_Controlled_Component Flag43
276 -- In_Private_Part Flag45
277 -- Has_Alignment_Clause Flag46
279 -- In_Package_Body Flag48
281 -- Delay_Subprogram_Descriptors Flag50
284 -- Is_Entry_Formal Flag52
285 -- Is_Private_Descendant Flag53
286 -- Return_Present Flag54
287 -- Is_Tagged_Type Flag55
288 -- Has_Homonym Flag56
290 -- Non_Binary_Modulus Flag58
291 -- Is_Preelaborated Flag59
292 -- Is_Shared_Passive Flag60
294 -- Is_Remote_Types Flag61
295 -- Is_Remote_Call_Interface Flag62
296 -- Is_Character_Type Flag63
297 -- Is_Intrinsic_Subprogram Flag64
298 -- Has_Record_Rep_Clause Flag65
299 -- Has_Enumeration_Rep_Clause Flag66
300 -- Has_Small_Clause Flag67
301 -- Has_Component_Size_Clause Flag68
302 -- Is_Access_Constant Flag69
303 -- Is_First_Subtype Flag70
305 -- Has_Completion_In_Body Flag71
306 -- Has_Unknown_Discriminants Flag72
307 -- Is_Child_Unit Flag73
308 -- Is_CPP_Class Flag74
309 -- Has_Non_Standard_Rep Flag75
310 -- Is_Constructor Flag76
311 -- Is_Thread_Body Flag77
313 -- Has_All_Calls_Remote Flag79
314 -- Is_Constr_Subt_For_U_Nominal Flag80
316 -- Is_Asynchronous Flag81
317 -- Has_Gigi_Rep_Item Flag82
318 -- Has_Machine_Radix_Clause Flag83
319 -- Machine_Radix_10 Flag84
321 -- Has_Atomic_Components Flag86
322 -- Has_Volatile_Components Flag87
323 -- Discard_Names Flag88
324 -- Is_Interrupt_Handler Flag89
325 -- Returns_By_Ref Flag90
328 -- Size_Known_At_Compile_Time Flag92
329 -- Has_Subprogram_Descriptor Flag93
330 -- Is_Generic_Actual_Type Flag94
331 -- Uses_Sec_Stack Flag95
332 -- Warnings_Off Flag96
333 -- Is_Controlling_Formal Flag97
334 -- Has_Controlling_Result Flag98
335 -- Is_Exported Flag99
336 -- Has_Specified_Layout Flag100
338 -- Has_Nested_Block_With_Handler Flag101
340 -- Is_Completely_Hidden Flag103
341 -- Address_Taken Flag104
342 -- Suppress_Init_Proc Flag105
343 -- Is_Limited_Composite Flag106
344 -- Is_Private_Composite Flag107
345 -- Default_Expressions_Processed Flag108
346 -- Is_Non_Static_Subtype Flag109
347 -- Has_External_Tag_Rep_Clause Flag110
349 -- Is_Formal_Subprogram Flag111
350 -- Is_Renaming_Of_Object Flag112
352 -- Delay_Cleanups Flag114
353 -- Never_Set_In_Source Flag115
354 -- Is_Visible_Child_Unit Flag116
355 -- Is_Unchecked_Union Flag117
356 -- Is_For_Access_Subtype Flag118
357 -- Has_Convention_Pragma Flag119
358 -- Has_Primitive_Operations Flag120
360 -- Has_Pragma_Pack Flag121
361 -- Is_Bit_Packed_Array Flag122
362 -- Has_Unchecked_Union Flag123
363 -- Is_Eliminated Flag124
364 -- C_Pass_By_Copy Flag125
365 -- Is_Instantiated Flag126
366 -- Is_Valued_Procedure Flag127
367 -- (used for Component_Alignment) Flag128
368 -- (used for Component_Alignment) Flag129
369 -- Is_Generic_Instance Flag130
371 -- No_Pool_Assigned Flag131
372 -- Is_AST_Entry Flag132
373 -- Is_VMS_Exception Flag133
374 -- Is_Optional_Parameter Flag134
375 -- Has_Aliased_Components Flag135
376 -- No_Strict_Aliasing Flag136
377 -- Is_Machine_Code_Subprogram Flag137
378 -- Is_Packed_Array_Type Flag138
379 -- Has_Biased_Representation Flag139
380 -- Has_Complex_Representation Flag140
382 -- Is_Constr_Subt_For_UN_Aliased Flag141
383 -- Has_Missing_Return Flag142
384 -- Has_Recursive_Call Flag143
385 -- Is_Unsigned_Type Flag144
386 -- Strict_Alignment Flag145
387 -- Elaborate_All_Desirable Flag146
388 -- Needs_Debug_Info Flag147
389 -- Suppress_Elaboration_Warnings Flag148
390 -- Is_Compilation_Unit Flag149
391 -- Has_Pragma_Elaborate_Body Flag150
394 -- Entry_Accepted Flag152
395 -- Is_Obsolescent Flag153
396 -- Has_Per_Object_Constraint Flag154
397 -- Has_Private_Declaration Flag155
398 -- Referenced Flag156
399 -- Has_Pragma_Inline Flag157
400 -- Finalize_Storage_Only Flag158
401 -- From_With_Type Flag159
402 -- Is_Package_Body_Entity Flag160
404 -- Has_Qualified_Name Flag161
405 -- Nonzero_Is_True Flag162
406 -- Is_True_Constant Flag163
407 -- Reverse_Bit_Order Flag164
408 -- Suppress_Style_Checks Flag165
409 -- Debug_Info_Off Flag166
410 -- Sec_Stack_Needed_For_Return Flag167
411 -- Materialize_Entity Flag168
412 -- Function_Returns_With_DSP Flag169
413 -- Is_Known_Valid Flag170
415 -- Is_Hidden_Open_Scope Flag171
416 -- Has_Object_Size_Clause Flag172
417 -- Has_Fully_Qualified_Name Flag173
418 -- Elaboration_Entity_Required Flag174
419 -- Has_Forward_Instantiation Flag175
420 -- Is_Discrim_SO_Function Flag176
421 -- Size_Depends_On_Discriminant Flag177
422 -- Is_Null_Init_Proc Flag178
423 -- Has_Pragma_Pure_Function Flag179
424 -- Has_Pragma_Unreferenced Flag180
426 -- Has_Contiguous_Rep Flag181
427 -- Has_Xref_Entry Flag182
428 -- Must_Be_On_Byte_Boundary Flag183
429 -- Has_Stream_Size_Clause Flag184
430 -- Is_Ada_2005 Flag185
463 -----------------------
464 -- Local subprograms --
465 -----------------------
467 function Rep_Clause
(Id
: E
; Rep_Name
: Name_Id
) return N
;
468 -- Returns the attribute definition clause whose name is Rep_Name. Returns
469 -- Empty if not found.
475 function Rep_Clause
(Id
: E
; Rep_Name
: Name_Id
) return N
is
479 Ritem
:= First_Rep_Item
(Id
);
480 while Present
(Ritem
) loop
481 if Nkind
(Ritem
) = N_Attribute_Definition_Clause
482 and then Chars
(Ritem
) = Rep_Name
486 Ritem
:= Next_Rep_Item
(Ritem
);
493 --------------------------------
494 -- Attribute Access Functions --
495 --------------------------------
497 function Accept_Address
(Id
: E
) return L
is
502 function Access_Disp_Table
(Id
: E
) return E
is
504 pragma Assert
(Is_Tagged_Type
(Id
));
505 return Node16
(Implementation_Base_Type
(Id
));
506 end Access_Disp_Table
;
508 function Actual_Subtype
(Id
: E
) return E
is
511 (Ekind
(Id
) = E_Constant
512 or else Ekind
(Id
) = E_Variable
513 or else Ekind
(Id
) = E_Generic_In_Out_Parameter
514 or else Ekind
(Id
) in E_In_Parameter
.. E_In_Out_Parameter
);
518 function Address_Taken
(Id
: E
) return B
is
523 function Alias
(Id
: E
) return E
is
526 (Is_Overloadable
(Id
) or else Ekind
(Id
) = E_Subprogram_Type
);
530 function Alignment
(Id
: E
) return U
is
532 pragma Assert
(Is_Type
(Id
)
533 or else Is_Formal
(Id
)
534 or else Ekind
(Id
) = E_Loop_Parameter
535 or else Ekind
(Id
) = E_Constant
536 or else Ekind
(Id
) = E_Exception
537 or else Ekind
(Id
) = E_Variable
);
541 function Associated_Final_Chain
(Id
: E
) return E
is
543 pragma Assert
(Is_Access_Type
(Id
));
545 end Associated_Final_Chain
;
547 function Associated_Formal_Package
(Id
: E
) return E
is
549 pragma Assert
(Ekind
(Id
) = E_Package
);
551 end Associated_Formal_Package
;
553 function Associated_Node_For_Itype
(Id
: E
) return N
is
556 end Associated_Node_For_Itype
;
558 function Associated_Storage_Pool
(Id
: E
) return E
is
560 pragma Assert
(Is_Access_Type
(Id
));
561 return Node22
(Root_Type
(Id
));
562 end Associated_Storage_Pool
;
564 function Barrier_Function
(Id
: E
) return N
is
566 pragma Assert
(Is_Entry
(Id
));
568 end Barrier_Function
;
570 function Block_Node
(Id
: E
) return N
is
572 pragma Assert
(Ekind
(Id
) = E_Block
);
576 function Body_Entity
(Id
: E
) return E
is
579 (Ekind
(Id
) = E_Package
or else Ekind
(Id
) = E_Generic_Package
);
583 function Body_Needed_For_SAL
(Id
: E
) return B
is
586 (Ekind
(Id
) = E_Package
587 or else Is_Subprogram
(Id
)
588 or else Is_Generic_Unit
(Id
));
590 end Body_Needed_For_SAL
;
592 function C_Pass_By_Copy
(Id
: E
) return B
is
594 pragma Assert
(Is_Record_Type
(Id
));
595 return Flag125
(Implementation_Base_Type
(Id
));
598 function Can_Never_Be_Null
(Id
: E
) return B
is
601 end Can_Never_Be_Null
;
603 function Checks_May_Be_Suppressed
(Id
: E
) return B
is
606 end Checks_May_Be_Suppressed
;
608 function Class_Wide_Type
(Id
: E
) return E
is
610 pragma Assert
(Is_Type
(Id
));
614 function Cloned_Subtype
(Id
: E
) return E
is
617 (Ekind
(Id
) = E_Record_Subtype
618 or else Ekind
(Id
) = E_Class_Wide_Subtype
);
622 function Component_Bit_Offset
(Id
: E
) return U
is
625 (Ekind
(Id
) = E_Component
or else Ekind
(Id
) = E_Discriminant
);
627 end Component_Bit_Offset
;
629 function Component_Clause
(Id
: E
) return N
is
632 (Ekind
(Id
) = E_Component
or else Ekind
(Id
) = E_Discriminant
);
634 end Component_Clause
;
636 function Component_Size
(Id
: E
) return U
is
638 pragma Assert
(Is_Array_Type
(Id
));
639 return Uint22
(Implementation_Base_Type
(Id
));
642 function Component_Type
(Id
: E
) return E
is
644 return Node20
(Implementation_Base_Type
(Id
));
647 function Corresponding_Concurrent_Type
(Id
: E
) return E
is
649 pragma Assert
(Ekind
(Id
) = E_Record_Type
);
651 end Corresponding_Concurrent_Type
;
653 function Corresponding_Discriminant
(Id
: E
) return E
is
655 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
657 end Corresponding_Discriminant
;
659 function Corresponding_Equality
(Id
: E
) return E
is
662 (Ekind
(Id
) = E_Function
663 and then not Comes_From_Source
(Id
)
664 and then Chars
(Id
) = Name_Op_Ne
);
666 end Corresponding_Equality
;
668 function Corresponding_Record_Type
(Id
: E
) return E
is
670 pragma Assert
(Is_Concurrent_Type
(Id
));
672 end Corresponding_Record_Type
;
674 function Corresponding_Remote_Type
(Id
: E
) return E
is
677 end Corresponding_Remote_Type
;
679 function Current_Value
(Id
: E
) return N
is
681 pragma Assert
(Ekind
(Id
) in Object_Kind
);
685 function CR_Discriminant
(Id
: E
) return E
is
690 function Debug_Info_Off
(Id
: E
) return B
is
695 function Debug_Renaming_Link
(Id
: E
) return E
is
698 end Debug_Renaming_Link
;
700 function Default_Expr_Function
(Id
: E
) return E
is
702 pragma Assert
(Is_Formal
(Id
));
704 end Default_Expr_Function
;
706 function Default_Expressions_Processed
(Id
: E
) return B
is
709 end Default_Expressions_Processed
;
711 function Default_Value
(Id
: E
) return N
is
713 pragma Assert
(Is_Formal
(Id
));
717 function Delay_Cleanups
(Id
: E
) return B
is
722 function Delay_Subprogram_Descriptors
(Id
: E
) return B
is
725 end Delay_Subprogram_Descriptors
;
727 function Delta_Value
(Id
: E
) return R
is
729 pragma Assert
(Is_Fixed_Point_Type
(Id
));
733 function Dependent_Instances
(Id
: E
) return L
is
735 pragma Assert
(Is_Generic_Instance
(Id
));
737 end Dependent_Instances
;
739 function Depends_On_Private
(Id
: E
) return B
is
741 pragma Assert
(Nkind
(Id
) in N_Entity
);
743 end Depends_On_Private
;
745 function Digits_Value
(Id
: E
) return U
is
748 (Is_Floating_Point_Type
(Id
)
749 or else Is_Decimal_Fixed_Point_Type
(Id
));
753 function Directly_Designated_Type
(Id
: E
) return E
is
756 end Directly_Designated_Type
;
758 function Discard_Names
(Id
: E
) return B
is
763 function Discriminal
(Id
: E
) return E
is
765 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
769 function Discriminal_Link
(Id
: E
) return N
is
772 end Discriminal_Link
;
774 function Discriminant_Checking_Func
(Id
: E
) return E
is
776 pragma Assert
(Ekind
(Id
) = E_Component
);
778 end Discriminant_Checking_Func
;
780 function Discriminant_Constraint
(Id
: E
) return L
is
782 pragma Assert
(Is_Composite_Type
(Id
) and then Has_Discriminants
(Id
));
784 end Discriminant_Constraint
;
786 function Discriminant_Default_Value
(Id
: E
) return N
is
788 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
790 end Discriminant_Default_Value
;
792 function Discriminant_Number
(Id
: E
) return U
is
794 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
796 end Discriminant_Number
;
798 function DT_Entry_Count
(Id
: E
) return U
is
800 pragma Assert
(Ekind
(Id
) = E_Component
and then Is_Tag
(Id
));
804 function DT_Position
(Id
: E
) return U
is
807 ((Ekind
(Id
) = E_Function
808 or else Ekind
(Id
) = E_Procedure
)
809 and then Present
(DTC_Entity
(Id
)));
813 function DTC_Entity
(Id
: E
) return E
is
816 (Ekind
(Id
) = E_Function
or else Ekind
(Id
) = E_Procedure
);
820 function Elaborate_All_Desirable
(Id
: E
) return B
is
823 end Elaborate_All_Desirable
;
825 function Elaboration_Entity
(Id
: E
) return E
is
830 Ekind
(Id
) = E_Package
832 Is_Generic_Unit
(Id
));
834 end Elaboration_Entity
;
836 function Elaboration_Entity_Required
(Id
: E
) return B
is
841 Ekind
(Id
) = E_Package
843 Is_Generic_Unit
(Id
));
845 end Elaboration_Entity_Required
;
847 function Enclosing_Scope
(Id
: E
) return E
is
852 function Entry_Accepted
(Id
: E
) return B
is
854 pragma Assert
(Is_Entry
(Id
));
858 function Entry_Bodies_Array
(Id
: E
) return E
is
861 end Entry_Bodies_Array
;
863 function Entry_Cancel_Parameter
(Id
: E
) return E
is
866 end Entry_Cancel_Parameter
;
868 function Entry_Component
(Id
: E
) return E
is
873 function Entry_Formal
(Id
: E
) return E
is
878 function Entry_Index_Constant
(Id
: E
) return N
is
880 pragma Assert
(Ekind
(Id
) = E_Entry_Index_Parameter
);
882 end Entry_Index_Constant
;
884 function Entry_Parameters_Type
(Id
: E
) return E
is
887 end Entry_Parameters_Type
;
889 function Enum_Pos_To_Rep
(Id
: E
) return E
is
891 pragma Assert
(Ekind
(Id
) = E_Enumeration_Type
);
895 function Enumeration_Pos
(Id
: E
) return Uint
is
897 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
901 function Enumeration_Rep
(Id
: E
) return U
is
903 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
907 function Enumeration_Rep_Expr
(Id
: E
) return N
is
909 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
911 end Enumeration_Rep_Expr
;
913 function Equivalent_Type
(Id
: E
) return E
is
916 (Ekind
(Id
) = E_Class_Wide_Subtype
or else
917 Ekind
(Id
) = E_Access_Protected_Subprogram_Type
or else
918 Ekind
(Id
) = E_Access_Subprogram_Type
or else
919 Ekind
(Id
) = E_Exception_Type
);
923 function Esize
(Id
: E
) return Uint
is
928 function Exception_Code
(Id
: E
) return Uint
is
930 pragma Assert
(Ekind
(Id
) = E_Exception
);
934 function Extra_Accessibility
(Id
: E
) return E
is
936 pragma Assert
(Is_Formal
(Id
) or else Ekind
(Id
) = E_Variable
);
938 end Extra_Accessibility
;
940 function Extra_Constrained
(Id
: E
) return E
is
942 pragma Assert
(Is_Formal
(Id
) or else Ekind
(Id
) = E_Variable
);
944 end Extra_Constrained
;
946 function Extra_Formal
(Id
: E
) return E
is
951 function Finalization_Chain_Entity
(Id
: E
) return E
is
954 end Finalization_Chain_Entity
;
956 function Finalize_Storage_Only
(Id
: E
) return B
is
958 pragma Assert
(Is_Type
(Id
));
959 return Flag158
(Base_Type
(Id
));
960 end Finalize_Storage_Only
;
962 function First_Entity
(Id
: E
) return E
is
967 function First_Index
(Id
: E
) return N
is
972 function First_Literal
(Id
: E
) return E
is
977 function First_Optional_Parameter
(Id
: E
) return E
is
980 (Ekind
(Id
) = E_Function
or else Ekind
(Id
) = E_Procedure
);
982 end First_Optional_Parameter
;
984 function First_Private_Entity
(Id
: E
) return E
is
987 end First_Private_Entity
;
989 function First_Rep_Item
(Id
: E
) return E
is
994 function Freeze_Node
(Id
: E
) return N
is
999 function From_With_Type
(Id
: E
) return B
is
1001 return Flag159
(Id
);
1004 function Full_View
(Id
: E
) return E
is
1006 pragma Assert
(Is_Type
(Id
) or else Ekind
(Id
) = E_Constant
);
1010 function Function_Returns_With_DSP
(Id
: E
) return B
is
1013 (Is_Subprogram
(Id
) or else Ekind
(Id
) = E_Subprogram_Type
);
1014 return Flag169
(Id
);
1015 end Function_Returns_With_DSP
;
1017 function Generic_Homonym
(Id
: E
) return E
is
1019 pragma Assert
(Ekind
(Id
) = E_Generic_Package
);
1021 end Generic_Homonym
;
1023 function Generic_Renamings
(Id
: E
) return L
is
1025 return Elist23
(Id
);
1026 end Generic_Renamings
;
1028 function Handler_Records
(Id
: E
) return S
is
1031 end Handler_Records
;
1033 function Has_Aliased_Components
(Id
: E
) return B
is
1035 return Flag135
(Implementation_Base_Type
(Id
));
1036 end Has_Aliased_Components
;
1038 function Has_Alignment_Clause
(Id
: E
) return B
is
1041 end Has_Alignment_Clause
;
1043 function Has_All_Calls_Remote
(Id
: E
) return B
is
1046 end Has_All_Calls_Remote
;
1048 function Has_Atomic_Components
(Id
: E
) return B
is
1050 return Flag86
(Implementation_Base_Type
(Id
));
1051 end Has_Atomic_Components
;
1053 function Has_Biased_Representation
(Id
: E
) return B
is
1055 return Flag139
(Id
);
1056 end Has_Biased_Representation
;
1058 function Has_Completion
(Id
: E
) return B
is
1063 function Has_Completion_In_Body
(Id
: E
) return B
is
1065 pragma Assert
(Is_Type
(Id
));
1067 end Has_Completion_In_Body
;
1069 function Has_Complex_Representation
(Id
: E
) return B
is
1071 pragma Assert
(Is_Type
(Id
));
1072 return Flag140
(Implementation_Base_Type
(Id
));
1073 end Has_Complex_Representation
;
1075 function Has_Component_Size_Clause
(Id
: E
) return B
is
1077 pragma Assert
(Is_Array_Type
(Id
));
1078 return Flag68
(Implementation_Base_Type
(Id
));
1079 end Has_Component_Size_Clause
;
1081 function Has_Controlled_Component
(Id
: E
) return B
is
1083 return Flag43
(Base_Type
(Id
));
1084 end Has_Controlled_Component
;
1086 function Has_Contiguous_Rep
(Id
: E
) return B
is
1088 return Flag181
(Id
);
1089 end Has_Contiguous_Rep
;
1091 function Has_Controlling_Result
(Id
: E
) return B
is
1094 end Has_Controlling_Result
;
1096 function Has_Convention_Pragma
(Id
: E
) return B
is
1098 return Flag119
(Id
);
1099 end Has_Convention_Pragma
;
1101 function Has_Delayed_Freeze
(Id
: E
) return B
is
1103 pragma Assert
(Nkind
(Id
) in N_Entity
);
1105 end Has_Delayed_Freeze
;
1107 function Has_Discriminants
(Id
: E
) return B
is
1109 pragma Assert
(Nkind
(Id
) in N_Entity
);
1111 end Has_Discriminants
;
1113 function Has_Enumeration_Rep_Clause
(Id
: E
) return B
is
1115 pragma Assert
(Is_Enumeration_Type
(Id
));
1117 end Has_Enumeration_Rep_Clause
;
1119 function Has_Exit
(Id
: E
) return B
is
1124 function Has_External_Tag_Rep_Clause
(Id
: E
) return B
is
1126 pragma Assert
(Is_Tagged_Type
(Id
));
1127 return Flag110
(Id
);
1128 end Has_External_Tag_Rep_Clause
;
1130 function Has_Forward_Instantiation
(Id
: E
) return B
is
1132 return Flag175
(Id
);
1133 end Has_Forward_Instantiation
;
1135 function Has_Fully_Qualified_Name
(Id
: E
) return B
is
1137 return Flag173
(Id
);
1138 end Has_Fully_Qualified_Name
;
1140 function Has_Gigi_Rep_Item
(Id
: E
) return B
is
1143 end Has_Gigi_Rep_Item
;
1145 function Has_Homonym
(Id
: E
) return B
is
1150 function Has_Machine_Radix_Clause
(Id
: E
) return B
is
1152 pragma Assert
(Is_Decimal_Fixed_Point_Type
(Id
));
1154 end Has_Machine_Radix_Clause
;
1156 function Has_Master_Entity
(Id
: E
) return B
is
1159 end Has_Master_Entity
;
1161 function Has_Missing_Return
(Id
: E
) return B
is
1164 (Ekind
(Id
) = E_Function
or else Ekind
(Id
) = E_Generic_Function
);
1165 return Flag142
(Id
);
1166 end Has_Missing_Return
;
1168 function Has_Nested_Block_With_Handler
(Id
: E
) return B
is
1170 return Flag101
(Id
);
1171 end Has_Nested_Block_With_Handler
;
1173 function Has_Non_Standard_Rep
(Id
: E
) return B
is
1175 return Flag75
(Implementation_Base_Type
(Id
));
1176 end Has_Non_Standard_Rep
;
1178 function Has_Object_Size_Clause
(Id
: E
) return B
is
1180 pragma Assert
(Is_Type
(Id
));
1181 return Flag172
(Id
);
1182 end Has_Object_Size_Clause
;
1184 function Has_Per_Object_Constraint
(Id
: E
) return B
is
1186 return Flag154
(Id
);
1187 end Has_Per_Object_Constraint
;
1189 function Has_Pragma_Controlled
(Id
: E
) return B
is
1191 pragma Assert
(Is_Access_Type
(Id
));
1192 return Flag27
(Implementation_Base_Type
(Id
));
1193 end Has_Pragma_Controlled
;
1195 function Has_Pragma_Elaborate_Body
(Id
: E
) return B
is
1197 return Flag150
(Id
);
1198 end Has_Pragma_Elaborate_Body
;
1200 function Has_Pragma_Inline
(Id
: E
) return B
is
1202 return Flag157
(Id
);
1203 end Has_Pragma_Inline
;
1205 function Has_Pragma_Pack
(Id
: E
) return B
is
1207 pragma Assert
(Is_Record_Type
(Id
) or else Is_Array_Type
(Id
));
1208 return Flag121
(Implementation_Base_Type
(Id
));
1209 end Has_Pragma_Pack
;
1211 function Has_Pragma_Pure_Function
(Id
: E
) return B
is
1213 pragma Assert
(Is_Subprogram
(Id
));
1214 return Flag179
(Id
);
1215 end Has_Pragma_Pure_Function
;
1217 function Has_Pragma_Unreferenced
(Id
: E
) return B
is
1219 return Flag180
(Id
);
1220 end Has_Pragma_Unreferenced
;
1222 function Has_Primitive_Operations
(Id
: E
) return B
is
1224 pragma Assert
(Is_Type
(Id
));
1225 return Flag120
(Base_Type
(Id
));
1226 end Has_Primitive_Operations
;
1228 function Has_Private_Declaration
(Id
: E
) return B
is
1230 return Flag155
(Id
);
1231 end Has_Private_Declaration
;
1233 function Has_Qualified_Name
(Id
: E
) return B
is
1235 return Flag161
(Id
);
1236 end Has_Qualified_Name
;
1238 function Has_Record_Rep_Clause
(Id
: E
) return B
is
1240 pragma Assert
(Is_Record_Type
(Id
));
1241 return Flag65
(Implementation_Base_Type
(Id
));
1242 end Has_Record_Rep_Clause
;
1244 function Has_Recursive_Call
(Id
: E
) return B
is
1246 pragma Assert
(Is_Subprogram
(Id
));
1247 return Flag143
(Id
);
1248 end Has_Recursive_Call
;
1250 function Has_Size_Clause
(Id
: E
) return B
is
1253 end Has_Size_Clause
;
1255 function Has_Small_Clause
(Id
: E
) return B
is
1258 end Has_Small_Clause
;
1260 function Has_Specified_Layout
(Id
: E
) return B
is
1262 pragma Assert
(Is_Type
(Id
));
1263 return Flag100
(Implementation_Base_Type
(Id
));
1264 end Has_Specified_Layout
;
1266 function Has_Storage_Size_Clause
(Id
: E
) return B
is
1268 pragma Assert
(Is_Access_Type
(Id
) or else Is_Task_Type
(Id
));
1269 return Flag23
(Implementation_Base_Type
(Id
));
1270 end Has_Storage_Size_Clause
;
1272 function Has_Stream_Size_Clause
(Id
: E
) return B
is
1274 pragma Assert
(Is_Elementary_Type
(Id
));
1275 return Flag184
(Id
);
1276 end Has_Stream_Size_Clause
;
1278 function Has_Subprogram_Descriptor
(Id
: E
) return B
is
1281 end Has_Subprogram_Descriptor
;
1283 function Has_Task
(Id
: E
) return B
is
1285 return Flag30
(Base_Type
(Id
));
1288 function Has_Unchecked_Union
(Id
: E
) return B
is
1290 return Flag123
(Base_Type
(Id
));
1291 end Has_Unchecked_Union
;
1293 function Has_Unknown_Discriminants
(Id
: E
) return B
is
1295 pragma Assert
(Is_Type
(Id
));
1297 end Has_Unknown_Discriminants
;
1299 function Has_Volatile_Components
(Id
: E
) return B
is
1301 return Flag87
(Implementation_Base_Type
(Id
));
1302 end Has_Volatile_Components
;
1304 function Has_Xref_Entry
(Id
: E
) return B
is
1306 return Flag182
(Implementation_Base_Type
(Id
));
1309 function Hiding_Loop_Variable
(Id
: E
) return E
is
1311 pragma Assert
(Ekind
(Id
) = E_Variable
);
1313 end Hiding_Loop_Variable
;
1315 function Homonym
(Id
: E
) return E
is
1320 function In_Package_Body
(Id
: E
) return B
is
1323 end In_Package_Body
;
1325 function In_Private_Part
(Id
: E
) return B
is
1328 end In_Private_Part
;
1330 function In_Use
(Id
: E
) return B
is
1332 pragma Assert
(Nkind
(Id
) in N_Entity
);
1336 function Inner_Instances
(Id
: E
) return L
is
1338 return Elist23
(Id
);
1339 end Inner_Instances
;
1341 function Interface_Name
(Id
: E
) return N
is
1346 function Is_Abstract
(Id
: E
) return B
is
1351 function Is_Access_Constant
(Id
: E
) return B
is
1353 pragma Assert
(Is_Access_Type
(Id
));
1355 end Is_Access_Constant
;
1357 function Is_Ada_2005
(Id
: E
) return B
is
1359 return Flag185
(Id
);
1362 function Is_Aliased
(Id
: E
) return B
is
1364 pragma Assert
(Nkind
(Id
) in N_Entity
);
1368 function Is_AST_Entry
(Id
: E
) return B
is
1370 pragma Assert
(Is_Entry
(Id
));
1371 return Flag132
(Id
);
1374 function Is_Asynchronous
(Id
: E
) return B
is
1377 (Ekind
(Id
) = E_Procedure
or else Is_Type
(Id
));
1379 end Is_Asynchronous
;
1381 function Is_Atomic
(Id
: E
) return B
is
1386 function Is_Bit_Packed_Array
(Id
: E
) return B
is
1388 return Flag122
(Implementation_Base_Type
(Id
));
1389 end Is_Bit_Packed_Array
;
1391 function Is_Called
(Id
: E
) return B
is
1394 (Ekind
(Id
) = E_Procedure
or else Ekind
(Id
) = E_Function
);
1395 return Flag102
(Id
);
1398 function Is_Character_Type
(Id
: E
) return B
is
1401 end Is_Character_Type
;
1403 function Is_Child_Unit
(Id
: E
) return B
is
1408 function Is_Class_Wide_Equivalent_Type
(Id
: E
) return B
is
1411 end Is_Class_Wide_Equivalent_Type
;
1413 function Is_Compilation_Unit
(Id
: E
) return B
is
1415 return Flag149
(Id
);
1416 end Is_Compilation_Unit
;
1418 function Is_Completely_Hidden
(Id
: E
) return B
is
1420 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
1421 return Flag103
(Id
);
1422 end Is_Completely_Hidden
;
1424 function Is_Constr_Subt_For_U_Nominal
(Id
: E
) return B
is
1427 end Is_Constr_Subt_For_U_Nominal
;
1429 function Is_Constr_Subt_For_UN_Aliased
(Id
: E
) return B
is
1431 return Flag141
(Id
);
1432 end Is_Constr_Subt_For_UN_Aliased
;
1434 function Is_Constrained
(Id
: E
) return B
is
1436 pragma Assert
(Nkind
(Id
) in N_Entity
);
1440 function Is_Constructor
(Id
: E
) return B
is
1445 function Is_Controlled
(Id
: E
) return B
is
1447 return Flag42
(Base_Type
(Id
));
1450 function Is_Controlling_Formal
(Id
: E
) return B
is
1452 pragma Assert
(Is_Formal
(Id
));
1454 end Is_Controlling_Formal
;
1456 function Is_CPP_Class
(Id
: E
) return B
is
1461 function Is_Discrim_SO_Function
(Id
: E
) return B
is
1463 return Flag176
(Id
);
1464 end Is_Discrim_SO_Function
;
1466 function Is_Dispatching_Operation
(Id
: E
) return B
is
1468 pragma Assert
(Nkind
(Id
) in N_Entity
);
1470 end Is_Dispatching_Operation
;
1472 function Is_Eliminated
(Id
: E
) return B
is
1474 return Flag124
(Id
);
1477 function Is_Entry_Formal
(Id
: E
) return B
is
1480 end Is_Entry_Formal
;
1482 function Is_Exported
(Id
: E
) return B
is
1487 function Is_First_Subtype
(Id
: E
) return B
is
1490 end Is_First_Subtype
;
1492 function Is_For_Access_Subtype
(Id
: E
) return B
is
1495 (Ekind
(Id
) = E_Record_Subtype
1497 Ekind
(Id
) = E_Private_Subtype
);
1498 return Flag118
(Id
);
1499 end Is_For_Access_Subtype
;
1501 function Is_Formal_Subprogram
(Id
: E
) return B
is
1503 return Flag111
(Id
);
1504 end Is_Formal_Subprogram
;
1506 function Is_Frozen
(Id
: E
) return B
is
1511 function Is_Generic_Actual_Type
(Id
: E
) return B
is
1513 pragma Assert
(Is_Type
(Id
));
1515 end Is_Generic_Actual_Type
;
1517 function Is_Generic_Instance
(Id
: E
) return B
is
1519 return Flag130
(Id
);
1520 end Is_Generic_Instance
;
1522 function Is_Generic_Type
(Id
: E
) return B
is
1524 pragma Assert
(Nkind
(Id
) in N_Entity
);
1526 end Is_Generic_Type
;
1528 function Is_Hidden
(Id
: E
) return B
is
1533 function Is_Hidden_Open_Scope
(Id
: E
) return B
is
1535 return Flag171
(Id
);
1536 end Is_Hidden_Open_Scope
;
1538 function Is_Immediately_Visible
(Id
: E
) return B
is
1540 pragma Assert
(Nkind
(Id
) in N_Entity
);
1542 end Is_Immediately_Visible
;
1544 function Is_Imported
(Id
: E
) return B
is
1549 function Is_Inlined
(Id
: E
) return B
is
1554 function Is_Instantiated
(Id
: E
) return B
is
1556 return Flag126
(Id
);
1557 end Is_Instantiated
;
1559 function Is_Internal
(Id
: E
) return B
is
1561 pragma Assert
(Nkind
(Id
) in N_Entity
);
1565 function Is_Interrupt_Handler
(Id
: E
) return B
is
1567 pragma Assert
(Nkind
(Id
) in N_Entity
);
1569 end Is_Interrupt_Handler
;
1571 function Is_Intrinsic_Subprogram
(Id
: E
) return B
is
1574 end Is_Intrinsic_Subprogram
;
1576 function Is_Itype
(Id
: E
) return B
is
1581 function Is_Known_Non_Null
(Id
: E
) return B
is
1584 end Is_Known_Non_Null
;
1586 function Is_Known_Valid
(Id
: E
) return B
is
1588 return Flag170
(Id
);
1591 function Is_Limited_Composite
(Id
: E
) return B
is
1593 return Flag106
(Id
);
1594 end Is_Limited_Composite
;
1596 function Is_Limited_Record
(Id
: E
) return B
is
1599 end Is_Limited_Record
;
1601 function Is_Machine_Code_Subprogram
(Id
: E
) return B
is
1603 pragma Assert
(Is_Subprogram
(Id
));
1604 return Flag137
(Id
);
1605 end Is_Machine_Code_Subprogram
;
1607 function Is_Non_Static_Subtype
(Id
: E
) return B
is
1609 pragma Assert
(Is_Type
(Id
));
1610 return Flag109
(Id
);
1611 end Is_Non_Static_Subtype
;
1613 function Is_Null_Init_Proc
(Id
: E
) return B
is
1615 pragma Assert
(Ekind
(Id
) = E_Procedure
);
1616 return Flag178
(Id
);
1617 end Is_Null_Init_Proc
;
1619 function Is_Obsolescent
(Id
: E
) return B
is
1621 pragma Assert
(Is_Subprogram
(Id
));
1622 return Flag153
(Id
);
1625 function Is_Optional_Parameter
(Id
: E
) return B
is
1627 pragma Assert
(Is_Formal
(Id
));
1628 return Flag134
(Id
);
1629 end Is_Optional_Parameter
;
1631 function Is_Overriding_Operation
(Id
: E
) return B
is
1633 pragma Assert
(Is_Subprogram
(Id
));
1635 end Is_Overriding_Operation
;
1637 function Is_Package_Body_Entity
(Id
: E
) return B
is
1639 return Flag160
(Id
);
1640 end Is_Package_Body_Entity
;
1642 function Is_Packed
(Id
: E
) return B
is
1644 return Flag51
(Implementation_Base_Type
(Id
));
1647 function Is_Packed_Array_Type
(Id
: E
) return B
is
1649 return Flag138
(Id
);
1650 end Is_Packed_Array_Type
;
1652 function Is_Potentially_Use_Visible
(Id
: E
) return B
is
1654 pragma Assert
(Nkind
(Id
) in N_Entity
);
1656 end Is_Potentially_Use_Visible
;
1658 function Is_Preelaborated
(Id
: E
) return B
is
1661 end Is_Preelaborated
;
1663 function Is_Private_Composite
(Id
: E
) return B
is
1665 pragma Assert
(Is_Type
(Id
));
1666 return Flag107
(Id
);
1667 end Is_Private_Composite
;
1669 function Is_Private_Descendant
(Id
: E
) return B
is
1672 end Is_Private_Descendant
;
1674 function Is_Public
(Id
: E
) return B
is
1676 pragma Assert
(Nkind
(Id
) in N_Entity
);
1680 function Is_Pure
(Id
: E
) return B
is
1685 function Is_Remote_Call_Interface
(Id
: E
) return B
is
1688 end Is_Remote_Call_Interface
;
1690 function Is_Remote_Types
(Id
: E
) return B
is
1693 end Is_Remote_Types
;
1695 function Is_Renaming_Of_Object
(Id
: E
) return B
is
1697 return Flag112
(Id
);
1698 end Is_Renaming_Of_Object
;
1700 function Is_Shared_Passive
(Id
: E
) return B
is
1703 end Is_Shared_Passive
;
1705 function Is_Statically_Allocated
(Id
: E
) return B
is
1708 end Is_Statically_Allocated
;
1710 function Is_Tag
(Id
: E
) return B
is
1712 pragma Assert
(Nkind
(Id
) in N_Entity
);
1716 function Is_Tagged_Type
(Id
: E
) return B
is
1721 function Is_Thread_Body
(Id
: E
) return B
is
1726 function Is_True_Constant
(Id
: E
) return B
is
1728 return Flag163
(Id
);
1729 end Is_True_Constant
;
1731 function Is_Unchecked_Union
(Id
: E
) return B
is
1733 return Flag117
(Id
);
1734 end Is_Unchecked_Union
;
1736 function Is_Unsigned_Type
(Id
: E
) return B
is
1738 pragma Assert
(Is_Type
(Id
));
1739 return Flag144
(Id
);
1740 end Is_Unsigned_Type
;
1742 function Is_Valued_Procedure
(Id
: E
) return B
is
1744 pragma Assert
(Ekind
(Id
) = E_Procedure
);
1745 return Flag127
(Id
);
1746 end Is_Valued_Procedure
;
1748 function Is_Visible_Child_Unit
(Id
: E
) return B
is
1750 pragma Assert
(Is_Child_Unit
(Id
));
1751 return Flag116
(Id
);
1752 end Is_Visible_Child_Unit
;
1754 function Is_VMS_Exception
(Id
: E
) return B
is
1756 return Flag133
(Id
);
1757 end Is_VMS_Exception
;
1759 function Is_Volatile
(Id
: E
) return B
is
1761 pragma Assert
(Nkind
(Id
) in N_Entity
);
1762 if Is_Type
(Id
) then
1763 return Flag16
(Base_Type
(Id
));
1769 function Kill_Elaboration_Checks
(Id
: E
) return B
is
1772 end Kill_Elaboration_Checks
;
1774 function Kill_Range_Checks
(Id
: E
) return B
is
1777 end Kill_Range_Checks
;
1779 function Kill_Tag_Checks
(Id
: E
) return B
is
1782 end Kill_Tag_Checks
;
1784 function Last_Entity
(Id
: E
) return E
is
1789 function Limited_View
(Id
: E
) return E
is
1791 pragma Assert
(Ekind
(Id
) = E_Package
);
1795 function Lit_Indexes
(Id
: E
) return E
is
1797 pragma Assert
(Is_Enumeration_Type
(Id
));
1801 function Lit_Strings
(Id
: E
) return E
is
1803 pragma Assert
(Is_Enumeration_Type
(Id
));
1807 function Machine_Radix_10
(Id
: E
) return B
is
1809 pragma Assert
(Is_Decimal_Fixed_Point_Type
(Id
));
1811 end Machine_Radix_10
;
1813 function Master_Id
(Id
: E
) return E
is
1818 function Materialize_Entity
(Id
: E
) return B
is
1820 return Flag168
(Id
);
1821 end Materialize_Entity
;
1823 function Mechanism
(Id
: E
) return M
is
1825 pragma Assert
(Ekind
(Id
) = E_Function
or else Is_Formal
(Id
));
1826 return UI_To_Int
(Uint8
(Id
));
1829 function Modulus
(Id
: E
) return Uint
is
1831 pragma Assert
(Is_Modular_Integer_Type
(Id
));
1832 return Uint17
(Base_Type
(Id
));
1835 function Must_Be_On_Byte_Boundary
(Id
: E
) return B
is
1837 pragma Assert
(Is_Type
(Id
));
1838 return Flag183
(Id
);
1839 end Must_Be_On_Byte_Boundary
;
1841 function Needs_Debug_Info
(Id
: E
) return B
is
1843 return Flag147
(Id
);
1844 end Needs_Debug_Info
;
1846 function Needs_No_Actuals
(Id
: E
) return B
is
1849 (Is_Overloadable
(Id
)
1850 or else Ekind
(Id
) = E_Subprogram_Type
1851 or else Ekind
(Id
) = E_Entry_Family
);
1853 end Needs_No_Actuals
;
1855 function Never_Set_In_Source
(Id
: E
) return B
is
1857 return Flag115
(Id
);
1858 end Never_Set_In_Source
;
1860 function Next_Inlined_Subprogram
(Id
: E
) return E
is
1863 end Next_Inlined_Subprogram
;
1865 function No_Pool_Assigned
(Id
: E
) return B
is
1867 pragma Assert
(Is_Access_Type
(Id
));
1868 return Flag131
(Root_Type
(Id
));
1869 end No_Pool_Assigned
;
1871 function No_Return
(Id
: E
) return B
is
1875 or else Ekind
(Id
) = E_Procedure
1876 or else Ekind
(Id
) = E_Generic_Procedure
);
1877 return Flag113
(Id
);
1880 function No_Strict_Aliasing
(Id
: E
) return B
is
1882 pragma Assert
(Is_Access_Type
(Id
));
1883 return Flag136
(Base_Type
(Id
));
1884 end No_Strict_Aliasing
;
1886 function Non_Binary_Modulus
(Id
: E
) return B
is
1888 pragma Assert
(Is_Modular_Integer_Type
(Id
));
1889 return Flag58
(Base_Type
(Id
));
1890 end Non_Binary_Modulus
;
1892 function Non_Limited_View
(Id
: E
) return E
is
1894 pragma Assert
(False
1895 or else Ekind
(Id
) = E_Incomplete_Type
);
1897 end Non_Limited_View
;
1899 function Nonzero_Is_True
(Id
: E
) return B
is
1901 pragma Assert
(Root_Type
(Id
) = Standard_Boolean
);
1902 return Flag162
(Base_Type
(Id
));
1903 end Nonzero_Is_True
;
1905 function Normalized_First_Bit
(Id
: E
) return U
is
1908 (Ekind
(Id
) = E_Component
or else Ekind
(Id
) = E_Discriminant
);
1910 end Normalized_First_Bit
;
1912 function Normalized_Position
(Id
: E
) return U
is
1915 (Ekind
(Id
) = E_Component
or else Ekind
(Id
) = E_Discriminant
);
1917 end Normalized_Position
;
1919 function Normalized_Position_Max
(Id
: E
) return U
is
1922 (Ekind
(Id
) = E_Component
or else Ekind
(Id
) = E_Discriminant
);
1924 end Normalized_Position_Max
;
1926 function Object_Ref
(Id
: E
) return E
is
1928 pragma Assert
(Ekind
(Id
) = E_Protected_Body
);
1932 function Obsolescent_Warning
(Id
: E
) return N
is
1934 pragma Assert
(Is_Subprogram
(Id
));
1936 end Obsolescent_Warning
;
1938 function Original_Access_Type
(Id
: E
) return E
is
1941 (Ekind
(Id
) = E_Access_Subprogram_Type
1942 or else Ekind
(Id
) = E_Access_Protected_Subprogram_Type
);
1944 end Original_Access_Type
;
1946 function Original_Array_Type
(Id
: E
) return E
is
1948 pragma Assert
(Is_Array_Type
(Id
) or else Is_Modular_Integer_Type
(Id
));
1950 end Original_Array_Type
;
1952 function Original_Record_Component
(Id
: E
) return E
is
1955 (Ekind
(Id
) = E_Void
1956 or else Ekind
(Id
) = E_Component
1957 or else Ekind
(Id
) = E_Discriminant
);
1959 end Original_Record_Component
;
1961 function Packed_Array_Type
(Id
: E
) return E
is
1963 pragma Assert
(Is_Array_Type
(Id
));
1965 end Packed_Array_Type
;
1967 function Parent_Subtype
(Id
: E
) return E
is
1969 pragma Assert
(Ekind
(Id
) = E_Record_Type
);
1973 function Primitive_Operations
(Id
: E
) return L
is
1975 pragma Assert
(Is_Tagged_Type
(Id
));
1976 return Elist15
(Id
);
1977 end Primitive_Operations
;
1979 function Prival
(Id
: E
) return E
is
1981 pragma Assert
(Is_Protected_Private
(Id
));
1985 function Privals_Chain
(Id
: E
) return L
is
1987 pragma Assert
(Is_Overloadable
(Id
)
1988 or else Ekind
(Id
) = E_Entry_Family
);
1989 return Elist23
(Id
);
1992 function Private_Dependents
(Id
: E
) return L
is
1994 pragma Assert
(Is_Incomplete_Or_Private_Type
(Id
));
1995 return Elist18
(Id
);
1996 end Private_Dependents
;
1998 function Private_View
(Id
: E
) return N
is
2000 pragma Assert
(Is_Private_Type
(Id
));
2004 function Protected_Body_Subprogram
(Id
: E
) return E
is
2006 pragma Assert
(Is_Subprogram
(Id
) or else Is_Entry
(Id
));
2008 end Protected_Body_Subprogram
;
2010 function Protected_Formal
(Id
: E
) return E
is
2012 pragma Assert
(Is_Formal
(Id
));
2014 end Protected_Formal
;
2016 function Protected_Operation
(Id
: E
) return N
is
2018 pragma Assert
(Is_Protected_Private
(Id
));
2020 end Protected_Operation
;
2022 function Reachable
(Id
: E
) return B
is
2027 function Referenced
(Id
: E
) return B
is
2029 return Flag156
(Id
);
2032 function Referenced_As_LHS
(Id
: E
) return B
is
2035 end Referenced_As_LHS
;
2037 function Referenced_Object
(Id
: E
) return N
is
2039 pragma Assert
(Is_Type
(Id
));
2041 end Referenced_Object
;
2043 function Register_Exception_Call
(Id
: E
) return N
is
2045 pragma Assert
(Ekind
(Id
) = E_Exception
);
2047 end Register_Exception_Call
;
2049 function Related_Array_Object
(Id
: E
) return E
is
2051 pragma Assert
(Is_Array_Type
(Id
));
2053 end Related_Array_Object
;
2055 function Related_Instance
(Id
: E
) return E
is
2058 (Ekind
(Id
) = E_Package
or else Ekind
(Id
) = E_Package_Body
);
2060 end Related_Instance
;
2062 function Renamed_Entity
(Id
: E
) return N
is
2067 function Renamed_Object
(Id
: E
) return N
is
2072 function Renaming_Map
(Id
: E
) return U
is
2077 function Return_Present
(Id
: E
) return B
is
2082 function Returns_By_Ref
(Id
: E
) return B
is
2087 function Reverse_Bit_Order
(Id
: E
) return B
is
2089 pragma Assert
(Is_Record_Type
(Id
));
2090 return Flag164
(Base_Type
(Id
));
2091 end Reverse_Bit_Order
;
2093 function RM_Size
(Id
: E
) return U
is
2095 pragma Assert
(Is_Type
(Id
));
2099 function Scalar_Range
(Id
: E
) return N
is
2104 function Scale_Value
(Id
: E
) return U
is
2109 function Scope_Depth_Value
(Id
: E
) return U
is
2112 end Scope_Depth_Value
;
2114 function Sec_Stack_Needed_For_Return
(Id
: E
) return B
is
2116 return Flag167
(Id
);
2117 end Sec_Stack_Needed_For_Return
;
2119 function Shadow_Entities
(Id
: E
) return S
is
2122 (Ekind
(Id
) = E_Package
or else Ekind
(Id
) = E_Generic_Package
);
2124 end Shadow_Entities
;
2126 function Shared_Var_Assign_Proc
(Id
: E
) return E
is
2128 pragma Assert
(Ekind
(Id
) = E_Variable
);
2130 end Shared_Var_Assign_Proc
;
2132 function Shared_Var_Read_Proc
(Id
: E
) return E
is
2134 pragma Assert
(Ekind
(Id
) = E_Variable
);
2136 end Shared_Var_Read_Proc
;
2138 function Size_Check_Code
(Id
: E
) return N
is
2140 pragma Assert
(Ekind
(Id
) = E_Constant
or else Ekind
(Id
) = E_Variable
);
2142 end Size_Check_Code
;
2144 function Size_Depends_On_Discriminant
(Id
: E
) return B
is
2146 return Flag177
(Id
);
2147 end Size_Depends_On_Discriminant
;
2149 function Size_Known_At_Compile_Time
(Id
: E
) return B
is
2152 end Size_Known_At_Compile_Time
;
2154 function Small_Value
(Id
: E
) return R
is
2156 pragma Assert
(Is_Fixed_Point_Type
(Id
));
2157 return Ureal21
(Id
);
2160 function Spec_Entity
(Id
: E
) return E
is
2163 (Ekind
(Id
) = E_Package_Body
or else Is_Formal
(Id
));
2167 function Storage_Size_Variable
(Id
: E
) return E
is
2169 pragma Assert
(Is_Access_Type
(Id
) or else Is_Task_Type
(Id
));
2170 return Node15
(Implementation_Base_Type
(Id
));
2171 end Storage_Size_Variable
;
2173 function Stored_Constraint
(Id
: E
) return L
is
2176 (Is_Composite_Type
(Id
) and then not Is_Array_Type
(Id
));
2177 return Elist23
(Id
);
2178 end Stored_Constraint
;
2180 function Strict_Alignment
(Id
: E
) return B
is
2182 return Flag145
(Implementation_Base_Type
(Id
));
2183 end Strict_Alignment
;
2185 function String_Literal_Length
(Id
: E
) return U
is
2188 end String_Literal_Length
;
2190 function String_Literal_Low_Bound
(Id
: E
) return N
is
2193 end String_Literal_Low_Bound
;
2195 function Suppress_Elaboration_Warnings
(Id
: E
) return B
is
2197 return Flag148
(Id
);
2198 end Suppress_Elaboration_Warnings
;
2200 function Suppress_Init_Proc
(Id
: E
) return B
is
2202 return Flag105
(Base_Type
(Id
));
2203 end Suppress_Init_Proc
;
2205 function Suppress_Style_Checks
(Id
: E
) return B
is
2207 return Flag165
(Id
);
2208 end Suppress_Style_Checks
;
2210 function Treat_As_Volatile
(Id
: E
) return B
is
2213 end Treat_As_Volatile
;
2215 function Underlying_Full_View
(Id
: E
) return E
is
2217 pragma Assert
(Ekind
(Id
) in Private_Kind
);
2219 end Underlying_Full_View
;
2221 function Unset_Reference
(Id
: E
) return N
is
2224 end Unset_Reference
;
2226 function Uses_Sec_Stack
(Id
: E
) return B
is
2231 function Vax_Float
(Id
: E
) return B
is
2233 return Flag151
(Base_Type
(Id
));
2236 function Warnings_Off
(Id
: E
) return B
is
2241 ------------------------------
2242 -- Classification Functions --
2243 ------------------------------
2245 function Is_Access_Type
(Id
: E
) return B
is
2247 return Ekind
(Id
) in Access_Kind
;
2250 function Is_Array_Type
(Id
: E
) return B
is
2252 return Ekind
(Id
) in Array_Kind
;
2255 function Is_Class_Wide_Type
(Id
: E
) return B
is
2257 return Ekind
(Id
) in Class_Wide_Kind
;
2258 end Is_Class_Wide_Type
;
2260 function Is_Composite_Type
(Id
: E
) return B
is
2262 return Ekind
(Id
) in Composite_Kind
;
2263 end Is_Composite_Type
;
2265 function Is_Concurrent_Body
(Id
: E
) return B
is
2267 return Ekind
(Id
) in
2268 Concurrent_Body_Kind
;
2269 end Is_Concurrent_Body
;
2271 function Is_Concurrent_Record_Type
(Id
: E
) return B
is
2274 end Is_Concurrent_Record_Type
;
2276 function Is_Concurrent_Type
(Id
: E
) return B
is
2278 return Ekind
(Id
) in Concurrent_Kind
;
2279 end Is_Concurrent_Type
;
2281 function Is_Decimal_Fixed_Point_Type
(Id
: E
) return B
is
2283 return Ekind
(Id
) in
2284 Decimal_Fixed_Point_Kind
;
2285 end Is_Decimal_Fixed_Point_Type
;
2287 function Is_Digits_Type
(Id
: E
) return B
is
2289 return Ekind
(Id
) in Digits_Kind
;
2292 function Is_Discrete_Or_Fixed_Point_Type
(Id
: E
) return B
is
2294 return Ekind
(Id
) in Discrete_Or_Fixed_Point_Kind
;
2295 end Is_Discrete_Or_Fixed_Point_Type
;
2297 function Is_Discrete_Type
(Id
: E
) return B
is
2299 return Ekind
(Id
) in Discrete_Kind
;
2300 end Is_Discrete_Type
;
2302 function Is_Elementary_Type
(Id
: E
) return B
is
2304 return Ekind
(Id
) in Elementary_Kind
;
2305 end Is_Elementary_Type
;
2307 function Is_Entry
(Id
: E
) return B
is
2309 return Ekind
(Id
) in Entry_Kind
;
2312 function Is_Enumeration_Type
(Id
: E
) return B
is
2314 return Ekind
(Id
) in
2316 end Is_Enumeration_Type
;
2318 function Is_Fixed_Point_Type
(Id
: E
) return B
is
2320 return Ekind
(Id
) in
2322 end Is_Fixed_Point_Type
;
2324 function Is_Floating_Point_Type
(Id
: E
) return B
is
2326 return Ekind
(Id
) in Float_Kind
;
2327 end Is_Floating_Point_Type
;
2329 function Is_Formal
(Id
: E
) return B
is
2331 return Ekind
(Id
) in Formal_Kind
;
2334 function Is_Generic_Subprogram
(Id
: E
) return B
is
2336 return Ekind
(Id
) in Generic_Subprogram_Kind
;
2337 end Is_Generic_Subprogram
;
2339 function Is_Generic_Unit
(Id
: E
) return B
is
2341 return Ekind
(Id
) in Generic_Unit_Kind
;
2342 end Is_Generic_Unit
;
2344 function Is_Incomplete_Or_Private_Type
(Id
: E
) return B
is
2346 return Ekind
(Id
) in
2347 Incomplete_Or_Private_Kind
;
2348 end Is_Incomplete_Or_Private_Type
;
2350 function Is_Integer_Type
(Id
: E
) return B
is
2352 return Ekind
(Id
) in Integer_Kind
;
2353 end Is_Integer_Type
;
2355 function Is_Modular_Integer_Type
(Id
: E
) return B
is
2357 return Ekind
(Id
) in
2358 Modular_Integer_Kind
;
2359 end Is_Modular_Integer_Type
;
2361 function Is_Named_Number
(Id
: E
) return B
is
2363 return Ekind
(Id
) in Named_Kind
;
2364 end Is_Named_Number
;
2366 function Is_Numeric_Type
(Id
: E
) return B
is
2368 return Ekind
(Id
) in Numeric_Kind
;
2369 end Is_Numeric_Type
;
2371 function Is_Object
(Id
: E
) return B
is
2373 return Ekind
(Id
) in Object_Kind
;
2376 function Is_Ordinary_Fixed_Point_Type
(Id
: E
) return B
is
2378 return Ekind
(Id
) in
2379 Ordinary_Fixed_Point_Kind
;
2380 end Is_Ordinary_Fixed_Point_Type
;
2382 function Is_Overloadable
(Id
: E
) return B
is
2384 return Ekind
(Id
) in Overloadable_Kind
;
2385 end Is_Overloadable
;
2387 function Is_Private_Type
(Id
: E
) return B
is
2389 return Ekind
(Id
) in Private_Kind
;
2390 end Is_Private_Type
;
2392 function Is_Protected_Type
(Id
: E
) return B
is
2394 return Ekind
(Id
) in Protected_Kind
;
2395 end Is_Protected_Type
;
2397 function Is_Real_Type
(Id
: E
) return B
is
2399 return Ekind
(Id
) in Real_Kind
;
2402 function Is_Record_Type
(Id
: E
) return B
is
2404 return Ekind
(Id
) in Record_Kind
;
2407 function Is_Scalar_Type
(Id
: E
) return B
is
2409 return Ekind
(Id
) in Scalar_Kind
;
2412 function Is_Signed_Integer_Type
(Id
: E
) return B
is
2414 return Ekind
(Id
) in
2415 Signed_Integer_Kind
;
2416 end Is_Signed_Integer_Type
;
2418 function Is_Subprogram
(Id
: E
) return B
is
2420 return Ekind
(Id
) in Subprogram_Kind
;
2423 function Is_Task_Type
(Id
: E
) return B
is
2425 return Ekind
(Id
) in Task_Kind
;
2428 function Is_Type
(Id
: E
) return B
is
2430 return Ekind
(Id
) in Type_Kind
;
2433 ------------------------------
2434 -- Attribute Set Procedures --
2435 ------------------------------
2437 procedure Set_Accept_Address
(Id
: E
; V
: L
) is
2439 Set_Elist21
(Id
, V
);
2440 end Set_Accept_Address
;
2442 procedure Set_Access_Disp_Table
(Id
: E
; V
: E
) is
2444 pragma Assert
(Is_Tagged_Type
(Id
) and then Id
= Base_Type
(Id
));
2446 end Set_Access_Disp_Table
;
2448 procedure Set_Associated_Final_Chain
(Id
: E
; V
: E
) is
2450 pragma Assert
(Is_Access_Type
(Id
));
2452 end Set_Associated_Final_Chain
;
2454 procedure Set_Associated_Formal_Package
(Id
: E
; V
: E
) is
2457 end Set_Associated_Formal_Package
;
2459 procedure Set_Associated_Node_For_Itype
(Id
: E
; V
: E
) is
2462 end Set_Associated_Node_For_Itype
;
2464 procedure Set_Associated_Storage_Pool
(Id
: E
; V
: E
) is
2466 pragma Assert
(Is_Access_Type
(Id
) and then Id
= Base_Type
(Id
));
2468 end Set_Associated_Storage_Pool
;
2470 procedure Set_Actual_Subtype
(Id
: E
; V
: E
) is
2473 (Ekind
(Id
) = E_Constant
2474 or else Ekind
(Id
) = E_Variable
2475 or else Ekind
(Id
) = E_Generic_In_Out_Parameter
2476 or else Ekind
(Id
) in E_In_Parameter
.. E_In_Out_Parameter
);
2478 end Set_Actual_Subtype
;
2480 procedure Set_Address_Taken
(Id
: E
; V
: B
:= True) is
2482 Set_Flag104
(Id
, V
);
2483 end Set_Address_Taken
;
2485 procedure Set_Alias
(Id
: E
; V
: E
) is
2488 (Is_Overloadable
(Id
) or else Ekind
(Id
) = E_Subprogram_Type
);
2492 procedure Set_Alignment
(Id
: E
; V
: U
) is
2494 pragma Assert
(Is_Type
(Id
)
2495 or else Is_Formal
(Id
)
2496 or else Ekind
(Id
) = E_Loop_Parameter
2497 or else Ekind
(Id
) = E_Constant
2498 or else Ekind
(Id
) = E_Exception
2499 or else Ekind
(Id
) = E_Variable
);
2503 procedure Set_Barrier_Function
(Id
: E
; V
: N
) is
2505 pragma Assert
(Is_Entry
(Id
));
2507 end Set_Barrier_Function
;
2509 procedure Set_Block_Node
(Id
: E
; V
: N
) is
2511 pragma Assert
(Ekind
(Id
) = E_Block
);
2515 procedure Set_Body_Entity
(Id
: E
; V
: E
) is
2518 (Ekind
(Id
) = E_Package
or else Ekind
(Id
) = E_Generic_Package
);
2520 end Set_Body_Entity
;
2522 procedure Set_Body_Needed_For_SAL
(Id
: E
; V
: B
:= True) is
2525 (Ekind
(Id
) = E_Package
2526 or else Is_Subprogram
(Id
)
2527 or else Is_Generic_Unit
(Id
));
2529 end Set_Body_Needed_For_SAL
;
2531 procedure Set_C_Pass_By_Copy
(Id
: E
; V
: B
:= True) is
2533 pragma Assert
(Is_Record_Type
(Id
) and then Id
= Base_Type
(Id
));
2534 Set_Flag125
(Id
, V
);
2535 end Set_C_Pass_By_Copy
;
2537 procedure Set_Can_Never_Be_Null
(Id
: E
; V
: B
:= True) is
2540 end Set_Can_Never_Be_Null
;
2542 procedure Set_Checks_May_Be_Suppressed
(Id
: E
; V
: B
:= True) is
2545 end Set_Checks_May_Be_Suppressed
;
2547 procedure Set_Class_Wide_Type
(Id
: E
; V
: E
) is
2549 pragma Assert
(Is_Type
(Id
));
2551 end Set_Class_Wide_Type
;
2553 procedure Set_Cloned_Subtype
(Id
: E
; V
: E
) is
2556 (Ekind
(Id
) = E_Record_Subtype
2557 or else Ekind
(Id
) = E_Class_Wide_Subtype
);
2559 end Set_Cloned_Subtype
;
2561 procedure Set_Component_Bit_Offset
(Id
: E
; V
: U
) is
2564 (Ekind
(Id
) = E_Component
or else Ekind
(Id
) = E_Discriminant
);
2566 end Set_Component_Bit_Offset
;
2568 procedure Set_Component_Clause
(Id
: E
; V
: N
) is
2571 (Ekind
(Id
) = E_Component
or else Ekind
(Id
) = E_Discriminant
);
2573 end Set_Component_Clause
;
2575 procedure Set_Component_Size
(Id
: E
; V
: U
) is
2577 pragma Assert
(Is_Array_Type
(Id
) and then Id
= Base_Type
(Id
));
2579 end Set_Component_Size
;
2581 procedure Set_Component_Type
(Id
: E
; V
: E
) is
2583 pragma Assert
(Is_Array_Type
(Id
) and then Id
= Base_Type
(Id
));
2585 end Set_Component_Type
;
2587 procedure Set_Corresponding_Concurrent_Type
(Id
: E
; V
: E
) is
2590 (Ekind
(Id
) = E_Record_Type
and then Is_Concurrent_Type
(V
));
2592 end Set_Corresponding_Concurrent_Type
;
2594 procedure Set_Corresponding_Discriminant
(Id
: E
; V
: E
) is
2596 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
2598 end Set_Corresponding_Discriminant
;
2600 procedure Set_Corresponding_Equality
(Id
: E
; V
: E
) is
2603 (Ekind
(Id
) = E_Function
2604 and then not Comes_From_Source
(Id
)
2605 and then Chars
(Id
) = Name_Op_Ne
);
2607 end Set_Corresponding_Equality
;
2609 procedure Set_Corresponding_Record_Type
(Id
: E
; V
: E
) is
2611 pragma Assert
(Is_Concurrent_Type
(Id
));
2613 end Set_Corresponding_Record_Type
;
2615 procedure Set_Corresponding_Remote_Type
(Id
: E
; V
: E
) is
2618 end Set_Corresponding_Remote_Type
;
2620 procedure Set_Current_Value
(Id
: E
; V
: E
) is
2622 pragma Assert
(Ekind
(Id
) in Object_Kind
or else Ekind
(Id
) = E_Void
);
2624 end Set_Current_Value
;
2626 procedure Set_CR_Discriminant
(Id
: E
; V
: E
) is
2629 end Set_CR_Discriminant
;
2631 procedure Set_Debug_Info_Off
(Id
: E
; V
: B
:= True) is
2633 Set_Flag166
(Id
, V
);
2634 end Set_Debug_Info_Off
;
2636 procedure Set_Debug_Renaming_Link
(Id
: E
; V
: E
) is
2639 end Set_Debug_Renaming_Link
;
2641 procedure Set_Default_Expr_Function
(Id
: E
; V
: E
) is
2643 pragma Assert
(Is_Formal
(Id
));
2645 end Set_Default_Expr_Function
;
2647 procedure Set_Default_Expressions_Processed
(Id
: E
; V
: B
:= True) is
2649 Set_Flag108
(Id
, V
);
2650 end Set_Default_Expressions_Processed
;
2652 procedure Set_Default_Value
(Id
: E
; V
: N
) is
2654 pragma Assert
(Is_Formal
(Id
));
2656 end Set_Default_Value
;
2658 procedure Set_Delay_Cleanups
(Id
: E
; V
: B
:= True) is
2662 or else Is_Task_Type
(Id
)
2663 or else Ekind
(Id
) = E_Block
);
2664 Set_Flag114
(Id
, V
);
2665 end Set_Delay_Cleanups
;
2667 procedure Set_Delay_Subprogram_Descriptors
(Id
: E
; V
: B
:= True) is
2671 or else Ekind
(Id
) = E_Package
2672 or else Ekind
(Id
) = E_Package_Body
);
2674 end Set_Delay_Subprogram_Descriptors
;
2676 procedure Set_Delta_Value
(Id
: E
; V
: R
) is
2678 pragma Assert
(Is_Fixed_Point_Type
(Id
));
2679 Set_Ureal18
(Id
, V
);
2680 end Set_Delta_Value
;
2682 procedure Set_Dependent_Instances
(Id
: E
; V
: L
) is
2684 pragma Assert
(Is_Generic_Instance
(Id
));
2686 end Set_Dependent_Instances
;
2688 procedure Set_Depends_On_Private
(Id
: E
; V
: B
:= True) is
2690 pragma Assert
(Nkind
(Id
) in N_Entity
);
2692 end Set_Depends_On_Private
;
2694 procedure Set_Digits_Value
(Id
: E
; V
: U
) is
2697 (Is_Floating_Point_Type
(Id
)
2698 or else Is_Decimal_Fixed_Point_Type
(Id
));
2700 end Set_Digits_Value
;
2702 procedure Set_Directly_Designated_Type
(Id
: E
; V
: E
) is
2705 end Set_Directly_Designated_Type
;
2707 procedure Set_Discard_Names
(Id
: E
; V
: B
:= True) is
2710 end Set_Discard_Names
;
2712 procedure Set_Discriminal
(Id
: E
; V
: E
) is
2714 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
2716 end Set_Discriminal
;
2718 procedure Set_Discriminal_Link
(Id
: E
; V
: E
) is
2721 end Set_Discriminal_Link
;
2723 procedure Set_Discriminant_Checking_Func
(Id
: E
; V
: E
) is
2725 pragma Assert
(Ekind
(Id
) = E_Component
);
2727 end Set_Discriminant_Checking_Func
;
2729 procedure Set_Discriminant_Constraint
(Id
: E
; V
: L
) is
2731 pragma Assert
(Nkind
(Id
) in N_Entity
);
2732 Set_Elist21
(Id
, V
);
2733 end Set_Discriminant_Constraint
;
2735 procedure Set_Discriminant_Default_Value
(Id
: E
; V
: N
) is
2738 end Set_Discriminant_Default_Value
;
2740 procedure Set_Discriminant_Number
(Id
: E
; V
: U
) is
2743 end Set_Discriminant_Number
;
2745 procedure Set_DT_Entry_Count
(Id
: E
; V
: U
) is
2747 pragma Assert
(Ekind
(Id
) = E_Component
);
2749 end Set_DT_Entry_Count
;
2751 procedure Set_DT_Position
(Id
: E
; V
: U
) is
2753 pragma Assert
(Ekind
(Id
) = E_Function
or else Ekind
(Id
) = E_Procedure
);
2755 end Set_DT_Position
;
2757 procedure Set_DTC_Entity
(Id
: E
; V
: E
) is
2760 (Ekind
(Id
) = E_Function
or else Ekind
(Id
) = E_Procedure
);
2764 procedure Set_Elaborate_All_Desirable
(Id
: E
; V
: B
:= True) is
2766 Set_Flag146
(Id
, V
);
2767 end Set_Elaborate_All_Desirable
;
2769 procedure Set_Elaboration_Entity
(Id
: E
; V
: E
) is
2774 Ekind
(Id
) = E_Package
2776 Is_Generic_Unit
(Id
));
2778 end Set_Elaboration_Entity
;
2780 procedure Set_Elaboration_Entity_Required
(Id
: E
; V
: B
:= True) is
2785 Ekind
(Id
) = E_Package
2787 Is_Generic_Unit
(Id
));
2788 Set_Flag174
(Id
, V
);
2789 end Set_Elaboration_Entity_Required
;
2791 procedure Set_Enclosing_Scope
(Id
: E
; V
: E
) is
2794 end Set_Enclosing_Scope
;
2796 procedure Set_Entry_Accepted
(Id
: E
; V
: B
:= True) is
2798 pragma Assert
(Is_Entry
(Id
));
2799 Set_Flag152
(Id
, V
);
2800 end Set_Entry_Accepted
;
2802 procedure Set_Entry_Bodies_Array
(Id
: E
; V
: E
) is
2805 end Set_Entry_Bodies_Array
;
2807 procedure Set_Entry_Cancel_Parameter
(Id
: E
; V
: E
) is
2810 end Set_Entry_Cancel_Parameter
;
2812 procedure Set_Entry_Component
(Id
: E
; V
: E
) is
2815 end Set_Entry_Component
;
2817 procedure Set_Entry_Formal
(Id
: E
; V
: E
) is
2820 end Set_Entry_Formal
;
2822 procedure Set_Entry_Index_Constant
(Id
: E
; V
: E
) is
2824 pragma Assert
(Ekind
(Id
) = E_Entry_Index_Parameter
);
2826 end Set_Entry_Index_Constant
;
2828 procedure Set_Entry_Parameters_Type
(Id
: E
; V
: E
) is
2831 end Set_Entry_Parameters_Type
;
2833 procedure Set_Enum_Pos_To_Rep
(Id
: E
; V
: E
) is
2835 pragma Assert
(Ekind
(Id
) = E_Enumeration_Type
);
2837 end Set_Enum_Pos_To_Rep
;
2839 procedure Set_Enumeration_Pos
(Id
: E
; V
: U
) is
2841 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
2843 end Set_Enumeration_Pos
;
2845 procedure Set_Enumeration_Rep
(Id
: E
; V
: U
) is
2847 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
2849 end Set_Enumeration_Rep
;
2851 procedure Set_Enumeration_Rep_Expr
(Id
: E
; V
: N
) is
2853 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
2855 end Set_Enumeration_Rep_Expr
;
2857 procedure Set_Equivalent_Type
(Id
: E
; V
: E
) is
2860 (Ekind
(Id
) = E_Class_Wide_Type
or else
2861 Ekind
(Id
) = E_Class_Wide_Subtype
or else
2862 Ekind
(Id
) = E_Access_Protected_Subprogram_Type
or else
2863 Ekind
(Id
) = E_Access_Subprogram_Type
or else
2864 Ekind
(Id
) = E_Exception_Type
);
2866 end Set_Equivalent_Type
;
2868 procedure Set_Esize
(Id
: E
; V
: U
) is
2873 procedure Set_Exception_Code
(Id
: E
; V
: U
) is
2875 pragma Assert
(Ekind
(Id
) = E_Exception
);
2877 end Set_Exception_Code
;
2879 procedure Set_Extra_Accessibility
(Id
: E
; V
: E
) is
2881 pragma Assert
(Is_Formal
(Id
) or else Ekind
(Id
) = E_Variable
);
2883 end Set_Extra_Accessibility
;
2885 procedure Set_Extra_Constrained
(Id
: E
; V
: E
) is
2887 pragma Assert
(Is_Formal
(Id
) or else Ekind
(Id
) = E_Variable
);
2889 end Set_Extra_Constrained
;
2891 procedure Set_Extra_Formal
(Id
: E
; V
: E
) is
2894 end Set_Extra_Formal
;
2896 procedure Set_Finalization_Chain_Entity
(Id
: E
; V
: E
) is
2899 end Set_Finalization_Chain_Entity
;
2901 procedure Set_Finalize_Storage_Only
(Id
: E
; V
: B
:= True) is
2903 pragma Assert
(Is_Type
(Id
) and then Id
= Base_Type
(Id
));
2904 Set_Flag158
(Id
, V
);
2905 end Set_Finalize_Storage_Only
;
2907 procedure Set_First_Entity
(Id
: E
; V
: E
) is
2910 end Set_First_Entity
;
2912 procedure Set_First_Index
(Id
: E
; V
: N
) is
2915 end Set_First_Index
;
2917 procedure Set_First_Literal
(Id
: E
; V
: E
) is
2920 end Set_First_Literal
;
2922 procedure Set_First_Optional_Parameter
(Id
: E
; V
: E
) is
2925 (Ekind
(Id
) = E_Function
or else Ekind
(Id
) = E_Procedure
);
2927 end Set_First_Optional_Parameter
;
2929 procedure Set_First_Private_Entity
(Id
: E
; V
: E
) is
2931 pragma Assert
(Nkind
(Id
) in N_Entity
);
2933 end Set_First_Private_Entity
;
2935 procedure Set_First_Rep_Item
(Id
: E
; V
: N
) is
2938 end Set_First_Rep_Item
;
2940 procedure Set_Freeze_Node
(Id
: E
; V
: N
) is
2943 end Set_Freeze_Node
;
2945 procedure Set_From_With_Type
(Id
: E
; V
: B
:= True) is
2949 or else Ekind
(Id
) = E_Package
);
2950 Set_Flag159
(Id
, V
);
2951 end Set_From_With_Type
;
2953 procedure Set_Full_View
(Id
: E
; V
: E
) is
2955 pragma Assert
(Is_Type
(Id
) or else Ekind
(Id
) = E_Constant
);
2959 procedure Set_Function_Returns_With_DSP
(Id
: E
; V
: B
:= True) is
2962 (Is_Subprogram
(Id
) or else Ekind
(Id
) = E_Subprogram_Type
);
2963 Set_Flag169
(Id
, V
);
2964 end Set_Function_Returns_With_DSP
;
2966 procedure Set_Generic_Homonym
(Id
: E
; V
: E
) is
2969 end Set_Generic_Homonym
;
2971 procedure Set_Generic_Renamings
(Id
: E
; V
: L
) is
2973 Set_Elist23
(Id
, V
);
2974 end Set_Generic_Renamings
;
2976 procedure Set_Handler_Records
(Id
: E
; V
: S
) is
2979 end Set_Handler_Records
;
2981 procedure Set_Has_Aliased_Components
(Id
: E
; V
: B
:= True) is
2983 pragma Assert
(Base_Type
(Id
) = Id
);
2984 Set_Flag135
(Id
, V
);
2985 end Set_Has_Aliased_Components
;
2987 procedure Set_Has_Alignment_Clause
(Id
: E
; V
: B
:= True) is
2990 end Set_Has_Alignment_Clause
;
2992 procedure Set_Has_All_Calls_Remote
(Id
: E
; V
: B
:= True) is
2995 end Set_Has_All_Calls_Remote
;
2997 procedure Set_Has_Atomic_Components
(Id
: E
; V
: B
:= True) is
2999 pragma Assert
(not Is_Type
(Id
) or else Base_Type
(Id
) = Id
);
3001 end Set_Has_Atomic_Components
;
3003 procedure Set_Has_Biased_Representation
(Id
: E
; V
: B
:= True) is
3006 ((V
= False) or else (Is_Discrete_Type
(Id
) or Is_Object
(Id
)));
3007 Set_Flag139
(Id
, V
);
3008 end Set_Has_Biased_Representation
;
3010 procedure Set_Has_Completion
(Id
: E
; V
: B
:= True) is
3013 end Set_Has_Completion
;
3015 procedure Set_Has_Completion_In_Body
(Id
: E
; V
: B
:= True) is
3017 pragma Assert
(Ekind
(Id
) = E_Incomplete_Type
);
3019 end Set_Has_Completion_In_Body
;
3021 procedure Set_Has_Complex_Representation
(Id
: E
; V
: B
:= True) is
3023 pragma Assert
(Ekind
(Id
) = E_Record_Type
);
3024 Set_Flag140
(Id
, V
);
3025 end Set_Has_Complex_Representation
;
3027 procedure Set_Has_Component_Size_Clause
(Id
: E
; V
: B
:= True) is
3029 pragma Assert
(Ekind
(Id
) = E_Array_Type
);
3031 end Set_Has_Component_Size_Clause
;
3033 procedure Set_Has_Contiguous_Rep
(Id
: E
; V
: B
:= True) is
3035 Set_Flag181
(Id
, V
);
3036 end Set_Has_Contiguous_Rep
;
3038 procedure Set_Has_Controlled_Component
(Id
: E
; V
: B
:= True) is
3040 pragma Assert
(Base_Type
(Id
) = Id
);
3042 end Set_Has_Controlled_Component
;
3044 procedure Set_Has_Controlling_Result
(Id
: E
; V
: B
:= True) is
3047 end Set_Has_Controlling_Result
;
3049 procedure Set_Has_Convention_Pragma
(Id
: E
; V
: B
:= True) is
3051 Set_Flag119
(Id
, V
);
3052 end Set_Has_Convention_Pragma
;
3054 procedure Set_Has_Delayed_Freeze
(Id
: E
; V
: B
:= True) is
3056 pragma Assert
(Nkind
(Id
) in N_Entity
);
3058 end Set_Has_Delayed_Freeze
;
3060 procedure Set_Has_Discriminants
(Id
: E
; V
: B
:= True) is
3062 pragma Assert
(Nkind
(Id
) in N_Entity
);
3064 end Set_Has_Discriminants
;
3066 procedure Set_Has_Enumeration_Rep_Clause
(Id
: E
; V
: B
:= True) is
3068 pragma Assert
(Is_Enumeration_Type
(Id
));
3070 end Set_Has_Enumeration_Rep_Clause
;
3072 procedure Set_Has_Exit
(Id
: E
; V
: B
:= True) is
3077 procedure Set_Has_External_Tag_Rep_Clause
(Id
: E
; V
: B
:= True) is
3079 pragma Assert
(Is_Tagged_Type
(Id
));
3080 Set_Flag110
(Id
, V
);
3081 end Set_Has_External_Tag_Rep_Clause
;
3083 procedure Set_Has_Forward_Instantiation
(Id
: E
; V
: B
:= True) is
3085 Set_Flag175
(Id
, V
);
3086 end Set_Has_Forward_Instantiation
;
3088 procedure Set_Has_Fully_Qualified_Name
(Id
: E
; V
: B
:= True) is
3090 Set_Flag173
(Id
, V
);
3091 end Set_Has_Fully_Qualified_Name
;
3093 procedure Set_Has_Gigi_Rep_Item
(Id
: E
; V
: B
:= True) is
3096 end Set_Has_Gigi_Rep_Item
;
3098 procedure Set_Has_Homonym
(Id
: E
; V
: B
:= True) is
3101 end Set_Has_Homonym
;
3103 procedure Set_Has_Machine_Radix_Clause
(Id
: E
; V
: B
:= True) is
3105 pragma Assert
(Is_Decimal_Fixed_Point_Type
(Id
));
3107 end Set_Has_Machine_Radix_Clause
;
3109 procedure Set_Has_Master_Entity
(Id
: E
; V
: B
:= True) is
3112 end Set_Has_Master_Entity
;
3114 procedure Set_Has_Missing_Return
(Id
: E
; V
: B
:= True) is
3117 (Ekind
(Id
) = E_Function
or else Ekind
(Id
) = E_Generic_Function
);
3118 Set_Flag142
(Id
, V
);
3119 end Set_Has_Missing_Return
;
3121 procedure Set_Has_Nested_Block_With_Handler
(Id
: E
; V
: B
:= True) is
3123 Set_Flag101
(Id
, V
);
3124 end Set_Has_Nested_Block_With_Handler
;
3126 procedure Set_Has_Non_Standard_Rep
(Id
: E
; V
: B
:= True) is
3128 pragma Assert
(Base_Type
(Id
) = Id
);
3130 end Set_Has_Non_Standard_Rep
;
3132 procedure Set_Has_Object_Size_Clause
(Id
: E
; V
: B
:= True) is
3134 pragma Assert
(Is_Type
(Id
));
3135 Set_Flag172
(Id
, V
);
3136 end Set_Has_Object_Size_Clause
;
3138 procedure Set_Has_Per_Object_Constraint
(Id
: E
; V
: B
:= True) is
3140 Set_Flag154
(Id
, V
);
3141 end Set_Has_Per_Object_Constraint
;
3143 procedure Set_Has_Pragma_Controlled
(Id
: E
; V
: B
:= True) is
3145 pragma Assert
(Is_Access_Type
(Id
));
3146 Set_Flag27
(Base_Type
(Id
), V
);
3147 end Set_Has_Pragma_Controlled
;
3149 procedure Set_Has_Pragma_Elaborate_Body
(Id
: E
; V
: B
:= True) is
3151 Set_Flag150
(Id
, V
);
3152 end Set_Has_Pragma_Elaborate_Body
;
3154 procedure Set_Has_Pragma_Inline
(Id
: E
; V
: B
:= True) is
3156 Set_Flag157
(Id
, V
);
3157 end Set_Has_Pragma_Inline
;
3159 procedure Set_Has_Pragma_Pack
(Id
: E
; V
: B
:= True) is
3161 pragma Assert
(Is_Array_Type
(Id
) or else Is_Record_Type
(Id
));
3162 pragma Assert
(Id
= Base_Type
(Id
));
3163 Set_Flag121
(Id
, V
);
3164 end Set_Has_Pragma_Pack
;
3166 procedure Set_Has_Pragma_Pure_Function
(Id
: E
; V
: B
:= True) is
3168 pragma Assert
(Is_Subprogram
(Id
));
3169 Set_Flag179
(Id
, V
);
3170 end Set_Has_Pragma_Pure_Function
;
3172 procedure Set_Has_Pragma_Unreferenced
(Id
: E
; V
: B
:= True) is
3174 Set_Flag180
(Id
, V
);
3175 end Set_Has_Pragma_Unreferenced
;
3177 procedure Set_Has_Primitive_Operations
(Id
: E
; V
: B
:= True) is
3179 pragma Assert
(Id
= Base_Type
(Id
));
3180 Set_Flag120
(Id
, V
);
3181 end Set_Has_Primitive_Operations
;
3183 procedure Set_Has_Private_Declaration
(Id
: E
; V
: B
:= True) is
3185 Set_Flag155
(Id
, V
);
3186 end Set_Has_Private_Declaration
;
3188 procedure Set_Has_Qualified_Name
(Id
: E
; V
: B
:= True) is
3190 Set_Flag161
(Id
, V
);
3191 end Set_Has_Qualified_Name
;
3193 procedure Set_Has_Record_Rep_Clause
(Id
: E
; V
: B
:= True) is
3195 pragma Assert
(Id
= Base_Type
(Id
));
3197 end Set_Has_Record_Rep_Clause
;
3199 procedure Set_Has_Recursive_Call
(Id
: E
; V
: B
:= True) is
3201 pragma Assert
(Is_Subprogram
(Id
));
3202 Set_Flag143
(Id
, V
);
3203 end Set_Has_Recursive_Call
;
3205 procedure Set_Has_Size_Clause
(Id
: E
; V
: B
:= True) is
3208 end Set_Has_Size_Clause
;
3210 procedure Set_Has_Small_Clause
(Id
: E
; V
: B
:= True) is
3213 end Set_Has_Small_Clause
;
3215 procedure Set_Has_Specified_Layout
(Id
: E
; V
: B
:= True) is
3217 pragma Assert
(Id
= Base_Type
(Id
));
3218 Set_Flag100
(Id
, V
);
3219 end Set_Has_Specified_Layout
;
3221 procedure Set_Has_Storage_Size_Clause
(Id
: E
; V
: B
:= True) is
3223 pragma Assert
(Is_Access_Type
(Id
) or else Is_Task_Type
(Id
));
3224 pragma Assert
(Base_Type
(Id
) = Id
);
3226 end Set_Has_Storage_Size_Clause
;
3228 procedure Set_Has_Stream_Size_Clause
(Id
: E
; V
: B
:= True) is
3230 pragma Assert
(Is_Elementary_Type
(Id
));
3231 Set_Flag184
(Id
, V
);
3232 end Set_Has_Stream_Size_Clause
;
3234 procedure Set_Has_Subprogram_Descriptor
(Id
: E
; V
: B
:= True) is
3237 end Set_Has_Subprogram_Descriptor
;
3239 procedure Set_Has_Task
(Id
: E
; V
: B
:= True) is
3241 pragma Assert
(Base_Type
(Id
) = Id
);
3245 procedure Set_Has_Unchecked_Union
(Id
: E
; V
: B
:= True) is
3247 pragma Assert
(Base_Type
(Id
) = Id
);
3248 Set_Flag123
(Id
, V
);
3249 end Set_Has_Unchecked_Union
;
3251 procedure Set_Has_Unknown_Discriminants
(Id
: E
; V
: B
:= True) is
3253 pragma Assert
(Is_Type
(Id
));
3255 end Set_Has_Unknown_Discriminants
;
3257 procedure Set_Has_Volatile_Components
(Id
: E
; V
: B
:= True) is
3259 pragma Assert
(not Is_Type
(Id
) or else Base_Type
(Id
) = Id
);
3261 end Set_Has_Volatile_Components
;
3263 procedure Set_Has_Xref_Entry
(Id
: E
; V
: B
:= True) is
3265 Set_Flag182
(Id
, V
);
3266 end Set_Has_Xref_Entry
;
3268 procedure Set_Hiding_Loop_Variable
(Id
: E
; V
: E
) is
3270 pragma Assert
(Ekind
(Id
) = E_Variable
);
3272 end Set_Hiding_Loop_Variable
;
3274 procedure Set_Homonym
(Id
: E
; V
: E
) is
3276 pragma Assert
(Id
/= V
);
3280 procedure Set_In_Package_Body
(Id
: E
; V
: B
:= True) is
3283 end Set_In_Package_Body
;
3285 procedure Set_In_Private_Part
(Id
: E
; V
: B
:= True) is
3288 end Set_In_Private_Part
;
3290 procedure Set_In_Use
(Id
: E
; V
: B
:= True) is
3292 pragma Assert
(Nkind
(Id
) in N_Entity
);
3296 procedure Set_Inner_Instances
(Id
: E
; V
: L
) is
3298 Set_Elist23
(Id
, V
);
3299 end Set_Inner_Instances
;
3301 procedure Set_Interface_Name
(Id
: E
; V
: N
) is
3304 end Set_Interface_Name
;
3306 procedure Set_Is_Abstract
(Id
: E
; V
: B
:= True) is
3309 end Set_Is_Abstract
;
3311 procedure Set_Is_Access_Constant
(Id
: E
; V
: B
:= True) is
3313 pragma Assert
(Is_Access_Type
(Id
));
3315 end Set_Is_Access_Constant
;
3317 procedure Set_Is_Ada_2005
(Id
: E
; V
: B
:= True) is
3319 Set_Flag185
(Id
, V
);
3320 end Set_Is_Ada_2005
;
3322 procedure Set_Is_Aliased
(Id
: E
; V
: B
:= True) is
3324 pragma Assert
(Nkind
(Id
) in N_Entity
);
3328 procedure Set_Is_AST_Entry
(Id
: E
; V
: B
:= True) is
3330 pragma Assert
(Is_Entry
(Id
));
3331 Set_Flag132
(Id
, V
);
3332 end Set_Is_AST_Entry
;
3334 procedure Set_Is_Asynchronous
(Id
: E
; V
: B
:= True) is
3337 (Ekind
(Id
) = E_Procedure
or else Is_Type
(Id
));
3339 end Set_Is_Asynchronous
;
3341 procedure Set_Is_Atomic
(Id
: E
; V
: B
:= True) is
3346 procedure Set_Is_Bit_Packed_Array
(Id
: E
; V
: B
:= True) is
3348 pragma Assert
((not V
)
3349 or else (Is_Array_Type
(Id
) and then Id
= Base_Type
(Id
)));
3351 Set_Flag122
(Id
, V
);
3352 end Set_Is_Bit_Packed_Array
;
3354 procedure Set_Is_Called
(Id
: E
; V
: B
:= True) is
3357 (Ekind
(Id
) = E_Procedure
or else Ekind
(Id
) = E_Function
);
3358 Set_Flag102
(Id
, V
);
3361 procedure Set_Is_Character_Type
(Id
: E
; V
: B
:= True) is
3364 end Set_Is_Character_Type
;
3366 procedure Set_Is_Child_Unit
(Id
: E
; V
: B
:= True) is
3369 end Set_Is_Child_Unit
;
3371 procedure Set_Is_Class_Wide_Equivalent_Type
(Id
: E
; V
: B
:= True) is
3374 end Set_Is_Class_Wide_Equivalent_Type
;
3376 procedure Set_Is_Compilation_Unit
(Id
: E
; V
: B
:= True) is
3378 Set_Flag149
(Id
, V
);
3379 end Set_Is_Compilation_Unit
;
3381 procedure Set_Is_Completely_Hidden
(Id
: E
; V
: B
:= True) is
3383 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
3384 Set_Flag103
(Id
, V
);
3385 end Set_Is_Completely_Hidden
;
3387 procedure Set_Is_Concurrent_Record_Type
(Id
: E
; V
: B
:= True) is
3390 end Set_Is_Concurrent_Record_Type
;
3392 procedure Set_Is_Constr_Subt_For_U_Nominal
(Id
: E
; V
: B
:= True) is
3395 end Set_Is_Constr_Subt_For_U_Nominal
;
3397 procedure Set_Is_Constr_Subt_For_UN_Aliased
(Id
: E
; V
: B
:= True) is
3399 Set_Flag141
(Id
, V
);
3400 end Set_Is_Constr_Subt_For_UN_Aliased
;
3402 procedure Set_Is_Constrained
(Id
: E
; V
: B
:= True) is
3404 pragma Assert
(Nkind
(Id
) in N_Entity
);
3406 end Set_Is_Constrained
;
3408 procedure Set_Is_Constructor
(Id
: E
; V
: B
:= True) is
3411 end Set_Is_Constructor
;
3413 procedure Set_Is_Controlled
(Id
: E
; V
: B
:= True) is
3415 pragma Assert
(Id
= Base_Type
(Id
));
3417 end Set_Is_Controlled
;
3419 procedure Set_Is_Controlling_Formal
(Id
: E
; V
: B
:= True) is
3421 pragma Assert
(Is_Formal
(Id
));
3423 end Set_Is_Controlling_Formal
;
3425 procedure Set_Is_CPP_Class
(Id
: E
; V
: B
:= True) is
3428 end Set_Is_CPP_Class
;
3430 procedure Set_Is_Discrim_SO_Function
(Id
: E
; V
: B
:= True) is
3432 Set_Flag176
(Id
, V
);
3433 end Set_Is_Discrim_SO_Function
;
3435 procedure Set_Is_Dispatching_Operation
(Id
: E
; V
: B
:= True) is
3440 Is_Overloadable
(Id
)
3442 Ekind
(Id
) = E_Subprogram_Type
);
3445 end Set_Is_Dispatching_Operation
;
3447 procedure Set_Is_Eliminated
(Id
: E
; V
: B
:= True) is
3449 Set_Flag124
(Id
, V
);
3450 end Set_Is_Eliminated
;
3452 procedure Set_Is_Entry_Formal
(Id
: E
; V
: B
:= True) is
3455 end Set_Is_Entry_Formal
;
3457 procedure Set_Is_Exported
(Id
: E
; V
: B
:= True) is
3460 end Set_Is_Exported
;
3462 procedure Set_Is_First_Subtype
(Id
: E
; V
: B
:= True) is
3465 end Set_Is_First_Subtype
;
3467 procedure Set_Is_For_Access_Subtype
(Id
: E
; V
: B
:= True) is
3470 (Ekind
(Id
) = E_Record_Subtype
3472 Ekind
(Id
) = E_Private_Subtype
);
3473 Set_Flag118
(Id
, V
);
3474 end Set_Is_For_Access_Subtype
;
3476 procedure Set_Is_Formal_Subprogram
(Id
: E
; V
: B
:= True) is
3478 Set_Flag111
(Id
, V
);
3479 end Set_Is_Formal_Subprogram
;
3481 procedure Set_Is_Frozen
(Id
: E
; V
: B
:= True) is
3483 pragma Assert
(Nkind
(Id
) in N_Entity
);
3487 procedure Set_Is_Generic_Actual_Type
(Id
: E
; V
: B
:= True) is
3489 pragma Assert
(Is_Type
(Id
));
3491 end Set_Is_Generic_Actual_Type
;
3493 procedure Set_Is_Generic_Instance
(Id
: E
; V
: B
:= True) is
3495 Set_Flag130
(Id
, V
);
3496 end Set_Is_Generic_Instance
;
3498 procedure Set_Is_Generic_Type
(Id
: E
; V
: B
:= True) is
3500 pragma Assert
(Nkind
(Id
) in N_Entity
);
3502 end Set_Is_Generic_Type
;
3504 procedure Set_Is_Hidden
(Id
: E
; V
: B
:= True) is
3509 procedure Set_Is_Hidden_Open_Scope
(Id
: E
; V
: B
:= True) is
3511 Set_Flag171
(Id
, V
);
3512 end Set_Is_Hidden_Open_Scope
;
3514 procedure Set_Is_Immediately_Visible
(Id
: E
; V
: B
:= True) is
3516 pragma Assert
(Nkind
(Id
) in N_Entity
);
3518 end Set_Is_Immediately_Visible
;
3520 procedure Set_Is_Imported
(Id
: E
; V
: B
:= True) is
3523 end Set_Is_Imported
;
3525 procedure Set_Is_Inlined
(Id
: E
; V
: B
:= True) is
3530 procedure Set_Is_Instantiated
(Id
: E
; V
: B
:= True) is
3532 Set_Flag126
(Id
, V
);
3533 end Set_Is_Instantiated
;
3535 procedure Set_Is_Internal
(Id
: E
; V
: B
:= True) is
3537 pragma Assert
(Nkind
(Id
) in N_Entity
);
3539 end Set_Is_Internal
;
3541 procedure Set_Is_Interrupt_Handler
(Id
: E
; V
: B
:= True) is
3543 pragma Assert
(Nkind
(Id
) in N_Entity
);
3545 end Set_Is_Interrupt_Handler
;
3547 procedure Set_Is_Intrinsic_Subprogram
(Id
: E
; V
: B
:= True) is
3550 end Set_Is_Intrinsic_Subprogram
;
3552 procedure Set_Is_Itype
(Id
: E
; V
: B
:= True) is
3557 procedure Set_Is_Known_Non_Null
(Id
: E
; V
: B
:= True) is
3560 end Set_Is_Known_Non_Null
;
3562 procedure Set_Is_Known_Valid
(Id
: E
; V
: B
:= True) is
3564 Set_Flag170
(Id
, V
);
3565 end Set_Is_Known_Valid
;
3567 procedure Set_Is_Limited_Composite
(Id
: E
; V
: B
:= True) is
3569 pragma Assert
(Is_Type
(Id
));
3570 Set_Flag106
(Id
, V
);
3571 end Set_Is_Limited_Composite
;
3573 procedure Set_Is_Limited_Record
(Id
: E
; V
: B
:= True) is
3576 end Set_Is_Limited_Record
;
3578 procedure Set_Is_Machine_Code_Subprogram
(Id
: E
; V
: B
:= True) is
3580 pragma Assert
(Is_Subprogram
(Id
));
3581 Set_Flag137
(Id
, V
);
3582 end Set_Is_Machine_Code_Subprogram
;
3584 procedure Set_Is_Non_Static_Subtype
(Id
: E
; V
: B
:= True) is
3586 pragma Assert
(Is_Type
(Id
));
3587 Set_Flag109
(Id
, V
);
3588 end Set_Is_Non_Static_Subtype
;
3590 procedure Set_Is_Null_Init_Proc
(Id
: E
; V
: B
:= True) is
3592 pragma Assert
(Ekind
(Id
) = E_Procedure
);
3593 Set_Flag178
(Id
, V
);
3594 end Set_Is_Null_Init_Proc
;
3596 procedure Set_Is_Obsolescent
(Id
: E
; V
: B
:= True) is
3598 pragma Assert
(Is_Subprogram
(Id
));
3599 Set_Flag153
(Id
, V
);
3600 end Set_Is_Obsolescent
;
3602 procedure Set_Is_Optional_Parameter
(Id
: E
; V
: B
:= True) is
3604 pragma Assert
(Is_Formal
(Id
));
3605 Set_Flag134
(Id
, V
);
3606 end Set_Is_Optional_Parameter
;
3608 procedure Set_Is_Overriding_Operation
(Id
: E
; V
: B
:= True) is
3610 pragma Assert
(Is_Subprogram
(Id
));
3612 end Set_Is_Overriding_Operation
;
3614 procedure Set_Is_Package_Body_Entity
(Id
: E
; V
: B
:= True) is
3616 Set_Flag160
(Id
, V
);
3617 end Set_Is_Package_Body_Entity
;
3619 procedure Set_Is_Packed
(Id
: E
; V
: B
:= True) is
3621 pragma Assert
(Base_Type
(Id
) = Id
);
3625 procedure Set_Is_Packed_Array_Type
(Id
: E
; V
: B
:= True) is
3627 Set_Flag138
(Id
, V
);
3628 end Set_Is_Packed_Array_Type
;
3630 procedure Set_Is_Potentially_Use_Visible
(Id
: E
; V
: B
:= True) is
3632 pragma Assert
(Nkind
(Id
) in N_Entity
);
3634 end Set_Is_Potentially_Use_Visible
;
3636 procedure Set_Is_Preelaborated
(Id
: E
; V
: B
:= True) is
3639 end Set_Is_Preelaborated
;
3641 procedure Set_Is_Private_Composite
(Id
: E
; V
: B
:= True) is
3643 pragma Assert
(Is_Type
(Id
));
3644 Set_Flag107
(Id
, V
);
3645 end Set_Is_Private_Composite
;
3647 procedure Set_Is_Private_Descendant
(Id
: E
; V
: B
:= True) is
3650 end Set_Is_Private_Descendant
;
3652 procedure Set_Is_Public
(Id
: E
; V
: B
:= True) is
3654 pragma Assert
(Nkind
(Id
) in N_Entity
);
3658 procedure Set_Is_Pure
(Id
: E
; V
: B
:= True) is
3663 procedure Set_Is_Remote_Call_Interface
(Id
: E
; V
: B
:= True) is
3666 end Set_Is_Remote_Call_Interface
;
3668 procedure Set_Is_Remote_Types
(Id
: E
; V
: B
:= True) is
3671 end Set_Is_Remote_Types
;
3673 procedure Set_Is_Renaming_Of_Object
(Id
: E
; V
: B
:= True) is
3675 Set_Flag112
(Id
, V
);
3676 end Set_Is_Renaming_Of_Object
;
3678 procedure Set_Is_Shared_Passive
(Id
: E
; V
: B
:= True) is
3681 end Set_Is_Shared_Passive
;
3683 procedure Set_Is_Statically_Allocated
(Id
: E
; V
: B
:= True) is
3686 (Ekind
(Id
) = E_Exception
3687 or else Ekind
(Id
) = E_Variable
3688 or else Ekind
(Id
) = E_Constant
3689 or else Is_Type
(Id
)
3690 or else Ekind
(Id
) = E_Void
);
3692 end Set_Is_Statically_Allocated
;
3694 procedure Set_Is_Tag
(Id
: E
; V
: B
:= True) is
3696 pragma Assert
(Nkind
(Id
) in N_Entity
);
3700 procedure Set_Is_Tagged_Type
(Id
: E
; V
: B
:= True) is
3703 end Set_Is_Tagged_Type
;
3705 procedure Set_Is_Thread_Body
(Id
: E
; V
: B
:= True) is
3708 end Set_Is_Thread_Body
;
3710 procedure Set_Is_True_Constant
(Id
: E
; V
: B
:= True) is
3712 Set_Flag163
(Id
, V
);
3713 end Set_Is_True_Constant
;
3715 procedure Set_Is_Unchecked_Union
(Id
: E
; V
: B
:= True) is
3717 pragma Assert
(Base_Type
(Id
) = Id
);
3718 Set_Flag117
(Id
, V
);
3719 end Set_Is_Unchecked_Union
;
3721 procedure Set_Is_Unsigned_Type
(Id
: E
; V
: B
:= True) is
3723 pragma Assert
(Is_Discrete_Or_Fixed_Point_Type
(Id
));
3724 Set_Flag144
(Id
, V
);
3725 end Set_Is_Unsigned_Type
;
3727 procedure Set_Is_Valued_Procedure
(Id
: E
; V
: B
:= True) is
3729 pragma Assert
(Ekind
(Id
) = E_Procedure
);
3730 Set_Flag127
(Id
, V
);
3731 end Set_Is_Valued_Procedure
;
3733 procedure Set_Is_Visible_Child_Unit
(Id
: E
; V
: B
:= True) is
3735 pragma Assert
(Is_Child_Unit
(Id
));
3736 Set_Flag116
(Id
, V
);
3737 end Set_Is_Visible_Child_Unit
;
3739 procedure Set_Is_VMS_Exception
(Id
: E
; V
: B
:= True) is
3741 pragma Assert
(Ekind
(Id
) = E_Exception
);
3742 Set_Flag133
(Id
, V
);
3743 end Set_Is_VMS_Exception
;
3745 procedure Set_Is_Volatile
(Id
: E
; V
: B
:= True) is
3747 pragma Assert
(Nkind
(Id
) in N_Entity
);
3749 end Set_Is_Volatile
;
3751 procedure Set_Kill_Elaboration_Checks
(Id
: E
; V
: B
:= True) is
3754 end Set_Kill_Elaboration_Checks
;
3756 procedure Set_Kill_Range_Checks
(Id
: E
; V
: B
:= True) is
3759 end Set_Kill_Range_Checks
;
3761 procedure Set_Kill_Tag_Checks
(Id
: E
; V
: B
:= True) is
3764 end Set_Kill_Tag_Checks
;
3766 procedure Set_Last_Entity
(Id
: E
; V
: E
) is
3769 end Set_Last_Entity
;
3771 procedure Set_Limited_View
(Id
: E
; V
: E
) is
3773 pragma Assert
(Ekind
(Id
) = E_Package
);
3775 end Set_Limited_View
;
3777 procedure Set_Lit_Indexes
(Id
: E
; V
: E
) is
3779 pragma Assert
(Is_Enumeration_Type
(Id
) and then Root_Type
(Id
) = Id
);
3781 end Set_Lit_Indexes
;
3783 procedure Set_Lit_Strings
(Id
: E
; V
: E
) is
3785 pragma Assert
(Is_Enumeration_Type
(Id
) and then Root_Type
(Id
) = Id
);
3787 end Set_Lit_Strings
;
3789 procedure Set_Machine_Radix_10
(Id
: E
; V
: B
:= True) is
3791 pragma Assert
(Is_Decimal_Fixed_Point_Type
(Id
));
3793 end Set_Machine_Radix_10
;
3795 procedure Set_Master_Id
(Id
: E
; V
: E
) is
3800 procedure Set_Materialize_Entity
(Id
: E
; V
: B
:= True) is
3802 Set_Flag168
(Id
, V
);
3803 end Set_Materialize_Entity
;
3805 procedure Set_Mechanism
(Id
: E
; V
: M
) is
3807 pragma Assert
(Ekind
(Id
) = E_Function
or else Is_Formal
(Id
));
3808 Set_Uint8
(Id
, UI_From_Int
(V
));
3811 procedure Set_Modulus
(Id
: E
; V
: U
) is
3813 pragma Assert
(Ekind
(Id
) = E_Modular_Integer_Type
);
3817 procedure Set_Must_Be_On_Byte_Boundary
(Id
: E
; V
: B
:= True) is
3819 pragma Assert
(Is_Type
(Id
));
3820 Set_Flag183
(Id
, V
);
3821 end Set_Must_Be_On_Byte_Boundary
;
3823 procedure Set_Needs_Debug_Info
(Id
: E
; V
: B
:= True) is
3825 Set_Flag147
(Id
, V
);
3826 end Set_Needs_Debug_Info
;
3828 procedure Set_Needs_No_Actuals
(Id
: E
; V
: B
:= True) is
3831 (Is_Overloadable
(Id
)
3832 or else Ekind
(Id
) = E_Subprogram_Type
3833 or else Ekind
(Id
) = E_Entry_Family
);
3835 end Set_Needs_No_Actuals
;
3837 procedure Set_Never_Set_In_Source
(Id
: E
; V
: B
:= True) is
3839 Set_Flag115
(Id
, V
);
3840 end Set_Never_Set_In_Source
;
3842 procedure Set_Next_Inlined_Subprogram
(Id
: E
; V
: E
) is
3845 end Set_Next_Inlined_Subprogram
;
3847 procedure Set_No_Pool_Assigned
(Id
: E
; V
: B
:= True) is
3849 pragma Assert
(Is_Access_Type
(Id
) and then Base_Type
(Id
) = Id
);
3850 Set_Flag131
(Id
, V
);
3851 end Set_No_Pool_Assigned
;
3853 procedure Set_No_Return
(Id
: E
; V
: B
:= True) is
3856 (Ekind
(Id
) = E_Procedure
or else Ekind
(Id
) = E_Generic_Procedure
);
3857 Set_Flag113
(Id
, V
);
3860 procedure Set_No_Strict_Aliasing
(Id
: E
; V
: B
:= True) is
3862 pragma Assert
(Is_Access_Type
(Id
) and then Base_Type
(Id
) = Id
);
3863 Set_Flag136
(Id
, V
);
3864 end Set_No_Strict_Aliasing
;
3866 procedure Set_Non_Binary_Modulus
(Id
: E
; V
: B
:= True) is
3868 pragma Assert
(Ekind
(Id
) = E_Modular_Integer_Type
);
3870 end Set_Non_Binary_Modulus
;
3872 procedure Set_Non_Limited_View
(Id
: E
; V
: E
) is
3873 pragma Assert
(False
3874 or else Ekind
(Id
) = E_Incomplete_Type
);
3877 end Set_Non_Limited_View
;
3879 procedure Set_Nonzero_Is_True
(Id
: E
; V
: B
:= True) is
3882 (Root_Type
(Id
) = Standard_Boolean
3883 and then Ekind
(Id
) = E_Enumeration_Type
);
3884 Set_Flag162
(Id
, V
);
3885 end Set_Nonzero_Is_True
;
3887 procedure Set_Normalized_First_Bit
(Id
: E
; V
: U
) is
3890 (Ekind
(Id
) = E_Component
or else Ekind
(Id
) = E_Discriminant
);
3892 end Set_Normalized_First_Bit
;
3894 procedure Set_Normalized_Position
(Id
: E
; V
: U
) is
3897 (Ekind
(Id
) = E_Component
or else Ekind
(Id
) = E_Discriminant
);
3899 end Set_Normalized_Position
;
3901 procedure Set_Normalized_Position_Max
(Id
: E
; V
: U
) is
3904 (Ekind
(Id
) = E_Component
or else Ekind
(Id
) = E_Discriminant
);
3906 end Set_Normalized_Position_Max
;
3908 procedure Set_Object_Ref
(Id
: E
; V
: E
) is
3910 pragma Assert
(Ekind
(Id
) = E_Protected_Body
);
3914 procedure Set_Obsolescent_Warning
(Id
: E
; V
: N
) is
3916 pragma Assert
(Is_Subprogram
(Id
));
3918 end Set_Obsolescent_Warning
;
3920 procedure Set_Original_Access_Type
(Id
: E
; V
: E
) is
3923 (Ekind
(Id
) = E_Access_Subprogram_Type
3924 or else Ekind
(Id
) = E_Access_Protected_Subprogram_Type
);
3926 end Set_Original_Access_Type
;
3928 procedure Set_Original_Array_Type
(Id
: E
; V
: E
) is
3930 pragma Assert
(Is_Array_Type
(Id
) or else Is_Modular_Integer_Type
(Id
));
3932 end Set_Original_Array_Type
;
3934 procedure Set_Original_Record_Component
(Id
: E
; V
: E
) is
3937 (Ekind
(Id
) = E_Void
3938 or else Ekind
(Id
) = E_Component
3939 or else Ekind
(Id
) = E_Discriminant
);
3941 end Set_Original_Record_Component
;
3943 procedure Set_Packed_Array_Type
(Id
: E
; V
: E
) is
3945 pragma Assert
(Is_Array_Type
(Id
));
3947 end Set_Packed_Array_Type
;
3949 procedure Set_Parent_Subtype
(Id
: E
; V
: E
) is
3951 pragma Assert
(Ekind
(Id
) = E_Record_Type
);
3953 end Set_Parent_Subtype
;
3955 procedure Set_Primitive_Operations
(Id
: E
; V
: L
) is
3957 pragma Assert
(Is_Tagged_Type
(Id
));
3958 Set_Elist15
(Id
, V
);
3959 end Set_Primitive_Operations
;
3961 procedure Set_Prival
(Id
: E
; V
: E
) is
3963 pragma Assert
(Is_Protected_Private
(Id
));
3967 procedure Set_Privals_Chain
(Id
: E
; V
: L
) is
3969 pragma Assert
(Is_Overloadable
(Id
)
3970 or else Ekind
(Id
) = E_Entry_Family
);
3971 Set_Elist23
(Id
, V
);
3972 end Set_Privals_Chain
;
3974 procedure Set_Private_Dependents
(Id
: E
; V
: L
) is
3976 pragma Assert
(Is_Incomplete_Or_Private_Type
(Id
));
3977 Set_Elist18
(Id
, V
);
3978 end Set_Private_Dependents
;
3980 procedure Set_Private_View
(Id
: E
; V
: N
) is
3982 pragma Assert
(Is_Private_Type
(Id
));
3984 end Set_Private_View
;
3986 procedure Set_Protected_Body_Subprogram
(Id
: E
; V
: E
) is
3988 pragma Assert
(Is_Subprogram
(Id
) or else Is_Entry
(Id
));
3990 end Set_Protected_Body_Subprogram
;
3992 procedure Set_Protected_Formal
(Id
: E
; V
: E
) is
3994 pragma Assert
(Is_Formal
(Id
));
3996 end Set_Protected_Formal
;
3998 procedure Set_Protected_Operation
(Id
: E
; V
: N
) is
4000 pragma Assert
(Is_Protected_Private
(Id
));
4002 end Set_Protected_Operation
;
4004 procedure Set_Reachable
(Id
: E
; V
: B
:= True) is
4009 procedure Set_Referenced
(Id
: E
; V
: B
:= True) is
4011 Set_Flag156
(Id
, V
);
4014 procedure Set_Referenced_As_LHS
(Id
: E
; V
: B
:= True) is
4017 end Set_Referenced_As_LHS
;
4019 procedure Set_Referenced_Object
(Id
: E
; V
: N
) is
4021 pragma Assert
(Is_Type
(Id
));
4023 end Set_Referenced_Object
;
4025 procedure Set_Register_Exception_Call
(Id
: E
; V
: N
) is
4027 pragma Assert
(Ekind
(Id
) = E_Exception
);
4029 end Set_Register_Exception_Call
;
4031 procedure Set_Related_Array_Object
(Id
: E
; V
: E
) is
4033 pragma Assert
(Is_Array_Type
(Id
));
4035 end Set_Related_Array_Object
;
4037 procedure Set_Related_Instance
(Id
: E
; V
: E
) is
4040 (Ekind
(Id
) = E_Package
or else Ekind
(Id
) = E_Package_Body
);
4042 end Set_Related_Instance
;
4044 procedure Set_Renamed_Entity
(Id
: E
; V
: N
) is
4047 end Set_Renamed_Entity
;
4049 procedure Set_Renamed_Object
(Id
: E
; V
: N
) is
4052 end Set_Renamed_Object
;
4054 procedure Set_Renaming_Map
(Id
: E
; V
: U
) is
4057 end Set_Renaming_Map
;
4059 procedure Set_Return_Present
(Id
: E
; V
: B
:= True) is
4062 end Set_Return_Present
;
4064 procedure Set_Returns_By_Ref
(Id
: E
; V
: B
:= True) is
4067 end Set_Returns_By_Ref
;
4069 procedure Set_Reverse_Bit_Order
(Id
: E
; V
: B
:= True) is
4072 (Is_Record_Type
(Id
) and then Id
= Base_Type
(Id
));
4073 Set_Flag164
(Id
, V
);
4074 end Set_Reverse_Bit_Order
;
4076 procedure Set_RM_Size
(Id
: E
; V
: U
) is
4078 pragma Assert
(Is_Type
(Id
));
4082 procedure Set_Scalar_Range
(Id
: E
; V
: N
) is
4085 end Set_Scalar_Range
;
4087 procedure Set_Scale_Value
(Id
: E
; V
: U
) is
4090 end Set_Scale_Value
;
4092 procedure Set_Scope_Depth_Value
(Id
: E
; V
: U
) is
4094 pragma Assert
(not Is_Record_Type
(Id
));
4096 end Set_Scope_Depth_Value
;
4098 procedure Set_Sec_Stack_Needed_For_Return
(Id
: E
; V
: B
:= True) is
4100 Set_Flag167
(Id
, V
);
4101 end Set_Sec_Stack_Needed_For_Return
;
4103 procedure Set_Shadow_Entities
(Id
: E
; V
: S
) is
4106 (Ekind
(Id
) = E_Package
or else Ekind
(Id
) = E_Generic_Package
);
4108 end Set_Shadow_Entities
;
4110 procedure Set_Shared_Var_Assign_Proc
(Id
: E
; V
: E
) is
4112 pragma Assert
(Ekind
(Id
) = E_Variable
);
4114 end Set_Shared_Var_Assign_Proc
;
4116 procedure Set_Shared_Var_Read_Proc
(Id
: E
; V
: E
) is
4118 pragma Assert
(Ekind
(Id
) = E_Variable
);
4120 end Set_Shared_Var_Read_Proc
;
4122 procedure Set_Size_Check_Code
(Id
: E
; V
: N
) is
4124 pragma Assert
(Ekind
(Id
) = E_Constant
or else Ekind
(Id
) = E_Variable
);
4126 end Set_Size_Check_Code
;
4128 procedure Set_Size_Depends_On_Discriminant
(Id
: E
; V
: B
:= True) is
4130 Set_Flag177
(Id
, V
);
4131 end Set_Size_Depends_On_Discriminant
;
4133 procedure Set_Size_Known_At_Compile_Time
(Id
: E
; V
: B
:= True) is
4136 end Set_Size_Known_At_Compile_Time
;
4138 procedure Set_Small_Value
(Id
: E
; V
: R
) is
4140 pragma Assert
(Is_Fixed_Point_Type
(Id
));
4141 Set_Ureal21
(Id
, V
);
4142 end Set_Small_Value
;
4144 procedure Set_Spec_Entity
(Id
: E
; V
: E
) is
4146 pragma Assert
(Ekind
(Id
) = E_Package_Body
or else Is_Formal
(Id
));
4148 end Set_Spec_Entity
;
4150 procedure Set_Storage_Size_Variable
(Id
: E
; V
: E
) is
4152 pragma Assert
(Is_Access_Type
(Id
) or else Is_Task_Type
(Id
));
4153 pragma Assert
(Base_Type
(Id
) = Id
);
4155 end Set_Storage_Size_Variable
;
4157 procedure Set_Stored_Constraint
(Id
: E
; V
: L
) is
4159 pragma Assert
(Nkind
(Id
) in N_Entity
);
4160 Set_Elist23
(Id
, V
);
4161 end Set_Stored_Constraint
;
4163 procedure Set_Strict_Alignment
(Id
: E
; V
: B
:= True) is
4165 pragma Assert
(Base_Type
(Id
) = Id
);
4166 Set_Flag145
(Id
, V
);
4167 end Set_Strict_Alignment
;
4169 procedure Set_String_Literal_Length
(Id
: E
; V
: U
) is
4171 pragma Assert
(Ekind
(Id
) = E_String_Literal_Subtype
);
4173 end Set_String_Literal_Length
;
4175 procedure Set_String_Literal_Low_Bound
(Id
: E
; V
: N
) is
4177 pragma Assert
(Ekind
(Id
) = E_String_Literal_Subtype
);
4179 end Set_String_Literal_Low_Bound
;
4181 procedure Set_Suppress_Elaboration_Warnings
(Id
: E
; V
: B
:= True) is
4183 Set_Flag148
(Id
, V
);
4184 end Set_Suppress_Elaboration_Warnings
;
4186 procedure Set_Suppress_Init_Proc
(Id
: E
; V
: B
:= True) is
4188 pragma Assert
(Id
= Base_Type
(Id
));
4189 Set_Flag105
(Id
, V
);
4190 end Set_Suppress_Init_Proc
;
4192 procedure Set_Suppress_Style_Checks
(Id
: E
; V
: B
:= True) is
4194 Set_Flag165
(Id
, V
);
4195 end Set_Suppress_Style_Checks
;
4197 procedure Set_Treat_As_Volatile
(Id
: E
; V
: B
:= True) is
4200 end Set_Treat_As_Volatile
;
4202 procedure Set_Underlying_Full_View
(Id
: E
; V
: E
) is
4204 pragma Assert
(Ekind
(Id
) in Private_Kind
);
4206 end Set_Underlying_Full_View
;
4208 procedure Set_Unset_Reference
(Id
: E
; V
: N
) is
4211 end Set_Unset_Reference
;
4213 procedure Set_Uses_Sec_Stack
(Id
: E
; V
: B
:= True) is
4216 end Set_Uses_Sec_Stack
;
4218 procedure Set_Vax_Float
(Id
: E
; V
: B
:= True) is
4220 pragma Assert
(Id
= Base_Type
(Id
));
4221 Set_Flag151
(Id
, V
);
4224 procedure Set_Warnings_Off
(Id
: E
; V
: B
:= True) is
4227 end Set_Warnings_Off
;
4229 -----------------------------------
4230 -- Field Initialization Routines --
4231 -----------------------------------
4233 procedure Init_Alignment
(Id
: E
) is
4235 Set_Uint14
(Id
, Uint_0
);
4238 procedure Init_Alignment
(Id
: E
; V
: Int
) is
4240 Set_Uint14
(Id
, UI_From_Int
(V
));
4243 procedure Init_Component_Bit_Offset
(Id
: E
) is
4245 Set_Uint11
(Id
, No_Uint
);
4246 end Init_Component_Bit_Offset
;
4248 procedure Init_Component_Bit_Offset
(Id
: E
; V
: Int
) is
4250 Set_Uint11
(Id
, UI_From_Int
(V
));
4251 end Init_Component_Bit_Offset
;
4253 procedure Init_Component_Size
(Id
: E
) is
4255 Set_Uint22
(Id
, Uint_0
);
4256 end Init_Component_Size
;
4258 procedure Init_Component_Size
(Id
: E
; V
: Int
) is
4260 Set_Uint22
(Id
, UI_From_Int
(V
));
4261 end Init_Component_Size
;
4263 procedure Init_Digits_Value
(Id
: E
) is
4265 Set_Uint17
(Id
, Uint_0
);
4266 end Init_Digits_Value
;
4268 procedure Init_Digits_Value
(Id
: E
; V
: Int
) is
4270 Set_Uint17
(Id
, UI_From_Int
(V
));
4271 end Init_Digits_Value
;
4273 procedure Init_Esize
(Id
: E
) is
4275 Set_Uint12
(Id
, Uint_0
);
4278 procedure Init_Esize
(Id
: E
; V
: Int
) is
4280 Set_Uint12
(Id
, UI_From_Int
(V
));
4283 procedure Init_Normalized_First_Bit
(Id
: E
) is
4285 Set_Uint8
(Id
, No_Uint
);
4286 end Init_Normalized_First_Bit
;
4288 procedure Init_Normalized_First_Bit
(Id
: E
; V
: Int
) is
4290 Set_Uint8
(Id
, UI_From_Int
(V
));
4291 end Init_Normalized_First_Bit
;
4293 procedure Init_Normalized_Position
(Id
: E
) is
4295 Set_Uint14
(Id
, No_Uint
);
4296 end Init_Normalized_Position
;
4298 procedure Init_Normalized_Position
(Id
: E
; V
: Int
) is
4300 Set_Uint14
(Id
, UI_From_Int
(V
));
4301 end Init_Normalized_Position
;
4303 procedure Init_Normalized_Position_Max
(Id
: E
) is
4305 Set_Uint10
(Id
, No_Uint
);
4306 end Init_Normalized_Position_Max
;
4308 procedure Init_Normalized_Position_Max
(Id
: E
; V
: Int
) is
4310 Set_Uint10
(Id
, UI_From_Int
(V
));
4311 end Init_Normalized_Position_Max
;
4313 procedure Init_RM_Size
(Id
: E
) is
4315 Set_Uint13
(Id
, Uint_0
);
4318 procedure Init_RM_Size
(Id
: E
; V
: Int
) is
4320 Set_Uint13
(Id
, UI_From_Int
(V
));
4323 -----------------------------
4324 -- Init_Component_Location --
4325 -----------------------------
4327 procedure Init_Component_Location
(Id
: E
) is
4329 Set_Uint8
(Id
, No_Uint
); -- Normalized_First_Bit
4330 Set_Uint10
(Id
, No_Uint
); -- Normalized_Position_Max
4331 Set_Uint11
(Id
, No_Uint
); -- Component_First_Bit
4332 Set_Uint12
(Id
, Uint_0
); -- Esize
4333 Set_Uint14
(Id
, No_Uint
); -- Normalized_Position
4334 end Init_Component_Location
;
4340 procedure Init_Size
(Id
: E
; V
: Int
) is
4342 Set_Uint12
(Id
, UI_From_Int
(V
)); -- Esize
4343 Set_Uint13
(Id
, UI_From_Int
(V
)); -- RM_Size
4346 ---------------------
4347 -- Init_Size_Align --
4348 ---------------------
4350 procedure Init_Size_Align
(Id
: E
) is
4352 Set_Uint12
(Id
, Uint_0
); -- Esize
4353 Set_Uint13
(Id
, Uint_0
); -- RM_Size
4354 Set_Uint14
(Id
, Uint_0
); -- Alignment
4355 end Init_Size_Align
;
4357 ----------------------------------------------
4358 -- Type Representation Attribute Predicates --
4359 ----------------------------------------------
4361 function Known_Alignment
(E
: Entity_Id
) return B
is
4363 return Uint14
(E
) /= Uint_0
4364 and then Uint14
(E
) /= No_Uint
;
4365 end Known_Alignment
;
4367 function Known_Component_Bit_Offset
(E
: Entity_Id
) return B
is
4369 return Uint11
(E
) /= No_Uint
;
4370 end Known_Component_Bit_Offset
;
4372 function Known_Component_Size
(E
: Entity_Id
) return B
is
4374 return Uint22
(Base_Type
(E
)) /= Uint_0
4375 and then Uint22
(Base_Type
(E
)) /= No_Uint
;
4376 end Known_Component_Size
;
4378 function Known_Esize
(E
: Entity_Id
) return B
is
4380 return Uint12
(E
) /= Uint_0
4381 and then Uint12
(E
) /= No_Uint
;
4384 function Known_Normalized_First_Bit
(E
: Entity_Id
) return B
is
4386 return Uint8
(E
) /= No_Uint
;
4387 end Known_Normalized_First_Bit
;
4389 function Known_Normalized_Position
(E
: Entity_Id
) return B
is
4391 return Uint14
(E
) /= No_Uint
;
4392 end Known_Normalized_Position
;
4394 function Known_Normalized_Position_Max
(E
: Entity_Id
) return B
is
4396 return Uint10
(E
) /= No_Uint
;
4397 end Known_Normalized_Position_Max
;
4399 function Known_RM_Size
(E
: Entity_Id
) return B
is
4401 return Uint13
(E
) /= No_Uint
4402 and then (Uint13
(E
) /= Uint_0
4403 or else Is_Discrete_Type
(E
)
4404 or else Is_Fixed_Point_Type
(E
));
4407 function Known_Static_Component_Bit_Offset
(E
: Entity_Id
) return B
is
4409 return Uint11
(E
) /= No_Uint
4410 and then Uint11
(E
) >= Uint_0
;
4411 end Known_Static_Component_Bit_Offset
;
4413 function Known_Static_Component_Size
(E
: Entity_Id
) return B
is
4415 return Uint22
(Base_Type
(E
)) > Uint_0
;
4416 end Known_Static_Component_Size
;
4418 function Known_Static_Esize
(E
: Entity_Id
) return B
is
4420 return Uint12
(E
) > Uint_0
;
4421 end Known_Static_Esize
;
4423 function Known_Static_Normalized_First_Bit
(E
: Entity_Id
) return B
is
4425 return Uint8
(E
) /= No_Uint
4426 and then Uint8
(E
) >= Uint_0
;
4427 end Known_Static_Normalized_First_Bit
;
4429 function Known_Static_Normalized_Position
(E
: Entity_Id
) return B
is
4431 return Uint14
(E
) /= No_Uint
4432 and then Uint14
(E
) >= Uint_0
;
4433 end Known_Static_Normalized_Position
;
4435 function Known_Static_Normalized_Position_Max
(E
: Entity_Id
) return B
is
4437 return Uint10
(E
) /= No_Uint
4438 and then Uint10
(E
) >= Uint_0
;
4439 end Known_Static_Normalized_Position_Max
;
4441 function Known_Static_RM_Size
(E
: Entity_Id
) return B
is
4443 return Uint13
(E
) > Uint_0
4444 or else Is_Discrete_Type
(E
)
4445 or else Is_Fixed_Point_Type
(E
);
4446 end Known_Static_RM_Size
;
4448 function Unknown_Alignment
(E
: Entity_Id
) return B
is
4450 return Uint14
(E
) = Uint_0
4451 or else Uint14
(E
) = No_Uint
;
4452 end Unknown_Alignment
;
4454 function Unknown_Component_Bit_Offset
(E
: Entity_Id
) return B
is
4456 return Uint11
(E
) = No_Uint
;
4457 end Unknown_Component_Bit_Offset
;
4459 function Unknown_Component_Size
(E
: Entity_Id
) return B
is
4461 return Uint22
(Base_Type
(E
)) = Uint_0
4463 Uint22
(Base_Type
(E
)) = No_Uint
;
4464 end Unknown_Component_Size
;
4466 function Unknown_Esize
(E
: Entity_Id
) return B
is
4468 return Uint12
(E
) = No_Uint
4470 Uint12
(E
) = Uint_0
;
4473 function Unknown_Normalized_First_Bit
(E
: Entity_Id
) return B
is
4475 return Uint8
(E
) = No_Uint
;
4476 end Unknown_Normalized_First_Bit
;
4478 function Unknown_Normalized_Position
(E
: Entity_Id
) return B
is
4480 return Uint14
(E
) = No_Uint
;
4481 end Unknown_Normalized_Position
;
4483 function Unknown_Normalized_Position_Max
(E
: Entity_Id
) return B
is
4485 return Uint10
(E
) = No_Uint
;
4486 end Unknown_Normalized_Position_Max
;
4488 function Unknown_RM_Size
(E
: Entity_Id
) return B
is
4490 return (Uint13
(E
) = Uint_0
4491 and then not Is_Discrete_Type
(E
)
4492 and then not Is_Fixed_Point_Type
(E
))
4493 or else Uint13
(E
) = No_Uint
;
4494 end Unknown_RM_Size
;
4496 --------------------
4497 -- Address_Clause --
4498 --------------------
4500 function Address_Clause
(Id
: E
) return N
is
4502 return Rep_Clause
(Id
, Name_Address
);
4505 ----------------------
4506 -- Alignment_Clause --
4507 ----------------------
4509 function Alignment_Clause
(Id
: E
) return N
is
4511 return Rep_Clause
(Id
, Name_Alignment
);
4512 end Alignment_Clause
;
4514 ----------------------
4515 -- Ancestor_Subtype --
4516 ----------------------
4518 function Ancestor_Subtype
(Id
: E
) return E
is
4520 -- If this is first subtype, or is a base type, then there is no
4521 -- ancestor subtype, so we return Empty to indicate this fact.
4523 if Is_First_Subtype
(Id
) or else Id
= Base_Type
(Id
) then
4528 D
: constant Node_Id
:= Declaration_Node
(Id
);
4531 -- If we have a subtype declaration, get the ancestor subtype
4533 if Nkind
(D
) = N_Subtype_Declaration
then
4534 if Nkind
(Subtype_Indication
(D
)) = N_Subtype_Indication
then
4535 return Entity
(Subtype_Mark
(Subtype_Indication
(D
)));
4537 return Entity
(Subtype_Indication
(D
));
4540 -- If not, then no subtype indication is available
4546 end Ancestor_Subtype
;
4552 procedure Append_Entity
(Id
: Entity_Id
; V
: Entity_Id
) is
4554 if Last_Entity
(V
) = Empty
then
4555 Set_First_Entity
(V
, Id
);
4557 Set_Next_Entity
(Last_Entity
(V
), Id
);
4560 Set_Next_Entity
(Id
, Empty
);
4562 Set_Last_Entity
(V
, Id
);
4569 function Base_Type
(Id
: E
) return E
is
4572 when E_Enumeration_Subtype |
4574 E_Signed_Integer_Subtype |
4575 E_Modular_Integer_Subtype |
4576 E_Floating_Point_Subtype |
4577 E_Ordinary_Fixed_Point_Subtype |
4578 E_Decimal_Fixed_Point_Subtype |
4583 E_Record_Subtype_With_Private |
4584 E_Limited_Private_Subtype |
4586 E_Protected_Subtype |
4588 E_String_Literal_Subtype |
4589 E_Class_Wide_Subtype
=>
4597 -------------------------
4598 -- Component_Alignment --
4599 -------------------------
4601 -- Component Alignment is encoded using two flags, Flag128/129 as
4602 -- follows. Note that both flags False = Align_Default, so that the
4603 -- default initialization of flags to False initializes component
4604 -- alignment to the default value as required.
4606 -- Flag128 Flag129 Value
4607 -- ------- ------- -----
4608 -- False False Calign_Default
4609 -- False True Calign_Component_Size
4610 -- True False Calign_Component_Size_4
4611 -- True True Calign_Storage_Unit
4613 function Component_Alignment
(Id
: E
) return C
is
4614 BT
: constant Node_Id
:= Base_Type
(Id
);
4617 pragma Assert
(Is_Array_Type
(Id
) or else Is_Record_Type
(Id
));
4619 if Flag128
(BT
) then
4620 if Flag129
(BT
) then
4621 return Calign_Storage_Unit
;
4623 return Calign_Component_Size_4
;
4627 if Flag129
(BT
) then
4628 return Calign_Component_Size
;
4630 return Calign_Default
;
4633 end Component_Alignment
;
4635 --------------------
4636 -- Constant_Value --
4637 --------------------
4639 function Constant_Value
(Id
: E
) return N
is
4640 D
: constant Node_Id
:= Declaration_Node
(Id
);
4644 -- If we have no declaration node, then return no constant value.
4645 -- Not clear how this can happen, but it does sometimes ???
4646 -- To investigate, remove this check and compile discrim_po.adb.
4651 -- Normal case where a declaration node is present
4653 elsif Nkind
(D
) = N_Object_Renaming_Declaration
then
4654 return Renamed_Object
(Id
);
4656 -- If this is a component declaration whose entity is constant, it
4657 -- is a prival within a protected function. It does not have
4658 -- a constant value.
4660 elsif Nkind
(D
) = N_Component_Declaration
then
4663 -- If there is an expression, return it
4665 elsif Present
(Expression
(D
)) then
4666 return (Expression
(D
));
4668 -- For a constant, see if we have a full view
4670 elsif Ekind
(Id
) = E_Constant
4671 and then Present
(Full_View
(Id
))
4673 Full_D
:= Parent
(Full_View
(Id
));
4675 -- The full view may have been rewritten as an object renaming
4677 if Nkind
(Full_D
) = N_Object_Renaming_Declaration
then
4678 return Name
(Full_D
);
4680 return Expression
(Full_D
);
4683 -- Otherwise we have no expression to return
4690 ----------------------
4691 -- Declaration_Node --
4692 ----------------------
4694 function Declaration_Node
(Id
: E
) return N
is
4698 if Ekind
(Id
) = E_Incomplete_Type
4699 and then Present
(Full_View
(Id
))
4701 P
:= Parent
(Full_View
(Id
));
4707 if Nkind
(P
) /= N_Selected_Component
4708 and then Nkind
(P
) /= N_Expanded_Name
4710 not (Nkind
(P
) = N_Defining_Program_Unit_Name
4711 and then Is_Child_Unit
(Id
))
4719 end Declaration_Node
;
4721 ---------------------
4722 -- Designated_Type --
4723 ---------------------
4725 function Designated_Type
(Id
: E
) return E
is
4729 Desig_Type
:= Directly_Designated_Type
(Id
);
4731 if Ekind
(Desig_Type
) = E_Incomplete_Type
4732 and then Present
(Full_View
(Desig_Type
))
4734 return Full_View
(Desig_Type
);
4736 elsif Is_Class_Wide_Type
(Desig_Type
)
4737 and then Ekind
(Etype
(Desig_Type
)) = E_Incomplete_Type
4738 and then Present
(Full_View
(Etype
(Desig_Type
)))
4739 and then Present
(Class_Wide_Type
(Full_View
(Etype
(Desig_Type
))))
4741 return Class_Wide_Type
(Full_View
(Etype
(Desig_Type
)));
4746 end Designated_Type
;
4748 -----------------------------
4749 -- Enclosing_Dynamic_Scope --
4750 -----------------------------
4752 function Enclosing_Dynamic_Scope
(Id
: E
) return E
is
4756 -- The following test is an error defense against some syntax
4757 -- errors that can leave scopes very messed up.
4759 if Id
= Standard_Standard
then
4763 -- Normal case, search enclosing scopes
4766 while S
/= Standard_Standard
4767 and then not Is_Dynamic_Scope
(S
)
4773 end Enclosing_Dynamic_Scope
;
4775 ----------------------
4776 -- Entry_Index_Type --
4777 ----------------------
4779 function Entry_Index_Type
(Id
: E
) return N
is
4781 pragma Assert
(Ekind
(Id
) = E_Entry_Family
);
4782 return Etype
(Discrete_Subtype_Definition
(Parent
(Id
)));
4783 end Entry_Index_Type
;
4785 ---------------------
4787 ---------------------
4789 function First_Component
(Id
: E
) return E
is
4794 (Is_Record_Type
(Id
) or else Is_Incomplete_Or_Private_Type
(Id
));
4796 Comp_Id
:= First_Entity
(Id
);
4797 while Present
(Comp_Id
) loop
4798 exit when Ekind
(Comp_Id
) = E_Component
;
4799 Comp_Id
:= Next_Entity
(Comp_Id
);
4803 end First_Component
;
4805 ------------------------
4806 -- First_Discriminant --
4807 ------------------------
4809 function First_Discriminant
(Id
: E
) return E
is
4814 (Has_Discriminants
(Id
)
4815 or else Has_Unknown_Discriminants
(Id
));
4817 Ent
:= First_Entity
(Id
);
4819 -- The discriminants are not necessarily contiguous, because access
4820 -- discriminants will generate itypes. They are not the first entities
4821 -- either, because tag and controller record must be ahead of them.
4823 if Chars
(Ent
) = Name_uTag
then
4824 Ent
:= Next_Entity
(Ent
);
4827 if Chars
(Ent
) = Name_uController
then
4828 Ent
:= Next_Entity
(Ent
);
4831 -- Skip all hidden stored discriminants if any
4833 while Present
(Ent
) loop
4834 exit when Ekind
(Ent
) = E_Discriminant
4835 and then not Is_Completely_Hidden
(Ent
);
4837 Ent
:= Next_Entity
(Ent
);
4840 pragma Assert
(Ekind
(Ent
) = E_Discriminant
);
4843 end First_Discriminant
;
4849 function First_Formal
(Id
: E
) return E
is
4854 (Is_Overloadable
(Id
)
4855 or else Ekind
(Id
) = E_Entry_Family
4856 or else Ekind
(Id
) = E_Subprogram_Body
4857 or else Ekind
(Id
) = E_Subprogram_Type
);
4859 if Ekind
(Id
) = E_Enumeration_Literal
then
4863 Formal
:= First_Entity
(Id
);
4865 if Present
(Formal
) and then Is_Formal
(Formal
) then
4873 -------------------------------
4874 -- First_Stored_Discriminant --
4875 -------------------------------
4877 function First_Stored_Discriminant
(Id
: E
) return E
is
4880 function Has_Completely_Hidden_Discriminant
(Id
: E
) return Boolean;
4881 -- Scans the Discriminants to see whether any are Completely_Hidden
4882 -- (the mechanism for describing non-specified stored discriminants)
4884 ----------------------------------------
4885 -- Has_Completely_Hidden_Discriminant --
4886 ----------------------------------------
4888 function Has_Completely_Hidden_Discriminant
(Id
: E
) return Boolean is
4889 Ent
: Entity_Id
:= Id
;
4892 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
4894 while Present
(Ent
) and then Ekind
(Ent
) = E_Discriminant
loop
4895 if Is_Completely_Hidden
(Ent
) then
4899 Ent
:= Next_Entity
(Ent
);
4903 end Has_Completely_Hidden_Discriminant
;
4905 -- Start of processing for First_Stored_Discriminant
4909 (Has_Discriminants
(Id
)
4910 or else Has_Unknown_Discriminants
(Id
));
4912 Ent
:= First_Entity
(Id
);
4914 if Chars
(Ent
) = Name_uTag
then
4915 Ent
:= Next_Entity
(Ent
);
4918 if Chars
(Ent
) = Name_uController
then
4919 Ent
:= Next_Entity
(Ent
);
4922 if Has_Completely_Hidden_Discriminant
(Ent
) then
4924 while Present
(Ent
) loop
4925 exit when Is_Completely_Hidden
(Ent
);
4926 Ent
:= Next_Entity
(Ent
);
4931 pragma Assert
(Ekind
(Ent
) = E_Discriminant
);
4934 end First_Stored_Discriminant
;
4940 function First_Subtype
(Id
: E
) return E
is
4941 B
: constant Entity_Id
:= Base_Type
(Id
);
4942 F
: constant Node_Id
:= Freeze_Node
(B
);
4946 -- If the base type has no freeze node, it is a type in standard,
4947 -- and always acts as its own first subtype unless it is one of
4948 -- the predefined integer types. If the type is formal, it is also
4949 -- a first subtype, and its base type has no freeze node. On the other
4950 -- hand, a subtype of a generic formal is not its own first_subtype.
4951 -- Its base type, if anonymous, is attached to the formal type decl.
4952 -- from which the first subtype is obtained.
4956 if B
= Base_Type
(Standard_Integer
) then
4957 return Standard_Integer
;
4959 elsif B
= Base_Type
(Standard_Long_Integer
) then
4960 return Standard_Long_Integer
;
4962 elsif B
= Base_Type
(Standard_Short_Short_Integer
) then
4963 return Standard_Short_Short_Integer
;
4965 elsif B
= Base_Type
(Standard_Short_Integer
) then
4966 return Standard_Short_Integer
;
4968 elsif B
= Base_Type
(Standard_Long_Long_Integer
) then
4969 return Standard_Long_Long_Integer
;
4971 elsif Is_Generic_Type
(Id
) then
4972 if Present
(Parent
(B
)) then
4973 return Defining_Identifier
(Parent
(B
));
4975 return Defining_Identifier
(Associated_Node_For_Itype
(B
));
4982 -- Otherwise we check the freeze node, if it has a First_Subtype_Link
4983 -- then we use that link, otherwise (happens with some Itypes), we use
4984 -- the base type itself.
4987 Ent
:= First_Subtype_Link
(F
);
4989 if Present
(Ent
) then
4997 -------------------------------------
4998 -- Get_Attribute_Definition_Clause --
4999 -------------------------------------
5001 function Get_Attribute_Definition_Clause
5003 Id
: Attribute_Id
) return Node_Id
5008 N
:= First_Rep_Item
(E
);
5009 while Present
(N
) loop
5010 if Nkind
(N
) = N_Attribute_Definition_Clause
5011 and then Get_Attribute_Id
(Chars
(N
)) = Id
5020 end Get_Attribute_Definition_Clause
;
5022 --------------------
5023 -- Get_Rep_Pragma --
5024 --------------------
5026 function Get_Rep_Pragma
(E
: Entity_Id
; Nam
: Name_Id
) return Node_Id
is
5030 N
:= First_Rep_Item
(E
);
5031 while Present
(N
) loop
5032 if Nkind
(N
) = N_Pragma
and then Chars
(N
) = Nam
then
5042 ------------------------
5043 -- Has_Attach_Handler --
5044 ------------------------
5046 function Has_Attach_Handler
(Id
: E
) return B
is
5050 pragma Assert
(Is_Protected_Type
(Id
));
5052 Ritem
:= First_Rep_Item
(Id
);
5053 while Present
(Ritem
) loop
5054 if Nkind
(Ritem
) = N_Pragma
5055 and then Chars
(Ritem
) = Name_Attach_Handler
5059 Ritem
:= Next_Rep_Item
(Ritem
);
5064 end Has_Attach_Handler
;
5066 -------------------------------------
5067 -- Has_Attribute_Definition_Clause --
5068 -------------------------------------
5070 function Has_Attribute_Definition_Clause
5072 Id
: Attribute_Id
) return Boolean
5075 return Present
(Get_Attribute_Definition_Clause
(E
, Id
));
5076 end Has_Attribute_Definition_Clause
;
5082 function Has_Entries
(Id
: E
) return B
is
5083 Result
: Boolean := False;
5087 pragma Assert
(Is_Concurrent_Type
(Id
));
5089 Ent
:= First_Entity
(Id
);
5090 while Present
(Ent
) loop
5091 if Is_Entry
(Ent
) then
5096 Ent
:= Next_Entity
(Ent
);
5102 ----------------------------
5103 -- Has_Foreign_Convention --
5104 ----------------------------
5106 function Has_Foreign_Convention
(Id
: E
) return B
is
5108 return Convention
(Id
) >= Foreign_Convention
'First;
5109 end Has_Foreign_Convention
;
5111 ---------------------------
5112 -- Has_Interrupt_Handler --
5113 ---------------------------
5115 function Has_Interrupt_Handler
(Id
: E
) return B
is
5119 pragma Assert
(Is_Protected_Type
(Id
));
5121 Ritem
:= First_Rep_Item
(Id
);
5122 while Present
(Ritem
) loop
5123 if Nkind
(Ritem
) = N_Pragma
5124 and then Chars
(Ritem
) = Name_Interrupt_Handler
5128 Ritem
:= Next_Rep_Item
(Ritem
);
5133 end Has_Interrupt_Handler
;
5135 --------------------------
5136 -- Has_Private_Ancestor --
5137 --------------------------
5139 function Has_Private_Ancestor
(Id
: E
) return B
is
5140 R
: constant Entity_Id
:= Root_Type
(Id
);
5141 T1
: Entity_Id
:= Id
;
5145 if Is_Private_Type
(T1
) then
5155 end Has_Private_Ancestor
;
5157 --------------------
5158 -- Has_Rep_Pragma --
5159 --------------------
5161 function Has_Rep_Pragma
(E
: Entity_Id
; Nam
: Name_Id
) return Boolean is
5163 return Present
(Get_Rep_Pragma
(E
, Nam
));
5166 ------------------------------
5167 -- Implementation_Base_Type --
5168 ------------------------------
5170 function Implementation_Base_Type
(Id
: E
) return E
is
5175 Bastyp
:= Base_Type
(Id
);
5177 if Is_Incomplete_Or_Private_Type
(Bastyp
) then
5178 Imptyp
:= Underlying_Type
(Bastyp
);
5180 -- If we have an implementation type, then just return it,
5181 -- otherwise we return the Base_Type anyway. This can only
5182 -- happen in error situations and should avoid some error bombs.
5184 if Present
(Imptyp
) then
5185 return Base_Type
(Imptyp
);
5193 end Implementation_Base_Type
;
5195 -----------------------
5196 -- Is_Always_Inlined --
5197 -----------------------
5199 function Is_Always_Inlined
(Id
: E
) return B
is
5203 Item
:= First_Rep_Item
(Id
);
5204 while Present
(Item
) loop
5205 if Nkind
(Item
) = N_Pragma
5206 and then Get_Pragma_Id
(Chars
(Item
)) = Pragma_Inline_Always
5211 Next_Rep_Item
(Item
);
5215 end Is_Always_Inlined
;
5217 ---------------------
5218 -- Is_Boolean_Type --
5219 ---------------------
5221 function Is_Boolean_Type
(Id
: E
) return B
is
5223 return Root_Type
(Id
) = Standard_Boolean
;
5224 end Is_Boolean_Type
;
5226 ---------------------
5227 -- Is_By_Copy_Type --
5228 ---------------------
5230 function Is_By_Copy_Type
(Id
: E
) return B
is
5232 -- If Id is a private type whose full declaration has not been seen,
5233 -- we assume for now that it is not a By_Copy type. Clearly this
5234 -- attribute should not be used before the type is frozen, but it is
5235 -- needed to build the associated record of a protected type. Another
5236 -- place where some lookahead for a full view is needed ???
5239 Is_Elementary_Type
(Id
)
5240 or else (Is_Private_Type
(Id
)
5241 and then Present
(Underlying_Type
(Id
))
5242 and then Is_Elementary_Type
(Underlying_Type
(Id
)));
5243 end Is_By_Copy_Type
;
5245 --------------------------
5246 -- Is_By_Reference_Type --
5247 --------------------------
5249 function Is_By_Reference_Type
(Id
: E
) return B
is
5250 Btype
: constant Entity_Id
:= Base_Type
(Id
);
5253 if Error_Posted
(Id
)
5254 or else Error_Posted
(Btype
)
5258 elsif Is_Private_Type
(Btype
) then
5260 Utyp
: constant Entity_Id
:= Underlying_Type
(Btype
);
5266 return Is_By_Reference_Type
(Utyp
);
5270 elsif Is_Concurrent_Type
(Btype
) then
5273 elsif Is_Record_Type
(Btype
) then
5274 if Is_Limited_Record
(Btype
)
5275 or else Is_Tagged_Type
(Btype
)
5276 or else Is_Volatile
(Btype
)
5285 C
:= First_Component
(Btype
);
5286 while Present
(C
) loop
5287 if Is_By_Reference_Type
(Etype
(C
))
5288 or else Is_Volatile
(Etype
(C
))
5293 C
:= Next_Component
(C
);
5300 elsif Is_Array_Type
(Btype
) then
5303 or else Is_By_Reference_Type
(Component_Type
(Btype
))
5304 or else Is_Volatile
(Component_Type
(Btype
))
5305 or else Has_Volatile_Components
(Btype
);
5310 end Is_By_Reference_Type
;
5312 ---------------------
5313 -- Is_Derived_Type --
5314 ---------------------
5316 function Is_Derived_Type
(Id
: E
) return B
is
5320 if Base_Type
(Id
) /= Root_Type
(Id
)
5321 and then not Is_Generic_Type
(Id
)
5322 and then not Is_Class_Wide_Type
(Id
)
5324 if not Is_Numeric_Type
(Root_Type
(Id
)) then
5328 Par
:= Parent
(First_Subtype
(Id
));
5330 return Present
(Par
)
5331 and then Nkind
(Par
) = N_Full_Type_Declaration
5332 and then Nkind
(Type_Definition
(Par
))
5333 = N_Derived_Type_Definition
;
5339 end Is_Derived_Type
;
5341 ----------------------
5342 -- Is_Dynamic_Scope --
5343 ----------------------
5345 function Is_Dynamic_Scope
(Id
: E
) return B
is
5348 Ekind
(Id
) = E_Block
5350 Ekind
(Id
) = E_Function
5352 Ekind
(Id
) = E_Procedure
5354 Ekind
(Id
) = E_Subprogram_Body
5356 Ekind
(Id
) = E_Task_Type
5358 Ekind
(Id
) = E_Entry
5360 Ekind
(Id
) = E_Entry_Family
;
5361 end Is_Dynamic_Scope
;
5363 --------------------
5364 -- Is_Entity_Name --
5365 --------------------
5367 function Is_Entity_Name
(N
: Node_Id
) return Boolean is
5368 Kind
: constant Node_Kind
:= Nkind
(N
);
5371 -- Identifiers, operator symbols, expanded names are entity names
5373 return Kind
= N_Identifier
5374 or else Kind
= N_Operator_Symbol
5375 or else Kind
= N_Expanded_Name
5377 -- Attribute references are entity names if they refer to an entity.
5378 -- Note that we don't do this by testing for the presence of the
5379 -- Entity field in the N_Attribute_Reference node, since it may not
5380 -- have been set yet.
5382 or else (Kind
= N_Attribute_Reference
5383 and then Is_Entity_Attribute_Name
(Attribute_Name
(N
)));
5386 ---------------------------
5387 -- Is_Indefinite_Subtype --
5388 ---------------------------
5390 function Is_Indefinite_Subtype
(Id
: Entity_Id
) return B
is
5391 K
: constant Entity_Kind
:= Ekind
(Id
);
5394 if Is_Constrained
(Id
) then
5397 elsif K
in Array_Kind
5398 or else K
in Class_Wide_Kind
5399 or else Has_Unknown_Discriminants
(Id
)
5403 -- Known discriminants: indefinite if there are no default values
5405 elsif K
in Record_Kind
5406 or else Is_Incomplete_Or_Private_Type
(Id
)
5407 or else Is_Concurrent_Type
(Id
)
5409 return (Has_Discriminants
(Id
)
5410 and then No
(Discriminant_Default_Value
(First_Discriminant
(Id
))));
5415 end Is_Indefinite_Subtype
;
5417 ---------------------
5418 -- Is_Limited_Type --
5419 ---------------------
5421 function Is_Limited_Type
(Id
: E
) return B
is
5422 Btype
: constant E
:= Base_Type
(Id
);
5425 if not Is_Type
(Id
) then
5428 elsif Ekind
(Btype
) = E_Limited_Private_Type
5429 or else Is_Limited_Composite
(Btype
)
5433 elsif Is_Concurrent_Type
(Btype
) then
5436 -- Otherwise we will look around to see if there is some other reason
5437 -- for it to be limited, except that if an error was posted on the
5438 -- entity, then just assume it is non-limited, because it can cause
5439 -- trouble to recurse into a murky erroneous entity!
5441 elsif Error_Posted
(Id
) then
5444 elsif Is_Record_Type
(Btype
) then
5445 if Is_Limited_Record
(Root_Type
(Btype
)) then
5448 elsif Is_Class_Wide_Type
(Btype
) then
5449 return Is_Limited_Type
(Root_Type
(Btype
));
5456 C
:= First_Component
(Btype
);
5457 while Present
(C
) loop
5458 if Is_Limited_Type
(Etype
(C
)) then
5462 C
:= Next_Component
(C
);
5469 elsif Is_Array_Type
(Btype
) then
5470 return Is_Limited_Type
(Component_Type
(Btype
));
5475 end Is_Limited_Type
;
5481 function Is_Package
(Id
: E
) return B
is
5484 Ekind
(Id
) = E_Package
5486 Ekind
(Id
) = E_Generic_Package
;
5489 --------------------------
5490 -- Is_Protected_Private --
5491 --------------------------
5493 function Is_Protected_Private
(Id
: E
) return B
is
5495 pragma Assert
(Ekind
(Id
) = E_Component
);
5496 return Is_Protected_Type
(Scope
(Id
));
5497 end Is_Protected_Private
;
5499 ------------------------------
5500 -- Is_Protected_Record_Type --
5501 ------------------------------
5503 function Is_Protected_Record_Type
(Id
: E
) return B
is
5506 Is_Concurrent_Record_Type
(Id
)
5507 and then Is_Protected_Type
(Corresponding_Concurrent_Type
(Id
));
5508 end Is_Protected_Record_Type
;
5510 ---------------------------------
5511 -- Is_Return_By_Reference_Type --
5512 ---------------------------------
5514 function Is_Return_By_Reference_Type
(Id
: E
) return B
is
5515 Btype
: constant Entity_Id
:= Base_Type
(Id
);
5518 if Is_Private_Type
(Btype
) then
5520 Utyp
: constant Entity_Id
:= Underlying_Type
(Btype
);
5526 return Is_Return_By_Reference_Type
(Utyp
);
5530 elsif Is_Concurrent_Type
(Btype
) then
5533 elsif Is_Record_Type
(Btype
) then
5534 if Is_Limited_Record
(Btype
) then
5537 elsif Is_Class_Wide_Type
(Btype
) then
5538 return Is_Return_By_Reference_Type
(Root_Type
(Btype
));
5545 C
:= First_Component
(Btype
);
5546 while Present
(C
) loop
5547 if Is_Return_By_Reference_Type
(Etype
(C
)) then
5551 C
:= Next_Component
(C
);
5558 elsif Is_Array_Type
(Btype
) then
5559 return Is_Return_By_Reference_Type
(Component_Type
(Btype
));
5564 end Is_Return_By_Reference_Type
;
5566 --------------------
5567 -- Is_String_Type --
5568 --------------------
5570 function Is_String_Type
(Id
: E
) return B
is
5572 return Ekind
(Id
) in String_Kind
5573 or else (Is_Array_Type
(Id
)
5574 and then Number_Dimensions
(Id
) = 1
5575 and then Is_Character_Type
(Component_Type
(Id
)));
5578 -------------------------
5579 -- Is_Task_Record_Type --
5580 -------------------------
5582 function Is_Task_Record_Type
(Id
: E
) return B
is
5585 Is_Concurrent_Record_Type
(Id
)
5586 and then Is_Task_Type
(Corresponding_Concurrent_Type
(Id
));
5587 end Is_Task_Record_Type
;
5589 ------------------------
5590 -- Is_Wrapper_Package --
5591 ------------------------
5593 function Is_Wrapper_Package
(Id
: E
) return B
is
5595 return (Ekind
(Id
) = E_Package
5596 and then Present
(Related_Instance
(Id
)));
5597 end Is_Wrapper_Package
;
5599 --------------------
5600 -- Next_Component --
5601 --------------------
5603 function Next_Component
(Id
: E
) return E
is
5607 Comp_Id
:= Next_Entity
(Id
);
5608 while Present
(Comp_Id
) loop
5609 exit when Ekind
(Comp_Id
) = E_Component
;
5610 Comp_Id
:= Next_Entity
(Comp_Id
);
5616 -----------------------
5617 -- Next_Discriminant --
5618 -----------------------
5620 -- This function actually implements both Next_Discriminant and
5621 -- Next_Stored_Discriminant by making sure that the Discriminant
5622 -- returned is of the same variety as Id.
5624 function Next_Discriminant
(Id
: E
) return E
is
5626 -- Derived Tagged types with private extensions look like this...
5628 -- E_Discriminant d1
5629 -- E_Discriminant d2
5631 -- E_Discriminant d1
5632 -- E_Discriminant d2
5635 -- so it is critical not to go past the leading discriminants
5640 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
5643 D
:= Next_Entity
(D
);
5645 or else (Ekind
(D
) /= E_Discriminant
5646 and then not Is_Itype
(D
))
5651 exit when Ekind
(D
) = E_Discriminant
5652 and then (Is_Completely_Hidden
(D
) = Is_Completely_Hidden
(Id
));
5656 end Next_Discriminant
;
5662 function Next_Formal
(Id
: E
) return E
is
5666 -- Follow the chain of declared entities as long as the kind of
5667 -- the entity corresponds to a formal parameter. Skip internal
5668 -- entities that may have been created for implicit subtypes,
5669 -- in the process of analyzing default expressions.
5674 P
:= Next_Entity
(P
);
5676 if No
(P
) or else Is_Formal
(P
) then
5678 elsif not Is_Internal
(P
) then
5684 -----------------------------
5685 -- Next_Formal_With_Extras --
5686 -----------------------------
5688 function Next_Formal_With_Extras
(Id
: E
) return E
is
5690 if Present
(Extra_Formal
(Id
)) then
5691 return Extra_Formal
(Id
);
5693 return Next_Formal
(Id
);
5695 end Next_Formal_With_Extras
;
5701 function Next_Index
(Id
: Node_Id
) return Node_Id
is
5710 function Next_Literal
(Id
: E
) return E
is
5712 pragma Assert
(Nkind
(Id
) in N_Entity
);
5716 ------------------------------
5717 -- Next_Stored_Discriminant --
5718 ------------------------------
5720 function Next_Stored_Discriminant
(Id
: E
) return E
is
5722 -- See comment in Next_Discriminant
5724 return Next_Discriminant
(Id
);
5725 end Next_Stored_Discriminant
;
5727 -----------------------
5728 -- Number_Dimensions --
5729 -----------------------
5731 function Number_Dimensions
(Id
: E
) return Pos
is
5736 if Ekind
(Id
) in String_Kind
then
5741 T
:= First_Index
(Id
);
5742 while Present
(T
) loop
5749 end Number_Dimensions
;
5751 --------------------------
5752 -- Number_Discriminants --
5753 --------------------------
5755 function Number_Discriminants
(Id
: E
) return Pos
is
5761 Discr
:= First_Discriminant
(Id
);
5762 while Present
(Discr
) loop
5764 Discr
:= Next_Discriminant
(Discr
);
5768 end Number_Discriminants
;
5770 --------------------
5771 -- Number_Entries --
5772 --------------------
5774 function Number_Entries
(Id
: E
) return Nat
is
5779 pragma Assert
(Is_Concurrent_Type
(Id
));
5782 Ent
:= First_Entity
(Id
);
5783 while Present
(Ent
) loop
5784 if Is_Entry
(Ent
) then
5788 Ent
:= Next_Entity
(Ent
);
5794 --------------------
5795 -- Number_Formals --
5796 --------------------
5798 function Number_Formals
(Id
: E
) return Pos
is
5804 Formal
:= First_Formal
(Id
);
5805 while Present
(Formal
) loop
5807 Formal
:= Next_Formal
(Formal
);
5813 --------------------
5814 -- Parameter_Mode --
5815 --------------------
5817 function Parameter_Mode
(Id
: E
) return Formal_Kind
is
5822 ---------------------
5823 -- Record_Rep_Item --
5824 ---------------------
5826 procedure Record_Rep_Item
(E
: Entity_Id
; N
: Node_Id
) is
5828 Set_Next_Rep_Item
(N
, First_Rep_Item
(E
));
5829 Set_First_Rep_Item
(E
, N
);
5830 end Record_Rep_Item
;
5836 function Root_Type
(Id
: E
) return E
is
5840 pragma Assert
(Nkind
(Id
) in N_Entity
);
5842 T
:= Base_Type
(Id
);
5844 if Ekind
(T
) = E_Class_Wide_Type
then
5856 -- Following test catches some error cases resulting from
5859 elsif No
(Etyp
) then
5862 elsif Is_Private_Type
(T
) and then Etyp
= Full_View
(T
) then
5865 elsif Is_Private_Type
(Etyp
) and then Full_View
(Etyp
) = T
then
5871 -- Return if there is a circularity in the inheritance chain.
5872 -- This happens in some error situations and we do not want
5873 -- to get stuck in this loop.
5875 if T
= Base_Type
(Id
) then
5881 raise Program_Error
;
5888 function Scope_Depth
(Id
: E
) return Uint
is
5893 while Is_Record_Type
(Scop
) loop
5894 Scop
:= Scope
(Scop
);
5897 return Scope_Depth_Value
(Scop
);
5900 ---------------------
5901 -- Scope_Depth_Set --
5902 ---------------------
5904 function Scope_Depth_Set
(Id
: E
) return B
is
5906 return not Is_Record_Type
(Id
)
5907 and then Field22
(Id
) /= Union_Id
(Empty
);
5908 end Scope_Depth_Set
;
5910 -----------------------------
5911 -- Set_Component_Alignment --
5912 -----------------------------
5914 -- Component Alignment is encoded using two flags, Flag128/129 as
5915 -- follows. Note that both flags False = Align_Default, so that the
5916 -- default initialization of flags to False initializes component
5917 -- alignment to the default value as required.
5919 -- Flag128 Flag129 Value
5920 -- ------- ------- -----
5921 -- False False Calign_Default
5922 -- False True Calign_Component_Size
5923 -- True False Calign_Component_Size_4
5924 -- True True Calign_Storage_Unit
5926 procedure Set_Component_Alignment
(Id
: E
; V
: C
) is
5928 pragma Assert
((Is_Array_Type
(Id
) or else Is_Record_Type
(Id
))
5929 and then Id
= Base_Type
(Id
));
5932 when Calign_Default
=>
5933 Set_Flag128
(Id
, False);
5934 Set_Flag129
(Id
, False);
5936 when Calign_Component_Size
=>
5937 Set_Flag128
(Id
, False);
5938 Set_Flag129
(Id
, True);
5940 when Calign_Component_Size_4
=>
5941 Set_Flag128
(Id
, True);
5942 Set_Flag129
(Id
, False);
5944 when Calign_Storage_Unit
=>
5945 Set_Flag128
(Id
, True);
5946 Set_Flag129
(Id
, True);
5948 end Set_Component_Alignment
;
5954 function Size_Clause
(Id
: E
) return N
is
5956 return Rep_Clause
(Id
, Name_Size
);
5959 ------------------------
5960 -- Stream_Size_Clause --
5961 ------------------------
5963 function Stream_Size_Clause
(Id
: E
) return N
is
5965 return Rep_Clause
(Id
, Name_Stream_Size
);
5966 end Stream_Size_Clause
;
5972 function Subtype_Kind
(K
: Entity_Kind
) return Entity_Kind
is
5978 Kind
:= E_Access_Subtype
;
5982 Kind
:= E_Array_Subtype
;
5984 when E_Class_Wide_Type |
5985 E_Class_Wide_Subtype
=>
5986 Kind
:= E_Class_Wide_Subtype
;
5988 when E_Decimal_Fixed_Point_Type |
5989 E_Decimal_Fixed_Point_Subtype
=>
5990 Kind
:= E_Decimal_Fixed_Point_Subtype
;
5992 when E_Ordinary_Fixed_Point_Type |
5993 E_Ordinary_Fixed_Point_Subtype
=>
5994 Kind
:= E_Ordinary_Fixed_Point_Subtype
;
5996 when E_Private_Type |
5997 E_Private_Subtype
=>
5998 Kind
:= E_Private_Subtype
;
6000 when E_Limited_Private_Type |
6001 E_Limited_Private_Subtype
=>
6002 Kind
:= E_Limited_Private_Subtype
;
6004 when E_Record_Type_With_Private |
6005 E_Record_Subtype_With_Private
=>
6006 Kind
:= E_Record_Subtype_With_Private
;
6008 when E_Record_Type |
6010 Kind
:= E_Record_Subtype
;
6012 when E_String_Type |
6014 Kind
:= E_String_Subtype
;
6016 when Enumeration_Kind
=>
6017 Kind
:= E_Enumeration_Subtype
;
6020 Kind
:= E_Floating_Point_Subtype
;
6022 when Signed_Integer_Kind
=>
6023 Kind
:= E_Signed_Integer_Subtype
;
6025 when Modular_Integer_Kind
=>
6026 Kind
:= E_Modular_Integer_Subtype
;
6028 when Protected_Kind
=>
6029 Kind
:= E_Protected_Subtype
;
6032 Kind
:= E_Task_Subtype
;
6036 raise Program_Error
;
6046 function Tag_Component
(Id
: E
) return E
is
6048 Typ
: Entity_Id
:= Id
;
6051 pragma Assert
(Is_Tagged_Type
(Typ
));
6053 if Is_Class_Wide_Type
(Typ
) then
6054 Typ
:= Root_Type
(Typ
);
6057 if Is_Private_Type
(Typ
) then
6058 Typ
:= Underlying_Type
(Typ
);
6061 Comp
:= First_Entity
(Typ
);
6062 while Present
(Comp
) loop
6063 if Is_Tag
(Comp
) then
6067 Comp
:= Next_Entity
(Comp
);
6070 -- No tag component found
6075 ---------------------
6076 -- Type_High_Bound --
6077 ---------------------
6079 function Type_High_Bound
(Id
: E
) return Node_Id
is
6081 if Nkind
(Scalar_Range
(Id
)) = N_Subtype_Indication
then
6082 return High_Bound
(Range_Expression
(Constraint
(Scalar_Range
(Id
))));
6084 return High_Bound
(Scalar_Range
(Id
));
6086 end Type_High_Bound
;
6088 --------------------
6089 -- Type_Low_Bound --
6090 --------------------
6092 function Type_Low_Bound
(Id
: E
) return Node_Id
is
6094 if Nkind
(Scalar_Range
(Id
)) = N_Subtype_Indication
then
6095 return Low_Bound
(Range_Expression
(Constraint
(Scalar_Range
(Id
))));
6097 return Low_Bound
(Scalar_Range
(Id
));
6101 ---------------------
6102 -- Underlying_Type --
6103 ---------------------
6105 function Underlying_Type
(Id
: E
) return E
is
6107 -- For record_with_private the underlying type is always the direct
6108 -- full view. Never try to take the full view of the parent it
6109 -- doesn't make sense.
6111 if Ekind
(Id
) = E_Record_Type_With_Private
then
6112 return Full_View
(Id
);
6114 elsif Ekind
(Id
) in Incomplete_Or_Private_Kind
then
6116 -- If we have an incomplete or private type with a full view,
6117 -- then we return the Underlying_Type of this full view
6119 if Present
(Full_View
(Id
)) then
6120 if Id
= Full_View
(Id
) then
6122 -- Previous error in declaration
6127 return Underlying_Type
(Full_View
(Id
));
6130 -- Otherwise check for the case where we have a derived type or
6131 -- subtype, and if so get the Underlying_Type of the parent type.
6133 elsif Etype
(Id
) /= Id
then
6134 return Underlying_Type
(Etype
(Id
));
6136 -- Otherwise we have an incomplete or private type that has
6137 -- no full view, which means that we have not encountered the
6138 -- completion, so return Empty to indicate the underlying type
6139 -- is not yet known.
6145 -- For non-incomplete, non-private types, return the type itself
6146 -- Also for entities that are not types at all return the entity
6152 end Underlying_Type
;
6154 ------------------------
6155 -- Write_Entity_Flags --
6156 ------------------------
6158 procedure Write_Entity_Flags
(Id
: Entity_Id
; Prefix
: String) is
6160 procedure W
(Flag_Name
: String; Flag
: Boolean);
6161 -- Write out given flag if it is set
6167 procedure W
(Flag_Name
: String; Flag
: Boolean) is
6171 Write_Str
(Flag_Name
);
6172 Write_Str
(" = True");
6177 -- Start of processing for Write_Entity_Flags
6180 if (Is_Array_Type
(Id
) or else Is_Record_Type
(Id
))
6181 and then Base_Type
(Id
) = Id
6184 Write_Str
("Component_Alignment = ");
6186 case Component_Alignment
(Id
) is
6187 when Calign_Default
=>
6188 Write_Str
("Calign_Default");
6190 when Calign_Component_Size
=>
6191 Write_Str
("Calign_Component_Size");
6193 when Calign_Component_Size_4
=>
6194 Write_Str
("Calign_Component_Size_4");
6196 when Calign_Storage_Unit
=>
6197 Write_Str
("Calign_Storage_Unit");
6203 W
("Address_Taken", Flag104
(Id
));
6204 W
("Body_Needed_For_SAL", Flag40
(Id
));
6205 W
("C_Pass_By_Copy", Flag125
(Id
));
6206 W
("Can_Never_Be_Null", Flag38
(Id
));
6207 W
("Checks_May_Be_Suppressed", Flag31
(Id
));
6208 W
("Debug_Info_Off", Flag166
(Id
));
6209 W
("Default_Expressions_Processed", Flag108
(Id
));
6210 W
("Delay_Cleanups", Flag114
(Id
));
6211 W
("Delay_Subprogram_Descriptors", Flag50
(Id
));
6212 W
("Depends_On_Private", Flag14
(Id
));
6213 W
("Discard_Names", Flag88
(Id
));
6214 W
("Elaborate_All_Desirable", Flag146
(Id
));
6215 W
("Elaboration_Entity_Required", Flag174
(Id
));
6216 W
("Entry_Accepted", Flag152
(Id
));
6217 W
("Finalize_Storage_Only", Flag158
(Id
));
6218 W
("From_With_Type", Flag159
(Id
));
6219 W
("Function_Returns_With_DSP", Flag169
(Id
));
6220 W
("Has_Aliased_Components", Flag135
(Id
));
6221 W
("Has_Alignment_Clause", Flag46
(Id
));
6222 W
("Has_All_Calls_Remote", Flag79
(Id
));
6223 W
("Has_Atomic_Components", Flag86
(Id
));
6224 W
("Has_Biased_Representation", Flag139
(Id
));
6225 W
("Has_Completion", Flag26
(Id
));
6226 W
("Has_Completion_In_Body", Flag71
(Id
));
6227 W
("Has_Complex_Representation", Flag140
(Id
));
6228 W
("Has_Component_Size_Clause", Flag68
(Id
));
6229 W
("Has_Contiguous_Rep", Flag181
(Id
));
6230 W
("Has_Controlled_Component", Flag43
(Id
));
6231 W
("Has_Controlling_Result", Flag98
(Id
));
6232 W
("Has_Convention_Pragma", Flag119
(Id
));
6233 W
("Has_Delayed_Freeze", Flag18
(Id
));
6234 W
("Has_Discriminants", Flag5
(Id
));
6235 W
("Has_Enumeration_Rep_Clause", Flag66
(Id
));
6236 W
("Has_Exit", Flag47
(Id
));
6237 W
("Has_External_Tag_Rep_Clause", Flag110
(Id
));
6238 W
("Has_Forward_Instantiation", Flag175
(Id
));
6239 W
("Has_Fully_Qualified_Name", Flag173
(Id
));
6240 W
("Has_Gigi_Rep_Item", Flag82
(Id
));
6241 W
("Has_Homonym", Flag56
(Id
));
6242 W
("Has_Machine_Radix_Clause", Flag83
(Id
));
6243 W
("Has_Master_Entity", Flag21
(Id
));
6244 W
("Has_Missing_Return", Flag142
(Id
));
6245 W
("Has_Nested_Block_With_Handler", Flag101
(Id
));
6246 W
("Has_Non_Standard_Rep", Flag75
(Id
));
6247 W
("Has_Object_Size_Clause", Flag172
(Id
));
6248 W
("Has_Per_Object_Constraint", Flag154
(Id
));
6249 W
("Has_Pragma_Controlled", Flag27
(Id
));
6250 W
("Has_Pragma_Elaborate_Body", Flag150
(Id
));
6251 W
("Has_Pragma_Inline", Flag157
(Id
));
6252 W
("Has_Pragma_Pack", Flag121
(Id
));
6253 W
("Has_Pragma_Pure_Function", Flag179
(Id
));
6254 W
("Has_Pragma_Unreferenced", Flag180
(Id
));
6255 W
("Has_Primitive_Operations", Flag120
(Id
));
6256 W
("Has_Private_Declaration", Flag155
(Id
));
6257 W
("Has_Qualified_Name", Flag161
(Id
));
6258 W
("Has_Record_Rep_Clause", Flag65
(Id
));
6259 W
("Has_Recursive_Call", Flag143
(Id
));
6260 W
("Has_Size_Clause", Flag29
(Id
));
6261 W
("Has_Small_Clause", Flag67
(Id
));
6262 W
("Has_Specified_Layout", Flag100
(Id
));
6263 W
("Has_Storage_Size_Clause", Flag23
(Id
));
6264 W
("Has_Stream_Size_Clause", Flag184
(Id
));
6265 W
("Has_Subprogram_Descriptor", Flag93
(Id
));
6266 W
("Has_Task", Flag30
(Id
));
6267 W
("Has_Unchecked_Union", Flag123
(Id
));
6268 W
("Has_Unknown_Discriminants", Flag72
(Id
));
6269 W
("Has_Volatile_Components", Flag87
(Id
));
6270 W
("Has_Xref_Entry", Flag182
(Id
));
6271 W
("In_Package_Body", Flag48
(Id
));
6272 W
("In_Private_Part", Flag45
(Id
));
6273 W
("In_Use", Flag8
(Id
));
6274 W
("Is_AST_Entry", Flag132
(Id
));
6275 W
("Is_Abstract", Flag19
(Id
));
6276 W
("Is_Access_Constant", Flag69
(Id
));
6277 W
("Is_Ada_2005", Flag185
(Id
));
6278 W
("Is_Aliased", Flag15
(Id
));
6279 W
("Is_Asynchronous", Flag81
(Id
));
6280 W
("Is_Atomic", Flag85
(Id
));
6281 W
("Is_Bit_Packed_Array", Flag122
(Id
));
6282 W
("Is_CPP_Class", Flag74
(Id
));
6283 W
("Is_Called", Flag102
(Id
));
6284 W
("Is_Character_Type", Flag63
(Id
));
6285 W
("Is_Child_Unit", Flag73
(Id
));
6286 W
("Is_Class_Wide_Equivalent_Type", Flag35
(Id
));
6287 W
("Is_Compilation_Unit", Flag149
(Id
));
6288 W
("Is_Completely_Hidden", Flag103
(Id
));
6289 W
("Is_Concurrent_Record_Type", Flag20
(Id
));
6290 W
("Is_Constr_Subt_For_UN_Aliased", Flag141
(Id
));
6291 W
("Is_Constr_Subt_For_U_Nominal", Flag80
(Id
));
6292 W
("Is_Constrained", Flag12
(Id
));
6293 W
("Is_Constructor", Flag76
(Id
));
6294 W
("Is_Controlled", Flag42
(Id
));
6295 W
("Is_Controlling_Formal", Flag97
(Id
));
6296 W
("Is_Discrim_SO_Function", Flag176
(Id
));
6297 W
("Is_Dispatching_Operation", Flag6
(Id
));
6298 W
("Is_Eliminated", Flag124
(Id
));
6299 W
("Is_Entry_Formal", Flag52
(Id
));
6300 W
("Is_Exported", Flag99
(Id
));
6301 W
("Is_First_Subtype", Flag70
(Id
));
6302 W
("Is_For_Access_Subtype", Flag118
(Id
));
6303 W
("Is_Formal_Subprogram", Flag111
(Id
));
6304 W
("Is_Frozen", Flag4
(Id
));
6305 W
("Is_Generic_Actual_Type", Flag94
(Id
));
6306 W
("Is_Generic_Instance", Flag130
(Id
));
6307 W
("Is_Generic_Type", Flag13
(Id
));
6308 W
("Is_Hidden", Flag57
(Id
));
6309 W
("Is_Hidden_Open_Scope", Flag171
(Id
));
6310 W
("Is_Immediately_Visible", Flag7
(Id
));
6311 W
("Is_Imported", Flag24
(Id
));
6312 W
("Is_Inlined", Flag11
(Id
));
6313 W
("Is_Instantiated", Flag126
(Id
));
6314 W
("Is_Internal", Flag17
(Id
));
6315 W
("Is_Interrupt_Handler", Flag89
(Id
));
6316 W
("Is_Intrinsic_Subprogram", Flag64
(Id
));
6317 W
("Is_Itype", Flag91
(Id
));
6318 W
("Is_Known_Valid", Flag37
(Id
));
6319 W
("Is_Known_Valid", Flag170
(Id
));
6320 W
("Is_Limited_Composite", Flag106
(Id
));
6321 W
("Is_Limited_Record", Flag25
(Id
));
6322 W
("Is_Machine_Code_Subprogram", Flag137
(Id
));
6323 W
("Is_Non_Static_Subtype", Flag109
(Id
));
6324 W
("Is_Null_Init_Proc", Flag178
(Id
));
6325 W
("Is_Obsolescent", Flag153
(Id
));
6326 W
("Is_Optional_Parameter", Flag134
(Id
));
6327 W
("Is_Overriding_Operation", Flag39
(Id
));
6328 W
("Is_Package_Body_Entity", Flag160
(Id
));
6329 W
("Is_Packed", Flag51
(Id
));
6330 W
("Is_Packed_Array_Type", Flag138
(Id
));
6331 W
("Is_Potentially_Use_Visible", Flag9
(Id
));
6332 W
("Is_Preelaborated", Flag59
(Id
));
6333 W
("Is_Private_Composite", Flag107
(Id
));
6334 W
("Is_Private_Descendant", Flag53
(Id
));
6335 W
("Is_Public", Flag10
(Id
));
6336 W
("Is_Pure", Flag44
(Id
));
6337 W
("Is_Remote_Call_Interface", Flag62
(Id
));
6338 W
("Is_Remote_Types", Flag61
(Id
));
6339 W
("Is_Renaming_Of_Object", Flag112
(Id
));
6340 W
("Is_Shared_Passive", Flag60
(Id
));
6341 W
("Is_Statically_Allocated", Flag28
(Id
));
6342 W
("Is_Tag", Flag78
(Id
));
6343 W
("Is_Tagged_Type", Flag55
(Id
));
6344 W
("Is_Thread_Body", Flag77
(Id
));
6345 W
("Is_True_Constant", Flag163
(Id
));
6346 W
("Is_Unchecked_Union", Flag117
(Id
));
6347 W
("Is_Unsigned_Type", Flag144
(Id
));
6348 W
("Is_VMS_Exception", Flag133
(Id
));
6349 W
("Is_Valued_Procedure", Flag127
(Id
));
6350 W
("Is_Visible_Child_Unit", Flag116
(Id
));
6351 W
("Is_Volatile", Flag16
(Id
));
6352 W
("Kill_Elaboration_Checks", Flag32
(Id
));
6353 W
("Kill_Range_Checks", Flag33
(Id
));
6354 W
("Kill_Tag_Checks", Flag34
(Id
));
6355 W
("Machine_Radix_10", Flag84
(Id
));
6356 W
("Materialize_Entity", Flag168
(Id
));
6357 W
("Must_Be_On_Byte_Boundary", Flag183
(Id
));
6358 W
("Needs_Debug_Info", Flag147
(Id
));
6359 W
("Needs_No_Actuals", Flag22
(Id
));
6360 W
("Never_Set_In_Source", Flag115
(Id
));
6361 W
("No_Pool_Assigned", Flag131
(Id
));
6362 W
("No_Return", Flag113
(Id
));
6363 W
("No_Strict_Aliasing", Flag136
(Id
));
6364 W
("Non_Binary_Modulus", Flag58
(Id
));
6365 W
("Nonzero_Is_True", Flag162
(Id
));
6366 W
("Reachable", Flag49
(Id
));
6367 W
("Referenced", Flag156
(Id
));
6368 W
("Referenced_As_LHS", Flag36
(Id
));
6369 W
("Return_Present", Flag54
(Id
));
6370 W
("Returns_By_Ref", Flag90
(Id
));
6371 W
("Reverse_Bit_Order", Flag164
(Id
));
6372 W
("Sec_Stack_Needed_For_Return", Flag167
(Id
));
6373 W
("Size_Depends_On_Discriminant", Flag177
(Id
));
6374 W
("Size_Known_At_Compile_Time", Flag92
(Id
));
6375 W
("Strict_Alignment", Flag145
(Id
));
6376 W
("Suppress_Elaboration_Warnings", Flag148
(Id
));
6377 W
("Suppress_Init_Proc", Flag105
(Id
));
6378 W
("Suppress_Style_Checks", Flag165
(Id
));
6379 W
("Treat_As_Volatile", Flag41
(Id
));
6380 W
("Uses_Sec_Stack", Flag95
(Id
));
6381 W
("Vax_Float", Flag151
(Id
));
6382 W
("Warnings_Off", Flag96
(Id
));
6383 end Write_Entity_Flags
;
6385 -----------------------
6386 -- Write_Entity_Info --
6387 -----------------------
6389 procedure Write_Entity_Info
(Id
: Entity_Id
; Prefix
: String) is
6391 procedure Write_Attribute
(Which
: String; Nam
: E
);
6392 -- Write attribute value with given string name
6394 procedure Write_Kind
(Id
: Entity_Id
);
6395 -- Write Ekind field of entity
6397 procedure Write_Attribute
(Which
: String; Nam
: E
) is
6401 Write_Int
(Int
(Nam
));
6403 Write_Name
(Chars
(Nam
));
6405 end Write_Attribute
;
6407 procedure Write_Kind
(Id
: Entity_Id
) is
6408 K
: constant String := Entity_Kind
'Image (Ekind
(Id
));
6412 Write_Str
(" Kind ");
6414 if Is_Type
(Id
) and then Is_Tagged_Type
(Id
) then
6415 Write_Str
("TAGGED ");
6418 Write_Str
(K
(3 .. K
'Length));
6421 if Is_Type
(Id
) and then Depends_On_Private
(Id
) then
6422 Write_Str
("Depends_On_Private ");
6426 -- Start of processing for Write_Entity_Info
6430 Write_Attribute
("Name ", Id
);
6431 Write_Int
(Int
(Id
));
6435 Write_Attribute
(" Type ", Etype
(Id
));
6437 Write_Attribute
(" Scope ", Scope
(Id
));
6442 when Discrete_Kind
=>
6443 Write_Str
("Bounds: Id = ");
6445 if Present
(Scalar_Range
(Id
)) then
6446 Write_Int
(Int
(Type_Low_Bound
(Id
)));
6447 Write_Str
(" .. Id = ");
6448 Write_Int
(Int
(Type_High_Bound
(Id
)));
6450 Write_Str
("Empty");
6461 (" Component Type ", Component_Type
(Id
));
6464 Write_Str
(" Indices ");
6466 Index
:= First_Index
(Id
);
6467 while Present
(Index
) loop
6468 Write_Attribute
(" ", Etype
(Index
));
6469 Index
:= Next_Index
(Index
);
6477 (" Directly Designated Type ",
6478 Directly_Designated_Type
(Id
));
6481 when Overloadable_Kind
=>
6482 if Present
(Homonym
(Id
)) then
6483 Write_Str
(" Homonym ");
6484 Write_Name
(Chars
(Homonym
(Id
)));
6486 Write_Int
(Int
(Homonym
(Id
)));
6493 if Ekind
(Scope
(Id
)) in Record_Kind
then
6495 " Original_Record_Component ",
6496 Original_Record_Component
(Id
));
6497 Write_Int
(Int
(Original_Record_Component
(Id
)));
6501 when others => null;
6503 end Write_Entity_Info
;
6505 -----------------------
6506 -- Write_Field6_Name --
6507 -----------------------
6509 procedure Write_Field6_Name
(Id
: Entity_Id
) is
6510 pragma Warnings
(Off
, Id
);
6513 Write_Str
("First_Rep_Item");
6514 end Write_Field6_Name
;
6516 -----------------------
6517 -- Write_Field7_Name --
6518 -----------------------
6520 procedure Write_Field7_Name
(Id
: Entity_Id
) is
6521 pragma Warnings
(Off
, Id
);
6524 Write_Str
("Freeze_Node");
6525 end Write_Field7_Name
;
6527 -----------------------
6528 -- Write_Field8_Name --
6529 -----------------------
6531 procedure Write_Field8_Name
(Id
: Entity_Id
) is
6536 Write_Str
("Normalized_First_Bit");
6540 E_Subprogram_Body
=>
6541 Write_Str
("Mechanism");
6544 Write_Str
("Associated_Node_For_Itype");
6547 Write_Str
("Dependent_Instances");
6550 Write_Str
("Hiding_Loop_Variable");
6553 Write_Str
("Field8??");
6555 end Write_Field8_Name
;
6557 -----------------------
6558 -- Write_Field9_Name --
6559 -----------------------
6561 procedure Write_Field9_Name
(Id
: Entity_Id
) is
6565 Write_Str
("Class_Wide_Type");
6568 E_Generic_Function |
6570 E_Generic_Procedure |
6573 Write_Str
("Renaming_Map");
6576 Write_Str
("Current_Value");
6579 Write_Str
("Field9??");
6581 end Write_Field9_Name
;
6583 ------------------------
6584 -- Write_Field10_Name --
6585 ------------------------
6587 procedure Write_Field10_Name
(Id
: Entity_Id
) is
6591 Write_Str
("Referenced_Object");
6593 when E_In_Parameter |
6595 Write_Str
("Discriminal_Link");
6601 Write_Str
("Handler_Records");
6605 Write_Str
("Normalized_Position_Max");
6608 Write_Str
("Field10??");
6610 end Write_Field10_Name
;
6612 ------------------------
6613 -- Write_Field11_Name --
6614 ------------------------
6616 procedure Write_Field11_Name
(Id
: Entity_Id
) is
6620 Write_Str
("Entry_Component");
6624 Write_Str
("Component_Bit_Offset");
6627 Write_Str
("Full_View");
6629 when E_Enumeration_Literal
=>
6630 Write_Str
("Enumeration_Pos");
6633 Write_Str
("Block_Node");
6639 Write_Str
("Protected_Body_Subprogram");
6641 when E_Generic_Package
=>
6642 Write_Str
("Generic_Homonym");
6645 Write_Str
("Full_View");
6648 Write_Str
("Field11??");
6650 end Write_Field11_Name
;
6652 ------------------------
6653 -- Write_Field12_Name --
6654 ------------------------
6656 procedure Write_Field12_Name
(Id
: Entity_Id
) is
6660 Write_Str
("Barrier_Function");
6662 when E_Enumeration_Literal
=>
6663 Write_Str
("Enumeration_Rep");
6670 E_In_Out_Parameter |
6674 Write_Str
("Esize");
6678 Write_Str
("Next_Inlined_Subprogram");
6681 Write_Str
("Associated_Formal_Package");
6684 Write_Str
("Field12??");
6686 end Write_Field12_Name
;
6688 ------------------------
6689 -- Write_Field13_Name --
6690 ------------------------
6692 procedure Write_Field13_Name
(Id
: Entity_Id
) is
6696 Write_Str
("RM_Size");
6700 Write_Str
("Component_Clause");
6702 when E_Enumeration_Literal
=>
6703 Write_Str
("Debug_Renaming_Link");
6706 if not Comes_From_Source
(Id
)
6708 Chars
(Id
) = Name_Op_Ne
6710 Write_Str
("Corresponding_Equality");
6712 elsif Comes_From_Source
(Id
) then
6713 Write_Str
("Elaboration_Entity");
6716 Write_Str
("Field13??");
6721 Write_Str
("Extra_Accessibility");
6725 Generic_Unit_Kind
=>
6726 Write_Str
("Elaboration_Entity");
6729 Write_Str
("Field13??");
6731 end Write_Field13_Name
;
6733 -----------------------
6734 -- Write_Field14_Name --
6735 -----------------------
6737 procedure Write_Field14_Name
(Id
: Entity_Id
) is
6745 Write_Str
("Alignment");
6749 Write_Str
("Normalized_Position");
6753 Write_Str
("First_Optional_Parameter");
6756 E_Generic_Package
=>
6757 Write_Str
("Shadow_Entities");
6760 Write_Str
("Field14??");
6762 end Write_Field14_Name
;
6764 ------------------------
6765 -- Write_Field15_Name --
6766 ------------------------
6768 procedure Write_Field15_Name
(Id
: Entity_Id
) is
6773 Write_Str
("Storage_Size_Variable");
6775 when Class_Wide_Kind |
6779 Write_Str
("Primitive_Operations");
6782 Write_Str
("DT_Entry_Count");
6784 when Decimal_Fixed_Point_Kind
=>
6785 Write_Str
("Scale_Value");
6787 when E_Discriminant
=>
6788 Write_Str
("Discriminant_Number");
6791 Write_Str
("Extra_Formal");
6795 Write_Str
("DT_Position");
6798 Write_Str
("Entry_Parameters_Type");
6800 when Enumeration_Kind
=>
6801 Write_Str
("Lit_Indexes");
6805 Write_Str
("Related_Instance");
6807 when E_Protected_Type
=>
6808 Write_Str
("Entry_Bodies_Array");
6810 when E_String_Literal_Subtype
=>
6811 Write_Str
("String_Literal_Low_Bound");
6814 Write_Str
("Shared_Var_Read_Proc");
6817 Write_Str
("Field15??");
6819 end Write_Field15_Name
;
6821 ------------------------
6822 -- Write_Field16_Name --
6823 ------------------------
6825 procedure Write_Field16_Name
(Id
: Entity_Id
) is
6829 Write_Str
("Entry_Formal");
6833 Write_Str
("DTC_Entity");
6838 Write_Str
("First_Private_Entity");
6840 when E_Record_Type |
6841 E_Record_Type_With_Private
=>
6842 Write_Str
("Access_Disp_Table");
6844 when E_String_Literal_Subtype
=>
6845 Write_Str
("String_Literal_Length");
6847 when Enumeration_Kind
=>
6848 Write_Str
("Lit_Strings");
6852 Write_Str
("Unset_Reference");
6854 when E_Record_Subtype |
6855 E_Class_Wide_Subtype
=>
6856 Write_Str
("Cloned_Subtype");
6859 Write_Str
("Field16??");
6861 end Write_Field16_Name
;
6863 ------------------------
6864 -- Write_Field17_Name --
6865 ------------------------
6867 procedure Write_Field17_Name
(Id
: Entity_Id
) is
6871 Write_Str
("Digits_Value");
6874 Write_Str
("Prival");
6876 when E_Discriminant
=>
6877 Write_Str
("Discriminal");
6886 E_Generic_Function |
6888 E_Generic_Procedure |
6897 E_Subprogram_Type
=>
6898 Write_Str
("First_Entity");
6901 Write_Str
("First_Index");
6903 when E_Protected_Body
=>
6904 Write_Str
("Object_Ref");
6906 when Enumeration_Kind
=>
6907 Write_Str
("First_Literal");
6910 Write_Str
("Master_Id");
6912 when Modular_Integer_Kind
=>
6913 Write_Str
("Modulus");
6917 E_Generic_In_Out_Parameter |
6919 Write_Str
("Actual_Subtype");
6921 when E_Incomplete_Type
=>
6922 Write_Str
("Non-limited view");
6925 Write_Str
("Field17??");
6927 end Write_Field17_Name
;
6929 -----------------------
6930 -- Write_Field18_Name --
6931 -----------------------
6933 procedure Write_Field18_Name
(Id
: Entity_Id
) is
6936 when E_Enumeration_Literal |
6940 Write_Str
("Alias");
6942 when E_Record_Type
=>
6943 Write_Str
("Corresponding_Concurrent_Type");
6945 when E_Entry_Index_Parameter
=>
6946 Write_Str
("Entry_Index_Constant");
6948 when E_Class_Wide_Subtype |
6949 E_Access_Protected_Subprogram_Type |
6950 E_Access_Subprogram_Type |
6952 Write_Str
("Equivalent_Type");
6954 when Fixed_Point_Kind
=>
6955 Write_Str
("Delta_Value");
6959 Write_Str
("Renamed_Object");
6963 E_Generic_Function |
6964 E_Generic_Procedure |
6965 E_Generic_Package
=>
6966 Write_Str
("Renamed_Entity");
6968 when Incomplete_Or_Private_Kind
=>
6969 Write_Str
("Private_Dependents");
6971 when Concurrent_Kind
=>
6972 Write_Str
("Corresponding_Record_Type");
6977 Write_Str
("Enclosing_Scope");
6980 Write_Str
("Field18??");
6982 end Write_Field18_Name
;
6984 -----------------------
6985 -- Write_Field19_Name --
6986 -----------------------
6988 procedure Write_Field19_Name
(Id
: Entity_Id
) is
6993 Write_Str
("Related_Array_Object");
7000 Write_Str
("Finalization_Chain_Entity");
7002 when E_Constant | E_Variable
=>
7003 Write_Str
("Size_Check_Code");
7005 when E_Discriminant
=>
7006 Write_Str
("Corresponding_Discriminant");
7009 E_Generic_Package
=>
7010 Write_Str
("Body_Entity");
7012 when E_Package_Body |
7014 Write_Str
("Spec_Entity");
7016 when Private_Kind
=>
7017 Write_Str
("Underlying_Full_View");
7019 when E_Record_Type
=>
7020 Write_Str
("Parent_Subtype");
7023 Write_Str
("Field19??");
7025 end Write_Field19_Name
;
7027 -----------------------
7028 -- Write_Field20_Name --
7029 -----------------------
7031 procedure Write_Field20_Name
(Id
: Entity_Id
) is
7035 Write_Str
("Component_Type");
7037 when E_In_Parameter |
7038 E_Generic_In_Parameter
=>
7039 Write_Str
("Default_Value");
7042 Write_Str
("Directly_Designated_Type");
7045 Write_Str
("Discriminant_Checking_Func");
7047 when E_Discriminant
=>
7048 Write_Str
("Discriminant_Default_Value");
7057 E_Generic_Function |
7059 E_Generic_Procedure |
7068 E_Subprogram_Type
=>
7070 Write_Str
("Last_Entity");
7073 Write_Str
("Scalar_Range");
7076 Write_Str
("Register_Exception_Call");
7079 Write_Str
("Field20??");
7081 end Write_Field20_Name
;
7083 -----------------------
7084 -- Write_Field21_Name --
7085 -----------------------
7087 procedure Write_Field21_Name
(Id
: Entity_Id
) is
7093 E_Generic_Function |
7095 E_Generic_Procedure |
7097 Write_Str
("Interface_Name");
7099 when Concurrent_Kind |
7100 Incomplete_Or_Private_Kind |
7104 Write_Str
("Discriminant_Constraint");
7107 Write_Str
("Accept_Address");
7109 when Fixed_Point_Kind
=>
7110 Write_Str
("Small_Value");
7112 when E_In_Parameter
=>
7113 Write_Str
("Default_Expr_Function");
7116 Modular_Integer_Kind
=>
7117 Write_Str
("Original_Array_Type");
7119 when E_Access_Subprogram_Type |
7120 E_Access_Protected_Subprogram_Type
=>
7121 Write_Str
("Original_Access_Type");
7124 Write_Str
("Field21??");
7126 end Write_Field21_Name
;
7128 -----------------------
7129 -- Write_Field22_Name --
7130 -----------------------
7132 procedure Write_Field22_Name
(Id
: Entity_Id
) is
7136 Write_Str
("Associated_Storage_Pool");
7139 Write_Str
("Component_Size");
7143 Write_Str
("Original_Record_Component");
7145 when E_Enumeration_Literal
=>
7146 Write_Str
("Enumeration_Rep_Expr");
7149 Write_Str
("Exception_Code");
7152 Write_Str
("Protected_Formal");
7154 when E_Record_Type
=>
7155 Write_Str
("Corresponding_Remote_Type");
7165 E_Generic_Function |
7166 E_Generic_Procedure |
7171 Write_Str
("Scope_Depth_Value");
7173 when E_Record_Type_With_Private |
7174 E_Record_Subtype_With_Private |
7177 E_Limited_Private_Type |
7178 E_Limited_Private_Subtype
=>
7179 Write_Str
("Private_View");
7182 Write_Str
("Shared_Var_Assign_Proc");
7185 Write_Str
("Field22??");
7187 end Write_Field22_Name
;
7189 ------------------------
7190 -- Write_Field23_Name --
7191 ------------------------
7193 procedure Write_Field23_Name
(Id
: Entity_Id
) is
7197 Write_Str
("Associated_Final_Chain");
7200 Write_Str
("Packed_Array_Type");
7203 Write_Str
("Entry_Cancel_Parameter");
7206 Write_Str
("Protected_Operation");
7208 when E_Discriminant
=>
7209 Write_Str
("CR_Discriminant");
7211 when E_Enumeration_Type
=>
7212 Write_Str
("Enum_Pos_To_Rep");
7216 Write_Str
("Extra_Constrained");
7218 when E_Generic_Function |
7220 E_Generic_Procedure
=>
7221 Write_Str
("Inner_Instances");
7223 when Concurrent_Kind |
7224 Incomplete_Or_Private_Kind |
7228 Write_Str
("Stored_Constraint");
7232 Write_Str
("Generic_Renamings");
7235 if Is_Generic_Instance
(Id
) then
7236 Write_Str
("Generic_Renamings");
7238 Write_Str
("Limited Views");
7241 -- What about Privals_Chain for protected operations ???
7244 Write_Str
("Privals_Chain");
7247 Write_Str
("Field23??");
7249 end Write_Field23_Name
;
7251 ------------------------
7252 -- Write_Field24_Name --
7253 ------------------------
7255 procedure Write_Field24_Name
(Id
: Entity_Id
) is
7258 when Subprogram_Kind
=>
7259 Write_Str
("Obsolescent_Warning");
7262 Write_Str
("Field24??");
7264 end Write_Field24_Name
;
7266 ------------------------
7267 -- Write_Field25_Name --
7268 ------------------------
7270 procedure Write_Field25_Name
(Id
: Entity_Id
) is
7274 Write_Str
("Field25??");
7276 end Write_Field25_Name
;
7278 ------------------------
7279 -- Write_Field26_Name --
7280 ------------------------
7282 procedure Write_Field26_Name
(Id
: Entity_Id
) is
7286 Write_Str
("Field26??");
7288 end Write_Field26_Name
;
7290 ------------------------
7291 -- Write_Field27_Name --
7292 ------------------------
7294 procedure Write_Field27_Name
(Id
: Entity_Id
) is
7298 Write_Str
("Field27??");
7300 end Write_Field27_Name
;
7302 -------------------------
7303 -- Iterator Procedures --
7304 -------------------------
7306 procedure Proc_Next_Component
(N
: in out Node_Id
) is
7308 N
:= Next_Component
(N
);
7309 end Proc_Next_Component
;
7311 procedure Proc_Next_Discriminant
(N
: in out Node_Id
) is
7313 N
:= Next_Discriminant
(N
);
7314 end Proc_Next_Discriminant
;
7316 procedure Proc_Next_Formal
(N
: in out Node_Id
) is
7318 N
:= Next_Formal
(N
);
7319 end Proc_Next_Formal
;
7321 procedure Proc_Next_Formal_With_Extras
(N
: in out Node_Id
) is
7323 N
:= Next_Formal_With_Extras
(N
);
7324 end Proc_Next_Formal_With_Extras
;
7326 procedure Proc_Next_Index
(N
: in out Node_Id
) is
7328 N
:= Next_Index
(N
);
7329 end Proc_Next_Index
;
7331 procedure Proc_Next_Inlined_Subprogram
(N
: in out Node_Id
) is
7333 N
:= Next_Inlined_Subprogram
(N
);
7334 end Proc_Next_Inlined_Subprogram
;
7336 procedure Proc_Next_Literal
(N
: in out Node_Id
) is
7338 N
:= Next_Literal
(N
);
7339 end Proc_Next_Literal
;
7341 procedure Proc_Next_Stored_Discriminant
(N
: in out Node_Id
) is
7343 N
:= Next_Stored_Discriminant
(N
);
7344 end Proc_Next_Stored_Discriminant
;