Changeset 2736 in webkit for trunk/JavaScriptCore/kjs/object.h


Ignore:
Timestamp:
Nov 18, 2002, 1:55:23 PM (23 years ago)
Author:
darin
Message:
  • fix worst speed problems on the sort page of the iBench JavaScript test

Sped up JavaScript iBench by 70%, the sort page by 88%.

  • kjs/array_object.h: Add array-specific sort functions.
  • kjs/array_object.cpp: (compareByStringForQSort): Added. (ArrayInstanceImp::sort): Added. (compareWithCompareFunctionForQSort): Added. (ArrayProtoFuncImp::call): Use ArrayInstanceImp::sort if the object being sorted is actually an array.
  • kjs/object.h: Add argumentsPropertyName.
  • kjs/object.cpp: Add argumentsPropertyName.
  • kjs/function.cpp: (FunctionImp::FunctionImp): Use argumentsPropertyName to avoid making a UString. (FunctionImp::call): Ditto. (ActivationImp::ActivationImp): Ditto.
  • kjs/function_object.cpp: (FunctionObjectImp::construct): Ditto.
  • kjs/ustring.h: Added compare function for -1/0/+1 comparison.
  • kjs/ustring.cpp: (KJS::compare): Added.
File:
1 edited

Legend:

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

    r2184 r2736  
    706706    { imp()->setInternalValue(v); }
    707707
     708  extern const UString argumentsPropertyName;
    708709  extern const UString lengthPropertyName;
    709710  extern const UString prototypePropertyName;
Note: See TracChangeset for help on using the changeset viewer.