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

Side by Side Diff: runtime/vm/flow_graph_builder.cc

Issue 2684073005: VM: Make debug printing of AST/scopes use --print-flow-graph-filter flag. (Closed)
Patch Set: Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/flow_graph_builder.h" 5 #include "vm/flow_graph_builder.h"
6 6
7 #include "lib/invocation_mirror.h" 7 #include "lib/invocation_mirror.h"
8 #include "vm/ast_printer.h" 8 #include "vm/ast_printer.h"
9 #include "vm/bit_vector.h" 9 #include "vm/bit_vector.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 4282 matching lines...) Expand 10 before | Expand all | Expand 10 after
4293 4293
4294 4294
4295 void EffectGraphVisitor::VisitStopNode(StopNode* node) { 4295 void EffectGraphVisitor::VisitStopNode(StopNode* node) {
4296 AddInstruction(new (Z) StopInstr(node->message())); 4296 AddInstruction(new (Z) StopInstr(node->message()));
4297 } 4297 }
4298 4298
4299 4299
4300 FlowGraph* FlowGraphBuilder::BuildGraph() { 4300 FlowGraph* FlowGraphBuilder::BuildGraph() {
4301 VMTagScope tagScope(thread(), VMTag::kCompileFlowGraphBuilderTagId, 4301 VMTagScope tagScope(thread(), VMTag::kCompileFlowGraphBuilderTagId,
4302 FLAG_profile_vm); 4302 FLAG_profile_vm);
4303 if (FLAG_support_ast_printer && FLAG_print_ast) { 4303 if (FLAG_support_ast_printer && FLAG_print_ast &&
4304 FlowGraphPrinter::ShouldPrint(parsed_function().function())) {
4304 // Print the function ast before IL generation. 4305 // Print the function ast before IL generation.
4305 AstPrinter ast_printer; 4306 AstPrinter ast_printer;
4306 ast_printer.PrintFunctionNodes(parsed_function()); 4307 ast_printer.PrintFunctionNodes(parsed_function());
4307 } 4308 }
4308 if (FLAG_support_ast_printer && FLAG_print_scopes) { 4309 if (FLAG_support_ast_printer && FLAG_print_scopes &&
4310 FlowGraphPrinter::ShouldPrint(parsed_function().function())) {
4309 AstPrinter ast_printer; 4311 AstPrinter ast_printer;
4310 ast_printer.PrintFunctionScope(parsed_function()); 4312 ast_printer.PrintFunctionScope(parsed_function());
4311 } 4313 }
4312 TargetEntryInstr* normal_entry = new (Z) 4314 TargetEntryInstr* normal_entry = new (Z)
4313 TargetEntryInstr(AllocateBlockId(), CatchClauseNode::kInvalidTryIndex); 4315 TargetEntryInstr(AllocateBlockId(), CatchClauseNode::kInvalidTryIndex);
4314 graph_entry_ = 4316 graph_entry_ =
4315 new (Z) GraphEntryInstr(parsed_function(), normal_entry, osr_id_); 4317 new (Z) GraphEntryInstr(parsed_function(), normal_entry, osr_id_);
4316 EffectGraphVisitor for_effect(this); 4318 EffectGraphVisitor for_effect(this);
4317 parsed_function().node_sequence()->Visit(&for_effect); 4319 parsed_function().node_sequence()->Visit(&for_effect);
4318 AppendFragment(normal_entry, for_effect); 4320 AppendFragment(normal_entry, for_effect);
(...skipping 20 matching lines...) Expand all
4339 graph_entry_->PruneUnreachable(graph_entry_, NULL, osr_id_, block_marks); 4341 graph_entry_->PruneUnreachable(graph_entry_, NULL, osr_id_, block_marks);
4340 ASSERT(found); 4342 ASSERT(found);
4341 } 4343 }
4342 4344
4343 4345
4344 void FlowGraphBuilder::Bailout(const char* reason) const { 4346 void FlowGraphBuilder::Bailout(const char* reason) const {
4345 parsed_function_.Bailout("FlowGraphBuilder", reason); 4347 parsed_function_.Bailout("FlowGraphBuilder", reason);
4346 } 4348 }
4347 4349
4348 } // namespace dart 4350 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698