Optimize V8 getDOMNodeMap(), a hot function in Dromaeo DOM tests, by increasing inlining.
authorsnej@chromium.org <snej@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Nov 2009 19:19:50 +0000 (19:19 +0000)
committersnej@chromium.org <snej@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Nov 2009 19:19:50 +0000 (19:19 +0000)
commitdafa3a9c02b51dc8001261b8d56a596d8de73d0e
tree96ffef76c9d6803f90202c3808f516ac72c0e260
parent0b0828df783401ee052eb3e74ec46fb261719303
Optimize V8 getDOMNodeMap(), a hot function in Dromaeo DOM tests, by increasing inlining.

Reviewed by Dimitri Glazkov.

* bindings/v8/DOMData.cpp:
(WebCore::DOMData::getCurrent):  Moved getCurrentMainThread to MainThreadDOMData::getCurrent
    so it can be inlined by its caller.
* bindings/v8/DOMData.h:
* bindings/v8/MainThreadDOMData.cpp:
(WebCore::MainThreadDOMData::getCurrent):  Moved here from DOMData.cpp.
(WebCore::MainThreadDOMData::getMainThreadStore):  Added UNLIKELY macro to improve codegen.
(WebCore::MainThreadDOMData::getCurrentMainThreadStore):  Combination of getCurrentMainThread
    and getStore, which inline both calls together.
* bindings/v8/MainThreadDOMData.h:
(WebCore::MainThreadDOMData::getStore):  Broke out nonvirtual getMainThreadStore for inlineability.
* bindings/v8/V8DOMMap.cpp:
(WebCore::getDOMNodeMap):  Call new getCurrentMainThreadStore, which is faster.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@50826 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/bindings/v8/DOMData.cpp
WebCore/bindings/v8/DOMData.h
WebCore/bindings/v8/MainThreadDOMData.cpp
WebCore/bindings/v8/MainThreadDOMData.h
WebCore/bindings/v8/V8DOMMap.cpp