Index: src/stub-cache.h |
diff --git a/src/stub-cache.h b/src/stub-cache.h |
index 824f4ff17b923ba8747aeac3297faa279592ff1a..92100ba59875da81610fdac0d2cc28ab0005bb18 100644 |
--- a/src/stub-cache.h |
+++ b/src/stub-cache.h |
@@ -203,14 +203,18 @@ class StubCache : public AllStatic { |
// Compute the hash of the name (use entire length field). |
ASSERT(name->HasHashCode()); |
uint32_t field = name->length_field(); |
+ uint32_t map_lowbits = |
Dean McNamee
2009/05/06 08:29:17
lowbits makes it sounds differnt than low32, speci
|
+ static_cast<uint32_t>(reinterpret_cast<uintptr_t>(map)); |
// Base the offset on a simple combination of name, flags, and map. |
- uint32_t key = (reinterpret_cast<uint32_t>(map) + field) ^ flags; |
+ uint32_t key = (map_lowbits + field) ^ flags; |
return key & ((kPrimaryTableSize - 1) << kHeapObjectTagSize); |
} |
static int SecondaryOffset(String* name, Code::Flags flags, int seed) { |
// Use the seed from the primary cache in the secondary cache. |
- uint32_t key = seed - reinterpret_cast<uint32_t>(name) + flags; |
+ uint32_t string_lowbits = |
+ static_cast<uint32_t>(reinterpret_cast<uintptr_t>(name)); |
+ uint32_t key = seed - string_lowbits + flags; |
return key & ((kSecondaryTableSize - 1) << kHeapObjectTagSize); |
} |