Inline Node::traverseNextNode
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 May 2012 19:52:05 +0000 (19:52 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 May 2012 19:52:05 +0000 (19:52 +0000)
commitcc6cfd2244a442fb41a0e331a6386274c776e367
tree062ce5da1508a8466f063b5717925b96cbeacc39
parent8754f96e5b8276280a5c726f6f8d4e6f5b814540
Inline Node::traverseNextNode
https://bugs.webkit.org/show_bug.cgi?id=85844

Reviewed by Ryosuke Niwa.

Inline traverseNextNode and traverseNextSibling to reduce entry/exit overhead and allow better code generation
for many hot loops.

In this version only the firstChild()/nextSibling() tests are inlined and the ancestor traversal is not.

Performance bots will tell if this was worthwhile.

* dom/ContainerNode.h:
(WebCore::Node::traverseNextNode):
(WebCore):
(WebCore::Node::traverseNextSibling):
* dom/Node.cpp:
(WebCore::Node::traverseNextAncestorSibling):
* dom/Node.h:
(Node):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@116677 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/dom/ContainerNode.h
Source/WebCore/dom/Node.cpp
Source/WebCore/dom/Node.h