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

Unified Diff: pkg/compiler/lib/src/js_emitter/parameter_stub_generator.dart

Issue 891673003: dart2js: Refactoring, documentation, and a few bugfixes in Namer class. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase Created 5 years, 10 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: pkg/compiler/lib/src/js_emitter/parameter_stub_generator.dart
diff --git a/pkg/compiler/lib/src/js_emitter/parameter_stub_generator.dart b/pkg/compiler/lib/src/js_emitter/parameter_stub_generator.dart
index 3649219d22ca60e37598a8075e0475e6f7246c4c..9009784c6b37456d858df37aa96f5850f01aad7e 100644
--- a/pkg/compiler/lib/src/js_emitter/parameter_stub_generator.dart
+++ b/pkg/compiler/lib/src/js_emitter/parameter_stub_generator.dart
@@ -59,7 +59,7 @@ class ParameterStubGenerator {
// If the method is intercepted, we need to also pass the actual receiver.
int extraArgumentCount = isInterceptedMethod ? 1 : 0;
// Use '$receiver' to avoid clashes with other parameter names. Using
- // '$receiver' works because [:namer.safeName:] used for getting parameter
+ // '$receiver' works because namer.safeVariableName used for getting parameter
// names never returns a name beginning with a single '$'.
String receiverArgumentName = r'$receiver';
@@ -84,7 +84,7 @@ class ParameterStubGenerator {
int parameterIndex = 0;
parameters.orderedForEachParameter((ParameterElement element) {
- String jsName = backend.namer.safeName(element.name);
+ String jsName = backend.namer.safeVariableName(element.name);
assert(jsName != receiverArgumentName);
if (count < optionalParameterStart) {
parametersBuffer[count] = new jsAst.Parameter(jsName);
@@ -126,7 +126,7 @@ class ParameterStubGenerator {
} else if (member.isInstanceMember) {
if (needsSuperGetter(member)) {
ClassElement superClass = member.enclosingClass;
- String methodName = namer.getNameOfInstanceMember(member);
+ String methodName = namer.instanceMethodName(member);
// When redirecting, we must ensure that we don't end up in a subclass.
// We thus can't just invoke `this.foo$1.call(filledInArguments)`.
// Instead we need to call the statically resolved target.
@@ -140,7 +140,7 @@ class ParameterStubGenerator {
} else {
body = js.statement(
'return this.#(#);',
- [namer.getNameOfInstanceMember(member), argumentsBuffer]);
+ [namer.instanceMethodName(member), argumentsBuffer]);
}
} else {
body = js.statement('return #(#)',
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/old_emitter/nsm_emitter.dart ('k') | pkg/compiler/lib/src/js_emitter/program_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698