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

Unified Diff: sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree_printer.dart

Issue 366853007: dart2dart: Support for inner functions in new IR. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: SVN rebase Created 6 years, 6 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: sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree_printer.dart
diff --git a/sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree_printer.dart b/sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree_printer.dart
index 30beb55df2ec4867b62118833fb84f6d8356200e..43117b0602ef70cdcc416de464a31fffe16fa060 100644
--- a/sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree_printer.dart
+++ b/sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree_printer.dart
@@ -683,14 +683,16 @@ class TreePrinter {
forToken,
inToken);
} else if (stmt is FunctionDeclaration) {
- return new tree.FunctionDeclaration(new tree.FunctionExpression(
+ tree.FunctionExpression function = new tree.FunctionExpression(
stmt.name != null ? makeIdentifier(stmt.name) : null,
makeParameters(stmt.parameters),
makeFunctionBody(stmt.body),
stmt.returnType != null ? makeType(stmt.returnType) : null,
makeEmptyModifiers(), // TODO(asgerf): Function modifiers?
null, // initializers
- null)); // get/set
+ null); // get/set
+ setElement(function, stmt.function.element, stmt);
+ return new tree.FunctionDeclaration(function);
} else if (stmt is If) {
if (stmt.elseStatement == null || isEmptyStatement(stmt.elseStatement)) {
tree.Node node = new tree.If(

Powered by Google App Engine
This is Rietveld 408576698