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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10462 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 96092307
......@@ -3552,7 +3552,7 @@ static bool ComputeStoredField(Handle<Map> type,
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);
......
......@@ -1206,10 +1206,12 @@ void KeyedLoadIC::UpdateCaches(LookupResult* lookup,
static bool StoreICableLookup(LookupResult* lookup) {
// Bail out if we didn't find a result.
if (!lookup->IsPropertyOrTransition() || !lookup->IsCacheable()) return false;
if (!lookup->IsFound() || lookup->type() == NULL_DESCRIPTOR) return false;
// If the property is read-only, we leave the IC in its current
// state.
// 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;
......
......@@ -265,11 +265,6 @@ class LookupResult BASE_EMBEDDED {
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; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment