28 #ifndef V8_PROPERTY_DETAILS_H_
29 #define V8_PROPERTY_DETAILS_H_
31 #include "../include/v8.h"
82 ASSERT(TypeField::is_valid(type));
83 ASSERT(AttributesField::is_valid(attributes));
84 ASSERT(StorageField::is_valid(index));
86 value_ = TypeField::encode(type)
87 | AttributesField::encode(attributes)
88 | StorageField::encode(index);
91 ASSERT(attributes == this->attributes());
92 ASSERT(index == this->index());
96 explicit inline PropertyDetails(
Smi* smi);
103 int index() {
return StorageField::decode(value_); }
105 inline PropertyDetails AsDeleted();
108 return StorageField::is_valid(index);
114 bool IsDeleted() {
return DeletedField::decode(value_) != 0;}
118 class TypeField:
public BitField<PropertyType, 0, 4> {};
123 static const int kInitialIndex = 1;
131 #endif // V8_PROPERTY_DETAILS_H_
PropertyDetails(PropertyAttributes attributes, PropertyType type, int index=0)
#define ASSERT(condition)
static bool IsValidIndex(int index)
PropertyAttributes attributes()