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

Unified Diff: pkg/kernel/lib/transformations/closure/converter.dart

Issue 2891053003: Add support for converted closures with explicit contexts to VM (Closed)
Patch Set: Created 3 years, 7 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 | pkg/kernel/test/closures/suite.dart » ('j') | runtime/vm/kernel_binary_flowgraph.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/kernel/lib/transformations/closure/converter.dart
diff --git a/pkg/kernel/lib/transformations/closure/converter.dart b/pkg/kernel/lib/transformations/closure/converter.dart
index b4edd6df9e61333a438ca0c26d84a3f0bd8d9fbf..570f4776ea2fbbd942859d44b08ab1319941dce2 100644
--- a/pkg/kernel/lib/transformations/closure/converter.dart
+++ b/pkg/kernel/lib/transformations/closure/converter.dart
@@ -232,6 +232,7 @@ class ClosureConverter extends Transformer {
}
}
rewriter = null;
+ context = null;
// Transform constructor body.
FunctionNode function = node.function;
if (function.body != null && function.body is! EmptyStatement) {
@@ -644,9 +645,8 @@ class ClosureConverter extends Transformer {
TreeNode visitPropertyGet(PropertyGet node) {
Name tearOffName = tearOffGetterNames[node.name];
if (tearOffName != null) {
- MethodInvocation replacement = new MethodInvocation(
- node.receiver, tearOffName, new Arguments(<Expression>[]));
- return super.visitMethodInvocation(replacement);
+ PropertyGet replacement = new PropertyGet(node.receiver, tearOffName);
+ return super.visitPropertyGet(replacement);
}
return super.visitPropertyGet(node);
}
« no previous file with comments | « no previous file | pkg/kernel/test/closures/suite.dart » ('j') | runtime/vm/kernel_binary_flowgraph.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698