Home | History | Annotate | Download | only in src

Lines Matching refs:src

5 #include "src/string-case.h"
7 #include "src/assert-scope.h"
8 #include "src/base/logging.h"
9 #include "src/globals.h"
10 #include "src/utils.h"
16 bool CheckFastAsciiConvert(char* dst, const char* src, int length, bool changed,
20 if (dst[i] == src[i]) continue;
23 DCHECK('A' <= src[i] && src[i] <= 'Z');
24 DCHECK(dst[i] == src[i] + ('a' - 'A'));
26 DCHECK('a' <= src[i] && src[i] <= 'z');
27 DCHECK(dst[i] == src[i] - ('a' - 'A'));
56 int FastAsciiConvert(char* dst, const char* src, int length,
61 const char* saved_src = src;
70 const char* const limit = src + length;
74 // Only attempt processing one word at a time if src is also aligned.
75 if (IsAligned(reinterpret_cast<intptr_t>(src), sizeof(uintptr_t))) {
78 while (src <= limit - sizeof(uintptr_t)) {
79 const uintptr_t w = *reinterpret_cast<const uintptr_t*>(src);
80 if ((w & kAsciiMask) != 0) return static_cast<int>(src - saved_src);
86 src += sizeof(uintptr_t);
91 while (src <= limit - sizeof(uintptr_t)) {
92 const uintptr_t w = *reinterpret_cast<const uintptr_t*>(src);
93 if ((w & kAsciiMask) != 0) return static_cast<int>(src - saved_src);
99 src += sizeof(uintptr_t);
105 while (src < limit) {
106 char c = *src;
107 if ((c & kAsciiMask) != 0) return static_cast<int>(src - saved_src);
113 ++src;
124 template int FastAsciiConvert<false>(char* dst, const char* src, int length,
126 template int FastAsciiConvert<true>(char* dst, const char* src, int length,