From 924ad50f0bcfc49657c5d4d23a197b2e6fdc03fe Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Wed, 19 Sep 2018 09:48:04 +0100 Subject: Refactor Class::FixupNativePointers(). Simplify Class::FixupNativePointers() and fix verify flags usage. Also clean up verify flags for a few array functions. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Bug: 77856493 Change-Id: I5370757827a2a5061b956034434bdc63164eda3f --- runtime/mirror/array.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'runtime/mirror/array.h') diff --git a/runtime/mirror/array.h b/runtime/mirror/array.h index 8bdd561ec4..a31a91443c 100644 --- a/runtime/mirror/array.h +++ b/runtime/mirror/array.h @@ -189,8 +189,9 @@ class PointerArray : public Array { T GetElementPtrSize(uint32_t idx, PointerSize ptr_size) REQUIRES_SHARED(Locks::mutator_lock_); + template void** ElementAddress(size_t index, PointerSize ptr_size) REQUIRES_SHARED(Locks::mutator_lock_) { - DCHECK_LT(index, static_cast(GetLength())); + DCHECK_LT(index, static_cast(GetLength())); return reinterpret_cast(reinterpret_cast(this) + Array::DataOffset(static_cast(ptr_size)).Uint32Value() + static_cast(ptr_size) * index); -- cgit v1.2.3-59-g8ed1b