summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/runtime/RegExpCache.h
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-05-30 12:48:17 +0200
committerOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-05-30 12:48:17 +0200
commit881da28418d380042aa95a97f0cbd42560a64f7c (patch)
treea794dff3274695e99c651902dde93d934ea7a5af /Source/JavaScriptCore/runtime/RegExpCache.h
parent7e104c57a70fdf551bb3d22a5d637cdcbc69dbea (diff)
parent0fcedcd17cc00d3dd44c718b3cb36c1033319671 (diff)
downloadqtwebkit-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.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;
};