| OLD | NEW |
| 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 Loading... |
| 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 | |
| 167 Isolate* isolate() const { return isolate_; } | 165 Isolate* isolate() const { return isolate_; } |
| 168 State state() const { return state_; } | 166 State state() const { return state_; } |
| 169 | 167 |
| 170 Handle<Name> name() const { | 168 Handle<Name> name() const { |
| 171 DCHECK(!IsElement()); | 169 DCHECK(!IsElement()); |
| 172 return name_; | 170 return name_; |
| 173 } | 171 } |
| 174 Handle<Name> GetName() { | 172 Handle<Name> GetName() { |
| 175 if (name_.is_null()) { | 173 if (name_.is_null()) { |
| 176 DCHECK(IsElement()); | 174 DCHECK(IsElement()); |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 enum class InterceptorState { | 253 enum class InterceptorState { |
| 256 kUninitialized, | 254 kUninitialized, |
| 257 kSkipNonMasking, | 255 kSkipNonMasking, |
| 258 kProcessNonMasking | 256 kProcessNonMasking |
| 259 }; | 257 }; |
| 260 | 258 |
| 261 Handle<Map> GetReceiverMap() const; | 259 Handle<Map> GetReceiverMap() const; |
| 262 | 260 |
| 263 MUST_USE_RESULT inline JSReceiver* NextHolder(Map* map); | 261 MUST_USE_RESULT inline JSReceiver* NextHolder(Map* map); |
| 264 inline State LookupInHolder(Map* map, JSReceiver* holder); | 262 inline State LookupInHolder(Map* map, JSReceiver* holder); |
| 265 void RestartLookupForNonMaskingInterceptors() { | 263 void RestartLookupForNonMaskingInterceptors(); |
| 266 RestartInternal(InterceptorState::kProcessNonMasking); | |
| 267 } | |
| 268 void RestartInternal(InterceptorState interceptor_state); | |
| 269 State LookupNonMaskingInterceptorInHolder(Map* map, JSReceiver* holder); | 264 State LookupNonMaskingInterceptorInHolder(Map* map, JSReceiver* holder); |
| 270 Handle<Object> FetchValue() const; | 265 Handle<Object> FetchValue() const; |
| 271 void ReloadPropertyInformation(); | 266 void ReloadPropertyInformation(); |
| 272 bool SkipInterceptor(JSObject* holder); | 267 bool SkipInterceptor(JSObject* holder); |
| 273 bool HasInterceptor(Map* map) const; | 268 bool HasInterceptor(Map* map) const; |
| 274 bool InternalHolderIsReceiverOrHiddenPrototype() const; | 269 bool InternalHolderIsReceiverOrHiddenPrototype() const; |
| 275 InterceptorInfo* GetInterceptor(JSObject* holder) const; | 270 InterceptorInfo* GetInterceptor(JSObject* holder) const; |
| 276 | 271 |
| 277 bool check_hidden() const { return (configuration_ & kHidden) != 0; } | 272 bool check_hidden() const { return (configuration_ & kHidden) != 0; } |
| 278 bool check_interceptor() const { | 273 bool check_interceptor() const { |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 Handle<Map> holder_map_; | 317 Handle<Map> holder_map_; |
| 323 const Handle<JSReceiver> initial_holder_; | 318 const Handle<JSReceiver> initial_holder_; |
| 324 uint32_t number_; | 319 uint32_t number_; |
| 325 }; | 320 }; |
| 326 | 321 |
| 327 | 322 |
| 328 } // namespace internal | 323 } // namespace internal |
| 329 } // namespace v8 | 324 } // namespace v8 |
| 330 | 325 |
| 331 #endif // V8_LOOKUP_H_ | 326 #endif // V8_LOOKUP_H_ |
| OLD | NEW |