#pragma once
#include "DateInstance.h"
namespace JSC {
class ObjectPrototype;
class DatePrototype final : public JSNonFinalObject {
public:
using Base = JSNonFinalObject;
static constexpr unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
template<typename CellType, SubspaceAccess>
static IsoSubspace* subspaceFor(VM& vm)
{
STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(DatePrototype, Base);
return &vm.plainObjectSpace;
}
static DatePrototype* create(VM& vm, JSGlobalObject* globalObject, Structure* structure)
{
DatePrototype* prototype = new (NotNull, allocateCell<DatePrototype>(vm.heap)) DatePrototype(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:
DatePrototype(VM&, Structure*);
void finishCreation(VM&, JSGlobalObject*);
};
JSC_DECLARE_HOST_FUNCTION(dateProtoFuncGetTime);
}