]>
git.saurik.com Git - apple/javascriptcore.git/blob - kjs/array_object.h
2 * Copyright (C) 1999-2000 Harri Porten (porten@kde.org)
3 * Copyright (C) 2007 Apple Inc. All rights reserved.
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 #ifndef ARRAY_OBJECT_H_
22 #define ARRAY_OBJECT_H_
24 #include "array_instance.h"
25 #include "function_object.h"
30 class ArrayPrototype
: public ArrayInstance
{
32 ArrayPrototype(ExecState
*, ObjectPrototype
*);
34 bool getOwnPropertySlot(ExecState
*, const Identifier
&, PropertySlot
&);
35 virtual const ClassInfo
* classInfo() const { return &info
; }
36 static const ClassInfo info
;
39 class ArrayObjectImp
: public InternalFunctionImp
{
41 ArrayObjectImp(ExecState
*, FunctionPrototype
*, ArrayPrototype
*);
43 virtual bool implementsConstruct() const;
44 virtual JSObject
* construct(ExecState
*, const List
&);
45 virtual JSValue
* callAsFunction(ExecState
*, JSObject
*, const List
&);
49 JSValue
* arrayProtoFuncToString(ExecState
*, JSObject
*, const List
&);
50 JSValue
* arrayProtoFuncToLocaleString(ExecState
*, JSObject
*, const List
&);
51 JSValue
* arrayProtoFuncConcat(ExecState
*, JSObject
*, const List
&);
52 JSValue
* arrayProtoFuncJoin(ExecState
*, JSObject
*, const List
&);
53 JSValue
* arrayProtoFuncPop(ExecState
*, JSObject
*, const List
&);
54 JSValue
* arrayProtoFuncPush(ExecState
*, JSObject
*, const List
&);
55 JSValue
* arrayProtoFuncReverse(ExecState
*, JSObject
*, const List
&);
56 JSValue
* arrayProtoFuncShift(ExecState
*, JSObject
*, const List
&);
57 JSValue
* arrayProtoFuncSlice(ExecState
*, JSObject
*, const List
&);
58 JSValue
* arrayProtoFuncSort(ExecState
*, JSObject
*, const List
&);
59 JSValue
* arrayProtoFuncSplice(ExecState
*, JSObject
*, const List
&);
60 JSValue
* arrayProtoFuncUnShift(ExecState
*, JSObject
*, const List
&);
61 JSValue
* arrayProtoFuncEvery(ExecState
*, JSObject
*, const List
&);
62 JSValue
* arrayProtoFuncForEach(ExecState
*, JSObject
*, const List
&);
63 JSValue
* arrayProtoFuncSome(ExecState
*, JSObject
*, const List
&);
64 JSValue
* arrayProtoFuncIndexOf(ExecState
*, JSObject
*, const List
&);
65 JSValue
* arrayProtoFuncFilter(ExecState
*, JSObject
*, const List
&);
66 JSValue
* arrayProtoFuncMap(ExecState
*, JSObject
*, const List
&);
67 JSValue
* arrayProtoFuncLastIndexOf(ExecState
*, JSObject
*, const List
&);
71 #endif // ARRAY_OBJECT_H_