/art/libdexfile/dex/ |
D | utf.cc | 177 int32_t ComputeUtf16HashFromModifiedUtf8(const char* utf8, size_t utf16_length) { in ComputeUtf16HashFromModifiedUtf8() argument 179 while (utf16_length != 0u) { in ComputeUtf16HashFromModifiedUtf8() 183 --utf16_length; in ComputeUtf16HashFromModifiedUtf8() 187 DCHECK_NE(utf16_length, 0u); in ComputeUtf16HashFromModifiedUtf8() 188 --utf16_length; in ComputeUtf16HashFromModifiedUtf8() 204 size_t utf16_length) { in CompareModifiedUtf8ToUtf16AsCodePointValues() argument 207 return (utf16_length == 0) ? 0 : -1; in CompareModifiedUtf8ToUtf16AsCodePointValues() 208 } else if (utf16_length == 0) { in CompareModifiedUtf8ToUtf16AsCodePointValues() 217 --utf16_length; in CompareModifiedUtf8ToUtf16AsCodePointValues() 226 if (utf16_length == 0) { in CompareModifiedUtf8ToUtf16AsCodePointValues() [all …]
|
D | dex_file-inl.h | 35 inline std::string_view StringViewFromUtf16Length(const char* utf8_data, size_t utf16_length) { in StringViewFromUtf16Length() argument 36 size_t utf8_length = LIKELY(utf8_data[utf16_length] == 0) // Is ASCII? in StringViewFromUtf16Length() 37 ? utf16_length in StringViewFromUtf16Length() 38 : utf16_length + strlen(utf8_data + utf16_length); in StringViewFromUtf16Length() 48 uint32_t* utf16_length) const { in GetStringDataAndUtf16Length() argument 49 DCHECK(utf16_length != nullptr) << GetLocation(); in GetStringDataAndUtf16Length() 51 *utf16_length = DecodeUnsignedLeb128(&ptr); in GetStringDataAndUtf16Length() 61 uint32_t* utf16_length) const { in StringDataAndUtf16LengthByIdx() argument 63 *utf16_length = 0; in StringDataAndUtf16LengthByIdx() 67 return GetStringDataAndUtf16Length(string_id, utf16_length); in StringDataAndUtf16LengthByIdx()
|
D | utf.h | 65 size_t utf16_length); 88 int32_t ComputeUtf16HashFromModifiedUtf8(const char* utf8, size_t utf16_length);
|
D | dex_file.h | 261 uint32_t* utf16_length) const; 266 const char* StringDataAndUtf16LengthByIdx(dex::StringIndex idx, uint32_t* utf16_length) const;
|
/art/runtime/mirror/ |
D | string.cc | 155 int32_t utf16_length, in AllocFromUtf16() argument 157 CHECK(utf16_data_in != nullptr || utf16_length == 0); in AllocFromUtf16() 160 String::AllASCII<uint16_t>(utf16_data_in, utf16_length); in AllocFromUtf16() 161 int32_t length_with_flag = String::GetFlaggedCount(utf16_length, compressible); in AllocFromUtf16() 169 for (int i = 0; i < utf16_length; ++i) { in AllocFromUtf16() 173 memcpy(new_string->GetValue(), utf16_data_in, utf16_length * sizeof(uint16_t)); in AllocFromUtf16() 187 int32_t utf16_length, in AllocFromModifiedUtf8() argument 189 return AllocFromModifiedUtf8(self, utf16_length, utf8_data_in, strlen(utf8_data_in)); in AllocFromModifiedUtf8() 193 int32_t utf16_length, in AllocFromModifiedUtf8() argument 197 const bool compressible = kUseStringCompression && (utf16_length == utf8_length); in AllocFromModifiedUtf8() [all …]
|
D | string.h | 157 int32_t utf16_length, 165 int32_t utf16_length, 171 int32_t utf16_length,
|
/art/runtime/ |
D | intern_table.cc | 103 uint32_t utf16_length, in LookupStrong() argument 105 DCHECK_EQ(utf16_length, CountModifiedUtf8Chars(utf8_data)); in LookupStrong() 106 Utf8String string(utf16_length, in LookupStrong() 108 ComputeUtf16HashFromModifiedUtf8(utf8_data, utf16_length)); in LookupStrong() 256 ObjPtr<mirror::String> InternTable::InternStrong(int32_t utf16_length, const char* utf8_data) { in InternStrong() argument 260 ObjPtr<mirror::String> s = LookupStrong(self, utf16_length, utf8_data); in InternStrong() 265 self, utf16_length, utf8_data)); in InternStrong()
|
D | intern_table.h | 62 Utf8String(uint32_t utf16_length, const char* utf8_data, int32_t hash) in Utf8String() argument 63 : hash_(hash), utf16_length_(utf16_length), utf8_data_(utf8_data) { } in Utf8String() 115 ObjPtr<mirror::String> InternStrong(int32_t utf16_length, const char* utf8_data) 154 ObjPtr<mirror::String> LookupStrong(Thread* self, uint32_t utf16_length, const char* utf8_data)
|
D | class_linker.cc | 8928 uint32_t utf16_length; in DoResolveString() local 8929 const char* utf8_data = dex_file.StringDataAndUtf16LengthByIdx(string_idx, &utf16_length); in DoResolveString() 8930 ObjPtr<mirror::String> string = intern_table_->InternStrong(utf16_length, utf8_data); in DoResolveString() 8941 uint32_t utf16_length; in DoLookupString() local 8942 const char* utf8_data = dex_file.StringDataAndUtf16LengthByIdx(string_idx, &utf16_length); in DoLookupString() 8944 intern_table_->LookupStrong(Thread::Current(), utf16_length, utf8_data); in DoLookupString()
|
/art/compiler/optimizing/ |
D | instruction_simplifier.cc | 2484 uint32_t utf16_length; in SimplifyStringIndexOf() local 2486 dex_file.StringDataAndUtf16LengthByIdx(load_string->GetStringIndex(), &utf16_length); in SimplifyStringIndexOf() 2487 if (utf16_length == 0) { in SimplifyStringIndexOf() 2493 if (utf16_length == 1 && invoke->GetIntrinsic() == Intrinsics::kStringIndexOf) { in SimplifyStringIndexOf()
|
D | intrinsics_arm64.cc | 1698 static const char* GetConstString(HInstruction* candidate, uint32_t* utf16_length) { in GetConstString() argument 1702 return dex_file.StringDataAndUtf16LengthByIdx(load_string->GetStringIndex(), utf16_length); in GetConstString()
|
D | intrinsics_arm_vixl.cc | 883 static const char* GetConstString(HInstruction* candidate, uint32_t* utf16_length) { in GetConstString() argument 887 return dex_file.StringDataAndUtf16LengthByIdx(load_string->GetStringIndex(), utf16_length); in GetConstString()
|
/art/runtime/jni/ |
D | jni_internal.cc | 1930 size_t utf16_length = VisitModifiedUtf8Chars( in NewStringUTF() local 1935 if (UNLIKELY(utf8_length != 0u && utf16_length == 0u)) { in NewStringUTF() 1950 utf16_length = VisitModifiedUtf8Chars( in NewStringUTF() 1963 DCHECK_LE(utf16_length, utf8_length); in NewStringUTF() 1968 mirror::String::AllocFromModifiedUtf8(soa.Self(), utf16_length, utf, utf8_length); in NewStringUTF()
|
/art/dex2oat/linker/ |
D | image_writer.cc | 1964 uint32_t utf16_length; in ProcessInterns() local 1966 &utf16_length); in ProcessInterns() 1967 int32_t hash = ComputeUtf16HashFromModifiedUtf8(utf8_data, utf16_length); in ProcessInterns() 1968 InternTable::Utf8String utf8_string(utf16_length, utf8_data, hash); in ProcessInterns()
|