From 9b81ac36e161fd993eab17b43b93a96e8c63b5cc Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Thu, 16 May 2019 16:47:08 +0100 Subject: 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 --- runtime/interpreter/unstarted_runtime.cc | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'runtime/interpreter/unstarted_runtime.cc') diff --git a/runtime/interpreter/unstarted_runtime.cc b/runtime/interpreter/unstarted_runtime.cc index 9b905eeaed..727cf2f2e8 100644 --- a/runtime/interpreter/unstarted_runtime.cc +++ b/runtime/interpreter/unstarted_runtime.cc @@ -1358,7 +1358,8 @@ void UnstartedRuntime::UnstartedStringFactoryNewStringFromChars( hs.NewHandle(shadow_frame->GetVRegReference(arg_offset + 2)->AsCharArray())); Runtime* runtime = Runtime::Current(); gc::AllocatorType allocator = runtime->GetHeap()->GetCurrentAllocator(); - result->SetL(mirror::String::AllocFromCharArray(self, char_count, h_char_array, offset, allocator)); + result->SetL( + mirror::String::AllocFromCharArray(self, char_count, h_char_array, offset, allocator)); } // This allows creating the new style of String objects during compilation. @@ -1373,8 +1374,8 @@ void UnstartedRuntime::UnstartedStringFactoryNewStringFromString( Handle h_string(hs.NewHandle(to_copy)); Runtime* runtime = Runtime::Current(); gc::AllocatorType allocator = runtime->GetHeap()->GetCurrentAllocator(); - result->SetL(mirror::String::AllocFromString(self, h_string->GetLength(), h_string, 0, - allocator)); + result->SetL( + mirror::String::AllocFromString(self, h_string->GetLength(), h_string, 0, allocator)); } void UnstartedRuntime::UnstartedStringFastSubstring( @@ -1390,7 +1391,7 @@ void UnstartedRuntime::UnstartedStringFastSubstring( DCHECK_LE(start + length, h_string->GetLength()); Runtime* runtime = Runtime::Current(); gc::AllocatorType allocator = runtime->GetHeap()->GetCurrentAllocator(); - result->SetL(mirror::String::AllocFromString(self, length, h_string, start, allocator)); + result->SetL(mirror::String::AllocFromString(self, length, h_string, start, allocator)); } // This allows getting the char array for new style of String objects during compilation. @@ -1720,11 +1721,8 @@ void UnstartedRuntime::UnstartedJNIVMRuntimeNewUnpaddedArray( runtime->GetClassLinker()->FindArrayClass(self, element_class->AsClass()); DCHECK(array_class != nullptr); gc::AllocatorType allocator = runtime->GetHeap()->GetCurrentAllocator(); - result->SetL(mirror::Array::Alloc(self, - array_class, - length, - array_class->GetComponentSizeShift(), - allocator)); + result->SetL(mirror::Array::Alloc( + self, array_class, length, array_class->GetComponentSizeShift(), allocator)); } void UnstartedRuntime::UnstartedJNIVMStackGetCallingClassLoader( -- cgit v1.2.3-59-g8ed1b