Commit e6721cdc authored by verwaest@chromium.org's avatar verwaest@chromium.org

Fix StoreIsUninitialized, and add Soft Deopt if keyed store is uninitialized.

R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15612 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 56e2658e
......@@ -5996,8 +5996,14 @@ HValue* HOptimizedGraphBuilder::HandleKeyedElementAccess(
expr->GetStoreMode(), has_side_effects);
} else {
if (is_store) {
if (expr->IsAssignment() && expr->AsAssignment()->IsUninitialized()) {
AddSoftDeoptimize();
}
instr = BuildStoreKeyedGeneric(obj, key, val);
} else {
if (expr->AsProperty()->IsUninitialized()) {
AddSoftDeoptimize();
}
instr = BuildLoadKeyedGeneric(obj, key);
}
AddInstruction(instr);
......
......@@ -141,7 +141,7 @@ bool TypeFeedbackOracle::LoadIsPolymorphic(Property* expr) {
bool TypeFeedbackOracle::StoreIsUninitialized(TypeFeedbackId ast_id) {
Handle<Object> map_or_code = GetInfo(ast_id);
if (map_or_code->IsMap()) return false;
if (!map_or_code->IsCode()) return true;
if (!map_or_code->IsCode()) return false;
Handle<Code> code = Handle<Code>::cast(map_or_code);
return code->ic_state() == UNINITIALIZED;
}
......
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