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

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

Issue 1901683002: Support deserialization of ResolutionImpact for members of unnamed mixin applications (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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/resolution/registry.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/resolution/registry.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698