From 104883b04617a850adf11f05e57c2fd29e09c83c Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Fri, 9 Nov 2018 17:12:23 +0000 Subject: Clean up primitive array helpers in Object. Refactor these helpers and avoid read barriers. Remove Class::Is{Int,Long}ArrayClass() and use the Object helpers instead. Remove the AsByteSizedArray() and AsShortSizedArray() helpers that essentially break the type system and rewrite their users, adding appropriate notes. {Float,Double}Array uses in Unsafe would have previously failed a DCHECK(). Test: Additional test in 004-UnsafeTest. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Change-Id: I88b7e3df7de883f64cfc5eb437a40646f2884685 --- runtime/mirror/array.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'runtime/mirror/array.h') diff --git a/runtime/mirror/array.h b/runtime/mirror/array.h index 7211f30baa..8816c619df 100644 --- a/runtime/mirror/array.h +++ b/runtime/mirror/array.h @@ -193,9 +193,7 @@ extern template class PrimitiveArray; // ShortArray // Either an IntArray or a LongArray. class PointerArray : public Array { public: - template + template T GetElementPtrSize(uint32_t idx, PointerSize ptr_size) REQUIRES_SHARED(Locks::mutator_lock_); @@ -216,9 +214,7 @@ class PointerArray : public Array { // Fixup the pointers in the dest arrays by passing our pointers through the visitor. Only copies // to dest if visitor(source_ptr) != source_ptr. - template + template void Fixup(mirror::PointerArray* dest, PointerSize pointer_size, const Visitor& visitor) REQUIRES_SHARED(Locks::mutator_lock_); -- cgit v1.2.3-59-g8ed1b