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

Unified Diff: frog/library.dart

Issue 9656003: Fix for issue with incorrectly renamed private names. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: x Created 8 years, 9 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 | frog/member_set.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/library.dart
diff --git a/frog/library.dart b/frog/library.dart
index e5b3ed09da5369a36d70ef9082de6a78f8230f06..6b08f9fa54f3e3599d75ff40cf4aa51695a8e0e5 100644
--- a/frog/library.dart
+++ b/frog/library.dart
@@ -102,37 +102,12 @@ class Library extends Element {
} else {
members.add(member);
}
- _makePrivateMembersUnique(member, members);
}
} else {
world._addMember(member);
}
}
- void _makePrivateMembersUnique(Member member, MemberSet members) {
- // If the JS name in the member set is already unique, we simply
- // copy the name to the new member.
- if (members.jsnameUnique) {
- member._jsname = members.jsname;
- return;
- }
-
- // Run through the other libraries in the world and check if any
- // of them has a clashing private member. If so, we rewrite this
- // one and all other members in the set.
- String name = members.name;
- for (var lib in world.libraries.getValues()) {
- if (lib !== this && lib._privateMembers.containsKey(name)) {
- String uniqueName = '_${this.jsname}${members.jsname}';
- members.jsname = uniqueName;
- members.jsnameUnique = true;
- members.members.forEach((each) { each._jsname = uniqueName; });
- assert(member.jsname == members.jsname);
- return;
- }
- }
- }
-
// TODO(jimhug): Cache and share the types as interfaces!
Type getOrAddFunctionType(Element enclosingElement, String name,
FunctionDefinition func, MethodData data) {
« no previous file with comments | « no previous file | frog/member_set.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698