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

Unified Diff: lib/src/compiler/code_generator.dart

Issue 2291873002: Bind this in ng2 hack code (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 4 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/src/compiler/code_generator.dart
diff --git a/lib/src/compiler/code_generator.dart b/lib/src/compiler/code_generator.dart
index 36c376d2a03b58b80dc813d39a4bdf575ad7fe3c..09475570a8ee2963fde5f40ba0bf68d06d23ebc0 100644
--- a/lib/src/compiler/code_generator.dart
+++ b/lib/src/compiler/code_generator.dart
@@ -3223,8 +3223,8 @@ class CodeGenerator extends GeneralizingAstVisitor
var vars = <JS.MetaLetVariable, JS.Expression>{};
var l = _visit(_bindValue(vars, 'l', target));
jsTarget = new JS.MetaLet(vars, [
- js.call('(#[(#[dart._extensionType]) ? dartx[#] : #])',
- [l, l, memberName, memberName,])
+ js.call('(#[(#[dart._extensionType]) ? dartx[#] : #]).bind(#)',
vsm 2016/08/29 22:01:04 FYI: this was the path triggered by the example.
+ [l, l, memberName, memberName, l])
]);
if (typeArgs != null) jsTarget = new JS.Call(jsTarget, typeArgs);
return new JS.Call(jsTarget, args);
@@ -4565,8 +4565,8 @@ class CodeGenerator extends GeneralizingAstVisitor
var vars = <JS.MetaLetVariable, JS.Expression>{};
var l = _visit(_bindValue(vars, 'l', target));
return new JS.MetaLet(vars, [
- js.call('(#[(#[dart._extensionType]) ? dartx[#] : #])(#)',
- [l, l, memberName, memberName, _visitList(args)])
+ js.call('(#[(#[dart._extensionType]) ? dartx[#] : #]).call(#, #)',
vsm 2016/08/29 22:01:04 apply is the one that takes an array. :-)
+ [l, l, memberName, memberName, l, _visitList(args)])
]);
}
// dynamic dispatch
« 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