X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/93a3786624b2768d89bfa27e46598dc64e2fb70a..ed1e77d3adeb83d26fd1dfb16dd84cabdcefd250:/runtime/RegExpCache.h diff --git a/runtime/RegExpCache.h b/runtime/RegExpCache.h index 4f854d1..dd46ac6 100644 --- a/runtime/RegExpCache.h +++ b/runtime/RegExpCache.h @@ -30,7 +30,7 @@ #include "Strong.h" #include "Weak.h" #include "WeakInlines.h" -#include +#include #include #ifndef RegExpCache_h @@ -39,8 +39,10 @@ namespace JSC { class RegExpCache : private WeakHandleOwner { -friend class RegExp; -typedef HashMap > RegExpCacheMap; + WTF_MAKE_FAST_ALLOCATED; + + friend class RegExp; + typedef HashMap> RegExpCacheMap; public: RegExpCache(VM* vm); @@ -52,13 +54,13 @@ private: static const int maxStrongCacheableEntries = 32; - virtual void finalize(Handle, void* context); + virtual void finalize(Handle, 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, maxStrongCacheableEntries> m_strongCache; // Holds a select few regular expressions that have compiled and executed + std::array, maxStrongCacheableEntries> m_strongCache; // Holds a select few regular expressions that have compiled and executed VM* m_vm; };