annotate gcc/ada/exp_aggr.ads @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ------------------------------------------------------------------------------
kono
parents:
diff changeset
2 -- --
kono
parents:
diff changeset
3 -- GNAT COMPILER COMPONENTS --
kono
parents:
diff changeset
4 -- --
kono
parents:
diff changeset
5 -- E X P _ A G G R --
kono
parents:
diff changeset
6 -- --
kono
parents:
diff changeset
7 -- S p e c --
kono
parents:
diff changeset
8 -- --
kono
parents:
diff changeset
9 -- Copyright (C) 1992-2016, Free Software Foundation, Inc. --
kono
parents:
diff changeset
10 -- --
kono
parents:
diff changeset
11 -- GNAT is free software; you can redistribute it and/or modify it under --
kono
parents:
diff changeset
12 -- terms of the GNU General Public License as published by the Free Soft- --
kono
parents:
diff changeset
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
kono
parents:
diff changeset
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
kono
parents:
diff changeset
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
kono
parents:
diff changeset
16 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
kono
parents:
diff changeset
17 -- for more details. You should have received a copy of the GNU General --
kono
parents:
diff changeset
18 -- Public License distributed with GNAT; see file COPYING3. If not, go to --
kono
parents:
diff changeset
19 -- http://www.gnu.org/licenses for a complete copy of the license. --
kono
parents:
diff changeset
20 -- --
kono
parents:
diff changeset
21 -- GNAT was originally developed by the GNAT team at New York University. --
kono
parents:
diff changeset
22 -- Extensive contributions were provided by Ada Core Technologies Inc. --
kono
parents:
diff changeset
23 -- --
kono
parents:
diff changeset
24 ------------------------------------------------------------------------------
kono
parents:
diff changeset
25
kono
parents:
diff changeset
26 with Types; use Types;
kono
parents:
diff changeset
27
kono
parents:
diff changeset
28 package Exp_Aggr is
kono
parents:
diff changeset
29
kono
parents:
diff changeset
30 procedure Expand_N_Aggregate (N : Node_Id);
kono
parents:
diff changeset
31 procedure Expand_N_Delta_Aggregate (N : Node_Id);
kono
parents:
diff changeset
32 procedure Expand_N_Extension_Aggregate (N : Node_Id);
kono
parents:
diff changeset
33
kono
parents:
diff changeset
34 function Is_Delayed_Aggregate (N : Node_Id) return Boolean;
kono
parents:
diff changeset
35 -- Returns True if N is an aggregate of some kind whose Expansion_Delayed
kono
parents:
diff changeset
36 -- flag is set (see sinfo for meaning of flag).
kono
parents:
diff changeset
37
kono
parents:
diff changeset
38 procedure Convert_Aggr_In_Object_Decl (N : Node_Id);
kono
parents:
diff changeset
39 -- N is a N_Object_Declaration with an expression which must be an
kono
parents:
diff changeset
40 -- N_Aggregate or N_Extension_Aggregate with Expansion_Delayed.
kono
parents:
diff changeset
41 -- This procedure performs in-place aggregate assignment.
kono
parents:
diff changeset
42
kono
parents:
diff changeset
43 procedure Convert_Aggr_In_Allocator
kono
parents:
diff changeset
44 (Alloc : Node_Id;
kono
parents:
diff changeset
45 Decl : Node_Id;
kono
parents:
diff changeset
46 Aggr : Node_Id);
kono
parents:
diff changeset
47 -- Alloc is the allocator whose expression is the aggregate Aggr.
kono
parents:
diff changeset
48 -- Decl is an N_Object_Declaration created during allocator expansion.
kono
parents:
diff changeset
49 -- This procedure performs in-place aggregate assignment into the
kono
parents:
diff changeset
50 -- temporary declared in Decl, and the allocator becomes an access to
kono
parents:
diff changeset
51 -- that temporary.
kono
parents:
diff changeset
52
kono
parents:
diff changeset
53 procedure Convert_Aggr_In_Assignment (N : Node_Id);
kono
parents:
diff changeset
54 -- If the right-hand side of an assignment is an aggregate, expand the
kono
parents:
diff changeset
55 -- statement into a series of individual component assignments. This is
kono
parents:
diff changeset
56 -- done if there are non-static values involved in either the bounds or
kono
parents:
diff changeset
57 -- the components, and the aggregate cannot be handled as a whole by the
kono
parents:
diff changeset
58 -- backend.
kono
parents:
diff changeset
59
kono
parents:
diff changeset
60 function Static_Array_Aggregate (N : Node_Id) return Boolean;
kono
parents:
diff changeset
61 -- N is an array aggregate that may have a component association with
kono
parents:
diff changeset
62 -- an others clause and a range. If bounds are static and the expressions
kono
parents:
diff changeset
63 -- are compile-time known constants, rewrite N as a purely positional
kono
parents:
diff changeset
64 -- aggregate, to be use to initialize variables and components of the type
kono
parents:
diff changeset
65 -- without generating elaboration code.
kono
parents:
diff changeset
66
kono
parents:
diff changeset
67 end Exp_Aggr;