Ignore:
Timestamp:
Nov 5, 2007, 1:27:15 PM (18 years ago)
Author:
ggaren
Message:

JavaScriptCore:

Reviewed by Darin Adler.


http://bugs.webkit.org/show_bug.cgi?id=15835

Switched List implementation from a custom heap allocator to an inline
Vector, for a disappointing .5% SunSpider speedup.


Also renamed List::slice to List::getSlice because "get" is the
conventional prefix for functions returning a value through an out
parameter.

  • kjs/array_object.cpp: (KJS::ArrayProtoFunc::callAsFunction): Removed some redundant function calls and memory accesses.
  • kjs/bool_object.cpp: (BooleanObjectImp::construct): Removed questionable use of iterator.
  • kjs/list.cpp:
  • kjs/list.h: New List class, implemented in terms of Vector. Two interesting differences:
    1. The inline capacity is 8, not 5. Many of the Lists constructed during a SunSpider run are larger than 5; almost none are larger than 8.
  1. The growth factor is 4, not 2. Since we can guarantee that Lists aren't long-lived, we can grow them more aggressively, to avoid excessive copying.
  • kjs/regexp_object.cpp: (RegExpObjectImp::construct): Removed redundant function calls.
  • kjs/string_object.cpp: (KJS::StringObjectImp::construct): Removed questionable use of iterator.
  • wtf/Vector.h: (WTF::::uncheckedAppend): Added a fast, unchecked version of append.

WebCore:

Reviewed by Darin Adler.


http://bugs.webkit.org/show_bug.cgi?id=15835

Small adaptations to new KJS::List class.

  • bindings/js/kjs_window.cpp: (KJS::WindowFunc::callAsFunction): (KJS::ScheduledAction::ScheduledAction):

WebKit:

Reviewed by Darin Adler.


http://bugs.webkit.org/show_bug.cgi?id=15835

Small adaptations to new KJS::List class.

  • ForwardingHeaders/kjs/value.h: Added.
File:
1 edited

Legend:

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

    r27413 r27448  
    417417JSObject *RegExpObjectImp::construct(ExecState *exec, const List &args)
    418418{
    419   JSObject *o = args[0]->getObject();
     419  JSValue* arg0 = args[0];
     420  JSValue* arg1 = args[1];
     421 
     422  JSObject* o = arg0->getObject();
    420423  if (o && o->inherits(&RegExpImp::info)) {
    421     if (!args[1]->isUndefined())
     424    if (!arg1->isUndefined())
    422425      return throwError(exec, TypeError);
    423426    return o;
    424427  }
    425428 
    426   UString p = args[0]->isUndefined() ? UString("") : args[0]->toString(exec);
    427   UString flags = args[1]->isUndefined() ? UString("") : args[1]->toString(exec);
     429  UString p = arg0->isUndefined() ? UString("") : arg0->toString(exec);
     430  UString flags = arg1->isUndefined() ? UString("") : arg1->toString(exec);
    428431
    429432  RegExpPrototype* proto = static_cast<RegExpPrototype*>(exec->lexicalInterpreter()->builtinRegExpPrototype());
Note: See TracChangeset for help on using the changeset viewer.