Ignore:
Timestamp:
Apr 23, 2009, 5:32:31 PM (16 years ago)
Author:
[email protected]
Message:

JavaScriptCore:

2009-04-23 Gavin Barraclough <[email protected]>

Reviewed by Geoff "Dread Pirate Roberts" Garen.

Various small fixes to YARR JIT, in preparation for enabling it by default.

  • Correctly index into the callframe when storing restart addresses for nested alternatives.
  • Allow backtracking back into matched alternatives of parentheses.
  • Fix callframe offset calculation for parenthetical assertions.
  • When a set of parenthese are quantified with a fixed and variable portion, and the variable portion is quantified once, this should not reset the pattern match on failure to match (the last match from the firxed portion should be preserved).
  • Up the pattern size limit to match PCRE's new limit.
  • Unlclosed parentheses should be reported with the message "missing )".
  • wtf/Platform.h:
  • yarr/RegexCompiler.cpp: (JSC::Yarr::RegexPatternConstructor::quantifyAtom): (JSC::Yarr::RegexPatternConstructor::setupAlternativeOffsets):
  • yarr/RegexInterpreter.cpp: (JSC::Yarr::Interpreter::matchParentheses): (JSC::Yarr::Interpreter::backtrackParentheses): (JSC::Yarr::ByteCompiler::emitDisjunction):
  • yarr/RegexJIT.cpp: (JSC::Yarr::RegexGenerator::loadFromFrameAndJump): (JSC::Yarr::RegexGenerator::generateParenthesesDisjunction): (JSC::Yarr::RegexGenerator::generateParentheticalAssertion): (JSC::Yarr::RegexGenerator::generateTerm): (JSC::Yarr::executeRegex):
  • yarr/RegexParser.h: (JSC::Yarr::Parser::): (JSC::Yarr::Parser::parseTokens): (JSC::Yarr::Parser::parse):
  • yarr/RegexPattern.h: (JSC::Yarr::PatternTerm::): (JSC::Yarr::PatternTerm::PatternTerm):

LayoutTests:

2009-04-23 Gavin Barraclough <[email protected]>

Reviewed by Geoff "Dread Pirate Roberts" Garen.

This test tries to force itself into PCRE; modify the
test so that as well as dodging WREC it can also avoid
YARR!

  • fast/js/resources/regexp-overflow-too-big.js:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/yarr/RegexInterpreter.cpp

    r42481 r42800  
    777777    {
    778778        ASSERT(term.type == ByteTerm::TypeParenthesesSubpattern);
    779         ASSERT(term.atom.quantityCount > 1);
    780779
    781780        BackTrackInfoParentheses* backTrack = reinterpret_cast<BackTrackInfoParentheses*>(context->frame + term.frameLocation);
     
    853852    {
    854853        ASSERT(term.type == ByteTerm::TypeParenthesesSubpattern);
    855         ASSERT(term.atom.quantityCount > 1);
    856854
    857855        BackTrackInfoParentheses* backTrack = reinterpret_cast<BackTrackInfoParentheses*>(context->frame + term.frameLocation);
     
    14381436                case PatternTerm::TypeParenthesesSubpattern: {
    14391437                    unsigned disjunctionAlreadyCheckedCount = 0;
    1440                     if (term.quantityCount == 1) {
     1438                    if ((term.quantityCount == 1) && !term.parentheses.isCopy) {
    14411439                        if (term.quantityType == QuantifierFixedCount) {
    14421440                            disjunctionAlreadyCheckedCount = term.parentheses.disjunction->m_minimumSize;
Note: See TracChangeset for help on using the changeset viewer.