| 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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 bool HolderIsReceiverOrHiddenPrototype() const; | 203 bool HolderIsReceiverOrHiddenPrototype() const; |
| 204 | 204 |
| 205 bool check_prototype_chain() const { | 205 bool check_prototype_chain() const { |
| 206 return (configuration_ & kPrototypeChain) != 0; | 206 return (configuration_ & kPrototypeChain) != 0; |
| 207 } | 207 } |
| 208 | 208 |
| 209 /* ACCESS_CHECK */ | 209 /* ACCESS_CHECK */ |
| 210 bool HasAccess() const; | 210 bool HasAccess() const; |
| 211 | 211 |
| 212 /* PROPERTY */ | 212 /* PROPERTY */ |
| 213 bool ExtendingNonExtensible(Handle<JSObject> receiver) { |
| 214 DCHECK(receiver.is_identical_to(GetStoreTarget())); |
| 215 return !receiver->map()->is_extensible() && |
| 216 (IsElement() || !isolate_->IsInternallyUsedPropertyName(name_)); |
| 217 } |
| 213 void PrepareForDataProperty(Handle<Object> value); | 218 void PrepareForDataProperty(Handle<Object> value); |
| 214 void PrepareTransitionToDataProperty(Handle<Object> value, | 219 void PrepareTransitionToDataProperty(Handle<JSObject> receiver, |
| 220 Handle<Object> value, |
| 215 PropertyAttributes attributes, | 221 PropertyAttributes attributes, |
| 216 Object::StoreFromKeyed store_mode); | 222 Object::StoreFromKeyed store_mode); |
| 217 bool IsCacheableTransition() { | 223 bool IsCacheableTransition() { |
| 218 if (state_ != TRANSITION) return false; | 224 DCHECK_EQ(TRANSITION, state_); |
| 219 return transition_->IsPropertyCell() || | 225 return transition_->IsPropertyCell() || |
| 220 (!transition_map()->is_dictionary_map() && | 226 (!transition_map()->is_dictionary_map() && |
| 221 transition_map()->GetBackPointer()->IsMap()); | 227 transition_map()->GetBackPointer()->IsMap()); |
| 222 } | 228 } |
| 223 void ApplyTransitionToDataProperty(); | 229 void ApplyTransitionToDataProperty(Handle<JSObject> receiver); |
| 224 void ReconfigureDataProperty(Handle<Object> value, | 230 void ReconfigureDataProperty(Handle<Object> value, |
| 225 PropertyAttributes attributes); | 231 PropertyAttributes attributes); |
| 226 void Delete(); | 232 void Delete(); |
| 227 void TransitionToAccessorProperty(AccessorComponent component, | 233 void TransitionToAccessorProperty(AccessorComponent component, |
| 228 Handle<Object> accessor, | 234 Handle<Object> accessor, |
| 229 PropertyAttributes attributes); | 235 PropertyAttributes attributes); |
| 230 void TransitionToAccessorPair(Handle<Object> pair, | 236 void TransitionToAccessorPair(Handle<Object> pair, |
| 231 PropertyAttributes attributes); | 237 PropertyAttributes attributes); |
| 232 PropertyDetails property_details() const { | 238 PropertyDetails property_details() const { |
| 233 DCHECK(has_property_); | 239 DCHECK(has_property_); |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 Handle<Map> holder_map_; | 342 Handle<Map> holder_map_; |
| 337 const Handle<JSReceiver> initial_holder_; | 343 const Handle<JSReceiver> initial_holder_; |
| 338 uint32_t number_; | 344 uint32_t number_; |
| 339 }; | 345 }; |
| 340 | 346 |
| 341 | 347 |
| 342 } // namespace internal | 348 } // namespace internal |
| 343 } // namespace v8 | 349 } // namespace v8 |
| 344 | 350 |
| 345 #endif // V8_LOOKUP_H_ | 351 #endif // V8_LOOKUP_H_ |
| OLD | NEW |