Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(610)

Side by Side Diff: pkg/compiler/lib/src/kernel/kernel_strategy.dart

Issue 2858513002: Add BackendStrategy (Closed)
Patch Set: Updated cf. comments Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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.frontend_strategy; 5 library dart2js.kernel.frontend_strategy;
6 6
7 import '../closure.dart'; 7 import '../closure.dart';
8 import '../backend_strategy.dart';
8 import '../common.dart'; 9 import '../common.dart';
9 import '../common_elements.dart'; 10 import '../common_elements.dart';
10 import '../common/backend_api.dart'; 11 import '../common/backend_api.dart';
11 import '../common/resolution.dart'; 12 import '../common/resolution.dart';
12 import '../common/tasks.dart'; 13 import '../common/tasks.dart';
13 import '../common/work.dart'; 14 import '../common/work.dart';
14 import '../elements/elements.dart'; 15 import '../elements/elements.dart';
15 import '../elements/entities.dart'; 16 import '../elements/entities.dart';
16 import '../elements/types.dart'; 17 import '../elements/types.dart';
17 import '../environment.dart' as env; 18 import '../environment.dart' as env;
18 import '../enqueue.dart'; 19 import '../enqueue.dart';
19 import '../frontend_strategy.dart'; 20 import '../frontend_strategy.dart';
20 import '../js_backend/backend.dart'; 21 import '../js_backend/backend.dart';
21 import '../js_backend/backend_usage.dart'; 22 import '../js_backend/backend_usage.dart';
22 import '../js_backend/custom_elements_analysis.dart'; 23 import '../js_backend/custom_elements_analysis.dart';
23 import '../js_backend/mirrors_analysis.dart'; 24 import '../js_backend/mirrors_analysis.dart';
24 import '../js_backend/mirrors_data.dart'; 25 import '../js_backend/mirrors_data.dart';
25 import '../js_backend/native_data.dart'; 26 import '../js_backend/native_data.dart';
26 import '../js_backend/no_such_method_registry.dart'; 27 import '../js_backend/no_such_method_registry.dart';
28 import '../js_emitter/sorter.dart';
27 import '../library_loader.dart'; 29 import '../library_loader.dart';
28 import '../native/resolver.dart'; 30 import '../native/resolver.dart';
29 import '../serialization/task.dart'; 31 import '../serialization/task.dart';
30 import '../patch_parser.dart'; 32 import '../patch_parser.dart';
31 import '../resolved_uri_translator.dart'; 33 import '../resolved_uri_translator.dart';
32 import '../universe/world_builder.dart'; 34 import '../universe/world_builder.dart';
33 import '../universe/world_impact.dart'; 35 import '../universe/world_impact.dart';
34 import '../world.dart'; 36 import '../world.dart';
35 import 'element_map.dart'; 37 import 'element_map.dart';
36 38
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 void onQueueEmpty(Enqueuer enqueuer, Iterable<ClassEntity> recentClasses) {} 199 void onQueueEmpty(Enqueuer enqueuer, Iterable<ClassEntity> recentClasses) {}
198 200
199 @override 201 @override
200 MirrorsCodegenAnalysis close() { 202 MirrorsCodegenAnalysis close() {
201 throw new UnimplementedError('MirrorsResolutionAnalysisImpl.close'); 203 throw new UnimplementedError('MirrorsResolutionAnalysisImpl.close');
202 } 204 }
203 205
204 @override 206 @override
205 void onResolutionComplete() {} 207 void onResolutionComplete() {}
206 } 208 }
209
210 /// Backend strategy that uses the kernel elements as the backend model.
211 // TODO(johnniwinther): Replace this with a strategy based on the J-element
212 // model.
213 class KernelBackendStrategy implements BackendStrategy {
214 @override
215 ClosedWorldRefiner createClosedWorldRefiner(KernelClosedWorld closedWorld) {
216 return closedWorld;
217 }
218
219 @override
220 Sorter get sorter =>
221 throw new UnimplementedError('KernelBackendStrategy.sorter');
222
223 @override
224 void convertClosures(ClosedWorldRefiner closedWorldRefiner) {
225 // TODO(johnniwinther,efortuna): Compute closure classes for kernel based
226 // elements.
227 throw new UnimplementedError('KernelBackendStrategy.createClosureClasses');
228 }
229 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698