Changeset 108753 in webkit
- Timestamp:
- Feb 24, 2012 1:49:38 AM (12 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r108752 r108753 1 2012-02-24 Han Hojong <hojong.han@samsung.com> 2 3 Remove useless jump instructions for short circuit 4 https://bugs.webkit.org/show_bug.cgi?id=75602 5 6 Reviewed by Michael Saboff. 7 8 Jump instruction is inserted to make short circuit, 9 however it does nothing but moving to the next instruction. 10 Therefore useless jump instructions are removed, 11 and jump list is moved into the case not for a short circuit, 12 so that only necessary instructions are added to JIT code 13 unless it has a 16 bit pattern character and an 8 bit string. 14 15 * yarr/YarrJIT.cpp: 16 (JSC::Yarr::YarrGenerator::generatePatternCharacterGreedy): 17 (JSC::Yarr::YarrGenerator::backtrackPatternCharacterNonGreedy): 18 1 19 2012-02-24 Sheriff Bot <webkit.review.bot@gmail.com> 2 20 -
trunk/Source/JavaScriptCore/yarr/YarrJIT.cpp
r108484 r108753 817 817 move(TrustedImm32(0), countRegister); 818 818 819 if ((ch > 0xff) && (m_charSize == Char8)) { 820 // Have a 16 bit pattern character and an 8 bit string - short circuit 821 op.m_jumps.append(jump()); 822 } else { 819 // Unless have a 16 bit pattern character and an 8 bit string - short circuit 820 if (!((ch > 0xff) && (m_charSize == Char8))) { 823 821 JumpList failures; 824 822 Label loop(this); … … 838 836 839 837 storeToFrame(countRegister, term->frameLocation); 840 841 838 } 842 839 void backtrackPatternCharacterGreedy(size_t opIndex) … … 876 873 const RegisterID countRegister = regT1; 877 874 878 JumpList nonGreedyFailures;879 880 875 m_backtrackingState.link(this); 881 876 882 877 loadFromFrame(term->frameLocation, countRegister); 883 878 884 if ((ch > 0xff) && (m_charSize == Char8)) { 885 // Have a 16 bit pattern character and an 8 bit string - short circuit 886 nonGreedyFailures.append(jump()); 887 } else { 879 // Unless have a 16 bit pattern character and an 8 bit string - short circuit 880 if (!((ch > 0xff) && (m_charSize == Char8))) { 881 JumpList nonGreedyFailures; 888 882 nonGreedyFailures.append(atEndOfInput()); 889 883 if (term->quantityCount != quantifyInfinite) … … 895 889 896 890 jump(op.m_reentry); 897 }898 nonGreedyFailures.link(this);891 nonGreedyFailures.link(this); 892 } 899 893 900 894 sub32(countRegister, index);
Note: See TracChangeset
for help on using the changeset viewer.