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 3372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3383 pop(); | 3383 pop(); |
3384 }); | 3384 }); |
3385 generateAbstractClassInstantiationError(send, cls.name); | 3385 generateAbstractClassInstantiationError(send, cls.name); |
3386 return; | 3386 return; |
3387 } | 3387 } |
3388 | 3388 |
3389 // TODO(5347): Try to avoid the need for calling [implementation] before | 3389 // TODO(5347): Try to avoid the need for calling [implementation] before |
3390 // calling [makeStaticArgumentList]. | 3390 // calling [makeStaticArgumentList]. |
3391 constructorImplementation = constructor.implementation; | 3391 constructorImplementation = constructor.implementation; |
3392 if (constructorImplementation.isMalformed || | 3392 if (constructorImplementation.isMalformed || |
3393 !callStructure.signatureApplies(constructorImplementation.type)) { | 3393 !callStructure |
| 3394 .signatureApplies(constructorImplementation.parameterStructure)) { |
3394 generateWrongArgumentCountError(send, constructor, send.arguments); | 3395 generateWrongArgumentCountError(send, constructor, send.arguments); |
3395 return; | 3396 return; |
3396 } | 3397 } |
3397 | 3398 |
3398 List<HInstruction> inputs = <HInstruction>[]; | 3399 List<HInstruction> inputs = <HInstruction>[]; |
3399 if (constructor.isGenerativeConstructor && | 3400 if (constructor.isGenerativeConstructor && |
3400 backend.nativeData | 3401 backend.nativeData |
3401 .isNativeOrExtendsNative(constructor.enclosingClass) && | 3402 .isNativeOrExtendsNative(constructor.enclosingClass) && |
3402 !backend.nativeData.isJsInteropMember(constructor)) { | 3403 !backend.nativeData.isJsInteropMember(constructor)) { |
3403 // Native class generative constructors take a pre-constructed object. | 3404 // Native class generative constructors take a pre-constructed object. |
(...skipping 3358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6762 this.oldReturnLocal, | 6763 this.oldReturnLocal, |
6763 this.oldReturnType, | 6764 this.oldReturnType, |
6764 this.oldResolvedAst, | 6765 this.oldResolvedAst, |
6765 this.oldStack, | 6766 this.oldStack, |
6766 this.oldLocalsHandler, | 6767 this.oldLocalsHandler, |
6767 this.inTryStatement, | 6768 this.inTryStatement, |
6768 this.allFunctionsCalledOnce, | 6769 this.allFunctionsCalledOnce, |
6769 this.oldElementInferenceResults) | 6770 this.oldElementInferenceResults) |
6770 : super(function); | 6771 : super(function); |
6771 } | 6772 } |
OLD | NEW |