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

Unified Diff: pkg/compiler/lib/src/kernel/kernel_strategy.dart

Issue 2858513002: Add BackendStrategy (Closed)
Patch Set: Updated cf. comments Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/kernel/kernel_strategy.dart
diff --git a/pkg/compiler/lib/src/kernel/kernel_strategy.dart b/pkg/compiler/lib/src/kernel/kernel_strategy.dart
index 3f7474bd778fc0f0d74fe53cdb64318ce69a7bdd..d3378d6ae59387c36ed5e4418d77c807ec3f1308 100644
--- a/pkg/compiler/lib/src/kernel/kernel_strategy.dart
+++ b/pkg/compiler/lib/src/kernel/kernel_strategy.dart
@@ -5,6 +5,7 @@
library dart2js.kernel.frontend_strategy;
import '../closure.dart';
+import '../backend_strategy.dart';
import '../common.dart';
import '../common_elements.dart';
import '../common/backend_api.dart';
@@ -24,6 +25,7 @@ import '../js_backend/mirrors_analysis.dart';
import '../js_backend/mirrors_data.dart';
import '../js_backend/native_data.dart';
import '../js_backend/no_such_method_registry.dart';
+import '../js_emitter/sorter.dart';
import '../library_loader.dart';
import '../native/resolver.dart';
import '../serialization/task.dart';
@@ -204,3 +206,24 @@ class MirrorsResolutionAnalysisImpl implements MirrorsResolutionAnalysis {
@override
void onResolutionComplete() {}
}
+
+/// Backend strategy that uses the kernel elements as the backend model.
+// TODO(johnniwinther): Replace this with a strategy based on the J-element
+// model.
+class KernelBackendStrategy implements BackendStrategy {
+ @override
+ ClosedWorldRefiner createClosedWorldRefiner(KernelClosedWorld closedWorld) {
+ return closedWorld;
+ }
+
+ @override
+ Sorter get sorter =>
+ throw new UnimplementedError('KernelBackendStrategy.sorter');
+
+ @override
+ void convertClosures(ClosedWorldRefiner closedWorldRefiner) {
+ // TODO(johnniwinther,efortuna): Compute closure classes for kernel based
+ // elements.
+ throw new UnimplementedError('KernelBackendStrategy.createClosureClasses');
+ }
+}
« 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