diff options
| -rw-r--r-- | runtime/mirror/dex_cache-inl.h | 25 | ||||
| -rw-r--r-- | runtime/mirror/dex_cache.h | 10 |
2 files changed, 0 insertions, 35 deletions
diff --git a/runtime/mirror/dex_cache-inl.h b/runtime/mirror/dex_cache-inl.h index 573244ef17..3ffedcac4b 100644 --- a/runtime/mirror/dex_cache-inl.h +++ b/runtime/mirror/dex_cache-inl.h @@ -243,31 +243,6 @@ inline void DexCache::ClearResolvedMethod(uint32_t method_idx, PointerSize ptr_s } } -template <typename PtrType> -inline PtrType DexCache::GetElementPtrSize(PtrType* ptr_array, size_t idx, PointerSize ptr_size) { - if (ptr_size == PointerSize::k64) { - uint64_t element = reinterpret_cast<const uint64_t*>(ptr_array)[idx]; - return reinterpret_cast<PtrType>(dchecked_integral_cast<uintptr_t>(element)); - } else { - uint32_t element = reinterpret_cast<const uint32_t*>(ptr_array)[idx]; - return reinterpret_cast<PtrType>(dchecked_integral_cast<uintptr_t>(element)); - } -} - -template <typename PtrType> -inline void DexCache::SetElementPtrSize(PtrType* ptr_array, - size_t idx, - PtrType ptr, - PointerSize ptr_size) { - if (ptr_size == PointerSize::k64) { - reinterpret_cast<uint64_t*>(ptr_array)[idx] = - dchecked_integral_cast<uint64_t>(reinterpret_cast<uintptr_t>(ptr)); - } else { - reinterpret_cast<uint32_t*>(ptr_array)[idx] = - dchecked_integral_cast<uint32_t>(reinterpret_cast<uintptr_t>(ptr)); - } -} - template <typename T> NativeDexCachePair<T> DexCache::GetNativePairPtrSize(std::atomic<NativeDexCachePair<T>>* pair_array, size_t idx, diff --git a/runtime/mirror/dex_cache.h b/runtime/mirror/dex_cache.h index b46d80cf15..d940964edb 100644 --- a/runtime/mirror/dex_cache.h +++ b/runtime/mirror/dex_cache.h @@ -417,16 +417,6 @@ class MANAGED DexCache FINAL : public Object { void SetLocation(ObjPtr<String> location) REQUIRES_SHARED(Locks::mutator_lock_); - // NOTE: Get/SetElementPtrSize() are intended for working with ArtMethod** and ArtField** - // provided by GetResolvedMethods/Fields() and ArtMethod::GetDexCacheResolvedMethods(), - // so they need to be public. - - template <typename PtrType> - static PtrType GetElementPtrSize(PtrType* ptr_array, size_t idx, PointerSize ptr_size); - - template <typename PtrType> - static void SetElementPtrSize(PtrType* ptr_array, size_t idx, PtrType ptr, PointerSize ptr_size); - template <typename T> static NativeDexCachePair<T> GetNativePairPtrSize(std::atomic<NativeDexCachePair<T>>* pair_array, size_t idx, |