Index: src/identity-map.cc |
diff --git a/src/identity-map.cc b/src/identity-map.cc |
index 2f5739dad99341031c4ade37182c82636dfe4c87..97b70ae2fd7a096bd55ce8943f9c71aeef23e624 100644 |
--- a/src/identity-map.cc |
+++ b/src/identity-map.cc |
@@ -4,7 +4,7 @@ |
#include "src/identity-map.h" |
-#include "src/heap/heap.h" |
+#include "src/base/functional.h" |
#include "src/heap/heap-inl.h" |
#include "src/zone-containers.h" |
@@ -42,8 +42,7 @@ IdentityMapBase::RawEntry IdentityMapBase::Insert(Object* key) { |
int IdentityMapBase::Hash(Object* address) { |
CHECK_NE(address, heap_->not_mapped_symbol()); |
uintptr_t raw_address = reinterpret_cast<uintptr_t>(address); |
- // Xor some of the upper bits, since the lower 2 or 3 are usually aligned. |
titzer
2016/02/16 13:02:27
What about the original comment? Objects will typi
rmcilroy
2016/02/16 14:00:55
It uses 64-bit mix functions: https://gist.github.
|
- return static_cast<int>((raw_address >> 11) ^ raw_address); |
+ return static_cast<int>(hasher_(raw_address)); |
} |