Review URL: http://codereview.chromium.org/126158
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2184 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
73fe551048
commit
c34c406dae
22
src/ic.cc
22
src/ic.cc
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user