]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - runtime/RegExpCache.h
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / runtime / RegExpCache.h
index 4f854d1bac53a36810bd68a437c7aa7ee672d292..dd46ac664901741a580a81c3c544b51c9b7f20ba 100644 (file)
@@ -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
 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);
@@ -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;
 };