summaryrefslogtreecommitdiff
path: root/runtime/gc/space/image_space.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2017-03-14 14:18:46 +0000
committer Vladimir Marko <vmarko@google.com> 2017-03-14 19:03:20 +0000
commitf44d36c8423f81cbb5e9f55d8813e26ffa1a7f3b (patch)
tree324b41485ce6c414c1a006c72cbcc5ed9f466138 /runtime/gc/space/image_space.cc
parent8d6768d47b66a688d35399d524ad5a5450e9d9d4 (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 'runtime/gc/space/image_space.cc')
-rw-r--r--runtime/gc/space/image_space.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/runtime/gc/space/image_space.cc b/runtime/gc/space/image_space.cc
index 010ef1156a..568f8d62a8 100644
--- a/runtime/gc/space/image_space.cc
+++ b/runtime/gc/space/image_space.cc
@@ -1259,17 +1259,18 @@ class ImageSpaceLoader {
}
}
}
- ArtField** fields = dex_cache->GetResolvedFields();
+ mirror::FieldDexCacheType* fields = dex_cache->GetResolvedFields();
if (fields != nullptr) {
- ArtField** new_fields = fixup_adapter.ForwardObject(fields);
+ mirror::FieldDexCacheType* new_fields = fixup_adapter.ForwardObject(fields);
if (fields != new_fields) {
dex_cache->SetResolvedFields(new_fields);
}
for (size_t j = 0, num = dex_cache->NumResolvedFields(); j != num; ++j) {
- ArtField* orig = mirror::DexCache::GetElementPtrSize(new_fields, j, pointer_size);
- ArtField* copy = fixup_adapter.ForwardObject(orig);
- if (orig != copy) {
- mirror::DexCache::SetElementPtrSize(new_fields, j, copy, pointer_size);
+ mirror::FieldDexCachePair orig =
+ mirror::DexCache::GetNativePairPtrSize(new_fields, j, pointer_size);
+ mirror::FieldDexCachePair copy(fixup_adapter.ForwardObject(orig.object), orig.index);
+ if (orig.object != copy.object) {
+ mirror::DexCache::SetNativePairPtrSize(new_fields, j, copy, pointer_size);
}
}
}