Changeset 108858 in webkit for trunk/Source/JavaScriptCore/yarr
- Timestamp:
- Feb 24, 2012, 3:55:01 PM (13 years ago)
- Location:
- trunk/Source/JavaScriptCore/yarr
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/yarr/Yarr.h
r104900 r108858 44 44 45 45 static const unsigned quantifyInfinite = UINT_MAX; 46 static const unsigned offsetNoMatch = (unsigned)-1; 46 47 47 48 // The below limit restricts the number of "recursive" match calls in order to … … 64 65 65 66 JS_EXPORT_PRIVATE PassOwnPtr<BytecodePattern> byteCompile(YarrPattern&, BumpPointerAllocator*); 66 JS_EXPORT_PRIVATE int interpret(BytecodePattern*, const UString& input, unsigned start, unsigned length, int* output);67 JS_EXPORT_PRIVATE unsigned interpret(BytecodePattern*, const UString& input, unsigned start, unsigned length, unsigned* output); 67 68 68 69 } } // namespace JSC::Yarr -
trunk/Source/JavaScriptCore/yarr/YarrInterpreter.cpp
r107499 r108858 122 122 struct ParenthesesDisjunctionContext 123 123 { 124 ParenthesesDisjunctionContext( int* output, ByteTerm& term)124 ParenthesesDisjunctionContext(unsigned* output, ByteTerm& term) 125 125 : next(0) 126 126 { … … 130 130 for (unsigned i = 0; i < (numNestedSubpatterns << 1); ++i) { 131 131 subpatternBackup[i] = output[(firstSubpatternId << 1) + i]; 132 output[(firstSubpatternId << 1) + i] = -1;132 output[(firstSubpatternId << 1) + i] = offsetNoMatch; 133 133 } 134 134 … … 141 141 } 142 142 143 void restoreOutput( int* output, unsigned firstSubpatternId, unsigned numNestedSubpatterns)143 void restoreOutput(unsigned* output, unsigned firstSubpatternId, unsigned numNestedSubpatterns) 144 144 { 145 145 for (unsigned i = 0; i < (numNestedSubpatterns << 1); ++i) … … 153 153 154 154 ParenthesesDisjunctionContext* next; 155 intsubpatternBackup[1];155 unsigned subpatternBackup[1]; 156 156 }; 157 157 158 ParenthesesDisjunctionContext* allocParenthesesDisjunctionContext(ByteDisjunction* disjunction, int* output, ByteTerm& term)159 { 160 size_t size = sizeof(ParenthesesDisjunctionContext) - sizeof( int) + (term.atom.parenthesesDisjunction->m_numSubpatterns << 1) * sizeof(int) + sizeof(DisjunctionContext) - sizeof(uintptr_t) + disjunction->m_frameSize * sizeof(uintptr_t);158 ParenthesesDisjunctionContext* allocParenthesesDisjunctionContext(ByteDisjunction* disjunction, unsigned* output, ByteTerm& term) 159 { 160 size_t size = sizeof(ParenthesesDisjunctionContext) - sizeof(unsigned) + (term.atom.parenthesesDisjunction->m_numSubpatterns << 1) * sizeof(unsigned) + sizeof(DisjunctionContext) - sizeof(uintptr_t) + disjunction->m_frameSize * sizeof(uintptr_t); 161 161 allocatorPool = allocatorPool->ensureCapacity(size); 162 162 if (!allocatorPool) … … 250 250 } 251 251 252 int readChecked( int position)253 { 254 ASSERT(position < 0);255 ASSERT(static_cast<unsigned>(-position) <= pos);256 unsigned p = pos + position;252 int readChecked(unsigned negativePositionOffest) 253 { 254 if (pos < negativePositionOffest) 255 CRASH(); 256 unsigned p = pos - negativePositionOffest; 257 257 ASSERT(p < length); 258 258 return input[p]; … … 298 298 } 299 299 300 bool checkInput( intcount)301 { 302 if (( pos + count) <= length) {300 bool checkInput(unsigned count) 301 { 302 if (((pos + count) <= length) && ((pos + count) >= pos)) { 303 303 pos += count; 304 304 return true; … … 307 307 } 308 308 309 void uncheckInput(int count) 310 { 309 void uncheckInput(unsigned count) 310 { 311 if (pos < count) 312 CRASH(); 311 313 pos -= count; 312 314 } 313 315 314 bool atStart(int position) 315 { 316 return (pos + position) == 0; 317 } 318 319 bool atEnd(int position) 320 { 321 return (pos + position) == length; 322 } 323 324 bool isNotAvailableInput(int position) 325 { 326 return (pos + position) > length; 316 bool atStart(unsigned negativePositionOffest) 317 { 318 return pos == negativePositionOffest; 319 } 320 321 bool atEnd(unsigned negativePositionOffest) 322 { 323 if (pos < negativePositionOffest) 324 CRASH(); 325 return (pos - negativePositionOffest) == length; 326 } 327 328 bool isAvailableInput(unsigned offset) 329 { 330 return (((pos + offset) <= length) && ((pos + offset) >= pos)); 327 331 } 328 332 … … 354 358 } 355 359 356 bool checkCharacter(int testChar, int inputPosition)357 { 358 return testChar == input.readChecked( inputPosition);359 } 360 361 bool checkCasedCharacter(int loChar, int hiChar, int inputPosition)362 { 363 int ch = input.readChecked( inputPosition);360 bool checkCharacter(int testChar, unsigned negativeInputOffset) 361 { 362 return testChar == input.readChecked(negativeInputOffset); 363 } 364 365 bool checkCasedCharacter(int loChar, int hiChar, unsigned negativeInputOffset) 366 { 367 int ch = input.readChecked(negativeInputOffset); 364 368 return (loChar == ch) || (hiChar == ch); 365 369 } 366 370 367 bool checkCharacterClass(CharacterClass* characterClass, bool invert, int inputPosition)368 { 369 bool match = testCharacterClass(characterClass, input.readChecked( inputPosition));371 bool checkCharacterClass(CharacterClass* characterClass, bool invert, unsigned negativeInputOffset) 372 { 373 bool match = testCharacterClass(characterClass, input.readChecked(negativeInputOffset)); 370 374 return invert ? !match : match; 371 375 } 372 376 373 bool tryConsumeBackReference(int matchBegin, int matchEnd, int inputOffset)374 { 375 int matchSize = matchEnd - matchBegin;377 bool tryConsumeBackReference(int matchBegin, int matchEnd, unsigned negativeInputOffset) 378 { 379 unsigned matchSize = (unsigned)(matchEnd - matchBegin); 376 380 377 381 if (!input.checkInput(matchSize)) … … 379 383 380 384 if (pattern->m_ignoreCase) { 381 for ( inti = 0; i < matchSize; ++i) {385 for (unsigned i = 0; i < matchSize; ++i) { 382 386 int ch = input.reread(matchBegin + i); 383 387 … … 385 389 int hi = Unicode::toUpper(ch); 386 390 387 if ((lo != hi) ? (!checkCasedCharacter(lo, hi, inputOffset - matchSize + i)) : (!checkCharacter(ch, inputOffset - matchSize +i))) {391 if ((lo != hi) ? (!checkCasedCharacter(lo, hi, negativeInputOffset + matchSize - i)) : (!checkCharacter(ch, negativeInputOffset + matchSize - i))) { 388 392 input.uncheckInput(matchSize); 389 393 return false; … … 391 395 } 392 396 } else { 393 for ( inti = 0; i < matchSize; ++i) {394 if (!checkCharacter(input.reread(matchBegin + i), inputOffset - matchSize +i)) {397 for (unsigned i = 0; i < matchSize; ++i) { 398 if (!checkCharacter(input.reread(matchBegin + i), negativeInputOffset + matchSize - i)) { 395 399 input.uncheckInput(matchSize); 396 400 return false; … … 404 408 bool matchAssertionBOL(ByteTerm& term) 405 409 { 406 return (input.atStart(term.inputPosition)) || (pattern->m_multiline && testCharacterClass(pattern->newlineCharacterClass, input.readChecked(term.inputPosition -1)));410 return (input.atStart(term.inputPosition)) || (pattern->m_multiline && testCharacterClass(pattern->newlineCharacterClass, input.readChecked(term.inputPosition + 1))); 407 411 } 408 412 … … 417 421 bool matchAssertionWordBoundary(ByteTerm& term) 418 422 { 419 bool prevIsWordchar = !input.atStart(term.inputPosition) && testCharacterClass(pattern->wordcharCharacterClass, input.readChecked(term.inputPosition -1));423 bool prevIsWordchar = !input.atStart(term.inputPosition) && testCharacterClass(pattern->wordcharCharacterClass, input.readChecked(term.inputPosition + 1)); 420 424 bool readIsWordchar; 421 425 if (term.inputPosition) … … 447 451 if ((backTrack->matchAmount < term.atom.quantityCount) && input.checkInput(1)) { 448 452 ++backTrack->matchAmount; 449 if (checkCharacter(term.atom.patternCharacter, term.inputPosition -1))453 if (checkCharacter(term.atom.patternCharacter, term.inputPosition + 1)) 450 454 return true; 451 455 } … … 476 480 if ((backTrack->matchAmount < term.atom.quantityCount) && input.checkInput(1)) { 477 481 ++backTrack->matchAmount; 478 if (checkCasedCharacter(term.atom.casedCharacter.lo, term.atom.casedCharacter.hi, term.inputPosition -1))482 if (checkCasedCharacter(term.atom.casedCharacter.lo, term.atom.casedCharacter.hi, term.inputPosition + 1)) 479 483 return true; 480 484 } … … 494 498 case QuantifierFixedCount: { 495 499 for (unsigned matchAmount = 0; matchAmount < term.atom.quantityCount; ++matchAmount) { 496 if (!checkCharacterClass(term.atom.characterClass, term.invert(), term.inputPosition +matchAmount))500 if (!checkCharacterClass(term.atom.characterClass, term.invert(), term.inputPosition - matchAmount)) 497 501 return false; 498 502 } … … 503 507 unsigned matchAmount = 0; 504 508 while ((matchAmount < term.atom.quantityCount) && input.checkInput(1)) { 505 if (!checkCharacterClass(term.atom.characterClass, term.invert(), term.inputPosition -1)) {509 if (!checkCharacterClass(term.atom.characterClass, term.invert(), term.inputPosition + 1)) { 506 510 input.uncheckInput(1); 507 511 break; … … 543 547 if ((backTrack->matchAmount < term.atom.quantityCount) && input.checkInput(1)) { 544 548 ++backTrack->matchAmount; 545 if (checkCharacterClass(term.atom.characterClass, term.invert(), term.inputPosition -1))549 if (checkCharacterClass(term.atom.characterClass, term.invert(), term.inputPosition + 1)) 546 550 return true; 547 551 } … … 558 562 BackTrackInfoBackReference* backTrack = reinterpret_cast<BackTrackInfoBackReference*>(context->frame + term.frameLocation); 559 563 560 intmatchBegin = output[(term.atom.subpatternId << 1)];561 intmatchEnd = output[(term.atom.subpatternId << 1) + 1];564 unsigned matchBegin = output[(term.atom.subpatternId << 1)]; 565 unsigned matchEnd = output[(term.atom.subpatternId << 1) + 1]; 562 566 563 567 // If the end position of the referenced match hasn't set yet then the backreference in the same parentheses where it references to that. 564 568 // In this case the result of match is empty string like when it references to a parentheses with zero-width match. 565 569 // Eg.: /(a\1)/ 566 if (matchEnd == -1)570 if (matchEnd == offsetNoMatch) 567 571 return true; 568 572 569 if (matchBegin == -1)573 if (matchBegin == offsetNoMatch) 570 574 return true; 571 575 … … 610 614 BackTrackInfoBackReference* backTrack = reinterpret_cast<BackTrackInfoBackReference*>(context->frame + term.frameLocation); 611 615 612 intmatchBegin = output[(term.atom.subpatternId << 1)];613 intmatchEnd = output[(term.atom.subpatternId << 1) + 1];614 615 if (matchBegin == -1)616 unsigned matchBegin = output[(term.atom.subpatternId << 1)]; 617 unsigned matchEnd = output[(term.atom.subpatternId << 1) + 1]; 618 619 if (matchBegin == offsetNoMatch) 616 620 return false; 617 621 … … 705 709 if (term.capture()) { 706 710 unsigned subpatternId = term.atom.subpatternId; 707 output[(subpatternId << 1)] = input.getPos() +term.inputPosition;711 output[(subpatternId << 1)] = input.getPos() - term.inputPosition; 708 712 } 709 713 … … 737 741 if (term.capture()) { 738 742 unsigned subpatternId = term.atom.subpatternId; 739 output[(subpatternId << 1)] = -1;740 output[(subpatternId << 1) + 1] = -1;743 output[(subpatternId << 1)] = offsetNoMatch; 744 output[(subpatternId << 1) + 1] = offsetNoMatch; 741 745 } 742 746 … … 1195 1199 case ByteTerm::TypePatternCharacterFixed: { 1196 1200 for (unsigned matchAmount = 0; matchAmount < currentTerm().atom.quantityCount; ++matchAmount) { 1197 if (!checkCharacter(currentTerm().atom.patternCharacter, currentTerm().inputPosition +matchAmount))1201 if (!checkCharacter(currentTerm().atom.patternCharacter, currentTerm().inputPosition - matchAmount)) 1198 1202 BACKTRACK(); 1199 1203 } … … 1204 1208 unsigned matchAmount = 0; 1205 1209 while ((matchAmount < currentTerm().atom.quantityCount) && input.checkInput(1)) { 1206 if (!checkCharacter(currentTerm().atom.patternCharacter, currentTerm().inputPosition -1)) {1210 if (!checkCharacter(currentTerm().atom.patternCharacter, currentTerm().inputPosition + 1)) { 1207 1211 input.uncheckInput(1); 1208 1212 break; … … 1223 1227 case ByteTerm::TypePatternCasedCharacterFixed: { 1224 1228 for (unsigned matchAmount = 0; matchAmount < currentTerm().atom.quantityCount; ++matchAmount) { 1225 if (!checkCasedCharacter(currentTerm().atom.casedCharacter.lo, currentTerm().atom.casedCharacter.hi, currentTerm().inputPosition +matchAmount))1229 if (!checkCasedCharacter(currentTerm().atom.casedCharacter.lo, currentTerm().atom.casedCharacter.hi, currentTerm().inputPosition - matchAmount)) 1226 1230 BACKTRACK(); 1227 1231 } … … 1232 1236 unsigned matchAmount = 0; 1233 1237 while ((matchAmount < currentTerm().atom.quantityCount) && input.checkInput(1)) { 1234 if (!checkCasedCharacter(currentTerm().atom.casedCharacter.lo, currentTerm().atom.casedCharacter.hi, currentTerm().inputPosition -1)) {1238 if (!checkCasedCharacter(currentTerm().atom.casedCharacter.lo, currentTerm().atom.casedCharacter.hi, currentTerm().inputPosition + 1)) { 1235 1239 input.uncheckInput(1); 1236 1240 break; … … 1450 1454 } 1451 1455 1452 intinterpret()1453 { 1454 if ( input.isNotAvailableInput(0))1455 return -1;1456 unsigned interpret() 1457 { 1458 if (!input.isAvailableInput(0)) 1459 return offsetNoMatch; 1456 1460 1457 1461 for (unsigned i = 0; i < pattern->m_body->m_numSubpatterns + 1; ++i) 1458 output[i << 1] = -1;1462 output[i << 1] = offsetNoMatch; 1459 1463 1460 1464 allocatorPool = pattern->m_allocator->startAllocator(); … … 1474 1478 pattern->m_allocator->stopAllocator(); 1475 1479 1476 ASSERT((result == JSRegExpMatch) == (output[0] != -1));1480 ASSERT((result == JSRegExpMatch) == (output[0] != offsetNoMatch)); 1477 1481 return output[0]; 1478 1482 } 1479 1483 1480 Interpreter(BytecodePattern* pattern, int* output, const UString input, unsigned start, unsigned length)1484 Interpreter(BytecodePattern* pattern, unsigned* output, const UString input, unsigned start, unsigned length) 1481 1485 : pattern(pattern) 1482 1486 , output(output) … … 1489 1493 private: 1490 1494 BytecodePattern* pattern; 1491 int* output;1495 unsigned* output; 1492 1496 InputStream input; 1493 1497 BumpPointerPool* allocatorPool; … … 1534 1538 } 1535 1539 1536 void assertionBOL( intinputPosition)1540 void assertionBOL(unsigned inputPosition) 1537 1541 { 1538 1542 m_bodyDisjunction->terms.append(ByteTerm::BOL(inputPosition)); 1539 1543 } 1540 1544 1541 void assertionEOL( intinputPosition)1545 void assertionEOL(unsigned inputPosition) 1542 1546 { 1543 1547 m_bodyDisjunction->terms.append(ByteTerm::EOL(inputPosition)); 1544 1548 } 1545 1549 1546 void assertionWordBoundary(bool invert, intinputPosition)1550 void assertionWordBoundary(bool invert, unsigned inputPosition) 1547 1551 { 1548 1552 m_bodyDisjunction->terms.append(ByteTerm::WordBoundary(invert, inputPosition)); 1549 1553 } 1550 1554 1551 void atomPatternCharacter(UChar ch, intinputPosition, unsigned frameLocation, Checked<unsigned> quantityCount, QuantifierType quantityType)1555 void atomPatternCharacter(UChar ch, unsigned inputPosition, unsigned frameLocation, Checked<unsigned> quantityCount, QuantifierType quantityType) 1552 1556 { 1553 1557 if (m_pattern.m_ignoreCase) { … … 1564 1568 } 1565 1569 1566 void atomCharacterClass(CharacterClass* characterClass, bool invert, intinputPosition, unsigned frameLocation, Checked<unsigned> quantityCount, QuantifierType quantityType)1570 void atomCharacterClass(CharacterClass* characterClass, bool invert, unsigned inputPosition, unsigned frameLocation, Checked<unsigned> quantityCount, QuantifierType quantityType) 1567 1571 { 1568 1572 m_bodyDisjunction->terms.append(ByteTerm(characterClass, invert, inputPosition)); … … 1573 1577 } 1574 1578 1575 void atomBackReference(unsigned subpatternId, intinputPosition, unsigned frameLocation, Checked<unsigned> quantityCount, QuantifierType quantityType)1579 void atomBackReference(unsigned subpatternId, unsigned inputPosition, unsigned frameLocation, Checked<unsigned> quantityCount, QuantifierType quantityType) 1576 1580 { 1577 1581 ASSERT(subpatternId); … … 1584 1588 } 1585 1589 1586 void atomParenthesesOnceBegin(unsigned subpatternId, bool capture, intinputPosition, unsigned frameLocation, unsigned alternativeFrameLocation)1590 void atomParenthesesOnceBegin(unsigned subpatternId, bool capture, unsigned inputPosition, unsigned frameLocation, unsigned alternativeFrameLocation) 1587 1591 { 1588 1592 int beginTerm = m_bodyDisjunction->terms.size(); … … 1597 1601 } 1598 1602 1599 void atomParenthesesTerminalBegin(unsigned subpatternId, bool capture, intinputPosition, unsigned frameLocation, unsigned alternativeFrameLocation)1603 void atomParenthesesTerminalBegin(unsigned subpatternId, bool capture, unsigned inputPosition, unsigned frameLocation, unsigned alternativeFrameLocation) 1600 1604 { 1601 1605 int beginTerm = m_bodyDisjunction->terms.size(); … … 1610 1614 } 1611 1615 1612 void atomParenthesesSubpatternBegin(unsigned subpatternId, bool capture, intinputPosition, unsigned frameLocation, unsigned alternativeFrameLocation)1616 void atomParenthesesSubpatternBegin(unsigned subpatternId, bool capture, unsigned inputPosition, unsigned frameLocation, unsigned alternativeFrameLocation) 1613 1617 { 1614 1618 // Errrk! - this is a little crazy, we initially generate as a TypeParenthesesSubpatternOnceBegin, … … 1640 1644 } 1641 1645 1642 void atomParentheticalAssertionEnd( intinputPosition, unsigned frameLocation, Checked<unsigned> quantityCount, QuantifierType quantityType)1646 void atomParentheticalAssertionEnd(unsigned inputPosition, unsigned frameLocation, Checked<unsigned> quantityCount, QuantifierType quantityType) 1643 1647 { 1644 1648 unsigned beginTerm = popParenthesesStack(); … … 1872 1876 switch (term.type) { 1873 1877 case PatternTerm::TypeAssertionBOL: 1874 assertionBOL( term.inputPosition - currentCountAlreadyChecked);1878 assertionBOL(currentCountAlreadyChecked - term.inputPosition); 1875 1879 break; 1876 1880 1877 1881 case PatternTerm::TypeAssertionEOL: 1878 assertionEOL( term.inputPosition - currentCountAlreadyChecked);1882 assertionEOL(currentCountAlreadyChecked - term.inputPosition); 1879 1883 break; 1880 1884 1881 1885 case PatternTerm::TypeAssertionWordBoundary: 1882 assertionWordBoundary(term.invert(), term.inputPosition - currentCountAlreadyChecked);1886 assertionWordBoundary(term.invert(), currentCountAlreadyChecked - term.inputPosition); 1883 1887 break; 1884 1888 1885 1889 case PatternTerm::TypePatternCharacter: 1886 atomPatternCharacter(term.patternCharacter, term.inputPosition - currentCountAlreadyChecked, term.frameLocation, term.quantityCount, term.quantityType);1890 atomPatternCharacter(term.patternCharacter, currentCountAlreadyChecked - term.inputPosition, term.frameLocation, term.quantityCount, term.quantityType); 1887 1891 break; 1888 1892 1889 1893 case PatternTerm::TypeCharacterClass: 1890 atomCharacterClass(term.characterClass, term.invert(), term.inputPosition - currentCountAlreadyChecked, term.frameLocation, term.quantityCount, term.quantityType);1894 atomCharacterClass(term.characterClass, term.invert(), currentCountAlreadyChecked- term.inputPosition, term.frameLocation, term.quantityCount, term.quantityType); 1891 1895 break; 1892 1896 1893 1897 case PatternTerm::TypeBackReference: 1894 atomBackReference(term.backReferenceSubpatternId, term.inputPosition - currentCountAlreadyChecked, term.frameLocation, term.quantityCount, term.quantityType);1898 atomBackReference(term.backReferenceSubpatternId, currentCountAlreadyChecked - term.inputPosition, term.frameLocation, term.quantityCount, term.quantityType); 1895 1899 break; 1896 1900 … … 1908 1912 alternativeFrameLocation += YarrStackSpaceForBackTrackInfoParenthesesOnce; 1909 1913 unsigned delegateEndInputOffset = term.inputPosition - currentCountAlreadyChecked; 1910 atomParenthesesOnceBegin(term.parentheses.subpatternId, term.capture(), d elegateEndInputOffset - disjunctionAlreadyCheckedCount, term.frameLocation, alternativeFrameLocation);1914 atomParenthesesOnceBegin(term.parentheses.subpatternId, term.capture(), disjunctionAlreadyCheckedCount - delegateEndInputOffset, term.frameLocation, alternativeFrameLocation); 1911 1915 emitDisjunction(term.parentheses.disjunction, currentCountAlreadyChecked, disjunctionAlreadyCheckedCount); 1912 1916 atomParenthesesOnceEnd(delegateEndInputOffset, term.frameLocation, term.quantityCount, term.quantityType); 1913 1917 } else if (term.parentheses.isTerminal) { 1914 1918 unsigned delegateEndInputOffset = term.inputPosition - currentCountAlreadyChecked; 1915 atomParenthesesTerminalBegin(term.parentheses.subpatternId, term.capture(), d elegateEndInputOffset - disjunctionAlreadyCheckedCount, term.frameLocation, term.frameLocation + YarrStackSpaceForBackTrackInfoParenthesesOnce);1919 atomParenthesesTerminalBegin(term.parentheses.subpatternId, term.capture(), disjunctionAlreadyCheckedCount - delegateEndInputOffset, term.frameLocation, term.frameLocation + YarrStackSpaceForBackTrackInfoParenthesesOnce); 1916 1920 emitDisjunction(term.parentheses.disjunction, currentCountAlreadyChecked, disjunctionAlreadyCheckedCount); 1917 1921 atomParenthesesTerminalEnd(delegateEndInputOffset, term.frameLocation, term.quantityCount, term.quantityType); 1918 1922 } else { 1919 1923 unsigned delegateEndInputOffset = term.inputPosition - currentCountAlreadyChecked; 1920 atomParenthesesSubpatternBegin(term.parentheses.subpatternId, term.capture(), d elegateEndInputOffset - disjunctionAlreadyCheckedCount, term.frameLocation, 0);1924 atomParenthesesSubpatternBegin(term.parentheses.subpatternId, term.capture(), disjunctionAlreadyCheckedCount - delegateEndInputOffset, term.frameLocation, 0); 1921 1925 emitDisjunction(term.parentheses.disjunction, currentCountAlreadyChecked, 0); 1922 1926 atomParenthesesSubpatternEnd(term.parentheses.lastSubpatternId, delegateEndInputOffset, term.frameLocation, term.quantityCount, term.quantityType, term.parentheses.disjunction->m_callFrameSize); … … 1968 1972 } 1969 1973 1970 int interpret(BytecodePattern* bytecode, const UString& input, unsigned start, unsigned length, int* output)1974 unsigned interpret(BytecodePattern* bytecode, const UString& input, unsigned start, unsigned length, unsigned* output) 1971 1975 { 1972 1976 return Interpreter(bytecode, output, input, start, length).interpret(); -
trunk/Source/JavaScriptCore/yarr/YarrInterpreter.h
r95901 r108858 106 106 bool m_capture : 1; 107 107 bool m_invert : 1; 108 intinputPosition;108 unsigned inputPosition; 109 109 110 110 ByteTerm(UChar ch, int inputPos, unsigned frameLocation, Checked<unsigned> quantityCount, QuantifierType quantityType)
Note:
See TracChangeset
for help on using the changeset viewer.