summaryrefslogtreecommitdiff
path: root/runtime/mirror/array.h
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2018-06-01 13:14:32 +0100
committer Vladimir Marko <vmarko@google.com> 2018-06-01 16:31:30 +0100
commitbcf175247272d0e321c8d988c3c01c123b56e36e (patch)
tree9f65ece5ce9474aa4fcf16fbfca6278109dc9a67 /runtime/mirror/array.h
parent09c5ca40635faee00f40f6ca0581dd475efd545e (diff)
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
Diffstat (limited to 'runtime/mirror/array.h')
-rw-r--r--runtime/mirror/array.h22
1 files changed, 11 insertions, 11 deletions
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 <bool kIsInstrumented, bool kFillUsable = false>
- ALWAYS_INLINE static Array* Alloc(Thread* self,
- ObjPtr<Class> array_class,
- int32_t component_count,
- size_t component_size_shift,
- gc::AllocatorType allocator_type)
+ ALWAYS_INLINE static ObjPtr<Array> Alloc(Thread* self,
+ ObjPtr<Class> 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<Class> element_class,
- Handle<IntArray> dimensions)
+ static ObjPtr<Array> CreateMultiArray(Thread* self,
+ Handle<Class> element_class,
+ Handle<IntArray> dimensions)
REQUIRES_SHARED(Locks::mutator_lock_)
REQUIRES(!Roles::uninterruptible_);
@@ -90,7 +90,7 @@ class MANAGED Array : public Object {
template<VerifyObjectFlags kVerifyFlags = kDefaultVerifyFlags>
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<Array> 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<T>* Alloc(Thread* self, size_t length)
+ static ObjPtr<PrimitiveArray<T>> Alloc(Thread* self, size_t length)
REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!Roles::uninterruptible_);
- static PrimitiveArray<T>* AllocateAndFill(Thread* self, const T* data, size_t length)
+ static ObjPtr<PrimitiveArray<T>> AllocateAndFill(Thread* self, const T* data, size_t length)
REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!Roles::uninterruptible_);