Revision: 10462
Author: [email protected]
Date: Fri Jan 20 07:10:35 2012
Log: Removed IsPropertyOrTransition method.
It had only 2 uses: One use could be rewritten in a simpler way, and the
other
is actually more readable after inlining and fixing the comments.
Review URL: https://chromiumcodereview.appspot.com/9233006
http://code.google.com/p/v8/source/detail?r=10462
Modified:
/branches/bleeding_edge/src/hydrogen.cc
/branches/bleeding_edge/src/ic.cc
/branches/bleeding_edge/src/property.h
=======================================
--- /branches/bleeding_edge/src/hydrogen.cc Fri Jan 20 06:08:20 2012
+++ /branches/bleeding_edge/src/hydrogen.cc Fri Jan 20 07:10:35 2012
@@ -3552,7 +3552,7 @@
Handle<String> name,
LookupResult* lookup) {
type->LookupInDescriptors(NULL, *name, lookup);
- if (!lookup->IsPropertyOrTransition()) return false;
+ if (!lookup->IsFound()) return false;
if (lookup->type() == FIELD) return true;
return (lookup->type() == MAP_TRANSITION) &&
(type->unused_property_fields() > 0);
=======================================
--- /branches/bleeding_edge/src/ic.cc Thu Jan 19 06:58:54 2012
+++ /branches/bleeding_edge/src/ic.cc Fri Jan 20 07:10:35 2012
@@ -1206,10 +1206,12 @@
static bool StoreICableLookup(LookupResult* lookup) {
// Bail out if we didn't find a result.
- if (!lookup->IsPropertyOrTransition() || !lookup->IsCacheable()) return
false;
-
- // If the property is read-only, we leave the IC in its current
- // state.
+ if (!lookup->IsFound() || lookup->type() == NULL_DESCRIPTOR) return
false;
+
+ // Bail out if inline caching is not allowed.
+ if (!lookup->IsCacheable()) return false;
+
+ // If the property is read-only, we leave the IC in its current state.
if (lookup->IsReadOnly()) return false;
return true;
=======================================
--- /branches/bleeding_edge/src/property.h Wed Nov 9 04:47:15 2011
+++ /branches/bleeding_edge/src/property.h Fri Jan 20 07:10:35 2012
@@ -264,11 +264,6 @@
bool IsProperty() {
return IsFound() && GetPropertyDetails().IsProperty();
}
-
- // Is the result a property or a transition?
- bool IsPropertyOrTransition() {
- return IsFound() && (type() != NULL_DESCRIPTOR);
- }
bool IsCacheable() { return cacheable_; }
void DisallowCaching() { cacheable_ = false; }
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev