Revision: 10336
Author:   [email protected]
Date:     Thu Jan  5 01:57:10 2012
Log:      Alter the second hash used in StoreBuffer::Compact.

hash2 >> (kHashMapLengthLog2 * 2) was always zero because hash2 was masked with (kHashMapLength - 1).

[email protected]

Review URL: http://codereview.chromium.org/9085021
http://code.google.com/p/v8/source/detail?r=10336

Modified:
 /branches/bleeding_edge/src/store-buffer.cc

=======================================
--- /branches/bleeding_edge/src/store-buffer.cc Wed Jan  4 23:53:28 2012
+++ /branches/bleeding_edge/src/store-buffer.cc Thu Jan  5 01:57:10 2012
@@ -688,9 +688,9 @@
     int hash1 =
((int_addr ^ (int_addr >> kHashSetLengthLog2)) & (kHashSetLength - 1));
     if (hash_set_1_[hash1] == int_addr) continue;
-    int hash2 =
- ((int_addr - (int_addr >> kHashSetLengthLog2)) & (kHashSetLength - 1));
+    uintptr_t hash2 = (int_addr - (int_addr >> kHashSetLengthLog2));
     hash2 ^= hash2 >> (kHashSetLengthLog2 * 2);
+    hash2 &= (kHashSetLength - 1);
     if (hash_set_2_[hash2] == int_addr) continue;
     if (hash_set_1_[hash1] == 0) {
       hash_set_1_[hash1] = int_addr;

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to