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

Unified Diff: frog/var_member.dart

Issue 8915021: Code review changes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: comment Created 9 years 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 | « frog/member.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/var_member.dart
diff --git a/frog/var_member.dart b/frog/var_member.dart
index 7307e95e091f487475e6f9ed68f6856742d62089..f9c67343abe94a451546d4227a1863f5a9bf7582 100644
--- a/frog/var_member.dart
+++ b/frog/var_member.dart
@@ -245,13 +245,15 @@ class VarMethodSet extends VarMember {
String _getCallStubName(String name, Arguments args) {
// TODO: This code needs global knowledge to ensure the stub name does not
- // collide with any other name.
+ // collide with any other name. E.g. it is unlikely but possible for the user
+ // to have methods called 'foo' and 'foo$0'.
Jennifer Messerly 2011/12/14 22:07:08 if the user had a method called foo$0, it would ge
final nameBuilder = new StringBuffer('${name}\$${args.bareCount}');
for (int i = args.bareCount; i < args.length; i++) {
var name = args.getName(i);
nameBuilder.add('\$');
if (name.contains('\$')) {
- // Disambiguate "a:b:" from "a$b:"
+ // Disambiguate "a:b:" from "a$b:". Using the length works well because
+ // the names can't start with digits.
nameBuilder.add('${name.length}');
}
nameBuilder.add(name);
« no previous file with comments | « frog/member.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698