| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
| 6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
| 7 | 7 |
| 8 #include <iosfwd> | 8 #include <iosfwd> |
| 9 | 9 |
| 10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
| (...skipping 10498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10509 DECL_ACCESSORS(name, Object) | 10509 DECL_ACCESSORS(name, Object) |
| 10510 DECL_ACCESSORS(flag, Smi) | 10510 DECL_ACCESSORS(flag, Smi) |
| 10511 DECL_ACCESSORS(expected_receiver_type, Object) | 10511 DECL_ACCESSORS(expected_receiver_type, Object) |
| 10512 | 10512 |
| 10513 inline bool all_can_read(); | 10513 inline bool all_can_read(); |
| 10514 inline void set_all_can_read(bool value); | 10514 inline void set_all_can_read(bool value); |
| 10515 | 10515 |
| 10516 inline bool all_can_write(); | 10516 inline bool all_can_write(); |
| 10517 inline void set_all_can_write(bool value); | 10517 inline void set_all_can_write(bool value); |
| 10518 | 10518 |
| 10519 inline bool is_special_data_property(); | |
| 10520 inline void set_is_special_data_property(bool value); | |
| 10521 | |
| 10522 inline PropertyAttributes property_attributes(); | 10519 inline PropertyAttributes property_attributes(); |
| 10523 inline void set_property_attributes(PropertyAttributes attributes); | 10520 inline void set_property_attributes(PropertyAttributes attributes); |
| 10524 | 10521 |
| 10525 // Checks whether the given receiver is compatible with this accessor. | 10522 // Checks whether the given receiver is compatible with this accessor. |
| 10526 static bool IsCompatibleReceiverMap(Isolate* isolate, | 10523 static bool IsCompatibleReceiverMap(Isolate* isolate, |
| 10527 Handle<AccessorInfo> info, | 10524 Handle<AccessorInfo> info, |
| 10528 Handle<Map> map); | 10525 Handle<Map> map); |
| 10529 inline bool IsCompatibleReceiver(Object* receiver); | 10526 inline bool IsCompatibleReceiver(Object* receiver); |
| 10530 | 10527 |
| 10531 DECLARE_CAST(AccessorInfo) | 10528 DECLARE_CAST(AccessorInfo) |
| (...skipping 12 matching lines...) Expand all Loading... |
| 10544 static const int kExpectedReceiverTypeOffset = kFlagOffset + kPointerSize; | 10541 static const int kExpectedReceiverTypeOffset = kFlagOffset + kPointerSize; |
| 10545 static const int kSize = kExpectedReceiverTypeOffset + kPointerSize; | 10542 static const int kSize = kExpectedReceiverTypeOffset + kPointerSize; |
| 10546 | 10543 |
| 10547 private: | 10544 private: |
| 10548 inline bool HasExpectedReceiverType() { | 10545 inline bool HasExpectedReceiverType() { |
| 10549 return expected_receiver_type()->IsFunctionTemplateInfo(); | 10546 return expected_receiver_type()->IsFunctionTemplateInfo(); |
| 10550 } | 10547 } |
| 10551 // Bit positions in flag. | 10548 // Bit positions in flag. |
| 10552 static const int kAllCanReadBit = 0; | 10549 static const int kAllCanReadBit = 0; |
| 10553 static const int kAllCanWriteBit = 1; | 10550 static const int kAllCanWriteBit = 1; |
| 10554 static const int kSpecialDataProperty = 2; | 10551 class AttributesField: public BitField<PropertyAttributes, 2, 3> {}; |
| 10555 class AttributesField : public BitField<PropertyAttributes, 3, 3> {}; | |
| 10556 | 10552 |
| 10557 DISALLOW_IMPLICIT_CONSTRUCTORS(AccessorInfo); | 10553 DISALLOW_IMPLICIT_CONSTRUCTORS(AccessorInfo); |
| 10558 }; | 10554 }; |
| 10559 | 10555 |
| 10560 | 10556 |
| 10561 // An accessor must have a getter, but can have no setter. | 10557 // An accessor must have a getter, but can have no setter. |
| 10562 // | 10558 // |
| 10563 // When setting a property, V8 searches accessors in prototypes. | 10559 // When setting a property, V8 searches accessors in prototypes. |
| 10564 // If an accessor was found and it does not have a setter, | 10560 // If an accessor was found and it does not have a setter, |
| 10565 // the request is ignored. | 10561 // the request is ignored. |
| (...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11115 } else { | 11111 } else { |
| 11116 value &= ~(1 << bit_position); | 11112 value &= ~(1 << bit_position); |
| 11117 } | 11113 } |
| 11118 return value; | 11114 return value; |
| 11119 } | 11115 } |
| 11120 }; | 11116 }; |
| 11121 | 11117 |
| 11122 } } // namespace v8::internal | 11118 } } // namespace v8::internal |
| 11123 | 11119 |
| 11124 #endif // V8_OBJECTS_H_ | 11120 #endif // V8_OBJECTS_H_ |
| OLD | NEW |