#ifndef MathObject_h
#define MathObject_h
-#include "JSObjectWithGlobalObject.h"
+#include "JSObject.h"
namespace JSC {
- class MathObject : public JSObjectWithGlobalObject {
+ class MathObject : public JSNonFinalObject {
+ private:
+ MathObject(VM&, Structure*);
+
public:
- MathObject(ExecState*, JSGlobalObject*, Structure*);
+ typedef JSNonFinalObject Base;
- virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
- virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
+ static MathObject* create(VM& vm, JSGlobalObject* globalObject, Structure* structure)
+ {
+ MathObject* object = new (NotNull, allocateCell<MathObject>(vm.heap)) MathObject(vm, structure);
+ object->finishCreation(vm, globalObject);
+ return object;
+ }
- static const ClassInfo s_info;
+ DECLARE_INFO;
- static Structure* createStructure(JSGlobalData& globalData, JSValue prototype)
+ static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
{
- return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
+ return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info());
}
protected:
+ void finishCreation(VM&, JSGlobalObject*);
static const unsigned StructureFlags = OverridesGetOwnPropertySlot | JSObject::StructureFlags;
};