Ignore:
Timestamp:
Jan 4, 2010, 5:24:48 PM (15 years ago)
Author:
[email protected]
Message:

JavaScriptCore: https://bugs.webkit.org/show_bug.cgi?id=33163
Add string hashing functions to WTF.
Use WTF's string hashing functions from UStringImpl.

Reviewed by Sam Weinig, additional coding by Mark Rowe.

(JSC::UStringImpl::computeHash):

  • wtf/HashFunctions.h:
  • wtf/StringHashFunctions.h: Added.

(WTF::stringHash):

JavaScriptGlue: Add a forwarding header so that StringHashFunctions.h can be found.

Reviewed by Sam Weinig.

  • ForwardingHeaders/wtf/StringHashFunctions.h: Added.

WebCore: https://bugs.webkit.org/show_bug.cgi?id=33163
Use WTF's string hashing functions from StringImpl.

Patch by Mark Rowe <[email protected]> on 2010-01-04
Reviewed by Sam Weinig.

  • ForwardingHeaders/wtf/StringHashFunctions.h: Added.
  • platform/text/StringHash.h:
  • platform/text/StringImpl.h:

(WebCore::StringImpl::computeHash):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/HashFunctions.h

    r52768 r52776  
    174174
    175175    template<typename T, typename U> struct DefaultHash<std::pair<T, U> > { typedef PairHash<T, U> Hash; };
    176    
    177     // Golden ratio - arbitrary start value to avoid mapping all 0's to all 0's
    178     static const unsigned stringHashingStartValue = 0x9e3779b9U;
    179176
    180177} // namespace WTF
Note: See TracChangeset for help on using the changeset viewer.