| Index: runtime/vm/flow_graph_builder.cc
|
| diff --git a/runtime/vm/flow_graph_builder.cc b/runtime/vm/flow_graph_builder.cc
|
| index 1bafaa547e6b9471ad14991e441b4bba98383095..e13672d724ec4c4afb8d791c3cf0fc724b1db5f4 100644
|
| --- a/runtime/vm/flow_graph_builder.cc
|
| +++ b/runtime/vm/flow_graph_builder.cc
|
| @@ -4300,12 +4300,14 @@ void EffectGraphVisitor::VisitStopNode(StopNode* node) {
|
| FlowGraph* FlowGraphBuilder::BuildGraph() {
|
| VMTagScope tagScope(thread(), VMTag::kCompileFlowGraphBuilderTagId,
|
| FLAG_profile_vm);
|
| - if (FLAG_support_ast_printer && FLAG_print_ast) {
|
| + if (FLAG_support_ast_printer && FLAG_print_ast &&
|
| + FlowGraphPrinter::ShouldPrint(parsed_function().function())) {
|
| // Print the function ast before IL generation.
|
| AstPrinter ast_printer;
|
| ast_printer.PrintFunctionNodes(parsed_function());
|
| }
|
| - if (FLAG_support_ast_printer && FLAG_print_scopes) {
|
| + if (FLAG_support_ast_printer && FLAG_print_scopes &&
|
| + FlowGraphPrinter::ShouldPrint(parsed_function().function())) {
|
| AstPrinter ast_printer;
|
| ast_printer.PrintFunctionScope(parsed_function());
|
| }
|
|
|