Changeset 57925 in webkit for trunk/JavaScriptCore/yarr/RegexJIT.cpp
- Timestamp:
- Apr 20, 2010, 3:05:43 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/yarr/RegexJIT.cpp
r57608 r57925 41 41 namespace JSC { namespace Yarr { 42 42 43 44 43 class RegexGenerator : private MacroAssembler { 45 44 friend void jitCompileRegex(JSGlobalData* globalData, RegexCodeBlock& jitObject, const UString& pattern, unsigned& numSubpatterns, const char*& error, bool ignoreCase, bool multiline); … … 156 155 void matchCharacterClass(RegisterID character, JumpList& matchDest, const CharacterClass* charClass) 157 156 { 157 if (charClass->m_table) { 158 ExtendedAddress tableEntry(character, reinterpret_cast<intptr_t>(charClass->m_table->m_table)); 159 matchDest.append(branchTest8(charClass->m_table->m_inverted ? Zero : NonZero, tableEntry)); 160 return; 161 } 158 162 Jump unicodeFail; 159 163 if (charClass->m_matchesUnicode.size() || charClass->m_rangesUnicode.size()) { … … 610 614 failures.append(jumpIfCharNotEquals(ch, state.inputOffset())); 611 615 } 616 612 617 add32(Imm32(1), countRegister); 613 618 add32(Imm32(1), index); 614 branch32(NotEqual, countRegister, Imm32(term.quantityCount)).linkTo(loop, this); 619 if (term.quantityCount != 0xffffffff) 620 branch32(NotEqual, countRegister, Imm32(term.quantityCount)).linkTo(loop, this); 621 else 622 jump(loop); 623 615 624 failures.append(jump()); 616 625 … … 647 656 648 657 atEndOfInput().linkTo(hardFail, this); 649 branch32(Equal, countRegister, Imm32(term.quantityCount), hardFail); 658 if (term.quantityCount != 0xffffffff) 659 branch32(Equal, countRegister, Imm32(term.quantityCount), hardFail); 650 660 if (m_pattern.m_ignoreCase && isASCIIAlpha(ch)) { 651 661 readCharacter(state.inputOffset(), character); … … 733 743 add32(Imm32(1), countRegister); 734 744 add32(Imm32(1), index); 735 branch32(NotEqual, countRegister, Imm32(term.quantityCount)).linkTo(loop, this); 745 if (term.quantityCount != 0xffffffff) 746 branch32(NotEqual, countRegister, Imm32(term.quantityCount)).linkTo(loop, this); 747 else 748 jump(loop); 749 736 750 failures.append(jump()); 737 751
Note:
See TracChangeset
for help on using the changeset viewer.