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

Unified Diff: sdk/lib/_internal/compiler/implementation/dart_backend/tree_tracer.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/tree_tracer.dart
diff --git a/sdk/lib/_internal/compiler/implementation/dart_backend/tree_tracer.dart b/sdk/lib/_internal/compiler/implementation/dart_backend/tree_tracer.dart
index c3ea178647a4ff8ea317f80e04e81846617e959f..c78d45862b9a18bfa5d4c47f27e0d29f5e3242fc 100644
--- a/sdk/lib/_internal/compiler/implementation/dart_backend/tree_tracer.dart
+++ b/sdk/lib/_internal/compiler/implementation/dart_backend/tree_tracer.dart
@@ -135,6 +135,11 @@ class BlockCollector extends StatementVisitor {
_addStatement(node);
visitStatement(node.next);
}
+
+ visitFunctionDeclaration(FunctionDeclaration node) {
+ _addStatement(node);
+ visitStatement(node.next);
+ }
}
class TreeTracer extends TracerUtil with StatementVisitor {
@@ -250,6 +255,10 @@ class TreeTracer extends TracerUtil with StatementVisitor {
printStatement(null, expr(node.expression));
}
+ visitFunctionDeclaration(FunctionDeclaration node) {
+ printStatement(null, 'function ${node.definition.element.name}');
+ }
+
String expr(Expression e) {
return e.accept(new SubexpressionVisitor(names));
}
@@ -338,7 +347,7 @@ class SubexpressionVisitor extends ExpressionVisitor<String> {
}
String visitReifyTypeVar(ReifyTypeVar node) {
- return "typevar [${node.element.name}]";
+ return "typevar [${node.typeVariable.name}]";
}
bool usesInfixNotation(Expression node) {
@@ -378,6 +387,10 @@ class SubexpressionVisitor extends ExpressionVisitor<String> {
return '!$operand';
}
+ String visitFunctionExpression(FunctionExpression node) {
+ return "function ${node.definition.element.name}";
+ }
+
}
/**

Powered by Google App Engine
This is Rietveld 408576698