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

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

Issue 1457733002: dart2js: Recanonicalize selectors in static fields between runs. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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/names.dart ('k') | no next file » | 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 cd983fe414f486fc6b376cbc1186bc2e6eae2b71..392b2026b6fc8cbf6e8d66de3db1a9ca40e7f80d 100644
--- a/pkg/compiler/lib/src/compiler.dart
+++ b/pkg/compiler/lib/src/compiler.dart
@@ -84,6 +84,8 @@ import 'library_loader.dart' show
LoadedLibraries;
import 'mirrors_used.dart' show
MirrorUsageAnalyzerTask;
+import 'common/names.dart' show
+ Selectors;
import 'null_compiler_output.dart' show
NullCompilerOutput,
NullSink;
@@ -842,6 +844,13 @@ abstract class Compiler {
StringToken.canonicalizedSubstrings.clear();
Selector.canonicalizedValues.clear();
+ // The selector objects held in static fields must remain canonical.
+ for (Selector selector in Selectors.ALL) {
+ Selector.canonicalizedValues
+ .putIfAbsent(selector.hashCode, () => <Selector>[])
+ .add(selector);
+ }
+
assert(uri != null || analyzeOnly || hasIncrementalSupport);
return new Future.sync(() {
if (librariesToAnalyzeWhenRun != null) {
@@ -2065,4 +2074,4 @@ class GlobalDependencyRegistry extends EagerRegistry {
Iterable<Element> get otherDependencies {
return _otherDependencies != null ? _otherDependencies : const <Element>[];
}
-}
+}
« no previous file with comments | « pkg/compiler/lib/src/common/names.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698