Home
last modified time | relevance | path

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

/art/runtime/
Dutf.cc71 int32_t ComputeUtf16Hash(mirror::CharArray* chars, int32_t offset, in ComputeUtf16Hash() argument
75 hash = hash * 31 + chars->Get(offset + i); in ComputeUtf16Hash()
80 int32_t ComputeUtf16Hash(const uint16_t* chars, size_t char_count) { in ComputeUtf16Hash() argument
83 hash = hash * 31 + *chars++; in ComputeUtf16Hash()
88 int32_t ComputeUtf8Hash(const char* chars) { in ComputeUtf8Hash() argument
90 while (*chars != '\0') { in ComputeUtf8Hash()
91 hash = hash * 31 + GetUtf16FromUtf8(&chars); in ComputeUtf8Hash()
113 size_t CountUtf8Bytes(const uint16_t* chars, size_t char_count) { in CountUtf8Bytes() argument
116 uint16_t ch = *chars++; in CountUtf8Bytes()
Dutf.h48 size_t CountUtf8Bytes(const uint16_t* chars, size_t char_count);
78 int32_t ComputeUtf16Hash(mirror::CharArray* chars, int32_t offset, size_t char_count)
80 int32_t ComputeUtf16Hash(const uint16_t* chars, size_t char_count);
83 int32_t ComputeUtf8Hash(const char* chars);
Djni_internal_test.cc1054 jchar chars[] = { 'h', 'i' }; in TEST_F() local
1056 s = env_->NewString(chars, 0); in TEST_F()
1060 s = env_->NewString(chars, 2); in TEST_F()
1105 jchar chars[4] = { 'x', 'x', 'x', 'x' }; in TEST_F() local
1106 env_->GetStringRegion(s, 1, 2, &chars[1]); in TEST_F()
1107 EXPECT_EQ('x', chars[0]); in TEST_F()
1108 EXPECT_EQ('e', chars[1]); in TEST_F()
1109 EXPECT_EQ('l', chars[2]); in TEST_F()
1110 EXPECT_EQ('x', chars[3]); in TEST_F()
1170 const jchar* chars = env_->GetStringChars(s, nullptr); in TEST_F() local
[all …]
Djni_internal.cc1916 static jstring NewString(JNIEnv* env, const jchar* chars, jsize char_count) { in NewString() argument
1921 if (UNLIKELY(chars == nullptr && char_count > 0)) { in NewString()
1926 mirror::String* result = mirror::String::AllocFromUtf16(soa.Self(), char_count, chars); in NewString()
1960 const jchar* chars = s->GetCharArray()->GetData() + s->GetOffset(); in GetStringRegion() local
1961 memcpy(buf, chars + start, length * sizeof(jchar)); in GetStringRegion()
1974 const jchar* chars = s->GetCharArray()->GetData() + s->GetOffset(); in GetStringUTFRegion() local
1975 ConvertUtf16ToModifiedUtf8(buf, chars + start, length); in GetStringUTFRegion()
1983 mirror::CharArray* chars = s->GetCharArray(); in GetStringChars() local
1985 if (heap->IsMovableObject(chars)) { in GetStringChars()
1993 bytes[i] = chars->Get(i + offset); in GetStringChars()
[all …]
Dcheck_jni.cc1504 static void ReleaseStringChars(JNIEnv* env, jstring string, const jchar* chars) { in ReleaseStringChars() argument
1505 CHECK_JNI_ENTRY(kFlag_Default | kFlag_ExcepOkay, "Esp", env, string, chars); in ReleaseStringChars()
1506 sc.CheckNonNull(chars); in ReleaseStringChars()
1508 GuardedCopy::Check(__FUNCTION__, chars, false); in ReleaseStringChars()
1509 chars = reinterpret_cast<const jchar*>(GuardedCopy::Destroy(const_cast<jchar*>(chars))); in ReleaseStringChars()
1511 baseEnv(env)->ReleaseStringChars(env, string, chars); in ReleaseStringChars()
Ddebugger.cc3883 const jchar* chars = (name.Get() != NULL) ? name->GetCharArray()->GetData() : NULL; in DdmSendThreadNotification() local
3887 JDWP::AppendUtf16BE(bytes, chars, char_count); in DdmSendThreadNotification()
/art/test/407-arrays/src/
DMain.java32 static void $opt$testReads(boolean[] bools, byte[] bytes, char[] chars, short[] shorts, in $opt$testReads() argument
40 assertEquals(0, chars[0]); in $opt$testReads()
41 assertEquals(0, chars[index]); in $opt$testReads()
56 static void $opt$testWrites(boolean[] bools, byte[] bytes, char[] chars, short[] shorts, in $opt$testWrites() argument
68 chars[0] = 'c'; in $opt$testWrites()
69 assertEquals('c', chars[0]); in $opt$testWrites()
70 chars[index] = 'd'; in $opt$testWrites()
71 assertEquals('d', chars[index]); in $opt$testWrites()
/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/runtime/mirror/
Dstring.cc43 const uint16_t* chars = GetCharArray()->GetData() + GetOffset(); in FastIndexOf() local
44 const uint16_t* p = chars + start; in FastIndexOf()
45 const uint16_t* end = chars + count; in FastIndexOf()
48 return (p - 1) - chars; in FastIndexOf()
194 const uint16_t* chars = GetCharArray()->GetData() + GetOffset(); in ToModifiedUtf8() local
197 ConvertUtf16ToModifiedUtf8(&result[0], chars, GetLength()); in ToModifiedUtf8()
/art/runtime/jdwp/
Djdwp_bits.h62 static inline void AppendUtf16BE(std::vector<uint8_t>& bytes, const uint16_t* chars, size_t char_co… in AppendUtf16BE() argument
65 Append2BE(bytes, chars[i]); in AppendUtf16BE()
/art/runtime/native/
Ddalvik_system_VMDebug.cc203 ScopedUtfChars chars(env, javaFilename); in VMDebug_dumpHprofData() local
207 filename = chars.c_str(); in VMDebug_dumpHprofData()