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

Unified Diff: pkg/compiler/lib/src/common/backend_api.dart

Issue 1809533004: Support serialization of WorldImpact (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments + cleanup. Created 4 years, 9 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 | « no previous file | pkg/compiler/lib/src/compiler.dart » ('j') | pkg/compiler/lib/src/js_backend/backend.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/common/backend_api.dart
diff --git a/pkg/compiler/lib/src/common/backend_api.dart b/pkg/compiler/lib/src/common/backend_api.dart
index 306361621ea9934a2652ce67f9f111d2b02b1fac..d7af0cb49b4a058eea3457e55e3586777b28ff56 100644
--- a/pkg/compiler/lib/src/common/backend_api.dart
+++ b/pkg/compiler/lib/src/common/backend_api.dart
@@ -55,6 +55,11 @@ import '../patch_parser.dart' show
checkNativeAnnotation, checkJsInteropAnnotation;
import '../resolution/tree_elements.dart' show
TreeElements;
+import '../serialization/serialization.dart' show
+ DeserializerPlugin,
+ ObjectDecoder,
+ ObjectEncoder,
+ SerializerPlugin;
import '../tree/tree.dart' show
Node,
Send;
@@ -102,6 +107,9 @@ abstract class Backend {
return const SourceInformationStrategy();
}
+ /// Interface for serialization of backend specific data.
+ BackendSerialization get serialization => const BackendSerialization();
+
// TODO(johnniwinther): Move this to the JavaScriptBackend.
String get patchVersion => null;
@@ -430,7 +438,8 @@ abstract class Backend {
/// Creates an impact strategy to use for compilation.
ImpactStrategy createImpactStrategy(
{bool supportDeferredLoad: true,
- bool supportDumpInfo: true}) {
+ bool supportDumpInfo: true,
+ bool supportSerialization: true}) {
return const ImpactStrategy();
}
}
@@ -462,3 +471,11 @@ class ImpactTransformer {
return worldImpact;
}
}
+
+/// Interface for serialization of backend specific data.
+class BackendSerialization {
+ const BackendSerialization();
+
+ SerializerPlugin get serializer => const SerializerPlugin();
+ DeserializerPlugin get deserializer => const DeserializerPlugin();
+}
« no previous file with comments | « no previous file | pkg/compiler/lib/src/compiler.dart » ('j') | pkg/compiler/lib/src/js_backend/backend.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698