JavaScriptCore:
authorggaren <ggaren@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Nov 2007 21:27:15 +0000 (21:27 +0000)
committerggaren <ggaren@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Nov 2007 21:27:15 +0000 (21:27 +0000)
commit7af0ccbebc7c4756bd14e60ef5d254431a653dc6
tree311c5fe833f038ead45db5de5e01f4f5548d6ca0
parentb14694b5347bf6c32019704d7f5cf3ad5314131a
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.

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

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27448 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
JavaScriptCore/ChangeLog
JavaScriptCore/JavaScriptCore.exp
JavaScriptCore/kjs/array_instance.cpp
JavaScriptCore/kjs/array_object.cpp
JavaScriptCore/kjs/bool_object.cpp
JavaScriptCore/kjs/function.cpp
JavaScriptCore/kjs/function_object.cpp
JavaScriptCore/kjs/list.cpp
JavaScriptCore/kjs/list.h
JavaScriptCore/kjs/regexp_object.cpp
JavaScriptCore/kjs/string_object.cpp
JavaScriptCore/wtf/Vector.h
WebCore/ChangeLog
WebCore/bindings/js/kjs_window.cpp
WebKit/ChangeLog
WebKit/ForwardingHeaders/kjs/value.h [new file with mode: 0644]