diff options
| author | 2018-09-19 09:48:04 +0100 | |
|---|---|---|
| committer | 2018-09-19 13:54:22 +0100 | |
| commit | 924ad50f0bcfc49657c5d4d23a197b2e6fdc03fe (patch) | |
| tree | daf8c97184751014cfca2434fe1a9baac2c68eb8 /runtime/mirror/array.h | |
| parent | a93364cbd4ebf4b8c309c4c18f30e16c8f9a8997 (diff) | |
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
Diffstat (limited to 'runtime/mirror/array.h')
| -rw-r--r-- | runtime/mirror/array.h | 3 |
1 files changed, 2 insertions, 1 deletions
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<VerifyObjectFlags kVerifyFlags = kVerifyNone> void** ElementAddress(size_t index, PointerSize ptr_size) REQUIRES_SHARED(Locks::mutator_lock_) { - DCHECK_LT(index, static_cast<size_t>(GetLength())); + DCHECK_LT(index, static_cast<size_t>(GetLength<kVerifyFlags>())); return reinterpret_cast<void**>(reinterpret_cast<uint8_t*>(this) + Array::DataOffset(static_cast<size_t>(ptr_size)).Uint32Value() + static_cast<size_t>(ptr_size) * index); |