summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/runtime/RegExpCache.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore/runtime/RegExpCache.h')
-rw-r--r--Source/JavaScriptCore/runtime/RegExpCache.h14
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;
};