]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - runtime/ArrayConstructor.h
JavaScriptCore-1218.33.tar.gz
[apple/javascriptcore.git] / runtime / ArrayConstructor.h
index c60571fbd2f9c02c18d27167efc879a3341a160c..727475b4796d7f5a5a72687bda7ee0df47b1ec3c 100644 (file)
 
 namespace JSC {
 
 
 namespace JSC {
 
-    class ArrayPrototype;
+class ArrayAllocationProfile;
+class ArrayPrototype;
+class JSArray;
 
 
-    class ArrayConstructor : public InternalFunction {
-    public:
-        typedef InternalFunction Base;
+class ArrayConstructor : public InternalFunction {
+public:
+    typedef InternalFunction Base;
 
 
-        static ArrayConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, ArrayPrototype* arrayPrototype)
-        {
-            ArrayConstructor* constructor = new (NotNull, allocateCell<ArrayConstructor>(*exec->heap())) ArrayConstructor(globalObject, structure);
-            constructor->finishCreation(exec, arrayPrototype);
-            return constructor;
-        }
+    static ArrayConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, ArrayPrototype* arrayPrototype)
+    {
+        ArrayConstructor* constructor = new (NotNull, allocateCell<ArrayConstructor>(*exec->heap())) ArrayConstructor(globalObject, structure);
+        constructor->finishCreation(exec, arrayPrototype);
+        return constructor;
+    }
 
 
-        static const ClassInfo s_info;
+    static const ClassInfo s_info;
 
 
-        static Structure* createStructure(JSGlobalData& globalData, JSGlobalObject* globalObject, JSValue prototype)
-        {
-            return Structure::create(globalData, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), &s_info);
-        }
+    static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
+    {
+        return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), &s_info);
+    }
 
 
-    protected:
-        void finishCreation(ExecState*, ArrayPrototype*);
-        static const unsigned StructureFlags = OverridesGetOwnPropertySlot | InternalFunction::StructureFlags;
+protected:
+    void finishCreation(ExecState*, ArrayPrototype*);
+    static const unsigned StructureFlags = OverridesGetOwnPropertySlot | InternalFunction::StructureFlags;
 
 
-    private:
-        ArrayConstructor(JSGlobalObject*, Structure*);
-        static bool getOwnPropertySlot(JSCell*, ExecState*, const Identifier&, PropertySlot&);
+private:
+    ArrayConstructor(JSGlobalObject*, Structure*);
+    static bool getOwnPropertySlot(JSCell*, ExecState*, PropertyName, PropertySlot&);
 
 
-        static bool getOwnPropertyDescriptor(JSObject*, ExecState*, const Identifier&, PropertyDescriptor&);
+    static bool getOwnPropertyDescriptor(JSObject*, ExecState*, PropertyName, PropertyDescriptor&);
 
 
-        static ConstructType getConstructData(JSCell*, ConstructData&);
-        static CallType getCallData(JSCell*, CallData&);
-    };
+    static ConstructType getConstructData(JSCell*, ConstructData&);
+    static CallType getCallData(JSCell*, CallData&);
+};
+
+JSObject* constructArrayWithSizeQuirk(ExecState*, ArrayAllocationProfile*, JSGlobalObject*, JSValue);
 
 } // namespace JSC
 
 
 } // namespace JSC