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

Unified Diff: sdk/lib/_internal/compiler/implementation/dart_backend/dart_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_printer.dart
diff --git a/sdk/lib/_internal/compiler/implementation/dart_backend/dart_printer.dart b/sdk/lib/_internal/compiler/implementation/dart_backend/dart_printer.dart
index 139b7eb6bf04d6b62352794a37731f7a7d27afda..45ca8a7af5d383cae090349690f151e82fc4a153 100644
--- a/sdk/lib/_internal/compiler/implementation/dart_backend/dart_printer.dart
+++ b/sdk/lib/_internal/compiler/implementation/dart_backend/dart_printer.dart
@@ -240,15 +240,14 @@ class VariableDeclaration extends Node {
class FunctionDeclaration extends Statement {
- final TypeAnnotation returnType;
- final Parameters parameters;
- final String name;
- final Statement body;
+ final FunctionExpression function;
+
+ TypeAnnotation get returnType => function.returnType;
+ Parameters get parameters => function.parameters;
+ String get name => function.name;
+ Statement get body => function.body;
- FunctionDeclaration(this.name,
- this.parameters,
- this.body,
- [ this.returnType ]);
+ FunctionDeclaration(this.function);
}
class Parameters extends Node {
@@ -303,7 +302,7 @@ class Parameter extends Node {
class FunctionExpression extends Expression {
final TypeAnnotation returnType;
- final String name;
+ String name;
final Parameters parameters;
final Statement body;

Powered by Google App Engine
This is Rietveld 408576698