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 10488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10499 DECL_ACCESSORS(name, Object) | 10499 DECL_ACCESSORS(name, Object) |
10500 DECL_ACCESSORS(flag, Smi) | 10500 DECL_ACCESSORS(flag, Smi) |
10501 DECL_ACCESSORS(expected_receiver_type, Object) | 10501 DECL_ACCESSORS(expected_receiver_type, Object) |
10502 | 10502 |
10503 inline bool all_can_read(); | 10503 inline bool all_can_read(); |
10504 inline void set_all_can_read(bool value); | 10504 inline void set_all_can_read(bool value); |
10505 | 10505 |
10506 inline bool all_can_write(); | 10506 inline bool all_can_write(); |
10507 inline void set_all_can_write(bool value); | 10507 inline void set_all_can_write(bool value); |
10508 | 10508 |
| 10509 inline bool is_special_data_property(); |
| 10510 inline void set_is_special_data_property(bool value); |
| 10511 |
10509 inline PropertyAttributes property_attributes(); | 10512 inline PropertyAttributes property_attributes(); |
10510 inline void set_property_attributes(PropertyAttributes attributes); | 10513 inline void set_property_attributes(PropertyAttributes attributes); |
10511 | 10514 |
10512 // Checks whether the given receiver is compatible with this accessor. | 10515 // Checks whether the given receiver is compatible with this accessor. |
10513 static bool IsCompatibleReceiverMap(Isolate* isolate, | 10516 static bool IsCompatibleReceiverMap(Isolate* isolate, |
10514 Handle<AccessorInfo> info, | 10517 Handle<AccessorInfo> info, |
10515 Handle<Map> map); | 10518 Handle<Map> map); |
10516 inline bool IsCompatibleReceiver(Object* receiver); | 10519 inline bool IsCompatibleReceiver(Object* receiver); |
10517 | 10520 |
10518 DECLARE_CAST(AccessorInfo) | 10521 DECLARE_CAST(AccessorInfo) |
(...skipping 12 matching lines...) Expand all Loading... |
10531 static const int kExpectedReceiverTypeOffset = kFlagOffset + kPointerSize; | 10534 static const int kExpectedReceiverTypeOffset = kFlagOffset + kPointerSize; |
10532 static const int kSize = kExpectedReceiverTypeOffset + kPointerSize; | 10535 static const int kSize = kExpectedReceiverTypeOffset + kPointerSize; |
10533 | 10536 |
10534 private: | 10537 private: |
10535 inline bool HasExpectedReceiverType() { | 10538 inline bool HasExpectedReceiverType() { |
10536 return expected_receiver_type()->IsFunctionTemplateInfo(); | 10539 return expected_receiver_type()->IsFunctionTemplateInfo(); |
10537 } | 10540 } |
10538 // Bit positions in flag. | 10541 // Bit positions in flag. |
10539 static const int kAllCanReadBit = 0; | 10542 static const int kAllCanReadBit = 0; |
10540 static const int kAllCanWriteBit = 1; | 10543 static const int kAllCanWriteBit = 1; |
10541 class AttributesField: public BitField<PropertyAttributes, 2, 3> {}; | 10544 static const int kSpecialDataProperty = 2; |
| 10545 class AttributesField : public BitField<PropertyAttributes, 3, 3> {}; |
10542 | 10546 |
10543 DISALLOW_IMPLICIT_CONSTRUCTORS(AccessorInfo); | 10547 DISALLOW_IMPLICIT_CONSTRUCTORS(AccessorInfo); |
10544 }; | 10548 }; |
10545 | 10549 |
10546 | 10550 |
10547 // An accessor must have a getter, but can have no setter. | 10551 // An accessor must have a getter, but can have no setter. |
10548 // | 10552 // |
10549 // When setting a property, V8 searches accessors in prototypes. | 10553 // When setting a property, V8 searches accessors in prototypes. |
10550 // If an accessor was found and it does not have a setter, | 10554 // If an accessor was found and it does not have a setter, |
10551 // the request is ignored. | 10555 // the request is ignored. |
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11101 } else { | 11105 } else { |
11102 value &= ~(1 << bit_position); | 11106 value &= ~(1 << bit_position); |
11103 } | 11107 } |
11104 return value; | 11108 return value; |
11105 } | 11109 } |
11106 }; | 11110 }; |
11107 | 11111 |
11108 } } // namespace v8::internal | 11112 } } // namespace v8::internal |
11109 | 11113 |
11110 #endif // V8_OBJECTS_H_ | 11114 #endif // V8_OBJECTS_H_ |
OLD | NEW |