Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Unified Diff: src/property.h

Issue 647015: Remove the LookupResult IsValid method because it is confusing.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.cc ('k') | src/property.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/property.h
===================================================================
--- src/property.h (revision 3900)
+++ src/property.h (working copy)
@@ -201,23 +201,17 @@
}
JSObject* holder() {
- ASSERT(IsValid());
+ ASSERT(IsFound());
return holder_;
}
PropertyType type() {
- ASSERT(IsValid());
+ ASSERT(IsFound());
return details_.type();
}
- bool IsTransitionType() {
- PropertyType t = type();
- if (t == MAP_TRANSITION || t == CONSTANT_TRANSITION) return true;
- return false;
- }
-
PropertyAttributes GetAttributes() {
- ASSERT(IsValid());
+ ASSERT(IsFound());
return details_.attributes();
}
@@ -229,16 +223,19 @@
bool IsDontDelete() { return details_.IsDontDelete(); }
bool IsDontEnum() { return details_.IsDontEnum(); }
bool IsDeleted() { return details_.IsDeleted(); }
+ bool IsFound() { return lookup_type_ != NOT_FOUND; }
- bool IsValid() { return lookup_type_ != NOT_FOUND; }
- bool IsNotFound() { return lookup_type_ == NOT_FOUND; }
-
- // Tells whether the result is a property.
- // Excluding transitions and the null descriptor.
+ // Is the result is a property excluding transitions and the null
+ // descriptor?
bool IsProperty() {
- return IsValid() && type() < FIRST_PHANTOM_PROPERTY_TYPE;
+ return IsFound() && (type() < FIRST_PHANTOM_PROPERTY_TYPE);
}
+ // Is the result a property or a transition?
+ bool IsPropertyOrTransition() {
+ return IsFound() && (type() != NULL_DESCRIPTOR);
+ }
+
bool IsCacheable() { return cacheable_; }
void DisallowCaching() { cacheable_ = false; }
« no previous file with comments | « src/objects.cc ('k') | src/property.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698