Index: src/arm/code-stubs-arm.cc |
=================================================================== |
--- src/arm/code-stubs-arm.cc (revision 10328) |
+++ src/arm/code-stubs-arm.cc (working copy) |
@@ -5730,7 +5730,11 @@ |
Register hash, |
Register character) { |
// hash = character + (character << 10); |
- __ add(hash, character, Operand(character, LSL, 10)); |
+ __ LoadRoot(hash, Heap::kStringHashSeedRootIndex); |
+ // Untag smi seed and add the character. |
+ __ add(hash, character, Operand(hash, LSR, kSmiTagSize)); |
+ // hash += hash << 10; |
+ __ add(hash, hash, Operand(hash, LSL, 10)); |
// hash ^= hash >> 6; |
__ eor(hash, hash, Operand(hash, LSR, 6)); |
} |