diff options
Diffstat (limited to 'JavaScriptCore/runtime/RegExpCache.h')
-rw-r--r-- | JavaScriptCore/runtime/RegExpCache.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/JavaScriptCore/runtime/RegExpCache.h b/JavaScriptCore/runtime/RegExpCache.h index 03b73ac..fb30a9e 100644 --- a/JavaScriptCore/runtime/RegExpCache.h +++ b/JavaScriptCore/runtime/RegExpCache.h @@ -35,17 +35,19 @@ namespace JSC { class RegExpCache { + +typedef HashMap<RegExpKey, RefPtr<RegExp> > RegExpCacheMap; + public: PassRefPtr<RegExp> lookupOrCreate(const UString& patternString, const UString& flags); - PassRefPtr<RegExp> create(const UString& patternString, const UString& flags); + PassRefPtr<RegExp> create(const UString& patternString, const UString& flags, RegExpCacheMap::iterator iterator); RegExpCache(JSGlobalData* globalData); private: static const unsigned maxCacheablePatternLength = 256; static const int maxCacheableEntries = 256; - typedef HashMap<RegExpKey, RefPtr<RegExp> > RegExpCacheMap; - RegExpKey patternKeyArray[maxCacheableEntries]; + FixedArray<RegExpKey, maxCacheableEntries> patternKeyArray; RegExpCacheMap m_cacheMap; JSGlobalData* m_globalData; int m_nextKeyToEvict; |