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

Side by Side Diff: src/lookup.cc

Issue 1220813005: Minor performance improvements to the LookupIterator (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Update tests Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « src/lookup.h ('k') | src/lookup-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/deoptimizer.h" 8 #include "src/deoptimizer.h"
9 #include "src/lookup.h" 9 #include "src/lookup.h"
10 #include "src/lookup-inl.h" 10 #include "src/lookup-inl.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 Handle<JSObject> LookupIterator::GetStoreTarget() const { 80 Handle<JSObject> LookupIterator::GetStoreTarget() const {
81 if (receiver_->IsJSGlobalProxy()) { 81 if (receiver_->IsJSGlobalProxy()) {
82 PrototypeIterator iter(isolate(), receiver_); 82 PrototypeIterator iter(isolate(), receiver_);
83 if (iter.IsAtEnd()) return Handle<JSGlobalProxy>::cast(receiver_); 83 if (iter.IsAtEnd()) return Handle<JSGlobalProxy>::cast(receiver_);
84 return Handle<JSGlobalObject>::cast(PrototypeIterator::GetCurrent(iter)); 84 return Handle<JSGlobalObject>::cast(PrototypeIterator::GetCurrent(iter));
85 } 85 }
86 return Handle<JSObject>::cast(receiver_); 86 return Handle<JSObject>::cast(receiver_);
87 } 87 }
88 88
89 89
90 bool LookupIterator::IsBootstrapping() const {
91 return isolate_->bootstrapper()->IsActive();
92 }
93
94
95 bool LookupIterator::HasAccess() const { 90 bool LookupIterator::HasAccess() const {
96 DCHECK_EQ(ACCESS_CHECK, state_); 91 DCHECK_EQ(ACCESS_CHECK, state_);
97 return isolate_->MayAccess(GetHolder<JSObject>()); 92 return isolate_->MayAccess(GetHolder<JSObject>());
98 } 93 }
99 94
100 95
101 void LookupIterator::ReloadPropertyInformation() { 96 void LookupIterator::ReloadPropertyInformation() {
102 state_ = BEFORE_PROPERTY; 97 state_ = BEFORE_PROPERTY;
103 interceptor_state_ = InterceptorState::kUninitialized; 98 interceptor_state_ = InterceptorState::kUninitialized;
104 state_ = LookupInHolder(*holder_map_, *holder_); 99 state_ = LookupInHolder(*holder_map_, *holder_);
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 case InterceptorState::kSkipNonMasking: 470 case InterceptorState::kSkipNonMasking:
476 return true; 471 return true;
477 case InterceptorState::kProcessNonMasking: 472 case InterceptorState::kProcessNonMasking:
478 return false; 473 return false;
479 } 474 }
480 } 475 }
481 return interceptor_state_ == InterceptorState::kProcessNonMasking; 476 return interceptor_state_ == InterceptorState::kProcessNonMasking;
482 } 477 }
483 } // namespace internal 478 } // namespace internal
484 } // namespace v8 479 } // namespace v8
OLDNEW
« no previous file with comments | « src/lookup.h ('k') | src/lookup-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698