Replace String CharArray with internal uint16_t array.
Summary of high level changes:
- Adds compiler inliner support to identify string init methods
- Adds compiler support (quick & optimizing) with new invoke code path
that calls method off the thread pointer
- Adds thread entrypoints for all string init methods
- Adds map to verifier to log when receiver of string init has been
copied to other registers. used by compiler and interpreter
Change-Id: I797b992a8feb566f9ad73060011ab6f51eb7ce01
diff --git a/runtime/arch/stub_test.cc b/runtime/arch/stub_test.cc
index 0d9a888..de7804f 100644
--- a/runtime/arch/stub_test.cc
+++ b/runtime/arch/stub_test.cc
@@ -1229,32 +1229,15 @@
"aacaacaacaacaacaacaacaacaacaacaacaac", // This one's over.
"aacaacaacaacaacaacaacaacaacaacaacaaca" }; // As is this one. We need a separate one to
// defeat object-equal optimizations.
- static constexpr size_t kBaseStringCount = arraysize(c);
- static constexpr size_t kStringCount = 2 * kBaseStringCount;
+ static constexpr size_t kStringCount = arraysize(c);
StackHandleScope<kStringCount> hs(self);
Handle<mirror::String> s[kStringCount];
- for (size_t i = 0; i < kBaseStringCount; ++i) {
+ for (size_t i = 0; i < kStringCount; ++i) {
s[i] = hs.NewHandle(mirror::String::AllocFromModifiedUtf8(soa.Self(), c[i]));
}
- RandGen r(0x1234);
-
- for (size_t i = kBaseStringCount; i < kStringCount; ++i) {
- s[i] = hs.NewHandle(mirror::String::AllocFromModifiedUtf8(soa.Self(), c[i - kBaseStringCount]));
- int32_t length = s[i]->GetLength();
- if (length > 1) {
- // Set a random offset and length.
- int32_t new_offset = 1 + (r.next() % (length - 1));
- int32_t rest = length - new_offset - 1;
- int32_t new_length = 1 + (rest > 0 ? r.next() % rest : 0);
-
- s[i]->SetField32<false>(mirror::String::CountOffset(), new_length);
- s[i]->SetField32<false>(mirror::String::OffsetOffset(), new_offset);
- }
- }
-
// TODO: wide characters
// Matrix of expectations. First component is first parameter. Note we only check against the