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}"; |
+ } |
+ |
} |
/** |