Changeset 13663 in webkit
- Timestamp:
- Apr 3, 2006, 4:49:39 PM (19 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 9 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r13658 r13663 1 2006-04-03 George Staikos <[email protected]> 2 3 Reviewed by Maciej. 4 5 Implement a unicode abstraction layer to make JavaScriptCore much more 6 easily ported to other platforms without having to take in libicu. Also 7 makes the unicode related code easier to understand. 8 1 9 2006-04-03 Timothy Hatcher <[email protected]> 2 10 -
trunk/JavaScriptCore/kjs/function.cpp
r13603 r13663 41 41 #include <ctype.h> 42 42 43 #include < unicode/uchar.h>43 #include <kxmlcore/unicode/Unicode.h> 44 44 45 45 namespace KJS { … … 662 662 return true; 663 663 default: 664 return u_charType(c) == U_SPACE_SEPARATOR;664 return KXMLCore::Unicode::isSeparatorSpace(c); 665 665 } 666 666 } -
trunk/JavaScriptCore/kjs/lexer.cpp
r13203 r13663 38 38 #include "lookup.h" 39 39 #include "internal.h" 40 #include < unicode/uchar.h>40 #include <kxmlcore/unicode/Unicode.h> 41 41 42 42 static bool isDecimalDigit(unsigned short c); … … 138 138 } 139 139 next3 = code[pos++].uc; 140 } while ( u_charType(next3) == U_FORMAT_CHAR);140 } while (KXMLCore::Unicode::isFormatChar(next3)); 141 141 } 142 142 } … … 573 573 bool Lexer::isWhiteSpace() const 574 574 { 575 return (current == '\t' || current == 0x0b || current == 0x0c || u_charType(current) == U_SPACE_SEPARATOR);575 return current == '\t' || current == 0x0b || current == 0x0c || KXMLCore::Unicode::isSeparatorSpace(current); 576 576 } 577 577 … … 589 589 bool Lexer::isIdentStart(unsigned short c) 590 590 { 591 return (U_GET_GC_MASK(c) & (U_GC_L_MASK | U_GC_NL_MASK)) || c == '$' || c == '_'; 591 return (KXMLCore::Unicode::category(c) & (KXMLCore::Unicode::Letter_Uppercase 592 | KXMLCore::Unicode::Letter_Lowercase 593 | KXMLCore::Unicode::Letter_Titlecase 594 | KXMLCore::Unicode::Letter_Modifier 595 | KXMLCore::Unicode::Letter_Other)) 596 || c == '$' || c == '_'; 592 597 } 593 598 594 599 bool Lexer::isIdentPart(unsigned short c) 595 600 { 596 return (U_GET_GC_MASK(c) & (U_GC_L_MASK | U_GC_NL_MASK | U_GC_MN_MASK | U_GC_MC_MASK | U_GC_ND_MASK | U_GC_PC_MASK)) || c == '$' || c == '_'; 601 return (KXMLCore::Unicode::category(c) & (KXMLCore::Unicode::Letter_Uppercase 602 | KXMLCore::Unicode::Letter_Lowercase 603 | KXMLCore::Unicode::Letter_Titlecase 604 | KXMLCore::Unicode::Letter_Modifier 605 | KXMLCore::Unicode::Letter_Other 606 | KXMLCore::Unicode::Mark_NonSpacing 607 | KXMLCore::Unicode::Mark_SpacingCombining 608 | KXMLCore::Unicode::Number_DecimalDigit 609 | KXMLCore::Unicode::Punctuation_Connector)) 610 || c == '$' || c == '_'; 597 611 } 598 612 -
trunk/JavaScriptCore/kjs/ustring.cpp
r13541 r13663 45 45 using std::max; 46 46 47 #include < unicode/uchar.h>47 #include <kxmlcore/unicode/Unicode.h> 48 48 49 49 namespace KJS { … … 145 145 UChar UChar::toLower() const 146 146 { 147 return static_cast<unsigned short>(u_tolower(uc));147 return KXMLCore::Unicode::toLower(uc); 148 148 } 149 149 150 150 UChar UChar::toUpper() const 151 151 { 152 return static_cast<unsigned short>(u_toupper(uc));152 return KXMLCore::Unicode::toUpper(uc); 153 153 } 154 154 -
trunk/JavaScriptCore/kxmlcore/Platform.h
r13154 r13663 150 150 #if PLATFORM(MAC) 151 151 #define KXMLCORE_USE_MULTIPLE_THREADS 1 152 #define KXMLCORE_USE_ICU_UNICODE 1 153 #endif 154 155 #if PLATFORM(KDE) 156 #define KXMLCORE_USE_QT4_UNICODE 1 152 157 #endif 153 158
Note:
See TracChangeset
for help on using the changeset viewer.