Ignore:
Timestamp:
Nov 30, 2010, 6:46:28 PM (15 years ago)
Author:
[email protected]
Message:

JavaScriptCore: Fixed review comments following bug #48101.
Mostly typos, plus gave quantifyInfinite a symbolic name.

Reviewed by Darin Adler.

  • yarr/RegexCompiler.cpp:

(JSC::Yarr::RegexPatternConstructor::quantifyAtom):
(JSC::Yarr::RegexPatternConstructor::checkForTerminalParentheses):

  • yarr/RegexInterpreter.cpp:

(JSC::Yarr::Interpreter::backtrackParenthesesOnceEnd):
(JSC::Yarr::Interpreter::matchParenthesesTerminalBegin):
(JSC::Yarr::Interpreter::backtrackParenthesesTerminalBegin):
(JSC::Yarr::Interpreter::backtrackParenthesesTerminalEnd):

  • yarr/RegexJIT.cpp:

(JSC::Yarr::RegexGenerator::generatePatternCharacterGreedy):
(JSC::Yarr::RegexGenerator::generatePatternCharacterNonGreedy):
(JSC::Yarr::RegexGenerator::generateCharacterClassGreedy):

  • yarr/RegexParser.h:

(JSC::Yarr::Parser::parseTokens):
(JSC::Yarr::parse):

LayoutTests: Ooops, file checked in with incorrect properties.

Reviewed by Darin Adler.

  • fast/regex/script-tests/repeat-match-waldemar.js: Removed property svn:executable.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/yarr/RegexParser.h

    r72813 r72999  
    3333
    3434namespace JSC { namespace Yarr {
     35
     36static const unsigned quantifyInfinite = UINT_MAX;
    3537
    3638enum BuiltInCharacterClassID {
     
    595597            case '*':
    596598                consume();
    597                 parseQuantifier(lastTokenWasAnAtom, 0, UINT_MAX);
     599                parseQuantifier(lastTokenWasAnAtom, 0, quantifyInfinite);
    598600                lastTokenWasAnAtom = false;
    599601                break;
     
    601603            case '+':
    602604                consume();
    603                 parseQuantifier(lastTokenWasAnAtom, 1, UINT_MAX);
     605                parseQuantifier(lastTokenWasAnAtom, 1, quantifyInfinite);
    604606                lastTokenWasAnAtom = false;
    605607                break;
     
    620622                   
    621623                    if (tryConsume(','))
    622                         max = peekIsDigit() ? consumeNumber() : UINT_MAX;
     624                        max = peekIsDigit() ? consumeNumber() : quantifyInfinite;
    623625
    624626                    if (tryConsume('}')) {
     
    862864
    863865template<class Delegate>
    864 const char* parse(Delegate& delegate, const UString& pattern, unsigned backReferenceLimit = UINT_MAX)
     866const char* parse(Delegate& delegate, const UString& pattern, unsigned backReferenceLimit = quantifyInfinite)
    865867{
    866868    return Parser<Delegate>(delegate, pattern, backReferenceLimit).parse();
Note: See TracChangeset for help on using the changeset viewer.