annotate gcc/fortran/constructor.h @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Array and structure constructors
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
2 Copyright (C) 2009-2020 Free Software Foundation, Inc.
111
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 This file is part of GCC.
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 GCC is free software; you can redistribute it and/or modify it under
kono
parents:
diff changeset
7 the terms of the GNU General Public License as published by the Free
kono
parents:
diff changeset
8 Software Foundation; either version 3, or (at your option) any later
kono
parents:
diff changeset
9 version.
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
kono
parents:
diff changeset
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
kono
parents:
diff changeset
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
kono
parents:
diff changeset
14 for more details.
kono
parents:
diff changeset
15
kono
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
kono
parents:
diff changeset
17 along with GCC; see the file COPYING3. If not see
kono
parents:
diff changeset
18 <http://www.gnu.org/licenses/>. */
kono
parents:
diff changeset
19
kono
parents:
diff changeset
20 #ifndef GFC_CONSTRUCTOR_H
kono
parents:
diff changeset
21 #define GFC_CONSTRUCTOR_H
kono
parents:
diff changeset
22
kono
parents:
diff changeset
23 /* Get a new constructor structure. */
kono
parents:
diff changeset
24 gfc_constructor *gfc_constructor_get (void);
kono
parents:
diff changeset
25
kono
parents:
diff changeset
26 gfc_constructor_base gfc_constructor_get_base (void);
kono
parents:
diff changeset
27
kono
parents:
diff changeset
28 /* Copy a constructor structure. */
kono
parents:
diff changeset
29 gfc_constructor_base gfc_constructor_copy (gfc_constructor_base base);
kono
parents:
diff changeset
30
kono
parents:
diff changeset
31
kono
parents:
diff changeset
32 /* Free a gfc_constructor structure. */
kono
parents:
diff changeset
33 void gfc_constructor_free (gfc_constructor_base base);
kono
parents:
diff changeset
34
kono
parents:
diff changeset
35
kono
parents:
diff changeset
36 /* Given an constructor structure, append the expression node onto
kono
parents:
diff changeset
37 the constructor. Returns the constructor node appended. */
kono
parents:
diff changeset
38 gfc_constructor *gfc_constructor_append (gfc_constructor_base *base,
kono
parents:
diff changeset
39 gfc_constructor *c);
kono
parents:
diff changeset
40
kono
parents:
diff changeset
41 gfc_constructor *gfc_constructor_append_expr (gfc_constructor_base *base,
kono
parents:
diff changeset
42 gfc_expr *e, locus *where);
kono
parents:
diff changeset
43
kono
parents:
diff changeset
44
kono
parents:
diff changeset
45 /* Given an constructor structure, place the expression node at position.
kono
parents:
diff changeset
46 Returns the constructor node inserted. */
kono
parents:
diff changeset
47 gfc_constructor *gfc_constructor_insert (gfc_constructor_base *base,
kono
parents:
diff changeset
48 gfc_constructor *c, int n);
kono
parents:
diff changeset
49
kono
parents:
diff changeset
50 gfc_constructor *gfc_constructor_insert_expr (gfc_constructor_base *base,
kono
parents:
diff changeset
51 gfc_expr *e, locus *where,
kono
parents:
diff changeset
52 int n);
kono
parents:
diff changeset
53
kono
parents:
diff changeset
54 /* Given an array constructor expression and an element number (starting
kono
parents:
diff changeset
55 at zero), return a pointer to the array element. NULL is returned if
kono
parents:
diff changeset
56 the size of the array has been exceeded. The expression node returned
kono
parents:
diff changeset
57 remains a part of the array and should not be freed. */
kono
parents:
diff changeset
58
kono
parents:
diff changeset
59 gfc_constructor *gfc_constructor_lookup (gfc_constructor_base base, int n);
kono
parents:
diff changeset
60
kono
parents:
diff changeset
61 /* Convenience function. Same as ...
kono
parents:
diff changeset
62 gfc_constructor *c = gfc_constructor_lookup (base, n);
kono
parents:
diff changeset
63 gfc_expr *e = c ? c->expr : NULL;
kono
parents:
diff changeset
64 */
kono
parents:
diff changeset
65 gfc_expr *gfc_constructor_lookup_expr (gfc_constructor_base base, int n);
kono
parents:
diff changeset
66
kono
parents:
diff changeset
67
kono
parents:
diff changeset
68 int gfc_constructor_expr_foreach (gfc_constructor *ctor, int(*)(gfc_expr *));
kono
parents:
diff changeset
69
kono
parents:
diff changeset
70
kono
parents:
diff changeset
71 void gfc_constructor_swap (gfc_constructor *ctor, int n, int m);
kono
parents:
diff changeset
72
kono
parents:
diff changeset
73
kono
parents:
diff changeset
74
kono
parents:
diff changeset
75 /* Get the first constructor node in the constructure structure.
kono
parents:
diff changeset
76 Returns NULL if there is no such expression. */
kono
parents:
diff changeset
77 gfc_constructor *gfc_constructor_first (gfc_constructor_base base);
kono
parents:
diff changeset
78
kono
parents:
diff changeset
79 /* Get the next constructor node in the constructure structure.
kono
parents:
diff changeset
80 Returns NULL if there is no next expression. */
kono
parents:
diff changeset
81 gfc_constructor *gfc_constructor_next (gfc_constructor *ctor);
kono
parents:
diff changeset
82
kono
parents:
diff changeset
83 /* Remove the gfc_constructor node from the splay tree. */
kono
parents:
diff changeset
84 void gfc_constructor_remove (gfc_constructor *);
kono
parents:
diff changeset
85
kono
parents:
diff changeset
86 /* Return first constructor node after offset. */
kono
parents:
diff changeset
87 gfc_constructor *gfc_constructor_lookup_next (gfc_constructor_base, int);
kono
parents:
diff changeset
88
kono
parents:
diff changeset
89 #endif /* GFC_CONSTRUCTOR_H */