Ignore:
Timestamp:
Nov 20, 2002, 1:12:14 PM (23 years ago)
Author:
darin
Message:
  • decrease ref/deref -- 5% speedup in iBench
  • JavaScriptCore.pbproj/project.pbxproj: Added array_instance.h
  • kjs/array_instance.h: Added so it can be shared by function.h.
  • kjs/array_object.cpp:
  • kjs/array_object.h:
  • kjs/bool_object.cpp:
  • kjs/bool_object.h:
  • kjs/collector.cpp:
  • kjs/date_object.cpp:
  • kjs/date_object.h:
  • kjs/error_object.cpp:
  • kjs/function.cpp:
  • kjs/function.h:
  • kjs/function_object.cpp:
  • kjs/internal.cpp:
  • kjs/internal.h:
  • kjs/math_object.cpp:
  • kjs/nodes.cpp:
  • kjs/number_object.cpp:
  • kjs/object.cpp:
  • kjs/object.h:
  • kjs/object_object.cpp:
  • kjs/property_map.cpp:
  • kjs/reference.cpp:
  • kjs/reference.h:
  • kjs/regexp_object.cpp:
  • kjs/string_object.cpp:
  • kjs/string_object.h:
  • kjs/value.cpp:
  • kjs/value.h: Switched lots of interfaces so they don't require ref/deref.
File:
1 edited

Legend:

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

    r2778 r2783  
    4141{
    4242  Value protect(this);
    43   put(exec, toStringPropertyName, Object(new FunctionProtoFuncImp(exec, this, FunctionProtoFuncImp::ToString, 0)), DontEnum);
    44   put(exec, "apply",    Object(new FunctionProtoFuncImp(exec, this, FunctionProtoFuncImp::Apply,    2)), DontEnum);
    45   put(exec, "call",     Object(new FunctionProtoFuncImp(exec, this, FunctionProtoFuncImp::Call,     1)), DontEnum);
     43  putDirect(toStringPropertyName, new FunctionProtoFuncImp(exec, this, FunctionProtoFuncImp::ToString, 0), DontEnum);
     44  static const Identifier applyPropertyName("apply");
     45  putDirect(applyPropertyName,    new FunctionProtoFuncImp(exec, this, FunctionProtoFuncImp::Apply,    2), DontEnum);
     46  static const Identifier callPropertyName("call");
     47  putDirect(callPropertyName,     new FunctionProtoFuncImp(exec, this, FunctionProtoFuncImp::Call,     1), DontEnum);
    4648}
    4749
     
    6870{
    6971  Value protect(this);
    70   put(exec,lengthPropertyName,Number(len),DontDelete|ReadOnly|DontEnum);
     72  putDirect(lengthPropertyName, len, DontDelete|ReadOnly|DontEnum);
    7173}
    7274
     
    175177{
    176178  Value protect(this);
    177   put(exec,prototypePropertyName, Object(funcProto), DontEnum|DontDelete|ReadOnly);
     179  putDirect(prototypePropertyName, funcProto, DontEnum|DontDelete|ReadOnly);
    178180
    179181  // no. of arguments for constructor
    180   put(exec,lengthPropertyName, Number(1), ReadOnly|DontDelete|DontEnum);
     182  putDirect(lengthPropertyName, NumberImp::one(), ReadOnly|DontDelete|DontEnum);
    181183}
    182184
     
    276278  }
    277279
    278   fimp->put(exec,lengthPropertyName, Number(params),ReadOnly|DontDelete|DontEnum);
    279280  List consArgs;
    280281
    281282  Object objCons = exec->interpreter()->builtinObject();
    282283  Object prototype = objCons.construct(exec,List::empty());
    283   prototype.put(exec, constructorPropertyName,
    284                 Object(fimp), DontEnum|DontDelete|ReadOnly);
    285   fimp->put(exec,prototypePropertyName,prototype,DontEnum|DontDelete|ReadOnly);
     284  prototype.put(exec, constructorPropertyName, Value(fimp), DontEnum|DontDelete|ReadOnly);
     285  fimp->put(exec, prototypePropertyName, prototype, DontEnum|DontDelete|ReadOnly);
    286286  return ret;
    287287}
Note: See TracChangeset for help on using the changeset viewer.