| 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 'package:front_end/src/fasta/scanner.dart' show isUserDefinableOperator; | 7 import 'package:front_end/src/fasta/scanner.dart' show isUserDefinableOperator; |
| 8 | 8 |
| 9 import '../common.dart'; | 9 import '../common.dart'; |
| 10 import '../common/names.dart' show Selectors; | 10 import '../common/names.dart' show Selectors; |
| (...skipping 3704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3715 if (!targetSignature.isCompatibleWith(constructorSignature)) { | 3715 if (!targetSignature.isCompatibleWith(constructorSignature)) { |
| 3716 assert(!isSubtype); | 3716 assert(!isSubtype); |
| 3717 registry.registerFeature(Feature.THROW_NO_SUCH_METHOD); | 3717 registry.registerFeature(Feature.THROW_NO_SUCH_METHOD); |
| 3718 isValidAsConstant = false; | 3718 isValidAsConstant = false; |
| 3719 } | 3719 } |
| 3720 | 3720 |
| 3721 registry.registerStaticUse(new StaticUse.constructorRedirect( | 3721 registry.registerStaticUse(new StaticUse.constructorRedirect( |
| 3722 redirectionTarget, | 3722 redirectionTarget, |
| 3723 redirectionTarget.enclosingClass.thisType | 3723 redirectionTarget.enclosingClass.thisType |
| 3724 .subst(type.typeArguments, targetClass.typeVariables))); | 3724 .subst(type.typeArguments, targetClass.typeVariables))); |
| 3725 if (resolution.commonElements.isSymbolConstructor(enclosingElement)) { | 3725 if (resolution.commonElements.isSymbolConstructor(constructor)) { |
| 3726 registry.registerFeature(Feature.SYMBOL_CONSTRUCTOR); | 3726 registry.registerFeature(Feature.SYMBOL_CONSTRUCTOR); |
| 3727 } | 3727 } |
| 3728 if (isValidAsConstant) { | 3728 if (isValidAsConstant) { |
| 3729 List<String> names = <String>[]; | 3729 List<String> names = <String>[]; |
| 3730 List<ConstantExpression> arguments = <ConstantExpression>[]; | 3730 List<ConstantExpression> arguments = <ConstantExpression>[]; |
| 3731 int index = 0; | 3731 int index = 0; |
| 3732 constructorSignature.forEachParameter((ParameterElement parameter) { | 3732 constructorSignature.forEachParameter((ParameterElement parameter) { |
| 3733 if (parameter.isNamed) { | 3733 if (parameter.isNamed) { |
| 3734 String name = parameter.name; | 3734 String name = parameter.name; |
| 3735 names.add(name); | 3735 names.add(name); |
| (...skipping 1076 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4812 } | 4812 } |
| 4813 return const NoneResult(); | 4813 return const NoneResult(); |
| 4814 } | 4814 } |
| 4815 } | 4815 } |
| 4816 | 4816 |
| 4817 /// Looks up [name] in [scope] and unwraps the result. | 4817 /// Looks up [name] in [scope] and unwraps the result. |
| 4818 Element lookupInScope( | 4818 Element lookupInScope( |
| 4819 DiagnosticReporter reporter, Node node, Scope scope, String name) { | 4819 DiagnosticReporter reporter, Node node, Scope scope, String name) { |
| 4820 return Elements.unwrap(scope.lookup(name), reporter, node); | 4820 return Elements.unwrap(scope.lookup(name), reporter, node); |
| 4821 } | 4821 } |
| OLD | NEW |