Ignore:
Timestamp:
May 27, 2010, 4:43:54 PM (15 years ago)
Author:
[email protected]
Message:

2010-05-27 Luiz Agostini <[email protected]>

Reviewed by Darin Adler.

UTF-16 code points compare() for String objects
https://bugs.webkit.org/show_bug.cgi?id=39701

Moving compare() implementation from UString to StringImpl for it to be shared
with String. Adding overloaded free functions codePointCompare() in StringImpl
and WTFString. Renaming function compare in UString to codePointCompare to be
consistent.

  • runtime/JSArray.cpp: (JSC::compareByStringPairForQSort):
  • runtime/UString.cpp:
  • runtime/UString.h: (JSC::codePointCompare):
  • wtf/text/StringImpl.cpp: (WebCore::codePointCompare):
  • wtf/text/StringImpl.h:
  • wtf/text/WTFString.cpp: (WebCore::codePointCompare):
  • wtf/text/WTFString.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/UString.h

    r59337 r60332  
    203203    }
    204204
    205     int compare(const UString&, const UString&);
     205    inline int codePointCompare(const UString& s1, const UString& s2)
     206    {
     207        return codePointCompare(s1.rep(), s2.rep());
     208    }
    206209
    207210    // Rule from ECMA 15.2 about what an array index is.
Note: See TracChangeset for help on using the changeset viewer.