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 b7119ecad65352ba4f726d2cf4ed2a75e5c67506..f61e5796035ab9f20fbaf452896869c8924aba39 100644 |
--- a/pkg/compiler/lib/src/serialization/task.dart |
+++ b/pkg/compiler/lib/src/serialization/task.dart |
@@ -4,6 +4,8 @@ |
library dart2js.serialization.task; |
+import 'dart:async' show |
+ Future; |
import '../common/resolution.dart' show |
ResolutionImpact, |
ResolutionWorkItem; |
@@ -24,7 +26,7 @@ import '../universe/world_impact.dart' show |
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); |
+ Future<LibraryElement> readLibrary(Uri uri); |
} |
/// Task that supports deserialization of elements. |
@@ -42,8 +44,8 @@ class SerializationTask extends CompilerTask implements LibraryDeserializer { |
/// Returns the [LibraryElement] for [resolvedUri] if available from |
/// serialization. |
- LibraryElement readLibrary(Uri resolvedUri) { |
- if (deserializer == null) return null; |
+ Future<LibraryElement> readLibrary(Uri resolvedUri) { |
+ if (deserializer == null) return new Future<LibraryElement>.value(); |
return deserializer.readLibrary(resolvedUri); |
} |
@@ -88,8 +90,9 @@ class DeserializedResolutionWorkItem implements ResolutionWorkItem { |
/// The interface for a system that supports deserialization of libraries and |
/// elements. |
abstract class DeserializerSystem { |
- LibraryElement readLibrary(Uri resolvedUri); |
+ Future<LibraryElement> readLibrary(Uri resolvedUri); |
bool isDeserialized(Element element); |
+ ResolvedAst getResolvedAst(Element element); |
ResolutionImpact getResolutionImpact(Element element); |
WorldImpact computeWorldImpact(Element element); |
} |