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

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

Issue 1856953003: Test closed world model after deserialization. (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
« no previous file with comments | « pkg/compiler/lib/src/common/resolution.dart ('k') | pkg/compiler/lib/src/elements/common.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 5665810615b69edba2091eeb2c78519b4852cab7..c807148d52077a417df0f09a7da6412040c33173 100644
--- a/pkg/compiler/lib/src/compiler.dart
+++ b/pkg/compiler/lib/src/compiler.dart
@@ -1960,7 +1960,7 @@ class _CompilerResolution implements Resolution {
final Map<Element, ResolutionImpact> _resolutionImpactCache =
<Element, ResolutionImpact>{};
final Map<Element, WorldImpact> _worldImpactCache = <Element, WorldImpact>{};
- bool retainCaches = false;
+ bool retainCachesForTesting = false;
_CompilerResolution(this.compiler);
@@ -2032,7 +2032,7 @@ class _CompilerResolution implements Resolution {
assert(invariant(element, !element.isSynthesized || tree == null));
ResolutionImpact resolutionImpact =
compiler.resolver.resolve(element);
- if (compiler.serialization.supportSerialization || retainCaches) {
+ if (compiler.serialization.supportSerialization || retainCachesForTesting) {
// [ResolutionImpact] is currently only used by serialization. The
// enqueuer uses the [WorldImpact] which is always cached.
// TODO(johnniwinther): Align these use cases better; maybe only
@@ -2055,7 +2055,7 @@ class _CompilerResolution implements Resolution {
@override
void uncacheWorldImpact(Element element) {
- if (retainCaches) return;
+ if (retainCachesForTesting) return;
if (compiler.serialization.isDeserialized(element)) return;
assert(invariant(element, _worldImpactCache[element] != null,
message: "WorldImpact not computed for $element."));
@@ -2065,7 +2065,7 @@ class _CompilerResolution implements Resolution {
@override
void emptyCache() {
- if (retainCaches) return;
+ if (retainCachesForTesting) return;
for (Element element in _worldImpactCache.keys) {
_worldImpactCache[element] = const WorldImpact();
}
« no previous file with comments | « pkg/compiler/lib/src/common/resolution.dart ('k') | pkg/compiler/lib/src/elements/common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698