1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2003 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 -- GNAT was originally developed by the GNAT team at New York University. --
23 -- Extensive contributions were provided by Ada Core Technologies Inc. --
25 ------------------------------------------------------------------------------
27 pragma Style_Checks
(All_Checks
);
28 -- Turn off subprogram order checking, since the routines here are
29 -- generated automatically in order.
32 with Nlists
; use Nlists
;
33 with Types
; use Types
;
34 with Uintp
; use Uintp
;
35 with Urealp
; use Urealp
;
39 -- This package contains a set of routines used to construct tree nodes
40 -- using a functional style. There is one routine for each node type defined
41 -- in Sinfo with the general interface:
43 -- function Make_xxx (Sloc : Source_Ptr,
44 -- Field_Name_1 : Field_Name_1_Type [:= default]
45 -- Field_Name_2 : Field_Name_2_Type [:= default]
49 -- Only syntactic fields are included (i.e. fields marked as "-Sem" or "-Lib"
50 -- in the Sinfo spec are excluded). In addition, the following four syntactic
51 -- fields are excluded:
58 -- since they are very rarely set in expanded code. If they need to be set,
59 -- to other than the default values (False, False, False, zero), then the
60 -- appropriate Set_xxx procedures must be used on the returned value.
62 -- Default values are provided only for flag fields (where the default is
63 -- False), and for optional fields. An optional field is one where the
64 -- comment line describing the field contains the string "(set to xxx if".
65 -- For such fields, a default value of xxx is provided."
67 -- Warning: since calls to Make_xxx routines are normal function calls, the
68 -- arguments can be evaluated in any order. This means that at most one such
69 -- argument can have side effects (e.g. be a call to a parse routine).
71 function Make_Unused_At_Start
(Sloc
: Source_Ptr
)
73 pragma Inline
(Make_Unused_At_Start
);
75 function Make_Unused_At_End
(Sloc
: Source_Ptr
)
77 pragma Inline
(Make_Unused_At_End
);
79 function Make_Identifier
(Sloc
: Source_Ptr
;
82 pragma Inline
(Make_Identifier
);
84 function Make_Integer_Literal
(Sloc
: Source_Ptr
;
87 pragma Inline
(Make_Integer_Literal
);
89 function Make_Real_Literal
(Sloc
: Source_Ptr
;
92 pragma Inline
(Make_Real_Literal
);
94 function Make_Character_Literal
(Sloc
: Source_Ptr
;
96 Char_Literal_Value
: Char_Code
)
98 pragma Inline
(Make_Character_Literal
);
100 function Make_String_Literal
(Sloc
: Source_Ptr
;
103 pragma Inline
(Make_String_Literal
);
105 function Make_Pragma
(Sloc
: Source_Ptr
;
107 Pragma_Argument_Associations
: List_Id
:= No_List
;
108 Debug_Statement
: Node_Id
:= Empty
)
110 pragma Inline
(Make_Pragma
);
112 function Make_Pragma_Argument_Association
(Sloc
: Source_Ptr
;
113 Chars
: Name_Id
:= No_Name
;
114 Expression
: Node_Id
)
116 pragma Inline
(Make_Pragma_Argument_Association
);
118 function Make_Defining_Identifier
(Sloc
: Source_Ptr
;
121 pragma Inline
(Make_Defining_Identifier
);
123 function Make_Full_Type_Declaration
(Sloc
: Source_Ptr
;
124 Defining_Identifier
: Node_Id
;
125 Discriminant_Specifications
: List_Id
:= No_List
;
126 Type_Definition
: Node_Id
)
128 pragma Inline
(Make_Full_Type_Declaration
);
130 function Make_Subtype_Declaration
(Sloc
: Source_Ptr
;
131 Defining_Identifier
: Node_Id
;
132 Subtype_Indication
: Node_Id
)
134 pragma Inline
(Make_Subtype_Declaration
);
136 function Make_Subtype_Indication
(Sloc
: Source_Ptr
;
137 Subtype_Mark
: Node_Id
;
138 Constraint
: Node_Id
)
140 pragma Inline
(Make_Subtype_Indication
);
142 function Make_Object_Declaration
(Sloc
: Source_Ptr
;
143 Defining_Identifier
: Node_Id
;
144 Aliased_Present
: Boolean := False;
145 Constant_Present
: Boolean := False;
146 Object_Definition
: Node_Id
;
147 Expression
: Node_Id
:= Empty
)
149 pragma Inline
(Make_Object_Declaration
);
151 function Make_Number_Declaration
(Sloc
: Source_Ptr
;
152 Defining_Identifier
: Node_Id
;
153 Expression
: Node_Id
)
155 pragma Inline
(Make_Number_Declaration
);
157 function Make_Derived_Type_Definition
(Sloc
: Source_Ptr
;
158 Abstract_Present
: Boolean := False;
159 Subtype_Indication
: Node_Id
;
160 Record_Extension_Part
: Node_Id
:= Empty
)
162 pragma Inline
(Make_Derived_Type_Definition
);
164 function Make_Range_Constraint
(Sloc
: Source_Ptr
;
165 Range_Expression
: Node_Id
)
167 pragma Inline
(Make_Range_Constraint
);
169 function Make_Range
(Sloc
: Source_Ptr
;
171 High_Bound
: Node_Id
;
172 Includes_Infinities
: Boolean := False)
174 pragma Inline
(Make_Range
);
176 function Make_Enumeration_Type_Definition
(Sloc
: Source_Ptr
;
178 End_Label
: Node_Id
:= Empty
)
180 pragma Inline
(Make_Enumeration_Type_Definition
);
182 function Make_Defining_Character_Literal
(Sloc
: Source_Ptr
;
185 pragma Inline
(Make_Defining_Character_Literal
);
187 function Make_Signed_Integer_Type_Definition
(Sloc
: Source_Ptr
;
189 High_Bound
: Node_Id
)
191 pragma Inline
(Make_Signed_Integer_Type_Definition
);
193 function Make_Modular_Type_Definition
(Sloc
: Source_Ptr
;
194 Expression
: Node_Id
)
196 pragma Inline
(Make_Modular_Type_Definition
);
198 function Make_Floating_Point_Definition
(Sloc
: Source_Ptr
;
199 Digits_Expression
: Node_Id
;
200 Real_Range_Specification
: Node_Id
:= Empty
)
202 pragma Inline
(Make_Floating_Point_Definition
);
204 function Make_Real_Range_Specification
(Sloc
: Source_Ptr
;
206 High_Bound
: Node_Id
)
208 pragma Inline
(Make_Real_Range_Specification
);
210 function Make_Ordinary_Fixed_Point_Definition
(Sloc
: Source_Ptr
;
211 Delta_Expression
: Node_Id
;
212 Real_Range_Specification
: Node_Id
)
214 pragma Inline
(Make_Ordinary_Fixed_Point_Definition
);
216 function Make_Decimal_Fixed_Point_Definition
(Sloc
: Source_Ptr
;
217 Delta_Expression
: Node_Id
;
218 Digits_Expression
: Node_Id
;
219 Real_Range_Specification
: Node_Id
:= Empty
)
221 pragma Inline
(Make_Decimal_Fixed_Point_Definition
);
223 function Make_Digits_Constraint
(Sloc
: Source_Ptr
;
224 Digits_Expression
: Node_Id
;
225 Range_Constraint
: Node_Id
:= Empty
)
227 pragma Inline
(Make_Digits_Constraint
);
229 function Make_Unconstrained_Array_Definition
(Sloc
: Source_Ptr
;
230 Subtype_Marks
: List_Id
;
231 Aliased_Present
: Boolean := False;
232 Subtype_Indication
: Node_Id
)
234 pragma Inline
(Make_Unconstrained_Array_Definition
);
236 function Make_Constrained_Array_Definition
(Sloc
: Source_Ptr
;
237 Discrete_Subtype_Definitions
: List_Id
;
238 Aliased_Present
: Boolean := False;
239 Subtype_Indication
: Node_Id
)
241 pragma Inline
(Make_Constrained_Array_Definition
);
243 function Make_Discriminant_Specification
(Sloc
: Source_Ptr
;
244 Defining_Identifier
: Node_Id
;
245 Discriminant_Type
: Node_Id
;
246 Expression
: Node_Id
:= Empty
)
248 pragma Inline
(Make_Discriminant_Specification
);
250 function Make_Index_Or_Discriminant_Constraint
(Sloc
: Source_Ptr
;
251 Constraints
: List_Id
)
253 pragma Inline
(Make_Index_Or_Discriminant_Constraint
);
255 function Make_Discriminant_Association
(Sloc
: Source_Ptr
;
256 Selector_Names
: List_Id
;
257 Expression
: Node_Id
)
259 pragma Inline
(Make_Discriminant_Association
);
261 function Make_Record_Definition
(Sloc
: Source_Ptr
;
262 End_Label
: Node_Id
:= Empty
;
263 Abstract_Present
: Boolean := False;
264 Tagged_Present
: Boolean := False;
265 Limited_Present
: Boolean := False;
266 Component_List
: Node_Id
;
267 Null_Present
: Boolean := False)
269 pragma Inline
(Make_Record_Definition
);
271 function Make_Component_List
(Sloc
: Source_Ptr
;
272 Component_Items
: List_Id
;
273 Variant_Part
: Node_Id
:= Empty
;
274 Null_Present
: Boolean := False)
276 pragma Inline
(Make_Component_List
);
278 function Make_Component_Declaration
(Sloc
: Source_Ptr
;
279 Defining_Identifier
: Node_Id
;
280 Aliased_Present
: Boolean := False;
281 Subtype_Indication
: Node_Id
;
282 Expression
: Node_Id
:= Empty
)
284 pragma Inline
(Make_Component_Declaration
);
286 function Make_Variant_Part
(Sloc
: Source_Ptr
;
290 pragma Inline
(Make_Variant_Part
);
292 function Make_Variant
(Sloc
: Source_Ptr
;
293 Discrete_Choices
: List_Id
;
294 Component_List
: Node_Id
)
296 pragma Inline
(Make_Variant
);
298 function Make_Others_Choice
(Sloc
: Source_Ptr
)
300 pragma Inline
(Make_Others_Choice
);
302 function Make_Access_To_Object_Definition
(Sloc
: Source_Ptr
;
303 All_Present
: Boolean := False;
304 Subtype_Indication
: Node_Id
;
305 Constant_Present
: Boolean := False)
307 pragma Inline
(Make_Access_To_Object_Definition
);
309 function Make_Access_Function_Definition
(Sloc
: Source_Ptr
;
310 Protected_Present
: Boolean := False;
311 Parameter_Specifications
: List_Id
:= No_List
;
312 Subtype_Mark
: Node_Id
)
314 pragma Inline
(Make_Access_Function_Definition
);
316 function Make_Access_Procedure_Definition
(Sloc
: Source_Ptr
;
317 Protected_Present
: Boolean := False;
318 Parameter_Specifications
: List_Id
:= No_List
)
320 pragma Inline
(Make_Access_Procedure_Definition
);
322 function Make_Access_Definition
(Sloc
: Source_Ptr
;
323 Subtype_Mark
: Node_Id
)
325 pragma Inline
(Make_Access_Definition
);
327 function Make_Incomplete_Type_Declaration
(Sloc
: Source_Ptr
;
328 Defining_Identifier
: Node_Id
;
329 Discriminant_Specifications
: List_Id
:= No_List
;
330 Unknown_Discriminants_Present
: Boolean := False)
332 pragma Inline
(Make_Incomplete_Type_Declaration
);
334 function Make_Explicit_Dereference
(Sloc
: Source_Ptr
;
337 pragma Inline
(Make_Explicit_Dereference
);
339 function Make_Indexed_Component
(Sloc
: Source_Ptr
;
341 Expressions
: List_Id
)
343 pragma Inline
(Make_Indexed_Component
);
345 function Make_Slice
(Sloc
: Source_Ptr
;
347 Discrete_Range
: Node_Id
)
349 pragma Inline
(Make_Slice
);
351 function Make_Selected_Component
(Sloc
: Source_Ptr
;
353 Selector_Name
: Node_Id
)
355 pragma Inline
(Make_Selected_Component
);
357 function Make_Attribute_Reference
(Sloc
: Source_Ptr
;
359 Attribute_Name
: Name_Id
;
360 Expressions
: List_Id
:= No_List
;
361 Must_Be_Byte_Aligned
: Boolean := False)
363 pragma Inline
(Make_Attribute_Reference
);
365 function Make_Aggregate
(Sloc
: Source_Ptr
;
366 Expressions
: List_Id
:= No_List
;
367 Component_Associations
: List_Id
:= No_List
;
368 Null_Record_Present
: Boolean := False)
370 pragma Inline
(Make_Aggregate
);
372 function Make_Component_Association
(Sloc
: Source_Ptr
;
374 Expression
: Node_Id
;
375 Box_Present
: Boolean := False)
377 pragma Inline
(Make_Component_Association
);
379 function Make_Extension_Aggregate
(Sloc
: Source_Ptr
;
380 Ancestor_Part
: Node_Id
;
381 Expressions
: List_Id
:= No_List
;
382 Component_Associations
: List_Id
:= No_List
;
383 Null_Record_Present
: Boolean := False)
385 pragma Inline
(Make_Extension_Aggregate
);
387 function Make_Null
(Sloc
: Source_Ptr
)
389 pragma Inline
(Make_Null
);
391 function Make_And_Then
(Sloc
: Source_Ptr
;
393 Right_Opnd
: Node_Id
)
395 pragma Inline
(Make_And_Then
);
397 function Make_Or_Else
(Sloc
: Source_Ptr
;
399 Right_Opnd
: Node_Id
)
401 pragma Inline
(Make_Or_Else
);
403 function Make_In
(Sloc
: Source_Ptr
;
405 Right_Opnd
: Node_Id
)
407 pragma Inline
(Make_In
);
409 function Make_Not_In
(Sloc
: Source_Ptr
;
411 Right_Opnd
: Node_Id
)
413 pragma Inline
(Make_Not_In
);
415 function Make_Op_And
(Sloc
: Source_Ptr
;
417 Right_Opnd
: Node_Id
)
419 pragma Inline
(Make_Op_And
);
421 function Make_Op_Or
(Sloc
: Source_Ptr
;
423 Right_Opnd
: Node_Id
)
425 pragma Inline
(Make_Op_Or
);
427 function Make_Op_Xor
(Sloc
: Source_Ptr
;
429 Right_Opnd
: Node_Id
)
431 pragma Inline
(Make_Op_Xor
);
433 function Make_Op_Eq
(Sloc
: Source_Ptr
;
435 Right_Opnd
: Node_Id
)
437 pragma Inline
(Make_Op_Eq
);
439 function Make_Op_Ne
(Sloc
: Source_Ptr
;
441 Right_Opnd
: Node_Id
)
443 pragma Inline
(Make_Op_Ne
);
445 function Make_Op_Lt
(Sloc
: Source_Ptr
;
447 Right_Opnd
: Node_Id
)
449 pragma Inline
(Make_Op_Lt
);
451 function Make_Op_Le
(Sloc
: Source_Ptr
;
453 Right_Opnd
: Node_Id
)
455 pragma Inline
(Make_Op_Le
);
457 function Make_Op_Gt
(Sloc
: Source_Ptr
;
459 Right_Opnd
: Node_Id
)
461 pragma Inline
(Make_Op_Gt
);
463 function Make_Op_Ge
(Sloc
: Source_Ptr
;
465 Right_Opnd
: Node_Id
)
467 pragma Inline
(Make_Op_Ge
);
469 function Make_Op_Add
(Sloc
: Source_Ptr
;
471 Right_Opnd
: Node_Id
)
473 pragma Inline
(Make_Op_Add
);
475 function Make_Op_Subtract
(Sloc
: Source_Ptr
;
477 Right_Opnd
: Node_Id
)
479 pragma Inline
(Make_Op_Subtract
);
481 function Make_Op_Concat
(Sloc
: Source_Ptr
;
483 Right_Opnd
: Node_Id
)
485 pragma Inline
(Make_Op_Concat
);
487 function Make_Op_Multiply
(Sloc
: Source_Ptr
;
489 Right_Opnd
: Node_Id
)
491 pragma Inline
(Make_Op_Multiply
);
493 function Make_Op_Divide
(Sloc
: Source_Ptr
;
495 Right_Opnd
: Node_Id
)
497 pragma Inline
(Make_Op_Divide
);
499 function Make_Op_Mod
(Sloc
: Source_Ptr
;
501 Right_Opnd
: Node_Id
)
503 pragma Inline
(Make_Op_Mod
);
505 function Make_Op_Rem
(Sloc
: Source_Ptr
;
507 Right_Opnd
: Node_Id
)
509 pragma Inline
(Make_Op_Rem
);
511 function Make_Op_Expon
(Sloc
: Source_Ptr
;
513 Right_Opnd
: Node_Id
)
515 pragma Inline
(Make_Op_Expon
);
517 function Make_Op_Plus
(Sloc
: Source_Ptr
;
518 Right_Opnd
: Node_Id
)
520 pragma Inline
(Make_Op_Plus
);
522 function Make_Op_Minus
(Sloc
: Source_Ptr
;
523 Right_Opnd
: Node_Id
)
525 pragma Inline
(Make_Op_Minus
);
527 function Make_Op_Abs
(Sloc
: Source_Ptr
;
528 Right_Opnd
: Node_Id
)
530 pragma Inline
(Make_Op_Abs
);
532 function Make_Op_Not
(Sloc
: Source_Ptr
;
533 Right_Opnd
: Node_Id
)
535 pragma Inline
(Make_Op_Not
);
537 function Make_Type_Conversion
(Sloc
: Source_Ptr
;
538 Subtype_Mark
: Node_Id
;
539 Expression
: Node_Id
)
541 pragma Inline
(Make_Type_Conversion
);
543 function Make_Qualified_Expression
(Sloc
: Source_Ptr
;
544 Subtype_Mark
: Node_Id
;
545 Expression
: Node_Id
)
547 pragma Inline
(Make_Qualified_Expression
);
549 function Make_Allocator
(Sloc
: Source_Ptr
;
550 Expression
: Node_Id
)
552 pragma Inline
(Make_Allocator
);
554 function Make_Null_Statement
(Sloc
: Source_Ptr
)
556 pragma Inline
(Make_Null_Statement
);
558 function Make_Label
(Sloc
: Source_Ptr
;
559 Identifier
: Node_Id
)
561 pragma Inline
(Make_Label
);
563 function Make_Assignment_Statement
(Sloc
: Source_Ptr
;
565 Expression
: Node_Id
)
567 pragma Inline
(Make_Assignment_Statement
);
569 function Make_If_Statement
(Sloc
: Source_Ptr
;
571 Then_Statements
: List_Id
;
572 Elsif_Parts
: List_Id
:= No_List
;
573 Else_Statements
: List_Id
:= No_List
;
574 End_Span
: Uint
:= No_Uint
)
576 pragma Inline
(Make_If_Statement
);
578 function Make_Elsif_Part
(Sloc
: Source_Ptr
;
580 Then_Statements
: List_Id
)
582 pragma Inline
(Make_Elsif_Part
);
584 function Make_Case_Statement
(Sloc
: Source_Ptr
;
585 Expression
: Node_Id
;
586 Alternatives
: List_Id
;
587 End_Span
: Uint
:= No_Uint
)
589 pragma Inline
(Make_Case_Statement
);
591 function Make_Case_Statement_Alternative
(Sloc
: Source_Ptr
;
592 Discrete_Choices
: List_Id
;
593 Statements
: List_Id
)
595 pragma Inline
(Make_Case_Statement_Alternative
);
597 function Make_Loop_Statement
(Sloc
: Source_Ptr
;
598 Identifier
: Node_Id
:= Empty
;
599 Iteration_Scheme
: Node_Id
:= Empty
;
600 Statements
: List_Id
;
602 Has_Created_Identifier
: Boolean := False;
603 Is_Null_Loop
: Boolean := False)
605 pragma Inline
(Make_Loop_Statement
);
607 function Make_Iteration_Scheme
(Sloc
: Source_Ptr
;
608 Condition
: Node_Id
:= Empty
;
609 Loop_Parameter_Specification
: Node_Id
:= Empty
)
611 pragma Inline
(Make_Iteration_Scheme
);
613 function Make_Loop_Parameter_Specification
(Sloc
: Source_Ptr
;
614 Defining_Identifier
: Node_Id
;
615 Reverse_Present
: Boolean := False;
616 Discrete_Subtype_Definition
: Node_Id
)
618 pragma Inline
(Make_Loop_Parameter_Specification
);
620 function Make_Block_Statement
(Sloc
: Source_Ptr
;
621 Identifier
: Node_Id
:= Empty
;
622 Declarations
: List_Id
:= No_List
;
623 Handled_Statement_Sequence
: Node_Id
;
624 Has_Created_Identifier
: Boolean := False;
625 Is_Task_Allocation_Block
: Boolean := False;
626 Is_Asynchronous_Call_Block
: Boolean := False)
628 pragma Inline
(Make_Block_Statement
);
630 function Make_Exit_Statement
(Sloc
: Source_Ptr
;
631 Name
: Node_Id
:= Empty
;
632 Condition
: Node_Id
:= Empty
)
634 pragma Inline
(Make_Exit_Statement
);
636 function Make_Goto_Statement
(Sloc
: Source_Ptr
;
639 pragma Inline
(Make_Goto_Statement
);
641 function Make_Subprogram_Declaration
(Sloc
: Source_Ptr
;
642 Specification
: Node_Id
)
644 pragma Inline
(Make_Subprogram_Declaration
);
646 function Make_Abstract_Subprogram_Declaration
(Sloc
: Source_Ptr
;
647 Specification
: Node_Id
)
649 pragma Inline
(Make_Abstract_Subprogram_Declaration
);
651 function Make_Function_Specification
(Sloc
: Source_Ptr
;
652 Defining_Unit_Name
: Node_Id
;
653 Parameter_Specifications
: List_Id
:= No_List
;
654 Subtype_Mark
: Node_Id
)
656 pragma Inline
(Make_Function_Specification
);
658 function Make_Procedure_Specification
(Sloc
: Source_Ptr
;
659 Defining_Unit_Name
: Node_Id
;
660 Parameter_Specifications
: List_Id
:= No_List
)
662 pragma Inline
(Make_Procedure_Specification
);
664 function Make_Designator
(Sloc
: Source_Ptr
;
666 Identifier
: Node_Id
)
668 pragma Inline
(Make_Designator
);
670 function Make_Defining_Program_Unit_Name
(Sloc
: Source_Ptr
;
672 Defining_Identifier
: Node_Id
)
674 pragma Inline
(Make_Defining_Program_Unit_Name
);
676 function Make_Operator_Symbol
(Sloc
: Source_Ptr
;
680 pragma Inline
(Make_Operator_Symbol
);
682 function Make_Defining_Operator_Symbol
(Sloc
: Source_Ptr
;
685 pragma Inline
(Make_Defining_Operator_Symbol
);
687 function Make_Parameter_Specification
(Sloc
: Source_Ptr
;
688 Defining_Identifier
: Node_Id
;
689 In_Present
: Boolean := False;
690 Out_Present
: Boolean := False;
691 Parameter_Type
: Node_Id
;
692 Expression
: Node_Id
:= Empty
)
694 pragma Inline
(Make_Parameter_Specification
);
696 function Make_Subprogram_Body
(Sloc
: Source_Ptr
;
697 Specification
: Node_Id
;
698 Declarations
: List_Id
;
699 Handled_Statement_Sequence
: Node_Id
;
700 Bad_Is_Detected
: Boolean := False)
702 pragma Inline
(Make_Subprogram_Body
);
704 function Make_Procedure_Call_Statement
(Sloc
: Source_Ptr
;
706 Parameter_Associations
: List_Id
:= No_List
)
708 pragma Inline
(Make_Procedure_Call_Statement
);
710 function Make_Function_Call
(Sloc
: Source_Ptr
;
712 Parameter_Associations
: List_Id
:= No_List
)
714 pragma Inline
(Make_Function_Call
);
716 function Make_Parameter_Association
(Sloc
: Source_Ptr
;
717 Selector_Name
: Node_Id
;
718 Explicit_Actual_Parameter
: Node_Id
)
720 pragma Inline
(Make_Parameter_Association
);
722 function Make_Return_Statement
(Sloc
: Source_Ptr
;
723 Expression
: Node_Id
:= Empty
)
725 pragma Inline
(Make_Return_Statement
);
727 function Make_Package_Declaration
(Sloc
: Source_Ptr
;
728 Specification
: Node_Id
)
730 pragma Inline
(Make_Package_Declaration
);
732 function Make_Package_Specification
(Sloc
: Source_Ptr
;
733 Defining_Unit_Name
: Node_Id
;
734 Visible_Declarations
: List_Id
;
735 Private_Declarations
: List_Id
:= No_List
;
738 pragma Inline
(Make_Package_Specification
);
740 function Make_Package_Body
(Sloc
: Source_Ptr
;
741 Defining_Unit_Name
: Node_Id
;
742 Declarations
: List_Id
;
743 Handled_Statement_Sequence
: Node_Id
:= Empty
)
745 pragma Inline
(Make_Package_Body
);
747 function Make_Private_Type_Declaration
(Sloc
: Source_Ptr
;
748 Defining_Identifier
: Node_Id
;
749 Discriminant_Specifications
: List_Id
:= No_List
;
750 Unknown_Discriminants_Present
: Boolean := False;
751 Abstract_Present
: Boolean := False;
752 Tagged_Present
: Boolean := False;
753 Limited_Present
: Boolean := False)
755 pragma Inline
(Make_Private_Type_Declaration
);
757 function Make_Private_Extension_Declaration
(Sloc
: Source_Ptr
;
758 Defining_Identifier
: Node_Id
;
759 Discriminant_Specifications
: List_Id
:= No_List
;
760 Unknown_Discriminants_Present
: Boolean := False;
761 Abstract_Present
: Boolean := False;
762 Subtype_Indication
: Node_Id
)
764 pragma Inline
(Make_Private_Extension_Declaration
);
766 function Make_Use_Package_Clause
(Sloc
: Source_Ptr
;
769 pragma Inline
(Make_Use_Package_Clause
);
771 function Make_Use_Type_Clause
(Sloc
: Source_Ptr
;
772 Subtype_Marks
: List_Id
)
774 pragma Inline
(Make_Use_Type_Clause
);
776 function Make_Object_Renaming_Declaration
(Sloc
: Source_Ptr
;
777 Defining_Identifier
: Node_Id
;
778 Subtype_Mark
: Node_Id
;
781 pragma Inline
(Make_Object_Renaming_Declaration
);
783 function Make_Exception_Renaming_Declaration
(Sloc
: Source_Ptr
;
784 Defining_Identifier
: Node_Id
;
787 pragma Inline
(Make_Exception_Renaming_Declaration
);
789 function Make_Package_Renaming_Declaration
(Sloc
: Source_Ptr
;
790 Defining_Unit_Name
: Node_Id
;
793 pragma Inline
(Make_Package_Renaming_Declaration
);
795 function Make_Subprogram_Renaming_Declaration
(Sloc
: Source_Ptr
;
796 Specification
: Node_Id
;
799 pragma Inline
(Make_Subprogram_Renaming_Declaration
);
801 function Make_Generic_Package_Renaming_Declaration
(Sloc
: Source_Ptr
;
802 Defining_Unit_Name
: Node_Id
;
805 pragma Inline
(Make_Generic_Package_Renaming_Declaration
);
807 function Make_Generic_Procedure_Renaming_Declaration
(Sloc
: Source_Ptr
;
808 Defining_Unit_Name
: Node_Id
;
811 pragma Inline
(Make_Generic_Procedure_Renaming_Declaration
);
813 function Make_Generic_Function_Renaming_Declaration
(Sloc
: Source_Ptr
;
814 Defining_Unit_Name
: Node_Id
;
817 pragma Inline
(Make_Generic_Function_Renaming_Declaration
);
819 function Make_Task_Type_Declaration
(Sloc
: Source_Ptr
;
820 Defining_Identifier
: Node_Id
;
821 Discriminant_Specifications
: List_Id
:= No_List
;
822 Task_Definition
: Node_Id
:= Empty
)
824 pragma Inline
(Make_Task_Type_Declaration
);
826 function Make_Single_Task_Declaration
(Sloc
: Source_Ptr
;
827 Defining_Identifier
: Node_Id
;
828 Task_Definition
: Node_Id
:= Empty
)
830 pragma Inline
(Make_Single_Task_Declaration
);
832 function Make_Task_Definition
(Sloc
: Source_Ptr
;
833 Visible_Declarations
: List_Id
;
834 Private_Declarations
: List_Id
:= No_List
;
837 pragma Inline
(Make_Task_Definition
);
839 function Make_Task_Body
(Sloc
: Source_Ptr
;
840 Defining_Identifier
: Node_Id
;
841 Declarations
: List_Id
;
842 Handled_Statement_Sequence
: Node_Id
)
844 pragma Inline
(Make_Task_Body
);
846 function Make_Protected_Type_Declaration
(Sloc
: Source_Ptr
;
847 Defining_Identifier
: Node_Id
;
848 Discriminant_Specifications
: List_Id
:= No_List
;
849 Protected_Definition
: Node_Id
)
851 pragma Inline
(Make_Protected_Type_Declaration
);
853 function Make_Single_Protected_Declaration
(Sloc
: Source_Ptr
;
854 Defining_Identifier
: Node_Id
;
855 Protected_Definition
: Node_Id
)
857 pragma Inline
(Make_Single_Protected_Declaration
);
859 function Make_Protected_Definition
(Sloc
: Source_Ptr
;
860 Visible_Declarations
: List_Id
;
861 Private_Declarations
: List_Id
:= No_List
;
864 pragma Inline
(Make_Protected_Definition
);
866 function Make_Protected_Body
(Sloc
: Source_Ptr
;
867 Defining_Identifier
: Node_Id
;
868 Declarations
: List_Id
;
871 pragma Inline
(Make_Protected_Body
);
873 function Make_Entry_Declaration
(Sloc
: Source_Ptr
;
874 Defining_Identifier
: Node_Id
;
875 Discrete_Subtype_Definition
: Node_Id
:= Empty
;
876 Parameter_Specifications
: List_Id
:= No_List
)
878 pragma Inline
(Make_Entry_Declaration
);
880 function Make_Accept_Statement
(Sloc
: Source_Ptr
;
881 Entry_Direct_Name
: Node_Id
;
882 Entry_Index
: Node_Id
:= Empty
;
883 Parameter_Specifications
: List_Id
:= No_List
;
884 Handled_Statement_Sequence
: Node_Id
;
885 Declarations
: List_Id
:= No_List
)
887 pragma Inline
(Make_Accept_Statement
);
889 function Make_Entry_Body
(Sloc
: Source_Ptr
;
890 Defining_Identifier
: Node_Id
;
891 Entry_Body_Formal_Part
: Node_Id
;
892 Declarations
: List_Id
;
893 Handled_Statement_Sequence
: Node_Id
)
895 pragma Inline
(Make_Entry_Body
);
897 function Make_Entry_Body_Formal_Part
(Sloc
: Source_Ptr
;
898 Entry_Index_Specification
: Node_Id
:= Empty
;
899 Parameter_Specifications
: List_Id
:= No_List
;
902 pragma Inline
(Make_Entry_Body_Formal_Part
);
904 function Make_Entry_Index_Specification
(Sloc
: Source_Ptr
;
905 Defining_Identifier
: Node_Id
;
906 Discrete_Subtype_Definition
: Node_Id
)
908 pragma Inline
(Make_Entry_Index_Specification
);
910 function Make_Entry_Call_Statement
(Sloc
: Source_Ptr
;
912 Parameter_Associations
: List_Id
:= No_List
)
914 pragma Inline
(Make_Entry_Call_Statement
);
916 function Make_Requeue_Statement
(Sloc
: Source_Ptr
;
918 Abort_Present
: Boolean := False)
920 pragma Inline
(Make_Requeue_Statement
);
922 function Make_Delay_Until_Statement
(Sloc
: Source_Ptr
;
923 Expression
: Node_Id
)
925 pragma Inline
(Make_Delay_Until_Statement
);
927 function Make_Delay_Relative_Statement
(Sloc
: Source_Ptr
;
928 Expression
: Node_Id
)
930 pragma Inline
(Make_Delay_Relative_Statement
);
932 function Make_Selective_Accept
(Sloc
: Source_Ptr
;
933 Select_Alternatives
: List_Id
;
934 Else_Statements
: List_Id
:= No_List
)
936 pragma Inline
(Make_Selective_Accept
);
938 function Make_Accept_Alternative
(Sloc
: Source_Ptr
;
939 Accept_Statement
: Node_Id
;
940 Condition
: Node_Id
:= Empty
;
941 Statements
: List_Id
:= Empty_List
;
942 Pragmas_Before
: List_Id
:= No_List
)
944 pragma Inline
(Make_Accept_Alternative
);
946 function Make_Delay_Alternative
(Sloc
: Source_Ptr
;
947 Delay_Statement
: Node_Id
;
948 Condition
: Node_Id
:= Empty
;
949 Statements
: List_Id
:= Empty_List
;
950 Pragmas_Before
: List_Id
:= No_List
)
952 pragma Inline
(Make_Delay_Alternative
);
954 function Make_Terminate_Alternative
(Sloc
: Source_Ptr
;
955 Condition
: Node_Id
:= Empty
;
956 Pragmas_Before
: List_Id
:= No_List
;
957 Pragmas_After
: List_Id
:= No_List
)
959 pragma Inline
(Make_Terminate_Alternative
);
961 function Make_Timed_Entry_Call
(Sloc
: Source_Ptr
;
962 Entry_Call_Alternative
: Node_Id
;
963 Delay_Alternative
: Node_Id
)
965 pragma Inline
(Make_Timed_Entry_Call
);
967 function Make_Entry_Call_Alternative
(Sloc
: Source_Ptr
;
968 Entry_Call_Statement
: Node_Id
;
969 Statements
: List_Id
:= Empty_List
;
970 Pragmas_Before
: List_Id
:= No_List
)
972 pragma Inline
(Make_Entry_Call_Alternative
);
974 function Make_Conditional_Entry_Call
(Sloc
: Source_Ptr
;
975 Entry_Call_Alternative
: Node_Id
;
976 Else_Statements
: List_Id
)
978 pragma Inline
(Make_Conditional_Entry_Call
);
980 function Make_Asynchronous_Select
(Sloc
: Source_Ptr
;
981 Triggering_Alternative
: Node_Id
;
982 Abortable_Part
: Node_Id
)
984 pragma Inline
(Make_Asynchronous_Select
);
986 function Make_Triggering_Alternative
(Sloc
: Source_Ptr
;
987 Triggering_Statement
: Node_Id
;
988 Statements
: List_Id
:= Empty_List
;
989 Pragmas_Before
: List_Id
:= No_List
)
991 pragma Inline
(Make_Triggering_Alternative
);
993 function Make_Abortable_Part
(Sloc
: Source_Ptr
;
994 Statements
: List_Id
)
996 pragma Inline
(Make_Abortable_Part
);
998 function Make_Abort_Statement
(Sloc
: Source_Ptr
;
1001 pragma Inline
(Make_Abort_Statement
);
1003 function Make_Compilation_Unit
(Sloc
: Source_Ptr
;
1004 Context_Items
: List_Id
;
1005 Private_Present
: Boolean := False;
1007 Aux_Decls_Node
: Node_Id
)
1009 pragma Inline
(Make_Compilation_Unit
);
1011 function Make_Compilation_Unit_Aux
(Sloc
: Source_Ptr
;
1012 Declarations
: List_Id
:= No_List
;
1013 Actions
: List_Id
:= No_List
;
1014 Pragmas_After
: List_Id
:= No_List
;
1015 Config_Pragmas
: List_Id
:= Empty_List
)
1017 pragma Inline
(Make_Compilation_Unit_Aux
);
1019 function Make_With_Clause
(Sloc
: Source_Ptr
;
1021 First_Name
: Boolean := True;
1022 Last_Name
: Boolean := True;
1023 Limited_Present
: Boolean := False)
1025 pragma Inline
(Make_With_Clause
);
1027 function Make_With_Type_Clause
(Sloc
: Source_Ptr
;
1029 Tagged_Present
: Boolean := False)
1031 pragma Inline
(Make_With_Type_Clause
);
1033 function Make_Subprogram_Body_Stub
(Sloc
: Source_Ptr
;
1034 Specification
: Node_Id
)
1036 pragma Inline
(Make_Subprogram_Body_Stub
);
1038 function Make_Package_Body_Stub
(Sloc
: Source_Ptr
;
1039 Defining_Identifier
: Node_Id
)
1041 pragma Inline
(Make_Package_Body_Stub
);
1043 function Make_Task_Body_Stub
(Sloc
: Source_Ptr
;
1044 Defining_Identifier
: Node_Id
)
1046 pragma Inline
(Make_Task_Body_Stub
);
1048 function Make_Protected_Body_Stub
(Sloc
: Source_Ptr
;
1049 Defining_Identifier
: Node_Id
)
1051 pragma Inline
(Make_Protected_Body_Stub
);
1053 function Make_Subunit
(Sloc
: Source_Ptr
;
1055 Proper_Body
: Node_Id
)
1057 pragma Inline
(Make_Subunit
);
1059 function Make_Exception_Declaration
(Sloc
: Source_Ptr
;
1060 Defining_Identifier
: Node_Id
)
1062 pragma Inline
(Make_Exception_Declaration
);
1064 function Make_Handled_Sequence_Of_Statements
(Sloc
: Source_Ptr
;
1065 Statements
: List_Id
;
1066 End_Label
: Node_Id
:= Empty
;
1067 Exception_Handlers
: List_Id
:= No_List
;
1068 At_End_Proc
: Node_Id
:= Empty
)
1070 pragma Inline
(Make_Handled_Sequence_Of_Statements
);
1072 function Make_Exception_Handler
(Sloc
: Source_Ptr
;
1073 Choice_Parameter
: Node_Id
:= Empty
;
1074 Exception_Choices
: List_Id
;
1075 Statements
: List_Id
)
1077 pragma Inline
(Make_Exception_Handler
);
1079 function Make_Raise_Statement
(Sloc
: Source_Ptr
;
1080 Name
: Node_Id
:= Empty
)
1082 pragma Inline
(Make_Raise_Statement
);
1084 function Make_Generic_Subprogram_Declaration
(Sloc
: Source_Ptr
;
1085 Specification
: Node_Id
;
1086 Generic_Formal_Declarations
: List_Id
)
1088 pragma Inline
(Make_Generic_Subprogram_Declaration
);
1090 function Make_Generic_Package_Declaration
(Sloc
: Source_Ptr
;
1091 Specification
: Node_Id
;
1092 Generic_Formal_Declarations
: List_Id
)
1094 pragma Inline
(Make_Generic_Package_Declaration
);
1096 function Make_Package_Instantiation
(Sloc
: Source_Ptr
;
1097 Defining_Unit_Name
: Node_Id
;
1099 Generic_Associations
: List_Id
:= No_List
)
1101 pragma Inline
(Make_Package_Instantiation
);
1103 function Make_Procedure_Instantiation
(Sloc
: Source_Ptr
;
1104 Defining_Unit_Name
: Node_Id
;
1106 Generic_Associations
: List_Id
:= No_List
)
1108 pragma Inline
(Make_Procedure_Instantiation
);
1110 function Make_Function_Instantiation
(Sloc
: Source_Ptr
;
1111 Defining_Unit_Name
: Node_Id
;
1113 Generic_Associations
: List_Id
:= No_List
)
1115 pragma Inline
(Make_Function_Instantiation
);
1117 function Make_Generic_Association
(Sloc
: Source_Ptr
;
1118 Selector_Name
: Node_Id
:= Empty
;
1119 Explicit_Generic_Actual_Parameter
: Node_Id
)
1121 pragma Inline
(Make_Generic_Association
);
1123 function Make_Formal_Object_Declaration
(Sloc
: Source_Ptr
;
1124 Defining_Identifier
: Node_Id
;
1125 In_Present
: Boolean := False;
1126 Out_Present
: Boolean := False;
1127 Subtype_Mark
: Node_Id
;
1128 Expression
: Node_Id
:= Empty
)
1130 pragma Inline
(Make_Formal_Object_Declaration
);
1132 function Make_Formal_Type_Declaration
(Sloc
: Source_Ptr
;
1133 Defining_Identifier
: Node_Id
;
1134 Formal_Type_Definition
: Node_Id
;
1135 Discriminant_Specifications
: List_Id
:= No_List
;
1136 Unknown_Discriminants_Present
: Boolean := False)
1138 pragma Inline
(Make_Formal_Type_Declaration
);
1140 function Make_Formal_Private_Type_Definition
(Sloc
: Source_Ptr
;
1141 Abstract_Present
: Boolean := False;
1142 Tagged_Present
: Boolean := False;
1143 Limited_Present
: Boolean := False)
1145 pragma Inline
(Make_Formal_Private_Type_Definition
);
1147 function Make_Formal_Derived_Type_Definition
(Sloc
: Source_Ptr
;
1148 Subtype_Mark
: Node_Id
;
1149 Private_Present
: Boolean := False;
1150 Abstract_Present
: Boolean := False)
1152 pragma Inline
(Make_Formal_Derived_Type_Definition
);
1154 function Make_Formal_Discrete_Type_Definition
(Sloc
: Source_Ptr
)
1156 pragma Inline
(Make_Formal_Discrete_Type_Definition
);
1158 function Make_Formal_Signed_Integer_Type_Definition
(Sloc
: Source_Ptr
)
1160 pragma Inline
(Make_Formal_Signed_Integer_Type_Definition
);
1162 function Make_Formal_Modular_Type_Definition
(Sloc
: Source_Ptr
)
1164 pragma Inline
(Make_Formal_Modular_Type_Definition
);
1166 function Make_Formal_Floating_Point_Definition
(Sloc
: Source_Ptr
)
1168 pragma Inline
(Make_Formal_Floating_Point_Definition
);
1170 function Make_Formal_Ordinary_Fixed_Point_Definition
(Sloc
: Source_Ptr
)
1172 pragma Inline
(Make_Formal_Ordinary_Fixed_Point_Definition
);
1174 function Make_Formal_Decimal_Fixed_Point_Definition
(Sloc
: Source_Ptr
)
1176 pragma Inline
(Make_Formal_Decimal_Fixed_Point_Definition
);
1178 function Make_Formal_Subprogram_Declaration
(Sloc
: Source_Ptr
;
1179 Specification
: Node_Id
;
1180 Default_Name
: Node_Id
:= Empty
;
1181 Box_Present
: Boolean := False)
1183 pragma Inline
(Make_Formal_Subprogram_Declaration
);
1185 function Make_Formal_Package_Declaration
(Sloc
: Source_Ptr
;
1186 Defining_Identifier
: Node_Id
;
1188 Generic_Associations
: List_Id
:= No_List
;
1189 Box_Present
: Boolean := False)
1191 pragma Inline
(Make_Formal_Package_Declaration
);
1193 function Make_Attribute_Definition_Clause
(Sloc
: Source_Ptr
;
1196 Expression
: Node_Id
)
1198 pragma Inline
(Make_Attribute_Definition_Clause
);
1200 function Make_Enumeration_Representation_Clause
(Sloc
: Source_Ptr
;
1201 Identifier
: Node_Id
;
1202 Array_Aggregate
: Node_Id
)
1204 pragma Inline
(Make_Enumeration_Representation_Clause
);
1206 function Make_Record_Representation_Clause
(Sloc
: Source_Ptr
;
1207 Identifier
: Node_Id
;
1208 Mod_Clause
: Node_Id
:= Empty
;
1209 Component_Clauses
: List_Id
)
1211 pragma Inline
(Make_Record_Representation_Clause
);
1213 function Make_Component_Clause
(Sloc
: Source_Ptr
;
1214 Component_Name
: Node_Id
;
1216 First_Bit
: Node_Id
;
1219 pragma Inline
(Make_Component_Clause
);
1221 function Make_Code_Statement
(Sloc
: Source_Ptr
;
1222 Expression
: Node_Id
)
1224 pragma Inline
(Make_Code_Statement
);
1226 function Make_Op_Rotate_Left
(Sloc
: Source_Ptr
;
1227 Left_Opnd
: Node_Id
;
1228 Right_Opnd
: Node_Id
)
1230 pragma Inline
(Make_Op_Rotate_Left
);
1232 function Make_Op_Rotate_Right
(Sloc
: Source_Ptr
;
1233 Left_Opnd
: Node_Id
;
1234 Right_Opnd
: Node_Id
)
1236 pragma Inline
(Make_Op_Rotate_Right
);
1238 function Make_Op_Shift_Left
(Sloc
: Source_Ptr
;
1239 Left_Opnd
: Node_Id
;
1240 Right_Opnd
: Node_Id
)
1242 pragma Inline
(Make_Op_Shift_Left
);
1244 function Make_Op_Shift_Right_Arithmetic
(Sloc
: Source_Ptr
;
1245 Left_Opnd
: Node_Id
;
1246 Right_Opnd
: Node_Id
)
1248 pragma Inline
(Make_Op_Shift_Right_Arithmetic
);
1250 function Make_Op_Shift_Right
(Sloc
: Source_Ptr
;
1251 Left_Opnd
: Node_Id
;
1252 Right_Opnd
: Node_Id
)
1254 pragma Inline
(Make_Op_Shift_Right
);
1256 function Make_Delta_Constraint
(Sloc
: Source_Ptr
;
1257 Delta_Expression
: Node_Id
;
1258 Range_Constraint
: Node_Id
:= Empty
)
1260 pragma Inline
(Make_Delta_Constraint
);
1262 function Make_At_Clause
(Sloc
: Source_Ptr
;
1263 Identifier
: Node_Id
;
1264 Expression
: Node_Id
)
1266 pragma Inline
(Make_At_Clause
);
1268 function Make_Mod_Clause
(Sloc
: Source_Ptr
;
1269 Expression
: Node_Id
;
1270 Pragmas_Before
: List_Id
)
1272 pragma Inline
(Make_Mod_Clause
);
1274 function Make_Conditional_Expression
(Sloc
: Source_Ptr
;
1275 Expressions
: List_Id
)
1277 pragma Inline
(Make_Conditional_Expression
);
1279 function Make_Expanded_Name
(Sloc
: Source_Ptr
;
1282 Selector_Name
: Node_Id
)
1284 pragma Inline
(Make_Expanded_Name
);
1286 function Make_Free_Statement
(Sloc
: Source_Ptr
;
1287 Expression
: Node_Id
)
1289 pragma Inline
(Make_Free_Statement
);
1291 function Make_Freeze_Entity
(Sloc
: Source_Ptr
;
1292 Actions
: List_Id
:= No_List
)
1294 pragma Inline
(Make_Freeze_Entity
);
1296 function Make_Implicit_Label_Declaration
(Sloc
: Source_Ptr
;
1297 Defining_Identifier
: Node_Id
)
1299 pragma Inline
(Make_Implicit_Label_Declaration
);
1301 function Make_Itype_Reference
(Sloc
: Source_Ptr
)
1303 pragma Inline
(Make_Itype_Reference
);
1305 function Make_Raise_Constraint_Error
(Sloc
: Source_Ptr
;
1306 Condition
: Node_Id
:= Empty
;
1309 pragma Inline
(Make_Raise_Constraint_Error
);
1311 function Make_Raise_Program_Error
(Sloc
: Source_Ptr
;
1312 Condition
: Node_Id
:= Empty
;
1315 pragma Inline
(Make_Raise_Program_Error
);
1317 function Make_Raise_Storage_Error
(Sloc
: Source_Ptr
;
1318 Condition
: Node_Id
:= Empty
;
1321 pragma Inline
(Make_Raise_Storage_Error
);
1323 function Make_Reference
(Sloc
: Source_Ptr
;
1326 pragma Inline
(Make_Reference
);
1328 function Make_Subprogram_Info
(Sloc
: Source_Ptr
;
1329 Identifier
: Node_Id
)
1331 pragma Inline
(Make_Subprogram_Info
);
1333 function Make_Unchecked_Expression
(Sloc
: Source_Ptr
;
1334 Expression
: Node_Id
)
1336 pragma Inline
(Make_Unchecked_Expression
);
1338 function Make_Unchecked_Type_Conversion
(Sloc
: Source_Ptr
;
1339 Subtype_Mark
: Node_Id
;
1340 Expression
: Node_Id
)
1342 pragma Inline
(Make_Unchecked_Type_Conversion
);
1344 function Make_Validate_Unchecked_Conversion
(Sloc
: Source_Ptr
)
1346 pragma Inline
(Make_Validate_Unchecked_Conversion
);