Reviewers: Mads Ager, Description: Don't do a second lookup as we have it already.
Please review this at http://codereview.chromium.org/149007 SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/ Affected files: M src/ic.cc Index: src/ic.cc =================================================================== --- src/ic.cc (revision 2267) +++ src/ic.cc (working copy) @@ -328,11 +328,11 @@ UpdateCaches(&lookup, state, object, name); } + // Get the property. + PropertyAttributes attr; + result = object->GetProperty(*object, &lookup, *name, &attr); + if (result->IsFailure()) return result; if (lookup.type() == INTERCEPTOR) { - // Get the property. - PropertyAttributes attr; - result = object->GetProperty(*name, &attr); - if (result->IsFailure()) return result; // If the object does not have the requested property, check which // exception we need to throw. if (attr == ABSENT) { @@ -341,11 +341,6 @@ } return TypeError("undefined_method", object, name); } - } else { - // Lookup is valid and no interceptors are involved. Get the - // property. - result = object->GetProperty(*name); - if (result->IsFailure()) return result; } ASSERT(result != Heap::the_hole_value()); --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
