| 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 return Handle<Map>::cast(transition_); | 199 return Handle<Map>::cast(transition_); |
| 200 } | 200 } |
| 201 template <class T> | 201 template <class T> |
| 202 Handle<T> GetHolder() const { | 202 Handle<T> GetHolder() const { |
| 203 DCHECK(IsFound()); | 203 DCHECK(IsFound()); |
| 204 return Handle<T>::cast(holder_); | 204 return Handle<T>::cast(holder_); |
| 205 } | 205 } |
| 206 | 206 |
| 207 bool HolderIsReceiverOrHiddenPrototype() const; | 207 bool HolderIsReceiverOrHiddenPrototype() const; |
| 208 | 208 |
| 209 bool check_prototype_chain() const { |
| 210 return (configuration_ & kPrototypeChain) != 0; |
| 211 } |
| 212 |
| 209 /* ACCESS_CHECK */ | 213 /* ACCESS_CHECK */ |
| 210 bool HasAccess() const; | 214 bool HasAccess() const; |
| 211 | 215 |
| 212 /* PROPERTY */ | 216 /* PROPERTY */ |
| 213 void PrepareForDataProperty(Handle<Object> value); | 217 void PrepareForDataProperty(Handle<Object> value); |
| 214 void PrepareTransitionToDataProperty(Handle<Object> value, | 218 void PrepareTransitionToDataProperty(Handle<Object> value, |
| 215 PropertyAttributes attributes, | 219 PropertyAttributes attributes, |
| 216 Object::StoreFromKeyed store_mode); | 220 Object::StoreFromKeyed store_mode); |
| 217 bool IsCacheableTransition() { | 221 bool IsCacheableTransition() { |
| 218 if (state_ != TRANSITION) return false; | 222 if (state_ != TRANSITION) return false; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 bool InternalHolderIsReceiverOrHiddenPrototype() const; | 280 bool InternalHolderIsReceiverOrHiddenPrototype() const; |
| 277 inline InterceptorInfo* GetInterceptor(JSObject* holder) const { | 281 inline InterceptorInfo* GetInterceptor(JSObject* holder) const { |
| 278 if (IsElement()) return holder->GetIndexedInterceptor(); | 282 if (IsElement()) return holder->GetIndexedInterceptor(); |
| 279 return holder->GetNamedInterceptor(); | 283 return holder->GetNamedInterceptor(); |
| 280 } | 284 } |
| 281 | 285 |
| 282 bool check_hidden() const { return (configuration_ & kHidden) != 0; } | 286 bool check_hidden() const { return (configuration_ & kHidden) != 0; } |
| 283 bool check_interceptor() const { | 287 bool check_interceptor() const { |
| 284 return (configuration_ & kInterceptor) != 0; | 288 return (configuration_ & kInterceptor) != 0; |
| 285 } | 289 } |
| 286 bool check_prototype_chain() const { | |
| 287 return (configuration_ & kPrototypeChain) != 0; | |
| 288 } | |
| 289 int descriptor_number() const { | 290 int descriptor_number() const { |
| 290 DCHECK(has_property_); | 291 DCHECK(has_property_); |
| 291 DCHECK(!holder_map_->is_dictionary_map()); | 292 DCHECK(!holder_map_->is_dictionary_map()); |
| 292 return number_; | 293 return number_; |
| 293 } | 294 } |
| 294 int dictionary_entry() const { | 295 int dictionary_entry() const { |
| 295 DCHECK(has_property_); | 296 DCHECK(has_property_); |
| 296 DCHECK(holder_map_->is_dictionary_map()); | 297 DCHECK(holder_map_->is_dictionary_map()); |
| 297 return number_; | 298 return number_; |
| 298 } | 299 } |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 Handle<Map> holder_map_; | 337 Handle<Map> holder_map_; |
| 337 const Handle<JSReceiver> initial_holder_; | 338 const Handle<JSReceiver> initial_holder_; |
| 338 uint32_t number_; | 339 uint32_t number_; |
| 339 }; | 340 }; |
| 340 | 341 |
| 341 | 342 |
| 342 } // namespace internal | 343 } // namespace internal |
| 343 } // namespace v8 | 344 } // namespace v8 |
| 344 | 345 |
| 345 #endif // V8_LOOKUP_H_ | 346 #endif // V8_LOOKUP_H_ |
| OLD | NEW |