ArrayPrototype.h 1.6 KB
Newer Older
1 2
/*
 *  Copyright (C) 1999-2000 Harri Porten (porten@kde.org)
3
 *  Copyright (C) 2007, 2011 Apple Inc. All rights reserved.
4 5 6 7 8 9 10 11 12 13 14 15 16
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License as published by the Free Software Foundation; either
 *  version 2 of the License, or (at your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public
 *  License along with this library; if not, write to the Free Software
mjs's avatar
mjs committed
17
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
18
 *
19 20
 */

darin@apple.com's avatar
darin@apple.com committed
21 22
#ifndef ArrayPrototype_h
#define ArrayPrototype_h
23

darin@apple.com's avatar
darin@apple.com committed
24
#include "JSArray.h"
25
#include "Lookup.h"
26

27
namespace JSC {
28

29 30
class ArrayPrototype : public JSArray {
private:
31
    ArrayPrototype(VM&, Structure*);
32

33 34
public:
    typedef JSArray Base;
35

oliver@apple.com's avatar
oliver@apple.com committed
36
    static ArrayPrototype* create(VM&, JSGlobalObject*, Structure*);
37
        
38
    static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&);
39

40
    DECLARE_INFO;
41

ggaren@apple.com's avatar
ggaren@apple.com committed
42
    static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
43
    {
44
        return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info(), ArrayClass);
45
    }
46

47
protected:
oliver@apple.com's avatar
oliver@apple.com committed
48
    void finishCreation(VM&, JSGlobalObject*);
49
};
50

51
} // namespace JSC
52

darin@apple.com's avatar
darin@apple.com committed
53
#endif // ArrayPrototype_h