Changeset 798 in webkit for trunk/JavaScriptCore/kjs/array_object.h
- Timestamp:
- Mar 21, 2002, 4:31:57 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/array_object.h
r6 r798 1 // -*- c-basic-offset: 2 -*- 1 2 /* 2 3 * This file is part of the KDE libraries … … 16 17 * License along with this library; if not, write to the Free Software 17 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * 20 * $Id$ 18 21 */ 19 22 … … 21 24 #define _ARRAY_OBJECT_H_ 22 25 23 #include " object.h"24 #include "function .h"26 #include "internal.h" 27 #include "function_object.h" 25 28 26 29 namespace KJS { 27 30 28 class Array Object : public ConstructorImp {31 class ArrayInstanceImp : public ObjectImp { 29 32 public: 30 ArrayObject(const Object &funcProto, const Object &arrayProto); 31 Completion execute(const List &); 32 Object construct(const List &); 33 ArrayInstanceImp(const Object &proto); 34 35 virtual void put(ExecState *exec, const UString &propertyName, const Value &value, int attr = None); 36 virtual void putDirect(ExecState *exec, const UString &propertyName, const Value &value, int attr = None); 37 38 virtual const ClassInfo *classInfo() const { return &info; } 39 static const ClassInfo info; 33 40 }; 34 41 35 class ArrayPrototype : public ObjectImp {42 class ArrayPrototypeImp : public ArrayInstanceImp { 36 43 public: 37 ArrayPrototype(const Object& proto); 38 virtual KJSO get(const UString &p) const; 44 ArrayPrototypeImp(ExecState *exec, 45 ObjectPrototypeImp *objProto); 46 Value get(ExecState *exec, const UString &p) const; 47 virtual const ClassInfo *classInfo() const { return &info; } 48 static const ClassInfo info; 39 49 }; 40 50 41 class ArrayProtoFunc : public InternalFunctionImp {51 class ArrayProtoFuncImp : public InternalFunctionImp { 42 52 public: 43 ArrayProtoFunc(int i) : id(i) { } 44 Completion execute(const List &); 53 ArrayProtoFuncImp(ExecState *exec, int i, int len); 54 55 virtual bool implementsCall() const; 56 virtual Value call(ExecState *exec, Object &thisObj, const List &args); 57 45 58 enum { ToString, ToLocaleString, Concat, Join, Pop, Push, 46 59 Reverse, Shift, Slice, Sort, Splice, UnShift }; … … 49 62 }; 50 63 64 class ArrayObjectImp : public InternalFunctionImp { 65 public: 66 ArrayObjectImp(ExecState *exec, 67 FunctionPrototypeImp *funcProto, 68 ArrayPrototypeImp *arrayProto); 69 70 virtual bool implementsConstruct() const; 71 virtual Object construct(ExecState *exec, const List &args); 72 virtual bool implementsCall() const; 73 virtual Value call(ExecState *exec, Object &thisObj, const List &args); 74 75 }; 76 51 77 }; // namespace 52 78
Note:
See TracChangeset
for help on using the changeset viewer.