Commit 42fd1fa4 authored by aroben@apple.com's avatar aroben@apple.com

Windows build fix

        * kjs/array_instance.cpp: Touched this.
        * wtf/HashFunctions.h:
        (WTF::intHash): Added 8- and 16-bit versions of intHash.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31343 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 2bb17bbe
2008-03-26 Adam Roben <aroben@apple.com>
Windows build fix
* kjs/array_instance.cpp: Touched this.
* wtf/HashFunctions.h:
(WTF::intHash): Added 8- and 16-bit versions of intHash.
2008-03-26 Adam Roben <aroben@apple.com>
Force JSC headers to be copied by touching a file
......
......@@ -402,7 +402,7 @@ void ArrayInstance::setLength(unsigned newLength)
}
}
}
m_length = newLength;
}
......
......@@ -36,6 +36,32 @@ namespace WTF {
// integer hash function
// Thomas Wang's 32 Bit Mix Function: http://www.cris.com/~Ttwang/tech/inthash.htm
inline unsigned intHash(uint8_t key8)
{
unsigned key = key8;
key += ~(key << 15);
key ^= (key >> 10);
key += (key << 3);
key ^= (key >> 6);
key += ~(key << 11);
key ^= (key >> 16);
return key;
}
// Thomas Wang's 32 Bit Mix Function: http://www.cris.com/~Ttwang/tech/inthash.htm
inline unsigned intHash(uint16_t key16)
{
unsigned key = key16;
key += ~(key << 15);
key ^= (key >> 10);
key += (key << 3);
key ^= (key >> 6);
key += ~(key << 11);
key ^= (key >> 16);
return key;
}
// Thomas Wang's 32 Bit Mix Function: http://www.cris.com/~Ttwang/tech/inthash.htm
inline unsigned intHash(uint32_t key)
{
......
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