| 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 3822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3833 sendIsMemberAccess = oldSendIsMemberAccess; | 3833 sendIsMemberAccess = oldSendIsMemberAccess; |
| 3834 if (result.kind == ResultKind.CONSTANT) { | 3834 if (result.kind == ResultKind.CONSTANT) { |
| 3835 return result; | 3835 return result; |
| 3836 } | 3836 } |
| 3837 return const NoneResult(); | 3837 return const NoneResult(); |
| 3838 } | 3838 } |
| 3839 | 3839 |
| 3840 ResolutionResult visitNewExpression(NewExpression node) { | 3840 ResolutionResult visitNewExpression(NewExpression node) { |
| 3841 ConstructorResult result = resolveConstructor(node); | 3841 ConstructorResult result = resolveConstructor(node); |
| 3842 ConstructorElement constructor = result.element; | 3842 ConstructorElement constructor = result.element; |
| 3843 if (resolution.commonElements.isSymbolConstructor(constructor)) { |
| 3844 registry.registerFeature(Feature.SYMBOL_CONSTRUCTOR); |
| 3845 } |
| 3843 ArgumentsResult argumentsResult; | 3846 ArgumentsResult argumentsResult; |
| 3844 if (node.isConst) { | 3847 if (node.isConst) { |
| 3845 argumentsResult = | 3848 argumentsResult = |
| 3846 inConstantContext(() => resolveArguments(node.send.argumentsNode)); | 3849 inConstantContext(() => resolveArguments(node.send.argumentsNode)); |
| 3847 } else { | 3850 } else { |
| 3848 argumentsResult = resolveArguments(node.send.argumentsNode); | 3851 argumentsResult = resolveArguments(node.send.argumentsNode); |
| 3849 } | 3852 } |
| 3850 // TODO(johnniwinther): Avoid the need for a [Selector]. | 3853 // TODO(johnniwinther): Avoid the need for a [Selector]. |
| 3851 Selector selector = resolveSelector(node.send, constructor); | 3854 Selector selector = resolveSelector(node.send, constructor); |
| 3852 CallStructure callStructure = selector.callStructure; | 3855 CallStructure callStructure = selector.callStructure; |
| (...skipping 944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4797 } | 4800 } |
| 4798 return const NoneResult(); | 4801 return const NoneResult(); |
| 4799 } | 4802 } |
| 4800 } | 4803 } |
| 4801 | 4804 |
| 4802 /// Looks up [name] in [scope] and unwraps the result. | 4805 /// Looks up [name] in [scope] and unwraps the result. |
| 4803 Element lookupInScope( | 4806 Element lookupInScope( |
| 4804 DiagnosticReporter reporter, Node node, Scope scope, String name) { | 4807 DiagnosticReporter reporter, Node node, Scope scope, String name) { |
| 4805 return Elements.unwrap(scope.lookup(name), reporter, node); | 4808 return Elements.unwrap(scope.lookup(name), reporter, node); |
| 4806 } | 4809 } |
| OLD | NEW |