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..6aa259e06e0b09f1b5accfb513dea53edb12b2ba 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 |
Erik Corry
2012/01/10 10:13:51
"First of all we assign the hash seed to r1."
|
+ 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(); |
+ mov(r1, Operand(seed, RelocInfo::NONE)); |
+ } |
+ |
+ // 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); |
Erik Corry
2012/01/10 10:13:51
The intention is that the original should be xored
|
shl(r1, 15); |
add(r0, r1); |