Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(229)

Side by Side Diff: runtime/vm/kernel.cc

Issue 2931803002: [kernel] Cleanup kernel code after streaming (part 1). (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/kernel.h ('k') | runtime/vm/kernel_binary.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 {
11 11
12 12
13 template <typename T>
14 void VisitList(List<T>* list, Visitor* visitor) {
15 for (int i = 0; i < list->length(); ++i) {
16 (*list)[i]->AcceptVisitor(visitor);
17 }
18 }
19
20
21 Source::~Source() { 13 Source::~Source() {
22 delete[] uri_; 14 delete[] uri_;
23 delete[] source_code_; 15 delete[] source_code_;
24 delete[] line_starts_; 16 delete[] line_starts_;
25 } 17 }
26 18
27 19
28 SourceTable::~SourceTable() { 20 SourceTable::~SourceTable() {
29 delete[] sources_; 21 delete[] sources_;
30 } 22 }
31 23
32 24
33 Node::~Node() {} 25 Node::~Node() {}
34 26
35 27
36 TreeNode::~TreeNode() {} 28 TreeNode::~TreeNode() {}
37 29
38 30
39 void TreeNode::AcceptVisitor(Visitor* visitor) {
40 AcceptTreeVisitor(visitor);
41 }
42
43
44 LinkedNode::~LinkedNode() {} 31 LinkedNode::~LinkedNode() {}
45 32
46 33
47 Library::~Library() {} 34 Library::~Library() {}
48 35
49 36
50 void Library::AcceptTreeVisitor(TreeVisitor* visitor) {
51 visitor->VisitLibrary(this);
52 }
53
54
55 void Library::VisitChildren(Visitor* visitor) {
56 VisitList(&classes(), visitor);
57 VisitList(&procedures(), visitor);
58 VisitList(&fields(), visitor);
59 }
60
61
62 Typedef::~Typedef() {} 37 Typedef::~Typedef() {}
63 38
64 39
65 void Typedef::AcceptTreeVisitor(TreeVisitor* visitor) {
66 visitor->VisitTypedef(this);
67 }
68
69
70 void Typedef::VisitChildren(Visitor* visitor) {
71 VisitList(&type_parameters(), visitor);
72 type()->AcceptDartTypeVisitor(visitor);
73 }
74
75
76 Class::~Class() {} 40 Class::~Class() {}
77 41
78 42
79 void Class::AcceptTreeVisitor(TreeVisitor* visitor) {
80 AcceptClassVisitor(visitor);
81 }
82
83
84 NormalClass::~NormalClass() {} 43 NormalClass::~NormalClass() {}
85 44
86 45
87 void NormalClass::AcceptClassVisitor(ClassVisitor* visitor) {
88 visitor->VisitNormalClass(this);
89 }
90
91
92 void NormalClass::VisitChildren(Visitor* visitor) {
93 VisitList(&type_parameters(), visitor);
94 if (super_class() != NULL) visitor->VisitInterfaceType(super_class());
95 VisitList(&implemented_classes(), visitor);
96 VisitList(&constructors(), visitor);
97 VisitList(&procedures(), visitor);
98 VisitList(&fields(), visitor);
99 }
100
101
102 MixinClass::~MixinClass() {}
103
104
105 void MixinClass::AcceptClassVisitor(ClassVisitor* visitor) {
106 visitor->VisitMixinClass(this);
107 }
108
109
110 void MixinClass::VisitChildren(Visitor* visitor) {
111 VisitList(&type_parameters(), visitor);
112 visitor->VisitInterfaceType(first());
113 visitor->VisitInterfaceType(second());
114 VisitList(&implemented_classes(), visitor);
115 VisitList(&constructors(), visitor);
116 }
117
118
119 Member::~Member() {} 46 Member::~Member() {}
120 47
121 48
122 void Member::AcceptTreeVisitor(TreeVisitor* visitor) {
123 AcceptMemberVisitor(visitor);
124 }
125
126
127 Field::~Field() {} 49 Field::~Field() {}
128 50
129 51
130 void Field::AcceptMemberVisitor(MemberVisitor* visitor) {
131 visitor->VisitField(this);
132 }
133
134
135 void Field::VisitChildren(Visitor* visitor) {
136 type()->AcceptDartTypeVisitor(visitor);
137 visitor->VisitName(name());
138 if (initializer() != NULL) initializer()->AcceptExpressionVisitor(visitor);
139 }
140
141
142 Constructor::~Constructor() {} 52 Constructor::~Constructor() {}
143 53
144 54
145 void Constructor::AcceptMemberVisitor(MemberVisitor* visitor) {
146 visitor->VisitConstructor(this);
147 }
148
149
150 void Constructor::VisitChildren(Visitor* visitor) {
151 visitor->VisitName(name());
152 visitor->VisitFunctionNode(function());
153 VisitList(&initializers(), visitor);
154 }
155
156
157 Procedure::~Procedure() {} 55 Procedure::~Procedure() {}
158 56
159 57
160 void Procedure::AcceptMemberVisitor(MemberVisitor* visitor) {
161 visitor->VisitProcedure(this);
162 }
163
164
165 void Procedure::VisitChildren(Visitor* visitor) {
166 visitor->VisitName(name());
167 if (function() != NULL) visitor->VisitFunctionNode(function());
168 }
169
170
171 Initializer::~Initializer() {} 58 Initializer::~Initializer() {}
172 59
173 60
174 void Initializer::AcceptTreeVisitor(TreeVisitor* visitor) {
175 AcceptInitializerVisitor(visitor);
176 }
177
178
179 InvalidInitializer::~InvalidInitializer() {} 61 InvalidInitializer::~InvalidInitializer() {}
180 62
181 63
182 void InvalidInitializer::AcceptInitializerVisitor(InitializerVisitor* visitor) {
183 visitor->VisitInvalidInitializer(this);
184 }
185
186
187 void InvalidInitializer::VisitChildren(Visitor* visitor) {}
188
189
190 FieldInitializer::~FieldInitializer() {} 64 FieldInitializer::~FieldInitializer() {}
191 65
192 66
193 void FieldInitializer::AcceptInitializerVisitor(InitializerVisitor* visitor) {
194 visitor->VisitFieldInitializer(this);
195 }
196
197
198 void FieldInitializer::VisitChildren(Visitor* visitor) {
199 value()->AcceptExpressionVisitor(visitor);
200 }
201
202
203 SuperInitializer::~SuperInitializer() {} 67 SuperInitializer::~SuperInitializer() {}
204 68
205 69
206 void SuperInitializer::AcceptInitializerVisitor(InitializerVisitor* visitor) {
207 visitor->VisitSuperInitializer(this);
208 }
209
210
211 void SuperInitializer::VisitChildren(Visitor* visitor) {
212 visitor->VisitArguments(arguments());
213 }
214
215
216 RedirectingInitializer::~RedirectingInitializer() {} 70 RedirectingInitializer::~RedirectingInitializer() {}
217 71
218 72
219 void RedirectingInitializer::AcceptInitializerVisitor(
220 InitializerVisitor* visitor) {
221 visitor->VisitRedirectingInitializer(this);
222 }
223
224
225 void RedirectingInitializer::VisitChildren(Visitor* visitor) {
226 visitor->VisitArguments(arguments());
227 }
228
229
230 LocalInitializer::~LocalInitializer() {} 73 LocalInitializer::~LocalInitializer() {}
231 74
232 75
233 void LocalInitializer::AcceptInitializerVisitor(InitializerVisitor* visitor) {
234 visitor->VisitLocalInitializer(this);
235 }
236
237
238 void LocalInitializer::VisitChildren(Visitor* visitor) {
239 visitor->VisitVariableDeclaration(variable());
240 }
241
242
243 FunctionNode::~FunctionNode() {} 76 FunctionNode::~FunctionNode() {}
244 77
245 78
246 void FunctionNode::ReplaceBody(Statement* body) { 79 void FunctionNode::ReplaceBody(Statement* body) {
247 delete body_; 80 delete body_;
248 // Use static_cast to invoke the conversion function and so avoid triggering 81 // Use static_cast to invoke the conversion function and so avoid triggering
249 // ASSERT(pointer_ == NULL) in operator= when overwriting a non-NULL body. 82 // ASSERT(pointer_ == NULL) in operator= when overwriting a non-NULL body.
250 static_cast<Statement*&>(body_) = body; 83 static_cast<Statement*&>(body_) = body;
251 } 84 }
252 85
253 86
254 void FunctionNode::AcceptTreeVisitor(TreeVisitor* visitor) {
255 visitor->VisitFunctionNode(this);
256 }
257
258
259 void FunctionNode::VisitChildren(Visitor* visitor) {
260 VisitList(&type_parameters(), visitor);
261 VisitList(&positional_parameters(), visitor);
262 VisitList(&named_parameters(), visitor);
263 if (return_type() != NULL) return_type()->AcceptDartTypeVisitor(visitor);
264 if (body() != NULL) body()->AcceptStatementVisitor(visitor);
265 }
266
267
268 Expression::~Expression() {} 87 Expression::~Expression() {}
269 88
270 89
271 void Expression::AcceptTreeVisitor(TreeVisitor* visitor) {
272 AcceptExpressionVisitor(visitor);
273 }
274
275
276 InvalidExpression::~InvalidExpression() {} 90 InvalidExpression::~InvalidExpression() {}
277 91
278 92
279 void InvalidExpression::AcceptExpressionVisitor(ExpressionVisitor* visitor) { 93 void InvalidExpression::AcceptExpressionVisitor(ExpressionVisitor* visitor) {
280 visitor->VisitInvalidExpression(this); 94 visitor->VisitInvalidExpression(this);
281 } 95 }
282 96
283 97
284 void InvalidExpression::VisitChildren(Visitor* visitor) {}
285
286 98
287 VariableGet::~VariableGet() {} 99 VariableGet::~VariableGet() {}
288 100
289 101
290 void VariableGet::AcceptExpressionVisitor(ExpressionVisitor* visitor) { 102 void VariableGet::AcceptExpressionVisitor(ExpressionVisitor* visitor) {
291 visitor->VisitVariableGet(this); 103 visitor->VisitVariableGet(this);
292 } 104 }
293 105
294 106
295 void VariableGet::VisitChildren(Visitor* visitor) {}
296
297
298 VariableSet::~VariableSet() {} 107 VariableSet::~VariableSet() {}
299 108
300 109
301 void VariableSet::AcceptExpressionVisitor(ExpressionVisitor* visitor) { 110 void VariableSet::AcceptExpressionVisitor(ExpressionVisitor* visitor) {
302 visitor->VisitVariableSet(this); 111 visitor->VisitVariableSet(this);
303 } 112 }
304 113
305 114
306 void VariableSet::VisitChildren(Visitor* visitor) {
307 expression()->AcceptExpressionVisitor(visitor);
308 }
309
310
311 PropertyGet::~PropertyGet() {} 115 PropertyGet::~PropertyGet() {}
312 116
313 117
314 void PropertyGet::AcceptExpressionVisitor(ExpressionVisitor* visitor) { 118 void PropertyGet::AcceptExpressionVisitor(ExpressionVisitor* visitor) {
315 visitor->VisitPropertyGet(this); 119 visitor->VisitPropertyGet(this);
316 } 120 }
317 121
318 122
319 void PropertyGet::VisitChildren(Visitor* visitor) {
320 receiver()->AcceptExpressionVisitor(visitor);
321 visitor->VisitName(name());
322 }
323
324
325 PropertySet::~PropertySet() {} 123 PropertySet::~PropertySet() {}
326 124
327 125
328 void PropertySet::AcceptExpressionVisitor(ExpressionVisitor* visitor) { 126 void PropertySet::AcceptExpressionVisitor(ExpressionVisitor* visitor) {
329 visitor->VisitPropertySet(this); 127 visitor->VisitPropertySet(this);
330 } 128 }
331 129
332 130
333 void PropertySet::VisitChildren(Visitor* visitor) {
334 receiver()->AcceptExpressionVisitor(visitor);
335 visitor->VisitName(name());
336 value()->AcceptExpressionVisitor(visitor);
337 }
338
339
340 DirectPropertyGet::~DirectPropertyGet() {} 131 DirectPropertyGet::~DirectPropertyGet() {}
341 132
342 133
343 void DirectPropertyGet::AcceptExpressionVisitor(ExpressionVisitor* visitor) { 134 void DirectPropertyGet::AcceptExpressionVisitor(ExpressionVisitor* visitor) {
344 visitor->VisitDirectPropertyGet(this); 135 visitor->VisitDirectPropertyGet(this);
345 } 136 }
346 137
347 138
348 void DirectPropertyGet::VisitChildren(Visitor* visitor) {
349 receiver()->AcceptExpressionVisitor(visitor);
350 }
351
352
353 DirectPropertySet::~DirectPropertySet() {} 139 DirectPropertySet::~DirectPropertySet() {}
354 140
355 141
356 void DirectPropertySet::AcceptExpressionVisitor(ExpressionVisitor* visitor) { 142 void DirectPropertySet::AcceptExpressionVisitor(ExpressionVisitor* visitor) {
357 visitor->VisitDirectPropertySet(this); 143 visitor->VisitDirectPropertySet(this);
358 } 144 }
359 145
360 146
361 void DirectPropertySet::VisitChildren(Visitor* visitor) {
362 receiver()->AcceptExpressionVisitor(visitor);
363 value()->AcceptExpressionVisitor(visitor);
364 }
365
366
367 StaticGet::~StaticGet() {} 147 StaticGet::~StaticGet() {}
368 148
369 149
370 void StaticGet::AcceptExpressionVisitor(ExpressionVisitor* visitor) { 150 void StaticGet::AcceptExpressionVisitor(ExpressionVisitor* visitor) {
371 visitor->VisitStaticGet(this); 151 visitor->VisitStaticGet(this);
372 } 152 }
373 153
374 154
375 void StaticGet::VisitChildren(Visitor* visitor) {}
376
377
378 StaticSet::~StaticSet() {} 155 StaticSet::~StaticSet() {}
379 156
380 157
381 void StaticSet::AcceptExpressionVisitor(ExpressionVisitor* visitor) { 158 void StaticSet::AcceptExpressionVisitor(ExpressionVisitor* visitor) {
382 visitor->VisitStaticSet(this); 159 visitor->VisitStaticSet(this);
383 } 160 }
384 161
385 162
386 void StaticSet::VisitChildren(Visitor* visitor) {
387 expression()->AcceptExpressionVisitor(visitor);
388 }
389
390
391 Arguments::~Arguments() {} 163 Arguments::~Arguments() {}
392 164
393 165
394 void Arguments::AcceptTreeVisitor(TreeVisitor* visitor) {
395 visitor->VisitArguments(this);
396 }
397
398
399 void Arguments::VisitChildren(Visitor* visitor) {
400 VisitList(&types(), visitor);
401 VisitList(&positional(), visitor);
402 VisitList(&named(), visitor);
403 }
404
405
406 NamedExpression::~NamedExpression() {} 166 NamedExpression::~NamedExpression() {}
407 167
408 168
409 void NamedExpression::AcceptTreeVisitor(TreeVisitor* visitor) {
410 visitor->VisitNamedExpression(this);
411 }
412
413
414 void NamedExpression::VisitChildren(Visitor* visitor) {
415 expression()->AcceptExpressionVisitor(visitor);
416 }
417
418
419 MethodInvocation::~MethodInvocation() {} 169 MethodInvocation::~MethodInvocation() {}
420 170
421 171
422 void MethodInvocation::AcceptExpressionVisitor(ExpressionVisitor* visitor) { 172 void MethodInvocation::AcceptExpressionVisitor(ExpressionVisitor* visitor) {
423 visitor->VisitMethodInvocation(this); 173 visitor->VisitMethodInvocation(this);
424 } 174 }
425 175
426 176
427 void MethodInvocation::VisitChildren(Visitor* visitor) {
428 receiver()->AcceptExpressionVisitor(visitor);
429 visitor->VisitName(name());
430 visitor->VisitArguments(arguments());
431 }
432
433
434 DirectMethodInvocation::~DirectMethodInvocation() {} 177 DirectMethodInvocation::~DirectMethodInvocation() {}
435 178
436 179
437 void DirectMethodInvocation::AcceptExpressionVisitor( 180 void DirectMethodInvocation::AcceptExpressionVisitor(
438 ExpressionVisitor* visitor) { 181 ExpressionVisitor* visitor) {
439 visitor->VisitDirectMethodInvocation(this); 182 visitor->VisitDirectMethodInvocation(this);
440 } 183 }
441 184
442 185
443 void DirectMethodInvocation::VisitChildren(Visitor* visitor) {
444 receiver()->AcceptExpressionVisitor(visitor);
445 visitor->VisitArguments(arguments());
446 }
447
448
449 StaticInvocation::~StaticInvocation() {} 186 StaticInvocation::~StaticInvocation() {}
450 187
451 188
452 void StaticInvocation::AcceptExpressionVisitor(ExpressionVisitor* visitor) { 189 void StaticInvocation::AcceptExpressionVisitor(ExpressionVisitor* visitor) {
453 visitor->VisitStaticInvocation(this); 190 visitor->VisitStaticInvocation(this);
454 } 191 }
455 192
456 193
457 void StaticInvocation::VisitChildren(Visitor* visitor) {
458 visitor->VisitArguments(arguments());
459 }
460
461
462 ConstructorInvocation::~ConstructorInvocation() {} 194 ConstructorInvocation::~ConstructorInvocation() {}
463 195
464 196
465 void ConstructorInvocation::AcceptExpressionVisitor( 197 void ConstructorInvocation::AcceptExpressionVisitor(
466 ExpressionVisitor* visitor) { 198 ExpressionVisitor* visitor) {
467 visitor->VisitConstructorInvocation(this); 199 visitor->VisitConstructorInvocation(this);
468 } 200 }
469 201
470 202
471 void ConstructorInvocation::VisitChildren(Visitor* visitor) {
472 visitor->VisitArguments(arguments());
473 }
474
475
476 Not::~Not() {} 203 Not::~Not() {}
477 204
478 205
479 void Not::AcceptExpressionVisitor(ExpressionVisitor* visitor) { 206 void Not::AcceptExpressionVisitor(ExpressionVisitor* visitor) {
480 visitor->VisitNot(this); 207 visitor->VisitNot(this);
481 } 208 }
482 209
483 210
484 void Not::VisitChildren(Visitor* visitor) {
485 expression()->AcceptExpressionVisitor(visitor);
486 }
487
488
489 LogicalExpression::~LogicalExpression() {} 211 LogicalExpression::~LogicalExpression() {}
490 212
491 213
492 void LogicalExpression::AcceptExpressionVisitor(ExpressionVisitor* visitor) { 214 void LogicalExpression::AcceptExpressionVisitor(ExpressionVisitor* visitor) {
493 visitor->VisitLogicalExpression(this); 215 visitor->VisitLogicalExpression(this);
494 } 216 }
495 217
496 218
497 void LogicalExpression::VisitChildren(Visitor* visitor) {
498 left()->AcceptExpressionVisitor(visitor);
499 right()->AcceptExpressionVisitor(visitor);
500 }
501
502
503 ConditionalExpression::~ConditionalExpression() {} 219 ConditionalExpression::~ConditionalExpression() {}
504 220
505 221
506 void ConditionalExpression::AcceptExpressionVisitor( 222 void ConditionalExpression::AcceptExpressionVisitor(
507 ExpressionVisitor* visitor) { 223 ExpressionVisitor* visitor) {
508 visitor->VisitConditionalExpression(this); 224 visitor->VisitConditionalExpression(this);
509 } 225 }
510 226
511 227
512 void ConditionalExpression::VisitChildren(Visitor* visitor) {
513 condition()->AcceptExpressionVisitor(visitor);
514 then()->AcceptExpressionVisitor(visitor);
515 otherwise()->AcceptExpressionVisitor(visitor);
516 }
517
518
519 StringConcatenation::~StringConcatenation() {} 228 StringConcatenation::~StringConcatenation() {}
520 229
521 230
522 void StringConcatenation::AcceptExpressionVisitor(ExpressionVisitor* visitor) { 231 void StringConcatenation::AcceptExpressionVisitor(ExpressionVisitor* visitor) {
523 visitor->VisitStringConcatenation(this); 232 visitor->VisitStringConcatenation(this);
524 } 233 }
525 234
526 235
527 void StringConcatenation::VisitChildren(Visitor* visitor) {
528 VisitList(&expressions(), visitor);
529 }
530
531
532 IsExpression::~IsExpression() {} 236 IsExpression::~IsExpression() {}
533 237
534 238
535 void IsExpression::AcceptExpressionVisitor(ExpressionVisitor* visitor) { 239 void IsExpression::AcceptExpressionVisitor(ExpressionVisitor* visitor) {
536 visitor->VisitIsExpression(this); 240 visitor->VisitIsExpression(this);
537 } 241 }
538 242
539 243
540 void IsExpression::VisitChildren(Visitor* visitor) {
541 operand()->AcceptExpressionVisitor(visitor);
542 type()->AcceptDartTypeVisitor(visitor);
543 }
544
545
546 AsExpression::~AsExpression() {} 244 AsExpression::~AsExpression() {}
547 245
548 246
549 void AsExpression::AcceptExpressionVisitor(ExpressionVisitor* visitor) { 247 void AsExpression::AcceptExpressionVisitor(ExpressionVisitor* visitor) {
550 visitor->VisitAsExpression(this); 248 visitor->VisitAsExpression(this);
551 } 249 }
552 250
553 251
554 void AsExpression::VisitChildren(Visitor* visitor) {
555 operand()->AcceptExpressionVisitor(visitor);
556 type()->AcceptDartTypeVisitor(visitor);
557 }
558
559
560 BasicLiteral::~BasicLiteral() {} 252 BasicLiteral::~BasicLiteral() {}
561 253
562 254
563 void BasicLiteral::VisitChildren(Visitor* visitor) {}
564
565
566 StringLiteral::~StringLiteral() {} 255 StringLiteral::~StringLiteral() {}
567 256
568 257
569 void StringLiteral::AcceptExpressionVisitor(ExpressionVisitor* visitor) { 258 void StringLiteral::AcceptExpressionVisitor(ExpressionVisitor* visitor) {
570 visitor->VisitStringLiteral(this); 259 visitor->VisitStringLiteral(this);
571 } 260 }
572 261
573 262
574 BigintLiteral::~BigintLiteral() {} 263 BigintLiteral::~BigintLiteral() {}
575 264
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 301
613 302
614 SymbolLiteral::~SymbolLiteral() {} 303 SymbolLiteral::~SymbolLiteral() {}
615 304
616 305
617 void SymbolLiteral::AcceptExpressionVisitor(ExpressionVisitor* visitor) { 306 void SymbolLiteral::AcceptExpressionVisitor(ExpressionVisitor* visitor) {
618 visitor->VisitSymbolLiteral(this); 307 visitor->VisitSymbolLiteral(this);
619 } 308 }
620 309
621 310
622 void SymbolLiteral::VisitChildren(Visitor* visitor) {}
623
624
625 TypeLiteral::~TypeLiteral() {} 311 TypeLiteral::~TypeLiteral() {}
626 312
627 313
628 void TypeLiteral::AcceptExpressionVisitor(ExpressionVisitor* visitor) { 314 void TypeLiteral::AcceptExpressionVisitor(ExpressionVisitor* visitor) {
629 visitor->VisitTypeLiteral(this); 315 visitor->VisitTypeLiteral(this);
630 } 316 }
631 317
632 318
633 void TypeLiteral::VisitChildren(Visitor* visitor) {
634 type()->AcceptDartTypeVisitor(visitor);
635 }
636
637
638 ThisExpression::~ThisExpression() {} 319 ThisExpression::~ThisExpression() {}
639 320
640 321
641 void ThisExpression::AcceptExpressionVisitor(ExpressionVisitor* visitor) { 322 void ThisExpression::AcceptExpressionVisitor(ExpressionVisitor* visitor) {
642 visitor->VisitThisExpression(this); 323 visitor->VisitThisExpression(this);
643 } 324 }
644 325
645 326
646 void ThisExpression::VisitChildren(Visitor* visitor) {}
647
648
649 Rethrow::~Rethrow() {} 327 Rethrow::~Rethrow() {}
650 328
651 329
652 void Rethrow::AcceptExpressionVisitor(ExpressionVisitor* visitor) { 330 void Rethrow::AcceptExpressionVisitor(ExpressionVisitor* visitor) {
653 visitor->VisitRethrow(this); 331 visitor->VisitRethrow(this);
654 } 332 }
655 333
656 334
657 void Rethrow::VisitChildren(Visitor* visitor) {}
658
659
660 Throw::~Throw() {} 335 Throw::~Throw() {}
661 336
662 337
663 void Throw::AcceptExpressionVisitor(ExpressionVisitor* visitor) { 338 void Throw::AcceptExpressionVisitor(ExpressionVisitor* visitor) {
664 visitor->VisitThrow(this); 339 visitor->VisitThrow(this);
665 } 340 }
666 341
667 342
668 void Throw::VisitChildren(Visitor* visitor) {
669 expression()->AcceptExpressionVisitor(visitor);
670 }
671
672
673 ListLiteral::~ListLiteral() {} 343 ListLiteral::~ListLiteral() {}
674 344
675 345
676 void ListLiteral::AcceptExpressionVisitor(ExpressionVisitor* visitor) { 346 void ListLiteral::AcceptExpressionVisitor(ExpressionVisitor* visitor) {
677 visitor->VisitListLiteral(this); 347 visitor->VisitListLiteral(this);
678 } 348 }
679 349
680 350
681 void ListLiteral::VisitChildren(Visitor* visitor) {
682 type()->AcceptDartTypeVisitor(visitor);
683 VisitList(&expressions(), visitor);
684 }
685
686
687 MapLiteral::~MapLiteral() {} 351 MapLiteral::~MapLiteral() {}
688 352
689 353
690 void MapLiteral::AcceptExpressionVisitor(ExpressionVisitor* visitor) { 354 void MapLiteral::AcceptExpressionVisitor(ExpressionVisitor* visitor) {
691 visitor->VisitMapLiteral(this); 355 visitor->VisitMapLiteral(this);
692 } 356 }
693 357
694 358
695 void MapLiteral::VisitChildren(Visitor* visitor) {
696 key_type()->AcceptDartTypeVisitor(visitor);
697 value_type()->AcceptDartTypeVisitor(visitor);
698 VisitList(&entries(), visitor);
699 }
700
701
702 MapEntry::~MapEntry() {} 359 MapEntry::~MapEntry() {}
703 360
704 361
705 void MapEntry::AcceptTreeVisitor(TreeVisitor* visitor) {
706 visitor->VisitMapEntry(this);
707 }
708
709
710 void MapEntry::VisitChildren(Visitor* visitor) {
711 key()->AcceptExpressionVisitor(visitor);
712 value()->AcceptExpressionVisitor(visitor);
713 }
714
715
716 AwaitExpression::~AwaitExpression() {} 362 AwaitExpression::~AwaitExpression() {}
717 363
718 364
719 void AwaitExpression::AcceptExpressionVisitor(ExpressionVisitor* visitor) { 365 void AwaitExpression::AcceptExpressionVisitor(ExpressionVisitor* visitor) {
720 visitor->VisitAwaitExpression(this); 366 visitor->VisitAwaitExpression(this);
721 } 367 }
722 368
723 369
724 void AwaitExpression::VisitChildren(Visitor* visitor) {
725 operand()->AcceptExpressionVisitor(visitor);
726 }
727
728
729 FunctionExpression::~FunctionExpression() {} 370 FunctionExpression::~FunctionExpression() {}
730 371
731 372
732 void FunctionExpression::AcceptExpressionVisitor(ExpressionVisitor* visitor) { 373 void FunctionExpression::AcceptExpressionVisitor(ExpressionVisitor* visitor) {
733 visitor->VisitFunctionExpression(this); 374 visitor->VisitFunctionExpression(this);
734 } 375 }
735 376
736 377
737 void FunctionExpression::VisitChildren(Visitor* visitor) {
738 visitor->VisitFunctionNode(function());
739 }
740
741
742 Let::~Let() {} 378 Let::~Let() {}
743 379
744 380
745 void Let::AcceptExpressionVisitor(ExpressionVisitor* visitor) { 381 void Let::AcceptExpressionVisitor(ExpressionVisitor* visitor) {
746 visitor->VisitLet(this); 382 visitor->VisitLet(this);
747 } 383 }
748 384
749 385
750 void Let::VisitChildren(Visitor* visitor) {
751 visitor->VisitVariableDeclaration(variable());
752 body()->AcceptExpressionVisitor(visitor);
753 }
754
755
756 VectorCreation::~VectorCreation() {} 386 VectorCreation::~VectorCreation() {}
757 387
758 388
759 void VectorCreation::AcceptExpressionVisitor(ExpressionVisitor* visitor) { 389 void VectorCreation::AcceptExpressionVisitor(ExpressionVisitor* visitor) {
760 visitor->VisitVectorCreation(this); 390 visitor->VisitVectorCreation(this);
761 } 391 }
762 392
763 393
764 void VectorCreation::VisitChildren(Visitor* visitor) {}
765
766
767 VectorGet::~VectorGet() {} 394 VectorGet::~VectorGet() {}
768 395
769 396
770 void VectorGet::AcceptExpressionVisitor(ExpressionVisitor* visitor) { 397 void VectorGet::AcceptExpressionVisitor(ExpressionVisitor* visitor) {
771 visitor->VisitVectorGet(this); 398 visitor->VisitVectorGet(this);
772 } 399 }
773 400
774 401
775 void VectorGet::VisitChildren(Visitor* visitor) {
776 vector_expression()->AcceptExpressionVisitor(visitor);
777 }
778
779
780 VectorSet::~VectorSet() {} 402 VectorSet::~VectorSet() {}
781 403
782 404
783 void VectorSet::AcceptExpressionVisitor(ExpressionVisitor* visitor) { 405 void VectorSet::AcceptExpressionVisitor(ExpressionVisitor* visitor) {
784 visitor->VisitVectorSet(this); 406 visitor->VisitVectorSet(this);
785 } 407 }
786 408
787 409
788 void VectorSet::VisitChildren(Visitor* visitor) {
789 vector_expression()->AcceptExpressionVisitor(visitor);
790 value()->AcceptExpressionVisitor(visitor);
791 }
792
793
794 VectorCopy::~VectorCopy() {} 410 VectorCopy::~VectorCopy() {}
795 411
796 412
797 void VectorCopy::AcceptExpressionVisitor(ExpressionVisitor* visitor) { 413 void VectorCopy::AcceptExpressionVisitor(ExpressionVisitor* visitor) {
798 visitor->VisitVectorCopy(this); 414 visitor->VisitVectorCopy(this);
799 } 415 }
800 416
801 417
802 void VectorCopy::VisitChildren(Visitor* visitor) {
803 vector_expression()->AcceptExpressionVisitor(visitor);
804 }
805
806
807 ClosureCreation::~ClosureCreation() {} 418 ClosureCreation::~ClosureCreation() {}
808 419
809 420
810 void ClosureCreation::AcceptExpressionVisitor(ExpressionVisitor* visitor) { 421 void ClosureCreation::AcceptExpressionVisitor(ExpressionVisitor* visitor) {
811 visitor->VisitClosureCreation(this); 422 visitor->VisitClosureCreation(this);
812 } 423 }
813 424
814 425
815 void ClosureCreation::VisitChildren(Visitor* visitor) {
816 context_vector()->AcceptExpressionVisitor(visitor);
817 function_type()->AcceptDartTypeVisitor(visitor);
818 }
819
820
821 Statement::~Statement() {} 426 Statement::~Statement() {}
822 427
823 428
824 void Statement::AcceptTreeVisitor(TreeVisitor* visitor) {
825 AcceptStatementVisitor(visitor);
826 }
827
828
829 InvalidStatement::~InvalidStatement() {} 429 InvalidStatement::~InvalidStatement() {}
830 430
831 431
832 void InvalidStatement::AcceptStatementVisitor(StatementVisitor* visitor) {
833 visitor->VisitInvalidStatement(this);
834 }
835
836
837 void InvalidStatement::VisitChildren(Visitor* visitor) {}
838
839
840 ExpressionStatement::~ExpressionStatement() {} 432 ExpressionStatement::~ExpressionStatement() {}
841 433
842 434
843 void ExpressionStatement::AcceptStatementVisitor(StatementVisitor* visitor) {
844 visitor->VisitExpressionStatement(this);
845 }
846
847
848 void ExpressionStatement::VisitChildren(Visitor* visitor) {
849 expression()->AcceptExpressionVisitor(visitor);
850 }
851
852
853 Block::~Block() {} 435 Block::~Block() {}
854 436
855 437
856 void Block::AcceptStatementVisitor(StatementVisitor* visitor) {
857 visitor->VisitBlock(this);
858 }
859
860
861 void Block::VisitChildren(Visitor* visitor) {
862 VisitList(&statements(), visitor);
863 }
864
865
866 EmptyStatement::~EmptyStatement() {} 438 EmptyStatement::~EmptyStatement() {}
867 439
868 440
869 void EmptyStatement::AcceptStatementVisitor(StatementVisitor* visitor) {
870 visitor->VisitEmptyStatement(this);
871 }
872
873
874 void EmptyStatement::VisitChildren(Visitor* visitor) {}
875
876
877 AssertStatement::~AssertStatement() {} 441 AssertStatement::~AssertStatement() {}
878 442
879 443
880 void AssertStatement::AcceptStatementVisitor(StatementVisitor* visitor) {
881 visitor->VisitAssertStatement(this);
882 }
883
884
885 void AssertStatement::VisitChildren(Visitor* visitor) {
886 condition()->AcceptExpressionVisitor(visitor);
887 if (message() != NULL) message()->AcceptExpressionVisitor(visitor);
888 }
889
890
891 LabeledStatement::~LabeledStatement() {} 444 LabeledStatement::~LabeledStatement() {}
892 445
893 446
894 void LabeledStatement::AcceptStatementVisitor(StatementVisitor* visitor) {
895 visitor->VisitLabeledStatement(this);
896 }
897
898
899 void LabeledStatement::VisitChildren(Visitor* visitor) {
900 body()->AcceptStatementVisitor(visitor);
901 }
902
903
904 BreakStatement::~BreakStatement() {} 447 BreakStatement::~BreakStatement() {}
905 448
906 449
907 void BreakStatement::AcceptStatementVisitor(StatementVisitor* visitor) {
908 visitor->VisitBreakStatement(this);
909 }
910
911
912 void BreakStatement::VisitChildren(Visitor* visitor) {}
913
914
915 WhileStatement::~WhileStatement() {} 450 WhileStatement::~WhileStatement() {}
916 451
917 452
918 void WhileStatement::AcceptStatementVisitor(StatementVisitor* visitor) {
919 visitor->VisitWhileStatement(this);
920 }
921
922
923 void WhileStatement::VisitChildren(Visitor* visitor) {
924 condition()->AcceptExpressionVisitor(visitor);
925 body()->AcceptStatementVisitor(visitor);
926 }
927
928
929 DoStatement::~DoStatement() {} 453 DoStatement::~DoStatement() {}
930 454
931 455
932 void DoStatement::AcceptStatementVisitor(StatementVisitor* visitor) {
933 visitor->VisitDoStatement(this);
934 }
935
936
937 void DoStatement::VisitChildren(Visitor* visitor) {
938 body()->AcceptStatementVisitor(visitor);
939 condition()->AcceptExpressionVisitor(visitor);
940 }
941
942
943 ForStatement::~ForStatement() {} 456 ForStatement::~ForStatement() {}
944 457
945 458
946 void ForStatement::AcceptStatementVisitor(StatementVisitor* visitor) {
947 visitor->VisitForStatement(this);
948 }
949
950
951 void ForStatement::VisitChildren(Visitor* visitor) {
952 VisitList(&variables(), visitor);
953 if (condition() != NULL) condition()->AcceptExpressionVisitor(visitor);
954 VisitList(&updates(), visitor);
955 body()->AcceptStatementVisitor(visitor);
956 }
957
958
959 ForInStatement::~ForInStatement() {} 459 ForInStatement::~ForInStatement() {}
960 460
961 461
962 void ForInStatement::AcceptStatementVisitor(StatementVisitor* visitor) {
963 visitor->VisitForInStatement(this);
964 }
965
966
967 void ForInStatement::VisitChildren(Visitor* visitor) {
968 visitor->VisitVariableDeclaration(variable());
969 iterable()->AcceptExpressionVisitor(visitor);
970 body()->AcceptStatementVisitor(visitor);
971 }
972
973
974 SwitchStatement::~SwitchStatement() {} 462 SwitchStatement::~SwitchStatement() {}
975 463
976 464
977 void SwitchStatement::AcceptStatementVisitor(StatementVisitor* visitor) {
978 visitor->VisitSwitchStatement(this);
979 }
980
981
982 void SwitchStatement::VisitChildren(Visitor* visitor) {
983 condition()->AcceptExpressionVisitor(visitor);
984 VisitList(&cases(), visitor);
985 }
986
987
988 SwitchCase::~SwitchCase() {} 465 SwitchCase::~SwitchCase() {}
989 466
990 467
991 void SwitchCase::AcceptTreeVisitor(TreeVisitor* visitor) {
992 visitor->VisitSwitchCase(this);
993 }
994
995
996 void SwitchCase::VisitChildren(Visitor* visitor) {
997 VisitList(&expressions(), visitor);
998 body()->AcceptStatementVisitor(visitor);
999 }
1000
1001
1002 ContinueSwitchStatement::~ContinueSwitchStatement() {} 468 ContinueSwitchStatement::~ContinueSwitchStatement() {}
1003 469
1004 470
1005 void ContinueSwitchStatement::AcceptStatementVisitor(
1006 StatementVisitor* visitor) {
1007 visitor->VisitContinueSwitchStatement(this);
1008 }
1009
1010
1011 void ContinueSwitchStatement::VisitChildren(Visitor* visitor) {}
1012
1013
1014 IfStatement::~IfStatement() {} 471 IfStatement::~IfStatement() {}
1015 472
1016 473
1017 void IfStatement::AcceptStatementVisitor(StatementVisitor* visitor) {
1018 visitor->VisitIfStatement(this);
1019 }
1020
1021
1022 void IfStatement::VisitChildren(Visitor* visitor) {
1023 condition()->AcceptExpressionVisitor(visitor);
1024 then()->AcceptStatementVisitor(visitor);
1025 otherwise()->AcceptStatementVisitor(visitor);
1026 }
1027
1028
1029 ReturnStatement::~ReturnStatement() {} 474 ReturnStatement::~ReturnStatement() {}
1030 475
1031 476
1032 void ReturnStatement::AcceptStatementVisitor(StatementVisitor* visitor) {
1033 visitor->VisitReturnStatement(this);
1034 }
1035
1036
1037 void ReturnStatement::VisitChildren(Visitor* visitor) {
1038 if (expression() != NULL) expression()->AcceptExpressionVisitor(visitor);
1039 }
1040
1041
1042 TryCatch::~TryCatch() {} 477 TryCatch::~TryCatch() {}
1043 478
1044 479
1045 void TryCatch::AcceptStatementVisitor(StatementVisitor* visitor) {
1046 visitor->VisitTryCatch(this);
1047 }
1048
1049
1050 void TryCatch::VisitChildren(Visitor* visitor) {
1051 body()->AcceptStatementVisitor(visitor);
1052 VisitList(&catches(), visitor);
1053 }
1054
1055
1056 Catch::~Catch() {} 480 Catch::~Catch() {}
1057 481
1058 482
1059 void Catch::AcceptTreeVisitor(TreeVisitor* visitor) {
1060 visitor->VisitCatch(this);
1061 }
1062
1063
1064 void Catch::VisitChildren(Visitor* visitor) {
1065 if (guard() != NULL) guard()->AcceptDartTypeVisitor(visitor);
1066 if (exception() != NULL) visitor->VisitVariableDeclaration(exception());
1067 if (stack_trace() != NULL) visitor->VisitVariableDeclaration(stack_trace());
1068 body()->AcceptStatementVisitor(visitor);
1069 }
1070
1071
1072 TryFinally::~TryFinally() {} 483 TryFinally::~TryFinally() {}
1073 484
1074 485
1075 void TryFinally::AcceptStatementVisitor(StatementVisitor* visitor) {
1076 visitor->VisitTryFinally(this);
1077 }
1078
1079
1080 void TryFinally::VisitChildren(Visitor* visitor) {
1081 body()->AcceptStatementVisitor(visitor);
1082 finalizer()->AcceptStatementVisitor(visitor);
1083 }
1084
1085
1086 YieldStatement::~YieldStatement() {} 486 YieldStatement::~YieldStatement() {}
1087 487
1088 488
1089 void YieldStatement::AcceptStatementVisitor(StatementVisitor* visitor) {
1090 visitor->VisitYieldStatement(this);
1091 }
1092
1093
1094 void YieldStatement::VisitChildren(Visitor* visitor) {
1095 expression()->AcceptExpressionVisitor(visitor);
1096 }
1097
1098
1099 VariableDeclaration::~VariableDeclaration() {} 489 VariableDeclaration::~VariableDeclaration() {}
1100 490
1101 491
1102 void VariableDeclaration::AcceptStatementVisitor(StatementVisitor* visitor) {
1103 visitor->VisitVariableDeclaration(this);
1104 }
1105
1106
1107 void VariableDeclaration::VisitChildren(Visitor* visitor) {
1108 if (type() != NULL) type()->AcceptDartTypeVisitor(visitor);
1109 if (initializer() != NULL) initializer()->AcceptExpressionVisitor(visitor);
1110 }
1111
1112
1113 FunctionDeclaration::~FunctionDeclaration() {} 492 FunctionDeclaration::~FunctionDeclaration() {}
1114 493
1115 494
1116 void FunctionDeclaration::AcceptStatementVisitor(StatementVisitor* visitor) {
1117 visitor->VisitFunctionDeclaration(this);
1118 }
1119
1120
1121 void FunctionDeclaration::VisitChildren(Visitor* visitor) {
1122 visitor->VisitVariableDeclaration(variable());
1123 visitor->VisitFunctionNode(function());
1124 }
1125
1126
1127 Name::~Name() {} 495 Name::~Name() {}
1128 496
1129 497
1130 void Name::AcceptVisitor(Visitor* visitor) {
1131 visitor->VisitName(this);
1132 }
1133
1134
1135 void Name::VisitChildren(Visitor* visitor) {}
1136
1137
1138 DartType::~DartType() {} 498 DartType::~DartType() {}
1139 499
1140 500
1141 void DartType::AcceptVisitor(Visitor* visitor) {
1142 AcceptDartTypeVisitor(visitor);
1143 }
1144
1145
1146 InvalidType::~InvalidType() {} 501 InvalidType::~InvalidType() {}
1147 502
1148 503
1149 void InvalidType::AcceptDartTypeVisitor(DartTypeVisitor* visitor) { 504 void InvalidType::AcceptDartTypeVisitor(DartTypeVisitor* visitor) {
1150 visitor->VisitInvalidType(this); 505 visitor->VisitInvalidType(this);
1151 } 506 }
1152 507
1153 508
1154 void InvalidType::VisitChildren(Visitor* visitor) {}
1155
1156
1157 DynamicType::~DynamicType() {} 509 DynamicType::~DynamicType() {}
1158 510
1159 511
1160 void DynamicType::AcceptDartTypeVisitor(DartTypeVisitor* visitor) { 512 void DynamicType::AcceptDartTypeVisitor(DartTypeVisitor* visitor) {
1161 visitor->VisitDynamicType(this); 513 visitor->VisitDynamicType(this);
1162 } 514 }
1163 515
1164 516
1165 void DynamicType::VisitChildren(Visitor* visitor) {}
1166
1167
1168 VoidType::~VoidType() {} 517 VoidType::~VoidType() {}
1169 518
1170 519
1171 void VoidType::AcceptDartTypeVisitor(DartTypeVisitor* visitor) { 520 void VoidType::AcceptDartTypeVisitor(DartTypeVisitor* visitor) {
1172 visitor->VisitVoidType(this); 521 visitor->VisitVoidType(this);
1173 } 522 }
1174 523
1175 524
1176 void VoidType::VisitChildren(Visitor* visitor) {}
1177
1178
1179 BottomType::~BottomType() {} 525 BottomType::~BottomType() {}
1180 526
1181 527
1182 void BottomType::AcceptDartTypeVisitor(DartTypeVisitor* visitor) { 528 void BottomType::AcceptDartTypeVisitor(DartTypeVisitor* visitor) {
1183 visitor->VisitBottomType(this); 529 visitor->VisitBottomType(this);
1184 } 530 }
1185 531
1186 532
1187 void BottomType::VisitChildren(Visitor* visitor) {}
1188
1189
1190 InterfaceType::~InterfaceType() {} 533 InterfaceType::~InterfaceType() {}
1191 534
1192 535
1193 void InterfaceType::AcceptDartTypeVisitor(DartTypeVisitor* visitor) { 536 void InterfaceType::AcceptDartTypeVisitor(DartTypeVisitor* visitor) {
1194 visitor->VisitInterfaceType(this); 537 visitor->VisitInterfaceType(this);
1195 } 538 }
1196 539
1197 540
1198 void InterfaceType::VisitChildren(Visitor* visitor) {
1199 VisitList(&type_arguments(), visitor);
1200 }
1201
1202
1203 TypedefType::~TypedefType() {} 541 TypedefType::~TypedefType() {}
1204 542
1205 543
1206 void TypedefType::AcceptDartTypeVisitor(DartTypeVisitor* visitor) { 544 void TypedefType::AcceptDartTypeVisitor(DartTypeVisitor* visitor) {
1207 visitor->VisitTypedefType(this); 545 visitor->VisitTypedefType(this);
1208 } 546 }
1209 547
1210 548
1211 void TypedefType::VisitChildren(Visitor* visitor) {
1212 VisitList(&type_arguments(), visitor);
1213 }
1214
1215
1216 FunctionType::~FunctionType() {} 549 FunctionType::~FunctionType() {}
1217 550
1218 551
1219 void FunctionType::AcceptDartTypeVisitor(DartTypeVisitor* visitor) { 552 void FunctionType::AcceptDartTypeVisitor(DartTypeVisitor* visitor) {
1220 visitor->VisitFunctionType(this); 553 visitor->VisitFunctionType(this);
1221 } 554 }
1222 555
1223 556
1224 void FunctionType::VisitChildren(Visitor* visitor) {
1225 VisitList(&type_parameters(), visitor);
1226 VisitList(&positional_parameters(), visitor);
1227 for (int i = 0; i < named_parameters().length(); ++i) {
1228 named_parameters()[i]->type()->AcceptDartTypeVisitor(visitor);
1229 }
1230 return_type()->AcceptDartTypeVisitor(visitor);
1231 }
1232
1233
1234 TypeParameterType::~TypeParameterType() {} 557 TypeParameterType::~TypeParameterType() {}
1235 558
1236 559
1237 void TypeParameterType::AcceptDartTypeVisitor(DartTypeVisitor* visitor) { 560 void TypeParameterType::AcceptDartTypeVisitor(DartTypeVisitor* visitor) {
1238 visitor->VisitTypeParameterType(this); 561 visitor->VisitTypeParameterType(this);
1239 } 562 }
1240 563
1241 564
1242 void TypeParameterType::VisitChildren(Visitor* visitor) {}
1243
1244
1245 VectorType::~VectorType() {} 565 VectorType::~VectorType() {}
1246 566
1247 567
1248 void VectorType::AcceptDartTypeVisitor(DartTypeVisitor* visitor) { 568 void VectorType::AcceptDartTypeVisitor(DartTypeVisitor* visitor) {
1249 visitor->VisitVectorType(this); 569 visitor->VisitVectorType(this);
1250 } 570 }
1251 571
1252 572
1253 void VectorType::VisitChildren(Visitor* visitor) {}
1254
1255
1256 TypeParameter::~TypeParameter() {} 573 TypeParameter::~TypeParameter() {}
1257 574
1258 575
1259 void TypeParameter::AcceptTreeVisitor(TreeVisitor* visitor) {
1260 visitor->VisitTypeParameter(this);
1261 }
1262
1263
1264 void TypeParameter::VisitChildren(Visitor* visitor) {
1265 bound()->AcceptDartTypeVisitor(visitor);
1266 }
1267
1268
1269 Program::~Program() { 576 Program::~Program() {
1270 while (valid_token_positions.length() > 0) { 577 while (valid_token_positions.length() > 0) {
1271 delete valid_token_positions.RemoveLast(); 578 delete valid_token_positions.RemoveLast();
1272 } 579 }
1273 while (yield_token_positions.length() > 0) { 580 while (yield_token_positions.length() > 0) {
1274 delete yield_token_positions.RemoveLast(); 581 delete yield_token_positions.RemoveLast();
1275 } 582 }
1276 } 583 }
1277 584
1278 585
1279 void Program::AcceptTreeVisitor(TreeVisitor* visitor) {
1280 visitor->VisitProgram(this);
1281 }
1282
1283
1284 void Program::VisitChildren(Visitor* visitor) {
1285 VisitList(&libraries(), visitor);
1286 }
1287
1288
1289 } // namespace kernel 586 } // namespace kernel
1290 587
1291 } // namespace dart 588 } // namespace dart
1292 #endif // !defined(DART_PRECOMPILED_RUNTIME) 589 #endif // !defined(DART_PRECOMPILED_RUNTIME)
OLDNEW
« no previous file with comments | « runtime/vm/kernel.h ('k') | runtime/vm/kernel_binary.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698