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 3974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3985 ..sourceInformation = sourceInformation); | 3985 ..sourceInformation = sourceInformation); |
3986 } | 3986 } |
3987 } | 3987 } |
3988 | 3988 |
3989 HForeignCode invokeJsInteropFunction(MethodElement element, | 3989 HForeignCode invokeJsInteropFunction(MethodElement element, |
3990 List<HInstruction> arguments, SourceInformation sourceInformation) { | 3990 List<HInstruction> arguments, SourceInformation sourceInformation) { |
3991 assert(nativeData.isJsInteropMember(element)); | 3991 assert(nativeData.isJsInteropMember(element)); |
3992 nativeEmitter.nativeMethods.add(element); | 3992 nativeEmitter.nativeMethods.add(element); |
3993 | 3993 |
3994 if (element.isFactoryConstructor && | 3994 if (element.isFactoryConstructor && |
3995 jsInteropAnalysis.hasAnonymousAnnotation(element.contextClass)) { | 3995 nativeData.isAnonymousJsInteropClass(element.contextClass)) { |
3996 // Factory constructor that is syntactic sugar for creating a JavaScript | 3996 // Factory constructor that is syntactic sugar for creating a JavaScript |
3997 // object literal. | 3997 // object literal. |
3998 ConstructorElement constructor = element; | 3998 ConstructorElement constructor = element; |
3999 FunctionSignature params = constructor.functionSignature; | 3999 FunctionSignature params = constructor.functionSignature; |
4000 int i = 0; | 4000 int i = 0; |
4001 int positions = 0; | 4001 int positions = 0; |
4002 var filteredArguments = <HInstruction>[]; | 4002 var filteredArguments = <HInstruction>[]; |
4003 var parameterNameMap = new Map<String, js.Expression>(); | 4003 var parameterNameMap = new Map<String, js.Expression>(); |
4004 params.orderedForEachParameter((ParameterElement parameter) { | 4004 params.orderedForEachParameter((ParameterElement parameter) { |
4005 // TODO(jacobr): consider throwing if parameter names do not match | 4005 // TODO(jacobr): consider throwing if parameter names do not match |
(...skipping 2735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6741 this.oldReturnLocal, | 6741 this.oldReturnLocal, |
6742 this.oldReturnType, | 6742 this.oldReturnType, |
6743 this.oldResolvedAst, | 6743 this.oldResolvedAst, |
6744 this.oldStack, | 6744 this.oldStack, |
6745 this.oldLocalsHandler, | 6745 this.oldLocalsHandler, |
6746 this.inTryStatement, | 6746 this.inTryStatement, |
6747 this.allFunctionsCalledOnce, | 6747 this.allFunctionsCalledOnce, |
6748 this.oldElementInferenceResults) | 6748 this.oldElementInferenceResults) |
6749 : super(function); | 6749 : super(function); |
6750 } | 6750 } |
OLD | NEW |