Make sure polymorphic element access creates non-replaying phis.

R=danno@chromium.org
BUG=v8:2815

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16136 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
mstarzinger@chromium.org 2013-08-09 15:23:15 +00:00
parent cc3b7a007f
commit 6989edf771
5 changed files with 5 additions and 20 deletions

View File

@ -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);
}
}

View File

@ -5701,6 +5701,7 @@ HValue* HOptimizedGraphBuilder::HandlePolymorphicElementAccess(
if (!is_store) {
Push(access);
}
NoObservableSideEffectsScope scope(this);
current_block()->GotoNoSimulate(join);
set_current_block(other_map);
}

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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);
}
}