2010-11-17 Peter Varga <pvarga@inf.u-szeged.hu>
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 17 Nov 2010 09:42:41 +0000 (09:42 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 17 Nov 2010 09:42:41 +0000 (09:42 +0000)
commitb70279ed1b41eae61108a52b5d50eca0f2374672
treebcc6953c65dd97cbe177232d3a5010044b952280
parent364834841163d24e09d57265ce991f6f0b29b0c6
2010-11-17  Peter Varga  <pvarga@inf.u-szeged.hu>

        Reviewed by Gavin Barraclough.

        Collect the beginning characters in a RegExp pattern for look-up
        optimization
        https://bugs.webkit.org/show_bug.cgi?id=45748

        Extend the YARR's parser with an algorithm which collects the potential
        beginning characters from a RegExp pattern for later look-up optimization.

        * yarr/RegexCompiler.cpp:
        (JSC::Yarr::BeginCharHelper::BeginCharHelper):
        (JSC::Yarr::BeginCharHelper::addBeginChar):
        (JSC::Yarr::BeginCharHelper::merge):
        (JSC::Yarr::BeginCharHelper::addCharacter):
        (JSC::Yarr::BeginCharHelper::linkHotTerms):
        (JSC::Yarr::RegexPatternConstructor::RegexPatternConstructor):
        (JSC::Yarr::RegexPatternConstructor::addBeginTerm):
        (JSC::Yarr::RegexPatternConstructor::setupDisjunctionBeginTerms):
        (JSC::Yarr::RegexPatternConstructor::setupAlternativeBeginTerms):
        (JSC::Yarr::RegexPatternConstructor::setupBeginChars):
        (JSC::Yarr::compileRegex):
        * yarr/RegexPattern.h:
        (JSC::Yarr::TermChain::TermChain):
        (JSC::Yarr::BeginChar::BeginChar):
        (JSC::Yarr::RegexPattern::RegexPattern):
        (JSC::Yarr::RegexPattern::reset):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@72180 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JavaScriptCore/ChangeLog
JavaScriptCore/yarr/RegexCompiler.cpp
JavaScriptCore/yarr/RegexPattern.h