| Index: src/property-details.h
|
| diff --git a/src/property-details.h b/src/property-details.h
|
| index 51b889a6670f22df4f107712ed079cfa383ff531..b8fbb3c92a8d413822c6d1bb3ea23d14d20524c9 100644
|
| --- a/src/property-details.h
|
| +++ b/src/property-details.h
|
| @@ -77,19 +77,19 @@ class PropertyDetails BASE_EMBEDDED {
|
| PropertyDetails(PropertyAttributes attributes,
|
| PropertyType type,
|
| int index = 0) {
|
| - ASSERT(TypeField::is_valid(type));
|
| - ASSERT(AttributesField::is_valid(attributes));
|
| - ASSERT(StorageField::is_valid(index));
|
| -
|
| value_ = TypeField::encode(type)
|
| | AttributesField::encode(attributes)
|
| - | StorageField::encode(index);
|
| + | DictionaryStorageField::encode(index);
|
|
|
| ASSERT(type == this->type());
|
| ASSERT(attributes == this->attributes());
|
| - ASSERT(index == this->index());
|
| + ASSERT(index == this->dictionary_index());
|
| }
|
|
|
| + int pointer() { return DescriptorPointer::decode(value_); }
|
| +
|
| + PropertyDetails set_pointer(int i) { return PropertyDetails(value_, i); }
|
| +
|
| // Conversion for storing details as Object*.
|
| explicit inline PropertyDetails(Smi* smi);
|
| inline Smi* AsSmi();
|
| @@ -98,12 +98,18 @@ class PropertyDetails BASE_EMBEDDED {
|
|
|
| PropertyAttributes attributes() { return AttributesField::decode(value_); }
|
|
|
| - int index() { return StorageField::decode(value_); }
|
| + int dictionary_index() {
|
| + return DictionaryStorageField::decode(value_);
|
| + }
|
| +
|
| + int descriptor_index() {
|
| + return DescriptorStorageField::decode(value_);
|
| + }
|
|
|
| inline PropertyDetails AsDeleted();
|
|
|
| static bool IsValidIndex(int index) {
|
| - return StorageField::is_valid(index);
|
| + return DictionaryStorageField::is_valid(index);
|
| }
|
|
|
| bool IsReadOnly() { return (attributes() & READ_ONLY) != 0; }
|
| @@ -113,14 +119,20 @@ class PropertyDetails BASE_EMBEDDED {
|
|
|
| // Bit fields in value_ (type, shift, size). Must be public so the
|
| // constants can be embedded in generated code.
|
| - class TypeField: public BitField<PropertyType, 0, 3> {};
|
| - class AttributesField: public BitField<PropertyAttributes, 3, 3> {};
|
| - class DeletedField: public BitField<uint32_t, 6, 1> {};
|
| - class StorageField: public BitField<uint32_t, 7, 32-7> {};
|
| + class TypeField: public BitField<PropertyType, 0, 3> {};
|
| + class AttributesField: public BitField<PropertyAttributes, 3, 3> {};
|
| + class DeletedField: public BitField<uint32_t, 6, 1> {};
|
| + class DictionaryStorageField: public BitField<uint32_t, 7, 24> {};
|
| + class DescriptorStorageField: public BitField<uint32_t, 7, 11> {};
|
| + class DescriptorPointer: public BitField<uint32_t, 18, 11> {};
|
|
|
| static const int kInitialIndex = 1;
|
|
|
| private:
|
| + PropertyDetails(int value, int pointer) {
|
| + value_ = DescriptorPointer::update(value, pointer);
|
| + }
|
| +
|
| uint32_t value_;
|
| };
|
|
|
|
|