| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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.constructors; | 5 library dart2js.resolution.constructors; |
| 6 | 6 |
| 7 import '../common.dart'; | 7 import '../common.dart'; |
| 8 import '../compiler.dart' show | 8 import '../compiler.dart' show |
| 9 Compiler; | 9 Compiler; |
| 10 import '../constants/constructors.dart' show | 10 import '../constants/constructors.dart' show |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 final String className = lookupTarget.name; | 226 final String className = lookupTarget.name; |
| 227 final bool isImplicitSuperCall = true; | 227 final bool isImplicitSuperCall = true; |
| 228 verifyThatConstructorMatchesCall(calledConstructor, | 228 verifyThatConstructorMatchesCall(calledConstructor, |
| 229 CallStructure.NO_ARGS, | 229 CallStructure.NO_ARGS, |
| 230 isImplicitSuperCall, | 230 isImplicitSuperCall, |
| 231 functionNode, | 231 functionNode, |
| 232 className, | 232 className, |
| 233 constructorSelector); | 233 constructorSelector); |
| 234 if (calledConstructor != null) { | 234 if (calledConstructor != null) { |
| 235 registry.registerImplicitSuperCall(calledConstructor); | 235 registry.registerImplicitSuperCall(calledConstructor); |
| 236 registry.registerStaticUse(calledConstructor); | |
| 237 } | 236 } |
| 238 | 237 |
| 239 if (isConst && isValidAsConstant) { | 238 if (isConst && isValidAsConstant) { |
| 240 return new ConstructedConstantExpression( | 239 return new ConstructedConstantExpression( |
| 241 targetType, | 240 targetType, |
| 242 calledConstructor, | 241 calledConstructor, |
| 243 CallStructure.NO_ARGS, | 242 CallStructure.NO_ARGS, |
| 244 const <ConstantExpression>[]); | 243 const <ConstantExpression>[]); |
| 245 } | 244 } |
| 246 } | 245 } |
| (...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 755 // constructors. | 754 // constructors. |
| 756 return null; | 755 return null; |
| 757 } | 756 } |
| 758 // TODO(johnniwinther): Use [Name] for lookup. | 757 // TODO(johnniwinther): Use [Name] for lookup. |
| 759 ConstructorElement constructor = cls.lookupConstructor(constructorName); | 758 ConstructorElement constructor = cls.lookupConstructor(constructorName); |
| 760 if (constructor != null) { | 759 if (constructor != null) { |
| 761 constructor = constructor.declaration; | 760 constructor = constructor.declaration; |
| 762 } | 761 } |
| 763 return constructor; | 762 return constructor; |
| 764 } | 763 } |
| OLD | NEW |