diff options
author | 2019-03-26 15:17:21 +0000 | |
---|---|---|
committer | 2019-03-27 09:45:20 +0000 | |
commit | 423bebb17f15c3867a52315f0ae421f08f14544f (patch) | |
tree | 97bdf50c7144ae21e6abfe8bdc26858a6a10f94d /runtime/mirror/object_array-inl.h | |
parent | 93d99f3665cbd890509f4c707e1a62c5f26d320e (diff) |
ObjPtr<>-ify mirror::ObjectArray.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 31113334
Change-Id: I611b3e49d3feed306f6cd35d2b662a1e727e24c6
Diffstat (limited to 'runtime/mirror/object_array-inl.h')
-rw-r--r-- | runtime/mirror/object_array-inl.h | 18 |
1 files changed, 9 insertions, 9 deletions
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<class T> template<VerifyObjectFlags kVerifyFlags, ReadBarrierOption kReadBarrierOption> -inline T* ObjectArray<T>::Get(int32_t i) { +inline ObjPtr<T> ObjectArray<T>::Get(int32_t i) { if (!CheckIsValidIndex<kVerifyFlags>(i)) { DCHECK(Thread::Current()->IsExceptionPending()); return nullptr; @@ -94,7 +94,7 @@ inline void ObjectArray<T>::SetWithoutChecksAndWriteBarrier(int32_t i, ObjPtr<T> } template<class T> template<VerifyObjectFlags kVerifyFlags, ReadBarrierOption kReadBarrierOption> -inline T* ObjectArray<T>::GetWithoutChecks(int32_t i) { +inline ObjPtr<T> ObjectArray<T>::GetWithoutChecks(int32_t i) { DCHECK(CheckIsValidIndex(i)); return GetFieldObject<T, kVerifyFlags, kReadBarrierOption>(OffsetOfElement(i)); } @@ -129,7 +129,7 @@ inline void ObjectArray<T>::AssignableMemmove(int32_t dst_pos, reinterpret_cast<uintptr_t>(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<kDefaultVerifyFlags, kWithoutReadBarrier>( + ObjPtr<T> obj = src->template GetWithoutChecks<kDefaultVerifyFlags, kWithoutReadBarrier>( src_pos + i); SetWithoutChecksAndWriteBarrier<false>(dst_pos + i, obj); } @@ -138,7 +138,7 @@ inline void ObjectArray<T>::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<T> obj = src->GetWithoutChecks(src_pos + i); SetWithoutChecksAndWriteBarrier<false>(dst_pos + i, obj); } } @@ -154,7 +154,7 @@ inline void ObjectArray<T>::AssignableMemmove(int32_t dst_pos, reinterpret_cast<uintptr_t>(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<kDefaultVerifyFlags, kWithoutReadBarrier>( + ObjPtr<T> obj = src->template GetWithoutChecks<kDefaultVerifyFlags, kWithoutReadBarrier>( src_pos + i); SetWithoutChecksAndWriteBarrier<false>(dst_pos + i, obj); } @@ -163,7 +163,7 @@ inline void ObjectArray<T>::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<T> obj = src->GetWithoutChecks(src_pos + i); SetWithoutChecksAndWriteBarrier<false>(dst_pos + i, obj); } } @@ -204,8 +204,8 @@ inline void ObjectArray<T>::AssignableMemcpy(int32_t dst_pos, reinterpret_cast<uintptr_t>(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<kDefaultVerifyFlags, kWithoutReadBarrier>( - src_pos + i); + ObjPtr<Object> obj = + src->template GetWithoutChecks<kDefaultVerifyFlags, kWithoutReadBarrier>(src_pos + i); SetWithoutChecksAndWriteBarrier<false>(dst_pos + i, obj); } } @@ -213,7 +213,7 @@ inline void ObjectArray<T>::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<T> obj = src->GetWithoutChecks(src_pos + i); SetWithoutChecksAndWriteBarrier<false>(dst_pos + i, obj); } } |