| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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.kernel.backend_strategy; | 5 library dart2js.kernel.backend_strategy; |
| 6 | 6 |
| 7 import 'package:kernel/ast.dart' as ir; | 7 import 'package:kernel/ast.dart' as ir; |
| 8 | 8 |
| 9 import '../backend_strategy.dart'; | 9 import '../backend_strategy.dart'; |
| 10 import '../closure.dart'; | 10 import '../closure.dart'; |
| 11 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; | 11 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; |
| 12 import '../common/tasks.dart'; | 12 import '../common/tasks.dart'; |
| 13 import '../compiler.dart'; | 13 import '../compiler.dart'; |
| 14 import '../elements/entities.dart'; | 14 import '../elements/entities.dart'; |
| 15 import '../enqueue.dart'; | 15 import '../enqueue.dart'; |
| 16 import '../io/source_information.dart'; | 16 import '../io/source_information.dart'; |
| 17 import '../js/js_source_mapping.dart'; |
| 17 import '../js_backend/backend.dart'; | 18 import '../js_backend/backend.dart'; |
| 18 import '../js_backend/native_data.dart'; | 19 import '../js_backend/native_data.dart'; |
| 19 import '../js_emitter/sorter.dart'; | 20 import '../js_emitter/sorter.dart'; |
| 20 import '../kernel/element_map.dart'; | 21 import '../kernel/element_map.dart'; |
| 21 import '../kernel/element_map_impl.dart'; | 22 import '../kernel/element_map_impl.dart'; |
| 22 import '../native/behavior.dart'; | 23 import '../native/behavior.dart'; |
| 23 import '../ssa/builder_kernel.dart'; | 24 import '../ssa/builder_kernel.dart'; |
| 24 import '../ssa/nodes.dart'; | 25 import '../ssa/nodes.dart'; |
| 25 import '../ssa/ssa.dart'; | 26 import '../ssa/ssa.dart'; |
| 26 import '../ssa/types.dart'; | 27 import '../ssa/types.dart'; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 } | 70 } |
| 70 | 71 |
| 71 @override | 72 @override |
| 72 SsaBuilderTask createSsaBuilderTask(JavaScriptBackend backend, | 73 SsaBuilderTask createSsaBuilderTask(JavaScriptBackend backend, |
| 73 SourceInformationStrategy sourceInformationStrategy) { | 74 SourceInformationStrategy sourceInformationStrategy) { |
| 74 return new KernelSsaBuilderTask(backend.compiler); | 75 return new KernelSsaBuilderTask(backend.compiler); |
| 75 } | 76 } |
| 76 | 77 |
| 77 @override | 78 @override |
| 78 SourceInformationStrategy get sourceInformationStrategy => | 79 SourceInformationStrategy get sourceInformationStrategy => |
| 79 const SourceInformationStrategy(); | 80 const JavaScriptSourceInformationStrategy(); |
| 80 } | 81 } |
| 81 | 82 |
| 82 class KernelCodegenWorkItemBuilder implements WorkItemBuilder { | 83 class KernelCodegenWorkItemBuilder implements WorkItemBuilder { |
| 83 final JavaScriptBackend _backend; | 84 final JavaScriptBackend _backend; |
| 84 final ClosedWorld _closedWorld; | 85 final ClosedWorld _closedWorld; |
| 85 | 86 |
| 86 KernelCodegenWorkItemBuilder(this._backend, this._closedWorld); | 87 KernelCodegenWorkItemBuilder(this._backend, this._closedWorld); |
| 87 | 88 |
| 88 @override | 89 @override |
| 89 CodegenWorkItem createWorkItem(MemberEntity entity) { | 90 CodegenWorkItem createWorkItem(MemberEntity entity) { |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 @override | 220 @override |
| 220 ClosureClassMap getLocalFunctionMap(Local localFunction) { | 221 ClosureClassMap getLocalFunctionMap(Local localFunction) { |
| 221 return new ClosureClassMap(null, null, null, null); | 222 return new ClosureClassMap(null, null, null, null); |
| 222 } | 223 } |
| 223 | 224 |
| 224 @override | 225 @override |
| 225 ClosureClassMap getMemberMap(MemberEntity member) { | 226 ClosureClassMap getMemberMap(MemberEntity member) { |
| 226 return new ClosureClassMap(null, null, null, null); | 227 return new ClosureClassMap(null, null, null, null); |
| 227 } | 228 } |
| 228 } | 229 } |
| OLD | NEW |