Reviewers: Mads Ager, Kasper Lund, Description: When compiling a stub for store with interceptor, check if this interceptor has a setter (otherwise stub is almost useless: it'd find out there is no setter and resort to slow lookup). If there is no setter, try to find out real property (if any).
Please review this at http://codereview.chromium.org/119048 SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/ Affected files: M src/ic.cc Index: src/ic.cc =================================================================== --- src/ic.cc (revision 2089) +++ src/ic.cc (working copy) @@ -875,6 +875,13 @@ // Lookup the property locally in the receiver. LookupResult lookup; receiver->LocalLookup(*name, &lookup); + bool interceptor_found = lookup.IsValid() && lookup.IsCacheable() + && lookup.type() == INTERCEPTOR; + if (interceptor_found) { + if (receiver->GetNamedInterceptor()->setter()->IsUndefined()) { + receiver->LocalLookupRealNamedProperty(*name, &lookup); + } + } // Update inline cache and stub cache. if (FLAG_use_ic && lookup.IsLoaded()) { --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
