Bug 925879 - use JS_BITS_PER_WORD instead of JS_BYTES_PER_WORD in HashTable.h; r=njn
authorNathan Froyd <froydnj@mozilla.com>
Tue, 15 Oct 2013 10:11:03 -0400
changeset 164772 54e8cdecbaca676621d7ccb74b051326fd17ad2b
parent 164771 2b6522d861f8e74b454ca4683d1c86b31844a777
child 164773 214a64e9f3f2f7c38c38cd99f2d6d6b6cbd3d01f
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnjn
bugs925879
milestone27.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 925879 - use JS_BITS_PER_WORD instead of JS_BYTES_PER_WORD in HashTable.h; r=njn
js/public/HashTable.h
--- a/js/public/HashTable.h
+++ b/js/public/HashTable.h
@@ -515,17 +515,17 @@ class HashSet
 template <typename Key, size_t zeroBits>
 struct PointerHasher
 {
     typedef Key Lookup;
     static HashNumber hash(const Lookup &l) {
         JS_ASSERT(!JS::IsPoisonedPtr(l));
         size_t word = reinterpret_cast<size_t>(l) >> zeroBits;
         JS_STATIC_ASSERT(sizeof(HashNumber) == 4);
-#if JS_BYTES_PER_WORD == 4
+#if JS_BITS_PER_WORD == 32
         return HashNumber(word);
 #else
         JS_STATIC_ASSERT(sizeof word == 8);
         return HashNumber((word >> 32) ^ word);
 #endif
     }
     static bool match(const Key &k, const Lookup &l) {
         JS_ASSERT(!JS::IsPoisonedPtr(k));