OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/kernel.h" | 5 #include "vm/kernel.h" |
6 | 6 |
7 #if !defined(DART_PRECOMPILED_RUNTIME) | 7 #if !defined(DART_PRECOMPILED_RUNTIME) |
8 namespace dart { | 8 namespace dart { |
9 | 9 |
10 namespace kernel { | 10 namespace kernel { |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 static_cast<Statement*&>(body_) = body; | 89 static_cast<Statement*&>(body_) = body; |
90 } | 90 } |
91 | 91 |
92 | 92 |
93 Expression::~Expression() {} | 93 Expression::~Expression() {} |
94 | 94 |
95 | 95 |
96 InvalidExpression::~InvalidExpression() {} | 96 InvalidExpression::~InvalidExpression() {} |
97 | 97 |
98 | 98 |
99 void InvalidExpression::AcceptExpressionVisitor(ExpressionVisitor* visitor) { | |
100 visitor->VisitInvalidExpression(this); | |
101 } | |
102 | |
103 | |
104 | |
105 VariableGet::~VariableGet() {} | 99 VariableGet::~VariableGet() {} |
106 | 100 |
107 | 101 |
108 void VariableGet::AcceptExpressionVisitor(ExpressionVisitor* visitor) { | |
109 visitor->VisitVariableGet(this); | |
110 } | |
111 | |
112 | |
113 VariableSet::~VariableSet() {} | 102 VariableSet::~VariableSet() {} |
114 | 103 |
115 | 104 |
116 void VariableSet::AcceptExpressionVisitor(ExpressionVisitor* visitor) { | |
117 visitor->VisitVariableSet(this); | |
118 } | |
119 | |
120 | |
121 PropertyGet::~PropertyGet() {} | 105 PropertyGet::~PropertyGet() {} |
122 | 106 |
123 | 107 |
124 void PropertyGet::AcceptExpressionVisitor(ExpressionVisitor* visitor) { | |
125 visitor->VisitPropertyGet(this); | |
126 } | |
127 | |
128 | |
129 PropertySet::~PropertySet() {} | 108 PropertySet::~PropertySet() {} |
130 | 109 |
131 | 110 |
132 void PropertySet::AcceptExpressionVisitor(ExpressionVisitor* visitor) { | |
133 visitor->VisitPropertySet(this); | |
134 } | |
135 | |
136 | |
137 DirectPropertyGet::~DirectPropertyGet() {} | 111 DirectPropertyGet::~DirectPropertyGet() {} |
138 | 112 |
139 | 113 |
140 void DirectPropertyGet::AcceptExpressionVisitor(ExpressionVisitor* visitor) { | |
141 visitor->VisitDirectPropertyGet(this); | |
142 } | |
143 | |
144 | |
145 DirectPropertySet::~DirectPropertySet() {} | 114 DirectPropertySet::~DirectPropertySet() {} |
146 | 115 |
147 | 116 |
148 void DirectPropertySet::AcceptExpressionVisitor(ExpressionVisitor* visitor) { | |
149 visitor->VisitDirectPropertySet(this); | |
150 } | |
151 | |
152 | |
153 StaticGet::~StaticGet() {} | 117 StaticGet::~StaticGet() {} |
154 | 118 |
155 | 119 |
156 void StaticGet::AcceptExpressionVisitor(ExpressionVisitor* visitor) { | |
157 visitor->VisitStaticGet(this); | |
158 } | |
159 | |
160 | |
161 StaticSet::~StaticSet() {} | 120 StaticSet::~StaticSet() {} |
162 | 121 |
163 | 122 |
164 void StaticSet::AcceptExpressionVisitor(ExpressionVisitor* visitor) { | |
165 visitor->VisitStaticSet(this); | |
166 } | |
167 | |
168 | |
169 Arguments::~Arguments() {} | 123 Arguments::~Arguments() {} |
170 | 124 |
171 | 125 |
172 NamedExpression::~NamedExpression() {} | 126 NamedExpression::~NamedExpression() {} |
173 | 127 |
174 | 128 |
175 MethodInvocation::~MethodInvocation() {} | 129 MethodInvocation::~MethodInvocation() {} |
176 | 130 |
177 | 131 |
178 void MethodInvocation::AcceptExpressionVisitor(ExpressionVisitor* visitor) { | |
179 visitor->VisitMethodInvocation(this); | |
180 } | |
181 | |
182 | |
183 DirectMethodInvocation::~DirectMethodInvocation() {} | 132 DirectMethodInvocation::~DirectMethodInvocation() {} |
184 | 133 |
185 | 134 |
186 void DirectMethodInvocation::AcceptExpressionVisitor( | |
187 ExpressionVisitor* visitor) { | |
188 visitor->VisitDirectMethodInvocation(this); | |
189 } | |
190 | |
191 | |
192 StaticInvocation::~StaticInvocation() {} | 135 StaticInvocation::~StaticInvocation() {} |
193 | 136 |
194 | 137 |
195 void StaticInvocation::AcceptExpressionVisitor(ExpressionVisitor* visitor) { | |
196 visitor->VisitStaticInvocation(this); | |
197 } | |
198 | |
199 | |
200 ConstructorInvocation::~ConstructorInvocation() {} | 138 ConstructorInvocation::~ConstructorInvocation() {} |
201 | 139 |
202 | 140 |
203 void ConstructorInvocation::AcceptExpressionVisitor( | |
204 ExpressionVisitor* visitor) { | |
205 visitor->VisitConstructorInvocation(this); | |
206 } | |
207 | |
208 | |
209 Not::~Not() {} | 141 Not::~Not() {} |
210 | 142 |
211 | 143 |
212 void Not::AcceptExpressionVisitor(ExpressionVisitor* visitor) { | |
213 visitor->VisitNot(this); | |
214 } | |
215 | |
216 | |
217 LogicalExpression::~LogicalExpression() {} | 144 LogicalExpression::~LogicalExpression() {} |
218 | 145 |
219 | 146 |
220 void LogicalExpression::AcceptExpressionVisitor(ExpressionVisitor* visitor) { | |
221 visitor->VisitLogicalExpression(this); | |
222 } | |
223 | |
224 | |
225 ConditionalExpression::~ConditionalExpression() {} | 147 ConditionalExpression::~ConditionalExpression() {} |
226 | 148 |
227 | 149 |
228 void ConditionalExpression::AcceptExpressionVisitor( | |
229 ExpressionVisitor* visitor) { | |
230 visitor->VisitConditionalExpression(this); | |
231 } | |
232 | |
233 | |
234 StringConcatenation::~StringConcatenation() {} | 150 StringConcatenation::~StringConcatenation() {} |
235 | 151 |
236 | 152 |
237 void StringConcatenation::AcceptExpressionVisitor(ExpressionVisitor* visitor) { | |
238 visitor->VisitStringConcatenation(this); | |
239 } | |
240 | |
241 | |
242 IsExpression::~IsExpression() {} | 153 IsExpression::~IsExpression() {} |
243 | 154 |
244 | 155 |
245 void IsExpression::AcceptExpressionVisitor(ExpressionVisitor* visitor) { | |
246 visitor->VisitIsExpression(this); | |
247 } | |
248 | |
249 | |
250 AsExpression::~AsExpression() {} | 156 AsExpression::~AsExpression() {} |
251 | 157 |
252 | 158 |
253 void AsExpression::AcceptExpressionVisitor(ExpressionVisitor* visitor) { | |
254 visitor->VisitAsExpression(this); | |
255 } | |
256 | |
257 | |
258 BasicLiteral::~BasicLiteral() {} | 159 BasicLiteral::~BasicLiteral() {} |
259 | 160 |
260 | 161 |
261 StringLiteral::~StringLiteral() {} | 162 StringLiteral::~StringLiteral() {} |
262 | 163 |
263 | 164 |
264 void StringLiteral::AcceptExpressionVisitor(ExpressionVisitor* visitor) { | |
265 visitor->VisitStringLiteral(this); | |
266 } | |
267 | |
268 | |
269 BigintLiteral::~BigintLiteral() {} | 165 BigintLiteral::~BigintLiteral() {} |
270 | 166 |
271 | 167 |
272 void BigintLiteral::AcceptExpressionVisitor(ExpressionVisitor* visitor) { | |
273 visitor->VisitBigintLiteral(this); | |
274 } | |
275 | |
276 | |
277 IntLiteral::~IntLiteral() {} | 168 IntLiteral::~IntLiteral() {} |
278 | 169 |
279 | 170 |
280 void IntLiteral::AcceptExpressionVisitor(ExpressionVisitor* visitor) { | |
281 visitor->VisitIntLiteral(this); | |
282 } | |
283 | |
284 | |
285 DoubleLiteral::~DoubleLiteral() {} | 171 DoubleLiteral::~DoubleLiteral() {} |
286 | 172 |
287 | 173 |
288 void DoubleLiteral::AcceptExpressionVisitor(ExpressionVisitor* visitor) { | |
289 visitor->VisitDoubleLiteral(this); | |
290 } | |
291 | |
292 | |
293 BoolLiteral::~BoolLiteral() {} | 174 BoolLiteral::~BoolLiteral() {} |
294 | 175 |
295 | 176 |
296 void BoolLiteral::AcceptExpressionVisitor(ExpressionVisitor* visitor) { | |
297 visitor->VisitBoolLiteral(this); | |
298 } | |
299 | |
300 | |
301 NullLiteral::~NullLiteral() {} | 177 NullLiteral::~NullLiteral() {} |
302 | 178 |
303 | 179 |
304 void NullLiteral::AcceptExpressionVisitor(ExpressionVisitor* visitor) { | |
305 visitor->VisitNullLiteral(this); | |
306 } | |
307 | |
308 | |
309 SymbolLiteral::~SymbolLiteral() {} | 180 SymbolLiteral::~SymbolLiteral() {} |
310 | 181 |
311 | 182 |
312 void SymbolLiteral::AcceptExpressionVisitor(ExpressionVisitor* visitor) { | |
313 visitor->VisitSymbolLiteral(this); | |
314 } | |
315 | |
316 | |
317 TypeLiteral::~TypeLiteral() {} | 183 TypeLiteral::~TypeLiteral() {} |
318 | 184 |
319 | 185 |
320 void TypeLiteral::AcceptExpressionVisitor(ExpressionVisitor* visitor) { | |
321 visitor->VisitTypeLiteral(this); | |
322 } | |
323 | |
324 | |
325 ThisExpression::~ThisExpression() {} | 186 ThisExpression::~ThisExpression() {} |
326 | 187 |
327 | 188 |
328 void ThisExpression::AcceptExpressionVisitor(ExpressionVisitor* visitor) { | |
329 visitor->VisitThisExpression(this); | |
330 } | |
331 | |
332 | |
333 Rethrow::~Rethrow() {} | 189 Rethrow::~Rethrow() {} |
334 | 190 |
335 | 191 |
336 void Rethrow::AcceptExpressionVisitor(ExpressionVisitor* visitor) { | |
337 visitor->VisitRethrow(this); | |
338 } | |
339 | |
340 | |
341 Throw::~Throw() {} | 192 Throw::~Throw() {} |
342 | 193 |
343 | 194 |
344 void Throw::AcceptExpressionVisitor(ExpressionVisitor* visitor) { | |
345 visitor->VisitThrow(this); | |
346 } | |
347 | |
348 | |
349 ListLiteral::~ListLiteral() {} | 195 ListLiteral::~ListLiteral() {} |
350 | 196 |
351 | 197 |
352 void ListLiteral::AcceptExpressionVisitor(ExpressionVisitor* visitor) { | |
353 visitor->VisitListLiteral(this); | |
354 } | |
355 | |
356 | |
357 MapLiteral::~MapLiteral() {} | 198 MapLiteral::~MapLiteral() {} |
358 | 199 |
359 | 200 |
360 void MapLiteral::AcceptExpressionVisitor(ExpressionVisitor* visitor) { | |
361 visitor->VisitMapLiteral(this); | |
362 } | |
363 | |
364 | |
365 MapEntry::~MapEntry() {} | 201 MapEntry::~MapEntry() {} |
366 | 202 |
367 | 203 |
368 AwaitExpression::~AwaitExpression() {} | 204 AwaitExpression::~AwaitExpression() {} |
369 | 205 |
370 | 206 |
371 void AwaitExpression::AcceptExpressionVisitor(ExpressionVisitor* visitor) { | |
372 visitor->VisitAwaitExpression(this); | |
373 } | |
374 | |
375 | |
376 FunctionExpression::~FunctionExpression() {} | 207 FunctionExpression::~FunctionExpression() {} |
377 | 208 |
378 | 209 |
379 void FunctionExpression::AcceptExpressionVisitor(ExpressionVisitor* visitor) { | |
380 visitor->VisitFunctionExpression(this); | |
381 } | |
382 | |
383 | |
384 Let::~Let() {} | 210 Let::~Let() {} |
385 | 211 |
386 | 212 |
387 void Let::AcceptExpressionVisitor(ExpressionVisitor* visitor) { | |
388 visitor->VisitLet(this); | |
389 } | |
390 | |
391 | |
392 VectorCreation::~VectorCreation() {} | 213 VectorCreation::~VectorCreation() {} |
393 | 214 |
394 | 215 |
395 void VectorCreation::AcceptExpressionVisitor(ExpressionVisitor* visitor) { | |
396 visitor->VisitVectorCreation(this); | |
397 } | |
398 | |
399 | |
400 VectorGet::~VectorGet() {} | 216 VectorGet::~VectorGet() {} |
401 | 217 |
402 | 218 |
403 void VectorGet::AcceptExpressionVisitor(ExpressionVisitor* visitor) { | |
404 visitor->VisitVectorGet(this); | |
405 } | |
406 | |
407 | |
408 VectorSet::~VectorSet() {} | 219 VectorSet::~VectorSet() {} |
409 | 220 |
410 | 221 |
411 void VectorSet::AcceptExpressionVisitor(ExpressionVisitor* visitor) { | |
412 visitor->VisitVectorSet(this); | |
413 } | |
414 | |
415 | |
416 VectorCopy::~VectorCopy() {} | 222 VectorCopy::~VectorCopy() {} |
417 | 223 |
418 | 224 |
419 void VectorCopy::AcceptExpressionVisitor(ExpressionVisitor* visitor) { | |
420 visitor->VisitVectorCopy(this); | |
421 } | |
422 | |
423 | |
424 ClosureCreation::~ClosureCreation() {} | 225 ClosureCreation::~ClosureCreation() {} |
425 | 226 |
426 | 227 |
427 void ClosureCreation::AcceptExpressionVisitor(ExpressionVisitor* visitor) { | |
428 visitor->VisitClosureCreation(this); | |
429 } | |
430 | |
431 | |
432 Statement::~Statement() {} | 228 Statement::~Statement() {} |
433 | 229 |
434 | 230 |
435 InvalidStatement::~InvalidStatement() {} | 231 InvalidStatement::~InvalidStatement() {} |
436 | 232 |
437 | 233 |
438 ExpressionStatement::~ExpressionStatement() {} | 234 ExpressionStatement::~ExpressionStatement() {} |
439 | 235 |
440 | 236 |
441 Block::~Block() {} | 237 Block::~Block() {} |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
500 | 296 |
501 Name::~Name() {} | 297 Name::~Name() {} |
502 | 298 |
503 | 299 |
504 DartType::~DartType() {} | 300 DartType::~DartType() {} |
505 | 301 |
506 | 302 |
507 InvalidType::~InvalidType() {} | 303 InvalidType::~InvalidType() {} |
508 | 304 |
509 | 305 |
510 void InvalidType::AcceptDartTypeVisitor(DartTypeVisitor* visitor) { | |
511 visitor->VisitInvalidType(this); | |
512 } | |
513 | |
514 | |
515 DynamicType::~DynamicType() {} | 306 DynamicType::~DynamicType() {} |
516 | 307 |
517 | 308 |
518 void DynamicType::AcceptDartTypeVisitor(DartTypeVisitor* visitor) { | |
519 visitor->VisitDynamicType(this); | |
520 } | |
521 | |
522 | |
523 VoidType::~VoidType() {} | 309 VoidType::~VoidType() {} |
524 | 310 |
525 | 311 |
526 void VoidType::AcceptDartTypeVisitor(DartTypeVisitor* visitor) { | |
527 visitor->VisitVoidType(this); | |
528 } | |
529 | |
530 | |
531 BottomType::~BottomType() {} | 312 BottomType::~BottomType() {} |
532 | 313 |
533 | 314 |
534 void BottomType::AcceptDartTypeVisitor(DartTypeVisitor* visitor) { | |
535 visitor->VisitBottomType(this); | |
536 } | |
537 | |
538 | |
539 InterfaceType::~InterfaceType() {} | 315 InterfaceType::~InterfaceType() {} |
540 | 316 |
541 | 317 |
542 void InterfaceType::AcceptDartTypeVisitor(DartTypeVisitor* visitor) { | |
543 visitor->VisitInterfaceType(this); | |
544 } | |
545 | |
546 | |
547 TypedefType::~TypedefType() {} | 318 TypedefType::~TypedefType() {} |
548 | 319 |
549 | 320 |
550 void TypedefType::AcceptDartTypeVisitor(DartTypeVisitor* visitor) { | |
551 visitor->VisitTypedefType(this); | |
552 } | |
553 | |
554 | |
555 FunctionType::~FunctionType() {} | 321 FunctionType::~FunctionType() {} |
556 | 322 |
557 | 323 |
558 void FunctionType::AcceptDartTypeVisitor(DartTypeVisitor* visitor) { | |
559 visitor->VisitFunctionType(this); | |
560 } | |
561 | |
562 | |
563 TypeParameterType::~TypeParameterType() {} | 324 TypeParameterType::~TypeParameterType() {} |
564 | 325 |
565 | 326 |
566 void TypeParameterType::AcceptDartTypeVisitor(DartTypeVisitor* visitor) { | |
567 visitor->VisitTypeParameterType(this); | |
568 } | |
569 | |
570 | |
571 VectorType::~VectorType() {} | 327 VectorType::~VectorType() {} |
572 | 328 |
573 | 329 |
574 void VectorType::AcceptDartTypeVisitor(DartTypeVisitor* visitor) { | |
575 visitor->VisitVectorType(this); | |
576 } | |
577 | |
578 | |
579 TypeParameter::~TypeParameter() {} | 330 TypeParameter::~TypeParameter() {} |
580 | 331 |
581 | 332 |
582 Program::~Program() { | 333 Program::~Program() { |
583 while (valid_token_positions.length() > 0) { | 334 while (valid_token_positions.length() > 0) { |
584 delete valid_token_positions.RemoveLast(); | 335 delete valid_token_positions.RemoveLast(); |
585 } | 336 } |
586 while (yield_token_positions.length() > 0) { | 337 while (yield_token_positions.length() > 0) { |
587 delete yield_token_positions.RemoveLast(); | 338 delete yield_token_positions.RemoveLast(); |
588 } | 339 } |
589 } | 340 } |
590 | 341 |
591 | 342 |
592 } // namespace kernel | 343 } // namespace kernel |
593 | 344 |
594 } // namespace dart | 345 } // namespace dart |
595 #endif // !defined(DART_PRECOMPILED_RUNTIME) | 346 #endif // !defined(DART_PRECOMPILED_RUNTIME) |
OLD | NEW |