Commit c34c406d authored by antonm@chromium.org's avatar antonm@chromium.org

Review URL: http://codereview.chromium.org/126158

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2184 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 73fe5510
......@@ -863,6 +863,25 @@ static bool StoreICableLookup(LookupResult* lookup) {
}
static bool LookupForStoreIC(JSObject* object,
String* name,
LookupResult* lookup) {
object->LocalLookup(name, lookup);
if (!StoreICableLookup(lookup)) {
return false;
}
if (lookup->type() == INTERCEPTOR) {
if (object->GetNamedInterceptor()->setter()->IsUndefined()) {
object->LocalLookupRealNamedProperty(name, lookup);
return StoreICableLookup(lookup);
}
}
return true;
}
Object* StoreIC::Store(State state,
Handle<Object> object,
Handle<String> name,
......@@ -889,8 +908,7 @@ Object* StoreIC::Store(State state,
// Lookup the property locally in the receiver.
if (FLAG_use_ic && !receiver->IsJSGlobalProxy()) {
LookupResult lookup;
receiver->LocalLookup(*name, &lookup);
if (StoreICableLookup(&lookup)) {
if (LookupForStoreIC(*receiver, *name, &lookup)) {
UpdateCaches(&lookup, state, receiver, name, value);
}
}
......
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