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.js_backend.element_strategy; | 5 library dart2js.js_backend.element_strategy; |
6 | 6 |
7 import '../backend_strategy.dart'; | 7 import '../backend_strategy.dart'; |
8 import '../common.dart'; | 8 import '../common.dart'; |
9 import '../common/codegen.dart'; | 9 import '../common/codegen.dart'; |
10 import '../common/work.dart'; | 10 import '../common/work.dart'; |
(...skipping 24 matching lines...) Expand all Loading... |
35 SourceInformationStrategy _sourceInformationStrategy; | 35 SourceInformationStrategy _sourceInformationStrategy; |
36 | 36 |
37 ElementBackendStrategy(this._compiler); | 37 ElementBackendStrategy(this._compiler); |
38 | 38 |
39 ClosedWorldRefiner createClosedWorldRefiner(ClosedWorldImpl closedWorld) => | 39 ClosedWorldRefiner createClosedWorldRefiner(ClosedWorldImpl closedWorld) => |
40 closedWorld; | 40 closedWorld; |
41 | 41 |
42 Sorter get sorter => const ElementSorter(); | 42 Sorter get sorter => const ElementSorter(); |
43 | 43 |
44 void convertClosures(ClosedWorldRefiner closedWorldRefiner) { | 44 void convertClosures(ClosedWorldRefiner closedWorldRefiner) { |
45 _compiler.closureToClassMapper.createClosureClasses(closedWorldRefiner); | 45 _compiler.closureDataLookup.createClosureClasses(closedWorldRefiner); |
46 } | 46 } |
47 | 47 |
48 @override | 48 @override |
49 CodegenWorldBuilder createCodegenWorldBuilder( | 49 CodegenWorldBuilder createCodegenWorldBuilder( |
50 NativeBasicData nativeBasicData, | 50 NativeBasicData nativeBasicData, |
51 ClosedWorld closedWorld, | 51 ClosedWorld closedWorld, |
52 SelectorConstraintsStrategy selectorConstraintsStrategy) { | 52 SelectorConstraintsStrategy selectorConstraintsStrategy) { |
53 return new ElementCodegenWorldBuilderImpl(closedWorld.elementEnvironment, | 53 return new ElementCodegenWorldBuilderImpl(closedWorld.elementEnvironment, |
54 nativeBasicData, closedWorld, selectorConstraintsStrategy); | 54 nativeBasicData, closedWorld, selectorConstraintsStrategy); |
55 } | 55 } |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 | 153 |
154 MemberElement get element => resolvedAst.element; | 154 MemberElement get element => resolvedAst.element; |
155 | 155 |
156 WorldImpact run() { | 156 WorldImpact run() { |
157 registry = new CodegenRegistry(element); | 157 registry = new CodegenRegistry(element); |
158 return _backend.codegen(this, _closedWorld); | 158 return _backend.codegen(this, _closedWorld); |
159 } | 159 } |
160 | 160 |
161 String toString() => 'CodegenWorkItem(${resolvedAst.element})'; | 161 String toString() => 'CodegenWorkItem(${resolvedAst.element})'; |
162 } | 162 } |
OLD | NEW |