blob: bddb6fcee0765f403e0f7bcd8b75dd1f6741e78b (
plain)
1 diff -u -r webkitgtk-2.16.5/Source/WTF/wtf/text/StringImpl.h webkitgtk-2.16.5-gcc7/Source/WTF/wtf/text/StringImpl.h
2 --- webkitgtk-2.16.5/Source/WTF/wtf/text/StringImpl.h 2017-02-20 17:20:15.000000000 +0100
3 +++ webkitgtk-2.16.5-gcc7/Source/WTF/wtf/text/StringImpl.h 2017-06-27 13:13:57.801527350 +0200
4 @@ -581,29 +581,7 @@
5 // FIXME: Does this really belong in StringImpl?
6 template <typename T> static void copyChars(T* destination, const T* source, unsigned numCharacters)
7 {
8 - if (numCharacters == 1) {
9 - *destination = *source;
10 - return;
11 - }
12 -
13 - if (numCharacters <= s_copyCharsInlineCutOff) {
14 - unsigned i = 0;
15 -#if (CPU(X86) || CPU(X86_64))
16 - const unsigned charsPerInt = sizeof(uint32_t) / sizeof(T);
17 -
18 - if (numCharacters > charsPerInt) {
19 - unsigned stopCount = numCharacters & ~(charsPerInt - 1);
20 -
21 - const uint32_t* srcCharacters = reinterpret_cast<const uint32_t*>(source);
22 - uint32_t* destCharacters = reinterpret_cast<uint32_t*>(destination);
23 - for (unsigned j = 0; i < stopCount; i += charsPerInt, ++j)
24 - destCharacters[j] = srcCharacters[j];
25 - }
26 -#endif
27 - for (; i < numCharacters; ++i)
28 - destination[i] = source[i];
29 - } else
30 - memcpy(destination, source, numCharacters * sizeof(T));
31 + memcpy(destination, source, numCharacters * sizeof(T));
32 }
33
34 ALWAYS_INLINE static void copyChars(UChar* destination, const LChar* source, unsigned numCharacters)
|