]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - runtime/NumberConstructor.h
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / runtime / NumberConstructor.h
index 6c8ed89fecdc04f00ee324879a58a3e97646003b..f8b1f7f443703ab4198dd4321e209dfe66882a3c 100644 (file)
 
 namespace JSC {
 
-    class NumberPrototype;
-
-    class NumberConstructor : public InternalFunction {
-    public:
-        typedef InternalFunction Base;
-
-        static NumberConstructor* create(VM& vm, Structure* structure, NumberPrototype* numberPrototype)
-        {
-            NumberConstructor* constructor = new (NotNull, allocateCell<NumberConstructor>(vm.heap)) NumberConstructor(vm, structure);
-            constructor->finishCreation(vm, numberPrototype);
-            return constructor;
-        }
-
-        static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&);
-        JSValue getValueProperty(ExecState*, int token) const;
-
-        DECLARE_INFO;
-
-        static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue proto) 
-        { 
-            return Structure::create(vm, globalObject, proto, TypeInfo(ObjectType, StructureFlags), info()); 
-        }
-
-        enum { NaNValue, NegInfinity, PosInfinity, MaxValue, MinValue };
-
-    protected:
-        void finishCreation(VM&, NumberPrototype*);
-        static const unsigned StructureFlags = OverridesGetOwnPropertySlot | ImplementsHasInstance | InternalFunction::StructureFlags;
-
-    private:
-        NumberConstructor(VM&, Structure*);
-        static ConstructType getConstructData(JSCell*, ConstructData&);
-        static CallType getCallData(JSCell*, CallData&);
-    };
+class NumberPrototype;
+
+class NumberConstructor : public InternalFunction {
+public:
+    typedef InternalFunction Base;
+    static const unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | ImplementsHasInstance;
+
+    static NumberConstructor* create(VM& vm, Structure* structure, NumberPrototype* numberPrototype)
+    {
+        NumberConstructor* constructor = new (NotNull, allocateCell<NumberConstructor>(vm.heap)) NumberConstructor(vm, structure);
+        constructor->finishCreation(vm, numberPrototype);
+        return constructor;
+    }
+
+    DECLARE_INFO;
+
+    static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue proto) 
+    { 
+        return Structure::create(vm, globalObject, proto, TypeInfo(ObjectType, StructureFlags), info()); 
+    }
+
+protected:
+    void finishCreation(VM&, NumberPrototype*);
+
+private:
+    NumberConstructor(VM&, Structure*);
+    static ConstructType getConstructData(JSCell*, ConstructData&);
+    static CallType getCallData(JSCell*, CallData&);
+};
 
 } // namespace JSC