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

Unified Diff: sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart

Issue 12049036: Cleanup the namer, and add a test with fields that used to clash with internal names used by the co… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 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
Index: sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (revision 17449)
+++ sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (working copy)
@@ -479,7 +479,7 @@
// the actual receiver.
int extraArgumentCount = isInterceptorClass ? 1 : 0;
// Use '$receiver' to avoid clashes with other parameter names. Using
- // '$receiver' works because [JsNames.getValid] used for getting parameter
+ // '$receiver' works because [:namer.safeName:] used for getting parameter
// names never returns a name beginning with a single '$'.
String receiverArgumentName = r'$receiver';
@@ -504,7 +504,7 @@
compiler.enqueuer.resolution.getCachedElements(member);
parameters.orderedForEachParameter((Element element) {
- String jsName = JsNames.getValid(element.name.slowToString());
+ String jsName = backend.namer.safeName(element.name.slowToString());
assert(jsName != receiverArgumentName);
int optionalParameterStart = positionalArgumentCount + extraArgumentCount;
if (count < optionalParameterStart) {

Powered by Google App Engine
This is Rietveld 408576698