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

Unified Diff: src/lookup.h

Issue 490533002: Use LookupIterator to transition to accessors (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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 | « no previous file | 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 53f1a686828fd0c2d035a4164c8e2668ec4b2063..5fbc10b0daba58ff0602836f7d4be9fa23be197f 100644
--- a/src/lookup.h
+++ b/src/lookup.h
@@ -31,11 +31,14 @@ class LookupIterator V8_FINAL BASE_EMBEDDED {
};
enum State {
+ ACCESS_CHECK,
+ INTERCEPTOR,
+ JSPROXY,
NOT_FOUND,
PROPERTY,
- INTERCEPTOR,
- ACCESS_CHECK,
- JSPROXY
+ // Set state_ to BEFORE_PROPERTY to ensure that the next lookup will be a
+ // PROPERTY lookup.
+ BEFORE_PROPERTY = INTERCEPTOR
};
enum PropertyKind {
@@ -100,6 +103,10 @@ class LookupIterator V8_FINAL BASE_EMBEDDED {
bool IsFound() const { return state_ != NOT_FOUND; }
void Next();
+ void NotFound() {
+ has_property_ = false;
+ state_ = NOT_FOUND;
+ }
Heap* heap() const { return isolate_->heap(); }
Factory* factory() const { return isolate_->factory(); }
@@ -130,6 +137,9 @@ class LookupIterator V8_FINAL BASE_EMBEDDED {
Object::StoreFromKeyed store_mode);
void ReconfigureDataProperty(Handle<Object> value,
PropertyAttributes attributes);
+ void TransitionToAccessorProperty(AccessorComponent component,
+ Handle<Object> accessor,
+ PropertyAttributes attributes);
PropertyKind property_kind() const {
DCHECK(has_property_);
return property_kind_;
@@ -162,6 +172,7 @@ class LookupIterator V8_FINAL BASE_EMBEDDED {
MUST_USE_RESULT inline JSReceiver* NextHolder(Map* map);
inline State LookupInHolder(Map* map);
Handle<Object> FetchValue() const;
+ void ReloadPropertyInformation();
bool IsBootstrapping() const;
« no previous file with comments | « no previous file | src/lookup.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698