Chromium Code Reviews| Index: src/objects-inl.h | 
| diff --git a/src/objects-inl.h b/src/objects-inl.h | 
| index c5cf060829f5867cbfea4dc35d56a0c682e4a486..9f5574bb3afdadd6a0f65aa9d44800fea4fc7c37 100644 | 
| --- a/src/objects-inl.h | 
| +++ b/src/objects-inl.h | 
| @@ -2057,7 +2057,10 @@ int HashTable<Shape, Key>::FindEntry(Key key) { | 
| template<typename Shape, typename Key> | 
| int HashTable<Shape, Key>::FindEntry(Isolate* isolate, Key key) { | 
| uint32_t capacity = Capacity(); | 
| - uint32_t entry = FirstProbe(Shape::Hash(key), capacity); | 
| + uint32_t entry = FirstProbe( | 
| + HashTable<Shape, Key>::Hash(key), | 
| 
 
Erik Corry
2012/01/10 07:29:28
This all fits on one line.
 
 | 
| + capacity | 
| + ); | 
| uint32_t count = 1; | 
| // EnsureCapacity will guarantee the hash table is never full. | 
| while (true) { | 
| @@ -4536,15 +4539,23 @@ bool NumberDictionaryShape::IsMatch(uint32_t key, Object* other) { | 
| uint32_t NumberDictionaryShape::Hash(uint32_t key) { | 
| - return ComputeIntegerHash(key); | 
| + return SeededHash(key, 0); | 
| 
 
Erik Corry
2012/01/10 07:29:28
I would appreciate a comment as to why the seed is
 
 | 
| } | 
| uint32_t NumberDictionaryShape::HashForObject(uint32_t key, Object* other) { | 
| - ASSERT(other->IsNumber()); | 
| - return ComputeIntegerHash(static_cast<uint32_t>(other->Number())); | 
| + return SeededHashForObject(key, 0, other); | 
| +} | 
| + | 
| +uint32_t NumberDictionaryShape::SeededHash(uint32_t key, uint32_t seed) { | 
| + return ComputeIntegerHash(key, seed); | 
| } | 
| +uint32_t NumberDictionaryShape::SeededHashForObject(uint32_t key, uint32_t seed, | 
| + Object* other) { | 
| 
 
Erik Corry
2012/01/10 07:29:28
Formatting
 
 | 
| + ASSERT(other->IsNumber()); | 
| + return ComputeIntegerHash(static_cast<uint32_t>(other->Number()), seed); | 
| +} | 
| MaybeObject* NumberDictionaryShape::AsObject(uint32_t key) { | 
| return Isolate::Current()->heap()->NumberFromUint32(key); |