OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 4699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4710 // If the accessor in the prototype has the READ_ONLY property attribute, then | 4710 // If the accessor in the prototype has the READ_ONLY property attribute, then |
4711 // a new value is added to the local object when the property is set. | 4711 // a new value is added to the local object when the property is set. |
4712 // This shadows the accessor in the prototype. | 4712 // This shadows the accessor in the prototype. |
4713 class AccessorInfo: public Struct { | 4713 class AccessorInfo: public Struct { |
4714 public: | 4714 public: |
4715 DECL_ACCESSORS(getter, Object) | 4715 DECL_ACCESSORS(getter, Object) |
4716 DECL_ACCESSORS(setter, Object) | 4716 DECL_ACCESSORS(setter, Object) |
4717 DECL_ACCESSORS(data, Object) | 4717 DECL_ACCESSORS(data, Object) |
4718 DECL_ACCESSORS(name, Object) | 4718 DECL_ACCESSORS(name, Object) |
4719 DECL_ACCESSORS(flag, Smi) | 4719 DECL_ACCESSORS(flag, Smi) |
| 4720 DECL_ACCESSORS(load_stub_cache, Object) |
4720 | 4721 |
4721 inline bool all_can_read(); | 4722 inline bool all_can_read(); |
4722 inline void set_all_can_read(bool value); | 4723 inline void set_all_can_read(bool value); |
4723 | 4724 |
4724 inline bool all_can_write(); | 4725 inline bool all_can_write(); |
4725 inline void set_all_can_write(bool value); | 4726 inline void set_all_can_write(bool value); |
4726 | 4727 |
4727 inline bool prohibits_overwriting(); | 4728 inline bool prohibits_overwriting(); |
4728 inline void set_prohibits_overwriting(bool value); | 4729 inline void set_prohibits_overwriting(bool value); |
4729 | 4730 |
4730 inline PropertyAttributes property_attributes(); | 4731 inline PropertyAttributes property_attributes(); |
4731 inline void set_property_attributes(PropertyAttributes attributes); | 4732 inline void set_property_attributes(PropertyAttributes attributes); |
4732 | 4733 |
4733 static inline AccessorInfo* cast(Object* obj); | 4734 static inline AccessorInfo* cast(Object* obj); |
4734 | 4735 |
4735 #ifdef DEBUG | 4736 #ifdef DEBUG |
4736 void AccessorInfoPrint(); | 4737 void AccessorInfoPrint(); |
4737 void AccessorInfoVerify(); | 4738 void AccessorInfoVerify(); |
4738 #endif | 4739 #endif |
4739 | 4740 |
4740 static const int kGetterOffset = HeapObject::kHeaderSize; | 4741 static const int kGetterOffset = HeapObject::kHeaderSize; |
4741 static const int kSetterOffset = kGetterOffset + kPointerSize; | 4742 static const int kSetterOffset = kGetterOffset + kPointerSize; |
4742 static const int kDataOffset = kSetterOffset + kPointerSize; | 4743 static const int kDataOffset = kSetterOffset + kPointerSize; |
4743 static const int kNameOffset = kDataOffset + kPointerSize; | 4744 static const int kNameOffset = kDataOffset + kPointerSize; |
4744 static const int kFlagOffset = kNameOffset + kPointerSize; | 4745 static const int kFlagOffset = kNameOffset + kPointerSize; |
4745 static const int kSize = kFlagOffset + kPointerSize; | 4746 static const int kLoadStubCacheOffset = kFlagOffset + kPointerSize; |
| 4747 static const int kSize = kLoadStubCacheOffset + kPointerSize; |
4746 | 4748 |
4747 private: | 4749 private: |
4748 // Bit positions in flag. | 4750 // Bit positions in flag. |
4749 static const int kAllCanReadBit = 0; | 4751 static const int kAllCanReadBit = 0; |
4750 static const int kAllCanWriteBit = 1; | 4752 static const int kAllCanWriteBit = 1; |
4751 static const int kProhibitsOverwritingBit = 2; | 4753 static const int kProhibitsOverwritingBit = 2; |
4752 class AttributesField: public BitField<PropertyAttributes, 3, 3> {}; | 4754 class AttributesField: public BitField<PropertyAttributes, 3, 3> {}; |
4753 | 4755 |
4754 DISALLOW_IMPLICIT_CONSTRUCTORS(AccessorInfo); | 4756 DISALLOW_IMPLICIT_CONSTRUCTORS(AccessorInfo); |
4755 }; | 4757 }; |
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5142 } else { | 5144 } else { |
5143 value &= ~(1 << bit_position); | 5145 value &= ~(1 << bit_position); |
5144 } | 5146 } |
5145 return value; | 5147 return value; |
5146 } | 5148 } |
5147 }; | 5149 }; |
5148 | 5150 |
5149 } } // namespace v8::internal | 5151 } } // namespace v8::internal |
5150 | 5152 |
5151 #endif // V8_OBJECTS_H_ | 5153 #endif // V8_OBJECTS_H_ |
OLD | NEW |