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..f1fb2b0fe719356f35f358b4b6b49c47f5a956cb 100644 |
--- a/pkg/compiler/lib/src/compiler.dart |
+++ b/pkg/compiler/lib/src/compiler.dart |
@@ -1872,6 +1872,9 @@ class _CompilerResolution implements Resolution { |
bool hasResolutionImpact(Element element) { |
assert(invariant(element, element.isDeclaration, |
message: "Element $element must be the declaration.")); |
+ if (compiler.serialization.isDeserialized(element)) { |
+ return compiler.serialization.hasResolutionImpact(element); |
+ } |
return _resolutionImpactCache.containsKey(element); |
} |
@@ -1879,7 +1882,12 @@ class _CompilerResolution implements Resolution { |
ResolutionImpact getResolutionImpact(Element element) { |
assert(invariant(element, element.isDeclaration, |
message: "Element $element must be the declaration.")); |
- ResolutionImpact resolutionImpact = _resolutionImpactCache[element]; |
+ ResolutionImpact resolutionImpact; |
+ if (compiler.serialization.isDeserialized(element)) { |
+ resolutionImpact = compiler.serialization.getResolutionImpact(element); |
+ } else { |
+ resolutionImpact = _resolutionImpactCache[element]; |
+ } |
assert(invariant(element, resolutionImpact != null, |
message: "ResolutionImpact not available for $element.")); |
return resolutionImpact; |
@@ -1904,6 +1912,7 @@ class _CompilerResolution implements Resolution { |
Node tree = compiler.parser.parse(element); |
assert(invariant(element, !element.isSynthesized || tree == null)); |
ResolutionImpact resolutionImpact = compiler.resolver.resolve(element); |
+ |
if (compiler.serialization.supportSerialization || |
retainCachesForTesting) { |
// [ResolutionImpact] is currently only used by serialization. The |