From 537100336c67e81515f9be7bbf4a7fb8289ee399 Mon Sep 17 00:00:00 2001 From: "bmeurer@chromium.org" Date: Tue, 5 Nov 2013 08:56:48 +0000 Subject: [PATCH] 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 --- src/hydrogen.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hydrogen.cc b/src/hydrogen.cc index 3b232e6e93..5fc107c332 100644 --- a/src/hydrogen.cc +++ b/src/hydrogen.cc @@ -844,12 +844,12 @@ void HGraphBuilder::IfBuilder::CaptureContinuation( void HGraphBuilder::IfBuilder::JoinContinuation(HIfContinuation* continuation) { ASSERT(!finished_); ASSERT(!captured_); + ASSERT(did_then_); + if (!did_else_) Else(); HBasicBlock* true_block = last_true_block_ == NULL ? first_true_block_ : last_true_block_; - HBasicBlock* false_block = did_else_ && (first_false_block_ != NULL) - ? builder_->current_block() - : first_false_block_; + HBasicBlock* false_block = builder_->current_block(); if (true_block != NULL && !true_block->IsFinished()) { ASSERT(continuation->IsTrueReachable()); builder_->GotoNoSimulate(true_block, continuation->true_branch());