JavaScriptCore:
authorrjw <rjw@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 26 Jan 2005 21:38:10 +0000 (21:38 +0000)
committerrjw <rjw@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 26 Jan 2005 21:38:10 +0000 (21:38 +0000)
commitd779e6d46885872301257716ccec5e67bc464a6a
tree70610b48ef46d4d8d189174d88e299030fb8cc8f
parentd36ade66a48c47ba221c9bcebfcc1b1676e8b6b1
JavaScriptCore:
Fixed <rdar://problem/3972522> (179-180) 40% slowdown on iBench JavaScript test

I added a member variable to ObjectImp.  This changed it's size and consequently
hampered the optimizations built into the garbage collector.  Objects no longer
fit within the allocators cell size, and thus allocation fell back to a slower
allocator.

As a result of this fix I also dramatically cleaned up how runtime objects are
accessed.  The path mostly *removes* code.

        Reviewed by Chris.

        * bindings/runtime_method.cpp:
        (RuntimeMethodImp::call):
        * bindings/runtime_object.cpp:
        (RuntimeObjectImp::get):
        (RuntimeObjectImp::put):
        (RuntimeObjectImp::canPut):
        (RuntimeObjectImp::hasProperty):
        (RuntimeObjectImp::defaultValue):
        * bindings/runtime_object.h:
        * kjs/object.cpp:
        (KJS::ObjectImp::ObjectImp):
        * kjs/object.h:

WebCore:
Fixed <rdar://problem/3972522> (179-180) 40% slowdown on iBench JavaScript test

I added a member variable to ObjectImp.  This changed it's size and consequently
hampered the optimizations built into the garbage collector.  Objects no longer
fit within the allocators cell size, and thus allocation fell back to a slower
allocator.

As a result of this fix I also dramatically cleaned up how runtime objects are
accessed.  The path mostly *removes* code.

        Reviewed by Chris.

        * khtml/ecma/kjs_dom.cpp:
        (DOMDocumentProtoFunc::tryCall):
        (DOMElementProtoFunc::tryCall):
        (KJS::getRuntimeObject):
        * khtml/ecma/kjs_dom.h:
        * khtml/ecma/kjs_html.cpp:
        (KJS::HTMLDocument::tryGet):
        (KJS::HTMLElement::tryGet):
        (KJS::HTMLElement::implementsCall):
        (KJS::HTMLElement::call):
        (KJS::HTMLElement::tryPut):
        (KJS::HTMLCollection::tryGet):
        (KJS::HTMLCollection::getNamedItems):
        * khtml/ecma/kjs_html.h:
        * khtml/ecma/kjs_window.cpp:
        (Window::get):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8453 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
JavaScriptCore/ChangeLog
JavaScriptCore/bindings/runtime_method.cpp
JavaScriptCore/bindings/runtime_object.cpp
JavaScriptCore/bindings/runtime_object.h
JavaScriptCore/kjs/object.cpp
JavaScriptCore/kjs/object.h
WebCore/ChangeLog-2005-08-23
WebCore/khtml/ecma/kjs_dom.cpp
WebCore/khtml/ecma/kjs_dom.h
WebCore/khtml/ecma/kjs_html.cpp
WebCore/khtml/ecma/kjs_html.h
WebCore/khtml/ecma/kjs_window.cpp