]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - runtime/NumberObject.h
JavaScriptCore-7600.1.4.16.1.tar.gz
[apple/javascriptcore.git] / runtime / NumberObject.h
index 285421df70f4953298ec653dcde271e167df64bb..4bdf2819f2667669af53715ce201880251240064 100644 (file)
 namespace JSC {
 
     class NumberObject : public JSWrapperObject {
+    protected:
+        NumberObject(VM&, Structure*);
+        void finishCreation(VM&);
+
     public:
-        explicit NumberObject(PassRefPtr<Structure>);
+        typedef JSWrapperObject Base;
 
-        static const ClassInfo info;
+        static NumberObject* create(VM& vm, Structure* structure)
+        {
+            NumberObject* number = new (NotNull, allocateCell<NumberObject>(vm.heap)) NumberObject(vm, structure);
+            number->finishCreation(vm);
+            return number;
+        }
 
-    private:
-        virtual const ClassInfo* classInfo() const { return &info; }
+        DECLARE_EXPORT_INFO;
 
-        virtual JSValuePtr getJSNumber();
+        static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
+        {
+            return Structure::create(vm, globalObject, prototype, TypeInfo(NumberObjectType, StructureFlags), info());
+        }
     };
 
-    NumberObject* constructNumber(ExecState*, JSValuePtr);
+    JS_EXPORT_PRIVATE NumberObject* constructNumber(ExecState*, JSGlobalObject*, JSValue);
 
 } // namespace JSC