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

Unified Diff: src/lookup.cc

Issue 1770833002: Speed up indexed interceptor handling in the LookupIterator (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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/lookup.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lookup.cc
diff --git a/src/lookup.cc b/src/lookup.cc
index 95d5e54d53f85ccd3ccdbb463e95e24c8ab266bd..3df8752c01a7108ce145875a55d51bdab4185293 100644
--- a/src/lookup.cc
+++ b/src/lookup.cc
@@ -51,7 +51,6 @@ void LookupIterator::Start() {
has_property_ = false;
state_ = NOT_FOUND;
- number_ = DescriptorArray::kNotFound;
holder_ = initial_holder_;
JSReceiver* holder = *holder_;
@@ -110,6 +109,7 @@ template <bool is_element>
void LookupIterator::RestartInternal(InterceptorState interceptor_state) {
interceptor_state_ = interceptor_state;
property_details_ = PropertyDetails::Empty();
+ number_ = DescriptorArray::kNotFound;
Start<is_element>();
}
@@ -617,9 +617,9 @@ void LookupIterator::WriteDataValue(Handle<Object> value) {
}
}
-
+template <bool is_element>
bool LookupIterator::SkipInterceptor(JSObject* holder) {
- auto info = GetInterceptor(holder);
+ auto info = GetInterceptor<is_element>(holder);
// TODO(dcarney): check for symbol/can_intercept_symbols here as well.
if (info->non_masking()) {
switch (interceptor_state_) {
@@ -689,7 +689,7 @@ LookupIterator::State LookupIterator::LookupInSpecialHolder(
// Fall through.
case ACCESS_CHECK:
if (check_interceptor() && HasInterceptor<is_element>(map) &&
- !SkipInterceptor(JSObject::cast(holder))) {
+ !SkipInterceptor<is_element>(JSObject::cast(holder))) {
if (is_element || !name_->IsPrivate()) return INTERCEPTOR;
}
// Fall through.
« no previous file with comments | « src/lookup.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698