Commit 5e1c9e29 authored by erik.corry@gmail.com's avatar erik.corry@gmail.com

Small fixes to hash seeding code, discovered during

review of back port.
Review URL: http://codereview.chromium.org/9187006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10397 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent ddc01444
......@@ -649,7 +649,7 @@ void MacroAssembler::LeaveFrame(StackFrame::Type type) {
void MacroAssembler::EnterExitFramePrologue() {
// Setup the frame structure on the stack.
// Set up the frame structure on the stack.
ASSERT(ExitFrameConstants::kCallerSPDisplacement == +2 * kPointerSize);
ASSERT(ExitFrameConstants::kCallerPCOffset == +1 * kPointerSize);
ASSERT(ExitFrameConstants::kCallerFPOffset == 0 * kPointerSize);
......@@ -701,7 +701,7 @@ void MacroAssembler::EnterExitFrameEpilogue(int argc, bool save_doubles) {
void MacroAssembler::EnterExitFrame(bool save_doubles) {
EnterExitFramePrologue();
// Setup argc and argv in callee-saved registers.
// Set up argc and argv in callee-saved registers.
int offset = StandardFrameConstants::kCallerSPOffset - kPointerSize;
mov(edi, eax);
lea(esi, Operand(ebp, eax, times_4, offset));
......@@ -1002,9 +1002,10 @@ void MacroAssembler::GetNumberHash(Register r0, Register scratch) {
ExternalReference roots_array_start =
ExternalReference::roots_array_start(isolate());
mov(scratch, Immediate(Heap::kHashSeedRootIndex));
xor_(r0, Operand::StaticArray(scratch,
times_pointer_size,
roots_array_start));
mov(scratch,
Operand::StaticArray(scratch, times_pointer_size, roots_array_start));
SmiUntag(scratch);
xor_(r0, scratch);
} else {
int32_t seed = isolate()->heap()->HashSeed();
xor_(r0, Immediate(seed));
......
......@@ -2603,7 +2603,7 @@ class BaseShape {
}
static uint32_t HashForObject(Key key, Object* object) { return 0; }
static uint32_t SeededHashForObject(Key key, uint32_t seed, Object* object) {
// Won't be called if UsesSeed isn't overridden by child class.
ASSERT(UsesSeed);
return HashForObject(key, object);
}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment