From bcf175247272d0e321c8d988c3c01c123b56e36e Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Fri, 1 Jun 2018 13:14:32 +0100 Subject: 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 --- runtime/mirror/array.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'runtime/mirror/array.h') diff --git a/runtime/mirror/array.h b/runtime/mirror/array.h index aeaaf67310..8bdd561ec4 100644 --- a/runtime/mirror/array.h +++ b/runtime/mirror/array.h @@ -37,17 +37,17 @@ class MANAGED Array : public Object { // least component_count size, however, if there's usable space at the end of the allocation the // array will fill it. template - ALWAYS_INLINE static Array* Alloc(Thread* self, - ObjPtr array_class, - int32_t component_count, - size_t component_size_shift, - gc::AllocatorType allocator_type) + ALWAYS_INLINE static ObjPtr Alloc(Thread* self, + ObjPtr array_class, + int32_t component_count, + size_t component_size_shift, + gc::AllocatorType allocator_type) REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!Roles::uninterruptible_); - static Array* CreateMultiArray(Thread* self, - Handle element_class, - Handle dimensions) + static ObjPtr CreateMultiArray(Thread* self, + Handle element_class, + Handle dimensions) REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!Roles::uninterruptible_); @@ -90,7 +90,7 @@ class MANAGED Array : public Object { template ALWAYS_INLINE bool CheckIsValidIndex(int32_t index) REQUIRES_SHARED(Locks::mutator_lock_); - Array* CopyOf(Thread* self, int32_t new_length) REQUIRES_SHARED(Locks::mutator_lock_) + ObjPtr CopyOf(Thread* self, int32_t new_length) REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!Roles::uninterruptible_); protected: @@ -114,10 +114,10 @@ class MANAGED PrimitiveArray : public Array { public: typedef T ElementType; - static PrimitiveArray* Alloc(Thread* self, size_t length) + static ObjPtr> Alloc(Thread* self, size_t length) REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!Roles::uninterruptible_); - static PrimitiveArray* AllocateAndFill(Thread* self, const T* data, size_t length) + static ObjPtr> AllocateAndFill(Thread* self, const T* data, size_t length) REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!Roles::uninterruptible_); -- cgit v1.2.3-59-g8ed1b