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/RegexPattern.h

    r42481 r42800  
    9191            unsigned subpatternId;
    9292            unsigned lastSubpatternId;
     93            bool isCopy;
    9394        } parentheses;
    9495    };
     
    121122        parentheses.disjunction = disjunction;
    122123        parentheses.subpatternId = subpatternId;
     124        parentheses.isCopy = false;
    123125        quantityType = QuantifierFixedCount;
    124126        quantityCount = 1;
Note: See TracChangeset for help on using the changeset viewer.