2010-12-10 Michael Saboff <msaboff@apple.com>
authormsaboff@apple.com <msaboff@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 12 Dec 2010 03:24:56 +0000 (03:24 +0000)
committermsaboff@apple.com <msaboff@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 12 Dec 2010 03:24:56 +0000 (03:24 +0000)
commitce9e50d55c2ad3ae680875648eeace8a45558d0a
treee8a66a2835b50e7a1e06f6775e502b3513734064
parent1857125d6b44b891cecb7e1f206fa4445c662983
2010-12-10  Michael Saboff  <msaboff@apple.com>

        Reviewed by Gavin Barraclough.

        REGRESSION Hang inside Yarr::RegexCodeBlock::execute when visiting
        bugs.webkit.org
        https://bugs.webkit.org/show_bug.cgi?id=50816

        First nested parentheses of the second or greater alternative
        where backtracking to the prior parentheses.  Changed the default
        handling of initial parentheses for all alternatives to go back
        to the immediate outer paren.

        * yarr/RegexJIT.cpp:
        (JSC::Yarr::RegexGenerator::GenerationState::addParenthesesTail):
        (JSC::Yarr::RegexGenerator::TermGenerationState::TermGenerationState):
        (JSC::Yarr::RegexGenerator::TermGenerationState::isLastTerm):
        (JSC::Yarr::RegexGenerator::TermGenerationState::getTermIndex):
        (JSC::Yarr::RegexGenerator::TermGenerationState::setParenthesesTail):
        (JSC::Yarr::RegexGenerator::TermGenerationState::getParenthesesTail):
        (JSC::Yarr::RegexGenerator::ParenthesesTail::ParenthesesTail):
        (JSC::Yarr::RegexGenerator::ParenthesesTail::processBacktracks):
        (JSC::Yarr::RegexGenerator::ParenthesesTail::generateCode):
        (JSC::Yarr::RegexGenerator::generateParenthesesSingle):
2010-12-10  Michael Saboff  <msaboff@apple.com>

        Reviewed by Gavin Barraclough.

        REGRESSION Hang inside Yarr::RegexCodeBlock::execute when visiting
        bugs.webkit.org
        https://bugs.webkit.org/show_bug.cgi?id=50816

        New test to verify proper backtracking of alternative nested parens.

        * fast/regex/parentheses-expected.txt:
        * fast/regex/script-tests/parentheses.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@73866 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JavaScriptCore/ChangeLog
JavaScriptCore/yarr/RegexJIT.cpp
LayoutTests/ChangeLog
LayoutTests/fast/regex/parentheses-expected.txt
LayoutTests/fast/regex/script-tests/parentheses.js