#pragma once
#include "InternalFunction.h"
namespace JSC {
class DatePrototype;
class GetterSetter;
class DateConstructor final : public InternalFunction {
public:
typedef InternalFunction Base;
static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
static DateConstructor* create(VM& vm, Structure* structure, DatePrototype* datePrototype, GetterSetter*)
{
DateConstructor* constructor = new (NotNull, allocateCell<DateConstructor>(vm.heap)) DateConstructor(vm, structure);
constructor->finishCreation(vm, datePrototype);
return constructor;
}
DECLARE_INFO;
static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
{
return Structure::create(vm, globalObject, prototype, TypeInfo(InternalFunctionType, StructureFlags), info());
}
protected:
void finishCreation(VM&, DatePrototype*);
private:
DateConstructor(VM&, Structure*);
};
JSObject* constructDate(ExecState*, JSGlobalObject*, JSValue newTarget, const ArgList&);
EncodedJSValue JSC_HOST_CALL dateNow(ExecState*);
}