From 7c89f49c2c542df1a5780fb851e2ef0e0909f48f Mon Sep 17 00:00:00 2001 From: Hans Boehm Date: Mon, 19 Aug 2024 21:32:19 +0000 Subject: Revert "Object.clone() allocates more movable objects" This reverts commit a5001fed23788c966fd87048d7f17ba8c0b51914. Reason for revert: b/360363656 Change-Id: Ibfea46976bb6434d728c69160edb5904ab7708aa --- runtime/mirror/array-alloc-inl.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'runtime/mirror/array-alloc-inl.h') diff --git a/runtime/mirror/array-alloc-inl.h b/runtime/mirror/array-alloc-inl.h index 8e182a3158..b905fd1727 100644 --- a/runtime/mirror/array-alloc-inl.h +++ b/runtime/mirror/array-alloc-inl.h @@ -115,7 +115,7 @@ class SetLengthToUsableSizeVisitor { DISALLOW_COPY_AND_ASSIGN(SetLengthToUsableSizeVisitor); }; -template +template inline ObjPtr Array::Alloc(Thread* self, ObjPtr array_class, int32_t component_count, @@ -143,15 +143,15 @@ inline ObjPtr Array::Alloc(Thread* self, ObjPtr result; if (!kFillUsable) { SetLengthVisitor visitor(component_count); - result = - ObjPtr::DownCast(heap->AllocObjectWithAllocator( + result = ObjPtr::DownCast( + heap->AllocObjectWithAllocator( self, array_class, size, allocator_type, visitor)); } else { SetLengthToUsableSizeVisitor visitor(component_count, DataOffset(1U << component_size_shift).SizeValue(), component_size_shift); - result = - ObjPtr::DownCast(heap->AllocObjectWithAllocator( + result = ObjPtr::DownCast( + heap->AllocObjectWithAllocator( self, array_class, size, allocator_type, visitor)); } if (kIsDebugBuild && result != nullptr && Runtime::Current()->IsStarted()) { -- cgit v1.2.3-59-g8ed1b