5 #ifndef V8_OBJECTS_PROPERTY_DESCRIPTOR_OBJECT_H_ 6 #define V8_OBJECTS_PROPERTY_DESCRIPTOR_OBJECT_H_ 8 #include "src/objects.h" 9 #include "src/objects/fixed-array.h" 12 #include "src/objects/object-macros.h" 19 #define FLAGS_BIT_FIELDS(V, _) \ 20 V(IsEnumerableBit, bool, 1, _) \ 21 V(HasEnumerableBit, bool, 1, _) \ 22 V(IsConfigurableBit, bool, 1, _) \ 23 V(HasConfigurableBit, bool, 1, _) \ 24 V(IsWritableBit, bool, 1, _) \ 25 V(HasWritableBit, bool, 1, _) \ 26 V(HasValueBit, bool, 1, _) \ 27 V(HasGetBit, bool, 1, _) \ 28 V(HasSetBit, bool, 1, _) 30 DEFINE_BIT_FIELDS(FLAGS_BIT_FIELDS)
31 #undef FLAGS_BIT_FIELDS 33 enum { kFlagsIndex, kValueIndex, kGetIndex, kSetIndex, kLength };
37 static const int kRegularAccessorPropertyBits =
38 HasEnumerableBit::kMask | HasConfigurableBit::kMask | HasGetBit::kMask |
41 static const int kRegularDataPropertyBits =
42 HasEnumerableBit::kMask | HasConfigurableBit::kMask |
43 HasWritableBit::kMask | HasValueBit::kMask;
45 static const int kHasMask = HasEnumerableBit::kMask |
46 HasConfigurableBit::kMask |
47 HasWritableBit::kMask | HasValueBit::kMask |
48 HasGetBit::kMask | HasSetBit::kMask;
50 static const int kValueOffset =
51 FixedArray::OffsetOfElementAt(PropertyDescriptorObject::kValueIndex);
52 static const int kFlagsOffset =
53 FixedArray::OffsetOfElementAt(PropertyDescriptorObject::kFlagsIndex);
54 static const int kGetOffset =
55 FixedArray::OffsetOfElementAt(PropertyDescriptorObject::kGetIndex);
56 static const int kSetOffset =
57 FixedArray::OffsetOfElementAt(PropertyDescriptorObject::kSetIndex);
65 #include "src/objects/object-macros-undef.h" 67 #endif // V8_OBJECTS_PROPERTY_DESCRIPTOR_OBJECT_H_