Index: src/lookup.h |
diff --git a/src/lookup.h b/src/lookup.h |
index 1e5ab0772dc0e6b48560a0487506daec1fd1bd20..89d3233e4fbd3fae8d0dd2b4e5494c907913ac1f 100644 |
--- a/src/lookup.h |
+++ b/src/lookup.h |
@@ -16,19 +16,21 @@ class LookupIterator V8_FINAL BASE_EMBEDDED { |
public: |
enum Configuration { |
// Configuration bits. |
- CHECK_HIDDEN_PROPERTY = 1 << 0, |
- CHECK_DERIVED_PROPERTY = 1 << 1, |
- CHECK_INTERCEPTOR = 1 << 2, |
- CHECK_ACCESS_CHECK = 1 << 3, |
+ kAccessCheck = 1 << 0, |
+ kHidden = 1 << 1, |
+ kInterceptor = 1 << 2, |
+ kPrototypeChain = 1 << 3, |
// Convience combinations of bits. |
- CHECK_PROPERTY = 0, |
- CHECK_OWN = CHECK_ACCESS_CHECK | CHECK_INTERCEPTOR, |
- CHECK_HIDDEN_SKIP_INTERCEPTOR = CHECK_HIDDEN_PROPERTY | CHECK_ACCESS_CHECK, |
- CHECK_DERIVED_SKIP_INTERCEPTOR = |
- CHECK_HIDDEN_SKIP_INTERCEPTOR | CHECK_DERIVED_PROPERTY, |
- CHECK_DERIVED = CHECK_DERIVED_SKIP_INTERCEPTOR | CHECK_INTERCEPTOR, |
- CHECK_HIDDEN = CHECK_HIDDEN_SKIP_INTERCEPTOR | CHECK_INTERCEPTOR |
+ OWN_PROPERTY = 0, |
+ OWN_SKIP_INTERCEPTOR = kAccessCheck, |
+ OWN = kAccessCheck | kInterceptor, |
+ HIDDEN_PROPERTY = kHidden, |
+ HIDDEN_SKIP_INTERCEPTOR = kAccessCheck | kHidden, |
+ HIDDEN = kAccessCheck | kHidden | kInterceptor, |
+ PROTOTYPE_CHAIN_PROPERTY = kHidden | kPrototypeChain, |
+ PROTOTYPE_CHAIN_SKIP_INTERCEPTOR = kAccessCheck | kHidden | kPrototypeChain, |
+ PROTOTYPE_CHAIN = kAccessCheck | kHidden | kPrototypeChain | kInterceptor |
}; |
enum State { |
@@ -54,7 +56,7 @@ class LookupIterator V8_FINAL BASE_EMBEDDED { |
}; |
LookupIterator(Handle<Object> receiver, Handle<Name> name, |
- Configuration configuration = CHECK_DERIVED) |
+ Configuration configuration = PROTOTYPE_CHAIN) |
: configuration_(ComputeConfiguration(configuration, name)), |
state_(NOT_FOUND), |
property_kind_(DATA), |
@@ -72,7 +74,7 @@ class LookupIterator V8_FINAL BASE_EMBEDDED { |
LookupIterator(Handle<Object> receiver, Handle<Name> name, |
Handle<JSReceiver> holder, |
- Configuration configuration = CHECK_DERIVED) |
+ Configuration configuration = PROTOTYPE_CHAIN) |
: configuration_(ComputeConfiguration(configuration, name)), |
state_(NOT_FOUND), |
property_kind_(DATA), |
@@ -191,17 +193,15 @@ class LookupIterator V8_FINAL BASE_EMBEDDED { |
bool is_guaranteed_to_have_holder() const { |
return !maybe_receiver_.is_null(); |
} |
- bool check_interceptor() const { |
- return !IsBootstrapping() && (configuration_ & CHECK_INTERCEPTOR) != 0; |
- } |
- bool check_derived() const { |
- return (configuration_ & CHECK_DERIVED_PROPERTY) != 0; |
+ bool check_access_check() const { |
+ return (configuration_ & kAccessCheck) != 0; |
} |
- bool check_hidden() const { |
- return (configuration_ & CHECK_HIDDEN_PROPERTY) != 0; |
+ bool check_hidden() const { return (configuration_ & kHidden) != 0; } |
+ bool check_interceptor() const { |
+ return !IsBootstrapping() && (configuration_ & kInterceptor) != 0; |
} |
- bool check_access_check() const { |
- return (configuration_ & CHECK_ACCESS_CHECK) != 0; |
+ bool check_prototype_chain() const { |
+ return (configuration_ & kPrototypeChain) != 0; |
} |
int descriptor_number() const { |
DCHECK(has_property_); |
@@ -217,7 +217,7 @@ class LookupIterator V8_FINAL BASE_EMBEDDED { |
static Configuration ComputeConfiguration( |
Configuration configuration, Handle<Name> name) { |
if (name->IsOwn()) { |
- return static_cast<Configuration>(configuration & CHECK_HIDDEN); |
+ return static_cast<Configuration>(configuration & HIDDEN); |
} else { |
return configuration; |
} |