#ifndef ArrayPrototype_h
#define ArrayPrototype_h
#include "JSArray.h"
#include "Lookup.h"
namespace JSC {
class ArrayPrototypeAdaptiveInferredPropertyWatchpoint;
class ArrayPrototype : public JSArray {
private:
ArrayPrototype(VM&, Structure*);
public:
typedef JSArray Base;
enum class SpeciesWatchpointStatus {
Uninitialized,
Initialized,
Fired
};
static ArrayPrototype* create(VM&, JSGlobalObject*, Structure*);
DECLARE_INFO;
static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
{
return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info(), ArrayClass);
}
SpeciesWatchpointStatus speciesWatchpointStatus() const { return m_speciesWatchpointStatus; }
SpeciesWatchpointStatus attemptToInitializeSpeciesWatchpoint(ExecState*);
static const bool needsDestruction = false;
static void destroy(JSC::JSCell*);
protected:
void finishCreation(VM&, JSGlobalObject*);
private:
friend ArrayPrototypeAdaptiveInferredPropertyWatchpoint;
std::unique_ptr<ArrayPrototypeAdaptiveInferredPropertyWatchpoint> m_constructorWatchpoint;
std::unique_ptr<ArrayPrototypeAdaptiveInferredPropertyWatchpoint> m_constructorSpeciesWatchpoint;
SpeciesWatchpointStatus m_speciesWatchpointStatus { SpeciesWatchpointStatus::Uninitialized };
};
EncodedJSValue JSC_HOST_CALL arrayProtoFuncToString(ExecState*);
EncodedJSValue JSC_HOST_CALL arrayProtoFuncValues(ExecState*);
EncodedJSValue JSC_HOST_CALL arrayProtoPrivateFuncConcatMemcpy(ExecState*);
EncodedJSValue JSC_HOST_CALL arrayProtoPrivateFuncAppendMemcpy(ExecState*);
}
#endif // ArrayPrototype_h