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

Unified Diff: src/lookup.h

Issue 321543004: Rewrite GetPropertyAttribute to use the LookupIterator (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove bogus asserts Created 6 years, 6 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/contexts.cc ('k') | src/lookup.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lookup.h
diff --git a/src/lookup.h b/src/lookup.h
index 28cb38902b0fbe6ee06c3c29245ea49b1de4e945..0ac9d353adce0f45a35feb6fd5df8b8b66407e17 100644
--- a/src/lookup.h
+++ b/src/lookup.h
@@ -15,12 +15,15 @@ namespace internal {
class LookupIterator V8_FINAL BASE_EMBEDDED {
public:
enum Configuration {
- CHECK_DERIVED = 1 << 0,
- CHECK_INTERCEPTOR = 1 << 1,
- CHECK_ACCESS_CHECK = 1 << 2,
CHECK_OWN_REAL = 0,
- CHECK_ALL = CHECK_DERIVED | CHECK_INTERCEPTOR | CHECK_ACCESS_CHECK,
- SKIP_INTERCEPTOR = CHECK_ALL ^ CHECK_INTERCEPTOR
+ CHECK_HIDDEN = 1 << 0,
+ CHECK_DERIVED = 1 << 1,
+ CHECK_INTERCEPTOR = 1 << 2,
+ CHECK_ACCESS_CHECK = 1 << 3,
+ CHECK_ALL = CHECK_HIDDEN | CHECK_DERIVED |
+ CHECK_INTERCEPTOR | CHECK_ACCESS_CHECK,
+ SKIP_INTERCEPTOR = CHECK_ALL ^ CHECK_INTERCEPTOR,
+ CHECK_OWN = CHECK_ALL ^ CHECK_DERIVED
};
enum State {
@@ -53,9 +56,9 @@ class LookupIterator V8_FINAL BASE_EMBEDDED {
name_(name),
maybe_receiver_(receiver),
number_(DescriptorArray::kNotFound) {
- Handle<JSReceiver> origin = GetRoot();
- holder_map_ = handle(origin->map());
- maybe_holder_ = origin;
+ Handle<JSReceiver> root = GetRoot();
+ holder_map_ = handle(root->map());
+ maybe_holder_ = root;
Next();
}
@@ -95,6 +98,16 @@ class LookupIterator V8_FINAL BASE_EMBEDDED {
}
Handle<JSReceiver> GetRoot() const;
+ /* Dynamically reduce the trapped types. */
+ void skip_interceptor() {
+ configuration_ = static_cast<Configuration>(
+ configuration_ & ~CHECK_INTERCEPTOR);
+ }
+ void skip_access_check() {
+ configuration_ = static_cast<Configuration>(
+ configuration_ & ~CHECK_ACCESS_CHECK);
+ }
+
/* ACCESS_CHECK */
bool HasAccess(v8::AccessType access_type) const;
@@ -142,6 +155,9 @@ class LookupIterator V8_FINAL BASE_EMBEDDED {
bool check_derived() const {
return (configuration_ & CHECK_DERIVED) != 0;
}
+ bool check_hidden() const {
+ return (configuration_ & CHECK_HIDDEN) != 0;
+ }
bool check_access_check() const {
return (configuration_ & CHECK_ACCESS_CHECK) != 0;
}
« no previous file with comments | « src/contexts.cc ('k') | src/lookup.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698