Home
last modified time | relevance | path

Searched refs:chars (Results 1 – 25 of 27) 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()
88 inline bool String::AllASCII(const MemoryType* chars, const int length) { in AllASCII() argument
91 if (!IsASCII(chars[i])) { in AllASCII()
98 inline bool String::DexFileStringAllASCII(const char* chars, const int length) { in DexFileStringAllASCII() argument
101 DCHECK_EQ(AllASCII(reinterpret_cast<const uint8_t*>(chars), length), chars[length] == 0); in DexFileStringAllASCII()
102 return chars[length] == 0; in DexFileStringAllASCII()
Dstring.h181 int32_t FastIndexOf(MemoryType* chars, int32_t ch, int32_t start)
200 static bool AllASCII(const MemoryType* chars, const int length);
202 static bool DexFileStringAllASCII(const char* chars, const int length);
242 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()
277 const uint16_t* chars = GetValue(); in ToModifiedUtf8() local
278 ConvertUtf16ToModifiedUtf8(&result[0], byte_count, chars, GetLength()); in ToModifiedUtf8()
/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/test/ti-agent/
Dti_utf.h162 inline size_t CountUtf8Bytes(const uint16_t* chars, size_t char_count) { in CountUtf8Bytes() argument
164 const uint16_t *end = chars + char_count; in CountUtf8Bytes()
165 while (chars < end) { in CountUtf8Bytes()
166 const uint16_t ch = *chars++; in CountUtf8Bytes()
176 if (chars < end) { in CountUtf8Bytes()
177 const uint16_t ch2 = *chars; in CountUtf8Bytes()
182 chars++; in CountUtf8Bytes()
/art/test/common/
Druntime_state.cc150 ScopedUtfChars chars(env, method_name); in Java_Main_isAotCompiled() local
151 CHECK(chars.c_str() != nullptr); in Java_Main_isAotCompiled()
153 chars.c_str(), kRuntimePointerSize); in Java_Main_isAotCompiled()
164 static ArtMethod* GetMethod(ScopedObjectAccess& soa, jclass cls, const ScopedUtfChars& chars) in GetMethod() argument
166 CHECK(chars.c_str() != nullptr); in GetMethod()
168 chars.c_str(), kRuntimePointerSize); in GetMethod()
171 chars.c_str(), kRuntimePointerSize); in GetMethod()
173 DCHECK(method != nullptr) << "Unable to find method called " << chars.c_str(); in GetMethod()
187 ScopedUtfChars chars(env, method_name); in Java_Main_hasJitCompiledEntrypoint() local
188 ArtMethod* method = GetMethod(soa, cls, chars); in Java_Main_hasJitCompiledEntrypoint()
[all …]
/art/libdexfile/dex/
Dutf.cc194 uint32_t ComputeModifiedUtf8Hash(const char* chars) { in ComputeModifiedUtf8Hash() argument
196 while (*chars != '\0') { in ComputeModifiedUtf8Hash()
197 hash = hash * 31 + static_cast<uint8_t>(*chars); in ComputeModifiedUtf8Hash()
198 ++chars; in ComputeModifiedUtf8Hash()
239 size_t CountUtf8Bytes(const uint16_t* chars, size_t char_count) { in CountUtf8Bytes() argument
241 const uint16_t *end = chars + char_count; in CountUtf8Bytes()
242 while (chars < end) { in CountUtf8Bytes()
243 const uint16_t ch = *chars++; in CountUtf8Bytes()
253 if (chars < end) { in CountUtf8Bytes()
254 const uint16_t ch2 = *chars; in CountUtf8Bytes()
[all …]
Dutf.h45 size_t CountUtf8Bytes(const uint16_t* chars, size_t char_count);
80 int32_t ComputeUtf16Hash(const MemoryType* chars, size_t char_count) { in ComputeUtf16Hash() argument
83 hash = hash * 31 + *chars++; in ComputeUtf16Hash()
92 uint32_t ComputeModifiedUtf8Hash(const char* chars);
Dutf_test.cc232 static size_t CountUtf8Bytes_reference(const uint16_t* chars, size_t char_count) { in CountUtf8Bytes_reference() argument
235 const uint16_t ch = *chars++; in CountUtf8Bytes_reference()
240 const uint16_t ch2 = *chars; in CountUtf8Bytes_reference()
245 chars++; in CountUtf8Bytes_reference()
/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/test/580-checker-string-fact-intrinsics/src-art/
DMain.java55 char[] chars = { 'b', 'a', 'r' }; in testNewStringFromChars() local
56 String s = StringFactory.newStringFromChars(chars); in testNewStringFromChars()
/art/runtime/native/
Dlibcore_util_CharsetUtils.cc120 ScopedCharArrayRW chars(env, javaChars); in CharsetUtils_asciiBytesToChars() local
121 if (chars.get() == nullptr) { in CharsetUtils_asciiBytesToChars()
126 jchar* dst = &chars[0]; in CharsetUtils_asciiBytesToChars()
140 ScopedCharArrayRW chars(env, javaChars); in CharsetUtils_isoLatin1BytesToChars() local
141 if (chars.get() == nullptr) { in CharsetUtils_isoLatin1BytesToChars()
146 jchar* dst = &chars[0]; in CharsetUtils_isoLatin1BytesToChars()
Ddalvik_system_VMDebug.cc256 ScopedUtfChars chars(env, javaFilename); in VMDebug_dumpHprofData() local
260 filename = chars.c_str(); in VMDebug_dumpHprofData()
584 ScopedUtfChars chars(env, agent); in VMDebug_nativeAttachAgent() local
588 filename = chars.c_str(); in VMDebug_nativeAttachAgent()
/art/runtime/jdwp/
Djdwp_bits.h62 static inline void AppendUtf16BE(std::vector<uint8_t>& bytes, const uint16_t* chars, in AppendUtf16BE() argument
66 Append2BE(bytes, chars[i]); in AppendUtf16BE()
71 const uint8_t* chars, size_t char_count) { in AppendUtf16CompressedBE() argument
74 Append2BE(bytes, static_cast<uint16_t>(chars[i])); in AppendUtf16CompressedBE()
/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/runtime/jni/
Djni_internal_test.cc1514 const char* chars = env_->GetStringUTFChars(s, nullptr); in TEST_F() local
1515 EXPECT_STREQ("\xf0\x90\x90\x80", chars); in TEST_F()
1516 env_->ReleaseStringUTFChars(s, chars); in TEST_F()
1541 chars = env_->GetStringUTFChars(s, nullptr); in TEST_F()
1542 EXPECT_STREQ("\xf0\x90\x90\x80 \xf0\x9f\x8f\xa0", chars); in TEST_F()
1543 env_->ReleaseStringUTFChars(s, chars); in TEST_F()
1554 jchar chars[] = { 'h', 'i' }; in TEST_F() local
1556 s = env_->NewString(chars, 0); in TEST_F()
1560 s = env_->NewString(chars, 2); in TEST_F()
1615 jchar chars[4] = { 'x', 'x', 'x', 'x' }; in TEST_F() local
[all …]
Djni_internal.cc1958 static jstring NewString(JNIEnv* env, const jchar* chars, jsize char_count) { in NewString() argument
1963 if (UNLIKELY(chars == nullptr && char_count > 0)) { in NewString()
1968 ObjPtr<mirror::String> result = mirror::String::AllocFromUtf16(soa.Self(), char_count, chars); in NewString()
2007 const jchar* chars = static_cast<jchar*>(s->GetValue()); in GetStringRegion() local
2008 memcpy(buf, chars + start, length * sizeof(jchar)); in GetStringRegion()
2027 const jchar* chars = s->GetValue(); in GetStringUTFRegion() local
2028 size_t bytes = CountUtf8Bytes(chars + start, length); in GetStringUTFRegion()
2029 ConvertUtf16ToModifiedUtf8(buf, bytes, chars + start, length); in GetStringUTFRegion()
2040 jchar* chars = new jchar[s->GetLength()]; in GetStringChars() local
2044 chars[i] = s->CharAt(i); in GetStringChars()
[all …]
Dcheck_jni.cc2399 static jstring NewStringUTF(JNIEnv* env, const char* chars) { in NewStringUTF() argument
2403 JniValueType args[2] = {{.E = env}, {.u = chars}}; in NewStringUTF()
2407 result.s = baseEnv(env)->NewStringUTF(env, chars); in NewStringUTF()
2460 static void ReleaseStringChars(JNIEnv* env, jstring string, const jchar* chars) { in ReleaseStringChars() argument
2461 ReleaseStringCharsInternal(__FUNCTION__, env, string, chars, false, false); in ReleaseStringChars()
2468 static void ReleaseStringCritical(JNIEnv* env, jstring string, const jchar* chars) { in ReleaseStringCritical() argument
2469 ReleaseStringCharsInternal(__FUNCTION__, env, string, chars, false, true); in ReleaseStringCritical()
3484 const void* chars, bool utf, bool critical) { in ReleaseStringCharsInternal() argument
3492 sc.CheckNonNull(chars); in ReleaseStringCharsInternal()
3493 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.java122 AhatArrayInstance chars = inst.asArrayInstance(); in asString() local
123 int numChars = chars.getLength(); in asString()
126 return chars.asMaybeCompressedString(offset, count, maxChars); in asString()
/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/libdexfile/external/include/art_api/
Ddex_file_support.h73 const char* chars = g_ExtDexFileGetString(ext_string_, &len); in string_view() local
74 return std::string_view(chars, len); in string_view()
/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.cc612 const char* chars = env->GetStringUTFChars(s, nullptr); in Java_Main_testNewStringObject() local
613 CHECK_EQ(strcmp(test_array, chars), 0); in Java_Main_testNewStringObject()
614 env->ReleaseStringUTFChars(s, chars); in Java_Main_testNewStringObject()
/art/test/956-methodhandles/src/
DMain.java1173 public VariableArityTester(char... chars) { update(chars); } in VariableArityTester() argument
1191 public String update(char... chars) { return lastResult = tally(chars); } in update() argument
1220 public static String tally(char... chars) { return Arrays.toString(chars); } in tally() argument

12