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

Side by Side Diff: src/lookup.h

Issue 1416053007: Introduce LookupIterator::Restart() and use it (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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 | « no previous file | src/lookup.cc » ('j') | src/lookup.cc » ('J')
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 #ifndef V8_LOOKUP_H_ 5 #ifndef V8_LOOKUP_H_
6 #define V8_LOOKUP_H_ 6 #define V8_LOOKUP_H_
7 7
8 #include "src/factory.h" 8 #include "src/factory.h"
9 #include "src/isolate.h" 9 #include "src/isolate.h"
10 #include "src/objects.h" 10 #include "src/objects.h"
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 ? LookupIterator(isolate, receiver, index, holder, configuration) 155 ? LookupIterator(isolate, receiver, index, holder, configuration)
156 : LookupIterator(receiver, name, holder, configuration); 156 : LookupIterator(receiver, name, holder, configuration);
157 it.name_ = name; 157 it.name_ = name;
158 return it; 158 return it;
159 } 159 }
160 160
161 static LookupIterator PropertyOrElement( 161 static LookupIterator PropertyOrElement(
162 Isolate* isolate, Handle<Object> receiver, Handle<Object> key, 162 Isolate* isolate, Handle<Object> receiver, Handle<Object> key,
163 bool* success, Configuration configuration = DEFAULT); 163 bool* success, Configuration configuration = DEFAULT);
164 164
165 void Restart() { RestartInternal(InterceptorState::kUninitialized); }
166
165 Isolate* isolate() const { return isolate_; } 167 Isolate* isolate() const { return isolate_; }
166 State state() const { return state_; } 168 State state() const { return state_; }
167 169
168 Handle<Name> name() const { 170 Handle<Name> name() const {
169 DCHECK(!IsElement()); 171 DCHECK(!IsElement());
170 return name_; 172 return name_;
171 } 173 }
172 Handle<Name> GetName() { 174 Handle<Name> GetName() {
173 if (name_.is_null()) { 175 if (name_.is_null()) {
174 DCHECK(IsElement()); 176 DCHECK(IsElement());
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 enum class InterceptorState { 255 enum class InterceptorState {
254 kUninitialized, 256 kUninitialized,
255 kSkipNonMasking, 257 kSkipNonMasking,
256 kProcessNonMasking 258 kProcessNonMasking
257 }; 259 };
258 260
259 Handle<Map> GetReceiverMap() const; 261 Handle<Map> GetReceiverMap() const;
260 262
261 MUST_USE_RESULT inline JSReceiver* NextHolder(Map* map); 263 MUST_USE_RESULT inline JSReceiver* NextHolder(Map* map);
262 inline State LookupInHolder(Map* map, JSReceiver* holder); 264 inline State LookupInHolder(Map* map, JSReceiver* holder);
263 void RestartLookupForNonMaskingInterceptors(); 265 void RestartLookupForNonMaskingInterceptors() {
266 RestartInternal(InterceptorState::kProcessNonMasking);
267 }
268 void RestartInternal(InterceptorState interceptor_state);
264 State LookupNonMaskingInterceptorInHolder(Map* map, JSReceiver* holder); 269 State LookupNonMaskingInterceptorInHolder(Map* map, JSReceiver* holder);
265 Handle<Object> FetchValue() const; 270 Handle<Object> FetchValue() const;
266 void ReloadPropertyInformation(); 271 void ReloadPropertyInformation();
267 bool SkipInterceptor(JSObject* holder); 272 bool SkipInterceptor(JSObject* holder);
268 bool HasInterceptor(Map* map) const; 273 bool HasInterceptor(Map* map) const;
269 bool InternalHolderIsReceiverOrHiddenPrototype() const; 274 bool InternalHolderIsReceiverOrHiddenPrototype() const;
270 InterceptorInfo* GetInterceptor(JSObject* holder) const; 275 InterceptorInfo* GetInterceptor(JSObject* holder) const;
271 276
272 bool check_hidden() const { return (configuration_ & kHidden) != 0; } 277 bool check_hidden() const { return (configuration_ & kHidden) != 0; }
273 bool check_interceptor() const { 278 bool check_interceptor() const {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 Handle<Map> holder_map_; 322 Handle<Map> holder_map_;
318 const Handle<JSReceiver> initial_holder_; 323 const Handle<JSReceiver> initial_holder_;
319 uint32_t number_; 324 uint32_t number_;
320 }; 325 };
321 326
322 327
323 } // namespace internal 328 } // namespace internal
324 } // namespace v8 329 } // namespace v8
325 330
326 #endif // V8_LOOKUP_H_ 331 #endif // V8_LOOKUP_H_
OLDNEW
« no previous file with comments | « no previous file | src/lookup.cc » ('j') | src/lookup.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698