namespace JSC {
class NumberObject : public JSWrapperObject {
- public:
- explicit NumberObject(NonNullPassRefPtr<Structure>);
+ protected:
+ NumberObject(JSGlobalData&, Structure*);
+ void finishCreation(JSGlobalData&);
- static const ClassInfo info;
+ public:
+ typedef JSWrapperObject Base;
- static PassRefPtr<Structure> createStructure(JSValue prototype)
+ static NumberObject* create(JSGlobalData& globalData, Structure* structure)
{
- return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount);
+ NumberObject* number = new (NotNull, allocateCell<NumberObject>(globalData.heap)) NumberObject(globalData, structure);
+ number->finishCreation(globalData);
+ return number;
}
- protected:
-#if USE(JSVALUE32)
- static const unsigned StructureFlags = OverridesMarkChildren | JSWrapperObject::StructureFlags;
-#else
- static const unsigned StructureFlags = JSWrapperObject::StructureFlags;
-#endif
+ static const ClassInfo s_info;
- private:
- virtual const ClassInfo* classInfo() const { return &info; }
-
- virtual JSValue getJSNumber();
+ static Structure* createStructure(JSGlobalData& globalData, JSGlobalObject* globalObject, JSValue prototype)
+ {
+ return Structure::create(globalData, globalObject, prototype, TypeInfo(NumberObjectType, StructureFlags), &s_info);
+ }
};
- NumberObject* constructNumber(ExecState*, JSValue);
+ NumberObject* constructNumber(ExecState*, JSGlobalObject*, JSValue);
} // namespace JSC