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 4690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4701 // If the accessor in the prototype has the READ_ONLY property attribute, then | 4701 // If the accessor in the prototype has the READ_ONLY property attribute, then |
4702 // a new value is added to the local object when the property is set. | 4702 // a new value is added to the local object when the property is set. |
4703 // This shadows the accessor in the prototype. | 4703 // This shadows the accessor in the prototype. |
4704 class AccessorInfo: public Struct { | 4704 class AccessorInfo: public Struct { |
4705 public: | 4705 public: |
4706 DECL_ACCESSORS(getter, Object) | 4706 DECL_ACCESSORS(getter, Object) |
4707 DECL_ACCESSORS(setter, Object) | 4707 DECL_ACCESSORS(setter, Object) |
4708 DECL_ACCESSORS(data, Object) | 4708 DECL_ACCESSORS(data, Object) |
4709 DECL_ACCESSORS(name, Object) | 4709 DECL_ACCESSORS(name, Object) |
4710 DECL_ACCESSORS(flag, Smi) | 4710 DECL_ACCESSORS(flag, Smi) |
4711 DECL_ACCESSORS(load_stub_cache, Object) | |
4712 | 4711 |
4713 inline bool all_can_read(); | 4712 inline bool all_can_read(); |
4714 inline void set_all_can_read(bool value); | 4713 inline void set_all_can_read(bool value); |
4715 | 4714 |
4716 inline bool all_can_write(); | 4715 inline bool all_can_write(); |
4717 inline void set_all_can_write(bool value); | 4716 inline void set_all_can_write(bool value); |
4718 | 4717 |
4719 inline bool prohibits_overwriting(); | 4718 inline bool prohibits_overwriting(); |
4720 inline void set_prohibits_overwriting(bool value); | 4719 inline void set_prohibits_overwriting(bool value); |
4721 | 4720 |
4722 inline PropertyAttributes property_attributes(); | 4721 inline PropertyAttributes property_attributes(); |
4723 inline void set_property_attributes(PropertyAttributes attributes); | 4722 inline void set_property_attributes(PropertyAttributes attributes); |
4724 | 4723 |
4725 static inline AccessorInfo* cast(Object* obj); | 4724 static inline AccessorInfo* cast(Object* obj); |
4726 | 4725 |
4727 #ifdef DEBUG | 4726 #ifdef DEBUG |
4728 void AccessorInfoPrint(); | 4727 void AccessorInfoPrint(); |
4729 void AccessorInfoVerify(); | 4728 void AccessorInfoVerify(); |
4730 #endif | 4729 #endif |
4731 | 4730 |
4732 static const int kGetterOffset = HeapObject::kHeaderSize; | 4731 static const int kGetterOffset = HeapObject::kHeaderSize; |
4733 static const int kSetterOffset = kGetterOffset + kPointerSize; | 4732 static const int kSetterOffset = kGetterOffset + kPointerSize; |
4734 static const int kDataOffset = kSetterOffset + kPointerSize; | 4733 static const int kDataOffset = kSetterOffset + kPointerSize; |
4735 static const int kNameOffset = kDataOffset + kPointerSize; | 4734 static const int kNameOffset = kDataOffset + kPointerSize; |
4736 static const int kFlagOffset = kNameOffset + kPointerSize; | 4735 static const int kFlagOffset = kNameOffset + kPointerSize; |
4737 static const int kLoadStubCacheOffset = kFlagOffset + kPointerSize; | 4736 static const int kSize = kFlagOffset + kPointerSize; |
4738 static const int kSize = kLoadStubCacheOffset + kPointerSize; | |
4739 | 4737 |
4740 private: | 4738 private: |
4741 // Bit positions in flag. | 4739 // Bit positions in flag. |
4742 static const int kAllCanReadBit = 0; | 4740 static const int kAllCanReadBit = 0; |
4743 static const int kAllCanWriteBit = 1; | 4741 static const int kAllCanWriteBit = 1; |
4744 static const int kProhibitsOverwritingBit = 2; | 4742 static const int kProhibitsOverwritingBit = 2; |
4745 class AttributesField: public BitField<PropertyAttributes, 3, 3> {}; | 4743 class AttributesField: public BitField<PropertyAttributes, 3, 3> {}; |
4746 | 4744 |
4747 DISALLOW_IMPLICIT_CONSTRUCTORS(AccessorInfo); | 4745 DISALLOW_IMPLICIT_CONSTRUCTORS(AccessorInfo); |
4748 }; | 4746 }; |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5133 } else { | 5131 } else { |
5134 value &= ~(1 << bit_position); | 5132 value &= ~(1 << bit_position); |
5135 } | 5133 } |
5136 return value; | 5134 return value; |
5137 } | 5135 } |
5138 }; | 5136 }; |
5139 | 5137 |
5140 } } // namespace v8::internal | 5138 } } // namespace v8::internal |
5141 | 5139 |
5142 #endif // V8_OBJECTS_H_ | 5140 #endif // V8_OBJECTS_H_ |
OLD | NEW |