22 #ifndef ARRAY_INSTANCE_H
23 #define ARRAY_INSTANCE_H
29 class ArrayInstanceImp :
public ObjectImp {
31 ArrayInstanceImp(ObjectImp *proto,
unsigned initialLength);
32 ArrayInstanceImp(ObjectImp *proto,
const List &initialValues);
35 virtual Value get(ExecState *exec,
const Identifier &propertyName)
const;
36 virtual Value getPropertyByIndex(ExecState *exec,
unsigned propertyName)
const;
37 virtual void put(ExecState *exec,
const Identifier &propertyName,
const Value &value,
int attr = None);
38 virtual void putPropertyByIndex(ExecState *exec,
unsigned propertyName,
const Value &value,
int attr = None);
39 virtual bool hasProperty(ExecState *exec,
const Identifier &propertyName)
const;
40 virtual bool hasPropertyByIndex(ExecState *exec,
unsigned propertyName)
const;
41 virtual bool deleteProperty(ExecState *exec,
const Identifier &propertyName);
42 virtual bool deletePropertyByIndex(ExecState *exec,
unsigned propertyName);
43 virtual ReferenceList propList(ExecState *exec,
bool recursive);
47 virtual const ClassInfo *classInfo()
const {
return &info; }
48 static const ClassInfo info;
50 unsigned getLength()
const {
return length; }
52 void sort(ExecState *exec);
53 void sort(ExecState *exec, Object &compareFunction);
56 void setLength(
unsigned newLength, ExecState *exec);
58 unsigned pushUndefinedObjectsToEnd(ExecState *exec);
60 void resizeStorage(
unsigned);
63 unsigned storageLength;