line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package GCC::Node::Declaration; |
2
|
1
|
|
|
1
|
|
8
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
57
|
|
3
|
1
|
|
|
1
|
|
5
|
use base qw(GCC::Node); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
1007
|
|
4
|
|
|
|
|
|
|
# 'd' for codes for declarations (also serving as variable refs). |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
# DECL_NAME |
7
|
0
|
|
|
0
|
0
|
|
sub name { shift->{name} } |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# DECL_ASSEMBLER_NAME |
10
|
0
|
0
|
|
0
|
0
|
|
sub assembler_name { shift->{mngl} || '' } |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
# TREE_TYPE |
13
|
0
|
|
|
0
|
0
|
|
sub type { shift->{type} } |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# DECL_CONTEXT |
16
|
0
|
|
|
0
|
0
|
|
sub context { shift->{scpe} } |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
# DECL_SOURCE_FILE |
19
|
0
|
|
|
0
|
0
|
|
sub source { shift->{source} } |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
# DECL_ARTIFICIAL |
22
|
0
|
|
|
0
|
0
|
|
sub artificial { shift->{artificial} } |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
# TREE_CHAIN |
25
|
0
|
|
|
0
|
0
|
|
sub chain { shift->{chan} } |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
# DECL_LANGUAGE != lang_cplusplus |
28
|
0
|
|
|
0
|
0
|
|
sub C { shift->{C} } |
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
0
|
0
|
|
sub access { shift->{access} } |
31
|
0
|
|
|
0
|
0
|
|
sub private { shift->{private} } |
32
|
0
|
|
|
0
|
0
|
|
sub protected { shift->{protected} } |
33
|
0
|
0
|
|
0
|
0
|
|
sub public { $_[0]->{public} || !$_[0]->{access} } |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
# DEFTREECODE (FUNCTION_DECL, "function_decl", 'd', 0) |
36
|
|
|
|
|
|
|
package GCC::Node::function_decl; |
37
|
1
|
|
|
1
|
|
7
|
use base qw(GCC::Node::Declaration); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
700
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
# DECL_ARGUMENTS |
40
|
0
|
|
|
0
|
|
|
sub args { shift->{args} } |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
# DECL_EXTERNAL |
43
|
0
|
|
|
0
|
|
|
sub external { shift->{undefined} } |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
# !TREE_PUBLIC |
46
|
0
|
|
|
0
|
|
|
sub static { shift->{static} } |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
# DECL_SAVED_TREE |
49
|
0
|
|
|
0
|
|
|
sub body { shift->{body} } |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
# DECL_OVERLOADED_OPERATOR_P |
52
|
|
|
|
|
|
|
sub operator { |
53
|
0
|
|
|
0
|
|
|
my $self = shift; |
54
|
0
|
0
|
|
|
|
|
return undef unless $self->{operator}; |
55
|
0
|
0
|
|
|
|
|
if($self->conversion) { |
56
|
|
|
|
|
|
|
# return the type or something |
57
|
|
|
|
|
|
|
# my $type = $self->type->retn->var_type; |
58
|
|
|
|
|
|
|
# $type =~ s/\@//; |
59
|
|
|
|
|
|
|
# return $type; |
60
|
0
|
|
|
|
|
|
return "CONVERSION"; |
61
|
|
|
|
|
|
|
} else { |
62
|
0
|
|
|
|
|
|
return $GCC::TranslationUnit::Parser::ops{ $self->{operator} }; |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
# DECL_FUNCTION_MEMBER_P |
67
|
0
|
|
|
0
|
|
|
sub member { shift->{member} } |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
# DECL_PURE_VIRTUAL_P |
70
|
0
|
|
|
0
|
|
|
sub pure { shift->{pure} } |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
# DECL_VIRTUAL_P |
73
|
0
|
|
|
0
|
|
|
sub virtual { shift->{virtual} } |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
# DECL_CONSTRUCTOR_P |
76
|
0
|
|
|
0
|
|
|
sub constructor { shift->{constructor} } |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
# DECL_DESTRUCTOR_P |
79
|
0
|
|
|
0
|
|
|
sub destructor { shift->{destructor} } |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
# DECL_CONV_FN_P |
82
|
0
|
|
|
0
|
|
|
sub conversion { shift->{conversion} } |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
# DECL_GLOBAL_CTOR_P |
85
|
0
|
|
|
0
|
|
|
sub global_init { shift->{'global init'} } |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
# DECL_GLOBAL_DTOR_P |
88
|
0
|
|
|
0
|
|
|
sub global_fini { shift->{'global fini'} } |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
# GLOBAL_INIT_PRIORITY |
91
|
0
|
|
|
0
|
|
|
sub init_priority { shift->{prio} } |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
# DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION |
94
|
0
|
|
|
0
|
|
|
sub pseudo_tmpl { shift->{'pseudo tmpl'} } |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
# DECL_THUNK_P |
97
|
0
|
|
|
0
|
|
|
sub thunk { shift->{thunk} } |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
# THUNK_DELTA |
100
|
0
|
|
|
0
|
|
|
sub delta { shift->{dlta} } |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
# THUNK_VCALL_OFFSET |
103
|
0
|
|
|
0
|
|
|
sub vcall_offset { shift->{vcll} } |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
# DECL_INITIAL |
106
|
0
|
|
|
0
|
|
|
sub fn { shift->{fn} } |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
# DEFTREECODE (LABEL_DECL, "label_decl", 'd', 0) |
109
|
1
|
|
|
1
|
|
6
|
package GCC::Node::label_decl; use base qw(GCC::Node::Declaration); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
86
|
|
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
# DEFTREECODE (CONST_DECL, "const_decl", 'd', 0) |
112
|
|
|
|
|
|
|
package GCC::Node::const_decl; |
113
|
1
|
|
|
1
|
|
6
|
use base qw(GCC::Node::Declaration); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
103
|
|
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
# DECL_INITIAL |
116
|
0
|
|
|
0
|
|
|
sub initial { shift->{cnst} } |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
# DEFTREECODE (TYPE_DECL, "type_decl", 'd', 0) |
119
|
1
|
|
|
1
|
|
4
|
package GCC::Node::type_decl; use base qw(GCC::Node::Declaration); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
75
|
|
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
# DEFTREECODE (VAR_DECL, "var_decl", 'd', 0) |
122
|
|
|
|
|
|
|
package GCC::Node::var_decl; |
123
|
1
|
|
|
1
|
|
12
|
use base qw(GCC::Node::Declaration); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
221
|
|
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
# DECL_INITIAL |
126
|
0
|
|
|
0
|
|
|
sub initial { shift->{init} } |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
# DECL_SIZE |
129
|
0
|
|
|
0
|
|
|
sub size { shift->{size} } |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
# DECL_ALIGN |
132
|
0
|
|
|
0
|
|
|
sub align { shift->{align} } |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
# TREE_USED |
135
|
0
|
|
|
0
|
|
|
sub used { shift->{used} } |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
# DECL_REGISTER |
138
|
0
|
|
|
0
|
|
|
sub register { shift->{register} } |
139
|
|
|
|
|
|
|
|
140
|
0
|
0
|
|
0
|
|
|
sub access { shift->{access} || 'public' } |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
# TREE_STATIC && !TREE_PUBLIC |
143
|
0
|
|
|
0
|
|
|
sub static { shift->{static} } |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
# DEFTREECODE (PARM_DECL, "parm_decl", 'd', 0) |
146
|
|
|
|
|
|
|
package GCC::Node::parm_decl; |
147
|
1
|
|
|
1
|
|
5
|
use base qw(GCC::Node::Declaration); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
178
|
|
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
# DECL_ARG_TYPE |
150
|
0
|
|
|
0
|
|
|
sub arg_type { shift->{argt} } |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
# DECL_SIZE |
153
|
0
|
|
|
0
|
|
|
sub size { shift->{size} } |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
# DECL_ALIGN |
156
|
0
|
|
|
0
|
|
|
sub align { shift->{algn} } |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
# TREE_USED |
159
|
0
|
|
|
0
|
|
|
sub used { shift->{used} } |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
# DECL_REGISTER |
162
|
0
|
|
|
0
|
|
|
sub register { shift->{register} } |
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
# DEFTREECODE (RESULT_DECL, "result_decl", 'd', 0) |
165
|
|
|
|
|
|
|
package GCC::Node::result_decl; |
166
|
1
|
|
|
1
|
|
5
|
use base qw(GCC::Node::Declaration); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
257
|
|
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
# DECL_INITIAL |
169
|
0
|
|
|
0
|
|
|
sub initial { shift->{init} } |
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
# DECL_SIZE |
172
|
0
|
|
|
0
|
|
|
sub size { shift->{size} } |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
# DECL_ALIGN |
175
|
0
|
|
|
0
|
|
|
sub align { shift->{algn} } |
176
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
# DEFTREECODE (FIELD_DECL, "field_decl", 'd', 0) |
178
|
|
|
|
|
|
|
package GCC::Node::field_decl; |
179
|
1
|
|
|
1
|
|
5
|
use base qw(GCC::Node::Declaration); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
195
|
|
180
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
# DECL_INITIAL |
182
|
0
|
|
|
0
|
|
|
sub initial { shift->{init} } |
183
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
# DECL_SIZE |
185
|
0
|
|
|
0
|
|
|
sub size { shift->{size} } |
186
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
# DECL_ALIGN |
188
|
0
|
|
|
0
|
|
|
sub align { shift->{algn} } |
189
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
# DECL_C_BIT_FIELD |
191
|
0
|
|
|
0
|
|
|
sub bitfield { shift->{bitfield} } |
192
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
# bit_position |
194
|
0
|
|
|
0
|
|
|
sub bit_position { shift->{bpos} } |
195
|
|
|
|
|
|
|
|
196
|
0
|
0
|
|
0
|
|
|
sub access { shift->{access} || 'public' } |
197
|
|
|
|
|
|
|
|
198
|
|
|
|
|
|
|
# DECL_MUTABLE_P |
199
|
0
|
|
|
0
|
|
|
sub mutable { shift->{mutable} } |
200
|
|
|
|
|
|
|
|
201
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
# DEFTREECODE (NAMESPACE_DECL, "namespace_decl", 'd', 0) |
203
|
|
|
|
|
|
|
package GCC::Node::namespace_decl; |
204
|
1
|
|
|
1
|
|
5
|
use base qw(GCC::Node::Declaration); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
124
|
|
205
|
|
|
|
|
|
|
|
206
|
|
|
|
|
|
|
# DECL_NAMESPACE_ALIAS |
207
|
0
|
|
|
0
|
|
|
sub alias { shift->{alis} } |
208
|
|
|
|
|
|
|
|
209
|
|
|
|
|
|
|
# cp_namespace_decls |
210
|
0
|
|
|
0
|
|
|
sub decls { shift->{dcls} } |
211
|
|
|
|
|
|
|
|
212
|
|
|
|
|
|
|
# DEFTREECODE (TEMPLATE_DECL, "template_decl", 'd', 0) |
213
|
|
|
|
|
|
|
package GCC::Node::template_decl; |
214
|
1
|
|
|
1
|
|
6
|
use base qw(GCC::Node::Declaration); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
148
|
|
215
|
|
|
|
|
|
|
|
216
|
|
|
|
|
|
|
# DECL_TEMPLATE_RESULT |
217
|
0
|
|
|
0
|
|
|
sub result { shift->{rslt} } |
218
|
|
|
|
|
|
|
|
219
|
|
|
|
|
|
|
# DECL_TEMPLATE_INSTATIATIONS |
220
|
0
|
|
|
0
|
|
|
sub instantiations { shift->{inst} } |
221
|
|
|
|
|
|
|
|
222
|
|
|
|
|
|
|
# DECL_TEMPLATE_SPECIALIZATIONS |
223
|
0
|
|
|
0
|
|
|
sub specializations { shift->{spcs} } |
224
|
|
|
|
|
|
|
|
225
|
|
|
|
|
|
|
# DECL_TEMPLATE_PARMS |
226
|
0
|
|
|
0
|
|
|
sub parms { shift->{prms} } |
227
|
|
|
|
|
|
|
|
228
|
|
|
|
|
|
|
# DEFTREECODE (USING_DECL, "using_decl", 'd', 0) |
229
|
1
|
|
|
1
|
|
5
|
package GCC::Node::using_decl; use base qw(GCC::Node::Declaration); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
71
|
|
230
|
|
|
|
|
|
|
|
231
|
|
|
|
|
|
|
# vim:set shiftwidth=4 softtabstop=4: |
232
|
|
|
|
|
|
|
1; |