Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 277d320588d04ccbdb92a715e6bdc147333beb85..a7b880e4ea8c539d6c70c80fab25f013fa29ce61 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -9668,7 +9668,7 @@ bool String::SlowAsArrayIndex(uint32_t* index) { |
uint32_t field = hash_field(); |
if ((field & kIsNotArrayIndexMask) != 0) return false; |
// Isolate the array index form the full hash field. |
- *index = (kArrayIndexHashMask & field) >> kHashShift; |
+ *index = ArrayIndexValueBits::decode(field); |
return true; |
} else { |
return ComputeArrayIndex(index); |
@@ -9726,8 +9726,8 @@ uint32_t StringHasher::MakeArrayIndexHash(uint32_t value, int length) { |
ASSERT(TenToThe(String::kMaxCachedArrayIndexLength) < |
(1 << String::kArrayIndexValueBits)); |
- value <<= String::kHashShift; |
- value |= length << String::kArrayIndexHashLengthShift; |
+ value <<= String::ArrayIndexValueBits::kShift; |
+ value |= length << String::ArrayIndexLengthBits::kShift; |
ASSERT((value & String::kIsNotArrayIndexMask) == 0); |
ASSERT((length > String::kMaxCachedArrayIndexLength) || |