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/mirror/array.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'runtime/mirror/array.cc') diff --git a/runtime/mirror/array.cc b/runtime/mirror/array.cc index d42f5a0099..9bff169191 100644 --- a/runtime/mirror/array.cc +++ b/runtime/mirror/array.cc @@ -54,8 +54,8 @@ static ObjPtr RecursiveCreateMultiArray(Thread* self, Handle h_component_type(hs.NewHandle(array_class->GetComponentType())); size_t component_size_shift = h_component_type->GetPrimitiveTypeSizeShift(); gc::AllocatorType allocator_type = Runtime::Current()->GetHeap()->GetCurrentAllocator(); - Handle new_array(hs.NewHandle(Array::Alloc( - self, array_class.Get(), array_length, component_size_shift, allocator_type))); + Handle new_array(hs.NewHandle( + Array::Alloc(self, array_class.Get(), array_length, component_size_shift, allocator_type))); if (UNLIKELY(new_array == nullptr)) { CHECK(self->IsExceptionPending()); return nullptr; @@ -122,11 +122,11 @@ ObjPtr Array::CreateMultiArray(Thread* self, template ObjPtr> PrimitiveArray::Alloc(Thread* self, size_t length) { gc::AllocatorType allocator_type = Runtime::Current()->GetHeap()->GetCurrentAllocator(); - ObjPtr raw_array = Array::Alloc(self, - GetClassRoot>(), - length, - ComponentSizeShiftWidth(sizeof(T)), - allocator_type); + ObjPtr raw_array = Array::Alloc(self, + GetClassRoot>(), + length, + ComponentSizeShiftWidth(sizeof(T)), + allocator_type); return ObjPtr>::DownCast(raw_array); } @@ -151,7 +151,7 @@ ObjPtr Array::CopyOf(Thread* self, int32_t new_length) { const auto component_size = klass->GetComponentSize(); const auto component_shift = klass->GetComponentSizeShift(); ObjPtr new_array = - Alloc(self, klass, new_length, component_shift, allocator_type); // Invalidates klass. + Alloc(self, klass, new_length, component_shift, allocator_type); // Invalidates klass. if (LIKELY(new_array != nullptr)) { memcpy(new_array->GetRawData(component_size, 0), h_this->GetRawData(component_size, 0), -- cgit v1.2.3-59-g8ed1b