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*, PropertyName, JSValue, PutPropertySlot&);
-
- static bool getOwnPropertySlot(JSCell*, ExecState*, PropertyName, PropertySlot&);
- static bool getOwnPropertyDescriptor(JSObject*, ExecState*, PropertyName, PropertyDescriptor&);
- JSValue getValueProperty(ExecState*, int token) const;
-
- static const ClassInfo s_info;
-
- static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue proto)
- {
- return Structure::create(vm, 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&);
- };
+class NumberPrototype;
+
+class NumberConstructor : public InternalFunction {
+public:
+ typedef InternalFunction Base;
+ static const unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | ImplementsHasInstance;
+
+ 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;
+ }
+
+ DECLARE_INFO;
+
+ static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue proto)
+ {
+ return Structure::create(vm, globalObject, proto, TypeInfo(ObjectType, StructureFlags), info());
+ }
+
+protected:
+ void finishCreation(VM&, NumberPrototype*);
+
+private:
+ NumberConstructor(VM&, Structure*);
+ static ConstructType getConstructData(JSCell*, ConstructData&);
+ static CallType getCallData(JSCell*, CallData&);
+};
} // namespace JSC