summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2025-02-05 10:44:09 +0000
committer VladimĂ­r Marko <vmarko@google.com> 2025-02-05 06:56:45 -0800
commita7045d8fd8a38b447b176e93c81765540863c1c9 (patch)
tree33b041c995f0110e8fa75e34cdfe96457c0b3812
parenteb6797da318f8f73654ce34305cadc1bd86db673 (diff)
`ImTable::GetImtIndex()` is not used for proxy methods.
Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Change-Id: I7e974edeb643dd96dfed6908424730f11dabbff0
-rw-r--r--runtime/imtable-inl.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/runtime/imtable-inl.h b/runtime/imtable-inl.h
index 9be56cb8f8..2314df8fe4 100644
--- a/runtime/imtable-inl.h
+++ b/runtime/imtable-inl.h
@@ -38,13 +38,6 @@ inline void ImTable::GetImtHashComponents(ArtMethod* method,
uint32_t* name_hash,
uint32_t* signature_hash) {
if (kImTableHashUseName) {
- if (method->IsProxyMethod()) {
- *class_hash = 0;
- *name_hash = 0;
- *signature_hash = 0;
- return;
- }
-
const DexFile* dex_file = method->GetDexFile();
const dex::MethodId& method_id = dex_file->GetMethodId(method->GetDexMethodIndex());
@@ -84,6 +77,7 @@ inline void ImTable::GetImtHashComponents(ArtMethod* method,
inline uint32_t ImTable::GetImtIndex(ArtMethod* method) {
DCHECK(!method->IsCopied());
+ DCHECK(!method->IsProxyMethod());
if (!method->IsAbstract()) {
// For default methods, where we cannot store the imt_index, we use the
// method_index instead. We mask it with the closest power of two to