ObjPtr<>-ify array allocations.
And remove some unnecessary calls to ObjPtr<>::Ptr().
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 31113334
Change-Id: Ie313980f7f23b33b0ccea4fa8d5131d643c59080
diff --git a/runtime/mirror/object_array.h b/runtime/mirror/object_array.h
index b7a9561..6506f6e 100644
--- a/runtime/mirror/object_array.h
+++ b/runtime/mirror/object_array.h
@@ -31,15 +31,15 @@
return Array::ClassSize(pointer_size);
}
- static ObjectArray<T>* Alloc(Thread* self,
- ObjPtr<Class> object_array_class,
- int32_t length,
- gc::AllocatorType allocator_type)
+ static ObjPtr<ObjectArray<T>> Alloc(Thread* self,
+ ObjPtr<Class> object_array_class,
+ int32_t length,
+ gc::AllocatorType allocator_type)
REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!Roles::uninterruptible_);
- static ObjectArray<T>* Alloc(Thread* self,
- ObjPtr<Class> object_array_class,
- int32_t length)
+ static ObjPtr<ObjectArray<T>> Alloc(Thread* self,
+ ObjPtr<Class> object_array_class,
+ int32_t length)
REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!Roles::uninterruptible_);
template<VerifyObjectFlags kVerifyFlags = kDefaultVerifyFlags,
@@ -99,7 +99,7 @@
bool throw_exception)
REQUIRES_SHARED(Locks::mutator_lock_);
- ObjectArray<T>* CopyOf(Thread* self, int32_t new_length)
+ ObjPtr<ObjectArray<T>> CopyOf(Thread* self, int32_t new_length)
REQUIRES_SHARED(Locks::mutator_lock_)
REQUIRES(!Roles::uninterruptible_);