#pragma once
#include "JITOperations.h"
#include "StringObject.h"
namespace JSC {
class ObjectPrototype;
class RegExp;
class RegExpObject;
class StringPrototype final : public StringObject {
public:
using Base = StringObject;
static constexpr unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
static StringPrototype* create(VM&, JSGlobalObject*, Structure*);
static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
{
return Structure::create(vm, globalObject, prototype, TypeInfo(DerivedStringObjectType, StructureFlags), info());
}
DECLARE_INFO;
private:
StringPrototype(VM&, Structure*);
void finishCreation(VM&, JSGlobalObject*, JSString*);
};
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(StringPrototype, StringObject);
JSC_DECLARE_JIT_OPERATION(operationStringProtoFuncReplaceGeneric, JSCell*, (JSGlobalObject*, EncodedJSValue thisValue, EncodedJSValue searchValue, EncodedJSValue replaceValue));
JSC_DECLARE_JIT_OPERATION(operationStringProtoFuncReplaceRegExpEmptyStr, JSCell*, (JSGlobalObject*, JSString* thisValue, RegExpObject* searchValue));
JSC_DECLARE_JIT_OPERATION(operationStringProtoFuncReplaceRegExpString, JSCell*, (JSGlobalObject*, JSString* thisValue, RegExpObject* searchValue, JSString* replaceValue));
void substituteBackreferences(StringBuilder& result, const String& replacement, StringView source, const int* ovector, RegExp*);
JSC_DECLARE_HOST_FUNCTION(stringProtoFuncRepeatCharacter);
JSC_DECLARE_HOST_FUNCTION(stringProtoFuncSplitFast);
JSC_DECLARE_HOST_FUNCTION(builtinStringSubstringInternal);
JSC_DECLARE_HOST_FUNCTION(builtinStringIncludesInternal);
JSC_DECLARE_HOST_FUNCTION(builtinStringIndexOfInternal);
}