| 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 import 'dart:collection'; | 5 import 'dart:collection'; |
| 6 | 6 |
| 7 import 'package:js_runtime/shared/embedded_names.dart'; | 7 import 'package:js_runtime/shared/embedded_names.dart'; |
| 8 | 8 |
| 9 import '../closure.dart'; | 9 import '../closure.dart'; |
| 10 import '../common.dart'; | 10 import '../common.dart'; |
| (...skipping 3396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3407 target.redirectionDeferredPrefix, node); | 3407 target.redirectionDeferredPrefix, node); |
| 3408 } | 3408 } |
| 3409 target = target.immediateRedirectionTarget; | 3409 target = target.immediateRedirectionTarget; |
| 3410 } | 3410 } |
| 3411 } | 3411 } |
| 3412 ResolutionInterfaceType type = elements.getType(node); | 3412 ResolutionInterfaceType type = elements.getType(node); |
| 3413 ResolutionInterfaceType expectedType = | 3413 ResolutionInterfaceType expectedType = |
| 3414 constructorDeclaration.computeEffectiveTargetType(type); | 3414 constructorDeclaration.computeEffectiveTargetType(type); |
| 3415 expectedType = localsHandler.substInContext(expectedType); | 3415 expectedType = localsHandler.substInContext(expectedType); |
| 3416 | 3416 |
| 3417 if (compiler.elementHasCompileTimeError(constructor)) { | 3417 if (compiler.elementHasCompileTimeError(constructor) || |
| 3418 compiler.elementHasCompileTimeError(constructor.enclosingClass)) { |
| 3418 // TODO(ahe): Do something like [generateWrongArgumentCountError]. | 3419 // TODO(ahe): Do something like [generateWrongArgumentCountError]. |
| 3419 stack.add(graph.addConstantNull(closedWorld)); | 3420 stack.add(graph.addConstantNull(closedWorld)); |
| 3420 return; | 3421 return; |
| 3421 } | 3422 } |
| 3422 | 3423 |
| 3423 if (checkTypeVariableBounds(node, type)) return; | 3424 if (checkTypeVariableBounds(node, type)) return; |
| 3424 | 3425 |
| 3425 // Abstract class instantiation error takes precedence over argument | 3426 // Abstract class instantiation error takes precedence over argument |
| 3426 // mismatch. | 3427 // mismatch. |
| 3427 ClassElement cls = constructor.enclosingClass; | 3428 ClassElement cls = constructor.enclosingClass; |
| (...skipping 3386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6814 this.oldReturnLocal, | 6815 this.oldReturnLocal, |
| 6815 this.oldReturnType, | 6816 this.oldReturnType, |
| 6816 this.oldResolvedAst, | 6817 this.oldResolvedAst, |
| 6817 this.oldStack, | 6818 this.oldStack, |
| 6818 this.oldLocalsHandler, | 6819 this.oldLocalsHandler, |
| 6819 this.inTryStatement, | 6820 this.inTryStatement, |
| 6820 this.allFunctionsCalledOnce, | 6821 this.allFunctionsCalledOnce, |
| 6821 this.oldElementInferenceResults) | 6822 this.oldElementInferenceResults) |
| 6822 : super(function); | 6823 : super(function); |
| 6823 } | 6824 } |
| OLD | NEW |