diff --git a/src/arm/lithium-arm.cc b/src/arm/lithium-arm.cc index 6060ef2449..43631977bb 100644 --- a/src/arm/lithium-arm.cc +++ b/src/arm/lithium-arm.cc @@ -815,11 +815,7 @@ void LChunkBuilder::DoBasicBlock(HBasicBlock* block, HBasicBlock* next_block) { HEnvironment* last_environment = pred->last_environment(); for (int i = 0; i < block->phis()->length(); ++i) { HPhi* phi = block->phis()->at(i); - // TODO(mstarzinger): The length check below should actually not - // be necessary, but some array stubs already rely on it. This - // should be investigated and fixed. - if (phi->HasMergedIndex() && - phi->merged_index() < last_environment->length()) { + if (phi->HasMergedIndex()) { last_environment->SetValueAt(phi->merged_index(), phi); } } diff --git a/src/hydrogen.cc b/src/hydrogen.cc index e5af9f8002..f90dc0b2ee 100644 --- a/src/hydrogen.cc +++ b/src/hydrogen.cc @@ -5701,6 +5701,7 @@ HValue* HOptimizedGraphBuilder::HandlePolymorphicElementAccess( if (!is_store) { Push(access); } + NoObservableSideEffectsScope scope(this); current_block()->GotoNoSimulate(join); set_current_block(other_map); } diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc index 323cd7211d..65637b4fbf 100644 --- a/src/ia32/lithium-ia32.cc +++ b/src/ia32/lithium-ia32.cc @@ -870,11 +870,7 @@ void LChunkBuilder::DoBasicBlock(HBasicBlock* block, HBasicBlock* next_block) { HEnvironment* last_environment = pred->last_environment(); for (int i = 0; i < block->phis()->length(); ++i) { HPhi* phi = block->phis()->at(i); - // TODO(mstarzinger): The length check below should actually not - // be necessary, but some array stubs already rely on it. This - // should be investigated and fixed. - if (phi->HasMergedIndex() && - phi->merged_index() < last_environment->length()) { + if (phi->HasMergedIndex()) { last_environment->SetValueAt(phi->merged_index(), phi); } } diff --git a/src/mips/lithium-mips.cc b/src/mips/lithium-mips.cc index 09ec478d5f..fa415e5ef2 100644 --- a/src/mips/lithium-mips.cc +++ b/src/mips/lithium-mips.cc @@ -820,11 +820,7 @@ void LChunkBuilder::DoBasicBlock(HBasicBlock* block, HBasicBlock* next_block) { HEnvironment* last_environment = pred->last_environment(); for (int i = 0; i < block->phis()->length(); ++i) { HPhi* phi = block->phis()->at(i); - // TODO(mstarzinger): The length check below should actually not - // be necessary, but some array stubs already rely on it. This - // should be investigated and fixed. - if (phi->HasMergedIndex() && - phi->merged_index() < last_environment->length()) { + if (phi->HasMergedIndex()) { last_environment->SetValueAt(phi->merged_index(), phi); } } diff --git a/src/x64/lithium-x64.cc b/src/x64/lithium-x64.cc index ac372b69fb..1b1de3484e 100644 --- a/src/x64/lithium-x64.cc +++ b/src/x64/lithium-x64.cc @@ -814,11 +814,7 @@ void LChunkBuilder::DoBasicBlock(HBasicBlock* block, HBasicBlock* next_block) { HEnvironment* last_environment = pred->last_environment(); for (int i = 0; i < block->phis()->length(); ++i) { HPhi* phi = block->phis()->at(i); - // TODO(mstarzinger): The length check below should actually not - // be necessary, but some array stubs already rely on it. This - // should be investigated and fixed. - if (phi->HasMergedIndex() && - phi->merged_index() < last_environment->length()) { + if (phi->HasMergedIndex()) { last_environment->SetValueAt(phi->merged_index(), phi); } }