#pragma once
#include "JSObject.h"
#include "RegExp.h"
namespace JSC {
class RegExpPrototype final : public JSNonFinalObject {
public:
using Base = JSNonFinalObject;
static constexpr unsigned StructureFlags = Base::StructureFlags;
template<typename CellType, SubspaceAccess>
static IsoSubspace* subspaceFor(VM& vm)
{
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(RegExpPrototype, Base);
return &vm.plainObjectSpace;
}
static RegExpPrototype* create(VM& vm, JSGlobalObject* globalObject, Structure* structure)
{
RegExpPrototype* prototype = new (NotNull, allocateCell<RegExpPrototype>(vm.heap)) RegExpPrototype(vm, structure);
prototype->finishCreation(vm, globalObject);
return prototype;
}
DECLARE_INFO;
static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
{
return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info());
}
private:
RegExpPrototype(VM&, Structure*);
void finishCreation(VM&, JSGlobalObject*);
};
JSC_DECLARE_HOST_FUNCTION(regExpProtoFuncMatchFast);
JSC_DECLARE_HOST_FUNCTION(regExpProtoFuncSearchFast);
JSC_DECLARE_HOST_FUNCTION(regExpProtoFuncSplitFast);
JSC_DECLARE_HOST_FUNCTION(regExpProtoFuncTestFast);
}