Index: Source/wtf/StringHasher.h |
diff --git a/Source/wtf/StringHasher.h b/Source/wtf/StringHasher.h |
index 7c0f92a0f7aa85e5b157d2c16c4890af2923da03..6a2527ebcc07e6a96cc54570b852fe4b8e691a41 100644 |
--- a/Source/wtf/StringHasher.h |
+++ b/Source/wtf/StringHasher.h |
@@ -109,25 +109,6 @@ public: |
addCharactersAssumingAligned<T, defaultConverter>(data, length); |
} |
- template<typename T, UChar Converter(T)> void addCharactersAssumingAligned(const T* data) |
- { |
- ASSERT(!m_hasPendingCharacter); |
- |
- while (T a = *data++) { |
- T b = *data++; |
- if (!b) { |
- addCharacter(Converter(a)); |
- break; |
- } |
- addCharactersAssumingAligned(Converter(a), Converter(b)); |
- } |
- } |
- |
- template<typename T> void addCharactersAssumingAligned(const T* data) |
- { |
- addCharactersAssumingAligned<T, defaultConverter>(data); |
- } |
- |
template<typename T, UChar Converter(T)> void addCharacters(const T* data, unsigned length) |
{ |
if (m_hasPendingCharacter && length) { |
@@ -143,20 +124,6 @@ public: |
addCharacters<T, defaultConverter>(data, length); |
} |
- template<typename T, UChar Converter(T)> void addCharacters(const T* data) |
- { |
- if (m_hasPendingCharacter && *data) { |
- m_hasPendingCharacter = false; |
- addCharactersAssumingAligned(m_pendingCharacter, Converter(*data++)); |
- } |
- addCharactersAssumingAligned<T, Converter>(data); |
- } |
- |
- template<typename T> void addCharacters(const T* data) |
- { |
- addCharacters<T, defaultConverter>(data); |
- } |
- |
unsigned hashWithTop8BitsMasked() const |
{ |
unsigned result = avalancheBits(); |
@@ -196,23 +163,11 @@ public: |
return hasher.hashWithTop8BitsMasked(); |
} |
- template<typename T, UChar Converter(T)> static unsigned computeHashAndMaskTop8Bits(const T* data) |
- { |
- StringHasher hasher; |
- hasher.addCharactersAssumingAligned<T, Converter>(data); |
- return hasher.hashWithTop8BitsMasked(); |
- } |
- |
template<typename T> static unsigned computeHashAndMaskTop8Bits(const T* data, unsigned length) |
{ |
return computeHashAndMaskTop8Bits<T, defaultConverter>(data, length); |
} |
- template<typename T> static unsigned computeHashAndMaskTop8Bits(const T* data) |
- { |
- return computeHashAndMaskTop8Bits<T, defaultConverter>(data); |
- } |
- |
template<typename T, UChar Converter(T)> static unsigned computeHash(const T* data, unsigned length) |
{ |
StringHasher hasher; |
@@ -220,23 +175,11 @@ public: |
return hasher.hash(); |
} |
- template<typename T, UChar Converter(T)> static unsigned computeHash(const T* data) |
- { |
- StringHasher hasher; |
- hasher.addCharactersAssumingAligned<T, Converter>(data); |
- return hasher.hash(); |
- } |
- |
template<typename T> static unsigned computeHash(const T* data, unsigned length) |
{ |
return computeHash<T, defaultConverter>(data, length); |
} |
- template<typename T> static unsigned computeHash(const T* data) |
- { |
- return computeHash<T, defaultConverter>(data); |
- } |
- |
static unsigned hashMemory(const void* data, unsigned length) |
{ |
// FIXME: Why does this function use the version of the hash that drops the top 8 bits? |