Commit 22bc8f6a authored by vegorov@chromium.org's avatar vegorov@chromium.org

Alter the second hash used in StoreBuffer::Compact.

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

R=erik.corry@gmail.com

Review URL: http://codereview.chromium.org/9085021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10336 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 50f235fe
......@@ -688,9 +688,9 @@ void StoreBuffer::Compact() {
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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment