diff options
author | 2021-02-15 21:23:00 +0000 | |
---|---|---|
committer | 2021-02-18 16:51:21 +0000 | |
commit | 5de5efef38f52f248d1e1c88fdcf3d211aabe712 (patch) | |
tree | fb991b4dbee4d9afecad141bc75dab14893633a1 /runtime/class_linker-inl.h | |
parent | 18af6447e5963265f6e7e61d6630064f66891f94 (diff) |
Remove pointer-size arguments from DexCache.
The DexCache is always allocated at runtime now and thus
it always has runtime pointer-size. Remove the dead code.
Test: m test-art-host-gtest
Change-Id: Ic21dc20649e1fd70f8981602d75b5690065aec20
Diffstat (limited to 'runtime/class_linker-inl.h')
-rw-r--r-- | runtime/class_linker-inl.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/runtime/class_linker-inl.h b/runtime/class_linker-inl.h index 81784fb416..69f5a77a25 100644 --- a/runtime/class_linker-inl.h +++ b/runtime/class_linker-inl.h @@ -288,8 +288,7 @@ inline bool ClassLinker::CheckInvokeClassMismatch(ObjPtr<mirror::DexCache> dex_c inline ArtMethod* ClassLinker::LookupResolvedMethod(uint32_t method_idx, ObjPtr<mirror::DexCache> dex_cache, ObjPtr<mirror::ClassLoader> class_loader) { - PointerSize pointer_size = image_pointer_size_; - ArtMethod* resolved = dex_cache->GetResolvedMethod(method_idx, pointer_size); + ArtMethod* resolved = dex_cache->GetResolvedMethod(method_idx); if (resolved == nullptr) { const DexFile& dex_file = *dex_cache->GetDexFile(); const dex::MethodId& method_id = dex_file.GetMethodId(method_idx); @@ -311,7 +310,7 @@ inline ArtMethod* ClassLinker::GetResolvedMethod(uint32_t method_idx, ArtMethod* // We do not need the read barrier for getting the DexCache for the initial resolved method // lookup as both from-space and to-space copies point to the same native resolved methods array. ArtMethod* resolved_method = referrer->GetDexCache<kWithoutReadBarrier>()->GetResolvedMethod( - method_idx, image_pointer_size_); + method_idx); if (resolved_method == nullptr) { return nullptr; } @@ -354,7 +353,7 @@ inline ArtMethod* ClassLinker::ResolveMethod(Thread* self, // We do not need the read barrier for getting the DexCache for the initial resolved method // lookup as both from-space and to-space copies point to the same native resolved methods array. ArtMethod* resolved_method = referrer->GetDexCache<kWithoutReadBarrier>()->GetResolvedMethod( - method_idx, image_pointer_size_); + method_idx); DCHECK(resolved_method == nullptr || !resolved_method->IsRuntimeMethod()); if (UNLIKELY(resolved_method == nullptr)) { referrer = referrer->GetInterfaceMethodIfProxy(image_pointer_size_); @@ -422,7 +421,7 @@ inline ArtField* ClassLinker::LookupResolvedField(uint32_t field_idx, // We do not need the read barrier for getting the DexCache for the initial resolved field // lookup as both from-space and to-space copies point to the same native resolved fields array. ArtField* field = referrer->GetDexCache<kWithoutReadBarrier>()->GetResolvedField( - field_idx, image_pointer_size_); + field_idx); if (field == nullptr) { ObjPtr<mirror::ClassLoader> class_loader = referrer->GetDeclaringClass()->GetClassLoader(); field = LookupResolvedField(field_idx, referrer->GetDexCache(), class_loader, is_static); @@ -437,7 +436,7 @@ inline ArtField* ClassLinker::ResolveField(uint32_t field_idx, // We do not need the read barrier for getting the DexCache for the initial resolved field // lookup as both from-space and to-space copies point to the same native resolved fields array. ArtField* resolved_field = referrer->GetDexCache<kWithoutReadBarrier>()->GetResolvedField( - field_idx, image_pointer_size_); + field_idx); if (UNLIKELY(resolved_field == nullptr)) { StackHandleScope<2> hs(Thread::Current()); ObjPtr<mirror::Class> referring_class = referrer->GetDeclaringClass(); |