1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2004 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 ---------------------------------------------
213 -- Usage of Flags in Defining Entity Nodes --
214 ---------------------------------------------
216 -- All flags are unique, there is no overlaying, so each flag is physically
217 -- present in every entity. However, for many of the flags, it only makes
218 -- sense for them to be set true for certain subsets of entity kinds. See
219 -- the spec of Einfo for further details.
221 -- Note: Flag1-Flag3 are absent from this list, since these flag positions
222 -- are used for the flags Analyzed, Comes_From_Source, and Error_Posted,
223 -- which are common to all nodes, including entity nodes.
226 -- Has_Discriminants Flag5
227 -- Is_Dispatching_Operation Flag6
228 -- Is_Immediately_Visible Flag7
230 -- Is_Potentially_Use_Visible Flag9
234 -- Is_Constrained Flag12
235 -- Is_Generic_Type Flag13
236 -- Depends_On_Private Flag14
238 -- Is_Volatile Flag16
239 -- Is_Internal Flag17
240 -- Has_Delayed_Freeze Flag18
241 -- Is_Abstract Flag19
242 -- Is_Concurrent_Record_Type Flag20
244 -- Has_Master_Entity Flag21
245 -- Needs_No_Actuals Flag22
246 -- Has_Storage_Size_Clause Flag23
247 -- Is_Imported Flag24
248 -- Is_Limited_Record Flag25
249 -- Has_Completion Flag26
250 -- Has_Pragma_Controlled Flag27
251 -- Is_Statically_Allocated Flag28
252 -- Has_Size_Clause Flag29
255 -- Checks_May_Be_Suppressed Flag31
256 -- Kill_Elaboration_Checks Flag32
257 -- Kill_Range_Checks Flag33
258 -- Kill_Tag_Checks Flag34
259 -- Is_Class_Wide_Equivalent_Type Flag35
260 -- Referenced_As_LHS Flag36
261 -- Is_Known_Non_Null Flag37
262 -- Can_Never_Be_Null Flag38
263 -- Is_Overriding_Operation Flag39
264 -- Body_Needed_For_SAL Flag40
266 -- Treat_As_Volatile Flag41
267 -- Is_Controlled Flag42
268 -- Has_Controlled_Component Flag43
270 -- In_Private_Part Flag45
271 -- Has_Alignment_Clause Flag46
273 -- In_Package_Body Flag48
275 -- Delay_Subprogram_Descriptors Flag50
278 -- Is_Entry_Formal Flag52
279 -- Is_Private_Descendant Flag53
280 -- Return_Present Flag54
281 -- Is_Tagged_Type Flag55
282 -- Has_Homonym Flag56
284 -- Non_Binary_Modulus Flag58
285 -- Is_Preelaborated Flag59
286 -- Is_Shared_Passive Flag60
288 -- Is_Remote_Types Flag61
289 -- Is_Remote_Call_Interface Flag62
290 -- Is_Character_Type Flag63
291 -- Is_Intrinsic_Subprogram Flag64
292 -- Has_Record_Rep_Clause Flag65
293 -- Has_Enumeration_Rep_Clause Flag66
294 -- Has_Small_Clause Flag67
295 -- Has_Component_Size_Clause Flag68
296 -- Is_Access_Constant Flag69
297 -- Is_First_Subtype Flag70
299 -- Has_Completion_In_Body Flag71
300 -- Has_Unknown_Discriminants Flag72
301 -- Is_Child_Unit Flag73
302 -- Is_CPP_Class Flag74
303 -- Has_Non_Standard_Rep Flag75
304 -- Is_Constructor Flag76
305 -- Is_Thread_Body Flag77
307 -- Has_All_Calls_Remote Flag79
308 -- Is_Constr_Subt_For_U_Nominal Flag80
310 -- Is_Asynchronous Flag81
311 -- Has_Gigi_Rep_Item Flag82
312 -- Has_Machine_Radix_Clause Flag83
313 -- Machine_Radix_10 Flag84
315 -- Has_Atomic_Components Flag86
316 -- Has_Volatile_Components Flag87
317 -- Discard_Names Flag88
318 -- Is_Interrupt_Handler Flag89
319 -- Returns_By_Ref Flag90
322 -- Size_Known_At_Compile_Time Flag92
323 -- Has_Subprogram_Descriptor Flag93
324 -- Is_Generic_Actual_Type Flag94
325 -- Uses_Sec_Stack Flag95
326 -- Warnings_Off Flag96
327 -- Is_Controlling_Formal Flag97
328 -- Has_Controlling_Result Flag98
329 -- Is_Exported Flag99
330 -- Has_Specified_Layout Flag100
332 -- Has_Nested_Block_With_Handler Flag101
334 -- Is_Completely_Hidden Flag103
335 -- Address_Taken Flag104
336 -- Suppress_Init_Proc Flag105
337 -- Is_Limited_Composite Flag106
338 -- Is_Private_Composite Flag107
339 -- Default_Expressions_Processed Flag108
340 -- Is_Non_Static_Subtype Flag109
341 -- Has_External_Tag_Rep_Clause Flag110
343 -- Is_Formal_Subprogram Flag111
344 -- Is_Renaming_Of_Object Flag112
346 -- Delay_Cleanups Flag114
347 -- Never_Set_In_Source Flag115
348 -- Is_Visible_Child_Unit Flag116
349 -- Is_Unchecked_Union Flag117
350 -- Is_For_Access_Subtype Flag118
351 -- Has_Convention_Pragma Flag119
352 -- Has_Primitive_Operations Flag120
354 -- Has_Pragma_Pack Flag121
355 -- Is_Bit_Packed_Array Flag122
356 -- Has_Unchecked_Union Flag123
357 -- Is_Eliminated Flag124
358 -- C_Pass_By_Copy Flag125
359 -- Is_Instantiated Flag126
360 -- Is_Valued_Procedure Flag127
361 -- (used for Component_Alignment) Flag128
362 -- (used for Component_Alignment) Flag129
363 -- Is_Generic_Instance Flag130
365 -- No_Pool_Assigned Flag131
366 -- Is_AST_Entry Flag132
367 -- Is_VMS_Exception Flag133
368 -- Is_Optional_Parameter Flag134
369 -- Has_Aliased_Components Flag135
370 -- No_Strict_Aliasing Flag136
371 -- Is_Machine_Code_Subprogram Flag137
372 -- Is_Packed_Array_Type Flag138
373 -- Has_Biased_Representation Flag139
374 -- Has_Complex_Representation Flag140
376 -- Is_Constr_Subt_For_UN_Aliased Flag141
377 -- Has_Missing_Return Flag142
378 -- Has_Recursive_Call Flag143
379 -- Is_Unsigned_Type Flag144
380 -- Strict_Alignment Flag145
381 -- Elaborate_All_Desirable Flag146
382 -- Needs_Debug_Info Flag147
383 -- Suppress_Elaboration_Warnings Flag148
384 -- Is_Compilation_Unit Flag149
385 -- Has_Pragma_Elaborate_Body Flag150
388 -- Entry_Accepted Flag152
389 -- Is_Psected Flag153
390 -- Has_Per_Object_Constraint Flag154
391 -- Has_Private_Declaration Flag155
392 -- Referenced Flag156
393 -- Has_Pragma_Inline Flag157
394 -- Finalize_Storage_Only Flag158
395 -- From_With_Type Flag159
396 -- Is_Package_Body_Entity Flag160
398 -- Has_Qualified_Name Flag161
399 -- Nonzero_Is_True Flag162
400 -- Is_True_Constant Flag163
401 -- Reverse_Bit_Order Flag164
402 -- Suppress_Style_Checks Flag165
403 -- Debug_Info_Off Flag166
404 -- Sec_Stack_Needed_For_Return Flag167
405 -- Materialize_Entity Flag168
406 -- Function_Returns_With_DSP Flag169
407 -- Is_Known_Valid Flag170
409 -- Is_Hidden_Open_Scope Flag171
410 -- Has_Object_Size_Clause Flag172
411 -- Has_Fully_Qualified_Name Flag173
412 -- Elaboration_Entity_Required Flag174
413 -- Has_Forward_Instantiation Flag175
414 -- Is_Discrim_SO_Function Flag176
415 -- Size_Depends_On_Discriminant Flag177
416 -- Is_Null_Init_Proc Flag178
417 -- Has_Pragma_Pure_Function Flag179
418 -- Has_Pragma_Unreferenced Flag180
420 -- Has_Contiguous_Rep Flag181
421 -- Has_Xref_Entry Flag182
422 -- Must_Be_On_Byte_Boundary Flag183
424 -- Note: there are no unused flags currently!
426 --------------------------------
427 -- Attribute Access Functions --
428 --------------------------------
430 function Accept_Address
(Id
: E
) return L
is
435 function Access_Disp_Table
(Id
: E
) return E
is
437 pragma Assert
(Is_Tagged_Type
(Id
));
438 return Node16
(Implementation_Base_Type
(Id
));
439 end Access_Disp_Table
;
441 function Actual_Subtype
(Id
: E
) return E
is
444 (Ekind
(Id
) = E_Constant
445 or else Ekind
(Id
) = E_Variable
446 or else Ekind
(Id
) = E_Generic_In_Out_Parameter
447 or else Ekind
(Id
) in E_In_Parameter
.. E_In_Out_Parameter
);
451 function Address_Taken
(Id
: E
) return B
is
456 function Alias
(Id
: E
) return E
is
459 (Is_Overloadable
(Id
) or else Ekind
(Id
) = E_Subprogram_Type
);
463 function Alignment
(Id
: E
) return U
is
465 pragma Assert
(Is_Type
(Id
)
466 or else Is_Formal
(Id
)
467 or else Ekind
(Id
) = E_Loop_Parameter
468 or else Ekind
(Id
) = E_Constant
469 or else Ekind
(Id
) = E_Exception
470 or else Ekind
(Id
) = E_Variable
);
474 function Associated_Final_Chain
(Id
: E
) return E
is
476 pragma Assert
(Is_Access_Type
(Id
));
478 end Associated_Final_Chain
;
480 function Associated_Formal_Package
(Id
: E
) return E
is
482 pragma Assert
(Ekind
(Id
) = E_Package
);
484 end Associated_Formal_Package
;
486 function Associated_Node_For_Itype
(Id
: E
) return N
is
489 end Associated_Node_For_Itype
;
491 function Associated_Storage_Pool
(Id
: E
) return E
is
493 pragma Assert
(Is_Access_Type
(Id
));
494 return Node22
(Root_Type
(Id
));
495 end Associated_Storage_Pool
;
497 function Barrier_Function
(Id
: E
) return N
is
499 pragma Assert
(Is_Entry
(Id
));
501 end Barrier_Function
;
503 function Block_Node
(Id
: E
) return N
is
505 pragma Assert
(Ekind
(Id
) = E_Block
);
509 function Body_Entity
(Id
: E
) return E
is
512 (Ekind
(Id
) = E_Package
or else Ekind
(Id
) = E_Generic_Package
);
516 function Body_Needed_For_SAL
(Id
: E
) return B
is
519 (Ekind
(Id
) = E_Package
520 or else Is_Subprogram
(Id
)
521 or else Is_Generic_Unit
(Id
));
523 end Body_Needed_For_SAL
;
525 function C_Pass_By_Copy
(Id
: E
) return B
is
527 pragma Assert
(Is_Record_Type
(Id
));
528 return Flag125
(Implementation_Base_Type
(Id
));
531 function Can_Never_Be_Null
(Id
: E
) return B
is
534 end Can_Never_Be_Null
;
536 function Checks_May_Be_Suppressed
(Id
: E
) return B
is
539 end Checks_May_Be_Suppressed
;
541 function Class_Wide_Type
(Id
: E
) return E
is
543 pragma Assert
(Is_Type
(Id
));
547 function Cloned_Subtype
(Id
: E
) return E
is
550 (Ekind
(Id
) = E_Record_Subtype
551 or else Ekind
(Id
) = E_Class_Wide_Subtype
);
555 function Component_Bit_Offset
(Id
: E
) return U
is
558 (Ekind
(Id
) = E_Component
or else Ekind
(Id
) = E_Discriminant
);
560 end Component_Bit_Offset
;
562 function Component_Clause
(Id
: E
) return N
is
565 (Ekind
(Id
) = E_Component
or else Ekind
(Id
) = E_Discriminant
);
567 end Component_Clause
;
569 function Component_Size
(Id
: E
) return U
is
571 pragma Assert
(Is_Array_Type
(Id
));
572 return Uint22
(Implementation_Base_Type
(Id
));
575 function Component_Type
(Id
: E
) return E
is
577 return Node20
(Implementation_Base_Type
(Id
));
580 function Corresponding_Concurrent_Type
(Id
: E
) return E
is
582 pragma Assert
(Ekind
(Id
) = E_Record_Type
);
584 end Corresponding_Concurrent_Type
;
586 function Corresponding_Discriminant
(Id
: E
) return E
is
588 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
590 end Corresponding_Discriminant
;
592 function Corresponding_Equality
(Id
: E
) return E
is
595 (Ekind
(Id
) = E_Function
596 and then not Comes_From_Source
(Id
)
597 and then Chars
(Id
) = Name_Op_Ne
);
599 end Corresponding_Equality
;
601 function Corresponding_Record_Type
(Id
: E
) return E
is
603 pragma Assert
(Is_Concurrent_Type
(Id
));
605 end Corresponding_Record_Type
;
607 function Corresponding_Remote_Type
(Id
: E
) return E
is
610 end Corresponding_Remote_Type
;
612 function Current_Value
(Id
: E
) return N
is
614 pragma Assert
(Ekind
(Id
) in Object_Kind
);
618 function CR_Discriminant
(Id
: E
) return E
is
623 function Debug_Info_Off
(Id
: E
) return B
is
628 function Debug_Renaming_Link
(Id
: E
) return E
is
631 end Debug_Renaming_Link
;
633 function Default_Expr_Function
(Id
: E
) return E
is
635 pragma Assert
(Is_Formal
(Id
));
637 end Default_Expr_Function
;
639 function Default_Expressions_Processed
(Id
: E
) return B
is
642 end Default_Expressions_Processed
;
644 function Default_Value
(Id
: E
) return N
is
646 pragma Assert
(Is_Formal
(Id
));
650 function Delay_Cleanups
(Id
: E
) return B
is
655 function Delay_Subprogram_Descriptors
(Id
: E
) return B
is
658 end Delay_Subprogram_Descriptors
;
660 function Delta_Value
(Id
: E
) return R
is
662 pragma Assert
(Is_Fixed_Point_Type
(Id
));
666 function Dependent_Instances
(Id
: E
) return L
is
668 pragma Assert
(Is_Generic_Instance
(Id
));
670 end Dependent_Instances
;
672 function Depends_On_Private
(Id
: E
) return B
is
674 pragma Assert
(Nkind
(Id
) in N_Entity
);
676 end Depends_On_Private
;
678 function Digits_Value
(Id
: E
) return U
is
681 (Is_Floating_Point_Type
(Id
)
682 or else Is_Decimal_Fixed_Point_Type
(Id
));
686 function Directly_Designated_Type
(Id
: E
) return E
is
689 end Directly_Designated_Type
;
691 function Discard_Names
(Id
: E
) return B
is
696 function Discriminal
(Id
: E
) return E
is
698 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
702 function Discriminal_Link
(Id
: E
) return N
is
705 end Discriminal_Link
;
707 function Discriminant_Checking_Func
(Id
: E
) return E
is
709 pragma Assert
(Ekind
(Id
) = E_Component
);
711 end Discriminant_Checking_Func
;
713 function Discriminant_Constraint
(Id
: E
) return L
is
715 pragma Assert
(Is_Composite_Type
(Id
) and then Has_Discriminants
(Id
));
717 end Discriminant_Constraint
;
719 function Discriminant_Default_Value
(Id
: E
) return N
is
721 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
723 end Discriminant_Default_Value
;
725 function Discriminant_Number
(Id
: E
) return U
is
727 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
729 end Discriminant_Number
;
731 function DT_Entry_Count
(Id
: E
) return U
is
733 pragma Assert
(Ekind
(Id
) = E_Component
and then Is_Tag
(Id
));
737 function DT_Position
(Id
: E
) return U
is
740 ((Ekind
(Id
) = E_Function
741 or else Ekind
(Id
) = E_Procedure
)
742 and then Present
(DTC_Entity
(Id
)));
746 function DTC_Entity
(Id
: E
) return E
is
749 (Ekind
(Id
) = E_Function
or else Ekind
(Id
) = E_Procedure
);
753 function Elaborate_All_Desirable
(Id
: E
) return B
is
756 end Elaborate_All_Desirable
;
758 function Elaboration_Entity
(Id
: E
) return E
is
763 Ekind
(Id
) = E_Package
765 Is_Generic_Unit
(Id
));
767 end Elaboration_Entity
;
769 function Elaboration_Entity_Required
(Id
: E
) return B
is
774 Ekind
(Id
) = E_Package
776 Is_Generic_Unit
(Id
));
778 end Elaboration_Entity_Required
;
780 function Enclosing_Scope
(Id
: E
) return E
is
785 function Entry_Accepted
(Id
: E
) return B
is
787 pragma Assert
(Is_Entry
(Id
));
791 function Entry_Bodies_Array
(Id
: E
) return E
is
794 end Entry_Bodies_Array
;
796 function Entry_Cancel_Parameter
(Id
: E
) return E
is
799 end Entry_Cancel_Parameter
;
801 function Entry_Component
(Id
: E
) return E
is
806 function Entry_Formal
(Id
: E
) return E
is
811 function Entry_Index_Constant
(Id
: E
) return N
is
813 pragma Assert
(Ekind
(Id
) = E_Entry_Index_Parameter
);
815 end Entry_Index_Constant
;
817 function Entry_Parameters_Type
(Id
: E
) return E
is
820 end Entry_Parameters_Type
;
822 function Enum_Pos_To_Rep
(Id
: E
) return E
is
824 pragma Assert
(Ekind
(Id
) = E_Enumeration_Type
);
828 function Enumeration_Pos
(Id
: E
) return Uint
is
830 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
834 function Enumeration_Rep
(Id
: E
) return U
is
836 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
840 function Enumeration_Rep_Expr
(Id
: E
) return N
is
842 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
844 end Enumeration_Rep_Expr
;
846 function Equivalent_Type
(Id
: E
) return E
is
849 (Ekind
(Id
) = E_Class_Wide_Subtype
or else
850 Ekind
(Id
) = E_Access_Protected_Subprogram_Type
or else
851 Ekind
(Id
) = E_Access_Subprogram_Type
or else
852 Ekind
(Id
) = E_Exception_Type
);
856 function Esize
(Id
: E
) return Uint
is
861 function Exception_Code
(Id
: E
) return Uint
is
863 pragma Assert
(Ekind
(Id
) = E_Exception
);
867 function Extra_Accessibility
(Id
: E
) return E
is
869 pragma Assert
(Is_Formal
(Id
) or else Ekind
(Id
) = E_Variable
);
871 end Extra_Accessibility
;
873 function Extra_Constrained
(Id
: E
) return E
is
875 pragma Assert
(Is_Formal
(Id
) or else Ekind
(Id
) = E_Variable
);
877 end Extra_Constrained
;
879 function Extra_Formal
(Id
: E
) return E
is
884 function Finalization_Chain_Entity
(Id
: E
) return E
is
887 end Finalization_Chain_Entity
;
889 function Finalize_Storage_Only
(Id
: E
) return B
is
891 pragma Assert
(Is_Type
(Id
));
892 return Flag158
(Base_Type
(Id
));
893 end Finalize_Storage_Only
;
895 function First_Entity
(Id
: E
) return E
is
900 function First_Index
(Id
: E
) return N
is
905 function First_Literal
(Id
: E
) return E
is
910 function First_Optional_Parameter
(Id
: E
) return E
is
913 (Ekind
(Id
) = E_Function
or else Ekind
(Id
) = E_Procedure
);
915 end First_Optional_Parameter
;
917 function First_Private_Entity
(Id
: E
) return E
is
920 end First_Private_Entity
;
922 function First_Rep_Item
(Id
: E
) return E
is
927 function Freeze_Node
(Id
: E
) return N
is
932 function From_With_Type
(Id
: E
) return B
is
937 function Full_View
(Id
: E
) return E
is
939 pragma Assert
(Is_Type
(Id
) or else Ekind
(Id
) = E_Constant
);
943 function Function_Returns_With_DSP
(Id
: E
) return B
is
946 (Is_Subprogram
(Id
) or else Ekind
(Id
) = E_Subprogram_Type
);
948 end Function_Returns_With_DSP
;
950 function Generic_Homonym
(Id
: E
) return E
is
952 pragma Assert
(Ekind
(Id
) = E_Generic_Package
);
956 function Generic_Renamings
(Id
: E
) return L
is
959 end Generic_Renamings
;
961 function Handler_Records
(Id
: E
) return S
is
966 function Has_Aliased_Components
(Id
: E
) return B
is
968 return Flag135
(Implementation_Base_Type
(Id
));
969 end Has_Aliased_Components
;
971 function Has_Alignment_Clause
(Id
: E
) return B
is
974 end Has_Alignment_Clause
;
976 function Has_All_Calls_Remote
(Id
: E
) return B
is
979 end Has_All_Calls_Remote
;
981 function Has_Atomic_Components
(Id
: E
) return B
is
983 return Flag86
(Implementation_Base_Type
(Id
));
984 end Has_Atomic_Components
;
986 function Has_Biased_Representation
(Id
: E
) return B
is
989 end Has_Biased_Representation
;
991 function Has_Completion
(Id
: E
) return B
is
996 function Has_Completion_In_Body
(Id
: E
) return B
is
998 pragma Assert
(Is_Type
(Id
));
1000 end Has_Completion_In_Body
;
1002 function Has_Complex_Representation
(Id
: E
) return B
is
1004 pragma Assert
(Is_Type
(Id
));
1005 return Flag140
(Implementation_Base_Type
(Id
));
1006 end Has_Complex_Representation
;
1008 function Has_Component_Size_Clause
(Id
: E
) return B
is
1010 pragma Assert
(Is_Array_Type
(Id
));
1011 return Flag68
(Implementation_Base_Type
(Id
));
1012 end Has_Component_Size_Clause
;
1014 function Has_Controlled_Component
(Id
: E
) return B
is
1016 return Flag43
(Base_Type
(Id
));
1017 end Has_Controlled_Component
;
1019 function Has_Contiguous_Rep
(Id
: E
) return B
is
1021 return Flag181
(Id
);
1022 end Has_Contiguous_Rep
;
1024 function Has_Controlling_Result
(Id
: E
) return B
is
1027 end Has_Controlling_Result
;
1029 function Has_Convention_Pragma
(Id
: E
) return B
is
1031 return Flag119
(Id
);
1032 end Has_Convention_Pragma
;
1034 function Has_Delayed_Freeze
(Id
: E
) return B
is
1036 pragma Assert
(Nkind
(Id
) in N_Entity
);
1038 end Has_Delayed_Freeze
;
1040 function Has_Discriminants
(Id
: E
) return B
is
1042 pragma Assert
(Nkind
(Id
) in N_Entity
);
1044 end Has_Discriminants
;
1046 function Has_Enumeration_Rep_Clause
(Id
: E
) return B
is
1048 pragma Assert
(Is_Enumeration_Type
(Id
));
1050 end Has_Enumeration_Rep_Clause
;
1052 function Has_Exit
(Id
: E
) return B
is
1057 function Has_External_Tag_Rep_Clause
(Id
: E
) return B
is
1059 pragma Assert
(Is_Tagged_Type
(Id
));
1060 return Flag110
(Id
);
1061 end Has_External_Tag_Rep_Clause
;
1063 function Has_Forward_Instantiation
(Id
: E
) return B
is
1065 return Flag175
(Id
);
1066 end Has_Forward_Instantiation
;
1068 function Has_Fully_Qualified_Name
(Id
: E
) return B
is
1070 return Flag173
(Id
);
1071 end Has_Fully_Qualified_Name
;
1073 function Has_Gigi_Rep_Item
(Id
: E
) return B
is
1076 end Has_Gigi_Rep_Item
;
1078 function Has_Homonym
(Id
: E
) return B
is
1083 function Has_Machine_Radix_Clause
(Id
: E
) return B
is
1085 pragma Assert
(Is_Decimal_Fixed_Point_Type
(Id
));
1087 end Has_Machine_Radix_Clause
;
1089 function Has_Master_Entity
(Id
: E
) return B
is
1092 end Has_Master_Entity
;
1094 function Has_Missing_Return
(Id
: E
) return B
is
1097 (Ekind
(Id
) = E_Function
or else Ekind
(Id
) = E_Generic_Function
);
1098 return Flag142
(Id
);
1099 end Has_Missing_Return
;
1101 function Has_Nested_Block_With_Handler
(Id
: E
) return B
is
1103 return Flag101
(Id
);
1104 end Has_Nested_Block_With_Handler
;
1106 function Has_Non_Standard_Rep
(Id
: E
) return B
is
1108 return Flag75
(Implementation_Base_Type
(Id
));
1109 end Has_Non_Standard_Rep
;
1111 function Has_Object_Size_Clause
(Id
: E
) return B
is
1113 pragma Assert
(Is_Type
(Id
));
1114 return Flag172
(Id
);
1115 end Has_Object_Size_Clause
;
1117 function Has_Per_Object_Constraint
(Id
: E
) return B
is
1119 return Flag154
(Id
);
1120 end Has_Per_Object_Constraint
;
1122 function Has_Pragma_Controlled
(Id
: E
) return B
is
1124 pragma Assert
(Is_Access_Type
(Id
));
1125 return Flag27
(Implementation_Base_Type
(Id
));
1126 end Has_Pragma_Controlled
;
1128 function Has_Pragma_Elaborate_Body
(Id
: E
) return B
is
1130 return Flag150
(Id
);
1131 end Has_Pragma_Elaborate_Body
;
1133 function Has_Pragma_Inline
(Id
: E
) return B
is
1135 return Flag157
(Id
);
1136 end Has_Pragma_Inline
;
1138 function Has_Pragma_Pack
(Id
: E
) return B
is
1140 pragma Assert
(Is_Record_Type
(Id
) or else Is_Array_Type
(Id
));
1141 return Flag121
(Implementation_Base_Type
(Id
));
1142 end Has_Pragma_Pack
;
1144 function Has_Pragma_Pure_Function
(Id
: E
) return B
is
1146 pragma Assert
(Is_Subprogram
(Id
));
1147 return Flag179
(Id
);
1148 end Has_Pragma_Pure_Function
;
1150 function Has_Pragma_Unreferenced
(Id
: E
) return B
is
1152 return Flag180
(Id
);
1153 end Has_Pragma_Unreferenced
;
1155 function Has_Primitive_Operations
(Id
: E
) return B
is
1157 pragma Assert
(Is_Type
(Id
));
1158 return Flag120
(Base_Type
(Id
));
1159 end Has_Primitive_Operations
;
1161 function Has_Private_Declaration
(Id
: E
) return B
is
1163 return Flag155
(Id
);
1164 end Has_Private_Declaration
;
1166 function Has_Qualified_Name
(Id
: E
) return B
is
1168 return Flag161
(Id
);
1169 end Has_Qualified_Name
;
1171 function Has_Record_Rep_Clause
(Id
: E
) return B
is
1173 pragma Assert
(Is_Record_Type
(Id
));
1174 return Flag65
(Implementation_Base_Type
(Id
));
1175 end Has_Record_Rep_Clause
;
1177 function Has_Recursive_Call
(Id
: E
) return B
is
1179 pragma Assert
(Is_Subprogram
(Id
));
1180 return Flag143
(Id
);
1181 end Has_Recursive_Call
;
1183 function Has_Size_Clause
(Id
: E
) return B
is
1186 end Has_Size_Clause
;
1188 function Has_Small_Clause
(Id
: E
) return B
is
1191 end Has_Small_Clause
;
1193 function Has_Specified_Layout
(Id
: E
) return B
is
1195 pragma Assert
(Is_Type
(Id
));
1196 return Flag100
(Implementation_Base_Type
(Id
));
1197 end Has_Specified_Layout
;
1199 function Has_Storage_Size_Clause
(Id
: E
) return B
is
1201 pragma Assert
(Is_Access_Type
(Id
) or else Is_Task_Type
(Id
));
1202 return Flag23
(Implementation_Base_Type
(Id
));
1203 end Has_Storage_Size_Clause
;
1205 function Has_Subprogram_Descriptor
(Id
: E
) return B
is
1208 end Has_Subprogram_Descriptor
;
1210 function Has_Task
(Id
: E
) return B
is
1212 return Flag30
(Base_Type
(Id
));
1215 function Has_Unchecked_Union
(Id
: E
) return B
is
1217 return Flag123
(Base_Type
(Id
));
1218 end Has_Unchecked_Union
;
1220 function Has_Unknown_Discriminants
(Id
: E
) return B
is
1222 pragma Assert
(Is_Type
(Id
));
1224 end Has_Unknown_Discriminants
;
1226 function Has_Volatile_Components
(Id
: E
) return B
is
1228 return Flag87
(Implementation_Base_Type
(Id
));
1229 end Has_Volatile_Components
;
1231 function Has_Xref_Entry
(Id
: E
) return B
is
1233 return Flag182
(Implementation_Base_Type
(Id
));
1236 function Hiding_Loop_Variable
(Id
: E
) return E
is
1238 pragma Assert
(Ekind
(Id
) = E_Variable
);
1240 end Hiding_Loop_Variable
;
1242 function Homonym
(Id
: E
) return E
is
1247 function In_Package_Body
(Id
: E
) return B
is
1250 end In_Package_Body
;
1252 function In_Private_Part
(Id
: E
) return B
is
1255 end In_Private_Part
;
1257 function In_Use
(Id
: E
) return B
is
1259 pragma Assert
(Nkind
(Id
) in N_Entity
);
1263 function Inner_Instances
(Id
: E
) return L
is
1265 return Elist23
(Id
);
1266 end Inner_Instances
;
1268 function Interface_Name
(Id
: E
) return N
is
1273 function Is_Abstract
(Id
: E
) return B
is
1278 function Is_Access_Constant
(Id
: E
) return B
is
1280 pragma Assert
(Is_Access_Type
(Id
));
1282 end Is_Access_Constant
;
1284 function Is_Aliased
(Id
: E
) return B
is
1286 pragma Assert
(Nkind
(Id
) in N_Entity
);
1290 function Is_AST_Entry
(Id
: E
) return B
is
1292 pragma Assert
(Is_Entry
(Id
));
1293 return Flag132
(Id
);
1296 function Is_Asynchronous
(Id
: E
) return B
is
1299 (Ekind
(Id
) = E_Procedure
or else Is_Type
(Id
));
1301 end Is_Asynchronous
;
1303 function Is_Atomic
(Id
: E
) return B
is
1308 function Is_Bit_Packed_Array
(Id
: E
) return B
is
1310 return Flag122
(Implementation_Base_Type
(Id
));
1311 end Is_Bit_Packed_Array
;
1313 function Is_Called
(Id
: E
) return B
is
1316 (Ekind
(Id
) = E_Procedure
or else Ekind
(Id
) = E_Function
);
1317 return Flag102
(Id
);
1320 function Is_Character_Type
(Id
: E
) return B
is
1323 end Is_Character_Type
;
1325 function Is_Child_Unit
(Id
: E
) return B
is
1330 function Is_Class_Wide_Equivalent_Type
(Id
: E
) return B
is
1333 end Is_Class_Wide_Equivalent_Type
;
1335 function Is_Compilation_Unit
(Id
: E
) return B
is
1337 return Flag149
(Id
);
1338 end Is_Compilation_Unit
;
1340 function Is_Completely_Hidden
(Id
: E
) return B
is
1342 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
1343 return Flag103
(Id
);
1344 end Is_Completely_Hidden
;
1346 function Is_Constr_Subt_For_U_Nominal
(Id
: E
) return B
is
1349 end Is_Constr_Subt_For_U_Nominal
;
1351 function Is_Constr_Subt_For_UN_Aliased
(Id
: E
) return B
is
1353 return Flag141
(Id
);
1354 end Is_Constr_Subt_For_UN_Aliased
;
1356 function Is_Constrained
(Id
: E
) return B
is
1358 pragma Assert
(Nkind
(Id
) in N_Entity
);
1362 function Is_Constructor
(Id
: E
) return B
is
1367 function Is_Controlled
(Id
: E
) return B
is
1369 return Flag42
(Base_Type
(Id
));
1372 function Is_Controlling_Formal
(Id
: E
) return B
is
1374 pragma Assert
(Is_Formal
(Id
));
1376 end Is_Controlling_Formal
;
1378 function Is_CPP_Class
(Id
: E
) return B
is
1383 function Is_Discrim_SO_Function
(Id
: E
) return B
is
1385 return Flag176
(Id
);
1386 end Is_Discrim_SO_Function
;
1388 function Is_Dispatching_Operation
(Id
: E
) return B
is
1390 pragma Assert
(Nkind
(Id
) in N_Entity
);
1392 end Is_Dispatching_Operation
;
1394 function Is_Eliminated
(Id
: E
) return B
is
1396 return Flag124
(Id
);
1399 function Is_Entry_Formal
(Id
: E
) return B
is
1402 end Is_Entry_Formal
;
1404 function Is_Exported
(Id
: E
) return B
is
1409 function Is_First_Subtype
(Id
: E
) return B
is
1412 end Is_First_Subtype
;
1414 function Is_For_Access_Subtype
(Id
: E
) return B
is
1417 (Ekind
(Id
) = E_Record_Subtype
1419 Ekind
(Id
) = E_Private_Subtype
);
1420 return Flag118
(Id
);
1421 end Is_For_Access_Subtype
;
1423 function Is_Formal_Subprogram
(Id
: E
) return B
is
1425 return Flag111
(Id
);
1426 end Is_Formal_Subprogram
;
1428 function Is_Frozen
(Id
: E
) return B
is
1433 function Is_Generic_Actual_Type
(Id
: E
) return B
is
1435 pragma Assert
(Is_Type
(Id
));
1437 end Is_Generic_Actual_Type
;
1439 function Is_Generic_Instance
(Id
: E
) return B
is
1441 return Flag130
(Id
);
1442 end Is_Generic_Instance
;
1444 function Is_Generic_Type
(Id
: E
) return B
is
1446 pragma Assert
(Nkind
(Id
) in N_Entity
);
1448 end Is_Generic_Type
;
1450 function Is_Hidden
(Id
: E
) return B
is
1455 function Is_Hidden_Open_Scope
(Id
: E
) return B
is
1457 return Flag171
(Id
);
1458 end Is_Hidden_Open_Scope
;
1460 function Is_Immediately_Visible
(Id
: E
) return B
is
1462 pragma Assert
(Nkind
(Id
) in N_Entity
);
1464 end Is_Immediately_Visible
;
1466 function Is_Imported
(Id
: E
) return B
is
1471 function Is_Inlined
(Id
: E
) return B
is
1476 function Is_Instantiated
(Id
: E
) return B
is
1478 return Flag126
(Id
);
1479 end Is_Instantiated
;
1481 function Is_Internal
(Id
: E
) return B
is
1483 pragma Assert
(Nkind
(Id
) in N_Entity
);
1487 function Is_Interrupt_Handler
(Id
: E
) return B
is
1489 pragma Assert
(Nkind
(Id
) in N_Entity
);
1491 end Is_Interrupt_Handler
;
1493 function Is_Intrinsic_Subprogram
(Id
: E
) return B
is
1496 end Is_Intrinsic_Subprogram
;
1498 function Is_Itype
(Id
: E
) return B
is
1503 function Is_Known_Non_Null
(Id
: E
) return B
is
1506 end Is_Known_Non_Null
;
1508 function Is_Known_Valid
(Id
: E
) return B
is
1510 return Flag170
(Id
);
1513 function Is_Limited_Composite
(Id
: E
) return B
is
1515 return Flag106
(Id
);
1516 end Is_Limited_Composite
;
1518 function Is_Limited_Record
(Id
: E
) return B
is
1521 end Is_Limited_Record
;
1523 function Is_Machine_Code_Subprogram
(Id
: E
) return B
is
1525 pragma Assert
(Is_Subprogram
(Id
));
1526 return Flag137
(Id
);
1527 end Is_Machine_Code_Subprogram
;
1529 function Is_Non_Static_Subtype
(Id
: E
) return B
is
1531 pragma Assert
(Is_Type
(Id
));
1532 return Flag109
(Id
);
1533 end Is_Non_Static_Subtype
;
1535 function Is_Null_Init_Proc
(Id
: E
) return B
is
1537 pragma Assert
(Ekind
(Id
) = E_Procedure
);
1538 return Flag178
(Id
);
1539 end Is_Null_Init_Proc
;
1541 function Is_Optional_Parameter
(Id
: E
) return B
is
1543 pragma Assert
(Is_Formal
(Id
));
1544 return Flag134
(Id
);
1545 end Is_Optional_Parameter
;
1547 function Is_Overriding_Operation
(Id
: E
) return B
is
1549 pragma Assert
(Is_Subprogram
(Id
));
1551 end Is_Overriding_Operation
;
1553 function Is_Package_Body_Entity
(Id
: E
) return B
is
1555 return Flag160
(Id
);
1556 end Is_Package_Body_Entity
;
1558 function Is_Packed
(Id
: E
) return B
is
1560 return Flag51
(Implementation_Base_Type
(Id
));
1563 function Is_Packed_Array_Type
(Id
: E
) return B
is
1565 return Flag138
(Id
);
1566 end Is_Packed_Array_Type
;
1568 function Is_Potentially_Use_Visible
(Id
: E
) return B
is
1570 pragma Assert
(Nkind
(Id
) in N_Entity
);
1572 end Is_Potentially_Use_Visible
;
1574 function Is_Preelaborated
(Id
: E
) return B
is
1577 end Is_Preelaborated
;
1579 function Is_Private_Composite
(Id
: E
) return B
is
1581 pragma Assert
(Is_Type
(Id
));
1582 return Flag107
(Id
);
1583 end Is_Private_Composite
;
1585 function Is_Private_Descendant
(Id
: E
) return B
is
1588 end Is_Private_Descendant
;
1590 function Is_Psected
(Id
: E
) return B
is
1592 return Flag153
(Id
);
1595 function Is_Public
(Id
: E
) return B
is
1597 pragma Assert
(Nkind
(Id
) in N_Entity
);
1601 function Is_Pure
(Id
: E
) return B
is
1606 function Is_Remote_Call_Interface
(Id
: E
) return B
is
1609 end Is_Remote_Call_Interface
;
1611 function Is_Remote_Types
(Id
: E
) return B
is
1614 end Is_Remote_Types
;
1616 function Is_Renaming_Of_Object
(Id
: E
) return B
is
1618 return Flag112
(Id
);
1619 end Is_Renaming_Of_Object
;
1621 function Is_Shared_Passive
(Id
: E
) return B
is
1624 end Is_Shared_Passive
;
1626 function Is_Statically_Allocated
(Id
: E
) return B
is
1629 end Is_Statically_Allocated
;
1631 function Is_Tag
(Id
: E
) return B
is
1633 pragma Assert
(Nkind
(Id
) in N_Entity
);
1637 function Is_Tagged_Type
(Id
: E
) return B
is
1642 function Is_Thread_Body
(Id
: E
) return B
is
1647 function Is_True_Constant
(Id
: E
) return B
is
1649 return Flag163
(Id
);
1650 end Is_True_Constant
;
1652 function Is_Unchecked_Union
(Id
: E
) return B
is
1654 return Flag117
(Id
);
1655 end Is_Unchecked_Union
;
1657 function Is_Unsigned_Type
(Id
: E
) return B
is
1659 pragma Assert
(Is_Type
(Id
));
1660 return Flag144
(Id
);
1661 end Is_Unsigned_Type
;
1663 function Is_Valued_Procedure
(Id
: E
) return B
is
1665 pragma Assert
(Ekind
(Id
) = E_Procedure
);
1666 return Flag127
(Id
);
1667 end Is_Valued_Procedure
;
1669 function Is_Visible_Child_Unit
(Id
: E
) return B
is
1671 pragma Assert
(Is_Child_Unit
(Id
));
1672 return Flag116
(Id
);
1673 end Is_Visible_Child_Unit
;
1675 function Is_VMS_Exception
(Id
: E
) return B
is
1677 return Flag133
(Id
);
1678 end Is_VMS_Exception
;
1680 function Is_Volatile
(Id
: E
) return B
is
1682 pragma Assert
(Nkind
(Id
) in N_Entity
);
1683 if Is_Type
(Id
) then
1684 return Flag16
(Base_Type
(Id
));
1690 function Kill_Elaboration_Checks
(Id
: E
) return B
is
1693 end Kill_Elaboration_Checks
;
1695 function Kill_Range_Checks
(Id
: E
) return B
is
1698 end Kill_Range_Checks
;
1700 function Kill_Tag_Checks
(Id
: E
) return B
is
1703 end Kill_Tag_Checks
;
1705 function Last_Entity
(Id
: E
) return E
is
1710 function Limited_View
(Id
: E
) return E
is
1712 pragma Assert
(Ekind
(Id
) = E_Package
);
1716 function Lit_Indexes
(Id
: E
) return E
is
1718 pragma Assert
(Is_Enumeration_Type
(Id
));
1722 function Lit_Strings
(Id
: E
) return E
is
1724 pragma Assert
(Is_Enumeration_Type
(Id
));
1728 function Machine_Radix_10
(Id
: E
) return B
is
1730 pragma Assert
(Is_Decimal_Fixed_Point_Type
(Id
));
1732 end Machine_Radix_10
;
1734 function Master_Id
(Id
: E
) return E
is
1739 function Materialize_Entity
(Id
: E
) return B
is
1741 return Flag168
(Id
);
1742 end Materialize_Entity
;
1744 function Mechanism
(Id
: E
) return M
is
1746 pragma Assert
(Ekind
(Id
) = E_Function
or else Is_Formal
(Id
));
1747 return UI_To_Int
(Uint8
(Id
));
1750 function Modulus
(Id
: E
) return Uint
is
1752 pragma Assert
(Is_Modular_Integer_Type
(Id
));
1753 return Uint17
(Base_Type
(Id
));
1756 function Must_Be_On_Byte_Boundary
(Id
: E
) return B
is
1758 pragma Assert
(Is_Type
(Id
));
1759 return Flag183
(Id
);
1760 end Must_Be_On_Byte_Boundary
;
1762 function Needs_Debug_Info
(Id
: E
) return B
is
1764 return Flag147
(Id
);
1765 end Needs_Debug_Info
;
1767 function Needs_No_Actuals
(Id
: E
) return B
is
1770 (Is_Overloadable
(Id
)
1771 or else Ekind
(Id
) = E_Subprogram_Type
1772 or else Ekind
(Id
) = E_Entry_Family
);
1774 end Needs_No_Actuals
;
1776 function Never_Set_In_Source
(Id
: E
) return B
is
1778 return Flag115
(Id
);
1779 end Never_Set_In_Source
;
1781 function Next_Inlined_Subprogram
(Id
: E
) return E
is
1784 end Next_Inlined_Subprogram
;
1786 function No_Pool_Assigned
(Id
: E
) return B
is
1788 pragma Assert
(Is_Access_Type
(Id
));
1789 return Flag131
(Root_Type
(Id
));
1790 end No_Pool_Assigned
;
1792 function No_Return
(Id
: E
) return B
is
1796 or else Ekind
(Id
) = E_Procedure
1797 or else Ekind
(Id
) = E_Generic_Procedure
);
1798 return Flag113
(Id
);
1801 function No_Strict_Aliasing
(Id
: E
) return B
is
1803 pragma Assert
(Is_Access_Type
(Id
));
1804 return Flag136
(Base_Type
(Id
));
1805 end No_Strict_Aliasing
;
1807 function Non_Binary_Modulus
(Id
: E
) return B
is
1809 pragma Assert
(Is_Modular_Integer_Type
(Id
));
1810 return Flag58
(Base_Type
(Id
));
1811 end Non_Binary_Modulus
;
1813 function Non_Limited_View
(Id
: E
) return E
is
1815 pragma Assert
(False
1816 or else Ekind
(Id
) = E_Incomplete_Type
);
1818 end Non_Limited_View
;
1820 function Nonzero_Is_True
(Id
: E
) return B
is
1822 pragma Assert
(Root_Type
(Id
) = Standard_Boolean
);
1823 return Flag162
(Base_Type
(Id
));
1824 end Nonzero_Is_True
;
1826 function Normalized_First_Bit
(Id
: E
) return U
is
1829 (Ekind
(Id
) = E_Component
or else Ekind
(Id
) = E_Discriminant
);
1831 end Normalized_First_Bit
;
1833 function Normalized_Position
(Id
: E
) return U
is
1836 (Ekind
(Id
) = E_Component
or else Ekind
(Id
) = E_Discriminant
);
1838 end Normalized_Position
;
1840 function Normalized_Position_Max
(Id
: E
) return U
is
1843 (Ekind
(Id
) = E_Component
or else Ekind
(Id
) = E_Discriminant
);
1845 end Normalized_Position_Max
;
1847 function Object_Ref
(Id
: E
) return E
is
1849 pragma Assert
(Ekind
(Id
) = E_Protected_Body
);
1853 function Original_Access_Type
(Id
: E
) return E
is
1856 (Ekind
(Id
) = E_Access_Subprogram_Type
1857 or else Ekind
(Id
) = E_Access_Protected_Subprogram_Type
);
1859 end Original_Access_Type
;
1861 function Original_Array_Type
(Id
: E
) return E
is
1863 pragma Assert
(Is_Array_Type
(Id
) or else Is_Modular_Integer_Type
(Id
));
1865 end Original_Array_Type
;
1867 function Original_Record_Component
(Id
: E
) return E
is
1870 (Ekind
(Id
) = E_Void
1871 or else Ekind
(Id
) = E_Component
1872 or else Ekind
(Id
) = E_Discriminant
);
1874 end Original_Record_Component
;
1876 function Packed_Array_Type
(Id
: E
) return E
is
1878 pragma Assert
(Is_Array_Type
(Id
));
1880 end Packed_Array_Type
;
1882 function Parent_Subtype
(Id
: E
) return E
is
1884 pragma Assert
(Ekind
(Id
) = E_Record_Type
);
1888 function Primitive_Operations
(Id
: E
) return L
is
1890 pragma Assert
(Is_Tagged_Type
(Id
));
1891 return Elist15
(Id
);
1892 end Primitive_Operations
;
1894 function Prival
(Id
: E
) return E
is
1896 pragma Assert
(Is_Protected_Private
(Id
));
1900 function Privals_Chain
(Id
: E
) return L
is
1902 pragma Assert
(Is_Overloadable
(Id
)
1903 or else Ekind
(Id
) = E_Entry_Family
);
1904 return Elist23
(Id
);
1907 function Private_Dependents
(Id
: E
) return L
is
1909 pragma Assert
(Is_Incomplete_Or_Private_Type
(Id
));
1910 return Elist18
(Id
);
1911 end Private_Dependents
;
1913 function Private_View
(Id
: E
) return N
is
1915 pragma Assert
(Is_Private_Type
(Id
));
1919 function Protected_Body_Subprogram
(Id
: E
) return E
is
1921 pragma Assert
(Is_Subprogram
(Id
) or else Is_Entry
(Id
));
1923 end Protected_Body_Subprogram
;
1925 function Protected_Formal
(Id
: E
) return E
is
1927 pragma Assert
(Is_Formal
(Id
));
1929 end Protected_Formal
;
1931 function Protected_Operation
(Id
: E
) return N
is
1933 pragma Assert
(Is_Protected_Private
(Id
));
1935 end Protected_Operation
;
1937 function Reachable
(Id
: E
) return B
is
1942 function Referenced
(Id
: E
) return B
is
1944 return Flag156
(Id
);
1947 function Referenced_As_LHS
(Id
: E
) return B
is
1950 end Referenced_As_LHS
;
1952 function Referenced_Object
(Id
: E
) return N
is
1954 pragma Assert
(Is_Type
(Id
));
1956 end Referenced_Object
;
1958 function Register_Exception_Call
(Id
: E
) return N
is
1960 pragma Assert
(Ekind
(Id
) = E_Exception
);
1962 end Register_Exception_Call
;
1964 function Related_Array_Object
(Id
: E
) return E
is
1966 pragma Assert
(Is_Array_Type
(Id
));
1968 end Related_Array_Object
;
1970 function Related_Instance
(Id
: E
) return E
is
1973 (Ekind
(Id
) = E_Package
or else Ekind
(Id
) = E_Package_Body
);
1975 end Related_Instance
;
1977 function Renamed_Entity
(Id
: E
) return N
is
1982 function Renamed_Object
(Id
: E
) return N
is
1987 function Renaming_Map
(Id
: E
) return U
is
1992 function Return_Present
(Id
: E
) return B
is
1997 function Returns_By_Ref
(Id
: E
) return B
is
2002 function Reverse_Bit_Order
(Id
: E
) return B
is
2004 pragma Assert
(Is_Record_Type
(Id
));
2005 return Flag164
(Base_Type
(Id
));
2006 end Reverse_Bit_Order
;
2008 function RM_Size
(Id
: E
) return U
is
2010 pragma Assert
(Is_Type
(Id
));
2014 function Scalar_Range
(Id
: E
) return N
is
2019 function Scale_Value
(Id
: E
) return U
is
2024 function Scope_Depth_Value
(Id
: E
) return U
is
2027 end Scope_Depth_Value
;
2029 function Sec_Stack_Needed_For_Return
(Id
: E
) return B
is
2031 return Flag167
(Id
);
2032 end Sec_Stack_Needed_For_Return
;
2034 function Shadow_Entities
(Id
: E
) return S
is
2037 (Ekind
(Id
) = E_Package
or else Ekind
(Id
) = E_Generic_Package
);
2039 end Shadow_Entities
;
2041 function Shared_Var_Assign_Proc
(Id
: E
) return E
is
2043 pragma Assert
(Ekind
(Id
) = E_Variable
);
2045 end Shared_Var_Assign_Proc
;
2047 function Shared_Var_Read_Proc
(Id
: E
) return E
is
2049 pragma Assert
(Ekind
(Id
) = E_Variable
);
2051 end Shared_Var_Read_Proc
;
2053 function Size_Check_Code
(Id
: E
) return N
is
2055 pragma Assert
(Ekind
(Id
) = E_Constant
or else Ekind
(Id
) = E_Variable
);
2057 end Size_Check_Code
;
2059 function Size_Depends_On_Discriminant
(Id
: E
) return B
is
2061 return Flag177
(Id
);
2062 end Size_Depends_On_Discriminant
;
2064 function Size_Known_At_Compile_Time
(Id
: E
) return B
is
2067 end Size_Known_At_Compile_Time
;
2069 function Small_Value
(Id
: E
) return R
is
2071 pragma Assert
(Is_Fixed_Point_Type
(Id
));
2072 return Ureal21
(Id
);
2075 function Spec_Entity
(Id
: E
) return E
is
2078 (Ekind
(Id
) = E_Package_Body
or else Is_Formal
(Id
));
2082 function Storage_Size_Variable
(Id
: E
) return E
is
2084 pragma Assert
(Is_Access_Type
(Id
) or else Is_Task_Type
(Id
));
2085 return Node15
(Implementation_Base_Type
(Id
));
2086 end Storage_Size_Variable
;
2088 function Stored_Constraint
(Id
: E
) return L
is
2091 (Is_Composite_Type
(Id
) and then not Is_Array_Type
(Id
));
2092 return Elist23
(Id
);
2093 end Stored_Constraint
;
2095 function Strict_Alignment
(Id
: E
) return B
is
2097 return Flag145
(Implementation_Base_Type
(Id
));
2098 end Strict_Alignment
;
2100 function String_Literal_Length
(Id
: E
) return U
is
2103 end String_Literal_Length
;
2105 function String_Literal_Low_Bound
(Id
: E
) return N
is
2108 end String_Literal_Low_Bound
;
2110 function Suppress_Elaboration_Warnings
(Id
: E
) return B
is
2112 return Flag148
(Id
);
2113 end Suppress_Elaboration_Warnings
;
2115 function Suppress_Init_Proc
(Id
: E
) return B
is
2117 return Flag105
(Base_Type
(Id
));
2118 end Suppress_Init_Proc
;
2120 function Suppress_Style_Checks
(Id
: E
) return B
is
2122 return Flag165
(Id
);
2123 end Suppress_Style_Checks
;
2125 function Treat_As_Volatile
(Id
: E
) return B
is
2128 end Treat_As_Volatile
;
2130 function Underlying_Full_View
(Id
: E
) return E
is
2132 pragma Assert
(Ekind
(Id
) in Private_Kind
);
2134 end Underlying_Full_View
;
2136 function Unset_Reference
(Id
: E
) return N
is
2139 end Unset_Reference
;
2141 function Uses_Sec_Stack
(Id
: E
) return B
is
2146 function Vax_Float
(Id
: E
) return B
is
2148 return Flag151
(Base_Type
(Id
));
2151 function Warnings_Off
(Id
: E
) return B
is
2156 ------------------------------
2157 -- Classification Functions --
2158 ------------------------------
2160 function Is_Access_Type
(Id
: E
) return B
is
2162 return Ekind
(Id
) in Access_Kind
;
2165 function Is_Array_Type
(Id
: E
) return B
is
2167 return Ekind
(Id
) in Array_Kind
;
2170 function Is_Class_Wide_Type
(Id
: E
) return B
is
2172 return Ekind
(Id
) in Class_Wide_Kind
;
2173 end Is_Class_Wide_Type
;
2175 function Is_Composite_Type
(Id
: E
) return B
is
2177 return Ekind
(Id
) in Composite_Kind
;
2178 end Is_Composite_Type
;
2180 function Is_Concurrent_Body
(Id
: E
) return B
is
2182 return Ekind
(Id
) in
2183 Concurrent_Body_Kind
;
2184 end Is_Concurrent_Body
;
2186 function Is_Concurrent_Record_Type
(Id
: E
) return B
is
2189 end Is_Concurrent_Record_Type
;
2191 function Is_Concurrent_Type
(Id
: E
) return B
is
2193 return Ekind
(Id
) in Concurrent_Kind
;
2194 end Is_Concurrent_Type
;
2196 function Is_Decimal_Fixed_Point_Type
(Id
: E
) return B
is
2198 return Ekind
(Id
) in
2199 Decimal_Fixed_Point_Kind
;
2200 end Is_Decimal_Fixed_Point_Type
;
2202 function Is_Digits_Type
(Id
: E
) return B
is
2204 return Ekind
(Id
) in Digits_Kind
;
2207 function Is_Discrete_Or_Fixed_Point_Type
(Id
: E
) return B
is
2209 return Ekind
(Id
) in Discrete_Or_Fixed_Point_Kind
;
2210 end Is_Discrete_Or_Fixed_Point_Type
;
2212 function Is_Discrete_Type
(Id
: E
) return B
is
2214 return Ekind
(Id
) in Discrete_Kind
;
2215 end Is_Discrete_Type
;
2217 function Is_Elementary_Type
(Id
: E
) return B
is
2219 return Ekind
(Id
) in Elementary_Kind
;
2220 end Is_Elementary_Type
;
2222 function Is_Entry
(Id
: E
) return B
is
2224 return Ekind
(Id
) in Entry_Kind
;
2227 function Is_Enumeration_Type
(Id
: E
) return B
is
2229 return Ekind
(Id
) in
2231 end Is_Enumeration_Type
;
2233 function Is_Fixed_Point_Type
(Id
: E
) return B
is
2235 return Ekind
(Id
) in
2237 end Is_Fixed_Point_Type
;
2239 function Is_Floating_Point_Type
(Id
: E
) return B
is
2241 return Ekind
(Id
) in Float_Kind
;
2242 end Is_Floating_Point_Type
;
2244 function Is_Formal
(Id
: E
) return B
is
2246 return Ekind
(Id
) in Formal_Kind
;
2249 function Is_Generic_Subprogram
(Id
: E
) return B
is
2251 return Ekind
(Id
) in Generic_Subprogram_Kind
;
2252 end Is_Generic_Subprogram
;
2254 function Is_Generic_Unit
(Id
: E
) return B
is
2256 return Ekind
(Id
) in Generic_Unit_Kind
;
2257 end Is_Generic_Unit
;
2259 function Is_Incomplete_Or_Private_Type
(Id
: E
) return B
is
2261 return Ekind
(Id
) in
2262 Incomplete_Or_Private_Kind
;
2263 end Is_Incomplete_Or_Private_Type
;
2265 function Is_Integer_Type
(Id
: E
) return B
is
2267 return Ekind
(Id
) in Integer_Kind
;
2268 end Is_Integer_Type
;
2270 function Is_Modular_Integer_Type
(Id
: E
) return B
is
2272 return Ekind
(Id
) in
2273 Modular_Integer_Kind
;
2274 end Is_Modular_Integer_Type
;
2276 function Is_Named_Number
(Id
: E
) return B
is
2278 return Ekind
(Id
) in Named_Kind
;
2279 end Is_Named_Number
;
2281 function Is_Numeric_Type
(Id
: E
) return B
is
2283 return Ekind
(Id
) in Numeric_Kind
;
2284 end Is_Numeric_Type
;
2286 function Is_Object
(Id
: E
) return B
is
2288 return Ekind
(Id
) in Object_Kind
;
2291 function Is_Ordinary_Fixed_Point_Type
(Id
: E
) return B
is
2293 return Ekind
(Id
) in
2294 Ordinary_Fixed_Point_Kind
;
2295 end Is_Ordinary_Fixed_Point_Type
;
2297 function Is_Overloadable
(Id
: E
) return B
is
2299 return Ekind
(Id
) in Overloadable_Kind
;
2300 end Is_Overloadable
;
2302 function Is_Private_Type
(Id
: E
) return B
is
2304 return Ekind
(Id
) in Private_Kind
;
2305 end Is_Private_Type
;
2307 function Is_Protected_Type
(Id
: E
) return B
is
2309 return Ekind
(Id
) in Protected_Kind
;
2310 end Is_Protected_Type
;
2312 function Is_Real_Type
(Id
: E
) return B
is
2314 return Ekind
(Id
) in Real_Kind
;
2317 function Is_Record_Type
(Id
: E
) return B
is
2319 return Ekind
(Id
) in Record_Kind
;
2322 function Is_Scalar_Type
(Id
: E
) return B
is
2324 return Ekind
(Id
) in Scalar_Kind
;
2327 function Is_Signed_Integer_Type
(Id
: E
) return B
is
2329 return Ekind
(Id
) in
2330 Signed_Integer_Kind
;
2331 end Is_Signed_Integer_Type
;
2333 function Is_Subprogram
(Id
: E
) return B
is
2335 return Ekind
(Id
) in Subprogram_Kind
;
2338 function Is_Task_Type
(Id
: E
) return B
is
2340 return Ekind
(Id
) in Task_Kind
;
2343 function Is_Type
(Id
: E
) return B
is
2345 return Ekind
(Id
) in Type_Kind
;
2348 ------------------------------
2349 -- Attribute Set Procedures --
2350 ------------------------------
2352 procedure Set_Accept_Address
(Id
: E
; V
: L
) is
2354 Set_Elist21
(Id
, V
);
2355 end Set_Accept_Address
;
2357 procedure Set_Access_Disp_Table
(Id
: E
; V
: E
) is
2359 pragma Assert
(Is_Tagged_Type
(Id
) and then Id
= Base_Type
(Id
));
2361 end Set_Access_Disp_Table
;
2363 procedure Set_Associated_Final_Chain
(Id
: E
; V
: E
) is
2365 pragma Assert
(Is_Access_Type
(Id
));
2367 end Set_Associated_Final_Chain
;
2369 procedure Set_Associated_Formal_Package
(Id
: E
; V
: E
) is
2372 end Set_Associated_Formal_Package
;
2374 procedure Set_Associated_Node_For_Itype
(Id
: E
; V
: E
) is
2377 end Set_Associated_Node_For_Itype
;
2379 procedure Set_Associated_Storage_Pool
(Id
: E
; V
: E
) is
2381 pragma Assert
(Is_Access_Type
(Id
) and then Id
= Base_Type
(Id
));
2383 end Set_Associated_Storage_Pool
;
2385 procedure Set_Actual_Subtype
(Id
: E
; V
: E
) is
2388 (Ekind
(Id
) = E_Constant
2389 or else Ekind
(Id
) = E_Variable
2390 or else Ekind
(Id
) = E_Generic_In_Out_Parameter
2391 or else Ekind
(Id
) in E_In_Parameter
.. E_In_Out_Parameter
);
2393 end Set_Actual_Subtype
;
2395 procedure Set_Address_Taken
(Id
: E
; V
: B
:= True) is
2397 Set_Flag104
(Id
, V
);
2398 end Set_Address_Taken
;
2400 procedure Set_Alias
(Id
: E
; V
: E
) is
2403 (Is_Overloadable
(Id
) or else Ekind
(Id
) = E_Subprogram_Type
);
2407 procedure Set_Alignment
(Id
: E
; V
: U
) is
2409 pragma Assert
(Is_Type
(Id
)
2410 or else Is_Formal
(Id
)
2411 or else Ekind
(Id
) = E_Loop_Parameter
2412 or else Ekind
(Id
) = E_Constant
2413 or else Ekind
(Id
) = E_Exception
2414 or else Ekind
(Id
) = E_Variable
);
2418 procedure Set_Barrier_Function
(Id
: E
; V
: N
) is
2420 pragma Assert
(Is_Entry
(Id
));
2422 end Set_Barrier_Function
;
2424 procedure Set_Block_Node
(Id
: E
; V
: N
) is
2426 pragma Assert
(Ekind
(Id
) = E_Block
);
2430 procedure Set_Body_Entity
(Id
: E
; V
: E
) is
2433 (Ekind
(Id
) = E_Package
or else Ekind
(Id
) = E_Generic_Package
);
2435 end Set_Body_Entity
;
2437 procedure Set_Body_Needed_For_SAL
(Id
: E
; V
: B
:= True) is
2440 (Ekind
(Id
) = E_Package
2441 or else Is_Subprogram
(Id
)
2442 or else Is_Generic_Unit
(Id
));
2444 end Set_Body_Needed_For_SAL
;
2446 procedure Set_C_Pass_By_Copy
(Id
: E
; V
: B
:= True) is
2448 pragma Assert
(Is_Record_Type
(Id
) and then Id
= Base_Type
(Id
));
2449 Set_Flag125
(Id
, V
);
2450 end Set_C_Pass_By_Copy
;
2452 procedure Set_Can_Never_Be_Null
(Id
: E
; V
: B
:= True) is
2455 end Set_Can_Never_Be_Null
;
2457 procedure Set_Checks_May_Be_Suppressed
(Id
: E
; V
: B
:= True) is
2460 end Set_Checks_May_Be_Suppressed
;
2462 procedure Set_Class_Wide_Type
(Id
: E
; V
: E
) is
2464 pragma Assert
(Is_Type
(Id
));
2466 end Set_Class_Wide_Type
;
2468 procedure Set_Cloned_Subtype
(Id
: E
; V
: E
) is
2471 (Ekind
(Id
) = E_Record_Subtype
2472 or else Ekind
(Id
) = E_Class_Wide_Subtype
);
2474 end Set_Cloned_Subtype
;
2476 procedure Set_Component_Bit_Offset
(Id
: E
; V
: U
) is
2479 (Ekind
(Id
) = E_Component
or else Ekind
(Id
) = E_Discriminant
);
2481 end Set_Component_Bit_Offset
;
2483 procedure Set_Component_Clause
(Id
: E
; V
: N
) is
2486 (Ekind
(Id
) = E_Component
or else Ekind
(Id
) = E_Discriminant
);
2488 end Set_Component_Clause
;
2490 procedure Set_Component_Size
(Id
: E
; V
: U
) is
2492 pragma Assert
(Is_Array_Type
(Id
) and then Id
= Base_Type
(Id
));
2494 end Set_Component_Size
;
2496 procedure Set_Component_Type
(Id
: E
; V
: E
) is
2498 pragma Assert
(Is_Array_Type
(Id
) and then Id
= Base_Type
(Id
));
2500 end Set_Component_Type
;
2502 procedure Set_Corresponding_Concurrent_Type
(Id
: E
; V
: E
) is
2505 (Ekind
(Id
) = E_Record_Type
and then Is_Concurrent_Type
(V
));
2507 end Set_Corresponding_Concurrent_Type
;
2509 procedure Set_Corresponding_Discriminant
(Id
: E
; V
: E
) is
2511 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
2513 end Set_Corresponding_Discriminant
;
2515 procedure Set_Corresponding_Equality
(Id
: E
; V
: E
) is
2518 (Ekind
(Id
) = E_Function
2519 and then not Comes_From_Source
(Id
)
2520 and then Chars
(Id
) = Name_Op_Ne
);
2522 end Set_Corresponding_Equality
;
2524 procedure Set_Corresponding_Record_Type
(Id
: E
; V
: E
) is
2526 pragma Assert
(Is_Concurrent_Type
(Id
));
2528 end Set_Corresponding_Record_Type
;
2530 procedure Set_Corresponding_Remote_Type
(Id
: E
; V
: E
) is
2533 end Set_Corresponding_Remote_Type
;
2535 procedure Set_Current_Value
(Id
: E
; V
: E
) is
2537 pragma Assert
(Ekind
(Id
) in Object_Kind
or else Ekind
(Id
) = E_Void
);
2539 end Set_Current_Value
;
2541 procedure Set_CR_Discriminant
(Id
: E
; V
: E
) is
2544 end Set_CR_Discriminant
;
2546 procedure Set_Debug_Info_Off
(Id
: E
; V
: B
:= True) is
2548 Set_Flag166
(Id
, V
);
2549 end Set_Debug_Info_Off
;
2551 procedure Set_Debug_Renaming_Link
(Id
: E
; V
: E
) is
2554 end Set_Debug_Renaming_Link
;
2556 procedure Set_Default_Expr_Function
(Id
: E
; V
: E
) is
2558 pragma Assert
(Is_Formal
(Id
));
2560 end Set_Default_Expr_Function
;
2562 procedure Set_Default_Expressions_Processed
(Id
: E
; V
: B
:= True) is
2564 Set_Flag108
(Id
, V
);
2565 end Set_Default_Expressions_Processed
;
2567 procedure Set_Default_Value
(Id
: E
; V
: N
) is
2569 pragma Assert
(Is_Formal
(Id
));
2571 end Set_Default_Value
;
2573 procedure Set_Delay_Cleanups
(Id
: E
; V
: B
:= True) is
2577 or else Is_Task_Type
(Id
)
2578 or else Ekind
(Id
) = E_Block
);
2579 Set_Flag114
(Id
, V
);
2580 end Set_Delay_Cleanups
;
2582 procedure Set_Delay_Subprogram_Descriptors
(Id
: E
; V
: B
:= True) is
2586 or else Ekind
(Id
) = E_Package
2587 or else Ekind
(Id
) = E_Package_Body
);
2589 end Set_Delay_Subprogram_Descriptors
;
2591 procedure Set_Delta_Value
(Id
: E
; V
: R
) is
2593 pragma Assert
(Is_Fixed_Point_Type
(Id
));
2594 Set_Ureal18
(Id
, V
);
2595 end Set_Delta_Value
;
2597 procedure Set_Dependent_Instances
(Id
: E
; V
: L
) is
2599 pragma Assert
(Is_Generic_Instance
(Id
));
2601 end Set_Dependent_Instances
;
2603 procedure Set_Depends_On_Private
(Id
: E
; V
: B
:= True) is
2605 pragma Assert
(Nkind
(Id
) in N_Entity
);
2607 end Set_Depends_On_Private
;
2609 procedure Set_Digits_Value
(Id
: E
; V
: U
) is
2612 (Is_Floating_Point_Type
(Id
)
2613 or else Is_Decimal_Fixed_Point_Type
(Id
));
2615 end Set_Digits_Value
;
2617 procedure Set_Directly_Designated_Type
(Id
: E
; V
: E
) is
2620 end Set_Directly_Designated_Type
;
2622 procedure Set_Discard_Names
(Id
: E
; V
: B
:= True) is
2625 end Set_Discard_Names
;
2627 procedure Set_Discriminal
(Id
: E
; V
: E
) is
2629 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
2631 end Set_Discriminal
;
2633 procedure Set_Discriminal_Link
(Id
: E
; V
: E
) is
2636 end Set_Discriminal_Link
;
2638 procedure Set_Discriminant_Checking_Func
(Id
: E
; V
: E
) is
2640 pragma Assert
(Ekind
(Id
) = E_Component
);
2642 end Set_Discriminant_Checking_Func
;
2644 procedure Set_Discriminant_Constraint
(Id
: E
; V
: L
) is
2646 pragma Assert
(Nkind
(Id
) in N_Entity
);
2647 Set_Elist21
(Id
, V
);
2648 end Set_Discriminant_Constraint
;
2650 procedure Set_Discriminant_Default_Value
(Id
: E
; V
: N
) is
2653 end Set_Discriminant_Default_Value
;
2655 procedure Set_Discriminant_Number
(Id
: E
; V
: U
) is
2658 end Set_Discriminant_Number
;
2660 procedure Set_DT_Entry_Count
(Id
: E
; V
: U
) is
2662 pragma Assert
(Ekind
(Id
) = E_Component
);
2664 end Set_DT_Entry_Count
;
2666 procedure Set_DT_Position
(Id
: E
; V
: U
) is
2668 pragma Assert
(Ekind
(Id
) = E_Function
or else Ekind
(Id
) = E_Procedure
);
2670 end Set_DT_Position
;
2672 procedure Set_DTC_Entity
(Id
: E
; V
: E
) is
2675 (Ekind
(Id
) = E_Function
or else Ekind
(Id
) = E_Procedure
);
2679 procedure Set_Elaborate_All_Desirable
(Id
: E
; V
: B
:= True) is
2681 Set_Flag146
(Id
, V
);
2682 end Set_Elaborate_All_Desirable
;
2684 procedure Set_Elaboration_Entity
(Id
: E
; V
: E
) is
2689 Ekind
(Id
) = E_Package
2691 Is_Generic_Unit
(Id
));
2693 end Set_Elaboration_Entity
;
2695 procedure Set_Elaboration_Entity_Required
(Id
: E
; V
: B
:= True) is
2700 Ekind
(Id
) = E_Package
2702 Is_Generic_Unit
(Id
));
2703 Set_Flag174
(Id
, V
);
2704 end Set_Elaboration_Entity_Required
;
2706 procedure Set_Enclosing_Scope
(Id
: E
; V
: E
) is
2709 end Set_Enclosing_Scope
;
2711 procedure Set_Entry_Accepted
(Id
: E
; V
: B
:= True) is
2713 pragma Assert
(Is_Entry
(Id
));
2714 Set_Flag152
(Id
, V
);
2715 end Set_Entry_Accepted
;
2717 procedure Set_Entry_Bodies_Array
(Id
: E
; V
: E
) is
2720 end Set_Entry_Bodies_Array
;
2722 procedure Set_Entry_Cancel_Parameter
(Id
: E
; V
: E
) is
2725 end Set_Entry_Cancel_Parameter
;
2727 procedure Set_Entry_Component
(Id
: E
; V
: E
) is
2730 end Set_Entry_Component
;
2732 procedure Set_Entry_Formal
(Id
: E
; V
: E
) is
2735 end Set_Entry_Formal
;
2737 procedure Set_Entry_Index_Constant
(Id
: E
; V
: E
) is
2739 pragma Assert
(Ekind
(Id
) = E_Entry_Index_Parameter
);
2741 end Set_Entry_Index_Constant
;
2743 procedure Set_Entry_Parameters_Type
(Id
: E
; V
: E
) is
2746 end Set_Entry_Parameters_Type
;
2748 procedure Set_Enum_Pos_To_Rep
(Id
: E
; V
: E
) is
2750 pragma Assert
(Ekind
(Id
) = E_Enumeration_Type
);
2752 end Set_Enum_Pos_To_Rep
;
2754 procedure Set_Enumeration_Pos
(Id
: E
; V
: U
) is
2756 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
2758 end Set_Enumeration_Pos
;
2760 procedure Set_Enumeration_Rep
(Id
: E
; V
: U
) is
2762 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
2764 end Set_Enumeration_Rep
;
2766 procedure Set_Enumeration_Rep_Expr
(Id
: E
; V
: N
) is
2768 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
2770 end Set_Enumeration_Rep_Expr
;
2772 procedure Set_Equivalent_Type
(Id
: E
; V
: E
) is
2775 (Ekind
(Id
) = E_Class_Wide_Type
or else
2776 Ekind
(Id
) = E_Class_Wide_Subtype
or else
2777 Ekind
(Id
) = E_Access_Protected_Subprogram_Type
or else
2778 Ekind
(Id
) = E_Access_Subprogram_Type
or else
2779 Ekind
(Id
) = E_Exception_Type
);
2781 end Set_Equivalent_Type
;
2783 procedure Set_Esize
(Id
: E
; V
: U
) is
2788 procedure Set_Exception_Code
(Id
: E
; V
: U
) is
2790 pragma Assert
(Ekind
(Id
) = E_Exception
);
2792 end Set_Exception_Code
;
2794 procedure Set_Extra_Accessibility
(Id
: E
; V
: E
) is
2796 pragma Assert
(Is_Formal
(Id
) or else Ekind
(Id
) = E_Variable
);
2798 end Set_Extra_Accessibility
;
2800 procedure Set_Extra_Constrained
(Id
: E
; V
: E
) is
2802 pragma Assert
(Is_Formal
(Id
) or else Ekind
(Id
) = E_Variable
);
2804 end Set_Extra_Constrained
;
2806 procedure Set_Extra_Formal
(Id
: E
; V
: E
) is
2809 end Set_Extra_Formal
;
2811 procedure Set_Finalization_Chain_Entity
(Id
: E
; V
: E
) is
2814 end Set_Finalization_Chain_Entity
;
2816 procedure Set_Finalize_Storage_Only
(Id
: E
; V
: B
:= True) is
2818 pragma Assert
(Is_Type
(Id
) and then Id
= Base_Type
(Id
));
2819 Set_Flag158
(Id
, V
);
2820 end Set_Finalize_Storage_Only
;
2822 procedure Set_First_Entity
(Id
: E
; V
: E
) is
2825 end Set_First_Entity
;
2827 procedure Set_First_Index
(Id
: E
; V
: N
) is
2830 end Set_First_Index
;
2832 procedure Set_First_Literal
(Id
: E
; V
: E
) is
2835 end Set_First_Literal
;
2837 procedure Set_First_Optional_Parameter
(Id
: E
; V
: E
) is
2840 (Ekind
(Id
) = E_Function
or else Ekind
(Id
) = E_Procedure
);
2842 end Set_First_Optional_Parameter
;
2844 procedure Set_First_Private_Entity
(Id
: E
; V
: E
) is
2846 pragma Assert
(Nkind
(Id
) in N_Entity
);
2848 end Set_First_Private_Entity
;
2850 procedure Set_First_Rep_Item
(Id
: E
; V
: N
) is
2853 end Set_First_Rep_Item
;
2855 procedure Set_Freeze_Node
(Id
: E
; V
: N
) is
2858 end Set_Freeze_Node
;
2860 procedure Set_From_With_Type
(Id
: E
; V
: B
:= True) is
2864 or else Ekind
(Id
) = E_Package
);
2865 Set_Flag159
(Id
, V
);
2866 end Set_From_With_Type
;
2868 procedure Set_Full_View
(Id
: E
; V
: E
) is
2870 pragma Assert
(Is_Type
(Id
) or else Ekind
(Id
) = E_Constant
);
2874 procedure Set_Function_Returns_With_DSP
(Id
: E
; V
: B
:= True) is
2877 (Is_Subprogram
(Id
) or else Ekind
(Id
) = E_Subprogram_Type
);
2878 Set_Flag169
(Id
, V
);
2879 end Set_Function_Returns_With_DSP
;
2881 procedure Set_Generic_Homonym
(Id
: E
; V
: E
) is
2884 end Set_Generic_Homonym
;
2886 procedure Set_Generic_Renamings
(Id
: E
; V
: L
) is
2888 Set_Elist23
(Id
, V
);
2889 end Set_Generic_Renamings
;
2891 procedure Set_Handler_Records
(Id
: E
; V
: S
) is
2894 end Set_Handler_Records
;
2896 procedure Set_Has_Aliased_Components
(Id
: E
; V
: B
:= True) is
2898 pragma Assert
(Base_Type
(Id
) = Id
);
2899 Set_Flag135
(Id
, V
);
2900 end Set_Has_Aliased_Components
;
2902 procedure Set_Has_Alignment_Clause
(Id
: E
; V
: B
:= True) is
2905 end Set_Has_Alignment_Clause
;
2907 procedure Set_Has_All_Calls_Remote
(Id
: E
; V
: B
:= True) is
2910 end Set_Has_All_Calls_Remote
;
2912 procedure Set_Has_Atomic_Components
(Id
: E
; V
: B
:= True) is
2914 pragma Assert
(not Is_Type
(Id
) or else Base_Type
(Id
) = Id
);
2916 end Set_Has_Atomic_Components
;
2918 procedure Set_Has_Biased_Representation
(Id
: E
; V
: B
:= True) is
2921 ((V
= False) or else (Is_Discrete_Type
(Id
) or Is_Object
(Id
)));
2922 Set_Flag139
(Id
, V
);
2923 end Set_Has_Biased_Representation
;
2925 procedure Set_Has_Completion
(Id
: E
; V
: B
:= True) is
2928 end Set_Has_Completion
;
2930 procedure Set_Has_Completion_In_Body
(Id
: E
; V
: B
:= True) is
2932 pragma Assert
(Ekind
(Id
) = E_Incomplete_Type
);
2934 end Set_Has_Completion_In_Body
;
2936 procedure Set_Has_Complex_Representation
(Id
: E
; V
: B
:= True) is
2938 pragma Assert
(Ekind
(Id
) = E_Record_Type
);
2939 Set_Flag140
(Id
, V
);
2940 end Set_Has_Complex_Representation
;
2942 procedure Set_Has_Component_Size_Clause
(Id
: E
; V
: B
:= True) is
2944 pragma Assert
(Ekind
(Id
) = E_Array_Type
);
2946 end Set_Has_Component_Size_Clause
;
2948 procedure Set_Has_Contiguous_Rep
(Id
: E
; V
: B
:= True) is
2950 Set_Flag181
(Id
, V
);
2951 end Set_Has_Contiguous_Rep
;
2953 procedure Set_Has_Controlled_Component
(Id
: E
; V
: B
:= True) is
2955 pragma Assert
(Base_Type
(Id
) = Id
);
2957 end Set_Has_Controlled_Component
;
2959 procedure Set_Has_Controlling_Result
(Id
: E
; V
: B
:= True) is
2962 end Set_Has_Controlling_Result
;
2964 procedure Set_Has_Convention_Pragma
(Id
: E
; V
: B
:= True) is
2966 Set_Flag119
(Id
, V
);
2967 end Set_Has_Convention_Pragma
;
2969 procedure Set_Has_Delayed_Freeze
(Id
: E
; V
: B
:= True) is
2971 pragma Assert
(Nkind
(Id
) in N_Entity
);
2973 end Set_Has_Delayed_Freeze
;
2975 procedure Set_Has_Discriminants
(Id
: E
; V
: B
:= True) is
2977 pragma Assert
(Nkind
(Id
) in N_Entity
);
2979 end Set_Has_Discriminants
;
2981 procedure Set_Has_Enumeration_Rep_Clause
(Id
: E
; V
: B
:= True) is
2983 pragma Assert
(Is_Enumeration_Type
(Id
));
2985 end Set_Has_Enumeration_Rep_Clause
;
2987 procedure Set_Has_Exit
(Id
: E
; V
: B
:= True) is
2992 procedure Set_Has_External_Tag_Rep_Clause
(Id
: E
; V
: B
:= True) is
2994 pragma Assert
(Is_Tagged_Type
(Id
));
2995 Set_Flag110
(Id
, V
);
2996 end Set_Has_External_Tag_Rep_Clause
;
2998 procedure Set_Has_Forward_Instantiation
(Id
: E
; V
: B
:= True) is
3000 Set_Flag175
(Id
, V
);
3001 end Set_Has_Forward_Instantiation
;
3003 procedure Set_Has_Fully_Qualified_Name
(Id
: E
; V
: B
:= True) is
3005 Set_Flag173
(Id
, V
);
3006 end Set_Has_Fully_Qualified_Name
;
3008 procedure Set_Has_Gigi_Rep_Item
(Id
: E
; V
: B
:= True) is
3011 end Set_Has_Gigi_Rep_Item
;
3013 procedure Set_Has_Homonym
(Id
: E
; V
: B
:= True) is
3016 end Set_Has_Homonym
;
3018 procedure Set_Has_Machine_Radix_Clause
(Id
: E
; V
: B
:= True) is
3020 pragma Assert
(Is_Decimal_Fixed_Point_Type
(Id
));
3022 end Set_Has_Machine_Radix_Clause
;
3024 procedure Set_Has_Master_Entity
(Id
: E
; V
: B
:= True) is
3027 end Set_Has_Master_Entity
;
3029 procedure Set_Has_Missing_Return
(Id
: E
; V
: B
:= True) is
3032 (Ekind
(Id
) = E_Function
or else Ekind
(Id
) = E_Generic_Function
);
3033 Set_Flag142
(Id
, V
);
3034 end Set_Has_Missing_Return
;
3036 procedure Set_Has_Nested_Block_With_Handler
(Id
: E
; V
: B
:= True) is
3038 Set_Flag101
(Id
, V
);
3039 end Set_Has_Nested_Block_With_Handler
;
3041 procedure Set_Has_Non_Standard_Rep
(Id
: E
; V
: B
:= True) is
3043 pragma Assert
(Base_Type
(Id
) = Id
);
3045 end Set_Has_Non_Standard_Rep
;
3047 procedure Set_Has_Object_Size_Clause
(Id
: E
; V
: B
:= True) is
3049 pragma Assert
(Is_Type
(Id
));
3050 Set_Flag172
(Id
, V
);
3051 end Set_Has_Object_Size_Clause
;
3053 procedure Set_Has_Per_Object_Constraint
(Id
: E
; V
: B
:= True) is
3055 Set_Flag154
(Id
, V
);
3056 end Set_Has_Per_Object_Constraint
;
3058 procedure Set_Has_Pragma_Controlled
(Id
: E
; V
: B
:= True) is
3060 pragma Assert
(Is_Access_Type
(Id
));
3061 Set_Flag27
(Base_Type
(Id
), V
);
3062 end Set_Has_Pragma_Controlled
;
3064 procedure Set_Has_Pragma_Elaborate_Body
(Id
: E
; V
: B
:= True) is
3066 Set_Flag150
(Id
, V
);
3067 end Set_Has_Pragma_Elaborate_Body
;
3069 procedure Set_Has_Pragma_Inline
(Id
: E
; V
: B
:= True) is
3071 Set_Flag157
(Id
, V
);
3072 end Set_Has_Pragma_Inline
;
3074 procedure Set_Has_Pragma_Pack
(Id
: E
; V
: B
:= True) is
3076 pragma Assert
(Is_Array_Type
(Id
) or else Is_Record_Type
(Id
));
3077 pragma Assert
(Id
= Base_Type
(Id
));
3078 Set_Flag121
(Id
, V
);
3079 end Set_Has_Pragma_Pack
;
3081 procedure Set_Has_Pragma_Pure_Function
(Id
: E
; V
: B
:= True) is
3083 pragma Assert
(Is_Subprogram
(Id
));
3084 Set_Flag179
(Id
, V
);
3085 end Set_Has_Pragma_Pure_Function
;
3087 procedure Set_Has_Pragma_Unreferenced
(Id
: E
; V
: B
:= True) is
3089 Set_Flag180
(Id
, V
);
3090 end Set_Has_Pragma_Unreferenced
;
3092 procedure Set_Has_Primitive_Operations
(Id
: E
; V
: B
:= True) is
3094 pragma Assert
(Id
= Base_Type
(Id
));
3095 Set_Flag120
(Id
, V
);
3096 end Set_Has_Primitive_Operations
;
3098 procedure Set_Has_Private_Declaration
(Id
: E
; V
: B
:= True) is
3100 Set_Flag155
(Id
, V
);
3101 end Set_Has_Private_Declaration
;
3103 procedure Set_Has_Qualified_Name
(Id
: E
; V
: B
:= True) is
3105 Set_Flag161
(Id
, V
);
3106 end Set_Has_Qualified_Name
;
3108 procedure Set_Has_Record_Rep_Clause
(Id
: E
; V
: B
:= True) is
3110 pragma Assert
(Id
= Base_Type
(Id
));
3112 end Set_Has_Record_Rep_Clause
;
3114 procedure Set_Has_Recursive_Call
(Id
: E
; V
: B
:= True) is
3116 pragma Assert
(Is_Subprogram
(Id
));
3117 Set_Flag143
(Id
, V
);
3118 end Set_Has_Recursive_Call
;
3120 procedure Set_Has_Size_Clause
(Id
: E
; V
: B
:= True) is
3123 end Set_Has_Size_Clause
;
3125 procedure Set_Has_Small_Clause
(Id
: E
; V
: B
:= True) is
3128 end Set_Has_Small_Clause
;
3130 procedure Set_Has_Specified_Layout
(Id
: E
; V
: B
:= True) is
3132 pragma Assert
(Id
= Base_Type
(Id
));
3133 Set_Flag100
(Id
, V
);
3134 end Set_Has_Specified_Layout
;
3136 procedure Set_Has_Storage_Size_Clause
(Id
: E
; V
: B
:= True) is
3138 pragma Assert
(Is_Access_Type
(Id
) or else Is_Task_Type
(Id
));
3139 pragma Assert
(Base_Type
(Id
) = Id
);
3141 end Set_Has_Storage_Size_Clause
;
3143 procedure Set_Has_Subprogram_Descriptor
(Id
: E
; V
: B
:= True) is
3146 end Set_Has_Subprogram_Descriptor
;
3148 procedure Set_Has_Task
(Id
: E
; V
: B
:= True) is
3150 pragma Assert
(Base_Type
(Id
) = Id
);
3154 procedure Set_Has_Unchecked_Union
(Id
: E
; V
: B
:= True) is
3156 pragma Assert
(Base_Type
(Id
) = Id
);
3157 Set_Flag123
(Id
, V
);
3158 end Set_Has_Unchecked_Union
;
3160 procedure Set_Has_Unknown_Discriminants
(Id
: E
; V
: B
:= True) is
3162 pragma Assert
(Is_Type
(Id
));
3164 end Set_Has_Unknown_Discriminants
;
3166 procedure Set_Has_Volatile_Components
(Id
: E
; V
: B
:= True) is
3168 pragma Assert
(not Is_Type
(Id
) or else Base_Type
(Id
) = Id
);
3170 end Set_Has_Volatile_Components
;
3172 procedure Set_Has_Xref_Entry
(Id
: E
; V
: B
:= True) is
3174 Set_Flag182
(Id
, V
);
3175 end Set_Has_Xref_Entry
;
3177 procedure Set_Hiding_Loop_Variable
(Id
: E
; V
: E
) is
3179 pragma Assert
(Ekind
(Id
) = E_Variable
);
3181 end Set_Hiding_Loop_Variable
;
3183 procedure Set_Homonym
(Id
: E
; V
: E
) is
3185 pragma Assert
(Id
/= V
);
3189 procedure Set_In_Package_Body
(Id
: E
; V
: B
:= True) is
3192 end Set_In_Package_Body
;
3194 procedure Set_In_Private_Part
(Id
: E
; V
: B
:= True) is
3197 end Set_In_Private_Part
;
3199 procedure Set_In_Use
(Id
: E
; V
: B
:= True) is
3201 pragma Assert
(Nkind
(Id
) in N_Entity
);
3205 procedure Set_Inner_Instances
(Id
: E
; V
: L
) is
3207 Set_Elist23
(Id
, V
);
3208 end Set_Inner_Instances
;
3210 procedure Set_Interface_Name
(Id
: E
; V
: N
) is
3213 end Set_Interface_Name
;
3215 procedure Set_Is_Abstract
(Id
: E
; V
: B
:= True) is
3218 end Set_Is_Abstract
;
3220 procedure Set_Is_Access_Constant
(Id
: E
; V
: B
:= True) is
3222 pragma Assert
(Is_Access_Type
(Id
));
3224 end Set_Is_Access_Constant
;
3226 procedure Set_Is_Aliased
(Id
: E
; V
: B
:= True) is
3228 pragma Assert
(Nkind
(Id
) in N_Entity
);
3232 procedure Set_Is_AST_Entry
(Id
: E
; V
: B
:= True) is
3234 pragma Assert
(Is_Entry
(Id
));
3235 Set_Flag132
(Id
, V
);
3236 end Set_Is_AST_Entry
;
3238 procedure Set_Is_Asynchronous
(Id
: E
; V
: B
:= True) is
3241 (Ekind
(Id
) = E_Procedure
or else Is_Type
(Id
));
3243 end Set_Is_Asynchronous
;
3245 procedure Set_Is_Atomic
(Id
: E
; V
: B
:= True) is
3250 procedure Set_Is_Bit_Packed_Array
(Id
: E
; V
: B
:= True) is
3252 pragma Assert
((not V
)
3253 or else (Is_Array_Type
(Id
) and then Id
= Base_Type
(Id
)));
3255 Set_Flag122
(Id
, V
);
3256 end Set_Is_Bit_Packed_Array
;
3258 procedure Set_Is_Called
(Id
: E
; V
: B
:= True) is
3261 (Ekind
(Id
) = E_Procedure
or else Ekind
(Id
) = E_Function
);
3262 Set_Flag102
(Id
, V
);
3265 procedure Set_Is_Character_Type
(Id
: E
; V
: B
:= True) is
3268 end Set_Is_Character_Type
;
3270 procedure Set_Is_Child_Unit
(Id
: E
; V
: B
:= True) is
3273 end Set_Is_Child_Unit
;
3275 procedure Set_Is_Class_Wide_Equivalent_Type
(Id
: E
; V
: B
:= True) is
3278 end Set_Is_Class_Wide_Equivalent_Type
;
3280 procedure Set_Is_Compilation_Unit
(Id
: E
; V
: B
:= True) is
3282 Set_Flag149
(Id
, V
);
3283 end Set_Is_Compilation_Unit
;
3285 procedure Set_Is_Completely_Hidden
(Id
: E
; V
: B
:= True) is
3287 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
3288 Set_Flag103
(Id
, V
);
3289 end Set_Is_Completely_Hidden
;
3291 procedure Set_Is_Concurrent_Record_Type
(Id
: E
; V
: B
:= True) is
3294 end Set_Is_Concurrent_Record_Type
;
3296 procedure Set_Is_Constr_Subt_For_U_Nominal
(Id
: E
; V
: B
:= True) is
3299 end Set_Is_Constr_Subt_For_U_Nominal
;
3301 procedure Set_Is_Constr_Subt_For_UN_Aliased
(Id
: E
; V
: B
:= True) is
3303 Set_Flag141
(Id
, V
);
3304 end Set_Is_Constr_Subt_For_UN_Aliased
;
3306 procedure Set_Is_Constrained
(Id
: E
; V
: B
:= True) is
3308 pragma Assert
(Nkind
(Id
) in N_Entity
);
3310 end Set_Is_Constrained
;
3312 procedure Set_Is_Constructor
(Id
: E
; V
: B
:= True) is
3315 end Set_Is_Constructor
;
3317 procedure Set_Is_Controlled
(Id
: E
; V
: B
:= True) is
3319 pragma Assert
(Id
= Base_Type
(Id
));
3321 end Set_Is_Controlled
;
3323 procedure Set_Is_Controlling_Formal
(Id
: E
; V
: B
:= True) is
3325 pragma Assert
(Is_Formal
(Id
));
3327 end Set_Is_Controlling_Formal
;
3329 procedure Set_Is_CPP_Class
(Id
: E
; V
: B
:= True) is
3332 end Set_Is_CPP_Class
;
3334 procedure Set_Is_Discrim_SO_Function
(Id
: E
; V
: B
:= True) is
3336 Set_Flag176
(Id
, V
);
3337 end Set_Is_Discrim_SO_Function
;
3339 procedure Set_Is_Dispatching_Operation
(Id
: E
; V
: B
:= True) is
3344 Is_Overloadable
(Id
)
3346 Ekind
(Id
) = E_Subprogram_Type
);
3349 end Set_Is_Dispatching_Operation
;
3351 procedure Set_Is_Eliminated
(Id
: E
; V
: B
:= True) is
3353 Set_Flag124
(Id
, V
);
3354 end Set_Is_Eliminated
;
3356 procedure Set_Is_Entry_Formal
(Id
: E
; V
: B
:= True) is
3359 end Set_Is_Entry_Formal
;
3361 procedure Set_Is_Exported
(Id
: E
; V
: B
:= True) is
3364 end Set_Is_Exported
;
3366 procedure Set_Is_First_Subtype
(Id
: E
; V
: B
:= True) is
3369 end Set_Is_First_Subtype
;
3371 procedure Set_Is_For_Access_Subtype
(Id
: E
; V
: B
:= True) is
3374 (Ekind
(Id
) = E_Record_Subtype
3376 Ekind
(Id
) = E_Private_Subtype
);
3377 Set_Flag118
(Id
, V
);
3378 end Set_Is_For_Access_Subtype
;
3380 procedure Set_Is_Formal_Subprogram
(Id
: E
; V
: B
:= True) is
3382 Set_Flag111
(Id
, V
);
3383 end Set_Is_Formal_Subprogram
;
3385 procedure Set_Is_Frozen
(Id
: E
; V
: B
:= True) is
3387 pragma Assert
(Nkind
(Id
) in N_Entity
);
3391 procedure Set_Is_Generic_Actual_Type
(Id
: E
; V
: B
:= True) is
3393 pragma Assert
(Is_Type
(Id
));
3395 end Set_Is_Generic_Actual_Type
;
3397 procedure Set_Is_Generic_Instance
(Id
: E
; V
: B
:= True) is
3399 Set_Flag130
(Id
, V
);
3400 end Set_Is_Generic_Instance
;
3402 procedure Set_Is_Generic_Type
(Id
: E
; V
: B
:= True) is
3404 pragma Assert
(Nkind
(Id
) in N_Entity
);
3406 end Set_Is_Generic_Type
;
3408 procedure Set_Is_Hidden
(Id
: E
; V
: B
:= True) is
3413 procedure Set_Is_Hidden_Open_Scope
(Id
: E
; V
: B
:= True) is
3415 Set_Flag171
(Id
, V
);
3416 end Set_Is_Hidden_Open_Scope
;
3418 procedure Set_Is_Immediately_Visible
(Id
: E
; V
: B
:= True) is
3420 pragma Assert
(Nkind
(Id
) in N_Entity
);
3422 end Set_Is_Immediately_Visible
;
3424 procedure Set_Is_Imported
(Id
: E
; V
: B
:= True) is
3427 end Set_Is_Imported
;
3429 procedure Set_Is_Inlined
(Id
: E
; V
: B
:= True) is
3434 procedure Set_Is_Instantiated
(Id
: E
; V
: B
:= True) is
3436 Set_Flag126
(Id
, V
);
3437 end Set_Is_Instantiated
;
3439 procedure Set_Is_Internal
(Id
: E
; V
: B
:= True) is
3441 pragma Assert
(Nkind
(Id
) in N_Entity
);
3443 end Set_Is_Internal
;
3445 procedure Set_Is_Interrupt_Handler
(Id
: E
; V
: B
:= True) is
3447 pragma Assert
(Nkind
(Id
) in N_Entity
);
3449 end Set_Is_Interrupt_Handler
;
3451 procedure Set_Is_Intrinsic_Subprogram
(Id
: E
; V
: B
:= True) is
3454 end Set_Is_Intrinsic_Subprogram
;
3456 procedure Set_Is_Itype
(Id
: E
; V
: B
:= True) is
3461 procedure Set_Is_Known_Non_Null
(Id
: E
; V
: B
:= True) is
3464 end Set_Is_Known_Non_Null
;
3466 procedure Set_Is_Known_Valid
(Id
: E
; V
: B
:= True) is
3468 Set_Flag170
(Id
, V
);
3469 end Set_Is_Known_Valid
;
3471 procedure Set_Is_Limited_Composite
(Id
: E
; V
: B
:= True) is
3473 pragma Assert
(Is_Type
(Id
));
3474 Set_Flag106
(Id
, V
);
3475 end Set_Is_Limited_Composite
;
3477 procedure Set_Is_Limited_Record
(Id
: E
; V
: B
:= True) is
3480 end Set_Is_Limited_Record
;
3482 procedure Set_Is_Machine_Code_Subprogram
(Id
: E
; V
: B
:= True) is
3484 pragma Assert
(Is_Subprogram
(Id
));
3485 Set_Flag137
(Id
, V
);
3486 end Set_Is_Machine_Code_Subprogram
;
3488 procedure Set_Is_Non_Static_Subtype
(Id
: E
; V
: B
:= True) is
3490 pragma Assert
(Is_Type
(Id
));
3491 Set_Flag109
(Id
, V
);
3492 end Set_Is_Non_Static_Subtype
;
3494 procedure Set_Is_Null_Init_Proc
(Id
: E
; V
: B
:= True) is
3496 pragma Assert
(Ekind
(Id
) = E_Procedure
);
3497 Set_Flag178
(Id
, V
);
3498 end Set_Is_Null_Init_Proc
;
3500 procedure Set_Is_Optional_Parameter
(Id
: E
; V
: B
:= True) is
3502 pragma Assert
(Is_Formal
(Id
));
3503 Set_Flag134
(Id
, V
);
3504 end Set_Is_Optional_Parameter
;
3506 procedure Set_Is_Overriding_Operation
(Id
: E
; V
: B
:= True) is
3508 pragma Assert
(Is_Subprogram
(Id
));
3510 end Set_Is_Overriding_Operation
;
3512 procedure Set_Is_Package_Body_Entity
(Id
: E
; V
: B
:= True) is
3514 Set_Flag160
(Id
, V
);
3515 end Set_Is_Package_Body_Entity
;
3517 procedure Set_Is_Packed
(Id
: E
; V
: B
:= True) is
3519 pragma Assert
(Base_Type
(Id
) = Id
);
3523 procedure Set_Is_Packed_Array_Type
(Id
: E
; V
: B
:= True) is
3525 Set_Flag138
(Id
, V
);
3526 end Set_Is_Packed_Array_Type
;
3528 procedure Set_Is_Potentially_Use_Visible
(Id
: E
; V
: B
:= True) is
3530 pragma Assert
(Nkind
(Id
) in N_Entity
);
3532 end Set_Is_Potentially_Use_Visible
;
3534 procedure Set_Is_Preelaborated
(Id
: E
; V
: B
:= True) is
3537 end Set_Is_Preelaborated
;
3539 procedure Set_Is_Private_Composite
(Id
: E
; V
: B
:= True) is
3541 pragma Assert
(Is_Type
(Id
));
3542 Set_Flag107
(Id
, V
);
3543 end Set_Is_Private_Composite
;
3545 procedure Set_Is_Private_Descendant
(Id
: E
; V
: B
:= True) is
3548 end Set_Is_Private_Descendant
;
3550 procedure Set_Is_Psected
(Id
: E
; V
: B
:= True) is
3552 Set_Flag153
(Id
, V
);
3555 procedure Set_Is_Public
(Id
: E
; V
: B
:= True) is
3557 pragma Assert
(Nkind
(Id
) in N_Entity
);
3561 procedure Set_Is_Pure
(Id
: E
; V
: B
:= True) is
3566 procedure Set_Is_Remote_Call_Interface
(Id
: E
; V
: B
:= True) is
3569 end Set_Is_Remote_Call_Interface
;
3571 procedure Set_Is_Remote_Types
(Id
: E
; V
: B
:= True) is
3574 end Set_Is_Remote_Types
;
3576 procedure Set_Is_Renaming_Of_Object
(Id
: E
; V
: B
:= True) is
3578 Set_Flag112
(Id
, V
);
3579 end Set_Is_Renaming_Of_Object
;
3581 procedure Set_Is_Shared_Passive
(Id
: E
; V
: B
:= True) is
3584 end Set_Is_Shared_Passive
;
3586 procedure Set_Is_Statically_Allocated
(Id
: E
; V
: B
:= True) is
3589 (Ekind
(Id
) = E_Exception
3590 or else Ekind
(Id
) = E_Variable
3591 or else Ekind
(Id
) = E_Constant
3592 or else Is_Type
(Id
)
3593 or else Ekind
(Id
) = E_Void
);
3595 end Set_Is_Statically_Allocated
;
3597 procedure Set_Is_Tag
(Id
: E
; V
: B
:= True) is
3599 pragma Assert
(Nkind
(Id
) in N_Entity
);
3603 procedure Set_Is_Tagged_Type
(Id
: E
; V
: B
:= True) is
3606 end Set_Is_Tagged_Type
;
3608 procedure Set_Is_Thread_Body
(Id
: E
; V
: B
:= True) is
3611 end Set_Is_Thread_Body
;
3613 procedure Set_Is_True_Constant
(Id
: E
; V
: B
:= True) is
3615 Set_Flag163
(Id
, V
);
3616 end Set_Is_True_Constant
;
3618 procedure Set_Is_Unchecked_Union
(Id
: E
; V
: B
:= True) is
3620 pragma Assert
(Base_Type
(Id
) = Id
);
3621 Set_Flag117
(Id
, V
);
3622 end Set_Is_Unchecked_Union
;
3624 procedure Set_Is_Unsigned_Type
(Id
: E
; V
: B
:= True) is
3626 pragma Assert
(Is_Discrete_Or_Fixed_Point_Type
(Id
));
3627 Set_Flag144
(Id
, V
);
3628 end Set_Is_Unsigned_Type
;
3630 procedure Set_Is_Valued_Procedure
(Id
: E
; V
: B
:= True) is
3632 pragma Assert
(Ekind
(Id
) = E_Procedure
);
3633 Set_Flag127
(Id
, V
);
3634 end Set_Is_Valued_Procedure
;
3636 procedure Set_Is_Visible_Child_Unit
(Id
: E
; V
: B
:= True) is
3638 pragma Assert
(Is_Child_Unit
(Id
));
3639 Set_Flag116
(Id
, V
);
3640 end Set_Is_Visible_Child_Unit
;
3642 procedure Set_Is_VMS_Exception
(Id
: E
; V
: B
:= True) is
3644 pragma Assert
(Ekind
(Id
) = E_Exception
);
3645 Set_Flag133
(Id
, V
);
3646 end Set_Is_VMS_Exception
;
3648 procedure Set_Is_Volatile
(Id
: E
; V
: B
:= True) is
3650 pragma Assert
(Nkind
(Id
) in N_Entity
);
3652 end Set_Is_Volatile
;
3654 procedure Set_Kill_Elaboration_Checks
(Id
: E
; V
: B
:= True) is
3657 end Set_Kill_Elaboration_Checks
;
3659 procedure Set_Kill_Range_Checks
(Id
: E
; V
: B
:= True) is
3662 end Set_Kill_Range_Checks
;
3664 procedure Set_Kill_Tag_Checks
(Id
: E
; V
: B
:= True) is
3667 end Set_Kill_Tag_Checks
;
3669 procedure Set_Last_Entity
(Id
: E
; V
: E
) is
3672 end Set_Last_Entity
;
3674 procedure Set_Limited_View
(Id
: E
; V
: E
) is
3676 pragma Assert
(Ekind
(Id
) = E_Package
);
3678 end Set_Limited_View
;
3680 procedure Set_Lit_Indexes
(Id
: E
; V
: E
) is
3682 pragma Assert
(Is_Enumeration_Type
(Id
) and then Root_Type
(Id
) = Id
);
3684 end Set_Lit_Indexes
;
3686 procedure Set_Lit_Strings
(Id
: E
; V
: E
) is
3688 pragma Assert
(Is_Enumeration_Type
(Id
) and then Root_Type
(Id
) = Id
);
3690 end Set_Lit_Strings
;
3692 procedure Set_Machine_Radix_10
(Id
: E
; V
: B
:= True) is
3694 pragma Assert
(Is_Decimal_Fixed_Point_Type
(Id
));
3696 end Set_Machine_Radix_10
;
3698 procedure Set_Master_Id
(Id
: E
; V
: E
) is
3703 procedure Set_Materialize_Entity
(Id
: E
; V
: B
:= True) is
3705 Set_Flag168
(Id
, V
);
3706 end Set_Materialize_Entity
;
3708 procedure Set_Mechanism
(Id
: E
; V
: M
) is
3710 pragma Assert
(Ekind
(Id
) = E_Function
or else Is_Formal
(Id
));
3711 Set_Uint8
(Id
, UI_From_Int
(V
));
3714 procedure Set_Modulus
(Id
: E
; V
: U
) is
3716 pragma Assert
(Ekind
(Id
) = E_Modular_Integer_Type
);
3720 procedure Set_Must_Be_On_Byte_Boundary
(Id
: E
; V
: B
:= True) is
3722 pragma Assert
(Is_Type
(Id
));
3723 Set_Flag183
(Id
, V
);
3724 end Set_Must_Be_On_Byte_Boundary
;
3726 procedure Set_Needs_Debug_Info
(Id
: E
; V
: B
:= True) is
3728 Set_Flag147
(Id
, V
);
3729 end Set_Needs_Debug_Info
;
3731 procedure Set_Needs_No_Actuals
(Id
: E
; V
: B
:= True) is
3734 (Is_Overloadable
(Id
)
3735 or else Ekind
(Id
) = E_Subprogram_Type
3736 or else Ekind
(Id
) = E_Entry_Family
);
3738 end Set_Needs_No_Actuals
;
3740 procedure Set_Never_Set_In_Source
(Id
: E
; V
: B
:= True) is
3742 Set_Flag115
(Id
, V
);
3743 end Set_Never_Set_In_Source
;
3745 procedure Set_Next_Inlined_Subprogram
(Id
: E
; V
: E
) is
3748 end Set_Next_Inlined_Subprogram
;
3750 procedure Set_No_Pool_Assigned
(Id
: E
; V
: B
:= True) is
3752 pragma Assert
(Is_Access_Type
(Id
) and then Base_Type
(Id
) = Id
);
3753 Set_Flag131
(Id
, V
);
3754 end Set_No_Pool_Assigned
;
3756 procedure Set_No_Return
(Id
: E
; V
: B
:= True) is
3759 (Ekind
(Id
) = E_Procedure
or else Ekind
(Id
) = E_Generic_Procedure
);
3760 Set_Flag113
(Id
, V
);
3763 procedure Set_No_Strict_Aliasing
(Id
: E
; V
: B
:= True) is
3765 pragma Assert
(Is_Access_Type
(Id
) and then Base_Type
(Id
) = Id
);
3766 Set_Flag136
(Id
, V
);
3767 end Set_No_Strict_Aliasing
;
3769 procedure Set_Non_Binary_Modulus
(Id
: E
; V
: B
:= True) is
3771 pragma Assert
(Ekind
(Id
) = E_Modular_Integer_Type
);
3773 end Set_Non_Binary_Modulus
;
3775 procedure Set_Non_Limited_View
(Id
: E
; V
: E
) is
3776 pragma Assert
(False
3777 or else Ekind
(Id
) = E_Incomplete_Type
);
3780 end Set_Non_Limited_View
;
3782 procedure Set_Nonzero_Is_True
(Id
: E
; V
: B
:= True) is
3785 (Root_Type
(Id
) = Standard_Boolean
3786 and then Ekind
(Id
) = E_Enumeration_Type
);
3787 Set_Flag162
(Id
, V
);
3788 end Set_Nonzero_Is_True
;
3790 procedure Set_Normalized_First_Bit
(Id
: E
; V
: U
) is
3793 (Ekind
(Id
) = E_Component
or else Ekind
(Id
) = E_Discriminant
);
3795 end Set_Normalized_First_Bit
;
3797 procedure Set_Normalized_Position
(Id
: E
; V
: U
) is
3800 (Ekind
(Id
) = E_Component
or else Ekind
(Id
) = E_Discriminant
);
3802 end Set_Normalized_Position
;
3804 procedure Set_Normalized_Position_Max
(Id
: E
; V
: U
) is
3807 (Ekind
(Id
) = E_Component
or else Ekind
(Id
) = E_Discriminant
);
3809 end Set_Normalized_Position_Max
;
3811 procedure Set_Object_Ref
(Id
: E
; V
: E
) is
3813 pragma Assert
(Ekind
(Id
) = E_Protected_Body
);
3817 procedure Set_Original_Access_Type
(Id
: E
; V
: E
) is
3820 (Ekind
(Id
) = E_Access_Subprogram_Type
3821 or else Ekind
(Id
) = E_Access_Protected_Subprogram_Type
);
3823 end Set_Original_Access_Type
;
3825 procedure Set_Original_Array_Type
(Id
: E
; V
: E
) is
3827 pragma Assert
(Is_Array_Type
(Id
) or else Is_Modular_Integer_Type
(Id
));
3829 end Set_Original_Array_Type
;
3831 procedure Set_Original_Record_Component
(Id
: E
; V
: E
) is
3834 (Ekind
(Id
) = E_Void
3835 or else Ekind
(Id
) = E_Component
3836 or else Ekind
(Id
) = E_Discriminant
);
3838 end Set_Original_Record_Component
;
3840 procedure Set_Packed_Array_Type
(Id
: E
; V
: E
) is
3842 pragma Assert
(Is_Array_Type
(Id
));
3844 end Set_Packed_Array_Type
;
3846 procedure Set_Parent_Subtype
(Id
: E
; V
: E
) is
3848 pragma Assert
(Ekind
(Id
) = E_Record_Type
);
3850 end Set_Parent_Subtype
;
3852 procedure Set_Primitive_Operations
(Id
: E
; V
: L
) is
3854 pragma Assert
(Is_Tagged_Type
(Id
));
3855 Set_Elist15
(Id
, V
);
3856 end Set_Primitive_Operations
;
3858 procedure Set_Prival
(Id
: E
; V
: E
) is
3860 pragma Assert
(Is_Protected_Private
(Id
));
3864 procedure Set_Privals_Chain
(Id
: E
; V
: L
) is
3866 pragma Assert
(Is_Overloadable
(Id
)
3867 or else Ekind
(Id
) = E_Entry_Family
);
3868 Set_Elist23
(Id
, V
);
3869 end Set_Privals_Chain
;
3871 procedure Set_Private_Dependents
(Id
: E
; V
: L
) is
3873 pragma Assert
(Is_Incomplete_Or_Private_Type
(Id
));
3874 Set_Elist18
(Id
, V
);
3875 end Set_Private_Dependents
;
3877 procedure Set_Private_View
(Id
: E
; V
: N
) is
3879 pragma Assert
(Is_Private_Type
(Id
));
3881 end Set_Private_View
;
3883 procedure Set_Protected_Body_Subprogram
(Id
: E
; V
: E
) is
3885 pragma Assert
(Is_Subprogram
(Id
) or else Is_Entry
(Id
));
3887 end Set_Protected_Body_Subprogram
;
3889 procedure Set_Protected_Formal
(Id
: E
; V
: E
) is
3891 pragma Assert
(Is_Formal
(Id
));
3893 end Set_Protected_Formal
;
3895 procedure Set_Protected_Operation
(Id
: E
; V
: N
) is
3897 pragma Assert
(Is_Protected_Private
(Id
));
3899 end Set_Protected_Operation
;
3901 procedure Set_Reachable
(Id
: E
; V
: B
:= True) is
3906 procedure Set_Referenced
(Id
: E
; V
: B
:= True) is
3908 Set_Flag156
(Id
, V
);
3911 procedure Set_Referenced_As_LHS
(Id
: E
; V
: B
:= True) is
3914 end Set_Referenced_As_LHS
;
3916 procedure Set_Referenced_Object
(Id
: E
; V
: N
) is
3918 pragma Assert
(Is_Type
(Id
));
3920 end Set_Referenced_Object
;
3922 procedure Set_Register_Exception_Call
(Id
: E
; V
: N
) is
3924 pragma Assert
(Ekind
(Id
) = E_Exception
);
3926 end Set_Register_Exception_Call
;
3928 procedure Set_Related_Array_Object
(Id
: E
; V
: E
) is
3930 pragma Assert
(Is_Array_Type
(Id
));
3932 end Set_Related_Array_Object
;
3934 procedure Set_Related_Instance
(Id
: E
; V
: E
) is
3937 (Ekind
(Id
) = E_Package
or else Ekind
(Id
) = E_Package_Body
);
3939 end Set_Related_Instance
;
3941 procedure Set_Renamed_Entity
(Id
: E
; V
: N
) is
3944 end Set_Renamed_Entity
;
3946 procedure Set_Renamed_Object
(Id
: E
; V
: N
) is
3949 end Set_Renamed_Object
;
3951 procedure Set_Renaming_Map
(Id
: E
; V
: U
) is
3954 end Set_Renaming_Map
;
3956 procedure Set_Return_Present
(Id
: E
; V
: B
:= True) is
3959 end Set_Return_Present
;
3961 procedure Set_Returns_By_Ref
(Id
: E
; V
: B
:= True) is
3964 end Set_Returns_By_Ref
;
3966 procedure Set_Reverse_Bit_Order
(Id
: E
; V
: B
:= True) is
3969 (Is_Record_Type
(Id
) and then Id
= Base_Type
(Id
));
3970 Set_Flag164
(Id
, V
);
3971 end Set_Reverse_Bit_Order
;
3973 procedure Set_RM_Size
(Id
: E
; V
: U
) is
3975 pragma Assert
(Is_Type
(Id
));
3979 procedure Set_Scalar_Range
(Id
: E
; V
: N
) is
3982 end Set_Scalar_Range
;
3984 procedure Set_Scale_Value
(Id
: E
; V
: U
) is
3987 end Set_Scale_Value
;
3989 procedure Set_Scope_Depth_Value
(Id
: E
; V
: U
) is
3991 pragma Assert
(not Is_Record_Type
(Id
));
3993 end Set_Scope_Depth_Value
;
3995 procedure Set_Sec_Stack_Needed_For_Return
(Id
: E
; V
: B
:= True) is
3997 Set_Flag167
(Id
, V
);
3998 end Set_Sec_Stack_Needed_For_Return
;
4000 procedure Set_Shadow_Entities
(Id
: E
; V
: S
) is
4003 (Ekind
(Id
) = E_Package
or else Ekind
(Id
) = E_Generic_Package
);
4005 end Set_Shadow_Entities
;
4007 procedure Set_Shared_Var_Assign_Proc
(Id
: E
; V
: E
) is
4009 pragma Assert
(Ekind
(Id
) = E_Variable
);
4011 end Set_Shared_Var_Assign_Proc
;
4013 procedure Set_Shared_Var_Read_Proc
(Id
: E
; V
: E
) is
4015 pragma Assert
(Ekind
(Id
) = E_Variable
);
4017 end Set_Shared_Var_Read_Proc
;
4019 procedure Set_Size_Check_Code
(Id
: E
; V
: N
) is
4021 pragma Assert
(Ekind
(Id
) = E_Constant
or else Ekind
(Id
) = E_Variable
);
4023 end Set_Size_Check_Code
;
4025 procedure Set_Size_Depends_On_Discriminant
(Id
: E
; V
: B
:= True) is
4027 Set_Flag177
(Id
, V
);
4028 end Set_Size_Depends_On_Discriminant
;
4030 procedure Set_Size_Known_At_Compile_Time
(Id
: E
; V
: B
:= True) is
4033 end Set_Size_Known_At_Compile_Time
;
4035 procedure Set_Small_Value
(Id
: E
; V
: R
) is
4037 pragma Assert
(Is_Fixed_Point_Type
(Id
));
4038 Set_Ureal21
(Id
, V
);
4039 end Set_Small_Value
;
4041 procedure Set_Spec_Entity
(Id
: E
; V
: E
) is
4043 pragma Assert
(Ekind
(Id
) = E_Package_Body
or else Is_Formal
(Id
));
4045 end Set_Spec_Entity
;
4047 procedure Set_Storage_Size_Variable
(Id
: E
; V
: E
) is
4049 pragma Assert
(Is_Access_Type
(Id
) or else Is_Task_Type
(Id
));
4050 pragma Assert
(Base_Type
(Id
) = Id
);
4052 end Set_Storage_Size_Variable
;
4054 procedure Set_Stored_Constraint
(Id
: E
; V
: L
) is
4056 pragma Assert
(Nkind
(Id
) in N_Entity
);
4057 Set_Elist23
(Id
, V
);
4058 end Set_Stored_Constraint
;
4060 procedure Set_Strict_Alignment
(Id
: E
; V
: B
:= True) is
4062 pragma Assert
(Base_Type
(Id
) = Id
);
4063 Set_Flag145
(Id
, V
);
4064 end Set_Strict_Alignment
;
4066 procedure Set_String_Literal_Length
(Id
: E
; V
: U
) is
4068 pragma Assert
(Ekind
(Id
) = E_String_Literal_Subtype
);
4070 end Set_String_Literal_Length
;
4072 procedure Set_String_Literal_Low_Bound
(Id
: E
; V
: N
) is
4074 pragma Assert
(Ekind
(Id
) = E_String_Literal_Subtype
);
4076 end Set_String_Literal_Low_Bound
;
4078 procedure Set_Suppress_Elaboration_Warnings
(Id
: E
; V
: B
:= True) is
4080 Set_Flag148
(Id
, V
);
4081 end Set_Suppress_Elaboration_Warnings
;
4083 procedure Set_Suppress_Init_Proc
(Id
: E
; V
: B
:= True) is
4085 pragma Assert
(Id
= Base_Type
(Id
));
4086 Set_Flag105
(Id
, V
);
4087 end Set_Suppress_Init_Proc
;
4089 procedure Set_Suppress_Style_Checks
(Id
: E
; V
: B
:= True) is
4091 Set_Flag165
(Id
, V
);
4092 end Set_Suppress_Style_Checks
;
4094 procedure Set_Treat_As_Volatile
(Id
: E
; V
: B
:= True) is
4097 end Set_Treat_As_Volatile
;
4099 procedure Set_Underlying_Full_View
(Id
: E
; V
: E
) is
4101 pragma Assert
(Ekind
(Id
) in Private_Kind
);
4103 end Set_Underlying_Full_View
;
4105 procedure Set_Unset_Reference
(Id
: E
; V
: N
) is
4108 end Set_Unset_Reference
;
4110 procedure Set_Uses_Sec_Stack
(Id
: E
; V
: B
:= True) is
4113 end Set_Uses_Sec_Stack
;
4115 procedure Set_Vax_Float
(Id
: E
; V
: B
:= True) is
4117 pragma Assert
(Id
= Base_Type
(Id
));
4118 Set_Flag151
(Id
, V
);
4121 procedure Set_Warnings_Off
(Id
: E
; V
: B
:= True) is
4124 end Set_Warnings_Off
;
4126 -----------------------------------
4127 -- Field Initialization Routines --
4128 -----------------------------------
4130 procedure Init_Alignment
(Id
: E
) is
4132 Set_Uint14
(Id
, Uint_0
);
4135 procedure Init_Alignment
(Id
: E
; V
: Int
) is
4137 Set_Uint14
(Id
, UI_From_Int
(V
));
4140 procedure Init_Component_Bit_Offset
(Id
: E
) is
4142 Set_Uint11
(Id
, No_Uint
);
4143 end Init_Component_Bit_Offset
;
4145 procedure Init_Component_Bit_Offset
(Id
: E
; V
: Int
) is
4147 Set_Uint11
(Id
, UI_From_Int
(V
));
4148 end Init_Component_Bit_Offset
;
4150 procedure Init_Component_Size
(Id
: E
) is
4152 Set_Uint22
(Id
, Uint_0
);
4153 end Init_Component_Size
;
4155 procedure Init_Component_Size
(Id
: E
; V
: Int
) is
4157 Set_Uint22
(Id
, UI_From_Int
(V
));
4158 end Init_Component_Size
;
4160 procedure Init_Digits_Value
(Id
: E
) is
4162 Set_Uint17
(Id
, Uint_0
);
4163 end Init_Digits_Value
;
4165 procedure Init_Digits_Value
(Id
: E
; V
: Int
) is
4167 Set_Uint17
(Id
, UI_From_Int
(V
));
4168 end Init_Digits_Value
;
4170 procedure Init_Esize
(Id
: E
) is
4172 Set_Uint12
(Id
, Uint_0
);
4175 procedure Init_Esize
(Id
: E
; V
: Int
) is
4177 Set_Uint12
(Id
, UI_From_Int
(V
));
4180 procedure Init_Normalized_First_Bit
(Id
: E
) is
4182 Set_Uint8
(Id
, No_Uint
);
4183 end Init_Normalized_First_Bit
;
4185 procedure Init_Normalized_First_Bit
(Id
: E
; V
: Int
) is
4187 Set_Uint8
(Id
, UI_From_Int
(V
));
4188 end Init_Normalized_First_Bit
;
4190 procedure Init_Normalized_Position
(Id
: E
) is
4192 Set_Uint14
(Id
, No_Uint
);
4193 end Init_Normalized_Position
;
4195 procedure Init_Normalized_Position
(Id
: E
; V
: Int
) is
4197 Set_Uint14
(Id
, UI_From_Int
(V
));
4198 end Init_Normalized_Position
;
4200 procedure Init_Normalized_Position_Max
(Id
: E
) is
4202 Set_Uint10
(Id
, No_Uint
);
4203 end Init_Normalized_Position_Max
;
4205 procedure Init_Normalized_Position_Max
(Id
: E
; V
: Int
) is
4207 Set_Uint10
(Id
, UI_From_Int
(V
));
4208 end Init_Normalized_Position_Max
;
4210 procedure Init_RM_Size
(Id
: E
) is
4212 Set_Uint13
(Id
, Uint_0
);
4215 procedure Init_RM_Size
(Id
: E
; V
: Int
) is
4217 Set_Uint13
(Id
, UI_From_Int
(V
));
4220 -----------------------------
4221 -- Init_Component_Location --
4222 -----------------------------
4224 procedure Init_Component_Location
(Id
: E
) is
4226 Set_Uint8
(Id
, No_Uint
); -- Normalized_First_Bit
4227 Set_Uint10
(Id
, No_Uint
); -- Normalized_Position_Max
4228 Set_Uint11
(Id
, No_Uint
); -- Component_First_Bit
4229 Set_Uint12
(Id
, Uint_0
); -- Esize
4230 Set_Uint14
(Id
, No_Uint
); -- Normalized_Position
4231 end Init_Component_Location
;
4237 procedure Init_Size
(Id
: E
; V
: Int
) is
4239 Set_Uint12
(Id
, UI_From_Int
(V
)); -- Esize
4240 Set_Uint13
(Id
, UI_From_Int
(V
)); -- RM_Size
4243 ---------------------
4244 -- Init_Size_Align --
4245 ---------------------
4247 procedure Init_Size_Align
(Id
: E
) is
4249 Set_Uint12
(Id
, Uint_0
); -- Esize
4250 Set_Uint13
(Id
, Uint_0
); -- RM_Size
4251 Set_Uint14
(Id
, Uint_0
); -- Alignment
4252 end Init_Size_Align
;
4254 ----------------------------------------------
4255 -- Type Representation Attribute Predicates --
4256 ----------------------------------------------
4258 function Known_Alignment
(E
: Entity_Id
) return B
is
4260 return Uint14
(E
) /= Uint_0
4261 and then Uint14
(E
) /= No_Uint
;
4262 end Known_Alignment
;
4264 function Known_Component_Bit_Offset
(E
: Entity_Id
) return B
is
4266 return Uint11
(E
) /= No_Uint
;
4267 end Known_Component_Bit_Offset
;
4269 function Known_Component_Size
(E
: Entity_Id
) return B
is
4271 return Uint22
(Base_Type
(E
)) /= Uint_0
4272 and then Uint22
(Base_Type
(E
)) /= No_Uint
;
4273 end Known_Component_Size
;
4275 function Known_Esize
(E
: Entity_Id
) return B
is
4277 return Uint12
(E
) /= Uint_0
4278 and then Uint12
(E
) /= No_Uint
;
4281 function Known_Normalized_First_Bit
(E
: Entity_Id
) return B
is
4283 return Uint8
(E
) /= No_Uint
;
4284 end Known_Normalized_First_Bit
;
4286 function Known_Normalized_Position
(E
: Entity_Id
) return B
is
4288 return Uint14
(E
) /= No_Uint
;
4289 end Known_Normalized_Position
;
4291 function Known_Normalized_Position_Max
(E
: Entity_Id
) return B
is
4293 return Uint10
(E
) /= No_Uint
;
4294 end Known_Normalized_Position_Max
;
4296 function Known_RM_Size
(E
: Entity_Id
) return B
is
4298 return Uint13
(E
) /= No_Uint
4299 and then (Uint13
(E
) /= Uint_0
4300 or else Is_Discrete_Type
(E
)
4301 or else Is_Fixed_Point_Type
(E
));
4304 function Known_Static_Component_Bit_Offset
(E
: Entity_Id
) return B
is
4306 return Uint11
(E
) /= No_Uint
4307 and then Uint11
(E
) >= Uint_0
;
4308 end Known_Static_Component_Bit_Offset
;
4310 function Known_Static_Component_Size
(E
: Entity_Id
) return B
is
4312 return Uint22
(Base_Type
(E
)) > Uint_0
;
4313 end Known_Static_Component_Size
;
4315 function Known_Static_Esize
(E
: Entity_Id
) return B
is
4317 return Uint12
(E
) > Uint_0
;
4318 end Known_Static_Esize
;
4320 function Known_Static_Normalized_First_Bit
(E
: Entity_Id
) return B
is
4322 return Uint8
(E
) /= No_Uint
4323 and then Uint8
(E
) >= Uint_0
;
4324 end Known_Static_Normalized_First_Bit
;
4326 function Known_Static_Normalized_Position
(E
: Entity_Id
) return B
is
4328 return Uint14
(E
) /= No_Uint
4329 and then Uint14
(E
) >= Uint_0
;
4330 end Known_Static_Normalized_Position
;
4332 function Known_Static_Normalized_Position_Max
(E
: Entity_Id
) return B
is
4334 return Uint10
(E
) /= No_Uint
4335 and then Uint10
(E
) >= Uint_0
;
4336 end Known_Static_Normalized_Position_Max
;
4338 function Known_Static_RM_Size
(E
: Entity_Id
) return B
is
4340 return Uint13
(E
) > Uint_0
4341 or else Is_Discrete_Type
(E
)
4342 or else Is_Fixed_Point_Type
(E
);
4343 end Known_Static_RM_Size
;
4345 function Unknown_Alignment
(E
: Entity_Id
) return B
is
4347 return Uint14
(E
) = Uint_0
4348 or else Uint14
(E
) = No_Uint
;
4349 end Unknown_Alignment
;
4351 function Unknown_Component_Bit_Offset
(E
: Entity_Id
) return B
is
4353 return Uint11
(E
) = No_Uint
;
4354 end Unknown_Component_Bit_Offset
;
4356 function Unknown_Component_Size
(E
: Entity_Id
) return B
is
4358 return Uint22
(Base_Type
(E
)) = Uint_0
4360 Uint22
(Base_Type
(E
)) = No_Uint
;
4361 end Unknown_Component_Size
;
4363 function Unknown_Esize
(E
: Entity_Id
) return B
is
4365 return Uint12
(E
) = No_Uint
4367 Uint12
(E
) = Uint_0
;
4370 function Unknown_Normalized_First_Bit
(E
: Entity_Id
) return B
is
4372 return Uint8
(E
) = No_Uint
;
4373 end Unknown_Normalized_First_Bit
;
4375 function Unknown_Normalized_Position
(E
: Entity_Id
) return B
is
4377 return Uint14
(E
) = No_Uint
;
4378 end Unknown_Normalized_Position
;
4380 function Unknown_Normalized_Position_Max
(E
: Entity_Id
) return B
is
4382 return Uint10
(E
) = No_Uint
;
4383 end Unknown_Normalized_Position_Max
;
4385 function Unknown_RM_Size
(E
: Entity_Id
) return B
is
4387 return (Uint13
(E
) = Uint_0
4388 and then not Is_Discrete_Type
(E
)
4389 and then not Is_Fixed_Point_Type
(E
))
4390 or else Uint13
(E
) = No_Uint
;
4391 end Unknown_RM_Size
;
4393 --------------------
4394 -- Address_Clause --
4395 --------------------
4397 function Address_Clause
(Id
: E
) return N
is
4401 Ritem
:= First_Rep_Item
(Id
);
4402 while Present
(Ritem
) loop
4403 if Nkind
(Ritem
) = N_Attribute_Definition_Clause
4404 and then Chars
(Ritem
) = Name_Address
4408 Ritem
:= Next_Rep_Item
(Ritem
);
4415 ----------------------
4416 -- Alignment_Clause --
4417 ----------------------
4419 function Alignment_Clause
(Id
: E
) return N
is
4423 Ritem
:= First_Rep_Item
(Id
);
4424 while Present
(Ritem
) loop
4425 if Nkind
(Ritem
) = N_Attribute_Definition_Clause
4426 and then Chars
(Ritem
) = Name_Alignment
4430 Ritem
:= Next_Rep_Item
(Ritem
);
4435 end Alignment_Clause
;
4437 ----------------------
4438 -- Ancestor_Subtype --
4439 ----------------------
4441 function Ancestor_Subtype
(Id
: E
) return E
is
4443 -- If this is first subtype, or is a base type, then there is no
4444 -- ancestor subtype, so we return Empty to indicate this fact.
4446 if Is_First_Subtype
(Id
)
4447 or else Id
= Base_Type
(Id
)
4453 D
: constant Node_Id
:= Declaration_Node
(Id
);
4456 -- If we have a subtype declaration, get the ancestor subtype
4458 if Nkind
(D
) = N_Subtype_Declaration
then
4459 if Nkind
(Subtype_Indication
(D
)) = N_Subtype_Indication
then
4460 return Entity
(Subtype_Mark
(Subtype_Indication
(D
)));
4462 return Entity
(Subtype_Indication
(D
));
4465 -- If not, then no subtype indication is available
4471 end Ancestor_Subtype
;
4477 procedure Append_Entity
(Id
: Entity_Id
; V
: Entity_Id
) is
4479 if Last_Entity
(V
) = Empty
then
4480 Set_First_Entity
(V
, Id
);
4482 Set_Next_Entity
(Last_Entity
(V
), Id
);
4485 Set_Next_Entity
(Id
, Empty
);
4487 Set_Last_Entity
(V
, Id
);
4494 function Base_Type
(Id
: E
) return E
is
4497 when E_Enumeration_Subtype |
4499 E_Signed_Integer_Subtype |
4500 E_Modular_Integer_Subtype |
4501 E_Floating_Point_Subtype |
4502 E_Ordinary_Fixed_Point_Subtype |
4503 E_Decimal_Fixed_Point_Subtype |
4508 E_Record_Subtype_With_Private |
4509 E_Limited_Private_Subtype |
4511 E_Protected_Subtype |
4513 E_String_Literal_Subtype |
4514 E_Class_Wide_Subtype
=>
4522 -------------------------
4523 -- Component_Alignment --
4524 -------------------------
4526 -- Component Alignment is encoded using two flags, Flag128/129 as
4527 -- follows. Note that both flags False = Align_Default, so that the
4528 -- default initialization of flags to False initializes component
4529 -- alignment to the default value as required.
4531 -- Flag128 Flag129 Value
4532 -- ------- ------- -----
4533 -- False False Calign_Default
4534 -- False True Calign_Component_Size
4535 -- True False Calign_Component_Size_4
4536 -- True True Calign_Storage_Unit
4538 function Component_Alignment
(Id
: E
) return C
is
4539 BT
: constant Node_Id
:= Base_Type
(Id
);
4542 pragma Assert
(Is_Array_Type
(Id
) or else Is_Record_Type
(Id
));
4544 if Flag128
(BT
) then
4545 if Flag129
(BT
) then
4546 return Calign_Storage_Unit
;
4548 return Calign_Component_Size_4
;
4552 if Flag129
(BT
) then
4553 return Calign_Component_Size
;
4555 return Calign_Default
;
4558 end Component_Alignment
;
4560 --------------------
4561 -- Constant_Value --
4562 --------------------
4564 function Constant_Value
(Id
: E
) return N
is
4565 D
: constant Node_Id
:= Declaration_Node
(Id
);
4569 -- If we have no declaration node, then return no constant value.
4570 -- Not clear how this can happen, but it does sometimes ???
4571 -- To investigate, remove this check and compile discrim_po.adb.
4576 -- Normal case where a declaration node is present
4578 elsif Nkind
(D
) = N_Object_Renaming_Declaration
then
4579 return Renamed_Object
(Id
);
4581 -- If this is a component declaration whose entity is constant, it
4582 -- is a prival within a protected function. It does not have
4583 -- a constant value.
4585 elsif Nkind
(D
) = N_Component_Declaration
then
4588 -- If there is an expression, return it
4590 elsif Present
(Expression
(D
)) then
4591 return (Expression
(D
));
4593 -- For a constant, see if we have a full view
4595 elsif Ekind
(Id
) = E_Constant
4596 and then Present
(Full_View
(Id
))
4598 Full_D
:= Parent
(Full_View
(Id
));
4600 -- The full view may have been rewritten as an object renaming.
4602 if Nkind
(Full_D
) = N_Object_Renaming_Declaration
then
4603 return Name
(Full_D
);
4605 return Expression
(Full_D
);
4608 -- Otherwise we have no expression to return
4615 ----------------------
4616 -- Declaration_Node --
4617 ----------------------
4619 function Declaration_Node
(Id
: E
) return N
is
4623 if Ekind
(Id
) = E_Incomplete_Type
4624 and then Present
(Full_View
(Id
))
4626 P
:= Parent
(Full_View
(Id
));
4632 if Nkind
(P
) /= N_Selected_Component
4633 and then Nkind
(P
) /= N_Expanded_Name
4635 not (Nkind
(P
) = N_Defining_Program_Unit_Name
4636 and then Is_Child_Unit
(Id
))
4644 end Declaration_Node
;
4646 ---------------------
4647 -- Designated_Type --
4648 ---------------------
4650 function Designated_Type
(Id
: E
) return E
is
4654 Desig_Type
:= Directly_Designated_Type
(Id
);
4656 if Ekind
(Desig_Type
) = E_Incomplete_Type
4657 and then Present
(Full_View
(Desig_Type
))
4659 return Full_View
(Desig_Type
);
4661 elsif Is_Class_Wide_Type
(Desig_Type
)
4662 and then Ekind
(Etype
(Desig_Type
)) = E_Incomplete_Type
4663 and then Present
(Full_View
(Etype
(Desig_Type
)))
4664 and then Present
(Class_Wide_Type
(Full_View
(Etype
(Desig_Type
))))
4666 return Class_Wide_Type
(Full_View
(Etype
(Desig_Type
)));
4671 end Designated_Type
;
4673 -----------------------------
4674 -- Enclosing_Dynamic_Scope --
4675 -----------------------------
4677 function Enclosing_Dynamic_Scope
(Id
: E
) return E
is
4681 -- The following test is an error defense against some syntax
4682 -- errors that can leave scopes very messed up.
4684 if Id
= Standard_Standard
then
4688 -- Normal case, search enclosing scopes
4691 while S
/= Standard_Standard
4692 and then not Is_Dynamic_Scope
(S
)
4698 end Enclosing_Dynamic_Scope
;
4700 ----------------------
4701 -- Entry_Index_Type --
4702 ----------------------
4704 function Entry_Index_Type
(Id
: E
) return N
is
4706 pragma Assert
(Ekind
(Id
) = E_Entry_Family
);
4707 return Etype
(Discrete_Subtype_Definition
(Parent
(Id
)));
4708 end Entry_Index_Type
;
4710 ---------------------
4712 ---------------------
4714 function First_Component
(Id
: E
) return E
is
4719 (Is_Record_Type
(Id
) or else Is_Incomplete_Or_Private_Type
(Id
));
4721 Comp_Id
:= First_Entity
(Id
);
4722 while Present
(Comp_Id
) loop
4723 exit when Ekind
(Comp_Id
) = E_Component
;
4724 Comp_Id
:= Next_Entity
(Comp_Id
);
4728 end First_Component
;
4730 ------------------------
4731 -- First_Discriminant --
4732 ------------------------
4734 function First_Discriminant
(Id
: E
) return E
is
4739 (Has_Discriminants
(Id
)
4740 or else Has_Unknown_Discriminants
(Id
));
4742 Ent
:= First_Entity
(Id
);
4744 -- The discriminants are not necessarily contiguous, because access
4745 -- discriminants will generate itypes. They are not the first entities
4746 -- either, because tag and controller record must be ahead of them.
4748 if Chars
(Ent
) = Name_uTag
then
4749 Ent
:= Next_Entity
(Ent
);
4752 if Chars
(Ent
) = Name_uController
then
4753 Ent
:= Next_Entity
(Ent
);
4756 -- Skip all hidden stored discriminants if any.
4758 while Present
(Ent
) loop
4759 exit when Ekind
(Ent
) = E_Discriminant
4760 and then not Is_Completely_Hidden
(Ent
);
4762 Ent
:= Next_Entity
(Ent
);
4765 pragma Assert
(Ekind
(Ent
) = E_Discriminant
);
4768 end First_Discriminant
;
4774 function First_Formal
(Id
: E
) return E
is
4779 (Is_Overloadable
(Id
)
4780 or else Ekind
(Id
) = E_Entry_Family
4781 or else Ekind
(Id
) = E_Subprogram_Body
4782 or else Ekind
(Id
) = E_Subprogram_Type
);
4784 if Ekind
(Id
) = E_Enumeration_Literal
then
4788 Formal
:= First_Entity
(Id
);
4790 if Present
(Formal
) and then Is_Formal
(Formal
) then
4798 -------------------------------
4799 -- First_Stored_Discriminant --
4800 -------------------------------
4802 function First_Stored_Discriminant
(Id
: E
) return E
is
4805 function Has_Completely_Hidden_Discriminant
(Id
: E
) return Boolean;
4806 -- Scans the Discriminants to see whether any are Completely_Hidden
4807 -- (the mechanism for describing non-specified stored discriminants)
4809 function Has_Completely_Hidden_Discriminant
(Id
: E
) return Boolean is
4810 Ent
: Entity_Id
:= Id
;
4813 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
4815 while Present
(Ent
) and then Ekind
(Ent
) = E_Discriminant
loop
4817 if Is_Completely_Hidden
(Ent
) then
4821 Ent
:= Next_Entity
(Ent
);
4825 end Has_Completely_Hidden_Discriminant
;
4827 -- Start of processing for First_Stored_Discriminant
4831 (Has_Discriminants
(Id
)
4832 or else Has_Unknown_Discriminants
(Id
));
4834 Ent
:= First_Entity
(Id
);
4836 if Chars
(Ent
) = Name_uTag
then
4837 Ent
:= Next_Entity
(Ent
);
4840 if Chars
(Ent
) = Name_uController
then
4841 Ent
:= Next_Entity
(Ent
);
4844 if Has_Completely_Hidden_Discriminant
(Ent
) then
4846 while Present
(Ent
) loop
4847 exit when Is_Completely_Hidden
(Ent
);
4848 Ent
:= Next_Entity
(Ent
);
4853 pragma Assert
(Ekind
(Ent
) = E_Discriminant
);
4856 end First_Stored_Discriminant
;
4862 function First_Subtype
(Id
: E
) return E
is
4863 B
: constant Entity_Id
:= Base_Type
(Id
);
4864 F
: constant Node_Id
:= Freeze_Node
(B
);
4868 -- If the base type has no freeze node, it is a type in standard,
4869 -- and always acts as its own first subtype unless it is one of
4870 -- the predefined integer types. If the type is formal, it is also
4871 -- a first subtype, and its base type has no freeze node. On the other
4872 -- hand, a subtype of a generic formal is not its own first_subtype.
4873 -- Its base type, if anonymous, is attached to the formal type decl.
4874 -- from which the first subtype is obtained.
4878 if B
= Base_Type
(Standard_Integer
) then
4879 return Standard_Integer
;
4881 elsif B
= Base_Type
(Standard_Long_Integer
) then
4882 return Standard_Long_Integer
;
4884 elsif B
= Base_Type
(Standard_Short_Short_Integer
) then
4885 return Standard_Short_Short_Integer
;
4887 elsif B
= Base_Type
(Standard_Short_Integer
) then
4888 return Standard_Short_Integer
;
4890 elsif B
= Base_Type
(Standard_Long_Long_Integer
) then
4891 return Standard_Long_Long_Integer
;
4893 elsif Is_Generic_Type
(Id
) then
4894 if Present
(Parent
(B
)) then
4895 return Defining_Identifier
(Parent
(B
));
4897 return Defining_Identifier
(Associated_Node_For_Itype
(B
));
4904 -- Otherwise we check the freeze node, if it has a First_Subtype_Link
4905 -- then we use that link, otherwise (happens with some Itypes), we use
4906 -- the base type itself.
4909 Ent
:= First_Subtype_Link
(F
);
4911 if Present
(Ent
) then
4919 -------------------------------------
4920 -- Get_Attribute_Definition_Clause --
4921 -------------------------------------
4923 function Get_Attribute_Definition_Clause
4931 N
:= First_Rep_Item
(E
);
4932 while Present
(N
) loop
4933 if Nkind
(N
) = N_Attribute_Definition_Clause
4934 and then Get_Attribute_Id
(Chars
(N
)) = Id
4943 end Get_Attribute_Definition_Clause
;
4945 --------------------
4946 -- Get_Rep_Pragma --
4947 --------------------
4949 function Get_Rep_Pragma
(E
: Entity_Id
; Nam
: Name_Id
) return Node_Id
is
4954 N
:= First_Rep_Item
(E
);
4956 while Present
(N
) loop
4957 if Nkind
(N
) = N_Pragma
and then Chars
(N
) = Nam
then
4959 if Nam
= Name_Stream_Convert
then
4961 -- For tagged types this pragma is not inherited, so we
4962 -- must verify that it is defined for the given type and
4965 Typ
:= Entity
(Expression
4966 (First
(Pragma_Argument_Associations
(N
))));
4968 if not Is_Tagged_Type
(E
)
4970 or else (Is_Private_Type
(Typ
)
4971 and then E
= Full_View
(Typ
))
4989 ------------------------
4990 -- Has_Attach_Handler --
4991 ------------------------
4993 function Has_Attach_Handler
(Id
: E
) return B
is
4997 pragma Assert
(Is_Protected_Type
(Id
));
4999 Ritem
:= First_Rep_Item
(Id
);
5000 while Present
(Ritem
) loop
5001 if Nkind
(Ritem
) = N_Pragma
5002 and then Chars
(Ritem
) = Name_Attach_Handler
5006 Ritem
:= Next_Rep_Item
(Ritem
);
5011 end Has_Attach_Handler
;
5017 function Has_Entries
(Id
: E
) return B
is
5018 Result
: Boolean := False;
5022 pragma Assert
(Is_Concurrent_Type
(Id
));
5023 Ent
:= First_Entity
(Id
);
5025 while Present
(Ent
) loop
5026 if Is_Entry
(Ent
) then
5031 Ent
:= Next_Entity
(Ent
);
5037 ----------------------------
5038 -- Has_Foreign_Convention --
5039 ----------------------------
5041 function Has_Foreign_Convention
(Id
: E
) return B
is
5043 return Convention
(Id
) >= Foreign_Convention
'First;
5044 end Has_Foreign_Convention
;
5046 ---------------------------
5047 -- Has_Interrupt_Handler --
5048 ---------------------------
5050 function Has_Interrupt_Handler
(Id
: E
) return B
is
5054 pragma Assert
(Is_Protected_Type
(Id
));
5056 Ritem
:= First_Rep_Item
(Id
);
5057 while Present
(Ritem
) loop
5058 if Nkind
(Ritem
) = N_Pragma
5059 and then Chars
(Ritem
) = Name_Interrupt_Handler
5063 Ritem
:= Next_Rep_Item
(Ritem
);
5068 end Has_Interrupt_Handler
;
5070 --------------------------
5071 -- Has_Private_Ancestor --
5072 --------------------------
5074 function Has_Private_Ancestor
(Id
: E
) return B
is
5075 R
: constant Entity_Id
:= Root_Type
(Id
);
5076 T1
: Entity_Id
:= Id
;
5080 if Is_Private_Type
(T1
) then
5090 end Has_Private_Ancestor
;
5092 ------------------------------
5093 -- Implementation_Base_Type --
5094 ------------------------------
5096 function Implementation_Base_Type
(Id
: E
) return E
is
5101 Bastyp
:= Base_Type
(Id
);
5103 if Is_Incomplete_Or_Private_Type
(Bastyp
) then
5104 Imptyp
:= Underlying_Type
(Bastyp
);
5106 -- If we have an implementation type, then just return it,
5107 -- otherwise we return the Base_Type anyway. This can only
5108 -- happen in error situations and should avoid some error bombs.
5110 if Present
(Imptyp
) then
5111 return Base_Type
(Imptyp
);
5119 end Implementation_Base_Type
;
5121 -----------------------
5122 -- Is_Always_Inlined --
5123 -----------------------
5125 function Is_Always_Inlined
(Id
: E
) return B
is
5129 Item
:= First_Rep_Item
(Id
);
5131 while Present
(Item
) loop
5132 if Nkind
(Item
) = N_Pragma
5133 and then Get_Pragma_Id
(Chars
(Item
)) = Pragma_Inline_Always
5138 Next_Rep_Item
(Item
);
5142 end Is_Always_Inlined
;
5144 ---------------------
5145 -- Is_Boolean_Type --
5146 ---------------------
5148 function Is_Boolean_Type
(Id
: E
) return B
is
5150 return Root_Type
(Id
) = Standard_Boolean
;
5151 end Is_Boolean_Type
;
5153 ---------------------
5154 -- Is_By_Copy_Type --
5155 ---------------------
5157 function Is_By_Copy_Type
(Id
: E
) return B
is
5159 -- If Id is a private type whose full declaration has not been seen,
5160 -- we assume for now that it is not a By_Copy type. Clearly this
5161 -- attribute should not be used before the type is frozen, but it is
5162 -- needed to build the associated record of a protected type. Another
5163 -- place where some lookahead for a full view is needed ???
5166 Is_Elementary_Type
(Id
)
5167 or else (Is_Private_Type
(Id
)
5168 and then Present
(Underlying_Type
(Id
))
5169 and then Is_Elementary_Type
(Underlying_Type
(Id
)));
5170 end Is_By_Copy_Type
;
5172 --------------------------
5173 -- Is_By_Reference_Type --
5174 --------------------------
5176 function Is_By_Reference_Type
(Id
: E
) return B
is
5177 Btype
: constant Entity_Id
:= Base_Type
(Id
);
5180 if Error_Posted
(Id
)
5181 or else Error_Posted
(Btype
)
5185 elsif Is_Private_Type
(Btype
) then
5187 Utyp
: constant Entity_Id
:= Underlying_Type
(Btype
);
5193 return Is_By_Reference_Type
(Utyp
);
5197 elsif Is_Concurrent_Type
(Btype
) then
5200 elsif Is_Record_Type
(Btype
) then
5201 if Is_Limited_Record
(Btype
)
5202 or else Is_Tagged_Type
(Btype
)
5203 or else Is_Volatile
(Btype
)
5209 C
: Entity_Id
:= First_Component
(Btype
);
5212 while Present
(C
) loop
5213 if Is_By_Reference_Type
(Etype
(C
))
5214 or else Is_Volatile
(Etype
(C
))
5219 C
:= Next_Component
(C
);
5226 elsif Is_Array_Type
(Btype
) then
5229 or else Is_By_Reference_Type
(Component_Type
(Btype
))
5230 or else Is_Volatile
(Component_Type
(Btype
))
5231 or else Has_Volatile_Components
(Btype
);
5236 end Is_By_Reference_Type
;
5238 ---------------------
5239 -- Is_Derived_Type --
5240 ---------------------
5242 function Is_Derived_Type
(Id
: E
) return B
is
5246 if Base_Type
(Id
) /= Root_Type
(Id
)
5247 and then not Is_Generic_Type
(Id
)
5248 and then not Is_Class_Wide_Type
(Id
)
5250 if not Is_Numeric_Type
(Root_Type
(Id
)) then
5254 Par
:= Parent
(First_Subtype
(Id
));
5256 return Present
(Par
)
5257 and then Nkind
(Par
) = N_Full_Type_Declaration
5258 and then Nkind
(Type_Definition
(Par
))
5259 = N_Derived_Type_Definition
;
5265 end Is_Derived_Type
;
5267 ----------------------
5268 -- Is_Dynamic_Scope --
5269 ----------------------
5271 function Is_Dynamic_Scope
(Id
: E
) return B
is
5274 Ekind
(Id
) = E_Block
5276 Ekind
(Id
) = E_Function
5278 Ekind
(Id
) = E_Procedure
5280 Ekind
(Id
) = E_Subprogram_Body
5282 Ekind
(Id
) = E_Task_Type
5284 Ekind
(Id
) = E_Entry
5286 Ekind
(Id
) = E_Entry_Family
;
5287 end Is_Dynamic_Scope
;
5289 --------------------
5290 -- Is_Entity_Name --
5291 --------------------
5293 function Is_Entity_Name
(N
: Node_Id
) return Boolean is
5294 Kind
: constant Node_Kind
:= Nkind
(N
);
5297 -- Identifiers, operator symbols, expanded names are entity names
5299 return Kind
= N_Identifier
5300 or else Kind
= N_Operator_Symbol
5301 or else Kind
= N_Expanded_Name
5303 -- Attribute references are entity names if they refer to an entity.
5304 -- Note that we don't do this by testing for the presence of the
5305 -- Entity field in the N_Attribute_Reference node, since it may not
5306 -- have been set yet.
5308 or else (Kind
= N_Attribute_Reference
5309 and then Is_Entity_Attribute_Name
(Attribute_Name
(N
)));
5312 ---------------------------
5313 -- Is_Indefinite_Subtype --
5314 ---------------------------
5316 function Is_Indefinite_Subtype
(Id
: Entity_Id
) return B
is
5317 K
: constant Entity_Kind
:= Ekind
(Id
);
5320 if Is_Constrained
(Id
) then
5323 elsif K
in Array_Kind
5324 or else K
in Class_Wide_Kind
5325 or else Has_Unknown_Discriminants
(Id
)
5329 -- Known discriminants: indefinite if there are no default values
5331 elsif K
in Record_Kind
5332 or else Is_Incomplete_Or_Private_Type
(Id
)
5333 or else Is_Concurrent_Type
(Id
)
5335 return (Has_Discriminants
(Id
)
5336 and then No
(Discriminant_Default_Value
(First_Discriminant
(Id
))));
5341 end Is_Indefinite_Subtype
;
5343 ---------------------
5344 -- Is_Limited_Type --
5345 ---------------------
5347 function Is_Limited_Type
(Id
: E
) return B
is
5348 Btype
: constant E
:= Base_Type
(Id
);
5351 if not Is_Type
(Id
) then
5354 elsif Ekind
(Btype
) = E_Limited_Private_Type
5355 or else Is_Limited_Composite
(Btype
)
5359 elsif Is_Concurrent_Type
(Btype
) then
5362 -- Otherwise we will look around to see if there is some other reason
5363 -- for it to be limited, except that if an error was posted on the
5364 -- entity, then just assume it is non-limited, because it can cause
5365 -- trouble to recurse into a murky erroneous entity!
5367 elsif Error_Posted
(Id
) then
5370 elsif Is_Record_Type
(Btype
) then
5371 if Is_Limited_Record
(Root_Type
(Btype
)) then
5374 elsif Is_Class_Wide_Type
(Btype
) then
5375 return Is_Limited_Type
(Root_Type
(Btype
));
5379 C
: E
:= First_Component
(Btype
);
5382 while Present
(C
) loop
5383 if Is_Limited_Type
(Etype
(C
)) then
5387 C
:= Next_Component
(C
);
5394 elsif Is_Array_Type
(Btype
) then
5395 return Is_Limited_Type
(Component_Type
(Btype
));
5400 end Is_Limited_Type
;
5406 function Is_Package
(Id
: E
) return B
is
5409 Ekind
(Id
) = E_Package
5411 Ekind
(Id
) = E_Generic_Package
;
5414 --------------------------
5415 -- Is_Protected_Private --
5416 --------------------------
5418 function Is_Protected_Private
(Id
: E
) return B
is
5420 pragma Assert
(Ekind
(Id
) = E_Component
);
5421 return Is_Protected_Type
(Scope
(Id
));
5422 end Is_Protected_Private
;
5424 ------------------------------
5425 -- Is_Protected_Record_Type --
5426 ------------------------------
5428 function Is_Protected_Record_Type
(Id
: E
) return B
is
5431 Is_Concurrent_Record_Type
(Id
)
5432 and then Is_Protected_Type
(Corresponding_Concurrent_Type
(Id
));
5433 end Is_Protected_Record_Type
;
5435 ---------------------------------
5436 -- Is_Return_By_Reference_Type --
5437 ---------------------------------
5439 function Is_Return_By_Reference_Type
(Id
: E
) return B
is
5440 Btype
: constant Entity_Id
:= Base_Type
(Id
);
5443 if Is_Private_Type
(Btype
) then
5445 Utyp
: constant Entity_Id
:= Underlying_Type
(Btype
);
5451 return Is_Return_By_Reference_Type
(Utyp
);
5455 elsif Is_Concurrent_Type
(Btype
) then
5458 elsif Is_Record_Type
(Btype
) then
5459 if Is_Limited_Record
(Btype
) then
5462 elsif Is_Class_Wide_Type
(Btype
) then
5463 return Is_Return_By_Reference_Type
(Root_Type
(Btype
));
5467 C
: Entity_Id
:= First_Component
(Btype
);
5470 while Present
(C
) loop
5471 if Is_Return_By_Reference_Type
(Etype
(C
)) then
5475 C
:= Next_Component
(C
);
5482 elsif Is_Array_Type
(Btype
) then
5483 return Is_Return_By_Reference_Type
(Component_Type
(Btype
));
5488 end Is_Return_By_Reference_Type
;
5490 --------------------
5491 -- Is_String_Type --
5492 --------------------
5494 function Is_String_Type
(Id
: E
) return B
is
5496 return Ekind
(Id
) in String_Kind
5497 or else (Is_Array_Type
(Id
)
5498 and then Number_Dimensions
(Id
) = 1
5499 and then Is_Character_Type
(Component_Type
(Id
)));
5502 -------------------------
5503 -- Is_Task_Record_Type --
5504 -------------------------
5506 function Is_Task_Record_Type
(Id
: E
) return B
is
5509 Is_Concurrent_Record_Type
(Id
)
5510 and then Is_Task_Type
(Corresponding_Concurrent_Type
(Id
));
5511 end Is_Task_Record_Type
;
5513 ------------------------
5514 -- Is_Wrapper_Package --
5515 ------------------------
5517 function Is_Wrapper_Package
(Id
: E
) return B
is
5519 return (Ekind
(Id
) = E_Package
5520 and then Present
(Related_Instance
(Id
)));
5521 end Is_Wrapper_Package
;
5523 --------------------
5524 -- Next_Component --
5525 --------------------
5527 function Next_Component
(Id
: E
) return E
is
5531 Comp_Id
:= Next_Entity
(Id
);
5533 while Present
(Comp_Id
) loop
5534 exit when Ekind
(Comp_Id
) = E_Component
;
5535 Comp_Id
:= Next_Entity
(Comp_Id
);
5541 -----------------------
5542 -- Next_Discriminant --
5543 -----------------------
5545 -- This function actually implements both Next_Discriminant and
5546 -- Next_Stored_Discriminant by making sure that the Discriminant
5547 -- returned is of the same variety as Id.
5549 function Next_Discriminant
(Id
: E
) return E
is
5551 -- Derived Tagged types with private extensions look like this...
5553 -- E_Discriminant d1
5554 -- E_Discriminant d2
5556 -- E_Discriminant d1
5557 -- E_Discriminant d2
5560 -- so it is critical not to go past the leading discriminants.
5565 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
5568 D
:= Next_Entity
(D
);
5570 or else (Ekind
(D
) /= E_Discriminant
5571 and then not Is_Itype
(D
))
5576 exit when Ekind
(D
) = E_Discriminant
5577 and then (Is_Completely_Hidden
(D
) = Is_Completely_Hidden
(Id
));
5581 end Next_Discriminant
;
5587 function Next_Formal
(Id
: E
) return E
is
5591 -- Follow the chain of declared entities as long as the kind of
5592 -- the entity corresponds to a formal parameter. Skip internal
5593 -- entities that may have been created for implicit subtypes,
5594 -- in the process of analyzing default expressions.
5599 P
:= Next_Entity
(P
);
5601 if No
(P
) or else Is_Formal
(P
) then
5603 elsif not Is_Internal
(P
) then
5609 -----------------------------
5610 -- Next_Formal_With_Extras --
5611 -----------------------------
5613 function Next_Formal_With_Extras
(Id
: E
) return E
is
5615 if Present
(Extra_Formal
(Id
)) then
5616 return Extra_Formal
(Id
);
5618 return Next_Formal
(Id
);
5620 end Next_Formal_With_Extras
;
5626 function Next_Index
(Id
: Node_Id
) return Node_Id
is
5635 function Next_Literal
(Id
: E
) return E
is
5637 pragma Assert
(Nkind
(Id
) in N_Entity
);
5641 ------------------------------
5642 -- Next_Stored_Discriminant --
5643 ------------------------------
5645 function Next_Stored_Discriminant
(Id
: E
) return E
is
5647 -- See comment in Next_Discriminant
5649 return Next_Discriminant
(Id
);
5650 end Next_Stored_Discriminant
;
5652 -----------------------
5653 -- Number_Dimensions --
5654 -----------------------
5656 function Number_Dimensions
(Id
: E
) return Pos
is
5661 if Ekind
(Id
) in String_Kind
then
5666 T
:= First_Index
(Id
);
5668 while Present
(T
) loop
5675 end Number_Dimensions
;
5677 --------------------------
5678 -- Number_Discriminants --
5679 --------------------------
5681 function Number_Discriminants
(Id
: E
) return Pos
is
5687 Discr
:= First_Discriminant
(Id
);
5689 while Present
(Discr
) loop
5691 Discr
:= Next_Discriminant
(Discr
);
5695 end Number_Discriminants
;
5697 --------------------
5698 -- Number_Entries --
5699 --------------------
5701 function Number_Entries
(Id
: E
) return Nat
is
5706 pragma Assert
(Is_Concurrent_Type
(Id
));
5708 Ent
:= First_Entity
(Id
);
5710 while Present
(Ent
) loop
5711 if Is_Entry
(Ent
) then
5715 Ent
:= Next_Entity
(Ent
);
5721 --------------------
5722 -- Number_Formals --
5723 --------------------
5725 function Number_Formals
(Id
: E
) return Pos
is
5731 Formal
:= First_Formal
(Id
);
5733 while Present
(Formal
) loop
5735 Formal
:= Next_Formal
(Formal
);
5741 --------------------
5742 -- Parameter_Mode --
5743 --------------------
5745 function Parameter_Mode
(Id
: E
) return Formal_Kind
is
5754 function Root_Type
(Id
: E
) return E
is
5758 pragma Assert
(Nkind
(Id
) in N_Entity
);
5760 T
:= Base_Type
(Id
);
5762 if Ekind
(T
) = E_Class_Wide_Type
then
5774 -- Following test catches some error cases resulting from
5777 elsif No
(Etyp
) then
5780 elsif Is_Private_Type
(T
) and then Etyp
= Full_View
(T
) then
5783 elsif Is_Private_Type
(Etyp
) and then Full_View
(Etyp
) = T
then
5789 -- Return if there is a circularity in the inheritance chain.
5790 -- This happens in some error situations and we do not want
5791 -- to get stuck in this loop.
5793 if T
= Base_Type
(Id
) then
5799 raise Program_Error
;
5806 function Scope_Depth
(Id
: E
) return Uint
is
5807 Scop
: Entity_Id
:= Id
;
5810 while Is_Record_Type
(Scop
) loop
5811 Scop
:= Scope
(Scop
);
5814 return Scope_Depth_Value
(Scop
);
5817 ---------------------
5818 -- Scope_Depth_Set --
5819 ---------------------
5821 function Scope_Depth_Set
(Id
: E
) return B
is
5823 return not Is_Record_Type
(Id
)
5824 and then Field22
(Id
) /= Union_Id
(Empty
);
5825 end Scope_Depth_Set
;
5827 -----------------------------
5828 -- Set_Component_Alignment --
5829 -----------------------------
5831 -- Component Alignment is encoded using two flags, Flag128/129 as
5832 -- follows. Note that both flags False = Align_Default, so that the
5833 -- default initialization of flags to False initializes component
5834 -- alignment to the default value as required.
5836 -- Flag128 Flag129 Value
5837 -- ------- ------- -----
5838 -- False False Calign_Default
5839 -- False True Calign_Component_Size
5840 -- True False Calign_Component_Size_4
5841 -- True True Calign_Storage_Unit
5843 procedure Set_Component_Alignment
(Id
: E
; V
: C
) is
5845 pragma Assert
((Is_Array_Type
(Id
) or else Is_Record_Type
(Id
))
5846 and then Id
= Base_Type
(Id
));
5849 when Calign_Default
=>
5850 Set_Flag128
(Id
, False);
5851 Set_Flag129
(Id
, False);
5853 when Calign_Component_Size
=>
5854 Set_Flag128
(Id
, False);
5855 Set_Flag129
(Id
, True);
5857 when Calign_Component_Size_4
=>
5858 Set_Flag128
(Id
, True);
5859 Set_Flag129
(Id
, False);
5861 when Calign_Storage_Unit
=>
5862 Set_Flag128
(Id
, True);
5863 Set_Flag129
(Id
, True);
5865 end Set_Component_Alignment
;
5871 function Size_Clause
(Id
: E
) return N
is
5875 Ritem
:= First_Rep_Item
(Id
);
5876 while Present
(Ritem
) loop
5877 if Nkind
(Ritem
) = N_Attribute_Definition_Clause
5878 and then Chars
(Ritem
) = Name_Size
5882 Ritem
:= Next_Rep_Item
(Ritem
);
5893 function Subtype_Kind
(K
: Entity_Kind
) return Entity_Kind
is
5899 Kind
:= E_Access_Subtype
;
5903 Kind
:= E_Array_Subtype
;
5905 when E_Class_Wide_Type |
5906 E_Class_Wide_Subtype
=>
5907 Kind
:= E_Class_Wide_Subtype
;
5909 when E_Decimal_Fixed_Point_Type |
5910 E_Decimal_Fixed_Point_Subtype
=>
5911 Kind
:= E_Decimal_Fixed_Point_Subtype
;
5913 when E_Ordinary_Fixed_Point_Type |
5914 E_Ordinary_Fixed_Point_Subtype
=>
5915 Kind
:= E_Ordinary_Fixed_Point_Subtype
;
5917 when E_Private_Type |
5918 E_Private_Subtype
=>
5919 Kind
:= E_Private_Subtype
;
5921 when E_Limited_Private_Type |
5922 E_Limited_Private_Subtype
=>
5923 Kind
:= E_Limited_Private_Subtype
;
5925 when E_Record_Type_With_Private |
5926 E_Record_Subtype_With_Private
=>
5927 Kind
:= E_Record_Subtype_With_Private
;
5929 when E_Record_Type |
5931 Kind
:= E_Record_Subtype
;
5933 when E_String_Type |
5935 Kind
:= E_String_Subtype
;
5937 when Enumeration_Kind
=>
5938 Kind
:= E_Enumeration_Subtype
;
5941 Kind
:= E_Floating_Point_Subtype
;
5943 when Signed_Integer_Kind
=>
5944 Kind
:= E_Signed_Integer_Subtype
;
5946 when Modular_Integer_Kind
=>
5947 Kind
:= E_Modular_Integer_Subtype
;
5949 when Protected_Kind
=>
5950 Kind
:= E_Protected_Subtype
;
5953 Kind
:= E_Task_Subtype
;
5957 raise Program_Error
;
5967 function Tag_Component
(Id
: E
) return E
is
5969 Typ
: Entity_Id
:= Id
;
5972 pragma Assert
(Is_Tagged_Type
(Typ
));
5974 if Is_Class_Wide_Type
(Typ
) then
5975 Typ
:= Root_Type
(Typ
);
5978 if Is_Private_Type
(Typ
) then
5979 Typ
:= Underlying_Type
(Typ
);
5982 Comp
:= First_Entity
(Typ
);
5983 while Present
(Comp
) loop
5984 if Is_Tag
(Comp
) then
5988 Comp
:= Next_Entity
(Comp
);
5991 -- No tag component found
5996 ---------------------
5997 -- Type_High_Bound --
5998 ---------------------
6000 function Type_High_Bound
(Id
: E
) return Node_Id
is
6002 if Nkind
(Scalar_Range
(Id
)) = N_Subtype_Indication
then
6003 return High_Bound
(Range_Expression
(Constraint
(Scalar_Range
(Id
))));
6005 return High_Bound
(Scalar_Range
(Id
));
6007 end Type_High_Bound
;
6009 --------------------
6010 -- Type_Low_Bound --
6011 --------------------
6013 function Type_Low_Bound
(Id
: E
) return Node_Id
is
6015 if Nkind
(Scalar_Range
(Id
)) = N_Subtype_Indication
then
6016 return Low_Bound
(Range_Expression
(Constraint
(Scalar_Range
(Id
))));
6018 return Low_Bound
(Scalar_Range
(Id
));
6022 ---------------------
6023 -- Underlying_Type --
6024 ---------------------
6026 function Underlying_Type
(Id
: E
) return E
is
6028 -- For record_with_private the underlying type is always the direct
6029 -- full view. Never try to take the full view of the parent it
6030 -- doesn't make sense.
6032 if Ekind
(Id
) = E_Record_Type_With_Private
then
6033 return Full_View
(Id
);
6035 elsif Ekind
(Id
) in Incomplete_Or_Private_Kind
then
6037 -- If we have an incomplete or private type with a full view,
6038 -- then we return the Underlying_Type of this full view
6040 if Present
(Full_View
(Id
)) then
6041 if Id
= Full_View
(Id
) then
6043 -- Previous error in declaration
6048 return Underlying_Type
(Full_View
(Id
));
6051 -- Otherwise check for the case where we have a derived type or
6052 -- subtype, and if so get the Underlying_Type of the parent type.
6054 elsif Etype
(Id
) /= Id
then
6055 return Underlying_Type
(Etype
(Id
));
6057 -- Otherwise we have an incomplete or private type that has
6058 -- no full view, which means that we have not encountered the
6059 -- completion, so return Empty to indicate the underlying type
6060 -- is not yet known.
6066 -- For non-incomplete, non-private types, return the type itself
6067 -- Also for entities that are not types at all return the entity
6073 end Underlying_Type
;
6075 ------------------------
6076 -- Write_Entity_Flags --
6077 ------------------------
6079 procedure Write_Entity_Flags
(Id
: Entity_Id
; Prefix
: String) is
6081 procedure W
(Flag_Name
: String; Flag
: Boolean);
6082 -- Write out given flag if it is set
6084 procedure W
(Flag_Name
: String; Flag
: Boolean) is
6088 Write_Str
(Flag_Name
);
6089 Write_Str
(" = True");
6094 -- Start of processing for Write_Entity_Flags
6097 if (Is_Array_Type
(Id
) or else Is_Record_Type
(Id
))
6098 and then Base_Type
(Id
) = Id
6101 Write_Str
("Component_Alignment = ");
6103 case Component_Alignment
(Id
) is
6104 when Calign_Default
=>
6105 Write_Str
("Calign_Default");
6107 when Calign_Component_Size
=>
6108 Write_Str
("Calign_Component_Size");
6110 when Calign_Component_Size_4
=>
6111 Write_Str
("Calign_Component_Size_4");
6113 when Calign_Storage_Unit
=>
6114 Write_Str
("Calign_Storage_Unit");
6120 W
("Address_Taken", Flag104
(Id
));
6121 W
("Body_Needed_For_SAL", Flag40
(Id
));
6122 W
("C_Pass_By_Copy", Flag125
(Id
));
6123 W
("Can_Never_Be_Null", Flag38
(Id
));
6124 W
("Checks_May_Be_Suppressed", Flag31
(Id
));
6125 W
("Debug_Info_Off", Flag166
(Id
));
6126 W
("Default_Expressions_Processed", Flag108
(Id
));
6127 W
("Delay_Cleanups", Flag114
(Id
));
6128 W
("Delay_Subprogram_Descriptors", Flag50
(Id
));
6129 W
("Depends_On_Private", Flag14
(Id
));
6130 W
("Discard_Names", Flag88
(Id
));
6131 W
("Elaborate_All_Desirable", Flag146
(Id
));
6132 W
("Elaboration_Entity_Required", Flag174
(Id
));
6133 W
("Entry_Accepted", Flag152
(Id
));
6134 W
("Finalize_Storage_Only", Flag158
(Id
));
6135 W
("From_With_Type", Flag159
(Id
));
6136 W
("Function_Returns_With_DSP", Flag169
(Id
));
6137 W
("Has_Aliased_Components", Flag135
(Id
));
6138 W
("Has_Alignment_Clause", Flag46
(Id
));
6139 W
("Has_All_Calls_Remote", Flag79
(Id
));
6140 W
("Has_Atomic_Components", Flag86
(Id
));
6141 W
("Has_Biased_Representation", Flag139
(Id
));
6142 W
("Has_Completion", Flag26
(Id
));
6143 W
("Has_Completion_In_Body", Flag71
(Id
));
6144 W
("Has_Complex_Representation", Flag140
(Id
));
6145 W
("Has_Component_Size_Clause", Flag68
(Id
));
6146 W
("Has_Contiguous_Rep", Flag181
(Id
));
6147 W
("Has_Controlled_Component", Flag43
(Id
));
6148 W
("Has_Controlling_Result", Flag98
(Id
));
6149 W
("Has_Convention_Pragma", Flag119
(Id
));
6150 W
("Has_Delayed_Freeze", Flag18
(Id
));
6151 W
("Has_Discriminants", Flag5
(Id
));
6152 W
("Has_Enumeration_Rep_Clause", Flag66
(Id
));
6153 W
("Has_Exit", Flag47
(Id
));
6154 W
("Has_External_Tag_Rep_Clause", Flag110
(Id
));
6155 W
("Has_Forward_Instantiation", Flag175
(Id
));
6156 W
("Has_Fully_Qualified_Name", Flag173
(Id
));
6157 W
("Has_Gigi_Rep_Item", Flag82
(Id
));
6158 W
("Has_Homonym", Flag56
(Id
));
6159 W
("Has_Machine_Radix_Clause", Flag83
(Id
));
6160 W
("Has_Master_Entity", Flag21
(Id
));
6161 W
("Has_Missing_Return", Flag142
(Id
));
6162 W
("Has_Nested_Block_With_Handler", Flag101
(Id
));
6163 W
("Has_Non_Standard_Rep", Flag75
(Id
));
6164 W
("Has_Object_Size_Clause", Flag172
(Id
));
6165 W
("Has_Per_Object_Constraint", Flag154
(Id
));
6166 W
("Has_Pragma_Controlled", Flag27
(Id
));
6167 W
("Has_Pragma_Elaborate_Body", Flag150
(Id
));
6168 W
("Has_Pragma_Inline", Flag157
(Id
));
6169 W
("Has_Pragma_Pack", Flag121
(Id
));
6170 W
("Has_Pragma_Pure_Function", Flag179
(Id
));
6171 W
("Has_Pragma_Unreferenced", Flag180
(Id
));
6172 W
("Has_Primitive_Operations", Flag120
(Id
));
6173 W
("Has_Private_Declaration", Flag155
(Id
));
6174 W
("Has_Qualified_Name", Flag161
(Id
));
6175 W
("Has_Record_Rep_Clause", Flag65
(Id
));
6176 W
("Has_Recursive_Call", Flag143
(Id
));
6177 W
("Has_Size_Clause", Flag29
(Id
));
6178 W
("Has_Small_Clause", Flag67
(Id
));
6179 W
("Has_Specified_Layout", Flag100
(Id
));
6180 W
("Has_Storage_Size_Clause", Flag23
(Id
));
6181 W
("Has_Subprogram_Descriptor", Flag93
(Id
));
6182 W
("Has_Task", Flag30
(Id
));
6183 W
("Has_Unchecked_Union", Flag123
(Id
));
6184 W
("Has_Unknown_Discriminants", Flag72
(Id
));
6185 W
("Has_Volatile_Components", Flag87
(Id
));
6186 W
("Has_Xref_Entry", Flag182
(Id
));
6187 W
("In_Package_Body", Flag48
(Id
));
6188 W
("In_Private_Part", Flag45
(Id
));
6189 W
("In_Use", Flag8
(Id
));
6190 W
("Is_AST_Entry", Flag132
(Id
));
6191 W
("Is_Abstract", Flag19
(Id
));
6192 W
("Is_Access_Constant", Flag69
(Id
));
6193 W
("Is_Aliased", Flag15
(Id
));
6194 W
("Is_Asynchronous", Flag81
(Id
));
6195 W
("Is_Atomic", Flag85
(Id
));
6196 W
("Is_Bit_Packed_Array", Flag122
(Id
));
6197 W
("Is_CPP_Class", Flag74
(Id
));
6198 W
("Is_Called", Flag102
(Id
));
6199 W
("Is_Character_Type", Flag63
(Id
));
6200 W
("Is_Child_Unit", Flag73
(Id
));
6201 W
("Is_Class_Wide_Equivalent_Type", Flag35
(Id
));
6202 W
("Is_Compilation_Unit", Flag149
(Id
));
6203 W
("Is_Completely_Hidden", Flag103
(Id
));
6204 W
("Is_Concurrent_Record_Type", Flag20
(Id
));
6205 W
("Is_Constr_Subt_For_UN_Aliased", Flag141
(Id
));
6206 W
("Is_Constr_Subt_For_U_Nominal", Flag80
(Id
));
6207 W
("Is_Constrained", Flag12
(Id
));
6208 W
("Is_Constructor", Flag76
(Id
));
6209 W
("Is_Controlled", Flag42
(Id
));
6210 W
("Is_Controlling_Formal", Flag97
(Id
));
6211 W
("Is_Discrim_SO_Function", Flag176
(Id
));
6212 W
("Is_Dispatching_Operation", Flag6
(Id
));
6213 W
("Is_Eliminated", Flag124
(Id
));
6214 W
("Is_Entry_Formal", Flag52
(Id
));
6215 W
("Is_Exported", Flag99
(Id
));
6216 W
("Is_First_Subtype", Flag70
(Id
));
6217 W
("Is_For_Access_Subtype", Flag118
(Id
));
6218 W
("Is_Formal_Subprogram", Flag111
(Id
));
6219 W
("Is_Frozen", Flag4
(Id
));
6220 W
("Is_Generic_Actual_Type", Flag94
(Id
));
6221 W
("Is_Generic_Instance", Flag130
(Id
));
6222 W
("Is_Generic_Type", Flag13
(Id
));
6223 W
("Is_Hidden", Flag57
(Id
));
6224 W
("Is_Hidden_Open_Scope", Flag171
(Id
));
6225 W
("Is_Immediately_Visible", Flag7
(Id
));
6226 W
("Is_Imported", Flag24
(Id
));
6227 W
("Is_Inlined", Flag11
(Id
));
6228 W
("Is_Instantiated", Flag126
(Id
));
6229 W
("Is_Internal", Flag17
(Id
));
6230 W
("Is_Interrupt_Handler", Flag89
(Id
));
6231 W
("Is_Intrinsic_Subprogram", Flag64
(Id
));
6232 W
("Is_Itype", Flag91
(Id
));
6233 W
("Is_Known_Valid", Flag37
(Id
));
6234 W
("Is_Known_Valid", Flag170
(Id
));
6235 W
("Is_Limited_Composite", Flag106
(Id
));
6236 W
("Is_Limited_Record", Flag25
(Id
));
6237 W
("Is_Machine_Code_Subprogram", Flag137
(Id
));
6238 W
("Is_Non_Static_Subtype", Flag109
(Id
));
6239 W
("Is_Null_Init_Proc", Flag178
(Id
));
6240 W
("Is_Optional_Parameter", Flag134
(Id
));
6241 W
("Is_Overriding_Operation", Flag39
(Id
));
6242 W
("Is_Package_Body_Entity", Flag160
(Id
));
6243 W
("Is_Packed", Flag51
(Id
));
6244 W
("Is_Packed_Array_Type", Flag138
(Id
));
6245 W
("Is_Potentially_Use_Visible", Flag9
(Id
));
6246 W
("Is_Preelaborated", Flag59
(Id
));
6247 W
("Is_Private_Composite", Flag107
(Id
));
6248 W
("Is_Private_Descendant", Flag53
(Id
));
6249 W
("Is_Psected", Flag153
(Id
));
6250 W
("Is_Public", Flag10
(Id
));
6251 W
("Is_Pure", Flag44
(Id
));
6252 W
("Is_Remote_Call_Interface", Flag62
(Id
));
6253 W
("Is_Remote_Types", Flag61
(Id
));
6254 W
("Is_Renaming_Of_Object", Flag112
(Id
));
6255 W
("Is_Shared_Passive", Flag60
(Id
));
6256 W
("Is_Statically_Allocated", Flag28
(Id
));
6257 W
("Is_Tag", Flag78
(Id
));
6258 W
("Is_Tagged_Type", Flag55
(Id
));
6259 W
("Is_Thread_Body", Flag77
(Id
));
6260 W
("Is_True_Constant", Flag163
(Id
));
6261 W
("Is_Unchecked_Union", Flag117
(Id
));
6262 W
("Is_Unsigned_Type", Flag144
(Id
));
6263 W
("Is_VMS_Exception", Flag133
(Id
));
6264 W
("Is_Valued_Procedure", Flag127
(Id
));
6265 W
("Is_Visible_Child_Unit", Flag116
(Id
));
6266 W
("Is_Volatile", Flag16
(Id
));
6267 W
("Kill_Elaboration_Checks", Flag32
(Id
));
6268 W
("Kill_Range_Checks", Flag33
(Id
));
6269 W
("Kill_Tag_Checks", Flag34
(Id
));
6270 W
("Machine_Radix_10", Flag84
(Id
));
6271 W
("Materialize_Entity", Flag168
(Id
));
6272 W
("Must_Be_On_Byte_Boundary", Flag183
(Id
));
6273 W
("Needs_Debug_Info", Flag147
(Id
));
6274 W
("Needs_No_Actuals", Flag22
(Id
));
6275 W
("Never_Set_In_Source", Flag115
(Id
));
6276 W
("No_Pool_Assigned", Flag131
(Id
));
6277 W
("No_Return", Flag113
(Id
));
6278 W
("No_Strict_Aliasing", Flag136
(Id
));
6279 W
("Non_Binary_Modulus", Flag58
(Id
));
6280 W
("Nonzero_Is_True", Flag162
(Id
));
6281 W
("Reachable", Flag49
(Id
));
6282 W
("Referenced", Flag156
(Id
));
6283 W
("Referenced_As_LHS", Flag36
(Id
));
6284 W
("Return_Present", Flag54
(Id
));
6285 W
("Returns_By_Ref", Flag90
(Id
));
6286 W
("Reverse_Bit_Order", Flag164
(Id
));
6287 W
("Sec_Stack_Needed_For_Return", Flag167
(Id
));
6288 W
("Size_Depends_On_Discriminant", Flag177
(Id
));
6289 W
("Size_Known_At_Compile_Time", Flag92
(Id
));
6290 W
("Strict_Alignment", Flag145
(Id
));
6291 W
("Suppress_Elaboration_Warnings", Flag148
(Id
));
6292 W
("Suppress_Init_Proc", Flag105
(Id
));
6293 W
("Suppress_Style_Checks", Flag165
(Id
));
6294 W
("Treat_As_Volatile", Flag41
(Id
));
6295 W
("Uses_Sec_Stack", Flag95
(Id
));
6296 W
("Vax_Float", Flag151
(Id
));
6297 W
("Warnings_Off", Flag96
(Id
));
6298 end Write_Entity_Flags
;
6300 -----------------------
6301 -- Write_Entity_Info --
6302 -----------------------
6304 procedure Write_Entity_Info
(Id
: Entity_Id
; Prefix
: String) is
6306 procedure Write_Attribute
(Which
: String; Nam
: E
);
6307 -- Write attribute value with given string name
6309 procedure Write_Kind
(Id
: Entity_Id
);
6310 -- Write Ekind field of entity
6312 procedure Write_Attribute
(Which
: String; Nam
: E
) is
6316 Write_Int
(Int
(Nam
));
6318 Write_Name
(Chars
(Nam
));
6320 end Write_Attribute
;
6322 procedure Write_Kind
(Id
: Entity_Id
) is
6323 K
: constant String := Entity_Kind
'Image (Ekind
(Id
));
6327 Write_Str
(" Kind ");
6329 if Is_Type
(Id
) and then Is_Tagged_Type
(Id
) then
6330 Write_Str
("TAGGED ");
6333 Write_Str
(K
(3 .. K
'Length));
6336 if Is_Type
(Id
) and then Depends_On_Private
(Id
) then
6337 Write_Str
("Depends_On_Private ");
6341 -- Start of processing for Write_Entity_Info
6345 Write_Attribute
("Name ", Id
);
6346 Write_Int
(Int
(Id
));
6350 Write_Attribute
(" Type ", Etype
(Id
));
6352 Write_Attribute
(" Scope ", Scope
(Id
));
6357 when Discrete_Kind
=>
6358 Write_Str
("Bounds: Id = ");
6360 if Present
(Scalar_Range
(Id
)) then
6361 Write_Int
(Int
(Type_Low_Bound
(Id
)));
6362 Write_Str
(" .. Id = ");
6363 Write_Int
(Int
(Type_High_Bound
(Id
)));
6365 Write_Str
("Empty");
6375 Write_Attribute
(" Component Type ",
6376 Component_Type
(Id
));
6379 Write_Str
(" Indices ");
6381 Index
:= First_Index
(Id
);
6383 while Present
(Index
) loop
6384 Write_Attribute
(" ", Etype
(Index
));
6385 Index
:= Next_Index
(Index
);
6393 (" Directly Designated Type ",
6394 Directly_Designated_Type
(Id
));
6397 when Overloadable_Kind
=>
6398 if Present
(Homonym
(Id
)) then
6399 Write_Str
(" Homonym ");
6400 Write_Name
(Chars
(Homonym
(Id
)));
6402 Write_Int
(Int
(Homonym
(Id
)));
6409 if Ekind
(Scope
(Id
)) in Record_Kind
then
6411 " Original_Record_Component ",
6412 Original_Record_Component
(Id
));
6413 Write_Int
(Int
(Original_Record_Component
(Id
)));
6417 when others => null;
6419 end Write_Entity_Info
;
6421 -----------------------
6422 -- Write_Field6_Name --
6423 -----------------------
6425 procedure Write_Field6_Name
(Id
: Entity_Id
) is
6426 pragma Warnings
(Off
, Id
);
6429 Write_Str
("First_Rep_Item");
6430 end Write_Field6_Name
;
6432 -----------------------
6433 -- Write_Field7_Name --
6434 -----------------------
6436 procedure Write_Field7_Name
(Id
: Entity_Id
) is
6437 pragma Warnings
(Off
, Id
);
6440 Write_Str
("Freeze_Node");
6441 end Write_Field7_Name
;
6443 -----------------------
6444 -- Write_Field8_Name --
6445 -----------------------
6447 procedure Write_Field8_Name
(Id
: Entity_Id
) is
6452 Write_Str
("Normalized_First_Bit");
6456 E_Subprogram_Body
=>
6457 Write_Str
("Mechanism");
6460 Write_Str
("Associated_Node_For_Itype");
6463 Write_Str
("Dependent_Instances");
6466 Write_Str
("Hiding_Loop_Variable");
6469 Write_Str
("Field8??");
6471 end Write_Field8_Name
;
6473 -----------------------
6474 -- Write_Field9_Name --
6475 -----------------------
6477 procedure Write_Field9_Name
(Id
: Entity_Id
) is
6481 Write_Str
("Class_Wide_Type");
6484 E_Generic_Function |
6486 E_Generic_Procedure |
6489 Write_Str
("Renaming_Map");
6492 Write_Str
("Current_Value");
6495 Write_Str
("Field9??");
6497 end Write_Field9_Name
;
6499 ------------------------
6500 -- Write_Field10_Name --
6501 ------------------------
6503 procedure Write_Field10_Name
(Id
: Entity_Id
) is
6507 Write_Str
("Referenced_Object");
6509 when E_In_Parameter |
6511 Write_Str
("Discriminal_Link");
6517 Write_Str
("Handler_Records");
6521 Write_Str
("Normalized_Position_Max");
6524 Write_Str
("Field10??");
6526 end Write_Field10_Name
;
6528 ------------------------
6529 -- Write_Field11_Name --
6530 ------------------------
6532 procedure Write_Field11_Name
(Id
: Entity_Id
) is
6536 Write_Str
("Entry_Component");
6540 Write_Str
("Component_Bit_Offset");
6543 Write_Str
("Full_View");
6545 when E_Enumeration_Literal
=>
6546 Write_Str
("Enumeration_Pos");
6549 Write_Str
("Block_Node");
6555 Write_Str
("Protected_Body_Subprogram");
6557 when E_Generic_Package
=>
6558 Write_Str
("Generic_Homonym");
6561 Write_Str
("Full_View");
6564 Write_Str
("Field11??");
6566 end Write_Field11_Name
;
6568 ------------------------
6569 -- Write_Field12_Name --
6570 ------------------------
6572 procedure Write_Field12_Name
(Id
: Entity_Id
) is
6576 Write_Str
("Barrier_Function");
6578 when E_Enumeration_Literal
=>
6579 Write_Str
("Enumeration_Rep");
6586 E_In_Out_Parameter |
6590 Write_Str
("Esize");
6594 Write_Str
("Next_Inlined_Subprogram");
6597 Write_Str
("Associated_Formal_Package");
6600 Write_Str
("Field12??");
6602 end Write_Field12_Name
;
6604 ------------------------
6605 -- Write_Field13_Name --
6606 ------------------------
6608 procedure Write_Field13_Name
(Id
: Entity_Id
) is
6612 Write_Str
("RM_Size");
6616 Write_Str
("Component_Clause");
6618 when E_Enumeration_Literal
=>
6619 Write_Str
("Debug_Renaming_Link");
6622 if not Comes_From_Source
(Id
)
6624 Chars
(Id
) = Name_Op_Ne
6626 Write_Str
("Corresponding_Equality");
6628 elsif Comes_From_Source
(Id
) then
6629 Write_Str
("Elaboration_Entity");
6632 Write_Str
("Field13??");
6637 Write_Str
("Extra_Accessibility");
6641 Generic_Unit_Kind
=>
6642 Write_Str
("Elaboration_Entity");
6645 Write_Str
("Field13??");
6647 end Write_Field13_Name
;
6649 -----------------------
6650 -- Write_Field14_Name --
6651 -----------------------
6653 procedure Write_Field14_Name
(Id
: Entity_Id
) is
6661 Write_Str
("Alignment");
6665 Write_Str
("Normalized_Position");
6669 Write_Str
("First_Optional_Parameter");
6672 E_Generic_Package
=>
6673 Write_Str
("Shadow_Entities");
6676 Write_Str
("Field14??");
6678 end Write_Field14_Name
;
6680 ------------------------
6681 -- Write_Field15_Name --
6682 ------------------------
6684 procedure Write_Field15_Name
(Id
: Entity_Id
) is
6689 Write_Str
("Storage_Size_Variable");
6691 when Class_Wide_Kind |
6695 Write_Str
("Primitive_Operations");
6698 Write_Str
("DT_Entry_Count");
6700 when Decimal_Fixed_Point_Kind
=>
6701 Write_Str
("Scale_Value");
6703 when E_Discriminant
=>
6704 Write_Str
("Discriminant_Number");
6707 Write_Str
("Extra_Formal");
6711 Write_Str
("DT_Position");
6714 Write_Str
("Entry_Parameters_Type");
6716 when Enumeration_Kind
=>
6717 Write_Str
("Lit_Indexes");
6721 Write_Str
("Related_Instance");
6723 when E_Protected_Type
=>
6724 Write_Str
("Entry_Bodies_Array");
6726 when E_String_Literal_Subtype
=>
6727 Write_Str
("String_Literal_Low_Bound");
6730 Write_Str
("Shared_Var_Read_Proc");
6733 Write_Str
("Field15??");
6735 end Write_Field15_Name
;
6737 ------------------------
6738 -- Write_Field16_Name --
6739 ------------------------
6741 procedure Write_Field16_Name
(Id
: Entity_Id
) is
6745 Write_Str
("Entry_Formal");
6749 Write_Str
("DTC_Entity");
6754 Write_Str
("First_Private_Entity");
6756 when E_Record_Type |
6757 E_Record_Type_With_Private
=>
6758 Write_Str
("Access_Disp_Table");
6760 when E_String_Literal_Subtype
=>
6761 Write_Str
("String_Literal_Length");
6763 when Enumeration_Kind
=>
6764 Write_Str
("Lit_Strings");
6768 Write_Str
("Unset_Reference");
6770 when E_Record_Subtype |
6771 E_Class_Wide_Subtype
=>
6772 Write_Str
("Cloned_Subtype");
6775 Write_Str
("Field16??");
6777 end Write_Field16_Name
;
6779 ------------------------
6780 -- Write_Field17_Name --
6781 ------------------------
6783 procedure Write_Field17_Name
(Id
: Entity_Id
) is
6787 Write_Str
("Digits_Value");
6790 Write_Str
("Prival");
6792 when E_Discriminant
=>
6793 Write_Str
("Discriminal");
6802 E_Generic_Function |
6804 E_Generic_Procedure |
6813 E_Subprogram_Type
=>
6814 Write_Str
("First_Entity");
6817 Write_Str
("First_Index");
6819 when E_Protected_Body
=>
6820 Write_Str
("Object_Ref");
6822 when Enumeration_Kind
=>
6823 Write_Str
("First_Literal");
6826 Write_Str
("Master_Id");
6828 when Modular_Integer_Kind
=>
6829 Write_Str
("Modulus");
6833 E_Generic_In_Out_Parameter |
6835 Write_Str
("Actual_Subtype");
6837 when E_Incomplete_Type
=>
6838 Write_Str
("Non-limited view");
6841 Write_Str
("Field17??");
6843 end Write_Field17_Name
;
6845 -----------------------
6846 -- Write_Field18_Name --
6847 -----------------------
6849 procedure Write_Field18_Name
(Id
: Entity_Id
) is
6852 when E_Enumeration_Literal |
6856 Write_Str
("Alias");
6858 when E_Record_Type
=>
6859 Write_Str
("Corresponding_Concurrent_Type");
6861 when E_Entry_Index_Parameter
=>
6862 Write_Str
("Entry_Index_Constant");
6864 when E_Class_Wide_Subtype |
6865 E_Access_Protected_Subprogram_Type |
6866 E_Access_Subprogram_Type |
6868 Write_Str
("Equivalent_Type");
6870 when Fixed_Point_Kind
=>
6871 Write_Str
("Delta_Value");
6875 Write_Str
("Renamed_Object");
6879 E_Generic_Function |
6880 E_Generic_Procedure |
6881 E_Generic_Package
=>
6882 Write_Str
("Renamed_Entity");
6884 when Incomplete_Or_Private_Kind
=>
6885 Write_Str
("Private_Dependents");
6887 when Concurrent_Kind
=>
6888 Write_Str
("Corresponding_Record_Type");
6893 Write_Str
("Enclosing_Scope");
6896 Write_Str
("Field18??");
6898 end Write_Field18_Name
;
6900 -----------------------
6901 -- Write_Field19_Name --
6902 -----------------------
6904 procedure Write_Field19_Name
(Id
: Entity_Id
) is
6909 Write_Str
("Related_Array_Object");
6916 Write_Str
("Finalization_Chain_Entity");
6918 when E_Constant | E_Variable
=>
6919 Write_Str
("Size_Check_Code");
6921 when E_Discriminant
=>
6922 Write_Str
("Corresponding_Discriminant");
6925 E_Generic_Package
=>
6926 Write_Str
("Body_Entity");
6928 when E_Package_Body |
6930 Write_Str
("Spec_Entity");
6932 when Private_Kind
=>
6933 Write_Str
("Underlying_Full_View");
6935 when E_Record_Type
=>
6936 Write_Str
("Parent_Subtype");
6939 Write_Str
("Field19??");
6941 end Write_Field19_Name
;
6943 -----------------------
6944 -- Write_Field20_Name --
6945 -----------------------
6947 procedure Write_Field20_Name
(Id
: Entity_Id
) is
6951 Write_Str
("Component_Type");
6953 when E_In_Parameter |
6954 E_Generic_In_Parameter
=>
6955 Write_Str
("Default_Value");
6958 Write_Str
("Directly_Designated_Type");
6961 Write_Str
("Discriminant_Checking_Func");
6963 when E_Discriminant
=>
6964 Write_Str
("Discriminant_Default_Value");
6973 E_Generic_Function |
6975 E_Generic_Procedure |
6984 E_Subprogram_Type
=>
6986 Write_Str
("Last_Entity");
6989 Write_Str
("Scalar_Range");
6992 Write_Str
("Register_Exception_Call");
6995 Write_Str
("Field20??");
6997 end Write_Field20_Name
;
6999 -----------------------
7000 -- Write_Field21_Name --
7001 -----------------------
7003 procedure Write_Field21_Name
(Id
: Entity_Id
) is
7009 E_Generic_Function |
7011 E_Generic_Procedure |
7013 Write_Str
("Interface_Name");
7015 when Concurrent_Kind |
7016 Incomplete_Or_Private_Kind |
7020 Write_Str
("Discriminant_Constraint");
7023 Write_Str
("Accept_Address");
7025 when Fixed_Point_Kind
=>
7026 Write_Str
("Small_Value");
7028 when E_In_Parameter
=>
7029 Write_Str
("Default_Expr_Function");
7032 Modular_Integer_Kind
=>
7033 Write_Str
("Original_Array_Type");
7035 when E_Access_Subprogram_Type |
7036 E_Access_Protected_Subprogram_Type
=>
7037 Write_Str
("Original_Access_Type");
7040 Write_Str
("Field21??");
7042 end Write_Field21_Name
;
7044 -----------------------
7045 -- Write_Field22_Name --
7046 -----------------------
7048 procedure Write_Field22_Name
(Id
: Entity_Id
) is
7052 Write_Str
("Associated_Storage_Pool");
7055 Write_Str
("Component_Size");
7059 Write_Str
("Original_Record_Component");
7061 when E_Enumeration_Literal
=>
7062 Write_Str
("Enumeration_Rep_Expr");
7065 Write_Str
("Exception_Code");
7068 Write_Str
("Protected_Formal");
7070 when E_Record_Type
=>
7071 Write_Str
("Corresponding_Remote_Type");
7081 E_Generic_Function |
7082 E_Generic_Procedure |
7087 Write_Str
("Scope_Depth_Value");
7089 when E_Record_Type_With_Private |
7090 E_Record_Subtype_With_Private |
7093 E_Limited_Private_Type |
7094 E_Limited_Private_Subtype
=>
7095 Write_Str
("Private_View");
7098 Write_Str
("Shared_Var_Assign_Proc");
7101 Write_Str
("Field22??");
7103 end Write_Field22_Name
;
7105 ------------------------
7106 -- Write_Field23_Name --
7107 ------------------------
7109 procedure Write_Field23_Name
(Id
: Entity_Id
) is
7113 Write_Str
("Associated_Final_Chain");
7116 Write_Str
("Packed_Array_Type");
7119 Write_Str
("Entry_Cancel_Parameter");
7122 Write_Str
("Protected_Operation");
7124 when E_Discriminant
=>
7125 Write_Str
("CR_Discriminant");
7127 when E_Enumeration_Type
=>
7128 Write_Str
("Enum_Pos_To_Rep");
7132 Write_Str
("Extra_Constrained");
7134 when E_Generic_Function |
7136 E_Generic_Procedure
=>
7137 Write_Str
("Inner_Instances");
7139 when Concurrent_Kind |
7140 Incomplete_Or_Private_Kind |
7144 Write_Str
("Stored_Constraint");
7148 Write_Str
("Generic_Renamings");
7151 if Is_Generic_Instance
(Id
) then
7152 Write_Str
("Generic_Renamings");
7154 Write_Str
("Limited Views");
7157 -- What about Privals_Chain for protected operations ???
7160 Write_Str
("Privals_Chain");
7163 Write_Str
("Field23??");
7165 end Write_Field23_Name
;
7167 -------------------------
7168 -- Iterator Procedures --
7169 -------------------------
7171 procedure Proc_Next_Component
(N
: in out Node_Id
) is
7173 N
:= Next_Component
(N
);
7174 end Proc_Next_Component
;
7176 procedure Proc_Next_Discriminant
(N
: in out Node_Id
) is
7178 N
:= Next_Discriminant
(N
);
7179 end Proc_Next_Discriminant
;
7181 procedure Proc_Next_Formal
(N
: in out Node_Id
) is
7183 N
:= Next_Formal
(N
);
7184 end Proc_Next_Formal
;
7186 procedure Proc_Next_Formal_With_Extras
(N
: in out Node_Id
) is
7188 N
:= Next_Formal_With_Extras
(N
);
7189 end Proc_Next_Formal_With_Extras
;
7191 procedure Proc_Next_Index
(N
: in out Node_Id
) is
7193 N
:= Next_Index
(N
);
7194 end Proc_Next_Index
;
7196 procedure Proc_Next_Inlined_Subprogram
(N
: in out Node_Id
) is
7198 N
:= Next_Inlined_Subprogram
(N
);
7199 end Proc_Next_Inlined_Subprogram
;
7201 procedure Proc_Next_Literal
(N
: in out Node_Id
) is
7203 N
:= Next_Literal
(N
);
7204 end Proc_Next_Literal
;
7206 procedure Proc_Next_Stored_Discriminant
(N
: in out Node_Id
) is
7208 N
:= Next_Stored_Discriminant
(N
);
7209 end Proc_Next_Stored_Discriminant
;