Changeset 34754 in webkit for trunk/JavaScriptCore/kjs/JSArray.h
- Timestamp:
- Jun 23, 2008, 10:23:17 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/JSArray.h
r34587 r34754 33 33 JSArray(JSObject* prototype, unsigned initialLength); 34 34 JSArray(JSObject* prototype, const ArgList& initialValues); 35 ~JSArray();35 virtual ~JSArray(); 36 36 37 37 virtual bool getOwnPropertySlot(ExecState*, const Identifier& propertyName, PropertySlot&); 38 38 virtual bool getOwnPropertySlot(ExecState*, unsigned propertyName, PropertySlot&); 39 virtual void put(ExecState*, const Identifier& propertyName, JSValue*); 40 virtual void put(ExecState*, unsigned propertyName, JSValue*); 41 virtual bool deleteProperty(ExecState *, const Identifier& propertyName); 42 virtual bool deleteProperty(ExecState *, unsigned propertyName); 43 virtual void getPropertyNames(ExecState*, PropertyNameArray&); 39 virtual void put(ExecState*, unsigned propertyName, JSValue*); // FIXME: Make protected and add setItem. 44 40 45 virtual void mark();46 47 virtual const ClassInfo* classInfo() const { return &info; }48 41 static const ClassInfo info; 49 42 50 43 unsigned getLength() const { return m_length; } 44 void setLength(unsigned); // OK to use on new arrays, but not if it might be a RegExpMatchArray. 51 45 JSValue* getItem(unsigned) const; 52 46 53 47 void sort(ExecState*); 54 void sort(ExecState*, JS Object* compareFunction);48 void sort(ExecState*, JSValue* compareFunction, CallType, const CallData&); 55 49 56 50 protected: 51 virtual void put(ExecState*, const Identifier& propertyName, JSValue*); 52 virtual bool deleteProperty(ExecState*, const Identifier& propertyName); 53 virtual bool deleteProperty(ExecState*, unsigned propertyName); 54 virtual void getPropertyNames(ExecState*, PropertyNameArray&); 55 virtual void mark(); 56 57 57 void* lazyCreationData(); 58 58 void setLazyCreationData(void*); 59 59 60 60 private: 61 using JSObject::get; 62 63 virtual const ClassInfo* classInfo() const { return &info; } 64 61 65 static JSValue* lengthGetter(ExecState*, const Identifier&, const PropertySlot&); 62 66 bool inlineGetOwnPropertySlot(ExecState*, unsigned propertyName, PropertySlot&); 63 67 64 void setLength(unsigned);65 68 bool increaseVectorLength(unsigned newLength); 66 69 … … 75 78 }; 76 79 80 JSArray* constructEmptyArray(ExecState*); 81 JSArray* constructEmptyArray(ExecState*, unsigned initialLength); 82 JSArray* constructArray(ExecState*, JSValue* singleItemValue); 83 JSArray* constructArray(ExecState*, const ArgList& values); 84 77 85 } // namespace KJS 78 86
Note:
See TracChangeset
for help on using the changeset viewer.