Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 'package:kernel/ast.dart' as ir; | 5 import 'package:kernel/ast.dart' as ir; |
| 6 | 6 |
| 7 import '../closure.dart'; | 7 import '../closure.dart'; |
| 8 import '../common.dart'; | 8 import '../common.dart'; |
| 9 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; | 9 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; |
| 10 import '../common/names.dart'; | 10 import '../common/names.dart'; |
| (...skipping 2011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2022 if (closure is ir.StaticGet) { | 2022 if (closure is ir.StaticGet) { |
| 2023 ir.Member staticTarget = closure.target; | 2023 ir.Member staticTarget = closure.target; |
| 2024 if (staticTarget is ir.Procedure) { | 2024 if (staticTarget is ir.Procedure) { |
| 2025 if (staticTarget.kind == ir.ProcedureKind.Method) { | 2025 if (staticTarget.kind == ir.ProcedureKind.Method) { |
| 2026 ir.FunctionNode function = staticTarget.function; | 2026 ir.FunctionNode function = staticTarget.function; |
| 2027 if (function != null && | 2027 if (function != null && |
| 2028 function.requiredParameterCount == | 2028 function.requiredParameterCount == |
| 2029 function.positionalParameters.length && | 2029 function.positionalParameters.length && |
| 2030 function.namedParameters.isEmpty) { | 2030 function.namedParameters.isEmpty) { |
| 2031 registry?.registerStaticUse( | 2031 registry?.registerStaticUse( |
| 2032 new StaticUse.foreignUse(astAdapter.getMember(staticTarget))); | 2032 new StaticUse.foreignUse(astAdapter.getMember(staticTarget))); |
|
Siggi Cherem (dart-lang)
2017/01/19 16:54:25
shouldn't this change too? maybe pull it out into
Johnni Winther
2017/01/20 08:37:02
Done. Done.
| |
| 2033 push(new HForeignCode( | 2033 push(new HForeignCode( |
| 2034 js.js.expressionTemplateYielding(backend.emitter | 2034 js.js.expressionTemplateYielding(backend.emitter |
| 2035 .staticFunctionAccess(astAdapter.getMember(staticTarget))), | 2035 .staticFunctionAccess(astAdapter.getMethod(staticTarget))), |
| 2036 commonMasks.dynamicType, | 2036 commonMasks.dynamicType, |
| 2037 <HInstruction>[], | 2037 <HInstruction>[], |
| 2038 nativeBehavior: native.NativeBehavior.PURE)); | 2038 nativeBehavior: native.NativeBehavior.PURE)); |
| 2039 return; | 2039 return; |
| 2040 } | 2040 } |
| 2041 problem = 'does not handle a closure with optional parameters'; | 2041 problem = 'does not handle a closure with optional parameters'; |
| 2042 } | 2042 } |
| 2043 } | 2043 } |
| 2044 } | 2044 } |
| 2045 | 2045 |
| (...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2879 enterBlock.setBlockFlow( | 2879 enterBlock.setBlockFlow( |
| 2880 new HTryBlockInformation( | 2880 new HTryBlockInformation( |
| 2881 kernelBuilder.wrapStatementGraph(bodyGraph), | 2881 kernelBuilder.wrapStatementGraph(bodyGraph), |
| 2882 exception, | 2882 exception, |
| 2883 kernelBuilder.wrapStatementGraph(catchGraph), | 2883 kernelBuilder.wrapStatementGraph(catchGraph), |
| 2884 kernelBuilder.wrapStatementGraph(finallyGraph)), | 2884 kernelBuilder.wrapStatementGraph(finallyGraph)), |
| 2885 exitBlock); | 2885 exitBlock); |
| 2886 kernelBuilder.inTryStatement = previouslyInTryStatement; | 2886 kernelBuilder.inTryStatement = previouslyInTryStatement; |
| 2887 } | 2887 } |
| 2888 } | 2888 } |
| OLD | NEW |