https://bugs.webkit.org/show_bug.cgi?id=51872
Patch by Peter Varga <pvarga@inf.u-szeged.hu> on 2011-01-10
Reviewed by Gavin Barraclough.
Replace the "Regex" prefix with "Yarr" in the name of YARR files and classes.
* Android.mk:
* CMakeLists.txt:
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/RegExp.cpp:
(JSC::RegExp::compile):
(JSC::RegExp::match):
(JSC::RegExp::printTraceData):
* yarr/YarrInterpreter.cpp: Renamed from Source/JavaScriptCore/yarr/RegexInterpreter.cpp.
(JSC::Yarr::Interpreter::appendParenthesesDisjunctionContext):
(JSC::Yarr::Interpreter::popParenthesesDisjunctionContext):
(JSC::Yarr::Interpreter::DisjunctionContext::DisjunctionContext):
(JSC::Yarr::Interpreter::DisjunctionContext::operator new):
(JSC::Yarr::Interpreter::allocDisjunctionContext):
(JSC::Yarr::Interpreter::freeDisjunctionContext):
(JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::ParenthesesDisjunctionContext):
(JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::operator new):
(JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::restoreOutput):
(JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::getDisjunctionContext):
(JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext):
(JSC::Yarr::Interpreter::freeParenthesesDisjunctionContext):
(JSC::Yarr::Interpreter::InputStream::InputStream):
(JSC::Yarr::Interpreter::InputStream::next):
(JSC::Yarr::Interpreter::InputStream::rewind):
(JSC::Yarr::Interpreter::InputStream::read):
(JSC::Yarr::Interpreter::InputStream::readPair):
(JSC::Yarr::Interpreter::InputStream::readChecked):
(JSC::Yarr::Interpreter::InputStream::reread):
(JSC::Yarr::Interpreter::InputStream::prev):
(JSC::Yarr::Interpreter::InputStream::getPos):
(JSC::Yarr::Interpreter::InputStream::setPos):
(JSC::Yarr::Interpreter::InputStream::atStart):
(JSC::Yarr::Interpreter::InputStream::atEnd):
(JSC::Yarr::Interpreter::InputStream::checkInput):
(JSC::Yarr::Interpreter::InputStream::uncheckInput):
(JSC::Yarr::Interpreter::InputStream::isNotAvailableInput):
(JSC::Yarr::Interpreter::testCharacterClass):
(JSC::Yarr::Interpreter::checkCharacter):
(JSC::Yarr::Interpreter::checkCasedCharacter):
(JSC::Yarr::Interpreter::checkCharacterClass):
(JSC::Yarr::Interpreter::tryConsumeBackReference):
(JSC::Yarr::Interpreter::matchAssertionBOL):
(JSC::Yarr::Interpreter::matchAssertionEOL):
(JSC::Yarr::Interpreter::matchAssertionWordBoundary):
(JSC::Yarr::Interpreter::backtrackPatternCharacter):
(JSC::Yarr::Interpreter::backtrackPatternCasedCharacter):
(JSC::Yarr::Interpreter::matchCharacterClass):
(JSC::Yarr::Interpreter::backtrackCharacterClass):
(JSC::Yarr::Interpreter::matchBackReference):
(JSC::Yarr::Interpreter::backtrackBackReference):
(JSC::Yarr::Interpreter::recordParenthesesMatch):
(JSC::Yarr::Interpreter::resetMatches):
(JSC::Yarr::Interpreter::parenthesesDoBacktrack):
(JSC::Yarr::Interpreter::matchParenthesesOnceBegin):
(JSC::Yarr::Interpreter::matchParenthesesOnceEnd):
(JSC::Yarr::Interpreter::backtrackParenthesesOnceBegin):
(JSC::Yarr::Interpreter::backtrackParenthesesOnceEnd):
(JSC::Yarr::Interpreter::matchParenthesesTerminalBegin):
(JSC::Yarr::Interpreter::matchParenthesesTerminalEnd):
(JSC::Yarr::Interpreter::backtrackParenthesesTerminalBegin):
(JSC::Yarr::Interpreter::backtrackParenthesesTerminalEnd):
(JSC::Yarr::Interpreter::matchParentheticalAssertionBegin):
(JSC::Yarr::Interpreter::matchParentheticalAssertionEnd):
(JSC::Yarr::Interpreter::backtrackParentheticalAssertionBegin):
(JSC::Yarr::Interpreter::backtrackParentheticalAssertionEnd):
(JSC::Yarr::Interpreter::matchParentheses):
(JSC::Yarr::Interpreter::backtrackParentheses):
(JSC::Yarr::Interpreter::lookupForBeginChars):
(JSC::Yarr::Interpreter::matchDisjunction):
(JSC::Yarr::Interpreter::matchNonZeroDisjunction):
(JSC::Yarr::Interpreter::interpret):
(JSC::Yarr::Interpreter::Interpreter):
(JSC::Yarr::ByteCompiler::ParenthesesStackEntry::ParenthesesStackEntry):
(JSC::Yarr::ByteCompiler::ByteCompiler):
(JSC::Yarr::ByteCompiler::compile):
(JSC::Yarr::ByteCompiler::checkInput):
(JSC::Yarr::ByteCompiler::assertionBOL):
(JSC::Yarr::ByteCompiler::assertionEOL):
(JSC::Yarr::ByteCompiler::assertionWordBoundary):
(JSC::Yarr::ByteCompiler::atomPatternCharacter):
(JSC::Yarr::ByteCompiler::atomCharacterClass):
(JSC::Yarr::ByteCompiler::atomBackReference):
(JSC::Yarr::ByteCompiler::atomParenthesesOnceBegin):
(JSC::Yarr::ByteCompiler::atomParenthesesTerminalBegin):
(JSC::Yarr::ByteCompiler::atomParenthesesSubpatternBegin):
(JSC::Yarr::ByteCompiler::atomParentheticalAssertionBegin):
(JSC::Yarr::ByteCompiler::atomParentheticalAssertionEnd):
(JSC::Yarr::ByteCompiler::popParenthesesStack):
(JSC::Yarr::ByteCompiler::dumpDisjunction):
(JSC::Yarr::ByteCompiler::closeAlternative):
(JSC::Yarr::ByteCompiler::closeBodyAlternative):
(JSC::Yarr::ByteCompiler::atomParenthesesSubpatternEnd):
(JSC::Yarr::ByteCompiler::atomParenthesesOnceEnd):
(JSC::Yarr::ByteCompiler::atomParenthesesTerminalEnd):
(JSC::Yarr::ByteCompiler::regexBegin):
(JSC::Yarr::ByteCompiler::regexEnd):
(JSC::Yarr::ByteCompiler::alternativeBodyDisjunction):
(JSC::Yarr::ByteCompiler::alternativeDisjunction):
(JSC::Yarr::ByteCompiler::emitDisjunction):
(JSC::Yarr::byteCompile):
(JSC::Yarr::interpret):
* yarr/YarrInterpreter.h: Renamed from Source/JavaScriptCore/yarr/RegexInterpreter.h.
(JSC::Yarr::ByteTerm::ByteTerm):
(JSC::Yarr::ByteTerm::BOL):
(JSC::Yarr::ByteTerm::CheckInput):
(JSC::Yarr::ByteTerm::EOL):
(JSC::Yarr::ByteTerm::WordBoundary):
(JSC::Yarr::ByteTerm::BackReference):
(JSC::Yarr::ByteTerm::BodyAlternativeBegin):
(JSC::Yarr::ByteTerm::BodyAlternativeDisjunction):
(JSC::Yarr::ByteTerm::BodyAlternativeEnd):
(JSC::Yarr::ByteTerm::AlternativeBegin):
(JSC::Yarr::ByteTerm::AlternativeDisjunction):
(JSC::Yarr::ByteTerm::AlternativeEnd):
(JSC::Yarr::ByteTerm::SubpatternBegin):
(JSC::Yarr::ByteTerm::SubpatternEnd):
(JSC::Yarr::ByteTerm::invert):
(JSC::Yarr::ByteTerm::capture):
(JSC::Yarr::ByteDisjunction::ByteDisjunction):
(JSC::Yarr::BytecodePattern::BytecodePattern):
(JSC::Yarr::BytecodePattern::~BytecodePattern):
* yarr/YarrJIT.cpp: Renamed from Source/JavaScriptCore/yarr/RegexJIT.cpp.
(JSC::Yarr::YarrGenerator::optimizeAlternative):
(JSC::Yarr::YarrGenerator::matchCharacterClassRange):
(JSC::Yarr::YarrGenerator::matchCharacterClass):
(JSC::Yarr::YarrGenerator::jumpIfNoAvailableInput):
(JSC::Yarr::YarrGenerator::jumpIfAvailableInput):
(JSC::Yarr::YarrGenerator::checkInput):
(JSC::Yarr::YarrGenerator::atEndOfInput):
(JSC::Yarr::YarrGenerator::notAtEndOfInput):
(JSC::Yarr::YarrGenerator::jumpIfCharEquals):
(JSC::Yarr::YarrGenerator::jumpIfCharNotEquals):
(JSC::Yarr::YarrGenerator::readCharacter):
(JSC::Yarr::YarrGenerator::storeToFrame):
(JSC::Yarr::YarrGenerator::storeToFrameWithPatch):
(JSC::Yarr::YarrGenerator::loadFromFrame):
(JSC::Yarr::YarrGenerator::loadFromFrameAndJump):
(JSC::Yarr::YarrGenerator::IndirectJumpEntry::IndirectJumpEntry):
(JSC::Yarr::YarrGenerator::IndirectJumpEntry::addJump):
(JSC::Yarr::YarrGenerator::AlternativeBacktrackRecord::AlternativeBacktrackRecord):
(JSC::Yarr::YarrGenerator::GenerationState::GenerationState):
(JSC::Yarr::YarrGenerator::GenerationState::addIndirectJumpEntry):
(JSC::Yarr::YarrGenerator::GenerationState::emitIndirectJumpTable):
(JSC::Yarr::YarrGenerator::GenerationState::incrementParenNestingLevel):
(JSC::Yarr::YarrGenerator::GenerationState::decrementParenNestingLevel):
(JSC::Yarr::YarrGenerator::GenerationState::addParenthesesTail):
(JSC::Yarr::YarrGenerator::GenerationState::emitParenthesesTail):
(JSC::Yarr::YarrGenerator::GenerationState::addJumpToNextInteration):
(JSC::Yarr::YarrGenerator::GenerationState::addJumpsToNextInteration):
(JSC::Yarr::YarrGenerator::GenerationState::addDataLabelToNextIteration):
(JSC::Yarr::YarrGenerator::GenerationState::linkToNextIteration):
(JSC::Yarr::YarrGenerator::BacktrackDestination::BacktrackDestination):
(JSC::Yarr::YarrGenerator::BacktrackDestination::clear):
(JSC::Yarr::YarrGenerator::BacktrackDestination::clearDataLabel):
(JSC::Yarr::YarrGenerator::BacktrackDestination::hasDestination):
(JSC::Yarr::YarrGenerator::BacktrackDestination::isStackOffset):
(JSC::Yarr::YarrGenerator::BacktrackDestination::isLabel):
(JSC::Yarr::YarrGenerator::BacktrackDestination::isJumpList):
(JSC::Yarr::YarrGenerator::BacktrackDestination::hasDataLabel):
(JSC::Yarr::YarrGenerator::BacktrackDestination::copyTarget):
(JSC::Yarr::YarrGenerator::BacktrackDestination::copyTo):
(JSC::Yarr::YarrGenerator::BacktrackDestination::addBacktrackJump):
(JSC::Yarr::YarrGenerator::BacktrackDestination::setStackOffset):
(JSC::Yarr::YarrGenerator::BacktrackDestination::setLabel):
(JSC::Yarr::YarrGenerator::BacktrackDestination::setNextBacktrackLabel):
(JSC::Yarr::YarrGenerator::BacktrackDestination::copyBacktrackToLabel):
(JSC::Yarr::YarrGenerator::BacktrackDestination::setBacktrackToLabel):
(JSC::Yarr::YarrGenerator::BacktrackDestination::setBacktrackJumpList):
(JSC::Yarr::YarrGenerator::BacktrackDestination::setBacktrackSourceLabel):
(JSC::Yarr::YarrGenerator::BacktrackDestination::setDataLabel):
(JSC::Yarr::YarrGenerator::BacktrackDestination::setSubDataLabelPtr):
(JSC::Yarr::YarrGenerator::BacktrackDestination::linkToNextBacktrack):
(JSC::Yarr::YarrGenerator::BacktrackDestination::getStackOffset):
(JSC::Yarr::YarrGenerator::BacktrackDestination::getLabel):
(JSC::Yarr::YarrGenerator::BacktrackDestination::getBacktrackJumps):
(JSC::Yarr::YarrGenerator::BacktrackDestination::getDataLabel):
(JSC::Yarr::YarrGenerator::BacktrackDestination::jumpToBacktrack):
(JSC::Yarr::YarrGenerator::BacktrackDestination::linkDataLabelToHereIfExists):
(JSC::Yarr::YarrGenerator::BacktrackDestination::plantJumpToBacktrackIfExists):
(JSC::Yarr::YarrGenerator::BacktrackDestination::linkAlternativeBacktracks):
(JSC::Yarr::YarrGenerator::BacktrackDestination::linkAlternativeBacktracksTo):
(JSC::Yarr::YarrGenerator::TermGenerationState::TermGenerationState):
(JSC::Yarr::YarrGenerator::TermGenerationState::resetAlternative):
(JSC::Yarr::YarrGenerator::TermGenerationState::alternativeValid):
(JSC::Yarr::YarrGenerator::TermGenerationState::nextAlternative):
(JSC::Yarr::YarrGenerator::TermGenerationState::alternative):
(JSC::Yarr::YarrGenerator::TermGenerationState::isLastAlternative):
(JSC::Yarr::YarrGenerator::TermGenerationState::resetTerm):
(JSC::Yarr::YarrGenerator::TermGenerationState::termValid):
(JSC::Yarr::YarrGenerator::TermGenerationState::nextTerm):
(JSC::Yarr::YarrGenerator::TermGenerationState::term):
(JSC::Yarr::YarrGenerator::TermGenerationState::isLastTerm):
(JSC::Yarr::YarrGenerator::TermGenerationState::getSubParenNum):
(JSC::Yarr::YarrGenerator::TermGenerationState::isMainDisjunction):
(JSC::Yarr::YarrGenerator::TermGenerationState::setParenthesesTail):
(JSC::Yarr::YarrGenerator::TermGenerationState::getParenthesesTail):
(JSC::Yarr::YarrGenerator::TermGenerationState::lookaheadTerm):
(JSC::Yarr::YarrGenerator::TermGenerationState::isSinglePatternCharacterLookaheadTerm):
(JSC::Yarr::YarrGenerator::TermGenerationState::inputOffset):
(JSC::Yarr::YarrGenerator::TermGenerationState::clearBacktrack):
(JSC::Yarr::YarrGenerator::TermGenerationState::jumpToBacktrack):
(JSC::Yarr::YarrGenerator::TermGenerationState::plantJumpToBacktrackIfExists):
(JSC::Yarr::YarrGenerator::TermGenerationState::linkDataLabelToBacktrackIfExists):
(JSC::Yarr::YarrGenerator::TermGenerationState::addBacktrackJump):
(JSC::Yarr::YarrGenerator::TermGenerationState::setBacktrackDataLabel):
(JSC::Yarr::YarrGenerator::TermGenerationState::setBackTrackStackOffset):
(JSC::Yarr::YarrGenerator::TermGenerationState::setBacktrackLabel):
(JSC::Yarr::YarrGenerator::TermGenerationState::linkAlternativeBacktracks):
(JSC::Yarr::YarrGenerator::TermGenerationState::linkAlternativeBacktracksTo):
(JSC::Yarr::YarrGenerator::TermGenerationState::setBacktrackLink):
(JSC::Yarr::YarrGenerator::TermGenerationState::chainBacktracks):
(JSC::Yarr::YarrGenerator::TermGenerationState::chainBacktrackJumps):
(JSC::Yarr::YarrGenerator::TermGenerationState::getBacktrackDestination):
(JSC::Yarr::YarrGenerator::TermGenerationState::propagateBacktrackingFrom):
(JSC::Yarr::YarrGenerator::ParenthesesTail::ParenthesesTail):
(JSC::Yarr::YarrGenerator::ParenthesesTail::processBacktracks):
(JSC::Yarr::YarrGenerator::ParenthesesTail::setNextIteration):
(JSC::Yarr::YarrGenerator::ParenthesesTail::addAfterParenJump):
(JSC::Yarr::YarrGenerator::ParenthesesTail::generateCode):
(JSC::Yarr::YarrGenerator::generateAssertionBOL):
(JSC::Yarr::YarrGenerator::generateAssertionEOL):
(JSC::Yarr::YarrGenerator::matchAssertionWordchar):
(JSC::Yarr::YarrGenerator::generateAssertionWordBoundary):
(JSC::Yarr::YarrGenerator::generatePatternCharacterSingle):
(JSC::Yarr::YarrGenerator::generatePatternCharacterPair):
(JSC::Yarr::YarrGenerator::generatePatternCharacterFixed):
(JSC::Yarr::YarrGenerator::generatePatternCharacterGreedy):
(JSC::Yarr::YarrGenerator::generatePatternCharacterNonGreedy):
(JSC::Yarr::YarrGenerator::generateCharacterClassSingle):
(JSC::Yarr::YarrGenerator::generateCharacterClassFixed):
(JSC::Yarr::YarrGenerator::generateCharacterClassGreedy):
(JSC::Yarr::YarrGenerator::generateCharacterClassNonGreedy):
(JSC::Yarr::YarrGenerator::generateParenthesesDisjunction):
(JSC::Yarr::YarrGenerator::generateParenthesesSingle):
(JSC::Yarr::YarrGenerator::generateParenthesesGreedyNoBacktrack):
(JSC::Yarr::YarrGenerator::generateParentheticalAssertion):
(JSC::Yarr::YarrGenerator::generateTerm):
(JSC::Yarr::YarrGenerator::generateDisjunction):
(JSC::Yarr::YarrGenerator::generateEnter):
(JSC::Yarr::YarrGenerator::generateReturn):
(JSC::Yarr::YarrGenerator::YarrGenerator):
(JSC::Yarr::YarrGenerator::generate):
(JSC::Yarr::YarrGenerator::compile):
(JSC::Yarr::jitCompile):
* yarr/YarrJIT.h: Renamed from Source/JavaScriptCore/yarr/RegexJIT.h.
(JSC::Yarr::YarrCodeBlock::YarrCodeBlock):
(JSC::Yarr::YarrCodeBlock::~YarrCodeBlock):
(JSC::Yarr::YarrCodeBlock::setFallBack):
(JSC::Yarr::YarrCodeBlock::isFallBack):
(JSC::Yarr::YarrCodeBlock::set):
(JSC::Yarr::YarrCodeBlock::execute):
(JSC::Yarr::YarrCodeBlock::getAddr):
(JSC::Yarr::execute):
* yarr/YarrParser.h: Renamed from Source/JavaScriptCore/yarr/RegexParser.h.
(JSC::Yarr::Parser::CharacterClassParserDelegate::CharacterClassParserDelegate):
(JSC::Yarr::Parser::CharacterClassParserDelegate::begin):
(JSC::Yarr::Parser::CharacterClassParserDelegate::atomPatternCharacter):
(JSC::Yarr::Parser::CharacterClassParserDelegate::atomBuiltInCharacterClass):
(JSC::Yarr::Parser::CharacterClassParserDelegate::end):
(JSC::Yarr::Parser::CharacterClassParserDelegate::assertionWordBoundary):
(JSC::Yarr::Parser::CharacterClassParserDelegate::atomBackReference):
(JSC::Yarr::Parser::Parser):
(JSC::Yarr::Parser::parseEscape):
(JSC::Yarr::Parser::parseAtomEscape):
(JSC::Yarr::Parser::parseCharacterClassEscape):
(JSC::Yarr::Parser::parseCharacterClass):
(JSC::Yarr::Parser::parseParenthesesBegin):
(JSC::Yarr::Parser::parseParenthesesEnd):
(JSC::Yarr::Parser::parseQuantifier):
(JSC::Yarr::Parser::parseTokens):
(JSC::Yarr::Parser::parse):
(JSC::Yarr::Parser::saveState):
(JSC::Yarr::Parser::restoreState):
(JSC::Yarr::Parser::atEndOfPattern):
(JSC::Yarr::Parser::peek):
(JSC::Yarr::Parser::peekIsDigit):
(JSC::Yarr::Parser::peekDigit):
(JSC::Yarr::Parser::consume):
(JSC::Yarr::Parser::consumeDigit):
(JSC::Yarr::Parser::consumeNumber):
(JSC::Yarr::Parser::consumeOctal):
(JSC::Yarr::Parser::tryConsume):
(JSC::Yarr::Parser::tryConsumeHex):
(JSC::Yarr::parse):
* yarr/YarrPattern.cpp: Renamed from Source/JavaScriptCore/yarr/RegexPattern.cpp.
(JSC::Yarr::CharacterClassConstructor::CharacterClassConstructor):
(JSC::Yarr::CharacterClassConstructor::reset):
(JSC::Yarr::CharacterClassConstructor::append):
(JSC::Yarr::CharacterClassConstructor::putChar):
(JSC::Yarr::CharacterClassConstructor::isUnicodeUpper):
(JSC::Yarr::CharacterClassConstructor::isUnicodeLower):
(JSC::Yarr::CharacterClassConstructor::putRange):
(JSC::Yarr::CharacterClassConstructor::charClass):
(JSC::Yarr::CharacterClassConstructor::addSorted):
(JSC::Yarr::CharacterClassConstructor::addSortedRange):
(JSC::Yarr::BeginCharHelper::BeginCharHelper):
(JSC::Yarr::BeginCharHelper::addBeginChar):
(JSC::Yarr::BeginCharHelper::merge):
(JSC::Yarr::BeginCharHelper::addCharacter):
(JSC::Yarr::BeginCharHelper::linkHotTerms):
(JSC::Yarr::YarrPatternConstructor::YarrPatternConstructor):
(JSC::Yarr::YarrPatternConstructor::~YarrPatternConstructor):
(JSC::Yarr::YarrPatternConstructor::reset):
(JSC::Yarr::YarrPatternConstructor::assertionBOL):
(JSC::Yarr::YarrPatternConstructor::assertionEOL):
(JSC::Yarr::YarrPatternConstructor::assertionWordBoundary):
(JSC::Yarr::YarrPatternConstructor::atomPatternCharacter):
(JSC::Yarr::YarrPatternConstructor::atomBuiltInCharacterClass):
(JSC::Yarr::YarrPatternConstructor::atomCharacterClassBegin):
(JSC::Yarr::YarrPatternConstructor::atomCharacterClassAtom):
(JSC::Yarr::YarrPatternConstructor::atomCharacterClassRange):
(JSC::Yarr::YarrPatternConstructor::atomCharacterClassBuiltIn):
(JSC::Yarr::YarrPatternConstructor::atomCharacterClassEnd):
(JSC::Yarr::YarrPatternConstructor::atomParenthesesSubpatternBegin):
(JSC::Yarr::YarrPatternConstructor::atomParentheticalAssertionBegin):
(JSC::Yarr::YarrPatternConstructor::atomParenthesesEnd):
(JSC::Yarr::YarrPatternConstructor::atomBackReference):
(JSC::Yarr::YarrPatternConstructor::copyDisjunction):
(JSC::Yarr::YarrPatternConstructor::copyTerm):
(JSC::Yarr::YarrPatternConstructor::quantifyAtom):
(JSC::Yarr::YarrPatternConstructor::disjunction):
(JSC::Yarr::YarrPatternConstructor::regexBegin):
(JSC::Yarr::YarrPatternConstructor::regexEnd):
(JSC::Yarr::YarrPatternConstructor::regexError):
(JSC::Yarr::YarrPatternConstructor::setupAlternativeOffsets):
(JSC::Yarr::YarrPatternConstructor::setupDisjunctionOffsets):
(JSC::Yarr::YarrPatternConstructor::setupOffsets):
(JSC::Yarr::YarrPatternConstructor::checkForTerminalParentheses):
(JSC::Yarr::YarrPatternConstructor::optimizeBOL):
(JSC::Yarr::YarrPatternConstructor::addBeginTerm):
(JSC::Yarr::YarrPatternConstructor::setupDisjunctionBeginTerms):
(JSC::Yarr::YarrPatternConstructor::setupAlternativeBeginTerms):
(JSC::Yarr::YarrPatternConstructor::setupBeginChars):
(JSC::Yarr::compile):
(JSC::Yarr::YarrPattern::YarrPattern):
* yarr/YarrPattern.h: Renamed from Source/JavaScriptCore/yarr/RegexPattern.h.
(JSC::Yarr::CharacterRange::CharacterRange):
(JSC::Yarr::CharacterClassTable::create):
(JSC::Yarr::CharacterClassTable::CharacterClassTable):
(JSC::Yarr::CharacterClass::CharacterClass):
(JSC::Yarr::PatternTerm::PatternTerm):
(JSC::Yarr::PatternTerm::ForwardReference):
(JSC::Yarr::PatternTerm::BOL):
(JSC::Yarr::PatternTerm::EOL):
(JSC::Yarr::PatternTerm::WordBoundary):
(JSC::Yarr::PatternTerm::invert):
(JSC::Yarr::PatternTerm::capture):
(JSC::Yarr::PatternTerm::quantify):
(JSC::Yarr::PatternAlternative::PatternAlternative):
(JSC::Yarr::PatternAlternative::lastTerm):
(JSC::Yarr::PatternAlternative::removeLastTerm):
(JSC::Yarr::PatternAlternative::setOnceThrough):
(JSC::Yarr::PatternAlternative::onceThrough):
(JSC::Yarr::PatternDisjunction::PatternDisjunction):
(JSC::Yarr::PatternDisjunction::~PatternDisjunction):
(JSC::Yarr::PatternDisjunction::addNewAlternative):
(JSC::Yarr::TermChain::TermChain):
(JSC::Yarr::BeginChar::BeginChar):
(JSC::Yarr::YarrPattern::~YarrPattern):
(JSC::Yarr::YarrPattern::reset):
(JSC::Yarr::YarrPattern::containsIllegalBackReference):
(JSC::Yarr::YarrPattern::newlineCharacterClass):
(JSC::Yarr::YarrPattern::digitsCharacterClass):
(JSC::Yarr::YarrPattern::spacesCharacterClass):
(JSC::Yarr::YarrPattern::wordcharCharacterClass):
(JSC::Yarr::YarrPattern::nondigitsCharacterClass):
(JSC::Yarr::YarrPattern::nonspacesCharacterClass):
(JSC::Yarr::YarrPattern::nonwordcharCharacterClass):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75421
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
\
wtf/unicode/icu/CollatorICU.cpp \
\
- yarr/RegexPattern.cpp \
- yarr/RegexInterpreter.cpp \
- yarr/RegexJIT.cpp \
+ yarr/YarrPattern.cpp \
+ yarr/YarrInterpreter.cpp \
+ yarr/YarrJIT.cpp \
yarr/YarrSyntaxChecker.cpp
# generated headers
runtime/TimeoutChecker.cpp
runtime/UString.cpp
- yarr/RegexPattern.cpp
- yarr/RegexInterpreter.cpp
- yarr/RegexJIT.cpp
+ yarr/YarrPattern.cpp
+ yarr/YarrInterpreter.cpp
+ yarr/YarrJIT.cpp
yarr/YarrSyntaxChecker.cpp
wtf/DateMath.cpp
MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/create_regex_tables
COMMAND ${PYTHON_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/create_regex_tables > ${DERIVED_SOURCES_DIR}/RegExpJitTables.h
VERBATIM)
-ADD_SOURCE_DEPENDENCIES(${JAVASCRIPTCORE_DIR}/yarr/RegexPattern.cpp ${DERIVED_SOURCES_DIR}/RegExpJitTables.h)
+ADD_SOURCE_DEPENDENCIES(${JAVASCRIPTCORE_DIR}/yarr/YarrPattern.cpp ${DERIVED_SOURCES_DIR}/RegExpJitTables.h)
+2011-01-10 Peter Varga <pvarga@inf.u-szeged.hu>
+
+ Reviewed by Gavin Barraclough.
+
+ Rename the existing YARR files and classes
+ https://bugs.webkit.org/show_bug.cgi?id=51872
+
+ Replace the "Regex" prefix with "Yarr" in the name of YARR files and classes.
+
+ * Android.mk:
+ * CMakeLists.txt:
+ * GNUmakefile.am:
+ * JavaScriptCore.gypi:
+ * JavaScriptCore.pro:
+ * JavaScriptCore.xcodeproj/project.pbxproj:
+ * runtime/RegExp.cpp:
+ (JSC::RegExp::compile):
+ (JSC::RegExp::match):
+ (JSC::RegExp::printTraceData):
+ * yarr/YarrInterpreter.cpp: Renamed from Source/JavaScriptCore/yarr/RegexInterpreter.cpp.
+ (JSC::Yarr::Interpreter::appendParenthesesDisjunctionContext):
+ (JSC::Yarr::Interpreter::popParenthesesDisjunctionContext):
+ (JSC::Yarr::Interpreter::DisjunctionContext::DisjunctionContext):
+ (JSC::Yarr::Interpreter::DisjunctionContext::operator new):
+ (JSC::Yarr::Interpreter::allocDisjunctionContext):
+ (JSC::Yarr::Interpreter::freeDisjunctionContext):
+ (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::ParenthesesDisjunctionContext):
+ (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::operator new):
+ (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::restoreOutput):
+ (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::getDisjunctionContext):
+ (JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext):
+ (JSC::Yarr::Interpreter::freeParenthesesDisjunctionContext):
+ (JSC::Yarr::Interpreter::InputStream::InputStream):
+ (JSC::Yarr::Interpreter::InputStream::next):
+ (JSC::Yarr::Interpreter::InputStream::rewind):
+ (JSC::Yarr::Interpreter::InputStream::read):
+ (JSC::Yarr::Interpreter::InputStream::readPair):
+ (JSC::Yarr::Interpreter::InputStream::readChecked):
+ (JSC::Yarr::Interpreter::InputStream::reread):
+ (JSC::Yarr::Interpreter::InputStream::prev):
+ (JSC::Yarr::Interpreter::InputStream::getPos):
+ (JSC::Yarr::Interpreter::InputStream::setPos):
+ (JSC::Yarr::Interpreter::InputStream::atStart):
+ (JSC::Yarr::Interpreter::InputStream::atEnd):
+ (JSC::Yarr::Interpreter::InputStream::checkInput):
+ (JSC::Yarr::Interpreter::InputStream::uncheckInput):
+ (JSC::Yarr::Interpreter::InputStream::isNotAvailableInput):
+ (JSC::Yarr::Interpreter::testCharacterClass):
+ (JSC::Yarr::Interpreter::checkCharacter):
+ (JSC::Yarr::Interpreter::checkCasedCharacter):
+ (JSC::Yarr::Interpreter::checkCharacterClass):
+ (JSC::Yarr::Interpreter::tryConsumeBackReference):
+ (JSC::Yarr::Interpreter::matchAssertionBOL):
+ (JSC::Yarr::Interpreter::matchAssertionEOL):
+ (JSC::Yarr::Interpreter::matchAssertionWordBoundary):
+ (JSC::Yarr::Interpreter::backtrackPatternCharacter):
+ (JSC::Yarr::Interpreter::backtrackPatternCasedCharacter):
+ (JSC::Yarr::Interpreter::matchCharacterClass):
+ (JSC::Yarr::Interpreter::backtrackCharacterClass):
+ (JSC::Yarr::Interpreter::matchBackReference):
+ (JSC::Yarr::Interpreter::backtrackBackReference):
+ (JSC::Yarr::Interpreter::recordParenthesesMatch):
+ (JSC::Yarr::Interpreter::resetMatches):
+ (JSC::Yarr::Interpreter::parenthesesDoBacktrack):
+ (JSC::Yarr::Interpreter::matchParenthesesOnceBegin):
+ (JSC::Yarr::Interpreter::matchParenthesesOnceEnd):
+ (JSC::Yarr::Interpreter::backtrackParenthesesOnceBegin):
+ (JSC::Yarr::Interpreter::backtrackParenthesesOnceEnd):
+ (JSC::Yarr::Interpreter::matchParenthesesTerminalBegin):
+ (JSC::Yarr::Interpreter::matchParenthesesTerminalEnd):
+ (JSC::Yarr::Interpreter::backtrackParenthesesTerminalBegin):
+ (JSC::Yarr::Interpreter::backtrackParenthesesTerminalEnd):
+ (JSC::Yarr::Interpreter::matchParentheticalAssertionBegin):
+ (JSC::Yarr::Interpreter::matchParentheticalAssertionEnd):
+ (JSC::Yarr::Interpreter::backtrackParentheticalAssertionBegin):
+ (JSC::Yarr::Interpreter::backtrackParentheticalAssertionEnd):
+ (JSC::Yarr::Interpreter::matchParentheses):
+ (JSC::Yarr::Interpreter::backtrackParentheses):
+ (JSC::Yarr::Interpreter::lookupForBeginChars):
+ (JSC::Yarr::Interpreter::matchDisjunction):
+ (JSC::Yarr::Interpreter::matchNonZeroDisjunction):
+ (JSC::Yarr::Interpreter::interpret):
+ (JSC::Yarr::Interpreter::Interpreter):
+ (JSC::Yarr::ByteCompiler::ParenthesesStackEntry::ParenthesesStackEntry):
+ (JSC::Yarr::ByteCompiler::ByteCompiler):
+ (JSC::Yarr::ByteCompiler::compile):
+ (JSC::Yarr::ByteCompiler::checkInput):
+ (JSC::Yarr::ByteCompiler::assertionBOL):
+ (JSC::Yarr::ByteCompiler::assertionEOL):
+ (JSC::Yarr::ByteCompiler::assertionWordBoundary):
+ (JSC::Yarr::ByteCompiler::atomPatternCharacter):
+ (JSC::Yarr::ByteCompiler::atomCharacterClass):
+ (JSC::Yarr::ByteCompiler::atomBackReference):
+ (JSC::Yarr::ByteCompiler::atomParenthesesOnceBegin):
+ (JSC::Yarr::ByteCompiler::atomParenthesesTerminalBegin):
+ (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternBegin):
+ (JSC::Yarr::ByteCompiler::atomParentheticalAssertionBegin):
+ (JSC::Yarr::ByteCompiler::atomParentheticalAssertionEnd):
+ (JSC::Yarr::ByteCompiler::popParenthesesStack):
+ (JSC::Yarr::ByteCompiler::dumpDisjunction):
+ (JSC::Yarr::ByteCompiler::closeAlternative):
+ (JSC::Yarr::ByteCompiler::closeBodyAlternative):
+ (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternEnd):
+ (JSC::Yarr::ByteCompiler::atomParenthesesOnceEnd):
+ (JSC::Yarr::ByteCompiler::atomParenthesesTerminalEnd):
+ (JSC::Yarr::ByteCompiler::regexBegin):
+ (JSC::Yarr::ByteCompiler::regexEnd):
+ (JSC::Yarr::ByteCompiler::alternativeBodyDisjunction):
+ (JSC::Yarr::ByteCompiler::alternativeDisjunction):
+ (JSC::Yarr::ByteCompiler::emitDisjunction):
+ (JSC::Yarr::byteCompile):
+ (JSC::Yarr::interpret):
+ * yarr/YarrInterpreter.h: Renamed from Source/JavaScriptCore/yarr/RegexInterpreter.h.
+ (JSC::Yarr::ByteTerm::ByteTerm):
+ (JSC::Yarr::ByteTerm::BOL):
+ (JSC::Yarr::ByteTerm::CheckInput):
+ (JSC::Yarr::ByteTerm::EOL):
+ (JSC::Yarr::ByteTerm::WordBoundary):
+ (JSC::Yarr::ByteTerm::BackReference):
+ (JSC::Yarr::ByteTerm::BodyAlternativeBegin):
+ (JSC::Yarr::ByteTerm::BodyAlternativeDisjunction):
+ (JSC::Yarr::ByteTerm::BodyAlternativeEnd):
+ (JSC::Yarr::ByteTerm::AlternativeBegin):
+ (JSC::Yarr::ByteTerm::AlternativeDisjunction):
+ (JSC::Yarr::ByteTerm::AlternativeEnd):
+ (JSC::Yarr::ByteTerm::SubpatternBegin):
+ (JSC::Yarr::ByteTerm::SubpatternEnd):
+ (JSC::Yarr::ByteTerm::invert):
+ (JSC::Yarr::ByteTerm::capture):
+ (JSC::Yarr::ByteDisjunction::ByteDisjunction):
+ (JSC::Yarr::BytecodePattern::BytecodePattern):
+ (JSC::Yarr::BytecodePattern::~BytecodePattern):
+ * yarr/YarrJIT.cpp: Renamed from Source/JavaScriptCore/yarr/RegexJIT.cpp.
+ (JSC::Yarr::YarrGenerator::optimizeAlternative):
+ (JSC::Yarr::YarrGenerator::matchCharacterClassRange):
+ (JSC::Yarr::YarrGenerator::matchCharacterClass):
+ (JSC::Yarr::YarrGenerator::jumpIfNoAvailableInput):
+ (JSC::Yarr::YarrGenerator::jumpIfAvailableInput):
+ (JSC::Yarr::YarrGenerator::checkInput):
+ (JSC::Yarr::YarrGenerator::atEndOfInput):
+ (JSC::Yarr::YarrGenerator::notAtEndOfInput):
+ (JSC::Yarr::YarrGenerator::jumpIfCharEquals):
+ (JSC::Yarr::YarrGenerator::jumpIfCharNotEquals):
+ (JSC::Yarr::YarrGenerator::readCharacter):
+ (JSC::Yarr::YarrGenerator::storeToFrame):
+ (JSC::Yarr::YarrGenerator::storeToFrameWithPatch):
+ (JSC::Yarr::YarrGenerator::loadFromFrame):
+ (JSC::Yarr::YarrGenerator::loadFromFrameAndJump):
+ (JSC::Yarr::YarrGenerator::IndirectJumpEntry::IndirectJumpEntry):
+ (JSC::Yarr::YarrGenerator::IndirectJumpEntry::addJump):
+ (JSC::Yarr::YarrGenerator::AlternativeBacktrackRecord::AlternativeBacktrackRecord):
+ (JSC::Yarr::YarrGenerator::GenerationState::GenerationState):
+ (JSC::Yarr::YarrGenerator::GenerationState::addIndirectJumpEntry):
+ (JSC::Yarr::YarrGenerator::GenerationState::emitIndirectJumpTable):
+ (JSC::Yarr::YarrGenerator::GenerationState::incrementParenNestingLevel):
+ (JSC::Yarr::YarrGenerator::GenerationState::decrementParenNestingLevel):
+ (JSC::Yarr::YarrGenerator::GenerationState::addParenthesesTail):
+ (JSC::Yarr::YarrGenerator::GenerationState::emitParenthesesTail):
+ (JSC::Yarr::YarrGenerator::GenerationState::addJumpToNextInteration):
+ (JSC::Yarr::YarrGenerator::GenerationState::addJumpsToNextInteration):
+ (JSC::Yarr::YarrGenerator::GenerationState::addDataLabelToNextIteration):
+ (JSC::Yarr::YarrGenerator::GenerationState::linkToNextIteration):
+ (JSC::Yarr::YarrGenerator::BacktrackDestination::BacktrackDestination):
+ (JSC::Yarr::YarrGenerator::BacktrackDestination::clear):
+ (JSC::Yarr::YarrGenerator::BacktrackDestination::clearDataLabel):
+ (JSC::Yarr::YarrGenerator::BacktrackDestination::hasDestination):
+ (JSC::Yarr::YarrGenerator::BacktrackDestination::isStackOffset):
+ (JSC::Yarr::YarrGenerator::BacktrackDestination::isLabel):
+ (JSC::Yarr::YarrGenerator::BacktrackDestination::isJumpList):
+ (JSC::Yarr::YarrGenerator::BacktrackDestination::hasDataLabel):
+ (JSC::Yarr::YarrGenerator::BacktrackDestination::copyTarget):
+ (JSC::Yarr::YarrGenerator::BacktrackDestination::copyTo):
+ (JSC::Yarr::YarrGenerator::BacktrackDestination::addBacktrackJump):
+ (JSC::Yarr::YarrGenerator::BacktrackDestination::setStackOffset):
+ (JSC::Yarr::YarrGenerator::BacktrackDestination::setLabel):
+ (JSC::Yarr::YarrGenerator::BacktrackDestination::setNextBacktrackLabel):
+ (JSC::Yarr::YarrGenerator::BacktrackDestination::copyBacktrackToLabel):
+ (JSC::Yarr::YarrGenerator::BacktrackDestination::setBacktrackToLabel):
+ (JSC::Yarr::YarrGenerator::BacktrackDestination::setBacktrackJumpList):
+ (JSC::Yarr::YarrGenerator::BacktrackDestination::setBacktrackSourceLabel):
+ (JSC::Yarr::YarrGenerator::BacktrackDestination::setDataLabel):
+ (JSC::Yarr::YarrGenerator::BacktrackDestination::setSubDataLabelPtr):
+ (JSC::Yarr::YarrGenerator::BacktrackDestination::linkToNextBacktrack):
+ (JSC::Yarr::YarrGenerator::BacktrackDestination::getStackOffset):
+ (JSC::Yarr::YarrGenerator::BacktrackDestination::getLabel):
+ (JSC::Yarr::YarrGenerator::BacktrackDestination::getBacktrackJumps):
+ (JSC::Yarr::YarrGenerator::BacktrackDestination::getDataLabel):
+ (JSC::Yarr::YarrGenerator::BacktrackDestination::jumpToBacktrack):
+ (JSC::Yarr::YarrGenerator::BacktrackDestination::linkDataLabelToHereIfExists):
+ (JSC::Yarr::YarrGenerator::BacktrackDestination::plantJumpToBacktrackIfExists):
+ (JSC::Yarr::YarrGenerator::BacktrackDestination::linkAlternativeBacktracks):
+ (JSC::Yarr::YarrGenerator::BacktrackDestination::linkAlternativeBacktracksTo):
+ (JSC::Yarr::YarrGenerator::TermGenerationState::TermGenerationState):
+ (JSC::Yarr::YarrGenerator::TermGenerationState::resetAlternative):
+ (JSC::Yarr::YarrGenerator::TermGenerationState::alternativeValid):
+ (JSC::Yarr::YarrGenerator::TermGenerationState::nextAlternative):
+ (JSC::Yarr::YarrGenerator::TermGenerationState::alternative):
+ (JSC::Yarr::YarrGenerator::TermGenerationState::isLastAlternative):
+ (JSC::Yarr::YarrGenerator::TermGenerationState::resetTerm):
+ (JSC::Yarr::YarrGenerator::TermGenerationState::termValid):
+ (JSC::Yarr::YarrGenerator::TermGenerationState::nextTerm):
+ (JSC::Yarr::YarrGenerator::TermGenerationState::term):
+ (JSC::Yarr::YarrGenerator::TermGenerationState::isLastTerm):
+ (JSC::Yarr::YarrGenerator::TermGenerationState::getSubParenNum):
+ (JSC::Yarr::YarrGenerator::TermGenerationState::isMainDisjunction):
+ (JSC::Yarr::YarrGenerator::TermGenerationState::setParenthesesTail):
+ (JSC::Yarr::YarrGenerator::TermGenerationState::getParenthesesTail):
+ (JSC::Yarr::YarrGenerator::TermGenerationState::lookaheadTerm):
+ (JSC::Yarr::YarrGenerator::TermGenerationState::isSinglePatternCharacterLookaheadTerm):
+ (JSC::Yarr::YarrGenerator::TermGenerationState::inputOffset):
+ (JSC::Yarr::YarrGenerator::TermGenerationState::clearBacktrack):
+ (JSC::Yarr::YarrGenerator::TermGenerationState::jumpToBacktrack):
+ (JSC::Yarr::YarrGenerator::TermGenerationState::plantJumpToBacktrackIfExists):
+ (JSC::Yarr::YarrGenerator::TermGenerationState::linkDataLabelToBacktrackIfExists):
+ (JSC::Yarr::YarrGenerator::TermGenerationState::addBacktrackJump):
+ (JSC::Yarr::YarrGenerator::TermGenerationState::setBacktrackDataLabel):
+ (JSC::Yarr::YarrGenerator::TermGenerationState::setBackTrackStackOffset):
+ (JSC::Yarr::YarrGenerator::TermGenerationState::setBacktrackLabel):
+ (JSC::Yarr::YarrGenerator::TermGenerationState::linkAlternativeBacktracks):
+ (JSC::Yarr::YarrGenerator::TermGenerationState::linkAlternativeBacktracksTo):
+ (JSC::Yarr::YarrGenerator::TermGenerationState::setBacktrackLink):
+ (JSC::Yarr::YarrGenerator::TermGenerationState::chainBacktracks):
+ (JSC::Yarr::YarrGenerator::TermGenerationState::chainBacktrackJumps):
+ (JSC::Yarr::YarrGenerator::TermGenerationState::getBacktrackDestination):
+ (JSC::Yarr::YarrGenerator::TermGenerationState::propagateBacktrackingFrom):
+ (JSC::Yarr::YarrGenerator::ParenthesesTail::ParenthesesTail):
+ (JSC::Yarr::YarrGenerator::ParenthesesTail::processBacktracks):
+ (JSC::Yarr::YarrGenerator::ParenthesesTail::setNextIteration):
+ (JSC::Yarr::YarrGenerator::ParenthesesTail::addAfterParenJump):
+ (JSC::Yarr::YarrGenerator::ParenthesesTail::generateCode):
+ (JSC::Yarr::YarrGenerator::generateAssertionBOL):
+ (JSC::Yarr::YarrGenerator::generateAssertionEOL):
+ (JSC::Yarr::YarrGenerator::matchAssertionWordchar):
+ (JSC::Yarr::YarrGenerator::generateAssertionWordBoundary):
+ (JSC::Yarr::YarrGenerator::generatePatternCharacterSingle):
+ (JSC::Yarr::YarrGenerator::generatePatternCharacterPair):
+ (JSC::Yarr::YarrGenerator::generatePatternCharacterFixed):
+ (JSC::Yarr::YarrGenerator::generatePatternCharacterGreedy):
+ (JSC::Yarr::YarrGenerator::generatePatternCharacterNonGreedy):
+ (JSC::Yarr::YarrGenerator::generateCharacterClassSingle):
+ (JSC::Yarr::YarrGenerator::generateCharacterClassFixed):
+ (JSC::Yarr::YarrGenerator::generateCharacterClassGreedy):
+ (JSC::Yarr::YarrGenerator::generateCharacterClassNonGreedy):
+ (JSC::Yarr::YarrGenerator::generateParenthesesDisjunction):
+ (JSC::Yarr::YarrGenerator::generateParenthesesSingle):
+ (JSC::Yarr::YarrGenerator::generateParenthesesGreedyNoBacktrack):
+ (JSC::Yarr::YarrGenerator::generateParentheticalAssertion):
+ (JSC::Yarr::YarrGenerator::generateTerm):
+ (JSC::Yarr::YarrGenerator::generateDisjunction):
+ (JSC::Yarr::YarrGenerator::generateEnter):
+ (JSC::Yarr::YarrGenerator::generateReturn):
+ (JSC::Yarr::YarrGenerator::YarrGenerator):
+ (JSC::Yarr::YarrGenerator::generate):
+ (JSC::Yarr::YarrGenerator::compile):
+ (JSC::Yarr::jitCompile):
+ * yarr/YarrJIT.h: Renamed from Source/JavaScriptCore/yarr/RegexJIT.h.
+ (JSC::Yarr::YarrCodeBlock::YarrCodeBlock):
+ (JSC::Yarr::YarrCodeBlock::~YarrCodeBlock):
+ (JSC::Yarr::YarrCodeBlock::setFallBack):
+ (JSC::Yarr::YarrCodeBlock::isFallBack):
+ (JSC::Yarr::YarrCodeBlock::set):
+ (JSC::Yarr::YarrCodeBlock::execute):
+ (JSC::Yarr::YarrCodeBlock::getAddr):
+ (JSC::Yarr::execute):
+ * yarr/YarrParser.h: Renamed from Source/JavaScriptCore/yarr/RegexParser.h.
+ (JSC::Yarr::Parser::CharacterClassParserDelegate::CharacterClassParserDelegate):
+ (JSC::Yarr::Parser::CharacterClassParserDelegate::begin):
+ (JSC::Yarr::Parser::CharacterClassParserDelegate::atomPatternCharacter):
+ (JSC::Yarr::Parser::CharacterClassParserDelegate::atomBuiltInCharacterClass):
+ (JSC::Yarr::Parser::CharacterClassParserDelegate::end):
+ (JSC::Yarr::Parser::CharacterClassParserDelegate::assertionWordBoundary):
+ (JSC::Yarr::Parser::CharacterClassParserDelegate::atomBackReference):
+ (JSC::Yarr::Parser::Parser):
+ (JSC::Yarr::Parser::parseEscape):
+ (JSC::Yarr::Parser::parseAtomEscape):
+ (JSC::Yarr::Parser::parseCharacterClassEscape):
+ (JSC::Yarr::Parser::parseCharacterClass):
+ (JSC::Yarr::Parser::parseParenthesesBegin):
+ (JSC::Yarr::Parser::parseParenthesesEnd):
+ (JSC::Yarr::Parser::parseQuantifier):
+ (JSC::Yarr::Parser::parseTokens):
+ (JSC::Yarr::Parser::parse):
+ (JSC::Yarr::Parser::saveState):
+ (JSC::Yarr::Parser::restoreState):
+ (JSC::Yarr::Parser::atEndOfPattern):
+ (JSC::Yarr::Parser::peek):
+ (JSC::Yarr::Parser::peekIsDigit):
+ (JSC::Yarr::Parser::peekDigit):
+ (JSC::Yarr::Parser::consume):
+ (JSC::Yarr::Parser::consumeDigit):
+ (JSC::Yarr::Parser::consumeNumber):
+ (JSC::Yarr::Parser::consumeOctal):
+ (JSC::Yarr::Parser::tryConsume):
+ (JSC::Yarr::Parser::tryConsumeHex):
+ (JSC::Yarr::parse):
+ * yarr/YarrPattern.cpp: Renamed from Source/JavaScriptCore/yarr/RegexPattern.cpp.
+ (JSC::Yarr::CharacterClassConstructor::CharacterClassConstructor):
+ (JSC::Yarr::CharacterClassConstructor::reset):
+ (JSC::Yarr::CharacterClassConstructor::append):
+ (JSC::Yarr::CharacterClassConstructor::putChar):
+ (JSC::Yarr::CharacterClassConstructor::isUnicodeUpper):
+ (JSC::Yarr::CharacterClassConstructor::isUnicodeLower):
+ (JSC::Yarr::CharacterClassConstructor::putRange):
+ (JSC::Yarr::CharacterClassConstructor::charClass):
+ (JSC::Yarr::CharacterClassConstructor::addSorted):
+ (JSC::Yarr::CharacterClassConstructor::addSortedRange):
+ (JSC::Yarr::BeginCharHelper::BeginCharHelper):
+ (JSC::Yarr::BeginCharHelper::addBeginChar):
+ (JSC::Yarr::BeginCharHelper::merge):
+ (JSC::Yarr::BeginCharHelper::addCharacter):
+ (JSC::Yarr::BeginCharHelper::linkHotTerms):
+ (JSC::Yarr::YarrPatternConstructor::YarrPatternConstructor):
+ (JSC::Yarr::YarrPatternConstructor::~YarrPatternConstructor):
+ (JSC::Yarr::YarrPatternConstructor::reset):
+ (JSC::Yarr::YarrPatternConstructor::assertionBOL):
+ (JSC::Yarr::YarrPatternConstructor::assertionEOL):
+ (JSC::Yarr::YarrPatternConstructor::assertionWordBoundary):
+ (JSC::Yarr::YarrPatternConstructor::atomPatternCharacter):
+ (JSC::Yarr::YarrPatternConstructor::atomBuiltInCharacterClass):
+ (JSC::Yarr::YarrPatternConstructor::atomCharacterClassBegin):
+ (JSC::Yarr::YarrPatternConstructor::atomCharacterClassAtom):
+ (JSC::Yarr::YarrPatternConstructor::atomCharacterClassRange):
+ (JSC::Yarr::YarrPatternConstructor::atomCharacterClassBuiltIn):
+ (JSC::Yarr::YarrPatternConstructor::atomCharacterClassEnd):
+ (JSC::Yarr::YarrPatternConstructor::atomParenthesesSubpatternBegin):
+ (JSC::Yarr::YarrPatternConstructor::atomParentheticalAssertionBegin):
+ (JSC::Yarr::YarrPatternConstructor::atomParenthesesEnd):
+ (JSC::Yarr::YarrPatternConstructor::atomBackReference):
+ (JSC::Yarr::YarrPatternConstructor::copyDisjunction):
+ (JSC::Yarr::YarrPatternConstructor::copyTerm):
+ (JSC::Yarr::YarrPatternConstructor::quantifyAtom):
+ (JSC::Yarr::YarrPatternConstructor::disjunction):
+ (JSC::Yarr::YarrPatternConstructor::regexBegin):
+ (JSC::Yarr::YarrPatternConstructor::regexEnd):
+ (JSC::Yarr::YarrPatternConstructor::regexError):
+ (JSC::Yarr::YarrPatternConstructor::setupAlternativeOffsets):
+ (JSC::Yarr::YarrPatternConstructor::setupDisjunctionOffsets):
+ (JSC::Yarr::YarrPatternConstructor::setupOffsets):
+ (JSC::Yarr::YarrPatternConstructor::checkForTerminalParentheses):
+ (JSC::Yarr::YarrPatternConstructor::optimizeBOL):
+ (JSC::Yarr::YarrPatternConstructor::addBeginTerm):
+ (JSC::Yarr::YarrPatternConstructor::setupDisjunctionBeginTerms):
+ (JSC::Yarr::YarrPatternConstructor::setupAlternativeBeginTerms):
+ (JSC::Yarr::YarrPatternConstructor::setupBeginChars):
+ (JSC::Yarr::compile):
+ (JSC::Yarr::YarrPattern::YarrPattern):
+ * yarr/YarrPattern.h: Renamed from Source/JavaScriptCore/yarr/RegexPattern.h.
+ (JSC::Yarr::CharacterRange::CharacterRange):
+ (JSC::Yarr::CharacterClassTable::create):
+ (JSC::Yarr::CharacterClassTable::CharacterClassTable):
+ (JSC::Yarr::CharacterClass::CharacterClass):
+ (JSC::Yarr::PatternTerm::PatternTerm):
+ (JSC::Yarr::PatternTerm::ForwardReference):
+ (JSC::Yarr::PatternTerm::BOL):
+ (JSC::Yarr::PatternTerm::EOL):
+ (JSC::Yarr::PatternTerm::WordBoundary):
+ (JSC::Yarr::PatternTerm::invert):
+ (JSC::Yarr::PatternTerm::capture):
+ (JSC::Yarr::PatternTerm::quantify):
+ (JSC::Yarr::PatternAlternative::PatternAlternative):
+ (JSC::Yarr::PatternAlternative::lastTerm):
+ (JSC::Yarr::PatternAlternative::removeLastTerm):
+ (JSC::Yarr::PatternAlternative::setOnceThrough):
+ (JSC::Yarr::PatternAlternative::onceThrough):
+ (JSC::Yarr::PatternDisjunction::PatternDisjunction):
+ (JSC::Yarr::PatternDisjunction::~PatternDisjunction):
+ (JSC::Yarr::PatternDisjunction::addNewAlternative):
+ (JSC::Yarr::TermChain::TermChain):
+ (JSC::Yarr::BeginChar::BeginChar):
+ (JSC::Yarr::YarrPattern::~YarrPattern):
+ (JSC::Yarr::YarrPattern::reset):
+ (JSC::Yarr::YarrPattern::containsIllegalBackReference):
+ (JSC::Yarr::YarrPattern::newlineCharacterClass):
+ (JSC::Yarr::YarrPattern::digitsCharacterClass):
+ (JSC::Yarr::YarrPattern::spacesCharacterClass):
+ (JSC::Yarr::YarrPattern::wordcharCharacterClass):
+ (JSC::Yarr::YarrPattern::nondigitsCharacterClass):
+ (JSC::Yarr::YarrPattern::nonspacesCharacterClass):
+ (JSC::Yarr::YarrPattern::nonwordcharCharacterClass):
+
2011-01-10 Gavin Barraclough <barraclough@apple.com>
Windows build fix.
Source/JavaScriptCore/wtf/VMTags.h \
Source/JavaScriptCore/wtf/WTFThreadData.cpp \
Source/JavaScriptCore/wtf/WTFThreadData.h \
- Source/JavaScriptCore/yarr/RegexInterpreter.cpp \
- Source/JavaScriptCore/yarr/RegexInterpreter.h \
- Source/JavaScriptCore/yarr/RegexJIT.cpp \
- Source/JavaScriptCore/yarr/RegexJIT.h \
- Source/JavaScriptCore/yarr/RegexParser.h \
- Source/JavaScriptCore/yarr/RegexPattern.cpp \
- Source/JavaScriptCore/yarr/RegexPattern.h \
+ Source/JavaScriptCore/yarr/YarrInterpreter.cpp \
+ Source/JavaScriptCore/yarr/YarrInterpreter.h \
+ Source/JavaScriptCore/yarr/YarrJIT.cpp \
+ Source/JavaScriptCore/yarr/YarrJIT.h \
+ Source/JavaScriptCore/yarr/YarrParser.h \
+ Source/JavaScriptCore/yarr/YarrPattern.cpp \
+ Source/JavaScriptCore/yarr/YarrPattern.h \
Source/JavaScriptCore/yarr/YarrSyntaxChecker.cpp \
Source/JavaScriptCore/yarr/YarrSyntaxChecker.h
'wtf/win/MainThreadWin.cpp',
'wtf/win/OwnPtrWin.cpp',
'wtf/wx/MainThreadWx.cpp',
- 'yarr/RegexInterpreter.cpp',
- 'yarr/RegexInterpreter.h',
- 'yarr/RegexJIT.cpp',
- 'yarr/RegexJIT.h',
- 'yarr/RegexParser.h',
- 'yarr/RegexPattern.cpp',
- 'yarr/RegexPattern.h',
+ 'yarr/YarrInterpreter.cpp',
+ 'yarr/YarrInterpreter.h',
+ 'yarr/YarrJIT.cpp',
+ 'yarr/YarrJIT.h',
+ 'yarr/YarrParser.h',
+ 'yarr/YarrPattern.cpp',
+ 'yarr/YarrPattern.h',
'yarr/YarrSyntaxChecker.cpp',
'yarr/YarrSyntaxChecker.h',
]
runtime/Structure.cpp \
runtime/TimeoutChecker.cpp \
runtime/UString.cpp \
- yarr/RegexPattern.cpp \
- yarr/RegexInterpreter.cpp \
- yarr/RegexJIT.cpp \
+ yarr/YarrPattern.cpp \
+ yarr/YarrInterpreter.cpp \
+ yarr/YarrJIT.cpp \
yarr/YarrSyntaxChecker.cpp
# Generated files, simply list them for JavaScriptCore
Name="yarr"
>
<File
- RelativePath="..\..\yarr\RegexInterpreter.cpp"
+ RelativePath="..\..\yarr\YarrInterpreter.cpp"
>
</File>
<File
- RelativePath="..\..\yarr\RegexInterpreter.h"
+ RelativePath="..\..\yarr\YarrInterpreter.h"
>
</File>
<File
- RelativePath="..\..\yarr\RegexJIT.cpp"
+ RelativePath="..\..\yarr\YarrJIT.cpp"
>
</File>
<File
- RelativePath="..\..\yarr\RegexJIT.h"
+ RelativePath="..\..\yarr\YarrJIT.h"
>
</File>
<File
- RelativePath="..\..\yarr\RegexParser.h"
+ RelativePath="..\..\yarr\YarrParser.h"
>
</File>
<File
- RelativePath="..\..\yarr\RegexPattern.cpp"
+ RelativePath="..\..\yarr\YarrPattern.cpp"
>
</File>
<File
- RelativePath="..\..\yarr\RegexPattern.h"
+ RelativePath="..\..\yarr\YarrPattern.h"
>
</File>
<File
86676D5211FED9BC004B6863 /* BumpPointerAllocator.h in Headers */ = {isa = PBXBuildFile; fileRef = 86676D4D11FED55D004B6863 /* BumpPointerAllocator.h */; settings = {ATTRIBUTES = (Private, ); }; };
86704B4212DB8A8100A9FE7B /* YarrSyntaxChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86704B4012DB8A8100A9FE7B /* YarrSyntaxChecker.cpp */; };
86704B4312DB8A8100A9FE7B /* YarrSyntaxChecker.h in Headers */ = {isa = PBXBuildFile; fileRef = 86704B4112DB8A8100A9FE7B /* YarrSyntaxChecker.h */; };
+ 86704B8412DBA33700A9FE7B /* YarrInterpreter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86704B7D12DBA33700A9FE7B /* YarrInterpreter.cpp */; };
+ 86704B8512DBA33700A9FE7B /* YarrInterpreter.h in Headers */ = {isa = PBXBuildFile; fileRef = 86704B7E12DBA33700A9FE7B /* YarrInterpreter.h */; };
+ 86704B8612DBA33700A9FE7B /* YarrJIT.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86704B7F12DBA33700A9FE7B /* YarrJIT.cpp */; };
+ 86704B8712DBA33700A9FE7B /* YarrJIT.h in Headers */ = {isa = PBXBuildFile; fileRef = 86704B8012DBA33700A9FE7B /* YarrJIT.h */; };
+ 86704B8812DBA33700A9FE7B /* YarrParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 86704B8112DBA33700A9FE7B /* YarrParser.h */; };
+ 86704B8912DBA33700A9FE7B /* YarrPattern.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86704B8212DBA33700A9FE7B /* YarrPattern.cpp */; };
+ 86704B8A12DBA33700A9FE7B /* YarrPattern.h in Headers */ = {isa = PBXBuildFile; fileRef = 86704B8312DBA33700A9FE7B /* YarrPattern.h */; };
868BFA08117CEFD100B908B1 /* AtomicString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 868BFA00117CEFD100B908B1 /* AtomicString.cpp */; };
868BFA09117CEFD100B908B1 /* AtomicString.h in Headers */ = {isa = PBXBuildFile; fileRef = 868BFA01117CEFD100B908B1 /* AtomicString.h */; settings = {ATTRIBUTES = (Private, ); }; };
868BFA0A117CEFD100B908B1 /* AtomicStringImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 868BFA02117CEFD100B908B1 /* AtomicStringImpl.h */; settings = {ATTRIBUTES = (Private, ); }; };
868BFA17117CF19900B908B1 /* WTFString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 868BFA15117CF19900B908B1 /* WTFString.cpp */; };
868BFA18117CF19900B908B1 /* WTFString.h in Headers */ = {isa = PBXBuildFile; fileRef = 868BFA16117CF19900B908B1 /* WTFString.h */; settings = {ATTRIBUTES = (Private, ); }; };
868BFA60117D048200B908B1 /* StaticConstructors.h in Headers */ = {isa = PBXBuildFile; fileRef = 868BFA5F117D048200B908B1 /* StaticConstructors.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 868D81A212C428CE0093DC84 /* RegexPattern.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 868D81A112C428CE0093DC84 /* RegexPattern.cpp */; };
8690231512092D5C00630AF9 /* PageReservation.h in Headers */ = {isa = PBXBuildFile; fileRef = 8690231412092D5C00630AF9 /* PageReservation.h */; settings = {ATTRIBUTES = (Private, ); }; };
869D04AF1193B54D00803475 /* CachedTranscendentalFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = 869D04AE1193B54D00803475 /* CachedTranscendentalFunction.h */; settings = {ATTRIBUTES = (Private, ); }; };
869EBCB70E8C6D4A008722CC /* ResultType.h in Headers */ = {isa = PBXBuildFile; fileRef = 869EBCB60E8C6D4A008722CC /* ResultType.h */; settings = {ATTRIBUTES = (Private, ); }; };
86DB64640F95C6FC00D7D921 /* ExecutableAllocatorFixedVMPool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86DB64630F95C6FC00D7D921 /* ExecutableAllocatorFixedVMPool.cpp */; };
86E116B10FE75AC800B512BC /* CodeLocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 86E116B00FE75AC800B512BC /* CodeLocation.h */; };
86E85539111B9968001AF51E /* JSStringBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 86E85538111B9968001AF51E /* JSStringBuilder.h */; };
- 86EAC4970F93E8D1008EC948 /* RegexInterpreter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86EAC48F0F93E8D1008EC948 /* RegexInterpreter.cpp */; };
- 86EAC4980F93E8D1008EC948 /* RegexInterpreter.h in Headers */ = {isa = PBXBuildFile; fileRef = 86EAC4900F93E8D1008EC948 /* RegexInterpreter.h */; };
- 86EAC4990F93E8D1008EC948 /* RegexJIT.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86EAC4910F93E8D1008EC948 /* RegexJIT.cpp */; };
- 86EAC49A0F93E8D1008EC948 /* RegexJIT.h in Headers */ = {isa = PBXBuildFile; fileRef = 86EAC4920F93E8D1008EC948 /* RegexJIT.h */; };
- 86EAC49B0F93E8D1008EC948 /* RegexParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 86EAC4930F93E8D1008EC948 /* RegexParser.h */; };
- 86EAC49C0F93E8D1008EC948 /* RegexPattern.h in Headers */ = {isa = PBXBuildFile; fileRef = 86EAC4940F93E8D1008EC948 /* RegexPattern.h */; };
86F38859121130CA007A7CE3 /* AtomicStringHash.h in Headers */ = {isa = PBXBuildFile; fileRef = 86F38858121130CA007A7CE3 /* AtomicStringHash.h */; settings = {ATTRIBUTES = (Private, ); }; };
90213E3D123A40C200D422F3 /* MemoryStatistics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 90213E3B123A40C200D422F3 /* MemoryStatistics.cpp */; };
90213E3E123A40C200D422F3 /* MemoryStatistics.h in Headers */ = {isa = PBXBuildFile; fileRef = 90213E3C123A40C200D422F3 /* MemoryStatistics.h */; settings = {ATTRIBUTES = (Private, ); }; };
86676D4D11FED55D004B6863 /* BumpPointerAllocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BumpPointerAllocator.h; sourceTree = "<group>"; };
86704B4012DB8A8100A9FE7B /* YarrSyntaxChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = YarrSyntaxChecker.cpp; path = yarr/YarrSyntaxChecker.cpp; sourceTree = "<group>"; };
86704B4112DB8A8100A9FE7B /* YarrSyntaxChecker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = YarrSyntaxChecker.h; path = yarr/YarrSyntaxChecker.h; sourceTree = "<group>"; };
+ 86704B7D12DBA33700A9FE7B /* YarrInterpreter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = YarrInterpreter.cpp; path = yarr/YarrInterpreter.cpp; sourceTree = "<group>"; };
+ 86704B7E12DBA33700A9FE7B /* YarrInterpreter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = YarrInterpreter.h; path = yarr/YarrInterpreter.h; sourceTree = "<group>"; };
+ 86704B7F12DBA33700A9FE7B /* YarrJIT.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = YarrJIT.cpp; path = yarr/YarrJIT.cpp; sourceTree = "<group>"; };
+ 86704B8012DBA33700A9FE7B /* YarrJIT.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = YarrJIT.h; path = yarr/YarrJIT.h; sourceTree = "<group>"; };
+ 86704B8112DBA33700A9FE7B /* YarrParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = YarrParser.h; path = yarr/YarrParser.h; sourceTree = "<group>"; };
+ 86704B8212DBA33700A9FE7B /* YarrPattern.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = YarrPattern.cpp; path = yarr/YarrPattern.cpp; sourceTree = "<group>"; };
+ 86704B8312DBA33700A9FE7B /* YarrPattern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = YarrPattern.h; path = yarr/YarrPattern.h; sourceTree = "<group>"; };
867FC35F11B763950025105E /* JavaScriptCore.JSVALUE32_64only.exp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.exports; path = JavaScriptCore.JSVALUE32_64only.exp; sourceTree = "<group>"; };
867FC36011B763950025105E /* JavaScriptCore.JSVALUE32only.exp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.exports; path = JavaScriptCore.JSVALUE32only.exp; sourceTree = "<group>"; };
867FC36111B763950025105E /* JavaScriptCore.JSVALUE64only.exp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.exports; path = JavaScriptCore.JSVALUE64only.exp; sourceTree = "<group>"; };
868BFA15117CF19900B908B1 /* WTFString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WTFString.cpp; path = text/WTFString.cpp; sourceTree = "<group>"; };
868BFA16117CF19900B908B1 /* WTFString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WTFString.h; path = text/WTFString.h; sourceTree = "<group>"; };
868BFA5F117D048200B908B1 /* StaticConstructors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StaticConstructors.h; sourceTree = "<group>"; };
- 868D81A112C428CE0093DC84 /* RegexPattern.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegexPattern.cpp; path = yarr/RegexPattern.cpp; sourceTree = "<group>"; };
8690231412092D5C00630AF9 /* PageReservation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PageReservation.h; sourceTree = "<group>"; };
869D04AE1193B54D00803475 /* CachedTranscendentalFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CachedTranscendentalFunction.h; sourceTree = "<group>"; };
869EBCB60E8C6D4A008722CC /* ResultType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResultType.h; sourceTree = "<group>"; };
86DB64630F95C6FC00D7D921 /* ExecutableAllocatorFixedVMPool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExecutableAllocatorFixedVMPool.cpp; sourceTree = "<group>"; };
86E116B00FE75AC800B512BC /* CodeLocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CodeLocation.h; sourceTree = "<group>"; };
86E85538111B9968001AF51E /* JSStringBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSStringBuilder.h; sourceTree = "<group>"; };
- 86EAC48F0F93E8D1008EC948 /* RegexInterpreter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegexInterpreter.cpp; path = yarr/RegexInterpreter.cpp; sourceTree = "<group>"; };
- 86EAC4900F93E8D1008EC948 /* RegexInterpreter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegexInterpreter.h; path = yarr/RegexInterpreter.h; sourceTree = "<group>"; };
- 86EAC4910F93E8D1008EC948 /* RegexJIT.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegexJIT.cpp; path = yarr/RegexJIT.cpp; sourceTree = "<group>"; };
- 86EAC4920F93E8D1008EC948 /* RegexJIT.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegexJIT.h; path = yarr/RegexJIT.h; sourceTree = "<group>"; };
- 86EAC4930F93E8D1008EC948 /* RegexParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegexParser.h; path = yarr/RegexParser.h; sourceTree = "<group>"; };
- 86EAC4940F93E8D1008EC948 /* RegexPattern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegexPattern.h; path = yarr/RegexPattern.h; sourceTree = "<group>"; };
86F38858121130CA007A7CE3 /* AtomicStringHash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AtomicStringHash.h; path = text/AtomicStringHash.h; sourceTree = "<group>"; };
90213E3B123A40C200D422F3 /* MemoryStatistics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MemoryStatistics.cpp; sourceTree = "<group>"; };
90213E3C123A40C200D422F3 /* MemoryStatistics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoryStatistics.h; sourceTree = "<group>"; };
86EAC48C0F93E8B9008EC948 /* yarr */ = {
isa = PBXGroup;
children = (
+ 86704B7D12DBA33700A9FE7B /* YarrInterpreter.cpp */,
+ 86704B7E12DBA33700A9FE7B /* YarrInterpreter.h */,
+ 86704B7F12DBA33700A9FE7B /* YarrJIT.cpp */,
+ 86704B8012DBA33700A9FE7B /* YarrJIT.h */,
+ 86704B8112DBA33700A9FE7B /* YarrParser.h */,
+ 86704B8212DBA33700A9FE7B /* YarrPattern.cpp */,
+ 86704B8312DBA33700A9FE7B /* YarrPattern.h */,
86704B4012DB8A8100A9FE7B /* YarrSyntaxChecker.cpp */,
86704B4112DB8A8100A9FE7B /* YarrSyntaxChecker.h */,
- 86EAC48F0F93E8D1008EC948 /* RegexInterpreter.cpp */,
- 86EAC4900F93E8D1008EC948 /* RegexInterpreter.h */,
- 86EAC4910F93E8D1008EC948 /* RegexJIT.cpp */,
- 86EAC4920F93E8D1008EC948 /* RegexJIT.h */,
- 86EAC4930F93E8D1008EC948 /* RegexParser.h */,
- 86EAC4940F93E8D1008EC948 /* RegexPattern.h */,
- 868D81A112C428CE0093DC84 /* RegexPattern.cpp */,
);
name = yarr;
sourceTree = "<group>";
90D3469C0E285280009492EE /* RefCountedLeakCounter.h in Headers */,
BC18C4580E16F5CD00B34460 /* RefPtr.h in Headers */,
BC18C4590E16F5CD00B34460 /* RefPtrHashMap.h in Headers */,
- 86EAC4980F93E8D1008EC948 /* RegexInterpreter.h in Headers */,
- 86EAC49A0F93E8D1008EC948 /* RegexJIT.h in Headers */,
BC18C45A0E16F5CD00B34460 /* RegExp.h in Headers */,
- 86EAC49B0F93E8D1008EC948 /* RegexParser.h in Headers */,
- 86EAC49C0F93E8D1008EC948 /* RegexPattern.h in Headers */,
A1712B3F11C7B228007A5315 /* RegExpCache.h in Headers */,
BCD202C20E1706A7002C7E82 /* RegExpConstructor.h in Headers */,
BCD202D60E170708002C7E82 /* RegExpConstructor.lut.h in Headers */,
5135FAF212D26ACE003C083B /* Decoder.h in Headers */,
5135FAF312D26AD1003C083B /* Encoder.h in Headers */,
86704B4312DB8A8100A9FE7B /* YarrSyntaxChecker.h in Headers */,
+ 86704B8512DBA33700A9FE7B /* YarrInterpreter.h in Headers */,
+ 86704B8712DBA33700A9FE7B /* YarrJIT.h in Headers */,
+ 86704B8812DBA33700A9FE7B /* YarrParser.h in Headers */,
+ 86704B8A12DBA33700A9FE7B /* YarrPattern.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
14469DE9107EC7E700650446 /* PrototypeFunction.cpp in Sources */,
088FA5BB0EF76D4300578E6F /* RandomNumber.cpp in Sources */,
905B02AE0E28640F006DF882 /* RefCountedLeakCounter.cpp in Sources */,
- 86EAC4970F93E8D1008EC948 /* RegexInterpreter.cpp in Sources */,
- 86EAC4990F93E8D1008EC948 /* RegexJIT.cpp in Sources */,
14280841107EC0930013E7B2 /* RegExp.cpp in Sources */,
- 868D81A212C428CE0093DC84 /* RegexPattern.cpp in Sources */,
A1712B3B11C7B212007A5315 /* RegExpCache.cpp in Sources */,
14280842107EC0930013E7B2 /* RegExpConstructor.cpp in Sources */,
14280843107EC0930013E7B2 /* RegExpObject.cpp in Sources */,
868BFA17117CF19900B908B1 /* WTFString.cpp in Sources */,
86D08D5311793613006E5ED0 /* WTFThreadData.cpp in Sources */,
86704B4212DB8A8100A9FE7B /* YarrSyntaxChecker.cpp in Sources */,
+ 86704B8412DBA33700A9FE7B /* YarrInterpreter.cpp in Sources */,
+ 86704B8612DBA33700A9FE7B /* YarrJIT.cpp in Sources */,
+ 86704B8912DBA33700A9FE7B /* YarrPattern.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
int maxReentryDepth;
RegExpCache* m_regExpCache;
-
- BumpPointerAllocator m_regexAllocator;
+ BumpPointerAllocator m_regExpAllocator;
#if ENABLE(REGEXP_TRACING)
typedef ListHashSet<RefPtr<RegExp> > RTTraceList;
#include "config.h"
#include "RegExp.h"
+
#include "Lexer.h"
+#include "yarr/YarrInterpreter.h"
+#include "yarr/YarrJIT.h"
+#include "yarr/YarrPattern.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <wtf/Assertions.h>
#include <wtf/OwnArrayPtr.h>
-#include "yarr/RegexJIT.h"
-#include "yarr/RegexInterpreter.h"
-#include "yarr/RegexPattern.h"
namespace JSC {
struct RegExpRepresentation {
#if ENABLE(YARR_JIT)
- Yarr::RegexCodeBlock m_regExpJITCode;
+ Yarr::YarrCodeBlock m_regExpJITCode;
#endif
OwnPtr<Yarr::BytecodePattern> m_regExpBytecode;
};
RegExp::RegExpState RegExp::compile(JSGlobalData* globalData)
{
- Yarr::RegexPattern pattern(m_patternString, ignoreCase(), multiline(), &m_constructionError);
+ Yarr::YarrPattern pattern(m_patternString, ignoreCase(), multiline(), &m_constructionError);
if (m_constructionError)
return ParseError;
#if ENABLE(YARR_JIT)
if (!pattern.m_containsBackreferences && globalData->canUseJIT()) {
- Yarr::jitCompileRegex(pattern, globalData, m_representation->m_regExpJITCode);
+ Yarr::jitCompile(pattern, globalData, m_representation->m_regExpJITCode);
#if ENABLE(YARR_JIT_DEBUG)
if (!m_representation->m_regExpJITCode.isFallBack())
res = JITCode;
}
#endif
- m_representation->m_regExpBytecode = Yarr::byteCompileRegex(pattern, &globalData->m_regexAllocator);
+ m_representation->m_regExpBytecode = Yarr::byteCompile(pattern, &globalData->m_regExpAllocator);
return res;
}
int result;
#if ENABLE(YARR_JIT)
if (m_state == JITCode) {
- result = Yarr::executeRegex(m_representation->m_regExpJITCode, s.characters(), startOffset, s.length(), offsetVector);
+ result = Yarr::execute(m_representation->m_regExpJITCode, s.characters(), startOffset, s.length(), offsetVector);
#if ENABLE(YARR_JIT_DEBUG)
matchCompareWithInterpreter(s, startOffset, offsetVector, result);
#endif
} else
#endif
- result = Yarr::interpretRegex(m_representation->m_regExpBytecode.get(), s.characters(), startOffset, s.length(), offsetVector);
+ result = Yarr::interpret(m_representation->m_regExpBytecode.get(), s.characters(), startOffset, s.length(), offsetVector);
ASSERT(result >= -1);
#if ENABLE(REGEXP_TRACING)
for (unsigned j = 0, i = 0; i < m_numSubpatterns + 1; j += 2, i++)
interpreterOffsetVector[j] = -1;
- interpreterResult = Yarr::interpretRegex(m_representation->m_regExpBytecode.get(), s.characters(), startOffset, s.length(), interpreterOffsetVector);
+ interpreterResult = Yarr::interpret(m_representation->m_regExpBytecode.get(), s.characters(), startOffset, s.length(), interpreterOffsetVector);
if (jitResult != interpreterResult)
differences++;
snprintf(formattedPattern, 41, (pattLen <= 38) ? "/%.38s/" : "/%.36s...", rawPattern);
#if ENABLE(YARR_JIT)
- Yarr::RegexCodeBlock& codeBlock = m_representation->m_regExpJITCode;
+ Yarr::YarrCodeBlock& codeBlock = m_representation->m_regExpJITCode;
char jitAddr[20];
if (m_state == JITCode)
*/
#include "config.h"
-#include "RegexInterpreter.h"
+#include "YarrInterpreter.h"
-#include "RegexPattern.h"
+#include "YarrPattern.h"
#include <wtf/BumpPointerAllocator.h>
#ifndef NDEBUG
};
public:
- ByteCompiler(RegexPattern& pattern)
+ ByteCompiler(YarrPattern& pattern)
: m_pattern(pattern)
{
m_currentAlternativeIndex = 0;
if (term.quantityType == QuantifierFixedCount)
disjunctionAlreadyCheckedCount = term.parentheses.disjunction->m_minimumSize;
else
- alternativeFrameLocation += RegexStackSpaceForBackTrackInfoParenthesesOnce;
+ alternativeFrameLocation += YarrStackSpaceForBackTrackInfoParenthesesOnce;
unsigned delegateEndInputOffset = term.inputPosition - currentCountAlreadyChecked;
atomParenthesesOnceBegin(term.parentheses.subpatternId, term.capture(), delegateEndInputOffset - disjunctionAlreadyCheckedCount, term.frameLocation, alternativeFrameLocation);
emitDisjunction(term.parentheses.disjunction, currentCountAlreadyChecked, disjunctionAlreadyCheckedCount);
atomParenthesesOnceEnd(delegateEndInputOffset, term.frameLocation, term.quantityCount, term.quantityType);
} else if (term.parentheses.isTerminal) {
unsigned delegateEndInputOffset = term.inputPosition - currentCountAlreadyChecked;
- atomParenthesesTerminalBegin(term.parentheses.subpatternId, term.capture(), delegateEndInputOffset - disjunctionAlreadyCheckedCount, term.frameLocation, term.frameLocation + RegexStackSpaceForBackTrackInfoParenthesesOnce);
+ atomParenthesesTerminalBegin(term.parentheses.subpatternId, term.capture(), delegateEndInputOffset - disjunctionAlreadyCheckedCount, term.frameLocation, term.frameLocation + YarrStackSpaceForBackTrackInfoParenthesesOnce);
emitDisjunction(term.parentheses.disjunction, currentCountAlreadyChecked, disjunctionAlreadyCheckedCount);
atomParenthesesTerminalEnd(delegateEndInputOffset, term.frameLocation, term.quantityCount, term.quantityType);
} else {
}
case PatternTerm::TypeParentheticalAssertion: {
- unsigned alternativeFrameLocation = term.frameLocation + RegexStackSpaceForBackTrackInfoParentheticalAssertion;
+ unsigned alternativeFrameLocation = term.frameLocation + YarrStackSpaceForBackTrackInfoParentheticalAssertion;
ASSERT(currentCountAlreadyChecked >= (unsigned)term.inputPosition);
int positiveInputOffset = currentCountAlreadyChecked - term.inputPosition;
}
private:
- RegexPattern& m_pattern;
+ YarrPattern& m_pattern;
OwnPtr<ByteDisjunction> m_bodyDisjunction;
unsigned m_currentAlternativeIndex;
Vector<ParenthesesStackEntry> m_parenthesesStack;
Vector<ByteDisjunction*> m_allParenthesesInfo;
};
-PassOwnPtr<BytecodePattern> byteCompileRegex(RegexPattern& pattern, BumpPointerAllocator* allocator)
+PassOwnPtr<BytecodePattern> byteCompile(YarrPattern& pattern, BumpPointerAllocator* allocator)
{
return ByteCompiler(pattern).compile(allocator);
}
-int interpretRegex(BytecodePattern* regex, const UChar* input, unsigned start, unsigned length, int* output)
+int interpret(BytecodePattern* bytecode, const UChar* input, unsigned start, unsigned length, int* output)
{
- return Interpreter(regex, output, input, start, length).interpret();
+ return Interpreter(bytecode, output, input, start, length).interpret();
}
-COMPILE_ASSERT(sizeof(Interpreter::BackTrackInfoPatternCharacter) == (RegexStackSpaceForBackTrackInfoPatternCharacter * sizeof(uintptr_t)), CheckRegexStackSpaceForBackTrackInfoPatternCharacter);
-COMPILE_ASSERT(sizeof(Interpreter::BackTrackInfoCharacterClass) == (RegexStackSpaceForBackTrackInfoCharacterClass * sizeof(uintptr_t)), CheckRegexStackSpaceForBackTrackInfoCharacterClass);
-COMPILE_ASSERT(sizeof(Interpreter::BackTrackInfoBackReference) == (RegexStackSpaceForBackTrackInfoBackReference * sizeof(uintptr_t)), CheckRegexStackSpaceForBackTrackInfoBackReference);
-COMPILE_ASSERT(sizeof(Interpreter::BackTrackInfoAlternative) == (RegexStackSpaceForBackTrackInfoAlternative * sizeof(uintptr_t)), CheckRegexStackSpaceForBackTrackInfoAlternative);
-COMPILE_ASSERT(sizeof(Interpreter::BackTrackInfoParentheticalAssertion) == (RegexStackSpaceForBackTrackInfoParentheticalAssertion * sizeof(uintptr_t)), CheckRegexStackSpaceForBackTrackInfoParentheticalAssertion);
-COMPILE_ASSERT(sizeof(Interpreter::BackTrackInfoParenthesesOnce) == (RegexStackSpaceForBackTrackInfoParenthesesOnce * sizeof(uintptr_t)), CheckRegexStackSpaceForBackTrackInfoParenthesesOnce);
-COMPILE_ASSERT(sizeof(Interpreter::BackTrackInfoParentheses) == (RegexStackSpaceForBackTrackInfoParentheses * sizeof(uintptr_t)), CheckRegexStackSpaceForBackTrackInfoParentheses);
+COMPILE_ASSERT(sizeof(Interpreter::BackTrackInfoPatternCharacter) == (YarrStackSpaceForBackTrackInfoPatternCharacter * sizeof(uintptr_t)), CheckYarrStackSpaceForBackTrackInfoPatternCharacter);
+COMPILE_ASSERT(sizeof(Interpreter::BackTrackInfoCharacterClass) == (YarrStackSpaceForBackTrackInfoCharacterClass * sizeof(uintptr_t)), CheckYarrStackSpaceForBackTrackInfoCharacterClass);
+COMPILE_ASSERT(sizeof(Interpreter::BackTrackInfoBackReference) == (YarrStackSpaceForBackTrackInfoBackReference * sizeof(uintptr_t)), CheckYarrStackSpaceForBackTrackInfoBackReference);
+COMPILE_ASSERT(sizeof(Interpreter::BackTrackInfoAlternative) == (YarrStackSpaceForBackTrackInfoAlternative * sizeof(uintptr_t)), CheckYarrStackSpaceForBackTrackInfoAlternative);
+COMPILE_ASSERT(sizeof(Interpreter::BackTrackInfoParentheticalAssertion) == (YarrStackSpaceForBackTrackInfoParentheticalAssertion * sizeof(uintptr_t)), CheckYarrStackSpaceForBackTrackInfoParentheticalAssertion);
+COMPILE_ASSERT(sizeof(Interpreter::BackTrackInfoParenthesesOnce) == (YarrStackSpaceForBackTrackInfoParenthesesOnce * sizeof(uintptr_t)), CheckYarrStackSpaceForBackTrackInfoParenthesesOnce);
+COMPILE_ASSERT(sizeof(Interpreter::BackTrackInfoParentheses) == (YarrStackSpaceForBackTrackInfoParentheses * sizeof(uintptr_t)), CheckYarrStackSpaceForBackTrackInfoParentheses);
} }
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef RegexInterpreter_h
-#define RegexInterpreter_h
+#ifndef YarrInterpreter_h
+#define YarrInterpreter_h
-#include "RegexParser.h"
-#include "RegexPattern.h"
+#include "YarrParser.h"
+#include "YarrPattern.h"
#include <wtf/PassOwnPtr.h>
#include <wtf/unicode/Unicode.h>
};
struct BytecodePattern : FastAllocBase {
- BytecodePattern(PassOwnPtr<ByteDisjunction> body, Vector<ByteDisjunction*> allParenthesesInfo, RegexPattern& pattern, BumpPointerAllocator* allocator)
+ BytecodePattern(PassOwnPtr<ByteDisjunction> body, Vector<ByteDisjunction*> allParenthesesInfo, YarrPattern& pattern, BumpPointerAllocator* allocator)
: m_body(body)
, m_ignoreCase(pattern.m_ignoreCase)
, m_multiline(pattern.m_multiline)
m_allParenthesesInfo.append(allParenthesesInfo);
m_userCharacterClasses.append(pattern.m_userCharacterClasses);
- // 'Steal' the RegexPattern's CharacterClasses! We clear its
+ // 'Steal' the YarrPattern's CharacterClasses! We clear its
// array, so that it won't delete them on destruction. We'll
// take responsibility for that.
pattern.m_userCharacterClasses.clear();
bool m_multiline;
bool m_containsBeginChars;
// Each BytecodePattern is associated with a RegExp, each RegExp is associated
- // with a JSGlobalData. Cache a pointer to out JSGlobalData's m_regexAllocator.
+ // with a JSGlobalData. Cache a pointer to out JSGlobalData's m_regExpAllocator.
BumpPointerAllocator* m_allocator;
CharacterClass* newlineCharacterClass;
Vector<CharacterClass*> m_userCharacterClasses;
};
-PassOwnPtr<BytecodePattern> byteCompileRegex(RegexPattern& pattern, BumpPointerAllocator*);
-int interpretRegex(BytecodePattern* v_regex, const UChar* input, unsigned start, unsigned length, int* output);
+PassOwnPtr<BytecodePattern> byteCompile(YarrPattern&, BumpPointerAllocator*);
+int interpret(BytecodePattern*, const UChar* input, unsigned start, unsigned length, int* output);
} } // namespace JSC::Yarr
-#endif // RegexInterpreter_h
+#endif // YarrInterpreter_h
*/
#include "config.h"
-#include "RegexJIT.h"
+#include "YarrJIT.h"
#include "ASCIICType.h"
#include "JSGlobalData.h"
#include "LinkBuffer.h"
#include "MacroAssembler.h"
-#include "RegexParser.h"
+#include "YarrParser.h"
#if ENABLE(YARR_JIT)
namespace JSC { namespace Yarr {
-class RegexGenerator : private MacroAssembler {
- friend void jitCompileRegex(JSGlobalData* globalData, RegexCodeBlock& jitObject, const UString& pattern, unsigned& numSubpatterns, const char*& error, bool ignoreCase, bool multiline);
+class YarrGenerator : private MacroAssembler {
+ friend void jitCompile(JSGlobalData*, YarrCodeBlock& jitObject, const UString& pattern, unsigned& numSubpatterns, const char*& error, bool ignoreCase, bool multiline);
#if CPU(ARM)
static const RegisterID input = ARMRegisters::r0;
return parenthesesTail;
}
- void emitParenthesesTail(RegexGenerator* generator)
+ void emitParenthesesTail(YarrGenerator* generator)
{
unsigned vectorSize = m_parenTails.size();
bool priorBacktrackFallThrough = false;
m_parenTailsForIteration.clear();
}
- void linkToNextIteration(RegexGenerator* generator)
+ void linkToNextIteration(YarrGenerator* generator)
{
m_jumpsToNextInteration.linkTo(m_nextIteration, generator);
}
m_backTrackJumps.append(masm->jump());
}
- void jumpToBacktrack(RegexGenerator* generator, Jump jump)
+ void jumpToBacktrack(YarrGenerator* generator, Jump jump)
{
if (isJumpList()) {
if (m_backtrackSourceLabel && (m_backtrackSourceLabel->isSet()))
m_backTrackJumps.append(jump);
}
- void jumpToBacktrack(RegexGenerator* generator, JumpList& jumps)
+ void jumpToBacktrack(YarrGenerator* generator, JumpList& jumps)
{
if (isJumpList()) {
if (m_backtrackSourceLabel && (m_backtrackSourceLabel->isSet()))
m_backTrackJumps.append(jumps);
}
- bool linkDataLabelToHereIfExists(RegexGenerator* generator)
+ bool linkDataLabelToHereIfExists(YarrGenerator* generator)
{
if (hasDataLabel()) {
generator->m_expressionState.m_backtrackRecords.append(AlternativeBacktrackRecord(getDataLabel(), generator->label()));
return false;
}
- bool plantJumpToBacktrackIfExists(RegexGenerator* generator)
+ bool plantJumpToBacktrackIfExists(YarrGenerator* generator)
{
if (isJumpList()) {
if (m_backtrackSourceLabel && (m_backtrackSourceLabel->isSet()))
return false;
}
- void linkAlternativeBacktracks(RegexGenerator* generator, bool nextIteration = false)
+ void linkAlternativeBacktracks(YarrGenerator* generator, bool nextIteration = false)
{
Label hereLabel = generator->label();
clear();
}
- void linkAlternativeBacktracksTo(RegexGenerator* generator, Label label, bool nextIteration = false)
+ void linkAlternativeBacktracksTo(YarrGenerator* generator, Label label, bool nextIteration = false)
{
m_backTrackJumps.linkTo(label, generator);
m_backtrack.jumpToBacktrack(masm);
}
- void jumpToBacktrack(RegexGenerator* generator, Jump jump)
+ void jumpToBacktrack(YarrGenerator* generator, Jump jump)
{
m_backtrack.jumpToBacktrack(generator, jump);
}
- void jumpToBacktrack(RegexGenerator* generator, JumpList& jumps)
+ void jumpToBacktrack(YarrGenerator* generator, JumpList& jumps)
{
m_backtrack.jumpToBacktrack(generator, jumps);
}
- bool plantJumpToBacktrackIfExists(RegexGenerator* generator)
+ bool plantJumpToBacktrackIfExists(YarrGenerator* generator)
{
return m_backtrack.plantJumpToBacktrackIfExists(generator);
}
- bool linkDataLabelToBacktrackIfExists(RegexGenerator* generator)
+ bool linkDataLabelToBacktrackIfExists(YarrGenerator* generator)
{
if ((m_backtrack.isLabel()) && (m_backtrack.hasDataLabel())) {
generator->m_expressionState.m_backtrackRecords.append(AlternativeBacktrackRecord(m_backtrack.getDataLabel(), m_backtrack.getLabel()));
m_backtrack.setLabel(label);
}
- void linkAlternativeBacktracks(RegexGenerator* generator, bool nextIteration = false)
+ void linkAlternativeBacktracks(YarrGenerator* generator, bool nextIteration = false)
{
m_backtrack.linkAlternativeBacktracks(generator, nextIteration);
m_linkedBacktrack = 0;
}
- void linkAlternativeBacktracksTo(RegexGenerator* generator, Label label, bool nextIteration = false)
+ void linkAlternativeBacktracksTo(YarrGenerator* generator, Label label, bool nextIteration = false)
{
m_backtrack.linkAlternativeBacktracksTo(generator, label, nextIteration);
}
return m_backtrack;
}
- void propagateBacktrackingFrom(RegexGenerator* generator, BacktrackDestination& backtrack, bool doJump = true)
+ void propagateBacktrackingFrom(YarrGenerator* generator, BacktrackDestination& backtrack, bool doJump = true)
{
if (doJump)
m_backtrack.jumpToBacktrack(generator, backtrack.getBacktrackJumps());
{
}
- void processBacktracks(RegexGenerator* generator, TermGenerationState& state, TermGenerationState& parenthesesState, Label nonGreedyTryParentheses, Label fallThrough)
+ void processBacktracks(YarrGenerator* generator, TermGenerationState& state, TermGenerationState& parenthesesState, Label nonGreedyTryParentheses, Label fallThrough)
{
m_nonGreedyTryParentheses = nonGreedyTryParentheses;
m_fallThrough = fallThrough;
m_pattBacktrackJumps.append(jump);
}
- bool generateCode(RegexGenerator* generator, JumpList& jumpsToNext, bool priorBackTrackFallThrough, bool nextBacktrackFallThrough)
+ bool generateCode(YarrGenerator* generator, JumpList& jumpsToNext, bool priorBackTrackFallThrough, bool nextBacktrackFallThrough)
{
const RegisterID indexTemporary = regT0;
unsigned parenthesesFrameLocation = m_term.frameLocation;
unsigned parenthesesFrameLocation = term.frameLocation;
unsigned alternativeFrameLocation = parenthesesFrameLocation;
if (term.quantityType != QuantifierFixedCount)
- alternativeFrameLocation += RegexStackSpaceForBackTrackInfoParenthesesOnce;
+ alternativeFrameLocation += YarrStackSpaceForBackTrackInfoParenthesesOnce;
// optimized case - no capture & no quantifier can be handled in a light-weight manner.
if (!term.capture() && (term.quantityType == QuantifierFixedCount)) {
ASSERT(term.quantityType == QuantifierFixedCount);
unsigned parenthesesFrameLocation = term.frameLocation;
- unsigned alternativeFrameLocation = parenthesesFrameLocation + RegexStackSpaceForBackTrackInfoParentheticalAssertion;
+ unsigned alternativeFrameLocation = parenthesesFrameLocation + YarrStackSpaceForBackTrackInfoParentheticalAssertion;
int countCheckedAfterAssertion = state.checkedTotal - term.inputPosition;
}
public:
- RegexGenerator(RegexPattern& pattern)
+ YarrGenerator(YarrPattern& pattern)
: m_pattern(pattern)
, m_shouldFallBack(false)
{
generateDisjunction(m_pattern.m_body);
}
- void compile(JSGlobalData* globalData, RegexCodeBlock& jitObject)
+ void compile(JSGlobalData* globalData, YarrCodeBlock& jitObject)
{
generate();
}
private:
- RegexPattern& m_pattern;
+ YarrPattern& m_pattern;
bool m_shouldFallBack;
GenerationState m_expressionState;
};
-void jitCompileRegex(RegexPattern& pattern, JSGlobalData* globalData, RegexCodeBlock& jitObject)
+void jitCompile(YarrPattern& pattern, JSGlobalData* globalData, YarrCodeBlock& jitObject)
{
- RegexGenerator generator(pattern);
+ YarrGenerator generator(pattern);
generator.compile(globalData, jitObject);
}
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef RegexJIT_h
-#define RegexJIT_h
+#ifndef YarrJIT_h
+#define YarrJIT_h
#if ENABLE(YARR_JIT)
#include "MacroAssembler.h"
-#include "RegexPattern.h"
+#include "YarrPattern.h"
#include "UString.h"
#if CPU(X86) && !COMPILER(MSVC)
namespace Yarr {
-class RegexCodeBlock {
- typedef int (*RegexJITCode)(const UChar* input, unsigned start, unsigned length, int* output) YARR_CALL;
+class YarrCodeBlock {
+ typedef int (*YarrJITCode)(const UChar* input, unsigned start, unsigned length, int* output) YARR_CALL;
public:
- RegexCodeBlock()
+ YarrCodeBlock()
: m_needFallBack(false)
{
}
- ~RegexCodeBlock()
+ ~YarrCodeBlock()
{
}
int execute(const UChar* input, unsigned start, unsigned length, int* output)
{
- return reinterpret_cast<RegexJITCode>(m_ref.m_code.executableAddress())(input, start, length, output);
+ return reinterpret_cast<YarrJITCode>(m_ref.m_code.executableAddress())(input, start, length, output);
}
#if ENABLE(REGEXP_TRACING)
bool m_needFallBack;
};
-void jitCompileRegex(RegexPattern& pattern, JSGlobalData* globalData, RegexCodeBlock& jitObject);
+void jitCompile(YarrPattern&, JSGlobalData*, YarrCodeBlock& jitObject);
-inline int executeRegex(RegexCodeBlock& jitObject, const UChar* input, unsigned start, unsigned length, int* output)
+inline int execute(YarrCodeBlock& jitObject, const UChar* input, unsigned start, unsigned length, int* output)
{
return jitObject.execute(input, start, length, output);
}
#endif
-#endif // RegexJIT_h
+#endif // YarrJIT_h
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef RegexParser_h
-#define RegexParser_h
+#ifndef YarrParser_h
+#define YarrParser_h
#include "UString.h"
#include <limits.h>
/*
* parse():
*
- * This method calls regexBegin(), calls parseTokens() to parse over the input
- * patterns, calls regexEnd() or regexError() as appropriate, and converts any
+ * This method calls parseTokens() to parse over the input and converts any
* error code to a const char* for a result.
*/
const char* parse()
} } // namespace JSC::Yarr
-#endif // RegexParser_h
+#endif // YarrParser_h
*/
#include "config.h"
+#include "YarrPattern.h"
-#include "RegexInterpreter.h"
-#include "RegexPattern.h"
+#include "YarrInterpreter.h"
#include <wtf/Vector.h>
using namespace WTF;
bool m_isCaseInsensitive;
};
-class RegexPatternConstructor {
+class YarrPatternConstructor {
public:
- RegexPatternConstructor(RegexPattern& pattern)
+ YarrPatternConstructor(YarrPattern& pattern)
: m_pattern(pattern)
, m_characterClassConstructor(pattern.m_ignoreCase)
, m_beginCharHelper(&pattern.m_beginChars, pattern.m_ignoreCase)
, m_invertParentheticalAssertion(false)
{
+ m_pattern.m_body = new PatternDisjunction();
+ m_alternative = m_pattern.m_body->addNewAlternative();
+ m_pattern.m_disjunctions.append(m_pattern.m_body);
}
- ~RegexPatternConstructor()
+ ~YarrPatternConstructor()
{
}
{
m_pattern.reset();
m_characterClassConstructor.reset();
+
+ m_pattern.m_body = new PatternDisjunction();
+ m_alternative = m_pattern.m_body->addNewAlternative();
+ m_pattern.m_disjunctions.append(m_pattern.m_body);
}
void assertionBOL()
m_alternative = m_alternative->m_parent->addNewAlternative();
}
- void regexBegin()
- {
- m_pattern.m_body = new PatternDisjunction();
- m_alternative = m_pattern.m_body->addNewAlternative();
- m_pattern.m_disjunctions.append(m_pattern.m_body);
- }
-
unsigned setupAlternativeOffsets(PatternAlternative* alternative, unsigned currentCallFrameSize, unsigned initialInputPosition)
{
alternative->m_hasFixedSize = true;
case PatternTerm::TypeBackReference:
term.inputPosition = currentInputPosition;
term.frameLocation = currentCallFrameSize;
- currentCallFrameSize += RegexStackSpaceForBackTrackInfoBackReference;
+ currentCallFrameSize += YarrStackSpaceForBackTrackInfoBackReference;
alternative->m_hasFixedSize = false;
break;
term.inputPosition = currentInputPosition;
if (term.quantityType != QuantifierFixedCount) {
term.frameLocation = currentCallFrameSize;
- currentCallFrameSize += RegexStackSpaceForBackTrackInfoPatternCharacter;
+ currentCallFrameSize += YarrStackSpaceForBackTrackInfoPatternCharacter;
alternative->m_hasFixedSize = false;
} else
currentInputPosition += term.quantityCount;
term.inputPosition = currentInputPosition;
if (term.quantityType != QuantifierFixedCount) {
term.frameLocation = currentCallFrameSize;
- currentCallFrameSize += RegexStackSpaceForBackTrackInfoCharacterClass;
+ currentCallFrameSize += YarrStackSpaceForBackTrackInfoCharacterClass;
alternative->m_hasFixedSize = false;
} else
currentInputPosition += term.quantityCount;
term.frameLocation = currentCallFrameSize;
if (term.quantityCount == 1 && !term.parentheses.isCopy) {
if (term.quantityType != QuantifierFixedCount)
- currentCallFrameSize += RegexStackSpaceForBackTrackInfoParenthesesOnce;
+ currentCallFrameSize += YarrStackSpaceForBackTrackInfoParenthesesOnce;
currentCallFrameSize = setupDisjunctionOffsets(term.parentheses.disjunction, currentCallFrameSize, currentInputPosition);
// If quantity is fixed, then pre-check its minimum size.
if (term.quantityType == QuantifierFixedCount)
currentInputPosition += term.parentheses.disjunction->m_minimumSize;
term.inputPosition = currentInputPosition;
} else if (term.parentheses.isTerminal) {
- currentCallFrameSize += RegexStackSpaceForBackTrackInfoParenthesesTerminal;
+ currentCallFrameSize += YarrStackSpaceForBackTrackInfoParenthesesTerminal;
currentCallFrameSize = setupDisjunctionOffsets(term.parentheses.disjunction, currentCallFrameSize, currentInputPosition);
term.inputPosition = currentInputPosition;
} else {
term.inputPosition = currentInputPosition;
setupDisjunctionOffsets(term.parentheses.disjunction, 0, currentInputPosition);
- currentCallFrameSize += RegexStackSpaceForBackTrackInfoParentheses;
+ currentCallFrameSize += YarrStackSpaceForBackTrackInfoParentheses;
}
// Fixed count of 1 could be accepted, if they have a fixed size *AND* if all alternatives are of the same length.
alternative->m_hasFixedSize = false;
case PatternTerm::TypeParentheticalAssertion:
term.inputPosition = currentInputPosition;
term.frameLocation = currentCallFrameSize;
- currentCallFrameSize = setupDisjunctionOffsets(term.parentheses.disjunction, currentCallFrameSize + RegexStackSpaceForBackTrackInfoParentheticalAssertion, currentInputPosition);
+ currentCallFrameSize = setupDisjunctionOffsets(term.parentheses.disjunction, currentCallFrameSize + YarrStackSpaceForBackTrackInfoParentheticalAssertion, currentInputPosition);
break;
}
}
unsigned setupDisjunctionOffsets(PatternDisjunction* disjunction, unsigned initialCallFrameSize, unsigned initialInputPosition)
{
if ((disjunction != m_pattern.m_body) && (disjunction->m_alternatives.size() > 1))
- initialCallFrameSize += RegexStackSpaceForBackTrackInfoAlternative;
+ initialCallFrameSize += YarrStackSpaceForBackTrackInfoAlternative;
unsigned minimumInputSize = UINT_MAX;
unsigned maximumCallFrameSize = 0;
}
private:
- RegexPattern& m_pattern;
+ YarrPattern& m_pattern;
PatternAlternative* m_alternative;
CharacterClassConstructor m_characterClassConstructor;
BeginCharHelper m_beginCharHelper;
};
-static const char* compileRegex(const UString& patternString, RegexPattern& pattern)
+static const char* compile(const UString& patternString, YarrPattern& pattern)
{
- RegexPatternConstructor constructor(pattern);
+ YarrPatternConstructor constructor(pattern);
- constructor.regexBegin();
if (const char* error = parse(constructor, patternString))
return error;
unsigned numSubpatterns = pattern.m_numSubpatterns;
constructor.reset();
- constructor.regexBegin();
#if !ASSERT_DISABLED
const char* error =
#endif
return 0;
};
-RegexPattern::RegexPattern(const UString& pattern, bool ignoreCase, bool multiline, const char** error)
+YarrPattern::YarrPattern(const UString& pattern, bool ignoreCase, bool multiline, const char** error)
: m_ignoreCase(ignoreCase)
, m_multiline(multiline)
, m_containsBackreferences(false)
, nonspacesCached(0)
, nonwordcharCached(0)
{
- *error = compileRegex(pattern, *this);
+ *error = compile(pattern, *this);
}
} }
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef RegexPattern_h
-#define RegexPattern_h
+#ifndef YarrPattern_h
+#define YarrPattern_h
#include <wtf/Vector.h>
#include <wtf/unicode/Unicode.h>
namespace JSC { namespace Yarr {
-#define RegexStackSpaceForBackTrackInfoPatternCharacter 1 // Only for !fixed quantifiers.
-#define RegexStackSpaceForBackTrackInfoCharacterClass 1 // Only for !fixed quantifiers.
-#define RegexStackSpaceForBackTrackInfoBackReference 2
-#define RegexStackSpaceForBackTrackInfoAlternative 1 // One per alternative.
-#define RegexStackSpaceForBackTrackInfoParentheticalAssertion 1
-#define RegexStackSpaceForBackTrackInfoParenthesesOnce 1 // Only for !fixed quantifiers.
-#define RegexStackSpaceForBackTrackInfoParenthesesTerminal 1
-#define RegexStackSpaceForBackTrackInfoParentheses 2
+#define YarrStackSpaceForBackTrackInfoPatternCharacter 1 // Only for !fixed quantifiers.
+#define YarrStackSpaceForBackTrackInfoCharacterClass 1 // Only for !fixed quantifiers.
+#define YarrStackSpaceForBackTrackInfoBackReference 2
+#define YarrStackSpaceForBackTrackInfoAlternative 1 // One per alternative.
+#define YarrStackSpaceForBackTrackInfoParentheticalAssertion 1
+#define YarrStackSpaceForBackTrackInfoParenthesesOnce 1 // Only for !fixed quantifiers.
+#define YarrStackSpaceForBackTrackInfoParenthesesTerminal 1
+#define YarrStackSpaceForBackTrackInfoParentheses 2
struct PatternDisjunction;
// You probably don't want to be calling these functions directly
// (please to be calling newlineCharacterClass() et al on your
-// friendly neighborhood RegexPattern instance to get nicely
+// friendly neighborhood YarrPattern instance to get nicely
// cached copies).
CharacterClass* newlineCreate();
CharacterClass* digitsCreate();
unsigned mask;
};
-struct RegexPattern {
- RegexPattern(const UString& pattern, bool ignoreCase, bool multiline, const char** error);
+struct YarrPattern {
+ YarrPattern(const UString& pattern, bool ignoreCase, bool multiline, const char** error);
- ~RegexPattern()
+ ~YarrPattern()
{
deleteAllValues(m_disjunctions);
deleteAllValues(m_userCharacterClasses);
} } // namespace JSC::Yarr
-#endif // RegexPattern_h
+#endif // YarrPattern_h
#include "config.h"
#include "YarrSyntaxChecker.h"
-#include "RegexParser.h"
+#include "YarrParser.h"
namespace JSC { namespace Yarr {