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

Unified Diff: lib/kernel.dart

Issue 2106103008: Update dart2js to fix #80. (Closed) Base URL: git@github.com:dart-lang/rasta.git@analyze
Patch Set: Address comment. Created 4 years, 6 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 | submodules.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/kernel.dart
diff --git a/lib/kernel.dart b/lib/kernel.dart
index 0910767a17ad4e1bde5d89bf3ed1c85b118246d5..75d431696838ae6be6721d493369bcfff8a584d6 100644
--- a/lib/kernel.dart
+++ b/lib/kernel.dart
@@ -83,7 +83,8 @@ class Kernel {
final Set<ir.TreeNode> checkedNodes = new Set<ir.TreeNode>();
- final Map<String, int> mixinApplicationNames = <String, int>{};
+ final Map<LibraryElement, Map<String, int>> mixinApplicationNamesByLibrary =
+ <LibraryElement, Map<String, int>>{};
/// FIFO queue of work that needs to be completed before the returned AST
/// nodes are correct.
@@ -185,8 +186,11 @@ class Kernel {
String computeName(ClassElement cls) {
String name = cls.name;
if (!cls.isUnnamedMixinApplication) return name;
- mixinApplicationNames.putIfAbsent(name, () => 0);
- int count = mixinApplicationNames[name]++;
+ Map<String, int> mixinApplicationNames =
+ mixinApplicationNamesByLibrary.putIfAbsent(
+ cls.library.implementation, () => <String, int>{});
+ int count = mixinApplicationNames.putIfAbsent(name, () => 0);
+ mixinApplicationNames[name] = count + 1;
return "$name#$count";
}
« no previous file with comments | « no previous file | submodules.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698