Commit 53710033 authored by bmeurer@chromium.org's avatar bmeurer@chromium.org

Do Else() first for JoinContinuation() in IfBuilder.

This is required to make sure that environments are correct
for joined continuations.

R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/52593008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17464 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent b9b2c456
...@@ -844,12 +844,12 @@ void HGraphBuilder::IfBuilder::CaptureContinuation( ...@@ -844,12 +844,12 @@ void HGraphBuilder::IfBuilder::CaptureContinuation(
void HGraphBuilder::IfBuilder::JoinContinuation(HIfContinuation* continuation) { void HGraphBuilder::IfBuilder::JoinContinuation(HIfContinuation* continuation) {
ASSERT(!finished_); ASSERT(!finished_);
ASSERT(!captured_); ASSERT(!captured_);
ASSERT(did_then_);
if (!did_else_) Else();
HBasicBlock* true_block = last_true_block_ == NULL HBasicBlock* true_block = last_true_block_ == NULL
? first_true_block_ ? first_true_block_
: last_true_block_; : last_true_block_;
HBasicBlock* false_block = did_else_ && (first_false_block_ != NULL) HBasicBlock* false_block = builder_->current_block();
? builder_->current_block()
: first_false_block_;
if (true_block != NULL && !true_block->IsFinished()) { if (true_block != NULL && !true_block->IsFinished()) {
ASSERT(continuation->IsTrueReachable()); ASSERT(continuation->IsTrueReachable());
builder_->GotoNoSimulate(true_block, continuation->true_branch()); builder_->GotoNoSimulate(true_block, continuation->true_branch());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment