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

Unified Diff: src/ic.cc

Issue 10873057: Added IC support for native setters on the prototype chain. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased Created 8 years, 4 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 | « src/ia32/stub-cache-ia32.cc ('k') | src/mips/stub-cache-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic.cc
diff --git a/src/ic.cc b/src/ic.cc
index 9d62a0c1bdee62a24780eff7243ca386da29b018..a8d16d3d3a03d03a8eb017bbb3b0d33a84db0185 100644
--- a/src/ic.cc
+++ b/src/ic.cc
@@ -1331,7 +1331,7 @@ static bool LookupForWrite(Handle<JSObject> receiver,
return false;
}
Handle<Object> callback(lookup->GetCallbackObject());
- return callback->IsAccessorPair() && StoreICableLookup(lookup);
+ return StoreICableLookup(lookup);
}
if (lookup->IsInterceptor() &&
@@ -1491,13 +1491,12 @@ void StoreIC::UpdateCaches(LookupResult* lookup,
case CALLBACKS: {
Handle<Object> callback(lookup->GetCallbackObject());
if (callback->IsAccessorInfo()) {
- ASSERT(*holder == *receiver); // LookupForWrite checks this.
Handle<AccessorInfo> info = Handle<AccessorInfo>::cast(callback);
if (v8::ToCData<Address>(info->setter()) == 0) return;
if (!holder->HasFastProperties()) return;
- ASSERT(info->IsCompatibleReceiver(*receiver));
+ if (!info->IsCompatibleReceiver(*receiver)) return;
code = isolate()->stub_cache()->ComputeStoreCallback(
- name, receiver, info, strict_mode);
+ name, receiver, holder, info, strict_mode);
} else if (callback->IsAccessorPair()) {
Handle<Object> setter(Handle<AccessorPair>::cast(callback)->setter());
if (!setter->IsJSFunction()) return;
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | src/mips/stub-cache-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698