NumberConstructor.h [plain text]
#ifndef NumberConstructor_h
#define NumberConstructor_h
#include "InternalFunction.h"
namespace JSC {
class NumberPrototype;
class NumberConstructor : public InternalFunction {
public:
typedef InternalFunction Base;
static NumberConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, NumberPrototype* numberPrototype)
{
NumberConstructor* constructor = new (NotNull, allocateCell<NumberConstructor>(*exec->heap())) NumberConstructor(globalObject, structure);
constructor->finishCreation(exec, numberPrototype);
return constructor;
}
static void put(JSCell*, ExecState*, const Identifier& propertyName, JSValue, PutPropertySlot&);
static bool getOwnPropertySlot(JSCell*, ExecState*, const Identifier&, PropertySlot&);
static bool getOwnPropertyDescriptor(JSObject*, ExecState*, const Identifier&, PropertyDescriptor&);
JSValue getValueProperty(ExecState*, int token) const;
static const ClassInfo s_info;
static Structure* createStructure(JSGlobalData& globalData, JSGlobalObject* globalObject, JSValue proto)
{
return Structure::create(globalData, globalObject, proto, TypeInfo(ObjectType, StructureFlags), &s_info);
}
enum { NaNValue, NegInfinity, PosInfinity, MaxValue, MinValue };
protected:
void finishCreation(ExecState*, NumberPrototype*);
static const unsigned StructureFlags = OverridesGetOwnPropertySlot | ImplementsHasInstance | InternalFunction::StructureFlags;
private:
NumberConstructor(JSGlobalObject*, Structure*);
static ConstructType getConstructData(JSCell*, ConstructData&);
static CallType getCallData(JSCell*, CallData&);
};
}
#endif // NumberConstructor_h