15#if defined(ARCH_IS_64_BIT)
27 uintptr_t char_length = str.
Length();
28 uintptr_t
length = char_length;
30 const uintptr_t*
data =
31 reinterpret_cast<const uintptr_t*
>(OneByteString::DataStart(str));
33 for (
i =
sizeof(uintptr_t);
i <= char_length;
i +=
sizeof(uintptr_t)) {
34 uintptr_t chunk = *
data++;
38#if defined(ARCH_IS_64_BIT)
43 length += (chunk >> 7) & 0xf;
47 i -=
sizeof(uintptr_t);
48 for (;
i < char_length;
i++) {
66 uintptr_t array_len =
len;
69 if (
src.IsOneByteString()) {
73 const uintptr_t*
data =
74 reinterpret_cast<const uintptr_t*
>(OneByteString::DataStart(
src));
75 uintptr_t char_length =
src.Length();
78 for (uintptr_t
i = 0;
i < char_length;
i +=
sizeof(uintptr_t)) {
81 if (
i +
sizeof(uintptr_t) <= char_length &&
83 pos +
sizeof(uintptr_t) <= array_len) {
85 pos +=
sizeof(uintptr_t);
89 const uint8_t*
p =
reinterpret_cast<const uint8_t*
>(
data);
90 const uint8_t* limit =
92 for (;
p < limit;
p++) {
96 intptr_t bytes =
Length(c);
97 if (
pos + bytes > array_len) {
120 if (
pos + num_bytes >
len) {
bool IsOneByteString() const
uint16_t CharAt(intptr_t index) const
static bool IsSurrogate(uint32_t ch)
static intptr_t Length(int32_t ch)
static intptr_t Encode(int32_t ch, char *dst)
static constexpr int32_t kMaxOneByteChar
static constexpr int32_t kReplacementChar
static bool IsOutOfRange(int32_t code_point)
static T Minimum(T x, T y)
static void StoreUnaligned(T *ptr, T value)
static int8_t data[kExtLength]
static constexpr uintptr_t kAsciiWordMask