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

Unified Diff: pkg/compiler/lib/src/serialization/task.dart

Issue 1819053002: Split loader from the rest of the compiler. This adds several abstractions to (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: add environment.dart 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
Index: pkg/compiler/lib/src/serialization/task.dart
diff --git a/pkg/compiler/lib/src/serialization/task.dart b/pkg/compiler/lib/src/serialization/task.dart
index fc1dfaebfeb1a861fdae94f000c790c6ba0e553b..95059faaa1e229f477767a04320a4c5b7c472d41 100644
--- a/pkg/compiler/lib/src/serialization/task.dart
+++ b/pkg/compiler/lib/src/serialization/task.dart
@@ -18,8 +18,16 @@ import '../enqueue.dart' show
import '../universe/world_impact.dart' show
WorldImpact;
+/// A deserializer that can load a library element by reading it's information
+/// from a serialized form.
+abstract class LibraryDeserializer {
+ /// Loads the [LibraryElement] associated with a library under [uri], or null
+ /// if no serialized information is available for the given library.
+ LibraryElement readLibrary(Uri uri);
+}
+
/// Task that supports deserialization of elements.
-class SerializationTask extends CompilerTask {
+class SerializationTask extends CompilerTask implements LibraryDeserializer {
SerializationTask(Compiler compiler) : super(compiler);
DeserializerSystem deserializer;

Powered by Google App Engine
This is Rietveld 408576698