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

Unified Diff: src/lookup.h

Issue 911713003: add transitions for global properties in ics (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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/ic/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 01fa766879a70102b6921ff86be40b0b5e0dcb25..5a5466ebe4e991193be0aa7d790d71f5faab1d44 100644
--- a/src/lookup.h
+++ b/src/lookup.h
@@ -88,7 +88,7 @@ class LookupIterator FINAL BASE_EMBEDDED {
bool is_dictionary_holder() const { return holder_map_->is_dictionary_map(); }
Handle<Map> transition_map() const {
DCHECK_EQ(TRANSITION, state_);
- return transition_map_;
+ return Handle<Map>::cast(transition_);
}
template <class T>
Handle<T> GetHolder() const {
@@ -107,13 +107,9 @@ class LookupIterator FINAL BASE_EMBEDDED {
PropertyAttributes attributes,
Object::StoreFromKeyed store_mode);
bool IsCacheableTransition() {
- bool cacheable =
- state_ == TRANSITION && transition_map()->GetBackPointer()->IsMap();
- if (cacheable) {
- property_details_ = transition_map_->GetLastDescriptorDetails();
- has_property_ = true;
- }
- return cacheable;
+ if (state_ != TRANSITION) return false;
+ return transition_->IsPropertyCell() ||
+ transition_map()->GetBackPointer()->IsMap();
}
void ApplyTransitionToDataProperty();
void ReconfigureDataProperty(Handle<Object> value,
@@ -135,6 +131,10 @@ class LookupIterator FINAL BASE_EMBEDDED {
int GetAccessorIndex() const;
int GetConstantIndex() const;
Handle<PropertyCell> GetPropertyCell() const;
+ Handle<PropertyCell> GetTransitionPropertyCell() const {
+ DCHECK_EQ(TRANSITION, state_);
+ return Handle<PropertyCell>::cast(transition_);
+ }
Handle<Object> GetAccessors() const;
Handle<Object> GetDataValue() const;
// Usually returns the value that was passed in, but may perform
@@ -194,7 +194,7 @@ class LookupIterator FINAL BASE_EMBEDDED {
Isolate* isolate_;
Handle<Name> name_;
Handle<Map> holder_map_;
- Handle<Map> transition_map_;
+ Handle<Object> transition_;
Handle<Object> receiver_;
Handle<JSReceiver> holder_;
« no previous file with comments | « src/ic/ic.cc ('k') | src/lookup.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698