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

Unified Diff: lib/compiler/implementation/namer.dart

Issue 10223002: Use JsNames.getValid instead of implementing another (broken) version of it. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/namer.dart
diff --git a/lib/compiler/implementation/namer.dart b/lib/compiler/implementation/namer.dart
index 8680ac740b738f368376602dd1b798281d124059..b01114b6fac44823e4ed481a135d670dd9636bbf 100644
--- a/lib/compiler/implementation/namer.dart
+++ b/lib/compiler/implementation/namer.dart
@@ -64,10 +64,7 @@ class Namer {
String instanceFieldName(LibraryElement lib, SourceString name) {
String proposedName = privateName(lib, name);
- if (jsReserved.contains(proposedName)) {
- return '$proposedName\$';
- }
- return proposedName;
+ return JsNames.getValid(proposedName);
}
String setterName(LibraryElement lib, SourceString name) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698