Index: src/ia32/macro-assembler-ia32.cc |
diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc |
index a405c63663512df605a5b3810c7648f4f1009499..9674ef182977718bb41fb4b9bbcc5550b454e0f2 100644 |
--- a/src/ia32/macro-assembler-ia32.cc |
+++ b/src/ia32/macro-assembler-ia32.cc |
@@ -2047,16 +2047,10 @@ void MacroAssembler::IndexFromHash(Register hash, Register index) { |
// reserved for it does not conflict. |
ASSERT(TenToThe(String::kMaxCachedArrayIndexLength) < |
(1 << String::kArrayIndexValueBits)); |
- // We want the smi-tagged index in key. kArrayIndexValueMask has zeros in |
- // the low kHashShift bits. |
- and_(hash, String::kArrayIndexValueMask); |
- STATIC_ASSERT(String::kHashShift >= kSmiTagSize && kSmiTag == 0); |
- if (String::kHashShift > kSmiTagSize) { |
- shr(hash, String::kHashShift - kSmiTagSize); |
- } |
if (!index.is(hash)) { |
mov(index, hash); |
} |
+ DecodeFieldToSmi<String::ArrayIndexValueBits>(index); |
} |