+2012-02-22 Hojong Han <hojong.han@samsung.com>
+
+ Short circuit fixed for a 16 bt pattern character and an 8 bit string.
+ https://bugs.webkit.org/show_bug.cgi?id=75602
+
+ Reviewed by Gavin Barraclough.
+
+ * yarr/YarrJIT.cpp:
+ (JSC::Yarr::YarrGenerator::backtrackPatternCharacterGreedy):
+
2012-02-21 Filip Pizlo <fpizlo@apple.com>
Build fix for systems with case sensitive disks.
{
YarrOp& op = m_ops[opIndex];
PatternTerm* term = op.m_term;
+ UChar ch = term->patternCharacter;
const RegisterID countRegister = regT1;
m_backtrackingState.link(this);
- loadFromFrame(term->frameLocation, countRegister);
- m_backtrackingState.append(branchTest32(Zero, countRegister));
- sub32(TrustedImm32(1), countRegister);
- sub32(TrustedImm32(1), index);
- jump(op.m_reentry);
+ if ((ch > 0xff) && (m_charSize == Char8)) {
+ // Have a 16 bit pattern character and an 8 bit string - short circuit
+ m_backtrackingState.append(op.m_jumps);
+ } else {
+ loadFromFrame(term->frameLocation, countRegister);
+ m_backtrackingState.append(branchTest32(Zero, countRegister));
+ sub32(TrustedImm32(1), countRegister);
+ sub32(TrustedImm32(1), index);
+ jump(op.m_reentry);
+ }
}
void generatePatternCharacterNonGreedy(size_t opIndex)