#pragma once
#include "JSArray.h"
#include "JSCPoison.h"
#include <wtf/PoisonedUniquePtr.h>
namespace JSC {
class ArrayPrototypeAdaptiveInferredPropertyWatchpoint;
class ArrayPrototype final : public JSArray {
private:
ArrayPrototype(VM&, Structure*);
public:
typedef JSArray Base;
enum class SpeciesWatchpointStatus {
Uninitialized,
Initialized,
Fired
};
static ArrayPrototype* create(VM&, JSGlobalObject*, Structure*);
DECLARE_EXPORT_INFO;
static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
{
return Structure::create(vm, globalObject, prototype, TypeInfo(DerivedArrayType, StructureFlags), info(), ArrayClass);
}
void tryInitializeSpeciesWatchpoint(ExecState*);
static const bool needsDestruction = false;
static void destroy(JSC::JSCell*);
protected:
void finishCreation(VM&, JSGlobalObject*);
private:
friend ArrayPrototypeAdaptiveInferredPropertyWatchpoint;
PoisonedUniquePtr<ArrayPrototypePoison, ArrayPrototypeAdaptiveInferredPropertyWatchpoint> m_constructorWatchpoint;
PoisonedUniquePtr<ArrayPrototypePoison, ArrayPrototypeAdaptiveInferredPropertyWatchpoint> m_constructorSpeciesWatchpoint;
};
EncodedJSValue JSC_HOST_CALL arrayProtoFuncToString(ExecState*);
EncodedJSValue JSC_HOST_CALL arrayProtoFuncValues(ExecState*);
EncodedJSValue JSC_HOST_CALL arrayProtoPrivateFuncConcatMemcpy(ExecState*);
EncodedJSValue JSC_HOST_CALL arrayProtoPrivateFuncAppendMemcpy(ExecState*);
}