class NumberConstructor : public InternalFunction {
public:
- NumberConstructor(ExecState*, NonNullPassRefPtr<Structure>, NumberPrototype*);
+ typedef InternalFunction Base;
- virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
- virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
+ static NumberConstructor* create(VM& vm, Structure* structure, NumberPrototype* numberPrototype)
+ {
+ NumberConstructor* constructor = new (NotNull, allocateCell<NumberConstructor>(vm.heap)) NumberConstructor(vm, structure);
+ constructor->finishCreation(vm, numberPrototype);
+ return constructor;
+ }
+
+ static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&);
JSValue getValueProperty(ExecState*, int token) const;
- static const ClassInfo info;
+ DECLARE_INFO;
- static PassRefPtr<Structure> createStructure(JSValue proto)
+ static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue proto)
{
- return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount);
+ return Structure::create(vm, globalObject, proto, TypeInfo(ObjectType, StructureFlags), info());
}
enum { NaNValue, NegInfinity, PosInfinity, MaxValue, MinValue };
protected:
+ void finishCreation(VM&, NumberPrototype*);
static const unsigned StructureFlags = OverridesGetOwnPropertySlot | ImplementsHasInstance | InternalFunction::StructureFlags;
private:
- virtual ConstructType getConstructData(ConstructData&);
- virtual CallType getCallData(CallData&);
-
- virtual const ClassInfo* classInfo() const { return &info; }
+ NumberConstructor(VM&, Structure*);
+ static ConstructType getConstructData(JSCell*, ConstructData&);
+ static CallType getCallData(JSCell*, CallData&);
};
} // namespace JSC