Author: [email protected]
Date: Tue Jun 30 05:29:45 2009
New Revision: 2306
Modified:
branches/bleeding_edge/src/ic.cc
Log:
Don't do a second lookup as we have it already.
Review URL: http://codereview.chromium.org/149007
Modified: branches/bleeding_edge/src/ic.cc
==============================================================================
--- branches/bleeding_edge/src/ic.cc (original)
+++ branches/bleeding_edge/src/ic.cc Tue Jun 30 05:29:45 2009
@@ -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
-~----------~----~----~----~------~----~------~--~---