diff options
author | 2016-12-08 11:39:42 +0000 | |
---|---|---|
committer | 2017-03-10 12:59:37 +0000 | |
commit | 1aea3510b8dd0c512cec61c91c5ef1f1e5d53d64 (patch) | |
tree | 94cbab7c3097ce7d3a1feb1a69f28406644af085 /patchoat/patchoat.cc | |
parent | d1d4530ffa97729aa8944932a7ac2009ae51c7e3 (diff) |
Hash-based DexCache field array.
Test: m test-art-host, both AOT and interpreter
Test: m test-art-target, both AOT and interpreter
Test: m valgrind-test-art-host
Bug: 30627598
Change-Id: If992f091aadd862d17b09928d21659573dd285a0
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(); |