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

Unified Diff: src/lookup.h

Issue 478043006: Rewrite StoreIC handling using the LookupIterator. Continued from patch 494153002 (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 | « src/ic.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 e09eeeea244e74b18c81a80d01db51c3eb3300a7..d6fa35b265861db90861415c992c5721aa8a31d1 100644
--- a/src/lookup.h
+++ b/src/lookup.h
@@ -37,6 +37,7 @@ class LookupIterator V8_FINAL BASE_EMBEDDED {
JSPROXY,
NOT_FOUND,
PROPERTY,
+ TRANSITION,
// Set state_ to BEFORE_PROPERTY to ensure that the next lookup will be a
// PROPERTY lookup.
BEFORE_PROPERTY = INTERCEPTOR
@@ -114,7 +115,12 @@ class LookupIterator V8_FINAL BASE_EMBEDDED {
Handle<Object> GetReceiver() const {
return maybe_receiver_.ToHandleChecked();
}
+ Handle<JSObject> GetStoreTarget() const;
Handle<Map> holder_map() const { return holder_map_; }
+ Handle<Map> transition_map() const {
+ DCHECK_EQ(TRANSITION, state_);
+ return transition_map_;
+ }
template <class T>
Handle<T> GetHolder() const {
DCHECK(IsFound());
@@ -133,9 +139,20 @@ class LookupIterator V8_FINAL BASE_EMBEDDED {
// answer, and loads extra information about the property.
bool HasProperty();
void PrepareForDataProperty(Handle<Object> value);
- void TransitionToDataProperty(Handle<Object> value,
- PropertyAttributes attributes,
- Object::StoreFromKeyed store_mode);
+ void PrepareTransitionToDataProperty(Handle<Object> value,
+ PropertyAttributes attributes,
+ Object::StoreFromKeyed store_mode);
+ bool IsCacheableTransition() {
+ bool cacheable =
+ state_ == TRANSITION && transition_map()->GetBackPointer()->IsMap();
+ if (cacheable) {
+ property_details_ = transition_map_->GetLastDescriptorDetails();
+ LoadPropertyKind();
+ has_property_ = true;
+ }
+ return cacheable;
+ }
+ void ApplyTransitionToDataProperty();
void ReconfigureDataProperty(Handle<Object> value,
PropertyAttributes attributes);
void TransitionToAccessorProperty(AccessorComponent component,
@@ -159,6 +176,7 @@ class LookupIterator V8_FINAL BASE_EMBEDDED {
return property_details().representation();
}
FieldIndex GetFieldIndex() const;
+ Handle<HeapType> GetFieldType() const;
int GetConstantIndex() const;
Handle<PropertyCell> GetPropertyCell() const;
Handle<Object> GetAccessors() const;
@@ -174,6 +192,7 @@ class LookupIterator V8_FINAL BASE_EMBEDDED {
inline State LookupInHolder(Map* map);
Handle<Object> FetchValue() const;
void ReloadPropertyInformation();
+ void LoadPropertyKind();
bool IsBootstrapping() const;
@@ -227,6 +246,7 @@ class LookupIterator V8_FINAL BASE_EMBEDDED {
Isolate* isolate_;
Handle<Name> name_;
Handle<Map> holder_map_;
+ Handle<Map> transition_map_;
MaybeHandle<Object> maybe_receiver_;
MaybeHandle<JSReceiver> maybe_holder_;
« no previous file with comments | « src/ic.cc ('k') | src/lookup.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698