diff options
author | Vladimir Marko <vmarko@google.com> | 2019-05-16 16:47:08 +0100 |
---|---|---|
committer | Vladimir Marko <vmarko@google.com> | 2019-05-17 08:10:30 +0000 |
commit | 9b81ac36e161fd993eab17b43b93a96e8c63b5cc (patch) | |
tree | bac59dd8a62ae9f410c707a4086c330b8923a55b /runtime/native/java_lang_StringFactory.cc | |
parent | 92ed90ca3897ae7861b22aa12740065152839649 (diff) |
Add default argument kIsInstrumented=true.
kIsInstrumented=false is reserved for use by specialized
entrypoints which are used only when we can ensure that
the code is not instrumented. So add the default argument
to simplify all other callers.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Change-Id: I3419795794fec9a1733ab3ad698b6415dbac679d
Diffstat (limited to 'runtime/native/java_lang_StringFactory.cc')
-rw-r--r-- | runtime/native/java_lang_StringFactory.cc | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/runtime/native/java_lang_StringFactory.cc b/runtime/native/java_lang_StringFactory.cc index 13f8d5be8e..178d5dabbd 100644 --- a/runtime/native/java_lang_StringFactory.cc +++ b/runtime/native/java_lang_StringFactory.cc @@ -47,12 +47,12 @@ static jstring StringFactory_newStringFromBytes(JNIEnv* env, jclass, jbyteArray return nullptr; } gc::AllocatorType allocator_type = Runtime::Current()->GetHeap()->GetCurrentAllocator(); - ObjPtr<mirror::String> result = mirror::String::AllocFromByteArray<true>(soa.Self(), - byte_count, - byte_array, - offset, - high, - allocator_type); + ObjPtr<mirror::String> result = mirror::String::AllocFromByteArray(soa.Self(), + byte_count, + byte_array, + offset, + high, + allocator_type); return soa.AddLocalReference<jstring>(result); } @@ -64,11 +64,11 @@ static jstring StringFactory_newStringFromChars(JNIEnv* env, jclass, jint offset StackHandleScope<1> hs(soa.Self()); Handle<mirror::CharArray> char_array(hs.NewHandle(soa.Decode<mirror::CharArray>(java_data))); gc::AllocatorType allocator_type = Runtime::Current()->GetHeap()->GetCurrentAllocator(); - ObjPtr<mirror::String> result = mirror::String::AllocFromCharArray<true>(soa.Self(), - char_count, - char_array, - offset, - allocator_type); + ObjPtr<mirror::String> result = mirror::String::AllocFromCharArray(soa.Self(), + char_count, + char_array, + offset, + allocator_type); return soa.AddLocalReference<jstring>(result); } @@ -81,11 +81,11 @@ static jstring StringFactory_newStringFromString(JNIEnv* env, jclass, jstring to StackHandleScope<1> hs(soa.Self()); Handle<mirror::String> string(hs.NewHandle(soa.Decode<mirror::String>(to_copy))); gc::AllocatorType allocator_type = Runtime::Current()->GetHeap()->GetCurrentAllocator(); - ObjPtr<mirror::String> result = mirror::String::AllocFromString<true>(soa.Self(), - string->GetLength(), - string, - 0, - allocator_type); + ObjPtr<mirror::String> result = mirror::String::AllocFromString(soa.Self(), + string->GetLength(), + string, + /*offset=*/ 0, + allocator_type); return soa.AddLocalReference<jstring>(result); } |