Index: src/heap.cc |
=================================================================== |
--- src/heap.cc (revision 3447) |
+++ src/heap.cc (working copy) |
@@ -3963,8 +3963,8 @@ |
int KeyedLookupCache::Hash(Map* map, String* name) { |
// Uses only lower 32 bits if pointers are larger. |
uintptr_t addr_hash = |
- static_cast<uint32_t>(reinterpret_cast<uintptr_t>(map)) >> 2; |
- return (addr_hash ^ name->Hash()) % kLength; |
+ static_cast<uint32_t>(reinterpret_cast<uintptr_t>(map)) >> kMapHashShift; |
+ return (addr_hash ^ name->Hash()) & kCapacityMask; |
} |