OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 part of dart2js; | 5 part of dart2js; |
6 | 6 |
7 /// Enum for the visit methods added in [ResolvedVisitor]. | 7 /// Enum for the visit methods added in [ResolvedVisitor]. |
8 // TODO(johnniwinther): Remove this. | 8 // TODO(johnniwinther): Remove this. |
9 enum ResolvedKind { | 9 enum ResolvedKind { |
10 ASSERT, | 10 ASSERT, |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 } | 232 } |
233 | 233 |
234 @override | 234 @override |
235 R visitAssertSend(Send node) { | 235 R visitAssertSend(Send node) { |
236 return internalError(node, "visitAssertSend is deprecated"); | 236 return internalError(node, "visitAssertSend is deprecated"); |
237 } | 237 } |
238 | 238 |
239 bool checkResolvedKind(Node node, | 239 bool checkResolvedKind(Node node, |
240 ResolvedKind oldKind, | 240 ResolvedKind oldKind, |
241 ResolvedKind newKind) { | 241 ResolvedKind newKind) { |
242 return invariant(node, oldKind == newKind, message: '$oldKind != $newKind'); | 242 return invariant(node, oldKind == newKind, |
| 243 message: 'old=$oldKind != new=$newKind'); |
243 } | 244 } |
244 | 245 |
245 ResolvedKind computeResolvedKindFromStructure( | 246 ResolvedKind computeResolvedKindFromStructure( |
246 Node node, SemanticSendStructure structure) { | 247 Node node, SemanticSendStructure structure) { |
247 return structure.dispatch( | 248 return structure.dispatch( |
248 _resolvedKindDispatcher, node, const ResolvedKindComputer()); | 249 _resolvedKindDispatcher, node, const ResolvedKindComputer()); |
249 } | 250 } |
250 | 251 |
251 @override | 252 @override |
252 R visitSend(Send node) { | 253 R visitSend(Send node) { |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 CallStructure callStructure, | 430 CallStructure callStructure, |
430 ResolvedKindVisitor<R> visitor) { | 431 ResolvedKindVisitor<R> visitor) { |
431 return visitor.visitStaticSend(node); | 432 return visitor.visitStaticSend(node); |
432 } | 433 } |
433 | 434 |
434 @override | 435 @override |
435 R visitSuperSetterGet( | 436 R visitSuperSetterGet( |
436 Send node, | 437 Send node, |
437 FunctionElement setter, | 438 FunctionElement setter, |
438 ResolvedKindVisitor<R> visitor) { | 439 ResolvedKindVisitor<R> visitor) { |
439 return visitor.visitGetterSend(node); | 440 return visitor.visitSuperSend(node); |
440 } | 441 } |
441 | 442 |
442 @override | 443 @override |
443 R visitSuperSetterInvoke( | 444 R visitSuperSetterInvoke( |
444 Send node, | 445 Send node, |
445 FunctionElement setter, | 446 FunctionElement setter, |
446 NodeList arguments, | 447 NodeList arguments, |
447 CallStructure callStructure, | 448 CallStructure callStructure, |
448 ResolvedKindVisitor<R> visitor) { | 449 ResolvedKindVisitor<R> visitor) { |
449 return visitor.visitSuperSend(node); | 450 return visitor.visitSuperSend(node); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 | 489 |
489 @override | 490 @override |
490 R visitUnresolvedGet( | 491 R visitUnresolvedGet( |
491 Send node, | 492 Send node, |
492 Element element, | 493 Element element, |
493 ResolvedKindVisitor<R> visitor) { | 494 ResolvedKindVisitor<R> visitor) { |
494 return visitor.visitGetterSend(node); | 495 return visitor.visitGetterSend(node); |
495 } | 496 } |
496 | 497 |
497 @override | 498 @override |
| 499 R visitUnresolvedSuperGet( |
| 500 Send node, |
| 501 Element element, |
| 502 ResolvedKindVisitor<R> visitor) { |
| 503 return visitor.visitSuperSend(node); |
| 504 } |
| 505 |
| 506 @override |
498 R visitUnresolvedInvoke( | 507 R visitUnresolvedInvoke( |
499 Send node, | 508 Send node, |
500 Element element, | 509 Element element, |
501 NodeList arguments, | 510 NodeList arguments, |
502 Selector selector, | 511 Selector selector, |
503 ResolvedKindVisitor<R> visitor) { | 512 ResolvedKindVisitor<R> visitor) { |
504 return visitor.visitStaticSend(node); | 513 return visitor.visitStaticSend(node); |
505 } | 514 } |
506 | 515 |
507 @override | 516 @override |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
790 | 799 |
791 @override | 800 @override |
792 R visitSuperIndex( | 801 R visitSuperIndex( |
793 Send node, | 802 Send node, |
794 FunctionElement function, | 803 FunctionElement function, |
795 Node index, | 804 Node index, |
796 ResolvedKindVisitor<R> visitor) { | 805 ResolvedKindVisitor<R> visitor) { |
797 return visitor.visitSuperSend(node); | 806 return visitor.visitSuperSend(node); |
798 } | 807 } |
799 } | 808 } |
OLD | NEW |