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

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

Issue 2327693002: Add --parse-all option in order to benchmark and measure the scanner/parser performance. (Closed)
Patch Set: Address review comments. Created 4 years, 3 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
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 4580 matching lines...) Expand 10 before | Expand all | Expand 10 after
4591 AddInstruction(new(Z) StopInstr(node->message())); 4591 AddInstruction(new(Z) StopInstr(node->message()));
4592 } 4592 }
4593 4593
4594 4594
4595 FlowGraph* FlowGraphBuilder::BuildGraph() { 4595 FlowGraph* FlowGraphBuilder::BuildGraph() {
4596 VMTagScope tagScope(thread(), 4596 VMTagScope tagScope(thread(),
4597 VMTag::kCompileFlowGraphBuilderTagId, 4597 VMTag::kCompileFlowGraphBuilderTagId,
4598 FLAG_profile_vm); 4598 FLAG_profile_vm);
4599 if (FLAG_support_ast_printer && FLAG_print_ast) { 4599 if (FLAG_support_ast_printer && FLAG_print_ast) {
4600 // Print the function ast before IL generation. 4600 // Print the function ast before IL generation.
4601 AstPrinter::PrintFunctionNodes(parsed_function()); 4601 AstPrinter ast_printer;
4602 ast_printer.PrintFunctionNodes(parsed_function());
4602 } 4603 }
4603 if (FLAG_support_ast_printer && FLAG_print_scopes) { 4604 if (FLAG_support_ast_printer && FLAG_print_scopes) {
4604 AstPrinter::PrintFunctionScope(parsed_function()); 4605 AstPrinter ast_printer;
4606 ast_printer.PrintFunctionScope(parsed_function());
4605 } 4607 }
4606 TargetEntryInstr* normal_entry = 4608 TargetEntryInstr* normal_entry =
4607 new(Z) TargetEntryInstr(AllocateBlockId(), 4609 new(Z) TargetEntryInstr(AllocateBlockId(),
4608 CatchClauseNode::kInvalidTryIndex); 4610 CatchClauseNode::kInvalidTryIndex);
4609 graph_entry_ = 4611 graph_entry_ =
4610 new(Z) GraphEntryInstr(parsed_function(), normal_entry, osr_id_); 4612 new(Z) GraphEntryInstr(parsed_function(), normal_entry, osr_id_);
4611 EffectGraphVisitor for_effect(this); 4613 EffectGraphVisitor for_effect(this);
4612 parsed_function().node_sequence()->Visit(&for_effect); 4614 parsed_function().node_sequence()->Visit(&for_effect);
4613 AppendFragment(normal_entry, for_effect); 4615 AppendFragment(normal_entry, for_effect);
4614 // Check that the graph is properly terminated. 4616 // Check that the graph is properly terminated.
(...skipping 19 matching lines...) Expand all
4634 block_marks); 4636 block_marks);
4635 ASSERT(found); 4637 ASSERT(found);
4636 } 4638 }
4637 4639
4638 4640
4639 void FlowGraphBuilder::Bailout(const char* reason) const { 4641 void FlowGraphBuilder::Bailout(const char* reason) const {
4640 parsed_function_.Bailout("FlowGraphBuilder", reason); 4642 parsed_function_.Bailout("FlowGraphBuilder", reason);
4641 } 4643 }
4642 4644
4643 } // namespace dart 4645 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698