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

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

Issue 2782913003: Revert "Remove definitions from Kernel canonical names." (Closed)
Patch Set: Created 3 years, 8 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 {
(...skipping 15 matching lines...) Expand all
26 delete children_[i]; 26 delete children_[i];
27 } 27 }
28 } 28 }
29 29
30 30
31 CanonicalName* CanonicalName::NewRoot() { 31 CanonicalName* CanonicalName::NewRoot() {
32 return new CanonicalName(); 32 return new CanonicalName();
33 } 33 }
34 34
35 35
36 void CanonicalName::BindTo(LinkedNode* new_target) {
37 ASSERT(new_target != NULL);
38 if (definition_ == new_target) return;
39 ASSERT(definition_ == NULL);
40 ASSERT(new_target->canonical_name_ == NULL);
41 definition_ = new_target;
42 new_target->canonical_name_ = this;
43 }
44
45
46 void CanonicalName::Unbind() {
47 if (definition_ == NULL) return;
48 ASSERT(definition_->canonical_name_ == this);
49 definition_->canonical_name_ = NULL;
50 definition_ = NULL;
51 }
52
53
36 CanonicalName* CanonicalName::AddChild(String* name) { 54 CanonicalName* CanonicalName::AddChild(String* name) {
37 CanonicalName* child = new CanonicalName(); 55 CanonicalName* child = new CanonicalName();
38 child->parent_ = this; 56 child->parent_ = this;
39 child->name_ = name; 57 child->name_ = name;
40 children_.Add(child); 58 children_.Add(child);
41 return child; 59 return child;
42 } 60 }
43 61
44 62
45 bool CanonicalName::IsAdministrative() { 63 Library* CanonicalName::AsLibrary() {
46 // Administrative names start with '@'. 64 return Library::Cast(definition());
47 return (name()->size() > 0) && (name()->buffer()[0] == '@');
48 } 65 }
49 66
50 67
51 bool CanonicalName::IsPrivate() { 68 Class* CanonicalName::AsClass() {
52 // Private names start with '_'. 69 return Class::Cast(definition());
53 return (name()->size() > 0) && (name()->buffer()[0] == '_');
54 } 70 }
55 71
56 72
57 bool CanonicalName::IsRoot() { 73 Member* CanonicalName::AsMember() {
58 // The root is the only canonical name with no parent. 74 return Member::Cast(definition());
59 return parent() == NULL;
60 } 75 }
61 76
62 77
63 bool CanonicalName::IsLibrary() { 78 Field* CanonicalName::AsField() {
64 // Libraries are the only canonical names with the root as their parent. 79 return Field::Cast(definition());
65 return !IsRoot() && parent()->IsRoot();
66 } 80 }
67 81
68 82
69 bool CanonicalName::IsClass() { 83 Constructor* CanonicalName::AsConstructor() {
70 // Classes have the library as their parent and are not an administrative 84 return Constructor::Cast(definition());
71 // name starting with @.
72 return !IsAdministrative() && !IsRoot() && parent()->IsLibrary();
73 } 85 }
74 86
75 87
76 bool CanonicalName::IsMember() { 88 Procedure* CanonicalName::AsProcedure() {
77 return IsConstructor() || IsField() || IsProcedure(); 89 return Procedure::Cast(definition());
78 } 90 }
79 91
80 92
81 // Note the two occurrences of the parameter 'literal'.
82 #define COMPARE_NAME(canonical_name, literal) \
83 memcmp((canonical_name)->name()->buffer(), (literal), strlen(literal)) == 0
84
85 bool CanonicalName::IsField() {
86 // Fields with private names have the import URI of the library where they are
87 // visible as the parent and the string "@fields" as the parent's parent.
88 // Fields with non-private names have the string "@fields' as the parent.
89 if (IsRoot()) {
90 return false;
91 }
92 CanonicalName* kind = this->parent();
93 if (IsPrivate()) {
94 kind = kind->parent();
95 }
96 return COMPARE_NAME(kind, "@fields");
97 }
98
99
100 bool CanonicalName::IsConstructor() {
101 // Constructors with private names have the import URI of the library where
102 // they are visible as the parent and the string "@constructors" as the
103 // parent's parent. Constructors with non-private names have the string
104 // "@constructors" as the parent.
105 if (IsRoot()) {
106 return false;
107 }
108 CanonicalName* kind = this->parent();
109 if (IsPrivate()) {
110 kind = kind->parent();
111 }
112 return COMPARE_NAME(kind, "@constructors");
113 }
114
115
116 bool CanonicalName::IsProcedure() {
117 return IsMethod() || IsGetter() || IsSetter() || IsFactory();
118 }
119
120
121 bool CanonicalName::IsMethod() {
122 // Methods with private names have the import URI of the library where they
123 // are visible as the parent and the string "@methods" as the parent's parent.
124 // Methods with non-private names have the string "@methods" as the parent.
125 if (IsRoot()) {
126 return false;
127 }
128 CanonicalName* kind = this->parent();
129 if (IsPrivate()) {
130 kind = kind->parent();
131 }
132 return COMPARE_NAME(kind, "@methods");
133 }
134
135
136 bool CanonicalName::IsGetter() {
137 // Getters with private names have the import URI of the library where they
138 // are visible as the parent and the string "@getters" as the parent's parent.
139 // Getters with non-private names have the string "@getters" as the parent.
140 if (IsRoot()) {
141 return false;
142 }
143 CanonicalName* kind = this->parent();
144 if (IsPrivate()) {
145 kind = kind->parent();
146 }
147 return COMPARE_NAME(kind, "@getters");
148 }
149
150
151 bool CanonicalName::IsSetter() {
152 // Setters with private names have the import URI of the library where they
153 // are visible as the parent and the string "@setters" as the parent's parent.
154 // Setters with non-private names have the string "@setters" as the parent.
155 if (IsRoot()) {
156 return false;
157 }
158 CanonicalName* kind = this->parent();
159 if (IsPrivate()) {
160 kind = kind->parent();
161 }
162 return COMPARE_NAME(kind, "@setters");
163 }
164
165
166 bool CanonicalName::IsFactory() {
167 // Factories with private names have the import URI of the library where they
168 // are visible as the parent and the string "@factories" as the parent's
169 // parent. Factories with non-private names have the string "@factories" as
170 // the parent.
171 if (IsRoot()) {
172 return false;
173 }
174 CanonicalName* kind = this->parent();
175 if (IsPrivate()) {
176 kind = kind->parent();
177 }
178 return COMPARE_NAME(kind, "@factories");
179 }
180
181 #undef COMPARE_NAME
182
183
184 CanonicalName* CanonicalName::EnclosingName() {
185 ASSERT(IsField() || IsConstructor() || IsProcedure());
186 CanonicalName* enclosing = parent()->parent();
187 if (IsPrivate()) {
188 enclosing = enclosing->parent();
189 }
190 ASSERT(enclosing->IsLibrary() || enclosing->IsClass());
191 return enclosing;
192 }
193
194
195 Node::~Node() {} 93 Node::~Node() {}
196 94
197 95
198 TreeNode::~TreeNode() {} 96 TreeNode::~TreeNode() {}
199 97
200 98
201 void TreeNode::AcceptVisitor(Visitor* visitor) { 99 void TreeNode::AcceptVisitor(Visitor* visitor) {
202 AcceptTreeVisitor(visitor); 100 AcceptTreeVisitor(visitor);
203 } 101 }
204 102
(...skipping 25 matching lines...) Expand all
230 128
231 129
232 NormalClass::~NormalClass() {} 130 NormalClass::~NormalClass() {}
233 131
234 132
235 void NormalClass::AcceptClassVisitor(ClassVisitor* visitor) { 133 void NormalClass::AcceptClassVisitor(ClassVisitor* visitor) {
236 visitor->VisitNormalClass(this); 134 visitor->VisitNormalClass(this);
237 } 135 }
238 136
239 137
138 void NormalClass::AcceptReferenceVisitor(ClassReferenceVisitor* visitor) {
139 visitor->VisitNormalClassReference(this);
140 }
141
142
240 void NormalClass::VisitChildren(Visitor* visitor) { 143 void NormalClass::VisitChildren(Visitor* visitor) {
241 VisitList(&type_parameters(), visitor); 144 VisitList(&type_parameters(), visitor);
242 if (super_class() != NULL) visitor->VisitInterfaceType(super_class()); 145 if (super_class() != NULL) visitor->VisitInterfaceType(super_class());
243 VisitList(&implemented_classes(), visitor); 146 VisitList(&implemented_classes(), visitor);
244 VisitList(&constructors(), visitor); 147 VisitList(&constructors(), visitor);
245 VisitList(&procedures(), visitor); 148 VisitList(&procedures(), visitor);
246 VisitList(&fields(), visitor); 149 VisitList(&fields(), visitor);
247 } 150 }
248 151
249 152
250 MixinClass::~MixinClass() {} 153 MixinClass::~MixinClass() {}
251 154
252 155
253 void MixinClass::AcceptClassVisitor(ClassVisitor* visitor) { 156 void MixinClass::AcceptClassVisitor(ClassVisitor* visitor) {
254 visitor->VisitMixinClass(this); 157 visitor->VisitMixinClass(this);
255 } 158 }
256 159
257 160
161 void MixinClass::AcceptReferenceVisitor(ClassReferenceVisitor* visitor) {
162 visitor->VisitMixinClassReference(this);
163 }
164
165
258 void MixinClass::VisitChildren(Visitor* visitor) { 166 void MixinClass::VisitChildren(Visitor* visitor) {
259 VisitList(&type_parameters(), visitor); 167 VisitList(&type_parameters(), visitor);
260 visitor->VisitInterfaceType(first()); 168 visitor->VisitInterfaceType(first());
261 visitor->VisitInterfaceType(second()); 169 visitor->VisitInterfaceType(second());
262 VisitList(&implemented_classes(), visitor); 170 VisitList(&implemented_classes(), visitor);
263 VisitList(&constructors(), visitor); 171 VisitList(&constructors(), visitor);
264 } 172 }
265 173
266 174
267 Member::~Member() {} 175 Member::~Member() {}
268 176
269 177
270 void Member::AcceptTreeVisitor(TreeVisitor* visitor) { 178 void Member::AcceptTreeVisitor(TreeVisitor* visitor) {
271 AcceptMemberVisitor(visitor); 179 AcceptMemberVisitor(visitor);
272 } 180 }
273 181
274 182
275 Field::~Field() {} 183 Field::~Field() {}
276 184
277 185
278 void Field::AcceptMemberVisitor(MemberVisitor* visitor) { 186 void Field::AcceptMemberVisitor(MemberVisitor* visitor) {
279 visitor->VisitField(this); 187 visitor->VisitField(this);
280 } 188 }
281 189
282 190
191 void Field::AcceptReferenceVisitor(MemberReferenceVisitor* visitor) {
192 visitor->VisitFieldReference(this);
193 }
194
195
283 void Field::VisitChildren(Visitor* visitor) { 196 void Field::VisitChildren(Visitor* visitor) {
284 type()->AcceptDartTypeVisitor(visitor); 197 type()->AcceptDartTypeVisitor(visitor);
285 visitor->VisitName(name()); 198 visitor->VisitName(name());
286 if (initializer() != NULL) initializer()->AcceptExpressionVisitor(visitor); 199 if (initializer() != NULL) initializer()->AcceptExpressionVisitor(visitor);
287 } 200 }
288 201
289 202
290 Constructor::~Constructor() {} 203 Constructor::~Constructor() {}
291 204
292 205
293 void Constructor::AcceptMemberVisitor(MemberVisitor* visitor) { 206 void Constructor::AcceptMemberVisitor(MemberVisitor* visitor) {
294 visitor->VisitConstructor(this); 207 visitor->VisitConstructor(this);
295 } 208 }
296 209
297 210
211 void Constructor::AcceptReferenceVisitor(MemberReferenceVisitor* visitor) {
212 visitor->VisitConstructorReference(this);
213 }
214
215
298 void Constructor::VisitChildren(Visitor* visitor) { 216 void Constructor::VisitChildren(Visitor* visitor) {
299 visitor->VisitName(name()); 217 visitor->VisitName(name());
300 visitor->VisitFunctionNode(function()); 218 visitor->VisitFunctionNode(function());
301 VisitList(&initializers(), visitor); 219 VisitList(&initializers(), visitor);
302 } 220 }
303 221
304 222
305 Procedure::~Procedure() {} 223 Procedure::~Procedure() {}
306 224
307 225
308 void Procedure::AcceptMemberVisitor(MemberVisitor* visitor) { 226 void Procedure::AcceptMemberVisitor(MemberVisitor* visitor) {
309 visitor->VisitProcedure(this); 227 visitor->VisitProcedure(this);
310 } 228 }
311 229
312 230
231 void Procedure::AcceptReferenceVisitor(MemberReferenceVisitor* visitor) {
232 visitor->VisitProcedureReference(this);
233 }
234
235
313 void Procedure::VisitChildren(Visitor* visitor) { 236 void Procedure::VisitChildren(Visitor* visitor) {
314 visitor->VisitName(name()); 237 visitor->VisitName(name());
315 if (function() != NULL) visitor->VisitFunctionNode(function()); 238 if (function() != NULL) visitor->VisitFunctionNode(function());
316 } 239 }
317 240
318 241
319 Initializer::~Initializer() {} 242 Initializer::~Initializer() {}
320 243
321 244
322 void Initializer::AcceptTreeVisitor(TreeVisitor* visitor) { 245 void Initializer::AcceptTreeVisitor(TreeVisitor* visitor) {
(...skipping 14 matching lines...) Expand all
337 260
338 FieldInitializer::~FieldInitializer() {} 261 FieldInitializer::~FieldInitializer() {}
339 262
340 263
341 void FieldInitializer::AcceptInitializerVisitor(InitializerVisitor* visitor) { 264 void FieldInitializer::AcceptInitializerVisitor(InitializerVisitor* visitor) {
342 visitor->VisitFieldInitializer(this); 265 visitor->VisitFieldInitializer(this);
343 } 266 }
344 267
345 268
346 void FieldInitializer::VisitChildren(Visitor* visitor) { 269 void FieldInitializer::VisitChildren(Visitor* visitor) {
270 visitor->VisitFieldReference(field());
347 value()->AcceptExpressionVisitor(visitor); 271 value()->AcceptExpressionVisitor(visitor);
348 } 272 }
349 273
350 274
351 SuperInitializer::~SuperInitializer() {} 275 SuperInitializer::~SuperInitializer() {}
352 276
353 277
354 void SuperInitializer::AcceptInitializerVisitor(InitializerVisitor* visitor) { 278 void SuperInitializer::AcceptInitializerVisitor(InitializerVisitor* visitor) {
355 visitor->VisitSuperInitializer(this); 279 visitor->VisitSuperInitializer(this);
356 } 280 }
357 281
358 282
359 void SuperInitializer::VisitChildren(Visitor* visitor) { 283 void SuperInitializer::VisitChildren(Visitor* visitor) {
284 visitor->VisitConstructorReference(target());
360 visitor->VisitArguments(arguments()); 285 visitor->VisitArguments(arguments());
361 } 286 }
362 287
363 288
364 RedirectingInitializer::~RedirectingInitializer() {} 289 RedirectingInitializer::~RedirectingInitializer() {}
365 290
366 291
367 void RedirectingInitializer::AcceptInitializerVisitor( 292 void RedirectingInitializer::AcceptInitializerVisitor(
368 InitializerVisitor* visitor) { 293 InitializerVisitor* visitor) {
369 visitor->VisitRedirectingInitializer(this); 294 visitor->VisitRedirectingInitializer(this);
370 } 295 }
371 296
372 297
373 void RedirectingInitializer::VisitChildren(Visitor* visitor) { 298 void RedirectingInitializer::VisitChildren(Visitor* visitor) {
299 visitor->VisitConstructorReference(target());
374 visitor->VisitArguments(arguments()); 300 visitor->VisitArguments(arguments());
375 } 301 }
376 302
377 303
378 LocalInitializer::~LocalInitializer() {} 304 LocalInitializer::~LocalInitializer() {}
379 305
380 306
381 void LocalInitializer::AcceptInitializerVisitor(InitializerVisitor* visitor) { 307 void LocalInitializer::AcceptInitializerVisitor(InitializerVisitor* visitor) {
382 visitor->VisitLocalInitializer(this); 308 visitor->VisitLocalInitializer(this);
383 } 309 }
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 DirectPropertyGet::~DirectPropertyGet() {} 406 DirectPropertyGet::~DirectPropertyGet() {}
481 407
482 408
483 void DirectPropertyGet::AcceptExpressionVisitor(ExpressionVisitor* visitor) { 409 void DirectPropertyGet::AcceptExpressionVisitor(ExpressionVisitor* visitor) {
484 visitor->VisitDirectPropertyGet(this); 410 visitor->VisitDirectPropertyGet(this);
485 } 411 }
486 412
487 413
488 void DirectPropertyGet::VisitChildren(Visitor* visitor) { 414 void DirectPropertyGet::VisitChildren(Visitor* visitor) {
489 receiver()->AcceptExpressionVisitor(visitor); 415 receiver()->AcceptExpressionVisitor(visitor);
416 target()->AcceptReferenceVisitor(visitor);
490 } 417 }
491 418
492 419
493 DirectPropertySet::~DirectPropertySet() {} 420 DirectPropertySet::~DirectPropertySet() {}
494 421
495 422
496 void DirectPropertySet::AcceptExpressionVisitor(ExpressionVisitor* visitor) { 423 void DirectPropertySet::AcceptExpressionVisitor(ExpressionVisitor* visitor) {
497 visitor->VisitDirectPropertySet(this); 424 visitor->VisitDirectPropertySet(this);
498 } 425 }
499 426
500 427
501 void DirectPropertySet::VisitChildren(Visitor* visitor) { 428 void DirectPropertySet::VisitChildren(Visitor* visitor) {
502 receiver()->AcceptExpressionVisitor(visitor); 429 receiver()->AcceptExpressionVisitor(visitor);
430 target()->AcceptReferenceVisitor(visitor);
503 value()->AcceptExpressionVisitor(visitor); 431 value()->AcceptExpressionVisitor(visitor);
504 } 432 }
505 433
506 434
507 StaticGet::~StaticGet() {} 435 StaticGet::~StaticGet() {}
508 436
509 437
510 void StaticGet::AcceptExpressionVisitor(ExpressionVisitor* visitor) { 438 void StaticGet::AcceptExpressionVisitor(ExpressionVisitor* visitor) {
511 visitor->VisitStaticGet(this); 439 visitor->VisitStaticGet(this);
512 } 440 }
513 441
514 442
515 void StaticGet::VisitChildren(Visitor* visitor) {} 443 void StaticGet::VisitChildren(Visitor* visitor) {
444 target()->AcceptReferenceVisitor(visitor);
445 }
516 446
517 447
518 StaticSet::~StaticSet() {} 448 StaticSet::~StaticSet() {}
519 449
520 450
521 void StaticSet::AcceptExpressionVisitor(ExpressionVisitor* visitor) { 451 void StaticSet::AcceptExpressionVisitor(ExpressionVisitor* visitor) {
522 visitor->VisitStaticSet(this); 452 visitor->VisitStaticSet(this);
523 } 453 }
524 454
525 455
526 void StaticSet::VisitChildren(Visitor* visitor) { 456 void StaticSet::VisitChildren(Visitor* visitor) {
457 target()->AcceptReferenceVisitor(visitor);
527 expression()->AcceptExpressionVisitor(visitor); 458 expression()->AcceptExpressionVisitor(visitor);
528 } 459 }
529 460
530 461
531 Arguments::~Arguments() {} 462 Arguments::~Arguments() {}
532 463
533 464
534 void Arguments::AcceptTreeVisitor(TreeVisitor* visitor) { 465 void Arguments::AcceptTreeVisitor(TreeVisitor* visitor) {
535 visitor->VisitArguments(this); 466 visitor->VisitArguments(this);
536 } 467 }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 506
576 507
577 void DirectMethodInvocation::AcceptExpressionVisitor( 508 void DirectMethodInvocation::AcceptExpressionVisitor(
578 ExpressionVisitor* visitor) { 509 ExpressionVisitor* visitor) {
579 visitor->VisitDirectMethodInvocation(this); 510 visitor->VisitDirectMethodInvocation(this);
580 } 511 }
581 512
582 513
583 void DirectMethodInvocation::VisitChildren(Visitor* visitor) { 514 void DirectMethodInvocation::VisitChildren(Visitor* visitor) {
584 receiver()->AcceptExpressionVisitor(visitor); 515 receiver()->AcceptExpressionVisitor(visitor);
516 visitor->VisitProcedureReference(target());
585 visitor->VisitArguments(arguments()); 517 visitor->VisitArguments(arguments());
586 } 518 }
587 519
588 520
589 StaticInvocation::~StaticInvocation() {} 521 StaticInvocation::~StaticInvocation() {}
590 522
591 523
592 void StaticInvocation::AcceptExpressionVisitor(ExpressionVisitor* visitor) { 524 void StaticInvocation::AcceptExpressionVisitor(ExpressionVisitor* visitor) {
593 visitor->VisitStaticInvocation(this); 525 visitor->VisitStaticInvocation(this);
594 } 526 }
595 527
596 528
597 void StaticInvocation::VisitChildren(Visitor* visitor) { 529 void StaticInvocation::VisitChildren(Visitor* visitor) {
530 visitor->VisitProcedureReference(procedure());
598 visitor->VisitArguments(arguments()); 531 visitor->VisitArguments(arguments());
599 } 532 }
600 533
601 534
602 ConstructorInvocation::~ConstructorInvocation() {} 535 ConstructorInvocation::~ConstructorInvocation() {}
603 536
604 537
605 void ConstructorInvocation::AcceptExpressionVisitor( 538 void ConstructorInvocation::AcceptExpressionVisitor(
606 ExpressionVisitor* visitor) { 539 ExpressionVisitor* visitor) {
607 visitor->VisitConstructorInvocation(this); 540 visitor->VisitConstructorInvocation(this);
608 } 541 }
609 542
610 543
611 void ConstructorInvocation::VisitChildren(Visitor* visitor) { 544 void ConstructorInvocation::VisitChildren(Visitor* visitor) {
545 visitor->VisitConstructorReference(target());
612 visitor->VisitArguments(arguments()); 546 visitor->VisitArguments(arguments());
613 } 547 }
614 548
615 549
616 Not::~Not() {} 550 Not::~Not() {}
617 551
618 552
619 void Not::AcceptExpressionVisitor(ExpressionVisitor* visitor) { 553 void Not::AcceptExpressionVisitor(ExpressionVisitor* visitor) {
620 visitor->VisitNot(this); 554 visitor->VisitNot(this);
621 } 555 }
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
1253 1187
1254 InterfaceType::~InterfaceType() {} 1188 InterfaceType::~InterfaceType() {}
1255 1189
1256 1190
1257 void InterfaceType::AcceptDartTypeVisitor(DartTypeVisitor* visitor) { 1191 void InterfaceType::AcceptDartTypeVisitor(DartTypeVisitor* visitor) {
1258 visitor->VisitInterfaceType(this); 1192 visitor->VisitInterfaceType(this);
1259 } 1193 }
1260 1194
1261 1195
1262 void InterfaceType::VisitChildren(Visitor* visitor) { 1196 void InterfaceType::VisitChildren(Visitor* visitor) {
1197 klass()->AcceptReferenceVisitor(visitor);
1263 VisitList(&type_arguments(), visitor); 1198 VisitList(&type_arguments(), visitor);
1264 } 1199 }
1265 1200
1266 1201
1267 FunctionType::~FunctionType() {} 1202 FunctionType::~FunctionType() {}
1268 1203
1269 1204
1270 void FunctionType::AcceptDartTypeVisitor(DartTypeVisitor* visitor) { 1205 void FunctionType::AcceptDartTypeVisitor(DartTypeVisitor* visitor) {
1271 visitor->VisitFunctionType(this); 1206 visitor->VisitFunctionType(this);
1272 } 1207 }
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
1316 } 1251 }
1317 1252
1318 1253
1319 void Program::AcceptTreeVisitor(TreeVisitor* visitor) { 1254 void Program::AcceptTreeVisitor(TreeVisitor* visitor) {
1320 visitor->VisitProgram(this); 1255 visitor->VisitProgram(this);
1321 } 1256 }
1322 1257
1323 1258
1324 void Program::VisitChildren(Visitor* visitor) { 1259 void Program::VisitChildren(Visitor* visitor) {
1325 VisitList(&libraries(), visitor); 1260 VisitList(&libraries(), visitor);
1261 visitor->VisitProcedureReference(main_method());
1326 } 1262 }
1327 1263
1328 1264
1329 } // namespace kernel 1265 } // namespace kernel
1330 1266
1331 } // namespace dart 1267 } // namespace dart
1332 #endif // !defined(DART_PRECOMPILED_RUNTIME) 1268 #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