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

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: Check only the last test to avoid timeout. 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 72d702bd275ba0c5d352f7e315edd7be53fe5078..1289b77f152324c35f64e1bb75fc90a2fba8f498 100644
--- a/pkg/compiler/lib/src/serialization/task.dart
+++ b/pkg/compiler/lib/src/serialization/task.dart
@@ -4,6 +4,7 @@
library dart2js.serialization.task;
+import 'dart:async' show Future;
import '../common/resolution.dart' show ResolutionImpact, ResolutionWorkItem;
import '../common/tasks.dart' show CompilerTask;
import '../common/work.dart' show ItemCompilationContext;
@@ -17,7 +18,7 @@ import '../universe/world_impact.dart' show WorldImpact;
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.
@@ -35,8 +36,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);
}
@@ -81,8 +82,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);
}
« no previous file with comments | « pkg/compiler/lib/src/serialization/serialization_util.dart ('k') | tests/compiler/dart2js/serialization_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698