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

Unified Diff: pkg/kernel/lib/text/ast_to_text.dart

Issue 2778223002: Add primitive to create closures and use it for closure conversion (Closed)
Patch Set: Skip context param in closure type construction, rather than remove it Created 3 years, 9 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/kernel/lib/text/ast_to_text.dart
diff --git a/pkg/kernel/lib/text/ast_to_text.dart b/pkg/kernel/lib/text/ast_to_text.dart
index bb7dd93afa4afd9506fcd6294b6209699a0954d9..8397e85d843ec4cbb3d2c4f146c9c8b38d9b8b99 100644
--- a/pkg/kernel/lib/text/ast_to_text.dart
+++ b/pkg/kernel/lib/text/ast_to_text.dart
@@ -1021,6 +1021,18 @@ class Printer extends Visitor<Null> {
writeSymbol(')');
}
+ visitClosureCreation(ClosureCreation node) {
+ writeWord('MakeClosure');
+ writeSymbol('<');
+ writeNode(node.functionType);
+ writeSymbol('>');
+ writeSymbol('(');
+ writeMemberReference(node.topLevelFunctionReference.asMember);
asgerf 2017/03/31 12:08:43 When adding the convenience getter, please use tha
Dmitry Stefantsov 2017/03/31 12:40:18 Thanks! Done.
+ writeComma();
+ writeExpression(node.contextVector);
+ writeSymbol(')');
+ }
+
visitDeferredImport(DeferredImport node) {
write('import "');
write('${node.importedLibrary.importUri}');

Powered by Google App Engine
This is Rietveld 408576698