From f44d36c8423f81cbb5e9f55d8813e26ffa1a7f3b Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Tue, 14 Mar 2017 14:18:46 +0000 Subject: Revert^2 "Hash-based DexCache field array." Test: testrunner.py --host --interpreter Bug: 30627598 This reverts commit 6374c58f2ea403b3a05fb27376110fe4d0fc8e3f. Change-Id: I275508e288a85d3aa08f7405a1a4f362af43b775 --- patchoat/patchoat.cc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'patchoat/patchoat.cc') diff --git a/patchoat/patchoat.cc b/patchoat/patchoat.cc index 18a667015d..dfaae7d864 100644 --- a/patchoat/patchoat.cc +++ b/patchoat/patchoat.cc @@ -534,17 +534,18 @@ void PatchOat::PatchDexFileArrays(mirror::ObjectArray* img_roots mirror::DexCache::SetElementPtrSize(copy_methods, j, copy, pointer_size); } } - ArtField** orig_fields = orig_dex_cache->GetResolvedFields(); - ArtField** relocated_fields = RelocatedAddressOfPointer(orig_fields); + mirror::FieldDexCacheType* orig_fields = orig_dex_cache->GetResolvedFields(); + mirror::FieldDexCacheType* relocated_fields = RelocatedAddressOfPointer(orig_fields); copy_dex_cache->SetField64( mirror::DexCache::ResolvedFieldsOffset(), static_cast(reinterpret_cast(relocated_fields))); if (orig_fields != nullptr) { - ArtField** copy_fields = RelocatedCopyOf(orig_fields); + mirror::FieldDexCacheType* copy_fields = RelocatedCopyOf(orig_fields); for (size_t j = 0, num = orig_dex_cache->NumResolvedFields(); j != num; ++j) { - ArtField* orig = mirror::DexCache::GetElementPtrSize(orig_fields, j, pointer_size); - ArtField* copy = RelocatedAddressOfPointer(orig); - mirror::DexCache::SetElementPtrSize(copy_fields, j, copy, pointer_size); + mirror::FieldDexCachePair orig = + mirror::DexCache::GetNativePairPtrSize(orig_fields, j, pointer_size); + mirror::FieldDexCachePair copy(RelocatedAddressOfPointer(orig.object), orig.index); + mirror::DexCache::SetNativePairPtrSize(copy_fields, j, copy, pointer_size); } } mirror::MethodTypeDexCacheType* orig_method_types = orig_dex_cache->GetResolvedMethodTypes(); -- cgit v1.2.3-59-g8ed1b