| Index: lib/compiler/implementation/namer.dart
|
| diff --git a/lib/compiler/implementation/namer.dart b/lib/compiler/implementation/namer.dart
|
| index 526a9d1952f059dfbb36ee1a83d070ea2846f44c..0560a0aac2316d8affbd4907402658416758e40e 100644
|
| --- a/lib/compiler/implementation/namer.dart
|
| +++ b/lib/compiler/implementation/namer.dart
|
| @@ -20,11 +20,13 @@ class Namer {
|
|
|
| Map<Element, String> globals;
|
| Map<String, int> usedGlobals;
|
| + Map<String, Set<LibraryElement>> usedPrivateNames;
|
| Map<String, LibraryElement> shortPrivateNameOwners;
|
|
|
| Namer(this.compiler)
|
| : globals = new Map<Element, String>(),
|
| usedGlobals = new Map<String, int>(),
|
| + usedPrivateNames = new Map<String, Set<LibraryElement>>(),
|
| shortPrivateNameOwners = new Map<String, LibraryElement>();
|
|
|
| final String CURRENT_ISOLATE = @'$';
|
| @@ -78,6 +80,13 @@ class Namer {
|
| if (name.isPrivate()) {
|
| String nameString = name.slowToString();
|
|
|
| + // TODO(kasperl): This is a bit of a hacky way of keeping track
|
| + // of the libraries that use a particular private name.
|
| + Set<LibraryElement> usedBy =
|
| + usedPrivateNames.putIfAbsent(nameString, () =>
|
| + new Set<LibraryElement>());
|
| + usedBy.add(lib);
|
| +
|
| // The first library asking for a short private name wins.
|
| LibraryElement owner =
|
| shortPrivateNameOwners.putIfAbsent(nameString, () => lib);
|
|
|