Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(380)

Unified Diff: src/ic.cc

Issue 126158: --issue=126156 (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic.cc
===================================================================
--- src/ic.cc (revision 2162)
+++ src/ic.cc (working copy)
@@ -863,6 +863,25 @@
}
+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 @@
// 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);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698