#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);
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;
};