diff options
Diffstat (limited to 'runtime/native')
-rw-r--r-- | runtime/native/dalvik_system_VMRuntime.cc | 23 | ||||
-rw-r--r-- | runtime/native/java_lang_Class.cc | 2 | ||||
-rw-r--r-- | runtime/native/java_lang_String.cc | 10 | ||||
-rw-r--r-- | runtime/native/java_lang_StringFactory.cc | 32 |
4 files changed, 34 insertions, 33 deletions
diff --git a/runtime/native/dalvik_system_VMRuntime.cc b/runtime/native/dalvik_system_VMRuntime.cc index 399813c60e..410c2295bf 100644 --- a/runtime/native/dalvik_system_VMRuntime.cc +++ b/runtime/native/dalvik_system_VMRuntime.cc @@ -118,11 +118,11 @@ static jobject VMRuntime_newNonMovableArray(JNIEnv* env, jobject, jclass javaEle return nullptr; } gc::AllocatorType allocator = runtime->GetHeap()->GetCurrentNonMovingAllocator(); - ObjPtr<mirror::Array> result = mirror::Array::Alloc<true>(soa.Self(), - array_class, - length, - array_class->GetComponentSizeShift(), - allocator); + ObjPtr<mirror::Array> result = mirror::Array::Alloc(soa.Self(), + array_class, + length, + array_class->GetComponentSizeShift(), + allocator); return soa.AddLocalReference<jobject>(result); } @@ -145,12 +145,13 @@ static jobject VMRuntime_newUnpaddedArray(JNIEnv* env, jobject, jclass javaEleme return nullptr; } gc::AllocatorType allocator = runtime->GetHeap()->GetCurrentAllocator(); - ObjPtr<mirror::Array> result = mirror::Array::Alloc<true, true>( - soa.Self(), - array_class, - length, - array_class->GetComponentSizeShift(), - allocator); + ObjPtr<mirror::Array> result = + mirror::Array::Alloc</*kIsInstrumented=*/ true, /*kFillUsable=*/ true>( + soa.Self(), + array_class, + length, + array_class->GetComponentSizeShift(), + allocator); return soa.AddLocalReference<jobject>(result); } diff --git a/runtime/native/java_lang_Class.cc b/runtime/native/java_lang_Class.cc index 2b75c59c2a..f69d1bc66c 100644 --- a/runtime/native/java_lang_Class.cc +++ b/runtime/native/java_lang_Class.cc @@ -823,7 +823,7 @@ static jobject Class_newInstance(JNIEnv* env, jobject javaThis) { // Invoke the string allocator to return an empty string for the string class. if (klass->IsStringClass()) { gc::AllocatorType allocator_type = Runtime::Current()->GetHeap()->GetCurrentAllocator(); - ObjPtr<mirror::Object> obj = mirror::String::AllocEmptyString<true>(soa.Self(), allocator_type); + ObjPtr<mirror::Object> obj = mirror::String::AllocEmptyString(soa.Self(), allocator_type); if (UNLIKELY(soa.Self()->IsExceptionPending())) { return nullptr; } else { diff --git a/runtime/native/java_lang_String.cc b/runtime/native/java_lang_String.cc index 83498f6eb0..2d9e7dc55d 100644 --- a/runtime/native/java_lang_String.cc +++ b/runtime/native/java_lang_String.cc @@ -73,11 +73,11 @@ static jstring String_fastSubstring(JNIEnv* env, jobject java_this, jint start, StackHandleScope<1> hs(soa.Self()); Handle<mirror::String> string_this(hs.NewHandle(soa.Decode<mirror::String>(java_this))); gc::AllocatorType allocator_type = Runtime::Current()->GetHeap()->GetCurrentAllocator(); - ObjPtr<mirror::String> result = mirror::String::AllocFromString<true>(soa.Self(), - length, - string_this, - start, - allocator_type); + ObjPtr<mirror::String> result = mirror::String::AllocFromString(soa.Self(), + length, + string_this, + start, + allocator_type); return soa.AddLocalReference<jstring>(result); } 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); } |