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

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

Issue 1873573004: Serialize TreeElements (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 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
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);
}

Powered by Google App Engine
This is Rietveld 408576698