Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(520)

Unified Diff: src/ia32/macro-assembler-ia32.cc

Issue 9148006: [objects] seed NumberDictionary (only ia32 now) Base URL: gh:v8/v8@master
Patch Set: fixed lint issues Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/objects.h » ('j') | src/objects.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | src/objects.h » ('j') | src/objects.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698