| Index: Source/wtf/text/StringImpl.h
|
| diff --git a/Source/wtf/text/StringImpl.h b/Source/wtf/text/StringImpl.h
|
| index 0aa40ca9b12807d7453bd1210c9c01379444780f..552150734991558af89cc51e87c0b9f2b0f3c79b 100644
|
| --- a/Source/wtf/text/StringImpl.h
|
| +++ b/Source/wtf/text/StringImpl.h
|
| @@ -26,6 +26,7 @@
|
| #include <limits.h>
|
| #include "wtf/ASCIICType.h"
|
| #include "wtf/Forward.h"
|
| +#include "wtf/HashMap.h"
|
| #include "wtf/StringHasher.h"
|
| #include "wtf/Vector.h"
|
| #include "wtf/WTFExport.h"
|
| @@ -41,6 +42,7 @@ typedef const struct __CFString * CFStringRef;
|
|
|
| namespace WTF {
|
|
|
| +struct AlreadyHashed;
|
| struct CStringTranslator;
|
| template<typename CharacterType> struct HashAndCharactersTranslator;
|
| struct HashAndUTF8CharactersTranslator;
|
| @@ -56,6 +58,7 @@ enum StripBehavior { StripExtraWhiteSpace, DoNotStripWhiteSpace };
|
|
|
| typedef bool (*CharacterMatchFunctionPtr)(UChar);
|
| typedef bool (*IsWhiteSpaceFunctionPtr)(UChar);
|
| +typedef HashMap<unsigned, StringImpl*, AlreadyHashed> StaticStringsTable;
|
|
|
| // Define STRING_STATS to turn on run time statistics of string sizes and memory usage
|
| #undef STRING_STATS
|
| @@ -180,7 +183,8 @@ public:
|
|
|
| static StringImpl* createStatic(const char* string, unsigned length, unsigned hash);
|
| static void freezeStaticStrings();
|
| - static const Vector<StringImpl*>& allStaticStrings();
|
| + static const StaticStringsTable& allStaticStrings();
|
| + static unsigned highestStaticStringLength() { return m_highestStaticStringLength; }
|
|
|
| static PassRefPtr<StringImpl> create(const UChar*, unsigned length);
|
| static PassRefPtr<StringImpl> create(const LChar*, unsigned length);
|
| @@ -442,6 +446,8 @@ private:
|
| static StringStats m_stringStats;
|
| #endif
|
|
|
| + static unsigned m_highestStaticStringLength;
|
| +
|
| #ifndef NDEBUG
|
| void assertHashIsCorrect()
|
| {
|
|
|