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


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.cpp

    r2535 r2736  
    4242namespace KJS {
    4343
     44extern const UString argumentsPropertyName("arguments");
    4445extern const UString lengthPropertyName("length");
    4546extern const UString prototypePropertyName("prototype");
Note: See TracChangeset for help on using the changeset viewer.