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

Unified Diff: src/lookup.h

Issue 1702623002: [runtime] Don't cache the holder_map_ in the LookupIterator, it's faster. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 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 | « 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 deed5a7bbf01855040a66f2cd2138a0a66ff6c69..2f53832b1fa845d2af26a7b68e48063acb3f5bf3 100644
--- a/src/lookup.h
+++ b/src/lookup.h
@@ -56,7 +56,6 @@ class LookupIterator final BASE_EMBEDDED {
index_(kMaxUInt32),
receiver_(receiver),
holder_(GetRoot(isolate_, receiver)),
- holder_map_(holder_->map(), isolate_),
initial_holder_(holder_),
number_(DescriptorArray::kNotFound) {
#ifdef DEBUG
@@ -79,7 +78,6 @@ class LookupIterator final BASE_EMBEDDED {
index_(kMaxUInt32),
receiver_(receiver),
holder_(holder),
- holder_map_(holder_->map(), isolate_),
initial_holder_(holder_),
number_(DescriptorArray::kNotFound) {
#ifdef DEBUG
@@ -100,7 +98,6 @@ class LookupIterator final BASE_EMBEDDED {
index_(index),
receiver_(receiver),
holder_(GetRoot(isolate, receiver, index)),
- holder_map_(holder_->map(), isolate_),
initial_holder_(holder_),
number_(DescriptorArray::kNotFound) {
// kMaxUInt32 isn't a valid index.
@@ -120,7 +117,6 @@ class LookupIterator final BASE_EMBEDDED {
index_(index),
receiver_(receiver),
holder_(holder),
- holder_map_(holder_->map(), isolate_),
initial_holder_(holder_),
number_(DescriptorArray::kNotFound) {
// kMaxUInt32 isn't a valid index.
@@ -189,7 +185,7 @@ class LookupIterator final BASE_EMBEDDED {
Factory* factory() const { return isolate_->factory(); }
Handle<Object> GetReceiver() const { return receiver_; }
Handle<JSObject> GetStoreTarget() const;
- bool is_dictionary_holder() const { return holder_map_->is_dictionary_map(); }
+ bool is_dictionary_holder() const { return !holder_->HasFastProperties(); }
Handle<Map> transition_map() const {
DCHECK_EQ(TRANSITION, state_);
return Handle<Map>::cast(transition_);
@@ -261,7 +257,6 @@ class LookupIterator final BASE_EMBEDDED {
Handle<Object> GetDataValue() const;
void WriteDataValue(Handle<Object> value);
void InternalizeName();
- void ReloadHolderMap();
private:
enum class InterceptorState {
@@ -295,13 +290,13 @@ class LookupIterator final BASE_EMBEDDED {
int descriptor_number() const {
DCHECK(!IsElement());
DCHECK(has_property_);
- DCHECK(!holder_map_->is_dictionary_map());
+ DCHECK(holder_->HasFastProperties());
return number_;
}
int dictionary_entry() const {
DCHECK(!IsElement());
DCHECK(has_property_);
- DCHECK(holder_map_->is_dictionary_map());
+ DCHECK(!holder_->HasFastProperties());
return number_;
}
@@ -339,7 +334,6 @@ class LookupIterator final BASE_EMBEDDED {
Handle<Object> transition_;
const Handle<Object> receiver_;
Handle<JSReceiver> holder_;
- Handle<Map> holder_map_;
const Handle<JSReceiver> initial_holder_;
uint32_t number_;
};
« 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