X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/9dae56ea45a0f5f8136a5c93d6f3a7f99399ca73..1981f5dfe8d77d97469d20652f712a09400c48ed:/runtime/MathObject.h?ds=sidebyside diff --git a/runtime/MathObject.h b/runtime/MathObject.h index d6163fd..d8da039 100644 --- a/runtime/MathObject.h +++ b/runtime/MathObject.h @@ -25,19 +25,32 @@ namespace JSC { - class MathObject : public JSObject { + class MathObject : public JSNonFinalObject { + private: + MathObject(JSGlobalObject*, Structure*); + public: - MathObject(ExecState*, PassRefPtr); + typedef JSNonFinalObject Base; - virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); + static MathObject* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure) + { + MathObject* object = new (NotNull, allocateCell(*exec->heap())) MathObject(globalObject, structure); + object->finishCreation(exec, globalObject); + return object; + } + static bool getOwnPropertySlot(JSCell*, ExecState*, const Identifier&, PropertySlot&); + static bool getOwnPropertyDescriptor(JSObject*, ExecState*, const Identifier&, PropertyDescriptor&); - virtual const ClassInfo* classInfo() const { return &info; } - static const ClassInfo info; + static const ClassInfo s_info; - static PassRefPtr createStructure(JSValuePtr prototype) + static Structure* createStructure(JSGlobalData& globalData, JSGlobalObject* globalObject, JSValue prototype) { - return Structure::create(prototype, TypeInfo(ObjectType)); + return Structure::create(globalData, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), &s_info); } + + protected: + void finishCreation(ExecState*, JSGlobalObject*); + static const unsigned StructureFlags = OverridesGetOwnPropertySlot | JSObject::StructureFlags; }; } // namespace JSC