Index: src/objects.h |
diff --git a/src/objects.h b/src/objects.h |
index e89efdf471a5d624595e45acf7c074a824bc66a2..39dc89b4dc89e0017c95546c2d530d46cf3ca017 100644 |
--- a/src/objects.h |
+++ b/src/objects.h |
@@ -8786,13 +8786,11 @@ class Name: public HeapObject { |
STATIC_CHECK((kArrayIndexLengthBits > 0)); |
- static const int kArrayIndexHashLengthShift = |
- kArrayIndexValueBits + kNofHashBitFields; |
- |
- static const int kArrayIndexHashMask = (1 << kArrayIndexHashLengthShift) - 1; |
- |
- static const int kArrayIndexValueMask = |
- ((1 << kArrayIndexValueBits) - 1) << kHashShift; |
+ class ArrayIndexValueBits : public BitField<unsigned int, kNofHashBitFields, |
+ kArrayIndexValueBits> {}; |
+ class ArrayIndexLengthBits : public BitField<unsigned int, |
+ kNofHashBitFields + kArrayIndexValueBits, |
+ kArrayIndexLengthBits> {}; |
// Check that kMaxCachedArrayIndexLength + 1 is a power of two so we |
// could use a mask to test if the length of string is less than or equal to |
@@ -8800,7 +8798,7 @@ class Name: public HeapObject { |
STATIC_CHECK(IS_POWER_OF_TWO(kMaxCachedArrayIndexLength + 1)); |
static const unsigned int kContainsCachedArrayIndexMask = |
- (~kMaxCachedArrayIndexLength << kArrayIndexHashLengthShift) | |
+ (~kMaxCachedArrayIndexLength << ArrayIndexLengthBits::kShift) | |
kIsNotArrayIndexMask; |
// Value of empty hash field indicating that the hash is not computed. |