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

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

Issue 23567019: Change how we generate bound closures to handler boud closures due to super getters: we need to pas… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 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 | sdk/lib/_internal/compiler/implementation/ssa/codegen.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (revision 27518)
+++ sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (working copy)
@@ -2568,6 +2568,7 @@
List<String> parameters = <String>[];
List<jsAst.Expression> arguments = <jsAst.Expression>[];
+ arguments.add(js('this')[fieldNames[0]]);
if (inInterceptor) {
arguments.add(js('this')[fieldNames[2]]);
}
@@ -2580,7 +2581,7 @@
jsAst.Expression fun = js.fun(
parameters,
js.return_(
- js('this')[fieldNames[0]][js('this')[fieldNames[1]]](arguments)));
+ js('this')[fieldNames[1]]['call'](arguments)));
boundClosureBuilder.addProperty(invocationName, fun);
addParameterStubs(callElement, boundClosureBuilder.addProperty);
@@ -2621,7 +2622,10 @@
List<String> parameters = <String>[];
List<jsAst.Expression> arguments = <jsAst.Expression>[];
arguments.add(js('this'));
- arguments.add(js.string(targetName));
+ jsAst.PropertyAccess method =
+ backend.namer.elementAccess(classElement)['prototype'][targetName];
+
+ arguments.add(method);
if (inInterceptor) {
String receiverArg = fieldNames[2];
parameters.add(receiverArg);
@@ -2630,6 +2634,7 @@
// Put null in the intercepted receiver field.
arguments.add(new jsAst.LiteralNull());
}
+ arguments.add(js.string(targetName));
jsAst.Expression getterFunction = js.fun(
parameters, js.return_(js(closureClass).newWith(arguments)));
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/ssa/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698