Ignore:
Timestamp:
Dec 10, 2005, 6:06:17 PM (19 years ago)
Author:
darin
Message:

JavaScriptCore:

Rubber stamped by Maciej.

  • did long-promised KJS renaming:

ValueImp -> JSValue
ObjectImp -> JSObject
AllocatedValueImp -> JSCell

A renaming to get a class out of the way

KJS::Bindings::JSObject -> JavaJSObject

and some other "imp-reduction" renaming

*InstanceImp -> *Instance
*ProtoFuncImp -> *ProtoFunc
*PrototypeImp -> *Prototype
ArgumentsImp -> Arguments
RuntimeArrayImp -> RuntimeArray
RuntimeMethodImp -> RuntimeMethod

  • most files and functions

WebCore:

Rubber stamped by Maciej.

  • updated for KJS class renaming
  • many files and functions
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/object_object.cpp

    r11525 r11527  
    3333using namespace KJS;
    3434
    35 // ------------------------------ ObjectPrototypeImp --------------------------------
     35// ------------------------------ ObjectPrototype --------------------------------
    3636
    37 ObjectPrototypeImp::ObjectPrototypeImp(ExecState *exec,
    38                                        FunctionPrototypeImp *funcProto)
    39   : ObjectImp() // [[Prototype]] is null
     37ObjectPrototype::ObjectPrototype(ExecState *exec,
     38                                       FunctionPrototype *funcProto)
     39  : JSObject() // [[Prototype]] is null
    4040{
    41     putDirect(toStringPropertyName, new ObjectProtoFuncImp(exec, funcProto, ObjectProtoFuncImp::ToString,               0), DontEnum);
    42     putDirect(toLocaleStringPropertyName, new ObjectProtoFuncImp(exec, funcProto, ObjectProtoFuncImp::ToLocaleString,   0), DontEnum);
    43     putDirect(valueOfPropertyName, new ObjectProtoFuncImp(exec, funcProto, ObjectProtoFuncImp::ValueOf,                 0), DontEnum);
    44     putDirect("hasOwnProperty", new ObjectProtoFuncImp(exec, funcProto, ObjectProtoFuncImp::HasOwnProperty,             1), DontEnum);
    45     putDirect("propertyIsEnumerable", new ObjectProtoFuncImp(exec, funcProto, ObjectProtoFuncImp::PropertyIsEnumerable, 1), DontEnum);
     41    putDirect(toStringPropertyName, new ObjectProtoFunc(exec, funcProto, ObjectProtoFunc::ToString,               0), DontEnum);
     42    putDirect(toLocaleStringPropertyName, new ObjectProtoFunc(exec, funcProto, ObjectProtoFunc::ToLocaleString,   0), DontEnum);
     43    putDirect(valueOfPropertyName, new ObjectProtoFunc(exec, funcProto, ObjectProtoFunc::ValueOf,                 0), DontEnum);
     44    putDirect("hasOwnProperty", new ObjectProtoFunc(exec, funcProto, ObjectProtoFunc::HasOwnProperty,             1), DontEnum);
     45    putDirect("propertyIsEnumerable", new ObjectProtoFunc(exec, funcProto, ObjectProtoFunc::PropertyIsEnumerable, 1), DontEnum);
    4646}
    4747
    4848
    49 // ------------------------------ ObjectProtoFuncImp --------------------------------
     49// ------------------------------ ObjectProtoFunc --------------------------------
    5050
    51 ObjectProtoFuncImp::ObjectProtoFuncImp(ExecState *exec,
    52                                        FunctionPrototypeImp *funcProto,
     51ObjectProtoFunc::ObjectProtoFunc(ExecState *exec,
     52                                       FunctionPrototype *funcProto,
    5353                                       int i, int len)
    5454  : InternalFunctionImp(funcProto), id(i)
     
    5858
    5959
    60 bool ObjectProtoFuncImp::implementsCall() const
     60bool ObjectProtoFunc::implementsCall() const
    6161{
    6262  return true;
     
    6565// ECMA 15.2.4.2, 15.2.4.4, 15.2.4.5, 15.2.4.7
    6666
    67 ValueImp *ObjectProtoFuncImp::callAsFunction(ExecState *exec, ObjectImp *thisObj, const List &args)
     67JSValue *ObjectProtoFunc::callAsFunction(ExecState *exec, JSObject *thisObj, const List &args)
    6868{
    6969    switch (id) {
     
    8787
    8888ObjectObjectImp::ObjectObjectImp(ExecState *exec,
    89                                  ObjectPrototypeImp *objProto,
    90                                  FunctionPrototypeImp *funcProto)
     89                                 ObjectPrototype *objProto,
     90                                 FunctionPrototype *funcProto)
    9191  : InternalFunctionImp(funcProto)
    9292{
     
    105105
    106106// ECMA 15.2.2
    107 ObjectImp *ObjectObjectImp::construct(ExecState *exec, const List &args)
     107JSObject *ObjectObjectImp::construct(ExecState *exec, const List &args)
    108108{
    109109  // if no arguments have been passed ...
    110110  if (args.isEmpty()) {
    111     ObjectImp *proto = exec->lexicalInterpreter()->builtinObjectPrototype();
    112     ObjectImp *result(new ObjectImp(proto));
     111    JSObject *proto = exec->lexicalInterpreter()->builtinObjectPrototype();
     112    JSObject *result(new JSObject(proto));
    113113    return result;
    114114  }
    115115
    116   ValueImp *arg = *(args.begin());
    117   if (ObjectImp *obj = arg->getObject())
     116  JSValue *arg = *(args.begin());
     117  if (JSObject *obj = arg->getObject())
    118118    return obj;
    119119
     
    127127  case NullType:
    128128  case UndefinedType:
    129     return new ObjectImp(exec->lexicalInterpreter()->builtinObjectPrototype());
     129    return new JSObject(exec->lexicalInterpreter()->builtinObjectPrototype());
    130130  }
    131131}
     
    136136}
    137137
    138 ValueImp *ObjectObjectImp::callAsFunction(ExecState *exec, ObjectImp */*thisObj*/, const List &args)
     138JSValue *ObjectObjectImp::callAsFunction(ExecState *exec, JSObject */*thisObj*/, const List &args)
    139139{
    140   ValueImp *result;
     140  JSValue *result;
    141141
    142142  List argList;
     
    145145    result = construct(exec,argList);
    146146  } else {
    147     ValueImp *arg = args[0];
     147    JSValue *arg = args[0];
    148148    if (arg->isUndefinedOrNull()) {
    149149      argList.append(arg);
Note: See TracChangeset for help on using the changeset viewer.