Commit 3d7e2912 authored by verwaest@chromium.org's avatar verwaest@chromium.org

Fix polymorphic store.

Review URL: https://chromiumcodereview.appspot.com/14696011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14590 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent e5feaf31
......@@ -7261,8 +7261,21 @@ void HOptimizedGraphBuilder::HandlePolymorphicStoreNamedField(
AddInstruction(HCheckMaps::New(object, types, zone()));
HInstruction* instr = BuildStoreNamedField(
object, name, value, map, &lookup);
AddInstruction(instr);
instr->set_position(expr->position());
return ast_context()->ReturnInstruction(instr, expr->id());
// The HSimulate for the store should not see the stored value in
// effect contexts (it is not materialized at expr->id() in the
// unoptimized code).
if (instr->HasObservableSideEffects()) {
if (ast_context()->IsEffect()) {
AddSimulate(expr->id(), REMOVABLE_SIMULATE);
} else {
Push(value);
AddSimulate(expr->id(), REMOVABLE_SIMULATE);
Drop(1);
}
}
return ast_context()->ReturnValue(value);
}
}
......
......@@ -1338,6 +1338,7 @@ void LAllocator::BuildLiveRanges() {
#ifdef DEBUG
if (block_id == 0) {
ALLOW_HANDLE_DEREF(isolate(), "Printing debug information");
BitVector::Iterator iterator(live);
bool found = false;
while (!iterator.Done()) {
......
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