]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - runtime/MathObject.h
JavaScriptCore-7600.1.4.16.1.tar.gz
[apple/javascriptcore.git] / runtime / MathObject.h
index a9f70313d4feab9e12b30d484b4d588b9ec95df5..4b2a5bbece04dd2d30ce25d5e3775a3fe289e25a 100644 (file)
 
 namespace JSC {
 
-    class MathObject : public JSObject {
+    class MathObject : public JSNonFinalObject {
+    private:
+        MathObject(VM&, Structure*);
+
     public:
-        MathObject(ExecState*, NonNullPassRefPtr<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;
+        }
 
-        virtual const ClassInfo* classInfo() const { return &info; }
-        static const ClassInfo info;
+        DECLARE_INFO;
 
-        static PassRefPtr<Structure> createStructure(JSValue prototype)
+        static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
         {
-            return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount);
+            return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info());
         }
 
     protected:
+        void finishCreation(VM&, JSGlobalObject*);
         static const unsigned StructureFlags = OverridesGetOwnPropertySlot | JSObject::StructureFlags;
     };