diff options
author | 2017-03-13 14:51:19 +0000 | |
---|---|---|
committer | 2017-03-13 14:52:17 +0000 | |
commit | 6374c58f2ea403b3a05fb27376110fe4d0fc8e3f (patch) | |
tree | 0aacaaf1f193e96b55e0b203b678ae724c0fb6f5 /runtime/quick/inline_method_analyser.cc | |
parent | 8f323e09e692ff4f95f40300391fe41fb96a6c49 (diff) |
Revert "Hash-based DexCache field array."
Reverting to allow rebasing the revert
https://android-review.googlesource.com/351689
without too many conflicts.
Bug: 30627598
This reverts commit 1aea3510b8dd0c512cec61c91c5ef1f1e5d53d64.
Change-Id: I4af65e9f41c8bad8106c028947eca7c5a9534c53
Diffstat (limited to 'runtime/quick/inline_method_analyser.cc')
-rw-r--r-- | runtime/quick/inline_method_analyser.cc | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/runtime/quick/inline_method_analyser.cc b/runtime/quick/inline_method_analyser.cc index 3347070468..b009b47195 100644 --- a/runtime/quick/inline_method_analyser.cc +++ b/runtime/quick/inline_method_analyser.cc @@ -215,8 +215,9 @@ bool RecordConstructorIPut(ArtMethod* method, REQUIRES_SHARED(Locks::mutator_lock_) { DCHECK(IsInstructionIPut(new_iput->Opcode())); uint32_t field_index = new_iput->VRegC_22c(); - ClassLinker* class_linker = Runtime::Current()->GetClassLinker(); - ArtField* field = class_linker->LookupResolvedField(field_index, method, /* is_static */ false); + PointerSize pointer_size = Runtime::Current()->GetClassLinker()->GetImagePointerSize(); + mirror::DexCache* dex_cache = method->GetDexCache(); + ArtField* field = dex_cache->GetResolvedField(field_index, pointer_size); if (UNLIKELY(field == nullptr)) { return false; } @@ -226,9 +227,7 @@ bool RecordConstructorIPut(ArtMethod* method, if (iputs[old_pos].field_index == DexFile::kDexNoIndex16) { break; } - ArtField* f = class_linker->LookupResolvedField(iputs[old_pos].field_index, - method, - /* is_static */ false); + ArtField* f = dex_cache->GetResolvedField(iputs[old_pos].field_index, pointer_size); DCHECK(f != nullptr); if (f == field) { auto back_it = std::copy(iputs + old_pos + 1, iputs + arraysize(iputs), iputs + old_pos); @@ -733,9 +732,9 @@ bool InlineMethodAnalyser::ComputeSpecialAccessorInfo(ArtMethod* method, if (method == nullptr) { return false; } - ObjPtr<mirror::DexCache> dex_cache = method->GetDexCache(); - ClassLinker* class_linker = Runtime::Current()->GetClassLinker(); - ArtField* field = class_linker->LookupResolvedField(field_idx, method, /* is_static */ false); + mirror::DexCache* dex_cache = method->GetDexCache(); + PointerSize pointer_size = Runtime::Current()->GetClassLinker()->GetImagePointerSize(); + ArtField* field = dex_cache->GetResolvedField(field_idx, pointer_size); if (field == nullptr || field->IsStatic()) { return false; } |