Ignore:
Timestamp:
Mar 21, 2002, 4:31:57 PM (23 years ago)
Author:
mjs
Message:

Merged changes from LABYRINTH_KDE_3_MERGE branch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/array_object.h

    r6 r798  
     1// -*- c-basic-offset: 2 -*-
    12/*
    23 *  This file is part of the KDE libraries
     
    1617 *  License along with this library; if not, write to the Free Software
    1718 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     19 *
     20 *  $Id$
    1821 */
    1922
     
    2124#define _ARRAY_OBJECT_H_
    2225
    23 #include "object.h"
    24 #include "function.h"
     26#include "internal.h"
     27#include "function_object.h"
    2528
    2629namespace KJS {
    2730
    28   class ArrayObject : public ConstructorImp {
     31  class ArrayInstanceImp : public ObjectImp {
    2932  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;
    3340  };
    3441
    35   class ArrayPrototype : public ObjectImp {
     42 class ArrayPrototypeImp : public ArrayInstanceImp {
    3643  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;
    3949  };
    4050
    41   class ArrayProtoFunc : public InternalFunctionImp {
     51  class ArrayProtoFuncImp : public InternalFunctionImp {
    4252  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
    4558    enum { ToString, ToLocaleString, Concat, Join, Pop, Push,
    4659           Reverse, Shift, Slice, Sort, Splice, UnShift };
     
    4962  };
    5063
     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
    5177}; // namespace
    5278
Note: See TracChangeset for help on using the changeset viewer.