summaryrefslogtreecommitdiff
path: root/runtime/mirror/array-alloc-inl.h
diff options
context:
space:
mode:
author Hans Boehm <hboehm@google.com> 2024-09-04 00:27:53 +0000
committer Hans Boehm <hboehm@google.com> 2024-09-26 15:14:48 +0000
commitea269f69d05fe333e4b36634b925c3c40fc8ce95 (patch)
treedb1feb8fb32fd875bf899a45409610da99aa30f0 /runtime/mirror/array-alloc-inl.h
parentf255d9c2c508443ae4a0fb57f903db46ff3e39be (diff)
Revert^4 "Object.clone() allocates more movable objects"
This reverts commit fc0ed57a5f25d8a7b3fbf200224bd880ed05eff5. PS1 is identical to aosp/3231043 PS2 adds 2280-address-of test, re-allows non-movable objects to be allocated in LOS, and more generally tracks non-movable objects in other spaces. PS3 Style tweak PS4 Disable test on jvm Bug: 355291033 Bug: 354087169 Bug: 360363656 Bug: 361327909 Bug: 364629185 Test: Build and boot AOSP Test: testrunner.py --host -b --all-gc -t 2280-address-of Change-Id: I4b2929c353a6ede916762de509056817f001d6f8
Diffstat (limited to 'runtime/mirror/array-alloc-inl.h')
-rw-r--r--runtime/mirror/array-alloc-inl.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/runtime/mirror/array-alloc-inl.h b/runtime/mirror/array-alloc-inl.h
index b905fd1727..69d2e2017f 100644
--- a/runtime/mirror/array-alloc-inl.h
+++ b/runtime/mirror/array-alloc-inl.h
@@ -143,16 +143,14 @@ inline ObjPtr<Array> Array::Alloc(Thread* self,
ObjPtr<Array> result;
if (!kFillUsable) {
SetLengthVisitor visitor(component_count);
- result = ObjPtr<Array>::DownCast(
- heap->AllocObjectWithAllocator<kIsInstrumented>(
- self, array_class, size, allocator_type, visitor));
+ result = ObjPtr<Array>::DownCast(heap->AllocObjectWithAllocator<kIsInstrumented>(
+ self, array_class, size, allocator_type, visitor));
} else {
SetLengthToUsableSizeVisitor visitor(component_count,
DataOffset(1U << component_size_shift).SizeValue(),
component_size_shift);
- result = ObjPtr<Array>::DownCast(
- heap->AllocObjectWithAllocator<kIsInstrumented>(
- self, array_class, size, allocator_type, visitor));
+ result = ObjPtr<Array>::DownCast(heap->AllocObjectWithAllocator<kIsInstrumented>(
+ self, array_class, size, allocator_type, visitor));
}
if (kIsDebugBuild && result != nullptr && Runtime::Current()->IsStarted()) {
array_class = result->GetClass(); // In case the array class moved.