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

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

Issue 1892093003: Support deserialized compilation of the empty program. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments 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 1289b77f152324c35f64e1bb75fc90a2fba8f498..926a48ff8966baba16345bc40622530e0c4a2445 100644
--- a/pkg/compiler/lib/src/serialization/task.dart
+++ b/pkg/compiler/lib/src/serialization/task.dart
@@ -54,6 +54,14 @@ class SerializationTask extends CompilerTask implements LibraryDeserializer {
return new DeserializedResolutionWorkItem(
element, context, deserializer.computeWorldImpact(element));
}
+
+ bool hasResolvedAst(Element element) {
+ return deserializer != null ? deserializer.hasResolvedAst(element) : false;
+ }
+
+ ResolvedAst getResolvedAst(Element element) {
+ return deserializer != null ? deserializer.getResolvedAst(element) : null;
+ }
}
/// A [ResolutionWorkItem] for a deserialized element.
@@ -84,6 +92,7 @@ class DeserializedResolutionWorkItem implements ResolutionWorkItem {
abstract class DeserializerSystem {
Future<LibraryElement> readLibrary(Uri resolvedUri);
bool isDeserialized(Element element);
+ bool hasResolvedAst(Element element);
ResolvedAst getResolvedAst(Element element);
ResolutionImpact getResolutionImpact(Element element);
WorldImpact computeWorldImpact(Element element);

Powered by Google App Engine
This is Rietveld 408576698