diff options
Diffstat (limited to 'runtime/mirror/array.h')
-rw-r--r-- | runtime/mirror/array.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/runtime/mirror/array.h b/runtime/mirror/array.h index 167f824d14..e65611d3c5 100644 --- a/runtime/mirror/array.h +++ b/runtime/mirror/array.h @@ -31,7 +31,7 @@ namespace mirror { class MANAGED Array : public Object { public: // The size of a java.lang.Class representing an array. - static uint32_t ClassSize(); + static uint32_t ClassSize(size_t pointer_size); // Allocates an array with the given properties, if kFillUsable is true the array will be of at // least component_count size, however, if there's usable space at the end of the allocation the @@ -84,6 +84,8 @@ class MANAGED Array : public Object { template<VerifyObjectFlags kVerifyFlags = kDefaultVerifyFlags> ALWAYS_INLINE bool CheckIsValidIndex(int32_t index) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); + Array* CopyOf(Thread* self, int32_t new_length) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); + protected: void ThrowArrayStoreException(Object* object) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); @@ -176,6 +178,18 @@ class MANAGED PrimitiveArray : public Array { DISALLOW_IMPLICIT_CONSTRUCTORS(PrimitiveArray); }; +// Either an IntArray or a LongArray. +class PointerArray : public Array { + public: + template<typename T> + T GetElementPtrSize(uint32_t idx, size_t ptr_size) + SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); + + template<bool kTransactionActive = false, bool kUnchecked = false, typename T> + void SetElementPtrSize(uint32_t idx, T element, size_t ptr_size) + SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); +}; + } // namespace mirror } // namespace art |