diff options
author | 2016-12-08 11:39:42 +0000 | |
---|---|---|
committer | 2017-03-10 12:59:37 +0000 | |
commit | 1aea3510b8dd0c512cec61c91c5ef1f1e5d53d64 (patch) | |
tree | 94cbab7c3097ce7d3a1feb1a69f28406644af085 /runtime/quick/inline_method_analyser.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 'runtime/quick/inline_method_analyser.cc')
-rw-r--r-- | runtime/quick/inline_method_analyser.cc | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/runtime/quick/inline_method_analyser.cc b/runtime/quick/inline_method_analyser.cc index b009b47195..3347070468 100644 --- a/runtime/quick/inline_method_analyser.cc +++ b/runtime/quick/inline_method_analyser.cc @@ -215,9 +215,8 @@ bool RecordConstructorIPut(ArtMethod* method, REQUIRES_SHARED(Locks::mutator_lock_) { DCHECK(IsInstructionIPut(new_iput->Opcode())); uint32_t field_index = new_iput->VRegC_22c(); - PointerSize pointer_size = Runtime::Current()->GetClassLinker()->GetImagePointerSize(); - mirror::DexCache* dex_cache = method->GetDexCache(); - ArtField* field = dex_cache->GetResolvedField(field_index, pointer_size); + ClassLinker* class_linker = Runtime::Current()->GetClassLinker(); + ArtField* field = class_linker->LookupResolvedField(field_index, method, /* is_static */ false); if (UNLIKELY(field == nullptr)) { return false; } @@ -227,7 +226,9 @@ bool RecordConstructorIPut(ArtMethod* method, if (iputs[old_pos].field_index == DexFile::kDexNoIndex16) { break; } - ArtField* f = dex_cache->GetResolvedField(iputs[old_pos].field_index, pointer_size); + ArtField* f = class_linker->LookupResolvedField(iputs[old_pos].field_index, + method, + /* is_static */ false); DCHECK(f != nullptr); if (f == field) { auto back_it = std::copy(iputs + old_pos + 1, iputs + arraysize(iputs), iputs + old_pos); @@ -732,9 +733,9 @@ bool InlineMethodAnalyser::ComputeSpecialAccessorInfo(ArtMethod* method, if (method == nullptr) { return false; } - mirror::DexCache* dex_cache = method->GetDexCache(); - PointerSize pointer_size = Runtime::Current()->GetClassLinker()->GetImagePointerSize(); - ArtField* field = dex_cache->GetResolvedField(field_idx, pointer_size); + ObjPtr<mirror::DexCache> dex_cache = method->GetDexCache(); + ClassLinker* class_linker = Runtime::Current()->GetClassLinker(); + ArtField* field = class_linker->LookupResolvedField(field_idx, method, /* is_static */ false); if (field == nullptr || field->IsStatic()) { return false; } |