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/RegexInterpreter.cpp

    r72781 r72999  
    720720                    // Technically this access to inputPosition should be accessing the begin term's
    721721                    // inputPosition, but for repeats other than fixed these values should be
    722                     // the same anyway! (we don't pre-check for greedy or non-greedy matches.)
     722                    // the same anyway! (We don't pre-check for greedy or non-greedy matches.)
    723723                    ASSERT((&term - term.atom.parenthesesWidth)->type == ByteTerm::TypeParenthesesSubpatternOnceBegin);
    724724                    ASSERT((&term - term.atom.parenthesesWidth)->inputPosition == term.inputPosition);
     
    740740        ASSERT(term.type == ByteTerm::TypeParenthesesSubpatternTerminalBegin);
    741741        ASSERT(term.atom.quantityType == QuantifierGreedy);
    742         ASSERT(term.atom.quantityCount == UINT_MAX);
     742        ASSERT(term.atom.quantityCount == quantifyInfinite);
    743743        ASSERT(!term.capture());
    744744
     
    766766        ASSERT(term.type == ByteTerm::TypeParenthesesSubpatternTerminalBegin);
    767767        ASSERT(term.atom.quantityType == QuantifierGreedy);
    768         ASSERT(term.atom.quantityCount == UINT_MAX);
     768        ASSERT(term.atom.quantityCount == quantifyInfinite);
    769769        ASSERT(!term.capture());
    770770
     
    778778    {
    779779        // 'Terminal' parentheses are at the end of the regex, and as such a match past end
    780         // should always be returned as a successful match - we should never becktrack to here.
     780        // should always be returned as a successful match - we should never backtrack to here.
    781781        ASSERT_NOT_REACHED();
    782782        return false;
Note: See TracChangeset for help on using the changeset viewer.