diff options
author | 2017-03-14 14:18:46 +0000 | |
---|---|---|
committer | 2017-03-14 19:03:20 +0000 | |
commit | f44d36c8423f81cbb5e9f55d8813e26ffa1a7f3b (patch) | |
tree | 324b41485ce6c414c1a006c72cbcc5ed9f466138 /patchoat/patchoat.cc | |
parent | 8d6768d47b66a688d35399d524ad5a5450e9d9d4 (diff) |
Revert^2 "Hash-based DexCache field array."
Test: testrunner.py --host --interpreter
Bug: 30627598
This reverts commit 6374c58f2ea403b3a05fb27376110fe4d0fc8e3f.
Change-Id: I275508e288a85d3aa08f7405a1a4f362af43b775
Diffstat (limited to 'patchoat/patchoat.cc')
-rw-r--r-- | patchoat/patchoat.cc | 13 |
1 files changed, 7 insertions, 6 deletions
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<mirror::Object>* 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<false>( mirror::DexCache::ResolvedFieldsOffset(), static_cast<int64_t>(reinterpret_cast<uintptr_t>(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(); |