23 #ifndef ARRAY_INSTANCE_H
24 #define ARRAY_INSTANCE_H
30 class ArrayInstanceImp :
public ObjectImp {
32 ArrayInstanceImp(ObjectImp *proto,
unsigned initialLength);
33 ArrayInstanceImp(ObjectImp *proto,
const List &initialValues);
36 virtual Value
get(ExecState *exec,
const Identifier &propertyName)
const;
37 virtual Value getPropertyByIndex(ExecState *exec,
unsigned propertyName)
const;
38 virtual void put(ExecState *exec,
const Identifier &propertyName,
const Value &value,
int attr = None);
39 virtual void putPropertyByIndex(ExecState *exec,
unsigned propertyName,
const Value &value,
int attr = None);
40 virtual bool hasProperty(ExecState *exec,
const Identifier &propertyName)
const;
41 virtual bool hasPropertyByIndex(ExecState *exec,
unsigned propertyName)
const;
42 virtual bool deleteProperty(ExecState *exec,
const Identifier &propertyName);
43 virtual bool deletePropertyByIndex(ExecState *exec,
unsigned propertyName);
44 virtual ReferenceList propList(ExecState *exec,
bool recursive);
48 virtual const ClassInfo *classInfo()
const {
return &info; }
49 static const ClassInfo info;
51 unsigned getLength()
const {
return length; }
53 void sort(ExecState *exec);
54 void sort(ExecState *exec, Object &compareFunction);
57 void setLength(
unsigned newLength, ExecState *exec);
59 unsigned pushUndefinedObjectsToEnd(ExecState *exec);
61 void resizeStorage(
unsigned);
64 unsigned storageLength;