StringConstructor.h [plain text]
#pragma once
#include "InternalFunction.h"
namespace JSC {
class StringPrototype;
class GetterSetter;
class StringConstructor final : public InternalFunction {
public:
typedef InternalFunction Base;
static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
static StringConstructor* create(VM& vm, Structure* structure, StringPrototype* stringPrototype, GetterSetter*)
{
StringConstructor* constructor = new (NotNull, allocateCell<StringConstructor>(vm.heap)) StringConstructor(vm, structure);
constructor->finishCreation(vm, stringPrototype);
return constructor;
}
DECLARE_INFO;
static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
{
return Structure::create(vm, globalObject, prototype, TypeInfo(InternalFunctionType, StructureFlags), info());
}
private:
StringConstructor(VM&, Structure*);
void finishCreation(VM&, StringPrototype*);
};
JSCell* JSC_HOST_CALL stringFromCharCode(ExecState*, int32_t);
JSCell* stringConstructor(ExecState*, JSValue);
}