Index: src/hydrogen-osr.cc |
diff --git a/src/hydrogen-osr.cc b/src/hydrogen-osr.cc |
index e95967e05d00d4996ed9d09ec818434dab02b910..708103fc5cc063c0be9fc2152d4cff8d2ada0ae7 100644 |
--- a/src/hydrogen-osr.cc |
+++ b/src/hydrogen-osr.cc |
@@ -37,19 +37,9 @@ bool HOsrBuilder::HasOsrEntryAt(IterationStatement* statement) { |
} |
-// Build a new loop header block and set it as the current block. |
-HBasicBlock *HOsrBuilder::BuildLoopEntry() { |
- HBasicBlock* loop_entry = builder_->CreateLoopHeaderBlock(); |
- builder_->current_block()->Goto(loop_entry); |
- builder_->set_current_block(loop_entry); |
- return loop_entry; |
-} |
- |
- |
-HBasicBlock* HOsrBuilder::BuildPossibleOsrLoopEntry( |
+HBasicBlock* HOsrBuilder::BuildOsrLoopEntry( |
Michael Starzinger
2013/09/27 13:26:22
nit: Should fit into one line.
mvstanton
2013/09/27 13:31:43
Done.
|
IterationStatement* statement) { |
- // Check if there is an OSR here first. |
- if (!HasOsrEntryAt(statement)) return BuildLoopEntry(); |
+ ASSERT(HasOsrEntryAt(statement)); |
Zone* zone = builder_->zone(); |
HGraph* graph = builder_->graph(); |
@@ -113,7 +103,7 @@ HBasicBlock* HOsrBuilder::BuildPossibleOsrLoopEntry( |
builder_->set_current_block(loop_predecessor); |
// Create the final loop entry |
- osr_loop_entry_ = BuildLoopEntry(); |
+ osr_loop_entry_ = builder_->BuildLoopEntry(); |
return osr_loop_entry_; |
} |