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

Unified Diff: pkg/compiler/lib/src/compiler.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/compiler.dart
diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart
index fc3aed9568803886a58d210bef2039a4ab8caa5b..be888f778cead055357c9d0af3b38534acd6fb2d 100644
--- a/pkg/compiler/lib/src/compiler.dart
+++ b/pkg/compiler/lib/src/compiler.dart
@@ -1850,6 +1850,9 @@ class _CompilerResolution implements Resolution {
bool hasResolvedAst(Element element) {
assert(invariant(element, element.isDeclaration,
message: "Element $element must be the declaration."));
+ if (compiler.serialization.isDeserialized(element)) {
Siggi Cherem (dart-lang) 2016/04/19 20:58:02 Could this be a possible cause of the regression?
Johnni Winther 2016/04/20 10:40:21 For swarm SerializationTask.isDeserialized is call
Siggi Cherem (dart-lang) 2016/04/20 18:58:40 Yeah - I'm not sure, but this and the other change
+ return compiler.serialization.hasResolvedAst(element);
+ }
return element is AstElement &&
hasBeenResolved(element) &&
element.hasResolvedAst;
@@ -1860,6 +1863,9 @@ class _CompilerResolution implements Resolution {
assert(invariant(element, element.isDeclaration,
message: "Element $element must be the declaration."));
if (hasResolvedAst(element)) {
+ if (compiler.serialization.isDeserialized(element)) {
+ return compiler.serialization.getResolvedAst(element);
+ }
AstElement astElement = element;
return astElement.resolvedAst;
}

Powered by Google App Engine
This is Rietveld 408576698