Commit 6efe8ca2 authored by verwaest@chromium.org's avatar verwaest@chromium.org

Flag rewriting an IC while writing to a global constant property as a failure...

Flag rewriting an IC while writing to a global constant property as a failure caused by the constant property turning mutable.

R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15606 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent e84649d8
......@@ -191,6 +191,17 @@ static bool TryRemoveInvalidPrototypeDependentStub(Code* target,
if (Name::cast(name) != stub_name) return false;
}
if (receiver->IsGlobalObject()) {
if (!name->IsName()) return false;
Isolate* isolate = target->GetIsolate();
LookupResult lookup(isolate);
GlobalObject* global = GlobalObject::cast(receiver);
global->LocalLookupRealNamedProperty(Name::cast(name), &lookup);
if (!lookup.IsFound()) return false;
PropertyCell* cell = global->GetPropertyCell(&lookup);
return cell->type()->IsConstant();
}
InlineCacheHolderFlag cache_holder =
Code::ExtractCacheHolderFromFlags(target->flags());
......
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