Reviewed by Dave.
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 9 May 2004 04:55:11 +0000 (04:55 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 9 May 2004 04:55:11 +0000 (04:55 +0000)
commit074abc44fa69e7a13ded276dfe6767be2d475543
tree8ad2d52eb06e2455efebcb023aa61e2245258d3f
parentdb4847a0dcc37e4e4d7bc9672f814a5c31aa7459
    Reviewed by Dave.

- change things around so extremely hot TokenizerString::current()
method doesn't have to do any work. It's cheaper to maintain the
relevant state than to always compute it.

        * khtml/misc/stringit.h:
        (khtml::TokenizerString::TokenizerString): Initialize m_currentChar
        (khtml::TokenizerString::push): update m_currentChar
        (khtml::TokenizerString::advance): ditto
        (khtml::TokenizerString::current): return m_currentChar
        * khtml/misc/stringit.cpp:
        (khtml::TokenizerString::clear): update m_currentChar
        (khtml::TokenizerString::append): update m_currentChar
        (khtml::TokenizerString::prepend): update m_currentChar

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6562 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog-2005-08-23
WebCore/khtml/misc/stringit.cpp
WebCore/khtml/misc/stringit.h