From 423bebb17f15c3867a52315f0ae421f08f14544f Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Tue, 26 Mar 2019 15:17:21 +0000 Subject: ObjPtr<>-ify mirror::ObjectArray. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Bug: 31113334 Change-Id: I611b3e49d3feed306f6cd35d2b662a1e727e24c6 --- runtime/mirror/object_array-inl.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'runtime/mirror/object_array-inl.h') diff --git a/runtime/mirror/object_array-inl.h b/runtime/mirror/object_array-inl.h index d318887af8..42cabab666 100644 --- a/runtime/mirror/object_array-inl.h +++ b/runtime/mirror/object_array-inl.h @@ -36,7 +36,7 @@ namespace art { namespace mirror { template template -inline T* ObjectArray::Get(int32_t i) { +inline ObjPtr ObjectArray::Get(int32_t i) { if (!CheckIsValidIndex(i)) { DCHECK(Thread::Current()->IsExceptionPending()); return nullptr; @@ -94,7 +94,7 @@ inline void ObjectArray::SetWithoutChecksAndWriteBarrier(int32_t i, ObjPtr } template template -inline T* ObjectArray::GetWithoutChecks(int32_t i) { +inline ObjPtr ObjectArray::GetWithoutChecks(int32_t i) { DCHECK(CheckIsValidIndex(i)); return GetFieldObject(OffsetOfElement(i)); } @@ -129,7 +129,7 @@ inline void ObjectArray::AssignableMemmove(int32_t dst_pos, reinterpret_cast(src.Ptr()) | fake_address_dependency)); for (int i = 0; i < count; ++i) { // We can skip the RB here because 'src' isn't gray. - T* obj = src->template GetWithoutChecks( + ObjPtr obj = src->template GetWithoutChecks( src_pos + i); SetWithoutChecksAndWriteBarrier(dst_pos + i, obj); } @@ -138,7 +138,7 @@ inline void ObjectArray::AssignableMemmove(int32_t dst_pos, if (!baker_non_gray_case) { for (int i = 0; i < count; ++i) { // We need a RB here. ObjectArray::GetWithoutChecks() contains a RB. - T* obj = src->GetWithoutChecks(src_pos + i); + ObjPtr obj = src->GetWithoutChecks(src_pos + i); SetWithoutChecksAndWriteBarrier(dst_pos + i, obj); } } @@ -154,7 +154,7 @@ inline void ObjectArray::AssignableMemmove(int32_t dst_pos, reinterpret_cast(src.Ptr()) | fake_address_dependency)); for (int i = count - 1; i >= 0; --i) { // We can skip the RB here because 'src' isn't gray. - T* obj = src->template GetWithoutChecks( + ObjPtr obj = src->template GetWithoutChecks( src_pos + i); SetWithoutChecksAndWriteBarrier(dst_pos + i, obj); } @@ -163,7 +163,7 @@ inline void ObjectArray::AssignableMemmove(int32_t dst_pos, if (!baker_non_gray_case) { for (int i = count - 1; i >= 0; --i) { // We need a RB here. ObjectArray::GetWithoutChecks() contains a RB. - T* obj = src->GetWithoutChecks(src_pos + i); + ObjPtr obj = src->GetWithoutChecks(src_pos + i); SetWithoutChecksAndWriteBarrier(dst_pos + i, obj); } } @@ -204,8 +204,8 @@ inline void ObjectArray::AssignableMemcpy(int32_t dst_pos, reinterpret_cast(src.Ptr()) | fake_address_dependency)); for (int i = 0; i < count; ++i) { // We can skip the RB here because 'src' isn't gray. - Object* obj = src->template GetWithoutChecks( - src_pos + i); + ObjPtr obj = + src->template GetWithoutChecks(src_pos + i); SetWithoutChecksAndWriteBarrier(dst_pos + i, obj); } } @@ -213,7 +213,7 @@ inline void ObjectArray::AssignableMemcpy(int32_t dst_pos, if (!baker_non_gray_case) { for (int i = 0; i < count; ++i) { // We need a RB here. ObjectArray::GetWithoutChecks() contains a RB. - T* obj = src->GetWithoutChecks(src_pos + i); + ObjPtr obj = src->GetWithoutChecks(src_pos + i); SetWithoutChecksAndWriteBarrier(dst_pos + i, obj); } } -- cgit v1.2.3-59-g8ed1b