Index: src/ia32/macro-assembler-ia32.cc |
diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc |
index 3356e818922d0ccce2967e4cd2bf6a586917663d..bc46b34099c8fdf36d37f70f751c506d5efaf84a 100644 |
--- a/src/ia32/macro-assembler-ia32.cc |
+++ b/src/ia32/macro-assembler-ia32.cc |
@@ -984,11 +984,26 @@ void MacroAssembler::LoadFromNumberDictionary(Label* miss, |
Label done; |
+ // First of all lets assign to r1 value of HashSeed |
+ if (Serializer::enabled()) { |
+ ExternalReference roots_array_start = |
+ ExternalReference::roots_array_start(isolate()); |
+ mov(r1, Immediate(Heap::kStringHashSeedRootIndex)); |
+ mov(r1, Operand::StaticArray(r1, |
+ times_pointer_size, |
+ roots_array_start)); |
+ } else { |
+ int32_t seed = isolate()->heap()->StringHashSeed(); |
+ lea(r1, Operand(seed, RelocInfo::NONE)); |
Erik Corry
2012/01/09 23:52:48
No reason to use lea here when mov would do.
|
+ } |
+ |
+ // Xor original key with a seed |
+ xor_(r1, r0); |
+ |
// Compute the hash code from the untagged key. This must be kept in sync |
// with ComputeIntegerHash in utils.h. |
// |
// hash = ~hash + (hash << 15); |
- mov(r1, r0); |
not_(r0); |
shl(r1, 15); |
add(r0, r1); |