| 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 library dart2js.resolution.members; | 5 library dart2js.resolution.members; |
| 6 | 6 |
| 7 import '../common.dart'; | 7 import '../common.dart'; |
| 8 import '../common/names.dart' show Selectors; | 8 import '../common/names.dart' show Selectors; |
| 9 import '../common/resolution.dart' show Resolution; | 9 import '../common/resolution.dart' show Resolution; |
| 10 import '../compile_time_constants.dart'; | 10 import '../compile_time_constants.dart'; |
| (...skipping 2989 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3000 ErroneousElement error = reportCannotResolve(node, text); | 3000 ErroneousElement error = reportCannotResolve(node, text); |
| 3001 return handleUpdate(node, name, new StaticAccess.unresolved(error)); | 3001 return handleUpdate(node, name, new StaticAccess.unresolved(error)); |
| 3002 } | 3002 } |
| 3003 } else { | 3003 } else { |
| 3004 return handleResolvedSendSet(node, name, element); | 3004 return handleResolvedSendSet(node, name, element); |
| 3005 } | 3005 } |
| 3006 } | 3006 } |
| 3007 | 3007 |
| 3008 ResolutionResult visitSend(Send node) { | 3008 ResolutionResult visitSend(Send node) { |
| 3009 // Resolve type arguments to ensure that these are well-formed types. | 3009 // Resolve type arguments to ensure that these are well-formed types. |
| 3010 visit(node.typeArgumentsNode); | 3010 if (node.typeArgumentsNode != null) { |
| 3011 for (TypeAnnotation type in node.typeArgumentsNode.nodes) { |
| 3012 resolveTypeAnnotation(type, registerCheckedModeCheck: false); |
| 3013 } |
| 3014 } |
| 3011 if (node.isOperator) { | 3015 if (node.isOperator) { |
| 3012 // `a && b`, `a + b`, `-a`, or `a is T`. | 3016 // `a && b`, `a + b`, `-a`, or `a is T`. |
| 3013 return handleOperatorSend(node); | 3017 return handleOperatorSend(node); |
| 3014 } else if (node.receiver != null) { | 3018 } else if (node.receiver != null) { |
| 3015 // `a.b`. | 3019 // `a.b`. |
| 3016 return handleQualifiedSend(node); | 3020 return handleQualifiedSend(node); |
| 3017 } else { | 3021 } else { |
| 3018 // `a`. | 3022 // `a`. |
| 3019 return handleUnqualifiedSend(node); | 3023 return handleUnqualifiedSend(node); |
| 3020 } | 3024 } |
| (...skipping 1726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4747 } | 4751 } |
| 4748 return const NoneResult(); | 4752 return const NoneResult(); |
| 4749 } | 4753 } |
| 4750 } | 4754 } |
| 4751 | 4755 |
| 4752 /// Looks up [name] in [scope] and unwraps the result. | 4756 /// Looks up [name] in [scope] and unwraps the result. |
| 4753 Element lookupInScope( | 4757 Element lookupInScope( |
| 4754 DiagnosticReporter reporter, Node node, Scope scope, String name) { | 4758 DiagnosticReporter reporter, Node node, Scope scope, String name) { |
| 4755 return Elements.unwrap(scope.lookup(name), reporter, node); | 4759 return Elements.unwrap(scope.lookup(name), reporter, node); |
| 4756 } | 4760 } |
| OLD | NEW |