Index: runtime/vm/flow_graph_builder.cc |
=================================================================== |
--- runtime/vm/flow_graph_builder.cc (revision 29679) |
+++ runtime/vm/flow_graph_builder.cc (working copy) |
@@ -27,6 +27,7 @@ |
DEFINE_FLAG(bool, eliminate_type_checks, true, |
"Eliminate type checks when allowed by static type analysis."); |
DEFINE_FLAG(bool, print_ast, false, "Print abstract syntax tree."); |
+DEFINE_FLAG(bool, print_scopes, false, "Print scopes of local variables."); |
DEFINE_FLAG(bool, print_flow_graph, false, "Print the IR flow graph."); |
DEFINE_FLAG(bool, print_flow_graph_optimized, false, |
"Print the IR flow graph when optimizing."); |
@@ -3806,6 +3807,9 @@ |
// Print the function ast before IL generation. |
AstPrinter::PrintFunctionNodes(*parsed_function()); |
} |
+ if (FLAG_print_scopes) { |
+ AstPrinter::PrintFunctionScope(*parsed_function()); |
+ } |
const Function& function = parsed_function()->function(); |
TargetEntryInstr* normal_entry = |
new TargetEntryInstr(AllocateBlockId(), |