-
simon.fraser@apple.com authored
Reviewed by Darin Adler https://bugs.webkit.org/show_bug.cgi?id=21818 Add HashTraits for AtomicString so that AtomicString can be used as the key for a HashMap or HashSet. * GNUmakefile.am: add AtomicStringHash.h * WebCore.vcproj/WebCore.vcproj: add AtomicStringHash.h * WebCore.xcodeproj/project.pbxproj: add AtomicStringHash.h * platform/text/AtomicString.h: (WebCore::AtomicString::AtomicString): (WebCore::AtomicString::isHashTableDeletedValue): specialize DefaultHash for AtomicString to use AtomicStringHash * platform/text/AtomicStringHash.h: Added. * platform/text/StringImpl.cpp: (WebCore::StringImpl::StringImpl): compute the hash up-front for the empty string * platform/text/StringImpl.h: (WebCore::StringImpl::existingHash): method to get the hash without a test and branch, for callers like AtomicStringHash who can guarantee that the hash has already been computed. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37852 268f45cc-cd09-0410-ab3c-d52691b4dbfc
912ac415