| Index: src/property-details.h
|
| diff --git a/src/property-details.h b/src/property-details.h
|
| index f025f152b7f02c46d641ba53f1b9f6a59d8336b0..36c449667a3f4dc2f8a821fc5365ebd32a845c17 100644
|
| --- a/src/property-details.h
|
| +++ b/src/property-details.h
|
| @@ -149,20 +149,21 @@ class PropertyDetails BASE_EMBEDDED {
|
| public:
|
| PropertyDetails(PropertyAttributes attributes,
|
| PropertyType type,
|
| - Representation representation,
|
| - int index = 0) {
|
| + int index) {
|
| value_ = TypeField::encode(type)
|
| | AttributesField::encode(attributes)
|
| - | RepresentationField::encode(EncodeRepresentation(representation))
|
| | DictionaryStorageField::encode(index);
|
|
|
| ASSERT(type == this->type());
|
| ASSERT(attributes == this->attributes());
|
| - if (representation.IsNone()) {
|
| - ASSERT(index == this->dictionary_index());
|
| - } else {
|
| - ASSERT(index == this->descriptor_index());
|
| - }
|
| + }
|
| +
|
| + PropertyDetails(PropertyAttributes attributes,
|
| + PropertyType type,
|
| + Representation representation) {
|
| + value_ = TypeField::encode(type)
|
| + | AttributesField::encode(attributes)
|
| + | RepresentationField::encode(EncodeRepresentation(representation));
|
| }
|
|
|
| int pointer() { return DescriptorPointer::decode(value_); }
|
| @@ -178,17 +179,10 @@ class PropertyDetails BASE_EMBEDDED {
|
| inline Smi* AsSmi();
|
|
|
| static uint8_t EncodeRepresentation(Representation representation) {
|
| - ASSERT(representation.kind() <= Representation::kTagged);
|
| - if (representation.kind() < Representation::kInteger32) {
|
| - return representation.kind();
|
| - } else {
|
| - return representation.kind() - 1;
|
| - }
|
| + return representation.kind();
|
| }
|
|
|
| static Representation DecodeRepresentation(uint32_t bits) {
|
| - ASSERT(bits <= Representation::kTagged);
|
| - if (bits >= Representation::kInteger32) bits += 1;
|
| return Representation::FromKind(static_cast<Representation::Kind>(bits));
|
| }
|
|
|
| @@ -202,10 +196,6 @@ class PropertyDetails BASE_EMBEDDED {
|
| return DictionaryStorageField::decode(value_);
|
| }
|
|
|
| - int descriptor_index() {
|
| - return DescriptorStorageField::decode(value_);
|
| - }
|
| -
|
| Representation representation() {
|
| return DecodeRepresentation(RepresentationField::decode(value_));
|
| }
|
| @@ -227,9 +217,8 @@ class PropertyDetails BASE_EMBEDDED {
|
| 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> {};
|
| - class RepresentationField: public BitField<uint32_t, 29, 2> {};
|
| + class DescriptorPointer: public BitField<uint32_t, 7, 11> {};
|
| + class RepresentationField: public BitField<uint32_t, 18, 3> {};
|
|
|
| static const int kInitialIndex = 1;
|
|
|
|
|