| 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 R apply(Node node, ResolvedKindVisitor<R> visitor) { | 320 R apply(Node node, ResolvedKindVisitor<R> visitor) { |
| 321 return visitor.internalError( | 321 return visitor.internalError( |
| 322 node, "ResolvedSemanticDispatcher.apply unsupported."); | 322 node, "ResolvedSemanticDispatcher.apply unsupported."); |
| 323 } | 323 } |
| 324 | 324 |
| 325 @override | 325 @override |
| 326 R bulkHandleNode( | 326 R bulkHandleNode( |
| 327 Node node, | 327 Node node, |
| 328 String message, | 328 String message, |
| 329 ResolvedKindVisitor<R> visitor) { | 329 ResolvedKindVisitor<R> visitor) { |
| 330 return bulkHandleError(node, visitor); | 330 return bulkHandleError(node, null, visitor); |
| 331 } | 331 } |
| 332 | 332 |
| 333 R bulkHandleError(Node node, ResolvedKindVisitor<R> visitor) { | 333 R bulkHandleError( |
| 334 Node node, |
| 335 ErroneousElement error, |
| 336 ResolvedKindVisitor<R> visitor) { |
| 334 if (node.asSendSet() != null) { | 337 if (node.asSendSet() != null) { |
| 335 return visitor.handleSendSet(node); | 338 return visitor.handleSendSet(node); |
| 336 } else if (node.asNewExpression() != null) { | 339 } else if (node.asNewExpression() != null) { |
| 337 return visitor.handleNewExpression(node); | 340 return visitor.handleNewExpression(node); |
| 338 } | 341 } |
| 339 return visitor.internalError(node, "No resolved kind for $node."); | 342 return visitor.internalError(node, "No resolved kind for $node."); |
| 340 } | 343 } |
| 341 | 344 |
| 342 @override | 345 @override |
| 343 R bulkHandleGet(Node node, ResolvedKindVisitor<R> visitor) { | 346 R bulkHandleGet(Node node, ResolvedKindVisitor<R> visitor) { |
| (...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 816 @override | 819 @override |
| 817 R visitLocalFunctionIncompatibleInvoke( | 820 R visitLocalFunctionIncompatibleInvoke( |
| 818 Send node, | 821 Send node, |
| 819 LocalFunctionElement function, | 822 LocalFunctionElement function, |
| 820 NodeList arguments, | 823 NodeList arguments, |
| 821 CallStructure callStructure, | 824 CallStructure callStructure, |
| 822 ResolvedKindVisitor<R> visitor) { | 825 ResolvedKindVisitor<R> visitor) { |
| 823 return visitor.visitClosureSend(node); | 826 return visitor.visitClosureSend(node); |
| 824 } | 827 } |
| 825 } | 828 } |
| OLD | NEW |