diff options
author | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-05-30 12:48:17 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-05-30 12:48:17 +0200 |
commit | 881da28418d380042aa95a97f0cbd42560a64f7c (patch) | |
tree | a794dff3274695e99c651902dde93d934ea7a5af /Source/JavaScriptCore/runtime/RegExpCache.h | |
parent | 7e104c57a70fdf551bb3d22a5d637cdcbc69dbea (diff) | |
parent | 0fcedcd17cc00d3dd44c718b3cb36c1033319671 (diff) | |
download | qtwebkit-881da28418d380042aa95a97f0cbd42560a64f7c.tar.gz |
Merge 'wip/next' into dev
Change-Id: Iff9ee5e23bb326c4371ec8ed81d56f2f05d680e9
Diffstat (limited to 'Source/JavaScriptCore/runtime/RegExpCache.h')
-rw-r--r-- | Source/JavaScriptCore/runtime/RegExpCache.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Source/JavaScriptCore/runtime/RegExpCache.h b/Source/JavaScriptCore/runtime/RegExpCache.h index 4f854d1ba..942f3dcb9 100644 --- a/Source/JavaScriptCore/runtime/RegExpCache.h +++ b/Source/JavaScriptCore/runtime/RegExpCache.h @@ -30,7 +30,7 @@ #include "Strong.h" #include "Weak.h" #include "WeakInlines.h" -#include <wtf/FixedArray.h> +#include <array> #include <wtf/HashMap.h> #ifndef RegExpCache_h @@ -39,12 +39,14 @@ namespace JSC { class RegExpCache : private WeakHandleOwner { -friend class RegExp; -typedef HashMap<RegExpKey, Weak<RegExp> > RegExpCacheMap; + WTF_MAKE_FAST_ALLOCATED; + + friend class RegExp; + typedef HashMap<RegExpKey, Weak<RegExp>> RegExpCacheMap; public: RegExpCache(VM* vm); - void invalidateCode(); + void deleteAllCode(); private: @@ -52,13 +54,13 @@ private: static const int maxStrongCacheableEntries = 32; - virtual void finalize(Handle<Unknown>, void* context); + virtual void finalize(Handle<Unknown>, void* context) override; RegExp* lookupOrCreate(const WTF::String& patternString, RegExpFlags); void addToStrongCache(RegExp*); RegExpCacheMap m_weakCache; // Holds all regular expressions currently live. int m_nextEntryInStrongCache; - WTF::FixedArray<Strong<RegExp>, maxStrongCacheableEntries> m_strongCache; // Holds a select few regular expressions that have compiled and executed + std::array<Strong<RegExp>, maxStrongCacheableEntries> m_strongCache; // Holds a select few regular expressions that have compiled and executed VM* m_vm; }; |