]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - runtime/MathObject.h
JavaScriptCore-1097.3.3.tar.gz
[apple/javascriptcore.git] / runtime / MathObject.h
index d6163fdb3a5ee7e2c2a24f9faf55835b478893cb..d8da039d801ca1bc8a6e05d9b5208b25e8bf6016 100644 (file)
 
 namespace JSC {
 
-    class MathObject : public JSObject {
+    class MathObject : public JSNonFinalObject {
+    private:
+        MathObject(JSGlobalObject*, Structure*);
+
     public:
-        MathObject(ExecState*, PassRefPtr<Structure>);
+        typedef JSNonFinalObject Base;
 
-        virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
+        static MathObject* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure)
+        {
+            MathObject* object = new (NotNull, allocateCell<MathObject>(*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<Structure> 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