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

Unified Diff: pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart

Issue 787603003: Generative constructors in the new dart backend. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments, set element for constructors in frontend_ast_to_backend_ast, adjust status-file Created 6 years 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 | « pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart ('k') | pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart
diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart
index 177d61148bf0aa4ac35ef6cb7461fe6dc1ff2ea2..14adf79f0be35d8018a3f82b784c7be5f446c7c9 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart
@@ -46,12 +46,12 @@ class SExpressionStringifier extends Visitor<String> with Indentation {
String visitFunctionDefinition(FunctionDefinition node) {
String name = node.element.name;
- namer.useReturnName(node.returnContinuation);
+ namer.useReturnName(node.body.returnContinuation);
String closureVariables = node.closureVariables.isEmpty
? ''
: '{${node.closureVariables.map(namer.defineClosureName).join(' ')}} ';
String parameters = node.parameters.map(visit).join(' ');
- String body = indentBlock(() => visit(node.body));
+ String body = indentBlock(() => visit(node.body.body));
return '$indentation(FunctionDefinition $name $closureVariables'
'($parameters return)\n$body)';
}
@@ -59,8 +59,8 @@ class SExpressionStringifier extends Visitor<String> with Indentation {
String visitFieldDefinition(FieldDefinition node) {
String name = node.element.name;
if (node.hasInitializer) {
- namer.useReturnName(node.returnContinuation);
- String body = indentBlock(() => visit(node.body));
+ namer.useReturnName(node.body.returnContinuation);
+ String body = indentBlock(() => visit(node.body.body));
return '$indentation(FieldDefinition $name (return)\n'
'$body)';
} else {
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart ('k') | pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698