Home
last modified time | relevance | path

Searched refs:chars (Results 1 – 25 of 29) sorted by relevance

12

/art/runtime/mirror/
Dstring-inl.h59 int32_t String::FastIndexOf(MemoryType* chars, int32_t ch, int32_t start) { in FastIndexOf() argument
60 const MemoryType* p = chars + start; in FastIndexOf()
61 const MemoryType* end = chars + GetLength(); in FastIndexOf()
64 return (p - 1) - chars; in FastIndexOf()
71 int32_t String::LastIndexOf(MemoryType* chars, int32_t ch, int32_t from_index) { in LastIndexOf() argument
73 const MemoryType* start = chars; in LastIndexOf()
74 const MemoryType* p = chars + from_index; in LastIndexOf()
77 return p - chars; in LastIndexOf()
109 inline bool String::AllASCII(const MemoryType* chars, const int length) { in AllASCII() argument
112 if (!IsASCII(chars[i])) { in AllASCII()
[all …]
Dstring.h216 int32_t FastIndexOf(MemoryType* chars, int32_t ch, int32_t start)
222 int32_t LastIndexOf(MemoryType* chars, int32_t ch, int32_t from_index)
248 static bool AllASCII(const MemoryType* chars, const int length);
250 static bool DexFileStringAllASCII(const char* chars, const int length);
290 static bool AllASCIIExcept(const uint16_t* chars, int32_t length, uint16_t non_ascii);
Dstring.cc70 inline bool String::AllASCIIExcept(const uint16_t* chars, int32_t length, uint16_t non_ascii) { in AllASCIIExcept() argument
73 if (!IsASCII(chars[i]) && chars[i] != non_ascii) { in AllASCIIExcept()
/art/test/407-arrays/src/
DMain.java32 static void $opt$testReads(boolean[] bools, byte[] bytes, char[] chars, short[] shorts, in $opt$testReads() argument
41 assertEquals(0, chars[0]); in $opt$testReads()
42 assertEquals(0, chars[index]); in $opt$testReads()
63 static void $opt$testWrites(boolean[] bools, byte[] bytes, char[] chars, short[] shorts, in $opt$testWrites() argument
76 chars[0] = 'c'; in $opt$testWrites()
77 assertEquals('c', chars[0]); in $opt$testWrites()
78 chars[index] = 'd'; in $opt$testWrites()
79 assertEquals('d', chars[index]); in $opt$testWrites()
81 chars[0] = 65535; in $opt$testWrites()
82 assertEquals(65535, chars[0]); in $opt$testWrites()
[all …]
/art/libdexfile/dex/
Dutf.h85 size_t CountModifiedUtf8BytesInUtf16(const uint16_t* chars, size_t char_count);
100 int32_t ComputeUtf16Hash(const MemoryType* chars, size_t char_count) { in ComputeUtf16Hash() argument
107 hash = hash * 31 + static_cast<UnsignedMemoryType>(*chars++); in ComputeUtf16Hash()
116 uint32_t ComputeModifiedUtf8Hash(const char* chars);
117 uint32_t ComputeModifiedUtf8Hash(std::string_view chars);
132 inline uint32_t UpdateModifiedUtf8Hash(uint32_t hash, std::string_view chars) { in UpdateModifiedUtf8Hash() argument
133 for (char c : chars) { in UpdateModifiedUtf8Hash()
Dutf.cc160 uint32_t ComputeModifiedUtf8Hash(const char* chars) { in ComputeModifiedUtf8Hash() argument
162 while (*chars != '\0') { in ComputeModifiedUtf8Hash()
163 hash = UpdateModifiedUtf8Hash(hash, *chars); in ComputeModifiedUtf8Hash()
164 ++chars; in ComputeModifiedUtf8Hash()
169 uint32_t ComputeModifiedUtf8Hash(std::string_view chars) { in ComputeModifiedUtf8Hash() argument
170 return UpdateModifiedUtf8Hash(StartModifiedUtf8Hash(), chars); in ComputeModifiedUtf8Hash()
209 size_t CountModifiedUtf8BytesInUtf16(const uint16_t* chars, size_t char_count) { in CountModifiedUtf8BytesInUtf16() argument
215 /*kReplaceBadSurrogates=*/ false>(chars, char_count, append); in CountModifiedUtf8BytesInUtf16()
Dutf_test.cc232 static size_t CountModifiedUtf8BytesInUtf16_reference(const uint16_t* chars, size_t char_count) { in CountModifiedUtf8BytesInUtf16_reference() argument
235 const uint16_t ch = *chars++; in CountModifiedUtf8BytesInUtf16_reference()
240 const uint16_t ch2 = *chars; in CountModifiedUtf8BytesInUtf16_reference()
245 chars++; in CountModifiedUtf8BytesInUtf16_reference()
/art/test/common/
Druntime_state.cc173 ScopedUtfChars chars(env, method_name); in Java_Main_isAotCompiled() local
174 CHECK(chars.c_str() != nullptr); in Java_Main_isAotCompiled()
176 chars.c_str(), kRuntimePointerSize); in Java_Main_isAotCompiled()
185 static ArtMethod* GetMethod(ScopedObjectAccess& soa, jclass cls, const ScopedUtfChars& chars) in GetMethod() argument
187 CHECK(chars.c_str() != nullptr); in GetMethod()
189 chars.c_str(), kRuntimePointerSize); in GetMethod()
192 chars.c_str(), kRuntimePointerSize); in GetMethod()
194 DCHECK(method != nullptr) << "Unable to find method called " << chars.c_str(); in GetMethod()
208 ScopedUtfChars chars(env, method_name); in Java_Main_hasJitCompiledEntrypoint() local
209 ArtMethod* method = GetMethod(soa, cls, chars); in Java_Main_hasJitCompiledEntrypoint()
[all …]
/art/test/003-omnibus-opcodes/src/
DArray.java39 static void checkChars(char[] chars) { in checkChars() argument
40 Main.assertTrue(chars[0] == 40000); in checkChars()
41 Main.assertTrue(chars[1] == 40001); in checkChars()
42 Main.assertTrue(chars[2] == 40002); in checkChars()
43 Main.assertTrue(chars[3] == 40003); in checkChars()
44 Main.assertTrue(chars[4] == 40004); in checkChars()
/art/libartbase/base/
Dendian_utils.h49 inline void AppendUtf16BE(std::vector<uint8_t>& bytes, const uint16_t* chars, size_t char_count) { in AppendUtf16BE() argument
52 Append2BE(bytes, chars[i]); in AppendUtf16BE()
57 const uint8_t* chars, in AppendUtf16CompressedBE() argument
61 Append2BE(bytes, static_cast<uint16_t>(chars[i])); in AppendUtf16CompressedBE()
/art/test/580-checker-string-fact-intrinsics/src-art/
DMain.java53 char[] chars = { 'b', 'a', 'r' }; in testNewStringFromChars() local
54 String s = StringFactory.newStringFromChars(chars); in testNewStringFromChars()
/art/test/1964-add-to-dex-classloader-file/
Dadd_to_loader.cc79 const char* chars = env->GetStringUTFChars(segment, nullptr); in Java_Main_addToClassLoaderNative() local
85 chars)); in Java_Main_addToClassLoaderNative()
86 env->ReleaseStringUTFChars(segment, chars); in Java_Main_addToClassLoaderNative()
/art/test/570-checker-osr/
Dosr.cc34 ScopedUtfChars chars(env, method_name); in ProcessMethodWithName() local
35 CHECK(chars.c_str() != nullptr); in ProcessMethodWithName()
41 if (m_name.compare(chars.c_str()) == 0) { in ProcessMethodWithName()
/art/test/566-polymorphic-inlining/
Dpolymorphic_inline.cc71 ScopedUtfChars chars(env, method_name); in Java_Main_ensureJittedAndPolymorphicInline566() local
73 chars.c_str(), kRuntimePointerSize); in Java_Main_ensureJittedAndPolymorphicInline566()
/art/runtime/jni/
Djni_internal_test.cc1515 const char* chars = env_->GetStringUTFChars(s, nullptr); in TEST_F() local
1516 EXPECT_STREQ("\xf0\x90\x90\x80", chars); in TEST_F()
1517 env_->ReleaseStringUTFChars(s, chars); in TEST_F()
1542 chars = env_->GetStringUTFChars(s, nullptr); in TEST_F()
1543 EXPECT_STREQ("\xf0\x90\x90\x80 \xf0\x9f\x8f\xa0", chars); in TEST_F()
1544 env_->ReleaseStringUTFChars(s, chars); in TEST_F()
1580 const char* chars = env_->GetStringUTFChars(s, nullptr); in TEST_F() local
1582 ASSERT_EQ('x', chars[pos]) << pos; in TEST_F()
1584 env_->ReleaseStringUTFChars(s, chars); in TEST_F()
1592 chars = env_->GetStringUTFChars(s, nullptr); in TEST_F()
[all …]
Djni_internal.cc229 jsize GetUncompressedStringUTFLength(const uint16_t* chars, size_t length) { in GetUncompressedStringUTFLength() argument
232 chars, length, [&]([[maybe_unused]] char c) { ++byte_count; }); in GetUncompressedStringUTFLength()
236 char* GetUncompressedStringUTFChars(const uint16_t* chars, size_t length, char* dest) { in GetUncompressedStringUTFChars() argument
238 chars, length, [&](char c) { *dest++ = c; }); in GetUncompressedStringUTFChars()
1975 static jstring NewString(JNIEnv* env, const jchar* chars, jsize char_count) { in NewString() argument
1980 if (UNLIKELY(chars == nullptr && char_count > 0)) { in NewString()
1985 ObjPtr<mirror::String> result = mirror::String::AllocFromUtf16(soa.Self(), char_count, chars); in NewString()
2092 const jchar* chars = static_cast<jchar*>(s->GetValue()); in GetStringRegion() local
2093 memcpy(buf, chars + start, length * sizeof(jchar)); in GetStringRegion()
2130 jchar* chars = new jchar[s->GetLength()]; in GetStringChars() local
[all …]
Dcheck_jni.cc2458 static jstring NewStringUTF(JNIEnv* env, const char* chars) { in NewStringUTF() argument
2462 JniValueType args[2] = {{.E = env}, {.u = chars}}; in NewStringUTF()
2466 result.s = baseEnv(env)->NewStringUTF(env, chars); in NewStringUTF()
2519 static void ReleaseStringChars(JNIEnv* env, jstring string, const jchar* chars) { in ReleaseStringChars() argument
2520 ReleaseStringCharsInternal(__FUNCTION__, env, string, chars, false, false); in ReleaseStringChars()
2527 static void ReleaseStringCritical(JNIEnv* env, jstring string, const jchar* chars) { in ReleaseStringCritical() argument
2528 ReleaseStringCharsInternal(__FUNCTION__, env, string, chars, false, true); in ReleaseStringCritical()
3538 const void* chars, bool utf, bool critical) { in ReleaseStringCharsInternal() argument
3546 sc.CheckNonNull(chars); in ReleaseStringCharsInternal()
3547 bool force_copy_ok = !soa.ForceCopy() || GuardedCopy::Check(function_name, chars, false); in ReleaseStringCharsInternal()
[all …]
/art/tools/ahat/src/main/com/android/ahat/heapdump/
DAhatArrayInstance.java67 void initialize(final char[] chars) { in initialize() argument
68 mCharArray = chars; in initialize()
71 return chars.length; in initialize()
75 return Value.pack(chars[index]); in initialize()
DAhatClassInstance.java166 AhatArrayInstance chars = inst.asArrayInstance(); in asString() local
167 int numChars = chars.getLength(); in asString()
170 return chars.asMaybeCompressedString(offset, count, maxChars); in asString()
/art/runtime/native/
Dlibcore_util_CharsetUtils.cc39 ScopedCharArrayRW chars(env, javaChars); in CharsetUtils_asciiBytesToChars() local
40 if (chars.get() == nullptr) { in CharsetUtils_asciiBytesToChars()
45 jchar* dst = &chars[0]; in CharsetUtils_asciiBytesToChars()
Ddalvik_system_VMDebug.cc228 ScopedUtfChars chars(env, javaFilename); in VMDebug_dumpHprofData() local
232 filename = chars.c_str(); in VMDebug_dumpHprofData()
478 ScopedUtfChars chars(env, agent); in VMDebug_nativeAttachAgent() local
482 filename = chars.c_str(); in VMDebug_nativeAttachAgent()
/art/test/ti-agent/
Dti_utf.h179 inline size_t CountModifiedUtf8BytesInUtf16(const uint16_t* chars, size_t char_count) { in CountModifiedUtf8BytesInUtf16() argument
185 /*kReplaceBadSurrogates=*/ false>(chars, char_count, append); in CountModifiedUtf8BytesInUtf16()
/art/openjdkjvmti/
Dti_properties.cc201 ScopedUtfChars chars(jni_env, reinterpret_cast<jstring>(prop_res.get())); in GetLibraryPath() local
202 return Copy(env, chars.c_str(), value_ptr); in GetLibraryPath()
/art/tools/dexanalyze/
Ddexanalyze_strings.cc317 std::vector<uint8_t> chars; in GetString() local
319 chars.push_back(cur->incoming_); in GetString()
321 return std::string(chars.rbegin(), chars.rend()); in GetString()
/art/test/004-JniTest/
Djni_test.cc641 const char* chars = env->GetStringUTFChars(s, nullptr); in Java_Main_testNewStringObject() local
642 CHECK_EQ(strcmp(test_array, chars), 0); in Java_Main_testNewStringObject()
643 env->ReleaseStringUTFChars(s, chars); in Java_Main_testNewStringObject()

12