Changeset 112143 in webkit for trunk/Source/JavaScriptCore/yarr/YarrJIT.cpp
- Timestamp:
- Mar 26, 2012, 1:13:39 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/yarr/YarrJIT.cpp
r110033 r112143 30 30 #include "LinkBuffer.h" 31 31 #include "Yarr.h" 32 #include "YarrCanonicalizeUCS2.h" 32 33 33 34 #if ENABLE(YARR_JIT) … … 263 264 // For case-insesitive compares, non-ascii characters that have different 264 265 // upper & lower case representations are converted to a character class. 265 ASSERT(!m_pattern.m_ignoreCase || isASCIIAlpha(ch) || (Unicode::toLower(ch) == Unicode::toUpper(ch)));266 ASSERT(!m_pattern.m_ignoreCase || isASCIIAlpha(ch) || isCanonicallyUnique(ch)); 266 267 if (m_pattern.m_ignoreCase && isASCIIAlpha(ch)) { 267 or32(TrustedImm32( 32), character);268 ch = Unicode::toLower(ch);268 or32(TrustedImm32(0x20), character); 269 ch |= 0x20; 269 270 } 270 271 … … 686 687 // For case-insesitive compares, non-ascii characters that have different 687 688 // upper & lower case representations are converted to a character class. 688 ASSERT(!m_pattern.m_ignoreCase || isASCIIAlpha(ch) || (Unicode::toLower(ch) == Unicode::toUpper(ch)));689 690 if ( (m_pattern.m_ignoreCase) && (isASCIIAlpha(ch)))689 ASSERT(!m_pattern.m_ignoreCase || isASCIIAlpha(ch) || isCanonicallyUnique(ch)); 690 691 if (m_pattern.m_ignoreCase && isASCIIAlpha(ch)) 691 692 ignoreCaseMask |= 32; 692 693 … … 714 715 // For case-insesitive compares, non-ascii characters that have different 715 716 // upper & lower case representations are converted to a character class. 716 ASSERT(!m_pattern.m_ignoreCase || isASCIIAlpha(currentCharacter) || (Unicode::toLower(currentCharacter) == Unicode::toUpper(currentCharacter)));717 ASSERT(!m_pattern.m_ignoreCase || isASCIIAlpha(currentCharacter) || isCanonicallyUnique(currentCharacter)); 717 718 718 719 allCharacters |= (currentCharacter << shiftAmount); … … 791 792 // For case-insesitive compares, non-ascii characters that have different 792 793 // upper & lower case representations are converted to a character class. 793 ASSERT(!m_pattern.m_ignoreCase || isASCIIAlpha(ch) || (Unicode::toLower(ch) == Unicode::toUpper(ch)));794 ASSERT(!m_pattern.m_ignoreCase || isASCIIAlpha(ch) || isCanonicallyUnique(ch)); 794 795 if (m_pattern.m_ignoreCase && isASCIIAlpha(ch)) { 795 or32(TrustedImm32( 32), character);796 ch = Unicode::toLower(ch);796 or32(TrustedImm32(0x20), character); 797 ch |= 0x20; 797 798 } 798 799
Note:
See TracChangeset
for help on using the changeset viewer.