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

Unified Diff: runtime/vm/kernel_binary_flowgraph.cc

Issue 2951053003: VM(RegExp): Allow OSR optimization of RegExp :matcher functions. (Closed)
Patch Set: Fix bugs with stack growing and block pruning Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/kernel_binary_flowgraph.cc
diff --git a/runtime/vm/kernel_binary_flowgraph.cc b/runtime/vm/kernel_binary_flowgraph.cc
index 564ab5fb7acf1e247e17fdfdd8232a0e8f940b87..abd12463e294832acb9dd8565944c25f1f3971f0 100644
--- a/runtime/vm/kernel_binary_flowgraph.cc
+++ b/runtime/vm/kernel_binary_flowgraph.cc
@@ -3328,20 +3328,15 @@ FlowGraph* StreamingFlowGraphBuilder::BuildGraphOfFunction(
normal_entry->LinkTo(body.entry);
+ GraphEntryInstr* graph_entry = flow_graph_builder_->graph_entry_;
// When compiling for OSR, use a depth first search to prune instructions
// unreachable from the OSR entry. Catch entries are always considered
// reachable, even if they become unreachable after OSR.
if (flow_graph_builder_->osr_id_ != Compiler::kNoOSRDeoptId) {
- BitVector* block_marks =
- new (Z) BitVector(Z, flow_graph_builder_->next_block_id_);
- bool found = flow_graph_builder_->graph_entry_->PruneUnreachable(
- flow_graph_builder_->graph_entry_, NULL, flow_graph_builder_->osr_id_,
- block_marks);
- ASSERT(found);
+ graph_entry->PruneUnreachableForOSR(Z, flow_graph_builder_->next_block_id_);
}
- return new (Z)
- FlowGraph(*parsed_function(), flow_graph_builder_->graph_entry_,
- flow_graph_builder_->next_block_id_ - 1);
+ return new (Z) FlowGraph(*parsed_function(), graph_entry,
+ flow_graph_builder_->next_block_id_ - 1);
}
Fragment StreamingFlowGraphBuilder::BuildGetMainClosure() {

Powered by Google App Engine
This is Rietveld 408576698